PageSourceSearch

https://sniperbuisnesscenter.com/assets/index-DUp4TCCv.js

js sniperbuisnesscenter.com collected 2026-09-24 14:18:18 UTC 2,290,878 bytes, 284 lines download raw bytes

vendor: 6,114 bytes, lines 1-9
1var bX=Object.defineProperty;var nA=e=>{throw TypeError(e)};var CX=(e,t,r)=>t in e?bX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ci=(e,t,r)=>CX(e,typeof t!="symbol"?t+"":t,r),Db=(e,t,r)=>t.has(e)||nA("Cannot "+r);var le=(e,t,r)=>(Db(e,t,"read from private field"),r?r.call(e):t.get(e)),pt=(e,t,r)=>t.has(e)?nA("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Xe=(e,t,r,n)=>(Db(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),zt=(e,t,r)=>(Db(e,t,"access private method"),r);var sp=(e,t,r,n)=>({set _(i){Xe(e,t,i,r)},get _(){return le(e,t,n)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var ip=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function lr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Fb={exports:{}},cx={},Pb={exports:{}},Wt={};/**
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 sA;function wX(){if(sA)return Wt;sA=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"),a=Symbol.for("react.provider"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),x=Symbol.iterator;function m($){return $===null||typeof $!="object"?null:($=x&&$[x]||$["@@iterator"],typeof $=="function"?$:null)}var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,v={};function b($,H,te){this.props=$,this.context=H,this.refs=v,this.updater=te||p}b.prototype.isReactComponent={},b.prototype.setState=function($,H){if(typeof $!="object"&&typeof $!="function"&&$!=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,$,H,"setState")},b.prototype.forceUpdate=function($){this.updater.enqueueForceUpdate(this,$,"forceUpdate")};function E(){}E.prototype=b.prototype;function N($,H,te){this.props=$,this.context=H,this.refs=v,this.updater=te||p}var j=N.prototype=new E;j.constructor=N,y(j,b.prototype),j.isPureReactComponent=!0;var A=Array.isArray,w=Object.prototype.hasOwnProperty,S={current:null},B={key:!0,ref:!0,__self:!0,__source:!0};function D($,H,te){var ne,Y={},J=null,oe=null;if(H!=null)for(ne in H.ref!==void 0&&(oe=H.ref),H.key!==void 0&&(J=""+H.key),H)w.call(H,ne)&&!B.hasOwnProperty(ne)&&(Y[ne]=H[ne]);var he=arguments.length-2;if(he===1)Y.children=te;else if(1<he){for(var Q=Array(he),ue=0;ue<he;ue++)Q[ue]=arguments[ue+2];Y.children=Q}if($&&$.defaultProps)for(ne in he=$.defaultProps,he)Y[ne]===void 0&&(Y[ne]=he[ne]);return{$$typeof:e,type:$,key:J,ref:oe,props:Y,_owner:S.current}}function P($,H){return{$$typeof:e,type:$.type,key:H,ref:$.ref,props:$.props,_owner:$._owner}}function O($){return typeof $=="object"&&$!==null&&$.$$typeof===e}function M($){var H={"=":"=0",":":"=2"};return"$"+$.replace(/[=:]/g,function(te){return H[te]})}var I=/\/+/g;function V($,H){return typeof $=="object"&&$!==null&&$.key!=null?M(""+$.key):H.toString(36)}function W($,H,te,ne,Y){var J=typeof $;(J==="undefined"||J==="boolean")&&($=null);var oe=!1;if($===null)oe=!0;else switch(J){case"string":case"number":oe=!0;break;case"object":switch($.$$typeof){case e:case t:oe=!0}}if(oe)return oe=$,Y=Y(oe),$=ne===""?"."+V(oe,0):ne,A(Y)?(te="",$!=null&&(te=$.replace(I,"$&/")+"/"),W(Y,H,te,"",function(ue){return ue})):Y!=null&&(O(Y)&&(Y=P(Y,te+(!Y.key||oe&&oe.key===Y.key?"":(""+Y.key).replace(I,"$&/")+"/")+$)),H.push(Y)),1;if(oe=0,ne=ne===""?".":ne+":",A($))for(var he=0;he<$.length;he++){J=$[he];var Q=ne+V(J,he);oe+=W(J,H,te,Q,Y)}else if(Q=m($),typeof Q=="function")for($=Q.call($),he=0;!(J=$.next()).done;)J=J.value,Q=ne+V(J,he++),oe+=W(J,H,te,Q,Y);else if(J==="object")throw H=String($),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys($).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.");return oe}function _($,H,te){if($==null)return $;var ne=[],Y=0;return W($,ne,"","",function(J){return H.call(te,J,Y++)}),ne}function z($){if($._status===-1){var H=$._result;H=H(),H.then(function(te){($._status===0||$._status===-1)&&($._status=1,$._result=te)},function(te){($._status===0||$._status===-1)&&($._status=2,$._result=te)}),$._status===-1&&($._status=0,$._result=H)}if($._status===1)return $._result.default;throw $._result}var R={current:null},q={transition:null},G={ReactCurrentDispatcher:R,ReactCurrentBatchConfig:q,ReactCurrentOwner:S};function K(){throw Error("act(...) is not supported in production builds of React.")}return Wt.Children={map:_,forEach:function($,H,te){_($,function(){H.apply(this,arguments)},te)},count:function($){var H=0;return _($,function(){H++}),H},toArray:function($){return _($,function(H){return H})||[]},only:function($){if(!O($))throw Error("React.Children.only expected to receive a single React element child.");return $}},Wt.Component=b,Wt.Fragment=r,Wt.Profiler=i,Wt.PureComponent=N,Wt.StrictMode=n,Wt.Suspense=c,Wt.__SECRET_INT
vendor: 9,162 bytes, lines 9-33
9ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=G,Wt.act=K,Wt.cloneElement=function($,H,te){if($==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+$+".");var ne=y({},$.props),Y=$.key,J=$.ref,oe=$._owner;if(H!=null){if(H.ref!==void 0&&(J=H.ref,oe=S.current),H.key!==void 0&&(Y=""+H.key),$.type&&$.type.defaultProps)var he=$.type.defaultProps;for(Q in H)w.call(H,Q)&&!B.hasOwnProperty(Q)&&(ne[Q]=H[Q]===void 0&&he!==void 0?he[Q]:H[Q])}var Q=arguments.length-2;if(Q===1)ne.children=te;else if(1<Q){he=Array(Q);for(var ue=0;ue<Q;ue++)he[ue]=arguments[ue+2];ne.children=he}return{$$typeof:e,type:$.type,key:Y,ref:J,props:ne,_owner:oe}},Wt.createContext=function($){return $={$$typeof:o,_currentValue:$,_currentValue2:$,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},$.Provider={$$typeof:a,_context:$},$.Consumer=$},Wt.createElement=D,Wt.createFactory=function($){var H=D.bind(null,$);return H.type=$,H},Wt.createRef=function(){return{current:null}},Wt.forwardRef=function($){return{$$typeof:l,render:$}},Wt.isValidElement=O,Wt.lazy=function($){return{$$typeof:f,_payload:{_status:-1,_result:$},_init:z}},Wt.memo=function($,H){return{$$typeof:u,type:$,compare:H===void 0?null:H}},Wt.startTransition=function($){var H=q.transition;q.transition={};try{$()}finally{q.transition=H}},Wt.unstable_act=K,Wt.useCallback=function($,H){return R.current.useCallback($,H)},Wt.useContext=function($){return R.current.useContext($)},Wt.useDebugValue=function(){},Wt.useDeferredValue=function($){return R.current.useDeferredValue($)},Wt.useEffect=function($,H){return R.current.useEffect($,H)},Wt.useId=function(){return R.current.useId()},Wt.useImperativeHandle=function($,H,te){return R.current.useImperativeHandle($,H,te)},Wt.useInsertionEffect=function($,H){return R.current.useInsertionEffect($,H)},Wt.useLayoutEffect=function($,H){return R.current.useLayoutEffect($,H)},Wt.useMemo=function($,H){return R.current.useMemo($,H)},Wt.useReducer=function($,H,te){return R.current.useReducer($,H,te)},Wt.useRef=function($){return R.current.useRef($)},Wt.useState=function($){return R.current.useState($)},Wt.useSyncExternalStore=function($,H,te){return R.current.useSyncExternalStore($,H,te)},Wt.useTransition=function(){return R.current.useTransition()},Wt.version="18.3.1",Wt}var iA;function D4(){return iA||(iA=1,Pb.exports=wX()),Pb.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 aA;function EX(){if(aA)return cx;aA=1;var e=D4(),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,a={key:!0,ref:!0,__self:!0,__source:!0};function o(l,c,u){var f,x={},m=null,p=null;u!==void 0&&(m=""+u),c.key!==void 0&&(m=""+c.key),c.ref!==void 0&&(p=c.ref);for(f in c)n.call(c,f)&&!a.hasOwnProperty(f)&&(x[f]=c[f]);if(l&&l.defaultProps)for(f in c=l.defaultProps,c)x[f]===void 0&&(x[f]=c[f]);return{$$typeof:t,type:l,key:m,ref:p,props:x,_owner:i.current}}return cx.Fragment=r,cx.jsx=o,cx.jsxs=o,cx}var oA;function jX(){return oA||(oA=1,Fb.exports=EX()),Fb.exports}var s=jX(),C=D4();const ie=lr(C);var ap={},Tb={exports:{}},Ps={},Mb={exports:{}},Ob={};/**
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 lA;function NX(){return lA||(lA=1,function(e){function t(q,G){var K=q.length;q.push(G);e:for(;0<K;){var $=K-1>>>1,H=q[$];if(0<i(H,G))q[$]=G,q[K]=H,K=$;else break e}}function r(q){return q.length===0?null:q[0]}function n(q){if(q.length===0)return null;var G=q[0],K=q.pop();if(K!==G){q[0]=K;e:for(var $=0,H=q.length,te=H>>>1;$<te;){var ne=2*($+1)-1,Y=q[ne],J=ne+1,oe=q[J];if(0>i(Y,K))J<H&&0>i(oe,Y)?(q[$]=oe,q[J]=K,$=J):(q[$]=Y,q[ne]=K,$=ne);else if(J<H&&0>i(oe,K))q[$]=oe,q[J]=K,$=J;else break e}}return G}function i(q,G){var K=q.sortIndex-G.sortIndex;return K!==0?K:q.id-G.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var c=[],u=[],f=1,x=null,m=3,p=!1,y=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function j(q){for(var G=r(u);G!==null;){if(G.callback===null)n(u);else if(G.startTime<=q)n(u),G.sortIndex=G.expirationTime,t(c,G);else break;G=r(u)}}function A(q){if(v=!1,j(q),!y)if(r(c)!==null)y=!0,z(w);else{var G=r(u);G!==null&&R(A,G.startTime-q)}}function w(q,G){y=!1,v&&(v=!1,E(D),D=-1),p=!0;var K=m;try{for(j(G),x=r(c);x!==null&&(!(x.expirationTime>G)||q&&!M());){var $=x.callback;if(typeof $=="function"){x.callback=null,m=x.priorityLevel;var H=$(x.expirationTime<=G);G=e.unstable_now(),typeof H=="function"?x.callback=H:x===r(c)&&n(c),j(G)}else n(c);x=r(c)}if(x!==null)var te=!0;else{var ne=r(u);ne!==null&&R(A,ne.startTime-G),te=!1}return te}finally{x=null,m=K,p=!1}}var S=!1,B=null,D=-1,P=5,O=-1;function M(){return!(e.unstable_now()-O<P)}function I(){if(B!==null){var q=e.unstable_now();O=q;var G=!0;try{G=B(!0,q)}finally{G?V():(S=!1,B=null)}}else S=!1}var V;if(typeof N=="function")V=function(){N(I)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,_=W.port2;W.port1.onmessage=I,V=function(){_.postMessage(null)}}else V=function(){b(I,0)};function z(q){B=q,S||(S=!0,V())}function R(q,G){D=b(function(){q(e.unstable_now())},G)}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(){y||p||(y=!0,z(w))},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"):P=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 G=3;break;default:G=m}var K=m;m=G;try{return q()}finally{m=K}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(q,G){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var K=m;m=q;try{return G()}finally{m=K}},e.unstable_scheduleCallback=function(q,G,K){var $=e.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?$+K:$):K=$,q){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=K+H,q={id:f++,callback:G,priorityLevel:q,startTime:K,expirationTime:H,sortIndex:-1},K>$?(q.sortIndex=K,t(u,q),r(c)===null&&q===r(u)&&(v?(E(D),D=-1):v=!0,R(A,K-$))):(q.sortIndex=H,t(c,q),y||p||(y=!0,z(w))),q},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(q){var G=m;return function(){var K=m;m=G;try{return q.apply(this,arguments)}finally{m=K}}}}(Ob)),Ob}var cA;function AX(){return cA||(cA=1,Mb.exports=NX()),Mb.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 uA;function kX(){if(uA)return Ps;uA=1;var e=D4(),t=AX();function r(d){for(var h="https://reactjs.org/docs/error-decoder.html?invariant="+d,g=1;g<arguments.length;g++)h+="&args[]="+encodeURIComponent(arguments[g]);return"Minified React error #"+d+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=new Set,i={};function a(d,h){o(d,h),o(d+"Capture",h)}function o(d,h){for(i[d]=h,d=0;d<h.length;d++)n.add(h[d])}var l=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),c=Object.prototype.hasOwnProperty,u=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,f={},x={};function m(d){return c.call(x,d)?!0:c.call(f,d)?!1:u.test(d)?x[d]=!0:(f[d]=!0,!1)}function p(d,h,g,k){if(g!==null&&g.type===0)return!1;switch(typeof h){case"function":case"symbol":return!0;case"boolean":return k?!1:g!==null?!g.acceptsBooleans:(d=d.toLowerCase().slice(0,5),d!=="data-"&&d!=="aria-");default:return!1}}function y(d,h,g,k){if(h===null||typeof h>
vendor: 47,345 bytes, lines 33-38
33"u"||p(d,h,g,k))return!0;if(k)return!1;if(g!==null)switch(g.type){case 3:return!h;case 4:return h===!1;case 5:return isNaN(h);case 6:return isNaN(h)||1>h}return!1}function v(d,h,g,k,F,T,U){this.acceptsBooleans=h===2||h===3||h===4,this.attributeName=k,this.attributeNamespace=F,this.mustUseProperty=g,this.propertyName=d,this.type=h,this.sanitizeURL=T,this.removeEmptyString=U}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(d){b[d]=new v(d,0,!1,d,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(d){var h=d[0];b[h]=new v(h,1,!1,d[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(d){b[d]=new v(d,2,!1,d.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(d){b[d]=new v(d,2,!1,d,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(d){b[d]=new v(d,3,!1,d.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(d){b[d]=new v(d,3,!0,d,null,!1,!1)}),["capture","download"].forEach(function(d){b[d]=new v(d,4,!1,d,null,!1,!1)}),["cols","rows","size","span"].forEach(function(d){b[d]=new v(d,6,!1,d,null,!1,!1)}),["rowSpan","start"].forEach(function(d){b[d]=new v(d,5,!1,d.toLowerCase(),null,!1,!1)});var E=/[\-:]([a-z])/g;function N(d){return d[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(d){var h=d.replace(E,N);b[h]=new v(h,1,!1,d,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(d){var h=d.replace(E,N);b[h]=new v(h,1,!1,d,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(d){var h=d.replace(E,N);b[h]=new v(h,1,!1,d,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(d){b[d]=new v(d,1,!1,d.toLowerCase(),null,!1,!1)}),b.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(d){b[d]=new v(d,1,!1,d.toLowerCase(),null,!0,!0)});function j(d,h,g,k){var F=b.hasOwnProperty(h)?b[h]:null;(F!==null?F.type!==0:k||!(2<h.length)||h[0]!=="o"&&h[0]!=="O"||h[1]!=="n"&&h[1]!=="N")&&(y(h,g,F,k)&&(g=null),k||F===null?m(h)&&(g===null?d.removeAttribute(h):d.setAttribute(h,""+g)):F.mustUseProperty?d[F.propertyName]=g===null?F.type===3?!1:"":g:(h=F.attributeName,k=F.attributeNamespace,g===null?d.removeAttribute(h):(F=F.type,g=F===3||F===4&&g===!0?"":""+g,k?d.setAttributeNS(k,h,g):d.setAttribute(h,g))))}var A=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for("react.element"),S=Symbol.for("react.portal"),B=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),P=Symbol.for("react.profiler"),O=Symbol.for("react.provider"),M=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),V=Symbol.for("react.suspense"),W=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),q=Symbol.iterator;function G(d){return d===null||typeof d!="object"?null:(d=q&&d[q]||d["@@iterator"],typeof d=="function"?d:null)}var K=Object.assign,$;function H(d){if($===void 0)try{throw Error()}catch(g){var h=g.stack.trim().match(/\n( *(at )?)/);$=h&&h[1]||""}return`
34`+$+d}var te=!1;function ne(d,h){if(!d||te)return"";te=!0;var g=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(h)if(h=function(){throw Error()},Object.defineProperty(h.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(h,[])}catch(Ee){var k=Ee}Reflect.construct(d,[],h)}else{try{h.call()}catch(Ee){k=Ee}d.call(h.prototype)}else{try{throw Error()}catch(Ee){k=Ee}d()}}catch(Ee){if(Ee&&k&&typeof Ee.stack=="string"){for(var F=Ee.stack.split(`
35`),T=k.stack.split(`
36`),U=F.length-1,se=T.length-1;1<=U&&0<=se&&F[U]!==T[se];)se--;for(;1<=U&&0<=se;U--,se--)if(F[U]!==T[se]){if(U!==1||se!==1)do if(U--,se--,0>se||F[U]!==T[se]){var ce=`
37`+F[U].replace(" at new "," at ");return d.displayName&&ce.includes("<anonymous>")&&(ce=ce.replace("<anonymous>",d.displayName)),ce}while(1<=U&&0<=se);break}}}finally{te=!1,Error.prepareStackTrace=g}return(d=d?d.displayName||d.name:"")?H(d):""}function Y(d){switch(d.tag){case 5:return H(d.type);case 16:return H("Lazy");case 13:return H("Suspense");case 19:return H("SuspenseList");case 0:case 2:case 15:return d=ne(d.type,!1),d;case 11:return d=ne(d.type.render,!1),d;case 1:return d=ne(d.type,!0),d;default:return""}}function J(d){if(d==null)return null;if(typeof d=="function")return d.displayName||d.name||null;if(typeof d=="string")return d;switch(d){case B:return"Fragment";case S:return"Portal";case P:return"Profiler";case D:return"StrictMode";case V:return"Suspense";case W:return"SuspenseList"}if(typeof d=="object")switch(d.$$typeof){case M:return(d.displayName||"Context")+".Consumer";case O:return(d._context.displayName||"Context")+".Provider";case I:var h=d.render;return d=d.displayName,d||(d=h.displayName||h.name||"",d=d!==""?"ForwardRef("+d+")":"ForwardRef"),d;case _:return h=d.displayName||null,h!==null?h:J(d.type)||"Memo";case z:h=d._payload,d=d._init;try{return J(d(h))}catch{}}return null}function oe(d){var h=d.type;switch(d.tag){case 24:return"Cache";case 9:return(h.displayName||"Context")+".Consumer";case 10:return(h._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return d=h.render,d=d.displayName||d.name||"",h.displayName||(d!==""?"ForwardRef("+d+")":"ForwardRef");case 7:return"Fragment";case 5:return h;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return J(h);case 8:return h===D?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof h=="function")return h.displayName||h.name||null;if(typeof h=="string")return h}return null}function he(d){switch(typeof d){case"boolean":case"number":case"string":case"undefined":return d;case"object":return d;default:return""}}function Q(d){var h=d.type;return(d=d.nodeName)&&d.toLowerCase()==="input"&&(h==="checkbox"||h==="radio")}function ue(d){var h=Q(d)?"checked":"value",g=Object.getOwnPropertyDescriptor(d.constructor.prototype,h),k=""+d[h];if(!d.hasOwnProperty(h)&&typeof g<"u"&&typeof g.get=="function"&&typeof g.set=="function"){var F=g.get,T=g.set;return Object.defineProperty(d,h,{configurable:!0,get:function(){return F.call(this)},set:function(U){k=""+U,T.call(this,U)}}),Object.defineProperty(d,h,{enumerable:g.enumerable}),{getValue:function(){return k},setValue:function(U){k=""+U},stopTracking:function(){d._valueTracker=null,delete d[h]}}}}function de(d){d._valueTracker||(d._valueTracker=ue(d))}function me(d){if(!d)return!1;var h=d._valueTracker;if(!h)return!0;var g=h.getValue(),k="";return d&&(k=Q(d)?d.checked?"true":"false":d.value),d=k,d!==g?(h.setValue(d),!0):!1}function Le(d){if(d=d||(typeof document<"u"?document:void 0),typeof d>"u")return null;try{return d.activeElement||d.body}catch{return d.body}}function Ne(d,h){var g=h.checked;return K({},h,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:g??d._wrapperState.initialChecked})}function ye(d,h){var g=h.defaultValue==null?"":h.defaultValue,k=h.checked!=null?h.checked:h.defaultChecked;g=he(h.value!=null?h.value:g),d._wrapperState={initialChecked:k,initialValue:g,controlled:h.type==="checkbox"||h.type==="radio"?h.checked!=null:h.value!=null}}function ee(d,h){h=h.checked,h!=null&&j(d,"checked",h,!1)}function Ae(d,h){ee(d,h);var g=he(h.value),k=h.type;if(g!=null)k==="number"?(g===0&&d.value===""||d.value!=g)&&(d.value=""+g):d.value!==""+g&&(d.value=""+g);else if(k==="submit"||k==="reset"){d.removeAttribute("value");return}h.hasOwnProperty("value")?we(d,h.type,g):h.hasOwnProperty("defaultValue")&&we(d,h.type,he(h.defaultValue)),h.checked==null&&h.defaultChecked!=null&&(d.defaultChecked=!!h.defaultChecked)}function De(d,h,g){if(h.hasOwnProperty("value")||h.hasOwnProperty("defaultValue")){var k=h.type;if(!(k!=="submit"&&k!=="reset"||h.value!==void 0&&h.value!==null))return;h=""+d._wrapperState.initialValue,g||h===d.value||(d.value=h),d.defaultValue=h}g=d.name,g!==""&&(d.name=""),d.defaultChecked=!!d._wrapperState.initialChecked,g!==""&&(d.name=g)}function we(d,h,g){(h!=="number"||Le(d.ownerDocument)!==d)&&(g==null?d.defaultValue=""+d._wrapperState.initialValue:d.defaultValue!==""+g&&(d.defaultValue=""+g))}var je=Array.isArray;function Te(d,h,g,k){if(d=d.options,h){h={};for(var F=0;F<g.length;F++)h["$"+g[F]]=!0;for(g=0;g<d.length;g++)F=h.hasOwnProperty("$"+d[g].value),d[g].selected!==F&&(d[g].selected=F),F&&k&&(d[g].defaultSelected=!0)}else{for(g=""+he(g),h=null,F=0;F<d.length;F++){if(d[F].value===g){d[F].selected=!0,k&&(d[F].defaultSelected=!0);return}h!==null||d[F].disabled||(h=d[F])}h!==null&&(h.selected=!0)}}function Se(d,h){if(h.dangerouslySetInnerHTML!=null)throw Error(r(91));return K({},h,{value:void 0,defaultValue:void 0,children:""+d._wrapperState.initialValue})}function He(d,h){var g=h.value;if(g==null){if(g=h.children,h=h.defaultValue,g!=null){if(h!=null)throw Error(r(92));if(je(g)){if(1<g.length)throw Error(r(93));g=g[0]}h=g}h==null&&(h=""),g=h}d._wrapperState={initialValue:he(g)}}function Ue(d,h){var g=he(h.value),k=he(h.defaultValue);g!=null&&(g=""+g,g!==d.value&&(d.value=g),h.defaultValue==null&&d.defaultValue!==g&&(d.defaultValue=g)),k!=null&&(d.defaultValue=""+k)}function rt(d){var h=d.textContent;h===d._wrapperState.initialValue&&h!==""&&h!==null&&(d.value=h)}function wt(d){switch(d){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 Ft(d,h){return d==null||d==="http://www.w3.org/1999/xhtml"?wt(h):d==="http://www.w3.org/2000/svg"&&h==="foreignObject"?"http://www.w3.org/1999/xhtml":d}var xt,Kt=function(d){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(h,g,k,F){MSApp.execUnsafeLocalFunction(function(){return d(h,g,k,F)})}:d}(function(d,h){if(d.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in d)d.innerHTML=h;else{for(xt=xt||document.createElement("div"),xt.innerHTML="<svg>"+h.valueOf().toString()+"</svg>",h=xt.firstChild;d.firstChild;)d.removeChild(d.firstChild);for(;h.firstChild;)d.appendChild(h.firstChild)}});function ft(d,h){if(h){var g=d.firstChild;if(g&&g===d.lastChild&&g.nodeType===3){g.nodeValue=h;return}}d.textContent=h}var Gr={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},Nn=["Webkit","ms","Moz","O"];Object.keys(Gr).forEach(function(d){Nn.forEach(function(h){h=h+d.charAt(0).toUpperCase()+d.substring(1),Gr[h]=Gr[d]})});function vs(d,h,g){return h==null||typeof h=="boolean"||h===""?"":g||typeof h!="number"||h===0||Gr.hasOwnProperty(d)&&Gr[d]?(""+h).trim():h+"px"}function bs(d,h){d=d.style;for(var g in h)if(h.hasOwnProperty(g)){var k=g.indexOf("--")===0,F=vs(g,h[g],k);g==="float"&&(g="cssFloat"),k?d.setProperty(g,F):d[g]=F}}var Kr=K({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 fn(d,h){if(h){if(Kr[d]&&(h.children!=null||h.dangerouslySetInnerHTML!=null))throw Error(r(137,d));if(h.dangerouslySetInnerHTML!=null){if(h.children!=null)throw Error(r(60));if(typeof h.dangerouslySetInnerHTML!="object"||!("__html"in h.dangerouslySetInnerHTML))throw Error(r(61))}if(h.style!=null&&typeof h.style!="object")throw Error(r(62))}}function Rn(d,h){if(d.indexOf("-")===-1)return typeof h.is=="string";switch(d){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 hn=null;function _n(d){return d=d.target||d.srcElement||window,d.correspondingUseElement&&(d=d.correspondingUseElement),d.nodeType===3?d.parentNode:d}var fr=null,Bt=null,Ce=null;function pe(d){if(d=K0(d)){if(typeof fr!="function")throw Error(r(280));var h=d.stateNode;h&&(h=vm(h),fr(d.stateNode,d.type,h))}}function Pe(d){Bt?Ce?Ce.push(d):Ce=[d]:Bt=d}function Rt(){if(Bt){var d=Bt,h=Ce;if(Ce=Bt=null,pe(d),h)for(d=0;d<h.length;d++)pe(h[d])}}function Pt(d,h){return d(h)}function Jt(){}var at=!1;function Qt(d,h,g){if(at)return d(h,g);at=!0;try{return Pt(d,h,g)}finally{at=!1,(Bt!==null||Ce!==null)&&(Jt(),Rt())}}function ht(d,h){var g=d.stateNode;if(g===null)return null;var k=vm(g);if(k===null)return null;g=k[h];e:switch(h){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(k=!k.disabled)||(d=d.type,k=!(d==="button"||d==="input"||d==="select"||d==="textarea")),d=!k;break e;default:d=!1}if(d)return null;if(g&&typeof g!="function")throw Error(r(231,h,typeof g));return g}var ir=!1;if(l)try{var Tr={};Object.defineProperty(Tr,"passive",{get:function(){ir=!0}}),window.addEventListener("test",Tr,Tr),window.removeEventListener("test",Tr,Tr)}catch{ir=!1}function Mr(d,h,g,k,F,T,U,se,ce){var Ee=Array.prototype.slice.call(arguments,3);try{h.apply(g,Ee)}catch(Re){this.onError(Re)}}var wr=!1,Si=null,Js=!1,as=null,Do={onError:function(d){wr=!0,Si=d}};function Fo(d,h,g,k,F,T,U,se,ce){wr=!1,Si=null,Mr.apply(Do,arguments)}function Po(d,h,g,k,F,T,U,se,ce){if(Fo.apply(this,arguments),wr){if(wr){var Ee=Si;wr=!1,Si=null}else throw Error(r(198));Js||(Js=!0,as=Ee)}}function Cs(d){var h=d,g=d;if(d.alternate)for(;h.return;)h=h.return;else{d=h;do h=d,(h.flags&4098)!==0&&(g=h.return),d=h.return;while(d)}return h.tag===3?g:null}function ia(d){if(d.tag===13){var h=d.memoizedState;if(h===null&&(d=d.alternate,d!==null&&(h=d.memoizedState)),h!==null)return h.dehydrated}return null}function ws(d){if(Cs(d)!==d)throw Error(r(188))}function Bi(d){var h=d.alternate;if(!h){if(h=Cs(d),h===null)throw Error(r(188));return h!==d?null:d}for(var g=d,k=h;;){var F=g.return;if(F===null)break;var T=F.alternate;if(T===null){if(k=F.return,k!==null){g=k;continue}break}if(F.child===T.child){for(T=F.child;T;){if(T===g)return ws(F),d;if(T===k)return ws(F),h;T=T.sibling}throw Error(r(188))}if(g.return!==k.return)g=F,k=T;else{for(var U=!1,se=F.child;se;){if(se===g){U=!0,g=F,k=T;break}if(se===k){U=!0,k=F,g=T;break}se=se.sibling}if(!U){for(se=T.child;se;){if(se===g){U=!0,g=T,k=F;break}if(se===k){U=!0,k=T,g=F;break}se=se.sibling}if(!U)throw Error(r(189))}}if(g.alternate!==k)throw Error(r(190))}if(g.tag!==3)throw Error(r(188));return g.stateNode.current===g?d:h}function Me(d){return d=Bi(d),d!==null?Nt(d):null}function Nt(d){if(d.tag===5||d.tag===6)return d;for(d=d.child;d!==null;){var h=Nt(d);if(h!==null)return h;d=d.sibling}return null}var ct=t.unstable_scheduleCallback,yt=t.unstable_cancelCallback,cr=t.unstable_shouldYield,Lt=t.unstable_requestPaint,At=t.unstable_now,ur=t.unstable_getCurrentPriorityLevel,Es=t.unstable_ImmediatePriority,js=t.unstable_UserBlockingPriority,Tt=t.unstable_NormalPriority,Or=t.unstable_LowPriority,Hn=t.unstable_IdlePriority,ei=null,An=null;function $a(d){if(An&&typeof An.onCommitFiberRoot=="function")try{An.onCommitFiberRoot(ei,d,void 0,(d.current.flags&128)===128)}catch{}}var mn=Math.clz32?Math.clz32:Di,za=Math.log,Va=Math.LN2;function Di(d){return d>>>=0,d===0?32:31-(za(d)/Va|0)|0}var Ns=64,ti=4194304;function As(d){switch(d&-d){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 d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function ri(d,h){var g=d.pendingLanes;if(g===0)return 0;var k=0,F=d.suspendedLanes,T=d.pingedLanes,U=g&268435455;if(U!==0){var se=U&~F;se!==0?k=As(se):(T&=U,T!==0&&(k=As(T)))}else U=g&~F,U!==0?k=As(U):T!==0&&(k=As(T));if(k===0)return 0;if(h!==0&&h!==k&&(h&F)===0&&(F=k&-k,T=h&-h,F>=T||F===16&&(T&4194240)!==0))return h;if((k&4)!==0&&(k|=g&16),h=d.entangledLanes,h!==0)for(d=d.entanglements,h&=k;0<h;)g=31-mn(h),F=1<<g,k|=d[g],h&=~F;return k}function re(d,h){switch(d){case 1:case 2:case 4:return h+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 h+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 fe(d,h){for(var g=d.suspendedLanes,k=d.pingedLanes,F=d.expirationTimes,T=d.pendingLanes;0<T;){var U=31-mn(T),se=1<<U,ce=F[U];ce===-1?((se&g)===0||(se&k)!==0)&&(F[U]=re(se,h)):ce<=h&&(d.expiredLanes|=se),T&=~se}}function We(d){return d=d.pendingLanes&-1073741825,d!==0?d:d&1073741824?1073741824:0}function Ke(){var d=Ns;return Ns<<=1,(Ns&4194240)===0&&(Ns=64),d}function Et(d){for(var h=[],g=0;31>g;g++)h.push(d);return h}function Zt(d,h,g){d.pendingLanes|=h,h!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,h=31-mn(h),d[h]=g}function vr(d,h){var g=d.pendingLanes&~h;d.pendingLanes=h,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=h,d.mutableReadLanes&=h,d.entangledLanes&=h,h=d.entanglements;var k=d.eventTimes;for(d=d.expirationTimes;0<g;){var F=31-mn(g),T=1<<F;h[F]=0,k[F]=-1,d[F]=-1,g&=~T}}function ae(d,h){var g=d.entangledLanes|=h;for(d=d.entanglements;g;){var k=31-mn(g),F=1<<k;F&h|d[k]&h&&(d[k]|=h),g&=~F}}var ve=0;function Ie(d){return d&=-d,1<d?4<d?(d&268435455)!==0?16:536870912:4:1}var ut,Mt,Vt,jr,kn,Ut=!1,Sr=[],Nr=null,os=null,To=null,P0=new Map,T0=new Map,Mo=[],VG="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 $j(d,h){switch(d){case"focusin":case"focusout":Nr=null;break;case"dragenter":case"dragleave":os=null;break;case"mouseover":case"mouseout":To=null;break;case"pointerover":case"pointerout":P0.delete(h.pointerId);break;case"gotpointercapture":case"lostpointercapture":T0.delete(h.pointerId)}}function M0(d,h,g,k,F,T){return d===null||d.nativeEvent!==T?(d={blockedOn:h,domEventName:g,eventSystemFlags:k,nativeEvent:T,targetContainers:[F]},h!==null&&(h=K0(h),h!==null&&Mt(h)),d):(d.eventSystemFlags|=k,h=d.targetContainers,F!==null&&h.indexOf(F)===-1&&h.push(F),d)}function UG(d,h,g,k,F){switch(h){case"focusin":return Nr=M0(Nr,d,h,g,k,F),!0;case"dragenter":return os=M0(os,d,h,g,k,F),!0;case"mouseover":return To=M0(To,d,h,g,k,F),!0;case"pointerover":var T=F.pointerId;return P0.set(T,M0(P0.get(T)||null,d,h,g,k,F)),!0;case"gotpointercapture":return T=F.pointerId,T0.set(T,M0(T0.get(T)||null,d,h,g,k,F)),!0}return!1}function zj(d){var h=Vl(d.target);if(h!==null){var g=Cs(h);if(g!==null){if(h=g.tag,h===13){if(h=ia(g),h!==null){d.blockedOn=h,kn(d.priority,function(){Vt(g)});return}}else if(h===3&&g.stateNode.current.memoizedState.isDehydrated){d.blockedOn=g.tag===3?g.stateNode.containerInfo:null;return}}}d.blockedOn=null}function im(d){if(d.blockedOn!==null)return!1;for(var h=d.targetContainers;0<h.length;){var g=nv(d.domEventName,d.eventSystemFlags,h[0],d.nativeEvent);if(g===null){g=d.nativeEvent;var k=new g.constructor(g.type,g);hn=k,g.target.dispatchEvent(k),hn=null}else return h=K0(g),h!==null&&Mt(h),d.blockedOn=g,!1;h.shift()}return!0}function Vj(d,h,g){im(d)&&g.delete(h)}function qG(){Ut=!1,Nr!==null&&im(Nr)&&(Nr=null),os!==null&&im(os)&&(os=null),To!==null&&im(To)&&(To=null),P0.forEach(Vj),T0.forEach(Vj)}function O0(d,h){d.blockedOn===h&&(d.blockedOn=null,Ut||(Ut=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,qG)))}function L0(d){function h(F){return O0(F,d)}if(0<Sr.length){O0(Sr[0],d);for(var g=1;g<Sr.length;g++){var k=Sr[g];k.blockedOn===d&&(k.blockedOn=null)}}for(Nr!==null&&O0(Nr,d),os!==null&&O0(os,d),To!==null&&O0(To,d),P0.forEach(h),T0.forEach(h),g=0;g<Mo.length;g++)k=Mo[g],k.blockedOn===d&&(k.blockedOn=null);for(;0<Mo.length&&(g=Mo[0],g.blockedOn===null);)zj(g),g.blockedOn===null&&Mo.shift()}var du=A.ReactCurrentBatchConfig,am=!0;function WG(d,h,g,k){var F=ve,T=du.transition;du.transition=null;try{ve=1,rv(d,h,g,k)}finally{ve=F,du.transition=T}}function HG(d,h,g,k){var F=ve,T=du.transition;du.transition=null;try{ve=4,rv(d,h,g,k)}finally{ve=F,du.transition=T}}function rv(d,h,g,k){if(am){var F=nv(d,h,g,k);if(F===null)bv(d,h,k,om,g),$j(d,k);else if(UG(F,d,h,g,k))k.stopPropagation();else if($j(d,k),h&4&&-1<VG.indexOf(d)){for(;F!==null;){var T=K0(F);if(T!==null&&ut(T),T=nv(d,h,g,k),T===null&&bv(d,h,k,om,g),T===F)break;F=T}F!==null&&k.stopPropagation()}else bv(d,h,k,null,g)}}var om=null;function nv(d,h,g,k){if(om=null,d=_n(k),d=Vl(d),d!==null)if(h=Cs(d),h===null)d=null;else if(g=h.tag,g===13){if(d=ia(h),d!==null)return d;d=null}else if(g===3){if(h.stateNode.current.memoizedState.isDehydrated)return h.tag===3?h.stateNode.containerInfo:null;d=null}else h!==d&&(d=null);return om=d,null}function Uj(d){switch(d){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(ur()){case Es:return 1;case js:return 4;case Tt:case Or:return 16;case Hn:return 536870912;default:return 16}default:return 16}}var Oo=null,sv=null,lm=null;function qj(){if(lm)return lm;var d,h=sv,g=h.length,k,F="value"in Oo?Oo.value:Oo.textContent,T=F.length;for(d=0;d<g&&h[d]===F[d];d++);var U=g-d;for(k=1;k<=U&&h[g-k]===F[T-k];k++);return lm=F.slice(d,1<k?1-k:void 0)}function cm(d){var h=d.keyCode;return"charCode"in d?(d=d.charCode,d===0&&h===13&&(d=13)):d=h,d===10&&(d=13),32<=d||d===13?d:0}function um(){return!0}function Wj(){return!1}function Vs(d){function h(g,k,F,T,U){this._reactName=g,this._targetInst=F,this.type=k,this.nativeEvent=T,this.target=U,this.currentTarget=null;for(var se in d)d.hasOwnProperty(se)&&(g=d[se],this[se]=g?g(T):T[se]);return this.isDefaultPrevented=(T.defaultPrevented!=null?T.defaultPrevented:T.returnValue===!1)?um:Wj,this.isPropagationStopped=Wj,this}return K(h.prototype,{preventDefault:function(){this.defaultPrevented=!0;var g=this.nativeEvent;g&&(g.preventDefault?g.preventDefault():typeof g.returnValue!="unknown"&&(g.returnValue=!1),this.isDefaultPrevented=um)},stopPropagation:function(){var g=this.nativeEvent;g&&(g.stopPropagation?g.stopPropagation():typeof g.cancelBubble!="unknown"&&(g.cancelBubble=!0),this.isPropagationStopped=um)},persist:function(){},isPersistent:um}),h}var xu={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(d){return d.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},iv=Vs(xu),R0=K({},xu,{view:0,detail:0}),GG=Vs(R0),av,ov,_0,dm=K({},R0,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:cv,button:0,buttons:0,relatedTarget:function(d){return d.relatedTarget===void 0?d.fromElement===d.srcElement?d.toElement:d.fromElement:d.relatedTarget},movementX:function(d){return"movementX"in d?d.movementX:(d!==_0&&(_0&&d.type==="mousemove"?(av=d.screenX-_0.screenX,ov=d.screenY-_0.screenY):ov=av=0,_0=d),av)},movementY:function(d){return"movementY"in d?d.movementY:ov}}),Hj=Vs(dm),KG=K({},dm,{dataTransfer:0}),XG=Vs(KG),YG=K({},R0,{relatedTarget:0}),lv=Vs(YG),QG=K({},xu,{animationName:0,elapsedTime:0,pseudoElement:0}),ZG=Vs(QG),JG=K({},xu,{clipboardData:function(d){return"clipboardData"in d?d.clipboardData:window.clipboardData}}),eK=Vs(JG),tK=K({},xu,{data:0}),Gj=Vs(tK),rK={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},nK={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"},sK={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function iK(d){var h=this.nativeEvent;return h.getModifierState?h.getModifierState(d):(d=sK[d])?!!h[d]:!1}function cv(){return iK}var aK=K({},R0,{key:function(d){if(d.key){var h=rK[d.key]||d.key;if(h!=="Unidentified")return h}return d.type==="keypress"?(d=cm(d),d===13?"Enter":String.fromCharCode(d)):d.type==="keydown"||d.type==="keyup"?nK[d.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:cv,charCode:function(d){return d.type==="keypress"?cm(d):0},keyCode:function(d){return d.type==="keydown"||d.type==="keyup"?d.keyCode:0},which:function(d){return d.type==="keypress"?cm(d):d.type==="keydown"||d.type==="keyup"?d.keyCode:0}}),oK=Vs(aK),lK=K({},dm,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Kj=Vs(lK),cK=K({},R0,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:cv}),uK=Vs(cK),dK=K({},xu,{propertyName:0,elapsedTime:0,pseudoElement:0}),xK=Vs(dK),fK=K({},dm,{deltaX:function(d){return"deltaX"in d?d.deltaX:"wheelDeltaX"in d?-d.wheelDeltaX:0},deltaY:function(d){return"deltaY"in d?d.deltaY:"wheelDeltaY"in d?-d.wheelDeltaY:"wheelDelta"in d?-d.wheelDelta:0},deltaZ:0,deltaMode:0}),hK=Vs(fK),mK=[9,13,27,32],uv=l&&"CompositionEvent"in window,I0=null;l&&"documentMode"in document&&(I0=document.documentMode);var pK=l&&"TextEvent"in window&&!I0,Xj=l&&(!uv||I0&&8<I0&&11>=I0),Yj=" ",Qj=!1;function Zj(d,h){switch(d){case"keyup":return mK.indexOf(h.keyCode)!==-1;case"keydown":return h.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Jj(d){return d=d.detail,typeof d=="object"&&"data"in d?d.data:null}var fu=!1;function gK(d,h){switch(d){case"compositionend":return Jj(h);case"keypress":return h.which!==32?null:(Qj=!0,Yj);case"textInput":return d=h.data,d===Yj&&Qj?null:d;default:return null}}function yK(d,h){if(fu)return d==="compositionend"||!uv&&Zj(d,h)?(d=qj(),lm=sv=Oo=null,fu=!1,d):null;switch(d){case"paste":return null;case"keypress":if(!(h.ctrlKey||h.altKey||h.metaKey)||h.ctrlKey&&h.altKey){if(h.char&&1<h.char.length)return h.char;if(h.which)return String.fromCharCode(h.which)}return null;case"compositionend":return Xj&&h.locale!=="ko"?null:h.data;default:return null}}var vK={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 e7(d){var h=d&&d.nodeName&&d.nodeName.toLowerCase();return h==="input"?!!vK[d.type]:h==="textarea"}function t7(d,h,g,k){Pe(k),h=pm(h,"onChange"),0<h.length&&(g=new iv("onChange","change",null,g,k),d.push({event:g,listeners:h}))}var $0=null,z0=null;function bK(d){v7(d,0)}function xm(d){var h=yu(d);if(me(h))return d}function CK(d,h){if(d==="change")return h}var r7=!1;if(l){var dv;if(l){var xv="oninput"in document;if(!xv){var n7=document.createElement("div");n7.setAttribute("oninput","return;"),xv=typeof n7.oninput=="function"}dv=xv}else dv=!1;r7=dv&&(!document.documentMode||9<document.documentMode)}function s7(){$0&&($0.detachEvent("onpropertychange",i7),z0=$0=null)}function i7(d){if(d.propertyName==="value"&&xm(z0)){var h=[];t7(h,z0,d,_n(d)),Qt(bK,h)}}function wK(d,h,g){d==="focusin"?(s7(),$0=h,z0=g,$0.attachEvent("onpropertychange",i7)):d==="focusout"&&s7()}function EK(d){if(d==="selectionchange"||d==="keyup"||d==="keydown")return xm(z0)}function jK(d,h){if(d==="click")return xm(h)}function NK(d,h){if(d==="input"||d==="change")return xm(h)}function AK(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var Fi=typeof Object.is=="function"?Object.is:AK;function V0(d,h){if(Fi(d,h))return!0;if(typeof d!="object"||d===null||typeof h!="object"||h===null)return!1;var g=Object.keys(d),k=Object.keys(h);if(g.length!==k.length)return!1;for(k=0;k<g.length;k++){var F=g[k];if(!c.call(h,F)||!Fi(d[F],h[F]))return!1}return!0}function a7(d){for(;d&&d.firstChild;)d=d.firstChild;return d}function o7(d,h){var g=a7(d);d=0;for(var k;g;){if(g.nodeType===3){if(k=d+g.textContent.length,d<=h&&k>=h)return{node:g,offset:h-d};d=k}e:{for(;g;){if(g.nextSibling){g=g.nextSibling;break e}g=g.parentNode}g=void 0}g=a7(g)}}function l7(d,h){return d&&h?d===h?!0:d&&d.nodeType===3?!1:h&&h.nodeType===3?l7(d,h.parentNode):"contains"in d?d.contains(h):d.compareDocumentPosition?!!(d.compareDocumentPosition(h)&16):!1:!1}function c7(){for(var d=window,h=Le();h instanceof d.HTMLIFrameElement;){try{var g=typeof h.contentWindow.location.href=="string"}catch{g=!1}if(g)d=h.contentWindow;else break;h=Le(d.document)}return h}function fv(d){var h=d&&d.nodeName&&d.nodeName.toLowerCase();return h&&(h==="input"&&(d.type==="text"||d.type==="search"||d.type==="tel"||d.type==="url"||d.type==="password")||h==="textarea"||d.contentEditable==="true")}function kK(d){var h=c7(),g=d.focusedElem,k=d.selectionRange;if(h!==g&&g&&g.ownerDocument&&l7(g.ownerDocument.documentElement,g)){if(k!==null&&fv(g)){if(h=k.start,d=k.end,d===void 0&&(d=h),"selectionStart"in g)g.selectionStart=h,g.selectionEnd=Math.min(d,g.value.length);else if(d=(h=g.ownerDocument||document)&&h.defaultView||window,d.getSelection){d=d.getSelection();var F=g.textContent.length,T=Math.min(k.start,F);k=k.end===void 0?T:Math.min(k.end,F),!d.extend&&T>k&&(F=k,k=T,T=F),F=o7(g,T);var U=o7(g,k);F&&U&&(d.rangeCount!==1||d.anchorNode!==F.node||d.anchorOffset!==F.offset||d.focusNode!==U.node||d.focusOffset!==U.offset)&&(h=h.createRange(),h.setStart(F.node,F.offset),d.removeAllRanges(),T>k?(d.addRange(h),d.extend(U.node,U.offset)):(h.setEnd(U.node,U.offset),d.addRange(h)))}}for(h=[],d=g;d=d.parentNode;)d.nodeType===1&&h.push({element:d,left:d.scrollLeft,top:d.scrollTop});for(typeof g.focus=="function"&&g.focus(),g=0;g<h.length;g++)d=h[g],d.element.scrollLeft=d.left,d.element.scrollTop=d.top}}var SK=l&&"documentMode"in document&&11>=document.documentMode,hu=null,hv=null,U0=null,mv=!1;function u7(d,h,g){var k=g.window===g?g.document:g.nodeType===9?g:g.ownerDocument;mv||hu==null||hu!==Le(k)||(k=hu,"selectionStart"in k&&fv(k)?k={start:k.selectionStart,end:k.selectionEnd}:(k=(k.ownerDocument&&k.ownerDocument.defaultView||window).getSelection(),k={anchorNode:k.anchorNode,anchorOffset:k.anchorOffset,focusNode:k.focusNode,focusOffset:k.focusOffset}),U0&&V0(U0,k)||(U0=k,k=pm(hv,"onSelect"),0<k.length&&(h=new iv("onSelect","select",null,h,g),d.push({event:h,listeners:k}),h.target=hu)))}function fm(d,h){var g={};return g[d.toLowerCase()]=h.toLowerCase(),g["Webkit"+d]="webkit"+h,g["Moz"+d]="moz"+h,g}var mu={animationend:fm("Animation","AnimationEnd"),animationiteration:fm("Animation","AnimationIteration"),animationstart:fm("Animation","AnimationStart"),transitionend:fm("Transition","TransitionEnd")},pv={},d7={};l&&(d7=document.createElement("div").style,"AnimationEvent"in window||(delete mu.animationend.animation,delete mu.animationiteration.animation,delete mu.animationstart.animation),"TransitionEvent"in window||delete mu.transitionend.transition);function hm(d){if(pv[d])return pv[d];if(!mu[d])return d;var h=mu[d],g;for(g in h)if(h.hasOwnProperty(g)&&g in d7)return pv[d]=h[g];return d}var x7=hm("animationend"),f7=hm("animationiteration"),h7=hm("animationstart"),m7=hm("transitionend"),p7=new Map,g7="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 Lo(d,h){p7.set(d,h),a(h,[d])}for(var gv=0;gv<g7.length;gv++){var yv=g7[gv],BK=yv.toLowerCase(),DK=yv[0].toUpperCase()+yv.slice(1);Lo(BK,"on"+DK)}Lo(x7,"onAnimationEnd"),Lo(f7,"onAnimationIteration"),Lo(h7,"onAnimationStart"),Lo("dblclick","onDoubleClick"),Lo("focusin","onFocus"),Lo("focusout","onBlur"),Lo(m7,"onTransitionEnd"),o("onMouseEnter",["mouseout","mouseover"]),o("onMouseLeave",["mouseout","mouseover"]),o("onPointerEnter",["pointerout","pointerover"]),o("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var q0="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(" "),FK=new Set("cancel close invalid load scroll toggle".split(" ").concat(q0));function y7(d,h,g){var k=d.type||"unknown-event";d.currentTarget=g,Po(k,h,void 0,d),d.currentTarget=null}function v7(d,h){h=(h&4)!==0;for(var g=0;g<d.length;g++){var k=d[g],F=k.event;k=k.listeners;e:{var T=void 0;if(h)for(var U=k.length-1;0<=U;U--){var se=k[U],ce=se.instance,Ee=se.currentTarget;if(se=se.listener,ce!==T&&F.isPropagationStopped())break e;y7(F,se,Ee),T=ce}else for(U=0;U<k.length;U++){if(se=k[U],ce=se.instance,Ee=se.currentTarget,se=se.listener,ce!==T&&F.isPropagationStopped())break e;y7(F,se,Ee),T=ce}}}if(Js)throw d=as,Js=!1,as=null,d}function Br(d,h){var g=h[Av];g===void 0&&(g=h[Av]=new Set);var k=d+"__bubble";g.has(k)||(b7(h,d,2,!1),g.add(k))}function vv(d,h,g){var k=0;h&&(k|=4),b7(g,d,k,h)}var mm="_reactListening"+Math.random().toString(36).slice(2);function W0(d){if(!d[mm]){d[mm]=!0,n.forEach(function(g){g!=="selectionchange"&&(FK.has(g)||vv(g,!1,d),vv(g,!0,d))});var h=d.nodeType===9?d:d.ownerDocument;h===null||h[mm]||(h[mm]=!0,vv("selectionchange",!1,h))}}function b7(d,h,g,k){switch(Uj(h)){case 1:var F=WG;break;case 4:F=HG;break;default:F=rv}g=F.bind(null,h,g,d),F=void 0,!ir||h!=="touchstart"&&h!=="touchmove"&&h!=="wheel"||(F=!0),k?F!==void 0?d.addEventListener(h,g,{capture:!0,passive:F}):d.addEventListener(h,g,!0):F!==void 0?d.addEventListener(h,g,{passive:F}):d.addEventListener(h,g,!1)}function bv(d,h,g,k,F){var T=k;if((h&1)===0&&(h&2)===0&&k!==null)e:for(;;){if(k===null)return;var U=k.tag;if(U===3||U===4){var se=k.stateNode.containerInfo;if(se===F||se.nodeType===8&&se.parentNode===F)break;if(U===4)for(U=k.return;U!==null;){var ce=U.tag;if((ce===3||ce===4)&&(ce=U.stateNode.containerInfo,ce===F||ce.nodeType===8&&ce.parentNode===F))return;U=U.return}for(;se!==null;){if(U=Vl(se),U===null)return;if(ce=U.tag,ce===5||ce===6){k=T=U;continue e}se=se.parentNode}}k=k.return}Qt(function(){var Ee=T,Re=_n(g),_e=[];e:{var Oe=p7.get(d);if(Oe!==void 0){var Ge=iv,nt=d;switch(d){case"keypress":if(cm(g)===0)break e;case"keydown":case"keyup":Ge=oK;break;case"focusin":nt="focus",Ge=lv;break;case"focusout":nt="blur",Ge=lv;break;case"beforeblur":case"afterblur":Ge=lv;break;case"click":if(g.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Ge=Hj;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ge=XG;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ge=uK;break;case x7:case f7:case h7:Ge=ZG;break;case m7:Ge=xK;break;case"scroll":Ge=GG;break;case"wheel":Ge=hK;break;case"copy":case"cut":case"paste":Ge=eK;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ge=Kj}var ot=(h&4)!==0,sn=!ot&&d==="scroll",ge=ot?Oe!==null?Oe+"Capture":null:Oe;ot=[];for(var xe=Ee,be;xe!==null;){be=xe;var ze=be.stateNode;if(be.tag===5&&ze!==null&&(be=ze,ge!==null&&(ze=ht(xe,ge),ze!=null&&ot.push(H0(xe,ze,be)))),sn)break;xe=xe.return}0<ot.length&&(Oe=new Ge(Oe,nt,null,g,Re),_e.push({event:Oe,listeners:ot}))}}if((h&7)===0){e:{if(Oe=d==="mouseover"||d==="pointerover",Ge=d==="mouseout"||d==="pointerout",Oe&&g!==hn&&(nt=g.relatedTarget||g.fromElement)&&(Vl(nt)||nt[Ua]))break e;if((Ge||Oe)&&(Oe=Re.window===Re?Re:(Oe=Re.ownerDocument)?Oe.defaultView||Oe.parentWindow:window,Ge?(nt=g.relatedTarget||g.toElement,Ge=Ee,nt=nt?Vl(nt):null,nt!==null&&(sn=Cs(nt),nt!==sn||nt.tag!==5&&nt.tag!==6)&&(nt=null)):(Ge=null,nt=Ee),Ge!==nt)){if(ot=Hj,ze="onMouseLeave",ge="onMouseEnter",xe="mouse",(d==="pointerout"||d==="pointerover")&&(ot=Kj,ze="onPointerLeave",ge="onPointerEnter",xe="pointer"),sn=Ge==null?Oe:yu(Ge),be=nt==null?Oe:yu(nt),Oe=new ot(ze,xe+"leave",Ge,g,Re),Oe.target=sn,Oe.relatedTarget=be,ze=null,Vl(Re)===Ee&&(ot=new ot(ge,xe+"enter",nt,g,Re),ot.target=be,ot.relatedTarget=sn,ze=ot),sn=ze,Ge&&nt)t:{for(ot=Ge,ge=nt,xe=0,be=ot;be;be=pu(be))xe++;for(be=0,ze=ge;ze;ze=pu(ze))be++;for(;0<xe-be;)ot=pu(ot),xe--;for(;0<be-xe;)ge=pu(ge),be--;for(;xe--;){if(ot===ge||ge!==null&&ot===ge.alternate)break t;ot=pu(ot),ge=pu(ge)}ot=null}else ot=null;Ge!==null&&C7(_e,Oe,Ge,ot,!1),nt!==null&&sn!==null&&C7(_e,sn,nt,ot,!0)}}e:{if(Oe=Ee?yu(Ee):window,Ge=Oe.nodeName&&Oe.nodeName.toLowerCase(),Ge==="select"||Ge==="input"&&Oe.type==="file")var dt=CK;else if(e7(Oe))if(r7)dt=NK;else{dt=EK;var vt=wK}else(Ge=Oe.nodeName)&&Ge.toLowerCase()==="input"&&(Oe.type==="checkbox"||Oe.type==="radio")&&(dt=jK);if(dt&&(dt=dt(d,Ee))){t7(_e,dt,g,Re);break e}vt&&vt(d,Oe,Ee),d==="focusout"&&(vt=Oe._wrapperState)&&vt.controlled&&Oe.type==="number"&&we(Oe,"number",Oe.value)}switch(vt=Ee?yu(Ee):window,d){case"focusin":(e7(vt)||vt.contentEditable==="true")&&(hu=vt,hv=Ee,U0=null);break;case"focusout":U0=hv=hu=null;break;case"mousedown":mv=!0;break;case"contextmenu":case"mouseup":case"dragend":mv=!1,u7(_e,g,Re);break;case"selectionchange":if(SK)break;case"keydown":case"keyup":u7(_e,g,Re)}var bt;if(uv)e:{switch(d){case"compositionstart":var Dt="onCompositionStart";break e;case"compositionend":Dt="onCompositionEnd";break e;case"compositionupdate":Dt="onCompositionUpdate";break e}Dt=void 0}else fu?Zj(d,g)&&(Dt="onCompositionEnd"):d==="keydown"&&g.keyCode===229&&(Dt="onCompositionStart");Dt&&(Xj&&g.locale!=="ko"&&(fu||Dt!=="onCompositionStart"?Dt==="onCompositionEnd"&&fu&&(bt=qj()):(Oo=Re,sv="value"in Oo?Oo.value:Oo.textContent,fu=!0)),vt=pm(Ee,Dt),0<vt.length&&(Dt=new Gj(Dt,d,null,g,Re),_e.push({event:Dt,listeners:vt}),bt?Dt.data=bt:(bt=Jj(g),bt!==null&&(Dt.data=bt)))),(bt=pK?gK(d,g):yK(d,g))&&(Ee=pm(Ee,"onBeforeInput"),0<Ee.length&&(Re=new Gj("onBeforeInput","beforeinput",null,g,Re),_e.push({event:Re,listeners:Ee}),Re.data=bt))}v7(_e,h)})}function H0(d,h,g){return{instance:d,listener:h,currentTarget:g}}function pm(d,h){for(var g=h+"Capture",k=[];d!==null;){var F=d,T=F.stateNode;F.tag===5&&T!==null&&(F=T,T=ht(d,g),T!=null&&k.unshift(H0(d,T,F)),T=ht(d,h),T!=null&&k.push(H0(d,T,F))),d=d.return}return k}function pu(d){if(d===null)return null;do d=d.return;while(d&&d.tag!==5);return d||null}function C7(d,h,g,k,F){for(var T=h._reactName,U=[];g!==null&&g!==k;){var se=g,ce=se.alternate,Ee=se.stateNode;if(ce!==null&&ce===k)break;se.tag===5&&Ee!==null&&(se=Ee,F?(ce=ht(g,T),ce!=null&&U.unshift(H0(g,ce,se))):F||(ce=ht(g,T),ce!=null&&U.push(H0(g,ce,se)))),g=g.return}U.length!==0&&d.push({event:h,listeners:U})}var PK=/\r\n?/g,TK=/\u0000|\uFFFD/g;function w7(d){return(typeof d=="string"?d:""+d).replace(PK,`
38`).replace(TK,"")}function gm(d,h,g){if(h=w7(h),w7(d)!==h&&g)throw Error(r(425))}function ym(){}var Cv=null,wv=null;function Ev(d,h){return d==="textarea"||d==="noscript"||typeof h.children=="string"||typeof h.children=="number"||typeof h.dangerouslySetInnerHTML=="object"&&h.dangerouslySetInnerHTML!==null&&h.dangerouslySetInnerHTML.__html!=null}var jv=typeof setTimeout=="function"?setTimeout:void 0,MK=typeof clearTimeout=="function"?clearTimeout:void 0,E7=typeof Promise=="function"?Promise:void 0,OK=typeof queueMicrotask=="function"?queueMicrotask:typeof E7<"u"?function(d){return E7.resolve(null).then(d).catch(LK)}:jv;function LK(d){setTimeout(function(){throw d})}function Nv(d,h){var g=h,k=0;do{var F=g.nextSibling;if(d.removeChild(g),F&&F.nodeType===8)if(g=F.data,g==="/$"){if(k===0){d.removeChild(F),L0(h);return}k--}else g!=="$"&&g!=="$?"&&g!=="$!"||k++;g=F}while(g);L0(h)}function Ro(d){for(;d!=null;d=d.nextSibling){var h=d.nodeType;if(h===1||h===3)break;if(h===8){if(h=d.data,h==="$"||h==="$!"||h==="$?")break;if(h==="/$")return null}}return d}function j7(d){d=d.previousSibling;for(var h=0;d;){if(d.nodeType===8){var g=d.data;if(g==="$"||g==="$!"||g==="$?"){if(h===0)return d;h--}else g==="/$"&&h++}d=d.previousSibling}return null}var gu=Math.random().toString(36).slice(2),aa="__reactFiber$"+gu,G0="__reactProps$"+gu,Ua="__reactContainer$"+gu,Av="__reactEvents$"+gu,RK="__reactListeners$"+gu,_K="__reactHandles$"+gu;function Vl(d){var h=d[aa];if(h)return h;for(var g=d.parentNode;g;){if(h=g[Ua]||g[aa]){if(g=h.alternate,h.child!==null||g!==null&&g.child!==null)for(d=j7(d);d!==null;){if(g=d[aa])return g;d=j7(d)}return h}d=g,g=d.parentNode}return null}function K0(d){return d=d[aa]||d[Ua],!d||d.tag!==5&&d.tag!==6&&d.tag!==13&&d.tag!==3?null:d}function yu(d){if(d.tag===5||d.tag===6)return d.stateNode;throw Error(r(33))}function vm(d){return d[G0]||null}var kv=[],vu=-1;function _o(d){return{current:d}}function Dr(d){0>vu||(d.current=kv[vu],kv[vu]=null,vu--)}function Ar(d,h){vu++,kv[vu]=d.current,d.current=h}var Io={},Gn=_o(Io),ks=_o(!1),Ul=Io;function bu(d,h){var g=d.type.contextTypes;if(!g)return Io;var k=d.stateNode;if(k&&k.__reactInternalMemoizedUnmaskedChildContext===h)return k.__reactInternalMemoizedMaskedChildContext;var F={},T;for(T in g)F[T]=h[T];return k&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=h,d.__reactInternalMemoizedMaskedChildContext=F),F}function Ss(d){return d=d.childContextTypes,d!=null}function bm(){Dr(ks),Dr(Gn)}function N7(d,h,g){if(Gn.current!==Io)throw Error(r(168));Ar(Gn,h),Ar(ks,g)}function A7(d,h,g){var k=d.stateNode;if(h=h.childContextTypes,typeof k.getChildContext!="function")return g;k=k.getChildContext();for(var F in k)if(!(F in h))throw Error(r(108,oe(d)||"Unknown",F));return K({},g,k)}function Cm(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Io,Ul=Gn.current,Ar(Gn,d),Ar(ks,ks.current),!0}function k7(d,h,g){var k=d.stateNode;if(!k)throw Error(r(169));g?(d=A7(d,h,Ul),k.__reactInternalMemoizedMergedChildContext=d,Dr(ks),Dr(Gn),Ar(Gn,d)):Dr(ks),Ar(ks,g)}var qa=null,wm=!1,Sv=!1;function S7(d){qa===null?qa=[d]:qa.push(d)}function IK(d){wm=!0,S7(d)}function $o(){if(!Sv&&qa!==null){Sv=!0;var d=0,h=ve;try{var g=qa;for(ve=1;d<g.length;d++){var k=g[d];do k=k(!0);while(k!==null)}qa=null,wm=!1}catch(F){throw qa!==null&&(qa=qa.slice(d+1)),ct(Es,$o),F}finally{ve=h,Sv=!1}}return null}var Cu=[],wu=0,Em=null,jm=0,ni=[],si=0,ql=null,Wa=1,Ha="";function Wl(d,h){Cu[wu++]=jm,Cu[wu++]=Em,Em=d,jm=h}function B7(d,h,g){ni[si++]=Wa,ni[si++]=Ha,ni[si++]=ql,ql=d;var k=Wa;d=Ha;var F=32-mn(k)-1;k&=~(1<<F),g+=1;var T=32-mn(h)+F;if(30<T){var U=F-F%5;T=(k&(1<<U)-1).toString(32),k>>=U,F-=U,Wa=1<<32-mn(h)+F|g<<F|k,Ha=T+d}else Wa=1<<T|g<<F|k,Ha=d}function Bv(d){d.return!==null&&(Wl(d,1),B7(d,1,0))}function Dv(d){for(;d===Em;)Em=Cu[--wu],Cu[wu]=null,jm=Cu[--wu],Cu[wu]=null;for(;d===ql;)ql=ni[--si],ni[si]=null,Ha=ni[--si],ni[si]=null,Wa=ni[--si],ni[si]=null}var Us=null,qs=null,Lr=!1,Pi=null;function D7(d,h){var g=li(5,null,null,0);
vendor: 5,326 bytes, line 38
38g.elementType="DELETED",g.stateNode=h,g.return=d,h=d.deletions,h===null?(d.deletions=[g],d.flags|=16):h.push(g)}function F7(d,h){switch(d.tag){case 5:var g=d.type;return h=h.nodeType!==1||g.toLowerCase()!==h.nodeName.toLowerCase()?null:h,h!==null?(d.stateNode=h,Us=d,qs=Ro(h.firstChild),!0):!1;case 6:return h=d.pendingProps===""||h.nodeType!==3?null:h,h!==null?(d.stateNode=h,Us=d,qs=null,!0):!1;case 13:return h=h.nodeType!==8?null:h,h!==null?(g=ql!==null?{id:Wa,overflow:Ha}:null,d.memoizedState={dehydrated:h,treeContext:g,retryLane:1073741824},g=li(18,null,null,0),g.stateNode=h,g.return=d,d.child=g,Us=d,qs=null,!0):!1;default:return!1}}function Fv(d){return(d.mode&1)!==0&&(d.flags&128)===0}function Pv(d){if(Lr){var h=qs;if(h){var g=h;if(!F7(d,h)){if(Fv(d))throw Error(r(418));h=Ro(g.nextSibling);var k=Us;h&&F7(d,h)?D7(k,g):(d.flags=d.flags&-4097|2,Lr=!1,Us=d)}}else{if(Fv(d))throw Error(r(418));d.flags=d.flags&-4097|2,Lr=!1,Us=d}}}function P7(d){for(d=d.return;d!==null&&d.tag!==5&&d.tag!==3&&d.tag!==13;)d=d.return;Us=d}function Nm(d){if(d!==Us)return!1;if(!Lr)return P7(d),Lr=!0,!1;var h;if((h=d.tag!==3)&&!(h=d.tag!==5)&&(h=d.type,h=h!=="head"&&h!=="body"&&!Ev(d.type,d.memoizedProps)),h&&(h=qs)){if(Fv(d))throw T7(),Error(r(418));for(;h;)D7(d,h),h=Ro(h.nextSibling)}if(P7(d),d.tag===13){if(d=d.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(r(317));e:{for(d=d.nextSibling,h=0;d;){if(d.nodeType===8){var g=d.data;if(g==="/$"){if(h===0){qs=Ro(d.nextSibling);break e}h--}else g!=="$"&&g!=="$!"&&g!=="$?"||h++}d=d.nextSibling}qs=null}}else qs=Us?Ro(d.stateNode.nextSibling):null;return!0}function T7(){for(var d=qs;d;)d=Ro(d.nextSibling)}function Eu(){qs=Us=null,Lr=!1}function Tv(d){Pi===null?Pi=[d]:Pi.push(d)}var $K=A.ReactCurrentBatchConfig;function X0(d,h,g){if(d=g.ref,d!==null&&typeof d!="function"&&typeof d!="object"){if(g._owner){if(g=g._owner,g){if(g.tag!==1)throw Error(r(309));var k=g.stateNode}if(!k)throw Error(r(147,d));var F=k,T=""+d;return h!==null&&h.ref!==null&&typeof h.ref=="function"&&h.ref._stringRef===T?h.ref:(h=function(U){var se=F.refs;U===null?delete se[T]:se[T]=U},h._stringRef=T,h)}if(typeof d!="string")throw Error(r(284));if(!g._owner)throw Error(r(290,d))}return d}function Am(d,h){throw d=Object.prototype.toString.call(h),Error(r(31,d==="[object Object]"?"object with keys {"+Object.keys(h).join(", ")+"}":d))}function M7(d){var h=d._init;return h(d._payload)}function O7(d){function h(ge,xe){if(d){var be=ge.deletions;be===null?(ge.deletions=[xe],ge.flags|=16):be.push(xe)}}function g(ge,xe){if(!d)return null;for(;xe!==null;)h(ge,xe),xe=xe.sibling;return null}function k(ge,xe){for(ge=new Map;xe!==null;)xe.key!==null?ge.set(xe.key,xe):ge.set(xe.index,xe),xe=xe.sibling;return ge}function F(ge,xe){return ge=Ko(ge,xe),ge.index=0,ge.sibling=null,ge}function T(ge,xe,be){return ge.index=be,d?(be=ge.alternate,be!==null?(be=be.index,be<xe?(ge.flags|=2,xe):be):(ge.flags|=2,xe)):(ge.flags|=1048576,xe)}function U(ge){return d&&ge.alternate===null&&(ge.flags|=2),ge}function se(ge,xe,be,ze){return xe===null||xe.tag!==6?(xe=jb(be,ge.mode,ze),xe.return=ge,xe):(xe=F(xe,be),xe.return=ge,xe)}function ce(ge,xe,be,ze){var dt=be.type;return dt===B?Re(ge,xe,be.props.children,ze,be.key):xe!==null&&(xe.elementType===dt||typeof dt=="object"&&dt!==null&&dt.$$typeof===z&&M7(dt)===xe.type)?(ze=F(xe,be.props),ze.ref=X0(ge,xe,be),ze.return=ge,ze):(ze=Ym(be.type,be.key,be.props,null,ge.mode,ze),ze.ref=X0(ge,xe,be),ze.return=ge,ze)}function Ee(ge,xe,be,ze){return xe===null||xe.tag!==4||xe.stateNode.containerInfo!==be.containerInfo||xe.stateNode.implementation!==be.implementation?(xe=Nb(be,ge.mode,ze),xe.return=ge,xe):(xe=F(xe,be.children||[]),xe.return=ge,xe)}function Re(ge,xe,be,ze,dt){return xe===null||xe.tag!==7?(xe=Jl(be,ge.mode,ze,dt),xe.return=ge,xe):(xe=F(xe,be),xe.return=ge,xe)}function _e(ge,xe,be){if(typeof xe=="string"&&xe!==""||typeof xe=="number")return xe=jb(""+xe,ge.mode,be),xe.return=ge,xe;if(typeof xe=="object"&&xe!==null){switch(xe.$$typeof){case w:return be=Ym(xe.type,xe.key,xe.props,null,ge.mode,be),be.ref=X0(ge,null,xe),be.return=ge,be;case S:return xe=Nb(xe,ge.mode,be),xe.return=ge,xe;case z:var ze=xe._init;return _e(ge,ze(xe._payload),be)}if(je(xe)||G(xe))return xe=Jl(xe,ge.mode,be,null),xe.return=ge,xe;Am(ge,xe)}return null}function Oe(ge,xe,be,ze){var dt=xe!==null?xe.key:null;if(typeof be=="string"&&be!==""||typeof be=="number")return dt!==null?null:se(ge,xe,""+be,ze);if(typeof be=="object"&&be!==null){switch(be.$$typeof){case w:return be.key===dt?ce(ge,xe,be,ze):null;case S:return be.key===dt?Ee(ge,xe,be,ze):null;case z:return dt=be._init,Oe(ge,xe,dt(be._payload),ze)}if(je(be)||G(be))return dt!==null?null:Re(ge,xe,be,ze,null);Am(ge,be)}return null}function Ge(ge,xe,be,ze,dt){if(typeof ze=="string"&&ze!==""||typeof ze=="number")return ge=ge.get(be)||null,se(xe,ge,""+ze,dt);if(typeof ze=="object"&&ze!==null){switch(ze.$$typeof){case w:return ge=ge.get(ze.key===null?be:ze.key)||null,ce(xe,ge,ze,dt);case S:return ge=ge.get(ze.key===null?be:ze.key)||null,Ee(xe,ge,ze,dt);case z:var vt=ze._init;return Ge(ge,xe,be,vt(ze._payload),dt)}if(je(ze)||G(ze))return ge=ge.get(be)||null,Re(xe,ge,ze,dt,null);Am(xe,ze)}return null}function nt(ge,xe,be,ze){for(var dt=null,vt=null,bt=xe,Dt=xe=0,Dn=null;bt!==null&&Dt<be.length;Dt++){bt.index>
vendor: 36,507 bytes, lines 38-40
38Dt?(Dn=bt,bt=null):Dn=bt.sibling;var dr=Oe(ge,bt,be[Dt],ze);if(dr===null){bt===null&&(bt=Dn);break}d&&bt&&dr.alternate===null&&h(ge,bt),xe=T(dr,xe,Dt),vt===null?dt=dr:vt.sibling=dr,vt=dr,bt=Dn}if(Dt===be.length)return g(ge,bt),Lr&&Wl(ge,Dt),dt;if(bt===null){for(;Dt<be.length;Dt++)bt=_e(ge,be[Dt],ze),bt!==null&&(xe=T(bt,xe,Dt),vt===null?dt=bt:vt.sibling=bt,vt=bt);return Lr&&Wl(ge,Dt),dt}for(bt=k(ge,bt);Dt<be.length;Dt++)Dn=Ge(bt,ge,Dt,be[Dt],ze),Dn!==null&&(d&&Dn.alternate!==null&&bt.delete(Dn.key===null?Dt:Dn.key),xe=T(Dn,xe,Dt),vt===null?dt=Dn:vt.sibling=Dn,vt=Dn);return d&&bt.forEach(function(Xo){return h(ge,Xo)}),Lr&&Wl(ge,Dt),dt}function ot(ge,xe,be,ze){var dt=G(be);if(typeof dt!="function")throw Error(r(150));if(be=dt.call(be),be==null)throw Error(r(151));for(var vt=dt=null,bt=xe,Dt=xe=0,Dn=null,dr=be.next();bt!==null&&!dr.done;Dt++,dr=be.next()){bt.index>Dt?(Dn=bt,bt=null):Dn=bt.sibling;var Xo=Oe(ge,bt,dr.value,ze);if(Xo===null){bt===null&&(bt=Dn);break}d&&bt&&Xo.alternate===null&&h(ge,bt),xe=T(Xo,xe,Dt),vt===null?dt=Xo:vt.sibling=Xo,vt=Xo,bt=Dn}if(dr.done)return g(ge,bt),Lr&&Wl(ge,Dt),dt;if(bt===null){for(;!dr.done;Dt++,dr=be.next())dr=_e(ge,dr.value,ze),dr!==null&&(xe=T(dr,xe,Dt),vt===null?dt=dr:vt.sibling=dr,vt=dr);return Lr&&Wl(ge,Dt),dt}for(bt=k(ge,bt);!dr.done;Dt++,dr=be.next())dr=Ge(bt,ge,Dt,dr.value,ze),dr!==null&&(d&&dr.alternate!==null&&bt.delete(dr.key===null?Dt:dr.key),xe=T(dr,xe,Dt),vt===null?dt=dr:vt.sibling=dr,vt=dr);return d&&bt.forEach(function(vX){return h(ge,vX)}),Lr&&Wl(ge,Dt),dt}function sn(ge,xe,be,ze){if(typeof be=="object"&&be!==null&&be.type===B&&be.key===null&&(be=be.props.children),typeof be=="object"&&be!==null){switch(be.$$typeof){case w:e:{for(var dt=be.key,vt=xe;vt!==null;){if(vt.key===dt){if(dt=be.type,dt===B){if(vt.tag===7){g(ge,vt.sibling),xe=F(vt,be.props.children),xe.return=ge,ge=xe;break e}}else if(vt.elementType===dt||typeof dt=="object"&&dt!==null&&dt.$$typeof===z&&M7(dt)===vt.type){g(ge,vt.sibling),xe=F(vt,be.props),xe.ref=X0(ge,vt,be),xe.return=ge,ge=xe;break e}g(ge,vt);break}else h(ge,vt);vt=vt.sibling}be.type===B?(xe=Jl(be.props.children,ge.mode,ze,be.key),xe.return=ge,ge=xe):(ze=Ym(be.type,be.key,be.props,null,ge.mode,ze),ze.ref=X0(ge,xe,be),ze.return=ge,ge=ze)}return U(ge);case S:e:{for(vt=be.key;xe!==null;){if(xe.key===vt)if(xe.tag===4&&xe.stateNode.containerInfo===be.containerInfo&&xe.stateNode.implementation===be.implementation){g(ge,xe.sibling),xe=F(xe,be.children||[]),xe.return=ge,ge=xe;break e}else{g(ge,xe);break}else h(ge,xe);xe=xe.sibling}xe=Nb(be,ge.mode,ze),xe.return=ge,ge=xe}return U(ge);case z:return vt=be._init,sn(ge,xe,vt(be._payload),ze)}if(je(be))return nt(ge,xe,be,ze);if(G(be))return ot(ge,xe,be,ze);Am(ge,be)}return typeof be=="string"&&be!==""||typeof be=="number"?(be=""+be,xe!==null&&xe.tag===6?(g(ge,xe.sibling),xe=F(xe,be),xe.return=ge,ge=xe):(g(ge,xe),xe=jb(be,ge.mode,ze),xe.return=ge,ge=xe),U(ge)):g(ge,xe)}return sn}var ju=O7(!0),L7=O7(!1),km=_o(null),Sm=null,Nu=null,Mv=null;function Ov(){Mv=Nu=Sm=null}function Lv(d){var h=km.current;Dr(km),d._currentValue=h}function Rv(d,h,g){for(;d!==null;){var k=d.alternate;if((d.childLanes&h)!==h?(d.childLanes|=h,k!==null&&(k.childLanes|=h)):k!==null&&(k.childLanes&h)!==h&&(k.childLanes|=h),d===g)break;d=d.return}}function Au(d,h){Sm=d,Mv=Nu=null,d=d.dependencies,d!==null&&d.firstContext!==null&&((d.lanes&h)!==0&&(Bs=!0),d.firstContext=null)}function ii(d){var h=d._currentValue;if(Mv!==d)if(d={context:d,memoizedValue:h,next:null},Nu===null){if(Sm===null)throw Error(r(308));Nu=d,Sm.dependencies={lanes:0,firstContext:d}}else Nu=Nu.next=d;return h}var Hl=null;function _v(d){Hl===null?Hl=[d]:Hl.push(d)}function R7(d,h,g,k){var F=h.interleaved;return F===null?(g.next=g,_v(h)):(g.next=F.next,F.next=g),h.interleaved=g,Ga(d,k)}function Ga(d,h){d.lanes|=h;var g=d.alternate;for(g!==null&&(g.lanes|=h),g=d,d=d.return;d!==null;)d.childLanes|=h,g=d.alternate,g!==null&&(g.childLanes|=h),g=d,d=d.return;return g.tag===3?g.stateNode:null}var zo=!1;function Iv(d){d.updateQueue={baseState:d.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function _7(d,h){d=d.updateQueue,h.updateQueue===d&&(h.updateQueue={baseState:d.baseState,firstBaseUpdate:d.firstBaseUpdate,lastBaseUpdate:d.lastBaseUpdate,shared:d.shared,effects:d.effects})}function Ka(d,h){return{eventTime:d,lane:h,tag:0,payload:null,callback:null,next:null}}function Vo(d,h,g){var k=d.updateQueue;if(k===null)return null;if(k=k.shared,(ar&2)!==0){var F=k.pending;return F===null?h.next=h:(h.next=F.next,F.next=h),k.pending=h,Ga(d,g)}return F=k.interleaved,F===null?(h.next=h,_v(k)):(h.next=F.next,F.next=h),k.interleaved=h,Ga(d,g)}function Bm(d,h,g){if(h=h.updateQueue,h!==null&&(h=h.shared,(g&4194240)!==0)){var k=h.lanes;k&=d.pendingLanes,g|=k,h.lanes=g,ae(d,g)}}function I7(d,h){var g=d.updateQueue,k=d.alternate;if(k!==null&&(k=k.updateQueue,g===k)){var F=null,T=null;if(g=g.firstBaseUpdate,g!==null){do{var U={eventTime:g.eventTime,lane:g.lane,tag:g.tag,payload:g.payload,callback:g.callback,next:null};T===null?F=T=U:T=T.next=U,g=g.next}while(g!==null);T===null?F=T=h:T=T.next=h}else F=T=h;g={baseState:k.baseState,firstBaseUpdate:F,lastBaseUpdate:T,shared:k.shared,effects:k.effects},d.updateQueue=g;return}d=g.lastBaseUpdate,d===null?g.firstBaseUpdate=h:d.next=h,g.lastBaseUpdate=h}function Dm(d,h,g,k){var F=d.updateQueue;zo=!1;var T=F.firstBaseUpdate,U=F.lastBaseUpdate,se=F.shared.pending;if(se!==null){F.shared.pending=null;var ce=se,Ee=ce.next;ce.next=null,U===null?T=Ee:U.next=Ee,U=ce;var Re=d.alternate;Re!==null&&(Re=Re.updateQueue,se=Re.lastBaseUpdate,se!==U&&(se===null?Re.firstBaseUpdate=Ee:se.next=Ee,Re.lastBaseUpdate=ce))}if(T!==null){var _e=F.baseState;U=0,Re=Ee=ce=null,se=T;do{var Oe=se.lane,Ge=se.eventTime;if((k&Oe)===Oe){Re!==null&&(Re=Re.next={eventTime:Ge,lane:0,tag:se.tag,payload:se.payload,callback:se.callback,next:null});e:{var nt=d,ot=se;switch(Oe=h,Ge=g,ot.tag){case 1:if(nt=ot.payload,typeof nt=="function"){_e=nt.call(Ge,_e,Oe);break e}_e=nt;break e;case 3:nt.flags=nt.flags&-65537|128;case 0:if(nt=ot.payload,Oe=typeof nt=="function"?nt.call(Ge,_e,Oe):nt,Oe==null)break e;_e=K({},_e,Oe);break e;case 2:zo=!0}}se.callback!==null&&se.lane!==0&&(d.flags|=64,Oe=F.effects,Oe===null?F.effects=[se]:Oe.push(se))}else Ge={eventTime:Ge,lane:Oe,tag:se.tag,payload:se.payload,callback:se.callback,next:null},Re===null?(Ee=Re=Ge,ce=_e):Re=Re.next=Ge,U|=Oe;if(se=se.next,se===null){if(se=F.shared.pending,se===null)break;Oe=se,se=Oe.next,Oe.next=null,F.lastBaseUpdate=Oe,F.shared.pending=null}}while(!0);if(Re===null&&(ce=_e),F.baseState=ce,F.firstBaseUpdate=Ee,F.lastBaseUpdate=Re,h=F.shared.interleaved,h!==null){F=h;do U|=F.lane,F=F.next;while(F!==h)}else T===null&&(F.shared.lanes=0);Xl|=U,d.lanes=U,d.memoizedState=_e}}function $7(d,h,g){if(d=h.effects,h.effects=null,d!==null)for(h=0;h<d.length;h++){var k=d[h],F=k.callback;if(F!==null){if(k.callback=null,k=g,typeof F!="function")throw Error(r(191,F));F.call(k)}}}var Y0={},oa=_o(Y0),Q0=_o(Y0),Z0=_o(Y0);function Gl(d){if(d===Y0)throw Error(r(174));return d}function $v(d,h){switch(Ar(Z0,h),Ar(Q0,d),Ar(oa,Y0),d=h.nodeType,d){case 9:case 11:h=(h=h.documentElement)?h.namespaceURI:Ft(null,"");break;default:d=d===8?h.parentNode:h,h=d.namespaceURI||null,d=d.tagName,h=Ft(h,d)}Dr(oa),Ar(oa,h)}function ku(){Dr(oa),Dr(Q0),Dr(Z0)}function z7(d){Gl(Z0.current);var h=Gl(oa.current),g=Ft(h,d.type);h!==g&&(Ar(Q0,d),Ar(oa,g))}function zv(d){Q0.current===d&&(Dr(oa),Dr(Q0))}var zr=_o(0);function Fm(d){for(var h=d;h!==null;){if(h.tag===13){var g=h.memoizedState;if(g!==null&&(g=g.dehydrated,g===null||g.data==="$?"||g.data==="$!"))return h}else if(h.tag===19&&h.memoizedProps.revealOrder!==void 0){if((h.flags&128)!==0)return h}else if(h.child!==null){h.child.return=h,h=h.child;continue}if(h===d)break;for(;h.sibling===null;){if(h.return===null||h.return===d)return null;h=h.return}h.sibling.return=h.return,h=h.sibling}return null}var Vv=[];function Uv(){for(var d=0;d<Vv.length;d++)Vv[d]._workInProgressVersionPrimary=null;Vv.length=0}var Pm=A.ReactCurrentDispatcher,qv=A.ReactCurrentBatchConfig,Kl=0,Vr=null,pn=null,Sn=null,Tm=!1,J0=!1,ex=0,zK=0;function Kn(){throw Error(r(321))}function Wv(d,h){if(h===null)return!1;for(var g=0;g<h.length&&g<d.length;g++)if(!Fi(d[g],h[g]))return!1;return!0}function Hv(d,h,g,k,F,T){if(Kl=T,Vr=h,h.memoizedState=null,h.updateQueue=null,h.lanes=0,Pm.current=d===null||d.memoizedState===null?WK:HK,d=g(k,F),J0){T=0;do{if(J0=!1,ex=0,25<=T)throw Error(r(301));T+=1,Sn=pn=null,h.updateQueue=null,Pm.current=GK,d=g(k,F)}while(J0)}if(Pm.current=Lm,h=pn!==null&&pn.next!==null,Kl=0,Sn=pn=Vr=null,Tm=!1,h)throw Error(r(300));return d}function Gv(){var d=ex!==0;return ex=0,d}function la(){var d={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Sn===null?Vr.memoizedState=Sn=d:Sn=Sn.next=d,Sn}function ai(){if(pn===null){var d=Vr.alternate;d=d!==null?d.memoizedState:null}else d=pn.next;var h=Sn===null?Vr.memoizedState:Sn.next;if(h!==null)Sn=h,pn=d;else{if(d===null)throw Error(r(310));pn=d,d={memoizedState:pn.memoizedState,baseState:pn.baseState,baseQueue:pn.baseQueue,queue:pn.queue,next:null},Sn===null?Vr.memoizedState=Sn=d:Sn=Sn.next=d}return Sn}function tx(d,h){return typeof h=="function"?h(d):h}function Kv(d){var h=ai(),g=h.queue;if(g===null)throw Error(r(311));g.lastRenderedReducer=d;var k=pn,F=k.baseQueue,T=g.pending;if(T!==null){if(F!==null){var U=F.next;F.next=T.next,T.next=U}k.baseQueue=F=T,g.pending=null}if(F!==null){T=F.next,k=k.baseState;var se=U=null,ce=null,Ee=T;do{var Re=Ee.lane;if((Kl&Re)===Re)ce!==null&&(ce=ce.next={lane:0,action:Ee.action,hasEagerState:Ee.hasEagerState,eagerState:Ee.eagerState,next:null}),k=Ee.hasEagerState?Ee.eagerState:d(k,Ee.action);else{var _e={lane:Re,action:Ee.action,hasEagerState:Ee.hasEagerState,eagerState:Ee.eagerState,next:null};ce===null?(se=ce=_e,U=k):ce=ce.next=_e,Vr.lanes|=Re,Xl|=Re}Ee=Ee.next}while(Ee!==null&&Ee!==T);ce===null?U=k:ce.next=se,Fi(k,h.memoizedState)||(Bs=!0),h.memoizedState=k,h.baseState=U,h.baseQueue=ce,g.lastRenderedState=k}if(d=g.interleaved,d!==null){F=d;do T=F.lane,Vr.lanes|=T,Xl|=T,F=F.next;while(F!==d)}else F===null&&(g.lanes=0);return[h.memoizedState,g.dispatch]}function Xv(d){var h=ai(),g=h.queue;if(g===null)throw Error(r(311));g.lastRenderedReducer=d;var k=g.dispatch,F=g.pending,T=h.memoizedState;if(F!==null){g.pending=null;var U=F=F.next;do T=d(T,U.action),U=U.next;while(U!==F);Fi(T,h.memoizedState)||(Bs=!0),h.memoizedState=T,h.baseQueue===null&&(h.baseState=T),g.lastRenderedState=T}return[T,k]}function V7(){}function U7(d,h){var g=Vr,k=ai(),F=h(),T=!Fi(k.memoizedState,F);if(T&&(k.memoizedState=F,Bs=!0),k=k.queue,Yv(H7.bind(null,g,k,d),[d]),k.getSnapshot!==h||T||Sn!==null&&Sn.memoizedState.tag&1){if(g.flags|=2048,rx(9,W7.bind(null,g,k,F,h),void 0,null),Bn===null)throw Error(r(349));(Kl&30)!==0||q7(g,h,F)}return F}function q7(d,h,g){d.flags|=16384,d={getSnapshot:h,value:g},h=Vr.updateQueue,h===null?(h={lastEffect:null,stores:null},Vr.updateQueue=h,h.stores=[d]):(g=h.stores,g===null?h.stores=[d]:g.push(d))}function W7(d,h,g,k){h.value=g,h.getSnapshot=k,G7(h)&&K7(d)}function H7(d,h,g){return g(function(){G7(h)&&K7(d)})}function G7(d){var h=d.getSnapshot;d=d.value;try{var g=h();return!Fi(d,g)}catch{return!0}}function K7(d){var h=Ga(d,1);h!==null&&Li(h,d,1,-1)}function X7(d){var h=la();return typeof d=="function"&&(d=d()),h.memoizedState=h.baseState=d,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:tx,lastRenderedState:d},h.queue=d,d=d.dispatch=qK.bind(null,Vr,d),[h.memoizedState,d]}function rx(d,h,g,k){return d={tag:d,create:h,destroy:g,deps:k,next:null},h=Vr.updateQueue,h===null?(h={lastEffect:null,stores:null},Vr.updateQueue=h,h.lastEffect=d.next=d):(g=h.lastEffect,g===null?h.lastEffect=d.next=d:(k=g.next,g.next=d,d.next=k,h.lastEffect=d)),d}function Y7(){return ai().memoizedState}function Mm(d,h,g,k){var F=la();Vr.flags|=d,F.memoizedState=rx(1|h,g,void 0,k===void 0?null:k)}function Om(d,h,g,k){var F=ai();k=k===void 0?null:k;var T=void 0;if(pn!==null){var U=pn.memoizedState;if(T=U.destroy,k!==null&&Wv(k,U.deps)){F.memoizedState=rx(h,g,T,k);return}}Vr.flags|=d,F.memoizedState=rx(1|h,g,T,k)}function Q7(d,h){return Mm(8390656,8,d,h)}function Yv(d,h){return Om(2048,8,d,h)}function Z7(d,h){return Om(4,2,d,h)}function J7(d,h){return Om(4,4,d,h)}function eN(d,h){if(typeof h=="function")return d=d(),h(d),function(){h(null)};if(h!=null)return d=d(),h.current=d,function(){h.current=null}}function tN(d,h,g){return g=g!=null?g.concat([d]):null,Om(4,4,eN.bind(null,h,d),g)}function Qv(){}function rN(d,h){var g=ai();h=h===void 0?null:h;var k=g.memoizedState;return k!==null&&h!==null&&Wv(h,k[1])?k[0]:(g.memoizedState=[d,h],d)}function nN(d,h){var g=ai();h=h===void 0?null:h;var k=g.memoizedState;return k!==null&&h!==null&&Wv(h,k[1])?k[0]:(d=d(),g.memoizedState=[d,h],d)}function sN(d,h,g){return(Kl&21)===0?(d.baseState&&(d.baseState=!1,Bs=!0),d.memoizedState=g):(Fi(g,h)||(g=Ke(),Vr.lanes|=g,Xl|=g,d.baseState=!0),h)}function VK(d,h){var g=ve;ve=g!==0&&4>g?g:4,d(!0);var k=qv.transition;qv.transition={};try{d(!1),h()}finally{ve=g,qv.transition=k}}function iN(){return ai().memoizedState}function UK(d,h,g){var k=Ho(d);if(g={lane:k,action:g,hasEagerState:!1,eagerState:null,next:null},aN(d))oN(h,g);else if(g=R7(d,h,g,k),g!==null){var F=cs();Li(g,d,k,F),lN(g,h,k)}}function qK(d,h,g){var k=Ho(d),F={lane:k,action:g,hasEagerState:!1,eagerState:null,next:null};if(aN(d))oN(h,F);else{var T=d.alternate;if(d.lanes===0&&(T===null||T.lanes===0)&&(T=h.lastRenderedReducer,T!==null))try{var U=h.lastRenderedState,se=T(U,g);if(F.hasEagerState=!0,F.eagerState=se,Fi(se,U)){var ce=h.interleaved;ce===null?(F.next=F,_v(h)):(F.next=ce.next,ce.next=F),h.interleaved=F;return}}catch{}finally{}g=R7(d,h,F,k),g!==null&&(F=cs(),Li(g,d,k,F),lN(g,h,k))}}function aN(d){var h=d.alternate;return d===Vr||h!==null&&h===Vr}function oN(d,h){J0=Tm=!0;var g=d.pending;g===null?h.next=h:(h.next=g.next,g.next=h),d.pending=h}function lN(d,h,g){if((g&4194240)!==0){var k=h.lanes;k&=d.pendingLanes,g|=k,h.lanes=g,ae(d,g)}}var Lm={readContext:ii,useCallback:Kn,useContext:Kn,useEffect:Kn,useImperativeHandle:Kn,useInsertionEffect:Kn,useLayoutEffect:Kn,useMemo:Kn,useReducer:Kn,useRef:Kn,useState:Kn,useDebugValue:Kn,useDeferredValue:Kn,useTransition:Kn,useMutableSource:Kn,useSyncExternalStore:Kn,useId:Kn,unstable_isNewReconciler:!1},WK={readContext:ii,useCallback:function(d,h){return la().memoizedState=[d,h===void 0?null:h],d},useContext:ii,useEffect:Q7,useImperativeHandle:function(d,h,g){return g=g!=null?g.concat([d]):null,Mm(4194308,4,eN.bind(null,h,d),g)},useLayoutEffect:function(d,h){return Mm(4194308,4,d,h)},useInsertionEffect:function(d,h){return Mm(4,2,d,h)},useMemo:function(d,h){var g=la();return h=h===void 0?null:h,d=d(),g.memoizedState=[d,h],d},useReducer:function(d,h,g){var k=la();return h=g!==void 0?g(h):h,k.memoizedState=k.baseState=h,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:h},k.queue=d,d=d.dispatch=UK.bind(null,Vr,d),[k.memoizedState,d]},useRef:function(d){var h=la();return d={current:d},h.memoizedState=d},useState:X7,useDebugValue:Qv,useDeferredValue:function(d){return la().memoizedState=d},useTransition:function(){var d=X7(!1),h=d[0];return d=VK.bind(null,d[1]),la().memoizedState=d,[h,d]},useMutableSource:function(){},useSyncExternalStore:function(d,h,g){var k=Vr,F=la();if(Lr){if(g===void 0)throw Error(r(407));g=g()}else{if(g=h(),Bn===null)throw Error(r(349));(Kl&30)!==0||q7(k,h,g)}F.memoizedState=g;var T={value:g,getSnapshot:h};return F.queue=T,Q7(H7.bind(null,k,T,d),[d]),k.flags|=2048,rx(9,W7.bind(null,k,T,g,h),void 0,null),g},useId:function(){var d=la(),h=Bn.identifierPrefix;if(Lr){var g=Ha,k=Wa;g=(k&~(1<<32-mn(k)-1)).toString(32)+g,h=":"+h+"R"+g,g=ex++,0<g&&(h+="H"+g.toString(32)),h+=":"}else g=zK++,h=":"+h+"r"+g.toString(32)+":";return d.memoizedState=h},unstable_isNewReconciler:!1},HK={readContext:ii,useCallback:rN,useContext:ii,useEffect:Yv,useImperativeHandle:tN,useInsertionEffect:Z7,useLayoutEffect:J7,useMemo:nN,useReducer:Kv,useRef:Y7,useState:function(){return Kv(tx)},useDebugValue:Qv,useDeferredValue:function(d){var h=ai();return sN(h,pn.memoizedState,d)},useTransition:function(){var d=Kv(tx)[0],h=ai().memoizedState;return[d,h]},useMutableSource:V7,useSyncExternalStore:U7,useId:iN,unstable_isNewReconciler:!1},GK={readContext:ii,useCallback:rN,useContext:ii,useEffect:Yv,useImperativeHandle:tN,useInsertionEffect:Z7,useLayoutEffect:J7,useMemo:nN,useReducer:Xv,useRef:Y7,useState:function(){return Xv(tx)},useDebugValue:Qv,useDeferredValue:function(d){var h=ai();return pn===null?h.memoizedState=d:sN(h,pn.memoizedState,d)},useTransition:function(){var d=Xv(tx)[0],h=ai().memoizedState;return[d,h]},useMutableSource:V7,useSyncExternalStore:U7,useId:iN,unstable_isNewReconciler:!1};function Ti(d,h){if(d&&d.defaultProps){h=K({},h),d=d.defaultProps;for(var g in d)h[g]===void 0&&(h[g]=d[g]);return h}return h}function Zv(d,h,g,k){h=d.memoizedState,g=g(k,h),g=g==null?h:K({},h,g),d.memoizedState=g,d.lanes===0&&(d.updateQueue.baseState=g)}var Rm={isMounted:function(d){return(d=d._reactInternals)?Cs(d)===d:!1},enqueueSetState:function(d,h,g){d=d._reactInternals;var k=cs(),F=Ho(d),T=Ka(k,F);T.payload=h,g!=null&&(T.callback=g),h=Vo(d,T,F),h!==null&&(Li(h,d,F,k),Bm(h,d,F))},enqueueReplaceState:function(d,h,g){d=d._reactInternals;var k=cs(),F=Ho(d),T=Ka(k,F);T.tag=1,T.payload=h,g!=null&&(T.callback=g),h=Vo(d,T,F),h!==null&&(Li(h,d,F,k),Bm(h,d,F))},enqueueForceUpdate:function(d,h){d=d._reactInternals;var g=cs(),k=Ho(d),F=Ka(g,k);F.tag=2,h!=null&&(F.callback=h),h=Vo(d,F,k),h!==null&&(Li(h,d,k,g),Bm(h,d,k))}};function cN(d,h,g,k,F,T,U){return d=d.stateNode,typeof d.shouldComponentUpdate=="function"?d.shouldComponentUpdate(k,T,U):h.prototype&&h.prototype.isPureReactComponent?!V0(g,k)||!V0(F,T):!0}function uN(d,h,g){var k=!1,F=Io,T=h.contextType;return typeof T=="object"&&T!==null?T=ii(T):(F=Ss(h)?Ul:Gn.current,k=h.contextTypes,T=(k=k!=null)?bu(d,F):Io),h=new h(g,T),d.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=Rm,d.stateNode=h,h._reactInternals=d,k&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=F,d.__reactInternalMemoizedMaskedChildContext=T),h}function dN(d,h,g,k){d=h.state,typeof h.componentWillReceiveProps=="function"&&h.componentWillReceiveProps(g,k),typeof h.UNSAFE_componentWillReceiveProps=="function"&&h.UNSAFE_componentWillReceiveProps(g,k),h.state!==d&&Rm.enqueueReplaceState(h,h.state,null)}function Jv(d,h,g,k){var F=d.stateNode;F.props=g,F.state=d.memoizedState,F.refs={},Iv(d);var T=h.contextType;typeof T=="object"&&T!==null?F.context=ii(T):(T=Ss(h)?Ul:Gn.current,F.context=bu(d,T)),F.state=d.memoizedState,T=h.getDerivedStateFromProps,typeof T=="function"&&(Zv(d,h,T,g),F.state=d.memoizedState),typeof h.getDerivedStateFromProps=="function"||typeof F.getSnapshotBeforeUpdate=="function"||typeof F.UNSAFE_componentWillMount!="function"&&typeof F.componentWillMount!="function"||(h=F.state,typeof F.componentWillMount=="function"&&F.componentWillMount(),typeof F.UNSAFE_componentWillMount=="function"&&F.UNSAFE_componentWillMount(),h!==F.state&&Rm.enqueueReplaceState(F,F.state,null),Dm(d,g,F,k),F.state=d.memoizedState),typeof F.componentDidMount=="function"&&(d.flags|=4194308)}function Su(d,h){try{var g="",k=h;do g+=Y(k),k=k.return;while(k);var F=g}catch(T){F=`
39Error generating stack: `+T.message+`
40`+T.stack}return{value:d,source:h,stack:F,digest:null}}function eb(d,h,g){return{value:d,source:null,stack:g??null,digest:h??null}}function tb(d,h){try{console.error(h.value)}catch(g){setTimeout(function(){throw g})}}var KK=typeof WeakMap=="function"?WeakMap:Map;function xN(d,h,g){g=Ka(-1,g),g.tag=3,g.payload={element:null};var k=h.value;return g.callback=function(){qm||(qm=!0,pb=k),tb(d,h)},g}function fN(d,h,g){g=Ka(-1,g),g.tag=3;var k=d.type.getDerivedStateFromError;if(typeof k=="function"){var F=h.value;g.payload=function(){return k(F)},g.callback=function(){tb(d,h)}}var T=d.stateNode;return T!==null&&typeof T.componentDidCatch=="function"&&(g.callback=function(){tb(d,h),typeof k!="function"&&(qo===null?qo=new Set([this]):qo.add(this));var U=h.stack;this.componentDidCatch(h.value,{componentStack:U!==null?U:""})}),g}function hN(d,h,g){var k=d.pingCache;if(k===null){k=d.pingCache=new KK;var F=new Set;k.set(h,F)}else F=k.get(h),F===void 0&&(F=new Set,k.set(h,F));F.has(g)||(F.add(g),d=lX.bind(null,d,h,g),h.then(d,d))}function mN(d){do{var h;if((h=d.tag===13)&&(h=d.memoizedState,h=h!==null?h.dehydrated!==null:!0),h)return d;d=d.return}while(d!==null);return null}function pN(d,h,g,k,F){return(d.mode&1)===0?(d===h?d.flags|=65536:(d.flags|=128,g.flags|=131072,g.flags&=-52805,g.tag===1&&(g.alternate===null?g.tag=17:(h=Ka(-1,1),h.tag=2,Vo(g,h,1))),g.lanes|=1),d):(d.flags|=65536,d.lanes=F,d)}var XK=A.ReactCurrentOwner,Bs=!1;function ls(d,h,g,k){h.child=d===null?L7(h,null,g,k):ju(h,d.child,g,k)}function gN(d,h,g,k,F){g=g.render;var T=h.ref;return Au(h,F),k=Hv(d,h,g,k,T,F),g=Gv(),d!==null&&!Bs?(h.updateQueue=d.updateQueue,h.flags&=-2053,d.lanes&=~F,Xa(d,h,F)):(Lr&&g&&Bv(h),h.flags|=1,ls(d,h,k,F),h.child)}function yN(d,h,g,k,F){if(d===null){var T=g.type;return typeof T=="function"&&!Eb(T)&&T.defaultProps===void 0&&g.compare===null&&g.defaultProps===void 0?(h.tag=15,h.type=T,vN(d,h,T,k,F)):(d=Ym(g.type,null,k,h,h.mode,F),d.ref=h.ref,d.return=h,h.child=d)}if(T=d.child,(d.lanes&F)===0){var U=T.memoizedProps;if(g=g.compare,g=g!==null?g:V0,g(U,k)&&d.ref===h.ref)return Xa(d,h,F)}return h.flags|=1,d=Ko(T,k),d.ref=h.ref,d.return=h,h.child=d}function vN(d,h,g,k,F){if(d!==null){var T=d.memoizedProps;if(V0(T,k)&&d.ref===h.ref)if(Bs=!1,h.pendingProps=k=T,(d.lanes&F)!==0)(d.flags&131072)!==0&&(Bs=!0);else return h.lanes=d.lanes,Xa(d,h,F)}return rb(d,h,g,k,F)}function bN(d,h,g){var k=h.pendingProps,F=k.children,T=d!==null?d.memoizedState:null;if(k.mode==="hidden")if((h.mode&1)===0)h.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ar(Du,Ws),Ws|=g;else{if((g&1073741824)===0)return d=T!==null?T.baseLanes|g:g,h.lanes=h.childLanes=1073741824,h.memoizedState={baseLanes:d,cachePool:null,transitions:null},h.updateQueue=null,Ar(Du,Ws),Ws|=d,null;h.memoizedState={baseLanes:0,cachePool:null,transitions:null},k=T!==null?T.baseLanes:g,Ar(Du,Ws),Ws|=k}else T!==null?(k=T.baseLanes|g,h.memoizedState=null):k=g,Ar(Du,Ws),Ws|=k;return ls(d,h,F,g),h.child}function CN(d,h){var g=h.ref;(d===null&&g!==null||d!==null&&d.ref!==g)&&(h.flags|=512,h.flags|=2097152)}function rb(d,h,g,k,F){var T=Ss(g)?Ul:Gn.current;return T=bu(h,T),Au(h,F),g=Hv(d,h,g,k,T,F),k=Gv(),d!==null&&!Bs?(h.updateQueue=d.updateQueue,h.flags&=-2053,d.lanes&=~F,Xa(d,h,F)):(Lr&&k&&Bv(h),h.flags|=1,ls(d,h,g,F),h.child)}function wN(d,h,g,k,F){if(Ss(g)){var T=!0;Cm(h)}else T=!1;if(Au(h,F),h.stateNode===null)Im(d,h),uN(h,g,k),Jv(h,g,k,F),k=!0;else if(d===null){var U=h.stateNode,se=h.memoizedProps;U.props=se;var ce=U.context,Ee=g.contextType;typeof Ee=="object"&&Ee!==null?Ee=ii(Ee):(Ee=Ss(g)?Ul:Gn.current,Ee=bu(h,Ee));var Re=g.getDerivedStateFromProps,_e=typeof Re=="function"||typeof U.getSnapshotBeforeUpdate=="function";_e||typeof U.UNSAFE_componentWillReceiveProps!="function"&&typeof U.componentWillReceiveProps!="function"||(se!==k||ce!==Ee)&&dN(h,U,k,Ee),zo=!1;var Oe=h.memoizedState;U.state=Oe,Dm(h,k,U,F),ce=h.memoizedState,se!==k||Oe!==ce||ks.current||zo?(typeof Re=="function"&&(Zv(h,g,Re,k),ce=h.memoizedState),(se=zo||cN(h,g,se,k,Oe,ce,Ee))?(_e||typeof U.UNSAFE_componentWillMount!="function"&&typeof U.componentWillMount!="function"||(typeof U.componentWillMount=="function"&&U.componentWillMount(),typeof U.UNSAFE_componentWillMount=="function"&&U.UNSAFE_componentWillMount()),typeof U.componentDidMount=="function"&&(h.flags|=4194308)):(typeof U.componentDidMount=="function"&&(h.flags|=4194308),h.memoizedProps=k,h.memoizedState=ce),U.props=k,U.state=ce,U.context=Ee,k=se):(typeof U.componentDidMount=="function"&&(h.flags|=4194308),k=!1)}else{U=h.stateNode,_7(d,h),se=h.memoizedProps,Ee=h.type===h.elementType?se:Ti(h.type,se),U.props=Ee,_e=h.pendingProps,Oe=U.context,ce=g.contextType,typeof ce=="object"&&ce!==null?ce=ii(ce):(ce=Ss(g)?Ul:Gn.current,ce=bu(h,ce));var Ge=g.getDerivedStateFromProps;(Re=typeof Ge=="function"||typeof U.getSnapshotBeforeUpdate=="function")||typeof U.UNSAFE_componentWillReceiveProps!="function"&&typeof U.componentWillReceiveProps!="function"||(se!==_e||Oe!==ce)&&dN(h,U,k,ce),zo=!1,Oe=h.memoizedState,U.state=Oe,Dm(h,k,U,F);var nt=h.memoizedState;se!==_e||Oe!==nt||ks.current||zo?(typeof Ge=="function"&&(Zv(h,g,Ge,k),nt=h.memoizedState),(Ee=zo||cN(h,g,Ee,k,Oe,nt,ce)||!1)?(Re||typeof U.UNSAFE_componentWillUpdate!="function"&&typeof U.componentWillUpdate!="function"||(typeof U.componentWillUpdate=="function"&&U.componentWillUpdate(k,nt,ce),typeof U.UNSAFE_componentWillUpdate=="function"&&U.UNSAFE_componentWillUpdate(k,nt,ce)),typeof U.componentDidUpdate=="function"&&(h.flags|=4),typeof U.getSnapshotBeforeUpdate=="function"&&(h.flags|=1024)):(typeof U.componentDidUpdate!="function"||se===d.memoizedProps&&Oe===d.memoizedState||(h.flags|=4),typeof U.getSnapshotBeforeUpdate!="function"||se===d.memoizedProps&&Oe===d.memoizedState||(h.flags|=1024),h.memoizedProps=k,h.memoizedState=nt),U.props=k,U.state=nt,U.context=ce,k=Ee):(typeof U.componentDidUpdate!="function"||se===d.memoizedProps&&Oe===d.memoizedState||(h.flags|=4),typeof U.getSnapshotBeforeUpdate!="function"||se===d.memoizedProps&&Oe===d.memoizedState||(h.flags|=1024),k=!1)}return nb(d,h,g,k,T,F)}function nb(d,h,g,k,F,T){CN(d,h);var U=(h.flags&128)!==0;if(!k&&!U)return F&&k7(h,g,!1),Xa(d,h,T);k=h.stateNode,XK.current=h;var se=U&&typeof g.getDerivedStateFromError!="function"?null:k.render();return h.flags|=1,d!==null&&U?(h.child=ju(h,d.child,null,T),h.child=ju(h,null,se,T)):ls(d,h,se,T),h.memoizedState=k.state,F&&k7(h,g,!0),h.child}function EN(d){var h=d.stateNode;h.pendingContext?N7(d,h.pendingContext,h.pendingContext!==h.context):h.context&&N7(d,h.context,!1),$v(d,h.containerInfo)}function jN(d,h,g,k,F){return Eu(),Tv(F),h.flags|=256,ls(d,h,g,k),h.child}var sb={dehydrated:null,treeContext:null,retryLane:0};function ib(d){return{baseLanes:d,cachePool:null,transitions:null}}function NN(d,h,g){var k=h.pendingProps,F=zr.current,T=!1,U=(h.flags&128)!==0,se;if((se=U)||(se=d!==null&&d.memoizedState===null?!1:(F&2)!==0),se?(T=!0,h.flags&=-129):(d===null||d.memoizedState!==null)&&(F|=1),Ar(zr,F&1),d===null)return Pv(h),d=h.memoizedState,d!==null&&(d=d.dehydrated,d!==null)?((h.mode&1)===0?h.lanes=1:d.data==="$!"?h.lanes=8:h.lanes=1073741824,null):(U=k.children,d=k.fallback,T?(k=h.mode,T=h.child,U={mode:"hidden",children:U},(k&1)===0&&T!==null?(T.childLanes=0,T.pendingProps=U):T=Qm(U,k,0,null),d=Jl(d,k,g,null),T.return=h,d.return=h,T.sibling=d,h.child=T,h.child.memoizedState=ib(g),h.memoizedState=sb,d):ab(h,U));if(F=d.memoizedState,F!==null&&(se=F.dehydrated,se!==null))return YK(d,h,U,k,se,F,g);if(T){T=k.fallback,U=h.mode,F=d.child,se=F.sibling;var ce={mode:"hidden",children:k.children};return(U&1)===0&&h.child!==F?(k=h.child,k.childLanes=0,k.pendingProps=ce,h.deletions=null):(k=Ko(F,ce),k.subtreeFlags=F.subtreeFlags&14680064),se!==null?T=Ko(se,T):(T=Jl(T,U,g,null),T.flags|=2),T.return=h,k.return=h,k.sibling=T,h.child=k,k=T,T=h.child,U=d.child.memoizedState,U=U===null?ib(g):{baseLanes:U.baseLanes|g,cachePool:null,transitions:U.transitions},T.memoizedState=U,T.childLanes=d.childLanes&~g,h.memoizedState=sb,k}return T=d.child,d=T.sibling,k=Ko(T,{mode:"visible",children:k.children}),(h.mode&1)===0&&(k.lanes=g),k.return=h,k.sibling=null,d!==null&&(g=h.deletions,g===null?(h.deletions=[d],h.flags|=16):g.push(d)),h.child=k,h.memoizedState=null,k}function ab(d,h){return h=Qm({mode:"visible",children:h},d.mode,0,null),h.return=d,d.child=h}function _m(d,h,g,k){return k!==null&&Tv(k),ju(h,d.child,null,g),d=ab(h,h.pendingProps.children),d.flags|=2,h.memoizedState=null,d}function YK(d,h,g,k,F,T,U){if(g)return h.flags&256?(h.flags&=-257,k=eb(Error(r(422))),_m(d,h,U,k)):h.memoizedState!==null?(h.child=d.child,h.flags|=128,null):(T=k.fallback,F=h.mode,k=Qm({mode:"visible",children:k.children},F,0,null),T=Jl(T,F,U,null),T.flags|=2,k.return=h,T.return=h,k.sibling=T,h.child=k,(h.mode&1)!==0&&ju(h,d.child,null,U),h.child.memoizedState=ib(U),h.memoizedState=sb,T);if((h.mode&1)===0)return _m(d,h,U,null);if(F.data==="$!"){if(k=F.nextSibling&&F.nextSibling.dataset,k)var se=k.dgst;return k=se,T=Error(r(419)),k=eb(T,k,void 0),_m(d,h,U,k)}if(se=(U&d.childLanes)!==0,Bs||se){if(k=Bn,k!==null){switch(U&-U){case 4:F=2;break;case 16:F=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:F=32;break;case 536870912:F=268435456;break;default:F=0}F=(F&(k.suspendedLanes|U))!==0?0:F,F!==0&&F!==T.retryLane&&(T.retryLane=F,Ga(d,F),Li(k,d,F,-1))}return wb(),k=eb(Error(r(421))),_m(d,h,U,k)}return F.data==="$?"?(h.flags|=128,h.child=d.child,h=cX.bind(null,d),F._reactRetry=h,null):(d=T.treeContext,qs=Ro(F.nextSibling),Us=h,Lr=!0,Pi=null,d!==null&&(ni[si++]=Wa,ni[si++]=Ha,ni[si++]=ql,Wa=d.id,Ha=d.overflow,ql=h),h=ab(h,k.children),h.flags|=4096,h)}function AN(d,h,g){d.lanes|=h;var k=d.alternate;k!==null&&(k.lanes|=h),Rv(d.return,h,g)}function ob(d,h,g,k,F){var T=d.memoizedState;T===null?d.memoizedState={isBackwards:h,rendering:null,renderingStartTime:0,last:k,tail:g,tailMode:F}:(T.isBackwards=h,T.rendering=null,T.renderingStartTime=0,T.last=k,T.tail=g,T.tailMode=F)}function kN(d,h,g){var k=h.pendingProps,F=k.revealOrder,T=k.tail;if(ls(d,h,k.children,g),k=zr.current,(k&2)!==0)k=k&1|2,h.flags|=128;else{if(d!==null&&(d.flags&128)!==0)e:for(d=h.child;d!==null;){if(d.tag===13)d.memoizedState!==null&&AN(d,g,h);else if(d.tag===19)AN(d,g,h);else if(d.child!==null){d.child.return=d,d=d.child;continue}if(d===h)break e;for(;d.sibling===null;){if(d.return===null||d.return===h)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}k&=1}if(Ar(zr,k),(h.mode&1)===0)h.memoizedState=null;else switch(F){case"forwards":for(g=h.child,F=null;g!==null;)d=g.alternate,d!==null&&Fm(d)===null&&(F=g),g=g.sibling;g=F,g===null?(F=h.child,h.child=null):(F=g.sibling,g.sibling=null),ob(h,!1,F,g,T);break;case"backwards":for(g=null,F=h.child,h.child=null;F!==null;){if(d=F.alternate,d!==null&&Fm(d)===null){h.child=F;break}d=F.sibling,F.sibling=g,g=F,F=d}ob(h,!0,g,null,T);break;case"together":ob(h,!1,null,null,void 0);break;default:h.memoizedState=null}return h.child}function Im(d,h){(h.mode&1)===0&&d!==null&&(d.alternate=null,h.alternate=null,h.flags|=2)}function Xa(d,h,g){if(d!==null&&(h.dependencies=d.dependencies),Xl|=h.lanes,(g&h.childLanes)===0)return null;if(d!==null&&h.child!==d.child)throw Error(r(153));if(h.child!==null){for(d=h.child,g=Ko(d,d.pendingProps),h.child=g,g.return=h;d.sibling!==null;)d=d.sibling,g=g.sibling=Ko(d,d.pendingProps),g.return=h;g.sibling=null}return h.child}function QK(d,h,g){switch(h.tag){case 3:EN(h),Eu();break;case 5:z7(h);break;case 1:Ss(h.type)&&Cm(h);break;case 4:$v(h,h.stateNode.containerInfo);break;case 10:var k=h.type._context,F=h.memoizedProps.value;Ar(km,k._currentValue),k._currentValue=F;break;case 13:if(k=h.memoizedState,k!==null)return k.dehydrated!==null?(Ar(zr,zr.current&1),h.flags|=128,null):(g&h.child.childLanes)!==0?NN(d,h,g):(Ar(zr,zr.current&1),d=Xa(d,h,g),d!==null?d.sibling:null);Ar(zr,zr.current&1);break;case 19:if(k=(g&h.childLanes)!==0,(d.flags&128)!==0){if(k)return kN(d,h,g);h.flags|=128}if(F=h.memoizedState,F!==null&&(F.rendering=null,F.tail=null,F.lastEffect=null),Ar(zr,zr.current),k)break;return null;case 22:case 23:return h.lanes=0,bN(d,h,g)}return Xa(d,h,g)}var SN,lb,BN,DN;SN=function(d,h){for(var g=h.child;g!==null;){if(g.tag===5||g.tag===6)d.appendChild(g.stateNode);else if(g.tag!==4&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===h)break;for(;g.sibling===null;){if(g.return===null||g.return===h)return;g=g.return}g.sibling.return=g.return,g=g.sibling}},lb=function(){},BN=function(d,h,g,k){var F=d.memoizedProps;if(F!==k){d=h.stateNode,Gl(oa.current);var T=null;switch(g){case"input":F=Ne(d,F),k=Ne(d,k),T=[];break;case"select":F=K({},F,{value:void 0}),k=K({},k,{value:void 0}),T=[];break;case"textarea":F=Se(d,F),k=Se(d,k),T=[];break;default:typeof F.onClick!="function"&&typeof k.onClick=="function"&&(d.onclick=ym)}fn(g,k);var U;g=null;for(Ee in F)if(!k.hasOwnProperty(Ee)&&F.hasOwnProperty(Ee)&&F[Ee]!=null)if(Ee==="style"){var se=F[Ee];for(U in se)se.hasOwnProperty(U)&&(g||(g={}),g[U]="")}else Ee!=="dangerouslySetInnerHTML"&&Ee!=="children"&&Ee!=="suppressContentEditableWarning"&&Ee!=="suppressHydrationWarning"&&Ee!=="autoFocus"&&(i.hasOwnProperty(Ee)?T||(T=[]):(T=T||[]).push(Ee,null));for(Ee in k){var ce=k[Ee];if(se=F!=null?F[Ee]:void 0,k.hasOwnProperty(Ee)&&ce!==se&&(ce!=null||se!=null))if(Ee==="style")if(se){for(U in se)!se.hasOwnProperty(U)||ce&&ce.hasOwnProperty(U)||(g||(g={}),g[U]="");for(U in ce)ce.hasOwnProperty(U)&&se[U]!==ce[U]&&(g||(g={}),g[U]=ce[U])}else g||(T||(T=[]),T.push(Ee,g)),g=ce;else Ee==="dangerouslySetInnerHTML"?(ce=ce?ce.__html:void 0,se=se?se.__html:void 0,ce!=null&&se!==ce&&(T=T||[]).push(Ee,ce)):Ee==="children"?typeof ce!="string"&&typeof ce!="number"||(T=T||[]).push(Ee,""+ce):Ee!=="suppressContentEditableWarning"&&Ee!=="suppressHydrationWarning"&&(i.hasOwnProperty(Ee)?(ce!=null&&Ee==="onScroll"&&Br("scroll",d),T||se===ce||(T=[])):(T=T||[]).push(Ee,ce))}g&&(T=T||[]).push("style",g);var Ee=T;(h.updateQueue=Ee)&&(h.flags|=4)}},DN=function(d,h,g,k){g!==k&&(h.flags|=4)};function nx(d,h){if(!Lr)switch(d.tailMode){case"hidden":h=d.tail;for(var g=null;h!==null;)h.alternate!==null&&(g=h),h=h.sibling;g===null?d.tail=null:g.sibling=null;break;case"collapsed":g=d.tail;for(var k=null;g!==null;)g.alternate!==null&&(k=g),g=g.sibling;k===null?h||d.tail===null?d.tail=null:d.tail.sibling=null:k.sibling=null}}function Xn(d){var h=d.alternate!==null&&d.alternate.child===d.child,g=0,k=0;if(h)for(var F=d.child;F!==null;)g|=F.lanes|F.childLanes,k|=F.subtreeFlags&14680064,k|=F.flags&14680064,F.return=d,F=F.sibling;else for(F=d.child;F!==null;)g|=F.lanes|F.childLanes,k|=F.subtreeFlags,k|=F.flags,F.return=d,F=F.sibling;return d.subtreeFlags|=k,d.childLanes=g,h}function ZK(d,h,g){var k=h.pendingProps;switch(Dv(h),h.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xn(h),null;case 1:return Ss(h.type)&&bm(),Xn(h),null;case 3:return k=h.stateNode,ku(),Dr(ks),Dr(Gn),Uv(),k.pendingContext&&(k.context=k.pendingContext,k.pendingContext=null),(d===null||d.child===null)&&(Nm(h)?h.flags|=4:d===null||d.memoizedState.isDehydrated&&(h.flags&256)===0||(h.flags|=1024,Pi!==null&&(vb(Pi),Pi=null))),lb(d,h),Xn(h),null;case 5:zv(h);var F=Gl(Z0.current);if(g=h.type,d!==null&&h.stateNode!=null)BN(d,h,g,k,F),d.ref!==h.ref&&(h.flags|=512,h.flags|=2097152);else{if(!k){if(h.stateNode===null)throw Error(r(166));return Xn(h),null}if(d=Gl(oa.current),Nm(h)){k=h.stateNode,g=h.type;var T=h.memoizedProps;switch(k[aa]=h,k[G0]=T,d=(h.mode&1)!==0,g){case"dialog":Br("cancel",k),Br("close",k);break;case"iframe":case"object":case"embed":Br("load",k);break;case"video":case"audio":for(F=0;F<q0.length;F++)Br(q0[F],k);break;case"source":Br("error",k);break;case"img":case"image":case"link":Br("error",k),Br("load",k);break;case"details":Br("toggle",k);break;case"input":ye(k,T),Br("invalid",k);break;case"select":k._wrapperState={wasMultiple:!!T.multiple},Br("invalid",k);break;case"textarea":He(k,T),Br("invalid",k)}fn(g,T),F=null;for(var U in T)if(T.hasOwnProperty(U)){var se=T[U];U==="children"?typeof se=="string"?k.textContent!==se&&(T.suppressHydrationWarning!==!0&&gm(k.textContent,se,d),F=["children",se]):typeof se=="number"&&k.textContent!==""+se&&(T.suppressHydrationWarning!==!0&&gm(k.textContent,se,d),F=["children",""+se]):i.hasOwnProperty(U)&&se!=null&&U==="onScroll"&&Br("scroll",k)}switch(g){case"input":de(k),De(k,T,!0);break;case"textarea":de(k),rt(k);break;case"select":case"option":break;default:typeof T.onClick=="function"&&(k.onclick=ym)}k=F,h.updateQueue=k,k!==null&&(h.flags|=4)}else{U=F.nodeType===9?F:F.ownerDocument,d==="http://www.w3.org/1999/xhtml"&&(d=wt(g)),d==="http://www.w3.org/1999/xhtml"?g==="script"?(d=U.createElement("div"),d.innerHTML="<script><\/script>
40",d=d.removeChild(d.firstChild)):typeof k.is=="string"?d=U.createElement(g,{is:k.is}):(d=U.createElement(g),g==="select"&&(U=d,k.multiple?U.multiple=!0:k.size&&(U.size=k.size))):d=U.createElementNS(d,g),d[aa]=h,d[G0]=k,SN(d,h,!1,!1),h.stateNode=d;e:{switch(U=Rn(g,k),g){case"dialog":Br("cancel",d),Br("close",d),F=k;break;case"iframe":case"object":case"embed":Br("load",d),F=k;break;case"video":case"audio":for(F=0;F<q0.length;F++)Br(q0[F],d);F=k;break;case"source":Br("error",d),F=k;break;case"img":case"image":case"link":Br("error",d),Br("load",d),F=k;break;case"details":Br("toggle",d),F=k;break;case"input":ye(d,k),F=Ne(d,k),Br("invalid",d);break;case"option":F=k;break;case"select":d._wrapperState={wasMultiple:!!k.multiple},F=K({},k,{value:void 0}),Br("invalid",d);break;case"textarea":He(d,k),F=Se(d,k),Br("invalid",d);break;default:F=k}fn(g,F),se=F;for(T in se)if(se.hasOwnProperty(T)){var ce=se[T];T==="style"?bs(d,ce):T==="dangerouslySetInnerHTML"?(ce=ce?ce.__html:void 0,ce!=null&&Kt(d,ce)):T==="children"?typeof ce=="string"?(g!=="textarea"||ce!=="")&&ft(d,ce):typeof ce=="number"&&ft(d,""+ce):T!=="suppressContentEditableWarning"&&T!=="suppressHydrationWarning"&&T!=="autoFocus"&&(i.hasOwnProperty(T)?ce!=null&&T==="onScroll"&&Br("scroll",d):ce!=null&&j(d,T,ce,U))}switch(g){case"input":de(d),De(d,k,!1);break;case"textarea":de(d),rt(d);break;case"option":k.value!=null&&d.setAttribute("value",""+he(k.value));break;case"select":d.multiple=!!k.multiple,T=k.value,T!=null?Te(d,!!k.multiple,T,!1):k.defaultValue!=null&&Te(d,!!k.multiple,k.defaultValue,!0);break;default:typeof F.onClick=="function"&&(d.onclick=ym)}switch(g){case"button":case"input":case"select":case"textarea":k=!!k.autoFocus;break e;case"img":k=!0;break e;default:k=!1}}k&&(h.flags|=4)}h.ref!==null&&(h.flags|=512,h.flags|=2097152)}return Xn(h),null;case 6:if(d&&h.stateNode!=null)DN(d,h,d.memoizedProps,k);else{if(typeof k!="string"&&h.stateNode===null)throw Error(r(166));if(g=Gl(Z0.current),Gl(oa.current),Nm(h)){if(k=h.stateNode,g=h.memoizedProps,k[aa]=h,(T=k.nodeValue!==g)&&(d=Us,d!==null))switch(d.tag){case 3:gm(k.nodeValue,g,(d.mode&1)!==0);break;case 5:d.memoizedProps.suppressHydrationWarning!==!0&&gm(k.nodeValue,g,(d.mode&1)!==0)}T&&(h.flags|=4)}else k=(g.nodeType===9?g:g.ownerDocument).createTextNode(k),k[aa]=h,h.stateNode=k}return Xn(h),null;case 13:if(Dr(zr),k=h.memoizedState,d===null||d.memoizedState!==null&&d.memoizedState.dehydrated!==null){if(Lr&&qs!==null&&(h.mode&1)!==0&&(h.flags&128)===0)T7(),Eu(),h.flags|=98560,T=!1;else if(T=Nm(h),k!==null&&k.dehydrated!==null){if(d===null){if(!T)throw Error(r(318));if(T=h.memoizedState,T=T!==null?T.dehydrated:null,!T)throw Error(r(317));T[aa]=h}else Eu(),(h.flags&128)===0&&(h.memoizedState=null),h.flags|=4;Xn(h),T=!1}else Pi!==null&&(vb(Pi),Pi=null),T=!0;if(!T)return h.flags&65536?h:null}return(h.flags&128)!==0?(h.lanes=g,h):(k=k!==null,k!==(d!==null&&d.memoizedState!==null)&&k&&(h.child.flags|=8192,(h.mode&1)!==0&&(d===null||(zr.current&1)!==0?gn===0&&(gn=3):wb())),h.updateQueue!==null&&(h.flags|=4),Xn(h),null);case 4:return ku(),lb(d,h),d===null&&W0(h.stateNode.containerInfo),Xn(h),null;case 10:return Lv(h.type._context),Xn(h),null;case 17:return Ss(h.type)&&bm(),Xn(h),null;case 19:if(Dr(zr),T=h.memoizedState,T===null)return Xn(h),null;if(k=(h.flags&128)!==0,U=T.rendering,U===null)if(k)nx(T,!1);else{if(gn!==0||d!==null&&(d.flags&128)!==0)for(d=h.child;d!==null;){if(U=Fm(d),U!==null){for(h.flags|=128,nx(T,!1),k=U.updateQueue,k!==null&&(h.updateQueue=k,h.flags|=4),h.subtreeFlags=0,k=g,g=h.child;g!==null;)T=g,d=k,T.flags&=14680066,U=T.alternate,U===null?(T.childLanes=0,T.lanes=d,T.child=null,T.subtreeFlags=0,T.memoizedProps=null,T.memoizedState=null,T.updateQueue=null,T.dependencies=null,T.stateNode=null):(T.childLanes=U.childLanes,T.lanes=U.lanes,T.child=U.child,T.subtreeFlags=0,T.deletions=null,T.memoizedProps=U.memoizedProps,T.memoizedState=U.memoizedState,T.updateQueue=U.updateQueue,T.type=U.type,d=U.dependencies,T.dependencies=d===null?null:{lanes:d.lanes,firstContext:d.firstContext}),g=g.sibling;return Ar(zr,zr.current&1|2),h.child}d=d.sibling}T.tail!==null&&At()>Fu&&(h.flags|=128,k=!0,nx(T,!1),h.lanes=4194304)}else{if(!k)if(d=Fm(U),d!==null){if(h.flags|=128,k=!0,g=d.updateQueue,g!==null&&(h.updateQueue=g,h.flags|=4),nx(T,!0),T.tail===null&&T.tailMode==="hidden"&&!U.alternate&&!Lr)return Xn(h),null}else 2*At()-T.renderingStartTime>Fu&&g!==1073741824&&(h.flags|=128,k=!0,nx(T,!1),h.lanes=4194304);T.isBackwards?(U.sibling=h.child,h.child=U):(g=T.last,g!==null?g.sibling=U:h.child=U,T.last=U)}return T.tail!==null?(h=T.tail,T.rendering=h,T.tail=h.sibling,T.renderingStartTime=At(),h.sibling=null,g=zr.current,Ar(zr,k?g&1|2:g&1),h):(Xn(h),null);case 22:case 23:return Cb(),k=h.memoizedState!==null,d!==null&&d.memoizedState!==null!==k&&(h.flags|=8192),k&&(h.mode&1)!==0?(Ws&1073741824)!==0&&(Xn(h),h.subtreeFlags&6&&(h.flags|=8192)):Xn(h),null;case 24:return null;case 25:return null}throw Error(r(156,h.tag))}function JK(d,h){switch(Dv(h),h.tag){case 1:return Ss(h.type)&&bm
vendor: 36,930 bytes, line 40
40(),d=h.flags,d&65536?(h.flags=d&-65537|128,h):null;case 3:return ku(),Dr(ks),Dr(Gn),Uv(),d=h.flags,(d&65536)!==0&&(d&128)===0?(h.flags=d&-65537|128,h):null;case 5:return zv(h),null;case 13:if(Dr(zr),d=h.memoizedState,d!==null&&d.dehydrated!==null){if(h.alternate===null)throw Error(r(340));Eu()}return d=h.flags,d&65536?(h.flags=d&-65537|128,h):null;case 19:return Dr(zr),null;case 4:return ku(),null;case 10:return Lv(h.type._context),null;case 22:case 23:return Cb(),null;case 24:return null;default:return null}}var $m=!1,Yn=!1,eX=typeof WeakSet=="function"?WeakSet:Set,Je=null;function Bu(d,h){var g=d.ref;if(g!==null)if(typeof g=="function")try{g(null)}catch(k){Xr(d,h,k)}else g.current=null}function cb(d,h,g){try{g()}catch(k){Xr(d,h,k)}}var FN=!1;function tX(d,h){if(Cv=am,d=c7(),fv(d)){if("selectionStart"in d)var g={start:d.selectionStart,end:d.selectionEnd};else e:{g=(g=d.ownerDocument)&&g.defaultView||window;var k=g.getSelection&&g.getSelection();if(k&&k.rangeCount!==0){g=k.anchorNode;var F=k.anchorOffset,T=k.focusNode;k=k.focusOffset;try{g.nodeType,T.nodeType}catch{g=null;break e}var U=0,se=-1,ce=-1,Ee=0,Re=0,_e=d,Oe=null;t:for(;;){for(var Ge;_e!==g||F!==0&&_e.nodeType!==3||(se=U+F),_e!==T||k!==0&&_e.nodeType!==3||(ce=U+k),_e.nodeType===3&&(U+=_e.nodeValue.length),(Ge=_e.firstChild)!==null;)Oe=_e,_e=Ge;for(;;){if(_e===d)break t;if(Oe===g&&++Ee===F&&(se=U),Oe===T&&++Re===k&&(ce=U),(Ge=_e.nextSibling)!==null)break;_e=Oe,Oe=_e.parentNode}_e=Ge}g=se===-1||ce===-1?null:{start:se,end:ce}}else g=null}g=g||{start:0,end:0}}else g=null;for(wv={focusedElem:d,selectionRange:g},am=!1,Je=h;Je!==null;)if(h=Je,d=h.child,(h.subtreeFlags&1028)!==0&&d!==null)d.return=h,Je=d;else for(;Je!==null;){h=Je;try{var nt=h.alternate;if((h.flags&1024)!==0)switch(h.tag){case 0:case 11:case 15:break;case 1:if(nt!==null){var ot=nt.memoizedProps,sn=nt.memoizedState,ge=h.stateNode,xe=ge.getSnapshotBeforeUpdate(h.elementType===h.type?ot:Ti(h.type,ot),sn);ge.__reactInternalSnapshotBeforeUpdate=xe}break;case 3:var be=h.stateNode.containerInfo;be.nodeType===1?be.textContent="":be.nodeType===9&&be.documentElement&&be.removeChild(be.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(ze){Xr(h,h.return,ze)}if(d=h.sibling,d!==null){d.return=h.return,Je=d;break}Je=h.return}return nt=FN,FN=!1,nt}function sx(d,h,g){var k=h.updateQueue;if(k=k!==null?k.lastEffect:null,k!==null){var F=k=k.next;do{if((F.tag&d)===d){var T=F.destroy;F.destroy=void 0,T!==void 0&&cb(h,g,T)}F=F.next}while(F!==k)}}function zm(d,h){if(h=h.updateQueue,h=h!==null?h.lastEffect:null,h!==null){var g=h=h.next;do{if((g.tag&d)===d){var k=g.create;g.destroy=k()}g=g.next}while(g!==h)}}function ub(d){var h=d.ref;if(h!==null){var g=d.stateNode;switch(d.tag){case 5:d=g;break;default:d=g}typeof h=="function"?h(d):h.current=d}}function PN(d){var h=d.alternate;h!==null&&(d.alternate=null,PN(h)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(h=d.stateNode,h!==null&&(delete h[aa],delete h[G0],delete h[Av],delete h[RK],delete h[_K])),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function TN(d){return d.tag===5||d.tag===3||d.tag===4}function MN(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||TN(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function db(d,h,g){var k=d.tag;if(k===5||k===6)d=d.stateNode,h?g.nodeType===8?g.parentNode.insertBefore(d,h):g.insertBefore(d,h):(g.nodeType===8?(h=g.parentNode,h.insertBefore(d,g)):(h=g,h.appendChild(d)),g=g._reactRootContainer,g!=null||h.onclick!==null||(h.onclick=ym));else if(k!==4&&(d=d.child,d!==null))for(db(d,h,g),d=d.sibling;d!==null;)db(d,h,g),d=d.sibling}function xb(d,h,g){var k=d.tag;if(k===5||k===6)d=d.stateNode,h?g.insertBefore(d,h):g.appendChild(d);else if(k!==4&&(d=d.child,d!==null))for(xb(d,h,g),d=d.sibling;d!==null;)xb(d,h,g),d=d.sibling}var In=null,Mi=!1;function Uo(d,h,g){for(g=g.child;g!==null;)ON(d,h,g),g=g.sibling}function ON(d,h,g){if(An&&typeof An.onCommitFiberUnmount=="function")try{An.onCommitFiberUnmount(ei,g)}catch{}switch(g.tag){case 5:Yn||Bu(g,h);case 6:var k=In,F=Mi;In=null,Uo(d,h,g),In=k,Mi=F,In!==null&&(Mi?(d=In,g=g.stateNode,d.nodeType===8?d.parentNode.removeChild(g):d.removeChild(g)):In.removeChild(g.stateNode));break;case 18:In!==null&&(Mi?(d=In,g=g.stateNode,d.nodeType===8?Nv(d.parentNode,g):d.nodeType===1&&Nv(d,g),L0(d)):Nv(In,g.stateNode));break;case 4:k=In,F=Mi,In=g.stateNode.containerInfo,Mi=!0,Uo(d,h,g),In=k,Mi=F;break;case 0:case 11:case 14:case 15:if(!Yn&&(k=g.updateQueue,k!==null&&(k=k.lastEffect,k!==null))){F=k=k.next;do{var T=F,U=T.destroy;T=T.tag,U!==void 0&&((T&2)!==0||(T&4)!==0)&&cb(g,h,U),F=F.next}while(F!==k)}Uo(d,h,g);break;case 1:if(!Yn&&(Bu(g,h),k=g.stateNode,typeof k.componentWillUnmount=="function"))try{k.props=g.memoizedProps,k.state=g.memoizedState,k.componentWillUnmount()}catch(se){Xr(g,h,se)}Uo(d,h,g);break;case 21:Uo(d,h,g);break;case 22:g.mode&1?(Yn=(k=Yn)||g.memoizedState!==null,Uo(d,h,g),Yn=k):Uo(d,h,g);break;default:Uo(d,h,g)}}function LN(d){var h=d.updateQueue;if(h!==null){d.updateQueue=null;var g=d.stateNode;g===null&&(g=d.stateNode=new eX),h.forEach(function(k){var F=uX.bind(null,d,k);g.has(k)||(g.add(k),k.then(F,F))})}}function Oi(d,h){var g=h.deletions;if(g!==null)for(var k=0;k<g.length;k++){var F=g[k];try{var T=d,U=h,se=U;e:for(;se!==null;){switch(se.tag){case 5:In=se.stateNode,Mi=!1;break e;case 3:In=se.stateNode.containerInfo,Mi=!0;break e;case 4:In=se.stateNode.containerInfo,Mi=!0;break e}se=se.return}if(In===null)throw Error(r(160));ON(T,U,F),In=null,Mi=!1;var ce=F.alternate;ce!==null&&(ce.return=null),F.return=null}catch(Ee){Xr(F,h,Ee)}}if(h.subtreeFlags&12854)for(h=h.child;h!==null;)RN(h,d),h=h.sibling}function RN(d,h){var g=d.alternate,k=d.flags;switch(d.tag){case 0:case 11:case 14:case 15:if(Oi(h,d),ca(d),k&4){try{sx(3,d,d.return),zm(3,d)}catch(ot){Xr(d,d.return,ot)}try{sx(5,d,d.return)}catch(ot){Xr(d,d.return,ot)}}break;case 1:Oi(h,d),ca(d),k&512&&g!==null&&Bu(g,g.return);break;case 5:if(Oi(h,d),ca(d),k&512&&g!==null&&Bu(g,g.return),d.flags&32){var F=d.stateNode;try{ft(F,"")}catch(ot){Xr(d,d.return,ot)}}if(k&4&&(F=d.stateNode,F!=null)){var T=d.memoizedProps,U=g!==null?g.memoizedProps:T,se=d.type,ce=d.updateQueue;if(d.updateQueue=null,ce!==null)try{se==="input"&&T.type==="radio"&&T.name!=null&&ee(F,T),Rn(se,U);var Ee=Rn(se,T);for(U=0;U<ce.length;U+=2){var Re=ce[U],_e=ce[U+1];Re==="style"?bs(F,_e):Re==="dangerouslySetInnerHTML"?Kt(F,_e):Re==="children"?ft(F,_e):j(F,Re,_e,Ee)}switch(se){case"input":Ae(F,T);break;case"textarea":Ue(F,T);break;case"select":var Oe=F._wrapperState.wasMultiple;F._wrapperState.wasMultiple=!!T.multiple;var Ge=T.value;Ge!=null?Te(F,!!T.multiple,Ge,!1):Oe!==!!T.multiple&&(T.defaultValue!=null?Te(F,!!T.multiple,T.defaultValue,!0):Te(F,!!T.multiple,T.multiple?[]:"",!1))}F[G0]=T}catch(ot){Xr(d,d.return,ot)}}break;case 6:if(Oi(h,d),ca(d),k&4){if(d.stateNode===null)throw Error(r(162));F=d.stateNode,T=d.memoizedProps;try{F.nodeValue=T}catch(ot){Xr(d,d.return,ot)}}break;case 3:if(Oi(h,d),ca(d),k&4&&g!==null&&g.memoizedState.isDehydrated)try{L0(h.containerInfo)}catch(ot){Xr(d,d.return,ot)}break;case 4:Oi(h,d),ca(d);break;case 13:Oi(h,d),ca(d),F=d.child,F.flags&8192&&(T=F.memoizedState!==null,F.stateNode.isHidden=T,!T||F.alternate!==null&&F.alternate.memoizedState!==null||(mb=At())),k&4&&LN(d);break;case 22:if(Re=g!==null&&g.memoizedState!==null,d.mode&1?(Yn=(Ee=Yn)||Re,Oi(h,d),Yn=Ee):Oi(h,d),ca(d),k&8192){if(Ee=d.memoizedState!==null,(d.stateNode.isHidden=Ee)&&!Re&&(d.mode&1)!==0)for(Je=d,Re=d.child;Re!==null;){for(_e=Je=Re;Je!==null;){switch(Oe=Je,Ge=Oe.child,Oe.tag){case 0:case 11:case 14:case 15:sx(4,Oe,Oe.return);break;case 1:Bu(Oe,Oe.return);var nt=Oe.stateNode;if(typeof nt.componentWillUnmount=="function"){k=Oe,g=Oe.return;try{h=k,nt.props=h.memoizedProps,nt.state=h.memoizedState,nt.componentWillUnmount()}catch(ot){Xr(k,g,ot)}}break;case 5:Bu(Oe,Oe.return);break;case 22:if(Oe.memoizedState!==null){$N(_e);continue}}Ge!==null?(Ge.return=Oe,Je=Ge):$N(_e)}Re=Re.sibling}e:for(Re=null,_e=d;;){if(_e.tag===5){if(Re===null){Re=_e;try{F=_e.stateNode,Ee?(T=F.style,typeof T.setProperty=="function"?T.setProperty("display","none","important"):T.display="none"):(se=_e.stateNode,ce=_e.memoizedProps.style,U=ce!=null&&ce.hasOwnProperty("display")?ce.display:null,se.style.display=vs("display",U))}catch(ot){Xr(d,d.return,ot)}}}else if(_e.tag===6){if(Re===null)try{_e.stateNode.nodeValue=Ee?"":_e.memoizedProps}catch(ot){Xr(d,d.return,ot)}}else if((_e.tag!==22&&_e.tag!==23||_e.memoizedState===null||_e===d)&&_e.child!==null){_e.child.return=_e,_e=_e.child;continue}if(_e===d)break e;for(;_e.sibling===null;){if(_e.return===null||_e.return===d)break e;Re===_e&&(Re=null),_e=_e.return}Re===_e&&(Re=null),_e.sibling.return=_e.return,_e=_e.sibling}}break;case 19:Oi(h,d),ca(d),k&4&&LN(d);break;case 21:break;default:Oi(h,d),ca(d)}}function ca(d){var h=d.flags;if(h&2){try{e:{for(var g=d.return;g!==null;){if(TN(g)){var k=g;break e}g=g.return}throw Error(r(160))}switch(k.tag){case 5:var F=k.stateNode;k.flags&32&&(ft(F,""),k.flags&=-33);var T=MN(d);xb(d,T,F);break;case 3:case 4:var U=k.stateNode.containerInfo,se=MN(d);db(d,se,U);break;default:throw Error(r(161))}}catch(ce){Xr(d,d.return,ce)}d.flags&=-3}h&4096&&(d.flags&=-4097)}function rX(d,h,g){Je=d,_N(d)}function _N(d,h,g){for(var k=(d.mode&1)!==0;Je!==null;){var F=Je,T=F.child;if(F.tag===22&&k){var U=F.memoizedState!==null||$m;if(!U){var se=F.alternate,ce=se!==null&&se.memoizedState!==null||Yn;se=$m;var Ee=Yn;if($m=U,(Yn=ce)&&!Ee)for(Je=F;Je!==null;)U=Je,ce=U.child,U.tag===22&&U.memoizedState!==null?zN(F):ce!==null?(ce.return=U,Je=ce):zN(F);for(;T!==null;)Je=T,_N(T),T=T.sibling;Je=F,$m=se,Yn=Ee}IN(d)}else(F.subtreeFlags&8772)!==0&&T!==null?(T.return=F,Je=T):IN(d)}}function IN(d){for(;Je!==null;){var h=Je;if((h.flags&8772)!==0){var g=h.alternate;try{if((h.flags&8772)!==0)switch(h.tag){case 0:case 11:case 15:Yn||zm(5,h);break;case 1:var k=h.stateNode;if(h.flags&4&&!Yn)if(g===null)k.componentDidMount();else{var F=h.elementType===h.type?g.memoizedProps:Ti(h.type,g.memoizedProps);k.componentDidUpdate(F,g.memoizedState,k.__reactInternalSnapshotBeforeUpdate)}var T=h.updateQueue;T!==null&&$7(h,T,k);break;case 3:var U=h.updateQueue;if(U!==null){if(g=null,h.child!==null)switch(h.child.tag){case 5:g=h.child.stateNode;break;case 1:g=h.child.stateNode}$7(h,U,g)}break;case 5:var se=h.stateNode;if(g===null&&h.flags&4){g=se;var ce=h.memoizedProps;switch(h.type){case"button":case"input":case"select":case"textarea":ce.autoFocus&&g.focus();break;case"img":ce.src&&(g.src=ce.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(h.memoizedState===null){var Ee=h.alternate;if(Ee!==null){var Re=Ee.memoizedState;if(Re!==null){var _e=Re.dehydrated;_e!==null&&L0(_e)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}Yn||h.flags&512&&ub(h)}catch(Oe){Xr(h,h.return,Oe)}}if(h===d){Je=null;break}if(g=h.sibling,g!==null){g.return=h.return,Je=g;break}Je=h.return}}function $N(d){for(;Je!==null;){var h=Je;if(h===d){Je=null;break}var g=h.sibling;if(g!==null){g.return=h.return,Je=g;break}Je=h.return}}function zN(d){for(;Je!==null;){var h=Je;try{switch(h.tag){case 0:case 11:case 15:var g=h.return;try{zm(4,h)}catch(ce){Xr(h,g,ce)}break;case 1:var k=h.stateNode;if(typeof k.componentDidMount=="function"){var F=h.return;try{k.componentDidMount()}catch(ce){Xr(h,F,ce)}}var T=h.return;try{ub(h)}catch(ce){Xr(h,T,ce)}break;case 5:var U=h.return;try{ub(h)}catch(ce){Xr(h,U,ce)}}}catch(ce){Xr(h,h.return,ce)}if(h===d){Je=null;break}var se=h.sibling;if(se!==null){se.return=h.return,Je=se;break}Je=h.return}}var nX=Math.ceil,Vm=A.ReactCurrentDispatcher,fb=A.ReactCurrentOwner,oi=A.ReactCurrentBatchConfig,ar=0,Bn=null,ln=null,$n=0,Ws=0,Du=_o(0),gn=0,ix=null,Xl=0,Um=0,hb=0,ax=null,Ds=null,mb=0,Fu=1/0,Ya=null,qm=!1,pb=null,qo=null,Wm=!1,Wo=null,Hm=0,ox=0,gb=null,Gm=-1,Km=0;function cs(){return(ar&6)!==0?At():Gm!==-1?Gm:Gm=At()}function Ho(d){return(d.mode&1)===0?1:(ar&2)!==0&&$n!==0?$n&-$n:$K.transition!==null?(Km===0&&(Km=Ke()),Km):(d=ve,d!==0||(d=window.event,d=d===void 0?16:Uj(d.type)),d)}function Li(d,h,g,k){if(50<ox)throw ox=0,gb=null,Error(r(185));Zt(d,g,k),((ar&2)===0||d!==Bn)&&(d===Bn&&((ar&2)===0&&(Um|=g),gn===4&&Go(d,$n)),Fs(d,k),g===1&&ar===0&&(h.mode&1)===0&&(Fu=At()+500,wm&&$o()))}function Fs(d,h){var g=d.callbackNode;fe(d,h);var k=ri(d,d===Bn?$n:0);if(k===0)g!==null&&yt(g),d.callbackNode=null,d.callbackPriority=0;else if(h=k&-k,d.callbackPriority!==h){if(g!=null&&yt(g),h===1)d.tag===0?IK(UN.bind(null,d)):S7(UN.bind(null,d)),OK(function(){(ar&6)===0&&$o()}),g=null;else{switch(Ie(k)){case 1:g=Es;break;case 4:g=js;break;case 16:g=Tt;break;case 536870912:g=Hn;break;default:g=Tt}g=QN(g,VN.bind(null,d))}d.callbackPriority=h,d.callbackNode=g}}function VN(d,h){if(Gm=-1,Km=0,(ar&6)!==0)throw Error(r(327));var g=d.callbackNode;if(Pu()&&d.callbackNode!==g)return null;var k=ri(d,d===Bn?$n:0);if(k===0)return null;if((k&30)!==0||(k&d.expiredLanes)!==0||h)h=Xm(d,k);else{h=k;var F=ar;ar|=2;var T=WN();(Bn!==d||$n!==h)&&(Ya=null,Fu=At()+500,Ql(d,h));do try{aX();break}catch(se){qN(d,se)}while(!0);Ov(),Vm.current=T,ar=F,ln!==null?h=0:(Bn=null,$n=0,h=gn)}if(h!==0){if(h===2&&(F=We(d),F!==0&&(k=F,h=yb(d,F))),h===1)throw g=ix,Ql(d,0),Go(d,k),Fs(d,At()),g;if(h===6)Go(d,k);else{if(F=d.current.alternate,(k&30)===0&&!sX(F)&&(h=Xm(d,k),h===2&&(T=We(d),T!==0&&(k=T,h=yb(d,T))),h===1))throw g=ix,Ql(d,0),Go(d,k),Fs(d,At()),g;switch(d.finishedWork=F,d.finishedLanes=k,h){case 0:case 1:throw Error(r(345));case 2:Zl(d,Ds,Ya);break;case 3:if(Go(d,k),(k&130023424)===k&&(h=mb+500-At(),10<h)){if(ri(d,0)!==0)break;if(F=d.suspendedLanes,(F&k)!==k){cs(),d.pingedLanes|=d.suspendedLanes&F;break}d.timeoutHandle=jv(Zl.bind(null,d,Ds,Ya),h);break}Zl(d,Ds,Ya);break;case 4:if(Go(d,k),(k&4194240)===k)break;for(h=d.eventTimes,F=-1;0<k;){var U=31-mn(k);T=1<<U,U=h[U],U>F&&(F=U),k&=~T}if(k=F,k=At()-k,k=(120>k?120:480>k?480:1080>k?1080:1920>k?1920:3e3>k?3e3:4320>k?4320:1960*nX(k/1960))-k,10<k){d.timeoutHandle=jv(Zl.bind(null,d,Ds,Ya),k);break}Zl(d,Ds,Ya);break;case 5:Zl(d,Ds,Ya);break;default:throw Error(r(329))}}}return Fs(d,At()),d.callbackNode===g?VN.bind(null,d):null}function yb(d,h){var g=ax;return d.current.memoizedState.isDehydrated&&(Ql(d,h).flags|=256),d=Xm(d,h),d!==2&&(h=Ds,Ds=g,h!==null&&vb(h)),d}function vb(d){Ds===null?Ds=d:Ds.push.apply(Ds,d)}function sX(d){for(var h=d;;){if(h.flags&16384){var g=h.updateQueue;if(g!==null&&(g=g.stores,g!==null))for(var k=0;k<g.length;k++){var F=g[k],T=F.getSnapshot;F=F.value;try{if(!Fi(T(),F))return!1}catch{return!1}}}if(g=h.child,h.subtreeFlags&16384&&g!==null)g.return=h,h=g;else{if(h===d)break;for(;h.sibling===null;){if(h.return===null||h.return===d)return!0;h=h.return}h.sibling.return=h.return,h=h.sibling}}return!0}function Go(d,h){for(h&=~hb,h&=~Um,d.suspendedLanes|=h,d.pingedLanes&=~h,d=d.expirationTimes;0<h;){var g=31-mn(h),k=1<<g;d[g]=-1,h&=~k}}function UN(d){if((ar&6)!==0)throw Error(r(327));Pu();var h=ri(d,0);if((h&1)===0)return Fs(d,At()),null;var g=Xm(d,h);if(d.tag!==0&&g===2){var k=We(d);k!==0&&(h=k,g=yb(d,k))}if(g===1)throw g=ix,Ql(d,0),Go(d,h),Fs(d,At()),g;if(g===6)throw Error(r(345));return d.finishedWork=d.current.alternate,d.finishedLanes=h,Zl(d,Ds,Ya),Fs(d,At()),null}function bb(d,h){var g=ar;ar|=1;try{return d(h)}finally{ar=g,ar===0&&(Fu=At()+500,wm&&$o())}}function Yl(d){Wo!==null&&Wo.tag===0&&(ar&6)===0&&Pu();var h=ar;ar|=1;var g=oi.transition,k=ve;try{if(oi.transition=null,ve=1,d)return d()}finally{ve=k,oi.transition=g,ar=h,(ar&6)===0&&$o()}}function Cb(){Ws=Du.current,Dr(Du)}function Ql(d,h){d.finishedWork=null,d.finishedLanes=0;var g=d.timeoutHandle;if(g!==-1&&(d.timeoutHandle=-1,MK(g)),ln!==null)for(g=ln.return;g!==null;){var k=g;switch(Dv(k),k.tag){case 1:k=k.type.childContextTypes,k!=null&&bm();break;case 3:ku(),Dr(ks),Dr(Gn),Uv();break;case 5:zv(k);break;case 4:ku();break;case 13:Dr(zr);break;case 19:Dr(zr);break;case 10:Lv(k.type._context);break;case 22:case 23:Cb()}g=g.return}if(Bn=d,ln=d=Ko(d.current,null),$n=Ws=h,gn=0,ix=null,hb=Um=Xl=0,Ds=ax=null,Hl!==null){for(h=0;h<Hl.length;h++)if(g=Hl[h],k=g.interleaved,k!==null){g.interleaved=null;var F=k.next,T=g.pending;if(T!==null){var U=T.next;T.next=F,k.next=U}g.pending=k}Hl=null}return d}function qN(d,h){do{var g=ln;try{if(Ov(),Pm.current=Lm,Tm){for(var k=Vr.memoizedState;k!==null;){var F=k.queue;F!==null&&(F.pending=null),k=k.next}Tm=!1}if(Kl=0,Sn=pn=Vr=null,J0=!1,ex=0,fb.current=null,g===null||g.return===null){gn=1,ix=h,ln=null;break}e:{var T=d,U=g.return,se=g,ce=h;if(h=$n,se.flags|=32768,ce!==null&&typeof ce=="object"&&typeof ce.then=="function"){var Ee=ce,Re=se,_e=Re.tag;if((Re.mode&1)===0&&(_e===0||_e===11||_e===15)){var Oe=Re.alternate;Oe?(Re.updateQueue=Oe.updateQueue,Re.memoizedState=Oe.memoizedState,Re.lanes=Oe.lanes):(Re.updateQueue=null,Re.memoizedState=null)}var Ge=mN(U);if(Ge!==null){Ge.flags&=-257,pN(Ge,U,se,T,h),Ge.mode&1&&hN(T,Ee,h),h=Ge,ce=Ee;var nt=h.updateQueue;if(nt===null){var ot=new Set;ot.add(ce),h.updateQueue=ot}else nt.add(ce);break e}else{if((h&1)===0){hN(T,Ee,h),wb();break e}ce=Error(r(426))}}else if(Lr&&se.mode&1){var sn=mN(U);if(sn!==null){(sn.flags&65536)===0&&(sn.flags|=256),pN(sn,U,se,T,h),Tv(Su(ce,se));break e}}T=ce=Su(ce,se),gn!==4&&(gn=2),ax===null?ax=[T]:ax.push(T),T=U;do{switch(T.tag){case 3:T.flags|=65536,h&=-h,T.lanes|=h;var ge=xN(T,ce,h);I7(T,ge);break e;case 1:se=ce;var xe=T.type,be=T.stateNode;if((T.flags&128)===0&&(typeof xe.getDerivedStateFromError=="function"||be!==null&&typeof be.componentDidCatch=="function"&&(qo===null||!qo.has(be)))){T.flags|=65536,h&=-h,T.lanes|=h;var ze=fN(T,se,h);I7(T,ze);break e}}T=T.return}while(T!==null)}GN(g)}catch(dt){h=dt,ln===g&&g!==null&&(ln=g=g.return);continue}break}while(!0)}function WN(){var d=Vm.current;return Vm.current=Lm,d===null?Lm:d}function wb(){(gn===0||gn===3||gn===2)&&(gn=4),Bn===null||(Xl&268435455)===0&&(Um&268435455)===0||Go(Bn,$n)}function Xm(d,h){var g=ar;ar|=2;var k=WN();(Bn!==d||$n!==h)&&(Ya=null,Ql(d,h));do try{iX();break}catch(F){qN(d,F)}while(!0);if(Ov(),ar=g,Vm.current=k,ln!==null)throw Error(r(261));return Bn=null,$n=0,gn}function iX(){for(;ln!==null;)HN(ln)}function aX(){for(;ln!==null&&!cr();)HN(ln)}function HN(d){var h=YN(d.alternate,d,Ws);d.memoizedProps=d.pendingProps,h===null?GN(d):ln=h,fb.current=null}function GN(d){var h=d;do{var g=h.alternate;if(d=h.return,(h.flags&32768)===0){if(g=ZK(g,h,Ws),g!==null){ln=g;return}}else{if(g=JK(g,h),g!==null){g.flags&=32767,ln=g;return}if(d!==null)d.flags|=32768,d.subtreeFlags=0,d.deletions=null;else{gn=6,ln=null;return}}if(h=h.sibling,h!==null){ln=h;return}ln=h=d}while(h!==null);gn===0&&(gn=5)}function Zl(d,h,g){var k=ve,F=oi.transition;try{oi.transition=null,ve=1,oX(d,h,g,k)}finally{oi.transition=F,ve=k}return null}function oX(d,h,g,k){do Pu();while(Wo!==null);if((ar&6)!==0)throw Error(r(327));g=d.finishedWork;var F=d.finishedLanes;if(g===null)return null;if(d.finishedWork=null,d.finishedLanes=0,g===d.current)throw Error(r(177));d.callbackNode=null,d.callbackPriority=0;var T=g.lanes|g.childLanes;if(vr(d,T),d===Bn&&(ln=Bn=null,$n=0),(g.subtreeFlags&2064)===0&&(g.flags&2064)===0||Wm||(Wm=!0,QN(Tt,function(){return Pu(),null})),T=(g.flags&15990)!==0,(g.subtreeFlags&15990)!==0||T){T=oi.transition,oi.transition=null;var U=ve;ve=1;var se=ar;ar|=4,fb.current=null,tX(d,g),RN(g,d),kK(wv),am=!!Cv,wv=Cv=null,d.current=g,rX(g),Lt(),ar=se,ve=U,oi.transition=T}else d.current=g;if(Wm&&(Wm=!1,Wo=d,Hm=F),T=d.pendingLanes,T===0&&(qo=null),$a(g.stateNode),Fs(d,At()),h!==null)for(k=d.onRecoverableError,g=0;g<h.length;g++)F=h[g],k(F.value,{componentStack:F.stack,digest:F.digest});if(qm)throw qm=!1,d=pb,pb=null,d;return(Hm&1)!==0&&d.tag!==0&&Pu(),T=d.pendingLanes,(T&1)!==0?d===gb?ox++:(ox=0,gb=d):ox=0,$o(),null}function Pu(){if(Wo!==null){var d=Ie(Hm),h=oi.transition,g=ve;try{if(oi.transition=null,ve=16>d?16:d,Wo===null)var k=!1;else{if(d=Wo,Wo=null,Hm=0,(ar&6)!==0)throw Error(r(331));var F=ar;for(ar|=4,Je=d.current;Je!==null;){var T=Je,U=T.child;if((Je.flags&16)!==0){var se=T.deletions;if(se!==null){for(var ce=0;ce<se.length;ce++){var Ee=se[ce];for(Je=Ee;Je!==null;){var Re=Je;switch(Re.tag){case 0:case 11:case 15:sx(8,Re,T)}var _e=Re.child;if(_e!==null)_e.return=Re,Je=_e;else for(;Je!==null;){Re=Je;var Oe=Re.sibling,Ge=Re.return;if(PN(Re),Re===Ee){Je=null;break}if(Oe!==null){Oe.return=Ge,Je=Oe;break}Je=Ge}}}var nt=T.alternate;if(nt!==null){var ot=nt.child;if(ot!==null){nt.child=null;do{var sn=ot.sibling;ot.sibling=null,ot=sn}while(ot!==null)}}Je=T}}if((T.subtreeFlags&2064)!==0&&U!==null)U.return=T,Je=U;else e:for(;Je!==null;){if(T=Je,(T.flags&2048)!==0)switch(T.tag){case 0:case 11:case 15:sx(9,T,T.return)}var ge=T.sibling;if(ge!==null){ge.return=T.return,Je=ge;break e}Je=T.return}}var xe=d.current;for(Je=xe;Je!==null;){U=Je;var be=U.child;if((U.subtreeFlags&2064)!==0&&be!==null)be.return=U,Je=be;else e:for(U=xe;Je!==null;){if(se=Je,(se.flags&2048)!==0)try{switch(se.tag){case 0:case 11:case 15:zm(9,se)}}catch(dt){Xr(se,se.return,dt)}if(se===U){Je=null;break e}var ze=se.sibling;if(ze!==null){ze.return=se.return,Je=ze;break e}Je=se.return}}if(ar=F,$o(),An&&typeof An.onPostCommitFiberRoot=="function")try{An.onPostCommitFiberRoot(ei,d)}catch{}k=!0}return k}finally{ve=g,oi.transition=h}}return!1}function KN(d,h,g){h=Su(g,h),h=xN(d,h,1),d=Vo(d,h,1),h=cs(),d!==null&&(Zt(d,1,h),Fs(d,h))}function Xr(d,h,g){if(d.tag===3)KN(d,d,g);else for(;h!==null;){if(h.tag===3){KN(h,d,g);break}else if(h.tag===1){var k=h.stateNode;if(typeof h.type.getDerivedStateFromError=="function"||typeof k.componentDidCatch=="function"&&(qo===null||!qo.has(k))){d=Su(g,d),d=fN(h,d,1),h=Vo(h,d,1),d=cs(),h!==null&&(Zt(h,1,d),Fs(h,d));break}}h=h.return}}function lX(d,h,g){var k=d.pingCache;k!==null&&k.delete(h),h=cs(),d.pingedLanes|=d.suspendedLanes&g,Bn===d&&($n&g)===g&&(gn===4||gn===3&&($n&130023424)===$n&&500>At()-mb?Ql(d,0):hb|=g),Fs(d,h)}function XN(d,h){h===0&&((d.mode&1)===0?h=1:(h=ti,ti<<=1,(ti&130023424)===0&&(ti=4194304)));var g=cs();d=Ga(d,h),d!==null&&(Zt(d,h,g),Fs(d,g))}function cX(d){var h=d.memoizedState,g=0;h!==null&&(g=h.retryLane),XN(d,g)}function uX(d,h){var g=0;switch(d.tag){case 13:var k=d.stateNode,F=d.memoizedState;F!==null&&(g=F.retryLane);break;case 19:k=d.stateNode;break;default:throw Error(r(314))}k!==null&&k.delete(h),XN(d,g)}var YN;YN=function(d,h,g){if(d!==null)if(d.memoizedProps!==h.pendingProps||ks.current)Bs=!0;else{if((d.lanes&g)===0&&(h.flags&128)===0)return Bs=!1,QK(d,h,g);Bs=(d.flags&131072)!==0}else Bs=!1,Lr&&(h.flags&1048576)!==0&&B7(h,jm,h.index);switch(h.lanes=0,h.tag){case 2:var k=h.type;Im(d,h),d=h.pendingProps;var F=bu(h,Gn.current);Au(h,g),F=Hv(null,h,k,d,F,g);var T=Gv();return h.flags|=1,typeof F=="object"&&F!==null&&typeof F.render=="function"&&F.$$typeof===void 0?(h.tag=1,h.memoizedState=null,h.updateQueue=null,Ss(k)?(T=!0,Cm(h)):T=!1,h.memoizedState=F.state!==null&&F.state!==void 0?F.state:null,Iv(h),F.updater=Rm,h.stateNode=F,F._reactInternals=h,Jv(h,k,d,g),h=nb(null,h,k,!0,T,g)):(h.tag=0,Lr&&T&&Bv(h),ls(null,h,F,g),h=h.child),h;case 16:k=h.elementType;e:{switch(Im(d,h),d=h.pendingProps,F=k._init,k=F(k._payload),h.type=k,F=h.tag=xX(k),d=Ti(k,d),F){case 0:h=rb(null,h,k,d,g);break e;case 1:h=wN(null,h,k,d,g);break e;case 11:h=gN(null,h,k,d,g);break e;case 14:h=yN(null,h,k,Ti(k.type,d),g);break e}throw Error(r(306,k,""))}return h;case 0:return k=h.type,F=h.pendingProps,F=h.elementType===k?F:Ti(k,F),rb(d,h,k,F,g);case 1:return k=h.type,F=h.pendingProps,F=h.elementType===k?F:Ti(k,F),wN(d,h,k,F,g);case 3:e:{if(EN(h),d===null)throw Error(r(387));k=h.pendingProps,T=h.memoizedState,F=T.element,_7(d,h),Dm(h,k,null,g);var U=h.memoizedState;if(k=U.element,T.isDehydrated)if(T={element:k,isDehydrated:!1,cache:U.cache,pendingSuspenseBoundaries:U.pendingSuspenseBoundaries,transitions:U.transitions},h.updateQueue.baseState=T,h.memoizedState=T,h.flags&256){F=Su(Error(r(423)),h),h=jN(d,h,k,g,F);break e}else if(k!==F){F=Su(Error(r(424)),h),h=jN(d,h,k,g,F);break e}else for(qs=Ro(h.stateNode.containerInfo.firstChild),Us=h,Lr=!0,Pi=null,g=L7(h,null,k,g),h.child=g;g;)g.flags=g.flags&-3|4096,g=g.sibling;else{if(Eu(),k===F){h=Xa(d,h,g);break e}ls(d,h,k,g)}h=h.child}return h;case 5:return z7(h),d===null&&Pv(h),k=h.type,F=h.pendingProps,T=d!==null?d.memoizedProps:null,U=F.children,Ev(k,F)?U=null:T!==null&&Ev(k,T)&&(h.flags|=32),CN(d,h),ls(d,h,U,g),h.child;case 6:return d===null&&Pv(h),null;case 13:return NN(d,h,g);case 4:return $v(h,h.stateNode.containerInfo),k=h.pendingProps,d===null?h.child=ju(h,null,k,g):ls(d,h,k,g),h.child;case 11:return k=h.type,F=h.pendingProps,F=h.elementType===k?F:Ti(k,F),gN(d,h,k,F,g);case 7:return ls(d,h,h.pendingProps,g),h.child;case 8:return ls(d,h,h.pendingProps.children,g),h.child;case 12:return ls(d,h,h.pendingProps.children,g),h.child;case 10:e:{if(k=h.type._context,F=h.pendingProps,T=h.memoizedProps,U=F.value,Ar(km,k._currentValue),k._currentValue=U,T!==null)if(Fi(T.value,U)){if(T.children===F.children&&!ks.current){h=Xa(d,h,g);break e}}else for(T=h.child,T!==null&&(T.return=h);T!==null;){var se=T.dependencies;if(se!==null){U=T.child;for(var ce=se.firstContext;ce!==null;){if(ce.context===k){if(T.tag===1){ce=Ka(-1,g&-g),ce.tag=2;var Ee=T.updateQueue;if(Ee!==null){Ee=Ee.shared;var Re=Ee.pending;Re===null?ce.next=ce:(ce.next=Re.next,Re.next=ce),Ee.pending=ce}}T.lanes|=g,ce=T.alternate,ce!==null&&(ce.lanes|=g),Rv(T.return,g,h),se.lanes|=g;break}ce=ce.next}}else if(T.tag===10)U=T.type===h.type?null:T.child;else if(T.tag===18){if(U=T.return,U===null)throw Error(r(341));U.lanes|=g,se=U.alternate,se!==null&&(se.lanes|=g),Rv(U,g,h),U=T.sibling}else U=T.child;if(U!==null)U.return=T;else for(U=T;U!==null;){if(U===h){U=null;break}if(T=U.sibling,T!==null){T.return=U.return,U=T;break}U=U.return}T=U}ls(d,h,F.children,g),h=h.child}return h;case 9:return F=h.type,k=h.pendingProps.children,Au(h,g),F=ii(F),k=k(F),h.flags|=1,ls(d,h,k,g),h.child;case 14:return k=h.type,F=Ti(k,h.pendingProps),F=Ti(k.type,F),yN(d,h,k,F,g);case 15:return vN(d,h,h.type,h.pendingProps,g);case 17:return k=h.type,F=h.pendingProps,F=h.elementType===k?F:Ti(k,F),Im(d,h),h.tag=1,Ss(k)?(d=!0,Cm(h)):d=!1,Au(h,g),uN(h,k,F),Jv(h,k,F,g),nb(null,h,k,!0,d,g);case 19:return kN(d,h,g);case 22:return bN(d,h,g)}throw Error(r(156,h.tag))};function QN(d,h){return ct(d,h)}function dX(d,h,g,k){this.tag=d,this.key=g,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=h,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=k,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function li(d,h,g,k){return new dX(d,h,g,k)}function Eb(d){return d=d.prototype,!(!d||!d.isReactComponent)}function xX(d){if(typeof d=="function")return Eb(d)?1:0;if(d!=null){if(d=d.$$typeof,d===I)return 11;if(d===_)return 14}return 2}function Ko(d,h){var g=d.alternate;return g===null?(g=li(d.tag,h,d.key,d.mode),g.elementType=d.elementType,g.type=d.type,g.stateNode=d.stateNode,g.alternate=d,d.alternate=g):(g.pendingProps=h,g.type=d.type,g.flags=0,g.subtreeFlags=0,g.deletions=null),g.flags=d.flags&14680064,g.childLanes=d.childLanes,g.lanes=d.lanes,g.child=d.child,g.memoizedProps=d.memoizedProps,g.memoizedState=d.memoizedState,g.updateQueue=d.updateQueue,h=d.dependencies,g.dependencies=h===null?null:{lanes:h.lanes,firstContext:h.firstContext},g.sibling=d.sibling,g.index=d.index,g.ref=d.ref,g}function Ym(d,h,g,k,F,T){var U=2;if(k=d,typeof d=="function")Eb(d)&&(U=1);else if(typeof d=="string")U=5;else e:switch(d){case B:return Jl(g.children,F,T,h);case D:U=8,F|=8;break;case P:return d=li(12,g,h,F|2),d.elementType=P,d.lanes=T,d;case V:return d=li(13,g,h,F),d.elementType=V,d.lanes=T,d;case W:return d=li(19,g,h,F),d.elementType=W,d.lanes=T,d;case R:return Qm(g,F,T,h);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case O:U=10;break e;case M:U=9;break e;case I:U=11;break e;case _:U=14;break e;case z:U=16,k=null;break e}throw Error(r(130,d==null?d:typeof d,""))}return h=li(U,g,h,F),h.elementType=d,h.type=k,h.lanes=T,h}function Jl(d,h,g,k){return d=li(7,d,k,h),d.lanes=g,d}function Qm(d,h,g,k){return d=li(22,d,k,h),d.elementType=R,d.lanes=g,d.stateNode={isHidden:!1},d}function jb(d,h,g){return d=li(6,d,null,h),d.lanes=g,d}function Nb(d,h,g){return h=li(4,d.children!==null?d.children:[],d.key,h),h.lanes=g,h.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},h}function fX(d,h,g,k,F){this.tag=h,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Et(0),this.expirationTimes=Et(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Et(0),this.identifierPrefix=k,this.onRecoverableError=F,this.mutableSourceEagerHydrationData=null}function Ab(d,h,g,k,F,T,U,se,ce){return d=new fX(d,h,g,se,ce),h===1?(h=1,T===!0&&(h|=8)):h=0,T=li(3,null,null,h),d.current=T,T.stateNode=d,T.memoizedState={element:k,isDehydrated:g,cache:null,transitions:null,pendingSuspenseBoundaries:null},Iv(T),d}function hX(d,h,g){var k=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:S,key:k==null?null:""+k,children:d,containerInfo:h,implementation:g}}function ZN(d){if(!d)return Io;d=d._reactInternals;e:{if(Cs(d)!==d||d.tag!==1)throw Error(r(170));var h=d;do{switch(h.tag){case 3:h=h.stateNode.context;break e;case 1:if(Ss(h.type)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break e}}h=h.return}while(h!==null);throw Error(r(171))}if(d.tag===1){var g=d.type;if(Ss(g))return A7(d,g,h)}return h}function JN(d,h,g,k,F,T,U,se,ce){return d=Ab(g,k,!0,d,F,T,U,se,ce),d.context=ZN(null),g=d.current,k=cs(),F=Ho(g),T=Ka(k,F),T.callback=h??null,Vo(g,T,F),d.current.lanes=F,Zt(d,F,k),Fs(d,k),d}function Zm(d,h,g,k){var F=h.current,T=cs(),U=Ho(F);return g=ZN(g),h.context===null?h.context=g:h.pendingContext=g,h=Ka(T,U),h.payload={element:d},k=k===void 0?null:k,k!==null&&(h.callback=k),d=Vo(F,h,U),d!==null&&(Li(d,F,U,T),Bm(d,F,U)),U}function Jm(d){if(d=d.current,!d.child)return null;switch(d.child.tag){case 5:return d.child.stateNode;default:return d.child.stateNode}}function eA(d,h){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var g=d.retryLane;d.retryLane=g!==0&&g<h?g:h}}function kb(d,h){eA(d,h),(d=d.alternate)&&eA(d,h)}function mX(){return null}var tA=typeof reportError=="function"?reportError:function(d){console.error(d)};function Sb(d){this._internalRoot=d}ep.prototype.render=Sb.prototype.render=function(d){var h=this._internalRoot;if(h===null)throw Error(r(409));Zm(d,h,null,null)},ep.prototype.unmount=Sb.prototype.unmount=function(){var d=this._internalRoot;if(d!==null){this._internalRoot=null;var h=d.containerInfo;Yl(function(){Zm(null,d,null,null)}),h[Ua]=null}};function ep(d){this._internalRoot=d}ep.prototype.unstable_scheduleHydration=function(d){if(d){var h=jr();d={blockedOn:null,target:d,priority:h};for(var g=0;g<Mo.length&&h!==0&&h<Mo[g].priority;g++);Mo.splice(g,0,d),g===0&&zj(d)}};function Bb(d){return!(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)}function tp(d){return!(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11&&(d.nodeType!==8||d.nodeValue!==" react-mount-point-unstable "))}function rA(){}function pX(d,h,g,k,F){if(F){if(typeof k=="function"){var T=k;k=function(){var Ee=Jm(U);T.call(Ee)}}var U=JN(h,k,d,0,null,!1,!1,"",rA);return d._reactRootContainer=U,d[Ua]=U.current,W0(d.nodeType===8?d.parentNode:d),Yl(),U}for(;F=d.lastChild;)d.removeChild(F);if(typeof k=="function"){var se=k;k=function(){var Ee=Jm(ce);se.call(Ee)}}var ce=Ab(d,0,!1,null,null,!1,!1,"",rA);return d._reactRootContainer=ce,d[Ua]=ce.current,W0(d.nodeType===8?d.parentNode:d),Yl(function(){Zm(h,ce,g,k)}),ce}function rp(d,h,g,k,F){var T=g._reactRootContainer;if(T){var U=T;if(typeof F=="function"){var se=F;F=function(){var ce=Jm(U);se.call(ce)}}Zm(h,U,d,F)}else U=pX(g,h,d,F,k);return Jm(U)}ut=function(d){switch(d.tag){case 3:var h=d.stateNode;if(h.current.memoizedState.isDehydrated){var g=As(h.pendingLanes);g!==0&&(ae(h,g|1),Fs(h,At()),(ar&6)===0&&(Fu=At()+500,$o()))}break;case 13:Yl(function(){var k=Ga(d,1);if(k!==null){var F=cs();Li(k,d,1,F)}}),kb(d,1)}},Mt=function(d){if(d.tag===13){var h=Ga(d,134217728);if(h!==null){var g=cs();Li(h,d,134217728,g)}kb(d,134217728)}},Vt=function(d){if(d.tag===13){var h=Ho(d),g=Ga(d,h);if(g!==null){var k=cs();Li(g,d,h,k)}kb(d,h)}},jr=function(){return ve},kn=function(d,h){var g=ve;try{return ve=d,h()}finally{ve=g}},fr=function(d,h,g){switch(h){case"input":if(Ae(d,g),h=g.name,g.type==="radio"&&h!=null){for(g=d;g.parentNode;)g=g.parentNode;for(g=g.querySelectorAll("input[name="+JSON.stringify(""+h)+'][type="radio"]'),h=0;h<g.length;h++){var k=g[h];if(k!==d&&k.form===d.form){var F=vm(k);if(!F)throw Error(r(90));me(k),Ae(k,F)}}}break;case"textarea":Ue(d,g);break;case"select":h=g.value,h!=null&&Te(d,!!g.multiple,h,!1)}},Pt=bb,Jt=Yl;var gX={usingClientEntryPoint:!1,Events:[K0,yu,vm,Pe,Rt,bb]},lx={findFiberByHostInstance:Vl,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},yX={bundleType:lx.bundleType,version:lx.version,rendererPackageName:lx.rendererPackageName,rendererConfig:lx.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:A.ReactCurrentDispatcher,findHostInstanceByFiber:function(d){return d=Me(d),d===null?null:d.stateNode},findFiberByHostInstance:lx.findFiberByHostInstance||mX,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 np=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!np.isDisabled&&np.supportsFiber)try{ei=np.inject(yX),An=np}catch{}}return Ps.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=gX,Ps.createPortal=function(d,h){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Bb(h))throw Error(r(200));return hX(d,h,null,g)},Ps.createRoot=function(d,h){if(!Bb(d))throw Error(r(299));var g=!1,k="",F=tA;return h!=null&&(h.unstable_strictMode===!0&&(g=!0),h.identifierPrefix!==void 0&&(k=h.identifierPrefix),h.onRecoverableError!==void 0&&(F=h.onRecoverableError)),h=Ab(d,1,!1,null,null,g,!1,k,F),d[Ua]=h.current,W0(d.nodeType===8?d.parentNode:d),new Sb(h)},Ps.findDOMNode=function(d){if(d==null)return null;if(d.nodeType===1)return d;var h=d._reactInternals;if(h===void 0)throw typeof d.render=="function"?Error(r(188)):(d=Object.keys(d).join(","),Error(r(268,d)));return d=Me(h),d=d===null?null:d.stateNode,d},Ps.flushSync=function(d){return Yl(d)},Ps.hydrate=function(d,h,g){if(!tp(h))throw Error(r(200));return rp(null,d,h,!0,g)},Ps.hydrateRoot=function(d,h,g){if(!Bb(d))throw Error(r(405));var k=g!=null&&g.hydratedSources||null,F=!1,T="",U=tA;if(g!=null&&(g.unstable_strictMode===!0&&(F=!0),g.identifierPrefix!==void 0&&(T=g.identifierPrefix),g.onRecoverableError!==void 0&&(U=g.onRecoverableError)),h=JN(h,null,d,1,g??null,F,!1,T,U),d[Ua]=h.current,W0(d),k)for(d=0;d<k.length;d++)g=k[d],F=g._getVersion,F=F(g._source),h.mutableSourceEagerHydrationData==null?h.mutableSourceEagerHydrationData=[g,F]:h.mutableSourceEagerHydrationData.push(g,F);return new ep(h)},Ps.render=function(d,h,g){if(!tp(h))throw Error(r(200));return rp(null,d,h,!1,g)},Ps.unmountComponentAtNode=function(d){if(!tp(d))throw Error(r(40));return d._reactRootContainer?(Yl(function(){rp(null,null,d,!1,function(){d._reactRootContainer=null,d[Ua]=null})}),!0):!1},Ps.unstable_batchedUpdates=bb,Ps.unstable_renderSubtreeIntoContainer=function(d,h,g,k){if(!tp(g))throw Error(r(200));if(d==null||d._reactInternals===void 0)throw Error(r(38));return rp(d,h,g,!1,k)},Ps.version="18.3.1-next-f1338f8080-20240426",Ps}var dA;function h_(){if(dA)return Tb.exports;dA=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(),Tb.exports=kX(),Tb.exports}var xA;function SX(){if(xA)return ap;xA=1;var e=h_();return ap.createRoot=e.createRoot,ap.hydrateRoot=e.hydrateRoot,ap}var BX=SX(),ux={},fA;function DX(){if(fA)return ux;fA=1,Object.defineProperty(ux,"__esModule",{value:!0}
40),ux.parse=o,ux.serialize=u;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,r=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,n=/^[\u0020-\u003A\u003D-\u007E]*$/,i=Object.prototype.toString,a=(()=>{const m=function(){};return m.prototype=Object.create(null),m})();function o(m,p){const y=new a,v=m.length;if(v<2)return y;const b=(p==null?void 0:p.decode)||f;let E=0;do{const N=m.indexOf("=",E);if(N===-1)break;const j=m.indexOf(";",E),A=j===-1?v:j;if(N>A){E=m.lastIndexOf(";",N-1)+1;continue}const w=l(m,E,N),S=c(m,N,w),B=m.slice(w,S);if(y[B]===void 0){let D=l(m,N+1,A),P=c(m,A,D);const O=b(m.slice(D,P));y[B]=O}E=A+1}while(E<v);return y}function l(m,p,y){do{const v=m.charCodeAt(p);if(v!==32&&v!==9)return p}while(++p<y);return y}function c(m,p,y){for(;p>y;){const v=m.charCodeAt(--p);if(v!==32&&v!==9)return p+1}return y}function u(m,p,y){const v=(y==null?void 0:y.encode)||encodeURIComponent;if(!e.test(m))throw new TypeError(`argument name is invalid: ${m}`);const b=v(p);if(!t.test(b))throw new TypeError(`argument val is invalid: ${p}`);let E=m+"="+b;if(!y)return E;if(y.maxAge!==void 0){if(!Number.isInteger(y.maxAge))throw new TypeError(`option maxAge is invalid: ${y.maxAge}`);E+="; Max-Age="+y.maxAge}if(y.domain){if(!r.test(y.domain))throw new TypeError(`option domain is invalid: ${y.domain}`);E+="; Domain="+y.domain}if(y.path){if(!n.test(y.path))throw new TypeError(`option path is invalid: ${y.path}`);E+="; Path="+y.path}if(y.expires){if(!x(y.expires)||!Number.isFinite(y.expires.valueOf()))throw new TypeError(`option expires is invali
40d: ${y.expires}`);E+="; Expires="+y.expires.toUTCString()}if(y.httpOnly&&(E+="; HttpOnly"),y.secure&&(E+="; Secure"),y.partitioned&&(E+="; Partitioned"),y.priority)switch(typeof y.priority=="string"?y.priority.toLowerCase():void 0){case"low":E+="; Priority=Low";break;case"medium":E+="; Priority=Medium";break;case"high":E+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${y.priority}`)}if(y.sameSite)switch(typeof y.sameSite=="string"?y.sameSite.toLowerCase():y.sameSite){case!0:case"strict":E+="; SameSite=Strict";break;case"lax":E+="; SameSite=Lax";break;case"none":E+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${y.sameSite}`)}return E}function f(m){if(m.indexOf("%")===-1)return m;try{return decodeURIComponent(m)}catch{return m}}function x(m){return i.call(m)==="[object Date]"}return ux}DX();var hA="popstate";function FX(e={}){function t(n,i){let{pathname:a,search:o,hash:l}=n.location;return RC("",{pathname:a,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:ff(i)}return TX(t,r,null,e)}function $r(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ji(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function PX(){return Math.random().toString(36).substring(2,10)}function mA(e,t){return{usr:e.state,key:e.key,idx:t}}function RC(e,t,r=null,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?n0(t):t,state:r,key:t&&t.key||n||PX()}}function ff({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function n0(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function TX(e,t,r,n={}){let{window:i=document.defaultView,v5Compat:a=!1}=n,o=i.history,l="POP",c=null,u=f();u==null&&(u=0,o.replaceState({...o.state,idx:u},""));function f(){return(o.state||{idx:null}).idx}function x(){l="POP";let b=f(),E=b==null?null:b-u;u=b,c&&c({action:l,location:v.location,delta:E})}function m(b,E){l="PUSH";let N=RC(v.location,b,E);u=f()+1;let j=mA(N,u),A=v.createHref(N);try{o.pushState(j,"",A)}catch(w){if(w instanceof DOMException&&w.name==="DataCloneError")throw w;i.location.assign(A)}a&&c&&c({action:l,location:v.location,delta:1})}function p(b,E){l="REPLACE";let N=RC(v.location,b,E);u=f();let j=mA(N,u),A=v.createHref(N);o.replaceState(j,"",A),a&&c&&c({action:l,location:v.location,delta:0})}function y(b){return MX(b)}let v={get action(){return l},get location(){return e(i,o)},listen(b){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(hA,x),c=b,()=>{i.removeEventListener(hA,x),c=null}},createHref(b){return t(i,b)},createURL:y,encodeLocation(b){let E=y(b);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:m,replace:p,go(b){return o.go(b)}};return v}function MX(e,t=!1){let r="http://localhost";
40typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),$r(r,"No window.location.(origin|href) available to create URL");let n=typeof e=="string"?e:ff(e);return n=n.replace(/ $/,"%20"),!t&&n.startsWith("//")&&(n=r+n),new URL(n,r)}function m_(e,t,r="/"){return OX(e,t,r,!1)}function OX(e,t,r,n){let i=typeof t=="string"?n0(t):t,a=ho(i.pathname||"/",r);if(a==null)return null;let o=p_(e);LX(o);let l=null;for(let c=0;l==null&&c<o.length;++c){let u=GX(a);l=WX(o[c],u,n)}return l}function p_(e,t=[],r=[],n=""){let i=(a,o,l)=>{let c={relativePath:l===void 0?a.path||"":l,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};c.relativePath.startsWith("/")&&($r(c.relativePath.startsWith(n),`Absolute route path "${c.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(n.length));let u=lo([n,c.relativePath]),f=r.concat(c);a.children&&a.children.length>0&&($r(a.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),p_(a.children,t,f,u)),!(a.path==null&&!a.index)&&t.push({path:u,score:UX(u,a.index),routesMeta:f})};return e.forEach((a,o)=>{var l;if(a.path===""||!((l=a.path)!=null&&l.includes("?")))i(a,o);else for(let c of g_(a.path))i(a,o,c)}),t}function g_(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return i?[a,""]:[a];let o=g_(n.join("/")),l=[];return l.push(...o.map(c=>c===""?a:[a,c].join("/"))),i&&l.push(...o),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function LX(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:qX(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var RX=/^:[\w-]+$/,_X=3,IX=2,$X=1,zX=10,VX=-2,pA=e=>e==="*";function UX(e,t){let r=e.split("/"),n=r.length;return r.some(pA)&&(n+=VX),t&&(n+=IX),r.filter(i=>!pA(i)).reduce((i,a)=>i+(RX.test(a)?_X:a===""?$X:zX),n)}function qX(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 WX(e,t,r=!1){let{routesMeta:n}=e,i={},a="/",o=[];for(let l=0;l<n.length;++l){let c=n[l],u=l===n.length-1,f=a==="/"?t:t.slice(a.length)||"/",x=yg({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},f),m=c.route;if(!x&&u&&r&&!n[n.length-1].route.index&&(x=yg({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},f)),!x)return null;
40Object.assign(i,x.params),o.push({params:i,pathname:lo([a,x.pathname]),pathnameBase:QX(lo([a,x.pathnameBase])),route:m}),x.pathnameBase!=="/"&&(a=lo([a,x.pathnameBase]))}return o}function yg(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=HX(e.path,e.caseSensitive,e.end),i=t.match(r);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,"$1"),l=i.slice(1);return{params:n.reduce((u,{paramName:f,isOptional:x},m)=>{if(f==="*"){let y=l[m]||"";o=a.slice(0,a.length-y.length).replace(/(.)\/+$/,"$1")}const p=l[m];return x&&!p?u[f]=void 0:u[f]=(p||"").replace(/%2F/g,"/"),u},{}),pathname:a,pathnameBase:o,pattern:e}}function HX(e,t=!1,r=!0){ji(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 GX(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ji(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function ho(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 KX(e,t="/"){let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?n0(e):e;return{pathname:r?r.startsWith("/")?r:XX(r,t):t,search:ZX(n),hash:JX(i)}}function XX(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 Lb(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 YX(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function F4(e){let t=YX(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function P4(e,t,r,n=!1){let i;typeof e=="string"?i=n0(e):(i={...e},$r(!i.pathname||!i.pathname.includes("?"),Lb("?","pathname","search",i)),$r(!i.pathname||!i.pathname.includes("#"),Lb("#","pathname","hash",i)),$r(!i.search||!i.search.includes("#"),Lb("#","search","hash",i)));let a=e===""||i.pathname==="",o=a?"/":i.pathname,l;if(o==null)l=r;else{let x=t.length-1;if(!n&&o.startsWith("..")){let m=o.split("/");for(;m[0]==="..";)m.shift(),x-=1;i.pathname=m.join("/")}l=x>=0?t[x]:"/"}let c=KX(i,l),u=o&&o!=="/"&&o.endsWith("/"),f=(a||o===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(u||f)&&(c.pathname+="/"),c}var lo=e=>e.join("/").replace(/\/\/+/g,"/"),QX=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),ZX=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,JX=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function eY(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var y_=["POST","PUT","PATCH","DELETE"];new Set(y_);var tY=["GET",...y_];new Set(tY);var s0=C.createContext(null);s0.displayName="DataRouter";var Z1=C.createContext(null);Z1.displayName="DataRouterState";var v_=C.createContext({isTransitioning:!1});v_.displayName="ViewTransition";var rY=C.createContext(new Map);rY.displayName="Fetchers";var nY=C.createContext(null);nY.displayName="Await";var ea=C.createContext(null);ea.displayName="Navigation";var Ah=C.createContext(null);Ah.displayName="Location";var Ai=C.createContext({outlet:null,matches:[],isDataRoute:!1});Ai.displayName="Route";var T4=C.createContext(null);T4.displayName="RouteError";function sY(e,{relative:t}={}){$r(i0(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=C.useContext(ea),{hash:i,pathname:a,search:o}=kh(e,{relative:t}),l=a;return r!=="/"&&(l=a==="/"?r:lo([r,a])),n.createHref({pathname:l,search:o,hash:i})}function i0(){return C.useContext(Ah)!=null}function Cr(){return $r(i0(),"useLocation() may be used only in the context of a <Router> component."),C.useContext(Ah).location}var b_="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function C_(e){C.useContext(ea).static||C.useLayoutEffect(e)}function lt(){let{isDataRoute:e}=C.useContext(Ai);return e?vY():iY()}function iY(){$r(i0(),"useNavigate() may be used only in the context of a <Router> component.");let e=C.useContext(s0),{basename:t,navigator:r}=C.useContext(ea),{matches:n}=C.useContext(Ai),{pathname:i}=Cr(),a=JSON.stringify(F4(n)),o=C.useRef(!1);return C_(()=>{o.current=!0}
40),C.useCallback((c,u={})=>{if(ji(o.current,b_),!o.current)return;if(typeof c=="number"){r.go(c);return}let f=P4(c,JSON.parse(a),i,u.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:lo([t,f.pathname])),(u.replace?r.replace:r.push)(f,u.state,u)},[t,r,a,i,e])}var aY=C.createContext(null);function oY(e){let t=C.useContext(Ai).outlet;return t&&C.createElement(aY.Provider,{value:e},t)}function ta(){let{matches:e}=C.useContext(Ai),t=e[e.length-1];return t?t.params:{}}function kh(e,{relative:t}={}){let{matches:r}=C.useContext(Ai),{pathname:n}=Cr(),i=JSON.stringify(F4(r));return C.useMemo(()=>P4(e,JSON.parse(i),n,t==="path"),[e,i,n,t])}function lY(e,t){return w_(e,t)}function w_(e,t,r,n){var N;$r(i0(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i,static:a}=C.useContext(ea),{matches:o}=C.useContext(Ai),l=o[o.length-1],c=l?l.params:{},u=l?l.pathname:"/",f=l?l.pathnameBase:"/",x=l&&l.route;{let j=x&&x.path||"";E_(u,!x||j.endsWith("*")||j.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${j}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
41
42Please change the parent <Route path="${j}"> to <Route path="${j==="/"?"*":`${j}/*`}">.`)}let m=Cr(),p;if(t){let j=typeof t=="string"?n0(t):t;$r(f==="/"||((N=j.pathname)==null?void 0:N.startsWith(f)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${f}" but pathname "${j.pathname}" was given in the \`location\` prop.`),p=j}else p=m;let y=p.pathname||"/",v=y;if(f!=="/"){let j=f.replace(/^\//,"").split("/");v="/"+y.replace(/^\//,"").split("/").slice(j.length).join("/")}let b=!a&&r&&r.matches&&r.matches.length>0?r.matches:m_(e,{pathname:v});ji(x||b!=null,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),ji(b==null||b[b.length-1].route.element!==void 0||b[b.length-1].route.Component!==void 0||b[b.length-1].route.lazy!==void 0,`Matched leaf route at location "${p.pathname}${p.search}${p.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let E=fY(b&&b.map(j=>Object.assign({},j,{params:Object.assign({},c,j.params),pathname:lo([f,i.encodeLocation?i.encodeLocation(j.pathname).pathname:j.pathname]),pathnameBase:j.pathnameBase==="/"?f:lo([f,i.encodeLocation?i.encodeLocation(j.pathnameBase).pathname:j.pathnameBase])})),o,r,n);return t&&E?C.createElement(Ah.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...p},navigationType:"POP"}},E):E}function cY(){let e=yY(),t=eY(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:n},a={padding:"2px 4px",backgroundColor:n},o=null;return console.error("Error handled by React Router default ErrorBoundary:",e),o=C.createElement(C.Fragment,null,C.createElement("p",null,"💿 Hey developer 👋"),C.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",C.createElement("code",{style:a},"ErrorBoundary")," or"," ",C.createElement("code",{style:a},"errorElement")," prop on your route.")),C.createElement(C.Fragment,null,C.createElement("h2",null,"Unexpected Application Error!"),C.createElement("h3",{style:{fontStyle:"italic"}},t),r?C.createElement("pre",{style:i},r):null,o)}var uY=C.createElement(cY,null),dY=class extends C.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?C.createElement(Ai.Provider,{value:this.props.routeContext},C.createElement(T4.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function xY({routeContext:e,match:t,children:r}){let n=C.useContext(s0);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),C.createElement(Ai.Provider,{value:e},r)}function fY(e,t=[],r=null,n=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r==null?void 0:r.errors;if(a!=null){let c=i.findIndex(u=>u.route.id&&(a==null?void 0:a[u.route.id])!==void 0);$r(c>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),i=i.slice(0,Math.min(i.length,c+1))}let o=!1,l=-1;if(r)for(let c=0;c<i.length;c++){let u=i[c];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(l=c),u.route.id){let{loaderData:f,errors:x}
42=r,m=u.route.loader&&!f.hasOwnProperty(u.route.id)&&(!x||x[u.route.id]===void 0);if(u.route.lazy||m){o=!0,l>=0?i=i.slice(0,l+1):i=[i[0]];break}}}return i.reduceRight((c,u,f)=>{let x,m=!1,p=null,y=null;r&&(x=a&&u.route.id?a[u.route.id]:void 0,p=u.route.errorElement||uY,o&&(l<0&&f===0?(E_("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),m=!0,y=null):l===f&&(m=!0,y=u.route.hydrateFallbackElement||null)));let v=t.concat(i.slice(0,f+1)),b=()=>{let E;return x?E=p:m?E=y:u.route.Component?E=C.createElement(u.route.Component,null):u.route.element?E=u.route.element:E=c,C.createElement(xY,{match:u,routeContext:{outlet:c,matches:v,isDataRoute:r!=null},children:E})};return r&&(u.route.ErrorBoundary||u.route.errorElement||f===0)?C.createElement(dY,{location:r.location,revalidation:r.revalidation,component:p,error:x,children:b(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):b()},null)}function M4(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function hY(e){let t=C.useContext(s0);return $r(t,M4(e)),t}function mY(e){let t=C.useContext(Z1);return $r(t,M4(e)),t}function pY(e){let t=C.useContext(Ai);return $r(t,M4(e)),t}function O4(e){let t=pY(e),r=t.matches[t.matches.length-1];return $r(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function gY(){return O4("useRouteId")}function yY(){var n;let e=C.useContext(T4),t=mY("useRouteError"),r=O4("useRouteError");return e!==void 0?e:(n=t.errors)==null?void 0:n[r]}function vY(){let{router:e}=hY("useNavigate"),t=O4("useNavigate"),r=C.useRef(!1);return C_(()=>{r.current=!0}),C.useCallback(async(i,a={})=>{ji(r.current,b_),r.current&&(typeof i=="number"?e.navigate(i):await e.navigate(i,{fromRouteId:t,...a}))},[e,t])}var gA={};function E_(e,t,r){!t&&!gA[e]&&(gA[e]=!0,ji(!1,r))}C.memo(bY);function bY({routes:e,future:t,state:r}){return w_(e,void 0,r,t)}function wl({to:e,replace:t,state:r,relative:n}){$r(i0(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=C.useContext(ea);ji(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:a}=C.useContext(Ai),{pathname:o}=Cr(),l=lt(),c=P4(e,F4(a),o,n==="path"),u=JSON.stringify(c);return C.useEffect(()=>{l(JSON.parse(u),{replace:t,state:r,relative:n})},[l,u,n,t,r]),null}function L4(e){return oY(e.context)}function Ye(e){$r(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function CY({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:i,static:a=!1}){$r(!i0(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let o=e.replace(/^\/*/,"/"),l=C.useMemo(()=>({basename:o,navigator:i,static:a,future:{}}),[o,i,a]);typeof r=="string"&&(r=n0(r));let{pathname:c="/",search:u="",hash:f="",state:x=null,key:m="default"}=r,p=C.useMemo(()=>{let y=ho(c,o);return y==null?null:{location:{pathname:y,search:u,hash:f,state:x,key:m},navigationType:n}},[o,c,u,f,x,m,n]);return ji(p!=null,`<Router basename="${o}"> is not able to match the URL "${c}${u}${f}" because it does not start with the basename, so the <Router> won't render anything.`),p==null?null:C.createElement(ea.Provider,{value:l},C.createElement(Ah.Provider,{children:t,value:p}))}function wY({children:e,location:t}){return lY(_C(e),t)}function _C(e,t=[]){let r=[];return C.Children.forEach(e,(n,i)=>{if(!C.isValidElement(n))return;let a=[...t,i];if(n.type===C.Fragment){r.push.apply(r,_C(n.props.children,a));return}$r(n.type===Ye,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),$r(!n.props.index||!n.props.children,"An index route cannot have child routes.");let o={id:n.props.id||a.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,
42shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=_C(n.props.children,a)),r.push(o)}),r}var Gp="get",Kp="application/x-www-form-urlencoded";function J1(e){return e!=null&&typeof e.tagName=="string"}function EY(e){return J1(e)&&e.tagName.toLowerCase()==="button"}function jY(e){return J1(e)&&e.tagName.toLowerCase()==="form"}function NY(e){return J1(e)&&e.tagName.toLowerCase()==="input"}function AY(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function kY(e,t){return e.button===0&&(!t||t==="_self")&&!AY(e)}function IC(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(i=>[r,i]):[[r,n]])},[]))}function SY(e,t){let r=IC(e);return t&&t.forEach((n,i)=>{r.has(i)||t.getAll(i).forEach(a=>{r.append(i,a)})}),r}var op=null;function BY(){if(op===null)try{new FormData(document.createElement("form"),0),op=!1}catch{op=!0}return op}var DY=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Rb(e){return e!=null&&!DY.has(e)?(ji(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Kp}"`),null):e}function FY(e,t){let r,n,i,a,o;if(jY(e)){let l=e.getAttribute("action");n=l?ho(l,t):null,r=e.getAttribute("method")||Gp,i=Rb(e.getAttribute("enctype"))||Kp,a=new FormData(e)}else if(EY(e)||NY(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=e.getAttribute("formaction")||l.getAttribute("action");if(n=c?ho(c,t):null,r=e.getAttribute("formmethod")||l.getAttribute("method")||Gp,i=Rb(e.getAttribute("formenctype"))||Rb(l.getAttribute("enctype"))||Kp,a=new FormData(l,e),!BY()){let{name:u,type:f,value:x}=e;if(f==="image"){let m=u?`${u}.`:"";a.append(`${m}x`,"0"),a.append(`${m}y`,"0")}else u&&a.append(u,x)}}else{if(J1(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Gp,n=null,i=Kp,o=e}return a&&i==="text/plain"&&(o=a,a=void 0),{action:n,method:r.toLowerCase(),encType:i,formData:a,body:o}}function R4(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function PY(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function TY(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function MY(e,t,r){let n=await Promise.all(e.map(async i=>{let a=t.routes[i.route.id];if(a){let o=await PY(a,r);return o.links?o.links():[]}return[]}));return _Y(n.flat(1).filter(TY).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function yA(e,t,r,n,i,a){let o=(c,u)=>r[u]?c.route.id!==r[u].route.id:!0,l=(c,u)=>{var f;return r[u].pathname!==c.pathname||((f=r[u].route.path)==null?void 0:f.endsWith("*"))&&r[u].params["*"]!==c.params["*"]};return a==="assets"?t.filter((c,u)=>o(c,u)||l(c,u)):a==="data"?t.filter((c,u)=>{var x;let f=n.routes[c.route.id];if(!f||!f.hasLoader)return!1;if(o(c,u)||l(c,u))return!0;if(c.route.shouldRevalidate){let m=c.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((x=r[0])==null?void 0:x.params)||{},nextUrl:new URL(e,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof m=="boolean")return m}return!0}):[]}function OY(e,t,{includeHydrateFallback:r}={}){return LY(e.map(n=>{let i=t.routes[n.route.id];if(!i)return[];let a=[i.module];return i.clientActionModule&&(a=a.concat(i.clientActionModule)),i.clientLoaderModule&&(a=a.concat(i.clientLoaderModule)),r&&i.hydrateFallbackModule&&(a=a.concat(i.hydrateFallbackModule)),i.imports&&(a=a.concat(i.imports)),a}).flat(1))}function LY(e){return[...new Set(e)]}function RY(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function _Y(e,t){let r=new Set;return new Set(t),e.reduce((n,i)=>{let a=JSON.stringify(RY(i));return r.has(a)||(r.add(a),n.push({key:a,link:i})),n},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var IY=new Set([100,101,204,205]);function $Y(e,t){let r=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r.pathname==="/"?r.pathname="_root.data":t&&ho(r.pathname,t)==="/"?r.pathname=`${t.replace(/\/$/,"")}/_root.data`:r.pathname=`${r.pathname.replace(/\/$/,"")}.data`,r}function j_(){let e=C.useContext(s0);return R4(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function zY(){let e=C.useContext(Z1);return R4(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var _4=C.createContext(void 0);_4.displayName="FrameworkContext";function N_(){let e=C.useContext(_4);return R4(e,"You must render this element inside a <HydratedRouter> element"),e}function VY(e,t){let r=C.useContext(_4),[n,i]=C.useState(!1),[a,o]=C.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:u,onMouseLeave:f,onTouchStart:x}=t,m=C.useRef(null);C.useEffect(()=>{if(e==="render"&&o(!0),e==="viewport"){let v=E=>
42{E.forEach(N=>{o(N.isIntersecting)})},b=new IntersectionObserver(v,{threshold:.5});return m.current&&b.observe(m.current),()=>{b.disconnect()}}},[e]),C.useEffect(()=>{if(n){let v=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(v)}}},[n]);let p=()=>{i(!0)},y=()=>{i(!1),o(!1)};return r?e!=="intent"?[a,m,{}]:[a,m,{onFocus:dx(l,p),onBlur:dx(c,y),onMouseEnter:dx(u,p),onMouseLeave:dx(f,y),onTouchStart:dx(x,p)}]:[!1,m,{}]}function dx(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function UY({page:e,...t}){let{router:r}=j_(),n=C.useMemo(()=>m_(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?C.createElement(WY,{page:e,matches:n,...t}):null}function qY(e){let{manifest:t,routeModules:r}=N_(),[n,i]=C.useState([]);return C.useEffect(()=>{let a=!1;return MY(e,t,r).then(o=>{a||i(o)}),()=>{a=!0}},[e,t,r]),n}function WY({page:e,matches:t,...r}){let n=Cr(),{manifest:i,routeModules:a}=N_(),{basename:o}=j_(),{loaderData:l,matches:c}=zY(),u=C.useMemo(()=>yA(e,t,c,i,n,"data"),[e,t,c,i,n]),f=C.useMemo(()=>yA(e,t,c,i,n,"assets"),[e,t,c,i,n]),x=C.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let y=new Set,v=!1;if(t.forEach(E=>{var j;let N=i.routes[E.route.id];!N||!N.hasLoader||(!u.some(A=>A.route.id===E.route.id)&&E.route.id in l&&((j=a[E.route.id])!=null&&j.shouldRevalidate)||N.hasClientLoader?v=!0:y.add(E.route.id))}),y.size===0)return[];let b=$Y(e,o);return v&&y.size>0&&b.searchParams.set("_routes",t.filter(E=>y.has(E.route.id)).map(E=>E.route.id).join(",")),[b.pathname+b.search]},[o,l,n,i,u,t,e,a]),m=C.useMemo(()=>OY(f,i),[f,i]),p=qY(f);return C.createElement(C.Fragment,null,x.map(y=>C.createElement("link",{key:y,rel:"prefetch",as:"fetch",href:y,...r})),m.map(y=>C.createElement("link",{key:y,rel:"modulepreload",href:y,...r})),p.map(({key:y,link:v})=>C.createElement("link",{key:y,...v})))}function HY(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var A_=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{A_&&(window.__reactRouterVersion="7.6.0")}catch{}function GY({basename:e,children:t,window:r}){let n=C.useRef();n.current==null&&(n.current=FX({window:r,v5Compat:!0}));let i=n.current,[a,o]=C.useState({action:i.action,location:i.location}),l=C.useCallback(c=>{C.startTransition(()=>o(c))},[o]);return C.useLayoutEffect(()=>i.listen(l),[i,l]),C.createElement(CY,{basename:e,children:t,location:a.location,navigationType:a.action,navigator:i})}var k_=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,bn=C.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:i,reloadDocument:a,replace:o,state:l,target:c,to:u,preventScrollReset:f,viewTransition:x,...m},p){let{basename:y}=C.useContext(ea),v=typeof u=="string"&&k_.test(u),b,E=!1;if(typeof u=="string"&&v&&(b=u,A_))try{let P=new URL(window.location.href),O=u.startsWith("//")?new URL(P.protocol+u):new URL(u),M=ho(O.pathname,y);O.origin===P.origin&&M!=null?u=M+O.search+O.hash:E=!0}catch{ji(!1,`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let N=sY(u,{relative:i}),[j,A,w]=VY(n,m),S=QY(u,{replace:o,state:l,target:c,preventScrollReset:f,relative:i,viewTransition:x});function B(P){t&&t(P),P.defaultPrevented||S(P)}let D=C.createElement("a",{...m,...w,href:b||N,onClick:E||a?t:B,ref:HY(p,A),target:c,"data-discover":!v&&r==="render"?"true":void 0});return j&&!v?C.createElement(C.Fragment,null,D,C.createElement(UY,{page:N})):D});bn.displayName="Link";var KY=C.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:i=!1,style:a,to:o,viewTransition:l,children:c,...u},f){let x=kh(o,{relative:u.relative}),m=Cr(),p=C.useContext(Z1),{navigator:y,basename:v}=C.useContext(ea),b=p!=null&&rQ(x)&&l===!0,E=y.encodeLocation?y.encodeLocation(x).pathname:x.pathname,N=m.pathname,j=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;r||(N=N.toLowerCase(),j=j?j.toLowerCase():null,E=E.toLowerCase()),j&&v&&(j=ho(j,v)||j);const A=E!=="/"&&E.endsWith("/")?E.length-1:E.length;let w=N===E||!i&&N.startsWith(E)&&N.charAt(A)==="/",S=j!=null&&(j===E||!i&&j.startsWith(E)&&j.charAt(E.length)==="/"),B={isActive:w,isPending:S,isTransitioning:b},D=w?t:void 0,P;typeof n=="function"?P=n(B):P=[n,w?"active":null,S?"pending":null,b?"transitioning":null].filter(
42Boolean).join(" ");let O=typeof a=="function"?a(B):a;return C.createElement(bn,{...u,"aria-current":D,className:P,ref:f,style:O,to:o,viewTransition:l},typeof c=="function"?c(B):c)});KY.displayName="NavLink";var XY=C.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:i,state:a,method:o=Gp,action:l,onSubmit:c,relative:u,preventScrollReset:f,viewTransition:x,...m},p)=>{let y=eQ(),v=tQ(l,{relative:u}),b=o.toLowerCase()==="get"?"get":"post",E=typeof l=="string"&&k_.test(l),N=j=>{if(c&&c(j),j.defaultPrevented)return;j.preventDefault();let A=j.nativeEvent.submitter,w=(A==null?void 0:A.getAttribute("formmethod"))||o;y(A||j.currentTarget,{fetcherKey:t,method:w,navigate:r,replace:i,state:a,relative:u,preventScrollReset:f,viewTransition:x})};return C.createElement("form",{ref:p,method:b,action:v,onSubmit:n?c:N,...m,"data-discover":!E&&e==="render"?"true":void 0})});XY.displayName="Form";function YY(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function S_(e){let t=C.useContext(s0);return $r(t,YY(e)),t}function QY(e,{target:t,replace:r,state:n,preventScrollReset:i,relative:a,viewTransition:o}={}){let l=lt(),c=Cr(),u=kh(e,{relative:a});return C.useCallback(f=>{if(kY(f,t)){f.preventDefault();let x=r!==void 0?r:ff(c)===ff(u);l(e,{replace:x,state:n,preventScrollReset:i,relative:a,viewTransition:o})}},[c,l,u,r,n,t,e,i,a,o])}function I4(e){ji(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=C.useRef(IC(e)),r=C.useRef(!1),n=Cr(),i=C.useMemo(()=>SY(n.search,r.current?null:t.current),[n.search]),a=lt(),o=C.useCallback((l,c)=>{const u=IC(typeof l=="function"?l(i):l);r.current=!0,a("?"+u,c)},[a,i]);return[i,o]}var ZY=0,JY=()=>`__${String(++ZY)}__`;function eQ(){let{router:e}=S_("useSubmit"),{basename:t}=C.useContext(ea),r=gY();return C.useCallback(async(n,i={})=>{let{action:a,method:o,encType:l,formData:c,body:u}=FY(n,t);if(i.navigate===!1){let f=i.fetcherKey||JY();await e.fetch(f,r,i.action||a,{preventScrollReset:i.preventScrollReset,formData:c,body:u,formMethod:i.method||o,formEncType:i.encType||l,flushSync:i.flushSync})}else await e.navigate(i.action||a,{preventScrollReset:i.preventScrollReset,formData:c,body:u,formMethod:i.method||o,formEncType:i.encType||l,replace:i.replace,state:i.state,fromRouteId:r,flushSync:i.flushSync,viewTransition:i.viewTransition})},[e,t,r])}function tQ(e,{relative:t}={}){let{basename:r}=C.useContext(ea),n=C.useContext(Ai);$r(n,"useFormAction must be used inside a RouteContext");let[i]=n.matches.slice(-1),a={...kh(e||".",{relative:t})},o=Cr();if(e==null){a.search=o.search;let l=new URLSearchParams(a.search),c=l.getAll("index");if(c.some(f=>f==="")){l.delete("index"),c.filter(x=>x).forEach(x=>l.append("index",x));let f=l.toString();a.search=f?`?${f}`:""}}return(!e||e===".")&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(
42a.pathname=a.pathname==="/"?r:lo([r,a.pathname])),ff(a)}function rQ(e,t={}){let r=C.useContext(v_);$r(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=S_("useViewTransitionState"),i=kh(e,{relative:t.relative});if(!r.isTransitioning)return!1;let a=ho(r.currentLocation.pathname,n)||r.currentLocation.pathname,o=ho(r.nextLocation.pathname,n)||r.nextLocation.pathname;return yg(i.pathname,o)!=null||yg(i.pathname,a)!=null}[...IY];var Ux=h_();const Xp=lr(Ux),$4=C.createContext({});function El(e){const t=C.useRef(null);return t.current===null&&(t.current=e()),t.current}const z4=typeof window<"u",ey=z4?C.useLayoutEffect:C.useEffect,ty=C.createContext(null),_c=C.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class nQ extends C.Component{getSnapshotBeforeUpdate(t){const r=this.props.childRef.current;if(r&&t.isPresent&&!this.props.isPresent){const n=r.offsetParent,i=n instanceof HTMLElement&&n.offsetWidth||0,a=this.props.sizeRef.current;a.height=r.offsetHeight||0,a.width=r.offsetWidth||0,a.top=r.offsetTop,a.left=r.offsetLeft,a.right=i-a.width-a.left}return null}componentDidUpdate(){}render(){return this.props.children}}function sQ({children:e,isPresent:t,anchorX:r}){const n=C.useId(),i=C.useRef(null),a=C.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:o}=C.useContext(_c);return C.useInsertionEffect(()=>{const{width:l,height:c,top:u,left:f,right:x}=a.current;if(t||!i.current||!l||!c)return;const m=r==="left"?`left: ${f}`:`right: ${x}`;i.current.dataset.motionPopId=n;const p=document.createElement("style");return o&&(p.nonce=o),document.head.appendChild(p),p.sheet&&p.sheet.insertRule(`
43          [data-motion-pop-id="${n}"] {
44            position: absolute !important;
45            width: ${l}px !important;
46            height: ${c}px !important;
47            ${m}px !important;
48            top: ${u}px !important;
49          }
50        `),()=>{document.head.contains(p)&&document.head.removeChild(p)}},[t]),s.jsx(nQ,{isPresent:t,childRef:i,sizeRef:a,children:C.cloneElement(e,{ref:i})})}const iQ=({children:e,initial:t,isPresent:r,onExitComplete:n,custom:i,presenceAffectsLayout:a,mode:o,anchorX:l})=>{const c=El(aQ),u=C.useId();let f=!0,x=C.useMemo(()=>(f=!1,{id:u,initial:t,isPresent:r,custom:i,onExitComplete:m=>{c.set(m,!0);for(const p of c.values())if(!p)return;n&&n()},register:m=>(c.set(m,!1),()=>c.delete(m))}),[r,c,n]);return a&&f&&(x={...x}),C.useMemo(()=>{c.forEach((m,p)=>c.set(p,!1))},[r]),C.useEffect(()=>{!r&&!c.size&&n&&n()},[r]),o==="popLayout"&&(e=s.jsx(sQ,{isPresent:r,anchorX:l,children:e})),s.jsx(ty.Provider,{value:x,children:e})};function aQ(){return new Map}function B_(e=!0){const t=C.useContext(ty);if(t===null)return[!0,null];const{isPresent:r,onExitComplete:n,register:i}=t,a=C.useId();C.useEffect(()=>{if(e)return i(a)},[e]);const o=C.useCallback(()=>e&&n&&n(a),[a,n,e]);return!r&&n?[!1,o]:[!0]}const lp=e=>e.key||"";function vA(e){const t=[];return C.Children.forEach(e,r=>{C.isValidElement(r)&&t.push(r)}),t}const It=({children:e,custom:t,initial:r=!0,onExitComplete:n,presenceAffectsLayout:i=!0,mode:a="sync",propagate:o=!1,anchorX:l="left"})=>{const[c,u]=B_(o),f=C.useMemo(()=>vA(e),[e]),x=o&&!c?[]:f.map(lp),m=C.useRef(!0),p=C.useRef(f),y=El(()=>new Map),[v,b]=C.useState(f),[E,N]=C.useState(f);ey(()=>{m.current=!1,p.current=f;for(let w=0;w<E.length;w++){const S=lp(E[w]);x.includes(S)?y.delete(S):y.get(S)!==!0&&y.set(S,!1)}},[E,x.length,x.join("-")]);const j=[];if(f!==v){let w=[...f];for(let S=0;S<E.length;S++){const B=E[S],D=lp(B);x.includes(D)||(w.splice(S,0,B),j.push(B))}return a==="wait"&&j.length&&(w=j),N(vA(w)),b(f),null}const{forceRender:A}=C.useContext($4);return s.jsx(s.Fragment,{children:E.map(w=>{const S=lp(w),B=o&&!c?!1:f===E||x.includes(S),D=()=>{if(y.has(S))y.set(S,!0);else return;let P=!0;y.forEach(O=>{O||(P=!1)}),P&&(A==null||A(),N(p.current),o&&(u==null||u()),n&&n())};return s.jsx(iQ,{isPresent:B,initial:!m.current||r?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,onExitComplete:B?void 0:D,anchorX:l,children:w},S)})})},cp=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function oQ(e,t){let r=new Set,n=new Set,i=!1,a=!1;const o=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1};
vendor: 26,465 bytes, line 50
50function c(f){o.has(f)&&(u.schedule(f),e()),f(l)}const u={schedule:(f,x=!1,m=!1)=>{const y=m&&i?r:n;return x&&o.add(f),y.has(f)||y.add(f),f},cancel:f=>{n.delete(f),o.delete(f)},process:f=>{if(l=f,i){a=!0;return}i=!0,[r,n]=[n,r],r.forEach(c),r.clear(),i=!1,a&&(a=!1,u.process(f))}};return u}const mo={},lQ=40;function D_(e,t){let r=!1,n=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>r=!0,o=cp.reduce((j,A)=>(j[A]=oQ(a),j),{}),{setup:l,read:c,resolveKeyframes:u,preUpdate:f,update:x,preRender:m,render:p,postRender:y}=o,v=()=>{const j=mo.useManualTiming?i.timestamp:performance.now();r=!1,mo.useManualTiming||(i.delta=n?1e3/60:Math.max(Math.min(j-i.timestamp,lQ),1)),i.timestamp=j,i.isProcessing=!0,l.process(i),c.process(i),u.process(i),f.process(i),x.process(i),m.process(i),p.process(i),y.process(i),i.isProcessing=!1,r&&t&&(n=!1,e(v))},b=()=>{r=!0,n=!0,i.isProcessing||e(v)};return{schedule:cp.reduce((j,A)=>{const w=o[A];return j[A]=(S,B=!1,D=!1)=>(r||b(),w.schedule(S,B,D)),j},{}),cancel:j=>{for(let A=0;A<cp.length;A++)o[cp[A]].cancel(j)},state:i,steps:o}}const Ys=e=>e,{schedule:Pr,cancel:po,state:Vn,steps:_b}=D_(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ys,!0),F_=C.createContext({strict:!1}),bA={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"]},Nd={};for(const e in bA)Nd[e]={isEnabled:t=>bA[e].some(r=>!!t[r])};function cQ(e){for(const t in e)Nd[t]={...Nd[t],...e[t]}}const uQ=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 vg(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||uQ.has(e)}let P_=e=>!vg(e);function T_(e){e&&(P_=t=>t.startsWith("on")?!vg(t):e(t))}try{T_(require("@emotion/is-prop-valid").default)}catch{}function dQ(e,t,r){const n={};for(const i in e)i==="values"&&typeof e.values=="object"||(P_(i)||r===!0&&vg(i)||!t&&!vg(i)||e.draggable&&i.startsWith("onDrag"))&&(n[i]=e[i]);return n}function xQ({children:e,isValidProp:t,...r}){t&&T_(t),r={...C.useContext(_c),...r},r.isStatic=El(()=>r.isStatic);const n=C.useMemo(()=>r,[JSON.stringify(r.transition),r.transformPagePoint,r.reducedMotion]);return s.jsx(_c.Provider,{value:n,children:e})}function fQ(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 ry=C.createContext({});function ny(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function hf(e){return typeof e=="string"||Array.isArray(e)}const V4=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],U4=["initial",...V4];function sy(e){return ny(e.animate)||U4.some(t=>hf(e[t]))}function M_(e){return!!(sy(e)||e.variants)}function hQ(e,t){if(sy(e)){const{initial:r,animate:n}=e;return{initial:r===!1||hf(r)?r:void 0,animate:hf(n)?n:void 0}}return e.inherit!==!1?t:{}}function mQ(e){const{initial:t,animate:r}=hQ(e,C.useContext(ry));return C.useMemo(()=>({initial:t,animate:r}),[CA(t),CA(r)])}function CA(e){return Array.isArray(e)?e.join(" "):e}const pQ=Symbol.for("motionComponentSymbol");function Wu(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function gQ(e,t,r){return C.useCallback(n=>{n&&e.onMount&&e.onMount(n),t&&(n?t.mount(n):t.unmount()),r&&(typeof r=="function"?r(n):Wu(r)&&(r.current=n))},[t])}const q4=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),yQ="framerAppearId",O_="data-"+q4(yQ),L_=C.createContext({}),{schedule:W4}=D_(queueMicrotask,!1);function vQ(e,t,r,n,i){var v,b;const{visualElement:a}=C.useContext(ry),o=C.useContext(F_),l=C.useContext(ty),c=C.useContext(_c).reducedMotion,u=C.useRef(null);n=n||o.renderer,!u.current&&n&&(u.current=n(e,{visualState:t,parent:a,props:r,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c}));const f=u.current,x=C.useContext(L_);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&bQ(u.current,r,i,x);const m=C.useRef(!1);C.useInsertionEffect(()=>{f&&m.current&&f.update(r,l)});const p=r[O_],y=C.useRef(!!p&&!((v=window.MotionHandoffIsComplete)!=null&&v.call(window,p))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,p)));return ey(()=>{f&&(m.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),W4.render(f.render),y.current&&f.animationState&&f.animationState.animateChanges())}),C.useEffect(()=>{f&&(!y.current&&f.animationState&&f.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var E;(E=window.MotionHandoffMarkAsComplete)==null||E.call(window,p)}),y.current=!1))}),f}function bQ(e,t,r,n){const{layoutId:i,layout:a,drag:o,dragConstraints:l,layoutScroll:c,layoutRoot:u,layoutCrossfade:f}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:R_(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||l&&Wu(l),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:n,crossfade:f,layoutScroll:c,layoutRoot:u})}function R_(e){if(e)return e.options.allowProjection!==!1?e.projection:R_(e.parent)}let H4=()=>{};function CQ({preloadedFeatures:e,createVisualElement:t,useRender:r,useVisualState:n,Component:i}){e&&cQ(e);function a(l,c){let u;const f={...C.useContext(_c),...l,layoutId:wQ(l)},{isStatic:x}=f,m=mQ(l),p=n(l,x);if(!x&&z4){EQ();const y=jQ(f);u=y.MeasureLayout,m.visualElement=vQ(i,p,f,t,y.ProjectionNode)}return s.jsxs(ry.Provider,{value:m,children:[u&&m.visualElement?s.jsx(u,{visualElement:m.visualElement,...f}):null,r(i,l,gQ(p,m.visualElement,c),p,x,m.visualElement)]})}a.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;const o=C.forwardRef(a);return o[pQ]=i,o}function wQ({layoutId:e}){const t=C.useContext($4).id;return t&&e!==void 0?t+"-"+e:e}function EQ(e,t){C.useContext(F_).strict}function jQ(e){const{drag:t,layout:r}=Nd;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 __=e=>t=>typeof t=="string"&&t.startsWith(e),G4=__("--"),NQ=__("var(--"),K4=e=>NQ(e)?AQ.test(e.split("/*")[0].trim()):!1,AQ=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,mf={};function kQ(e){for(const t in e)mf[t]=e[t],G4(t)&&(mf[t].isCSSVariable=!0)}const a0=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],o0=new Set(a0);function I_(e,{layout:t,layoutId:r}){return o0.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!mf[e]||e==="opacity")}const un=e=>!!(e&&e.getVelocity),$_=(e,t)=>t&&typeof e=="number"?t.transform(e):e,go=(e,t,r)=>r>t?t:r<e?e:r,l0={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},pf={...l0,transform:e=>go(0,1,e)},up={...l0,default:1},wA={...l0,transform:Math.round},Sh=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Jo=Sh("deg"),Aa=Sh("%"),kt=Sh("px"),SQ=Sh("vh"),BQ=Sh("vw"),EA={...Aa,parse:e=>Aa.parse(e)/100,transform:e=>Aa.transform(e*100)},DQ={rotate:Jo,rotateX:Jo,rotateY:Jo,rotateZ:Jo,scale:up,scaleX:up,scaleY:up,scaleZ:up,skew:Jo,skewX:Jo,skewY:Jo,distance:kt,translateX:kt,translateY:kt,translateZ:kt,x:kt,y:kt,z:kt,perspective:kt,transformPerspective:kt,opacity:pf,originX:EA,originY:EA,originZ:kt},X4={borderWidth:kt,borderTopWidth:kt,borderRightWidth:kt,borderBottomWidth:kt,borderLeftWidth:kt,borderRadius:kt,radius:kt,borderTopLeftRadius:kt,borderTopRightRadius:kt,borderBottomRightRadius:kt,borderBottomLeftRadius:kt,width:kt,maxWidth:kt,height:kt,maxHeight:kt,top:kt,right:kt,bottom:kt,left:kt,padding:kt,paddingTop:kt,paddingRight:kt,paddingBottom:kt,paddingLeft:kt,margin:kt,marginTop:kt,marginRight:kt,marginBottom:kt,marginLeft:kt,backgroundPositionX:kt,backgroundPositionY:kt,...DQ,zIndex:wA,fillOpacity:pf,strokeOpacity:pf,numOctaves:wA},FQ={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},PQ=a0.length;function TQ(e,t,r){let n="",i=!0;for(let a=0;a<PQ;a++){const o=a0[a],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 u=$_(l,X4[o]);if(!c){i=!1;const f=FQ[o]||o;n+=`${f}(${u}) `}r&&(t[o]=u)}}return n=n.trim(),r?n=r(t,i?"":n):i&&(n="none"),n}function Y4(e,t,r){const{style:n,vars:i,transformOrigin:a}=e;let o=!1,l=!1;for(const c in t){const u=t[c];if(o0.has(c)){o=!0;continue}else if(G4(c)){i[c]=u;continue}else{const f=$_(u,X4[c]);c.startsWith("origin")?(l=!0,a[c]=f):n[c]=f}}if(t.transform||(o||r?n.transform=TQ(t,e.transform,r):n.transform&&(n.transform="none")),l){const{originX:c="50%",originY:u="50%",originZ:f=0}=a;n.transformOrigin=`${c} ${u} ${f}`}}const Q4=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function z_(e,t,r){for(const n in t)!un(t[n])&&!I_(n,r)&&(e[n]=t[n])}function MQ({transformTemplate:e},t){return C.useMemo(()=>{const r=Q4();return Y4(r,t,e),Object.assign({},r.vars,r.style)},[t])}function OQ(e,t){const r=e.style||{},n={};return z_(n,r,e),Object.assign(n,MQ(e,t)),n}function LQ(e,t){const r={},n=OQ(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}const RQ=["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 Z4(e){return typeof e!="string"||e.includes("-")?!1:!!(RQ.indexOf(e)>-1||/[A-Z]/u.test(e))}const _Q={offset:"stroke-dashoffset",array:"stroke-dasharray"},IQ={offset:"strokeDashoffset",array:"strokeDasharray"};function $Q(e,t,r=1,n=0,i=!0){e.pathLength=1;const a=i?_Q:IQ;e[a.offset]=kt.transform(-n);const o=kt.transform(t),l=kt.transform(r);e[a.array]=`${o} ${l}`}function V_(e,{attrX:t,attrY:r,attrScale:n,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...l},c,u,f){if(Y4(e,l,u),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:x,style:m}=e;x.transform&&(m.transform=x.transform,delete x.transform),(m.transform||x.transformOrigin)&&(m.transformOrigin=x.transformOrigin??"50% 50%",delete x.transformOrigin),m.transform&&(m.transformBox=(f==null?void 0:f.transformBox)??"fill-box",delete x.transformBox),t!==void 0&&(x.x=t),r!==void 0&&(x.y=r),n!==void 0&&(x.scale=n),i!==void 0&&$Q(x,i,a,o,!1)}const U_=()=>({...Q4(),attrs:{}}),q_=e=>typeof e=="string"&&e.toLowerCase()==="svg";function zQ(e,t,r,n){const i=C.useMemo(()=>{const a=U_();return V_(a,t,q_(n),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};z_(a,e.style,e),i.style={...a,...i.style}}return i}function VQ(e=!1){return(r,n,i,{latestValues:a},o)=>{const c=(Z4(r)?zQ:LQ)(n,a,o,r),u=dQ(n,typeof r=="string",e),f=r!==C.Fragment?{...u,...c,ref:i}:{},{children:x}=n,m=C.useMemo(()=>un(x)?x.get():x,[x]);return C.createElement(r,{...f,children:m})}}function jA(e){const t=[{},{}];return e==null||e.values.forEach((r,n)=>{t[0][n]=r.get(),t[1][n]=r.getVelocity()}),t}function J4(e,t,r,n){if(typeof t=="function"){const[i,a]=jA(n);t=t(r!==void 0?r:e.custom,i,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,a]=jA(n);t=t(r!==void 0?r:e.custom,i,a)}return t}function Yp(e){return un(e)?e.get():e}function UQ({scrapeMotionValuesFromProps:e,createRenderState:t},r,n,i){return{latestValues:qQ(r,n,i,e),renderState:t()}}const W_=e=>(t,r)=>{const n=C.useContext(ry),i=C.useContext(ty),a=()=>UQ(e,t,n,i);return r?a():El(a)};function qQ(e,t,r,n){const i={},a=n(e,{});for(const m in a)i[m]=Yp(a[m]);let{initial:o,animate:l}=e;const c=sy(e),u=M_(e);t&&u&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),l===void 0&&(l=t.animate));let f=r?r.initial===!1:!1;f=f||o===!1;const x=f?l:o;if(x&&typeof x!="boolean"&&!ny(x)){const m=Array.isArray(x)?x:[x];for(let p=0;p<m.length;p++){const y=J4(e,m[p]);if(y){const{transitionEnd:v,transition:b,...E}=y;for(const N in E){let j=E[N];if(Array.isArray(j)){const A=f?j.length-1:0;j=j[A]}j!==null&&(i[N]=j)}for(const N in v)i[N]=v[N]}}}return i}function e3(e,t,r){var a;const{style:n}=e,i={};for(const o in n)(un(n[o])||t.style&&un(t.style[o])||I_(o,e)||((a=r==null?void 0:r.getValue(o))==null?void 0:a.liveStyle)!==void 0)&&(i[o]=n[o]);return i}const WQ={useVisualState:W_({scrapeMotionValuesFromProps:e3,createRenderState:Q4})};function H_(e,t,r){const n=e3(e,t,r);for(const i in e)if(un(e[i])||un(t[i])){const a=a0.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;n[a]=e[i]}return n}const HQ={useVisualState:W_({scrapeMotionValuesFromProps:H_,createRenderState:U_})};function GQ(e,t){return function(n,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...Z4(n)?HQ:WQ,preloadedFeatures:e,useRender:VQ(i),createVisualElement:t,Component:n};return CQ(o)}}function gf(e,t,r){const n=e.getProps();return J4(n,t,r!==void 0?r:n.custom,e)}const $C=e=>Array.isArray(e);let Qp;function KQ(){Qp=void 0}const Ls={now:()=>(Qp===void 0&&Ls.set(Vn.isProcessing||mo.useManualTiming?Vn.timestamp:performance.now()),Qp),set:e=>{Qp=e,queueMicrotask(KQ)}};function t3(e,t){e.indexOf(t)===-1&&e.push(t)}function iy(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}let r3=class{constructor(){this.subscriptions=[]}add(t){return t3(this.subscriptions,t),()=>iy(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 a=0;a<i;a++){const o=this.subscriptions[a];o&&o(t,r,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};function G_(e,t){return t?e*(1e3/t):0}const NA=30,XQ=e=>!isNaN(parseFloat(e)),qx={current:void 0};let YQ=class{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(n,i=!0)=>{var o,l;const a=Ls.now();if(this.updatedAt!==a&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const c of this.dependents)c.dirty();i&&((l=this.events.renderRequest)==null||l.notify(this.current))},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=Ls.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=XQ(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 r3);const n=this.events[t].add(r);return t==="change"?()=>{n(),Pr.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()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return qx.current&&qx.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Ls.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>NA)return 0;const r=Math.min(this.updatedAt-this.prevUpdatedAt,NA);return G_(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(){var t,r;(t=this.dependents)==null||t.clear(),(r=this.events.destroy)==null||r.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Ic(e,t){return new YQ(e,t)}function QQ(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,Ic(r))}function ZQ(e){return $C(e)?e[e.length-1]||0:e}function JQ(e,t){const r=gf(e,t);let{transitionEnd:n={},transition:i={},...a}=r||{};a={...a,...n};for(const o in a){const l=ZQ(a[o]);QQ(e,o,l)}}function eZ(e){return!!(un(e)&&e.add)}function zC(e,t){const r=e.getValue("willChange");if(eZ(r))return r.add(t);if(!r&&mo.WillChange){const n=new mo.WillChange("auto");e.addValue("willChange",n),n.add(t)}}function K_(e){return e.props[O_]}const tZ=e=>e!==null;function rZ(e,{repeat:t,repeatType:r="loop"},n){const i=e.filter(tZ),a=t&&r!=="loop"&&t%2===1?0:i.length-1;return i[a]}const nZ={type:"spring",stiffness:500,damping:25,restSpeed:10},sZ=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),iZ={type:"keyframes",duration:.8},aZ={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},oZ=(e,{keyframes:t})=>t.length>2?iZ:o0.has(e)?e.startsWith("scale")?sZ(t[1]):nZ:aZ;function lZ({when:e,delay:t,delayChildren:r,staggerChildren:n,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:l,from:c,elapsed:u,...f}){return!!Object.keys(f).length}function n3(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const Yi=e=>e*1e3,ka=e=>e/1e3,Wx=e=>Math.round(e*1e5)/1e5,s3=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function cZ(e){return e==null}const uZ=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,i3=(e,t)=>r=>!!(typeof r=="string"&&uZ.test(r)&&r.startsWith(e)||t&&!cZ(r)&&Object.prototype.hasOwnProperty.call(r,t)),X_=(e,t,r)=>n=>{if(typeof n!="string")return n;const[i,a,o,l]=n.match(s3);return{[e]:parseFloat(i),[t]:parseFloat(a),[r]:parseFloat(o),alpha:l!==void 0?parseFloat(l):1}},dZ=e=>go(0,255,e),Ib={...l0,transform:e=>Math.round(dZ(e))},dc={test:i3("rgb","red"),parse:X_("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+Ib.transform(e)+", "+Ib.transform(t)+", "+Ib.transform(r)+", "+Wx(pf.transform(n))+")"};function xZ(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 VC={test:i3("#"),parse:xZ,transform:dc.transform},Hu={test:i3("hsl","hue"),parse:X_("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+Aa.transform(Wx(t))+", "+Aa.transform(Wx(r))+", "+Wx(pf.transform(n))+")"},Zn={test:e=>dc.test(e)||VC.test(e)||Hu.test(e),parse:e=>dc.test(e)?dc.parse(e):Hu.test(e)?Hu.parse(e):VC.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?dc.transform(e):Hu.transform(e)},fZ=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function hZ(e){var t,r;return isNaN(e)&&typeof e=="string"&&(((t=e.match(s3))==null?void 0:t.length)||0)+(((r=e.match(fZ))==null?void 0:r.length)||0)>0}const Y_="number",Q_="color",mZ="var",pZ="var(",AA="${}",gZ=/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 yf(e){const t=e.toString(),r=[],n={color:[],number:[],var:[]},i=[];let a=0;const l=t.replace(gZ,c=>(Zn.test(c)?(n.color.push(a),i.push(Q_),r.push(Zn.parse(c))):c.startsWith(pZ)?(n.var.push(a),i.push(mZ),r.push(c)):(n.number.push(a),i.push(Y_),r.push(parseFloat(c))),++a,AA)).split(AA);return{values:r,split:l,indexes:n,types:i}}function Z_(e){return yf(e).values}function J_(e){const{split:t,types:r}=yf(e),n=t.length;return i=>{let a="";for(let o=0;o<n;o++)if(a+=t[o],i[o]!==void 0){const l=r[o];l===Y_?a+=Wx(i[o]):l===Q_?a+=Zn.transform(i[o]):a+=i[o]}return a}}const yZ=e=>typeof e=="number"?0:e;function vZ(e){const t=Z_(e);return J_(e)(t.map(yZ))}const jl={test:hZ,parse:Z_,createTransformer:J_,getAnimatableNone:vZ};function $b(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 bZ({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let i=0,a=0,o=0;if(!t)i=a=o=r;else{const l=r<.5?r*(1+t):r+t-r*t,c=2*r-l;i=$b(c,l,e+1/3),a=$b(c,l,e),o=$b(c,l,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:n}}function bg(e,t){return r=>r>0?t:e}const _r=(e,t,r)=>e+(t-e)*r,zb=(e,t,r)=>{const n=e*e,i=r*(t*t-n)+n;return i<0?0:Math.sqrt(i)},CZ=[VC,dc,Hu],wZ=e=>CZ.find(t=>t.test(e));function kA(e){const t=wZ(e);if(!t)return!1;let r=t.parse(e);return t===Hu&&(r=bZ(r)),r}const SA=(e,t)=>{const r=kA(e),n=kA(t);if(!r||!n)return bg(e,t);const i={...r};return a=>(i.red=zb(r.red,n.red,a),i.green=zb(r.green,n.green,a),i.blue=zb(r.blue,n.blue,a),i.alpha=_r(r.alpha,n.alpha,a),dc.transform(i))},UC=new Set(["none","hidden"]);function EZ(e,t){return UC.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}const jZ=(e,t)=>r=>t(e(r)),Bh=(...e)=>e.reduce(jZ);function NZ(e,t){return r=>_r(e,t,r)}function a3(e){return typeof e=="number"?NZ:typeof e=="string"?K4(e)?bg:Zn.test(e)?SA:SZ:Array.isArray(e)?eI:typeof e=="object"?Zn.test(e)?SA:AZ:bg}function eI(e,t){const r=[...e],n=r.length,i=e.map((a,o)=>a3(a)(a,t[o]));return a=>{for(let o=0;o<n;o++)r[o]=i[o](a);return r}}function AZ(e,t){const r={...e,...t},n={};for(const i in r)e[i]!==void 0&&t[i]!==void 0&&(n[i]=a3(e[i])(e[i],t[i]));return i=>{for(const a in n)r[a]=n[a](i);return r}}function kZ(e,t){const r=[],n={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],o=e.indexes[a][n[a]],l=e.values[o]??0;r[i]=l,n[a]++}return r}const SZ=(e,t)=>{const r=jl.createTransformer(t),n=yf(e),i=yf(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?UC.has(e)&&!i.values.length||UC.has(t)&&!n.values.length?EZ(e,t):Bh(eI(kZ(n,i),i.values),r):bg(e,t)};function tI(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?_r(e,t,r):a3(e)(e,t)}const BZ=e=>{const t=({timestamp:r})=>e(r);return{start:(r=!0)=>Pr.update(t,r),stop:()=>po(t),now:()=>Vn.isProcessing?Vn.timestamp:Ls.now()}},rI=(e,t,r=10)=>{let n="";const i=Math.max(Math.round(t/r),2);for(let a=0;a<i;a++)n+=e(a/(i-1))+", ";return`linear(${n.substring(0,n.length-2)})`},Cg=2e4;function o3(e){let t=0;const r=50;let n=e.next(t);for(;!n.done&&t<Cg;)t+=r,n=e.next(t);return t>=Cg?1/0:t}function nI(e,t=100,r){const n=r({...e,keyframes:[0,t]}),i=Math.min(o3(n),Cg);return{type:"keyframes",ease:a=>n.next(i*a).value/t,duration:ka(i)}}const DZ=5;function sI(e,t,r){const n=Math.max(t-DZ,0);return G_(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},BA=.001;function FZ({duration:e=Jr.duration,bounce:t=Jr.bounce,velocity:r=Jr.velocity,mass:n=Jr.mass}){let i,a,o=1-t;o=go(Jr.minDamping,Jr.maxDamping,o),e=go(Jr.minDuration,Jr.maxDuration,ka(e)),o<1?(i=u=>{const f=u*o,x=f*e,m=f-r,p=qC(u,o),y=Math.exp(-x);return BA-m/p*y},a=u=>{const x=u*o*e,m=x*r+r,p=Math.pow(o,2)*Math.pow(u,2)*e,y=Math.exp(-x),v=qC(Math.pow(u,2),o);return(-i(u)+BA>0?-1:1)*((m-p)*y)/v}):(i=u=>{const f=Math.exp(-u*e),x=(u-r)*e+1;return-.001+f*x},a=u=>{const f=Math.exp(-u*e),x=(r-u)*(e*e);return f*x});const l=5/e,c=TZ(i,a,l);if(e=Yi(e),isNaN(c))return{stiffness:Jr.stiffness,damping:Jr.damping,duration:e};{const u=Math.pow(c,2)*n;return{stiffness:u,damping:o*2*Math.sqrt(n*u),duration:e}}}const PZ=12;function TZ(e,t,r){let n=r;for(let i=1;i<PZ;i++)n=n-e(n)/t(n);return n}function qC(e,t){return e*Math.sqrt(1-t*t)}const MZ=["duration","bounce"],OZ=["stiffness","damping","mass"];function DA(e,t){return t.some(r=>e[r]!==void 0)}function LZ(e){let t={velocity:Jr.velocity,stiffness:Jr.stiffness,damping:Jr.damping,mass:Jr.mass,isResolvedFromDuration:!1,...e};if(!DA(e,OZ)&&DA(e,MZ))if(e.visualDuration){const r=e.visualDuration,n=2*Math.PI/(r*1.2),i=n*n,a=2*go(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Jr.mass,stiffness:i,damping:a}}else{const r=FZ(e);t={...t,...r,mass:Jr.mass},t.isResolvedFromDuration=!0}return t}function vf(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 a=r.keyframes[0],o=r.keyframes[r.keyframes.length-1],l={done:!1,value:a},{stiffness:c,damping:u,mass:f,duration:x,velocity:m,isResolvedFromDuration:p}=LZ({...r,velocity:-ka(r.velocity||0)}),y=m||0,v=u/(2*Math.sqrt(c*f)),b=o-a,E=ka(Math.sqrt(c/f)),N=Math.abs(b)<5;n||(n=N?Jr.restSpeed.granular:Jr.restSpeed.default),i||(i=N?Jr.restDelta.granular:Jr.restDelta.default);let j;if(v<1){const w=qC(E,v);j=S=>{const B=Math.exp(-v*E*S);return o-B*((y+v*E*b)/w*Math.sin(w*S)+b*Math.cos(w*S))}}else if(v===1)j=w=>o-Math.exp(-E*w)*(b+(y+E*b)*w);else{const w=E*Math.sqrt(v*v-1);j=S=>{const B=Math.exp(-v*E*S),D=Math.min(w*S,300);return o-B*((y+v*E*b)*Math.sinh(D)+w*b*Math.cosh(D))/w}}
50const A={calculatedDuration:p&&x||null,next:w=>{const S=j(w);if(p)l.done=w>=x;else{let B=w===0?y:0;v<1&&(B=w===0?Yi(y):sI(j,w,S));const D=Math.abs(B)<=n,P=Math.abs(o-S)<=i;l.done=D&&P}return l.value=l.done?o:S,l},toString:()=>{const w=Math.min(o3(A),Cg),S=rI(B=>A.next(w*B).value,w,30);return w+"ms "+S},toTransition:()=>{}};return A}vf.applyToOptions=e=>{const t=nI(e,100,vf);return e.ease=t.ease,e.duration=Yi(t.duration),e.type="keyframes",e};function WC({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:l,max:c,restDelta:u=.5,restSpeed:f}){const x=e[0],m={done:!1,value:x},p=D=>l!==void 0&&D<l||c!==void 0&&D>c,y=D=>l===void 0?c:c===void 0||Math.abs(l-D)<Math.abs(c-D)?l:c;let v=r*t;const b=x+v,E=o===void 0?b:o(b);E!==b&&(v=E-x);const N=D=>-v*Math.exp(-D/n),j=D=>E+N(D),A=D=>{const P=N(D),O=j(D);m.done=Math.abs(P)<=u,m.value=m.done?E:O};let w,S;const B=D=>{p(m.value)&&(w=D,S=vf({keyframes:[m.value,y(m.value)],velocity:sI(j,D,m.value),damping:i,stiffness:a,restDelta:u,restSpeed:f}))};return B(0),{calculatedDuration:null,next:D=>{let P=!1;return!S&&w===void 0&&(P=!0,A(D),B(D)),w!==void 0&&D>=w?S.next(D-w):(!P&&A(D),m)}}}const Ad=(e,t,r)=>{const n=t-e;return n===0?1:(r-e)/n};function RZ(e,t,r){const n=[],i=r||mo.mix||tI,a=e.length-1;for(let o=0;o<a;o++){let l=i(e[o],e[o+1]);if(t){const c=Array.isArray(t)?t[o]||Ys:t;l=Bh(c,l)}n.push(l)}return n}function iI(e,t,{clamp:r=!0,ease:n,mixer:i}={}){const a=e.length;if(H4(a===t.length),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=RZ(t,n,i),c=l.length,u=f=>{if(o&&f<e[0])return t[0];let x=0;if(c>1)for(;x<e.length-2&&!(f<e[x+1]);x++);const m=Ad(e[x],e[x+1],f);return l[x](m)};return r?f=>u(go(e[0],e[a-1],f)):u}function aI(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const i=Ad(0,t,n);e.push(_r(r,1,i))}}function oI(e){const t=[0];return aI(t,e.length-1),t}function _Z(e,t){return e.map(r=>r*t)}const lI=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,IZ=1e-7,$Z=12;function zZ(e,t,r,n,i){let a,o,l=0;do o=t+(r-t)/2,a=lI(o,n,i)-e,a>0?r=o:t=o;while(Math.abs(a)>IZ&&++l<$Z);return o}function Dh(e,t,r,n){if(e===t&&r===n)return Ys;const i=a=>zZ(a,0,1,e,r);return a=>a===0||a===1?a:lI(i(a),t,n)}const VZ=Dh(.42,0,1,1),UZ=Dh(0,0,.58,1),cI=Dh(.42,0,.58,1),uI=e=>Array.isArray(e)&&typeof e[0]!="number",dI=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,xI=e=>t=>1-e(1-t),fI=Dh(.33,1.53,.69,.99),l3=xI(fI),hI=dI(l3),mI=e=>(e*=2)<1?.5*l3(e):.5*(2-Math.pow(2,-10*(e-1))),c3=e=>1-Math.sin(Math.acos(e)),pI=xI(c3),gI=dI(c3),yI=e=>Array.isArray(e)&&typeof e[0]=="number",qZ={linear:Ys,easeIn:VZ,easeInOut:cI,easeOut:UZ,circIn:c3,circInOut:gI,circOut:pI,backIn:l3,backInOut:hI,backOut:fI,anticipate:mI},WZ=e=>typeof e=="string",FA=e=>{if(yI(e)){H4(e.length===4);const[t,r,n,i]=e;return Dh(t,r,n,i)}else if(WZ(e))return qZ[e];return e};function HZ(e,t){return e.map(()=>t||cI).splice(0,e.length-1)}function Hx({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){const i=uI(n)?n.map(FA):FA(n),a={done:!1,value:t[0]},o=_Z(r&&r.length===t.length?r:oI(t),e),l=iI(o,t,{ease:Array.isArray(i)?i:HZ(t,i)});return{calculatedDuration:e,next:c=>(a.value=l(c),a.done=c>=e,a)}}const GZ=e=>e!==null;function u3(e,{repeat:t,repeatType:r="loop"},n,i=1){const a=e.filter(GZ),l=i<0||t&&r!=="loop"&&t%2===1?0:a.length-1;return!l||n===void 0?a[l]:n}const KZ={decay:WC,inertia:WC,tween:Hx,keyframes:Hx,spring:vf};function vI(e){typeof e.type=="string"&&(e.type=KZ[e.type])}let d3=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,r){return this.finished.then(t,r)}};const XZ=e=>e/100;let ay=class extends d3{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=(r=!0)=>{var n,i;if(r){const{motionValue:a}=this.options;a&&a.updatedAt!==Ls.now()&&this.tick(Ls.now())}this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(n=this.options).onStop)==null||i.call(n))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;vI(t);const{type:r=Hx,repeat:n=0,repeatDelay:i=0,repeatType:a,velocity:o=0}=t;let{keyframes:l}=t;const c=r||Hx;c!==Hx&&typeof l[0]!="number"&&(this.mixKeyframes=Bh(XZ,tI(l[0],l[1])),l=[0,100]);const u=c({...t,keyframes:l});a==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...l].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=o3(u));const{calculatedDuration:f}=u;this.calculatedDuration=f,this.resolvedDuration=f+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=u}updateTime(t){const r=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(t,r=!1){const{generator:n,totalDuration:i,mixKeyframes:a,mirroredGenerator:o,resolvedDuration:l,calculatedDuration:c}=this;if(this.startTime===null)return n.next(0);const{delay:u=0,keyframes:f,repeat:x,repeatType:m,repeatDelay:p,type:y,onUpdate:v,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),r?this.currentTime=t:this.updateTime(t);const E=this.currentTime-u*(this.playbackSpeed>=0?1:-1),N=this.playbackSpeed>=0?E<0:E>i;this.currentTime=Math.max(E,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let j=this.currentTime,A=n;if(x){const D=Math.min(this.currentTime,i)/l;let P=Math.floor(D),O=D%1;!O&&D>=1&&(O=1),O===1&&P--,P=Math.min(P,x+1),!!(P%2)&&(m==="reverse"?(O=1-O,p&&(O-=p/l)):m==="mirror"&&(A=o)),j=go(0,1,O)*l}const w=N?{done:!1,value:f[0]}:A.next(j);a&&(w.value=a(w.value));let{done:S}=w;!N&&c!==null&&(S=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const B=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return B&&y!==WC&&(w.value=u3(f,this.options,b,this.speed)),v&&v(w.value),B&&this.finish(),w}then(t,r){return this.finished.then(t,r)}get duration(){return ka(this.calculatedDuration)}get time(){return ka(this.currentTime)}set time(t){var r;t=Yi(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(r=this.driver)==null||r.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Ls.now());const r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=ka(this.currentTime))}play(){var i,a;if(this.isStopped)return;const{driver:t=BZ,startTime:r}=this.options;this.driver||(this.driver=t(o=>
50this.tick(o))),(a=(i=this.options).onPlay)==null||a.call(i);const n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=r??n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ls.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,r;this.notifyFinished(),this.teardown(),this.state="finished",(r=(t=this.options).onComplete)==null||r.call(t)}cancel(){var t,r;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(r=(t=this.options).onCancel)==null||r.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var r;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(r=this.driver)==null||r.stop(),t.observe(this)}};function YZ(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const xc=e=>e*180/Math.PI,HC=e=>{const t=xc(Math.atan2(e[1],e[0]));return GC(t)},QZ={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:HC,rotateZ:HC,skewX:e=>xc(Math.atan(e[1])),skewY:e=>xc(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},GC=e=>(e=e%360,e<0&&(e+=360),e),PA=HC,TA=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),MA=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),ZZ={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:TA,scaleY:MA,scale:e=>(TA(e)+MA(e))/2,rotateX:e=>GC(xc(Math.atan2(e[6],e[5]))),rotateY:e=>GC(xc(Math.atan2(-e[2],e[0]))),rotateZ:PA,rotate:PA,skewX:e=>xc(Math.atan(e[4])),skewY:e=>xc(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function OA(e){return e.includes("scale")?1:0}function KC(e,t){if(!e||e==="none")return OA(t);const r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,i;if(r)n=ZZ,i=r;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=QZ,i=l}if(!i)return OA(t);const a=n[t],o=i[1].split(",").map(eJ);return typeof a=="function"?a(o):o[a]}const JZ=(e,t)=>{const{transform:r="none"}=getComputedStyle(e);return KC(r,t)};function eJ(e){return parseFloat(e.trim())}const LA=e=>e===l0||e===kt,tJ=new Set(["x","y","z"]),rJ=a0.filter(e=>!tJ.has(e));function nJ(e){const t=[];return rJ.forEach(r=>{const n=e.getValue(r);n!==void 0&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t}const Dc={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:(e,{transform:t})=>KC(t,"x"),y:(e,{transform:t})=>KC(t,"y")};Dc.translateX=Dc.x;Dc.translateY=Dc.y;const Fc=new Set;let XC=!1,YC=!1,QC=!1;function bI(){if(YC){const e=Array.from(Fc).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),r=new Map;t.forEach(n=>{const i=nJ(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(([a,o])=>{var l;(l=n.getValue(a))==null||l.set(o)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}YC=!1,XC=!1,Fc.forEach(e=>e.complete(QC)),Fc.clear()}function CI(){Fc.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(YC=!0)})}function sJ(){QC=!0,CI(),bI(),QC=!1}let x3=class{constructor(t,r,n,i,a,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=n,this.motionValue=i,this.element=a,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Fc.add(this),XC||(XC=!0,Pr.read(CI),Pr.resolveKeyframes(bI))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:r,element:n,motionValue:i}=this;if(t[0]===null){const a=i==null?void 0:i.get(),o=t[t.length-1];if(a!==void 0)t[0]=a;else if(n&&r){const l=n.readValue(r,o);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=o),i&&a===void 0&&i.set(t[0])}YZ(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Fc.delete(this)}cancel(){this.state==="scheduled"&&(Fc.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}};const iJ=e=>e.startsWith("--");function aJ(e,t,r){iJ(t)?e.style.setProperty(t,r):e.style[t]=r}function f3(e){let t;return()=>(t===void 0&&(t=e()),t)}const oJ=f3(()=>window.ScrollTimeline!==void 0),lJ={};function cJ(e,t){const r=f3(e);return()=>lJ[t]??r()}
50const wI=cJ(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ox=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,RA={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ox([0,.65,.55,1]),circOut:Ox([.55,0,1,.45]),backIn:Ox([.31,.01,.66,-.59]),backOut:Ox([.33,1.53,.69,.99])};function EI(e,t){if(e)return typeof e=="function"?wI()?rI(e,t):"ease-out":yI(e)?Ox(e):Array.isArray(e)?e.map(r=>EI(r,t)||RA.easeOut):RA[e]}function uJ(e,t,r,{delay:n=0,duration:i=300,repeat:a=0,repeatType:o="loop",ease:l="easeOut",times:c}={},u=void 0){const f={[t]:r};c&&(f.offset=c);const x=EI(l,i);Array.isArray(x)&&(f.easing=x);const m={delay:n,duration:i,easing:Array.isArray(x)?"linear":x,fill:"both",iterations:a+1,direction:o==="reverse"?"alternate":"normal"};return u&&(m.pseudoElement=u),e.animate(f,m)}function h3(e){return typeof e=="function"&&"applyToOptions"in e}function dJ({type:e,...t}){return h3(e)&&wI()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}let xJ=class extends d3{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:r,name:n,keyframes:i,pseudoElement:a,allowFlatten:o=!1,finalKeyframe:l,onComplete:c}=t;this.isPseudoElement=!!a,this.allowFlatten=o,this.options=t,H4(typeof t.type!="string");const u=dJ(t);this.animation=uJ(r,n,i,u,a),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const f=u3(i,this.options,l,this.speed);this.updateMotionValue?this.updateMotionValue(f):aJ(r,n,f),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,r;(r=(t=this.animation).finish)==null||r.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,r;this.isPseudoElement||(r=(t=this.animation).commitStyles)==null||r.call(t)}get duration(){var r,n;const t=((n=(r=this.animation.effect)==null?void 0:r.getComputedTiming)==null?void 0:n.call(r).duration)||0;return ka(Number(t))}get time(){return ka(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Yi(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:r}){var n;return this.allowFlatten&&((n=this.animation.effect)==null||n.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&oJ()?(this.animation.timeline=t,Ys):r(this)}};const jI={anticipate:mI,backInOut:hI,circInOut:gI};function fJ(e){return e in jI}function hJ(e){typeof e.ease=="string"&&fJ(e.ease)&&(e.ease=jI[e.ease])}const _A=10;let mJ=class extends xJ{constructor(t){hJ(t),vI(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:r,onUpdate:n,onComplete:i,element:a,...o}=this.options;if(!r)return;if(t!==void 0){r.set(t);return}const l=new ay({...o,autoplay:!1}),c=Yi(this.finishedTime??this.time);r.setWithVelocity(l.sample(c-_A).value,l.sample(c).value,_A),l.stop()}};const IA=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(jl.test(e)||e==="0")&&!e.startsWith("url("));function pJ(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 gJ(e,t,r,n){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const a=e[e.length-1],o=IA(i,t),l=IA(a,t);return!o||!l?!1:pJ(e)||(r==="spring"||h3(r))&&n}const yJ=new Set(["opacity","clipPath","filter","transform"]),vJ=f3(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function bJ(e){const{motionValue:t,name:r,repeatDelay:n,repeatType:i,damping:a,type:o}=e;if(!t||!t.owner||!(t.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return vJ()&&r&&yJ.has(r)&&(r!=="transform"||!c)&&!l&&!n&&i!=="mirror"&&a!==0&&o!=="inertia"}const CJ=40;let wJ=class extends d3{constructor({autoplay:t=!0,delay:r=0,type:n="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:
50o="loop",keyframes:l,name:c,motionValue:u,element:f,...x}){var y;super(),this.stop=()=>{var v,b;this._animation&&(this._animation.stop(),(v=this.stopTimeline)==null||v.call(this)),(b=this.keyframeResolver)==null||b.cancel()},this.createdAt=Ls.now();const m={autoplay:t,delay:r,type:n,repeat:i,repeatDelay:a,repeatType:o,name:c,motionValue:u,element:f,...x},p=(f==null?void 0:f.KeyframeResolver)||x3;this.keyframeResolver=new p(l,(v,b,E)=>this.onKeyframesResolved(v,b,m,!E),c,u,f),(y=this.keyframeResolver)==null||y.scheduleResolve()}onKeyframesResolved(t,r,n,i){this.keyframeResolver=void 0;const{name:a,type:o,velocity:l,delay:c,isHandoff:u,onUpdate:f}=n;this.resolvedAt=Ls.now(),gJ(t,a,o,l)||((mo.instantAnimations||!c)&&(f==null||f(u3(t,n,r))),t[0]=t[t.length-1],n.duration=0,n.repeat=0);const m={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>CJ?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...n,keyframes:t},p=!u&&bJ(m)?new mJ({...m,element:m.motionValue.owner.current}):new ay(m);p.finished.then(()=>this.notifyFinished()).catch(Ys),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(t,r){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),sJ()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}};const m3=(e,t,r,n={},i,a)=>o=>{const l=n3(n,e)||{},c=l.delay||n.delay||0;let{elapsed:u=0}=n;u=u-Yi(c);const f={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:m=>{t.set(m),l.onUpdate&&l.onUpdate(m)},onComplete:()=>{o(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:a?void 0:i};lZ(l)||Object.assign(f,oZ(e,f)),f.duration&&(f.duration=Yi(f.duration)),f.repeatDelay&&(f.repeatDelay=Yi(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let x=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(f.duration=0,f.delay===0&&(x=!0)),(mo.instantAnimations||mo.skipAnimations)&&(x=!0,f.duration=0,f.delay=0),f.allowFlatten=!l.type&&!l.ease,x&&!a&&t.get()!==void 0){const m=rZ(f.keyframes,l);if(m!==void 0){Pr.update(()=>{f.onUpdate(m),f.onComplete()});return}}return l.isSync?new ay(f):new wJ(f)},NI=new Set(["width","height","top","left","right","bottom",...a0]);function EJ({protectedKeys:e,needsAnimating:t},r){const n=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,n}function p3(e,t,{delay:r=0,transitionOverride:n,type:i}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:o,...l}=t;n&&(a=n);const c=[],u=i&&e.animationState&&e.animationState.getState()[i];for(const f in l){const x=e.getValue(f,e.latestValues[f]??null),m=l[f];if(m===void 0||u&&EJ(u,f))continue;const p={delay:r,...n3(a||{},f)},y=x.get();if(y!==void 0&&!x.isAnimating&&!Array.isArray(m)&&m===y&&!p.velocity)continue;let v=!1;if(window.MotionHandoffAnimation){const E=K_(e);if(E){const N=window.MotionHandoffAnimation(E,f,Pr);N!==null&&(p.startTime=N,v=!0)}}zC(e,f),x.start(m3(f,x,m,e.shouldReduceMotion&&NI.has(f)?{type:!1}:p,e,v));const b=x.animation;b&&c.push(b)}return o&&Promise.all(c).then(()=>{Pr.update(()=>{o&&JQ(e,o)})}),c}function ZC(e,t,r={}){var c;const n=gf(e,t,r.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=n||{};r.transitionOverride&&(i=r.transitionOverride);const a=n?()=>Promise.all(p3(e,n,r)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:f=0,staggerChildren:x,staggerDirection:m}=i;return jJ(e,t,f+u,x,m,r)}:()=>Promise.resolve(),{when:l}=i;if(l){const[u,f]=l==="beforeChildren"?[a,o]:[o,a];return u().then(()=>f())}else return Promise.all([a(),o(r.delay)])}function jJ(e,t,r=0,n=0,i=1,a){const o=[],l=(e.variantChildren.size-1)*n,c=i===1?(u=0)=>u*n:(u=0)=>
vendor: 62,565 bytes, line 50
50l-u*n;return Array.from(e.variantChildren).sort(NJ).forEach((u,f)=>{u.notify("AnimationStart",t),o.push(ZC(u,t,{...a,delay:r+c(f)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function NJ(e,t){return e.sortNodePosition(t)}function AJ(e,t,r={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){const i=t.map(a=>ZC(e,a,r));n=Promise.all(i)}else if(typeof t=="string")n=ZC(e,t,r);else{const i=typeof t=="function"?gf(e,t,r.custom):t;n=Promise.all(p3(e,i,r))}return n.then(()=>{e.notify("AnimationComplete",t)})}function AI(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}const kJ=U4.length;function kI(e){if(!e)return;if(!e.isControllingVariants){const r=e.parent?kI(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}const t={};for(let r=0;r<kJ;r++){const n=U4[r],i=e.props[n];(hf(i)||i===!1)&&(t[n]=i)}return t}const SJ=[...V4].reverse(),BJ=V4.length;function DJ(e){return t=>Promise.all(t.map(({animation:r,options:n})=>AJ(e,r,n)))}function FJ(e){let t=DJ(e),r=$A(),n=!0;const i=c=>(u,f)=>{var m;const x=gf(e,f,c==="exit"?(m=e.presenceContext)==null?void 0:m.custom:void 0);if(x){const{transition:p,transitionEnd:y,...v}=x;u={...u,...v,...y}}return u};function a(c){t=c(e)}function o(c){const{props:u}=e,f=kI(e.parent)||{},x=[],m=new Set;let p={},y=1/0;for(let b=0;b<BJ;b++){const E=SJ[b],N=r[E],j=u[E]!==void 0?u[E]:f[E],A=hf(j),w=E===c?N.isActive:null;w===!1&&(y=b);let S=j===f[E]&&j!==u[E]&&A;if(S&&n&&e.manuallyAnimateOnMount&&(S=!1),N.protectedKeys={...p},!N.isActive&&w===null||!j&&!N.prevProp||ny(j)||typeof j=="boolean")continue;const B=PJ(N.prevProp,j);let D=B||E===c&&N.isActive&&!S&&A||b>y&&A,P=!1;const O=Array.isArray(j)?j:[j];let M=O.reduce(i(E),{});w===!1&&(M={});const{prevResolvedValues:I={}}=N,V={...I,...M},W=R=>{D=!0,m.has(R)&&(P=!0,m.delete(R)),N.needsAnimating[R]=!0;const q=e.getValue(R);q&&(q.liveStyle=!1)};for(const R in V){const q=M[R],G=I[R];if(p.hasOwnProperty(R))continue;let K=!1;$C(q)&&$C(G)?K=!AI(q,G):K=q!==G,K?q!=null?W(R):m.add(R):q!==void 0&&m.has(R)?W(R):N.protectedKeys[R]=!0}N.prevProp=j,N.prevResolvedValues=M,N.isActive&&(p={...p,...M}),n&&e.blockInitialAnimation&&(D=!1),D&&(!(S&&B)||P)&&x.push(...O.map(R=>({animation:R,options:{type:E}})))}if(m.size){const b={};if(typeof u.initial!="boolean"){const E=gf(e,Array.isArray(u.initial)?u.initial[0]:u.initial);E&&E.transition&&(b.transition=E.transition)}m.forEach(E=>{const N=e.getBaseTarget(E),j=e.getValue(E);j&&(j.liveStyle=!0),b[E]=N??null}),x.push({animation:b})}let v=!!x.length;return n&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(v=!1),n=!1,v?t(x):Promise.resolve()}function l(c,u){var x;if(r[c].isActive===u)return Promise.resolve();(x=e.variantChildren)==null||x.forEach(m=>{var p;return(p=m.animationState)==null?void 0:p.setActive(c,u)}),r[c].isActive=u;const f=o(c);for(const m in r)r[m].protectedKeys={};return f}return{animateChanges:o,setActive:l,setAnimateFunction:a,getState:()=>r,reset:()=>{r=$A(),n=!0}}}function PJ(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!AI(t,e):!1}function ec(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function $A(){return{animate:ec(!0),whileInView:ec(),whileHover:ec(),whileTap:ec(),whileDrag:ec(),whileFocus:ec(),exit:ec()}}let Tl=class{constructor(t){this.isMounted=!1,this.node=t}update(){}},TJ=class extends Tl{constructor(t){super(t),t.animationState||(t.animationState=FJ(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ny(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.call(this)}},MJ=0,OJ=class extends Tl{constructor(){super(...arguments),this.id=MJ++}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,onExitComplete:r}=this.node.presenceContext||{};r&&r(this.id),t&&(this.unmount=t(this.id))}unmount(){}};const LJ={animation:{Feature:TJ},exit:{Feature:OJ}};function bf(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}const g3=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Fh(e){return{point:{x:e.pageX,y:e.pageY}}}const RJ=e=>t=>g3(t)&&e(t,Fh(t));function Gx(e,t,r,n){return bf(e,t,RJ(r),n)}function SI({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function _J({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function IJ(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}}const BI=1e-4,$J=1-BI,zJ=1+BI,DI=.01,VJ=0-DI,UJ=0+DI;function ms(e){return e.max-e.min}function qJ(e,t,r){return Math.abs(e-t)<=r}function zA(e,t,r,n=.5){e.origin=n,e.originPoint=_r(t.min,t.max,e.origin),e.scale=ms(r)/ms(t),e.translate=_r(r.min,r.max,e.origin)-e.originPoint,(e.scale>=$J&&e.scale<=zJ||isNaN(e.scale))&&(e.scale=1),(e.translate>=VJ&&e.translate<=UJ||isNaN(e.translate))&&(e.translate=0)}function Kx(e,t,r,n){zA(e.x,t.x,r.x,n?n.originX:void 0),zA(e.y,t.y,r.y,n?n.originY:void 0)}function VA(e,t,r){e.min=r.min+t.min,e.max=e.min+ms(t)}function WJ(e,t,r){VA(e.x,t.x,r.x),VA(e.y,t.y,r.y)}function UA(e,t,r){e.min=t.min-r.min,e.max=e.min+ms(t)}function Xx(e,t,r){UA(e.x,t.x,r.x),UA(e.y,t.y,r.y)}const qA=()=>({translate:0,scale:1,origin:0,originPoint:0}),Gu=()=>({x:qA(),y:qA()}),WA=()=>({min:0,max:0}),Qr=()=>({x:WA(),y:WA()});function hi(e){return[e("x"),e("y")]}function Vb(e){return e===void 0||e===1}function JC({scale:e,scaleX:t,scaleY:r}){return!Vb(e)||!Vb(t)||!Vb(r)}function ac(e){return JC(e)||FI(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function FI(e){return HA(e.x)||HA(e.y)}function HA(e){return e&&e!=="0%"}function wg(e,t,r){const n=e-r,i=t*n;return r+i}function GA(e,t,r,n,i){return i!==void 0&&(e=wg(e,i,n)),wg(e,r,n)+t}function ew(e,t=0,r=1,n,i){e.min=GA(e.min,t,r,n,i),e.max=GA(e.max,t,r,n,i)}function PI(e,{x:t,y:r}){ew(e.x,t.translate,t.scale,t.originPoint),ew(e.y,r.translate,r.scale,r.originPoint)}const KA=.999999999999,XA=1.0000000000001;function HJ(e,t,r,n=!1){const i=r.length;if(!i)return;t.x=t.y=1;let a,o;for(let l=0;l<i;l++){a=r[l],o=a.projectionDelta;const{visualElement:c}=a.options;c&&c.props.style&&c.props.style.display==="contents"||(n&&a.options.layoutScroll&&a.scroll&&a!==a.root&&Xu(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,PI(e,o)),n&&ac(a.latestValues)&&Xu(e,a.latestValues))}t.x<XA&&t.x>KA&&(t.x=1),t.y<XA&&t.y>KA&&(t.y=1)}function Ku(e,t){e.min=e.min+t,e.max=e.max+t}function YA(e,t,r,n,i=.5){const a=_r(e.min,e.max,i);ew(e,t,r,a,n)}function Xu(e,t){YA(e.x,t.x,t.scaleX,t.scale,t.originX),YA(e.y,t.y,t.scaleY,t.scale,t.originY)}function TI(e,t){return SI(IJ(e.getBoundingClientRect(),t))}function GJ(e,t,r){const n=TI(e,r),{scroll:i}=t;return i&&(Ku(n.x,i.offset.x),Ku(n.y,i.offset.y)),n}const MI=({current:e})=>e?e.ownerDocument.defaultView:null,QA=(e,t)=>Math.abs(e-t);function KJ(e,t){const r=QA(e.x,t.x),n=QA(e.y,t.y);return Math.sqrt(r**2+n**2)}let OI=class{constructor(t,r,{transformPagePoint:n,contextWindow:i,dragSnapToOrigin:a=!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 x=qb(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,p=KJ(x.offset,{x:0,y:0})>=3;if(!m&&!p)return;const{point:y}=x,{timestamp:v}=Vn;this.history.push({...y,timestamp:v});const{onStart:b,onMove:E}=this.handlers;m||(b&&b(this.lastMoveEvent,x),this.startEvent=this.lastMoveEvent),E&&E(this.lastMoveEvent,x)},this.handlePointerMove=(x,m)=>{this.lastMoveEvent=x,this.lastMoveEventInfo=Ub(m,this.transformPagePoint),Pr.update(this.updatePoint,!0)},this.handlePointerUp=(x,m)=>{this.end();const{onEnd:p,onSessionEnd:y,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=qb(x.type==="pointercancel"?this.lastMoveEventInfo:Ub(m,this.transformPagePoint),this.history);this.startEvent&&p&&p(x,b),y&&y(x,b)},!g3(t))return;this.dragSnapToOrigin=a,this.handlers=r,this.transformPagePoint=n,this.contextWindow=i||window;const o=Fh(t),l=Ub(o,this.transformPagePoint),{point:c}=l,{timestamp:u}=Vn;this.history=[{...c,timestamp:u}];const{onSessionStart:f}=r;f&&f(t,qb(l,this.history)),this.removeListeners=Bh(Gx(this.contextWindow,"pointermove",this.handlePointerMove),Gx(this.contextWindow,"pointerup",this.handlePointerUp),Gx(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),po(this.updatePoint)}};function Ub(e,t){return t?{point:t(e.point)}:e}function ZA(e,t){return{x:e.x-t.x,y:e.y-t.y}}function qb({point:e},t){return{point:e,delta:ZA(e,LI(t)),offset:ZA(e,XJ(t)),velocity:YJ(t,.1)}}function XJ(e){return e[0]}function LI(e){return e[e.length-1]}function YJ(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null;const i=LI(e);for(;r>=0&&(n=e[r],!(i.timestamp-n.timestamp>Yi(t)));)r--;if(!n)return{x:0,y:0};const a=ka(i.timestamp-n.timestamp);if(a===0)return{x:0,y:0};const o={x:(i.x-n.x)/a,y:(i.y-n.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function QJ(e,{min:t,max:r},n){return t!==void 0&&e<t?e=n?_r(t,e,n.min):Math.max(e,t):r!==void 0&&e>r&&(e=n?_r(r,e,n.max):Math.min(e,r)),e}function JA(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 ZJ(e,{top:t,left:r,bottom:n,right:i}){return{x:JA(e.x,r,i),y:JA(e.y,t,n)}}function ek(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 JJ(e,t){return{x:ek(e.x,t.x),y:ek(e.y,t.y)}}function eee(e,t){let r=.5;const n=ms(e),i=ms(t);return i>n?r=Ad(t.min,t.max-n,e.min):n>i&&(r=Ad(e.min,e.max-i,t.min)),go(0,1,r)}function tee(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 tw=.35;function ree(e=tw){return e===!1?e=0:e===!0&&(e=tw),{x:tk(e,"left","right"),y:tk(e,"top","bottom")}}function tk(e,t,r){return{min:rk(e,t),max:rk(e,r)}}function rk(e,t){return typeof e=="number"?e:e[t]||0}const Ii={x:!1,y:!1};function RI(){return Ii.x||Ii.y}function nee(e){return e==="x"||e==="y"?Ii[e]?null:(Ii[e]=!0,()=>{Ii[e]=!1}):Ii.x||Ii.y?null:(Ii.x=Ii.y=!0,()=>{Ii.x=Ii.y=!1})}const see=new WeakMap;let iee=class{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=Qr(),this.visualElement=t}start(t,{snapToCursor:r=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;const i=f=>{const{dragSnapToOrigin:x}=this.getProps();x?this.pauseAnimation():this.stopAnimation(),r&&this.snapToCursor(Fh(f).point)},a=(f,x)=>{const{drag:m,dragPropagation:p,onDragStart:y}=this.getProps();if(m&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=nee(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),hi(b=>{let E=this.getAxisMotionValue(b).get()||0;if(Aa.test(E)){const{projection:N}=this.visualElement;if(N&&N.layout){const j=N.layout.layoutBox[b];j&&(E=ms(j)*(parseFloat(E)/100))}}this.originPoint[b]=E}),y&&Pr.postRender(()=>y(f,x)),zC(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},o=(f,x)=>{const{dragPropagation:m,dragDirectionLock:p,onDirectionLock:y,onDrag:v}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:b}=x;if(p&&this.currentDirection===null){this.currentDirection=aee(b),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",x.point,b),this.updateAxis("y",x.point,b),this.visualElement.render(),v&&v(f,x)},l=(f,x)=>this.stop(f,x),c=()=>hi(f=>{var x;return this.getAnimationState(f)==="paused"&&((x=this.getAxisMotionValue(f).animation)==null?void 0:x.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new OI(t,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:MI(this.visualElement)})}stop(t,r){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=r;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&Pr.postRender(()=>a(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||!dp(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=QJ(o,this.constraints[t],this.elastic[t])),a.set(o)}resolveConstraints(){var a;const{dragConstraints:t,dragElastic:r}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(a=this.visualElement.projection)==null?void 0:a.layout,i=this.constraints;t&&Wu(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&n?this.constraints=ZJ(n.layoutBox,t):this.constraints=!1,this.elastic=ree(r),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&hi(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=tee(n.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!Wu(t))return!1;const n=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const a=GJ(n,i.root,this.visualElement.getTransformPagePoint());let o=JJ(i.layout.layoutBox,a);if(r){const l=r(_J(o));this.hasMutatedConstraints=!!l,l&&(o=SI(l))}return o}startAnimation(t){const{drag:r,dragMomentum:n,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=hi(f=>{if(!dp(f,r,this.currentDirection))return;let x=c&&c[f]||{};o&&(x={min:0,max:0});const m=i?200:1e6,p=i?40:1e7,y={type:"inertia",velocity:n?t[f]:0,bounceStiffness:m,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...a,...x};return this.startAxisValueAnimation(f,y)});return Promise.all(u).then(l)}startAxisValueAnimation(t,r){const n=this.getAxisMotionValue(t);return zC(this.visualElement,t),n.start(m3(t,n,0,r,this.visualElement,!1))}stopAnimation(){hi(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){hi(t=>{var r;return(r=this.getAxisMotionValue(t).animation)==null?void 0:r.pause()})}getAnimationState(t){var r;return(r=this.getAxisMotionValue(t).animation)==null?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){hi(r=>{const{drag:n}=this.getProps();if(!dp(r,n,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(r);if(i&&i.layout){const{min:o,max:l}=i.layout.layoutBox[r];a.set(t[r]-_r(o,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!Wu(r)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};hi(o=>{const l=this.getAxisMotionValue(o);if(l&&this.constraints!==!1){const c=l.get();i[o]=eee({min:c,max:c},this.constraints[o])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),hi(o=>{if(!dp(o,t,null))return;const l=this.getAxisMotionValue(o),{min:c,max:u}=this.constraints[o];l.set(_r(c,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;see.set(this.visualElement,this);const t=this.visualElement.current,r=Gx(t,"pointerdown",c=>{const{drag:u,dragListener:f=!0}=this.getProps();u&&f&&this.start(c)}),n=()=>{const{dragConstraints:c}=this.getProps();Wu(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,a=i.addEventListener("measure",n);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Pr.read(n);const o=bf(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(hi(f=>{const x=this.getAxisMotionValue(f);x&&(this.originPoint[f]+=c[f].translate,x.set(x.get()+c[f].translate))}),this.visualElement.render())});return()=>{o(),r(),a(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:o=tw,dragMomentum:l=!0}=t;return{...t,drag:r,dragDirectionLock:n,dragPropagation:i,dragConstraints:a,dragElastic:o,dragMomentum:l}}};function dp(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function aee(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}let oee=class extends Tl{constructor(t){super(t),this.removeGroupControls=Ys,this.removeListeners=Ys,this.controls=new iee(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ys}unmount(){this.removeGroupControls(),this.removeListeners()}};const nk=e=>(t,r)=>{e&&Pr.postRender(()=>e(t,r))};let lee=class extends Tl{constructor(){super(...arguments),this.removePointerDownListener=Ys}onPointerDown(t){this.session=new OI(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:MI(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:r,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:nk(t),onStart:nk(r),onMove:n,onEnd:(a,o)=>{delete this.session,i&&Pr.postRender(()=>i(a,o))}}}mount(){this.removePointerDownListener=Gx(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}};const Zp={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function sk(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const xx={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(kt.test(e))e=parseFloat(e);else return e;const r=sk(e,t.target.x),n=sk(e,t.target.y);return`${r}% ${n}%`}},cee={correct:(e,{treeScale:t,projectionDelta:r})=>{const n=e,i=jl.parse(e);if(i.length>5)return n;const a=jl.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 u=_r(l,c,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),a(i)}};let uee=class extends C.Component{componentDidMount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n,layoutId:i}=this.props,{projection:a}=t;kQ(dee),a&&(r.group&&r.group.add(a),n&&n.register&&i&&n.register(a),a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),Zp.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:r,visualElement:n,drag:i,isPresent:a}=this.props,{projection:o}=n;return o&&(o.isPresent=a,i||t.layoutDependency!==r||r===void 0||t.isPresent!==a?o.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?o.promote():o.relegate()||Pr.postRender(()=>{const l=o.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),W4.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 _I(e){const[t,r]=B_(),n=C.useContext($4);return s.jsx(uee,{...e,layoutGroup:n,switchLayoutGroup:C.useContext(L_),isPresent:t,safeToRemove:r})}const dee={borderRadius:{...xx,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:xx,borderTopRightRadius:xx,borderBottomLeftRadius:xx,borderBottomRightRadius:xx,boxShadow:cee};function II(e,t,r){const n=un(e)?e:Ic(e);return n.start(m3("",n,t,r)),n.animation}function $I(e){return e instanceof SVGElement&&e.tagName!=="svg"}const xee=(e,t)=>e.depth-t.depth;let fee=class{constructor(){this.children=[],this.isDirty=!1}add(t){t3(this.children,t),this.isDirty=!0}remove(t){iy(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(xee),this.isDirty=!1,this.children.forEach(t)}};function hee(e,t){const r=Ls.now(),n=({timestamp:i})=>{const a=i-r;a>=t&&(po(n),e(a-t))};return Pr.setup(n,!0),()=>po(n)}const zI=["TopLeft","TopRight","BottomLeft","BottomRight"],mee=zI.length,ik=e=>typeof e=="string"?parseFloat(e):e,ak=e=>typeof e=="number"||kt.test(e);function pee(e,t,r,n,i,a){i?(e.opacity=_r(0,r.opacity??1,gee(n)),e.opacityExit=_r(t.opacity??1,0,yee(n))):a&&(e.opacity=_r(t.opacity??1,r.opacity??1,n));for(let o=0;o<mee;o++){const l=`border${zI[o]}Radius`;let c=ok(t,l),u=ok(r,l);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||ak(c)===ak(u)?(e[l]=Math.max(_r(ik(c),ik(u),n),0),(Aa.test(u)||Aa.test(c))&&(e[l]+="%")):e[l]=u}(t.rotate||r.rotate)&&(e.rotate=_r(t.rotate||0,r.rotate||0,n))}function ok(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const gee=VI(0,.5,pI),yee=VI(.5,.95,Ys);function VI(e,t,r){return n=>n<e?0:n>t?1:r(Ad(e,t,n))}function lk(e,t){e.min=t.min,e.max=t.max}function ui(e,t){lk(e.x,t.x),lk(e.y,t.y)}function ck(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function uk(e,t,r,n,i){return e-=t,e=wg(e,1/r,n),i!==void 0&&(e=wg(e,1/i,n)),e}function vee(e,t=0,r=1,n=.5,i,a=e,o=e){if(Aa.test(t)&&(t=parseFloat(t),t=_r(o.min,o.max,t/100)-o.min),typeof t!="number")return;let l=_r(a.min,a.max,n);e===a&&(l-=t),e.min=uk(e.min,t,r,l,i),e.max=uk(e.max,t,r,l,i)}function dk(e,t,[r,n,i],a,o){vee(e,t[r],t[n],t[i],t.scale,a,o)}const bee=["x","scaleX","originX"],Cee=["y","scaleY","originY"];function xk(e,t,r,n){dk(e.x,t,bee,r?r.x:void 0,n?n.x:void 0),dk(e.y,t,Cee,r?r.y:void 0,n?n.y:void 0)}function fk(e){return e.translate===0&&e.scale===1}function UI(e){return fk(e.x)&&fk(e.y)}function hk(e,t){return e.min===t.min&&e.max===t.max}function wee(e,t){return hk(e.x,t.x)&&hk(e.y,t.y)}function mk(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function qI(e,t){return mk(e.x,t.x)&&mk(e.y,t.y)}function pk(e){return ms(e.x)/ms(e.y)}function gk(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}let Eee=class{constructor(){this.members=[]}add(t){t3(this.members,t),t.scheduleRender()}remove(t){if(iy(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 a=this.members[i];if(a.isPresent!==!1){n=a;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 jee(e,t,r){let n="";const i=e.x.translate/t.x,a=e.y.translate/t.y,o=(r==null?void 0:r.z)||0;if((i||a||o)&&(n=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),r){const{transformPerspective:u,rotate:f,rotateX:x,rotateY:m,skewX:p,skewY:y}=r;u&&(n=`perspective(${u}px) ${n}`),f&&(n+=`rotate(${f}deg) `),x&&(n+=`rotateX(${x}deg) `),m&&(n+=`rotateY(${m}deg) `),p&&(n+=`skewX(${p}deg) `),y&&(n+=`skewY(${y}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 Wb=["","X","Y","Z"],Nee={visibility:"hidden"},Aee=1e3;let kee=0;function Hb(e,t,r,n){const{latestValues:i}=t;i[e]&&(r[e]=i[e],t.setStaticValue(e,0),n&&(n[e]=0))}function WI(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const r=K_(t);if(window.MotionHasOptimisedAnimation(r,"transform")){const{layout:i,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",Pr,!(i||a))}const{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&WI(n)}function HI({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(o={},l=t==null?void 0:t()){this.id=kee++,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,this.nodes.forEach(Dee),this.nodes.forEach(Oee),this.nodes.forEach(Lee),this.nodes.forEach(Fee)},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 fee)}addEventListener(o,l){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new r3),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){if(this.instance)return;this.isSVG=$I(o),this.instance=o;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||l)&&(this.isLayoutDirty=!0),e){let f;const x=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=hee(x,250),Zp.hasAnimatedSinceResize&&(Zp.hasAnimatedSinceResize=!1,this.nodes.forEach(vk))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:x,hasRelativeLayoutChanged:m,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||u.getDefaultTransition()||zee,{onLayoutAnimationStart:v,onLayoutAnimationComplete:b}=u.getProps(),E=!this.targetLayout||!qI(this.targetLayout,p),N=!x&&m;if(this.options.layoutRoot||this.resumeFrom||N||x&&(E||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,N);const j={...n3(y,"layout"),onPlay:v,onComplete:b};(u.shouldReduceMotion||this.options.layoutRoot)&&(j.delay=0,j.type=!1),this.startAnimation(j)}else x||vk(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}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,this.eventHandlers.clear(),po(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(Ree),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&&WI(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let f=0;f<this.path.length;f++){const x=this.path[f];x.shouldResetTransform=!0,x.updateScroll("snapshot"),x.options.layoutRoot&&x.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(yk);return}this.isUpdating||this.nodes.forEach(Tee),this.isUpdating=!1,this.nodes.forEach(Mee),this.nodes.forEach(See),this.nodes.forEach(Bee),this.clearAllSnapshots();const l=Ls.now();Vn.delta=go(0,1e3/60,l-Vn.timestamp),Vn.timestamp=l,Vn.isProcessing=!0,_b.update.process(Vn),_b.preRender.process(Vn),_b.render.process(Vn),Vn.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,W4.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Pee),this.sharedNodes.forEach(_ee)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Pr.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Pr.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ms(this.snapshot.measuredBox.x)&&!ms(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}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=Qr(),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&&this.instance){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&&!UI(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,f=u!==this.prevTransformTemplateValue;o&&this.instance&&(l||ac(this.latestValues)||f)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return o&&(c=this.removeTransform(c)),Vee(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return Qr();const l=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(Uee))){const{scroll:f}=this.root;f&&(Ku(l.x,f.offset.x),Ku(l.y,f.offset.y))}return l}removeElementScroll(o){var c;const l=Qr();if(ui(l,o),(c=this.scroll)!=null&&c.wasRoot)return l;for(let u=0;u<this.path.length;u++){const f=this.path[u],{scroll:x,options:m}=f;f!==this.root&&x&&m.layoutScroll&&(x.wasRoot&&ui(l,o),Ku(l.x,x.offset.x),Ku(l.y,x.offset.y))}return l}applyTransform(o,l=!1){const c=Qr();ui(c,o);for(let u=0;u<this.path.length;u++){const f=this.path[u];!l&&f.options.layoutScroll&&f.scroll&&f!==f.root&&Xu(c,{x:-f.scroll.offset.x,y:-f.scroll.offset.y}),ac(f.latestValues)&&Xu(c,f.latestValues)}return ac(this.latestValues)&&Xu(c,this.latestValues),c}removeTransform(o){const l=Qr();ui(l,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!ac(u.latestValues))continue;JC(u.latestValues)&&u.updateSnapshot();const f=Qr(),x=u.measurePageBox();ui(f,x),xk(l,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,f)}return ac(this.latestValues)&&xk(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!==Vn.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var m;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:x}=this.options;if(!(!this.layout||!(f||x))){if(this.resolvedRelativeTargetAt=Vn.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Qr(),this.relativeTargetOrigin=Qr(),Xx(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),ui(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Qr(),this.targetWithTransforms=Qr()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),WJ(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ui(this.target,this.layout.layoutBox),PI(this.target,this.targetDelta)):ui(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Qr(),this.relativeTargetOrigin=Qr(),Xx(this.relativeTargetOrigin,this.target,p.target),ui(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||JC(this.parent.latestValues)||FI(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 y;const o=this.getLead(),l=!!this.resumingFrom||this!==o;let c=!0;if((this.isProjectionDirty||(y=this.parent)!=null&&y.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Vn.timestamp&&(c=!1),c)return;const{layout:u,layoutId:f}=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||f))return;ui(this.layoutCorrected,this.layout.layoutBox);const x=this.treeScale.x,m=this.treeScale.y;HJ(this.layoutCorrected,this.treeScale,this.path,l),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Qr());const{target:p}=o;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(ck(this.prevProjectionDelta.x,this.projectionDelta.x),ck(this.prevProjectionDelta.y,this.projectionDelta.y)),Kx(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==x||this.treeScale.y!==m||!gk(this.projectionDelta.x,this.prevProjectionDelta.x)||!gk(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var l;if((l=this.options.visualElement)==null||l.scheduleRender(),o){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Gu(),this.projectionDelta=Gu(),this.projectionDeltaWithTransform=Gu()}setAnimationOrigin(o,l=!1){const c=this.snapshot,u=c?c.latestValues:{},f={...this.latestValues},x=Gu();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const m=Qr(),p=c?c.source:void 0,y=this.layout?this.layout.source:void 0,v=p!==y,b=this.getStack(),E=!b||b.members.length<=1,N=!!(v&&!E&&this.options.crossfade===!0&&!this.path.some($ee));this.animationProgress=0;let j;this.mixTargetDelta=A=>{const w=A/1e3;bk(x.x,o.x,w),bk(x.y,o.y,w),this.setTargetDelta(x),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Xx(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Iee(this.relativeTarget,this.relativeTargetOrigin,m,w),j&&wee(this.relativeTarget,j)&&(this.isProjectionDirty=!1),j||(j=Qr()),ui(j,this.relativeTarget)),v&&(this.animationValues=f,pee(f,u,this.latestValues,w,N,E)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var l,c,u;this.notifyListeners("animationStart"),(l=this.currentAnimation)==null||l.stop(!1),(u=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||u.stop(!1),this.pendingAnimation&&(po(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Pr.update(()=>{Zp.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ic(0)),this.currentAnimation=II(this.motionValue,[0,1e3],{...o,isSync:!0,onUpdate:f=>{this.mixTargetDelta(f),o.onUpdate&&o.onUpdate(f)},onStop:()=>{},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(Aee),this.currentAnimation.stop(!1)),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:f}=o;if(!(!l||!c||!u)){if(this!==o&&this.layout&&u&&GI(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||Qr();const x=ms(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+x;const m=ms(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+m}ui(l,c),Xu(l,f),Kx(this.projectionDeltaWithTransform,this.layoutCorrected,l,f)}}registerSharedNode(o,l){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Eee),this.sharedNodes.get(o).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var l;const{layoutId:o}=this.options;return o?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:o}=this.options;return o?(l=this.getStack())==null?void 0:l.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 u=this.getStack();u&&u.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 u={};c.z&&Hb("z",o,u,this.animationValues);for(let f=0;f<Wb.length;f++)Hb(`rotate${Wb[f]}`,o,u,this.animationValues),Hb(`skew${Wb[f]}`,o,u,this.animationValues);o.render();for(const f in u)o.setStaticValue(f,u[f]),this.animationValues&&(this.animationValues[f]=u[f]);o.scheduleRender()}getProjectionStyles(o){if(!this.instance||this.isSVG)return;if(!this.isVisible)return Nee;const l={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,l.opacity="",l.pointerEvents=Yp(o==null?void 0:o.pointerEvents)||"",l.transform=c?c(this.latestValues,""):"none",l;const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){const p={};return this.options.layoutId&&(p.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,p.pointerEvents=Yp(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!ac(this.latestValues)&&(p.transform=c?c({},""):"none",this.hasProjected=!1),p}const f=u.animationValues||u.latestValues;this.applyTransformsToTarget(),l.transform=jee(this.projectionDeltaWithTransform,this.treeScale,f),c&&(l.transform=c(f,l.transform));const{x,y:m}=this.projectionDelta;l.transformOrigin=`${x.origin*100}% ${m.origin*100}% 0`,u.animationValues?l.opacity=u===this?f.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:l.opacity=u===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const p in mf){if(f[p]===void 0)continue;const{correct:y,applyTo:v,isCSSVariable:b}=mf[p],E=l.transform==="none"?f[p]:y(f[p],u);if(v){const N=v.length;for(let j=0;j<N;j++)l[v[j]]=E}else b?this.options.visualElement.renderState.vars[p]=E:l[p]=E}return this.options.layoutId&&(l.pointerEvents=u===this?Yp(o==null?void 0:o.pointerEvents)||"":"none"),l}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var l;return(l=o.currentAnimation)==null?void 0:l.stop(!1)}),this.root.nodes.forEach(yk),this.root.sharedNodes.clear()}}}function See(e){e.updateLayout()}function Bee(e){var r;const t=((r=e.resumeFrom)==null?void 0:r.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=e.layout,{animationType:a}=e.options,o=t.source!==e.layout.source;a==="size"?hi(x=>{const m=o?t.measuredBox[x]:t.layoutBox[x],p=ms(m);m.min=n[x].min,m.max=m.min+p}):GI(a,t.layoutBox,n)&&hi(x=>{const m=o?t.measuredBox[x]:t.layoutBox[x],p=ms(n[x]);m.max=m.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[x].max=e.relativeTarget[x].min+p)});const l=Gu();Kx(l,n,t.layoutBox);const c=Gu();o?Kx(c,e.applyTransform(i,!0),t.measuredBox):Kx(c,n,t.layoutBox);const u=!UI(l);let f=!1;if(!e.resumeFrom){const x=e.getClosestProjectingParent();if(x&&!x.resumeFrom){const{snapshot:m,layout:p}=x;if(m&&p){const y=Qr();Xx(y,t.layoutBox,m.layoutBox);const v=Qr();Xx(v,n,p.layoutBox),qI(y,v)||(f=!0),x.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=y,e.relativeParent=x)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:f})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function Dee(e){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 Fee(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Pee(e){e.clearSnapshot()}function yk(e){e.clearMeasurements()}function Tee(e){e.isLayoutDirty=!1}function Mee(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function vk(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Oee(e){e.resolveTargetDelta()}function Lee(e){e.calcProjection()}function Ree(e){e.resetSkewAndRotation()}function _ee(e){e.removeLeadSnapshot()}function bk(e,t,r){e.translate=_r(t.translate,0,r),e.scale=_r(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function Ck(e,t,r,n){e.min=_r(t.min,r.min,n),e.max=_r(t.max,r.max,n)}function Iee(e,t,r,n){Ck(e.x,t.x,r.x,n),Ck(e.y,t.y,r.y,n)}function $ee(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const zee={duration:.45,ease:[.4,0,.1,1]},wk=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Ek=wk("applewebkit/")&&!wk("chrome/")?Math.round:Ys;function jk(e){e.min=Ek(e.min),e.max=Ek(e.max)}function Vee(e){jk(e.x),jk(e.y)}function GI(e,t,r){return e==="position"||e==="preserve-aspect"&&!qJ(pk(t),pk(r),.2)}function Uee(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const qee=HI({attachResizeListener:(e,t)=>bf(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Gb={current:void 0},KI=HI({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Gb.current){const e=new qee({});e.mount(window),e.setOptions({layoutScroll:!0}),Gb.current=e}return Gb.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Wee={pan:{Feature:lee},drag:{Feature:oee,ProjectionNode:KI,MeasureLayout:_I}};function XI(e,t,r){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let n=document;const i=(r==null?void 0:r[e])??n.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function YI(e,t){const r=XI(e),n=new AbortController,i={passive:!0,...t,signal:n.signal};return[r,i,()=>n.abort()]}function Nk(e){return!(e.pointerType==="touch"||RI())}function Hee(e,t,r={}){const[n,i,a]=YI(e,r),o=l=>{if(!Nk(l))return;const{target:c}=l,u=t(c,l);if(typeof u!="function"||!c)return;const f=x=>{Nk(x)&&(u(x),c.removeEventListener("pointerleave",f))};c.addEventListener("pointerleave",f,i)};return n.forEach(l=>{l.addEventListener("pointerenter",o,i)}),a}function Ak(e,t,r){const{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",r==="Start");const i="onHover"+r,a=n[i];a&&Pr.postRender(()=>a(t,Fh(t)))}let Gee=class extends Tl{mount(){const{current:t}=this.node;t&&(this.unmount=Hee(t,(r,n)=>(Ak(this.node,n,"Start"),i=>Ak(this.node,i,"End"))))}unmount(){}},Kee=class extends Tl{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=Bh(bf(this.node.current,"focus",()=>this.onFocus()),bf(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};const QI=(e,t)=>t?e===t?!0:QI(e,t.parentElement):!1,Xee=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Yee(e){return Xee.has(e.tagName)||e.tabIndex!==-1}const Jp=new WeakSet;function kk(e){return t=>{t.key==="Enter"&&e(t)}}function Kb(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Qee=(e,t)=>{const r=e.currentTarget;if(!r)return;const n=kk(()=>{if(Jp.has(r))return;Kb(r,"down");const i=kk(()=>{Kb(r,"up")}),a=()=>Kb(r,"cancel");r.addEventListener("keyup",i,t),r.addEventListener("blur",a,t)});r.addEventListener("keydown",n,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",n),t)};function Sk(e){return g3(e)&&!RI()}function Zee(e,t,r={}){const[n,i,a]=YI(e,r),o=l=>{const c=l.currentTarget;if(!Sk(l))return;Jp.add(c);const u=t(c,l),f=(p,y)=>{window.removeEventListener("pointerup",x),window.removeEventListener("pointercancel",m),Jp.has(c)&&Jp.delete(c),Sk(p)&&typeof u=="function"&&u(p,{success:y})},x=p=>{f(p,c===window||c===document||r.useGlobalTarget||QI(c,p.target))},m=p=>{f(p,!1)};window.addEventListener("pointerup",x,i),window.addEventListener("pointercancel",m,i)};return n.forEach(l=>{(r.useGlobalTarget?window:l).addEventListener("pointerdown",o,i),l instanceof HTMLElement&&(l.addEventListener("focus",u=>Qee(u,i)),!Yee(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),a}function Bk(e,t,r){const{props:n}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap",r==="Start");const i="onTap"+(r==="End"?"":r),a=n[i];a&&Pr.postRender(()=>a(t,Fh(t)))}let Jee=class extends Tl{mount(){const{current:t}=this.node;t&&(this.unmount=Zee(t,(r,n)=>(Bk(this.node,n,"Start"),(i,{success:a})=>Bk(this.node,i,a?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}};const rw=new WeakMap,Xb=new WeakMap,ete=e=>{const t=rw.get(e.target);t&&t(e)},tte=e=>{e.forEach(ete)};function rte({root:e,...t}){const r=e||document;Xb.has(r)||Xb.set(r,{});const n=Xb.get(r),i=JSON.stringify(t);return n[i]||(n[i]=new IntersectionObserver(tte,{root:e,...t})),n[i]}function nte(e,t,r){const n=rte(t);return rw.set(e,r),n.observe(e),()=>{rw.delete(e),n.unobserve(e)}}const ste={some:0,all:1};let ite=class extends Tl{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:a}=t,o={root:r?r.current:void 0,rootMargin:n,threshold:typeof i=="number"?i:ste[i]},l=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,a&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:f,onViewportLeave:x}=this.node.getProps(),m=u?f:x;m&&m(c)};return nte(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(ate(t,r))&&this.startObserver()}unmount(){}};function ate({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}const ote={inView:{Feature:ite},tap:{Feature:Jee},focus:{Feature:Kee},hover:{Feature:Gee}},lte={layout:{ProjectionNode:KI,MeasureLayout:_I}},Eg={current:null},y3={current:!1};function ZI(){if(y3.current=!0,!!z4)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Eg.current=e.matches;e.addListener(t),t()}else Eg.current=!1}const Cf=new WeakMap;function cte(e,t,r){for(const n in t){const i=t[n],a=r[n];if(un(i))e.addValue(n,i);else if(un(a))e.addValue(n,Ic(i,{owner:e}));else if(a!==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,Ic(o!==void 0?o:i,{owner:e}))}}for(const n in r)t[n]===void 0&&e.removeValue(n);return t}const JI=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),e$=e=>/^0[^.\s]+$/u.test(e),ute={test:e=>e==="auto",parse:e=>e},t$=e=>t=>t.test(e),r$=[l0,kt,Aa,Jo,BQ,SQ,ute],Dk=e=>r$.find(t$(e)),dte=[...r$,Zn,jl],xte=e=>dte.find(t$(e)),fte=new Set(["brightness","contrast","saturate","opacity"]);function hte(e){const[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=r.match(s3)||[];if(!n)return e;const i=r.replace(n,"");let a=fte.has(t)?1:0;return n!==r&&(a*=100),t+"("+a+i+")"}const mte=/\b([a-z-]*)\(.*?\)/gu,nw={...jl,getAnimatableNone:e=>{const t=e.match(mte);return t?t.map(hte).join(" "):e}},pte={...X4,color:Zn,backgroundColor:Zn,outlineColor:Zn,fill:Zn,stroke:Zn,borderColor:Zn,borderTopColor:Zn,borderRightColor:Zn,borderBottomColor:Zn,borderLeftColor:Zn,filter:nw,WebkitFilter:nw},n$=e=>pte[e];function s$(e,t){let r=n$(e);return r!==nw&&(r=jl),r.getAnimatableNone?r.getAnimatableNone(t):void 0}const Fk=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let i$=class{scrapeMotionValuesFromProps(t,r,n){return{}}constructor({parent:t,props:r,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:a,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=x3,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=Ls.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,Pr.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=r.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=r,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=l,this.blockInitialAnimation=!!a,this.isControllingVariants=sy(r),this.isVariantNode=M_(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...x}=this.scrapeMotionValuesFromProps(r,{},this);for(const m in x){const p=x[m];c[m]!==void 0&&un(p)&&p.set(c[m],!1)}}mount(t){this.current=t,Cf.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)),y3.current||ZI(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Eg.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),po(this.notifyUpdate),po(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=o0.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=r.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&Pr.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),a=r.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{i(),a(),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 Nd){const r=Nd[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 a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Qr()}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<Fk.length;n++){const i=Fk[n];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const a="on"+i,o=t[a];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=cte(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=Ic(r===null?void 0:r,{owner:this}),this.addValue(t,n)),n}readValue(t,r){let n=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return n!=null&&(typeof n=="string"&&(JI(n)||e$(n))?n=parseFloat(n):!xte(n)&&jl.test(r)&&(n=s$(t,r)),this.setBaseTarget(t,un(n)?n.get():n)),un(n)?n.get():n}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){var a;const{initial:r}=this.props;let n;if(typeof r=="string"||typeof r=="object"){const o=J4(this.props,r,(a=this.presenceContext)==null?void 0:a.custom);o&&(n=o[t])}if(r&&n!==void 0)return n;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!un(i)?i:this.initialValues[t]!==void 0&&n===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new r3),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}};const gte=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function yte(e){const t=gte.exec(e);if(!t)return[,];const[,r,n,i]=t;return[`--${r??n}`,i]}function a$(e,t,r=1){const[n,i]=yte(e);if(!n)return;const a=window.getComputedStyle(t).getPropertyValue(n);if(a){const o=a.trim();return JI(o)?parseFloat(o):o}return K4(i)?a$(i,t,r+1):i}function vte(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||e$(e):!0}const bte=new Set(["auto","none","0"]);function Cte(e,t,r){let n=0,i;for(;n<e.length&&!i;){const a=e[n];typeof a=="string"&&!bte.has(a)&&yf(a).values.length&&(i=e[n]),n++}if(i&&r)for(const a of t)e[a]=s$(r,i)}let wte=class extends x3{constructor(t,r,n,i,a){super(t,r,n,i,a,!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 u=t[c];if(typeof u=="string"&&(u=u.trim(),K4(u))){const f=a$(u,r.current);f!==void 0&&(t[c]=f),c===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!NI.has(n)||t.length!==2)return;const[i,a]=t,o=Dk(i),l=Dk(a);if(o!==l)if(LA(o)&&LA(l))for(let c=0;c<t.length;c++){const u=t[c];typeof u=="string"&&(t[c]=parseFloat(u))}else Dc[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:r}=this,n=[];for(let i=0;i<t.length;i++)(t[i]===null||vte(t[i]))&&n.push(i);n.length&&Cte(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=Dc[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 l;const{element:t,name:r,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const i=t.getValue(r);i&&i.jump(this.measuredOrigin,!1);const a=n.length-1,o=n[a];n[a]=Dc[r](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(l=this.removedTransforms)!=null&&l.length&&this.removedTransforms.forEac
50h(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}},o$=class extends i${constructor(){super(...arguments),this.KeyframeResolver=wte}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;un(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}};function l$(e,{style:t,vars:r},n,i){Object.assign(e.style,t,i&&i.getProjectionStyles(n));for(const a in r)e.style.setProperty(a,r[a])}function Ete(e){return window.getComputedStyle(e)}let c$=class extends o${constructor(){super(...arguments),this.type="html",this.renderInstance=l$}readValueFromInstance(t,r){if(o0.has(r))return JZ(t,r);{const n=Ete(t),i=(G4(r)?n.getPropertyValue(r):n[r])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:r}){return TI(t,r)}build(t,r,n){Y4(t,r,n.transformTemplate)}scrapeMotionValuesFromProps(t,r,n){return e3(t,r,n)}};const u$=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 jte(e,t,r,n){l$(e,t,void 0,n);for(const i in t.attrs)e.setAttribute(u$.has(i)?i:q4(i),t.attrs[i])}let d$=class extends o${constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Qr}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(o0.has(r)){const n=n$(r);return n&&n.default||0}return r=u$.has(r)?r:q4(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,n){return H_(t,r,n)}
50build(t,r,n){V_(t,r,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,r,n,i){jte(t,r,n,i)}mount(t){this.isSVGTag=q_(t.tagName),super.mount(t)}};const Nte=(e,t)=>Z4(e)?new d$(t):new c$(t,{allowProjection:e!==C.Fragment}),Ate=GQ({...LJ,...ote,...Wee,...lte},Nte),Z=fQ(Ate);function oy(e){const t=El(()=>Ic(e)),{isStatic:r}=C.useContext(_c);if(r){const[,n]=C.useState(e);C.useEffect(()=>t.on("change",n),[])}return t}function x$(e,t){const r=oy(t()),n=()=>r.set(t());return n(),ey(()=>{const i=()=>Pr.preRender(n,!1,!0),a=e.map(o=>o.on("change",i));return()=>{a.forEach(o=>o()),po(n)}}),r}function kte(e,t={}){const{isStatic:r}=C.useContext(_c),n=C.useRef(null),i=El(()=>un(e)?e.get():e),a=El(()=>typeof i=="string"?i.replace(/[\d.-]/g,""):void 0),o=oy(i),l=C.useRef(i),c=C.useRef(Ys),u=()=>{f(),n.current=new ay({keyframes:[Tk(o.get()),Tk(l.current)],velocity:o.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...t,onUpdate:c.current})},f=()=>{n.current&&n.current.stop()};return C.useInsertionEffect(()=>o.attach((x,m)=>r?m(x):(l.current=x,c.current=p=>m(Pk(p,a)),Pr.postRender(u),o.get()),f),[JSON.stringify(t)]),ey(()=>{if(un(e))return e.on("change",x=>o.set(Pk(x,a)))},[o,a]),o}function Pk(e,t){return t?e+t:e}function Tk(e){return typeof e=="number"?e:parseFloat(e)}function Ste(e){qx.current=[],e();const t=x$(qx.current,e);return qx.current=void 0,t}function Bte(...e){const t=!Array.isArray(e[0]),r=t?0:-1,n=e[0+r],i=e[1+r],a=e[2+r],o=e[3+r],l=iI(i,a,o);return t?l(n):l}function Lx(e,t,r,n){if(typeof e=="function")return Ste(e);const i=typeof t=="function"?t:Bte(t,r,n);return Array.isArray(e)?Mk(e,i):Mk([e],([a])=>i(a))}function Mk(e,t){const r=El(()=>[]);return x$(e,()=>{r.length=0;const n=e.length;for(let i=0;i<n;i++)r[i]=e[i].get();return t(r)})}function Ph(){!y3.current&&ZI();const[e]=C.useState(Eg.current);return e}function v3(e){return typeof e=="object"&&!Array.isArray(e)}function f$(e,t,r,n){return typeof e=="string"&&v3(t)?XI(e,r,n):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function Dte(e,t,r){return e*(t+1)}function Ok(e,t,r,n){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?r:n.get(t)??e}const Fte=(e,t,r)=>{const n=t-e;return((r-e)%n+n)%n+e};function h$(e,t){return uI(e)?e[Fte(0,e.length,t)]:e}function Pte(e,t,r){for(let n=0;n<e.length;n++){const i=e[n];i.at>t&&i.at<r&&(iy(e,i),n--)}}function Tte(e,t,r,n,i,a){Pte(e,i,a);for(let o=0;o<t.length;o++)e.push({value:t[o],at:_r(i,a,n[o]),easing:h$(r,o)})}function Mte(e,t){for(let r=0;r<e.length;r++)e[r]=e[r]/(t+1)}function Ote(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const Lte="easeInOut";function Rte(e,{defaultTransition:t={},...r}={},n,i){const a=t.duration||.3,o=new Map,l=new Map,c={},u=new Map;let f=0,x=0,m=0;for(let p=0;p<e.length;p++){const y=e[p];if(typeof y=="string"){u.set(y,x);continue}else if(!Array.isArray(y)){u.set(y.name,Ok(x,y.at,f,u));continue}let[v,b,E={}]=y;E.at!==void 0&&(x=Ok(x,E.at,f,u));let N=0;const j=(A,w,S,B=0,D=0)=>{const P=_te(A),{delay:O=0,times:M=oI(P),type:I="keyframes",repeat:V,repeatType:W,repeatDelay:_=0,...z}=w;let{ease:R=t.ease||"easeOut",duration:q}=w;const G=typeof O=="function"?O(B,D):O,K=P.length,$=h3(I)?I:i==null?void 0:i[I];if(K<=2&&$){let Y=100;if(K===2&&zte(P)){const he=P[1]-P[0];Y=Math.abs(he)}const J={...z};q!==void 0&&(J.duration=Yi(q));const oe=nI(J,Y,$);R=oe.ease,q=oe.duration}q??(q=a);const H=x+G;M.length===1&&M[0]===0&&(M[1]=1);const te=M.length-P.length;if(te>0&&aI(M,te),P.length===1&&P.unshift(null),V){q=Dte(q,V);const Y=[...P],J=[...M];R=Array.isArray(R)?[...R]:[R];const oe=[...R];for(let he=0;he<V;he++){P.push(...Y);for(let Q=0;Q<Y.length;Q++)M.push(J[Q]+(he+1)),R.push(Q===0?"linear":h$(oe,Q-1))}Mte(M,V)}const ne=H+q;Tte(S,P,R,M,H,ne),N=Math.max(G+q,N),m=Math.max(ne,m)};if(un(v)){const A=Lk(v,l);j(b,E,Rk("default",A))}else{const A=f$(v,b,n,c),w=A.length;for(let S=0;S<w;S++){b=b,E=E;const B=A[S],D=Lk(B,l);for(const P in b)j(b[P],Ite(E,P),Rk(P,D),S,w)}}f=x,x+=N}return l.forEach((p,y)=>{for(const v in p){const b=p[v];b.sort(Ote);const E=[],N=[],j=[];for(let w=0;w<b.length;w++){const{at:S,value:B,easing:D}=b[w];E.push(B),N.push(Ad(0,m,S)),j.push(D||"easeOut")}N[0]!==0&&(N.unshift(0),E.unshift(E[0]),j.unshift(Lte)),N[N.length-1]!==1&&(N.push(1),E.push(null)),o.has(y)||o.set(y,{keyframes:{},transition:{}});const A=o.get(y);A.keyframes[v]=E,A.transition[v]={...t,duration:m,ease:j,times:N,...r}}}),o}function Lk(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Rk(e,t){return t[e]||(t[e]=[]),t[e]}function _te(e){return Array.isArray(e)?e:[e]}function Ite(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const $te=e=>typeof e=="number",zte=e=>e.every($te);function Vte(e,t){return e in t}class Ute extends i${constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,r){if(Vte(r,t)){const n=t[r];
50if(typeof n=="string"||typeof n=="number")return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,r){delete r.output[t]}measureInstanceViewportBox(){return Qr()}build(t,r){Object.assign(t.output,r)}renderInstance(t,{output:r}){Object.assign(t,r)}sortInstanceNodePosition(){return 0}}function qte(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},r=$I(e)?new d$(t):new c$(t);r.mount(e),Cf.set(e,r)}function Wte(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},r=new Ute(t);r.mount(e),Cf.set(e,r)}function Hte(e,t){return un(e)||typeof e=="number"||typeof e=="string"&&!v3(t)}function m$(e,t,r,n){const i=[];if(Hte(e,t))i.push(II(e,v3(t)&&t.default||t,r&&(r.default||r)));else{const a=f$(e,t,n),o=a.length;for(let l=0;l<o;l++){const c=a[l],u=c instanceof Element?qte:Wte;Cf.has(c)||u(c);const f=Cf.get(c),x={...r};"delay"in x&&typeof x.delay=="function"&&(x.delay=x.delay(l,o)),i.push(...p3(f,{...t,transition:x},{}))}}return i}function Gte(e,t,r){const n=[];return Rte(e,t,r,{spring:vf}).forEach(({keyframes:a,transition:o},l)=>{n.push(...m$(l,a,o))}),n}class Kte{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}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){const r=this.animations.map(n=>n.attachTimeline(t));return()=>{r.forEach((n,i)=>{n&&n(),this.animations[i].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 state(){return this.getAll("state")}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]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class Xte extends Kte{then(t,r){return this.finished.finally(t).then(()=>{})}}function Yte(e){return Array.isArray(e)&&e.some(Array.isArray)}function Qte(e){function t(r,n,i){let a=[];return Yte(r)?a=Gte(r,n,e):a=m$(r,n,i,e),new Xte(a)}return t}const _k=Qte(),Zte={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none"},L=C.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r,absoluteStrokeWidth:n=!1,className:i="",altIcon:a,showAlt:o=!1,icon:l,primaryColor:c,secondaryColor:u,disableSecondaryOpacity:f=!1,...x},m)=>{const p=r!==void 0?n?Number(r)*24/Number(t):r:void 0,y=p!==void 0?{strokeWidth:p,stroke:"currentColor"}:{},v={ref:m,...Zte,width:t,height:t,color:c||e,className:i,...y,...x},E=[...o&&a?a:l].sort(([,N],[,j])=>{const A=N.opacity!==void 0;return j.opacity!==void 0?1:A?-1:0}).map(([N,j])=>{const A=j.opacity!==void 0,w=A&&!f?j.opacity:void 0,S=u?{...j.stroke!==void 0?{stroke:A?u:c||e}:{fill:A?u:c||e}}:{};return C.createElement(N,{...j,...y,...S,opacity:w,key:j.key})});return C.createElement("svg",v,E)});L.displayName="HugeiconsIcon";const Jte=[["path",{d:"M13.427 8.08396C12.8007 5.84272 12.3226 4 11.0004 4C9.67824 4 9.19964 5.84274 8.5731 8.08399C8.31853 8.99465 8.19125 9.44998 7.82042 9.82077C7.4496 10.1916 6.99434 10.3188 6.08381 10.5732C3.84273 11.1995 2 11.6775 2 13C2 14.3225 3.84273 14.8005 6.08381 15.4268C6.99434 15.6812 7.4496 15.8084 7.82042 16.1792C8.19125 16.55 8.31853 17.0054 8.5731 17.916C9.19964 20.1573 9.67824 22 11.0004 22C12.3226 22 12.8007 20.1573 13.427 17.916C13.6815 17.0054 13.8087 16.5501 14.1795 16.1793C14.5504 15.8085 15.0056 15.6812 15.9162 15.4268C18.1573 14.8005 20 14.3225 20 13C20 11.6775 18.1573 11.1995 15.9162 10.5732C15.0056 10.3188 14.5504 10.1915 14.1795 9.8207C13.8087 9.44986 13.6815 8.99456 13.427 8.08396Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M19.5 2.9375V4.5M19.5 4.5V6.0625M19.5 4.5H18.25M19.5 4.5H20.75M22 4.5L21.548 4.34934C20.8497 4.11658 20.5006 4.00019 20.2502 3.74981C19.9998 3.49942 19.8834 3.15027 19.6507 2.45198L19.5 2L19.3493 2.45198C19.1166 3.15027 19.0002 3.49942 18.7498 3.74981C18.4994 4.00019 18.1503 4.11658 17.452 4.34934L17 4.5L17.452 4.65066C18.1503 4.88342 18.4994 4.99981 18.7498 5.25019C19.0002 5.50058 19.1166 5.84973 19.3493 6.54802L19.5 7L19.6507 6.54802C19.8834 5.84973 19.9998 5.50058 20.2502 5.25019C20.5006 4.99981 20.8497 4.88342 21.548 4.65066L22 4.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],b3=[["path",{d:"M13.9248 21H10.0752C5.44476 21 3.12955 21 2.27636 19.4939C1.42317 17.9879 2.60736 15.9914 4.97574 11.9985L6.90057 8.75333C9.17559 4.91778 10.3131 3 12 3C13.6869 3 14.8244 4.91777 17.0994 8.75332L19.0243 11.9985C21.3926 15.9914 22.5768 17.9879 21.7236 19.4939C20.8704 21 18.5552 21 13.9248 21Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M12 9V13",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M12.125 16.75H12M12.25 16.75C12.25 16.8881 12.1381 17 12 17C11.8619 17 11.75 16.8881 11.75 16.75C11.75 16.6119 11.8619 16.5 12 16.5C12.1381 16.5 12.25 16.6119 12.25 16.75Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],Nl=[["circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M12 8V12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M12.125 15.75H12M12.25 15.75C12.25 15.8881 12.1381 16 12 16C11.8619 16 11.75 15.8881 11.75 15.75C11.75 15.6119 11.8619 15.5 12 15.5C12.1381 15.5 12.25 15.6119 12.25 15.75Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],Yb=[["path",{d:"M7 21H16.9999C19.3569 21 20.5354 21 21.2677 20.2678C21.9999 19.5355 21.9999 18.357 21.9999 16C21.9999 13.643 21.9999 12.4645 21.2677 11.7322C20.5354 11 19.3569 11 16.9999 11H7C4.64302 11 3.46453 11 2.7323 11.7322C2.00007 12.4644 2.00005 13.6429 2 15.9999C1.99995 18.357 1.99993 19.5355 2.73217 20.2677C3.4644 21 4.64294 21 7 21Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M4 11C4.00005 9.59977 4.00008 8.89966 4.27263 8.36485C4.5123 7.89455 4.89469 7.51218 5.365 7.27253C5.89981 7 6.59993 7 8.00015 7H16C17.4001 7 18.1002 7 18.635 7.27248C19.1054 7.51217 19.4878 7.89462 19.7275 8.36502C20 8.8998 20 9.59987 20 11",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M6 7C6.00004 5.5998 6.00006 4.89969 6.27259 4.3649C6.51227 3.89457 6.89467 3.51218 7.36501 3.27252C7.89981 3 8.59991 3 10.0001 3H14C15.4001 3 16.1002 3 16.635 3.27248C1
507.1054 3.51217 17.4878 3.89462 17.7275 4.36502C18 4.8998 18 5.59987 18 7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M16 15L15.7 15.4C15.1111 16.1851 14.8167 16.5777 14.3944 16.7889C13.9721 17 13.4814 17 12.5 17H11.5C10.5186 17 10.0279 17 9.60557 16.7889C9.18328 16.5777 8.88885 16.1851 8.3 15.4L8 15",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}]],ly=[["path",{d:"M18 9.00005C18 9.00005 13.5811 15 12 15C10.4188 15 6 9 6 9",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],c0=[["path",{d:"M15 6C15 6 9.00001 10.4189 9 12C8.99999 13.5812 15 18 15 18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],ere=[["path",{d:"M20.5 5.5H9.5C5.78672 5.5 3 8.18503 3 12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M3.5 18.5H14.5C18.2133 18.5 21 15.815 21 12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M18.5 3C18.5 3 21 4.84122 21 5.50002C21 6.15882 18.5 8 18.5 8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M5.49998 16C5.49998 16 3.00001 17.8412 3 18.5C2.99999 19.1588 5.5 21 5.5 21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}]],Mn=[["path",{d:"M9.00005 6C9.00005 6 15 10.4189 15 12C15 13.5812 9 18 9 18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],Qb=[["path",{d:"M11 6H15.5C17.9853 6 20 8.01472 20 10.5C20 12.9853 17.9853 15 15.5 15H4",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M6.99998 12C6.99998 12 4.00001 14.2095 4 15C3.99999 15.7906 7 18 7 18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],tre=[["path",{d:"M13 6H8.5C6.01472 6 4 8.01472 4 10.5C4 12.9853 6.01472 15 8.5 15H20",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M17 12C17 12 20 14.2095 20 15C20 15.7906 17 18 17 18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],Th=[["path",{d:"M17.9998 15C17.9998 15 13.5809 9.00001 11.9998 9C10.4187 8.99999 5.99985 15 5.99985 15",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],rre=[["path",{d:"M9 6.65032C9 6.65032 15.9383 6.10759 16.9154 7.08463C17.8924 8.06167 17.3496 15 17.3496 15M16.5 7.5L6.5 17.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],Ik=[["path",{d:"M19.5 12.0001V13.5001C19.5 17.6422 16.1421 21.0001 12 21.0001C7.85786 21.0001 4.5 17.6422 4.5 13.5001V8C4.5 5.23858 6.73858 3 9.5 3C12.2614 3 14.5 5.23858 14.5 8V13.5C14.5 14.8807 13.3807 16 12 16C10.6193 16 9.5 14.8807 9.5 13.5V9.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],$k=[["path",{d:"M15.9349 21.033C16.1789 21.5331 15.699 22 15.1239 22H8.87606C8.30096 22 7.82107 21.5331 8.06509 21.033C8.63149 19.8722 10.1793 19 12 19C13.8207 19 15.3685 19.8722 15.9349 21.033Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M12 16L11.9883 19",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M17.9866 4.49139C17.992 4.30176 17.9963 4.11477 17.9997 3.93095C18.0194 2.86463 17.1162 2.00002 16.0093 2.00002L7.99052 2C6.88381 2 5.98074 2.86438 6.00031 3.93054C6.00358 4.10833 6.00768 4.28907 6.01283 4.47231C6.05734 6.05627 6.18024 7.82593 6.51875 9.47415C7.18043 12.6958 8.66606 16 12.0001 16C15.3341 16 16.8193 12.6958 17.481 9.47415C17.8181 7.83255 17.9415 6.07048 17.9866 4.49139Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M18 4.5L19.4447 4.68748C20.9062 4.87714 22 6.122 22 7.59578C22 8.99373 21.0133 10.1973 19.6425 10.4715L17.5 11",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}],["path",{d:"M6 4.5L4.55527 4.68748C3.09375 4.87714 2 6.122 2 7.59578C2 8.99373 2.98673 10.1973 4.35754 10.4715L6.5 11",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"4"}]],nre=[["path",{d:"M4.06492 12.6258C4.31931 13.8374 5.67295 14.7077 8.38024 16.4481C11.3247 18.3411 12.797 19.2876 13.9895 18.9229C14.3934 18.7994 14.7654 18.5823 15.0777 18.2876C16 17.4178 
5016 15.6118 16 12C16 8.38816 16 6.58224 15.0777 5.71235C14.7654 5.41773 14.3934 5.20057 13.9895 5.07707C12.797 4.71243 11.3247 5.6589 8.38024 7.55186C5.67295 9.29233 4.31931 10.1626 4.06492 11.3742C3.97836 11.7865 3.97836 12.2135 4.06492 12.6258Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M20 5V19",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"1"}]],p$=[["path",{d:"M12 2C6.47716 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M12 5C8.13401 5 5 8.134 5 12C5 15.866 8.13401 19 12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M12 2V5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M12 19V22",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"3"}],["path",{d:"M3.33972 7L5.9378 8.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"4"}],["path",{d:"M18.0625 15.5L20.6606 17",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"5"}],["path",{d:"M20.6603 7L18.0622 8.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"6"}],["path",{d:"M5.9375 15.5L3.33942 17",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"7"}],["path",{d:"M10.4375 14.6667L10.4375 9.33333M12 9.33333V8M12 16V14.6667M10.4375 12H13.5625M13.5625 12C14.0803 12 14.5 12.4477 14.5 13V13.6667C14.5 14.219 14.0803 14.6667 13.5625 14.6667H9.5M13.5625 12C14.0803 12 14.5 11.5523 14.5 11V10.3333C14.5 9.78105 14.0803 9.33333 13.5625 9.33333H9.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"8"}]],jg=[["path",{d:"M7.99978 3.5H6.60021C4.43183 3.5 3.34764 3.5 2.67399 4.17362C2.00034 4.84724 2.00029 5.93144 2.00021 8.09982L2 13.3998C1.99992 15.5684 1.99987 16.6526 2.67353 17.3263C3.34719 18 4.43146 18 6.6 18H8.95042C10.4329 18 11.7092 19.0464 11.9999 20.5V5.5C11.0556 4.24097 9.99989 3.5 7.99978 3.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M16.0001 3.5H17.3997C19.5681 3.5 20.6523 3.5 21.3259 4.17362C21.9996 4.84724 21.9996 5.93144 21.9997 8.09982L21.9999 13.3998C22 15.5684 22 16.6526 21.3264 17.3263C20.6527 18 19.5684 18 17.3999 18H15.0495C13.567 18 12.2907 19.0464 12 20.5V5.5C12.9443 4.24097 14 3.5 16.0001 3.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],sre=[["path",{d:"M13 7H11C8.19108 7 6.78661 7 5.77772 7.67412C5.34096 7.96596 4.96596 8.34096 4.67412 8.77772C4 9.78661 4 11.1911 4 14C4 16.8089 4 18.2134 4.67412 19.2223C4.96596 19.659 5.34096 20.034 5.77772 20.3259C6.78661 21 8.19108 21 11 21H13C15.8089 21 17.2134 21 18.2223 20.3259C18.659 20.034 19.034 19.659 19.3259 19.2223C20 18.2134 20 16.8089 20 14C20 11.1911 20 9.78661 19.3259 8.77772C19.034 8.34096 18.659 7.96596 18.2223 7.67412C17.2134 7 15.8089 7 13 7Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M4 14H2",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M10 17H14",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M22 14H20",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}],["path",{d:"M15 11V13",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"4"}],["path",{d:"M9 11V13",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"5"}],["path",{d:"M12 7C12 5.11438 12 4.17157 11.4142 3.58579C10.8284 3 9.88562 3 8 3",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"6"}]],ire=[["path",{d:"M2.00127 8.5L1.99911 13.997C1.99782 17.2979 1.99717 18.9484 3.02235 19.974C4.04754 20.9996 5.69801 20.9996 8.99895 20.9997L15 20.9998C18.2994 20.9999 19.949 21 20.9741 19.9751C21.9992 18.9502 21.9996 17.3005 22.0002 14.0012L22.0013 8.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M8.49857 6.5C8.49857 5.09554 8.49857 4.39331 8.83563 3.88886C8.98154 3.67048 9.16904 3.48298 9.38743 3.33706C9.89
50187 3 10.5941 3 11.9986 3C13.403 3 14.1053 3 14.6097 3.33706C14.8281 3.48298 15.0156 3.67048 15.1615 3.88886C15.4986 4.39331 15.4986 5.09554 15.4986 6.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M19.998 6.50016L3.99885 6.5C2.8944 6.50007 1.99876 7.39568 1.99866 8.50013C1.99876 10.7091 3.79005 12.5004 5.99901 12.5006H17.9978C20.2068 12.5005 21.998 10.7093 21.9981 8.5003C21.998 7.39582 21.1024 6.50023 19.998 6.50016Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M9.99857 12.5V13.5C9.99857 13.965 9.99857 14.1975 10.0497 14.3882C10.1884 14.9059 10.5927 15.3102 11.1103 15.4489C11.3011 15.5 11.5336 15.5 11.9986 15.5C12.4636 15.5 12.696 15.5 12.8868 15.4489C13.4044 15.3102 13.8088 14.9059 13.9475 14.3882C13.9986 14.1975 13.9986 13.965 13.9986 13.5V12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}]],are=[["path",{d:"M16 2V6M8 2V6",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M13 4H11C7.22876 4 5.34315 4 4.17157 5.17157C3 6.34315 3 8.22876 3 12V14C3 17.7712 3 19.6569 4.17157 20.8284C5.34315 22 7.22876 22 11 22H13C16.7712 22 18.6569 22 19.8284 20.8284C21 19.6569 21 17.7712 21 14V12C21 8.22876 21 6.34315 19.8284 5.17157C18.6569 4 16.7712 4 13 4Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M3 10H21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M12.1258 14H12.0008M12.1258 18H12.0008M7.625 14H7.5M7.625 18H7.5M16.625 14H16.5M12.2508 14C12.2508 14.1381 12.1389 14.25 12.0008 14.25C11.8628 14.25 11.7508 14.1381 11.7508 14C11.7508 13.8619 11.8628 13.75 12.0008 13.75C12.1389 13.75 12.2508 13.8619 12.2508 14ZM12.2508 18C12.2508 18.1381 12.1389 18.25 12.0008 18.25C11.8628 18.25 11.7508 18.1381 11.7508 18C11.7508 17.8619 11.8628 17.75 12.0008 17.75C12.1389 17.75 12.2508 17.8619 12.2508 18ZM7.75 14C7.75 14.1381 7.63807 14.25 7.5 14.25C7.36193 14.25 7.25 14.1381 7.25 14C7.25 13.8619 7.36193 13.75 7.5 13.75C7.63807 13.75 7.75 13.8619 7.75 14ZM7.75 18C7.75 18.1381 7.63807 18.25 7.5 18.25C7.36193 18.25 7.25 18.1381 7.25 18C7.25 17.8619 7.36193 17.75 7.5 17.75C7.63807 17.75 7.75 17.8619 7.75 18ZM16.75 14C16.75 14.1381 16.6381 14.25 16.5 14.25C16.3619 14.25 16.25 14.1381 16.25 14C16.25 13.8619 16.3619 13.75 16.5 13.75C16.6381 13.75 16.75 13.8619 16.75 14Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}]],Ji=[["path",{d:"M9.1585 5.71217L8.75584 4.80619C8.49256 4.21382 8.36092 3.91762 8.16405 3.69095C7.91732 3.40688 7.59571 3.19788 7.23592 3.08779C6.94883 2.99994 6.6247 2.99994 5.97645 2.99994C5.02815 2.99994 4.554 2.99994 4.15597 3.18223C3.68711 3.39696 3.26368 3.86322 3.09497 4.35054C2.95175 4.76423 2.99278 5.18937 3.07482 6.03964C3.94815 15.0901 8.91006 20.052 17.9605 20.9254C18.8108 21.0074 19.236 21.0484 19.6496 20.9052C20.137 20.7365 20.6032 20.3131 20.818 19.8442C21.0002 19.4462 21.0002 18.972 21.0002 18.0237C21.0002 17.3755 21.0002 17.0514 20.9124 16.7643C20.8023 16.4045 20.5933 16.0829 20.3092 15.8361C20.0826 15.6393 19.7864 15.5076 19.194 15.2443L18.288 14.8417C17.6465 14.5566 17.3257 14.414 16.9998 14.383C16.6878 14.3533 16.3733 14.3971 16.0813 14.5108C15.7762 14.6296 15.5066 14.8543 14.9672 15.3038C14.4304 15.7511 14.162 15.9748 13.834 16.0946C13.5432 16.2009 13.1588 16.2402 12.8526 16.1951C12.5071 16.1442 12.2426 16.0028 11.7135 15.7201C10.0675 14.8404 9.15977 13.9327 8.28011 12.2867C7.99738 11.7576 7.85602 11.4931 7.80511 11.1476C7.75998 10.8414 7.79932 10.457 7.90554 10.1662C8.02536 9.83822 8.24905 9.5698 8.69643 9.03294C9.14586 8.49362 9.37058 8.22396 9.48939 7.91885C9.60309 7.62688 9.64686 7.31234 9.61719 7.00042C9.58618 6.67446 9.44362 6.3537 9.1585 5.71217Z",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}]],gt=[["path",{d:"M18 6L6.00081 17.9992M17.9992 18L6 6.00085",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],C3=[["path",{d:"M22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M14.9994 15L9 9M9.00064 15L15 9",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],u0=[["path",{d:"M13.0004 16.9995C12.9967 18.8613 13.8631 19.8565 14.7895 20.7919C14.9216 20.9253 14.9965 21.105 14.9965 21.2927C14.9965 21.6835 14.6796 22.0004 14.2887 22.0004H9.70419C9.31332 22.0004 8.99646 21.6835 8.99646 21.2927C8.99646 21.105 9.07133 20.9253 9.20342 20.7919C10.1299 19.8565 10.9967 18.8613 11.0004 16.9995",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M18.0668 3.99951H19.5668C20.671 3.99951 21.5922 4.89546 21.4921 5.99518C21.2546 8.60305 20.19 12.3569 16.0004 13.4995",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M5.93312 3.99951H4.43312C3.32885 3.99951 2.40769 4.89546 2.50783 5.99518C2.74531 8.60305 3.80988 12.3569 7.99953 13.4995",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M12.0881 16.9995C16.0144 16.9995 17.6206 9.25521 17.9947 4.02001C18.0741 2.90913 17.1609 1.99951 16.0318 1.99951H7.9
506852C6.83985 1.99951 5.92573 2.90839 6.00422 4.01895C6.37529 9.26941 7.97514 16.9995 11.832 16.9995H12.0881Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}]],Zb=[["path",{d:"M4 15L4 19",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M12 9L12 19",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M22 22L2 22",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M20 13L20 19",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}],["path",{d:"M5.60009 8.79993C5.23521 8.31419 4.6543 8 4 8C2.89543 8 2 8.89543 2 10C2 11.1046 2.89543 12 4 12C5.10457 12 6 11.1046 6 10C6 9.54973 5.8512 9.13421 5.60009 8.79993ZM5.60009 8.79993L10.3999 5.20007M10.3999 5.20007C10.7648 5.68581 11.3457 6 12 6C12.783 6 13.4609 5.55006 13.7892 4.89462M10.3999 5.20007C10.1488 4.86579 10 4.45027 10 4C10 2.89543 10.8954 2 12 2C13.1046 2 14 2.89543 14 4C14 4.32158 13.9241 4.62543 13.7892 4.89462M13.7892 4.89462L18.2108 7.10538M18.2108 7.10538C18.0759 7.37457 18 7.67842 18 8C18 9.10457 18.8954 10 20 10C21.1046 10 22 9.10457 22 8C22 6.89543 21.1046 6 20 6C19.217 6 18.5391 6.44994 18.2108 7.10538Z",stroke:"currentColor",strokeWidth:"1.5",key:"4"}]],g$=[["path",{d:"M21 21H10C6.70017 21 5.05025 21 4.02513 19.9749C3 18.9497 3 17.2998 3 14V3",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M7.99707 16.999C11.5286 16.999 18.9122 15.5348 18.6979 6.43269M16.4886 8.04302L18.3721 6.14612C18.5656 5.95127 18.8798 5.94981 19.0751 6.14286L20.9971 8.04302",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],zk=[["circle",{cx:"8.5",cy:"10.5",r:"1.5",stroke:"currentColor",strokeWidth:"1.5",key:"0"}],["circle",{cx:"14.5",cy:"15.5",r:"1.5",stroke:"currentColor",strokeWidth:"1.5",key:"1"}],["circle",{cx:"18.5",cy:"7.5",r:"1.5",stroke:"currentColor",strokeWidth:"1.5",key:"2"}],["path",{d:"M15.4341 14.2963L18 9M9.58251 11.5684L13.2038 14.2963M3 19L7.58957 11.8792",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}],["path",{d:"M20 21H9C5.70017 21 4.05025 21 3.02513 19.9749C2 18.9497 2 17.2998 2 14V3",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"4"}]],Sa=[["path",{d:"M22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12Z",stroke:"currentColor",strokeWidth:"1.5",key:"0"}],["path",{d:"M8 12.5L10.5 15L16 9",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],w3=[["circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"1.5",key:"0"}],["path",{d:"M12 8V12L14 14",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],ore=[["path",{d:"M17.4776 10.0001C17.485 10 17.4925 10 17.5 10C19.9853 10 22 12.0147 22 14.5C22 16.9853 19.9853 19 17.5 19H7C4.23858 19 2 16.7614 2 14C2 11.4003 3.98398 9.26407 6.52042 9.0227M17.4776 10.0001C17.4924 9.83536 17.5 9.66856 17.5 9.5C17.5 6.46243 15.0376 4 12 4C9.12324 4 6.76233 6.20862 6.52042 9.0227M17.4776 10.0001C17.3753 11.1345 16.9286 12.1696 16.2428 13M6.52042 9.0227C6.67826 9.00768 6.83823 9 7 9C8.12582 9 9.16474 9.37209 10.0005 10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],y$=[["path",{d:"M17.4776 9.01106C17.485 9.01102 17.4925 9.01101 17.5 9.01101C19.9853 9.01101 22 11.0294 22 13.5193C22 15.8398 20.25 17.7508 18 18M17.4776 9.01106C17.4924 8.84606 17.5 8.67896 17.5 8.51009C17.5 5.46695 15.0376 3 12 3C9.12324 3 6.76233 5.21267 6.52042 8.03192M17.4776 9.01106C17.3753 10.1476 16.9286 11.1846 16.2428 12.0165M6.52042 8.03192C3.98398 8.27373 2 10.4139 2 13.0183C2 15.4417 3.71776 17.4632 6 17.9273M6.52042 8.03192C6.67826 8.01687 6.83823 8.00917 7 8.00917C8.12582 8.00917 9.16474 8.38194 10.0005 9.01101",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M12 13L12 21M12 13C11.2998 13 9.99153 14.9943 9.5 15.5M12 13C12.7002 13 14.0085 14.9943 14.5 15.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],v$=[["ellipse",{cx:"15.5",cy:"11",rx:"6.5",ry:"2",stroke:"currentColor",strokeWidth:"1.5",key:"0"}],["path",{d:"M22 15.5C22 16.6046 19.0899 17.5 15.5 17.5C11.9101 17.5 9 16.6046 9 15.5",stroke:"currentColor",strokeWidth:"1.5",key:"1"}],["path",{d:"M22 11V19.8C22 21.015 19.0899 22 15.5 22C11.9101 22 9 21.015 9 19.8V11",stroke:"currentColor",strokeWidth:"1.5",key:"2"}],["ellipse",{cx:"8.5",cy:"4",rx:"6.5",ry:"2",stroke:"currentColor",strokeWidth:"1.5",key:"3"}
50],["path",{d:"M6 11C4.10819 10.7698 2.36991 10.1745 2 9M6 16C4.10819 15.7698 2.36991 15.1745 2 14",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"4"}],["path",{d:"M6 21C4.10819 20.7698 2.36991 20.1745 2 19L2 4",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"5"}],["path",{d:"M15 6V4",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"6"}]],lre=[["path",{d:"M14 21H16M14 21C13.1716 21 12.5 20.3284 12.5 19.5V17L12 17M14 21H10M10 21H8M10 21C10.8284 21 11.5 20.3284 11.5 19.5V17L12 17M12 17V21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M16 3H8C5.17157 3 3.75736 3 2.87868 3.87868C2 4.75736 2 6.17157 2 9V11C2 13.8284 2 15.2426 2.87868 16.1213C3.75736 17 5.17157 17 8 17H16C18.8284 17 20.2426 17 21.1213 16.1213C22 15.2426 22 13.8284 22 11V9C22 6.17157 22 4.75736 21.1213 3.87868C20.2426 3 18.8284 3 16 3Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],cre=[["path",{d:"M4.51255 19.4866C7.02498 21.8794 10.016 20.9223 11.2124 19.9532C11.8314 19.4518 12.1097 19.1277 12.3489 18.8884C13.1864 18.1107 13.1326 17.3331 12.5882 16.711C12.3704 16.462 10.9731 15.1198 9.63313 13.7439C8.93922 13.0499 8.46066 12.5595 8.05149 12.1647C7.50354 11.6185 7.02499 10.9922 6.30715 11.0101C5.64913 11.0101 5.17057 11.5904 4.57237 12.1886C3.88422 12.8767 3.37598 13.7439 3.19652 14.5216C2.65814 16.7947 3.49562 18.4098 4.51255 19.4866ZM4.51255 19.4866L2.00012 21.999",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M19.4867 4.51472C16.9736 2.12078 13.9929 3.09593 12.7962 4.06548C12.177 4.56712 11.8987 4.89138 11.6593 5.13078C10.8216 5.90881 10.8755 6.68683 11.42 7.30926C11.4983 7.39881 11.7292 7.62975 12.055 7.95281M19.4867 4.51472C20.504 5.59199 21.3528 7.22547 20.8142 9.49971C20.6347 10.2777 20.1264 11.1453 19.438 11.8338C18.8397 12.4323 18.361 13.0128 17.7028 13.0128C16.9847 13.0308 16.6121 12.5115 16.064 11.9651M19.4867 4.51472L21.9999 2.0011M16.064 11.9651C15.6547 11.5701 15.07 10.9721 14.3759 10.2777C13.5175 9.39612 12.6355 8.52831 12.055 7.95281M16.064 11.9651L14.5024 13.4896M10.5114 9.50609L12.055 7.95281",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"1"}]],cy=[["path",{d:"M7.5 14.5C7.5 11.2002 7.5 9.55025 8.52513 8.52513C9.55025 7.5 11.2002 7.5 14.5 7.5C17.7998 7.5 19.4497 7.5 20.4749 8.52513C21.5 9.55025 21.5 11.2002 21.5 14.5C21.5 17.7998 21.5 19.4497 20.4749 20.4749C19.4497 21.5 17.7998 21.5 14.5 21.5C11.2002 21.5 9.55025 21.5 8.52513 20.4749C7.5 19.4497 7.5 17.7998 7.5 14.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M7.5 16.5C6.10355 16.5 5.40533 16.5 4.84402 16.3036C3.83866 15.9518 3.0482 15.1613 2.69641 14.156C2.5 13.5947 2.5 12.8964 2.5 11.5V9.5C2.5 6.20017 2.5 4.55025 3.52513 3.52513C4.55025 2.5 6.20017 2.5 9.5 2.5H11.5C12.8964 2.5 13.5947 2.5 14.156 2.69641C15.1613 3.0482 15.9518 3.83866 16.3036 4.84402C16.5 5.40533 16.5 6.10355 16.5 7.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],E3=[["path",{d:"M2 12C2 8.46252 2 6.69377 3.0528 5.5129C3.22119 5.32403 3.40678 5.14935 3.60746 4.99087C4.86213 4 6.74142 4 10.5 4H13.5C17.2586 4 19.1379 4 20.3925 4.99087C20.5932 5.14935 20.7788 5.32403 20.9472 5.5129C22 6.69377 22 8.46252 22 12C22 15.5375 22 17.3062 20.9472 18.4871C20.7788 18.676 20.5932 18.8506 20.3925 19.0091C19.1379 20 17.2586 20 13.5 20H10.5C6.74142 20 4.86213 20 3.60746 19.0091C3.40678 18.8506 3.22119 18.676 3.0528 18.4871C2 17.3062 2 15.5375 2 12Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M10 16H11.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M14.5 16L18 16",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M2 9H22",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}]],ure=[["path",{d:"M4 2V4M22 20H20M16.5 20H10C7.17157 20 5.75736 20 4.87868 19.1213C4 18.2426 4 16.8284 4 14V7.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M20 22L20 12C20 8.22877 20 6.34315 18.8284 5.17158C17.6569 4 15.7712 4 12 4L2 4",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],dre=[["path",{d:"M5 20H19",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M7.99998 12C6.89541 12 5.99998 11.1046 5.99998 10C5.99998 9.78893 6.03267 9.5855 6.09328 9.39449L3.53967 7.22321C3.17186 6.91046 2.61752 6.9284 2.27193 7.26423C2.02704 7.5022 1.93883 7.85285 2.04312 8.17377L4.54281 15.6353C4.81592 16.4505 5.57947 17 6.43922 17H17.5608C18.4205 17 19.1841 16.4505 19.4572 15.6353L21.9569 8.17377C22.0612 7.85285 21.973 7.5022 21.7281 7.26423C21.3825 6.9284 20.8281 6.91046 20.4603 7.22321L17.9067 9.39452C17.9673 9.58552 18 9.78894 18 10C18 11.1046 17.1045 12 16 12C14.8954 12 14 11.1046 14 10C14 9.36285 14.2979 8.79529 14.7621 8.42904L12.6923 3.46154C12.5758 3.18205 12.3028 3 12 3C11.6972 3 11.4241 3.18205 11.3077 3.46154L9.23788 8.42904C9.70204 8.79529 9.99998 9.36285 9.99998 10C9.99998 11.1046 9.10455 12 7.99998 12Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],Ng=[["path",{d:"M5 21H19",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M12.125 12.75H12M12.25 12.75C12.25 12.8881 12.1381 13 12 13C11.8619 13 11.75 12.8881 11.75 12.75C11.75 12.6119 11.8619 12.5 12 12.5C12.1381 12.5 12.25 12.6119 12.25 12.75Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M14.9152 7.61089L13.8078 5.38179C13.019 3.79393 12.6246 3 12 3C11.3754 3 10.981 3.79393 10.1922 5.38179L9.08483 7.61089C8.58107 8.62494 8.32919 9.13197 7.87976 9.24608C7.8485 9.25401 7.81689 9.26043 7.78503 9.26533C7.32682 9.3357 6.89919 8.96678 6.04393 8.22895C4.0124 6.47635 2.99663 5.60004 2.38034 5.94899C2.34045 5.97157 2.30213 5.99686 2.26565 6.02467C1.70197 6.45439 2.09541 7.74136 2.88229 10.3153L4.04783 14.1279C4.47098 15.5121 4.68255 16.2042 5.21787 16.6021C5.75318 17 6.47261 17 7.91147 17L16.0886 16.9999C17.5274 16.9999 18.2468 16.9999 18.7821 16.602C19.3175 16.2041 19.529 15.512 19.9522 14.1279L21.1177 10.3153C21.9046 7.74137 22.298 6.4544 21.7344 6.02468C21.6979 5.99687 21.6595 5.97158 21.6197 5.94899C21.0034 5.60006 19.9876 6.47636 17.9561 8.22896C17.1008 8.96679 16.6732 9.3357 16.215 9.26533C16.1831 9.26043 16.1515 9.25401 16.12
5002 9.24607C15.6708 9.13197 15.4189 8.62494 14.9152 7.61089Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],Ag=[["path",{d:"M5.10772 14.3857L5.58594 7.91256C5.61875 7.46854 5.64642 7.05187 5.67232 6.66186C5.85017 3.98379 5.94481 2.55876 7.04807 2.10979C8.15132 1.66082 9.2022 2.61969 11.1771 4.42168C11.4647 4.68413 11.772 4.96446 12.1018 5.26093L16.9102 9.58273C18.2626 10.7983 18.9389 11.4062 18.9934 11.9885C19.0309 12.3882 18.9067 12.7862 18.6489 13.0924C18.2733 13.5385 17.3734 13.6473 15.5737 13.8647C14.8156 13.9563 14.4365 14.0021 14.2073 14.2038C14.0479 14.344 13.9376 14.5321 13.8925 14.7404C13.8277 15.0399 13.9707 15.3964 14.2567 16.1095L15.7394 19.8058C15.9107 20.2328 15.9963 20.4464 15.995 20.6429C15.9932 20.9078 15.8865 21.1609 15.6986 21.3462C15.5591 21.4837 15.3471 21.57 14.9232 21.7425C14.4993 21.915 14.2873 22.0013 14.0921 22C13.8292 21.9982 13.5778 21.8907 13.3939 21.7015C13.2574 21.561 13.1717 21.3475 13.0004 20.9204L11.5177 17.2241C11.2317 16.5111 11.0887 16.1545 10.8355 15.9844C10.6595 15.8662 10.4503 15.8081 10.239 15.8187C9.935 15.834 9.63074 16.0663 9.02224 16.5308C7.57763 17.6337 6.85532 18.1851 6.27746 18.1269C5.88085 18.0871 5.51701 17.8877 5.26831 17.574C4.90595 17.1169 4.9732 16.2065 5.10772 14.3857Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],kd=[["path",{d:"M19.5 5.5L18.8803 15.5251C18.7219 18.0864 18.6428 19.3671 18.0008 20.2879C17.6833 20.7431 17.2747 21.1273 16.8007 21.416C15.8421 22 14.559 22 11.9927 22C9.42312 22 8.1383 22 7.17905 21.4149C6.7048 21.1257 6.296 20.7408 5.97868 20.2848C5.33688 19.3626 5.25945 18.0801 5.10461 15.5152L4.5 5.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M3 5.5H21M16.0557 5.5L15.3731 4.09173C14.9196 3.15626 14.6928 2.68852 14.3017 2.39681C14.215 2.3321 14.1231 2.27454 14.027 2.2247C13.5939 2 13.0741 2 12.0345 2C10.9688 2 10.436 2 9.99568 2.23412C9.8981 2.28601 9.80498 2.3459 9.71729 2.41317C9.32164 2.7167 9.10063 3.20155 8.65861 4.17126L8.05292 5.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M9.5 16.5L9.5 10.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M14.5 16.5L14.5 10.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"3"}]],xre=[["path",{d:"M5.92089 5.92089C8.15836 3.68342 9.2771 2.56468 10.5857 2.19562C11.5105 1.93479 12.4895 1.93479 13.4143 2.19562C14.7229 2.56468 15.8416 3.68342 18.0791 5.92089C20.3166 8.15836 21.4353 9.2771 21.8044 10.5857C22.0652 11.5105 22.0652 12.4895 21.8044 13.4143C21.4353 14.7229 20.3166 15.8416 18.0791 18.0791C15.8416 20.3166 14.7229 21.4353 13.4143 21.8044C12.4895 22.0652 11.5105 22.0652 10.5857 21.8044C9.2771 21.4353 8.15836 20.3166 5.92089 18.0791C3.68342 15.8416 2.56468 14.7229 2.19562 13.4143C1.93479 12.4895 1.93479 11.5105 2.19562 10.5857C2.564
5068 9.2771 3.68342 8.15836 5.92089 5.92089Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],fre=[["path",{d:"M17.9583 8.38889C17.9583 6.24111 15.2907 4.5 12 4.5C8.7093 4.5 6.04167 6.24111 6.04167 8.38889C6.04167 10.5367 7.66667 11.7222 12 11.7222C16.3333 11.7222 18.5 12.8333 18.5 15.6111C18.5 18.3889 15.5899 19.5 12 19.5C8.41015 19.5 5.5 17.7589 5.5 15.6111",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M12.5 2.5V4.21M12.5 21.5V19.79",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],eu=[["path",{d:"M2.99969 17.0002C2.99969 17.9302 2.99969 18.3952 3.10192 18.7767C3.37932 19.8119 4.18796 20.6206 5.22324 20.898C5.60474 21.0002 6.06972 21.0002 6.99969 21.0002L16.9997 21.0002C17.9297 21.0002 18.3947 21.0002 18.7762 20.898C19.8114 20.6206 20.6201 19.8119 20.8975 18.7767C20.9997 18.3952 20.9997 17.9302 20.9997 17.0002",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M16.4998 11.5002C16.4998 11.5002 13.1856 16.0002 11.9997 16.0002C10.8139 16.0002 7.49976 11.5002 7.49976 11.5002M11.9997 15.0002V3.00016",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],$c=[["path",{d:"M16.9767 19.5C19.4017 17.8876 21 15.1305 21 12C21 7.02944 16.9706 3 12 3C11.3126 3 10.6432 3.07706 10 3.22302M16.9767 19.5V16M16.9767 19.5H20.5M7 4.51555C4.58803 6.13007 3 8.87958 3 12C3 16.9706 7.02944 21 12 21C12.6874 21 13.3568 20.9229 14 20.777M7 4.51555V8M7 4.51555H3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],zc=[["path",{d:"M2 8C2 8 6.47715 3 12 3C17.5228 3 22 8 22 8",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M21.544 13.045C21.848 13.4713 22 13.6845 22 14C22 14.3155 21.848 14.5287 21.544 14.955C20.1779 16.8706 16.6892 21 12 21C7.31078 21 3.8221 16.8706 2.45604 14.955C2.15201 14.5287 2 14.3155 2 14C2 13.6845 2.15201 13.4713 2.45604 13.045C3.8221 11.1294 7.31078 7 12 7C16.6892 7 20.1779 11.1294 21.544 13.045Z",stroke:"currentColor",strokeWidth:"1.5",key:"1"}],["path",{d:"M15 14C15 12.3431 13.6569 11 12 11C10.3431 11 9 12.3431 9 14C9 15.6569 10.3431 17 12 17C13.6569 17 15 15.6569 15 14Z",stroke:"currentColor",strokeWidth:"1.5",key:"2"}]],b$=[["path",{d:"M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}
50],["path",{d:"M16.9265 8.02637H13.9816C12.9378 8.02637 12.0894 8.86847 12.0817 9.91229L11.9964 21.4268M10.082 14.0017H14.8847",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],Mh=[["path",{d:"M10.4107 19.9677C7.58942 17.858 2 13.0348 2 8.69444C2 5.82563 4.10526 3.5 7 3.5C8.5 3.5 10 4 12 6C14 4 15.5 3.5 17 3.5C19.8947 3.5 22 5.82563 22 8.69444C22 13.0348 16.4106 17.858 13.5893 19.9677C12.6399 20.6776 11.3601 20.6776 10.4107 19.9677Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],hre=[["path",{d:"M3 7H6",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M3 17H9",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M18 17L21 17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M15 7L21 7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}],["path",{d:"M6 7C6 6.06812 6 5.60218 6.15224 5.23463C6.35523 4.74458 6.74458 4.35523 7.23463 4.15224C7.60218 4 8.06812 4 9 4C9.93188 4 10.3978 4 10.7654 4.15224C11.2554 4.35523 11.6448 4.74458 11.8478 5.23463C12 5.60218 12 6.06812 12 7C12 7.93188 12 8.39782 11.8478 8.76537C11.6448 9.25542 11.2554 9.64477 10.7654 9.84776C10.3978 10 9.93188 10 9 10C8.06812 10 7.60218 10 7.23463 9.84776C6.74458 9.64477 6.35523 9.25542 6.15224 8.76537C6 8.39782 6 7.93188 6 7Z",stroke:"currentColor",strokeWidth:"1.5",key:"4"}],["path",{d:"M12 17C12 16.0681 12 15.6022 12.1522 15.2346C12.3552 14.7446 12.7446 14.3552 13.2346 14.1522C13.6022 14 14.0681 14 15 14C15.9319 14 16.3978 14 16.7654 14.1522C17.2554 14.3552 17.6448 14.7446 17.8478 15.2346C18 15.6022 18 16.0681 18 17C18 17.9319 18 18.3978 17.8478 18.7654C17.6448 19.2554 17.2554 19.6448 16.7654 19.8478C16.3978 20 15.9319 20 15 20C14.0681 20 13.6022 20 13.2346 19.8478C12.7446 19.6448 12.3552 19.2554 12.1522 18.7654C12 18.3978 12 17.9319 12 17Z",stroke:"currentColor",strokeWidth:"1.5",key:"5"}]],sw=[["path",{d:"M8.85746 12.5061C6.36901 10.6456 4.59564 8.59915 3.62734 7.44867C3.3276 7.09253 3.22938 6.8319 3.17033 6.3728C2.96811 4.8008 2.86701 4.0148 3.32795 3.5074C3.7889 3 4.60404 3 6.23433 3H17.7657C19.396 3 20.2111 3 20.672 3.5074C21.133 4.0148 21.0319 4.8008 20.8297 6.37281C20.7706 6.83191 20.6724 7.09254 20.3726 7.44867C19.403 8.60062 17.6261 10.6507 15.1326 12.5135C14.907 12.6821 14.7583 12.9567 14.7307 13.2614C14.4837 15.992 14.2559 17.4876 14.1141 18.2442C13.8853 19.4657 12.1532 20.2006 11.226 20.8563C10.6741 21.2466 10.0043 20.782 9.93278 20.1778C9.79643 19.0261 9.53961 16.6864 9.25927 13.2614C9.23409 12.9539 9.08486 12.6761 8.85746 12.5061Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],mre=[["path",{d:"M13.8561 22C26.0783 19 19.2338 7 10.9227 2C9.9453 5.5 8.47838 6.5 5.54497 10C1.66121 14.6339 3.5895 20 8.96719 22C8.1524 21 6.04958 18.9008 7.5 16C8 15 9 14 8.5 12C9.47778 12.5 11.5 13 12 15.5C12.8148 14.5 13.6604 12.4 12.8783 10C19 14.5 16.5 19 13.8561 22Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],C$=[["path",{d:"M4 7L4 21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M11.7576 3.90865C8.45236 2.22497 5.85125 3.21144 4.55426 4.2192C4.32048 4.40085 4.20358 4.49167 4.10179 4.69967C4 4.90767 4 5.10138 4 5.4888V14.7319C4.9697 13.6342 7.87879 11.9328 11.7576 13.9086C15.224 15.6744 18.1741 14.9424 19.5697 14.1795C19.7633 14.0737 19.8601 14.0207 19.9301 13.9028C20 13.7849 20 13.6569 20 13.4009V5.87389C20 5.04538 20 4.63113 19.8027 4.48106C19.6053 4.33099 19.1436 4.459 18.2202 4.71504C16.64 5.15319 14.3423 5.22532 11.7576 3.90865Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],pre=[["path",{d:"M8 22V19C8 17.1144 8 16.1716 8.58579 15.5858C9.17157 15 10.1144 15 12 15C13.8856 15 14.8284 15 15.4142 15.5858C16 16.1716 16 17.1144 16 19V22",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M10 7H14",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M3 11.8584C3 7.28199 3 4.99376 4.38674 3.54394C4.43797 3.49038 4.49038 3.43797 4.54394 3.38674C5.99376 2 8.28199 2 
5012.8584 2C13.943 2 14.4655 2.00376 14.9628 2.18936C15.4417 2.3681 15.8429 2.70239 16.6452 3.37099L18.8411 5.20092C19.9027 6.08561 20.4335 6.52795 20.7168 7.13266C21 7.73737 21 8.42833 21 9.81025V13C21 16.7497 21 18.6246 20.0451 19.9389C19.7367 20.3634 19.3634 20.7367 18.9389 21.0451C17.6246 22 15.7497 22 12 22C8.25027 22 6.3754 22 5.06107 21.0451C4.6366 20.7367 4.26331 20.3634 3.95491 19.9389C3 18.6246 3 16.7497 3 13V11.8584Z",stroke:"currentColor",strokeWidth:"1.5",key:"2"}]],gre=[["path",{d:"M19.9351 12.6258C19.6807 13.8374 18.327 14.7077 15.6198 16.4481C12.6753 18.3411 11.203 19.2876 10.0105 18.9229C9.60662 18.7994 9.23463 18.5823 8.92227 18.2876C8 17.4178 8 15.6118 8 12C8 8.38816 8 6.58224 8.92227 5.71235C9.23463 5.41773 9.60662 5.20057 10.0105 5.07707C11.203 4.71243 12.6753 5.6589 15.6198 7.55186C18.327 9.29233 19.6807 10.1626 19.9351 11.3742C20.0216 11.7865 20.0216 12.2135 19.9351 12.6258Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M4 5L4 19",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"1"}]],yre=[["path",{d:"M15.5 21C16.8956 21 17.5933 21 18.1611 20.8278C19.4395 20.44 20.44 19.4395 20.8278 18.1611C21 17.5933 21 16.8956 21 15.5M21 8.5C21 7.10444 21 6.40666 20.8278 5.83886C20.44 4.56046 19.4395 3.56004 18.1611 3.17224C17.5933 3 16.8956 3 15.5 3M8.5 21C7.10444 21 6.40666 21 5.83886 20.8278C4.56046 20.44 3.56004 19.4395 3.17224 18.1611C3 17.5933 3 16.8956 3 15.5M3 8.5C3 7.10444 3 6.40666 3.17224 5.83886C3.56004 4.56046 4.56046 3.56004 5.83886 3.17224C6.40666 3 7.10444 3 8.5 3",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],Al=[["path",{d:"M4 11V15C4 18.2998 4 19.9497 5.02513 20.9749C6.05025 22 7.70017 22 11 22H13C16.2998 22 17.9497 22 18.9749 20.9749C20 19.9497 20 18.2998 20 15V11",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M3 9C3 8.25231 3 7.87846 3.20096 7.6C3.33261 7.41758 3.52197 7.26609 3.75 7.16077C4.09808 7 4.56538 7 5.5 7H18.5C19.4346 7 19.9019 7 20.25 7.16077C20.478 7.26609 20.6674 7.41758 20.799 7.6C21 7.87846 21 8.25231 21 9C21 9.74769 21 10.1215 20.799 10.4C20.6674 10.5824 20.478 10.7339 20.25 10.8392C19.9019 11 19.4346 11 18.5 11H5.5C4.56538 11 4.09808 11 3.75 10.8392C3.52197 10.7339 3.33261 10.5824 3.20096 10.4C3 10.1215 3 9.74769 3 9Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M6 3.78571C6 2.79949 6.79949 2 7.78571 2H8.14286C10.2731 2 12 3.7269 12 5.85714V7H9.21429C7.43908 7 6 5.56091 6 3.78571Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M18 3.78571C18 2.79949 17.2005 2 16.2143 2H15.8571C13.7269 2 12 3.7269 12 5.85714V7H14.7857C16.5609 7 18 5.56091 18 3.78571Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}],["path",{d:"M12 11L12 22",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"4"}]],w$=[["circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"1.5",key:"0"}],["path",{d:"M8 12C8 18 12 22 12 22C12 22 16 18 16 12C16 6 12 2 12 2C12 2 8 6 8 12Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M21 15H3",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M21 9H3",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}]],vre=[["path",{d:"M14.5 8.49951C13.6329 8.93304 11.1118 9.66731 8.63166 9.5941C7.98001 9.57486 7.5 9.01526 7.5 8.36333C7.5 7.83928 7.81029 7.36341 8.28079 7.13264C9.28416 6.64049 10.867 5.81798 12.2709 5.05868C13.1233 4.5977 13.5495 4.3672 13.8726 4.25809C14.7383 3.96573 15.4351 3.95453 16.3097 4.21893C16.6362 4.3176 17.0283 4.51365 17.8124 4.90573L18.7167 5.35787C18.7884 5.39372 18.8243 5.41165 18.861 5.42651C18.9555 5.46475 19.0553 5.48831 19.1569 5.49637C19.1964 5.49951 19.2365 5.49951 19.3167 5.49951C19.9522 5.49951 20.2699 5.49951 20.5302 5.57107C21.2102 5.75804 21.7415 6.28929 21.9284 6.96928C22 7.22956 22 7.5473 22 8.18279V13.7138C22 14.4239 21.4244 14.9995 20.7143 14.9995C20.5752 14.9995 20.4398 15.0446 20.3286 15.1281L20 15.3745C19.3066 15.8945 18.9599 16.1546 18.5624 16.3051C18.4871 16.3336 18.4108 16.359 18.3335 16.3814C17.9251 16.4995 17.4917 16.4995 16.625 16.4995H14",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M14.5 8.49902L17.5713 11.9775C18.0912 12.5494 18.0703 13.4287 17.5238 13.9752C16.9584 14.5407 16.0416 14.5407 15.4762 13.9752C16.0285 14.5275 16.0523 15.4467 15.5 15.999C14.9477 16.5513 14.0523 16.5513 13.5 15.999L13 15.499C13.5523 16.0513 13.5523 16.9467 13 17.499C12.4477 18.0513 11.5523 18.0513 11 17.499C11.5523 18.0513 11.5523 18.9467 11 19.499L10.9393 19.5597C10.658 19.841 10.2765 19.999 9.87868 19.999H9.75C9.26978 19.999 8.80923 19.8083 8.46967 19.4687L4.41421 15.4132C4.149 15.148 3.78929 14.999 3.41421 14.999C2.63317 14.999 2 14.3659 2 13.5848L2 9.49902C2 7.61341 2 6.6706 2.58579 6.08481C3.17157 5.49902 4.11438 5.49902 6 5.49902L11 5.49902",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],uy=[["circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M9.5 9.5C9.5 8.11929 10.6193 7 12 7C13.3807 7 14.5 8.11929 14.5 9.5C14.5 10.3569 14.0689 11.1131 13.4117 11.5636C12.7283 12.0319 12 12.6716 12 13.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M12.125 16.75H12M12.25 16.75C12.25 16.8881 12.1381 17 12 17C11.8619 17 11.75 16.8881 11.75 16.75C11.75 16.6119 11.8619 16.5 12 16.5C12.1381 16.5 12.25 16.6119 12.25 16.75Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],iw=[["path",{d:"M3.49902 14.9656C4.72475 18.4791 8.06749 21 11.999 21C16.9696 21 20.999 16.9706 20.999 12C20.999 7.02944 16.9696 3 11.999 3C8.29827 3 4.8984 5.6756 3.68943 8.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M11.999 7V12L14.999 14",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M7.49751 8.74363C7.49751 8.74363 3.81388 9.3026 3.25487 8.7436C2.69585 8.1846 3.25488 4.50098 3.25488 4.50098",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],E$=[["path",{d:"M3 11.9896V14.5C3 17.7998 3 19.4497 4.02513 20.4749C5.05025 21.5 6.70017 21.5 10 21.5H14C17.2998 21.5 18.9497 21.5 19.9749 20.4749C21 19.4497 21 17.7998 21 14.5V11.9896C21 10.3083 21 9.46773 20.6441 8.74005C20.2882 8.01237 19.6247 7.49628 18.2976 6.46411L16.2976 4.90855C14.2331 3.30285 13.2009 2.5 12 2.5C10.7991 2.5 9.76689 3.30285 7.70242 4.90855L5.70241 6.46411C4.37533 7.49628 3.71179 8.01237 3.3559 8.74005C3 9.46773 3 10.3083 3 11.9896Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],j$=[["path",{d:"M4 3H20",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M5.5 3V5.03039C5.5 6.27227 6.07682 7.4437 7.06116 8.20089L12 12L16.9388 8.20089C17.9232 7.44371 18.5 6.27227 18.5 5.03039V3",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M5.5 21V18.9696C5.5 17.7277 6.07682 16.5563 7.06116 15.7991L12 12L16.9388 15.7991C17.9232 16.5563 18.5 17.7277 18.5 18.9696V21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M4 21H20",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}]],N$=[["circle",{cx:"7.5",cy:"7.5",r:"1.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z",stroke:"currentColor",strokeWidth:"1.5",key:"1"}],["path",{d:"M5 21C9.37246 15.775 14.2741 8.88406 21.4975 13.5424",stroke:"currentColor",strokeWidth:"1.5",key:"2"}]],bre=[["path",{d:"M3 16L7.46967 11.5303C7.80923 11.1908 8.26978 11 8.75 11C9.23022 11 9.69077 11.1908 10.0303 11.5303L14 15.5M15.5 17L14 15.5M21 16L18.5303 13.5303C18.1908 13.1908 17.7302 13 
5017.25 13C16.7698 13 16.3092 13.1908 15.9697 13.5303L14 15.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M12 2.5C7.77027 2.5 5.6554 2.5 4.25276 3.69797C4.05358 3.86808 3.86808 4.05358 3.69797 4.25276C2.5 5.6554 2.5 7.77027 2.5 12C2.5 16.2297 2.5 18.3446 3.69797 19.7472C3.86808 19.9464 4.05358 20.1319 4.25276 20.302C5.6554 21.5 7.77027 21.5 12 21.5C16.2297 21.5 18.3446 21.5 19.7472 20.302C19.9464 20.1319 20.1319 19.9464 20.302 19.7472C21.5 18.3446 21.5 16.2297 21.5 12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M21.5 6H18M18 6H14.5M18 6V2.5M18 6V9.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],Cre=[["path",{d:"M3 12C3 7.75736 3 5.63604 4.31802 4.31802C5.63604 3 7.75736 3 12 3C16.2426 3 18.364 3 19.682 4.31802C21 5.63604 21 7.75736 21 12C21 16.2426 21 18.364 19.682 19.682C18.364 21 16.2426 21 12 21C7.75736 21 5.63604 21 4.31802 19.682C3 18.364 3 16.2426 3 12Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M16 12C16 14.2091 14.2091 16 12 16C9.79086 16 8 14.2091 8 12C8 9.79086 9.79086 8 12 8C14.2091 8 16 9.79086 16 12Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M17.3748 6.75024H17.2498M17.4998 6.75024C17.4998 6.88832 17.3878 7.00024 17.2498 7.00024C17.1117 7.00024 16.9998 6.88832 16.9998 6.75024C16.9998 6.61217 17.1117 6.50024 17.2498 6.50024C17.3878 6.50024 17.4998 6.61217 17.4998 6.75024Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],wre=[["path",{d:"M14.5 7H9.5C6.21252 7 4.56878 7 3.46243 7.90796C3.25989 8.07418 3.07418 8.25989 2.90796 8.46243C2 9.56878 2 11.2125 2 14.5C2 17.7875 2 19.4312 2.90796 20.5376C3.07418 20.7401 3.25989 20.9258 3.46243 21.092C4.56878 22 6.21252 22 9.5 22H14.5C17.7875 22 19.4312 22 20.5376 21.092C20.7401 20.9258 20.9258 20.7401 21.092 20.5376C22 19.4312 22 17.7875 22 14.5C22 11.2125 22 9.56878 21.092 8.46243C20.9258 8.25989 20.7401 8.07418 20.5376 7.90796C19.4312 7 17.7875 7 14.5 7Z",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M12 7V5C12 4.44772 12.4477 4 13 4C13.5523 4 14 3.55228 14 3V2",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M7 12L8 12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M11.5 12L12.5 12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}],["path",{d:"M16 12L17 12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"4"}],["path",{d:"M7 17L17 17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"5"}]],A$=[["path",{d:"M9.14339 10.691L9.35031 10.4841C11.329 8.50532 14.5372 8.50532 16.5159 10.4841C18.4947 12.4628 18.4947 15.671 16.5159 17.6497L13.6497 20.5159C11.671 22.4947 8.46279 22.4947 6.48405 20.5159C4.50532 18.5372 4.50532 15.329 6.48405 13.3503L6.9484 12.886",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M17.0516 11.114L17.5159 10.6497C19.4947 8.67095 19.4947 5.46279 17.5159 3.48405C15.5372 1.50532 12.329 1.50532 10.3503 3.48405L7.48405 6.35031C5.50532 8.32904 5.50532 11.5372 7.48405 13.5159C9.46279 15.4947 12.671 15.4947 14.6497 13.5159L14.8566 13.309",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"1"}]],k$=[["path",{d:"M11.1004 3.00208C7.4515 3.00864 5.54073 3.09822 4.31962 4.31931C3.00183 5.63706 3.00183 7.75796 3.00183 11.9997C3.00183 16.2415 3.00183 18.3624 4.31962 19.6801C5.6374 20.9979 7.75836 20.9979 12.0003 20.9979C16.2421 20.9979 18.3631 20.9979 19.6809 19.6801C20.902 18.4591 20.9916 16.5484 20.9982 12.8996",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M20.4803 3.51751L14.931 9.0515M20.4803 3.51751C19.9863 3.023 16.6587 3.0691 15.9552 3.0791M20.4803 3.51751C20.9742 4.01202 20.9282 7.34329 20.9182 8.04754",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],Yt=[["path",{d:"M12 3V6",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M12 18V21",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M21 12L18 12",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M6 12L3 12",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"3"}],["path",{d:"M18.3635 5.63672L16.2422 7.75804",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"4"}],["path",{d:"M7.75804 16.2422L5.63672 18.3635",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"5"}],["path",{d:"M18.3635 18.3635L16.2422 16.2422",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"6"}],["path",{d:"M7.75804 7.75804L5.63672 5.63672",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"7"}]],Ere=[["path",{d:"M13.6177 21.367C13.1841 21.773 12.6044 22 12.0011 22C11.3978 22 10.8182 21.773 10.3845 21.367C6.41302 17.626 1.09076 13.4469 3.68627 7.37966C5.08963 4.09916 8.45834 2 12.0011 2C15.5439 2 18.9126 4.09916 20.316 7.37966C22.9082 13.4393 17.599 17.6389 13.6177 21.367Z",stroke:"currentColor",strokeWidth:"1.5",key:"0"}],["path",{d:"M15.5 11C15.5 12.933 13.933 14.5 12 14.5C10.067 14.5 8.5 12.933 8.5 11C8.5 9.067 10.067 7.5 12 7.5C13.933 7.5 15.5 9.067 15.5 11Z",stroke:"currentColor",strokeWidth:"1.5",key:"1"}]],Vc=[["path",{d:"M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z",stroke:"currentColor",strokeWidth:"1.5",key:"0"}],["path",{d:"M12 13C13.1046 13 14 12.1046 14 11C14 9.89543 13.1046 9 12 9C10.8954 9 10 9.89543 10 11C10 12.1046 10.8954 13 12 13ZM12 13L12 16",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"1"}]],yo=[["path",{d:"M2 6L8.91302 9.91697C11.4616 11.361 12.5384 11.361 15.087 9.91697L22 6",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M2.01577 13.4756C2.08114 16.5412 2.11383 18.0739 3.24496 19.2094C4.37608 20.3448 5.95033 20.3843 9.09883 20.4634C11.0393 20.5122 12.9607 20.5122 14.9012 20.4634C18.0497 20.3843 19.6239 20.3448 20.7551 19.2094C21.8862 18.0739 21.9189 16.5412 21.9842 13.4756C22.0053 
5012.4899 22.0053 11.5101 21.9842 10.5244C21.9189 7.45886 21.8862 5.92609 20.7551 4.79066C19.6239 3.65523 18.0497 3.61568 14.9012 3.53657C12.9607 3.48781 11.0393 3.48781 9.09882 3.53656C5.95033 3.61566 4.37608 3.65521 3.24495 4.79065C2.11382 5.92608 2.08114 7.45885 2.01576 10.5244C1.99474 11.5101 1.99475 12.4899 2.01577 13.4756Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],Vk=[["path",{d:"M2 19L8.91302 14.2905C11.4387 12.5698 12.5613 12.5698 15.087 14.2905L22 19",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M2.01592 14.551C2.08186 17.5843 2.11484 19.1009 3.24611 20.2241C4.37738 21.3473 5.95183 21.3862 9.10072 21.4641C11.0393 21.512 12.9607 21.512 14.8993 21.4641C18.0482 21.3862 19.6226 21.3473 20.7539 20.2241C21.8852 19.1009 21.9181 17.5843 21.9841 14.551C22.0164 13.0649 21.9995 11.5934 21.9334 10.0921C21.8924 9.15964 21.8719 8.69341 21.6354 8.27984C21.3989 7.86628 20.9913 7.59935 20.176 7.0655L16.4152 4.60286C14.2742 3.20096 13.2038 2.5 12 2.5C10.7962 2.5 9.72577 3.20095 7.58483 4.60286L3.82397 7.0655C3.00869 7.59935 2.60106 7.86628 2.36459 8.27984C2.12812 8.69341 2.1076 9.15965 2.06656 10.0921C2.00049 11.5934 1.98361 13.0649 2.01592 14.551Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M22 9.5L17.7346 12.6072C16.7004 13.3606 15.8504 14 14.5 14M2 9.5L6.26538 12.6072C7.29955 13.3606 8.14961 14 9.5 14",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],Uk=[["path",{d:"M8.5 2V10.5M15.5 2V10.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M17.9162 2.01166H6.0838C5.17286 2.01166 3.96696 1.85424 3.34398 2.69602C3 3.1608 3 3.83334 3 5.17844C3 6.32524 3 6.89864 3.23194 7.38174C3.62807 8.20684 4.51377 8.56526 5.27291 8.95504L8.98131 10.8591C10.4626 11.6197 11.2033 12 12 12C12.7967 12 13.5374 11.6197 15.0187 10.8591L18.7271 8.95504C19.4862 8.56526 20.3719 8.20684 20.7681 7.38174C21 6.89864 21 6.32524 21 5.17844C21 3.83334 21 3.1608 20.656 2.69602C20.033 1.85424 18.8271 2.01166 17.9162 2.01166Z",stroke:"currentColor",strokeWidth:"1.5",key:"1"}],["path",{d:"M10.5292 13.6376C11.2478 13.2125 11.6071 13 12 13C12.3929 13 12.7522 13.2125 13.4708 13.6376L14.4708 14.2292C15.2167 14.6704 15.5896 14.891 15.7948 15.26C16 15.6289 16 16.0789 16 16.979V18.021C16 18.9211 16 19.3711 15.7948 19.74C15.5896 20.109 15.2167 20.3296 14.4708 20.7708L13.4708 21.3624C12.7522 21.7875 12.3929 22 12 22C11.6071 22 11.2478 21.7875 10.5292 21.3624L9.52922 20.7708C8.78332 20.3296 8.41037 20.109 8.20519 19.74C8 19.3711 8 18.9211 8 18.021V16.979C8 16.0789 8 15.6289 8.20519 15.26C8.41037 14.891 8.78332 14.6704 9.52922 14.2292L10.5292 13.6376Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],Pc=[["path",{d:"M9 14V6H6C5.07003 6 4.60504 6 4.22354 6.10222C3.18827 6.37962 2.37962 7.18827 2.10222 8.22354C2 8.60504 2 9.07003 2 10C2 10.93 2 11.395 2.10222 11.7765C2.37962 12.8117 3.18827 13.6204 4.22354 13.8978C4.60504 14 5.07003 14 6 14H9Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M9 14L9.96466 18.8233C9.98816 18.9408 10 19.0604 10 19.1802V19.3411C10 20.2573 9.25728 21 8.34109 21C7.55885 21 6.8829 20.4536 6.719 19.6887L5.5 14",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M10 6H9V14H10C11.2982 14 12.5614 14.4211 13.6 15.2L15.747 16.8103C15.9112 16.9334 16.111 17 16.3162 17C16.7246 17 17.0909 16.7404 17.2088 16.3495C17.5537 15.2067 18 13.2728 18 10C18 6.72718 17.5537 4.79327 17.2088 3.65054C17.0909 3.25961 16.7246 3 16.3162 3C16.111 3 15.9112 3.06658 15.747 3.18974L13.6 4.8C12.5614 5.57893 11.2982 6 10 6Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M21 9.99996H22M20.5 6.00109L21.5 5.40637M20.5 14L21.5 14.6481",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}]],jre=[["path",{d:"M4 5L20 5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M4 12L20 12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M4 19L20 19",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],dy=[["path",{d:"M8.5 14.5H15.5M8.5 9.5H12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M14.1706 20.8905C18.3536 20.6125 21.6856 17.2332 21.9598 12.9909C22.0134 12.1607 22.0134 11.3009 21.9598 10.4707C21.6856 6.22838 18.3536 2.84913 14.1706 2.57107C12.7435 2.47621 11.2536 2.47641 9.8294 2.57107C5.64639 2.84913 2.31441 6.22838 2.04024 10.4707C1.98659 11.3009 1.98659 12.1607 2.04024 12.9909C2.1401 14.536 2.82343 15.9666 3.62791 17.1746C4.09501 18.0203 3.78674 19.0758 3.30021 19.9978C2.94941 20.6626 2.77401 20.995 2.91484 21.2351C3.05568 21.4752 3.37026 21.4829 3.99943 21.4982C5.24367 21.5285 6.08268 21.1757 6.74868 20.6846C7.1264 20.4061 7.31527 20.2668 7.44544 20.2508C7.5756 20.2348 7.83177 20.3403 8.34401 20.5513C8.8044 20.7409 9.33896 20.8579 9.8294 20.8905C11.2536 20.9852 12.7435 20.9854 14.1706 20.8905Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],Nre=[["path",{d:"M7 6.5C7 4.01472 9.01472 2 11.5 2C13.9853 2 16 4.01472 16 6.5V11.5C16 13.9853 13.9853 16 11.5 16C9.01472 16 7 13.9853 7 11.5V6.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M11.5 19H11.0828C7.57267 19 4.57706 16.4623 4 13M11.5 19H11.9172C15.4273 19 18.4229 16.4623 19 13M11.5 19V22",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],tc=[["path",{d:"M16 12H8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"1.5",key:"1"}]],Are=[["path",{d:"M20 12L4 12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}
50]],kre=[["path",{d:"M2.01733 15C4.2169 15 6.00001 16.7831 6.00001 18.9827",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M18 18.9827V18.8908C18 16.742 19.742 15 21.8908 15",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M6.00001 5.01733C6.00001 7.2169 4.2169 9.00001 2.01733 9.00001",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M18 5.01733C18 7.19765 19.769 8.96876 21.9423 8.9996",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}],["path",{d:"M16 5H8C5.17157 5 3.75736 5 2.87868 5.87868C2 6.75736 2 8.17157 2 11V13C2 15.8284 2 17.2426 2.87868 18.1213C3.75736 19 5.17157 19 8 19H16C18.8284 19 20.2426 19 21.1213 18.1213C22 17.2426 22 15.8284 22 13V11C22 8.17157 22 6.75736 21.1213 5.87868C20.2426 5 18.8284 5 16 5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"4"}],["path",{d:"M15 12C15 13.6569 13.6569 15 12 15C10.3431 15 9 13.6569 9 12C9 10.3431 10.3431 9 12 9C13.6569 9 15 10.3431 15 12Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"5"}]],Sre=[["path",{d:"M2.01733 17.4993C4.2169 17.4993 6.00001 19.2824 6.00001 21.4819",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M18 21.4819V21.39C18 19.2412 19.742 17.4993 21.8908 17.4993",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M6.00001 7.5166C6.00001 9.71617 4.2169 11.4993 2.01733 11.4993",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M18 7.5166C18 9.69692 19.769 11.468 21.9423 11.4989",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}],["path",{d:"M17 7.50098C19.175 7.51308 20.3529 7.60953 21.1213 8.37792C22 9.2566 22 10.6708 22 13.4992V15.4992C22 18.3277 22 19.7419 21.1213 20.6206C20.2426 21.4992 18.8284 21.4992 16 21.4992H8C5.17157 21.4992 3.75736 21.4992 2.87868 20.6206C2 19.7419 2 18.3277 2 15.4992V13.4992C2 10.6708 2 9.2566 2.87868 8.37792C3.64706 7.60953 4.82497 7.51308 7 7.50098",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"4"}],["path",{d:"M15 14.4993C15 16.1561 13.6569 17.4993 12 17.4993C10.3431 17.4993 9 16.1561 9 14.4993C9 12.8424 10.3431 11.4993 12 11.4993C13.6569 11.4993 15 12.8424 15 14.4993Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"5"}],["path",{d:"M14.5 5.50195C14.5 5.50195 12.7002 8.00195 12 8.00195C11.2998 8.00195 9.5 5.50195 9.5 5.50195M12 7.50195V2.50195",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"6"}]],qk=[["path",{d:"M2.01733 17.4993C4.2169 17.4993 6.00001 19.2824 6.00001 21.4819",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M18 21.4819V21.39C18 19.2412 19.742 17.4993 21.8908 17.4993",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M6.00001 7.5166C6.00001 9.71617 4.2169 11.4993 2.01733 11.4993",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M18 7.5166C18 9.69692 19.769 11.468 21.9423 11.4989",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}],["path",{d:"M17 7.50098C19.175 7.51308 20.3529 7.60953 21.1213 8.37792C22 9.2566 22 10.6708 22 13.4992V15.4992C22 18.3277 22 19.7419 21.1213 20.6206C20.2426 21.4992 18.8284 21.4992 16 21.4992H8C5.17157 21.4992 3.75736 21.4992 2.87868 20.6206C2 19.7419 2 18.3277 2 15.4992V13.4992C2 10.6708 2 9.2566 2.87868 8.37792C3.64706 7.60953 4.82497 7.51308 7 7.50098",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"4"}],["path",{d:"M15 14.4993C15 16.1561 13.6569 17.4993 12 17.4993C10.3431 17.4993 9 16.1561 9 14.4993C9 12.8424 10.3431 11.4993 12 11.4993C13.6569 11.4993 15 12.8424 15 14.4993Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"5"}],["path",{d:"M9.5 5.00098C9.5 5.00098 11.2998 2.50098 12 2.50098C12.7002 2.50098 14.5 5.00098 14.5 5.00098M12 8.00098V3.00098",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"6"}]],Bre=[["path",{d:"M11.9967 12.5V12M11.9967 6.5V6M11.9967 18.5V18M12.9967 12.5C12.9967 11.9477 12.549 11.5 11.9967 11.5C11.4444 11.5 10.9967 11.9477 10.9967 12.5C10.9967 13.0523 11.4444 13.5 11.9967 13.5C12.549 13.5 12.99
5067 13.0523 12.9967 12.5ZM12.9967 6.5C12.9967 5.94772 12.549 5.5 11.9967 5.5C11.4444 5.5 10.9967 5.94772 10.9967 6.5C10.9967 7.05228 11.4444 7.5 11.9967 7.5C12.549 7.5 12.9967 7.05228 12.9967 6.5ZM12.9967 18.5C12.9967 17.9477 12.549 17.5 11.9967 17.5C11.4444 17.5 10.9967 17.9477 10.9967 18.5C10.9967 19.0523 11.4444 19.5 11.9967 19.5C12.549 19.5 12.9967 19.0523 12.9967 18.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],kg=[["path",{d:"M4 7C4 5.58579 4 4.87868 4.43934 4.43934C4.87868 4 5.58579 4 7 4C8.41421 4 9.12132 4 9.56066 4.43934C10 4.87868 10 5.58579 10 7V17C10 18.4142 10 19.1213 9.56066 19.5607C9.12132 20 8.41421 20 7 20C5.58579 20 4.87868 20 4.43934 19.5607C4 19.1213 4 18.4142 4 17V7Z",stroke:"currentColor",strokeWidth:"1.5",key:"0"}],["path",{d:"M14 7C14 5.58579 14 4.87868 14.4393 4.43934C14.8787 4 15.5858 4 17 4C18.4142 4 19.1213 4 19.5607 4.43934C20 4.87868 20 5.58579 20 7V17C20 18.4142 20 19.1213 19.5607 19.5607C19.1213 20 18.4142 20 17 20C15.5858 20 14.8787 20 14.4393 19.5607C14 19.1213 14 18.4142 14 17V7Z",stroke:"currentColor",strokeWidth:"1.5",key:"1"}]],Uc=[["path",{d:"M15.2141 5.98239L16.6158 4.58063C17.39 3.80646 18.6452 3.80646 19.4194 4.58063C20.1935 5.3548 20.1935 6.60998 19.4194 7.38415L18.0176 8.78591M15.2141 5.98239L6.98023 14.2163C5.93493 15.2616 5.41226 15.7842 5.05637 16.4211C4.70047 17.058 4.3424 18.5619 4 20C5.43809 19.6576 6.94199 19.2995 7.57889 18.9436C8.21579 18.5877 8.73844 18.0651 9.78375 17.0198L18.0176 8.78591M15.2141 5.98239L18.0176 8.78591",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M11 20H17",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"1"}]],Dre=[["path",{d:"M2 16.0333C2 17.9969 2.76322 19.7833 4.01078 21.1151C4.70497 21.8562 5.32548 22 6.32891 22H12.6711C13.6745 22 14.295 21.8562 14.9892 21.1151C16.2368 19.7833 17 17.9969 17 16.0333C17 13.0265 15.2105 10.4354 12.6328 9.2554C12.1918 9.05357 11.8016 9 11.3176 9H7.68245C7.19837 9 6.80816 9.05357 6.36725 9.2554C3.7895 10.4354 2 13.0265 2 16.0333Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M7 9V8C7 6.34533 7.34533 6 9 6H10C11.6547 6 12 6.34533 12 8V9",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M11 6V4.5C11 3.4506 10.6269 3 9.5 3C8.37313 3 8 3.4506 8 4.5V6",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["circle",{cx:"19",cy:"5",r:"3",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}],["path",{d:"M6 4H8M11 4H16",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"4"}]],wf=[["path",{d:"M18.8906 12.846C18.5371 14.189 16.8667 15.138 13.5257 17.0361C10.296 18.8709 8.6812 19.7884 7.37983 19.4196C6.8418 19.2671 6.35159 18.9776 5.95624 18.5787C5 17.6139 5 15.7426 5 12C5 8.2574 5 6.3861 5.95624 5.42132C6.35159 5.02245 6.8418 4.73288 7.37983 4.58042C8.6812 4.21165 10.296 5.12907 13.5257 6.96393C16.8667 8.86197 18.5371 9.811 18.8906 11.154C19.0365 11.7084 19.0365 12.2916 18.8906 12.846Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],Fre=[["path",{d:"M12 8V16M16 12H8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"1.5",key:"1"}]],kl=[["path",{d:"M12 4V20M20 12H4",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],S$=[["path",{d:"M3 6C3 4.58579 3 3.87868 3.43934 3.43934C3.87868 3 4.58579 3 6 3C7.41421 3 8.12132 3 8.56066 3.43934C9 3.87868 9 4.58579 9 6C9 7.41421 9 8.12132 8.56066 8.56066C8.12132 9 7.41421 9 6 9C4.58579 9 3.87868 9 3.43934 8.56066C3 8.12132 3 7.41421 3 6Z",stroke:"currentColor",strokeWidth:"1.5",key:"0"}],["path",{d:"M3 18C3 16.5858 3 15.8787 3.43934 15.4393C3.87868 15 4.58579 15 6 15C7.41421 15 8.12132 15 8.56066 15.4393C9 15.8787 9 16.5858 9 18C9 19.4142 9 20.1213 8.56066 20.5607C8.12132 21 7.41421 21 6 21C4.58579 21 3.87868 21 3.43934 20.5607C3 20.1213 3 19.4142 3 18Z",stroke:"currentColor",strokeWidth:"1.5",key:"1"}],["path",{d:"M3 12L9 12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M12 3V8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}],["path",{d:"M15 6C15 4.58579 15 3.87868 15.4393 3.43934C15.8787 3 16.5858 3 18 3C19.4142 3 20.1213 3 20.5607 3.43934C21 3.87868 21 4.58579 21 6C21 7.41421 21 8.12132 20.5607 8.56066C20.1213 9 19.4142 9 18 9C16.5858 9 15.8787 9 15.4393 8.56066C15 8.12132 15 7.41421 15 6Z",stroke:"currentColor",strokeWidth:"1.5",key:"4"}],["path",{d:"M21 12H15C13.5858 12 12.8787 12 12.4393 12.4393C12 12.8787 12 13.5858 12 15M12 17.7692V20.5385M15 15V16.5C15 17.9464 15.7837 18 17 18C17.5523 18 18 18.4477 18 19M16 21H15M18 15C19.4142 15 20.1213 15 20.5607 15.44C21 15.8799 21 16.5881 21 18.0043C21 19.4206 21 20.1287 20.5607 20.5687C20.24 20.8898 19.7767 20.9766 19 21",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"5"}]],j3=[["path",{d:"M20.0092 2V5.13219C20.0092 5.42605 19.6418 5.55908 19.4537 5.33333C17.6226 3.2875 14.9617 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],Pre=[["path",{d:"M4 21.001L7.00071 18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M15 10.001L14 11.001",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M17.9999 3.00098L14.9999 6.00098C14.4547 6.54623 14.1821 6.81885 14.0363 7.
5011295C13.759 7.6725 13.759 8.32945 14.0363 8.88901C14.1821 9.1831 14.4547 9.45573 14.9999 10.001C15.5452 10.5462 15.8178 10.8189 16.1119 10.9646C16.6715 11.2419 17.3284 11.2419 17.888 10.9646C18.1821 10.8189 18.4547 10.5462 18.9999 10.001L21.9999 7.00098",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M20 5L17 8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}],["path",{d:"M20 21L12 13M12 13L2 3C2 6.84174 3.52612 10.5261 6.24264 13.2426L9 16L12 13Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"4"}]],Tre=[["path",{d:"M2.99219 6C2.99219 7.65685 4.33533 9 5.99219 9C7.64904 9 8.99219 7.65685 8.99219 6C8.99219 4.34315 7.64904 3 5.99219 3C4.33533 3 2.99219 4.34315 2.99219 6Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M8.99219 8L20.9922 19",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M8.99193 16L12.9922 12M2.99219 18C2.99219 19.6569 4.33533 21 5.99219 21C7.64904 21 8.99219 19.6569 8.99219 18C8.99219 16.3431 7.64904 15 5.99219 15C4.33533 15 2.99219 16.3431 2.99219 18Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M15.4922 9.5L20.9922 4",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}]],vo=[["path",{d:"M17 17L21 21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M19 11C19 6.58172 15.4183 3 11 3C6.58172 3 3 6.58172 3 11C3 15.4183 6.58172 19 11 19C15.4183 19 19 15.4183 19 11Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],to=[["path",{d:"M8.87038 6.13264L14.7327 4.19538C18.033 3.10476 19.6831 2.55945 20.5579 3.43426C21.4327 4.30907 20.8874 5.95922 19.7968 9.25953L17.8595 15.1218C16.6236 18.8619 16.0056 20.7319 14.8796 20.9603C14.6411 21.0087 14.3955 21.0129 14.1549 20.9727C13.019 20.7832 12.3132 18.9359 10.9016 15.2413C10.6328 14.5376 10.4983 14.1858 10.2574 13.9127C10.2018 13.8497 10.1424 13.7903 10.0795 13.7348C9.80638 13.4938 9.45455 13.3594 8.75089 13.0906C5.05627 11.679 3.20896 10.9732 3.01945 9.83727C2.97931 9.59669 2.98353 9.35108 3.03189 9.11259C3.26025 7.98657 5.13029 7.36859 8.87038 6.13264Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M12.8008 11.1865L15.498 8.48926",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],B$=[["path",{d:"M15.5 12C15.5 13.933 13.933 15.5 12 15.5C10.067 15.5 8.5 13.933 8.5 12C8.5 10.067 10.067 8.5 12 8.5C13.933 8.5 15.5 10.067 15.5 12Z",stroke:"currentColor",strokeWidth:"1.5",key:"0"}],["path",{d:"M21.011 14.0965C21.5329 13.9558 21.7939 13.8854 21.8969 13.7508C22 13.6163 22 13.3998 22 12.9669V11.0332C22 10.6003 22 10.3838 21.8969 10.2493C21.7938 10.1147 21.5329 10.0443 21.011 9.90358C19.0606 9.37759 17.8399 7.33851 18.3433 5.40087C18.4817 4.86799 18.5509 4.60156 18.4848 4.44529C18.4187 4.28902 18.2291 4.18134 17.8497 3.96596L16.125 2.98673C15.7528 2.77539 15.5667 2.66972 15.3997 2.69222C15.2326 2.71472 15.0442 2.90273 14.6672 3.27873C13.208 4.73448 10.7936 4.73442 9.33434 3.27864C8.95743 2.90263 8.76898 2.71463 8.60193 2.69212C8.43489 2.66962 8.24877 2.77529 7.87653 2.98663L6.15184 3.96587C5.77253 4.18123 5.58287 4.28891 5.51678 4.44515C5.45068 4.6014 5.51987 4.86787 5.65825 5.4008C6.16137 7.3385 4.93972 9.37763 2.98902 9.9036C2.46712 10.0443 2.20617 10.1147 2.10308 10.2492C2 10.3838 2 10.6003 2 11.0332V12.9669C2 13.3998 2 13.6163 2.10308 13.7508C2.20615 13.8854 2.46711 13.9558 2.98902 14.0965C4.9394 14.6225 6.16008 16.6616 5.65672 18.5992C5.51829 19.1321 5.44907 19.3985 5.51516 19.5548C5.58126 19.7111 5.77092 19.8188 6.15025 20.0341L7.87495 21.0134C8.24721 21.2247 8.43334 21.3304 8.6004 21.3079C8.76746 21.2854 8.95588 21.0973 9.33271 20.7213C10.7927 19.2644 13.2088 19.2643 14.6689 20.7212C15.0457 21.0973 15.2341 21.2853 15.4012 21.3078C15.5682 21.3303 15.7544 21.2246 16.1266 21.0133L17.8513 20.034C18.2307 19.8187 18.4204 19.711 18.4864 19.5547C18.5525 19.3984 18.4833 19.132 18.3448 18.5991C17.8412 16.6616 19.0609 14.6226 21.011 14.0965Z",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"1"}]],tu=[["path",{d:"M21 6.5C21 8.15685 19.6569 9.5 18 9.5C16.3431 9.5 15 8.15685 15 6.5C15 4.84315 16.3431 3.5 18 3.5C19.6569 3.5 21 4.84315 21 6.5Z",stroke:"currentColor",strokeWidth:"1.5",key:"0"}],["path",{d:"M9 12C9 13.6569 7.65685 15 6 15C4.34315 15 3 13.6569 3 12C3 10.3431 4.34315 9 6 9C7.65685 9 9 10.3431 9 12Z",stroke:"currentColor",strokeWidth:"1.5",key:"1"}],["path",{d:"M21 17.5C21 19.1569 19.6569 20.5 18 20.5C16.3431 20.5 15 19.1569 15 17.5C15 15.8431 16.3431 14.5 18 14.5C19.6569 14.5 21 15.8431 21 17.5Z",stroke:"currentColor",strokeWidth:"1.5",key:"2"}],["path",{d:"M8.72852 10.7495L15.2285 7.75M8.72852 13.25L15.2285 16.2495",stroke:"currentColor",strokeWidth:"1.5",key:"3"}]],Mre=[["path",{d:"M18.7088 3.49534C16.8165 2.55382 14.5009 2 12 2C9.4991 2 7.1835 2.55382 5.29116 3.49534C4.3
506318 3.95706 3.89919 4.18792 3.4496 4.91378C3 5.63965 3 6.34248 3 7.74814V11.2371C3 16.9205 7.54236 20.0804 10.173 21.4338C10.9067 21.8113 11.2735 22 12 22C12.7265 22 13.0933 21.8113 13.8269 21.4338C16.4576 20.0804 21 16.9205 21 11.2371L21 7.74814C21 6.34249 21 5.63966 20.5504 4.91378C20.1008 4.18791 19.6368 3.95706 18.7088 3.49534Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],Ore=[["path",{d:"M3.32352 13.0113C3.6739 10.009 4.18586 7.75784 4.66063 6.15851C5.04994 4.84711 5.24459 4.19141 6.04283 3.5957C6.84107 3 7.65697 3 9.28876 3H14.7113C16.3431 3 17.159 3 17.9572 3.5957C18.7554 4.19141 18.9501 4.84711 19.3394 6.15851C19.8142 7.75784 20.3261 10.009 20.6765 13.0113C21.0895 16.5497 21.2959 18.3189 20.1027 19.6594C18.9095 21 16.9758 21 13.1084 21H10.8916C7.02422 21 5.09052 21 3.89731 19.6594C2.70411 18.3189 2.91058 16.5497 3.32352 13.0113Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M9 7C9 8.65685 10.3431 10 12 10C13.6569 10 15 8.65685 15 7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],Lre=[["path",{d:"M8 7H16C17.8856 7 18.8284 7 19.4142 7.58579C20 8.17157 20 9.11438 20 11V15C20 18.2998 20 19.9497 18.9749 20.9749C17.9497 22 16.2998 22 13 22H11C7.70017 22 6.05025 22 5.02513 20.9749C4 19.9497 4 18.2998 4 15V11C4 9.11438 4 8.17157 4.58579 7.58579C5.17157 7 6.11438 7 8 7Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M16 9.5C16 5.63401 14.2091 2 12 2C9.79086 2 8 5.63401 8 9.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],D$=[["path",{d:"M13.5 2H10.5C8.14298 2 6.96447 2 6.23223 2.73223C5.5 3.46447 5.5 4.64298 5.5 7V17C5.5 19.357 5.5 20.5355 6.23223 21.2678C6.96447 22 8.14298 22 10.5 22H13.5C15.857 22 17.0355 22 17.7678 21.2678C18.5 20.5355 18.5 19.357 18.5 17V7C18.5 4.64298 18.5 3.46447 17.7678 2.73223C17.0355 2 15.857 2 13.5 2Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M12.125 19H12M12.25 19C12.25 19.1381 12.1381 19.25 12 19.25C11.8619 19.25 11.75 19.1381 11.75 19C11.75 18.8619 11.8619 18.75 12 18.75C12.1381 18.75 12.25 18.8619 12.25 19Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],N3=[["path",{d:"M16.9881 7C16.9474 4.98489 16.7678 3.81809 15.9749 3.02513C14.9497 2 13.2998 2 10 2C6.70017 2 5.05025 2 4.02513 3.02513C3 4.05025 3 5.70017 3 9V15C3 18.2998 3 19.9497 4.02513 20.9749C5.05025 22 6.70017 22 10 22C13.2998 22 14.9497 22 15.9749 20.9749C17 19.9497 17 18.2998 17 15L16.9881 13",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M18 7H10C9.06812 7 8.60218 7 8.23463 7.15224C7.74458 7.35523 7.35523 7.74458 7.15224 8.23463C7 8.60218 7 9.06812 7 10C7 10.9319 7 11.3978 7.15224 11.7654C7.35523 12.2554 7.74458 12.6448 8.23463 12.8478C8.60218 13 9.06812 13 10 13V15L13 13H18C18.9319 13 19.3978 13 19.7654 12.8478C20.2554 12.6448 20.6448 12.2554 20.8478 11.7654C21 11.3978 21 10.9319 21 10C21 9.06812 21 8.60218 20.8478 8.23463C20.6448 7.74458 20.2554 7.35523 19.7654 7.15224C19.3978 7 18.9319 7 18 7Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M10.125 19H10M10.25 19C10.25 19.1381 10.1381 19.25 10 19.25C9.86193 19.25 9.75 19.1381 9.75 19C9.75 18.8619 9.86193 18.75 10 18.75C10.1381 18.75 10.25 18.8619 10.25 19Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M14.125 10H14M14.25 10C14.25 10.1381 14.1381 10.25 14 10.25C13.8619 10.25 13.75 10.1381 13.75 10C13.75 9.86193 13.8619 9.75 14 9.75C14.1381 9.75 14.25 9.86193 14.25 10Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}],["path",{d:"M10.625 10.0007H10.5M10.75 10.0007C10.75 10.1388 10.6381 10.2507 10.5 10.2507C10.3619 10.2507 10.25 10.1388 10.25 10.0007C10.25 9.86266 10.3619 9.75073 10.5 9.75073C10.6381 9.75073 10.75 9.86266 10.75 10.0007Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"4"}],["path",{d:"M17.625 10H17.5M17.75 10C17.75 10.1381 17.6381 10.25 17.5 10.25C17.3619 10.25 17.25 10.1381 17.25 10C17.25 9.86193 17.3619 9.75 17.5 9.75C17.6381 9.75 17.75 9.86193 17.75 10Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"5"}]],Rre=[["path",{d:"M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],A3=[["path",{d:"M3.50002 10V15C3.50002 17.8284 3.50002 19.2426 4.37869 20.1213C5.25737 21 6.67159 21 9.50002 21H14.5C17.3284 21 18.7427 21 19.6213 20.1213C20.5 19.2426 20.5 17.8284 20.5 15V10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M17 7.50184C17 8.88255 15.8807 9.99997 14.5 9.99997C13.1193 9.99997 12 8.88068 12 7.49997C12 8.88068 10.8807 9.99997 9.50002 9.99997C8.1193 9.99997 7.00002 8.88068 7.00002 7.49997C7.00002 8.88068 5.82655 9.99997 4.37901 9.99997C3.59984 9.99997 2.90008 9.67567 2.42 9.16087C1.59462 8.2758 2.12561 6.97403 2.81448 5.98842L3.20202 5.45851C4.08386 4.2527 4.52478 3.6498 5.16493 3.32494C5.80508 3.00008 6.55201 3.00018 8.04587 3.00038L15.9551 3.00143C17.4485 3.00163 18.1952 3.00173 
5018.8351 3.32658C19.475 3.65143 19.9158 4.25414 20.7974 5.45957L21.1855 5.99029C21.8744 6.97589 22.4054 8.27766 21.58 9.16273C21.0999 9.67754 20.4002 10.0018 19.621 10.0018C18.1734 10.0018 17 8.88255 17 7.50184Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M14.9971 17C14.3133 17.6072 13.2247 18 11.9985 18C10.7723 18 9.68376 17.6072 9 17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],_re=[["path",{d:"M5.99756 12V17.6841C5.99756 19.4952 5.99756 20.4008 6.58285 20.9635C7.24789 21.6028 9.6154 21.9785 11.9925 21.9991C14.3085 22.0192 16.6337 21.7022 17.4021 20.9635C17.9874 20.4008 17.9874 19.4952 17.9874 17.6841V12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M5.72228 14.022C4.8566 13.7083 3.22971 13.4394 2.49588 12.7032C1.48592 11.69 2.13864 10.3201 3.37707 7.73891C3.93449 6.5771 5.00094 5.72243 6.24362 5.38452C6.41238 5.33863 6.55884 5.23314 6.65592 5.08755L7.93933 3.08867C7.97639 3.03309 8.02343 2.98533 8.08061 2.95084C8.65909 2.60195 10.0921 1.99998 11.9925 1.99998C13.8929 1.99998 15.2321 2.60195 15.8105 2.95084C15.8677 2.98533 15.9148 3.03309 15.9518 3.08867L17.2721 5.0687C17.3692 5.21429 17.5156 5.31978 17.6844 5.36567C18.9271 5.70358 19.9451 6.45012 20.5026 7.61193C21.8937 10.1413 22.5105 11.6707 21.5005 12.6839C20.7667 13.4201 19.1174 13.7116 18.2517 14.0253",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M6.50098 5.49998L10.7345 8.79261C11.3409 9.26419 11.644 9.49998 12.001 9.49998C12.358 9.49998 12.6611 9.26419 13.2675 8.79261L17.501 5.49998",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M9.50098 2.99998L11.001 8.99998M14.501 2.99998L13.001 8.99998",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}]],F$=[["path",{d:"M11.9854 15.4083L15.2268 19.0936C16.4277 20.4589 17.0282 21.1416 17.6567 20.9754C18.2852 20.8092 18.5008 19.9108 18.9318 18.1138L21.3229 8.1459C21.9868 5.37832 22.3187 3.99454 21.5808 3.312C20.843 2.62947 19.564 3.13725 17.0061 4.15282L5.13876 8.86449C3.09293 9.67674 2.07001 10.0829 2.00507 10.7808C1.99842 10.8522 1.99831 10.9241 2.00474 10.9955C2.06754 11.6937 3.08921 12.1033 5.13255 12.9223C6.05838 13.2934 6.5213 13.479 6.8532 13.8344C6.89052 13.8743 6.9264 13.9157 6.96078 13.9584C7.26658 14.3384 7.39709 14.8371 7.65808 15.8344L8.14653 17.701C8.4005 18.6715 8.52749 19.1568 8.86008 19.223C9.19267 19.2891 9.48225 18.8867 10.0614 18.0819L11.9854 15.4083ZM11.9854 15.4083L11.6676 15.0771C11.3059 14.7001 11.1251 14.5117 11.1251 14.2775C11.1251 14.0433 11.3059 13.8548 11.6676 13.4778L15.2406 9.75409",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],Ur=[["path",{d:"M5 14L8.5 17.5L19 6.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],ru=[["path",{d:"M2.46433 9.34375C2.21579 9.34375 1.98899 9.14229 2.00041 8.87895C2.06733 7.33687 2.25481 6.33298 2.78008 5.53884C3.08228 5.08196 3.45765 4.68459 3.88923 4.36468C5.05575 3.5 6.70139 3.5 9.99266 3.5H14.0074C17.2986 3.5 18.9443 3.5 20.1108 4.36468C20.5424 4.68459 20.9177 5.08196 21.2199 5.53884C21.7452 6.33289 21.9327 7.33665 21.9996 8.87843C22.011 9.14208 21.7839 9.34375 21.5351 9.34375C20.1493 9.34375 19.0259 10.533 19.0259 12C19.0259 13.467 20.1493 14.6562 21.5351 14.6562C21.7839 14.6562 22.011 14.8579 21.9996 15.1216C21.9327 16.6634 21.7452 17.6671 21.2199 18.4612C20.9177 18.918 20.5424 19.3154 20.1108 19.6353C18.9443 20.5 17.2986 20.5 14.0074 20.5H9.99266C6.70139 20.5 5.05575 20.5 3.88923 19.6353C3.45765 19.3154 3.08228 18.918 2.78008 18.4612C2.25481 17.667 2.06733 16.6631 2.00041 15.1211C1.98899 14.8577 2.21579 14.6562 2.46433 14.6562C3.85012 14.6562 4.97352 13.467 4.97352 12C4.97352 10.533 3.85012 9.34375 2.46433 9.34375Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M9 3.5L9 20.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],Ire=[["path",{d:"M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M10.5359 11.0075C9.71585 10.8916 7.84666 11.0834 6.93011 12.7782C6.01355 14.4729 6.9373 16.2368 7.51374 16.9069C8.08298 17.5338 9.89226 18.721 11.8114 17.5619C12.2871 17.2746 12.8797 17.0603 13.552 14.8153L13.4738 5.98145C13.3441 6.95419 14.4186 9.23575 17.478 9.5057",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],k3=[["circle",{cx:"12",cy:"7",r:"4",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M12 14C7 14 4 16.5 4 19C4 20.1046 4.89543 21 6 21H18C19.1046 21 20 20.1046 20 19C20 16.5 17 14 12 14Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],$re=[["path",{d:"M3 20.5002C3.28417 16.8058 6.3 13.7193 10.0008 13.5379C10.3134 13.5226 10.6446 13.5097 11 13.5L11.995 13.5663C12.6939 13.6129 13.3665 13.7543 14 13.9777",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M18 15.5V21.5M21 18.5L15 18.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["circle",{cx:"11",cy:"6.5",r:"4",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],zre=[["path",{d:"M11.995 13.5663L11 13.5C10.6446 13.5097 10.3134 13.5226 10.0008 13.5379C6.3 13.7193 3.28417 16.8058 3 20.5002",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["circle",{cx:"11",cy:"6.5",r:"4",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M15.5 16L19.5 20M21 18C21 16.067 19.433 14.5 17.5 14.5C15.567 14.5 14 16.067 14 18C14 19.933 15.567 21.5 17.5 21.5C19.433 21.5 21 19.933 21 18Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],aw=[["path",{d:"M3 21.0001C3.28417 17.3057 6.3 14.2192 10.0008 14.0378C10.3134 14.0225 10.6446 14.0096 11 13.9999L11.995 14.0662C13.0751 14.1382 14.0925 14.4366 15 14.9146",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["circle",{cx:"11",cy:"6.99988",r:"4",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M14 19.3332C14 19.3332 14.875 19.3332 15.75 20.9999C15.75 20.9999 18.5294 16.8332 21 15.9999",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],wn=[["path",{d:"M18.4995 20.5C18.2663 17.5685 15.8417 15.2477 12.808 15.0521L11.9995 15C11.7107 15.0076 11.4416 15.0178 11.1877 15.0298C8.18075 15.1723 5.7304 17.5974 5.49951 20.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}
50],["path",{d:"M15.2495 9.25C15.2495 11.0449 13.7944 12.5 11.9995 12.5C10.2046 12.5 8.74952 11.0449 8.74952 9.25C8.74952 7.45507 10.2046 6 11.9995 6C13.7944 6 15.2495 7.45507 15.2495 9.25Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M5.50249 8.5C5.17908 7.99485 4.99158 7.39432 4.99158 6.75C4.99158 4.95507 6.44665 3.5 8.24157 3.5C8.68752 3.5 9.1125 3.58982 9.49939 3.75235",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M18.4963 8.5C18.8197 7.99485 19.0072 7.39432 19.0072 6.75C19.0072 4.95507 17.5521 3.5 15.7572 3.5C15.3113 3.5 14.8863 3.58982 14.4994 3.75235",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}],["path",{d:"M22.0007 17.9996C21.8208 15.7374 19.9995 13.5 17.9995 13",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"4"}],["path",{d:"M1.99927 17.9996C2.17923 15.7374 4.00049 13.5 6.00049 13",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"5"}]],Vre=[["path",{d:"M20 21.0001C19.713 17.269 16.7289 14.3151 12.995 14.0662L12 13.9999C11.6446 14.0096 11.3134 14.0225 11.0008 14.0378C7.3 14.2192 4.28417 17.3057 4 21.0001",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["circle",{cx:"12",cy:"6.99988",r:"4",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],Ure=[["path",{d:"M2 11C2 7.70017 2 6.05025 3.02513 5.02513C4.05025 4 5.70017 4 9 4H10C13.2998 4 14.9497 4 15.9749 5.02513C17 6.05025 17 7.70017 17 11V13C17 16.2998 17 17.9497 15.9749 18.9749C14.9497 20 13.2998 20 10 20H9C5.70017 20 4.05025 20 3.02513 18.9749C2 17.9497 2 16.2998 2 13V11Z",stroke:"currentColor",strokeWidth:"1.5",key:"0"}],["path",{d:"M17 8.90585L17.1259 8.80196C19.2417 7.05623 20.2996 6.18336 21.1498 6.60482C22 7.02628 22 8.42355 22 11.2181V12.7819C22 15.5765 22 16.9737 21.1498 17.3952C20.2996 17.8166 19.2417 16.9438 17.1259 15.198L17 15.0941",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"1"}],["circle",{cx:"11.5",cy:"9.5",r:"1.5",stroke:"currentColor",strokeWidth:"1.5",key:"2"}]],ow=[["path",{d:"M22 8C22 8 18 14 12 14C6 14 2 8 2 8",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M15 13.5L16.5 16",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M20 11L22 13",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M2 13L4 11",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}],["path",{d:"M9 13.5L7.5 16",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"4"}]],qre=[["path",{d:"M14 14.8135V9.18646C14 6.04126 14 4.46866 13.0747 4.0773C12.1494 3.68593 11.0603 4.79793 8.88232 7.02192C7.75439 8.17365 7.11085 8.42869 5.50604 8.42869C4.10257 8.42869 3.40084 8.42869 2.89675 8.77262C1.85035 9.48655 2.00852 10.882 2.00852 12C2.00852 13.118 1.85035 14.5134 2.89675 15.2274C3.40084 15.5713 4.10257 15.5713 5.50604 15.5713C7.11085 15.5713 7.75439 15.8264 8.88232 16.9781C11.0603 19.2021 12.1494 20.3141 13.0747 19.9227C14 19.5313 14 17.9587 14 14.8135Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M17 9C17.6254 9.81968 18 10.8634 18 12C18 13.1366 17.6254 14.1803 17 15",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M20 7C21.2508 8.36613 22 10.1057 22 12C22 13.8943 21.2508 15.6339 20 17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],Wre=[["path",{d:"M18 14.8135V9.18646C18 6.04126 18 4.46866 17.074 4.0773C16.1481 3.68593 15.0583 4.79793 12.8787 7.02192C11.7499 8.17365 11.1059 8.42869 9.5 8.42869C8.3879 8.42869 7.02749 8.28131 6.33706 9.33566C6 9.85038 6 10.5669 6 12C6 13.4331 6 14.1496 6.33706 14.6643C7.02749 15.7187 8.3879 15.5713 9.5 15.5713C11.106 15.5713 11.7499 15.8264 12.8787 16.9781C15.0583 19.2021 16.1481 20.3141 17.074 19.9227C18 19.5313 18 17.9587 18 14.8135Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],Ba=[["path",{d:"M14 3H5C3.89543 3 3 3.89543 3 5C3 6.10457 3.89543 7 5 7H18C18 6.07003 18 5.60504 17.8978 5.22354C1
507.6204 4.18827 16.8117 3.37962 15.7765 3.10222C15.395 3 14.93 3 14 3Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M3 5V15C3 17.8284 3 19.2426 3.87868 20.1213C4.75736 21 6.17157 21 9 21H15C17.8284 21 19.2426 21 20.1213 20.1213C21 19.2426 21 17.8284 21 15V13C21 10.1716 21 8.75736 20.1213 7.87868C19.2426 7 17.8284 7 15 7H7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M21 12H19C18.535 12 18.3025 12 18.1118 12.0511C17.5941 12.1898 17.1898 12.5941 17.0511 13.1118C17 13.3025 17 13.535 17 14C17 14.465 17 14.6975 17.0511 14.8882C17.1898 15.4059 17.5941 15.8102 18.1118 15.9489C18.3025 16 18.535 16 19 16H21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],nu=[["path",{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 13.3789 2.27907 14.6926 2.78382 15.8877C3.06278 16.5481 3.20226 16.8784 3.21953 17.128C3.2368 17.3776 3.16334 17.6521 3.01642 18.2012L2 22L5.79877 20.9836C6.34788 20.8367 6.62244 20.7632 6.87202 20.7805C7.12161 20.7977 7.45185 20.9372 8.11235 21.2162C9.30745 21.7209 10.6211 22 12 22Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M8.58815 12.3773L9.45909 11.2956C9.82616 10.8397 10.2799 10.4153 10.3155 9.80826C10.3244 9.65494 10.2166 8.96657 10.0008 7.58986C9.91601 7.04881 9.41086 7 8.97332 7C8.40314 7 8.11805 7 7.83495 7.12931C7.47714 7.29275 7.10979 7.75231 7.02917 8.13733C6.96539 8.44196 7.01279 8.65187 7.10759 9.07169C7.51023 10.8548 8.45481 12.6158 9.91948 14.0805C11.3842 15.5452 13.1452 16.4898 14.9283 16.8924C15.3481 16.9872 15.558 17.0346 15.8627 16.9708C16.2477 16.8902 16.7072 16.5229 16.8707 16.165C17 15.8819 17 15.5969 17 15.0267C17 14.5891 16.9512 14.084 16.4101 13.9992C15.0334 13.7834 14.3451 13.6756 14.1917 13.6845C13.5847 13.7201 13.1603 14.1738 12.7044 14.5409L11.6227 15.4118",stroke:"currentColor",strokeWidth:"1.5",key:"1"}]],P$=[["path",{d:"M12 20.5C13.8097 20.5 15.5451 20.3212 17.1534 19.9934C19.1623 19.5839 20.1668 19.3791 21.0834 18.2006C22 17.0221 22 15.6693 22 12.9635V11.0365C22 8.33073 22 6.97787 21.0834 5.79937C20.1668 4.62088 19.1623 4.41613 17.1534 4.00662C15.5451 3.67877 13.8097 3.5 12 3.5C10.1903 3.5 8.45489 3.67877 6.84656 4.00662C4.83766 4.41613 3.83321 4.62088 2.9166 5.79937C2 6.97787 2 8.33073 2 11.0365V12.9635C2 15.6693 2 17.0221 2.9166 18.2006C3.83321 19.3791 4.83766 19.5839 6.84656 19.9934C8.45489 20.3212 10.1903 20.5 12 20.5Z",stroke:"currentColor",strokeWidth:"1.5",key:"0"}],["path",{d:"M15.9621 12.3129C15.8137 12.9187 15.0241 13.3538 13.4449 14.2241C11.7272 15.1705 10.8684 15.6438 10.1728 15.4615C9.9372 15.3997 9.7202 15.2911 9.53799 15.1438C9 14.7089 9 13.8059 9 12C9 10.1941 9 9.29112 9.53799 8.85618C9.7202 8.70886 9.9372 8.60029 10.1728 8.53854C10.8684 8.35621 11.7272 8.82945 13.4449 9.77593C15.0241 10.6462 15.8137 11.0813 15.9621 11.6871C16.0126 11.8933 16.0126 12.1067 15.9621 12.3129Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],Hre=[["path",{d:"M18.5016 19.1217L21 21.6217M20 15.1217C20 12.0842 17.5376 9.62173 14.5 9.62173C11.4624 9.62173 9 12.0842 9 15.1217C9 18.1593 11.4624 20.6217 14.5 20.6217C17.5376 20.6217 20 18.1593 20 15.1217Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M14.5 13.1217V17.1217M16.5 15.1217H12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M10 3.62173H14M3 10.6217V14.6217M6.5 21.6217C4.567 21.6217 3 20.0547 3 18.1217M17.5 3.62173C19.433 3.62173 21 5.18873 21 7.12173M3 7.12173C3 5.18873 4.567 3.62173 6.5 3.62173",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],Gre=[["path",{d:"M18.5016 18.5L21 21M20 14.5C20 11.4624 17.5376 9 14.5 9C11.4624 9 9 11.4624 9 14.5C9 17.5376 11.4624 20 14.5 20C17.5376 20 20 17.5376 20 14.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M16.5 14.5H12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M10 3H14M3 10V14M6.5 21C4.567 21 3 19.433 3 17.5M17.5 3C19.433 3 21 4.567 21 6.5M3 6.5C3 4.567 4.567 3 6.5 3",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]];function T$(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=T$(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function or(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=T$(e))&&(n&&(n+=" "),n+=t);return n}const Kre=(e,t)=>
vendor: 5,994 bytes, line 50
50{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},Xre=(e,t)=>({classGroupId:e,validator:t}),M$=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Sg="-",Wk=[],Yre="arbitrary..",Qre=e=>{const t=Jre(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return Zre(o);const l=o.split(Sg),c=l[0]===""&&l.length>1?1:0;return O$(l,c,t)},getConflictingClassGroupIds:(o,l)=>{if(l){const c=n[o],u=r[o];return c?u?Kre(u,c):c:u||Wk}return r[o]||Wk}}},O$=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const i=e[t],a=r.nextPart.get(i);if(a){const u=O$(e,t+1,a);if(u)return u}const o=r.validators;if(o===null)return;const l=t===0?e.join(Sg):e.slice(t).join(Sg),c=o.length;for(let u=0;u<c;u++){const f=o[u];if(f.validator(l))return f.classGroupId}},Zre=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?Yre+n:void 0})(),Jre=e=>{const{theme:t,classGroups:r}=e;return ene(r,t)},ene=(e,t)=>{const r=M$();for(const n in e){const i=e[n];S3(i,r,n,t)}return r},S3=(e,t,r,n)=>{const i=e.length;for(let a=0;a<i;a++){const o=e[a];tne(o,t,r,n)}},tne=(e,t,r,n)=>{if(typeof e=="string"){rne(e,t,r);return}if(typeof e=="function"){nne(e,t,r,n);return}sne(e,t,r,n)},rne=(e,t,r)=>{const n=e===""?t:L$(t,e);n.classGroupId=r},nne=(e,t,r,n)=>{if(ine(e)){S3(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(Xre(r,e))},sne=(e,t,r,n)=>{const i=Object.entries(e),a=i.length;for(let o=0;o<a;o++){const[l,c]=i[o];S3(c,L$(t,l),r,n)}},L$=(e,t)=>{let r=e;const n=t.split(Sg),i=n.length;for(let a=0;a<i;a++){const o=n[a];let l=r.nextPart.get(o);l||(l=M$(),r.nextPart.set(o,l)),r=l}return r},ine=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,ane=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const i=(a,o)=>{r[a]=o,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(a){let o=r[a];if(o!==void 0)return o;if((o=n[a])!==void 0)return i(a,o),o},set(a,o){a in r?r[a]=o:i(a,o)}}},lw="!",Hk=":",one=[],Gk=(e,t,r,n,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:i}),lne=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=i=>{const a=[];let o=0,l=0,c=0,u;const f=i.length;for(let v=0;v<f;v++){const b=i[v];if(o===0&&l===0){if(b===Hk){a.push(i.slice(c,v)),c=v+1;continue}if(b==="/"){u=v;continue}}b==="["?o++:b==="]"?o--:b==="("?l++:b===")"&&l--}const x=a.length===0?i:i.slice(c);let m=x,p=!1;x.endsWith(lw)?(m=x.slice(0,-1),p=!0):x.startsWith(lw)&&(m=x.slice(1),p=!0);const y=u&&u>c?u-c:void 0;return Gk(a,p,m,y)};if(t){const i=t+Hk,a=n;n=o=>o.startsWith(i)?a(o.slice(i.length)):Gk(one,!1,o,void 0,!0)}if(r){const i=n;n=a=>r({className:a,parseClassName:i})}return n},cne=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let i=[];for(let a=0;a<r.length;a++){const o=r[a],l=o[0]==="[",c=t.has(o);l||c?(i.length>0&&(i.sort(),n.push(...i),i=[]),n.push(o)):i.push(o)}return i.length>0&&(i.sort(),n.push(...i)),n}},une=e=>({cache:ane(e.cacheSize),parseClassName:lne(e),sortModifiers:cne(e),postfixLookupClassGroupIds:dne(e),...Qre(e)}),dne=e=>{const t=Object.create(null),r=e.postfixLookupClassGroups;if(r)for(let n=0;n<r.length;n++)t[r[n]]=!0;return t},xne=/\s+/,fne=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,l=[],c=e.trim().split(xne);let u="";for(let f=c.length-1;f>=0;f-=1){const x=c[f],{isExternal:m,modifiers:p,hasImportantModifier:y,baseClassName:v,maybePostfixModifierPosition:b}=r(x);if(m){u=x+(u.length>0?" "+u:u);continue}let E=!!b,N;if(E){const B=v.substring(0,b);N=n(B);const D=N&&o[N]?n(v):void 0;D&&D!==N&&(N=D,E=!1)}else N=n(v);if(!N){if(!E){u=x+(u.length>0?" "+u:u);continue}if(N=n(v),!N){u=x+(u.length>0?" "+u:u);continue}E=!1}const j=p.length===0?"":p.length===1?p[0]:a(p).join(":"),A=y?j+lw:j,w=A+N;if(l.indexOf(w)>-1)continue;l.push(w);const S=i(N,E);for(let B=0;B<S.length;++B){const D=S[B];l.push(A+D)}u=x+(u.length>0?" "+u:u)}return u},hne=(...e)=>{let t=0,r,n,i="";for(;t<e.length;)(r=e[t++])&&(n=R$(r))&&(i&&(i+=" "),i+=n);return i},R$=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=R$(e[n]))&&(r&&(r+=" "),r+=t);return r},mne=(e,...t)=>{let r,n,i,a;const o=c=>{const u=t.reduce((f,x)=>x(f),e());return r=une(u),n=r.cache.get,i=r.cache.set,a=l,l(c)},l=c=>{const u=n(c);if(u)return u;const f=fne(c,r);return i(c,f),f};return a=o,(...c)=>a(hne(...c))},pne=[],yn=e=>{const t=r=>r[e]||pne;return t.isThemeGetter=!0,t},_$=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,I$=/^\((?:(\w[\w-]*):)?(.+)\)$/i,gne=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,yne=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,vne=/\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$/,bne=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Cne=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,wne=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Yo=e=>gne.test(e),qt=e=>!!e&&!Number.isNaN(Number(e)),ua=e=>!!e&&Number.isInteger(Number(e)),Jb=e=>e.endsWith("%")&&qt(e.slice(0,-1)),Qa=e=>yne.test(e),$$=()=>!0,Ene=e=>vne.test(e)&&!bne.test(e),B3=()=>!1,jne=e=>Cne.test(e),Nne=e=>wne.test(e),Ane=e=>!Ze(e)&&!et(e),kne=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),Sne=e=>Ml(e,U$,B3),Ze=e=>_$.test(e),rc=e=>Ml(e,q$,Ene),Kk=e=>Ml(e,Lne,qt),Bne=e=>Ml(e,H$,$$),Dne=e=>Ml(e,W$,B3),Xk=e=>Ml(e,z$,B3),Fne=e=>Ml(e,V$,Nne),xp=e=>Ml(e,G$,jne),et=e=>I$.test(e),fx=e=>su(e,q$),Pne=e=>su(e,W$),Yk=e=>su(e,z$),Tne=e=>su(e,U$),Mne=e=>su(e,V$),fp=e=>su(e,G$,!0),One=e=>su(e,H$,!0),Ml=(e,t,r)=>{const n=_$.exec(e);
vendor: 9,060 bytes, line 50
50return n?n[1]?t(n[1]):r(n[2]):!1},su=(e,t,r=!1)=>{const n=I$.exec(e);return n?n[1]?t(n[1]):r:!1},z$=e=>e==="position"||e==="percentage",V$=e=>e==="image"||e==="url",U$=e=>e==="length"||e==="size"||e==="bg-size",q$=e=>e==="length",Lne=e=>e==="number",W$=e=>e==="family-name",H$=e=>e==="number"||e==="weight",G$=e=>e==="shadow",Rne=()=>{const e=yn("color"),t=yn("font"),r=yn("text"),n=yn("font-weight"),i=yn("tracking"),a=yn("leading"),o=yn("breakpoint"),l=yn("container"),c=yn("spacing"),u=yn("radius"),f=yn("shadow"),x=yn("inset-shadow"),m=yn("text-shadow"),p=yn("drop-shadow"),y=yn("blur"),v=yn("perspective"),b=yn("aspect"),E=yn("ease"),N=yn("animate"),j=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],w=()=>[...A(),et,Ze],S=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto","contain","none"],D=()=>[et,Ze,c],P=()=>[Yo,"full","auto",...D()],O=()=>[ua,"none","subgrid",et,Ze],M=()=>["auto",{span:["full",ua,et,Ze]},ua,et,Ze],I=()=>[ua,"auto",et,Ze],V=()=>["auto","min","max","fr",et,Ze],W=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],_=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...D()],R=()=>[Yo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],q=()=>[Yo,"screen","full","dvw","lvw","svw","min","max","fit",...D()],G=()=>[Yo,"screen","full","lh","dvh","lvh","svh","min","max","fit",...D()],K=()=>[e,et,Ze],$=()=>[...A(),Yk,Xk,{position:[et,Ze]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],te=()=>["auto","cover","contain",Tne,Sne,{size:[et,Ze]}],ne=()=>[Jb,fx,rc],Y=()=>["","none","full",u,et,Ze],J=()=>["",qt,fx,rc],oe=()=>["solid","dashed","dotted","double"],he=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>[qt,Jb,Yk,Xk],ue=()=>["","none",y,et,Ze],de=()=>["none",qt,et,Ze],me=()=>["none",qt,et,Ze],Le=()=>[qt,et,Ze],Ne=()=>[Yo,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Qa],breakpoint:[Qa],color:[$$],container:[Qa],"drop-shadow":[Qa],ease:["in","out","in-out"],font:[Ane],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Qa],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Qa],shadow:[Qa],spacing:["px",qt],text:[Qa],"text-shadow":[Qa],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Yo,Ze,et,b]}],container:["container"],"container-type":[{"@container":["","normal","size",et,Ze]}],"container-named":[kne],columns:[{columns:[qt,Ze,et,l]}],"break-after":[{"break-after":j()}],"break-before":[{"break-before":j()}],"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:w()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{"inset-s":P(),start:P()}],end:[{"inset-e":P(),end:P()}],"inset-bs":[{"inset-bs":P()}],"inset-be":[{"inset-be":P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[ua,"auto",et,Ze]}],basis:[{basis:[Yo,"full","auto",l,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[qt,Yo,"auto","initial","none",Ze]}],grow:[{grow:["",qt,et,Ze]}],shrink:[{shrink:["",qt,et,Ze]}],order:[{order:[ua,"first","last","none",et,Ze]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:M()}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:M()}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":V()}],"auto-rows":[{"auto-rows":V()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...W(),"normal"]}],"justify-items":[{"justify-items":[..._(),"normal"]}],"justify-self":[{"justify-self":["auto",..._()]}],"align-content":[{content:["normal",...W()]}],"align-items":[{items:[..._(),{baseline:["","last"]}]}],"align-self":[{self:["auto",..._(),{baseline:["","last"]}]}],"place-content":[{"place-content":W()}],"place-items":[{"place-items":[..._(),"baseline"]}],"place-self":[{"place-self":["auto",..._()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pbs:[{pbs:D()}],pbe:[{pbe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mbs:[{mbs:z()}],mbe:[{mbe:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"space-y-reverse":["space-y-reverse"],size:[{size:R()}],"inline-size":[{inline:["auto",...q()]}],"min-inline-size":[{"min-inline":["auto",...q()]}],"max-inline-size":[{"max-inline":["none",...q()]}],"block-size":[{block:["auto",...G()]}],"min-block-size":[{"min-block":["auto",...G()]}],"max-block-size":[{"max-block":["none",...G()]}],w:[{w:[l,"screen",...R()]}],"min-w":[{"min-w":[l,"screen","none",...R()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[o]},...R()]}],h:[{h:["screen","lh",...R()]}],"min-h":[{"min-h":["screen","lh","none",...R()]}],"max-h":[{"max-h":["screen","lh",...R()]}],"font-size":[{text:["base",r,fx,rc]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,One,Bne]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Jb,Ze]}],"font-family":[{font:[Pne,Dne,t]}],"font-features":[{"font-features":[Ze]}],"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,et,Ze]}],"line-clamp":[{"line-clamp":[qt,"none",et,Kk]}],leading:[{leading:[a,...D()]}],"list-image":[{"list-image":["none",et,Ze]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",et,Ze]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:K()}],"text-color":[{text:K()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...oe(),"wavy"]}],"text-decoration-thickness":[{decoration:[qt,"from-font","auto",et,rc]}],"text-decoration-color":[{decoration:K()}],"underline-offset":[{"underline-offset":[qt,"auto",et,Ze]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"tab-size":[{tab:[ua,et,Ze]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",et,Ze]}],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",et,Ze]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:$()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:te()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ua,et,Ze],radial:["",et,Ze],conic:[ua,et,Ze]},Mne,Fne]}],"bg-color":[{bg:K()}],"gradient-from-pos":[{from:ne()}
vendor: 7,380 bytes, line 50
50],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:K()}],"gradient-via":[{via:K()}],"gradient-to":[{to:K()}],rounded:[{rounded:Y()}],"rounded-s":[{"rounded-s":Y()}],"rounded-e":[{"rounded-e":Y()}],"rounded-t":[{"rounded-t":Y()}],"rounded-r":[{"rounded-r":Y()}],"rounded-b":[{"rounded-b":Y()}],"rounded-l":[{"rounded-l":Y()}],"rounded-ss":[{"rounded-ss":Y()}],"rounded-se":[{"rounded-se":Y()}],"rounded-ee":[{"rounded-ee":Y()}],"rounded-es":[{"rounded-es":Y()}],"rounded-tl":[{"rounded-tl":Y()}],"rounded-tr":[{"rounded-tr":Y()}],"rounded-br":[{"rounded-br":Y()}],"rounded-bl":[{"rounded-bl":Y()}],"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-bs":[{"border-bs":J()}],"border-w-be":[{"border-be":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:[...oe(),"hidden","none"]}],"divide-style":[{divide:[...oe(),"hidden","none"]}],"border-color":[{border:K()}],"border-color-x":[{"border-x":K()}],"border-color-y":[{"border-y":K()}],"border-color-s":[{"border-s":K()}],"border-color-e":[{"border-e":K()}],"border-color-bs":[{"border-bs":K()}],"border-color-be":[{"border-be":K()}],"border-color-t":[{"border-t":K()}],"border-color-r":[{"border-r":K()}],"border-color-b":[{"border-b":K()}],"border-color-l":[{"border-l":K()}],"divide-color":[{divide:K()}],"outline-style":[{outline:[...oe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[qt,et,Ze]}],"outline-w":[{outline:["",qt,fx,rc]}],"outline-color":[{outline:K()}],shadow:[{shadow:["","none",f,fp,xp]}],"shadow-color":[{shadow:K()}],"inset-shadow":[{"inset-shadow":["none",x,fp,xp]}],"inset-shadow-color":[{"inset-shadow":K()}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:K()}],"ring-offset-w":[{"ring-offset":[qt,rc]}],"ring-offset-color":[{"ring-offset":K()}],"inset-ring-w":[{"inset-ring":J()}],"inset-ring-color":[{"inset-ring":K()}],"text-shadow":[{"text-shadow":["none",m,fp,xp]}],"text-shadow-color":[{"text-shadow":K()}],opacity:[{opacity:[qt,et,Ze]}],"mix-blend":[{"mix-blend":[...he(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":he()}],"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":[qt]}],"mask-image-linear-from-pos":[{"mask-linear-from":Q()}],"mask-image-linear-to-pos":[{"mask-linear-to":Q()}],"mask-image-linear-from-color":[{"mask-linear-from":K()}],"mask-image-linear-to-color":[{"mask-linear-to":K()}],"mask-image-t-from-pos":[{"mask-t-from":Q()}],"mask-image-t-to-pos":[{"mask-t-to":Q()}],"mask-image-t-from-color":[{"mask-t-from":K()}],"mask-image-t-to-color":[{"mask-t-to":K()}],"mask-image-r-from-pos":[{"mask-r-from":Q()}],"mask-image-r-to-pos":[{"mask-r-to":Q()}],"mask-image-r-from-color":[{"mask-r-from":K()}],"mask-image-r-to-color":[{"mask-r-to":K()}],"mask-image-b-from-pos":[{"mask-b-from":Q()}],"mask-image-b-to-pos":[{"mask-b-to":Q()}],"mask-image-b-from-color":[{"mask-b-from":K()}],"mask-image-b-to-color":[{"mask-b-to":K()}],"mask-image-l-from-pos":[{"mask-l-from":Q()}],"mask-image-l-to-pos":[{"mask-l-to":Q()}],"mask-image-l-from-color":[{"mask-l-from":K()}],"mask-image-l-to-color":[{"mask-l-to":K()}],"mask-image-x-from-pos":[{"mask-x-from":Q()}],"mask-image-x-to-pos":[{"mask-x-to":Q()}],"mask-image-x-from-color":[{"mask-x-from":K()}],"mask-image-x-to-color":[{"mask-x-to":K()}],"mask-image-y-from-pos":[{"mask-y-from":Q()}],"mask-image-y-to-pos":[{"mask-y-to":Q()}],"mask-image-y-from-color":[{"mask-y-from":K()}],"mask-image-y-to-color":[{"mask-y-to":K()}],"mask-image-radial":[{"mask-radial":[et,Ze]}],"mask-image-radial-from-pos":[{"mask-radial-from":Q()}],"mask-image-radial-to-pos":[{"mask-radial-to":Q()}],"mask-image-radial-from-color":[{"mask-radial-from":K()}],"mask-image-radial-to-color":[{"mask-radial-to":K()}],"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":A()}],"mask-image-conic-pos":[{"mask-conic":[qt]}],"mask-image-conic-from-pos":[{"mask-conic-from":Q()}],"mask-image-conic-to-pos":[{"mask-conic-to":Q()}],"mask-image-conic-from-color":[{"mask-conic-from":K()}],"mask-image-conic-to-color":[{"mask-conic-to":K()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:$()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:te()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",et,Ze]}],filter:[{filter:["","none",et,Ze]}],blur:[{blur:ue()}],brightness:[{brightness:[qt,et,Ze]}],contrast:[{contrast:[qt,et,Ze]}],"drop-shadow":[{"drop-shadow":["","none",p,fp,xp]}],"drop-shadow-color":[{"drop-shadow":K()}],grayscale:[{grayscale:["",qt,et,Ze]}],"hue-rotate":[{"hue-rotate":[qt,et,Ze]}],invert:[{invert:["",qt,et,Ze]}],saturate:[{saturate:[qt,et,Ze]}],sepia:[{sepia:["",qt,et,Ze]}],"backdrop-filter":[{"backdrop-filter":["","none",et,Ze]}],"backdrop-blur":[{"backdrop-blur":ue()}],"backdrop-brightness":[{"backdrop-brightness":[qt,et,Ze]}],"backdrop-contrast":[{"backdrop-contrast":[qt,et,Ze]}],"backdrop-grayscale":[{"backdrop-grayscale":["",qt,et,Ze]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[qt,et,Ze]}],"backdrop-invert":[{"backdrop-invert":["",qt,et,Ze]}],"backdrop-opacity":[{"backdrop-opacity":[qt,et,Ze]}],"backdrop-saturate":[{"backdrop-saturate":[qt,et,Ze]}],"backdrop-sepia":[{"backdrop-sepia":["",qt,et,Ze]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":D()}],"border-spacing-x":[{"border-spacing-x":D()}],"border-spacing-y":[{"border-spacing-y":D()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",et,Ze]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[qt,"initial",et,Ze]}],ease:[{ease:["linear","initial",E,et,Ze]}],delay:[{delay:[qt,et,Ze]}],animate:[{animate:["none",N,et,Ze]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,et,Ze]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:de()}],"rotate-x":[{"rotate-x":de()}],"rotate-y":[{"rotate-y":de()}],"rotate-z":[{"rotate-z":de()}],scale:[{scale:me()}],"scale-x":[{"scale-x":me()}],"scale-y":[{"scale-y":me()}],"scale-z":[{"scale-z":me()}],"scale-3d":["scale-3d"],skew:[{skew:Le()}],"skew-x":[{"skew-x":Le()}],"skew-y":[{"skew-y":Le()}],transform:[{transform:[et,Ze,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ne()}],"translate-x":[{"translate-x":Ne()}],"translate-y":[{"translate-y":Ne()}],"translate-z":[{"translate-z":Ne()}],"translate-none":["translate-none"],zoom:[{zoom:[ua,et,Ze]}],accent:[{accent:K()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:K()}
vendor: 5,143 bytes, line 50
50],"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",et,Ze]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":K()}],"scrollbar-track-color":[{"scrollbar-track":K()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mbs":[{"scroll-mbs":D()}],"scroll-mbe":[{"scroll-mbe":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pbs":[{"scroll-pbs":D()}],"scroll-pbe":[{"scroll-pbe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"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",et,Ze]}],fill:[{fill:["none",...K()]}],"stroke-w":[{stroke:[qt,fx,rc,Kk]}],stroke:[{stroke:["none",...K()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},_ne=mne(Rne),mt=(...e)=>_ne(or(e)),Ine=e=>e.trim().split(/\s+/).slice(0,2).map(t=>t[0]??"").join("").toUpperCase(),Yx=e=>
50`${e.toLocaleString("fr-FR")} FCFA`,Sd=e=>/^[A-Za-z]{2}$/.test(e??"")?String.fromCodePoint(...[...e.toUpperCase()].map(t=>127462+t.charCodeAt(0)-65)):"";function $ne(e){return e<12?"Bonjour":e<18?"Bon après-midi":"Bonsoir"}function zne({name:e,image:t,affiliates:r,status:n,promoCode:i,memberSince:a,memberId:o}){const l=lt(),c=$ne(new Date().getHours()),u=n==="Abonné",f=x=>{x.stopPropagation(),navigator.clipboard.writeText(`https://sniperbuisnesscenter.com/signup?affiliationCode=${i}`)};return s.jsxs(Z.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{duration:.35},onClick:()=>l("/profile"),role:"button",tabIndex:0,onKeyDown:x=>x.key==="Enter"&&l("/profile"),className:"bg-surface border border-border rounded-card p-4 flex items-center gap-3 cursor-pointer",children:[s.jsxs("div",{className:"relative shrink-0",children:[s.jsx("img",{src:t,alt:e,className:"size-14 rounded-pill object-cover ring-2 ring-primary ring-offset-2 ring-offset-surface"}),s.jsx("span",{className:"absolute bottom-0 right-0 size-3 rounded-pill bg-success-dot ring-2 ring-surface","aria-hidden":!0})]}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsxs("p",{className:"text-sm text-ink-2 truncate",children:[c,", ",s.jsx("span",{className:"font-bold text-ink",children:e})]}),s.jsxs("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[s.jsx("span",{className:mt("text-[11px] font-semibold px-2 py-0.5 rounded-pill",u?"bg-success-soft text-success":"bg-surface-2 text-ink-2"),children:n}),s.jsxs("span",{className:"text-[11px] text-ink-3",children:[o?`#${o}`:i,r!==null?` · ${r} filleuls`:" · … filleuls",a?` · ${a}`:""]})]})]}),s.jsx("button",{onClick:f,"aria-label":"Copier mon lien d'affiliation",className:"shrink-0 size-9 grid place-items-center rounded-tile bg-primary-soft text-primary",children:s.jsx(L,{icon:A$,size:16})}),s.jsx(L,{icon:Mn,size:18,className:"text-ink-3 shrink-0"})]})}function Vne({number:e,fromNumber:t=0,padStart:r=!1,decimalSeparator:n=".",thousandSeparator:i="",decimalPlaces:a=0,transition:o={stiffness:90,damping:50},className:l,...c}){var v;const u=e.toString(),f=typeof a=="number"?a:u.includes(".")?((v=u.split(".")[1])==null?void 0:v.length)??0:0,x=oy(t),m=kte(x,o),p=C.useRef(null);C.useEffect(()=>{x.set(e)},[e,x]);const y=Lx(m,b=>{let E=f>0?b.toFixed(f):Math.round(b).toString();if(n!=="."&&(E=E.replace(".",n)),r){const[N,j]=E.split(n),A=Math.trunc(Math.abs(e)).toString().length;E=(N??"").padStart(A,"0")+(j?n+j:"")}if(i){const[N,j]=E.split(n),A=N.startsWith("-")?"-":"",S=(A?N.slice(1):N).replace(/\B(?=(\d{3})+(?!\d))/g,i);E=A+S+(j?n+j:"")}return E});return C.useEffect(()=>y.on("change",E=>{p.current&&(p.current.textContent=E)}),[y]),s.jsx("span",{ref:p,className:l,...c,children:y.get()})}const vi={CONVERSION:{USD_TO_XAF:500,XAF_TO_USD:1/660},DISPLAY:{USD_TO_XAF_RATE:500,XAF_TO_USD_RATE:660}},Qk={USD_TO_XAF:1,XAF_TO_USD:660};function e2(e){if(e instanceof Error){const t=e.message.toLowerCase();return t.includes("insufficient")||t.includes("balance")||t.includes("funds")?{type:"insufficient_funds",message:"Solde insuffisant pour effectuer cette conversion",details:e.message}:t.includes("rate")||t.includes("conversion")||t.includes("exchange")?{type:"conversion_rate",message:"Impossible d'obtenir le taux de change. Veuillez réessayer.",details:e.message}:t.includes("network")||t.includes("fetch")||t.includes("timeout")?{type:"network",message:"Problème de connexion. Vérifiez votre connexion internet.",details:e.message}:t.includes("invalid")||t.includes("validation")||t.includes("required")?{type:"validation",message:"Données invalides. Vérifiez les montants saisis.",details:e.message}:{type:"unknown",message:e.message||"Une erreur inattendue s'est produite",details:e.message}}return{type:"unknown",message:"Une erreur inattendue s'est produite",details:String(e)}}function Qx(e,t){return t==="FCFA"?`${e.toLocaleString("fr-FR")} F`:`$${e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`}function Zk(e,t,r,n){if(!e||e<=0)return{isValid:!1,error:"Veuillez entrer un montant valide supérieur à zéro"};if(e>t)return{isValid:!1,error:`Montant insuffisant. Solde disponible: ${Qx(t,r)}`};let i;if(r==="USD"&&n==="FCFA")i=Qk.USD_TO_XAF;else if(r==="FCFA"&&n==="USD")i=Qk.XAF_TO_USD;else return{isValid:!1,error:"Paire de devises non prise en charge"};return e<i?{isValid:!1,error:`Montant minimum requis: ${Qx(i,r)}`}:{isValid:!0}}function Une(e,t,r,n){return t==="USD"&&n==="FCFA"?`1 USD = ${vi.DISPLAY.USD_TO_XAF_RATE} F (Taux favorable)`:t==="FCFA"&&n==="USD"?`${vi.DISPLAY.XAF_TO_USD_RATE} F = 1 USD`:"Taux non disponible"}function qne(e,t,r){if(t==="USD"&&r==="FCFA")return{convertedAmount:Math.round(e*vi.CONVERSION.USD_TO_XAF),rate:vi.CONVERSION.USD_TO_XAF};if(t==="FCFA"&&r==="USD")return{convertedAmount:Math.round(e*vi.CONVERSION.XAF_TO_USD*100)/100,rate:vi.CONVERSION.XAF_TO_USD};throw new Error("Invalid currency pair")}const Jk=e=>
50`${Math.round(e).toLocaleString("fr-FR")} F`;function Wne({balance:e,usdBalance:t,monthDelta:r}){const n=lt(),i=t*vi.CONVERSION.USD_TO_XAF,a=e+i;return s.jsxs(Z.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{duration:.35,delay:.05},className:"bg-balance text-white rounded-card p-4 relative",children:[s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsx("p",{className:"text-[11px] uppercase tracking-wide font-bold text-white/90",children:"Vos soldes disponibles"}),s.jsx("button",{onClick:()=>n("/wallet"),"aria-label":"Voir le détail des soldes",className:"size-8 grid place-items-center rounded-tile bg-white/20 text-white",children:s.jsx(L,{icon:Mn,size:16})})]}),s.jsxs("p",{className:"mt-2 flex items-baseline gap-1.5",children:[s.jsx(Vne,{number:a,decimalPlaces:0,thousandSeparator:" ",className:"text-3xl font-bold tabular-nums"}),s.jsx("span",{className:"text-base font-semibold",children:"FCFA"})]}),s.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-x-3 gap-y-1 text-xs font-semibold text-white/90",children:[s.jsxs("span",{children:["Principal ",s.jsx("span",{className:"font-bold text-white",children:Jk(e)})]}),s.jsx("span",{"aria-hidden":!0,className:"text-white/50",children:"·"}),s.jsxs("span",{children:["Crypto ",s.jsx("span",{className:"font-bold text-white",children:Jk(i)}),s.jsxs("span",{className:"text-white/75",children:[" ($",t.toFixed(2),")"]})]})]}),typeof r=="number"&&s.jsxs("span",{className:"mt-2 inline-block bg-white/20 rounded-pill px-2 py-0.5 text-xs font-semibold",children:[r>=0?"+":"",r.toFixed(1),"% ce mois"]}),s.jsxs("div",{className:"mt-4 flex gap-2",children:[s.jsxs("button",{onClick:()=>n("/wallet"),className:"flex-1 bg-surface text-balance-strong font-bold rounded-pill py-2.5 flex items-center justify-center gap-1.5",children:["Retirer",s.jsx(L,{icon:Th,size:16})]}),s.jsxs("button",{onClick:()=>n("/wallet"),className:"flex-1 bg-balance-strong text-white font-semibold rounded-pill py-2.5 flex items-center justify-center gap-1.5",children:[s.jsx(L,{icon:iw,size:16}),"Historique"]})]})]})}var d0=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(){}},qc=typeof window>"u"||"Deno"in globalThis;function fs(){}function Hne(e,t){return typeof e=="function"?e(t):e}function cw(e){return typeof e=="number"&&e>=0&&e!==1/0}function K$(e,t){return Math.max(e+(t||0)-Date.now(),0)}function yl(e,t){return typeof e=="function"?e(t):e}function Wi(e,t){return typeof e=="function"?e(t):e}function eS(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:o,stale:l}=e;if(o){if(n){if(t.queryHash!==D3(o,t.options))return!1}else if(!Ef(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||a&&!a(t))}function tS(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(Wc(t.options.mutationKey)!==Wc(a))return!1}else if(!Ef(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function D3(e,t){return((t==null?void 0:t.queryKeyHashFn)||Wc)(e)}function Wc(e){return JSON.stringify(e,(t,r)=>uw(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function Ef(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Ef(e[r],t[r])):!1}function X$(e,t){if(e===t)return e;const r=rS(e)&&rS(t);if(r||uw(e)&&uw(t)){const n=r?e:Object.keys(e),i=n.length,a=r?t:Object.keys(t),o=a.length,l=r?[]:{},c=new Set(n);let u=0;for(let f=0;f<o;f++){const x=r?f:a[f];(!r&&c.has(x)||r)&&e[x]===void 0&&t[x]===void 0?(l[x]=void 0,u++):(l[x]=X$(e[x],t[x]),l[x]===e[x]&&e[x]!==void 0&&u++)}return i===o&&u===i?e:l}return t}function Bg(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 rS(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function uw(e){if(!nS(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!nS(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function nS(e){return Object.prototype.toString.call(e)==="[object Object]"}function Gne(e){return new Promise(t=>{setTimeout(t,e)})}function dw(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?X$
50(e,t):t}function Kne(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function Xne(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var F3=Symbol();function Y$(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===F3?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Q$(e,t){return typeof e=="function"?e(...t):!!e}var wc,al,xd,s_,Yne=(s_=class extends d0{constructor(){super();pt(this,wc);pt(this,al);pt(this,xd);Xe(this,xd,t=>{if(!qc&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){le(this,al)||this.setEventListener(le(this,xd))}onUnsubscribe(){var t;this.hasListeners()||((t=le(this,al))==null||t.call(this),Xe(this,al,void 0))}setEventListener(t){var r;Xe(this,xd,t),(r=le(this,al))==null||r.call(this),Xe(this,al,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){le(this,wc)!==t&&(Xe(this,wc,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof le(this,wc)=="boolean"?le(this,wc):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},wc=new WeakMap,al=new WeakMap,xd=new WeakMap,s_),P3=new Yne,fd,ol,hd,i_,Qne=(i_=class extends d0{constructor(){super();pt(this,fd,!0);pt(this,ol);pt(this,hd);Xe(this,hd,t=>{if(!qc&&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(){le(this,ol)||this.setEventListener(le(this,hd))}onUnsubscribe(){var t;this.hasListeners()||((t=le(this,ol))==null||t.call(this),Xe(this,ol,void 0))}setEventListener(t){var r;Xe(this,hd,t),(r=le(this,ol))==null||r.call(this),Xe(this,ol,t(this.setOnline.bind(this)))}setOnline(t){le(this,fd)!==t&&(Xe(this,fd,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return le(this,fd)}},fd=new WeakMap,ol=new WeakMap,hd=new WeakMap,i_),Dg=new Qne;function xw(){let e,t;const r=new Promise((i,a)=>{e=i,t=a});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},r.reject=i=>{n({status:"rejected",reason:i}),t(i)},r}function Zne(e){return Math.min(1e3*2**e,3e4)}function Z$(e){return(e??"online")==="online"?Dg.isOnline():!0}var J$=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function t2(e){return e instanceof J$}function ez(e){let t=!1,r=0,n=!1,i;const a=xw(),o=v=>{var b;n||(m(new J$(v)),(b=e.abort)==null||b.call(e))},l=()=>{t=!0},c=()=>{t=!1},u=()=>P3.isFocused()&&(e.networkMode==="always"||Dg.isOnline())&&e.canRun(),f=()=>Z$(e.networkMode)&&e.canRun(),x=v=>{var b;n||(n=!0,(b=e.onSuccess)==null||b.call(e,v),i==null||i(),a.resolve(v))},m=v=>{var b;n||(n=!0,(b=e.onError)==null||b.call(e,v),i==null||i(),a.reject(v))},p=()=>new Promise(v=>{var b;i=E=>{(n||u())&&v(E)},(b=e.onPause)==null||b.call(e)}).then(()=>{var v;i=void 0,n||(v=e.onContinue)==null||v.call(e)}),y=()=>{if(n)return;let v;const b=r===0?e.initialPromise:void 0;try{v=b??e.fn()}catch(E){v=Promise.reject(E)}Promise.resolve(v).then(x).catch(E=>{var S;if(n)return;const N=e.retry??(qc?0:3),j=e.retryDelay??Zne,A=typeof j=="function"?j(r,E):j,w=N===!0||typeof N=="number"&&r<N||typeof N=="function"&&N(r,E);if(t||!w){m(E);return}r++,(S=e.onFail)==null||S.call(e,r,E),Gne(A).then(()=>u()?void 0:p()).then(()=>{t?m(E):y()})})};return{promise:a,cancel:o,continue:()=>(i==null||i(),a),cancelRetry:l,continueRetry:c,canStart:f,start:()=>(f()?y():p().then(y),a)}}var Jne=e=>setTimeout(e,0);function ese(){let e=[],t=0,r=l=>{l()},n=l=>{l()},i=Jne;const a=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)=>{a(()=>
50{l(...c)})},schedule:a,setNotifyFunction:l=>{r=l},setBatchNotifyFunction:l=>{n=l},setScheduler:l=>{i=l}}}var Cn=ese(),Ec,a_,tz=(a_=class{constructor(){pt(this,Ec)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),cw(this.gcTime)&&Xe(this,Ec,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(qc?1/0:5*60*1e3))}clearGcTimeout(){le(this,Ec)&&(clearTimeout(le(this,Ec)),Xe(this,Ec,void 0))}},Ec=new WeakMap,a_),md,pd,pi,jc,Qn,wh,Nc,zi,Ja,o_,tse=(o_=class extends tz{constructor(t){super();pt(this,zi);pt(this,md);pt(this,pd);pt(this,pi);pt(this,jc);pt(this,Qn);pt(this,wh);pt(this,Nc);Xe(this,Nc,!1),Xe(this,wh,t.defaultOptions),this.setOptions(t.options),this.observers=[],Xe(this,jc,t.client),Xe(this,pi,le(this,jc).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Xe(this,md,rse(this.options)),this.state=t.state??le(this,md),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=le(this,Qn))==null?void 0:t.promise}setOptions(t){this.options={...le(this,wh),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&le(this,pi).remove(this)}setData(t,r){const n=dw(this.state.data,t,this.options);return zt(this,zi,Ja).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){zt(this,zi,Ja).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=le(this,Qn))==null?void 0:n.promise;return(i=le(this,Qn))==null||i.cancel(t),r?r.then(fs).catch(fs):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(le(this,md))}isActive(){return this.observers.some(t=>Wi(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===F3||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>yl(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:!K$(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=le(this,Qn))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=le(this,Qn))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),le(this,pi).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(le(this,Qn)&&(le(this,Nc)?le(this,Qn).cancel({revert:!0}):le(this,Qn).cancelRetry()),this.scheduleGc()),le(this,pi).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||zt(this,zi,Ja).call(this,{type:"invalidate"})}fetch(t,r){var u,f,x;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(le(this,Qn))return le(this,Qn).continueRetry(),le(this,Qn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const m=this.observers.find(p=>p.options.queryFn);m&&this.setOptions(m.options)}const n=new AbortController,i=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(Xe(this,Nc,!0),n.signal)})},a=()=>{const m=Y$(this.options,r),y=(()=>{const v={client:le(this,jc),queryKey:this.queryKey,meta:this.meta};return i(v),v})();return Xe(this,Nc,!1),this.options.persister?this.options.persister(m,y,this):m(y)},l=(()=>{const m={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:le(this,jc),state:this.state,fetchFn:a};return i(m),m})();(u=this.options.behavior)==null||u.onFetch(l,this),Xe(this,pd,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=l.fetchOptions)==null?void 0:f.meta))&&zt(this,zi,Ja).call(this,{type:"fetch",meta:(x=l.fetchOptions)==null?void 0:x.meta});const c=m=>{var p,y,v,b;t2(m)&&m.silent||zt(this,zi,Ja).call(this,{type:"error",error:m}),t2(m)||((y=(p=le(this,pi).config).onError)==null||y.call(p,m,this),(b=(v=le(this,pi).config).onSettled)==null||b.call(v,this.state.data,m,this)),this.scheduleGc()};return Xe(this,Qn,ez({initialPromise:r==null?void 0:r.initialPromise,fn:l.fetchFn,abort:n.abort.bind(n),onSuccess:m=>{var p,y,v,b;if(m===void 0){c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(m)}catch(E){c(E);return}(y=(p=le(this,pi).config).onSuccess)==null||y.call(p,m,this),(b=(v=le(this,pi).config).onSettled)==null||b.call(v,m,this.state.error,this),this.scheduleGc()},onError:c,onFail:(m,p)=>{zt(this,zi,Ja).call(this,{type:"failed",failureCount:m,error:p})},onPause:()=>{zt(this,zi,Ja).call(this,{type:"pause"})},onContinue:()=>{zt(this,zi,Ja).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0})),le(this,Qn).start()}},md=new WeakMap,pd=new WeakMap,pi=new WeakMap,jc=new WeakMap,Qn=new WeakMap,wh=new WeakMap,Nc=new WeakMap,zi=new WeakSet,Ja=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,...rz(n.data,this.options),fetchMeta:t.meta??null};case"success":return{...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return t2(i)&&i.revert&&le(this,pd)?{...le(this,pd),fetchStatus:"idle"}
50:{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Cn.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),le(this,pi).notify({query:this,type:"updated",action:t})})},o_);function rz(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Z$(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function rse(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 xa,l_,nse=(l_=class extends d0{constructor(t={}){super();pt(this,xa);this.config=t,Xe(this,xa,new Map)}build(t,r,n){const i=r.queryKey,a=r.queryHash??D3(i,r);let o=this.get(a);return o||(o=new tse({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){le(this,xa).has(t.queryHash)||(le(this,xa).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=le(this,xa).get(t.queryHash);r&&(t.destroy(),r===t&&le(this,xa).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Cn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return le(this,xa).get(t)}getAll(){return[...le(this,xa).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>eS(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>eS(t,n)):r}notify(t){Cn.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Cn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Cn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},xa=new WeakMap,l_),fa,ds,Ac,ha,el,c_,sse=(c_=class extends tz{constructor(t){super();pt(this,ha);pt(this,fa);pt(this,ds);pt(this,Ac);this.mutationId=t.mutationId,Xe(this,ds,t.mutationCache),Xe(this,fa,[]),this.state=t.state||nz(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){le(this,fa).includes(t)||(le(this,fa).push(t),this.clearGcTimeout(),le(this,ds).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Xe(this,fa,le(this,fa).filter(r=>r!==t)),this.scheduleGc(),le(this,ds).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){le(this,fa).length||(this.state.status==="pending"?this.scheduleGc():le(this,ds).remove(this))}continue(){var t;return((t=le(this,Ac))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,o,l,c,u,f,x,m,p,y,v,b,E,N,j,A,w,S,B,D;const r=()=>{zt(this,ha,el).call(this,{type:"continue"})};Xe(this,Ac,ez({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(P,O)=>{zt(this,ha,el).call(this,{type:"failed",failureCount:P,error:O})},onPause:()=>{zt(this,ha,el).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>le(this,ds).canRun(this)}));const n=this.state.status==="pending",i=!le(this,Ac).canStart();try{if(n)r();else{zt(this,ha,el).call(this,{type:"pending",variables:t,isPaused:i}),await((o=(a=le(this,ds).config).onMutate)==null?void 0:o.call(a,t,this));const O=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t));O!==this.state.context&&zt(this,ha,el).call(this,{type:"pending",context:O,variables:t,isPaused:i})}const P=await le(this,Ac).start();return await((f=(u=le(this,ds).config).onSuccess)==null?void 0:f.call(u,P,t,this.state.context,this)),await((m=(x=this.options).onSuccess)==null?void 0:m.call(x,P,t,this.state.context)),await((y=(p=le(this,ds).config).onSettled)==null?void 0:y.call(p,P,null,this.state.variables,this.state.context,this)),await((b=(v=this.options).onSettled)==null?void 0:b.call(v,P,null,t,this.state.context)),zt(this,ha,el).call(this,{type:"success",data:P}),P}catch(P){try{throw await((N=(E=le(this,ds).config).onError)==null?void 0:N.call(E,P,t,this.state.context,this)),await((A=(j=this.options).onError)==null?void 0:A.call(j,P,t,this.state.context)),await((S=(w=le(this,ds).config).onSettled)==null?void 0:S.call(w,void 0,P,this.state.variables,this.state.context,this)),await((D=(B=this.options).onSettled)==null?void 0:D.call(B,void 0,P,t,this.state.context)),P}finally{zt(this,ha,el).call(this,{type:"error",error:P})}}finally{le(this,ds).runNext(this)}}},fa=new WeakMap,ds=new WeakMap,Ac=new WeakMap,ha=new WeakSet,el=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};
50case"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),Cn.batch(()=>{le(this,fa).forEach(n=>{n.onMutationUpdate(t)}),le(this,ds).notify({mutation:this,type:"updated",action:t})})},c_);function nz(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ro,Vi,Eh,u_,ise=(u_=class extends d0{constructor(t={}){super();pt(this,ro);pt(this,Vi);pt(this,Eh);this.config=t,Xe(this,ro,new Set),Xe(this,Vi,new Map),Xe(this,Eh,0)}build(t,r,n){const i=new sse({mutationCache:this,mutationId:++sp(this,Eh)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){le(this,ro).add(t);const r=hp(t);if(typeof r=="string"){const n=le(this,Vi).get(r);n?n.push(t):le(this,Vi).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(le(this,ro).delete(t)){const r=hp(t);if(typeof r=="string"){const n=le(this,Vi).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&le(this,Vi).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=hp(t);if(typeof r=="string"){const n=le(this,Vi).get(r),i=n==null?void 0:n.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n;const r=hp(t);if(typeof r=="string"){const i=(n=le(this,Vi).get(r))==null?void 0:n.find(a=>a!==t&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Cn.batch(()=>{le(this,ro).forEach(t=>{this.notify({type:"removed",mutation:t})}),le(this,ro).clear(),le(this,Vi).clear()})}getAll(){return Array.from(le(this,ro))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>tS(r,n))}findAll(t={}){return this.getAll().filter(r=>tS(t,r))}notify(t){Cn.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>
50r.state.isPaused);return Cn.batch(()=>Promise.all(t.map(r=>r.continue().catch(fs))))}},ro=new WeakMap,Vi=new WeakMap,Eh=new WeakMap,u_);function hp(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Fg(e){return{onFetch:(t,r)=>{var f,x,m,p,y;const n=t.options,i=(m=(x=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:x.fetchMore)==null?void 0:m.direction,a=((p=t.state.data)==null?void 0:p.pages)||[],o=((y=t.state.data)==null?void 0:y.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const u=async()=>{let v=!1;const b=j=>{Object.defineProperty(j,"signal",{enumerable:!0,get:()=>(t.signal.aborted?v=!0:t.signal.addEventListener("abort",()=>{v=!0}),t.signal)})},E=Y$(t.options,t.fetchOptions),N=async(j,A,w)=>{if(v)return Promise.reject();if(A==null&&j.pages.length)return Promise.resolve(j);const B=(()=>{const M={client:t.client,queryKey:t.queryKey,pageParam:A,direction:w?"backward":"forward",meta:t.options.meta};return b(M),M})(),D=await E(B),{maxPages:P}=t.options,O=w?Xne:Kne;return{pages:O(j.pages,D,P),pageParams:O(j.pageParams,A,P)}};if(i&&a.length){const j=i==="backward",A=j?sz:fw,w={pages:a,pageParams:o},S=A(n,w);l=await N(w,S,j)}else{const j=e??a.length;do{const A=c===0?o[0]??n.initialPageParam:fw(n,l);if(c>0&&A==null)break;l=await N(l,A),c++}while(c<j)}return l};t.options.persister?t.fetchFn=()=>{var v,b;return(b=(v=t.options).persister)==null?void 0:b.call(v,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=u}}}function fw(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 sz(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}function ase(e,t){return t?fw(e,t)!=null:!1}function ose(e,t){return!t||!e.getPreviousPageParam?!1:sz(e,t)!=null}var Yr,ll,cl,gd,yd,ul,vd,bd,d_,lse=(d_=class{constructor(e={}){pt(this,Yr);pt(this,ll);pt(this,cl);pt(this,gd);pt(this,yd);pt(this,ul);pt(this,vd);pt(this,bd);Xe(this,Yr,e.queryCache||new nse),Xe(this,ll,e.mutationCache||new ise),Xe(this,cl,e.defaultOptions||{}),Xe(this,gd,new Map),Xe(this,yd,new Map),Xe(this,ul,0)}mount(){sp(this,ul)._++,le(this,ul)===1&&(Xe(this,vd,P3.subscribe(async e=>{e&&(await this.resumePausedMutations(),le(this,Yr).onFocus())})),Xe(this,bd,Dg.subscribe(async e=>{e&&(await this.resumePausedMutations(),le(this,Yr).onOnline())})))}unmount(){var e,t;sp(this,ul)._--,le(this,ul)===0&&((e=le(this,vd))==null||e.call(this),Xe(this,vd,void 0),(t=le(this,bd))==null||t.call(this),Xe(this,bd,void 0))}isFetching(e){return le(this,Yr).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return le(this,ll).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=le(this,Yr).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=le(this,Yr).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(yl(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return le(this,Yr).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=le(this,Yr).get(n.queryHash),a=i==null?void 0:i.state.data,o=Hne(t,a);if(o!==void 0)return le(this,Yr).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return Cn.batch(()=>le(this,Yr).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=le(this,Yr).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=le(this,Yr);Cn.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=le(this,Yr);return Cn.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Cn.batch(()=>le(this,Yr).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(fs).catch(fs)}invalidateQueries(e,t={}){return Cn.batch(()=>(le(this,Yr).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=Cn.batch(()=>le(this,Yr).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,r);
50return r.throwOnError||(a=a.catch(fs)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(fs)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=le(this,Yr).build(this,t);return r.isStaleByTime(yl(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(fs).catch(fs)}fetchInfiniteQuery(e){return e.behavior=Fg(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(fs).catch(fs)}ensureInfiniteQueryData(e){return e.behavior=Fg(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Dg.isOnline()?le(this,ll).resumePausedMutations():Promise.resolve()}getQueryCache(){return le(this,Yr)}getMutationCache(){return le(this,ll)}getDefaultOptions(){return le(this,cl)}setDefaultOptions(e){Xe(this,cl,e)}setQueryDefaults(e,t){le(this,gd).set(Wc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...le(this,gd).values()],r={};return t.forEach(n=>{Ef(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){le(this,yd).set(Wc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...le(this,yd).values()],r={};return t.forEach(n=>{Ef(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...le(this,cl).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=D3(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===F3&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...le(this,cl).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){le(this,Yr).clear(),le(this,ll).clear()}},Yr=new WeakMap,ll=new WeakMap,cl=new WeakMap,gd=new WeakMap,yd=new WeakMap,ul=new WeakMap,vd=new WeakMap,bd=new WeakMap,d_),Ms,er,jh,xs,kc,Cd,dl,xl,Nh,wd,Ed,Sc,Bc,fl,jd,gr,Rx,hw,mw,pw,gw,yw,vw,bw,az,x_,iz=(x_=class extends d0{constructor(t,r){super();pt(this,gr);pt(this,Ms);pt(this,er);pt(this,jh);pt(this,xs);pt(this,kc);pt(this,Cd);pt(this,dl);pt(this,xl);pt(this,Nh);pt(this,wd);pt(this,Ed);pt(this,Sc);pt(this,Bc);pt(this,fl);pt(this,jd,new Set);this.options=r,Xe(this,Ms,t),Xe(this,xl,null),Xe(this,dl,xw()),this.options.experimental_prefetchInRender||le(this,dl).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(le(this,er).addObserver(this),sS(le(this,er),this.options)?zt(this,gr,Rx).call(this):this.updateResult(),zt(this,gr,gw).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Cw(le(this,er),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Cw(le(this,er),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,zt(this,gr,yw).call(this),zt(this,gr,vw).call(this),le(this,er).removeObserver(this)}setOptions(t){const r=this.options,n=le(this,er);if(this.options=le(this,Ms).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Wi(this.options.enabled,le(this,er))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");zt(this,gr,bw).call(this),le(this,er).setOptions(this.options),r._defaulted&&!Bg(this.options,r)&&le(this,Ms).getQueryCache().notify({type:"observerOptionsUpdated",query:le(this,er),observer:this});const i=this.hasListeners();i&&iS(le(this,er),n,this.options,r)&&zt(this,gr,Rx).call(this),this.updateResult(),i&&(le(this,er)!==n||Wi(this.options.enabled,le(this,er))!==Wi(r.enabled,le(this,er))||yl(this.options.staleTime,le(this,er))!==yl(r.staleTime,le(this,er)))&&zt(this,gr,hw).call(this);const a=zt(this,gr,mw).call(this);i&&(le(this,er)!==n||Wi(this.options.enabled,le(this,er))!==Wi(r.enabled,le(this,er))||a!==le(this,fl))&&zt(this,gr,pw).call(this,a)}getOptimisticResult(t){const r=le(this,Ms).getQueryCache().build(le(this,Ms),t),n=this.createResult(r,t);return use(this,n)&&(Xe(this,xs,n),Xe(this,Cd,this.options),Xe(this,kc,le(this,er).state)),n}getCurrentResult(){return le(this,xs)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),Reflect.get(n,i))})}trackProp(t){le(this,jd).add(t)}getCurrentQuery(){return le(this,er)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=le(this,Ms).defaultQueryOptions(t),n=le(this,Ms).getQueryCache().build(le(this,Ms),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return zt(this,gr,Rx).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>
50(this.updateResult(),le(this,xs)))}createResult(t,r){var P;const n=le(this,er),i=this.options,a=le(this,xs),o=le(this,kc),l=le(this,Cd),u=t!==n?t.state:le(this,jh),{state:f}=t;let x={...f},m=!1,p;if(r._optimisticResults){const O=this.hasListeners(),M=!O&&sS(t,r),I=O&&iS(t,n,r,i);(M||I)&&(x={...x,...rz(f.data,t.options)}),r._optimisticResults==="isRestoring"&&(x.fetchStatus="idle")}let{error:y,errorUpdatedAt:v,status:b}=x;p=x.data;let E=!1;if(r.placeholderData!==void 0&&p===void 0&&b==="pending"){let O;a!=null&&a.isPlaceholderData&&r.placeholderData===(l==null?void 0:l.placeholderData)?(O=a.data,E=!0):O=typeof r.placeholderData=="function"?r.placeholderData((P=le(this,Ed))==null?void 0:P.state.data,le(this,Ed)):r.placeholderData,O!==void 0&&(b="success",p=dw(a==null?void 0:a.data,O,r),m=!0)}if(r.select&&p!==void 0&&!E)if(a&&p===(o==null?void 0:o.data)&&r.select===le(this,Nh))p=le(this,wd);else try{Xe(this,Nh,r.select),p=r.select(p),p=dw(a==null?void 0:a.data,p,r),Xe(this,wd,p),Xe(this,xl,null)}catch(O){Xe(this,xl,O)}le(this,xl)&&(y=le(this,xl),p=le(this,wd),v=Date.now(),b="error");const N=x.fetchStatus==="fetching",j=b==="pending",A=b==="error",w=j&&N,S=p!==void 0,D={status:b,fetchStatus:x.fetchStatus,isPending:j,isSuccess:b==="success",isError:A,isInitialLoading:w,isLoading:w,data:p,dataUpdatedAt:x.dataUpdatedAt,error:y,errorUpdatedAt:v,failureCount:x.fetchFailureCount,failureReason:x.fetchFailureReason,errorUpdateCount:x.errorUpdateCount,isFetched:x.dataUpdateCount>0||x.errorUpdateCount>0,isFetchedAfterMount:x.dataUpdateCount>u.dataUpdateCount||x.errorUpdateCount>u.errorUpdateCount,isFetching:N,isRefetching:N&&!j,isLoadingError:A&&!S,isPaused:x.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:A&&S,isStale:T3(t,r),refetch:this.refetch,promise:le(this,dl)};if(this.options.experimental_prefetchInRender){const O=V=>{D.status==="error"?V.reject(D.error):D.data!==void 0&&V.resolve(D.data)},M=()=>{const V=Xe(this,dl,D.promise=xw());O(V)},I=le(this,dl);switch(I.status){case"pending":t.queryHash===n.queryHash&&O(I);break;case"fulfilled":(D.status==="error"||D.data!==I.value)&&M();break;case"rejected":(D.status!=="error"||D.error!==I.reason)&&M();break}}return D}updateResult(){const t=le(this,xs),r=this.createResult(le(this,er),this.options);if(Xe(this,kc,le(this,er).state),Xe(this,Cd,this.options),le(this,kc).data!==void 0&&Xe(this,Ed,le(this,er)),Bg(r,t))return;Xe(this,xs,r);const n=()=>
50{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!le(this,jd).size)return!0;const o=new Set(a??le(this,jd));return this.options.throwOnError&&o.add("error"),Object.keys(le(this,xs)).some(l=>{const c=l;return le(this,xs)[c]!==t[c]&&o.has(c)})};zt(this,gr,az).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&zt(this,gr,gw).call(this)}},Ms=new WeakMap,er=new WeakMap,jh=new WeakMap,xs=new WeakMap,kc=new WeakMap,Cd=new WeakMap,dl=new WeakMap,xl=new WeakMap,Nh=new WeakMap,wd=new WeakMap,Ed=new WeakMap,Sc=new WeakMap,Bc=new WeakMap,fl=new WeakMap,jd=new WeakMap,gr=new WeakSet,Rx=function(t){zt(this,gr,bw).call(this);let r=le(this,er).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(fs)),r},hw=function(){zt(this,gr,yw).call(this);const t=yl(this.options.staleTime,le(this,er));if(qc||le(this,xs).isStale||!cw(t))return;const n=K$(le(this,xs).dataUpdatedAt,t)+1;Xe(this,Sc,setTimeout(()=>{le(this,xs).isStale||this.updateResult()},n))},mw=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(le(this,er)):this.options.refetchInterval)??!1},pw=function(t){zt(this,gr,vw).call(this),Xe(this,fl,t),!(qc||Wi(this.options.enabled,le(this,er))===!1||!cw(le(this,fl))||le(this,fl)===0)&&Xe(this,Bc,setInterval(()=>{(this.options.refetchIntervalInBackground||P3.isFocused())&&zt(this,gr,Rx).call(this)},le(this,fl)))},gw=function(){zt(this,gr,hw).call(this),zt(this,gr,pw).call(this,zt(this,gr,mw).call(this))},yw=function(){le(this,Sc)&&(clearTimeout(le(this,Sc)),Xe(this,Sc,void 0))},vw=function(){le(this,Bc)&&(clearInterval(le(this,Bc)),Xe(this,Bc,void 0))},bw=function(){const t=le(this,Ms).getQueryCache().build(le(this,Ms),this.options);if(t===le(this,er))return;const r=le(this,er);Xe(this,er,t),Xe(this,jh,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},az=function(t){Cn.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(le(this,xs))}),le(this,Ms).getQueryCache().notify({query:le(this,er),type:"observerResultsUpdated"})})},x_);function cse(e,t){return Wi(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function sS(e,t){return cse(e,t)||e.state.data!==void 0&&Cw(e,t,t.refetchOnMount)}function Cw(e,t,r){if(Wi(t.enabled,e)!==!1&&yl(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&T3(e,t)}return!1}function iS(e,t,r,n){return(e!==t||Wi(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&T3(e,r)}function T3(e,t){return Wi(t.enabled,e)!==!1&&e.isStaleByTime(yl(t.staleTime,e))}function use(e,t){return!Bg(e.getCurrentResult(),t)}var dse=class extends iz{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:Fg()})}getOptimisticResult(e){return e.behavior=Fg(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var y,v;const{state:r}=e,n=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:l}=n,c=(v=(y=r.fetchMeta)==null?void 0:y.fetchMore)==null?void 0:v.direction,u=o&&c==="forward",f=i&&c==="forward",x=o&&c==="backward",m=i&&c==="backward";return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:ase(t,r.data),hasPreviousPage:ose(t,r.data),isFetchNextPageError:u,isFetchingNextPage:f,isFetchPreviousPageError:x,isFetchingPreviousPage:m,isRefetchError:l&&!u&&!x,isRefetching:a&&!f&&!m}}},hl,ml,Os,no,fo,eg,ww,f_,xse=(f_=class extends d0{constructor(r,n){super();pt(this,fo);pt(this,hl);pt(this,ml);pt(this,Os);pt(this,no);Xe(this,hl,r),this.setOptions(n),this.bindMethods(),zt(this,fo,eg).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){var i;const n=this.options;this.options=le(this,hl).defaultMutationOptions(r),Bg(this.options,n)||le(this,hl).getMutationCache().notify({type:"observerOptionsUpdated",mutation:le(this,Os),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Wc(n.mutationKey)!==Wc(this.options.mutationKey)?this.reset():((i=le(this,Os))==null?void 0:i.state.status)==="pending"&&le(this,Os).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=le(this,Os))==null||r.removeObserver(this)}onMutationUpdate(r){zt(this,fo,eg).call(this),zt(this,fo,ww).call(this,r)}getCurrentResult(){return le(this,ml)}reset(){var r;(r=le(this,Os))==null||r.removeObserver(this),Xe(this,Os,void 0),zt(this,fo,eg).call(this),zt(this,fo,ww).call(this)}mutate(r,n){var i;return Xe(this,no,n),(i=le(this,Os))==null||i.removeObserver(this),Xe(this,Os,le(this,hl).getMutationCache().build(le(this,hl),this.options)),le(this,Os).addObserver(this),le(this,Os).execute(r)}}
50,hl=new WeakMap,ml=new WeakMap,Os=new WeakMap,no=new WeakMap,fo=new WeakSet,eg=function(){var n;const r=((n=le(this,Os))==null?void 0:n.state)??nz();Xe(this,ml,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},ww=function(r){Cn.batch(()=>{var n,i,a,o,l,c,u,f;if(le(this,no)&&this.hasListeners()){const x=le(this,ml).variables,m=le(this,ml).context;(r==null?void 0:r.type)==="success"?((i=(n=le(this,no)).onSuccess)==null||i.call(n,r.data,x,m),(o=(a=le(this,no)).onSettled)==null||o.call(a,r.data,null,x,m)):(r==null?void 0:r.type)==="error"&&((c=(l=le(this,no)).onError)==null||c.call(l,r.error,x,m),(f=(u=le(this,no)).onSettled)==null||f.call(u,void 0,r.error,x,m))}this.listeners.forEach(x=>{x(le(this,ml))})})},f_),oz=C.createContext(void 0),x0=e=>{const t=C.useContext(oz);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},fse=({client:e,children:t})=>(C.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),s.jsx(oz.Provider,{value:e,children:t}
50)),lz=C.createContext(!1),hse=()=>C.useContext(lz);lz.Provider;function mse(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var pse=C.createContext(mse()),gse=()=>C.useContext(pse),yse=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},vse=e=>{C.useEffect(()=>{e.clearReset()},[e])},bse=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||Q$(r,[e.error,n])),Cse=e=>{if(e.suspense){const t=n=>n==="static"?n:Math.max(n??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...n)=>t(r(...n)):t(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},wse=(e,t)=>e.isLoading&&e.isFetching&&!t,Ese=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,aS=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function cz(e,t,r){var x,m,p,y,v;const n=hse(),i=gse(),a=x0(),o=a.defaultQueryOptions(e);(m=(x=a.getDefaultOptions().queries)==null?void 0:x._experimental_beforeQuery)==null||m.call(x,o),o._optimisticResults=n?"isRestoring":"optimistic",Cse(o),yse(o,i),vse(i);const l=!a.getQueryCache().get(o.queryHash),[c]=C.useState(()=>new t(a,o)),u=c.getOptimisticResult(o),f=!n&&e.subscribed!==!1;if(C.useSyncExternalStore(C.useCallback(b=>{const E=f?c.subscribe(Cn.batchCalls(b)):fs;return c.updateResult(),E},[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),C.useEffect(()=>{c.setOptions(o)},[o,c]),Ese(o,u))throw aS(o,c,i);if(bse({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:a.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw u.error;if((y=(p=a.getDefaultOptions().queries)==null?void 0:p._experimental_afterQuery)==null||y.call(p,o,u),o.experimental_prefetchInRender&&!qc&&wse(u,n)){const b=l?aS(o,c,i):(v=a.getQueryCache().get(o.queryHash))==null?void 0:v.promise;b==null||b.catch(fs).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?u:c.trackResult(u)}function hr(e,t){return cz(e,iz)}function ba(e,t){const r=x0(),[n]=C.useState(()=>new xse(r,e));C.useEffect(()=>{n.setOptions(e)},[n,e]);const i=C.useSyncExternalStore(C.useCallback(o=>n.subscribe(Cn.batchCalls(o)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),a=C.useCallback((o,l)=>{n.mutate(o,l).catch(fs)},[n]);if(i.error&&Q$(n.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}function jf(e,t){return cz(e,dse)}class Zr{constructor(t,r,n,i,a,o,l=null){ci(this,"statusCode");ci(this,"body");ci(this,"isSuccessByStatusCode");ci(this,"apiReportedSuccess");ci(this,"message");ci(this,"rawError");ci(this,"endpoint");this.statusCode=t,this.body=r,this.isSuccessByStatusCode=n,this.apiReportedSuccess=i,this.message=a,this.endpoint=o,this.rawError=l}get isOverallSuccess(){return this.isSuccessByStatusCode&&this.apiReportedSuccess}static fromHttpResponse(t,r,n){let i={},a="",o=!1;try{r&&(i=JSON.parse(r),a=i.message||"",o=!!i.success)}catch{a="Failed to parse server response.",o=!1}const l=t.status>=200&&t.status<300||t.status===304;return!a&&l&&o?a="Operation successful.":!a&&!l&&(a="An unknown error occurred."),new Zr(t.status,i,l,o,a,n,null)}static fromError(t,r=0){let n="An unexpected error occurred.";return typeof t=="string"?n=t:t instanceof Error&&(n=t.message),new Zr(r,{error:n,success:!1},!1,!1,n,"",t)}}const Tu=(e=!0,t=!1)=>{const r={Accept:"application/json"};if(t||(r["Content-Type"]="application/json"),e){const n=localStorage.getItem("token");n&&(r.Authorization=`Bearer ${n}`)}return r},Ve=e=>{var t,r,n,i,a;if(e.statusCode===401)throw new Error("Mot de passe ou email incorrect");if(e.statusCode===-1)throw new Error(e.message||"Network error: Please check your connection and try again.");if(e.isSuccessByStatusCode)return((t=e.body)==null?void 0:t.data)!==void 0&&e.body.data!==null?e.body.data:((r=e.body)==null?void 0:r.stats)!==void 0&&e.body.stats!==null?e.body.stats:((n=e.body)==null?void 0:n.transactions)!==void 0&&e.body.transactions!==null?e.body.transactions:((i=e.body)==null?void 0:i.success)===!0?e.body.data!==void 0&&e.body.data!==null?e.body.data:!0:e.body;throw(a=e.body)!=null&&a.message?new Error(e.body.message):e.message?new Error(e.message):new Error("An unexpected API error occurred.")},tg=()=>"https://sniperbuisnesscenter.com/api",oS=()=>localStorage.getItem("token"),lS=e=>{localStorage.setItem("token",e)},cS=()=>{localStorage.removeItem("token")},Rs=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"");class jse{constructor(){ci(this,"baseUrl");ci(this,"pendingRequests",new Map);this.baseUrl=tg()}
50getRequestKey(t,r,n){const i=n?JSON.stringify(n):"";return`${t}:${r}:${i}`}async handleHttpResponse(t){const r=t.headers.get("content-type"),n=(r==null?void 0:r.includes("application/json"))??!1,i=await t.text();let a=n;if(!a&&t.status===304&&i.trim().length>0)try{JSON.parse(i),a=!0}catch{}if(a)return Zr.fromHttpResponse(t,i,t.url);{const l=t.status>=200&&t.status<300||t.status===304?'{"data": "File content type, not JSON. Handled by caller.", "message": "File retrieval successful."}':'{"message": "File retrieval failed."}';return Zr.fromHttpResponse(t,l,t.url)}}async get(t,r={}){const{requiresAuth:n=!0,queryParameters:i=null,skipDeduplication:a=!1}=r,o=this.getRequestKey("GET",t,i);if(!a&&this.pendingRequests.has(o))return this.pendingRequests.get(o);const l=Tu(n);let c=`${this.baseUrl}${t}`;if(i){const f=new URLSearchParams;Object.entries(i).forEach(([x,m])=>{m!=null&&m!==""&&f.append(x,String(m))}),c+=`?${f.toString()}`}const u=(async()=>{try{const f=await fetch(c,{method:"GET",headers:l});return await this.handleHttpResponse(f)}catch(f){return f instanceof TypeError&&f.message.includes("fetch")?Zr.fromError("Network error: Please check your connection and try again.",-1):Zr.fromError(`An unexpected error occurred: ${f instanceof Error?f.message:String(f)}`,-3)}finally{this.pendingRequests.delete(o)}})();return a||this.pendingRequests.set(o,u),u}async post(t,r={}){const{body:n,requiresAuth:i=!0}=r,a=Tu(i),o=`${this.baseUrl}${t}`;try{const l=await fetch(o,{method:"POST",headers:a,body:JSON.stringify(n)});return await this.handleHttpResponse(l)}catch(l){return l instanceof TypeError&&l.message.includes("fetch")?Zr.fromError("Network error: Please check your connection and try again.",-1):Zr.fromError(`An unexpected error occurred: ${l instanceof Error?l.message:String(l)}`,-3)}}async put(t,r={}){const{body:n,requiresAuth:i=!0}=r,a=Tu(i),o=`${this.baseUrl}${t}`;try{const l=await fetch(o,{method:"PUT",headers:a,body:JSON.stringify(n)});return await this.handleHttpResponse(l)}catch(l){return l instanceof TypeError&&l.message.includes("fetch")?Zr.fromError("Network error: Please check your connection and try again.",-1):Zr.fromError(`An unexpected error occurred: ${l instanceof Error?l.message:String(l)}`,-3)}}async delete(t,r={}){const{body:n=null,requiresAuth:i=!0}=r,a=Tu(i),o=`${this.baseUrl}${t}`;try{const l=await fetch(o,{method:"DELETE",headers:a,body:n?JSON.stringify(n):null});return await this.handleHttpResponse(l)}catch(l){return l instanceof TypeError&&l.message.includes("fetch")?Zr.fromError("Network error: Please check your connection and try again.",-1):Zr.fromError(`An unexpected error occurred: ${l instanceof Error?l.message:String(l)}`,-3)}}async patch(t,r={}){const{body:n=null,requiresAuth:i=!0}=r,a=Tu(i),o=`${this.baseUrl}${t}`;try{const l=await fetch(o,{method:"PATCH",headers:a,body:n?JSON.stringify(n):null});return await this.handleHttpResponse(l)}catch(l){return l instanceof TypeError&&l.message.includes("fetch")?Zr.fromError("Network error: Please check your connection and try again.",-1):Zr.fromError(`An unexpected error occurred: ${l instanceof Error?l.message:String(l)}`,-3)}}async uploadFiles(t){const{endpoint:r,files:n,fieldName:i,fields:a=null,requiresAuth:o=!0,httpMethod:l="POST"}=t,c=Tu(o,!0),u=`${this.baseUrl}${r}`;try{const f=new FormData;a&&Object.entries(a).forEach(([m,p])=>{f.append(m,p)}),n.forEach(m=>{f.append(i,m)});const x=await fetch(u,{method:l,headers:c,body:f});return await this.handleHttpResponse(x)}catch(f){return f instanceof TypeError&&f.message.includes("fetch")?Zr.fromError("Network error during file upload. Please check your connection.",-1):Zr.fromError(`An unexpected error occurred during file upload: ${f instanceof Error?f.message:String(f)}`,-3)}}}class Nse extends jse{async loginUser(t,r){const n=/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t),i=/^\+?[\d\s-()]+$/.test(t)&&t.replace(/\D/g,"").length>=8,a={password:r};return n?a.email=t:i?a.phoneNumber=t:a.email=t,await this.post("/users/login",{body:a,requiresAuth:!1})}async registerUser(t){return await this.post("/users/register",{body:t,requiresAuth:!1})}async verifyOtp(t,r){return await this.post("/users/verify-otp",{body:{userId:t,otpCode:r},requiresAuth:!1})}async resendVerificationOtp(t,r,n){return await this.post("/users/resend-otp",{body:{userId:t,email:r,purpose:n},requiresAuth:!1})}async resendOtpEnhanced(t){return await this.post("/users/resend-otp",{body:t,requiresAuth:!1})}async getUserProfile(){return await this.get("/users/me")}async updateUserProfile(t){return await this.put("/users/me",{body:t})}async uploadAvatar(t,r){return t instanceof File?await this.uploadFiles({endpoint:"/users/me/avatar",files:[t],fieldName:"avatar"}):await this.post("/users/me/avatar-base64",{body:{avatarBase64:t,fileName:r||"avatar.jpg"}})}async getUserProfileById(t){return await this.get(`/users/${t}`)}async logoutUser(){return await this.post("/users/logout",{body:{}})}async getAffiliationInfo(t){return await this.get("/users/get-affiliation",{queryParameters:{referralCode:t},requiresAuth:!1})}async getMyAffiliator(){return await this.get("/users/affiliator")}async getReferralStats(){return await this.get("/users/get-referals")}async getLeaderboard(){return await this.get("/users/leaderboard")}async getCountryLeaderboard(){return await this.get("/users/leaderboard/countries")}async getMyFilleulsLeaderboard(){return await this.get("/users/leaderboard/filleuls")}
50async getReferredUsers(t){return await this.get("/users/get-refered-users",{queryParameters:t})}async getUserProducts(t){return await this.get("/products/user",{queryParameters:t})}async requestPasswordResetOtp(t,r){const n={identifier:t};return r&&(n.channel=r),await this.post("/users/request-password-reset-otp",{body:n,requiresAuth:!1})}async verifyPasswordResetOtp(t,r){return await this.post("/users/verify-password-reset-otp",{body:{email:t,otpCode:r},requiresAuth:!1})}async resetPassword(t,r,n){return await this.post("/users/reset-password",{body:{email:t,passwordResetToken:r,newPassword:n},requiresAuth:!1})}async requestEmailChangeOtp(t){return await this.post("/users/request-email-change",{body:{newEmail:t}})}async confirmEmailChange(t,r){return await this.post("/users/confirm-change-email",{body:{newEmail:t,otpCode:r}})}async verifyEmailChange(t,r){return await this.post("/users/verify-email-change",{body:{newEmail:t,otp:r}})}async resendOtpByEmail(t,r){return await this.post("/users/resend-otp",{body:{email:t,purpose:r}})}async requestPhoneChangeOtp(t){return await this.post("/users/request-change-phone",{body:{newPhoneNumber:t}})}async confirmPhoneChange(t,r){return await this.post("/users/confirm-change-phone",{body:{newPhoneNumber:t,otpCode:r}})}async getProducts(t){return await this.get("/products/search",{queryParameters:t,requiresAuth:!1})}async getProductDetails(t){return await this.get(`/products/${t}`,{requiresAuth:!1})}async getProductRatings(t,r=1,n=10){return await this.get(`/products/${t}/ratings`,{queryParameters:{page:r.toString(),limit:n.toString()},requiresAuth:!1})}async createProduct(t,r){const n={name:t.name,category:t.category,subcategory:t.subcategory,description:t.description,price:t.price.toString()};return this.uploadFiles({endpoint:"/products",files:r,fieldName:"images",fields:n,httpMethod:"POST"})}async getProductById(t){return this.get(`/products/${t}`)}async updateProduct(t,r,n=[]){const i=`/products/${t}`,a={};return r.name!==void 0&&(a.name=r.name),r.category!==void 0&&(a.category=r.category),r.subcategory!==void 0&&(a.subcategory=r.subcategory),r.description!==void 0&&(a.description=r.description),r.price!==void 0&&(a.price=r.price.toString()),n.length>0?this.uploadFiles({endpoint:i,files:n,fieldName:"images",fields:a,httpMethod:"PUT"}):this.put(i,{body:r})}async deleteProduct(t){return await this.delete(`/products/${t}`)}async rateProduct(t,r,n){const i={rating:r};return n&&(i.review=n),await this.post(`/products/${t}/ratings`,{body:i})}async deleteRating(t){return await this.delete(`/products/ratings/${t}`)}async markRatingHelpful(t){return await this.post(`/products/ratings/${t}/helpful`,{body:{}})}async getFlashSales(){return await this.get("/flash-sales",{requiresAuth:!1})}async trackFlashSaleView(t){return await this.post(`/flash-sales/${t}/track-view`,{body:{},requiresAuth:!1})}async trackFlashSaleWhatsAppClick(t){return await this.post(`/flash-sales/${t}/track-whatsapp-click`,{body:{},requiresAuth:!1})}async createFlashSale(t){return await this.post("/flash-sales",{body:t})}async getMyFlashSales(){return await this.get("/flash-sales/my")}async updateFlashSale(t,r){return await this.put(`/flash-sales/${t}`,{body:r})}async cancelFlashSale(t){return await this.delete(`/flash-sales/${t}`)}async searchContacts(t){const r=Object.fromEntries(Object.entries(t).filter(([,n])=>n!=null&&n!==""&&n!==0).map(([n,i])=>[n,String(i)]));return await this.get("/contacts/search",{queryParameters:r})}async exportContacts(t){const r=Object.fromEntries(Object.entries(t).filter(([,n])=>n!=null&&n!==""&&n!==0).map(([n,i])=>[n,String(i)]));return await this.get("/contacts/export",{queryParameters:r})}async requestContactsExportOtp(){return await this.post("/contacts/request-otp",{body:{}})}async getSubscriptionPlans(){return await this.get("/subscriptions/plans",{requiresAuth:!1})}async getCurrentSubscription(){return await this.get("/subscriptions")}async getActiveSubscriptions(){return await this.get("/subscriptions/active")}async getExpiredSubscriptions(){return await this.get("/subscriptions/expired")}async checkSubscription(t){return await this.get(`/subscriptions/check/${t}`)}async purchaseSubscription(t){return await this.post("/subscriptions/purchase",{body:{planType:t}})}async upgradeSubscription(){return await this.post("/subscriptions/upgrade",{body:{}})}async createPaymentIntent(t){return await this.post("/payments/intents",{body:t,requiresAuth:!1})}async submitPaymentDetails(t,r){return await this.post(`/payments/intents/${t}/submit`,{body:r,requiresAuth:!1})}async checkPaymentStatus(t){return await this.get(`/payments/intents/${t}/status`,{requiresAuth:!1})}generatePaymentUrl(t){return`${this.baseUrl}/payments/page/${t}`}async getWalletDetails(){return await this.get("/wallet/me")}async getTransactionHistory(t){return await this.get("/transactions/history",{queryParameters:t})}async getTransactionStats(){return await this.get("/transactions/stats")}async getTransactionById(t){return await this.get(`/transactions/${t}`)}async initiateDeposit(t){return await this.post("/transactions/deposit/initiate",{body:{amount:t}})}async initiateUnifiedWithdrawal(t,r){return await this.post("/transactions/withdrawal/initiate",{body:{amount:t,withdrawalType:r}})}async initiateWithdrawal(t){return await this.post("/transactions/withdrawal/initiate",{body:{amount:t}})}async verifyWithdrawal({transactionId:t,verificationCode:r}){return await this.post("/transactions/withdrawal/verify",{body:{transactionId:t,verificationCode:r}})}async cancelWithdrawal(t){return await this.delete(`/transactions/withdrawal/${t}/cancel`)}async getPendingWithdrawals(){return await this.get("/transactions/history",{queryParameters:{type:"withdrawal",status:"pending,pen
50ding_otp_verification,pending_admin_approval,processing"}})}async processPayment(t){return await this.post("/transactions/payment",{body:t})}async updateMomoDetails(t,r){return await this.put("/users/me",{body:{momoNumber:t,momoOperator:r}})}async getNotifications(){return await this.get("/notifications/me")}async getNotificationStats(){return await this.get("/notifications/me/stats")}async markNotificationAsRead(t){return await this.post(`/notifications/${t}/mark-read`,{body:{}})}async getAppSettings(){return await this.get("/settings",{requiresAuth:!1})}async updateSettings(t){return await this.put("/settings",{body:t})}async uploadLogo(t){return await this.uploadFiles({endpoint:"/settings/logo",files:[t],fieldName:"logo"})}async uploadTermsPdf(t){return await this.uploadFiles({endpoint:"/settings/terms-pdf",files:[t],fieldName:"terms"})}async uploadPresentationVideo(t){return await this.uploadFiles({endpoint:"/settings/presentation-video",files:[t],fieldName:"video"})}async uploadPresentationPdf(t){return await this.uploadFiles({endpoint:"/settings/presentation-pdf",files:[t],fieldName:"pdf"})}async uploadFile(t){return await this.uploadFiles({endpoint:"/settings/files/upload",files:[t],fieldName:"file"})}async getEvents(){return await this.get("/events",{requiresAuth:!1})}async getEventById(t){return await this.get(`/events/${t}`,{requiresAuth:!1})}async createEvent(t,r){if(r&&r.length>0){const n=Object.fromEntries(Object.entries(t).map(([i,a])=>[i,String(a)]));return await this.uploadFiles({endpoint:"/events",files:r,fieldName:"images",fields:n,httpMethod:"POST"})}else return await this.post("/events",{body:t})}async updateEvent(t,r,n){if(n&&n.length>0){const i=Object.fromEntries(Object.entries(r).map(([a,o])=>[a,String(o)]));return await this.uploadFiles({endpoint:`/events/${t}`,files:n,fieldName:"images",fields:i,httpMethod:"PUT"})}else return await this.put(`/events/${t}`,{body:r})}async deleteEvent(t){return await this.delete(`/events/${t}`)}async getTombolas(){return await this.get("/tombola",{requiresAuth:!1})}async getCurrentTombola(){return await this.get("/tombola/current",{requiresAuth:!1})}async getTombolaWinners(t){return await this.get(`/tombola/${t}/winners`,{requiresAuth:!1})}async buyTombolaTicket(){return await this.post("/tombola/current/buy-ticket",{body:{}})}async getMyTombolaTickets(){return await this.get("/tombola/tickets/me")}async getAdvertisingPacks(){return await this.get("/advertising/packs",{requiresAuth:!1})}async getAdsForDisplay(){return await this.get("/advertising/ads/display",{requiresAuth:!1})}async createAdvertisement(t){return await this.post("/advertising/ads",{body:t})}async getMyAdvertisements(){return await this.get("/advertising/ads/me")}async getAdvertisementById(t){return await this.get(`/advertising/ads/${t}`)}async updateAdvertisement(t,r){return await this.put(`/advertising/ads/${t}`,{body:r})}async getFaqs(){return await this.get("/support/faq",{requiresAuth:!1})}async submitSupportTicket(t){return await this.post("/support/tickets",{body:t})}generateSettingsFileUrl(t){return`https://storage.googleapis.com/sbc-file-storage/${t}`}generateThumbnailUrl(t,r=96){if(!t)return"";const n="https://storage.googleapis.com/sbc-file-storage/",i=t.startsWith(n)?t.slice(n.length):t;return/^https?:\/\//.test(i)?t:`${this.baseUrl}/settings/files/${encodeURIComponent(i)}?w=${r}`}generateStreamedFileUrl(t,r={}){const n=r.download?"download=1":"stream=1";return`${this.baseUrl}/settings/files/${encodeURIComponent(t)}?${n}`}async convertUsdToXaf(t){return await this.post("/users/convert-usd-to-xaf",{body:{usdAmount:t}})}async convertXafToUsd(t){return await this.post("/users/convert-xaf-to-usd",{body:{xafAmount:t}})}async getConversionPreview(t,r,n){let o,l;if(r==="USD"&&n==="XAF")o=Math.round(t*500),l=500;else if(r==="XAF"&&n==="USD")o=Math.round(t/660*100)/100,l=1/660;else throw new Error("Invalid currency pair");return{convertedAmount:o,rate:l}}async convertUserBalance(t,r,n){if(r==="USD"&&n==="FCFA")return await this.convertUsdToXaf(t);if(r==="FCFA"&&n==="USD")return await this.convertXafToUsd(t);throw new Error("Invalid currency conversion pair")}async updateUsdBalance(t){return await this.post("/users/me/usd-balance",{body:{amount:t}})}async getUsdBalance(){return await this.get("/users/me/usd-balance")}async convertCurrency(t,r,n){const i=r==="XAF"?"FCFA":"USD",a=n==="XAF"?"FCFA":"USD";return await this.convertUserBalance(t,i,a)}async getCryptoWallet(){return await this.get("/users/crypto/wallet")}async updateCryptoWallet(t){return await this.put("/users/crypto/wallet",{body:t})}async checkCryptoWithdrawalLimitsV2(t,r){return await this.post("/users/crypto/check-limits",{body:{amount:t,currency:r}})}async checkCryptoWithdrawalLimits(t){return await this.post("/users/crypto/check-limits",{body:{usdAmount:t}})}
50async getSupportedCryptocurrencies(){return await this.get("/payments/crypto/currencies")}async getCryptoPayoutEstimate(t,r){return await this.get("/payments/crypto/estimate",{queryParameters:{amount:t.toString(),currency:r}})}async requestCryptoPayout(t){return await this.post("/payments/crypto/payout",{body:t})}async testCryptoConnection(){return await this.get("/payments/crypto/debug")}async checkWithdrawalLimits(t){return await this.post("/users/withdrawal-limits/check",{body:{amount:t}})}async convertToXAF(t,r){return await this.post("/payments/convertxfa",{body:{amount:t,fromCurrency:r},requiresAuth:!1})}async convertCurrencyPayment(t,r,n){return await this.post("/payments/convertcurrency",{body:{amount:t,fromCurrency:r,toCurrency:n},requiresAuth:!1})}async getPartnerDetails(){return await this.get("/partners/me")}async getPartnerTransactions(t){return await this.get("/partners/me/transactions",{queryParameters:t})}async getAffiliationDetails(){return await this.get("/users/affiliation/me")}async checkUserExistence(t){return await this.post("/users/check-existence",{body:t,requiresAuth:!1})}async getFormations(){return this.get("/settings/formations")}async checkRecoveryLogin(t){const r=/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t),n=/^\+?[\d\s-()]+$/.test(t)&&t.replace(/\D/g,"").length>=8,i={};return r?i.email=t:n?i.phoneNumber=t:i.email=t,await this.post("/recovery/check-login",{body:i,requiresAuth:!1})}async checkRecoveryRegistration(t,r){const n={};return t&&(n.email=t),r&&(n.phoneNumber=r),await this.post("/recovery/check-registration",{body:n,requiresAuth:!1})}parseConflictError(t){if(t.statusCode===409&&t.body){const r=t.body;if(r.errorType==="USER_ALREADY_EXISTS")return{errorType:r.errorType,conflictType:r.conflictType||"UNKNOWN",canProceedWithRegistration:r.canProceedWithRegistration??!1,message:this.getConflictErrorMessage(r.conflictType||"UNKNOWN")}}return null}getConflictErrorMessage(t){const r={PHONE_TAKEN:"Ce numéro de téléphone est déjà associé à un compte existant.",EMAIL_TAKEN:"Cette adresse email est déjà utilisée par un autre compte.",BOTH_TAKEN:"L'email et le numéro de téléphone sont déjà associés à un compte existant.",ACCOUNT_EXISTS:"Un compte avec ces informations existe déjà.",UNKNOWN:"Un conflit a été détecté lors de la vérification. Veuillez réessayer."};return r[t]||r.UNKNOWN}async getRecoveryNotification(t,r){const n={};return t&&(n.email=t),r&&(n.phoneNumber=r),await this.post("/recovery/notification",{body:n,requiresAuth:!1})}async relanceGetPacks(){return await this.get("/relance/packs")}async relanceGetBalance(){return await this.get("/relance/balance")}async relancePurchasePack(t){return await this.post("/relance/packs/purchase",{body:{packId:t}})}async relanceGetSmsTemplates(){return await this.get("/relance/sms-templates")}async relanceGetSmsLinks(){return await this.get("/relance/sms-links")}async relanceUpdateSmsLinks(t){return await this.put("/relance/sms-links",{body:{links:t}})}async relanceGetStatus(){return await this.get("/relance/status")}async relanceUpdateSettings(t){return await this.put("/relance/settings",{body:t})}async relanceUpdateConfig(t){return await this.patch("/relance/config",{body:t})}async relanceGetTargets(t){return await this.get("/relance/targets",{queryParameters:t})}async relanceGetCampaigns(t){return await this.get("/relance/campaigns",{queryParameters:t})}async relanceCreateCampaign(t){return await this.post("/relance/campaigns",{body:t})}async relanceGetCampaign(t){return await this.get(`/relance/campaigns/${t}`)}async relanceGetCampaignTargets(t,r){return await this.get(`/relance/campaigns/${t}/targets`,{queryParameters:r})}async relanceStartCampaign(t){return await this.post(`/relance/campaigns/${t}/start`,{body:{}})}async relancePauseCampaign(t){return await this.post(`/relance/campaigns/${t}/pause`,{body:{}})}async relanceResumeCampaign(t){return await this.post(`/relance/campaigns/${t}/resume`,{body:{}})}async relanceCancelCampaign(t,r){return await this.post(`/relance/campaigns/${t}/cancel`,{body:r?{reason:r}:{}})}async relanceDeleteCampaign(t){return await this.delete(`/relance/campaigns/${t}`)}async relancePreviewFilters(t){return await this.post("/relance/campaigns/preview",{body:{targetFilter:t}})}async relanceGetDefaultStats(){return await this.get("/relance/campaigns/default/stats")}async relanceGetDefaultTargets(t){return await this.get("/relance/campaigns/default/targets",{queryParameters:t})}async relanceGetRecentMessages(t){return await this.get("/relance/messages/recent",{queryParameters:t?{limit:t}:void 0})}async relanceGetCampaignStats(t){return await this.get(`/relance/admin/campaigns/${t}/stats`)}async relanceGetCampaignMessages(t,r){return await this.get(`/relance/admin/campaigns/${t}/messages/recent`,{queryParameters:r?{limit:r}:void 0})}async relancePreviewMessage(t){return await this.post("/relance/admin/messages/preview",{body:t})}async ssoGrantCode(t){return await this.post("/sso/grant-code",{body:t})}async getActivationBalance(){return await this.get("/activation-balance")}async getActivationPricing(){return await this.get("/activation-balance/pricing")}async transferToActivationBalance(t){return await this.post("/activation-balance/transfer",{body:{amount:t}})}async transferActivationBalanceToUser(t,r){return await this.post("/activation-balance/transfer-to-user",{body:{recipientId:t,amount:r}})}async getActivationReferrals(t="all",r=1,n=20,i,a){const o={type:a||"direct",page:r,limit:n};t==="activatable"?o.subType="none":t==="upgradable"&&(o.subType="CLASSIQUE"),i&&(o.name=i);const l=await this.getReferredUsers(o);if(l.isSuccessByStatusCode&&l.body){const c=l.body.data||l.body,f=(c.referredUsers||c.referrals||[]).filter(x=>x&&x._id).map(x=>{var m,p,y,v,b,E,N,j;return{_id:x._id,name:x.name||`${x.firstName||""} ${x.lastName||""}`.trim()||"Utilisateur",email:x.email,phoneNumber:x.phoneNumber,avatar:x.avatar,referralLevel:x.referralLevel||x.level||1,hasActiveSubscription:((m=x.activeSubscriptions)==null?void 0:m.length)>0||((p=x.activeSubscriptionTypes)==null?void 0:p.length)>0,currentSubscriptionType:((y=x.activeSubscriptionTypes)==null?void 0:y[0])||((v=x.activeSubscriptions)==null?void 0:v[0])||null,canUpgrade:(((b=x.activeSubscriptionTypes)==null?void 0:b.includes("CLASSIQUE"))||((E=x.activeSubscriptions)==null?void 0:E.includes("CLASSIQUE")))&&!((N=x.activeSubscriptionTypes)!=null&&N.includes("CIBLE")||(j=x.activeSubscriptions)!=null&&j.includes("CIBLE")),createdAt:x.createdAt}});l.body.data?l.body.data={...l.body.data,referrals:f,total:c.totalCount||c.total||f.length,page:r,pages:c.totalPages||Math.ceil((c.totalCount||f.length)/n)}:l.body={...l.body,referrals:f,total:c.totalCount||c.total||f.length,page:r,pages:c.totalPages||Math.ceil((c.totalCount||f.length)/n)}}return l}async sponsorReferralActivation(t,r){return await this.post("/activation-balance/sponsor",{body:{beneficiaryId:t,subscriptionType:r}})}async getSponsoredHistory(t=1,r=20){return await this.get(`/activation-balance/history?page=${t}&limit=${r}`)}async getActivationTransactionHistory(t=1,r=20){return await this.get(`/transactions/activation-history?page=${t}&limit=${r}`)}async getConversations(t=1,r=20){return await this.get(`/chat/conversations?page=${t}&limit=${r}`)}async getArchivedConversations(t=1,r=20){return await this.get(`/chat/conversations/archived?page=${t}&limit=${r}`)}async getOrCreateConversation(t){return await this.post("/chat/conversations",{body:{participantId:t}})}async getConversation(t){return await this.get(`/chat/conversations/${t}`)}async archiveConversation(t){return await this.post(`/chat/conversations/${t}/archive`)}
50async unarchiveConversation(t){return await this.post(`/chat/conversations/${t}/unarchive`)}async deleteConversation(t){return await this.delete(`/chat/conversations/${t}`)}async bulkDeleteConversations(t){return await this.post("/chat/conversations/bulk-delete",{body:{conversationIds:t}})}async bulkArchiveConversations(t){return await this.post("/chat/conversations/bulk-archive",{body:{conversationIds:t}})}async markConversationAsRead(t){return await this.patch(`/chat/conversations/${t}/read`)}async getMessages(t,r=1,n=50){return await this.get(`/chat/conversations/${t}/messages?page=${r}&limit=${n}`)}async sendMessage(t,r,n){return await this.post("/chat/messages",{body:{conversationId:t,content:r,type:"text",replyToId:n}})}async sendDocument(t,r,n){const i={conversationId:t};return n&&(i.content=n),await this.uploadFiles({endpoint:"/chat/messages/document",files:[r],fieldName:"document",fields:i,httpMethod:"POST"})}async refreshDocumentUrl(t){return await this.get(`/chat/messages/${t}/document-url`)}async deleteMessage(t){return await this.delete(`/chat/messages/${t}`)}async bulkDeleteMessages(t){return await this.post("/chat/messages/bulk-delete",{body:{messageIds:t}})}async forwardMessages(t,r){return await this.post("/chat/messages/forward",{body:{messageIds:t,targetConversationIds:r}})}async acceptConversation(t){return await this.post(`/chat/conversations/${t}/accept`)}async reportConversation(t){return await this.post(`/chat/conversations/${t}/report`)}async blockConversation(t){return await this.post(`/chat/conversations/${t}/block`)}async searchUsers(t){const r=new URLSearchParams;return Object.entries(t).forEach(([n,i])=>{i!==void 0&&r.append(n,i.toString())}),await this.get(`/users/admin/users?${r.toString()}`)}async getStatuses(t=1,r=20,n){const i=new URLSearchParams({page:t.toString(),limit:r.toString()});return n&&i.append("category",n),await this.get(`/chat/statuses?${i.toString()}`)}async getStatus(t){return await this.get(`/chat/statuses/${t}`)}async createStatus(t){const r={category:t.category,contentType:t.contentType};return t.content&&(r.content=t.content),t.duration&&(r.duration=t.duration.toString()),t.media?await this.uploadFiles({endpoint:"/chat/statuses",files:[t.media],fieldName:"media",fields:r,httpMethod:"POST"}):await this.post("/chat/statuses",{body:r})}async deleteStatus(t){return await this.delete(`/chat/statuses/${t}`)}async likeStatus(t){return await this.post(`/chat/statuses/${t}/like`)}async unlikeStatus(t){return await this.delete(`/chat/statuses/${t}/like`)}async repostStatus(t){return await this.post(`/chat/statuses/${t}/repost`)}async viewStatus(t){return await this.post(`/chat/statuses/${t}/view`)}async getStatusInteractions(t,r){return await this.get(`/chat/statuses/${t}/interactions?type=${r}`)}async replyToStatus(t,r){return await this.post(`/chat/statuses/${t}/reply`,{body:{content:r}})}async getAdsQuote(t){return await this.get("/advertising/campaigns/quote",{queryParameters:{amount:t}})}async createAdsCampaign(t){return await this.post("/advertising/campaigns",{body:t})}async getAdsLaunchState(){return await this.get("/advertising/launch",{requiresAuth:!1})}async getMyAdsCampaigns(t){return await this.get("/advertising/campaigns",{queryParameters:t})}async getAdsCampaign(t){return await this.get(`/advertising/campaigns/${t}`)}async getAdsCampaignPerformance(t){return await this.get(`/advertising/campaigns/${t}/performance`)}async updateAdsCampaign(t,r){return await this.patch(`/advertising/campaigns/${t}`,{body:r})}async getAdsReach(t){return await this.post("/advertising/campaigns/reach",{body:t})}async submitAdsCampaign(t){return await this.post(`/advertising/campaigns/${t}/submit`)}async cancelAdsCampaign(t){return await this.post(`/advertising/campaigns/${t}/cancel`)}async payAdsCampaign(t){return await this.post(`/advertising/campaigns/${t}/pay`)}async pauseAdsCampaign(t){return await this.post(`/advertising/campaigns/${t}/pause`)}async resumeAdsCampaign(t){return await this.post(`/advertising/campaigns/${t}/resume`)}async decideAdsCampaign(t,r){return await this.post(`/advertising/campaigns/${t}/decide`,{body:{decision:r}})}async getAdsLeaderboard(t){return await this.get("/advertising/campaigns/leaderboard",{queryParameters:t})}async getDiffuseurEligibility(){return await this.get("/advertising/diffuseurs/eligibility")}async enrollAsDiffuseur(t){return await this.post("/advertising/diffuseurs/enroll",{body:{declaredAverageViews:t}})}async getMyDiffuseurProfile(){return await this.get("/advertising/diffuseurs/me")}async getMyParticipations(t){return await this.get("/advertising/diffuseurs/me/participations",{queryParameters:t})}async acceptParticipation(t){return await this.post(`/advertising/diffuseurs/participations/${t}/accept`)}async declineParticipation(t){return await this.post(`/advertising/diffuseurs/participations/${t}/decline`)}async markParticipationPosted(t){return await this.post(`/advertising/diffuseurs/participations/${t}/mark-posted`)}async unmarkParticipationPosted(t){return await this.post(`/advertising/diffuseurs/participations/${t}/unmark-posted`)}async getVerificationCapacity(){return await this.get("/advertising/verification/capacity")}async startVerification(t,r={}){return await this.post(`/advertising/verification/participations/${t}/start`,{body:{method:r.method??"qr",phoneNumber:r.phoneNumber}})}async getVerificationSession(t){return await this.get(`/advertising/verification/sessions/${t}`,{skipDeduplication:!0}
50)}async cancelVerification(t){return await this.delete(`/advertising/verification/sessions/${t}`)}async generateManualVerifyCode(t){return await this.post(`/advertising/verification/participations/${t}/manual/code`)}async submitManualVerifyVideo(t,r){return await this.post(`/advertising/verification/participations/${t}/manual/video`,{body:{videoFileId:r}})}async getManualVerifyStatus(t){return await this.get(`/advertising/verification/participations/${t}/manual/status`,{skipDeduplication:!0})}async getAdvertisingBalance(){return await this.get("/advertising-balance")}async transferAdvertisingBalance(t){return await this.post("/advertising-balance/transfer",{body:{amount:t}})}async getLoveStatus(){return await this.get("/sbclove/status")}async getMyLoveProfile(){return await this.get("/sbclove/profiles/me")}async createLoveProfile(t){return await this.post("/sbclove/profiles",{body:t})}async updateLoveProfile(t){return await this.put("/sbclove/profiles/me",{body:t})}async uploadLovePhotos(t){return await this.uploadFiles({endpoint:"/sbclove/profiles/me/photos",files:t,fieldName:"photos"})}async deleteLovePhoto(t){return await this.delete(`/sbclove/profiles/me/photos?fileId=${encodeURIComponent(t)}`)}async browseLoveProfiles(t=1,r=20){return await this.get("/sbclove/profiles",{queryParameters:{page:t,limit:r}})}async expressLoveInterest(t){return await this.post(`/sbclove/profiles/${t}/interest`)}async getMyLoveInterests(){return await this.get("/sbclove/interests/me")}async getMyLoveMatches(){return await this.get("/sbclove/matches/me")}async setLoveContactChoice(t,r){return await this.post(`/sbclove/matches/${t}/contact-choice`,{body:{choice:r}})}async openLoveMatchChat(t){return await this.post(`/sbclove/matches/${t}/chat`)}async reportLoveProfile(t,r){return await this.post(`/sbclove/profiles/${t}/report`,{body:{reason:r}})}async blockLoveProfile(t){return await this.post(`/sbclove/profiles/${t}/block`)}async listPublicEvents(t={}){return await this.get("/tickets/public/events",{requiresAuth:!1,queryParameters:t})}async getPublicEventBySlug(t){return await this.get(`/tickets/public/events/${encodeURIComponent(t)}`,{requiresAuth:!1})}async createTicketOrder(t){return await this.post("/tickets/orders",{body:t})}async getTicketOrder(t){return await this.get(`/tickets/orders/${t}`)}async listMyTickets(t={}){return await this.get("/tickets/me/tickets",{queryParameters:t})}async getMyTicket(t){return await this.get(`/tickets/me/tickets/${t}`)}async listMyTicketOrders(t={}){return await this.get("/tickets/me/orders",{queryParameters:t})}async applyAsOrganizer(t){return await this.post("/tickets/organizer/apply",{body:t})}async getMyOrganizer(){return await this.get("/tickets/organizer/me")}async listMyOrganizerEvents(t={}){return await this.get("/tickets/organizer/events",{queryParameters:t})}async createOrganizerEvent(t){return await this.post("/tickets/organizer/events",{body:t})}async updateOrganizerEvent(t,r){return await this.patch(`/tickets/organizer/events/${t}`,{body:r})}async publishOrganizerEvent(t){return await this.post(`/tickets/organizer/events/${t}/publish`)}async cancelOrganizerEvent(t,r){return await this.post(`/tickets/organizer/events/${t}/cancel`,{body:{reason:r}})}async listEventTicketTypes(t){return await this.get(`/tickets/organizer/events/${t}/ticket-types`)}async createEventTicketType(t,r){return await this.post(`/tickets/organizer/events/${t}/ticket-types`,{body:r})}async listEventParticipants(t,r={}){return await this.get(`/tickets/organizer/events/${t}/participants`,{queryParameters:r})}async getOrganizerDashboard(){return await this.get("/tickets/organizer/dashboard")}async getOrganizerFinances(){return await this.get("/tickets/organizer/finances")}getEventParticipantsCsvUrl(t){return`/api/tickets/organizer/events/${encodeURIComponent(t)}/participants.csv`}async scanTicketQr(t){return await this.post("/tickets/scan",{body:t})}async listPublicResale(t={}){return await this.get("/tickets/public/resale",{requiresAuth:!1,queryParameters:t})}async createResaleListing(t,r){return await this.post(`/tickets/me/tickets/${t}/resale`,{body:{askingPrice:r}})}async listMyResaleListings(){return await this.get("/tickets/me/resale")}async cancelMyResaleListing(t){return await this.delete(`/tickets/me/resale/${t}`)}async buyResaleListing(t,r){return await this.post(`/tickets/resale/${t}/buy`,{body:{holder:r}})}async openTicketDispute(t){return await this.post("/tickets/me/disputes",{body:t})}async listMyDisputes(){return await this.get("/tickets/me/disputes")}async getEventOrganizerBalance(){return await this.get("/event-organizer-balance")}async transferEventOrganizerBalanceToMain(t){return await this.post("/event-organizer-balance/transfer",{body:{amount:t}})}}const X=new Nse,Oh={relation_serieuse:"Relation sérieuse",faire_connaissance:"Faire connaissance",projet_mariage:"Projet de mariage",elargir_cercle_social:"Élargir mon cercle social",echange_valeurs_respect:"Échange basé sur les valeurs et le respect",autre:"Autre intention"},Ase=["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"];function M3(e){return e?e.isOpen?`Ouvert jusqu'à ${e.closeHour}h`:`Ouvre ${Ase[e.activeWeekday]??"bientôt"} à ${e.openHour}h`:"Rencontres SBC"}function uz({poll:e=!1}={}){return hr({queryKey:["sbclove-status"],queryFn:async()=>Ve(await X.getLoveStatus()),staleTime:5*60*1e3,refetchInterval:e?60*1e3:!1,refetchOnWindowFocus:e,retry:1})}const kse="/assets/Formation-BVQJER3n.png",Sse="/assets/SBCShop-CKZfdCJv.png",Bse="/assets/ads-CnUhBWY3.png",Dse="/assets/Contacts-C5eIiDx0.png",Ew="/assets/sbclove-BAt
50nrBLY.png";function Fse({formationsCount:e,hasRelanceAccess:t,relanceBadge:r,onFormations:n,onRelance:i}){const a=lt(),{data:o}=uz(),l=[{key:"formations",label:"Formations",subtitle:e===null?"Chargement…":`${e} formations`,img:kse,tint:"bg-primary-soft",onClick:n,dot:(e??0)>0},{key:"shop",label:"SBC Shop",subtitle:"Boutiques & produits",img:Sse,tint:"bg-accent-soft",onClick:()=>a("/marketplace")},{key:"ads",label:"Ads Network",subtitle:"Gagnez en diffusant",img:Bse,tint:"bg-primary-soft",onClick:()=>a("/ads-network")},{key:"events",label:"SBC Event",subtitle:"Billetterie & revente",icon:ru,tint:"bg-primary-soft text-primary",onClick:()=>a("/events")},{key:"contacts",label:"Contacts",subtitle:"Répertoire SBC",img:Dse,tint:"bg-success-soft",onClick:()=>a("/contacts")}];return(o==null?void 0:o.enabled)!==!1&&l.push({key:"love",label:"SBC Love",subtitle:M3(o),img:Ew,tint:"bg-danger-soft",onClick:()=>a("/sbclove"),dot:(o==null?void 0:o.isOpen)===!0}),s.jsxs("section",{className:"flex flex-col gap-3",children:[s.jsx("h2",{className:"text-xl font-bold text-ink",children:"Nos services"}),s.jsx("div",{className:"grid grid-cols-2 gap-3",children:l.map((c,u)=>s.jsxs(Z.button,{onClick:c.onClick,whileTap:{scale:.97},initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:Math.min(u*.03,.2)},className:"relative text-left bg-surface border border-border rounded-card p-3 flex flex-col gap-2",children:[s.jsxs("span",{className:mt("block w-full h-20 rounded-tile overflow-hidden",c.tint),children:[!c.img&&c.icon&&s.jsx("span",{className:"h-full w-full grid place-items-center",children:s.jsx(L,{icon:c.icon,size:30})}),c.img&&s.jsx(s.Fragment,{children:s.jsx("img",{src:c.img,alt:"","aria-hidden":!0,loading:"lazy",decoding:"async",className:"h-full w-full object-contain p-1.5 mix-blend-multiply"})})]}),s.jsx("span",{className:"font-semibold text-ink text-sm",children:c.label}),s.jsx("span",{className:"text-xs text-ink-3",children:c.subtitle}),c.dot&&s.jsx("span",{className:"absolute top-2 right-2 size-2 rounded-pill bg-primary","aria-hidden":!0})]},c.key))}),s.jsxs(Z.button,{onClick:i,whileTap:{scale:.98},className:"bg-surface border border-border rounded-card p-3 flex items-center gap-3 text-left",children:[s.jsx("span",{className:"size-10 grid place-items-center rounded-tile bg-accent-soft text-accent shrink-0",children:s.jsx(L,{icon:yo,size:20})}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsx("span",{className:"block font-semibold text-ink text-sm",children:"Relance auto"}),s.jsx("span",{className:"block text-xs text-ink-3",children:t?"Messages programmés":"Activer la relance"})]}),typeof r=="number"&&r>0&&s.jsx("span",{className:"shrink-0 min-w-6 h-6 px-1.5 grid place-items-center rounded-pill bg-accent text-white text-xs font-bold",children:r}),s.jsx(L,{icon:Mn,size:18,className:"text-ink-3 shrink-0"})]})]})}function dz({entry:e,size:t,className:r}){const n=X.generateThumbnailUrl(e.avatar||e.avatarId,t*2),i={width:t,height:t};return n?s.jsx("img",{src:n,alt:e.name,style:i,loading:"lazy",decoding:"async",className:mt("rounded-pill object-cover bg-surface-2",r)}):s.jsx("span",{style:{...i,fontSize:Math.round(t*.36)},className:mt("rounded-pill bg-primary-soft text-primary font-bold grid place-items-center select-none",r),"aria-hidden":!0,children:Ine(e.name)})}const Zx=[{key:"leader",label:"Leader",minSales:30,bonusXaf:2e3,tint:"bg-surface-2 text-ink-2"},{key:"gold",label:"Leader Gold",minSales:120,bonusXaf:1e4,extra:"T-shirt SBC",tint:"bg-accent-soft text-accent"},{key:"elite",label:"Leader Elite",minSales:320,bonusXaf:5e4,extra:"Ensemble SBC",tint:"bg-primary-soft text-primary"}],xy=e=>{for(let t=Zx.length-1;t>=0;t--)if(e>=Zx[t].minSales)return Zx[t];return null},Pse=e=>{const t=Zx.find(r=>e<r.minSales);return t?{tier:t,remaining:t.minSales-e}:null},uS=[1,0,2];function Tse({entry:e,place:t}){const r=t===0,n=xy(e.referralCount);return s.jsxs(Z.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{delay:.06*t,type:"spring",stiffness:260,damping:24},className:"flex-1 flex flex-col items-center min-w-0",children:[s.jsxs("div",{className:"relative",children:[r&&s.jsx(L,{icon:Ng,size:22,className:"text-accent absolute -top-5 left-1/2 -translate-x-1/2"}),s.jsx(dz,{entry:e,size:r?68:54}),s.jsx("span",{className:mt("absolute -bottom-1 -right-1 size-5 rounded-pill grid place-items-center text-[10px] font-bold text-white",r?"bg-accent":"bg-ink-3"),children:e.rank})]}),s.jsx("p",{className:"mt-3 text-sm font-semibold text-ink truncate max-w-full",children:e.name}),s.jsxs("p",{className:"text-xs text-ink-3 truncate max-w-full",children:[Sd(e.country)," ",e.city??""]}),s.jsxs("div",{className:mt("mt-3 w-full rounded-card border border-border px-2 py-3 text-center","flex flex-col justify-center",r?"bg-primary-soft":"bg-surface",t===0?"h-[9.5rem]":t===1?"h-[8rem]":"h-[7rem]"),children:[s.jsx("p",{className:mt("text-lg font-bold leading-tight",r?"text-primary":"text-ink"),children:e.referralCount}),s.jsx("p",{className:"text-[11px] text-ink-3",children:"filleuls"}),s.jsx("p",{className:"mt-1 text-[11px] font-semibold text-accent",children:Yx(e.earnings)}),n&&s.jsx("span",{className:mt("mt-1 inline-block text-[9px] font-bold uppercase tracking-wide px-1.5 py-0.5 rounded-pill",n.tint),children:n.label})]})]})}function xz({entries:e}){return uS.map(r=>
50e[r]).filter(Boolean).length?s.jsx("div",{className:"flex items-end gap-2 pt-6",children:uS.map(r=>e[r]?s.jsx(Tse,{entry:e[r],place:r},e[r].userId):null)}):null}const $e=({width:e="w-full",height:t="h-4",rounded:r="rounded",className:n=""})=>s.jsx("div",{className:`bg-gray-200 animate-pulse ${e} ${t} ${r} ${n}`,style:{minWidth:0}});function rg({rows:e=4}){return s.jsxs("div",{className:"pt-6",children:[s.jsxs("div",{className:"flex items-end gap-2",children:[s.jsx($e,{height:"h-28",rounded:"rounded-card"}),s.jsx($e,{height:"h-36",rounded:"rounded-card"}),s.jsx($e,{height:"h-24",rounded:"rounded-card"})]}),s.jsx("div",{className:"flex flex-col gap-2 mt-4",children:Array.from({length:e}).map((t,r)=>s.jsx($e,{height:"h-16",rounded:"rounded-card"},r))})]})}function jw({referralCode:e}){const t=e?`https://sniperbuisnesscenter.com/signup?affiliationCode=${e}`:"";return s.jsxs("div",{className:"bg-surface border border-border rounded-card p-6 text-center flex flex-col items-center gap-2",children:[s.jsx(L,{icon:u0,size:32,className:"text-ink-3"}),s.jsx("p",{className:"text-sm font-semibold text-ink",children:"Le classement du mois vient de démarrer"}),s.jsx("p",{className:"text-xs text-ink-2",children:"Parrainez pour être le premier à apparaître ici."}),t&&s.jsxs("button",{onClick:()=>navigator.clipboard.writeText(t),className:"mt-2 inline-flex items-center gap-2 bg-primary text-white text-sm font-semibold rounded-pill px-4 py-2",children:[s.jsx(L,{icon:cy,size:16}),"Copier mon lien"]})]})}function ng({onRetry:e}){return s.jsxs("div",{className:"bg-surface border border-border rounded-card p-5 text-center flex flex-col items-center gap-2",children:[s.jsx(L,{icon:Nl,size:26,className:"text-danger"}),s.jsx("p",{className:"text-sm font-semibold text-ink",children:"Classement indisponible"}),s.jsx("button",{onClick:e,className:"mt-1 bg-primary text-white text-sm font-semibold rounded-pill px-4 py-2",children:"Réessayer"})]})}const fz=()=>hr({queryKey:["leaderboard"],queryFn:async()=>{const e=await X.getLeaderboard(),t=Ve(e);return Array.isArray(t)?{top:t,me:null}:{top:(t==null?void 0:t.top)??[],me:(t==null?void 0:t.me)??null}},staleTime:60*60*1e3,gcTime:2*60*60*1e3,refetchOnWindowFocus:!1,retry:1}),Mse=e=>hr({queryKey:["leaderboard","countries"],queryFn:async()=>{const t=Ve(await X.getCountryLeaderboard());return{countries:(t==null?void 0:t.countries)??[],byCountry:(t==null?void 0:t.byCountry)??{}}},enabled:e,staleTime:60*60*1e3,gcTime:2*60*60*1e3,refetchOnWindowFocus:!1,retry:1}),Ose=e=>hr({queryKey:["leaderboard","filleuls"],queryFn:async()=>{const t=Ve(await X.getMyFilleulsLeaderboard());return{top:(t==null?void 0:t.top)??[],totalRanked:(t==null?void 0:t.totalRanked)??0}},enabled:e,staleTime:60*60*1e3,gcTime:2*60*60*1e3,refetchOnWindowFocus:!1,retry:1}),Nw="sbc.adsRoles",hz=e=>`${Nw}.${e??"anonymous"}`,Lse=e=>(e==null?void 0:e.id)||(e==null?void 0:e._id)||(typeof window<"u"?localStorage.getItem("userId"):null)||null,Rse=e=>{try{const t=localStorage.getItem(hz(e));if(!t)return null;const r=JSON.parse(t);return typeof(r==null?void 0:r.isDiffuseur)!="boolean"||typeof(r==null?void 0:r.isAnnonceur)!="boolean"?null:r}catch{return null}},_se=(e,t)=>{try{localStorage.setItem(hz(e),JSON.stringify(t))}catch{}},Ise=()=>{try{Object.keys(localStorage).filter(e=>e===Nw||e.startsWith(`${Nw}.`)).forEach(e=>localStorage.removeItem(e))}catch{}};function fy(){const{user:e}=Gt(),t=Lse(e),r=Rse(t),{data:n,isFetching:i,isError:a}=hr({queryKey:["ads-roles",t??"anonymous"],queryFn:async()=>{var u,f,x;const[o,l]=await Promise.all([X.getMyDiffuseurProfile(),X.getMyAdsCampaigns({limit:1})]),c={isDiffuseur:o.isSuccessByStatusCode&&!!((u=o.body)!=null&&u.data),isAnnonceur:!!((x=(f=l.body)==null?void 0:f.pagination)!=null&&x.total)};return _se(t,c),c},initialData:r??void 0,initialDataUpdatedAt:0,staleTime:3e4,refetchOnMount:"always",retry:!1});return{roles:n??{isDiffuseur:!1,isAnnonceur:!1},isResolved:!!n,isRefreshing:i,isError:a}}class $se{constructor(){ci(this,"cache",new Map);ci(this,"pendingRequests",new Map)}get(t){return this.cache.get(t)}set(t,r){this.cache.set(t,{data:r,timestamp:Date.now(),loading:!1})}setLoading(t){const r=this.cache.get(t);this.cache.set(t,{data:r==null?void 0:r.data,timestamp:(r==null?void 0:r.timestamp)||Date.now(),loading:!0})}isStale(t,r){const n=this.cache.get(t);return n?Date.now()-n.timestamp>r:!0}hasPendingRequest(t){return this.pendingRequests.has(t)}setPendingRequest(t,r){this.pendingRequests.set(t,r),r.finally(()=>{this.pendingRequests.delete(t)})}getPendingRequest(t){return this.pendingRequests.get(t)}clear(){this.cache.clear(),this.pendingRequests.clear()}delete(t){this.cache.delete(t),this.pendingRequests.delete(t)}}const Qo=new $se,r2=new Map,Aw=e=>{e?Array.isArray(e)?e.forEach(t=>r2.delete(t)):r2.delete(e):r2.clear()};function Pg(e,t,r={}){const{staleTime:n=30*1e3}=r,[i,a]=C.useState(void 0),[o,l]=C.useState(!1),[c,u]=C.useState(""),f=C.useRef(!0);C.useEffect(()=>(f.current=!0,()=>{f.current=!1}),[]);const x=async(v=!1)=>
50{if(!f.current)return;const b=Qo.get(e);if(!v&&b&&!Qo.isStale(e,n))return a(b.data),l(b.loading),b.data;if(Qo.hasPendingRequest(e)){const N=Qo.getPendingRequest(e);if(N)try{const j=await N;return f.current&&(a(j),l(!1)),j}catch(j){throw f.current&&(u(j instanceof Error?j.message:"Request failed"),l(!1)),j}}f.current&&(l(!0),u("")),Qo.setLoading(e);const E=t();Qo.setPendingRequest(e,E);try{const N=await E;return f.current&&(a(N),l(!1),Qo.set(e,N)),N}catch(N){throw f.current&&(u(N instanceof Error?N.message:"Request failed"),l(!1)),N}};return C.useEffect(()=>{x()},[e]),{data:i,loading:o,error:c,refetch:()=>x(!0),clearCache:()=>Qo.delete(e),invalidate:()=>(Aw(e),x())}}const mz=C.createContext(void 0),Gt=()=>{const e=C.useContext(mz);if(e===void 0)throw new Error("useAuth must be used within an AuthProvider");return e},zse=({children:e})=>{const[t,r]=C.useState(null),[n,i]=C.useState(!0),a=!!t&&!!oS();C.useEffect(()=>{(async()=>{if(oS())try{await x()}catch{cS()}i(!1)})()},[]);const o=async(p,y)=>{var v,b;try{const E=await X.loginUser(p,y),N=Ve(E);if(N.requiresOtp||N.otpRequired||N.needsVerification||!N.token&&(N.userId||N.id)||N.status==="pending_verification"){const A=N.userId||N.id||((v=N.user)==null?void 0:v.id),w=N.email||p;return sessionStorage.setItem("tempUserId",A),{requiresOtp:!0,userId:A,email:w}}if(N.token&&lS(N.token),N.user){if(r(N.user),N.user.balance&&N.user.balance<0)try{const A=await X.checkRecoveryLogin(p);if(A){const S=Ve(A);
50if((b=S==null?void 0:S.data)!=null&&b.hasRecoverableTransactions){const B=S.data;return{requiresOtp:!1,hasNegativeBalance:!0,recoveryMessage:`Votre compte a un solde négatif car vous avez probablement des filleuls qui ont payé mais leurs comptes n'ont pas encore été restaurés. Veuillez leur demander de s'inscrire avec l'email ou le numéro de téléphone qu'ils ont utilisé précédemment. Ils n'auront pas à payer à nouveau si le compte peut vraiment être récupéré. ${B.totalTransactions||0} transactions récupérables trouvées d'une valeur de ${B.totalAmount||0} XAF.`}}}return{requiresOtp:!1,hasNegativeBalance:!0,recoveryMessage:"Votre compte a un solde négatif. Cela peut être dû à des transactions de vos filleuls qui n'ont pas encore été restaurées. Veuillez contacter le support si vous pensez qu'il s'agit d'une erreur."}}catch{return{requiresOtp:!1,hasNegativeBalance:!0,recoveryMessage:"Votre compte a un solde négatif. Si vous avez des filleuls qui ont effectué des paiements récemment, demandez-leur de s'inscrire avec le même email ou numéro de téléphone qu'ils ont utilisé précédemment pour restaurer leurs comptes."}}}else N.token&&await x();return{requiresOtp:!1}}catch(E){throw E}},l=async p=>{try{const y=await X.registerUser(p),v=Ve(y),b=v.userId||v.id;return sessionStorage.setItem("tempUserId",b),{userId:b}}catch(y){throw y}},c=async()=>{try{await X.logoutUser()}catch{}finally{cS(),r(null),sessionStorage.clear(),localStorage.removeItem("profileCompletionDone"),localStorage.removeItem("profileCompletionSkipped"),Ise(),localStorage.removeItem("splashViewed"),sessionStorage.setItem("justLoggedOutAt",String(Date.now()))}},u=C.useCallback(async(p,y)=>{var v,b,E,N,j,A,w,S,B,D,P;try{const O=await X.verifyOtp(p,y),M=Ve(O);M.token&&(lS(M.token),localStorage.setItem("userId",((v=M.user)==null?void 0:v.id)||p),localStorage.setItem("userEmail",((b=M.user)==null?void 0:b.email)||""),localStorage.setItem("userName",((E=M.user)==null?void 0:E.name)||`${((N=M.user)==null?void 0:N.firstName)||""} ${((j=M.user)==null?void 0:j.lastName)||""}`.trim()),localStorage.setItem("balance",((w=(A=M.user)==null?void 0:A.balance)==null?void 0:w.toString())||"0"),localStorage.setItem("usdBalance",((B=(S=M.user)==null?void 0:S.usdBalance)==null?void 0:B.toString())||"0"),(D=M.user)!=null&&D.avatar&&localStorage.setItem("avatar",M.user.avatar),(P=M.user)!=null&&P.momoNumber&&(localStorage.setItem("momo",M.user.momoNumber),localStorage.setItem("momoCorrespondent",M.user.momoOperator||""))),M.user?r(M.user):M.token&&await x(),sessionStorage.removeItem("tempUserId"),Aw(["transaction-stats","referral-stats","current-subscription","formations"])}catch(O){throw O}},[r]),f=async p=>{try{const y=await X.updateUserProfile(p),v=Ve(y);v.user?r(v.user):await x()}catch(y){throw y}},x=C.useCallback(async()=>{try{const p=await X.getUserProfile(),y=Ve(p);r(y),Aw(["transaction-stats","referral-stats","current-subscription","formations"])}catch(p){throw((p==null?void 0:p.status)===401||p!=null&&p.message&&p.message.toLowerCase().includes("unauthorized"))&&(await c(),localStorage.setItem("sessionExpired","1")),p}},[r,c]),m={user:t,loading:n,login:o,register:l,logout:c,verifyOtp:u,updateProfile:f,refreshUser:x,isAuthenticated:a};return s.jsx(mz.Provider,{value:m,children:e})};function Vse(){const{user:e}=Gt(),{data:t,isLoading:r,error:n,refetch:i}=fz(),a=(t==null?void 0:t.top)??[],o=(t==null?void 0:t.me)??null;return s.jsxs("section",{className:"flex flex-col gap-1",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("h2",{className:"text-xl font-bold text-ink flex items-center gap-2",children:["Classement Général",s.jsx(L,{icon:u0,size:18,className:"text-accent"})]}),s.jsxs(bn,{to:"/classement",className:"text-sm font-semibold text-primary flex items-center gap-1",children:["Voir plus",s.jsx(L,{icon:Mn,size:16})]})]}),s.jsx("p",{className:"text-xs text-ink-3",children:"Filleuls directs qui ont payé ce mois-ci"}),r?s.jsx(rg,{rows:0}):n?s.jsx("div",{className:"mt-3",children:s.jsx(ng,{onRetry:()=>i()})}):a.length===0?s.jsx("div",{className:"mt-3",children:s.jsx(jw,{referralCode:e==null?void 0:e.referralCode})}):s.jsxs(s.Fragment,{children:[s.jsx(xz,{entries:a}),o&&!o.inTop&&s.jsxs("p",{className:"mt-3 text-xs text-ink-2 bg-primary-soft rounded-card px-3 py-2 text-center",children:["Votre position : ",s.jsxs("span",{className:"font-bold text-primary",children:["#",o.rank]}),o.referralCount>0&&` · ${o.referralCount} filleul${o.referralCount>1?"s":""} payé${o.referralCount>1?"s":""}`]})]})]})}const Use=({src:e,poster:t,title:r})=>{var I;const n=C.useRef(null),i=C.useRef(null),[a,o]=C.useState(!1),[l,c]=C.useState(.5),[u,f]=C.useState(!1),[x,m]=C.useState(0),[p,y]=C.useState(0),[v,b]=C.useState(!0),E=C.useCallback(()=>{i.current&&clearTimeout(i.current),i.current=setTimeout(()=>b(!1),3e3)},[]),N=C.useCallback(()=>{n.current&&(a?n.current.pause():n.current.play(),o(!a))},[a]),j=C.useCallback(()=>{v?N():(b(!0),a&&E())},[v,a,N,E]);C.useEffect(()=>
50(a&&v&&E(),a||(b(!0),i.current&&clearTimeout(i.current)),()=>{i.current&&clearTimeout(i.current)}),[a,v,E]);const A=C.useCallback(V=>{const W=parseFloat(V.target.value);n.current&&(n.current.volume=W,c(W),f(W===0))},[]),w=C.useCallback(()=>{n.current&&(n.current.muted=!u,f(!u),u&&(n.current.volume=l===0?.5:l))},[u,l]),S=C.useCallback(()=>{n.current&&m(n.current.currentTime/n.current.duration*100)},[]),B=C.useCallback(()=>{n.current&&y(n.current.duration)},[]),D=C.useCallback(V=>{if(n.current){const W=parseFloat(V.target.value)/100*p;n.current.currentTime=W,m(parseFloat(V.target.value))}},[p]),P=V=>{const W=Math.floor(V/60),_=Math.floor(V%60);return`${W}:${_<10?"0":""}${_}`},O=C.useCallback(V=>{n.current&&(n.current.currentTime+=V)},[]),M=C.useCallback(()=>{n.current&&(document.fullscreenElement?document.exitFullscreen():n.current.requestFullscreen())},[]);return C.useEffect(()=>{const V=n.current;if(V)return V.addEventListener("timeupdate",S),V.addEventListener("loadedmetadata",B),V.addEventListener("ended",()=>o(!1)),()=>{V.removeEventListener("timeupdate",S),V.removeEventListener("loadedmetadata",B),V.removeEventListener("ended",()=>o(!1))}},[S,B]),s.jsxs("div",{className:"relative w-full rounded-card overflow-hidden bg-black",children:[s.jsx("video",{ref:n,src:e,poster:t,title:r,preload:"none",playsInline:!0,className:"w-full aspect-video object-contain",onClick:j}),s.jsx("div",{className:`absolute inset-0 flex items-center justify-center bg-black/10 transition-opacity duration-300 pointer-events-none ${v?"opacity-100":"opacity-0"}`,children:s.jsx("button",{onClick:N,className:"p-4 rounded-full bg-white/90 text-ink hover:bg-white transition-colors pointer-events-auto","aria-label":a?"Pause":"Play",children:a?s.jsx(L,{icon:kg,size:32}):s.jsx(L,{icon:wf,size:32})})}),s.jsxs("div",{className:`absolute bottom-0 left-0 right-0 p-3 bg-gradient-to-t from-black/70 to-transparent transition-opacity duration-300 ${v?"opacity-100":"opacity-0 pointer-events-none"}`,children:[s.jsx("input",{type:"range",min:"0",max:"100",value:x,onChange:D,className:"w-full h-2 bg-green-500 rounded-lg appearance-none cursor-pointer mb-2",style:{background:`linear-gradient(to right, #2ecc40 ${x}%, #d1d5db ${x}%)`}}),s.jsxs("div",{className:"flex items-center justify-between text-white text-sm mb-2",children:[s.jsx("span",{children:P(((I=n.current)==null?void 0:I.currentTime)||0)}),s.jsx("span",{children:P(p)})]}),s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx("button",{onClick:N,className:"p-1 rounded-full hover:bg-gray-700 transition-colors text-white",children:a?s.jsx(L,{icon:kg,size:20}):s.jsx(L,{icon:wf,size:20})}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("button",{onClick:()=>O(-10),className:"p-1 rounded-full hover:bg-gray-700 transition-colors text-white",children:s.jsx(L,{icon:nre,size:20})}),s.jsx("button",{onClick:()=>O(10),className:"p-1 rounded-full hover:bg-gray-700 transition-colors text-white",children:s.jsx(L,{icon:gre,size:20})})]}),s.jsxs("div",{className:"flex items-center gap-2 flex-grow",children:[s.jsx("button",{onClick:w,className:"p-1 rounded-full hover:bg-gray-700 transition-colors text-white",children:u||l===0?s.jsx(L,{icon:Wre,size:20}):s.jsx(L,{icon:qre,size:20})}),s.jsx("input",{type:"range",min:"0",max:"1",step:"0.01",value:u?0:l,onChange:A,className:"w-24 h-2 bg-gray-600 rounded-lg appearance-none cursor-pointer",style:{background:`linear-gradient(to right, #2ecc40 ${u?0:l*100}%, #d1d5db ${u?0:l*100}%)`}})]}),s.jsx("button",{onClick:M,className:"p-1 rounded-full hover:bg-gray-700 transition-colors text-white",children:s.jsx(L,{icon:yre,size:20})})]})]})]})},qse=[{key:"whatsapp",label:"WhatsApp",subtitle:"Canal officiel SBC",icon:nu,tint:"bg-whatsapp",href:"https://whatsapp.com/channel/0029Vav3mvCElah05C8QuT03"},{key:"telegram",label:"Telegram",subtitle:"Canal d'annonces · actus quotidiennes",icon:F$,tint:"bg-telegram",href:"https://t.me/sniperbusinesscenterafrica"},{key:"youtube",label:"YouTube",subtitle:"Tutos & retours d'expérience",icon:P$,tint:"bg-youtube",href:"https://m.youtube.com/@SniperBusinessCenterSBC"}];function Wse(){return s.jsxs("section",{className:"flex flex-col gap-3",children:[s.jsx("h2",{className:"text-xl font-bold text-ink",children:"Rejoignez-nous"}),s.jsx("div",{className:"flex flex-col gap-2",children:qse.map(e=>s.jsxs(Z.a,{href:e.href,target:"_blank",rel:"noopener noreferrer",whileTap:{scale:.98},className:"bg-surface border border-border rounded-card p-3 flex items-center gap-3",children:[s.jsx("span",{className:`size-10 grid place-items-center rounded-pill text-white shrink-0 ${e.t
50int}`,children:s.jsx(L,{icon:e.icon,size:20})}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsx("span",{className:"block font-semibold text-ink text-sm",children:e.label}),s.jsx("span",{className:"block text-xs text-ink-3 truncate",children:e.subtitle})]}),s.jsx(L,{icon:Mn,size:18,className:"text-ink-3 shrink-0"})]},e.key))})]})}const Hse=2e3,nn=({children:e})=>{const{isAuthenticated:t,loading:r}=Gt(),n=Cr();if(r)return s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-white",children:s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary"})});if(!t){const i=parseInt(sessionStorage.getItem("justLoggedOutAt")||"0",10);return i&&Date.now()-i<Hse?s.jsx(wl,{to:"/connexion",replace:!0}):s.jsx(wl,{to:"/splash-screen",state:{from:n},replace:!0})}return s.jsx(s.Fragment,{children:e})};function pz(e){return t=>typeof t===e}var Gse=pz("function"),Kse=e=>e===null,dS=e=>Object.prototype.toString.call(e).slice(8,-1)==="RegExp",xS=e=>!Xse(e)&&!Kse(e)&&(Gse(e)||typeof e=="object"),Xse=pz("undefined");function Yse(e,t){const{length:r}=e;if(r!==t.length)return!1;for(let n=r;n--!==0;)if(!ps(e[n],t[n]))return!1;return!0}function Qse(e,t){if(e.byteLength!==t.byteLength)return!1;const r=new DataView(e.buffer),n=new DataView(t.buffer);let i=e.byteLength;for(;i--;)if(r.getUint8(i)!==n.getUint8(i))return!1;return!0}function Zse(e,t){if(e.size!==t.size)return!1;for(const r of e.entries())if(!t.has(r[0]))return!1;for(const r of e.entries())if(!ps(r[1],t.get(r[0])))return!1;return!0}function Jse(e,t){if(e.size!==t.size)return!1;for(const r of e.entries())if(!t.has(r[0]))return!1;return!0}function ps(e,t){if(e===t)return!0;if(e&&xS(e)&&t&&xS(t)){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)&&Array.isArray(t))return Yse(e,t);if(e instanceof Map&&t instanceof Map)return Zse(e,t);if(e instanceof Set&&t instanceof Set)return Jse(e,t);if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t))return Qse(e,t);if(dS(e)&&dS(t))return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let i=r.length;i--!==0;)if(!Object.prototype.hasOwnProperty.call(t,r[i]))return!1;for(let i=r.length;i--!==0;){const a=r[i];if(!(a==="_owner"&&e.$$typeof)&&!ps(e[a],t[a]))return!1}return!0}return Number.isNaN(e)&&Number.isNaN(t)?!0:e===t}var eie=["Array","ArrayBuffer","AsyncFunction","AsyncGenerator","AsyncGeneratorFunction","Date","Error","Function","Generator","GeneratorFunction","HTMLElement","Map","Object","Promise","RegExp","Set","WeakMap","WeakSet"],tie=["bigint","boolean","null","number","string","symbol","undefined"];function hy(e){const t=Object.prototype.toString.call(e).slice(8,-1);if(/HTML\w+Element/.test(t))return"HTMLElement";if(rie(t))return t}function ra(e){return t=>hy(t)===e}function rie(e){return eie.includes(e)}function f0(e){return t=>typeof t===e}function nie(e){return tie.includes(e)}var sie=["innerHTML","ownerDocument","style","attributes","nodeValue"];function Qe(e){if(e===null)return"null";switch(typeof e){case"bigint":return"bigint";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";case"undefined":return"undefined"}if(Qe.array(e))return"Array";if(Qe.plainFunction(e))return"Function";const t=hy(e);return t||"Object"}Qe.array=Array.isArray;Qe.arrayOf=(e,t)=>!Qe.array(e)&&!Qe.function(t)?!1:e.every(r=>t(r));Qe.asyncGeneratorFunction=e=>hy(e)==="AsyncGeneratorFunction";Qe.asyncFunction=ra("AsyncFunction");Qe.bigint=f0("bigint");Qe.boolean=e=>e===!0||e===!1;Qe.date=ra("Date");Qe.defined=e=>!Qe.undefined(e);Qe.domElement=e=>Qe.object(e)&&!Qe.plainObject(e)&&e.nodeType===1&&Qe.string(e.nodeName)&&sie.every(t=>t in e);Qe.empty=e=>Qe.string(e)&&e.length===0||Qe.array(e)&&e.length===0||Qe.object(e)&&!Qe.map(e)&&!Qe.set(e)&&Object.keys(e).length===0||Qe.set(e)&&e.size===0||Qe.map(e)&&e.size===0;Qe.error=ra("Error");Qe.function=f0("function");Qe.generator=e=>Qe.iterable(e)&&Qe.function(e.next)&&Qe.function(e.throw);Qe.generatorFunction=ra("GeneratorFunction");Qe.instanceOf=(e,t)=>!e||!t?!1:Object.getPrototypeOf(e)===t.prototype;Qe.iterable=e=>!Qe.nullOrUndefined(e)&&Qe.function(e[Symbol.iterator]);Qe.map=ra("Map");Qe.nan=e=>Number.isNaN(e);Qe.null=e=>e===null;Qe.nullOrUndefined=e=>Qe.null(e)||Qe.undefined(e);Qe.number=e=>f0("number")(e)&&!Qe.nan(e);Qe.numericString=e=>Qe.string(e)&&e.length>0&&!Number.isNaN(Number(e));Qe.object=e=>!Qe.nullOrUndefined(e)&&(Qe.function(e)||typeof e=="object");Qe.oneOf=(e,t)=>Qe.array(e)?e.indexOf(t)>-1:!1;Qe.plainFunction=ra("Function");Qe.plainObject=e=>{if(hy(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.getPrototypeOf({})};Qe.primitive=e=>Qe.null(e)||nie(typeof e);Qe.promise=ra("Promise");Qe.propertyOf=(e,t,r)=>{if(!Qe.object(e)||!t)return!1;const n=e[t];return Qe.function(r)?r(n):Qe.defined(n)};Qe.regexp=ra("RegExp");Qe.set=ra("Set");Qe.string=f0("string");Qe.symbol=f0("symbol");Qe.undefined=f0("undefined");Qe.weakMap=ra("WeakMap");Qe.weakSet=ra("WeakSet");var st=Qe;function iie(...e){return e.every(t=>st.string(t)||st.array(t)||st.plainObject(t))}function aie(e,t,r){return gz(e,t)?[e,t].every(st.array)?!e.some(gS(r))&&t.some(gS(r)):[e,t].every(st.plainObject)?!Object.entries(e).some(pS(r))&&Object.entries(t).some(pS(r)):t===r:!1}function fS(e,t,r){const{actual:n,key:i,previous:a,type:o}=r,l=Ca(e,i),c=Ca(t,i);let u=[l,c].every(st.number)&&(o==="increased"?l<c:l>c);return st.undefined(n)||(u=u&&c===n),st.undefined(a)||(u=u&&l===a),u}function hS(e,t,r){const{key:n,type:i,value:a}=r,o=Ca(e,n),l=Ca(t,n),c=i==="added"?o:l,u=i==="added"?l:o;
50if(!st.nullOrUndefined(a)){if(st.defined(c)){if(st.array(c)||st.plainObject(c))return aie(c,u,a)}else return ps(u,a);return!1}return[o,l].every(st.array)?!u.every(O3(c)):[o,l].every(st.plainObject)?oie(Object.keys(c),Object.keys(u)):![o,l].every(f=>st.primitive(f)&&st.defined(f))&&(i==="added"?!st.defined(o)&&st.defined(l):st.defined(o)&&!st.defined(l))}function mS(e,t,{key:r}={}){let n=Ca(e,r),i=Ca(t,r);if(!gz(n,i))throw new TypeError("Inputs have different types");if(!iie(n,i))throw new TypeError("Inputs don't have length");return[n,i].every(st.plainObject)&&(n=Object.keys(n),i=Object.keys(i)),[n,i]}function pS(e){return([t,r])=>st.array(e)?ps(e,r)||e.some(n=>ps(n,r)||st.array(r)&&O3(r)(n)):st.plainObject(e)&&e[t]?!!e[t]&&ps(e[t],r):ps(e,r)}function oie(e,t){return t.some(r=>!e.includes(r))}function gS(e){return t=>st.array(e)?e.some(r=>ps(r,t)||st.array(t)&&O3(t)(r)):ps(e,t)}function hx(e,t){return st.array(e)?e.some(r=>ps(r,t)):ps(e,t)}function O3(e){return t=>e.some(r=>ps(r,t))}function gz(...e){return e.every(st.array)||e.every(st.number)||e.every(st.plainObject)||e.every(st.string)}function Ca(e,t){return st.plainObject(e)||st.array(e)?st.string(t)?t.split(".").reduce((n,i)=>n&&n[i],e):st.number(t)?e[t]:e:e}function Tg(e,t){if([e,t].some(st.nullOrUndefined))throw new Error("Missing required parameters");if(![e,t].every(f=>st.plainObject(f)||st.array(f)))throw new Error("Expected plain objects or array");return{added:(f,x)=>{try{return hS(e,t,{key:f,type:"added",value:x})}catch{return!1}},changed:(f,x,m)=>{try{const p=Ca(e,f),y=Ca(t,f),v=st.defined(x),b=st.defined(m);if(v||b){const E=b?hx(m,p):!hx(x,p),N=hx(x,y);return E&&N}return[p,y].every(st.array)||[p,y].every(st.plainObject)?!ps(p,y):p!==y}catch{return!1}},changedFrom:(f,x,m)=>{if(!st.defined(f))return!1;try{const p=Ca(e,f),y=Ca(t,f),v=st.defined(m);return hx(x,p)&&(v?hx(m,y):!v)}catch{return!1}},decreased:(f,x,m)=>{if(!st.defined(f))return!1;try{return fS(e,t,{key:f,actual:x,previous:m,type:"decreased"})}catch{return!1}},emptied:f=>{try{const[x,m]=mS(e,t,{key:f});return!!x.length&&!m.length}catch{return!1}},filled:f=>{try{const[x,m]=mS(e,t,{key:f});return!x.length&&!!m.length}catch{return!1}},increased:(f,x,m)=>{if(!st.defined(f))return!1;try{return fS(e,t,{key:f,actual:x,previous:m,type:"increased"})}catch{return!1}},removed:(f,x)=>{try{return hS(e,t,{key:f,type:"removed",value:x})}catch{return!1}}}}var n2,yS;function lie(){if(yS)return n2;yS=1;var e=new Error("Element already at target scroll position"),t=new Error("Scroll cancelled"),r=Math.min,n=Date.now;n2={left:i("scrollLeft"),top:i("scrollTop")};function i(l){return function(u,f,x,m){x=x||{},typeof x=="function"&&(m=x,x={}),typeof m!="function"&&(m=o);var p=n(),y=u[l],v=x.ease||a,b=isNaN(x.duration)?350:+x.duration,E=!1;return y===f?m(e,u[l]):requestAnimationFrame(j),N;function N(){E=!0}function j(A){if(E)return m(t,u[l]);var w=n(),S=r(1,(w-p)/b),B=v(S);u[l]=B*(f-y)+y,S<1?requestAnimationFrame(j):requestAnimationFrame(function(){m(null,u[l])})}}}function a(l){return .5*(1-Math.cos(Math.PI*l))}function o(){}return n2}var cie=lie();const uie=lr(cie);var sg={exports:{}},die=sg.exports,vS;function xie(){return vS||(vS=1,function(e){(function(t,r){e.exports?e.exports=r():t.Scrollparent=r()})(die,function(){function t(n){var i=getComputedStyle(n,null).getPropertyValue("overflow");return i.indexOf("scroll")>-1||i.indexOf("auto")>-1}function r(n){if(n instanceof HTMLElement||n instanceof SVGElement){for(var i=n.parentNode;i.parentNode;){if(t(i))return i;i=i.parentNode}return document.scrollingElement||document.documentElement}}return r})}(sg)),sg.exports}var fie=xie();const yz=lr(fie);var s2,bS;function hie(){if(bS)return s2;bS=1;var e=function(n){return Object.prototype.hasOwnProperty.call(n,"props")},t=function(n,i){return n+r(i)},r=function(n){return n===null||typeof n=="boolean"||typeof n>"u"?"":typeof n=="number"?n.toString():typeof n=="string"?n:Array.isArray(n)?n.reduce(t,""):e(n)&&Object.prototype.hasOwnProperty.call(n.props,"children")?r(n.props.children):""};return r.default=r,s2=r,s2}var mie=hie();const CS=lr(mie);
vendor: 1,065 bytes, line 50
50var i2,wS;function pie(){if(wS)return i2;wS=1;var e=function(N){return t(N)&&!r(N)};function t(E){return!!E&&typeof E=="object"}function r(E){var N=Object.prototype.toString.call(E);return N==="[object RegExp]"||N==="[object Date]"||a(E)}var n=typeof Symbol=="function"&&Symbol.for,i=n?Symbol.for("react.element"):60103;function a(E){return E.$$typeof===i}function o(E){return Array.isArray(E)?[]:{}}function l(E,N){return N.clone!==!1&&N.isMergeableObject(E)?v(o(E),E,N):E}function c(E,N,j){return E.concat(N).map(function(A){return l(A,j)})}function u(E,N){if(!N.customMerge)return v;var j=N.customMerge(E);return typeof j=="function"?j:v}function f(E){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(E).filter(function(N){return Object.propertyIsEnumerable.call(E,N)}):[]}function x(E){return Object.keys(E).concat(f(E))}function m(E,N){try{return N in E}catch{return!1}}function p(E,N){return m(E,N)&&!(Object.hasOwnProperty.call(E,N)&&Object.propertyIsEnumerable.call(E,N))}function y(E,N,j){var A={};return j.isMergeableObject(E)&&x(E).forEac
50h(function(w){A[w]=l(E[w],j)}),x(N).forEach(function(w){p(E,w)||(m(E,w)&&j.isMergeableObject(N[w])?A[w]=u(w,j)(E[w],N[w],j):A[w]=l(N[w],j))}),A}function v(E,N,j){j=j||{},j.arrayMerge=j.arrayMerge||c,j.isMergeableObject=j.isMergeableObject||e,j.cloneUnlessOtherwiseSpecified=l;var A=Array.isArray(N),w=Array.isArray(E),S=A===w;return S?A?j.arrayMerge(E,N,j):y(E,N,j):l(N,j)}v.all=function(N,j){if(!Array.isArray(N))throw new Error("first argument should be an array");return N.reduce(function(A,w){return v(A,w,j)},{})};var b=v;return i2=b,i2}var gie=pie();const Ki=lr(gie);var a2={exports:{}},o2,ES;function yie(){if(ES)return o2;ES=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return o2=e,o2}var l2,jS;function vie(){if(jS)return l2;jS=1;var e=yie();function t(){}function r(){}return r.resetWarningCache=t,l2=function(){function n(o,l,c,u,f,x){if(x!==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 a={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:t};return a.PropTypes=a,a},l2}var NS;function bie(){return NS||(NS=1,a2.exports=vie()()),a2.exports}var Cie=bie();const Fe=lr(Cie);/**!
51 * @fileOverview Kickass library to create and place poppers near their reference elements.
52 * @version 1.16.1
53 * @license
54 * Copyright (c) 2016 Federico Zivolo and contributors
55 *
56 * Permission is hereby granted, free of charge, to any person obtaining a copy
57 * of this software and associated documentation files (the "Software"), to deal
58 * in the Software without restriction, including without limitation the rights
59 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
60 * copies of the Software, and to permit persons to whom the Software is
61 * furnished to do so, subject to the following conditions:
62 *
63 * The above copyright notice and this permission notice shall be included in all
64 * copies or substantial portions of the Software.
65 *
66 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
67 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
68 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
69 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
70 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
71 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
72 * SOFTWARE.
73 */var Lh=typeof window<"u"&&typeof document<"u"&&typeof navigator<"u",wie=function(){for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(Lh&&navigator.userAgent.indexOf(e[t])>=0)return 1;return 0}();function Eie(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}function jie(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},wie))}}var Nie=Lh&&window.Promise,Aie=Nie?Eie:jie;function vz(e){var t={};return e&&t.toString.call(e)==="[object Function]"}function iu(e,t){if(e.nodeType!==1)return[];var r=e.ownerDocument.defaultView,n=r.getComputedStyle(e,null);return t?n[t]:n}function L3(e){return e.nodeName==="HTML"?e:e.parentNode||e.host}function Rh(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=iu(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/(auto|scroll|overlay)/.test(r+i+n)?e:Rh(L3(e))}function bz(e){return e&&e.referenceNode?e.referenceNode:e}var AS=Lh&&!!(window.MSInputMethodContext&&document.documentMode),kS=Lh&&/MSIE 10/.test(navigator.userAgent);function h0(e){return e===11?AS:e===10?kS:AS||kS}function Bd(e){if(!e)return document.documentElement;for(var t=h0(10)?document.body:null,r=e.offsetParent||null;r===t&&e.nextElementSibling;)r=(e=e.nextElementSibling).offsetParent;var n=r&&r.nodeName;return!n||n==="BODY"||n==="HTML"?e?e.ownerDocument.documentElement:document.documentElement:["TH","TD","TABLE"].indexOf(r.nodeName)!==-1&&iu(r,"position")==="static"?Bd(r):r}function kie(e){var t=e.nodeName;return t==="BODY"?!1:t==="HTML"||Bd(e.firstElementChild)===e}function kw(e){return e.parentNode!==null?kw(e.parentNode):e}function Mg(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var r=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,n=r?e:t,i=r?t:e,a=document.createRange();a.setStart(n,0),a.setEnd(i,0);var o=a.commonAncestorContainer;
vendor: 18,498 bytes, line 73
73if(e!==o&&t!==o||n.contains(i))return kie(o)?o:Bd(o);var l=kw(e);return l.host?Mg(l.host,t):Mg(e,kw(t).host)}function Dd(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"top",r=t==="top"?"scrollTop":"scrollLeft",n=e.nodeName;if(n==="BODY"||n==="HTML"){var i=e.ownerDocument.documentElement,a=e.ownerDocument.scrollingElement||i;return a[r]}return e[r]}function Sie(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=Dd(t,"top"),i=Dd(t,"left"),a=r?-1:1;return e.top+=n*a,e.bottom+=n*a,e.left+=i*a,e.right+=i*a,e}function SS(e,t){var r=t==="x"?"Left":"Top",n=r==="Left"?"Right":"Bottom";return parseFloat(e["border"+r+"Width"])+parseFloat(e["border"+n+"Width"])}function BS(e,t,r,n){return Math.max(t["offset"+e],t["scroll"+e],r["client"+e],r["offset"+e],r["scroll"+e],h0(10)?parseInt(r["offset"+e])+parseInt(n["margin"+(e==="Height"?"Top":"Left")])+parseInt(n["margin"+(e==="Height"?"Bottom":"Right")]):0)}function Cz(e){var t=e.body,r=e.documentElement,n=h0(10)&&getComputedStyle(r);return{height:BS("Height",t,r,n),width:BS("Width",t,r,n)}}var Bie=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Die=function(){function e(t,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),Fd=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},bi=Object.assign||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};function Sl(e){return bi({},e,{right:e.left+e.width,bottom:e.top+e.height})}function Sw(e){var t={};try{if(h0(10)){t=e.getBoundingClientRect();var r=Dd(e,"top"),n=Dd(e,"left");t.top+=r,t.left+=n,t.bottom+=r,t.right+=n}else t=e.getBoundingClientRect()}catch{}var i={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},a=e.nodeName==="HTML"?Cz(e.ownerDocument):{},o=a.width||e.clientWidth||i.width,l=a.height||e.clientHeight||i.height,c=e.offsetWidth-o,u=e.offsetHeight-l;if(c||u){var f=iu(e);c-=SS(f,"x"),u-=SS(f,"y"),i.width-=c,i.height-=u}return Sl(i)}function R3(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=h0(10),i=t.nodeName==="HTML",a=Sw(e),o=Sw(t),l=Rh(e),c=iu(t),u=parseFloat(c.borderTopWidth),f=parseFloat(c.borderLeftWidth);r&&i&&(o.top=Math.max(o.top,0),o.left=Math.max(o.left,0));var x=Sl({top:a.top-o.top-u,left:a.left-o.left-f,width:a.width,height:a.height});if(x.marginTop=0,x.marginLeft=0,!n&&i){var m=parseFloat(c.marginTop),p=parseFloat(c.marginLeft);x.top-=u-m,x.bottom-=u-m,x.left-=f-p,x.right-=f-p,x.marginTop=m,x.marginLeft=p}return(n&&!r?t.contains(l):t===l&&l.nodeName!=="BODY")&&(x=Sie(x,t)),x}function Fie(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=e.ownerDocument.documentElement,n=R3(e,r),i=Math.max(r.clientWidth,window.innerWidth||0),a=Math.max(r.clientHeight,window.innerHeight||0),o=t?0:Dd(r),l=t?0:Dd(r,"left"),c={top:o-n.top+n.marginTop,left:l-n.left+n.marginLeft,width:i,height:a};return Sl(c)}function wz(e){var t=e.nodeName;if(t==="BODY"||t==="HTML")return!1;if(iu(e,"position")==="fixed")return!0;var r=L3(e);return r?wz(r):!1}function Ez(e){if(!e||!e.parentElement||h0())return document.documentElement;for(var t=e.parentElement;t&&iu(t,"transform")==="none";)t=t.parentElement;return t||document.documentElement}function _3(e,t,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,a={top:0,left:0},o=i?Ez(e):Mg(e,bz(t));if(n==="viewport")a=Fie(o,i);else{var l=void 0;n==="scrollParent"?(l=Rh(L3(t)),l.nodeName==="BODY"&&(l=e.ownerDocument.documentElement)):n==="window"?l=e.ownerDocument.documentElement:l=n;var c=R3(l,o,i);if(l.nodeName==="HTML"&&!wz(o)){var u=Cz(e.ownerDocument),f=u.height,x=u.width;a.top+=c.top-c.marginTop,a.bottom=f+c.top,a.left+=c.left-c.marginLeft,a.right=x+c.left}else a=c}r=r||0;var m=typeof r=="number";return a.left+=m?r:r.left||0,a.top+=m?r:r.top||0,a.right-=m?r:r.right||0,a.bottom-=m?r:r.bottom||0,a}function Pie(e){var t=e.width,r=e.height;return t*r}function jz(e,t,r,n,i){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0;if(e.indexOf("auto")===-1)return e;var o=_3(r,n,a,i),l={top:{width:o.width,height:t.top-o.top},right:{width:o.right-t.right,height:o.height},bottom:{width:o.width,height:o.bottom-t.bottom},left:{width:t.left-o.left,height:o.height}},c=Object.keys(l).map(function(m){return bi({key:m},l[m],{area:Pie(l[m])})}).sort(function(m,p){return p.area-m.area}),u=c.filter(function(m){var p=m.width,y=m.height;return p>=r.clientWidth&&y>=r.clientHeight}),f=u.length>0?u[0].key:c[0].key,x=e.split("-")[1];return f+(x?"-"+x:"")}function Nz(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,i=n?Ez(t):Mg(t,bz(r));return R3(r,i,n)}function Az(e){var t=e.ownerDocument.defaultView,r=t.getComputedStyle(e),n=parseFloat(r.marginTop||0)+parseFloat(r.marginBottom||0),i=parseFloat(r.marginLeft||0)+parseFloat(r.marginRight||0),a={width:e.offsetWidth+i,height:e.offsetHeight+n};return a}function Og(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(r){return t[r]})}function kz(e,t,r){r=r.split("-")[0];var n=Az(e),i={width:n.width,height:n.height},a=["right","left"].indexOf(r)!==-1,o=a?"top":"left",l=a?"left":"top",c=a?"height":"width",u=a?"width":"height";return i[o]=t[o]+t[c]/2-n[c]/2,r===l?i[l]=t[l]-n[u]:i[l]=t[Og(l)],i}function _h(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function Tie(e,t,r){if(Array.prototype.findIndex)return e.findIndex(function(i){return i[t]===r});var n=_h(e,function(i){return i[t]===r});return e.indexOf(n)}function Sz(e,t,r){var n=r===void 0?e:e.slice(0,Tie(e,"name",r));return n.forEach(function(i){i.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var a=i.function||i.fn;i.enabled&&vz(a)&&(t.offsets.popper=Sl(t.offsets.popper),t.offsets.reference=Sl(t.offsets.reference),t=a(t,i))}),t}function Mie(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=Nz(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=jz(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=kz(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=Sz(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function Bz(e,t){return e.some(function(r){var n=r.name,i=r.enabled;return i&&n===t})}function I3(e){for(var t=[!1,"ms","Webkit","Moz","O"],r=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<t.length;n++){var i=t[n],a=i?""+i+r:e;if(typeof document.body.style[a]<"u")return a}return null}function Oie(){return this.state.isDestroyed=!0,Bz(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[I3("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function Dz(e){var t=e.ownerDocument;return t?t.defaultView:window}function Fz(e,t,r,n){var i=e.nodeName==="BODY",a=i?e.ownerDocument.defaultView:e;a.addEventListener(t,r,{passive:!0}),i||Fz(Rh(a.parentNode),t,r,n),n.push(a)}function Lie(e,t,r,n){r.updateBound=n,Dz(e).addEventListener("resize",r.updateBound,{passive:!0});var i=Rh(e);return Fz(i,"scroll",r.updateBound,r.scrollParents),r.scrollElement=i,r.eventsEnabled=!0,r}function Rie(){this.state.eventsEnabled||(this.state=Lie(this.reference,this.options,this.state,this.scheduleUpdate))}function _ie(e,t){return Dz(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach(function(r){r.removeEventListener("scroll",t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function Iie(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=_ie(this.reference,this.state))}function $3(e){return e!==""&&!isNaN(parseFloat(e))&&isFinite(e)}function Bw(e,t){Object.keys(t).forEach(function(r){var n="";["width","height","top","right","bottom","left"].indexOf(r)!==-1&&$3(t[r])&&(n="px"),e.style[r]=t[r]+n})}function $ie(e,t){Object.keys(t).forEach(function(r){var n=t[r];n!==!1?e.setAttribute(r,t[r]):e.removeAttribute(r)})}function zie(e){return Bw(e.instance.popper,e.styles),$ie(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&Bw(e.arrowElement,e.arrowStyles),e}function Vie(e,t,r,n,i){var a=Nz(i,t,e,r.positionFixed),o=jz(r.placement,a,t,e,r.modifiers.flip.boundariesElement,r.modifiers.flip.padding);return t.setAttribute("x-placement",o),Bw(t,{position:r.positionFixed?"fixed":"absolute"}),r}function Uie(e,t){var r=e.offsets,n=r.popper,i=r.reference,a=Math.round,o=Math.floor,l=function(E){return E},c=a(i.width),u=a(n.width),f=["left","right"].indexOf(e.placement)!==-1,x=e.placement.indexOf("-")!==-1,m=c%2===u%2,p=c%2===1&&u%2===1,y=t?f||x||m?a:o:l,v=t?a:l;return{left:y(p&&!x&&t?n.left-1:n.left),top:v(n.top),bottom:v(n.bottom),right:y(n.right)}}var qie=Lh&&/Firefox/i.test(navigator.userAgent);function Wie(e,t){var r=t.x,n=t.y,i=e.offsets.popper,a=_h(e.instance.modifiers,function(j){return j.name==="applyStyle"}).gpuAcceleration;a!==void 0&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var o=a!==void 0?a:t.gpuAcceleration,l=Bd(e.instance.popper),c=Sw(l),u={position:i.position},f=Uie(e,window.devicePixelRatio<2||!qie),x=r==="bottom"?"top":"bottom",m=n==="right"?"left":"right",p=I3("transform"),y=void 0,v=void 0;if(x==="bottom"?l.nodeName==="HTML"?v=-l.clientHeight+f.bottom:v=-c.height+f.bottom:v=f.top,m==="right"?l.nodeName==="HTML"?y=-l.clientWidth+f.right:y=-c.width+f.right:y=f.left,o&&p)u[p]="translate3d("+y+"px, "+v+"px, 0)",u[x]=0,u[m]=0,u.willChange="transform";else{var b=x==="bottom"?-1:1,E=m==="right"?-1:1;u[x]=v*b,u[m]=y*E,u.willChange=x+", "+m}var N={"x-placement":e.placement};return e.attributes=bi({},N,e.attributes),e.styles=bi({},u,e.styles),e.arrowStyles=bi({},e.offsets.arrow,e.arrowStyles),e}function Pz(e,t,r){var n=_h(e,function(l){var c=l.name;return c===t}),i=!!n&&e.some(function(l){return l.name===r&&l.enabled&&l.order<n.order});if(!i){var a="`"+t+"`",o="`"+r+"`";console.warn(o+" modifier is required by "+a+" modifier in order to work, be sure to include it before "+a+"!")}return i}function Hie(e,t){var r;if(!Pz(e.instance.modifiers,"arrow","keepTogether"))return e;var n=t.element;if(typeof n=="string"){if(n=e.instance.popper.querySelector(n),!n)return e}else if(!e.instance.popper.contains(n))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var i=e.placement.split("-")[0],a=e.offsets,o=a.popper,l=a.reference,c=["left","right"].indexOf(i)!==-1,u=c?"height":"width",f=c?"Top":"Left",x=f.toLowerCase(),m=c?"left":"top",p=c?"bottom":"right",y=Az(n)[u];l[p]-y<o[x]&&(e.offsets.popper[x]-=o[x]-(l[p]-y)),l[x]+y>o[p]&&(e.offsets.popper[x]+=l[x]+y-o[p]),e.offsets.popper=Sl(e.offsets.popper);var v=l[x]+l[u]/2-y/2,b=iu(e.instance.popper),E=parseFloat(b["margin"+f]),N=parseFloat(b["border"+f+"Width"]),j=v-e.offsets.popper[x]-E-N;return j=Math.max(Math.min(o[u]-y,j),0),e.arrowElement=n,e.offsets.arrow=(r={},Fd(r,x,Math.round(j)),Fd(r,m,""),r),e}function Gie(e){return e==="end"?"start":e==="start"?"end":e}var Tz=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],c2=Tz.slice(3);function DS(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=c2.indexOf(e),n=c2.slice(r+1).concat(c2.slice(0,r));return t?n.reverse():n}var u2={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function Kie(e,t){if(Bz(e.instance.modifiers,"inner")||e.flipped&&e.placement===e.originalPlacement)return e;var r=_3(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),n=e.placement.split("-")[0],i=Og(n),a=e.placement.split("-")[1]||"",o=[];switch(t.behavior){case u2.FLIP:o=[n,i];break;case u2.CLOCKWISE:o=DS(n);break;case u2.COUNTERCLOCKWISE:o=DS(n,!0);break;default:o=t.behavior}return o.forEach(function(l,c){if(n!==l||o.length===c+1)return e;n=e.placement.split("-")[0],i=Og(n);var u=e.offsets.popper,f=e.offsets.reference,x=Math.floor,m=n==="left"&&x(u.right)>x(f.left)||n==="right"&&x(u.left)<x(f.right)||n==="top"&&x(u.bottom)>x(f.top)||n==="bottom"&&x(u.top)<x(f.bottom),p=x(u.left)<x(r.left),y=x(u.right)>x(r.right),v=x(u.top)<x(r.top),b=x(u.bottom)>x(r.bottom),E=n==="left"&&p||n==="right"&&y||n==="top"&&v||n==="bottom"&&b,N=["top","bottom"].indexOf(n)!==-1,j=!!t.flipVariations&&(N&&a==="start"&&p||N&&a==="end"&&y||!N&&a==="start"&&v||!N&&a==="end"&&b),A=!!t.flipVariationsByContent&&(N&&a==="start"&&y||N&&a==="end"&&p||!N&&a==="start"&&b||!N&&a==="end"&&v),w=j||A;(m||E||w)&&(e.flipped=!0,(m||E)&&(n=o[c+1]),w&&(a=Gie(a)),e.placement=n+(a?"-"+a:""),e.offsets.popper=bi({},e.offsets.popper,kz(e.instance.popper,e.offsets.reference,e.placement)),e=Sz(e.instance.modifiers,e,"flip"))}),e}function Xie(e){var t=e.offsets,r=t.popper,n=t.reference,i=e.placement.split("-")[0],a=Math.floor,o=["top","bottom"].indexOf(i)!==-1,l=o?"right":"bottom",c=o?"left":"top",u=o?"width":"height";return r[l]<a(n[c])&&(e.offsets.popper[c]=a(n[c])-r[u]),r[c]>a(n[l])&&(e.offsets.popper[c]=a(n[l])),e}function Yie(e,t,r,n){var i=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),a=+i[1],o=i[2];if(!a)return e;if(o.indexOf("%")===0){var l=void 0;switch(o){case"%p":l=r;break;case"%":case"%r":default:l=n}var c=Sl(l);return c[t]/100*a}else if(o==="vh"||o==="vw"){var u=void 0;return o==="vh"?u=Math.max(document.documentElement.clientHeight,window.innerHeight||0):u=Math.max(document.documentElement.clientWidth,window.innerWidth||0),u/100*a}else return a}function Qie(e,t,r,n){var i=[0,0],a=["right","left"].indexOf(n)!==-1,o=e.split(/(\+|\-)/).map(function(f){return f.trim()}),l=o.indexOf(_h(o,function(f){return f.search(/,|\s/)!==-1}));o[l]&&o[l].indexOf(",")===-1&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var c=/\s*,\s*|\s+/,u=l!==-1?[o.slice(0,l).concat([o[l].split(c)[0]]),[o[l].split(c)[1]].concat(o.slice(l+1))]:[o];return u=u.map(function(f,x){var m=(x===1?!a:a)?"height":"width",p=!1;return f.reduce(function(y,v){return y[y.length-1]===""&&["+","-"].indexOf(v)!==-1?(y[y.length-1]=v,p=!0,y):p?(y[y.length-1]+=v,p=!1,y):y.concat(v)},[]).map(function(y){return Yie(y,m,t,r)})}),u.forEach(function(f,x){f.forEach(function(m,p){$3(m)&&(i[x]+=m*(f[p-1]==="-"?-1:1))})}),i}function Zie(e,t){var r=t.offset,n=e.placement,i=e.offsets,a=i.popper,o=i.reference,l=n.split("-")[0],c=void 0;return $3(+r)?c=[+r,0]:c=Qie(r,a,o,l),l==="left"?(a.top+=c[0],a.left-=c[1]):l==="right"?(a.top+=c[0],a.left+=c[1]):l==="top"?(a.left+=c[0],a.top-=c[1]):l==="bottom"&&(a.left+=c[0],a.top+=c[1]),e.popper=a,e}function Jie(e,t){var r=t.boundariesElement||Bd(e.instance.popper);e.instance.reference===r&&(r=Bd(r));var n=I3("transform"),i=e.instance.popper.style,a=i.top,o=i.left,l=i[n];i.top="",i.left="",i[n]="";var c=_3(e.instance.popper,e.instance.reference,t.padding,r,e.positionFixed);i.top=a,i.left=o,i[n]=l,t.boundaries=c;var u=t.priority,f=e.offsets.popper,x={primary:function(p){var y=f[p];return f[p]<c[p]&&!t.escapeWithReference&&(y=Math.max(f[p],c[p])),Fd({},p,y)},secondary:function(p){var y=p==="right"?"left":"top",v=f[y];return f[p]>c[p]&&!t.escapeWithReference&&(v=Math.min(f[y],c[p]-(p==="right"?f.width:f.height))),Fd({},y,v)}};return u.forEach(function(m){var p=["left","top"].indexOf(m)!==-1?"primary":"secondary";f=bi({},f,x[p](m))}),e.offsets.popper=f,e}function eae(e){var t=e.placement,r=t.split("-")[0],n=t.split("-")[1];if(n){var i=e.offsets,a=i.reference,o=i.popper,l=["bottom","top"].indexOf(r)!==-1,c=l?"left":"top",u=l?"width":"height",f={start:Fd({},c,a[c]),end:Fd({},c,a[c]+a[u]-o[u])};e.offsets.popper=bi({},o,f[n])}return e}function tae(e){if(!Pz(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,r=_h(e.instance.modifiers,function(n){return n.name==="preventOverflow"}).boundaries;if(t.bottom<r.top||t.left>r.right||t.top>r.bottom||t.right<r.left){if(e.hide===!0)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(e.hide===!1)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}function rae(e){var t=e.placement,r=t.split("-")[0],n=e.offsets,i=n.popper,a=n.reference,o=["left","right"].indexOf(r)!==-1,l=["top","left"].indexOf(r)===-1;return i[o?"left":"top"]=a[r]-(l?i[o?"width":"height"]:0),e.placement=Og(t),e.offsets.popper=Sl(i),e}var nae={shift:{order:100,enabled:!0,fn:eae},offset:{order:200,enabled:!0,fn:Zie,offset:0},preventOverflow:{order:300,enabled:!0,fn:Jie,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:Xie},arrow:{order:500,enabled:!0,fn:Hie,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:Kie,behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:rae},hide:{order:800,enabled:!0,fn:tae},computeStyle:{order:850,enabled:!0,fn:Wie,gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:zie,onLoad:Vie,gpuAcceleration:void 0}},sae={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:nae},Nf=function(){function e(t,r){var n=this,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Bie(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=Aie(this.update.bind(this)),this.options=bi({},e.Defaults,i),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=r&&r.jquery?r[0]:r,this.options.modifiers={},Object.keys(bi({}
73,e.Defaults.modifiers,i.modifiers)).forEach(function(o){n.options.modifiers[o]=bi({},e.Defaults.modifiers[o]||{},i.modifiers?i.modifiers[o]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(o){return bi({name:o},n.options.modifiers[o])}).sort(function(o,l){return o.order-l.order}),this.modifiers.forEach(function(o){o.enabled&&vz(o.onLoad)&&o.onLoad(n.reference,n.popper,n.options,o,n.state)}),this.update();var a=this.options.eventsEnabled;a&&this.enableEventListeners(),this.state.eventsEnabled=a}return Die(e,[{key:"update",value:function(){return Mie.call(this)}},{key:"destroy",value:function(){return Oie.call(this)}},{key:"enableEventListeners",value:function(){return Rie.call(this)}},{key:"disableEventListeners",value:function(){return Iie.call(this)}}]),e}();Nf.Utils=(typeof window<"u"?window:global).PopperUtils;Nf.placements=Tz;Nf.Defaults=sae;var iae=["innerHTML","ownerDocument","style","attributes","nodeValue"],aae=["Array","ArrayBuffer","AsyncFunction","AsyncGenerator","AsyncGeneratorFunction","Date","Error","Function","Generator","GeneratorFunction","HTMLElement","Map","Object","Promise","RegExp","Set","WeakMap","WeakSet"],oae=["bigint","boolean","null","number","string","symbol","undefined"];function my(e){var t=Object.prototype.toString.call(e).slice(8,-1);if(/HTML\w+Element/.test(t))return"HTMLElement";if(lae(t))return t}function na(e){return function(t){return my(t)===e}}function lae(e){return aae.includes(e)}function m0(e){return function(t){return typeof t===e}}function cae(e){return oae.includes(e)}function ke(e){if(e===null)return"null";switch(typeof e){case"bigint":return"bigint";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";case"undefined":return"undefined"}if(ke.array(e))return"Array";if(ke.plainFunction(e))return"Function";var t=my(e);return t||"Object"}ke.array=Array.isArray;ke.arrayOf=function(e,t){return!ke.array(e)&&!ke.function(t)?!1:e.every(function(r){return t(r)})};ke.asyncGeneratorFunction=function(e){return my(e)==="AsyncGeneratorFunction"};ke.asyncFunction=na("AsyncFunction");ke.bigint=m0("bigint");ke.boolean=function(e){return e===!0||e===!1};ke.date=na("Date");ke.defined=function(e){return!ke.undefined(e)};ke.domElement=function(e){return ke.object(e)&&!ke.plainObject(e)&&e.nodeType===1&&ke.string(e.nodeName)&&iae.every(function(t){return t in e})};ke.empty=function(e){return ke.string(e)&&e.length===0||ke.array(e)&&e.length===0||ke.object(e)&&!ke.map(e)&&!ke.set(e)&&Object.keys(e).length===0||ke.set(e)&&e.size===0||ke.map(e)&&e.size===0};ke.error=na("Error");ke.function=m0("function");ke.generator=function(e){return ke.iterable(e)&&ke.function(e.next)&&ke.function(e.throw)};ke.generatorFunction=na("GeneratorFunction");ke.instanceOf=function(e,t){return!e||!t?!1:Object.getPrototypeOf(e)===t.prototype};ke.iterable=function(e){return!ke.nullOrUndefined(e)&&ke.function(e[Symbol.iterator])};ke.map=na("Map");ke.nan=function(e){return Number.isNaN(e)};ke.null=function(e){return e===null};ke.nullOrUndefined=function(e){return ke.null(e)||ke.undefined(e)};ke.number=function(e){return m0("number")(e)&&!ke.nan(e)};ke.numericString=function(e){return ke.string(e)&&e.length>0&&!Number.isNaN(Number(e))};ke.object=function(e){return!ke.nullOrUndefined(e)&&(ke.function(e)||typeof e=="object")};ke.oneOf=function(e,t){return ke.array(e)?e.indexOf(t)>-1:!1};ke.plainFunction=na("Function");ke.plainObject=function(e){if(my(e)!=="Object")return!1;var t=Object.getPrototypeOf(e);return t===null||t===Object.getPrototypeOf({})};ke.primitive=function(e){return ke.null(e)||cae(typeof e)};ke.promise=na("Promise");ke.propertyOf=function(e,t,r){if(!ke.object(e)||!t)return!1;var n=e[t];return ke.function(r)?r(n):ke.defined(n)};ke.regexp=na("RegExp");ke.set=na("Set");ke.string=m0("string");ke.symbol=m0("symbol");ke.undefined=m0("undefined");ke.weakMap=na("WeakMap");ke.weakSet=na("WeakSet");function Mz(e){return function(t){return typeof t===e}}var uae=Mz("function"),dae=function(e){return e===null},FS=function(e){return Object.prototype.toString.call(e).slice(8,-1)==="RegExp"},PS=function(e){return!xae(e)&&!dae(e)&&(uae(e)||typeof e=="object")},xae=Mz("undefined"),Dw=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);
73if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function fae(e,t){var r=e.length;if(r!==t.length)return!1;for(var n=r;n--!==0;)if(!_s(e[n],t[n]))return!1;return!0}function hae(e,t){if(e.byteLength!==t.byteLength)return!1;for(var r=new DataView(e.buffer),n=new DataView(t.buffer),i=e.byteLength;i--;)if(r.getUint8(i)!==n.getUint8(i))return!1;return!0}function mae(e,t){var r,n,i,a;if(e.size!==t.size)return!1;try{for(var o=Dw(e.entries()),l=o.next();!l.done;l=o.next()){var c=l.value;if(!t.has(c[0]))return!1}}catch(x){r={error:x}}finally{try{l&&!l.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}try{for(var u=Dw(e.entries()),f=u.next();!f.done;f=u.next()){var c=f.value;if(!_s(c[1],t.get(c[0])))return!1}}catch(x){i={error:x}}finally{try{f&&!f.done&&(a=u.return)&&a.call(u)}finally{if(i)throw i.error}}return!0}function pae(e,t){var r,n;if(e.size!==t.size)return!1;try{for(var i=Dw(e.entries()),a=i.next();!a.done;a=i.next()){var o=a.value;if(!t.has(o[0]))return!1}}catch(l){r={error:l}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!0}function _s(e,t){if(e===t)return!0;if(e&&PS(e)&&t&&PS(t)){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)&&Array.isArray(t))return fae(e,t);if(e instanceof Map&&t instanceof Map)return mae(e,t);if(e instanceof Set&&t instanceof Set)return pae(e,t);if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t))return hae(e,t);if(FS(e)&&FS(t))return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(var i=r.length;i--!==0;)if(!Object.prototype.hasOwnProperty.call(t,r[i]))return!1;for(var i=r.length;i--!==0;){var a=r[i];if(!(a==="_owner"&&e.$$typeof)&&!_s(e[a],t[a]))return!1}return!0}return Number.isNaN(e)&&Number.isNaN(t)?!0:e===t}function gae(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.every(function(r){return ke.string(r)||ke.array(r)||ke.plainObject(r)})}function yae(e,t,r){return Oz(e,t)?[e,t].every(ke.array)?!e.some(RS(r))&&t.some(RS(r)):[e,t].every(ke.plainObject)?!Object.entries(e).some(LS(r))&&Object.entries(t).some(LS(r)):t===r:!1}function TS(e,t,r){var n=r.actual,i=r.key,a=r.previous,o=r.type,l=wa(e,i),c=wa(t,i),u=[l,c].every(ke.number)&&(o==="increased"?l<c:l>c);return ke.undefined(n)||(u=u&&c===n),ke.undefined(a)||(u=u&&l===a),u}function MS(e,t,r){var n=r.key,i=r.type,a=r.value,o=wa(e,n),l=wa(t,n),c=i==="added"?o:l,u=i==="added"?l:o;
73if(!ke.nullOrUndefined(a)){if(ke.defined(c)){if(ke.array(c)||ke.plainObject(c))return yae(c,u,a)}else return _s(u,a);return!1}return[o,l].every(ke.array)?!u.every(z3(c)):[o,l].every(ke.plainObject)?vae(Object.keys(c),Object.keys(u)):![o,l].every(function(f){return ke.primitive(f)&&ke.defined(f)})&&(i==="added"?!ke.defined(o)&&ke.defined(l):ke.defined(o)&&!ke.defined(l))}function OS(e,t,r){var n=r===void 0?{}:r,i=n.key,a=wa(e,i),o=wa(t,i);if(!Oz(a,o))throw new TypeError("Inputs have different types");if(!gae(a,o))throw new TypeError("Inputs don't have length");return[a,o].every(ke.plainObject)&&(a=Object.keys(a),o=Object.keys(o)),[a,o]}function LS(e){return function(t){var r=t[0],n=t[1];return ke.array(e)?_s(e,n)||e.some(function(i){return _s(i,n)||ke.array(n)&&z3(n)(i)}):ke.plainObject(e)&&e[r]?!!e[r]&&_s(e[r],n):_s(e,n)}}function vae(e,t){return t.some(function(r){return!e.includes(r)})}function RS(e){return function(t){return ke.array(e)?e.some(function(r){return _s(r,t)||ke.array(t)&&z3(t)(r)}):_s(e,t)}}function mx(e,t){return ke.array(e)?e.some(function(r){return _s(r,t)}):_s(e,t)}function z3(e){return function(t){return e.some(function(r){return _s(r,t)})}}function Oz(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.every(ke.array)||e.every(ke.number)||e.every(ke.plainObject)||e.every(ke.string)}function wa(e,t){if(ke.plainObject(e)||ke.array(e)){if(ke.string(t)){var r=t.split(".");return r.reduce(function(n,i){return n&&n[i]},e)}return ke.number(t)?e[t]:e}return e}function bae(e,t){if([e,t].some(ke.nullOrUndefined))throw new Error("Missing required parameters");if(![e,t].every(function(x){return ke.plainObject(x)||ke.array(x)}))throw new Error("Expected plain objects or array");var r=function(x,m){try{return MS(e,t,{key:x,type:"added",value:m})}catch{return!1}},n=function(x,m,p){try{var y=wa(e,x),v=wa(t,x),b=ke.defined(m),E=ke.defined(p);if(b||E){var N=E?mx(p,y):!mx(m,y),j=mx(m,v);return N&&j}return[y,v].every(ke.array)||[y,v].every(ke.plainObject)?!_s(y,v):y!==v}catch{return!1}},i=function(x,m,p){if(!ke.defined(x))return!1;try{var y=wa(e,x),v=wa(t,x),b=ke.defined(p);return mx(m,y)&&(b?mx(p,v):!b)}catch{return!1}},a=function(x,m){return ke.defined(x)?n(x,m):!1},o=function(x,m,p){if(!ke.defined(x))return!1;try{return TS(e,t,{key:x,actual:m,previous:p,type:"decreased"})}catch{return!1}},l=function(x){try{var m=OS(e,t,{key:x}),p=m[0],y=m[1];return!!p.length&&!y.length}catch{return!1}},c=function(x){try{var m=OS(e,t,{key:x}),p=m[0],y=m[1];return!p.length&&!!y.length}catch{return!1}},u=function(x,m,p){if(!ke.defined(x))return!1;try{return TS(e,t,{key:x,actual:m,previous:p,type:"increased"})}catch{return!1}},f=function(x,m){try{return MS(e,t,{key:x,type:"removed",value:m})}catch{return!1}};return{added:r,changed:n,changedFrom:i,changedTo:a,decreased:o,emptied:l,filled:c,increased:u,removed:f}}function _S(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Rr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_S(Object(r),!0).forEach(function(n){ts(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_S(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ih(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Cae(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,Rz(n.key),n)}}function $h(e,t,r){return t&&Cae(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ts(e,t,r){return t=Rz(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zh(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&&Fw(e,t)}function Lg(e){return Lg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Lg(e)}
73function Fw(e,t){return Fw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Fw(e,t)}function wae(){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 Eae(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function Lz(e,t){if(e==null)return{};var r=Eae(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function eo(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jae(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return eo(e)}function Vh(e){var t=wae();return function(){var n=Lg(e),i;if(t){var a=Lg(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return jae(this,i)}}function Nae(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Rz(e){var t=Nae(e,"string");return typeof t=="symbol"?t:String(t)}var Aae={flip:{padding:20},preventOverflow:{padding:10}},kae="The typeValidator argument must be a function with the signature function(props, propName, componentName).",Sae="The error message is optional, but must be a string if provided.";function Bae(e,t,r,n){return typeof e=="boolean"?e:typeof e=="function"?e(t,r,n):e?!!e:!1}function Dae(e,t){return Object.hasOwnProperty.call(e,t)}function Fae(e,t,r,n){return new Error("Required ".concat(e[t]," `").concat(t,"` was not specified in `").concat(r,"`."))}function Pae(e,t){if(typeof e!="function")throw new TypeError(kae);if(t)throw new TypeError(Sae)}function IS(e,t,r){return Pae(e,r),function(n,i,a){for(var o=arguments.length,l=new Array(o>3?o-3:0),c=3;c<o;c++)l[c-3]=arguments[c];return Bae(t,n,i,a)?Dae(n,i)?e.apply(void 0,[n,i,a].concat(l)):Fae(n,i,a):e.apply(void 0,[n,i,a].concat(l))}}var sr={INIT:"init",IDLE:"idle",OPENING:"opening",OPEN:"open",CLOSING:"closing"},px=Xp.createPortal!==void 0;function ma(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function d2(){return"ontouchstart"in window&&/Mobi/.test(navigator.userAgent)}function mp(e){var t=e.title,r=e.data,n=e.warn,i=n===void 0?!1:n,a=e.debug,o=a===void 0?!1:a,l=i?console.warn||console.error:console.log;o&&t&&r&&(console.groupCollapsed("%creact-floater: ".concat(t),"color: #9b00ff; font-weight: bold; font-size: 12px;"),Array.isArray(r)?r.forEach(function(c){ke.plainObject(c)&&c.key?l.apply(console,[c.key,c.value]):l.apply(console,[c])}):l.apply(console,[r]),console.groupEnd())}function Tae(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;e.addEventListener(t,r,n)}function Mae(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;e.removeEventListener(t,r,n)}function Oae(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i;i=function(o){r(o),Mae(e,t,i)},Tae(e,t,i,n)}function $S(){}var _z=function(e){zh(r,e);var t=Vh(r);function r(){return Ih(this,r),t.apply(this,arguments)}return $h(r,[{key:"componentDidMount",value:function(){ma()&&(this.node||this.appendNode(),px||this.renderPortal())}},{key:"componentDidUpdate",value:function(){ma()&&(px||this.renderPortal())}},{key:"componentWillUnmount",value:function(){!ma()||!this.node||(px||Xp.unmountComponentAtNode(this.node),this.node&&this.node.parentNode===document.body&&(document.body.removeChild(this.node),this.node=void 0))}},{key:"appendNode",value:function(){var i=this.props,a=i.id,o=i.zIndex;this.node||(this.node=document.createElement("div"),a&&(this.node.id=a),o&&(this.node.style.zIndex=o),document.body.appendChild(this.node))}},{key:"renderPortal",value:function(){if(!ma())return null;var i=this.props,a=i.children,o=i.setRef;if(this.node||this.appendNode(),px)return Xp.createPortal(a,this.node);var l=Xp.unstable_renderSubtreeIntoContainer(this,a.length>1?ie.createElement("div",null,a):a[0],this.node);return o(l),null}},{key:"renderReact16",value:function(){var i=this.props,a=i.hasChildren,o=i.placement,l=i.target;return a?this.renderPortal():l||o==="center"?this.renderPortal():null}},{key:"render",value:function(){return px?this.renderReact16():null}}]),r}(ie.Component);ts(_z,"propTypes",{children:Fe.oneOfType([Fe.element,Fe.array]),hasChildren:Fe.bool,id:Fe.oneOfType([Fe.string,Fe.number]),placement:Fe.string,setRef:Fe.func.isRequired,target:Fe.oneOfType([Fe.object,Fe.string]),zIndex:Fe.number});var Iz=function(e){zh(r,e);var t=Vh(r);function r(){return Ih(this,r),t.apply(this,arguments)}return $h(r,[{key:"parentStyle",get:function(){var i=this.props,a=i.placement,o=i.styles,l=o.arrow.length,c={pointerEvents:"none",position:"absolute",width:"100%"};return a.startsWith("top")?(c.bottom=0,c.left=0,c.right=0,c.height=l):a.startsWith("bottom")?(c.left=0,c.right=0,c.top=0,c.height=l):a.startsWith("left")?(c.right=0,c.top=0,c.bottom=0):a.startsWith("right")&&(c.left=0,c.top=0),c}},{key:"render",value:function(){var i=this.props,a=i.placement,o=i.setArrowRef,l=i.styles,c=l.arrow,u=c.color,f=c.display,x=c.length,m=c.margin,p=c.position,y=c.spread,v={display:f,position:p},b,E=y,N=x;return a.startsWith("top")?(b="0,0 ".concat(E/2,",").concat(N," ").concat(E,",0"),v.bottom=0,v.marginLeft=m,v.marginRight=m):a.startsWith("bottom")?(b="".concat(E,",").concat(N," ").concat(E/2,",0 0,").concat(N),v.top=0,v.marginLeft=m,v.marginRight=m):a.startsWith("left")?(N=y,E=x,b="0,0 ".concat(E,",").concat(N/2," 0,").concat(N),v.right=0,v.marginTop=m,v.marginBottom=m):a.startsWith("right")&&(N=y,E=x,b="".concat(E,",").concat(N," ").concat(E,",0 0,").concat(N/2),v.left=0,v.marginTop=m,v.marginBottom=m),ie.createElement("div",{className:"__floater__arrow",style:this.parentStyle},ie.createElement("span",{ref:o,style:v},ie.createElement("svg",{width:E,height:N,version:"1.1",xmlns:"http://www.w3.org/2000/svg"},ie.createElement("polygon",{points:b,fill:u}))))}}]),r}(ie.Component);ts(Iz,"propTypes",{placement:Fe.string.isRequired,setArrowRef:Fe.func.isRequired,styles:Fe.object.isRequired});var Lae=["color","height","width"];function $z(e){var t=e.handleClick,r=e.styles,n=r.color,i=r.height,a=r.width,o=Lz(r,Lae);return ie.createElement("button",{"aria-label":"close",onClick:t,style:o,type:"button"},ie.createElement("svg",{width:"".concat(a,"px"),height:"".concat(i,"px"),viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},ie.createElement("g",null,ie.createElement("path",{d:"M8.13911129,9.00268191 L0.171521827,17.0258467 C-0.0498027049,17.248715 -0.0498027049,17.6098394 0.171521827,17.8327545 C0.28204354,17.9443526 0.427188206,17.9998706 0.572051765,17.9998706 C0.71714958,17.9998706 0.862013139,17.9443526 0.972581703,17.8327545 L9.0000937,9.74924618 L17.0276057,17.8327545 C17.1384085,17.9443526 17.2832721,17.9998706 17.4281356,17.9998706 C17.5729992,17.9998706 17.718097,17.9443526 17.8286656,17.8327545 C18.0499901,17.6098862 18.0499901,17.2487618 17.8286656,17.0258467 L9.86135722,9.00268191 L17.8340066,0.973848225 C18.0553311,0.750979934 18.0553311,0.389855532 17.8340066,0.16694039 C17.6126821,-0.0556467968 17.254037,-0.0556467968 17.0329467,0.16694039 L9.00042166,8.25611765 L0.967006424,0.167268345 C0.745681892,-0.0553188426 0.387317931,-0.0553188426 0.165993399,0.167268345 C-0.0553311331,0.390136635 -0.0553311331,0.751261038 0.165993399,0.974176179 L8.13920499,9.00268191 L8.13911129,9.00268191 Z",fill:n}))))}
73$z.propTypes={handleClick:Fe.func.isRequired,styles:Fe.object.isRequired};function zz(e){var t=e.content,r=e.footer,n=e.handleClick,i=e.open,a=e.positionWrapper,o=e.showCloseButton,l=e.title,c=e.styles,u={content:ie.isValidElement(t)?t:ie.createElement("div",{className:"__floater__content",style:c.content},t)};return l&&(u.title=ie.isValidElement(l)?l:ie.createElement("div",{className:"__floater__title",style:c.title},l)),r&&(u.footer=ie.isValidElement(r)?r:ie.createElement("div",{className:"__floater__footer",style:c.footer},r)),(o||a)&&!ke.boolean(i)&&(u.close=ie.createElement($z,{styles:c.close,handleClick:n})),ie.createElement("div",{className:"__floater__container",style:c.container},u.close,u.title,u.content,u.footer)}zz.propTypes={content:Fe.node.isRequired,footer:Fe.node,handleClick:Fe.func.isRequired,open:Fe.bool,positionWrapper:Fe.bool.isRequired,showCloseButton:Fe.bool.isRequired,styles:Fe.object.isRequired,title:Fe.node};var Vz=function(e){zh(r,e);var t=Vh(r);function r(){return Ih(this,r),t.apply(this,arguments)}return $h(r,[{key:"style",get:function(){var i=this.props,a=i.disableAnimation,o=i.component,l=i.placement,c=i.hideArrow,u=i.status,f=i.styles,x=f.arrow.length,m=f.floater,p=f.floaterCentered,y=f.floaterClosing,v=f.floaterOpening,b=f.floaterWithAnimation,E=f.floaterWithComponent,N={};return c||(l.startsWith("top")?N.padding="0 0 ".concat(x,"px"):l.startsWith("bottom")?N.padding="".concat(x,"px 0 0"):l.startsWith("left")?N.padding="0 ".concat(x,"px 0 0"):l.startsWith("right")&&(N.padding="0 0 0 ".concat(x,"px"))),[sr.OPENING,sr.OPEN].indexOf(u)!==-1&&(N=Rr(Rr({},N),v)),u===sr.CLOSING&&(N=Rr(Rr({},N),y)),u===sr.OPEN&&!a&&(N=Rr(Rr({},N),b)),l==="center"&&(N=Rr(Rr({},N),p)),o&&(N=Rr(Rr({},N),E)),Rr(Rr({},m),N)}},{key:"render",value:function(){var i=this.props,a=i.component,o=i.handleClick,l=i.hideArrow,c=i.setFloaterRef,u=i.status,f={},x=["__floater"];return a?ie.isValidElement(a)?f.content=ie.cloneElement(a,{closeFn:o}):f.content=a({closeFn:o}):f.content=ie.createElement(zz,this.props),u===sr.OPEN&&x.push("__floater__open"),l||(f.arrow=ie.createElement(Iz,this.props)),ie.createElement("div",{ref:c,className:x.join(" "),style:this.style},ie.createElement("div",{className:"__floater__body"},f.content,f.arrow))}}]),r}(ie.Component);ts(Vz,"propTypes",{component:Fe.oneOfType([Fe.func,Fe.element]),content:Fe.node,disableAnimation:Fe.bool.isRequired,footer:Fe.node,handleClick:Fe.func.isRequired,hideArrow:Fe.bool.isRequired,open:Fe.bool,placement:Fe.string.isRequired,positionWrapper:Fe.bool.isRequired,setArrowRef:Fe.func.isRequired,setFloaterRef:Fe.func.isRequired,showCloseButton:Fe.bool,status:Fe.string.isRequired,styles:Fe.object.isRequired,title:Fe.node});var Uz=function(e){zh(r,e);var t=Vh(r);function r(){return Ih(this,r),t.apply(this,arguments)}return $h(r,[{key:"render",value:function(){var i=this.props,a=i.children,o=i.handleClick,l=i.handleMouseEnter,c=i.handleMouseLeave,u=i.setChildRef,f=i.setWrapperRef,x=i.style,m=i.styles,p;if(a)if(ie.Children.count(a)===1)if(!ie.isValidElement(a))p=ie.createElement("span",null,a);else{var y=ke.function(a.type)?"innerRef":"ref";p=ie.cloneElement(ie.Children.only(a),ts({},y,u))}else p=a;return p?ie.createElement("span",{ref:f,style:Rr(Rr({},m),x),onClick:o,onMouseEnter:l,onMouseLeave:c},p):null}}]),r}(ie.Component);ts(Uz,"propTypes",{children:Fe.node,handleClick:Fe.func.isRequired,handleMouseEnter:Fe.func.isRequired,handleMouseLeave:Fe.func.isRequired,setChildRef:Fe.func.isRequired,setWrapperRef:Fe.func.isRequired,style:Fe.object,styles:Fe.object.isRequired});var Rae={zIndex:100};function _ae(e){var t=Ki(Rae,e.options||{});return{wrapper:{cursor:"help",display:"inline-flex",flexDirection:"column",zIndex:t.zIndex},wrapperPosition:{left:-1e3,position:"absolute",top:-1e3,visibility:"hidden"},floater:{display:"inline-block",filter:"drop-shadow(0 0 3px rgba(0, 0, 0, 0.3))",maxWidth:300,opacity:0,position:"relative",transition:"opacity 0.3s",visibility:"hidden",zIndex:t.zIndex},floaterOpening:{opacity:1,visibility:"visible"},floaterWithAnimation:{opacity:1,transition:"opacity 0.3s, transform 0.2s",visibility:"visible"},floaterWithComponent:{maxWidth:"100%"},floaterClosing:{opacity:0,visibility:"visible"},floaterCentered:{left:"50%",position:"fixed",top:"50%",transform:"translate(-50%, -50%)"},container:{backgroundColor:"#fff",color:"#666",minHeight:60,minWidth:200,padding:20,position:"relative",zIndex:10},title:{borderBottom:"1px solid #555",color:"#555",fontSize:18,marginBottom:5,paddingBottom:6,paddingRight:18},content:{fontSize:15},close:{backgroundColor:"transparent",border:0,borderRadius:0,color:"#555",fontSize:0,height:15,outline:"none",padding:10,position:"absolute",right:0,top:0,width:15,WebkitAppearance:"none"},footer:{borderTop:"1px solid #ccc",fontSize:13,marginTop:10,paddingTop:5},arrow:{color:"#fff",display:"inline-flex",length:16,margin:8,position:"absolute",spread:32},options:t}}var Iae=["arrow","flip","offset"],$ae=["position","top","right","bottom","left"],V3=function(e){zh(r,e);var t=Vh(r);function r(n){var i;return Ih(this,r),i=t.call(this,n),ts(eo(i),"setArrowRef",function(a){i.arrowRef=a}),ts(eo(i),"setChildRef",function(a){i.childRef=a}),ts(eo(i),"setFloaterRef",function(a){i.floaterRef=a}),ts(eo(i),"setWrapperRef",function(a){i.wrapperRef=a}),ts(eo(i),"handleTransitionEnd",function(){var a=i.state.status,o=i.props.callback;
73i.wrapperPopper&&i.wrapperPopper.instance.update(),i.setState({status:a===sr.OPENING?sr.OPEN:sr.IDLE},function(){var l=i.state.status;o(l===sr.OPEN?"open":"close",i.props)})}),ts(eo(i),"handleClick",function(){var a=i.props,o=a.event,l=a.open;if(!ke.boolean(l)){var c=i.state,u=c.positionWrapper,f=c.status;(i.event==="click"||i.event==="hover"&&u)&&(mp({title:"click",data:[{event:o,status:f===sr.OPEN?"closing":"opening"}],debug:i.debug}),i.toggle())}}),ts(eo(i),"handleMouseEnter",function(){var a=i.props,o=a.event,l=a.open;if(!(ke.boolean(l)||d2())){var c=i.state.status;i.event==="hover"&&c===sr.IDLE&&(mp({title:"mouseEnter",data:[{key:"originalEvent",value:o}],debug:i.debug}),clearTimeout(i.eventDelayTimeout),i.toggle())}}),ts(eo(i),"handleMouseLeave",function(){var a=i.props,o=a.event,l=a.eventDelay,c=a.open;if(!(ke.boolean(c)||d2())){var u=i.state,f=u.status,x=u.positionWrapper;i.event==="hover"&&(mp({title:"mouseLeave",data:[{key:"originalEvent",value:o}],debug:i.debug}),l?[sr.OPENING,sr.OPEN].indexOf(f)!==-1&&!x&&!i.eventDelayTimeout&&(i.eventDelayTimeout=setTimeout(function(){delete i.eventDelayTimeout,i.toggle()},l*1e3)):i.toggle(sr.IDLE))}}),i.state={currentPlacement:n.placement,needsUpdate:!1,positionWrapper:n.wrapperOptions.position&&!!n.target,status:sr.INIT,statusWrapper:sr.INIT},i._isMounted=!1,i.hasMounted=!1,ma()&&window.addEventListener("load",function(){i.popper&&i.popper.instance.update(),i.wrapperPopper&&i.wrapperPopper.instance.update()}),i}return $h(r,[{key:"componentDidMount",value:function(){if(ma()){var i=this.state.positionWrapper,a=this.props,o=a.children,l=a.open,c=a.target;this._isMounted=!0,mp({title:"init",data:{hasChildren:!!o,hasTarget:!!c,isControlled:ke.boolean(l),positionWrapper:i,target:this.target,floater:this.floaterRef},debug:this.debug}),this.hasMounted||(this.initPopper(),this.hasMounted=!0),!o&&c&&ke.boolean(l)}}},{key:"componentDidUpdate",value:function(i,a){if(ma()){var o=this.props,l=o.autoOpen,c=o.open,u=o.target,f=o.wrapperOptions,x=bae(a,this.state),m=x.changedFrom,p=x.changed;if(i.open!==c){var y;ke.boolean(c)&&(y=c?sr.OPENING:sr.CLOSING),this.toggle(y)}(i.wrapperOptions.position!==f.position||i.target!==u)&&this.changeWrapperPosition(this.props),p("status",sr.IDLE)&&c?this.toggle(sr.OPEN):m("status",sr.INIT,sr.IDLE)&&l&&this.toggle(sr.OPEN),this.popper&&p("status",sr.OPENING)&&this.popper.instance.update(),this.floaterRef&&(p("status",sr.OPENING)||p("status",sr.CLOSING))&&Oae(this.floaterRef,"transitionend",this.handleTransitionEnd),p("needsUpdate",!0)&&this.rebuildPopper()}}},{key:"componentWillUnmount",value:function(){ma()&&(this._isMounted=!1,this.popper&&this.popper.instance.destroy(),this.wrapperPopper&&this.wrapperPopper.instance.destroy())}},{key:"initPopper",value:function(){var i=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.target,o=this.state.positionWrapper,l=this.props,c=l.disableFlip,u=l.getPopper,f=l.hideArrow,x=l.offset,m=l.placement,p=l.wrapperOptions,y=m==="top"||m==="bottom"?"flip":["right","bottom-end","top-end","left","top-start","bottom-start"];if(m==="center")this.setState({status:sr.IDLE});else if(a&&this.floaterRef){var v=this.options,b=v.arrow,E=v.flip,N=v.offset,j=Lz(v,Iae);new Nf(a,this.floaterRef,{placement:m,modifiers:Rr({arrow:Rr({enabled:!f,element:this.arrowRef},b),flip:Rr({enabled:!c,behavior:y},E),offset:Rr({offset:"0, ".concat(x,"px")},N)},j),onCreate:function(S){var B;if(i.popper=S,!((B=i.floaterRef)!==null&&B!==void 0&&B.isConnected)){i.setState({needsUpdate:!0});return}u(S,"floater"),i._isMounted&&i.setState({currentPlacement:S.placement,status:sr.IDLE}),m!==S.placement&&setTimeout(function(){S.instance.update()},1)},onUpdate:function(S){i.popper=S;var B=i.state.currentPlacement;i._isMounted&&S.placement!==B&&i.setState({currentPlacement:S.placement})}})}if(o){var A=ke.undefined(p.offset)?0:p.offset;new Nf(this.target,this.wrapperRef,{placement:p.placement||m,modifiers:{arrow:{enabled:!1},offset:{offset:"0, ".concat(A,"px")},flip:{enabled:!1}},onCreate:function(S){i.wrapperPopper=S,i._isMounted&&i.setState({statusWrapper:sr.IDLE}),u(S,"wrapper"),m!==S.placement&&setTimeout(function(){S.instance.update(
73)},1)}})}}},{key:"rebuildPopper",value:function(){var i=this;this.floaterRefInterval=setInterval(function(){var a;(a=i.floaterRef)!==null&&a!==void 0&&a.isConnected&&(clearInterval(i.floaterRefInterval),i.setState({needsUpdate:!1}),i.initPopper())},50)}},{key:"changeWrapperPosition",value:function(i){var a=i.target,o=i.wrapperOptions;this.setState({positionWrapper:o.position&&!!a})}},{key:"toggle",value:function(i){var a=this.state.status,o=a===sr.OPEN?sr.CLOSING:sr.OPENING;ke.undefined(i)||(o=i),this.setState({status:o})}},{key:"debug",get:function(){var i=this.props.debug;return i||ma()&&"ReactFloaterDebug"in window&&!!window.ReactFloaterDebug}},{key:"event",get:function(){var i=this.props,a=i.disableHoverToClick,o=i.event;return o==="hover"&&d2()&&!a?"click":o}},{key:"options",get:function(){var i=this.props.options;return Ki(Aae,i||{})}},{key:"styles",get:function(){var i=this,a=this.state,o=a.status,l=a.positionWrapper,c=a.statusWrapper,u=this.props.styles,f=Ki(_ae(u),u);if(l){var x;[sr.IDLE].indexOf(o)===-1||[sr.IDLE].indexOf(c)===-1?x=f.wrapperPosition:x=this.wrapperPopper.styles,f.wrapper=Rr(Rr({},f.wrapper),x)}if(this.target){var m=window.getComputedStyle(this.target);this.wrapperStyles?f.wrapper=Rr(Rr({},f.wrapper),this.wrapperStyles):["relative","static"].indexOf(m.position)===-1&&(this.wrapperStyles={},l||($ae.forEach(function(p){i.wrapperStyles[p]=m[p]}),f.wrapper=Rr(Rr({},f.wrapper),this.wrapperStyles),this.target.style.position="relative",this.target.style.top="auto",this.target.style.right="auto",this.target.style.bottom="auto",this.target.style.left="auto"))}return f}},{key:"target",get:function(){if(!ma())return null;var i=this.props.target;return i?ke.domElement(i)?i:document.querySelector(i):this.childRef||this.wrapperRef}},{key:"render",value:function(){var i=this.state,a=i.currentPlacement,o=i.positionWrapper,l=i.status,c=this.props,u=c.children,f=c.component,x=c.content,m=c.disableAnimation,p=c.footer,y=c.hideArrow,v=c.id,b=c.open,E=c.showCloseButton,N=c.style,j=c.target,A=c.title,w=ie.createElement(Uz,{handleClick:this.handleClick,handleMouseEnter:this.handleMouseEnter,handleMouseLeave:this.handleMouseLeave,setChildRef:this.setChildRef,setWrapperRef:this.setWrapperRef,style:N,styles:this.styles.wrapper},u),S={};return o?S.wrapperInPortal=w:S.wrapperAsChildren=w,ie.createElement("span",null,ie.createElement(_z,{hasChildren:!!u,id:v,placement:a,setRef:this.setFloaterRef,target:j,zIndex:this.styles.options.zIndex},ie.createElement(Vz,{component:f,content:x,disableAnimation:m,footer:p,handleClick:this.handleClick,hideArrow:y||a==="center",open:b,placement:a,positionWrapper:o,setArrowRef:this.setArrowRef,setFloaterRef:this.setFloaterRef,showCloseButton:E,status:l,styles:this.styles,title:A}),S.wrapperInPortal),S.wrapperAsChildren)}}]),r}(ie.Component);ts(V3,"propTypes",{autoOpen:Fe.bool,callback:Fe.func,children:Fe.node,component:IS(Fe.oneOfType([Fe.func,Fe.element]),function(e){return!e.content}),content:IS(Fe.node,function(e){return!e.component}),debug:Fe.bool,disableAnimation:Fe.bool,disableFlip:Fe.bool,disableHoverToClick:Fe.bool,event:Fe.oneOf(["hover","click"]),eventDelay:Fe.number,footer:Fe.node,getPopper:Fe.func,hideArrow:Fe.bool,id:Fe.oneOfType([Fe.string,Fe.number]),offset:Fe.number,open:Fe.bool,options:Fe.object,placement:Fe.oneOf(["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end","auto","center"]),showCloseButton:Fe.bool,style:Fe.object,styles:Fe.object,target:Fe.oneOfType([Fe.object,Fe.string]),title:Fe.node,wrapperOptions:Fe.shape({offset:Fe.number,placement:Fe.oneOf(["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end","auto"]),position:Fe.bool})});ts(V3,"defaultProps",{autoOpen:!1,callback:$S,debug:!1,disableAnimation:!1,disableFlip:!1,disableHoverToClick:!1,event:"click",eventDelay:.4,getPopper:$S,hideArrow:!1,offset:15,placement:"bottom",showCloseButton:!1,styles:{},target:null,wrapperOptions:{position:!1}});var zae=Object.defineProperty,Vae=(e,t,r)=>t in e?zae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,it=(e,t,r)=>Vae(e,typeof t!="symbol"?t+"":t,r),pr={INIT:"init",START:"start",STOP:"stop",RESET:"reset",PREV:"prev",NEXT:"next",GO:"go",CLOSE:"close",SKIP:"skip",UPDATE:"update"},Hi={TOUR_START:"tour:start",STEP_BEFORE:"step:before",BEACON:"beacon",TOOLTIP:"tooltip",STEP_AFTER:"step:after",TOUR_END:"tour:end",TOUR_STATUS:"tour:status",TARGET_NOT_FOUND:"error:target_not_found"},_t={INIT:"init",READY:"ready",BEACON:"beacon",TOOLTIP:"tooltip",COMPLETE:"complete",ERROR:"error"},Ht={IDLE:"idle",READY:"ready",WAITING:"waiting",RUNNING:"running",PAUSED:"paused",SKIPPED:"skipped",FINISHED:"finished"};function sl(){var e;return!!(typeof window<"u"&&((e=window.document)!=null&&e.createElement))}function qz(e){return e?e.getBoundingClientRect():null}function Uae(e=!1){const{body:t,documentElement:r}=document;if(!t||!r)return 0;if(e){const n=[t.scrollHeight,t.offsetHeight,r.clientHeight,r.scrollHeight,r.offsetHeight].sort((a,o)=>a-o),i=Math.floor(n.length/2);return n.length%2===0?(n[i-1]+n[i])/2:n[i]}return Math.max(t.scrollHeight,t.offsetHeight,r.clientHeight,r.scrollHeight,r.offsetHeight)}function so(e){if(typeof e=="string")try{return document.querySelector(e)}catch{return null}return e}function qae(e){return!e||e.nodeType!==1?null:getComputedStyle(e)}function Af(e,t,r){if(!e)return fc();const n=yz(e);if(n){if(n.isSameNode(fc()))return r?document:fc();if(!(n.scrollHeight>n.offsetHeight)&&!t)return n.style.overflow="initial",fc()}return n}function py(e,t){if(!e)return!1;const r=Af(e,t);return r?!r.isSameNode(fc()):!1}function Wae(e){return e.offsetParent!==document.body}function Pd(e,t="fixed"){if(!e||!(e instanceof HTMLElement))return!1;const{nodeName:r}=e,n=qae(e);return r==="BODY"||r==="HTML"?!1:n&&n.position===t?!0:e.parentNode?Pd(e.parentNode,t):!1}function Hae(e){var t;if(!e)return!1;let r=e;for(;r&&r!==document.body;){if(r instanceof HTMLElement){const{display:n,visibility:i}=getComputedStyle(r);if(n==="none"||i==="hidden")return!1}r=(t=r.parentElement)!=null?t:null}return!0}function Gae(e,t,r){var n,i,a;const o=qz(e),l=Af(e,r),c=py(e,r),u=Pd(e);let f=0,x=(n=o==null?void 0:o.top)!=null?n:0;
73if(c&&u){const m=(i=e==null?void 0:e.offsetTop)!=null?i:0,p=(a=l==null?void 0:l.scrollTop)!=null?a:0;x=m-p}else l instanceof HTMLElement&&(f=l.scrollTop,!c&&!Pd(e)&&(x+=f),l.isSameNode(fc())||(x+=fc().scrollTop));return Math.floor(x-t)}function Kae(e,t,r){var n;if(!e)return 0;const{offsetTop:i=0,scrollTop:a=0}=(n=yz(e))!=null?n:{};let o=e.getBoundingClientRect().top+a;i&&(py(e,r)||Wae(e))&&(o-=i);const l=Math.floor(o-t);return l<0?0:l}function fc(){var e;return(e=document.scrollingElement)!=null?e:document.documentElement}function Xae(e,t){const{duration:r,element:n}=t;return new Promise((i,a)=>{const{scrollTop:o}=n,l=e>o?e-o:o-e;uie.top(n,e,{duration:l<100?50:r},c=>c&&c.message!=="Element already at target scroll position"?a(c):i())})}var gx=Ux.createPortal!==void 0;function Wz(e=navigator.userAgent){let t=e;return typeof window>"u"?t="node":document.documentMode?t="ie":/Edge/.test(e)?t="edge":window.opera||e.includes(" OPR/")?t="opera":typeof window.InstallTrigger<"u"?t="firefox":window.chrome?t="chrome":/(Version\/([\d._]+).*Safari|CriOS|FxiOS| Mobile\/)/.test(e)&&(t="safari"),t}function ig(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function pa(e,t={}){const{defaultValue:r,step:n,steps:i}=t;let a=CS(e);if(a)(a.includes("{step}")||a.includes("{steps}"))&&n&&i&&(a=a.replace("{step}",n.toString()).replace("{steps}",i.toString()));else if(C.isValidElement(e)&&!Object.values(e.props).length&&ig(e.type)==="function"){const o=e.type({});a=pa(o,t)}else a=CS(r);return a}function Yae(e,t){return!st.plainObject(e)||!st.array(t)?!1:Object.keys(e).every(r=>t.includes(r))}function Qae(e){const t=/^#?([\da-f])([\da-f])([\da-f])$/i,r=e.replace(t,(i,a,o,l)=>a+a+o+o+l+l),n=/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i.exec(r);return n?[parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)]:[]}function zS(e){return e.disableBeacon||e.placement==="center"}function VS(){return!["chrome","safari","firefox","opera"].includes(Wz())}function Hc({data:e,debug:t=!1,title:r,warn:n=!1}){const i=n?console.warn||console.error:console.log;t&&(r&&e?(console.groupCollapsed(`%creact-joyride: ${r}`,"color: #ff0044; font-weight: bold; font-size: 12px;"),Array.isArray(e)?e.forEach(a=>{st.plainObject(a)&&a.key?i.apply(console,[a.key,a.value]):i.apply(console,[a])}):i.apply(console,[e]),console.groupEnd()):console.error("Missing title or data props"))}function Zae(e){return Object.keys(e)}function Hz(e,...t){if(!st.plainObject(e))throw new TypeError("Expected an object");const r={};for(const n in e)({}).hasOwnProperty.call(e,n)&&(t.includes(n)||(r[n]=e[n]));return r}function Jae(e,...t){if(!st.plainObject(e))throw new TypeError("Expected an object");if(!t.length)return e;const r={};for(const n in e)({}).hasOwnProperty.call(e,n)&&t.includes(n)&&(r[n]=e[n]);return r}function Pw(e,t,r){const n=a=>a.replace("{step}",String(t)).replace("{steps}",String(r));if(ig(e)==="string")return n(e);if(!C.isValidElement(e))return e;const{children:i}=e.props;if(ig(i)==="string"&&i.includes("{step}"))return C.cloneElement(e,{children:n(i)});if(Array.isArray(i))return C.cloneElement(e,{children:i.map(a=>typeof a=="string"?n(a):Pw(a,t,r))});if(ig(e.type)==="function"&&!Object.values(e.props).length){const a=e.type({});return Pw(a,t,r)}return e}function eoe(e){const{isFirstStep:t,lifecycle:r,previousLifecycle:n,scrollToFirstStep:i,step:a,target:o}=e;return!a.disableScrolling&&(!t||i||r===_t.TOOLTIP)&&a.placement!=="center"&&(!a.isFixed||!Pd(o))&&n!==r&&[_t.BEACON,_t.TOOLTIP].includes(r)}var toe={options:{preventOverflow:{boundariesElement:"scrollParent"}},wrapperOptions:{offset:-18,position:!0}},Gz={back:"Back",close:"Close",last:"Last",next:"Next",nextLabelWithProgress:"Next (Step {step} of {steps})",open:"Open the dialog",skip:"Skip"},roe={event:"click",placement:"bottom",offset:10,disableBeacon:!1,disableCloseOnEsc:!1,disableOverlay:!1,disableOverlayClose:!1,disableScrollParentFix:!1,disableScrolling:!1,hideBackButton:!1,hideCloseButton:!1,hideFooter:!1,isFixed:!1,locale:Gz,showProgress:!1,showSkipButton:!1,spotlightClicks:!1,spotlightPadding:10},noe={continuous:!1,debug:!1,disableCloseOnEsc:!1,disableOverlay:!1,disableOverlayClose:!1,disableScrolling:!1,disableScrollParentFix:!1,getHelpers:void 0,hideBackButton:!1,run:!0,scrollOffset:20,scrollDuration:300,scrollToFirstStep:!1,showSkipButton:!1,showProgress:!1,spotlightClicks:!1,spotlightPadding:10,steps:[]},soe={arrowColor:"#fff",backgroundColor:"#fff",beaconSize:36,overlayColor:"rgba(0, 0, 0, 0.5)",primaryColor:"#f04",spotlightShadow:"0 0 15px rgba(0, 0, 0, 0.5)",textColor:"#333",width:380,zIndex:100},yx={backgroundColor:"transparent",border:0,borderRadius:0,color:"#555",cursor:"pointer",fontSize:16,lineHeight:1,padding:8,WebkitAppearance:"none"},US={borderRadius:4,position:"absolute"};function ioe(e,t){var r,n,i,a,o;const{floaterProps:l,styles:c}=e,u=Ki((r=t.floaterProps)!=null?r:{},l??{}),f=Ki(c??{},(n=t.styles)!=null?n:{}),x=Ki(soe,f.options||{}),m=t.placement==="center"||t.disableBeacon;let{width:p}=x;window.innerWidth>480&&(p=380),"width"in x&&(p=typeof x.width=="number"&&window.innerWidth<x.width?window.innerWidth-30:x.width);const y={bottom:0,left:0,overflow:"hidden",position:"absolute",right:0,top:0,zIndex:x.zIndex},v={beacon:{...yx,display:m?"none":"inline-block",height:x.beaconSize,position:"relative",width:x.beaconSize,zIndex:x.zIndex},beaconInner:{animation:"joyride-beacon-inner 1.2s infinite ease-in-out",backgroundColor:x.primaryColor,borderRadius:"50%",display:"block",height:"50%",left:"50%",opacity:.7,position:"absolute",top:"50%",transform:"translate(-50%, -50%)",width:"50%"},beaconOuter:{animation:"joyride-beacon-outer 1.2s infinite ease-in-out",backgroundColor:`rgba(${Qae(x.primaryColor).join(",")}, 0.2)`,border:`2px solid ${x.primaryColor}`,borderRadius:"50%",boxSizing:"border-box",display:"block",height:"100%",left:0,opacity:.9,position:"absolute",top:0,transformOrigin:"center",width:"100%"},tooltip:{backgroundColor:x.backgroundColor,borderRadius:5,boxSizing:"border-box",color:x.textColor,fontSize:16,maxWidth:"100%",padding:15,position:"relative",width:p},tooltipContainer:{lineHeight:1.4,textAlign:"center"},tooltipTitle:{fontSize:18,margin:0},tooltipContent:{padding:"20px 10px"},tooltipFooter:{alignItems:"center",display:"flex",justifyContent:"flex-end",marginTop:15},tooltipFooterSpacer:{flex:1},buttonNext:{...yx,backgroundColor:x.primaryColor,borderRadius:4,color:"#fff"},buttonBack:{...yx,color:x.primaryColor,marginLeft:"auto",marginRight:5},buttonClose:{...yx,color:x.textColor,height:14,padding:15,position:"absolute",right:0,top:0,width:14},buttonSkip:{...yx,color:x.textColor,fontSize:14},overlay:{...y,backgroundColor:x.overlayColor,mixBlendMode:"hard-light"},overlayLegacy:{...y},overlayLegacyCenter:{...y,backgroundColor:x.overlayColor},spotlight:{...US,backgroundColor:"gray"},spotlightLegacy:{...US,boxShadow:`0 0 0 9999px ${x.overlayColor}, ${x.spotlightShadow}`},floaterStyles:{arrow:{color:(o=(a=(i=u==null?void 0:u.styles)==null?void 0:i.arrow)==null?void 0:a.color)!=null?o:x.arrowColor},options:{zIndex:x.zIndex+100}},options:x};return Ki(v,f)}function aoe(e){return Jae(e,"beaconComponent","disableCloseOnEsc","disableOverlay","disableOverlayClose","disableScrolling","disableScrollParentFix","floaterProps","hideBackButton","hideCloseButton","locale","showProgress","showSkipButton","spotlightClicks","spotlightPadding","styles","tooltipComponent")}function Mu(e,t){var r,n,i,a,o,l;const c=t??{},u=Ki.all([roe,aoe(e),c],{isMergeableObject:st.plainObject}),f=ioe(e,u),x=py(so(u.target),u.disableScrollParentFix),m=Ki.all([toe,(r=e.floaterProps)!=null?r:{},(n=u.floaterProps)!=null?n:{}]);return m.offset=u.offset,m.styles=Ki((i=m.styles)!=null?i:{},f.floaterStyles),m.offset+=(o=(a=e.spotlightPadding)!=null?a:u.spotlightPadding)!=null?o:0,u.placementBeacon&&m.wrapperOptions&&(m.wrapperOptions.placement=u.placementBeacon),x&&m.options.preventOverflow&&(m.options.preventOverflow.boundariesElement="window"),{...u,locale:Ki.all([Gz,(l=e.locale)!=null?l:{},u.locale||{}]),floaterProps:m,styles:Hz(f,"floaterStyles")}}function Kz(e,t=!1){return st.plainObject(e)?e.target?!0:(Hc({title:"validateStep",data:"target is missing from the step",warn:!0,debug:t}),!1):(Hc({title:"validateStep",data:"step must be an object",warn:!0,debug:t}),!1)}function qS(e,t=!1){return st.array(e)?e.every(r=>Kz(r,t)):(Hc({title:"validateSteps",data:"steps must be an array",warn:!0,debug:t}),!1)}var Xz={action:"init",controlled:!1,index:0,lifecycle:_t.INIT,origin:null,size:0,status:Ht.IDLE},WS=Zae(Hz(Xz,"controlled","size")),ooe=class{constructor(e){it(this,"beaconPopper"),it(this,"tooltipPopper"),it(this,"data",new Map),it(this,"listener"),it(this,"store",new Map),it(this,"addListener",i=>{this.listener=i}),it(this,"setSteps",i=>{const{size:a,status:o}=this.getState(),l={size:i.length,status:o};this.data.set("steps",i),o===Ht.WAITING&&!a&&i.length&&(l.status=Ht.RUNNING),this.setState(l)}),it(this,"getPopper",i=>i==="beacon"?this.beaconPopper:this.tooltipPopper),it(this,"setPopper",(i,a)=>{i==="beacon"?this.beaconPopper=a:this.tooltipPopper=a}),it(this,"cleanupPoppers",()=>{this.beaconPopper=null,this.tooltipPopper=null}),it(this,"close",(i=null)=>{const{index:a,status:o}=this.getState();o===Ht.RUNNING&&this.setState({...this.getNextState({action:pr.CLOSE,index:a+1,origin:i})})}
73),it(this,"go",i=>{const{controlled:a,status:o}=this.getState();if(a||o!==Ht.RUNNING)return;const l=this.getSteps()[i];this.setState({...this.getNextState({action:pr.GO,index:i}),status:l?o:Ht.FINISHED})}),it(this,"info",()=>this.getState()),it(this,"next",()=>{const{index:i,status:a}=this.getState();a===Ht.RUNNING&&this.setState(this.getNextState({action:pr.NEXT,index:i+1}))}),it(this,"open",()=>{const{status:i}=this.getState();i===Ht.RUNNING&&this.setState({...this.getNextState({action:pr.UPDATE,lifecycle:_t.TOOLTIP})})}),it(this,"prev",()=>{const{index:i,status:a}=this.getState();a===Ht.RUNNING&&this.setState({...this.getNextState({action:pr.PREV,index:i-1})})}),it(this,"reset",(i=!1)=>{const{controlled:a}=this.getState();a||this.setState({...this.getNextState({action:pr.RESET,index:0}),status:i?Ht.RUNNING:Ht.READY})}),it(this,"skip",()=>{const{status:i}=this.getState();i===Ht.RUNNING&&this.setState({action:pr.SKIP,lifecycle:_t.INIT,status:Ht.SKIPPED})}),it(this,"start",i=>{const{index:a,size:o}=this.getState();this.setState({...this.getNextState({action:pr.START,index:st.number(i)?i:a},!0),status:o?Ht.RUNNING:Ht.WAITING})}),it(this,"stop",(i=!1)=>{const{index:a,status:o}=this.getState();[Ht.FINISHED,Ht.SKIPPED].includes(o)||this.setState({...this.getNextState({action:pr.STOP,index:a+(i?1:0)}),status:Ht.PAUSED})}),it(this,"update",i=>{var a,o;if(!Yae(i,WS))throw new Error(`State is not valid. Valid keys: ${WS.join(", ")}`);this.setState({...this.getNextState({...this.getState(),...i,action:(a=i.action)!=null?a:pr.UPDATE,origin:(o=i.origin)!=null?o:null},!0)})});const{continuous:t=!1,stepIndex:r,steps:n=[]}=e??{};this.setState({action:pr.INIT,controlled:st.number(r),continuous:t,index:st.number(r)?r:0,lifecycle:_t.INIT,origin:null,status:n.length?Ht.READY:Ht.IDLE},!0),this.beaconPopper=null,this.tooltipPopper=null,this.listener=null,this.setSteps(n)}getState(){return this.store.size?{action:this.store.get("action")||"",controlled:this.store.get("controlled")||!1,index:parseInt(this.store.get("index"),10),lifecycle:this.store.get("lifecycle")||"",origin:this.store.get("origin")||null,size:this.store.get("size")||0,status:this.store.get("status")||""}:{...Xz}}getNextState(e,t=!1){var r,n,i,a,o;const{action:l,controlled:c,index:u,size:f,status:x}=this.getState(),m=st.number(e.index)?e.index:u,p=c&&!t?u:Math.min(Math.max(m,0),f);return{action:(r=e.action)!=null?r:l,controlled:c,index:p,lifecycle:(n=e.lifecycle)!=null?n:_t.INIT,origin:(i=e.origin)!=null?i:null,size:(a=e.size)!=null?a:f,status:p===f?Ht.FINISHED:(o=e.status)!=null?o:x}}getSteps(){const e=this.data.get("steps");return Array.isArray(e)?e:[]}hasUpdatedState(e){const t=JSON.stringify(e),r=JSON.stringify(this.getState());return t!==r}setState(e,t=!1){const r=this.getState(),{action:n,index:i,lifecycle:a,origin:o=null,size:l,status:c}={...r,...e};this.store.set("action",n),this.store.set("index",i),this.store.set("lifecycle",a),this.store.set("origin",o),this.store.set("size",l),this.store.set("status",c),t&&(this.store.set("controlled",e.controlled),this.store.set("continuous",e.continuous)),this.listener&&this.hasUpdatedState(r)&&this.listener(this.getState())}getHelpers(){return{close:this.close,go:this.go,info:this.info,next:this.next,open:this.open,prev:this.prev,reset:this.reset,skip:this.skip}}};function loe(e){return new ooe(e)}function coe({styles:e}){return C.createElement("div",{key:"JoyrideSpotlight",className:"react-joyride__spotlight","data-test-id":"spotlight",style:e})}var uoe=coe,doe=class extends C.Component{constructor(){super(...arguments),it(this,"isActive",!1),it(this,"resizeTimeout"),it(this,"scrollTimeout"),it(this,"scrollParent"),it(this,"state",{isScrolling:!1,mouseOverSpotlight:!1,showSpotlight:!0}),it(this,"hideSpotlight",()=>{const{continuous:e,disableOverlay:t,lifecycle:r}=this.props,n=[_t.INIT,_t.BEACON,_t.COMPLETE,_t.ERROR];return t||(e?n.includes(r):r!==_t.TOOLTIP)}),it(this,"handleMouseMove",e=>{const{mouseOverSpotlight:t}=this.state,{height:r,left:n,position:i,top:a,width:o}=this.spotlightStyles,l=i==="fixed"?e.clientY:e.pageY,c=i==="fixed"?e.clientX:e.pageX,u=l>=a&&l<=a+r,x=c>=n&&c<=n+o&&u;x!==t&&this.updateState({mouseOverSpotlight:x})}
73),it(this,"handleScroll",()=>{const{target:e}=this.props,t=so(e);if(this.scrollParent!==document){const{isScrolling:r}=this.state;r||this.updateState({isScrolling:!0,showSpotlight:!1}),clearTimeout(this.scrollTimeout),this.scrollTimeout=window.setTimeout(()=>{this.updateState({isScrolling:!1,showSpotlight:!0})},50)}else Pd(t,"sticky")&&this.updateState({})}),it(this,"handleResize",()=>{clearTimeout(this.resizeTimeout),this.resizeTimeout=window.setTimeout(()=>{this.isActive&&this.forceUpdate()},100)})}componentDidMount(){const{debug:e,disableScrolling:t,disableScrollParentFix:r=!1,target:n}=this.props,i=so(n);this.scrollParent=Af(i??document.body,r,!0),this.isActive=!0,window.addEventListener("resize",this.handleResize)}componentDidUpdate(e){var t;const{disableScrollParentFix:r,lifecycle:n,spotlightClicks:i,target:a}=this.props,{changed:o}=Tg(e,this.props);if(o("target")||o("disableScrollParentFix")){const l=so(a);this.scrollParent=Af(l??document.body,r,!0)}o("lifecycle",_t.TOOLTIP)&&((t=this.scrollParent)==null||t.addEventListener("scroll",this.handleScroll,{passive:!0}),setTimeout(()=>{const{isScrolling:l}=this.state;l||this.updateState({showSpotlight:!0})},100)),(o("spotlightClicks")||o("disableOverlay")||o("lifecycle"))&&(i&&n===_t.TOOLTIP?window.addEventListener("mousemove",this.handleMouseMove,!1):n!==_t.TOOLTIP&&window.removeEventListener("mousemove",this.handleMouseMove))}componentWillUnmount(){var e;this.isActive=!1,window.removeEventListener("mousemove",this.handleMouseMove),window.removeEventListener("resize",this.handleResize),clearTimeout(this.resizeTimeout),clearTimeout(this.scrollTimeout),(e=this.scrollParent)==null||e.removeEventListener("scroll",this.handleScroll)}get overlayStyles(){const{mouseOverSpotlight:e}=this.state,{disableOverlayClose:t,placement:r,styles:n}=this.props;let i=n.overlay;return VS()&&(i=r==="center"?n.overlayLegacyCenter:n.overlayLegacy),{cursor:t?"default":"pointer",height:Uae(),pointerEvents:e?"none":"auto",...i}}get spotlightStyles(){var e,t,r;const{showSpotlight:n}=this.state,{disableScrollParentFix:i=!1,spotlightClicks:a,spotlightPadding:o=0,styles:l,target:c}=this.props,u=so(c),f=qz(u),x=Pd(u),m=Gae(u,o,i);return{...VS()?l.spotlightLegacy:l.spotlight,height:Math.round(((e=f==null?void 0:f.height)!=null?e:0)+o*2),left:Math.round(((t=f==null?void 0:f.left)!=null?t:0)-o),opacity:n?1:0,pointerEvents:a?"none":"auto",position:x?"fixed":"absolute",top:m,transition:"opacity 0.2s",width:Math.round(((r=f==null?void 0:f.width)!=null?r:0)+o*2)}}updateState(e){this.isActive&&this.setState(t=>({...t,...e}))}render(){const{showSpotlight:e}=this.state,{onClickOverlay:t,placement:r}=this.props,{hideSpotlight:n,overlayStyles:i,spotlightStyles:a}=this;if(n())return null;let o=r!=="center"&&e&&C.createElement(uoe,{styles:a});if(Wz()==="safari"){const{mixBlendMode:l,zIndex:c,...u}=i;o=C.createElement("div",{style:{...u}},o),delete i.backgroundColor}return C.createElement("div",{className:"react-joyride__overlay","data-test-id":"overlay",onClick:t,role:"presentation",style:i},o)}},xoe=class extends C.Component{constructor(){super(...arguments),it(this,"node",null)}componentDidMount(){const{id:e}=this.props;sl()&&(this.node=document.createElement("div"),this.node.id=e,document.body.appendChild(this.node),gx||this.renderReact15())}componentDidUpdate(){sl()&&(gx||this.renderReact15())}componentWillUnmount(){!sl()||!this.node||(gx||Ux.unmountComponentAtNode(this.node),this.node.parentNode===document.body&&(document.body.removeChild(this.node),this.node=null))}renderReact15(){if(!sl())return;const{children:e}=this.props;this.node&&Ux.unstable_renderSubtreeIntoContainer(this,e,this.node)}renderReact16(){if(!sl()||!gx)return null;const{children:e}=this.props;return this.node?Ux.createPortal(e,this.node):null}render(){return gx?this.renderReact16():null}},foe=class{constructor(e,t){if(it(this,"element"),it(this,"options"),it(this,"canBeTabbed",r=>{const{tabIndex:n}=r;return n===null||n<0?!1:this.canHaveFocus(r)}),it(this,"canHaveFocus",r=>{const n=/input|select|textarea|button|object/,i=r.nodeName.toLowerCase();return(n.test(i)&&!r.getAttribute("disabled")||i==="a"&&!!r.getAttribute("href"))&&this.isVisible(r)}),it(this,"findValidTabElements",()=>[].slice.call(this.element.querySelectorAll("*"),0).filter(this.canBeTabbed)),it(this,"handleKeyDown",r=>{const{code:n="Tab"}=this.options;r.code===n&&this.interceptTab(r)}),it(this,"interceptTab",r=>{r.preventDefault();const n=this.findValidTabElements(),{shiftKey:i}=r;if(!n.length)return;let a=document.activeElement?n.indexOf(document.activeElement):0;a===-1||!i&&a+1===n.length?a=0:i&&a===0?a=n.length-1:a+=i?-1:1,n[a].focus()}),it(this,"isHidden",r=>{const n=r.offsetWidth<=0&&r.offsetHeight<=0,i=window.getComputedStyle(r);return n&&!r.innerHTML?!0:n&&i.getPropertyValue("overflow")!=="visible"||i.getPropertyValue("display")==="none"}),it(this,"isVisible",r=>{let n=r;for(;n;)if(n instanceof HTMLElement){if(n===document.body)break;if(this.isHidden(n))return!1;n=n.parentNode}return!0}),it(this,"removeScope",()=>{window.removeEventListener("keydown",this.handleKeyDown)}),it(this,"checkFocus",r=>{document.activeElement!==r&&(r.focus(),window.requestAnimationFrame(()=>this.checkFocus(r)))}
73),it(this,"setFocus",()=>{const{selector:r}=this.options;if(!r)return;const n=this.element.querySelector(r);n&&window.requestAnimationFrame(()=>this.checkFocus(n))}),!(e instanceof HTMLElement))throw new TypeError("Invalid parameter: element must be an HTMLElement");this.element=e,this.options=t,window.addEventListener("keydown",this.handleKeyDown,!1),this.setFocus()}},hoe=class extends C.Component{constructor(e){if(super(e),it(this,"beacon",null),it(this,"setBeaconRef",i=>{this.beacon=i}),e.beaconComponent)return;const t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.id="joyride-beacon-animation",e.nonce&&r.setAttribute("nonce",e.nonce),r.appendChild(document.createTextNode(`
74        @keyframes joyride-beacon-inner {
75          20% {
76            opacity: 0.9;
77          }
78        
79          90% {
80            opacity: 0.7;
81          }
82        }
83        
84        @keyframes joyride-beacon-outer {
85          0% {
86            transform: scale(1);
87          }
88        
89          45% {
90            opacity: 0.7;
91            transform: scale(0.75);
92          }
93        
94          100% {
95            opacity: 0.9;
96            transform: scale(1);
97          }
98        }
99      `)),t.appendChild(r)}componentDidMount(){const{shouldFocus:e}=this.props;setTimeout(()=>{st.domElement(this.beacon)&&e&&this.beacon.focus()},0)}componentWillUnmount(){const e=document.getElementById("joyride-beacon-animation");e!=null&&e.parentNode&&e.parentNode.removeChild(e)}render(){const{beaconComponent:e,continuous:t,index:r,isLastStep:n,locale:i,onClickOrHover:a,size:o,step:l,styles:c}=this.props,u=pa(i.open),f={"aria-label":u,onClick:a,onMouseEnter:a,ref:this.setBeaconRef,title:u};let x;if(e){const m=e;x=C.createElement(m,{continuous:t,index:r,isLastStep:n,size:o,step:l,...f})}else x=C.createElement("button",{key:"JoyrideBeacon",className:"react-joyride__beacon","data-test-id":"button-beacon",style:c.beacon,type:"button",...f},C.createElement("span",{style:c.beaconInner}),C.createElement("span",{style:c.beaconOuter}));return x}};function moe({styles:e,...t}){const{color:r,height:n,width:i,...a}=e;return ie.createElement("button",{style:a,type:"button",...t},ie.createElement("svg",{height:typeof n=="number"?`${n}px`:n,preserveAspectRatio:"xMidYMid",version:"1.1",viewBox:"0 0 18 18",width:typeof i=="number"?`${i}px`:i,xmlns:"http://www.w3.org/2000/svg"},ie.createElement("g",null,ie.createElement("path",{d:"M8.13911129,9.00268191 L0.171521827,17.0258467 C-0.0498027049,17.248715 -0.0498027049,17.6098394 0.171521827,17.8327545 C0.28204354,17.9443526 0.427188206,17.9998706 0.572051765,17.9998706 C0.71714958,17.9998706 0.862013139,17.9443526 0.972581703,17.8327545 L9.0000937,9.74924618 L17.0276057,17.8327545 C17.1384085,17.9443526 17.2832721,17.9998706 17.4281356,17.9998706 C17.5729992,17.9998706 17.718097,17.9443526 17.8286656,17.8327545 C18.0499901,17.6098862 18.0499901,17.2487618 17.8286656,17.0258467 L9.86135722,9.00268191 L17.8340066,0.973848225 C18.0553311,0.750979934 18.0553311,0.389855532 17.8340066,0.16694039 C17.6126821,-0.0556467968 17.254037,-0.0556467968 17.0329467,0.16694039 L9.00042166,8.25611765 L0.967006424,0.167268345 C0.745681892,-0.0553188426 0.387317931,-0.0553188426 0.165993399,0.167268345 C-0.0553311331,0.390136635 -0.0553311331,0.751261038 0.165993399,0.974176179 L8.13920499,9.00268191 L8.13911129,9.00268191 Z",fill:r}))))}var poe=moe;function goe(e){const{backProps:t,closeProps:r,index:n,isLastStep:i,primaryProps:a,skipProps:o,step:l,tooltipProps:c}=e,{content:u,hideBackButton:f,hideCloseButton:x,hideFooter:m,showSkipButton:p,styles:y,title:v}=l,b={};return b.primary=C.createElement("button",{"data-test-id":"button-primary",style:y.buttonNext,type:"button",...a}),p&&!i&&(b.skip=C.createElement("button",{"aria-live":"off","data-test-id":"button-skip",style:y.buttonSkip,type:"button",...o})),!f&&n>0&&(b.back=C.createElement("button",{"data-test-id":"button-back",style:y.buttonBack,type:"button",...t})),b.close=!x&&C.createElement(poe,{"data-test-id":"button-close",styles:y.buttonClose,...r}),C.createElement("div",{key:"JoyrideTooltip","aria-label":pa(v??u),
99className:"react-joyride__tooltip",style:y.tooltip,...c},C.createElement("div",{style:y.tooltipContainer},v&&C.createElement("h1",{"aria-label":pa(v),style:y.tooltipTitle},v),C.createElement("div",{style:y.tooltipContent},u)),!m&&C.createElement("div",{style:y.tooltipFooter},C.createElement("div",{style:y.tooltipFooterSpacer},b.skip),b.back,b.primary),b.close)}var yoe=goe,voe=class extends C.Component{constructor(){super(...arguments),it(this,"handleClickBack",e=>{e.preventDefault();const{helpers:t}=this.props;t.prev()}),it(this,"handleClickClose",e=>{e.preventDefault();const{helpers:t}=this.props;t.close("button_close")}),it(this,"handleClickPrimary",e=>{e.preventDefault();const{continuous:t,helpers:r}=this.props;if(!t){r.close("button_primary");return}r.next()}),it(this,"handleClickSkip",e=>{e.preventDefault();const{helpers:t}=this.props;t.skip()}),it(this,"getElementsProps",()=>{const{continuous:e,index:t,isLastStep:r,setTooltipRef:n,size:i,step:a}=this.props,{back:o,close:l,last:c,next:u,nextLabelWithProgress:f,skip:x}=a.locale,m=pa(o),p=pa(l),y=pa(c),v=pa(u),b=pa(x);let E=l,N=p;if(e){if(E=u,N=v,a.showProgress&&!r){const j=pa(f,{step:t+1,steps:i});E=Pw(f,t+1,i),N=j}r&&(E=c,N=y)}return{backProps:{"aria-label":m,children:o,"data-action":"back",onClick:this.handleClickBack,role:"button",title:m},closeProps:{"aria-label":p,children:l,"data-action":"close",onClick:this.handleClickClose,role:"button",title:p},primaryProps:{"aria-label":N,children:E,"data-action":"primary",onClick:this.handleClickPrimary,role:"button",title:N},skipProps:{"aria-label":b,children:x,"data-action":"skip",onClick:this.handleClickSkip,role:"button",title:b},tooltipProps:{"aria-modal":!0,ref:n,role:"alertdialog"}}})}render(){const{continuous:e,index:t,isLastStep:r,setTooltipRef:n,size:i,step:a}=this.props,{beaconComponent:o,tooltipComponent:l,...c}=a;let u;if(l){const f={...this.getElementsProps(),continuous:e,index:t,isLastStep:r,size:i,step:c,setTooltipRef:n},x=l;u=C.createElement(x,{...f})}else u=C.createElement(yoe,{...this.getElementsProps(),continuous:e,index:t,isLastStep:r,size:i,step:a});return u}},boe=class extends C.Component{constructor(){super(...arguments),it(this,"scope",null),it(this,"tooltip",null),it(this,"handleClickHoverBeacon",e=>{const{step:t,store:r}=this.props;e.type==="mouseenter"&&t.event!=="hover"||r.update({lifecycle:_t.TOOLTIP})}),it(this,"setTooltipRef",e=>{this.tooltip=e}),it(this,"setPopper",(e,t)=>{var r;const{action:n,lifecycle:i,step:a,store:o}=this.props;t==="wrapper"?o.setPopper("beacon",e):o.setPopper("tooltip",e),o.getPopper("beacon")&&(o.getPopper("tooltip")||a.placement==="center")&&i===_t.INIT&&o.update({action:n,lifecycle:_t.READY}),(r=a.floaterProps)!=null&&r.getPopper&&a.floaterProps.getPopper(e,t)}),it(this,"renderTooltip",e=>{const{continuous:t,helpers:r,index:n,size:i,step:a}=this.props;return C.createElement(voe,{continuous:t,helpers:r,index:n,isLastStep:n+1===i,setTooltipRef:this.setTooltipRef,size:i,step:a,...e})})}componentDidMount(){const{debug:e,index:t}=this.props;Hc({title:`step:${t}`,data:[{key:"props",value:this.props}],debug:e})}componentDidUpdate(e){var t;const{action:r,callback:n,continuous:i,controlled:a,debug:o,helpers:l,index:c,lifecycle:u,shouldScroll:f,status:x,step:m,store:p}=this.props,{changed:y,changedFrom:v}=Tg(e,this.props),b=l.info(),E=i&&r!==pr.CLOSE&&(c>0||r===pr.PREV),N=y("action")||y("index")||y("lifecycle")||y("status"),j=v("lifecycle",[_t.TOOLTIP,_t.INIT],_t.INIT),A=y("action",[pr.NEXT,pr.PREV,pr.SKIP,pr.CLOSE]),w=a&&c===e.index;if(A&&(j||w)&&n({...b,index:e.index,lifecycle:_t.COMPLETE,step:e.step,type:Hi.STEP_AFTER}),m.placement==="center"&&x===Ht.RUNNING&&y("index")&&r!==pr.START&&u===_t.INIT&&p.update({lifecycle:_t.READY}),N){const S=so(m.target),B=!!S;B&&Hae(S)?(v("status",Ht.READY,Ht.RUNNING)||v("lifecycle",_t.INIT,_t.READY))&&n({...b,step:m,type:Hi.STEP_BEFORE}):(console.warn(B?"Target not visible":"Target not mounted",m),n({...b,type:Hi.TARGET_NOT_FOUND,step:m}),a||p.update({index:c+(r===pr.PREV?-1:1)}))}v("lifecycle",_t.INIT,_t.READY)&&p.update({lifecycle:zS(m)||E?_t.TOOLTIP:_t.BEACON}),y("index")&&Hc({title:`step:${u}`,data:[{key:"props",value:this.props}],debug:o}),y("lifecycle",_t.BEACON)&&n({...b,step:m,type:Hi.BEACON}),y("lifecycle",_t.TOOLTIP)&&(n({...b,step:m,type:Hi.TOOLTIP}),f&&this.tooltip&&(this.scope=new foe(this.tooltip,{selector:"[data-action=primary]"}),this.scope.setFocus())),v("lifecycle",[_t.TOOLTIP,_t.INIT],_t.INIT)&&((t=this.scope)==null||t.removeScope(),p.cleanupPoppers())}componentWillUnmount(){var e;(e=this.scope)==null||e.removeScope()}get open(){const{lifecycle:e,step:t}=this.props;return zS(t)||e===_t.TOOLTIP}render(){const{continuous:e,debug:t,index:r,nonce:n,shouldScroll:i,size:a,step:o}=this.props,l=so(o.target);return!Kz(o)||!st.domElement(l)?null:C.createElement("div",{key:`JoyrideStep-${r}`,className:"react-joyride__step"},C.createElement(V3,{...o.floaterProps,component:this.renderTooltip,debug:t,getPopper:this.setPopper,id:`react-joyride-step-${r}`,open:this.open,placement:o.placement,target:o.target},C.createElement(hoe,{beaconComponent:o.beaconComponent,continuous:e,index:r,isLastStep:r+1===a,locale:o.locale,nonce:n,onClickOrHover:this.handleClickHoverBeacon,shouldFocus:i,size:a,step:o,styles:o.styles})))}},Yz=class extends C.Component{constructor(e){super(e),it(this,"helpers"),it(this,"store"),it(this,"callback",o=>{const{callback:l}=this.props;st.function(l)&&l(o)}),it(this,"handleKeyboard",o=>{const{index:l,lifecycle:c}=this.state,{steps:u}=this.props,f=u[l];c===_t.TOOLTIP&&o.code==="Escape"&&f&&!f.disableCloseOnEsc&&this.store.close("keyboard")}),it(this,"handleClickOverlay",()=>{const{index:o}=this.state,{steps:l}=this.props;Mu(this.props,l[o]).disableOverlayClose||this.helpers.close("overlay")}),it(this,"syncState",o=>{this.setState(o)});const{debug:t,getHelpers:r,run:n=!0,stepIndex:i}=e;this.store=loe({...e,controlled:n&&st.number(i)}),this.helpers=this.store.getHelpers();const{addListener:a}=this.store;Hc({title:"init",data:[{key:"props",value:this.props},{key:"state",value:this.state}],debug:t}),a(this.syncState),r&&r(this.helpers),this.state=this.store.getState()}componentDidMount(){if(!sl())return;const{debug:e,disableCloseOnEsc:t,run:r,steps:n}=this.props,{start:i}=this.store;qS(n,e)&&r&&i(),t||document.body.addEventListener("keydown",this.handleKeyboard,{passive:!0})}componentDidUpdate(e,t){if(!sl())return;const{action:r,controlled:n,index:i,status:a}=this.state,{debug:o,run:l,stepIndex:c,steps:u}=this.props,{stepIndex:f,steps:x}=e,{reset:m,setSteps:p,start:y,stop:v,update:b}=this.store,{changed:E}=Tg(e,this.props),{changed:N,changedFrom:j}=Tg(t,this.state),A=Mu(this.props,u[i]),w=!ps(x,u),S=st.number(c)&&E("stepIndex"),B=so(A.target);if(w&&(qS(u,o)?p(u):console.warn("Steps are not valid",u)),E("run")&&(l?y(c):v()),S){let O=st.number(f)&&f<c?pr.NEXT:pr.PREV;r===pr.STOP&&(O=pr.START),[Ht.FINISHED,Ht.SKIPPED].includes(a)||b({action:r===pr.CLOSE?pr.CLOSE:O,index:c,lifecycle:_t.INIT})}!n&&a===Ht.RUNNING&&i===0&&!B&&(this.store.update({index:i+1}),this.callback({...this.state,type:Hi.TARGET_NOT_FOUND,step:A}));const D={...this.state,index:i,step:A};if(N("action",[pr.NEXT,pr.PREV,pr.SKIP,pr.CLOSE])&&N("status",Ht.PAUSED)){const O=Mu(this.props,u[t.index]);this.callback({...D,index:t.index,lifecycle:_t.COMPLETE,step:O,type:Hi.STEP_AFTER})}if(N("status",[Ht.FINISHED,Ht.SKIPPED])){const O=Mu(this.props,u[t.index]);n||this.callback({...D,index:t.index,lifecycle:_t.COMPLETE,step:O,type:Hi.STEP_AFTER}),this.callback({...D,type:Hi.TOUR_END,step:O,index:t.index}),m()}else j("status",[Ht.IDLE,Ht.READY],Ht.RUNNING)?this.callback({...D,type:Hi.TOUR_START}):(N("status")||N("action",pr.RESET))&&this.callback({...D,type:Hi.TOUR_STATUS});this.scrollToStep(t)}componentWillUnmount(){const{disableCloseOnEsc:e}=this.props;e||document.body.removeEventListener("keydown",this.handleKeyboard)}scrollToStep(e){const{index:t,lifecycle:r,status:n}=this.state,{debug:i,disableScrollParentFix:a=!1,scrollDuration:o,scrollOffset:l=20,scrollToFirstStep:c=!1,steps:u}=this.props,f=Mu(this.props,u[t]),x=so(f.target),m=eoe({isFirstStep:t===0,lifecycle:r,previousLifecycle:e.lifecycle,scrollToFirstStep:c,step:f,target:x});if(n===Ht.RUNNING&&m){const p=py(x,a),y=Af(x,a);let v=Math.floor(Kae(x,l,a))||0;Hc({title:"scrollToStep",data:[{key:"index",value:t},{key:"lifecycle",value:r},{key:"status",value:n}],debug:i});const b=this.store.getPopper("beacon"),E=this.store.getPopper("tooltip");if(r===_t.BEACON&&b){const{offsets:N,placement:j}=b;!["bottom"].includes(j)&&!p&&(v=Math.floor(N.popper.top-l))}else if(r===_t.TOOLTIP&&E){const{flipped:N,offsets:j,placement:A}=E;["top","right","left"].includes(A)&&!N&&!p?v=Math.floor(j.popper.top-l):v-=f.spotlightPadding}v=v>=0?v:0,n===Ht.RUNNING&&Xae(v,{element:y,duration:o}).then(()=>{setTimeout(()=>{var N;
99(N=this.store.getPopper("tooltip"))==null||N.instance.update()},10)})}}render(){if(!sl())return null;const{index:e,lifecycle:t,status:r}=this.state,{continuous:n=!1,debug:i=!1,nonce:a,scrollToFirstStep:o=!1,steps:l}=this.props,c=r===Ht.RUNNING,u={};if(c&&l[e]){const f=Mu(this.props,l[e]);u.step=C.createElement(boe,{...this.state,callback:this.callback,continuous:n,debug:i,helpers:this.helpers,nonce:a,shouldScroll:!f.disableScrolling&&(e!==0||o),step:f,store:this.store}),u.overlay=C.createElement(xoe,{id:"react-joyride-portal"},C.createElement(doe,{...f,continuous:n,debug:i,lifecycle:t,onClickOverlay:this.handleClickOverlay}))}return C.createElement("div",{className:"react-joyride"},u.step,u.overlay)}};it(Yz,"defaultProps",noe);var Coe=Yz;const woe=[{target:".home-header",content:"Votre profil : statut d'abonnement, nombre de filleuls et lien d'affiliation à partager.",placement:"bottom",disableBeacon:!0},{target:".balance-card",content:"Vos soldes disponibles. Touchez pour retirer vos gains ou consulter votre historique.",placement:"bottom"},{target:".quick-actions",content:"Vos services : formations, boutiques, publicité, contacts et SBC Love.",placement:"top"},{target:".leaderboard-preview",content:"Le classement du mois : les meilleurs affiliés, tous niveaux confondus. Remis à zéro chaque mois.",placement:"top"}],Eoe=[{target:".wallet-balance",content:"Votre solde actuel et les options de dépôt/retrait.",placement:"bottom",disableBeacon:!0},{target:".transaction-chart",content:"Graphique de vos transactions sur la période sélectionnée.",placement:"top"},{target:".transaction-list",content:"Liste détaillée de toutes vos transactions.",placement:"top"},{target:".filter-options",content:"Filtrez vos transactions par type, date ou statut.",placement:"bottom"}],joe=[{target:".search-bar",content:"Recherchez une boutique par son nom ou son adresse.",placement:"bottom",disableBeacon:!0},{target:".category-filters",content:"Filtrez par catégorie : digital, mode, cosmétiques, alimentation…",placement:"bottom"},{target:".product-grid",content:"Les boutiques membres. Touchez une carte pour ouvrir la boutique.",placement:"top"},{target:".add-product",content:"Ouvrez votre propre boutique SBC depuis ce bouton.",placement:"left"}],Noe=[{target:".profile-header",content:"Vos informations personnelles et paramètres.",placement:"bottom",disableBeacon:!0},{target:".profile-actions",content:"Accédez à toutes les options de votre profil.",placement:"bottom"},{target:".referral-section",content:"Gérez votre programme de parrainage et suivez vos filleuls.",placement:"top"},{target:".subscription-info",content:"Informations sur votre abonnement actuel.",placement:"bottom"}],Aoe=[{target:".partner-stats",content:"Vos statistiques de partenariat et performances.",placement:"bottom",disableBeacon:!0},{target:".earnings-chart",content:"Suivez vos gains et commissions.",placement:"top"},{target:".partner-transactions",content:"Historique détaillé de vos transactions partenaires.",placement:"top"},{target:".partner-tools",content:"Outils et ressources pour développer votre activité.",placement:"bottom"}],koe=[{target:".search-filters",content:"Filtrez vos contacts selon différents critères.",placement:"bottom",disableBeacon:!0},{target:".contact-list",content:"Liste de vos contacts avec leurs informations.",placement:"top"},{target:".export-options",content:"Exportez vos contacts dans différents formats.",placement:"bottom"},{target:".contact-actions",content:"Actions rapides pour gérer vos contacts.",placement:"bottom"}],Soe=[{target:".pack-header",content:"Découvrez nos différents packs publicitaires.",placement:"bottom",disableBeacon:!0},{target:".basic-pack",content:"Pack Basic : idéal pour démarrer.",placement:"bottom"},{target:".pro-pack",content:"Pack Pro : pour une visibilité accrue.",placement:"bottom"},{target:".gold-pack",content:"Pack Gold : notre offre la plus complète.",placement:"bottom"}],Boe=[{target:".subscription-header",content:"Choisissez l'abonnement qui vous convient.",placement:"bottom",disableBeacon:!0},{target:".classic-plan",content:"Plan Classique : accès aux fonctionnalités essentielles.",placement:"bottom"},{target:".premium-plan",content:"Plan Premium : toutes les fonctionnalités avancées.",placement:"bottom"},{target:".subscription-features",content:"Découvrez les avantages de chaque plan.",placement:"top"}],Doe=[{target:".product-list",content:"Gérez tous vos produits et services.",placement:"bottom",disableBeacon:!0},{target:".add-product",content:"Ajoutez de nouveaux produits ou services.",placement:"bottom"},{target:".product-filters",content:"Filtrez et recherchez vos produits.",placement:"bottom"},{target:".product-actions",content:"Modifiez ou supprimez vos produits.",placement:"bottom"}];function Qz({hasSmsAccess:e}){const t=[{target:'[data-tour="balance-card"]',content:"Vos crédits Relance : emails à gauche, SMS à droite. Chaque message envoyé en consomme un.",placement:"bottom",disableBeacon:!0},{target:'[data-tour="recharge"]',content:"Achetez des packs de crédits ici — pas d'abonnement, vous payez à l'usage.",placement:"left"}];return e&&t.push({target:'[data-tour="sms-links"]',content:"Configurez le lien à inclure dans chaque SMS automatique et manuel (Cameroun +237 uniquement).",placement:"bottom"}),t.push({target:".relance-status-card",content:"Tableau de bord : état actuel, nombre de cibles actives et messages envoyés aujourd'hui.",placement:"bottom"},{target:".relance-toggle-btn",content:"Activez ou désactivez la Relance. Quand elle est active, vos filleuls non payés reç
99oivent des messages automatiques sur 7 jours.",placement:"left"},{target:".relance-controls",content:"Mettez en pause l'inscription de nouvelles cibles ou l'envoi par canal sans tout désactiver.",placement:"bottom"},{target:".relance-stats",content:"Suivez vos performances : cibles actives, messages envoyés, taux de livraison et conversions.",placement:"top"},{target:".relance-targets-btn",content:"Consultez la liste de vos cibles actives avec leur progression dans la séquence de 7 jours.",placement:"top"},{target:".relance-campaigns",content:"Les campagnes vous permettent de cibler des groupes spécifiques de filleuls avec des filtres (pays, date, etc.).",placement:"top"},{target:".relance-new-campaign",content:"Créez une nouvelle campagne en définissant le canal, les filtres et les messages personnalisés.",placement:"bottom"}),t}Qz({hasSmsAccess:!1});const Foe=[{target:".app-nav",content:"Voici votre barre de navigation : accueil, boutiques, portefeuille, statuts et messages.",placement:"top",disableBeacon:!0},{target:".tour-button",content:"Ce bouton relance ce guide à tout moment, sur n'importe quelle page.",placement:"left"}],Zz=C.createContext(void 0),Poe=({children:e})=>{const{user:t,isAuthenticated:r}=Gt(),n=(t==null?void 0:t.role)==="admin"||(t==null?void 0:t.role)==="tester",[i,a]=C.useState(0),[o,l]=C.useState(0),[c,u]=C.useState(!0),f=async()=>{if(!r){a(0),l(0),u(!1);return}try{const m=await X.relanceGetBalance(),p=Ve(m);a((p==null?void 0:p.emailBalance)??0),l((p==null?void 0:p.smsBalance)??0)}catch{a(0),l(0)}finally{u(!1)}};C.useEffect(()=>{f()},[r]);const x=n||i>0||o>0;return s.jsx(Zz.Provider,{value:{emailBalance:i,smsBalance:o,hasCredits:x,isLoading:c,refreshBalance:f},children:e})},Uh=()=>{const e=C.useContext(Zz);if(e===void 0)throw new Error("useRelance must be used within a RelanceProvider");return e},Jz=C.createContext({startTour:()=>{},endTour:()=>{},hasSeenTour:!1}),eV="seenTours",tV=()=>{try{const e=localStorage.getItem(eV);return e?JSON.parse(e):[]}catch{return[]}},Toe=e=>{const t=tV();t.includes(e)||(t.push(e),localStorage.setItem(eV,JSON.stringify(t)))},HS=e=>tV().includes(e),rV=()=>C.useContext(Jz),Moe=({children:e})=>{const[t,r]=C.useState(!1),[n,i]=C.useState([]),a=Cr(),{smsBalance:o}=Uh(),l=o>0,c=HS(a.pathname),u=C.useCallback(()=>{switch(a.pathname){case"/":return woe;case"/wallet":return Eoe;case"/marketplace":return joe;case"/profile":return Noe;case"/partenaire":return Aoe;case"/contacts":return koe;case"/ads-pack":return Soe;case"/abonnement":case"/changer-abonnement":return Boe;case"/mes-produits":return Doe;case"/relance":return Qz({hasSmsAccess:l});default:return[]}},[a.pathname,l]),f=C.useCallback(()=>{const y=b=>b.filter(E=>{const N=E.target;if(typeof N!="string")return!0;try{return!!document.querySelector(N)}catch{return!1}}),v=y(u());return v.length>0?v:y(Foe)},[u]);C.useEffect(()=>{r(!1),i([]);const y=setTimeout(()=>{const v=f();i(v),v.length>0&&!HS(a.pathname)&&r(!0)},600);return()=>clearTimeout(y)},[a.pathname,f]);const x=y=>{const{status:v}=y;(v===Ht.FINISHED||v===Ht.SKIPPED)&&(r(!1),Toe(a.pathname))},m=C.useCallback(()=>{const y=f();i(y),r(y.length>0)},[f]),p=C.useCallback(()=>{r(!1)},[]);return s.jsxs(Jz.Provider,{value:{startTour:m,endTour:p,hasSeenTour:c},children:[e,s.jsx(Coe,{steps:n,run:t,continuous:!0,showProgress:!0,showSkipButton:!0,scrollToFirstStep:!0,scrollOffset:120,disableOverlayClose:!0,spotlightPadding:6,styles:{options:{primaryColor:"#115CF6",zIndex:1e3},tooltip:{fontSize:"14px",padding:"15px"},buttonNext:{backgroundColor:"var(--color-primary)",padding:"8px 16px",borderRadius:"8px"},buttonBack:{marginRight:"10px",color:"#115CF6"}},locale:{back:"Précédent",close:"Fermer",last:"Terminer",next:"Suivant",nextLabelWithProgress:"Suivant ({step}/{steps})",open:"Ouvrir",skip:"Passer"},callback:x})]})},p0=()=>{const{startTour:e}=rV();return s.jsx("button",{onClick:e,className:"tour-button fixed bottom-20 right-4 bg-primary text-white p-3 rounded-full hover:bg-blue-700 transition-colors z-50",title:"Démarrer le guide",children:s.jsx(L,{icon:uy,size:24})})},U3=({isOpen:e,onClose:t,userReferralCode:r,negativeBalance:n})=>{const i=`Vous avez un solde négatif de ${Math.abs(n).toLocaleStr
99ing()} XAF parce que vous avez perdu vos filleuls. Ne vous inquiétez pas ! Vous pouvez facilement récupérer ces montants.`,a=[`📋 Utilisez votre code parrain: "${r}"`,"🔄 Demandez à vos filleuls de se réinscrire avec ce code","📱 Ils doivent utiliser le même numéro de téléphone qu'avant","💰 Ils ne paieront pas à nouveau - leurs comptes seront simplement restaurés","✅ Vous recevrez automatiquement les montants de leurs paiements","🎉 Votre solde négatif sera corrigé instantanément"];return s.jsx(It,{children:e&&s.jsx(Z.div,{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-[9999] p-4 overflow-y-auto",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},children:s.jsxs(Z.div,{className:"bg-white rounded-2xl max-w-lg w-full max-w-[95vw] sm:max-w-lg mx-auto my-4 p-4 sm:p-6 max-h-[90vh] overflow-y-auto border border-border",initial:{opacity:0,scale:.9,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.9,y:20},transition:{type:"spring",bounce:.2,duration:.4},children:[s.jsxs("div",{className:"flex items-start mb-3 sm:mb-4",children:[s.jsx("div",{className:"bg-red-100 rounded-full p-2 sm:p-3 mr-3 sm:mr-4 flex-shrink-0",children:s.jsx(L,{icon:Nl,className:"text-red-600",size:20})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("h3",{className:"text-base sm:text-lg font-bold text-gray-800 mb-1",children:"⚠️ Solde Négatif Détecté"}),s.jsxs("div",{className:"flex items-center text-red-600 text-sm mb-2 sm:mb-3",children:[s.jsx(L,{icon:fre,size:14,className:"mr-1 flex-shrink-0"}),s.jsxs("span",{className:"truncate",children:["-",Math.abs(n).toLocaleString()," XAF"]})]})]}),s.jsx("button",{onClick:t,className:"text-gray-400 hover:text-gray-600 transition-colors flex-shrink-0 ml-2",children:s.jsx(L,{icon:gt,size:18})})]}),s.jsx("div",{className:"bg-red-50 border-l-4 border-danger p-3 sm:p-4 rounded-r-lg mb-3 sm:mb-4",children:s.jsxs("div",{className:"flex items-start",children:[s.jsx(L,{icon:wn,className:"text-red-600 mr-2 sm:mr-3 mt-1 flex-shrink-0",size:18}),s.jsx("div",{className:"text-gray-700 text-sm leading-relaxed",children:i})]})}),s.jsxs("div",{className:"bg-blue-50 border border-border rounded-lg p-3 sm:p-4 mb-3 sm:mb-4",children:[s.jsx("h4",{className:"font-semibold text-blue-800 mb-2 sm:mb-3 text-sm",children:"🔧 Comment résoudre ce problème :"}),s.jsx("div",{className:"space-y-1 sm:space-y-2",children:a.map((o,l)=>s.jsxs("div",{className:"flex items-start text-sm text-blue-700",children:[s.jsxs("span",{className:"mr-2 text-blue-600 font-bold flex-shrink-0",children:[l+1,"."]}),s.jsx("span",{className:"leading-relaxed",children:o})]},l))})]}),s.jsxs("div",{className:"bg-green-50 border border-border rounded-lg p-3 sm:p-4 mb-3 sm:mb-4",children:[s.jsx("h4",{className:"font-semibold text-green-800 mb-2 text-sm",children:"💡 Avantages pour vos filleuls :"}),s.jsxs("ul",{className:"text-green-700 text-sm space-y-1",children:[s.jsx("li",{children:"• ✅ Pas de paiement supplémentaire requis"}),s.jsx("li",{children:"• 📱 Utiliser le même numéro pour une récupération facile"}),s.jsx("li",{children:"• 🔄 Récupération automatique de leur historique"}),s.jsx("li",{children:"• 📈 Conservation de leur niveau et avantages"}),s.jsx("li",{children:"• 🎁 Vous recevrez les commissions normalement"})]})]}),s.jsxs("div",{className:"flex flex-col sm:flex-row justify-between gap-3",children:[s.jsx("button",{onClick:()=>{navigator.clipboard.writeText(r)},className:"flex-1 bg-green-600 hover:bg-green-700 text-white font-semibold py-3 px-4 rounded-xl transition-colors duration-200 text-sm min-h-[44px] flex items-center justify-center",children:"📋 Copier Code"}),s.jsx("button",{onClick:t,className:"flex-1 bg-blue-600 hover:bg-blue-700 text-white font-semibold py-3 px-4 rounded-xl transition-colors duration-200 min-h-[44px] flex items-center justify-center",children:"J'ai compris"})]})]})})})},Ooe=e=>`${e.toLocaleString("fr-FR")} XAF`,Loe=e=>e.toLocaleString("fr-FR");
99function kf({isOpen:e,onClose:t,showEmail:r=!0,showSms:n=!0}){var y,v;const[i,a]=C.useState(null),[o,l]=C.useState(!1),[c,u]=C.useState(null),[f,x]=C.useState("");C.useEffect(()=>{if(!e)return;let b=!1;return l(!0),x(""),X.relanceGetPacks().then(E=>{if(b)return;const N=Ve(E);a(N)}).catch(E=>{b||x((E==null?void 0:E.message)||"Impossible de charger les packs.")}).finally(()=>{b||l(!1)}),()=>{b=!0}},[e]);const m=async b=>{u(b.id),x("");try{const E=await X.relancePurchasePack(b.id),N=Ve(E);N!=null&&N.checkoutUrl?window.location.href=N.checkoutUrl:x("Lien de paiement indisponible.")}catch(E){x((E==null?void 0:E.message)||"Erreur lors de l'achat.")}finally{u(null)}},p=b=>{const E=b.type==="email",N=c===b.id;return s.jsx("button",{onClick:()=>m(b),disabled:c!==null,className:`w-full text-left rounded-xl border-2 p-4 transition-colors ${E?"border-border hover:border-primary hover:bg-blue-50":"border-border hover:border-success hover:bg-green-50"} ${N?"opacity-60 cursor-wait":""} disabled:opacity-50`,children:s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"font-bold text-gray-800",children:[Loe(b.credits)," crédits ",E?"email":"SMS"]}),b.label&&s.jsx("div",{className:"text-xs text-gray-500 mt-1",children:b.label})]}),s.jsxs("div",{className:"text-right",children:[s.jsx("div",{className:`font-bold ${E?"text-blue-600":"text-green-600"}`,children:Ooe(b.priceXAF)}),N&&s.jsx("div",{className:"text-xs text-gray-500 mt-1",children:"Redirection…"})]})]})},b.id)};return s.jsx(It,{children:e&&s.jsx(Z.div,{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4",initial:{opacity:0}
99,animate:{opacity:1},exit:{opacity:0},onClick:t,children:s.jsxs(Z.div,{className:"bg-white rounded-2xl p-6 w-full max-w-lg text-gray-900 relative max-h-[90vh] overflow-y-auto border border-border",initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},transition:{type:"spring",bounce:.2},onClick:b=>b.stopPropagation(),children:[s.jsx("button",{onClick:t,className:"absolute top-4 right-4 text-gray-400 hover:text-gray-600","aria-label":"Fermer",children:s.jsx(L,{icon:gt,size:20})}),s.jsx("h3",{className:"text-xl font-bold mb-2",children:"Acheter des crédits Relance"}),s.jsx("p",{className:"text-sm text-gray-600 mb-5",children:"Les crédits sont consommés à chaque message envoyé. Aucun abonnement, vous payez à l'usage."}),o&&s.jsx("div",{className:"text-center py-8 text-gray-500",children:"Chargement des packs…"}),f&&s.jsx("div",{className:"bg-red-50 border border-border text-red-700 rounded-lg px-3 py-2 text-sm mb-4",children:f}),!o&&i&&s.jsxs("div",{className:"space-y-5",children:[r&&((y=i.emailPacks)==null?void 0:y.length)>0&&s.jsxs("section",{children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2 text-blue-700",children:[s.jsx(L,{icon:yo}),s.jsx("h4",{className:"font-bold",children:"Packs Email"})]}),s.jsx("div",{className:"space-y-2",children:i.emailPacks.map(p)})]}),n&&((v=i.smsPacks)==null?void 0:v.length)>0&&s.jsxs("section",{children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2 text-green-700",children:[s.jsx(L,{icon:N3}),s.jsx("h4",{className:"font-bold",children:"Packs SMS"})]}),s.jsx("div",{className:"space-y-2",children:i.smsPacks.map(p)})]})]})]})})})}const Tw="sbc.events.lastSeenId",x2="sbc.events.lastDismissed";function Roe(){const e=lt(),[t,r]=C.useState(null);if(C.useEffect(()=>{let l=!1;return(async()=>{var c,u;try{const f=await X.listPublicEvents({limit:3});if(l||!f.apiReportedSuccess)return;const x=((u=(c=f.body)==null?void 0:c.data)==null?void 0:u.items)||[];if(x.length===0)return;const m=[...x].sort((v,b)=>{const E=new Date(v.publishedAt||v.createdAt).getTime();return new Date(b.publishedAt||b.createdAt).getTime()-E})[0];if(localStorage.getItem(Tw)===m._id)return;const y=Number(localStorage.getItem(x2)||0);if(y&&Date.now()-y<3*3600*1e3)return;r(m)}catch{}})(),()=>{l=!0}},[]),!t)return null;const n=()=>{localStorage.setItem(x2,String(Date.now())),r(null)},i=()=>{localStorage.setItem(Tw,t._id),localStorage.setItem(x2,String(Date.now())),r(null),e(`/events/${encodeURIComponent(t.slug)}`)},a=t.posterFileId?X.generateThumbnailUrl(t.posterFileId,512):"",o=new Date(t.startsAt).toLocaleDateString("fr-FR",{day:"numeric",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit"});return s.jsx(It,{children:s.jsx(Z.div,{initial:{opacity:0}
99,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[60] flex items-end sm:items-center justify-center bg-black/60 p-4",onClick:n,children:s.jsxs(Z.div,{initial:{y:40,opacity:0},animate:{y:0,opacity:1},exit:{y:40,opacity:0},transition:{type:"spring",stiffness:250,damping:24},onClick:l=>l.stopPropagation(),className:"bg-surface border border-border rounded-card w-full max-w-md overflow-hidden",children:[s.jsxs("div",{className:"relative",children:[a?s.jsx("img",{src:a,alt:t.title,className:"w-full h-48 object-cover"}):s.jsx("div",{className:"w-full h-32 bg-primary-soft grid place-items-center",children:s.jsx(L,{icon:ru,size:34,className:"text-primary"})}),s.jsx("span",{className:"absolute top-3 left-3 rounded-pill bg-primary px-2 py-1 text-[10px] font-bold uppercase tracking-wide text-white",children:"Nouvel événement"}),s.jsx("button",{onClick:n,className:"absolute top-3 right-3 size-8 grid place-items-center rounded-pill bg-surface text-ink-2 border border-border","aria-label":"Fermer",children:s.jsx(L,{icon:gt,size:15})})]}),s.jsxs("div",{className:"p-4",children:[s.jsx("p",{className:"font-bold text-ink text-lg text-balance",children:t.title}),s.jsx("p",{className:"text-sm text-ink-2 mt-1",children:o}),(t.venue||t.city)&&s.jsxs("p",{className:"text-xs text-ink-3 mt-0.5",children:[t.venue,t.venue&&t.city?" · ":"",t.city]}),s.jsxs("div",{className:"mt-4 flex gap-2",children:[s.jsx("button",{onClick:n,className:"flex-1 rounded-xl border border-border text-ink font-medium py-2.5 text-sm",children:"Plus tard"}),s.jsx("button",{onClick:i,className:"flex-1 rounded-xl bg-primary text-white font-semibold py-2.5 text-sm hover:bg-primary-hover transition-colors",children:"Voir l'événement"})]})]})]})},"backdrop")})}const _oe=e=>{e&&localStorage.setItem(Tw,e)},nV=()=>hr({queryKey:["formations"],queryFn:async()=>{try{return Ve(await X.getFormations())??[]}catch{return[]}},staleTime:30*60*1e3,gcTime:24*60*60*1e3,refetchOnWindowFocus:!1,refetchOnMount:!1,retry:2}),f2={transactionStats:["transaction-stats"],referralStats:["referral-stats"],settings:["settings"]};function Ioe(){var A;const e=lt(),{user:t}=Gt(),[r,n]=C.useState("Non abonné"),[i,a]=C.useState(!1),[o,l]=C.useState(!1),{hasCredits:c}=Uh(),{data:u,isLoading:f,error:x}=hr({queryKey:f2.transactionStats,queryFn:async()=>{const w=await X.getTransactionStats();return Ve(w)},staleTime:5*60*1e3,gcTime:30*60*1e3,refetchOnWindowFocus:!1,refetchOnMount:!1,retry:2}),{data:m,isLoading:p}=hr({queryKey:f2.referralStats,queryFn:async()=>{const w=await X.getReferralStats();return Ve(w)},staleTime:10*60*1e3,gcTime:60*60*1e3,refetchOnWindowFocus:!1,refetchOnMount:!1,retry:2}),{data:y,isLoading:v}=nV(),{data:b}=hr({queryKey:f2.settings,queryFn:async()=>{const w=await X.getAppSettings();return Ve(w)},staleTime:5*60*1e3,gcTime:30*60*1e3,refetchOnWindowFocus:!1,refetchOnMount:!1,retry:2});C.useEffect(()=>{t!=null&&t.activeSubscriptions&&t.activeSubscriptions.length>0?n("Abonné"):n("Non abonné")},[t]);const E=(u==null?void 0:u.balance)||(t==null?void 0:t.balance)||0,N=(t==null?void 0:t.usdBalance)||0;C.useEffect(()=>{if(!f&&!x&&E<0){const w=`first-home-visit-${(t==null?void 0:t.id)||"anonymous"}`;if(!sessionStorage.getItem(w)){a(!0),sessionStorage.setItem(w,"true");const B=`negative-balance-modal-shown-${(t==null?void 0:t.id)||"anonymous"}`;localStorage.setItem(B,Date.now().toString())}}},[f,x,E,t==null?void 0:t.id]);const j=(A=b==null?void 0:b.presentationPdf)!=null&&A.fileId?X.generateSettingsFileUrl(b.presentationPdf.fileId):"/sbc_presentation.pdf";return s.jsxs(nn,{children:[s.jsx(Roe,{}),s.jsxs("div",{className:"p-4 flex flex-col gap-6",children:[s.jsx("div",{className:"home-header",children:s.jsx(zne,{name:(t==null?void 0:t.name)??"Utilisateur",image:t!=null&&t.avatar?t.avatar:t!=null&&t.avatarId?X.generateSettingsFileUrl(t.avatarId):"https://img.freepik.com/premium-vector/default-avatar-profile-icon-social-media-user-image-gray-avatar-icon-blank-profile-silhouette-vector-illustration_561158-3407.jpg?w=360",affiliates:p?null:(m==null?void 0:m.totalReferrals)??0,status:r,promoCode:(t==null?void 0:t.referralCode)??""})}),s.jsx("div",{className:"balance-card",children:s.jsx(Wne,{balance:E,usdBalance:N})}),s.jsx("div",{className:"quick-actions",children:s.jsx(Fse,{formationsCount:v?null:(y==null?void 0:y.length)??0,hasRelanceAccess:c,relanceBadge:null,onFormations:()=>e("/formations"),onRelance:()=>{c?e("/relance"):l(!0)}})}),s.jsx("div",{className:"leaderboard-preview",children:s.jsx(Vse,{})}),s.jsxs("section",{className:"flex flex-col gap-3",children:[s.jsx("h2",{className:"text-xl font-bold text-ink",children:"Présentation"}),s.jsx(Use,{src:"/sbc-presentation-2026-09.mp4",poster:"/sbc-presentation-2026-09.jpg",title:"Présentation SBC"})]}),s.jsxs("a",{href:j,download:"document_de_presentation_sbc.pdf",className:"w-full bg-accent text-white rounded-card py-3.5 px-4 flex items-center justify-center gap-3 font-semibold",children:[s.jsx("span",{className:"size-8 grid place-items-center rounded-pill bg-white text-accent shrink-0",children:s.jsx(L,{icon:eu,size:16})}),s.jsx("span",{className:"text-sm",children:"Téléchargez le document de présentation de la SBC"})]}),s.jsx(Wse,{})]}),s.jsx(kf,{isOpen:o,onClose:()=>l(!1)}),s.jsx(p0,{}),s.jsx(U3,{isOpen:i,onClose:()=>a(!1),userReferralCode:(t==null?void 0:t.referralCode)||"",negativeBalance:Math.abs(E)})]})}function $oe(){const e=Cr(),t=lt(),r=C.useMemo(()=>[{label:"Accueil",icon:E$,path:"/"},{label:"Marketplace",icon:Lre,path:"/marketplace",dot:!0},{label:"Événements",icon:ru,path:"/events"},{label:"Wallet",icon:Ba,path:"/wallet"},{label:"Messages",icon:dy,path:"/chat"}],[]);return s.jsx(Z.nav,{initial:{y:100,opacity:0}
99,animate:{y:0,opacity:1},transition:{type:"spring",stiffness:200,damping:20},className:"app-nav fixed bottom-3 left-1/2 -translate-x-1/2 z-50 bg-surface border border-border rounded-pill flex items-center px-2 py-2 gap-1",children:r.map(n=>{const a=e.pathname+e.search===n.path||n.path==="/"&&e.pathname==="/"||n.path==="/wallet"&&e.pathname==="/wallet"||n.path==="/chat"&&e.pathname==="/chat"&&!e.search;return s.jsxs(Z.button,{onClick:()=>t(n.path),whileTap:{scale:.92},className:`relative flex items-center rounded-pill transition-colors duration-200 focus:outline-none ${a?"px-3.5 py-2 text-white font-semibold":"px-2.5 py-2.5 text-ink-3 hover:text-ink-2"}`,"aria-label":n.label,"aria-current":a?"page":void 0,children:[a&&s.jsx(Z.span,{layoutId:"navPill",className:"absolute inset-0 bg-primary rounded-pill",transition:{type:"spring",stiffness:400,damping:32}}),s.jsxs("span",{className:"relative z-10 flex items-center",children:[s.jsx(L,{icon:n.icon,size:22}),a&&s.jsx("span",{className:"ml-1.5 text-sm",children:n.label})]}),n.dot&&!a&&s.jsx("span",{className:"absolute top-1 right-1 size-2 rounded-pill bg-accent"})]},n.label)})})}function Ct({onClick:e}){const t=()=>{e?e():window.history.back()};return s.jsx("div",{children:s.jsx("button",{onClick:t,className:"bg-[#94B027] p-2 rounded-xl text-white",children:s.jsx(L,{icon:c0,size:25})})})}const zoe=({isOpen:e,onClose:t,type:r,title:n,message:i,autoClose:a=!0,duration:o=4e3})=>{C.useEffect(()=>{if(e&&a){const f=setTimeout(()=>{t()},o);return()=>clearTimeout(f)}},[e,a,o,t]);const l=()=>{switch(r){case"success":return s.jsx(L,{icon:Ur,size:20});case"error":return s.jsx(L,{icon:gt,size:20});case"info":return s.jsx(L,{icon:Nl,size:20});default:return s.jsx(L,{icon:Ur,size:20})}},u=(()=>{switch(r){case"success":return{bg:"bg-green-500",border:"border-success",text:"text-white",icon:"text-white"};case"error":return{bg:"bg-red-500",border:"border-danger",text:"text-white",icon:"text-white"};case"info":return{bg:"bg-blue-500",border:"border-primary",text:"text-white",icon:"text-white"};default:return{bg:"bg-green-500",border:"border-success",text:"text-white",icon:"text-white"}}})();return s.jsx(It,{children:e&&s.jsx(Z.div,{className:"fixed top-4 right-4 z-[9999] max-w-sm w-full",initial:{opacity:0,x:100,scale:.9},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:100,scale:.9},transition:{type:"spring",bounce:.2,duration:.4},children:s.jsx("div",{className:`${u.bg} ${u.border} border rounded-lg p-4`,children:s.jsxs("div",{className:"flex items-start",children:[s.jsx("div",{className:`${u.icon} mr-3 mt-0.5`,children:l()}),s.jsxs("div",{className:"flex-1",children:[s.jsx("h4",{className:`${u.text} font-semibold text-sm`,children:n}),s.jsx("p",{className:`${u.text} text-xs mt-1 opacity-90`,children:i})]}),s.jsx("button",{onClick:t,className:`${u.text} opacity-70 hover:opacity-100 ml-2`,children:s.jsx(L,{icon:gt,size:16})})]})})})})},sV=({isOpen:e,onClose:t,onConversionComplete:r})=>{const{user:n,refreshUser:i}=Gt(),[a,o]=C.useState("FCFA"),[l,c]=C.useState("USD"),[u,f]=C.useState(""),[x,m]=C.useState(null),[p,y]=C.useState(!1),[v,b]=C.useState(!1),[E,N]=C.useState(null),[j,A]=C.useState({isOpen:!1,type:"success",title:"",message:""}),w=(n==null?void 0:n.balance)||0,S=(n==null?void 0:n.usdBalance)||0,B=a==="FCFA"?w:S,D=()=>{o(l),c(a),f(""),m(null),N(null)},P=async()=>{if(B<0){N(`Impossible de convertir avec un solde ${a} négatif. Solde actuel: ${B.toLocaleString("fr-FR")} ${a}`);return}const M=Zk(Number(u),B,a,l);if(!M.isValid){N(M.error);return}y(!0),N(null);try{const I=qne(Number(u),a,l);m(I.convertedAmount)}catch(I){const V=e2(I);N(V.message)}finally{y(!1)}},O=async()=>{if(!x){N("Veuillez d'abord prévisualiser la conversion");return}if(B<0){N(`Impossible de convertir avec un solde ${a} négatif. Solde actuel: ${B.toLocaleString("fr-FR")} ${a}`);return}const M=Zk(Number(u),B,a,l);if(!M.isValid){N(M.error);return}b(!0),N(null);try{const I=await X.convertUserBalance(Number(u),a,l),V=Ve(I);if(V&&I.isOverallSuccess)await i(),r(),A({isOpen:!0,type:"success",title:"Conversion réussie!",message:`${Qx(Number(u),a)} → ${Qx(x,l)}`}),f(""),m(null),N(null),t();else{const W=e2(new Error((V==null?void 0:V.message)||"Conversion failed"));
99N(W.message),A({isOpen:!0,type:"error",title:"Échec de la conversion",message:W.message})}}catch(I){const V=e2(I);N(V.message),A({isOpen:!0,type:"error",title:"Erreur de conversion",message:V.message})}finally{b(!1)}};return s.jsxs(s.Fragment,{children:[s.jsx(It,{children:e&&s.jsx(Z.div,{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:s.jsxs(Z.div,{className:"bg-white rounded-2xl p-4 w-full max-w-sm text-gray-900 relative max-h-[85vh] overflow-y-auto border border-border",initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},transition:{type:"spring",bounce:.2},children:[s.jsx("button",{className:"absolute top-3 right-3 text-gray-400 hover:text-gray-700",onClick:t,children:s.jsx(L,{icon:gt,size:20})}),s.jsx("h2",{className:"text-lg font-bold mb-4 text-center pr-6",children:"Convertir"}),s.jsx("div",{className:"mb-4 p-3 bg-gray-50 rounded-lg",children:s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"text-xs text-gray-600",children:"FCFA"}),s.jsxs("div",{className:`font-bold ${w<0?"text-red-600":"text-blue-600"}`,children:[w.toLocaleString("fr-FR")," F"]})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"text-xs text-gray-600",children:"USD"}),s.jsxs("div",{className:`font-bold ${S<0?"text-red-600":"text-green-600"}`,children:["$",S.toFixed(2)]})]})]})}),s.jsx("div",{className:"mb-4 p-2 bg-blue-50 rounded-lg text-center",children:s.jsxs("div",{className:"text-xs text-blue-600",children:["USD→FCFA: 1$ = ",vi.DISPLAY.USD_TO_XAF_RATE,"F • FCFA→USD: ",vi.DISPLAY.XAF_TO_USD_RATE,"F = 1$"]})}),B<0&&s.jsx("div",{className:"mb-4 p-3 bg-red-50 border border-border rounded-lg",children:s.jsxs("div",{className:"text-xs text-red-700 text-center",children:["⚠️ Impossible de convertir avec un solde ",a," négatif"]})}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-1",children:[s.jsxs("label",{className:"text-sm font-medium text-gray-700",children:["De: ",a]}),s.jsx("button",{onClick:D,className:"p-1 text-gray-400 hover:text-gray-600",title:"Inverser",children:s.jsx(L,{icon:j3,size:16})})]}),s.jsx("input",{type:"number",value:u,onChange:M=>{f(M.target.value),m(null),N(null)},placeholder:`Montant en ${a}`,className:`w-full px-3 py-2 text-sm border rounded-lg focus:outline-none focus:ring-2 ${B<0?"border-danger bg-red-50 cursor-not-allowed focus:ring-red-500":"border-border focus:ring-blue-500"}`,max:Math.max(0,B),disabled:B<0}),s.jsxs("div",{className:`text-xs mt-1 ${B<0?"text-red-500":"text-gray-500"}`,children:["Disponible: ",B.toLocaleString("fr-FR")," ",a]})]}),s.jsxs("div",{children:[s.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Vers: ",l]}),s.jsx("div",{className:"px-3 py-2 bg-gray-50 border border-border rounded-lg min-h-[2.5rem] flex items-center",children:x!==null?s.jsxs("div",{className:"w-full",children:[s.jsx("div",{className:"font-bold",children:Qx(x,l)}),s.jsx("div",{className:"text-xs text-gray-500",children:Une(Number(u),a,x,l)})]}):s.jsx("span",{className:"text-gray-500 text-sm",children:"Montant converti"})})]}),E&&s.jsx("div",{className:"p-2 bg-red-50 border border-border rounded-lg",children:s.jsx("p",{className:"text-red-600 text-xs",children:E})}),s.jsxs("div",{className:"flex gap-2 pt-2",children:[s.jsxs("button",{onClick:P,disabled:p||!u||B<0,className:"flex-1 bg-blue-500 text-white py-2 px-3 rounded-lg text-sm font-medium hover:bg-blue-600 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center",children:[p?s.jsx(L,{icon:Yt,className:"animate-spin mr-1",size:14}):null,"Prévisualiser"]}),s.jsxs("button",{onClick:O,disabled:v||!x||B<0,className:"flex-1 bg-green-500 text-white py-2 px-3 rounded-lg text-sm font-medium hover:bg-green-600 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center",children:[v?s.jsx(L,{icon:Yt,className:"animate-spin mr-1",size:14}
99):null,"Convertir"]})]})]})]})})}),s.jsx(zoe,{isOpen:j.isOpen,onClose:()=>A(M=>({...M,isOpen:!1})),type:j.type,title:j.title,message:j.message})]})},Gc=[{value:"Algérie",label:"🇩🇿 Algérie",code:"DZ",flag:"🇩🇿",phoneCode:"+213",currency:"DZD",supportsMomo:!1},{value:"Égypte",label:"🇪🇬 Égypte",code:"EG",flag:"🇪🇬",phoneCode:"+20",currency:"EGP",supportsMomo:!1},{value:"Libye",label:"🇱🇾 Libye",code:"LY",flag:"🇱🇾",phoneCode:"+218",currency:"LYD",supportsMomo:!1},{value:"Maroc",label:"🇲🇦 Maroc",code:"MA",flag:"🇲🇦",phoneCode:"+212",currency:"MAD",supportsMomo:!1},{value:"Soudan",label:"🇸🇩 Soudan",code:"SD",flag:"🇸🇩",phoneCode:"+249",currency:"SDG",supportsMomo:!1},{value:"Tunisie",label:"🇹🇳 Tunisie",code:"TN",flag:"🇹🇳",phoneCode:"+216",currency:"TND",supportsMomo:!1},{value:"Soudan du Sud",label:"🇸🇸 Soudan du Sud",code:"SS",flag:"🇸🇸",phoneCode:"+211",currency:"SSP",supportsMomo:!1},{value:"Bénin",label:"🇧🇯 Bénin",code:"BJ",flag:"🇧🇯",phoneCode:"+229",currency:"XOF",supportsMomo:!0},{value:"Burkina Faso",label:"🇧🇫 Burkina Faso",code:"BF",flag:"🇧🇫",phoneCode:"+226",currency:"XOF",supportsMomo:!0},{value:"Cap-Vert",label:"🇨🇻 Cap-Vert",code:"CV",flag:"🇨🇻",phoneCode:"+238",currency:"CVE",supportsMomo:!1},{value:"Côte d'Ivoire",label:"🇨🇮 Côte d'Ivoire",code:"CI",flag:"🇨🇮",phoneCode:"+225",currency:"XOF",supportsMomo:!0},{value:"Gambie",label:"🇬🇲 Gambie",code:"GM",flag:"🇬🇲",phoneCode:"+220",currency:"GMD",supportsMomo:!1},{value:"Ghana",label:"🇬🇭 Ghana",code:"GH",flag:"🇬🇭",phoneCode:"+233",currency:"GHS",supportsMomo:!0},{value:"Guinée",label:"🇬🇳 Guinée",code:"GN",flag:"🇬🇳",phoneCode:"+224",currency:"GNF",supportsMomo:!1},{value:"Guinée-Bissau",label:"🇬🇼 Guinée-Bissau",code:"GW",flag:"🇬🇼",phoneCode:"+245",currency:"XOF",supportsMomo:!1},{value:"Libéria",label:"🇱🇷 Libéria",code:"LR",flag:"🇱🇷",phoneCode:"+231",currency:"LRD",supportsMomo:!1},{value:"Mali",label:"🇲🇱 Mali",code:"ML",flag:"🇲🇱",phoneCode:"+223",currency:"XOF",supportsMomo:!0},{value:"Mauritanie",label:"🇲🇷 Mauritanie",code:"MR",flag:"🇲🇷",phoneCode:"+222",currency:"MRU",supportsMomo:!1},{value:"Niger",label:"🇳🇪 Niger",code:"NE",flag:"🇳🇪",phoneCode:"+227",currency:"XOF",supportsMomo:!0},{value:"Nigéria",label:"🇳🇬 Nigéria",code:"NG",flag:"🇳🇬",phoneCode:"+234",currency:"NGN",supportsMomo:!0},{value:"Sénégal",label:"🇸🇳 Sénégal",code:"SN",flag:"🇸🇳",phoneCode:"+221",currency:"XOF",supportsMomo:!0},{value:"Sierra Leone",label:"🇸🇱 Sierra Leone",code:"SL",flag:"🇸🇱",phoneCode:"+232",currency:"SLE",supportsMomo:!1},{value:"Togo",label:"🇹🇬 Togo",code:"TG",flag:"🇹🇬",phoneCode:"+228",currency:"XOF",supportsMomo:!0},{value:"Cameroun",label:"🇨🇲 Cameroun",code:"CM",flag:"🇨🇲",phoneCode:"+237",currency:"XAF",supportsMomo:!0},{value:"République Centrafricaine",label:"🇨🇫 République Centrafricaine",code:"CF",flag:"🇨🇫",phoneCode:"+236",currency:"XAF",supportsMomo:!1},{value:"Tchad",label:"🇹🇩 Tchad",code:"TD",flag:"🇹🇩",phoneCode:"+235",currency:"XAF",supportsMomo:!1},{value:"Congo-Brazzaville",label:"🇨🇬 Congo-Brazzaville",code:"CG",flag:"🇨🇬",phoneCode:"+242",currency:"XAF",supportsMomo:!0},{value:"Congo-Kinshasa",label:"🇨🇩 Congo-Kinshasa (RDC)",code:"CD",flag:"🇨🇩",phoneCode:"+243",currency:"CDF",supportsMomo:!0},{value:"Guinée Équatoriale",label:"🇬🇶 Guinée Équatoriale",code:"GQ",flag:"🇬🇶",phoneCode:"+240",currency:"XAF",supportsMomo:!1},{value:"Gabon",label:"🇬🇦 Gabon",code:"GA",flag:"🇬🇦",phoneCode:"+241",currency:"XAF",supportsMomo:!0},{value:"São Tomé-et-Príncipe",label:"🇸🇹 São Tomé-et-Príncipe",code:"ST",flag:"🇸🇹",ph
99oneCode:"+239",currency:"STN",supportsMomo:!1},{value:"Burundi",label:"🇧🇮 Burundi",code:"BI",flag:"🇧🇮",phoneCode:"+257",currency:"BIF",supportsMomo:!1},{value:"Comores",label:"🇰🇲 Comores",code:"KM",flag:"🇰🇲",phoneCode:"+269",currency:"KMF",supportsMomo:!1},{value:"Djibouti",label:"🇩🇯 Djibouti",code:"DJ",flag:"🇩🇯",phoneCode:"+253",currency:"DJF",supportsMomo:!1},{value:"Érythrée",label:"🇪🇷 Érythrée",code:"ER",flag:"🇪🇷",phoneCode:"+291",currency:"ERN",supportsMomo:!1},{value:"Éthiopie",label:"🇪🇹 Éthiopie",code:"ET",flag:"🇪🇹",phoneCode:"+251",currency:"ETB",supportsMomo:!1},{value:"Kenya",label:"🇰🇪 Kenya",code:"KE",flag:"🇰🇪",phoneCode:"+254",currency:"KES",supportsMomo:!0},{value:"Madagascar",label:"🇲🇬 Madagascar",code:"MG",flag:"🇲🇬",phoneCode:"+261",currency:"MGA",supportsMomo:!1},{value:"Malawi",label:"🇲🇼 Malawi",code:"MW",flag:"🇲🇼",phoneCode:"+265",currency:"MWK",supportsMomo:!1},{value:"Maurice",label:"🇲🇺 Maurice",code:"MU",flag:"🇲🇺",phoneCode:"+230",currency:"MUR",supportsMomo:!1},{value:"Mozambique",label:"🇲🇿 Mozambique",code:"MZ",flag:"🇲🇿",phoneCode:"+258",currency:"MZN",supportsMomo:!1},{value:"Rwanda",label:"🇷🇼 Rwanda",code:"RW",flag:"🇷🇼",phoneCode:"+250",currency:"RWF",supportsMomo:!1},{value:"Seychelles",label:"🇸🇨 Seychelles",code:"SC",flag:"🇸🇨",phoneCode:"+248",currency:"SCR",supportsMomo:!1},{value:"Somalie",label:"🇸🇴 Somalie",code:"SO",flag:"🇸🇴",phoneCode:"+252",currency:"SOS",supportsMomo:!1},{value:"Tanzanie",label:"🇹🇿 Tanzanie",code:"TZ",flag:"🇹🇿",phoneCode:"+255",currency:"TZS",supportsMomo:!1},{value:"Ouganda",label:"🇺🇬 Ouganda",code:"UG",flag:"🇺🇬",phoneCode:"+256",currency:"UGX",supportsMomo:!1},{value:"Zambie",label:"🇿🇲 Zambie",code:"ZM",flag:"🇿🇲",phoneCode:"+260",currency:"ZMW",supportsMomo:!1},{value:"Zimbabwe",label:"🇿🇼 Zimbabwe",code:"ZW",flag:"🇿🇼",phoneCode:"+263",currency:"ZWL",supportsMomo:!1},{value:"Angola",label:"🇦🇴 Angola",code:"AO",flag:"🇦🇴",phoneCode:"+244",currency:"AOA",supportsMomo:!1},{value:"Botswana",label:"🇧🇼 Botswana",code:"BW",flag:"🇧🇼",phoneCode:"+267",currency:"BWP",supportsMomo:!1},{value:"Eswatini",label:"🇸🇿 Eswatini",code:"SZ",flag:"🇸🇿",phoneCode:"+268",currency:"SZL",supportsMomo:!1},{value:"Lesotho",label:"🇱🇸 Lesotho",code:"LS",flag:"🇱🇸",phoneCode:"+266",currency:"LSL",supportsMomo:!1},{value:"Namibie",label:"🇳🇦 Namibie",code:"NA",flag:"🇳🇦",phoneCode:"+264",currency:"NAD",supportsMomo:!1},{value:"Afrique du Sud",label:"🇿🇦 Afrique du Sud",code:"ZA",flag:"🇿🇦",phoneCode:"+27",currency:"ZAR",supportsMomo:!1}].sort((e,t)=>e.label.localeCompare(t.label));Gc.filter(e=>e.supportsMomo);const Pn=Gc,Gs=Gc.map(e=>({value:e.value,label:`${e.flag} ${e.phoneCode}`,code:e.phoneCode})),hc={BJ:{operators:["MTN_MOMO_BEN","MOOV_BEN"],currencies:["XOF"]},CM:{operators:["MTN_MOMO_CMR","ORANGE_CMR"],currencies:["XAF"]},BF:{operators:["MOOV_BFA","ORANGE_BFA"],currencies:["XOF"]},CD:{operators:["VODACOM_MPESA_COD","AIRTEL_COD","ORANGE_COD"],currencies:["CDF"]},KE:{operators:["MPESA_KEN"],currencies:["KES"]},NG:{operators:["MTN_MOMO_NGA","AIRTEL_NGA"],currencies:["NGN"]},SN:{operators:["FREE_SEN","ORANGE_SEN","WAVE_SEN"],currencies:["XOF"]},CG:{operators:["AIRTEL_COG","MTN_MOMO_COG"],currencies:["XAF"]},GA:{operators:["AIRTEL_GAB"],currencies:["XAF"]},CI:{operators:["MTN_MOMO_CIV","ORANGE_CIV","WAVE_CIV"],currencies:["XOF"]},ML:{operators:["ORANGE_MLI","MOOV_MLI"],currencies:["XOF"]},NE:{operators:["ORANGE_NER","MOOV_NER"],currencies:["XOF"]},GH:{operators:["MTN_MOMO_GHA","VODAFONE_GHA"],currencies:["GHS"]},TG:{operators:["TOGOCOM_TG","MOOV_TG"],currencies:["XOF"]}},Mw=e=>{const t=Gc.find(r=>r.code===e);return(t==null?void 0:t.supportsMomo)||!1},Voe=e=>({MTN_MOMO_BEN:"MTN MoMo Bénin",MOOV_BEN:"Moov Bénin",MTN_MOMO_CMR:"MTN MoMo Cameroun",ORANGE_CMR:"Orange Money Cameroun",MOOV_BFA:"Moov Burkina Faso",ORANGE_BFA:"Orange Burkina Faso",VODACOM_MPESA_COD:"Vodacom M-Pesa RDC",AIRTEL_COD:"Airtel RDC",ORANGE_COD:"Orange RDC",MPESA_KEN:"M-Pesa Kenya",MTN_MOMO_NGA:"MTN MoMo Nigeria",AIRTEL_NGA:"Airtel Nigeria",FREE_SEN:"Free Money Sénégal",ORANGE_SEN:"Orange Money Sénégal",WAVE_SEN:"Wave Sénégal",AIRTEL_COG:"Airtel Congo",MTN_MOMO_COG:"MTN MoMo Congo",AIRTEL_GAB:"Airtel Gabon",MTN_MOMO_CIV:"MTN MoMo Côte d'Ivoire",ORANGE_C
99IV:"Orange Money Côte d'Ivoire",WAVE_CIV:"Wave Côte d'Ivoire",ORANGE_MLI:"Orange Money Mali",MOOV_MLI:"Moov Mali",ORANGE_NER:"Orange Money Niger",MOOV_NER:"Moov Niger",MTN_MOMO_GHA:"MTN MoMo Ghana",VODAFONE_GHA:"Vodafone Ghana",TOGOCOM_TG:"Togocom",MOOV_TG:"Moov Togo"})[e]||e.replace(/_/g," "),Uoe=e=>Gc.find(t=>t.code===e),qoe={CM:["Adamaoua","Centre","Est","Extrême-Nord","Littoral","Nord","Nord-Ouest","Ouest","Sud","Sud-Ouest"],SN:["Dakar","Diourbel","Fatick","Kaffrine","Kaolack","Kédougou","Kolda","Louga","Matam","Saint-Louis","Sédhiou","Tambacounda","Thiès","Ziguinchor"],CI:["Abidjan","Bas-Sassandra","Comoé","Denguélé","Gôh-Djiboua","Lacs","Lagunes","Montagnes","Sassandra-Marahoué","Savanes","Vallée du Bandama","Woroba","Yamoussoukro","Zanzan"],GA:["Estuaire","Haut-Ogooué","Moyen-Ogooué","Ngounié","Nyanga","Ogooué-Ivindo","Ogooué-Lolo","Ogooué-Maritime","Woleu-Ntem"],CG:["Bouenza","Brazzaville","Cuvette","Cuvette-Ouest","Kouilou","Lékoumou","Likouala","Niari","Plateaux","Pointe-Noire","Pool","Sangha"],CD:["Bas-Uele","Équateur","Haut-Katanga","Haut-Lomami","Haut-Uele","Ituri","Kasaï","Kasaï-Central","Kasaï-Oriental","Kinshasa","Kongo-Central","Kwango","Kwilu","Lomami","Lualaba","Mai-Ndombe","Maniema","Mongala","Nord-Kivu","Nord-Ubangi","Sankuru","Sud-Kivu","Sud-Ubangi","Tanganyika","Tshopo","Tshuapa"],BJ:["Alibori","Atacora","Atlantique","Borgou","Collines","Couffo","Donga","Littoral","Mono","Ouémé","Plateau","Zou"],TG:["Centrale","Kara","Maritime","Plateaux","Savanes"],BF:["Boucle du Mouhoun","Cascades","Centre","Centre-Est","Centre-Nord","Centre-Ouest","Centre-Sud","Est","Hauts-Bassins","Nord","Plateau-Central","Sahel","Sud-Ouest"],ML:["Bamako","Gao","Kayes","Kidal","Koulikoro","Mopti","Ségou","Sikasso","Tombouctou"],GN:["Boké","Conakry","Faranah","Kankan","Kindia","Labé","Mamou","Nzérékoré"],NE:["Agadez","Diffa","Dosso","Maradi","Niamey","Tahoua","Tillabéri","Zinder"],TD:["Batha","Borkou","Chari-Baguirmi","Ennedi-Est","Ennedi-Ouest","Guéra","Hadjer-Lamis","Kanem","Lac","Logone Occidental","Logone Oriental","Mandoul","Mayo-Kebbi Est","Mayo-Kebbi Ouest","Moyen-Chari","N'Djamena","Ouaddaï","Salamat","Sila","Tandjilé","Tibesti","Wadi Fira"],CF:["Bamingui-Bangoran","Bangui","Basse-Kotto","Haute-Kotto","Haut-Mbomou","Kémo","Lobaye","Mambéré-Kadéï","Mbomou","Nana-Grébizi","Nana-Mambéré","Ombella-M'Poko","Ouaka","Ouham","Ouham-Pendé","Sangha-Mbaéré","Vakaga"],GQ:["Annobón","Bioko Norte","Bioko Sur","Centro Sur","Djibloho","Kié-Ntem","Litoral","Wele-Nzas"],RW:["Est","Kigali","Nord","Ouest","Sud"],BI:["Bubanza","Bujumbura Mairie","Bujumbura Rural","Bururi","Cankuzo","Cibitoke","Gitega","Karuzi","Kayanza","Kirundo","Makamba","Muramvya","Muyinga","Mwaro","Ngozi","Rumonge","Rutana","Ruyigi"],MG:["Antananarivo","Antsiranana","Fianarantsoa","Mahajanga","Toamasina","Toliara"],MU:["Black River","Flacq","Grand Port","Moka","Pamplemousses","Plaines Wilhems","Port Louis","Rivière du Rempart","Savanne"],SC:["Anse aux Pins","Anse Boileau","Anse Etoile","Anse Royale","Baie Lazare","Baie Sainte Anne","Beau Vallon","Bel Air","Bel Ombre","Cascade","Glacis","Grand Anse Mahe","Grand Anse Praslin","La Digue","La Rivière Anglaise","Les Mamelles","Mont Buxton","Mont Fleuri","Plaisance","Pointe La Rue","Port Glaud","Roche Caïman","Saint Louis","Takamaka"],KM:["Anjouan","Grande Comore","Mohéli"],DJ:["Ali Sabieh","Arta","Dikhil","Djibouti","Obock","Tadjourah"]};function Woe(e){return{pending:"common.statuses.pending",pending_otp_verification:"common.statuses.pendingOTP",pending_admin_approval:"common.statuses.pendingAdminApproval",processing:"common.statuses.processing",completed:"common.statuses.completed",failed:"common.statuses.failed",rejected_by_admin:"common.statuses.rejectedByAdmin",cancelled:"common.statuses.cancelled",refunded:"common.statuses.refunded"}[e]||e}function Hoe(e){return{pending:"#f59e0b",pending_otp_verification:"#f59e0b",pending_admin_approval:"#f59e0b",processing:"#3b82f6",completed:"#10b981",failed:"#ef4444",rejected_by_admin:"#ef4444",cancelled:"#9ca3af",refunded:"#a855f7"}[e]||"#6b7280"}function Goe(e){return e==="pending_admin_approval"}function Koe(e){return e==="rejected_by_admin"}function sd(e){return["pending","pending_otp_verification"].includes(e)}function Xoe(e){return["pending","pending_otp_verification","pending_admin_approval","processing"].includes(e)}function Yoe(e,t){return{pending:"Your withdrawal is pending",pending_otp_verification:"Waiting for OTP verification",pending_admin_approval:"Waiting for admin a
99pproval",processing:"Your withdrawal is being processed",completed:"Withdrawal completed successfully",failed:"Withdrawal failed",rejected_by_admin:"Withdrawal rejected",cancelled:"Withdrawal cancelled",refunded:"Withdrawal refunded"}[e]||e}const Qoe=e=>{const t=[];return t.push({id:"crypto",name:"Cryptocurrency",icon:s.jsx(L,{icon:p$,size:24}),description:"Withdraw to your crypto wallet",minAmount:10,currency:"USD",requirements:["Minimum: $10 USD","No multiple requirement","Uses saved crypto wallet details","Available in all African countries"]}),e&&t.push({id:"mobile_money",name:"Mobile Money",icon:s.jsx(L,{icon:D$,size:24}),description:"Withdraw to your mobile money account",minAmount:1500,currency:"XAF",requirements:["Minimum: 1500 XAF","Must be multiple of 5","Uses saved mobile money details","Available in your country"]}),t},Zoe=({isOpen:e,onClose:t})=>{var ue;const r=lt(),{user:n,refreshUser:i}=Gt(),[a,o]=C.useState(null),[l,c]=C.useState(""),[u,f]=C.useState("select"),[x,m]=C.useState(!1),[p,y]=C.useState(""),[v,b]=C.useState(""),[E,N]=C.useState(!1),[j,A]=C.useState(""),[w,S]=C.useState(""),[B,D]=C.useState(""),[P,O]=C.useState("BTC"),[M,I]=C.useState(""),[V,W]=C.useState(null),[_,z]=C.useState(!1),R=(n==null?void 0:n.balance)||0,q=(n==null?void 0:n.usdBalance)||0,G=C.useMemo(()=>n!=null&&n.country?Mw(n.country):!1,[n==null?void 0:n.country]),K=C.useMemo(()=>Qoe(G),[G]),$=async()=>{z(!0);try{const de=await X.getPendingWithdrawals(),me=Ve(de);if(me&&me.transactions&&me.transactions.length>0){const Le=me.transactions.find(Ne=>Xoe(Ne.status));if(Le)return W(Le),f("pending"),!0}return W(null),!1}catch(de){return console.error("Failed to check pending withdrawals:",de),W(null),!1}finally{z(!1)}};C.useEffect(()=>{e&&(o(null),c(""),y(""),b(""),I(""),N(!1),W(null),n&&(A(n.momoNumber||""),S(n.momoOperator||""),D(n.cryptoWalletAddress||""),O(n.cryptoWalletCurrency||"BTC")),$().then(de=>{de||f("select")}))},[e,n]);const H=de=>{if(de==="mobile_money"&&!G){y("Mobile Money is not available in your country. Please use cryptocurrency withdrawal.");return}o(de),y(""),de==="mobile_money"&&(!(n!=null&&n.momoNumber)||!(n!=null&&n.momoOperator))||de==="crypto"&&(!(n!=null&&n.cryptoWalletAddress)||!(n!=null&&n.cryptoWalletCurrency))?f("configure"):f("amount")},te=async()=>{if(a){m(!0),y("");try{if(a==="mobile_money"){if(!j||!w){y("Please fill in all mobile money details");return}await X.updateMomoDetails(j,w)}else if(a==="crypto"){if(!B||!P){y("Please fill in all crypto wallet details");return}await X.updateCryptoWallet({cryptoWalletAddress:B,cryptoWalletCurrency:P})}await i(),f("amount"),b("Configuration saved successfully!")}catch(de){y(de instanceof Error?de.message:"Failed to save configuration")}finally{m(!1)}}},ne=()=>{if(!a||!l)return!1;const de=K.find(Ne=>Ne.id===a),me=parseFloat(l);if(isNaN(me)||me<=0)return y("Please enter a valid amount"),!1;if(me<de.minAmount)return y(`Minimum ${de.name} withdrawal: ${de.minAmount} ${de.currency}`),!1;const Le=a==="crypto"?q:R;return me>Le?(y(`Insufficient balance. Available: ${Le.toFixed(2)} ${de.currency}`),!1):a==="mobile_money"&&me%5!==0?(y("Mobile money amount must be a multiple of 5"),!1):!0},Y=async()=>{if(!E&&!(!ne()||!a)){N(!0),m(!0),y("");try{const de=await X.initiateUnifiedWithdrawal(parseFloat(l),a),me=Ve(de);if(me&&me.transactionId)if(me.status==="pending_otp_verification"){const Le=K.find(Ne=>Ne.id===a);r("/otp",{state:{withdrawalId:me.transactionId,withdrawalAmount:parseFloat(l),withdrawalCurrency:Le.currency,flow:"withdrawal"}}),t()}else t();else throw new Error("Failed to initiate withdrawal")}catch(de){y(de instanceof Error?de.message:"Failed to initiate withdrawal"),N(!1)}finally{m(!1)}}},J=()=>{if(!V)return;const de=V.transactionId||V._id;V.status==="pending_otp_verification"&&(r("/otp",{state:{withdrawalId:de,withdrawalAmount:V.amount,withdrawalCurrency:V.currency,flow:"withdrawal"}}),t())},oe=async()=>{if(!V)return;const de=V.transactionId||V._id;if(!sd(V.status)){y("Cette transaction ne peut plus être annulée car elle est en cours de traitement par l'administrateur.");return}m(!0),y("");try{await X.cancelWithdrawal(de),b("Retrait annulé avec succès"),W(null),await i(),setTimeout(()=>{f("select"),b("")},1500)}catch(me){y(me instanceof Error?me.message:"Échec de l'annulation")}finally{m(!1)}},he=async()=>
99{if(M)try{await X.cancelWithdrawal(M),b("Withdrawal cancelled successfully")}catch{}t()};if(!e)return null;const Q=a?K.find(de=>de.id===a):null;return s.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50",children:s.jsxs("div",{className:"bg-white rounded-2xl w-full max-w-md max-h-[90vh] overflow-y-auto",children:[s.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-border",children:[s.jsxs("h3",{className:"text-xl font-bold text-gray-900",children:[u==="select"&&"Select Withdrawal Type",u==="configure"&&`Configure ${Q==null?void 0:Q.name}`,u==="amount"&&`${Q==null?void 0:Q.name} Withdrawal`,u==="success"&&"Success!",u==="pending"&&"Retrait en cours"]}),s.jsx("button",{onClick:he,disabled:x,className:"text-gray-400 hover:text-gray-600 p-1 disabled:opacity-50",children:s.jsx(L,{icon:gt,size:20})})]}),s.jsxs("div",{className:"p-6",children:[u==="select"&&s.jsxs("div",{className:"space-y-4",children:[s.jsx("p",{className:"text-gray-600 text-sm mb-6",children:"Choose your preferred withdrawal method:"}),K.map(de=>s.jsx("button",{onClick:()=>H(de.id),className:"w-full p-4 border border-border rounded-xl hover:border-primary hover:bg-blue-50 transition-all text-left",children:s.jsxs("div",{className:"flex items-start space-x-4",children:[s.jsx("div",{className:"text-blue-600 mt-1",children:de.icon}),s.jsxs("div",{className:"flex-1",children:[s.jsx("h4",{className:"font-semibold text-gray-900",children:de.name}),s.jsx("p",{className:"text-sm text-gray-600 mb-2",children:de.description}),s.jsx("div",{className:"text-xs text-gray-500",children:de.requirements.map((me,Le)=>s.jsxs("div",{children:["• ",me]},Le))})]})]})},de.id)),!G&&s.jsx("div",{className:"bg-yellow-50 border border-border rounded-xl p-4",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:"text-yellow-600 text-xl",children:"📱"}),s.jsxs("div",{children:[s.jsx("div",{className:"font-medium text-yellow-800 mb-1",children:"Mobile Money non disponible"}),s.jsxs("div",{className:"text-sm text-yellow-700 mb-2",children:["Mobile Money n'est pas encore pris en charge pour votre pays.",n!=null&&n.country?` (${((ue=Uoe(n.country))==null?void 0:ue.value)||n.country})`:""]}),s.jsxs("div",{className:"text-sm text-yellow-600",children:["✅ ",s.jsx("strong",{children:"Alternative :"})," Utilisez les retraits crypto qui sont disponibles dans tous les pays africains."]})]})]})}),s.jsxs("div",{className:"mt-6 p-4 bg-gray-50 rounded-xl",children:[s.jsx("h4",{className:"font-semibold text-gray-900 mb-2",children:"Available Balances"}),s.jsxs("div",{className:"space-y-1 text-sm",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"FCFA Balance:"}),s.jsxs("span",{className:"font-medium",children:[R.toLocaleString("fr-FR")," F"]})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"USD Balance:"}),s.jsxs("span",{className:"font-medium",children:["$",q.toFixed(2)]})]})]})]})]}),u==="configure"&&Q&&s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center space-x-3 mb-4",children:[s.jsx("div",{className:"text-blue-600",children:Q.icon}),s.jsxs("h4",{className:"font-semibold text-gray-900",children:[Q.name," Setup"]})]}),a==="mobile_money"&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Mobile Money Number"}),s.jsx("input",{type:"text",value:j,onChange:de=>A(de.target.value),placeholder:"e.g., 237675080477",className:"w-full px-3 py-2 border border-border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"}),s.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Include country code (e.g., 237 for Cameroon)"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Mobile Money Operator"}),s.jsxs("select",{value:w,onChange:de=>S(de.target.value),className:"w-full px-3 py-2 border border-border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500",children:[s.jsx("option",{value:"",children:"Select Operator"}),s.jsx("option",{value:"MTN",children:"MTN"}),s.jsx("option",{value:"ORANGE",children:"Orange"}),s.jsx("option",{value:"MOOV",children:"Moov"}),s.jsx("option",{value:"WAVE",children:"Wave"}),s.jsx("option",{value:"FREE",children:"Free"}),s.jsx("option",{value:"TMONEY",children:"T-Money"}),s.jsx("option",{value:"FLOOZ",children:"Flooz"}),s.jsx("option",{value:"MPESA",children:"M-Pesa"}),s.jsx("option",{value:"AIRTEL",children:"Airtel"})]})]})]}),a==="crypto"&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Crypto Wallet Address"}),s.jsx("input",{type:"text",value:B,onChange:de=>D(de.target.value),placeholder:"Enter your wallet address",className:"w-full px-3 py-2 border border-border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Cryptocurrency"}),s.jsxs("select",{value:P,onChange:de=>O(de.target.value),className:"w-full px-3 py-2 border border-border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500",children:[s.jsx("option",{value:"BTC",children:"Bitcoin"}),s.jsx("option",{value:"LTC",children:"Litecoin"}),s.jsx("option",{value:"XRP",children:"Ripple"}),s.jsx("option",{value:"TRX",children:"TRON"}),s.jsx("option",{value:"USDTSOL",children:"USDT (Solana)"}),s.jsx("option",{value:"USDTBSC",children:"USDT (BSC-BEP20)"}),s.jsx("option",{value:"BNBBSC",children:"BNB (BSC-BEP20)"})]})]})]}),s.jsxs("button",{onClick:te,disabled:x,className:"w-full bg-blue-600 text-white py-3 px-4 roun
99ded-lg hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center",children:[x?s.jsx(L,{icon:Yt,className:"animate-spin mr-2"}):null,"Save Configuration"]})]}),u==="amount"&&Q&&s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center space-x-3 mb-4",children:[s.jsx("div",{className:"text-blue-600",children:Q.icon}),s.jsxs("h4",{className:"font-semibold text-gray-900",children:[Q.name," Withdrawal"]})]}),s.jsxs("div",{children:[s.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Amount (",Q.currency,")"]}),s.jsx("input",{type:"number",value:l,onChange:de=>c(de.target.value),placeholder:`Minimum: ${Q.minAmount} ${Q.currency}`,min:Q.minAmount,step:a==="mobile_money"?"5":"0.01",className:"w-full px-3 py-2 border border-border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"}),s.jsxs("div",{className:"text-xs text-gray-500 mt-1",children:[s.jsxs("div",{children:["Available: ",a==="crypto"?`$${q.toFixed(2)}`:`${R.toLocaleString("fr-FR")} F`]}),s.jsxs("div",{children:["Minimum: ",Q.minAmount," ",Q.currency]})]})]}),s.jsxs("div",{className:"p-4 bg-gray-50 rounded-lg",children:[s.jsx("h5",{className:"font-semibold text-gray-900 mb-2",children:"Requirements:"}),s.jsx("ul",{className:"text-xs text-gray-600 space-y-1",children:Q.requirements.map((de,me)=>s.jsxs("li",{children:["• ",de]},me))})]}),s.jsxs("button",{onClick:Y,disabled:x||!l||E,className:"w-full bg-green-600 text-white py-3 px-4 rounded-lg hover:bg-green-700 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center",children:[x||E?s.jsx(L,{icon:Yt,className:"animate-spin mr-2"}):null,E?"Traitement en cours...":"Initiate Withdrawal"]})]}),u==="pending"&&V&&s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"flex justify-center",children:s.jsx("div",{className:"w-16 h-16 bg-orange-100 rounded-full flex items-center justify-center",children:s.jsx(L,{icon:b3,className:"text-orange-500",size:28})})}),s.jsxs("div",{className:"text-center",children:[s.jsx("h4",{className:"font-semibold text-gray-900 mb-2",children:"Vous avez un retrait en cours"}),s.jsx("p",{className:"text-sm text-gray-600",children:"Vous devez compléter ou annuler cette transaction avant d'en initier une nouvelle."})]}),s.jsxs("div",{className:"bg-gray-50 rounded-xl p-4 space-y-2",children:[s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{className:"text-gray-600",children:"Montant:"}),s.jsxs("span",{className:"font-semibold text-gray-900",children:[V.amount.toLocaleString("fr-FR")," ",V.currency]})]}),s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{className:"text-gray-600",children:"Type:"}),s.jsx("span",{className:"font-semibold text-gray-900",children:V.withdrawalType==="crypto"?"Crypto":"Mobile Money"})]}),s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{className:"text-gray-600",children:"Statut:"}),s.jsx("span",{className:`font-semibold ${V.status==="pending_otp_verification"?"text-orange-600":V.status==="pending_admin_approval"||V.status==="processing"?"text-blue-600":"text-gray-600"}`,children:Yoe(V.status)})]}),s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{className:"text-gray-600",children:"ID:"}),s.jsx("span",{className:"font-mono text-xs text-gray-500",children:(V.transactionId||V._id).slice(-8)})]})]}),s.jsxs("div",{className:"space-y-3",children:[V.status==="pending_otp_verification"&&s.jsxs("button",{onClick:J,disabled:x,className:"w-full bg-green-600 text-white py-3 px-4 rounded-lg hover:bg-green-700 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center font-semibold",children:[x?s.jsx(L,{icon:Yt,className:"animate-spin mr-2"}):null,"Continuer la vérification OTP"]}),sd(V.status)?s.jsxs("button",{onClick:oe,disabled:x,className:"w-full bg-red-500 text-white py-3 px-4 rounded-lg hover:bg-red-600 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center font-semibold",children:[x?s.jsx(L,{icon:Yt,className:"animate-spin mr-2"}):null,"Annuler le retrait"]}):s.jsx("div",{className:"bg-blue-50 border border-border rounded-lg p-3",children:s.jsxs("p",{className:"text-blue-700 text-sm text-center",children:[s.jsx("strong",{children:"Information:"})," Cette transaction est en cours de traitement par l'administrateur et ne peut plus être annulée."]})}),s.jsx("button",{onClick:t,disabled:x,className:"w-full bg-gray-200 text-gray-700 py-3 px-4 roun
99ded-lg hover:bg-gray-300 disabled:opacity-50 font-semibold",children:"Fermer"})]})]}),_&&s.jsxs("div",{className:"flex flex-col items-center justify-center py-8",children:[s.jsx(L,{icon:Yt,className:"animate-spin text-blue-600 mb-3",size:32}),s.jsx("p",{className:"text-gray-600 text-sm",children:"Vérification des transactions en cours..."})]}),u==="success"&&s.jsxs("div",{className:"text-center space-y-4",children:[s.jsx("div",{className:"w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx(L,{icon:Ur,className:"text-green-600",size:24})}),s.jsx("h4",{className:"font-semibold text-gray-900 mb-2",children:"Withdrawal Successful!"}),s.jsx("p",{className:"text-sm text-gray-600",children:"Your withdrawal has been processed successfully. You will receive your funds shortly."}),s.jsxs("p",{className:"text-xs text-gray-500",children:["Transaction ID: ",M]})]}),p&&s.jsx("div",{className:"mt-4 p-3 bg-red-50 border border-border rounded-lg",children:s.jsx("p",{className:"text-red-600 text-sm",children:p})}),v&&!p&&s.jsx("div",{className:"mt-4 p-3 bg-green-50 border border-border rounded-lg",children:s.jsx("p",{className:"text-green-600 text-sm",children:v})}),u==="select"&&s.jsxs("div",{className:"mt-6 p-4 bg-yellow-50 border border-border rounded-lg",children:[s.jsx("h5",{className:"font-semibold text-yellow-800 mb-2",children:"Important Notes:"}),s.jsxs("ul",{className:"text-xs text-yellow-700 space-y-1",children:[s.jsx("li",{children:"• Maximum 3 successful withdrawals per 24 hours (all types combined)"}),s.jsx("li",{children:"• Processing time: 1-5 minutes for mobile money, 15-30 minutes for crypto"}),s.jsx("li",{children:"• All withdrawals require OTP verification via email/SMS"}),s.jsx("li",{children:"• Ensure your saved payment details are correct before withdrawing"})]})]})]})]})})};function Joe(){const e=lt(),{user:t,refreshUser:r}=Gt(),[n,i]=C.useState(!1),[a,o]=C.useState(!1),[l,c]=C.useState(!1),u=(t==null?void 0:t.balance)||0,f=(t==null?void 0:t.usdBalance)||0,x=()=>{e("/activation-balance")},m=()=>{c(!0)};return s.jsx(nn,{children:s.jsxs("div",{className:"p-4 h-screen bg-white",children:[s.jsxs("div",{className:"flex items-center mb-6",children:[s.jsx(Ct,{}),s.jsx("h3",{className:"text-xl font-medium text-center w-full text-gray-900",children:"Gestion financière"})]}),s.jsxs("div",{className:"mb-6 p-4 bg-blue-50 border border-border rounded-2xl",children:[s.jsx("h4",{className:"text-lg font-semibold text-blue-800 mb-2",children:"Taux de change actuel"}),s.jsxs("div",{className:"text-center",children:[s.jsxs("div",{className:"text-xl font-bold text-blue-900 mb-1",children:["USD → FCFA: 1$ = ",vi.DISPLAY.USD_TO_XAF_RATE,"F"]}),s.jsxs("div",{className:"text-lg font-bold text-blue-900",children:["FCFA → USD: ",vi.DISPLAY.XAF_TO_USD_RATE,"F = 1$"]}),s.jsx("div",{className:"text-sm text-blue-600 mt-2",children:"Taux de conversion"})]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-8",children:[s.jsxs("div",{className:"bg-primary p-6 rounded-2xl text-white",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm opacity-80",children:"Solde FCFA"}),s.jsxs("p",{className:"text-2xl font-bold",children:[u.toLocaleString("fr-FR")," F"]})]}),s.jsx(L,{icon:Ba,size:32,className:"opacity-80"})]}),s.jsx("div",{className:"text-xs opacity-70",children:"Franc CFA"})]}),s.jsxs("div",{className:"bg-success p-6 rounded-2xl text-white",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm opacity-80",children:"Solde USD"}),s.jsxs("p",{className:"text-2xl font-bold",children:["$",f.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})]})]}),s.jsx(L,{icon:Ba,size:32,className:"opacity-80"})]}),s.jsx("div",{className:"text-xs opacity-70",children:"Dollar américain"})]})]}),s.jsxs("div",{className:"mb-8",children:[s.jsx("h4",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Actions rapides"}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("button",{onClick:()=>i(!0),className:"flex flex-col items-center justify-center bg-orange-500 hover:bg-orange-600 text-white p-6 rounded-2xl transition-colors",children:[s.jsx(L,{icon:$c,size:32,className:"mb-2"}),s.jsx("span",{className:"font-semibold",children:"Convertir"}),s.jsx("span",{className:"text-xs opacity-80",children:"FCFA ⇄ USD"})]}),s.jsxs("button",{onClick:()=>o(!0),className:"flex flex-col items-center justify-center bg-green-500 hover:bg-green-600 text-white p-6 rounded-2xl transition-colors",children:[s.jsx(L,{icon:ly,size:32,className:"mb-2"}),s.jsx("span",{className:"font-semibold",children:"Retirer"}),s.jsx("span",{className:"text-xs opacity-80",children:"MoMo & Crypto"})]}),s.jsxs("button",{onClick:()=>e("/wallet"),className:"flex flex-col items-center justify-center bg-purple-500 hover:bg-purple-600 text-white p-6 rounded-2xl transition-colors",children:[s.jsx(L,{icon:Ba,size:32,className:"mb-2"}),s.jsx("span",{className:"font-semibold",children:"Portefeuille"}),s.jsx("span",{className:"text-xs opacity-80",children:"Transactions"})]}),s.jsxs("button",{onClick:m,className:"flex flex-col items-center justify-center bg-primary hover:bg-blue-700 text-white p-6 rounded-2xl transition-colors",children:[s.jsx(L,{icon:Th,size:32,className:"mb-2"}),s.jsx("span",{className:"font-semibold",children:"Alimenter"}),s.jsx("span",{className:"text-xs opacity-80",children:"Solde Activation"})]})]}),s.jsxs("button",{onClick:x,className:"bg-primary-soft w-full mt-4 flex items-center justify-between border border-border p-4 rounded-2xl transition-shadow",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"bg-blue-100 p-3 rounded-full",children:s.jsx(L,{icon:Al,size:24,className:"text-primary"})}),s.jsxs("div",{className:"text-left",children:[s.jsx("span",{className:"font-semibold text-gray-900 block",children:"Solde d'Activation"}),s.jsx("span",{className:"text-xs text-gray-500",children:"Voir & sponsoriser vos filleuls"})]})]}),s.jsx("span",{className:"text-gray-400",children:"→"})]})]}),s.jsxs("div",{className:"bg-gray-50 p-6 rounded-2xl",children:[s.jsx("h4",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Résumé financier"}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("span",{className:"text-gray-600",children:"Total FCFA"}),s.jsxs("span",{className:"font-semibold text-gray-900",children:[u.toLocaleStr
99ing("fr-FR")," F"]})]}),s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("span",{className:"text-gray-600",children:"Total USD"}),s.jsxs("span",{className:"font-semibold text-gray-900",children:["$",f.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})]})]}),s.jsx("div",{className:"border-t pt-4",children:s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("span",{className:"text-gray-800 font-medium",children:"Soldes disponibles"}),s.jsx("span",{className:"text-green-600 font-bold",children:"2 devises"})]})})]})]}),s.jsx(sV,{isOpen:n,onClose:()=>i(!1),onConversionComplete:()=>{}}),s.jsx(Zoe,{isOpen:a,onClose:()=>o(!1),onWithdrawalComplete:()=>{}}),s.jsx(ele,{isOpen:l,onClose:()=>c(!1),mainBalance:u,onSuccess:()=>{r()}})]})})}function ele({isOpen:e,onClose:t,mainBalance:r,onSuccess:n}){const[i,a]=C.useState(""),[o,l]=C.useState(!1),[c,u]=C.useState(""),[f,x]=C.useState(!1),m=100,p=async()=>{const v=parseInt(i);if(isNaN(v)||v<m){u(`Le montant minimum est de ${m.toLocaleString("fr-FR")} F`);return}if(v>r){u("Solde principal insuffisant");return}l(!0),u("");try{const b=await X.transferToActivationBalance(v);Ve(b),x(!0),n(),setTimeout(()=>{t(),a(""),x(!1)},2e3)}catch(b){u(b instanceof Error?b.message:"Une erreur est survenue")}finally{l(!1)}},y=()=>{a(""),u(""),x(!1),t()};return e?s.jsx(Z.div,{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",initial:{opacity:0}
99,animate:{opacity:1},exit:{opacity:0},onClick:y,children:s.jsx(Z.div,{className:"bg-white rounded-2xl p-6 w-[90vw] max-w-md border border-border",initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},onClick:v=>v.stopPropagation(),children:f?s.jsxs("div",{className:"text-center py-6",children:[s.jsx("div",{className:"w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx(L,{icon:Ur,className:"text-green-600",size:32})}),s.jsx("h4",{className:"text-xl font-bold text-green-600 mb-2",children:"Transfert réussi !"}),s.jsx("p",{className:"text-gray-600",children:"Votre solde d'activation a été alimenté."})]}):s.jsxs(s.Fragment,{children:[s.jsx("h4",{className:"text-xl font-bold text-gray-900 mb-4",children:"Alimenter le solde d'activation"}),s.jsxs("div",{className:"bg-gray-50 rounded-xl p-4 mb-4",children:[s.jsx("p",{className:"text-sm text-gray-600",children:"Solde principal disponible"}),s.jsxs("p",{className:"text-2xl font-bold text-gray-900",children:[r.toLocaleString("fr-FR")," F"]})]}),s.jsxs("div",{className:"mb-4",children:[s.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:["Montant à transférer (min. ",m.toLocaleString("fr-FR")," F)"]}),s.jsx("input",{type:"number",value:i,onChange:v=>{a(v.target.value),u("")},placeholder:"Ex: 5000",className:"w-full border border-border rounded-xl px-4 py-3 focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),c&&s.jsx("div",{className:"mb-4 p-3 bg-red-50 border border-border rounded-xl",children:s.jsx("p",{className:"text-red-600 text-sm",children:c})}),s.jsx("div",{className:"bg-yellow-50 border border-border rounded-xl p-3 mb-4",children:s.jsx("p",{className:"text-xs text-yellow-700",children:"⚠️ Ce transfert est irréversible. Le solde d'activation ne peut être utilisé que pour sponsoriser vos filleuls."})}),s.jsxs("div",{className:"flex gap-3",children:[s.jsx("button",{onClick:y,className:"flex-1 bg-gray-200 text-gray-700 py-3 rounded-xl font-semibold hover:bg-gray-300 transition-colors",children:"Annuler"}),s.jsx("button",{onClick:p,disabled:o||!i,className:"flex-1 bg-primary text-white py-3 rounded-xl font-semibold hover:bg-blue-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2",children:o?s.jsx(L,{icon:Yt,className:"animate-spin"}):"Transférer"})]})]})})}):null}const tle="/assets/contact-DvGyqBPJ.png";function rle(){const e=lt(),{hasCredits:t,isLoading:r}=Uh(),[n,i]=C.useState(!0),[a,o]=C.useState(!1);C.useEffect(()=>{const u=setTimeout(()=>i(!1),1200);return()=>clearTimeout(u)},[]);const l=()=>{e("/relance")},c=()=>{o(!0)};return s.jsxs("div",{className:"p-3 h-screen mb-36",children:[n?s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx($e,{width:"w-10",height:"h-10",rounded:"rounded-xl"}),s.jsx($e,{width:"w-40",height:"h-8",rounded:"rounded-xl"})]}),s.jsx($e,{height:"h-44",rounded:"rounded-2xl"})]}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center",children:[s.jsx(Ct,{}),s.jsx("h3",{className:"text-xl font-medium text-center w-full",children:"Marketing"})]}),s.jsx("div",{className:"flex flex-col gap-4 mt-6",children:s.jsxs(Z.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{delay:.1},className:"bg-success rounded-2xl p-5 flex items-center justify-between relative overflow-hidden",children:[s.jsxs("div",{className:"w-full",children:[s.jsx("div",{className:"uppercase text-white text-xs",children:"Relance email & SMS"}),s.jsx("div",{className:"flex items-baseline gap-2",children:s.jsx("div",{className:"text-2xl font-bold text-white",children:"À l'usage"})}),s.jsx("div",{className:"text-white text-sm mt-1 mb-3",children:"Achetez des packs de crédits — payez seulement les messages que vous envoyez."}),s.jsxs("ul",{className:"mt-3 mb-4 space-y-1",children:[s.jsxs("li",{className:"flex items-center text-white text-xs gap-2",children:[s.jsx(L,{icon:tc,className:"text-green-200 w-3 h-3 flex-shrink-0"}),s.jsx("span",{children:"Messages automatiques pendant 7 jours"})]}),s.jsxs("li",{className:"flex items-center text-white text-xs gap-2",children:[s.jsx(L,{icon:tc,className:"text-green-200 w-3 h-3 flex-shrink-0"}),s.jsx("span",{children:"Relance intelligente des filleuls non-payants"})]}),s.jsxs("li",{className:"flex items-center text-white text-xs gap-2",children:[s.jsx(L,{icon:tc,className:"text-green-200 w-3 h-3 flex-shrink-0"}),s.jsx("span",{children:"Augmente vos chances de conversion"})]}),s.jsxs("li",{className:"flex items-center text-white text-xs gap-2",children:[s.jsx(L,{icon:tc,className:"text-green-200 w-3 h-3 flex-shrink-0"}),s.jsx("span",{children:"Emails personnalisés avec campagnes ciblées"})]}),s.jsxs("li",{className:"flex items-center text-white text-xs gap-2",children:[s.jsx(L,{icon:tc,className:"text-green-200 w-3 h-3 flex-shrink-0"}),s.jsx("span",{children:"Contrôle total: activer/suspendre à tout moment"})]}),s.jsxs("li",{className:"flex items-center text-white text-xs gap-2",children:[s.jsx(L,{icon:tc,className:"text-green-200 w-3 h-3 flex-shrink-0"}),s.jsx("span",{children:"Suivi en temps réel des messages envoyés"})]}),s.jsxs("li",{className:"flex items-center text-white text-xs gap-2",children:[s.jsx(L,{icon:tc,className:"text-green-200 w-3 h-3 flex-shrink-0"}),s.jsx("span",{children:"Économisez du temps et maximisez vos revenus"})]})]}),s.jsx("div",{className:"mt-3 flex gap-2 flex-wrap",children:r?s.jsx("button",{className:"bg-white/30 text-white rounded-xl px-4 py-2 font-bold cursor-wait border border-border",disabled:!0,children:"Vérification..."}):t?s.jsxs(s.Fragment,{children:[s.jsxs("button",{onClick:l,className:"bg-green-600 text-white rounded-xl px-4 py-2 font-bold hover:bg-green-700 transition-colors flex items-center gap-2",children:[s.jsx("span",{children:"✓"}),"Accéder à Relance"]}),s.jsx("button",{onClick:c,className:"bg-white text-whatsapp rounded-xl px-4 py-2 font-bold hover:bg-green-50 transition-colors border border-border",children:"Acheter des crédits"})]}):s.jsx("button",{onClick:c,className:"bg-white text-whatsapp rounded-xl px-4 py-2 font-bold hover:bg-green-50 transition-colors border border-border",children:"Acheter des crédits"})})]}),s.jsx("div",{className:"absolute right-4 bottom-4 opacity-30",children:s.jsx("img",{src:tle,alt:"icon",className:"size-40"})})]})})]}),s.jsx(kf,{isOpen:a,onClose:()=>o(!1)})]})}const Rg={food:{label:"Alimentation",icon:Pre,tint:"bg-accent-soft text-accent"},apparel:{label:"Mode",icon:_re,tint:"bg-primary-soft text-primary"},cosmetics:{label:"Cosmétiques",icon:Dre,tint:"bg-danger-soft text-danger"},jewelry:{label:"Bijoux",icon:xre,tint:"bg-accent-soft text-accent"},electronics:{label:"Électronique",icon:lre,tint:"bg-primary-soft text-primary"}
99,general:{label:"Généraliste",icon:A3,tint:"bg-surface-2 text-ink-2"},digital:{label:"Digital",icon:ore,tint:"bg-success-soft text-success"}},nle="/shop-directory/shops",sle="https://sniperbusinesscenter.shop/dashboard/login",ile=72*60*60*1e3,ale=(e,t=Date.now())=>{const r=Date.parse(e.createdAt);return Number.isFinite(r)&&t-r<=ile};async function ole(e){const t=await fetch(nle,{signal:e});if(!t.ok)throw new Error(`Directory responded ${t.status}`);return(await t.json()).shops??[]}const GS=["bg-primary-soft text-primary","bg-accent-soft text-accent","bg-success-soft text-success","bg-danger-soft text-danger","bg-surface-2 text-ink-2"],lle=e=>GS[[...e].reduce((t,r)=>t+r.charCodeAt(0),0)%GS.length];function cle({shop:e,index:t}){const r=Rg[e.businessType]??Rg.general,n=lle(e.slug),[i,a]=C.useState(!1),[o,l]=C.useState(!1),c=!!e.bannerUrl&&!i,u=!!e.logoUrl&&!o;return s.jsxs(Z.a,{href:e.url,target:"_blank",rel:"noopener noreferrer",whileTap:{scale:.98},initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:Math.min(t*.02,.2)},className:"block bg-surface border border-border rounded-card overflow-hidden",children:[s.jsxs("div",{className:mt("relative h-24 w-full",!c&&n),children:[c?s.jsx("img",{src:e.bannerUrl,alt:"","aria-hidden":!0,loading:"lazy",decoding:"async",onError:()=>a(!0),className:"h-full w-full object-cover"}):s.jsx("span",{className:"absolute inset-0 grid place-items-center opacity-40",children:s.jsx(L,{icon:r.icon,size:30})}),ale(e)&&s.jsx("span",{className:"absolute top-2 right-2 text-[9px] font-bold uppercase tracking-wide px-1.5 py-0.5 rounded-pill bg-success text-white",children:"Nouveau"})]}),s.jsxs("div",{className:"p-3 pt-0 flex flex-col",children:[s.jsx("span",{className:mt("relative z-10 shrink-0 -mt-6 mb-1.5 size-12 rounded-tile overflow-hidden block",u&&"border-2 border-surface bg-surface"),children:u&&s.jsx("img",{src:e.logoUrl,alt:"","aria-hidden":!0,loading:"lazy",decoding:"async",onError:()=>l(!0),className:"h-full w-full object-contain p-1"})}),s.jsxs("span",{className:"min-w-0",children:[s.jsxs("span",{className:"flex items-center gap-1.5 min-w-0",children:[s.jsx("span",{className:"font-semibold text-ink text-sm truncate",children:e.name}),s.jsx(L,{icon:k$,size:13,className:"text-ink-3 shrink-0"})]}),s.jsx("span",{className:"block text-xs text-ink-3 truncate",children:e.slug}),s.jsxs("span",{className:mt("mt-1 inline-flex items-center gap-1 text-[10px] font-semibold px-2 py-0.5 rounded-pill",r.tint),children:[s.jsx(L,{icon:r.icon,size:11}),r.label]})]})]})]})}const ule=()=>hr({queryKey:["shop-directory"],queryFn:({signal:e})=>ole(e).then(t=>[...t].sort((r,n)=>Date.parse(n.createdAt)-Date.parse(r.createdAt))),staleTime:10*60*1e3,gcTime:60*60*1e3,refetchOnWindowFocus:!1,retry:1});function dle(e,t=12){const[r,n]=C.useState(t),i=C.useRef(null);C.useEffect(()=>{n(t)},[e,t]);const a=r<e.length,o=C.useCallback(()=>{n(l=>Math.min(l+t,e.length))},[t,e.length]);return C.useEffect(()=>{const l=i.current;if(!l||!a)return;const c=new IntersectionObserver(u=>{u.some(f=>f.isIntersecting)&&o()},{rootMargin:"200px"});return c.observe(l),()=>c.disconnect()},[a,o]),{visible:e.slice(0,r),hasMore:a,sentinel:i,loadMore:o}}function xle(){const{data:e,isLoading:t,error:r,refetch:n}=ule(),[i,a]=C.useState(""),[o,l]=C.useState("all"),c=C.useMemo(()=>e??[],[e]),u=C.useMemo(()=>{const y=new Map;for(const v of c)y.set(v.businessType,(y.get(v.businessType)??0)+1);return[...y.entries()].sort((v,b)=>b[1]-v[1])},[c]),f=C.useMemo(()=>{const y=i.trim().toLowerCase();return c.filter(v=>(o==="all"||v.businessType===o)&&(!y||v.name.toLowerCase().includes(y)||v.slug.toLowerCase().includes(y)))},[c,i,o]),{visible:x,hasMore:m,sentinel:p}=dle(f,12);return s.jsxs(nn,{children:[s.jsxs("div",{className:"p-4 flex flex-col gap-4",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-bold text-ink",children:"SBC Shop"}),s.jsx("p",{className:"text-xs text-ink-3",children:t?"Chargement des boutiques…":`${c.length} boutiques membres`})]}),s.jsxs("div",{className:"relative search-bar",children:[s.jsx(L,{icon:vo,size:18,className:"absolute left-3 top-1/2 -translate-y-1/2 text-ink-3 pointer-events-none"}),s.jsx("input",{value:i,onChange:y=>a(y.target.value),placeholder:"Rechercher une boutique…","aria-label":"Rechercher une boutique",className:"w-full bg-surface border border-border rounded-pill pl-10 pr-10 py-2.5 text-sm text-ink placeholder:text-ink-3 focus:outline-none focus:border-primary"}),i&&s.jsx("button",{onClick:()=>a(""),"aria-label":"Effacer la recherche",className:"absolute right-3 top-1/2 -translate-y-1/2 text-ink-3",children:s.jsx(L,{icon:gt,size:16})})]}),u.length>1&&s.jsxs("div",{className:"category-filters flex gap-2 overflow-x-auto -mx-4 px-4 pb-1 no-scrollbar",children:[s.jsxs("button",{onClick:()=>l("all"),className:mt("shrink-0 text-xs font-semibold px-3 py-1.5 rounded-pill border transition-colors",o==="all"?"bg-primary text-white border-primary":"bg-surface text-ink-2 border-border"),children:["Tout (",c.length,")"]}),u.map(([y,v])=>{const b=Rg[y]??Rg.general,E=o===y;return s.jsxs("button",{onClick:()=>l(E?"all":y),className:mt("shrink-0 inline-flex items-center gap-1.5 text-xs font-semibold px-3 py-1.5 rounded-pill border transition-colors",E?"bg-primary text-white border-primary":"bg-surface text-ink-2 border-border"),children:[s.jsx(L,{icon:b.icon,size:13}),b.label," (",v,")"]},y)})]}),t?s.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-3 gap-2",children:Array.from({length:6}).map((y,v)=>s.jsx($e,{height:"h-56",rounded:"rounded-card"},v))}):r?s.jsxs("div",{className:"bg-surface border border-border rounded-card p-6 text-center flex flex-col items-center gap-2",children:[s.jsx(L,{icon:Nl,size:26,className:"text-danger"}),s.jsx("p",{className:"text-sm font-semibold text-ink",children:"Annuaire indisponible"}),s.jsx("p",{className:"text-xs text-ink-2",children:"Impossible de charger les boutiques pour le moment."}),s.jsx("button",{onClick:()=>n(),className:"mt-1 bg-primary text-white text-sm font-semibold rounded-pill px-4 py-2",children:"Réessayer"})]}):f.length===0?s.jsxs("div",{className:"bg-surface border border-border rounded-card p-6 text-center flex flex-col items-center gap-2",children:[s.jsx(L,{icon:A3,size:30,className:"text-ink-3"}),s.jsx("p",{className:"text-sm font-semibold text-ink",children:c.length===0?"Aucune boutique pour le moment":"Aucun résultat"}),s.jsx("p",{className:"text-xs text-ink-2",children:c.length===0?"Soyez le premier à ouvrir votre boutique SBC.":"Essayez un autre nom ou une autre catégorie."})]}):s.jsxs(s.Fragment,{children:[s.jsx("ul",{className:"product-grid grid grid-cols-2 lg:grid-cols-3 gap-2",children:x.map((y,v)=>s.jsx("li",{className:"min-w-0",children:s.jsx(cle,{shop:y,index:v})},y.slug))}),m&&s.jsxs("div",{ref:p,className:"grid grid-cols-2 lg:grid-cols-3 gap-2 pt-1","aria-hidden":!0,
99children:[s.jsx($e,{height:"h-56",rounded:"rounded-card"}),s.jsx($e,{height:"h-56",rounded:"rounded-card"})]}),s.jsx("p",{className:"text-center text-xs text-ink-3 pt-1",children:m?`${x.length} sur ${f.length} boutiques`:`${f.length} boutique${f.length>1?"s":""} affichée${f.length>1?"s":""}`})]})]}),s.jsx(Z.a,{href:sle,target:"_blank",rel:"noopener noreferrer",whileTap:{scale:.92},"aria-label":"Créer ma boutique",className:"add-product fixed bottom-24 right-4 z-40 size-14 grid place-items-center rounded-pill bg-primary text-white border border-primary",children:s.jsx(L,{icon:kl,size:26})})]})}const h2=e=>`${Math.round(e).toLocaleString("fr-FR")} F`;function fle({balanceXaf:e,balanceUsd:t}){const[r,n]=C.useState(!1),i=t*vi.CONVERSION.USD_TO_XAF,a=e+i;return s.jsxs("div",{className:"wstack","data-open":r,role:"button",tabIndex:0,"aria-expanded":r,"aria-label":r?"Masquer les soldes":"Afficher les soldes",onClick:()=>n(o=>!o),onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),n(l=>!l))},children:[s.jsx("div",{className:"wstack-back"}),s.jsx("div",{className:"wstack-card wstack-card--crypto",children:s.jsxs("div",{className:"wstack-card-inner",children:[s.jsxs("div",{className:"wstack-card-top",children:[s.jsxs("div",{children:[s.jsx("span",{className:"wstack-label",children:"Crypto"}),s.jsxs("span",{className:"wstack-amount-row",children:[s.jsx("span",{className:"wstack-amount",children:r?h2(i):"•••••"}),s.jsx("span",{className:"wstack-native",children:r?`$${t.toFixed(2)}`:"••••"})]})]}),s.jsx("div",{className:"wstack-chip"})]}),s.jsx("div",{className:"wstack-card-bottom",children:s.jsx("span",{className:"wstack-sub",children:"Retrait crypto"})})]})}),s.jsx("div",{className:"wstack-card wstack-card--main",children:s.jsxs("div",{className:"wstack-card-inner",children:[s.jsxs("div",{className:"wstack-card-top",children:[s.jsxs("div",{children:[s.jsx("span",{className:"wstack-label",children:"Solde principal"}),s.jsx("span",{className:"wstack-amount",children:r?h2(e):"•••••"})]}),s.jsx("div",{className:"wstack-chip"})]}),s.jsxs("div",{className:"wstack-card-bottom",children:[s.jsx("span",{className:"wstack-sub",children:"Mobile Money"}),s.jsx("span",{className:"wstack-sub",children:"FCFA"})]})]})}),s.jsxs("div",{className:"wstack-pocket",children:[s.jsxs("svg",{viewBox:"0 0 280 160",fill:"none",width:"280",height:"160",children:[s.jsx("path",{d:"M 0 20 C 0 10, 5 10, 10 10 C 20 10, 25 25, 40 25 L 240 25 C 255 25, 260 10, 270 10 C 275 10, 280 10, 280 20 L 280 120 C 280 155, 260 160, 240 160 L 40 160 C 20 160, 0 155, 0 120 Z",fill:"var(--color-ink)"}),s.jsx("path",{d:"M 8 22 C 8 16, 12 16, 15 16 C 23 16, 27 29, 40 29 L 240 29 C 253 29, 257 16, 265 16 C 268 16, 272 16, 272 22 L 272 120 C 272 150, 255 152, 240 152 L 40 152 C 25 152, 8 152, 8 120 Z",stroke:"#334155",strokeWidth:"1.5",strokeDasharray:"6 4"})]}),s.jsxs("div",{className:"wstack-pocket-content",children:[s.jsxs("div",{className:"wstack-total-slot",children:[s.jsx("div",{className:"wstack-total-masked","aria-hidden":!0,children:"••••••"}),s.jsx("div",{className:"wstack-total-real",children:h2(a)})]}),s.jsx("div",{className:"wstack-caption",children:"Solde total"}),s.jsxs("div",{className:"wstack-eye","aria-hidden":!0,children:[s.jsxs("svg",{className:"wstack-eye-slash",viewBox:"0 0 24 24",width:"20",height:"20",children:[s.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),s.jsx("circle",{cx:"12",cy:"12",r:"3"}),s.jsx("line",{x1:"3",y1:"3",x2:"21",y2:"21"})]}),s.jsxs("svg",{className:"wstack-eye-open",viewBox:"0 0 24 24",width:"20",height:"20",children:[s.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),s.jsx("circle",{cx:"12",cy:"12",r:"3"})]})]})]})]})]})}var m2,KS;function zs(){if(KS)return m2;KS=1;var e=Array.isArray;return m2=e,m2}var p2,XS;function iV(){if(XS)return p2;XS=1;var e=typeof ip=="object"&&ip&&ip.Object===Object&&ip;return p2=e,p2}var g2,YS;function _a(){if(YS)return g2;YS=1;var e=iV(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return g2=r,g2}var y2,QS;function qh(){if(QS)return y2;QS=1;var e=_a(),t=e.Symbol;return y2=t,y2}var v2,ZS;function hle(){if(ZS)return v2;ZS=1;var e=qh(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,i=e?e.toStringTag:void 0;function a(o){var l=r.call(o,i),c=o[i];try{o[i]=void 0;var u=!0}catch{}var f=n.call(o);return u&&(l?o[i]=c:delete o[i]),f}return v2=a,v2}var b2,JS;function mle(){if(JS)return b2;JS=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return b2=r,b2}var C2,eB;function ko(){if(eB)return C2;eB=1;
vendor: 6,006 bytes, line 99
99var e=qh(),t=hle(),r=mle(),n="[object Null]",i="[object Undefined]",a=e?e.toStringTag:void 0;function o(l){return l==null?l===void 0?i:n:a&&a in Object(l)?t(l):r(l)}return C2=o,C2}var w2,tB;function So(){if(tB)return w2;tB=1;function e(t){return t!=null&&typeof t=="object"}return w2=e,w2}var E2,rB;function g0(){if(rB)return E2;rB=1;var e=ko(),t=So(),r="[object Symbol]";function n(i){return typeof i=="symbol"||t(i)&&e(i)==r}return E2=n,E2}var j2,nB;function q3(){if(nB)return j2;nB=1;var e=zs(),t=g0(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(a,o){if(e(a))return!1;var l=typeof a;return l=="number"||l=="symbol"||l=="boolean"||a==null||t(a)?!0:n.test(a)||!r.test(a)||o!=null&&a in Object(o)}return j2=i,j2}var N2,sB;function Ol(){if(sB)return N2;sB=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return N2=e,N2}var A2,iB;function W3(){if(iB)return A2;iB=1;var e=ko(),t=Ol(),r="[object AsyncFunction]",n="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function o(l){if(!t(l))return!1;var c=e(l);return c==n||c==i||c==r||c==a}return A2=o,A2}var k2,aB;function ple(){if(aB)return k2;aB=1;var e=_a(),t=e["__core-js_shared__"];return k2=t,k2}var S2,oB;function gle(){if(oB)return S2;oB=1;var e=ple(),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 S2=r,S2}var B2,lB;function aV(){if(lB)return B2;lB=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 B2=r,B2}var D2,cB;function yle(){if(cB)return D2;cB=1;var e=W3(),t=gle(),r=Ol(),n=aV(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,o=Function.prototype,l=Object.prototype,c=o.toString,u=l.hasOwnProperty,f=RegExp("^"+c.call(u).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function x(m){if(!r(m)||t(m))return!1;var p=e(m)?f:a;return p.test(n(m))}return D2=x,D2}var F2,uB;function vle(){if(uB)return F2;uB=1;function e(t,r){return t==null?void 0:t[r]}return F2=e,F2}var P2,dB;function au(){if(dB)return P2;dB=1;var e=yle(),t=vle();function r(n,i){var a=t(n,i);return e(a)?a:void 0}return P2=r,P2}var T2,xB;function gy(){if(xB)return T2;xB=1;var e=au(),t=e(Object,"create");return T2=t,T2}var M2,fB;function ble(){if(fB)return M2;fB=1;var e=gy();function t(){this.__data__=e?e(null):{},this.size=0}return M2=t,M2}var O2,hB;function Cle(){if(hB)return O2;hB=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return O2=e,O2}var L2,mB;function wle(){if(mB)return L2;mB=1;var e=gy(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function i(a){var o=this.__data__;if(e){var l=o[a];return l===t?void 0:l}return n.call(o,a)?o[a]:void 0}return L2=i,L2}var R2,pB;function Ele(){if(pB)return R2;pB=1;var e=gy(),t=Object.prototype,r=t.hasOwnProperty;function n(i){var a=this.__data__;return e?a[i]!==void 0:r.call(a,i)}return R2=n,R2}var _2,gB;function jle(){if(gB)return _2;gB=1;var e=gy(),t="__lodash_hash_undefined__";function r(n,i){var a=this.__data__;return this.size+=this.has(n)?0:1,a[n]=e&&i===void 0?t:i,this}return _2=r,_2}var I2,yB;function Nle(){if(yB)return I2;yB=1;var e=ble(),t=Cle(),r=wle(),n=Ele(),i=jle();function a(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l<c;){var u=o[l];this.set(u[0],u[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,I2=a,I2}var $2,vB;function Ale(){if(vB)return $2;vB=1;function e(){this.__data__=[],this.size=0}return $2=e,$2}var z2,bB;function H3(){if(bB)return z2;bB=1;function e(t,r){return t===r||t!==t&&r!==r}return z2=e,z2}var V2,CB;function yy(){if(CB)return V2;CB=1;var e=H3();function t(r,n){for(var i=r.length;i--;)if(e(r[i][0],n))return i;return-1}return V2=t,V2}var U2,wB;function kle(){if(wB)return U2;wB=1;var e=yy(),t=Array.prototype,r=t.splice;function n(i){var a=this.__data__,o=e(a,i);if(o<0)return!1;var l=a.length-1;return o==l?a.pop():r.call(a,o,1),--this.size,!0}return U2=n,U2}var q2,EB;function Sle(){if(EB)return q2;EB=1;var e=yy();function t(r){var n=this.__data__,i=e(n,r);return i<0?void 0:n[i][1]}return q2=t,q2}var W2,jB;function Ble(){if(jB)return W2;jB=1;var e=yy();function t(r){return e(this.__data__,r)>-1}return W2=t,W2}var H2,NB;function Dle(){if(NB)return H2;NB=1;var e=yy();function t(r,n){var i=this.__data__,a=e(i,r);return a<0?(++this.size,i.push([r,n])):i[a][1]=n,this}return H2=t,H2}var G2,AB;function vy(){if(AB)return G2;AB=1;var e=Ale(),t=kle(),r=Sle(),n=Ble(),i=Dle();function a(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l<c;){var u=o[l];this.set(u[0],u[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,G2=a,G2}var K2,kB;function G3(){if(kB)return K2;kB=1;var e=au(),t=_a(),r=e(t,"Map");return K2=r,K2}var X2,SB;function Fle(){if(SB)return X2;SB=1;var e=Nle(),t=vy(),r=G3();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return X2=n,X2}var Y2,BB;function Ple(){if(BB)return Y2;BB=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return Y2=e,Y2}var Q2,DB;function by(){if(DB)return Q2;DB=1;var e=Ple();function t(r,n){var i=r.__data__;return e(n)?i[typeof n=="string"?"string":"hash"]:i.map}return Q2=t,Q2}var Z2,FB;function Tle(){if(FB)return Z2;FB=1;var e=by();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return Z2=t,Z2}var J2,PB;function Mle(){if(PB)return J2;PB=1;var e=by();function t(r){return e(this,r).get(r)}return J2=t,J2}var e9,TB;function Ole(){if(TB)return e9;TB=1;var e=by();function t(r){return e(this,r).has(r)}return e9=t,e9}var t9,MB;function Lle(){if(MB)return t9;MB=1;var e=by();function t(r,n){var i=e(this,r),a=i.size;return i.set(r,n),this.size+=i.size==a?0:1,this}return t9=t,t9}var r9,OB;function K3(){if(OB)return r9;OB=1;
99var e=Fle(),t=Tle(),r=Mle(),n=Ole(),i=Lle();function a(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l<c;){var u=o[l];this.set(u[0],u[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,r9=a,r9}var n9,LB;function oV(){if(LB)return n9;LB=1;var e=K3(),t="Expected a function";function r(n,i){if(typeof n!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var a=function(){var o=arguments,l=i?i.apply(this,o):o[0],c=a.cache;if(c.has(l))return c.get(l);var u=n.apply(this,o);return a.cache=c.set(l,u)||c,u};return a.cache=new(r.Cache||e),a}return r.Cache=e,n9=r,n9}var s9,RB;function Rle(){if(RB)return s9;RB=1;var e=oV(),t=500;function r(n){var i=e(n,function(o){return a.size===t&&a.clear(),o}),a=i.cache;return i}return s9=r,s9}var i9,_B;function _le(){if(_B)return i9;_B=1;var e=Rle(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=e(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(t,function(o,l,c,u){a.push(c?u.replace(r,"$1"):l||o)}),a});return i9=n,i9}var a9,IB;function X3(){if(IB)return a9;IB=1;function e(t,r){for(var n=-1,i=t==null?0:t.length,a=Array(i);++n<i;)a[n]=r(t[n],n,t);return a}return a9=e,a9}var o9,$B;function Ile(){if($B)return o9;$B=1;var e=qh(),t=X3(),r=zs(),n=g0(),i=e?e.prototype:void 0,a=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 a?a.call(l):"";var c=l+"";return c=="0"&&1/l==-1/0?"-0":c}return o9=o,o9}var l9,zB;function lV(){if(zB)return l9;zB=1;var e=Ile();function t(r){return r==null?"":e(r)}return l9=t,l9}var c9,VB;function cV(){if(VB)return c9;VB=1;var e=zs(),t=q3(),r=_le(),n=lV();function i(a,o){return e(a)?a:t(a,o)?[a]:r(n(a))}return c9=i,c9}var u9,UB;function Cy(){if(UB)return u9;UB=1;var e=g0();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return u9=t,u9}var d9,qB;function Y3(){if(qB)return d9;qB=1;var e=cV(),t=Cy();function r(n,i){i=e(i,n);for(var a=0,o=i.length;n!=null&&a<o;)n=n[t(i[a++])];return a&&a==o?n:void 0}return d9=r,d9}var x9,WB;function uV(){if(WB)return x9;WB=1;var e=Y3();function t(r,n,i){var a=r==null?void 0:e(r,n);return a===void 0?i:a}return x9=t,x9}var $le=uV();const wi=lr($le);var f9,HB;function zle(){if(HB)return f9;HB=1;function e(t){return t==null}return f9=e,f9}var Vle=zle();const nr=lr(Vle);var h9,GB;function Ule(){if(GB)return h9;GB=1;var e=ko(),t=zs(),r=So(),n="[object String]";function i(a){return typeof a=="string"||!t(a)&&r(a)&&e(a)==n}return h9=i,h9}var qle=Ule();const Kc=lr(qle);var Wle=W3();const $t=lr(Wle);var Hle=Ol();const y0=lr(Hle);var m9={exports:{}},mr={};/**
100 * @license React
101 * react-is.production.min.js
102 *
103 * Copyright (c) Facebook, Inc. and its affiliates.
104 *
105 * This source code is licensed under the MIT license found in the
106 * LICENSE file in the root directory of this source tree.
107 */var KB;function Gle(){if(KB)return mr;KB=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"),a=Symbol.for("react.provider"),o=Symbol.for("react.context"),l=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),x=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),y;y=Symbol.for("react.module.reference");function v(b){if(typeof b=="object"&&b!==null){var E=b.$$typeof;switch(E){case e:switch(b=b.type,b){case r:case i:case n:case u:case f:return b;default:switch(b=b&&b.$$typeof,b){case l:case o:case c:case m:case x:case a:return b;default:return E}}case t:return E}}}return mr.ContextConsumer=o,mr.ContextProvider=a,mr.Element=e,mr.ForwardRef=c,mr.Fragment=r,mr.Lazy=m,mr.Memo=x,mr.Portal=t,mr.Profiler=i,mr.StrictMode=n,mr.Suspense=u,mr.SuspenseList=f,mr.isAsyncMode=function(){return!1},mr.isConcurrentMode=function(){return!1},mr.isContextConsumer=function(b){return v(b)===o},mr.isContextProvider=function(b){return v(b)===a},mr.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},mr.isForwardRef=function(b){return v(b)===c},mr.isFragment=function(b){return v(b)===r},mr.isLazy=function(b){return v(b)===m},mr.isMemo=function(b){return v(b)===x},mr.isPortal=function(b){return v(b)===t},mr.isProfiler=function(b){return v(b)===i},mr.isStrictMode=function(b){return v(b)===n},mr.isSuspense=function(b){return v(b)===u},mr.isSuspenseList=function(b){return v(b)===f},mr.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===r||b===i||b===n||b===u||b===f||b===p||typeof b=="object"&&b!==null&&(b.$$typeof===m||b.$$typeof===x||b.$$typeof===a||b.$$typeof===o||b.$$typeof===c||b.$$typeof===y||b.getModuleId!==void 0)},mr.typeOf=v,mr}var XB;function Kle(){return XB||(XB=1,m9.exports=Gle()),m9.exports}var Xle=Kle(),p9,YB;function dV(){if(YB)return p9;YB=1;var e=ko(),t=So(),r="[object Number]";function n(i){return typeof i=="number"||t(i)&&e(i)==r}return p9=n,p9}var g9,QB;function Yle(){if(QB)return g9;QB=1;var e=dV();function t(r){return e(r)&&r!=+r}return g9=t,g9}var Qle=Yle();const v0=lr(Qle);var Zle=dV();const Jle=lr(Zle);var Xi=function(t){return t===0?0:t>0?1:-1},mc=function(t){return Kc(t)&&t.indexOf("%")===t.length-1},qe=function(t){return Jle(t)&&!v0(t)},En=function(t){return qe(t)||Kc(t)},ece=0,Wh=function(t){var r=++ece;return"".concat(t||"").concat(r)},Xc=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(!qe(t)&&!Kc(t))return n;var a;if(mc(t)){var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return v0(a)&&(a=n),i&&a>r&&(a=r),a},il=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},tce=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},gi=function(t,r){return qe(t)&&qe(r)?function(n){return t+n*(r-t)}:function(){return r}};function _g(e,t,r){return!e||!e.length?null:e.find(function(n){return n&&(typeof t=="function"?t(n):wi(n,t))===r})}var rce=function(t,r){return qe(t)&&qe(r)?t-r:Kc(t)&&Kc(r)?t.localeCompare(r):t instanceof Date&&r instanceof Date?t.getTime()-r.getTime():String(t).localeCompare(String(r))};function id(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 Ow(e){"@babel/helpers - typeof";return Ow=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},Ow(e)}var nce=["viewBox","children"],sce=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRen
107dering","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"],ZB=["points","pathLength"],y9={svg:nce,polygon:ZB,polyline:ZB},Q3=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDrag
107Capture","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"],Ig=function(t,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var n=t;if(C.isValidElement(t)&&(n=t.props),!y0(n))return null;var i={};return Object.keys(n).forEach(function(a){Q3.includes(a)&&(i[a]=r||function(o){return n[a](n,o)})}),i},ice=function(t,r,n){return function(i){return t(r,n,i),null}},$g=function(t,r,n){if(!y0(t)||Ow(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(a){var o=t[a];Q3.includes(a)&&typeof o=="function"&&(i||(i={}),i[a]=ice(o,r,n))}),i},ace=["children"],oce=["children"];function JB(e,t){if(e==null)return{};var r=lce(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function lce(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 Lw(e){"@babel/helpers - typeof";return Lw=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},Lw(e)}var eD={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"},co=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},tD=null,v9=null,Z3=function e(t){if(t===tD&&Array.isArray(v9))return v9;var r=[];return C.Children.forEach(t,function(n){nr(n)||(Xle.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),v9=r,tD=t,r};function Qi(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(i){return co(i)}):n=[co(t)],Z3(e).forEach(function(i){var a=wi(i,"type.displayName")||wi(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}function Ks(e,t){var r=Qi(e,t);return r&&r[0]}var rD=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,i=r.height;return!(!qe(n)||n<=0||!qe(i)||i<=0)},cce=["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"],uce=function(t){return t&&t.type&&Kc(t.type)&&cce.indexOf(t.type)>=0},dce=function(t){return t&&Lw(t)==="object"&&"clipDot"in t},xce=function(t,r,n,i){var a,o=(a=y9==null?void 0:y9[i])!==null&&a!==void 0?a:[];return r.startsWith("data-")||!$t(t)&&(i&&o.includes(r)||sce.includes(r))||n&&Q3.includes(r)},Xt=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(C.isValidElement(t)&&(i=t.props),!y0(i))return null;var a={};
107return Object.keys(i).forEach(function(o){var l;xce((l=i)===null||l===void 0?void 0:l[o],o,r,n)&&(a[o]=i[o])}),a},Rw=function e(t,r){if(t===r)return!0;var n=C.Children.count(t);if(n!==C.Children.count(r))return!1;if(n===0)return!0;if(n===1)return nD(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var i=0;i<n;i++){var a=t[i],o=r[i];if(Array.isArray(a)||Array.isArray(o)){if(!e(a,o))return!1}else if(!nD(a,o))return!1}return!0},nD=function(t,r){if(nr(t)&&nr(r))return!0;if(!nr(t)&&!nr(r)){var n=t.props||{},i=n.children,a=JB(n,ace),o=r.props||{},l=o.children,c=JB(o,oce);return i&&l?id(a,c)&&Rw(i,l):!i&&!l?id(a,c):!1}return!1},sD=function(t,r){var n=[],i={};return Z3(t).forEach(function(a,o){if(uce(a))n.push(a);else if(a){var l=co(a.type),c=r[l]||{},u=c.handler,f=c.once;if(u&&(!f||!i[l])){var x=u(a,l,o);n.push(x),i[l]=!0}}}),n},fce=function(t){var r=t&&t.type;return r&&eD[r]?eD[r]:null},hce=function(t,r){return Z3(r).indexOf(t)},mce=["children","width","height","viewBox","className","style","title","desc"];function _w(){return _w=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},_w.apply(this,arguments)}function pce(e,t){if(e==null)return{};var r=gce(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function gce(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 Iw(e){var t=e.children,r=e.width,n=e.height,i=e.viewBox,a=e.className,o=e.style,l=e.title,c=e.desc,u=pce(e,mce),f=i||{width:r,height:n,x:0,y:0},x=or("recharts-surface",a);return ie.createElement("svg",_w({},Xt(u,!0,"svg"),{className:x,width:r,height:n,style:o,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),ie.createElement("title",null,l),ie.createElement("desc",null,c),t)}var yce=["children","className"];function $w(){return $w=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},$w.apply(this,arguments)}function vce(e,t){if(e==null)return{};var r=bce(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function 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}var qr=ie.forwardRef(function(e,t){var r=e.children,n=e.className,i=vce(e,yce),a=or("recharts-layer",n);return ie.createElement("g",$w({className:a},Xt(i,!0),{ref:t}),r)}),uo=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a]},b9,iD;function Cce(){if(iD)return b9;iD=1;function e(t,r,n){var i=-1,a=t.length;r<0&&(r=-r>a?0:a+r),n=n>a?a:n,n<0&&(n+=a),a=r>n?0:n-r>>>0,r>>>=0;for(var o=Array(a);++i<a;)o[i]=t[i+r];return o}return b9=e,b9}var C9,aD;function wce(){if(aD)return C9;aD=1;var e=Cce();function t(r,n,i){var a=r.length;return i=i===void 0?a:i,!n&&i>=a?r:e(r,n,i)}return C9=t,C9}var w9,oD;function xV(){if(oD)return w9;oD=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=t+r+n,a="\\ufe0e\\ufe0f",o="\\u200d",l=RegExp("["+o+e+i+a+"]");function c(u){return l.test(u)}return w9=c,w9}var E9,lD;function Ece(){if(lD)return E9;lD=1;function e(t){return t.split("")}return E9=e,E9}var j9,cD;function jce(){if(cD)return j9;cD=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=t+r+n,a="\\ufe0e\\ufe0f",o="["+e+"]",l="["+i+"]",c="\\ud83c[\\udffb-\\udfff]",u="(?:"+l+"|"+c+")",f="[^"+e+"]",x="(?:\\ud83c[\\udde6-\\uddff]){2}",m="[\\ud800-\\udbff][\\udc00-\\udfff]",p="\\u200d",y=u+"?",v="["+a+"]?",b="(?:"+p+"(?:"+[f,x,m].join("|")+")"+v+y+")*",E=v+y+b,N="(?:"+[f+l+"?",l,x,m,o].join("|")+")",j=RegExp(c+"(?="+c+")|"+N+E,"g");function A(w){return w.match(j)||[]}return j9=A,j9}var N9,uD;function Nce(){if(uD)return N9;uD=1;var e=Ece(),t=xV(),r=jce();function n(i){return t(i)?r(i):e(i)}return N9=n,N9}var A9,dD;function Ace(){if(dD)return A9;dD=1;var e=wce(),t=xV(),r=Nce(),n=lV();function i(a){return function(o){o=n(o);
107var l=t(o)?r(o):void 0,c=l?l[0]:o.charAt(0),u=l?e(l,1).join(""):o.slice(1);return c[a]()+u}}return A9=i,A9}var k9,xD;function kce(){if(xD)return k9;xD=1;var e=Ace(),t=e("toUpperCase");return k9=t,k9}var Sce=kce();const wy=lr(Sce);function kr(e){return function(){return e}}const fV=Math.cos,zg=Math.sin,sa=Math.sqrt,Vg=Math.PI,Ey=2*Vg,zw=Math.PI,Vw=2*zw,oc=1e-6,Bce=Vw-oc;function hV(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function Dce(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return hV;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;i<a;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class Fce{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?hV:Dce(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,a,o){this._append`C${+t},${+r},${+n},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,n,i,a){if(t=+t,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,l=this._y1,c=n-t,u=i-r,f=o-t,x=l-r,m=f*f+x*x;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(m>oc)if(!(Math.abs(x*c-u*f)>oc)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-o,y=i-l,v=c*c+u*u,b=p*p+y*y,E=Math.sqrt(v),N=Math.sqrt(m),j=a*Math.tan((zw-Math.acos((v+m-b)/(2*E*N)))/2),A=j/N,w=j/E;Math.abs(A-1)>oc&&this._append`L${t+A*f},${r+A*x}`,this._append`A${a},${a},0,0,${+(x*p>f*y)},${this._x1=t+w*c},${this._y1=r+w*u}`}}arc(t,r,n,i,a,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let l=n*Math.cos(i),c=n*Math.sin(i),u=t+l,f=r+c,x=1^o,m=o?i-a:a-i;this._x1===null?this._append`M${u},${f}`:(Math.abs(this._x1-u)>oc||Math.abs(this._y1-f)>oc)&&this._append`L${u},${f}`,n&&(m<0&&(m=m%Vw+Vw),m>Bce?this._append`A${n},${n},0,1,${x},${t-l},${r-c}A${n},${n},0,1,${x},${this._x1=u},${this._y1=f}`:m>oc&&this._append`A${n},${n},0,${+(m>=zw)},${x},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function J3(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 Fce(t)}function eE(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function mV(e){this._context=e}mV.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 jy(e){return new mV(e)}function pV(e){return e[0]}function gV(e){return e[1]}function yV(e,t){var r=kr(!0),n=null,i=jy,a=null,o=J3(l);e=typeof e=="function"?e:e===void 0?pV:kr(e),t=typeof t=="function"?t:t===void 0?gV:kr(t);function l(c){var u,f=(c=eE(c)).length,x,m=!1,p;for(n==null&&(a=i(p=o())),u=0;u<=f;++u)!(u<f&&r(x=c[u],u,c))===m&&((m=!m)?a.lineStart():a.lineEnd()),m&&a.point(+e(x,u,c),+t(x,u,c));if(p)return a=null,p+""||null}return l.x=function(c){return arguments.length?(e=typeof c=="function"?c:kr(+c),l):e},l.y=function(c){return arguments.length?(t=typeof c=="function"?c:kr(+c),l):t},l.defined=function(c){return arguments.length?(r=typeof c=="function"?c:kr(!!c),l):r},l.curve=function(c){return arguments.length?(i=c,n!=null&&(a=i(n)),l):i},l.context=function(c){return arguments.length?(c==null?n=a=null:a=i(n=c),l):n},l}function pp(e,t,r){var n=null,i=kr(!0),a=null,o=jy,l=null,c=J3(u);e=typeof e=="function"?e:e===void 0?pV:kr(+e),t=typeof t=="function"?t:kr(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?gV:kr(+r);function u(x){var m,p,y,v=(x=eE(x)).length,b,E=!1,N,j=new Array(v),A=new Array(v);for(a==null&&(l=o(N=c())),m=0;m<=v;++m){if(!(m<v&&i(b=x[m],m,x))===E)if(E=!E)p=m,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),y=m-1;y>=p;--y)l.point(j[y],A[y]);l.lineEnd(),l.areaEnd()}E&&(j[m]=+e(b,m,x),A[m]=+t(b,m,x),l.point(n?+n(b,m,x):j[m],r?+r(b,m,x):A[m]))}if(N)return l=null,N+""||null}function f(){return yV().defined(i).curve(o).context(a)}return u.x=function(x){return arguments.length?(e=typeof x=="function"?x:kr(+x),n=null,u):e},u.x0=function(x){return arguments.length?(e=typeof x=="function"?x:kr(+x),u):e},u.x1=function(x){return arguments.length?(n=x==null?null:typeof x=="function"?x:kr(+x),u):n},u.y=function(x){return arguments.length?(t=typeof x=="function"?x:kr(+x),r
vendor: 9,238 bytes, line 107
107=null,u):t},u.y0=function(x){return arguments.length?(t=typeof x=="function"?x:kr(+x),u):t},u.y1=function(x){return arguments.length?(r=x==null?null:typeof x=="function"?x:kr(+x),u):r},u.lineX0=u.lineY0=function(){return f().x(e).y(t)},u.lineY1=function(){return f().x(e).y(r)},u.lineX1=function(){return f().x(n).y(t)},u.defined=function(x){return arguments.length?(i=typeof x=="function"?x:kr(!!x),u):i},u.curve=function(x){return arguments.length?(o=x,a!=null&&(l=o(a)),u):o},u.context=function(x){return arguments.length?(x==null?a=l=null:l=o(a=x),u):a},u}class vV{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 Pce(e){return new vV(e,!0)}function Tce(e){return new vV(e,!1)}const tE={draw(e,t){const r=sa(t/Vg);e.moveTo(r,0),e.arc(0,0,r,0,Ey)}},Mce={draw(e,t){const r=sa(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()}},bV=sa(1/3),Oce=bV*2,Lce={draw(e,t){const r=sa(t/Oce),n=r*bV;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},Rce={draw(e,t){const r=sa(t),n=-r/2;e.rect(n,n,r,r)}},_ce=.8908130915292852,CV=zg(Vg/10)/zg(7*Vg/10),Ice=zg(Ey/10)*CV,$ce=-fV(Ey/10)*CV,zce={draw(e,t){const r=sa(t*_ce),n=Ice*r,i=$ce*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const o=Ey*a/5,l=fV(o),c=zg(o);e.lineTo(c*r,-l*r),e.lineTo(l*n-c*i,c*n+l*i)}e.closePath()}},S9=sa(3),Vce={draw(e,t){const r=-sa(t/(S9*3));e.moveTo(0,r*2),e.lineTo(-S9*r,-r),e.lineTo(S9*r,-r),e.closePath()}},di=-.5,xi=sa(3)/2,Uw=1/sa(12),Uce=(Uw/2+1)*3,qce={draw(e,t){const r=sa(t/Uce),n=r/2,i=r*Uw,a=n,o=r*Uw+r,l=-a,c=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(l,c),e.lineTo(di*n-xi*i,xi*n+di*i),e.lineTo(di*a-xi*o,xi*a+di*o),e.lineTo(di*l-xi*c,xi*l+di*c),e.lineTo(di*n+xi*i,di*i-xi*n),e.lineTo(di*a+xi*o,di*o-xi*a),e.lineTo(di*l+xi*c,di*c-xi*l),e.closePath()}};function Wce(e,t){let r=null,n=J3(i);e=typeof e=="function"?e:kr(e||tE),t=typeof t=="function"?t:kr(t===void 0?64:+t);function i(){let a;if(r||(r=a=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:kr(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:kr(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function Ug(){}function qg(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 wV(e){this._context=e}wV.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:qg(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:qg(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Hce(e){return new wV(e)}function EV(e){this._context=e}EV.prototype={areaStart:Ug,areaEnd:Ug,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:qg(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Gce(e){return new EV(e)}function jV(e){this._context=e}jV.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:qg(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Kce(e){return new jV(e)}function NV(e){this._context=e}NV.prototype={areaStart:Ug,areaEnd:Ug,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 Xce(e){return new NV(e)}function fD(e){return e<0?-1:1}function hD(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),l=(a*i+o*n)/(n+i);return(fD(a)+fD(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(l))||0}function mD(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function B9(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,l=(a-n)/3;e._context.bezierCurveTo(n+l,i+l*t,a-l,o-l*r,a,o)}function Wg(e){this._context=e}Wg.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:B9(this,this._t0,mD(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,B9(this,mD(this,r=hD(this,e,t)),r);break;default:B9(this,this._t0,r=hD(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function AV(e){this._context=new kV(e)}(AV.prototype=Object.create(Wg.prototype)).point=function(e,t){Wg.prototype.point.call(this,t,e)};function kV(e){this._context=e}kV.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function Yce(e){return new Wg(e)}function Qce(e){return new AV(e)}function SV(e){this._context=e}SV.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=pD(e),i=pD(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function pD(e){var t,r=e.length-1,n,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/a[t-1],a[t]-=n,o[t]-=n*o[t-1];for(i[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Zce(e){return new SV(e)}function Ny(e,t){this._context=e,this._t=t}Ny.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;
107default:{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 Jce(e){return new Ny(e,.5)}function eue(e){return new Ny(e,0)}function tue(e){return new Ny(e,1)}function Td(e,t){if((o=e.length)>1)for(var r=1,n,i,a=e[t[0]],o,l=a.length;r<o;++r)for(i=a,a=e[t[r]],n=0;n<l;++n)a[n][1]+=a[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function qw(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function rue(e,t){return e[t]}function nue(e){const t=[];return t.key=e,t}function sue(){var e=kr([]),t=qw,r=Td,n=rue;function i(a){var o=Array.from(e.apply(this,arguments),nue),l,c=o.length,u=-1,f;for(const x of a)for(l=0,++u;l<c;++l)(o[l][u]=[0,+n(x,o[l].key,u,a)]).data=x;for(l=0,f=eE(t(o));l<c;++l)o[f[l]].index=l;return r(o,f),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:kr(Array.from(a)),i):e},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:kr(+a),i):n},i.order=function(a){return arguments.length?(t=a==null?qw:typeof a=="function"?a:kr(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(r=a??Td,i):r},i}function iue(e,t){if((n=e.length)>0){for(var r,n,i=0,a=e[0].length,o;i<a;++i){for(o=r=0;r<n;++r)o+=e[r][i][1]||0;if(o)for(r=0;r<n;++r)e[r][i][1]/=o}Td(e,t)}}function aue(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,a=n.length;r<a;++r){for(var o=0,l=0;o<i;++o)l+=e[o][r][1]||0;n[r][1]+=n[r][0]=-l/2}Td(e,t)}}function oue(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,o;n<a;++n){for(var l=0,c=0,u=0;l<o;++l){for(var f=e[t[l]],x=f[n][1]||0,m=f[n-1][1]||0,p=(x-m)/2,y=0;y<l;++y){var v=e[t[y]],b=v[n][1]||0,E=v[n-1][1]||0;p+=b-E}c+=x,u+=p*x}i[n-1][1]+=i[n-1][0]=r,c&&(r-=u/c)}i[n-1][1]+=i[n-1][0]=r,Td(e,t)}}function Sf(e){"@babel/helpers - typeof";return Sf=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},Sf(e)}var lue=["type","size","sizeType"];function Ww(){return Ww=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ww.apply(this,arguments)}function gD(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 yD(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gD(Object(r),!0).forEach(function(n){cue(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gD(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cue(e,t,r){return t=uue(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uue(e){var t=due(e,"string");return Sf(t)=="symbol"?t:t+""}function due(e,t){if(Sf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Sf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xue(e,t){if(e==null)return{};var r=fue(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function fue(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 BV={symbolCircle:tE,symbolCross:Mce,symbolDiamond:Lce,symbolSquare:Rce,symbolStar:zce,symbolTriangle:Vce,symbolWye:qce},hue=Math.PI/180,mue=function(t){var r="symbol".concat(wy(t));return BV[r]||tE},pue=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*hue;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}},gue=function(t,r){BV["symbol".concat(wy(t))]=r},rE=function(t){var r=t.type,n=r===void 0?"circle":r,i=t.size,a=i===void 0?64:i,o=t.sizeType,l=o===void 0?"area":o,c=xue(t,lue),u=yD(yD({},c),{},{type:n,size:a,sizeType:l}),f=function(){var b=mue(n),E=Wce().type(b).size(pue(a,l,n));return E()},x=u.className,m=u.cx,p=u.cy,y=Xt(u,!0);return m===+m&&p===+p&&a===+a?ie.createElement("path",Ww({}
107,y,{className:or("recharts-symbols",x),transform:"translate(".concat(m,", ").concat(p,")"),d:f()})):null};rE.registerSymbol=gue;function Md(e){"@babel/helpers - typeof";return Md=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Md(e)}function Hw(){return Hw=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},Hw.apply(this,arguments)}function vD(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 yue(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vD(Object(r),!0).forEach(function(n){Bf(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vD(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bue(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,FV(n.key),n)}}function Cue(e,t,r){return t&&bue(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function wue(e,t,r){return t=Hg(t),Eue(e,DV()?Reflect.construct(t,r||[],Hg(e).constructor):t.apply(e,r))}function Eue(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 jue(e)}function jue(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 Hg(e){return Hg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Hg(e)}function Nue(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&&Gw(e,t)}function Gw(e,t){return Gw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Gw(e,t)}function Bf(e,t,r){return t=FV(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function FV(e){var t=Aue(e,"string");return Md(t)=="symbol"?t:t+""}function Aue(e,t){if(Md(e)!="object"||!e)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 String(e)}var Ri=32,nE=function(e){function t(){return vue(this,t),wue(this,t,arguments)}return Nue(t,e),Cue(t,[{key:"renderIcon",value:function(n){var i=this.props.inactiveColor,a=Ri/2,o=Ri/6,l=Ri/3,c=n.inactive?i:n.color;if(n.type==="plainline")return ie.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:a,x2:Ri,y2:a,className:"recharts-legend-icon"});if(n.type==="line")return ie.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(a,"h").concat(l,`
108            A`).concat(o,",").concat(o,",0,1,1,").concat(2*l,",").concat(a,`
109            H`).concat(Ri,"M").concat(2*l,",").concat(a,`
110            A`).concat(o,",").concat(o,",0,1,1,").concat(l,",").concat(a),className:"recharts-legend-icon"});if(n.type==="rect")return ie.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(Ri/8,"h").concat(Ri,"v").concat(Ri*3/4,"h").concat(-32,"z"),className:"recharts-legend-icon"});if(ie.isValidElement(n.legendIcon)){var u=yue({},n);return delete u.legendIcon,ie.cloneElement(n.legendIcon,u)}return ie.createElement(rE,{fill:c,cx:a,cy:a,size:Ri,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,i=this.props,a=i.payload,o=i.iconSize,l=i.layout,c=i.formatter,u=i.inactiveColor,f={x:0,y:0,width:Ri,height:Ri}
110,x={display:l==="horizontal"?"inline-block":"block",marginRight:10},m={display:"inline-block",verticalAlign:"middle",marginRight:4};return a.map(function(p,y){var v=p.formatter||c,b=or(Bf(Bf({"recharts-legend-item":!0},"legend-item-".concat(y),!0),"inactive",p.inactive));if(p.type==="none")return null;var E=$t(p.value)?null:p.value;uo(!$t(p.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var N=p.inactive?u:p.color;return ie.createElement("li",Hw({className:b,style:x,key:"legend-item-".concat(y)},$g(n.props,p,y)),ie.createElement(Iw,{width:o,height:o,viewBox:f,style:m},n.renderIcon(p)),ie.createElement("span",{className:"recharts-legend-item-text",style:{color:N}},v?v(E,p,y):E))})}},{key:"render",value:function(){var n=this.props,i=n.payload,a=n.layout,o=n.align;if(!i||!i.length)return null;var l={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return ie.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])}(C.PureComponent);Bf(nE,"displayName","Legend");Bf(nE,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var D9,bD;function kue(){if(bD)return D9;bD=1;var e=vy();function t(){this.__data__=new e,this.size=0}return D9=t,D9}var F9,CD;function Sue(){if(CD)return F9;CD=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return F9=e,F9}var P9,wD;function Bue(){if(wD)return P9;wD=1;function e(t){return this.__data__.get(t)}return P9=e,P9}var T9,ED;function Due(){if(ED)return T9;ED=1;function e(t){return this.__data__.has(t)}return T9=e,T9}var M9,jD;function Fue(){if(jD)return M9;jD=1;var e=vy(),t=G3(),r=K3(),n=200;function i(a,o){var l=this.__data__;if(l instanceof e){var c=l.__data__;if(!t||c.length<n-1)return c.push([a,o]),this.size=++l.size,this;l=this.__data__=new r(c)}return l.set(a,o),this.size=l.size,this}return M9=i,M9}var O9,ND;function PV(){if(ND)return O9;ND=1;var e=vy(),t=kue(),r=Sue(),n=Bue(),i=Due(),a=Fue();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=a,O9=o,O9}var L9,AD;function Pue(){if(AD)return L9;AD=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return L9=t,L9}var R9,kD;function Tue(){if(kD)return R9;kD=1;function e(t){return this.__data__.has(t)}return R9=e,R9}var _9,SD;function TV(){if(SD)return _9;SD=1;var e=K3(),t=Pue(),r=Tue();function n(i){var a=-1,o=i==null?0:i.length;for(this.__data__=new e;++a<o;)this.add(i[a])}return n.prototype.add=n.prototype.push=t,n.prototype.has=r,_9=n,_9}var I9,BD;function MV(){if(BD)return I9;BD=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 I9=e,I9}var $9,DD;function OV(){if(DD)return $9;DD=1;function e(t,r){return t.has(r)}return $9=e,$9}var z9,FD;function LV(){if(FD)return z9;FD=1;var e=TV(),t=MV(),r=OV(),n=1,i=2;function a(o,l,c,u,f,x){var m=c&n,p=o.length,y=l.length;if(p!=y&&!(m&&y>p))return!1;var v=x.get(o),b=x.get(l);if(v&&b)return v==l&&b==o;var E=-1,N=!0,j=c&i?new e:void 0;for(x.set(o,l),x.set(l,o);++E<p;){var A=o[E],w=l[E];if(u)var S=m?u(w,A,E,l,o,x):u(A,w,E,o,l,x);if(S!==void 0){if(S)continue;N=!1;break}if(j){if(!t(l,function(B,D){if(!r(j,D)&&(A===B||f(A,B,c,u,x)))return j.push(D)})){N=!1;break}}else if(!(A===w||f(A,w,c,u,x))){N=!1;break}}return x.delete(o),x.delete(l),N}return z9=a,z9}var V9,PD;function Mue(){if(PD)return V9;PD=1;var e=_a(),t=e.Uint8Array;return V9=t,V9}var U9,TD;function Oue(){if(TD)return U9;TD=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i,a){n[++r]=[a,i]}),n}return U9=e,U9}var q9,MD;function sE(){if(MD)return q9;MD=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i){n[++r]=i}),n}return q9=e,q9}var W9,OD;function Lue(){if(OD)return W9;OD=1;var e=qh(),t=Mue(),r=H3(),n=LV(),i=Oue(),a=sE(),o=1,l=2,c="[object Boolean]",u="[object Date]",f="[object Error]",x="[object Map]",m="[object Number]",p="[object RegExp]",y="[object Set]",v="[object String]",b="[object Symbol]",E="[object ArrayBuffer]",N="[object DataView]",j=e?e.prototype:void 0,A=j?j.valueOf
vendor: 8,661 bytes, line 110
110:void 0;function w(S,B,D,P,O,M,I){switch(D){case N:if(S.byteLength!=B.byteLength||S.byteOffset!=B.byteOffset)return!1;S=S.buffer,B=B.buffer;case E:return!(S.byteLength!=B.byteLength||!M(new t(S),new t(B)));case c:case u:case m:return r(+S,+B);case f:return S.name==B.name&&S.message==B.message;case p:case v:return S==B+"";case x:var V=i;case y:var W=P&o;if(V||(V=a),S.size!=B.size&&!W)return!1;var _=I.get(S);if(_)return _==B;P|=l,I.set(S,B);var z=n(V(S),V(B),P,O,M,I);return I.delete(S),z;case b:if(A)return A.call(S)==A.call(B)}return!1}return W9=w,W9}var H9,LD;function RV(){if(LD)return H9;LD=1;function e(t,r){for(var n=-1,i=r.length,a=t.length;++n<i;)t[a+n]=r[n];return t}return H9=e,H9}var G9,RD;function Rue(){if(RD)return G9;RD=1;var e=RV(),t=zs();function r(n,i,a){var o=i(n);return t(n)?o:e(o,a(n))}return G9=r,G9}var K9,_D;function _ue(){if(_D)return K9;_D=1;function e(t,r){for(var n=-1,i=t==null?0:t.length,a=0,o=[];++n<i;){var l=t[n];r(l,n,t)&&(o[a++]=l)}return o}return K9=e,K9}var X9,ID;function Iue(){if(ID)return X9;ID=1;function e(){return[]}return X9=e,X9}var Y9,$D;function $ue(){if($D)return Y9;$D=1;var e=_ue(),t=Iue(),r=Object.prototype,n=r.propertyIsEnumerable,i=Object.getOwnPropertySymbols,a=i?function(o){return o==null?[]:(o=Object(o),e(i(o),function(l){return n.call(o,l)}))}:t;return Y9=a,Y9}var Q9,zD;function zue(){if(zD)return Q9;zD=1;function e(t,r){for(var n=-1,i=Array(t);++n<t;)i[n]=r(n);return i}return Q9=e,Q9}var Z9,VD;function Vue(){if(VD)return Z9;VD=1;var e=ko(),t=So(),r="[object Arguments]";function n(i){return t(i)&&e(i)==r}return Z9=n,Z9}var J9,UD;function iE(){if(UD)return J9;UD=1;var e=Vue(),t=So(),r=Object.prototype,n=r.hasOwnProperty,i=r.propertyIsEnumerable,a=e(function(){return arguments}())?e:function(o){return t(o)&&n.call(o,"callee")&&!i.call(o,"callee")};return J9=a,J9}var _x={exports:{}},e5,qD;function Uue(){if(qD)return e5;qD=1;function e(){return!1}return e5=e,e5}_x.exports;var WD;function _V(){return WD||(WD=1,function(e,t){var r=_a(),n=Uue(),i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===i,l=o?r.Buffer:void 0,c=l?l.isBuffer:void 0,u=c||n;e.exports=u}(_x,_x.exports)),_x.exports}var t5,HD;function aE(){if(HD)return t5;HD=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function r(n,i){var a=typeof n;return i=i??e,!!i&&(a=="number"||a!="symbol"&&t.test(n))&&n>-1&&n%1==0&&n<i}return t5=r,t5}var r5,GD;function oE(){if(GD)return r5;GD=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return r5=t,r5}var n5,KD;function que(){if(KD)return n5;KD=1;var e=ko(),t=oE(),r=So(),n="[object Arguments]",i="[object Array]",a="[object Boolean]",o="[object Date]",l="[object Error]",c="[object Function]",u="[object Map]",f="[object Number]",x="[object Object]",m="[object RegExp]",p="[object Set]",y="[object String]",v="[object WeakMap]",b="[object ArrayBuffer]",E="[object DataView]",N="[object Float32Array]",j="[object Float64Array]",A="[object Int8Array]",w="[object Int16Array]",S="[object Int32Array]",B="[object Uint8Array]",D="[object Uint8ClampedArray]",P="[object Uint16Array]",O="[object Uint32Array]",M={};M[N]=M[j]=M[A]=M[w]=M[S]=M[B]=M[D]=M[P]=M[O]=!0,M[n]=M[i]=M[b]=M[a]=M[E]=M[o]=M[l]=M[c]=M[u]=M[f]=M[x]=M[m]=M[p]=M[y]=M[v]=!1;function I(V){return r(V)&&t(V.length)&&!!M[e(V)]}return n5=I,n5}var s5,XD;function IV(){if(XD)return s5;XD=1;function e(t){return function(r){return t(r)}}return s5=e,s5}var Ix={exports:{}};Ix.exports;var YD;function Wue(){return YD||(YD=1,function(e,t){var r=iV(),n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,o=a&&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}(Ix,Ix.exports)),Ix.exports}var i5,QD;function $V(){if(QD)return i5;QD=1;var e=que(),t=IV(),r=Wue(),n=r&&r.isTypedArray,i=n?t(n):e;return i5=i,i5}var a5,ZD;function Hue(){if(ZD)return a5;ZD=1;var e=zue(),t=iE(),r=zs(),n=_V(),i=aE(),a=$V(),o=Object.prototype,l=o.hasOwnProperty;function c(u,f){var x=r(u),m=!x&&t(u),p=!x&&!m&&n(u),y=!x&&!m&&!p&&a(u),v=x||m||p||y,b=v?e(u.length,String):[],E=b.length;for(var N in u)(f||l.call(u,N))&&!(v&&(N=="length"||p&&(N=="offset"||N=="parent")||y&&(N=="buffer"||N=="byteLength"||N=="byteOffset")||i(N,E)))&&b.push(N);return b}return a5=c,a5}var o5,JD;function Gue(){if(JD)return o5;JD=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||e;return r===i}return o5=t,o5}var l5,eF;function zV(){if(eF)return l5;eF=1;function e(t,r){return function(n){return t(r(n))}}return l5=e,l5}var c5,tF;function Kue(){if(tF)return c5;tF=1;var e=zV(),t=e(Object.keys,Object);return c5=t,c5}var u5,rF;function Xue(){if(rF)return u5;rF=1;var e=Gue(),t=Kue(),r=Object.prototype,n=r.hasOwnProperty;function i(a){if(!e(a))return t(a);var o=[];for(var l in Object(a))n.call(a,l)&&l!="constructor"&&o.push(l);return o}return u5=i,u5}var d5,nF;function Hh(){if(nF)return d5;nF=1;var e=W3(),t=oE();function r(n){return n!=null&&t(n.length)&&!e(n)}return d5=r,d5}var x5,sF;function Ay(){if(sF)return x5;sF=1;var e=Hue(),t=Xue(),r=Hh();function n(i){return r(i)?e(i):t(i)}return x5=n,x5}var f5,iF;function Yue(){if(iF)return f5;iF=1;var e=Rue(),t=$ue(),r=Ay();function n(i){return e(i,r,t)}return f5=n,f5}var h5,aF;function Que(){if(aF)return h5;aF=1;var e=Yue(),t=1,r=Object.prototype,n=r.hasOwnProperty;function i(a,o,l,c,u,f){var x=l&t,m=e(a),p=m.length,y=e(o),v=y.length;if(p!=v&&!x)return!1;for(var b=p;b--;){var E=m[b];if(!(x?E in o:n.call(o,E)))return!1}var N=f.get(a),j=f.get(o);if(N&&j)return N==o&&j==a;var A=!0;f.set(a,o),f.set(o,a);for(var w=x;++b<p;){E=m[b];var S=a[E],B=o[E];if(c)var D=x?c(B,S,E,o,a,f):c(S,B,E,a,o,f);if(!(D===void 0?S===B||u(S,B,l,c,f):D)){A=!1;break}w||(w=E=="constructor")}if(A&&!w){var P=a.constructor,O=o.constructor;P!=O&&"constructor"in a&&"constructor"in o&&!(typeof P=="function"&&P instanceof P&&typeof O=="function"&&O instanceof O)&&(A=!1)}return f.delete(a),f.delete(o),A}return h5=i,h5}var m5,oF;function Zue(){if(oF)return m5;oF=1;var e=au(),t=_a(),r=e(t,"DataView");return m5=r,m5}var p5,lF;function Jue(){if(lF)return p5;lF=1;var e=au(),t=_a(),r=e(t,"Promise");return p5=r,p5}var g5,cF;function VV(){if(cF)return g5;cF=1;var e=au(),t=_a(),r=e(t,"Set");return g5=r,g5}var y5,uF;function ede(){if(uF)return y5;uF=1;var e=au(),t=_a(),r=e(t,"WeakMap");return y5=r,y5}var v5,dF;function tde(){if(dF)return v5;dF=1;var e=Zue(),t=G3(),r=Jue(),n=VV(),i=ede(),a=ko(),o=aV(),l="[object Map]",c="[object Object]",u="[object Promise]",f="[object Set]",x="[object WeakMap]",m="[object DataView]",p=o(e),y=o(t),v=o(r),b=o(n),E=o(i),N=a;return(e&&N(new e(new ArrayBuffer(1)))!=m||t&&N(new t)!=l||r&&N(r.resolve())!=u||n&&N(new n)!=f||i&&N(new i)!=x)&&(N=function(j){var A=a(j),w=A==c?j.constructor:void 0,S=w?o(w):"";if(S)switch(S){case p:return m;case y:return l;case v:return u;case b:return f;case E:return x}return A}),v5=N,v5}var b5,xF;function rde(){if(xF)return b5;xF=1;var e=PV(),t=LV(),r=Lue(),n=Que(),i=tde(),a=zs(),o=_V(),l=$V(),c=1,u="[object Arguments]",f="[object Array]",x="[object Object]",m=Object.prototype,p=m.hasOwnProperty;function y(v,b,E,N,j,A){var w=a(v),S=a(b),B=w?f:i(v),D=S?f:i(b);B=B==u?x:B,D=D==u?x:D;var P=B==x,O=D==x,M=B==D;if(M&&o(v)){if(!o(b))return!1;w=!0,P=!1}if(M&&!P)return A||(A=new e),w||l(v)?t(v,b,E,N,j,A):r(v,b,B,E,N,j,A);if(!(E&c)){var I=P&&p.call(v,"__wrapped__"),V=O&&p.call(b,"__wrapped__");if(I||V){var W=I?v.value():v,_=V?b.value():b;return A||(A=new e),j(W,_,E,N,A)}}return M?(A||(A=new e),n(v,b,E,N,j,A)):!1}return b5=y,b5}var C5,fF;function lE(){if(fF)return C5;fF=1;var e=rde(),t=So();function r(n,i,a,o,l){return n===i?!0:n==null||i==null||!t(n)&&!t(i)?n!==n&&i!==i:e(n,i,a,o,r,l)}return C5=r,C5}var w5,hF;function nde(){if(hF)return w5;hF=1;var e=PV(),t=lE(),r=1,n=2;function i(a,o,l,c){var u=l.length,f=u,x=!c;if(a==null)return!f;for(a=Object(a);u--;){var m=l[u];if(x&&m[2]?m[1]!==a[m[0]]:!(m[0]in a))return!1}for(;++u<f;){m=l[u];var p=m[0],y=a[p],v=m[1];if(x&&m[2]){if(y===void 0&&!(p in a))return!1}else{var b=new e;if(c)var E=c(y,v,p,a,o,b);if(!(E===void 0?t(v,y,r|n,c,b):E))return!1}}return!0}return w5=i,w5}var E5,mF;function UV(){if(mF)return E5;mF=1;var e=Ol();function t(r){return r===r&&!e(r)}return E5=t,E5}var j5,pF;function sde(){if(pF)return j5;pF=1;var e=UV(),t=Ay();function r(n){for(var i=t(n),a=i.length;a--;){var o=i[a],l=n[o];i[a]=[o,l,e(l)]}return i}return j5=r,j5}var N5,gF;function qV(){if(gF)return N5;gF=1;function e(t,r){return function(n){return n==null?!1:n[t]===r&&(r!==void 0||t in Object(n))}}return N5=e,N5}var A5,yF;function ide(){if(yF)return A5;yF=1;
110var e=nde(),t=sde(),r=qV();function n(i){var a=t(i);return a.length==1&&a[0][2]?r(a[0][0],a[0][1]):function(o){return o===i||e(o,i,a)}}return A5=n,A5}var k5,vF;function ade(){if(vF)return k5;vF=1;function e(t,r){return t!=null&&r in Object(t)}return k5=e,k5}var S5,bF;function ode(){if(bF)return S5;bF=1;var e=cV(),t=iE(),r=zs(),n=aE(),i=oE(),a=Cy();function o(l,c,u){c=e(c,l);for(var f=-1,x=c.length,m=!1;++f<x;){var p=a(c[f]);if(!(m=l!=null&&u(l,p)))break;l=l[p]}return m||++f!=x?m:(x=l==null?0:l.length,!!x&&i(x)&&n(p,x)&&(r(l)||t(l)))}return S5=o,S5}var B5,CF;function lde(){if(CF)return B5;CF=1;var e=ade(),t=ode();function r(n,i){return n!=null&&t(n,i,e)}return B5=r,B5}var D5,wF;function cde(){if(wF)return D5;wF=1;var e=lE(),t=uV(),r=lde(),n=q3(),i=UV(),a=qV(),o=Cy(),l=1,c=2;function u(f,x){return n(f)&&i(x)?a(o(f),x):function(m){var p=t(m,f);return p===void 0&&p===x?r(m,f):e(x,p,l|c)}}return D5=u,D5}var F5,EF;function b0(){if(EF)return F5;EF=1;function e(t){return t}return F5=e,F5}var P5,jF;function ude(){if(jF)return P5;jF=1;function e(t){return function(r){return r==null?void 0:r[t]}}return P5=e,P5}var T5,NF;function dde(){if(NF)return T5;NF=1;var e=Y3();function t(r){return function(n){return e(n,r)}}return T5=t,T5}var M5,AF;function xde(){if(AF)return M5;AF=1;var e=ude(),t=dde(),r=q3(),n=Cy();function i(a){return r(a)?e(n(a)):t(a)}return M5=i,M5}var O5,kF;function Ll(){if(kF)return O5;kF=1;var e=ide(),t=cde(),r=b0(),n=zs(),i=xde();function a(o){return typeof o=="function"?o:o==null?r:typeof o=="object"?n(o)?t(o[0],o[1]):e(o):i(o)}return O5=a,O5}var L5,SF;function WV(){if(SF)return L5;SF=1;function e(t,r,n,i){for(var a=t.length,o=n+(i?1:-1);i?o--:++o<a;)if(r(t[o],o,t))return o;return-1}return L5=e,L5}var R5,BF;function fde(){if(BF)return R5;BF=1;function e(t){return t!==t}return R5=e,R5}var _5,DF;function hde(){if(DF)return _5;DF=1;function e(t,r,n){for(var i=n-1,a=t.length;++i<a;)if(t[i]===r)return i;return-1}return _5=e,_5}var I5,FF;function mde(){if(FF)return I5;FF=1;var e=WV(),t=fde(),r=hde();function n(i,a,o){return a===a?r(i,a,o):e(i,t,o)}return I5=n,I5}var $5,PF;function pde(){if(PF)return $5;PF=1;var e=mde();function t(r,n){var i=r==null?0:r.length;return!!i&&e(r,n,0)>-1}return $5=t,$5}var z5,TF;function gde(){if(TF)return z5;TF=1;function e(t,r,n){for(var i=-1,a=t==null?0:t.length;++i<a;)if(n(r,t[i]))return!0;return!1}return z5=e,z5}var V5,MF;function yde(){if(MF)return V5;MF=1;function e(){}return V5=e,V5}var U5,OF;function vde(){if(OF)return U5;OF=1;var e=VV(),t=yde(),r=sE(),n=1/0,i=e&&1/r(new e([,-0]))[1]==n?function(a){return new e(a)}:t;return U5=i,U5}var q5,LF;function bde(){if(LF)return q5;LF=1;var e=TV(),t=pde(),r=gde(),n=OV(),i=vde(),a=sE(),o=200;function l(c,u,f){var x=-1,m=t,p=c.length,y=!0,v=[],b=v;if(f)y=!1,m=r;else if(p>=o){var E=u?null:i(c);if(E)return a(E);y=!1,m=n,b=new e}else b=u?[]:v;e:for(;++x<p;){var N=c[x],j=u?u(N):N;if(N=f||N!==0?N:0,y&&j===j){for(var A=b.length;A--;)if(b[A]===j)continue e;u&&b.push(j),v.push(N)}else m(b,j,f)||(b!==v&&b.push(j),v.push(N))}return v}return q5=l,q5}var W5,RF;function Cde(){if(RF)return W5;RF=1;var e=Ll(),t=bde();function r(n,i){return n&&n.length?t(n,e(i,2)):[]}return W5=r,W5}var wde=Cde();const _F=lr(wde);function HV(e,t,r){return t===!0?_F(e,r):$t(t)?_F(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 Ede=["ref"];function IF(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 Za(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?IF(Object(r),!0).forEach(function(n){ky(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):IF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}
110function jde(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,KV(n.key),n)}}function Nde(e,t,r){return t&&$F(e.prototype,t),r&&$F(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ade(e,t,r){return t=Gg(t),kde(e,GV()?Reflect.construct(t,r||[],Gg(e).constructor):t.apply(e,r))}function kde(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 Sde(e)}function Sde(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function GV(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(GV=function(){return!!e})()}function Gg(e){return Gg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Gg(e)}function Bde(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&&Kw(e,t)}function Kw(e,t){return Kw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Kw(e,t)}function ky(e,t,r){return t=KV(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function KV(e){var t=Dde(e,"string");return Od(t)=="symbol"?t:t+""}function Dde(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 Fde(e,t){if(e==null)return{};var r=Pde(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Pde(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 Tde(e){return e.value}function Mde(e,t){if(ie.isValidElement(e))return ie.cloneElement(e,t);if(typeof e=="function")return ie.createElement(e,t);t.ref;var r=Fde(t,Ede);return ie.createElement(nE,r)}var zF=1,ad=function(e){function t(){var r;jde(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=Ade(this,t,[].concat(i)),ky(r,"lastBoundingBox",{width:-1,height:-1}),r}return Bde(t,e),Nde(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)>zF||Math.abs(i.height-this.lastBoundingBox.height)>zF)&&(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?Za({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var i=this.props,a=i.layout,o=i.align,l=i.verticalAlign,c=i.margin,u=i.chartWidth,f=i.chartHeight,x,m;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(o==="center"&&a==="vertical"){var p=this.getBBoxSnapshot();x={left:((u||0)-p.width)/2}}else x=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 y=this.getBBoxSnapsh
110ot();m={top:((f||0)-y.height)/2}}else m=l==="bottom"?{bottom:c&&c.bottom||0}:{top:c&&c.top||0};return Za(Za({},x),m)}},{key:"render",value:function(){var n=this,i=this.props,a=i.content,o=i.width,l=i.height,c=i.wrapperStyle,u=i.payloadUniqBy,f=i.payload,x=Za(Za({position:"absolute",width:o||"auto",height:l||"auto"},this.getDefaultPosition(c)),c);return ie.createElement("div",{className:"recharts-legend-wrapper",style:x,ref:function(p){n.wrapperNode=p}},Mde(a,Za(Za({},this.props),{},{payload:HV(f,u,Tde)})))}}],[{key:"getWithHeight",value:function(n,i){var a=Za(Za({},this.defaultProps),n.props),o=a.layout;return o==="vertical"&&qe(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||i}:null}}])}(C.PureComponent);ky(ad,"displayName","Legend");ky(ad,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var H5,VF;function Ode(){if(VF)return H5;VF=1;var e=qh(),t=iE(),r=zs(),n=e?e.isConcatSpreadable:void 0;function i(a){return r(a)||t(a)||!!(n&&a&&a[n])}return H5=i,H5}var G5,UF;function XV(){if(UF)return G5;UF=1;var e=RV(),t=Ode();function r(n,i,a,o,l){var c=-1,u=n.length;for(a||(a=t),l||(l=[]);++c<u;){var f=n[c];i>0&&a(f)?i>1?r(f,i-1,a,o,l):e(l,f):o||(l[l.length]=f)}return l}return G5=r,G5}var K5,qF;function Lde(){if(qF)return K5;qF=1;function e(t){return function(r,n,i){for(var a=-1,o=Object(r),l=i(r),c=l.length;c--;){var u=l[t?c:++a];if(n(o[u],u,o)===!1)break}return r}}return K5=e,K5}var X5,WF;function Rde(){if(WF)return X5;WF=1;var e=Lde(),t=e();return X5=t,X5}var Y5,HF;function YV(){if(HF)return Y5;HF=1;var e=Rde(),t=Ay();function r(n,i){return n&&e(n,i,t)}return Y5=r,Y5}var Q5,GF;function _de(){if(GF)return Q5;GF=1;var e=Hh();function t(r,n){return function(i,a){if(i==null)return i;if(!e(i))return r(i,a);for(var o=i.length,l=n?o:-1,c=Object(i);(n?l--:++l<o)&&a(c[l],l,c)!==!1;);return i}}return Q5=t,Q5}var Z5,KF;function cE(){if(KF)return Z5;KF=1;var e=YV(),t=_de(),r=t(e);return Z5=r,Z5}var J5,XF;function QV(){if(XF)return J5;XF=1;var e=cE(),t=Hh();function r(n,i){var a=-1,o=t(n)?Array(n.length):[];return e(n,function(l,c,u){o[++a]=i(l,c,u)}),o}return J5=r,J5}var e8,YF;function Ide(){if(YF)return e8;YF=1;function e(t,r){var n=t.length;for(t.sort(r);n--;)t[n]=t[n].value;return t}return e8=e,e8}var t8,QF;function $de(){if(QF)return t8;QF=1;var e=g0();function t(r,n){if(r!==n){var i=r!==void 0,a=r===null,o=r===r,l=e(r),c=n!==void 0,u=n===null,f=n===n,x=e(n);if(!u&&!x&&!l&&r>n||l&&c&&f&&!u&&!x||a&&c&&f||!i&&f||!o)return 1;if(!a&&!l&&!x&&r<n||x&&i&&o&&!a&&!l||u&&i&&o||!c&&o||!f)return-1}return 0}return t8=t,t8}var r8,ZF;function zde(){if(ZF)return r8;ZF=1;var e=$de();function t(r,n,i){for(var a=-1,o=r.criteria,l=n.criteria,c=o.length,u=i.length;++a<c;){var f=e(o[a],l[a]);if(f){if(a>=u)return f;var x=i[a];return f*(x=="desc"?-1:1)}}return r.index-n.index}return r8=t,r8}var n8,JF;function Vde(){if(JF)return n8;JF=1;var e=X3(),t=Y3(),r=Ll(),n=QV(),i=Ide(),a=IV(),o=zde(),l=b0(),c=zs();function u(f,x,m){x.length?x=e(x,function(v){return c(v)?function(b){return t(b,v.length===1?v[0]:v)}:v}):x=[l];var p=-1;x=e(x,a(r));var y=n(f,function(v,b,E){var N=e(x,function(j){return j(v)});return{criteria:N,index:++p,value:v}});return i(y,function(v,b){return o(v,b,m)})}return n8=u,n8}var s8,eP;function Ude(){if(eP)return s8;eP=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 s8=e,s8}var i8,tP;function qde(){if(tP)return i8;tP=1;var e=Ude(),t=Math.max;function r(n,i,a){return i=t(i===void 0?n.length-1:i,0),function(){for(var o=arguments,l=-1,c=t(o.length-i,0),u=Array(c);++l<c;)u[l]=o[i+l];l=-1;for(var f=Array(i+1);++l<i;)f[l]=o[l];return f[i]=a(u),e(n,this,f)}}return i8=r,i8}var a8,rP;function Wde(){if(rP)return a8;rP=1;function e(t){return function(){return t}}return a8=e,a8}var o8,nP;function ZV(){if(nP)return o8;nP=1;var e=au(),t=function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}}();return o8=t,o8}var l8,sP;
110function Hde(){if(sP)return l8;sP=1;var e=Wde(),t=ZV(),r=b0(),n=t?function(i,a){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(a),writable:!0})}:r;return l8=n,l8}var c8,iP;function Gde(){if(iP)return c8;iP=1;var e=800,t=16,r=Date.now;function n(i){var a=0,o=0;return function(){var l=r(),c=t-(l-o);if(o=l,c>0){if(++a>=e)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}return c8=n,c8}var u8,aP;function Kde(){if(aP)return u8;aP=1;var e=Hde(),t=Gde(),r=t(e);return u8=r,u8}var d8,oP;function Xde(){if(oP)return d8;oP=1;var e=b0(),t=qde(),r=Kde();function n(i,a){return r(t(i,a,e),i+"")}return d8=n,d8}var x8,lP;function Sy(){if(lP)return x8;lP=1;var e=H3(),t=Hh(),r=aE(),n=Ol();function i(a,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],a):!1}return x8=i,x8}var f8,cP;function Yde(){if(cP)return f8;cP=1;var e=XV(),t=Vde(),r=Xde(),n=Sy(),i=r(function(a,o){if(a==null)return[];var l=o.length;return l>1&&n(a,o[0],o[1])?o=[]:l>2&&n(o[0],o[1],o[2])&&(o=[o[0]]),t(a,e(o,1),[])});return f8=i,f8}var Qde=Yde();const uE=lr(Qde);function Df(e){"@babel/helpers - typeof";return Df=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},Df(e)}function Xw(){return Xw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Xw.apply(this,arguments)}function Zde(e,t){return r0e(e)||t0e(e,t)||e0e(e,t)||Jde()}function Jde(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
111In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function e0e(e,t){if(e){if(typeof e=="string")return uP(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 uP(e,t)}}function uP(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 t0e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function r0e(e){if(Array.isArray(e))return e}function dP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function h8(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dP(Object(r),!0).forEach(function(n){n0e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function n0e(e,t,r){return t=s0e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s0e(e){var t=i0e(e,"string");return Df(t)=="symbol"?t:t+""}function i0e(e,t){if(Df(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Df(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function a0e(e){return Array.isArray(e)&&En(e[0])&&En(e[1])?e.join(" ~ "):e}var o0e=function(t){var r=t.separator,n=r===void 0?" : ":r,i=t.contentStyle,a=i===void 0?{}:i,o=t.itemStyle,l=o===void 0?{}:o,c=t.labelStyle,u=c===void 0?{}:c,f=t.payload,x=t.formatter,m=t.itemSorter,p=t.wrapperClassName,y=t.labelClassName,v=t.label,b=t.labelFormatter,E=t.accessibilityLayer,N=E===void 0?!1:E,j=function(){if(f&&f.length){var I={padding:0,margin:0},V=(m?uE(f,m):f).map(function(W,_){if(W.type==="none")return null;var z=h8({display:"block",paddingTop:4,paddingBottom:4,color:W.color||"#000"},l),R=W.formatter||x||a0e,q=W.value,G=W.name,K=q,$=G;if(R&&K!=null&&$!=null){var H=R(q,G,W,_,f);if(Array.isArray(H)){var te=Zde(H,2);K=te[0],$=te[1]}else K=H}return ie.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(_),style:z},En($)?ie.createElement("span",{className:"recharts-tooltip-item-name"},$):null,En($)?ie.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,ie.createElement("span",{className:"recharts-tooltip-item-value"},K),ie.createElement("span",{className:"recharts-tooltip-item-unit"},W.unit||""))});return ie.createElement("ul",{className:"recharts-tooltip-item-list",style:I},V)}return null},A=h8({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},a),w=h8({margin:0},u),S=!nr(v),B=S?v:"",D=or("recharts-default-tooltip",p),P=or("recharts-tooltip-label",y);S&&b&&f!==void 0&&f!==null&&(B=b(v,f));var O=N?{role:"status","aria-live":"assertive"}:{};return ie.createElement("div",Xw({className:D,style:A},O),ie.createElement("p",{className:P,style:w},ie.isValidElement(B)?B:"".concat(B)),j())};function Ff(e){"@babel/helpers - typeof";return Ff=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},Ff(e)}function gp(e,t,r){return t=l0e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l0e(e){var t=c0e(e,"string");return Ff(t)=="symbol"?t:t+""}function c0e(e,t){if(Ff(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ff(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var vx="recharts-tooltip-wrapper",u0e={visibility:"hidden"};function d0e(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return or(vx,gp(gp(gp(gp({},"".concat(vx,"-right"),qe(r)&&t&&qe(t.x)&&r>=t.x),"".concat(vx,"-left"),qe(r)&&t&&qe(t.x)&&r<t.x),"".concat(vx,"-bottom"),qe(n)&&t&&qe(t.y)&&n>=t.y),"".concat(vx,"-top"),qe(n)&&t&&qe(t.y)&&n<t.y))}function xP(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,i=e.offsetTopLeft,a=e.position,o=e.reverseDirection,l=e.tooltipDimension,c=e.viewBox,u=e.viewBoxDimension;if(a&&qe(a[n]))return a[n];var f=r[n]-l-i,x=r[n]+i;if(t[n])return o[n]?f:x;if(o[n]){var m=f,p=c[n];return m<p?Math.max(x,c[n]):Math.max(f,c[n])}var y=x+l,v=c[n]+u;return y>v?Math.max(f,c[n]):Math.max(x,c[n])}function x0e(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 f0e(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,l=e.useTranslate3d,
111c=e.viewBox,u,f,x;return o.height>0&&o.width>0&&r?(f=xP({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:c,viewBoxDimension:c.width}),x=xP({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:c,viewBoxDimension:c.height}),u=x0e({translateX:f,translateY:x,useTranslate3d:l})):u=u0e,{cssProperties:u,cssClasses:d0e({translateX:f,translateY:x,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 fP(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 hP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fP(Object(r),!0).forEach(function(n){Qw(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function h0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m0e(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,eU(n.key),n)}}function p0e(e,t,r){return t&&m0e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function g0e(e,t,r){return t=Kg(t),y0e(e,JV()?Reflect.construct(t,r||[],Kg(e).constructor):t.apply(e,r))}function y0e(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 v0e(e)}function v0e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function JV(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(JV=function(){return!!e})()}function Kg(e){return Kg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Kg(e)}function b0e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Yw(e,t)}function Yw(e,t){return Yw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Yw(e,t)}function Qw(e,t,r){return t=eU(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eU(e){var t=C0e(e,"string");return Ld(t)=="symbol"?t:t+""}function C0e(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 mP=1,w0e=function(e){function t(){var r;h0e(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=g0e(this,t,[].concat(i)),Qw(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),Qw(r,"handleKeyDown",function(o){if(o.key==="Escape"){var l,c,u,f;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:(u=(f=r.props.coordinate)===null||f===void 0?void 0:f.y)!==null&&u!==void 0?u:0}})}}),r}return b0e(t,e),p0e(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>mP||Math.abs(n.height-this.state.lastBoundingBox.height)>mP)&&this.setState({lastBoundingBox:{width:n.width,height:n.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var n,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,l=i.animationDuration,c=i.animationEasing,u=i.children,f=i.coordinate,x=i.hasPayload,m=i.isAnimationActive,p=i.offset,y=i.position,v=i.reverseDirection,b=i.useTranslate3d,E=i.viewBox,N=i.wrapperStyle,j=f0e({allowEscapeViewBox:o,coordinate:f,offsetTopLeft:p,position:y,reverseDirection:v,tooltipBox:this.state.lastBoundingBox,useTranslate3d:b,viewBox:E}
111),A=j.cssClasses,w=j.cssProperties,S=hP(hP({transition:m&&a?"transform ".concat(l,"ms ").concat(c):void 0},w),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&x?"visible":"hidden",position:"absolute",top:0,left:0},N);return ie.createElement("div",{tabIndex:-1,className:A,style:S,ref:function(D){n.wrapperNode=D}},u)}}])}(C.PureComponent),E0e=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},C0={isSsr:E0e()};function Rd(e){"@babel/helpers - typeof";return Rd=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},Rd(e)}function pP(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 gP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pP(Object(r),!0).forEach(function(n){dE(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function j0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function N0e(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,rU(n.key),n)}}function A0e(e,t,r){return t&&N0e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function k0e(e,t,r){return t=Xg(t),S0e(e,tU()?Reflect.construct(t,r||[],Xg(e).constructor):t.apply(e,r))}function S0e(e,t){if(t&&(Rd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return B0e(e)}function B0e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(tU=function(){return!!e})()}function Xg(e){return Xg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Xg(e)}function D0e(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&&Zw(e,t)}function Zw(e,t){return Zw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Zw(e,t)}function dE(e,t,r){return t=rU(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rU(e){var t=F0e(e,"string");return Rd(t)=="symbol"?t:t+""}function F0e(e,t){if(Rd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Rd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function P0e(e){return e.dataKey}function T0e(e,t){return ie.isValidElement(e)?ie.cloneElement(e,t):typeof e=="function"?ie.createElement(e,t):ie.createElement(o0e,t)}var da=function(e){function t(){return j0e(this,t),k0e(this,t,arguments)}return D0e(t,e),A0e(t,[{key:"render",value:function(){var n=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,l=i.animationDuration,c=i.animationEasing,u=i.content,f=i.coordinate,x=i.filterNull,m=i.isAnimationActive,p=i.offset,y=i.payload,v=i.payloadUniqBy,b=i.position,E=i.reverseDirection,N=i.useTranslate3d,j=i.viewBox,A=i.wrapperStyle,w=y??[];x&&w.length&&(w=HV(y.filter(function(B){return B.value!=null&&(B.hide!==!0||n.props.includeHidden)}),v,P0e));var S=w.length>0;return ie.createElement(w0e,{allowEscapeViewBox:o,animationDuration:l,animationEasing:c,isAnimationActive:m,active:a,coordinate:f,hasPayload:S,offset:p,position:b,reverseDirection:E,useTranslate3d:N,viewBox:j,wrapperStyle:A},T0e(u,gP(gP({},this.props),{},{payload:w})))}}])}(C.PureComponent);dE(da,"displayName","Tooltip");dE(da,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!C0.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 m8,yP;function M0e(){if(yP)return m8;yP=1;var e=_a(),t=function(){return e.Date.now()};return m8=t,m8}var p8,vP;
vendor: 4,183 bytes, lines 111-112
111function O0e(){if(vP)return p8;vP=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return p8=t,p8}var g8,bP;function L0e(){if(bP)return g8;bP=1;var e=O0e(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return g8=r,g8}var y8,CP;function nU(){if(CP)return y8;CP=1;var e=L0e(),t=Ol(),r=g0(),n=NaN,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,l=parseInt;function c(u){if(typeof u=="number")return u;if(r(u))return n;if(t(u)){var f=typeof u.valueOf=="function"?u.valueOf():u;u=t(f)?f+"":f}if(typeof u!="string")return u===0?u:+u;u=e(u);var x=a.test(u);return x||o.test(u)?l(u.slice(2),x?2:8):i.test(u)?n:+u}return y8=c,y8}var v8,wP;function R0e(){if(wP)return v8;wP=1;var e=Ol(),t=M0e(),r=nU(),n="Expected a function",i=Math.max,a=Math.min;function o(l,c,u){var f,x,m,p,y,v,b=0,E=!1,N=!1,j=!0;if(typeof l!="function")throw new TypeError(n);c=r(c)||0,e(u)&&(E=!!u.leading,N="maxWait"in u,m=N?i(r(u.maxWait)||0,c):m,j="trailing"in u?!!u.trailing:j);function A(V){var W=f,_=x;return f=x=void 0,b=V,p=l.apply(_,W),p}function w(V){return b=V,y=setTimeout(D,c),E?A(V):p}function S(V){var W=V-v,_=V-b,z=c-W;return N?a(z,m-_):z}function B(V){var W=V-v,_=V-b;return v===void 0||W>=c||W<0||N&&_>=m}function D(){var V=t();if(B(V))return P(V);y=setTimeout(D,S(V))}function P(V){return y=void 0,j&&f?A(V):(f=x=void 0,p)}function O(){y!==void 0&&clearTimeout(y),b=0,f=v=x=y=void 0}function M(){return y===void 0?p:P(t())}function I(){var V=t(),W=B(V);if(f=arguments,x=this,v=V,W){if(y===void 0)return w(v);if(N)return clearTimeout(y),y=setTimeout(D,c),A(v)}return y===void 0&&(y=setTimeout(D,c)),p}return I.cancel=O,I.flush=M,I}return v8=o,v8}var b8,EP;function _0e(){if(EP)return b8;EP=1;var e=R0e(),t=Ol(),r="Expected a function";function n(i,a,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,a,{leading:l,maxWait:a,trailing:c})}return b8=n,b8}var I0e=_0e();const sU=lr(I0e);function Pf(e){"@babel/helpers - typeof";return Pf=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},Pf(e)}function jP(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 yp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jP(Object(r),!0).forEach(function(n){$0e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $0e(e,t,r){return t=z0e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function z0e(e){var t=V0e(e,"string");return Pf(t)=="symbol"?t:t+""}function V0e(e,t){if(Pf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Pf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function U0e(e,t){return G0e(e)||H0e(e,t)||W0e(e,t)||q0e()}function q0e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
112In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function W0e(e,t){if(e){if(typeof e=="string")return NP(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 NP(e,t)}}function NP(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 H0e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(f){u=!0,i=f}
112finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function G0e(e){if(Array.isArray(e))return e}var K0e=C.forwardRef(function(e,t){var r=e.aspect,n=e.initialDimension,i=n===void 0?{width:-1,height:-1}:n,a=e.width,o=a===void 0?"100%":a,l=e.height,c=l===void 0?"100%":l,u=e.minWidth,f=u===void 0?0:u,x=e.minHeight,m=e.maxHeight,p=e.children,y=e.debounce,v=y===void 0?0:y,b=e.id,E=e.className,N=e.onResize,j=e.style,A=j===void 0?{}:j,w=C.useRef(null),S=C.useRef();S.current=N,C.useImperativeHandle(t,function(){return Object.defineProperty(w.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),w.current},configurable:!0})});var B=C.useState({containerWidth:i.width,containerHeight:i.height}),D=U0e(B,2),P=D[0],O=D[1],M=C.useCallback(function(V,W){O(function(_){var z=Math.round(V),R=Math.round(W);return _.containerWidth===z&&_.containerHeight===R?_:{containerWidth:z,containerHeight:R}})},[]);C.useEffect(function(){var V=function(G){var K,$=G[0].contentRect,H=$.width,te=$.height;M(H,te),(K=S.current)===null||K===void 0||K.call(S,H,te)};v>0&&(V=sU(V,v,{trailing:!0,leading:!1}));var W=new ResizeObserver(V),_=w.current.getBoundingClientRect(),z=_.width,R=_.height;return M(z,R),W.observe(w.current),function(){W.disconnect()}},[M,v]);var I=C.useMemo(function(){var V=P.containerWidth,W=P.containerHeight;if(V<0||W<0)return null;uo(mc(o)||mc(c),`The width(%s) and height(%s) are both fixed numbers,
113       maybe you don't need to use a ResponsiveContainer.`,o,c),uo(!r||r>0,"The aspect(%s) must be greater than zero.",r);var _=mc(o)?V:o,z=mc(c)?W:c;r&&r>0&&(_?z=_/r:z&&(_=z*r),m&&z>m&&(z=m)),uo(_>0||z>0,`The width(%s) and height(%s) of chart should be greater than 0,
114       please check the style of container, or the props width(%s) and height(%s),
115       or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
116       height and width.`,_,z,o,c,f,x,r);var R=!Array.isArray(p)&&co(p.type).endsWith("Chart");return ie.Children.map(p,function(q){return ie.isValidElement(q)?C.cloneElement(q,yp({width:_,height:z},R?{style:yp({height:"100%",width:"100%",maxHeight:z,maxWidth:_},q.props.style)}:{})):q})},[r,p,c,m,x,f,P,o]);return ie.createElement("div",{id:b?"".concat(b):void 0,className:or("recharts-responsive-container",E),style:yp(yp({},A),{},{width:o,height:c,minWidth:f,minHeight:x,maxHeight:m}),ref:w},I)}),iU=function(t){return null};iU.displayName="Cell";function Tf(e){"@babel/helpers - typeof";return Tf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tf(e)}function AP(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 Jw(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?AP(Object(r),!0).forEach(function(n){X0e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):AP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function X0e(e,t,r){return t=Y0e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Y0e(e){var t=Q0e(e,"string");return Tf(t)=="symbol"?t:t+""}function Q0e(e,t){if(Tf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Tf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ou={widthCache:{},cacheCount:0},Z0e=2e3,J0e={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},kP="recharts_measurement_span";function exe(e){var t=Jw({},e);return Object.keys(t).forEach(function(r){t[r]||delete t[r]}),t}var Jx=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||C0.isSsr)return{width:0,height:0};var n=exe(r),i=JSON.stringify({text:t,copyStyle:n});if(Ou.widthCache[i])return Ou.widthCache[i];try{var a=document.getElementById(kP);a||(a=document.createElement("span"),a.setAttribute("id",kP),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=Jw(Jw({},J0e),n);Object.assign(a.style,o),a.textContent="".concat(t);var l=a.getBoundingClientRect(),c={width:l.width,height:l.height};return Ou.widthCache[i]=c,++Ou.cacheCount>Z0e&&(Ou.cacheCount=0,Ou.widthCache={}),c}catch{return{width:0,height:0}}},txe=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Mf(e){"@babel/helpers - typeof";return Mf=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},Mf(e)}function Yg(e,t){return ixe(e)||sxe(e,t)||nxe(e,t)||rxe()}
116function rxe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
117In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nxe(e,t){if(e){if(typeof e=="string")return SP(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 SP(e,t)}}function SP(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 sxe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function ixe(e){if(Array.isArray(e))return e}function axe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BP(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,lxe(n.key),n)}}function oxe(e,t,r){return t&&BP(e.prototype,t),r&&BP(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function lxe(e){var t=cxe(e,"string");return Mf(t)=="symbol"?t:t+""}function cxe(e,t){if(Mf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Mf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var DP=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,FP=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,uxe=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,dxe=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,aU={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},xxe=Object.keys(aU),Yu="NaN";function fxe(e,t){return e*aU[t]}var vp=function(){function e(t,r){axe(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),r!==""&&!uxe.test(r)&&(this.num=NaN,this.unit=""),xxe.includes(r)&&(this.num=fxe(t,r),this.unit="px")}return oxe(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=dxe.exec(r))!==null&&n!==void 0?n:[],a=Yg(i,3),o=a[1],l=a[2];return new e(parseFloat(o),l??"")}}])}();function oU(e){if(e.includes(Yu))return Yu;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=DP.exec(t))!==null&&r!==void 0?r:[],i=Yg(n,4),a=i[1],o=i[2],l=i[3],c=vp.parse(a??""),u=vp.parse(l??""),f=o==="*"?c.multiply(u):c.divide(u);if(f.isNaN())return Yu;t=t.replace(DP,f.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var x,m=(x=FP.exec(t))!==null&&x!==void 0?x:[],p=Yg(m,4),y=p[1],v=p[2],b=p[3],E=vp.parse(y??""),N=vp.parse(b??""),j=v==="+"?E.add(N):E.subtract(N);if(j.isNaN())return Yu;t=t.replace(FP,j.toString())}return t}var PP=/\(([^()]*)\)/;function hxe(e){for(var t=e;t.includes("(");){var r=PP.exec(t),n=Yg(r,2),i=n[1];t=t.replace(PP,oU(i))}return t}function mxe(e){var t=e.replace(/\s+/g,"");return t=hxe(t),t=oU(t),t}function pxe(e){try{return mxe(e)}catch{return Yu}}function C8(e){var t=pxe(e.slice(5,-1));return t===Yu?"":t}var gxe=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],yxe=["dx","dy","angle","className","breakAll"];function e6(){return e6=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
vendor: 1,802 bytes, lines 117-118
117for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},e6.apply(this,arguments)}function TP(e,t){if(e==null)return{};var r=vxe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function vxe(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 MP(e,t){return Exe(e)||wxe(e,t)||Cxe(e,t)||bxe()}function bxe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
118In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Cxe(e,t){if(e){if(typeof e=="string")return OP(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 OP(e,t)}}function OP(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 wxe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function Exe(e){if(Array.isArray(e))return e}var lU=/[ \f\n\r\t\v\u2028\u2029]+/,cU=function(t){var r=t.children,n=t.breakAll,i=t.style;try{var a=[];nr(r)||(n?a=r.toString().split(""):a=r.toString().split(lU));var o=a.map(function(c){return{word:c,width:Jx(c,i).width}}
118),l=n?0:Jx(" ",i).width;return{wordsWithComputedWidth:o,spaceWidth:l}}catch{return null}},jxe=function(t,r,n,i,a){var o=t.maxLines,l=t.children,c=t.style,u=t.breakAll,f=qe(o),x=l,m=function(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return _.reduce(function(z,R){var q=R.word,G=R.width,K=z[z.length-1];if(K&&(i==null||a||K.width+G+n<Number(i)))K.words.push(q),K.width+=G+n;else{var $={words:[q],width:G};z.push($)}return z},[])},p=m(r),y=function(_){return _.reduce(function(z,R){return z.width>R.width?z:R})};if(!f)return p;for(var v="…",b=function(_){var z=x.slice(0,_),R=cU({breakAll:u,style:c,children:z+v}).wordsWithComputedWidth,q=m(R),G=q.length>o||y(q).width>Number(i);return[G,q]},E=0,N=x.length-1,j=0,A;E<=N&&j<=x.length-1;){var w=Math.floor((E+N)/2),S=w-1,B=b(S),D=MP(B,2),P=D[0],O=D[1],M=b(w),I=MP(M,1),V=I[0];if(!P&&!V&&(E=w+1),P&&V&&(N=w-1),!P&&V){A=O;break}j++}return A||p},LP=function(t){var r=nr(t)?[]:t.toString().split(lU);return[{words:r}]},Nxe=function(t){var r=t.width,n=t.scaleToFit,i=t.children,a=t.style,o=t.breakAll,l=t.maxLines;if((r||n)&&!C0.isSsr){var c,u,f=cU({breakAll:o,children:i,style:a});if(f){var x=f.wordsWithComputedWidth,m=f.spaceWidth;c=x,u=m}else return LP(i);return jxe({breakAll:o,children:i,maxLines:l,style:a},c,u,r,n)}return LP(i)},RP="#808080",Qg=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.lineHeight,l=o===void 0?"1em":o,c=t.capHeight,u=c===void 0?"0.71em":c,f=t.scaleToFit,x=f===void 0?!1:f,m=t.textAnchor,p=m===void 0?"start":m,y=t.verticalAnchor,v=y===void 0?"end":y,b=t.fill,E=b===void 0?RP:b,N=TP(t,gxe),j=C.useMemo(function(){return Nxe({breakAll:N.breakAll,children:N.children,maxLines:N.maxLines,scaleToFit:x,style:N.style,width:N.width})},[N.breakAll,N.children,N.maxLines,x,N.style,N.width]),A=N.dx,w=N.dy,S=N.angle,B=N.className,D=N.breakAll,P=TP(N,yxe);if(!En(n)||!En(a))return null;var O=n+(qe(A)?A:0),M=a+(qe(w)?w:0),I;switch(v){case"start":I=C8("calc(".concat(u,")"));break;case"middle":I=C8("calc(".concat((j.length-1)/2," * -").concat(l," + (").concat(u," / 2))"));break;default:I=C8("calc(".concat(j.length-1," * -").concat(l,")"));break}var V=[];if(x){var W=j[0].width,_=N.width;V.push("scale(".concat((qe(_)?_/W:1)/W,")"))}return S&&V.push("rotate(".concat(S,", ").concat(O,", ").concat(M,")")),V.length&&(P.transform=V.join(" ")),ie.createElement("text",e6({},Xt(P,!0),{x:O,y:M,className:or("recharts-text",B),textAnchor:p,fill:E.includes("url")?RP:E}),j.map(function(z,R){var q=z.words.join(D?"":" ");return ie.createElement("tspan",{x:O,dy:R===0?I:l,key:"".concat(q,"-").concat(R)},q)}))};function vl(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Axe(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function xE(e){let t,r,n;e.length!==2?(t=vl,r=(l,c)=>vl(e(l),c),n=(l,c)=>e(l)-c):(t=e===vl||e===Axe?e:kxe,r=e,n=e);function i(l,c,u=0,f=l.length){if(u<f){if(t(c,c)!==0)return f;do{const x=u+f>>>1;r(l[x],c)<0?u=x+1:f=x}while(u<f)}return u}function a(l,c,u=0,f=l.length){if(u<f){if(t(c,c)!==0)return f;do{const x=u+f>>>1;r(l[x],c)<=0?u=x+1:f=x}while(u<f)}return u}function o(l,c,u=0,f=l.length){const x=i(l,c,u,f-1);return x>u&&n(l[x-1],c)>-n(l[x],c)?x-1:x}return{left:i,center:o,right:a}}function kxe(){return 0}function uU(e){return e===null?NaN:+e}function*Sxe(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const Bxe=xE(vl),Gh=Bxe.right;xE(uU).center;class _P extends Map{constructor(t,r=Pxe){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(IP(this,t))}has(t){return super.has(IP(this,t))}set(t,r){return super.set(Dxe(this,t),r)}delete(t){return super.delete(Fxe(this,t))}}function IP({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function Dxe({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function Fxe({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function Pxe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Txe(e=vl){if(e===vl)return dU;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 dU(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const Mxe=Math.sqrt(50),Oxe=Math.sqrt(10),Lxe=Math.sqrt(2);function Zg(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),o=a>=Mxe?10:a>=Oxe?5:a>=Lxe?2:1;let l,c,u;return i<0?(u=Math.pow(10,-i)/o,l=Math.round(e*u),c=Math.round(t*u),l/u<e&&++l,c/u>t&&--c,u=-u):(u=Math.pow(10,i)*o,l=Math.round(e/u),c=Math.round(t/u),l*u<e&&++l,c*u>t&&--c),c<l&&.5<=r&&r<2?Zg(e,t,r*2):[l,c,u]}function t6(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[i,a,o]=n?Zg(t,e,r):Zg(e,t,r);if(!(a>=i))return[];const l=a-i+1,c=new Array(l);if(n)if(o<0)for(let u=0;u<l;++u)c[u]=(a-u)/-o;else for(let u=0;u<l;++u)c[u]=(a-u)*o;else if(o<0)for(let u=0;u<l;++u)c[u]=(i+u)/-o;else for(let u=0;u<l;++u)c[u]=(i+u)*o;return c}function r6(e,t,r){return t=+t,e=+e,r=+r,Zg(e,t,r)[2]}function n6(e,t,r){t=+t,e=+e,r=+r;const n=t<e,i=n?r6(t,e,r):r6(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function $P(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function zP(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}
vendor: 14,818 bytes, line 118
118function xU(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?dU:Txe(i);n>r;){if(n-r>600){const c=n-r+1,u=t-r+1,f=Math.log(c),x=.5*Math.exp(2*f/3),m=.5*Math.sqrt(f*x*(c-x)/c)*(u-c/2<0?-1:1),p=Math.max(r,Math.floor(t-u*x/c+m)),y=Math.min(n,Math.floor(t+(c-u)*x/c+m));xU(e,t,p,y,i)}const a=e[t];let o=r,l=n;for(bx(e,r,t),i(e[n],a)>0&&bx(e,r,n);o<l;){for(bx(e,o,l),++o,--l;i(e[o],a)<0;)++o;for(;i(e[l],a)>0;)--l}i(e[r],a)===0?bx(e,r,l):(++l,bx(e,l,n)),l<=t&&(r=l+1),t<=l&&(n=l-1)}return e}function bx(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function Rxe(e,t,r){if(e=Float64Array.from(Sxe(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return zP(e);if(t>=1)return $P(e);var n,i=(n-1)*t,a=Math.floor(i),o=$P(xU(e,a).subarray(0,a+1)),l=zP(e.subarray(a+1));return o+(l-o)*(i-a)}}function _xe(e,t,r=uU){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),o=+r(e[a],a,e),l=+r(e[a+1],a+1,e);return o+(l-o)*(i-a)}}function Ixe(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(i);++n<i;)a[n]=e+n*r;return a}function ki(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Bo(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const s6=Symbol("implicit");function fE(){var e=new _P,t=[],r=[],n=s6;function i(a){let o=e.get(a);if(o===void 0){if(n!==s6)return n;e.set(a,o=t.push(a)-1)}return r[o%r.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new _P;for(const o of a)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(a){return arguments.length?(r=Array.from(a),i):r.slice()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return fE(t,r).unknown(n)},ki.apply(i,arguments),i}function Of(){var e=fE().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,a,o,l=!1,c=0,u=0,f=.5;delete e.unknown;function x(){var m=t().length,p=i<n,y=p?i:n,v=p?n:i;a=(v-y)/Math.max(1,m-c+u*2),l&&(a=Math.floor(a)),y+=(v-y-a*(m-c))*f,o=a*(1-c),l&&(y=Math.round(y),o=Math.round(o));var b=Ixe(m).map(function(E){return y+a*E});return r(p?b.reverse():b)}return e.domain=function(m){return arguments.length?(t(m),x()):t()},e.range=function(m){return arguments.length?([n,i]=m,n=+n,i=+i,x()):[n,i]},e.rangeRound=function(m){return[n,i]=m,n=+n,i=+i,l=!0,x()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(m){return arguments.length?(l=!!m,x()):l},e.padding=function(m){return arguments.length?(c=Math.min(1,u=+m),x()):c},e.paddingInner=function(m){return arguments.length?(c=Math.min(1,m),x()):c},e.paddingOuter=function(m){return arguments.length?(u=+m,x()):u},e.align=function(m){return arguments.length?(f=Math.max(0,Math.min(1,m)),x()):f},e.copy=function(){return Of(t(),[n,i]).round(l).paddingInner(c).paddingOuter(u).align(f)},ki.apply(x(),arguments)}function fU(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return fU(t())},e}function ef(){return fU(Of.apply(null,arguments).paddingInner(1))}function hE(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function hU(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Kh(){}var Lf=.7,Jg=1/Lf,od="\\s*([+-]?\\d+)\\s*",Rf="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Da="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",$xe=/^#([0-9a-f]{3,8})$/,zxe=new RegExp(`^rgb\\(${od},${od},${od}\\)$`),Vxe=new RegExp(`^rgb\\(${Da},${Da},${Da}\\)$`),Uxe=new RegExp(`^rgba\\(${od},${od},${od},${Rf}\\)$`),qxe=new RegExp(`^rgba\\(${Da},${Da},${Da},${Rf}\\)$`),Wxe=new RegExp(`^hsl\\(${Rf},${Da},${Da}\\)$`),Hxe=new RegExp(`^hsla\\(${Rf},${Da},${Da},${Rf}\\)$`),VP={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};hE(Kh,_f,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:UP,formatHex:UP,formatHex8:Gxe,formatHsl:Kxe,formatRgb:qP,toString:qP});function UP(){return this.rgb().formatHex()}function Gxe(){return this.rgb().formatHex8()}function Kxe(){return mU(this).formatHsl()}function qP(){return this.rgb().formatRgb()}function _f(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=$xe.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?WP(t):r===3?new Is(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?bp(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?bp(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=zxe.exec(e))?new Is(t[1],t[2],t[3],1):(t=Vxe.exec(e))?new Is(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Uxe.exec(e))?bp(t[1],t[2],t[3],t[4]):(t=qxe.exec(e))?bp(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Wxe.exec(e))?KP(t[1],t[2]/100,t[3]/100,1):(t=Hxe.exec(e))?KP(t[1],t[2]/100,t[3]/100,t[4]):VP.hasOwnProperty(e)?WP(VP[e]):e==="transparent"?new Is(NaN,NaN,NaN,0):null}function WP(e){return new Is(e>>16&255,e>>8&255,e&255,1)}function bp(e,t,r,n){return n<=0&&(e=t=r=NaN),new Is(e,t,r,n)}function Xxe(e){return e instanceof Kh||(e=_f(e)),e?(e=e.rgb(),new Is(e.r,e.g,e.b,e.opacity)):new Is}function i6(e,t,r,n){return arguments.length===1?Xxe(e):new Is(e,t,r,n??1)}function Is(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}hE(Is,i6,hU(Kh,{brighter(e){return e=e==null?Jg:Math.pow(Jg,e),new Is(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Lf:Math.pow(Lf,e),new Is(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Is(Tc(this.r),Tc(this.g),Tc(this.b),e1(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:HP,formatHex:HP,formatHex8:Yxe,formatRgb:GP,toString:GP}));function HP(){return`#${pc(this.r)}${pc(this.g)}${pc(this.b)}`}function Yxe(){return`#${pc(this.r)}${pc(this.g)}${pc(this.b)}${pc((isNaN(this.opacity)?1:this.opacity)*255)}`}function GP(){const e=e1(this.opacity);return`${e===1?"rgb(":"rgba("}${Tc(this.r)}, ${Tc(this.g)}, ${Tc(this.b)}${e===1?")":`, ${e})`}`}function e1(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Tc(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function pc(e){return e=Tc(e),(e<16?"0":"")+e.toString(16)}function KP(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Gi(e,t,r,n)}function mU(e){if(e instanceof Gi)return new Gi(e.h,e.s,e.l,e.opacity);if(e instanceof Kh||(e=_f(e)),!e)return new Gi;if(e instanceof Gi)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=NaN,l=a-i,c=(a+i)/2;return l?(t===a?o=(r-n)/l+(r<n)*6:r===a?o=(n-t)/l+2:o=(t-r)/l+4,l/=c<.5?a+i:2-a-i,o*=60):l=c>0&&c<1?0:o,new Gi(o,l,c,e.opacity)}function Qxe(e,t,r,n){return arguments.length===1?mU(e):new Gi(e,t,r,n??1)}function Gi(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}hE(Gi,Qxe,hU(Kh,{brighter(e){return e=e==null?Jg:Math.pow(Jg,e),new Gi(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Lf:Math.pow(Lf,e),new Gi(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 Is(w8(e>=240?e-240:e+120,i,n),w8(e,i,n),w8(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Gi(XP(this.h),Cp(this.s),Cp(this.l),e1(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=e1(this.opacity);return`${e===1?"hsl(":"hsla("}${XP(this.h)}, ${Cp(this.s)*100}%, ${Cp(this.l)*100}%${e===1?")":`, ${e})`}`}}));function XP(e){return e=(e||0)%360,e<0?e+360:e}function Cp(e){return Math.max(0,Math.min(1,e||0))}function w8(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 mE=e=>()=>e;function Zxe(e,t){return function(r){return e+r*t}}function Jxe(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 efe(e){return(e=+e)==1?pU:function(t,r){return r-t?Jxe(t,r,e):mE(isNaN(t)?r:t)}}function pU(e,t){var r=t-e;return r?Zxe(e,r):mE(isNaN(e)?t:e)}const YP=function e(t){var r=efe(t);function n(i,a){var o=r((i=i6(i)).r,(a=i6(a)).r),l=r(i.g,a.g),c=r(i.b,a.b),u=pU(i.opacity,a.opacity);return function(f){return i.r=o(f),i.g=l(f),i.b=c(f),i.opacity=u(f),i+""}}return n.gamma=e,n}(1);function tfe(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;i<r;++i)n[i]=e[i]*(1-a)+t[i]*a;return n}}function rfe(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function nfe(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),a=new Array(r),o;for(o=0;o<n;++o)i[o]=w0(e[o],t[o]);for(;o<r;++o)a[o]=t[o];return function(l){for(o=0;o<n;++o)a[o]=i[o](l);return a}}function sfe(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function t1(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function ife(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]=w0(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var a6=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,E8=new RegExp(a6.source,"g");function afe(e){return function(){return e}}function ofe(e){return function(t){return e(t)+""}}function lfe(e,t){var r=a6.lastIndex=E8.lastIndex=0,n,i,a,o=-1,l=[],c=[];for(e=e+"",t=t+"";(n=a6.exec(e))&&(i=E8.exec(t));)(a=i.index)>r&&(a=t.slice(r,a),l[o]?l[o]+=a:l[++o]=a),(n=n[0])===(i=i[0])?l[o]?l[o]+=i:l[++o]=i:(l[++o]=null,c.push({i:o,x:t1(n,i)})),r=E8.lastIndex;return r<t.length&&(a=t.slice(r),l[o]?l[o]+=a:l[++o]=a),l.length<2?c[0]?ofe(c[0].x):afe(t):(t=c.length,function(u){for(var f=0,x;f<t;++f)l[(x=c[f]).i]=x.x(u);return l.join("")})}function w0(e,t){var r=typeof t,n;return t==null||r==="boolean"?mE(t):(r==="number"?t1:r==="string"?(n=_f(t))?(t=n,YP):lfe:t instanceof _f?YP:t instanceof Date?sfe:rfe(t)?tfe:Array.isArray(t)?nfe:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?ife:t1)(e,t)}function pE(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function cfe(e,t){t===void 0&&(t=e,e=w0);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r<n;)a[r]=e(i,i=t[++r]);return function(o){var l=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return a[l](o-l)}}function ufe(e){return function(){return e}}function r1(e){return+e}var QP=[0,1];function gs(e){return e}function o6(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:ufe(isNaN(t)?NaN:.5)}function dfe(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function xfe(e,t,r){var n=e[0],i=e[1],a=t[0],o=t[1];return i<n?(n=o6(i,n),a=r(o,a)):(n=o6(n,i),a=r(a,o)),function(l){return a(n(l))}}function ffe(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),a=new Array(n),o=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<n;)i[o]=o6(e[o],e[o+1]),a[o]=r(t[o],t[o+1]);return function(l){var c=Gh(e,l,1,n)-1;return a[c](i[c](l))}}function Xh(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function By(){var e=QP,t=QP,r=w0,n,i,a,o=gs,l,c,u;function f(){var m=Math.min(e.length,t.length);return o!==gs&&(o=dfe(e[0],e[m-1])),l=m>2?ffe:xfe,c=u=null,x}function x(m){return m==null||isNaN(m=+m)?a:(c||(c=l(e.map(n),t,r)))(n(o(m)))}return x.invert=function(m){return o(i((u||(u=l(t,e.map(n),t1)))(m)))},x.domain=function(m){return arguments.length?(e=Array.from(m,r1),f()):e.slice()},x.range=function(m){return arguments.length?(t=Array.from(m),f()):t.slice()},x.rangeRound=function(m){return t=Array.from(m),r=pE,f()},x.clamp=function(m){return arguments.length?(o=m?!0:gs,f()):o!==gs},x.interpolate=function(m){return arguments.length?(r=m,f()):r},x.unknown=function(m){return arguments.length?(a=m,x):a},function(m,p){return n=m,i=p,f()}}function gE(){return By()(gs,gs)}
vendor: 5,799 bytes, line 118
118function hfe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function n1(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 _d(e){return e=n1(Math.abs(e)),e?e[1]:NaN}function mfe(e,t){return function(r,n){for(var i=r.length,a=[],o=0,l=e[0],c=0;i>0&&l>0&&(c+l+1>n&&(l=Math.max(1,n-c)),a.push(r.substring(i-=l,i+l)),!((c+=l+1)>n));)l=e[o=(o+1)%e.length];return a.reverse().join(t)}}function pfe(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var gfe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function If(e){if(!(t=gfe.exec(e)))throw new Error("invalid format: "+e);var t;return new yE({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]})}If.prototype=yE.prototype;function yE(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+""}yE.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 yfe(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 gU;function vfe(e,t){var r=n1(e,t);if(!r)return e+"";var n=r[0],i=r[1],a=i-(gU=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=n.length;return a===o?n:a>o?n+new Array(a-o+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+n1(e,Math.max(0,t+a-1))[0]}function ZP(e,t){var r=n1(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 JP={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:hfe,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)=>ZP(e*100,t),r:ZP,s:vfe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function eT(e){return e}var tT=Array.prototype.map,rT=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function bfe(e){var t=e.grouping===void 0||e.thousands===void 0?eT:mfe(tT.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?eT:pfe(tT.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 u(x){x=If(x);var m=x.fill,p=x.align,y=x.sign,v=x.symbol,b=x.zero,E=x.width,N=x.comma,j=x.precision,A=x.trim,w=x.type;w==="n"?(N=!0,w="g"):JP[w]||(j===void 0&&(j=12),A=!0,w="g"),(b||m==="0"&&p==="=")&&(b=!0,m="0",p="=");var S=v==="$"?r:v==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",B=v==="$"?n:/[%p]/.test(w)?o:"",D=JP[w],P=/[defgprs%]/.test(w);j=j===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,j)):Math.max(0,Math.min(20,j));function O(M){var I=S,V=B,W,_,z;if(w==="c")V=D(M)+V,M="";else{M=+M;var R=M<0||1/M<0;if(M=isNaN(M)?c:D(Math.abs(M),j),A&&(M=yfe(M)),R&&+M==0&&y!=="+"&&(R=!1),I=(R?y==="("?y:l:y==="-"||y==="("?"":y)+I,V=(w==="s"?rT[8+gU/3]:"")+V+(R&&y==="("?")":""),P){for(W=-1,_=M.length;++W<_;)if(z=M.charCodeAt(W),48>z||z>57){V=(z===46?i+M.slice(W+1):M.slice(W))+V,M=M.slice(0,W);break}}}N&&!b&&(M=t(M,1/0));var q=I.length+M.length+V.length,G=q<E?new Array(E-q+1).join(m):"";switch(N&&b&&(M=t(G+M,G.length?E-V.length:1/0),G=""),p){case"<":M=I+M+V+G;break;case"=":M=I+G+M+V;break;case"^":M=G.slice(0,q=G.length>>1)+I+M+V+G.slice(q);break;default:M=G+I+M+V;break}return a(M)}return O.toString=function(){return x+""},O}function f(x,m){var p=u((x=If(x),x.type="f",x)),y=Math.max(-8,Math.min(8,Math.floor(_d(m)/3)))*3,v=Math.pow(10,-y),b=rT[8+y/3];return function(E){return p(v*E)+b}}return{format:u,formatPrefix:f}}var wp,vE,yU;Cfe({thousands:",",grouping:[3],currency:["$",""]});function Cfe(e){return wp=bfe(e),vE=wp.format,yU=wp.formatPrefix,wp}function wfe(e){return Math.max(0,-_d(Math.abs(e)))}function Efe(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(_d(t)/3)))*3-_d(Math.abs(e)))}function jfe(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,_d(t)-_d(e))+1}function vU(e,t,r,n){var i=n6(e,t,r),a;switch(n=If(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=Efe(i,o))&&(n.precision=a),yU(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=jfe(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=wfe(i))&&(n.precision=a-(n.type==="%")*2);break}}return vE(n)}function Rl(e){var t=e.domain;return e.ticks=function(r){var n=t();return t6(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return vU(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,a=n.length-1,o=n[i],l=n[a],c,u,f=10;for(l<o&&(u=o,o=l,l=u,u=i,i=a,a=u);f-- >0;){if(u=r6(o,l,r),u===c)return n[i]=o,n[a]=l,t(n);if(u>0)o=Math.floor(o/u)*u,l=Math.ceil(l/u)*u;else if(u<0)o=Math.ceil(o*u)/u,l=Math.floor(l*u)/u;else break;c=u}return e},e}function s1(){var e=gE();return e.copy=function(){return Xh(e,s1())}
118,ki.apply(e,arguments),Rl(e)}function bU(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,r1),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return bU(e).unknown(t)},e=arguments.length?Array.from(e,r1):[0,1],Rl(r)}function CU(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],a=e[n],o;return a<i&&(o=r,r=n,n=o,o=i,i=a,a=o),e[r]=t.floor(i),e[n]=t.ceil(a),e}function nT(e){return Math.log(e)}function sT(e){return Math.exp(e)}function Nfe(e){return-Math.log(-e)}function Afe(e){return-Math.exp(-e)}function kfe(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Sfe(e){return e===10?kfe:e===Math.E?Math.exp:t=>Math.pow(e,t)}function Bfe(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 iT(e){return(t,r)=>-e(-t,r)}function bE(e){const t=e(nT,sT),r=t.domain;let n=10,i,a;function o(){return i=Bfe(n),a=Sfe(n),r()[0]<0?(i=iT(i),a=iT(a),e(Nfe,Afe)):e(nT,sT),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 u=c[0],f=c[c.length-1];const x=f<u;x&&([u,f]=[f,u]);let m=i(u),p=i(f),y,v;const b=l==null?10:+l;let E=[];if(!(n%1)&&p-m<b){if(m=Math.floor(m),p=Math.ceil(p),u>0){for(;m<=p;++m)for(y=1;y<n;++y)if(v=m<0?y/a(-m):y*a(m),!(v<u)){if(v>f)break;E.push(v)}}else for(;m<=p;++m)for(y=n-1;y>=1;--y)if(v=m>0?y/a(-m):y*a(m),!(v<u)){if(v>f)break;E.push(v)}E.length*2<b&&(E=t6(u,f,b))}else E=t6(m,p,Math.min(p-m,b)).map(a);return x?E.reverse():E},t.tickFormat=(l,c)=>{if(l==null&&(l=10),c==null&&(c=n===10?"s":","),typeof c!="function"&&(!(n%1)&&(c=If(c)).precision==null&&(c.trim=!0),c=vE(c)),l===1/0)return c;const u=Math.max(1,n*l/t.ticks().length);return f=>{let x=f/a(Math.round(i(f)));return x*n<n-.5&&(x*=n),x<=u?c(f):""}},t.nice=()=>r(CU(r(),{floor:l=>a(Math.floor(i(l))),ceil:l=>a(Math.ceil(i(l)))})),t}function wU(){const e=bE(By()).domain([1,10]);return e.copy=()=>Xh(e,wU()).base(e.base()),ki.apply(e,arguments),e}function aT(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function oT(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function CE(e){var t=1,r=e(aT(t),oT(t));return r.constant=function(n){return arguments.length?e(aT(t=+n),oT(t)):t},Rl(r)}function EU(){var e=CE(By());return e.copy=function(){return Xh(e,EU()).constant(e.constant())},ki.apply(e,arguments)}function lT(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Dfe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Ffe(e){return e<0?-e*e:e*e}function wE(e){var t=e(gs,gs),r=1;function n(){return r===1?e(gs,gs):r===.5?e(Dfe,Ffe):e(lT(r),lT(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},Rl(t)}function EE(){var e=wE(By());return e.copy=function(){return Xh(e,EE()).exponent(e.exponent())},ki.apply(e,arguments),e}function Pfe(){return EE.apply(null,arguments).exponent(.5)}function cT(e){return Math.sign(e)*e*e}function Tfe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function jU(){var e=gE(),t=[0,1],r=!1,n;function i(a){var o=Tfe(e(a));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(a){return e.invert(cT(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,r1)).map(cT)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(r=!!a,i):r},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return jU(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},ki.apply(i,arguments),Rl(i)}function NU(){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]=_xe(e,o/l);return a}function a(o){return o==null||isNaN(o=+o)?n:t[Gh(r,o)]}return a.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]]}
118,a.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(vl),i()},a.range=function(o){return arguments.length?(t=Array.from(o),i()):t.slice()},a.unknown=function(o){return arguments.length?(n=o,a):n},a.quantiles=function(){return r.slice()},a.copy=function(){return NU().domain(e).range(t).unknown(n)},ki.apply(a,arguments)}function AU(){var e=0,t=1,r=1,n=[.5],i=[0,1],a;function o(c){return c!=null&&c<=c?i[Gh(n,c,0,r)]:a}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 u=i.indexOf(c);return u<0?[NaN,NaN]:u<1?[e,n[0]]:u>=r?[n[r-1],t]:[n[u-1],n[u]]},o.unknown=function(c){return arguments.length&&(a=c),o},o.thresholds=function(){return n.slice()},o.copy=function(){return AU().domain([e,t]).range(i).unknown(a)},ki.apply(Rl(o),arguments)}function kU(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[Gh(e,a,0,n)]:r}return i.domain=function(a){return arguments.length?(e=Array.from(a),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return kU().domain(e).range(t).unknown(r)},ki.apply(i,arguments)}const j8=new Date,N8=new Date;function jn(e,t,r,n){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),l=i.ceil(a);return a-o<l-a?o:l},i.offset=(a,o)=>(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,l)=>{const c=[];if(a=i.ceil(a),l=l==null?1:Math.floor(l),!(a<o)||!(l>0))return c;let u;do c.push(u=new Date(+a)),t(a,l),e(a);while(u<a&&a<o);return c},i.filter=a=>jn(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,l)=>{if(o>=o)if(l<0)for(;++l<=0;)for(;t(o,-1),!a(o););else for(;--l>=0;)for(;t(o,1),!a(o););}),r&&(i.count=(a,o)=>(j8.setTime(+a),N8.setTime(+o),e(j8),e(N8),Math.floor(r(j8,N8))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?o=>n(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const i1=jn(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);i1.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?jn(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):i1);i1.range;const io=1e3,Ci=io*60,ao=Ci*60,bo=ao*24,jE=bo*7,uT=bo*30,A8=bo*365,gc=jn(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*io)},(e,t)=>(t-e)/io,e=>e.getUTCSeconds());gc.range;const NE=jn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*io)},(e,t)=>{e.setTime(+e+t*Ci)},(e,t)=>(t-e)/Ci,e=>e.getMinutes());NE.range;const AE=jn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Ci)},(e,t)=>(t-e)/Ci,e=>e.getUTCMinutes());AE.range;const kE=jn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*io-e.getMinutes()*Ci)},(e,t)=>{e.setTime(+e+t*ao)},(e,t)=>(t-e)/ao,e=>e.getHours());kE.range;const SE=jn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ao)},(e,t)=>(t-e)/ao,e=>e.getUTCHours());SE.range;const Yh=jn(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ci)/bo,e=>e.getDate()-1);Yh.range;const Dy=jn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/bo,e=>e.getUTCDate()-1);Dy.range;const SU=jn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/bo,e=>Math.floor(e/bo));SU.range;function ou(e){return jn(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())*Ci)/jE)}const Fy=ou(0),a1=ou(1),Mfe=ou(2),Ofe=ou(3),Id=ou(4),Lfe=ou(5),Rfe=ou(6);Fy.range;a1.range;Mfe.range;Ofe.range;Id.range;Lfe.range;Rfe.range;function lu(e){return jn(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)/jE)}const Py=lu(0),o1=lu(1),_fe=lu(2),Ife=lu(3),$d=lu(4),$fe=lu(5),zfe=lu(6);Py.range;o1.range;_fe.range;Ife.range;$d.range;$fe.range;zfe.range;const BE=jn(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());BE.range;const DE=jn(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());DE.range;const Co=jn(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());Co.every=e=>
vendor: 5,545 bytes, line 118
118!isFinite(e=Math.floor(e))||!(e>0)?null:jn(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)});Co.range;const wo=jn(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());wo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:jn(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)});wo.range;function BU(e,t,r,n,i,a){const o=[[gc,1,io],[gc,5,5*io],[gc,15,15*io],[gc,30,30*io],[a,1,Ci],[a,5,5*Ci],[a,15,15*Ci],[a,30,30*Ci],[i,1,ao],[i,3,3*ao],[i,6,6*ao],[i,12,12*ao],[n,1,bo],[n,2,2*bo],[r,1,jE],[t,1,uT],[t,3,3*uT],[e,1,A8]];function l(u,f,x){const m=f<u;m&&([u,f]=[f,u]);const p=x&&typeof x.range=="function"?x:c(u,f,x),y=p?p.range(u,+f+1):[];return m?y.reverse():y}function c(u,f,x){const m=Math.abs(f-u)/x,p=xE(([,,b])=>b).right(o,m);if(p===o.length)return e.every(n6(u/A8,f/A8,x));if(p===0)return i1.every(Math.max(n6(u,f,x),1));const[y,v]=o[m/o[p-1][2]<o[p][2]/m?p-1:p];return y.every(v)}return[l,c]}const[Vfe,Ufe]=BU(wo,DE,Py,SU,SE,AE),[qfe,Wfe]=BU(Co,BE,Fy,Yh,kE,NE);function k8(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 S8(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 Cx(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function Hfe(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,a=e.days,o=e.shortDays,l=e.months,c=e.shortMonths,u=wx(i),f=Ex(i),x=wx(a),m=Ex(a),p=wx(o),y=Ex(o),v=wx(l),b=Ex(l),E=wx(c),N=Ex(c),j={a:R,A:q,b:G,B:K,c:null,d:pT,e:pT,f:mhe,g:Nhe,G:khe,H:xhe,I:fhe,j:hhe,L:DU,m:phe,M:ghe,p:$,q:H,Q:vT,s:bT,S:yhe,u:vhe,U:bhe,V:Che,w:whe,W:Ehe,x:null,X:null,y:jhe,Y:Ahe,Z:She,"%":yT},A={a:te,A:ne,b:Y,B:J,c:null,d:gT,e:gT,f:Phe,g:Vhe,G:qhe,H:Bhe,I:Dhe,j:Fhe,L:PU,m:The,M:Mhe,p:oe,q:he,Q:vT,s:bT,S:Ohe,u:Lhe,U:Rhe,V:_he,w:Ihe,W:$he,x:null,X:null,y:zhe,Y:Uhe,Z:Whe,"%":yT},w={a:O,A:M,b:I,B:V,c:W,d:hT,e:hT,f:lhe,g:fT,G:xT,H:mT,I:mT,j:she,L:ohe,m:nhe,M:ihe,p:P,q:rhe,Q:uhe,s:dhe,S:ahe,u:Qfe,U:Zfe,V:Jfe,w:Yfe,W:ehe,x:_,X:z,y:fT,Y:xT,Z:the,"%":che};j.x=S(r,j),j.X=S(n,j),j.c=S(t,j),A.x=S(r,A),A.X=S(n,A),A.c=S(t,A);function S(Q,ue){return function(de){var me=[],Le=-1,Ne=0,ye=Q.length,ee,Ae,De;for(de instanceof Date||(de=new Date(+de));++Le<ye;)Q.charCodeAt(Le)===37&&(me.push(Q.slice(Ne,Le)),(Ae=dT[ee=Q.charAt(++Le)])!=null?ee=Q.charAt(++Le):Ae=ee==="e"?" ":"0",(De=ue[ee])&&(ee=De(de,Ae)),me.push(ee),Ne=Le+1);return me.push(Q.slice(Ne,Le)),me.join("")}}function B(Q,ue){return function(de){var me=Cx(1900,void 0,1),Le=D(me,Q,de+="",0),Ne,ye;if(Le!=de.length)return null;if("Q"in me)return new Date(me.Q);if("s"in me)return new Date(me.s*1e3+("L"in me?me.L:0));if(ue&&!("Z"in me)&&(me.Z=0),"p"in me&&(me.H=me.H%12+me.p*12),me.m===void 0&&(me.m="q"in me?me.q:0),"V"in me){if(me.V<1||me.V>53)return null;"w"in me||(me.w=1),"Z"in me?(Ne=S8(Cx(me.y,0,1)),ye=Ne.getUTCDay(),Ne=ye>4||ye===0?o1.ceil(Ne):o1(Ne),Ne=Dy.offset(Ne,(me.V-1)*7),me.y=Ne.getUTCFullYear(),me.m=Ne.getUTCMonth(),me.d=Ne.getUTCDate()+(me.w+6)%7):(Ne=k8(Cx(me.y,0,1)),ye=Ne.getDay(),Ne=ye>4||ye===0?a1.ceil(Ne):a1(Ne),Ne=Yh.offset(Ne,(me.V-1)*7),me.y=Ne.getFullYear(),me.m=Ne.getMonth(),me.d=Ne.getDate()+(me.w+6)%7)}else("W"in me||"U"in me)&&("w"in me||(me.w="u"in me?me.u%7:"W"in me?1:0),ye="Z"in me?S8(Cx(me.y,0,1)).getUTCDay():k8(Cx(me.y,0,1)).getDay(),me.m=0,me.d="W"in me?(me.w+6)%7+me.W*7-(ye+5)%7:me.w+me.U*7-(ye+6)%7);return"Z"in me?(me.H+=me.Z/100|0,me.M+=me.Z%100,S8(me)):k8(me)}}function D(Q,ue,de,me){for(var Le=0,Ne=ue.length,ye=de.length,ee,Ae;Le<Ne;){if(me>=ye)return-1;if(ee=ue.charCodeAt(Le++),ee===37){if(ee=ue.charAt(Le++),Ae=w[ee in dT?ue.charAt(Le++):ee],!Ae||(me=Ae(Q,de,me))<0)return-1}else if(ee!=de.charCodeAt(me++))return-1}return me}function P(Q,ue,de){var me=u.exec(ue.slice(de));return me?(Q.p=f.get(me[0].toLowerCase()),de+me[0].length):-1}function O(Q,ue,de){var me=p.exec(ue.slice(de));return me?(Q.w=y.get(me[0].toLowerCase()),de+me[0].length):-1}function M(Q,ue,de){var me=x.exec(ue.slice(de));return me?(Q.w=m.get(me[0].toLowerCase()),de+me[0].length):-1}function I(Q,ue,de){var me=E.exec(ue.slice(de));return me?(Q.m=N.get(me[0].toLowerCase()),de+me[0].length):-1}function V(Q,ue,de){var me=v.exec(ue.slice(de));return me?(Q.m=b.get(me[0].toLowerCase()),de+me[0].length):-1}function W(Q,ue,de){return D(Q,t,ue,de)}function _(Q,ue,de){return D(Q,r,ue,de)}function z(Q,ue,de){return D(Q,n,ue,de)}function R(Q){return o[Q.getDay()]}function q(Q){return a[Q.getDay()]}function G(Q){return c[Q.getMonth()]}function K(Q){return l[Q.getMonth()]}function $(Q){return i[+(Q.getHours()>=12)]}function H(Q){return 1+~~(Q.getMonth()/3)}function te(Q){return o[Q.getUTCDay()]}function ne(Q){return a[Q.getUTCDay()]}function Y(Q){return c[Q.getUTCMonth()]}function J(Q){return l[Q.getUTCMonth()]}function oe(Q){return i[+(Q.getUTCHours()>=12)]}function he(Q){return 1+~~(Q.getUTCMonth()/3)}return{format:function(Q){var ue=S(Q+="",j);return ue.toString=function(){return Q},ue},parse:function(Q){var ue=B(Q+="",!1);return ue.toString=function(){return Q},ue},utcFormat:function(Q){var ue=S(Q+="",A);return ue.toString=function(){return Q},ue},utcParse:function(Q){var ue=B(Q+="",!0);return ue.toString=function(){return Q},ue}}}
vendor: 4,693 bytes, line 118
118var dT={"-":"",_:" ",0:"0"},Ln=/^\s*\d+/,Gfe=/^%/,Kfe=/[\\^$*+?|[\]().{}]/g;function xr(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a<r?new Array(r-a+1).join(t)+i:i)}function Xfe(e){return e.replace(Kfe,"\\$&")}function wx(e){return new RegExp("^(?:"+e.map(Xfe).join("|")+")","i")}function Ex(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function Yfe(e,t,r){var n=Ln.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function Qfe(e,t,r){var n=Ln.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function Zfe(e,t,r){var n=Ln.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function Jfe(e,t,r){var n=Ln.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function ehe(e,t,r){var n=Ln.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function xT(e,t,r){var n=Ln.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function fT(e,t,r){var n=Ln.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function the(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 rhe(e,t,r){var n=Ln.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function nhe(e,t,r){var n=Ln.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function hT(e,t,r){var n=Ln.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function she(e,t,r){var n=Ln.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function mT(e,t,r){var n=Ln.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function ihe(e,t,r){var n=Ln.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function ahe(e,t,r){var n=Ln.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function ohe(e,t,r){var n=Ln.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function lhe(e,t,r){var n=Ln.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function che(e,t,r){var n=Gfe.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function uhe(e,t,r){var n=Ln.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function dhe(e,t,r){var n=Ln.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function pT(e,t){return xr(e.getDate(),t,2)}function xhe(e,t){return xr(e.getHours(),t,2)}function fhe(e,t){return xr(e.getHours()%12||12,t,2)}function hhe(e,t){return xr(1+Yh.count(Co(e),e),t,3)}function DU(e,t){return xr(e.getMilliseconds(),t,3)}function mhe(e,t){return DU(e,t)+"000"}function phe(e,t){return xr(e.getMonth()+1,t,2)}function ghe(e,t){return xr(e.getMinutes(),t,2)}function yhe(e,t){return xr(e.getSeconds(),t,2)}function vhe(e){var t=e.getDay();return t===0?7:t}function bhe(e,t){return xr(Fy.count(Co(e)-1,e),t,2)}function FU(e){var t=e.getDay();return t>=4||t===0?Id(e):Id.ceil(e)}function Che(e,t){return e=FU(e),xr(Id.count(Co(e),e)+(Co(e).getDay()===4),t,2)}function whe(e){return e.getDay()}function Ehe(e,t){return xr(a1.count(Co(e)-1,e),t,2)}function jhe(e,t){return xr(e.getFullYear()%100,t,2)}function Nhe(e,t){return e=FU(e),xr(e.getFullYear()%100,t,2)}function Ahe(e,t){return xr(e.getFullYear()%1e4,t,4)}function khe(e,t){var r=e.getDay();return e=r>=4||r===0?Id(e):Id.ceil(e),xr(e.getFullYear()%1e4,t,4)}function She(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+xr(t/60|0,"0",2)+xr(t%60,"0",2)}function gT(e,t){return xr(e.getUTCDate(),t,2)}function Bhe(e,t){return xr(e.getUTCHours(),t,2)}function Dhe(e,t){return xr(e.getUTCHours()%12||12,t,2)}function Fhe(e,t){return xr(1+Dy.count(wo(e),e),t,3)}function PU(e,t){return xr(e.getUTCMilliseconds(),t,3)}function Phe(e,t){return PU(e,t)+"000"}function The(e,t){return xr(e.getUTCMonth()+1,t,2)}function Mhe(e,t){return xr(e.getUTCMinutes(),t,2)}function Ohe(e,t){return xr(e.getUTCSeconds(),t,2)}function Lhe(e){var t=e.getUTCDay();return t===0?7:t}function Rhe(e,t){return xr(Py.count(wo(e)-1,e),t,2)}function TU(e){var t=e.getUTCDay();return t>=4||t===0?$d(e):$d.ceil(e)}function _he(e,t){return e=TU(e),xr($d.count(wo(e),e)+(wo(e).getUTCDay()===4),t,2)}function Ihe(e){return e.getUTCDay()}function $he(e,t){return xr(o1.count(wo(e)-1,e),t,2)}function zhe(e,t){return xr(e.getUTCFullYear()%100,t,2)}function Vhe(e,t){return e=TU(e),xr(e.getUTCFullYear()%100,t,2)}function Uhe(e,t){return xr(e.getUTCFullYear()%1e4,t,4)}function qhe(e,t){var r=e.getUTCDay();return e=r>=4||r===0?$d(e):$d.ceil(e),xr(e.getUTCFullYear()%1e4,t,4)}function Whe(){return"+0000"}function yT(){return"%"}function vT(e){return+e}function bT(e){return Math.floor(+e/1e3)}var Lu,MU,OU;Hhe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
118ay","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 Hhe(e){return Lu=Hfe(e),MU=Lu.format,Lu.parse,OU=Lu.utcFormat,Lu.utcParse,Lu}function Ghe(e){return new Date(e)}function Khe(e){return e instanceof Date?+e:+new Date(+e)}function FE(e,t,r,n,i,a,o,l,c,u){var f=gE(),x=f.invert,m=f.domain,p=u(".%L"),y=u(":%S"),v=u("%I:%M"),b=u("%I %p"),E=u("%a %d"),N=u("%b %d"),j=u("%B"),A=u("%Y");function w(S){return(c(S)<S?p:l(S)<S?y:o(S)<S?v:a(S)<S?b:n(S)<S?i(S)<S?E:N:r(S)<S?j:A)(S)}return f.invert=function(S){return new Date(x(S))},f.domain=function(S){return arguments.length?m(Array.from(S,Khe)):m().map(Ghe)},f.ticks=function(S){var B=m();return e(B[0],B[B.length-1],S??10)},f.tickFormat=function(S,B){return B==null?w:u(B)},f.nice=function(S){var B=m();return(!S||typeof S.range!="function")&&(S=t(B[0],B[B.length-1],S??10)),S?m(CU(B,S)):f},f.copy=function(){return Xh(f,FE(e,t,r,n,i,a,o,l,c,u))},f}function Xhe(){return ki.apply(FE(qfe,Wfe,Co,BE,Fy,Yh,kE,NE,gc,MU).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Yhe(){return ki.apply(FE(Vfe,Ufe,wo,DE,Py,Dy,SE,AE,gc,OU).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Ty(){var e=0,t=1,r,n,i,a,o=gs,l=!1,c;function u(x){return x==null||isNaN(x=+x)?c:o(i===0?.5:(x=(a(x)-r)*i,l?Math.max(0,Math.min(1,x)):x))}u.domain=function(x){return arguments.length?([e,t]=x,r=a(e=+e),n=a(t=+t),i=r===n?0:1/(n-r),u):[e,t]},u.clamp=function(x){return arguments.length?(l=!!x,u):l},u.interpolator=function(x){return arguments.length?(o=x,u):o};function f(x){return function(m){var p,y;return arguments.length?([p,y]=m,o=x(p,y),u):[o(0),o(1)]}}return u.range=f(w0),u.rangeRound=f(pE),u.unknown=function(x){return arguments.length?(c=x,u):c},function(x){return a=x,r=x(e),n=x(t),i=r===n?0:1/(n-r),u}}function _l(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}
118function LU(){var e=Rl(Ty()(gs));return e.copy=function(){return _l(e,LU())},Bo.apply(e,arguments)}function RU(){var e=bE(Ty()).domain([1,10]);return e.copy=function(){return _l(e,RU()).base(e.base())},Bo.apply(e,arguments)}function _U(){var e=CE(Ty());return e.copy=function(){return _l(e,_U()).constant(e.constant())},Bo.apply(e,arguments)}function PE(){var e=wE(Ty());return e.copy=function(){return _l(e,PE()).exponent(e.exponent())},Bo.apply(e,arguments)}function Qhe(){return PE.apply(null,arguments).exponent(.5)}function IU(){var e=[],t=gs;function r(n){if(n!=null&&!isNaN(n=+n))return t((Gh(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(vl),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,i)=>t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>Rxe(e,a/n))},r.copy=function(){return IU(t).domain(e)},Bo.apply(r,arguments)}function My(){var e=0,t=.5,r=1,n=1,i,a,o,l,c,u=gs,f,x=!1,m;function p(v){return isNaN(v=+v)?m:(v=.5+((v=+f(v))-a)*(n*v<n*a?l:c),u(x?Math.max(0,Math.min(1,v)):v))}p.domain=function(v){return arguments.length?([e,t,r]=v,i=f(e=+e),a=f(t=+t),o=f(r=+r),l=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),n=a<i?-1:1,p):[e,t,r]},p.clamp=function(v){return arguments.length?(x=!!v,p):x},p.interpolator=function(v){return arguments.length?(u=v,p):u};function y(v){return function(b){var E,N,j;return arguments.length?([E,N,j]=b,u=cfe(v,[E,N,j]),p):[u(0),u(.5),u(1)]}}return p.range=y(w0),p.rangeRound=y(pE),p.unknown=function(v){return arguments.length?(m=v,p):m},function(v){return f=v,i=v(e),a=v(t),o=v(r),l=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),n=a<i?-1:1,p}}function $U(){var e=Rl(My()(gs));return e.copy=function(){return _l(e,$U())},Bo.apply(e,arguments)}function zU(){var e=bE(My()).domain([.1,1,10]);return e.copy=function(){return _l(e,zU()).base(e.base())},Bo.apply(e,arguments)}function VU(){var e=CE(My());return e.copy=function(){return _l(e,VU()).constant(e.constant())},Bo.apply(e,arguments)}function TE(){var e=wE(My());return e.copy=function(){return _l(e,TE()).exponent(e.exponent())},Bo.apply(e,arguments)}function Zhe(){return TE.apply(null,arguments).exponent(.5)}const CT=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Of,scaleDiverging:$U,scaleDivergingLog:zU,scaleDivergingPow:TE,scaleDivergingSqrt:Zhe,scaleDivergingSymlog:VU,scaleIdentity:bU,scaleImplicit:s6,scaleLinear:s1,scaleLog:wU,scaleOrdinal:fE,scalePoint:ef,scalePow:EE,scaleQuantile:NU,scaleQuantize:AU,scaleRadial:jU,scaleSequential:LU,scaleSequentialLog:RU,scaleSequentialPow:PE,scaleSequentialQuantile:IU,scaleSequentialSqrt:Qhe,scaleSequentialSymlog:_U,scaleSqrt:Pfe,scaleSymlog:EU,scaleThreshold:kU,scaleTime:Xhe,scaleUtc:Yhe,tickFormat:vU},Symbol.toStringTag,{value:"Module"}));var B8,wT;function UU(){if(wT)return B8;wT=1;var e=g0();function t(r,n,i){for(var a=-1,o=r.length;++a<o;){var l=r[a],c=n(l);if(c!=null&&(u===void 0?c===c&&!e(c):i(c,u)))var u=c,f=l}return f}return B8=t,B8}var D8,ET;function Jhe(){if(ET)return D8;ET=1;function e(t,r){return t>r}return D8=e,D8}var F8,jT;function eme(){if(jT)return F8;jT=1;var e=UU(),t=Jhe(),r=b0();function n(i){return i&&i.length?e(i,r,t):void 0}return F8=n,F8}var tme=eme();const pl=lr(tme);var P8,NT;function rme(){if(NT)return P8;NT=1;function e(t,r){return t<r}return P8=e,P8}var T8,AT;function nme(){if(AT)return T8;AT=1;var e=UU(),t=rme(),r=b0();function n(i){return i&&i.length?e(i,r,t):void 0}return T8=n,T8}var sme=nme();const Oy=lr(sme);var M8,kT;function ime(){if(kT)return M8;kT=1;var e=X3(),t=Ll(),r=QV(),n=zs();function i(a,o){var l=n(a)?e:r;return l(a,t(o,3))}return M8=i,M8}var O8,ST;function ame(){if(ST)return O8;ST=1;var e=XV(),t=ime();function r(n,i){return e(t(n,i),1)}return O8=r,O8}var ome=ame();const lme=lr(ome);var L8,BT;function cme(){if(BT)return L8;BT=1;var e=lE();function t(r,n){return e(r,n)}return L8=t,L8}var ume=cme();const $f=lr(ume);var E0=1e9,dme={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},OE,Ir=!0,Ni="[DecimalError] ",Mc=Ni+"Invalid argument: ",ME=Ni+"Exponent out of range: ",j0=Math.floor,lc=Math.pow,xme=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Xs,Tn=1e7,Fr=7,qU=9007199254740991,l1=j0(qU/Fr),tt={};tt.absoluteValue=tt.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};tt.comparedTo=tt.cmp=function(e){var t,r,n,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(n=a.d.length,i=e.d.length,t=0,r=n<i?n:i;t<r;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1};tt.decimalPlaces=tt.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Fr;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};tt.dividedBy=tt.div=function(e){return xo(this,new this.constructor(e))};tt.dividedToIntegerBy=tt.idiv=function(e){var t=this,r=t.constructor;return Er(xo(t,new r(e),0,1),r.precision)};tt.equals=tt.eq=function(e){return!this.cmp(e)};tt.exponent=function(){return xn(this)};tt.greaterThan=tt.gt=function(e){return this.cmp(e)>0};tt.greaterThanOrEqualTo=tt.gte=function(e){return this.cmp(e)>=0};tt.isInteger=tt.isint=function(){return this.e>this.d.length-2};tt.isNegative=tt.isneg=function(){return this.s<0};tt.isPositive=tt.ispos=function(){return this.s>0};tt.isZero=function(){return this.s===0};tt.lessThan=tt.lt=function(e){return this.cmp(e)<0}
118;tt.lessThanOrEqualTo=tt.lte=function(e){return this.cmp(e)<1};tt.logarithm=tt.log=function(e){var t,r=this,n=r.constructor,i=n.precision,a=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Xs))throw Error(Ni+"NaN");if(r.s<1)throw Error(Ni+(r.s?"NaN":"-Infinity"));return r.eq(Xs)?new n(0):(Ir=!1,t=xo(zf(r,a),zf(e,a),a),Ir=!0,Er(t,i))};tt.minus=tt.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?GU(t,e):WU(t,(e.s=-e.s,e))};tt.modulo=tt.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(Ni+"NaN");return r.s?(Ir=!1,t=xo(r,e,0,1).times(e),Ir=!0,r.minus(t)):Er(new n(r),i)};tt.naturalExponential=tt.exp=function(){return HU(this)};tt.naturalLogarithm=tt.ln=function(){return zf(this)};tt.negated=tt.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};tt.plus=tt.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?WU(t,e):GU(t,(e.s=-e.s,e))};tt.precision=tt.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Mc+e);if(t=xn(i)+1,n=i.d.length-1,r=n*Fr+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};tt.squareRoot=tt.sqrt=function(){var e,t,r,n,i,a,o,l=this,c=l.constructor;if(l.s<1){if(!l.s)return new c(0);throw Error(Ni+"NaN")}for(e=xn(l),Ir=!1,i=Math.sqrt(+l),i==0||i==1/0?(t=Ea(l.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=j0((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(a=n,n=a.plus(xo(l,a,o+2)).times(.5),Ea(a.d).slice(0,o)===(t=Ea(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(Er(a,r+1,0),a.times(a).eq(l)){n=a;break}}else if(t!="9999")break;o+=4}return Ir=!0,Er(n,r)};tt.times=tt.mul=function(e){var t,r,n,i,a,o,l,c,u,f=this,x=f.constructor,m=f.d,p=(e=new x(e)).d;if(!f.s||!e.s)return new x(0);for(e.s*=f.s,r=f.e+e.e,c=m.length,u=p.length,c<u&&(a=m,m=p,p=a,o=c,c=u,u=o),a=[],o=c+u,n=o;n--;)a.push(0);for(n=u;--n>=0;){for(t=0,i=c+n;i>n;)l=a[i]+p[n]*m[i-n-1]+t,a[i--]=l%Tn|0,t=l/Tn|0;a[i]=(a[i]+t)%Tn|0}for(;!a[--o];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,Ir?Er(e,x.precision):e};tt.toDecimalPlaces=tt.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(La(e,0,E0),t===void 0?t=n.rounding:La(t,0,8),Er(r,e+xn(r)+1,t))};tt.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Yc(n,!0):(La(e,0,E0),t===void 0?t=i.rounding:La(t,0,8),n=Er(new i(n),e+1,t),r=Yc(n,!0,e+1)),r};tt.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?Yc(i):(La(e,0,E0),t===void 0?t=a.rounding:La(t,0,8),n=Er(new a(i),e+xn(i)+1,t),r=Yc(n.abs(),!1,e+xn(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};tt.toInteger=tt.toint=function(){var e=this,t=e.constructor;return Er(new t(e),xn(e)+1,t.rounding)};tt.toNumber=function(){return+this};tt.toPower=tt.pow=function(e){var t,r,n,i,a,o,l=this,c=l.constructor,u=12,f=+(e=new c(e));if(!e.s)return new c(Xs);if(l=new c(l),!l.s){if(e.s<1)throw Error(Ni+"Infinity");return l}if(l.eq(Xs))return l;if(n=c.precision,e.eq(Xs))return Er(l,n);if(t=e.e,r=e.d.length-1,o=t>=r,a=l.s,o){if((r=f<0?-f:f)<=qU){for(i=new c(Xs),t=Math.ceil(n/Fr+4),Ir=!1;r%2&&(i=i.times(l),FT(i.d,t)),r=j0(r/2),r!==0;)l=l.times(l),FT(l.d,t);return Ir=!0,e.s<0?new c(Xs).div(i):Er(i,n)}}else if(a<0)throw Error(Ni+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,l.s=1,Ir=!1,i=e.times(zf(l,n+u)),Ir=!0,i=HU(i),i.s=a,i};tt.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=xn(i),n=Yc(i,r<=a.toExpNeg||r>=a.toExpPos)):(La(e,1,E0),t===void 0?t=a.rounding:La(t,0,8),i=Er(new a(i),e,t),r=xn(i),n=Yc(i,e<=r||r<=a.toExpNeg,e)),n};tt.toSignificantDigits=tt.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(La(e,1,E0),t===void 0?t=n.rounding:La(t,0,8)),Er(new n(r),e,t)};tt.toString=tt.valueOf=tt.val=tt.toJSON=tt[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=xn(e),r=e.constructor;return Yc(e,t<=r.toExpNeg||t>=r.toExpPos)};function WU(e,t){var r,n,i,a,o,l,c,u,f=e.constructor,x=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),Ir?Er(t,x):t;if(c=e.d,u=t.d,o=e.e,i=t.e,c=c.slice(),a=o-i,a){for(a<0?(n=c,a=-a,l=u.length):(n=u,i=o,l=c.length),o=Math.ceil(x/Fr),l=o>l?o+1:l+1,a>l&&(a=l,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(l=c.length,a=u.length,l-a<0&&(a=l,n=u,u=c,c=n),r=0;a;)r=(c[--a]=c[a]+u[a]+r)/Tn|0,c[a]%=Tn;for(r&&(c.unshift(r),++i),l=c.length;c[--l]==0;)c.pop();return t.d=c,t.e=i,Ir?Er(t,x):t}function La(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Mc+e)}function Ea(e){var t,r,n,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)n=e[t]+"",r=Fr-n.length,r&&(a+=nl(r)),a+=n;o=e[t],n=o+"",r=Fr-n.length,r&&(a+=nl(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return a+o}var xo=function(){function e(n,i){var a,o=0,l=n.length;for(n=n.slice();l--;)a=n[l]*i+o,n[l]=a%Tn|0,o=a/Tn|0;return o&&n.unshift(o),n}function t(n,i,a,o){var l,c;if(a!=o)c=a>o?1:-1;else for(l=c=0;l<a;l++)if(n[l]!=i[l]){c=n[l]>i[l]?1:-1;break}return c}function r(n,i,a){for(var o=0;a--;)n[a]-=o,o=n[a]<i[a]?1:0,n[a]=o*Tn+n[a]-i[a];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,a,o){var l,c,u,f,x,m,p,y,v,b,E,N,j,A,w,S,B,D,P=n.constructor,O=n.s==i.s?1:-1,M=n.d,I=i.d;if(!n.s)return new P(n);if(!i.s)throw Error(Ni+"Division by zero");for(c=n.e-i.e,B=I.length,w=M.length,p=new P(O),y=p.d=[],u=0;I[u]==(M[u]||0);)++u;if(I[u]>(M[u]||0)&&--c,a==null?N=a=P.precision:o?N=a+(xn(n)-xn(i))+1:N=a,N<0)return new P(0);if(N=N/Fr+2|0,u=0,B==1)for(f=0,I=I[0],N++;(u<w||f)&&N--;u++)j=f*Tn+(M[u]||0),y[u]=j/I|0,f=j%I|0;else{for(f=Tn/(I[0]+1)|0,f>1&&(I=e(I,f),M=e(M,f),B=I.length,w=M.length),A=B,v=M.slice(0,B),b=v.length;b<B;)v[b++]=0;D=I.slice(),D.unshift(0),S=I[0],I[1]>=Tn/2&&++S;do f=0,l=t(I,v,B,b),l<0?(E=v[0],B!=b&&(E=E*Tn+(v[1]||0)),f=E/S|0,f>1?(f>=Tn&&(f=Tn-1),x=e(I,f),m=x.length,b=v.length,l=t(x,v,m,b),l==1&&(f--,r(x,B<m?D:I,m))):(f==0&&(l=f=1),x=I.slice()),m=x.length,m<b&&x.unshift(0),r(v,x,b),l==-1&&(b=v.length,l=t(I,v,B,b),l<1&&(f++,r(v,B<b?D:I,b))),b=v.length):l===0&&(f++,v=[0]),y[u++]=f,l&&v[0]?v[b++]=M[A]||0:(v=[M[A]],b=1);while((A++<w||v[0]!==void 0)&&N--)}
118return y[0]||y.shift(),p.e=c,Er(p,o?a+xn(p)+1:a)}}();function HU(e,t){var r,n,i,a,o,l,c=0,u=0,f=e.constructor,x=f.precision;if(xn(e)>16)throw Error(ME+xn(e));if(!e.s)return new f(Xs);for(Ir=!1,l=x,o=new f(.03125);e.abs().gte(.1);)e=e.times(o),u+=5;for(n=Math.log(lc(2,u))/Math.LN10*2+5|0,l+=n,r=i=a=new f(Xs),f.precision=l;;){if(i=Er(i.times(e),l),r=r.times(++c),o=a.plus(xo(i,r,l)),Ea(o.d).slice(0,l)===Ea(a.d).slice(0,l)){for(;u--;)a=Er(a.times(a),l);return f.precision=x,t==null?(Ir=!0,Er(a,x)):a}a=o}}function xn(e){for(var t=e.e*Fr,r=e.d[0];r>=10;r/=10)t++;return t}function R8(e,t,r){if(t>e.LN10.sd())throw Ir=!0,r&&(e.precision=r),Error(Ni+"LN10 precision limit exceeded");return Er(new e(e.LN10),t)}function nl(e){for(var t="";e--;)t+="0";return t}function zf(e,t){var r,n,i,a,o,l,c,u,f,x=1,m=10,p=e,y=p.d,v=p.constructor,b=v.precision;if(p.s<1)throw Error(Ni+(p.s?"NaN":"-Infinity"));if(p.eq(Xs))return new v(0);if(t==null?(Ir=!1,u=b):u=t,p.eq(10))return t==null&&(Ir=!0),R8(v,u);if(u+=m,v.precision=u,r=Ea(y),n=r.charAt(0),a=xn(p),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)p=p.times(e),r=Ea(p.d),n=r.charAt(0),x++;a=xn(p),n>1?(p=new v("0."+r),a++):p=new v(n+"."+r.slice(1))}else return c=R8(v,u+2,b).times(a+""),p=zf(new v(n+"."+r.slice(1)),u-m).plus(c),v.precision=b,t==null?(Ir=!0,Er(p,b)):p;for(l=o=p=xo(p.minus(Xs),p.plus(Xs),u),f=Er(p.times(p),u),i=3;;){if(o=Er(o.times(f),u),c=l.plus(xo(o,new v(i),u)),Ea(c.d).slice(0,u)===Ea(l.d).slice(0,u))return l=l.times(2),a!==0&&(l=l.plus(R8(v,u+2,b).times(a+""))),l=xo(l,new v(x),u),v.precision=b,t==null?(Ir=!0,Er(l,b)):l;l=c,i+=2}}function DT(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=j0(r/Fr),e.d=[],n=(r+1)%Fr,r<0&&(n+=Fr),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=Fr;n<i;)e.d.push(+t.slice(n,n+=Fr));t=t.slice(n),n=Fr-t.length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),Ir&&(e.e>l1||e.e<-l1))throw Error(ME+r)}else e.s=0,e.e=0,e.d=[0];return e}function Er(e,t,r){var n,i,a,o,l,c,u,f,x=e.d;for(o=1,a=x[0];a>=10;a/=10)o++;if(n=t-o,n<0)n+=Fr,i=t,u=x[f=0];else{if(f=Math.ceil((n+1)/Fr),a=x.length,f>=a)return e;for(u=a=x[f],o=1;a>=10;a/=10)o++;n%=Fr,i=n-Fr+o}if(r!==void 0&&(a=lc(10,o-i-1),l=u/a%10|0,c=t<0||x[f+1]!==void 0||u%a,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?u/lc(10,o-i):0:x[f-1])%10&1||r==(e.s<0?8:7))),t<1||!x[0])return c?(a=xn(e),x.length=1,t=t-a-1,x[0]=lc(10,(Fr-t%Fr)%Fr),e.e=j0(-t/Fr)||0):(x.length=1,x[0]=e.e=e.s=0),e;if(n==0?(x.length=f,a=1,f--):(x.length=f+1,a=lc(10,Fr-n),x[f]=i>0?(u/lc(10,o-i)%lc(10,i)|0)*a:0),c)for(;;)if(f==0){(x[0]+=a)==Tn&&(x[0]=1,++e.e);break}else{if(x[f]+=a,x[f]!=Tn)break;x[f--]=0,a=1}for(n=x.length;x[--n]===0;)x.pop();if(Ir&&(e.e>l1||e.e<-l1))throw Error(ME+xn(e));return e}function GU(e,t){var r,n,i,a,o,l,c,u,f,x,m=e.constructor,p=m.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new m(e),Ir?Er(t,p):t;if(c=e.d,x=t.d,n=t.e,u=e.e,c=c.slice(),o=u-n,o){for(f=o<0,f?(r=c,o=-o,l=x.length):(r=x,n=u,l=c.length),i=Math.max(Math.ceil(p/Fr),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=x.length,f=i<l,f&&(l=i),i=0;i<l;i++)if(c[i]!=x[i]){f=c[i]<x[i];break}o=0}for(f&&(r=c,c=x,x=r,t.s=-t.s),l=c.length,i=x.length-l;i>0;--i)c[l++]=0;for(i=x.length;i>o;){if(c[--i]<x[i]){for(a=i;a&&c[--a]===0;)c[a]=Tn-1;--c[a],c[i]+=Tn}c[i]-=x[i]}for(;c[--l]===0;)c.pop();for(;c[0]===0;c.shift())--n;return c[0]?(t.d=c,t.e=n,Ir?Er(t,p):t):new m(0)}function Yc(e,t,r){var n,i=xn(e),a=Ea(e.d),o=a.length;return t?(r&&(n=r-o)>0?a=a.charAt(0)+"."+a.slice(1)+nl(n):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+nl(-i-1)+a,r&&(n=r-o)>0&&(a+=nl(n))):i>=o?(a+=nl(i+1-o),r&&(n=r-i-1)>0&&(a=a+"."+nl(n))):((n=i+1)<o&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-o)>0&&(i+1===o&&(a+="."),a+=nl(n))),e.s<0?"-"+a:a}function FT(e,t){if(e.length>t)return e.length=t,!0}function KU(e){var t,r,n;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(Mc+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return DT(o,a.toString())}else if(typeof a!="string")throw Error(Mc+a);
118if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,xme.test(a))DT(o,a);else throw Error(Mc+a)}if(i.prototype=tt,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=KU,i.config=i.set=fme,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 fme(e){if(!e||typeof e!="object")throw Error(Ni+"Object expected");var t,r,n,i=["precision",1,E0,"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(j0(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Mc+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Mc+r+": "+n);return this}var OE=KU(dme);Xs=new OE(1);const br=OE;function hme(e){return yme(e)||gme(e)||pme(e)||mme()}function mme(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
119In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pme(e,t){if(e){if(typeof e=="string")return l6(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 l6(e,t)}}function gme(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function yme(e){if(Array.isArray(e))return l6(e)}function l6(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 vme=function(t){return t},XU={},YU=function(t){return t===XU},PT=function(t){return function r(){return arguments.length===0||arguments.length===1&&YU(arguments.length<=0?void 0:arguments[0])?r:t.apply(void 0,arguments)}},bme=function e(t,r){return t===1?r:PT(function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];var o=i.filter(function(l){return l!==XU}).length;return o>=t?r.apply(void 0,i):e(t-o,PT(function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var f=i.map(function(x){return YU(x)?c.shift():x});return r.apply(void 0,hme(f).concat(c))}))})},Ly=function(t){return bme(t.length,t)},c6=function(t,r){for(var n=[],i=t;i<r;++i)n[i-t]=i;return n},Cme=Ly(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(r){return t[r]}).map(e)}),wme=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return vme;var i=r.reverse(),a=i[0],o=i.slice(1);return function(){return o.reduce(function(l,c){return c(l)},a.apply(void 0,arguments))}},u6=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},QU=function(t){var r=null,n=null;return function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return r&&a.every(function(l,c){return l===r[c]})||(r=a,n=t.apply(void 0,a)),n}};function Eme(e){var t;return e===0?t=1:t=Math.floor(new br(e).abs().log(10).toNumber())+1,t}function jme(e,t,r){for(var n=new br(e),i=0,a=[];n.lt(t)&&i<1e5;)a.push(n.toNumber()),n=n.add(r),i++;return a}var Nme=Ly(function(e,t,r){var n=+e,i=+t;return n+r*(i-n)}),Ame=Ly(function(e,t,r){var n=t-+e;return n=n||1/0,(r-e)/n}),kme=Ly(function(e,t,r){var n=t-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});const Ry={rangeStep:jme,getDigitCount:Eme,interpolateNumber:Nme,uninterpolateNumber:Ame,uninterpolateTruncation:kme};function d6(e){return Dme(e)||Bme(e)||ZU(e)||Sme()}function Sme(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
120In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Bme(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Dme(e){if(Array.isArray(e))return x6(e)}function Vf(e,t){return Tme(e)||Pme(e,t)||ZU(e,t)||Fme()}function Fme(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
121In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZU(e,t){if(e){if(typeof e=="string")return x6(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 x6(e,t)}}function x6(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 Pme(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),l;!(n=(l=o.next()).done)&&(r.push(l.value),!(t&&r.length===t));n=!0);}catch(c){i=!0,a=c}finally{try{!n&&o.return!=null&&o.return()}finally{if(i)throw a}}return r}}function Tme(e){if(Array.isArray(e))return e}function JU(e){var t=Vf(e,2),r=t[0],n=t[1],i=r,a=n;return r>n&&(i=n,a=r),[i,a]}function eq(e,t,r){if(e.lte(0))return new br(0);var n=Ry.getDigitCount(e.toNumber()),i=new br(10).pow(n),a=e.div(i),o=n!==1?.05:.1,l=new br(Math.ceil(a.div(o).toNumber())).add(r).mul(o),c=l.mul(i);return t?c:new br(Math.ceil(c))}function Mme(e,t,r){var n=1,i=new br(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new br(10).pow(Ry.getDigitCount(e)-1),i=new br(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new br(Math.floor(e)))}
121else e===0?i=new br(Math.floor((t-1)/2)):r||(i=new br(Math.floor(e)));var o=Math.floor((t-1)/2),l=wme(Cme(function(c){return i.add(new br(c-o).mul(n)).toNumber()}),c6);return l(0,t)}function tq(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 br(0),tickMin:new br(0),tickMax:new br(0)};var a=eq(new br(t).sub(e).div(r-1),n,i),o;e<=0&&t>=0?o=new br(0):(o=new br(e).add(t).div(2),o=o.sub(new br(o).mod(a)));var l=Math.ceil(o.sub(e).div(a).toNumber()),c=Math.ceil(new br(t).sub(o).div(a).toNumber()),u=l+c+1;return u>r?tq(e,t,r,n,i+1):(u<r&&(c=t>0?c+(r-u):c,l=t>0?l:l+(r-u)),{step:a,tickMin:o.sub(new br(l).mul(a)),tickMax:o.add(new br(c).mul(a))})}function Ome(e){var t=Vf(e,2),r=t[0],n=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),l=JU([r,n]),c=Vf(l,2),u=c[0],f=c[1];if(u===-1/0||f===1/0){var x=f===1/0?[u].concat(d6(c6(0,i-1).map(function(){return 1/0}))):[].concat(d6(c6(0,i-1).map(function(){return-1/0})),[f]);return r>n?u6(x):x}if(u===f)return Mme(u,i,a);var m=tq(u,f,o,a),p=m.step,y=m.tickMin,v=m.tickMax,b=Ry.rangeStep(y,v.add(new br(.1).mul(p)),p);return r>n?u6(b):b}function Lme(e,t){var r=Vf(e,2),n=r[0],i=r[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=JU([n,i]),l=Vf(o,2),c=l[0],u=l[1];if(c===-1/0||u===1/0)return[n,i];if(c===u)return[c];var f=Math.max(t,2),x=eq(new br(u).sub(c).div(f-1),a,0),m=[].concat(d6(Ry.rangeStep(new br(c),new br(u).sub(new br(.99).mul(x)),x)),[u]);return n>i?u6(m):m}var Rme=QU(Ome),_me=QU(Lme),Ime="Invariant failed";function Qc(e,t){throw new Error(Ime)}var $me=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function zd(e){"@babel/helpers - typeof";return zd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zd(e)}function c1(){return c1=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},c1.apply(this,arguments)}function zme(e,t){return Wme(e)||qme(e,t)||Ume(e,t)||Vme()}function Vme(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
122In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ume(e,t){if(e){if(typeof e=="string")return TT(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 TT(e,t)}}function TT(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 qme(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function Wme(e){if(Array.isArray(e))return e}function Hme(e,t){if(e==null)return{};var r=Gme(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Gme(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 Kme(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xme(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,sq(n.key),n)}}function Yme(e,t,r){return t&&Xme(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Qme(e,t,r){return t=u1(t),Zme(e,rq()?Reflect.construct(t,r||[],u1(e).constructor):t.apply(e,r))}function Zme(e,t){if(t&&(zd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Jme(e)}function Jme(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(rq=function(){return!!e})()}
122function u1(e){return u1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},u1(e)}function epe(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&&f6(e,t)}function f6(e,t){return f6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},f6(e,t)}function nq(e,t,r){return t=sq(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sq(e){var t=tpe(e,"string");return zd(t)=="symbol"?t:t+""}function tpe(e,t){if(zd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(zd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var _y=function(e){function t(){return Kme(this,t),Qme(this,t,arguments)}return epe(t,e),Yme(t,[{key:"render",value:function(){var n=this.props,i=n.offset,a=n.layout,o=n.width,l=n.dataKey,c=n.data,u=n.dataPointFormatter,f=n.xAxis,x=n.yAxis,m=Hme(n,$me),p=Xt(m,!1);this.props.direction==="x"&&f.type!=="number"&&Qc();var y=c.map(function(v){var b=u(v,l),E=b.x,N=b.y,j=b.value,A=b.errorVal;if(!A)return null;var w=[],S,B;if(Array.isArray(A)){var D=zme(A,2);S=D[0],B=D[1]}else S=B=A;if(a==="vertical"){var P=f.scale,O=N+i,M=O+o,I=O-o,V=P(j-S),W=P(j+B);w.push({x1:W,y1:M,x2:W,y2:I}),w.push({x1:V,y1:O,x2:W,y2:O}),w.push({x1:V,y1:M,x2:V,y2:I})}else if(a==="horizontal"){var _=x.scale,z=E+i,R=z-o,q=z+o,G=_(j-S),K=_(j+B);w.push({x1:R,y1:K,x2:q,y2:K}),w.push({x1:z,y1:G,x2:z,y2:K}),w.push({x1:R,y1:G,x2:q,y2:G})}return ie.createElement(qr,c1({className:"recharts-errorBar",key:"bar-".concat(w.map(function($){return"".concat($.x1,"-").concat($.x2,"-").concat($.y1,"-").concat($.y2)}))},p),w.map(function($){return ie.createElement("line",c1({},$,{key:"line-".concat($.x1,"-").concat($.x2,"-").concat($.y1,"-").concat($.y2)}))}))});return ie.createElement(qr,{className:"recharts-errorBars"},y)}}])}(ie.Component);nq(_y,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});nq(_y,"displayName","ErrorBar");function Uf(e){"@babel/helpers - typeof";return Uf=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},Uf(e)}function MT(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 nc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?MT(Object(r),!0).forEach(function(n){rpe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):MT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rpe(e,t,r){return t=npe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function npe(e){var t=spe(e,"string");return Uf(t)=="symbol"?t:t+""}function spe(e,t){if(Uf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Uf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var iq=function(t){var r=t.children,n=t.formattedGraphicalItems,i=t.legendWidth,a=t.legendContent,o=Ks(r,ad);if(!o)return null;var l=ad.defaultProps,c=l!==void 0?nc(nc({},l),o.props):{},u;return o.props&&o.props.payload?u=o.props&&o.props.payload:a==="children"?u=(n||[]).reduce(function(f,x){var m=x.item,p=x.props,y=p.sectors||p.data||[];return f.concat(y.map(function(v){return{type:o.props.iconType||m.props.legendType,value:v.name,color:v.fill,payload:v}}))},[]):u=(n||[]).map(function(f){var x=f.item,m=x.type.defaultProps,p=m!==void 0?nc(nc({},m),x.props):{}
122,y=p.dataKey,v=p.name,b=p.legendType,E=p.hide;return{inactive:E,dataKey:y,type:c.iconType||b||"square",color:LE(x),value:v||y,payload:p}}),nc(nc(nc({},c),ad.getWithHeight(o,i)),{},{payload:u,item:o})};function qf(e){"@babel/helpers - typeof";return qf=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},qf(e)}function OT(e){return lpe(e)||ope(e)||ape(e)||ipe()}function ipe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
123In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ape(e,t){if(e){if(typeof e=="string")return h6(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 h6(e,t)}}function ope(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function lpe(e){if(Array.isArray(e))return h6(e)}function h6(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 LT(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?LT(Object(r),!0).forEach(function(n){ld(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):LT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ld(e,t,r){return t=cpe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cpe(e){var t=upe(e,"string");return qf(t)=="symbol"?t:t+""}function upe(e,t){if(qf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(qf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qs(e,t,r){return nr(e)||nr(t)?r:En(t)?wi(e,t,r):$t(t)?t(e):r}function tf(e,t,r,n){var i=lme(e,function(l){return Qs(l,t)});if(r==="number"){var a=i.filter(function(l){return qe(l)||parseFloat(l)});return a.length?[Oy(a),pl(a)]:[1/0,-1/0]}var o=n?i.filter(function(l){return!nr(l)}):i;return o.map(function(l){return En(l)||l instanceof Date?l:""})}var dpe=function(t){var r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,l=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(l<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var c=a.range,u=0;u<l;u++){var f=u>0?i[u-1].coordinate:i[l-1].coordinate,x=i[u].coordinate,m=u>=l-1?i[0].coordinate:i[u+1].coordinate,p=void 0;if(Xi(x-f)!==Xi(m-x)){var y=[];if(Xi(m-x)===Xi(c[1]-c[0])){p=m;var v=x+c[1]-c[0];y[0]=Math.min(v,(v+f)/2),y[1]=Math.max(v,(v+f)/2)}else{p=f;var b=m+c[1]-c[0];y[0]=Math.min(x,(b+x)/2),y[1]=Math.max(x,(b+x)/2)}var E=[Math.min(x,(p+x)/2),Math.max(x,(p+x)/2)];if(t>E[0]&&t<=E[1]||t>=y[0]&&t<=y[1]){o=i[u].index;break}}else{var N=Math.min(f,m),j=Math.max(f,m);if(t>(N+x)/2&&t<=(j+x)/2){o=i[u].index;break}}}else for(var A=0;A<l;A++)if(A===0&&t<=(n[A].coordinate+n[A+1].coordinate)/2||A>0&&A<l-1&&t>(n[A].coordinate+n[A-1].coordinate)/2&&t<=(n[A].coordinate+n[A+1].coordinate)/2||A===l-1&&t>(n[A].coordinate+n[A-1].coordinate)/2){o=n[A].index;break}return o},LE=function(t){var r,n=t,i=n.type.displayName,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?tn(tn({},t.type.defaultProps),t.props):t.props,o=a.stroke,l=a.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},xpe=function(t){var r=t.barSize,n=t.totalSize,i=t.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var o={},l=Object.keys(a),c=0,u=l.length;c<u;c++)for(var f=a[l[c]].stackGroups,x=Object.keys(f),m=0,p=x.length;m<p;m++){var y=f[x[m]],v=y.items,b=y.cateAxisId,E=v.filter(function(B){return co(B.type).indexOf("Bar")>=0});if(E&&E.length){var N=E[0].type.defaultProps,j=N!==void 0?tn(tn({},N),E[0].props):E[0].props,A=j.barSize,w=j[b];o[w]||(o[w]=[]);var S=nr(A)?r:A;o[w].push({item:E[0],stackList:E.slice(1),barSize:nr(S)?void 0:Xc(S,n,0)})}}return o},fpe=function(t){var r=t.barGap,n=t.barCategoryGap,i=t.bandSize,a=t.sizeList,o=a===void 0?[]:a,l=t.maxBarSize,c=o.length;if(c<1)return null;var u=Xc(r,i,0,!0),f,x=[];
123if(o[0].barSize===+o[0].barSize){var m=!1,p=i/c,y=o.reduce(function(A,w){return A+w.barSize||0},0);y+=(c-1)*u,y>=i&&(y-=(c-1)*u,u=0),y>=i&&p>0&&(m=!0,p*=.9,y=c*p);var v=(i-y)/2>>0,b={offset:v-u,size:0};f=o.reduce(function(A,w){var S={item:w.item,position:{offset:b.offset+b.size+u,size:m?p:w.barSize}},B=[].concat(OT(A),[S]);return b=B[B.length-1].position,w.stackList&&w.stackList.length&&w.stackList.forEach(function(D){B.push({item:D,position:b})}),B},x)}else{var E=Xc(n,i,0,!0);i-2*E-(c-1)*u<=0&&(u=0);var N=(i-2*E-(c-1)*u)/c;N>1&&(N>>=0);var j=l===+l?Math.min(N,l):N;f=o.reduce(function(A,w,S){var B=[].concat(OT(A),[{item:w.item,position:{offset:E+(N+u)*S+(N-j)/2,size:j}}]);return w.stackList&&w.stackList.length&&w.stackList.forEach(function(D){B.push({item:D,position:B[B.length-1].position})}),B},x)}return f},hpe=function(t,r,n,i){var a=n.children,o=n.width,l=n.margin,c=o-(l.left||0)-(l.right||0),u=iq({children:a,legendWidth:c});if(u){var f=i||{},x=f.width,m=f.height,p=u.align,y=u.verticalAlign,v=u.layout;if((v==="vertical"||v==="horizontal"&&y==="middle")&&p!=="center"&&qe(t[p]))return tn(tn({},t),{},ld({},p,t[p]+(x||0)));if((v==="horizontal"||v==="vertical"&&p==="center")&&y!=="middle"&&qe(t[y]))return tn(tn({},t),{},ld({},y,t[y]+(m||0)))}return t},mpe=function(t,r,n){return nr(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},aq=function(t,r,n,i,a){var o=r.props.children,l=Qi(o,_y).filter(function(u){return mpe(i,a,u.props.direction)});if(l&&l.length){var c=l.map(function(u){return u.props.dataKey});return t.reduce(function(u,f){var x=Qs(f,n);if(nr(x))return u;var m=Array.isArray(x)?[Oy(x),pl(x)]:[x,x],p=c.reduce(function(y,v){var b=Qs(f,v,0),E=m[0]-Math.abs(Array.isArray(b)?b[0]:b),N=m[1]+Math.abs(Array.isArray(b)?b[1]:b);return[Math.min(E,y[0]),Math.max(N,y[1])]},[1/0,-1/0]);return[Math.min(p[0],u[0]),Math.max(p[1],u[1])]},[1/0,-1/0])}return null},ppe=function(t,r,n,i,a){var o=r.map(function(l){return aq(t,l,n,a,i)}).filter(function(l){return!nr(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},oq=function(t,r,n,i,a){var o=r.map(function(c){var u=c.props.dataKey;return n==="number"&&u&&aq(t,c,u,i)||tf(t,u,n,a)});if(n==="number")return o.reduce(function(c,u){return[Math.min(c[0],u[0]),Math.max(c[1],u[1])]},[1/0,-1/0]);var l={};return o.reduce(function(c,u){for(var f=0,x=u.length;f<x;f++)l[u[f]]||(l[u[f]]=!0,c.push(u[f]));return c},[])},lq=function(t,r){return t==="horizontal"&&r==="xAxis"||t==="vertical"&&r==="yAxis"||t==="centric"&&r==="angleAxis"||t==="radial"&&r==="radiusAxis"},cq=function(t,r,n,i){if(i)return t.map(function(c){return c.coordinate});var a,o,l=t.map(function(c){return c.coordinate===r&&(a=!0),c.coordinate===n&&(o=!0),c.coordinate});return a||l.push(r),o||l.push(n),l},oo=function(t,r,n){if(!t)return null;var i=t.scale,a=t.duplicateDomain,o=t.type,l=t.range,c=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,u=(r||n)&&o==="category"&&i.bandwidth?i.bandwidth()/c:0;if(u=t.axisType==="angleAxis"&&(l==null?void 0:l.length)>=2?Xi(l[0]-l[1])*2*u:u,r&&(t.ticks||t.niceTicks)){var f=(t.ticks||t.niceTicks).map(function(x){var m=a?a.indexOf(x):x;return{coordinate:i(m)+u,value:x,offset:u}});return f.filter(function(x){return!v0(x.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(x,m){return{coordinate:i(x)+u,value:x,index:m,offset:u}}
123):i.ticks&&!n?i.ticks(t.tickCount).map(function(x){return{coordinate:i(x)+u,value:x,offset:u}}):i.domain().map(function(x,m){return{coordinate:i(x)+u,value:a?a[x]:x,index:m,offset:u}})},_8=new WeakMap,Ep=function(t,r){if(typeof r!="function")return t;_8.has(t)||_8.set(t,new WeakMap);var n=_8.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},gpe=function(t,r,n){var i=t.scale,a=t.type,o=t.layout,l=t.axisType;if(i==="auto")return o==="radial"&&l==="radiusAxis"?{scale:Of(),realScaleType:"band"}:o==="radial"&&l==="angleAxis"?{scale:s1(),realScaleType:"linear"}:a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:ef(),realScaleType:"point"}:a==="category"?{scale:Of(),realScaleType:"band"}:{scale:s1(),realScaleType:"linear"};if(Kc(i)){var c="scale".concat(wy(i));return{scale:(CT[c]||ef)(),realScaleType:CT[c]?c:"point"}}return $t(i)?{scale:i}:{scale:ef(),realScaleType:"point"}},RT=1e-4,ype=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,i=t.range(),a=Math.min(i[0],i[1])-RT,o=Math.max(i[0],i[1])+RT,l=t(r[0]),c=t(r[n-1]);(l<a||l>o||c<a||c>o)&&t.domain([r[0],r[n-1]])}},vpe=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},bpe=function(t,r){if(!r||r.length!==2||!qe(r[0])||!qe(r[1]))return t;var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]),a=[t[0],t[1]];return(!qe(t[0])||t[0]<n)&&(a[0]=n),(!qe(t[1])||t[1]>i)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]<n&&(a[1]=n),a},Cpe=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n<i;++n)for(var a=0,o=0,l=0;l<r;++l){var c=v0(t[l][n][1])?t[l][n][0]:t[l][n][1];c>=0?(t[l][n][0]=a,t[l][n][1]=a+c,a=t[l][n][1]):(t[l][n][0]=o,t[l][n][1]=o+c,o=t[l][n][1])}},wpe=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n<i;++n)for(var a=0,o=0;o<r;++o){var l=v0(t[o][n][1])?t[o][n][0]:t[o][n][1];l>=0?(t[o][n][0]=a,t[o][n][1]=a+l,a=t[o][n][1]):(t[o][n][0]=0,t[o][n][1]=0)}},Epe={sign:Cpe,expand:iue,none:Td,silhouette:aue,wiggle:oue,positive:wpe},jpe=function(t,r,n){var i=r.map(function(l){return l.props.dataKey}),a=Epe[n],o=sue().keys(i).value(function(l,c){return+Qs(l,c,0)}).order(qw).offset(a);return o(t)},Npe=function(t,r,n,i,a,o){if(!t)return null;var l=o?r.reverse():r,c={},u=l.reduce(function(x,m){var p,y=(p=m.type)!==null&&p!==void 0&&p.defaultProps?tn(tn({},m.type.defaultProps),m.props):m.props,v=y.stackId,b=y.hide;if(b)return x;var E=y[n],N=x[E]||{hasStack:!1,stackGroups:{}};if(En(v)){var j=N.stackGroups[v]||{numericAxisId:n,cateAxisId:i,items:[]};j.items.push(m),N.hasStack=!0,N.stackGroups[v]=j}else N.stackGroups[Wh("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[m]};return tn(tn({},x),{},ld({},E,N))},c),f={};return Object.keys(u).reduce(function(x,m){var p=u[m];if(p.hasStack){var y={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(v,b){var E=p.stackGroups[b];return tn(tn({},v),{},ld({},b,{numericAxisId:n,cateAxisId:i,items:E.items,stackedData:jpe(t,E.items,a)}))},y)}return tn(tn({},x),{},ld({},m,p))},f)},Ape=function(t,r){var n=r.realScaleType,i=r.type,a=r.tickCount,o=r.originalDomain,l=r.allowDecimals,c=n||r.scale;if(c!=="auto"&&c!=="linear")return null;if(a&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var u=t.domain();if(!u.length)return null;var f=Rme(u,a,l);return t.domain([Oy(f),pl(f)]),{niceTicks:f}}if(a&&i==="number"){var x=t.domain(),m=_me(x,a,l);return{niceTicks:m}}return null};function _T(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,a=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!nr(i[t.dataKey])){var l=_g(r,"value",i[t.dataKey]);if(l)return l.coordinate+n/2}return r[a]?r[a].coordinate+n/2:null}var c=Qs(i,nr(o)?t.dataKey:o);return nr(c)?null:t.scale(c)}
123var IT=function(t){var r=t.axis,n=t.ticks,i=t.offset,a=t.bandSize,o=t.entry,l=t.index;if(r.type==="category")return n[l]?n[l].coordinate+i:null;var c=Qs(o,r.dataKey,r.domain[l]);return nr(c)?null:r.scale(c)-a/2+i},kpe=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var i=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]);return i<=0&&a>=0?0:a<0?a:i}return n[0]},Spe=function(t,r){var n,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?tn(tn({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(En(a)){var o=r[a];if(o){var l=o.items.indexOf(t);return l>=0?o.stackedData[l]:null}}return null},Bpe=function(t){return t.reduce(function(r,n){return[Oy(n.concat([r[0]]).filter(qe)),pl(n.concat([r[1]]).filter(qe))]},[1/0,-1/0])},uq=function(t,r,n){return Object.keys(t).reduce(function(i,a){var o=t[a],l=o.stackedData,c=l.reduce(function(u,f){var x=Bpe(f.slice(r,n+1));return[Math.min(u[0],x[0]),Math.max(u[1],x[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})},$T=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,zT=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,m6=function(t,r,n){if($t(t))return t(r,n);if(!Array.isArray(t))return r;var i=[];if(qe(t[0]))i[0]=n?t[0]:Math.min(t[0],r[0]);else if($T.test(t[0])){var a=+$T.exec(t[0])[1];i[0]=r[0]-a}else $t(t[0])?i[0]=t[0](r[0]):i[0]=r[0];if(qe(t[1]))i[1]=n?t[1]:Math.max(t[1],r[1]);else if(zT.test(t[1])){var o=+zT.exec(t[1])[1];i[1]=r[1]+o}else $t(t[1])?i[1]=t[1](r[1]):i[1]=r[1];return i},d1=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!n||i>0)return i}if(t&&r&&r.length>=2){for(var a=uE(r,function(x){return x.coordinate}),o=1/0,l=1,c=a.length;l<c;l++){var u=a[l],f=a[l-1];o=Math.min((u.coordinate||0)-(f.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0},VT=function(t,r,n){return!t||!t.length||$f(t,wi(n,"type.defaultProps.domain"))?r:t},dq=function(t,r){var n=t.type.defaultProps?tn(tn({},t.type.defaultProps),t.props):t.props,i=n.dataKey,a=n.name,o=n.unit,l=n.formatter,c=n.tooltipType,u=n.chartType,f=n.hide;return tn(tn({},Xt(t,!1)),{},{dataKey:i,unit:o,formatter:l,name:a||i,color:LE(t),value:Qs(r,i),type:c,payload:r,chartType:u,hide:f})};function Wf(e){"@babel/helpers - typeof";return Wf=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},Wf(e)}function UT(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 qT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?UT(Object(r),!0).forEach(function(n){Dpe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):UT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Dpe(e,t,r){return t=Fpe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fpe(e){var t=Ppe(e,"string");return Wf(t)=="symbol"?t:t+""}function Ppe(e,t){if(Wf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Wf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var x1=Math.PI/180,Tpe=function(t){return t*180/Math.PI},Wn=function(t,r,n,i){return{x:t+Math.cos(-x1*i)*n,y:r+Math.sin(-x1*i)*n}},Mpe=function(t,r){var n=t.x,i=t.y,a=r.x,o=r.y;return Math.sqrt(Math.pow(n-a,2)+Math.pow(i-o,2))},Ope=function(t,r){var n=t.x,i=t.y,a=r.cx,o=r.cy,l=Mpe({x:n,y:i},{x:a,y:o});if(l<=0)return{radius:l};var c=(n-a)/l,u=Math.acos(c);return i>o&&(u=2*Math.PI-u),{radius:l,angle:Tpe(u),angleInRadian:u}},Lpe=function(t){var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),a=Math.floor(n/360),o=Math.min(i,a);return{startAngle:r-o*360,endAngle:n-o*360}},Rpe=function(t,r){var n=r.startAngle,i=r.endAngle,a=Math.floor(n/360),o=Math.floor(i/360),l=Math.min(a,o);return t+l*360},WT=function(t,r){var n=t.x,i=t.y,a=Ope({x:n,y:i},r),o=a.radius,l=a.angle,c=r.innerRadius,u=r.outerRadius;if(o<c||o>u)return!1;if(o===0)return!0;var f=Lpe(r),x=f.startAngle,m=f.endAngle,p=l,y;if(x<=m){for(;p>m;)p-=360;for(;p<x;)p+=360;y=p>=x&&p<=m}else{for(;p>x;)p-=360;for(;p<m;)p+=360;y=p>=m&&p<=x}return y?qT(qT({},r),{},{radius:o,angle:Rpe(p,r)}):null};function Hf(e){"@babel/helpers - typeof";return Hf=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},Hf(e)}var _pe=["offset"];function Ipe(e){return Upe(e)||Vpe(e)||zpe(e)||$pe()}function $pe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
124In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zpe(e,t){if(e){if(typeof e=="string")return p6(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 p6(e,t)}}function Vpe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Upe(e){if(Array.isArray(e))return p6(e)}function p6(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 qpe(e,t){if(e==null)return{};var r=Wpe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Wpe(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 HT(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 vn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
124t%2?HT(Object(r),!0).forEach(function(n){Hpe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):HT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Hpe(e,t,r){return t=Gpe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Gpe(e){var t=Kpe(e,"string");return Hf(t)=="symbol"?t:t+""}function Kpe(e,t){if(Hf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Hf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Gf(){return Gf=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},Gf.apply(this,arguments)}var Xpe=function(t){var r=t.value,n=t.formatter,i=nr(t.children)?r:t.children;return $t(n)?n(i):i},Ype=function(t,r){var n=Xi(r-t),i=Math.min(Math.abs(r-t),360);return n*i},Qpe=function(t,r,n){var i=t.position,a=t.viewBox,o=t.offset,l=t.className,c=a,u=c.cx,f=c.cy,x=c.innerRadius,m=c.outerRadius,p=c.startAngle,y=c.endAngle,v=c.clockWise,b=(x+m)/2,E=Ype(p,y),N=E>=0?1:-1,j,A;i==="insideStart"?(j=p+N*o,A=v):i==="insideEnd"?(j=y-N*o,A=!v):i==="end"&&(j=y+N*o,A=v),A=E<=0?A:!A;var w=Wn(u,f,b,j),S=Wn(u,f,b,j+(A?1:-1)*359),B="M".concat(w.x,",").concat(w.y,`
125    A`).concat(b,",").concat(b,",0,1,").concat(A?0:1,`,
126    `).concat(S.x,",").concat(S.y),D=nr(t.id)?Wh("recharts-radial-line-"):t.id;return ie.createElement("text",Gf({},n,{dominantBaseline:"central",className:or("recharts-radial-bar-label",l)}),ie.createElement("defs",null,ie.createElement("path",{id:D,d:B})),ie.createElement("textPath",{xlinkHref:"#".concat(D)},r))},Zpe=function(t){var r=t.viewBox,n=t.offset,i=t.position,a=r,o=a.cx,l=a.cy,c=a.innerRadius,u=a.outerRadius,f=a.startAngle,x=a.endAngle,m=(f+x)/2;if(i==="outside"){var p=Wn(o,l,u+n,m),y=p.x,v=p.y;return{x:y,y:v,textAnchor:y>=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 b=(c+u)/2,E=Wn(o,l,b,m),N=E.x,j=E.y;return{x:N,y:j,textAnchor:"middle",verticalAnchor:"middle"}},Jpe=function(t){var r=t.viewBox,n=t.parentViewBox,i=t.offset,a=t.position,o=r,l=o.x,c=o.y,u=o.width,f=o.height,x=f>=0?1:-1,m=x*i,p=x>0?"end":"start",y=x>0?"start":"end",v=u>=0?1:-1,b=v*i,E=v>0?"end":"start",N=v>0?"start":"end";if(a==="top"){var j={x:l+u/2,y:c-x*i,textAnchor:"middle",verticalAnchor:p};return vn(vn({},j),n?{height:Math.max(c-n.y,0),width:u}:{})}if(a==="bottom"){var A={x:l+u/2,y:c+f+m,textAnchor:"middle",verticalAnchor:y};return vn(vn({},A),n?{height:Math.max(n.y+n.height-(c+f),0),width:u}:{})}if(a==="left"){var w={x:l-b,y:c+f/2,textAnchor:E,verticalAnchor:"middle"};return vn(vn({},w),n?{width:Math.max(w.x-n.x,0),height:f}:{})}if(a==="right"){var S={x:l+u+b,y:c+f/2,textAnchor:N,verticalAnchor:"middle"};return vn(vn({},S),n?{width:Math.max(n.x+n.width-S.x,0),height:f}:{})}var B=n?{width:u,height:f}:{};return a==="insideLeft"?vn({x:l+b,y:c+f/2,textAnchor:N,verticalAnchor:"middle"},B):a==="insideRight"?vn({x:l+u-b,y:c+f/2,textAnchor:E,verticalAnchor:"middle"},B):a==="insideTop"?vn({x:l+u/2,y:c+m,textAnchor:"middle",verticalAnchor:y},B):a==="insideBottom"?vn({x:l+u/2,y:c+f-m,textAnchor:"middle",verticalAnchor:p},B):a==="insideTopLeft"?vn({x:l+b,y:c+m,textAnchor:N,verticalAnchor:y},B):a==="insideTopRight"?vn({x:l+u-b,y:c+m,textAnchor:E,verticalAnchor:y},B):a==="insideBottomLeft"?vn({x:l+b,y:c+f-m,textAnchor:N,verticalAnchor:p},B):a==="insideBottomRight"?vn({x:l+u-b,y:c+f-m,textAnchor:E,verticalAnchor:p},B):y0(a)&&(qe(a.x)||mc(a.x))&&(qe(a.y)||mc(a.y))?vn({x:l+Xc(a.x,u),y:c+Xc(a.y,f),textAnchor:"end",verticalAnchor:"end"},B):vn({x:l+u/2,y:c+f/2,textAnchor:"middle",verticalAnchor:"middle"},B)},ege=function(t){return"cx"in t&&qe(t.cx)};function rs(e){var t=e.offset,r=t===void 0?5:t,n=qpe(e,_pe),i=vn({offset:r},n),a=i.viewBox,o=i.position,l=i.value,c=i.children,u=i.content,f=i.className,x=f===void 0?"":f,m=i.textBreakAll;if(!a||nr(l)&&nr(c)&&!C.isValidElement(u)&&!$t(u))return null;if(C.isValidElement(u))return C.cloneElement(u,i);var p;if($t(u)){if(p=C.createElement(u,i),C.isValidElement(p))return p}else p=Xpe(i);var y=ege(a),v=Xt(i,!0);if(y&&(o==="insideStart"||o==="insideEnd"||o==="end"))return Qpe(i,p,v);var b=y?Zpe(i):Jpe(i);return ie.createElement(Qg,Gf({className:or("recharts-label",x)},v,b,{breakAll:m}),p)}rs.displayName="Label";var xq=function(t){var r=t.cx,n=t.cy,i=t.angle,a=t.startAngle,o=t.endAngle,l=t.r,c=t.radius,u=t.innerRadius,f=t.outerRadius,x=t.x,m=t.y,p=t.top,y=t.left,v=t.width,b=t.height,E=t.clockWise,N=t.labelViewBox;if(N)return N;if(qe(v)&&qe(b)){if(qe(x)&&qe(m))return{x,y:m,width:v,height:b};if(qe(p)&&qe(y))return{x:p,y,width:v,height:b}}return qe(x)&&qe(m)?{x,y:m,width:0,height:0}:qe(r)&&qe(n)?{cx:r,cy:n,startAngle:a||i||0,endAngle:o||i||0,innerRadius:u||0,outerRadius:f||c||l||0,clockWise:E}:t.viewBox?t.viewBox:{}},tge=function(t,r){return t?t===!0?ie.createElement(rs,{key:"label-implicit",viewBox:r}):En(t)?ie.createElement(rs,{key:"label-implicit",viewBox:r,value:t}):C.isValidElement(t)?t.type===rs?C.cloneElement(t,{key:"label-implicit",viewBox:r}):ie.createElement(rs,{key:"label-implicit",content:t,viewBox:r}):$t(t)?ie.createElement(rs,{key:"label-implicit",content:t,viewBox:r}):y0(t)?ie.createElement(rs,Gf({viewBox:r},t,{key:"label-implicit"})):null:null},rge=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var i=t.children,a=xq(t),o=Qi(i,rs).map(function(c,u){return C.cloneElement(c,{viewBox:r||a,key:"label-".concat(u)})});if(!n)return o;var l=tge(t.label,r||a);return[l].concat(Ipe(o))};rs.parseViewBox=xq;rs.renderCallByParent=rge;var I8,GT;function nge(){if(GT)return I8;GT=1;function e(t){var r=t==null?0:t.length;
126return r?t[r-1]:void 0}return I8=e,I8}var sge=nge();const ige=lr(sge);function Kf(e){"@babel/helpers - typeof";return Kf=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},Kf(e)}var age=["valueAccessor"],oge=["data","dataKey","clockWise","id","textBreakAll"];function lge(e){return xge(e)||dge(e)||uge(e)||cge()}function cge(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
127In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uge(e,t){if(e){if(typeof e=="string")return g6(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 g6(e,t)}}function dge(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function xge(e){if(Array.isArray(e))return g6(e)}function g6(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 f1(){return f1=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},f1.apply(this,arguments)}function KT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function XT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?KT(Object(r),!0).forEach(function(n){fge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):KT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fge(e,t,r){return t=hge(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hge(e){var t=mge(e,"string");return Kf(t)=="symbol"?t:t+""}function mge(e,t){if(Kf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Kf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function YT(e,t){if(e==null)return{};var r=pge(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function pge(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 gge=function(t){return Array.isArray(t.value)?ige(t.value):t.value};function bl(e){var t=e.valueAccessor,r=t===void 0?gge:t,n=YT(e,age),i=n.data,a=n.dataKey,o=n.clockWise,l=n.id,c=n.textBreakAll,u=YT(n,oge);return!i||!i.length?null:ie.createElement(qr,{className:"recharts-label-list"},i.map(function(f,x){var m=nr(a)?r(f,x):Qs(f&&f.payload,a),p=nr(l)?{}:{id:"".concat(l,"-").concat(x)};return ie.createElement(rs,f1({},Xt(f,!0),u,p,{parentViewBox:f.parentViewBox,value:m,textBreakAll:c,viewBox:rs.parseViewBox(nr(o)?f:XT(XT({},f),{},{clockWise:o})),key:"label-".concat(x),index:x}))}))}bl.displayName="LabelList";function yge(e,t){return e?e===!0?ie.createElement(bl,{key:"labelList-implicit",data:t}):ie.isValidElement(e)||$t(e)?ie.createElement(bl,{key:"labelList-implicit",data:t,content:e}):y0(e)?ie.createElement(bl,f1({data:t},e,{key:"labelList-implicit"})):null:null}function vge(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=Qi(n,bl).map(function(o,l){return C.cloneElement(o,{data:t,key:"labelList-".concat(l)})});if(!r)return i;var a=yge(e.label,t);return[a].concat(lge(i))}bl.renderCallByParent=vge;function Xf(e){"@babel/helpers - typeof";return Xf=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},Xf(e)}function y6(){return y6=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
127for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},y6.apply(this,arguments)}function QT(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 ZT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?QT(Object(r),!0).forEach(function(n){bge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):QT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bge(e,t,r){return t=Cge(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Cge(e){var t=wge(e,"string");return Xf(t)=="symbol"?t:t+""}function wge(e,t){if(Xf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Xf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ege=function(t,r){var n=Xi(r-t),i=Math.min(Math.abs(r-t),359.999);return n*i},jp=function(t){var r=t.cx,n=t.cy,i=t.radius,a=t.angle,o=t.sign,l=t.isExternal,c=t.cornerRadius,u=t.cornerIsExternal,f=c*(l?1:-1)+i,x=Math.asin(c/f)/x1,m=u?a:a+o*x,p=Wn(r,n,f,m),y=Wn(r,n,i,m),v=u?a-o*x:a,b=Wn(r,n,f*Math.cos(x*x1),v);return{center:p,circleTangency:y,lineTangency:b,theta:x}},fq=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.startAngle,l=t.endAngle,c=Ege(o,l),u=o+c,f=Wn(r,n,a,o),x=Wn(r,n,a,u),m="M ".concat(f.x,",").concat(f.y,`
128    A `).concat(a,",").concat(a,`,0,
129    `).concat(+(Math.abs(c)>180),",").concat(+(o>u),`,
130    `).concat(x.x,",").concat(x.y,`
131  `);if(i>0){var p=Wn(r,n,i,o),y=Wn(r,n,i,u);m+="L ".concat(y.x,",").concat(y.y,`
132            A `).concat(i,",").concat(i,`,0,
133            `).concat(+(Math.abs(c)>180),",").concat(+(o<=u),`,
134            `).concat(p.x,",").concat(p.y," Z")}else m+="L ".concat(r,",").concat(n," Z");return m},jge=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,l=t.forceCornerRadius,c=t.cornerIsExternal,u=t.startAngle,f=t.endAngle,x=Xi(f-u),m=jp({cx:r,cy:n,radius:a,angle:u,sign:x,cornerRadius:o,cornerIsExternal:c}),p=m.circleTangency,y=m.lineTangency,v=m.theta,b=jp({cx:r,cy:n,radius:a,angle:f,sign:-x,cornerRadius:o,cornerIsExternal:c}),E=b.circleTangency,N=b.lineTangency,j=b.theta,A=c?Math.abs(u-f):Math.abs(u-f)-v-j;if(A<0)return l?"M ".concat(y.x,",").concat(y.y,`
135        a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0
136        a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0
137      `):fq({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:u,endAngle:f});var w="M ".concat(y.x,",").concat(y.y,`
138    A`).concat(o,",").concat(o,",0,0,").concat(+(x<0),",").concat(p.x,",").concat(p.y,`
139    A`).concat(a,",").concat(a,",0,").concat(+(A>180),",").concat(+(x<0),",").concat(E.x,",").concat(E.y,`
140    A`).concat(o,",").concat(o,",0,0,").concat(+(x<0),",").concat(N.x,",").concat(N.y,`
141  `);if(i>0){var S=jp({cx:r,cy:n,radius:i,angle:u,sign:x,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),B=S.circleTangency,D=S.lineTangency,P=S.theta,O=jp({cx:r,cy:n,radius:i,angle:f,sign:-x,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),M=O.circleTangency,I=O.lineTangency,V=O.theta,W=c?Math.abs(u-f):Math.abs(u-f)-P-V;if(W<0&&o===0)return"".concat(w,"L").concat(r,",").concat(n,"Z");w+="L".concat(I.x,",").concat(I.y,`
142      A`).concat(o,",").concat(o,",0,0,").concat(+(x<0),",").concat(M.x,",").concat(M.y,`
143      A`).concat(i,",").concat(i,",0,").concat(+(W>180),",").concat(+(x>0),",").concat(B.x,",").concat(B.y,`
144      A`).concat(o,",").concat(o,",0,0,").concat(+(x<0),",").concat(D.x,",").concat(D.y,"Z")}else w+="L".concat(r,",").concat(n,"Z");return w},Nge={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},hq=function(t){var r=ZT(ZT({},Nge),t),n=r.cx,i=r.cy,a=r.innerRadius,o=r.outerRadius,l=r.cornerRadius,c=r.forceCornerRadius,u=r.cornerIsExternal,f=r.startAngle,x=r.endAngle,m=r.className;if(o<a||f===x)return null;var p=or("recharts-sector",m),y=o-a,v=Xc(l,y,0,!0),b;return v>0&&Math.abs(f-x)<360?b=jge({cx:n,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(v,y/2),forceCornerRadius:c,cornerIsExternal:u,startAngle:f,endAngle:x}):b=fq({cx:n,cy:i,innerRadius:a,outerRadius:o,startAngle:f,endAngle:x}),ie.createElement("path",y6({},Xt(r,!0),{className:p,d:b,role:"img"}))};function Yf(e){"@babel/helpers - typeof";return Yf=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},Yf(e)}function v6(){return v6=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
144for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},v6.apply(this,arguments)}function JT(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 eM(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?JT(Object(r),!0).forEach(function(n){Age(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):JT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Age(e,t,r){return t=kge(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kge(e){var t=Sge(e,"string");return Yf(t)=="symbol"?t:t+""}function Sge(e,t){if(Yf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Yf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var tM={curveBasisClosed:Gce,curveBasisOpen:Kce,curveBasis:Hce,curveBumpX:Pce,curveBumpY:Tce,curveLinearClosed:Xce,curveLinear:jy,curveMonotoneX:Yce,curveMonotoneY:Qce,curveNatural:Zce,curveStep:Jce,curveStepAfter:tue,curveStepBefore:eue},Np=function(t){return t.x===+t.x&&t.y===+t.y},jx=function(t){return t.x},Nx=function(t){return t.y},Bge=function(t,r){if($t(t))return t;var n="curve".concat(wy(t));return(n==="curveMonotone"||n==="curveBump")&&r?tM["".concat(n).concat(r==="vertical"?"Y":"X")]:tM[n]||jy},Dge=function(t){var r=t.type,n=r===void 0?"linear":r,i=t.points,a=i===void 0?[]:i,o=t.baseLine,l=t.layout,c=t.connectNulls,u=c===void 0?!1:c,f=Bge(n,l),x=u?a.filter(function(v){return Np(v)}):a,m;if(Array.isArray(o)){var p=u?o.filter(function(v){return Np(v)}):o,y=x.map(function(v,b){return eM(eM({},v),{},{base:p[b]})});return l==="vertical"?m=pp().y(Nx).x1(jx).x0(function(v){return v.base.x}):m=pp().x(jx).y1(Nx).y0(function(v){return v.base.y}),m.defined(Np).curve(f),m(y)}return l==="vertical"&&qe(o)?m=pp().y(Nx).x1(jx).x0(o):qe(o)?m=pp().x(jx).y1(Nx).y0(o):m=yV().x(jx).y(Nx),m.defined(Np).curve(f),m(x)}
144,rf=function(t){var r=t.className,n=t.points,i=t.path,a=t.pathRef;if((!n||!n.length)&&!i)return null;var o=n&&n.length?Dge(t):i;return ie.createElement("path",v6({},Xt(t,!1),Ig(t),{className:or("recharts-curve",r),d:o,ref:a}))},Fge=Object.getOwnPropertyNames,Pge=Object.getOwnPropertySymbols,Tge=Object.prototype.hasOwnProperty;function rM(e,t){return function(n,i,a){return e(n,i,a)&&t(n,i,a)}}function Ap(e){return function(r,n,i){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,i);var a=i.cache,o=a.get(r),l=a.get(n);if(o&&l)return o===n&&l===r;a.set(r,n),a.set(n,r);var c=e(r,n,i);return a.delete(r),a.delete(n),c}}function nM(e){return Fge(e).concat(Pge(e))}var Mge=Object.hasOwn||function(e,t){return Tge.call(e,t)};function cu(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var Oge="__v",Lge="__o",Rge="_owner",sM=Object.getOwnPropertyDescriptor,iM=Object.keys;function _ge(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 Ige(e,t){return cu(e.getTime(),t.getTime())}function $ge(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function zge(e,t){return e===t}function aM(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var i=new Array(n),a=e.entries(),o,l,c=0;(o=a.next())&&!o.done;){for(var u=t.entries(),f=!1,x=0;(l=u.next())&&!l.done;){if(i[x]){x++;continue}var m=o.value,p=l.value;if(r.equals(m[0],p[0],c,x,e,t,r)&&r.equals(m[1],p[1],m[0],p[0],e,t,r)){f=i[x]=!0;break}x++}if(!f)return!1;c++}return!0}var Vge=cu;function Uge(e,t,r){var n=iM(e),i=n.length;if(iM(t).length!==i)return!1;for(;i-- >0;)if(!mq(e,t,r,n[i]))return!1;return!0}function Ax(e,t,r){var n=nM(e),i=n.length;if(nM(t).length!==i)return!1;for(var a,o,l;i-- >0;)if(a=n[i],!mq(e,t,r,a)||(o=sM(e,a),l=sM(t,a),(o||l)&&(!o||!l||o.configurable!==l.configurable||o.enumerable!==l.enumerable||o.writable!==l.writable)))return!1;return!0}function qge(e,t){return cu(e.valueOf(),t.valueOf())}function Wge(e,t){return e.source===t.source&&e.flags===t.flags}function oM(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var i=new Array(n),a=e.values(),o,l;(o=a.next())&&!o.done;){for(var c=t.values(),u=!1,f=0;(l=c.next())&&!l.done;){if(!i[f]&&r.equals(o.value,l.value,o.value,l.value,e,t,r)){u=i[f]=!0;break}f++}if(!u)return!1}return!0}function Hge(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 Gge(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 mq(e,t,r,n){return(n===Rge||n===Lge||n===Oge)&&(e.$$typeof||t.$$typeof)?!0:Mge(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var Kge="[object Arguments]",Xge="[object Boolean]",Yge="[object Date]",Qge="[object Error]",Zge="[object Map]",Jge="[object Number]",e1e="[object Object]",t1e="[object RegExp]",r1e="[object Set]",n1e="[object String]",s1e="[object URL]",i1e=Array.isArray,lM=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,cM=Object.assign,a1e=Object.prototype.toString.call.bind(Object.prototype.toString);function o1e(e){var t=e.areArraysEqual,r=e.areDatesEqual,n=e.areErrorsEqual,i=e.areFunctionsEqual,a=e.areMapsEqual,o=e.areNumbersEqual,l=e.areObjectsEqual,c=e.arePrimitiveWrappersEqual,u=e.areRegExpsEqual,f=e.areSetsEqual,x=e.areTypedArraysEqual,m=e.areUrlsEqual;return function(y,v,b){if(y===v)return!0;if(y==null||v==null)return!1;var E=typeof y;if(E!==typeof v)return!1;if(E!=="object")return E==="number"?o(y,v,b):E==="function"?i(y,v,b):!1;var N=y.constructor;if(N!==v.constructor)return!1;if(N===Object)return l(y,v,b);if(i1e(y))return t(y,v,b);if(lM!=null&&lM(y))return x(y,v,b);if(N===Date)return r(y,v,b);if(N===RegExp)return u(y,v,b);if(N===Map)return a(y,v,b);if(N===Set)return f(y,v,b);var j=a1e(y);return j===Yge?r(y,v,b):j===t1e?u(y,v,b):j===Zge?a(y,v,b):j===r1e?f(y,v,b):j===e1e?typeof y.then!="function"&&typeof v.then!="function"&&l(y,v,b):j===s1e?m(y,v,b):j===Qge?n(y,v,b):j===Kge?l(y,v,b):j===Xge||j===Jge||j===n1e?c(y,v,b):!1}}
144function l1e(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,i={areArraysEqual:n?Ax:_ge,areDatesEqual:Ige,areErrorsEqual:$ge,areFunctionsEqual:zge,areMapsEqual:n?rM(aM,Ax):aM,areNumbersEqual:Vge,areObjectsEqual:n?Ax:Uge,arePrimitiveWrappersEqual:qge,areRegExpsEqual:Wge,areSetsEqual:n?rM(oM,Ax):oM,areTypedArraysEqual:n?Ax:Hge,areUrlsEqual:Gge};if(r&&(i=cM({},i,r(i))),t){var a=Ap(i.areArraysEqual),o=Ap(i.areMapsEqual),l=Ap(i.areObjectsEqual),c=Ap(i.areSetsEqual);i=cM({},i,{areArraysEqual:a,areMapsEqual:o,areObjectsEqual:l,areSetsEqual:c})}return i}function c1e(e){return function(t,r,n,i,a,o,l){return e(t,r,l)}}function u1e(e){var t=e.circular,r=e.comparator,n=e.createState,i=e.equals,a=e.strict;if(n)return function(c,u){var f=n(),x=f.cache,m=x===void 0?t?new WeakMap:void 0:x,p=f.meta;return r(c,u,{cache:m,equals:i,meta:p,strict:a})};if(t)return function(c,u){return r(c,u,{cache:new WeakMap,equals:i,meta:void 0,strict:a})};var o={cache:void 0,equals:i,meta:void 0,strict:a};return function(c,u){return r(c,u,o)}}var d1e=Il();Il({strict:!0});Il({circular:!0});Il({circular:!0,strict:!0});Il({createInternalComparator:function(){return cu}});Il({strict:!0,createInternalComparator:function(){return cu}});Il({circular:!0,createInternalComparator:function(){return cu}});Il({circular:!0,createInternalComparator:function(){return cu},strict:!0});function Il(e){e===void 0&&(e={});var t=e.circular,r=t===void 0?!1:t,n=e.createInternalComparator,i=e.createState,a=e.strict,o=a===void 0?!1:a,l=l1e(e),c=o1e(l),u=n?n(c):c1e(c);return u1e({circular:r,comparator:c,createState:i,equals:u,strict:o})}function x1e(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function uM(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function i(a){r<0&&(r=a),a-r>t?(e(a),r=-1):x1e(i)};requestAnimationFrame(n)}function b6(e){"@babel/helpers - typeof";return b6=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},b6(e)}function f1e(e){return g1e(e)||p1e(e)||m1e(e)||h1e()}function h1e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
145In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m1e(e,t){if(e){if(typeof e=="string")return dM(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 dM(e,t)}}function dM(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 p1e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function g1e(e){if(Array.isArray(e))return e}function y1e(){var e={},t=function(){return null},r=!1,n=function i(a){if(!r){if(Array.isArray(a)){if(!a.length)return;var o=a,l=f1e(o),c=l[0],u=l.slice(1);if(typeof c=="number"){uM(i.bind(null,u),c);return}i(c),uM(i.bind(null,u));return}b6(a)==="object"&&(e=a,t(e)),typeof a=="function"&&a()}};return{stop:function(){r=!0},start:function(a){r=!1,n(a)},subscribe:function(a){return t=a,function(){t=function(){return null}}}}}function Qf(e){"@babel/helpers - typeof";return Qf=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},Qf(e)}function xM(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 fM(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xM(Object(r),!0).forEach(function(n){pq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pq(e,t,r){return t=v1e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v1e(e){var t=b1e(e,"string");return Qf(t)==="symbol"?t:String(t)}function b1e(e,t){if(Qf(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Qf(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var C1e=function(t,r){return[Object.keys(t),Object.keys(r)].reduce(function(n,i){return n.filter(function(a){return i.includes(a)})})},w1e=function(t){return t},E1e=function(t){return t.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},nf=function(t,r){return Object.keys(r).reduce(function(n,i){return fM(fM({},n),{},pq({},i,t(i,r[i])))},{})},hM=function(t,r,n){return t.map(function(i){return"".concat(E1e(i)," ").concat(r,"ms ").concat(n)}).join(",")};function j1e(e,t){return k1e(e)||A1e(e,t)||gq(e,t)||N1e()}
145function N1e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
146In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function A1e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function k1e(e){if(Array.isArray(e))return e}function S1e(e){return F1e(e)||D1e(e)||gq(e)||B1e()}function B1e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
147In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gq(e,t){if(e){if(typeof e=="string")return C6(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 C6(e,t)}}function D1e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function F1e(e){if(Array.isArray(e))return C6(e)}function C6(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 h1=1e-4,yq=function(t,r){return[0,3*t,3*r-6*t,3*t-3*r+1]},vq=function(t,r){return t.map(function(n,i){return n*Math.pow(r,i)}).reduce(function(n,i){return n+i})},mM=function(t,r){return function(n){var i=yq(t,r);return vq(i,n)}},P1e=function(t,r){return function(n){var i=yq(t,r),a=[].concat(S1e(i.map(function(o,l){return o*l}).slice(1)),[0]);return vq(a,n)}},pM=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r[0],a=r[1],o=r[2],l=r[3];if(r.length===1)switch(r[0]){case"linear":i=0,a=0,o=1,l=1;break;case"ease":i=.25,a=.1,o=.25,l=1;break;case"ease-in":i=.42,a=0,o=1,l=1;break;case"ease-out":i=.42,a=0,o=.58,l=1;break;case"ease-in-out":i=0,a=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 u=c[1].split(")")[0].split(",").map(function(b){return parseFloat(b)}),f=j1e(u,4);i=f[0],a=f[1],o=f[2],l=f[3]}}}var x=mM(i,o),m=mM(a,l),p=P1e(i,o),y=function(E){return E>1?1:E<0?0:E},v=function(E){for(var N=E>1?1:E,j=N,A=0;A<8;++A){var w=x(j)-N,S=p(j);if(Math.abs(w-N)<h1||S<h1)return m(j);j=y(j-w/S)}return m(j)};return v.isStepper=!1,v},T1e=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,i=t.damping,a=i===void 0?8:i,o=t.dt,l=o===void 0?17:o,c=function(f,x,m){var p=-(f-x)*n,y=m*a,v=m+(p-y)*l/1e3,b=m*l/1e3+f;return Math.abs(b-x)<h1&&Math.abs(v)<h1?[x,0]:[b,v]};return c.isStepper=!0,c.dt=l,c},M1e=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 pM(i);case"spring":return T1e();default:if(i.split("(")[0]==="cubic-bezier")return pM(i)}return typeof i=="function"?i:null};function Zf(e){"@babel/helpers - typeof";return Zf=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},Zf(e)}function gM(e){return R1e(e)||L1e(e)||bq(e)||O1e()}function O1e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
148In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function L1e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function R1e(e){if(Array.isArray(e))return E6(e)}function yM(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 zn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
148t%2?yM(Object(r),!0).forEach(function(n){w6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function w6(e,t,r){return t=_1e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _1e(e){var t=I1e(e,"string");return Zf(t)==="symbol"?t:String(t)}function I1e(e,t){if(Zf(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Zf(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $1e(e,t){return U1e(e)||V1e(e,t)||bq(e,t)||z1e()}function z1e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
149In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bq(e,t){if(e){if(typeof e=="string")return E6(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 E6(e,t)}}function E6(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 V1e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function U1e(e){if(Array.isArray(e))return e}var m1=function(t,r,n){return t+(r-t)*n},j6=function(t){var r=t.from,n=t.to;return r!==n},q1e=function e(t,r,n){var i=nf(function(a,o){if(j6(o)){var l=t(o.from,o.to,o.velocity),c=$1e(l,2),u=c[0],f=c[1];return zn(zn({},o),{},{from:u,velocity:f})}return o},r);return n<1?nf(function(a,o){return j6(o)?zn(zn({},o),{},{velocity:m1(o.velocity,i[a].velocity,n),from:m1(o.from,i[a].from,n)}):o},r):e(t,i,n-1)};const W1e=function(e,t,r,n,i){var a=C1e(e,t),o=a.reduce(function(b,E){return zn(zn({},b),{},w6({},E,[e[E],t[E]]))},{}),l=a.reduce(function(b,E){return zn(zn({},b),{},w6({},E,{from:e[E],velocity:0,to:t[E]}))},{}),c=-1,u,f,x=function(){return null},m=function(){return nf(function(E,N){return N.from},l)},p=function(){return!Object.values(l).filter(j6).length},y=function(E){u||(u=E);var N=E-u,j=N/r.dt;l=q1e(r,l,j),i(zn(zn(zn({},e),t),m())),u=E,p()||(c=requestAnimationFrame(x))},v=function(E){f||(f=E);var N=(E-f)/n,j=nf(function(w,S){return m1.apply(void 0,gM(S).concat([r(N)]))},o);if(i(zn(zn(zn({},e),t),j)),N<1)c=requestAnimationFrame(x);else{var A=nf(function(w,S){return m1.apply(void 0,gM(S).concat([r(1)]))},o);i(zn(zn(zn({},e),t),A))}};return x=r.isStepper?y:v,function(){return requestAnimationFrame(x),function(){cancelAnimationFrame(c)}}};function Vd(e){"@babel/helpers - typeof";return Vd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vd(e)}var H1e=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function G1e(e,t){if(e==null)return{};var r=K1e(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function K1e(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function $8(e){return Z1e(e)||Q1e(e)||Y1e(e)||X1e()}function X1e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
150In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Y1e(e,t){if(e){if(typeof e=="string")return N6(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 N6(e,t)}}function Q1e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Z1e(e){if(Array.isArray(e))return N6(e)}function N6(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 vM(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 _i(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
150t%2?vM(Object(r),!0).forEach(function(n){$x(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $x(e,t,r){return t=Cq(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function J1e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eye(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,Cq(n.key),n)}}function tye(e,t,r){return t&&eye(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Cq(e){var t=rye(e,"string");return Vd(t)==="symbol"?t:String(t)}function rye(e,t){if(Vd(e)!=="object"||e===null)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(t==="string"?String:Number)(e)}function nye(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&&A6(e,t)}function A6(e,t){return A6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},A6(e,t)}function sye(e){var t=iye();return function(){var n=p1(e),i;if(t){var a=p1(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return k6(this,i)}}function k6(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 S6(e)}function S6(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function iye(){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 p1(e){return p1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},p1(e)}var Eo=function(e){nye(r,e);var t=sye(r);function r(n,i){var a;J1e(this,r),a=t.call(this,n,i);var o=a.props,l=o.isActive,c=o.attributeName,u=o.from,f=o.to,x=o.steps,m=o.children,p=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(S6(a)),a.changeStyle=a.changeStyle.bind(S6(a)),!l||p<=0)return a.state={style:{}},typeof m=="function"&&(a.state={style:f}),k6(a);if(x&&x.length)a.state={style:x[0].style};else if(u){if(typeof m=="function")return a.state={style:u},k6(a);a.state={style:c?$x({},c,u):u}}else a.state={style:{}};return a}
150return tye(r,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,o=i.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,o=a.isActive,l=a.canBegin,c=a.attributeName,u=a.shouldReAnimate,f=a.to,x=a.from,m=this.state.style;if(l){if(!o){var p={style:c?$x({},c,f):f};this.state&&m&&(c&&m[c]!==f||!c&&m!==f)&&this.setState(p);return}if(!(d1e(i.to,f)&&i.canBegin&&i.isActive)){var y=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var v=y||u?x:i.to;if(this.state&&m){var b={style:c?$x({},c,v):v};(c&&m[c]!==v||!c&&m!==v)&&this.setState(b)}this.runAnimation(_i(_i({},this.props),{},{from:v,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var a=this,o=i.from,l=i.to,c=i.duration,u=i.easing,f=i.begin,x=i.onAnimationEnd,m=i.onAnimationStart,p=W1e(o,l,M1e(u),c,this.changeStyle),y=function(){a.stopJSAnimation=p()};this.manager.start([m,f,y,c,x])}},{key:"runStepAnimation",value:function(i){var a=this,o=i.steps,l=i.begin,c=i.onAnimationStart,u=o[0],f=u.style,x=u.duration,m=x===void 0?0:x,p=function(v,b,E){if(E===0)return v;var N=b.duration,j=b.easing,A=j===void 0?"ease":j,w=b.style,S=b.properties,B=b.onAnimationEnd,D=E>0?o[E-1]:b,P=S||Object.keys(w);if(typeof A=="function"||A==="spring")return[].concat($8(v),[a.runJSAnimation.bind(a,{from:D.style,to:w,duration:N,easing:A}),N]);var O=hM(P,N,A),M=_i(_i(_i({},D.style),w),{},{transition:O});return[].concat($8(v),[M,N,B]).filter(w1e)};return this.manager.start([c].concat($8(o.reduce(p,[f,Math.max(m,l)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=y1e());var a=i.begin,o=i.duration,l=i.attributeName,c=i.to,u=i.easing,f=i.onAnimationStart,x=i.onAnimationEnd,m=i.steps,p=i.children,y=this.manager;if(this.unSubscribe=y.subscribe(this.handleStyleChange),typeof u=="function"||typeof p=="function"||u==="spring"){this.runJSAnimation(i);return}if(m.length>1){this.runStepAnimation(i);return}var v=l?$x({},l,c):c,b=hM(Object.keys(v),o,u);y.start([f,a,_i(_i({},v),{},{transition:b}),o,x])}},{key:"render",value:function(){var i=this.props,a=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=G1e(i,H1e),u=C.Children.count(a),f=this.state.style;if(typeof a=="function")return a(f);if(!l||u===0||o<=0)return a;var x=function(p){var y=p.props,v=y.style,b=v===void 0?{}:v,E=y.className,N=C.cloneElement(p,_i(_i({},c),{},{style:_i(_i({},b),f),className:E}));return N};return u===1?x(C.Children.only(a)):ie.createElement("div",null,C.Children.map(a,function(m){return x(m)}))}}]),r}(C.PureComponent);Eo.displayName="Animate";Eo.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Eo.propTypes={from:Fe.oneOfType([Fe.object,Fe.string]),to:Fe.oneOfType([Fe.object,Fe.string]),attributeName:Fe.string,duration:Fe.number,begin:Fe.number,easing:Fe.oneOfType([Fe.string,Fe.func]),steps:Fe.arrayOf(Fe.shape({duration:Fe.number.isRequired,style:Fe.object.isRequired,easing:Fe.oneOfType([Fe.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Fe.func]),properties:Fe.arrayOf("string"),onAnimationEnd:Fe.func})),children:Fe.oneOfType([Fe.node,Fe.func]),isActive:Fe.bool,canBegin:Fe.bool,onAnimationEnd:Fe.func,shouldReAnimate:Fe.bool,onAnimationStart:Fe.func,onAnimationReStart:Fe.func};function Jf(e){"@babel/helpers - typeof";return Jf=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},Jf(e)}function g1(){return g1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
150for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},g1.apply(this,arguments)}function aye(e,t){return uye(e)||cye(e,t)||lye(e,t)||oye()}function oye(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
151In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lye(e,t){if(e){if(typeof e=="string")return bM(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 bM(e,t)}}function bM(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 cye(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function uye(e){if(Array.isArray(e))return e}function CM(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 wM(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?CM(Object(r),!0).forEach(function(n){dye(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):CM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dye(e,t,r){return t=xye(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xye(e){var t=fye(e,"string");return Jf(t)=="symbol"?t:t+""}function fye(e,t){if(Jf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Jf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var EM=function(t,r,n,i,a){var o=Math.min(Math.abs(n)/2,Math.abs(i)/2),l=i>=0?1:-1,c=n>=0?1:-1,u=i>=0&&n>=0||i<0&&n<0?1:0,f;if(o>0&&a instanceof Array){for(var x=[0,0,0,0],m=0,p=4;m<p;m++)x[m]=a[m]>o?o:a[m];f="M".concat(t,",").concat(r+l*x[0]),x[0]>0&&(f+="A ".concat(x[0],",").concat(x[0],",0,0,").concat(u,",").concat(t+c*x[0],",").concat(r)),f+="L ".concat(t+n-c*x[1],",").concat(r),x[1]>0&&(f+="A ".concat(x[1],",").concat(x[1],",0,0,").concat(u,`,
152        `).concat(t+n,",").concat(r+l*x[1])),f+="L ".concat(t+n,",").concat(r+i-l*x[2]),x[2]>0&&(f+="A ".concat(x[2],",").concat(x[2],",0,0,").concat(u,`,
153        `).concat(t+n-c*x[2],",").concat(r+i)),f+="L ".concat(t+c*x[3],",").concat(r+i),x[3]>0&&(f+="A ".concat(x[3],",").concat(x[3],",0,0,").concat(u,`,
154        `).concat(t,",").concat(r+i-l*x[3])),f+="Z"}else if(o>0&&a===+a&&a>0){var y=Math.min(o,a);f="M ".concat(t,",").concat(r+l*y,`
155            A `).concat(y,",").concat(y,",0,0,").concat(u,",").concat(t+c*y,",").concat(r,`
156            L `).concat(t+n-c*y,",").concat(r,`
157            A `).concat(y,",").concat(y,",0,0,").concat(u,",").concat(t+n,",").concat(r+l*y,`
158            L `).concat(t+n,",").concat(r+i-l*y,`
159            A `).concat(y,",").concat(y,",0,0,").concat(u,",").concat(t+n-c*y,",").concat(r+i,`
160            L `).concat(t+c*y,",").concat(r+i,`
161            A `).concat(y,",").concat(y,",0,0,").concat(u,",").concat(t,",").concat(r+i-l*y," Z")}else f="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return f},hye=function(t,r){if(!t||!r)return!1;var n=t.x,i=t.y,a=r.x,o=r.y,l=r.width,c=r.height;if(Math.abs(l)>0&&Math.abs(c)>0){var u=Math.min(a,a+l),f=Math.max(a,a+l),x=Math.min(o,o+c),m=Math.max(o,o+c);return n>=u&&n<=f&&i>=x&&i<=m}return!1},mye={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},RE=function(t){var r=wM(wM({},mye),t),n=C.useRef(),i=C.useState(-1),a=aye(i,2),o=a[0],l=a[1];C.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var A=n.current.getTotalLength();A&&l(A)}catch{}},[]);var c=r.x,u=r.y,f=r.width,x=r.height,m=r.radius,p=r.className,y=r.animationEasing,v=r.animationDuration,b=r.animationBegin,E=r.isAnimationActive,N=r.isUpdateAnimationActive;if(c!==+c||u!==+u||f!==+f||x!==+x||f===0||x===0)return null;var j=or("recharts-rectangle",p);return N?ie.createElement(Eo,{canBegin:o>0,from:{width:f,height:x,x:c,y:u},to:{width:f,height:x,x:c,y:u},duration:v,animationEasing:y,isActive:N},function(A){var w=A.width,S=A.height,B=A.x,D=A.y;return ie.createElement(Eo,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:v,isActive:E,easing:y},ie.createElement("path",g1({},Xt(r,!0),{className:j,d:EM(B,D,w,S,m),ref:n})))}):ie.createElement("path",g1({},Xt(r,!0),{className:j,d:EM(c,u,f,x,m)}))};function B6(){return B6=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
161for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},B6.apply(this,arguments)}var _E=function(t){var r=t.cx,n=t.cy,i=t.r,a=t.className,o=or("recharts-dot",a);return r===+r&&n===+n&&i===+i?ie.createElement("circle",B6({},Xt(t,!1),Ig(t),{className:o,cx:r,cy:n,r:i})):null};function eh(e){"@babel/helpers - typeof";return eh=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},eh(e)}var pye=["x","y","top","left","width","height","className"];function D6(){return D6=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},D6.apply(this,arguments)}function jM(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 gye(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jM(Object(r),!0).forEach(function(n){yye(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yye(e,t,r){return t=vye(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vye(e){var t=bye(e,"string");return eh(t)=="symbol"?t:t+""}function bye(e,t){if(eh(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(eh(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Cye(e,t){if(e==null)return{};var r=wye(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function wye(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 Eye=function(t,r,n,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(r,"h").concat(n)},jye=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.top,l=o===void 0?0:o,c=t.left,u=c===void 0?0:c,f=t.width,x=f===void 0?0:f,m=t.height,p=m===void 0?0:m,y=t.className,v=Cye(t,pye),b=gye({x:n,y:a,top:l,left:u,width:x,height:p},v);return!qe(n)||!qe(a)||!qe(x)||!qe(p)||!qe(l)||!qe(u)?null:ie.createElement("path",D6({},Xt(b,!0),{className:or("recharts-cross",y),d:Eye(n,a,x,p,l,u)}))},z8,NM;function Nye(){if(NM)return z8;NM=1;var e=zV(),t=e(Object.getPrototypeOf,Object);return z8=t,z8}var V8,AM;function Aye(){if(AM)return V8;AM=1;var e=ko(),t=Nye(),r=So(),n="[object Object]",i=Function.prototype,a=Object.prototype,o=i.toString,l=a.hasOwnProperty,c=o.call(Object);function u(f){if(!r(f)||e(f)!=n)return!1;var x=t(f);if(x===null)return!0;var m=l.call(x,"constructor")&&x.constructor;return typeof m=="function"&&m instanceof m&&o.call(m)==c}return V8=u,V8}var kye=Aye();const Sye=lr(kye);var U8,kM;function Bye(){if(kM)return U8;kM=1;var e=ko(),t=So(),r="[object Boolean]";function n(i){return i===!0||i===!1||t(i)&&e(i)==r}return U8=n,U8}var Dye=Bye();const Fye=lr(Dye);function th(e){"@babel/helpers - typeof";return th=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},th(e)}function y1(){return y1=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},y1.apply(this,arguments)}function Pye(e,t){return Lye(e)||Oye(e,t)||Mye(e,t)||Tye()}function Tye(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
162In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mye(e,t){if(e){if(typeof e=="string")return SM(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 SM(e,t)}}function SM(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 Oye(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(f){u=!0,i=f}
162finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function Lye(e){if(Array.isArray(e))return e}function BM(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 DM(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?BM(Object(r),!0).forEach(function(n){Rye(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):BM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Rye(e,t,r){return t=_ye(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _ye(e){var t=Iye(e,"string");return th(t)=="symbol"?t:t+""}function Iye(e,t){if(th(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(th(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var FM=function(t,r,n,i,a){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+a),l+="L ".concat(t+n-o/2-i,",").concat(r+a),l+="L ".concat(t,",").concat(r," Z"),l},$ye={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},zye=function(t){var r=DM(DM({},$ye),t),n=C.useRef(),i=C.useState(-1),a=Pye(i,2),o=a[0],l=a[1];C.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var j=n.current.getTotalLength();j&&l(j)}catch{}},[]);var c=r.x,u=r.y,f=r.upperWidth,x=r.lowerWidth,m=r.height,p=r.className,y=r.animationEasing,v=r.animationDuration,b=r.animationBegin,E=r.isUpdateAnimationActive;if(c!==+c||u!==+u||f!==+f||x!==+x||m!==+m||f===0&&x===0||m===0)return null;var N=or("recharts-trapezoid",p);return E?ie.createElement(Eo,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:m,x:c,y:u},to:{upperWidth:f,lowerWidth:x,height:m,x:c,y:u},duration:v,animationEasing:y,isActive:E},function(j){var A=j.upperWidth,w=j.lowerWidth,S=j.height,B=j.x,D=j.y;return ie.createElement(Eo,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:v,easing:y},ie.createElement("path",y1({},Xt(r,!0),{className:N,d:FM(B,D,A,w,S),ref:n})))}):ie.createElement("g",null,ie.createElement("path",y1({},Xt(r,!0),{className:N,d:FM(c,u,f,x,m)})))},Vye=["option","shapeType","propTransformer","activeClassName","isActive"];function rh(e){"@babel/helpers - typeof";return rh=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},rh(e)}function Uye(e,t){if(e==null)return{};var r=qye(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function qye(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 PM(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 v1(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?PM(Object(r),!0).forEach(function(n){Wye(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):PM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Wye(e,t,r){return t=Hye(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hye(e){var t=Gye(e,"string");return rh(t)=="symbol"?t:t+""}function Gye(e,t){if(rh(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(rh(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Kye(e,t){return v1(v1({},t),e)}function Xye(e,t){return e==="symbols"}function TM(e){var t=e.shapeType,r=e.elementProps;
162switch(t){case"rectangle":return ie.createElement(RE,r);case"trapezoid":return ie.createElement(zye,r);case"sector":return ie.createElement(hq,r);case"symbols":if(Xye(t))return ie.createElement(rE,r);break;default:return null}}function Yye(e){return C.isValidElement(e)?e.props:e}function Qye(e){var t=e.option,r=e.shapeType,n=e.propTransformer,i=n===void 0?Kye:n,a=e.activeClassName,o=a===void 0?"recharts-active-shape":a,l=e.isActive,c=Uye(e,Vye),u;if(C.isValidElement(t))u=C.cloneElement(t,v1(v1({},c),Yye(t)));else if($t(t))u=t(c);else if(Sye(t)&&!Fye(t)){var f=i(t,c);u=ie.createElement(TM,{shapeType:r,elementProps:f})}else{var x=c;u=ie.createElement(TM,{shapeType:r,elementProps:x})}return l?ie.createElement(qr,{className:o},u):u}function Iy(e,t){return t!=null&&"trapezoids"in e.props}function $y(e,t){return t!=null&&"sectors"in e.props}function nh(e,t){return t!=null&&"points"in e.props}function Zye(e,t){var r,n,i=e.x===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.x)||e.x===t.x,a=e.y===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.y)||e.y===t.y;return i&&a}function Jye(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function eve(e,t){var r=e.x===t.x,n=e.y===t.y,i=e.z===t.z;return r&&n&&i}function tve(e,t){var r;return Iy(e,t)?r=Zye:$y(e,t)?r=Jye:nh(e,t)&&(r=eve),r}function rve(e,t){var r;return Iy(e,t)?r="trapezoids":$y(e,t)?r="sectors":nh(e,t)&&(r="points"),r}function nve(e,t){if(Iy(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($y(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 nh(e,t)?t.payload:{}}function sve(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,i=rve(r,t),a=nve(r,t),o=n.filter(function(c,u){var f=$f(a,c),x=r.props[i].filter(function(y){var v=tve(r,t);return v(y,t)}),m=r.props[i].indexOf(x[x.length-1]),p=u===m;return f&&p}),l=n.indexOf(o[o.length-1]);return l}var q8,MM;function ive(){if(MM)return q8;MM=1;var e=Math.ceil,t=Math.max;function r(n,i,a,o){for(var l=-1,c=t(e((i-n)/(a||1)),0),u=Array(c);c--;)u[o?c:++l]=n,n+=a;return u}return q8=r,q8}var W8,OM;function wq(){if(OM)return W8;OM=1;var e=nU(),t=1/0,r=17976931348623157e292;function n(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-1/0){var a=i<0?-1:1;return a*r}return i===i?i:0}return W8=n,W8}var H8,LM;function ave(){if(LM)return H8;LM=1;var e=ive(),t=Sy(),r=wq();function n(i){return function(a,o,l){return l&&typeof l!="number"&&t(a,o,l)&&(o=l=void 0),a=r(a),o===void 0?(o=a,a=0):o=r(o),l=l===void 0?a<o?1:-1:r(l),e(a,o,l,i)}}return H8=n,H8}var G8,RM;function ove(){if(RM)return G8;RM=1;var e=ave(),t=e();return G8=t,G8}var lve=ove();const b1=lr(lve);function sh(e){"@babel/helpers - typeof";return sh=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},sh(e)}function _M(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function IM(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_M(Object(r),!0).forEach(function(n){Eq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_M(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Eq(e,t,r){return t=cve(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cve(e){var t=uve(e,"string");return sh(t)=="symbol"?t:t+""}function uve(e,t){if(sh(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(sh(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var dve=["Webkit","Moz","O","ms"],xve=function(t,r){var n=t.replace(/(\w)/,function(a){return a.toUpperCase()}),i=dve.reduce(function(a,o){return IM(IM({},a),{},Eq({},o+n,r))},{});return i[t]=r,i};function Ud(e){"@babel/helpers - typeof";return Ud=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ud(e)}function C1(){return C1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
162for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},C1.apply(this,arguments)}function $M(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function K8(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$M(Object(r),!0).forEach(function(n){Hs(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$M(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zM(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,Nq(n.key),n)}}function hve(e,t,r){return t&&zM(e.prototype,t),r&&zM(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function mve(e,t,r){return t=w1(t),pve(e,jq()?Reflect.construct(t,r||[],w1(e).constructor):t.apply(e,r))}function pve(e,t){if(t&&(Ud(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return gve(e)}function gve(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(jq=function(){return!!e})()}function w1(e){return w1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},w1(e)}function yve(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&&F6(e,t)}function F6(e,t){return F6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},F6(e,t)}function Hs(e,t,r){return t=Nq(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Nq(e){var t=vve(e,"string");return Ud(t)=="symbol"?t:t+""}function vve(e,t){if(Ud(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ud(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var bve=function(t){var r=t.data,n=t.startIndex,i=t.endIndex,a=t.x,o=t.width,l=t.travellerWidth;if(!r||!r.length)return{};var c=r.length,u=ef().domain(b1(0,c)).range([a,a+o-l]),f=u.domain().map(function(x){return u(x)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(n),endX:u(i),scale:u,scaleValues:f}},VM=function(t){return t.changedTouches&&!!t.changedTouches.length},qd=function(e){function t(r){var n;return fve(this,t),n=mve(this,t,[r]),Hs(n,"handleDrag",function(i){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(i):n.state.isSlideMoving&&n.handleSlideDrag(i)}),Hs(n,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&n.handleDrag(i.changedTouches[0])}),Hs(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=n.props,a=i.endIndex,o=i.onDragEnd,l=i.startIndex;o==null||o({endIndex:a,startIndex:l})}),n.detachDragEndListener()}),Hs(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),Hs(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),Hs(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),Hs(n,"handleSlideDragStart",function(i){var a=VM(i)?i.changedTouches[0]:i;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}
162return yve(t,e),hve(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var i=n.startX,a=n.endX,o=this.state.scaleValues,l=this.props,c=l.gap,u=l.data,f=u.length-1,x=Math.min(i,a),m=Math.max(i,a),p=t.getIndexInRange(o,x),y=t.getIndexInRange(o,m);return{startIndex:p-p%c,endIndex:y===f?f:y-y%c}}},{key:"getTextOfTick",value:function(n){var i=this.props,a=i.data,o=i.tickFormatter,l=i.dataKey,c=Qs(a[n],l,n);return $t(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,a=i.slideMoveStartX,o=i.startX,l=i.endX,c=this.props,u=c.x,f=c.width,x=c.travellerWidth,m=c.startIndex,p=c.endIndex,y=c.onChange,v=n.pageX-a;v>0?v=Math.min(v,u+f-x-l,u+f-x-o):v<0&&(v=Math.max(v,u-o,u-l));var b=this.getIndex({startX:o+v,endX:l+v});(b.startIndex!==m||b.endIndex!==p)&&y&&y(b),this.setState({startX:o+v,endX:l+v,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,i){var a=VM(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var i=this.state,a=i.brushMoveStartX,o=i.movingTravellerId,l=i.endX,c=i.startX,u=this.state[o],f=this.props,x=f.x,m=f.width,p=f.travellerWidth,y=f.onChange,v=f.gap,b=f.data,E={startX:this.state.startX,endX:this.state.endX},N=n.pageX-a;N>0?N=Math.min(N,x+m-p-u):N<0&&(N=Math.max(N,x-u)),E[o]=u+N;var j=this.getIndex(E),A=j.startIndex,w=j.endIndex,S=function(){var D=b.length-1;return o==="startX"&&(l>c?A%v===0:w%v===0)||l<c&&w===D||o==="endX"&&(l>c?w%v===0:A%v===0)||l>c&&w===D};this.setState(Hs(Hs({},o,u+N),"brushMoveStartX",n.pageX),function(){y&&S()&&y(j)})}},{key:"handleTravellerMoveKeyboard",value:function(n,i){var a=this,o=this.state,l=o.scaleValues,c=o.startX,u=o.endX,f=this.state[i],x=l.indexOf(f);if(x!==-1){var m=x+n;if(!(m===-1||m>=l.length)){var p=l[m];i==="startX"&&p>=u||i==="endX"&&p<=c||this.setState(Hs({},i,p),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,l=n.height,c=n.fill,u=n.stroke;return ie.createElement("rect",{stroke:u,fill:c,x:i,y:a,width:o,height:l})}},{key:"renderPanorama",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,l=n.height,c=n.data,u=n.children,f=n.padding,x=C.Children.only(u);return x?ie.cloneElement(x,{x:i,y:a,width:o,height:l,margin:f,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(n,i){var a,o,l=this,c=this.props,u=c.y,f=c.travellerWidth,x=c.height,m=c.traveller,p=c.ariaLabel,y=c.data,v=c.startIndex,b=c.endIndex,E=Math.max(n,this.props.x),N=K8(K8({},Xt(this.props,!1)),{},{x:E,y:u,width:f,height:x}),j=p||"Min value: ".concat((a=y[v])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=y[b])===null||o===void 0?void 0:o.name);return ie.createElement(qr,{tabIndex:0,role:"slider","aria-label":j,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(w){["ArrowLeft","ArrowRight"].includes(w.key)&&(w.preventDefault(),w.stopPropagation(),l.handleTravellerMoveKeyboard(w.key==="ArrowRight"?1:-1,i))},onFocus:function(){l.setState({isTravellerFocused:!0})},onBlur:function(){l.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(m,N))}},{key:"renderSlide",value:function(n,i){var a=this.props,o=a.y,l=a.height,c=a.stroke,u=a.travellerWidth,f=Math.min(n,i)+u,x=Math.max(Math.abs(i-n)-u,0);return ie.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:f,y:o,width:x,height:l})}},{key:"renderText",value:function(){var n=this.props,i=n.startIndex,a=n.endIndex,o=n.y,l=n.height,c=n.travellerWidth,u=n.stroke,f=this.state,x=f.startX,m=f.endX,p=5,y={pointerEvents:"none",fill:u};return ie.createElement(qr,{className:"recharts-brush-texts"},ie.createElement(Qg,C1({textAnchor:"end",verticalAnchor:"middle",x:Math.min(x,m)-p,y:o+l/2},y),this.getTextOfTick(i)),ie.createElement(Qg,C1({textAnchor:"start",verticalAnchor:"middle",x:Math.max(x,m)+c+p,y:o+l/2},y),this.getTextOfTick(a)))}},{key:"render",value:function(){var n=this.props,i=n.data,a=n.className,o=n.children,l=n.x,c=n.y,u=n.width,f=n.height,x=n.alwaysShowText,m=this.state,p=m.startX,y=m.endX,v=m.isTextActive,b=m.isSlideMoving,E=m.isTravellerMoving,N=m.isTravellerFocused;
162if(!i||!i.length||!qe(l)||!qe(c)||!qe(u)||!qe(f)||u<=0||f<=0)return null;var j=or("recharts-brush",a),A=ie.Children.count(o)===1,w=xve("userSelect","none");return ie.createElement(qr,{className:j,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:w},this.renderBackground(),A&&this.renderPanorama(),this.renderSlide(p,y),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(y,"endX"),(v||b||E||N||x)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var i=n.x,a=n.y,o=n.width,l=n.height,c=n.stroke,u=Math.floor(a+l/2)-1;return ie.createElement(ie.Fragment,null,ie.createElement("rect",{x:i,y:a,width:o,height:l,fill:c,stroke:"none"}),ie.createElement("line",{x1:i+1,y1:u,x2:i+o-1,y2:u,fill:"none",stroke:"#fff"}),ie.createElement("line",{x1:i+1,y1:u+2,x2:i+o-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,i){var a;return ie.isValidElement(n)?a=ie.cloneElement(n,i):$t(n)?a=n(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(n,i){var a=n.data,o=n.width,l=n.x,c=n.travellerWidth,u=n.updateId,f=n.startIndex,x=n.endIndex;if(a!==i.prevData||u!==i.prevUpdateId)return K8({prevData:a,prevTravellerWidth:c,prevUpdateId:u,prevX:l,prevWidth:o},a&&a.length?bve({data:a,width:o,x:l,travellerWidth:c,startIndex:f,endIndex:x}):{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(p){return i.scale(p)});return{prevData:a,prevTravellerWidth:c,prevUpdateId:u,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 a=n.length,o=0,l=a-1;l-o>1;){var c=Math.floor((o+l)/2);n[c]>i?l=c:o=c}return i>=n[l]?l:o}}])}(C.PureComponent);Hs(qd,"displayName","Brush");Hs(qd,"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 X8,UM;function Cve(){if(UM)return X8;UM=1;var e=cE();function t(r,n){var i;return e(r,function(a,o,l){return i=n(a,o,l),!i}),!!i}return X8=t,X8}var Y8,qM;function wve(){if(qM)return Y8;qM=1;var e=MV(),t=Ll(),r=Cve(),n=zs(),i=Sy();function a(o,l,c){var u=n(o)?e:r;return c&&i(o,l,c)&&(l=void 0),u(o,t(l,3))}return Y8=a,Y8}var Eve=wve();const jve=lr(Eve);var Fa=function(t,r){var n=t.alwaysShow,i=t.ifOverflow;return n&&(i="extendDomain"),i===r},Q8,WM;function Nve(){if(WM)return Q8;WM=1;var e=ZV();function t(r,n,i){n=="__proto__"&&e?e(r,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[n]=i}return Q8=t,Q8}var Z8,HM;function Ave(){if(HM)return Z8;HM=1;var e=Nve(),t=YV(),r=Ll();function n(i,a){var o={};return a=r(a,3),t(i,function(l,c,u){e(o,c,a(l,c,u))}),o}return Z8=n,Z8}var kve=Ave();const Sve=lr(kve);var J8,GM;function Bve(){if(GM)return J8;GM=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 J8=e,J8}var eC,KM;function Dve(){if(KM)return eC;KM=1;var e=cE();function t(r,n){var i=!0;return e(r,function(a,o,l){return i=!!n(a,o,l),i}),i}return eC=t,eC}var tC,XM;function Fve(){if(XM)return tC;XM=1;var e=Bve(),t=Dve(),r=Ll(),n=zs(),i=Sy();function a(o,l,c){var u=n(o)?e:t;return c&&i(o,l,c)&&(l=void 0),u(o,r(l,3))}return tC=a,tC}var Pve=Fve();const Aq=lr(Pve);var Tve=["x","y"];function ih(e){"@babel/helpers - typeof";return ih=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},ih(e)}function P6(){return P6=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},P6.apply(this,arguments)}function YM(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 kx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
162t%2?YM(Object(r),!0).forEach(function(n){Mve(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):YM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Mve(e,t,r){return t=Ove(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ove(e){var t=Lve(e,"string");return ih(t)=="symbol"?t:t+""}function Lve(e,t){if(ih(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ih(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Rve(e,t){if(e==null)return{};var r=_ve(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function _ve(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 Ive(e,t){var r=e.x,n=e.y,i=Rve(e,Tve),a="".concat(r),o=parseInt(a,10),l="".concat(n),c=parseInt(l,10),u="".concat(t.height||i.height),f=parseInt(u,10),x="".concat(t.width||i.width),m=parseInt(x,10);return kx(kx(kx(kx(kx({},t),i),o?{x:o}:{}),c?{y:c}:{}),{},{height:f,width:m,name:t.name,radius:t.radius})}function QM(e){return ie.createElement(Qye,P6({shapeType:"rectangle",propTransformer:Ive,activeClassName:"recharts-active-bar"},e))}var $ve=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,i){if(typeof t=="number")return t;var a=typeof n=="number";return a?t(n,i):(a||Qc(),r)}},zve=["value","background"],kq;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 Vve(e,t){if(e==null)return{};var r=Uve(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Uve(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 E1(){return E1=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},E1.apply(this,arguments)}function ZM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function cn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ZM(Object(r),!0).forEach(function(n){gl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ZM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function JM(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,Bq(n.key),n)}}function Wve(e,t,r){return t&&JM(e.prototype,t),r&&JM(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Hve(e,t,r){return t=j1(t),Gve(e,Sq()?Reflect.construct(t,r||[],j1(e).constructor):t.apply(e,r))}function Gve(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 Kve(e)}function Kve(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Sq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Sq=function(){return!!e})()}
162function j1(e){return j1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},j1(e)}function Xve(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&&T6(e,t)}function T6(e,t){return T6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},T6(e,t)}function gl(e,t,r){return t=Bq(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Bq(e){var t=Yve(e,"string");return Wd(t)=="symbol"?t:t+""}function Yve(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)}var Qh=function(e){function t(){var r;qve(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=Hve(this,t,[].concat(i)),gl(r,"state",{isAnimationFinished:!1}),gl(r,"id",Wh("recharts-bar-")),gl(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),o&&o()}),gl(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),o&&o()}),r}return Xve(t,e),Wve(t,[{key:"renderRectanglesStatically",value:function(n){var i=this,a=this.props,o=a.shape,l=a.dataKey,c=a.activeIndex,u=a.activeBar,f=Xt(this.props,!1);return n&&n.map(function(x,m){var p=m===c,y=p?u:o,v=cn(cn(cn({},f),x),{},{isActive:p,option:y,index:m,dataKey:l,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return ie.createElement(qr,E1({className:"recharts-bar-rectangle"},$g(i.props,x,m),{key:"rectangle-".concat(x==null?void 0:x.x,"-").concat(x==null?void 0:x.y,"-").concat(x==null?void 0:x.value,"-").concat(m)}),ie.createElement(QM,v))})}},{key:"renderRectanglesWithAnimation",value:function(){var n=this,i=this.props,a=i.data,o=i.layout,l=i.isAnimationActive,c=i.animationBegin,u=i.animationDuration,f=i.animationEasing,x=i.animationId,m=this.state.prevData;return ie.createElement(Eo,{begin:c,duration:u,isActive:l,easing:f,from:{t:0},to:{t:1},key:"bar-".concat(x),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(p){var y=p.t,v=a.map(function(b,E){var N=m&&m[E];if(N){var j=gi(N.x,b.x),A=gi(N.y,b.y),w=gi(N.width,b.width),S=gi(N.height,b.height);return cn(cn({},b),{},{x:j(y),y:A(y),width:w(y),height:S(y)})}if(o==="horizontal"){var B=gi(0,b.height),D=B(y);return cn(cn({},b),{},{y:b.y+b.height-D,height:D})}var P=gi(0,b.width),O=P(y);return cn(cn({},b),{},{width:O})});return ie.createElement(qr,null,n.renderRectanglesStatically(v))})}},{key:"renderRectangles",value:function(){var n=this.props,i=n.data,a=n.isAnimationActive,o=this.state.prevData;return a&&i&&i.length&&(!o||!$f(o,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var n=this,i=this.props,a=i.data,o=i.dataKey,l=i.activeIndex,c=Xt(this.props.background,!1);return a.map(function(u,f){u.value;var x=u.background,m=Vve(u,zve);if(!x)return null;var p=cn(cn(cn(cn(cn({},m),{},{fill:"#eee"},x),c),$g(n.props,u,f)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:o,index:f,className:"recharts-bar-background-rectangle"});return ie.createElement(QM,E1({key:"background-bar-".concat(f),option:n.props.background,isActive:f===l},p))})}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.data,l=a.xAxis,c=a.yAxis,u=a.layout,f=a.children,x=Qi(f,_y);if(!x)return null;var m=u==="vertical"?o[0].height/2:o[0].width/2,p=function(b,E){var N=Array.isArray(b.value)?b.value[1]:b.value;return{x:b.x,y:b.y,value:N,errorVal:Qs(b,E)}},y={clipPath:n?"url(#clipPath-".concat(i,")"):null};return ie.createElement(qr,y,x.map(function(v){return ie.cloneElement(v,{key:"error-bar-".concat(i,"-").concat(v.props.dataKey),data:o,xAxis:l,yAxis:c,layout:u,offset:m,dataPointFormatter:p})}))}},{key:"render",value:function(){var n=this.props,i=n.hide,a=n.data,o=n.className,l=n.xAxis,c=n.yAxis,u=n.left,f=n.top,x=n.width,m=n.height,p=n.isAnimationActive,y=n.background,v=n.id;if(i||!a||!a.length)return null;var b=this.state.isAnimationFinished,E=or("recharts-bar",o),N=l&&l.allowDataOverflow,j=c&&c.allowDataOverflow,A=N||j,w=nr(v)?this.id:v;return ie.createElement(qr,{className:E},N||j?ie.createElement("defs",null,ie.createElement("clipPath",{id:"clipPath-".concat(w)},ie.createElement("rect",{x:N?u:u-x/2,y:j?f:f-m/2,width:N?x:x*2,height:j?m:m*2}))):null,ie.createElement(qr,{className:"recharts-bar-rectangles",clipPath:A?"url(#clipPath-".concat(w,")"):null}
162,y?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(A,w),(!p||b)&&bl.renderCallByParent(this.props,a))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curData:n.data,prevData:i.curData}:n.data!==i.curData?{curData:n.data}:null}}])}(C.PureComponent);kq=Qh;gl(Qh,"displayName","Bar");gl(Qh,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!C0.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});gl(Qh,"getComposedData",function(e){var t=e.props,r=e.item,n=e.barPosition,i=e.bandSize,a=e.xAxis,o=e.yAxis,l=e.xAxisTicks,c=e.yAxisTicks,u=e.stackedData,f=e.dataStartIndex,x=e.displayedData,m=e.offset,p=vpe(n,r);if(!p)return null;var y=t.layout,v=r.type.defaultProps,b=v!==void 0?cn(cn({},v),r.props):r.props,E=b.dataKey,N=b.children,j=b.minPointSize,A=y==="horizontal"?o:a,w=u?A.scale.domain():null,S=kpe({numericAxis:A}),B=Qi(N,iU),D=x.map(function(P,O){var M,I,V,W,_,z;u?M=bpe(u[f+O],w):(M=Qs(P,E),Array.isArray(M)||(M=[S,M]));var R=$ve(j,kq.defaultProps.minPointSize)(M[1],O);if(y==="horizontal"){var q,G=[o.scale(M[0]),o.scale(M[1])],K=G[0],$=G[1];I=IT({axis:a,ticks:l,bandSize:i,offset:p.offset,entry:P,index:O}),V=(q=$??K)!==null&&q!==void 0?q:void 0,W=p.size;var H=K-$;if(_=Number.isNaN(H)?0:H,z={x:I,y:o.y,width:W,height:o.height},Math.abs(R)>0&&Math.abs(_)<Math.abs(R)){var te=Xi(_||R)*(Math.abs(R)-Math.abs(_));V-=te,_+=te}}else{var ne=[a.scale(M[0]),a.scale(M[1])],Y=ne[0],J=ne[1];if(I=Y,V=IT({axis:o,ticks:c,bandSize:i,offset:p.offset,entry:P,index:O}),W=J-Y,_=p.size,z={x:a.x,y:V,width:a.width,height:_},Math.abs(R)>0&&Math.abs(W)<Math.abs(R)){var oe=Xi(W||R)*(Math.abs(R)-Math.abs(W));W+=oe}}return cn(cn(cn({},P),{},{x:I,y:V,width:W,height:_,value:u?M:M[1],payload:P,background:z},B&&B[O]&&B[O].props),{},{tooltipPayload:[dq(r,P)],tooltipPosition:{x:I+W/2,y:V+_/2}})});return cn({data:D,layout:y},m)});function ah(e){"@babel/helpers - typeof";return ah=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},ah(e)}function Qve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eO(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,Dq(n.key),n)}}function Zve(e,t,r){return t&&eO(e.prototype,t),r&&eO(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function tO(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 Ui(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tO(Object(r),!0).forEach(function(n){zy(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zy(e,t,r){return t=Dq(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Dq(e){var t=Jve(e,"string");return ah(t)=="symbol"?t:t+""}function Jve(e,t){if(ah(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ah(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ebe=function(t,r,n,i,a){var o=t.width,l=t.height,c=t.layout,u=t.children,f=Object.keys(r),x={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=!!Ks(u,Qh);return f.reduce(function(p,y){var v=r[y],b=v.orientation,E=v.domain,N=v.padding,j=N===void 0?{}:N,A=v.mirror,w=v.reversed,S="".concat(b).concat(A?"Mirror":""),B,D,P,O,M;if(v.type==="number"&&(v.padding==="gap"||v.padding==="no-gap")){var I=E[1]-E[0],V=1/0,W=v.categoricalDomain.sort(rce);if(W.forEach(function(ne,Y){Y>0&&(V=Math.min((ne||0)-(W[Y-1]||0),V))}),Number.isFinite(V)){var _=V/I,z=v.layout==="vertical"?n.height:n.width;if(v.padding==="gap"&&(B=_*z/2),v.padding==="no-gap"){var R=Xc(t.barCategoryGap,_*z),q=_*z/2;B=q-R-(q-R)/z*R}}}i==="xAxis"?D=[n.left+(j.left||0)+(B||0),n.left+n.width-(j.right||0)-(B||0)]:i==="yAxis"?D=c==="horizontal"?[n.top+n.height-(j.bottom||0),n.top+(j.top||0)]:[n.top+(j.top||0)+(B||0),n.top+n.height-(j.bottom||0)-(B||0)]:D=v.range,w&&
162(D=[D[1],D[0]]);var G=gpe(v,a,m),K=G.scale,$=G.realScaleType;K.domain(E).range(D),ype(K);var H=Ape(K,Ui(Ui({},v),{},{realScaleType:$}));i==="xAxis"?(M=b==="top"&&!A||b==="bottom"&&A,P=n.left,O=x[S]-M*v.height):i==="yAxis"&&(M=b==="left"&&!A||b==="right"&&A,P=x[S]-M*v.width,O=n.top);var te=Ui(Ui(Ui({},v),H),{},{realScaleType:$,x:P,y:O,scale:K,width:i==="xAxis"?n.width:v.width,height:i==="yAxis"?n.height:v.height});return te.bandSize=d1(te,H),!v.hide&&i==="xAxis"?x[S]+=(M?-1:1)*te.height:v.hide||(x[S]+=(M?-1:1)*te.width),Ui(Ui({},p),{},zy({},y,te))},{})},Fq=function(t,r){var n=t.x,i=t.y,a=r.x,o=r.y;return{x:Math.min(n,a),y:Math.min(i,o),width:Math.abs(a-n),height:Math.abs(o-i)}},tbe=function(t){var r=t.x1,n=t.y1,i=t.x2,a=t.y2;return Fq({x:r,y:n},{x:i,y:a})},Pq=function(){function e(t){Qve(this,e),this.scale=t}return Zve(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.bandAware,a=n.position;if(r!==void 0){if(a)switch(a){case"start":return this.scale(r);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+o}case"end":{var 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],a=n[n.length-1];return i<=a?r>=i&&r<=a:r>=a&&r<=i}}],[{key:"create",value:function(r){return new e(r)}}])}();zy(Pq,"EPS",1e-4);var IE=function(t){var r=Object.keys(t).reduce(function(n,i){return Ui(Ui({},n),{},zy({},i,Pq.create(t[i])))},{});return Ui(Ui({},r),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,l=a.position;return Sve(i,function(c,u){return r[u].apply(c,{bandAware:o,position:l})})},isInRange:function(i){return Aq(i,function(a,o){return r[o].isInRange(a)})}})};function rbe(e){return(e%180+180)%180}var nbe=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=rbe(i),o=a*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)},rC,rO;function sbe(){if(rO)return rC;rO=1;var e=Ll(),t=Hh(),r=Ay();function n(i){return function(a,o,l){var c=Object(a);if(!t(a)){var u=e(o,3);a=r(a),o=function(x){return u(c[x],x,c)}}var f=i(a,o,l);return f>-1?c[u?a[f]:f]:void 0}}return rC=n,rC}var nC,nO;function ibe(){if(nO)return nC;nO=1;var e=wq();function t(r){var n=e(r),i=n%1;return n===n?i?n-i:n:0}return nC=t,nC}var sC,sO;function abe(){if(sO)return sC;sO=1;var e=WV(),t=Ll(),r=ibe(),n=Math.max;function i(a,o,l){var c=a==null?0:a.length;if(!c)return-1;var u=l==null?0:r(l);return u<0&&(u=n(c+u,0)),e(a,t(o,3),u)}return sC=i,sC}var iC,iO;function obe(){if(iO)return iC;iO=1;var e=sbe(),t=abe(),r=e(t);return iC=r,iC}var lbe=obe();const cbe=lr(lbe);var ube=oV();const dbe=lr(ube);var xbe=dbe(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("")}),$E=C.createContext(void 0),zE=C.createContext(void 0),Tq=C.createContext(void 0),Mq=C.createContext({}),Oq=C.createContext(void 0),Lq=C.createContext(0),Rq=C.createContext(0),aO=function(t){var r=t.state,n=r.xAxisMap,i=r.yAxisMap,a=r.offset,o=t.clipPathId,l=t.children,c=t.width,u=t.height,f=xbe(a);return ie.createElement($E.Provider,{value:n},ie.createElement(zE.Provider,{value:i},ie.createElement(Mq.Provider,{value:a},ie.createElement(Tq.Provider,{value:f},ie.createElement(Oq.Provider,{value:o},ie.createElement(Lq.Provider,{value:u},ie.createElement(Rq.Provider,{value:c},l)))))))},fbe=function(){return C.useContext(Oq)},_q=function(t){var r=C.useContext($E);r==null&&Qc();var n=r[t];return n==null&&Qc(),n},hbe=function(){var t=C.useContext($E);return il(t)}
162,mbe=function(){var t=C.useContext(zE),r=cbe(t,function(n){return Aq(n.domain,Number.isFinite)});return r||il(t)},Iq=function(t){var r=C.useContext(zE);r==null&&Qc();var n=r[t];return n==null&&Qc(),n},pbe=function(){var t=C.useContext(Tq);return t},gbe=function(){return C.useContext(Mq)},VE=function(){return C.useContext(Rq)},UE=function(){return C.useContext(Lq)};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 ybe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vbe(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,zq(n.key),n)}}function bbe(e,t,r){return t&&vbe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Cbe(e,t,r){return t=N1(t),wbe(e,$q()?Reflect.construct(t,r||[],N1(e).constructor):t.apply(e,r))}function wbe(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 Ebe(e)}function Ebe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $q(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return($q=function(){return!!e})()}function N1(e){return N1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},N1(e)}function jbe(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&&M6(e,t)}function M6(e,t){return M6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},M6(e,t)}function oO(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 lO(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?oO(Object(r),!0).forEach(function(n){qE(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qE(e,t,r){return t=zq(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zq(e){var t=Nbe(e,"string");return Hd(t)=="symbol"?t:t+""}function Nbe(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)}function Abe(e,t){return Dbe(e)||Bbe(e,t)||Sbe(e,t)||kbe()}function kbe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
163In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Sbe(e,t){if(e){if(typeof e=="string")return cO(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 cO(e,t)}}function cO(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 Bbe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function Dbe(e){if(Array.isArray(e))return e}function O6(){return O6=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
163for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},O6.apply(this,arguments)}var Fbe=function(t,r){var n;return ie.isValidElement(t)?n=ie.cloneElement(t,r):$t(t)?n=t(r):n=ie.createElement("line",O6({},r,{className:"recharts-reference-line-line"})),n},Pbe=function(t,r,n,i,a,o,l,c,u){var f=a.x,x=a.y,m=a.width,p=a.height;if(n){var y=u.y,v=t.y.apply(y,{position:o});if(Fa(u,"discard")&&!t.y.isInRange(v))return null;var b=[{x:f+m,y:v},{x:f,y:v}];return c==="left"?b.reverse():b}if(r){var E=u.x,N=t.x.apply(E,{position:o});if(Fa(u,"discard")&&!t.x.isInRange(N))return null;var j=[{x:N,y:x+p},{x:N,y:x}];return l==="top"?j.reverse():j}if(i){var A=u.segment,w=A.map(function(S){return t.apply(S,{position:o})});return Fa(u,"discard")&&jve(w,function(S){return!t.isInRange(S)})?null:w}return null};function Tbe(e){var t=e.x,r=e.y,n=e.segment,i=e.xAxisId,a=e.yAxisId,o=e.shape,l=e.className,c=e.alwaysShow,u=fbe(),f=_q(i),x=Iq(a),m=pbe();if(!u||!m)return null;uo(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var p=IE({x:f.scale,y:x.scale}),y=En(t),v=En(r),b=n&&n.length===2,E=Pbe(p,y,v,b,m,e.position,f.orientation,x.orientation,e);if(!E)return null;var N=Abe(E,2),j=N[0],A=j.x,w=j.y,S=N[1],B=S.x,D=S.y,P=Fa(e,"hidden")?"url(#".concat(u,")"):void 0,O=lO(lO({clipPath:P},Xt(e,!0)),{},{x1:A,y1:w,x2:B,y2:D});return ie.createElement(qr,{className:or("recharts-reference-line",l)},Fbe(o,O),rs.renderCallByParent(e,tbe({x1:A,y1:w,x2:B,y2:D})))}var WE=function(e){function t(){return ybe(this,t),Cbe(this,t,arguments)}return jbe(t,e),bbe(t,[{key:"render",value:function(){return ie.createElement(Tbe,this.props)}}])}(ie.Component);qE(WE,"displayName","ReferenceLine");qE(WE,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function L6(){return L6=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},L6.apply(this,arguments)}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 uO(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 dO(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uO(Object(r),!0).forEach(function(n){Vy(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Mbe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Obe(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,Uq(n.key),n)}}function Lbe(e,t,r){return t&&Obe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Rbe(e,t,r){return t=A1(t),_be(e,Vq()?Reflect.construct(t,r||[],A1(e).constructor):t.apply(e,r))}function _be(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 Ibe(e)}function Ibe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Vq=function(){return!!e})()}function A1(e){return A1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},A1(e)}function $be(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&&R6(e,t)}
163function R6(e,t){return R6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},R6(e,t)}function Vy(e,t,r){return t=Uq(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Uq(e){var t=zbe(e,"string");return Gd(t)=="symbol"?t:t+""}function zbe(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 String(e)}var Vbe=function(t){var r=t.x,n=t.y,i=t.xAxis,a=t.yAxis,o=IE({x:i.scale,y:a.scale}),l=o.apply({x:r,y:n},{bandAware:!0});return Fa(t,"discard")&&!o.isInRange(l)?null:l},Uy=function(e){function t(){return Mbe(this,t),Rbe(this,t,arguments)}return $be(t,e),Lbe(t,[{key:"render",value:function(){var n=this.props,i=n.x,a=n.y,o=n.r,l=n.alwaysShow,c=n.clipPathId,u=En(i),f=En(a);if(uo(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!f)return null;var x=Vbe(this.props);if(!x)return null;var m=x.x,p=x.y,y=this.props,v=y.shape,b=y.className,E=Fa(this.props,"hidden")?"url(#".concat(c,")"):void 0,N=dO(dO({clipPath:E},Xt(this.props,!0)),{},{cx:m,cy:p});return ie.createElement(qr,{className:or("recharts-reference-dot",b)},t.renderDot(v,N),rs.renderCallByParent(this.props,{x:m-o,y:p-o,width:2*o,height:2*o}))}}])}(ie.Component);Vy(Uy,"displayName","ReferenceDot");Vy(Uy,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});Vy(Uy,"renderDot",function(e,t){var r;return ie.isValidElement(e)?r=ie.cloneElement(e,t):$t(e)?r=e(t):r=ie.createElement(_E,L6({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),r});function _6(){return _6=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},_6.apply(this,arguments)}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 xO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function fO(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xO(Object(r),!0).forEach(function(n){qy(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ube(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qbe(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,Wq(n.key),n)}}function Wbe(e,t,r){return t&&qbe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Hbe(e,t,r){return t=k1(t),Gbe(e,qq()?Reflect.construct(t,r||[],k1(e).constructor):t.apply(e,r))}function Gbe(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 Kbe(e)}function Kbe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(qq=function(){return!!e})()}function k1(e){return k1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},k1(e)}function Xbe(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&&I6(e,t)}
163function I6(e,t){return I6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},I6(e,t)}function qy(e,t,r){return t=Wq(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Wq(e){var t=Ybe(e,"string");return Kd(t)=="symbol"?t:t+""}function Ybe(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 Qbe=function(t,r,n,i,a){var o=a.x1,l=a.x2,c=a.y1,u=a.y2,f=a.xAxis,x=a.yAxis;if(!f||!x)return null;var m=IE({x:f.scale,y:x.scale}),p={x:t?m.x.apply(o,{position:"start"}):m.x.rangeMin,y:n?m.y.apply(c,{position:"start"}):m.y.rangeMin},y={x:r?m.x.apply(l,{position:"end"}):m.x.rangeMax,y:i?m.y.apply(u,{position:"end"}):m.y.rangeMax};return Fa(a,"discard")&&(!m.isInRange(p)||!m.isInRange(y))?null:Fq(p,y)},Wy=function(e){function t(){return Ube(this,t),Hbe(this,t,arguments)}return Xbe(t,e),Wbe(t,[{key:"render",value:function(){var n=this.props,i=n.x1,a=n.x2,o=n.y1,l=n.y2,c=n.className,u=n.alwaysShow,f=n.clipPathId;uo(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var x=En(i),m=En(a),p=En(o),y=En(l),v=this.props.shape;if(!x&&!m&&!p&&!y&&!v)return null;var b=Qbe(x,m,p,y,this.props);if(!b&&!v)return null;var E=Fa(this.props,"hidden")?"url(#".concat(f,")"):void 0;return ie.createElement(qr,{className:or("recharts-reference-area",c)},t.renderRect(v,fO(fO({clipPath:E},Xt(this.props,!0)),b)),rs.renderCallByParent(this.props,b))}}])}(ie.Component);qy(Wy,"displayName","ReferenceArea");qy(Wy,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});qy(Wy,"renderRect",function(e,t){var r;return ie.isValidElement(e)?r=ie.cloneElement(e,t):$t(e)?r=e(t):r=ie.createElement(RE,_6({},t,{className:"recharts-reference-area-rect"})),r});function Hq(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 Zbe(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return nbe(n,r)}function Jbe(e,t,r){var n=r==="width",i=e.x,a=e.y,o=e.width,l=e.height;return t===1?{start:n?i:a,end:n?i+o:a+l}:{start:n?i+o:a+l,end:n?i:a}}function S1(e,t,r,n,i){if(e*t<e*n||e*t>e*i)return!1;var a=r();return e*(t-e*a/2-n)>=0&&e*(t+e*a/2-i)<=0}function e2e(e,t){return Hq(e,t+1)}function t2e(e,t,r,n,i){for(var a=(n||[]).slice(),o=t.start,l=t.end,c=0,u=1,f=o,x=function(){var y=n==null?void 0:n[c];if(y===void 0)return{v:Hq(n,u)};var v=c,b,E=function(){return b===void 0&&(b=r(y,v)),b},N=y.coordinate,j=c===0||S1(e,N,E,f,l);j||(c=0,f=o,u+=1),j&&(f=N+e*(E()/2+i),c+=u)},m;u<=a.length;)if(m=x(),m)return m.v;return[]}function oh(e){"@babel/helpers - typeof";return oh=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},oh(e)}function hO(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 Jn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hO(Object(r),!0).forEach(function(n){r2e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function r2e(e,t,r){return t=n2e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n2e(e){var t=s2e(e,"string");return oh(t)=="symbol"?t:t+""}function s2e(e,t){if(oh(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(oh(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function i2e(e,t,r,n,i){for(var a=(n||[]).slice(),o=a.length,l=t.start,c=t.end,u=function(m){var p=a[m],y,v=function(){return y===void 0&&(y=r(p,m)),y};if(m===o-1){var b=e*(p.coordinate+e*v()/2-c);a[m]=p=Jn(Jn({},p),{},{tickCoord:b>0?p.coordinate-b*e:p.coordinate})}else a[m]=p=Jn(Jn({},p),{},{tickCoord:p.coordinate});var E=S1(e,p.tickCoord,v,l,c);E&&(c=p.tickCoord-e*(v()/2+i),a[m]=Jn(Jn({},p),{},{isShow:!0}
163))},f=o-1;f>=0;f--)u(f);return a}function a2e(e,t,r,n,i,a){var o=(n||[]).slice(),l=o.length,c=t.start,u=t.end;if(a){var f=n[l-1],x=r(f,l-1),m=e*(f.coordinate+e*x/2-u);o[l-1]=f=Jn(Jn({},f),{},{tickCoord:m>0?f.coordinate-m*e:f.coordinate});var p=S1(e,f.tickCoord,function(){return x},c,u);p&&(u=f.tickCoord-e*(x/2+i),o[l-1]=Jn(Jn({},f),{},{isShow:!0}))}for(var y=a?l-1:l,v=function(N){var j=o[N],A,w=function(){return A===void 0&&(A=r(j,N)),A};if(N===0){var S=e*(j.coordinate-e*w()/2-c);o[N]=j=Jn(Jn({},j),{},{tickCoord:S<0?j.coordinate-S*e:j.coordinate})}else o[N]=j=Jn(Jn({},j),{},{tickCoord:j.coordinate});var B=S1(e,j.tickCoord,w,c,u);B&&(c=j.tickCoord+e*(w()/2+i),o[N]=Jn(Jn({},j),{},{isShow:!0}))},b=0;b<y;b++)v(b);return o}function HE(e,t,r){var n=e.tick,i=e.ticks,a=e.viewBox,o=e.minTickGap,l=e.orientation,c=e.interval,u=e.tickFormatter,f=e.unit,x=e.angle;if(!i||!i.length||!n)return[];if(qe(c)||C0.isSsr)return e2e(i,typeof c=="number"&&qe(c)?c:0);var m=[],p=l==="top"||l==="bottom"?"width":"height",y=f&&p==="width"?Jx(f,{fontSize:t,letterSpacing:r}):{width:0,height:0},v=function(j,A){var w=$t(u)?u(j.value,A):j.value;return p==="width"?Zbe(Jx(w,{fontSize:t,letterSpacing:r}),y,x):Jx(w,{fontSize:t,letterSpacing:r})[p]},b=i.length>=2?Xi(i[1].coordinate-i[0].coordinate):1,E=Jbe(a,b,p);return c==="equidistantPreserveStart"?t2e(b,E,v,i,o):(c==="preserveStart"||c==="preserveStartEnd"?m=a2e(b,E,v,i,o,c==="preserveStartEnd"):m=i2e(b,E,v,i,o),m.filter(function(N){return N.isShow}))}var o2e=["viewBox"],l2e=["viewBox"],c2e=["ticks"];function Xd(e){"@babel/helpers - typeof";return Xd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xd(e)}function Qu(){return Qu=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},Qu.apply(this,arguments)}function mO(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 us(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mO(Object(r),!0).forEach(function(n){GE(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function aC(e,t){if(e==null)return{};var r=u2e(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function u2e(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 d2e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pO(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,Kq(n.key),n)}}function x2e(e,t,r){return t&&pO(e.prototype,t),r&&pO(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function f2e(e,t,r){return t=B1(t),h2e(e,Gq()?Reflect.construct(t,r||[],B1(e).constructor):t.apply(e,r))}function h2e(e,t){if(t&&(Xd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return m2e(e)}function m2e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Gq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Gq=function(){return!!e})()}function B1(e){return B1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},B1(e)}function p2e(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&&$6(e,t)}
163function $6(e,t){return $6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},$6(e,t)}function GE(e,t,r){return t=Kq(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Kq(e){var t=g2e(e,"string");return Xd(t)=="symbol"?t:t+""}function g2e(e,t){if(Xd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Xd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var N0=function(e){function t(r){var n;return d2e(this,t),n=f2e(this,t,[r]),n.state={fontSize:"",letterSpacing:""},n}return p2e(t,e),x2e(t,[{key:"shouldComponentUpdate",value:function(n,i){var a=n.viewBox,o=aC(n,o2e),l=this.props,c=l.viewBox,u=aC(l,l2e);return!id(a,c)||!id(o,u)||!id(i,this.state)}},{key:"componentDidMount",value:function(){var n=this.layerReference;if(n){var i=n.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(n){var i=this.props,a=i.x,o=i.y,l=i.width,c=i.height,u=i.orientation,f=i.tickSize,x=i.mirror,m=i.tickMargin,p,y,v,b,E,N,j=x?-1:1,A=n.tickSize||f,w=qe(n.tickCoord)?n.tickCoord:n.coordinate;switch(u){case"top":p=y=n.coordinate,b=o+ +!x*c,v=b-j*A,N=v-j*m,E=w;break;case"left":v=b=n.coordinate,y=a+ +!x*l,p=y-j*A,E=p-j*m,N=w;break;case"right":v=b=n.coordinate,y=a+ +x*l,p=y+j*A,E=p+j*m,N=w;break;default:p=y=n.coordinate,b=o+ +x*c,v=b+j*A,N=v+j*m,E=w;break}return{line:{x1:p,y1:v,x2:y,y2:b},tick:{x:E,y:N}}}},{key:"getTickTextAnchor",value:function(){var n=this.props,i=n.orientation,a=n.mirror,o;switch(i){case"left":o=a?"start":"end";break;case"right":o=a?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var n=this.props,i=n.orientation,a=n.mirror,o="end";switch(i){case"left":case"right":o="middle";break;case"top":o=a?"start":"end";break;default:o=a?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,l=n.height,c=n.orientation,u=n.mirror,f=n.axisLine,x=us(us(us({},Xt(this.props,!1)),Xt(f,!1)),{},{fill:"none"});if(c==="top"||c==="bottom"){var m=+(c==="top"&&!u||c==="bottom"&&u);x=us(us({},x),{},{x1:i,y1:a+m*l,x2:i+o,y2:a+m*l})}else{var p=+(c==="left"&&!u||c==="right"&&u);x=us(us({},x),{},{x1:i+p*o,y1:a,x2:i+p*o,y2:a+l})}return ie.createElement("line",Qu({},x,{className:or("recharts-cartesian-axis-line",wi(f,"className"))}))}},{key:"renderTicks",value:function(n,i,a){var o=this,l=this.props,c=l.tickLine,u=l.stroke,f=l.tick,x=l.tickFormatter,m=l.unit,p=HE(us(us({},this.props),{},{ticks:n}),i,a),y=this.getTickTextAnchor(),v=this.getTickVerticalAnchor(),b=Xt(this.props,!1),E=Xt(f,!1),N=us(us({},b),{},{fill:"none"},Xt(c,!1)),j=p.map(function(A,w){var S=o.getTickLineCoord(A),B=S.line,D=S.tick,P=us(us(us(us({textAnchor:y,verticalAnchor:v},b),{},{stroke:"none",fill:u},E),D),{},{index:w,payload:A,visibleTicksCount:p.length,tickFormatter:x});return ie.createElement(qr,Qu({className:"recharts-cartesian-axis-tick",key:"tick-".concat(A.value,"-").concat(A.coordinate,"-").concat(A.tickCoord)},$g(o.props,A,w)),c&&ie.createElement("line",Qu({},N,B,{className:or("recharts-cartesian-axis-tick-line",wi(c,"className"))})),f&&t.renderTickItem(f,P,"".concat($t(x)?x(A.value,w):A.value).concat(m||"")))});return ie.createElement("g",{className:"recharts-cartesian-axis-ticks"},j)}},{key:"render",value:function(){var n=this,i=this.props,a=i.axisLine,o=i.width,l=i.height,c=i.ticksGenerator,u=i.className,f=i.hide;if(f)return null;var x=this.props,m=x.ticks,p=aC(x,c2e),y=m;return $t(c)&&(y=m&&m.length>0?c(this.props):c(p)),o<=0||l<=0||!y||!y.length?null:ie.createElement(qr,{className:or("recharts-cartesian-axis",u),ref:function(b){n.layerReference=b}},a&&this.renderAxisLine(),this.renderTicks(y,this.state.fontSize,this.state.letterSpacing),rs.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,a){var o;return ie.isValidElement(n)?o=ie.cloneElement(n,i):$t(n)?o=n(i):o=ie.createElement(Qg,Qu({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])}(C.Component);GE(N0,"displayName","CartesianAxis");GE(N0,"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
163:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var y2e=["x1","y1","x2","y2","key"],v2e=["offset"];function Zc(e){"@babel/helpers - typeof";return Zc=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},Zc(e)}function gO(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?gO(Object(r),!0).forEach(function(n){b2e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function b2e(e,t,r){return t=C2e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function C2e(e){var t=w2e(e,"string");return Zc(t)=="symbol"?t:t+""}function w2e(e,t){if(Zc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Zc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yc(){return yc=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},yc.apply(this,arguments)}function yO(e,t){if(e==null)return{};var r=E2e(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function E2e(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 j2e=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,i=t.x,a=t.y,o=t.width,l=t.height,c=t.ry;return ie.createElement("rect",{x:i,y:a,ry:c,width:o,height:l,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function Xq(e,t){var r;if(ie.isValidElement(e))r=ie.cloneElement(e,t);else if($t(e))r=e(t);else{var n=t.x1,i=t.y1,a=t.x2,o=t.y2,l=t.key,c=yO(t,y2e),u=Xt(c,!1);u.offset;var f=yO(u,v2e);r=ie.createElement("line",yc({},f,{x1:n,y1:i,x2:a,y2:o,fill:"none",key:l}))}return r}function N2e(e){var t=e.x,r=e.width,n=e.horizontal,i=n===void 0?!0:n,a=e.horizontalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(l,c){var u=ns(ns({},e),{},{x1:t,y1:l,x2:t+r,y2:l,key:"line-".concat(c),index:c});return Xq(i,u)});return ie.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function A2e(e){var t=e.y,r=e.height,n=e.vertical,i=n===void 0?!0:n,a=e.verticalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(l,c){var u=ns(ns({},e),{},{x1:l,y1:t,x2:l,y2:t+r,key:"line-".concat(c),index:c});return Xq(i,u)});return ie.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function k2e(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,i=e.y,a=e.width,o=e.height,l=e.horizontalPoints,c=e.horizontal,u=c===void 0?!0:c;if(!u||!t||!t.length)return null;var f=l.map(function(m){return Math.round(m+i-i)}).sort(function(m,p){return m-p});i!==f[0]&&f.unshift(0);var x=f.map(function(m,p){var y=!f[p+1],v=y?i+o-m:f[p+1]-m;if(v<=0)return null;var b=p%t.length;return ie.createElement("rect",{key:"react-".concat(p),y:m,x:n,height:v,width:a,stroke:"none",fill:t[b],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return ie.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},x)}function S2e(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,i=e.fillOpacity,a=e.x,o=e.y,l=e.width,c=e.height,u=e.verticalPoints;if(!r||!n||!n.length)return null;var f=u.map(function(m){return Math.round(m+a-a)}).sort(function(m,p){return m-p});a!==f[0]&&f.unshift(0);var x=f.map(function(m,p){var y=!f[p+1],v=y?a+l-m:f[p+1]-m;if(v<=0)return null;var b=p%n.length;return ie.createElement("rect",{key:"react-".concat(p),x:m,y:o,width:v,height:c,stroke:"none",fill:n[b],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return ie.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},x)}var B2e=function(t,r){var n=t.xAxis,i=t.width,a=t.height,o=t.offset;return cq(HE(ns(ns(ns({},N0.defaultProps),n),{}
163,{ticks:oo(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.left,o.left+o.width,r)},D2e=function(t,r){var n=t.yAxis,i=t.width,a=t.height,o=t.offset;return cq(HE(ns(ns(ns({},N0.defaultProps),n),{},{ticks:oo(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.top,o.top+o.height,r)},Ru={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Yq(e){var t,r,n,i,a,o,l=VE(),c=UE(),u=gbe(),f=ns(ns({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Ru.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:Ru.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:Ru.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:Ru.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:Ru.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:Ru.verticalFill,x:qe(e.x)?e.x:u.left,y:qe(e.y)?e.y:u.top,width:qe(e.width)?e.width:u.width,height:qe(e.height)?e.height:u.height}),x=f.x,m=f.y,p=f.width,y=f.height,v=f.syncWithTicks,b=f.horizontalValues,E=f.verticalValues,N=hbe(),j=mbe();if(!qe(p)||p<=0||!qe(y)||y<=0||!qe(x)||x!==+x||!qe(m)||m!==+m)return null;var A=f.verticalCoordinatesGenerator||B2e,w=f.horizontalCoordinatesGenerator||D2e,S=f.horizontalPoints,B=f.verticalPoints;if((!S||!S.length)&&$t(w)){var D=b&&b.length,P=w({yAxis:j?ns(ns({},j),{},{ticks:D?b:j.ticks}):void 0,width:l,height:c,offset:u},D?!0:v);uo(Array.isArray(P),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Zc(P),"]")),Array.isArray(P)&&(S=P)}if((!B||!B.length)&&$t(A)){var O=E&&E.length,M=A({xAxis:N?ns(ns({},N),{},{ticks:O?E:N.ticks}):void 0,width:l,height:c,offset:u},O?!0:v);uo(Array.isArray(M),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Zc(M),"]")),Array.isArray(M)&&(B=M)}return ie.createElement("g",{className:"recharts-cartesian-grid"},ie.createElement(j2e,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height,ry:f.ry}),ie.createElement(N2e,yc({},f,{offset:u,horizontalPoints:S,xAxis:N,yAxis:j})),ie.createElement(A2e,yc({},f,{offset:u,verticalPoints:B,xAxis:N,yAxis:j})),ie.createElement(k2e,yc({},f,{horizontalPoints:S})),ie.createElement(S2e,yc({},f,{verticalPoints:B})))}Yq.displayName="CartesianGrid";var F2e=["layout","type","stroke","connectNulls","isRange","ref"],P2e=["key"],Qq;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 Zq(e,t){if(e==null)return{};var r=T2e(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function T2e(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 vc(){return vc=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},vc.apply(this,arguments)}function vO(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 tl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vO(Object(r),!0).forEach(function(n){ja(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function M2e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bO(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,eW(n.key),n)}}function O2e(e,t,r){return t&&bO(e.prototype,t),r&&bO(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function L2e(e,t,r){return t=D1(t),R2e(e,Jq()?Reflect.construct(t,r||[],D1(e).constructor):t.apply(e,r))}function R2e(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 _2e(e)}function _2e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Jq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Jq=function(){return!!e})()}
163function D1(e){return D1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},D1(e)}function I2e(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&&z6(e,t)}function z6(e,t){return z6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},z6(e,t)}function ja(e,t,r){return t=eW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eW(e){var t=$2e(e,"string");return Yd(t)=="symbol"?t:t+""}function $2e(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 jo=function(e){function t(){var r;M2e(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=L2e(this,t,[].concat(i)),ja(r,"state",{isAnimationFinished:!0}),ja(r,"id",Wh("recharts-area-")),ja(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),$t(o)&&o()}),ja(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),$t(o)&&o()}),r}return I2e(t,e),O2e(t,[{key:"renderDots",value:function(n,i,a){var o=this.props.isAnimationActive,l=this.state.isAnimationFinished;if(o&&!l)return null;var c=this.props,u=c.dot,f=c.points,x=c.dataKey,m=Xt(this.props,!1),p=Xt(u,!0),y=f.map(function(b,E){var N=tl(tl(tl({key:"dot-".concat(E),r:3},m),p),{},{index:E,cx:b.x,cy:b.y,dataKey:x,value:b.value,payload:b.payload,points:f});return t.renderDotItem(u,N)}),v={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return ie.createElement(qr,vc({className:"recharts-area-dots"},v),y)}},{key:"renderHorizontalRect",value:function(n){var i=this.props,a=i.baseLine,o=i.points,l=i.strokeWidth,c=o[0].x,u=o[o.length-1].x,f=n*Math.abs(c-u),x=pl(o.map(function(m){return m.y||0}));return qe(a)&&typeof a=="number"?x=Math.max(a,x):a&&Array.isArray(a)&&a.length&&(x=Math.max(pl(a.map(function(m){return m.y||0})),x)),qe(x)?ie.createElement("rect",{x:c<u?c:c-f,y:0,width:f,height:Math.floor(x+(l?parseInt("".concat(l),10):1))}):null}},{key:"renderVerticalRect",value:function(n){var i=this.props,a=i.baseLine,o=i.points,l=i.strokeWidth,c=o[0].y,u=o[o.length-1].y,f=n*Math.abs(c-u),x=pl(o.map(function(m){return m.x||0}));return qe(a)&&typeof a=="number"?x=Math.max(a,x):a&&Array.isArray(a)&&a.length&&(x=Math.max(pl(a.map(function(m){return m.x||0})),x)),qe(x)?ie.createElement("rect",{x:0,y:c<u?c:c-f,width:x+(l?parseInt("".concat(l),10):1),height:Math.floor(f)}):null}},{key:"renderClipRect",value:function(n){var i=this.props.layout;return i==="vertical"?this.renderVerticalRect(n):this.renderHorizontalRect(n)}},{key:"renderAreaStatically",value:function(n,i,a,o){var l=this.props,c=l.layout,u=l.type,f=l.stroke,x=l.connectNulls,m=l.isRange;l.ref;var p=Zq(l,F2e);return ie.createElement(qr,{clipPath:a?"url(#clipPath-".concat(o,")"):null},ie.createElement(rf,vc({},Xt(p,!0),{points:n,connectNulls:x,type:u,baseLine:i,layout:c,stroke:"none",className:"recharts-area-area"})),f!=="none"&&ie.createElement(rf,vc({},Xt(this.props,!1),{className:"recharts-area-curve",layout:c,type:u,connectNulls:x,fill:"none",points:n})),f!=="none"&&m&&ie.createElement(rf,vc({},Xt(this.props,!1),{className:"recharts-area-curve",layout:c,type:u,connectNulls:x,fill:"none",points:i})))}},{key:"renderAreaWithAnimation",value:function(n,i){var a=this,o=this.props,l=o.points,c=o.baseLine,u=o.isAnimationActive,f=o.animationBegin,x=o.animationDuration,m=o.animationEasing,p=o.animationId,y=this.state,v=y.prevPoints,b=y.prevBaseLine;return ie.createElement(Eo,{begin:f,duration:x,isActive:u,easing:m,from:{t:0},to:{t:1},key:"area-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(E){var N=E.t;if(v){var j=v.length/l.length,A=l.map(function(D,P){var O=Math.floor(P*j);if(v[O]){var M=v[O],I=gi(M.x,D.x),V=gi(M.y,D.y);return tl(tl({},D),{},{x:I(N),y:V(N)})}return D}),w;if(qe(c)&&typeof c=="number"){var S=gi(b,c);w=S(N)}else if(nr(c)||v0(c)){var B=gi(b,0);w=B(N)}else w=c.map(function(D,P){var O=Math.floor(P*j);if(b[O]){var M=b[O],I=gi(M.x,D.x),V=gi(M.y,D.y);return tl(tl({},D),{},{x:I(N),y:V(N)})}return D});return a.renderAreaStatically(A,w,n,i)}return ie.createElement(qr,null,ie.createElement("defs",null,ie.createElement("clipPath",{id:"animationClipPath-".concat(i)},a.renderClipRect(N))),ie.createElement(qr,{clipPath:"url(#animationClipPath-".concat(i,")")},a.renderAreaStatically(l,c,n,i)))})}},{key:"renderArea",value:function(n,i){var a=this.props,o=a.points,l=a.baseLine,c=a.isAnimationActive,u=this.state,f=u.prevPoints,x=u.prevBaseLine,m=u.totalLength;return c&&o&&o.length&&(!f&&m>0||!$f(f,o)||!$f(x,l))?this.renderAreaWithAnimation(n,i):this.renderAreaStatically(o,l,n,i)}},{key:"render",value:function(){var n,i=this.props,a=i.hide,o=i.dot,l=i.points,c=i.className,u=i.top,f=i.left,x=i.xAxis,m=i.yAxis,p=i.width,y=i.height,v=i.isAnimationActive,b=i.id;if(a||!l||!l.length)return null;var E=this.state.isAnimationFinished,N=l.length===1,j=or("recharts-area",c),A=x&&x.allowDataOverflow,w=m&&m.allowDataOverflow,S=A||w,B=nr(b)?this.id:b,D=(n=Xt(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},P=D.r,O=P===void 0?3:P,M=D.strokeWidth,I=M===void 0?2:M,V=dce(o)?o:{},W=V.clipDot,_=W===void 0?!0:W,z=O*2+I;return ie.createElement(qr,{className:j},A||w?ie.createElement("defs",null,ie.createElement("clipPath",{id:"clipPath-".concat(B)},ie.createElement("rect",{x:A?f:f-p/2,y:w?u:u-y/2,width:A?p:p*2,height:w?y:y*2})),!_&&ie.createElement("clipPath",{id:"clipPath-dots-".concat(B)},ie.createElement("rect",{x:f-z/2,y:u-z/2,width:p+z,height:y+z}))):null,N?null:this.renderArea(S,B),(o||N)&&this.renderDots(S,_,B),(!v||E)&&bl.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}}])}(C.PureComponent);Qq=jo;ja(jo,"displayName","Area");ja(jo,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendT
163ype:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!C0.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});ja(jo,"getBaseValue",function(e,t,r,n){var i=e.layout,a=e.baseValue,o=t.props.baseValue,l=o??a;if(qe(l)&&typeof l=="number")return l;var c=i==="horizontal"?n:r,u=c.scale.domain();if(c.type==="number"){var f=Math.max(u[0],u[1]),x=Math.min(u[0],u[1]);return l==="dataMin"?x:l==="dataMax"||f<0?f:Math.max(Math.min(u[0],u[1]),0)}return l==="dataMin"?u[0]:l==="dataMax"?u[1]:u[0]});ja(jo,"getComposedData",function(e){var t=e.props,r=e.item,n=e.xAxis,i=e.yAxis,a=e.xAxisTicks,o=e.yAxisTicks,l=e.bandSize,c=e.dataKey,u=e.stackedData,f=e.dataStartIndex,x=e.displayedData,m=e.offset,p=t.layout,y=u&&u.length,v=Qq.getBaseValue(t,r,n,i),b=p==="horizontal",E=!1,N=x.map(function(A,w){var S;y?S=u[f+w]:(S=Qs(A,c),Array.isArray(S)?E=!0:S=[v,S]);var B=S[1]==null||y&&Qs(A,c)==null;return b?{x:_T({axis:n,ticks:a,bandSize:l,entry:A,index:w}),y:B?null:i.scale(S[1]),value:S,payload:A}:{x:B?null:n.scale(S[1]),y:_T({axis:i,ticks:o,bandSize:l,entry:A,index:w}),value:S,payload:A}}),j;return y||E?j=N.map(function(A){var w=Array.isArray(A.value)?A.value[0]:null;return b?{x:A.x,y:w!=null&&A.y!=null?i.scale(w):null}:{x:w!=null?n.scale(w):null,y:A.y}}):j=b?i.scale(v):n.scale(v),tl({points:N,baseLine:j,layout:p,isRange:E},m)});ja(jo,"renderDotItem",function(e,t){var r;if(ie.isValidElement(e))r=ie.cloneElement(e,t);else if($t(e))r=e(t);else{var n=or("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,a=Zq(t,P2e);r=ie.createElement(_E,vc({},a,{key:i,className:n}))}return r});function Qd(e){"@babel/helpers - typeof";return Qd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qd(e)}function z2e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function V2e(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,nW(n.key),n)}}function U2e(e,t,r){return t&&V2e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function q2e(e,t,r){return t=F1(t),W2e(e,tW()?Reflect.construct(t,r||[],F1(e).constructor):t.apply(e,r))}function W2e(e,t){if(t&&(Qd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return H2e(e)}function H2e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(tW=function(){return!!e})()}function F1(e){return F1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},F1(e)}function G2e(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&&V6(e,t)}function V6(e,t){return V6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},V6(e,t)}function rW(e,t,r){return t=nW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nW(e){var t=K2e(e,"string");return Qd(t)=="symbol"?t:t+""}function K2e(e,t){if(Qd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Qd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function U6(){return U6=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},U6.apply(this,arguments)}function X2e(e){var t=e.xAxisId,r=VE(),n=UE(),i=_q(t);return i==null?null:ie.createElement(N0,U6({},i,{className:or("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(o){return oo(o,!0)}}))}var Hy=function(e){function t(){return z2e(this,t),q2e(this,t,arguments)}return G2e(t,e),U2e(t,[{key:"render",value:function(){return ie.createElement(X2e,this.props)}}])}(ie.Component);rW(Hy,"displayName","XAxis");rW(Hy,"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 Zd(e){"@babel/helpers - typeof";return Zd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zd(e)}function Y2e(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,aW(n.key),n)}}function Z2e(e,t,r){return t&&Q2e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function J2e(e,t,r){return t=P1(t),e9e(e,sW()?Reflect.construct(t,r||[],P1(e).constructor):t.apply(e,r))}function e9e(e,t){if(t&&(Zd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return t9e(e)}function t9e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(sW=function(){return!!e})()}
163function P1(e){return P1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},P1(e)}function r9e(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&&q6(e,t)}function q6(e,t){return q6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},q6(e,t)}function iW(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=n9e(e,"string");return Zd(t)=="symbol"?t:t+""}function n9e(e,t){if(Zd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Zd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function W6(){return W6=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},W6.apply(this,arguments)}var s9e=function(t){var r=t.yAxisId,n=VE(),i=UE(),a=Iq(r);return a==null?null:ie.createElement(N0,W6({},a,{className:or("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:n,height:i},ticksGenerator:function(l){return oo(l,!0)}}))},KE=function(e){function t(){return Y2e(this,t),J2e(this,t,arguments)}return r9e(t,e),Z2e(t,[{key:"render",value:function(){return ie.createElement(s9e,this.props)}}])}(ie.Component);iW(KE,"displayName","YAxis");iW(KE,"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 CO(e){return l9e(e)||o9e(e)||a9e(e)||i9e()}function i9e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
164In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function a9e(e,t){if(e){if(typeof e=="string")return H6(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 H6(e,t)}}function o9e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function l9e(e){if(Array.isArray(e))return H6(e)}function H6(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 G6=function(t,r,n,i,a){var o=Qi(t,WE),l=Qi(t,Uy),c=[].concat(CO(o),CO(l)),u=Qi(t,Wy),f="".concat(i,"Id"),x=i[0],m=r;if(c.length&&(m=c.reduce(function(v,b){if(b.props[f]===n&&Fa(b.props,"extendDomain")&&qe(b.props[x])){var E=b.props[x];return[Math.min(v[0],E),Math.max(v[1],E)]}return v},m)),u.length){var p="".concat(x,"1"),y="".concat(x,"2");m=u.reduce(function(v,b){if(b.props[f]===n&&Fa(b.props,"extendDomain")&&qe(b.props[p])&&qe(b.props[y])){var E=b.props[p],N=b.props[y];return[Math.min(v[0],E,N),Math.max(v[1],E,N)]}return v},m)}return a&&a.length&&(m=a.reduce(function(v,b){return qe(b)?[Math.min(v[0],b),Math.max(v[1],b)]:v},m)),m},oC={exports:{}},wO;function c9e(){return wO||(wO=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,u,f){this.fn=c,this.context=u,this.once=f||!1}function a(c,u,f,x,m){if(typeof f!="function")throw new TypeError("The listener must be a function");var p=new i(f,x||c,m),y=r?r+u:u;return c._events[y]?c._events[y].fn?c._events[y]=[c._events[y],p]:c._events[y].push(p):(c._events[y]=p,c._eventsCount++),c}function o(c,u){--c._eventsCount===0?c._events=new n:delete c._events[u]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var u=[],f,x;if(this._eventsCount===0)return u;for(x in f=this._events)t.call(f,x)&&u.push(r?x.slice(1):x);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(f)):u},l.prototype.listeners=function(u){var f=r?r+u:u,x=this._events[f];if(!x)return[];if(x.fn)return[x.fn];for(var m=0,p=x.length,y=new Array(p);m<p;m++)y[m]=x[m].fn;return y},l.prototype.listenerCount=function(u){var f=r?r+u:u,x=this._events[f];return x?x.fn?1:x.length:0},l.prototype.emit=function(u,f,x,m,p,y){var v=r?r+u:u;if(!this._events[v])return!1;var b=this._events[v],E=arguments.length,N,j;if(b.fn){switch(b.once&&this.removeListener(u,b.fn,void 0,!0),E){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,f),!0;case 3:return b.fn.call(b.context,f,x),!0;case 4:return b.fn.call(b.context,f,x,m),!0;case 5:return b.fn.call(b.context,f,x,m,p),!0;case 6:return b.fn.call(b.context,f,x,m,p,y),!0}for(j=1,N=new Array(E-1);j<E;j++)N[j-1]=arguments[j];b.fn.apply(b.context,N)}else{var A=b.length,w;for(j=0;j<A;j++)switch(b[j].once&&this.removeListener(u,b[j].fn,void 0,!0),E){case 1:b[j].fn.call(b[j].context);break;case 2:b[j].fn.call(b[j].context,f);break;case 3:b[j].fn.call(b[j].context,f,x);break;case 4:b[j].fn.call(b[j].context,f,x,m);break;default:if(!N)for(w=1,N=new Array(E-1);w<E;w++)N[w-1]=arguments[w];b[j].fn.apply(b[j].context,N)}}return!0},l.prototype.on=function(u,f,x){return a(this,u,f,x,!1)},l.prototype.once=function(u,f,x){return a(this,u,f,x,!0)},l.prototype.removeListener=function(u,f,x,m){var p=r?r+u:u;if(!this._events[p])return this;if(!f)return o(this,p),this;var y=this._events[p];if(y.fn)y.fn===f&&(!m||y.once)&&(!x||y.context===x)&&o(this,p);else{for(var v=0,b=[],E=y.length;v<E;v++)(y[v].fn!==f||m&&!y[v].once||x&&y[v].context!==x)&&b.push(y[v]);b.length?this._events[p]=b.length===1?b[0]:b:o(this,p)}return this},l.prototype.removeAllListeners=function(u){var f;return u?(f=r?r+u:u,this._events[f]&&o(this,f)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=r,l.EventEmitter=l,e.exports=l}(oC)),oC.exports}var u9e=c9e();const d9e=lr(u9e);var lC=new d9e,cC="recharts.syncMouseEvents";function lh(e){"@babel/helpers - typeof";return lh=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},lh(e)}function x9e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f9e(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,oW(n.key),n)}}function h9e(e,t,r){return t&&f9e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function uC(e,t,r){return t=oW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oW(e){var t=m9e(e,"string");return lh(t)=="symbol"?t:t+""}function m9e(e,t){if(lh(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(lh(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var p9e=function(){function e(){x9e(this,e),uC(this,"activeIndex",0),uC(this,"coordinateList",[]),uC(this,"layout","horizontal")}return h9e(e,[{key:"setDetails",value:function(r){var n,i=r.coordinateList,a=i===void 0?null:i,o=r.container,l=o===void 0?null:o,c=r.layout,u=c===void 0?null:c,f=r.offset,x=f===void 0?null:f,m=r.mouseHandlerCallback,p=m===void 0?null:m;this.coordinateList=(n=a??this.coordinateList)!==null&&n!==void 0?n:[],this.container=l??this.container,this.layout=u??this.layout,this.offset=x??this.offset,this.mouseHandlerCallback=p??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(r){if(this.coordinateList.length!==0)switch(r.key){case"ArrowRight":{if
164(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(r){this.activeIndex=r}},{key:"spoofMouse",value:function(){var r,n;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var i=this.container.getBoundingClientRect(),a=i.x,o=i.y,l=i.height,c=this.coordinateList[this.activeIndex].coordinate,u=((r=window)===null||r===void 0?void 0:r.scrollX)||0,f=((n=window)===null||n===void 0?void 0:n.scrollY)||0,x=a+c+u,m=o+this.offset.top+l/2+f;this.mouseHandlerCallback({pageX:x,pageY:m})}}}])}();function g9e(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&&qe(n)&&qe(i))return!0}return!1}function y9e(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 lW(e){var t=e.cx,r=e.cy,n=e.radius,i=e.startAngle,a=e.endAngle,o=Wn(t,r,n,i),l=Wn(t,r,n,a);return{points:[o,l],cx:t,cy:r,radius:n,startAngle:i,endAngle:a}}function v9e(e,t,r){var n,i,a,o;if(e==="horizontal")n=t.x,a=n,i=r.top,o=r.top+r.height;else if(e==="vertical")i=t.y,o=i,n=r.left,a=r.left+r.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var l=t.cx,c=t.cy,u=t.innerRadius,f=t.outerRadius,x=t.angle,m=Wn(l,c,u,x),p=Wn(l,c,f,x);n=m.x,i=m.y,a=p.x,o=p.y}else return lW(t);return[{x:n,y:i},{x:a,y:o}]}function ch(e){"@babel/helpers - typeof";return ch=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},ch(e)}function EO(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 kp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?EO(Object(r),!0).forEach(function(n){b9e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):EO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function b9e(e,t,r){return t=C9e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function C9e(e){var t=w9e(e,"string");return ch(t)=="symbol"?t:t+""}function w9e(e,t){if(ch(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ch(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function E9e(e){var t,r,n=e.element,i=e.tooltipEventType,a=e.isActive,o=e.activeCoordinate,l=e.activePayload,c=e.offset,u=e.activeTooltipIndex,f=e.tooltipAxisBandSize,x=e.layout,m=e.chartName,p=(t=n.props.cursor)!==null&&t!==void 0?t:(r=n.type.defaultProps)===null||r===void 0?void 0:r.cursor;if(!n||!p||!a||!o||m!=="ScatterChart"&&i!=="axis")return null;var y,v=rf;if(m==="ScatterChart")y=o,v=jye;else if(m==="BarChart")y=y9e(x,o,c,f),v=RE;else if(x==="radial"){var b=lW(o),E=b.cx,N=b.cy,j=b.radius,A=b.startAngle,w=b.endAngle;y={cx:E,cy:N,startAngle:A,endAngle:w,innerRadius:j,outerRadius:j},v=hq}else y={points:v9e(x,o,c)},v=rf;var S=kp(kp(kp(kp({stroke:"#ccc",pointerEvents:"none"},c),y),Xt(p,!1)),{},{payload:l,payloadIndex:u,className:or("recharts-tooltip-cursor",p.className)});return C.isValidElement(p)?C.cloneElement(p,S):C.createElement(v,S)}var j9e=["item"],N9e=["children","className","width","height","style","compact","title","desc"];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 Zu(){return Zu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
164for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Zu.apply(this,arguments)}function jO(e,t){return S9e(e)||k9e(e,t)||uW(e,t)||A9e()}function A9e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
165In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function k9e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function S9e(e){if(Array.isArray(e))return e}function NO(e,t){if(e==null)return{};var r=B9e(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function B9e(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 D9e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function F9e(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,dW(n.key),n)}}function P9e(e,t,r){return t&&F9e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function T9e(e,t,r){return t=T1(t),M9e(e,cW()?Reflect.construct(t,r||[],T1(e).constructor):t.apply(e,r))}function M9e(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 O9e(e)}function O9e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(cW=function(){return!!e})()}function T1(e){return T1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},T1(e)}function L9e(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&&K6(e,t)}function K6(e,t){return K6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},K6(e,t)}function e0(e){return I9e(e)||_9e(e)||uW(e)||R9e()}function R9e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
166In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uW(e,t){if(e){if(typeof e=="string")return X6(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 X6(e,t)}}function _9e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function I9e(e){if(Array.isArray(e))return X6(e)}function X6(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 AO(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 Be(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?AO(Object(r),!0).forEach(function(n){jt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):AO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jt(e,t,r){return t=dW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dW(e){var t=$9e(e,"string");return Jd(t)=="symbol"?t:t+""}function $9e(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(t==="string"?String:Number)(e)}var z9e={xAxis:["bottom","top"],yAxis:["left","right"]},V9e={width:"100%",height:"100%"},xW={x:0,y:0};function Sp(e){return e}var U9e=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},q9e=function(t,r,n,i){var a=r.find(function(f){return f&&f.index===n});if(a){if(t==="horizontal")return{x:a.coordinate,y:i.y};if(t==="vertical")return{x:i.x,y:a.coordinate};if(t==="centric"){var o=a.coordinate,l=i.radius;return Be(Be(Be({},i),Wn(i.cx,i.cy,l,o)),{},{angle:o,radius:l})}var c=a.coordinate,u=i.angle;return Be(Be(Be({},i),Wn(i.cx,i.cy,c,u)),{},{angle:u,radius:c})}return xW},Gy=function(t,r){var n=r.graphicalItems,i=r.dataStartIndex,a=r.dataEndIndex,o=(n??[]).reduce(function(l,c){var u=c.props.data;return u&&u.length?[].concat(e0(l),e0(u)):l},[]);return o.length>0?o:t&&t.length&&qe(i)&&qe(a)?t.slice(i,a+1):[]};function fW(e){return e==="number"?[0,"auto"]:void 0}var Y6=function(t,r,n,i){var a=t.graphicalItems,o=t.tooltipAxis,l=Gy(r,t);return n<0||!a||!a.length||n>=l.length?null:a.reduce(function(c,u){var f,x=(f=u.props.data)!==null&&f!==void 0?f:r;x&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(x=x.slice(t.dataStartIndex,t.dataEndIndex+1));var m;if(o.dataKey&&!o.allowDuplicatedCategory){var p=x===void 0?l:x;m=_g(p,o.dataKey,i)}else m=x&&x[n]||l[n];return m?[].concat(e0(c),[dq(u,m)]):c},[])},kO=function(t,r,n,i){var a=i||{x:t.chartX,y:t.chartY},o=U9e(a,n),l=t.orderedTooltipTicks,c=t.tooltipAxis,u=t.tooltipTicks,f=dpe(o,l,u,c);if(f>=0&&u){var x=u[f]&&u[f].value,m=Y6(t,r,f,x),p=q9e(n,l,f,a);return{activeTooltipIndex:f,activeLabel:x,activePayload:m,activeCoordinate:p}}return null},W9e=function(t,r){var n=r.axes,i=r.graphicalItems,a=r.axisType,o=r.axisIdKey,l=r.stackGroups,c=r.dataStartIndex,u=r.dataEndIndex,f=t.layout,x=t.children,m=t.stackOffset,p=lq(f,a);return n.reduce(function(y,v){var b,E=v.type.defaultProps!==void 0?Be(Be({},v.type.defaultProps),v.props):v.props,N=E.type,j=E.dataKey,A=E.allowDataOverflow,w=E.allowDuplicatedCategory,S=E.scale,B=E.ticks,D=E.includeHidden,P=E[o];if(y[P])return y;var O=Gy(t.data,{graphicalItems:i.filter(function(H){var te,ne=o in H.props?H.props[o]:(te=H.type.defaultProps)===null||te===void 0?void 0:te[o];return ne===P}),dataStartIndex:c,dataEndIndex:u}),M=O.length,I,V,W;g9e(E.domain,A,N)&&(I=m6(E.domain,null,A),p&&(N==="number"||S!=="auto")&&(W=tf(O,j,"category")));var _=fW(N);if(!I||I.length===0){var z,R=(z=E.domain)!==null&&z!==void 0?z:_;if(j){if(I=tf(O,j,N),N==="category"&&p){var q=tce(I);w&&q?(V=I,I=b1(0,M)):w||(I=VT(R,I,v).reduce(function(H,te){return H.indexOf(te)>=0?H:[].concat(e0(H),[te])},[]))}
166else if(N==="category")w?I=I.filter(function(H){return H!==""&&!nr(H)}):I=VT(R,I,v).reduce(function(H,te){return H.indexOf(te)>=0||te===""||nr(te)?H:[].concat(e0(H),[te])},[]);else if(N==="number"){var G=ppe(O,i.filter(function(H){var te,ne,Y=o in H.props?H.props[o]:(te=H.type.defaultProps)===null||te===void 0?void 0:te[o],J="hide"in H.props?H.props.hide:(ne=H.type.defaultProps)===null||ne===void 0?void 0:ne.hide;return Y===P&&(D||!J)}),j,a,f);G&&(I=G)}p&&(N==="number"||S!=="auto")&&(W=tf(O,j,"category"))}else p?I=b1(0,M):l&&l[P]&&l[P].hasStack&&N==="number"?I=m==="expand"?[0,1]:uq(l[P].stackGroups,c,u):I=oq(O,i.filter(function(H){var te=o in H.props?H.props[o]:H.type.defaultProps[o],ne="hide"in H.props?H.props.hide:H.type.defaultProps.hide;return te===P&&(D||!ne)}),N,f,!0);if(N==="number")I=G6(x,I,P,a,B),R&&(I=m6(R,I,A));else if(N==="category"&&R){var K=R,$=I.every(function(H){return K.indexOf(H)>=0});$&&(I=K)}}return Be(Be({},y),{},jt({},P,Be(Be({},E),{},{axisType:a,domain:I,categoricalDomain:W,duplicateDomain:V,originalDomain:(b=E.domain)!==null&&b!==void 0?b:_,isCategorical:p,layout:f})))},{})},H9e=function(t,r){var n=r.graphicalItems,i=r.Axis,a=r.axisType,o=r.axisIdKey,l=r.stackGroups,c=r.dataStartIndex,u=r.dataEndIndex,f=t.layout,x=t.children,m=Gy(t.data,{graphicalItems:n,dataStartIndex:c,dataEndIndex:u}),p=m.length,y=lq(f,a),v=-1;return n.reduce(function(b,E){var N=E.type.defaultProps!==void 0?Be(Be({},E.type.defaultProps),E.props):E.props,j=N[o],A=fW("number");if(!b[j]){v++;var w;return y?w=b1(0,p):l&&l[j]&&l[j].hasStack?(w=uq(l[j].stackGroups,c,u),w=G6(x,w,j,a)):(w=m6(A,oq(m,n.filter(function(S){var B,D,P=o in S.props?S.props[o]:(B=S.type.defaultProps)===null||B===void 0?void 0:B[o],O="hide"in S.props?S.props.hide:(D=S.type.defaultProps)===null||D===void 0?void 0:D.hide;return P===j&&!O}),"number",f),i.defaultProps.allowDataOverflow),w=G6(x,w,j,a)),Be(Be({},b),{},jt({},j,Be(Be({axisType:a},i.defaultProps),{},{hide:!0,orientation:wi(z9e,"".concat(a,".").concat(v%2),null),domain:w,originalDomain:A,isCategorical:y,layout:f})))}return b},{})},G9e=function(t,r){var n=r.axisType,i=n===void 0?"xAxis":n,a=r.AxisComp,o=r.graphicalItems,l=r.stackGroups,c=r.dataStartIndex,u=r.dataEndIndex,f=t.children,x="".concat(i,"Id"),m=Qi(f,a),p={};return m&&m.length?p=W9e(t,{axes:m,graphicalItems:o,axisType:i,axisIdKey:x,stackGroups:l,dataStartIndex:c,dataEndIndex:u}):o&&o.length&&(p=H9e(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:x,stackGroups:l,dataStartIndex:c,dataEndIndex:u})),p},K9e=function(t){var r=il(t),n=oo(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:uE(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:d1(r,n)}},SO=function(t){var r=t.children,n=t.defaultShowTooltip,i=Ks(r,qd),a=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!n}},X9e=function(t){return!t||!t.length?!1:t.some(function(r){var n=co(r&&r.type);return n&&n.indexOf("Bar")>=0})},BO=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"}},Y9e=function(t,r){var n=t.props,i=t.graphicalItems,a=t.xAxisMap,o=a===void 0?{}:a,l=t.yAxisMap,c=l===void 0?{}:l,u=n.width,f=n.height,x=n.children,m=n.margin||{},p=Ks(x,qd),y=Ks(x,ad),v=Object.keys(c).reduce(function(w,S){var B=c[S],D=B.orientation;return!B.mirror&&!B.hide?Be(Be({},w),{},jt({},D,w[D]+B.width)):w},{left:m.left||0,right:m.right||0}),b=Object.keys(o).reduce(function(w,S){var B=o[S],D=B.orientation;return!B.mirror&&!B.hide?Be(Be({},w),{},jt({},D,wi(w,"".concat(D))+B.height)):w},{top:m.top||0,bottom:m.bottom||0}),E=Be(Be({},b),v),N=E.bottom;p&&(E.bottom+=p.props.height||qd.defaultProps.height),y&&r&&(E=hpe(E,i,n,r));var j=u-E.left-E.right,A=f-E.top-E.bottom;return Be(Be({brushBottom:N},E),{},{width:Math.max(j,0),height:Math.max(A,0)})},Q9e=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},Z9e=function(t){var r=t.chartName,n=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,o=t.validateTooltipEventTypes,l=o===void 0?["axis"]:o,c=t.axisComponents,u=t.legendContent,f=t.formatAxisMap,x=t.defaultProps,m=function(E,N){var j=N.graphicalItems,A=N.stackGroups,w=N.offset,S=N.updateId,B=N.dataStartIndex,D=N.dataEndIndex,P=E.barSize,O=E.layout,M=E.barGap,I=E.barCategoryGap,V=E.maxBarSize,W=BO(O),_=W.numericAxisName,z=W.cateAxisName,R=X9e(j),q=[];
166return j.forEach(function(G,K){var $=Gy(E.data,{graphicalItems:[G],dataStartIndex:B,dataEndIndex:D}),H=G.type.defaultProps!==void 0?Be(Be({},G.type.defaultProps),G.props):G.props,te=H.dataKey,ne=H.maxBarSize,Y=H["".concat(_,"Id")],J=H["".concat(z,"Id")],oe={},he=c.reduce(function(Te,Se){var He=N["".concat(Se.axisType,"Map")],Ue=H["".concat(Se.axisType,"Id")];He&&He[Ue]||Se.axisType==="zAxis"||Qc();var rt=He[Ue];return Be(Be({},Te),{},jt(jt({},Se.axisType,rt),"".concat(Se.axisType,"Ticks"),oo(rt)))},oe),Q=he[z],ue=he["".concat(z,"Ticks")],de=A&&A[Y]&&A[Y].hasStack&&Spe(G,A[Y].stackGroups),me=co(G.type).indexOf("Bar")>=0,Le=d1(Q,ue),Ne=[],ye=R&&xpe({barSize:P,stackGroups:A,totalSize:Q9e(he,z)});if(me){var ee,Ae,De=nr(ne)?V:ne,we=(ee=(Ae=d1(Q,ue,!0))!==null&&Ae!==void 0?Ae:De)!==null&&ee!==void 0?ee:0;Ne=fpe({barGap:M,barCategoryGap:I,bandSize:we!==Le?we:Le,sizeList:ye[J],maxBarSize:De}),we!==Le&&(Ne=Ne.map(function(Te){return Be(Be({},Te),{},{position:Be(Be({},Te.position),{},{offset:Te.position.offset-we/2})})}))}var je=G&&G.type&&G.type.getComposedData;je&&q.push({props:Be(Be({},je(Be(Be({},he),{},{displayedData:$,props:E,dataKey:te,item:G,bandSize:Le,barPosition:Ne,offset:w,stackedData:de,layout:O,dataStartIndex:B,dataEndIndex:D}))),{},jt(jt(jt({key:G.key||"item-".concat(K)},_,he[_]),z,he[z]),"animationId",S)),childIndex:hce(G,E.children),item:G})}),q},p=function(E,N){var j=E.props,A=E.dataStartIndex,w=E.dataEndIndex,S=E.updateId;if(!rD({props:j}))return null;var B=j.children,D=j.layout,P=j.stackOffset,O=j.data,M=j.reverseStackOrder,I=BO(D),V=I.numericAxisName,W=I.cateAxisName,_=Qi(B,n),z=Npe(O,_,"".concat(V,"Id"),"".concat(W,"Id"),P,M),R=c.reduce(function(H,te){var ne="".concat(te.axisType,"Map");return Be(Be({},H),{},jt({},ne,G9e(j,Be(Be({},te),{},{graphicalItems:_,stackGroups:te.axisType===V&&z,dataStartIndex:A,dataEndIndex:w}))))},{}),q=Y9e(Be(Be({},R),{},{props:j,graphicalItems:_}),N==null?void 0:N.legendBBox);Object.keys(R).forEach(function(H){R[H]=f(j,R[H],q,H.replace("Map",""),r)});var G=R["".concat(W,"Map")],K=K9e(G),$=m(j,Be(Be({},R),{},{dataStartIndex:A,dataEndIndex:w,updateId:S,graphicalItems:_,stackGroups:z,offset:q}));return Be(Be({formattedGraphicalItems:$,graphicalItems:_,offset:q,stackGroups:z},K),R)},y=function(b){function E(N){var j,A,w;return D9e(this,E),w=T9e(this,E,[N]),jt(w,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),jt(w,"accessibilityManager",new p9e),jt(w,"handleLegendBBoxUpdate",function(S){if(S){var B=w.state,D=B.dataStartIndex,P=B.dataEndIndex,O=B.updateId;w.setState(Be({legendBBox:S},p({props:w.props,dataStartIndex:D,dataEndIndex:P,updateId:O},Be(Be({},w.state),{},{legendBBox:S}))))}}),jt(w,"handleReceiveSyncEvent",function(S,B,D){if(w.props.syncId===S){if(D===w.eventEmitterSymbol&&typeof w.props.syncMethod!="function")return;w.applySyncEvent(B)}}),jt(w,"handleBrushChange",function(S){var B=S.startIndex,D=S.endIndex;if(B!==w.state.dataStartIndex||D!==w.state.dataEndIndex){var P=w.state.updateId;w.setState(function(){return Be({dataStartIndex:B,dataEndIndex:D},p({props:w.props,dataStartIndex:B,dataEndIndex:D,updateId:P},w.state))}),w.triggerSyncEvent({dataStartIndex:B,dataEndIndex:D})}}),jt(w,"handleMouseEnter",function(S){var B=w.getMouseInfo(S);if(B){var D=Be(Be({},B),{},{isTooltipActive:!0});w.setState(D),w.triggerSyncEvent(D);var P=w.props.onMouseEnter;$t(P)&&P(D,S)}}),jt(w,"triggeredAfterMouseMove",function(S){var B=w.getMouseInfo(S),D=B?Be(Be({},B),{},{isTooltipActive:!0}):{isTooltipActive:!1};w.setState(D),w.triggerSyncEvent(D);var P=w.props.onMouseMove;$t(P)&&P(D,S)}),jt(w,"handleItemMouseEnter",function(S){w.setState(function(){return{isTooltipActive:!0,activeItem:S,activePayload:S.tooltipPayload,activeCoordinate:S.tooltipPosition||{x:S.cx,y:S.cy}}})}),jt(w,"handleItemMouseLeave",function(){w.setState(function(){return{isTooltipActive:!1}})}),jt(w,"handleMouseMove",function(S){S.persist(),w.throttleTriggeredAfterMouseMove(S)}),jt(w,"handleMouseLeave",function(S){w.throttleTriggeredAfterMouseMove.cancel();var B={isTooltipActive:!1};w.setState(B),w.triggerSyncEvent(B);var D=w.props.onMouseLeave;$t(D)&&D(B,S)}),jt(w,"handleOuterEvent",function(S){var B=fce(S),D=wi(w.props,"".concat(B));if(B&&$t(D)){var P,O;
166/.*touch.*/i.test(B)?O=w.getMouseInfo(S.changedTouches[0]):O=w.getMouseInfo(S),D((P=O)!==null&&P!==void 0?P:{},S)}}),jt(w,"handleClick",function(S){var B=w.getMouseInfo(S);if(B){var D=Be(Be({},B),{},{isTooltipActive:!0});w.setState(D),w.triggerSyncEvent(D);var P=w.props.onClick;$t(P)&&P(D,S)}}),jt(w,"handleMouseDown",function(S){var B=w.props.onMouseDown;if($t(B)){var D=w.getMouseInfo(S);B(D,S)}}),jt(w,"handleMouseUp",function(S){var B=w.props.onMouseUp;if($t(B)){var D=w.getMouseInfo(S);B(D,S)}}),jt(w,"handleTouchMove",function(S){S.changedTouches!=null&&S.changedTouches.length>0&&w.throttleTriggeredAfterMouseMove(S.changedTouches[0])}),jt(w,"handleTouchStart",function(S){S.changedTouches!=null&&S.changedTouches.length>0&&w.handleMouseDown(S.changedTouches[0])}),jt(w,"handleTouchEnd",function(S){S.changedTouches!=null&&S.changedTouches.length>0&&w.handleMouseUp(S.changedTouches[0])}),jt(w,"handleDoubleClick",function(S){var B=w.props.onDoubleClick;if($t(B)){var D=w.getMouseInfo(S);B(D,S)}}),jt(w,"handleContextMenu",function(S){var B=w.props.onContextMenu;if($t(B)){var D=w.getMouseInfo(S);B(D,S)}}),jt(w,"triggerSyncEvent",function(S){w.props.syncId!==void 0&&lC.emit(cC,w.props.syncId,S,w.eventEmitterSymbol)}),jt(w,"applySyncEvent",function(S){var B=w.props,D=B.layout,P=B.syncMethod,O=w.state.updateId,M=S.dataStartIndex,I=S.dataEndIndex;if(S.dataStartIndex!==void 0||S.dataEndIndex!==void 0)w.setState(Be({dataStartIndex:M,dataEndIndex:I},p({props:w.props,dataStartIndex:M,dataEndIndex:I,updateId:O},w.state)));else if(S.activeTooltipIndex!==void 0){var V=S.chartX,W=S.chartY,_=S.activeTooltipIndex,z=w.state,R=z.offset,q=z.tooltipTicks;if(!R)return;if(typeof P=="function")_=P(q,S);else if(P==="value"){_=-1;for(var G=0;G<q.length;G++)if(q[G].value===S.activeLabel){_=G;break}}var K=Be(Be({},R),{},{x:R.left,y:R.top}),$=Math.min(V,K.x+K.width),H=Math.min(W,K.y+K.height),te=q[_]&&q[_].value,ne=Y6(w.state,w.props.data,_),Y=q[_]?{x:D==="horizontal"?q[_].coordinate:$,y:D==="horizontal"?H:q[_].coordinate}:xW;w.setState(Be(Be({},S),{},{activeLabel:te,activeCoordinate:Y,activePayload:ne,activeTooltipIndex:_}))}else w.setState(S)}),jt(w,"renderCursor",function(S){var B,D=w.state,P=D.isTooltipActive,O=D.activeCoordinate,M=D.activePayload,I=D.offset,V=D.activeTooltipIndex,W=D.tooltipAxisBandSize,_=w.getTooltipEventType(),z=(B=S.props.active)!==null&&B!==void 0?B:P,R=w.props.layout,q=S.key||"_recharts-cursor";return ie.createElement(E9e,{key:q,activeCoordinate:O,activePayload:M,activeTooltipIndex:V,chartName:r,element:S,isActive:z,layout:R,offset:I,tooltipAxisBandSize:W,tooltipEventType:_})}),jt(w,"renderPolarAxis",function(S,B,D){var P=wi(S,"type.axisType"),O=wi(w.state,"".concat(P,"Map")),M=S.type.defaultProps,I=M!==void 0?Be(Be({},M),S.props):S.props,V=O&&O[I["".concat(P,"Id")]];return C.cloneElement(S,Be(Be({},V),{},{className:or(P,V.className),key:S.key||"".concat(B,"-").concat(D),ticks:oo(V,!0)}))}),jt(w,"renderPolarGrid",function(S){var B=S.props,D=B.radialLines,P=B.polarAngles,O=B.polarRadius,M=w.state,I=M.radiusAxisMap,V=M.angleAxisMap,W=il(I),_=il(V),z=_.cx,R=_.cy,q=_.innerRadius,G=_.outerRadius;return C.cloneElement(S,{polarAngles:Array.isArray(P)?P:oo(_,!0).map(function(K){return K.coordinate}),polarRadius:Array.isArray(O)?O:oo(W,!0).map(function(K){return K.coordinate}),cx:z,cy:R,innerRadius:q,outerRadius:G,key:S.key||"polar-grid",radialLines:D})}),jt(w,"renderLegend",function(){var S=w.state.formattedGraphicalItems,B=w.props,D=B.children,P=B.width,O=B.height,M=w.props.margin||{},I=P-(M.left||0)-(M.right||0),V=iq({children:D,formattedGraphicalItems:S,legendWidth:I,legendContent:u});if(!V)return null;var W=V.item,_=NO(V,j9e);return C.cloneElement(W,Be(Be({},_),{},{chartWidth:P,chartHeight:O,margin:M,onBBoxUpdate:w.handleLegendBBoxUpdate}))}),jt(w,"renderTooltip",function(){var S,B=w.props,D=B.children,P=B.accessibilityLayer,O=Ks(D,da);if(!O)return null;var M=w.state,I=M.isTooltipActive,V=M.activeCoordinate,W=M.activePayload,_=M.activeLabel,z=M.offset,R=(S=O.props.active)!==null&&S!==void 0?S:I;
166return C.cloneElement(O,{viewBox:Be(Be({},z),{},{x:z.left,y:z.top}),active:R,label:_,payload:R?W:[],coordinate:V,accessibilityLayer:P})}),jt(w,"renderBrush",function(S){var B=w.props,D=B.margin,P=B.data,O=w.state,M=O.offset,I=O.dataStartIndex,V=O.dataEndIndex,W=O.updateId;return C.cloneElement(S,{key:S.key||"_recharts-brush",onChange:Ep(w.handleBrushChange,S.props.onChange),data:P,x:qe(S.props.x)?S.props.x:M.left,y:qe(S.props.y)?S.props.y:M.top+M.height+M.brushBottom-(D.bottom||0),width:qe(S.props.width)?S.props.width:M.width,startIndex:I,endIndex:V,updateId:"brush-".concat(W)})}),jt(w,"renderReferenceElement",function(S,B,D){if(!S)return null;var P=w,O=P.clipPathId,M=w.state,I=M.xAxisMap,V=M.yAxisMap,W=M.offset,_=S.type.defaultProps||{},z=S.props,R=z.xAxisId,q=R===void 0?_.xAxisId:R,G=z.yAxisId,K=G===void 0?_.yAxisId:G;return C.cloneElement(S,{key:S.key||"".concat(B,"-").concat(D),xAxis:I[q],yAxis:V[K],viewBox:{x:W.left,y:W.top,width:W.width,height:W.height},clipPathId:O})}),jt(w,"renderActivePoints",function(S){var B=S.item,D=S.activePoint,P=S.basePoint,O=S.childIndex,M=S.isRange,I=[],V=B.props.key,W=B.item.type.defaultProps!==void 0?Be(Be({},B.item.type.defaultProps),B.item.props):B.item.props,_=W.activeDot,z=W.dataKey,R=Be(Be({index:O,dataKey:z,cx:D.x,cy:D.y,r:4,fill:LE(B.item),strokeWidth:2,stroke:"#fff",payload:D.payload,value:D.value},Xt(_,!1)),Ig(_));return I.push(E.renderActiveDot(_,R,"".concat(V,"-activePoint-").concat(O))),P?I.push(E.renderActiveDot(_,Be(Be({},R),{},{cx:P.x,cy:P.y}),"".concat(V,"-basePoint-").concat(O))):M&&I.push(null),I}),jt(w,"renderGraphicChild",function(S,B,D){var P=w.filterFormatItem(S,B,D);if(!P)return null;var O=w.getTooltipEventType(),M=w.state,I=M.isTooltipActive,V=M.tooltipAxis,W=M.activeTooltipIndex,_=M.activeLabel,z=w.props.children,R=Ks(z,da),q=P.props,G=q.points,K=q.isRange,$=q.baseLine,H=P.item.type.defaultProps!==void 0?Be(Be({},P.item.type.defaultProps),P.item.props):P.item.props,te=H.activeDot,ne=H.hide,Y=H.activeBar,J=H.activeShape,oe=!!(!ne&&I&&R&&(te||Y||J)),he={};O!=="axis"&&R&&R.props.trigger==="click"?he={onClick:Ep(w.handleItemMouseEnter,S.props.onClick)}:O!=="axis"&&(he={onMouseLeave:Ep(w.handleItemMouseLeave,S.props.onMouseLeave),onMouseEnter:Ep(w.handleItemMouseEnter,S.props.onMouseEnter)});var Q=C.cloneElement(S,Be(Be({},P.props),he));function ue(Se){return typeof V.dataKey=="function"?V.dataKey(Se.payload):null}if(oe)if(W>=0){var de,me;if(V.dataKey&&!V.allowDuplicatedCategory){var Le=typeof V.dataKey=="function"?ue:"payload.".concat(V.dataKey.toString());de=_g(G,Le,_),me=K&&$&&_g($,Le,_)}else de=G==null?void 0:G[W],me=K&&$&&$[W];if(J||Y){var Ne=S.props.activeIndex!==void 0?S.props.activeIndex:W;return[C.cloneElement(S,Be(Be(Be({},P.props),he),{},{activeIndex:Ne})),null,null]}if(!nr(de))return[Q].concat(e0(w.renderActivePoints({item:P,activePoint:de,basePoint:me,childIndex:W,isRange:K})))}else{var ye,ee=(ye=w.getItemByXY(w.state.activeCoordinate))!==null&&ye!==void 0?ye:{graphicalItem:Q},Ae=ee.graphicalItem,De=Ae.item,we=De===void 0?S:De,je=Ae.childIndex,Te=Be(Be(Be({},P.props),he),{},{activeIndex:je});return[C.cloneElement(we,Te),null,null]}return K?[Q,null,null]:[Q,null]}),jt(w,"renderCustomized",function(S,B,D){return C.cloneElement(S,Be(Be({key:"recharts-customized-".concat(D)},w.props),w.state))}),jt(w,"renderMap",{CartesianGrid:{handler:Sp,once:!0},ReferenceArea:{handler:w.renderReferenceElement},ReferenceLine:{handler:Sp},ReferenceDot:{handler:w.renderReferenceElement},XAxis:{handler:Sp},YAxis:{handler:Sp},Brush:{handler:w.renderBrush,once:!0},Bar:{handler:w.renderGraphicChild},Line:{handler:w.renderGraphicChild},Area:{handler:w.renderGraphicChild},Radar:{handler:w.renderGraphicChild},RadialBar:{handler:w.renderGraphicChild},Scatter:{handler:w.renderGraphicChild},Pie:{handler:w.renderGraphicChild},Funnel:{handler:w.renderGraphicChild},Tooltip:{handler:w.renderCursor,once:!0},PolarGrid:{handler:w.renderPolarGrid,once:!0},PolarAngleAxis:{handler:w.renderPolarAxis},PolarRadiusAxis:{handler:w.renderPolarAxis},Customized:{handler:w.renderCustomized}}),w.clipPathId="".concat((j=N.id)!==null&&j!==void 0?j:Wh("recharts"),"-clip"),w.throttleTriggeredAfterMouseMove=sU(w.triggeredAfterMouseMove,(A=N.throttleDelay)!==null&&A!==void 0?A:1e3/60),w.state={},w}
166return L9e(E,b),P9e(E,[{key:"componentDidMount",value:function(){var j,A;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(j=this.props.margin.left)!==null&&j!==void 0?j:0,top:(A=this.props.margin.top)!==null&&A!==void 0?A:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var j=this.props,A=j.children,w=j.data,S=j.height,B=j.layout,D=Ks(A,da);if(D){var P=D.props.defaultIndex;if(!(typeof P!="number"||P<0||P>this.state.tooltipTicks.length-1)){var O=this.state.tooltipTicks[P]&&this.state.tooltipTicks[P].value,M=Y6(this.state,w,P,O),I=this.state.tooltipTicks[P].coordinate,V=(this.state.offset.top+S)/2,W=B==="horizontal",_=W?{x:I,y:V}:{y:I,x:V},z=this.state.formattedGraphicalItems.find(function(q){var G=q.item;return G.type.name==="Scatter"});z&&(_=Be(Be({},_),z.props.points[P].tooltipPosition),M=z.props.points[P].tooltipPayload);var R={activeTooltipIndex:P,isTooltipActive:!0,activeLabel:O,activePayload:M,activeCoordinate:_};this.setState(R),this.renderCursor(D),this.accessibilityManager.setIndex(P)}}}},{key:"getSnapshotBeforeUpdate",value:function(j,A){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==A.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==j.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==j.margin){var w,S;this.accessibilityManager.setDetails({offset:{left:(w=this.props.margin.left)!==null&&w!==void 0?w:0,top:(S=this.props.margin.top)!==null&&S!==void 0?S:0}})}return null}},{key:"componentDidUpdate",value:function(j){Rw([Ks(j.children,da)],[Ks(this.props.children,da)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var j=Ks(this.props.children,da);if(j&&typeof j.props.shared=="boolean"){var A=j.props.shared?"axis":"item";return l.indexOf(A)>=0?A:a}return a}},{key:"getMouseInfo",value:function(j){if(!this.container)return null;var A=this.container,w=A.getBoundingClientRect(),S=txe(w),B={chartX:Math.round(j.pageX-S.left),chartY:Math.round(j.pageY-S.top)},D=w.width/A.offsetWidth||1,P=this.inRange(B.chartX,B.chartY,D);if(!P)return null;var O=this.state,M=O.xAxisMap,I=O.yAxisMap,V=this.getTooltipEventType(),W=kO(this.state,this.props.data,this.props.layout,P);if(V!=="axis"&&M&&I){var _=il(M).scale,z=il(I).scale,R=_&&_.invert?_.invert(B.chartX):null,q=z&&z.invert?z.invert(B.chartY):null;return Be(Be({},B),{},{xValue:R,yValue:q},W)}return W?Be(Be({},B),W):null}},{key:"inRange",value:function(j,A){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,S=this.props.layout,B=j/w,D=A/w;if(S==="horizontal"||S==="vertical"){var P=this.state.offset,O=B>=P.left&&B<=P.left+P.width&&D>=P.top&&D<=P.top+P.height;return O?{x:B,y:D}:null}var M=this.state,I=M.angleAxisMap,V=M.radiusAxisMap;if(I&&V){var W=il(I);return WT({x:B,y:D},W)}return null}},{key:"parseEventsOfWrapper",value:function(){var j=this.props.children,A=this.getTooltipEventType(),w=Ks(j,da),S={};w&&A==="axis"&&(w.props.trigger==="click"?S={onClick:this.handleClick}:S={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 B=Ig(this.props,this.handleOuterEvent);return Be(Be({},B),S)}},{key:"addListener",value:function(){lC.on(cC,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){lC.removeListener(cC,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(j,A,w){for(var S=this.state.formattedGraphicalItems,B=0,D=S.length;B<D;B++){var P=S[B];if(P.item===j||P.props.key===j.key||A===co(P.item.type)&&w===P.childIndex)return P}return null}},{key:"renderClipPath",value:function(){var j=this.clipPathId,A=this.state.offset,w=A.left,S=A.top,B=A.height,D=A.width;return ie.createElement("defs",null,ie.createElement("clipPath",{id:j},ie.createElement("rect",{x:w,y:S,height:B,width:D})))}},{key:"getXScales",value:function(){var j=this.state.xAxisMap;return j?Object.entries(j).reduce(function(A,w){var S=jO(w,2),B=S[0],D=S[1];return Be(Be({},A),{},jt({},B,D.scale))},{}):null}},{key:"getYScales",value:function(){var j=this.state.yAxisMap;return j?Object.entries(j).reduce(function(A,w){var S=jO(w,2),B=S[0],D=S[1];return Be(Be({},A),{},jt({},B,D.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(j){var A;return(A=this.state.xAxisMap)===null||A===void 0||(A=A[j])===null||A===void 0?void 0:A.scale}},{key:"getYScaleByAxisId",value:function(j){var A;return(A=this.state.yAxisMap)===null||A===void 0||(A=A[j])===null||A===void 0?void 0:A.scale}},{key:"getItemByXY",value:function(j){var A=this.state,w=A.formattedGraphicalItems,S=A.activeItem;if(w&&w.length)for(var B=0,D=w.length;B<D;B++){var P=w[B],O=P.props,M=P.item,I=M.type.defaultProps!==void 0?Be(Be({},M.type.defaultProps),M.props):M.props,V=co(M.type);if(V==="Bar"){var W=(O.data||[]).find(function(q){return hye(j,q)});if(W)return{graphicalItem:P,payload:W}}else if(V==="RadialBar"){var _=(O.data||[]).find(function(q){return WT(j,q)});if(_)return{graphicalItem:P,payload:_}}else if(Iy(P,S)||$y(P,S)||nh(P,S)){var z=sve({graphicalItem:P,activeTooltipItem:S,itemData:I.data}),R=I.activeIndex===void 0?z:I.activeIndex;return{graphicalItem:Be(Be({},P),{},{childIndex:R}),payload:nh(P,S)?I.data[z]:P.props.data[z]}}}return null}},{key:"render",value:function(){var j=this;if(!rD(this))return null;
166var A=this.props,w=A.children,S=A.className,B=A.width,D=A.height,P=A.style,O=A.compact,M=A.title,I=A.desc,V=NO(A,N9e),W=Xt(V,!1);if(O)return ie.createElement(aO,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},ie.createElement(Iw,Zu({},W,{width:B,height:D,title:M,desc:I}),this.renderClipPath(),sD(w,this.renderMap)));if(this.props.accessibilityLayer){var _,z;W.tabIndex=(_=this.props.tabIndex)!==null&&_!==void 0?_:0,W.role=(z=this.props.role)!==null&&z!==void 0?z:"application",W.onKeyDown=function(q){j.accessibilityManager.keyboardEvent(q)},W.onFocus=function(){j.accessibilityManager.focus()}}var R=this.parseEventsOfWrapper();return ie.createElement(aO,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},ie.createElement("div",Zu({className:or("recharts-wrapper",S),style:Be({position:"relative",cursor:"default",width:B,height:D},P)},R,{ref:function(G){j.container=G}}),ie.createElement(Iw,Zu({},W,{width:B,height:D,title:M,desc:I,style:V9e}),this.renderClipPath(),sD(w,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(C.Component);jt(y,"displayName",r),jt(y,"defaultProps",Be({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},x)),jt(y,"getDerivedStateFromProps",function(b,E){var N=b.dataKey,j=b.data,A=b.children,w=b.width,S=b.height,B=b.layout,D=b.stackOffset,P=b.margin,O=E.dataStartIndex,M=E.dataEndIndex;if(E.updateId===void 0){var I=SO(b);return Be(Be(Be({},I),{},{updateId:0},p(Be(Be({props:b},I),{},{updateId:0}),E)),{},{prevDataKey:N,prevData:j,prevWidth:w,prevHeight:S,prevLayout:B,prevStackOffset:D,prevMargin:P,prevChildren:A})}if(N!==E.prevDataKey||j!==E.prevData||w!==E.prevWidth||S!==E.prevHeight||B!==E.prevLayout||D!==E.prevStackOffset||!id(P,E.prevMargin)){var V=SO(b),W={chartX:E.chartX,chartY:E.chartY,isTooltipActive:E.isTooltipActive},_=Be(Be({},kO(E,j,B)),{},{updateId:E.updateId+1}),z=Be(Be(Be({},V),W),_);return Be(Be(Be({},z),p(Be({props:b},z),E)),{},{prevDataKey:N,prevData:j,prevWidth:w,prevHeight:S,prevLayout:B,prevStackOffset:D,prevMargin:P,prevChildren:A})}if(!Rw(A,E.prevChildren)){var R,q,G,K,$=Ks(A,qd),H=$&&(R=(q=$.props)===null||q===void 0?void 0:q.startIndex)!==null&&R!==void 0?R:O,te=$&&(G=(K=$.props)===null||K===void 0?void 0:K.endIndex)!==null&&G!==void 0?G:M,ne=H!==O||te!==M,Y=!nr(j),J=Y&&!ne?E.updateId:E.updateId+1;return Be(Be({updateId:J},p(Be(Be({props:b},E),{},{updateId:J,dataStartIndex:H,dataEndIndex:te}),E)),{},{prevChildren:A,dataStartIndex:H,dataEndIndex:te})}return null}),jt(y,"renderActiveDot",function(b,E,N){var j;return C.isValidElement(b)?j=C.cloneElement(b,E):$t(b)?j=b(E):j=ie.createElement(_E,E),ie.createElement(qr,{className:"recharts-active-dot",key:N},j)});var v=C.forwardRef(function(E,N){return ie.createElement(y,Zu({},E,{ref:N}))});return v.displayName=y.displayName,v},J9e=Z9e({chartName:"AreaChart",GraphicalChild:jo,axisComponents:[{axisType:"xAxis",AxisComp:Hy},{axisType:"yAxis",AxisComp:KE}],formatAxisMap:ebe});const e5e=(e,t,r,n)=>{var a,o,l,c;const i=[r,{code:t,...n||{}}];if((o=(a=e==null?void 0:e.services)==null?void 0:a.logger)!=null&&o.forward)return e.services.logger.forward(i,"warn","react-i18next::",!0);Oc(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),(c=(l=e==null?void 0:e.services)==null?void 0:l.logger)!=null&&c.warn?e.services.logger.warn(...i):console!=null&&console.warn&&console.warn(...i)},DO={},Q6=(e,t,r,n)=>{Oc(r)&&DO[r]||(Oc(r)&&(DO[r]=new Date),e5e(e,t,r,n))},hW=(e,t)=>()=>{if(e.isInitialized)t();else{const r=()=>{setTimeout(()=>{e.off("initialized",r)},0),t()};e.on("initialized",r)}},Z6=(e,t,r)=>{e.loadNamespaces(t,hW(e,r))},FO=(e,t,r,n)=>{if(Oc(r)&&(r=[r]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Z6(e,r,n);r.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,hW(e,n))},t5e=(e,t,r={})=>!t.languages||!t.languages.length?(Q6(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:r.lng,precheck:(n,i)=>{var a;if(((a=r.bindI18n)==null?void 0:a.indexOf("languageChanging"))>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!i(n.isLanguageChangingTo,e))return!1}}),Oc=e=>typeof e=="string",r5e=e=>typeof e=="object"&&e!==null,n5e=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,s5e={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},i5e=e=>s5e[e],a5e=e=>e.replace(n5e,i5e);let J6={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:a5e};const o5e=(e={})=>{J6={...J6,...e}},l5e=()=>J6;let mW;const c5e=e=>{mW=e},u5e=()=>mW,d5e={type:"3rdParty",init(e){o5e(e.options.react),c5e(e)}},x5e=C.createContext();class f5e{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const h5e=(e,t)=>{const r=C.useRef();return C.useEffect(()=>{r.current=e},[e,t]),r.current},pW=(e,t,r,n)=>e.getFixedT(t,r,n),m5e=(e,t,r,n)=>C.useCallback(pW(e,t,r,n),[e,t,r,n]),Ky=(e,t={})=>{var A,w,S,B;const{i18n:r}=t,{i18n:n,defaultNS:i}=C.useContext(x5e)||{},a=r||n||u5e();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new f5e),!a){Q6(a,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const D=(O,M)=>Oc(M)?M:r5e(M)&&Oc(M.defaultValue)?M.defaultValue:Array.isArray(O)?O[O.length-1]:O,P=[D,{},!1];return P.t=D,P.i18n={},P.ready=!1,P}(A=a.options.react)!=null&&A.wait&&Q6(a,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const o={...l5e(),...a.options.react,...t},{useSuspense:l,keyPrefix:c}=o;let u=i||((w=a.options)==null?void 0:w.defaultNS);u=Oc(u)?[u]:u||["translation"],(B=(S=a.reportNamespaces).addUsedNamespaces)==null||B.call(S,u);const f=(a.isInitialized||a.initializedStoreOnce)&&u.every(D=>t5e(D,a,o)),x=m5e(a,t.lng||null,o.nsMode==="fallback"?u:u[0],c),m=()=>x,p=()=>pW(a,t.lng||null,o.nsMode==="fallback"?u:u[0],c),[y,v]=C.useState(m);let b=u.join();t.lng&&(b=`${t.lng}${b}`);const E=h5e(b),N=C.useRef(!0);C.useEffect(()=>{const{bindI18n:D,bindI18nStore:P}=o;N.current=!0,!f&&!l&&(t.lng?FO(a,t.lng,u,()=>{N.current&&v(p)}):Z6(a,u,()=>{N.current&&v(p)})),f&&E&&E!==b&&N.current&&v(p);const O=()=>{N.current&&v(p)};return D&&(a==null||a.on(D,O)),P&&(a==null||a.store.on(P,O)),()=>{N.current=!1,a&&(D==null||D.split(" ").forEach(M=>a.off(M,O))),P&&a&&P.split(" ").forEach(M=>a.store.off(M,O))}},[a,b]),C.useEffect(()=>{N.current&&f&&v(m)},[a,c,f]);const j=[y,a,f];if(j.t=y,j.i18n=a,j.ready=f,f||!f&&!l)return j;throw new Promise(D=>{t.lng?FO(a,t.lng,u,()=>D()):Z6(a,u,()=>D())})},p5e=({transaction:e})=>{const{t}=Ky();return Goe(e.status)?s.jsx("div",{className:"bg-orange-50 border border-border rounded-lg p-4 mb-4",children:s.jsxs("div",{className:"flex items-start",children:[s.jsx("div",{className:"flex-shrink-0",children:s.jsx("svg",{className:"h-5 w-5 text-orange-400",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:s.jsx("path",{fillRule:"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})})}),s.jsxs("div",{className:"ml-3 flex-1",children:[s.jsx("h3",{className:"text-sm font-medium text-orange-900",children:t("common.withdrawal.pendingApprovalTitle")}),s.jsx("p",{className:"mt-2 text-sm text-orange-800",children:t("common.withdrawal.pendingApprovalMessage")}),s.jsxs("p",{className:"mt-2 text-xs text-orange-700 flex items-center",children:[s.jsx("svg",{className:"h-4 w-4 mr-1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:s.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm1-12a1 1 0 10-2 0v4a1 1 0 002 0V6z",clipRule:"evenodd"})}),t("common.withdrawal.estimatedApprovalTime")]})]})]})}):Koe(e.status)&&e.rejectionReason?s.jsx("div",{className:"bg-red-50 border border-border rounded-lg p-4 mb-4",children:s.jsxs("div",{className:"flex items-start",children:[s.jsx("div",{className:"flex-shrink-0",children:s.jsx("svg",{className:"h-5 w-5 text-red-400",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:s.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})}),s.jsxs("div",{className:"ml-3 flex-1",children:[s.jsx("h3",{className:"text-sm font-medium text-red-900",children:t("common.withdrawal.rejectedTitle")}),s.jsx("p",{className:"mt-2 text-sm text-red-800",children:t("common.withdrawal.rejectionReason",{reason:e.rejectionReason})}),e.rejectedAt&&s.jsx("p",{className:"mt-2 text-xs text-red-700",children:t("common.withdrawal.rejectionDate",{date:new Date(e.rejectedAt).toLocaleDateString("fr-FR",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})})}),s.jsxs("p",{className:"mt-2 text-sm font-medium text-green-700",children:["✓ ",t("common.withdrawal.balanceRefunded")]}),e.adminNotes&&s.jsxs("div",{className:"mt-3 p-2 bg-red-100 rounded text-xs text-red-800",children:[s.jsx("strong",{children:"Admin Notes:"})," ",e.adminNotes]})]})]})}):null},g5e=e=>{const t=new Date(e),r={weekday:"short"};return t.toLocaleDateString("fr-FR",r)},y5e=e=>{const[t,r]=e.split("-"),n=new Date(parseInt(t),parseInt(r)-1,1),i={month:"short"};return n.toLocaleDateString("fr-FR",i)+" "+t.slice(2)},dC=(e,t)=>t==="USD"?`$${e.toFixed(2)}
166`:`${e.toLocaleString("fr-FR")} F`,PO=(e,t)=>{const r=t?"text-green-400":"text-red-400";return e==="USD"?t?"text-green-500":"text-red-500":r},TO=e=>{let t="bg-gray-100",r="text-gray-700";return e==="failed"||e==="rejected_by_admin"?(t="bg-red-200",r="text-red-700"):e==="completed"||e==="refunded"?(t="bg-green-100",r="text-green-700"):(e==="pending"||e==="processing"||e==="pending_otp_verification"||e==="pending_admin_approval")&&(t="bg-yellow-100",r="text-yellow-700"),`flex items-center justify-center size-10 rounded-full ${t} ${r}`};function v5e(){var Kr,fn,Rn,hn,_n,fr,Bt,Ce,pe,Pe,Rt,Pt,Jt,at,Qt,ht,ir,Tr,Mr,wr,Si,Js,as,Do,Fo,Po,Cs,ia,ws,Bi;const{t:e}=Ky(),{user:t,refreshUser:r}=Gt(),n=lt(),[i,a]=C.useState([{name:"",Dépôt:0,Retrait:0,Dépôt_count:0,Retrait_count:0}]),[o,l]=C.useState("daily"),[c,u]=C.useState(!1),[f,x]=C.useState([]),[m,p]=C.useState(1),[y,v]=C.useState(!0),[b,E]=C.useState(!1),N=C.useRef(null),{data:j,loading:A,error:w,refetch:S}=Pg("transaction-history",async()=>{const Me=await X.getTransactionHistory({limit:10}),Nt=Ve(Me)||Me;return(Array.isArray(Nt)?Nt:[]).map(ct=>({...ct,id:ct._id||ct.transactionId||ct.id||"",transactionId:ct.transactionId||ct._id||ct.id||"",status:ct.status||"pending",type:ct.type||"deposit",amount:(typeof ct.amount=="number"?ct.amount:Number(ct.amount))||0,createdAt:ct.createdAt||"",description:ct.description||"",reference:ct.reference||"",userId:ct.userId||"",currency:ct.currency||"",updatedAt:ct.updatedAt||""}))},{staleTime:15e3}),B=j,{data:D,loading:P,error:O,refetch:M}=Pg("transaction-stats",async()=>{const Me=await X.getTransactionStats();return Ve(Me)||Me||{}},{staleTime:3e4});C.useEffect(()=>{if(!D){a([]);return}let Me={},Nt;switch(o){case"daily":Me=D.daily||{},Nt=g5e;break;case"weekly":Me=D.weekly||{},Nt=yt=>`Semaine ${yt.split(" ")[1]}`;break;case"monthly":Me=D.monthly||{},Nt=y5e;break;default:Me={},Nt=yt=>yt}const ct=Object.keys(Me).sort().map(yt=>{var za,Va,Di,Ns,ti,As,ri,re,fe,We,Ke,Et,Zt,vr,ae,ve;const cr=Me[yt],Lt=cr==null?void 0:cr.deposit,At=cr==null?void 0:cr.withdrawal,ur=Number(((Va=(za=Lt==null?void 0:Lt.currencies)==null?void 0:za.XAF)==null?void 0:Va.totalAmount)||0),Es=Number(((Ns=(Di=Lt==null?void 0:Lt.currencies)==null?void 0:Di.USD)==null?void 0:Ns.totalAmount)||0),js=ur+Es*500,Tt=Number(((As=(ti=At==null?void 0:At.currencies)==null?void 0:ti.XAF)==null?void 0:As.totalAmount)||0),Or=Number(((re=(ri=At==null?void 0:At.currencies)==null?void 0:ri.USD)==null?void 0:re.totalAmount)||0),Hn=Tt+Or*500,ei=Number(((We=(fe=Lt==null?void 0:Lt.currencies)==null?void 0:fe.XAF)==null?void 0:We.count)||0),An=Number(((Et=(Ke=Lt==null?void 0:Lt.currencies)==null?void 0:Ke.USD)==null?void 0:Et.count)||0),$a=Number(((vr=(Zt=At==null?void 0:At.currencies)==null?void 0:Zt.XAF)==null?void 0:vr.count)||0),mn=Number(((ve=(ae=At==null?void 0:At.currencies)==null?void 0:ae.USD)==null?void 0:ve.count)||0);return{name:Nt(yt),Dépôt:js,Retrait:Hn,Dépôt_count:ei+An,Retrait_count:$a+mn,depositXAF:ur,depositUSD:Es,withdrawalXAF:Tt,withdrawalUSD:Or,depositCountXAF:ei,depositCountUSD:An,withdrawalCountXAF:$a,withdrawalCountUSD:mn}});a(ct.length>0?ct:[{name:"",Dépôt:0,Retrait:0,Dépôt_count:0,Retrait_count:0}])},[D,o]);const I=A||P,V=w||O,W=(t==null?void 0:t.balance)||0,_=(t==null?void 0:t.usdBalance)||0,z=()=>{S(),M(),r()},[R,q]=C.useState("Reçu"),[G,K]=C.useState(!1),[$,H]=C.useState(null),[te,ne]=C.useState(!1),[Y,J]=C.useState("FCFA"),[oe,he]=C.useState(""),[Q,ue]=C.useState(0),[de,me]=C.useState(0),[Le,Ne]=C.useState(!1),[ye,ee]=C.useState(null),[Ae,De]=C.useState(!1),[we,je]=C.useState(!1),[Te,Se]=C.useState(!1),He=()=>{n("/activation-balance")};C.useEffect(()=>{const Me=Number(oe)||0;let Nt=0,ct=0;Nt=Me*.025,ct=Me+Nt,ue(Nt),me(ct)},[oe,Y]);const Ue=Me=>{H(Me),K(!0)},rt=()=>{K(!1),H(null)},wt=()=>{if($){const Me=`Transaction ID: ${$.id}
167Type: ${$.type}
168Montant: ${$.amount} F
169Description: ${$.description}
170Date: ${$.createdAt}`;navigator.share?navigator.share({text:Me}):(navigator.clipboard.writeText(Me),ee({type:"success",message:"Transaction copiée dans le presse-papier !"}),Ne(!0))}},Ft=()=>{ne(Me=>(Me&&(he(""),ue(0),me(0),J("FCFA")),!Me))},xt=async Me=>{var Nt;if(Me.preventDefault(),!Te)if(oe&&Number(oe)>0&&!isNaN(Number(oe))){Se(!0);const ct=Y==="FCFA"?W:_;if(ct<0){ee({type:"error",message:`Impossible d'effectuer un retrait avec un solde ${Y} négatif. Votre solde actuel est de ${Y==="FCFA"?`${ct.toLocaleStr
170ing("fr-FR")} F`:`$${ct.toFixed(2)}`}.`}),Ne(!0),Se(!1);return}const yt=de;if(ct<yt){const cr=Y==="FCFA"?`${ct.toLocaleString("fr-FR")} F`:`$${ct.toFixed(2)}`,Lt=Y==="FCFA"?`${yt.toLocaleString("fr-FR")} F (montant + frais de 2.5%)`:`$${yt.toFixed(2)}`;ee({type:"error",message:`Solde ${Y} insuffisant. Vous avez ${cr} mais il faut ${Lt}.`}),Ne(!0),Se(!1);return}try{const cr=t==null?void 0:t.country;let Lt=Pn.find(Or=>Or.value===cr);Lt||(Lt=Pn.find(Or=>Or.code===cr));const At=Lt==null?void 0:Lt.code;let ur="XAF";if(At&&hc[At]&&hc[At].currencies.length>0&&(ur=hc[At].currencies[0]),Y==="USD"){if(!(t!=null&&t.cryptoWalletAddress)||!(t!=null&&t.cryptoWalletCurrency)){ee({type:"confirm",message:"Pour effectuer un retrait en USD (crypto), vous devez d'abord configurer votre portefeuille crypto dans votre profil. Voulez-vous aller à la page de modification du profil maintenant ?",onConfirm:()=>n("/modifier-le-profil")}),Ne(!0),Se(!1);return}try{const Or=await X.checkCryptoWithdrawalLimitsV2(Number(oe),"USD"),Hn=Ve(Or);if(!(Hn!=null&&Hn.allowed)){ee({type:"error",message:`Retrait USD non autorisé: ${(Hn==null?void 0:Hn.reason)||"Limite atteinte"}`}),Ne(!0),Se(!1);return}}catch{}}const Es=Math.round(Number(oe));if(Es<=0)throw new Error("Montant invalide: doit être supérieur à 0");const js=await X.initiateUnifiedWithdrawal(Es,Y==="FCFA"?"mobile_money":"crypto"),Tt=Ve(js);if(Tt&&js.isOverallSuccess){if(Y==="USD")if(Tt.status==="pending_otp_verification"&&Tt.transactionId){Tt.message&&Tt.message.includes("ongoing withdrawal request")?(ee({type:"error",message:`Vous avez une demande de retrait crypto en attente (ID: ${Tt.transactionId}) qui nécessite une vérification OTP. Un nouveau code OTP a été envoyé à votre numéro enregistré. Vous pouvez valider cette transaction ou l'annuler dans la liste des transactions.`}),Ne(!0),he(""),ue(0),me(0),ne(!1),Se(!1),r()):(ee({type:"success",message:Tt.message||"Demande de retrait crypto initiée. Un code OTP a été envoyé à votre numéro de téléphone. Veuillez le vérifier.",onConfirm:()=>{n("/otp",{state:{fromWithdrawal:!0,withdrawalId:Tt.transactionId,withdrawalAmount:Number(oe),withdrawalCurrency:"USD"}})}}),Ne(!0),he(""),ue(0),me(0),ne(!1),Se(!1));return}else{ee({type:"success",message:`Retrait crypto initié avec succès! Montant: $${oe} vers ${t==null?void 0:t.cryptoWalletCurrency} (${(Nt=t==null?void 0:t.cryptoWalletAddress)==null?void 0:Nt.substring(0,10)}...)`}),Ne(!0),he(""),ue(0),me(0),J("FCFA"),ne(!1),Se(!1),r();return}if(Tt.message&&(Tt.message.includes("Mobile Money details")||Tt.message.includes("registered Mobile Money")||Tt.message.includes("mobile money")||Tt.message.includes("MoMo details"))){ee({type:"confirm",message:"Pour effectuer un retrait Mobile Money, vous devez d'abord ajouter votre numéro Mobile Money et choisir votre opérateur (MTN, Orange, etc.) dans votre profil. Voulez-vous aller à la page de modification du profil maintenant ?",onConfirm:()=>n("/modifier-le-profil")}),Ne(!0),Se(!1);return}Tt.status==="pending_otp_verification"&&Tt.transactionId?Tt.message&&Tt.message.includes("ongoing withdrawal request")?(ee({type:"error",message:`Vous avez une demande de retrait en attente (ID: ${Tt.transactionId}) qui nécessite une vérification OTP. Un nouveau code OTP a été envoyé à votre numéro enregistré. Vous pouvez valider cette transaction ou l'annuler dans la liste des transactions.`}),Ne(!0),he(""),ue(0),me(0),ne(!1),Se(!1),r()):(ee({type:"success",message:Tt.message||"Demande de retrait initiée. Un code OTP a été envoyé à votre numéro de téléphone. Veuillez le vérifier.",onConfirm:()=>{n("/otp",{state:{fromWithdrawal:!0,withdrawalId:Tt.transactionId,withdrawalAmount:Number(oe),withdrawalCurrency:ur}})}}),Ne(!0),he(""),ue(0),me(0),ne(!1),Se(!1),r()):Tt.status==="processing"?Tt.message&&Tt.message.includes("ongoing")?(ee({type:"error",message:`Vous avez une demande de retrait en cours (ID: ${Tt.transactionId}) qui est actuellement en traitement. Veuillez la compléter ou l'annuler avant d'en initier une nouvelle.`}
170),Ne(!0),he(""),ue(0),me(0),ne(!1),Se(!1),r()):(ee({type:"success",message:Tt.message||"Retrait initié et en cours de traitement. Un code OTP a été envoyé à votre numéro de téléphone. Veuillez le vérifier.",onConfirm:()=>{n("/otp",{state:{fromWithdrawal:!0,withdrawalId:Tt.transactionId,withdrawalAmount:Number(oe),withdrawalCurrency:ur}})}}),Ne(!0),he(""),ue(0),me(0),ne(!1),Se(!1),r()):Tt.status==="pending"?(ee({type:"error",message:`Vous avez une demande de retrait en attente (ID: ${Tt.transactionId}) qui est en cours de traitement. Veuillez la compléter ou l'annuler dans la liste des transactions avant d'en initier une nouvelle.`}),Ne(!0),he(""),ue(0),me(0),ne(!1),Se(!1),r()):(ee({type:"error",message:Tt.message||"Une erreur inattendue est survenue lors de l'initiation du retrait. Veuillez réessayer."}),Ne(!0),Se(!1))}else{const Or=(Tt==null?void 0:Tt.message)||"Échec de l'initiation du retrait.";Or.includes("Mobile Money details")||Or.includes("registered Mobile Money")||Or.includes("mobile money")||Or.includes("MoMo details")?(ee({type:"confirm",message:"Pour effectuer un retrait, vous devez d'abord ajouter votre numéro Mobile Money et choisir votre opérateur (MTN, Orange, etc.) dans votre profil. Voulez-vous aller à la page de modification du profil maintenant ?",onConfirm:()=>n("/modifier-le-profil")}),Ne(!0)):(ee({type:"error",message:Or}),Ne(!0)),Se(!1)}}catch(cr){let Lt="Échec de l'initiation du retrait.";(cr instanceof Error||cr&&typeof cr=="object"&&"message"in cr&&typeof cr.message=="string")&&(Lt=cr.message),Lt.includes("Your account does not have registered Mobile Money details")?(ee({type:"confirm",message:"Pour effectuer un retrait, vous devez d'abord ajouter votre numéro Mobile Money et choisir votre opérateur (MTN, Orange, etc.) dans votre profil. Voulez-vous aller à la page de modification du profil maintenant ?",onConfirm:()=>n("/modifier-le-profil")}),Ne(!0)):Lt.includes("You have reached your daily limit")?(ee({type:"error",message:Lt}),Ne(!0)):Lt.includes("Insufficient balance")?(ee({type:"error",message:Lt}),Ne(!0)):Lt.includes("ongoing withdrawal request")?(ee({type:"error",message:Lt}),Ne(!0)):(ee({type:"error",message:Lt}),Ne(!0)),Se(!1)}finally{}}else ee({type:"error",message:"Veuillez entrer un montant de retrait valide."}),Ne(!0),Se(!1)},Kt=async Me=>{try{const Nt=await X.cancelWithdrawal(Me),ct=Ve(Nt);ct&&Nt.isOverallSuccess?(ee({type:"success",message:"Transaction annulée avec succès."}),Ne(!0),r(),S(),M(),x([]),p(1),v(!0)):(ee({type:"error",message:(ct==null?void 0:ct.message)||"Erreur lors de l'annulation de la transaction."}),Ne(!0))}catch(Nt){let ct="Erreur lors de l'annulation de la transaction.";Nt instanceof Error&&(ct=Nt.message),ee({type:"error",message:ct}),Ne(!0)}},ft=Me=>{switch(Me.type){case"deposit":return Sre;case"withdrawal":return qk;case"payment":return E3;case"refund":return ere;case"conversion":return $c;default:return Ba}},Gr=Me=>Me.description||`${Me.type.charAt(0).toUpperCase()+Me.type.slice(1)}`,Nn=Me=>new Date(Me).toLocaleDateString("fr-FR",{day:"2-digit",month:"short",hour:"2-digit",minute:"2-digit"}),vs=()=>{u(!0)},bs=()=>{u(!1)};return C.useEffect(()=>{if(!c)return;(async()=>{var Nt;if(!(!y||b)){E(!0);try{const ct=await X.getTransactionHistory({page:m,limit:20}),yt=Ve(ct)||ct,cr=Array.isArray(yt)?yt:[],Lt=(Nt=ct.body)==null?void 0:Nt.pagination;if(x(At=>[...At,...cr.map(ur=>({...ur,id:ur._id||ur.transactionId||ur.id||"",status:ur.status||"pending",type:ur.type||"deposit",amount:(typeof ur.amount=="number"?ur.amount:Number(ur.amount))||0,createdAt:ur.createdAt||"",description:ur.description||"",reference:ur.reference||"",userId:ur.userId||"",currency:ur.currency||"",updatedAt:ur.updatedAt||""}))]),Lt){const At=Math.ceil(Lt.total/Lt.limit);v(Lt.page<At)}else v(cr.length===20)}catch{v(!1)}finally{E(!1)}}})()},[m,c]),C.useEffect(()=>{if(!c||!y||b)return;let Me=null;const Nt=()=>{Me&&clearTimeout(Me),Me=setTimeout(()=>{const yt=N.current;if(yt){const{scrollTop:cr,scrollHeight:Lt,clientHeight:At}=yt;cr+At>=Lt*.8&&!b&&p(ur=>ur+1)}},100)},ct=N.current;return ct&&ct.addEventListener("scroll",Nt),()=>
170{ct&&ct.removeEventListener("scroll",Nt),Me&&clearTimeout(Me)}},[c,y,b]),C.useEffect(()=>{c||(x([]),p(1),v(!0),E(!1))},[c]),s.jsx(nn,{children:s.jsxs("div",{className:"p-3 min-h-screen mb-36 bg-white text-white",children:[s.jsxs("div",{className:"flex items-center mb-4",children:[s.jsx(Ct,{}),s.jsx("h3",{className:"text-xl font-medium text-center w-full text-gray-900",children:"Portefeuille"})]}),I?s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsx($e,{height:"h-32",rounded:"rounded-2xl"}),s.jsxs("div",{className:"flex gap-3",children:[s.jsx($e,{width:"w-24",height:"h-16",rounded:"rounded-2xl"}),s.jsx($e,{width:"w-24",height:"h-16",rounded:"rounded-2xl"})]}),s.jsx($e,{height:"h-40",rounded:"rounded-2xl"}),s.jsx($e,{height:"h-32",rounded:"rounded-2xl"})]}):V?s.jsxs("div",{className:"flex flex-col items-center justify-center h-[60vh] text-gray-500",children:[s.jsx("p",{className:"text-lg mb-2 text-red-500",children:"Erreur lors du chargement"}),s.jsx("p",{className:"text-sm mb-4",children:V}),s.jsx("button",{onClick:z,className:"px-4 py-2 bg-blue-500 text-white rounded-lg hover:bg-blue-600",children:"Réessayer"})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"wallet-balance mb-6",children:s.jsx(fle,{balanceXaf:W,balanceUsd:_})}),s.jsxs("div",{className:"bg-surface border border-border rounded-2xl p-4 mb-6 flex justify-between text-sm",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-ink-3 text-xs mb-1",children:"Bénéfices"}),s.jsxs("div",{className:"font-bold text-ink",children:[(Number((_n=(hn=(Rn=(fn=(Kr=D==null?void 0:D.overall)==null?void 0:Kr.deposit)==null?void 0:fn.completed)==null?void 0:Rn.currencies)==null?void 0:hn.XAF)==null?void 0:_n.totalAmount)||0).toLocaleString("fr-FR")," F"]}),((Pe=(pe=(Ce=(Bt=(fr=D==null?void 0:D.overall)==null?void 0:fr.deposit)==null?void 0:Bt.completed)==null?void 0:Ce.currencies)==null?void 0:pe.USD)==null?void 0:Pe.totalAmount)>0&&s.jsxs("div",{className:"font-semibold text-xs text-success",children:["$",(Number((Qt=(at=(Jt=(Pt=(Rt=D==null?void 0:D.overall)==null?void 0:Rt.deposit)==null?void 0:Pt.completed)==null?void 0:Jt.currencies)==null?void 0:at.USD)==null?void 0:Qt.totalAmount)||0).toFixed(2)]})]}),s.jsxs("div",{className:"text-right",children:[s.jsx("div",{className:"text-ink-3 text-xs mb-1",children:"Retraits"}),s.jsxs("div",{className:"font-bold text-ink",children:[(Number((wr=(Mr=(Tr=(ir=(ht=D==null?void 0:D.overall)==null?void 0:ht.withdrawal)==null?void 0:ir.completed)==null?void 0:Tr.currencies)==null?void 0:Mr.XAF)==null?void 0:wr.totalAmount)||0).toLocaleString("fr-FR")," F"]}),((Fo=(Do=(as=(Js=(Si=D==null?void 0:D.overall)==null?void 0:Si.withdrawal)==null?void 0:Js.completed)==null?void 0:as.currencies)==null?void 0:Do.USD)==null?void 0:Fo.totalAmount)>0&&s.jsxs("div",{className:"font-semibold text-xs text-danger",children:["$",(Number((Bi=(ws=(ia=(Cs=(Po=D==null?void 0:D.overall)==null?void 0:Po.withdrawal)==null?void 0:Cs.completed)==null?void 0:ia.currencies)==null?void 0:ws.USD)==null?void 0:Bi.totalAmount)||0).toFixed(2)]})]})]}),s.jsxs("div",{className:"flex gap-2 mb-6",children:[s.jsxs("button",{onClick:()=>je(!0),className:"flex-1 flex flex-col items-center justify-center bg-primary rounded-2xl py-4 hover:bg-blue-800 transition-colors",children:[s.jsx(L,{icon:Th,size:20,className:"mb-1"}),s.jsx("span",{className:"text-xs font-semibold",children:"Activation"})]}),s.jsxs("button",{onClick:()=>{W<0&&_<0?(ee({type:"error",message:"Impossible d'effectuer un retrait avec des soldes négatifs. FCFA: "+W.toLocaleString("fr-FR")+" F, USD: $"+_.toFixed(2)}),Ne(!0)):Ft()},disabled:W<0&&_<0,className:`flex-1 flex flex-col items-center justify-center rounded-2xl py-4  transition-colors ${W<0&&_<0?"bg-gray-400 text-gray-600 cursor-not-allowed":"bg-[#94B027] hover:bg-green-700"}`,children:[s.jsx(L,{icon:qk,size:20,className:"mb-1"}),s.jsx("span",{className:"text-xs font-semibold",children:"Retrait"})]}),s.jsxs("button",{onClick:()=>{W<0&&_<0?(ee({type:"error",message:"Impossible de convertir avec des soldes négatifs. FCFA: "+W.toLocaleStr
170ing("fr-FR")+" F, USD: $"+_.toFixed(2)}),Ne(!0)):De(!0)},disabled:W<0&&_<0,className:`flex-1 flex flex-col items-center justify-center rounded-2xl py-4  transition-colors text-white ${W<0&&_<0?"bg-gray-400 cursor-not-allowed":"bg-orange-500 hover:bg-orange-600"}`,children:[s.jsx("svg",{className:"w-5 h-5 mb-1",fill:"currentColor",viewBox:"0 0 20 20",children:s.jsx("path",{fillRule:"evenodd",d:"M4 2a1 1 0 011 1v2.101a7.002 7.002 0 0111.601 2.566 1 1 0 11-1.885.666A5.002 5.002 0 005.999 7H9a1 1 0 010 2H4a1 1 0 01-1-1V3a1 1 0 011-1zm.008 9.057a1 1 0 011.276.61A5.002 5.002 0 0014.001 13H11a1 1 0 110-2h5a1 1 0 011 1v5a1 1 0 11-2 0v-2.101a7.002 7.002 0 01-11.601-2.566 1 1 0 01.61-1.276z",clipRule:"evenodd"})}),s.jsx("span",{className:"text-xs font-semibold",children:"Convertir"})]})]}),te&&s.jsxs("form",{onSubmit:xt,className:"mb-6 flex flex-col gap-3 bg-gray-50 rounded-2xl p-4",children:[s.jsxs("div",{className:"mb-4",children:[s.jsx("label",{className:"text-gray-800 font-semibold mb-2 block",children:"Solde à utiliser:"}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("button",{type:"button",onClick:()=>{J("FCFA"),he("")},className:`p-3 rounded-lg border transition-all text-left ${Y==="FCFA"?"bg-blue-50 border-border ring-2 ring-blue-500":"bg-white border-border hover:bg-gray-50"}`,children:[s.jsx("div",{className:"text-xs font-medium text-blue-600",children:"Solde Principal"}),s.jsxs("div",{className:`text-lg font-bold ${W<0?"text-red-600":"text-blue-800"}`,children:[W.toLocaleString("fr-FR")," F"]}),s.jsx("div",{className:"text-xs text-blue-500 mt-1",children:Y==="FCFA"?"✓ Sélectionné":"FCFA"})]}),s.jsxs("button",{type:"button",onClick:()=>{J("USD"),he("")},className:`p-3 rounded-lg border transition-all text-left ${Y==="USD"?"bg-green-50 border-border ring-2 ring-green-500":"bg-white border-border hover:bg-gray-50"}`,children:[s.jsx("div",{className:"text-xs font-medium text-green-600",children:"Solde USD"}),s.jsxs("div",{className:`text-lg font-bold ${_<0?"text-red-600":"text-green-800"}`,children:["$",_.toFixed(2)]}),s.jsx("div",{className:"text-xs text-green-500 mt-1",children:Y==="USD"?"✓ Sélectionné":"USD"})]})]})]}),s.jsxs("label",{className:"text-gray-800 font-semibold",children:["Montant à retirer (",Y,")"]}),(Y==="FCFA"&&W<0||Y==="USD"&&_<0)&&s.jsxs("div",{className:"bg-red-50 border border-border rounded-lg p-3 text-sm text-red-700 mb-3",children:["⚠️ Impossible d'effectuer un retrait avec un solde négatif. Solde actuel: ",Y==="FCFA"?`${W.toLocaleString("fr-FR")} F`:`$${_.toFixed(2)}`]}),s.jsxs("div",{className:"flex justify-between gap-2",children:[s.jsx("input",{type:"number",min:"1",value:oe,onChange:Me=>{he(Me.target.value)},className:`w-full rounded-lg border px-3 py-2 text-gray-900 text-center font-bold ${Y==="FCFA"&&W<0||Y==="USD"&&_<0?"border-danger bg-red-50 cursor-not-allowed":"border-border"}`,placeholder:`Montant en ${Y}`,step:Y==="USD"?"0.01":"1",max:Y==="FCFA"?Math.max(0,W):Math.max(0,_),disabled:Y==="FCFA"&&W<0||Y==="USD"&&_<0,required:!0}),s.jsx("button",{type:"submit",disabled:Te||Y==="FCFA"&&W<0||Y==="USD"&&_<0,className:`rounded-full p-3 font-bold  transition-colors ${Te||Y==="FCFA"&&W<0||Y==="USD"&&_<0?"bg-gray-400 text-gray-600 cursor-not-allowed":"bg-primary text-white hover:bg-blue-800"}`,children:Te?s.jsx(L,{icon:Yt,className:"animate-spin",size:24}):s.jsx(L,{icon:kre,size:24})})]}),oe&&Number(oe)>0&&s.jsxs("div",{className:"bg-blue-50 border border-border rounded-lg p-3 text-sm",children:[s.jsxs("div",{className:"flex justify-between items-center mb-1",children:[s.jsx("span",{className:"text-gray-700",children:"Montant à retirer:"}),s.jsx("span",{className:"font-semibold text-gray-900",children:Y==="FCFA"?`${Number(oe).toLocaleString("fr-FR")} F`:`$${Number(oe).toFixed(2)}`})]}),Y==="FCFA"&&s.jsxs("div",{className:"flex justify-between items-center mb-1",children:[s.jsx("span",{className:"text-gray-700",children:"Frais (2.5%):"}),s.jsxs("span",{className:"font-semibold text-orange-600",children:[Q.toLocaleString("fr-FR")," F"]})]}),Y==="USD"&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex justify-between items-center mb-1",children:[s.jsx("span",{className:"text-gray-700",children:"Méthode de retrait:"}),s.jsxs("span",{className:"font-semibold text-blue-600",children:["🪙 Crypto (",(t==null?void 0:t.cryptoWalletCurrency)||"Non configuré",")"]})]}),s.jsxs("div",{className:"flex justify-between items-center mb-1",children:[s.jsx("span",{className:"text-gray-700",children:"Frais (2.5%):"}),s.jsxs("span",{className:"font-semibold text-orange-600",children:["$",Q.toFixed(2)]})]})]}),s.jsx("div",{className:"border-t border-border pt-2 mt-2",children:s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("span",{className:"font-semibold text-gray-800",children:["Total déduit du solde ",Y,":"]}
170),s.jsx("span",{className:"font-bold text-red-600",children:Y==="FCFA"?`${de.toLocaleString("fr-FR")} F`:`$${de.toFixed(2)}`})]})}),(Y==="FCFA"&&W<de||Y==="USD"&&_<de)&&s.jsxs("div",{className:"mt-2 text-red-600 text-xs font-medium",children:["⚠️ Solde ",Y," insuffisant. Solde actuel:",Y==="FCFA"?`${W.toLocaleString("fr-FR")} F`:`$${_.toFixed(2)}`]})]})]}),s.jsxs("button",{onClick:He,className:"bg-primary w-full mb-6 text-white p-4 rounded-2xl transition-all flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"bg-white/20 p-3 rounded-full",children:s.jsx(L,{icon:Al,size:20})}),s.jsxs("div",{className:"text-left",children:[s.jsx("span",{className:"font-bold block",children:"Solde d'Activation"}),s.jsx("span",{className:"text-xs opacity-80",children:"Voir & sponsoriser vos filleuls"})]})]}),s.jsx("div",{className:"bg-white/20 p-2 rounded-full",children:s.jsx(L,{icon:Mn,size:20})})]}),s.jsxs("div",{className:"transaction-chart bg-white rounded-2xl p-4 mb-6 text-gray-800 relative border border-border",children:[s.jsxs("div",{className:"filter-options flex items-center justify-between mb-2",children:[s.jsx("div",{className:"font-semibold text-primary",children:"Résumé des transactions"}),s.jsxs("div",{className:"flex bg-gray-100 rounded-full p-1 gap-1",children:[s.jsx("button",{className:`px-3 py-1 rounded-full text-xs font-semibold transition-colors duration-150 ${R==="Reçu"?"bg-primary text-white":"text-primary"}`,onClick:()=>q("Reçu"),children:"Reçu"}),s.jsx("button",{className:`px-3 py-1 rounded-full text-xs font-semibold transition-colors duration-150 ${R==="Retrait"?"bg-primary text-white":"text-primary"}`,onClick:()=>q("Retrait"),children:"Retrait"})]})]}),s.jsxs("div",{className:"flex bg-gray-100 rounded-full p-1 gap-1 mb-4",children:[s.jsx("button",{className:`px-3 py-1 rounded-full text-xs font-semibold transition-colors duration-150 ${o==="daily"?"bg-green-700 text-white":"text-gray-700"}`,onClick:()=>l("daily"),children:"Journalier"}),s.jsx("button",{className:`px-3 py-1 rounded-full text-xs font-semibold transition-colors duration-150 ${o==="weekly"?"bg-green-700 text-white":"text-gray-700"}`,onClick:()=>l("weekly"),children:"Hebdomadaire"}),s.jsx("button",{className:`px-3 py-1 rounded-full text-xs font-semibold transition-colors duration-150 ${o==="monthly"?"bg-green-700 text-white":"text-gray-700"}`,onClick:()=>l("monthly"),children:"Mensuel"})]}),s.jsx("div",{className:"relative w-full h-[160px]",children:s.jsx(K0e,{width:"100%",height:160,children:s.jsxs(J9e,{data:i,margin:{top:8,right:16,left:16,bottom:0},children:[s.jsx(Yq,{vertical:!1,stroke:"#E6E9EF",strokeDasharray:"3 3"}),s.jsx(Hy,{dataKey:"name",stroke:"#bbb",fontSize:o==="monthly"?10:14,tickLine:!1,axisLine:!1,angle:0,textAnchor:"middle",interval:0,dy:10}),R==="Reçu"&&s.jsx(jo,{type:"monotone",dataKey:"Dépôt",stroke:"#115CF6",strokeWidth:2,fill:"#115CF6",fillOpacity:.12,dot:!1,activeDot:{r:4,strokeWidth:0},isAnimationActive:!0}),R==="Retrait"&&s.jsx(jo,{type:"monotone",dataKey:"Retrait",stroke:"#F68F0F",strokeWidth:2,fill:"#F68F0F",fillOpacity:.12,dot:!1,activeDot:{r:4,strokeWidth:0},isAnimationActive:!0}),s.jsx(da,{cursor:{stroke:"#94A3B8",strokeWidth:1,strokeDasharray:"3 3"},content:({active:Me,payload:Nt,label:ct})=>{if(Me&&Nt&&Nt.length){const yt=i.find(cr=>cr.name===ct);return s.jsxs("div",{className:"rounded-lg bg-gray-800 p-3 text-white text-sm",children:[s.jsx("p",{className:"font-bold mb-1",children:ct}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-blue-400 font-semibold mb-1",children:"Dépôts:"}),yt&&(yt.depositXAF||0)>0&&s.jsxs("p",{className:"text-blue-300 text-xs ml-2",children:["FCFA: ",(yt.depositXAF||0).toLocaleString("fr-FR")," F (",yt.depositCountXAF||0," tx)"]}),yt&&(yt.depositUSD||0)>0&&s.jsxs("p",{className:"text-green-300 text-xs ml-2",children:["USD: $",(yt.depositUSD||0).toFixed(2)," (",yt.depositCountUSD||0," tx)"]}),s.jsxs("p",{className:"text-blue-200 text-xs ml-2 font-medium",children:["Total: ",((yt==null?void 0:yt.Dépôt)||0).toLocaleStr
170ing("fr-FR")," F (",(yt==null?void 0:yt.Dépôt_count)||0," tx)"]})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-yellow-400 font-semibold mb-1",children:"Retraits:"}),yt&&(yt.withdrawalXAF||0)>0&&s.jsxs("p",{className:"text-yellow-300 text-xs ml-2",children:["FCFA: ",(yt.withdrawalXAF||0).toLocaleString("fr-FR")," F (",yt.withdrawalCountXAF||0," tx)"]}),yt&&(yt.withdrawalUSD||0)>0&&s.jsxs("p",{className:"text-red-300 text-xs ml-2",children:["USD: $",(yt.withdrawalUSD||0).toFixed(2)," (",yt.withdrawalCountUSD||0," tx)"]}),s.jsxs("p",{className:"text-yellow-200 text-xs ml-2 font-medium",children:["Total: ",((yt==null?void 0:yt.Retrait)||0).toLocaleString("fr-FR")," F (",(yt==null?void 0:yt.Retrait_count)||0," tx)"]})]})]}),s.jsx("p",{className:"text-xs text-gray-400 mt-2 border-t border-border pt-2",children:"💡 USD converti à 1:500 FCFA pour le graphique"})]})}return null}})]})})}),s.jsx("div",{className:"mt-2 text-xs text-gray-500 text-center",children:"💡 Montants USD convertis en FCFA (1:500) pour l'affichage du graphique"})]}),s.jsxs("div",{className:"transaction-list bg-surface border border-border rounded-2xl p-4",children:[s.jsx("div",{className:"font-semibold mb-2 text-ink",children:"Transactions récentes"}),!B||B.length===0?s.jsx("div",{className:"text-center py-8 text-ink-3",children:"Aucune transaction récente"}):B.map(Me=>s.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-border last:border-b-0 hover:bg-surface-2 rounded-lg transition-colors",children:[s.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1 cursor-pointer",onClick:()=>Ue(Me),children:[s.jsx("div",{className:TO(String(Me.status)),children:s.jsx(L,{icon:ft(Me),size:20})}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:`font-bold ${String(Me.status)==="completed"?"text-ink":String(Me.status)==="pending"||String(Me.status)==="processing"||String(Me.status)==="pending_otp_verification"?"text-accent":String(Me.status)==="failed"?"text-danger":"text-ink"} text-sm truncate max-w-[160px]`,children:Gr(Me)}),s.jsx("div",{className:"text-xs text-ink-3",children:Nn(Me.createdAt)})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("div",{className:"flex flex-col items-end gap-1",children:[s.jsxs("div",{className:`font-bold text-sm ${PO(Me.currency||"XAF",Me.type!=="withdrawal"&&Me.type!=="payment")} whitespace-nowrap text-right truncate`,children:[Me.type==="withdrawal"||Me.type==="payment"?"-":"+",dC(Me.amount,Me.currency||"XAF")]}),Me.currency==="USD"&&s.jsx("span",{className:"px-1.5 py-0.5 text-xs font-medium rounded-full bg-green-100 text-green-700",children:"USD"})]}),Me.type==="withdrawal"&&sd(Me.status)&&s.jsx("button",{onClick:Nt=>{Nt.stopPropagation(),ee({type:"confirm",message:"Êtes-vous sûr de vouloir annuler cette transaction de retrait ?",onConfirm:()=>Kt(Me.transactionId||Me.id)}),Ne(!0)},className:"bg-red-500 hover:bg-red-600 text-white px-2 py-1 rounded text-xs font-medium transition-colors",title:"Annuler la transaction",children:"Annuler"})]})]},Me.id))]}),s.jsx("div",{className:"flex justify-center mt-6",children:s.jsx("button",{onClick:vs,className:"bg-blue-600 text-white px-6 py-3 rounded-full font-bold hover:bg-blue-700 transition-colors",children:"Voir toutes les transactions"})}),s.jsx(It,{children:G&&$&&s.jsx(Z.div,{className:"fixed inset-0 z-60 flex items-center justify-center bg-black/40",initial:{opacity:0}
170,animate:{opacity:1},exit:{opacity:0},children:s.jsxs(Z.div,{className:"bg-white rounded-2xl p-6 w-[90vw] max-w-md text-gray-900 relative border border-border",initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},transition:{type:"spring",bounce:.2},children:[s.jsx("button",{className:"absolute top-3 right-3 text-gray-400 hover:text-gray-700",onClick:rt,children:s.jsx(L,{icon:gt,size:22})}),s.jsxs("div",{className:"mb-4",children:[s.jsx("div",{className:"text-xs text-gray-400 mb-1",children:"ID de la transaction"}),s.jsx("div",{className:"font-mono text-sm mb-2",children:$.id}),s.jsx("div",{className:"text-xs text-gray-400 mb-1",children:"Type"}),s.jsx("div",{className:"font-semibold mb-2",children:$.type}),s.jsx("div",{className:"text-xs text-gray-400 mb-1",children:"Statut"}),s.jsx("div",{className:"font-semibold mb-2",style:{color:Hoe($.status)},children:e(Woe($.status))}),s.jsx(p5e,{transaction:$}),s.jsxs("div",{className:"flex items-center justify-between mb-1",children:[s.jsx("div",{className:"text-xs text-gray-400",children:"Montant"}),$.currency&&s.jsx("span",{className:`px-2 py-1 text-xs font-medium rounded-full ${$.currency==="USD"?"bg-green-100 text-green-700":"bg-blue-100 text-blue-700"}`,children:$.currency==="USD"?"USD":"FCFA"})]}),s.jsxs("div",{className:`font-bold text-lg mb-2 ${String($.type)==="withdrawal"||String($.type)==="payment"?"text-red-500":"text-green-600"}`,children:[String($.type)==="withdrawal"||String($.type)==="payment"?"-":"+",dC($.amount,$.currency||"XAF")]}),s.jsx("div",{className:"text-xs text-gray-400 mb-1",children:"Description"}),s.jsx("div",{className:"mb-2",children:$.description||Gr($)}),s.jsx("div",{className:"text-xs text-gray-400 mb-1",children:"Date"}),s.jsx("div",{children:Nn($.createdAt)}),$.reference&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"text-xs text-gray-400 mb-1 mt-2",children:"Référence"}),s.jsx("div",{className:"font-mono text-sm",children:$.reference})]})]}),s.jsxs("div",{className:"flex flex-col gap-3 mt-4",children:[$.status==="pending_otp_verification"&&$.type==="withdrawal"&&s.jsx("button",{className:"w-full bg-green-500 text-white rounded-xl py-3 font-bold hover:bg-green-600 transition-colors",onClick:()=>{n("/otp",{state:{withdrawalId:$.transactionId||$.id,withdrawalAmount:$.amount,withdrawalCurrency:$.currency||"XAF",flow:"withdrawal"}}),rt()},children:"Continuer la vérification OTP"}),s.jsxs("div",{className:"flex gap-3",children:[s.jsxs("button",{className:"flex-1 bg-primary text-white rounded-xl py-2 font-bold hover:bg-blue-800 transition-colors",onClick:wt,children:[s.jsx(L,{icon:tu,className:"inline mr-2"}),"Partager"]}),$.type==="withdrawal"&&sd($.status)&&s.jsx("button",{className:"flex-1 bg-red-500 text-white rounded-xl py-2 font-bold hover:bg-red-600 transition-colors",onClick:()=>{ee({type:"confirm",message:"Êtes-vous sûr de vouloir annuler cette transaction de retrait ?",onConfirm:()=>{Kt($.transactionId||$.id),rt()}}),Ne(!0)},children:"Annuler"}),s.jsx("button",{className:"flex-1 bg-gray-200 text-gray-700 rounded-xl py-2 font-bold hover:bg-gray-300 transition-colors",onClick:rt,children:"Fermer"})]}),$.type==="withdrawal"&&($.status==="pending_admin_approval"||$.status==="processing")&&s.jsx("div",{className:"bg-blue-50 border border-border rounded-lg p-3",children:s.jsx("p",{className:"text-blue-700 text-sm text-center",children:"Cette transaction est en cours de traitement et ne peut plus être annulée."})})]})]})})}),s.jsx(It,{children:c&&s.jsx(Z.div,{className:"fixed inset-0 z-50 flex items-end justify-center bg-black/40",initial:{opacity:0}
170,animate:{opacity:1},exit:{opacity:0},children:s.jsxs(Z.div,{className:"bg-surface border border-border rounded-t-2xl p-4 w-full h-[80vh] text-ink relative flex flex-col",initial:{y:"100%"},animate:{y:0},exit:{y:"100%"},transition:{type:"spring",damping:25,stiffness:250},children:[s.jsxs("div",{className:"flex justify-between items-center mb-4",children:[s.jsx("h2",{className:"text-xl font-bold",children:"Historique des transactions"}),s.jsx("button",{className:"text-ink-3 hover:text-ink",onClick:bs,children:s.jsx(L,{icon:gt,size:24})})]}),s.jsxs("div",{ref:N,className:"flex-1 overflow-y-auto pr-2 custom-scrollbar",children:[!f||f.length===0&&!b?s.jsx("div",{className:"text-center py-8 text-ink-3",children:"Aucune transaction trouvée."}):f.map(Me=>s.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-border last:border-b-0 hover:bg-surface-2 rounded-lg transition-colors",children:[s.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1 cursor-pointer",onClick:()=>{Ue(Me)},children:[s.jsx("div",{className:TO(String(Me.status)),children:s.jsx(L,{icon:ft(Me),size:20})}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:`font-bold ${String(Me.status)==="completed"?"text-ink":String(Me.status)==="pending"||String(Me.status)==="processing"||String(Me.status)==="pending_otp_verification"?"text-accent":String(Me.status)==="failed"?"text-danger":"text-ink"} text-sm truncate max-w-[160px]`,children:Gr(Me)}),s.jsx("div",{className:"text-xs text-ink-3",children:Nn(Me.createdAt)})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("div",{className:"flex flex-col items-end gap-1",children:[s.jsxs("div",{className:`font-bold text-sm ${PO(Me.currency||"XAF",Me.type!=="withdrawal"&&Me.type!=="payment")} whitespace-nowrap text-right truncate`,children:[Me.type==="withdrawal"||Me.type==="payment"?"-":"+",dC(Me.amount,Me.currency||"XAF")]}),Me.currency==="USD"&&s.jsx("span",{className:"px-1.5 py-0.5 text-xs font-medium rounded-full bg-green-100 text-green-700",children:"USD"})]}),Me.type==="withdrawal"&&sd(Me.status)&&s.jsx("button",{onClick:Nt=>{Nt.stopPropagation(),ee({type:"confirm",message:"Êtes-vous sûr de vouloir annuler cette transaction de retrait ?",onConfirm:()=>Kt(Me.transactionId||Me.id)}),Ne(!0)},className:"bg-red-500 hover:bg-red-600 text-white px-2 py-1 rounded text-xs font-medium transition-colors",title:"Annuler la transaction",children:"Annuler"})]})]},Me.id)),b&&y&&s.jsx("div",{className:"flex justify-center py-4",children:s.jsxs("svg",{className:"animate-spin h-8 w-8 text-primary",viewBox:"0 0 24 24",children:[s.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),s.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]})}),!y&&f.length>0&&!b&&s.jsx("div",{className:"text-center text-gray-500 py-4 text-sm",children:"Toutes les transactions ont été chargées."})]})]})})}),Le&&ye&&s.jsx(Z.div,{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",initial:{opacity:0}
170,animate:{opacity:1},exit:{opacity:0},children:s.jsxs(Z.div,{className:"bg-white rounded-2xl p-6 w-[90vw] max-w-sm text-gray-900 relative border border-border",initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},transition:{type:"spring",bounce:.2},children:[s.jsx("h4",{className:`text-lg font-bold mb-4 text-center ${ye.type==="success"?"text-green-600":ye.type==="error"?"text-red-600":"text-gray-800"}`,children:ye.type==="success"?"Succès":ye.type==="error"?"Erreur":"Confirmation"}),s.jsx("p",{className:"text-sm text-gray-700 text-center mb-4",children:ye.message}),ye.type==="confirm"?s.jsxs("div",{className:"flex gap-3 mt-2",children:[s.jsx("button",{type:"button",className:"flex-1 bg-red-500 text-white rounded-xl py-2 font-bold hover:bg-red-600 transition-colors",onClick:()=>{var Me;(Me=ye.onConfirm)==null||Me.call(ye),Ne(!1)},children:"Confirmer"}),s.jsx("button",{type:"button",className:"flex-1 bg-gray-200 text-gray-700 rounded-xl py-2 font-bold hover:bg-gray-300 transition-colors",onClick:()=>Ne(!1),children:"Annuler"})]}):s.jsx("button",{type:"button",className:"w-full bg-blue-500 text-white rounded-xl py-2 font-bold hover:bg-blue-600 transition-colors",onClick:()=>{var Me;(Me=ye.onConfirm)==null||Me.call(ye),Ne(!1)},children:"Fermer"})]})})]}),s.jsx(p0,{}),s.jsx(sV,{isOpen:Ae,onClose:()=>De(!1),onConversionComplete:()=>{r()}}),s.jsx(b5e,{isOpen:we,onClose:()=>je(!1),mainBalance:W,onSuccess:()=>{r(),S()}})]})})}function b5e({isOpen:e,onClose:t,mainBalance:r,onSuccess:n}){const[i,a]=C.useState(""),[o,l]=C.useState(!1),[c,u]=C.useState(""),[f,x]=C.useState(!1),m=100,p=async()=>{const v=parseInt(i);if(isNaN(v)||v<m){u(`Le montant minimum est de ${m.toLocaleString("fr-FR")} F`);return}if(v>r){u("Solde principal insuffisant");return}l(!0),u("");try{const b=await X.transferToActivationBalance(v);Ve(b),x(!0),n(),setTimeout(()=>{t(),a(""),x(!1)},2e3)}catch(b){u(b instanceof Error?b.message:"Une erreur est survenue")}finally{l(!1)}},y=()=>{a(""),u(""),x(!1),t()};return e?s.jsx(Z.div,{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",initial:{opacity:0}
170,animate:{opacity:1},exit:{opacity:0},onClick:y,children:s.jsx(Z.div,{className:"bg-white rounded-2xl p-6 w-[90vw] max-w-md border border-border",initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},onClick:v=>v.stopPropagation(),children:f?s.jsxs("div",{className:"text-center py-6",children:[s.jsx("div",{className:"w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx(L,{icon:Ur,className:"text-green-600",size:32})}),s.jsx("h4",{className:"text-xl font-bold text-green-600 mb-2",children:"Transfert réussi !"}),s.jsx("p",{className:"text-gray-600",children:"Votre solde d'activation a été alimenté."})]}):s.jsxs(s.Fragment,{children:[s.jsx("h4",{className:"text-xl font-bold text-gray-900 mb-4",children:"Alimenter le solde d'activation"}),s.jsxs("div",{className:"bg-gray-50 rounded-xl p-4 mb-4",children:[s.jsx("p",{className:"text-sm text-gray-600",children:"Solde principal disponible"}),s.jsxs("p",{className:"text-2xl font-bold text-gray-900",children:[r.toLocaleString("fr-FR")," F"]})]}),s.jsxs("div",{className:"mb-4",children:[s.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:["Montant à transférer (min. ",m.toLocaleString("fr-FR")," F)"]}),s.jsx("input",{type:"number",value:i,onChange:v=>{a(v.target.value),u("")},placeholder:"Ex: 5000",className:"w-full border border-border rounded-xl px-4 py-3 focus:outline-none focus:ring-2 focus:ring-blue-500 text-gray-900 bg-white"})]}),c&&s.jsx("div",{className:"mb-4 p-3 bg-red-50 border border-border rounded-xl",children:s.jsx("p",{className:"text-red-600 text-sm",children:c})}),s.jsx("div",{className:"bg-yellow-50 border border-border rounded-xl p-3 mb-4",children:s.jsx("p",{className:"text-xs text-yellow-700",children:"⚠️ Ce transfert est irréversible. Le solde d'activation ne peut être utilisé que pour sponsoriser vos filleuls."})}),s.jsxs("div",{className:"flex gap-3",children:[s.jsx("button",{onClick:y,className:"flex-1 bg-gray-200 text-gray-700 py-3 rounded-xl font-semibold hover:bg-gray-300 transition-colors",children:"Annuler"}),s.jsx("button",{onClick:p,disabled:o||!i,className:"flex-1 bg-primary text-white py-3 rounded-xl font-semibold hover:bg-blue-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2",children:o?s.jsx(L,{icon:Yt,className:"animate-spin"}):"Transférer"})]})]})})}):null}const rn="data:image/svg+xml;utf8,"+encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
171            <rect width="64" height="64" rx="32" fill="#E5E7EB"/>
172            <circle cx="32" cy="25" r="11" fill="#9CA3AF"/>
173            <path d="M12 60c0-11 9-19 20-19s20 8 20 19z" fill="#9CA3AF"/>
174        </svg>`.replace(/\s+/g," "));function gW({src:e,alt:t="",size:r=40,className:n=""}){const[i,a]=C.useState(!1),o=Math.max(32,Math.round(r*2)),l=!e||i?rn:X.generateThumbnailUrl(e,o)||rn;return s.jsx("img",{src:l,alt:t,width:r,height:r,loading:"lazy",decoding:"async",onError:()=>a(!0),className:`object-cover ${n}`})}const MO=[{label:"Modifier le profil",icon:s.jsx(L,{icon:Uc,className:"text-primary"}),to:"/modifier-le-profil"},{label:"Modifier mon email",icon:s.jsx(L,{icon:yo,className:"text-primary"}),to:"/modifier-email"},{label:"Changer le numéro de téléphone",icon:s.jsx(L,{icon:Ji,className:"text-primary"}),to:"/change-phone"},{label:"Modifier mon mot de passe",icon:s.jsx(L,{icon:Vc,className:"text-primary"}),to:"/change-password"},{label:"Mon Abonnement",icon:s.jsx(L,{icon:E3,className:"text-primary"}),to:"/changer-abonnement"},{label:"Solde d'Activation",icon:s.jsx(L,{icon:Al,className:"text-amber-500"}),to:"/activation-balance"},{label:"Mes billets",icon:s.jsx(L,{icon:ru,className:"text-primary"}),to:"/events/mes-billets"},{label:"Mes Contacts",icon:s.jsx(L,{icon:Ji,className:"text-primary"}),to:"/contacts"},{label:"Mes filleuls",icon:s.jsx(L,{icon:wn,className:"text-primary"}),to:"/filleuls"},{label:"Mon Parrain",icon:s.jsx(L,{icon:aw,className:"text-primary"}),to:"/parrain"},{label:"Espace partenaire",icon:s.jsx(L,{icon:ire,className:"text-primary"}),to:"/partenaire"},{label:"Rejoindre la communauté",icon:s.jsx(L,{icon:nu,className:"text-green-500"}),to:"https://www.whatsapp.com/channel/0029Vav3mvCElah05C8QuT03",external:!0}];function C5e(){const{user:e,logout:t,loading:r,refreshUser:n}=Gt(),{startTour:i,hasSeenTour:a}=rV(),o=lt(),[l,c]=C.useState(null),[u,f]=C.useState(!1),{hasCredits:x}=Uh(),[m,p]=C.useState(null),[y,v]=C.useState(null),[b,E]=C.useState(!0),[N,j]=C.useState(!1),[A,w]=C.useState(""),[S,B]=C.useState(!1),[D,P]=C.useState(null),[O,M]=C.useState(!1),[I,V]=C.useState(null),[W,_]=C.useState(!1),z=[...MO.slice(0,7),{label:"Relance",icon:s.jsx(L,{icon:yo,className:"text-primary"}),to:"/relance"},...MO.slice(7)],[R,q]=C.useState(!1),[G,K]=C.useState(null),$=e!=null&&e.referralCode?`${window.location.origin}/signup?affiliationCode=${e.referralCode}`:"";C.useEffect(()=>{(async()=>
174{if(e){try{const he=await X.getReferralStats(),Q=Ve(he);p(Q)}catch{}try{E(!0);const he=await X.getMyAffiliator(),Q=Ve(he);v(Q)}catch{v(null)}finally{E(!1)}}})()},[e]),C.useEffect(()=>{N&&(e!=null&&e.referralCode)&&(w(e.referralCode),P(null))},[N,e==null?void 0:e.referralCode]);const H=oe=>{e&&(oe==="code"?navigator.clipboard.writeText(e.referralCode||""):navigator.clipboard.writeText($),c(oe),setTimeout(()=>c(null),1200))},te=async()=>{K({type:"confirm",message:"Êtes-vous sûr de vouloir vous déconnecter ?",onConfirm:async()=>{f(!0);try{await t(),o("/connexion")}catch{K({type:"error",message:"Échec de la déconnexion."}),q(!0)}finally{f(!1)}}}),q(!0)},ne=()=>{var oe;if(b)V("Chargement des informations du parrain...");else if(y){const he=y.avatar?y.avatar:y.avatarId?X.generateSettingsFileUrl(y.avatarId):"https://img.freepik.com/premium-vector/default-avatar-profile-icon-social-media-user-image-gray-avatar-icon-blank-profile-silhouette-vector-illustration_561158-3407.jpg?w=360",Q=me=>me.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"),ue=(oe=y.whatsappGroupLink)==null?void 0:oe.trim(),de=ue?`
175          <a
176            href="${Q(ue)}"
177            target="_blank"
178            rel="noopener noreferrer"
179            class="inline-flex items-center justify-center gap-2 w-full min-h-[48px] mt-2 px-4 rounded-xl bg-whatsapp hover:bg-[#128C7E] text-white font-bold text-sm"
180          >
181            📱 Rejoindre le groupe WhatsApp
182          </a>
183        `:`
184          <p class="text-sm text-gray-500 mt-2 italic text-center">Ce parrain n'a pas encore configuré son groupe WhatsApp.</p>
185        `;V(`
186        <div class="flex flex-col items-center justify-center p-4">
187          <img src="${Q(he)}" alt="avatar" class="w-20 h-20 rounded-full object-cover mb-4 border-2 border-border"/>
188          <p class="text-lg font-bold mb-1">${Q(y.name)}</p>
189          <p class="text-sm text-gray-600 mb-1">${Q(y.email)}</p>
190          ${de}
191        </div>
192      `)}else V("Vous n'avez pas de parrain ou les informations ne sont pas disponibles.");M(!0)},Y=(oe,he)=>{if(he){const Q=document.createElement("a");Q.href=oe,Q.target="_blank",Q.rel="noopener noreferrer",document.body.appendChild(Q),Q.click(),document.body.removeChild(Q)}else oe==="/parrain"?ne():oe==="/relance"?x?o(oe):_(!0):o(oe)},J=async oe=>{if(oe.preventDefault(),B(!0),P(null),!A.trim()){P({type:"error",message:"Le code de parrainage ne peut pas être vide."}),B(!1);return}try{const he={referralCode:A.trim()},Q=await X.updateUserProfile(he);Ve(Q),P({type:"success",message:"Code de parrainage mis à jour avec succès!"}),await n(),setTimeout(()=>j(!1),1500)}catch(he){const Q=he instanceof Error?he.message:"Échec de la mise à jour du code de parrainage.";P({type:"error",message:Q})}finally{B(!1)}};return r?s.jsx("div",{className:"min-h-screen bg-bg flex flex-col items-center py-0",children:s.jsxs("div",{className:"w-full max-w-md mx-auto rounded-b-3xl overflow-hidden pb-6",children:[s.jsx("div",{className:"bg-primary relative h-32 rounded-b-3xl flex flex-col items-center justify-end",children:s.jsx("div",{className:"absolute left-1/2 -bottom-12 transform -translate-x-1/2",children:s.jsx($e,{width:"w-24",height:"h-24",rounded:"rounded-full"})})}),s.jsxs("div",{className:"mt-16 flex flex-col items-center",children:[s.jsx($e,{width:"w-32",height:"h-6",rounded:"rounded-lg"}),s.jsx($e,{width:"w-48",height:"h-8",rounded:"rounded-lg",className:"mt-2"})]}),s.jsx("div",{className:"mt-6 mx-4 space-y-3",children:[...Array(6)].map((oe,he)=>s.jsx($e,{height:"h-12",rounded:"rounded-xl"},he))})]})}):s.jsx(nn,{children:s.jsxs("div",{className:"min-h-screen bg-bg flex flex-col items-center py-0",children:[s.jsxs(Z.div,{initial:{opacity:0,y:-30},animate:{opacity:1,y:0},transition:{duration:.5,type:"spring"},className:"w-full max-w-md mx-auto rounded-b-3xl overflow-hidden pb-6",children:[s.jsxs("div",{className:"flex items-center w-full py-4",children:[s.jsx(Ct,{}),s.jsx("h3",{className:"text-xl font-medium text-center w-full text-gray-900",children:"Mon profil"})]}),s.jsx("div",{className:"bg-primary relative h-32 rounded-b-3xl flex flex-col items-center justify-end",children:s.jsx("div",{className:"absolute left-1/2 -bottom-12 transform -translate-x-1/2",children:s.jsxs("div",{className:"relative",children:[s.jsx("img",{src:X.generateThumbnailUrl((e==null?void 0:e.avatar)||(e==null?void 0:e.avatarId),256)||rn,alt:"avatar",className:"w-24 h-24 rounded-full border-4 border-white object-cover"}),s.jsx("button",{className:"absolute bottom-2 right-2 bg-primary p-2 rounded-full border-2 border-white text-white hover:bg-blue-800 transition-colors",children:s.jsx(L,{icon:Uc,size:16})})]})})}),s.jsxs("div",{className:"mt-16 flex flex-col items-center",children:[s.jsx("div",{className:"text-xl font-bold text-gray-800",children:(e==null?void 0:e.name)||"Utilisateur"}),s.jsx("div",{className:"bg-gray-100 text-gray-500 rounded-lg px-3 py-1 text-sm mt-2",children:e==null?void 0:e.email}),s.jsxs("div",{className:"mt-3 flex items-center gap-2",children:[s.jsx("span",{className:"text-sm text-gray-600",children:"Notifications OTP:"}),s.jsx("span",{className:`text-sm font-medium px-2 py-1 rounded-full ${(e==null?void 0:e.notificationPreference)==="whatsapp"?"bg-green-100 text-green-700":"bg-blue-100 text-blue-700"}`,children:(e==null?void 0:e.notificationPreference)==="whatsapp"?"📱 WhatsApp":"📧 Email"})]}),m&&s.jsxs("div",{className:"text-sm text-gray-600 mt-2",children:["Direct: ",m.level1Count||0," | Indirect: ",(m.level2Count||0)+(m.level3Count||0)]})]}),(e==null?void 0:e.referralCode)&&s.jsxs("div",{className:"mt-6 mx-4 flex gap-3",children:[s.jsxs("button",{onClick:()=>H("code"),className:"flex-1 flex items-center gap-2 bg-white border border-border rounded-xl px-4 py-3 hover:bg-green-50 transition-colors",children:[s.jsx("span",{className:"bg-green-100 text-green-600 rounded-full p-2",children:s.jsx(L,{icon:cy})}),s.jsx("span",{className:"flex-1 font-medium text-gray-700 text-left",children:"Copier mon code parrain"}),l==="code"?s.jsx("span",{className:"text-green-600 text-xs font-bold",children:"Copié !"}):null]}),s.jsxs("button",{onClick:()=>
192H("link"),className:"flex-1 flex items-center gap-2 bg-white border border-border rounded-xl px-4 py-3 hover:bg-blue-50 transition-colors",children:[s.jsx("span",{className:"bg-blue-100 text-blue-600 rounded-full p-2",children:s.jsx(L,{icon:A$})}),s.jsx("span",{className:"flex-1 font-medium text-gray-700 text-left",children:"Copier mon lien"}),l==="link"?s.jsx("span",{className:"text-blue-600 text-xs font-bold",children:"Copié !"}):null]})]}),(e==null?void 0:e.referralCode)&&s.jsx("div",{className:"mt-4 mx-4",children:s.jsxs("button",{onClick:()=>j(!0),className:"bg-primary w-full flex items-center justify-center gap-2 text-white rounded-xl px-4 py-3 transition-all font-bold",children:[s.jsx(L,{icon:Uc,size:18}),"Changer mon code parrain"]})}),s.jsxs("div",{className:"mt-4 divide-y divide-gray-100",children:[z.map((oe,he)=>s.jsxs(Z.button,{onClick:()=>Y(oe.to,oe.external),initial:{opacity:0,x:30},animate:{opacity:1,x:0},transition:{delay:.4+he*.07,duration:.4,type:"spring"},className:"w-full flex items-center gap-3 px-6 py-4 hover:bg-surface-2 transition cursor-pointer text-left relative",children:[oe.icon,s.jsx("span",{className:"flex-1 text-gray-700 font-medium",children:oe.label}),oe.badge&&s.jsx("span",{className:"bg-green-500 text-white text-[10px] font-bold px-2 py-0.5 rounded-full mr-2",children:oe.badge}),s.jsx(L,{icon:Mn,className:"text-gray-400"})]},oe.label)),s.jsxs("div",{className:"px-6 pt-6 space-y-3",children:[s.jsxs("button",{onClick:()=>i(),disabled:!a,className:"w-full flex items-center justify-center gap-2 bg-blue-50 text-blue-600 font-medium py-3 rounded-xl hover:bg-blue-100 transition",children:[s.jsx(L,{icon:uy,size:20}),s.jsx("span",{children:"Voir le guide d'utilisation"})]}),s.jsx("button",{onClick:te,disabled:u,className:"w-full bg-red-100 text-red-600 font-bold py-3 rounded-xl hover:bg-red-200 transition disabled:opacity-50 disabled:cursor-not-allowed",children:u?"Déconnexion...":"Se déconnecter"})]})]})]}),s.jsx(p0,{}),s.jsx("footer",{className:"text-xs text-gray-400 mt-6 mb-2 text-center",children:"Développé par simbtech"}),s.jsx(It,{children:N&&s.jsx(Z.div,{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",initial:{opacity:0}
192,animate:{opacity:1},exit:{opacity:0},children:s.jsxs(Z.div,{className:"bg-white rounded-2xl p-6 w-[90vw] max-w-sm text-gray-900 relative border border-border",initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},transition:{type:"spring",bounce:.2},children:[s.jsx("h4",{className:"text-lg font-bold mb-4 text-center",children:"Changer le code parrain"}),s.jsxs("form",{onSubmit:J,className:"flex flex-col gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{htmlFor:"newReferralCode",className:"block text-gray-700 mb-1",children:"Nouveau code de parrainage"}),s.jsx("input",{type:"text",id:"newReferralCode",name:"newReferralCode",value:A,onChange:oe=>{w(oe.target.value),P(null)},className:"w-full border border-border rounded-xl px-4 py-2 focus:outline-none",placeholder:"Entrez le nouveau code",required:!0})]}),D&&s.jsx("div",{className:`p-3 rounded-lg text-center text-sm ${D.type==="success"?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:D.message}),s.jsxs("div",{className:"flex gap-3 mt-2",children:[s.jsx("button",{type:"submit",className:"flex-1 bg-primary text-white rounded-xl py-2 font-bold hover:bg-blue-800 transition-colors flex items-center justify-center gap-2 disabled:bg-blue-400",disabled:S,children:S?s.jsx(L,{icon:Yt,className:"animate-spin"}):"Sauvegarder"}),s.jsx("button",{type:"button",className:"flex-1 bg-gray-200 text-gray-700 rounded-xl py-2 font-bold hover:bg-gray-300 transition-colors",onClick:()=>{j(!1),w((e==null?void 0:e.referralCode)||""),P(null)},disabled:S,children:"Annuler"})]})]})]})})}),s.jsx(It,{children:O&&s.jsx(Z.div,{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",initial:{opacity:0}
192,animate:{opacity:1},exit:{opacity:0},children:s.jsxs(Z.div,{className:"bg-white rounded-2xl p-6 w-[90vw] max-w-sm text-gray-900 relative border border-border",initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},transition:{type:"spring",bounce:.2},children:[s.jsx("h4",{className:"text-lg font-bold mb-4 text-center",children:"Informations sur le parrain"}),s.jsx("div",{className:"text-sm text-gray-700 mb-4",dangerouslySetInnerHTML:{__html:I||""}}),s.jsx("div",{className:"flex gap-3 mt-2",children:s.jsx("button",{type:"button",className:"flex-1 bg-gray-200 text-gray-700 rounded-xl py-2 font-bold hover:bg-gray-300 transition-colors",onClick:()=>{M(!1),V(null)},children:"Fermer"})})]})})}),R&&G&&s.jsx(Z.div,{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:s.jsxs(Z.div,{className:"bg-white rounded-2xl p-6 w-[90vw] max-w-sm text-gray-900 relative border border-border",initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},transition:{type:"spring",bounce:.2},children:[s.jsx("h4",{className:`text-lg font-bold mb-4 text-center ${G.type==="success"?"text-green-600":G.type==="error"?"text-red-600":"text-gray-800"}`,children:G.type==="success"?"Succès":G.type==="error"?"Erreur":"Confirmation"}),s.jsx("p",{className:"text-sm text-gray-700 text-center mb-4",dangerouslySetInnerHTML:{__html:G.message||""}}),G.type==="confirm"?s.jsxs("div",{className:"flex gap-3 mt-2",children:[s.jsx("button",{type:"button",className:"flex-1 bg-red-500 text-white rounded-xl py-2 font-bold hover:bg-red-600 transition-colors",onClick:()=>{var oe;(oe=G.onConfirm)==null||oe.call(G),q(!1)},children:"Confirmer"}),s.jsx("button",{type:"button",className:"flex-1 bg-gray-200 text-gray-700 rounded-xl py-2 font-bold hover:bg-gray-300 transition-colors",onClick:()=>q(!1),children:"Annuler"})]}):s.jsx("button",{type:"button",className:"w-full bg-blue-500 text-white rounded-xl py-2 font-bold hover:bg-blue-600 transition-colors",onClick:()=>q(!1),children:"Fermer"})]})}),s.jsx(kf,{isOpen:W,onClose:()=>_(!1)})]})})}function w5e(){const e=lt(),{pathname:t}=Cr();return s.jsxs("div",{className:"min-h-[70vh] flex flex-col items-center justify-center px-6 text-center",children:[s.jsx("h1",{className:"text-xl font-semibold text-gray-900 mb-2",children:"Page introuvable"}),s.jsx("p",{className:"text-sm text-gray-600 mb-1",children:"Cette page n'existe pas ou a été déplacée."}),s.jsx("p",{className:"text-xs text-gray-400 mb-6 break-all",children:t}),s.jsxs("div",{className:"flex flex-col gap-3 w-full max-w-xs",children:[s.jsx("button",{onClick:()=>e("/"),className:"w-full bg-primary text-white rounded-xl py-3 font-medium",children:"Retour à l'accueil"}),s.jsx("button",{onClick:()=>e(-1),className:"w-full border border-border rounded-xl py-3 font-medium text-gray-700",children:"Page précédente"})]})]})}const E5e=["Étudiant(e)","Sans emploi","Médecin","Infirmier/Infirmière","Pharmacien","Chirurgien","Psychologue","Dentiste","Kinésithérapeute","Ingénieur civil","Ingénieur en informatique","Développeur de logiciels","Architecte","Technicien en électronique","Scientifique des données","Enseignant","Professeur d'université","Formateur professionnel","Éducateur spécialisé","Conseiller pédagogique","Artiste (peintre, sculpteur)","Designer graphique","Photographe","Musicien","Écrivain","Réalisateur","Responsable marketing","Vendeur/Vendeuse","Gestionnaire de produit","Analyste de marché","Consultant en stratégie","Avocat","Notaire","Juge","Huissier de justice","Chercheur scientifique","Biologiste","Chimiste","Physicien","Statisticien","Travailleur social","Conseiller en orientation","Animateur socioculturel","Médiateur familial","Maçon","Électricien","Plombier","Charpentier","Architecte d'intérieur","Chef cuisinier","Serveur/Serveuse","Gestionnaire d'hôtel","Barman/Barmane","Conducteur de train","Pilote d'avion","Logisticien","Gestionnaire de chaîne d'approvisionnement","Administrateur système","Spécialiste en cybersécurité","Ingénieur réseau","Consultant en technologies de l'information","Journaliste","Rédacteur web","Chargé de communication","Gestionnaire de communauté","Comptable","Analyste financier","Auditeur interne","Conseiller fiscal","Agriculteur/Agricultrice","Ingénieur agronome","Écologiste","Gestionnaire de ressources naturelles"],j5e=["Football","Basketball","Course à pied","Natation","Yoga","Randonnée","Cyclisme","Musique (instruments, chant)","Danse","Peinture et dessin","Photographie","Théâtre","Cinéma","Programmation","Robotique","Sciences de la vie","Astronomie","Électronique","Découverte de nouvelles cultures","Randonnées en nature","Tourisme local et international","Cuisine du monde","Pâtisserie","Dégustation de vins","Aide aux personnes défavorisées","Protection de l'environnement","Participation à des événements caritatifs","Lecture","Méditation","Apprentissage de nouvelles langues","Jeux vidéo","Jeux de société","Énigmes et casse-têtes","Stylisme","Décoration d'intérieur","Artisanat","Fitness","Nutrition","Médecine alternative"],yW=["⚽ Football","🏀 Basketball","🏃 Course à pied","🏊 Natation","🧘 Yoga","🥾 Randonnée","🚴 Cyclisme","🎵 Musique (instruments, chant)","💃 Danse","🎨 Peinture et dessin","📸 Photographie","🎭 Théâtre","🎬 Cinéma","💻 Programmation","🤖 Robotique","🔬 Sciences de la vie","🌌 Astronomie","⚡ Électronique","🌍 Découverte de nouvelles cultures","🌿 Randonnées en nature","✈️ Tourisme local et international","🍽️ Cuisine du monde","🧁 Pâtisserie","🍷 Dégustation de vins","🤝 Aide aux personnes défavorisées","🌱 Protection de l'environnement","❤️ Participation à des événements caritatifs","📚 Lecture","🧘‍♀️ Méditation","🗣️ Apprentissage de nouvelles langues","🎮 Jeux vidéo","🎲 Jeux de société","🧩 Énigmes et casse-têtes","👗 Stylisme","🏠 Décoration d'intérieur","🎨 Artisanat","💪 Fitness","🥗 Nutrition","🌿 Médecine alternative"],N5e=e=>{const t=yW.indexOf(e);return t!==-1?j5e[t]:e.replace(/^[^\w\s]+\s*/,"")},A5e=["Homme","Femme","Autre"],OO=Pn.map(e=>({name:e.label,flag:e.code})),xC=20;function k5e(){var te,ne;const{user:e}=Gt(),t=lt(),r=((te=e==null?void 0:e.activeSubscriptions)==null?void 0:te.includes("CLASSIQUE"))&&!e.activeSubscriptions.includes("CIBLE"),[n,i]=C.useState(!1),[a,o]=C.useState(!1),[l,c]=C.useState(!1),[u,f]=C.useState(!1),[x,m]=C.useState({country:"",minAge:"",maxAge:"",sex:"",professions:[],interests:[],search:""}),[p,y]=C.useState(x),[v,b]=C.useState({from:"",to:""}),[E,N]=C.useState({show:!1,type:"success",message:""});C.useEffect(()=>{const Y=setTimeout(()=>y(x),500);return()=>clearTimeout(Y)},[x]);const j=Y=>Y.toISOString().split("T")[0],A=new Date,w=new Date(A);w.setDate(A.getDate()-7);const[S,B]=C.useState({from:j(w),to:j(A)});C.useEffect(()=>{l||b({from:"",to:""})},[l]),C.useEffect(()=>{n&&r&&m(Y=>({...Y,minAge:"",maxAge:"",sex:"",professions:[],interests:[]}))},[n,r]);const{data:D,isLoading:P,error:O,fetchNextPage:M,hasNextPage:I,isFetchingNextPage:V}=jf({queryKey:["contacts",p,r],queryFn:async({pageParam:Y=1})=>{var he,Q;const J=p.sex==="Homme"?"male":p.sex==="Femme"?"female":p.sex==="Autre"?"other":"",oe={search:p.search,country:p.country,page:Number(Y),limit:xC};r||(p.minAge&&(oe.minAge=p.minAge),p.maxAge&&(oe.maxAge=p.maxAge),J&&(oe.sex=J),p.professions.length>0&&(oe.professions=p.professions.map(ue=>Rs(ue)).join(",")),p.interests.length>0&&(oe.interests=p.interests.map(ue=>Rs(ue)).join(",")));try{const ue=await X.searchContacts(oe),de=Ve(ue);return{contacts:(de==null?void 0:de.contacts)||(de==null?void 0:de.users)||de||[],hasMore:de!=null&&de.paginationInfo?de.paginationInfo.currentPage<de.paginationInfo.totalPages:de!=null&&de.totalPages?de.page<de.totalPages:((he=de==null?void 0:de.contacts)==null?void 0:he.length)===xC||((Q=de==null?void 0:de.users)==null?void 0:Q.length)===xC}}catch(ue){if(ue instanceof Error){if(ue.message.includes("subscription")||ue.message.includes("contact plan"))throw new Error("Votre abonnement ne permet pas d'accéder aux contacts. Veuillez mettre à niveau vers l'abonnement CIBLÉ.");if(ue.message.includes("Advanced filtering"))throw new Error("Les filtres avancés nécessitent un abonnement CIBLÉ.")}throw ue}},getNextPageParam:(Y,J)=>{if(Y.hasMore)return J.length+1},initialPageParam:1,staleTime:5*60*1e3,gcTime:30*60*1e3}),W=(D==null?void 0:D.pages.flatMap(Y=>Y.contacts))||[];C.useEffect(()=>{if(!I||P||V)return;const Y=()=>{const J=window.scrollY,oe=window.innerHeight,he=document.body.scrollHeight;(J+oe)/he>.8&&I&&!V&&M()};return window.addEventListener("scroll",Y),()=>window.removeEventListener("scroll",Y)},[I,P,V,M]);const _=(Y,J)=>{r&&["minAge","maxAge","sex","professions","interests"].includes(Y)||m(oe=>({...oe,[Y]:J}))},z=(Y,J)=>{r||m(oe=>{const he=oe[Y],Q=he.includes(J)?he.filter(ue=>ue!==J):[...he,J];return{...oe,[Y]:Q}})},R=`🚀 Rejoins la Révolution Entrepreneuriale avec le Sniper Business Center ! 🌍
193
194Tu es à un clic de faire partie de la meilleure communauté d'Afrique, où les opportunités d'affaires abondent et où ton 
194succès est notre priorité!
195
196Voici ce que tu vas gagner en nous rejoignant dès maintenant:
197
198✨ Visibilité Maximale: Partage ton flyer ou affiche publicitaire dans nos groupes chaque samedi, atteignant ainsi des milliers de potentiels clients!
199
200📈 Accès à un Réseau Énorme:
201Profite de plus de 30 000 contacts WhatsApp ciblés qui verront tes produits et services.Ton succès commence ici!
202
203🎓 Formations Exclusives et Gratuites:
204Bénéficie de 5 formations complètes, accompagnées d'un suivi personnalisé chaque semaine sur Google Meet :
205
206   • Deviens expert en trading
207
208   • Maîtrise l'importation depuis la Chine
209
210   • Domine le marketing digital
211
212   • Excelle en art oratoire
213
214   • Crée des bots WhatsApp pour booster ton business
215
216🛒 Marketplace à Ta Disposition:
217 Mets en avant tes produits et services sur notre plateforme dédiée!
218
219💰 Gagne de l'Argent Facilement :
220Avec notre système de parrainage rémunéré:
221
222   • Niveau 1 : Parrainage direct = 1000 FCFA
223
224   • Niveau 2 : Ton filleul parraine = 500 FCFA
225
226   • Niveau 3 : Le filleul de ton filleul inscrit = 250 FCFA
227
228Je suis ton parrain à la SBC et je suis là pour t'accompagner vers le succès ! J'ai remarqué que tu as créé ton compte, mais que tu n'as pas encore finalisé ton abonnement. Ne laisse pas passer cette chance incroyable !
229
230👉 Prends ta décision aujourd'hui et transforme ta vie avec nous !
231
232    https://sniperbuisnesscenter.com/ `,q=Y=>{Y&&window.open(`https://wa.me/${Y.replace(/[^\d]/g,"")}/?text=${R}`,"_blank")},G=async(Y,J="contacts.vcf")=>{f(!0);try{const oe=localStorage.getItem("token"),he={};oe&&(he.Authorization=`Bearer ${oe}`);const Q=await fetch(Y,{headers:he});if(!Q.ok){const ye=await Q.text();throw new Error(`Erreur de téléchargement: ${Q.status} ${Q.statusText} - ${ye}`)}const ue=await Q.blob(),de=Q.headers.get("Content-Disposition");let me=J;if(de){const ye=de.match(/filename\*?=(?:UTF-8'')?([^;]+)/i);if(ye&&ye[1])try{me=decodeURIComponent(ye[1].trim().replace(/^"|"$/g,""))}catch{me=ye[1].trim().replace(/^"|"$/g,"")}}const Le=window.URL.createObjectURL(ue),Ne=document.createElement("a");Ne.href=Le,Ne.download=me,Ne.target="_blank",Ne.rel="noopener noreferrer",document.body.appendChild(Ne),Ne.click(),Ne.remove(),window.URL.revokeObjectURL(Le),N({show:!0,type:"success",message:"Téléchargement réussi!"})}catch{N({show:!0,type:"error",message:"Échec du téléchargement des contacts."})}finally{f(!1)}},K=async()=>{const Y=tg();await G(`${Y}/contacts/export`,"tous_contacts.vcf"),o(!1)},$=async()=>{if(!S.from||!S.to){N({show:!0,type:"error",message:"Veuillez sélectionner les deux dates."});return}const Y=tg(),J=new URLSearchParams({startDate:S.from,endDate:S.to}).toString();await G(`${Y}/contacts/export?${J}`,`contacts_du_${S.from}_au_${S.to}.vcf`),o(!1)},H=async()=>{const Y=tg(),J=x.sex==="Homme"?"male":x.sex==="Femme"?"female":x.sex==="Autre"?"other":"",oe={search:x.search,country:x.country};r||(x.minAge&&(oe.minAge=x.minAge),x.maxAge&&(oe.maxAge=x.maxAge),J&&(oe.sex=J),x.professions.length>0&&(oe.professions=x.professions.map(Q=>Rs(Q)).join(",")),x.interests.length>0&&(oe.interests=x.interests.map(Q=>Rs(Q)).join(","))),v.from&&(oe.startDate=v.from),v.to&&(oe.endDate=v.to);const he=Object.entries(oe).filter(([,Q])=>Q!=null&&Q!==""&&(Array.isArray(Q)?Q.length>0:!0)).map(([Q,ue])=>`${Q}=${encodeURIComponent(String(ue))}`).join("&");await G(`${Y}/contacts/export?${he}`,"contacts_filtres.vcf"),c(!1)};return s.jsx(nn,{children:s.jsxs("div",{className:"p-3 h-screen bg-white",children:[s.jsxs("div",{className:"flex items-center mb-3",children:[s.jsx(Ct,{}),s.jsx("h3",{className:"text-xl font-medium text-center w-full",children:"Fiche de contact"})]}),s.jsx("input",{type:"text",value:x.search,onChange:Y=>_("search",Y.target.value),placeholder:"Rechercher par nom, téléphone...",className:"w-full mb-3 rounded-xl border border-border px-4 py-2 focus:outline-none focus:ring-2 focus:ring-green-300 bg-gray-50 text-gray-700"}),s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsxs("button",{className:"bg-gray-100 px-4 py-2 rounded-lg text-gray-700 font-semibold flex items-center gap-2 border border-border",onClick:()=>i(!0),children:[s.jsx(L,{icon:sw,className:"text-green-700"}),s.jsx("span",{className:"font-bold",children:"Trier"})]}),s.jsx("span",{className:"text-gray-500",children:"A-Z"}),s.jsx("button",{className:"ml-auto bg-gray-100 px-3 py-2 rounded-lg text-gray-700 font-semibold flex items-center gap-2 border border-border hover:bg-gray-200",onClick:()=>o(!0),title:"Télécharger les contacts",disabled:u,children:s.jsx(L,{icon:eu,size:18})}),s.jsx("button",{className:"bg-gray-100 px-3 py-2 rounded-lg text-gray-700 font-semibold flex items-center gap-2 border border-border hover:bg-gray-200",onClick:()=>c(!0),title:"Télécharger les contacts filtrés",disabled:u,children:s.jsx(L,{icon:sw,size:18})})]}),s.jsx(It,{children:a&&s.jsx(Z.div,{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",initial:{opacity:0}
232,animate:{opacity:1},exit:{opacity:0},children:s.jsxs(Z.div,{className:"bg-white rounded-2xl p-6 w-[90vw] max-w-md text-gray-900 relative border border-border",initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},transition:{type:"spring",bounce:.2},children:[s.jsx("h4",{className:"text-lg font-bold mb-4",children:"Télécharger les contacts"}),s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsx("button",{className:"w-full bg-primary text-white rounded-xl py-2 font-bold hover:bg-blue-800 transition-colors",onClick:K,disabled:u,children:u?"Téléchargement...":"Télécharger tous les contacts"}),s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("label",{className:"text-sm font-medium",children:"Ou sélectionner une période :"}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{type:"date",value:S.from,onChange:Y=>B(J=>({...J,from:Y.target.value})),className:"rounded-lg border border-border px-3 py-2"}),s.jsx("input",{type:"date",value:S.to,onChange:Y=>B(J=>({...J,to:Y.target.value})),className:"rounded-lg border border-border px-3 py-2"})]}),s.jsx("button",{className:"w-full bg-green-700 text-white rounded-xl py-2 font-bold hover:bg-green-800 transition-colors",onClick:$,disabled:!S.from||!S.to||u,children:u?"Téléchargement...":"Télécharger la sélection"})]})]}),s.jsx("button",{className:"w-full mt-4 bg-gray-200 text-gray-700 rounded-xl py-2 font-bold hover:bg-gray-300 transition-colors",onClick:()=>o(!1),children:"Annuler"})]})})}),s.jsx(It,{children:l&&s.jsx(Z.div,{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",initial:{opacity:0}
232,animate:{opacity:1},exit:{opacity:0},children:s.jsxs(Z.div,{className:"bg-white rounded-2xl p-6 w-[90vw] max-w-md text-gray-900 relative border border-border",initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},transition:{type:"spring",bounce:.2},children:[s.jsx("h4",{className:"text-lg font-bold mb-4",children:"Télécharger les contacts filtrés"}),s.jsxs("div",{className:"mb-4 text-sm text-gray-700",children:[s.jsx("span",{className:"font-semibold",children:"Résumé du filtre :"}),s.jsx("br",{}),"Pays : ",((ne=OO.find(Y=>Y.flag===x.country))==null?void 0:ne.name)||"Tous",s.jsx("br",{}),r?s.jsx("p",{className:"text-orange-600 font-medium",children:"Les filtres avancés (âge, sexe, professions, intérêts) sont réservés aux abonnés CIBLÉ."}):s.jsxs(s.Fragment,{children:["Âge : ",x.minAge&&x.maxAge?`${x.minAge} - ${x.maxAge}`:x.minAge?`Min ${x.minAge}`:x.maxAge?`Max ${x.maxAge}`:"Tous",s.jsx("br",{}),"Sexe : ",x.sex||"Tous",s.jsx("br",{}),"Professions : ",x.professions.length?x.professions.join(", "):"Toutes",s.jsx("br",{}),"Intérêts : ",x.interests.length?x.interests.join(", "):"Tous"]}
232)]}),r&&s.jsx("button",{onClick:()=>{t("/abonnement"),c(!1)},className:"bg-accent w-full text-white rounded-xl py-2 font-bold hover:bg-green-800 transition-colors mb-4",children:"Mettre à niveau vers l'abonnement CIBLÉ"}),s.jsxs("div",{className:"flex flex-col gap-2 mb-4",children:[s.jsx("label",{className:"text-sm font-medium",children:"Ou sélectionner une période :"}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{type:"date",value:v.from,onChange:Y=>b(J=>({...J,from:Y.target.value})),className:"rounded-lg border border-border px-3 py-2"}),s.jsx("input",{type:"date",value:v.to,onChange:Y=>b(J=>({...J,to:Y.target.value})),className:"rounded-lg border border-border px-3 py-2"})]})]}),s.jsx("button",{className:"w-full bg-primary text-white rounded-xl py-2 font-bold hover:bg-blue-800 transition-colors mb-2",onClick:H,disabled:u,children:u?"Téléchargement...":"Télécharger les contacts filtrés"}),s.jsx("button",{className:"w-full bg-gray-200 text-gray-700 rounded-xl py-2 font-bold hover:bg-gray-300 transition-colors",onClick:()=>c(!1),children:"Annuler"})]})})}),s.jsx(It,{children:n&&s.jsx(Z.div,{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",initial:{opacity:0}
232,animate:{opacity:1},exit:{opacity:0},children:s.jsxs(Z.div,{className:"bg-white rounded-2xl p-6 w-[90vw] max-w-md text-gray-900 relative overflow-y-auto max-h-[80vh] border border-border",initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},transition:{type:"spring",bounce:.2},children:[s.jsx("h4",{className:"text-lg font-bold mb-4",children:"Trier par critères"}),s.jsxs("div",{className:"mb-3",children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Pays"}),s.jsxs("select",{value:x.country,onChange:Y=>_("country",Y.target.value),className:"w-full rounded-lg border border-border px-3 py-2 mb-2 bg-white",children:[s.jsx("option",{value:"",children:"Sélectionner"}),OO.map(Y=>s.jsxs("option",{value:Y.flag,children:[Y.name," (",Y.flag,")"]},Y.flag))]})]}),r?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"p-3 bg-blue-50 border border-border text-blue-800 rounded-lg text-sm text-center mb-4",children:"Les filtres par âge, sexe, profession et centres d'intérêt sont une fonctionnalité exclusive pour les abonnés **CIBLÉ**."}),s.jsx("button",{onClick:()=>{t("/changer-abonnement"),i(!1)},className:"bg-accent w-full text-white rounded-xl py-2 font-bold hover:bg-green-800 transition-colors mb-2",children:"Mettre à niveau vers l'abonnement CIBLÉ"})]}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"mb-3",children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Âge minimum"}),s.jsx("input",{type:"number",value:x.minAge,onChange:Y=>_("minAge",Y.target.value),placeholder:"Min. âge",className:"w-full rounded-lg border border-border px-3 py-2 mb-2"})]}),s.jsxs("div",{className:"mb-3",children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Âge maximum"}),s.jsx("input",{type:"number",value:x.maxAge,onChange:Y=>_("maxAge",Y.target.value),placeholder:"Max. âge",className:"w-full rounded-lg border border-border px-3 py-2 mb-2"})]}),s.jsxs("div",{className:"mb-3",children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Sexe"}),s.jsxs("select",{name:"sex",value:x.sex,onChange:Y=>_("sex",Y.target.value),className:"w-full rounded-lg border border-border px-3 py-2 mb-2 bg-white",children:[s.jsx("option",{value:"",children:"Sélectionner"}),A5e.map(Y=>s.jsx("option",{value:Y,children:Y},Y))]})]}),s.jsxs("div",{className:"mb-3",children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Profession"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:E5e.map(Y=>s.jsx("button",{type:"button",className:`px-3 py-1 rounded-full border text-xs font-medium ${x.professions.includes(Y)?"bg-green-700 text-white border-success":"bg-white text-gray-700 border-border"}`,onClick:()=>z("professions",Y),children:Y},Y))})]}),s.jsxs("div",{className:"mb-3",children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Intérêt"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:yW.map(Y=>{const J=N5e(Y),oe=x.interests.includes(J);return s.jsx("button",{type:"button",className:`px-3 py-1 rounded-full border text-xs font-medium ${oe?"bg-green-700 text-white border-success":"bg-white text-gray-700 border-border"}`,onClick:()=>z("interests",J),children:Y},Y)})})]})]}),s.jsxs("div",{className:"flex gap-3 mt-4",children:[s.jsx("button",{className:"flex-1 bg-primary text-white rounded-xl py-2 font-bold hover:bg-blue-800 transition-colors",onClick:()=>i(!1),children:"Appliquer"}),s.jsx("button",{className:"flex-1 bg-gray-200 text-gray-700 rounded-xl py-2 font-bold hover:bg-gray-300 transition-colors",onClick:()=>i(!1),children:"Annuler"})]})]})})}),P?s.jsx("div",{className:"flex justify-center items-center p-10",children:s.jsx(L,{icon:Yt,size:36,className:"animate-spin text-green-700"})}):O?s.jsx("div",{className:"text-center py-8 text-red-500",children:O instanceof Error?O.message:O}):s.jsxs("div",{className:"flex flex-col divide-y divide-gray-100 bg-white rounded-xl border border-border",children:[W.map(Y=>s.jsxs("div",{className:"flex items-center px-3 py-3 gap-3",children:[s.jsx(gW,{src:Y.avatar||Y.avatarId,alt:Y.name,size:40,className:"rounded-full border border-border"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"font-semibold text-sm truncate text-gray-900",children:Y.name}),s.jsx("div",{className:"text-xs text-gray-400 truncate",children:Y.phoneNumber})]}),s.jsx("button",{className:"ml-2 text-green-600 hover:bg-green-50 rounded-full p-2 transition-colors",onClick:()=>
232q(Y.phoneNumber||""),title:"Discuter sur WhatsApp",children:s.jsx(L,{icon:nu,size:20})})]},Y._id)),W.length===0&&s.jsx("div",{className:"text-center py-8 text-gray-500",children:"Aucun contact trouvé pour ces critères."})]}),s.jsx(It,{children:E.show&&s.jsx(Z.div,{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>N({...E,show:!1}),children:s.jsx(Z.div,{className:"bg-white rounded-2xl p-6 mx-4 max-w-sm w-full border border-border",initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},onClick:Y=>Y.stopPropagation(),children:s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:`w-12 h-12 ${E.type==="success"?"bg-green-100":"bg-red-100"} rounded-full flex items-center justify-center mx-auto mb-4`,children:E.type==="success"?s.jsx("svg",{className:"w-6 h-6 text-green-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}):s.jsx("svg",{className:"w-6 h-6 text-red-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),s.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-2",children:E.type==="success"?"Succès":"Erreur"}),s.jsx("p",{className:"text-gray-600 mb-6",children:E.message}),s.jsx("button",{onClick:()=>N({...E,show:!1}),className:`w-full ${E.type==="success"?"bg-green-600 hover:bg-green-700":"bg-blue-600 hover:bg-blue-700"} text-white py-2 px-4 rounded-xl font-medium transition-colors`,children:"Fermer"})]})})})})]})})}const S5e=/^[a-zA-Z0-9]$/;function XE(e=6){const[t,r]=C.useState(()=>Array(e).fill("")),n=C.useRef([]),i=f=>{var x;(x=n.current[Math.min(Math.max(f,0),e-1)])==null||x.focus()},a=(f,x)=>{const m=x.replace(/[^a-zA-Z0-9]/g,"").slice(0,e-f).split("");m.length&&(r(p=>{const y=[...p];return m.forEach((v,b)=>{y[f+b]=v}),y}),setTimeout(()=>i(f+m.length),0))};return{otp:t,inputs:n,handleChange:(f,x)=>{if(x.length>1){a(f,x);return}x!==""&&!S5e.test(x)||(r(m=>{const p=[...m];return p[f]=x,p}),x&&i(f+1))},handleKeyDown:(f,x)=>{x.key==="Backspace"&&!t[f]&&f>0&&i(f-1)},handlePaste:(f,x)=>{x.preventDefault(),a(f,x.clipboardData.getData("text"))},reset:()=>r(Array(e).fill("")),code:t.join("")}}const M1="/assets/Data-security-C1wx_On_.png";function B5e(){const{otp:e,inputs:t,handleChange:r,handleKeyDown:n,handlePaste:i,code:a}=XE(),[o,l]=C.useState(!1),[c,u]=C.useState(""),f=Cr(),x=lt(),{verifyOtp:m}=Gt(),[p,y]=C.useState(!1),[v,b]=C.useState(null),[E,N]=C.useState(!1),{userId:j,email:A,fromRegistration:w,fromLogin:S,withdrawalId:B,withdrawalAmount:D,withdrawalCurrency:P,flow:O}=f.state||{},M=A||new URLSearchParams(f.search).get("email")||(S||w?j:""),I=S||w?j:void 0;C.useEffect(()=>{!I&&!M&&!B&&O!=="passwordReset"&&x("/connexion")},[I,M,B,O,x]);const V=async z=>{if(z.preventDefault(),a.length!==6){u("Veuillez entrer le code complet");return}l(!0),u("");try{if(O==="passwordReset"){const R=await X.verifyPasswordResetOtp(M,a),G=Ve(R).passwordResetToken;x("/reset-password",{state:{email:M,passwordResetToken:G}})}else if(B){const R=await X.verifyWithdrawal({transactionId:B,verificationCode:a});Ve(R),b({type:"success",message:"Retrait vérifié. Votre paiement est en cours de traitement."}),y(!0),x("/transaction-confirmation",{state:{transactionId:B,withdrawalAmount:D,withdrawalCurrency:P}})}else if(w||S){await m(I,a);const R=sessionStorage.getItem("sso_return_to");if(R){sessionStorage.removeItem("sso_return_to"),window.location.replace(R);return}x("/")}else{u("Contexte de vérification OTP inconnu. Veuillez recommencer le processus.");return}}catch(R){u(R instanceof Error?R.message:"Verification failed")}finally{l(!1)}},W=()=>{N(!0)},_=async z=>{l(!0),u(""),N(!1);try{if(O==="passwordReset"){const R=await X.requestPasswordResetOtp(M,z);Ve(R),b({type:"success",message:`Code renvoyé via ${z==="whatsapp"?"WhatsApp":"email"} ! Veuillez vérifier.`}),y(!0)}else if(w||S){if(!I){u("Session expirée. Veuillez réessayer de vous connecter.");return}const R=w?"register":"login",q=await X.resendOtpEnhanced({userId:I,identifier:M,purpose:R,channel:z});Ve(q),b({type:"success",message:`Code renvoyé via ${z==="whatsapp"?"WhatsApp":"email"} ! Veuillez vérifier.`}),y(!0)}else if(B&&D!==void 0){const R=await X.initiateWithdrawal(D),q=Ve(R);b({type:"success",message:q.message||"Code de retrait renvoyé ! Veuillez vérifier votre téléphone."}),y(!0)}else{u("Impossible de renvoyer l'OTP. Informations manquantes.");return}}catch(R){u(R instanceof Error?R.message:"Échec du renvoi de l'OTP")}finally{l(!1)}};return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center mb-4 px-3",children:[s.jsx(Ct,{}),s.jsx("h3",{className:"text-xl font-medium text-center w-full text-gray-900",children:"Verification"})]}),s.jsxs("div",{className:"min-h-screen flex flex-col items-center justify-center bg-white px-4",children:[s.jsx("img",{src:M1,alt:"Analyse",className:"size-44 mb-6 mx-auto"}),s.jsxs("form",{onSubmit:V,className:"w-full max-w-xs flex flex-col items-center",children:[s.jsx("div",{className:"text-center mb-2 font-semibold text-lg text-gray-800",children:S?"Connexion - Code de vérification":B?"Retrait - Code de vérification":O==="passwordReset"?"Réinitialisation mot de passe - Code de vérification":"Entrez le code de vérification envoyé à"}),s.jsx("div",{className:"text-center text-gray-600 mb-1",children:M||"votre numéro enregistré"}),(S||B||O==="passwordReset")&&s.jsxs("div",{className:"text-center text-sm text-gray-500 mb-2",children:["Un code de vérification a été envoyé à votre ",M?"email":"numéro de téléphone"," pour finaliser la ",S?"connexion":B?"demande de retrait":"réinitialisation du mot de passe","."]}),s.jsx("div",{className:"text-center text-xs text-amber-600 bg-amber-50 border border-border rounded-lg px-3 py-2 mb-2",children:"Si vous ne trouvez pas l'email, vérifiez votre dossier spam ou courrier indésirable."}),c&&s.jsx("div",{className:"text-center text-red-500 text-sm mb-2",children:c}),s.jsx("div",{className:"flex justify-center gap-2 my-4",children:e.map((z,R)=>s.jsx("input",{ref:q=>{t.current[R]=q},type:"text",inputMode:"text",autoComplete:"one-time-code",autoCapitalize:"none",autoCorrect:"off",spellCheck:!1,value:z,onFocus:q=>q.target.select(),onChange:q=>r(R,q.target.value),onKeyDown:q=>n(R,q),onPaste:q=>i(R,q),className:"w-12 h-12 text-center text-2xl border-2 border-border rounded-lg focus:outline-none focus:border-primary bg-white font-mono",autoF
232ocus:R===0},R))}),s.jsxs("div",{className:"text-xs text-gray-500 mb-4",children:["Vous n'avez pas reçu le code ?",s.jsx("button",{type:"button",onClick:W,disabled:o,className:"text-primary font-semibold cursor-pointer hover:underline disabled:opacity-50 bg-transparent",children:"Renvoyer"})]}),s.jsx("button",{type:"submit",disabled:o||a.length!==6,className:"w-full bg-primary text-white rounded-xl py-3 font-bold hover:bg-blue-800 disabled:bg-blue-400 disabled:cursor-not-allowed transition-colors text-lg",children:o?"Vérification...":"Vérifier"})]})]}),p&&v&&s.jsx(Z.div,{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:s.jsxs(Z.div,{className:"bg-white rounded-2xl p-6 w-[90vw] max-w-sm text-gray-900 relative border border-border",initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},transition:{type:"spring",bounce:.2},children:[s.jsx("h4",{className:`text-lg font-bold mb-4 text-center ${v.type==="success"?"text-green-600":v.type==="error"?"text-red-600":"text-gray-800"}`,children:v.type==="success"?"Succès":v.type==="error"?"Erreur":"Confirmation"}),s.jsx("p",{className:"text-sm text-gray-700 text-center mb-4",children:v.message}),v.type==="confirm"?s.jsxs("div",{className:"flex gap-3 mt-2",children:[s.jsx("button",{type:"button",className:"flex-1 bg-red-500 text-white rounded-xl py-2 font-bold hover:bg-red-600 transition-colors",onClick:()=>{var z;(z=v.onConfirm)==null||z.call(v),y(!1)},children:"Confirmer"}),s.jsx("button",{type:"button",className:"flex-1 bg-gray-200 text-gray-700 rounded-xl py-2 font-bold hover:bg-gray-300 transition-colors",onClick:()=>y(!1),children:"Annuler"})]}):s.jsx("button",{type:"button",className:"w-full bg-blue-500 text-white rounded-xl py-2 font-bold hover:bg-blue-600 transition-colors",onClick:()=>y(!1),children:"Fermer"})]})}),E&&s.jsx(Z.div,{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",initial:{opacity:0}
232,animate:{opacity:1},exit:{opacity:0},children:s.jsxs(Z.div,{className:"bg-white rounded-2xl p-6 w-[90vw] max-w-sm text-gray-900 relative border border-border",initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},transition:{type:"spring",bounce:.2},children:[s.jsx("h4",{className:"text-lg font-bold mb-4 text-center text-blue-600",children:"📬 Choisir la méthode de réception"}),s.jsx("p",{className:"text-sm text-gray-700 text-center mb-6",children:"Comment souhaitez-vous recevoir le nouveau code OTP ?"}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("button",{type:"button",onClick:()=>_("email"),disabled:o,className:"w-full flex items-center gap-3 p-4 border-2 border-border rounded-xl hover:border-primary hover:bg-blue-50 transition-all disabled:opacity-50 disabled:cursor-not-allowed",children:[s.jsx("span",{className:"text-2xl",children:"📧"}),s.jsxs("div",{className:"text-left",children:[s.jsx("div",{className:"font-medium text-gray-800",children:"Email"}),s.jsx("div",{className:"text-sm text-gray-500",children:"Recevoir le code par email"})]})]}),s.jsxs("button",{type:"button",onClick:()=>_("whatsapp"),disabled:o,className:"w-full flex items-center gap-3 p-4 border-2 border-border rounded-xl hover:border-success hover:bg-green-50 transition-all disabled:opacity-50 disabled:cursor-not-allowed",children:[s.jsx("span",{className:"text-2xl",children:"📱"}),s.jsxs("div",{className:"text-left",children:[s.jsx("div",{className:"font-medium text-gray-800",children:"WhatsApp"}),s.jsx("div",{className:"text-sm text-gray-500",children:"Recevoir le code via WhatsApp"})]})]})]}),s.jsx("button",{type:"button",onClick:()=>N(!1),disabled:o,className:"w-full mt-4 bg-gray-200 text-gray-700 rounded-xl py-2 font-bold hover:bg-gray-300 transition-colors disabled:opacity-50",children:"Annuler"})]})})]})}function D5e(){const[e,t]=C.useState(!1),[r,n]=C.useState({show:!1,message:""}),i=Cr(),a=lt(),{transactionId:o,withdrawalAmount:l,withdrawalCurrency:c}=i.state||{};C.useEffect(()=>{(!o||l===void 0)&&a("/wallet")},[o,l,a]);const u=()=>{n({show:!0,message:"Le reçu PDF sera disponible une fois la transaction finalisée."})},f=()=>{if(o&&l!==void 0&&c){const x=`Ma demande de retrait de ${l.toLocaleString("fr-FR")} ${c} (ID: ${o}) est en cours de traitement.`;navigator.share?navigator.share({text:x}):(navigator.clipboard.writeText(x),n({show:!0,message:"Informations de la transaction copiées dans le presse-papier !"}))}else n({show:!0,message:"Informations de transaction insuffisantes pour partager."})};return!o||l===void 0?s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-white text-gray-700",children:"Redirection..."}):s.jsxs("div",{className:"min-h-screen flex flex-col items-center justify-center bg-white px-4 py-8",children:[s.jsx("div",{className:"w-full max-w-md flex justify-start mb-4",children:s.jsx(Ct,{})}),s.jsxs("div",{className:"w-full max-w-md bg-bg border border-dashed border-border rounded-xl p-4 flex items-center gap-4 mb-6",children:[s.jsx("div",{className:"bg-primary/10 rounded-full p-3 flex items-center justify-center",children:s.jsxs("svg",{width:"32",height:"32",fill:"none",viewBox:"0 0 24 24",children:[s.jsx("circle",{cx:"12",cy:"12",r:"10",fill:"#115CF6",opacity:"0.1"}),s.jsx("path",{d:"M8 12h8M8 16h5",stroke:"#115CF6",strokeWidth:"2",strokeLinecap:"round"})]})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("div",{className:"font-semibold text-gray-800",children:"Retrait SBC"}),s.jsx("div",{className:"text-xs text-gray-500",children:new Date().toLocaleDateString("fr-FR",{day:"2-digit",month:"long",weekday:"long"})})]}),s.jsxs("div",{className:"text-primary font-bold text-lg",children:[l.toLocaleString("fr-FR")," ",c||"F"]})]}),s.jsx(Z.div,{initial:{rotate:0},animate:{rotate:360},transition:{repeat:1/0,duration:2,ease:"linear"},className:"mb-4",children:s.jsx("div",{className:"bg-yellow-100 rounded-full w-20 h-20 flex items-center justify-center mx-auto",children:s.jsx(L,{icon:Yt,size:48,className:"text-yellow-500 animate-spin"})})}),s.jsx("div",{className:"text-2xl font-bold text-gray-800 text-center mb-2",children:"Votre retrait est en cours de traitement"}),s.jsx("div",{className:"text-gray-500 text-center max-w-md mb-6",children:"Votre demande de retrait a été enregistrée et est en cours de traitement. Vous recevrez une notification lorsque le processus sera terminé."}),s.jsxs("div",{className:"flex gap-3 mb-6",children:[s.jsxs("button",{onClick:u,className:"flex items-center gap-2 bg-primary text-white rounded-xl px-5 py-2 font-bold hover:bg-blue-800 transition-colors",children:[s.jsx(L,{icon:eu})," Télécharger PDF"]}),s.jsxs("button",{onClick:f,className:"flex items-center gap-2 bg-green-600 text-white rounded-xl px-5 py-2 font-bold hover:bg-green-700 transition-colors",children:[s.jsx(L,{icon:tu})," Partager"]})]}),s.jsxs("button",{className:"flex items-center gap-2 text-primary font-semibold mb-2 focus:outline-none",onClick:()=>t(x=>!x),children:[e?s.jsx(L,{icon:Th}):s.jsx(L,{icon:ly})," Voir plus"]}),s.jsx(It,{children:e&&s.jsxs(Z.div,{initial:{opacity:0,y:10}
232,animate:{opacity:1,y:0},exit:{opacity:0,y:10},className:"w-full max-w-md bg-white border border-border rounded-xl p-4 mb-4",children:[s.jsx("div",{className:"mb-2 text-sm text-gray-500",children:"ID de la transaction"}),s.jsx("div",{className:"font-mono text-sm mb-2",children:o}),s.jsx("div",{className:"mb-2 text-sm text-gray-500",children:"Type"}),s.jsx("div",{className:"font-semibold mb-2",children:"Retrait"}),s.jsx("div",{className:"mb-2 text-sm text-gray-500",children:"Statut"}),s.jsx("div",{className:"font-semibold mb-2 text-yellow-600",children:"En cours de traitement"}),s.jsx("div",{className:"mb-2 text-sm text-gray-500",children:"Montant"}),s.jsxs("div",{className:"font-bold text-lg mb-2 text-green-600",children:[l.toLocaleString("fr-FR")," ",c||"F"]}),s.jsx("div",{className:"mb-2 text-sm text-gray-500",children:"Description"}),s.jsx("div",{className:"mb-2",children:"Demande de retrait de fonds"}),s.jsx("div",{className:"mb-2 text-sm text-gray-500",children:"Date"}),s.jsx("div",{className:"mb-2",children:new Date().toLocaleDateString("fr-FR",{day:"2-digit",month:"short",hour:"2-digit",minute:"2-digit"})})]})}),s.jsx(It,{children:r.show&&s.jsx(Z.div,{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",initial:{opacity:0}
232,animate:{opacity:1},exit:{opacity:0},onClick:()=>n({show:!1,message:""}),children:s.jsx(Z.div,{className:"bg-white rounded-2xl p-6 mx-4 max-w-sm w-full border border-border",initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},onClick:x=>x.stopPropagation(),children:s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"w-12 h-12 bg-blue-100 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx("svg",{className:"w-6 h-6 text-blue-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),s.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-2",children:"Information"}),s.jsx("p",{className:"text-gray-600 mb-6",children:r.message}),s.jsx("button",{onClick:()=>n({show:!1,message:""}),className:"w-full bg-blue-600 text-white py-2 px-4 rounded-xl font-medium hover:bg-blue-700 transition-colors",children:"OK"})]})})})})]})}const F5e="/assets/splash-1-D5T4aAmg.png",P5e="/assets/splash-2-Bl4XdGdT.png",T5e="/assets/splash-3-ezg7AVwN.png",M5e="/assets/splash-4-CFV2AyCg.jpg",Bl="/assets/logo-sbc-DLAiMW4D.png";function A0(){return s.jsx("footer",{className:"mt-6 pt-3 pb-2 text-xs text-gray-400",children:s.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[s.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-x-2 gap-y-1",children:[s.jsx(bn,{to:"/a-propos",className:"hover:text-primary",children:"À propos"}),s.jsx("span",{children:"·"}),s.jsx(bn,{to:"/conditions",className:"hover:text-primary",children:"CGU"}),s.jsx("span",{children:"·"}),s.jsx(bn,{to:"/confidentialite",className:"hover:text-primary",children:"Confidentialité"}),s.jsx("span",{children:"·"}),s.jsx("a",{href:"mailto:[email protected]",className:"hover:text-primary",children:"Contact"})]}),s.jsxs("p",{className:"text-[10px] text-gray-400/80",children:["© ",new Date().getFullYear()," Sniper Business Center · Cameroun"]})]})})}const _u=[{title:"Bienvenue sur SBC",description:"L'espace ultime pour élargir ton réseau professionnel, acquérir des compétences de pointe et gagner jusqu'à 5 000 FCFA par jour.",image:F5e},{title:"Formations 100% pratiques",description:"Fini les formations théoriques ennuyeuses. Nos coachs experts, en première ligne sur le terrain, t'offrent un cocktail explosif de compétences directement applicables.",image:P5e},{title:"Opportunités lucratives",description:"Pas juste des revenus supplémentaires : nous t'offrons des solutions concrètes pour booster tes gains au quotidien.",image:T5e},{title:"Rejoins la communauté",description:"Bénéficie d'un accompagnement personnalisé au sein de la meilleure communauté d'Afrique. Ensemble, contre tous.",image:M5e}],O5e=()=>typeof window<"u"?localStorage.getItem("sessionExpired")==="1":!1,L5e=()=>{typeof window<"u"&&localStorage.removeItem("sessionExpired")},R5e=50;function _5e(){const e=lt(),[t,r]=C.useState(0),[n,i]=C.useState(1),[a,o]=C.useState(!1);C.useEffect(()=>{O5e()&&(o(!0),L5e())},[]);const l=()=>{t<_u.length-1&&(i(1),r(t+1))},c=()=>{t>0&&(i(-1),r(t-1))},u=()=>{i(1),r(_u.length-1)},f=()=>e("/connexion"),x=()=>e("/signup"),m=()=>e("/connexion"),p=(E,N)=>{N.offset.x<-50?l():N.offset.x>R5e&&c()},y=_u[t],v=t===_u.length-1,b={enter:E=>({opacity:0,x:E*32}),center:{opacity:1,x:0},exit:E=>({opacity:0,x:E*-32})};return s.jsxs("div",{className:"bg-bg relative min-h-screen w-full overflow-hidden",children:[s.jsx("div",{className:"pointer-events-none absolute -top-24 -left-24 h-72 w-72 rounded-full bg-primary/10 blur-3xl"}),s.jsx("div",{className:"pointer-events-none absolute -bottom-32 -right-24 h-80 w-80 rounded-full bg-whatsapp/10 blur-3xl"}),s.jsxs("div",{className:"relative z-10 flex min-h-screen flex-col px-5 py-6 max-w-md mx-auto",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[t>0?s.jsx("button",{onClick:c,"aria-label":"Précédent",className:"h-9 w-9 flex items-center justify-center rounded-full bg-white/80 text-gray-700 hover:bg-white transition-colors border border-border",children:s.jsx(L,{icon:c0,size:20})}):s.jsx("div",{className:"h-9 w-9"}),s.jsx("img",{src:Bl,alt:"SBC",className:"h-9 w-9 object-contain"})]}),s.jsx("button",{onClick:m,className:"text-sm font-semibold text-primary hover:underline",children:"Se connecter"})]}),a&&s.jsx("div",{className:"mb-4 rounded-xl bg-red-50 border border-border px-4 py-2 text-sm text-red-700 font-medium",children:"Votre session a expiré. Veuillez vous reconnecter."}),s.jsx("div",{className:"flex gap-1.5 mb-6",role:"progressbar","aria-valuenow":t+1,"aria-valuemax":_u.length,children:_u.map((E,N)=>s.jsx("div",{className:"flex-1 h-1 rounded-full bg-gray-200 overflow-hidden",children:s.jsx(Z.div,{className:"h-full bg-primary",initial:{width:"0%"}
232,animate:{width:N<t||N===t?"100%":"0%"},transition:{duration:.4,ease:"easeOut"}})},N))}),s.jsx(Z.div,{className:"flex-1 flex flex-col items-center justify-center",drag:"x",dragConstraints:{left:0,right:0},dragElastic:.2,onDragEnd:p,children:s.jsx(It,{mode:"wait",custom:n,children:s.jsxs(Z.div,{custom:n,variants:b,initial:"enter",animate:"center",exit:"exit",transition:{duration:.28,ease:"easeOut"},className:"w-full flex flex-col items-center",children:[s.jsx("div",{className:"w-full flex items-center justify-center mb-6",style:{height:"min(45vh, 280px)"},children:s.jsx("img",{src:y.image,alt:"",className:"max-h-full max-w-full object-contain drop-shadow-lg"})}),s.jsxs("div",{className:"text-center px-2",style:{minHeight:170},children:[s.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-3",children:y.title}),s.jsx("p",{className:"text-gray-600 leading-relaxed",children:y.description})]})]},t)})}),s.jsx("div",{className:"mt-6 flex flex-col gap-3",children:v?s.jsxs(s.Fragment,{children:[s.jsx("button",{onClick:f,className:"w-full bg-primary hover:bg-blue-700 text-white font-bold rounded-xl py-3 transition-colors",children:"Se connecter"}),s.jsx("button",{onClick:x,className:"w-full bg-white border-2 border-primary text-primary font-bold rounded-xl py-3 hover:bg-blue-50 transition-colors",children:"Créer un compte"})]}):s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("button",{onClick:u,className:"text-sm font-semibold text-gray-500 hover:text-gray-700",children:"Ignorer"}),s.jsx("button",{onClick:l,className:"bg-primary hover:bg-blue-700 text-white font-bold rounded-xl px-6 py-3 transition-colors",children:"Suivant"})]})}),s.jsx(A0,{})]})]})}const I5e=e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),$5e=e=>/^\+?[\d\s-()]+$/.test(e)&&e.replace(/\D/g,"").length>=8,e4=async e=>{var t,r;try{const n=await e();return n?n.status&&n.status>=400?(n.status,null):n.isOverallSuccess===!1?null:n:null}catch(n){return(t=n==null?void 0:n.message)!=null&&t.includes("404")||(n==null?void 0:n.status)===404||(r=n==null?void 0:n.message)!=null&&r.includes("Network Error")||n==null||n.code,null}};const z5e=(e,t)=>{let r;return(...n)=>{clearTimeout(r),r=setTimeout(()=>e(...n),t)}},V5e=({isOpen:e,onClose:t,recoveryInfo:r,enteredPassword:n})=>{const i=()=>{const a=new URLSearchParams;r.suggestedIdentifiers.email&&a.append("email",r.suggestedIdentifiers.email),r.suggestedIdentifiers.phoneNumber&&a.append("phone",r.suggestedIdentifiers.phoneNumber),r.suggestedIdentifiers.countryCode&&a.append("country",r.suggestedIdentifiers.countryCode),n&&a.append("password",n),window.location.href=`/signup?${a.toString()}`};return s.jsx(It,{children:e&&s.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-40 p-4",children:s.jsxs(Z.div,{className:"bg-white rounded-2xl max-w-md w-full relative animate-fadeIn max-h-[90vh] overflow-y-auto border border-border",initial:{scale:.9,opacity:0,y:20},animate:{scale:1,opacity:1,y:0},exit:{scale:.9,opacity:0,y:20},transition:{type:"spring",bounce:.2,duration:.4},onClick:a=>a.stopPropagation(),children:[s.jsxs("div",{className:"relative p-4 border-b border-border",children:[s.jsx("button",{className:"absolute top-4 right-4 text-gray-400 hover:text-gray-700 text-xl",onClick:t,children:s.jsx(L,{icon:gt})}),s.jsxs("div",{className:"text-center pr-8",children:[s.jsx("div",{className:"text-3xl mb-2",children:r.totalTransactions>0?"🎉":"⚠️"}),s.jsx("h3",{className:"text-lg font-bold text-gray-800",children:r.totalTransactions>0?"Récupération disponible!":"Compte introuvable"}),s.jsx("p",{className:"text-sm text-gray-600 mt-1",children:r.totalTransactions>0?"Vos transactions peuvent être récupérées":"Mais récupération possible"})]})]}),s.jsxs("div",{className:"p-4",children:[s.jsx("p",{className:"text-gray-700 text-center mb-4 text-sm",children:r.message}),r.totalTransactions>0&&s.jsxs("div",{className:"flex justify-center gap-6 mb-4 p-3 bg-gray-50 rounded-lg",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("span",{className:"block text-xl font-bold text-blue-600",children:r.totalTransactions}),s.jsxs("span",{className:"text-xs text-gray-600",children:["Transaction",r.totalTransactions>1?"s":""]})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("span",{className:"block text-xl font-bold text-green-600",children:r.totalAmount.toLocaleStr
232ing()}),s.jsx("span",{className:"text-xs text-gray-600",children:"XAF"})]})]}),r.totalTransactions===0&&s.jsx("div",{className:"p-3 bg-orange-50 rounded-lg mb-4 border border-border",children:s.jsx("p",{className:"text-orange-700 text-sm text-center",children:"Vos informations de connexion ont été perdues, mais nous avons détecté des transactions associées à ce numéro. Inscrivez-vous avec les mêmes identifiants pour tout récupérer automatiquement."})}),s.jsxs("div",{className:"bg-blue-50 p-3 rounded-lg mb-4",children:[s.jsx("h4",{className:"font-semibold text-gray-800 mb-2 text-sm",children:"Utilisez ces identifiants pour récupérer:"}),r.suggestedIdentifiers.email&&s.jsxs("div",{className:"flex items-center mb-2 text-sm",children:[s.jsx("span",{className:"mr-2",children:"📧"}),s.jsx("span",{className:"text-gray-700",children:"Email: "}),s.jsx("span",{className:"ml-1 font-medium text-blue-700 break-all",children:r.suggestedIdentifiers.email})]}),r.suggestedIdentifiers.phoneNumber&&s.jsxs("div",{className:"flex items-center mb-2 text-sm",children:[s.jsx("span",{className:"mr-2",children:"📱"}),s.jsx("span",{className:"text-gray-700",children:"Téléphone: "}),s.jsx("span",{className:"ml-1 font-medium text-blue-700",children:r.suggestedIdentifiers.phoneNumber})]}),s.jsxs("div",{className:"flex items-center text-sm",children:[s.jsx("span",{className:"mr-2",children:"🌍"}),s.jsx("span",{className:"text-gray-700",children:"Pays: "}),s.jsx("span",{className:"ml-1 font-medium text-blue-700",children:r.suggestedIdentifiers.countryCode})]})]})]}),s.jsxs("div",{className:"flex flex-col gap-2 p-4 bg-gray-50 border-t border-border",children:[s.jsx("button",{className:"w-full py-3 px-4 bg-primary hover:bg-blue-700 text-white font-medium rounded-xl transition-colors text-sm",onClick:i,children:r.totalTransactions>0?"S'inscrire & Récupérer":"S'inscrire pour récupérer"}),s.jsx("button",{className:"w-full py-2 px-4 bg-gray-200 hover:bg-gray-300 text-gray-700 font-medium rounded-xl transition-colors text-sm",onClick:t,children:"Annuler"})]})]})})})},O1={DATA:"signupFormData",STEP:"signupFormStep"},vW=()=>{try{if(localStorage.removeItem(O1.DATA),localStorage.removeItem(O1.STEP),window.location.search){const e=new URL(window.location.href);e.search="",window.history.replaceState({},document.title,e.toString())}}catch{}},U5e=()=>{try{const e=localStorage.getItem(O1.DATA)!==null,t=localStorage.getItem(O1.STEP)!==null;return e||t}catch{return!1}},q5e=()=>{U5e(),vW()},$l={type:"spring",stiffness:260,damping:26},W5e={duration:.35,ease:"easeOut"},On={hidden:{opacity:0,y:12},show:{opacity:1,y:0,transition:W5e}},Ia={hidden:{opacity:0,y:-24},show:{opacity:1,y:0,transition:{...$l,duration:.5}}},uu={hidden:{opacity:0,y:24},show:{opacity:1,y:0,transition:$l}},Dl={hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.06,delayChildren:.05}}},qn={hidden:{opacity:0,y:16},show:{opacity:1,y:0,transition:$l}},LO={hidden:{opacity:0,x:20},show:{opacity:1,x:0,transition:$l}},H5e={hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.14,delayChildren:.08}}},RO={hidden:{opacity:0,x:-28},show:{opacity:1,x:0,transition:$l}},G5e={hidden:{opacity:0,x:28},show:{opacity:1,x:0,transition:$l}},K5e={hidden:{opacity:0,scale:.9},show:{opacity:1,scale:1,transition:{type:"spring",stiffness:300,damping:22}}},_O={hidden:{opacity:0,scaleY:.85,y:-8,transformOrigin:"top"},show:{opacity:1,scaleY:1,y:0,transition:$l}},X5e={hidden:{opacity:0,y:36},show:{opacity:1,y:0,transition:$l}};function Y5e(){const{t:e}=Ky(),[t,r]=C.useState(!1),[n,i]=C.useState(""),[a,o]=C.useState(""),[l,c]=C.useState({identifier:"",password:""}),[u,f]=C.useState(!1),[x,m]=C.useState(!1),[p,y]=C.useState(null),[v,b]=C.useState(!1),E=lt(),{login:N}=Gt(),j=()=>{let S=!0;const B={identifier:"",password:""};return n?!I5e(n)&&!$5e(n)&&(B.identifier=e("pages.connexion.invalidEmailOrPhone"),S=!1):(B.identifier=e("pages.connexion.invalidEmailOrPhone"),S=!1),a.length<6&&(B.password=e("pages.connexion.passwordMinLength"),S=!1),c(B),S},A=async(S,B)=>{try{const D=await e4(()=>X.checkRecoveryLogin(S));if(D){const P=Ve(D);P&&P.data&&(y(P.data),m(!0))}}catch{}},w=async S=>{if(S.preventDefault(),j()){f(!0);try{const B=await N(n,a);if(q5e(),B.hasNegativeBalance&&B.recoveryMessage&&b(!0),B.requiresOtp)E("/otp",{state:{userId:B.userId,email:B.email||n,fromLogin:!0}});else{const D=sessionStorage.getItem("sso_return_to");if(D){sessionStorage.removeItem("sso_return_to"),window.location.replace(D);return}E("/")}}catch(B){B instanceof Error&&(B.message.includes("401")||B.message.includes("404"))?(await A(n),c({identifier:"",password:e("pages.connexion.checkCredentials")})):c({identifier:"",password:B instanceof Error?B.message:e("pages.connexion.loginFailed")})}finally{f(!1)}}};return s.jsxs(Z.div,{variants:On,initial:"hidden",animate:"show",className:"min-h-screen flex flex-col items-center justify-center bg-white py-8 px-4",children:[s.jsxs(Z.div,{variants:uu,className:"w-full max-w-md p-8",children:[s.jsxs(Z.div,{variants:Ia,children:[s.jsx("img",{src:Bl,alt:"logo",className:" mb-4 object-contain"}
232),s.jsx("h1",{className:"text-3xl font-bold text-gray-800 mb-2",children:e("pages.connexion.title")}),s.jsx("p",{className:"text-gray-500 mb-8",children:e("pages.connexion.loginHere")})]}),s.jsxs("form",{className:"flex flex-col gap-6",onSubmit:w,noValidate:!0,children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 font-medium mb-2",children:e("pages.connexion.emailOrPhone")}),s.jsx("input",{type:"text",placeholder:e("pages.connexion.emailOrPhonePlaceholder"),className:`w-full border ${l.identifier?"border-danger":"border-border"} rounded-xl px-4 py-3 focus:outline-none focus:ring-2 focus:ring-primary text-gray-700 placeholder-gray-400`,value:n,onChange:S=>i(S.target.value)}),l.identifier&&s.jsx("div",{className:"text-red-500 text-xs mt-1",children:l.identifier}),s.jsx("small",{className:"text-gray-500 text-xs mt-1",children:e("pages.connexion.emailPhoneHint")})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 font-medium mb-2",children:e("common.password")}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:t?"text":"password",placeholder:e("common.password"),className:`w-full border ${l.password?"border-danger":"border-border"} rounded-xl px-4 py-3 focus:outline-none focus:ring-2 focus:ring-primary text-gray-700 placeholder-gray-400 pr-12`,value:a,onChange:S=>o(S.target.value)}),s.jsx("button",{type:"button",className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400",onClick:()=>r(S=>!S),tabIndex:-1,children:t?s.jsx(L,{icon:ow}):s.jsx(L,{icon:zc})})]}),l.password&&s.jsx("div",{className:"text-red-500 text-xs mt-1",children:l.password}),s.jsx("div",{className:"flex justify-end mt-2",children:s.jsx("button",{type:"button",className:"text-primary text-sm font-medium hover:underline bg-transparent",onClick:()=>E("/forgot-password"),children:e("pages.connexion.forgotPassword")})})]}),s.jsx("button",{type:"submit",disabled:u,className:"w-full bg-primary hover:bg-blue-700 disabled:bg-blue-400 disabled:cursor-not-allowed text-white font-bold py-3 rounded-xl text-lg mt-2",children:e(u?"common.pleaseWait":"pages.connexion.connectButton")})]}),s.jsxs("div",{className:"text-center text-md text-gray-500 mt-6",children:[e("pages.connexion.noAccount")," ",s.jsx("button",{type:"button",className:"text-primary font-semibold hover:underline bg-transparent",onClick:()=>E("/signup"),children:e("common.signup")})]})]}),s.jsx("div",{className:"w-full max-w-md px-4",children:s.jsx(A0,{})}),p&&s.jsx(V5e,{isOpen:x,onClose:()=>{m(!1),y(null)},recoveryInfo:p,enteredPassword:a}),s.jsx(U3,{isOpen:v,onClose:()=>b(!1),userReferralCode:"",negativeBalance:0})]})}const bW=C.createContext(void 0),Q5e=({children:e})=>{const[t,r]=C.useState(null);return s.jsx(bW.Provider,{value:{affiliationCode:t,setAffiliationCode:r},children:e})},CW=()=>{const e=C.useContext(bW);if(e===void 0)throw new Error("useAffiliation must be used within an AffiliationProvider");return e},Z5e=({isOpen:e,onClose:t,recoveryData:r})=>{const n=i=>{t(),window.location.href=i};return s.jsx(It,{children:e&&s.jsx(Z.div,{className:"fixed inset-0 z-[9999] flex items-center justify-center bg-black bg-opacity-50",initial:{opacity:0}
232,animate:{opacity:1},exit:{opacity:0},onClick:t,children:s.jsxs(Z.div,{className:"recovery-completed-modal bg-white rounded-xl max-w-2xl w-full mx-4 max-h-[90vh] overflow-y-auto border border-border",initial:{scale:.9,opacity:0,y:20},animate:{scale:1,opacity:1,y:0},exit:{scale:.9,opacity:0,y:20},onClick:i=>i.stopPropagation(),children:[s.jsxs("div",{className:"bg-success modal-header text-white text-center p-8 relative",children:[s.jsx("button",{className:"absolute top-4 right-4 text-white hover:text-green-200 text-xl",onClick:t,children:s.jsx(L,{icon:gt})}),s.jsx("div",{className:"success-icon text-5xl mb-4",children:"✅"}),s.jsx("h2",{className:"text-2xl font-bold",children:r.notification.title})]}),s.jsxs("div",{className:"modal-body p-6",children:[s.jsx("p",{className:"main-message text-center text-gray-700 text-lg mb-6",children:r.notification.message}),s.jsxs("div",{className:"recovery-summary",children:[s.jsxs("div",{className:"summary-stats grid grid-cols-2 md:grid-cols-4 gap-4 mb-6",children:[s.jsxs("div",{className:"stat-card bg-gray-50 border-2 border-border rounded-lg p-4 text-center",children:[s.jsx("span",{className:"stat-number block text-2xl font-bold text-green-600",children:r.recoveryDetails.totalTransactions}),s.jsx("span",{className:"stat-label text-xs text-gray-600 mt-1 block",children:"Total Transactions"})]}),s.jsxs("div",{className:"stat-card bg-gray-50 border-2 border-border rounded-lg p-4 text-center",children:[s.jsx("span",{className:"stat-number block text-2xl font-bold text-green-600",children:r.recoveryDetails.totalAmount.toLocaleString()}),s.jsx("span",{className:"stat-label text-xs text-gray-600 mt-1 block",children:"XAF Récupérés"})]}),s.jsxs("div",{className:"stat-card bg-gray-50 border-2 border-border rounded-lg p-4 text-center",children:[s.jsx("span",{className:"stat-number block text-2xl font-bold text-green-600",children:r.recoveryDetails.paymentTransactions}),s.jsx("span",{className:"stat-label text-xs text-gray-600 mt-1 block",children:"Abonnements"})]}),s.jsxs("div",{className:"stat-card bg-gray-50 border-2 border-border rounded-lg p-4 text-center",children:[s.jsx("span",{className:"stat-number block text-2xl font-bold text-green-600",children:r.recoveryDetails.payoutTransactions}),s.jsx("span",{className:"stat-label text-xs text-gray-600 mt-1 block",children:"Retraits"})]})]}),s.jsxs("div",{className:"recovery-details bg-green-50 p-4 rounded-lg",children:[s.jsx("h4",{className:"font-semibold text-gray-800 mb-3",children:"Ce qui a été récupéré:"}),s.jsx("ul",{className:"space-y-2",children:r.notification.details.map((i,a)=>s.jsxs("li",{className:"flex items-start text-sm text-gray-700",children:[s.jsx("span",{className:"mr-2 text-green-600 font-bold",children:"✓"}),s.jsx("span",{children:i})]},a))})]})]})]}),s.jsxs("div",{className:"modal-footer flex flex-col sm:flex-row justify-between gap-3 p-6 bg-gray-50",children:[s.jsx("button",{className:"btn-secondary px-6 py-3 bg-gray-200 hover:bg-gray-300 text-gray-700 font-medium rounded-lg transition-colors",onClick:t,children:"Parfait!"}),s.jsx("div",{className:"action-buttons flex gap-2",children:r.notification.actions.map((i,a)=>s.jsx("button",{className:"bg-success btn-primary px-6 py-3 text-white font-medium rounded-lg transition-colors",onClick:()=>n(i.target),children:i.label},a))})]})]})})})},IO={nom:"",email:"",password:"",confirmPassword:"",whatsapp:"",pays:"",parrain:"",cgu:!1},J5e=3e3,Bp="signupFormData",fC=2;function e8e(){var De;const[e,t]=C.useState(0),[r,n]=C.useState(IO),[i,a]=C.useState({}),[o,l]=C.useState(!1),[c,u]=C.useState(Gs[0]),[f,x]=C.useState(!1),[m,p]=C.useState(!1),[y,v]=C.useState(null),[b,E]=C.useState(!1),[N,j]=C.useState(!1),[A,w]=C.useState(null),[S,B]=C.useState(!1),[D,P]=C.useState(!1),[O,M]=C.useState(null),[I,V]=C.useState({}),[W,_]=C.useState({}),[z,R]=C.useState(!1),[q,G]=C.useState(!1),K=lt(),{register:$}=Gt(),{affiliationCode:H}=CW(),{data:te,isLoading:ne,error:Y}=hr({queryKey:["settings"],queryFn:async()=>{const we=await X.getAppSettings();return Ve(we)},staleTime:5*60*1e3,gcTime:30*60*1e3,refetchOnWindowFocus:!1,refetchOnMount:!1,retry:2}),J=(De=te==null?void 0:te.termsAndConditionsPdf)!=null&&De.fileId?X.generateSettingsFileUrl(te.termsAndConditionsPdf.fileId):void 0,oe=()=>{J&&window.open(J,"_blank")};C.useEffect(()=>{try{const we=new URLSearchParams(window.location.search),je=we.get("email"),Te=we.get("phone"),Se=we.get("
232country"),He=localStorage.getItem(Bp);let Ue={...IO};if(He){const wt=JSON.parse(He);Ue={...Ue,...wt}}const rt=we.get("password");if((je||Te||Se||rt)&&(Ue={...Ue,email:je||Ue.email,pays:Se||Ue.pays,password:rt||Ue.password,confirmPassword:rt||Ue.confirmPassword},Te)){let wt=Te.replace(/[\s\-()]/g,"");wt.startsWith("+")||(wt="+"+wt);const Ft=Gs.find(xt=>wt.startsWith(xt.code));if(Ft){u(Ft);const xt=wt.replace(Ft.code,"");Ue.whatsapp=xt}else Ue.whatsapp=Te}if(n(Ue),Ue.whatsapp&&!Te){let wt=Ue.whatsapp.replace(/[\s\-()]/g,"");wt.startsWith("+")||(wt="+"+wt);const Ft=Gs.find(xt=>wt.startsWith(xt.code));if(Ft){u(Ft);const xt=wt.replace(Ft.code,"");n(Kt=>({...Kt,whatsapp:xt}))}else u(Gs[0])}else Te||u(Gs[0])}catch{}},[]),C.useEffect(()=>{H?(n(je=>({...je,parrain:H})),j(!0),(async()=>{E(!0);try{const je=await X.getAffiliationInfo(H),Te=Ve(je);Te&&Te.name?(v(Te.name),a(Se=>({...Se,parrain:void 0}))):v(null)}catch{v(null)}finally{E(!1)}})()):localStorage.getItem(Bp)||(j(!1),n(we=>({...we,parrain:""})),v(null))},[H,localStorage.getItem(Bp)]),C.useEffect(()=>{const we=setTimeout(()=>{!N&&r.parrain?(E(!0),a(je=>({...je,parrain:void 0})),X.getAffiliationInfo(r.parrain).then(je=>{const Te=Ve(je);Te&&Te.name?(v(Te.name),a(Se=>({...Se,parrain:void 0}))):(v(null),r.parrain&&a(Se=>({...Se,parrain:"Code parrain invalide."})))}).catch(je=>{var Se;v(null);let Te="Erreur lors de la vérification du code parrain.";je instanceof Error?Te=je.message:je instanceof Zr&&((Se=je.body)!=null&&Se.message)&&(Te=je.body.message),r.parrain&&a(He=>({...He,parrain:Te}))}).finally(()=>{E(!1)})):!r.parrain&&!N&&(v(null),a(je=>({...je,parrain:void 0})),E(!1))},J5e);return()=>{clearTimeout(we)}},[r.parrain,N]);const he=C.useCallback(z5e(async(we,je)=>{if(we||je){V(Te=>({...Te,email:we?"checking":Te.email,phone:je?"checking":Te.phone}));try{const Te=je?`${c.code}${je}`:void 0,Se=await e4(()=>X.checkRecoveryRegistration(we,Te));if(Se){const He=X.parseConflictError(Se);if(He){const rt={conflictType:He.conflictType,message:He.message,email:He.conflictType==="EMAIL_TAKEN"||He.conflictType==="BOTH_TAKEN"?"conflict":void 0,phone:He.conflictType==="PHONE_TAKEN"||He.conflictType==="BOTH_TAKEN"?"conflict":void 0};_(rt),V(wt=>({...wt,email:we?"none":wt.email,phone:je?"none":wt.phone})),w(null);return}const Ue=Ve(Se);Ue&&Ue.hasPendingRecoveries?(w(Ue),_({}),V(rt=>({...rt,email:we?"recoverable":rt.email,phone:je?"recoverable":rt.phone}))):(w(null),_({}),V(rt=>({...rt,email:we?"none":rt.email,phone:je?"none":rt.phone})))}else w(null),_({}),V(He=>({...He,email:we?"none":He.email,phone:je?"none":He.phone}))}catch{w(null),_({}),V(Se=>({...Se,email:we?"none":Se.email,phone:je?"none":Se.phone}))}}else V({}),w(null),_({})},800),[c.code]);C.useEffect(()=>{r.email||r.whatsapp?he(r.email,r.whatsapp):(w(null),B(!1))},[r.email,r.whatsapp,he]);const Q=async(we,je)=>{try{const Te=je?`${c.code}${je}`:void 0,Se=await e4(()=>X.getRecoveryNotification(we,Te));if(Se){const He=Ve(Se);He&&He.hasRecoveries&&(M(He),P(!0))}}catch{}},ue=we=>{const{name:je,value:Te,type:Se}=we.target,He=Se==="checkbox"?we.target.checked:void 0;if(je==="countryCodeSelect"){const Ue=Gs.find(wt=>wt.value===Te)||Gs[0];u(Ue);const rt=r.whatsapp;n(wt=>({...wt,whatsapp:rt}));return}n(Ue=>({...Ue,[je]:Se==="checkbox"?He:Te})),(je==="email"||je==="whatsapp"||je==="parrain")&&a(Ue=>{const rt={...Ue,general:void 0,emailExists:void 0,whatsappExists:void 0};return je==="parrain"&&(rt.parrain=void 0,v(null),E(!1)),rt}),i[je]&&je!=="parrain"&&a(Ue=>({...Ue,[je]:void 0}))};C.useEffect(()=>{if(!r.email||!/\S+@\S+\.\S+$/.test(r.email))return;const we=setTimeout(async()=>{try{const je=await X.checkUserExistence({email:r.email}),Te=Ve(je);Te!=null&&Te.exists&&a(Se=>({...Se,emailExists:"Cet email est déjà utilisé."}))}catch{}},1e3);return()=>clearTimeout(we)},[r.email]),C.useEffect(()=>{if(!r.whatsapp)return;const we=setTimeout(async()=>{try{const je=`${c.code}${r.whatsapp}`,Te=await X.checkUserExistence({phoneNumber:je}),Se=Ve(Te);Se!=null&&Se.exists&&a(He=>({...He,whatsappExists:"Ce numéro WhatsApp est déjà utilisé."}))}catch{}},1e3);return()=>clearTimeout(we)},[r.whatsapp,c.code]);const de=we=>{var Te,Se;const je=I[we];if(!je)return null;switch(je){case"checking":return s.jsxs("div",{className:"text-blue-500 text-xs mt-1 flex items-center",children:[s.jsx("span",{className:"animate-spin mr-1",children:"⟲"}),"Vérification de récupération..."]});
232case"recoverable":const He=((Te=A==null?void 0:A.recoveryDetails)==null?void 0:Te.totalTransactions)||0,Ue=((Se=A==null?void 0:A.recoveryDetails)==null?void 0:Se.totalAmount)||0;return s.jsxs("div",{className:"text-green-600 text-xs mt-1 flex items-center",children:[s.jsx("span",{className:"mr-1",children:"✓"}),"Compte récupérable détecté (",He," transaction",He>1?"s":"",", ",Ue," XAF)"]});case"none":return null;default:return null}},me=we=>W[we]==="conflict"?s.jsxs("div",{className:"text-red-500 text-xs mt-1 flex items-center",children:[s.jsx("span",{className:"mr-1",children:"⚠️"}),W.message]}):null,Le=async()=>{var Te,Se,He;let we=!0;const je={};if(a(Ue=>({...Ue,general:void 0,emailExists:void 0,whatsappExists:void 0,parrain:void 0})),e===0&&(r.nom||(je.nom="Nom complet requis",we=!1),/\S+@\S+\.\S+$/.test(r.email)||(je.email="Email invalide",we=!1),(!r.password||r.password.length<8)&&(je.password="Mot de passe doit avoir au moins 8 caractères.",we=!1),r.password!==r.confirmPassword&&(je.confirmPassword="Les mots de passe ne correspondent pas",we=!1),i.emailExists&&(je.emailExists=i.emailExists,we=!1),we&&r.email&&/\S+@\S+\.\S+$/.test(r.email))){p(!0);try{const Ue=await X.checkUserExistence({email:r.email}),rt=Ve(Ue);rt!=null&&rt.exists&&(je.emailExists="Cet email est déjà utilisé.",we=!1)}catch(Ue){let rt="Erreur lors de la vérification de l'email.";Ue instanceof Error?rt=Ue.message:Ue instanceof Zr&&((Te=Ue.body)!=null&&Te.message)&&(rt=Ue.body.message),je.general=rt,we=!1}finally{p(!1)}}if(e===1&&(r.whatsapp||(je.whatsapp="Numéro WhatsApp requis",we=!1),r.pays||(je.pays="Pays requis",we=!1),r.parrain?!N&&!y&&(je.parrain="Code parrain invalide ou non vérifié.",we=!1):(je.parrain="Code parrain requis.",we=!1),we&&r.email&&r.whatsapp&&/\S+@\S+\.\S+$/.test(r.email))){p(!0);let Ue=!1,rt=!1,wt=!1;try{const Ft=await X.checkUserExistence({email:r.email}),xt=Ve(Ft);xt!=null&&xt.exists&&(je.emailExists="Cet email est déjà utilisé.",Ue=!0)}catch(Ft){let xt="Erreur lors de la vérification de l'email.";Ft instanceof Error?xt=Ft.message:Ft instanceof Zr&&((Se=Ft.body)!=null&&Se.message)&&(xt=Ft.body.message),je.general=xt,wt=!0}try{const Ft=`${c.code}${r.whatsapp}`,xt=await X.checkUserExistence({phoneNumber:Ft}),Kt=Ve(xt);Kt!=null&&Kt.exists&&(je.whatsappExists="Ce numéro WhatsApp est déjà utilisé.",rt=!0)}catch(Ft){let xt="Erreur lors de la vérification du numéro WhatsApp.";Ft instanceof Error?xt=Ft.message:Ft instanceof Zr&&((He=Ft.body)!=null&&He.message)&&(xt=Ft.body.message),je.general||(je.general=xt,wt=!0)}finally{p(!1)}(Ue||rt||wt)&&(we=!1)}return a(je),we},Ne=async we=>{if(we.preventDefault(),await Le()){const Te={...r},Se=`${c.code}${r.whatsapp}`;Te.whatsapp=Se;try{localStorage.setItem(Bp,JSON.stringify(Te))}catch{}t(He=>He+1)}},ye=we=>{we.preventDefault(),t(je=>je-1)},ee=async we=>{var Te,Se;if(we.preventDefault(),await Le()){x(!0),a({});try{const He=((Te=Pn.find(wt=>wt.value===r.pays))==null?void 0:Te.code)||r.pays,Ue={email:r.email,password:r.password,name:r.nom,phoneNumber:`${c.code}${r.whatsapp}`,referrerCode:r.parrain||void 0,country:He},rt=await $(Ue);setTimeout(async()=>{await Q(r.email,r.whatsapp)},2e3),vW(),K("/otp",{state:{userId:rt.userId,email:r.email,fromRegistration:!0}})}catch(He){x(!1);let Ue="Registration failed.";He instanceof Error?Ue=He.message:He instanceof Zr&&((Se=He.body)!=null&&Se.message)&&(Ue=He.body.message),a({general:Ue})}}},Ae=[s.jsx(L,{icon:k3,size:40,className:"text-primary mx-auto"}),s.jsx(L,{icon:Ji,size:40,className:"text-primary mx-auto"})];return s.jsxs(Z.div,{variants:On,initial:"hidden",animate:"show",className:"min-h-screen flex flex-col items-center justify-center bg-bg py-8 px-4",children:[s.jsxs(Z.div,{variants:uu,className:"w-full max-w-md bg-white rounded-3xl p-8 border border-border",children:[s.jsx("div",{className:"flex items-center justify-center gap-2 mb-6",children:Array.from({length:fC}).map((we,je)=>s.jsx("div",{className:`h-1.5 rounded-full transition-all duration-300 ${je<=e?"bg-primary w-10":"bg-gray-200 w-6"}`},je))}),s.jsxs(Z.div,{variants:Ia,children:[s.jsx("div",{className:"mb-4",children:Ae[e]}),s.jsx("h2",{className:"text-2xl font-bold text-center text-gray-800 mb
232-2",children:"Créer un compte"}),s.jsx("p",{className:"text-center text-gray-500 mb-6",children:e===0?"Vos informations personnelles":"Contact et parrainage"})]}),s.jsxs("form",{className:"flex flex-col gap-4",children:[e===0&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 mb-1",children:"👤 Nom complet"}),s.jsx("input",{name:"nom",value:r.nom,onChange:ue,placeholder:"Ex: Jean Paul",className:`w-full border ${i.nom?"border-danger":"border-border"} rounded-xl px-4 py-2 focus:outline-none`}),i.nom&&s.jsx("div",{className:"text-red-500 text-xs",children:i.nom})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 mb-1",children:"📧 Email"}),s.jsx("input",{name:"email",value:r.email,onChange:ue,placeholder:"Ex: [email protected]",className:`w-full border ${i.email||i.emailExists?"border-danger":"border-border"} rounded-xl px-4 py-2 focus:outline-none`}),i.email&&s.jsx("div",{className:"text-red-500 text-xs",children:i.email}),i.emailExists&&s.jsx("div",{className:"text-red-500 text-xs",children:i.emailExists}),de("email"),me("email")]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 mb-1",children:"🔒 Mot de passe"}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{name:"password",type:z?"text":"password",value:r.password,onChange:ue,placeholder:"Mot de passe",className:`w-full border ${i.password?"border-danger":"border-border"} rounded-xl px-4 py-2 pr-12 focus:outline-none`}),s.jsx("button",{type:"button",className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600",onClick:()=>R(!z),children:z?s.jsx(L,{icon:ow,size:18}):s.jsx(L,{icon:zc,size:18})})]}),i.password&&s.jsx("div",{className:"text-red-500 text-xs",children:i.password})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 mb-1",children:"🔐 Confirmer le mot de passe"}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{name:"confirmPassword",type:q?"text":"password",value:r.confirmPassword,onChange:ue,placeholder:"Confirmer mot de passe",className:`w-full border ${i.confirmPassword?"border-danger":"border-border"} rounded-xl px-4 py-2 pr-12 focus:outline-none`}),s.jsx("button",{type:"button",className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600",onClick:()=>G(!q),children:q?s.jsx(L,{icon:ow,size:18}):s.jsx(L,{icon:zc,size:18})})]}),i.confirmPassword&&s.jsx("div",{className:"text-red-500 text-xs",children:i.confirmPassword})]}),i.general&&s.jsx("div",{className:"text-red-500 text-xs text-center mt-2",children:i.general})]}),e===1&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 mb-1",children:"📱 Numéro WhatsApp"}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("select",{className:"border rounded-xl px-2 py-2 focus:outline-none focus:ring-2 focus:ring-primary bg-white",name:"countryCodeSelect",value:c.value,onChange:ue,children:Gs.map(we=>s.jsx("option",{value:we.value,children:we.label},we.value))}),s.jsx("input",{name:"whatsapp",value:r.whatsapp,onChange:ue,placeholder:"Ex: 675090755",className:`flex-1 border ${i.whatsapp||i.whatsappExists?"border-danger":"border-border"} rounded-xl px-4 py-2 focus:outline-none`,style:{minWidth:0}})]}),i.whatsapp&&s.jsx("div",{className:"text-red-500 text-xs",children:i.whatsapp}),i.whatsappExists&&s.jsx("div",{className:"text-red-500 text-xs",children:i.whatsappExists}),de("phone"),me("phone")]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 mb-1",children:"🌍 Pays"}),s.jsxs("select",{name:"pays",value:r.pays,onChange:ue,className:`w-full border ${i.pays?"border-danger":"border-border"} rounded-xl px-4 py-2 focus:outline-none`,children:[s.jsx("option",{value:"",children:"Sélectionner le pays"}),Pn.map(we=>s.jsx("option",{value:we.value,children:we.label},we.value))]}),i.pays&&s.jsx("div",{className:"text-red-500 text-xs",children:i.pays})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 mb-1",children:"🔗 Code parrain"}),s.jsx("input",{name:"parrain",value:r.parrain,onChange:ue,placeholder:"Code du parrain",className:`w-full border ${i.parrain?"border-danger":"border-border"} rounded-xl px-4 py-2 focus:outline-none ${N?"bg-gray-100 cursor-not-allowed":""}`,disabled:N}),b&&s.jsx("div",{className:"text-gray-500 text-xs mt-1",children:"Vérification du code parrain..."}),y&&!b&&s.jsxs("div",{className:"text-green-600 text-sm mt-1",children:["Parrain: ",y]}),i.parrain&&s.jsx("div",{className:"text-red-500 text-xs",children:i.parrain})]}),s.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[s.jsx("input",{type:"checkbox",name:"cgu",checked:r.cgu,onChange:ue,className:"accent-[#115CF6]"}),s.jsxs("span",{children:["J'accepte les ",s.jsx("button",{type:"button",onClick:oe,className:"text-primary underline bg-transparent",children:"conditions d'utilisation"})]})]}),i.general&&s.jsx("div",{className:"text-red-500 text-xs text-center mt-2",children:i.general})]}),s.jsxs("div",{className:"flex justify-between mt-6 gap-2",children:[e>0&&s.jsx("button",{onClick:ye,className:"bg-gray-200 text-gray-700 font-bold rounded-xl px-6 py-2",children:"Précédent"}),e<fC-1&&s.jsx("button",{onClick:Ne,className:"bg-primary hover:bg-blue-700 text-white font-bold rounded-xl px-6 py-2 ml-auto",children:"Suivant"}),e===fC-1&&s.jsx("button",{onClick:ee,disabled:f||m||!r.cgu||b,className:"bg-primary hover:bg-blue-700 disabled:bg-blue-400 disabled:cursor-not-allowed text-white font-bold rounded-xl px-6 py-2 ml-auto",children:f?"Inscription...":m?"Vérification...":S?"S'inscrire & Récupérer":"S'inscrire"})]})]}),s.jsxs("div",{className:"text-center text-sm text-gray-500 mt-6",children:["Déjà un compte ? ",s.jsx("a",{href:"/connexion",className:"text-primary font-semibold hover:underline",children:"Connexion"})]})]}),s.jsx("div",{className:"w-full max-w-md px-4",children:s.jsx(A0,{})}),o&&s.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-40",children:s.jsxs("div",{className:"bg-white rounded-2xl max-w-lg w-full p-6 relative animate-fadeIn border border-border",children:[s.jsx("button",{onClick:()=>l(!1),className:"absolute top-4 right-4 text-gray-400 hover:text-gray-700 text-2xl",children:s.jsx(L,{icon:gt})}),s.jsx("h3",{className:"text-xl font-bold mb-4 text-center",children:"Conditions d'utilisation"}),s.jsx("div",{className:"text-gray-700 text-sm max-h-[60vh] overflow-y-auto px-1",children:ne?s.jsx("div",{className:"flex justify-center items-center py-8 text-gray-500",children:"Chargement des conditions d'utilisation..."}):Y?s.jsx("div",{className:"text-red-500 text-center py-8",children:"Erreur lors du chargement des conditions d'utilisation."}):s.jsx("p",{children:"Veuillez cliquer sur le lien pour ouvrir les conditions d'utilisation."})})]})}),O&&s.jsx(Z5e,{isOpen:D,onClose:()=>{P(!1),M(null)},recoveryData:O})]})}function t8e(){const[e,t]=C.useState(""),[r,n]=C.useState(""),[i,a]=C.useState(""),[o,l]=C.useState(!1),[c,u]=C.useState(!1),[f,x]=C.useState(null),[m,p]=C.useState(!1),y=lt(),v=async b=>{if(b.preventDefault(),!e.trim()){a("Veuillez entrer votre email ou numéro de téléphone.");return}a(""),l(!0);try{await X.requestPasswordResetOtp(e,r||void 0),x({type:"success",message:`Un code de vérification a été envoyé via ${r||"votre méthode préférée"}.`}),u(!0),setTimeout(()=>{y("/otp",{state:{email:e,flow:"passwordReset"}})},2e3)}catch(E){const N=E instanceof Error?E.message:"Erreur lors de l'envoi du code OTP.";x({type:"error",message:N}),u(!0)}finally{l(!1)}};return s.jsxs("div",{className:"min-h-screen flex flex-col justify-center items-center bg-white px-4",children:[s.jsxs("div",{className:"flex items-center mb-4 px-3 w-full max-w-sm",children:[s.jsx(Ct,{}),s.jsx("h3",{className:"text-xl font-medium text-center w-full text-gray-900",children:"Mot de passe oublié"})]}),s.jsxs(Z.div,{className:"w-full max-w-sm mx-auto",initial:{opacity:0,y:20}
232,animate:{opacity:1,y:0},transition:{duration:.5},children:[s.jsxs("div",{className:"flex flex-col items-center mt-8 mb-6",children:[s.jsxs("div",{className:"bg-yellow-100 rounded-full w-24 h-24 flex items-center justify-center mb-4 relative",children:[s.jsx(L,{icon:Vc,className:"text-yellow-500",size:40}),s.jsx(L,{icon:uy,className:"text-yellow-500 absolute ml-8 mt-8",size:24})]}),s.jsx("h2",{className:"text-xl font-bold text-gray-800 mb-2",children:"Réinitialiser le mot de passe"}),s.jsx("p",{className:"text-center text-gray-600 text-sm",children:"Entrez votre email ou numéro de téléphone pour recevoir un code de vérification"})]}),s.jsxs("form",{onSubmit:v,className:"flex flex-col gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 text-sm mb-1 font-medium",children:"Email ou numéro de téléphone"}),s.jsx("input",{type:"text",value:e,onChange:b=>{t(b.target.value),a("")},placeholder:"Ex : [email protected] ou +237675090755",className:`w-full border ${i?"border-danger":"border-border"} rounded-xl px-4 py-3 focus:outline-none focus:ring-2 focus:ring-yellow-400 text-gray-700 placeholder-gray-400`,required:!0}),i&&s.jsx("div",{className:"text-red-500 text-xs mt-1",children:i})]}),s.jsxs("div",{className:"channel-options",children:[s.jsx("button",{type:"button",onClick:()=>p(!m),className:"text-yellow-500 text-sm font-medium hover:underline bg-transparent",children:"⚙️ Options avancées"}),m&&s.jsxs("div",{className:"mt-2 p-3 bg-gray-50 rounded-xl",children:[s.jsx("label",{className:"block text-gray-700 text-sm mb-1 font-medium",children:"Forcer la méthode de livraison pour cette demande:"}),s.jsxs("select",{value:r,onChange:b=>n(b.target.value),className:"w-full border border-border rounded-xl px-3 py-2 focus:outline-none focus:ring-2 focus:ring-yellow-400 bg-white text-sm",children:[s.jsx("option",{value:"",children:"Utiliser ma préférence"}),s.jsx("option",{value:"email",children:"📧 Email"}),s.jsx("option",{value:"whatsapp",children:"📱 WhatsApp"})]})]})]}),s.jsx("button",{type:"submit",className:"bg-accent w-full text-white font-bold py-3 rounded-xl text-lg mt-2 disabled:opacity-50 disabled:cursor-not-allowed transition-all",disabled:o,children:o?"Envoi en cours...":"Envoyer le code"})]}),s.jsxs("div",{className:"text-center text-sm text-gray-500 mt-6",children:["Vous vous souvenez de votre mot de passe ?",s.jsx("button",{onClick:()=>y("/connexion"),className:"text-yellow-500 font-semibold hover:underline ml-1 bg-transparent",children:"Se connecter"})]})]}),c&&f&&s.jsx(Z.div,{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",initial:{opacity:0}
232,animate:{opacity:1},exit:{opacity:0},children:s.jsxs(Z.div,{className:"bg-white rounded-2xl p-6 w-[90vw] max-w-sm text-gray-900 relative border border-border",initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},transition:{type:"spring",bounce:.2},children:[s.jsx("h4",{className:`text-lg font-bold mb-4 text-center ${f.type==="success"?"text-green-600":"text-red-600"}`,children:f.type==="success"?"Email envoyé":"Erreur"}),s.jsx("p",{className:"text-sm text-gray-700 text-center mb-4",children:f.message}),f.type==="success"&&s.jsx("p",{className:"text-xs text-amber-600 bg-amber-50 border border-border rounded-lg px-3 py-2 text-center mb-4",children:"Si vous ne trouvez pas l'email, vérifiez votre dossier spam ou courrier indésirable."}),s.jsx("button",{type:"button",className:`w-full ${f.type==="success"?"bg-green-500 hover:bg-green-600":"bg-red-500 hover:bg-red-600"} text-white rounded-xl py-2 font-bold  transition-colors`,onClick:()=>u(!1),children:f.type==="success"?"Continuer":"Réessayer"})]})})]})}function r8e(){const{user:e}=Gt(),[t,r]=C.useState(""),n=lt(),[i,a]=C.useState(!1),[o,l]=C.useState(!1),[c,u]=C.useState(null),f=async()=>{if(!(e!=null&&e.email)){r("Utilisateur non authentifié.");return}r(""),a(!0);try{await X.requestPasswordResetOtp(e.email),u({type:"success",message:"Un code de vérification a été envoyé à votre email."}),l(!0),setTimeout(()=>{n("/otp",{state:{email:e.email,flow:"passwordReset"}})},2e3)}catch(x){const m=x instanceof Error?x.message:"Erreur lors de l'envoi du code OTP.";u({type:"error",message:m}),l(!0)}finally{a(!1)}};return s.jsxs("div",{className:"min-h-screen flex flex-col justify-center items-center bg-white px-4",children:[s.jsxs("div",{className:"flex items-center mb-4 px-3 w-full max-w-sm",children:[s.jsx(Ct,{}),s.jsx("h3",{className:"text-xl font-medium text-center w-full text-gray-900",children:"Changer le mot de passe"})]}),s.jsxs(Z.div,{className:"w-full max-w-sm mx-auto",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},children:[s.jsxs("div",{className:"flex flex-col items-center mt-8 mb-6",children:[s.jsx("div",{className:"bg-blue-100 rounded-full w-24 h-24 flex items-center justify-center mb-4",children:s.jsx("span",{className:"text-blue-500 text-4xl",children:"🔒"})}),s.jsx("h2",{className:"text-xl font-bold text-gray-800 mb-2",children:"Changer mon mot de passe"}),s.jsx("p",{className:"text-center text-gray-600 text-sm",children:"Un code de vérification sera envoyé à votre email"})]}),t&&s.jsx("div",{className:"text-red-500 text-center mb-4 text-sm",children:t}),s.jsx("button",{onClick:f,className:"bg-primary w-full text-white font-bold py-3 rounded-xl text-lg mt-2 disabled:opacity-50 disabled:cursor-not-allowed transition-all",disabled:i,children:i?"Envoi en cours...":"Recevoir le code OTP"})]}),o&&c&&s.jsx(Z.div,{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",initial:{opacity:0}
232,animate:{opacity:1},exit:{opacity:0},children:s.jsxs(Z.div,{className:"bg-white rounded-2xl p-6 w-[90vw] max-w-sm text-gray-900 relative border border-border",initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},transition:{type:"spring",bounce:.2},children:[s.jsx("h4",{className:`text-lg font-bold mb-4 text-center ${c.type==="success"?"text-green-600":"text-red-600"}`,children:c.type==="success"?"Code envoyé":"Erreur"}),s.jsx("p",{className:"text-sm text-gray-700 text-center mb-4",children:c.message}),s.jsx("button",{type:"button",className:`w-full ${c.type==="success"?"bg-green-500 hover:bg-green-600":"bg-red-500 hover:bg-red-600"} text-white rounded-xl py-2 font-bold  transition-colors`,onClick:()=>l(!1),children:c.type==="success"?"Continuer":"Réessayer"})]})})]})}const $O=[{code:"BTC",name:"Bitcoin"},{code:"LTC",name:"Litecoin"},{code:"XRP",name:"Ripple"},{code:"TRX",name:"TRON"},{code:"USDTSOL",name:"USDT (Solana)"},{code:"USDTBSC",name:"USDT (BSC-BEP20)"},{code:"BNBBSC",name:"BNB (BSC-BEP20)"}],wW=["Étudiant(e)","Sans emploi","Médecin","Infirmier/Infirmière","Pharmacien","Chirurgien","Psychologue","Dentiste","Kinésithérapeute","Ingénieur civil","Ingénieur en informatique","Développeur de logiciels","Architecte","Technicien en électronique","Scientifique des données","Enseignant","Professeur d'université","Formateur professionnel","Éducateur spécialisé","Conseiller pédagogique","Artiste (peintre, sculpteur)","Designer graphique","Photographe","Musicien","Écrivain","Réalisateur","Responsable marketing","Vendeur/Vendeuse","Gestionnaire de produit","Analyste de marché","Consultant en stratégie","Avocat","Notaire","Juge","Huissier de justice","Chercheur scientifique","Biologiste","Chimiste","Physicien","Statisticien","Travailleur social","Conseiller en orientation","Animateur socioculturel","Médiateur familial","Maçon","Électricien","Plombier","Charpentier","Architecte d'intérieur","Chef cuisinier","Serveur/Serveuse","Gestionnaire d'hôtel","Barman/Barmane","Conducteur de train","Pilote d'avion","Logisticien","Gestionnaire de chaîne d'approvisionnement","Administrateur système","Spécialiste en cybersécurité","Ingénieur réseau","Consultant en technologies de l'information","Journaliste","Rédacteur web","Chargé de communication","Gestionnaire de communauté","Comptable","Analyste financier","Auditeur interne","Conseiller fiscal","Agriculteur/Agricultrice","Ingénieur agronome","Écologiste","Gestionnaire de ressources naturelles"],YE=["Football","Basketball","Course à pied","Natation","Yoga","Randonnée","Cyclisme","Musique (instruments, chant)","Danse","Peinture et dessin","Photographie","Théâtre","Cinéma","Programmation","Robotique","Sciences de la vie","Astronomie","Électronique","Découverte de nouvelles cultures","Randonnées en nature","Tourisme local et international","Cuisine du monde","Pâtisserie","Dégustation de vins","Aide aux personnes défavorisées","Protection de l'environnement","Participation à des événements caritatifs","Lecture","Méditation","Apprentissage de nouvelles langues","Jeux vidéo","Jeux de société","Énigmes et casse-têtes","Stylisme","Décoration d'intérieur","Artisanat","Fitness","Nutrition","Médecine alternative"],uh=["⚽ Football","🏀 Basketball","🏃 Course à pied","🏊 Natation","🧘 Yoga","🥾 Randonnée","🚴 Cyclisme","🎵 Musique (instruments, chant)","💃 Danse","🎨 Peinture et dessin","📸 Photographie","🎭 Théâtre","🎬 Cinéma","💻 Programmation","🤖 Robotique","🔬 Sciences de la vie","🌌 Astronomie","⚡ Électronique","🌍 Découverte de nouvelles cultures","🌿 Randonnées en nature","✈️ Tourisme local et international","🍽️ Cuisine du monde","🧁 Pâtisserie","🍷 Dégustation de vins","🤝 Aide aux personnes défavorisées","🌱 Protection de l'environnement","❤️ Participation à des événements caritatifs","📚 Lecture","🧘‍♀️ Méditation","🗣️ Apprentissage de nouvelles langues","🎮 Jeux vidéo","🎲 Jeux de société","🧩 Énigmes et casse-têtes","👗 Stylisme","🏠 Décoration d'intérieur","🎨 Artisanat","💪 Fitness","🥗 Nutrition","🌿 Médecine alternative"],n8e=e=>{const t=YE.indexOf(e);return t!==-1?uh[t]:e},L1=e=>{const t=uh.indexOf(e);return t!==-1?YE[t]:e.replace(/^[^\w\s]+\s*/,"")};function s8e(){var M,I,V,W;const{user:e,refreshUser:t,loading:r}=Gt(),[n,i]=C.useState({name:"",phoneNumber:"",city:"",country:"",profession:"",interests:[],avatar:"https://img.freepik.com/premium-vector/default-avatar-profile-icon-social-media-user-image-gray-avatar-icon-blank-profile-silhouette-vector-illustration_561158-3407.jpg?w=360",birthDate:"",sex:"",momoNumber:"",momoOperator:"",whatsappGroupLink:"",cryptoWalletAddress:"",cryptoWalletCurrency:"",referralCode:"",notificationPreference:"email"}),[a,o]=C.useState(Gs[0]),[l,c]=C.useState(!1),[u,f]=C.useState(!1),[x,m]=C.useState(null),[p,y]=C.useState(uh),v=C.useRef(null),[b,E]=C.useState(!1),[N,j]=C.useState(null);C.useEffect(()=>{if(e&&(i(_=>{var Y,J;const z=((Y=Pn.find(oe=>oe.code===e.country))==null?void 0:Y.value)||e.country||"",R=e.birthDate?new Date(e.birthDate).toISOString().split("T")[0]:"",q=e.momoOperator||"",G=(J=Pn.find(oe=>oe.value===z))==null?void 0:J.code,$=(G&&hc[G]?hc[G].operators:[]).includes(q)?q:"";let H=e.phoneNumber||"",te=Gs[0];if(e.phoneNumber){let oe=e.phoneNumber.replace(/[\s\-()]/g,"");const he=[...Gs].sort((Q,ue)=>ue.code.length-Q.code.length);for(const Q of he){const ue=Q.code,de=Q.code.replace("+","");if(oe.startsWith(ue)){te=Q,H=oe.substring(ue.length);break}else if(oe.startsWith(de)){te=Q,H=oe.substring(de.length);break}}}o(te);let ne=e.momoNumber||"";if(e.momoNumber){const oe=Pn.find(Q=>Q.code===e.country||Q.value===z),he=(oe==null?void 0:oe.phoneCode)||"";if(he){let Q=e.momoNumber.replace(/[\s\-()]/g,"");const ue=he,de=he.replace("+","");Q.startsWith(ue)?ne=Q.substring(ue.length):Q.startsWith(de)&&(ne=Q.substring(de.length))}}return{..._,name:e.name||"",phoneNumber:H,city:e.city||e.region||"",country:z,profession:e.profession||"",interests:e.interests||[],avatar:e.avatar?e.avatar:e.avatarId?X.generateSettingsFileUrl(e.avatarId):"https://img.freepik.com/premium-vector/default-avatar-profile-icon-social-media-user-image-gray-avatar-icon-blank-profile-silhouette-vector-illustration_561158-3407.jpg?w=360",birthDate:R,sex:e.sex||"",momoNumber:ne,momoOperator:$,whatsappGroupLink:e.whatsappGroupLink||"",cryptoWalletAddress:e.cryptoWalletAddress||"",cryptoWalletCurrency:e.cryptoWalletCurrency||"",referralCode:e.referralCode||"",notificationPreference:e.notificationPreference||"email"}}),e.interests)){const _=Array.from(new Set([...uh,...e.interests])
232);y(_)}},[e]);const A=_=>{const{name:z,value:R}=_.target;if(z==="countryCodeSelect"){const q=Gs.find(G=>G.value===R);q&&o(q);return}i(q=>z==="country"?{...q,[z]:R,momoOperator:""}:{...q,[z]:R}),x&&m(null)},w=_=>{const z=L1(_);i(R=>({...R,interests:R.interests.includes(z)?R.interests.filter(q=>q!==z):[...R.interests,z]})),x&&m(null)},S=()=>{var _;(_=v.current)==null||_.click()},B=async _=>{var R;const z=(R=_.target.files)==null?void 0:R[0];if(z){if(z.size>5*1024*1024){j({type:"error",message:`L'image "${z.name}" dépasse la taille maximale autorisée de 5 Mo et ne sera pas ajoutée.`}),E(!0),v.current&&(v.current.value="");return}f(!0),m(null);try{const q=await X.uploadAvatar(z),G=Ve(q);if(G.fileId){const K=X.generateSettingsFileUrl(G.fileId);i($=>({...$,avatar:K})),m({type:"success",message:"Avatar mis à jour avec succès!"}),await t()}}catch(q){const G=q instanceof Error?q.message:"Erreur lors de l'envoi de l'avatar.";m({type:"error",message:G})}finally{f(!1)}}},D=(_,z)=>{if(!_)return"";let R=_.replace(/[\s\-()]/g,"");const q=z,G=z.replace("+","");return R.startsWith(q)?R.substring(1):R.startsWith(G)?R:R.startsWith("+")?R.substring(1):`${G}${R}`},P=async _=>{var z,R;_.preventDefault(),c(!0),m(null);try{const q=((z=Pn.find(te=>te.value===n.country))==null?void 0:z.code)||n.country,G=D(n.phoneNumber,a.code),K=((R=Pn.find(te=>te.value===n.country))==null?void 0:R.phoneCode)||"",$=n.momoNumber?D(n.momoNumber,K):"",H={name:n.name,city:n.city,country:q,profession:n.profession?Rs(n.profession):"",interests:n.interests.map(te=>Rs(te)),birthDate:n.birthDate,sex:n.sex,momoNumber:$,momoOperator:n.momoOperator,whatsappGroupLink:n.whatsappGroupLink.trim(),notificationPreference:n.notificationPreference};if(G&&G!==(e==null?void 0:e.phoneNumber)&&(H.phoneNumber=G),n.referralCode&&n.referralCode!==(e==null?void 0:e.referralCode)&&(H.referralCode=n.referralCode),await X.updateUserProfile(H),n.cryptoWalletAddress&&n.cryptoWalletCurrency)try{await X.updateCryptoWallet({cryptoWalletAddress:n.cryptoWalletAddress,cryptoWalletCurrency:n.cryptoWalletCurrency})}catch{}await t(),m({type:"success",message:"Profil sauvegardé avec succès!"})}catch(q){const G=q instanceof Error?q.message:"La sauvegarde a échoué.";m({type:"error",message:G})}finally{c(!1)}},O=C.useMemo(()=>{var z;const _=(z=Pn.find(R=>R.value===n.country))==null?void 0:z.code;return _&&hc[_]?[{value:"",label:"Sélectionner un opérateur MoMo"},...hc[_].operators.map(R=>({value:R,label:Voe(R)}))]:[{value:"",label:"Sélectionner un opérateur MoMo"}]},[n.country,Pn]);return r||!e?s.jsx("div",{children:"Chargement du profil..."}):s.jsx(nn,{children:s.jsxs("div",{className:"min-h-screen flex flex-col items-center bg-bg p-4",children:[s.jsx("div",{className:"w-full max-w-md",children:s.jsxs("div",{className:"flex items-center mb-4",children:[s.jsx(Ct,{}),s.jsx("h3",{className:"text-xl font-medium text-center w-full",children:"Modifier le Profil"})]})}),s.jsxs(Z.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.5,type:"spring"},className:"w-full max-w-md bg-white rounded-3xl p-8",children:[s.jsx("div",{className:"flex flex-col items-center mb-6",children:s.jsxs("div",{className:"relative mb-2",children:[s.jsx("img",{src:X.generateThumbnailUrl(n.avatar,192)||rn,alt:"avatar",className:"w-24 h-24 rounded-full border-4 border-white object-cover"}),s.jsx("button",{type:"button",onClick:S,className:"absolute bottom-2 right-2 bg-primary p-2 rounded-full border-2 border-white text-white hover:bg-blue-800 transition-colors disabled:bg-gray-400",disabled:u,children:u?s.jsx(L,{icon:Yt,className:"animate-spin"}):s.jsx(L,{icon:Uc,size:16})}),s.jsx("input",{ref:v,type:"file",accept:"image/*",className:"hidden",onChange:B})]})}),s.jsxs("form",{className:"flex flex-col gap-4",onSubmit:P,children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 mb-1",children:"👤 Nom complet"}),s.jsx("input",{name:"name",value:n.name,onChange:A,className:"w-full border border-border rounded-xl px-4 py-2 focus:outline-none"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 mb-1",children:"📞 Téléphone"}),s.jsxs("div",{className:"relative flex gap-2",children:[" ",s.jsx("select",{className:"border rounded-xl px-2 py-2 focus:outline-none focus:ring-2 focus:ring-primary bg-white",name:"countryCodeSelect",value:a.value,onChange:A,children:Gs.map(_=>s.jsx("option",{value:_.value,children:_.label},_.value))}),s.jsx("input",{name:"phoneNumber",value:n.phoneNumber,onChange:A,className:"w-full border border-border rounded-xl px-4 py-2 focus:outline-none pr-10",placeholder:"Ex: 675080477"}),s.jsx(L,{icon:Ji,className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 mb-1",children:"🔗 Code de parrainage"}),s.jsx("input",{name:"referralCode",value:n.referralCode,onChange:A,className:"w-full border border-border rounded-xl px-4 py-2 focus:outline-none"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 mb-1",children:"💬 Lien de votre groupe WhatsApp"}),s.jsx("input",{name:"whatsappGroupLink",type:"url",inputMode:"url",placeholder:"https://chat.whatsapp.com/...",value:n.whatsappGroupLink,onChange:A,className:"w-full border border-border rounded-xl px-4 py-2 focus:outline-none"}),s.jsx("div",{className:"text-xs text-gray-500 mt-1",children:"Ce lien remplace votre numéro personnel dans le profil de vos filleuls. Évite les bans WhatsApp."})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 mb-1",children:"🎂 Date de naissance"}),s.jsx("input",{type:"date",name:"birthDate",value:n.birthDate,onChange:A,className:"w-full border border-border rounded-xl px-4 py-2 focus:outline-none"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 mb-1",children:"⚧️ Sexe"}),s.jsxs("select",{name:"sex",value:n.sex,onChange:A,className:"w-full border border-border rounded-xl px-4 py-2 focus:outline-none bg-white",children:[s.jsx("option",{value:"",children:"Sélectionner"}),s.jsx("option",{value:"male",children:"👨 Homme"}),s.jsx("option",{value:"female",children:"👩 Femme"}),s.jsx("option",{value:"other",children:"🧑 Autre"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 mb-1",children:"🏙️ Ville"}),s.jsx("input",{name:"city",value:n.city,onChange:A,className:"w-full border border-border rounded-xl px-4 py-2 focus:outline-none"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 mb-1",children:"🌍 Pays"}),s.jsxs("select",{name:"country",value:n.country,onChange:A,className:"w-full border border-border rounded-xl px-4 py-2 focus:outline-none bg-white",children:[s.jsx("option",{value:"",children:"Sélectionner le pays"}),Pn.map(_=>s.jsx("option",{value:_.value,children:_.label},_.value))]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 mb-1",children:"💼 Profession"}),s.jsxs("select",{name:"profession",value:n.profession,onChange:A,className:"w-full border border-border rounded-xl px-4 py-2 focus:outline-none bg-white",children:[s.jsx("option",{value:"",children:"Sélectionner la profession"}),wW.map(_=>s.jsx("option",{value:_,children:_},_))]})]}),s.jsxs("div",{className:"bg-yellow-50 border border-border rounded-xl p-4",children:[s.jsxs("h3",{className:"text-lg font-semibold text-yellow-800 mb
232-3 flex items-center gap-2",children:["💳 Mobile Money",n.country&&!Mw(((M=Pn.find(_=>_.value===n.country))==null?void 0:M.code)||"")&&s.jsx("span",{className:"text-xs font-normal text-red-600 bg-red-100 px-2 py-1 rounded-full",children:"Non disponible"})]}),n.country&&Mw(((I=Pn.find(_=>_.value===n.country))==null?void 0:I.code)||"")?s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"text-sm text-yellow-700 mb-4",children:["💡 Mobile Money disponible pour votre pays : ",n.country]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 mb-1",children:"💳 Numéro MoMo"}),s.jsxs("div",{className:"relative flex items-center",children:[s.jsx("span",{className:"absolute left-3 text-gray-500 font-medium z-10",children:((V=Pn.find(_=>_.value===n.country))==null?void 0:V.phoneCode)||"+237"}),s.jsx("input",{name:"momoNumber",value:n.momoNumber,onChange:A,className:"w-full border border-border rounded-xl px-4 py-2 pl-16 focus:outline-none",placeholder:"675080477"})]}),s.jsx("div",{className:"text-xs text-gray-500 mt-1",children:"💡 Le code pays est automatiquement ajouté selon votre pays sélectionné"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 mb-1",children:"📱 Opérateur MoMo"}),s.jsx("select",{name:"momoOperator",value:n.momoOperator,onChange:A,className:"w-full border border-border rounded-xl px-4 py-2 focus:outline-none bg-white",children:O.map(_=>s.jsx("option",{value:_.value,children:_.label},_.value))})]})]}):s.jsxs("div",{className:"text-center py-6",children:[s.jsx("div",{className:"text-6xl mb-4",children:"🚫"}),s.jsx("div",{className:"text-lg font-medium text-gray-800 mb-2",children:"Mobile Money non disponible"}),s.jsx("div",{className:"text-sm text-gray-600 mb-4",children:n.country?`Mobile Money n'est pas encore pris en charge pour ${n.country}.`:"Sélectionnez d'abord votre pays pour voir les options disponibles."}),s.jsxs("div",{className:"bg-blue-50 border border-border rounded-lg p-3",children:[s.jsx("div",{className:"text-sm text-blue-800 font-medium mb-1",children:"✅ Alternative disponible :"}),s.jsxs("div",{className:"text-sm text-blue-700",children:["Vous pouvez toujours utiliser les ",s.jsx("strong",{children:"retraits crypto"})," pour convertir votre solde USD en cryptomonnaies."]})]})]})]}),s.jsxs("div",{className:"bg-purple-50 border border-border rounded-xl p-4",children:[s.jsxs("h3",{className:"text-lg font-semibold text-purple-800 mb-3 flex items-center gap-2",children:["🪙 Portefeuille Crypto",s.jsx("span",{className:"text-xs font-normal text-green-600 bg-green-100 px-2 py-1 rounded-full",children:"✅ Disponible partout"})]}),s.jsxs("div",{className:"text-sm text-purple-700 mb-4",children:["💡 Les retraits crypto sont disponibles pour ",s.jsx("strong",{children:"tous les pays africains"}),". Configurez votre portefeuille pour effectuer des retraits en USD."]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 mb-1",children:"🪙 Cryptomonnaie préférée"}),s.jsxs("select",{name:"cryptoWalletCurrency",value:n.cryptoWalletCurrency,onChange:A,className:"w-full border border-border rounded-xl px-4 py-2 focus:outline-none bg-white",children:[s.jsx("option",{value:"",children:"Sélectionner une cryptomonnaie"}),$O.map(_=>s.jsxs("option",{value:_.code,children:[_.name," (",_.code,")"]},_.code))]}),s.jsx("div",{className:"text-xs text-gray-500 mt-1",children:"🔹 Choisissez la cryptomonnaie dans laquelle vous souhaitez recevoir vos retraits USD"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 mb-1",children:"📋 Adresse du portefeuille"}),s.jsx("input",{name:"cryptoWalletAddress",value:n.cryptoWalletAddress,onChange:A,className:"w-full border border-border rounded-xl px-4 py-2 focus:outline-none font-mono text-sm",placeholder:n.cryptoWalletCurrency?`Adresse ${n.cryptoWalletCurrency}`:"Sélectionnez d'abord une cryptomonnaie",disabled:!n.cryptoWalletCurrency}),s.jsx("div",{className:"text-xs text-gray-500 mt-1",children:"⚠️ Vérifiez bien votre adresse. Les transactions crypto sont irréversibles."})]}),n.cryptoWalletAddress&&n.cryptoWalletCurrency&&s.jsxs("div",{className:"bg-green-50 border border-border rounded-lg p-3",children:[s.jsx("div",{className:"text-sm text-green-800 font-medium mb-1",children:"✅ Configuration actuelle:"}),s.jsxs("div",{className:"text-xs text-green-700",children:[s.jsxs("div",{children:[s.jsx("strong",{children:"Crypto:"}
232)," ",(W=$O.find(_=>_.code===n.cryptoWalletCurrency))==null?void 0:W.name]}),s.jsxs("div",{children:[s.jsx("strong",{children:"Adresse:"})," ",n.cryptoWalletAddress.substring(0,10),"...",n.cryptoWalletAddress.substring(n.cryptoWalletAddress.length-6)]})]})]})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 mb-1",children:"❤️ Centres d'intérêt"}),s.jsx("div",{className:"flex flex-wrap gap-2 p-2 border border-border rounded-xl",children:p.map(_=>{const z=L1(_),R=n.interests.includes(z);return s.jsx("button",{type:"button",onClick:()=>w(_),className:`px-3 py-1 rounded-full border text-xs font-medium ${R?"bg-green-700 text-white border-success":"bg-white text-gray-700 border-border"}`,children:_},_)})})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 mb-1",children:"📬 Préférences de notification"}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("label",{className:"flex items-center gap-3 p-3 border border-border rounded-xl hover:bg-gray-50 cursor-pointer",children:[s.jsx("input",{type:"radio",name:"notificationPreference",value:"email",checked:n.notificationPreference==="email",onChange:A,className:"text-blue-600 focus:ring-blue-500"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-2xl",children:"📧"}),s.jsxs("div",{children:[s.jsx("div",{className:"font-medium text-gray-700",children:"Email"}),s.jsx("div",{className:"text-sm text-gray-500",children:"Recevoir les codes OTP par email"})]})]})]}),s.jsxs("label",{className:"flex items-center gap-3 p-3 border border-border rounded-xl hover:bg-gray-50 cursor-pointer",children:[s.jsx("input",{type:"radio",name:"notificationPreference",value:"whatsapp",checked:n.notificationPreference==="whatsapp",onChange:A,className:"text-green-600 focus:ring-green-500"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-2xl",children:"📱"}),s.jsxs("div",{children:[s.jsx("div",{className:"font-medium text-gray-700",children:"WhatsApp"}),s.jsx("div",{className:"text-sm text-gray-500",children:"Recevoir les codes OTP via WhatsApp"})]})]})]})]}),s.jsx("div",{className:"mt-2 text-xs text-gray-500",children:"💡 Vous pouvez modifier cette préférence pour des demandes individuelles"})]}),x&&s.jsx("div",{className:`p-3 rounded-lg text-center text-sm ${x.type==="success"?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:x.message}),s.jsx("footer",{className:"px-4 py-4 mt-6",children:s.jsxs("button",{onClick:P,disabled:l||u,className:"w-full bg-primary hover:bg-blue-800 text-white font-bold py-3 rounded-xl text-lg flex items-center justify-center gap-2 disabled:bg-blue-400",children:[l?s.jsx(L,{icon:Yt,className:"animate-spin"}):s.jsx(L,{icon:pre}),l?"Sauvegarde...":"Sauvegarder"]})})]}),b&&N&&s.jsx(Z.div,{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",initial:{opacity:0}
232,animate:{opacity:1},exit:{opacity:0},children:s.jsxs(Z.div,{className:"bg-white rounded-2xl p-6 w-[90vw] max-w-sm text-gray-900 relative border border-border",initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},transition:{type:"spring",bounce:.2},children:[s.jsx("h4",{className:`text-lg font-bold mb-4 text-center ${N.type==="success"?"text-green-600":"text-red-600"}`,children:N.type==="success"?"Succès":"Erreur"}),s.jsx("p",{className:"text-sm text-gray-700 text-center mb-4",children:N.message}),s.jsx("button",{type:"button",className:"w-full bg-blue-500 text-white rounded-xl py-2 font-bold hover:bg-blue-600 transition-colors",onClick:()=>E(!1),children:"Fermer"})]})})]})]})})}function i8e(){var c;const{id:e}=ta(),[t,r]=C.useState(null),[n,i]=C.useState(!0),[a,o]=C.useState(0);C.useEffect(()=>{async function u(){i(!0);try{const f=await X.getProductDetails(e);r(f.body.data||f.body.product||f.body)}catch{r(null)}finally{i(!1)}}u()},[e]);let l=["https://via.placeholder.com/300x300?text=No+Image"];return t&&t.images&&t.images.length>0&&(l=t.images.map(u=>u.fileId?X.generateSettingsFileUrl(u.fileId):u.url).filter(u=>typeof u=="string"&&!!u)),n?s.jsxs("div",{className:"flex flex-col items-center justify-center min-h-screen bg-bg px-2 py-4",children:[s.jsx($e,{height:"h-10",rounded:"rounded-xl",className:"mb-4 w-full max-w-md"}),s.jsx($e,{height:"h-60",rounded:"rounded-2xl",className:"mb-4 w-full max-w-md"}),s.jsx($e,{height:"h-8",rounded:"rounded-xl",className:"mb-2 w-full max-w-md"}),s.jsx($e,{height:"h-8",rounded:"rounded-xl",className:"mb-2 w-full max-w-md"})]}):t?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center mb-4 px-4",children:[s.jsx(Ct,{}),s.jsx("h3",{className:"text-xl font-medium text-center w-full text-gray-900",children:"Information du produit"})]}),s.jsx("div",{className:"min-h-screen flex flex-col items-center bg-bg px-2 py-4",children:s.jsxs(Z.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.5,type:"spring"},className:"w-full max-w-md rounded-3xl p-4",children:[s.jsxs("div",{className:"flex flex-col items-center",children:[s.jsx("div",{className:"w-full flex justify-center",children:s.jsx(It,{mode:"wait",children:s.jsx(Z.img,{src:l[a],alt:"Produit",className:"w-60 h-60 object-contain rounded-2xl bg-gray-50",initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.3}},a)})}),s.jsx(Z.div,{className:"flex justify-center gap-2 mt-2",initial:{opacity:0}
232,animate:{opacity:1},transition:{delay:.2},children:l.map((u,f)=>s.jsx("button",{onClick:()=>o(f),className:`w-3 h-3 rounded-full ${f===a?"bg-primary":"bg-gray-300"}`,"aria-label":`Voir l'image ${f+1}`},f))}),s.jsx(Z.div,{className:"flex gap-2 mt-4",initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.3},children:l.map((u,f)=>s.jsx(Z.img,{src:u,alt:"Miniature",className:`w-16 h-16 object-contain rounded-xl border ${f===a?"border-primary border-2":"border-border"}`,onClick:()=>o(f),style:{cursor:"pointer"},whileHover:{scale:1.08},transition:{type:"spring",stiffness:300}},f))})]}),s.jsxs("div",{className:"mt-6",children:[s.jsx("h2",{className:"text-2xl font-bold text-gray-800 mb-2",children:t.name}),s.jsx("p",{className:"text-gray-500 mb-4",children:t.description}),s.jsxs("div",{className:"flex items-center justify-between mt-6 mb-2",children:[s.jsx("span",{className:"text-2xl font-bold text-gray-800",children:(c=t.price)==null?void 0:c.toLocaleString("fr-FR",{style:"currency",currency:"XAF"})}),t.whatsappLink?s.jsx(Z.a,{href:t.whatsappLink,target:"_blank",rel:"noopener noreferrer",className:"bg-primary hover:bg-blue-800 text-white font-bold py-3 px-2 rounded-xl text-lg transition-colors",initial:{scale:.95,opacity:0},animate:{scale:1,opacity:1},transition:{delay:.5,type:"spring"},whileTap:{scale:.97},children:"Contacter le vendeur"}):null]})]})]})})]}):s.jsx("div",{className:"text-center py-16 text-gray-500",children:"Produit introuvable"})}const a8e=["mode et vêtements","électronique et gadgets","maison et jardin","beauté et soins personnels","alimentation et boissons","santé et bien-être","sport et loisirs","jouets et jeux","accessoires automobiles","outils et équipements de bricolage","animaux de compagnie","livres et médias","art et artisanat","produits pour bébés et enfants","fournitures de bureau et papeterie","équipements de voyage","instruments de musique","produits technologiques","produits écologiques et durables","autres"],o8e=["consultation professionnelle","services de formation et d'apprentissage","services de design","services de rédaction et de traduction","services de programmation et de développement","services de marketing et de publicité","services de maintenance et de réparation","services de santé et de bien-être","services de consultation juridique","services de planification d'événements","autres"];function l8e(){const e=lt(),[t,r]=C.useState({name:"",category:"",subcategory:"",description:"",price:""}),[n,i]=C.useState([]),[a,o]=C.useState(!1),[l,c]=C.useState(null),[u,f]=C.useState(!1),[x,m]=C.useState(null),p=N=>{const{name:j,value:A}=N.target;r(w=>j==="category"&&w.category!==A?{...w,[j]:A,subcategory:""}:{...w,[j]:A}),l&&c(null)},y=N=>{if(N.target.files){const j=Array.from(N.target.files),A=[];j.forEach(w=>{w.size>10*1024*1024?(m({type:"error",message:`L'image "${w.name}" dépasse la taille maximale autorisée de 10 Mo et ne sera pas ajoutée.`}),f(!0)):A.push(w)}),i(w=>[...w,...A].slice(0,10)),c(null)}},v=N=>{i(j=>j.filter((A,w)=>w!==N)),l&&c(null)},b=async N=>{if(N.preventDefault(),o(!0),c(null),!t.name||!t.category||!t.description||!t.price||!t.subcategory){c({type:"error",message:"Veuillez remplir tous les champs obligatoires."}),o(!1);return}const j=parseFloat(t.price);if(isNaN(j)||j<=0){c({type:"error",message:"Le prix doit être un nombre positif."}),o(!1);return}try{const A={name:t.name,category:t.category,subcategory:t.subcategory,description:t.description,price:j},w=await X.createProduct(A,n),S=Ve(w);w.isOverallSuccess?(c({type:"success",message:"Produit ajouté avec succès!"}),setTimeout(()=>{e("/mes-produits")},1500)):c({type:"error",message:S.message||"Échec de l'ajout du produit."})}catch(A){const w=A instanceof Error?A.message:"Une erreur inattendue est survenue.";c({type:"error",message:w})}finally{o(!1)}},E=t.category==="Produit"?a8e:t.category==="Service"?o8e:[];return s.jsxs(nn,{children:[s.jsxs("div",{className:"min-h-screen flex flex-col items-center bg-bg p-4",children:[s.jsx("div",{className:"w-full max-w-md",children:s.jsxs("div",{className:"flex items-center mb-4",children:[s.jsx(Ct,{}),s.jsx("h3",{className:"text-xl font-medium text-center w-full",children:"Ajouter un produit"})]})}),s.jsx(Z.div,{initial:{opacity:0,y:30}
232,animate:{opacity:1,y:0},transition:{duration:.5,type:"spring"},className:"w-full max-w-md bg-white rounded-3xl p-8",children:s.jsxs("form",{className:"flex flex-col gap-4",onSubmit:b,children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 mb-1",children:"Nom du produit"}),s.jsx("input",{type:"text",name:"name",value:t.name,onChange:p,placeholder:"Ex: Smartphone Samsung Galaxy S23",className:"w-full border border-border rounded-xl px-4 py-2 focus:outline-none",required:!0})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 mb-1",children:"Catégorie"}),s.jsxs("select",{name:"category",value:t.category,onChange:p,className:"w-full border border-border rounded-xl px-4 py-2 focus:outline-none bg-white",required:!0,children:[s.jsx("option",{value:"",children:"Sélectionner une catégorie"}),s.jsx("option",{value:"Produit",children:"Produit"}),s.jsx("option",{value:"Service",children:"Service"})]})]}),t.category&&s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 mb-1",children:"Sous-catégorie"}),s.jsxs("select",{name:"subcategory",value:t.subcategory,onChange:p,className:"w-full border border-border rounded-xl px-4 py-2 focus:outline-none bg-white",required:!0,children:[s.jsx("option",{value:"",children:"Sélectionner une sous-catégorie"}),E.map(N=>s.jsx("option",{value:N,children:N},N))]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 mb-1",children:"Description"}),s.jsx("textarea",{name:"description",value:t.description,onChange:p,placeholder:"Décrivez votre produit ou service...",rows:4,className:"w-full border border-border rounded-xl px-4 py-2 focus:outline-none resize-none",required:!0})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 mb-1",children:"Prix (FCFA)"}),s.jsx("input",{type:"number",name:"price",value:t.price,onChange:p,placeholder:"Ex: 1200.50",className:"w-full border border-border rounded-xl px-4 py-2 focus:outline-none",step:"0.01",min:"0",required:!0})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 mb-1",children:"Images (max 10)"}),s.jsx("input",{type:"file",multiple:!0,accept:"image/*",onChange:y,className:`block w-full text-sm text-gray-700
233                           file:mr-4 file:py-2 file:px-4
234                           file:rounded-full file:border-0
235                           file:text-sm file:font-semibold
236                           file:bg-blue-50 file:text-blue-700
237                           hover:file:bg-blue-100`}),s.jsxs("div",{className:"mt-2 flex flex-wrap gap-2",children:[n.map((N,j)=>s.jsxs("div",{className:"relative w-20 h-20 rounded-lg overflow-hidden border border-border",children:[s.jsx("img",{src:URL.createObjectURL(N),alt:`preview-${N.name}`,className:"w-full h-full object-cover",onLoad:()=>URL.revokeObjectURL(URL.createObjectURL(N))}),s.jsx("button",{type:"button",onClick:()=>v(j),className:"absolute top-0 right-0 bg-red-500 text-white rounded-full p-1",title:"Supprimer l'image",children:s.jsx(L,{icon:C3,size:14})})]},j)),n.length<10&&s.jsxs("label",{className:"w-20 h-20 border-2 border-dashed border-border rounded-lg flex items-center justify-center text-gray-400 cursor-pointer",children:[s.jsx(L,{icon:y$,size:24}),s.jsx("input",{type:"file",multiple:!0,accept:"image/*",onChange:y,className:"hidden"})]})]})]}),l&&s.jsx(Z.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:`p-3 rounded-lg text-center text-sm ${l.type==="success"?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:l.message}),s.jsx("button",{type:"submit",className:"w-full bg-primary hover:bg-blue-800 text-white font-bold py-3 rounded-xl text-lg mt-2 flex items-center justify-center gap-2 disabled:bg-blue-400",disabled:a,children:a?s.jsx(L,{icon:Yt,className:"animate-spin"}):"Ajouter le produit"})]})})]}),u&&x&&s.jsx(Z.div,{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",initial:{opacity:0}
237,animate:{opacity:1},exit:{opacity:0},children:s.jsxs(Z.div,{className:"bg-white rounded-2xl p-6 w-[90vw] max-w-sm text-gray-900 relative border border-border",initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},transition:{type:"spring",bounce:.2},children:[s.jsx("h4",{className:`text-lg font-bold mb-4 text-center ${x.type==="success"?"text-green-600":"text-red-600"}`,children:x.type==="success"?"Succès":"Erreur"}),s.jsx("p",{className:"text-sm text-gray-700 text-center mb-4",children:x.message}),s.jsx("button",{type:"button",className:"w-full bg-blue-500 text-white rounded-xl py-2 font-bold hover:bg-blue-600 transition-colors",onClick:()=>f(!1),children:"Fermer"})]})})]})}function c8e({image:e,brand:t,name:r,price:n,whatsappLink:i,productId:a}){const[o,l]=C.useState(!1),c=u=>{u.stopPropagation();const f=`${window.location.origin}/single-product/${a}`;navigator.clipboard.writeText(f),l(!0),setTimeout(()=>l(!1),1200)};return s.jsx("div",{children:s.jsxs("div",{className:"bg-white rounded-xl border border-border p-3 flex flex-col relative min-h-[240px]",children:[s.jsx("button",{className:"absolute top-3 right-3 bg-white rounded-full p-1 text-green-600 hover:bg-green-50 transition-colors border border-border",onClick:c,children:s.jsx(L,{icon:tu,size:18})}),o&&s.jsx("span",{className:"absolute top-10 right-3 bg-green-600 text-white text-xs rounded px-2 py-1",children:"Lien copié !"}),s.jsx("div",{className:"flex justify-center items-center h-24 mb-2",children:s.jsx("img",{src:e,alt:r,className:"object-contain h-20"})}),s.jsx("div",{className:"text-xs text-gray-400",children:t}),s.jsx("div",{className:"text-sm font-bold text-gray-800 truncate",children:r}),s.jsxs("div",{className:"flex items-center mt-4 gap-2 bg-gray-100 px-3 py-1 rounded-full",children:[s.jsxs("span",{className:" font-semibold text-gray-700",children:[" ",n," F "]}),i?s.jsx("a",{href:i,target:"_blank",rel:"noopener noreferrer",className:"bg-green-600 rounded-full p-2 text-white hover:bg-green-700 transition-colors ml-auto",onClick:u=>u.stopPropagation(),children:s.jsx(L,{icon:Ji,size:16})}):s.jsx("button",{className:"bg-green-600 rounded-full p-2 text-white opacity-50 cursor-not-allowed ml-auto",disabled:!0,children:s.jsx(L,{icon:Ji,size:16})})]})]})})}const u8e="/assets/Ecommerce-BTzRNFt-.png";function d8e(){const e=lt(),[t,r]=C.useState([]),[n,i]=C.useState(!0),[a,o]=C.useState(""),[l,c]=C.useState(null),[u,f]=C.useState(!1),[x,m]=C.useState(null);C.useEffect(()=>{p()},[]);const p=async()=>{try{i(!0),o("");const E=await X.getUserProducts(),N=Ve(E);r(N||[])}catch(E){o(E instanceof Error?E.message:"Failed to load products")}finally{i(!1)}},y=E=>{e(`/modifier-produit/${E}`)},v=async E=>{m({type:"confirm",message:"Êtes-vous sûr de vouloir supprimer ce produit ? Cette action est irréversible.",onConfirm:async()=>{try{c(E);const N=await X.deleteProduct(E);Ve(N),r(t.filter(j=>j._id!==E)),m({type:"success",message:"Produit supprimé avec succès!"}),f(!0)}catch(N){m({type:"error",message:N instanceof Error?`Échec de la suppression: ${N.message}`:"Échec de la suppression du produit."}),f(!0)}finally{c(null)}}}),f(!0)},b=()=>{p()};return s.jsxs(nn,{children:[s.jsxs("div",{className:"p-3 min-h-screen bg-white",children:[s.jsxs("div",{className:"flex items-center mb-6",children:[s.jsx(Ct,{}),s.jsx("h3",{className:"text-xl font-medium text-center w-full",children:"Mes produits"})]}),n?s.jsx("div",{className:"grid grid-cols-2 gap-4",children:[...Array(4)].map((E,N)=>s.jsxs("div",{className:"relative",children:[s.jsx($e,{height:"h-60",rounded:"rounded-xl"}),s.jsxs("div",{className:"absolute top-2 right-2 flex gap-1",children:[s.jsx($e,{width:"w-8",height:"h-8",rounded:"rounded-full"}),s.jsx($e,{width:"w-8",height:"h-8",rounded:"rounded-full"})]})]},N))}):a?s.jsxs("div",{className:"flex flex-col items-center justify-center h-[60vh] text-gray-500",children:[s.jsx("p",{className:"text-lg mb-2 text-red-500",children:"Erreur lors du chargement"}),s.jsx("p",{className:"text-sm mb-4",children:a}),s.jsx("button",{onClick:b,className:"px-4 py-2 bg-blue-500 text-white rounded-lg hover:bg-blue-600",children:"Réessayer"})]}):t.length===0?s.jsxs("div",{className:"flex flex-col items-center justify-center h-[60vh] text-gray-500",children:[s.jsx("p",{className:"text-lg mb-2",children:"Vous n'avez pas encore de produits"}),s.jsx("p",{className:"text-sm mb-4",children:"Commencez par ajouter votre premier produit"}),s.jsx("button",{onClick:()=>e("/ajouter-produit"),className:"px-4 py-2 bg-green-500 text-white rounded-lg hover:bg-green-600",children:"Ajouter un produit"})]}):s.jsx("div",{className:"grid grid-cols-2 gap-4",children:t.map(E=>{var N,j,A;return s.jsxs("div",{className:"relative",children:[s.jsx(c8e,{image:((j=(N=E.images)==null?void 0:N[0])==null?void 0:j.url)||u8e,brand:((A=E.seller)==null?void 0:A.name)||"Vous",name:E.name,price:E.price,productId:E._id}),s.jsxs("div",{className:"absolute top-2 right-2 flex gap-1",children:[s.jsx("button",{onClick:()=>y(E._id),className:"bg-white p-2 rounded-full hover:bg-gray-50 transition-colors border border-border",title:"Modifier",children:s.jsx(L,{icon:Uc,className:"w-4 h-4 text-green-600"})}),s.jsx("button",{onClick:()=>v(E._id),disabled:l===E._id,className:"bg-white p-2 rounded-full hover:bg-gray-50 transition-colors disabled:opacity-50 border border-border",title:"Supprimer",children:s.jsx(L,{icon:kd,className:"w-4 h-4 text-red-600"})})]}),E.isActive===!1&&s.jsx("div",{className:"absolute inset-0 bg-black bg-opacity-50 rounded-xl flex items-center justify-center",children:s.jsx("span",{className:"text-white font-semibold",children:"Inactif"})})]},E._id)})})]}),u&&x&&s.jsx(Z.div,{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",initial:{opacity:0}
237,animate:{opacity:1},exit:{opacity:0},children:s.jsxs(Z.div,{className:"bg-white rounded-2xl p-6 w-[90vw] max-w-sm text-gray-900 relative border border-border",initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},transition:{type:"spring",bounce:.2},children:[s.jsx("h4",{className:`text-lg font-bold mb-4 text-center ${x.type==="success"?"text-green-600":x.type==="error"?"text-red-600":"text-gray-800"}`,children:x.type==="success"?"Succès":x.type==="error"?"Erreur":"Confirmation"}),s.jsx("p",{className:"text-sm text-gray-700 text-center mb-4",children:x.message}),x.type==="confirm"?s.jsxs("div",{className:"flex gap-3 mt-2",children:[s.jsx("button",{type:"button",className:"flex-1 bg-red-500 text-white rounded-xl py-2 font-bold hover:bg-red-600 transition-colors",onClick:()=>{var E;(E=x.onConfirm)==null||E.call(x),f(!1)},children:"Confirmer"}),s.jsx("button",{type:"button",className:"flex-1 bg-gray-200 text-gray-700 rounded-xl py-2 font-bold hover:bg-gray-300 transition-colors",onClick:()=>f(!1),children:"Annuler"})]}):s.jsx("button",{type:"button",className:"w-full bg-blue-500 text-white rounded-xl py-2 font-bold hover:bg-blue-600 transition-colors",onClick:()=>f(!1),children:"Fermer"})]})})]})}const x8e=["mode et vêtements","électronique et gadgets","maison et jardin","beauté et soins personnels","alimentation et boissons","santé et bien-être","sport et loisirs","jouets et jeux","accessoires automobiles","outils et équipements de bricolage","animaux de compagnie","livres et médias","art et artisanat","produits pour bébés et enfants","fournitures de bureau et papeterie","équipements de voyage","instruments de musique","produits technologiques","produits écologiques et durables","autres"],f8e=["consultation professionnelle","services de formation et d'apprentissage","services de design","services de rédaction et de traduction","services de programmation et de développement","services de marketing et de publicité","services de maintenance et de réparation","services de santé et de bien-être","services de consultation juridique","services de planification d'événements","autres"];function h8e(){const{id:e}=ta(),t=lt(),[r,n]=C.useState({name:"",category:"",subcategory:"",description:"",price:""}),[i,a]=C.useState([]),[o,l]=C.useState([]),[c,u]=C.useState(!0),[f,x]=C.useState(!1),[m,p]=C.useState(null),[y,v]=C.useState(!1),[b,E]=C.useState(null);C.useEffect(()=>{(async()=>{var D;if(!e){u(!1),p({type:"error",message:"ID du produit manquant."});return}try{u(!0);const P=await X.getProductById(e),O=Ve(P);if(O){const M=O.category?O.category.charAt(0).toUpperCase()+O.category.slice(1):"";n({name:O.name||"",category:M,subcategory:O.subcategory||"",description:O.description||"",price:((D=O.price)==null?void 0:D.toString())||""}),O.images&&Array.isArray(O.images)?a(O.images.map(I=>I.url)):a([])}else p({type:"error",message:"Produit introuvable."})}catch(P){p({type:"error",message:P instanceof Error?P.message:"Erreur lors du chargement du produit."})}finally{u(!1)}})()},[e]);const N=B=>{const{name:D,value:P}=B.target;n(O=>D==="category"&&O.category!==P?{...O,[D]:P,subcategory:""}:{...O,[D]:P}),m&&p(null)},j=B=>{if(B.target.files){const D=Array.from(B.target.files),P=[];D.forEach(O=>{O.size>10*1024*1024?(E({type:"error",message:`L'image "${O.name}" dépasse la taille maximale autorisée de 10 Mo et ne sera pas ajoutée.`}),v(!0)):P.push(O)}),l(O=>[...O,...P].slice(0,10-i.length)),p(null)}},A=B=>{l(D=>D.filter((P,O)=>O!==B)),m&&p(null)},w=async B=>{if(B.preventDefault(),x(!0),p(null),!r.name||!r.category||!r.description||!r.price||!r.subcategory){p({type:"error",message:"Veuillez remplir tous les champs obligatoires."}),x(!1);return}const D=parseFloat(r.price);if(isNaN(D)||D<=0){p({type:"error",message:"Le prix doit être un nombre positif."}),x(!1);return}try{const P={name:Rs(r.name),category:Rs(r.category.toLowerCase()),subcategory:Rs(r.subcategory),description:r.description,price:D},O=await X.updateProduct(e,P,o),M=Ve(O);O.isOverallSuccess?(p({type:"success",message:"Produit mis à jour avec succès!"}),setTimeout(()=>{t("/mes-produits")},1500)):p({type:"error",message:M.message||"Échec de la mise à jour du produit."})}catch(P){const O=P instanceof Error?P.message:"Une erreur inattendue est survenue.";p({type:"error",message:O})}finally{x(!1)}},S=r.category==="Produit"?x8e:r.category==="Service"?f8e:[];return c?s.jsxs("div",{className:"p-3 min-h-screen bg-white",children:[s.jsxs("div",{className:"flex items-center mb-6",children:[s.jsx(Ct,{}),s.jsx("h3",{className:"text-xl font-medium text-center w-full",children:"Modifier le produit"})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsx($e,{height:"h-10",rounded:"rounded-xl"}),s.jsx($e,{height:"h-20",rounded:"rounded-xl"}),s.jsx($e,{height:"h-10",rounded:"rounded-xl"}),s.jsx($e,{height:"h-10",rounded:"rounded-xl"}),s.jsx($e,{height:"h-10",rounded:"rounded-xl"}),s.jsx($e,{height:"h-12",rounded:"rounded-xl"})]})]}):s.jsxs(nn,{children:[s.jsxs("div",{className:"min-h-screen flex flex-col items-center bg-bg p-4",children:[s.jsx("div",{className:"w-full max-w-md",children:s.jsxs("div",{className:"flex items-center mb-4",children:[s.jsx(Ct,{}),s.jsx("h3",{className:"text-xl font-medium text-center w-full",children:"Modifier le produit"})]})}),s.jsx(Z.div,{initial:{opacity:0,y:30}
237,animate:{opacity:1,y:0},transition:{duration:.5,type:"spring"},className:"w-full max-w-md bg-white rounded-3xl p-8",children:s.jsxs("form",{className:"flex flex-col gap-4",onSubmit:w,children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 mb-1",children:"Nom du produit"}),s.jsx("input",{type:"text",name:"name",value:r.name,onChange:N,placeholder:"Ex: Smartphone Samsung Galaxy S23",className:"w-full border border-border rounded-xl px-4 py-2 focus:outline-none",required:!0})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 mb-1",children:"Catégorie"}),s.jsxs("select",{name:"category",value:r.category,onChange:N,className:"w-full border border-border rounded-xl px-4 py-2 focus:outline-none bg-white",required:!0,children:[s.jsx("option",{value:"",children:"Sélectionner une catégorie"}),s.jsx("option",{value:"Produit",children:"Produit"}),s.jsx("option",{value:"Service",children:"Service"})]})]}),r.category&&s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 mb-1",children:"Sous-catégorie"}),s.jsxs("select",{name:"subcategory",value:r.subcategory,onChange:N,className:"w-full border border-border rounded-xl px-4 py-2 focus:outline-none bg-white",required:!0,children:[s.jsx("option",{value:"",children:"Sélectionner une sous-catégorie"}),S.map(B=>s.jsx("option",{value:Rs(B).toLowerCase(),children:B},B))]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 mb-1",children:"Description"}),s.jsx("textarea",{name:"description",value:r.description,onChange:N,placeholder:"Décrivez votre produit ou service...",rows:4,className:"w-full border border-border rounded-xl px-4 py-2 focus:outline-none resize-none",required:!0})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 mb-1",children:"Prix (FCFA)"}),s.jsx("input",{type:"number",name:"price",value:r.price,onChange:N,placeholder:"Ex: 1200.50",className:"w-full border border-border rounded-xl px-4 py-2 focus:outline-none",step:"0.01",min:"0",required:!0})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 mb-1",children:"Images existantes"}),s.jsxs("div",{className:"mt-2 flex flex-wrap gap-2",children:[i.map((B,D)=>s.jsx("div",{className:"relative w-20 h-20 rounded-lg overflow-hidden border border-border",children:s.jsx("img",{src:B,alt:`existing-${D}`,className:"w-full h-full object-cover"})},D)),i.length===0&&s.jsx("p",{className:"text-sm text-gray-500",children:"Aucune image existante."})]}),s.jsxs("label",{className:"block text-gray-700 mt-4 mb-1",children:["Ajouter de nouvelles images (max ",10-i.length,")"]}),s.jsx("input",{type:"file",multiple:!0,accept:"image/*",onChange:j,className:`block w-full text-sm text-gray-700
238                                           file:mr-4 file:py-2 file:px-4
239                                           file:rounded-full file:border-0
240                                           file:text-sm file:font-semibold
241                                           file:bg-blue-50 file:text-blue-700
242                                           hover:file:bg-blue-100`}),s.jsxs("div",{className:"mt-2 flex flex-wrap gap-2",children:[o.map((B,D)=>s.jsxs("div",{className:"relative w-20 h-20 rounded-lg overflow-hidden border border-border",children:[s.jsx("img",{src:URL.createObjectURL(B),alt:`preview-${B.name}`,className:"w-full h-full object-cover",onLoad:()=>URL.revokeObjectURL(URL.createObjectURL(B))}),s.jsx("button",{type:"button",onClick:()=>A(D),className:"absolute top-0 right-0 bg-red-500 text-white rounded-full p-1",title:"Supprimer cette nouvelle image",children:s.jsx(L,{icon:C3,size:14})})]},D)),i.length+o.length<10&&s.jsxs("label",{className:"w-20 h-20 border-2 border-dashed border-border rounded-lg flex items-center justify-center text-gray-400 cursor-pointer",children:[s.jsx(L,{icon:y$,size:24}),s.jsx("input",{type:"file",multiple:!0,accept:"image/*",onChange:j,className:"hidden"})]})]})]}),m&&s.jsx(Z.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:`p-3 rounded-lg text-center text-sm ${m.type==="success"?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:m.message}),s.jsx("button",{type:"submit",className:"w-full bg-primary hover:bg-blue-800 text-white font-bold py-3 rounded-xl text-lg mt-2 flex items-center justify-center gap-2 disabled:bg-blue-400",disabled:f,children:f?s.jsx(L,{icon:Yt,className:"animate-spin"}):"Mettre à jour le produit"})]})})]}),y&&b&&s.jsx(Z.div,{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",initial:{opacity:0}
242,animate:{opacity:1},exit:{opacity:0},children:s.jsxs(Z.div,{className:"bg-white rounded-2xl p-6 w-[90vw] max-w-sm text-gray-900 relative border border-border",initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},transition:{type:"spring",bounce:.2},children:[s.jsx("h4",{className:`text-lg font-bold mb-4 text-center ${b.type==="success"?"text-green-600":"text-red-600"}`,children:b.type==="success"?"Succès":"Erreur"}),s.jsx("p",{className:"text-sm text-gray-700 text-center mb-4",children:b.message}),s.jsx("button",{type:"button",className:"w-full bg-blue-500 text-white rounded-xl py-2 font-bold hover:bg-blue-600 transition-colors",onClick:()=>v(!1),children:"Fermer"})]})})]})}const hC={CLASSIQUE:1.75,CIBLE:2},zO=1e3,VO=["Trading","Achat en Chine","Art oratoire","Marketing digital","Bots WhatsApp"],UO={CLASSIQUE:{title:"Pack Classique",pitch:"Tout pour démarrer et gagner dès vos premiers statuts.",features:["Possibilité de gagner entre 5 000 et 10 000 FCFA par jour","Vente de produits digitaux","Contacts WhatsApp ciblés par pays","Accès à la marketplace SBC"]},CIBLE:{title:"Pack Ciblé",pitch:"Le meilleur tarif par vue et un ciblage précis de vos contacts.",features:["Ciblage avancé : pays, sexe, âge, profession, ville et centres d'intérêt"],extraTraining:"SBC IA Creator"}},mC=e=>e.toLocaleString("fr-FR");function qO(){var H,te;const e=lt(),t=Ph(),[r,n]=C.useState(null),[i,a]=C.useState(!1),[o,l]=C.useState({show:!1,message:""}),{user:c}=Gt(),u=(c==null?void 0:c.balance)||0,{data:f,loading:x,error:m,refetch:p}=Pg("subscription-plans",async()=>{const ne=await X.getSubscriptionPlans();return(Ve(ne)||[]).filter(J=>J.type==="CLASSIQUE"||J.type==="CIBLE")},{staleTime:3e5}),{data:y,loading:v,refetch:b}=Pg("current-subscription",async()=>{try{const ne=await X.getCurrentSubscription(),Y=Ve(ne);return(Y==null?void 0:Y.subscriptions)||[]}catch{return[]}},{staleTime:12e4}),E=x||v,N=m,j=y||[],A=j.some(ne=>ne.subscriptionType==="CLASSIQUE"&&ne.status==="active"),w=j.some(ne=>ne.subscriptionType==="CIBLE"&&ne.status==="active"),S=f||[],B=(H=S.find(ne=>ne.type==="CLASSIQUE"))==null?void 0:H.price,D=(te=S.find(ne=>ne.type==="CIBLE"))==null?void 0:te.price,P=B!==void 0&&D!==void 0?D-B:void 0,O=w?"CIBLE":A?"CLASSIQUE":null,M=j.find(ne=>ne.subscriptionType===O&&ne.status==="active"),I=ne=>{const Y=new Date(ne.endDate);return Number.isNaN(Y.getTime())||Y.getFullYear()>=9e3?"à vie":`jusqu'au ${Y.toLocaleDateString("fr-FR",{day:"numeric",month:"long",year:"numeric"})}`},V=O?[...S].sort((ne,Y)=>+(Y.type===O)-+(ne.type===O)):S,W=()=>{p(),b()};C.useEffect(()=>{u<0&&a(!0)},[u,c==null?void 0:c._id,c==null?void 0:c.balance]);const _=ne=>{const Y=document.createElement("a");Y.href=X.generatePaymentUrl(ne),Y.target="_blank",Y.rel="noopener noreferrer",document.body.appendChild(Y),Y.click(),document.body.removeChild(Y)},z=async ne=>{var Y;try{n(ne);const J=Ve(await X.purchaseSubscription(ne)),oe=(Y=J==null?void 0:J.paymentDetails)==null?void 0:Y.sessionId;oe?_(oe):await W()}catch(J){l({show:!0,message:J instanceof Error?J.message:"Le paiement n'a pas abouti."})}finally{n(null)}},R=async()=>{var ne;try{n("upgrade");const Y=Ve(await X.upgradeSubscription()),J=(ne=Y==null?void 0:Y.paymentDetails)==null?void 0:ne.sessionId;J?_(J):await W()}catch(Y){l({show:!0,message:Y instanceof Error?Y.message:"La mise à niveau n'a pas abouti."})}finally{n(null)}},q=ne=>ne==="CIBLE"?w?"active":A?"upgrade":"buy":w?"included":A?"active":"buy",G="w-full inline-flex items-center justify-center gap-2 rounded-xl py-3 px-4 text-sm font-semibold transition-colors duration-200 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary disabled:opacity-60 disabled:cursor-not-allowed",K=ne=>{const Y=q(ne.type),J=ne.type==="CIBLE"?"Ciblé":"Classique";if(Y==="active")return s.jsxs("button",{onClick:()=>e("/ads-network"),className:mt(G,"bg-primary text-white hover:bg-primary-hover"),children:["Commencer à gagner avec mes statuts",s.jsx(L,{icon:Mn,size:16})]});if(Y==="included")return s.jsxs("p",{className:"flex items-center justify-center gap-1.5 rounded-xl bg-surface-2 py-3 text-sm font-medium text-ink-2",children:[s.jsx(L,{icon:Sa,size:16,className:"text-success"}),"Inclus dans votre Pack Ciblé"]});if(Y==="upgrade"){const Q=r==="upgrade";return s.jsxs("div",{className:"flex flex-col gap-1.5",children:[s.jsx("button",{onClick:R,disabled:Q,className:mt(G,"bg-primary text-white hover:bg-primary-hover"),children:Q?"Redirection vers le paiement…":`Passer au Ciblé${P!==void 0?` · ${Yx(P)}`:""}`}),s.jsx("p",{className:"text-center text-xs text-ink-2",children:"Vous ne payez que la différence."})]})}const oe=r===ne.type,he=ne.type==="CIBLE";return s.jsx("button",{onClick:()=>z(ne.type),disabled:oe||r!==null,className:mt(G,he?"bg-primary text-white hover:bg-primary-hover":"bg-surface text-primary border border-primary hover:bg-primary-soft"),children:oe?"Redirection vers le paiement…":`Choisir le ${J} · ${Yx(ne.price)}`})},$=ne=>t?{initial:{opacity:0}
242,animate:{opacity:1},transition:{duration:.15}}:{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{duration:.25,ease:[.25,1,.5,1],delay:ne*.06}};return s.jsx(nn,{children:s.jsxs("div",{className:"min-h-screen bg-bg px-4 pt-3 pb-10",children:[s.jsxs("div",{className:"flex items-center mb-4",children:[s.jsx(Ct,{}),s.jsx("h1",{className:"text-xl font-semibold text-ink text-center w-full",children:"Abonnement"})]}),s.jsx("header",{className:"subscription-header mb-5",children:!E&&O?s.jsxs(s.Fragment,{children:[s.jsxs("h2",{className:"text-2xl font-bold text-ink leading-tight text-balance",children:["Votre ",UO[O].title," est actif"]}),s.jsx("p",{className:"mt-2 text-sm text-ink-2 text-pretty",children:O==="CLASSIQUE"?`Passez au Pack Ciblé pour gagner jusqu'à ${mC(hC.CIBLE)} FCFA par vue et cibler vos contacts plus finement. Vous ne payez que la différence.`:`Vous avez le pack le plus complet. Publiez les pubs des annonceurs en statut : chaque vue vous rapporte jusqu'à ${mC(hC.CIBLE)} FCFA.`})]}):s.jsxs(s.Fragment,{children:[s.jsx("h2",{className:"text-2xl font-bold text-ink leading-tight text-balance",children:"Payez une fois. Vos statuts WhatsApp remboursent le reste."}),s.jsx("p",{className:"mt-2 text-sm text-ink-2 text-pretty",children:"Chaque pack est à vie et vous ouvre SBC Ads Network : publiez les pubs des annonceurs en statut, et chaque vue vous rapporte de l'argent."})]})}),E?s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsx($e,{height:"h-80",rounded:"rounded-card"}),s.jsx($e,{height:"h-96",rounded:"rounded-card"})]}):N?s.jsxs("div",{className:"flex flex-col items-center text-center gap-3 bg-surface border border-border rounded-card px-4 py-10",children:[s.jsx("p",{className:"text-base font-semibold text-ink",children:"Impossible d'afficher les packs"}),s.jsx("p",{className:"text-sm text-ink-2 max-w-xs",children:"Vérifiez votre connexion, puis réessayez."}),s.jsx("button",{onClick:W,className:"rounded-xl bg-primary px-5 py-2.5 text-sm font-semibold text-white hover:bg-primary-hover transition-colors",children:"Réessayer"})]}):S.length===0?s.jsx("p",{className:"bg-surface border border-border rounded-card px-4 py-10 text-center text-sm text-ink-2",children:"Aucun pack n'est disponible pour le moment. Revenez un peu plus tard."}):s.jsxs("div",{className:"flex flex-col gap-4",children:[V.map((ne,Y)=>{const J=UO[ne.type],oe=ne.type==="CIBLE",he=q(ne.type),Q=hC[ne.type],ue=J!=null&&J.extraTraining?[...VO,J.extraTraining]:VO;return s.jsxs(Z.article,{...$(Y),"aria-current":he==="active"?"true":void 0,className:mt("relative bg-surface border rounded-card p-4 flex flex-col gap-4 overflow-hidden",oe?"premium-plan":"classic-plan",he==="active"?"border-success":oe&&he!=="included"?"border-primary":"border-border"),children:[he==="active"&&M&&s.jsxs("p",{className:"-mx-4 -mt-4 flex items-center gap-2 bg-success px-4 py-2 text-sm font-semibold text-white",children:[s.jsx(L,{icon:Sa,size:16}),"Votre pack actuel · actif ",I(M)]}),s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsx("h3",{className:"text-base font-bold text-ink",children:(J==null?void 0:J.title)??ne.name}),oe&&he==="buy"&&s.jsx("span",{className:"rounded-pill bg-primary-soft px-2 py-0.5 text-[11px] font-semibold text-primary",children:"Le plus rentable"})]}),s.jsx("p",{className:"mt-0.5 text-sm text-ink-2 text-pretty",children:(J==null?void 0:J.pitch)??ne.description})]}),s.jsxs("div",{className:"shrink-0 text-right",children:[s.jsx("p",{className:"text-xl font-bold text-ink tabular-nums",children:ne.price.toLocaleString("fr-FR")}),s.jsx("p",{className:"text-[11px] text-ink-2",children:he==="active"?"FCFA · payé":"FCFA · à vie"})]})]}),Q!==void 0&&s.jsxs("section",{className:"rounded-tile bg-success-soft p-3","aria-label":"Gains sur vos statuts WhatsApp",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"grid size-7 shrink-0 place-items-center rounded-pill bg-whatsapp text-white",children:s.jsx(L,{icon:nu,size:15})}),s.jsx("span",{className:"text-sm font-semibold text-ink",children:"Gagnez avec vos statuts WhatsApp"})]}),s.jsxs("p",{className:"mt-2 flex items-baseline gap-1.5",children:[s.jsx("span",{className:"text-sm text-ink-2",children:"jusqu'à"}),s.jsx("span",{className:"text-3xl font-bold text-success tabular-nums leading-none",children:mC(Q)}),s.jsx("span",{className:"text-sm font-semibold text-success",children:"FCFA par vue"})]}),s.jsxs("p",{className:"mt-2 flex items-center gap-1.5 text-xs text-ink-2",children:[s.jsx(L,{icon:g$,size:14,className:"text-success shrink-0"}
242),s.jsxs("span",{children:[zO.toLocaleString("fr-FR")," vues sur vos statuts ="," ",s.jsx("strong",{className:"font-semibold text-ink",children:Yx(Math.round(zO*Q))})," pour vous"]})]})]}),s.jsxs("div",{className:"subscription-features flex flex-col gap-2.5",children:[oe&&s.jsx("p",{className:"text-xs font-semibold text-ink-2",children:"Tout le Pack Classique, et en plus :"}),s.jsxs("ul",{className:"flex flex-col gap-2",children:[((J==null?void 0:J.features)??ne.features??[]).map(de=>s.jsxs("li",{className:"flex items-start gap-2 text-sm text-ink",children:[s.jsx(L,{icon:Ur,size:16,className:"mt-0.5 shrink-0 text-primary"}),s.jsx("span",{children:de})]},de)),s.jsxs("li",{className:"flex items-start gap-2 text-sm text-ink",children:[s.jsx(L,{icon:Ur,size:16,className:"mt-0.5 shrink-0 text-primary"}),s.jsxs("span",{children:[ue.length," formations incluses",s.jsx("span",{className:"mt-1.5 flex flex-wrap gap-1.5",children:ue.map(de=>s.jsx("span",{className:mt("rounded-pill border px-2 py-0.5 text-[11px]",de===(J==null?void 0:J.extraTraining)?"border-primary bg-primary-soft font-semibold text-primary":"border-border bg-surface-2 text-ink-2"),children:de},de))})]})]})]})]}),K(ne)]},ne.id)}),s.jsxs(Z.article,{...$(S.length),className:"bg-surface-2 border border-border rounded-card p-4 flex flex-col gap-3","aria-disabled":"true",children:[s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsx(L,{icon:dre,size:18,className:"text-accent"}),s.jsx("h3",{className:"text-base font-bold text-ink",children:"Pack Winner"}),s.jsxs("span",{className:"inline-flex items-center gap-1 rounded-pill bg-accent-soft px-2 py-0.5 text-[11px] font-semibold text-ink",children:[s.jsx("span",{className:"size-1.5 rounded-pill bg-accent","aria-hidden":!0}),"Bientôt"]})]}),s.jsx("p",{className:"mt-0.5 text-sm text-ink-2",children:"Pour viser 1 million de FCFA en 3 mois."})]}),s.jsxs("div",{className:"shrink-0 text-right",children:[s.jsx("p",{className:"text-xl font-bold text-ink-2 tabular-nums",children:"15 000"}),s.jsx("p",{className:"text-[11px] text-ink-2",children:"FCFA · ou 32 $"})]})]}),s.jsx("ul",{className:"flex flex-col gap-1.5",children:["Tout le Pack Ciblé","Méthode Atem : création de contenu, page de capture et page de vente","Relance automatique de vos prospects, à vie","Plus de 1 000 vues garanties sur vos statuts"].map(ne=>s.jsxs("li",{className:"flex items-start gap-2 text-sm text-ink-2",children:[s.jsx(L,{icon:Ur,size:16,className:"mt-0.5 shrink-0 text-ink-3"}),s.jsx("span",{children:ne})]},ne))}),s.jsxs("p",{className:"flex items-center justify-center gap-1.5 rounded-xl border border-border bg-surface py-3 text-sm font-medium text-ink-2",children:[s.jsx(L,{icon:Vc,size:15}),"Disponible prochainement"]})]})]}),s.jsx(p0,{}),s.jsx(U3,{isOpen:i,onClose:()=>a(!1),userReferralCode:(c==null?void 0:c.referralCode)||"",negativeBalance:Math.abs(u)}),s.jsx(It,{children:o.show&&s.jsx(Z.div,{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40 px-4",initial:{opacity:0}
242,animate:{opacity:1},exit:{opacity:0},onClick:()=>l({show:!1,message:""}),children:s.jsxs(Z.div,{role:"alertdialog","aria-labelledby":"abonnement-error-title",className:"bg-surface rounded-card p-6 max-w-sm w-full border border-border text-center",initial:{scale:.96,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.96,opacity:0},transition:{duration:.18},onClick:ne=>ne.stopPropagation(),children:[s.jsx("h3",{id:"abonnement-error-title",className:"text-lg font-semibold text-ink mb-2",children:"Paiement interrompu"}),s.jsx("p",{className:"text-sm text-ink-2 mb-6",children:o.message}),s.jsx("button",{onClick:()=>l({show:!1,message:""}),className:"w-full rounded-xl bg-primary py-2.5 px-4 text-sm font-semibold text-white hover:bg-primary-hover transition-colors",children:"Fermer"})]})})})]})})}const WO={stats:["referral-stats"],filleuls:(e,t,r)=>["filleuls",e,t,r]},m8e=`🚀 Rejoins la Révolution Entrepreneuriale avec le Sniper Business Center ! 🌍
243
244Tu es à un clic de faire partie de la meilleure communauté d'Afrique, où les opportunités d'affaires abondent et où ton succès est notre priorité!
245
246Voici ce que tu vas gagner en nous rejoignant dès maintenant:
247
248✨ Visibilité Maximale: Partage ton flyer ou affiche publicitaire dans nos groupes chaque samedi, atteignant ainsi des milliers de potentiels clients!
249
250📈 Accès à un Réseau Énorme:
251Profite de plus de 30 000 contacts WhatsApp ciblés qui verront tes produits et services.Ton succès commence ici!
252
253🎓 Formations Exclusives et Gratuites:
254Bénéficie de 5 formations complètes, accompagnées d'un suivi personnalisé chaque semaine sur Google Meet :
255
256   • Deviens expert en trading
257
258   • Maîtrise l'importation depuis la Chine
259
260   • Domine le marketing digital
261
262   • Excelle en art oratoire
263
264   • Crée des bots WhatsApp pour booster ton business
265
266🛒 Marketplace à Ta Disposition:
267 Mets en avant tes produits et services sur notre plateforme dédiée!
268
269💰 Gagne de l'Argent Facilement :
270Avec notre système de parrainage rémunéré:
271
272   • Niveau 1 : Parrainage direct = 1000 FCFA
273
274   • Niveau 2 : Ton filleul parraine = 500 FCFA
275
276   • Niveau 3 : Le filleul de ton filleul inscrit = 250 FCFA
277
278Je suis ton parrain à la SBC et je suis là pour t'accompagner vers le succès ! J'ai remarqué que tu as créé ton compte, mais que tu n'as pas encore finalisé ton abonnement. Ne laisse pas passer cette chance incroyable !
279
280👉 Prends ta décision aujourd'hui et transforme ta vie avec nous !
281
282    https://sniperbuisnesscenter.com/ `;function p8e(){var q,G,K,$,H,te,ne,Y;const{user:e,loading:t}=Gt(),[r,n]=C.useState("direct"),[i,a]=C.useState(!1),[o,l]=C.useState(!1),[c,u]=C.useState(null);C.useEffect(()=>{},[e,t]);const[f,x]=C.useState(""),[m,p]=C.useState("undefined"),[y,v]=C.useState(""),[b,E]=C.useState("undefined");C.useEffect(()=>{const J=setTimeout(()=>{v(f.trim())},500);return()=>clearTimeout(J)},[f]),C.useEffect(()=>{const J=setTimeout(()=>{E(m)},300);return()=>clearTimeout(J)},[m]);const N=10,{data:j,isLoading:A,error:w}=hr({queryKey:WO.stats,queryFn:async()=>{const J=await X.getReferralStats(),oe=Ve(J);return{direct:oe.level1Count||0,indirect:(oe.level2Count||0)+(oe.level3Count||0),total:(oe.level1Count||0)+(oe.level2Count||0)+(oe.level3Count||0),totalReferrals:oe.totalReferrals||0,level1ActiveSubscribers:oe.level1ActiveSubscribers||0,level2ActiveSubscribers:oe.level2ActiveSubscribers||0,level3ActiveSubscribers:oe.level3ActiveSubscribers||0,totalActiveSubscribers:(oe.level1ActiveSubscribers||0)+(oe.level2ActiveSubscribers||0)+(oe.level3ActiveSubscribers||0),monthlyData:oe.monthlyData||[]}},enabled:!t&&!!e,staleTime:0,gcTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,retry:3,retryDelay:1e3}),{data:S,isLoading:B,fetchNextPage:D,hasNextPage:P,isFetchingNextPage:O,error:M}=jf({queryKey:WO.filleuls(r,y,b),queryFn:async({pageParam:J=1})=>{if(!e)throw new Error("User not authenticated or loaded.");const oe={type:r,page:J,limit:N};y&&(oe.name=y),b!=="undefined"&&(oe.subType=b);const he=await X.getReferredUsers(oe),Q=Ve(he);if(!Q||typeof Q!="object")throw new Error("Invalid API response structure");return{referredUsers:Q.referredUsers||[],totalPages:Q.totalPages||1,totalCount:Q.totalCount||0,filteredCount:Q.totalCount||0}},getNextPageParam:(J,oe)=>
282{const he=oe.length;return he<J.totalPages?he+1:void 0},initialPageParam:1,staleTime:0,gcTime:30*60*1e3,enabled:!t&&!!e}),I=C.useRef(null),V=C.useRef(null);C.useEffect(()=>(V.current&&V.current.disconnect(),V.current=new IntersectionObserver(J=>{J[0].isIntersecting&&P&&!O&&D()},{threshold:.1}),I.current&&V.current.observe(I.current),()=>{V.current&&V.current.disconnect()}),[I,P,O,D]);const W=(S==null?void 0:S.pages.flatMap(J=>J.referredUsers))||[],_=((G=(q=S==null?void 0:S.pages)==null?void 0:q[0])==null?void 0:G.filteredCount)??(($=(K=S==null?void 0:S.pages)==null?void 0:K[0])==null?void 0:$.totalCount)??0,z=({monthlyData:J})=>{if(!J||J.length===0)return null;const oe=new Date,he=oe.getMonth()+1,Q=oe.getFullYear(),ue=J.filter(Le=>{const[Ne,ye]=Le.month.split("-");return parseInt(Ne)===Q&&parseInt(ye)<=he}).sort((Le,Ne)=>{const[,ye]=Le.month.split("-"),[,ee]=Ne.month.split("-");return parseInt(ye)-parseInt(ee)}),de=Math.max(...ue.map(Le=>Le.total),1),me=120;return s.jsxs("div",{className:"bg-white rounded-xl p-4 border border-border",children:[s.jsxs("button",{onClick:()=>l(!o),className:"flex items-center justify-between w-full mb-4 text-left",children:[s.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Évolution mensuelle"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("span",{className:"text-xs text-gray-500",children:["Jan - ",oe.toLocaleDateString("fr-FR",{month:"short"})]}),o?s.jsx(L,{icon:Th,className:"text-gray-500",size:14}):s.jsx(L,{icon:ly,className:"text-gray-500",size:14})]})]}),o&&s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"flex items-end justify-between h-32 px-1 gap-1",children:ue.map(Le=>{const Ne=de>0?Le.total/de*me:0,ye=de>0?Le.totalActiveSubscribers/de*me:0,ee=(c==null?void 0:c.month)===Le.month;return s.jsxs("div",{className:"flex flex-col items-center flex-1 cursor-pointer",onClick:()=>u(ee?null:Le),children:[s.jsxs("div",{className:"flex flex-col items-center mb-2 relative",children:[s.jsx("div",{className:`bg-ink rounded-t-md transition-all duration-300 ${ue.length<=6?"w-10":ue.length<=9?"w-8":"w-6"} ${ee?"ring-2 ring-blue-400 ring-offset-1":""}`,style:{height:`${Math.max(Ne,8)}px`}}),s.jsx("div",{className:`bg-success rounded-t-md absolute bottom-0 transition-all duration-300 ${ue.length<=6?"w-10":ue.length<=9?"w-8":"w-6"}`,style:{height:`${Math.max(ye,4)}px`}}),s.jsxs("div",{className:`absolute -top-10 text-xs font-medium text-gray-700 text-center transition-opacity duration-200 ${ee||ue.length<=6?"opacity-100":"opacity-0 md:opacity-100"}`,children:[s.jsx("div",{className:"text-gray-800 font-semibold",children:Le.total}),Le.totalActiveSubscribers>0&&s.jsx("div",{className:"text-green-600 text-xs font-medium",children:Le.totalActiveSubscribers})]})]}),s.jsx("div",{className:`text-xs text-gray-500 text-center ${ue.length>8?"transform -rotate-45 mt-2":""}`,children:(ue.length<=6,Le.monthName.slice(0,3))})]},Le.month)})}),c&&s.jsxs("div",{className:"mt-4 p-3 bg-blue-50 rounded-lg border border-border",children:[s.jsxs("h4",{className:"font-medium text-blue-900 mb-2",children:[c.monthName," 2025"]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-gray-600",children:"Total filleuls:"}),s.jsx("span",{className:"font-medium ml-2",children:c.total})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-gray-600",children:"Abonnés actifs:"}),s.jsx("span",{className:"font-medium ml-2 text-green-600",children:c.totalActiveSubscribers})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-gray-600",children:"Niveau 1:"}),s.jsx("span",{className:"font-medium ml-2",children:c.level1})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-gray-600",children:"Niveau 2:"}),s.jsx("span",{className:"font-medium ml-2",children:c.level2})]})]})]}),s.jsxs("div",{className:"flex items-center justify-center gap-4 mt-4 text-xs",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:"w-3 h-3 bg-gray-300 rounded-sm"}),s.jsx("span",{className:"text-gray-600",children:"Total filleuls"})]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:"w-3 h-3 bg-green-500 rounded-sm"}),s.jsx("span",{className:"text-gray-600",children:"Abonnés actifs"})]})]}),s.jsx("div",{className:"text-xs text-gray-500 text-center mt-2 md:hidden",children:"Touchez une barre pour voir les détails"})]}),s.jsxs("div",{className:"grid grid-cols-4 gap-3 pt-4 border-t border-border",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"text-sm font-medium text-green-600",children:ue.reduce((Le,Ne)=>Le+Ne.level1,0)}),s.jsx("div",{className:"text-xs text-gray-500",children:"Niveau 1"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"text-sm font-medium text-blue-600",children:ue.reduce((Le,Ne)=>Le+Ne.level2,0)}),s.jsx("div",{className:"text-xs text-gray-500",children:"Niveau 2"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"text-sm font-medium text-purple-600",children:ue.reduce((Le,Ne)=>Le+Ne.level3,0)}),s.jsx("div",{className:"text-xs text-gray-500",children:"Niveau 3"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"text-sm font-medium text-orange-600",children:ue.reduce((Le,Ne)=>Le+Ne.totalActiveSubscribers,0)}),s.jsx("div",{className:"text-xs text-gray-500",children:"Abonnés"})]})]})]})]})},R=J=>{switch(J){case"undefined":return"Tous les filleuls";case"all":return"Tous abonnés";case"CLASSIQUE":return"Abonnés CLASSIQUE";case"CIBLE":return"Abonnés CIBLÉ";case"none":return"Non abonnés";default:return"Filtre inconnu"}};return M?s.jsxs("div",{className:"p-3 min-h-screen bg-white",children:[s.jsxs("div",{className:"flex items-center mb-3",children:[s.jsx(Ct,{}),s.jsx("h3",{className:"text-xl font-medium text-center w-full",children:"Mes filleuls"})]}),s.jsxs("div",{className:"flex items-center justify-center min-h-[200px] text-red-600",children:["Erreur lors du chargement: ",M.message]})]}):s.jsxs(Z.div,{variants:On,initial:"hidden",animate:"show",className:"min-h-screen bg-gray-50",children:[s.jsx(Z.div,{variants:Ia,className:"bg-white sticky top-0 z-10 border border-border",children:s.jsxs("div",{className:"flex items-center p-4",children:[s.jsx(Ct,{}),s.jsx("h1",{className:"text-xl font-semibold text-gray-900 ml-3",children:"Mes filleuls"})]})}),s.jsxs("div",{className:"p-4 space-y-4",children:[s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:B&&f?s.jsxs("svg",{className:"animate-spin h-4 w-4 text-gray-400",viewBox:"0 0 24 24",children:[s.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),s.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]}):s.jsx(L,{icon:vo,className:"h-4 w-4 text-gray-400"})}),s.jsx("input",{type:"text",placeholder:"Rechercher un filleul...",value:f,onChange:J=>x(J.target.value),className:"w-full pl-10 pr-10 py-3 border border-border rounded-xl bg-white text-gray-900 placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-green-500 focus:border-transparent"}),f&&s.jsx("button",{onClick:()=>x(""),className:"absolute inset-y-0 right-0 pr-3 flex items-center",children:s.jsx(L,{icon:gt,className:"h-4 w-4 text-gray-400 hover:text-gray-600"})})]}),s.jsx("div",{className:"bg-white rounded-xl p-4 border border-border",children:w?s.jsx("div",{className:"text-center text-red-600 text-sm",children:"Erreur de chargement des statistiques"}):A?s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{className:"text-center",children:[s.jsx($e,{width:"w-16",height:"h-8",rounded:"rounded",className:"mx-auto mb-2"}),s.jsx("div",{className:"text-sm text-gray-600",children:"Filleuls directs"}),s.jsx($e,{width:"w-20",height:"h-3",rounded:"rounded",className:"mx-auto mt-1"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx($e,{width:"w-16",height:"h-8",rounded:"rounded",className:"mx-auto mb-2"}),s.jsx("div",{className:"text-sm text-gray-600",children:"Filleuls indirects"}),s.jsx($e,{width:"w-20",height:"h-3",rounded:"rounded",className:"mx-auto mt-1"})]})]}),s.jsxs("div",{className:"grid grid-cols-3 gap-3 pt-3 border-t border-border",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"flex items-center justify-center mb-1",children:s.jsx(L,{icon:wn,className:"text-gray-300 mr-1",size:12})}),s.jsx($e,{width:"w-12",height:"h-6",rounded:"rounded",className:"mx-auto mb-1"}),s.jsx("div",{className:"text-xs text-gray-500",children:"Total"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"flex items-center justify-center mb-1",children:s.jsx(L,{icon:aw,className:"text-gray-300 mr-1",size:12})}),s.jsx($e,{width:"w-12",height:"h-6",rounded:"rounded",className:"mx-auto mb-1"}),s.jsx("div",{className:"text-xs text-gray-500",children:"Abonnés"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"flex items-center justify-center mb-1",children:s.jsx(L,{icon:zk,className:"text-gray-300 mr-1",size:12})}),s.jsx($e,{width:"w-10",height:"h-6",rounded:"rounded",className:"mx-auto mb-1"}),s.jsx("div",{className:"text-xs text-gray-500",children:"Taux"})]})]})]}):s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"text-2xl font-bold text-green-600",children:((H=j==null?void 0:j.direct)==null?void 0:H.toLocaleStr
282ing())??"0"}),s.jsx("div",{className:"text-sm text-gray-600",children:"Filleuls directs"}),s.jsx("div",{className:"text-xs text-green-600 font-medium",children:`${(j==null?void 0:j.level1ActiveSubscribers)??0} abonnés`})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"text-2xl font-bold text-blue-600",children:((te=j==null?void 0:j.indirect)==null?void 0:te.toLocaleString())??"0"}),s.jsx("div",{className:"text-sm text-gray-600",children:"Filleuls indirects"}),s.jsx("div",{className:"text-xs text-blue-600 font-medium",children:`${((j==null?void 0:j.level2ActiveSubscribers)??0)+((j==null?void 0:j.level3ActiveSubscribers)??0)} abonnés`})]})]}),s.jsxs("div",{className:"grid grid-cols-3 gap-3 pt-3 border-t border-border",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"flex items-center justify-center mb-1",children:s.jsx(L,{icon:wn,className:"text-gray-500 mr-1",size:12})}),s.jsx("div",{className:"text-lg font-semibold text-gray-800",children:((ne=j==null?void 0:j.total)==null?void 0:ne.toLocaleString())??"0"}),s.jsx("div",{className:"text-xs text-gray-500",children:"Total"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"flex items-center justify-center mb-1",children:s.jsx(L,{icon:aw,className:"text-green-500 mr-1",size:12})}),s.jsx("div",{className:"text-lg font-semibold text-green-600",children:((Y=j==null?void 0:j.totalActiveSubscribers)==null?void 0:Y.toLocaleString())??"0"}),s.jsx("div",{className:"text-xs text-gray-500",children:"Abonnés"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"flex items-center justify-center mb-1",children:s.jsx(L,{icon:zk,className:"text-purple-500 mr-1",size:12})}),s.jsx("div",{className:"text-lg font-semibold text-purple-600",children:`${j!=null&&j.totalActiveSubscribers&&(j!=null&&j.total)?Math.round(j.totalActiveSubscribers/j.total*100):0}%`}),s.jsx("div",{className:"text-xs text-gray-500",children:"Taux"})]})]})]})}),A?s.jsxs("div",{className:"bg-white rounded-xl p-4 border border-border",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx($e,{width:"w-32",height:"h-6",rounded:"rounded"}),s.jsx($e,{width:"w-20",height:"h-4",rounded:"rounded"})]}),s.jsx($e,{width:"w-full",height:"h-32",rounded:"rounded"})]}):(j==null?void 0:j.monthlyData)&&j.monthlyData.length>0&&s.jsx(z,{monthlyData:j.monthlyData}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex bg-gray-100 rounded-lg p-1",children:[s.jsx("button",{className:`px-3 py-2 rounded-md text-sm font-medium transition-all ${r==="direct"?"bg-white text-green-600":"text-gray-600 hover:text-gray-900"} border border-border`,onClick:()=>n("direct"),children:s.jsxs("div",{className:"flex flex-col items-center",children:[s.jsx("span",{children:"Direct"}),s.jsx("span",{className:"text-xs",children:A||t?"...":`${(j==null?void 0:j.direct)??0}
282 (${(j==null?void 0:j.level1ActiveSubscribers)??0})`})]})}),s.jsx("button",{className:`px-3 py-2 rounded-md text-sm font-medium transition-all ${r==="indirect"?"bg-white text-blue-600":"text-gray-600 hover:text-gray-900"} border border-border`,onClick:()=>n("indirect"),children:s.jsxs("div",{className:"flex flex-col items-center",children:[s.jsx("span",{children:"Indirect"}),s.jsx("span",{className:"text-xs",children:A||t?"...":`${(j==null?void 0:j.indirect)??0} (${((j==null?void 0:j.level2ActiveSubscribers)??0)+((j==null?void 0:j.level3ActiveSubscribers)??0)})`})]})})]}),s.jsxs("button",{className:"flex items-center gap-2 bg-white border border-border rounded-lg px-3 py-2 text-gray-700 hover:bg-gray-50 transition-colors",onClick:()=>a(!0),children:[s.jsx(L,{icon:sw,className:"text-gray-500",size:14}),s.jsx("span",{className:"text-sm",children:"Filtrer"})]})]}),m!=="undefined"&&s.jsx("div",{className:"bg-blue-50 border border-border rounded-lg p-3",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("span",{className:"text-sm text-blue-800",children:["Filtre actif: ",R(m)]}),s.jsx("button",{onClick:()=>p("undefined"),className:"text-blue-600 hover:text-blue-800 text-sm font-medium",children:"Supprimer"})]})}),i&&s.jsx("div",{className:"fixed inset-0 z-50 flex items-end sm:items-center justify-center bg-black bg-opacity-50",children:s.jsx("div",{className:"bg-white rounded-t-2xl sm:rounded-2xl w-full sm:w-96 max-w-md border border-border",children:s.jsxs("div",{className:"p-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Filtrer par abonnement"}),s.jsx("button",{onClick:()=>a(!1),className:"text-gray-400 hover:text-gray-600",children:s.jsx(L,{icon:gt,size:20})})]}),s.jsx("div",{className:"space-y-2",children:[{value:"undefined",label:"Tous les filleuls",icon:"👥"},{value:"all",label:"Tous abonnés",icon:"✅"},{value:"CLASSIQUE",label:"Abonnés CLASSIQUE",icon:"🥉"},{value:"CIBLE",label:"Abonnés CIBLÉ",icon:"🎯"},{value:"none",label:"Non abonnés",icon:"❌"}].map(J=>s.jsxs("button",{className:`w-full flex items-center gap-3 p-3 rounded-lg border transition-colors ${m===J.value?"bg-green-50 border-border text-green-800":"bg-white border-border text-gray-700 hover:bg-gray-50"}`,onClick:()=>{p(J.value),a(!1)},children:[s.jsx("span",{className:"text-lg",children:J.icon}),s.jsx("span",{className:"font-medium",children:J.label}),m===J.value&&s.jsx("span",{className:"ml-auto text-green-600",children:"✓"})]},J.value))})]})})}),B&&!O&&W.length===0?s.jsx("div",{className:"space-y-3",children:[...Array(5)].map((J,oe)=>s.jsxs("div",{className:"bg-white rounded-xl p-4 flex items-center gap-3",children:[s.jsx($e,{width:"w-12",height:"h-12",rounded:"rounded-full"}),s.jsxs("div",{className:"flex-1 space-y-2",children:[s.jsx($e,{width:"w-32",height:"h-4",rounded:"rounded"}),s.jsx($e,{width:"w-24",height:"h-3",rounded:"rounded"})]}),s.jsx($e,{width:"w-10",height:"h-10",rounded:"rounded-full"})]},oe))}):s.jsx(Z.div,{variants:Dl,initial:"hidden",animate:"show",className:"space-y-3",children:W.length>0?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"text-sm text-gray-600 mb-3",children:[_," ",_===1?"filleul trouvé":"filleuls trouvés"]}),W.map((J,oe)=>s.jsx(Z.div,{variants:qn,ref:oe===W.length-1?I:null,className:"bg-white rounded-xl p-4 transition-shadow border border-border",children:s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsxs("div",{className:"relative",children:[s.jsx(gW,{src:J.avatar||J.avatarId,alt:J.name,size:48,className:"rounded-full"}),J.activeSubscriptions&&J.activeSubscriptions.length>0&&s.jsx("div",{className:"absolute -top-1 -right-1 w-4 h-4 bg-green-500 rounded-full border-2 border-white"})]}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"font-medium text-gray-900 truncate",children:J.name}),s.jsx("div",{className:"text-sm text-gray-500",children:J.phoneNumber}),J.activeSubscriptions&&J.activeSubscriptions.length>0&&s.jsx("div",{className:"flex gap-1 mt-1",children:J.activeSubscriptions.map((he,Q)=>s.jsx("span",{className:`text-xs px-2 py-1 rounded-full ${he==="CLASSIQUE"?"bg-blue-100 text-blue-800":"bg-purple-100 text-purple-800"}`,children:he},Q))})]}),s.jsx("a",{href:`https://wa.me/${String(J.phoneNumber||"").replace(/[^\d]/g,"")}/?text=${encodeURIComponent(m8e)}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center w-12 h-12 bg-green-500 hover:bg-green-600 text-white rounded-full transition-colors",title:"Contacter sur WhatsApp",children:s.jsx(L,{icon:nu,size:20})})]})},J._id)),O&&s.jsx("div",{className:"flex justify-center items-center py-6",children:s.jsxs("div",{className:"flex items-center gap-2 text-gray-600",children:[s.jsxs("svg",{className:"animate-spin h-5 w-5",viewBox:"0 0 24 24",children:[s.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),s.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]}),s.jsx("span",{className:"text-sm",children:"Chargement..."})]})})]}):s.jsxs("div",{className:"bg-white rounded-xl p-8 text-center",children:[s.jsx("div",{className:"text-gray-400 text-4xl mb-4",children:"👥"}),s.jsx("div",{className:"text-gray-600 font-medium mb-2",children:"Aucun filleul trouvé"}),s.jsx("div",{className:"text-gray-500 text-sm",children:f?"Essayez avec un autre terme de recherche":"Vous n'avez pas encore de filleuls dans cette catégorie"})]})})]})]})}function g8e({entry:e,leaderCount:t,index:r}){const n=t>0?Math.min(100,Math.round(e.referralCount/t*100)):0,i=xy(e.referralCount);return s.jsxs(Z.li,{initial:{opacity:0,y:8}
282,animate:{opacity:1,y:0},transition:{delay:Math.min(r*.04,.3)},className:"bg-surface border border-border rounded-card p-3 flex items-center gap-3",children:[s.jsxs("span",{className:"text-xs font-semibold text-ink-3 w-6 shrink-0",children:["#",e.rank]}),s.jsx(dz,{entry:e,size:36,className:"shrink-0"}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[s.jsxs("p",{className:"text-sm font-semibold text-ink truncate flex items-center gap-1.5 min-w-0",children:[s.jsx("span",{className:"truncate",children:e.name}),s.jsx("span",{className:"font-normal shrink-0",children:Sd(e.country)}),i&&s.jsx("span",{className:mt("shrink-0 text-[9px] font-bold uppercase tracking-wide px-1.5 py-0.5 rounded-pill",i.tint),children:i.label})]}),s.jsxs("p",{className:"text-sm font-semibold text-success shrink-0",children:[e.referralCount," filleuls"]})]}),s.jsx("div",{className:"mt-1.5 h-1.5 rounded-pill bg-surface-2 overflow-hidden",children:s.jsx(Z.div,{initial:{width:0},animate:{width:`${n}%`},transition:{duration:.5,ease:"easeOut"},className:"h-full rounded-pill bg-primary"})}),s.jsxs("div",{className:"mt-1 flex items-center justify-between gap-2",children:[s.jsx("p",{className:"text-[11px] text-ink-3 truncate",children:e.city??""}),s.jsx("p",{className:"text-[11px] font-semibold text-accent shrink-0",children:Yx(e.earnings)})]})]})]})}const y8e=e=>`${e.toLocaleString("fr-FR")} FCFA`;function v8e({mySales:e}){const t=typeof e=="number"?xy(e):null,r=typeof e=="number"?Pse(e):null;return s.jsxs("section",{className:"flex flex-col gap-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(L,{icon:$k,size:18,className:"text-accent"}),s.jsx("h2",{className:"text-base font-bold text-ink",children:"Système de récompense"})]}),s.jsxs("p",{className:"text-xs text-ink-3 -mt-1",children:["Les badges se gagnent sur vos ventes du mois. Le bonus est versé sur votre",s.jsx("strong",{className:"font-semibold text-ink-2",children:" solde d'activation"}),", pour activer vos filleuls."]}),s.jsx("ul",{className:"flex flex-col gap-2 mt-1",children:Zx.map(n=>{const i=(t==null?void 0:t.key)===n.key;return s.jsxs("li",{className:mt("bg-surface rounded-card border p-3 flex items-center gap-3",i?"border-primary":"border-border"),children:[s.jsx("span",{className:mt("shrink-0 size-10 grid place-items-center rounded-tile",n.tint),children:s.jsx(L,{icon:$k,size:20})}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsxs("span",{className:"flex items-center gap-1.5 flex-wrap",children:[s.jsx("span",{className:"font-semibold text-ink text-sm",children:n.label}),i&&s.jsx("span",{className:"text-[9px] font-bold uppercase tracking-wide px-1.5 py-0.5 rounded-pill bg-primary text-white",children:"Votre badge"})]}),s.jsxs("span",{className:"block text-xs text-ink-3",children:[n.minSales," ventes / mois"]})]}),s.jsxs("span",{className:"shrink-0 text-right",children:[s.jsx("span",{className:"block text-sm font-bold text-success",children:y8e(n.bonusXaf)}),n.extra&&s.jsxs("span",{className:"block text-[11px] text-ink-2 flex items-center gap-1 justify-end",children:[s.jsx(L,{icon:Al,size:11,className:"text-accent"}),n.extra]})]})]},n.key)})}),r&&s.jsxs("p",{className:"text-xs text-ink-2 bg-primary-soft rounded-card p-3 mt-1",children:["Encore ",s.jsxs("span",{className:"font-bold text-primary",children:[r.remaining," vente",r.remaining>1?"s":""]})," ","ce mois pour décrocher ",s.jsx("span",{className:"font-bold text-primary",children:r.tier.label}),"."]})]})}function b8e({me:e,name:t}){if(e.inTop)return null;const r=xy(e.referralCount),n=e.referralCount===0;return s.jsxs(Z.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},className:"sticky bottom-2 bg-primary text-white rounded-card p-3 flex items-center gap-3",children:[s.jsx("span",{className:"shrink-0 size-9 grid place-items-center rounded-tile bg-white/15",children:s.jsx(L,{icon:u0,size:18})}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsx("span",{className:"block text-sm font-semibold truncate",children:t?`${t} — vous`:"Votre position"}),s.jsx("span",{className:"block text-[11px] text-white/80",children:n?"Aucun filleul direct payé ce mois-ci":`${e.referralCount} filleul${e.referralCount>1?"s":""} payé${e.referralCount>1?"s":""} · sur ${e.totalRanked} classés`})]}),r&&s.jsx("span",{className:mt("shrink-0 text-[9px] font-bold uppercase tracking-wide px-1.5 py-0.5 rounded-pill",r.tint),children:r.label}),s.jsx("span",{className:"shrink-0 text-right",children:s.jsx("span",{className:"block text-lg font-bold leading-none tabular-nums",children:n?"—":`#${e.rank}`})})]})}const C8e=new Intl.DisplayNames(["fr"],{type:"region"}),sf=e=>{try{return C8e.of(e)??e}catch{return e}};function w8e({countries:e,selected:t,onSelect:r}){var a;const n=Ph(),i=((a=e[0])==null?void 0:a.referralCount)??0;return s.jsx("ul",{className:"flex flex-col gap-2","aria-label":"Classement des pays",children:e.map((o,l)=>{const c=o.rank===1,u=o.country===t,f=i>0?Math.max(4,Math.round(o.referralCount/i*100)):0;return s.jsx(Z.li,{initial:n?{opacity:0}
282:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.2,delay:Math.min(l*.03,.24)},children:s.jsxs("button",{type:"button",onClick:()=>r(o.country),"aria-pressed":u,className:mt("w-full text-left rounded-card border p-3 flex items-center gap-3 transition-colors duration-150","focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary",c?"bg-primary-soft":"bg-surface",u?"border-primary":"border-border"),children:[s.jsx("span",{className:mt("shrink-0 size-7 rounded-pill grid place-items-center text-xs font-bold tabular-nums",c?"bg-accent text-white":"bg-surface-2 text-ink-2"),children:c?s.jsx(L,{icon:Ng,size:14}):o.rank}),s.jsx("span",{className:"text-2xl leading-none shrink-0","aria-hidden":!0,children:Sd(o.country)}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsxs("span",{className:"flex items-baseline justify-between gap-2",children:[s.jsx("span",{className:"text-sm font-semibold text-ink truncate",children:sf(o.country)}),s.jsxs("span",{className:"text-sm font-bold text-ink shrink-0 tabular-nums",children:[o.referralCount.toLocaleString("fr-FR"),s.jsx("span",{className:"ml-1 text-[11px] font-normal text-ink-2",children:"filleuls"})]})]}),s.jsx("span",{className:"mt-1.5 block h-1.5 rounded-pill bg-surface-2 overflow-hidden",children:s.jsx(Z.span,{className:mt("block h-full rounded-pill",c?"bg-accent":"bg-primary"),initial:{width:n?`${f}%`:0},animate:{width:`${f}%`},transition:{duration:n?0:.5,ease:[.25,1,.5,1]}})}),s.jsxs("span",{className:"mt-1 block text-[11px] text-ink-2",children:[o.affiliates.toLocaleString("fr-FR")," affilié",o.affiliates>1?"s":""," classé",o.affiliates>1?"s":""]})]})]})},o.country)})})}function E8e({countries:e,selected:t,onSelect:r}){const n=Ph(),i=C.useRef(null),a=C.useRef(new Map);return C.useEffect(()=>{const o=i.current,l=t?a.current.get(t):void 0;!o||!l||o.scrollTo({left:l.offsetLeft-(o.clientWidth-l.offsetWidth)/2,behavior:n?"auto":"smooth"})},[t,n]),s.jsx("div",{ref:i,role:"radiogroup","aria-label":"Choisir un pays",className:"no-scrollbar relative -mx-4 px-4 flex gap-2 overflow-x-auto",children:e.map(o=>{const l=o.country===t;return s.jsxs("button",{ref:c=>{c?a.current.set(o.country,c):a.current.delete(o.country)},type:"button",role:"radio","aria-checked":l,onClick:()=>r(o.country),className:mt("shrink-0 inline-flex items-center gap-1.5 rounded-pill border px-3 py-1.5 text-sm whitespace-nowrap","transition-colors duration-150 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary",l?"bg-primary border-primary text-white font-semibold":"bg-surface border-border text-ink hover:bg-surface-2"),children:[s.jsx("span",{"aria-hidden":!0,children:Sd(o.country)}),sf(o.country)]},o.country)})})}const j8e=[{key:"general",label:"Général"},{key:"countries",label:"Par pays"},{key:"filleuls",label:"Mes filleuls"}],HO={general:{title:"Classement Général",icon:u0},countries:{title:"Classement par pays",icon:w$},filleuls:{title:"Top de mes filleuls",icon:wn}};function pC({entries:e}){const t=e.slice(3);return s.jsxs(s.Fragment,{children:[s.jsx(xz,{entries:e}),t.length>0&&s.jsx("ul",{className:"flex flex-col gap-2 mt-2",children:t.map((r,n)=>s.jsx(g8e,{entry:r,leaderCount:e[0].referralCount,index:n},r.userId))})]})}function N8e(){var A,w,S,B,D;const{user:e}=Gt(),t=lt(),[r]=I4(),[n,i]=C.useState(()=>{const P=r.get("tab");return P==="countries"||P==="filleuls"?P:"general"}),[a,o]=C.useState(null),l=C.useRef(null),c=Ph(),u=fz(),f=Mse(n==="countries"),x=Ose(n==="filleuls"),m=((A=u.data)==null?void 0:A.top)??[],p=((w=u.data)==null?void 0:w.me)??null,y=((S=f.data)==null?void 0:S.countries)??[],v=C.useMemo(()=>{var O;if(a)return a;const P=((e==null?void 0:e.country)??"").trim().toUpperCase();return y.some(M=>M.country===P)?P:((O=y[0])==null?void 0:O.country)??null},[a,e==null?void 0:e.country,y]),b=v?((B=f.data)==null?void 0:B.byCountry[v])??[]:[],E=y[0],N=y[1],j=P=>{var O;o(P),(O=l.current)==null||O.scrollIntoView({behavior:c?"auto":"smooth",block:"start"})};return s.jsx(nn,{children:s.jsxs("div",{className:"p-4 flex flex-col gap-4",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Ct,{}),s.jsxs("div",{children:[s.jsxs("h1",{className:"text-xl font-bold text-ink flex items-center gap-2",children:[HO[n].title,s.jsx(L,{icon:HO[n].icon,size:20,className:"text-accent"})]}),s.jsx("p",{className:"text-xs text-ink-2",children:"Filleuls directs qui ont payé ce mois-ci"})]})]}),s.jsx("div",{role:"tablist","aria-label":"Type de classement",className:"flex gap-1 bg-surface-2 rounded-pill p-1",children:j8e.map(P=>s.jsx("button",{role:"tab","aria-selected":n===P.key,onClick:()=>i(P.key),className:`flex-1 rounded-pill py-2 text-sm font-medium transition-colors duration-150 ${n===P.key?"bg-surface text-ink":"text-ink-2"}`,children:P.label},P.key))}),n==="filleuls"?x.isLoading?s.jsx(rg,{rows:5}):x.error?s.jsx(ng,{onRetry:()=>x.refetch()}):(((D=x.data)==null?void 0:D.top.length)??0)===0?s.jsxs("div",{className:"bg-surface border border-border rounded-card p-6 text-center flex flex-col items-center gap-2",children:[s.jsx(L,{icon:wn,size:32,className:"text-ink-3"}),s.jsx("p",{className:"text-sm font-semibold text-ink",children:"Aucun de vos filleuls n'a encore parrainé ce mois-ci"}),s.jsx("p",{className:"text-xs text-ink-2 max-w-xs text-pretty",children:"Dès qu'un f
282illeul direct fait payer un de ses propres filleuls, il apparaît ici. Encouragez-les à partager leur lien."}),s.jsx("button",{onClick:()=>t("/filleuls"),className:"mt-2 rounded-pill bg-primary px-4 py-2 text-sm font-semibold text-white",children:"Voir mes filleuls"})]}):s.jsxs(s.Fragment,{children:[s.jsxs("p",{className:"text-sm text-ink bg-primary-soft rounded-card p-3 text-pretty",children:["Vos filleuls directs les plus actifs ce mois, classés par leurs propres filleuls payés."," ",s.jsx("strong",{className:"font-semibold tabular-nums",children:x.data.totalRanked})," ",x.data.totalRanked>1?"sont classés":"est classé","."]}),s.jsx(pC,{entries:x.data.top})]}):n==="general"?u.isLoading?s.jsx(rg,{rows:7}):u.error?s.jsx(ng,{onRetry:()=>u.refetch()}):m.length===0?s.jsx(jw,{referralCode:e==null?void 0:e.referralCode}):s.jsxs(s.Fragment,{children:[s.jsx(pC,{entries:m}),p&&s.jsx(b8e,{me:p,name:e==null?void 0:e.name})]}):f.isLoading?s.jsx(rg,{rows:5}):f.error?s.jsx(ng,{onRetry:()=>f.refetch()}):y.length===0?s.jsx(jw,{referralCode:e==null?void 0:e.referralCode}):s.jsxs(s.Fragment,{children:[E&&s.jsxs("p",{className:"text-sm text-ink bg-accent-soft rounded-card p-3",children:[s.jsx("span",{className:"mr-1","aria-hidden":!0,children:Sd(E.country)}),s.jsx("strong",{className:"font-semibold",children:sf(E.country)})," mène le classement ce mois avec ",s.jsx("strong",{className:"font-semibold tabular-nums",children:E.referralCount.toLocaleString("fr-FR")})," filleuls",N&&s.jsxs(s.Fragment,{children:[", ",s.jsx("span",{className:"tabular-nums",children:(E.referralCount-N.referralCount).toLocaleString("fr-FR")})," de plus que ",sf(N.country)]}),"."]}),s.jsx(w8e,{countries:y,selected:v,onSelect:j}),v&&s.jsxs("section",{ref:l,className:"flex flex-col gap-3 mt-2 scroll-mt-24",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-base font-bold text-ink",children:"Les meilleurs par pays"}),s.jsx("p",{className:"text-xs text-ink-2",children:"Choisissez un pays pour voir ses 10 meilleurs affiliés du mois."})]}),s.jsx(E8e,{countries:y,selected:v,onSelect:o}),s.jsxs("div",{className:"flex flex-col gap-1","aria-live":"polite",children:[s.jsxs("h3",{className:"text-sm font-semibold text-ink flex items-center gap-2",children:[s.jsx("span",{"aria-hidden":!0,children:Sd(v)}),"Top 10 · ",sf(v)]}),b.length>0?s.jsx(pC,{entries:b},v):s.jsx("p",{className:"text-sm text-ink-2 mt-2",children:"Aucun affilié classé dans ce pays ce mois-ci."})]})]})]}),s.jsx(v8e,{mySales:p==null?void 0:p.referralCount}),s.jsxs("p",{className:"text-[11px] text-ink-2 text-center",children:["Classement mis à jour chaque heure, remis à zéro le 1",s.jsx("sup",{children:"er"})," de chaque mois. Les montants affichés sont une estimation."]})]})})}const A8e=[{test:/market/i,icon:Pc,tint:"bg-primary-soft text-primary"},{test:/trad|indice|bourse|forex/i,icon:g$,tint:"bg-success-soft text-success"},{test:/orat|parole|discours/i,icon:Nre,tint:"bg-accent-soft text-accent"},{test:/bot|whatsapp/i,icon:sre,tint:"bg-success-soft text-success"},{test:/\bchine\b|import/i,icon:w$,tint:"bg-danger-soft text-danger"},{test:/\bia\b|intelligence|creator/i,icon:Jte,tint:"bg-primary-soft text-primary"},{test:/cash|argent|revenu/i,icon:v$,tint:"bg-accent-soft text-accent"},{test:/revente|digit|produit/i,icon:Ore,tint:"bg-primary-soft text-primary"}],k8e=e=>A8e.find(t=>t.test.test(e))??{icon:jg,tint:"bg-surface-2 text-ink-2"},S8e=e=>/t\.me|telegram/i.test(e)?"Groupe Telegram":/youtu/i.test(e)?"Vidéos YouTube":/wa\.me|whatsapp/i.test(e)?"Groupe WhatsApp":"Lien externe",B8e={CLASSIQUE:"Pack Classique",CIBLE:"Pack Ciblé"},D8e=/\b(ia|sbc|pdf|tiktok)\b/gi,F8e=e=>e===e.toUpperCase()&&/[A-ZÀ-Ý]{3}/.test(e)?(e.charAt(0)+e.slice(1).toLowerCase()).replace(D8e,t=>t.toLowerCase()==="tiktok"?"TikTok":t.toUpperCase()):e,GO=e=>e.normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").toLowerCase();function P8e({decoration:e}){return e==="new"?s.jsx("span",{className:"shrink-0 rounded-pill bg-primary-soft px-1.5 py-0.5 text-[10px] font-semibold text-primary",children:"Nouveau"}):e==="orange"||e==="gold"?s.jsxs("span",{className:"shrink-0 inline-flex items-center gap-1 rounded-pill bg-accent-soft px-1.5 py-0.5 text-[10px] font-semibold text-ink",children:[s.jsx("span",{className:"size-1.5 rounded-pill bg-accent","aria-hidden":!0}),"À la une"]}):null}function T8e({formation:e,index:t}){const r=lt(),n=Ph(),{icon:i,tint:a}=k8e(e.title),o=!!e.locked,l=e.decoration==="orange"||e.decoration==="gold",c=F8e(e.title),u=s.jsxs(s.Fragment,{children:[s.jsx("span",{className:mt("size-11 shrink-0 grid place-items-center rounded-tile",o?"bg-surface-2 text-ink-3":a),children:s.jsx(L,{icon:i,size:22})}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsxs("span",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:mt("truncate text-sm font-semibold",o?"text-ink-2":"text-ink"),children:c}),s.jsx(P8e,{decoration:e.decoration})]}),s.jsx("span",{className:"mt-0.5 block truncate text-xs text-ink-2",children:o?`Réservée au ${B8e[e.requiredSubscriptionType??"CIBLE"]} · Débloquer`:S8e(e.link)})]}),s.jsx("span",{className:"size-8 shrink-0 grid place-items-center rounded-pill bg-surface-2 text-ink-2","aria-hidden":!0,
282children:s.jsx(L,{icon:o?Vc:rre,size:16})})]}),f=mt("w-full text-left bg-surface border rounded-card p-3 flex items-center gap-3 transition-colors duration-150","hover:bg-surface-2 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary",l&&!o?"border-accent":"border-border");return s.jsx(Z.li,{initial:n?{opacity:0}:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.2,delay:Math.min(t*.035,.28)},children:o?s.jsx("button",{type:"button",onClick:()=>r("/abonnement"),className:f,children:u}):s.jsxs("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:f,children:[u,s.jsx("span",{className:"sr-only",children:" (s'ouvre dans un nouvel onglet)"})]})})}function M8e(){const{data:e=[],isLoading:t,error:r,refetch:n}=nV(),[i,a]=C.useState(""),o=e.filter(c=>!c.locked).length,l=C.useMemo(()=>{const c=GO(i.trim());return c?e.filter(u=>GO(u.title).includes(c)):e},[e,i]);return s.jsx(nn,{children:s.jsxs("div",{className:"min-h-screen bg-bg px-4 pt-3 pb-6 flex flex-col gap-4",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Ct,{}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("h1",{className:"text-xl font-bold text-ink",children:"Formations disponibles"}),s.jsx("p",{className:"text-xs text-ink-2",children:t?"Chargement…":`${e.length} formation${e.length>1?"s":""} · Accès à vie`})]})]}),s.jsxs("label",{className:"relative block",children:[s.jsx("span",{className:"sr-only",children:"Rechercher une formation"}),s.jsx(L,{icon:vo,size:18,className:"pointer-events-none absolute left-3.5 top-1/2 -translate-y-1/2 text-ink-3"}),s.jsx("input",{type:"search",value:i,onChange:c=>a(c.target.value),placeholder:"Rechercher une formation…",className:"w-full rounded-card border border-border bg-surface py-3 pl-10 pr-10 text-sm text-ink placeholder:text-ink-3 focus:outline-none focus:border-primary focus:ring-2 focus:ring-primary-soft [&::-webkit-search-cancel-button]:hidden"}),i&&s.jsx("button",{type:"button",onClick:()=>a(""),"aria-label":"Effacer la recherche",className:"absolute right-2 top-1/2 -translate-y-1/2 size-8 grid place-items-center rounded-pill text-ink-2 hover:bg-surface-2",children:s.jsx(L,{icon:gt,size:16})})]}),s.jsxs("section",{className:"rounded-card bg-primary p-4 text-white flex items-start gap-3",children:[s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("h2",{className:"text-lg font-bold leading-snug text-white text-balance",children:"Boostez vos compétences"}),s.jsx("p",{className:"mt-1 text-sm text-white/85 text-pretty",children:"Accès illimité à toutes les formations de votre pack, à votre rythme."}),s.jsxs("span",{className:"mt-3 inline-flex items-center gap-2 rounded-pill bg-surface px-3 py-1.5 text-xs font-semibold text-primary",children:[s.jsx("span",{className:"size-2 rounded-pill bg-success-dot","aria-hidden":!0}),t?"Chargement…":`${o} formation${o>1?"s":""} active${o>1?"s":""}`]})]}),s.jsx("span",{className:"size-14 shrink-0 grid place-items-center rounded-tile bg-white/15","aria-hidden":!0,children:s.jsx(L,{icon:jg,size:28})})]}),t?s.jsx("div",{className:"flex flex-col gap-2",children:Array.from({length:6}).map((c,u)=>s.jsx($e,{height:"h-[70px]",rounded:"rounded-card"},u))}):r?s.jsxs("div",{className:"bg-surface border border-border rounded-card p-5 text-center flex flex-col items-center gap-2",children:[s.jsx(L,{icon:Nl,size:26,className:"text-danger"}),s.jsx("p",{className:"text-sm font-semibold text-ink",children:"Impossible d'afficher les formations"}),s.jsx("button",{onClick:()=>n(),className:"mt-1 rounded-pill bg-primary px-4 py-2 text-sm font-semibold text-white",children:"Réessayer"})]}):e.length===0?s.jsxs("div",{className:"bg-surface border border-border rounded-card p-6 text-center flex flex-col items-center gap-2",children:[s.jsx(L,{icon:jg,size:30,className:"text-ink-3"}),s.jsx("p",{className:"text-sm font-semibold text-ink",children:"Aucune formation pour le moment"}),s.jsx("p",{className:"text-xs text-ink-2",children:"Les nouvelles formations apparaîtront ici dès leur publication."})]}):s.jsxs("section",{className:"flex flex-col gap-2","aria-label":"Liste des formations",children:[s.jsxs("div",{className:"flex items-center justify-between px-1",children:[s.jsxs("p",{className:"text-xs text-ink-2","aria-live":"polite",children:[l.length," formation",l.length>
2821?"s":""," trouvée",l.length>1?"s":""]}),s.jsx("p",{className:"text-xs font-semibold text-ink-3",children:"SBC Academy"})]}),l.length===0?s.jsxs("div",{className:"bg-surface border border-border rounded-card p-5 text-center flex flex-col items-center gap-2",children:[s.jsxs("p",{className:"text-sm text-ink",children:["Aucune formation ne correspond à « ",i.trim()," »."]}),s.jsx("button",{onClick:()=>a(""),className:"text-sm font-semibold text-primary",children:"Effacer la recherche"})]}):s.jsx("ul",{className:"flex flex-col gap-2",children:l.map((c,u)=>s.jsx(T8e,{formation:c,index:u},c._id))})]})]})})}const EW="pwa-install-dismissed-at",O8e=14*24*60*60*1e3,L8e=()=>window.matchMedia("(display-mode: standalone)").matches||window.navigator.standalone===!0,R8e=()=>/iphone|ipad|ipod/i.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,_8e=()=>{try{const e=Number(localStorage.getItem(EW)??0);return e>0&&Date.now()-e<O8e}catch{return!1}};function I8e(){const[e,t]=C.useState(null),[r,n]=C.useState(L8e),[i,a]=C.useState(_8e);C.useEffect(()=>{const f=m=>{m.preventDefault(),t(m)},x=()=>{n(!0),t(null)};return window.addEventListener("beforeinstallprompt",f),window.addEventListener("appinstalled",x),()=>{window.removeEventListener("beforeinstallprompt",f),window.removeEventListener("appinstalled",x)}},[]);const o=async()=>{if(!e)return"unavailable";await e.prompt();const{outcome:f}=await e.userChoice;return t(null),f==="accepted"&&n(!0),f},l=()=>{try{localStorage.setItem(EW,String(Date.now()))}catch{}a(!0)},c=R8e();return{canShow:!r&&!i&&(!!e||c),isIos:c,canPromptNatively:!!e,install:o,dismiss:l,installed:r}}function $8e(){const{canShow:e,isIos:t,canPromptNatively:r,install:n,dismiss:i}=I8e(),[a,o]=C.useState(!1);return e?s.jsxs(s.Fragment,{children:[s.jsx(It,{children:s.jsxs(Z.div,{initial:{y:80,opacity:0},animate:{y:0,opacity:1},exit:{y:80,opacity:0},transition:{type:"spring",stiffness:260,damping:26},className:"fixed bottom-24 left-4 right-4 z-50 bg-surface border border-border rounded-card p-3 flex items-center gap-3",role:"dialog","aria-label":"Installer l'application",children:[s.jsx("img",{src:"/pwa-192.png",alt:"","aria-hidden":!0,className:"size-11 rounded-tile shrink-0"}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("p",{className:"font-semibold text-ink text-sm",children:"Installer SBC"}),s.jsx("p",{className:"text-xs text-ink-3",children:"Ajoutez l'app à votre écran d'accueil, sans passer par le navigateur."})]}),s.jsxs("button",{onClick:()=>r?n():o(!0),className:"shrink-0 bg-primary text-white text-sm font-semibold rounded-pill px-3.5 py-2 flex items-center gap-1.5",children:[s.jsx(L,{icon:eu,size:15}),"Installer"]}),s.jsx("button",{onClick:i,"aria-label":"Plus tard",className:"shrink-0 text-ink-3 p-1",children:s.jsx(L,{icon:gt,size:16})})]})}),s.jsx(It,{children:a&&t&&s.jsx(Z.div,{className:"fixed inset-0 z-[60] flex items-end justify-center bg-black/40 p-4",initial:{opacity:0}
282,animate:{opacity:1},exit:{opacity:0},onClick:()=>o(!1),children:s.jsxs(Z.div,{onClick:l=>l.stopPropagation(),initial:{y:40,opacity:0},animate:{y:0,opacity:1},exit:{y:40,opacity:0},className:"w-full max-w-md bg-surface border border-border rounded-card p-5 mb-20",children:[s.jsxs("div",{className:"flex items-start justify-between gap-3 mb-3",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"font-bold text-ink",children:"Ajouter SBC à l'écran d'accueil"}),s.jsx("p",{className:"text-xs text-ink-3 mt-0.5",children:"Sur iPhone, en 3 étapes depuis Safari."})]}),s.jsx("button",{onClick:()=>o(!1),"aria-label":"Fermer",className:"text-ink-3",children:s.jsx(L,{icon:gt,size:18})})]}),s.jsx("ol",{className:"flex flex-col gap-3",children:[{n:1,icon:tu,text:"Touchez le bouton Partager, en bas de Safari."},{n:2,icon:kl,text:"Faites défiler et choisissez « Sur l'écran d'accueil »."},{n:3,icon:Mn,text:"Touchez « Ajouter ». L'icône SBC apparaît sur votre écran."}].map(l=>s.jsxs("li",{className:"flex items-start gap-3",children:[s.jsx("span",{className:"shrink-0 size-7 grid place-items-center rounded-pill bg-primary text-white text-xs font-bold",children:l.n}),s.jsxs("span",{className:"flex items-center gap-2 text-sm text-ink-2 pt-0.5",children:[s.jsx(L,{icon:l.icon,size:16,className:"text-primary shrink-0"}),l.text]})]},l.n))}),s.jsx("p",{className:"mt-4 text-[11px] text-ink-3",children:"Cette option n'existe que dans Safari. Depuis Chrome ou Firefox sur iPhone, ouvrez d'abord cette page dans Safari."}),s.jsx("button",{onClick:()=>{o(!1),i()},className:"mt-4 w-full bg-surface-2 text-ink-2 rounded-pill py-2.5 text-sm font-semibold",children:"Ne plus afficher"})]})})})]}):null}const z8e=[{title:"Gagner",items:[{label:"Classement",to:"/classement",icon:u0,tint:"bg-accent-soft text-accent"},{label:"Formations",to:"/formations",icon:jg,tint:"bg-success-soft text-success"},{label:"Mes filleuls",to:"/filleuls",icon:wn,tint:"bg-primary-soft text-primary"},{label:"Espace partenaire",to:"/partenaire",icon:vre,tint:"bg-accent-soft text-accent"},{label:"Ads Network",to:"/ads-network",icon:Pc,tint:"bg-primary-soft text-primary"},{label:"Événements",to:"/events",icon:ru,tint:"bg-primary-soft text-primary"},{label:"Packs publicité",to:"/ads-pack",icon:cre,tint:"bg-accent-soft text-accent"}]},{title:"Boutique",items:[{label:"SBC Shop",to:"/marketplace",icon:A3,tint:"bg-accent-soft text-accent"}]},{title:"Communauté",items:[{label:"SBC Statut",to:"/chat?view=status",icon:Rre,tint:"bg-primary-soft text-primary"},{label:"SBC Love",to:"/sbclove",icon:Mh,tint:"bg-danger-soft text-danger"},{label:"Messages",to:"/chat",icon:dy,tint:"bg-primary-soft text-primary"},{label:"Contacts",to:"/contacts",icon:Ji,tint:"bg-success-soft text-success"},{label:"Relance auto",to:"/relance",icon:yo,tint:"bg-accent-soft text-accent"}]},{title:"Compte",items:[{label:"Portefeuille",to:"/wallet",icon:Ba,tint:"bg-success-soft text-success"},{label:"Solde d'activation",to:"/activation-balance",icon:v$,tint:"bg-accent-soft text-accent"},{label:"Abonnement",to:"/abonnement",icon:E3,tint:"bg-primary-soft text-primary"},{label:"Mon profil",to:"/profile",icon:k3,tint:"bg-surface-2 text-ink-2"}]}];function V8e({open:e,onClose:t}){const r=lt(),n=Cr();C.useEffect(()=>{if(!e)return;const a=l=>l.key==="Escape"&&t(),o=document.body.style.overflow;return document.body.style.overflow="hidden",window.addEventListener("keydown",a),()=>{document.body.style.overflow=o,window.removeEventListener("keydown",a)}},[e,t]);const i=a=>{t(),a!==n.pathname&&r(a)};return s.jsx(It,{children:e&&s.jsxs(s.Fragment,{children:[s.jsx(Z.div,{className:"fixed inset-0 z-[70] bg-black/40",initial:{opacity:0}
282,animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},onClick:t,"aria-hidden":!0}),s.jsxs(Z.aside,{role:"dialog","aria-modal":"true","aria-label":"Tous les services",className:"fixed inset-y-0 left-0 z-[71] w-[82%] max-w-xs bg-surface border-r border-border flex flex-col",initial:{x:"-100%"},animate:{x:0},exit:{x:"-100%"},transition:{type:"spring",stiffness:320,damping:34},children:[s.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border shrink-0",children:[s.jsxs("div",{children:[s.jsx("p",{className:"font-bold text-ink",children:"Tous les services"}),s.jsx("p",{className:"text-[11px] text-ink-3",children:"Naviguez où vous voulez"})]}),s.jsx("button",{onClick:t,"aria-label":"Fermer le menu",className:"size-9 grid place-items-center rounded-tile bg-surface-2 text-ink-2",children:s.jsx(L,{icon:gt,size:18})})]}),s.jsxs("nav",{className:"flex-1 overflow-y-auto px-3 py-3",children:[s.jsxs("button",{onClick:()=>i("/"),className:mt("w-full flex items-center gap-3 rounded-card px-2.5 py-2.5 mb-3 text-left",n.pathname==="/"?"bg-primary-soft":"hover:bg-surface-2"),children:[s.jsx("span",{className:"size-9 grid place-items-center rounded-tile bg-primary text-white shrink-0",children:s.jsx(L,{icon:E$,size:18})}),s.jsx("span",{className:"font-semibold text-ink text-sm flex-1",children:"Accueil"}),s.jsx(L,{icon:Mn,size:16,className:"text-ink-3"})]}),z8e.map((a,o)=>s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{className:"text-[10px] font-bold uppercase tracking-wide text-ink-3 px-2.5 mb-1.5",children:a.title}),s.jsx("ul",{className:"flex flex-col gap-0.5",children:a.items.map((l,c)=>{const u=n.pathname===l.to;return s.jsx(Z.li,{initial:{opacity:0,x:-12},animate:{opacity:1,x:0},transition:{delay:.05+(o*4+c)*.025,duration:.2},children:s.jsxs("button",{onClick:()=>i(l.to),className:mt("w-full flex items-center gap-3 rounded-card px-2.5 py-2 text-left transition-colors",u?"bg-primary-soft":"hover:bg-surface-2"),children:[s.jsx("span",{className:mt("size-9 grid place-items-center rounded-tile shrink-0",l.tint),children:s.jsx(L,{icon:l.icon,size:18})}),s.jsx("span",{className:mt("text-sm flex-1 truncate",u?"font-bold text-primary":"font-medium text-ink"),children:l.label}),u&&s.jsx("span",{className:"size-1.5 rounded-pill bg-primary shrink-0","aria-hidden":!0})]})},l.to)})})]},a.title))]})]})]})})}function U8e(){const e=lt(),{user:t}=Gt(),[r,n]=C.useState(!1),[i,a]=C.useState(!1),o=t!=null&&t.avatar?t.avatar:t!=null&&t.avatarId?X.generateSettingsFileUrl(t.avatarId):"",l=!!o&&!i;return s.jsxs(s.Fragment,{children:[s.jsx("header",{className:"sticky top-0 z-50 bg-surface border-b border-border",children:s.jsxs("div",{className:"grid grid-cols-[auto_1fr_auto] items-center gap-2 px-3 py-2",children:[s.jsx(Z.button,{onClick:()=>n(!0),whileTap:{scale:.9},"aria-label":"Ouvrir le menu des services","aria-expanded":r,className:"size-9 grid place-items-center rounded-tile text-ink-2 hover:bg-surface-2 transition-colors",children:s.jsx(L,{icon:jre,size:22})}),s.jsx("div",{className:"flex justify-center min-w-0",children:s.jsx("button",{onClick:()=>e("/"),"aria-label":"Accueil",children:s.jsx("img",{src:Bl,alt:"Sniper Business Center",className:"w-24 max-w-full"})})}),s.jsx(Z.button,{onClick:()=>e("/profile"),whileTap:{scale:.9},"aria-label":"Mon profil",className:"size-9 rounded-pill overflow-hidden grid place-items-center bg-surface-2 text-ink-2 ring-2 ring-primary/20 hover:ring-primary/40 transition-shadow",children:l?s.jsx("img",{src:X.generateThumbnailUrl(o,80)||rn,alt:"","aria-hidden":!0,onError:()=>a(!0),className:"h-full w-full object-cover"}):s.jsx(L,{icon:k3,size:20})})]})}),s.jsx(V8e,{open:r,onClose:()=>n(!1)})]})}const q8e={light:10,medium:20,success:[12,40,12],error:[30,60,30]},R1=(e="light")=>{var t;try{(t=navigator.vibrate)==null||t.call(navigator,q8e[e])}catch{}};let Sx=null;const W8e=()=>{try{if(!Sx){const e=window.AudioContext??window.webkitAudioContext;if(!e)return null;Sx=new e}return Sx.state==="suspended"&&Sx.resume(),Sx}catch{return null}},jW=(e,t,r=.05)=>{const n=W8e();if(n)try{const i=n.createOscillator(),a=n.createGain();i.type="sine",i.frequency.value=e;const o=n.currentTime,l=o+t/1e3;a.gain.setValueAtTime(0,o),a.gain.linearRampToValueAtTime(r,o+.01),a.gain.exponentialRampToValueAtTime(1e-4,l),i.connect(a).connect(n.destination),i.start(o),i.stop(l)}catch{}},H8e=()=>{jW(660,90)},G8e=()=>{jW(440,120,.04)},K8e=()=>R1("light"),X8e=()=>{const e=t=>{var i;const r=t.target,n=(i=r==null?void 0:r.closest)==null?void 0:i.call(r,'button, a, [role="button"], input[type="checkbox"], input[type="radio"]');
282!n||n.closest("[data-no-haptic]")||n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"||R1("light")};return document.addEventListener("pointerdown",e,{passive:!0}),()=>document.removeEventListener("pointerdown",e)};function Y8e(){const{otp:e,inputs:t,handleChange:r,handleKeyDown:n,handlePaste:i,code:a}=XE(),[o,l]=C.useState(!1),[c,u]=C.useState(""),[f,x]=C.useState({show:!1,message:""}),m=Cr(),p=lt(),v=new URLSearchParams(m.search).get("email")||"";C.useEffect(()=>{v||p("/connexion")},[v,p]);const b=async N=>{if(N.preventDefault(),a.length!==6){u("Veuillez entrer le code complet");return}l(!0),u("");try{await X.verifyOtp(v,a),p(`/reset-password?email=${encodeURIComponent(v)}`)}catch(j){u(j instanceof Error?j.message:"Erreur lors de la vérification du code.")}finally{l(!1)}},E=async()=>{l(!0),u("");try{await X.requestPasswordResetOtp(v),x({show:!0,message:"Code renvoyé ! Veuillez vérifier votre email."})}catch(N){u(N instanceof Error?N.message:"Échec du renvoi de l'OTP")}finally{l(!1)}};return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center mb-4 px-3",children:[s.jsx(Ct,{}),s.jsx("h3",{className:"text-xl font-medium text-center w-full text-gray-900",children:"Vérification"})]}),s.jsxs("div",{className:"min-h-screen flex flex-col items-center justify-center bg-white px-4",children:[s.jsx("img",{src:M1,alt:"Analyse",className:"size-44 mb-6 mx-auto"}),s.jsxs("form",{onSubmit:b,className:"w-full max-w-xs flex flex-col items-center",children:[s.jsx("div",{className:"text-center mb-2 font-semibold text-lg text-gray-800",children:"Connexion - Code de vérification"}),s.jsx("div",{className:"text-center text-gray-600 mb-1",children:v}),s.jsx("div",{className:"text-center text-sm text-gray-500 mb-2",children:"Un code de vérification a été envoyé à votre email pour finaliser la connexion."}),s.jsx("div",{className:"text-center text-xs text-amber-600 bg-amber-50 border border-border rounded-lg px-3 py-2 mb-2",children:"Si vous ne trouvez pas l'email, vérifiez votre dossier spam ou courrier indésirable."}),c&&s.jsx("div",{className:"text-center text-red-500 text-sm mb-2",children:c}),s.jsx("div",{className:"flex justify-center gap-2 my-4",children:e.map((N,j)=>s.jsx("input",{ref:A=>{t.current[j]=A},type:"text",inputMode:"text",autoComplete:"one-time-code",autoCapitalize:"none",autoCorrect:"off",spellCheck:!1,value:N,onFocus:A=>A.target.select(),onChange:A=>r(j,A.target.value),onKeyDown:A=>n(j,A),onPaste:A=>i(j,A),className:"w-12 h-12 text-center text-2xl border-2 border-border rounded-lg focus:outline-none focus:border-primary bg-white font-mono",autoFocus:j===0},j))}),s.jsxs("div",{className:"text-xs text-gray-500 mb-4",children:["Vous n'avez pas reçu le code ?",s.jsx("button",{type:"button",onClick:E,disabled:o,className:"text-primary font-semibold cursor-pointer hover:underline disabled:opacity-50 bg-transparent",children:"Renvoyer"})]}),s.jsx("button",{type:"submit",disabled:o||a.length!==6,className:"w-full bg-primary text-white rounded-xl py-3 font-bold hover:bg-blue-800 disabled:bg-blue-400 disabled:cursor-not-allowed transition-colors text-lg",children:o?"Vérification...":"Vérifier"})]})]}),s.jsx(It,{children:f.show&&s.jsx(Z.div,{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",initial:{opacity:0}
282,animate:{opacity:1},exit:{opacity:0},onClick:()=>x({show:!1,message:""}),children:s.jsx(Z.div,{className:"bg-white rounded-2xl p-6 mx-4 max-w-sm w-full border border-border",initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},onClick:N=>N.stopPropagation(),children:s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"w-12 h-12 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx("svg",{className:"w-6 h-6 text-green-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),s.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-2",children:"Succès"}),s.jsx("p",{className:"text-gray-600 mb-6",children:f.message}),s.jsx("button",{onClick:()=>x({show:!1,message:""}),className:"w-full bg-green-600 text-white py-2 px-4 rounded-xl font-medium hover:bg-green-700 transition-colors",children:"OK"})]})})})})]})}function Q8e(){const e=lt(),t=Cr(),{email:r,passwordResetToken:n}=t.state||{},[i,a]=C.useState(""),[o,l]=C.useState(""),[c,u]=C.useState(""),[f,x]=C.useState(!1),[m,p]=C.useState(!1),[y,v]=C.useState(null);if(C.useEffect(()=>{(!r||!n)&&e("/forgot-password")},[r,n,e]),!r||!n)return null;const b=async E=>{if(E.preventDefault(),!i||!o){u("Veuillez remplir tous les champs.");return}if(i.length<8){u("Le mot de passe doit contenir au moins 8 caractères.");return}if(i!==o){u("Les mots de passe ne correspondent pas.");return}u(""),x(!0);try{const N=await X.resetPassword(r,n,i);Ve(N),v({type:"success",message:"Votre mot de passe a été réinitialisé avec succès ! Vous allez être redirigé vers la page de connexion."}),p(!0),setTimeout(()=>{e("/connexion")},3e3)}catch(N){const j=N instanceof Error?N.message:"Une erreur est survenue lors de la réinitialisation de votre mot de passe.";v({type:"error",message:j}),p(!0)}finally{x(!1)}};return s.jsxs("div",{className:"min-h-screen flex flex-col justify-center items-center bg-white px-4",children:[s.jsxs("div",{className:"flex items-center mb-4 px-3 w-full max-w-sm",children:[s.jsx(Ct,{}),s.jsx("h3",{className:"text-xl font-medium text-center w-full text-gray-900",children:"Nouveau mot de passe"})]}),s.jsxs(Z.div,{className:"w-full max-w-sm mx-auto",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},children:[s.jsxs("div",{className:"flex flex-col items-center mt-8 mb-6",children:[s.jsx("div",{className:"bg-green-100 rounded-full w-24 h-24 flex items-center justify-center mb-4",children:s.jsx(L,{icon:Vc,className:"text-green-500",size:40})}),s.jsx("h2",{className:"text-xl font-bold text-gray-800 mb-2",children:"Définir un nouveau mot de passe"}),s.jsx("p",{className:"text-center text-gray-600 text-sm",children:"Choisissez un mot de passe sécurisé pour votre compte"})]}),s.jsxs("form",{onSubmit:b,className:"flex flex-col gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 text-sm mb-1 font-medium",children:"Nouveau mot de passe"}),s.jsx("input",{type:"password",value:i,onChange:E=>{a(E.target.value),u("")},placeholder:"Au moins 8 caractères",className:`w-full border ${c?"border-danger":"border-border"} rounded-xl px-4 py-3 focus:outline-none focus:ring-2 focus:ring-green-400 text-gray-700 placeholder-gray-400`,required:!0})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 text-sm mb-1 font-medium",children:"Confirmer le mot de passe"}),s.jsx("input",{type:"password",value:o,onChange:E=>{l(E.target.value),u("")},placeholder:"Répétez le mot de passe",className:`w-full border ${c?"border-danger":"border-border"} rounded-xl px-4 py-3 focus:outline-none focus:ring-2 focus:ring-green-400 text-gray-700 placeholder-gray-400`,required:!0})]}),c&&s.jsx("div",{className:"text-red-500 text-xs mt-1",children:c}),i&&s.jsx("div",{className:"text-xs text-gray-500",children:s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("span",{className:`w-2 h-2 rounded-full ${i.length>=8?"bg-green-500":"bg-gray-300"}`}),s.jsx("span",{children:"Au moins 8 caractères"})]})}),s.jsx("button",{type:"submit",className:"bg-success w-full text-white font-bold py-3 rounded-xl text-lg mt-2 disabled:opacity-50 disabled:cursor-not-allowed transition-all",disabled:f,children:f?"Réinitialisation...":"Réinitialiser le mot de passe"})]})]}),m&&y&&s.jsx(Z.div,{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",initial:{opacity:0}
282,animate:{opacity:1},exit:{opacity:0},children:s.jsxs(Z.div,{className:"bg-white rounded-2xl p-6 w-[90vw] max-w-sm text-gray-900 relative border border-border",initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},transition:{type:"spring",bounce:.2},children:[s.jsxs("div",{className:"flex flex-col items-center",children:[s.jsx("div",{className:`w-16 h-16 rounded-full flex items-center justify-center mb-4 ${y.type==="success"?"bg-green-100":"bg-red-100"}`,children:s.jsx(L,{icon:Vc,className:`${y.type==="success"?"text-green-500":"text-red-500"}`,size:32})}),s.jsx("h4",{className:`text-lg font-bold mb-4 text-center ${y.type==="success"?"text-green-600":"text-red-600"}`,children:y.type==="success"?"Mot de passe réinitialisé !":"Erreur"}),s.jsx("p",{className:"text-sm text-gray-700 text-center mb-4",children:y.message}),y.type==="success"&&s.jsx("div",{className:"text-gray-400 text-xs mt-2",children:"Redirection dans 3 secondes..."})]}),y.type==="error"&&s.jsx("button",{type:"button",className:"w-full bg-red-500 hover:bg-red-600 text-white rounded-xl py-2 font-bold transition-colors",onClick:()=>p(!1),children:"Réessayer"})]})})]})}function Z8e(){const{otp:e,inputs:t,handleChange:r,handleKeyDown:n,handlePaste:i,code:a}=XE(),[o,l]=C.useState(!1),[c,u]=C.useState(""),[f,x]=C.useState(!1),[m,p]=C.useState({show:!1,message:""}),y=Cr(),v=lt(),E=new URLSearchParams(y.search).get("email")||"";C.useEffect(()=>{E||v("/profile")},[E,v]);const N=async A=>{if(A.preventDefault(),a.length!==6){u("Veuillez entrer le code complet");return}l(!0),u("");try{await X.confirmEmailChange(E,a),x(!0),setTimeout(()=>{v("/profile")},3e3)}catch(w){u(w instanceof Error?w.message:"Erreur lors de la vérification du code.")}finally{l(!1)}},j=async()=>{l(!0),u("");try{await X.requestEmailChangeOtp(E),p({show:!0,message:"Code renvoyé ! Veuillez vérifier votre email."})}catch(A){u(A instanceof Error?A.message:"Échec du renvoi de l'OTP")}finally{l(!1)}};return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center mb-4 px-3",children:[s.jsx(Ct,{}),s.jsx("h3",{className:"text-xl font-medium text-center w-full text-gray-900",children:"Vérification Email"})]}),s.jsxs("div",{className:"min-h-screen flex flex-col items-center justify-center bg-white px-4",children:[s.jsx("img",{src:M1,alt:"Analyse",className:"size-44 mb-6 mx-auto"}),s.jsxs("form",{onSubmit:N,className:"w-full max-w-xs flex flex-col items-center",children:[s.jsx("div",{className:"text-center mb-2 font-semibold text-lg text-gray-800",children:"Vérification du nouvel email"}),s.jsx("div",{className:"text-center text-gray-600 mb-1",children:E}),s.jsx("div",{className:"text-center text-sm text-gray-500 mb-2",children:"Un code de vérification a été envoyé à votre nouvel email."}),s.jsx("div",{className:"text-center text-xs text-amber-600 bg-amber-50 border border-border rounded-lg px-3 py-2 mb-2",children:"Si vous ne trouvez pas l'email, vérifiez votre dossier spam ou courrier indésirable."}),c&&s.jsx("div",{className:"text-center text-red-500 text-sm mb-2",children:c}),s.jsx("div",{className:"flex justify-center gap-2 my-4",children:e.map((A,w)=>s.jsx("input",{ref:S=>{t.current[w]=S},type:"text",inputMode:"text",autoComplete:"one-time-code",autoCapitalize:"none",autoCorrect:"off",spellCheck:!1,value:A,onFocus:S=>S.target.select(),onChange:S=>r(w,S.target.value),onKeyDown:S=>n(w,S),onPaste:S=>i(w,S),className:"w-12 h-12 text-center text-2xl border-2 border-border rounded-lg focus:outline-none focus:border-primary bg-white font-mono",autoFocus:w===0},w))}),s.jsxs("div",{className:"text-xs text-gray-500 mb-4",children:["Vous n'avez pas reçu le code ?",s.jsx("button",{type:"button",onClick:j,disabled:o,className:"text-primary font-semibold cursor-pointer hover:underline disabled:opacity-50 bg-transparent",children:"Renvoyer"})]}),s.jsx("button",{type:"submit",disabled:o||a.length!==6,className:"w-full bg-primary text-white rounded-xl py-3 font-bold hover:bg-blue-800 disabled:bg-blue-400 disabled:cursor-not-allowed transition-colors text-lg",children:o?"Vérification...":"Vérifier"})]}),f&&s.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-40",children:s.jsxs("div",{className:"bg-white rounded-2xl max-w-sm w-full p-6 relative animate-fadeIn flex flex-col items-center border border-border",children:[s.jsx("img",{src:M1,alt:"Success",className:"size-20 mb-4"}),s.jsx("h3",{className:"text-xl font-bold mb-2 text-center",children:"Email modifié !"}),s.jsxs("p",{className:"text-gray-700 text-center mb-2",children:["Votre email a été changé avec succès.",s.jsx("br",{}),"Vous allez être redirigé vers votre profil..."]}),s.jsx("div",{className:"text-gray-400 text-xs mt-2",children:"Redirection dans 3 secondes..."})]})}),s.jsx(It,{children:m.show&&s.jsx(Z.div,{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",initial:{opacity:0}
282,animate:{opacity:1},exit:{opacity:0},onClick:()=>p({show:!1,message:""}),children:s.jsx(Z.div,{className:"bg-white rounded-2xl p-6 mx-4 max-w-sm w-full border border-border",initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},onClick:A=>A.stopPropagation(),children:s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"w-12 h-12 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx("svg",{className:"w-6 h-6 text-green-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),s.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-2",children:"Succès"}),s.jsx("p",{className:"text-gray-600 mb-6",children:m.message}),s.jsx("button",{onClick:()=>p({show:!1,message:""}),className:"w-full bg-green-600 text-white py-2 px-4 rounded-xl font-medium hover:bg-green-700 transition-colors",children:"OK"})]})})})})]})]})}function J8e(){var f;const[e,t]=C.useState(""),[r,n]=C.useState(""),[i,a]=C.useState(""),o=lt(),{user:l}=Gt(),c=ba({mutationFn:async({email:x,password:m})=>{if(!(l!=null&&l.email))throw new Error("Utilisateur non authentifié.");return await X.loginUser(l.email,m),X.requestEmailChangeOtp(x)},onSuccess:()=>{o(`/verify-email-otp?email=${encodeURIComponent(e)}`)},onError:x=>{x instanceof Error?a(x.message):a(typeof x=="string"?x:"Erreur lors de la vérification du mot de passe.")}}),u=x=>{x.preventDefault(),/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)?r?(a(""),c.mutate({email:e,password:r})):a("Veuillez entrer votre mot de passe."):a("Veuillez entrer une adresse email valide.")};return s.jsx(Z.div,{variants:On,initial:"hidden",animate:"show",className:"min-h-screen flex flex-col justify-center items-center bg-white px-4",children:s.jsxs(Z.div,{variants:uu,className:"w-full max-w-sm mx-auto",children:[s.jsxs(Z.div,{variants:Ia,className:"flex flex-col items-center mt-8 mb-6",children:[s.jsx("div",{className:"bg-blue-100 rounded-full w-24 h-24 flex items-center justify-center mb-4",children:s.jsx(L,{icon:Uc,className:"text-blue-500",size:40})}),s.jsx("p",{className:"text-center text-gray-800 font-semibold mb-2",children:"Modifier mon email"})]}),c.isError&&s.jsx("div",{className:"text-red-500 text-center mb-2",children:((f=c.error)==null?void 0:f.message)||"Erreur lors de l'envoi du code."}),s.jsxs("form",{onSubmit:u,className:"flex flex-col gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 text-sm mb-1",children:"Nouvel email"}),s.jsx("input",{type:"email",value:e,onChange:x=>t(x.target.value),placeholder:"Ex : [email protected]",className:`w-full border ${i&&i.toLowerCase().includes("email")?"border-danger":"border-border"} rounded-xl px-4 py-3 focus:outline-none focus:ring-2 focus:ring-blue-400 text-gray-700 placeholder-gray-400`})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 text-sm mb-1",children:"Mot de passe"}),s.jsx("input",{type:"password",value:r,onChange:x=>n(x.target.value),placeholder:"Votre mot de passe",className:`w-full border ${i&&i.toLowerCase().includes("passe")?"border-danger":"border-border"} rounded-xl px-4 py-3 focus:outline-none focus:ring-2 focus:ring-blue-400 text-gray-700 placeholder-gray-400`})]}),i&&s.jsx("div",{className:"text-red-500 text-xs mt-1",children:i}),s.jsx("button",{type:"submit",className:"bg-primary w-full text-white font-bold py-3 rounded-xl text-lg mt-2",disabled:c.status==="pending",children:c.status==="pending"?"Envoi en cours...":"Envoyer le code"})]})]})})}const Dp=[{value:"Cameroun",label:"🇨🇲 +237",code:"+237"},{value:"Bénin",label:"🇧🇯 +229",code:"+229"},{value:"Congo-Brazzaville",label:"🇨🇬 +242",code:"+242"},{value:"Congo-Kinshasa",label:"🇨🇩 +243",code:"+243"},{value:"Ghana",label:"🇬🇭 +233",code:"+233"},{value:"Côte d'Ivoire",label:"🇨🇮 +225",code:"+225"},{value:"Sénégal",label:"🇸🇳 +221",code:"+221"},{value:"Togo",label:"🇹🇬 +228",code:"+228"},{value:"Burkina Faso",label:"🇧🇫 +226",code:"+226"},{value:"Mali",label:"🇲🇱 +223",code:"+223"},{value:"Niger",label:"🇳🇪 +227",code:"+227"},{value:"Guinée",label:"🇬🇳 +224",code:"+224"},{value:"Gabon",label:"🇬🇦 +241",code:"+241"},{value:"Kenya",label:"🇰🇪 +254",code:"+254"}];function eCe(){const[e,t]=C.useState("request"),[r,n]=C.useState(Dp[0]),[i,a]=C.useState(""),[o,l]=C.useState(""),[c,u]=C.useState(!1),[f,x]=C.useState(""),[m,p]=C.useState(!1),[y,v]=C.useState(null),b=lt(),E=w=>{const S=Dp.find(B=>B.value===w.target.value)||Dp[0];n(S)},N=async w=>{if(w.preventDefault(),!i.trim()){x("Veuillez entrer un numéro de téléphone");return}u(!0),x("");try{const S=`${r.code}${i}`,B=await X.requestPhoneChangeOtp(S);Ve(B),v({type:"success",message:"Code OTP envoyé à votre nouveau numéro via WhatsApp!"}),p(!0),t("verify")}catch(S){const B=S instanceof Error?S.message:"Erreur lors de l'envoi du code OTP";x(B)}finally{u(!1)}},j=async w=>{if(w.preventDefault(),!o.trim()){x("Veuillez entrer le code OTP");return}u(!0),x("");try{const S=`${r.code}${i}`,B=await X.confirmPhoneChange(S,o);Ve(B),v({type:"success",message:"Numéro de téléphone mis à jour avec succès!"}),p(!0),setTimeout(()=>{b("/profile")},2e3)}catch(S){const B=S instanceof Error?S.message:"Code OTP invalide ou numéro déjà utilisé";x(B)}finally{u(!1)}},A=async()=>{u(!0),x("");try{const w=`${r.code}${i}`,S=await X.requestPhoneChangeOtp(w);Ve(S),v({type:"success",message:"Code OTP renvoyé!"}),p(!0)}catch(w){const S=w instanceof Error?w.message:"Erreur lors du renvoi du code";x(S)}finally{u(!1)}};return s.jsx(nn,{children:s.jsxs("div",{className:"min-h-screen flex flex-col justify-center items-center bg-white px-4",children:[s.jsxs("div",{className:"flex items-center mb-4 px-3 w-full max-w-sm",children:[s.jsx(Ct,{}),s.jsx("h3",{className:"text-xl font-medium text-center w-full text-gray-900",children:"Changer le numéro de téléphone"})]}),s.jsxs(Z.div,{className:"w-full max-w-sm mx-auto",initial:{opacity:0,y:20}
282,animate:{opacity:1,y:0},transition:{duration:.5},children:[s.jsxs("div",{className:"flex flex-col items-center mt-8 mb-6",children:[s.jsx("div",{className:"bg-blue-100 rounded-full w-24 h-24 flex items-center justify-center mb-4",children:s.jsx(L,{icon:Ji,className:"text-blue-500",size:40})}),s.jsx("h2",{className:"text-xl font-bold text-gray-800 mb-2",children:e==="request"?"Nouveau numéro":"Vérification"}),s.jsx("p",{className:"text-center text-gray-600 text-sm",children:e==="request"?"Entrez votre nouveau numéro de téléphone":`Entrez le code envoyé à ${r.code}${i}`})]}),e==="request"?s.jsxs("form",{onSubmit:N,className:"flex flex-col gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 text-sm mb-1 font-medium",children:"Nouveau numéro de téléphone"}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("select",{className:"border rounded-xl px-2 py-2 focus:outline-none focus:ring-2 focus:ring-blue-400 bg-white",value:r.value,onChange:E,children:Dp.map(w=>s.jsx("option",{value:w.value,children:w.label},w.value))}),s.jsx("input",{type:"tel",value:i,onChange:w=>{a(w.target.value),x("")},placeholder:"Ex: 675090755",className:`flex-1 border ${f?"border-danger":"border-border"} rounded-xl px-4 py-3 focus:outline-none focus:ring-2 focus:ring-blue-400 text-gray-700 placeholder-gray-400`,required:!0})]}),f&&s.jsx("div",{className:"text-red-500 text-xs mt-1",children:f})]}),s.jsxs("button",{type:"submit",className:"bg-primary w-full text-white font-bold py-3 rounded-xl text-lg mt-2 disabled:opacity-50 disabled:cursor-not-allowed transition-all flex items-center justify-center gap-2",disabled:c,children:[c?s.jsx(L,{icon:Yt,className:"animate-spin"}):s.jsx(L,{icon:Ji}),c?"Envoi en cours...":"Envoyer le code via WhatsApp"]})]}):s.jsxs("form",{onSubmit:j,className:"flex flex-col gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 text-sm mb-1 font-medium",children:"Code de vérification"}),s.jsx("input",{type:"text",value:o,onChange:w=>{l(w.target.value),x("")},placeholder:"Entrez le code OTP",className:`w-full border ${f?"border-danger":"border-border"} rounded-xl px-4 py-3 focus:outline-none focus:ring-2 focus:ring-blue-400 text-gray-700 placeholder-gray-400`,required:!0}),f&&s.jsx("div",{className:"text-red-500 text-xs mt-1",children:f})]}),s.jsxs("div",{className:"text-xs text-gray-500 mb-4 text-center",children:["Vous n'avez pas reçu le code ?",s.jsx("button",{type:"button",onClick:A,disabled:c,className:"text-blue-500 font-semibold cursor-pointer hover:underline disabled:opacity-50 bg-transparent ml-1",children:"Renvoyer"})]}),s.jsxs("button",{type:"submit",className:"bg-success w-full text-white font-bold py-3 rounded-xl text-lg mt-2 disabled:opacity-50 disabled:cursor-not-allowed transition-all flex items-center justify-center gap-2",disabled:c,children:[c?s.jsx(L,{icon:Yt,className:"animate-spin"}):null,c?"Vérification...":"Confirmer le changement"]}),s.jsx("button",{type:"button",onClick:()=>t("request"),className:"w-full bg-gray-200 text-gray-700 font-bold py-3 rounded-xl text-lg hover:bg-gray-300 transition-colors",disabled:c,children:"Retour"})]})]}),m&&y&&s.jsx(Z.div,{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",initial:{opacity:0}
282,animate:{opacity:1},exit:{opacity:0},children:s.jsxs(Z.div,{className:"bg-white rounded-2xl p-6 w-[90vw] max-w-sm text-gray-900 relative border border-border",initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},transition:{type:"spring",bounce:.2},children:[s.jsx("h4",{className:`text-lg font-bold mb-4 text-center ${y.type==="success"?"text-green-600":"text-red-600"}`,children:y.type==="success"?"Succès":"Erreur"}),s.jsx("p",{className:"text-sm text-gray-700 text-center mb-4",children:y.message}),s.jsx("button",{type:"button",className:`w-full ${y.type==="success"?"bg-green-500 hover:bg-green-600":"bg-red-500 hover:bg-red-600"} text-white rounded-xl py-2 font-bold  transition-colors`,onClick:()=>p(!1),children:"Fermer"})]})})]})})}function Fp(e){return e.toLocaleString("fr-FR")+" F"}const tCe=()=>{const[e,t]=C.useState(null),[r,n]=C.useState(!1),[i,a]=C.useState([]),[o,l]=C.useState(1),[c,u]=C.useState(!0),[f,x]=C.useState(!1),m=C.useRef(null),{data:p,isLoading:y,error:v,refetch:b}=hr({queryKey:["partner-details"],queryFn:async()=>{try{const z=await X.getPartnerDetails(),R=Ve(z);return!R||R===null?(t(!1),null):(t(!0),R)}catch(z){throw t(!1),z}},staleTime:1e3*60*5,refetchInterval:1e3*60*2,refetchOnWindowFocus:!0}),{data:E,isLoading:N,error:j,refetch:A,isFetching:w}=hr({queryKey:["partner-transactions"],queryFn:async()=>{try{const z=await X.getPartnerTransactions();if(z.isOverallSuccess&&z.body)return z.body;throw new Error("Failed to fetch partner transactions")}catch(z){throw z}},staleTime:1e3*60*5,refetchInterval:1e3*60*2,refetchOnWindowFocus:!0,enabled:e===!0});C.useEffect(()=>
282{e===!0&&(b(),A())},[e]);const S=z=>z==="gold"?s.jsx(L,{icon:Ng,className:"text-yellow-500"}):s.jsx(L,{icon:Uk,className:"text-gray-400"}),B=z=>z==="gold"?"bg-accent":"bg-ink",D=z=>new Date(z).toLocaleDateString("fr-FR",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}),P=z=>{if(!z)return null;const q={1:"bg-blue-100 text-blue-800",2:"bg-green-100 text-green-800",3:"bg-purple-100 text-purple-800"}[z]||"bg-gray-100 text-gray-800";return s.jsxs("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${q}`,children:["Niveau ",z]})},O=z=>{switch(z.transType.toLowerCase()){case"deposit":return"💰";case"withdrawal":return"💸";default:return"💼"}},M=z=>{const R=z.message||`Commission ${z.transType}`;return R.length>40?R.substring(0,40)+"...":R},I=z=>new Date(z).toLocaleDateString("fr-FR",{day:"2-digit",month:"short",hour:"2-digit",minute:"2-digit"}),V=()=>{n(!0)},W=()=>{n(!1)};C.useEffect(()=>{if(!r)return;(async()=>{if(!(!c||f)){x(!0);try{const R=await X.getPartnerTransactions();if(R.isOverallSuccess&&R.body){const q=R.body.data||[],G=R.body.pagination;if(a(K=>[...K,...q]),G){const K=Math.ceil(G.total/G.limit);u(G.page<K)}else u(q.length===20)}}catch{u(!1)}finally{x(!1)}}})()},[o,r]),C.useEffect(()=>{if(!r||!c||f)return;let z=null;const R=()=>{z&&clearTimeout(z),z=setTimeout(()=>{const G=m.current;if(G){const{scrollTop:K,scrollHeight:$,clientHeight:H}=G;K+H>=$*.8&&!f&&l(te=>te+1)}},100)},q=m.current;return q&&q.addEventListener("scroll",R),()=>{q&&q.removeEventListener("scroll",R),z&&clearTimeout(z)}},[r,c,f]),C.useEffect(()=>{r||(a([]),l(1),u(!0),x(!1))},[r]);const _=()=>s.jsxs("div",{className:"bg-white rounded-2xl p-8 text-center border border-border",children:[s.jsxs("div",{className:"mb-6",children:[s.jsx(L,{icon:wn,size:60,className:"text-blue-500 mx-auto mb-4"}),s.jsx("h2",{className:"text-2xl font-bold text-gray-800 mb-2",children:"Devenez Partenaire SBC"}),s.jsx("p",{className:"text-gray-600",children:"Rejoignez notre programme de partenariat et commencez à gagner des commissions sur les parrainages !"})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-6 mb-8",children:[s.jsxs("div",{className:"bg-gray-50 rounded-xl p-6",children:[s.jsx(L,{icon:Uk,size:30,className:"text-gray-500 mx-auto mb-3"}),s.jsx("h3",{className:"font-bold text-lg mb-2",children:"Pack Silver"}),s.jsx("p",{className:"text-gray-600 text-sm mb-4",children:"Commissions de base sur vos filleuls"}),s.jsxs("ul",{className:"text-left text-sm text-gray-600 space-y-1",children:[s.jsx("li",{children:"• Commission niveau 1"}),s.jsx("li",{children:"• Tableau de bord basique"}),s.jsx("li",{children:"• Support standard"})]})]}),s.jsxs("div",{className:"bg-yellow-50 rounded-xl p-6 border-2 border-border",children:[s.jsx(L,{icon:Ng,size:30,className:"text-yellow-500 mx-auto mb-3"}),s.jsx("h3",{className:"font-bold text-lg mb-2",children:"Pack Gold"}),s.jsx("p",{className:"text-gray-600 text-sm mb-4",children:"Commissions maximales sur 3 niveaux"}),s.jsxs("ul",{className:"text-left text-sm text-gray-600 space-y-1",children:[s.jsx("li",{children:"• Commission niveaux 1, 2, 3"}),s.jsx("li",{children:"• Tableau de bord avancé"}),s.jsx("li",{children:"• Support prioritaire"})]})]})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsx("button",{className:"bg-accent w-full text-white font-bold py-3 px-6 rounded-xl transition-all",children:"Upgrade vers Gold"}),s.jsx("button",{className:"bg-ink w-full text-white font-bold py-3 px-6 rounded-xl transition-all",children:"Upgrade vers Silver"})]})]});return s.jsxs("div",{className:"min-h-screen bg-bg flex flex-col items-center py-0",children:[s.jsxs("div",{className:"w-full max-w-4xl mx-auto p-4",children:[s.jsxs("div",{className:"flex items-center mb-6",children:[s.jsx(Ct,{}),s.jsx("h2",{className:"text-2xl font-bold text-gray-800 text-center flex-1",children:"Espace Partenaire"})]}),y&&e===null&&s.jsxs("div",{className:"space-y-4",children:[s.jsx($e,{width:"w-full",height:"h-40",rounded:"rounded-2xl"}),s.jsx($e,{width:"w-full",height:"h-32",rounded:"rounded-2xl"})]}),v&&!y&&s.jsxs("div",{className:"bg-red-50 border border-border rounded-2xl p-6 text-center",children:[s.jsx("p",{className:"text-red-600 font-medium",children:"Erreur lors du chargement des données partenaire"}),s.jsx("p",{className:"text-red-500 text-sm mt-2",children:String(v)}
282),s.jsx("button",{onClick:()=>b(),className:"mt-4 bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition-colors",children:"Réessayer"})]}),e===!1&&!y&&s.jsx(_,{}),e===!0&&p&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid md:grid-cols-3 gap-6 mb-6",children:[s.jsxs("div",{className:"bg-white rounded-2xl p-6 border border-border",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h3",{className:"text-lg font-semibold text-gray-700",children:"Solde Actuel"}),s.jsx(L,{icon:Al,size:24,className:"text-green-500"})]}),s.jsx("p",{className:"text-3xl font-bold text-green-600",children:Fp(p.amount||0)}),s.jsx("p",{className:"text-gray-500 text-sm mt-1",children:"Commissions disponibles"})]}),s.jsxs("div",{className:`rounded-2xl p-6 text-white ${B(p.pack)}`,children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h3",{className:"text-lg font-semibold",children:"Niveau Partenaire"}),S(p.pack)]}),s.jsx("p",{className:"text-2xl font-bold capitalize",children:p.pack}),s.jsx("p",{className:"text-white/80 text-sm mt-1",children:p.pack==="gold"?"3 niveaux de commission":"1 niveau de commission"})]}),s.jsxs("div",{className:"bg-white rounded-2xl p-6 border border-border",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h3",{className:"text-lg font-semibold text-gray-700",children:"Total Retiré"}),s.jsx(L,{icon:ly,size:24,className:"text-blue-500"})]}),s.jsx("p",{className:"text-3xl font-bold text-blue-600",children:Fp(p.totalPartnerWithdrawals||0)}),s.jsx("p",{className:"text-gray-500 text-sm mt-1",children:"Depuis le début"})]})]}),s.jsxs("div",{className:"bg-white rounded-2xl p-6 mb-6 border border-border",children:[s.jsx("h3",{className:"text-lg font-semibold text-gray-700 mb-4",children:"Informations Partenaire"}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-gray-500 text-sm",children:"ID Partenaire"}),s.jsx("p",{className:"font-mono text-sm text-gray-800",children:p._id})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-gray-500 text-sm",children:"Statut"}),s.jsx("span",{className:`inline-block px-3 py-1 rounded-full text-sm font-medium ${p.isActive?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:p.isActive?"Actif":"Inactif"})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-gray-500 text-sm",children:"Membre depuis"}),s.jsx("p",{className:"text-gray-800",children:D(p.createdAt)})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-gray-500 text-sm",children:"Dernière mise à jour"}),s.jsx("p",{className:"text-gray-800",children:D(p.updatedAt)})]})]})]}),s.jsxs("div",{className:"bg-ink rounded-2xl p-4 mb-6",children:[s.jsx("div",{className:"font-semibold mb-2 text-white",children:"Commissions récentes"}),N||w?s.jsx("div",{className:"space-y-3",children:[...Array(3)].map((z,R)=>s.jsx($e,{width:"w-full",height:"h-12",rounded:"rounded-lg"},R))}):j?s.jsxs("div",{className:"text-center py-4",children:[s.jsx("p",{className:"text-red-400 text-sm mb-2",children:"Erreur lors du chargement"}),s.jsx("button",{onClick:()=>A(),className:"bg-red-500 text-white px-3 py-1 rounded text-xs hover:bg-red-600 transition-colors",children:"Réessayer"})]}):E&&E.data&&E.data.length>0?E.data.slice(0,5).map(z=>s.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-white/10 last:border-b-0 cursor-pointer hover:bg-white/10 rounded-lg transition-colors",children:[s.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[s.jsx("div",{className:"flex items-center justify-center size-10 rounded-full bg-blue-100 text-blue-700",children:s.jsx("span",{className:"text-xl",children:O(z)})}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"font-bold text-white text-sm truncate max-w-[160px]",children:M(z)}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"text-xs text-gray-300",children:I(z.createdAt)}),P(z.referralLevelInvolved)]})]})]}),s.jsxs("div",{className:`font-bold text-sm ${z.transType.toLowerCase()==="deposit"?"text-green-400":"text-red-400"} whitespace-nowrap ml-2 max-w-[110px] text-right truncate`,children:[z.transType.toLowerCase()==="deposit"?"+":"-",Fp(z.amount)]})]},z._id)):s.jsx("div",{className:"text-center py-8 text-gray-400",children:"Aucune commission récente"})]}),s.jsx("div",{className:"flex justify-center mb-20",children:s.jsx("button",{onClick:V,className:"bg-blue-600 text-white px-6 py-3 rounded-full font-bold hover:bg-blue-700 transition-colors",children:"Voir toutes les commissions"})})]})]}),s.jsx(p0,{}),s.jsx(It,{children:r&&s.jsx(Z.div,{className:"fixed inset-0 z-50 flex items-end justify-center bg-black/40",initial:{opacity:0}
282,animate:{opacity:1},exit:{opacity:0},children:s.jsxs(Z.div,{className:"bg-ink rounded-t-2xl p-4 w-full h-[80vh] text-white relative flex flex-col",initial:{y:"100%"},animate:{y:0},exit:{y:"100%"},transition:{type:"spring",damping:25,stiffness:250},children:[s.jsxs("div",{className:"flex justify-between items-center mb-4",children:[s.jsx("h2",{className:"text-xl font-bold",children:"Historique des commissions"}),s.jsx("button",{className:"text-gray-400 hover:text-white",onClick:W,children:s.jsx(L,{icon:gt,size:24})})]}),s.jsxs("div",{ref:m,className:"flex-1 overflow-y-auto pr-2 custom-scrollbar",children:[!i||i.length===0&&!f?s.jsx("div",{className:"text-center py-8 text-gray-400",children:"Aucune commission trouvée."}):i.map(z=>s.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-white/10 last:border-b-0 cursor-pointer hover:bg-white/10 rounded-lg transition-colors",children:[s.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[s.jsx("div",{className:"flex items-center justify-center size-10 rounded-full bg-blue-100 text-blue-700",children:s.jsx("span",{className:"text-xl",children:O(z)})}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"font-bold text-white text-sm truncate max-w-[200px]",children:z.message||`Commission ${z.transType}`}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"text-xs text-gray-300",children:D(z.createdAt)}),P(z.referralLevelInvolved)]})]})]}),s.jsxs("div",{className:`font-bold text-sm ${z.transType.toLowerCase()==="deposit"?"text-green-400":"text-red-400"} whitespace-nowrap ml-2 max-w-[110px] text-right truncate`,children:[z.transType.toLowerCase()==="deposit"?"+":"-",Fp(z.amount)]})]},z._id)),f&&c&&s.jsx("div",{className:"flex justify-center py-4",children:s.jsxs("svg",{className:"animate-spin h-8 w-8 text-white",viewBox:"0 0 24 24",children:[s.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),s.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]})}),!c&&i.length>0&&!f&&s.jsx("div",{className:"text-center text-gray-500 py-4 text-sm",children:"Toutes les commissions ont été chargées."})]})]})})})]})},rCe=()=>{const e=lt(),t=Cr(),{refreshUser:r}=Gt(),[n,i]=C.useState(""),[a,o]=C.useState(!1),[l,c]=C.useState(""),[u,f]=C.useState(!1),[x,m]=C.useState({show:!1,message:""}),p=t.state;C.useEffect(()=>{p||e("/money")},[p,e]);const y=async()=>{if(!n||!p){c("Please enter the OTP code");return}o(!0),c("");try{const E=await X.verifyWithdrawal({transactionId:p.transactionId,verificationCode:n});Ve(E),await r(),f(!0),setTimeout(()=>{e("/money",{state:{message:"Withdrawal completed successfully!",type:"success"}})},3e3)}catch(E){c(E instanceof Error?E.message:"Invalid OTP code. Please try again.")}finally{o(!1)}},v=async()=>{if(p!=null&&p.transactionId){const E=p.status||"pending_otp_verification";if(!sd(E)){c("Cette transaction ne peut plus être annulée car elle est en cours de traitement par l'administrateur.");return}o(!0);try{await X.cancelWithdrawal(p.transactionId),e("/money",{state:{message:"Withdrawal cancelled successfully",type:"info"}})}catch(N){c(N instanceof Error?N.message:"Échec de l'annulation du retrait"),o(!1)}}else e("/money")},b=async()=>{c("");try{m({show:!0,message:"OTP resent successfully. Please check your email/SMS."})}catch{c("Failed to resend OTP. Please try again.")}};return p?u?s.jsx(nn,{children:s.jsxs("div",{className:"p-4 h-screen bg-white",children:[s.jsxs("div",{className:"flex items-center mb-6",children:[s.jsx(Ct,{onClick:()=>e("/money")}),s.jsx("h3",{className:"text-xl font-medium text-center w-full text-gray-900",children:"Withdrawal Successful"})]}),s.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[60vh]",children:[s.jsx("div",{className:"w-20 h-20 bg-green-100 rounded-full flex items-center justify-center mb-6",children:s.jsx(L,{icon:Ur,className:"text-green-600",size:32})}),s.jsx("h2",{className:"text-2xl font-bold text-green-600 mb-4",children:"Success!"}),s.jsxs("div",{className:"text-center space-y-2 mb-8",children:[s.jsxs("p",{className:"text-lg text-gray-900",children:["Your ",p.withdrawalType==="crypto"?"cryptocurrency":"mobile money"," withdrawal has been completed successfully!"]}),s.jsxs("p",{className:"text-gray-600",children:["Amount: ",p.amount," ",p.currency]}),s.jsxs("p",{className:"text-sm text-gray-500",children:["Transaction ID: ",p.transactionId]})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-sm text-gray-600 mb-4",children:"You will receive your funds shortly."}),s.jsx("p",{className:"text-xs text-gray-500",children:"Redirecting to home page in a few seconds..."})]})]})]})}):s.jsx(nn,{children:s.jsxs("div",{className:"p-4 h-screen bg-white",children:[s.jsxs("div",{className:"flex items-center mb-6",children:[s.jsx(Ct,{onClick:v}),s.jsx("h3",{className:"text-xl font-medium text-center w-full text-gray-900",children:"Verify Withdrawal"})]}),s.jsxs("div",{className:"max-w-md mx-auto",children:[s.jsxs("div",{className:"bg-gray-50 rounded-2xl p-6 mb-6",children:[s.jsxs("div",{className:"flex items-center space-x-3 mb-4",children:[s.jsx("div",{className:"text-blue-600",children:p.withdrawalType==="crypto"?s.jsx(L,{icon:p$,size:24}):s.jsx(L,{icon:D$,size:24})}),s.jsxs("div",{children:[s.jsxs("h4",{className:"font-semibold text-gray-900",children:[p.withdrawalType==="crypto"?"Cryptocurrency":"Mobile Money"," Withdrawal"]}),s.jsxs("p",{className:"text-sm text-gray-600",children:["Amount: ",p.amount," ",p.currency]})]})]}),s.jsxs("div",{className:"text-xs text-gray-500 bg-white rounded-lg p-3",children:[s.jsx("strong",{children:"Transaction ID:"})," ",p.transactionId]})]}),s.jsxs("div",{className:"bg-white rounded-2xl border border-border p-6 mb-6",children:[s.jsxs("div",{className:"text-center mb-6",children:[s.jsx("div",{className:"w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx(L,{icon:Ba,className:"text-blue-600",size:24})}),s.jsx("h4",{className:"font-semibold text-gray-900 mb-2",children:"Enter Verification Code"}),s.jsx("p",{className:"text-sm text-gray-600",children:"We've sent a verification code to your registered email and ph
282one number."}),s.jsx("p",{className:"text-xs text-amber-600 bg-amber-50 border border-border rounded-lg px-3 py-2 mt-2",children:"If you can't find the email, please check your spam or junk folder."})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"6-Digit Verification Code"}),s.jsx("input",{type:"text",value:n,onChange:E=>{const N=E.target.value.replace(/\D/g,"");N.length<=6&&(i(N),c(""))},placeholder:"000000",maxLength:6,className:"w-full px-4 py-3 border border-border rounded-xl focus:outline-none focus:ring-2 focus:ring-blue-500 text-center text-2xl tracking-widest font-mono",autoFocus:!0})]}),s.jsx("button",{onClick:y,disabled:a||n.length!==6,className:"w-full bg-green-600 text-white py-3 px-4 rounded-xl hover:bg-green-700 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center font-semibold",children:a?s.jsxs(s.Fragment,{children:[s.jsx(L,{icon:Yt,className:"animate-spin mr-2"}),"Verifying..."]}):"Verify & Complete Withdrawal"}),s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("button",{onClick:b,className:"text-blue-600 hover:text-blue-700 font-medium",children:"Resend Code"}),s.jsxs("button",{onClick:v,className:"text-red-600 hover:text-red-700 font-medium flex items-center",children:[s.jsx(L,{icon:gt,size:12,className:"mr-1"}),"Cancel"]})]})]})]}),l&&s.jsx("div",{className:"mb-4 p-4 bg-red-50 border border-border rounded-xl",children:s.jsx("p",{className:"text-red-600 text-sm text-center",children:l})}),s.jsxs("div",{className:"bg-yellow-50 border border-border rounded-xl p-4",children:[s.jsx("h5",{className:"font-semibold text-yellow-800 mb-2",children:"Important Notes:"}),s.jsxs("ul",{className:"text-xs text-yellow-700 space-y-1",children:[s.jsx("li",{children:"• The verification code expires in 10 minutes"}),s.jsx("li",{children:"• Check your spam folder if you don't receive the code"}),s.jsx("li",{children:"• Processing time: 1-5 minutes for mobile money, 15-30 minutes for crypto"}),s.jsx("li",{children:"• Contact support if you encounter any issues"})]})]})]}),s.jsx(It,{children:x.show&&s.jsx(Z.div,{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",initial:{opacity:0}
282,animate:{opacity:1},exit:{opacity:0},onClick:()=>m({show:!1,message:""}),children:s.jsx(Z.div,{className:"bg-white rounded-2xl p-6 mx-4 max-w-sm w-full border border-border",initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},onClick:E=>E.stopPropagation(),children:s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"w-12 h-12 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx("svg",{className:"w-6 h-6 text-green-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),s.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-2",children:"Succès"}),s.jsx("p",{className:"text-gray-600 mb-6",children:x.message}),s.jsx("button",{onClick:()=>m({show:!1,message:""}),className:"w-full bg-green-600 text-white py-2 px-4 rounded-xl font-medium hover:bg-green-700 transition-colors",children:"OK"})]})})})})]})}):null},NW=50,AW=20;function Pp(e){return`relance-banner-dismissed-${e.channel}-${e.severity==="empty"?"0":`lt-${e.channel==="email"?NW:AW}`}`}function KO(e,t){const r=t==="email"?NW:AW;return e===0?"empty":e>0&&e<=r?"low":null}function nCe({emailBalance:e,smsBalance:t,hasSmsAccess:r,onRecharge:n}){const i=[],a=KO(e,"email");if(a&&i.push({channel:"email",severity:a,balance:e}),r){const f=KO(t,"sms");f&&i.push({channel:"sms",severity:f,balance:t})}const[o,l]=C.useState({});C.useEffect(()=>{const f={};for(const x of i){const m=Pp(x);localStorage.getItem(m)==="1"&&(f[m]=!0)}l(f)},[e,t,r]);const c=i.filter(f=>!o[Pp(f)]);if(c.length===0)return null;const u=f=>{const x=Pp(f);localStorage.setItem(x,"1"),l(m=>({...m,[x]:!0}))};return s.jsx("div",{className:"flex flex-col gap-2 mb-3",children:c.map(f=>{const x=f.severity==="empty",m=f.channel==="email",p=x?"bg-red-50 border-danger text-red-800":"bg-amber-50 border-accent text-amber-900",y=x?"bg-red-600 hover:bg-red-700 text-white":"bg-amber-500 hover:bg-amber-600 text-white",v=m?"emails":"SMS",b=x?`Crédits ${v} épuisés.`:`Plus que ${f.balance.toLocaleString("fr-FR")} crédits ${v}.`;return s.jsxs("div",{role:"alert",className:`flex items-center gap-2 p-3 border rounded-none sm:rounded-lg ${p}`,children:[s.jsx("div",{className:"flex-shrink-0",children:m?s.jsx(L,{icon:yo,className:"w-5 h-5"}):s.jsx(L,{icon:N3,className:"w-5 h-5"})}),s.jsx("p",{className:"flex-1 text-sm font-medium leading-tight",children:b}),s.jsx("button",{type:"button",onClick:()=>n(f.channel),className:`min-h-[44px] px-4 rounded-lg text-sm font-bold ${y}`,children:"Recharger"}),s.jsx("button",{type:"button",onClick:()=>u(f),"aria-label":"Masquer",className:"min-h-[44px] min-w-[44px] flex items-center justify-center text-current/70 hover:text-current",children:s.jsx(L,{icon:gt,className:"w-4 h-4"})})]},Pp(f))})})}const XO=50,YO=0,QO=5e3,sCe=800;function iCe({initialValue:e,onSaved:t}){const[r,n]=C.useState(!1),[i,a]=C.useState(e??500),[o,l]=C.useState("idle"),[c,u]=C.useState(""),f=C.useRef(null),x=C.useRef(e??500);C.useEffect(()=>{typeof e=="number"&&(a(e),x.current=e)},[e]);const m=v=>{f.current&&clearTimeout(f.current),f.current=setTimeout(async()=>{var b;if(v!==x.current){l("saving"),u("");try{const E=await X.relanceUpdateConfig({maxMessagesPerDay:v});if(E.isSuccessByStatusCode)x.current=v,l("saved"),t==null||t(v);else throw new Error(((b=E.body)==null?void 0:b.message)||"Échec de l'enregistrement")}catch(E){l("error"),u((E==null?void 0:E.message)||"Échec de l'enregistrement")}}},sCe)},p=v=>Math.max(YO,Math.min(QO,Math.round(v))),y=v=>{const b=p(v);a(b),m(b)};return s.jsxs("div",{className:"relance-pacing-card bg-white rounded-2xl border border-border mb-4 overflow-hidden",children:[s.jsxs("button",{type:"button",onClick:()=>n(v=>!v),className:"w-full flex items-center justify-between p-4 min-h-[56px] hover:bg-gray-50 active:bg-gray-100 transition-colors",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(L,{icon:B$,className:"text-gray-600"}),s.jsx("span",{className:"font-bold text-sm text-gray-800",children:"Paramètres d'envoi"})]}),s.jsx(L,{icon:Mn,className:`text-gray-500 transition-transform ${r?"rotate-90":""}`})]}),r&&s.jsxs("div",{className:"p-4 pt-0 border-t border-border",children:[s.jsx("label",{className:"block text-sm font-medium text-gray-800 mb
282-1 mt-3",htmlFor:"relance-pacing-input",children:"Vitesse d'envoi par jour"}),s.jsx("p",{className:"text-xs text-gray-500 mb-3",children:"Vos crédits restent la limite finale. Recommandé : 500."}),s.jsxs("div",{className:"flex items-stretch gap-2",children:[s.jsx("button",{type:"button",onClick:()=>y(i-XO),"aria-label":"Diminuer",className:"w-11 h-12 flex items-center justify-center bg-gray-100 hover:bg-gray-200 active:bg-gray-300 text-gray-700 rounded-lg",children:s.jsx(L,{icon:Are})}),s.jsx("input",{id:"relance-pacing-input",type:"number",inputMode:"numeric",min:YO,max:QO,value:i,onChange:v=>{const b=v.target.value;if(b===""){a(0);return}const E=Number(b);Number.isNaN(E)||y(E)},className:"flex-1 h-12 text-center text-lg font-bold border border-border rounded-lg focus:outline-none focus:ring-2 focus:ring-primary"}),s.jsx("button",{type:"button",onClick:()=>y(i+XO),"aria-label":"Augmenter",className:"w-11 h-12 flex items-center justify-center bg-gray-100 hover:bg-gray-200 active:bg-gray-300 text-gray-700 rounded-lg",children:s.jsx(L,{icon:kl})})]}),s.jsxs("div",{className:"mt-2 min-h-[20px] text-xs",role:"status","aria-live":"polite",children:[o==="saving"&&s.jsx("span",{className:"text-gray-500",children:"Enregistrement…"}),o==="saved"&&s.jsx("span",{className:"text-green-600",children:"✓ Enregistré"}),o==="error"&&s.jsx("span",{className:"text-red-600",children:c||"Échec de l'enregistrement"})]})]})]})}function aCe(){var Or,Hn,ei,An,$a,mn,za,Va,Di,Ns,ti,As,ri;const{user:e}=Gt(),{t}=Ky(),{emailBalance:r,smsBalance:n,hasCredits:i,refreshBalance:a}=Uh(),[o,l]=C.useState(!1),[c,u]=C.useState(null),[f,x]=C.useState(null),[m,p]=C.useState([]),[y,v]=C.useState(!1),[b,E]=C.useState(1),[N,j]=C.useState(!1),[A,w]=C.useState([]),[S,B]=C.useState(!1),[D,P]=C.useState(!1),[O,M]=C.useState([]),[I,V]=C.useState(!1),[W,_]=C.useState(null),[z,R]=C.useState(!1),[q,G]=C.useState([]),[K,$]=C.useState(!1),[H,te]=C.useState(!1),[ne,Y]=C.useState(!1),[J,oe]=C.useState(""),[he,Q]=C.useState(!1),[ue,de]=C.useState(!1),[me,Le]=C.useState(!1),[Ne,ye]=C.useState(""),[ee,Ae]=C.useState("email"),[De,we]=C.useState(0),[je,Te]=C.useState(""),[Se,He]=C.useState({countries:[],registrationDateFrom:void 0,registrationDateTo:void 0,excludeCurrentTargets:!0,subscriptionStatus:"non-subscribed"}),[Ue,rt]=C.useState(null),[wt,Ft]=C.useState(!1),[xt,Kt]=C.useState(Array.from({length:7},(re,fe)=>({dayNumber:fe+1,subject:"",messageTemplate:{fr:"",en:""},mediaUrls:[],buttons:[]}))),[ft,Gr]=C.useState(1),[Nn,vs]=C.useState(!0),[bs,Kr]=C.useState(!1),[fn,Rn]=C.useState(null),[hn,_n]=C.useState(!1),[fr,Bt]=C.useState(null),[Ce,pe]=C.useState(!1),[Pe,Rt]=C.useState({show:!1,title:"",message:"",type:"info"}),[Pt,Jt]=C.useState({show:!1,message:""}),[at,Qt]=C.useState(null),ht=(re,fe,We="info")=>{Rt({show:!0,title:re,message:fe,type:We})},ir=n>0||(c==null?void 0:c.smsEnabled)===!0,Tr=async()=>{Kr(!0);try{await Promise.all([Mr(),wr(),a()]),ht("Actualisé","Données mises à jour","success")}catch{ht("Erreur","Échec de l'actualisation","error")}finally{Kr(!1)}};C.useEffect(()=>{Mr(),wr(),a()},[]);const Mr=async()=>{var re;try{const fe=await X.relanceGetStatus();fe.isSuccessByStatusCode&&((re=fe.body)!=null&&re.data)&&u(fe.body.data)}catch(fe){console.error("Error fetching status:",fe)}finally{vs(!1)}},wr=async()=>{var re,fe;try{const[We,Ke]=await Promise.all([X.relanceGetDefaultStats(),X.relanceGetCampaigns()]);if(We.isSuccessByStatusCode&&((re=We.body)!=null&&re.data)?x(We.body.data):x(null),Ke.isSuccessByStatusCode&&((fe=Ke.body)!=null&&fe.data)){const Et=Ke.body.data.campaigns||Ke.body.data;Array.isArray(Et)?(p(Et),Bt(Zt=>Zt&&(Et.find(ae=>ae._id===Zt._id)||null))):p([])}else p([])}catch{x(null),p([])}},Si=async()=>{var re;B(!0);try{const fe=await X.relanceGetDefaultTargets({page:1,limit:50});if(fe.isSuccessByStatusCode&&((re=fe.body)!=null&&re.data)){const We=fe.body.data.targets||fe.body.data;w(Array.isArray(We)?We:[])}}catch(fe){console.error("Error fetching targets:",fe)}finally{B(!1)}},Js=async()=>{var re,fe;V(!0);try{const We=await X.relanceGetRecentMessages(10);We.isSuccessByStatusCode&&((fe=(re=We.body)==null?void 0:re.data)!=null&&fe.messages)&&M(We.body.data.messages)}catch(We){console.error("Error fetching recent messages:",We)}finally{V(!1)}},as=async re=>{var fe;R(!0),_(null);try{const We=await X.relanceGetCampaignStats(re);We.isSuccessByStatusCode&&((fe=We.body)!=null&&fe.data)&&_(We.body.data)}catch(We){console.error("Error fetching campaign stats:",We)}finally{R(!1)}},Do=async re=>{var fe,We;te(!0);try{const Ke=await X.relanceGetCampaignMessages(re,10);Ke.isSuccessByStatusCode&&((We=(fe=Ke.body)==null?void 0:fe.data)!=null&&We.messages)&&G(Ke.body.data.messages)}catch(Ke){console.error("Error fetching campaign messages:",Ke)}finally{te(!1)}},Fo=async re=>{var fe,We;Q(!0);try{const Ke=xt[re-1],Et=await X.relancePreviewMessage({dayNumber:re,subject:Ke.subject||void 0,messageTemplate:Ke.messageTemplate,mediaUrls:Ke.mediaUrls,buttons:Ke.buttons,recipientName:"Jean Dupont",referrerName:(e==null?void 0:e.name)||"Parrain"});Et.isSuccessByStatusCode&&((We=(fe=Et.body)==null?void 0:fe.data)!=null&&We.html)?(oe(Et.body.data.html),Y(!0)):ht("Erreur","Impossible de générer l'aperçu","error")}catch(Ke){ht("Erreur",Ke.message||"Échec de la prévisualisation","error")}finally{Q(!1)}},Po=async()=>{try{const re=!((c==null?void 0:c.enabled)??!1);(await X.relanceUpdateSettings({enabled:re})).isSuccessByStatusCode&&(await Mr(),ht("Succès",re?"Relance activée":"Relance désactivée","success"))}catch{ht("Erreur","Échec de la mise à jour","error")}},Cs=async()=>{try{const re=!((c==null?void 0:c.enrollmentPaused)??!1);(await X.relanceUpdateSettings({enrollmentPaused:re})).isSuccessByStatusCode&&(await Mr(),ht("Succès",re?"Ajout en pause":"Ajout repris","success"))}catch{ht("Erreur","Échec de la mise à jour","error")}},ia=async()=>{try{const re=!((c==null?void 0:c.sendingPaused)??!1);(await X.relanceUpdateSettings({sendingPaused:re})).isSuccessByStatusCode&&(await Mr(),ht("Succès",re?"Envoi en pause":"Envoi repris","success"))}catch{ht("Erreur","Échec de la mise à jour","error")}},ws=(c==null?void 0:c.sendingPausedEmail)??(c==null?void 0:c.sendingPaused)??!1,Bi=(c==null?void 0:c.sendingPausedSms)??(c==null?void 0:c.sendingPaused)??!1,Me=async re=>{const fe=re==="email"?!ws:ws,We=re==="sms"?!Bi:Bi;try{(await X.relanceUpdateSettings({sendingPaused:fe&&We,sendingPausedEmail:fe,sendingPausedSms:We})).isSuccessByStatusCode&&(await Mr(),ht("Succès",re==="email"?fe?"Envoi emails en pause":"Envoi emails repris":We?"Envoi SMS en pause":"Envoi SMS repris","success"))}catch{ht("Erreur","Échec de la mise à jour","error")}},Nt=()=>{ye(""),Ae("email"),we(0),Te(""),He({countries:[],registrationDateFrom:void 0,registrationDateTo:void 0,excludeCurrentTargets:!0,subscriptionStatus:"non-subscribed"}),rt(null),Ft(!1),Kt(Array.from({length:7},(re,fe)=>({dayNumber:fe+1,subject:"",messageTemplate:{fr:"",en:""},mediaUrls:[],buttons:[]}))),Gr(1),E(1),v(!0)},ct=async()=>{var re;de(!0);try{const fe=await X.relancePreviewFilters(Se);fe.isSuccessByStatusCode&&((re=fe.body)!=null&&re.data)&&(rt(fe.body.data),E(4))}catch(fe){ht("Erreur",fe.message||"Échec de l'aperçu des filtres","error")}finally{de(!1)}},yt=async()=>{var re,fe,We,Ke,Et;Le(!0);try{const Zt=wt?xt.filter(Ie=>Ie.messageTemplate.fr.trim()&&Ie.messageTemplate.en.trim()):void 0,vr=je.trim()===""?null:Number(je),ae=vr!==null&&!Number.isNaN(vr)&&vr>
2820?{offset:Math.max(0,Math.floor(De)),limit:Math.floor(vr)}:void 0,ve=await X.relanceCreateCampaign({name:Ne,type:"filtered",channel:ee,targetFilter:Se,customMessages:Zt,...ae?{contactBatch:ae}:{}});if(ve.isSuccessByStatusCode&&((re=ve.body)!=null&&re.data)){const Ie=ve.body.data;v(!1),await wr();try{(await X.relanceStartCampaign(Ie._id)).isSuccessByStatusCode&&await wr()}catch(ut){console.log("Auto-start note:",ut.message||"Campaign may already be active")}ht("Campagne créée",`Campagne "${Ne}" créée avec succès !`,"success")}else{const Ie=((fe=ve.body)==null?void 0:fe.message)||((We=ve.body)==null?void 0:We.error)||"Échec de la création de la campagne";ht("Erreur",Ie,"error")}}catch(Zt){const vr=((Et=(Ke=Zt.response)==null?void 0:Ke.data)==null?void 0:Et.message)||Zt.message||"Échec de la création de la campagne";ht("Erreur",vr,"error")}finally{Le(!1)}},cr=async re=>{try{await X.relanceStartCampaign(re),await wr(),(fr==null?void 0:fr._id)===re&&as(re),ht("Campagne démarrée","Les emails seront envoyés automatiquement.","success")}catch(fe){ht("Erreur",fe.message||"Échec du démarrage de la campagne","error")}},Lt=async re=>{try{await X.relancePauseCampaign(re),await wr(),(fr==null?void 0:fr._id)===re&&as(re),ht("Campagne en pause","Aucun email ne sera envoyé pendant la pause.","success")}catch(fe){ht("Erreur",fe.message||"Échec de la mise en pause","error")}},At=async re=>{try{await X.relanceResumeCampaign(re),await wr(),(fr==null?void 0:fr._id)===re&&as(re),ht("Campagne reprise","Les emails reprendront automatiquement.","success")}catch(fe){ht("Erreur",fe.message||"Échec de la reprise","error")}},ur=async re=>{try{await X.relanceCancelCampaign(re,"Utilisateur a annulé la campagne"),await wr(),(fr==null?void 0:fr._id)===re&&as(re),ht("Campagne annulée","Toutes les cibles actives ont été retirées.","success")}catch(fe){ht("Erreur",fe.message||"Échec de l'annulation","error")}},Es=async(re,fe,We)=>{if(We==="active"||We==="paused"){ht("Impossible de supprimer","Vous ne pouvez pas supprimer une campagne active ou en pause. Veuillez d'abord annuler la campagne.","error");return}Jt({show:!0,message:`Êtes-vous sûr de vouloir supprimer la campagne "${fe}" ?`,onConfirm:async()=>{var Ke;try{Qt(re);const Et=await X.relanceDeleteCampaign(re);if(Et.isSuccessByStatusCode)p(m.filter(Zt=>Zt._id!==re)),(fr==null?void 0:fr._id)===re&&Bt(null),ht("Campagne supprimée","La campagne a été supprimée avec succès.","success");else throw new Error(((Ke=Et.body)==null?void 0:Ke.message)||"Échec de la suppression")}catch(Et){ht("Erreur",Et.message||"Échec de la suppression de la campagne","error")}finally{Qt(null)}}})},js=re=>{const fe={draft:{color:"bg-gray-500",label:"Brouillon"},scheduled:{color:"bg-blue-500",label:"Programmé"},active:{color:"bg-green-500",label:"Actif"},paused:{color:"bg-orange-500",label:"En pause"},completed:{color:"bg-green-500",label:"Terminé"},cancelled:{color:"bg-red-500",label:"Annulé"}},We=fe[re]||fe.draft;return s.jsx("span",{className:`${We.color} text-white text-xs px-2 py-1 rounded-full`,children:We.label})},Tt=re=>{const fe=["draft","scheduled","completed","cancelled"].includes(re.status);return re.status==="draft"?s.jsxs("div",{className:"flex gap-2",children:[s.jsxs("button",{onClick:()=>cr(re._id),className:"bg-green-500 text-white px-3 py-1 rounded-lg text-sm hover:bg-green-600",children:[s.jsx(L,{icon:wf,className:"inline mr-1"})," Démarrer"]}),s.jsxs("button",{onClick:()=>Es(re._id,re.name,re.status),disabled:at===re._id,className:"bg-red-500 text-white px-3 py-1 rounded-lg text-sm hover:bg-red-600 disabled:opacity-50",children:[s.jsx(L,{icon:kd,className:"inline mr-1"})," Supprimer"]})]}):re.status==="active"?s.jsxs("div",{className:"flex gap-2",children:[s.jsxs("button",{onClick:()=>Lt(re._id),className:"bg-yellow-500 text-white px-3 py-1 rounded-lg text-sm hover:bg-yellow-600",children:[s.jsx(L,{icon:kg,className:"inline mr-1"})," Pause"]}),s.jsxs("button",{onClick:()=>ur(re._id),className:"bg-red-500 text-white px-3 py-1 rounded-lg text-sm hover:bg-red-600",children:[s.jsx(L,{icon:gt,className:"inline mr-1"})," Annuler"]})]}):re.status==="paused"?s.jsxs("div",{className:"flex gap-2",children:[s.jsxs("button",{onClick:()=>At(re._id),className:"bg-green-500 text-white px-3 py-1 rounded-lg text-sm hover:bg-green-600",children:[s.jsx(L,{icon:wf,className:"inline mr-1"})," Reprendre"]}),s.jsxs("button",{onClick:()=>ur(re._id),className:"bg-red-500 text-white px-3 py-1 rounded-lg text-sm hover:bg-red-600",children:[s.jsx(L,{icon:gt,className:"inline mr-1"})," Annuler"]})]}):fe?s.jsxs("button",{onClick:()=>Es(re._id,re.name,re.status),disabled:at===re._id,className:"bg-red-500 text-white px-3 py-1 rounded-lg text-sm hover:bg-red-600 disabled:opacity-50",children:[s.jsx(L,{icon:kd,className:"inline mr-1"})," ",at===re._id?"Suppression...":"Supprimer"]}):null};return Nn?s.jsx(nn,{children:s.jsx("div",{className:"flex items-center justify-center min-h-screen",children:s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary mx-auto mb-4"}),s.jsx("p",{className:"text-gray-600",children:"Chargement..."})]})})}):i?s.jsx(nn,{children:s.jsxs(Z.div,{variants:On,initial:"hidden",animate:"show",className:"p-3 bg-white relative pb-20 min-h-screen",children:[s.jsxs(Z.div,{variants:Ia,className:"flex items-center mb-4 gap-2",children:[s.jsx(Ct,{}),s.jsx("h3",{className:"text-xl font-medium text-center flex-1",children:t("pages.relance.title","Relance")}),s.jsx("button",{onClick:Tr,disabled:bs,className:"p-2 rounded-lg hover:bg-gray-100 transition-colors disabled:opacity-50",title:"Actualiser",children:s.jsx(L,{icon:j3,className:`text-gray-600 ${bs?"animate-spin":""}`,size:20})})]}),s.jsxs(Z.div,{variants:H5e,initial:"hidden",animate:"show",children:[s.jsx(Z.div,{variants:_O,children:s.jsx(nCe,{emailBalance:r,smsBalance:n,hasSmsAccess:ir,onRecharge:re=>l(re)})}),s.jsxs(Z.div,{variants:K5e,className:"bg-primary relance-balance-card rounded-2xl p-4 text-white mb-4","data-tour":"balance-card",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx("div",{className:"text-xs uppercase tracking-wide opacity-80 mb-1",children:"Crédits Relance"}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-2xl font-bold",children:r.toLocaleStr
282ing("fr-FR")}),s.jsx("div",{className:"text-xs opacity-80",children:"emails"})]}),s.jsx("div",{className:"h-8 w-px bg-white/30"}),s.jsxs("div",{children:[s.jsx("div",{className:"text-2xl font-bold",children:n.toLocaleString("fr-FR")}),s.jsx("div",{className:"text-xs opacity-80",children:"SMS"})]})]})]}),s.jsx("button",{onClick:()=>l("all"),"data-tour":"recharge",className:"bg-white text-indigo-700 font-bold px-4 py-2 rounded-lg text-sm hover:bg-gray-100 transition-colors min-h-[44px]",children:"Recharger"})]}),ir&&s.jsxs(bn,{to:"/relance/sms-links","data-tour":"sms-links",className:"mt-3 flex items-center justify-center gap-2 w-full min-h-[44px] px-4 py-2 rounded-xl bg-white/10 backdrop-blur-sm text-white text-sm font-semibold border border-white/20 hover:bg-white/20 active:bg-white/25 transition-colors",children:[s.jsx(L,{icon:N3,className:"w-4 h-4"}),s.jsx("span",{children:"Configurer vos liens SMS"})]})]}),s.jsx(Z.div,{variants:RO,className:`bg-primary relance-status-card rounded-2xl p-4 text-white mb-4 ${c!=null&&c.enabled," "}`,children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(L,{icon:yo,size:32}),s.jsxs("div",{children:[s.jsxs("div",{className:"font-bold text-lg flex items-center gap-2 flex-wrap",children:[s.jsx("span",{children:c!=null&&c.enabled?"✅ Relance Activée":"⏸️ Relance Désactivée"}),(c==null?void 0:c.channel)&&s.jsx("span",{className:"text-[10px] uppercase tracking-wide bg-white/20 px-2 py-0.5 rounded-full font-semibold",children:c.channel})]}),s.jsxs("div",{className:"text-sm opacity-90",children:[(f==null?void 0:f.activeTargets)||0," cibles actives"," • ","Emails aujourd'hui: ",(c==null?void 0:c.messagesSentToday)||0,ir&&s.jsxs(s.Fragment,{children:[" "," • "," SMS: ",(f==null?void 0:f.smsToday)??"—"]})]})]})]}),s.jsx("button",{onClick:Po,className:`relance-toggle-btn px-4 py-2 rounded-lg text-sm font-bold transition-colors ${c!=null&&c.enabled?"bg-white text-red-500 hover:bg-gray-100":"bg-white text-green-600 hover:bg-gray-100"}`,children:c!=null&&c.enabled?"Désactiver":"Activer"})]})}),s.jsx(Z.div,{variants:G5e,children:s.jsx(iCe,{initialValue:c==null?void 0:c.maxMessagesPerDay,onSaved:()=>Mr()})}),s.jsxs(Z.div,{variants:X5e,className:"relance-controls bg-white rounded-2xl border border-border p-4 mb-6",children:[s.jsxs("h4",{className:"font-bold text-gray-800 mb-3 flex items-center gap-2",children:[s.jsx(L,{icon:B$,className:"text-gray-600"}),"Contrôles"]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-xl",children:[s.jsxs("div",{children:[s.jsx("div",{className:"font-medium text-sm text-gray-800",children:"Pause ajout"}),s.jsx("div",{className:"text-xs text-gray-500",children:"Arrêter l'ajout de nouvelles cibles dans la boucle de relance"})]}),s.jsx("button",{onClick:Cs,className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${c!=null&&c.enrollmentPaused?"bg-orange-500":"bg-gray-300"}`,children:s.jsx("span",{className:`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${c!=null&&c.enrollmentPaused?"translate-x-6":"translate-x-1"}`})})]}),ir?s.jsxs(s.Fragment,{children:[s.jsxs("button",{type:"button",onClick:()=>Me("email"),className:"w-full flex items-center justify-between p-3 bg-gray-50 rounded-xl text-left min-h-[56px] active:bg-gray-100",children:[s.jsxs("div",{children:[s.jsx("div",{className:"font-medium text-sm text-gray-800",children:"Pause envoi emails"}),s.jsx("div",{className:"text-xs text-gray-500",children:"Arrêter l'envoi des emails uniquement"})]}),s.jsx("span",{"aria-hidden":!0,className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${ws?"bg-orange-500":"bg-gray-300"}`,children:s.jsx("span",{className:`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${ws?"translate-x-6":"translate-x-1"}`})})]}),s.jsxs("button",{type:"button",onClick:()=>Me("sms"),className:"w-full flex items-center justify-between p-3 bg-gray-50 rounded-xl text-left min-h-[56px] active:bg-gray-100",children:[s.jsxs("div",{children:[s.jsx("div",{className:"font-medium text-sm text-gray-800",children:"Pause envoi SMS"}),s.jsx("div",{className:"text-xs text-gray-500",children:"Arrêter l'envoi des SMS uniquement"})]}
282),s.jsx("span",{"aria-hidden":!0,className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${Bi?"bg-orange-500":"bg-gray-300"}`,children:s.jsx("span",{className:`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${Bi?"translate-x-6":"translate-x-1"}`})})]})]}):s.jsxs("button",{type:"button",onClick:ia,className:"w-full flex items-center justify-between p-3 bg-gray-50 rounded-xl text-left min-h-[56px] active:bg-gray-100",children:[s.jsxs("div",{children:[s.jsx("div",{className:"font-medium text-sm text-gray-800",children:"Pause envoi"}),s.jsx("div",{className:"text-xs text-gray-500",children:"Arrêter l'envoi des emails"})]}),s.jsx("span",{"aria-hidden":!0,className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${c!=null&&c.sendingPaused?"bg-orange-500":"bg-gray-300"}`,children:s.jsx("span",{className:`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${c!=null&&c.sendingPaused?"translate-x-6":"translate-x-1"}`})})]})]})]}),f&&s.jsxs(Z.div,{variants:RO,className:"relance-stats mb-6",children:[s.jsxs("h4",{className:"font-bold text-gray-800 mb-3 flex items-center gap-2",children:[s.jsx(L,{icon:to,className:"text-blue-500"}),"Statistiques (Relance par défaut)"]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3 mb-4",children:[s.jsxs("div",{className:"bg-primary-soft rounded-xl p-4 border border-border",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx(L,{icon:wn,className:"text-blue-500"}),s.jsx("span",{className:"text-xs text-blue-600",children:"En cours de relance"})]}),s.jsx("div",{className:"text-2xl font-bold text-blue-700",children:f.activeTargets})]}),s.jsxs("div",{className:"bg-success-soft rounded-xl p-4 border border-border",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx(L,{icon:to,className:"text-green-500"}),s.jsx("span",{className:"text-xs text-green-600",children:"Envoyés"})]}),ir?s.jsxs("div",{className:"space-y-1",children:[s.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[s.jsx("span",{className:"text-xs text-green-700",children:"Emails"}),s.jsx("span",{className:"text-lg font-bold text-green-700",children:f.totalMessagesSent})]}),s.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[s.jsx("span",{className:"text-xs text-green-700",children:"SMS"}),s.jsx("span",{className:"text-lg font-bold text-green-700",children:f.smsSent??"—"})]})]}):s.jsx("div",{className:"text-2xl font-bold text-green-700",children:f.totalMessagesSent})]}),s.jsxs("div",{className:"bg-accent-soft rounded-xl p-4 border border-border",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx(L,{icon:Sa,className:"text-orange-500"}),s.jsx("span",{className:"text-xs text-orange-600",children:"Taux de livraison"})]}),ir?s.jsxs("div",{className:"space-y-1",children:[s.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[s.jsx("span",{className:"text-xs text-orange-700",children:"Emails"}),s.jsxs("span",{className:"text-lg font-bold text-orange-700",children:[((Or=f.deliveryPercentage)==null?void 0:Or.toFixed(1))||0,"%"]})]}),s.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[s.jsx("span",{className:"text-xs text-orange-700",children:"SMS"}),s.jsx("span",{className:"text-lg font-bold text-orange-700",children:typeof f.smsDeliveryRate=="number"?`${f.smsDeliveryRate.toFixed(1)}%`:"—"})]})]}):s.jsxs("div",{className:"text-2xl font-bold text-orange-700",children:[((Hn=f.deliveryPercentage)==null?void 0:Hn.toFixed(1))||0,"%"]})]}),s.jsxs("div",{className:"bg-success-soft rounded-xl p-4 border border-border",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx(L,{icon:Sa,className:"text-green-500"}),s.jsx("span",{className:"text-xs text-green-600",children:"Conversions (Payés)"})]}),s.jsx("div",{className:"text-2xl font-bold text-green-700",children:f.targetsConverted||0})]})]}),s.jsxs("div",{className:"bg-white rounded-xl border border-border mb-4 overflow-hidden",children:[s.jsxs("button",{onClick:()=>pe(!Ce),className:"w-full flex items-center justify-between p-4 hover:bg-gray-50 transition-colors",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(L,{icon:Zb,className:"text-purple-500"}),s.jsx("span",{className:"font-bold text-sm text-gray-700",children:"Engagement des emails"}),f.totalMessagesOpened===void 0&&s.jsx("span",{className:"text-xs text-gray-400 italic",children:"(En attente de données)"})]}),s.jsx(L,{icon:Mn,className:`transition-transform text-gray-600 ${Ce?"rotate-90":""}`})]}),Ce&&(f.totalMessagesOpened!==void 0?s.jsxs("div",{className:"p-4 pt-0 border-t border-border",children:[s.jsxs("div",{className:"grid grid-cols-3 gap-3 mb-4",children:[s.jsxs("div",{className:"bg-blue-50 rounded-lg p-3 text-center",children:[s.jsx(L,{icon:Vk,className:"text-blue-500 mx-auto mb-1"}),s.jsx("div",{className:"text-xs text-blue-600 mb-1",children:"Taux d'ouverture"}),s.jsxs("div",{className:"text-xl font-bold text-blue-700",children:[((ei=f.openRate)==null?void 0:ei.toFixed(1))||0,"%"]})]}),s.jsxs("div",{className:"bg-purple-50 rounded-lg p-3 text-center",children:[s.jsx(L,{icon:Ag,className:"text-purple-500 mx-auto mb-1"}),s.jsx("div",{className:"text-xs text-purple-600 mb-1",children:"Taux de clic"}),s.jsxs("div",{className:"text-xl font-bold text-purple-700",children:[((An=f.clickRate)==null?void 0:An.toFixed(1))||0,"%"]})]}),s.jsxs("div",{className:"bg-green-50 rounded-lg p-3 text-center",children:[s.jsx(L,{icon:Sa,className:"text-green-500 mx-auto mb-1"}),s.jsx("div",{className:"text-xs text-green-600 mb-1",children:"CTR"}),s.jsxs("div",{className:"text-xl font-bold text-green-700",children:[(($a=f.clickThroughRate)==null?void 0:$a.toFixed(1))||0,"%"]})]})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex justify-between text-xs text-gray-600 mb-1",children:[s.jsx("span",{children:"Emails ouverts (uniques)"}),s.jsxs("span",{className:"font-bold",children:[f.totalMessagesOpened||0," / ",f.totalMessagesDelivered]})]}),s.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2",children:s.jsx("div",{className:"bg-blue-500 h-2 rounded-full transition-all",style:{width:`${f.openRate||0}%`}})})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex justify-between text-xs text-gray-600 mb-1",children:[s.jsx("span",{children:"Emails cliqués (uniques)"}),s.jsxs("span",{className:"font-bold",children:[f.totalMessagesClicked||0," / ",f.totalMessagesDelivered]})]}),s.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2",children:s.jsx("div",{className:"bg-purple-500 h-2 rounded-full transition-all",style:{width:`${f.clickRate||0}%`}})})]}),s.jsxs("div",{className:"pt-2 border-t border-border",children:[s.jsx("div",{className:"text-xs text-gray-500 mb-2",children:"Événements totaux"}),s.jsxs("div",{className:"flex gap-4 text-xs",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-gray-600",children:"Ouvertures: "}),s.jsx("span",{className:"font-bold text-blue-600",children:f.totalOpens||0})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-gray-600",children:"Clics: "}),s.jsx("span",{className:"font-bold text-purple-600",children:f.totalClicks||0})]})]})]})]})]}):s.jsx("div",{className:"p-4 pt-0 border-t border-border",children:s.jsxs("div",{className:"text-center py-6 text-gray-500",children:[s.jsx(L,{icon:Zb,size:30,className:"mx-auto mb-2 text-gray-300"}),s.jsx("p",{className:"text-sm",children:"Les données d'engagement seront disponibles une fois que les emails commencent à être suivis."}),s.jsx("p",{className:"text-xs mt-1 text-gray-400",children:"Le suivi des ouvertures et clics sera automatique."})]})}))]}),f.dayProgression&&f.dayProgression.length>0&&f.activeTargets>0&&s.jsxs("div",{className:"bg-white rounded-xl p-4 border border-border mb-4",children:[s.jsx("h5",{className:"font-bold text-sm text-gray-700 mb-3",children:"Distribution des cibles (7 j
282ours)"}),s.jsx("div",{className:"space-y-2",children:f.dayProgression.map(re=>{const fe=f.activeTargets>0?re.count/f.activeTargets*100:0;return s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"text-xs font-medium text-gray-600 w-12",children:["Jour ",re.day]}),s.jsx("div",{className:"flex-1",children:s.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2.5",children:s.jsx("div",{className:"bg-primary h-2.5 rounded-full transition-all duration-300",style:{width:`${fe}%`}})})}),s.jsxs("div",{className:"text-xs font-bold text-gray-700 w-16 text-right",children:[re.count," (",fe.toFixed(0),"%)"]})]},re.day)})})]}),s.jsxs("button",{onClick:()=>{j(!0),Si()},className:"bg-primary relance-targets-btn w-full text-white py-3 rounded-xl font-medium transition-all flex items-center justify-center gap-2",children:[s.jsx(L,{icon:wn})," Voir les cibles actives"]}),s.jsxs("button",{onClick:()=>{P(!0),Js()},className:"relance-recent-messages w-full mt-3 bg-white border-2 border-primary text-blue-600 py-3 rounded-xl font-medium hover:bg-blue-50 transition-all flex items-center justify-center gap-2",children:[s.jsx(L,{icon:to})," Derniers emails envoyés"]})]}),s.jsxs(Z.div,{variants:_O,className:"relance-campaigns mb-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("h3",{className:"text-lg font-bold",children:"Campagnes"}),s.jsxs("button",{onClick:Nt,className:"relance-new-campaign flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-bold bg-blue-500 text-white hover:bg-blue-600",children:[s.jsx(L,{icon:kl})," Nouvelle Campagne"]})]}),m.length===0?s.jsxs("div",{className:"bg-gray-100 rounded-xl p-8 text-center text-gray-500",children:[s.jsx(L,{icon:yo,size:36,className:"mx-auto mb-3 text-gray-400"}),s.jsx("p",{className:"mb-2",children:"Aucune campagne créée"}),s.jsx("p",{className:"text-sm",children:"Créez une campagne pour cibler des utilisateurs spécifiques"})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"space-y-4",children:m.slice(0,3).map((re,fe)=>{const We=re.messagesSent>0?re.messagesDelivered/re.messagesSent*100:0;return s.jsxs(Z.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:fe*.1},className:"rounded-2xl p-5 border-2 bg-white border-border",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"font-bold text-lg text-gray-800",children:re.name}),s.jsxs("p",{className:"text-xs text-gray-500",children:["Créée le ",new Date(re.createdAt).toLocaleDateString("fr-FR")]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[js(re.status),s.jsx("button",{onClick:()=>Rn(fn===re._id?null:re._id),className:"p-2 hover:bg-gray-100 rounded-lg transition-colors",children:s.jsx(L,{icon:Mn,className:`transition-transform text-gray-600 ${fn===re._id?"rotate-90":""}`})})]})]}),s.jsxs("div",{className:"grid grid-cols-3 gap-3 mb-4",children:[s.jsxs("div",{className:"bg-gray-50 rounded-xl p-3",children:[s.jsx("div",{className:"text-xs text-gray-500",children:"Cibles"}),s.jsx("div",{className:"text-xl font-bold text-gray-800",children:re.targetsEnrolled})]}),s.jsxs("div",{className:"bg-gray-50 rounded-xl p-3",children:[s.jsx("div",{className:"text-xs text-gray-500",children:"Emails"}),s.jsx("div",{className:"text-xl font-bold text-blue-600",children:re.messagesSent})]}),s.jsxs("div",{className:"bg-gray-50 rounded-xl p-3",children:[s.jsx("div",{className:"text-xs text-gray-500",children:"Livraison"}),s.jsxs("div",{className:"text-xl font-bold text-green-600",children:[We.toFixed(0),"%"]})]})]}),fn===re._id&&s.jsxs(Z.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},className:"border-t border-border pt-4 mt-2 space-y-3",children:[s.jsxs("button",{onClick:()=>{Bt(re),$(!1),as(re._id)},className:"w-full bg-blue-50 text-blue-600 border border-border py-2 rounded-xl font-medium hover:bg-blue-100 transition-colors flex items-center justify-center gap-2",children:[s.jsx(L,{icon:zc})," Voir les détails"]}),Tt(re)]})]},re._id)})}),m.length>3&&s.jsxs("button",{onClick:()=>_n(!0),className:"w-full mt-4 bg-gray-100 text-gray-700 py-3 rounded-xl font-medium hover:bg-gray-200 transition-colors",children:["Voir tout (",m.length," campagnes)"]})]})]})]}),s.jsx(It,{children:N&&s.jsx(Z.div,{initial:{opacity:0}
282,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/50 z-50 flex items-end",onClick:()=>j(!1),children:s.jsxs(Z.div,{initial:{y:"100%"},animate:{y:0},exit:{y:"100%"},transition:{type:"spring",damping:30},className:"bg-white w-full rounded-t-3xl max-h-[85vh] overflow-hidden flex flex-col",onClick:re=>re.stopPropagation(),children:[s.jsx("div",{className:"p-4 border-b border-border sticky top-0 bg-white z-10",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h3",{className:"text-xl font-bold text-gray-800",children:"Cibles actives"}),s.jsx("button",{onClick:()=>j(!1),className:"p-2 hover:bg-gray-100 rounded-full",children:s.jsx(L,{icon:gt,className:"text-gray-600",size:20})})]})}),s.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:S?s.jsxs("div",{className:"text-center py-8",children:[s.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary mx-auto"}),s.jsx("p",{className:"text-gray-500 mt-2",children:"Chargement..."})]}):A.length===0?s.jsxs("div",{className:"text-center py-8 text-gray-500",children:[s.jsx(L,{icon:wn,size:36,className:"mx-auto mb-3 text-gray-400"}),s.jsx("p",{children:"Aucune cible active"})]}):s.jsxs("div",{children:[s.jsxs("div",{className:"mb-3 text-sm text-gray-500 text-right",children:[A.length," cible",A.length>1?"s":""]}),s.jsx("div",{className:"space-y-3",children:A.map(re=>{var Ke,Et,Zt,vr;const fe=((Ke=re.messagesDelivered)==null?void 0:Ke.length)||0,We=new Date(re.enteredLoopAt).toLocaleDateString("fr-FR",{day:"2-digit",month:"short"});return s.jsxs("div",{className:"bg-gray-50 rounded-xl p-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center",children:s.jsx(L,{icon:wn,size:14,className:"text-blue-500"})}),s.jsxs("div",{children:[s.jsx("div",{className:"font-medium text-gray-800 text-sm",children:((Et=re.referralUser)==null?void 0:Et.name)||`Filleul #${((Zt=re.referralUserId)==null?void 0:Zt.slice(-6))||"..."}`}),((vr=re.referralUser)==null?void 0:vr.email)&&s.jsx("div",{className:"text-xs text-gray-500",children:re.referralUser.email})]})]}),s.jsx("span",{className:`text-xs px-2 py-1 rounded-full ${re.status==="active"||re.status==="completed"?"bg-green-100 text-green-700":re.status==="paused"?"bg-orange-100 text-orange-700":"bg-gray-100 text-gray-700"}`,children:re.status==="active"?"Actif":re.status==="completed"?"Terminé":re.status==="paused"?"En pause":re.status==="failed"?"Échoué":re.status})]}),s.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[s.jsxs("span",{className:"text-xs text-gray-500 w-14",children:["Jour ",re.currentDay,"/7"]}),s.jsx("div",{className:"flex gap-1 flex-1",children:Array.from({length:7},(ae,ve)=>{var Vt;const Ie=ve+1,ut=(Vt=re.messagesDelivered)==null?void 0:Vt.some(jr=>jr.day===Ie),Mt=Ie===re.currentDay&&!ut;return s.jsx("div",{className:`h-2 flex-1 rounded-full ${ut?"bg-green-500":Mt?"bg-blue-400 animate-pulse":"bg-gray-200"}`,title:`Jour ${Ie}${ut?" - Envoyé":Mt?" - En cours":""}`},Ie)})}),s.jsxs("span",{className:"text-xs text-gray-500 w-10 text-right",children:[fe,"/7"]})]}),s.jsxs("div",{className:"flex items-center gap-3 mt-2 text-xs text-gray-400",children:[s.jsxs("span",{children:["Inscrit le ",We]}),re.lastMessageSentAt&&s.jsxs(s.Fragment,{children:[s.jsx("span",{children:"•"}),s.jsxs("span",{children:["Dernier email: ",new Date(re.lastMessageSentAt).toLocaleTimeString("fr-FR",{hour:"2-digit",minute:"2-digit"})]})]})]})]},re._id)})})]})})]})})}),s.jsx(It,{children:D&&s.jsx(Z.div,{initial:{opacity:0}
282,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/50 flex items-end justify-center z-50",onClick:()=>P(!1),children:s.jsxs(Z.div,{initial:{y:"100%"},animate:{y:0},exit:{y:"100%"},transition:{type:"spring",damping:30},className:"bg-white w-full rounded-t-3xl max-h-[85vh] overflow-hidden flex flex-col",onClick:re=>re.stopPropagation(),children:[s.jsx("div",{className:"p-4 border-b border-border sticky top-0 bg-white z-10",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h3",{className:"text-xl font-bold text-gray-800",children:"Derniers emails envoyés"}),s.jsx("button",{onClick:()=>P(!1),className:"p-2 hover:bg-gray-100 rounded-full",children:s.jsx(L,{icon:gt,className:"text-gray-600",size:20})})]})}),s.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:I?s.jsxs("div",{className:"text-center py-8",children:[s.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary mx-auto"}),s.jsx("p",{className:"text-gray-500 mt-2",children:"Chargement..."})]}):O.length===0?s.jsxs("div",{className:"text-center py-8 text-gray-500",children:[s.jsx(L,{icon:to,size:36,className:"mx-auto mb-3 text-gray-400"}),s.jsx("p",{children:"Aucun email envoyé récemment"})]}):s.jsx("div",{className:"space-y-3",children:O.map((re,fe)=>{var vr,ae;const We=new Date(re.sentAt),Ke=We.toLocaleDateString("fr-FR",{day:"2-digit",month:"short",year:"numeric"}),Et=We.toLocaleTimeString("fr-FR",{hour:"2-digit",minute:"2-digit"}),Zt=re.status==="delivered";return s.jsxs("div",{className:"bg-gray-50 rounded-xl p-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center ${Zt?"bg-green-100":"bg-red-100"}`,children:s.jsx(L,{icon:to,className:`text-xs ${Zt?"text-green-500":"text-red-500"}`})}),s.jsxs("div",{children:[s.jsx("div",{className:"font-medium text-gray-800 text-sm",children:((vr=re.referralUser)==null?void 0:vr.name)||"Utilisateur inconnu"}),((ae=re.referralUser)==null?void 0:ae.email)&&s.jsx("div",{className:"text-xs text-gray-500",children:re.referralUser.email})]})]}),s.jsx("span",{className:`text-xs px-2 py-1 rounded-full ${Zt?"bg-green-100 text-green-700":"bg-red-100 text-red-700"}`,children:Zt?"Livré":"Échoué"})]}),s.jsxs("div",{className:"flex items-center gap-3 text-xs text-gray-400",children:[s.jsx("span",{"aria-label":re.channel==="sms"?"SMS":"Email",children:re.channel==="sms"?"📱":"📧"}),s.jsxs("span",{children:["Jour ",re.day,"/7"]}),s.jsx("span",{children:"•"}),s.jsxs("span",{children:[Ke," à ",Et]}),re.campaignName&&s.jsxs(s.Fragment,{children:[s.jsx("span",{children:"•"}),s.jsx("span",{className:"text-blue-500",children:re.campaignName})]})]})]},fe)})})})]})})}),s.jsx(It,{children:y&&s.jsx(Z.div,{initial:{opacity:0}
282,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",onClick:()=>v(!1),children:s.jsxs(Z.div,{initial:{scale:.9},animate:{scale:1},exit:{scale:.9},className:"bg-white rounded-2xl p-6 max-w-2xl w-full max-h-[90vh] overflow-y-auto",onClick:re=>re.stopPropagation(),children:[s.jsxs("h3",{className:"text-xl font-bold mb-4",children:["Créer une campagne - Étape ",b,"/4"]}),b===1&&s.jsxs("div",{children:[s.jsx("label",{className:"block mb-2 font-medium",children:"Nom de la campagne"}),s.jsx("input",{type:"text",value:Ne,onChange:re=>ye(re.target.value),placeholder:"Ex: Campagne Cameroun Janvier",className:"w-full h-12 border border-border rounded-lg px-3 mb-5"}),s.jsx("label",{className:"block mb-2 font-medium",children:"Canal d'envoi"}),s.jsx("div",{role:"radiogroup","aria-label":"Canal d'envoi",className:"grid grid-cols-3 gap-2 mb-1",children:[{value:"email",label:"📧 Email",smsRequired:!1},{value:"sms",label:"📱 SMS",smsRequired:!0},{value:"both",label:"📧📱 Les deux",smsRequired:!0}].map(re=>{const fe=re.smsRequired&&!ir,We=ee===re.value;return s.jsx("button",{type:"button",role:"radio","aria-checked":We,disabled:fe,onClick:()=>Ae(re.value),className:`min-h-[48px] px-2 rounded-xl border-2 text-sm font-semibold transition-colors ${We?"bg-emerald-500/20 border-success text-emerald-800":"bg-white border-border text-gray-700 hover:border-success"} ${fe?"opacity-50 cursor-not-allowed":""}`,children:re.label},re.value)})}),!ir&&s.jsx("p",{className:"text-xs text-gray-500 mb-5",children:"Contactez le support pour activer le SMS."}),ir&&s.jsx("div",{className:"mb-5"}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("button",{onClick:()=>v(!1),className:"flex-1 min-h-[44px] bg-gray-200 text-gray-700 py-2 rounded-lg hover:bg-gray-300",children:"Annuler"}),s.jsx("button",{onClick:()=>E(2),disabled:!Ne.trim(),className:"flex-1 min-h-[44px] bg-blue-500 text-white py-2 rounded-lg hover:bg-blue-600 disabled:bg-gray-300 disabled:cursor-not-allowed",children:"Suivant"})]})]}),b===2&&s.jsxs("div",{children:[s.jsxs("div",{className:"mb-4",children:[s.jsx("label",{className:"block text-gray-700 mb-2 font-medium",children:"🌍 Pays (optionnel)"}),s.jsx("div",{className:"flex flex-wrap gap-2 max-h-40 overflow-y-auto border border-border rounded-xl p-3",children:Pn.map(re=>{var We;const fe=(We=Se.countries)==null?void 0:We.includes(re.code);return s.jsx("button",{type:"button",className:`px-3 py-1 rounded-full border text-xs font-medium ${fe?"bg-blue-600 text-white border-primary":"bg-white text-gray-700 border-border"}`,onClick:()=>{var Ke;He({...Se,countries:fe?(Ke=Se.countries)==null?void 0:Ke.filter(Et=>Et!==re.code):[...Se.countries||[],re.code]})},children:re.label},re.code)})})]}),s.jsxs("div",{className:"mb-4",children:[s.jsx("label",{className:"block text-gray-700 mb-2 font-medium",children:"📅 Période d'inscription (optionnel)"}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-600 text-xs mb-1",children:"De"}),s.jsx("input",{type:"month",value:Se.registrationDateFrom?Se.registrationDateFrom.substring(0,7):"",onCh
282ange:re=>{const fe=re.target.value;He({...Se,registrationDateFrom:fe?`${fe}-01T00:00:00.000Z`:void 0})},className:"w-full border border-border rounded-xl px-4 py-2"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-600 text-xs mb-1",children:"À"}),s.jsx("input",{type:"month",value:Se.registrationDateTo?Se.registrationDateTo.substring(0,7):"",onChange:re=>{const fe=re.target.value;if(fe){const We=new Date(fe),Ke=new Date(We.getFullYear(),We.getMonth()+1,0).getDate();He({...Se,registrationDateTo:`${fe}-${Ke}T23:59:59.999Z`})}else He({...Se,registrationDateTo:void 0})},className:"w-full border border-border rounded-xl px-4 py-2"})]})]})]}),s.jsxs("div",{className:"mb-4",children:[s.jsx("label",{className:"block text-gray-700 mb-2 font-medium",children:"💳 Statut d'abonnement"}),s.jsx("div",{className:"flex gap-2",children:[{value:"non-subscribed",label:"Non abonnés",desc:"Filleuls qui n'ont pas encore payé"},{value:"subscribed",label:"Abonnés",desc:"Filleuls avec abonnement actif (CLASSIQUE/CIBLE)"},{value:"all",label:"Tous",desc:"Tous les filleuls"}].map(re=>s.jsx("button",{type:"button",className:`flex-1 px-3 py-2 rounded-xl border text-sm font-medium transition-colors ${Se.subscriptionStatus===re.value?"bg-blue-600 text-white border-primary":"bg-white text-gray-700 border-border hover:border-primary"}`,onClick:()=>He({...Se,subscriptionStatus:re.value}),title:re.desc,children:re.label},re.value))}),s.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:[Se.subscriptionStatus==="non-subscribed"&&"Cible les filleuls qui n'ont pas encore souscrit à un abonnement",Se.subscriptionStatus==="subscribed"&&"Cible les filleuls avec un abonnement CLASSIQUE ou CIBLE actif",Se.subscriptionStatus==="all"&&"Cible tous les filleuls, peu importe leur statut d'abonnement"]})]}),s.jsx("div",{className:"mb-4 space-y-3",children:s.jsxs("label",{className:"flex items-center gap-2",children:[s.jsx("input",{type:"checkbox",checked:Se.excludeCurrentTargets||!1,onChange:re=>He({...Se,excludeCurrentTargets:re.target.checked}),className:"w-4 h-4"}),s.jsx("span",{className:"text-sm",children:"Exclure les utilisateurs déjà dans une campagne"})]})}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("button",{onClick:()=>E(1),className:"flex-1 bg-gray-200 text-gray-700 py-2 rounded-xl hover:bg-gray-300",children:"Retour"}),s.jsx("button",{onClick:()=>E(3),className:"flex-1 bg-blue-500 text-white py-2 rounded-xl hover:bg-blue-600",children:"Suivant"})]})]}),b===3&&s.jsxs("div",{children:[s.jsx("div",{className:"bg-blue-50 border border-border rounded-lg p-4 mb-6",children:s.jsx("p",{className:"text-sm text-blue-800",children:"Vous pouvez personnaliser les emails envoyés chaque jour. Si vous ne définissez pas de message personnalisé, les messages par défaut seront utilisés."})}),s.jsxs("label",{className:"flex items-center gap-3 cursor-pointer mb-6",children:[s.jsx("input",{type:"checkbox",checked:wt,onChange:re=>Ft(re.target.checked),className:"w-5 h-5 text-blue-600"}),s.jsx("span",{className:"font-semibold text-gray-800",children:"Utiliser des messages personnalisés"})]}),wt&&s.jsxs("div",{children:[s.jsx("div",{className:"mb-4 overflow-x-auto",children:s.jsx("div",{className:"flex gap-2 min-w-max",children:[1,2,3,4,5,6,7].map(re=>s.jsxs("button",{onClick:()=>Gr(re),className:`px-4 py-2 rounded-lg font-medium transition-colors ${ft===re?"bg-blue-500 text-white":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,children:["Jour ",re]},re))})}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-semibold text-gray-700 mb-2",children:"Objet de l'email (optionnel)"}),s.jsx("input",{type:"text",value:((mn=xt[ft-1])==null?void 0:mn.subject)||"",onChange:re=>{const fe=[...xt];fe[ft-1]={...fe[ft-1],subject:re.target.value},Kt(fe)},placeholder:"Laissez vide pour utiliser l'objet par défaut",className:"w-full px-3 py-2 border border-border rounded-lg text-sm"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-semibold text-gray-700 mb-2",children:"Message en français *"}),s.jsx("textarea",{value:((za=xt[ft-1])==null?void 0:za.messageTemplate.fr)||"",onChange:re=>{const fe=[...xt];fe[ft-1].messageTemplate.fr=re.target.value,Kt(fe)},placeholder:"Bonjour {{name}}, ...",className:"w-full px-3 py-2 border border-border rounded-lg",rows:4})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-semibold text-gray-700 mb-2",children:"Message en anglais *"}),s.jsx("textarea",{value:((Va=xt[ft-1])==null?void 0:Va.messageTemplate.en)||"",onChange:re=>{const fe=[...xt];fe[ft-1].messageTemplate.en=re.target.value,Kt(fe)},placeholder:"Hello {{name}}, ...",className:"w-full px-3 py-2 border border-border rounded-lg",rows:4})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-semibold text-gray-700 mb-2",children:"Boutons CTA (optionnel, max 3)"}),s.jsxs("div",{className:"space-y-2",children:[(((Di=xt[ft-1])==null?void 0:Di.buttons)||[]).map((re,fe)=>s.jsxs("div",{className:"flex items-center gap-2 bg-gray-50 rounded-lg p-2",children:[s.jsx("input",{type:"text",value:re.label,onChange:We=>{const Ke=[...xt],Et=[...Ke[ft-1].buttons||[]];Et[fe]={...Et[fe],label:We.target.value},Ke[ft-1]={...Ke[ft-1],buttons:Et},Kt(Ke)},placeholder:"Texte du bouton",className:"flex-1 px-2 py-1.5 border border-border rounded text-sm"}),s.jsx("input",{type:"url",value:re.url,onChange:We=>{const Ke=[...xt],Et=[...Ke[ft-1].buttons||[]];Et[fe]={...Et[fe],url:We.target.value},Ke[ft-1]={...Ke[ft-1],buttons:Et},Kt(Ke)},placeholder:"https://...",className:"flex-1 px-2 py-1.5 border border-border rounded text-sm"}),s.jsx("input",{type:"color",value:re.color||"#F59E0B",onChange:We=>{const Ke=[...xt],Et=[...Ke[ft-1].buttons||[]];Et[fe]={...Et[fe],color:We.target.value},Ke[ft-1]={...Ke[ft-1],buttons:Et},Kt(Ke)},className:"w-8 h-8 rounded cursor-pointer border-0",title:"Couleur du bouton"}),s.jsx("button",{onClick:()=>{const We=[...xt],Ke=[...We[ft-1].buttons||[]];Ke.splice(fe,1),We[ft-1]={...We[ft-1],buttons:Ke},Kt(We)},className:"text-red-500 hover:text-red-700 p-1",children:s.jsx(L,{icon:gt,size:12})})]},fe)),(((ti=(Ns=xt[ft-1])==null?void 0:Ns.buttons)==null?void 0:ti.length)||0)<3&&s.jsxs("button",{onClick:()=>{const re=[...xt],fe=[...re[ft-1].buttons||[]];fe.push({label:"",url:"",color:"#F59E0B"}),re[ft-1]={...re[ft-1],buttons:fe},Kt(re)},className:"text-blue-600 text-sm font-medium hover:text-blue-700 flex items-center gap-1",children:[s.jsx(L,{icon:kl,size:10})," Ajouter un bouton"]})]})]}),s.jsxs("div",{className:"bg-gray-50 border border-border rounded-lg p-3",children:[s.jsx("p",{className:"text-xs font-semibold text-gray-700 mb-2",children:"Variables disponibles :"}),s.jsxs("div",{className:"text-xs text-gray-600 space-y-1",children:[s.jsxs("div",{children:[s.jsx("code",{className:"bg-white px-2 py-0.5 rounded",children:"{{name}}"})," - Nom du filleul"]}),s.jsxs("div",{children:[s.jsx("code",{className:"bg-white px-2 py-0.5 rounded",children:"{{referrerName}}"})," - Nom du parrain"]}),s.jsxs("div",{children:[s.jsx("code",{className:"bg-white px-2 py-0.5 rounded",children:"{{day}}"})," - Numéro du jour (1-7)"]})]})]}),s.jsxs("button",{onClick:()=>Fo(ft),disabled:he||!((As=xt[ft-1])!=null&&As.messageTemplate.fr)&&!((ri=xt[ft-1])!=null&&ri.messageTemplate.en),className:"w-full bg-orange-500 text-white py-2.5 rounded-xl font-medium hover:bg-orange-600 transition-colors disabled:bg-gray-300 disabled:cursor-not-allowed flex items-center justify-center gap-2",children:[s.jsx(L,{icon:zc})," ",he?"Chargement...":"Aperçu de l'email"]})]})]}),s.jsxs("div",{className:"flex gap-2 mt-6",children:[s.jsx("button",{onClick:()=>E(2),className:"flex-1 bg-gray-200 text-gray-700 py-2 rounded-lg hover:bg-gray-300",children:"Retour"}),s.jsxs("button",{onClick:ct,disabled:ue,className:"flex-1 bg-blue-500 text-white py-2 rounded-lg hover:bg-blue-600 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2",children:[ue&&s.jsxs("svg",{className:"animate-spin h-4 w-4 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[s.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),s.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"})]}),ue?"Chargement...":"Aperçu des résultats"]})]})]}),b===4&&Ue&&s.jsxs("div",{children:[s.jsxs("div",{className:"bg-green-50 border border-success rounded-lg p-4 mb-4",children:[s.jsx("p",{className:"font-bold text-green-700 mb-2",children:"✓ Filtres appliqués avec succès"}),s.jsxs("p",{className:"text-sm text-gray-600",children:["Total : ",Ue.totalCount," utilisateurs"]}
282)]}),s.jsx("h4",{className:"font-bold mb-3",children:"Échantillon d'utilisateurs :"}),s.jsx("div",{className:"space-y-2 mb-4 max-h-64 overflow-y-auto",children:Ue.sampleUsers.map(re=>s.jsxs("div",{className:"bg-gray-50 rounded-lg p-3 text-sm",children:[s.jsx("div",{className:"font-bold",children:re.name}),s.jsxs("div",{className:"text-gray-600",children:[re.email," | ",re.country]})]},re._id))}),(()=>{const re=Ue.totalCount||0,fe=Math.max(0,Math.floor(De||0)),We=je.trim(),Ke=We===""?re-fe:Math.max(0,Math.floor(Number(We)||0)),Et=re>0?fe+1:0,Zt=Math.min(fe+Ke,re);return s.jsxs("div",{className:"mb-4 border border-border rounded-xl p-3 bg-gray-50",children:[s.jsx("h5",{className:"font-semibold text-sm text-gray-800 mb-2",children:"Combien de contacts ?"}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs text-gray-600 mb-1",htmlFor:"contact-offset",children:"À partir de #"}),s.jsx("input",{id:"contact-offset",type:"number",inputMode:"numeric",min:0,max:Math.max(0,re-1),value:De,onChange:vr=>{const ae=Number(vr.target.value);we(Number.isNaN(ae)?0:Math.max(0,ae))},className:"w-full h-12 border border-border rounded-lg px-3 text-sm bg-white"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs text-gray-600 mb-1",htmlFor:"contact-limit",children:"Combien ?"}),s.jsx("input",{id:"contact-limit",type:"number",inputMode:"numeric",min:0,placeholder:`Tous (${re})`,value:je,onChange:vr=>Te(vr.target.value),className:"w-full h-12 border border-border rounded-lg px-3 text-sm bg-white"})]})]}),s.jsx("p",{className:"text-xs text-gray-600 mt-2",children:re===0?"Aucun contact ne correspond aux filtres.":Ke===0?"Sélectionnez une quantité supérieure à 0.":`Envoie aux contacts ${Et}–${Zt} sur ${re}.`}),s.jsx("p",{className:"text-xs text-gray-400 mt-1",children:"Laisser « Combien ? » vide pour envoyer à tous."})]})})(),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("button",{onClick:()=>E(3),className:"flex-1 min-h-[44px] bg-gray-200 text-gray-700 py-2 rounded-lg hover:bg-gray-300",children:"Retour"}),s.jsxs("button",{onClick:yt,disabled:me,className:"flex-1 min-h-[44px] bg-green-500 text-white py-2 rounded-lg hover:bg-green-600 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2",children:[me&&s.jsxs("svg",{className:"animate-spin h-4 w-4 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[s.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),s.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"})]}),me?"Création en cours...":"Créer la campagne"]})]})]})]})})}),s.jsx(It,{children:hn&&s.jsx(Z.div,{initial:{opacity:0}
282,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/50 z-50 flex items-end",onClick:()=>_n(!1),children:s.jsxs(Z.div,{initial:{y:"100%"},animate:{y:0},exit:{y:"100%"},transition:{type:"spring",damping:30},className:"bg-white w-full rounded-t-3xl max-h-[85vh] overflow-hidden flex flex-col",onClick:re=>re.stopPropagation(),children:[s.jsx("div",{className:"p-4 border-b border-border sticky top-0 bg-white z-10",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h3",{className:"text-xl font-bold text-gray-800",children:"Historique des campagnes"}),s.jsx("button",{onClick:()=>_n(!1),className:"p-2 hover:bg-gray-100 rounded-full",children:s.jsx(L,{icon:gt,className:"text-gray-600",size:20})})]})}),s.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:s.jsx("div",{className:"space-y-2",children:m.map(re=>{const fe=re.messagesSent>0?re.messagesDelivered/re.messagesSent*100:0;return s.jsxs("div",{onClick:()=>{Bt(re),_n(!1),$(!1),as(re._id)},className:"flex items-center justify-between py-3 px-3 border-b border-border hover:bg-gray-50 rounded-lg cursor-pointer",children:[s.jsx("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("div",{className:"font-bold text-sm text-gray-800 truncate",children:re.name}),s.jsx("div",{className:"text-xs text-gray-500",children:new Date(re.createdAt).toLocaleDateString("fr-FR")})]})}),s.jsxs("div",{className:"flex flex-col items-end gap-1 flex-shrink-0 ml-2",children:[js(re.status),s.jsxs("div",{className:"text-xs text-green-600 font-medium",children:[fe.toFixed(0),"% livré"]})]})]},re._id)})})})]})})}),s.jsx(It,{children:fr&&s.jsx(Z.div,{initial:{opacity:0}
282,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/50 z-50 flex items-end",onClick:()=>{Bt(null),$(!1),_(null)},children:s.jsx(Z.div,{initial:{y:"100%"},animate:{y:0},exit:{y:"100%"},transition:{type:"spring",damping:30},className:"bg-white w-full rounded-t-3xl max-h-[90vh] overflow-hidden flex flex-col",onClick:re=>re.stopPropagation(),children:(()=>{var Et,Zt,vr;const re=fr,fe=W,We=((fe==null?void 0:fe.totalEnrolled)||re.targetsEnrolled)>0?((fe==null?void 0:fe.completedRelance)||re.targetsCompleted)/((fe==null?void 0:fe.totalEnrolled)||re.targetsEnrolled)*100:0,Ke=fe?fe.deliveryPercentage:re.messagesSent>0?re.messagesDelivered/re.messagesSent*100:0;return s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"p-4 border-b border-border sticky top-0 bg-white z-10 rounded-t-3xl",children:s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx("h3",{className:"text-xl font-bold text-gray-800 mb-1",children:re.name}),s.jsxs("div",{className:"flex items-center gap-2",children:[js(re.status),s.jsxs("span",{className:"text-xs text-gray-500",children:["Créée le ",new Date(re.createdAt).toLocaleDateString("fr-FR")]})]})]}),s.jsx("button",{onClick:()=>{Bt(null),$(!1),_(null)},className:"p-2 hover:bg-gray-100 rounded-full",children:s.jsx(L,{icon:gt,className:"text-gray-600",size:20})})]})}),s.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:z?s.jsxs("div",{className:"text-center py-8",children:[s.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary mx-auto"}),s.jsx("p",{className:"text-gray-500 mt-2",children:"Chargement des statistiques..."})]}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid grid-cols-2 gap-3 mb-4",children:[s.jsxs("div",{className:"bg-gray-50 rounded-xl p-3",children:[s.jsx("div",{className:"text-xs text-gray-500 mb-1",children:"Total inscrits"}),s.jsx("div",{className:"text-2xl font-bold text-gray-800",children:(fe==null?void 0:fe.totalEnrolled)??re.targetsEnrolled})]}),s.jsxs("div",{className:"bg-blue-50 rounded-xl p-3",children:[s.jsx("div",{className:"text-xs text-blue-600 mb-1",children:"En cours de relance"}),s.jsx("div",{className:"text-2xl font-bold text-blue-700",children:(fe==null?void 0:fe.activeTargets)??"-"})]}),s.jsxs("div",{className:"bg-green-50 rounded-xl p-3",children:[s.jsx("div",{className:"text-xs text-green-600 mb-1",children:"Conversions (Payés)"}),s.jsx("div",{className:"text-2xl font-bold text-green-700",children:(fe==null?void 0:fe.targetsConverted)??0})]}),s.jsxs("div",{className:"bg-purple-50 rounded-xl p-3",children:[s.jsx("div",{className:"text-xs text-purple-600 mb-1",children:"Taux de conversion"}),s.jsxs("div",{className:"text-2xl font-bold text-purple-700",children:[fe!=null&&fe.totalEnrolled?((fe.targetsConverted||0)/fe.totalEnrolled*100).toFixed(1):0,"%"]})]}),s.jsxs("div",{className:"bg-green-50 rounded-xl p-3",children:[s.jsx("div",{className:"text-xs text-green-600 mb-1",children:"Emails envoyés"}),s.jsx("div",{className:"text-2xl font-bold text-green-700",children:(fe==null?void 0:fe.totalMessagesSent)??re.messagesSent})]}),s.jsxs("div",{className:"bg-orange-50 rounded-xl p-3",children:[s.jsx("div",{className:"text-xs text-orange-600 mb-1",children:"Taux de livraison"}),s.jsxs("div",{className:"text-2xl font-bold text-orange-700",children:[Ke.toFixed(1),"%"]})]})]}),s.jsxs("div",{className:"bg-gray-50 rounded-xl p-3 mb-4",children:[s.jsxs("div",{className:"flex justify-between text-sm text-gray-600 mb-2",children:[s.jsx("span",{className:"font-medium",children:"Progression"}),s.jsxs("span",{className:"font-bold",children:[We.toFixed(0),"%"]})]}),s.jsx("div",{className:"w-full bg-gray-200 rounded-full h-3",children:s.jsx("div",{className:"bg-primary h-3 rounded-full",style:{width:`${We}%`}})})]}),(fe==null?void 0:fe.dayProgression)&&fe.dayProgression.length>0&&s.jsxs("div",{className:"bg-white rounded-xl p-3 border border-border mb-4",children:[s.jsx("h5",{className:"font-bold text-sm text-gray-700 mb-3",children:"Distribution des cibles (7 j
282ours)"}),s.jsx("div",{className:"space-y-2",children:fe.dayProgression.map(ae=>{const ve=fe.activeTargets||1,Ie=ae.count/ve*100;return s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"text-xs font-medium text-gray-600 w-12",children:["Jour ",ae.day]}),s.jsx("div",{className:"flex-1",children:s.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2",children:s.jsx("div",{className:"bg-primary h-2 rounded-full transition-all duration-300",style:{width:`${Ie}%`}})})}),s.jsxs("div",{className:"text-xs font-bold text-gray-700 w-14 text-right",children:[ae.count," (",Ie.toFixed(0),"%)"]})]},ae.day)})})]}),s.jsxs("div",{className:"bg-primary-soft rounded-xl p-4 border border-border mb-4",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[s.jsx(L,{icon:Zb,className:"text-purple-500"}),s.jsx("h5",{className:"font-bold text-sm text-gray-700",children:"Engagement des emails"}),(fe==null?void 0:fe.totalMessagesOpened)===void 0&&s.jsx("span",{className:"text-xs text-gray-400 italic",children:"(En attente)"})]}),(fe==null?void 0:fe.totalMessagesOpened)!==void 0?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid grid-cols-3 gap-2 mb-3",children:[s.jsxs("div",{className:"bg-white/80 rounded-lg p-2 text-center",children:[s.jsxs("div",{className:"text-2xl font-bold text-blue-600",children:[((Et=fe.openRate)==null?void 0:Et.toFixed(1))||0,"%"]}),s.jsx("div",{className:"text-xs text-gray-600",children:"Ouverture"})]}),s.jsxs("div",{className:"bg-white/80 rounded-lg p-2 text-center",children:[s.jsxs("div",{className:"text-2xl font-bold text-purple-600",children:[((Zt=fe.clickRate)==null?void 0:Zt.toFixed(1))||0,"%"]}),s.jsx("div",{className:"text-xs text-gray-600",children:"Clic"})]}),s.jsxs("div",{className:"bg-white/80 rounded-lg p-2 text-center",children:[s.jsxs("div",{className:"text-2xl font-bold text-green-600",children:[((vr=fe.clickThroughRate)==null?void 0:vr.toFixed(1))||0,"%"]}),s.jsx("div",{className:"text-xs text-gray-600",children:"CTR"})]})]}),s.jsxs("div",{className:"space-y-2 text-xs",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex justify-between text-gray-600 mb-1",children:[s.jsxs("span",{children:[s.jsx(L,{icon:Vk,className:"inline mr-1"}),"Ouverts (uniques)"]}),s.jsxs("span",{className:"font-bold",children:[fe.totalMessagesOpened||0," / ",fe.totalMessagesDelivered]})]}),s.jsx("div",{className:"w-full bg-gray-200 rounded-full h-1.5",children:s.jsx("div",{className:"bg-blue-500 h-1.5 rounded-full",style:{width:`${fe.openRate||0}%`}})})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex justify-between text-gray-600 mb-1",children:[s.jsxs("span",{children:[s.jsx(L,{icon:Ag,className:"inline mr-1"}),"Cliqués (uniques)"]}),s.jsxs("span",{className:"font-bold",children:[fe.totalMessagesClicked||0," / ",fe.totalMessagesDelivered]})]}),s.jsx("div",{className:"w-full bg-gray-200 rounded-full h-1.5",children:s.jsx("div",{className:"bg-purple-500 h-1.5 rounded-full",style:{width:`${fe.clickRate||0}%`}})})]}),s.jsxs("div",{className:"flex gap-3 pt-2 border-t border-border text-gray-600",children:[s.jsxs("span",{children:["Total ouvertures: ",s.jsx("strong",{className:"text-blue-600",children:fe.totalOpens||0})]}),s.jsxs("span",{children:["Total clics: ",s.jsx("strong",{className:"text-purple-600",children:fe.totalClicks||0})]})]})]})]}):s.jsx("div",{className:"text-center py-4 text-gray-500",children:s.jsx("p",{className:"text-xs",children:"Données d'engagement en attente"})})]}),(fe==null?void 0:fe.exitReasons)&&s.jsxs("div",{className:"bg-white rounded-xl p-3 border border-border mb-4",children:[s.jsx("h5",{className:"font-bold text-sm text-gray-700 mb-3",children:"Raisons de sortie"}),s.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[s.jsxs("div",{className:"bg-green-50 rounded-lg p-2",children:[s.jsx("div",{className:"text-xs text-green-600",children:"Payé"}),s.jsx("div",{className:"text-lg font-bold text-green-700",children:fe.exitReasons.paid})]}),s.jsxs("div",{className:"bg-blue-50 rounded-lg p-2",children:[s.jsx("div",{className:"text-xs text-blue-600",children:"7 jours terminés"}),s.jsx("div",{className:"text-lg font-bold text-blue-700",children:fe.exitReasons.completed_7_days})]}),s.jsxs("div",{className:"bg-orange-50 rounded-lg p-2",children:[s.jsx("div",{className:"text-xs text-orange-600",children:"Retrait manuel"}),s.jsx("div",{className:"text-lg font-bold text-orange-700",children:fe.exitReasons.manual})]}),s.jsxs("div",{className:"bg-gray-50 rounded-lg p-2",children:[s.jsx("div",{className:"text-xs text-gray-600",children:"Parrain inactif"}),s.jsx("div",{className:"text-lg font-bold text-gray-700",children:fe.exitReasons.referrer_inactive})]})]})]}),s.jsxs("button",{onClick:()=>{K||Do(re._id),$(!K)},className:"w-full mb-4 bg-white border-2 border-primary text-blue-600 py-2.5 rounded-xl font-medium hover:bg-blue-50 transition-all flex items-center justify-center gap-2",children:[s.jsx(L,{icon:to})," ",K?"Masquer les emails":"Voir les derniers emails"]}),K&&s.jsx("div",{className:"mb-4",children:H?s.jsxs("div",{className:"text-center py-4",children:[s.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-primary mx-auto"}),s.jsx("p",{className:"text-gray-500 mt-2 text-sm",children:"Chargement..."})]}):q.length===0?s.jsx("div",{className:"text-center py-4 text-gray-500 text-sm",children:"Aucun email envoyé pour cette campagne"}):s.jsx("div",{className:"space-y-2",children:q.map((ae,ve)=>{var jr,kn;const Ie=new Date(ae.sentAt),ut=Ie.toLocaleDateString("fr-FR",{day:"2-digit",month:"short"}),Mt=Ie.toLocaleTimeString("fr-FR",{hour:"2-digit",minute:"2-digit"}),Vt=ae.status==="delivered";return s.jsxs("div",{className:"bg-gray-50 rounded-xl p-3",children:[s.jsxs("div",{className:"flex items-center justify-between mb-1",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center ${Vt?"bg-green-100":"bg-red-100"}`,children:s.jsx(L,{icon:to,className:`text-[10px] ${Vt?"text-green-500":"text-red-500"}`})}),s.jsxs("div",{children:[s.jsx("div",{className:"font-medium text-gray-800 text-sm",children:((jr=ae.referralUser)==null?void 0:jr.name)||"Utilisateur inconnu"}),((kn=ae.referralUser)==null?void 0:kn.email)&&s.jsx("div",{className:"text-xs text-gray-500",children:ae.referralUser.email})]})]}),s.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${Vt?"bg-green-100 text-green-700":"bg-red-100 text-red-700"}`,children:Vt?"Livré":"Échoué"})]}),s.jsxs("div",{className:"flex items-center gap-2 text-xs text-gray-400 ml-8",children:[s.jsx("span",{"aria-label":ae.channel==="sms"?"SMS":"Email",children:ae.channel==="sms"?"📱":"📧"}),s.jsxs("span",{children:["Jour ",ae.day,"/7"]}),s.jsx("span",{children:"•"}),s.jsxs("span",{children:[ut," à ",Mt]})]})]},ve)})})}),s.jsxs("div",{className:"flex gap-3",children:[Tt(re),s.jsx("button",{onClick:()=>{Bt(null),$(!1),_(null)},className:"flex-1 bg-gray-200 text-gray-700 py-3 rounded-xl font-medium hover:bg-gray-300",children:"Fermer"})]})]})})]})})()})})}),s.jsx(It,{children:ne&&s.jsx(Z.div,{initial:{opacity:0}
282,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/50 z-[60] flex items-center justify-center p-4",onClick:()=>Y(!1),children:s.jsxs(Z.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},className:"bg-white rounded-2xl w-full max-w-2xl max-h-[90vh] overflow-hidden flex flex-col",onClick:re=>re.stopPropagation(),children:[s.jsxs("div",{className:"p-4 border-b border-border flex items-center justify-between",children:[s.jsx("h3",{className:"text-lg font-bold text-gray-800",children:"Aperçu de l'email"}),s.jsx("button",{onClick:()=>Y(!1),className:"p-2 hover:bg-gray-100 rounded-full",children:s.jsx(L,{icon:gt,className:"text-gray-600",size:18})})]}),s.jsx("div",{className:"flex-1 overflow-auto p-1",children:s.jsx("iframe",{srcDoc:J,sandbox:"allow-same-origin",className:"w-full border-0",style:{minHeight:"500px",height:"100%"},title:"Aperçu email"})})]})})}),s.jsx(It,{children:Pt.show&&s.jsx(Z.div,{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",initial:{opacity:0}
282,animate:{opacity:1},exit:{opacity:0},children:s.jsxs(Z.div,{className:"bg-white rounded-2xl p-6 w-[90vw] max-w-sm border border-border",initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},children:[s.jsx("h4",{className:"text-lg font-bold mb-4 text-center",children:"Confirmation"}),s.jsx("p",{className:"text-sm text-gray-700 text-center mb-4",children:Pt.message}),s.jsxs("div",{className:"flex gap-3",children:[s.jsx("button",{className:"flex-1 bg-red-500 text-white rounded-xl py-2 font-bold hover:bg-red-600",onClick:()=>{var re;(re=Pt.onConfirm)==null||re.call(Pt),Jt({show:!1,message:""})},children:"Confirmer"}),s.jsx("button",{className:"flex-1 bg-gray-200 text-gray-700 rounded-xl py-2 font-bold hover:bg-gray-300",onClick:()=>Jt({show:!1,message:""}),children:"Annuler"})]})]})})}),s.jsx(It,{children:Pe.show&&s.jsx(Z.div,{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>Rt({...Pe,show:!1}),children:s.jsxs(Z.div,{className:"bg-white rounded-2xl p-6 w-[90vw] max-w-md border border-border",initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},onClick:re=>re.stopPropagation(),children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[Pe.type==="success"&&s.jsx("span",{className:"text-3xl",children:"✅"}),Pe.type==="error"&&s.jsx("span",{className:"text-3xl",children:"❌"}),Pe.type==="info"&&s.jsx("span",{className:"text-3xl",children:"ℹ️"}),s.jsx("h4",{className:"text-lg font-bold",children:Pe.title})]}),s.jsx("p",{className:"text-gray-700 mb-6",children:Pe.message}),s.jsx("button",{className:"w-full bg-blue-500 text-white rounded-xl py-2 font-bold hover:bg-blue-600",onClick:()=>Rt({...Pe,show:!1}),children:"OK"})]})})}),s.jsx(p0,{}),s.jsx(kf,{isOpen:o!==!1,onClose:()=>l(!1),showEmail:o!=="sms",showSms:o!=="email"&&ir})]})}):s.jsxs(nn,{children:[s.jsxs("div",{className:"p-3 bg-white relative pb-20 min-h-screen",children:[s.jsxs("div",{className:"flex items-center mb-4",children:[s.jsx(Ct,{}),s.jsx("h3",{className:"text-xl font-medium text-center flex-1",children:"Relance"})]}),s.jsx("div",{className:"flex items-center justify-center h-[70vh]",children:s.jsxs(Z.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},className:"bg-primary-soft rounded-2xl p-8 max-w-md text-center border border-border",children:[s.jsx("div",{className:"text-6xl mb-4",children:"📧"}),s.jsx("h2",{className:"text-2xl font-bold text-gray-800 mb-3",children:"Relance Automatique"}),s.jsx("p",{className:"text-gray-600 mb-6",children:"Suivez automatiquement vos filleuls non payés par email (et SMS pour le Cameroun). Achetez des crédits, utilisez-les à votre rythme."}),s.jsxs("div",{className:"bg-white rounded-xl p-4 mb-6",children:[s.jsx("p",{className:"text-sm text-gray-500 mb-2",children:"Inclus :"}),s.jsxs("ul",{className:"text-left text-sm text-gray-700 space-y-1",children:[s.jsx("li",{children:"✅ Messages automatiques sur 7 jours"}),s.jsx("li",{children:"✅ Campagnes personnalisées"}),s.jsx("li",{children:"✅ Statistiques détaillées"}),s.jsx("li",{children:"✅ Pas d'abonnement — vous payez à l'usage"})]})]}),s.jsx("button",{onClick:()=>l("all"),className:"w-full bg-primary text-white font-bold py-3 rounded-xl hover:bg-blue-700 transition-colors",children:"Acheter des crédits"})]})})]}),s.jsx(kf,{isOpen:o!==!1,onClose:()=>l(!1),showEmail:o!=="sms",showSms:o!=="email"&&ir})]})}const oCe=(e,t)=>e==="auto"&&t===0?"J0 (15 min)":`J${t}`;function lCe(){const[e,t]=C.useState([]),[r,n]=C.useState({}),[i,a]=C.useState(!0),[o,l]=C.useState(!1),[c,u]=C.useState(""),[f,x]=C.useState(null);C.useEffect(()=>{let b=!1;return Promise.all([X.relanceGetSmsLinks(),X.relanceGetSmsTemplates()]).then(([E,N])=>{if(b)return;const j=Ve(E),A=(j==null?void 0:j.links)||[],w={};for(const D of A)w[`${D.type}:${D.dayNumber}`]=D.link;n(w);const S=Ve(N),B=Array.isArray(S)?S:(S==null?void 0:S.data)||[];t(B.filter(D=>D.active))}).catch(E=>{b||u((E==null?void 0:E.message)||"Impossible de charger les liens SMS.")}).finally(()=>{b||a(!1)}),()=>{b=!0}},[]);const m=C.useMemo(()=>{const b=[...e].sort((E,N)=>E.dayNumber-N.dayNumber);return{auto:b.filter(E=>E.type==="auto"),manual:b.filter(E=>E.type==="manual")}},[e]),p=(b,E,N)=>{n(j=>({...j,[`${b}:${E}`]:N}))},y=async()=>
282{l(!0),u(""),x(null);try{const b=[];for(const E of e){const N=(r[`${E.type}:${E.dayNumber}`]||"").trim();N&&b.push({type:E.type,dayNumber:E.dayNumber,link:N})}await X.relanceUpdateSmsLinks(b),x(new Date)}catch(b){u((b==null?void 0:b.message)||"Erreur lors de la sauvegarde.")}finally{l(!1)}},v=b=>{const E=`${b.type}:${b.dayNumber}`,N=r[E]||"";return s.jsxs(Z.div,{variants:qn,className:"border border-border rounded-lg p-3 bg-gray-50",children:[s.jsx("div",{className:"font-bold text-sm text-gray-700 mb-1",children:oCe(b.type,b.dayNumber)}),b.templateText&&s.jsx("div",{className:"text-xs text-gray-600 mb-2 whitespace-pre-wrap break-words",children:b.templateText}),s.jsx("input",{type:"url",value:N,onChange:j=>p(b.type,b.dayNumber,j.target.value),placeholder:"https://...",className:"w-full border border-border rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary bg-white"})]},E)};return s.jsx(nn,{children:s.jsxs(Z.div,{variants:On,initial:"hidden",animate:"show",className:"p-3 bg-white relative pb-24 min-h-screen",children:[s.jsxs(Z.div,{variants:Ia,className:"flex items-center mb-4",children:[s.jsx(Ct,{}),s.jsx("h3",{className:"text-xl font-medium text-center flex-1",children:"Mes liens SMS"})]}),s.jsx("p",{className:"text-sm text-gray-600 mb-4",children:"Définissez le lien à inclure dans chaque SMS. Numéros Cameroun (+237) uniquement."}),i&&s.jsx("div",{className:"text-center text-gray-500 py-8",children:"Chargement…"}),c&&s.jsx("div",{className:"bg-red-50 border border-border text-red-700 rounded-lg px-3 py-2 text-sm mb-4",children:c}),!i&&!c&&e.length===0&&s.jsx("div",{className:"text-center text-gray-500 py-8",children:"Aucun template SMS actif pour le moment."}),!i&&e.length>0&&s.jsxs(s.Fragment,{children:[m.auto.length>0&&s.jsxs("section",{className:"mb-6",children:[s.jsx("h4",{className:"font-bold text-gray-800 mb-3",children:"SMS automatiques"}),s.jsx(Z.div,{variants:Dl,initial:"hidden",animate:"show",className:"space-y-2",children:m.auto.map(v)})]}),m.manual.length>0&&s.jsxs("section",{className:"mb-6",children:[s.jsx("h4",{className:"font-bold text-gray-800 mb-3",children:"SMS manuels"}),s.jsx(Z.div,{variants:Dl,initial:"hidden",animate:"show",className:"space-y-2",children:m.manual.map(v)})]}),s.jsx("button",{onClick:y,disabled:o,className:"w-full bg-primary text-white font-bold py-3 rounded-xl hover:bg-blue-700 disabled:bg-blue-400 disabled:cursor-not-allowed transition-colors",children:o?"Sauvegarde…":"Enregistrer les liens"}),f&&s.jsxs("div",{className:"text-green-600 text-sm text-center mt-2",children:["✓ Liens enregistrés à ",f.toLocaleTimeString("fr-FR")]})]})]})})}function cCe(){var me,Le,Ne;const{user:e,refreshUser:t}=Gt(),[r,n]=C.useState("overview"),[i,a]=C.useState("all"),[o,l]=C.useState("direct"),[c,u]=C.useState(""),[f,x]=C.useState(""),[m,p]=C.useState(!1),[y,v]=C.useState(!1),[b,E]=C.useState(!1),[N,j]=C.useState(null);C.useEffect(()=>{const ye=setTimeout(()=>{x(c.trim())},500);return()=>clearTimeout(ye)},[c]);const{data:A,isLoading:w,refetch:S}=hr({queryKey:["activation-balance"],queryFn:async()=>{const ye=await X.getActivationBalance();return Ve(ye)},staleTime:3e4}),{data:B}=hr({queryKey:["activation-pricing"],queryFn:async()=>{const ye=await X.getActivationPricing();return Ve(ye)},staleTime:6e4*5}),{data:D,isLoading:P,fetchNextPage:O,hasNextPage:M,isFetchingNextPage:I,refetch:V}=jf({queryKey:["activation-referrals",i,f,o],queryFn:async({pageParam:ye=1})=>{const ee=await X.getActivationReferrals(i,ye,10,f||void 0,o);return Ve(ee)},getNextPageParam:(ye,ee)=>{const Ae=ee.length;return Ae<ye.pages?Ae+1:void 0},initialPageParam:1,enabled:r==="referrals"}),{data:W,isLoading:_,fetchNextPage:z,hasNextPage:R,isFetchingNextPage:q}=jf({queryKey:["activation-transaction-history"],queryFn:async({pageParam:ye=1})=>{var Ae;const ee=await X.getActivationTransactionHistory(ye,20);if(!ee.isSuccessByStatusCode)throw new Error(((Ae=ee.body)==null?void 0:Ae.message)||ee.message||"Failed to fetch history");return ee.body},getNextPageParam:(ye,ee)=>{var we;const Ae=ee.length,De=((we=ye==null?void 0:ye.pagination)==null?void 0:we.totalPages)||(ye==null?void 0:ye.totalPages)||(ye==null?void 0:ye.pages)||1;return Ae<De?Ae+1:void 0},initialPageParam:1,enabled:r==="history"}),G=C.useRef(null),K=C.useRef(null);C.useEffect(()=>{const ye=new IntersectionObserver(ee=>{ee[0].isIntersecting&&M&&!I&&O()},{threshold:.1});return G.current&&ye.observe(G.current),()=>ye.disconnect()},[M,I,O,D]),C.useEffect(()=>{const ye=new IntersectionObserver(ee=>{ee[0].isIntersecting&&R&&!q&&z()},{threshold:.1});return K.current&&ye.observe(K.current),()=>ye.disconnect()},[R,q,z,W]);const $=(B==null?void 0:B.pricing)||{CLASSIQUE:2150,CIBLE:5300,UPGRADE:3150},H=((me=B==null?void 0:B.minimumTransfers)==null?void 0:me.toActivation)||100,te=(A==null?void 0:A.activationBalance)||0,ne=(A==null?void 0:A.totalSponsored)||0,Y=(A==null?void 0:A.sponsoredCount)||0,J=(e==null?void 0:e.balance)||0,oe=(((Le=D==null?void 0:D.pages)==null?void 0:Le.flatMap(ye=>
282ye.referrals))||[]).filter(Boolean),he=((Ne=W==null?void 0:W.pages)==null?void 0:Ne.flatMap(ye=>ye.transactions||ye.activations||[]))||[],Q=oe,ue=ye=>{j(ye),E(!0)},de=async()=>{await Promise.all([S(),V(),t()])};return s.jsx(nn,{children:s.jsxs("div",{className:"min-h-screen bg-gray-50 relative",children:[s.jsx("div",{className:"bg-white sticky top-0 z-10 border border-border",children:s.jsxs("div",{className:"p-4 flex items-center",children:[s.jsx(Ct,{}),s.jsx("h3",{className:"text-xl font-semibold text-center w-full text-gray-900",children:"Solde d'Activation"})]})}),s.jsxs("div",{className:"p-4",children:[s.jsxs("div",{className:"bg-primary rounded-2xl p-6 text-white mb-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm opacity-80",children:"Solde d'Activation"}),w?s.jsx($e,{width:"w-32",height:"h-8",className:"bg-white/20"}):s.jsxs("p",{className:"text-3xl font-bold",children:[te.toLocaleString("fr-FR")," F"]})]}),s.jsx("div",{className:"bg-white/20 p-3 rounded-full",children:s.jsx(L,{icon:Al,size:28})})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4 mt-4 pt-4 border-t border-white/20",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-xs opacity-70",children:"Total sponsorisé"}),s.jsxs("p",{className:"text-lg font-semibold",children:[ne.toLocaleString("fr-FR")," F"]})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs opacity-70",children:"Filleuls sponsorisés"}),s.jsx("p",{className:"text-lg font-semibold",children:Y})]})]})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3 mb-6",children:[s.jsxs("button",{onClick:()=>p(!0),className:"flex items-center justify-center gap-2 bg-green-500 hover:bg-green-600 text-white p-4 rounded-xl transition-colors",children:[s.jsx(L,{icon:Ba,size:18}),s.jsx("span",{className:"font-medium",children:"Alimenter"})]}),s.jsxs("button",{onClick:()=>v(!0),className:"flex items-center justify-center gap-2 bg-orange-500 hover:bg-orange-600 text-white p-4 rounded-xl transition-colors",children:[s.jsx(L,{icon:$c,size:18}),s.jsx("span",{className:"font-medium",children:"Transférer"})]})]}),s.jsxs("div",{className:"bg-white rounded-xl p-4 mb-6 border border-border",children:[s.jsx("h4",{className:"font-semibold text-gray-800 mb-3",children:"Tarifs d'activation"}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex justify-between items-center py-2 border-b border-border",children:[s.jsx("span",{className:"text-gray-600",children:"CLASSIQUE"}),s.jsxs("span",{className:"font-semibold text-gray-900",children:[$.CLASSIQUE.toLocaleString("fr-FR")," F"]})]}),s.jsxs("div",{className:"flex justify-between items-center py-2 border-b border-border",children:[s.jsx("span",{className:"text-gray-600",children:"CIBLE"}),s.jsxs("span",{className:"font-semibold text-gray-900",children:[$.CIBLE.toLocaleString("fr-FR")," F"]})]}),s.jsxs("div",{className:"flex justify-between items-center py-2",children:[s.jsx("span",{className:"text-gray-600",children:"UPGRADE (CLASSIQUE → CIBLE)"}),s.jsxs("span",{className:"font-semibold text-gray-900",children:[$.UPGRADE.toLocaleString("fr-FR")," F"]})]})]})]}),s.jsx("div",{className:"flex bg-gray-200 rounded-xl p-1 mb-4",children:[{key:"overview",label:"Aperçu",icon:Ba},{key:"referrals",label:"Filleuls",icon:wn},{key:"history",label:"Historique",icon:iw}].map(ye=>s.jsxs("button",{onClick:()=>n(ye.key),className:`flex-1 flex items-center justify-center gap-2 py-2 rounded-lg text-sm font-medium transition-colors ${r===ye.key?"bg-white text-primary":"text-gray-600 hover:text-gray-800"} border border-border`,children:[s.jsx(L,{icon:ye.icon,size:14}),ye.label]},ye.key))}),s.jsxs(It,{mode:"wait",children:[r==="overview"&&s.jsxs(Z.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},children:[s.jsxs("div",{className:"bg-blue-50 border border-border rounded-xl p-4 mb-4",children:[s.jsx("h5",{className:"font-semibold text-blue-800 mb-2",children:"💡 À quoi sert le solde d'activation ?"}),s.jsx("p",{className:"text-sm text-blue-700",children:"Le solde d'activation vous permet de payer l'abonnement de vos filleuls (niveaux 1, 2 et 3). C'est un excellent moyen d'aider votre réseau à démarrer !"})]}),s.jsxs("div",{className:"bg-yellow-50 border border-border rounded-xl p-4 mb-4",children:[s.jsx("h5",{className:"font-semibold text-yellow-800 mb
282-2",children:"⚠️ Important"}),s.jsxs("ul",{className:"text-sm text-yellow-700 space-y-1",children:[s.jsx("li",{children:"• Le solde d'activation ne peut pas être retiré"}),s.jsx("li",{children:"• Il ne peut être utilisé que pour sponsoriser vos filleuls"}),s.jsx("li",{children:"• Les commissions vont aux parrains du bénéficiaire"}),s.jsxs("li",{children:["• Transfert minimum : ",H.toLocaleString("fr-FR")," F"]})]})]}),s.jsxs("div",{className:"bg-green-50 border border-border rounded-xl p-4",children:[s.jsx("h5",{className:"font-semibold text-green-800 mb-2",children:"✅ Avantages"}),s.jsxs("ul",{className:"text-sm text-green-700 space-y-1",children:[s.jsx("li",{children:"• Aidez vos filleuls à rejoindre la communauté"}),s.jsx("li",{children:"• Renforcez votre réseau de parrainage"}),s.jsx("li",{children:"• Transférez du solde d'activation à d'autres utilisateurs"})]})]})]},"overview"),r==="referrals"&&s.jsxs(Z.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},children:[s.jsxs("div",{className:"flex bg-gray-200 rounded-xl p-1 mb-4",children:[s.jsx("button",{onClick:()=>l("direct"),className:`flex-1 py-2 rounded-lg text-sm font-medium transition-colors ${o==="direct"?"bg-white text-primary":"text-gray-600 hover:text-gray-800"} border border-border`,children:"Directs (Niveau 1)"}),s.jsx("button",{onClick:()=>l("indirect"),className:`flex-1 py-2 rounded-lg text-sm font-medium transition-colors ${o==="indirect"?"bg-white text-primary":"text-gray-600 hover:text-gray-800"} border border-border`,children:"Indirects (Niveaux 2 & 3)"})]}),s.jsxs("div",{className:"mb-4 space-y-3",children:[s.jsxs("div",{className:"relative",children:[s.jsx(L,{icon:vo,className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-400"}),s.jsx("input",{type:"text",placeholder:"Rechercher un filleul...",value:c,onChange:ye=>u(ye.target.value),className:"w-full pl-10 pr-4 py-3 border border-border rounded-xl focus:outline-none focus:ring-2 focus:ring-blue-500"}),c&&s.jsx("button",{onClick:()=>u(""),className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600",children:s.jsx(L,{icon:gt})})]}),s.jsx("div",{className:"flex gap-2 overflow-x-auto pb-2",children:[{key:"all",label:"Tous"},{key:"activatable",label:"À activer"},{key:"upgradable",label:"À upgrader"}].map(ye=>s.jsx("button",{onClick:()=>a(ye.key),className:`px-4 py-2 rounded-full text-sm font-medium whitespace-nowrap transition-colors ${i===ye.key?"bg-primary text-white":"bg-gray-200 text-gray-700 hover:bg-gray-300"}`,children:ye.label},ye.key))})]}),P?s.jsx("div",{className:"space-y-3",children:[1,2,3].map(ye=>s.jsx($e,{height:"h-20",className:"rounded-xl"},ye))}):Q.length===0?s.jsxs("div",{className:"text-center py-12",children:[s.jsx(L,{icon:wn,className:"mx-auto text-gray-300 mb-4",size:48}),s.jsx("p",{className:"text-gray-500",children:i==="all"?"Aucun filleul trouvé":i==="activatable"?"Aucun filleul à activer":"Aucun filleul à upgrader"})]}):s.jsxs("div",{className:"space-y-3",children:[Q.map((ye,ee)=>s.jsx("div",{ref:ee===Q.length-1?G:null,className:"bg-white rounded-xl p-4 border border-border",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"bg-primary w-12 h-12 rounded-full flex items-center justify-center text-white font-bold text-lg",children:ye.avatar?s.jsx("img",{src:X.generateThumbnailUrl(ye.avatar,96)||rn,alt:ye.name,className:"w-full h-full rounded-full object-cover"}):ye.name.charAt(0).toUpperCase()}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"font-semibold text-gray-900 truncate",children:ye.name}),s.jsx("p",{className:"text-sm text-gray-500 truncate",children:ye.email}),s.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[s.jsxs("span",{className:`text-xs px-2 py-0.5 rounded-full ${ye.referralLevel===1?"bg-blue-100 text-blue-700":ye.referralLevel===2?"bg-purple-100 text-purple-700":"bg-green-100 text-green-700"}`,children:["Niveau ",ye.referralLevel]}),ye.currentSubscriptionType&&s.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-gray-100 text-gray-700",children:ye.currentSubscriptionType})]})]}),ye.hasActiveSubscription?ye.canUpgrade?s.jsxs("button",{onClick:()=>ue(ye),className:"bg-orange-500 hover:bg-orange-600 text-white px-4 py-2 rounded-lg text-sm font-medium transition-colors flex items-center gap-1",children:[s.jsx(L,{icon:Mn,size:14}),"Upgrade"]}):s.jsxs("span",{className:"text-primary text-sm font-medium flex items-center gap-1",children:[s.jsx(L,{icon:Ur,size:14}),"Actif"]}):s.jsxs("button",{onClick:()=>ue(ye),className:"bg-green-500 hover:bg-green-600 text-white px-4 py-2 rounded-lg text-sm font-medium transition-colors flex items-center gap-1",children:[s.jsx(L,{icon:$re,size:14}),"Activer"]})]})},ye._id)),I&&s.jsx("div",{className:"flex justify-center py-4",children:s.jsx(L,{icon:Yt,className:"animate-spin text-amber-500",size:24})})]})]},"referrals"),r==="history"&&s.jsx(Z.div,{initial:{opacity:0,y:10}
282,animate:{opacity:1,y:0},exit:{opacity:0,y:-10},children:_?s.jsx("div",{className:"bg-ink rounded-2xl p-4",children:s.jsx("div",{className:"space-y-3",children:[1,2,3].map(ye=>s.jsx($e,{height:"h-[60px]",className:"rounded-lg bg-white/10"},ye))})}):he.length===0?s.jsxs("div",{className:"bg-ink rounded-2xl p-8 text-center",children:[s.jsx(L,{icon:iw,className:"mx-auto text-gray-500 mb-4",size:48}),s.jsx("p",{className:"text-gray-400",children:"Aucun historique d'activation"})]}):s.jsxs("div",{className:"bg-ink rounded-2xl p-4",children:[s.jsx("div",{className:"font-semibold mb-3 text-white",children:"Historique des transactions"}),he.map((ye,ee)=>{const De=(()=>{var je,Te,Se,He,Ue,rt;switch(ye.type){case"activation_transfer_in":return{title:"Alimentation du solde",subtitle:"Transfert depuis le solde principal",icon:"💰",iconBgClass:"bg-green-100",iconTextClass:"text-green-700",amountClass:"text-green-400",amountPrefix:"+",titleClass:"text-white"};case"activation_transfer_out":return{title:((je=ye.metadata)==null?void 0:je.recipientName)||"Transfert P2P",subtitle:((Te=ye.metadata)==null?void 0:Te.recipientEmail)||"Transfert vers un autre utilisateur",icon:"💸",iconBgClass:"bg-orange-100",iconTextClass:"text-orange-700",amountClass:"text-red-400",amountPrefix:"-",titleClass:"text-white"};case"sponsor_activation":return{title:((Se=ye.metadata)==null?void 0:Se.beneficiaryName)||"Sponsoring",subtitle:((He=ye.metadata)==null?void 0:He.subscriptionType)||ye.description||"Activation sponsorisée",icon:"🎁",iconBgClass:((Ue=ye.metadata)==null?void 0:Ue.subscriptionType)==="UPGRADE"?"bg-orange-100":((rt=ye.metadata)==null?void 0:rt.subscriptionType)==="CIBLE"?"bg-blue-100":"bg-green-100",iconTextClass:"text-blue-700",amountClass:"text-orange-400",amountPrefix:"-",titleClass:"text-white"};default:return{title:ye.description||"Transaction",subtitle:"",icon:"💼",iconBgClass:"bg-gray-100",iconTextClass:"text-gray-700",amountClass:"text-gray-400",amountPrefix:"",titleClass:"text-white"}}})(),we=new Date(ye.createdAt).toLocaleDateString("fr-FR",{day:"2-digit",month:"short",hour:"2-digit",minute:"2-digit"});return s.jsxs("div",{ref:ee===he.length-1?K:null,className:"flex items-center justify-between py-3 border-b border-white/10 last:border-b-0 hover:bg-white/5 rounded-lg transition-colors",children:[s.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[s.jsx("div",{className:`flex items-center justify-center size-10 rounded-full ${De.iconBgClass}`,children:s.jsx("span",{className:"text-xl",children:De.icon})}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:`font-bold text-sm truncate max-w-[160px] ${De.titleClass}`,children:De.title}),s.jsx("div",{className:"text-xs text-gray-400",children:we})]})]}),s.jsxs("div",{className:"text-right ml-4",children:[s.jsxs("div",{className:`font-bold text-sm ${De.amountClass}`,children:[De.amountPrefix,ye.amount.toLocaleString("fr-FR")," F"]}),De.subtitle&&s.jsx("div",{className:"text-xs text-gray-500 truncate max-w-[100px]",children:De.subtitle})]})]},ye._id)}),q&&s.jsx("div",{className:"flex justify-center py-4",children:s.jsx(L,{icon:Yt,className:"animate-spin text-blue-400",size:24})})]})},"history")]})]}),s.jsx(uCe,{isOpen:m,onClose:()=>p(!1),mainBalance:J,minimumAmount:H,onSuccess:de}),s.jsx(dCe,{isOpen:y,onClose:()=>v(!1),activationBalance:te,minimumAmount:H,onSuccess:de}),s.jsx(xCe,{isOpen:b,onClose:()=>{E(!1),j(null)},referral:N,pricing:$,activationBalance:te,onSuccess:de})]})})}function uCe({isOpen:e,onClose:t,mainBalance:r,minimumAmount:n,onSuccess:i}){const[a,o]=C.useState(""),[l,c]=C.useState(!1),[u,f]=C.useState(""),[x,m]=C.useState(!1),p=async()=>{const v=parseInt(a);if(isNaN(v)||v<n){f(`Le montant minimum est de ${n.toLocaleString("fr-FR")} F`);return}if(v>r){f("Solde principal insuffisant");return}c(!0),f("");try{const b=await X.transferToActivationBalance(v);Ve(b),m(!0),i(),setTimeout(()=>{t(),o(""),m(!1)},2e3)}catch(b){f(b instanceof Error?b.message:"Une erreur est survenue")}finally{c(!1)}},y=()=>{o(""),f(""),m(!1),t()};return e?s.jsx(Z.div,{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",initial:{opacity:0}
282,animate:{opacity:1},exit:{opacity:0},onClick:y,children:s.jsx(Z.div,{className:"bg-white rounded-2xl p-6 w-[90vw] max-w-md border border-border",initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},onClick:v=>v.stopPropagation(),children:x?s.jsxs("div",{className:"text-center py-6",children:[s.jsx("div",{className:"w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx(L,{icon:Ur,className:"text-green-600",size:32})}),s.jsx("h4",{className:"text-xl font-bold text-green-600 mb-2",children:"Transfert réussi !"}),s.jsx("p",{className:"text-gray-600",children:"Votre solde d'activation a été alimenté."})]}):s.jsxs(s.Fragment,{children:[s.jsx("h4",{className:"text-xl font-bold text-gray-900 mb-4",children:"Alimenter le solde d'activation"}),s.jsxs("div",{className:"bg-gray-50 rounded-xl p-4 mb-4",children:[s.jsx("p",{className:"text-sm text-gray-600",children:"Solde principal disponible"}),s.jsxs("p",{className:"text-2xl font-bold text-gray-900",children:[r.toLocaleString("fr-FR")," F"]})]}),s.jsxs("div",{className:"mb-4",children:[s.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:["Montant à transférer (min. ",n.toLocaleString("fr-FR")," F)"]}),s.jsx("input",{type:"number",value:a,onChange:v=>{o(v.target.value),f("")},placeholder:"Ex: 5000",className:"w-full border border-border rounded-xl px-4 py-3 focus:outline-none focus:ring-2 focus:ring-blue-500 text-gray-900 bg-white"})]}),u&&s.jsx("div",{className:"mb-4 p-3 bg-red-50 border border-border rounded-xl",children:s.jsx("p",{className:"text-red-600 text-sm",children:u})}),s.jsx("div",{className:"bg-yellow-50 border border-border rounded-xl p-3 mb-4",children:s.jsx("p",{className:"text-xs text-yellow-700",children:"⚠️ Ce transfert est irréversible. Le solde d'activation ne peut pas être retiré."})}),s.jsxs("div",{className:"flex gap-3",children:[s.jsx("button",{onClick:y,className:"flex-1 bg-gray-200 text-gray-700 py-3 rounded-xl font-semibold hover:bg-gray-300 transition-colors",children:"Annuler"}),s.jsx("button",{onClick:p,disabled:l||!a,className:"flex-1 bg-primary text-white py-3 rounded-xl font-semibold hover:bg-blue-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2",children:l?s.jsx(L,{icon:Yt,className:"animate-spin"}):"Transférer"})]})]})})}):null}function dCe({isOpen:e,onClose:t,activationBalance:r,minimumAmount:n,onSuccess:i}){const[a,o]=C.useState(""),[l,c]=C.useState(""),[u,f]=C.useState(null),[x,m]=C.useState([]),[p,y]=C.useState(!1),[v,b]=C.useState(""),[E,N]=C.useState(!1),[j,A]=C.useState(""),[w,S]=C.useState(!1);C.useEffect(()=>{const M=setTimeout(()=>{c(a)},400);return()=>clearTimeout(M)},[a]),C.useEffect(()=>{(async()=>{if(l.length<2){m([]);return}y(!0);try{const I=await X.searchContacts({search:l,limit:3});if(I.isSuccessByStatusCode&&I.body){const V=I.body.contacts||I.body.users||I.body.data||[];m(V.slice(0,3))}else m([])}catch{m([])}finally{y(!1)}})()},[l]);const B=M=>{f(M),o(""),m([]),A("")},D=()=>{f(null),o(""),A("")},P=async()=>{if(!u){A("Veuillez sélectionner un destinataire");return}const M=parseInt(v);if(isNaN(M)||M<n){A(`Le montant minimum est de ${n.toLocaleString("fr-FR")} F`);return}if(M>r){A("Solde d'activation insuffisant");return}N(!0),A("");try{const I=await X.transferActivationBalanceToUser(u._id,M);Ve(I),S(!0),i(),setTimeout(()=>{t(),f(null),o(""),b(""),S(!1)},2e3)}catch(I){A(I instanceof Error?I.message:"Une erreur est survenue")}finally{N(!1)}},O=()=>{f(null),o(""),m([]),b(""),A(""),S(!1),t()};return e?s.jsx(Z.div,{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",initial:{opacity:0}
282,animate:{opacity:1},exit:{opacity:0},onClick:O,children:s.jsx(Z.div,{className:"bg-white rounded-2xl p-6 w-[90vw] max-w-md max-h-[90vh] overflow-y-auto border border-border",initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},onClick:M=>M.stopPropagation(),children:w?s.jsxs("div",{className:"text-center py-6",children:[s.jsx("div",{className:"w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx(L,{icon:Ur,className:"text-green-600",size:32})}),s.jsx("h4",{className:"text-xl font-bold text-green-600 mb-2",children:"Transfert réussi !"}),s.jsx("p",{className:"text-gray-600",children:"Le solde d'activation a été transféré."})]}):s.jsxs(s.Fragment,{children:[s.jsx("h4",{className:"text-xl font-bold text-gray-900 mb-4",children:"Transférer du solde d'activation"}),s.jsxs("div",{className:"bg-gray-50 rounded-xl p-4 mb-4",children:[s.jsx("p",{className:"text-sm text-gray-600",children:"Solde d'activation disponible"}),s.jsxs("p",{className:"text-2xl font-bold text-primary",children:[r.toLocaleString("fr-FR")," F"]})]}),u?s.jsxs("div",{className:"mb-4",children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Destinataire sélectionné"}),s.jsxs("div",{className:"flex items-center gap-3 p-3 bg-orange-50 border border-border rounded-xl",children:[s.jsx("div",{className:"bg-accent w-10 h-10 rounded-full flex items-center justify-center text-white font-bold",children:u.avatar?s.jsx("img",{src:X.generateThumbnailUrl(u.avatar,160)||rn,alt:u.name,className:"w-full h-full rounded-full object-cover"}):u.name.charAt(0).toUpperCase()}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"font-semibold text-gray-900 truncate",children:u.name}),s.jsx("p",{className:"text-xs text-gray-500 truncate",children:u.email})]}),s.jsx("button",{onClick:D,className:"p-2 text-gray-400 hover:text-red-500 transition-colors",children:s.jsx(L,{icon:gt,size:14})})]})]}):s.jsxs("div",{className:"mb-4",children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Rechercher un destinataire"}),s.jsxs("div",{className:"relative",children:[s.jsx(L,{icon:vo,className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-400"}),s.jsx("input",{type:"text",value:a,onChange:M=>{o(M.target.value),A("")},placeholder:"Nom, email ou téléphone...",className:"w-full pl-10 pr-4 py-3 border border-border rounded-xl focus:outline-none focus:ring-2 focus:ring-orange-500"}),p&&s.jsx(L,{icon:Yt,className:"absolute right-3 top-1/2 -translate-y-1/2 text-orange-500 animate-spin"})]}),x.length>0&&s.jsx("div",{className:"mt-2 border border-border rounded-xl overflow-hidden",children:x.map(M=>s.jsxs("button",{onClick:()=>B(M),className:"w-full flex items-center gap-3 p-3 hover:bg-gray-50 transition-colors border-b border-border last:border-b-0",children:[s.jsx("div",{className:"bg-primary w-10 h-10 rounded-full flex items-center justify-center text-white font-bold text-sm",children:M.avatar?s.jsx("img",{src:X.generateThumbnailUrl(M.avatar,96)||rn,alt:M.name,className:"w-full h-full rounded-full object-cover"}):M.name.charAt(0).toUpperCase()}),s.jsxs("div",{className:"flex-1 min-w-0 text-left",children:[s.jsx("p",{className:"font-semibold text-gray-900 truncate",children:M.name}),s.jsx("p",{className:"text-xs text-gray-500 truncate",children:M.email})]})]},M._id))}),a.length>=2&&!p&&x.length===0&&s.jsx("p",{className:"mt-2 text-sm text-gray-500 text-center",children:"Aucun utilisateur trouvé"})]}),s.jsxs("div",{className:"mb-4",children:[s.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:["Montant (min. ",n.toLocaleString("fr-FR")," F)"]}),s.jsx("input",{type:"number",value:v,onChange:M=>{b(M.target.value),A("")},placeholder:"Ex: 2000",className:"w-full border border-border rounded-xl px-4 py-3 focus:outline-none focus:ring-2 focus:ring-orange-500"})]}),j&&s.jsx("div",{className:"mb-4 p-3 bg-red-50 border border-border rounded-xl",children:s.jsx("p",{className:"text-red-600 text-sm",children:j})}),s.jsxs("div",{className:"flex gap-3",children:[s.jsx("button",{onClick:O,className:"flex-1 bg-gray-200 text-gray-700 py-3 rounded-xl font-semibold hover:bg-gray-300 transition-colors",children:"Annuler"}),s.jsx("button",{onClick:P,disabled:E||!u||!v,className:"flex-1 bg-orange-500 text-white py-3 rounded-xl font-semibold hover:bg-orange-600 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2",children:E?s.jsx(L,{icon:Yt,className:"animate-spin"}):"Transférer"})]})]})})}):null}function xCe({isOpen:e,onClose:t,referral:r,pricing:n,activationBalance:i,onSuccess:a}){const[o,l]=C.useState(null),[c,u]=C.useState(!1),[f,x]=C.useState(""),[m,p]=C.useState(!1),y=()=>r?r.canUpgrade?[{type:"UPGRADE",price:n.UPGRADE,label:"Upgrade vers CIBLE"}]:r.hasActiveSubscription?[]:[{type:"CLASSIQUE",price:n.CLASSIQUE,label:"Abonnement CLASSIQUE"},{type:"CIBLE",price:n.CIBLE,label:"Abonnement CIBLE"}]:[],v=y(),b=o?n[o]:0,E=i>=b,N=async()=>
282{if(!(!r||!o)){if(!E){x("Solde d'activation insuffisant");return}u(!0),x("");try{const A=await X.sponsorReferralActivation(r._id,o);Ve(A),p(!0),a(),setTimeout(()=>{j()},2e3)}catch(A){x(A instanceof Error?A.message:"Une erreur est survenue")}finally{u(!1)}}},j=()=>{l(null),x(""),p(!1),t()};return C.useEffect(()=>{if(e&&r){const A=y();A.length===1?l(A[0].type):l(null)}},[e,r]),!e||!r?null:s.jsx(Z.div,{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:j,children:s.jsx(Z.div,{className:"bg-white rounded-2xl p-6 w-[90vw] max-w-md border border-border",initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},onClick:A=>A.stopPropagation(),children:m?s.jsxs("div",{className:"text-center py-6",children:[s.jsx("div",{className:"w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx(L,{icon:Ur,className:"text-green-600",size:32})}),s.jsx("h4",{className:"text-xl font-bold text-green-600 mb-2",children:"Sponsoring réussi !"}),s.jsxs("p",{className:"text-gray-600",children:[r.name," a été activé avec succès."]})]}):s.jsxs(s.Fragment,{children:[s.jsx("h4",{className:"text-xl font-bold text-gray-900 mb-4",children:"Sponsoriser un filleul"}),s.jsx("div",{className:"bg-gray-50 rounded-xl p-4 mb-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"bg-primary w-12 h-12 rounded-full flex items-center justify-center text-white font-bold text-lg",children:r.avatar?s.jsx("img",{src:X.generateThumbnailUrl(r.avatar,96)||rn,alt:r.name,className:"w-full h-full rounded-full object-cover"}):r.name.charAt(0).toUpperCase()}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold text-gray-900",children:r.name}),s.jsx("p",{className:"text-sm text-gray-500",children:r.email}),s.jsxs("span",{className:`text-xs px-2 py-0.5 rounded-full ${r.referralLevel===1?"bg-blue-100 text-blue-700":r.referralLevel===2?"bg-purple-100 text-purple-700":"bg-green-100 text-green-700"}`,children:["Niveau ",r.referralLevel]})]})]})}),s.jsxs("div",{className:"mb-4",children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Type d'abonnement"}),s.jsx("div",{className:"space-y-2",children:v.map(({type:A,price:w,label:S})=>s.jsx("button",{onClick:()=>l(A),className:`w-full p-4 rounded-xl border-2 text-left transition-colors ${o===A?"border-primary bg-blue-50":"border-border hover:border-border"}`,children:s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("span",{className:"font-medium text-gray-900",children:S}),s.jsxs("span",{className:"font-bold text-primary",children:[w.toLocaleString("fr-FR")," F"]})]})},A))})]}),s.jsxs("div",{className:"bg-gray-50 rounded-xl p-4 mb-4",children:[s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("span",{className:"text-sm text-gray-600",children:"Solde d'activation"}),s.jsxs("span",{className:`font-bold ${E||!o?"text-primary":"text-red-600"}`,children:[i.toLocaleString("fr-FR")," F"]})]}),o&&s.jsxs("div",{className:"flex justify-between items-center mt-2 pt-2 border-t border-border",children:[s.jsx("span",{className:"text-sm text-gray-600",children:"Après sponsoring"}),s.jsxs("span",{className:`font-bold ${E?"text-green-600":"text-red-600"}`,children:[(i-b).toLocaleString("fr-FR")," F"]})]})]}),f&&s.jsx("div",{className:"mb-4 p-3 bg-red-50 border border-border rounded-xl",children:s.jsx("p",{className:"text-red-600 text-sm",children:f})}),!E&&o&&s.jsx("div",{className:"mb-4 p-3 bg-yellow-50 border border-border rounded-xl",children:s.jsx("p",{className:"text-yellow-700 text-sm",children:"⚠️ Solde insuffisant. Alimentez d'abord votre solde d'activation."})}),s.jsxs("div",{className:"flex gap-3",children:[s.jsx("button",{onClick:j,className:"flex-1 bg-gray-200 text-gray-700 py-3 rounded-xl font-semibold hover:bg-gray-300 transition-colors",children:"Annuler"}),s.jsx("button",{onClick:N,disabled:c||!o||!E,className:"flex-1 bg-green-500 text-white py-3 rounded-xl font-semibold hover:bg-green-600 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2",children:c?s.jsx(L,{icon:Yt,className:"animate-spin"}):"Confirmer"})]})]})})})}function fCe(){return s.jsxs("div",{className:"bg-bg relative min-h-screen w-full overflow-hidden",children:[s.jsx("div",{className:"pointer-events-none absolute -top-24 -left-24 h-72 w-72 rounded-full bg-primary/10 blur-3xl"}),s.jsx("div",{className:"pointer-events-none absolute -bottom-32 -right-24 h-80 w-80 rounded-full bg-whatsapp/10 blur-3xl"}),s.jsxs("div",{className:"relative z-10 max-w-3xl mx-auto px-5 py-6",children:[s.jsxs("header",{className:"flex items-center justify-between mb-8",children:[s.jsx(bn,{to:"/splash-screen","aria-label":"Retour",className:"h-9 w-9 flex items-center justify-center rounded-full bg-white/80 text-gray-700 hover:bg-white border border-border",children:s.jsx(L,{icon:c0,size:20})}),s.jsx("img",{src:Bl,alt:"SBC",className:"h-9 w-9 object-contain"}),s.jsx(bn,{to:"/connexion",className:"text-sm font-semibold text-primary hover:underline",children:"Se connecter"})]}),s.jsxs(Z.section,{initial:{opacity:0,y:20}
282,animate:{opacity:1,y:0},transition:{duration:.4},className:"text-center mb-10",children:[s.jsx("h1",{className:"text-3xl md:text-4xl font-bold text-gray-900 mb-3",children:"Sniper Business Center"}),s.jsx("p",{className:"text-lg text-gray-600 leading-relaxed",children:"Plateforme africaine de réseautage, publicité, business P2P et investissement. Augmentez votre visibilité sur WhatsApp et Telegram, accédez à des formations gratuites, et développez vos revenus grâce à notre programme d'affiliation."})]}),s.jsxs("section",{className:"bg-white/80 backdrop-blur rounded-2xl p-6 mb-6 border border-border",children:[s.jsx("h2",{className:"text-xl font-bold text-gray-900 mb-3",children:"Ce que nous proposons"}),s.jsxs("ul",{className:"space-y-2 text-gray-700",children:[s.jsxs("li",{children:["📣 ",s.jsx("strong",{children:"Publicité ciblée"})," — diffusez vos produits et services à une communauté d'affiliés actifs."]}),s.jsxs("li",{children:["🎓 ",s.jsx("strong",{children:"Formations gratuites"})," — business, marketing digital, développement personnel."]}),s.jsxs("li",{children:["📇 ",s.jsx("strong",{children:"Carnet de contacts qualifiés"})," — partage régulier de fichiers de contacts au sein de la communauté."]}),s.jsxs("li",{children:["💰 ",s.jsx("strong",{children:"Programme d'affiliation"})," — gagnez des commissions sur les inscriptions de vos filleuls."]}),s.jsxs("li",{children:["🛒 ",s.jsx("strong",{children:"Marketplace"})," — vendez ou achetez auprès des autres membres."]})]})]}),s.jsxs("section",{className:"bg-white/80 backdrop-blur rounded-2xl p-6 mb-6 border border-border",children:[s.jsx("h2",{className:"text-xl font-bold text-gray-900 mb-3",children:"Communications par email"}),s.jsx("p",{className:"text-gray-700 mb-3",children:"En vous inscrivant sur SBC, vous recevrez les types d'emails suivants :"}),s.jsxs("ul",{className:"space-y-2 text-gray-700 mb-3",children:[s.jsxs("li",{children:["✉️ ",s.jsx("strong",{children:"Emails transactionnels"})," — codes OTP de vérification, confirmations de paiement, notifications de transaction, rappels d'abonnement, alertes de sécurité."]}),s.jsxs("li",{children:["📨 ",s.jsx("strong",{children:"Emails de relance"})," — séquences automatisées envoyées aux membres en cours d'inscription pour les accompagner (avec leur consentement à l'inscription)."]}),s.jsxs("li",{children:["📰 ",s.jsx("strong",{children:"Communications produit"})," — annonces de nouvelles fonctionnalités, mises à jour importantes (désinscription possible à tout moment)."]})]}),s.jsx("p",{className:"text-sm text-gray-600",children:"Tous nos emails marketing incluent un lien de désinscription. Nous traitons les bounces et plaintes via les notifications fournies par notre prestataire d'envoi."})]}),s.jsxs("section",{className:"bg-white/80 backdrop-blur rounded-2xl p-6 mb-6 border border-border",children:[s.jsx("h2",{className:"text-xl font-bold text-gray-900 mb-3",children:"Nous contacter"}),s.jsxs("div",{className:"space-y-2 text-gray-700",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(L,{icon:yo,className:"text-primary"}),s.jsx("a",{href:"mailto:[email protected]",className:"hover:underline",children:"[email protected]"})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(L,{icon:Ji,className:"text-primary"}),s.jsx("a",{href:"tel:+237682903535",className:"hover:underline",children:"+237 6 82 90 35 35"})," (Yaoundé)"]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(L,{icon:Ji,className:"text-primary"}),s.jsx("a",{href:"tel:+237697470426",className:"hover:underline",children:"+237 6 97 47 04 26"})," (Douala)"]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(L,{icon:Ere,className:"text-primary"}),s.jsx("span",{children:"BP 6877, rue Sylvanie, Douala, Cameroun"})]})]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-3 mt-4",children:[s.jsx("a",{href:"https://whatsapp.com/channel/0029Vav3mvCElah05C8QuT03",target:"_blank",rel:"noopener noreferrer","aria-label":"WhatsApp",className:"h-10 w-10 flex items-center justify-center rounded-full bg-whatsapp text-white hover:opacity-90",children:s.jsx(L,{icon:nu})}),s.jsx("a",{href:"https://t.me/sniperbusinesscenterafrica",target:"_blank",rel:"noopener noreferrer","aria-label":"Telegram",className:"h-10 w-10 flex items-center justify-center rounded-full bg-telegram text-white hover:opacity-90",children:s.jsx(L,{icon:F$})}),s.jsx("a",{href:"https://m.youtube.com/@SniperBusinessCenterSBC",target:"_blank",rel:"noopener noreferrer","aria-label":"YouTube",className:"h-10 w-10 flex items-center justify-center rounded-full bg-youtube text-white hover:opacity-90",children:s.jsx(L,{icon:P$})}),s.jsx("a",{href:"https://www.facebook.com/sniperbusinesscenter/",target:"_blank",rel:"noopener noreferrer","aria-label":"Facebook",className:"h-10 w-10 flex items-center justify-center rounded-full bg-[#1877F2] text-white hover:opacity-90",children:s.jsx(L,{icon:b$})}),s.jsx("a",{href:"https://www.instagram.com/sniperbusinesscenter/",target:"_blank",rel:"noopener noreferrer","aria-label":"Instagram",className:"bg-primary h-10 w-10 flex items-center justify-center rounded-full text-white hover:opacity-90",children:s.jsx(L,{icon:Cre})}),s.jsx("a",{href:"https://www.tiktok.com/@sniper.business.center",target:"_blank",rel:"noopener noreferrer","aria-label":"TikTok",className:"h-10 w-10 flex items-center justify-center rounded-full bg-black text-white hover:opacity-90",children:s.jsx(L,{icon:Ire})})]})]}),s.jsxs("section",{className:"bg-white/80 backdrop-blur rounded-2xl p-6 mb-10 border border-border",children:[s.jsx("h2",{className:"text-xl font-bold text-gray-900 mb-3",children:"Documents"}),s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("a",{href:"https://storage.googleapis.com/sbc-file-storage/documents/pres_pdf_1753011729757_SBC%20Pr%C3%83%C2%A9sentation.pdf",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"📄 Présentation officielle (PDF)"}),s.jsx(bn,{to:"/conditions",className:"text-primary hover:underline",children:"📄 Conditions générales d'utilisation"}),s.jsx(bn,{to:"/confidentialite",className:"text-primary hover:underline",children:"📄 Politique de confidentialité"})]})]}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 mb-10",children:[s.jsx(bn,{to:"/connexion",className:"flex-1 text-center bg-primary hover:bg-blue-700 text-white font-bold rounded-xl py-3 transition-colors",children:"Se connecter"}),s.jsx(bn,{to:"/signup",className:"flex-1 text-center bg-white border-2 border-primary text-primary font-bold rounded-xl py-3 hover:bg-blue-50 transition-colors",children:"Créer un compte"})]}),s.jsx(A0,{})]})]})}function hCe(){return s.jsx(Z.div,{variants:On,initial:"hidden",animate:"show",className:"bg-bg min-h-screen w-full",children:s.jsxs("div",{className:"max-w-3xl mx-auto px-5 py-6",children:[s.jsxs(Z.header,{variants:Ia,className:"flex items-center justify-between mb-6",children:[s.jsx(bn,{to:"/a-propos","aria-label":"Retour",className:"h-9 w-9 flex items-center justify-center rounded-full bg-white/80 text-gray-700 hover:bg-white border border-border",children:s.jsx(L,{icon:c0,size:20})}),s.jsx("img",{src:Bl,alt:"SBC",className:"h-9 w-9 object-contain"}),s.jsx(bn,{to:"/connexion",className:"text-sm font-semibold text-primary hover:underline",children:"Se connecter"})]}),s.jsxs(Z.article,{variants:uu,className:"bg-white/80 backdrop-blur rounded-2xl p-6 md:p-8 prose prose-sm md:prose-base max-w-none border border-border",children:[s.jsx("h1",{className:"text-2xl md:text-3xl font-bold text-gray-900 mb-2",children:"Conditions Générales d'Utilisation"}),s.jsx("p",{className:"text-sm text-gray-500 mb-6",children:"Sniper Business Center — En vigueur"}),s.jsxs("p",{children:["Bienvenue sur ",s.jsx("strong",{children:"SNIPER BUSINESS CENTER"}),", une plateforme de réseautage, publicité, business P2P et investissement. Veuillez lire attentivement les présentes conditions générales d'utilisation (ci-après dénommées « ",s.jsx("strong",{children:"CGU"})," ») avant d'utiliser nos services."]}),s.jsx("p",{children:"En utilisant notre application mobile, vous acceptez de vous conformer à ces CGU et vous engagez à les respecter."}),s.jsx("h2",{className:"text-xl font-bold text-gray-900 mt-6 mb-2",children:"1. Adhésion et affiliation"}),s.jsxs("p",{children:[s.jsx("strong",{children:"1.1"})," Toute personne rejoignant la communauté SBC devient membre adhérent, autorisant l'entreprise à partager les informations fournies lors de l'inscription avec les autres membres affiliés de la communauté."]}),s.jsxs("p",{children:[s.jsx("strong",{children:"1.2"})," En devenant membre de la communauté SBC, vous devenez automatiquement un partenaire affilié de SBC."]}),s.jsxs("p",{children:[s.jsx("strong",{children:"1.3"})," Les frais d'adhésion de 2 000 FCFA ne constituent pas un investissement, mais le paiement d'un service donnant droit à la réception de fichiers de contacts partagés par l'entreprise SBC dans sa communauté d'affiliés."]}),s.jsxs("p",{children:[s.jsx("strong",{children:"1.4"})," Les frais d'adhésion à SBC sont non remboursables une fois payés."]}),s.jsx("h2",{className:"text-xl font-bold text-gray-900 mt-6 mb-2",children:"2. Service publicitaire"}),s.jsxs("p",{children:[s.jsx("strong",{children:"2.1"})," Pour bénéficier de nos services publicitaires, vous devez obligatoirement souscrire à un pack publicitaire qui varie entre 2 000 FCFA et 10 000 FCFA."]}),s.jsxs("p",{children:[s.jsx("strong",{children:"2.2"})," La souscription à un service publicitaire ne garantit pas les ventes (nous offrons 
282juste la visibilité à vos services ou produits)."]}),s.jsx("h2",{className:"text-xl font-bold text-gray-900 mt-6 mb-2",children:"3. Responsabilités des utilisateurs"}),s.jsxs("p",{children:[s.jsx("strong",{children:"3.1"})," SNIPER BUSINESS CENTER ne garantit pas votre visibilité sur WhatsApp, celle-ci dépend de votre capacité à communiquer sur vos statuts WhatsApp."]}),s.jsxs("p",{children:[s.jsx("strong",{children:"3.2"})," SBC permet l'augmentation progressive du carnet d'adresses de contacts avec de nouveaux fichiers de contacts."]}),s.jsxs("p",{children:[s.jsx("strong",{children:"3.3"})," Tout membre de SBC doit rejoindre le groupe WhatsApp de la communauté SBC pour rester informé. Les membres doivent respecter les règles du groupe sous peine d'exclusion par SBC."]}),s.jsx("h2",{className:"text-xl font-bold text-gray-900 mt-6 mb-2",children:"4. Paiements et affiliation"}),s.jsxs("p",{children:[s.jsx("strong",{children:"4.1"})," Les frais d'adhésion à SBC ne doivent être payés qu'une seule fois selon les méthodes de paiement diffusées par l'entreprise. Tout autre paiement demandé par un tiers n'émane pas de SBC."]}),s.jsxs("p",{children:[s.jsx("strong",{children:"4.2"})," L'affiliation à SBC n'est pas obligatoire, mais si choisie, les membres doivent se former correctement sur le fonctionnement, les produits et les services de SNIPER BUSINESS CENTER."]}),s.jsx("h2",{className:"text-xl font-bold text-gray-900 mt-6 mb-2",children:"5. Modifications et résiliation"}
282),s.jsxs("p",{children:[s.jsx("strong",{children:"5.1"})," SBC se réserve le droit de modifier, suspendre ou interrompre tout ou partie de ses services à tout moment, sans préavis et à sa seule discrétion."]}),s.jsxs("p",{children:[s.jsx("strong",{children:"5.2"})," En cas de conflit entre les membres affiliés de SBC, les parties impliquées acceptent de régler le différend de manière indépendante, sans impliquer SBC dans le processus de résolution du conflit."]}),s.jsx("h2",{className:"text-xl font-bold text-gray-900 mt-6 mb-2",children:"6. Contact"}),s.jsxs("p",{children:["Pour toute question relative aux présentes CGU, vous pouvez nous écrire à ",s.jsx("a",{href:"mailto:[email protected]",className:"text-primary hover:underline",children:"[email protected]"}),"."]})]}),s.jsx(A0,{})]})})}function mCe(){return s.jsx(Z.div,{variants:On,initial:"hidden",animate:"show",className:"bg-bg min-h-screen w-full",children:s.jsxs("div",{className:"max-w-3xl mx-auto px-5 py-6",children:[s.jsxs(Z.header,{variants:Ia,className:"flex items-center justify-between mb-6",children:[s.jsx(bn,{to:"/a-propos","aria-label":"Retour",className:"h-9 w-9 flex items-center justify-center rounded-full bg-white/80 text-gray-700 hover:bg-white border border-border",children:s.jsx(L,{icon:c0,size:20})}),s.jsx("img",{src:Bl,alt:"SBC",className:"h-9 w-9 object-contain"}),s.jsx(bn,{to:"/connexion",className:"text-sm font-semibold text-primary hover:underline",children:"Se connecter"})]}),s.jsxs(Z.article,{variants:uu,className:"bg-white/80 backdrop-blur rounded-2xl p-6 md:p-8 prose prose-sm md:prose-base max-w-none border border-border",children:[s.jsx("h1",{className:"text-2xl md:text-3xl font-bold text-gray-900 mb-2",children:"Politique de confidentialité"}),s.jsx("p",{className:"text-sm text-gray-500 mb-6",children:"Sniper Business Center — Dernière mise à jour : Mai 2026"}),s.jsxs("p",{children:["Sniper Business Center (« ",s.jsx("strong",{children:"SBC"})," », « nous ») accorde une grande importance à la protection de vos données personnelles. La présente politique explique quelles informations nous collectons, comment nous les utilisons, et les droits dont vous disposez."]}),s.jsx("h2",{className:"text-xl font-bold text-gray-900 mt-6 mb-2",children:"1. Responsable du traitement"}),s.jsxs("p",{children:[s.jsx("strong",{children:"Sniper Business Center (SBC)"}),", entreprise enregistrée au Cameroun.",s.jsx("br",{}),"Adresse : BP 6877, rue Sylvanie, Douala, Cameroun.",s.jsx("br",{}),"Email : ",s.jsx("a",{href:"mailto:[email protected]",className:"text-primary hover:underline",children:"[email protected]"}),s.jsx("br",{}),"Téléphone : +237 6 82 90 35 35"]}),s.jsx("h2",{className:"text-xl font-bold text-gray-900 mt-6 mb-2",children:"2. Données que nous collectons"}),s.jsx("p",{children:"Lors de votre inscription et de votre utilisation de SBC, nous collectons :"}),s.jsxs("ul",{children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Données d'identification"})," : nom complet, adresse email, numéro WhatsApp, mot de passe (chiffré)."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Données de profil"})," : pays, région, date de naissance, sexe, profession, langue préférée, centres d'intérêt."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Code de parrainage"})," : si vous êtes parrainé par un membre existant."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Données de paiement"})," : informations de transaction (montant, opérateur Mobile Money, identifiants de session) — nous ne stockons pas vos numéros de carte ni vos identifiants Mobile Money complets."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Données techniques"})," : adresse IP, type d'appareil, journaux d'accès — nécessaires à la sécurité et au bon fonctionnement du service."]})]}),s.jsx("h2",{className:"text-xl font-bold text-gray-900 mt-6 mb-2",children:"3. Finalités du traitement"}),s.jsx("p",{children:"Vos données sont utilisées pour :"}),s.jsxs("ul",{children:[s.jsx("li",{children:"Créer et gérer votre compte et votre profil de membre ;"}),s.jsx("li",{children:"Vous envoyer des emails et SMS transactionnels (codes OTP, confirmations de paiement, notifications de transaction, alertes de sécurité) ;"}),s.jsx("li",{children:"Vous proposer le programme de relance automatisée si vous y avez consenti ;"}),s.jsx("li",{children:"Vous adresser des communications produit (nouveautés, mises à jour) — vous pouvez vous désinscrire à tout moment ;"}),s.jsxs("li",{children:["Permettre le partage de votre fiche de contact avec la communauté d'affiliés, conformément aux ",s.jsx(bn,{to:"/conditions",className:"text-primary hover:underline",children:"CGU"})," ;"]}),s.jsx("li",{children:"Calculer et verser les commissions liées au programme d'affiliation ;"}),s.jsx("li",{children:"Détecter et prévenir la fraude, sécuriser nos systèmes ;"}),s.jsx("li",{children:"Respecter nos obligations légales et fiscales."})]}),s.jsx("h2",{className:"text-xl font-bold text-gray-900 mt-6 mb-2",children:"4. Base légale"}),s.jsx("p",{children:"Le traitement de vos données repose sur (i) l'exécution du contrat qui nous lie à vous, (ii) votre consentement (notamment pour le partage de votre fiche dans la communauté et pour les communications marketing), (iii) notre intérêt légitime à sécuriser nos services, et (iv) le respect d'obligations légales."}),s.jsx("h2",{className:"text-xl font-bold text-gray-900 mt-6 mb-2",children:"5. Partage avec des tiers"}),s.jsx("p",{children:"Nous partageons vos données uniquement avec :"}),s.jsxs("ul",{children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Prestataires de paiement"})," (CinetPay, MoneyFusion, NOWPayments) — pour traiter vos transactions."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Prestataires d'envoi d'emails et de SMS"})," (Amazon SES, opérateurs SMS) — pour vous délivrer les notifications transactionnelles et marketing."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Stockage cloud"})," (Google Cloud Storage) — pour héberger vos documents et fichiers."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Membres affiliés de la communauté SBC"})," — uniquement les éléments figurant dans votre fiche de contact, conformément aux ",s.jsx(bn,{to:"/conditions",className:"text-primary hover:underline",children:"CGU"}),"."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Autorités"})," — sur réquisition légale."]})]}),s.jsx("p",{children:"Nous ne vendons jamais vos données à des tiers."}),s.jsx("h2",{className:"text-xl font-bold text-gray-900 mt-6 mb-2",children:"6. Désabonnement et gestion des plaintes"}),s.jsxs("p",{children:["Tous nos emails marketing incluent un lien de désinscription en bas de message. Vous pouvez également désactiver les notifications depuis votre profil ou nous écrire à",s.jsx("a",{href:"mailto:[email protected]",className:"text-primary hover:underline",children:" [email protected]"}),". Les emails transactionnels (OTP, confirmations de paiement, alertes de sécurité) sont essentiels au service et ne peuvent pas être désactivés. Les bounces et plaintes (FBL) sont traités automatiquement par notre prestataire d'envoi."]}),s.jsx("h2",{className:"text-xl font-bold text-gray-900 mt-6 mb-2",children:"7. 
282Conservation des données"}),s.jsx("p",{children:"Nous conservons vos données aussi longtemps que votre compte est actif, et jusqu'à 5 ans après la clôture pour répondre à nos obligations légales et comptables. Les données de connexion sont conservées 12 mois."}),s.jsx("h2",{className:"text-xl font-bold text-gray-900 mt-6 mb-2",children:"8. Vos droits"}),s.jsx("p",{children:"Vous disposez des droits suivants :"}),s.jsxs("ul",{children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Accès"})," et ",s.jsx("strong",{children:"rectification"})," de vos données depuis votre profil ou sur demande."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Suppression"})," de votre compte et de vos données (sauf obligations légales de conservation)."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Opposition"})," au traitement à des fins marketing."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Portabilité"})," de vos données dans un format lisible."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Retrait du consentement"})," à tout moment."]})]}),s.jsxs("p",{children:["Pour exercer ces droits, écrivez-nous à ",s.jsx("a",{href:"mailto:[email protected]",className:"text-primary hover:underline",children:"[email protected]"}),"."]}),s.jsx("h2",{className:"text-xl font-bold text-gray-900 mt-6 mb-2",children:"9. Sécurité"}),s.jsx("p",{children:"Nous mettons en œuvre des mesures techniques et organisationnelles pour protéger vos données : chiffrement des mots de passe, transmission HTTPS, contrôles d'accès, authentification par OTP, et journaux d'audit."}),s.jsx("h2",{className:"text-xl font-bold text-gray-900 mt-6 mb-2",children:"10. Mineurs"}),s.jsx("p",{children:"SBC n'est pas destiné aux personnes de moins de 18 ans. Nous ne collectons pas sciemment les données de mineurs."}),s.jsx("h2",{className:"text-xl font-bold text-gray-900 mt-6 mb-2",children:"11. Modifications"}),s.jsx("p",{children:"Nous pouvons mettre à jour cette politique. Les changements importants vous seront notifiés par email ou via l'application."}),s.jsx("h2",{className:"text-xl font-bold text-gray-900 mt-6 mb-2",children:"12. Contact"}),s.jsxs("p",{children:["Pour toute question concernant vos données personnelles, contactez-nous à ",s.jsx("a",{href:"mailto:[email protected]",className:"text-primary hover:underline",children:"[email protected]"}),"."]})]}),s.jsx(A0,{})]})})}const ZO="sso_return_to",pCe={"sbc-live":"SBC Live","sbc-live-test":"SBC Live (Test)"},gCe={"profile.read":"Lire votre profil (nom, email, abonnement, nombre de filleuls)","payments.write":"Effectuer des paiements en votre nom","wallet.read":"Voir le solde de votre portefeuille"};function yCe(e){const t=new URLSearchParams(e),r=t.get("client_id"),n=t.get("redirect_uri"),i=t.get("scope");if(!r||!n||!i)return null;const a=i.split(/[\s+]+/).map(o=>o.trim()).filter(Boolean);return a.length===0?null:{client_id:r,redirect_uri:n,scopes:a,state:t.get("state")}}function JO(e,t,r){try{const n=new URL(e);for(const[i,a]of Object.entries(t))n.searchParams.set(i,a);return r&&n.searchParams.set("state",r),n.toString()}catch{return null}}function vCe(){const e=Cr(),t=lt(),{user:r,isAuthenticated:n,loading:i,logout:a}=Gt(),o=C.useMemo(()=>yCe(e.search),[e.search]),[l,c]=C.useState("idle"),[u,f]=C.useState(""),x=C.useRef(!1);if(C.useEffect(()=>{i||o&&(n||(sessionStorage.setItem(ZO,e.pathname+e.search),t("/connexion",{replace:!0})))},[i,n,o,e.pathname,e.search,t]),!o)return s.jsxs("div",{className:"min-h-screen flex flex-col items-center justify-center bg-white p-6",children:[s.jsx("img",{src:Bl,alt:"SBC",className:"w-24 mb-6 object-contain"}),s.jsxs("div",{className:"w-full max-w-md bg-red-50 border border-border rounded-2xl p-6 text-center",children:[s.jsx("h1",{className:"text-lg font-bold text-red-700 mb-2",children:"Lien invalide"}),s.jsx("p",{className:"text-sm text-red-600",children:"Ce lien est mal formé. Veuillez retourner à l'application qui vous a envoyé ici."})]})]});if(i||!n)return s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-white",children:s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary"})});const{client_id:m,redirect_uri:p,scopes:y,state:v}=o,b=pCe[m]??m,E=async()=>{var w,S,B;
282if(!x.current){x.current=!0,c("submitting"),f("");try{const D=await X.ssoGrantCode({client_id:m,redirect_uri:p,scopes:y});if(D.isSuccessByStatusCode){const P=Ve(D),O=P==null?void 0:P.code;if(!O){x.current=!1,c("serverError"),f("Réponse invalide du serveur. Veuillez réessayer.");return}const M=JO(p,{code:O},v);if(!M){x.current=!1,c("serverError"),f("L'URL de redirection est invalide.");return}window.location.replace(M);return}if(D.statusCode===400){const P=((w=D.body)==null?void 0:w.message)||((S=D.body)==null?void 0:S.error)||"Demande rejetée par le serveur.";x.current=!1,c("serverError"),f(P);return}x.current=!1,c("serverError"),f(((B=D.body)==null?void 0:B.message)||"Échec temporaire. Veuillez réessayer.")}catch(D){x.current=!1,c("serverError"),f((D==null?void 0:D.message)||"Échec temporaire. Veuillez réessayer.")}}},N=()=>{if(x.current)return;const w=JO(p,{error:"access_denied",error_description:"L'utilisateur a refusé."},v);if(!w){c("serverError"),f("L'URL de redirection est invalide.");return}window.location.replace(w)},j=async()=>{const w=e.pathname+e.search;await a(),sessionStorage.setItem(ZO,w),t("/connexion",{replace:!0})},A=l==="submitting";return s.jsx(Z.div,{variants:On,initial:"hidden",animate:"show",className:"min-h-screen flex flex-col items-center justify-start sm:justify-center bg-white p-4",children:s.jsxs("div",{className:"w-full max-w-md",children:[s.jsx("div",{className:"flex justify-center mb-4 mt-4 sm:mt-0",children:s.jsx("img",{src:Bl,alt:"SBC",className:"w-20 sm:w-24 object-contain"})}),s.jsxs(Z.div,{variants:uu,className:"bg-white border border-border rounded-2xl p-5 sm:p-6",children:[s.jsx("h1",{className:"text-xl sm:text-2xl font-bold text-gray-900 text-center mb-2",children:b}),s.jsx("p",{className:"text-sm text-gray-600 text-center mb-5",children:"souhaite accéder à votre compte SBC"}),s.jsxs("div",{className:"mb-5",children:[s.jsx("p",{className:"text-sm font-semibold text-gray-800 mb-2",children:"Cette application demande :"}),s.jsx("ul",{className:"space-y-2",children:y.map(w=>{const S=gCe[w];return s.jsxs("li",{className:"flex items-start gap-2 text-sm text-gray-700",children:[s.jsx("span",{className:"text-primary mt-1",children:"•"}),s.jsx("span",{children:S??s.jsxs(s.Fragment,{children:[w," ",s.jsx("span",{className:"text-gray-400",children:"(usage interne)"})]})})]},w)})})]}),s.jsxs("div",{className:"bg-gray-50 border border-border rounded-xl p-3 mb-5",children:[s.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Connecté en tant que"}),s.jsx("p",{className:"text-sm font-medium text-gray-800 break-all",children:r==null?void 0:r.email}),s.jsx("button",{type:"button",onClick:j,disabled:A,className:"mt-2 min-h-[44px] w-full sm:w-auto text-sm font-medium text-primary hover:underline disabled:opacity-50 disabled:cursor-not-allowed text-left",children:"Pas vous ? Déconnexion"})]}),l==="serverError"&&u&&s.jsx("div",{className:"mb-4 bg-red-50 border border-border text-red-700 rounded-lg px-3 py-2 text-sm",children:u}),s.jsxs("div",{className:"flex flex-col gap-3",children:[s.jsxs("button",{type:"button",onClick:E,disabled:A,className:"w-full min-h-[48px] bg-emerald-600 hover:bg-emerald-700 disabled:bg-emerald-400 disabled:cursor-not-allowed text-white font-bold rounded-xl flex items-center justify-center gap-2",children:[A&&s.jsxs("svg",{className:"animate-spin h-4 w-4 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[s.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),s.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"})]}),s.jsx("span",{children:A&&l==="submitting"?"Autorisation…":"Autoriser"})]}),s.jsx("button",{type:"button",onClick:N,disabled:A,className:"w-full min-h-[48px] bg-gray-100 hover:bg-gray-200 disabled:bg-gray-100 disabled:cursor-not-allowed text-gray-800 font-bold rounded-xl",children:"Refuser"})]}),s.jsxs("p",{className:"text-xs text-gray-500 mt-4 leading-relaxed",children:["En autorisant, vous acceptez que ",s.jsx("strong",{children:b})," ","reçoive ces informations. Vous pouvez révoquer l'accès à tout moment depuis votre profil SBC (à venir)."]})]})]})})}const Ra=Object.create(null);Ra.open="0";Ra.close="1";Ra.ping="2";Ra.pong="3";Ra.message="4";Ra.upgrade="5";Ra.noop="6";
282const ag=Object.create(null);Object.keys(Ra).forEach(e=>{ag[Ra[e]]=e});const t4={type:"error",data:"parser error"},kW=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",SW=typeof ArrayBuffer=="function",BW=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,QE=({type:e,data:t},r,n)=>kW&&t instanceof Blob?r?n(t):eL(t,n):SW&&(t instanceof ArrayBuffer||BW(t))?r?n(t):eL(new Blob([t]),n):n(Ra[e]+(t||"")),eL=(e,t)=>{const r=new FileReader;return r.onload=function(){const n=r.result.split(",")[1];t("b"+(n||""))},r.readAsDataURL(e)};function tL(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let gC;function bCe(e,t){if(kW&&e.data instanceof Blob)return e.data.arrayBuffer().then(tL).then(t);if(SW&&(e.data instanceof ArrayBuffer||BW(e.data)))return t(tL(e.data));QE(e,!1,r=>{gC||(gC=new TextEncoder),t(gC.encode(r))})}const rL="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",zx=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<rL.length;e++)zx[rL.charCodeAt(e)]=e;const CCe=e=>{let t=e.length*.75,r=e.length,n,i=0,a,o,l,c;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),f=new Uint8Array(u);for(n=0;n<r;n+=4)a=zx[e.charCodeAt(n)],o=zx[e.charCodeAt(n+1)],l=zx[e.charCodeAt(n+2)],c=zx[e.charCodeAt(n+3)],f[i++]=a<<2|o>>4,f[i++]=(o&15)<<4|l>>2,f[i++]=(l&3)<<6|c&63;return u},wCe=typeof ArrayBuffer=="function",ZE=(e,t)=>{if(typeof e!="string")return{type:"message",data:DW(e,t)};const r=e.charAt(0);return r==="b"?{type:"message",data:ECe(e.substring(1),t)}:ag[r]?e.length>1?{type:ag[r],data:e.substring(1)}:{type:ag[r]}:t4},ECe=(e,t)=>{if(wCe){const r=CCe(e);return DW(r,t)}else return{base64:!0,data:e}},DW=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},FW="�",jCe=(e,t)=>{const r=e.length,n=new Array(r);let i=0;e.forEach((a,o)=>{QE(a,!1,l=>{n[o]=l,++i===r&&t(n.join(FW))})})},NCe=(e,t)=>{const r=e.split(FW),n=[];for(let i=0;i<r.length;i++){const a=ZE(r[i],t);if(n.push(a),a.type==="error")break}return n};function ACe(){return new TransformStream({transform(e,t){bCe(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 a=new DataView(i.buffer);a.setUint8(0,126),a.setUint16(1,n)}else{i=new Uint8Array(9);const a=new DataView(i.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(n))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(r)})}})}let yC;function Tp(e){return e.reduce((t,r)=>t+r.length,0)}function Mp(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 kCe(e,t){yC||(yC=new TextDecoder);const r=[];let n=0,i=-1,a=!1;return new TransformStream({transform(o,l){for(r.push(o);;){if(n===0){if(Tp(r)<1)break;const c=Mp(r,1);a=(c[0]&128)===128,i=c[0]&127,i<126?n=3:i===126?n=1:n=2}else if(n===1){if(Tp(r)<2)break;const c=Mp(r,2);i=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),n=3}else if(n===2){if(Tp(r)<8)break;const c=Mp(r,8),u=new DataView(c.buffer,c.byteOffset,c.length),f=u.getUint32(0);if(f>Math.pow(2,21)-1){l.enqueue(t4);break}i=f*Math.pow(2,32)+u.getUint32(4),n=3}else{if(Tp(r)<i)break;const c=Mp(r,i);l.enqueue(ZE(a?c:yC.decode(c),t)),n=0}if(i===0||i>e){l.enqueue(t4);break}}}})}const PW=4;function dn(e){if(e)return SCe(e)}function SCe(e){for(var t in dn.prototype)e[t]=dn.prototype[t];return e}dn.prototype.on=dn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};dn.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this};dn.prototype.off=dn.prototype.removeListener=dn.prototype.removeAllListeners=dn.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};dn.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};dn.prototype.emitReserved=dn.prototype.emit;dn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};dn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Xy=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,r)=>r(t,0),yi=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),BCe="arraybuffer";function TW(e,...t){return t.reduce((r,n)=>(e.hasOwnProperty(n)&&(r[n]=e[n]),r),{})}const DCe=yi.setTimeout,FCe=yi.clearTimeout;function Yy(e,t){t.useNativeTimers?(e.setTimeoutFn=DCe.bind(yi),e.clearTimeoutFn=FCe.bind(yi)):(e.setTimeoutFn=yi.setTimeout.bind(yi),e.clearTimeoutFn=yi.clearTimeout.bind(yi))}const PCe=1.33;function TCe(e){return typeof e=="string"?MCe(e):Math.ceil((e.byteLength||e.size)*PCe)}function MCe(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 MW(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function OCe(e){let t="";for(let r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t}function LCe(e){let t={},r=e.split("&");for(let n=0,i=r.length;n<i;n++){let a=r[n].split("=");
282t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class RCe extends Error{constructor(t,r,n){super(t),this.description=r,this.context=n,this.type="TransportError"}}class JE extends dn{constructor(t){super(),this.writable=!1,Yy(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 RCe(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=ZE(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&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const r=OCe(t);return r.length?"?"+r:""}}class _Ce extends JE{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)};NCe(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,jCe(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]=MW()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(t,r)}}let OW=!1;try{OW=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const ICe=OW;function $Ce(){}class zCe extends _Ce{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,a)=>{this.onError("xhr post error",i,a)})}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 Pa extends dn{constructor(t,r,n){super(),this.createRequest=t,Yy(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=TW(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=Pa.requestsCount++,Pa.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=$Ce,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Pa.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()}}Pa.requestsCount=0;Pa.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",nL);else if(typeof addEventListener=="function"){const e="onpagehide"in yi?"pagehide":"unload";addEventListener(e,nL,!1)}}function nL(){for(let e in Pa.requests)Pa.requests.hasOwnProperty(e)&&Pa.requests[e].abort()}const VCe=function(){const e=LW({xdomain:!1});return e&&e.responseType!==null}();class UCe extends zCe{constructor(t){super(t);const r=t&&t.forceBase64;this.supportsBinary=VCe&&!r}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Pa(LW,this.uri(),t)}}function LW(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||ICe))return new XMLHttpRequest}catch{}if(!t)try{return new yi[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const RW=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class qCe extends JE{get name(){return"websocket"}doOpen(){const t=this.uri(),r=this.opts.protocols,n=RW?{}:TW(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)}
282this.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;QE(n,this.supportsBinary,a=>{try{this.doWrite(n,a)}catch{}i&&Xy(()=>{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]=MW()),this.supportsBinary||(r.b64=1),this.createUri(t,r)}}const vC=yi.WebSocket||yi.MozWebSocket;class WCe extends qCe{createSocket(t,r,n){return RW?new vC(t,r,n):r?new vC(t,r):new vC(t)}doWrite(t,r){this.ws.send(r)}}class HCe extends JE{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=kCe(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=t.readable.pipeThrough(r).getReader(),i=ACe();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const a=()=>{n.read().then(({done:l,value:c})=>{l||(this.onPacket(c),a())}).catch(l=>{})};a();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&&Xy(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const GCe={websocket:WCe,webtransport:HCe,polling:UCe},KCe=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,XCe=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function r4(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=KCe.exec(e||""),a={},o=14;for(;o--;)a[XCe[o]]=i[o]||"";return r!=-1&&n!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=YCe(a,a.path),a.queryKey=QCe(a,a.query),a}function YCe(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 QCe(e,t){const r={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,i,a){i&&(r[i]=a)}),r}const n4=typeof addEventListener=="function"&&typeof removeEventListener=="function",og=[];n4&&addEventListener("offline",()=>{og.forEach(e=>e())},!1);class Cl extends dn{constructor(t,r){if(super(),this.binaryType=BCe,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=r4(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=r4(r.host).host);Yy(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={}
282,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=LCe(this.opts.query)),n4&&(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"})},og.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const r=Object.assign({},this.opts.query);r.EIO=PW,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&&Cl.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",Cl.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+=TCe(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,Xy(()=>{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 a={type:t,data:r,options:n};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),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(Cl.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(),n4&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const n=og.indexOf(this._offlineEventListener);n!==-1&&og.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,r),this.writeBuffer=[],this._prevBufferLen=0}}}Cl.protocol=PW;class ZCe extends Cl{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;Cl.priorWebsocketSuccess=!1;const i=()=>{n||(r.send([{type:"ping",data:"probe"}]),r.once("packet",x=>{if(!n)if(x.type==="pong"&&x.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;Cl.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(f(),this.setTransport(r),r.send([{type:"upgrade"}
282]),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 a(){n||(n=!0,f(),r.close(),r=null)}const o=x=>{const m=new Error("probe error: "+x);m.transport=r.name,a(),this.emitReserved("upgradeError",m)};function l(){o("transport closed")}function c(){o("socket closed")}function u(x){r&&x.name!==r.name&&a()}const f=()=>{r.removeListener("open",i),r.removeListener("error",o),r.removeListener("close",l),this.off("close",c),this.off("upgrading",u)};r.once("open",i),r.once("error",o),r.once("close",l),this.once("close",c),this.once("upgrading",u),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 JCe=class extends ZCe{constructor(t,r={}){const n=typeof t=="object"?t:r;(!n.transports||n.transports&&typeof n.transports[0]=="string")&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map(i=>GCe[i]).filter(i=>!!i)),super(t,n)}};function ewe(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=r4(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 a=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+a+":"+n.port+t,n.href=n.protocol+"://"+a+(r&&r.port===n.port?"":":"+n.port),n}const twe=typeof ArrayBuffer=="function",rwe=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,_W=Object.prototype.toString,nwe=typeof Blob=="function"||typeof Blob<"u"&&_W.call(Blob)==="[object BlobConstructor]",swe=typeof File=="function"||typeof File<"u"&&_W.call(File)==="[object FileConstructor]";function ej(e){return twe&&(e instanceof ArrayBuffer||rwe(e))||nwe&&e instanceof Blob||swe&&e instanceof File}function lg(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let r=0,n=e.length;r<n;r++)if(lg(e[r]))return!0;return!1}if(ej(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return lg(e.toJSON(),!0);for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&lg(e[r]))return!0;return!1}function iwe(e){const t=[],r=e.data,n=e;return n.data=s4(r,t),n.attachments=t.length,{packet:n,buffers:t}}function s4(e,t){if(!e)return e;if(ej(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]=s4(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]=s4(e[n],t));return r}return e}function awe(e,t){return e.data=i4(e.data,t),delete e.attachments,e}function i4(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]=i4(e[r],t);else if(typeof e=="object")for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(e[r]=i4(e[r],t));return e}const owe=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],lwe=5;var rr;(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"})(rr||(rr={}));class cwe{constructor(t){this.replacer=t}encode(t){return(t.type===rr.EVENT||t.type===rr.ACK)&&lg(t)?this.encodeAsBinary({type:t.type===rr.EVENT?rr.BINARY_EVENT:rr.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let r=""+t.type;return(t.type===rr.BINARY_EVENT||t.type===rr.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=iwe(t),n=this.encodeAsString(r.packet),i=r.buffers;return i.unshift(n),i}}function sL(e){return Object.prototype.toString.call(e)==="[object Object]"}class tj extends dn{constructor(t){super(),this.reviver=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===rr.BINARY_EVENT;n||r.type===rr.BINARY_ACK?(r.type=n?rr.EVENT:rr.ACK,this.reconstructor=new uwe(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(ej(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(rr[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===rr.BINARY_EVENT||n.type===rr.BINARY_ACK){const a=r+1;for(;t.charAt(++r)!=="-"&&r!=t.length;);const o=t.substring(a,r);if(o!=Number(o)||t.charAt(r)!=="-")throw new Error("Illegal attachments");n.attachments=Number(o)}if(t.charAt(r+1)==="/"){const a=r+1;for(;++r&&!(t.charAt(r)===","||r===t.length););n.nsp=t.substring(a,r)}else n.nsp="/";const i=t.charAt(r+1);if(i!==""&&Number(i)==i){const a=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(a,r+1))}
282if(t.charAt(++r)){const a=this.tryParse(t.substr(r));if(tj.isPayloadValid(n.type,a))n.data=a;else throw new Error("invalid payload")}return n}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,r){switch(t){case rr.CONNECT:return sL(r);case rr.DISCONNECT:return r===void 0;case rr.CONNECT_ERROR:return typeof r=="string"||sL(r);case rr.EVENT:case rr.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&owe.indexOf(r[0])===-1);case rr.ACK:case rr.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class uwe{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=awe(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const dwe=Object.freeze(Object.defineProperty({__proto__:null,Decoder:tj,Encoder:cwe,get PacketType(){return rr},protocol:lwe},Symbol.toStringTag,{value:"Module"}));function qi(e,t,r){return e.on(t,r),function(){e.off(t,r)}}const xwe=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class IW extends dn{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=[qi(t,"open",this.onopen.bind(this)),qi(t,"packet",this.onpacket.bind(this)),qi(t,"error",this.onerror.bind(this)),qi(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,a;if(xwe.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:rr.EVENT,data:r};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const f=this.ids++,x=r.pop();this._registerAckCallback(f,x),o.id=f}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&&!(!((a=this.io.engine)===null||a===void 0)&&a._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 a=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(a),r.apply(this,l)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...r){return new Promise((n,i)=>{const a=(o,l)=>o?i(o):n(l);a.withError=!0,r.push(a),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,...a)=>n!==this._queue[0]?void 0:(i!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(i)):(this._queue.shift(),r&&r(null,...a)),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:rr.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()}
282_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 rr.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 rr.EVENT:case rr.BINARY_EVENT:this.onevent(t);break;case rr.ACK:case rr.BINARY_ACK:this.onack(t);break;case rr.DISCONNECT:this.ondisconnect();break;case rr.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:rr.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.emitReserved("connect"),this._drainQueue(!0)}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:rr.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 k0(e){e=e||{},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}k0.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};k0.prototype.reset=function(){this.attempts=0};k0.prototype.setMin=function(e){this.ms=e};k0.prototype.setMax=function(e){this.max=e};k0.prototype.setJitter=function(e){this.jitter=e};class a4 extends dn{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,Yy(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 k0({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||dwe;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 JCe(this.uri,this.opts);const r=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const i=qi(r,"open",function(){n.onopen(),t&&t()}),a=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},o=qi(r,"error",a);if(this._timeout!==!1){const l=this._timeout,c=this.setTimeoutFn(()=>{i(),a(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(qi(t,"ping",this.onping.bind(this)),qi(t,"data",this.ondata.bind(this)),qi(t,"error",this.onerror.bind(this)),qi(t,"close",this.onclose.bind(this)),qi(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){Xy(()=>{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 IW(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)}
282cleanup(){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(()=>{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 Bx={};function cg(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const r=ewe(e,t.path||"/socket.io"),n=r.source,i=r.id,a=r.path,o=Bx[i]&&a in Bx[i].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let c;return l?c=new a4(n,t):(Bx[i]||(Bx[i]=new a4(n,t)),c=Bx[i]),r.query&&!t.query&&(t.query=r.queryKey),c.socket(r.path,t)}Object.assign(cg,{Manager:a4,Socket:IW,io:cg,connect:cg});const $W=C.createContext(void 0),rj=()=>{const e=C.useContext($W);if(!e)throw new Error("useSocket must be used within a SocketProvider");return e},fwe=({children:e})=>{const{user:t,isAuthenticated:r}=Gt(),[n,i]=C.useState(null),[a,o]=C.useState(!1),[l,c]=C.useState(new Set),u=C.useRef(0),f=5,x=window.location.origin;C.useEffect(()=>{if(!r||!t){n&&(n.disconnect(),i(null),o(!1));return}const te=localStorage.getItem("token");if(!te)return;const ne=cg(x,{auth:{token:te},transports:["websocket","polling"],reconnection:!0,reconnectionAttempts:f,reconnectionDelay:1e3});return ne.on("connect",()=>{console.log("Socket connected:",ne.id),o(!0),u.current=0}),ne.on("disconnect",Y=>{console.log("Socket disconnected:",Y),o(!1)}),ne.on("connect_error",Y=>{console.error("Socket connection error:",Y.message),u.current+=1,u.current>=f&&console.error("Max reconnection attempts reached")}),ne.on("user:online",({userId:Y})=>{c(J=>
282new Set(J).add(Y))}),ne.on("user:offline",({userId:Y})=>{c(J=>{const oe=new Set(J);return oe.delete(Y),oe})}),ne.on("error",({message:Y,code:J})=>{console.error("Socket error:",J,Y)}),i(ne),()=>{ne.disconnect(),i(null),o(!1)}},[r,t,x]);const m=C.useCallback(te=>{n==null||n.emit("conversation:join",te)},[n]),p=C.useCallback(te=>{n==null||n.emit("conversation:leave",te)},[n]),y=C.useCallback((te,ne,Y="text",J)=>{n==null||n.emit("message:send",{conversationId:te,content:ne,type:Y,replyToId:J})},[n]),v=C.useCallback((te,ne)=>{n==null||n.emit("message:read",{conversationId:te,messageIds:ne})},[n]),b=C.useCallback(te=>{n==null||n.emit("typing:start",te)},[n]),E=C.useCallback(te=>{n==null||n.emit("typing:stop",te)},[n]),N=C.useCallback(te=>{n==null||n.emit("status:subscribe",te)},[n]),j=C.useCallback(()=>{n==null||n.emit("status:unsubscribe")},[n]),A=C.useCallback(te=>{n==null||n.emit("status:like",te)},[n]),w=C.useCallback(te=>{n==null||n.emit("status:unlike",te)},[n]),S=C.useCallback(te=>{n==null||n.emit("status:repost",te)},[n]),B=C.useCallback(te=>{n==null||n.emit("status:view",te)},[n]),D=C.useCallback(te=>(n==null||n.on("message:new",te),()=>{n==null||n.off("message:new",te)}),[n]),P=C.useCallback(te=>(n==null||n.on("message:sent",te),()=>{n==null||n.off("message:sent",te)}),[n]),O=C.useCallback(te=>(n==null||n.on("message:status",te),()=>{n==null||n.off("message:status",te)}),[n]),M=C.useCallback(te=>(n==null||n.on("message:read",te),()=>{n==null||n.off("message:read",te)}),[n]),I=C.useCallback(te=>(n==null||n.on("message:deleted",te),()=>{n==null||n.off("message:deleted",te)}),[n]),V=C.useCallback(te=>(n==null||n.on("user:typing",te),()=>{n==null||n.off("user:typing",te)}),[n]),W=C.useCallback(te=>(n==null||n.on("user:stopped_typing",te),()=>{n==null||n.off("user:stopped_typing",te)}),[n]),_=C.useCallback(te=>(n==null||n.on("status:new",te),()=>{n==null||n.off("status:new",te)}),[n]),z=C.useCallback(te=>(n==null||n.on("status:updated",te),()=>{n==null||n.off("status:updated",te)}),[n]),R=C.useCallback(te=>(n==null||n.on("status:deleted",te),()=>{n==null||n.off("status:deleted",te)}),[n]),q=C.useCallback(te=>(n==null||n.on("user:online",te),()=>{n==null||n.off("user:online",te)}),[n]),G=C.useCallback(te=>(n==null||n.on("user:offline",te),()=>{n==null||n.off("user:offline",te)}),[n]),K=C.useCallback(te=>(n==null||n.on("conversation:accepted",te),()=>{n==null||n.off("conversation:accepted",te)}),[n]),$=C.useCallback(te=>(n==null||n.on("conversation:reported",te),()=>{n==null||n.off("conversation:reported",te)}),[n]),H={socket:n,isConnected:a,onlineUsers:l,joinConversation:m,leaveConversation:p,sendMessage:y,markAsRead:v,startTyping:b,stopTyping:E,subscribeToStatuses:N,unsubscribeFromStatuses:j,likeStatus:A,unlikeStatus:w,repostStatus:S,viewStatus:B,onNewMessage:D,onMessageSent:P,onMessageStatus:O,onMessagesRead:M,onMessageDeleted:I,onTyping:V,onStoppedTyping:W,onNewStatus:_,onStatusUpdated:z,onStatusDeleted:R,onUserOnline:q,onUserOffline:G,onConversationAccepted:K,onConversationReported:$};return s.jsx($W.Provider,{value:H,children:e})},hwe=e=>{var n;const t=(n=e.statuses)==null?void 0:n[e.statuses.length-1],r=(t==null?void 0:t.mediaThumbnailUrl)||(t==null?void 0:t.mediaUrl);return r&&(t==null?void 0:t.mediaType)!=="video"&&(t==null?void 0:t.mediaType)!=="text"?X.generateThumbnailUrl(r,128):X.generateThumbnailUrl(e.authorAvatar,128)||rn},mwe=({onStoryClick:e,onCreateClick:t,refreshTrigger:r})=>{const{user:n}=Gt(),[i,a]=C.useState([]),[o,l]=C.useState(!0),[c,u]=C.useState(!1),f=async()=>{var x;try{l(!0);const m=await X.getStatuses(1,100);if(((x=m.body)==null?void 0:x.code)==="STATUS_FEATURE_DISABLED"){u(!0),a([]);return}if(m.body.success&&m.body.data){const p={};console.log("StoriesBar - First status object:",m.body.data[0]),m.body.data.forEach(v=>{var E;const b=v.authorId||v.userId||((E=v.user)==null?void 0:E._id)||v._id;if(console.log("StoriesBar - Processing status, userId:",b,"authorId:",v.authorId),!p[b]){const N=v.author||v.user,j=(N==null?void 0:N.name)||(N!=null&&N.firstName&&(N!=null&&N.lastName)?`${N.firstName} ${N.lastName}`:(N==null?void 0:N.firstName)||(N==null?void 0:N.lastName)||"Utilisateur");p[b]={userId:b,authorName:j,authorAvatar:(N==null?void 0:N.avatar)||rn,statuses:[],hasUnviewed:!1}}p[b].statuses.push(v),v.isViewed||(p[b].hasUnviewed=!0)});const y=Object.values(p).sort((v,b)=>v.hasUnviewed&&!b.hasUnviewed?-1:!v.hasUnviewed&&b.hasUnviewed?1:0);console.log("StoriesBar - Grouped story groups:",y),console.log("StoriesBar - Each group userId:",y.map(v=>
282v.userId)),a(y)}}catch(m){console.error("Failed to fetch stories:",m)}finally{l(!1)}};return C.useEffect(()=>{f()},[r]),c?null:o&&i.length===0?s.jsx(Z.div,{variants:On,initial:"hidden",animate:"show",className:"bg-white border-b border-border p-4",children:s.jsx("div",{className:"flex gap-3 overflow-x-auto",children:[1,2,3,4].map(x=>s.jsxs("div",{className:"flex flex-col items-center gap-2",children:[s.jsx("div",{className:"w-16 h-16 rounded-full bg-gray-200 animate-pulse"}),s.jsx("div",{className:"w-12 h-3 bg-gray-200 rounded animate-pulse"})]},x))})}):(console.log("StoriesBar - Rendering with storyGroups:",i.length,"groups"),s.jsx(Z.div,{variants:On,initial:"hidden",animate:"show",className:"bg-white border-b border-border p-4",children:s.jsxs(Z.div,{variants:Dl,initial:"hidden",animate:"show",className:"flex gap-3 overflow-x-auto scrollbar-hide",children:[s.jsxs(Z.button,{variants:LO,onClick:t,className:"flex flex-col items-center gap-2 flex-shrink-0",children:[s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"w-16 h-16 rounded-full overflow-hidden border-2 border-border",children:s.jsx("img",{src:X.generateThumbnailUrl(n==null?void 0:n.avatar,128)||rn,alt:"Your story",className:"w-full h-full object-cover"})}),s.jsx("div",{className:"absolute bottom-0 right-0 w-5 h-5 bg-blue-500 rounded-full flex items-center justify-center border-2 border-white",children:s.jsx(L,{icon:kl,className:"w-3 h-3 text-white"})})]}),s.jsx("span",{className:"text-xs font-medium text-gray-900 max-w-[64px] truncate",children:"Votre statut"})]},"add-story"),i.map(x=>s.jsxs(Z.button,{variants:LO,onClick:()=>e(x,i),className:"flex flex-col items-center gap-2 flex-shrink-0",children:[s.jsx("div",{className:`bg-primary rounded-full p-0.5 ${x.hasUnviewed?" ":"bg-gray-300"}`,children:s.jsx("div",{className:"w-16 h-16 rounded-full overflow-hidden border-2 border-white bg-white",children:s.jsx("img",{src:hwe(x),alt:x.authorName,loading:"lazy",decoding:"async",className:"w-full h-full object-cover",onError:m=>{m.currentTarget.src=x.authorAvatar||rn}})})}),s.jsx("span",{className:"text-xs font-medium text-gray-900 max-w-[64px] truncate",children:x.authorName})]},x.userId))]})}))},ug={projects_testimonials:{label:"Projets & Témoignages",color:"#FFD700",adminOnly:!0},events_news:{label:"Événements & Actualités",color:"#007BFF",adminOnly:!0},needs_jobs:{label:"Besoins & Emplois",color:"#28A745",adminOnly:!1},business_opportunities:{label:"Business & Opportunités",color:"#6F42C1",adminOnly:!1},culture_tourism:{label:"Culture & Tourisme",color:"#FD7E14",adminOnly:!1}},pwe=["needs_jobs","business_opportunities","culture_tourism"],gwe=({onStatusClick:e,onCreateClick:t,refreshTrigger:r})=>{const[n,i]=C.useState([]),[a,o]=C.useState(!0),[l,c]=C.useState(!1),[u,f]=C.useState("all"),x=async()=>{var p;try{o(!0);const y=u==="all"?void 0:u,v=await X.getStatuses(1,50,y);if(((p=v.body)==null?void 0:p.code)==="STATUS_FEATURE_DISABLED"){c(!0),i([]);return}v.body.success&&v.body.data?(console.log("StatusFeed - Setting statuses:",v.body.data),i(v.body.data)):console.warn("StatusFeed - No data in response:",v)}catch(y){console.error("Failed to fetch statuses:",y)}finally{o(!1)}};C.useEffect(()=>{x()},[u,r]);const m=[{key:"all",label:"Tous"},...Object.entries(ug).map(([p,y])=>({key:p,label:y.label,color:y.color}))];return l?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full bg-white p-8 text-center",children:[s.jsx("p",{className:"font-medium text-gray-900",children:"Les statuts sont temporairement indisponibles"}),s.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"Cette fonctionnalité est en maintenance. Elle reviendra bientôt."})]}):s.jsxs(Z.div,{variants:On,initial:"hidden",animate:"show",className:"flex flex-col h-full bg-white",children:[s.jsx("div",{className:"flex items-center gap-2 p-4 overflow-x-auto scrollbar-hide border-b border-border",children:m.map(p=>s.jsx("button",{onClick:()=>f(p.key),className:`px-4 py-2 rounded-full whitespace-nowrap text-sm font-medium transition-colors ${u===p.key?"bg-blue-500 text-white":"bg-gray-100 text-gray-700 hover:bg-gray-200"}
282`,style:u===p.key&&p.color?{backgroundColor:p.color,color:"white"}:{},children:p.label},p.key))}),s.jsx("div",{className:"p-4 border-b border-border",children:s.jsxs("button",{onClick:t,className:"bg-primary w-full flex items-center justify-center gap-2 text-white py-3 rounded-xl font-semibold transition-all",children:[s.jsx(L,{icon:Fre,className:"w-6 h-6"}),"Créer un statut"]})}),s.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:a&&n.length===0?s.jsx("div",{className:"grid grid-cols-2 gap-4",children:[1,2,3,4,5,6].map(p=>s.jsx("div",{className:"aspect-square bg-gray-200 rounded-xl animate-pulse"},p))}):n.length===0?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center p-8",children:[s.jsx("div",{className:"text-6xl mb-4",children:"📝"}),s.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"Aucun statut"}),s.jsx("p",{className:"text-gray-600 mb-4",children:u==="all"?"Soyez le premier à publier un statut !":"Aucun statut dans cette catégorie"}),s.jsx("button",{onClick:t,className:"bg-blue-500 text-white px-6 py-2 rounded-xl font-semibold hover:bg-blue-600 transition-colors",children:"Créer un statut"})]}):s.jsx(Z.div,{variants:Dl,initial:"hidden",animate:"show",className:"grid grid-cols-2 gap-4",children:n.map(p=>{var y,v,b,E,N,j,A,w,S,B,D,P,O,M;return s.jsxs(Z.button,{variants:qn,onClick:()=>e(p),className:"relative aspect-square rounded-xl overflow-hidden transition-shadow",children:[p.mediaUrl?p.contentType==="video"?s.jsx("video",{src:p.mediaUrl,className:"w-full h-full object-cover",muted:!0}):s.jsx("img",{src:p.mediaUrl,alt:"Status",className:"w-full h-full object-cover"}):s.jsx("div",{className:"bg-primary w-full h-full"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/70 via-transparent to-transparent"}),s.jsx("div",{className:"absolute top-2 right-2 px-2 py-1 rounded-full text-xs font-semibold text-white",style:{backgroundColor:ug[p.category].color},children:ug[p.category].label.split(" ")[0]}),s.jsxs("div",{className:"absolute bottom-0 left-0 right-0 p-3",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("img",{src:X.generateThumbnailUrl(((y=p.author)==null?void 0:y.avatar)||((v=p.user)==null?void 0:v.avatar),80)||rn,alt:((b=p.author)==null?void 0:b.name)||((E=p.user)==null?void 0:E.name),className:"w-6 h-6 rounded-full border-2 border-white"}),s.jsx("span",{className:"text-white text-sm font-semibold truncate",children:((N=p.author)==null?void 0:N.name)||((j=p.user)==null?void 0:j.name)||((A=p.author)!=null&&A.firstName&&((w=p.author)!=null&&w.lastName)?`${p.author.firstName} ${p.author.lastName}`:((S=p.author)==null?void 0:S.firstName)||((B=p.author)==null?void 0:B.lastName)||((D=p.user)!=null&&D.firstName&&((P=p.user)!=null&&P.lastName)?`${p.user.firstName} ${p.user.lastName}`:((O=p.user)==null?void 0:O.firstName)||((M=p.user)==null?void 0:M.lastName)||"Utilisateur"))})]}),p.textContent&&s.jsx("p",{className:"text-white text-xs line-clamp-2",children:p.textContent})]}),s.jsxs("div",{className:"absolute top-2 left-2 flex items-center gap-2 text-white text-xs",children:[s.jsxs("span",{children:["❤️ ",p.likesCount]}),s.jsxs("span",{children:["👁️ ",p.viewsCount]})]})]},p._id)})})})]})},ywe=({storyGroups:e,initialGroupIndex:t,initialStoryIndex:r=0,onClose:n,onReply:i,onGroupChange:a})=>{const[o,l]=C.useState(t),[c,u]=C.useState(r),[f,x]=C.useState(0),[m,p]=C.useState(!1),[y,v]=C.useState(!1),[b,E]=C.useState(0),[N,j]=C.useState(!1),A=C.useRef(null),w=C.useRef(null),S=C.useRef(null),B=e[o],D=B==null?void 0:B.statuses[c],P=C.useCallback(()=>(D==null?void 0:D.contentType)==="video"&&D.mediaDuration?Math.max(D.mediaDuration*1e3,5e3):5e3,[D]);C.useEffect(()=>{D&&(v(D.isLiked),E(D.likesCount))},[D]),C.useEffect(()=>{D&&!D.isViewed&&X.viewStatus(D._id).catch(console.error)},[D]),C.useEffect(()=>{if(!D||m||N)return;x(0);const R=P(),q=50,G=q/R*100;return A.current=setInterval(()=>{x(K=>K>=100?(O(),0):K+G)},q),()=>{A.current&&clearInterval(A.current)}},[D,m,N,o,c]),C.useEffect(()=>{const R=w.current;R&&(m||N?R.pause():R.play().catch(console.error))},[m,N]),C.useEffect(()=>{const R=w.current;R&&(D==null?void 0:D.contentType)==="video"&&(R.currentTime=0,R.load(),!m&&!N&&R.play().catch(console.error))},[D]);const O=C.useCallback(()=>{B&&(c<B.statuses.length-1?(u(c+1),x(0)):o<e.length-1?(l(o+1),u(0),x(0),a==null||a(o+1)):n())},[B,c,o,e.length,n,a]),M=C.useCallback(()=>
282{if(c>0)u(c-1),x(0);else if(o>0){const R=o-1;l(R),u(e[R].statuses.length-1),x(0),a==null||a(R)}},[c,o,e,a]),I=async()=>{if(!D)return;const R=y,q=b;v(!y),E(y?b-1:b+1);try{y?await X.unlikeStatus(D._id):await X.likeStatus(D._id)}catch(G){v(R),E(q),console.error("Failed to toggle like:",G)}},V=()=>{D&&i&&(i(D),n())},W=()=>{S.current=window.setTimeout(()=>{j(!0)},100)},_=()=>{S.current&&(clearTimeout(S.current),S.current=null),j(!1)};C.useEffect(()=>()=>{S.current&&clearTimeout(S.current)},[]),C.useEffect(()=>{const R=q=>{switch(q.key){case"ArrowLeft":M();break;case"ArrowRight":O();break;case"Escape":n();break;case" ":q.preventDefault(),p(G=>!G);break}};return window.addEventListener("keydown",R),()=>window.removeEventListener("keydown",R)},[O,M,n]);const z=R=>{const q=new Date,G=new Date(R),K=Math.floor((q.getTime()-G.getTime())/1e3);return K<60?`${K}s`:K<3600?`${Math.floor(K/60)}m`:K<86400?`${Math.floor(K/3600)}h`:`${Math.floor(K/86400)}d`};return!B||!D?null:s.jsx(It,{children:s.jsxs(Z.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 bg-black",onClick:R=>R.stopPropagation(),children:[s.jsx("div",{className:"absolute top-0 left-0 right-0 z-20 flex gap-1 p-2",children:B.statuses.map((R,q)=>s.jsx("div",{className:"flex-1 h-1 bg-white/30 rounded-full overflow-hidden",children:s.jsx(Z.div,{className:"h-full bg-white rounded-full",initial:{width:"0%"},animate:{width:q<c?"100%":q===c?`${f}%`:"0%"},transition:{duration:.1}})},q))}),s.jsx("div",{className:"absolute top-4 left-0 right-0 z-20 px-4 mt-4",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-full overflow-hidden border-2 border-white",children:B.authorAvatar?s.jsx("img",{src:X.generateThumbnailUrl(B.authorAvatar,80)||rn,alt:B.authorName,className:"w-full h-full object-cover"}):s.jsx("div",{className:"bg-primary w-full h-full flex items-center justify-center text-white font-bold",children:B.authorName.charAt(0).toUpperCase()})}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-white font-semibold text-sm",children:B.authorName}),s.jsx("p",{className:"text-white/80 text-xs",children:z(D.createdAt)})]})]}),s.jsx("button",{onClick:n,className:"w-10 h-10 rounded-full bg-black/30 backdrop-blur-sm flex items-center justify-center text-white hover:bg-black/50 transition-colors",children:s.jsx(L,{icon:gt,className:"w-6 h-6"})})]})}),s.jsxs("div",{className:"absolute inset-0 flex items-center justify-center",children:[D.mediaUrl?D.contentType==="video"?s.jsx("video",{ref:w,src:D.mediaUrl,className:"max-w-full max-h-full object-contain",autoPlay:!0,muted:!0,playsInline:!0,onEnded:O}):s.jsx("img",{src:D.mediaUrl,alt:"Story",className:"max-w-full max-h-full object-contain"}):s.jsx("div",{className:"bg-primary w-full h-full flex items-center justify-center p-8",children:s.jsx("p",{className:"text-white text-2xl md:text-4xl font-bold text-center max-w-2xl",children:D.content||D.textContent})}),D.mediaUrl&&(D.content||D.textContent)&&s.jsx("div",{className:"absolute bottom-32 left-0 right-0 px-6",children:s.jsx("div",{className:"bg-black/50 backdrop-blur-sm rounded-2xl p-4",children:s.jsx("p",{className:"text-white text-base text-center",children:D.content||D.textContent})})})]}),s.jsx("button",{onClick:M,className:"absolute left-0 top-0 bottom-0 w-1/3 z-10 cursor-pointer group","aria-label":"Previous story",children:s.jsx("div",{className:"absolute left-4 top-1/2 -translate-y-1/2 opacity-0 group-hover:opacity-100 transition-opacity",children:s.jsx(L,{icon:c0,className:"w-12 h-12 text-white drop-shadow-lg"})})}),s.jsx("button",{onClick:O,className:"absolute right-0 top-0 bottom-0 w-1/3 z-10 cursor-pointer group","aria-label":"Next story",children:s.jsx("div",{className:"absolute right-4 top-1/2 -translate-y-1/2 opacity-0 group-hover:opacity-100 transition-opacity",children:s.jsx(L,{icon:Mn,className:"w-12 h-12 text-white drop-shadow-lg"})})}),s.jsx("button",{onClick:()=>p(!m),onMouseDown:W,onMouseUp:_,onMouseLeave:_,onTouchStart:W,onTouchEnd:_,className:"absolute left-1/3 right-1/3 top-0 bottom-0 z-10 cursor-pointer","aria-label":m?"Resume":"Pause"}),s.jsx("div",{className:"absolute bottom-0 left-0 right-0 z-20 p-6",children:s.jsx("div",{className:"bg-black/50 backdrop-blur-sm rounded-2xl p-4",children:s.jsxs("div",{className:"flex items-center gap-4",children:[i&&s.jsxs("button",{onClick:V,className:"flex-1 bg-white/10 hover:bg-white/20 text-white font-semibold py-3 px-6 rounded-full flex items-center justify-center gap-2 transition-colors",children:[s.jsx(L,{icon:dy,className:"w-5 h-5"}),s.jsx("span",{children:"Répondre"})]}),s.jsxs("button",{onClick:I,className:"bg-white/10 hover:bg-white/20 text-white font-semibold py-3 px-6 rounded-full flex items-center gap-2 transition-all hover:scale-105",children:[s.jsx(L,{icon:Mh,className:`w-5 h-5 transition-all ${y?"fill-red-500 text-red-500":""}`}),s.jsx("span",{children:b})]})]})})}),m&&s.jsx(Z.div,{initial:{opacity:0,scale:.8}
282,animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 z-30",children:s.jsx("div",{className:"bg-black/70 backdrop-blur-sm rounded-full p-6",children:s.jsxs("div",{className:"flex gap-2",children:[s.jsx("div",{className:"w-2 h-12 bg-white rounded-full"}),s.jsx("div",{className:"w-2 h-12 bg-white rounded-full"})]})})})]})})},vwe=({imageUrl:e,onSave:t,onCancel:r})=>{const[n,i]=C.useState(0),[a,o]=C.useState(1),[l,c]=C.useState(!1),[u,f]=C.useState(null),[x,m]=C.useState(null),[p,y]=C.useState(!1),v=C.useRef(null),b=C.useRef(null),E=C.useRef(null);C.useEffect(()=>{const O=new Image;O.src=e,O.onload=()=>{b.current&&(b.current.src=e)}},[e]);const N=()=>{i(O=>(O+90)%360)},j=()=>{o(O=>Math.min(O+.1,3))},A=()=>{o(O=>Math.max(O-.1,.5))},w=()=>{c(!l),f(null),m(null)},S=O=>{if(!l||!E.current)return;const M=E.current.getBoundingClientRect(),I="touches"in O?O.touches[0].clientX:O.clientX,V="touches"in O?O.touches[0].clientY:O.clientY,W=I-M.left,_=V-M.top;m({x:W,y:_}),f({x:W,y:_,width:0,height:0})},B=O=>{if(!l||!x||!E.current)return;const M=E.current.getBoundingClientRect(),I="touches"in O?O.touches[0].clientX:O.clientX,V="touches"in O?O.touches[0].clientY:O.clientY,W=I-M.left,_=V-M.top,z=W-x.x,R=_-x.y;f({x:z<0?W:x.x,y:R<0?_:x.y,width:Math.abs(z),height:Math.abs(R)})},D=()=>{m(null)},P=async()=>{if(!(!b.current||!v.current)){y(!0);try{const O=v.current,M=O.getContext("2d");if(!M)throw new Error("Canvas context not available");const I=b.current,V=n*Math.PI/180,W=Math.abs(Math.cos(V)),_=Math.abs(Math.sin(V)),z=I.naturalWidth*W+I.naturalHeight*_,R=I.naturalWidth*_+I.naturalHeight*W;if(u&&u.width>0&&u.height>0){const q=I.naturalWidth/I.width,G=I.naturalHeight/I.height;O.width=u.width*q,O.height=u.height*G,M.save(),M.translate(O.width/2,O.height/2),M.rotate(V),M.scale(a,a),M.drawImage(I,u.x*q-I.naturalWidth/2,u.y*G-I.naturalHeight/2,I.naturalWidth,I.naturalHeight),M.restore()}else O.width=z*a,O.height=R*a,M.save(),M.translate(O.width/2,O.height/2),M.rotate(V),M.scale(a,a),M.drawImage(I,-I.naturalWidth/2,-I.naturalHeight/2),M.restore();O.toBlob(q=>{if(!q)throw new Error("Failed to create image blob");const G=new File([q],"edited-image.jpg",{type:"image/jpeg",lastModified:Date.now()});t(G)},"image/jpeg",.95)}catch(O){console.error("Failed to process image:",O),alert("Échec de l'édition de l'image")}finally{y(!1)}}};return s.jsxs(Z.div,{initial:{opacity:0}
282,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 bg-black flex flex-col",children:[s.jsxs("div",{className:"bg-black/80 backdrop-blur-sm p-4 flex items-center justify-between",children:[s.jsx("button",{onClick:r,disabled:p,className:"w-10 h-10 rounded-full bg-white/10 hover:bg-white/20 flex items-center justify-center text-white transition-colors disabled:opacity-50",children:s.jsx(L,{icon:gt,className:"w-6 h-6"})}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{onClick:N,disabled:p,className:"w-10 h-10 rounded-full bg-white/10 hover:bg-white/20 flex items-center justify-center text-white transition-colors disabled:opacity-50",title:"Rotation",children:s.jsx(L,{icon:j3,className:"w-5 h-5"})}),s.jsx("button",{onClick:w,disabled:p,className:`w-10 h-10 rounded-full flex items-center justify-center text-white transition-colors disabled:opacity-50 ${l?"bg-blue-500 hover:bg-blue-600":"bg-white/10 hover:bg-white/20"}`,title:"Recadrer",children:s.jsx(L,{icon:ure,className:"w-5 h-5"})}),s.jsx("button",{onClick:A,disabled:p||a<=.5,className:"w-10 h-10 rounded-full bg-white/10 hover:bg-white/20 flex items-center justify-center text-white transition-colors disabled:opacity-50",title:"Zoom arrière",children:s.jsx(L,{icon:Gre,className:"w-5 h-5"})}),s.jsx("button",{onClick:j,disabled:p||a>=3,className:"w-10 h-10 rounded-full bg-white/10 hover:bg-white/20 flex items-center justify-center text-white transition-colors disabled:opacity-50",title:"Zoom avant",children:s.jsx(L,{icon:Hre,className:"w-5 h-5"})})]}),s.jsx("button",{onClick:P,disabled:p,className:"w-10 h-10 rounded-full bg-green-500 hover:bg-green-600 flex items-center justify-center text-white transition-colors disabled:opacity-50",children:p?s.jsx("div",{className:"w-5 h-5 border-2 border-white/30 border-t-white rounded-full animate-spin"}):s.jsx(L,{icon:Ur,className:"w-6 h-6"})})]}),s.jsxs("div",{ref:E,className:"flex-1 relative overflow-hidden flex items-center justify-center p-4",onMouseDown:S,onMouseMove:B,onMouseUp:D,onMouseLeave:D,onTouchStart:S,onTouchMove:B,onTouchEnd:D,children:[s.jsx("img",{ref:b,src:e,alt:"Edit preview",className:"max-w-full max-h-full object-contain",style:{transform:`rotate(${n}deg) scale(${a})`,transition:"transform 0.3s ease"}}),l&&u&&u.width>0&&u.height>0&&s.jsx("div",{className:"absolute border-2 border-primary bg-blue-500/10",style:{left:u.x,top:u.y,width:u.width,height:u.height,pointerEvents:"none"},children:s.jsx("div",{className:"absolute inset-0 border border-white/50"})}),l&&!u&&s.jsx("div",{className:"absolute bottom-8 left-1/2 -translate-x-1/2 bg-black/80 text-white px-6 py-3 rounded-full text-sm",children:"Glissez pour sélectionner la zone à recadrer"})]}),s.jsx("canvas",{ref:v,className:"hidden"}),s.jsxs("div",{className:"absolute bottom-4 left-4 bg-black/60 text-white px-3 py-1 rounded-full text-sm",children:[Math.round(a*100),"%"]}),n!==0&&s.jsxs("div",{className:"absolute bottom-4 left-20 bg-black/60 text-white px-3 py-1 rounded-full text-sm",children:[n,"°"]})]})},bwe=({videoUrl:e,onSave:t,onCancel:r})=>{const[n,i]=C.useState(!1),[a,o]=C.useState(0),[l,c]=C.useState(0),[u,f]=C.useState(0),[x,m]=C.useState(0),[p,y]=C.useState(!1),[v,b]=C.useState(!1),[E,N]=C.useState(!1),j=C.useRef(null),A=C.useRef(null);C.useEffect(()=>{const I=j.current;if(!I)return;const V=()=>{const _=I.duration;o(_),m(Math.min(_,30))},W=()=>{c(I.currentTime),I.currentTime>=x&&(I.pause(),i(!1),I.currentTime=u)};return I.addEventListener("loadedmetadata",V),I.addEventListener("timeupdate",W),()=>{I.removeEventListener("loadedmetadata",V),I.removeEventListener("timeupdate",W)}},[x,u]);const w=()=>{j.current&&(n?(j.current.pause(),i(!1)):((j.current.currentTime<u||j.current.currentTime>=x)&&(j.current.currentTime=u),j.current.play(),i(!0)))},S=I=>{if(!A.current||!j.current)return;const V=A.current.getBoundingClientRect(),z=(I.clientX-V.left)/V.width*a,R=Math.max(u,Math.min(x,z));j.current.currentTime=R,c(R)},B=(I,V)=>{if(!A.current)return;const W=A.current.getBoundingClientRect(),_=q=>{const G=q-W.left,$=Math.max(0,Math.min(1,G/W.width))*a;if(V){const H=Math.max(0,Math.min($,x-1));f(H),j.current&&l<H&&(j.current.currentTime=H)}else{const H=Math.max(u+1,Math.min($,Math.min(a,30)));m(H),j.current&&l>H&&(j.current.currentTime=H)}},z=q=>{_(q.clientX)},R=()=>{b(!1),N(!1),document.removeEventListener("mousemove",z),document.removeEventListener("mouseup",R)};V?b(!0):N(!0),document.addEventListener("mousemove",z),document.addEventListener("mouseup",R)},D=I=>{const V=Math.floor(I/60),W=Math.floor(I%60);return`${V.toString().padStart(2,"0")}:${W.toString().padStart(2,"0")}`},P=async()=>
282{if(j.current){y(!0);try{const V=await(await fetch(e)).blob(),W=new File([V],"trimmed-video.mp4",{type:"video/mp4",lastModified:Date.now()});W.trimStart=u,W.trimEnd=x,t(W)}catch(I){console.error("Failed to process video:",I),alert("Échec de l'édition de la vidéo")}finally{y(!1)}}},O=x-u,M=O>0&&O<=30;return s.jsxs(Z.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 bg-black flex flex-col",children:[s.jsxs("div",{className:"bg-black/80 backdrop-blur-sm p-4 flex items-center justify-between",children:[s.jsx("button",{onClick:r,disabled:p,className:"w-10 h-10 rounded-full bg-white/10 hover:bg-white/20 flex items-center justify-center text-white transition-colors disabled:opacity-50",children:s.jsx(L,{icon:gt,className:"w-6 h-6"})}),s.jsxs("div",{className:"flex items-center gap-3 text-white",children:[s.jsx(L,{icon:Tre,className:"w-5 h-5"}),s.jsxs("span",{className:"text-sm font-medium",children:["Durée: ",D(O),O>30&&s.jsx("span",{className:"ml-2 text-red-400",children:"(Max 30s)"})]})]}),s.jsx("button",{onClick:P,disabled:p||!M,className:"w-10 h-10 rounded-full bg-green-500 hover:bg-green-600 flex items-center justify-center text-white transition-colors disabled:opacity-50",children:p?s.jsx("div",{className:"w-5 h-5 border-2 border-white/30 border-t-white rounded-full animate-spin"}):s.jsx(L,{icon:Ur,className:"w-6 h-6"})})]}),s.jsxs("div",{className:"flex-1 relative overflow-hidden flex items-center justify-center bg-black",children:[s.jsx("video",{ref:j,src:e,className:"max-w-full max-h-full object-contain",playsInline:!0}),s.jsx("button",{onClick:w,className:"absolute inset-0 flex items-center justify-center bg-black/20 hover:bg-black/30 transition-colors group",children:s.jsx("div",{className:"w-20 h-20 rounded-full bg-white/10 backdrop-blur-sm flex items-center justify-center group-hover:bg-white/20 transition-colors",children:n?s.jsx(L,{icon:kg,className:"w-10 h-10 text-white"}):s.jsx(L,{icon:wf,className:"w-10 h-10 text-white ml-1"})})})]}),s.jsxs("div",{className:"bg-black/80 backdrop-blur-sm p-6 space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{ref:A,onClick:S,className:"relative h-16 bg-white/10 rounded-lg overflow-hidden cursor-pointer",children:[s.jsx("div",{className:"absolute top-0 bottom-0 bg-black/60",style:{left:0,right:`${(1-u/a)*100}%`}}),s.jsx("div",{className:"absolute top-0 bottom-0 bg-black/60",style:{left:`${x/a*100}%`,right:0}}),s.jsx("div",{className:"absolute top-0 bottom-0 bg-blue-500/20 border-y-2 border-primary",style:{left:`${u/a*100}%`,right:`${(1-x/a)*100}%`}}),s.jsx("div",{onMouseDown:I=>{I.stopPropagation(),B(I,!0)},className:`absolute top-0 bottom-0 w-2 bg-blue-500 cursor-ew-resize hover:bg-blue-400 transition-colors ${v?"bg-blue-400":""}`,style:{left:`${u/a*100}%`},children:s.jsx("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-6 h-6 bg-blue-500 rounded-full border-2 border-white"})}),s.jsx("div",{onMouseDown:I=>{I.stopPropagation(),B(I,!1)},className:`absolute top-0 bottom-0 w-2 bg-blue-500 cursor-ew-resize hover:bg-blue-400 transition-colors ${E?"bg-blue-400":""}`,style:{left:`${x/a*100}%`},children:s.jsx("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-6 h-6 bg-blue-500 rounded-full border-2 border-white"})}),s.jsx("div",{className:"absolute top-0 bottom-0 w-0.5 bg-white border border-border",style:{left:`${l/a*100}%`},children:s.jsx("div",{className:"absolute -top-1 left-1/2 -translate-x-1/2 w-3 h-3 bg-white rounded-full"})})]}),s.jsxs("div",{className:"flex justify-between text-sm text-white/60",children:[s.jsx("span",{children:D(u)}),s.jsx("span",{children:D(l)}),s.jsx("span",{children:D(x)})]})]}),s.jsx("div",{className:"text-center text-sm text-white/60",children:"Glissez les poignées bleues pour découper la vidéo (max 30s)"})]})]})},Cwe=({isOpen:e,onClose:t,onSuccess:r})=>{const[n,i]=C.useState(""),[a,o]=C.useState(""),[l,c]=C.useState(null),[u,f]=C.useState(null),[x,m]=C.useState(null),[p,y]=C.useState(!1),[v,b]=C.useState(null),[E,N]=C.useState("compose"),j=C.useRef(null),A=C.useRef(null),w=C.useRef(null);C.useEffect(()=>()=>{u&&URL.revokeObjectURL(u)},[u]),C.useEffect(()=>{w.current&&x==="video"&&w.current.play().catch(console.error)}
282,[u,x]),C.useEffect(()=>{e||S()},[e]);const S=()=>{i(""),o(""),c(null),u&&URL.revokeObjectURL(u),f(null),m(null),b(null),y(!1),N("compose")},B=_=>new Promise(z=>{const R=document.createElement("video");R.preload="metadata",R.onloadedmetadata=()=>{window.URL.revokeObjectURL(R.src),R.duration>30?(b("La vidéo ne peut pas dépasser 30 secondes"),z(!1)):z(!0)},R.onerror=()=>{b("Impossible de lire la vidéo"),z(!1)},R.src=URL.createObjectURL(_)}),D=async _=>{var R;const z=(R=_.target.files)==null?void 0:R[0];if(z){if(b(null),!z.type.startsWith("image/")){b("Veuillez sélectionner une image valide");return}if(z.size>10*1024*1024){b("L'image ne peut pas dépasser 10 MB");return}u&&URL.revokeObjectURL(u),c(z),f(URL.createObjectURL(z)),m("image")}},P=async _=>{var q;const z=(q=_.target.files)==null?void 0:q[0];if(!z)return;if(b(null),!z.type.startsWith("video/")){b("Veuillez sélectionner une vidéo valide");return}if(z.size>50*1024*1024){b("La vidéo ne peut pas dépasser 50 MB");return}await B(z)&&(u&&URL.revokeObjectURL(u),c(z),f(URL.createObjectURL(z)),m("video"))},O=()=>{u&&URL.revokeObjectURL(u),c(null),f(null),m(null),j.current&&(j.current.value=""),A.current&&(A.current.value="")},M=()=>{!l||!x||(x==="image"?N("edit-image"):x==="video"&&N("edit-video"))},I=_=>{u&&URL.revokeObjectURL(u),c(_),f(URL.createObjectURL(_)),N("compose")},V=async()=>{if(!n){b("Veuillez sélectionner une catégorie");return}if(!a.trim()&&!l){b("Veuillez ajouter du texte ou des médias");return}if(a.length>500){b("Le texte ne peut pas dépasser 500 caractères");return}y(!0),b(null);try{const _=l?x==="video"?"video":"image":"text";await X.createStatus({category:n,contentType:_,content:a.trim()||void 0,media:l||void 0}),r==null||r(),t()}catch(_){console.error("Failed to create status:",_),b(_ instanceof Error?_.message:"Échec de la création du statut")}finally{y(!1)}},W=n&&(a.trim().length>0||l!==null)&&!p;return e?E==="edit-image"&&u?s.jsx(vwe,{imageUrl:u,onSave:I,onCancel:()=>N("compose")}):E==="edit-video"&&u?s.jsx(bwe,{videoUrl:u,onSave:I,onCancel:()=>N("compose")}):s.jsx(It,{children:s.jsxs(Z.div,{initial:{opacity:0}
282,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 bg-black",onClick:_=>_.stopPropagation(),children:[s.jsx("div",{className:"absolute inset-0 bg-black",children:u&&x==="video"?s.jsx("video",{ref:w,src:u,className:"w-full h-full object-contain",autoPlay:!0,loop:!0,muted:!0,playsInline:!0}):u&&x==="image"?s.jsx("img",{src:u,alt:"Preview",className:"w-full h-full object-contain"}):s.jsx("div",{className:"bg-primary w-full h-full"})}),a&&!u&&s.jsx("div",{className:"absolute inset-0 flex items-center justify-center p-8 pointer-events-none",children:s.jsx("p",{className:"text-white text-center font-bold drop-shadow-lg text-3xl md:text-5xl",style:{textShadow:"0 2px 4px rgba(0,0,0,0.3)"},children:a})}),s.jsx("button",{onClick:t,disabled:p,className:"absolute top-6 right-6 z-30 w-12 h-12 rounded-full bg-black/50 backdrop-blur-sm flex items-center justify-center text-white hover:bg-black/70 transition-colors disabled:opacity-50",children:s.jsx(L,{icon:gt,className:"w-6 h-6"})}),s.jsx("div",{className:"absolute top-6 left-6 right-24 z-30",children:s.jsxs("select",{value:n,onChange:_=>i(_.target.value),disabled:p,className:"w-full bg-black/50 backdrop-blur-sm text-white border-2 border-white/30 rounded-full px-6 py-3 focus:outline-none focus:border-white/60 transition-colors disabled:opacity-50",children:[s.jsx("option",{value:"",children:"Sélectionner une catégorie"}),pwe.map(_=>s.jsx("option",{value:_,children:ug[_].label},_))]})}),v&&s.jsx("div",{className:"absolute top-24 left-6 right-6 z-30",children:s.jsx(Z.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"bg-red-500/90 backdrop-blur-sm text-white px-6 py-3 rounded-2xl text-center font-semibold",children:v})}),s.jsx("div",{className:"absolute bottom-0 left-0 right-0 z-30 p-6",children:s.jsxs("div",{className:"bg-black/50 backdrop-blur-md rounded-3xl p-6 space-y-4",children:[s.jsx("textarea",{value:a,onChange:_=>{o(_.target.value),b(null)},placeholder:"Ajoutez du texte à votre story...",disabled:p,maxLength:500,className:"w-full bg-white/10 text-white placeholder-white/60 border-2 border-white/20 rounded-2xl px-4 py-3 focus:outline-none focus:border-white/40 transition-colors resize-none disabled:opacity-50",rows:3}),a.length>0&&s.jsxs("div",{className:"text-right text-white/60 text-sm",children:[a.length," / 500"]}),s.jsxs("div",{className:"flex items-center gap-3",children:[l?s.jsxs(s.Fragment,{children:[s.jsxs("button",{onClick:M,disabled:p,className:"flex-1 bg-blue-500/80 hover:bg-blue-600/90 text-white font-semibold py-3 px-4 rounded-full flex items-center justify-center gap-2 transition-colors disabled:opacity-50",children:[s.jsx(L,{icon:Uc,className:"w-5 h-5"}),s.jsx("span",{children:"Éditer"})]}),s.jsxs("button",{onClick:O,disabled:p,className:"flex-1 bg-red-500/80 hover:bg-red-600/90 text-white font-semibold py-3 px-4 rounded-full flex items-center justify-center gap-2 transition-colors disabled:opacity-50",children:[s.jsx(L,{icon:kd,className:"w-5 h-5"}),s.jsx("span",{children:"Supprimer"})]})]}):s.jsxs(s.Fragment,{children:[s.jsxs("label",{className:"flex-1 bg-white/10 hover:bg-white/20 text-white font-semibold py-3 px-4 rounded-full flex items-center justify-center gap-2 transition-colors cursor-pointer disabled:opacity-50",children:[s.jsx(L,{icon:N$,className:"w-5 h-5"}),s.jsx("span",{children:"Photo"}),s.jsx("input",{ref:j,type:"file",accept:"image/*",onChange:D,disabled:p,className:"hidden"})]}),s.jsxs("label",{className:"flex-1 bg-white/10 hover:bg-white/20 text-white font-semibold py-3 px-4 rounded-full flex items-center justify-center gap-2 transition-colors cursor-pointer disabled:opacity-50",children:[s.jsx(L,{icon:Ure,className:"w-5 h-5"}),s.jsx("span",{children:"Vidéo"}),s.jsx("input",{ref:A,type:"file",accept:"video/*",onChange:P,disabled:p,className:"hidden"})]})]}),s.jsx("button",{onClick:V,disabled:!W,className:"bg-primary flex-1 text-white font-bold py-3 px-6 rounded-full flex items-center justify-center gap-2 transition-all disabled:opacity-50 disabled:cursor-not-allowed",children:p?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"w-5 h-5 border-2 border-white/30 border-t-white rounded-full animate-spin"}),s.jsx("span",{children:"Partage..."})]}):s.jsxs(s.Fragment,{children:[s.jsx(L,{icon:to,className:"w-5 h-5"}),s.jsx("span",{children:"Partager"})]})})]})]})})]})}):null},zW=6048e5,wwe=864e5,VW=6e4,UW=36e5,Op=43200,iL=1440,aL=Symbol.for("constructDateFrom");function Zs(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&aL in e?e[aL](t):e instanceof Date?new e.constructor(t):new Date(t)}function on(e,t){return Zs(t||e,e)}function Ewe(e,t,r){const n=on(e,r==null?void 0:r.in);return isNaN(t)?Zs(e,NaN):(n.setDate(n.getDate()+t),n)}let jwe={};function Zh(){return jwe}function dh(e,t){var l,c,u,f;const r=Zh(),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??((f=(u=r.locale)==null?void 0:u.options)==null?void 0:f.weekStartsOn)??0,i=on(e,t==null?void 0:t.in),a=i.getDay(),o=(a<n?7:0)+a-n;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function _1(e,t){return dh(e,{...t,weekStartsOn:1}
282)}function qW(e,t){const r=on(e,t==null?void 0:t.in),n=r.getFullYear(),i=Zs(r,0);i.setFullYear(n+1,0,4),i.setHours(0,0,0,0);const a=_1(i),o=Zs(r,0);o.setFullYear(n,0,4),o.setHours(0,0,0,0);const l=_1(o);return r.getTime()>=a.getTime()?n+1:r.getTime()>=l.getTime()?n:n-1}function I1(e){const t=on(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 Jh(e,...t){const r=Zs.bind(null,e||t.find(n=>typeof n=="object"));return t.map(r)}function $1(e,t){const r=on(e,t==null?void 0:t.in);return r.setHours(0,0,0,0),r}function Nwe(e,t,r){const[n,i]=Jh(r==null?void 0:r.in,e,t),a=$1(n),o=$1(i),l=+a-I1(a),c=+o-I1(o);return Math.round((l-c)/wwe)}function Awe(e,t){const r=qW(e,t),n=Zs(e,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),_1(n)}function dg(e,t){const r=+on(e)-+on(t);return r<0?-1:r>0?1:r}function nj(e){return Zs(e,Date.now())}function WW(e,t,r){const[n,i]=Jh(r==null?void 0:r.in,e,t);return+$1(n)==+$1(i)}function kwe(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Swe(e){return!(!kwe(e)&&typeof e!="number"||isNaN(+on(e)))}function Bwe(e,t,r){const[n,i]=Jh(r==null?void 0:r.in,e,t),a=n.getFullYear()-i.getFullYear(),o=n.getMonth()-i.getMonth();return a*12+o}function Dwe(e){return t=>{const n=(e?Math[e]:Math.trunc)(t);return n===0?0:n}}function Fwe(e,t){return+on(e)-+on(t)}function Pwe(e,t){const r=on(e,t==null?void 0:t.in);return r.setHours(23,59,59,999),r}function Twe(e,t){const r=on(e,t==null?void 0:t.in),n=r.getMonth();return r.setFullYear(r.getFullYear(),n+1,0),r.setHours(23,59,59,999),r}function Mwe(e,t){const r=on(e,t==null?void 0:t.in);return+Pwe(r,t)==+Twe(r,t)}function Owe(e,t,r){const[n,i,a]=Jh(r==null?void 0:r.in,e,e,t),o=dg(i,a),l=Math.abs(Bwe(i,a));if(l<1)return 0;i.getMonth()===1&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-o*l);let c=dg(i,a)===-o;Mwe(n)&&l===1&&dg(n,a)===1&&(c=!1);const u=o*(l-+c);return u===0?0:u}function Lwe(e,t,r){const n=Fwe(e,t)/1e3;return Dwe(r==null?void 0:r.roundingMethod)(n)}function Rwe(e,t){const r=on(e,t==null?void 0:t.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}const _we={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"}},Iwe=(e,t,r)=>{let n;const i=_we[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 cd(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const $we={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},zwe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Vwe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Uwe={date:cd({formats:$we,defaultWidth:"full"}),time:cd({formats:zwe,defaultWidth:"full"}),dateTime:cd({formats:Vwe,defaultWidth:"full"})},qwe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Wwe=(e,t,r,n)=>qwe[e];function ga(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 a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}
282const Hwe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Gwe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Kwe={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"]},Xwe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Ywe={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"}},Qwe={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"}},Zwe=(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"},Jwe={ordinalNumber:Zwe,era:ga({values:Hwe,defaultWidth:"wide"}),quarter:ga({values:Gwe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ga({values:Kwe,defaultWidth:"wide"}),day:ga({values:Xwe,defaultWidth:"wide"}),dayPeriod:ga({values:Ywe,defaultWidth:"wide",formattingValues:Qwe,defaultFormattingWidth:"wide"})};function ya(e){return(t,r={})=>{const n=r.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;const o=a[0],l=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?t6e(l,x=>x.test(o)):e6e(l,x=>x.test(o));let u;u=e.valueCallback?e.valueCallback(c):c,u=r.valueCallback?r.valueCallback(u):u;const f=t.slice(o.length);return{value:u,rest:f}}}function e6e(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function t6e(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function HW(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const i=n[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=r.valueCallback?r.valueCallback(o):o;const l=t.slice(i.length);return{value:o,rest:l}}}const r6e=/^(\d+)(th|st|nd|rd)?/i,n6e=/\d+/i,s6e={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},i6e={any:[/^b/i,/^(a|c)/i]},a6e={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},o6e={any:[/1/i,/2/i,/3/i,/4/i]},l6e={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},c6e={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]},u6e={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},d6e={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]},x6e={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},f6e={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}},h6e={ordinalNumber:HW({matchPattern:r6e,parsePattern:n6e,valueCallback:e=>parseInt(e,10)}),era:ya({matchPatterns:s6e,defaultMatchWidth:"wide",parsePatterns:i6e,defaultParseWidth:"any"}),quarter:ya({matchPatterns:a6e,defaultMatchWidth:"wide",parsePatterns:o6e,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ya({matchPatterns:l6e,defaultMatchWidth:"wide",parsePatterns:c6e,defaultParseWidth:"any"}),day:ya({matchPatterns:u6e,defaultMatchWidth:"wide",parsePatterns:d6e,defaultParseWidth:"any"}),dayPeriod:ya({matchPatterns:x6e,defaultMatchWidth:"any",parsePatterns:f6e,defaultParseWidth:"any"})},GW={code:"en-US",formatDistance:Iwe,formatLong:Uwe,formatRelative:Wwe,localize:Jwe,match:h6e,options:{weekStartsOn:0,firstWeekContainsDate:1}};function m6e(e,t){const r=on(e,t==null?void 0:t.in);return Nwe(r,Rwe(r))+1}function p6e(e,t){const r=on(e,t==null?void 0:t.in),n=+_1(r)-+Awe(r);return Math.round(n/zW)+1}function KW(e,t){var f,x,m,p;const r=on(e,t==null?void 0:t.in),n=r.getFullYear(),i=Zh(),a=(t==null?void 0:t.firstWeekContainsDate)??((x=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:x.firstWeekContainsDate)??i.firstWeekContainsDate??((p=(m=i.locale)==null?void 0:m.options)==null?void 0:p.firstWeekContainsDate)??1,o=Zs((t==null?void 0:t.in)||e,0);o.setFullYear(n+1,0,a),o.setHours(0,0,0,0);const l=dh(o,t),c=Zs((t==null?void 0:t.in)||e,0);c.setFullYear(n,0,a),c.setHours(0,0,0,0);const u=dh(c,t);return+r>=+l?n+1:+r>=+u?n:n-1}function g6e(e,t){var l,c,u,f;const r=Zh(),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??((f=(u=r.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??1,i=KW(e,t),a=Zs((t==null?void 0:t.in)||e,0);return a.setFullYear(i,0,n),a.setHours(0,0,0,0),dh(a,t)}function y6e(e,t){const r=on(e,t==null?void 0:t.in),n=+dh(r,t)-+g6e(r,t);return Math.round(n/zW)+1}function yr(e,t){const r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}const Zo={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return yr(t==="yy"?n%100:n,t.length)},M(e,t){const r=e.getMonth();return t==="M"?String(r+1):yr(r+1,2)},d(e,t){return yr(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 yr(e.getHours()%12||12,t.length)},H(e,t){return yr(e.getHours(),t.length)},m(e,t){return yr(e.getMinutes(),t.length)},s(e,t){return yr(e.getSeconds(),t.length)},S(e,t){const r=t.length,n=e.getMilliseconds(),i=Math.trunc(n*Math.pow(10,r-3));return yr(i,t.length)}},Iu={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},oL={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 Zo.y(e,t)},Y:function(e,t,r,n){const i=KW(e,n),a=i>0?i:1-i;if(t==="YY"){const o=a%100;return yr(o,2)}return t==="Yo"?r.ordinalNumber(a,{unit:"year"}):yr(a,t.length)},R:function(e,t){const r=qW(e);return yr(r,t.length)},u:function(e,t){const r=e.getFullYear();return yr(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 yr(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 yr(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 Zo.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 yr(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=y6e(e,n);return t==="wo"?r.ordinalNumber(i,{unit:"week"}):yr(i,t.length)},I:function(e,t,r){const n=p6e(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):yr(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):Zo.d(e,t)},D:function(e,t,r){const n=m6e(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):yr(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const i=e.getDay(),a=(i-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return yr(a,2);case"eo":return r.ordinalNumber(a,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"});case"eeee":default:return r.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const i=e.getDay(),a=(i-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return yr(a,t.length);case"co":return r.ordinalNumber(a,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"});case"cccc":default:return r.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),i=n===0?7:n;switch(t){case"i":return String(i);case"ii":return yr(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=Iu.noon:n===0?i=Iu.midnight:i=n/12>
282=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=Iu.evening:n>=12?i=Iu.afternoon:n>=4?i=Iu.morning:i=Iu.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 Zo.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):Zo.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):yr(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):yr(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):Zo.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):Zo.s(e,t)},S:function(e,t){return Zo.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return cL(n);case"XXXX":case"XX":return cc(n);case"XXXXX":case"XXX":default:return cc(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return cL(n);case"xxxx":case"xx":return cc(n);case"xxxxx":case"xxx":default:return cc(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+lL(n,":");case"OOOO":default:return"GMT"+cc(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+lL(n,":");case"zzzz":default:return"GMT"+cc(n,":")}},t:function(e,t,r){const n=Math.trunc(+e/1e3);return yr(n,t.length)},T:function(e,t,r){return yr(+e,t.length)}};function lL(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),i=Math.trunc(n/60),a=n%60;return a===0?r+String(i):r+String(i)+t+yr(a,2)}function cL(e,t){return e%60===0?(e>0?"-":"+")+yr(Math.abs(e)/60,2):cc(e,t)}function cc(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),i=yr(Math.trunc(n/60),2),a=yr(n%60,2);return r+i+t+a}const uL=(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"})}},XW=(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"})}},v6e=(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],i=r[2];if(!i)return uL(e,t);let a;switch(n){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",uL(n,t)).replace("{{time}}",XW(i,t))},b6e={p:XW,P:v6e},C6e=/^D+$/,w6e=/^Y+$/,E6e=["D","DD","YY","YYYY"];function j6e(e){return C6e.test(e)}function N6e(e){return w6e.test(e)}function A6e(e,t,r){const n=k6e(e,t,r);if(console.warn(n),E6e.includes(e))throw new RangeError(n)}function k6e(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 S6e=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,B6e=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,D6e=/^'([^]*?)'?$/,F6e=/''/g,P6e=/[a-zA-Z]/;function xg(e,t,r){var f,x,m,p,y,v,b,E;const n=Zh(),i=(r==null?void 0:r.locale)??n.locale??GW,a=(r==null?void 0:r.firstWeekContainsDate)??((x=(f=r==null?void 0:r.locale)==null?void 0:f.options)==null?void 0:x.firstWeekContainsDate)??n.firstWeekContainsDate??((p=(m=n.locale)==null?void 0:m.options)==null?void 0:p.firstWeekContainsDate)??1,o=(r==null?void 0:r.weekStartsOn)??((v=(y=r==null?void 0:r.locale)==null?void 0:y.options)==null?void 0:v.weekStartsOn)??n.weekStartsOn??((E=(b=n.locale)==null?void 0:b.options)==null?void 0:E.weekStartsOn)??0,l=on(e,r==null?void 0:r.in);if(!Swe(l))throw new RangeError("Invalid time value");let c=t.match(B6e).map(N=>{const j=N[0];if(j==="p"||j==="P"){const A=b6e[j];return A(N,i.formatLong)}return N}).join("").match(S6e).map(N=>{if(N==="''")return{isToken:!1,value:"'"};const j=N[0];if(j==="'")return{isToken:!1,value:T6e(N)};if(oL[j])return{isToken:!0,value:N};
282if(j.match(P6e))throw new RangeError("Format string contains an unescaped latin alphabet character `"+j+"`");return{isToken:!1,value:N}});i.localize.preprocessor&&(c=i.localize.preprocessor(l,c));const u={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return c.map(N=>{if(!N.isToken)return N.value;const j=N.value;(!(r!=null&&r.useAdditionalWeekYearTokens)&&N6e(j)||!(r!=null&&r.useAdditionalDayOfYearTokens)&&j6e(j))&&A6e(j,t,String(e));const A=oL[j[0]];return A(l,j,i.localize,u)}).join("")}function T6e(e){const t=e.match(D6e);return t?t[1].replace(F6e,"'"):e}function M6e(e,t,r){const n=Zh(),i=(r==null?void 0:r.locale)??n.locale??GW,a=2520,o=dg(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}),[c,u]=Jh(r==null?void 0:r.in,...o>0?[t,e]:[e,t]),f=Lwe(u,c),x=(I1(u)-I1(c))/1e3,m=Math.round((f-x)/60);let p;if(m<2)return r!=null&&r.includeSeconds?f<5?i.formatDistance("lessThanXSeconds",5,l):f<10?i.formatDistance("lessThanXSeconds",10,l):f<20?i.formatDistance("lessThanXSeconds",20,l):f<40?i.formatDistance("halfAMinute",0,l):f<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<iL){const y=Math.round(m/60);return i.formatDistance("aboutXHours",y,l)}else{if(m<a)return i.formatDistance("xDays",1,l);if(m<Op){const y=Math.round(m/iL);return i.formatDistance("xDays",y,l)}else if(m<Op*2)return p=Math.round(m/Op),i.formatDistance("aboutXMonths",p,l)}if(p=Owe(u,c),p<12){const y=Math.round(m/Op);return i.formatDistance("xMonths",y,l)}else{const y=p%12,v=Math.trunc(p/12);return y<3?i.formatDistance("aboutXYears",v,l):y<9?i.formatDistance("overXYears",v,l):i.formatDistance("almostXYears",v+1,l)}}function dL(e,t){return M6e(e,nj(e),t)}function O6e(e,t){return WW(Zs(e,e),nj(e))}function L6e(e,t,r){return Ewe(e,-1,r)}function R6e(e,t){return WW(Zs(e,e),L6e(nj(e)))}function af(e,t){const r=()=>Zs(t==null?void 0:t.in,NaN),i=z6e(e);let a;if(i.date){const u=V6e(i.date,2);a=U6e(u.restDateString,u.year)}if(!a||isNaN(+a))return r();const o=+a;let l=0,c;if(i.time&&(l=q6e(i.time),isNaN(l)))return r();if(i.timezone){if(c=W6e(i.timezone),isNaN(c))return r()}else{const u=new Date(o+l),f=on(0,t==null?void 0:t.in);return f.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),f.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),f}return on(o+l+c,t==null?void 0:t.in)}const Lp={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},_6e=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,I6e=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,$6e=/^([+-])(\d{2})(?::?(\d{2}))?$/;function z6e(e){const t={},r=e.split(Lp.dateTimeDelimiter);let n;if(r.length>2)return t;if(/:/.test(r[0])?n=r[0]:(t.date=r[0],n=r[1],Lp.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Lp.timeZoneDelimiter)[0],n=e.substr(t.date.length,e.length))),n){const i=Lp.timezone.exec(n);i?(t.time=n.replace(i[1],""),t.timezone=i[1]):t.time=n}return t}function V6e(e,t){const r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),n=e.match(r);if(!n)return{year:NaN,restDateString:""};const i=n[1]?parseInt(n[1]):null,a=n[2]?parseInt(n[2]):null;return{year:a===null?i:a*100,restDateString:e.slice((n[1]||n[2]).length)}}function U6e(e,t){if(t===null)return new Date(NaN);const r=e.match(_6e);if(!r)return new Date(NaN);const n=!!r[4],i=Dx(r[1]),a=Dx(r[2])-1,o=Dx(r[3]),l=Dx(r[4]),c=Dx(r[5])-1;if(n)return Y6e(t,l,c)?H6e(t,l,c):new Date(NaN);{const u=new Date(0);return!K6e(t,a,o)||!X6e(t,i)?new Date(NaN):(u.setUTCFullYear(t,a,Math.max(i,o)),u)}}function Dx(e){return e?parseInt(e):1}function q6e(e){const t=e.match(I6e);if(!t)return NaN;const r=bC(t[1]),n=bC(t[2]),i=bC(t[3]);return Q6e(r,n,i)?r*UW+n*VW+i*1e3:NaN}function bC(e){return e&&parseFloat(e.replace(",","."))||0}function W6e(e){if(e==="Z")return 0;const t=e.match($6e);if(!t)return 0;
282const r=t[1]==="+"?-1:1,n=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return Z6e(n,i)?r*(n*UW+i*VW):NaN}function H6e(e,t,r){const n=new Date(0);n.setUTCFullYear(e,0,4);const i=n.getUTCDay()||7,a=(t-1)*7+r+1-i;return n.setUTCDate(n.getUTCDate()+a),n}const G6e=[31,null,31,30,31,30,31,31,30,31,30,31];function YW(e){return e%400===0||e%4===0&&e%100!==0}function K6e(e,t,r){return t>=0&&t<=11&&r>=1&&r<=(G6e[t]||(YW(e)?29:28))}function X6e(e,t){return t>=1&&t<=(YW(e)?366:365)}function Y6e(e,t,r){return t>=1&&t<=53&&r>=0&&r<=6}function Q6e(e,t,r){return e===24?t===0&&r===0:r>=0&&r<60&&t>=0&&t<60&&e>=0&&e<25}function Z6e(e,t){return t>=0&&t<=59}const J6e={lessThanXSeconds:{one:"moins d’une seconde",other:"moins de {{count}} secondes"},xSeconds:{one:"1 seconde",other:"{{count}} secondes"},halfAMinute:"30 secondes",lessThanXMinutes:{one:"moins d’une minute",other:"moins de {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"environ 1 heure",other:"environ {{count}} heures"},xHours:{one:"1 heure",other:"{{count}} heures"},xDays:{one:"1 jour",other:"{{count}} jours"},aboutXWeeks:{one:"environ 1 semaine",other:"environ {{count}} semaines"},xWeeks:{one:"1 semaine",other:"{{count}} semaines"},aboutXMonths:{one:"environ 1 mois",other:"environ {{count}} mois"},xMonths:{one:"1 mois",other:"{{count}} mois"},aboutXYears:{one:"environ 1 an",other:"environ {{count}} ans"},xYears:{one:"1 an",other:"{{count}} ans"},overXYears:{one:"plus d’un an",other:"plus de {{count}} ans"},almostXYears:{one:"presqu’un an",other:"presque {{count}} ans"}},e4e=(e,t,r)=>{let n;const i=J6e[e];return typeof i=="string"?n=i:t===1?n=i.one:n=i.other.replace("{{count}}",String(t)),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"dans "+n:"il y a "+n:n},t4e={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},r4e={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},n4e={full:"{{date}} 'à' {{time}}",long:"{{date}} 'à' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},s4e={date:cd({formats:t4e,defaultWidth:"full"}),time:cd({formats:r4e,defaultWidth:"full"}),dateTime:cd({formats:n4e,defaultWidth:"full"})},i4e={lastWeek:"eeee 'dernier à' p",yesterday:"'hier à' p",today:"'aujourd’hui à' p",tomorrow:"'demain à' p'",nextWeek:"eeee 'prochain à' p",other:"P"},a4e=(e,t,r,n)=>i4e[e],o4e={narrow:["av. J.-C","ap. J.-C"],abbreviated:["av. J.-C","ap. J.-C"],wide:["avant Jésus-Christ","après Jésus-Christ"]},l4e={narrow:["T1","T2","T3","T4"],abbreviated:["1er trim.","2ème trim.","3ème trim.","4ème trim."],wide:["1er trimestre","2ème trimestre","3ème trimestre","4ème trimestre"]},c4e={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],wide:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"]},u4e={narrow:["D","L","M","M","J","V","S"],short:["di","lu","ma","me","je","ve","sa"],abbreviated:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],wide:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},d4e={narrow:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"mat.",afternoon:"ap.m.",evening:"soir",night:"mat."},abbreviated:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"matin",afternoon:"après-midi",evening:"soir",night:"matin"},wide:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"du matin",afternoon:"de l’après-midi",evening:"du soir",night:"du matin"}},x4e=(e,t)=>{const r=Number(e),n=t==null?void 0:t.unit;if(r===0)return"0";const i=["year","week","hour","minute","second"];let a;return r===1?a=n&&i.includes(n)?"ère":"er":a="ème",r+a},f4e=["MMM","MMMM"],h4e={preprocessor:(e,t)=>e.getDate()===1||!t.some(n=>n.isToken&&f4e.includes(n.value))?t:t.map(n=>n.isToken&&n.value==="do"?{isToken:!0,value:"d"}:n),ordinalNumber:x4e,era:ga({values:o4e,defaultWidth:"wide"}),quarter:ga({values:l4e,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ga({values:c4e,defaultWidth:"wide"}),day:ga({values:u4e,defaultWidth:"wide"}),dayPeriod:ga({values:d4e,defaultWidth:"wide"})},m4e=/^(\d+)(ième|ère|ème|er|e)?/i,p4e=/\d+/i,g4e={narrow:/^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,abbreviated:/^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,wide:/^(avant Jésus-Christ|après Jésus-Christ)/i},y4e={any:[/^av/i,/^ap/i]},v4e={narrow:/^T?[1234]/i,abbreviated:/^[1234](er|ème|e)? trim\.?/i,wide:/^[1234](er|ème|e)? trimestre/i},b4e={any:[/1/i,/2/i,/3/i,/4/i]},C4e={narrow:/^[jfmasond]/i,abbreviated:/^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,wide:/^(janv
282ier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i},w4e={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,/^av/i,/^ma/i,/^juin/i,/^juil/i,/^ao/i,/^s/i,/^o/i,/^n/i,/^d/i]},E4e={narrow:/^[lmjvsd]/i,short:/^(di|lu|ma|me|je|ve|sa)/i,abbreviated:/^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,wide:/^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i},j4e={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^di/i,/^lu/i,/^ma/i,/^me/i,/^je/i,/^ve/i,/^sa/i]},N4e={narrow:/^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,any:/^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i},A4e={any:{am:/^a/i,pm:/^p/i,midnight:/^min/i,noon:/^mid/i,morning:/mat/i,afternoon:/ap/i,evening:/soir/i,night:/nuit/i}},k4e={ordinalNumber:HW({matchPattern:m4e,parsePattern:p4e,valueCallback:e=>parseInt(e)}),era:ya({matchPatterns:g4e,defaultMatchWidth:"wide",parsePatterns:y4e,defaultParseWidth:"any"}),quarter:ya({matchPatterns:v4e,defaultMatchWidth:"wide",parsePatterns:b4e,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ya({matchPatterns:C4e,defaultMatchWidth:"wide",parsePatterns:w4e,defaultParseWidth:"any"}),day:ya({matchPatterns:E4e,defaultMatchWidth:"wide",parsePatterns:j4e,defaultParseWidth:"any"}),dayPeriod:ya({matchPatterns:N4e,defaultMatchWidth:"any",parsePatterns:A4e,defaultParseWidth:"any"})},ud={code:"fr",formatDistance:e4e,formatLong:s4e,formatRelative:a4e,localize:h4e,match:k4e,options:{weekStartsOn:1,firstWeekContainsDate:4}},QW=(e,t)=>{const r=e.isInitiator!==void 0?e.isInitiator:e.initiatorId===t;return e.acceptanceStatus==="pending"&&!r},Rp=(e,t)=>{var n;return e.messagingStatus!==void 0?e.messagingStatus.canSend:e.acceptanceStatus==="reported"||e.acceptanceStatus==="blocked"?!1:e.acceptanceStatus==="accepted"?!0:(((n=e.messageCounts)==null?void 0:n[t])||0)<3},xh=(e,t)=>{var n,i;if(((n=e.messagingStatus)==null?void 0:n.messagesRemaining)!==void 0)return e.messagingStatus.messagesRemaining;if(e.acceptanceStatus!=="pending")return 1/0;const r=((i=e.messageCounts)==null?void 0:i[t])||0;return Math.max(0,3-r)},sj=(e,t)=>e.isInitiator!==void 0?e.isInitiator:e.initiatorId===t,z1=(e,t)=>{var r;return((r=e.messagingStatus)==null?void 0:r.reason)==="pending_limit_reached"?!0:e.acceptanceStatus==="pending"&&sj(e,t)&&xh(e,t)===0},S4e=({onConversationClick:e})=>{const t=lt(),{user:r}=Gt(),n=(r==null?void 0:r.role)==="admin",{onNewMessage:i,onMessagesRead:a,onUserOnline:o,onUserOffline:l,onlineUsers:c,isConnected:u}=rj(),[f,x]=C.useState([]),[m,p]=C.useState([]),[y,v]=C.useState(!0),[b,E]=C.useState(""),[N,j]=C.useState(1),[A,w]=C.useState(!0),[S,B]=C.useState(!1),[D,P]=C.useState(!1),[O,M]=C.useState(new Set),I=C.useRef(null),V=500,[W,_]=C.useState(!1),[z,R]=C.useState(""),[q,G]=C.useState([]),[K,$]=C.useState(!1),[H,te]=C.useState(!1),[ne,Y]=C.useState(!1),[J,oe]=C.useState(null),[he,Q]=C.useState(!1),[ue,de]=C.useState(!1),[me,Le]=C.useState([]),[Ne,ye]=C.useState(0),[ee,Ae]=C.useState(!1),De=C.useRef(null),we=C.useCallback(async(Ce=1,pe=!1)=>{var Pe,Rt,Pt,Jt;try{console.log("ConversationList - Starting fetch, page:",Ce),Ce===1?v(!0):B(!0);const at=await X.getConversations(Ce,20);if(console.log("ConversationList - API response:",at),console.log("ConversationList - Response structure:",{hasBody:!!at.body,success:(Pe=at.body)==null?void 0:Pe.success,hasData:!!((Rt=at.body)!=null&&Rt.data),dataType:typeof((Pt=at.body)==null?void 0:Pt.data),dataIsArray:Array.isArray((Jt=at.body)==null?void 0:Jt.data)}),at.body.success&&at.body.data){const Qt=at.body.data,ht=Qt.map(ir=>({...ir,participants:ir.participants.map(Tr=>({...Tr,isOnline:u&&c.has(Tr._id)}))}));x(pe?ir=>[...ir,...ht]:ht),at.body.pagination?w(at.body.pagination.currentPage<at.body.pagination.totalPages):w(Qt.length>=20)}else console.warn("No conversations data in response:",at),pe||x([])}catch(at){console.error("ConversationList - Error fetching conversations:",at),console.error("ConversationList - Error details:",{message:at instanceof Error?at.message:"Unknown error",stack:at instanceof Error?at.stack:void 0}),pe||x([])}finally{console.log("ConversationList - Fetch completed, setting loading to false"),v(!1),B(!1)}},[c]);C.useEffect(()=>{we(1,!1)},[we]),C.useEffect(()=>{if(b.trim()==="")p(f);else{const Ce=b.toLowerCase(),pe=f.filter(Pe=>{var Jt;const Rt=Pe.participants.map(at=>at.name.toLowerCase()).join(" "),Pt=((Jt=Pe.lastMessage)==null?void 0:Jt.content.toLowerCase())||"";return Rt.includes(Ce)||Pt.includes(Ce)});p(pe)}},[b,f]),C.useEffect(()=>{const Ce=i(Pt=>{x(Jt=>{const at=[...Jt],Qt=at.findIndex(ht=>ht._id===Pt.conversationId);if(Qt!==-1){const ht=at[Qt];at[Qt]={...ht,lastMessage:{content:Pt.content,senderId:Pt.senderId,createdAt:Pt.createdAt},lastMessageAt:Pt.createdAt,unreadCount:ht.unreadCount+1};const[ir]=at.splice(Qt,1);at.unshift(ir)}return at})}),pe=a(Pt=>{Pt.readBy&&(r!=null&&r._id)&&Pt.readBy!==r._id||x(Jt=>Jt.map(at=>at._id===Pt.conversationId?{...at,unreadCount:0}:at))}),Pe=o(Pt=>{x(Jt=>Jt.map(at=>({...at,participants:at.participants.map(Qt=>Qt._id===Pt.userId?{...Qt,isOnline:!0}:Qt)})))}),Rt=l(Pt=>{x(Jt=>Jt.map(at=>({...at,participants:at.participants.map(Qt=>Qt._id===Pt.userId?{...Qt,isOnline:!1}:Qt)})))});return()=>{Ce(),pe(),Pe(),Rt()}},[i,a,o,l,r==null?void 0:r._id]);const je=C.useCallback(()=>{const Ce=De.current;if(!Ce||!A||S)return;const{scrollTop:pe,scrollHeight:Pe,clientHeight:Rt}=Ce;if(Pe-pe-Rt<100){const Jt=N+1;j(Jt),we(Jt,!0)}},[A,S,N,we]);C.useEffect(()=>{const Ce=De.current;if(Ce)return Ce.addEventListener("scroll",je),()=>Ce.removeEventListener("scroll",je)},[je]),C.useEffect(()=>{D&&O.size===0&&P(!1)},[O.size,D]);const Te=Ce=>{I.current=setTimeout(()=>{P(!0),M(new Set([Ce]))},V)},Se=()=>{I.current&&(clearTimeout(I.current),I.current=null)},He=Ce=>{M(pe=>{const Pe=new Set(pe);return Pe.has(Ce)?Pe.delete(Ce):Pe.add(Ce),Pe})},Ue=()=>{P(!1),M(new Set)},rt=()=>{M(new Set(m.map(Ce=>Ce._id)))},wt=()=>{M(new Set)},Ft=()=>{O.size>0&&te(!0)},xt=async()=>{try{const Ce=Array.from(O);x(pe=>pe.filter(Pe=>!O.has(Pe._id))),Ce.length===1?await X.archiveConversation(Ce[0]):await X.bulkArchiveConversations(Ce),Ue(),te(!1)}catch(Ce){console.error("Failed to archive conversations:",Ce),we(1,!1)}},Kt=async()=>{var Ce;try{Ae(!0);const pe=await X.getArchivedConversations(1,50);if(pe.body.success&&pe.body.data){const Pe=pe.body.data;Le(Pe.conversations||[]),ye(((Ce=Pe.pagination)==null?void 0:Ce.total)||0)}}catch(pe){console.error("Failed to fetch archived conversations:",pe)}finally{Ae(!1)}},ft=async Ce=>
282{try{await X.unarchiveConversation(Ce),Le(pe=>pe.filter(Pe=>Pe._id!==Ce)),ye(pe=>Math.max(0,pe-1)),we(1,!1)}catch(pe){console.error("Failed to unarchive conversation:",pe)}},Gr=()=>{de(!0),Kt()},Nn=C.useCallback(async Ce=>{if(Ce.trim().length<2){G([]);return}try{$(!0);const pe=await X.searchUsers({search:Ce,status:"active",page:1,limit:20});if(pe.body.success&&pe.body.data){const Pe=pe.body.data.map(Rt=>({...Rt,isOnline:u&&c.has(Rt._id)}));G(Pe)}}catch(pe){console.error("Failed to search users:",pe)}finally{$(!1)}},[u,c]);C.useEffect(()=>{const Ce=setTimeout(()=>{Nn(z)},300);return()=>clearTimeout(Ce)},[z,Nn]);const vs=async Ce=>{try{const pe=await X.getOrCreateConversation(Ce._id);if(pe.body.success&&pe.body.data){_(!1),R("");const Pe=pe.body.data;e?e(Pe):t(`/chat/${Pe._id}`)}}catch(pe){console.error("Failed to create conversation:",pe)}},bs=Ce=>{try{return dL(new Date(Ce),{addSuffix:!0,locale:ud})}catch{return""}},Kr=Ce=>{const pe=Ce.participants.filter(Pe=>Pe._id!==(r==null?void 0:r._id));return pe.length===0?Ce.participants.map(Pe=>Pe.name).join(", "):pe.map(Pe=>Pe.name).join(", ")},fn=Ce=>{const pe=Ce.participants.find(Pe=>Pe._id!==(r==null?void 0:r._id));return pe==null?void 0:pe.avatar},Rn=Ce=>{if(!Ce)return"?";const pe=Ce.trim().split(" ");return pe.length>=2?(pe[0][0]+pe[pe.length-1][0]).toUpperCase():Ce[0].toUpperCase()},hn=Ce=>{const pe=["bg-blue-500","bg-green-500","bg-orange-500","bg-purple-500","bg-pink-500","bg-indigo-500","bg-teal-500","bg-red-500"],Pe=Ce.split("").reduce((Rt,Pt)=>Rt+Pt.charCodeAt(0),0);return pe[Pe%pe.length]},_n=Ce=>Ce.participants.some(pe=>pe._id!==(r==null?void 0:r._id)&&pe.isOnline),fr=Ce=>{K8e(),D?He(Ce._id):(Ce.unreadCount>0&&x(pe=>pe.map(Pe=>Pe._id===Ce._id?{...Pe,unreadCount:0}:Pe)),e?e(Ce):t(`/chat/${Ce._id}`))},Bt=async(Ce,pe)=>{if(Ce.stopPropagation(),!r)return;const Pe=pe.participants.find(Rt=>Rt._id!==r._id);if(Pe){Y(!0),Q(!0);try{const Rt=await X.getUserProfileById(Pe._id);Rt.body.success&&Rt.body.data&&oe(Rt.body.data)}catch(Rt){console.error("Failed to fetch user profile:",Rt)}finally{Q(!1)}}};return y&&f.length===0?s.jsxs(Z.div,{variants:On,initial:"hidden",animate:"show",className:"flex flex-col h-full bg-white",children:[s.jsx("div",{className:"p-4 border-b border-border",children:s.jsx($e,{height:"h-10",rounded:"rounded-lg"})}),s.jsx("div",{className:"flex-1 overflow-y-auto",children:[1,2,3,4,5,6,7,8].map(Ce=>s.jsxs("div",{className:"flex items-center gap-3 p-4 border-b border-border",children:[s.jsx($e,{width:"w-12",height:"h-12",rounded:"rounded-full"}),s.jsxs("div",{className:"flex-1",children:[s.jsx($e,{width:"w-32",height:"h-4",className:"mb-2"}),s.jsx($e,{width:"w-48",height:"h-3"})]}),s.jsx($e,{width:"w-12",height:"h-3"})]},Ce))})]}):s.jsxs(s.Fragment,{children:[s.jsxs(Z.div,{variants:On,initial:"hidden",animate:"show",className:"flex flex-col h-full bg-white",children:[s.jsx("div",{className:"p-4 border-b border-border",children:D?s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("button",{onClick:Ue,className:"p-2 hover:bg-gray-100 rounded-full transition-colors",children:s.jsx(L,{icon:gt,className:"w-5 h-5 text-gray-700"})}),s.jsxs("span",{className:"font-medium text-gray-900",children:[O.size," sélectionné",O.size>1?"s":""]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[O.size===m.length?s.jsx("button",{onClick:wt,className:"px-3 py-1.5 text-sm font-medium text-blue-600 hover:bg-blue-50 rounded-lg transition-colors",children:"Tout désélectionner"}):s.jsx("button",{onClick:rt,className:"px-3 py-1.5 text-sm font-medium text-blue-600 hover:bg-blue-50 rounded-lg transition-colors",children:"Tout sélectionner"}),s.jsx("button",{onClick:Ft,disabled:O.size===0,className:"p-2 text-orange-600 hover:bg-orange-50 rounded-full transition-colors disabled:opacity-50 disabled:cursor-not-allowed",title:"Archiver",children:s.jsx(L,{icon:Yb,className:"w-5 h-5"})})]})]}):s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Messages"}),s.jsx("button",{onClick:()=>_(!0),className:"p-2 bg-blue-600 hover:bg-blue-700 text-white rounded-full transition-colors",children:s.jsx(L,{icon:kl,className:"w-5 h-5"})})]}),s.jsxs("div",{className:"relative",children:[s.jsx(L,{icon:vo,className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-400"}),s.jsx("input",{type:"text",placeholder:"Rechercher des conversations...",value:b,onChange:Ce=>E(Ce.target.value),className:"w-full pl-10 pr-4 py-2 bg-gray-100 border-none rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"}),b&&s.jsx("button",{onClick:()=>E(""),className:"absolute right-3 top-1/2 -translate-y-1/2 p-1 hover:bg-gray-200 rounded-full transition-colors",children:s.jsx(L,{icon:gt,className:"w-4 h-4 text-gray-500"})})]})]})}),s.jsx(Z.div,{ref:De,variants:Dl,initial:"hidden",animate:"show",className:"flex-1 overflow-y-auto",children:m.length===0?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8 text-center",children:[s.jsx("div",{className:"w-24 h-24 bg-gray-100 rounded-full flex items-center justify-center mb-4",children:s.jsx("svg",{className:"w-12 h-12 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.25
2825-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})})}),s.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-2",children:b?"Aucun résultat":"Aucune conversation"}),s.jsx("p",{className:"text-gray-500 mb-6 max-w-sm",children:b?"Aucune conversation ne correspond à votre recherche.":"Commencez une nouvelle conversation en cliquant sur le bouton +"}),!b&&s.jsx("button",{onClick:()=>_(!0),className:"px-6 py-2.5 bg-blue-600 hover:bg-blue-700 text-white font-medium rounded-lg transition-colors",children:"Nouvelle conversation"})]}):s.jsxs(s.Fragment,{children:[!b&&s.jsx(Z.button,{variants:qn,onClick:Gr,className:"w-full p-4 border-b border-border hover:bg-gray-50 transition-colors text-left",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-12 h-12 rounded-full bg-orange-100 flex items-center justify-center",children:s.jsx(L,{icon:Yb,className:"w-6 h-6 text-orange-600"})}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-gray-900",children:"Conversations archivées"}),s.jsx("p",{className:"text-sm text-gray-500",children:Ne>0?`${Ne} conversation${Ne>1?"s":""}`:"Aucune conversation archivée"})]})]}),s.jsx("svg",{className:"w-5 h-5 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})}),m.map(Ce=>{var pe;return s.jsxs(Z.div,{variants:qn,onClick:()=>fr(Ce),onMouseDown:()=>!D&&Te(Ce._id),onMouseUp:Se,onMouseLeave:Se,onTouchStart:()=>!D&&Te(Ce._id),onTouchEnd:Se,className:`flex items-center gap-3 p-4 border-b border-border hover:bg-gray-50 cursor-pointer transition-colors ${Ce.unreadCount>0?"bg-blue-50":""}`,children:[D&&s.jsx("div",{className:`w-5 h-5 rounded-full border-2 flex items-center justify-center transition-colors ${O.has(Ce._id)?"bg-blue-600 border-primary":"border-border"}`,children:O.has(Ce._id)&&s.jsx(L,{icon:Ur,className:"w-3.5 h-3.5 text-white"})}),s.jsxs("button",{onClick:Pe=>Bt(Pe,Ce),className:"relative flex-shrink-0 hover:opacity-80 transition-opacity",children:[fn(Ce)?s.jsx("img",{src:X.generateThumbnailUrl(fn(Ce),96)||rn,alt:Kr(Ce),className:"w-12 h-12 rounded-full object-cover"}):s.jsx("div",{className:`w-12 h-12 rounded-full flex items-center justify-center text-white font-bold text-lg ${hn(Kr(Ce))}`,children:Rn(Kr(Ce))}),_n(Ce)&&s.jsx("div",{className:"absolute bottom-0 right-0 w-3.5 h-3.5 bg-green-500 rounded-full border-2 border-white"})]}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-baseline justify-between mb-1",children:[s.jsx("h3",{className:`font-medium truncate ${Ce.unreadCount>0?"text-gray-900":"text-gray-800"}`,children:Kr(Ce)}),Ce.lastMessageAt&&s.jsx("span",{className:"text-xs text-gray-500 ml-2 flex-shrink-0",children:bs(Ce.lastMessageAt)})]}),s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsx("p",{className:`text-sm truncate ${Ce.unreadCount>0?"font-medium text-gray-900":"text-gray-600"}`,children:((pe=Ce.lastMessage)==null?void 0:pe.content)||(Ce.lastMessageAt?"Message privé":"Aucun message")}),s.jsxs("div",{className:"flex items-center gap-1.5 flex-shrink-0",children:[r&&!n&&QW(Ce,r._id)&&s.jsx("span",{className:"px-2 py-0.5 bg-yellow-100 text-yellow-800 text-xs font-medium rounded-full",children:"À accepter"}),r&&!n&&sj(Ce,r._id)&&Ce.acceptanceStatus==="pending"&&s.jsx("span",{className:`px-2 py-0.5 text-xs font-medium rounded-full ${z1(Ce,r._id)?"bg-orange-100 text-orange-800":"bg-blue-100 text-blue-800"}`,children:z1(Ce,r._id)?"En attente":`${xh(Ce,r._id)} msg restant${xh(Ce,r._id)>1?"s":""}`}),Ce.acceptanceStatus==="reported"&&s.jsx("span",{className:"px-2 py-0.5 bg-red-100 text-red-800 text-xs font-medium rounded-full",children:"Signalée"}),Ce.acceptanceStatus==="blocked"&&s.jsx("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-800 text-xs font-medium rounded-full",children:"Bloquée"}),Ce.unreadCount>0&&s.jsx("span",{className:"px-2 py-0.5 bg-blue-600 text-white text-xs font-bold rounded-full min-w-[20px] text-center",children:Ce.unreadCount>99?"99+":Ce.unreadCount})]})]})]})]},Ce._id)}),S&&s.jsx("div",{className:"p-4 text-center",children:s.jsx("div",{className:"inline-block w-6 h-6 border-2 border-primary border-t-transparent roun
282ded-full animate-spin"})})]})})]}),W&&s.jsx("div",{className:"fixed inset-0 bg-black/30 backdrop-blur-sm flex items-center justify-center z-50 p-4",children:s.jsxs("div",{className:"bg-white rounded-lg w-full max-w-md max-h-[80vh] flex flex-col border border-border",children:[s.jsxs("div",{className:"p-4 border-b border-border",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:"Nouvelle conversation"}),s.jsx("button",{onClick:()=>{_(!1),R("")},className:"p-1 hover:bg-gray-100 rounded-full transition-colors",children:s.jsx(L,{icon:gt,className:"w-5 h-5 text-gray-500"})})]}),s.jsxs("div",{className:"relative",children:[s.jsx(L,{icon:vo,className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-400"}),s.jsx("input",{type:"text",placeholder:"Rechercher un utilisateur...",value:z,onChange:Ce=>R(Ce.target.value),autoFocus:!0,className:"w-full pl-10 pr-4 py-2 bg-gray-100 border-none rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]}),s.jsx("div",{className:"flex-1 overflow-y-auto",children:K?s.jsx("div",{className:"p-4 space-y-3",children:[1,2,3].map(Ce=>s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx($e,{width:"w-10",height:"h-10",rounded:"rounded-full"}),s.jsxs("div",{className:"flex-1",children:[s.jsx($e,{width:"w-32",height:"h-4",className:"mb-1"}),s.jsx($e,{width:"w-48",height:"h-3"})]})]},Ce))}):q.length===0?s.jsx("div",{className:"p-8 text-center text-gray-500",children:z.trim().length<2?"Entrez au moins 2 caractères pour rechercher":"Aucun utilisateur trouvé"}):s.jsx("div",{children:q.map(Ce=>s.jsxs("button",{onClick:()=>vs(Ce),className:"w-full flex items-center gap-3 p-4 hover:bg-gray-50 transition-colors text-left",children:[s.jsxs("div",{className:"relative",children:[Ce.avatar?s.jsx("img",{src:X.generateThumbnailUrl(Ce.avatar,96),alt:Ce.name||"",className:"w-10 h-10 rounded-full object-cover"}):s.jsx("div",{className:`w-10 h-10 rounded-full flex items-center justify-center text-white font-bold text-sm ${hn(Ce.name||"")}`,children:Rn(Ce.name||"")}),Ce.isOnline&&s.jsx("div",{className:"absolute bottom-0 right-0 w-3 h-3 bg-green-500 rounded-full border-2 border-white"})]}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"font-medium text-gray-900 truncate",children:Ce.name||""}),s.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-500",children:[Ce.phoneNumber&&s.jsx("span",{className:"truncate",children:Ce.phoneNumber}),Ce.phoneNumber&&Ce.email&&s.jsx("span",{children:"•"}),Ce.email&&s.jsx("span",{className:"truncate",children:Ce.email})]})]})]},Ce._id))})})]})}),H&&s.jsx("div",{className:"fixed inset-0 bg-black/30 backdrop-blur-sm flex items-center justify-center z-50 p-4",children:s.jsxs("div",{className:"bg-white rounded-lg w-full max-w-sm p-6 border border-border",children:[s.jsxs("h3",{className:"text-lg font-semibold text-gray-900 mb-2",children:["Archiver ",O.size>1?"les conversations":"la conversation"," ?"]}),s.jsx("p",{className:"text-gray-600 mb-6",children:O.size>1?`Ces ${O.size} conversations seront masquées de votre liste. Vous pouvez les restaurer en envoyant un nouveau message.`:"Cette conversation sera masquée de votre liste. Vous pouvez la restaurer en envoyant un nouveau message."}),s.jsxs("div",{className:"flex gap-3",children:[s.jsx("button",{onClick:()=>te(!1),className:"flex-1 px-4 py-2 bg-gray-100 hover:bg-gray-200 text-gray-800 font-medium rounded-lg transition-colors",children:"Annuler"}),s.jsx("button",{onClick:xt,className:"flex-1 px-4 py-2 bg-orange-600 hover:bg-orange-700 text-white font-medium rounded-lg transition-colors",children:"Archiver"})]})]})}),ne&&s.jsx("div",{className:"fixed inset-0 bg-black/30 backdrop-blur-sm z-50 flex items-center justify-center p-4",children:s.jsxs("div",{className:"bg-white rounded-2xl max-w-md w-full max-h-[90vh] overflow-y-auto",children:[s.jsxs("div",{className:"sticky top-0 bg-white border-b border-border p-4 flex items-center justify-between",children:[s.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Informations du profil"}),s.jsx("button",{onClick:()=>Y(!1),className:"p-2 hover:bg-gray-100 rounded-full transition-colors",children:s.jsx(L,{icon:gt,className:"w-5 h-5 text-gray-700"})})]}),s.jsx("div",{className:"p-6",children:he?s.jsxs("div",{className:"flex flex-col items-center gap-4",children:[s.jsx($e,{width:"w-24",height:"h-24",rounded:"rounded-full"}),s.jsxs("div",{className:"w-full space-y-3",children:[s.jsx($e,{width:"w-full",height:"h-5"}),s.jsx($e,{width:"w-3/4",height:"h-5"}),s.jsx($e,{width:"w-full",height:"h-5"}),s.jsx($e,{width:"w-2/3",height:"h-5"})]})]}):J?s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex flex-col items-center",children:[J.avatar?s.jsx("img",{src:X.generateThumbnailUrl(J.avatar,256),alt:J.name||`${J.firstName} ${J.lastName}`,className:"w-24 h-24 rounded-full object-cover mb-3"}):s.jsx("div",{className:`w-24 h-24 rounded-full flex items-center justify-center text-white font-bold text-2xl mb-3 ${hn(J.name||`${J.firstName} ${J.lastName}`)}`,children:Rn(J.name||`${J.firstName} ${J.lastName}`)}),s.jsx("h4",{className:"text-xl font-bold text-gray-900 text-center",children:J.name||`${J.firstName} ${J.lastName}`}),c.has(J._id)&&s.jsx("span",{className:"text-sm text-green-600 font-medium mt
282-1",children:"En ligne"})]}),s.jsxs("div",{className:"space-y-3",children:[J.email&&s.jsx("div",{className:"bg-gray-50 rounded-lg p-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("svg",{className:"w-5 h-5 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-xs text-gray-500 font-medium",children:"Email"}),s.jsx("p",{className:"text-sm text-gray-900",children:J.email})]})]})}),J.phoneNumber&&s.jsx("div",{className:"bg-gray-50 rounded-lg p-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("svg",{className:"w-5 h-5 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-xs text-gray-500 font-medium",children:"Téléphone"}),s.jsx("p",{className:"text-sm text-gray-900",children:J.phoneNumber})]})]})}),J.createdAt&&s.jsx("div",{className:"bg-gray-50 rounded-lg p-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("svg",{className:"w-5 h-5 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-xs text-gray-500 font-medium",children:"Membre depuis"}),s.jsx("p",{className:"text-sm text-gray-900",children:xg(af(J.createdAt),"dd MMMM yyyy",{locale:ud})})]})]})}),J.subscriptionType&&s.jsx("div",{className:"bg-primary-soft rounded-lg p-4 border border-border",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("svg",{className:"w-5 h-5 text-blue-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-xs text-blue-600 font-medium",children:"Type d'abonnement"}),s.jsx("p",{className:"text-sm text-gray-900 font-semibold capitalize",children:J.subscriptionType})]})]})}),J.language&&s.jsx("div",{className:"bg-gray-50 rounded-lg p-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("svg",{className:"w-5 h-5 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 5h12M9 3v2m1.048 9.5A18.022 18.022 0 016.412 9m6.088 9h7M11 21l5-10 5 10M12.751 5C11.783 10.77 8.07 15.61 3 18.129"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-xs text-gray-500 font-medium",children:"Langue"}),s.jsx("p",{className:"text-sm text-gray-900 capitalize",children:J.language})]})]})})]})]}):s.jsx("div",{className:"text-center py-8",children:s.jsx("p",{className:"text-gray-500",children:"Impossible de charger les informations du profil"})})})]})}),ue&&s.jsx("div",{className:"fixed inset-0 bg-black/30 backdrop-blur-sm z-50 flex items-center justify-center p-4",children:s.jsxs("div",{className:"bg-white rounded-lg w-full max-w-2xl max-h-[80vh] flex flex-col border border-border",children:[s.jsxs("div",{className:"p-4 border-b border-border flex items-center justify-between",children:[s.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:"Conversations archivées"}),s.jsx("button",{onClick:()=>de(!1),className:"p-2 hover:bg-gray-100 rounded-full transition-colors",children:s.jsx(L,{icon:gt,className:"w-5 h-5 text-gray-500"})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto",children:ee?s.jsx("div",{className:"flex items-center justify-center py-12",children:s.jsx("div",{className:"w-8 h-8 border-2 border-primary border-t-transparent roun
282ded-full animate-spin"})}):me.length===0?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 px-4",children:[s.jsx("div",{className:"w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center mb-4",children:s.jsx(L,{icon:Yb,className:"w-8 h-8 text-gray-400"})}),s.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-2",children:"Aucune conversation archivée"}),s.jsx("p",{className:"text-gray-500 text-center",children:"Les conversations archivées apparaîtront ici"})]}):s.jsx("div",{className:"divide-y divide-gray-100",children:me.map(Ce=>{const pe=Ce.participants.find(Pe=>Pe._id!==(r==null?void 0:r._id));return pe?s.jsx("div",{className:"p-4 hover:bg-gray-50 transition-colors",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"relative flex-shrink-0",children:pe.avatar?s.jsx("img",{src:X.generateThumbnailUrl(pe.avatar,96),alt:pe.name,className:"w-12 h-12 rounded-full object-cover"}):s.jsx("div",{className:`w-12 h-12 rounded-full flex items-center justify-center text-white font-bold ${hn(pe.name)}`,children:Rn(pe.name)})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center justify-between mb-1",children:[s.jsx("p",{className:"font-semibold text-gray-900 truncate",children:pe.name}),Ce.lastMessageAt&&s.jsx("span",{className:"text-xs text-gray-500 flex-shrink-0 ml-2",children:dL(af(Ce.lastMessageAt),{addSuffix:!0,locale:ud})})]}),Ce.lastMessage&&s.jsx("p",{className:"text-sm text-gray-500 truncate",children:Ce.lastMessage.content})]}),s.jsx("button",{onClick:()=>ft(Ce._id),className:"flex-shrink-0 px-3 py-1.5 bg-orange-600 hover:bg-orange-700 text-white text-sm font-medium rounded-lg transition-colors",title:"Désarchiver",children:"Restaurer"})]})},Ce._id):null})})})]})})]})},B4e=({conversationId:e,onBack:t})=>{var vr;const{user:r}=Gt(),n=(r==null?void 0:r.role)==="admin",{joinConversation:i,leaveConversation:a,startTyping:o,stopTyping:l,markAsRead:c,onNewMessage:u,onMessageSent:f,onMessageStatus:x,onMessageDeleted:m,onTyping:p,onStoppedTyping:y,onConversationAccepted:v,onConversationReported:b}=rj(),[E,N]=C.useState([]),[j,A]=C.useState(null),[w,S]=C.useState(!0),[B,D]=C.useState(!1),[P,O]=C.useState(1),[M,I]=C.useState(!0),[V,W]=C.useState(""),[_,z]=C.useState(!1),[R,q]=C.useState(new Set),[G,K]=C.useState(!1),[$,H]=C.useState(new Set),te=C.useRef(null),ne=500,[Y,J]=C.useState(!1),oe=C.useRef(null),[he,Q]=C.useState(null),[ue,de]=C.useState(null),[me,Le]=C.useState(0),[Ne,ye]=C.useState(null),ee=C.useRef(0),Ae=C.useRef(0),De=C.useRef(!1),we=C.useRef(!1),je=80,Te=C.useRef(new Map),[Se,He]=C.useState(!1),[Ue,rt]=C.useState(null),[wt,Ft]=C.useState(new Map),[xt,Kt]=C.useState(0),ft=C.useRef(null),[Gr,Nn]=C.useState({messageIds:[],isOpen:!1}),[vs,bs]=C.useState([]),[Kr,fn]=C.useState(new Set),[Rn,hn]=C.useState(!1),[_n,fr]=C.useState(!1),[Bt,Ce]=C.useState(null),[pe,Pe]=C.useState(!1),Rt=C.useRef(null),Pt=C.useRef(null),Jt=C.useRef(null),at=C.useRef(!0),[Qt,ht]=C.useState([]),ir=C.useCallback(async()=>{try{const ae=await X.getConversation(e);ae.body.success&&ae.body.data&&A(ae.body.data)}catch(ae){console.error("Failed to fetch conversation:",ae)}},[e]),Tr=C.useCallback(async(ae=1,ve=!1)=>{try{ae===1?S(!0):D(!0);const Ie=await X.getMessages(e,ae,50);if(Ie.body.success&&Ie.body.data){const ut=Ie.body.data;if(N(ve?Mt=>[...ut,...Mt]:ut),Ie.body.pagination?I(Ie.body.pagination.currentPage<Ie.body.pagination.totalPages):I(ut.length>=50),ae===1&&ut.length>0){const Mt=ut.filter(Vt=>Vt.senderId!==(r==null?void 0:r._id)&&!Vt.readBy.includes((r==null?void 0:r._id)||"")).map(Vt=>Vt._id);Mt.length>0&&c(e,Mt)}}}catch(Ie){console.error("Failed to fetch messages:",Ie)}finally{S(!1),D(!1)}},[e,r,c]);C.useEffect(()=>(ir(),Tr(1,!1),i(e),X.markConversationAsRead(e),()=>{X.markConversationAsRead(e),a(e)}),[e,ir,Tr,i,a]),C.useEffect(()=>{const ae=u(Ut=>{Ut.conversationId===e&&(N(Sr=>Sr.some(Nr=>Nr._id===Ut._id)?Sr:[...Sr,Ut]),Ut.senderId===(r==null?void 0:r._id)&&ht(Sr=>Sr.filter(Nr=>Nr.content!==Ut.content)),at.current=!0,Ut.senderId!==(r==null?void 0:r._id)&&(G8e(),R1("light"),c(e,[Ut._id])))}),ve=f(Ut=>{Ut.conversationId===e&&(N(Sr=>Sr.some(Nr=>Nr._id===Ut._id)?Sr:[...Sr,Ut]),ht([]))}),Ie=x(Ut=>{N(Sr=>Sr.map(Nr=>Nr._id===Ut.messageId?{...Nr,status:Ut.status,readBy:Ut.readBy}:Nr))}),ut=m(Ut=>{Ut.conversationId===e&&N(Sr=>Sr.filter(Nr=>Nr._id!==Ut.messageId))}),Mt=p(Ut=>{Ut.conversationId===e&&Ut.userId!==(r==null?void 0:r._id)&&q(Sr=>new Set(Sr).add(Ut.userName))}),Vt=y(Ut=>{Ut.conversationId===e&&q(Sr=>{const Nr=new Set(Sr);return Nr.delete(Ut.userName),Nr})}),jr=v(Ut=>{Ut.conversationId===e&&j&&A({...j,acceptanceStatus:"accepted",acceptedAt:new Date().toISOString()})}),kn=b(Ut=>{Ut.conversationId===e&&j&&A({...j,acceptanceStatus:"reported",reportedAt:new Date().toISOString(),reportedBy:Ut.reportedBy})});return()=>{ae(),ve(),Ie(),ut(),Mt(),Vt(),jr(),kn()}},[e,r,j,u,f,x,m,p,y,v,b,c]),C.useEffect(()=>{var ae;at.current&&((ae=Rt.current)==null||ae.scrollIntoView({behavior:"smooth"}),at.current=!1)},[E,Qt]);const Mr=C.useCallback(()=>{const ae=Pt.current;if(!(!ae||!M||B)&&ae.scrollTop<100){const ve=P+1;O(ve),Tr(ve,!0)}},[M,B,P,Tr]);C.useEffect(()=>{const ae=Pt.current;if(ae)return ae.addEventListener("scroll",Mr),()=>ae.removeEventListener("scroll",Mr)},[Mr]);const wr=ae=>{var Ie;if((Ie=ae.sender)!=null&&Ie.name)return ae.sender.name;const ve=j==null?void 0:j.participants.find(ut=>ut._id===ae.senderId);return ve!=null&&ve.name?ve.name:"Utilisateur"},Si=ae=>{W(ae.target.value),_||(z(!0),o(e)),Jt.current&&clearTimeout(Jt.current),Jt.current=setTimeout(()=>{z(!1),l(e)},3e3)},Js=C.useCallback(async()=>{var ut,Mt;const ae=V.trim();if(!r||!ae&&!Ue)return;if(j&&!n&&!Rp(j,r._id)){alert("Vous ne pouvez pas envoyer plus de messages dans cette conversation.");return}if(_&&(z(!1),l(e)),Ue){const Vt=Ue,jr=ae;rt(null),W(""),Q(null),at.current=!0,await Fo(Vt,jr)?j&&A({...j,messageCounts:{...j.messageCounts,[r._id]:(((ut=j.messageCounts)==null?void 0:ut[r._id])||0)+1}}):(rt(Vt),W(jr));return}const ve=`optimistic-${Date.now()}-${Math.random()}`,Ie={_id:ve,conversationId:e,senderId:r._id,sender:{_id:r._id,name:`${r.firstName} ${r.lastName}`,avatar:r.avatar},type:"text",content:ae,status:"sent",readBy:[],createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),replyTo:he?{messageId:he._id,content:he.content,senderId:he.senderId,senderName:wr(he),type:he.type}:void 0};ht(Vt=>[...Vt,Ie]),R1("light"),H8e(),W(""),Q(null),at.current=!0;try{const Vt=await X.sendMessage(e,ae,he==null?void 0:he._id);if(ht(jr=>jr.filter(kn=>kn._id!==ve)),Vt.body.success&&Vt.body.data){const jr=Vt.body.data;N(kn=>kn.some(Ut=>Ut._id===jr._id)?kn:[...kn,jr])}j&&r&&A({...j,messageCounts:{...j.messageCounts,[r._id]:(((Mt=j.messageCounts)==null?void 0:Mt[r._id])||0)+1}})}catch(Vt){console.error("Failed to send message:",Vt),ht(jr=>jr.filter(kn=>kn._id!==ve)),W(ae)}},[V,Ue,e,r,he,_,l,j]),as=ae=>{var ut;const ve=(ut=ae.target.files)==null?void 0:ut[0];if(!ve)return;if(!["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"].includes(ve.type)){alert("Type de fichier non supporté. Veuillez sélectionner un PDF ou un document Word/Excel."),ft.current&&(ft.current.value="");return}if(ve.size>10*1024*1024){alert("Le fichier est trop volumineux. Taille maximale : 10MB"),ft.current&&(ft.current.value="");return}rt(ve),ft.current&&(ft.current.value="")},Do=()=>{rt(null)},Fo=async(ae,ve)=>{try{He(!0),Kt(0);const Ie=setInterval(()=>{Kt(Mt=>Math.min(Mt+10,90))}
282,200),ut=await X.sendDocument(e,ae,ve||void 0);if(clearInterval(Ie),Kt(100),ut.body.success){if(ut.body.data){const Mt=ut.body.data;N(Vt=>Vt.some(jr=>jr._id===Mt._id)?Vt:[...Vt,Mt])}return at.current=!0,!0}return!1}catch(Ie){return console.error("Failed to upload document:",Ie),alert("Échec de l'envoi du document. Veuillez réessayer."),!1}finally{He(!1),Kt(0)}},Po=ae=>ae==="application/pdf"?"📄":ae.includes("word")||ae.includes("document")?"📝":ae.includes("excel")||ae.includes("sheet")?"📊":"📎",Cs=ae=>ae<1024?`${ae} B`:ae<1024*1024?`${(ae/1024).toFixed(1)} KB`:`${(ae/(1024*1024)).toFixed(1)} MB`,ia=ae=>{G||(te.current=setTimeout(()=>{K(!0),H(new Set([ae]))},ne))},ws=()=>{te.current&&(clearTimeout(te.current),te.current=null)},Bi=ae=>{G?Me(ae._id):Q(ae)},Me=ae=>{H(ve=>{const Ie=new Set(ve);return Ie.has(ae)?Ie.delete(ae):Ie.add(ae),Ie})};C.useEffect(()=>{G&&$.size===0&&K(!1)},[$.size,G]);const Nt=()=>{K(!1),H(new Set)},ct=()=>{if($.size===1){const ae=Array.from($)[0],ve=E.find(Ie=>Ie._id===ae);ve&&(Q(ve),Nt())}},yt=async()=>{if($.size!==0){try{const ae=await X.getConversations(1,100);ae.body.success&&ae.body.data&&bs(ae.body.data.filter(ve=>ve._id!==e))}catch(ae){console.error("Failed to fetch conversations:",ae)}Nn({messageIds:Array.from($),isOpen:!0})}},cr=async()=>{if(Kr.size!==0)try{await X.forwardMessages(Gr.messageIds,Array.from(Kr)),Nn({messageIds:[],isOpen:!1}),fn(new Set),Nt()}catch(ae){console.error("Failed to forward messages:",ae),alert("Échec du transfert des messages. Veuillez réessayer.")}},Lt=async()=>{if(!j||!r)return;const ae=j.participants.find(ve=>ve._id!==r._id);if(ae){fr(!0),Pe(!0);try{const ve=await X.getUserProfileById(ae._id);ve.body.success&&ve.body.data&&Ce(ve.body.data)}catch(ve){console.error("Failed to fetch user profile:",ve)}finally{Pe(!1)}}},At=async()=>{if(!(!j||!r))try{await X.acceptConversation(j._id),A({...j,acceptanceStatus:"accepted",acceptedAt:new Date().toISOString()}),alert("Conversation acceptée")}catch(ae){console.error("Failed to accept conversation:",ae),alert("Échec de l'acceptation de la conversation. Veuillez réessayer.")}},ur=async()=>{if(!(!j||!r)&&confirm("Êtes-vous sûr de vouloir signaler cette conversation ?"))try{await X.reportConversation(j._id),A({...j,acceptanceStatus:"reported",reportedAt:new Date().toISOString(),reportedBy:r._id}),J(!1),alert("Conversation signalée")}catch(ae){console.error("Failed to report conversation:",ae),alert("Échec du signalement de la conversation. Veuillez réessayer.")}},Es=async()=>{if(!(!j||!r)&&confirm("Êtes-vous sûr de vouloir bloquer cette c
282onversation ? Vous ne recevrez plus de messages de cet utilisateur."))try{await X.blockConversation(j._id),A({...j,acceptanceStatus:"blocked"}),J(!1),alert("Conversation bloquée")}catch(ae){console.error("Failed to block conversation:",ae),alert("Échec du blocage. Veuillez réessayer.")}};C.useEffect(()=>{const ae=ve=>{oe.current&&!oe.current.contains(ve.target)&&J(!1)};if(Y)return document.addEventListener("mousedown",ae),()=>document.removeEventListener("mousedown",ae)},[Y]);const js=(ae,ve)=>{if(G)return;const Ie="touches"in ae?ae.touches[0]:ae;ee.current=Ie.clientX,Ae.current=Ie.clientY,De.current=!1,we.current=!1,de(ve)},Tt=ae=>{if(!ue||G)return;const ve="touches"in ae?ae.touches[0]:ae,Ie=ve.clientX-ee.current,ut=ve.clientY-Ae.current;if(Math.abs(ut)>Math.abs(Ie)){De.current||(de(null),Le(0));return}Ie>0&&Ie<150&&(De.current=!0,Le(Ie),Ie>=je&&!we.current&&"vibrate"in navigator&&(navigator.vibrate(10),we.current=!0))},Or=()=>{if(!ue)return;const ae=E.find(ve=>ve._id===ue);me>=je&&ae&&(Q(ae),ye(ae._id),setTimeout(()=>ye(null),800),"vibrate"in navigator&&navigator.vibrate(20)),de(null),Le(0),De.current=!1,we.current=!1},Hn=()=>{const ve=E.filter(Ie=>$.has(Ie._id)).map(Ie=>{var ut;return`${(ut=Ie.sender)==null?void 0:ut.name}: ${Ie.content}`}).join(`
283`);navigator.clipboard.writeText(ve),Nt()},ei=()=>{$.size>0&&hn(!0)},An=async()=>{try{const ae=Array.from($);N(ve=>ve.filter(Ie=>!$.has(Ie._id))),ae.length===1?await X.deleteMessage(ae[0]):await X.bulkDeleteMessages(ae),Nt(),hn(!1)}catch(ae){console.error("Failed to delete messages:",ae),Tr(1,!1)}},$a=ae=>{try{const ve=af(ae);return O6e(ve)?"Aujourd'hui":R6e(ve)?"Hier":xg(ve,"d MMM yyyy",{locale:ud})}catch{return""}},mn=C.useMemo(()=>{const ae=[...E,...Qt],ve={};return ae.forEach(Ie=>{const ut=Ie.createdAt,Mt=$a(ut);ve[Mt]||(ve[Mt]=[]),ve[Mt].push(Ie)}),Object.entries(ve).map(([Ie,ut])=>({date:Ie,messages:ut.sort((Mt,Vt)=>new Date(Mt.createdAt).getTime()-new Date(Vt.createdAt).getTime())}))},[E,Qt]),za=ae=>{try{return xg(af(ae),"HH:mm",{locale:ud})}catch{return""}},Va=ae=>ae.senderId!==(r==null?void 0:r._id)?null:ae._id.startsWith("optimistic-")?s.jsxs("svg",{className:"w-4 h-4 animate-spin",viewBox:"0 0 24 24",children:[s.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),s.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"})]}):ae.status==="read"||ae.readBy.length>1?s.jsx(L,{icon:Ur,className:"w-4 h-4 text-blue-500"}):ae.status==="delivered"?s.jsxs("div",{className:"flex -space-x-1",children:[s.jsx(L,{icon:Ur,className:"w-4 h-4 text-gray-500"}),s.jsx(L,{icon:Ur,className:"w-4 h-4 text-gray-500"})]}):s.jsx(L,{icon:Ur,className:"w-4 h-4 text-gray-400"}),Di=C.useCallback(ae=>{const ve=wt.get(ae._id);return ve||ae.documentSignedUrl||ae.documentUrl},[wt]),Ns=C.useCallback(async ae=>{var ve,Ie,ut;try{const Mt=await X.refreshDocumentUrl(ae);if((ve=Mt.body)!=null&&ve.success&&((ut=(Ie=Mt.body)==null?void 0:Ie.data)!=null&&ut.signedUrl))return Ft(Vt=>{const jr=new Map(Vt);return jr.set(ae,Mt.body.data.signedUrl),jr}),Mt.body.data.signedUrl}catch(Mt){console.error("Failed to refresh document URL:",Mt)}return null},[]),ti=C.useCallback(async(ae,ve)=>{ae.preventDefault(),ae.stopPropagation();let Ie=Di(ve);if(Ie)try{const ut=await fetch(Ie,{method:"HEAD"});if(ut.status===403||ut.status===401){const Mt=await Ns(ve._id);if(Mt)Ie=Mt;else{console.error("Failed to refresh expired document URL");return}}window.open(Ie,"_blank")}catch{const ut=await Ns(ve._id);ut&&window.open(ut,"_blank")}},[Di,Ns]),As=ae=>{switch(ae.type){case"text":return s.jsx("p",{className:"break-words whitespace-pre-wrap",children:ae.content});case"document":const ve=Di(ae),Ie=ae.senderId===(r==null?void 0:r._id);return s.jsxs("div",{className:"space-y-2",children:[ae.content&&ae.content!==ae.documentName&&s.jsx("p",{className:"break-words whitespace-pre-wrap",children:ae.content}),s.jsxs("div",{className:`flex items-center gap-3 p-3 rounded-lg ${Ie?"bg-blue-500 bg-opacity-40":"bg-gray-300 bg-opacity-50"}`,children:[s.jsx("div",{className:`flex-shrink-0 w-10 h-10 rounded-lg flex items-center justify-center ${Ie?"bg-blue-400 bg-opacity-50":"bg-gray-400 bg-opacity-50"}`,children:s.jsx(L,{icon:Ik,className:"w-5 h-5"})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"font-medium truncate",children:ae.documentName||"Document"}),ae.documentSize&&s.jsxs("p",{className:"text-xs opacity-80",children:[(ae.documentSize/1024).toFixed(0)," KB"]}
283)]}),ve&&s.jsx("button",{onClick:ut=>ti(ut,ae),className:`flex-shrink-0 p-2 rounded-full transition-colors ${Ie?"hover:bg-blue-400 hover:bg-opacity-40":"hover:bg-gray-400 hover:bg-opacity-40"}`,children:s.jsx(L,{icon:eu,className:"w-5 h-5"})})]})]});case"system":return s.jsx("div",{className:"text-center",children:s.jsx("p",{className:"text-sm text-gray-500 italic",children:ae.content})});default:return s.jsx("p",{children:ae.content})}},ri=ae=>{var Ut,Sr,Nr;const ve=ae.senderId===(r==null?void 0:r._id),Ie=ae._id.startsWith("optimistic-"),ut=$.has(ae._id);if(ae.type==="system")return s.jsx("div",{className:"flex justify-center my-2",children:As(ae)},ae._id);const Mt=ue===ae._id,Vt=Ne===ae._id,jr=Mt?`translateX(${me}px)`:"",kn=Mt?Math.min(me/je,1):0;return s.jsxs("div",{ref:os=>{os?Te.current.set(ae._id,os):Te.current.delete(ae._id)},className:`flex items-end gap-2 mb-4 ${ve?"flex-row-reverse":"flex-row"} relative ${Vt?"animate-pulse":""}`,onMouseDown:os=>{G||(ia(ae._id),js(os,ae._id))},onMouseUp:()=>{ws(),Or()},onMouseMove:Tt,onMouseLeave:()=>{ws(),Or()},onTouchStart:os=>{G||(ia(ae._id),js(os,ae._id))},onTouchMove:Tt,onTouchEnd:()=>{ws(),Or()},onClick:()=>Bi(ae),style:{transform:jr,transition:Mt?"none":"transform 0.3s ease-out"},children:[Mt&&s.jsx("div",{className:"absolute left-2 top-1/2 -translate-y-1/2 flex items-center justify-center",style:{opacity:kn,transition:"opacity 0.1s ease-out"},children:s.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center ${me>=je?"bg-blue-600":"bg-gray-400"}`,children:s.jsx(L,{icon:Qb,className:"w-4 h-4 text-white"})})}),G&&s.jsx("div",{className:`w-5 h-5 rounded-full border-2 flex items-center justify-center flex-shrink-0 transition-colors ${ut?"bg-blue-600 border-primary":"border-border"}`,children:ut&&s.jsx(L,{icon:Ur,className:"w-3.5 h-3.5 text-white"})}),!ve&&!G&&s.jsx("div",{className:"flex-shrink-0",children:s.jsx("img",{src:X.generateThumbnailUrl((Ut=ae.sender)==null?void 0:Ut.avatar,64)||rn,alt:((Sr=ae.sender)==null?void 0:Sr.name)||"User",className:"w-8 h-8 rounded-full object-cover"})}),s.jsxs("div",{className:`max-w-[70%] ${ve?"items-end":"items-start"} flex flex-col`,children:[!ve&&s.jsx("span",{className:"text-xs text-gray-500 mb-1 ml-2",children:((Nr=ae.sender)==null?void 0:Nr.name)||"Utilisateur"}),ae.replyTo&&s.jsxs("button",{onClick:()=>re(ae.replyTo.messageId),className:`mb-1 px-3 py-2 rounded-lg text-xs text-left w-full hover:opacity-80 transition-opacity ${ve?"bg-blue-500 bg-opacity-30":"bg-gray-200"}`,children:[s.jsx("p",{className:"font-medium opacity-80",children:ae.replyTo.senderName}),s.jsx("p",{className:"opacity-70 truncate",children:ae.replyTo.content})]}),s.jsxs("div",{className:`px-4 py-2 rounded-2xl ${ve?Ie?"bg-blue-500 text-white rounded-br-md opacity-80":"bg-blue-600 text-white rounded-br-md":"bg-gray-200 text-gray-900 rounded-bl-md"} ${Vt?"ring-2 ring-blue-400 ring-opacity-50":""}`,style:{transition:"all 0.3s ease-out"},children:[As(ae),s.jsxs("div",{className:`flex items-center gap-1 mt-1 text-xs ${ve?"text-blue-100":"text-gray-500"}`,children:[s.jsx("span",{children:za(ae.createdAt)}),Va(ae)]})]})]})]},ae._id)},re=ae=>{const ve=Te.current.get(ae);ve&&(ve.scrollIntoView({behavior:"smooth",block:"center"}),ye(ae),setTimeout(()=>ye(null),1500),"vibrate"in navigator&&navigator.vibrate(10))},fe=()=>{if(!j)return"Chat";const ae=j.participants.filter(ve=>ve._id!==(r==null?void 0:r._id));return ae.length===0?j.participants.map(ve=>ve.name).join(", "):ae.map(ve=>ve.name).join(", ")},We=()=>{if(!j)return;const ae=j.participants.find(ve=>ve._id!==(r==null?void 0:r._id));return ae==null?void 0:ae.avatar},Ke=ae=>{if(!ae)return"?";const ve=ae.trim().split(" ");return ve.length>=2?(ve[0][0]+ve[ve.length-1][0]).toUpperCase():ae[0].toUpperCase()},Et=ae=>{const ve=["bg-blue-500","bg-green-500","bg-orange-500","bg-purple-500","bg-pink-500","bg-indigo-500","bg-teal-500","bg-red-500"],Ie=ae.split("").reduce((ut,Mt)=>ut+Mt.charCodeAt(0),0);return ve[Ie%ve.length]},Zt=()=>j?j.participants.some(ae=>ae._id!==(r==null?void 0:r._id)&&ae.isOnline):!1;return w&&E.length===0?s.jsxs(Z.div,{variants:On,initial:"hidden",animate:"show",className:"flex flex-col h-full bg-white",children:[s.jsx("div",{className:"p-4 border-b border-border",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx($e,{width:"w-10",height:"h-10",rounded:"rounded-full"}),s.jsxs("div",{className:"flex-1",children:[s.jsx($e,{width:"w-32",height:"h-5",className:"mb-1"}),s.jsx($e,{width:"w-20",height:"h-3"})]})]})}),s.jsx("div",{className:"flex-1 overflow-y-auto p-4 space-y-4",children:[1,2,3,4,5].map(ae=>s.jsxs("div",{className:`flex items-end gap-2 ${ae%2===0?"flex-row-reverse":""}`,children:[s.jsx($e,{width:"w-8",height:"h-8",rounded:"rounded-full"}),s.jsx("div",{className:"max-w-[70%]",children:s.jsx($e,{width:"w-48",height:"h-16",rounded:"rounded-2xl"})})]},ae))})]}):s.jsxs(s.Fragment,{children:[s.jsxs(Z.div,{variants:On,initial:"hidden",animate:"show",className:"flex flex-col h-full bg-white",children:[s.jsx("div",{className:"p-4 border-b border-border bg-white",children:G?s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("button",{onClick:Nt,className:"p-2 hover:bg-gray-100 rounded-full transition-colors",children:s.jsx(L,{icon:gt,className:"w-5 h-5 text-gray-700"})}),s.jsxs("span",{className:"font-medium text-gray-900",children:[$.size," sélectionné",$.size>1?"s":""]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[$.size===1&&s.jsx("button",{onClick:ct,className:"p-2 text-blue-600 hover:bg-blue-50 rounded-full transition-colors",title:"Répondre",children:s.jsx(L,{icon:Qb,className:"w-5 h-5"})}),s.jsx("button",{onClick:yt,className:"p-2 text-blue-600 hover:bg-blue-50 rounded-full transition-colors",title:"Transférer",children:s.jsx(L,{icon:tre,className:"w-5 h-5"})}),s.jsx("button",{onClick:Hn,className:"p-2 text-blue-600 hover:bg-blue-50 rounded-full transition-colors",title:"Copier",children:s.jsx(L,{icon:cy,className:"w-5 h-5"})}),s.jsx("button",{onClick:ei,disabled:$.size===0,className:"p-2 text-red-600 hover:bg-red-50 rounded-full transition-colors disabled:opacity-50",title:"Supprimer",children:s.jsx(L,{icon:kd,className:"w-5 h-5"})})]})]}):s.jsxs("div",{className:"flex items-center gap-3",children:[t&&s.jsx("button",{onClick:t,className:"p-2 hover:bg-gray-100 rounded-full transition-colors lg:hidden",children:s.jsx(L,{icon:Qb,className:"w-5 h-5 text-gray-700"})}),j&&s.jsxs(s.Fragment,{children:[s.jsxs("button",{onClick:Lt,className:"relative hover:opacity-80 transition-opacity",children:[We()?s.jsx("img",{src:X.generateThumbnailUrl(We(),96)||rn,alt:fe(),className:"w-10 h-10 rounded-full object-cover"}):s.jsx("div",{className:`w-10 h-10 rounded-full flex items-center justify-center text-white font-bold text-sm ${Et(fe())}`,children:Ke(fe())}),Zt()&&s.jsx("div",{className:"absolute bottom-0 right-0 w-3 h-3 bg-green-500 rounded-full border-2 border-white"})]}),s.jsxs("div",{className:"flex-1 min-w-0 cursor-pointer",onClick:Lt,children:[s.jsx("h2",{className:"font-semibold text-gray-900 truncate",children:fe()}),s.jsx("p",{className:"text-xs text-gray-500",children:Zt()?"En ligne":"Hors ligne"})]}),s.jsxs("div",{className:"relative",ref:oe,children:[s.jsx("button",{onClick:()=>J(!Y),className:"p-2 hover:bg-gray-100 rounded-full transition-colors",children:s.jsx(L,{icon:Bre,className:"w-5 h-5 text-gray-600"})}),Y&&s.jsxs("div",{className:"absolute right-0 top-full mt-1 bg-white rounded-xl border border-border py-1 z-50 w-48",children:[s.jsxs("button",{onClick:ur,className:"w-full flex items-center gap-3 px-4 py-2.5 text-sm text-gray-700 hover:bg-gray-50 transition-colors",children:[s.jsx(L,{icon:C$,className:"w-4 h-4 text-orange-500"}
283),"Signaler"]}),s.jsxs("button",{onClick:Es,className:"w-full flex items-center gap-3 px-4 py-2.5 text-sm text-red-600 hover:bg-red-50 transition-colors",children:[s.jsx(L,{icon:C3,className:"w-4 h-4"}),"Bloquer"]})]})]})]})]})}),j&&r&&!n&&QW(j,r._id)&&s.jsx("div",{className:"bg-yellow-50 border-b border-border p-3",children:s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[s.jsx("svg",{className:"w-5 h-5 text-yellow-600",fill:"currentColor",viewBox:"0 0 20 20",children:s.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})}),s.jsx("span",{className:"text-sm font-medium text-yellow-800",children:"Cet utilisateur souhaite démarrer une conversation avec vous"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{onClick:At,className:"px-4 py-1.5 bg-green-600 text-white text-sm font-medium rounded-lg hover:bg-green-700 transition-colors",children:"Accepter"}),s.jsx("button",{onClick:ur,className:"px-4 py-1.5 bg-red-600 text-white text-sm font-medium rounded-lg hover:bg-red-700 transition-colors",children:"Signaler"})]})]})}),j&&r&&!n&&sj(j,r._id)&&j.acceptanceStatus==="pending"&&s.jsx("div",{className:`border-b p-3 ${z1(j,r._id)?"bg-orange-50 border-border":"bg-blue-50 border-border"}`,children:s.jsx("div",{className:"flex items-center gap-2",children:z1(j,r._id)?s.jsxs(s.Fragment,{children:[s.jsx("svg",{className:"w-5 h-5 text-orange-600",fill:"currentColor",viewBox:"0 0 20 20",children:s.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm1-12a1 1 0 10-2 0v4a1 1 0 00.293.707l2.828 2.829a1 1 0 101.415-1.415L11 9.586V6z",clipRule:"evenodd"})}),s.jsx("span",{className:"text-sm font-medium text-orange-800",children:"En attente de réponse du destinataire. Vous ne pouvez plus envoyer de messages tant que cette personne n'a pas accepté la conversation."})]}):s.jsxs(s.Fragment,{children:[s.jsx("svg",{className:"w-5 h-5 text-blue-600",fill:"currentColor",viewBox:"0 0 20 20",children:s.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})}),s.jsxs("span",{className:"text-sm text-blue-800",children:["Conversation en attente d'acceptation. Vous pouvez envoyer ",xh(j,r._id)," message",xh(j,r._id)>1?"s":""," de plus."]})]})})}),j&&(j.acceptanceStatus==="reported"||j.acceptanceStatus==="blocked")&&s.jsx("div",{className:"bg-red-50 border-b border-border p-3",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("svg",{className:"w-5 h-5 text-red-600",fill:"currentColor",viewBox:"0 0 20 20",children:s.jsx("path",{fillRule:"evenodd",d:"M13.477 14.89A6 6 0 015.11 6.524l8.367 8.368zm1.414-1.414L6.524 5.11a6 6 0 018.367 8.367zM18 10a8 8 0 11-16 0 8 8 0 0116 0z",clipRule:"evenodd"})}),s.jsx("span",{className:"text-sm font-medium text-red-800",children:j.acceptanceStatus==="reported"?"Cette conversation a été signalée":"Cette conversation est bloquée"})]})}),s.jsxs(Z.div,{ref:Pt,variants:uu,initial:"hidden",animate:"show",className:"flex-1 overflow-y-auto p-4 bg-gray-50",style:{scrollBehavior:"smooth"},children:[B&&s.jsx("div",{className:"flex justify-center mb-4",children:s.jsx("div",{className:"w-6 h-6 border-2 border-primary border-t-transparent rounded-full animate-spin"})}),mn.map(ae=>s.jsxs("div",{children:[s.jsx("div",{className:"flex justify-center my-4",children:s.jsx("div",{className:"px-3 py-1 bg-gray-300 bg-opacity-50 rounded-full",children:s.jsx("span",{className:"text-xs font-medium text-gray-700",children:ae.date})})}),ae.messages.map(ve=>s.jsx(ie.Fragment,{children:ri(ve)},ve._id))]},ae.date)),R.size>0&&s.jsxs("div",{className:"flex items-end gap-2 mb-4",children:[s.jsx("div",{className:"flex-shrink-0",children:We()?s.jsx("img",{src:X.generateThumbnailUrl(We(),96)||rn,alt:"User",className:"w-8 h-8 rounded-full object-cover"}):s.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center text-white font-bold text-xs ${Et(fe())}`,children:Ke(fe())})}),s.jsxs("div",{className:"px-4 py-2 bg-gray-200 rounded-2xl rounded-bl-md",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:"w-2 h-2 bg-gray-500 rounded-full animate-bounce",style:{animationDelay:"0ms"}}),s.jsx("div",{className:"w-2 h-2 bg-gray-500 rounded-full animate-bounce",style:{animationDelay:"150ms"}}),s.jsx("div",{className:"w-2 h-2 bg-gray-500 rounded-full animate-bounce",style:{animationDelay:"300ms"}})]}),s.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:[Array.from(R)[0]," est en train d'écrire..."]})]})]}),s.jsx("div",{ref:Rt})]}),s.jsxs("div",{className:"p-4 bg-white border-t border-border",children:[Ue&&!Se&&s.jsxs("div",{className:"mb-3 p-3 bg-blue-50 border border-border rounded-lg flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[s.jsx("span",{className:"text-2xl",children:Po(Ue.type)}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium text-gray-900 truncate",children:Ue.name}),s.jsx("p",{className:"text-xs text-gray-500",children:Cs(Ue.size)})]})]}),s.jsx("button",{onClick:Do,className:"p-1.5 hover:bg-blue-100 rounded-full transition-colors flex-shrink-0",children:s.jsx(L,{icon:gt,className:"w-5 h-5 text-gray-500"})})]}),he&&s.jsxs("div",{className:"mb-3 p-3 bg-gray-100 rounded-lg flex items-center justify-between",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("p",{className:"text-xs font-medium text-blue-600",children:["Répondre à ",(vr=he.sender)==null?void 0:vr.name]}),s.jsx("p",{className:"text-sm text-gray-600 truncate",children:he.content})]}),s.jsx("button",{onClick:()=>Q(null),className:"p-1 hover:bg-gray-200 rounded-full transition-colors",children:s.jsx(L,{icon:gt,className:"w-4 h-4 text-gray-500"})})]}),Se&&s.jsxs("div",{className:"mb-3 p-3 bg-blue-50 rounded-lg",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("span",{className:"text-sm font-medium text-blue-900",children:"Envoi du document..."}),s.jsxs("span",{className:"text-sm text-blue-700",children:[xt,"%"]})]}),s.jsx("div",{className:"w-full bg-blue-200 rounded-full h-2",children:s.jsx("div",{className:"bg-blue-600 h-2 rounded-full transition-all duration-300",style:{width:`${xt}%`}})})]}),s.jsxs("div",{className:"flex items-end gap-2",children:[s.jsx("input",{ref:ft,type:"file",accept:".pdf,.doc,.docx,.xls,.xlsx",onChange:as,className:"hidden"}),s.jsx("button",{onClick:()=>{var ae;return(ae=ft.current)==null?void 0:ae.click()},disabled:Se,className:"p-2 text-gray-500 hover:bg-gray-100 rounded-full transition-colors disabled:opacity-50",children:s.jsx(L,{icon:Ik,className:"w-6 h-6"})}),s.jsx("textarea",{value:V,onChange:Si,onKeyDown:ae=>
283{ae.key==="Enter"&&!ae.shiftKey&&(ae.preventDefault(),Js())},placeholder:j&&r&&!n&&!Rp(j,r._id)?"Vous ne pouvez pas envoyer de messages dans cette conversation":Ue?"Ajouter un message (optionnel)...":"Écrivez un message...",rows:1,disabled:j&&r&&!n?!Rp(j,r._id):!1,className:"flex-1 px-4 py-2 bg-gray-100 border-none rounded-full focus:outline-none focus:ring-2 focus:ring-blue-500 resize-none max-h-32 disabled:opacity-60 disabled:cursor-not-allowed",style:{minHeight:"40px",maxHeight:"128px",overflowY:V.split(`
284`).length>3?"auto":"hidden"}}),s.jsx("button",{onClick:Js,disabled:!V.trim()&&!Ue||Se||(j&&r&&!n?!Rp(j,r._id):!1),className:"p-2 bg-blue-600 text-white rounded-full hover:bg-blue-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:s.jsx(L,{icon:to,className:"w-6 h-6"})})]})]})]}),Gr.isOpen&&s.jsx("div",{className:"fixed inset-0 bg-black/30 backdrop-blur-sm flex items-center justify-center z-50 p-4",children:s.jsxs("div",{className:"bg-white rounded-lg w-full max-w-md max-h-[80vh] flex flex-col border border-border",children:[s.jsx("div",{className:"p-4 border-b border-border",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:"Transférer à"}),s.jsx("button",{onClick:()=>{Nn({messageIds:[],isOpen:!1}),fn(new Set)},className:"p-1 hover:bg-gray-100 rounded-full transition-colors",children:s.jsx(L,{icon:gt,className:"w-5 h-5 text-gray-500"})})]})}),s.jsx("div",{className:"flex-1 overflow-y-auto",children:vs.map(ae=>s.jsxs("button",{onClick:()=>{fn(ve=>{const Ie=new Set(ve);return Ie.has(ae._id)?Ie.delete(ae._id):Ie.add(ae._id),Ie})},className:"w-full flex items-center gap-3 p-4 hover:bg-gray-50 transition-colors",children:[s.jsx("div",{className:`w-5 h-5 rounded-full border-2 flex items-center justify-center transition-colors ${Kr.has(ae._id)?"bg-blue-600 border-primary":"border-border"}`,children:Kr.has(ae._id)&&s.jsx(L,{icon:Ur,className:"w-3.5 h-3.5 text-white"})}),(()=>{const ve=ae.participants.find(ut=>ut._id!==(r==null?void 0:r._id)),Ie=(ve==null?void 0:ve.name)||ae.participants.map(ut=>ut.name).join(", ");return s.jsxs(s.Fragment,{children:[ve!=null&&ve.avatar?s.jsx("img",{src:X.generateThumbnailUrl(ve.avatar,160)||rn,alt:Ie,className:"w-10 h-10 rounded-full object-cover"}):s.jsx("div",{className:`w-10 h-10 rounded-full flex items-center justify-center text-white font-bold text-sm ${Et(Ie)}`,children:Ke(Ie)}),s.jsx("div",{className:"flex-1 text-left",children:s.jsx("p",{className:"font-medium text-gray-900",children:Ie})})]})})()]},ae._id))}),s.jsx("div",{className:"p-4 border-t border-border",children:s.jsxs("button",{onClick:cr,disabled:Kr.size===0,className:"w-full px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white font-medium rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:["Transférer (",Kr.size,")"]})})]})}),Rn&&s.jsx("div",{className:"fixed inset-0 bg-black/30 backdrop-blur-sm flex items-center justify-center z-50 p-4",children:s.jsxs("div",{className:"bg-white rounded-lg w-full max-w-sm p-6 border border-border",children:[s.jsxs("h3",{className:"text-lg font-semibold text-gray-900 mb-2",children:["Supprimer ",$.size>1?"les messages":"le message"," ?"]}),s.jsx("p",{className:"text-gray-600 mb-6",children:$.size>1?`Êtes-vous sûr de vouloir supprimer ces ${$.size} messages ? Cette action est irréversible.`:"Êtes-vous sûr de vouloir supprimer ce message ? Cette action est irréversible."}),s.jsxs("div",{className:"flex gap-3",children:[s.jsx("button",{onClick:()=>hn(!1),className:"flex-1 px-4 py-2 bg-gray-100 hover:bg-gray-200 text-gray-800 font-medium rounded-lg transition-colors",children:"Annuler"}),s.jsx("button",{onClick:An,className:"flex-1 px-4 py-2 bg-red-600 hover:bg-red-700 text-white font-medium rounded-lg transition-colors",children:"Supprimer"})]})]})}),_n&&s.jsx("div",{className:"fixed inset-0 bg-black/30 backdrop-blur-sm z-50 flex items-center justify-center p-4",children:s.jsxs("div",{className:"bg-white rounded-2xl max-w-md w-full max-h-[90vh] overflow-y-auto",children:[s.jsxs("div",{className:"sticky top-0 bg-white border-b border-border p-4 flex items-center justify-between",children:[s.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Informations du profil"}),s.jsx("button",{onClick:()=>fr(!1),className:"p-2 hover:bg-gray-100 rounded-full transition-colors",children:s.jsx(L,{icon:gt,className:"w-5 h-5 text-gray-700"})})]}),s.jsx("div",{className:"p-6",children:pe?s.jsxs("div",{className:"flex flex-col items-center gap-4",children:[s.jsx($e,{width:"w-24",height:"h-24",rounded:"rounded-full"}),s.jsxs("div",{className:"w-full space-y-3",children:[s.jsx($e,{width:"w-full",height:"h-5"}),s.jsx($e,{width:"w-3/4",height:"h-5"}),s.jsx($e,{width:"w-full",height:"h-5"}),s.jsx($e,{width:"w-2/3",height:"h-5"})]})]}):Bt?s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex flex-col items-center",children:[Bt.avatar?s.jsx("img",{src:X.generateThumbnailUrl(Bt.avatar,256)||rn,alt:Bt.name||`${Bt.firstName} ${Bt.lastName}`,className:"w-24 h-24 rounded-full object-cover mb-3"}):s.jsx("div",{className:`w-24 h-24 rounded-full flex items-center justify-center text-white font-bold text-2xl mb-3 ${Et(Bt.name||`${Bt.firstName} ${Bt.lastName}`)}`,children:Ke(Bt.name||`${Bt.firstName} ${Bt.lastName}`)}),s.jsx("h4",{className:"text-xl font-bold text-gray-900 text-center",children:Bt.name||`${Bt.firstName} ${Bt.lastName}`}),Zt()&&s.jsx("span",{className:"text-sm text-green-600 font-medium mt
284-1",children:"En ligne"})]}),s.jsxs("div",{className:"space-y-3",children:[Bt.email&&s.jsx("div",{className:"bg-gray-50 rounded-lg p-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("svg",{className:"w-5 h-5 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-xs text-gray-500 font-medium",children:"Email"}),s.jsx("p",{className:"text-sm text-gray-900",children:Bt.email})]})]})}),Bt.phoneNumber&&s.jsx("div",{className:"bg-gray-50 rounded-lg p-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("svg",{className:"w-5 h-5 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-xs text-gray-500 font-medium",children:"Téléphone"}),s.jsx("p",{className:"text-sm text-gray-900",children:Bt.phoneNumber})]})]})}),Bt.createdAt&&s.jsx("div",{className:"bg-gray-50 rounded-lg p-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("svg",{className:"w-5 h-5 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-xs text-gray-500 font-medium",children:"Membre depuis"}),s.jsx("p",{className:"text-sm text-gray-900",children:xg(af(Bt.createdAt),"dd MMMM yyyy",{locale:ud})})]})]})}),Bt.subscriptionType&&s.jsx("div",{className:"bg-primary-soft rounded-lg p-4 border border-border",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("svg",{className:"w-5 h-5 text-blue-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-xs text-blue-600 font-medium",children:"Type d'abonnement"}),s.jsx("p",{className:"text-sm text-gray-900 font-semibold capitalize",children:Bt.subscriptionType})]})]})}),Bt.language&&s.jsx("div",{className:"bg-gray-50 rounded-lg p-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("svg",{className:"w-5 h-5 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 5h12M9 3v2m1.048 9.5A18.022 18.022 0 016.412 9m6.088 9h7M11 21l5-10 5 10M12.751 5C11.783 10.77 8.07 15.61 3 18.129"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-xs text-gray-500 font-medium",children:"Langue"}),s.jsx("p",{className:"text-sm text-gray-900 capitalize",children:Bt.language})]})]})})]})]}):s.jsx("div",{className:"text-center py-8",children:s.jsx("p",{className:"text-gray-500",children:"Impossible de charger les informations du profil"})})})]})})]})},D4e=e=>{C.useEffect(()=>{const t=document.querySelector("nav");return t&&(e?t.style.display="none":t.style.display=""),()=>{const r=document.querySelector("nav");r&&(r.style.display="")}},[e])};function F4e(){const[e,t]=I4(),{subscribeToStatuses:r}=rj(),n=e.get("conversation"),i=e.get("view"),[a,o]=C.useState(!1),[l,c]=C.useState(!1),[u,f]=C.useState([]),[x,m]=C.useState(0),[p,y]=C.useState(0);D4e(l||a),C.useEffect(()=>(r(),()=>{}),[r]);const v=(S,B)=>{const D=B.length?B:[S],P=Math.max(0,D.findIndex(O=>O.userId===S.userId));f(D),m(P),o(!0)},b=S=>{const B=S.author||S.user,D=(B==null?void 0:B.name)||(B!=null&&B.firstName&&(B!=null&&B.lastName)?`${B.firstName} ${B.lastName}`:(B==null?void 0:B.firstName)||(B==null?void 0:B.lastName)||"Utilisateur"),P={userId:S.authorId||S.userId,authorName:D,authorAvatar:(B==null?void 0:B.avatar)||rn,statuses:[S],hasUnviewed:!S.isViewed};f([P]),m(0),o(!0)},E=()=>{c(!0)},N=()=>{c(!1),y(S=>S+1)},j=async S=>{var O,M;o(!1);const B=S.authorId||S.userId;if(!B)return;
284const D=await X.getOrCreateConversation(String(B)),P=(M=(O=D.body)==null?void 0:O.data)==null?void 0:M._id;!D.isSuccessByStatusCode||!P||t({conversation:P})},A=S=>{t({conversation:S._id})},w=()=>{t({})};return s.jsxs("div",{className:"flex flex-col h-screen bg-gray-50 relative",children:[!n&&s.jsx(mwe,{onStoryClick:v,onCreateClick:E,refreshTrigger:p}),s.jsx("div",{className:"flex-1 overflow-hidden",children:n?s.jsx(B4e,{conversationId:n,onBack:w}):i==="status"?s.jsx(gwe,{onStatusClick:b,onCreateClick:E,refreshTrigger:p}):s.jsx(S4e,{onConversationClick:A})}),a&&u.length>0&&s.jsx(ywe,{storyGroups:u,initialGroupIndex:x,initialStoryIndex:0,onClose:()=>o(!1),onReply:j,onGroupChange:S=>m(S)}),s.jsx(Cwe,{isOpen:l,onClose:()=>c(!1),onSuccess:N})]})}function P4e(){var D;const e=lt(),{user:t,updateProfile:r}=Gt(),[n,i]=C.useState(""),[a,o]=C.useState(""),[l,c]=C.useState(""),[u,f]=C.useState(""),[x,m]=C.useState(""),[p,y]=C.useState([]),[v,b]=C.useState(!1),[E,N]=C.useState(""),j=t!=null&&t.country&&((D=Pn.find(P=>P.code===t.country||P.value===t.country))==null?void 0:D.code)||"",A=qoe[j]||[],w=P=>{const O=L1(P);y(M=>M.includes(O)?M.filter(I=>I!==O):[...M,O])},S=()=>{localStorage.setItem("profileCompletionSkipped","true"),e("/")},B=async()=>{b(!0),N("");try{const P={};n&&(P.region=n),a&&(P.birthDate=a),l&&(P.sex=l),u&&(P.profession=Rs(u)),x&&(P.language=x),p.length>0&&(P.interests=p.map(O=>Rs(O))),await r(P),localStorage.setItem("profileCompletionDone","true"),e("/")}catch(P){const O=(P==null?void 0:P.message)||"Erreur lors de la sauvegarde du profil.";N(O)}finally{b(!1)}};return s.jsx(nn,{children:s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-bg p-4",children:s.jsxs(Z.div,{className:"w-full max-w-md bg-white rounded-3xl p-8 max-h-[90vh] overflow-y-auto border border-border",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},children:[s.jsx("h2",{className:"text-2xl font-bold text-center text-gray-800 mb-2",children:"Complétez votre profil"}),s.jsx("p",{className:"text-center text-gray-500 mb-6",children:"Aidez-nous à mieux vous connaître pour personnaliser votre expérience"}),s.jsxs("div",{className:"flex flex-col gap-4",children:[A.length>0&&s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 mb-1",children:"🗺️ Région"}),s.jsxs("select",{value:n,onChange:P=>i(P.target.value),className:"w-full border border-border rounded-xl px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary",children:[s.jsx("option",{value:"",children:"Sélectionner la région"}),A.map(P=>s.jsx("option",{value:P,children:P},P))]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 mb-1",children:"🎂 Date de naissance"}),s.jsx("input",{type:"date",value:a,onChange:P=>o(P.target.value),className:"w-full border border-border rounded-xl px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 mb-1",children:"⚧️ Sexe"}),s.jsxs("select",{value:l,onChange:P=>c(P.target.value),className:"w-full border border-border rounded-xl px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary",children:[s.jsx("option",{value:"",children:"Sélectionner"}),s.jsx("option",{value:"male",children:"👨 Homme"}),s.jsx("option",{value:"female",children:"👩 Femme"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 mb-1",children:"💼 Profession"}),s.jsxs("select",{value:u,onChange:P=>f(P.target.value),className:"w-full border border-border rounded-xl px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary",children:[s.jsx("option",{value:"",children:"Sélectionner la profession"}),wW.map(P=>s.jsx("option",{value:P,children:P},P))]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 mb-1",children:"🗣️ Langue préférée"}),s.jsxs("select",{value:x,onChange:P=>m(P.target.value),className:"w-full border border-border rounded-xl px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary",children:[s.jsx("option",{value:"",children:"Sélectionner la langue"}),s.jsx("option",{value:"fr",children:"Français"}),s.jsx("option",{value:"en",children:"Anglais"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-gray-700 mb-1",children:"❤️ Centres d'intérêt"}),s.jsx("div",{className:"flex flex-wrap gap-2 max-h-48 overflow-y-auto p-1",children:uh.map(P=>{const O=L1(P),M=p.includes(O);return s.jsx("button",{type:"button",className:`px-3 py-1 rounded-full border text-xs font-medium transition-colors ${M?"bg-green-700 text-white border-success":"bg-white text-gray-700 border-border hover:bg-gray-50"}`,onClick:()=>w(P),children:P},P)})}),p.length>0&&s.jsxs("div",{className:"text-xs text-gray-500 mt-1",children:[p.length," centre",p.length>
2841?"s":""," d'intérêt sélectionné",p.length>1?"s":""]})]}),E&&s.jsx("div",{className:"text-red-500 text-sm text-center",children:E}),s.jsxs("div",{className:"flex gap-3 mt-4",children:[s.jsx("button",{onClick:S,className:"flex-1 bg-gray-200 text-gray-700 font-bold rounded-xl py-3 hover:bg-gray-300 transition-colors",children:"Passer"}),s.jsx("button",{onClick:B,disabled:v,className:"flex-1 bg-primary hover:bg-blue-700 disabled:bg-blue-400 disabled:cursor-not-allowed text-white font-bold rounded-xl py-3 transition-colors flex items-center justify-center gap-2",children:v?s.jsxs(s.Fragment,{children:[s.jsxs("svg",{className:"animate-spin h-4 w-4 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[s.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),s.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"})]}),"Sauvegarde..."]}):"Enregistrer"})]})]})]})})})}const ij="/assets/ads-share-wlzTUju0.jpg",T4e=e=>String(e).padStart(2,"0");function M4e({launchAt:e}){const t=e?new Date(e).getTime():null,[r,n]=C.useState(Date.now());C.useEffect(()=>{const f=setInterval(()=>n(Date.now()),1e3);return()=>clearInterval(f)},[]);const i=t?Math.max(0,t-r):null,a=i!==null?Math.floor(i/864e5):0,o=i!==null?Math.floor(i%864e5/36e5):0,l=i!==null?Math.floor(i%36e5/6e4):0,c=i!==null?Math.floor(i%6e4/1e3):0,u=t?new Date(t).toLocaleString("fr-FR",{weekday:"long",day:"numeric",month:"long",hour:"2-digit",minute:"2-digit"}):null;return s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Z.div,{initial:{opacity:0,y:-30},animate:{opacity:1,y:0},transition:{duration:.5,type:"spring"},className:"bg-primary px-4 pt-4 pb-8 text-white",children:s.jsxs("div",{className:"max-w-2xl mx-auto",children:[s.jsx("div",{className:"[&_button]:text-white [&_svg]:text-white",children:s.jsx(Ct,{})}),s.jsxs("div",{className:"flex items-center gap-4 mt-2",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx("h1",{className:"text-2xl font-bold",children:"SBC Ads Network"})}),s.jsx("img",{src:ij,alt:"",className:"w-24 h-24 object-cover rounded-2xl ring-2 ring-white/30 shrink-0"})]})]})}),s.jsx("div",{className:"max-w-2xl mx-auto px-4 pt-6 pb-24",children:s.jsxs(Z.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.15},className:"bg-white border border-border rounded-2xl p-6 text-center",children:[s.jsx("div",{className:"w-14 h-14 rounded-full bg-blue-50 text-primary flex items-center justify-center mx-auto",children:s.jsx(L,{icon:Pc,size:22})}),i!==null&&i>0?s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"text-sm text-gray-500 mt-4",children:"Ouverture dans"}),s.jsx("div",{className:"flex justify-center gap-2 mt-3",children:[{v:a,l:"jours"},{v:o,l:"heures"},{v:l,l:"min"},{v:c,l:"sec"}].map(f=>s.jsxs("div",{className:"bg-gray-50 border border-border rounded-xl px-3 py-2 min-w-[62px]",children:[s.jsx("p",{className:"text-2xl font-bold text-gray-900 tabular-nums",children:T4e(f.v)}),s.jsx("p",{className:"text-[11px] text-gray-500",children:f.l})]},f.l))}),u&&s.jsxs("p",{className:"text-sm text-gray-600 mt-4",children:["Rendez-vous le ",s.jsx("strong",{children:u}),"."]})]}):s.jsx("p",{className:"text-gray-700 mt-4",children:"L'ouverture est imminente. Rechargez la page dans un instant."})]})})]})}function O4e(){const{user:e}=Gt(),t=(e==null?void 0:e.role)==="admin",{data:r,isLoading:n}=hr({queryKey:["ads-launch-state"],queryFn:async()=>{var o;return(o=(await X.getAdsLaunchState()).body)==null?void 0:o.data},staleTime:6e4,retry:1});return n?s.jsx("div",{className:"min-h-screen bg-gray-50"}):((r==null?void 0:r.launched)??!0)||t?s.jsx(L4,{}):s.jsx(M4e,{launchAt:(r==null?void 0:r.launchAt)??null})}const aj={initial:{opacity:0,y:-30},animate:{opacity:1,y:0},transition:{duration:.5,type:"spring"}},hs=(e,t=.15)=>({initial:{opacity:0,x:30},animate:{opacity:1,x:0},transition:{delay:t+e*.07,duration:.4,type:"spring"}}),o4=({title:e,subtitle:t,accent:r="blue",illustration:n,children:i})=>s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Z.div,{...aj,className:"bg-primary px-4 pt-4 pb-6 text-white  ",children:s.jsxs("div",{className:"max-w-2xl mx-auto",children:[s.jsx("div",{className:"[&_button]:text-white [&_svg]:text-white",children:s.jsx(Ct,{})}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("h1",{className:"text-2xl font-bold mt-2",children:e}),t&&s.jsx("p",{className:"text-white/80 text-sm mt-1",children:t})]}),n&&s.jsx(Z.img,{src:n,alt:"",initial:{opacity:0,scale:.8,rotate:-4}
284,animate:{opacity:1,scale:1,rotate:0},transition:{delay:.2,type:"spring"},className:"w-24 h-24 object-cover rounded-2xl ring-2 ring-white/30 shrink-0"})]})]})}),s.jsx("div",{className:"max-w-2xl mx-auto px-4 pt-5 pb-28",children:s.jsx(Z.div,{...hs(0),children:i})})]}),_p=({className:e=""})=>s.jsx("div",{className:`bg-gray-200 animate-pulse rounded ${e}`}),em=({rows:e=3})=>s.jsx("div",{className:"space-y-3","aria-busy":"true","aria-label":"Chargement",children:Array.from({length:e}).map((t,r)=>s.jsx("div",{className:"bg-white border border-border rounded-2xl p-4",children:s.jsxs("div",{className:"flex gap-3",children:[s.jsx(_p,{className:"w-16 h-16 rounded-xl shrink-0"}),s.jsxs("div",{className:"flex-1 space-y-2 pt-1",children:[s.jsx(_p,{className:"h-4 w-2/3"}),s.jsx(_p,{className:"h-3 w-1/3"}),s.jsx(_p,{className:"h-2 w-full mt-3"})]})]})},r))}),dd=({label:e,value:t,hint:r,tone:n="default",index:i=0})=>{const a={default:"bg-white border-border text-gray-900",green:"bg-green-50 border-border text-green-900",amber:"bg-amber-50 border-border text-amber-900"};return s.jsxs(Z.div,{...hs(i),className:`border rounded-2xl p-3 text-center ${a[n]}`,children:[s.jsx("p",{className:"text-xl font-bold leading-tight",children:t}),s.jsx("p",{className:"text-[11px] opacity-70 leading-tight mt-0.5",children:e}),r&&s.jsx("p",{className:"text-[10px] opacity-60 mt-0.5",children:r})]})},L4e=({total:e,completed:t,awaitingDay:r})=>s.jsx("div",{className:"flex items-center gap-1.5",role:"list","aria-label":"Progression des journées",children:Array.from({length:e},(n,i)=>{const a=i+1,o=a<=t,l=a===r;return s.jsx("span",{role:"listitem","aria-label":`Jour ${a} ${o?"validé":l?"à vérifier":"à venir"}`,className:`h-1.5 flex-1 rounded-full ${o?"bg-green-500":l?"bg-amber-400":"bg-gray-200"}`},a)})}),CC=e=>{if(!e)return"";const t=new Date(e),r=new Date,n=o=>new Date(o.getFullYear(),o.getMonth(),o.getDate()).getTime(),i=Math.round((n(t)-n(r))/864e5),a=t.toLocaleTimeString("fr-FR",{hour:"2-digit",minute:"2-digit"});return i===0?`aujourd'hui ${a}`:i===1?`demain ${a}`:i<0?t.toLocaleDateString("fr-FR",{day:"numeric",month:"short"}):i<=6?`dans ${i} jours`:t.toLocaleDateString("fr-FR",{day:"numeric",month:"short"})};function R4e(){const e=lt(),{roles:t,isResolved:r}=fy(),n=[{held:t.isAnnonceur,title:"annonceur",heldLabel:"Mon espace annonceur",newLabel:"Devenir annonceur",blurb:"Faites voir votre produit par des milliers de personnes. Vous ne payez que les vues uniques ; les rediffusions des jours 2 et 3 sont offertes.",icon:s.jsx(L,{icon:Pc,size:22}),className:"bg-primary",to:t.isAnnonceur?"/ads-network/annonceur":"/ads-network/annonceur/onboarding"},{held:t.isDiffuseur,title:"diffuseur",heldLabel:"Mon espace diffuseur",newLabel:"Devenir diffuseur",blurb:"Publiez les campagnes sur votre statut WhatsApp pendant 3 jours et gagnez selon le nombre de personnes qui les ont vues.",icon:s.jsx(L,{icon:tu,size:20}),className:"bg-success",to:t.isDiffuseur?"/ads-network/diffuseur":"/ads-network/diffuseur/onboarding"}];return s.jsxs(o4,{title:"SBC Ads Network",subtitle:"Les annonceurs financent des campagnes, les diffuseurs les publient sur WhatsApp et sont payés pour les vues vérifiées.",illustration:ij,children:[r?s.jsx("div",{className:"space-y-4",children:n.map((i,a)=>s.jsxs(Z.button,{onClick:()=>e(i.to),...hs(a),whileTap:{scale:.98},className:`w-full text-left text-white rounded-2xl p-5 ${i.className}`,children:[s.jsxs("div",{className:"flex items-center gap-3",children:[i.icon,s.jsx("span",{className:"font-semibold text-lg",children:i.held?i.heldLabel:i.newLabel}),i.held&&s.jsxs("span",{className:"ml-auto flex items-center gap-1 text-xs bg-white/20 rounded-full px-2 py-1",children:[s.jsx(L,{icon:Ur,size:10})," Actif"]})]}),s.jsx("p",{className:"text-sm text-white/85 mt-2",children:i.blurb}),s.jsxs("span",{className:"inline-flex items-center gap-2 text-sm mt-3 font-medium",children:[i.held?"Ouvrir":"Commencer"," ",s.jsx(L,{icon:Mn,size:12})]})]},i.title))}):s.jsx(em,{rows:2}),s.jsxs("div",{className:"bg-white border border-border rounded-2xl p-4 mt-5 text-sm text-gray-600",children:[s.jsx("p",{className:"font-medium text-gray-900 mb-1",children:"Vous pouvez tenir les deux rôles."}),s.jsx("p",{children:"Rien n'empêche d'être annonceur et diffuseur avec le même compte. Chaque rôle a son propre espace et ses propres gains."})]})]})}const ZW=({src:e,alt:t})=>s.jsx(Z.img,{src:e,alt:t,"aria-hidden":"true",width:512,height:512,className:"w-full max-w-[260px] mx-auto",initial:{opacity:0,scale:.96}
284,animate:{opacity:1,scale:1},transition:{duration:.3}}),va=({index:e,title:t,children:r,accent:n="blue"})=>s.jsxs(Z.div,{...hs(e-1,.2),className:"flex gap-3 bg-white border border-border rounded-2xl p-4",children:[s.jsx("span",{className:`shrink-0 w-8 h-8 rounded-full grid place-items-center text-sm font-bold text-white ${n==="green"?"bg-green-600":"bg-primary"}`,children:e}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("p",{className:"font-semibold text-gray-900",children:t}),s.jsx("p",{className:"text-sm text-gray-600 mt-1",children:r})]})]}),_4e=({children:e})=>s.jsx("div",{className:"bg-amber-50 border border-accent rounded-2xl p-4 text-sm text-amber-900",children:e}),I4e="/assets/ads-diffuseur-C8aMRf0j.jpg",$4e={country:"Pays",city:"Ville",sex:"Sexe",birthDate:"Date de naissance"};function z4e(){const e=lt(),{roles:t,isResolved:r}=fy(),[n,i]=C.useState(""),[a,o]=C.useState(!1),[l,c]=C.useState(null),{data:u,isLoading:f}=hr({queryKey:["ads-diffuseur-eligibility"],queryFn:async()=>{var p;return(p=(await X.getDiffuseurEligibility()).body)==null?void 0:p.data}}),x=async()=>{var p;const m=Number(n);if(!Number.isFinite(m)||m<=0){c("Indiquez une moyenne de vues valide.");return}o(!0),c(null);try{const y=await X.enrollAsDiffuseur(m);if(!y.isSuccessByStatusCode){c(((p=y.body)==null?void 0:p.message)||"L'inscription a échoué.");return}e("/ads-network/diffuseur")}catch(y){c(y instanceof Error?y.message:"L'inscription a échoué.")}finally{o(!1)}};return r&&(t.isDiffuseur||u!=null&&u.hasProfile)?s.jsx(wl,{to:"/ads-network/diffuseur",replace:!0}):r?s.jsx("div",{className:"min-h-screen bg-white p-4 pb-24",children:s.jsxs("div",{className:"max-w-2xl mx-auto",children:[s.jsx(ZW,{src:I4e,alt:""}),s.jsx("h1",{className:"text-2xl font-bold text-gray-900 text-center",children:"Devenir diffuseur"}),s.jsx("p",{className:"text-gray-600 mt-2 text-center",children:"Publiez sur votre statut WhatsApp. Soyez payé selon les vues réelles."}),s.jsx("div",{className:"grid grid-cols-3 gap-2 mt-5 text-center",children:[{value:"1 jour",label:"pour la campagne test"},{value:"3 jours",label:"par campagne payée"},{value:"24 h",label:"pour le jour 1"}].map((m,p)=>s.jsxs(Z.div,{...hs(p),className:"bg-green-50 border border-border rounded-xl py-3",children:[s.jsx("p",{className:"font-bold text-green-800",children:m.value}),s.jsx("p",{className:"text-[11px] text-green-700 leading-tight mt-0.5",children:m.label})]},m.label))}),s.jsx("h2",{className:"font-semibold text-gray-900 mt-6 mb-3",children:"Comment ça marche"}),s.jsxs("div",{className:"space-y-3",children:[s.jsx(va,{index:1,title:"D'abord, la campagne test : un seul jour",accent:"green",children:"Une publication, vérifiée. Elle mesure votre audience et débloque les campagnes payées."}),s.jsx(va,{index:2,title:"Une campagne payée vous est proposée",accent:"green",children:"Premier arrivé, premier servi."}),s.jsx(va,{index:3,title:"Vous publiez le jour 1 sous 24 h",accent:"green",children:"Puis les jours 2 et 3, un par jour, avec 3 jours de report si besoin."}),s.jsx(va,{index:4,title:"Vous vérifiez chaque publication",accent:"green",children:"Connectez WhatsApp pour que vos vues comptent."}),s.jsx(va,{index:5,title:"Vous êtes payé",accent:"green",children:"Sur votre solde publicitaire, transférable ensuite."})]}),s.jsx("div",{className:"mt-4",children:s.jsxs(_4e,{children:[s.jsxs("p",{className:"font-medium flex items-start gap-2",children:[s.jsx(L,{icon:b3,className:"mt-0.5 shrink-0"}),"Ne modifiez jamais le lien du texte."]}),s.jsx("p",{className:"mt-1",children:"Sans lui, la journée ne peut pas être vérifiée ni payée. Vérifiez aussi votre publication dans les 24 h : un statut expiré est perdu."})]})}),f?s.jsx("div",{className:"flex justify-center py-10",children:s.jsx(L,{icon:Yt,className:"animate-spin text-primary",size:24})}):u&&!u.eligible?s.jsxs("div",{className:"bg-red-50 border border-border rounded-2xl p-4 mt-5",children:[s.jsx("h2",{className:"font-semibold text-red-900 mb-2",children:"Profil incomplet"}),s.jsx("p",{className:"text-sm text-red-800 mb-3",children:"Les annonceurs ciblent leurs campagnes sur ces informations. Sans elles, aucune campagne ne peut vous être proposée."}),s.jsx("ul",{className:"text-sm text-red-800 space-y-1 mb-4",children:u.missingFields.map(m=>s.jsxs("li",{children:["• ",$4e[m]??m]},m))}),s.jsx("button",{onClick:()=>e("/modifier-le-profil"),className:"w-full bg-red-600 text-white rounded-xl py-3 font-medium",children:"Compléter mon profil"})]}):s.jsxs("div",{className:"bg-white border border-border rounded-2xl p-4 mt-5",children:[s.jsxs("div",{className:"flex items-center gap-2 text-green-700 text-sm mb-4",children:[s.jsx(L,{icon:Sa}),s.jsx("span",{children:"Votre profil est complet."})]}),s.jsx("label",{className:"block text-sm font-medium text-gray-800 mb
284-1",children:"Combien de personnes voient votre statut WhatsApp en moyenne ?"}),s.jsx("p",{className:"text-xs text-gray-500 mb-2",children:"Cette estimation sert à vous proposer des campagnes adaptées. Elle sera remplacée par votre moyenne réelle après votre première campagne, alors inutile de la gonfler : une campagne acceptée puis non tenue fait baisser votre score de confiance."}),s.jsx("input",{type:"number",inputMode:"numeric",min:1,value:n,onChange:m=>i(m.target.value),placeholder:"ex. 150",className:"w-full border border-border rounded-xl px-4 py-3 focus:ring-2 focus:ring-primary focus:outline-none"}),l&&s.jsx("p",{className:"text-sm text-red-600 mt-2",children:l}),s.jsxs("button",{onClick:x,disabled:a,className:"w-full bg-green-600 text-white rounded-xl py-3 font-medium mt-4 disabled:bg-gray-400 flex items-center justify-center gap-2",children:[a&&s.jsx(L,{icon:Yt,className:"animate-spin"}),"Devenir diffuseur"]})]})]})}):s.jsx("div",{className:"min-h-screen bg-gray-50 p-4 pt-8",children:s.jsx("div",{className:"max-w-2xl mx-auto",children:s.jsx(em,{rows:2})})})}var JW={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},xL=ie.createContext&&ie.createContext(JW),V4e=["attr","size","title"];function U4e(e,t){if(e==null)return{};var r=q4e(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function q4e(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 V1(){return V1=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},V1.apply(this,arguments)}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 U1(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){W4e(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 W4e(e,t,r){return t=H4e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function H4e(e){var t=G4e(e,"string");return typeof t=="symbol"?t:t+""}function G4e(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eH(e){return e&&e.map((t,r)=>ie.createElement(t.tag,U1({key:r},t.attr),eH(t.child)))}function Qy(e){return t=>ie.createElement(K4e,V1({attr:U1({},e.attr)},t),eH(e.child))}function K4e(e){var t=r=>{var{attr:n,size:i,title:a}=e,o=U4e(e,V4e),l=i||r.size||"1em",c;return r.className&&(c=r.className),e.className&&(c=(c?c+" ":"")+e.className),ie.createElement("svg",V1({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,o,{className:c,style:U1(U1({color:e.color||r.color},r.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),a&&ie.createElement("title",null,a),e.children)};return xL!==void 0?ie.createElement(xL.Consumer,null,r=>t(r)):t(JW)}function X4e(e){return Qy({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"},child:[]}]})(e)}function Y4e(e){return Qy({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256,8C119,8,8,119,8,256S119,504,256,504,504,393,504,256,393,8,256,8Zm92.49,313h0l-20,25a16,16,0,0,1-22.49,2.5h0l-67-49.72a40,40,0,0,1-15-31.23V112a16,16,0,0,1,16-16h32a16,16,0,0,1,16,16V256l58,42.5A16,16,0,0,1,348.49,321Z"},child:[]}]})(e)}function hL(e){return Qy({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M304 48c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48 48 21.49 48 48zm-48 368c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm208-208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zM96 256c0-26.51-21.49-48-48-48S0 229.49 0 256s21.49 48 48 48 48-21.49 48-48zm12.922 99.078c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.491-48-48-48zm294.156 0c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.49-48-48-48zM108.922 60.922c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.491-48-48-48z"},child:[]}]})(e)}function tH(e){return Qy({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M336.2 64H47.8C21.4 64 0 85.4 0 111.8v288.4C0 426.6 21.4 448 47.8 448h288.4c26.4 0 47.8-21.4 47.8-47.8V111.8c0-26.4-21.4-47.8-47.8-47.8zm189.4 37.7L416 177.3v157.4l109.6 75.5c21.2 14.6 50.4-.3 50.4-25.8V127.5c0-25.4-29.1-40.4-50.4-25.8z"},child:[]}]})(e)}const Q4e="/assets/ads-verify-p5TmDBNJ.jpg",rH="/assets/ads-empty-BPPbJD9d.jpg",$u=e=>{var t,r,n;return((t=e.schedule)==null?void 0:t.totalDays)??((r=e.days)==null?void 0:r.length)??((n=e.campaign)!=null&&n.isTestCampaign?1:3)},wC=e=>`${e} jour${e>1?"s":""}`,Ts=e=>
284`${Math.round(e).toLocaleString("fr-FR")} F`;function Z4e(){var oe,he,Q,ue,de,me,Le,Ne,ye;const{roles:e,isResolved:t}=fy(),{user:r}=Gt(),[n,i]=C.useState(null),[a,o]=C.useState(null),[l,c]=C.useState(null),[u,f]=C.useState(null),[x,m]=C.useState(null),[p,y]=C.useState(!1),[v,b]=C.useState(!1),[E,N]=C.useState(""),[j,A]=C.useState("wallet"),{data:w,isLoading:S,refetch:B}=hr({queryKey:["ads-diffuseur-profile"],queryFn:async()=>{var Ae;const ee=await X.getMyDiffuseurProfile();return ee.isSuccessByStatusCode?(Ae=ee.body)==null?void 0:Ae.data:null},retry:!1}),{data:D,isLoading:P,refetch:O}=hr({queryKey:["ads-participations"],queryFn:async()=>{var Ae;return((Ae=(await X.getMyParticipations({limit:50})).body)==null?void 0:Ae.data)??[]}}),{data:M,refetch:I}=hr({queryKey:["ads-balance"],queryFn:async()=>{var Ae;return(Ae=(await X.getAdvertisingBalance()).body)==null?void 0:Ae.data}}),{data:V,fetchNextPage:W,hasNextPage:_,isFetchingNextPage:z,refetch:R}=jf({queryKey:["ads-wallet-history"],initialPageParam:1,queryFn:async({pageParam:ee})=>{const[Ae,De]=await Promise.all([X.getTransactionHistory({type:"advertising_earnings",limit:10,page:ee,includeActivation:"true"}),X.getTransactionHistory({type:"advertising_transfer_out",limit:10,page:ee,includeActivation:"true"})]),we=Te=>{var Se;return Array.isArray((Se=Te.body)==null?void 0:Se.transactions)?Te.body.transactions:[]};return{rows:[...we(Ae),...we(De)].sort((Te,Se)=>new Date(Se.createdAt).getTime()-new Date(Te.createdAt).getTime()),exhausted:we(Ae).length<10&&we(De).length<10}},getNextPageParam:(ee,Ae)=>ee.exhausted?void 0:Ae.length+1}),q=(V==null?void 0:V.pages.flatMap(ee=>ee.rows))??[],G=C.useRef(null);C.useEffect(()=>{const ee=G.current;if(!ee)return;const Ae=new IntersectionObserver(De=>{De[0].isIntersecting&&_&&!z&&W()});return Ae.observe(ee),()=>Ae.disconnect()},[_,z,W,j]);const K=C.useCallback(()=>{O(),B(),I(),R()},[O,B,I,R]);if(t&&!e.isDiffuseur&&!S&&!w)return s.jsx(wl,{to:"/ads-network/diffuseur/onboarding",replace:!0});const $=async()=>{var Ae;const ee=Number(E);b(!0),o(null);try{const De=await X.transferAdvertisingBalance(ee);if(!De.isSuccessByStatusCode){o({type:"err",text:((Ae=De.body)==null?void 0:Ae.message)||"Le transfert a échoué."});return}o({type:"ok",text:`${Ts(ee)} transférés vers votre solde principal.`}),y(!1),K()}finally{b(!1)}},H=async ee=>{var Ae;i(ee._id),o(null);try{const De=await X.acceptParticipation(ee._id);if(!De.isSuccessByStatusCode){o({type:"err",text:((Ae=De.body)==null?void 0:Ae.message)||"Cette offre n'est plus disponible."}),K();return}o({type:"ok",text:"Campagne acceptée. Publiez le jour 1 dans les 24 heures."}),K()}finally{i(null)}},te=async ee=>{i(ee._id);try{await X.declineParticipation(ee._id),K()}finally{i(null)}},ne=(D??[]).filter(ee=>ee.status==="offered"),Y=(D??[]).filter(ee=>ee.status==="in_progress"),J=(D??[]).filter(ee=>ee.status==="completed"||ee.status==="forfeited");return s.jsxs("div",{className:"min-h-screen bg-white p-4 pb-24",children:[s.jsx(Ct,{}),s.jsxs("div",{className:"max-w-2xl mx-auto",children:[s.jsx("h1",{className:"text-2xl font-bold text-gray-900 mt-2",children:"Espace diffuseur"}),a&&s.jsx("div",{className:`rounded-xl p-3 mt-3 text-sm ${a.type==="ok"?"bg-green-50 text-green-800 border border-border":"bg-red-50 text-red-800 border border-border"}`,children:a.text}),s.jsxs(Z.div,{...aj,className:"bg-primary text-white rounded-2xl p-5 mt-4",children:[s.jsxs("div",{className:"flex items-center gap-2 text-blue-100 text-sm",children:[s.jsx(L,{icon:Ba})," Solde publicitaire"]}),s.jsx("p",{className:"text-3xl font-bold mt-1",children:Ts((M==null?void 0:M.advertisingBalance)??0)}),s.jsxs("p",{className:"text-xs text-blue-100 mt-1",children:["Transfert possible dès ",Ts((M==null?void 0:M.minTransferAmount)??0),"."]}),s.jsx(Z.button,{whileTap:{scale:.97},onClick:()=>{N(String(Math.floor((M==null?void 0:M.advertisingBalance)??0))),y(!0)},className:"w-full bg-white text-primary rounded-xl py-2.5 text-sm font-semibold mt-3",children:"Transférer vers mon solde principal"}),w&&s.jsxs("div",{className:"mt-3 pt-3 border-t border-white/20",children:[s.jsx("div",{className:"flex items-center gap-2 mb-2",children:s.jsxs("span",{className:`inline-flex items-center gap-1 text-xs font-medium px-2 py-1 rounded-full ${(oe=w.verification)!=null&&oe.verified?"bg-white text-green-700":"bg-white/20 text-white"}`,children:[(he=w.verification)!=null&&he.verified?s.jsx(L,{icon:Sa,size:11}):s.jsx(L,{icon:j$,size:11}),((Q=w.verification)==null?void 0:Q.label)??"Statut inconnu"]})}),!((ue=w.verification)!=null&&ue.verified)&&s.jsx("p",{className:"text-xs text-blue-100 mb-2",children:"Terminez la campagne test pour débloquer les campagnes rémunérées."})]})]}),w&&s.jsxs("div",{className:"grid grid-cols-3 gap-2 mt-3",children:[s.jsx(dd,{index:0,label:"Campagnes terminées",value:w.campaignsCompleted??0}),s.jsx(dd,{index:1,label:"Vues par publication",value:w.effectiveAverageViews??0,hint:w.hasCompletedTestCampaign?"mesurée":"déclarée",tone:w.hasCompletedTestCampaign?"green":"amber"}),s.jsx(dd,{index:2,label:"Score de confiance",value:w.trustScore??0})]}),(w==null?void 0:w.referral)&&s.jsx(Z.div,{...hs(3),className:`rounded-2xl p-4 mt-3 border ${w.referral.tier==="unlocked"?"bg-green-50 border-border":w.referral.suspended?"bg-amber-50 border-border":"bg-white border-border "}`,children:w.referral.tier==="unlocked"?s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"font-semibold text-green-900",children:"💎 Commission parrainage active"}),s.jsxs("p",{className:"text-sm text-green-800 mt-1",children:["Vous gagnez ",Math.round((w.referral.commissionRate??.2)*100),"% de la marge SBC sur chaque campagne lancée par vos filleuls directs. Les gains arrivent automatiquement dans votre solde publicitaire."]})]}):w.referral.suspended?s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"font-semibold text-amber-900",children:"⚠️ Commission parrainage suspendue"}),s.jsxs("p",{className:"text-sm text-amber-800 mt-1",children:["Terminez une campagne pour la réactiver — inutile de refaire les ",w.referral.campaignsToUnlock,"."]})]}):s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"font-semibold text-gray-900",children:"💎 Programme parrainage"}),s.jsxs("p",{className:"text-sm text-gray-600 mt-1",children:["Atteignez ",w.referral.campaignsToUnlock," campagnes terminées et gagnez"," ",s.jsxs("strong",{children:[Math.round((w.referral.commissionRate??.2)*100),"% de la marge SBC"]})," ","sur chaque campagne lancée par vos filleuls directs — à vie."]}),s.jsxs("div",{className:"flex items-center gap-2 mt-3",children:[s.jsx("div",{className:"h-2 bg-gray-100 rounded-full overflow-hidden flex-1",children:s.jsx(Z.div,{className:"bg-primary h-full rounded-full",initial:{width:0},animate:{width:`${Math.min(100,w.referral.campaignsCompleted/Math.max(1,w.referral.campaignsToUnlock)*100)}%`},transition:{delay:.4,duration:.8,ease:"easeOut"}})}),s.jsxs("span",{className:"text-[11px] font-semibold text-gray-600 tabular-nums",children:[w.referral.campaignsCompleted,"/",w.referral.campaignsToUnlock]})]})]})}),P?s.jsx("div",{className:"mt-6",children:s.jsx(em,{rows:2})}):s.jsxs(s.Fragment,{children:[ne.length>0&&s.jsxs("section",{className:"mt-6",children:[s.jsx("h2",{className:"font-semibold text-gray-900 mb-1",children:"Campagnes proposées"}),s.jsx("p",{className:"text-xs text-gray-500 mb-3",children:ne.some(ee=>{var Ae;return(Ae=ee.campaign)==null?void 0:Ae.isTestCampaign})?"La campagne test mesure votre audience : elle est obligatoire et reste proposée tant qu'elle n'est pas terminée.":"Proposées à plusieurs diffuseurs. Les premiers à accepter les obtiennent."}),s.jsx("div",{className:"space-y-3",children:ne.map((ee,Ae)=>{var De,we,je;return s.jsxs(Z.div,{...hs(Ae),className:"border border-border rounded-2xl p-4",children:[s.jsxs("div",{className:"flex gap-3 cursor-pointer",onClick:()=>m(ee),role:"button","aria-label":"Voir les détails de la campagne",children:[ee.campaign&&s.jsx("img",{src:X.generateThumbnailUrl(ee.campaign.mediaFileId,160),alt:ee.campaign.title,loading:"lazy",decoding:"async",className:"w-20 h-20 object-cover rounded-xl bg-gray-100 shrink-0"}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("p",{className:"font-medium text-gray-900",children:((De=ee.campaign)==null?void 0:De.title)??"Campagne"}),((we=ee.campaign)==null?void 0:we.description)&&s.jsx("p",{className:"text-sm text-gray-600 line-clamp-2",children:ee.campaign.description}),s.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:[wC($u(ee))," de publication · environ ",ee.expectedViews??(w==null?void 0:w.effectiveAverageViews)??0," vues"]}
284),s.jsx("p",{className:"text-xs text-primary font-medium mt-1",children:"Voir les détails →"})]})]}),s.jsxs("div",{className:"flex gap-2 mt-3",children:[s.jsx("button",{onClick:()=>H(ee),disabled:n===ee._id,className:"flex-1 bg-green-600 text-white rounded-xl py-2.5 text-sm font-medium disabled:bg-gray-400",children:n===ee._id?"Traitement…":"Accepter"}),!((je=ee.campaign)!=null&&je.isTestCampaign)&&s.jsx("button",{onClick:()=>te(ee),disabled:n===ee._id,className:"px-4 bg-gray-100 text-gray-700 rounded-xl py-2.5 text-sm",children:"Refuser"})]})]},ee._id)})})]}),Y.length>0&&s.jsxs("section",{className:"mt-6",children:[s.jsx("h2",{className:"font-semibold text-gray-900 mb-3",children:"Campagne en cours"}),s.jsx("div",{className:"space-y-3",children:Y.map((ee,Ae)=>{var Te,Se,He,Ue,rt,wt;const De=(Te=ee.schedule)==null?void 0:Te.currentDay,we=((Se=ee.schedule)==null?void 0:Se.canPostNow)===!0,je=(He=ee.schedule)==null?void 0:He.awaitingVerification;return s.jsxs(Z.div,{...hs(Ae),className:"border border-border rounded-2xl p-4",children:[ee.campaign&&s.jsx("img",{src:X.generateThumbnailUrl(ee.campaign.mediaFileId,640),alt:"",loading:"lazy",decoding:"async",className:"w-full h-32 rounded-xl object-cover bg-gray-100 mb-3"}),s.jsx("p",{className:"font-medium text-gray-900",children:((Ue=ee.campaign)==null?void 0:Ue.title)??"Campagne"}),s.jsxs("div",{className:"mt-2",children:[s.jsx(L4e,{total:$u(ee),completed:((rt=ee.schedule)==null?void 0:rt.daysCompleted)??0,awaitingDay:je==null?void 0:je.day}),s.jsxs("div",{className:"flex items-center justify-between text-xs mt-1.5",children:[s.jsx("span",{className:je?"text-amber-700 font-medium":"text-gray-500",children:je?`Jour ${je.day} à vérifier`:!we&&(De!=null&&De.windowOpensAt)?`Jour ${De.day} · ${CC(De.windowOpensAt)}`:`Jour ${(De==null?void 0:De.day)??"—"} sur ${$u(ee)}`}),s.jsxs("span",{className:"text-gray-400",children:["Fin ",CC((wt=ee.schedule)==null?void 0:wt.completionDeadline)]})]})]}),s.jsxs("div",{className:"flex flex-col gap-2 mt-3",children:[we&&!je&&s.jsxs("button",{onClick:()=>c(ee),className:"w-full bg-green-600 text-white rounded-xl py-2.5 text-sm font-medium flex items-center justify-center gap-2",children:[s.jsx(L,{icon:tu})," Publier le jour ",De==null?void 0:De.day]}),!we&&!je&&s.jsx("button",{onClick:()=>f(ee),className:"w-full border border-border text-gray-700 rounded-xl py-2.5 text-sm font-medium",children:"Revérifier mes publications"}),je&&s.jsxs(s.Fragment,{children:[s.jsxs("button",{onClick:()=>f(ee),className:"w-full bg-primary text-white rounded-xl py-2.5 text-sm font-medium flex items-center justify-center gap-2",children:[s.jsx(L,{icon:S$})," Vérifier le jour ",je.day]}),s.jsxs("button",{onClick:async()=>{var Ft;i(ee._id);try{const xt=await X.unmarkParticipationPosted(ee._id);if(!xt.isSuccessByStatusCode){o({type:"err",text:((Ft=xt.body)==null?void 0:Ft.message)||"L'annulation a échoué."});return}o({type:"ok",text:`Jour ${je.day} annulé — publiez-le quand vous êtes prêt.`}),K()}finally{i(null)}},disabled:n===ee._id,className:"w-full text-xs text-gray-500 underline underline-offset-2 py-1",children:["Je n'ai pas encore publié — annuler le jour ",je.day]})]}),s.jsxs("p",{className:"text-xs text-gray-500",children:[ee.totalViews," vues · ",Ts(ee.totalEarned)]})]})]},ee._id)})})]}),ne.length===0&&Y.length===0&&s.jsxs("div",{className:"text-center text-gray-500 py-8",children:[s.jsx("img",{src:rH,alt:"","aria-hidden":"true",className:"w-44 mx-auto"}),s.jsx("p",{className:"font-medium text-gray-700",children:"Aucune campagne pour le moment."}),s.jsx("p",{className:"text-xs mt-2 max-w-xs mx-auto",children:"Les campagnes vous sont proposées selon votre profil et votre audience. Vous serez prévenu par email."})]}),s.jsxs("section",{className:"mt-6",children:[s.jsxs("div",{className:"flex bg-gray-100 rounded-xl p-1 mb-3",children:[s.jsx("button",{onClick:()=>A("wallet"),className:`flex-1 rounded-lg py-2 text-sm font-medium transition-colors ${j==="wallet"?"bg-white text-gray-900 ":"text-gray-500"} border border-border`,children:"Mouvements du portefeuille"}),s.jsx("button",{onClick:()=>
284A("campaigns"),className:`flex-1 rounded-lg py-2 text-sm font-medium transition-colors ${j==="campaigns"?"bg-white text-gray-900 ":"text-gray-500"} border border-border`,children:"Historique"})]}),j==="wallet"?q.length===0?s.jsx("p",{className:"text-sm text-gray-500 py-4 text-center",children:"Aucun mouvement pour le moment — vos gains crédités et transferts apparaîtront ici."}):s.jsxs("div",{className:"space-y-2",children:[q.map((ee,Ae)=>{const De=ee.type==="advertising_earnings",we=De&&/commission parrainage/i.test(ee.description??"");return s.jsxs(Z.div,{...hs(Math.min(Ae,6),.02),className:"flex items-center gap-3 border border-border rounded-xl p-3 text-sm",children:[s.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center shrink-0 ${De?"bg-green-100 text-green-700":"bg-blue-100 text-primary"}`,children:De?"↓":"↑"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-gray-900 truncate",children:we?"💎 Commission parrainage":De?"Gains de campagne":"Transfert vers solde principal"}),s.jsx("p",{className:"text-xs text-gray-500",children:CC(ee.createdAt)})]}),s.jsxs("p",{className:`font-semibold shrink-0 ${De?"text-green-700":"text-gray-900"}`,children:[De?"+":"−",Ts(Math.abs(ee.amount))]})]},ee.transactionId??ee._id??Ae)}),s.jsx("div",{ref:G,className:"h-1"}),z&&s.jsx("div",{className:"flex justify-center py-3",children:s.jsx(L,{icon:Yt,className:"animate-spin text-primary"})})]}):J.length===0?s.jsx("p",{className:"text-sm text-gray-500 py-4 text-center",children:"Aucune campagne terminée pour le moment."}):s.jsx("div",{className:"space-y-2",children:J.map(ee=>{var Ae;return s.jsxs("div",{className:"flex items-center justify-between border border-border rounded-xl p-3 text-sm",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-gray-900",children:((Ae=ee.campaign)==null?void 0:Ae.title)??"Campagne"}),s.jsx("p",{className:"text-xs text-gray-500",children:ee.status==="completed"?`${ee.totalViews} vues`:"Non terminée"})]}),s.jsx("span",{className:ee.status==="completed"?"text-green-700 font-medium":"text-gray-400",children:ee.status==="completed"?Ts(ee.totalEarned):"—"})]},ee._id)})})]})]})]}),s.jsxs(It,{children:[p&&s.jsx(Z.div,{className:"fixed inset-0 bg-black/60 z-50 flex items-center justify-center p-4",initial:{opacity:0}
284,animate:{opacity:1},exit:{opacity:0},onClick:()=>!v&&y(!1),children:s.jsx(Z.div,{className:"bg-white w-full max-w-md rounded-3xl p-5",initial:{scale:.92,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.92,opacity:0},transition:{type:"spring",damping:24,stiffness:320},onClick:ee=>ee.stopPropagation(),children:(()=>{const ee=(M==null?void 0:M.advertisingBalance)??0,Ae=(M==null?void 0:M.minTransferAmount)??0,De=Number(E),we=Number.isFinite(De)&&De>ee,je=Number.isFinite(De)&&De>0&&De<Ae,Te=Number.isFinite(De)&&De>0&&!we&&!je;return s.jsxs(s.Fragment,{children:[s.jsx("h2",{className:"font-bold text-lg text-gray-900",children:"Transférer vers mon solde principal"}),s.jsxs("p",{className:"text-sm text-gray-600 mt-1",children:["Disponible : ",s.jsx("strong",{children:Ts(ee)})," · minimum ",Ts(Ae)]}),s.jsx("label",{className:"text-sm font-semibold text-gray-800 mt-4 block",children:"Montant à transférer"}),s.jsx("input",{type:"number",inputMode:"numeric",min:"1",value:E,onChange:Se=>N(Se.target.value),className:`w-full rounded-xl border px-3 py-3 text-gray-900 text-center font-bold mt-2 ${we?"border-danger bg-red-50":je?"border-accent bg-amber-50":"border-border"}`,placeholder:"Montant en F"}),we&&s.jsxs("p",{className:"text-xs text-red-700 bg-red-50 border border-border rounded-lg p-2 mt-2",children:["⚠️ Montant supérieur à votre solde publicitaire (",Ts(ee)," disponibles)."]}),!we&&je&&s.jsxs("p",{className:"text-xs text-amber-800 bg-amber-50 border border-border rounded-lg p-2 mt-2",children:["Le minimum est de ",Ts(Ae)," — il manque ",Ts(Math.max(0,Ae-
284De)),".",ee<Ae&&" Terminez d'autres campagnes pour compléter vos gains."]}),s.jsxs("div",{className:"flex gap-2 mt-5",children:[s.jsx(Z.button,{whileTap:{scale:.97},onClick:()=>y(!1),disabled:v,className:"flex-1 border border-border text-gray-700 rounded-xl py-3 text-sm font-medium",children:"Annuler"}),s.jsx(Z.button,{whileTap:{scale:.97},onClick:$,disabled:v||!Te,className:"flex-1 bg-primary text-white rounded-xl py-3 text-sm font-medium disabled:bg-gray-300",children:v?"Transfert…":"Confirmer le transfert"})]})]})})()})}),x&&s.jsx(Z.div,{className:"fixed inset-0 bg-black/60 z-50 flex items-end sm:items-center justify-center p-0 sm:p-4",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>m(null),children:s.jsxs(Z.div,{className:"bg-white w-full sm:max-w-lg rounded-t-3xl sm:rounded-3xl max-h-[92vh] overflow-auto",initial:{y:60},animate:{y:0},exit:{y:60},transition:{type:"spring",damping:26,stiffness:300},onClick:ee=>ee.stopPropagation(),children:[s.jsx("div",{className:"w-10 h-1 bg-gray-200 rounded-full mx-auto mt-3 sm:hidden"}),x.campaign&&(x.campaign.mediaType==="video"?s.jsx("video",{src:X.generateSettingsFileUrl(x.campaign.mediaFileId),controls:!0,playsInline:!0,className:"w-full max-h-72 object-contain bg-black sm:rounded-t-3xl mt-2"}):s.jsx("img",{src:X.generateSettingsFileUrl(x.campaign.mediaFileId),alt:x.campaign.title,className:"w-full max-h-72 object-contain bg-gray-50 sm:rounded-t-3xl mt-2"})),s.jsxs("div",{className:"p-5",children:[s.jsx("h2",{className:"font-bold text-lg text-gray-900",children:((de=x.campaign)==null?void 0:de.title)??"Campagne"}),((me=x.campaign)==null?void 0:me.description)&&s.jsx("p",{className:"text-sm text-gray-600 mt-2 whitespace-pre-line",children:x.campaign.description}),s.jsxs("div",{className:"grid grid-cols-3 gap-2 mt-4",children:[s.jsxs("div",{className:"bg-gray-50 border border-border rounded-xl p-3 text-center",children:[s.jsx("p",{className:"text-lg font-bold text-gray-900",children:"3"}),s.jsx("p",{className:"text-[11px] text-gray-500",children:"jours de publication"})]}),s.jsxs("div",{className:"bg-blue-50 border border-border rounded-xl p-3 text-center",children:[s.jsxs("p",{className:"text-lg font-bold text-gray-900",children:["~",x.expectedViews??(w==null?void 0:w.effectiveAverageViews)??0]}),s.jsx("p",{className:"text-[11px] text-gray-500",children:"vues estimées"})]}),s.jsxs("div",{className:"bg-green-50 border border-border rounded-xl p-3 text-center",children:[s.jsx("p",{className:"text-lg font-bold text-green-700",children:x.ratePerView?`~${Ts((x.expectedViews??(w==null?void 0:w.effectiveAverageViews)??0)*x.ratePerView)}`:"—"}),s.jsx("p",{className:"text-[11px] text-gray-500",children:"gain estimé jour 1"})]})]}),((Le=x.campaign)==null?void 0:Le.suggestedCaption)&&s.jsxs("div",{className:"bg-gray-50 border border-border rounded-xl p-3 mt-3",children:[s.jsx("p",{className:"text-[11px] text-gray-500 mb-1",children:"Légende suggérée"}),s.jsx("p",{className:"text-sm text-gray-700 whitespace-pre-line",children:x.campaign.suggestedCaption})]}),s.jsx("p",{className:"text-xs text-gray-500 mt-3",children:(Ne=x.campaign)!=null&&Ne.isTestCampaign?$u(x)===1?"Campagne test obligatoire : elle ne rapporte rien, mais elle mesure votre audience réelle et débloque les campagnes rémunérées. Publiez le statut une fois, puis vérifiez la publication.":`Campagne test obligatoire : elle ne rapporte rien, mais elle mesure votre audience réelle et débloque les campagnes rémunérées. Publiez le statut ${wC($u(x))} de suite et vérifiez chaque publication.`:`En acceptant, vous vous engagez à publier le statut ${wC($u(x))} de suite, à raison d'une publication par jour, et à vérifier chaque publication.`}),s.jsxs("div",{className:"flex gap-2 mt-4",children:[s.jsx(Z.button,{whileTap:{scale:.97},onClick:async()=>{await H(x),m(null)},disabled:n===x._id,className:"flex-1 bg-green-600 text-white rounded-xl py-3 text-sm font-medium disabled:bg-gray-400",children:n===x._id?"Traitement…":"Accepter la campagne"}),!((ye=x.campaign)!=null&&ye.isTestCampaign)&&s.jsx(Z.button,{whileTap:{scale:.97},onClick:async()=>{await te(x),m(null)},disabled:n===x._id,className:"px-4 bg-gray-100 text-gray-700 rounded-xl py-3 text-sm",children:"Refuser"})]})]})]})}),l&&s.jsx(J4e,{participation:l,onClose:()=>c(null),onPosted:()=>{c(null),K()}}),u&&s.jsx(t3e,{participation:u,defaultPhone:(w==null?void 0:w.whatsappPhone)||(r==null?void 0:r.phoneNumber),onClose:()=>{f(null),K()}})]})]})}function J4e({participation:e,onClose:t,onPosted:r}){const[n,i]=C.useState(!1),[a,o]=C.useState(!1),[l,c]=C.useState(null),u=e.shareCaption??e.trackingUrl??"",f=e.campaign?X.generateSettingsFileUrl(e.campaign.mediaFileId):"",x=e.campaign?X.generateStreamedFileUrl(e.campaign.mediaFileId):"",m=e.campaign?X.generateStreamedFileUrl(e.campaign.mediaFileId,{download:!0}):"",p=async()=>{await navigator.clipboard.writeText(u),i(!0),setTimeout(()=>i(!1),2500)},y=async()=>{var b;c(null),o(!0);try{const E=await fetch(x).then(j=>j.blob()),N=new File([E],`campagne.${E.type.split("/")[1]||"jpg"}`,{type:E.type});if((b=navigator.canShare)!=null&&b.call(navigator,{files:[N]}))await navigator.share({files:[N],text:u});else if(navigator.share)await navigator.share({text:u});else{const j=document.createElement("a");j.href=URL.createObjectURL(E),j.download=N.name,j.click(),URL.revokeObjectURL(j.href),await navigator.clipboard.writeText(u),c("Image téléchargée et texte copié. Publiez-les depuis WhatsApp.")}}catch(E){(E==null?void 0:E.name)!=="AbortError"&&c("Le partage n'a pas pu s'ouvrir. Téléchargez l'image et copiez le texte.")}finally{o(!1)}},v=async()=>{var b;o(!0),c(null);
284try{const E=await X.markParticipationPosted(e._id);if(!E.isSuccessByStatusCode){c(((b=E.body)==null?void 0:b.message)||"Impossible d'enregistrer la publication.");return}r()}finally{o(!1)}};return s.jsx(Z.div,{className:"fixed inset-0 bg-black/60 z-50 flex items-end sm:items-center justify-center p-0 sm:p-4",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:s.jsxs(Z.div,{className:"bg-white w-full sm:max-w-lg rounded-t-3xl sm:rounded-3xl p-5 max-h-[92vh] overflow-auto",initial:{y:40},animate:{y:0},exit:{y:40},children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("h2",{className:"font-bold text-lg text-gray-900",children:"Publier sur votre statut"}),s.jsx("button",{onClick:t,className:"text-gray-400",children:s.jsx(L,{icon:gt})})]}),s.jsx("img",{src:ij,alt:"","aria-hidden":"true",className:"w-40 mx-auto -mt-2 mb-1"}),s.jsxs("div",{className:"bg-amber-50 border border-accent rounded-xl p-3 text-sm text-amber-900 mb-4",children:[s.jsxs("p",{className:"flex items-start gap-2 font-medium",children:[s.jsx(L,{icon:b3,className:"mt-0.5 shrink-0"}),"Ne modifiez pas le texte, et surtout pas le lien."]}),s.jsx("p",{className:"mt-1",children:"C'est ce lien qui permet de vérifier votre publication et de compter vos vues. S'il est supprimé ou modifié, la journée ne sera pas payée."})]}),f&&s.jsx("img",{src:f,alt:"Créative",className:"w-full rounded-xl bg-gray-100 mb-3"}),s.jsx("label",{className:"text-xs text-gray-500",children:"Texte à publier"}),s.jsx("div",{className:"border border-border rounded-xl p-3 text-sm text-gray-800 whitespace-pre-wrap mt-1",children:u}),s.jsx("button",{onClick:p,className:"text-sm text-primary mt-2",children:n?"Texte copié":"Copier le texte"}),l&&s.jsx("p",{className:"text-sm text-amber-700 mt-3",children:l}),s.jsxs("button",{onClick:y,disabled:a,className:"w-full bg-green-600 text-white rounded-xl py-3 font-medium mt-4 flex items-center justify-center gap-2 disabled:bg-gray-400",children:[a?s.jsx(L,{icon:Yt,className:"animate-spin"}):s.jsx(L,{icon:tu}),"Partager sur WhatsApp"]}),s.jsxs("a",{href:m,download:!0,className:"w-full border border-border text-gray-700 rounded-xl py-3 font-medium mt-2 flex items-center justify-center gap-2",children:[s.jsx(L,{icon:eu})," Télécharger l'image"]}),s.jsx("button",{onClick:v,disabled:a,className:"w-full bg-primary text-white rounded-xl py-3 font-medium mt-4 disabled:bg-gray-400",children:"J'ai publié"}),s.jsxs("p",{className:"text-xs text-gray-500 mt-2",children:["Après publication, vérifiez-la depuis SBC ",s.jsx("strong",{children:"dans les 24 heures"}),". Une fois le statut expiré, les vues de cette journée ne sont plus récupérables."]})]})})}function e3e({participation:e,onClose:t}){const[r,n]=C.useState("intro"),[i,a]=C.useState(null),[o,l]=C.useState(0),[c,u]=C.useState(!1),[f,x]=C.useState(null),[m,p]=C.useState(!0),y=C.useRef(null);C.useEffect(()=>{let j=!1;return(async()=>{var A;try{const S=(A=(await X.getManualVerifyStatus(e._id)).body)==null?void 0:A.data;if(j||!S)return;if(S.status==="pending_review"){n("submitted");return}if(S.status==="awaiting_upload"&&S.code&&S.expiresAt){const B=Math.floor((new Date(S.expiresAt).getTime()-Date.now())/1e3);B>0&&(a(S.code),l(B),n("code"))}}catch{}finally{j||p(!1)}})(),()=>{j=!0}},[e._id]),C.useEffect(()=>{if(r!=="code"||o<=0)return;const j=setTimeout(()=>l(A=>A-1),1e3);return()=>clearTimeout(j)},[r,o]);const v=r==="code"&&o<=0,b=async()=>{var j,A;u(!0),x(null);try{const w=await X.generateManualVerifyCode(e._id);if(!w.isSuccessByStatusCode){x(((j=w.body)==null?void 0:j.message)||"Impossible de générer le code.");return}const S=(A=w.body)==null?void 0:A.data;a((S==null?void 0:S.code)??null),l((S==null?void 0:S.windowSeconds)??900),n("code")}catch{x("Impossible de générer le code.")}finally{u(!1)}},E=async j=>{var w,S,B,D,P,O;const A=(w=j.target.files)==null?void 0:w[0];if(A){if(A.size>50*1024*1024){x("Vidéo trop lourde (max 50 Mo). Filmez plus court : le code puis les vues suffisent."),j.target.value="";return}u(!0),x(null),n("submitting");try{const M=await X.uploadFile(A),I=((B=(S=M.body)==null?void 0:S.data)==null?void 0:B.fileId)||((D=M.body)==null?void 0:D.fileId);if(!M.isSuccessByStatusCode||!I){x(((P=M.body)==null?void 0:P.message)||"Échec de l'envoi de la vidéo."),n("code");return}const V=await X.submitManualVerifyVideo(e._id,I);if(!V.isSuccessByStatusCode){x(((O=V.body)==null?void 0:O.message)||"Échec de l'envoi."),n("code");return}n("submitted")}catch{x("Échec de l'envoi de la vidéo."),n("code")}finally{u(!1)}}},N=`${String(Math.floor(o/60)).padStart(2,"0")}
284:${String(o%60).padStart(2,"0")}`;return r==="submitted"?s.jsxs("div",{className:"text-center py-4",children:[s.jsx(X4e,{className:"mx-auto text-green-600",size:32}),s.jsx("p",{className:"font-bold text-gray-900 mt-3",children:"Vidéo envoyée"}),s.jsx("p",{className:"text-sm text-gray-600 mt-1",children:"Votre publication sera vérifiée par l'équipe. Vous serez crédité une fois validée."}),s.jsx("button",{onClick:t,className:"w-full bg-[#115CF6] text-white rounded-xl py-3 font-medium mt-4",children:"Fermer"})]}):s.jsxs("div",{className:"mt-3",children:[s.jsxs("ol",{className:"text-sm text-gray-700 space-y-1 list-decimal pl-5 mb-3",children:[s.jsx("li",{children:"Générez le code ci-dessous."}),s.jsx("li",{children:"Lancez l'enregistrement d'écran de votre téléphone."}),s.jsx("li",{children:"Filmez le code affiché, puis ouvrez WhatsApp et montrez les vues de votre statut."}),s.jsxs("li",{children:["Arrêtez l'enregistrement et importez la vidéo ",s.jsx("strong",{children:"avant la fin du compte à rebours"}),"."]})]}),f&&s.jsx("div",{className:"bg-red-50 border border-red-200 rounded-xl p-3 text-sm text-red-800 mb-3",children:f}),m&&r==="intro"&&s.jsxs("div",{className:"flex items-center justify-center gap-2 py-3 text-sm text-gray-500",children:[s.jsx(hL,{className:"animate-spin"})," Vérification d'un code en cours…"]}),!m&&r==="intro"&&s.jsx("button",{onClick:b,disabled:c,className:"w-full bg-[#115CF6] text-white rounded-xl py-3 font-medium disabled:bg-gray-300",children:c?"Génération…":"Générer le code"}),(r==="code"||r==="submitting")&&s.jsxs("div",{children:[s.jsxs("div",{className:"rounded-2xl border-2 border-[#115CF6] bg-blue-50 p-5 text-center",children:[s.jsx("p",{className:"text-xs text-gray-600",children:"Votre code"}),s.jsx("p",{className:"text-4xl font-extrabold tracking-widest text-[#115CF6] mt-1",children:i}),s.jsxs("p",{className:`text-sm mt-2 flex items-center justify-center gap-1 ${v?"text-red-600":"text-gray-600"}`,children:[s.jsx(Y4e,{})," ",v?"Délai dépassé":`Temps restant : ${N}`]})]}),v?s.jsx("button",{onClick:b,disabled:c,className:"w-full border border-gray-200 text-gray-700 rounded-xl py-3 font-medium mt-3",children:"Générer un nouveau code"}):s.jsxs(s.Fragment,{children:[s.jsx("input",{ref:y,type:"file",accept:"video/*",className:"hidden",onChange:E}),s.jsx("button",{onClick:()=>{var j;return(j=y.current)==null?void 0:j.click()},disabled:c,className:"w-full bg-[#115CF6] text-white rounded-xl py-3 font-medium mt-3 disabled:bg-gray-300 flex items-center justify-center gap-2",children:r==="submitting"?s.jsxs(s.Fragment,{children:[s.jsx(hL,{className:"animate-spin"})," Envoi…"]}):s.jsxs(s.Fragment,{children:[s.jsx(tH,{})," Importer la vidéo"]})})]})]})]})}function t3e({participation:e,defaultPhone:t,onClose:r}){const[n,i]=C.useState(null),a=H=>H.phoneCode.replace(/\D/g,""),o=(t??"").replace(/\D/g,""),l=[...Gc].sort((H,te)=>a(te).length-a(H).length).find(H=>o.startsWith(a(H))),[c,u]=C.useState(l?a(l):"237"),[f,x]=C.useState(l?o.slice(a(l).length):o),[m,p]=C.useState("starting"),[y,v]=C.useState(null),[b,E]=C.useState(null),[N,j]=C.useState(null),[A,w]=C.useState(null),[S,B]=C.useState(!1),D=C.useRef(null),P=`ads-verify-session:${e._id}`,[O,M]=C.useState(!1),[I,V]=C.useState(null),W=3,[_,z]=C.useState(0),[R,q]=C.useState(!1),G=H=>H.replace(/\D/g,"");C.useEffect(()=>{if(!O||!n)return;let H=!1,te,ne;const Y=Date.now(),J=Q=>Q==="capacity"?"Trop de vérifications en cours en ce moment. Réessayez dans une minute.":"La connexion à WhatsApp n'a pas abouti. Réessayez, ou choisissez une autre méthode.",oe=Q=>{const ue=Date.now()-Y;Q==="link"&&ue<45e3&&_<W-1?(q(!0),p("starting"),v(null),E(null),ne=setTimeout(()=>z(me=>me+1),1500)):(q(!1),w(J(Q)))},he=async()=>{var de;if(H||!D.current)return;const Q=await X.getVerificationSession(D.current),ue=(de=Q.body)==null?void 0:de.data;if(!Q.isSuccessByStatusCode||(ue==null?void 0:ue.state)==="failed"){sessionStorage.removeItem(P),oe("link");return}if(q(!1),p((ue==null?void 0:ue.state)??"reading"),V(typeof(ue==null?void 0:ue.queuePosition)=="number"?ue.queuePosition:null),ue!=null&&ue.qr&&v(ue.qr),ue!=null&&ue.pairingCode&&E(ue.pairingCode),(ue==null?void 0:ue.state)==="done"){sessionStorage.removeItem(P),j({verdicts:ue.verdicts??[],totalViews:ue.totalViews??0,totalEarned:ue.totalEarned??0});return}te=setTimeout(he,2e3)};return(async()=>{var ue,de;const Q=await X.startVerification(e._id,{method:n,phoneNumber:n==="code"?`${c}${G(f)}`:void 0});if(!H){if(Q.statusCode===503){oe("capacity");return}if(!Q.isSuccessByStatusCode){oe("link");return}D.current=((de=(ue=Q.body)==null?void 0:ue.data)==null?void 0:de.sessionId)??null,D.current&&sessionStorage.setItem(P,D.current),he()}})(),()=>{H=!0,clearTimeout(te),clearTimeout(ne)}},[O,n,f,c,e._id,_,P]),C.useEffect(()=>{if(O)return;const H=sessionStorage.getItem(P);if(!H)return;let te=!1;return(async()=>{var J,oe,he,Q;const ne=await X.getVerificationSession(H);if(te)return;const Y=(oe=(J=ne.body)==null?void 0:J.data)==null?void 0:oe.state;ne.isSuccessByStatusCode&&Y&&Y!=="failed"&&Y!=="done"?(D.current=H,i(((Q=(he=ne.body)==null?void 0:he.data)==null?void 0:Q.method)??"code"),M(!0)):sessionStorage.removeItem(P)})(),()=>{te=!0}},[O,P]);const K=async()=>{b&&(await navigator.clipboard.writeText(b),B(!0),setTimeout(()=>B(!1),2500))},$=()=>R&&!A&&!N?s.jsxs("div",{className:"py-8 text-center",children:[s.jsx(L,{icon:Yt,className:"animate-spin mx-auto text-primary",size:28}),s.jsx("p",{className:"font-medium text-gray-900 mt-4",children:"Reconnexion à WhatsApp…"}),s.jsxs("p",{className:"text-sm text-gray-600 mt-1",children:["La connexion a été interrompue. Nouvelle tentative en cours (",_+1,"/",W,")."]}),s.jsx("p",{className:"text-xs text-gray-400 mt-3",children:"Gardez cette page ouverte."})]}):A?s.jsxs("div",{children:[s.jsx("div",{className:"bg-red-50 border border-border rounded-xl p-3 text-sm text-red-800",children:A}),s.jsx("button",{onClick:()=>{D.current&&X.cancelVerification(D.current),D.current=null,sessionStorage.removeItem(P),w(null),M(!1),i(null),v(null),E(null),z(0),q(!1)},className:"w-full border border-border text-gray-700 rounded-xl py-3 font-medium mt
284-3",children:"Choisir une autre méthode"})]}):N?s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 text-green-700 font-medium",children:[s.jsx(L,{icon:Sa})," Vérification terminée"]}),s.jsxs("p",{className:"text-3xl font-bold text-gray-900 mt-3",children:[N.totalViews," vues"]}),s.jsxs("p",{className:"text-sm text-gray-600",children:[Ts(N.totalEarned)," pour cette vérification"]}),s.jsx("div",{className:"mt-4 space-y-2",children:N.verdicts.map(H=>s.jsxs("div",{className:`text-sm rounded-xl p-3 border ${H.accepted?"border-border bg-green-50 text-green-900":"border-border bg-red-50 text-red-900"}`,children:[s.jsxs("p",{className:"font-medium",children:["Jour ",H.day," — ",H.accepted?"validé":"refusé"]}),!H.accepted&&H.reason&&s.jsx("p",{className:"text-xs mt-1",children:H.reason}),H.accepted&&s.jsxs("p",{className:"text-xs mt-1",children:[H.viewCount," vues · ",Ts(H.earnedAmount)]})]},H.day))}),s.jsx("button",{onClick:r,className:"w-full bg-primary text-white rounded-xl py-3 font-medium mt-4",children:"Fermer"})]}):O?m==="queued"?s.jsxs("div",{className:"py-8 text-center",children:[s.jsx(L,{icon:j$,className:"mx-auto text-primary",size:28}),s.jsx("p",{className:"font-medium text-gray-900 mt-4",children:I&&I>1?`Vous êtes ${I}ᵉ dans la file`:"Vous êtes le prochain"}),s.jsx("p",{className:"text-sm text-gray-600 mt-1",children:"Beaucoup de diffuseurs vérifient en ce moment. Votre tour arrive — gardez cette page ouverte."}),s.jsx("p",{className:"text-xs text-gray-400 mt-3",children:"Cela prend généralement moins d'une minute."})]}):m==="reading"?s.jsxs("div",{className:"py-8 text-center",children:[s.jsx(L,{icon:Yt,className:"animate-spin mx-auto text-primary",size:28}),s.jsx("p",{className:"font-medium text-gray-900 mt-4",children:"Appareil connecté"}),s.jsx("p",{className:"text-sm text-gray-600 mt-1",children:"Lecture de vos statuts et de leurs vues…"}),s.jsx("p",{className:"text-xs text-gray-400 mt-3",children:"Cela prend généralement moins d'une minute."})]}):n==="code"&&b?s.jsxs("div",{className:"text-center",children:[s.jsxs("p",{className:"text-sm text-gray-600 mb-3",children:["Dans WhatsApp : ",s.jsx("strong",{children:"Appareils connectés"})," → ",s.jsx("strong",{children:"Connecter un appareil"})," →",s.jsx("strong",{children:" Connecter avec le numéro de téléphone"}),", puis entrez ce code."]}),s.jsx("div",{className:"font-mono text-3xl tracking-[0.3em] font-bold text-gray-900 bg-gray-100 rounded-xl py-4",children:b}),s.jsx("button",{onClick:K,className:"text-sm text-primary mt-2",children:S?"Code copié":"Copier le code"}),s.jsx("p",{className:"text-xs text-gray-500 mt-3",children:"La connexion est temporaire. Elle sert uniquement à lire les vues de votre statut, puis elle est supprimée."})]}):n==="qr"&&y?s.jsxs("div",{className:"text-center",children:[s.jsxs("p",{className:"text-sm text-gray-600 mb-3",children:["Dans WhatsApp : ",s.jsx("strong",{children:"Appareils connectés"})," → ",s.jsx("strong",{children:"Connecter un appareil"}),", puis scannez ce code."]}),s.jsx("img",{src:y,alt:"QR code WhatsApp",className:"w-56 h-56 mx-auto"}),s.jsx("p",{className:"text-xs text-gray-500 mt-3",children:"La connexion est temporaire. Elle sert uniquement à lire les vues de votre statut, puis elle est supprimée."})]}):s.jsxs("div",{className:"py-8 text-center text-gray-500",children:[s.jsx(L,{icon:Yt,className:"animate-spin mx-auto text-primary",size:24}),s.jsx("p",{className:"text-sm mt-3",children:m==="reading"?"Lecture de vos statuts…":n==="code"?"Génération de votre code…":"Préparation du QR code…"})]}):s.jsxs("div",{children:[s.jsx("img",{src:Q4e,alt:"","aria-hidden":"true",className:"w-36 mx-auto -mt-2"}),s.jsx("p",{className:"text-sm text-gray-600 mb-4",children:"Connectez votre WhatsApp le temps de lire les vues de votre statut. Choisissez la méthode qui vous arrange."}),s.jsxs("button",{onClick:()=>i("code"),className:`w-full text-left border rounded-2xl p-4 ${n==="code"?"border-primary bg-blue-50":"border-border"}`,children:[s.jsxs("div",{className:"flex items-center gap-2 font-medium text-gray-900",children:[s.jsx(L,{icon:wre,className:"text-primary"})," Code à 8 caractères",s.jsx("span",{className:"ml-auto text-[10px] uppercase tracking-wide bg-primary text-white rounded-full px-2 py-0.5",children:"Conseillé"})]}),s.jsx("p",{className:"text-xs text-gray-600 mt-1",children:"Sur le même téléphone. Vous entrez un code dans WhatsApp, sans photo à scanner."})]}),n==="code"&&s.jsxs("div",{className:"mt-3",children:[s.jsx("label",{className:"block text-sm text-gray-700 mb-1",children:"Numéro WhatsApp à connecter"}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("select",{value:c,onChange:H=>u(H.target.value),className:"border border-border rounded-xl px-3 py-3 bg-white focus:ring-2 focus:ring-primary focus:outline-none",children:Gc.map(H=>s.jsxs("option",{value:a(H),children:[H.flag," ",H.phoneCode]},H.value))}),s.jsx("input",{type:"tel",inputMode:"tel",value:f,onChange:H=>x(H.target.value),placeholder:"675080477",className:"flex-1 min-w-0 border border-border rounded-xl px-4 py-3 focus:ring-2 focus:ring-primary focus:outline-none"})]}),(()=>{const H=G(f),te=`${c}${H}`;return H.length>=6?s.jsxs("p",{className:"text-xs text-gray-700 mt-2",children:["Le code sera généré pour le ",s.jsxs("strong",{children:["+",te]})," — il ne fonctionnera que sur ce WhatsApp."]}):s.jsx("p",{className:"text-xs text-gray-500 mt-2",children:"Votre numéro sans l'indicatif du pays. Gardez le 0 s'il fait partie de votre numéro (ex. Côte d'Ivoire, Congo)."})})()]}),s.jsxs("button",{onClick:()=>i("qr"),className:`w-full text-left border rounded-2xl p-4 mt-3 ${n==="qr"?"border-primary bg-blue-50":"border-border"}`,children:[s.jsxs("div",{className:"flex items-center gap-2 font-medium text-gray-900",children:[s.jsx(L,{icon:S$,className:"text-primary"})," Code QR"]}),s.jsx("p",{className:"text-xs text-gray-600 mt-1",children:"Pratique depuis un ordinateur ou un second téléphone."})]}),s.jsxs("button",{onClick:()=>i("video"),className:`w-full text-left border rounded-2xl p-4 mt-3 ${n==="video"?"border-primary bg-blue-50":"border-border"}`,children:[s.jsxs("div",{className:"flex items-center gap-2 font-medium text-gray-900",children:[s.jsx(tH,{className:"text-[#115CF6]"})," Vérification par vidéo"]}),s.jsx("p",{className:"text-xs text-gray-600 mt-1",children:"Si la connexion WhatsApp ne marche pas : filmez votre écran (code + vues) et envoyez la vidéo."})]}),n==="video"?s.jsx(e3e,{participation:e,onClose:r}):s.jsx("button",{onClick:()=>{z(0),q(!1),w(null),M(!0)},disabled:!n||n==="code"&&f.replace(/\D/g,"").length<8,className:"w-full bg-[#115CF6] text-white rounded-xl py-3 font-medium mt
284-4 disabled:bg-gray-300",children:"Continuer"})]});return s.jsx(Z.div,{className:"fixed inset-0 bg-black/60 z-50 flex items-end sm:items-center justify-center p-0 sm:p-4",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:s.jsxs(Z.div,{className:"bg-white w-full sm:max-w-md rounded-t-3xl sm:rounded-3xl p-5 max-h-[92vh] overflow-auto",initial:{y:40},animate:{y:0},exit:{y:40},children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("h2",{className:"font-bold text-lg text-gray-900",children:"Vérifier ma publication"}),s.jsx("button",{onClick:r,className:"text-gray-400",children:s.jsx(L,{icon:gt})})]}),$()]})})}const r3e="/assets/ads-annonceur-C0Yhhfb2.jpg",n3e="/assets/ads-review--ym2sbPl.jpg",Ip=6e3;function s3e(){const e=lt(),{roles:t,isResolved:r}=fy(),[n,i]=C.useState(String(Ip)),a=Number(n),o=Number.isFinite(a)&&a>=Ip,{data:l,isFetching:c}=hr({queryKey:["ads-quote",o?a:null],queryFn:async()=>{var f;return(f=(await X.getAdsQuote(a)).body)==null?void 0:f.data},enabled:o});return r&&t.isAnnonceur?s.jsx(wl,{to:"/ads-network/annonceur",replace:!0}):r?s.jsxs(Z.div,{variants:On,initial:"hidden",animate:"show",className:"min-h-screen bg-white p-4 pb-24",children:[s.jsx(Ct,{}),s.jsxs("div",{className:"max-w-2xl mx-auto",children:[s.jsx(Z.div,{variants:Ia,children:s.jsx(ZW,{src:r3e,alt:""})}),s.jsx("h1",{className:"text-2xl font-bold text-gray-900 text-center",children:"Devenir annonceur"}),s.jsx("p",{className:"text-gray-600 mt-2 text-center",children:"Votre annonce sur le statut WhatsApp de membres SBC, ciblés selon votre public."}),s.jsx("h2",{className:"font-semibold text-gray-900 mt-6 mb-3",children:"Comment ça marche"}),s.jsxs(Z.div,{variants:Dl,initial:"hidden",animate:"show",className:"space-y-3",children:[s.jsx(Z.div,{variants:qn,children:s.jsx(va,{index:1,title:"Vous créez votre annonce",children:"Visuel, texte et moyen de contact."})}),s.jsx(Z.div,{variants:qn,children:s.jsx(va,{index:2,title:"Notre équipe la vérifie",children:"Rien n'est diffusé sans validation."})}),s.jsx(Z.div,{variants:qn,children:s.jsx(va,{index:3,title:"Vous payez, la campagne part",children:"Elle part aux diffuseurs correspondant à votre ciblage."})}),s.jsx(Z.div,{variants:qn,children:s.jsx(va,{index:4,title:"Chaque diffuseur publie 3 jours",children:"Seul le jour 1 est facturé. Les jours 2 et 3 sont offerts."})}),s.jsx(Z.div,{variants:qn,children:s.jsx(va,{index:5,title:"Vous suivez les résultats en direct",children:"Vues et clics, diffuseur par diffuseur."})})]}),s.jsxs("div",{className:"flex items-center gap-3 bg-blue-50 border border-border rounded-2xl p-3 mt-4",children:[s.jsx("img",{src:n3e,alt:"","aria-hidden":"true",className:"w-20 shrink-0"}),s.jsxs("p",{className:"text-sm text-blue-900",children:[s.jsx("span",{className:"font-medium",children:"Chaque annonce est relue avant diffusion."})," ","Comptez un court délai avant de pouvoir payer."]})]}),s.jsxs("div",{className:"bg-white border border-border rounded-2xl p-4 mt-5",children:[s.jsx("label",{className:"block text-sm font-medium text-gray-800 mb-1",children:"Quel budget souhaitez-vous investir ?"}),s.jsx("input",{type:"number",inputMode:"numeric",min:Ip,step:1e3,value:n,onChange:u=>i(u.target.value),className:"w-full border border-border rounded-xl px-4 py-3 focus:ring-2 focus:ring-primary focus:outline-none"}),s.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:["Minimum ",Ip.toLocaleString("fr-FR")," F."]}),o&&s.jsx("div",{className:"bg-gray-50 rounded-xl p-3 mt-3 text-sm text-gray-800",children:c?s.jsxs("span",{className:"flex items-center gap-2 text-gray-500",children:[s.jsx(L,{icon:Yt,className:"animate-spin"})," Calcul…"]}):l?s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"font-medium",children:l.message}),s.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:["Soit ",l.totalViews.toLocaleString("fr-FR")," vues au total sur 3 jours."]}),l.availableCredit>0&&s.jsxs("p",{className:"text-xs text-green-700 mt-2",children:["Vous disposez de ",l.availableCredit.toLocaleString("fr-FR")," F de crédit. À payer : ",l.amountDue.toLocaleStr
284ing("fr-FR")," F."]})]}):null}),s.jsxs("button",{onClick:()=>e(`/ads-network/annonceur/nouvelle-campagne?amount=${a}`),disabled:!o,className:"w-full bg-primary text-white rounded-xl py-3 font-medium mt-4 disabled:bg-gray-400 flex items-center justify-center gap-2",children:["Créer mon annonce ",s.jsx(L,{icon:Mn,size:12})]})]})]})]}):s.jsx("div",{className:"min-h-screen bg-gray-50 p-4 pt-8",children:s.jsx("div",{className:"max-w-2xl mx-auto",children:s.jsx(em,{rows:2})})})}const i3e={draft:"Brouillon",pending_review:"En validation",paid:"Payée — en validation",approved:"Validée — à payer",rejected:"Refusée",active:"En diffusion",paused:"En pause",completed:"Terminée",banked:"Clôturée — crédit rendu",cancelled:"Annulée"},a3e={draft:"bg-gray-100 text-gray-700",pending_review:"bg-amber-100 text-amber-800",paid:"bg-indigo-100 text-indigo-800",approved:"bg-blue-100 text-blue-800",rejected:"bg-red-100 text-red-800",active:"bg-green-100 text-green-800",paused:"bg-orange-100 text-orange-800",completed:"bg-purple-100 text-purple-800",banked:"bg-yellow-100 text-yellow-800",cancelled:"bg-gray-100 text-gray-500"},Fx=e=>`${Math.round(e).toLocaleString("fr-FR")} F`;function o3e(){var A;const e=lt(),[t,r]=C.useState(null),[n,i]=C.useState(null),[a,o]=C.useState(null),[l,c]=C.useState(null),[u,f]=C.useState(null),{data:x,isLoading:m,refetch:p}=hr({queryKey:["ads-my-campaigns"],queryFn:async()=>{var S;return((S=(await X.getMyAdsCampaigns({limit:50})).body)==null?void 0:S.data)??[]}}),{data:y,isFetching:v}=hr({queryKey:["ads-campaign-performance",a==null?void 0:a._id],queryFn:async()=>{var S;return(S=(await X.getAdsCampaignPerformance(a._id)).body)==null?void 0:S.data},enabled:!!a}),b=async w=>{var S,B,D;r(w._id),i(null);try{const P=await X.payAdsCampaign(w._id);if(!P.isSuccessByStatusCode){i(((S=P.body)==null?void 0:S.message)||"Le paiement n'a pas pu être ouvert.");return}const O=(D=(B=P.body)==null?void 0:B.data)==null?void 0:D.sessionId;if(!O){p();return}window.location.href=X.generatePaymentUrl(O)}finally{r(null)}},E=async w=>{var S;r(w._id),i(null);try{const B=await X.decideAdsCampaign(w._id,"bank");if(!B.isSuccessByStatusCode){i(((S=B.body)==null?void 0:S.message)||"L'opération a échoué.");return}c(null),p()}finally{r(null)}},N=async w=>{var S;r(w._id),i(null);try{const B=await X.cancelAdsCampaign(w._id);if(!B.isSuccessByStatusCode){i(((S=B.body)==null?void 0:S.message)||"L'annulation a échoué.");return}f(null),p()}finally{r(null)}},j=async w=>{var S;r(w._id),i(null);try{const B=w.status==="paused"?await X.resumeAdsCampaign(w._id):await X.pauseAdsCampaign(w._id);if(!B.isSuccessByStatusCode){i(((S=B.body)==null?void 0:S.message)||"L'opération a échoué.");return}p()}finally{r(null)}};return s.jsxs("div",{className:"min-h-screen bg-white p-4 pb-24",children:[s.jsx(Ct,{}),s.jsxs("div",{className:"max-w-2xl mx-auto",children:[s.jsxs("div",{className:"flex items-center justify-between mt-2",children:[s.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Espace annonceur"}),s.jsxs(Z.button,{whileTap:{scale:.95},onClick:()=>e("/ads-network/annonceur/nouvelle-campagne"),className:"flex items-center gap-2 bg-primary text-white rounded-xl px-4 py-2 text-sm font-medium",children:[s.jsx(L,{icon:kl,size:12})," Nouvelle"]})]}),n&&s.jsx("div",{className:"bg-red-50 border border-border rounded-xl p-3 text-sm text-red-800 mt-3",children:n}),!!(x!=null&&x.length)&&s.jsxs(s.Fragment,{children:[s.jsxs(Z.div,{...aj,className:"bg-primary relative overflow-hidden text-white rounded-2xl p-5 mt-4",children:[s.jsx(L,{icon:Pc,className:"absolute -right-4 -bottom-4 text-white/10",size:110}),s.jsxs("div",{className:"flex items-center gap-2 text-blue-100 text-sm",children:[s.jsx(L,{icon:Pc})," Budget restant"]}),s.jsx("p",{className:"text-3xl font-bold mt-1",children:Fx(x.reduce((w,S)=>{if(S.status==="active"){const B=S.progress.targetUniqueViews?S.progress.uniqueViewsDelivered/S.progress.targetUniqueViews:0;return w+Math.max(0,S.amountPaid*(1-B))}return w+(S.bankedAmount??0)},0))}),s.jsxs("p",{className:"text-xs text-blue-100 mt-1",children:["sur ",Fx(x.reduce((w,S)=>w+S.amountPaid,0))," investis ·"," ",x.filter(w=>w.status==="active").length," campagne(s) en diffusion"]})]}),s.jsxs("div",{className:"grid grid-cols-3 gap-2 mt-3",children:[s.jsx(dd,{index:0,label:"Vues livrées",value:x.reduce((w,S)=>
284w+S.progress.totalViewsDelivered,0).toLocaleString("fr-FR")}),s.jsx(dd,{index:1,label:"Clics reçus",value:x.reduce((w,S)=>w+S.clicksTotal,0).toLocaleString("fr-FR"),tone:"green"}),s.jsx(dd,{index:2,label:"Campagnes actives",value:x.filter(w=>w.status==="active").length})]})]}),m?s.jsx("div",{className:"mt-5",children:s.jsx(em,{rows:2})}):x!=null&&x.length?s.jsx("div",{className:"space-y-3 mt-5",children:x.map((w,S)=>s.jsxs(Z.div,{...hs(S),className:"bg-white border border-border rounded-2xl p-4",children:[s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("img",{src:X.generateThumbnailUrl(w.mediaFileId,160),alt:w.title,loading:"lazy",decoding:"async",className:"w-20 h-20 object-cover rounded-xl bg-gray-100 shrink-0 ring-1 ring-gray-100"}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsxs("div",{className:"flex items-start justify-between gap-2",children:[s.jsx("p",{className:"font-semibold text-gray-900",children:w.title}),s.jsxs("span",{className:`shrink-0 inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full text-xs font-medium ${a3e[w.status]}`,children:[w.status==="active"&&s.jsxs("span",{className:"relative flex h-1.5 w-1.5",children:[s.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-green-500 opacity-75"}),s.jsx("span",{className:"relative inline-flex rounded-full h-1.5 w-1.5 bg-green-600"})]}),i3e[w.status]]})]}),s.jsx("p",{className:"text-sm font-bold text-primary mt-0.5",children:Fx(w.amountPaid)}),(w.status==="active"||w.status==="paused"||w.status==="completed"||w.status==="banked")&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-2 mt-2.5",children:[s.jsx("div",{className:"h-2 bg-gray-100 rounded-full overflow-hidden flex-1",children:s.jsx(Z.div,{className:"bg-success h-full rounded-full",initial:{width:0},animate:{width:`${Math.max(w.progress.percentComplete,w.progress.percentComplete>0?4:0)}%`},transition:{delay:.3+S*.07,duration:.8,ease:"easeOut"}})}),s.jsxs("span",{className:"text-[11px] font-semibold text-gray-600 tabular-nums",children:[Math.round(w.progress.percentComplete),"%"]})]}),s.jsxs("div",{className:"flex flex-wrap gap-1.5 mt-2",children:[s.jsxs("span",{className:"inline-flex items-center gap-1 bg-gray-50 border border-border text-gray-700 rounded-lg px-2 py-1 text-[11px]",children:[s.jsx(L,{icon:zc,size:10,className:"text-primary"}),w.progress.uniqueViewsDelivered.toLocaleString("fr-FR"),"/",w.progress.targetUniqueViews.toLocaleString("fr-FR")," uniques"]}),s.jsxs("span",{className:"inline-flex items-center gap-1 bg-gray-50 border border-border text-gray-700 rounded-lg px-2 py-1 text-[11px]",children:[s.jsx(L,{icon:Al,size:10,className:"text-purple-500"}),w.progress.repeatViewsDelivered.toLocaleString("fr-FR")," offertes"]}),s.jsxs("span",{className:"inline-flex items-center gap-1 bg-gray-50 border border-border text-gray-700 rounded-lg px-2 py-1 text-[11px]",children:[s.jsx(L,{icon:Ag,size:10,className:"text-green-600"}),w.clicksTotal," clic",w.clicksTotal>1?"s":""]})]})]})]})]}),w.status==="rejected"&&w.rejectionReason&&s.jsxs("div",{className:"bg-red-50 border border-border rounded-xl p-3 text-sm text-red-800 mt-3",children:[s.jsx("p",{className:"font-medium",children:"Motif du refus"}),s.jsx("p",{className:"mt-1",children:w.rejectionReason})]}),w.status==="paid"&&s.jsx("p",{className:"text-xs text-indigo-800 bg-indigo-50 border border-indigo-200 rounded-xl p-2 mt-3",children:"Paiement reçu. Notre équipe valide votre annonce — elle démarre dès validation."}),w.status==="pending_review"&&s.jsx("p",{className:"text-xs text-amber-700 bg-amber-50 border border-border rounded-xl p-2 mt-3",children:"Notre équipe relit votre annonce. Vous pourrez payer dès qu'elle sera validée."}),w.status==="banked"&&s.jsxs("p",{className:"text-xs text-yellow-800 bg-yellow-50 border border-border rounded-xl p-2 mt-3",children:[Fx(w.bankedAmount??0)," conservés en crédit pour une prochaine campagne."]}),s.jsxs("div",{className:"flex flex-wrap gap-2 mt-3",children:[w.status==="approved"&&s.jsxs(s.Fragment,{children:[s.jsx("button",{onClick:()=>b(w),disabled:t===w._id,className:"flex-1 bg-primary text-white rounded-xl py-2.5 text-sm font-medium disabled:bg-gray-400",children:t===w._id?"Ouverture…":"Payer et lancer"}),s.jsx("button",{onClick:()=>f(w),disabled:t===w._id,className:"px-4 border border-border text-gray-600 rounded-xl py-2.5 text-sm",children:"Annuler"})]}),(w.status==="pending_review"||w.status==="draft"||w.status==="rejected")&&s.jsx("button",{onClick:()=>f(w),disabled:t===w._id,className:"px-4 border border-border text-gray-600 rounded-xl py-2.5 text-sm",children:"Annuler la campagne"}),["draft","rejected","paid","active","paused"].includes(w.status)&&s.jsx("button",{onClick:()=>e(`/ads-network/annonceur/campagne/${w._id}/modifier`),className:"px-4 border border-border text-gray-700 rounded-xl py-2.5 text-sm",children:w.status==="active"||w.status==="paused"?"Modifier le ciblage":"Modifier"}),(w.status==="draft"||w.status==="rejected"&&!w.paidAt)&&s.jsx("button",{onClick:()=>b(w),disabled:t===w._id,className:"flex-1 bg-primary text-white rounded-xl py-2.5 text-sm font-medium disabled:bg-gray-400",children:t===w._id?"Ouverture…":"Payer et envoyer à la validation"}),w.status==="active"&&s.jsxs(s.Fragment,{children:[s.jsxs(Z.button,{whileTap:{scale:.97},onClick:()=>o(w),className:"flex-1 inline-flex items-center justify-center gap-2 bg-blue-50 text-primary rounded-xl py-2.5 text-sm font-medium",children:[s.jsx(L,{icon:wn,size:13})," Voir les diffuseurs"]}),s.jsx(Z.button,{whileTap:{scale:.97},onClick:()=>j(w),disabled:t===w._id,className:"px-4 border border-orange-200 text-orange-700 rounded-xl py-2.5 text-sm",children:t===w._id?"…":"Pause"}),s.jsx(Z.button,{whileTap:{scale:.97},onClick:()=>c(w),disabled:t===w._id,className:"px-4 border border-border text-gray-600 rounded-xl py-2.5 text-sm",children:"Clôturer"})]}),w.status==="paused"&&s.jsxs(s.Fragment,{children:[s.jsx(Z.button,{whileTap:{scale:.97},onClick:()=>j(w),disabled:t===w._id,className:"flex-1 bg-[#115CF6] text-white rounded-xl py-2.5 text-sm font-medium disabled:bg-gray-400",children:t===w._id?"Relance…":"Relancer la campagne"}),s.jsx(Z.button,{whileTap:{scale:.97},onClick:()=>o(w),className:"px-4 border border-gray-200 text-[#115CF6] rounded-xl py-2.5 text-sm",children:s.jsx(L,{icon:wn,size:13})})]}),(w.status==="completed"||w.status==="banked")&&s.jsxs(Z.button,{whileTap:{scale:.97},onClick:()=>o(w),className:"flex-1 inline-flex items-center justify-center gap-2 bg-blue-50 text-primary rounded-xl py-2.5 text-sm font-medium",children:[s.jsx(L,{icon:u0,size:13})," Voir les résultats"]}),w.landingPageUrl&&s.jsxs("a",{href:w.landingPageUrl,target:"_blank",rel:"noreferrer",className:"px-4 border border-border text-gray-700 rounded-xl py-2.5 text-sm flex items-center gap-2",children:[s.jsx(L,{icon:k$,size:11})," Ma page"]})]})]},w._id))}):s.jsxs(Z.div,{...hs(0),className:"text-center py-10",children:[s.jsx("img",{src:rH,alt:"",className:"w-40 h-40 object-cover rounded-3xl mx-auto"}
284),s.jsx("p",{className:"text-gray-700 font-medium mt-4",children:"Vous n'avez pas encore d'annonce."}),s.jsx("p",{className:"text-sm text-gray-500 mt-1",children:"Des centaines de statuts WhatsApp attendent votre produit."}),s.jsx(Z.button,{whileTap:{scale:.95},onClick:()=>e("/ads-network/annonceur/onboarding"),className:"bg-primary text-white rounded-xl px-6 py-3 text-sm font-medium mt-4",children:"Créer ma première annonce"})]}),s.jsx("p",{className:"text-xs text-gray-500 mt-6",children:"Budget non consommé : conservé en crédit, non remboursable en espèces."})]}),s.jsx(It,{children:u&&s.jsx(Z.div,{className:"fixed inset-0 bg-black/60 z-50 flex items-center justify-center p-4",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>t!==u._id&&f(null),children:s.jsxs(Z.div,{className:"bg-white w-full max-w-md rounded-3xl p-5",initial:{scale:.92,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.92,opacity:0},transition:{type:"spring",damping:24,stiffness:320},onClick:w=>w.stopPropagation(),children:[s.jsxs("h2",{className:"font-bold text-lg text-gray-900",children:["Annuler « ",u.title," » ?"]}),s.jsx("p",{className:"text-sm text-gray-600 mt-2",children:u.status==="approved"?"Cette campagne est déjà validée : en l'annulant, l'approbation est perdue. Pour la relancer plus tard, elle devra repasser par la validation de notre équipe.":"La campagne sera annulée. Vous pourrez en créer une nouvelle à tout moment."}),s.jsxs("div",{className:"flex gap-2 mt-5",children:[s.jsx(Z.button,{whileTap:{scale:.97},onClick:()=>f(null),disabled:t===u._id,className:"flex-1 border border-border text-gray-700 rounded-xl py-3 text-sm font-medium",children:"Garder la campagne"}),s.jsx(Z.button,{whileTap:{scale:.97},onClick:()=>N(u),disabled:t===u._id,className:"flex-1 bg-red-600 text-white rounded-xl py-3 text-sm font-medium disabled:bg-gray-400",children:t===u._id?"Annulation…":"Annuler définitivement"})]})]})})}),s.jsx(It,{children:l&&s.jsx(Z.div,{className:"fixed inset-0 bg-black/60 z-50 flex items-end sm:items-center justify-center p-0 sm:p-4",initial:{opacity:0}
284,animate:{opacity:1},exit:{opacity:0},onClick:()=>t!==l._id&&c(null),children:s.jsxs(Z.div,{className:"bg-white w-full sm:max-w-md rounded-t-3xl sm:rounded-3xl p-5",initial:{y:60},animate:{y:0},exit:{y:60},transition:{type:"spring",damping:26,stiffness:300},onClick:w=>w.stopPropagation(),children:[s.jsx("div",{className:"w-10 h-1 bg-gray-200 rounded-full mx-auto mb-4 sm:hidden"}),s.jsxs("h2",{className:"font-bold text-lg text-gray-900",children:["Clôturer « ",l.title," » ?"]}),s.jsx("p",{className:"text-sm text-gray-600 mt-2",children:"La diffusion s'arrête immédiatement et la campagne ne pourra pas être relancée."}),s.jsxs("ul",{className:"text-sm text-gray-600 mt-3 space-y-2",children:[s.jsxs("li",{className:"flex gap-2",children:[s.jsx("span",{className:"text-green-600 shrink-0",children:"✓"}),"Les ",l.progress.totalViewsDelivered.toLocaleString("fr-FR")," vues déjà livrées restent acquises."]}),s.jsxs("li",{className:"flex gap-2",children:[s.jsx("span",{className:"text-green-600 shrink-0",children:"✓"}),s.jsxs("span",{children:["Le budget non consommé (~",Fx(Math.max(0,l.amountPaid*(1-(l.progress.targetUniqueViews?l.progress.uniqueViewsDelivered/l.progress.targetUniqueViews:0)))),") est conservé en ",s.jsx("strong",{children:"crédit"})," pour votre prochaine campagne."]})]}),s.jsxs("li",{className:"flex gap-2",children:[s.jsx("span",{className:"text-amber-600 shrink-0",children:"!"}),"Ce crédit n'est pas remboursable en espèces."]})]}),s.jsxs("div",{className:"flex gap-2 mt-5",children:[s.jsx(Z.button,{whileTap:{scale:.97},onClick:()=>c(null),disabled:t===l._id,className:"flex-1 border border-border text-gray-700 rounded-xl py-3 text-sm font-medium",children:"Annuler"}),s.jsx(Z.button,{whileTap:{scale:.97},onClick:()=>E(l),disabled:t===l._id,className:"flex-1 bg-red-600 text-white rounded-xl py-3 text-sm font-medium disabled:bg-gray-400",children:t===l._id?"Clôture…":"Clôturer définitivement"})]})]})})}),s.jsx(It,{children:a&&s.jsx(Z.div,{className:"fixed inset-0 bg-black/60 z-50 flex items-end sm:items-center justify-center p-0 sm:p-4",initial:{opacity:0}
284,animate:{opacity:1},exit:{opacity:0},children:s.jsxs(Z.div,{className:"bg-white w-full sm:max-w-lg rounded-t-3xl sm:rounded-3xl max-h-[92vh] overflow-auto",initial:{y:60},animate:{y:0},exit:{y:60},transition:{type:"spring",damping:26,stiffness:300},children:[s.jsxs("div",{className:"sticky top-0 bg-white/95 backdrop-blur rounded-t-3xl px-5 pt-3 pb-3 border-b border-border",children:[s.jsx("div",{className:"w-10 h-1 bg-gray-200 rounded-full mx-auto mb-3 sm:hidden"}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("img",{src:X.generateSettingsFileUrl(a.mediaFileId),alt:"",className:"w-10 h-10 object-cover rounded-lg ring-1 ring-gray-100"}),s.jsx("h2",{className:"font-bold text-lg text-gray-900 flex-1 truncate",children:a.title}),s.jsx("button",{onClick:()=>o(null),className:"w-8 h-8 flex items-center justify-center rounded-full bg-gray-100 text-gray-500",children:s.jsx(L,{icon:gt,size:13})})]})]}),s.jsxs("div",{className:"p-5",children:[s.jsxs("div",{className:"grid grid-cols-3 gap-2 mb-5",children:[s.jsxs(Z.div,{...hs(0,.05),className:"bg-blue-50 border border-border rounded-2xl p-3",children:[s.jsx("div",{className:"w-7 h-7 rounded-full bg-primary text-white flex items-center justify-center mb-2",children:s.jsx(L,{icon:zc,size:11})}),s.jsx("p",{className:"text-xl font-bold text-gray-900 leading-none",children:a.progress.uniqueViewsDelivered.toLocaleString("fr-FR")}),s.jsxs("p",{className:"text-[11px] text-gray-500 mt-1 leading-tight",children:["Vues uniques",s.jsx("br",{}),"sur ",a.progress.targetUniqueViews.toLocaleString("fr-FR")," visées"]})]}),s.jsxs(Z.div,{...hs(1,.05),className:"bg-purple-50 border border-border rounded-2xl p-3",children:[s.jsx("div",{className:"w-7 h-7 rounded-full bg-purple-600 text-white flex items-center justify-center mb-2",children:s.jsx(L,{icon:Al,size:11})}),s.jsx("p",{className:"text-xl font-bold text-gray-900 leading-none",children:a.progress.totalViewsDelivered.toLocaleString("fr-FR")}),s.jsxs("p",{className:"text-[11px] text-gray-500 mt-1 leading-tight",children:["Vues totales",s.jsx("br",{}),"dont ",a.progress.repeatViewsDelivered.toLocaleString("fr-FR")," offertes"]})]}),s.jsxs(Z.div,{...hs(2,.05),className:"bg-green-50 border border-border rounded-2xl p-3",children:[s.jsx("div",{className:"w-7 h-7 rounded-full bg-green-600 text-white flex items-center justify-center mb-2",children:s.jsx(L,{icon:Ag,size:11})}),s.jsx("p",{className:"text-xl font-bold text-gray-900 leading-none",children:a.clicksTotal}),s.jsxs("p",{className:"text-[11px] text-gray-500 mt-1 leading-tight",children:["Clics",s.jsx("br",{}),"reçus"]})]})]}),s.jsxs("h3",{className:"font-semibold text-gray-900 mb-1 flex items-center gap-2",children:[s.jsx(L,{icon:wn,size:13,className:"text-primary"})," Par diffuseur"]}),s.jsx("p",{className:"text-xs text-gray-500 mb-3",children:"Le taux de clic distingue ceux qui apportent des contacts de ceux qui apportent seulement de la portée."}),v?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(L,{icon:Yt,className:"animate-spin text-primary"})}):(A=y==null?void 0:y.diffuseurs)!=null&&A.length?s.jsx("div",{className:"space-y-2",children:y.diffuseurs.map((w,S)=>s.jsxs(Z.div,{...hs(S,.1),className:"flex items-center gap-3 border border-border rounded-xl p-3 text-sm",children:[s.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center text-xs font-bold shrink-0 ${S===0?"bg-amber-100 text-amber-700":"bg-gray-100 text-gray-500"}`,children:S+1}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("p",{className:"font-medium text-gray-900",children:[w.totalViews.toLocaleString("fr-FR")," vues"]}),s.jsxs("p",{className:"text-xs text-gray-500",children:[w.clicks," clic",w.clicks>1?"s":""]})]}),s.jsxs("span",{className:`shrink-0 text-xs font-semibold rounded-full px-2.5 py-1 ${w.clickThroughRate>=.02?"bg-green-100 text-green-700":"bg-gray-100 text-gray-600"}`,children:[(w.clickThroughRate*100).toFixed(1),"% CTR"]})]},w.diffuseurUserId))}):s.jsxs("div",{className:"text-center py-6",children:[s.jsx("div",{className:"w-14 h-14 rounded-full bg-blue-50 text-primary flex items-center justify-center mx-auto mb-3",children:s.jsx(L,{icon:Pc,size:20})}),s.jsx("p",{className:"text-sm font-medium text-gray-700",children:"Diffusion en préparation"}),s.jsx("p",{className:"text-xs text-gray-500 mt-1 max-w-[240px] mx-auto",children:"Vos diffuseurs préparent leur publication. Les premières vues apparaissent en général sous 24 h."})]})]})]})})})]})}const sc=6e3,l3e=[{code:"CM",label:"Cameroun"},{code:"CI",label:"Côte d'Ivoire"},{code:"SN",label:"Sénégal"},{code:"BJ",label:"Bénin"},{code:"TG",label:"Togo"},{code:"BF",label:"Burkina Faso"},{code:"ML",label:"Mali"},{code:"NE",label:"Niger"},{code:"GA",label:"Gabon"},{code:"CD",label:"RD Congo"},{code:"CG",label:"Congo"},{code:"GN",label:"Guinée"},{code:"TD",label:"Tchad"}];function mL(){const e=lt(),[t]=I4(),{id:r}
284=ta(),n=!!r,[i,a]=C.useState(t.get("amount")||String(sc)),[o,l]=C.useState(""),[c,u]=C.useState(""),[f,x]=C.useState(""),[m,p]=C.useState(""),[y,v]=C.useState(""),[b,E]=C.useState(""),[N,j]=C.useState([]),[A,w]=C.useState([]),[S,B]=C.useState([]),[D,P]=C.useState(""),[O,M]=C.useState([]),[I,V]=C.useState(""),[W,_]=C.useState(""),[z,R]=C.useState(null),[q,G]=C.useState(null),[K,$]=C.useState(!1),[H,te]=C.useState(null),[ne,Y]=C.useState(null),J=(ne==null?void 0:ne.status)==="active"||(ne==null?void 0:ne.status)==="paused",oe=n&&(ne==null?void 0:ne.status)!=="draft"&&(ne==null?void 0:ne.status)!=="rejected";C.useEffect(()=>{if(!r)return;let ee=!1;return(async()=>{var je;const De=(je=(await X.getAdsCampaign(r)).body)==null?void 0:je.data;if(ee||!De)return;Y({status:De.status,mediaFileId:De.mediaFileId}),l(De.title??""),u(De.description??""),x(De.suggestedCaption??""),p(De.contactWhatsapp??""),v(De.contactPhone??""),E(De.websiteUrl??""),a(String(De.amountPaid??sc));const we=De.targeting??{};j(we.countries??[]),w(we.sex??[]),B(we.cities??[]),M(we.interests??[]),V(we.minAge!=null?String(we.minAge):""),_(we.maxAge!=null?String(we.maxAge):"")})(),()=>{ee=!0}},[r]);const he=Number(i),{data:Q}=hr({queryKey:["ads-quote",he],queryFn:async()=>{var Ae;return(Ae=(await X.getAdsQuote(he)).body)==null?void 0:Ae.data},enabled:Number.isFinite(he)&&he>=sc}),ue=ee=>{R(ee),G(ee?URL.createObjectURL(ee):null)},de=(ee,Ae,De)=>De(ee.includes(Ae)?ee.filter(we=>we!==Ae):[...ee,Ae]),me={countries:N.length?N:void 0,cities:S.length?S.map(ee=>Rs(ee)):void 0,interests:O.length?O:void 0,sex:A.length?A:void 0,minAge:I?Number(I):void 0,maxAge:W?Number(W):void 0},{data:Le}=hr({queryKey:["ads-reach",me,he],queryFn:async()=>{var Ae;return(Ae=(await X.getAdsReach({targeting:me,amount:he})).body)==null?void 0:Ae.data},enabled:Number.isFinite(he)&&he>=sc,staleTime:3e4}),Ne=async()=>{var we,je,Te,Se;let ee;if(z&&!J){const He=await X.uploadFile(z);if(ee=(je=(we=He.body)==null?void 0:we.data)==null?void 0:je.fileId,!He.isSuccessByStatusCode||!ee){te("Le visuel n'a pas pu être envoyé. Réessayez.");return}}const Ae={targeting:me};J||(Ae.title=o.trim(),Ae.description=c.trim()||void 0,Ae.suggestedCaption=f.trim()||void 0,Ae.contactWhatsapp=m.trim()||void 0,Ae.contactPhone=y.trim()||void 0,Ae.websiteUrl=b.trim()||void 0,ee&&z&&(Ae.mediaFileId=ee,Ae.mediaType=z.type.startsWith("video")?"video":"image",Ae.mediaMimeType=z.type),oe||(Ae.amount=he));const De=await X.updateAdsCampaign(r,Ae);if(!De.isSuccessByStatusCode){te(((Te=De.body)==null?void 0:Te.message)||"Les modifications n'ont pas pu être enregistrées.");return}if((ne==null?void 0:ne.status)==="rejected"){const He=await X.submitAdsCampaign(r);if(!He.isSuccessByStatusCode){te(((Se=He.body)==null?void 0:Se.message)||"Modifications enregistrées, mais le renvoi en validation a échoué.");return}}e("/ads-network/annonceur")},ye=async()=>{var ee,Ae,De,we,je,Te,Se,He;if(te(null),!o.trim())return te("Donnez un titre à votre annonce.");if(!z&&!n)return te("Ajoutez le visuel à publier.");if(!m&&!y&&!b)return te("Indiquez au moins un moyen de contact : WhatsApp, téléphone ou site web.");if(!Number.isFinite(he)||he<sc)return te(`Le budget minimum est de ${sc.toLocaleString("fr-FR")} F.`);$(!0);try{if(n){await Ne();return}const Ue=z,rt=await X.uploadFile(Ue),wt=(Ae=(ee=rt.body)==null?void 0:ee.data)==null?void 0:Ae.fileId;if(!rt.isSuccessByStatusCode||!wt){te("Le visuel n'a pas pu être envoyé. Réessayez.");return}const Ft=await X.createAdsCampaign({title:o.trim(),description:c.trim()||void 0,mediaFileId:wt,mediaType:Ue.type.startsWith("video")?"video":"image",mediaMimeType:Ue.type,suggestedCaption:f.trim()||void 0,contactWhatsapp:m.trim()||void 0,contactPhone:y.trim()||void 0,websiteUrl:b.trim()||void 0,targeting:{countries:N.length?N:void 0,cities:S.length?S.map(Gr=>Rs(Gr)):void 0,interests:O.length?O:void 0,sex:A.length?A:void 0,minAge:I?Number(I):void 0,maxAge:W?Number(W):void 0},amount:he}),xt=(we=(De=Ft.body)==null?void 0:De.data)==null?void 0:we._id;if(!Ft.isSuccessByStatusCode||!xt){te(((je=Ft.body)==null?void 0:je.message)||"L'annonce n'a pas pu être créée.");return}const Kt=await X.payAdsCampaign(xt);if(!Kt.isSuccessByStatusCode){te((((Te=Kt.body)==null?void 0:Te.message)||"Le paiement n'a pas pu être ouvert.")+" Votre brouillon est enregistré, vous pouvez le payer depuis votre espace annonceur.");return}const ft=(He=(Se=Kt.body)==null?void 0:Se.data)==null?void 0:He.sessionId;if(!ft){e("/ads-network/annonceur");return}window.location.href=X.generatePaymentUrl(ft)}finally{$(!1)}};return s.jsxs(Z.div,{variants:On,initial:"hidden",animate:"show",className:"min-h-screen bg-white p-4 pb-24",children:[s.jsx(Ct,{}),s.jsxs("div",{className:"max-w-2xl mx-auto",children:[s.jsx(Z.div,{variants:Ia,children:s.jsx("h1",{className:"text-2xl font-bold text-gray-900 mt-2",children:n?J?"Modifier le ciblage":"Modifier l'annonce":"Nouvelle annonce"})}),s.jsxs("div",{className:"bg-blue-50 border border-border rounded-xl p-3 mt-3 text-sm text-blue-900 flex items-start gap-2",children:[s.jsx(L,{icon:Mre,className:"mt-0.5 shrink-0"}),s.jsx("span",{children:J?"Cette campagne est en diffusion : des diffuseurs l'ont déjà publiée, donc le visuel et le budget ne changent plus. Vous pouvez encore élargir le ciblage pour atteindre vos vues.":oe?"Cette campagne est déjà payée. Vous pouvez tout modifier sauf le budget — aucun nouveau paiement ne sera demandé.":"Votre annonce sera relue par notre équipe avant d'être diffusée."})]}),s.jsxs(Z.div,{variants:Dl,initial:"hidden",animate:"show",className:"space-y-4 mt
284-5",children:[s.jsxs(Z.div,{variants:qn,children:[s.jsx("label",{className:"block text-sm font-medium text-gray-800 mb-1",children:"Visuel à publier"}),s.jsxs("label",{className:"flex flex-col items-center justify-center border-2 border-dashed border-border rounded-2xl p-6 cursor-pointer",children:[q?s.jsx("img",{src:q,alt:"Aperçu",className:"max-h-56 rounded-xl"}):s.jsxs(s.Fragment,{children:[s.jsx(L,{icon:N$,className:"text-gray-400",size:28}),s.jsx("span",{className:"text-sm text-gray-500 mt-2",children:"Choisir une image ou une vidéo"})]}),s.jsx("input",{type:"file",accept:"image/*,video/*",className:"hidden",onChange:ee=>{var Ae;return ue(((Ae=ee.target.files)==null?void 0:Ae[0])??null)}})]})]}),s.jsxs(Z.div,{variants:qn,children:[s.jsx("label",{className:"block text-sm font-medium text-gray-800 mb-1",children:"Titre"}),s.jsx("input",{value:o,onChange:ee=>l(ee.target.value),maxLength:120,placeholder:"ex. Promo rentrée — sacs à dos",className:"w-full border border-border rounded-xl px-4 py-3 focus:ring-2 focus:ring-primary focus:outline-none"})]}),s.jsxs(Z.div,{variants:qn,children:[s.jsx("label",{className:"block text-sm font-medium text-gray-800 mb-1",children:"Description"}),s.jsx("textarea",{value:c,onChange:ee=>u(ee.target.value),rows:3,maxLength:2e3,placeholder:"Ce que voit un prospect sur votre page.",className:"w-full border border-border rounded-xl px-4 py-3 focus:ring-2 focus:ring-primary focus:outline-none"})]}),s.jsxs(Z.div,{variants:qn,children:[s.jsx("label",{className:"block text-sm font-medium text-gray-800 mb-1",children:"Texte proposé aux diffuseurs"}),s.jsx("textarea",{value:f,onChange:ee=>x(ee.target.value),rows:3,maxLength:600,placeholder:"Le texte qui accompagnera votre visuel sur leur statut.",className:"w-full border border-border rounded-xl px-4 py-3 focus:ring-2 focus:ring-primary focus:outline-none"}),s.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Le lien de suivi de chaque diffuseur y sera ajouté automatiquement."})]}),s.jsxs(Z.div,{variants:qn,children:[s.jsx("label",{className:"block text-sm font-medium text-gray-800 mb-1",children:"Moyens de contact"}),s.jsx("p",{className:"text-xs text-gray-500 mb-2",children:"Au moins un. C'est ainsi que les prospects vous joignent."}),s.jsx("input",{value:m,onChange:ee=>p(ee.target.value),placeholder:"WhatsApp (ex. +237600000000)",className:"w-full border border-border rounded-xl px-4 py-3 mb-2 focus:ring-2 focus:ring-primary focus:outline-none"}),s.jsx("input",{value:y,onChange:ee=>v(ee.target.value),placeholder:"Téléphone",className:"w-full border border-border rounded-xl px-4 py-3 mb-2 focus:ring-2 focus:ring-primary focus:outline-none"}),s.jsx("input",{value:b,onChange:ee=>E(ee.target.value),placeholder:"Site web (https://…)",className:"w-full border border-border rounded-xl px-4 py-3 focus:ring-2 focus:ring-primary focus:outline-none"})]}),s.jsxs(Z.div,{variants:qn,children:[s.jsx("label",{className:"block text-sm font-medium text-gray-800 mb-1",children:"Ciblage"}),s.jsx("p",{className:"text-xs text-gray-500 mb-2",children:"Facultatif. Sans ciblage, votre annonce est proposée à tous les diffuseurs — plus de portée, moins de précision."}),s.jsx("div",{className:"flex flex-wrap gap-2 mb-3",children:l3e.map(ee=>s.jsx("button",{type:"button",onClick:()=>de(N,ee.code,j),className:`px-3 py-1.5 rounded-full text-sm border ${N.includes(ee.code)?"bg-primary text-white border-primary":"bg-white text-gray-700 border-border"}`,children:ee.label},ee.code))}),s.jsx("div",{className:"flex flex-wrap gap-2 mb-3",children:[{v:"male",l:"Hommes"},{v:"female",l:"Femmes"}].map(ee=>s.jsx("button",{type:"button",onClick:()=>de(A,ee.v,w),className:`px-3 py-1.5 rounded-full text-sm border ${A.includes(ee.v)?"bg-primary text-white border-primary":"bg-white text-gray-700 border-border"}`,children:ee.l},ee.v))}),s.jsxs("div",{className:"mb-2",children:[s.jsx("div",{className:"flex gap-2",children:s.jsx("input",{value:D,onChange:ee=>P(ee.target.value),onKeyDown:ee=>{if(ee.key==="Enter"||ee.key===","){ee.preventDefault();const Ae=D.trim().replace(/,$/,"");Ae&&!S.some(De=>De.toLowerCase()===Ae.toLowerCase())&&B([...S,Ae]),P("")}},placeholder:"Villes (Entrée pour ajouter)",className:"flex-1 border border-border rounded-xl px-4 py-3 focus:ring-2 focus:ring-primary focus:outline-none"})}),S.length>0&&s.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:S.map(ee=>s.jsxs("button",{type:"button",onClick:()=>B(S.filter(Ae=>Ae!==ee)),className:"px-3 py-1.5 rounded-full text-sm border bg-primary text-white border-primary",children:[ee," ×"]},ee))})]}),s.jsxs("div",{className:"mb-2",children:[s.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Centres d'intérêt"}),s.jsx("div",{className:"flex flex-wrap gap-2 max-h-40 overflow-y-auto p-1",children:YE.map(ee=>{const Ae=O.includes(ee);return s.jsx("button",{type:"button",onClick:()=>M(Ae?O.filter(De=>De!==ee):[...O,ee]),className:`px-3 py-1.5 rounded-full text-sm border ${Ae?"bg-primary text-white border-primary":"bg-white text-gray-700 border-border"}`,children:n8e(ee)},ee)})})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{type:"number",inputMode:"numeric",value:I,onChange:ee=>V(ee.target.value),placeholder:"Âge min.",className:"flex-1 border border-border rounded-xl px-4 py-3 focus:ring-2 focus:ring-primary focus:outline-none"}),s.jsx("input",{type:"number",inputMode:"numeric",value:W,onChange:ee=>_(ee.target.value),placeholder:"Âge max.",className:"flex-1 border border-border rounded-xl px-4 py-3 focus:ring-2 focus:ring-primary focus:outline-none"})]})]}),s.jsxs(Z.div,{variants:qn,children:[s.jsx("label",{className:"block text-sm font-medium text-gray-800 mb
284-1",children:"Budget"}),s.jsx("input",{type:"number",inputMode:"numeric",min:sc,step:1e3,value:i,onChange:ee=>a(ee.target.value),className:"w-full border border-border rounded-xl px-4 py-3 focus:ring-2 focus:ring-primary focus:outline-none"}),Q&&s.jsx("p",{className:"text-sm text-gray-700 mt-2",children:Q.message})]})]}),Le&&s.jsx("div",{className:`rounded-xl p-3 text-sm mt-4 border ${Le.sufficient===!1?"bg-amber-50 border-amber-300 text-amber-900":"bg-green-50 border-green-200 text-green-900"}`,children:Le.message}),H&&s.jsx("div",{className:"bg-red-50 border border-border rounded-xl p-3 text-sm text-red-800 mt-4",children:H}),s.jsxs("button",{onClick:ye,disabled:K,className:"w-full bg-primary text-white rounded-xl py-3 font-medium mt-5 disabled:bg-gray-400 flex items-center justify-center gap-2",children:[K&&s.jsx(L,{icon:Yt,className:"animate-spin"}),n?(ne==null?void 0:ne.status)==="rejected"?"Enregistrer et renvoyer en validation":"Enregistrer les modifications":"Envoyer à la validation"]})]})]})}function nH(){const{user:e,isAuthenticated:t}=Gt(),r=(e==null?void 0:e.id)||(e==null?void 0:e._id)||typeof window<"u"&&localStorage.getItem("userId")||void 0,{data:n,isLoading:i}=hr({queryKey:["current-subscription",r??"anonymous"],queryFn:async()=>{try{const c=await X.getCurrentSubscription();return Ve(c)}catch{return null}},enabled:t,staleTime:2*60*1e3,gcTime:5*60*1e3,refetchOnWindowFocus:!1,refetchOnMount:!0,retry:1}),a=n;return{isSubscribed:!!((a==null?void 0:a.status)==="active"||Array.isArray(a==null?void 0:a.subscriptions)&&a.subscriptions.some(c=>(c==null?void 0:c.status)==="active")||typeof(a==null?void 0:a.totalCount)=="number"&&a.totalCount>0),isLoading:t&&i}}function l4({message:e}){return s.jsxs("div",{className:"min-h-screen flex flex-col items-center justify-center bg-white gap-3",children:[s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary"}),e&&s.jsx("p",{className:"text-sm text-gray-500",children:e})]})}function c3e(){const{isAuthenticated:e,loading:t}=Gt(),r=Cr();if(t)return s.jsx(l4,{});if(!e){const n=Date.now()-parseInt(sessionStorage.getItem("justLoggedOutAt")||"0",10)<2e3;return s.jsx(wl,{to:n?"/connexion":"/splash-screen",state:{from:r},replace:!0})}return s.jsx(L4,{})}function u3e(){const{isAuthenticated:e,loading:t}=Gt(),{isSubscribed:r,isLoading:n}=nH(),i=Cr();if(t)return s.jsx(l4,{});if(!e){const a=Date.now()-parseInt(sessionStorage.getItem("justLoggedOutAt")||"0",10)<2e3;return s.jsx(wl,{to:a?"/connexion":"/splash-screen",state:{from:i},replace:!0})}return n?s.jsx(l4,{message:"Vérification de l'abonnement..."}):r?s.jsx(L4,{}):s.jsx(wl,{to:"/abonnement",replace:!0,state:{from:i}})}function sH({items:e,keyOf:t,renderCard:r,onSwipe:n,onTap:i,leftLabel:a,rightLabel:o,empty:l}){const c=oy(0),u=Lx(c,[-250,0,250],[-14,0,14]),f=Lx(c,[-400,-250,0,250,400],[0,1,1,1,0]),x=Lx(c,[40,160],[0,1]),m=Lx(c,[-160,-40],[1,0]);if(e.length===0)return s.jsx(s.Fragment,{children:l});const[p,...y]=e,v=y.slice(0,2),b=async(E,N)=>{await _k(c,N==="right"?600:-600,{duration:.22}),c.set(0),n(E,N)};return s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsxs("div",{className:"relative h-[62vh] min-h-80",children:[v.slice().reverse().map((E,N)=>{const j=v.length-N;return s.jsx("div",{"aria-hidden":!0,className:"absolute inset-0 rounded-card overflow-hidden border border-border bg-surface",style:{transform:`scale(${1-j*.04}) translateY(${j*-10}px)`,opacity:1-j*.25},children:r(E)},t(E))}),s.jsxs(Z.div,{drag:"x",style:{x:c,rotate:u,opacity:f},dragConstraints:{left:0,right:0},dragElastic:.6,onDragEnd:(E,N)=>{Math.abs(N.offset.x)>120||Math.abs(N.velocity.x)>600?b(p,N.offset.x>0?"right":"left"):_k(c,0,{type:"spring",stiffness:400,damping:30})},onClick:()=>{i&&Math.abs(c.get())<6&&i(p)},className:"absolute inset-0 rounded-card overflow-hidden border border-border bg-surface cursor-grab active:cursor-grabbing",children:[r(p),s.jsx(Z.span,{style:{opacity:x},className:"absolute top-5 left-5 border-2 border-success text-success font-extrabold tracking-wide px-3 py-1 rounded-tile rotate-[-12deg] bg-surface/80",children:o}),s.jsx(Z.span,{style:{opacity:m}
284,className:"absolute top-5 right-5 border-2 border-danger text-danger font-extrabold tracking-wide px-3 py-1 rounded-tile rotate-[12deg] bg-surface/80",children:a})]},t(p))]}),s.jsxs("div",{className:"flex items-center justify-center gap-6",children:[s.jsx("button",{onClick:()=>b(p,"left"),className:"size-14 grid place-items-center rounded-pill border border-border bg-surface text-danger text-2xl","aria-label":a,children:"✕"}),i&&s.jsx("button",{onClick:()=>i(p),className:"px-4 py-2 rounded-pill border border-border bg-surface text-sm text-ink-2",children:"Détails"}),s.jsx("button",{onClick:()=>b(p,"right"),className:"size-14 grid place-items-center rounded-pill bg-danger text-white text-2xl","aria-label":o,children:"♥"})]}),s.jsxs("p",{className:"text-center text-xs text-ink-3",children:["Glissez à droite pour ",o.toLowerCase(),", à gauche pour ",a.toLowerCase(),"."]})]})}function Jc({url:e,blurred:t,alt:r="",className:n=""}){return s.jsxs("div",{className:`relative overflow-hidden bg-surface-2 select-none ${n}`,children:[e?s.jsx("img",{src:e,alt:r,draggable:!1,onContextMenu:i=>i.preventDefault(),className:"h-full w-full object-cover pointer-events-none"}):s.jsx("div",{className:"h-full w-full grid place-items-center text-ink-3",children:s.jsx(L,{icon:Vre,size:28})}),s.jsx("span",{"aria-hidden":!0,className:"absolute inset-0 grid place-items-center text-white/40 font-bold tracking-widest text-xs rotate-[-20deg]",children:"SBCLOVE"}),t&&s.jsx("span",{className:"absolute bottom-1 left-1 right-1 text-[10px] text-white bg-black/50 rounded-pill px-2 py-0.5 text-center",children:"Photo floutée"})]})}function d3e(e){if(!e)return null;const t=new Date(e);return isNaN(t.getTime())?null:t.toLocaleDateString("fr-FR",{month:"long",year:"numeric"})}function x3e({profile:e,onClose:t,onInterest:r,onPass:n,onReport:i,onBlock:a,interestDisabled:o,interestLabel:l}){const c=d3e(e.memberSince);return s.jsx("div",{className:"fixed inset-0 z-[60] bg-black/50 flex items-end sm:items-center justify-center",onClick:t,children:s.jsxs(Z.div,{initial:{y:40,opacity:0},animate:{y:0,opacity:1},onClick:u=>u.stopPropagation(),className:"bg-surface w-full sm:max-w-md max-h-[90vh] overflow-y-auto rounded-t-card sm:rounded-card",children:[s.jsxs("div",{className:"sticky top-0 flex items-center justify-between bg-surface/95 backdrop-blur px-4 py-3 border-b border-border",children:[s.jsx("h2",{className:"font-bold text-ink",children:e.displayName}),s.jsx("button",{onClick:t,"aria-label":"Fermer",className:"p-1 text-ink-3",children:s.jsx(L,{icon:gt,size:20})})]}),s.jsx("div",{className:"flex gap-2 overflow-x-auto no-scrollbar snap-x snap-mandatory p-4",children:(e.photos.length?e.photos:[{fileId:"none",blurred:!1,order:0}]).map(u=>s.jsx(Jc,{url:u.url,blurred:u.blurred,alt:e.displayName,className:"w-64 h-72 shrink-0 snap-center rounded-card"},u.fileId))}),s.jsxs("div",{className:"px-4 pb-[max(1.5rem,env(safe-area-inset-bottom))] space-y-3",children:[s.jsx("p",{className:"text-sm text-ink-2",children:[e.ageBracket,e.city,e.country].filter(Boolean).join(" · ")}),s.jsx("p",{className:"text-sm font-medium text-primary",children:e.intention==="autre"&&e.otherIntentionText?e.otherIntentionText:Oh[e.intention]??e.intention}),s.jsx("p",{className:"text-sm text-ink whitespace-pre-line",children:e.description}),c&&s.jsxs("p",{className:"flex items-center gap-2 text-xs text-ink-3",children:[s.jsx(L,{icon:are,size:14}),"Membre SBC depuis ",c]}),s.jsxs("div",{className:"flex gap-2 pt-2",children:[s.jsx("button",{onClick:n,className:"flex-1 border border-border rounded-tile py-2.5 text-sm font-medium text-ink-2",children:"Passer"}),s.jsx("button",{onClick:r,disabled:o,className:"flex-1 bg-danger text-white rounded-tile py-2.5 text-sm font-semibold disabled:opacity-40",children:l})]}),s.jsxs("div",{className:"flex gap-4 justify-center pt-1",children:[s.jsxs("button",{onClick:i,className:"flex items-center gap-1 text-xs text-ink-3",children:[s.jsx(L,{icon:C$,size:14})," Signaler"]}),s.jsxs("button",{onClick:a,className:"flex items-center gap-1 text-xs text-ink-3",children:[s.jsx(L,{icon:zre,size:14})," Bloquer"]})]})]})]})})}
284function f3e({me:e,them:t,onSayHello:r,onLater:n,busy:i}){var a,o,l,c;return s.jsxs(Z.div,{initial:{opacity:0},animate:{opacity:1},className:"fixed inset-0 z-[60] bg-ink/95 flex flex-col items-center justify-center px-6 text-center",children:[s.jsxs("div",{className:"relative h-64 w-64 mb-8",children:[s.jsx(Z.div,{initial:{x:-60,rotate:-18,opacity:0},animate:{x:-28,rotate:-8,opacity:1},transition:{type:"spring",delay:.05},className:"absolute left-0 top-6 w-36 h-48 rounded-card overflow-hidden ring-4 ring-white/90",children:s.jsx(Jc,{url:(a=t.photos[0])==null?void 0:a.url,blurred:(o=t.photos[0])==null?void 0:o.blurred,alt:t.displayName,className:"h-full w-full"})}),s.jsx(Z.div,{initial:{x:60,rotate:18,opacity:0},animate:{x:28,rotate:8,opacity:1},transition:{type:"spring",delay:.12},className:"absolute right-0 top-0 w-36 h-48 rounded-card overflow-hidden ring-4 ring-white/90",children:s.jsx(Jc,{url:(l=e==null?void 0:e.photos[0])==null?void 0:l.url,blurred:(c=e==null?void 0:e.photos[0])==null?void 0:c.blurred,alt:"Votre photo",className:"h-full w-full"})}),s.jsx(Z.span,{initial:{scale:0},animate:{scale:1},transition:{type:"spring",delay:.3,stiffness:300},className:"absolute left-1/2 bottom-2 -translate-x-1/2 size-16 grid place-items-center rounded-pill bg-danger text-white ring-4 ring-ink/95",children:s.jsx(L,{icon:Mh,size:30})})]}),s.jsx("h2",{className:"text-3xl font-extrabold text-white",children:"C'est un match !!"}),s.jsxs("p",{className:"text-sm text-white/70 mt-2 max-w-xs",children:[t.displayName," a manifesté un intérêt pour vous aussi. Dites-lui que vous souhaitez être contacté(e) — le contact s'ouvre quand vous êtes d'accord tous les deux."]}),s.jsx("button",{onClick:r,disabled:i,className:"mt-8 w-full max-w-xs bg-white text-ink rounded-pill py-3.5 font-semibold disabled:opacity-60",children:i?"Un instant…":"Dire bonjour"}),s.jsx("button",{onClick:n,className:"mt-4 text-sm text-white/70 font-medium",children:"Plus tard, je verrai ça après"})]})}function h3e(){return hr({queryKey:["sbclove-interests"],queryFn:async()=>{var r;const e=await X.getMyLoveInterests();Ve(e);const t=e.body;return{sentTo:new Set(((t==null?void 0:t.data)??[]).map(n=>String(n.toUserId))),left:((r=t==null?void 0:t.meta)==null?void 0:r.interestsLeftThisWeek)??0}}})}function m3e({profile:e}){var t,r;return s.jsxs("div",{className:"relative h-full w-full",children:[s.jsx(Jc,{url:(t=e.photos[0])==null?void 0:t.url,blurred:(r=e.photos[0])==null?void 0:r.blurred,alt:e.displayName,className:"h-full w-full"}),e.city&&s.jsx("span",{className:"absolute top-4 right-4 text-xs bg-black/45 text-white rounded-pill px-3 py-1",children:e.city}),s.jsxs("div",{className:"absolute inset-x-0 bottom-0 p-4 pt-16 bg-gradient-to-t from-black/80 to-transparent text-white pointer-events-none",children:[s.jsxs("h3",{className:"text-xl font-bold",children:[e.displayName,e.ageBracket&&s.jsxs("span",{className:"font-normal text-white/80 text-base",children:[" · ",e.ageBracket]})]}),s.jsx("p",{className:"text-sm text-white/90",children:e.intention==="autre"&&e.otherIntentionText?e.otherIntentionText:Oh[e.intention]??e.intention}),s.jsx("p",{className:"text-xs text-white/70 line-clamp-2 mt-1",children:e.description})]})]})}function p3e({status:e,myProfile:t,onGoToMatches:r}){const n=x0(),[i,a]=C.useState(null),[o,l]=C.useState(new Set),[c,u]=C.useState(null),[f,x]=C.useState(null),[m,p]=C.useState(""),[y,v]=C.useState(null),b=(e==null?void 0:e.isOpen)===!0,E=(t==null?void 0:t.status)==="approved",{data:N,isLoading:j,error:A}=hr({queryKey:["sbclove-browse"],queryFn:async()=>Ve(await X.browseLoveProfiles(1,50)),enabled:b}),{data:w}=h3e(),S=ba({mutationFn:async _=>({profile:_,result:Ve(await X.expressLoveInterest(_.id))}),onSuccess:({profile:_,result:z})=>{z.matched&&z.matchId?(a(null),v({profile:_,matchId:z.matchId})):a({ok:!0,text:`Intérêt enregistré. Il vous en reste ${z.interestsLeft} cette semaine.`}),n.invalidateQueries({queryKey:["sbclove-browse"]}),n.invalidateQueries({queryKey:["sbclove-interests"]}),n.invalidateQueries({queryKey:["sbclove-matches"]})},onError:_=>a({ok:!1,text:_.message})}),B=ba({mutationFn:async _=>Ve(await X.setLoveContactChoice(_,"wants_contact")),onSuccess:()=>{v(null),n.invalidateQueries({queryKey:["sbclove-matches"]}),r()},onError:_=>{v(null),a({ok:!1,text:_.message})}}),D=ba({mutationFn:async _=>Ve(await X.blockLoveProfile(_)),onSuccess:()=>{a({ok:!0,text:"Profil bloqué. Vous ne le verrez plus."}),n.invalidateQueries({queryKey:["sbclove-browse"]})},onError:_=>a({ok:!1,text:_.message})}),P=ba({mutationFn:async({id:_,text:z})=>Ve(await X.reportLoveProfile(_,z)),onSuccess:()=>{x(null),p(""),a({ok:!0,text:"Signalement envoyé à la modération."})},onError:_=>a({ok:!1,text:_.message})});if(!b)return s.jsxs("div",{className:"bg-surface border border-border rounded-card p-6 text-center",children:[s.jsx("span",{className:"inline-grid place-items-center size-12 rounded-pill bg-danger-soft text-danger mb-3",children:s.jsx(L,{icon:w3,size:24})}),s.jsx("h3",{className:"font-semibold text-ink",children:"La session est fermée"}),s.jsxs("p",{className:"text-sm text-ink-2 mt-1",children:["SBC Love ouvre une fois par semaine. ",M3(e),"."]}),s.jsx("p",{className:"text-sm text-ink-3 mt-2",children:"En attendant, préparez votre profil dans l'onglet « Mon profil » — il sera validé avant l'ouverture."})]});const O=(N??[]).filter(_=>
284!o.has(_.id)&&!(w!=null&&w.sentTo.has(_.userId))),M=(w==null?void 0:w.left)??0,I=E&&M>0,V=_=>l(z=>new Set(z).add(_.id)),W=(_,z)=>{if(u(null),z==="left")return V(_);if(!I)return a({ok:!1,text:E?"Vous n'avez plus d'intérêt disponible cette semaine.":"Votre profil doit être approuvé pour manifester un intérêt."}),V(_);S.mutate(_)};return s.jsxs("div",{className:"space-y-3",children:[i&&s.jsx("p",{className:`text-sm rounded-card p-3 ${i.ok?"bg-success-soft text-success":"bg-danger-soft text-danger"}`,children:i.text}),!E&&s.jsx("p",{className:"bg-accent-soft text-ink-2 text-sm rounded-card p-3",children:"Les photos sont floutées et l'intérêt est désactivé tant que votre profil n'est pas approuvé."}),E&&w&&s.jsxs("p",{className:"text-sm text-ink-2",children:["Il vous reste ",s.jsx("strong",{className:"text-ink",children:M})," intérêt(s) cette semaine."]}),j&&s.jsx("p",{className:"text-sm text-ink-3",children:"Chargement des profils…"}),A&&s.jsx("p",{className:"bg-danger-soft text-danger text-sm rounded-card p-3",children:A.message}),!j&&!A&&s.jsx(sH,{items:O,keyOf:_=>_.id,renderCard:_=>s.jsx(m3e,{profile:_}),onSwipe:W,onTap:_=>u(_),leftLabel:"Passer",rightLabel:"Intérêt",empty:s.jsxs("div",{className:"bg-surface border border-border rounded-card p-6 text-center",children:[s.jsx("span",{className:"inline-grid place-items-center size-12 rounded-pill bg-danger-soft text-danger mb-3",children:s.jsx(L,{icon:Mh,size:24})}),s.jsx("h3",{className:"font-semibold text-ink",children:"Vous avez tout vu"}),s.jsx("p",{className:"text-sm text-ink-2 mt-1",children:"Plus aucun profil à découvrir pour cette session. Revenez à la prochaine."})]})}),y&&s.jsx(f3e,{me:t,them:y.profile,busy:B.isPending,onSayHello:()=>B.mutate(y.matchId),onLater:()=>v(null)}),c&&s.jsx(x3e,{profile:c,onClose:()=>u(null),onPass:()=>{V(c),u(null)},onInterest:()=>{u(null),W(c,"right")},onReport:()=>{x(c),p(""),u(null)},onBlock:()=>{confirm(`Bloquer ${c.displayName} ?`)&&(D.mutate(c.id),u(null))},interestDisabled:!I||S.isPending,interestLabel:"Manifester un intérêt"}),f&&s.jsx("div",{className:"fixed inset-0 z-[60] grid place-items-center bg-black/40 p-4",onClick:()=>x(null),children:s.jsxs("div",{className:"bg-surface rounded-card p-4 w-full max-w-sm space-y-3",onClick:_=>_.stopPropagation(),children:[s.jsxs("h3",{className:"font-semibold text-ink",children:["Signaler ",f.displayName]}),s.jsx("textarea",{value:m,rows:3,maxLength:500,onChange:_=>p(_.target.value),placeholder:"Motif du signalement",className:"w-full border border-border rounded-tile px-3 py-2 text-sm"}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("button",{onClick:()=>x(null),className:"flex-1 border border-border rounded-tile py-2 text-sm",children:"Annuler"}),s.jsx("button",{onClick:()=>P.mutate({id:f.id,text:m}),disabled:m.trim().length===0||P.isPending,className:"flex-1 bg-danger text-white rounded-tile py-2 text-sm font-semibold disabled:opacity-40",children:"Signaler"})]})]})})]})}function g3e({match:e}){return s.jsxs("div",{className:"relative h-full w-full",children:[s.jsx(Jc,{url:e.photoUrl,alt:e.displayName,className:"h-full w-full"}),e.city&&s.jsx("span",{className:"absolute top-4 right-4 text-xs bg-black/45 text-white rounded-pill px-3 py-1",children:e.city}),s.jsxs("div",{className:"absolute inset-x-0 bottom-0 p-4 pt-16 bg-gradient-to-t from-black/80 to-transparent text-white pointer-events-none",children:[s.jsx("span",{className:"inline-block text-[11px] font-semibold bg-danger rounded-pill px-2 py-0.5 mb-1",children:"MATCH"}),s.jsxs("h3",{className:"text-xl font-bold",children:[e.displayName,e.ageBracket&&s.jsxs("span",{className:"font-normal text-white/80 text-base",children:[" · ",e.ageBracket]})]}),e.intention&&s.jsx("p",{className:"text-sm text-white/90",children:Oh[e.intention]??e.intention}),s.jsx("p",{className:"text-xs text-white/70 mt-1",children:"Souhaitez-vous être contacté(e) par cette personne ?"})]})]})}function y3e(){const e=lt(),t=x0(),[r,n]=C.useState(null),{data:i,isLoading:a}=hr({queryKey:["sbclove-matches"],queryFn:async()=>Ve(await X.getMyLoveMatches())}
284),o=ba({mutationFn:async({matchId:x,choice:m})=>Ve(await X.setLoveContactChoice(x,m)),onSuccess:()=>{n(null),t.invalidateQueries({queryKey:["sbclove-matches"]})},onError:x=>n(x.message)}),l=ba({mutationFn:async x=>Ve(await X.openLoveMatchChat(x)),onSuccess:x=>e(`/chat?conversation=${x.conversationId}`),onError:x=>n(x.message)});if(a)return s.jsx("p",{className:"text-sm text-ink-3",children:"Chargement de vos matchs…"});const c=(i??[]).filter(x=>x.myChoice==="pending"),u=(i??[]).filter(x=>x.myChoice!=="pending");if(!(i!=null&&i.length))return s.jsxs("div",{className:"bg-surface border border-border rounded-card p-6 text-center",children:[s.jsx("span",{className:"inline-grid place-items-center size-12 rounded-pill bg-danger-soft text-danger mb-3",children:s.jsx(L,{icon:Mh,size:24})}),s.jsx("h3",{className:"font-semibold text-ink",children:"Pas encore de match"}),s.jsx("p",{className:"text-sm text-ink-2 mt-1",children:"Un match apparaît quand l'intérêt est réciproque. Vous recevrez aussi un email."})]});const f=(x,m)=>o.mutate({matchId:x.matchId,choice:m==="right"?"wants_contact":"declined"});return s.jsxs("div",{className:"space-y-4",children:[r&&s.jsx("p",{className:"bg-danger-soft text-danger text-sm rounded-card p-3",children:r}),c.length>0&&s.jsx(sH,{items:c,keyOf:x=>x.matchId,renderCard:x=>s.jsx(g3e,{match:x}),onSwipe:f,leftLabel:"Décliner",rightLabel:"Contact",empty:null}),u.map(x=>s.jsxs("div",{className:"bg-surface border border-border rounded-card overflow-hidden",children:[s.jsxs("div",{className:"flex gap-3 p-3",children:[s.jsx(Jc,{url:x.photoUrl,alt:x.displayName,className:"size-20 rounded-tile shrink-0"}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("h3",{className:"font-semibold text-ink",children:x.displayName}),s.jsx("p",{className:"text-xs text-ink-3",children:[x.ageBracket,x.city].filter(Boolean).join(" · ")}),x.intention&&s.jsx("p",{className:"text-xs text-primary mt-1",children:Oh[x.intention]??x.intention})]})]}),s.jsx("div",{className:"border-t border-border p-2",children:x.contactUnlocked?s.jsxs("button",{onClick:()=>l.mutate(x.matchId),disabled:l.isPending,className:"w-full flex items-center justify-center gap-2 bg-primary text-white rounded-tile py-2 text-sm font-semibold disabled:opacity-50",children:[s.jsx(L,{icon:dy,size:16}),"Discuter"]}):x.myChoice==="wants_contact"?s.jsx("p",{className:"text-sm text-ink-3 text-center py-1",children:"En attente de sa réponse. Le contact s'ouvre quand vous êtes d'accord tous les deux."}):s.jsx("p",{className:"text-sm text-ink-3 text-center py-1",children:"Vous avez décliné ce match."})})]},x.matchId))]})}const pL=300,v3e=80,b3e=50,gL=[{label:"Portrait",hint:"Visage bien visible"},{label:"Photo en pied",hint:"Corps entier"}],C3e={pending:{label:"En validation",className:"bg-accent-soft text-accent",hint:"Votre profil est en cours de validation. Il sera visible dès qu'il sera approuvé."},approved:{label:"Approuvé",className:"bg-success-soft text-success",hint:"Votre profil est visible pendant les sessions et vous pouvez manifester un intérêt."},rejected:{label:"Refusé",className:"bg-danger-soft text-danger",hint:"Votre profil a été refusé. Modifiez-le pour le soumettre à nouveau."},suspended:{label:"Suspendu",className:"bg-danger-soft text-danger",hint:"Votre profil est suspendu suite à des signalements. Contactez le support."}};function w3e({profile:e,status:t}){const r=(t==null?void 0:t.minPhotos)??gL.length,n=(t==null?void 0:t.maxPhotos)??3,i=x0(),a=C.useRef(null),[o,l]=C.useState(null),[c,u]=C.useState(null),[f,x]=C.useState({displayName:(e==null?void 0:e.displayName)??"",intention:(e==null?void 0:e.intention)??"faire_connaissance",otherIntentionText:(e==null?void 0:e.otherIntentionText)??"",description:(e==null?void 0:e.description)??""});C.useEffect(()=>{e&&x({displayName:e.displayName??"",intention:e.intention,otherIntentionText:e.otherIntentionText??"",description:e.description})},[e]);const m=()=>i.invalidateQueries({queryKey:["sbclove-my-profile"]}),p=ba({mutationFn:async()=>{const A={displayName:f.displayName.trim()||void 0,intention:f.intention,otherIntentionText:f.intention==="autre"?f.otherIntentionText.trim():void 0,description:f.description.trim()};return Ve(e?await X.updateLoveProfile(A):await X.createLoveProfile(A))},onSuccess:()=>{l(null),u("Profil enregistré. Il repasse en validation."),m()},onError:A=>{u(null),l(A.message)}}),y=ba({mutationFn:async A=>Ve(await X.uploadLovePhotos(A)),onSuccess:()=>{l(null),u("Photo(s) ajoutée(s)."),m()},onError:A=>{u(null),l(A.message)}}),v=ba({mutationFn:async A=>Ve(await X.deleteLovePhoto(A)),onSuccess:()=>{l(null),m()},onError:A=>{u(null),l(A.message)}}),b=(e==null?void 0:e.photos)??[],E=Math.max(0,r-b.length),N=e?C3e[e.status]:null,j=p.isPending||y.isPending;return s.jsxs("div",{className:"space-y-4",children:[N&&s.jsxs("div",{className:"bg-surface border border-border rounded-card p-4",children:[s.jsx("span",{className:`inline-block text-xs font-semibold rounded-pill px-2 py-1 ${N.className}`,children:N.label}),s.jsx("p",{className:"text-sm text-ink-2 mt-2",children:N.hint})]}),o&&s.jsx("p",{className:"bg-danger-soft text-danger text-sm rounded-card p-3",children:o}),c&&s.jsx("p",{className:"bg-success-soft text-success text-sm rounded-card p-3",children:c}),s.jsxs("form",{className:"bg-surface border border-border rounded-card p-4 space-y-4",onSubmit:A=>{A.preventDefault(),p.mutate()},children:[s.jsxs("label",{className:"block",children:[s.jsx("span",{className:"text-sm font-medium text-ink",children:"Pseudo (optionnel)"}),s.jsx("input",{value:f.displayName,maxLength:b3e,onChange:A=>
284x({...f,displayName:A.target.value}),placeholder:"Votre prénom SBC par défaut",className:"mt-1 w-full border border-border rounded-tile px-3 py-2 text-sm"})]}),s.jsxs("label",{className:"block",children:[s.jsx("span",{className:"text-sm font-medium text-ink",children:"Intention"}),s.jsx("select",{value:f.intention,onChange:A=>x({...f,intention:A.target.value}),className:"mt-1 w-full border border-border rounded-tile px-3 py-2 text-sm bg-surface",children:Object.entries(Oh).map(([A,w])=>s.jsx("option",{value:A,children:w},A))})]}),f.intention==="autre"&&s.jsxs("label",{className:"block",children:[s.jsx("span",{className:"text-sm font-medium text-ink",children:"Précisez votre intention"}),s.jsx("input",{value:f.otherIntentionText,maxLength:v3e,onChange:A=>x({...f,otherIntentionText:A.target.value}),className:"mt-1 w-full border border-border rounded-tile px-3 py-2 text-sm"})]}),s.jsxs("label",{className:"block",children:[s.jsx("span",{className:"text-sm font-medium text-ink",children:"Description"}),s.jsx("textarea",{value:f.description,maxLength:pL,rows:4,onChange:A=>x({...f,description:A.target.value}),placeholder:"Parlez de vous, de ce que vous recherchez…",className:"mt-1 w-full border border-border rounded-tile px-3 py-2 text-sm"}),s.jsxs("span",{className:"block text-xs text-ink-3 mt-1",children:[f.description.length,"/",pL," — numéros, réseaux sociaux et liens sont interdits."]})]}),s.jsx("button",{type:"submit",disabled:j||f.description.trim().length===0,className:"w-full bg-primary text-white rounded-tile py-2.5 font-semibold text-sm disabled:opacity-50",children:p.isPending?"Enregistrement…":e?"Enregistrer les modifications":"Créer mon profil"})]}),s.jsxs("div",{className:"bg-surface border border-border rounded-card p-4",children:[s.jsxs("h3",{className:"font-semibold text-ink text-sm",children:["Photos (",b.length,"/",n,")"]}),s.jsx("p",{className:"text-xs text-ink-3 mt-1",children:e?`${r} photos réelles minimum : un portrait et une photo en pied. Les membres sans profil approuvé ne voient qu’une version floutée.`:"Créez d’abord votre profil, puis ajoutez vos photos — il ne sera validé qu’avec elles."}),e&&E>0&&s.jsxs("p",{className:"bg-accent-soft text-ink-2 text-xs rounded-tile p-2 mt-2",children:["Encore ",E," photo(s) à ajouter : votre profil ne peut pas être approuvé avant."]}),s.jsx("div",{className:"grid grid-cols-3 gap-2 mt-3",children:Array.from({length:n}).map((A,w)=>{const S=b[w],B=gL[w];if(S)return s.jsxs("div",{className:"relative",children:[s.jsx(Jc,{url:S.url,blurred:S.blurred,className:"aspect-square rounded-tile"}),B&&s.jsx("span",{className:"absolute bottom-1 left-1 right-1 text-[10px] text-white bg-black/55 rounded-pill px-1 py-0.5 text-center",children:B.label}),s.jsx("button",{type:"button","aria-label":"Supprimer la photo",onClick:()=>v.mutate(S.fileId),className:"absolute top-1 right-1 bg-black/60 text-white rounded-pill p-1",children:s.jsx(L,{icon:kd,size:14})})]},S.fileId);const D=w===b.length;return s.jsxs("button",{type:"button",onClick:()=>{var P;return(P=a.current)==null?void 0:P.click()},disabled:!e||!D||y.isPending,className:`aspect-square rounded-tile border border-dashed grid place-items-center gap-1 p-1 text-center ${D&&e?"border-primary text-primary":"border-border text-ink-3"} disabled:opacity-50`,children:[s.jsx(L,{icon:y.isPending&&D?Yt:bre,size:20,className:y.isPending&&D?"animate-spin":""}),B?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-[10px] font-semibold leading-tight",children:B.label}),s.jsx("span",{className:"text-[9px] leading-tight",children:B.hint})]}):s.jsx("span",{className:"text-[10px] leading-tight",children:"Optionnelle"})]},`slot-${w}`)})}),s.jsx("input",{ref:a,type:"file",accept:"image/*",multiple:!0,hidden:!0,onChange:A=>{const w=Array.from(A.target.files??[]).slice(0,n-b.length);w.length&&y.mutate(w),A.target.value=""}})]})]})}const E3e=[{key:"browse",label:"Découvrir"},{key:"matches",label:"Mes matchs"},{key:"profile",label:"Mon profil"}];function j3e(){const{data:e,isLoading:t}=uz({poll:!0}),{data:r,isLoading:n}=hr({queryKey:["sbclove-my-profile"],queryFn:async()=>{const o=await X.getMyLoveProfile();return o.statusCode===404?null:Ve(o)}}),[i,a]=C.useState("browse");return(e==null?void 0:e.enabled)===!1?s.jsx(o4,{title:"SBC Love",subtitle:"Rencontres SBC",illustration:Ew,children:s.jsxs("div",{className:"bg-surface border border-border rounded-card p-6 text-center",children:[s.jsx("span",{className:"inline-grid place-items-center size-12 rounded-pill bg-surface-2 text-ink-3 mb-3",children:s.jsx(L,{icon:Vc,size:24})}),s.jsx("h3",{className:"font-semibold text-ink",children:"Module indisponible"}),s.jsx("p",{className:"text-sm text-ink-2 mt-1",children:"SBC Love est temporairement désactivé. Revenez bientôt."})]})}):s.jsxs(o4,{title:"SBC Love",subtitle:"Une session par semaine, des rencontres sérieuses et modérées.",illustration:Ew,children:[s.jsxs("div",{className:`flex items-center gap-2 rounded-card p-3 mb-4 text-sm ${e!=null&&e.isOpen?"bg-success-soft text-success":"bg-surface border border-border text-ink-2"}`,children:[s.jsx(L,{icon:w3,size:18}),t?"Vérification de la session…":M3(e)]}),s.jsx("div",{className:"flex gap-1 bg-surface-2 rounded-pill p-1 mb-4",children:E3e.map(o=>s.jsx("button",{onClick:()=>a(o.key),className:`flex-1 rounded-pill py-2 text-sm font-medium ${i===o.key?"bg-surface text-ink":"text-ink-3"}`,children:o.label},o.key))}),i==="browse"&&s.jsx(p3e,{status:e,myProfile:r??null,onGoToMatches:()=>a("matches")}),i==="matches"&&s.jsx(y3e,{}),i==="profile"&&(n?s.jsx("p",{className:"text-sm text-ink-3",children:"Chargement de votre profil…"}):s.jsx(w3e,{profile:r??null,status:e}))]})}const iH=C.createContext({});function N3e(e){const t=C.useRef(null);return t.current===null&&(t.current=e()),t.current}const oj=typeof window<"u",A3e=oj?C.useLayoutEffect:C.useEffect,lj=C.createContext(null);function cj(e,t){e.indexOf(t)===-1&&e.push(t)}function uj(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}const No=(e,t,r)=>r>t?t:r<e?e:r;let dj=()=>{};const Ao={},aH=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function oH(e){return typeof e=="object"&&e!==null}const lH=e=>/^0[^.\s]+$/u.test(e);function xj(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ei=e=>e,k3e=(e,t)=>
vendor: 11,641 bytes, line 284
284r=>t(e(r)),tm=(...e)=>e.reduce(k3e),fh=(e,t,r)=>{const n=t-e;return n===0?1:(r-e)/n};class fj{constructor(){this.subscriptions=[]}add(t){return cj(this.subscriptions,t),()=>uj(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 a=0;a<i;a++){const o=this.subscriptions[a];o&&o(t,r,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ta=e=>e*1e3,Ma=e=>e/1e3;function cH(e,t){return t?e*(1e3/t):0}const uH=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,S3e=1e-7,B3e=12;function D3e(e,t,r,n,i){let a,o,l=0;do o=t+(r-t)/2,a=uH(o,n,i)-e,a>0?r=o:t=o;while(Math.abs(a)>S3e&&++l<B3e);return o}function rm(e,t,r,n){if(e===t&&r===n)return Ei;const i=a=>D3e(a,0,1,e,r);return a=>a===0||a===1?a:uH(i(a),t,n)}const dH=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,xH=e=>t=>1-e(1-t),fH=rm(.33,1.53,.69,.99),hj=xH(fH),hH=dH(hj),mH=e=>(e*=2)<1?.5*hj(e):.5*(2-Math.pow(2,-10*(e-1))),mj=e=>1-Math.sin(Math.acos(e)),pH=xH(mj),gH=dH(mj),F3e=rm(.42,0,1,1),P3e=rm(0,0,.58,1),yH=rm(.42,0,.58,1),T3e=e=>Array.isArray(e)&&typeof e[0]!="number",vH=e=>Array.isArray(e)&&typeof e[0]=="number",M3e={linear:Ei,easeIn:F3e,easeInOut:yH,easeOut:P3e,circIn:mj,circInOut:gH,circOut:pH,backIn:hj,backInOut:hH,backOut:fH,anticipate:mH},O3e=e=>typeof e=="string",yL=e=>{if(vH(e)){dj(e.length===4);const[t,r,n,i]=e;return rm(t,r,n,i)}else if(O3e(e))return M3e[e];return e},$p=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],vL={value:null};function L3e(e,t){let r=new Set,n=new Set,i=!1,a=!1;const o=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1},c=0;function u(x){o.has(x)&&(f.schedule(x),e()),c++,x(l)}const f={schedule:(x,m=!1,p=!1)=>{const v=p&&i?r:n;return m&&o.add(x),v.has(x)||v.add(x),x},cancel:x=>{n.delete(x),o.delete(x)},process:x=>{if(l=x,i){a=!0;return}i=!0,[r,n]=[n,r],r.forEach(u),t&&vL.value&&vL.value.frameloop[t].push(c),c=0,r.clear(),i=!1,a&&(a=!1,f.process(x))}};return f}const R3e=40;function bH(e,t){let r=!1,n=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>r=!0,o=$p.reduce((j,A)=>(j[A]=L3e(a,t?A:void 0),j),{}),{setup:l,read:c,resolveKeyframes:u,preUpdate:f,update:x,preRender:m,render:p,postRender:y}=o,v=()=>{const j=Ao.useManualTiming?i.timestamp:performance.now();r=!1,Ao.useManualTiming||(i.delta=n?1e3/60:Math.max(Math.min(j-i.timestamp,R3e),1)),i.timestamp=j,i.isProcessing=!0,l.process(i),c.process(i),u.process(i),f.process(i),x.process(i),m.process(i),p.process(i),y.process(i),i.isProcessing=!1,r&&t&&(n=!1,e(v))},b=()=>{r=!0,n=!0,i.isProcessing||e(v)};return{schedule:$p.reduce((j,A)=>{const w=o[A];return j[A]=(S,B=!1,D=!1)=>(r||b(),w.schedule(S,B,D)),j},{}),cancel:j=>{for(let A=0;A<$p.length;A++)o[$p[A]].cancel(j)},state:i,steps:o}}const{schedule:Hr,cancel:Fl,state:Un,steps:EC}=bH(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ei,!0);let fg;function _3e(){fg=void 0}const $s={now:()=>(fg===void 0&&$s.set(Un.isProcessing||Ao.useManualTiming?Un.timestamp:performance.now()),fg),set:e=>{fg=e,queueMicrotask(_3e)}},CH=e=>t=>typeof t=="string"&&t.startsWith(e),pj=CH("--"),I3e=CH("var(--"),gj=e=>I3e(e)?$3e.test(e.split("/*")[0].trim()):!1,$3e=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,S0={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},hh={...S0,transform:e=>No(0,1,e)},zp={...S0,default:1},of=e=>Math.round(e*1e5)/1e5,yj=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function z3e(e){return e==null}const V3e=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,vj=(e,t)=>r=>!!(typeof r=="string"&&V3e.test(r)&&r.startsWith(e)||t&&!z3e(r)&&Object.prototype.hasOwnProperty.call(r,t)),wH=(e,t,r)=>n=>{if(typeof n!="string")return n;const[i,a,o,l]=n.match(yj);return{[e]:parseFloat(i),[t]:parseFloat(a),[r]:parseFloat(o),alpha:l!==void 0?parseFloat(l):1}},U3e=e=>No(0,255,e),jC={...S0,transform:e=>Math.round(U3e(e))},bc={test:vj("rgb","red"),parse:wH("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+jC.transform(e)+", "+jC.transform(t)+", "+jC.transform(r)+", "+of(hh.transform(n))+")"};function q3e(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 c4={test:vj("#"),parse:q3e,transform:bc.transform},nm=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),rl=nm("deg"),Oa=nm("%"),St=nm("px"),W3e=nm("vh"),H3e=nm("vw"),bL={...Oa,parse:e=>Oa.parse(e)/100,transform:e=>Oa.transform(e*100)},Ju={test:vj("hsl","hue"),parse:wH("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+Oa.transform(of(t))+", "+Oa.transform(of(r))+", "+of(hh.transform(n))+")"},es={test:e=>bc.test(e)||c4.test(e)||Ju.test(e),parse:e=>bc.test(e)?bc.parse(e):Ju.test(e)?Ju.parse(e):c4.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?bc.transform(e):Ju.transform(e)},G3e=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function K3e(e){var t,r;return isNaN(e)&&typeof e=="string"&&(((t=e.match(yj))==null?void 0:t.length)||0)+(((r=e.match(G3e))==null?void 0:r.length)||0)>0}const EH="number",jH="color",X3e="var",Y3e="var(",CL="${}",Q3e=/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 mh(e){const t=e.toString(),r=[],n={color:[],number:[],var:[]},i=[];let a=0;const l=t.replace(Q3e,c=>(es.test(c)?(n.color.push(a),i.push(jH),r.push(es.parse(c))):c.startsWith(Y3e)?(n.var.push(a),i.push(X3e),r.push(c)):(n.number.push(a),i.push(EH),r.push(parseFloat(c))),++a,CL)).split(CL);return{values:r,split:l,indexes:n,types:i}}function NH(e){return mh(e).values}function AH(e){const{split:t,types:r}=mh(e),n=t.length;return i=>{let a="";for(let o=0;o<n;o++)if(a+=t[o],i[o]!==void 0){const l=r[o];l===EH?a+=of(i[o]):l===jH?a+=es.transform(i[o]):a+=i[o]}return a}}const Z3e=e=>typeof e=="number"?0:e;function J3e(e){const t=NH(e);return AH(e)(t.map(Z3e))}const Pl={test:K3e,parse:NH,createTransformer:AH,getAnimatableNone:J3e};function NC(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 eEe({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let i=0,a=0,o=0;if(!t)i=a=o=r;else{const l=r<.5?r*(1+t):r+t-r*t,c=2*r-l;i=NC(c,l,e+1/3),a=NC(c,l,e),o=NC(c,l,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:n}}function q1(e,t){return r=>r>0?t:e}const Wr=(e,t,r)=>e+(t-e)*r,AC=(e,t,r)=>{const n=e*e,i=r*(t*t-n)+n;return i<0?0:Math.sqrt(i)},tEe=[c4,bc,Ju],rEe=e=>tEe.find(t=>t.test(e));function wL(e){const t=rEe(e);if(!t)return!1;let r=t.parse(e);return t===Ju&&(r=eEe(r)),r}const EL=(e,t)=>{const r=wL(e),n=wL(t);if(!r||!n)return q1(e,t);const i={...r};return a=>(i.red=AC(r.red,n.red,a),i.green=AC(r.green,n.green,a),i.blue=AC(r.blue,n.blue,a),i.alpha=Wr(r.alpha,n.alpha,a),bc.transform(i))},u4=new Set(["none","hidden"]);function nEe(e,t){return u4.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function sEe(e,t){return r=>Wr(e,t,r)}function bj(e){return typeof e=="number"?sEe:typeof e=="string"?gj(e)?q1:es.test(e)?EL:oEe:Array.isArray(e)?kH:typeof e=="object"?es.test(e)?EL:iEe:q1}function kH(e,t){const r=[...e],n=r.length,i=e.map((a,o)=>bj(a)(a,t[o]));return a=>{for(let o=0;o<n;o++)r[o]=i[o](a);return r}}function iEe(e,t){const r={...e,...t},n={};for(const i in r)e[i]!==void 0&&t[i]!==void 0&&(n[i]=bj(e[i])(e[i],t[i]));return i=>{for(const a in n)r[a]=n[a](i);return r}}function aEe(e,t){const r=[],n={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],o=e.indexes[a][n[a]],l=e.values[o]??0;r[i]=l,n[a]++}return r}const oEe=(e,t)=>{const r=Pl.createTransformer(t),n=mh(e),i=mh(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?u4.has(e)&&!i.values.length||u4.has(t)&&!n.values.length?nEe(e,t):tm(kH(aEe(n,i),i.values),r):q1(e,t)};function SH(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?Wr(e,t,r):bj(e)(e,t)}const lEe=e=>{const t=({timestamp:r})=>e(r);return{start:(r=!0)=>Hr.update(t,r),stop:()=>Fl(t),now:()=>Un.isProcessing?Un.timestamp:$s.now()}},BH=(e,t,r=10)=>{let n="";const i=Math.max(Math.round(t/r),2);for(let a=0;a<i;a++)n+=Math.round(e(a/(i-1))*1e4)/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},W1=2e4;function Cj(e){let t=0;const r=50;let n=e.next(t);for(;!n.done&&t<W1;)t+=r,n=e.next(t);return t>=W1?1/0:t}function cEe(e,t=100,r){const n=r({...e,keyframes:[0,t]}),i=Math.min(Cj(n),W1);return{type:"keyframes",ease:a=>n.next(i*a).value/t,duration:Ma(i)}}const uEe=5;function DH(e,t,r){const n=Math.max(t-uEe,0);return cH(r-e(n),t-n)}const en={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},jL=.001;function dEe({duration:e=en.duration,bounce:t=en.bounce,velocity:r=en.velocity,mass:n=en.mass}){let i,a,o=1-t;o=No(en.minDamping,en.maxDamping,o),e=No(en.minDuration,en.maxDuration,Ma(e)),o<1?(i=u=>{const f=u*o,x=f*e,m=f-r,p=d4(u,o),y=Math.exp(-x);return jL-m/p*y},a=u=>{const x=u*o*e,m=x*r+r,p=Math.pow(o,2)*Math.pow(u,2)*e,y=Math.exp(-x),v=d4(Math.pow(u,2),o);return(-i(u)+jL>0?-1:1)*((m-p)*y)/v}):(i=u=>{const f=Math.exp(-u*e),x=(u-r)*e+1;return-.001+f*x},a=u=>{const f=Math.exp(-u*e),x=(r-u)*(e*e);return f*x});const l=5/e,c=fEe(i,a,l);if(e=Ta(e),isNaN(c))return{stiffness:en.stiffness,damping:en.damping,duration:e};{const u=Math.pow(c,2)*n;return{stiffness:u,damping:o*2*Math.sqrt(n*u),duration:e}}}const xEe=12;function fEe(e,t,r){let n=r;for(let i=1;i<xEe;i++)n=n-e(n)/t(n);return n}function d4(e,t){return e*Math.sqrt(1-t*t)}const hEe=["duration","bounce"],mEe=["stiffness","damping","mass"];function NL(e,t){return t.some(r=>e[r]!==void 0)}function pEe(e){let t={velocity:en.velocity,stiffness:en.stiffness,damping:en.damping,mass:en.mass,isResolvedFromDuration:!1,...e};if(!NL(e,mEe)&&NL(e,hEe))if(e.visualDuration){const r=e.visualDuration,n=2*Math.PI/(r*1.2),i=n*n,a=2*No(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:en.mass,stiffness:i,damping:a}}else{const r=dEe(e);t={...t,...r,mass:en.mass},t.isResolvedFromDuration=!0}return t}function H1(e=en.visualDuration,t=en.bounce){const r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:n,restDelta:i}=r;const a=r.keyframes[0],o=r.keyframes[r.keyframes.length-1],l={done:!1,value:a},{stiffness:c,damping:u,mass:f,duration:x,velocity:m,isResolvedFromDuration:p}=pEe({...r,velocity:-Ma(r.velocity||0)}),y=m||0,v=u/(2*Math.sqrt(c*f)),b=o-a,E=Ma(Math.sqrt(c/f)),N=Math.abs(b)<5;n||(n=N?en.restSpeed.granular:en.restSpeed.default),i||(i=N?en.restDelta.granular:en.restDelta.default);let j;if(v<1){const w=d4(E,v);j=S=>{const B=Math.exp(-v*E*S);return o-B*((y+v*E*b)/w*Math.sin(w*S)+b*Math.cos(w*S))}}else if(v===1)j=w=>o-Math.exp(-E*w)*(b+(y+E*b)*w);else{const w=E*Math.sqrt(v*v-1);j=S=>{const B=Math.exp(-v*E*S),D=Math.min(w*S,300);return o-B*((y+v*E*b)*Math.sinh(D)+w*b*Math.cosh(D))/w}}
284const A={calculatedDuration:p&&x||null,next:w=>{const S=j(w);if(p)l.done=w>=x;else{let B=w===0?y:0;v<1&&(B=w===0?Ta(y):DH(j,w,S));const D=Math.abs(B)<=n,P=Math.abs(o-S)<=i;l.done=D&&P}return l.value=l.done?o:S,l},toString:()=>{const w=Math.min(Cj(A),W1),S=BH(B=>A.next(w*B).value,w,30);return w+"ms "+S},toTransition:()=>{}};return A}H1.applyToOptions=e=>{const t=cEe(e,100,H1);return e.ease=t.ease,e.duration=Ta(t.duration),e.type="keyframes",e};function x4({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:l,max:c,restDelta:u=.5,restSpeed:f}){const x=e[0],m={done:!1,value:x},p=D=>l!==void 0&&D<l||c!==void 0&&D>c,y=D=>l===void 0?c:c===void 0||Math.abs(l-D)<Math.abs(c-D)?l:c;let v=r*t;const b=x+v,E=o===void 0?b:o(b);E!==b&&(v=E-x);const N=D=>-v*Math.exp(-D/n),j=D=>E+N(D),A=D=>{const P=N(D),O=j(D);m.done=Math.abs(P)<=u,m.value=m.done?E:O};let w,S;const B=D=>{p(m.value)&&(w=D,S=H1({keyframes:[m.value,y(m.value)],velocity:DH(j,D,m.value),damping:i,stiffness:a,restDelta:u,restSpeed:f}))};return B(0),{calculatedDuration:null,next:D=>{let P=!1;return!S&&w===void 0&&(P=!0,A(D),B(D)),w!==void 0&&D>=w?S.next(D-w):(!P&&A(D),m)}}}function gEe(e,t,r){const n=[],i=r||Ao.mix||SH,a=e.length-1;for(let o=0;o<a;o++){let l=i(e[o],e[o+1]);if(t){const c=Array.isArray(t)?t[o]||Ei:t;l=tm(c,l)}n.push(l)}return n}function yEe(e,t,{clamp:r=!0,ease:n,mixer:i}={}){const a=e.length;if(dj(a===t.length),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=gEe(t,n,i),c=l.length,u=f=>{if(o&&f<e[0])return t[0];let x=0;if(c>1)for(;x<e.length-2&&!(f<e[x+1]);x++);const m=fh(e[x],e[x+1],f);return l[x](m)};return r?f=>u(No(e[0],e[a-1],f)):u}function vEe(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const i=fh(0,t,n);e.push(Wr(r,1,i))}}function bEe(e){const t=[0];return vEe(t,e.length-1),t}function CEe(e,t){return e.map(r=>r*t)}function wEe(e,t){return e.map(()=>t||yH).splice(0,e.length-1)}function lf({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){const i=T3e(n)?n.map(yL):yL(n),a={done:!1,value:t[0]},o=CEe(r&&r.length===t.length?r:bEe(t),e),l=yEe(o,t,{ease:Array.isArray(i)?i:wEe(t,i)});return{calculatedDuration:e,next:c=>(a.value=l(c),a.done=c>=e,a)}}const EEe=e=>e!==null;function wj(e,{repeat:t,repeatType:r="loop"},n,i=1){const a=e.filter(EEe),l=i<0||t&&r!=="loop"&&t%2===1?0:a.length-1;return!l||n===void 0?a[l]:n}const jEe={decay:x4,inertia:x4,tween:lf,keyframes:lf,spring:H1};function FH(e){typeof e.type=="string"&&(e.type=jEe[e.type])}class Ej{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,r){return this.finished.then(t,r)}}const NEe=e=>e/100;
284class jj extends Ej{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var n,i;const{motionValue:r}=this.options;r&&r.updatedAt!==$s.now()&&this.tick($s.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(n=this.options).onStop)==null||i.call(n))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;FH(t);const{type:r=lf,repeat:n=0,repeatDelay:i=0,repeatType:a,velocity:o=0}=t;let{keyframes:l}=t;const c=r||lf;c!==lf&&typeof l[0]!="number"&&(this.mixKeyframes=tm(NEe,SH(l[0],l[1])),l=[0,100]);const u=c({...t,keyframes:l});a==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...l].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=Cj(u));const{calculatedDuration:f}=u;this.calculatedDuration=f,this.resolvedDuration=f+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=u}updateTime(t){const r=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(t,r=!1){const{generator:n,totalDuration:i,mixKeyframes:a,mirroredGenerator:o,resolvedDuration:l,calculatedDuration:c}=this;if(this.startTime===null)return n.next(0);const{delay:u=0,keyframes:f,repeat:x,repeatType:m,repeatDelay:p,type:y,onUpdate:v,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),r?this.currentTime=t:this.updateTime(t);const E=this.currentTime-u*(this.playbackSpeed>=0?1:-1),N=this.playbackSpeed>=0?E<0:E>i;this.currentTime=Math.max(E,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let j=this.currentTime,A=n;if(x){const D=Math.min(this.currentTime,i)/l;let P=Math.floor(D),O=D%1;!O&&D>=1&&(O=1),O===1&&P--,P=Math.min(P,x+1),!!(P%2)&&(m==="reverse"?(O=1-O,p&&(O-=p/l)):m==="mirror"&&(A=o)),j=No(0,1,O)*l}const w=N?{done:!1,value:f[0]}:A.next(j);a&&(w.value=a(w.value));let{done:S}=w;!N&&c!==null&&(S=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const B=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return B&&y!==x4&&(w.value=wj(f,this.options,b,this.speed)),v&&v(w.value),B&&this.finish(),w}then(t,r){return this.finished.then(t,r)}get duration(){return Ma(this.calculatedDuration)}get time(){return Ma(this.currentTime)}set time(t){var r;t=Ta(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(r=this.driver)==null||r.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime($s.now());const r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=Ma(this.currentTime))}play(){var i,a;if(this.isStopped)return;const{driver:t=lEe,startTime:r}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(a=(i=this.options).onPlay)==null||a.call(i);const n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=r??n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime($s.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,r;this.notifyFinished(),this.teardown(),this.state="finished",(r=(t=this.options).onComplete)==null||r.call(t)}cancel(){var t,r;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(r=(t=this.options).onCancel)==null||r.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var r;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(r=this.driver)==null||r.stop(),t.observe(this)}}function AEe(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Cc=e=>e*180/Math.PI,f4=e=>{const t=Cc(Math.atan2(e[1],e[0]));
284return h4(t)},kEe={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:f4,rotateZ:f4,skewX:e=>Cc(Math.atan(e[1])),skewY:e=>Cc(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},h4=e=>(e=e%360,e<0&&(e+=360),e),AL=f4,kL=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),SL=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),SEe={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:kL,scaleY:SL,scale:e=>(kL(e)+SL(e))/2,rotateX:e=>h4(Cc(Math.atan2(e[6],e[5]))),rotateY:e=>h4(Cc(Math.atan2(-e[2],e[0]))),rotateZ:AL,rotate:AL,skewX:e=>Cc(Math.atan(e[4])),skewY:e=>Cc(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function m4(e){return e.includes("scale")?1:0}function p4(e,t){if(!e||e==="none")return m4(t);const r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,i;if(r)n=SEe,i=r;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=kEe,i=l}if(!i)return m4(t);const a=n[t],o=i[1].split(",").map(DEe);return typeof a=="function"?a(o):o[a]}const BEe=(e,t)=>{const{transform:r="none"}=getComputedStyle(e);return p4(r,t)};function DEe(e){return parseFloat(e.trim())}const B0=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],D0=new Set(B0),BL=e=>e===S0||e===St,FEe=new Set(["x","y","z"]),PEe=B0.filter(e=>!FEe.has(e));function TEe(e){const t=[];return PEe.forEach(r=>{const n=e.getValue(r);n!==void 0&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t}const Lc={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:(e,{transform:t})=>p4(t,"x"),y:(e,{transform:t})=>p4(t,"y")};Lc.translateX=Lc.x;Lc.translateY=Lc.y;const Rc=new Set;let g4=!1,y4=!1,v4=!1;function PH(){if(y4){const e=Array.from(Rc).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),r=new Map;t.forEach(n=>{const i=TEe(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(([a,o])=>{var l;(l=n.getValue(a))==null||l.set(o)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}y4=!1,g4=!1,Rc.forEach(e=>e.complete(v4)),Rc.clear()}function TH(){Rc.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(y4=!0)})}function MEe(){v4=!0,TH(),PH(),v4=!1}class Nj{constructor(t,r,n,i,a,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=n,this.motionValue=i,this.element=a,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Rc.add(this),g4||(g4=!0,Hr.read(TH),Hr.resolveKeyframes(PH))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:r,element:n,motionValue:i}=this;if(t[0]===null){const a=i==null?void 0:i.get(),o=t[t.length-1];if(a!==void 0)t[0]=a;else if(n&&r){const l=n.readValue(r,o);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=o),i&&a===void 0&&i.set(t[0])}AEe(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Rc.delete(this)}cancel(){this.state==="scheduled"&&(Rc.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const OEe=e=>e.startsWith("--");function LEe(e,t,r){OEe(t)?e.style.setProperty(t,r):e.style[t]=r}const REe=xj(()=>window.ScrollTimeline!==void 0),_Ee={};function IEe(e,t){const r=xj(e);return()=>_Ee[t]??r()}const MH=IEe(()=>{try{document.createElement("div").animate({opacity:0}
284,{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Vx=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,DL={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Vx([0,.65,.55,1]),circOut:Vx([.55,0,1,.45]),backIn:Vx([.31,.01,.66,-.59]),backOut:Vx([.33,1.53,.69,.99])};function OH(e,t){if(e)return typeof e=="function"?MH()?BH(e,t):"ease-out":vH(e)?Vx(e):Array.isArray(e)?e.map(r=>OH(r,t)||DL.easeOut):DL[e]}function $Ee(e,t,r,{delay:n=0,duration:i=300,repeat:a=0,repeatType:o="loop",ease:l="easeOut",times:c}={},u=void 0){const f={[t]:r};c&&(f.offset=c);const x=OH(l,i);Array.isArray(x)&&(f.easing=x);const m={delay:n,duration:i,easing:Array.isArray(x)?"linear":x,fill:"both",iterations:a+1,direction:o==="reverse"?"alternate":"normal"};return u&&(m.pseudoElement=u),e.animate(f,m)}function LH(e){return typeof e=="function"&&"applyToOptions"in e}function zEe({type:e,...t}){return LH(e)&&MH()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class VEe extends Ej{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:r,name:n,keyframes:i,pseudoElement:a,allowFlatten:o=!1,finalKeyframe:l,onComplete:c}=t;this.isPseudoElement=!!a,this.allowFlatten=o,this.options=t,dj(typeof t.type!="string");const u=zEe(t);this.animation=$Ee(r,n,i,u,a),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const f=wj(i,this.options,l,this.speed);this.updateMotionValue?this.updateMotionValue(f):LEe(r,n,f),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,r;(r=(t=this.animation).finish)==null||r.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,r;this.isPseudoElement||(r=(t=this.animation).commitStyles)==null||r.call(t)}get duration(){var r,n;const t=((n=(r=this.animation.effect)==null?void 0:r.getComputedTiming)==null?void 0:n.call(r).duration)||0;return Ma(Number(t))}get time(){return Ma(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Ta(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:r}){var n;return this.allowFlatten&&((n=this.animation.effect)==null||n.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&REe()?(this.animation.timeline=t,Ei):r(this)}}const RH={anticipate:mH,backInOut:hH,circInOut:gH};function UEe(e){return e in RH}function qEe(e){typeof e.ease=="string"&&UEe(e.ease)&&(e.ease=RH[e.ease])}const FL=10;class WEe extends VEe{constructor(t){qEe(t),FH(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:r,onUpdate:n,onComplete:i,element:a,...o}=this.options;if(!r)return;if(t!==void 0){r.set(t);return}const l=new jj({...o,autoplay:!1}),c=Ta(this.finishedTime??this.time);r.setWithVelocity(l.sample(c-FL).value,l.sample(c).value,FL),l.stop()}}const PL=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Pl.test(e)||e==="0")&&!e.startsWith("url("));function HEe(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 GEe(e,t,r,n){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const a=e[e.length-1],o=PL(i,t),l=PL(a,t);return!o||!l?!1:HEe(e)||(r==="spring"||LH(r))&&n}function _H(e){return oH(e)&&"offsetHeight"in e}const KEe=new Set(["opacity","clipPath","filter","transform"]),XEe=xj(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function YEe(e){var u;const{motionValue:t,name:r,repeatDelay:n,repeatType:i,damping:a,type:o}=e;if(!_H((u=t==null?void 0:t.owner)==null?void 0:u.current))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return XEe()&&r&&KEe.has(r)&&(r!=="transform"||!c)&&!l&&!n&&i!=="mirror"&&a!==0&&o!=="inertia"}const QEe=40;
284class ZEe extends Ej{constructor({autoplay:t=!0,delay:r=0,type:n="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:o="loop",keyframes:l,name:c,motionValue:u,element:f,...x}){var y;super(),this.stop=()=>{var v,b;this._animation&&(this._animation.stop(),(v=this.stopTimeline)==null||v.call(this)),(b=this.keyframeResolver)==null||b.cancel()},this.createdAt=$s.now();const m={autoplay:t,delay:r,type:n,repeat:i,repeatDelay:a,repeatType:o,name:c,motionValue:u,element:f,...x},p=(f==null?void 0:f.KeyframeResolver)||Nj;this.keyframeResolver=new p(l,(v,b,E)=>this.onKeyframesResolved(v,b,m,!E),c,u,f),(y=this.keyframeResolver)==null||y.scheduleResolve()}onKeyframesResolved(t,r,n,i){this.keyframeResolver=void 0;const{name:a,type:o,velocity:l,delay:c,isHandoff:u,onUpdate:f}=n;this.resolvedAt=$s.now(),GEe(t,a,o,l)||((Ao.instantAnimations||!c)&&(f==null||f(wj(t,n,r))),t[0]=t[t.length-1],n.duration=0,n.repeat=0);const m={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>QEe?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...n,keyframes:t},p=!u&&YEe(m)?new WEe({...m,element:m.motionValue.owner.current}):new jj(m);p.finished.then(()=>this.notifyFinished()).catch(Ei),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(t,r){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),MEe()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const JEe=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function eje(e){const t=JEe.exec(e);if(!t)return[,];const[,r,n,i]=t;return[`--${r??n}`,i]}function IH(e,t,r=1){const[n,i]=eje(e);if(!n)return;const a=window.getComputedStyle(t).getPropertyValue(n);if(a){const o=a.trim();return aH(o)?parseFloat(o):o}return gj(i)?IH(i,t,r+1):i}function Aj(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const $H=new Set(["width","height","top","left","right","bottom",...B0]),tje={test:e=>e==="auto",parse:e=>e},zH=e=>t=>t.test(e),VH=[S0,St,Oa,rl,H3e,W3e,tje],TL=e=>VH.find(zH(e));function rje(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||lH(e):!0}const nje=new Set(["brightness","contrast","saturate","opacity"]);function sje(e){const[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=r.match(yj)||[];if(!n)return e;const i=r.replace(n,"");let a=nje.has(t)?1:0;return n!==r&&(a*=100),t+"("+a+i+")"}const ije=/\b([a-z-]*)\(.*?\)/gu,b4={...Pl,getAnimatableNone:e=>{const t=e.match(ije);return t?t.map(sje).join(" "):e}},ML={...S0,transform:Math.round},aje={rotate:rl,rotateX:rl,rotateY:rl,rotateZ:rl,scale:zp,scaleX:zp,scaleY:zp,scaleZ:zp,skew:rl,skewX:rl,skewY:rl,distance:St,translateX:St,translateY:St,translateZ:St,x:St,y:St,z:St,perspective:St,transformPerspective:St,opacity:hh,originX:bL,originY:bL,originZ:St},kj={borderWidth:St,borderTopWidth:St,borderRightWidth:St,borderBottomWidth:St,borderLeftWidth:St,borderRadius:St,radius:St,borderTopLeftRadius:St,borderTopRightRadius:St,borderBottomRightRadius:St,borderBottomLeftRadius:St,width:St,maxWidth:St,height:St,maxHeight:St,top:St,right:St,bottom:St,left:St,padding:St,paddingTop:St,paddingRight:St,paddingBottom:St,paddingLeft:St,margin:St,marginTop:St,marginRight:St,marginBottom:St,marginLeft:St,backgroundPositionX:St,backgroundPositionY:St,...aje,zIndex:ML,fillOpacity:hh,strokeOpacity:hh,numOctaves:ML},oje={...kj,color:es,backgroundColor:es,outlineColor:es,fill:es,stroke:es,borderColor:es,borderTopColor:es,borderRightColor:es,borderBottomColor:es,borderLeftColor:es,filter:b4,WebkitFilter:b4},UH=e=>oje[e];function qH(e,t){let r=UH(e);return r!==b4&&(r=Pl),r.getAnimatableNone?r.getAnimatableNone(t):void 0}
vendor: 1,658 bytes, line 284
284const lje=new Set(["auto","none","0"]);function cje(e,t,r){let n=0,i;for(;n<e.length&&!i;){const a=e[n];typeof a=="string"&&!lje.has(a)&&mh(a).values.length&&(i=e[n]),n++}if(i&&r)for(const a of t)e[a]=qH(r,i)}class uje extends Nj{constructor(t,r,n,i,a){super(t,r,n,i,a,!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 u=t[c];if(typeof u=="string"&&(u=u.trim(),gj(u))){const f=IH(u,r.current);f!==void 0&&(t[c]=f),c===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!$H.has(n)||t.length!==2)return;const[i,a]=t,o=TL(i),l=TL(a);if(o!==l)if(BL(o)&&BL(l))for(let c=0;c<t.length;c++){const u=t[c];typeof u=="string"&&(t[c]=parseFloat(u))}else Lc[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:r}=this,n=[];for(let i=0;i<t.length;i++)(t[i]===null||rje(t[i]))&&n.push(i);n.length&&cje(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=Lc[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 l;const{element:t,name:r,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const i=t.getValue(r);i&&i.jump(this.measuredOrigin,!1);const a=n.length-1,o=n[a];n[a]=Lc[r](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(l=this.removedTransforms)!=null&&l.length&&this.removedTransforms.forEac
284h(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function dje(e,t,r){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let n=document;const i=(r==null?void 0:r[e])??n.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const WH=(e,t)=>t&&typeof e=="number"?t.transform(e):e,OL=30,xje=e=>!isNaN(parseFloat(e));class fje{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(n,i=!0)=>{var o,l;const a=$s.now();if(this.updatedAt!==a&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const c of this.dependents)c.dirty();i&&((l=this.events.renderRequest)==null||l.notify(this.current))},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=$s.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=xje(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 fj);const n=this.events[t].add(r);return t==="change"?()=>{n(),Hr.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()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=$s.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>OL)return 0;const r=Math.min(this.updatedAt-this.prevUpdatedAt,OL);return cH(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(){var t,r;(t=this.dependents)==null||t.clear(),(r=this.events.destroy)==null||r.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function t0(e,t){return new fje(e,t)}const{schedule:Sj}=bH(queueMicrotask,!1),$i={x:!1,y:!1};function HH(){return $i.x||$i.y}function hje(e){return e==="x"||e==="y"?$i[e]?null:($i[e]=!0,()=>{$i[e]=!1}):$i.x||$i.y?null:($i.x=$i.y=!0,()=>{$i.x=$i.y=!1})}function GH(e,t){const r=dje(e),n=new AbortController,i={passive:!0,...t,signal:n.signal};return[r,i,()=>n.abort()]}function LL(e){return!(e.pointerType==="touch"||HH())}function mje(e,t,r={}){const[n,i,a]=GH(e,r),o=l=>{if(!LL(l))return;const{target:c}=l,u=t(c,l);if(typeof u!="function"||!c)return;const f=x=>{LL(x)&&(u(x),c.removeEventListener("pointerleave",f))};c.addEventListener("pointerleave",f,i)};return n.forEach(l=>{l.addEventListener("pointerenter",o,i)}),a}const KH=(e,t)=>t?e===t?!0:KH(e,t.parentElement):!1,Bj=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,pje=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function gje(e){return pje.has(e.tagName)||e.tabIndex!==-1}const hg=new WeakSet;function RL(e){return t=>{t.key==="Enter"&&e(t)}}function kC(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const yje=(e,t)=>{const r=e.currentTarget;if(!r)return;const n=RL(()=>
284{if(hg.has(r))return;kC(r,"down");const i=RL(()=>{kC(r,"up")}),a=()=>kC(r,"cancel");r.addEventListener("keyup",i,t),r.addEventListener("blur",a,t)});r.addEventListener("keydown",n,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",n),t)};function _L(e){return Bj(e)&&!HH()}function vje(e,t,r={}){const[n,i,a]=GH(e,r),o=l=>{const c=l.currentTarget;if(!_L(l))return;hg.add(c);const u=t(c,l),f=(p,y)=>{window.removeEventListener("pointerup",x),window.removeEventListener("pointercancel",m),hg.has(c)&&hg.delete(c),_L(p)&&typeof u=="function"&&u(p,{success:y})},x=p=>{f(p,c===window||c===document||r.useGlobalTarget||KH(c,p.target))},m=p=>{f(p,!1)};window.addEventListener("pointerup",x,i),window.addEventListener("pointercancel",m,i)};return n.forEach(l=>{(r.useGlobalTarget?window:l).addEventListener("pointerdown",o,i),_H(l)&&(l.addEventListener("focus",u=>yje(u,i)),!gje(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),a}function XH(e){return oH(e)&&"ownerSVGElement"in e}function bje(e){return XH(e)&&e.tagName==="svg"}const ss=e=>!!(e&&e.getVelocity),Cje=[...VH,es,Pl],wje=e=>Cje.find(zH(e)),YH=C.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Eje(e=!0){const t=C.useContext(lj);if(t===null)return[!0,null];const{isPresent:r,onExitComplete:n,register:i}=t,a=C.useId();C.useEffect(()=>{if(e)return i(a)},[e]);const o=C.useCallback(()=>e&&n&&n(a),[a,n,e]);return!r&&n?[!1,o]:[!0]}const QH=C.createContext({strict:!1}),IL={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"]},r0={};for(const e in IL)r0[e]={isEnabled:t=>IL[e].some(r=>!!t[r])};function jje(e){for(const t in e)r0[t]={...r0[t],...e[t]}}const Nje=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 G1(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Nje.has(e)}let ZH=e=>!G1(e);function Aje(e){e&&(ZH=t=>t.startsWith("on")?!G1(t):e(t))}try{Aje(require("@emotion/is-prop-valid").default)}catch{}function kje(e,t,r){const n={};for(const i in e)i==="values"&&typeof e.values=="object"||(ZH(i)||r===!0&&G1(i)||!t&&!G1(i)||e.draggable&&i.startsWith("onDrag"))&&(n[i]=e[i]);return n}function Sje(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 Zy=C.createContext({});function Jy(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function ph(e){return typeof e=="string"||Array.isArray(e)}const Dj=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Fj=["initial",...Dj];function ev(e){return Jy(e.animate)||Fj.some(t=>ph(e[t]))}function JH(e){return!!(ev(e)||e.variants)}function Bje(e,t){if(ev(e)){const{initial:r,animate:n}=e;return{initial:r===!1||ph(r)?r:void 0,animate:ph(n)?n:void 0}}return e.inherit!==!1?t:{}}function Dje(e){const{initial:t,animate:r}=Bje(e,C.useContext(Zy));return C.useMemo(()=>({initial:t,animate:r}),[$L(t),$L(r)])}function $L(e){return Array.isArray(e)?e.join(" "):e}const Fje=Symbol.for("motionComponentSymbol");function ed(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Pje(e,t,r){return C.useCallback(n=>{n&&e.onMount&&e.onMount(n),t&&(n?t.mount(n):t.unmount()),r&&(typeof r=="function"?r(n):ed(r)&&(r.current=n))},[t])}const Pj=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Tje="framerAppearId",eG="data-"+Pj(Tje),tG=C.createContext({});function Mje(e,t,r,n,i){var v,b;const{visualElement:a}=C.useContext(Zy),o=C.useContext(QH),l=C.useContext(lj),c=C.useContext(YH).reducedMotion,u=C.useRef(null);n=n||o.renderer,!u.current&&n&&(u.current=n(e,{visualState:t,parent:a,props:r,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c}
vendor: 70,373 bytes, line 284
284));const f=u.current,x=C.useContext(tG);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&Oje(u.current,r,i,x);const m=C.useRef(!1);C.useInsertionEffect(()=>{f&&m.current&&f.update(r,l)});const p=r[eG],y=C.useRef(!!p&&!((v=window.MotionHandoffIsComplete)!=null&&v.call(window,p))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,p)));return A3e(()=>{f&&(m.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),Sj.render(f.render),y.current&&f.animationState&&f.animationState.animateChanges())}),C.useEffect(()=>{f&&(!y.current&&f.animationState&&f.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var E;(E=window.MotionHandoffMarkAsComplete)==null||E.call(window,p)}),y.current=!1))}),f}function Oje(e,t,r,n){const{layoutId:i,layout:a,drag:o,dragConstraints:l,layoutScroll:c,layoutRoot:u,layoutCrossfade:f}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:rG(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||l&&ed(l),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:n,crossfade:f,layoutScroll:c,layoutRoot:u})}function rG(e){if(e)return e.options.allowProjection!==!1?e.projection:rG(e.parent)}function Lje({preloadedFeatures:e,createVisualElement:t,useRender:r,useVisualState:n,Component:i}){e&&jje(e);function a(l,c){let u;const f={...C.useContext(YH),...l,layoutId:Rje(l)},{isStatic:x}=f,m=Dje(l),p=n(l,x);if(!x&&oj){_je();const y=Ije(f);u=y.MeasureLayout,m.visualElement=Mje(i,p,f,t,y.ProjectionNode)}return s.jsxs(Zy.Provider,{value:m,children:[u&&m.visualElement?s.jsx(u,{visualElement:m.visualElement,...f}):null,r(i,l,Pje(p,m.visualElement,c),p,x,m.visualElement)]})}a.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;const o=C.forwardRef(a);return o[Fje]=i,o}function Rje({layoutId:e}){const t=C.useContext(iH).id;return t&&e!==void 0?t+"-"+e:e}function _je(e,t){C.useContext(QH).strict}function Ije(e){const{drag:t,layout:r}=r0;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 gh={};function $je(e){for(const t in e)gh[t]=e[t],pj(t)&&(gh[t].isCSSVariable=!0)}function nG(e,{layout:t,layoutId:r}){return D0.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!gh[e]||e==="opacity")}const zje={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Vje=B0.length;function Uje(e,t,r){let n="",i=!0;for(let a=0;a<Vje;a++){const o=B0[a],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 u=WH(l,kj[o]);if(!c){i=!1;const f=zje[o]||o;n+=`${f}(${u}) `}r&&(t[o]=u)}}return n=n.trim(),r?n=r(t,i?"":n):i&&(n="none"),n}function Tj(e,t,r){const{style:n,vars:i,transformOrigin:a}=e;let o=!1,l=!1;for(const c in t){const u=t[c];if(D0.has(c)){o=!0;continue}else if(pj(c)){i[c]=u;continue}else{const f=WH(u,kj[c]);c.startsWith("origin")?(l=!0,a[c]=f):n[c]=f}}if(t.transform||(o||r?n.transform=Uje(t,e.transform,r):n.transform&&(n.transform="none")),l){const{originX:c="50%",originY:u="50%",originZ:f=0}=a;n.transformOrigin=`${c} ${u} ${f}`}}const Mj=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function sG(e,t,r){for(const n in t)!ss(t[n])&&!nG(n,r)&&(e[n]=t[n])}function qje({transformTemplate:e},t){return C.useMemo(()=>{const r=Mj();return Tj(r,t,e),Object.assign({},r.vars,r.style)},[t])}function Wje(e,t){const r=e.style||{},n={};return sG(n,r,e),Object.assign(n,qje(e,t)),n}function Hje(e,t){const r={},n=Wje(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}const Gje={offset:"stroke-dashoffset",array:"stroke-dasharray"},Kje={offset:"strokeDashoffset",array:"strokeDasharray"};function Xje(e,t,r=1,n=0,i=!0){e.pathLength=1;const a=i?Gje:Kje;e[a.offset]=St.transform(-n);const o=St.transform(t),l=St.transform(r);e[a.array]=`${o} ${l}`}function iG(e,{attrX:t,attrY:r,attrScale:n,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...l},c,u,f){if(Tj(e,l,u),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:x,style:m}=e;x.transform&&(m.transform=x.transform,delete x.transform),(m.transform||x.transformOrigin)&&(m.transformOrigin=x.transformOrigin??"50% 50%",delete x.transformOrigin),m.transform&&(m.transformBox=(f==null?void 0:f.transformBox)??"fill-box",delete x.transformBox),t!==void 0&&(x.x=t),r!==void 0&&(x.y=r),n!==void 0&&(x.scale=n),i!==void 0&&Xje(x,i,a,o,!1)}const aG=()=>({...Mj(),attrs:{}}),oG=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Yje(e,t,r,n){const i=C.useMemo(()=>{const a=aG();return iG(a,t,oG(n),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};sG(a,e.style,e),i.style={...a,...i.style}}return i}const Qje=["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 Oj(e){return typeof e!="string"||e.includes("-")?!1:!!(Qje.indexOf(e)>-1||/[A-Z]/u.test(e))}function Zje(e=!1){return(r,n,i,{latestValues:a},o)=>{const c=(Oj(r)?Yje:Hje)(n,a,o,r),u=kje(n,typeof r=="string",e),f=r!==C.Fragment?{...u,...c,ref:i}:{},{children:x}=n,m=C.useMemo(()=>ss(x)?x.get():x,[x]);return C.createElement(r,{...f,children:m})}}function zL(e){const t=[{},{}];return e==null||e.values.forEach((r,n)=>{t[0][n]=r.get(),t[1][n]=r.getVelocity()}),t}function Lj(e,t,r,n){if(typeof t=="function"){const[i,a]=zL(n);t=t(r!==void 0?r:e.custom,i,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,a]=zL(n);t=t(r!==void 0?r:e.custom,i,a)}return t}function mg(e){return ss(e)?e.get():e}function Jje({scrapeMotionValuesFromProps:e,createRenderState:t},r,n,i){return{latestValues:e7e(r,n,i,e),renderState:t()}}const lG=e=>(t,r)=>{const n=C.useContext(Zy),i=C.useContext(lj),a=()=>Jje(e,t,n,i);return r?a():N3e(a)};function e7e(e,t,r,n){const i={},a=n(e,{});for(const m in a)i[m]=mg(a[m]);let{initial:o,animate:l}=e;const c=ev(e),u=JH(e);t&&u&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),l===void 0&&(l=t.animate));let f=r?r.initial===!1:!1;f=f||o===!1;const x=f?l:o;if(x&&typeof x!="boolean"&&!Jy(x)){const m=Array.isArray(x)?x:[x];for(let p=0;p<m.length;p++){const y=Lj(e,m[p]);if(y){const{transitionEnd:v,transition:b,...E}=y;for(const N in E){let j=E[N];if(Array.isArray(j)){const A=f?j.length-1:0;j=j[A]}j!==null&&(i[N]=j)}for(const N in v)i[N]=v[N]}}}return i}function Rj(e,t,r){var a;const{style:n}=e,i={};for(const o in n)(ss(n[o])||t.style&&ss(t.style[o])||nG(o,e)||((a=r==null?void 0:r.getValue(o))==null?void 0:a.liveStyle)!==void 0)&&(i[o]=n[o]);return i}const t7e={useVisualState:lG({scrapeMotionValuesFromProps:Rj,createRenderState:Mj})};function cG(e,t,r){const n=Rj(e,t,r);for(const i in e)if(ss(e[i])||ss(t[i])){const a=B0.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;n[a]=e[i]}return n}const r7e={useVisualState:lG({scrapeMotionValuesFromProps:cG,createRenderState:aG})};function n7e(e,t){return function(n,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...Oj(n)?r7e:t7e,preloadedFeatures:e,useRender:Zje(i),createVisualElement:t,Component:n};return Lje(o)}}function yh(e,t,r){const n=e.getProps();return Lj(n,t,r!==void 0?r:n.custom,e)}const C4=e=>Array.isArray(e);function s7e(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,t0(r))}function i7e(e){return C4(e)?e[e.length-1]||0:e}function a7e(e,t){const r=yh(e,t);let{transitionEnd:n={},transition:i={},...a}=r||{};a={...a,...n};for(const o in a){const l=i7e(a[o]);s7e(e,o,l)}}function o7e(e){return!!(ss(e)&&e.add)}function w4(e,t){const r=e.getValue("willChange");if(o7e(r))return r.add(t);if(!r&&Ao.WillChange){const n=new Ao.WillChange("auto");e.addValue("willChange",n),n.add(t)}}function uG(e){return e.props[eG]}const l7e=e=>e!==null;function c7e(e,{repeat:t,repeatType:r="loop"},n){const i=e.filter(l7e),a=t&&r!=="loop"&&t%2===1?0:i.length-1;return i[a]}const u7e={type:"spring",stiffness:500,damping:25,restSpeed:10},d7e=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),x7e={type:"keyframes",duration:.8},f7e={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},h7e=(e,{keyframes:t})=>t.length>2?x7e:D0.has(e)?e.startsWith("scale")?d7e(t[1]):u7e:f7e;function m7e({when:e,delay:t,delayChildren:r,staggerChildren:n,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:l,from:c,elapsed:u,...f}){return!!Object.keys(f).length}const _j=(e,t,r,n={},i,a)=>o=>{const l=Aj(n,e)||{},c=l.delay||n.delay||0;let{elapsed:u=0}=n;u=u-Ta(c);const f={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:m=>{t.set(m),l.onUpdate&&l.onUpdate(m)},onComplete:()=>{o(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:a?void 0:i};m7e(l)||Object.assign(f,h7e(e,f)),f.duration&&(f.duration=Ta(f.duration)),f.repeatDelay&&(f.repeatDelay=Ta(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let x=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(f.duration=0,f.delay===0&&(x=!0)),(Ao.instantAnimations||Ao.skipAnimations)&&(x=!0,f.duration=0,f.delay=0),f.allowFlatten=!l.type&&!l.ease,x&&!a&&t.get()!==void 0){const m=c7e(f.keyframes,l);if(m!==void 0){Hr.update(()=>{f.onUpdate(m),f.onComplete()});return}}return l.isSync?new jj(f):new ZEe(f)};function p7e({protectedKeys:e,needsAnimating:t},r){const n=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,n}function dG(e,t,{delay:r=0,transitionOverride:n,type:i}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:o,...l}=t;n&&(a=n);const c=[],u=i&&e.animationState&&e.animationState.getState()[i];for(const f in l){const x=e.getValue(f,e.latestValues[f]??null),m=l[f];if(m===void 0||u&&p7e(u,f))continue;const p={delay:r,...Aj(a||{},f)},y=x.get();if(y!==void 0&&!x.isAnimating&&!Array.isArray(m)&&m===y&&!p.velocity)continue;let v=!1;if(window.MotionHandoffAnimation){const E=uG(e);if(E){const N=window.MotionHandoffAnimation(E,f,Hr);N!==null&&(p.startTime=N,v=!0)}}w4(e,f),x.start(_j(f,x,m,e.shouldReduceMotion&&$H.has(f)?{type:!1}:p,e,v));const b=x.animation;b&&c.push(b)}return o&&Promise.all(c).then(()=>{Hr.update(()=>{o&&a7e(e,o)})}),c}function E4(e,t,r={}){var c;const n=yh(e,t,r.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=n||{};r.transitionOverride&&(i=r.transitionOverride);const a=n?()=>Promise.all(dG(e,n,r)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:f=0,staggerChildren:x,staggerDirection:m}=i;return g7e(e,t,f+u,x,m,r)}:()=>Promise.resolve(),{when:l}=i;if(l){const[u,f]=l==="beforeChildren"?[a,o]:[o,a];return u().then(()=>f())}else return Promise.all([a(),o(r.delay)])}function g7e(e,t,r=0,n=0,i=1,a){const o=[],l=(e.variantChildren.size-1)*n,c=i===1?(u=0)=>u*n:(u=0)=>l-u*n;return Array.from(e.variantChildren).sort(y7e).forEach((u,f)=>{u.notify("AnimationStart",t),o.push(E4(u,t,{...a,delay:r+c(f)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function y7e(e,t){return e.sortNodePosition(t)}function v7e(e,t,r={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){const i=t.map(a=>E4(e,a,r));n=Promise.all(i)}else if(typeof t=="string")n=E4(e,t,r);else{const i=typeof t=="function"?yh(e,t,r.custom):t;n=Promise.all(dG(e,i,r))}return n.then(()=>{e.notify("AnimationComplete",t)})}function xG(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}const b7e=Fj.length;function fG(e){if(!e)return;if(!e.isControllingVariants){const r=e.parent?fG(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}const t={};for(let r=0;r<b7e;r++){const n=Fj[r],i=e.props[n];(ph(i)||i===!1)&&(t[n]=i)}return t}const C7e=[...Dj].reverse(),w7e=Dj.length;function E7e(e){return t=>Promise.all(t.map(({animation:r,options:n})=>v7e(e,r,n)))}function j7e(e){let t=E7e(e),r=VL(),n=!0;const i=c=>(u,f)=>{var m;const x=yh(e,f,c==="exit"?(m=e.presenceContext)==null?void 0:m.custom:void 0);if(x){const{transition:p,transitionEnd:y,...v}=x;u={...u,...v,...y}}return u};function a(c){t=c(e)}function o(c){const{props:u}=e,f=fG(e.parent)||{},x=[],m=new Set;let p={},y=1/0;for(let b=0;b<w7e;b++){const E=C7e[b],N=r[E],j=u[E]!==void 0?u[E]:f[E],A=ph(j),w=E===c?N.isActive:null;w===!1&&(y=b);let S=j===f[E]&&j!==u[E]&&A;if(S&&n&&e.manuallyAnimateOnMount&&(S=!1),N.protectedKeys={...p},!N.isActive&&w===null||!j&&!N.prevProp||Jy(j)||typeof j=="boolean")continue;const B=N7e(N.prevProp,j);let D=B||E===c&&N.isActive&&!S&&A||b>y&&A,P=!1;const O=Array.isArray(j)?j:[j];let M=O.reduce(i(E),{});w===!1&&(M={});const{prevResolvedValues:I={}}=N,V={...I,...M},W=R=>{D=!0,m.has(R)&&(P=!0,m.delete(R)),N.needsAnimating[R]=!0;const q=e.getValue(R);q&&(q.liveStyle=!1)};for(const R in V){const q=M[R],G=I[R];if(p.hasOwnProperty(R))continue;let K=!1;C4(q)&&C4(G)?K=!xG(q,G):K=q!==G,K?q!=null?W(R):m.add(R):q!==void 0&&m.has(R)?W(R):N.protectedKeys[R]=!0}N.prevProp=j,N.prevResolvedValues=M,N.isActive&&(p={...p,...M}),n&&e.blockInitialAnimation&&(D=!1),D&&(!(S&&B)||P)&&x.push(...O.map(R=>({animation:R,options:{type:E}})))}if(m.size){const b={};if(typeof u.initial!="boolean"){const E=yh(e,Array.isArray(u.initial)?u.initial[0]:u.initial);E&&E.transition&&(b.transition=E.transition)}m.forEach(E=>{const N=e.getBaseTarget(E),j=e.getValue(E);j&&(j.liveStyle=!0),b[E]=N??null}),x.push({animation:b})}let v=!!x.length;return n&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(v=!1),n=!1,v?t(x):Promise.resolve()}function l(c,u){var x;if(r[c].isActive===u)return Promise.resolve();(x=e.variantChildren)==null||x.forEach(m=>{var p;return(p=m.animationState)==null?void 0:p.setActive(c,u)}),r[c].isActive=u;const f=o(c);for(const m in r)r[m].protectedKeys={};return f}return{animateChanges:o,setActive:l,setAnimateFunction:a,getState:()=>r,reset:()=>{r=VL(),n=!0}}}function N7e(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!xG(t,e):!1}function ic(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function VL(){return{animate:ic(!0),whileInView:ic(),whileHover:ic(),whileTap:ic(),whileDrag:ic(),whileFocus:ic(),exit:ic()}}class zl{constructor(t){this.isMounted=!1,this.node=t}update(){}}class A7e extends zl{constructor(t){super(t),t.animationState||(t.animationState=j7e(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Jy(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.call(this)}}let k7e=0;class S7e extends zl{constructor(){super(...arguments),this.id=k7e++}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,onExitComplete:r}=this.node.presenceContext||{};r&&r(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const B7e={animation:{Feature:A7e},exit:{Feature:S7e}};function vh(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}function sm(e){return{point:{x:e.pageX,y:e.pageY}}}const D7e=e=>t=>Bj(t)&&e(t,sm(t));function cf(e,t,r,n){return vh(e,t,D7e(r),n)}function hG({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function F7e({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function P7e(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}}const mG=1e-4,T7e=1-mG,M7e=1+mG,pG=.01,O7e=0-pG,L7e=0+pG;function ys(e){return e.max-e.min}function R7e(e,t,r){return Math.abs(e-t)<=r}function UL(e,t,r,n=.5){e.origin=n,e.originPoint=Wr(t.min,t.max,e.origin),e.scale=ys(r)/ys(t),e.translate=Wr(r.min,r.max,e.origin)-e.originPoint,(e.scale>=T7e&&e.scale<=M7e||isNaN(e.scale))&&(e.scale=1),(e.translate>=O7e&&e.translate<=L7e||isNaN(e.translate))&&(e.translate=0)}function uf(e,t,r,n){UL(e.x,t.x,r.x,n?n.originX:void 0),UL(e.y,t.y,r.y,n?n.originY:void 0)}function qL(e,t,r){e.min=r.min+t.min,e.max=e.min+ys(t)}function _7e(e,t,r){qL(e.x,t.x,r.x),qL(e.y,t.y,r.y)}function WL(e,t,r){e.min=t.min-r.min,e.max=e.min+ys(t)}function df(e,t,r){WL(e.x,t.x,r.x),WL(e.y,t.y,r.y)}const HL=()=>({translate:0,scale:1,origin:0,originPoint:0}),td=()=>({x:HL(),y:HL()}),GL=()=>({min:0,max:0}),an=()=>({x:GL(),y:GL()});function mi(e){return[e("x"),e("y")]}function SC(e){return e===void 0||e===1}function j4({scale:e,scaleX:t,scaleY:r}){return!SC(e)||!SC(t)||!SC(r)}function uc(e){return j4(e)||gG(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function gG(e){return KL(e.x)||KL(e.y)}function KL(e){return e&&e!=="0%"}function K1(e,t,r){const n=e-r,i=t*n;return r+i}function XL(e,t,r,n,i){return i!==void 0&&(e=K1(e,i,n)),K1(e,r,n)+t}function N4(e,t=0,r=1,n,i){e.min=XL(e.min,t,r,n,i),e.max=XL(e.max,t,r,n,i)}function yG(e,{x:t,y:r}){N4(e.x,t.translate,t.scale,t.originPoint),N4(e.y,r.translate,r.scale,r.originPoint)}const YL=.999999999999,QL=1.0000000000001;function I7e(e,t,r,n=!1){const i=r.length;if(!i)return;t.x=t.y=1;let a,o;for(let l=0;l<i;l++){a=r[l],o=a.projectionDelta;const{visualElement:c}=a.options;c&&c.props.style&&c.props.style.display==="contents"||(n&&a.options.layoutScroll&&a.scroll&&a!==a.root&&nd(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,yG(e,o)),n&&uc(a.latestValues)&&nd(e,a.latestValues))}t.x<QL&&t.x>YL&&(t.x=1),t.y<QL&&t.y>YL&&(t.y=1)}function rd(e,t){e.min=e.min+t,e.max=e.max+t}function ZL(e,t,r,n,i=.5){const a=Wr(e.min,e.max,i);N4(e,t,r,a,n)}function nd(e,t){ZL(e.x,t.x,t.scaleX,t.scale,t.originX),ZL(e.y,t.y,t.scaleY,t.scale,t.originY)}function vG(e,t){return hG(P7e(e.getBoundingClientRect(),t))}function $7e(e,t,r){const n=vG(e,r),{scroll:i}=t;return i&&(rd(n.x,i.offset.x),rd(n.y,i.offset.y)),n}const bG=({current:e})=>e?e.ownerDocument.defaultView:null,JL=(e,t)=>Math.abs(e-t);function z7e(e,t){const r=JL(e.x,t.x),n=JL(e.y,t.y);return Math.sqrt(r**2+n**2)}class CG{constructor(t,r,{transformPagePoint:n,contextWindow:i,dragSnapToOrigin:a=!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 x=DC(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,p=z7e(x.offset,{x:0,y:0})>=3;if(!m&&!p)return;const{point:y}=x,{timestamp:v}=Un;this.history.push({...y,timestamp:v});const{onStart:b,onMove:E}=this.handlers;m||(b&&b(this.lastMoveEvent,x),this.startEvent=this.lastMoveEvent),E&&E(this.lastMoveEvent,x)},this.handlePointerMove=(x,m)=>{this.lastMoveEvent=x,this.lastMoveEventInfo=BC(m,this.transformPagePoint),Hr.update(this.updatePoint,!0)},this.handlePointerUp=(x,m)=>{this.end();const{onEnd:p,onSessionEnd:y,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=DC(x.type==="pointercancel"?this.lastMoveEventInfo:BC(m,this.transformPagePoint),this.history);this.startEvent&&p&&p(x,b),y&&y(x,b)},!Bj(t))return;this.dragSnapToOrigin=a,this.handlers=r,this.transformPagePoint=n,this.contextWindow=i||window;const o=sm(t),l=BC(o,this.transformPagePoint),{point:c}=l,{timestamp:u}=Un;this.history=[{...c,timestamp:u}];const{onSessionStart:f}=r;f&&f(t,DC(l,this.history)),this.removeListeners=tm(cf(this.contextWindow,"pointermove",this.handlePointerMove),cf(this.contextWindow,"pointerup",this.handlePointerUp),cf(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Fl(this.updatePoint)}}function BC(e,t){return t?{point:t(e.point)}:e}function eR(e,t){return{x:e.x-t.x,y:e.y-t.y}}function DC({point:e},t){return{point:e,delta:eR(e,wG(t)),offset:eR(e,V7e(t)),velocity:U7e(t,.1)}}function V7e(e){return e[0]}function wG(e){return e[e.length-1]}function U7e(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null;const i=wG(e);for(;r>=0&&(n=e[r],!(i.timestamp-n.timestamp>Ta(t)));)r--;if(!n)return{x:0,y:0};const a=Ma(i.timestamp-n.timestamp);if(a===0)return{x:0,y:0};const o={x:(i.x-n.x)/a,y:(i.y-n.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function q7e(e,{min:t,max:r},n){return t!==void 0&&e<t?e=n?Wr(t,e,n.min):Math.max(e,t):r!==void 0&&e>r&&(e=n?Wr(r,e,n.max):Math.min(e,r)),e}function tR(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 W7e(e,{top:t,left:r,bottom:n,right:i}){return{x:tR(e.x,r,i),y:tR(e.y,t,n)}}function rR(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 H7e(e,t){return{x:rR(e.x,t.x),y:rR(e.y,t.y)}}function G7e(e,t){let r=.5;const n=ys(e),i=ys(t);return i>n?r=fh(t.min,t.max-n,e.min):n>i&&(r=fh(e.min,e.max-i,t.min)),No(0,1,r)}function K7e(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 A4=.35;function X7e(e=A4){return e===!1?e=0:e===!0&&(e=A4),{x:nR(e,"left","right"),y:nR(e,"top","bottom")}}function nR(e,t,r){return{min:sR(e,t),max:sR(e,r)}}function sR(e,t){return typeof e=="number"?e:e[t]||0}const Y7e=new WeakMap;class Q7e{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=an(),this.visualElement=t}start(t,{snapToCursor:r=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;const i=f=>{const{dragSnapToOrigin:x}=this.getProps();x?this.pauseAnimation():this.stopAnimation(),r&&this.snapToCursor(sm(f).point)},a=(f,x)=>{const{drag:m,dragPropagation:p,onDragStart:y}=this.getProps();if(m&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=hje(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),mi(b=>{let E=this.getAxisMotionValue(b).get()||0;if(Oa.test(E)){const{projection:N}=this.visualElement;if(N&&N.layout){const j=N.layout.layoutBox[b];j&&(E=ys(j)*(parseFloat(E)/100))}}this.originPoint[b]=E}),y&&Hr.postRender(()=>y(f,x)),w4(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},o=(f,x)=>{const{dragPropagation:m,dragDirectionLock:p,onDirectionLock:y,onDrag:v}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:b}=x;if(p&&this.currentDirection===null){this.currentDirection=Z7e(b),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",x.point,b),this.updateAxis("y",x.point,b),this.visualElement.render(),v&&v(f,x)},l=(f,x)=>this.stop(f,x),c=()=>mi(f=>{var x;return this.getAnimationState(f)==="paused"&&((x=this.getAxisMotionValue(f).animation)==null?void 0:x.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new CG(t,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:bG(this.visualElement)})}stop(t,r){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=r;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&Hr.postRender(()=>a(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||!Vp(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=q7e(o,this.constraints[t],this.elastic[t])),a.set(o)}resolveConstraints(){var a;const{dragConstraints:t,dragElastic:r}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(a=this.visualElement.projection)==null?void 0:a.layout,i=this.constraints;t&&ed(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&n?this.constraints=W7e(n.layoutBox,t):this.constraints=!1,this.elastic=X7e(r),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&mi(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=K7e(n.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!ed(t))return!1;const n=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const a=$7e(n,i.root,this.visualElement.getTransformPagePoint());let o=H7e(i.layout.layoutBox,a);if(r){const l=r(F7e(o));this.hasMutatedConstraints=!!l,l&&(o=hG(l))}return o}startAnimation(t){const{drag:r,dragMomentum:n,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=mi(f=>{if(!Vp(f,r,this.currentDirection))return;let x=c&&c[f]||{};o&&(x={min:0,max:0});const m=i?200:1e6,p=i?40:1e7,y={type:"inertia",velocity:n?t[f]:0,bounceStiffness:m,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...a,...x};return this.startAxisValueAnimation(f,y)});return Promise.all(u).then(l)}startAxisValueAnimation(t,r){const n=this.getAxisMotionValue(t);return w4(this.visualElement,t),n.start(_j(t,n,0,r,this.visualElement,!1))}stopAnimation(){mi(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){mi(t=>{var r;return(r=this.getAxisMotionValue(t).animation)==null?void 0:r.pause()})}getAnimationState(t){var r;return(r=this.getAxisMotionValue(t).animation)==null?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){mi(r=>{const{drag:n}=this.getProps();if(!Vp(r,n,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(r);if(i&&i.layout){const{min:o,max:l}=i.layout.layoutBox[r];a.set(t[r]-Wr(o,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!ed(r)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};mi(o=>{const l=this.getAxisMotionValue(o);if(l&&this.constraints!==!1){const c=l.get();i[o]=G7e({min:c,max:c},this.constraints[o])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),mi(o=>{if(!Vp(o,t,null))return;const l=this.getAxisMotionValue(o),{min:c,max:u}=this.constraints[o];l.set(Wr(c,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;Y7e.set(this.visualElement,this);const t=this.visualElement.current,r=cf(t,"pointerdown",c=>{const{drag:u,dragListener:f=!0}=this.getProps();u&&f&&this.start(c)}),n=()=>{const{dragConstraints:c}=this.getProps();ed(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,a=i.addEventListener("measure",n);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Hr.read(n);const o=vh(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(mi(f=>{const x=this.getAxisMotionValue(f);x&&(this.originPoint[f]+=c[f].translate,x.set(x.get()+c[f].translate))}),this.visualElement.render())});return()=>{o(),r(),a(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:o=A4,dragMomentum:l=!0}=t;return{...t,drag:r,dragDirectionLock:n,dragPropagation:i,dragConstraints:a,dragElastic:o,dragMomentum:l}}}function Vp(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function Z7e(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}class J7e extends zl{constructor(t){super(t),this.removeGroupControls=Ei,this.removeListeners=Ei,this.controls=new Q7e(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ei}unmount(){this.removeGroupControls(),this.removeListeners()}}const iR=e=>(t,r)=>{e&&Hr.postRender(()=>e(t,r))};class eNe extends zl{constructor(){super(...arguments),this.removePointerDownListener=Ei}onPointerDown(t){this.session=new CG(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:bG(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:r,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:iR(t),onStart:iR(r),onMove:n,onEnd:(a,o)=>{delete this.session,i&&Hr.postRender(()=>i(a,o))}}}mount(){this.removePointerDownListener=cf(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const pg={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function aR(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Px={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(St.test(e))e=parseFloat(e);else return e;const r=aR(e,t.target.x),n=aR(e,t.target.y);return`${r}% ${n}%`}},tNe={correct:(e,{treeScale:t,projectionDelta:r})=>{const n=e,i=Pl.parse(e);if(i.length>5)return n;const a=Pl.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 u=Wr(l,c,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),a(i)}};class rNe extends C.Component{componentDidMount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n,layoutId:i}=this.props,{projection:a}=t;$je(nNe),a&&(r.group&&r.group.add(a),n&&n.register&&i&&n.register(a),a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),pg.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:r,visualElement:n,drag:i,isPresent:a}=this.props,{projection:o}=n;return o&&(o.isPresent=a,i||t.layoutDependency!==r||r===void 0||t.isPresent!==a?o.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?o.promote():o.relegate()||Hr.postRender(()=>{const l=o.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Sj.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 EG(e){const[t,r]=Eje(),n=C.useContext(iH);return s.jsx(rNe,{...e,layoutGroup:n,switchLayoutGroup:C.useContext(tG),isPresent:t,safeToRemove:r})}const nNe={borderRadius:{...Px,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Px,borderTopRightRadius:Px,borderBottomLeftRadius:Px,borderBottomRightRadius:Px,boxShadow:tNe};function sNe(e,t,r){const n=ss(e)?e:t0(e);return n.start(_j("",n,t,r)),n.animation}const iNe=(e,t)=>e.depth-t.depth;class aNe{constructor(){this.children=[],this.isDirty=!1}add(t){cj(this.children,t),this.isDirty=!0}remove(t){uj(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(iNe),this.isDirty=!1,this.children.forEach(t)}}function oNe(e,t){const r=$s.now(),n=({timestamp:i})=>{const a=i-r;a>=t&&(Fl(n),e(a-t))};return Hr.setup(n,!0),()=>Fl(n)}const jG=["TopLeft","TopRight","BottomLeft","BottomRight"],lNe=jG.length,oR=e=>typeof e=="string"?parseFloat(e):e,lR=e=>typeof e=="number"||St.test(e);function cNe(e,t,r,n,i,a){i?(e.opacity=Wr(0,r.opacity??1,uNe(n)),e.opacityExit=Wr(t.opacity??1,0,dNe(n))):a&&(e.opacity=Wr(t.opacity??1,r.opacity??1,n));for(let o=0;o<lNe;o++){const l=`border${jG[o]}Radius`;let c=cR(t,l),u=cR(r,l);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||lR(c)===lR(u)?(e[l]=Math.max(Wr(oR(c),oR(u),n),0),(Oa.test(u)||Oa.test(c))&&(e[l]+="%")):e[l]=u}(t.rotate||r.rotate)&&(e.rotate=Wr(t.rotate||0,r.rotate||0,n))}function cR(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const uNe=NG(0,.5,pH),dNe=NG(.5,.95,Ei);function NG(e,t,r){return n=>n<e?0:n>t?1:r(fh(e,t,n))}function uR(e,t){e.min=t.min,e.max=t.max}function fi(e,t){uR(e.x,t.x),uR(e.y,t.y)}function dR(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function xR(e,t,r,n,i){return e-=t,e=K1(e,1/r,n),i!==void 0&&(e=K1(e,1/i,n)),e}function xNe(e,t=0,r=1,n=.5,i,a=e,o=e){if(Oa.test(t)&&(t=parseFloat(t),t=Wr(o.min,o.max,t/100)-o.min),typeof t!="number")return;let l=Wr(a.min,a.max,n);e===a&&(l-=t),e.min=xR(e.min,t,r,l,i),e.max=xR(e.max,t,r,l,i)}function fR(e,t,[r,n,i],a,o){xNe(e,t[r],t[n],t[i],t.scale,a,o)}const fNe=["x","scaleX","originX"],hNe=["y","scaleY","originY"];function hR(e,t,r,n){fR(e.x,t,fNe,r?r.x:void 0,n?n.x:void 0),fR(e.y,t,hNe,r?r.y:void 0,n?n.y:void 0)}function mR(e){return e.translate===0&&e.scale===1}function AG(e){return mR(e.x)&&mR(e.y)}function pR(e,t){return e.min===t.min&&e.max===t.max}function mNe(e,t){return pR(e.x,t.x)&&pR(e.y,t.y)}function gR(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function kG(e,t){return gR(e.x,t.x)&&gR(e.y,t.y)}function yR(e){return ys(e.x)/ys(e.y)}function vR(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class pNe{constructor(){this.members=[]}add(t){cj(this.members,t),t.scheduleRender()}remove(t){if(uj(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 a=this.members[i];if(a.isPresent!==!1){n=a;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 gNe(e,t,r){let n="";const i=e.x.translate/t.x,a=e.y.translate/t.y,o=(r==null?void 0:r.z)||0;if((i||a||o)&&(n=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),r){const{transformPerspective:u,rotate:f,rotateX:x,rotateY:m,skewX:p,skewY:y}=r;u&&(n=`perspective(${u}px) ${n}`),f&&(n+=`rotate(${f}deg) `),x&&(n+=`rotateX(${x}deg) `),m&&(n+=`rotateY(${m}deg) `),p&&(n+=`skewX(${p}deg) `),y&&(n+=`skewY(${y}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 FC=["","X","Y","Z"],yNe={visibility:"hidden"},vNe=1e3;let bNe=0;function PC(e,t,r,n){const{latestValues:i}=t;i[e]&&(r[e]=i[e],t.setStaticValue(e,0),n&&(n[e]=0))}function SG(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const r=uG(t);if(window.MotionHasOptimisedAnimation(r,"transform")){const{layout:i,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",Hr,!(i||a))}const{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&SG(n)}function BG({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(o={},l=t==null?void 0:t()){this.id=bNe++,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,this.nodes.forEach(ENe),this.nodes.forEach(SNe),this.nodes.forEach(BNe),this.nodes.forEach(jNe)},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 aNe)}addEventListener(o,l){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new fj),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){if(this.instance)return;this.isSVG=XH(o)&&!bje(o),this.instance=o;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||l)&&(this.isLayoutDirty=!0),e){let f;const x=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=oNe(x,250),pg.hasAnimatedSinceResize&&(pg.hasAnimatedSinceResize=!1,this.nodes.forEach(CR))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:x,hasRelativeLayoutChanged:m,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||u.getDefaultTransition()||MNe,{onLayoutAnimationStart:v,onLayoutAnimationComplete:b}=u.getProps(),E=!this.targetLayout||!kG(this.targetLayout,p),N=!x&&m;if(this.options.layoutRoot||this.resumeFrom||N||x&&(E||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const j={...Aj(y,"layout"),onPlay:v,onComplete:b};(u.shouldReduceMotion||this.options.layoutRoot)&&(j.delay=0,j.type=!1),this.startAnimation(j),this.setAnimationOrigin(f,N)}else x||CR(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}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,this.eventHandlers.clear(),Fl(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(DNe),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&&SG(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let f=0;f<this.path.length;f++){const x=this.path[f];x.shouldResetTransform=!0,x.updateScroll("snapshot"),x.options.layoutRoot&&x.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(bR);return}this.isUpdating||this.nodes.forEach(ANe),this.isUpdating=!1,this.nodes.forEach(kNe),this.nodes.forEach(CNe),this.nodes.forEach(wNe),this.clearAllSnapshots();const l=$s.now();Un.delta=No(0,1e3/60,l-Un.timestamp),Un.timestamp=l,Un.isProcessing=!0,EC.update.process(Un),EC.preRender.process(Un),EC.render.process(Un),Un.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Sj.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(NNe),this.sharedNodes.forEach(FNe)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Hr.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Hr.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ys(this.snapshot.measuredBox.x)&&!ys(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}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=an(),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&&this.instance){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&&!AG(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,f=u!==this.prevTransformTemplateValue;o&&this.instance&&(l||uc(this.latestValues)||f)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return o&&(c=this.removeTransform(c)),ONe(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return an();const l=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(LNe))){const{scroll:f}=this.root;f&&(rd(l.x,f.offset.x),rd(l.y,f.offset.y))}return l}removeElementScroll(o){var c;const l=an();if(fi(l,o),(c=this.scroll)!=null&&c.wasRoot)return l;for(let u=0;u<this.path.length;u++){const f=this.path[u],{scroll:x,options:m}=f;f!==this.root&&x&&m.layoutScroll&&(x.wasRoot&&fi(l,o),rd(l.x,x.offset.x),rd(l.y,x.offset.y))}return l}applyTransform(o,l=!1){const c=an();fi(c,o);for(let u=0;u<this.path.length;u++){const f=this.path[u];!l&&f.options.layoutScroll&&f.scroll&&f!==f.root&&nd(c,{x:-f.scroll.offset.x,y:-f.scroll.offset.y}),uc(f.latestValues)&&nd(c,f.latestValues)}return uc(this.latestValues)&&nd(c,this.latestValues),c}removeTransform(o){const l=an();fi(l,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!uc(u.latestValues))continue;j4(u.latestValues)&&u.updateSnapshot();const f=an(),x=u.measurePageBox();fi(f,x),hR(l,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,f)}return uc(this.latestValues)&&hR(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!==Un.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var m;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:x}=this.options;if(!(!this.layout||!(f||x))){if(this.resolvedRelativeTargetAt=Un.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=an(),this.relativeTargetOrigin=an(),df(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),fi(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=an(),this.targetWithTransforms=an()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),_7e(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):fi(this.target,this.layout.layoutBox),yG(this.target,this.targetDelta)):fi(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=an(),this.relativeTargetOrigin=an(),df(this.relativeTargetOrigin,this.target,p.target),fi(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||j4(this.parent.latestValues)||gG(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 y;const o=this.getLead(),l=!!this.resumingFrom||this!==o;let c=!0;if((this.isProjectionDirty||(y=this.parent)!=null&&y.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Un.timestamp&&(c=!1),c)return;const{layout:u,layoutId:f}=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||f))return;fi(this.layoutCorrected,this.layout.layoutBox);const x=this.treeScale.x,m=this.treeScale.y;I7e(this.layoutCorrected,this.treeScale,this.path,l),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=an());const{target:p}=o;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(dR(this.prevProjectionDelta.x,this.projectionDelta.x),dR(this.prevProjectionDelta.y,this.projectionDelta.y)),uf(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==x||this.treeScale.y!==m||!vR(this.projectionDelta.x,this.prevProjectionDelta.x)||!vR(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var l;if((l=this.options.visualElement)==null||l.scheduleRender(),o){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=td(),this.projectionDelta=td(),this.projectionDeltaWithTransform=td()}setAnimationOrigin(o,l=!1){const c=this.snapshot,u=c?c.latestValues:{},f={...this.latestValues},x=td();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const m=an(),p=c?c.source:void 0,y=this.layout?this.layout.source:void 0,v=p!==y,b=this.getStack(),E=!b||b.members.length<=1,N=!!(v&&!E&&this.options.crossfade===!0&&!this.path.some(TNe));this.animationProgress=0;let j;this.mixTargetDelta=A=>{const w=A/1e3;wR(x.x,o.x,w),wR(x.y,o.y,w),this.setTargetDelta(x),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(df(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),PNe(this.relativeTarget,this.relativeTargetOrigin,m,w),j&&mNe(this.relativeTarget,j)&&(this.isProjectionDirty=!1),j||(j=an()),fi(j,this.relativeTarget)),v&&(this.animationValues=f,cNe(f,u,this.latestValues,w,N,E)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var l,c,u;this.notifyListeners("animationStart"),(l=this.currentAnimation)==null||l.stop(),(u=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||u.stop(),this.pendingAnimation&&(Fl(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Hr.update(()=>{pg.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=t0(0)),this.currentAnimation=sNe(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:f=>{this.mixTargetDelta(f),o.onUpdate&&o.onUpdate(f)},onStop:()=>{},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(vNe),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:f}=o;if(!(!l||!c||!u)){if(this!==o&&this.layout&&u&&DG(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||an();const x=ys(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+x;const m=ys(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+m}fi(l,c),nd(l,f),uf(this.projectionDeltaWithTransform,this.layoutCorrected,l,f)}}registerSharedNode(o,l){this.sharedNodes.has(o)||this.sharedNodes.set(o,new pNe),this.sharedNodes.get(o).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var l;const{layoutId:o}=this.options;return o?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:o}=this.options;return o?(l=this.getStack())==null?void 0:l.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 u=this.getStack();u&&u.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 u={};c.z&&PC("z",o,u,this.animationValues);for(let f=0;f<FC.length;f++)PC(`rotate${FC[f]}`,o,u,this.animationValues),PC(`skew${FC[f]}`,o,u,this.animationValues);o.render();for(const f in u)o.setStaticValue(f,u[f]),this.animationValues&&(this.animationValues[f]=u[f]);o.scheduleRender()}getProjectionStyles(o){if(!this.instance||this.isSVG)return;if(!this.isVisible)return yNe;const l={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,l.opacity="",l.pointerEvents=mg(o==null?void 0:o.pointerEvents)||"",l.transform=c?c(this.latestValues,""):"none",l;const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){const p={};return this.options.layoutId&&(p.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,p.pointerEvents=mg(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!uc(this.latestValues)&&(p.transform=c?c({},""):"none",this.hasProjected=!1),p}const f=u.animationValues||u.latestValues;this.applyTransformsToTarget(),l.transform=gNe(this.projectionDeltaWithTransform,this.treeScale,f),c&&(l.transform=c(f,l.transform));const{x,y:m}=this.projectionDelta;l.transformOrigin=`${x.origin*100}% ${m.origin*100}% 0`,u.animationValues?l.opacity=u===this?f.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:l.opacity=u===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const p in gh){if(f[p]===void 0)continue;const{correct:y,applyTo:v,isCSSVariable:b}=gh[p],E=l.transform==="none"?f[p]:y(f[p],u);if(v){const N=v.length;for(let j=0;j<N;j++)l[v[j]]=E}else b?this.options.visualElement.renderState.vars[p]=E:l[p]=E}return this.options.layoutId&&(l.pointerEvents=u===this?mg(o==null?void 0:o.pointerEvents)||"":"none"),l}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var l;return(l=o.currentAnimation)==null?void 0:l.stop()}),this.root.nodes.forEach(bR),this.root.sharedNodes.clear()}}}function CNe(e){e.updateLayout()}function wNe(e){var r;const t=((r=e.resumeFrom)==null?void 0:r.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=e.layout,{animationType:a}=e.options,o=t.source!==e.layout.source;a==="size"?mi(x=>{const m=o?t.measuredBox[x]:t.layoutBox[x],p=ys(m);m.min=n[x].min,m.max=m.min+p}):DG(a,t.layoutBox,n)&&mi(x=>{const m=o?t.measuredBox[x]:t.layoutBox[x],p=ys(n[x]);m.max=m.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[x].max=e.relativeTarget[x].min+p)});const l=td();uf(l,n,t.layoutBox);const c=td();o?uf(c,e.applyTransform(i,!0),t.measuredBox):uf(c,n,t.layoutBox);const u=!AG(l);let f=!1;if(!e.resumeFrom){const x=e.getClosestProjectingParent();if(x&&!x.resumeFrom){const{snapshot:m,layout:p}=x;if(m&&p){const y=an();df(y,t.layoutBox,m.layoutBox);const v=an();df(v,n,p.layoutBox),kG(y,v)||(f=!0),x.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=y,e.relativeParent=x)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:f})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function ENe(e){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 jNe(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function NNe(e){e.clearSnapshot()}function bR(e){e.clearMeasurements()}function ANe(e){e.isLayoutDirty=!1}function kNe(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function CR(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function SNe(e){e.resolveTargetDelta()}function BNe(e){e.calcProjection()}function DNe(e){e.resetSkewAndRotation()}function FNe(e){e.removeLeadSnapshot()}function wR(e,t,r){e.translate=Wr(t.translate,0,r),e.scale=Wr(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function ER(e,t,r,n){e.min=Wr(t.min,r.min,n),e.max=Wr(t.max,r.max,n)}function PNe(e,t,r,n){ER(e.x,t.x,r.x,n),ER(e.y,t.y,r.y,n)}function TNe(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const MNe={duration:.45,ease:[.4,0,.1,1]},jR=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),NR=jR("applewebkit/")&&!jR("chrome/")?Math.round:Ei;function AR(e){e.min=NR(e.min),e.max=NR(e.max)}function ONe(e){AR(e.x),AR(e.y)}function DG(e,t,r){return e==="position"||e==="preserve-aspect"&&!R7e(yR(t),yR(r),.2)}function LNe(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const RNe=BG({attachResizeListener:(e,t)=>vh(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),TC={current:void 0},FG=BG({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!TC.current){const e=new RNe({});e.mount(window),e.setOptions({layoutScroll:!0}),TC.current=e}return TC.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),_Ne={pan:{Feature:eNe},drag:{Feature:J7e,ProjectionNode:FG,MeasureLayout:EG}};function kR(e,t,r){const{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",r==="Start");const i="onHover"+r,a=n[i];a&&Hr.postRender(()=>a(t,sm(t)))}class INe extends zl{mount(){const{current:t}=this.node;t&&(this.unmount=mje(t,(r,n)=>(kR(this.node,n,"Start"),i=>kR(this.node,i,"End"))))}unmount(){}}class $Ne extends zl{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=tm(vh(this.node.current,"focus",()=>this.onFocus()),vh(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function SR(e,t,r){const{props:n}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap",r==="Start");const i="onTap"+(r==="End"?"":r),a=n[i];a&&Hr.postRender(()=>a(t,sm(t)))}class zNe extends zl{mount(){const{current:t}=this.node;t&&(this.unmount=vje(t,(r,n)=>(SR(this.node,n,"Start"),(i,{success:a})=>SR(this.node,i,a?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const k4=new WeakMap,MC=new WeakMap,VNe=e=>{const t=k4.get(e.target);t&&t(e)},UNe=e=>{e.forEach(VNe)};function qNe({root:e,...t}){const r=e||document;MC.has(r)||MC.set(r,{});const n=MC.get(r),i=JSON.stringify(t);return n[i]||(n[i]=new IntersectionObserver(UNe,{root:e,...t})),n[i]}function WNe(e,t,r){const n=qNe(t);return k4.set(e,r),n.observe(e),()=>{k4.delete(e),n.unobserve(e)}}const HNe={some:0,all:1};class GNe extends zl{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:a}=t,o={root:r?r.current:void 0,rootMargin:n,threshold:typeof i=="number"?i:HNe[i]},l=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,a&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:f,onViewportLeave:x}=this.node.getProps(),m=u?f:x;m&&m(c)};return WNe(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(KNe(t,r))&&this.startObserver()}unmount(){}}function KNe({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}const XNe={inView:{Feature:GNe},tap:{Feature:zNe},focus:{Feature:$Ne},hover:{Feature:INe}},YNe={layout:{ProjectionNode:FG,MeasureLayout:EG}},S4={current:null},PG={current:!1};function QNe(){if(PG.current=!0,!!oj)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>S4.current=e.matches;e.addListener(t),t()}else S4.current=!1}const ZNe=new WeakMap;function JNe(e,t,r){for(const n in t){const i=t[n],a=r[n];if(ss(i))e.addValue(n,i);else if(ss(a))e.addValue(n,t0(i,{owner:e}));else if(a!==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,t0(o!==void 0?o:i,{owner:e}))}}for(const n in r)t[n]===void 0&&e.removeValue(n);return t}const BR=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class eAe{scrapeMotionValuesFromProps(t,r,n){return{}}constructor({parent:t,props:r,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:a,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=Nj,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=$s.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,Hr.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=r.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=r,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=l,this.blockInitialAnimation=!!a,this.isControllingVariants=ev(r),this.isVariantNode=JH(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...x}=this.scrapeMotionValuesFromProps(r,{},this);for(const m in x){const p=x[m];c[m]!==void 0&&ss(p)&&p.set(c[m],!1)}}mount(t){this.current=t,ZNe.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)),PG.current||QNe(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:S4.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Fl(this.notifyUpdate),Fl(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=D0.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=r.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&Hr.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),a=r.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{i(),a(),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 r0){const r=r0[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 a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):an()}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<BR.length;n++){const i=BR[n];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const a="on"+i,o=t[a];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=JNe(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=t0(r===null?void 0:r,{owner:this}),this.addValue(t,n)),n}readValue(t,r){let n=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return n!=null&&(typeof n=="string"&&(aH(n)||lH(n))?n=parseFloat(n):!wje(n)&&Pl.test(r)&&(n=qH(t,r)),this.setBaseTarget(t,ss(n)?n.get():n)),ss(n)?n.get():n}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){var a;const{initial:r}=this.props;let n;if(typeof r=="string"||typeof r=="object"){const o=Lj(this.props,r,(a=this.presenceContext)==null?void 0:a.custom);o&&(n=o[t])}if(r&&n!==void 0)return n;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!ss(i)?i:this.initialValues[t]!==void 0&&n===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new fj),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}}class TG extends eAe{constructor(){super(...arguments),this.KeyframeResolver=uje}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;ss(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}}function MG(e,{style:t,vars:r},n,i){Object.assign(e.style,t,i&&i.getProjectionStyles(n));for(const a in r)e.style.setProperty(a,r[a])}function tAe(e){return window.getComputedStyle(e)}class rAe extends TG{constructor(){super(...arguments),this.type="html",this.renderInstance=MG}readValueFromInstance(t,r){var n;if(D0.has(r))return(n=this.projection)!=null&&n.isProjecting?m4(r):BEe(t,r);{const i=tAe(t),a=(pj(r)?i.getPropertyValue(r):i[r])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(t,{transformPagePoint:r}){return vG(t,r)}build(t,r,n){Tj(t,r,n.transformTemplate)}scrapeMotionValuesFromProps(t,r,n){return Rj(t,r,n)}}const OG=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 nAe(e,t,r,n){MG(e,t,void 0,n);for(const i in t.attrs)e.setAttribute(OG.has(i)?i:Pj(i),t.attrs[i])}class sAe extends TG{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=an}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(D0.has(r)){const n=UH(r);return n&&n.default||0}return r=OG.has(r)?r:Pj(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,n){return cG(t,r,n)}build(t,r,n){iG(t,r,this.isSVGTag,
284n.transformTemplate,n.style)}renderInstance(t,r,n,i){nAe(t,r,n,i)}mount(t){this.isSVGTag=oG(t.tagName),super.mount(t)}}const iAe=(e,t)=>Oj(e)?new sAe(t):new rAe(t,{allowProjection:e!==C.Fragment}),aAe=n7e({...B7e,...XNe,..._Ne,...YNe},iAe),oAe=Sje(aAe),Zi={success:"bg-success-soft text-success",primary:"bg-primary-soft text-primary",accent:"bg-accent-soft text-ink",danger:"bg-danger-soft text-danger",muted:"bg-surface-2 text-ink-2"},lAe={PENDING:{label:"En attente",tone:"muted"},ISSUED:{label:"Validé",tone:"primary"},CHECKED_IN:{label:"Utilisé",tone:"success"},CANCELLED:{label:"Annulé",tone:"danger"},REFUNDED:{label:"Remboursé",tone:"danger"},EXPIRED:{label:"Expiré",tone:"muted"}},cAe={PENDING:{label:"Paiement en attente",tone:"accent"},PAID:{label:"Payée",tone:"success"},FAILED:{label:"Échouée",tone:"danger"},CANCELLED:{label:"Annulée",tone:"muted"},REFUNDED:{label:"Remboursée",tone:"danger"}},uAe={DRAFT:{label:"Brouillon",tone:"muted"},ACTIVE:{label:"En vente",tone:"accent"},SOLD:{label:"Vendu",tone:"success"},CANCELLED:{label:"Retirée",tone:"muted"},EXPIRED:{label:"Expirée",tone:"muted"},SUSPENDED:{label:"Suspendue",tone:"danger"}},dAe={DRAFT:{label:"Brouillon",tone:"muted"},PUBLISHED:{label:"Publié",tone:"success"},SUSPENDED:{label:"Suspendu",tone:"danger"},CANCELLED:{label:"Annulé",tone:"danger"},COMPLETED:{label:"Terminé",tone:"muted"}},xAe={OPEN:{label:"Ouvert",tone:"accent"},IN_REVIEW:{label:"En cours d’examen",tone:"primary"},RESOLVED:{label:"Résolu",tone:"success"},REJECTED:{label:"Rejeté",tone:"danger"}},fAe={ticket:lAe,order:cAe,listing:uAe,event:dAe,dispute:xAe};function F0(e,t){return t?fAe[e][t]??{label:t,tone:"muted"}:{label:"—",tone:"muted"}}function Ij(e,t){return t?{label:"En revente",tone:"accent"}:F0("ticket",e)}const tr=e=>typeof e=="number"?`${e.toLocaleString("fr-FR")} XAF`:"—",hAe=e=>e?X.generateThumbnailUrl(e,512):"",mAe=e=>new Date(e).toLocaleDateString("fr-FR",{day:"numeric",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit"}),pAe=[{code:"CM",label:"Cameroun"},{code:"CI",label:"Côte d'Ivoire"},{code:"SN",label:"Sénégal"},{code:"BJ",label:"Bénin"},{code:"TG",label:"Togo"},{code:"BF",label:"Burkina Faso"},{code:"ML",label:"Mali"},{code:"GN",label:"Guinée"},{code:"CD",label:"RD Congo"},{code:"CG",label:"Congo-Brazzaville"},{code:"GA",label:"Gabon"},{code:"TD",label:"Tchad"},{code:"NE",label:"Niger"}],gAe=[{value:"concert",label:"Concert"},{value:"conference",label:"Conférence"},{value:"formation",label:"Formation"},{value:"sport",label:"Sport"},{value:"festival",label:"Festival"},{value:"salon",label:"Salon / Exposition"},{value:"religieux",label:"Religieux"},{value:"autre",label:"Autre"}],yAe=7*24*60*60*1e3;function vAe(){const e=lt(),[t,r]=C.useState(""),[n,i]=C.useState(""),[a,o]=C.useState(""),[l,c]=C.useState(""),[u,f]=C.useState(""),[x,m]=C.useState(""),[p,y]=C.useState(""),[v,b]=C.useState(""),[E,N]=C.useState(!1),[j,A]=C.useState(!1),[w,S]=C.useState([]),[B,D]=C.useState(!0),[P,O]=C.useState(null),M=C.useRef(null),I=[n,a,l,u,x,p,v].filter(Boolean).length,V=async()=>{var R,q;D(!0),O(null);try{const G=await X.listPublicEvents({q:t.trim()||void 0,country:n||void 0,city:a.trim()||void 0,category:l||void 0,dateFrom:u||void 0,dateTo:x||void 0,priceMin:p?Number(p):void 0,priceMax:v?Number(v):void 0,includePast:j?!0:void 0,limit:30});if(G.apiReportedSuccess&&((q=(R=G.body)==null?void 0:R.data)!=null&&q.items)){const K=G.body.data.items;if(S(K),!j&&K.length>0){const $=[...K].sort((H,te)=>new Date(te.startsAt).getTime()-new Date(H.startsAt).getTime())[0];_oe($._id)}}else O(G.message||"Impossible de charger les événements.")}catch(G){O((G==null?void 0:G.message)||"Erreur réseau.")}finally{D(!1)}};C.useEffect(()=>{V()},[n,a,l,u,x,p,v,j]),C.useEffect(()=>(M.current&&clearTimeout(M.current),M.current=setTimeout(V,400),()=>{M.current&&clearTimeout(M.current)}),[t]);const W=()=>{i(""),o(""),c(""),f(""),m(""),y(""),b("")},_=C.useMemo(()=>{if(j)return[{key:"past",title:`${w.length} événement${w.length>1?"s":""} passé${w.length>1?"s":""}`,items:w}];const R=w.filter($=>new Date($.startsAt).getTime()-Date.now()<yAe),q=[...w].filter($=>($.ticketsSold??0)>0).sort(($,H)=>(H.ticketsSold??0)-($.ticketsSold??0)).slice(0,3),G=[];q.length>=2&&G.push({key:"popular",title:"Populaires",hot:!0,items:q}),R.length>0&&G.push({key:"soon",title:"Cette semaine",items:R});const K=w.filter($=>!R.includes($));return G.push({key:"upcoming",title:G.length?"Tous les événements à venir":"À venir",items:K.length?K:w}),G},[w,j]),z="w-full rounded-xl border border-border bg-surface px-3 py-2 text-sm text-ink placeholder:text-ink-3 focus:outline-none focus:border-primary";return s.jsxs("div",{className:"min-h-screen bg-bg",children:[s.jsxs("div",{className:"px-4 pt-3 pb-2 flex items-center gap-3",children:[s.jsx(Ct,{onClick:()=>e(-1)}),s.jsx("h1",{className:"text-xl font-bold text-ink",children:"Événements"})]}),s.jsxs("div",{className:"px-4 pb-8 flex flex-col gap-3",children:[s.jsxs("label",{className:"relative block",children:[s.jsx("span",{className:"sr-only",children:"Rechercher un événement"}),s.jsx(L,{icon:vo,size:18,className:"pointer-events-none absolute left-3.5 to
284p-1/2 -translate-y-1/2 text-ink-3"}),s.jsx("input",{type:"search",value:t,onChange:R=>r(R.target.value),placeholder:"Rechercher un événement…",className:"w-full rounded-card border border-border bg-surface py-3 pl-10 pr-3 text-sm text-ink placeholder:text-ink-3 focus:outline-none focus:border-primary"})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("div",{role:"tablist","aria-label":"Période",className:"flex flex-1 gap-1 bg-surface-2 rounded-pill p-1",children:[[!1,"À venir"],[!0,"Passés"]].map(([R,q])=>s.jsx("button",{role:"tab","aria-selected":j===R,onClick:()=>A(R),className:mt("flex-1 rounded-pill py-2 text-sm font-medium",j===R?"bg-surface text-ink":"text-ink-2"),children:q},q))}),s.jsxs("button",{onClick:()=>N(R=>!R),"aria-expanded":E,className:mt("inline-flex items-center gap-1.5 rounded-pill border px-3 text-sm font-semibold",I?"border-primary bg-primary-soft text-primary":"border-border bg-surface text-ink"),children:[s.jsx(L,{icon:hre,size:16}),"Filtres",I?` (${I})`:""]})]}),E&&s.jsxs("section",{className:"bg-surface border border-border rounded-card p-3 flex flex-col gap-2",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[s.jsxs("select",{value:n,onChange:R=>i(R.target.value),className:z,"aria-label":"Pays",children:[s.jsx("option",{value:"",children:"Tous les pays"}),pAe.map(R=>s.jsx("option",{value:R.code,children:R.label},R.code))]}),s.jsx("input",{value:a,onChange:R=>o(R.target.value),placeholder:"Ville",className:z,"aria-label":"Ville"})]}),s.jsxs("select",{value:l,onChange:R=>c(R.target.value),className:z,"aria-label":"Catégorie",children:[s.jsx("option",{value:"",children:"Toutes catégories"}),gAe.map(R=>s.jsx("option",{value:R.value,children:R.label},R.value))]}),s.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[s.jsxs("label",{className:"text-[11px] text-ink-2",children:["À partir du",s.jsx("input",{type:"date",value:u,onChange:R=>f(R.target.value),className:mt(z,"mt-1")})]}),s.jsxs("label",{className:"text-[11px] text-ink-2",children:["Jusqu'au",s.jsx("input",{type:"date",value:x,onChange:R=>m(R.target.value),className:mt(z,"mt-1")})]})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[s.jsxs("label",{className:"text-[11px] text-ink-2",children:["Prix min (XAF)",s.jsx("input",{type:"number",inputMode:"numeric",min:0,value:p,onChange:R=>y(R.target.value),placeholder:"0",className:mt(z,"mt-1")})]}),s.jsxs("label",{className:"text-[11px] text-ink-2",children:["Prix max (XAF)",s.jsx("input",{type:"number",inputMode:"numeric",min:0,value:v,onChange:R=>b(R.target.value),placeholder:"—",className:mt(z,"mt-1")})]})]}),I>0&&s.jsxs("button",{onClick:W,className:"inline-flex items-center justify-center gap-1.5 rounded-pill bg-surface-2 py-2 text-sm font-medium text-ink-2",children:[s.jsx(L,{icon:gt,size:14}),"Effacer les filtres"]})]}),s.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[s.jsx("button",{onClick:()=>e("/events/mes-billets"),className:"rounded-xl border border-primary py-2 text-sm font-semibold text-primary",children:"Mes billets"}),s.jsx("button",{onClick:()=>e("/events/revente"),className:"rounded-xl border border-border bg-surface py-2 text-sm font-semibold text-ink",children:"Revente"}),s.jsx("button",{onClick:()=>e("/events/organizer"),className:"rounded-xl border border-border bg-surface py-2 text-sm font-semibold text-ink",children:"Organiser"})]}),P&&s.jsx("p",{className:"bg-surface border border-border rounded-card p-4 text-sm text-danger",children:P}),B?s.jsx("div",{className:"flex flex-col gap-3",children:Array.from({length:3}).map((R,q)=>s.jsx($e,{height:"h-56",rounded:"rounded-card"},q))}):w.length===0?s.jsxs("div",{className:"bg-surface border border-border rounded-card p-6 text-center flex flex-col items-center gap-2",children:[s.jsx("p",{className:"text-sm font-semibold text-ink",children:j?"Aucun événement passé":I||t?"Aucun événement ne correspond":"Aucun événement pour le moment"}),s.jsx("p",{className:"text-xs text-ink-2",children:I||t?"Essayez d’élargir votre recherche.":"Les prochains événements SBC apparaîtront ici."}),(I>0||t)&&s.jsx("button",{onClick:()=>{W(),r("")},className:"mt-2 text-sm font-semibold text-primary",children:"Effacer la recherche"})]}):_.map(R=>s.jsxs("section",{className:"flex flex-col gap-2",children:[s.jsxs("h2",{className:"text-sm font-bold text-ink flex items-center gap-1.5",children:["hot"in R&&R.hot&&s.jsx(L,{icon:mre,size:15,className:"text-accent"}),R.title]}),R.items.map((q,G)=>{const K=new Date(q.endsAt).getTime()<Date.now();return s.jsxs(oAe.button,{type:"button",initial:{opacity:0,y:8}
284,animate:{opacity:1,y:0},transition:{delay:Math.min(G*.03,.2)},onClick:()=>e(`/events/${encodeURIComponent(q.slug)}`),className:mt("text-left bg-surface border border-border rounded-card overflow-hidden",K&&"opacity-70"),children:[q.posterFileId&&s.jsxs("span",{className:"relative block",children:[s.jsx("img",{src:hAe(q.posterFileId),alt:"","aria-hidden":!0,loading:"lazy",className:mt("w-full h-40 object-cover",K&&"grayscale")}),K&&s.jsx("span",{className:"absolute top-2 left-2 rounded-pill bg-ink px-2 py-0.5 text-[10px] font-bold uppercase tracking-wide text-white",children:"Passé"})]}),s.jsxs("span",{className:"block p-4",children:[s.jsx("span",{className:"block text-[11px] uppercase tracking-wide text-ink-3",children:q.category||"Événement"}),s.jsx("span",{className:"block text-base font-semibold text-ink mt-0.5",children:q.title}),s.jsxs("span",{className:"block text-sm text-ink-2 mt-1",children:[mAe(q.startsAt)," · ",q.venue]}),(q.city||q.country)&&s.jsxs("span",{className:"block text-xs text-ink-3",children:[q.city,q.country&&q.city?", ":"",q.country]}),!K&&s.jsx("span",{className:"mt-2 block text-sm font-semibold text-primary",children:typeof q.priceFrom=="number"?`à partir de ${tr(q.priceFrom)}`:"Voir les prix"})]})]},`${R.key}-${q._id}`)})]},R.key))]})]})}const DR=e=>e?X.generateThumbnailUrl(e,800):"",bAe=e=>new Date(e).toLocaleDateString("fr-FR",{dateStyle:"full"}),CAe=e=>new Date(e).toLocaleTimeString("fr-FR",{hour:"2-digit",minute:"2-digit"});function wAe(){var E,N,j,A;const{slug:e}=ta(),t=lt(),[r,n]=C.useState(null),[i,a]=C.useState([]),[o,l]=C.useState([]),[c,u]=C.useState(!0),[f,x]=C.useState(null),[m,p]=C.useState(!1);C.useEffect(()=>{e&&(async()=>{var w,S,B;try{const D=await X.getPublicEventBySlug(e);if(D.apiReportedSuccess&&((w=D.body)!=null&&w.data)){const P=D.body.data.event;if(n(P),a(D.body.data.ticketTypes??[]),P!=null&&P.resaleEnabled&&(P!=null&&P._id))try{const O=await X.listPublicResale({eventId:P._id,limit:5});O.apiReportedSuccess&&l(((B=(S=O.body)==null?void 0:S.data)==null?void 0:B.items)??[])}catch{}}else x(D.message||"Événement introuvable.")}catch(D){x((D==null?void 0:D.message)||"Erreur réseau.")}finally{u(!1)}})()},[e]);const y=((E=r==null?void 0:r.shareUrls)==null?void 0:E.link)||(typeof window<"u"?window.location.href:""),v=async()=>{const w=`Découvrez ${r==null?void 0:r.title} sur SBC Event`;try{if(navigator.share){await navigator.share({title:r==null?void 0:r.title,text:w,url:y});return}await navigator.clipboard.writeText(y),p(!0),setTimeout(()=>p(!1),2e3)}catch{}};if(c)return s.jsxs("div",{className:"min-h-screen bg-bg px-4 pt-3 flex flex-col gap-3",children:[s.jsx($e,{height:"h-10",rounded:"rounded-card"}),s.jsx($e,{height:"h-48",rounded:"rounded-card"}),s.jsx($e,{height:"h-40",rounded:"rounded-card"})]});if(f||!r)return s.jsx("div",{className:"min-h-screen bg-bg px-4 pt-10",children:s.jsxs("div",{className:"bg-surface border border-border rounded-card p-6 text-center",children:[s.jsx("p",{className:"text-sm font-semibold text-ink",children:f||"Événement introuvable."}),s.jsx("button",{onClick:()=>t("/events"),className:"mt-3 rounded-pill bg-primary px-4 py-2 text-sm font-semibold text-white",children:"Tous les événements"})]})});const b=i.every(w=>w.available<=0||w.onSale===!1);return s.jsxs("div",{className:"min-h-screen bg-bg pb-8",children:[s.jsxs("div",{className:"px-4 pt-3 pb-2 flex items-center gap-3",children:[s.jsx(Ct,{onClick:()=>t(-1)}),s.jsx("h1",{className:"text-lg font-bold text-ink truncate",children:r.title})]}),r.posterFileId&&s.jsx("img",{src:DR(r.posterFileId),alt:r.title,className:"w-full h-56 object-cover"}),r.videoFileId&&s.jsx("video",{src:X.generateSettingsFileUrl(r.videoFileId),poster:r.posterFileId?DR(r.posterFileId):void 0,className:"w-full max-h-96 bg-black",controls:!0,playsInline:!0,preload:"metadata"}),s.jsxs("div",{className:"px-4 pt-4 flex flex-col gap-4",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-xl font-bold text-ink text-balance",children:r.title}),s.jsxs("p",{className:"text-sm text-ink-2 mt-1",children:[bAe(r.startsAt)," · ",CAe(r.startsAt)]}),s.jsxs("p",{className:"text-sm text-ink-2",children:[r.venue," · ",r.city]}),s.jsx("p",{className:"text-xs text-ink-3 mt-0.5",children:r.address})]}),((N=r.organizer)==null?void 0:N.displayName)&&s.jsxs("div",{className:"flex items-center gap-2.5 bg-surface border border-border rounded-card p-3",children:[s.jsx("span",{className:"size-9 shrink-0 grid place-items-center rounded-pill bg-primary-soft text-primary overflow-hidden",children:r.organizer.logoFileId?s.jsx("img",{src:X.generateThumbnailUrl(r.organizer.logoFileId,96),alt:"",className:"size-full object-cover"}):s.jsx(L,{icon:wn,size:16})}),s.jsxs("span",{className:"min-w-0",children:[s.jsx("span",{className:"block text-[11px] text-ink-2",children:"Organisé par"}),s.jsx("span",{className:"block text-sm font-semibold text-ink truncate",children:r.organizer.displayName})]})]}),s.jsx("p",{className:"text-sm text-ink-2 whitespace-pre-wrap leading-relaxed text-pretty",children:r.description}),s.jsxs("section",{className:"flex flex-col gap-2",children:[s.jsx("h3",{className:"text-base font-bold text-ink",children:"Billets"}),i.length===0?s.jsx("p",{className:"text-sm text-ink-2",children:"Aucun billet en vente pour l'instant."}):s.jsx("ul",{className:"flex flex-col gap-2",children:i.map(w=>{const S=w.onSale===!1,B=w.available<=0;return s.jsxs("li",{className:mt("bg-surface border rounded-card p-3 flex items-center justify-between gap-3",S||B?"border-border opacity-70":"border-border"),children:[s.jsxs("div",{className:"min-w-0",children:[s.jsx("p",{className:"font-medium text-ink",children:w.name}),w.description&&s.jsx("p",{className:"text-xs text-ink-2 mt-0.5",children:w.description}),s.jsx("p",{className:"text-xs text-ink-2 mt-1",children:B?"Épuisé":S?w.salesStart&&new Date(w.salesStart)>new Date?`Vente dès le ${new Date(w.salesStart).toLocaleDateString("fr-FR")}`:"Vente terminée":`${w.available} disponible${w.available>1?"s":""}`})]}),s.jsx("p",{className:"shrink-0 font-semibold text-primary",children:tr(w.price)})]},w._id)})})]}),o.length>0&&s.jsxs("section",{className:"flex flex-col gap-2",children:[s.jsxs("h3",{className:"text-base font-bold text-ink flex items-center gap-2",children:[s.jsx(L,{icon:$c,size:17,className:"text-accent"}),"Billets en revente"]}),s.jsx("p",{className:"text-xs text-ink-2 -mt-1",children:"Revendus par des membres SBC. Le billet est retiré au vendeur et un nouveau QR vous est délivré."}),s.jsx("ul",{className:"flex flex-col gap-2",children:o.map(w=>{var S;return s.jsxs("li",{className:"bg-surface border border-border rounded-card p-3 flex items-center justify-between gap-3",children:[s.jsxs("span",{className:"min-w-0",children:[s.jsx("span",{className:"block text-sm font-medium text-ink truncate",children:((S=w.ticketType)==null?void 0:S.name)||"Billet"}),typeof w.originalPrice=="number"&&w.originalPrice!==w.askingPrice&&s.jsx("span",{className:"block text-[11px] text-ink-3 line-through",children:tr(w.originalPrice)})]}),s.jsx("span",{className:"shrink-0 font-semibold text-accent",children:tr(w.askingPrice)})]},w._id)})}),s.jsx("button",{onClick:()=>t("/events/revente",{state:{eventId:r._id,eventTitle:r.title}}
284),className:"rounded-xl border border-border bg-surface py-2.5 text-sm font-semibold text-ink",children:"Voir la marketplace"})]}),s.jsxs("div",{className:"flex flex-col gap-2 pt-1",children:[s.jsx("button",{onClick:()=>t(`/events/${encodeURIComponent(r.slug)}/checkout`,{state:{event:r,ticketTypes:i}}),disabled:b,className:"w-full rounded-xl bg-primary py-3 text-sm font-semibold text-white hover:bg-primary-hover transition-colors disabled:opacity-60 disabled:cursor-not-allowed",children:b?"Billets indisponibles":"Acheter un billet"}),s.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[s.jsxs("a",{href:((j=r.shareUrls)==null?void 0:j.whatsapp)||`https://wa.me/?text=${encodeURIComponent(`${r.title} — ${y}`)}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center gap-1.5 rounded-xl border border-border bg-surface py-2.5 text-sm font-semibold text-ink",children:[s.jsx(L,{icon:nu,size:16,className:"text-whatsapp"}),"WhatsApp"]}),s.jsxs("a",{href:((A=r.shareUrls)==null?void 0:A.facebook)||`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(y)}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center gap-1.5 rounded-xl border border-border bg-surface py-2.5 text-sm font-semibold text-ink",children:[s.jsx(L,{icon:b$,size:16,className:"text-primary"}),"Facebook"]}),s.jsxs("button",{onClick:v,className:"inline-flex items-center justify-center gap-1.5 rounded-xl border border-border bg-surface py-2.5 text-sm font-semibold text-ink",children:[s.jsx(L,{icon:cy,size:16}),m?"Copié":"Partager"]})]})]})]})]})}function EAe(){var P,O;ta();const e=Cr(),t=lt(),{user:r}=Gt(),n=e.state??{},[i]=C.useState(n.event),[a]=C.useState(n.ticketTypes??[]),[o,l]=C.useState({}),[c,u]=C.useState(((P=r==null?void 0:r.name)==null?void 0:P.split(" ")[0])||""),[f,x]=C.useState(((O=r==null?void 0:r.name)==null?void 0:O.split(" ").slice(1).join(" "))||""),[m,p]=C.useState((r==null?void 0:r.phoneNumber)||""),[y,v]=C.useState((r==null?void 0:r.email)||""),[b,E]=C.useState(!1),[N,j]=C.useState(null),A=a.filter(M=>M.available>0&&M.onSale!==!1),w=C.useMemo(()=>a.reduce((M,I)=>M+(o[I._id]||0)*I.price,0),[o,a]),S=Object.values(o).reduce((M,I)=>M+I,0);if(!i)return s.jsx("div",{className:"min-h-screen bg-bg px-4 pt-10",children:s.jsxs("div",{className:"bg-surface border border-border rounded-card p-6 text-center",children:[s.jsx("p",{className:"text-sm font-semibold text-ink",children:"Sélectionnez un événement pour acheter."}),s.jsx("button",{onClick:()=>t("/events"),className:"mt-3 rounded-pill bg-primary px-4 py-2 text-sm font-semibold text-white",children:"Voir les événements"})]})});const B=async()=>{var I,V,W,_;if(!c.trim()||!f.trim()||!m.trim()){j("Prénom, nom et téléphone sont obligatoires.");return}const M=Object.entries(o).filter(([,z])=>z>0).map(([z,R])=>({ticketTypeId:z,quantity:R}));if(M.length===0){j("Sélectionnez au moins un billet.");return}E(!0),j(null);try{const z=await X.createTicketOrder({eventId:i._id,items:M,holder:{firstName:c.trim(),lastName:f.trim(),phone:m.trim(),email:y.trim()||void 0}}),R=(V=(I=z.body)==null?void 0:I.data)==null?void 0:V.orderId,q=(_=(W=z.body)==null?void 0:W.data)==null?void 0:_.paymentSessionId;if(!z.apiReportedSuccess||!q){j(z.message||"Impossible de démarrer le paiement."),E(!1);return}window.open(X.generatePaymentUrl(q),"_blank","noopener,noreferrer"),t(`/events/commande/${R}`,{replace:!0,state:{eventTitle:i.title}})}catch(z){j((z==null?void 0:z.message)||"Erreur réseau."),E(!1)}},D="w-full rounded-xl border border-border bg-surface px-3 py-2.5 text-sm text-ink placeholder:text-ink-3 focus:outline-none focus:border-primary";return s.jsxs("div",{className:"min-h-screen bg-bg",children:[s.jsxs("div",{className:"px-4 pt-3 pb-2 flex items-center gap-3",children:[s.jsx(Ct,{onClick:()=>t(-1)}),s.jsxs("h1",{className:"text-lg font-bold text-ink truncate",children:["Achat — ",i.title]})]}),s.jsxs("div",{className:"px-4 pb-8 flex flex-col gap-4",children:[s.jsxs("section",{className:"flex flex-col gap-2",children:[s.jsx("h2",{className:"text-base font-bold text-ink",children:"Vos billets"}),A.length===0?s.jsx("p",{className:"bg-surface border border-border rounded-card p-4 text-sm text-ink-2",children:"Aucun billet n'est en vente actuellement pour cet événement."}):A.map(M=>{const I=o[M._id]||0,V=Math.min(M.maxPerOrder,M.available);return s.jsxs("div",{className:"bg-surface border border-border rounded-card p-3 flex items-center justify-between gap-3",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsx("p",{className:"font-medium text-ink",children:M.name}),s.jsxs("p",{className:"text-xs text-ink-2 mt-0.5",children:[tr(M.price)," · ",V," max par commande"]})]}),s.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[s.jsx("button",{"aria-label":`Retirer un billet ${M.name}`,onClick:()=>l(W=>({...W,[M._id]:Math.max(0,(W[M._id]||0)-1)})),disabled:I===0,className:"size-9 rounded-pill border border-border text-ink disabled:opacity-40",children:"−"}),s.jsx("span",{className:"w-6 text-center text-sm font-semibold text-ink tabular-nums",children:I}),s.jsx("button",{"aria-label":`Ajouter un billet ${M.name}`,onClick:()=>l(W=>({...W,[M._id]:Math.min(V,(W[M._id]||0)+1)})),disabled:I>=V,className:"size-9 rounded-pill border border-border text-ink disabled:opacity-40",children:"+"})]})]},M._id)})]}),s.jsxs("section",{className:"flex flex-col gap-2",children:[s.jsx("h2",{className:"text-base font-bold text-ink",children:"Vos informations"}),s.jsx("p",{className:"text-xs text-ink-2 -mt-1",children:"Elles figureront sur le billet présenté à l'entrée."}),s.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[s.jsx("input",{value:c,onChange:M=>u(M.target.value),placeholder:"Prénom",className:D,autoComplete:"given-name"}),s.jsx("input",{value:f,onChange:M=>x(M.target.value),placeholder:"Nom",className:D,autoComplete:"family-name"}),s.jsx("input",{value:m,onChange:M=>p(M.target.value),placeholder:"Téléphone",inputMode:"tel",autoComplete:"tel",className:mt(D,"col-span-2")}),s.jsx("input",{value:y,onChange:M=>v(M.target.value),placeholder:"Email (optionnel)",type:"email",autoComplete:"email",className:mt(D,"col-span-2")})]})]}),N&&s.jsx("p",{className:"bg-danger-soft rounded-card p-3 text-sm text-danger",children:N}),s.jsxs("div",{className:"bg-surface border border-border rounded-card p-4 flex items-center justify-between gap-3",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-ink-2",children:"Total à payer"}),s.jsx("p",{className:"text-xl font-bold text-ink tabular-nums",children:tr(w)}),S>0&&s.jsxs("p",{className:"text-[11px] text-ink-2",children:[S," billet",S>1?"s":""]})]}),s.jsx("button",{onClick:B,disabled:S===0||b,className:"rounded-xl bg-primary px-6 py-3 text-sm font-semibold text-white hover:bg-primary-hover transition-colors disabled:opacity-60 disabled:cursor-not-allowed",children:b?"Ouverture du paiement…":"Payer"})]}),s.jsx("p",{className:"text-[11px] text-ink-3 text-center",children:"Le paiement s'ouvre dans un nouvel onglet. Vos billets sont émis dès que le paiement est confirmé par l'opérateur."})]})]})}const jAe=4e3,NAe=75;function AAe(){var A;const{orderId:e}=ta(),t=lt(),n=(A=Cr().state)==null?void 0:A.eventTitle,[i,a]=C.useState(null),[o,l]=C.useState([]),[c,u]=C.useState(!0),[f,x]=C.useState(null),[m,p]=C.useState(!1),y=C.useRef(0),v=C.useCallback(async()=>{var w,S;if(!e)return null;try{const B=await X.getTicketOrder(e);if(B.apiReportedSuccess&&((w=B.body)!=null&&w.data))return a(B.body.data.order??B.body.data),l(B.body.data.tickets??[]),(S=B.body.data.order??B.body.data)==null?void 0:S.status;x(B.message||"Commande introuvable.")}catch(B){x((B==null?void 0:B.message)||"Erreur réseau.")}finally{u(!1)}return null},[e]);C.useEffect(()=>{let w,S=!1;const B=async()=>{const D=await v();if(!(S||D==="PAID"||D==="FAILED"||D==="CANCELLED"||D==="REFUNDED")){if(++y.current>=NAe){p(!0);return}w=setTimeout(B,jAe)}};return B(),()=>{S=!0,clearTimeout(w)}},[v]);const b=i==null?void 0:i.status,E=b==="PAID",N=b==="FAILED"||b==="CANCELLED",j=
284F0("order",b);return s.jsxs("div",{className:"min-h-screen bg-bg",children:[s.jsxs("div",{className:"px-4 pt-3 pb-2 flex items-center gap-3",children:[s.jsx(Ct,{onClick:()=>t("/events")}),s.jsx("h1",{className:"text-xl font-bold text-ink",children:"Votre commande"})]}),s.jsx("div",{className:"px-4 pb-8 flex flex-col gap-3",children:c?s.jsx($e,{height:"h-48",rounded:"rounded-card"}):f&&!i?s.jsxs("div",{className:"bg-surface border border-border rounded-card p-6 text-center flex flex-col items-center gap-2",children:[s.jsx(L,{icon:Nl,size:26,className:"text-danger"}),s.jsx("p",{className:"text-sm font-semibold text-ink",children:f}),s.jsx("button",{onClick:()=>t("/events/mes-billets"),className:"mt-2 rounded-pill bg-primary px-4 py-2 text-sm font-semibold text-white",children:"Mes billets"})]}):s.jsxs(s.Fragment,{children:[s.jsxs("section",{className:mt("rounded-card p-5 text-center",E?"bg-success-soft":N?"bg-danger-soft":"bg-accent-soft"),children:[s.jsx("span",{className:mt("mx-auto grid size-12 place-items-center rounded-pill",E?"bg-success text-white":N?"bg-danger text-white":"bg-accent text-white"),children:s.jsx(L,{icon:E?Sa:N?Nl:w3,size:24})}),s.jsx("p",{className:"mt-3 text-base font-bold text-ink",children:E?"Paiement confirmé":N?"Paiement non abouti":"Paiement en cours…"}),s.jsx("p",{className:"mt-1 text-sm text-ink-2 text-pretty",children:E?`Vos billets sont émis${n?` pour ${n}`:""} et disponibles dans « Mes billets ».`:N?"Aucun montant n'a été retenu. Vous pouvez relancer l'achat depuis l'événement.":m?"Nous n'avons pas encore reçu la confirmation de l'opérateur. Vos billets apparaîtront automatiquement dans « Mes billets » dès qu'elle arrive.":"Terminez le paiement dans l'onglet ouvert. Cette page se met à jour toute seule."}),!E&&!N&&!m&&s.jsx("span",{className:"mt-3 inline-block size-2 animate-pulse rounded-pill bg-accent","aria-hidden":!0})]}),s.jsxs("section",{className:"bg-surface border border-border rounded-card p-4 flex flex-col gap-2",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsx("span",{className:"text-xs text-ink-2",children:"Statut"}),s.jsx("span",{className:mt("rounded-pill px-2 py-0.5 text-[11px] font-semibold",Zi[j.tone]),children:j.label})]}),typeof(i==null?void 0:i.total)=="number"&&s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsx("span",{className:"text-xs text-ink-2",children:"Montant"}),s.jsx("span",{className:"text-sm font-semibold text-ink tabular-nums",children:tr(i.total)})]}),e&&s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsx("span",{className:"text-xs text-ink-2",children:"Référence"}),s.jsx("span",{className:"text-xs font-mono text-ink-2",children:e.slice(-10)})]})]}),o.length>0&&s.jsxs("section",{className:"bg-surface border border-border rounded-card p-4",children:[s.jsxs("p",{className:"text-sm font-semibold text-ink mb-2",children:[o.length," billet",o.length>1?"s":""," émis"]}),s.jsx("ul",{className:"flex flex-col gap-1.5",children:o.map(w=>s.jsxs("li",{className:"flex items-center gap-2 text-sm text-ink-2",children:[s.jsx(L,{icon:ru,size:15,className:"text-primary shrink-0"}),s.jsx("span",{className:"font-medium text-ink",children:w.serial}),w.holderName&&s.jsxs("span",{className:"truncate",children:["· ",w.holderName]})]},w._id))})]}),s.jsx("button",{onClick:()=>t("/events/mes-billets"),className:"w-full rounded-xl bg-primary py-3 text-sm font-semibold text-white hover:bg-primary-hover transition-colors",children:"Voir mes billets"}),s.jsx("button",{onClick:()=>t("/events"),className:"w-full py-2 text-sm text-ink-2",children:"Retour aux événements"})]})})]})}const FR=50,PR=e=>e?new Date(e).toLocaleString("fr-FR",{day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit"}):"—";function Up({label:e,children:t}){return s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-[11px] text-ink-3",children:e}),s.jsx("div",{className:"text-sm text-ink truncate",children:t})]})}function kAe(){const{id:e}=ta(),t=lt(),[r,n]=C.useState(""),[i,a]=C.useState(""),[o,l]=C.useState([]),[c,u]=C.useState(0),[f,x]=C.useState(!0),[m,p]=C.useState(!1),[y,v]=C.useState(null),[b,E]=C.useState({});C.useEffect(()=>{const A=setTimeout(()=>a(r.trim()),350);return()=>clearTimeout(A)},[r]),C.useEffect(()=>{e&&X.listEventTicketTypes(e).then(A=>{var S;if(!A.apiReportedSuccess)return;const w={};for(const B of((S=A.body)==null?void 0:S.data)||[])w[B._id]={name:B.name,price:B.price};E(w)}).catch(()=>{})},[e]),C.useEffect(()=>{if(!e)return;let A=!1;return x(!0),v(null),X.listEventParticipants(e,{q:i||void 0,limit:FR,skip:0}).then(w=>
284{var S,B,D,P;A||(w.apiReportedSuccess?(l(((B=(S=w.body)==null?void 0:S.data)==null?void 0:B.items)||[]),u(((P=(D=w.body)==null?void 0:D.data)==null?void 0:P.total)||0)):v(w.message||"Impossible de charger les participants."))}).catch(w=>{A||v((w==null?void 0:w.message)||"Erreur réseau.")}).finally(()=>{A||x(!1)}),()=>{A=!0}},[e,i]);const N=async()=>{if(e){p(!0);try{const A=await X.listEventParticipants(e,{q:i||void 0,limit:FR,skip:o.length});A.apiReportedSuccess&&l(w=>{var S,B;return[...w,...((B=(S=A.body)==null?void 0:S.data)==null?void 0:B.items)||[]]})}finally{p(!1)}}},j=C.useMemo(()=>o.filter(A=>A.checkedInAt).length,[o]);return s.jsxs("div",{className:"min-h-screen bg-bg",children:[s.jsxs("div",{className:"bg-surface border-b border-border p-4 flex items-center gap-3",children:[s.jsx(Ct,{onClick:()=>t(`/events/organizer/${e}`)}),s.jsx("h1",{className:"text-lg font-semibold text-ink",children:"Participants"})]}),s.jsxs("div",{className:"p-4 space-y-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("div",{className:"flex-1 flex items-center gap-2 bg-surface border border-border rounded-pill px-3 py-2",children:[s.jsx(L,{icon:vo,size:18,className:"text-ink-3 shrink-0"}),s.jsx("input",{value:r,onChange:A=>n(A.target.value),placeholder:"Nom, téléphone ou n° de billet",className:"min-w-0 flex-1 bg-transparent text-sm text-ink placeholder:text-ink-3 outline-none"}),r&&s.jsx("button",{onClick:()=>n(""),"aria-label":"Effacer la recherche",className:"text-ink-3 shrink-0",children:s.jsx(L,{icon:gt,size:16})})]}),e&&s.jsxs("a",{href:X.getEventParticipantsCsvUrl(e),target:"_blank",rel:"noreferrer",className:"shrink-0 inline-flex items-center gap-1.5 bg-surface border border-border rounded-pill px-3 py-2 text-sm font-medium text-ink-2",children:[s.jsx(L,{icon:eu,size:16}),"CSV"]})]}),!f&&!y&&o.length>0&&s.jsxs("div",{className:"text-xs text-ink-2",children:[c," participant",c>1?"s":""," · ",j," entré",j>1?"s":""," sur les ",o.length," affichés"]}),f&&s.jsx("div",{className:"space-y-2",children:[0,1,2,3].map(A=>s.jsx($e,{height:"h-28",rounded:"rounded-card"},A))}),!f&&y&&s.jsx("div",{className:"bg-danger-soft border border-border rounded-card p-4 text-sm text-danger",children:y}),!f&&!y&&o.length===0&&s.jsxs("div",{className:"bg-surface border border-border rounded-card p-8 text-center",children:[s.jsx("span",{className:"mx-auto size-12 grid place-items-center rounded-pill bg-surface-2 text-ink-3",children:s.jsx(L,{icon:wn,size:24})}),s.jsx("p",{className:"mt-3 text-sm text-ink-2",children:i?"Aucun participant ne correspond à cette recherche.":"Aucun billet vendu pour l’instant."})]}),!f&&!y&&o.map(A=>{const w=Ij(A.status,!!A.resaleListingId),S=b[A.ticketTypeId],B=!!A.checkedInAt;return s.jsxs("div",{className:"bg-surface border border-border rounded-card p-3",children:[s.jsxs("div",{className:"flex items-start justify-between gap-2",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-sm font-semibold text-ink truncate",children:A.holderName}),s.jsx("div",{className:"text-xs text-ink-2",children:A.holderPhone})]}),s.jsx("span",{className:`shrink-0 rounded-pill px-2 py-0.5 text-[11px] font-semibold ${Zi[w.tone]}`,children:w.label})]}),s.jsxs("div",{className:"mt-3 grid grid-cols-2 gap-x-3 gap-y-2 sm:grid-cols-4",children:[s.jsx(Up,{label:"Type de billet",children:(S==null?void 0:S.name)??"—"}),s.jsx(Up,{label:"Montant payé",children:tr(S==null?void 0:S.price)}),s.jsx(Up,{label:"Date d’achat",children:PR(A.createdAt)}),s.jsx(Up,{label:"N° de billet",children:A.serial})]}),s.jsxs("div",{className:"mt-3 pt-3 border-t border-border flex items-center justify-between gap-2",children:[s.jsx("span",{className:`rounded-pill px-2 py-0.5 text-[11px] font-semibold ${B?Zi.success:Zi.muted}`,children:B?"Entré":"Pas encore entré"}),B&&s.jsxs("span",{className:"text-[11px] text-ink-3",children:["le ",PR(A.checkedInAt)]})]})]},A._id)}),!f&&!y&&o.length<c&&s.jsx("button",{onClick:N,disabled:m,className:"w-full bg-surface border border-border rounded-card py-3 text-sm font-medium text-ink-2",children:m?"Chargement…":`Afficher plus (${c-o.length} restants)`})]})]})}const SAe=e=>
284new Date(e).toLocaleString("fr-FR",{dateStyle:"medium",timeStyle:"short"});function BAe(){const e=lt(),[t,r]=C.useState("upcoming"),[n,i]=C.useState([]),[a,o]=C.useState(!0),[l,c]=C.useState(null);return C.useEffect(()=>{(async()=>{var u,f,x;o(!0),c(null);try{const m=await X.listMyTickets({past:t==="past"});m.apiReportedSuccess&&((f=(u=m.body)==null?void 0:u.data)!=null&&f.items)?i((x=m.body)==null?void 0:x.data.items):c(m.message||"Impossible de charger vos billets.")}catch(m){c((m==null?void 0:m.message)||"Erreur réseau.")}finally{o(!1)}})()},[t]),s.jsxs("div",{className:"min-h-screen bg-bg",children:[s.jsxs("div",{className:"px-4 pt-3 pb-2 flex items-center gap-3",children:[s.jsx(Ct,{onClick:()=>e(-1)}),s.jsx("h1",{className:"text-xl font-bold text-ink",children:"Mes billets"})]}),s.jsxs("div",{className:"px-4 pb-8 flex flex-col gap-4",children:[s.jsx("div",{role:"tablist","aria-label":"Billets",className:"flex gap-1 bg-surface-2 rounded-pill p-1",children:[["upcoming","À venir"],["past","Passés"]].map(([u,f])=>s.jsx("button",{role:"tab","aria-selected":t===u,onClick:()=>r(u),className:mt("flex-1 rounded-pill py-2 text-sm font-medium transition-colors duration-150",t===u?"bg-surface text-ink":"text-ink-2"),children:f},u))}),a?s.jsx("div",{className:"flex flex-col gap-2",children:Array.from({length:3}).map((u,f)=>s.jsx($e,{height:"h-32",rounded:"rounded-card"},f))}):l?s.jsx("p",{className:"bg-surface border border-border rounded-card p-4 text-sm text-danger",children:l}):n.length===0?s.jsxs("div",{className:"bg-surface border border-border rounded-card p-6 text-center flex flex-col items-center gap-2",children:[s.jsx(L,{icon:ru,size:30,className:"text-ink-3"}),s.jsx("p",{className:"text-sm font-semibold text-ink",children:t==="past"?"Aucun billet passé":"Aucun billet à venir"}),s.jsx("p",{className:"text-xs text-ink-2",children:"Vos billets achetés sur SBC Event apparaîtront ici."}),t==="upcoming"&&s.jsx("button",{onClick:()=>e("/events"),className:"mt-2 rounded-pill bg-primary px-4 py-2 text-sm font-semibold text-white",children:"Découvrir les événements"})]}):s.jsx("ul",{className:"flex flex-col gap-2",children:n.map(u=>{var p,y,v,b,E;const f=!!u.ticket.resaleListingId,x=Ij(u.ticket.status,f),m=t==="upcoming"&&u.ticket.status==="ISSUED"&&!f&&((p=u.event)==null?void 0:p.resaleEnabled)!==!1;return s.jsxs("li",{className:"bg-surface border border-border rounded-card p-4",children:[s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsx("p",{className:"font-semibold text-ink truncate",children:((y=u.event)==null?void 0:y.title)||"—"}),s.jsx("p",{className:"text-xs text-ink-2 mt-0.5",children:(v=u.event)!=null&&v.startsAt?SAe(u.event.startsAt):""}),s.jsx("p",{className:"text-xs text-ink-2",children:(b=u.event)==null?void 0:b.venue}),s.jsxs("p",{className:"text-[11px] text-ink-3 mt-1",children:["Billet ",u.ticket.serial," · ",(E=u.ticketType)==null?void 0:E.name]})]}),s.jsx("span",{className:mt("shrink-0 rounded-pill px-2 py-0.5 text-[11px] font-semibold",Zi[x.tone]),children:x.label})]}),s.jsxs("div",{className:"mt-3 flex gap-2",children:[s.jsxs("button",{onClick:()=>e(`/events/mes-billets/${u.ticket._id}`),className:"flex-1 inline-flex items-center justify-center gap-1.5 rounded-xl bg-primary py-2.5 text-sm font-semibold text-white hover:bg-primary-hover transition-colors",children:["Voir mon billet",s.jsx(L,{icon:Mn,size:15})]}),m&&s.jsx("button",{onClick:()=>e(`/events/mes-billets/${u.ticket._id}/revendre`),className:"rounded-xl border border-primary px-3 py-2.5 text-sm font-semibold text-primary hover:bg-primary-soft transition-colors",children:"Revendre"})]})]},u.ticket._id)})})]})]})}const DAe=e=>new Date(e).toLocaleDateString("fr-FR",{dateStyle:"full"}),FAe=e=>new Date(e).toLocaleTimeString("fr-FR",{hour:"2-digit",minute:"2-digit"});function PAe(){const{id:e}=ta(),t=lt(),[r,n]=C.useState(null),[i,a]=C.useState(!0),[o,l]=C.useState(null),[c,u]=C.useState(!1),f=C.useCallback(async()=>{var w;if(e)try{const S=await X.getMyTicket(e);S.apiReportedSuccess?n((w=S.body)==null?void 0:w.data):l(S.message||"Billet introuvable.")}catch(S){l((S==null?void 0:S.message)||"Erreur réseau.")}finally{a(!1)}},[e]);if(C.useEffect(()=>{f()},[f]),i)return s.jsxs("div",{className:"min-h-screen bg-bg px-4 pt-3 flex flex-col gap-3",children:[s.jsx($e,{height:"h-10",rounded:"rounded-card"}),s.jsx($e,{height:"h-80",rounded:"rounded-card"}),s.jsx($e,{height:"h-28",rounded:"rounded-card"})]});if(o||!r)return s.jsx("div",{className:"min-h-screen bg-bg px-4 pt-10",children:s.jsxs("div",{className:"bg-surface border border-border rounded-card p-6 text-center flex flex-col items-center gap-2",children:[s.jsx(L,{icon:Nl,size:26,className:"text-danger"}),s.jsx("p",{className:"text-sm font-semibold text-ink",children:o||"Billet introuvable."}),s.jsx("button",{onClick:()=>t("/events/mes-billets"),className:"mt-2 rounded-pill bg-primary px-4 py-2 text-sm font-semibold text-white",children:"Mes billets"})]})});const{ticket:x,event:m,ticketType:p,qrImageDataUrl:y,activeResaleListing:v,resaleOrder:b}=r,E=!!v,N=Ij(x.status,E),j=x.status==="ISSUED"&&(m==null?void 0:m.resaleEnabled)&&!E,A=async()=>
284{if(v!=null&&v._id){u(!0);try{await X.cancelMyResaleListing(v._id),await f()}catch(w){l((w==null?void 0:w.message)||"Impossible de retirer l'annonce.")}finally{u(!1)}}};return s.jsxs("div",{className:"min-h-screen bg-bg",children:[s.jsxs("div",{className:"px-4 pt-3 pb-2 flex items-center gap-3",children:[s.jsx(Ct,{onClick:()=>t(-1)}),s.jsx("h1",{className:"text-xl font-bold text-ink",children:"Mon billet"})]}),s.jsxs("div",{className:"px-4 pb-8 flex flex-col gap-3",children:[s.jsxs("section",{className:"bg-surface border border-border rounded-card p-5 text-center",children:[x.previousTicketId&&s.jsxs("p",{className:"mb-3 inline-flex items-center gap-1.5 rounded-pill bg-primary-soft px-2.5 py-1 text-[11px] font-semibold text-primary",children:[s.jsx(L,{icon:$c,size:12}),"Acheté via la marketplace de revente"]}),s.jsx("p",{className:"text-xs text-ink-2",children:"Billet"}),s.jsx("p",{className:"text-lg font-bold text-ink tabular-nums",children:x.serial}),s.jsx("p",{className:"text-sm text-ink-2 mt-1",children:x.holderName}),y?s.jsx("img",{src:y,alt:"QR Code du billet",className:"mx-auto mt-4 size-56 rounded-tile border border-border bg-white p-2"}):s.jsx("p",{className:"mt-4 rounded-tile bg-danger-soft p-3 text-sm text-danger",children:"Ce billet n'est plus valide et ne peut pas être scanné."}),s.jsx("span",{className:mt("mt-4 inline-block rounded-pill px-3 py-1 text-xs font-bold uppercase tracking-wide",Zi[N.tone]),children:N.label})]}),s.jsxs("section",{className:"bg-surface border border-border rounded-card p-4 flex flex-col gap-1",children:[s.jsx("p",{className:"font-semibold text-ink",children:m==null?void 0:m.title}),(m==null?void 0:m.startsAt)&&s.jsxs("p",{className:"text-sm text-ink-2",children:[DAe(m.startsAt)," · ",FAe(m.startsAt)]}),s.jsx("p",{className:"text-sm text-ink-2",children:m==null?void 0:m.venue}),s.jsx("p",{className:"text-xs text-ink-3",children:m==null?void 0:m.address}),s.jsxs("p",{className:"text-xs text-ink-2 mt-2",children:["Type de billet : ",s.jsx("span",{className:"font-medium text-ink",children:p==null?void 0:p.name})]})]}),E&&s.jsxs("section",{className:"bg-accent-soft rounded-card p-4",children:[s.jsx("p",{className:"text-sm font-semibold text-ink",children:"Ce billet est en vente sur la marketplace"}),s.jsxs("p",{className:"text-xs text-ink-2 mt-1",children:["Prix demandé : ",s.jsx("span",{className:"font-semibold text-ink",children:tr(v.askingPrice)}),typeof v.originalPrice=="number"&&s.jsxs(s.Fragment,{children:[" · prix d'origine ",tr(v.originalPrice)]})]}),s.jsx("p",{className:"text-xs text-ink-2 mt-1",children:"Tant qu'il n'est pas vendu, vous pouvez retirer l'annonce et garder votre billet."}),s.jsx("button",{onClick:A,disabled:c,className:"mt-3 rounded-pill border border-border bg-surface px-3 py-1.5 text-xs font-semibold text-ink disabled:opacity-60",children:c?"Retrait…":"Retirer l'annonce"})]}),j&&s.jsx("button",{onClick:()=>t(`/events/mes-billets/${x._id}/revendre`),className:"w-full rounded-xl border border-primary py-3 text-sm font-semibold text-primary hover:bg-primary-soft transition-colors",children:"Revendre mon billet"}),s.jsx("button",{onClick:()=>t("/events/signaler",{state:{ticketId:x._id,resaleOrderId:b==null?void 0:b._id,eventTitle:m==null?void 0:m.title,serial:x.serial}}),className:"w-full py-2 text-sm text-ink-2",children:"Signaler un problème avec ce billet"})]})]})}const qp="w-full bg-surface border border-border rounded-tile px-3 py-2 text-sm text-ink placeholder:text-ink-3 outline-none focus:border-primary";function Tx({label:e,value:t,accent:r}){return s.jsxs("div",{className:"bg-surface border border-border rounded-card p-3 text-center",children:[s.jsx("div",{className:"text-xs text-ink-2",children:e}),s.jsx("div",{className:`text-lg font-bold mt-1 ${r?"text-success":"text-ink"}`,children:t})]})}function TAe(){const e=lt(),[t,r]=C.useState(null),[n,i]=C.useState(!0),[a,o]=C.useState(!1),[l,c]=C.useState(""),[u,f]=C.useState(""),[x,m]=C.useState(""),[p,y]=C.useState(""),[v,b]=C.useState(!1),[E,N]=C.useState(null),[j,A]=C.useState(null),[w,S]=C.useState([]),[B,D]=C.useState(null);C.useEffect(()=>{(async()=>{var O;try{const M=await X.getMyOrganizer();M.apiReportedSuccess&&r((O=M.body)==null?void 0:O.data)}finally{i(!1)}})()},[]),C.useEffect(()=>{(t==null?void 0:t.status)==="APPROVED"&&(X.getOrganizerDashboard().then(O=>{var M;return O.apiReportedSuccess&&A((M=O.body)==null?void 0:M.data)}),X.listMyOrganizerEvents({limit:20}).then(O=>{var M;return O.apiReportedSuccess&&S(((M=O.body)==null?void 0:M.data.items)||[])}),X.getEventOrganizerBalance().then(O=>{var M,I;O.apiReportedSuccess&&D(((I=(M=O.body)==null?void 0:M.data)==null?void 0:I.eventOrganizerBalance)??0)}).catch(()=>{}))},[t==null?void 0:t.status]);const P=async()=>{var O;if(!l.trim()){N("Le nom affiché est obligatoire.");return}b(!0),N(null);try{const M=await X.applyAsOrganizer({displayName:l.trim(),contactPhone:u.trim()||void 0,contactEmail:x.trim()||void 0,bio:p.trim()||void 0});M.apiReportedSuccess?r((O=M.body)==null?void 0:O.data):N(M.message||"Impossible de soumettre.")}catch(M){N((M==null?void 0:M.message)||"Erreur.")}finally{b(!1)}};return n?s.jsx("div",{className:"min-h-screen bg-bg p-8 text-center text-ink-2",children:"Chargement..."}):s.jsxs("div",{className:"min-h-screen bg-bg",children:[s.jsxs("div",{className:"bg-surface p-4 flex items-center gap-3 border-b border-border",children:[s.jsx(Ct,{onClick:()=>e("/events")}),s.jsx("h1",{className:"text-lg font-semibold text-ink",children:"Espace organisateur"})]}
284),s.jsxs("div",{className:"p-4 space-y-4",children:[!t&&!a&&s.jsxs("div",{className:"bg-surface border border-dashed border-border rounded-card p-6 text-center",children:[s.jsx("p",{className:"text-sm text-ink-2",children:"Vous n'êtes pas encore inscrit(e) comme organisateur."}),s.jsx("button",{onClick:()=>o(!0),className:"mt-4 bg-primary hover:bg-primary-hover text-white font-semibold px-6 py-3 rounded-tile transition-colors",children:"Devenir organisateur"})]}),!t&&a&&s.jsxs("div",{className:"space-y-3",children:[s.jsx("input",{value:l,onChange:O=>c(O.target.value),placeholder:"Nom affiché (obligatoire)",className:qp}),s.jsx("input",{value:u,onChange:O=>f(O.target.value),placeholder:"Téléphone de contact",className:qp}),s.jsx("input",{value:x,onChange:O=>m(O.target.value),placeholder:"Email de contact",type:"email",className:qp}),s.jsx("textarea",{value:p,onChange:O=>y(O.target.value),placeholder:"Présentez brièvement votre activité",rows:3,className:qp}),s.jsx("button",{onClick:P,disabled:v,className:"w-full bg-primary hover:bg-primary-hover text-white font-semibold py-3 rounded-tile transition-colors disabled:opacity-60",children:v?"...":"Soumettre"}),E&&s.jsx("div",{className:"bg-danger-soft border border-border rounded-tile p-3 text-sm text-danger",children:E})]}),t&&t.status==="PENDING"&&s.jsxs("div",{className:"bg-accent-soft border border-border rounded-card p-6 text-center",children:[s.jsx("div",{className:"text-2xl",children:"⏳"}),s.jsxs("p",{className:"text-sm text-ink-2 mt-2",children:["Votre candidature ",s.jsx("strong",{className:"text-ink",children:t.displayName})," est en cours d'examen."]})]}),t&&t.status==="SUSPENDED"&&s.jsx("div",{className:"bg-danger-soft border border-border rounded-card p-6 text-center",children:s.jsx("div",{className:"text-sm text-danger",children:"Votre compte organisateur est suspendu. Contactez le support SBC."})}),t&&t.status==="APPROVED"&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(Tx,{label:"Événements",value:String((j==null?void 0:j.eventCount)??"—")}),s.jsx(Tx,{label:"Billets vendus",value:String((j==null?void 0:j.issued)??"—")}),s.jsx(Tx,{label:"CA brut",value:tr((j==null?void 0:j.gross)??0)}),s.jsx(Tx,{label:"Entrées validées",value:String((j==null?void 0:j.checkedIn)??"—")}),s.jsx("div",{className:"col-span-2",children:s.jsx(Tx,{label:"Revenus disponibles",value:B===null?"—":tr(B),accent:!0})})]}),s.jsx("button",{onClick:()=>e("/events/organizer/nouveau"),className:"w-full bg-primary hover:bg-primary-hover text-white font-semibold py-3 rounded-tile transition-colors",children:"+ Créer un événement"}),s.jsx("button",{onClick:()=>e("/events/organizer/finances"),className:"w-full bg-surface border border-primary text-primary font-semibold py-3 rounded-tile",children:"Voir mes finances"}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-base font-semibold text-ink mb-2",children:"Mes événements"}),w.length===0?s.jsx("div",{className:"text-sm text-ink-2",children:"Aucun événement pour l'instant."}):s.jsx("div",{className:"space-y-2",children:w.map(O=>{const M=F0("event",O.status);return s.jsxs("button",{onClick:()=>e(`/events/organizer/${O._id}`),className:"w-full text-left bg-surface border border-border rounded-card p-3 hover:bg-surface-2 transition-colors",children:[s.jsx("div",{className:"font-medium text-ink",children:O.title}),s.jsxs("div",{className:"text-xs text-ink-2 mt-0.5",children:[new Date(O.startsAt).toLocaleDateString("fr-FR")," · ",O.venue]}),s.jsx("span",{className:`inline-block mt-1 rounded-pill px-2 py-0.5 text-[10px] font-bold ${Zi[M.tone]}`,children:M.label})]},O._id)})})]})]})]})]})}const TR=e=>e?new Date(e).toISOString().slice(0,16):"",Wp="ANNULER",Fn="w-full bg-surface border border-border rounded-tile px-3 py-2 text-sm text-ink placeholder:text-ink-3 outline-none focus:border-primary";function MR(){const{id:e}=ta(),t=!!e,r=lt(),[n,i]=C.useState(""),[a,o]=C.useState(""),[l,c]=C.useState("concert"),[u,f]=C.useState("CM"),[x,m]=C.useState(""),[p,y]=C.useState(""),[v,b]=C.useState(""),[E,N]=C.useState(""),[j,A]=C.useState(""),[w,S]=C.useState(!0),[B,D]=C.useState("120"),[P,O]=C.useState(""),[M,I]=C.useState(null),[V,W]=C.useState(""),[_,z]=C.useState(!1),[R,q]=C.useState(""),[G,K]=C.useState(null),[$,H]=C.useState(""),[te,ne]=C.useState(!1),Y=30*1024*1024,[J,oe]=C.useState(!1),[he,Q]=C.useState(null),[ue,de]=C.useState(null),[me,Le]=C.useState([]),[Ne,ye]=C.useState(""),[ee,Ae]=C.useState(""),[De,we]=C.useState(""),[je,Te]=C.useState(""),[Se,He]=C.useState("10"),[Ue,rt]=C.useState(""),[wt,Ft]=C.useState(""),[xt,Kt]=C.useState(!1),[ft,Gr]=C.useState(""),[Nn,vs]=C.useState(""),[bs,Kr]=C.useState(!1);C.useEffect(()=>{t&&e&&(X.listMyOrganizerEvents({limit:100}).then(pe=>{var Rt;if(!pe.apiReportedSuccess)return;const Pe=(((Rt=pe.body)==null?void 0:Rt.data.items)||[]).find(Pt=>Pt._id===e);Pe&&(de(Pe),i(Pe.title),o(Pe.description),c(Pe.category),Pe.country&&f(Pe.country),m(Pe.city),y(Pe.venue),b(Pe.address),N(TR(Pe.startsAt)),A(TR(Pe.endsAt)),S(Pe.resaleEnabled),D(String(Pe.maxResalePricePct??120)),Pe.posterFileId&&(O(Pe.posterFileId),W(X.generateThumbnailUrl(Pe.posterFileId,512))),Pe.videoFileId&&(q(Pe.videoFileId),H(X.generateSettingsFileUrl(Pe.videoFileId))))}),X.listEventTicketTypes(e).then(pe=>{var Pe;return pe.apiReportedSuccess&&Le(((Pe=pe.body)==null?void 0:Pe.data)||[])}))},[e,t]);const fn=pe=>{I(pe),W(pe?URL.createObjectURL(pe):P?X.generateThumbnailUrl(P,512):"")},Rn=pe=>{if(pe&&pe.size>Y){Q(`La vidéo ne doit pas dépasser 30 Mo (celle-ci fait ${(pe.size/1024/1024).toFixed(1)} Mo).`);return}Q(null),K(pe),H(pe?URL.createObjectURL(pe):R?X.generateSettingsFileUrl(R):"")},hn=async()=>{var pe,Pe,Rt,Pt,Jt,at;Q(null),oe(!0);try{let Qt=P;if(M){z(!0);const Mr=await X.uploadFile(M);z(!1);const wr=(Pe=(pe=Mr.body)==null?void 0:pe.data)==null?void 0:Pe.fileId;if(!Mr.isSuccessByStatusCode||!wr){Q(Mr.message||"L'affiche n'a pas pu être envoyée. Réessayez.");return}Qt=wr,O(wr),I(null)}let ht=R;if(G){if(G.size>Y){Q("La vidéo dépasse 30 Mo.");return}ne(!0);const Mr=await X.uploadFile(G);ne(!1);const wr=(Pt=(Rt=Mr.body)==null?void 0:Rt.data)==null?void 0:Pt.fileId;if(!Mr.isSuccessByStatusCode||!wr){Q(Mr.message||"La vidéo n'a pas pu être envoyée. Réessayez.");return}ht=wr,q(wr),K(null)}const ir={title:n.trim(),description:a.trim(),category:l,country:u,city:x.trim(),venue:p.trim(),address:v.trim(),startsAt:E?new Date(E).toISOString():void 0,endsAt:j?new Date(j).toISOString():void 0,resaleEnabled:w,maxResalePricePct:B?parseFloat(B):null};Qt&&(ir.posterFileId=Qt),ht&&(ir.videoFileId=ht);const Tr=t&&e?await X.updateOrganizerEvent(e,ir):await X.createOrganizerEvent(ir);if(!Tr.apiReportedSuccess){Q(Tr.message||"Erreur.");return}de((Jt=Tr.body)==null?void 0:Jt.data),t||r(`/events/organizer/${(at=Tr.body)==null?void 0:at.data._id}`,{replace:!0})}catch(Qt){Q((Qt==null?void 0:Qt.message)||"Erreur réseau."),z(!1)}finally{oe(!1)}},_n=async()=>
284{if(!ue)return;if(!Ne.trim()||!De||!je){Q("Nom, prix et quantité sont obligatoires.");return}const pe=Ue?new Date(Ue):null,Pe=wt?new Date(wt):null;if(pe&&Pe&&Pe<=pe){Q("La fin de vente doit être postérieure au début de vente.");return}const Rt=j?new Date(j):ue.endsAt?new Date(ue.endsAt):null;if(pe&&Rt&&pe>=Rt){Q("Le début de vente doit précéder la fin de l'événement.");return}Q(null);const Pt=await X.createEventTicketType(ue._id,{name:Ne.trim(),description:ee.trim()||void 0,price:parseFloat(De),quantityTotal:parseInt(je,10),maxPerOrder:parseInt(Se,10),salesStart:pe?pe.toISOString():void 0,salesEnd:Pe?Pe.toISOString():void 0});Pt.apiReportedSuccess?(Le(Jt=>{var at;return[...Jt,(at=Pt.body)==null?void 0:at.data]}),ye(""),Ae(""),we(""),Te(""),He("10"),rt(""),Ft("")):Q(Pt.message||"Impossible d'ajouter le billet.")},fr=async()=>{var Pe;if(!ue)return;const pe=await X.publishOrganizerEvent(ue._id);pe.apiReportedSuccess?de((Pe=pe.body)==null?void 0:Pe.data):Q(pe.message||"Impossible de publier.")},Bt=async()=>{var pe;if(!(!ue||Nn.trim().toUpperCase()!==Wp)){Kr(!0),Q(null);try{const Pe=await X.cancelOrganizerEvent(ue._id,ft.trim()||void 0);Pe.apiReportedSuccess?(de(((pe=Pe.body)==null?void 0:pe.data)??{...ue,status:"CANCELLED"}),Kt(!1),Gr(""),vs("")):Q(Pe.message||"L'annulation a échoué.")}catch(Pe){Q((Pe==null?void 0:Pe.message)||"Erreur réseau.")}finally{Kr(!1)}}},Ce=ue?F0("event",ue.status):null;return s.jsxs("div",{className:"min-h-screen bg-bg",children:[s.jsxs("div",{className:"bg-surface p-4 flex items-center gap-3 border-b border-border",children:[s.jsx(Ct,{onClick:()=>r("/events/organizer")}),s.jsx("h1",{className:"text-lg font-semibold text-ink flex-1",children:t?"Modifier l'événement":"Créer un événement"}),Ce&&s.jsx("span",{className:`rounded-pill px-2 py-0.5 text-[11px] font-semibold ${Zi[Ce.tone]}`,children:Ce.label})]}),s.jsxs("div",{className:"p-4 space-y-3",children:[s.jsxs("label",{className:"block cursor-pointer border border-dashed border-border rounded-card overflow-hidden bg-surface-2 hover:border-primary transition-colors",children:[V?s.jsxs("div",{className:"relative",children:[s.jsx("img",{src:V,alt:"Affiche",className:"w-full h-48 object-cover"}),s.jsx("div",{className:"absolute bottom-2 right-2 bg-ink/70 text-surface text-xs px-2 py-1 rounded-pill",children:M?"Nouvelle affiche · cliquez pour changer":"Cliquez pour changer"})]}):s.jsxs("div",{className:"p-8 text-center text-sm text-ink-2",children:[s.jsx("div",{className:"text-2xl",children:"🖼️"}),s.jsx("div",{className:"mt-2",children:"Ajouter une affiche"}),s.jsx("div",{className:"text-xs text-ink-3 mt-1",children:"Format image, ratio conseillé 16/9 ou 4/5"})]}),s.jsx("input",{type:"file",accept:"image/*",className:"hidden",onChange:pe=>{var Pe;return fn(((Pe=pe.target.files)==null?void 0:Pe[0])??null)}})]}),_&&s.jsx("div",{className:"text-xs text-ink-2 text-center",children:"Envoi de l'affiche..."}),s.jsxs("label",{className:"block cursor-pointer border border-dashed border-border rounded-card overflow-hidden bg-surface-2 hover:border-primary transition-colors",children:[$?s.jsxs("div",{className:"relative",children:[s.jsx("video",{src:$,className:"w-full h-40 object-cover bg-ink",muted:!0,playsInline:!0,controls:!1}),s.jsx("div",{className:"absolute bottom-2 right-2 bg-ink/70 text-surface text-xs px-2 py-1 rounded-pill",children:G?"Nouvelle vidéo · cliquez pour changer":"Cliquez pour changer"}),G&&s.jsxs("div",{className:"absolute top-2 left-2 bg-ink/70 text-surface text-[10px] px-2 py-1 rounded-pill",children:[(G.size/1024/1024).toFixed(1)," Mo"]})]}):s.jsxs("div",{className:"p-6 text-center text-sm text-ink-2",children:[s.jsx("div",{className:"text-2xl",children:"🎬"}),s.jsx("div",{className:"mt-2",children:"Ajouter une vidéo promo (optionnel)"}),s.jsx("div",{className:"text-xs text-ink-3 mt-1",children:"MP4, MOV ou WebM · 30 Mo max"})]}),s.jsx("input",{type:"file",accept:"video/mp4,video/quicktime,video/webm,video/*",className:"hidden",onChange:pe=>{var Pe;return Rn(((Pe=pe.target.files)==null?void 0:Pe[0])??null)}})]}),te&&s.jsx("div",{className:"text-xs text-ink-2 text-center",children:"Envoi de la vidéo..."}),s.jsx("input",{value:n,onChange:pe=>i(pe.target.value),placeholder:"Titre",className:Fn}),s.jsx("textarea",{value:a,onChange:pe=>o(pe.target.value),placeholder:"Description",rows:4,className:Fn}),s.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[s.jsxs("select",{value:l,onCh
284ange:pe=>c(pe.target.value),className:Fn,children:[s.jsx("option",{value:"concert",children:"Concert"}),s.jsx("option",{value:"conference",children:"Conférence"}),s.jsx("option",{value:"formation",children:"Formation"}),s.jsx("option",{value:"sport",children:"Sport"}),s.jsx("option",{value:"festival",children:"Festival"}),s.jsx("option",{value:"salon",children:"Salon / Exposition"}),s.jsx("option",{value:"religieux",children:"Religieux"}),s.jsx("option",{value:"autre",children:"Autre"})]}),s.jsxs("select",{value:u,onChange:pe=>f(pe.target.value),className:Fn,children:[s.jsx("option",{value:"CM",children:"Cameroun"}),s.jsx("option",{value:"CI",children:"Côte d'Ivoire"}),s.jsx("option",{value:"SN",children:"Sénégal"}),s.jsx("option",{value:"BJ",children:"Bénin"}),s.jsx("option",{value:"TG",children:"Togo"}),s.jsx("option",{value:"BF",children:"Burkina Faso"}),s.jsx("option",{value:"ML",children:"Mali"}),s.jsx("option",{value:"GN",children:"Guinée"}),s.jsx("option",{value:"CD",children:"RD Congo"}),s.jsx("option",{value:"CG",children:"Congo-Brazzaville"}),s.jsx("option",{value:"GA",children:"Gabon"}),s.jsx("option",{value:"TD",children:"Tchad"}),s.jsx("option",{value:"NE",children:"Niger"})]})]}),s.jsx("input",{value:x,onChange:pe=>m(pe.target.value),placeholder:"Ville",className:Fn}),s.jsx("input",{value:p,onChange:pe=>y(pe.target.value),placeholder:"Lieu",className:Fn}),s.jsx("input",{value:v,onChange:pe=>b(pe.target.value),placeholder:"Adresse",className:Fn}),s.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[s.jsxs("label",{className:"text-xs text-ink-2",children:["Début",s.jsx("input",{type:"datetime-local",value:E,onChange:pe=>N(pe.target.value),className:`${Fn} mt-1`})]}),s.jsxs("label",{className:"text-xs text-ink-2",children:["Fin",s.jsx("input",{type:"datetime-local",value:j,onChange:pe=>A(pe.target.value),className:`${Fn} mt-1`})]})]}),s.jsxs("label",{className:"flex items-center gap-2 text-sm text-ink",children:[s.jsx("input",{type:"checkbox",checked:w,onChange:pe=>S(pe.target.checked)}),"Autoriser la revente entre utilisateurs"]}),w&&s.jsxs("label",{className:"flex items-center gap-2 text-sm text-ink-2",children:["Prix maximum de revente (%)",s.jsx("input",{type:"number",min:"100",max:"500",value:B,onChange:pe=>D(pe.target.value),className:"w-24 bg-surface border border-border rounded-tile px-2 py-1 text-sm text-ink outline-none focus:border-primary"})]}),s.jsx("button",{onClick:hn,disabled:J,className:"w-full bg-primary hover:bg-primary-hover text-white font-semibold py-3 rounded-tile transition-colors disabled:opacity-60",children:J?"...":t?"Enregistrer":"Créer"}),he&&s.jsx("div",{className:"bg-danger-soft border border-border rounded-tile p-3 text-sm text-danger",children:he}),ue&&s.jsxs("div",{className:"border-t border-border pt-4 space-y-3",children:[s.jsx("h2",{className:"text-base font-semibold text-ink",children:"Types de billets"}),me.length===0?s.jsx("div",{className:"text-sm text-ink-2",children:"Aucun billet créé."}):s.jsx("div",{className:"space-y-2",children:me.map(pe=>s.jsxs("div",{className:"bg-surface border border-border rounded-card p-3",children:[s.jsx("div",{className:"font-medium text-ink",children:pe.name}),pe.description&&s.jsx("div",{className:"text-xs text-ink-2 mt-0.5",children:pe.description}),s.jsxs("div",{className:"text-xs text-ink-2 mt-0.5",children:[tr(pe.price)," · ",pe.quantitySold,"/",pe.quantityTotal," vendus"]}),(pe.salesStart||pe.salesEnd)&&s.jsxs("div",{className:"text-[11px] text-ink-3 mt-0.5",children:["Vente ",pe.salesStart?`du ${new Date(pe.salesStart).toLocaleString("fr-FR")}`:"",pe.salesEnd?` jusqu'au ${new Date(pe.salesEnd).toLocaleString("fr-FR")}`:""]})]},pe._id))}),s.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[s.jsx("input",{value:Ne,onChange:pe=>ye(pe.target.value),placeholder:"Nom (ex: VIP)",className:`${Fn} col-span-2`}),s.jsx("textarea",{value:ee,onChange:pe=>Ae(pe.target.value),placeholder:"Description du billet (optionnel)",rows:2,className:`${Fn} col-span-2`}),s.jsx("input",{value:De,onChange:pe=>we(pe.target.value),placeholder:"Prix XAF",type:"number",className:Fn}),s.jsx("input",{value:je,onChange:pe=>Te(pe.target.value),placeholder:"Quantité",type:"number",className:Fn}),s.jsx("input",{value:Se,onChange:pe=>He(pe.target.value),placeholder:"Max/commande",type:"number",className:`${Fn} col-span-2`}),s.jsxs("label",{className:"text-xs text-ink-2",children:["Début de vente (optionnel)",s.jsx("input",{type:"datetime-local",value:Ue,onChange:pe=>rt(pe.target.value),className:`${Fn} mt-1`})]}),s.jsxs("label",{className:"text-xs text-ink-2",children:["Fin de vente (optionnel)",s.jsx("input",{type:"datetime-local",value:wt,onChange:pe=>Ft(pe.target.value),className:`${Fn} mt-1`})]})]}),s.jsx("button",{onClick:_n,className:"w-full bg-surface border border-primary text-primary font-semibold py-2 rounded-tile",children:"Ajouter ce type de billet"}),ue.status==="DRAFT"&&s.jsx("button",{onClick:fr,disabled:me.length===0,className:"w-full bg-success text-white font-semibold py-3 rounded-tile disabled:bg-surface-2 disabled:text-ink-3",children:"Publier l'événement"}),ue.status==="PUBLISHED"&&s.jsx("button",{onClick:()=>r(`/events/organizer/${ue._id}/scanner`),className:"w-full bg-primary hover:bg-primary-hover text-white font-semibold py-3 rounded-tile transition-colors",children:"📱 Scanner les billets"}),(ue.status==="PUBLISHED"||ue.status==="COMPLETED")&&s.jsxs(s.Fragment,{children:[s.jsx("button",{onClick:()=>r(`/events/organizer/${ue._id}/participants`),className:"w-full bg-surface border border-primary text-primary font-semibold py-2 rounded-tile",children:"Voir les participants"}),s.jsx("a",{href:X.getEventParticipantsCsvUrl(ue._id),target:"_blank",rel:"noreferrer",className:"block text-center w-full bg-surface border border-border text-ink-2 font-medium py-2 rounded-tile text-sm",children:"Exporter les participants (CSV)"})]}),ue.status==="PUBLISHED"&&s.jsx("div",{className:"border-t border-border pt-4",children:xt?s.jsxs("div",{className:"bg-danger-soft border border-danger rounded-card p-4 space-y-3",children:[s.jsx("div",{className:"text-sm font-semibold text-danger",children:"Annuler définitivement cet événement ?"}),s.jsxs("p",{className:"text-xs text-ink-2",children:["Cette action est ",s.jsx("strong",{children:"irréversible"}),". Tous les billets vendus seront annulés et",s.jsx("strong",{children:" chaque acheteur sera intégralement remboursé"}),". L'événement disparaîtra de la billetterie et les reventes en cours seront retirées."]}
284),s.jsx("textarea",{value:ft,onChange:pe=>Gr(pe.target.value),rows:2,placeholder:"Motif de l'annulation (communiqué aux acheteurs)",className:Fn}),s.jsxs("label",{className:"block text-xs text-ink-2",children:["Tapez ",s.jsx("strong",{className:"text-danger",children:Wp})," pour confirmer",s.jsx("input",{value:Nn,onChange:pe=>vs(pe.target.value),placeholder:Wp,className:`${Fn} mt-1`})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("button",{onClick:()=>{Kt(!1),vs("")},className:"flex-1 bg-surface border border-border text-ink-2 font-medium py-2 rounded-tile text-sm",children:"Revenir"}),s.jsx("button",{onClick:Bt,disabled:bs||Nn.trim().toUpperCase()!==Wp,className:"flex-1 bg-danger text-white font-semibold py-2 rounded-tile text-sm disabled:opacity-50",children:bs?"...":"Annuler et rembourser"})]})]}):s.jsx("button",{onClick:()=>Kt(!0),className:"w-full bg-surface border border-danger text-danger font-semibold py-2 rounded-tile",children:"Annuler l'événement"})}),ue.status==="CANCELLED"&&s.jsx("div",{className:"bg-danger-soft border border-border rounded-card p-3 text-sm text-danger",children:"Cet événement est annulé. Les remboursements des acheteurs ont été déclenchés."})]})]})]})}var gg={exports:{}},MAe=gg.exports,OR;function OAe(){return OR||(OR=1,function(e,t){(function(n,i){e.exports=i()})(typeof self<"u"?self:MAe,function(){return function(r){var n={};function i(a){if(n[a])return n[a].exports;var o=n[a]={i:a,l:!1,exports:{}};return r[a].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=r,i.c=n,i.d=function(a,o,l){i.o(a,o)||Object.defineProperty(a,o,{configurable:!1,enumerable:!0,get:l})},i.n=function(a){var o=a&&a.__esModule?function(){return a.default}:function(){return a};return i.d(o,"a",o),o},i.o=function(a,o){return Object.prototype.hasOwnProperty.call(a,o)},i.p="",i(i.s=3)}([function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function o(l,c){this.width=c,this.height=l.length/c,this.data=l}return o.createEmpty=function(l,c){return new o(new Uint8ClampedArray(l*c),l)},o.prototype.get=function(l,c){return l<0||l>=this.width||c<0||c>=this.height?!1:!!this.data[c*this.width+l]},o.prototype.set=function(l,c,u){this.data[c*this.width+l]=u?1:0},o.prototype.setRegion=function(l,c,u,f,x){for(var m=c;m<c+f;m++)for(var p=l;p<l+u;p++)this.set(p,m,!!x)},o}();n.BitMatrix=a},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(2);function o(c,u){return c^u}n.addOrSubtractGF=o;var l=function(){function c(u,f,x){this.primitive=u,this.size=f,this.generatorBase=x,this.expTable=new Array(this.size),this.logTable=new Array(this.size);for(var m=1,p=0;p<this.size;p++)this.expTable[p]=m,m=m*2,m>=this.size&&(m=(m^this.primitive)&this.size-1);for(var p=0;p<this.size-1;p++)this.logTable[this.expTable[p]]=p;this.zero=new a.default(this,Uint8ClampedArray.from([0])),this.one=new a.default(this,Uint8ClampedArray.from([1]))}return c.prototype.multiply=function(u,f){return u===0||f===0?0:this.expTable[(this.logTable[u]+this.logTable[f])%(this.size-1)]},c.prototype.inverse=function(u){if(u===0)throw new Error("Can't invert 0");return this.expTable[this.size-this.logTable[u]-1]},c.prototype.buildMonomial=function(u,f){if(u<0)throw new Error("Invalid monomial degree less than 0");if(f===0)return this.zero;var x=new Uint8ClampedArray(u+1);return x[0]=f,new a.default(this,x)},c.prototype.log=function(u){if(u===0)throw new Error("Can't take log(0)");return this.logTable[u]},c.prototype.exp=function(u){return this.expTable[u]},c}();n.default=l},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(1),o=function(){function l(c,u){if(u.length===0)throw new Error("No coefficients.");this.field=c;var f=u.length;if(f>1&&u[0]===0){for(var x=1;x<f&&u[x]===0;)x++;if(x===f)this.coefficients=c.zero.coefficients;else{this.coefficients=new Uint8ClampedArray(f-x);for(var m=0;m<this.coefficients.length;m++)this.coefficients[m]=u[x+m]}}else this.coefficients=u}return l.prototype.degree=function(){return this.coefficients.length-1},l.prototype.isZero=function(){return this.coefficients[0]===0},l.prototype.getCoefficient=function(c){return this.coefficients[this.coefficients.length-1-c]},l.prototype.addOrSubtract=function(c){var u;if(this.isZero())return c;if(c.isZero())return this;var f=this.coefficients,x=c.coefficients;f.length>x.length&&(u=[x,f],f=u[0],x=u[1]);for(var m=new Uint8ClampedArray(x.length),p=x.length-f.length,y=0;y<p;y++)m[y]=x[y];for(var y=p;y<x.length;y++)m[y]=a.addOrSubtractGF(f[y-p],x[y]);return new l(this.field,m)},l.prototype.multiply=function(c){if(c===0)return this.field.zero;if(c===1)return this;for(var u=this.coefficients.length,f=new Uint8ClampedArray(u),x=0;x<u;x++)f[x]=this.field.multiply(this.coefficients[x],c);return new l(this.field,f)},l.prototype.multiplyPoly=function(c){if(this.isZero()||c.isZero())return this.field.zero;for(var u=this.coefficients,f=u.length,x=c.coefficients,m=x.length,p=new Uint8ClampedArray(f+m-1),y=0;y<f;y++)for(var v=u[y],b=0;b<m;b++)p[y+b]=a.addOrSubtractGF(p[y+b],this.field.multiply(v,x[b]));return new l(this.field,p)},l.prototype.multiplyByMonomial=function(c,u){if(c<0)throw new Error("Invalid degree less than 0");if(u===0)return this.field.zero;for(var f=this.coefficients.length,x=new Uint8ClampedArray(f+c),m=0;m<f;m++)x[m]=this.field.multiply(this.coefficients[m],u);return new l(this.field,x)},l.prototype.evaluateAt=function(c){var u=0;if(c===0)return this.getCoefficient(0);var f=this.coefficients.length;
284if(c===1)return this.coefficients.forEach(function(m){u=a.addOrSubtractGF(u,m)}),u;u=this.coefficients[0];for(var x=1;x<f;x++)u=a.addOrSubtractGF(this.field.multiply(c,u),this.coefficients[x]);return u},l}();n.default=o},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(4),o=i(5),l=i(11),c=i(12);function u(m){var p=c.locate(m);if(!p)return null;for(var y=0,v=p;y<v.length;y++){var b=v[y],E=l.extract(m,b),N=o.decode(E.matrix);if(N)return{binaryData:N.bytes,data:N.text,chunks:N.chunks,version:N.version,location:{topRightCorner:E.mappingFunction(b.dimension,0),topLeftCorner:E.mappingFunction(0,0),bottomRightCorner:E.mappingFunction(b.dimension,b.dimension),bottomLeftCorner:E.mappingFunction(0,b.dimension),topRightFinderPattern:b.topRight,topLeftFinderPattern:b.topLeft,bottomLeftFinderPattern:b.bottomLeft,bottomRightAlignmentPattern:b.alignmentPattern}}}return null}var f={inversionAttempts:"attemptBoth"};function x(m,p,y,v){v===void 0&&(v={});var b=f;Object.keys(b||{}).forEach(function(B){b[B]=v[B]||b[B]});var E=b.inversionAttempts==="attemptBoth"||b.inversionAttempts==="invertFirst",N=b.inversionAttempts==="onlyInvert"||b.inversionAttempts==="invertFirst",j=a.binarize(m,p,y,E),A=j.binarized,w=j.inverted,S=u(N?w:A);return!S&&(b.inversionAttempts==="attemptBoth"||b.inversionAttempts==="invertFirst")&&(S=u(N?A:w)),S}x.default=x,n.default=x},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(0),o=8,l=24;function c(x,m,p){return x<m?m:x>p?p:x}var u=function(){function x(m,p){this.width=m,this.data=new Uint8ClampedArray(m*p)}return x.prototype.get=function(m,p){return this.data[p*this.width+m]},x.prototype.set=function(m,p,y){this.data[p*this.width+m]=y},x}();function f(x,m,p,y){if(x.length!==m*p*4)throw new Error("Malformed data passed to binarizer.");for(var v=new u(m,p),b=0;b<m;b++)for(var E=0;E<p;E++){var N=x[(E*m+b)*4+0],j=x[(E*m+b)*4+1],A=x[(E*m+b)*4+2];v.set(b,E,.2126*N+.7152*j+.0722*A)}for(var w=Math.ceil(m/o),S=Math.ceil(p/o),B=new u(w,S),D=0;D<S;D++)for(var P=0;P<w;P++){for(var O=0,M=1/0,I=0,E=0;E<o;E++)for(var b=0;b<o;b++){var V=v.get(P*o+b,D*o+E);O+=V,M=Math.min(M,V),I=Math.max(I,V)}var W=O/Math.pow(o,2);if(I-M<=l&&(W=M/2,D>0&&P>0)){var _=(B.get(P,D-1)+2*B.get(P-1,D)+B.get(P-1,D-1))/4;M<_&&(W=_)}B.set(P,D,W)}var z=a.BitMatrix.createEmpty(m,p),R=null;y&&(R=a.BitMatrix.createEmpty(m,p));for(var D=0;D<S;D++)for(var P=0;P<w;P++){for(var q=c(P,2,w-3),G=c(D,2,S-3),O=0,K=-2;K<=2;K++)for(var $=-2;$<=2;$++)O+=B.get(q+K,G+$);for(var H=O/25,K=0;K<o;K++)for(var $=0;$<o;$++){var b=P*o+K,E=D*o+$,te=v.get(b,E);z.set(b,E,te<=H),y&&R.set(b,E,!(te<=H))}}return y?{binarized:z,inverted:R}:{binarized:z}}n.binarize=f},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(0),o=i(6),l=i(9),c=i(10);function u(A,w){for(var S=A^w,B=0;S;)B++,S&=S-1;return B}function f(A,w){return w<<1|A}var x=[{bits:21522,formatInfo:{errorCorrectionLevel:1,dataMask:0}},{bits:20773,formatInfo:{errorCorrectionLevel:1,dataMask:1}},{bits:24188,formatInfo:{errorCorrectionLevel:1,dataMask:2}},{bits:23371,formatInfo:{errorCorrectionLevel:1,dataMask:3}},{bits:17913,formatInfo:{errorCorrectionLevel:1,dataMask:4}},{bits:16590,formatInfo:{errorCorrectionLevel:1,dataMask:5}},{bits:20375,formatInfo:{errorCorrectionLevel:1,dataMask:6}},{bits:19104,formatInfo:{errorCorrectionLevel:1,dataMask:7}},{bits:30660,formatInfo:{errorCorrectionLevel:0,dataMask:0}},{bits:29427,formatInfo:{errorCorrectionLevel:0,dataMask:1}},{bits:32170,formatInfo:{errorCorrectionLevel:0,dataMask:2}},{bits:30877,formatInfo:{errorCorrectionLevel:0,dataMask:3}},{bits:26159,formatInfo:{errorCorrectionLevel:0,dataMask:4}},{bits:25368,formatInfo:{errorCorrectionLevel:0,dataMask:5}},{bits:27713,formatInfo:{errorCorrectionLevel:0,dataMask:6}},{bits:26998,formatInfo:{errorCorrectionLevel:0,dataMask:7}},{bits:5769,formatInfo:{errorCorrectionLevel:3,dataMask:0}},{bits:5054,formatInfo:{errorCorrectionLevel:3,dataMask:1}},{bits:7399,formatInfo:{errorCorrectionLevel:3,dataMask:2}},{bits:6608,formatInfo:{errorCorrectionLevel:3,dataMask:3}},{bits:1890,formatInfo:{errorCorrectionLevel:3,dataMask:4}},{bits:597,formatInfo:{errorCorrectionLevel:3,dataMask:5}},{bits:3340,formatInfo:{errorCorrectionLevel:3,dataMask:6}},{bits:2107,formatInfo:{errorCorrectionLevel:3,dataMask:7}},{bits:13663,formatInfo:{errorCorrectionLevel:2,dataMask:0}},{bits:12392,formatInfo:{errorCorrectionLevel:2,dataMask:1}},{bits:16177,formatInfo:{errorCorrectionLevel:2,dataMask:2}},{bits:14854,formatInfo:{errorCorrectionLevel:2,dataMask:3}},{bits:9396,formatInfo:{errorCorrectionLevel:2,dataMask:4}},{bits:8579,formatInfo:{errorCorrectionLevel:2,dataMask:5}},{bits:11994,formatInfo:{errorCorrectionLevel:2,dataMask:6}},{bits:11245,formatInfo:{errorCorrectionLevel:2,dataMask:7}}],m=[function(A){return(A.y+A.x)%2===0},function(A){return A.y%2===0},function(A){return A.x%3===0},function(A){return(A.y+A.x)%3===0},function(A){return(Math.floor(A.y/2)+Math.floor(A.x/3))%2===0},function(A){return A.x*A.y%2+A.x*A.y%3===0},function(A){return(A.y*A.x%2+A.y*A.x%3)%2===0},function(A){return((A.y+A.x)%2+A.y*A.x%3)%2===0}];function p(A){var w=17+4*A.versionNumber,S=a.BitMatrix.createEmpty(w,w);S.setRegion(0,0,9,9,!0),S.setRegion(w-8,0,8,9,!0),S.setRegion(0,w-8,9,8,!0);for(var B=0,D=A.alignmentPatternCenters;B<D.length;B++)for(var P=D[B],O=0,M=A.alignmentPatternCenters;O<M.length;O++){var I=M[O];P===6&&I===6||P===6&&I===w-7||P===w-7&&I===6||S.setRegion(P-2,I-2,5,5,!0)}return S.setRegion(6,9,1,w-17,!0),S.setRegion(9,6,w-17,1,!0),A.versionNumber>6&&(S.setRegion(w-11,0,3,6,!0),S.setRegion(0,w-11,6,3,!0)),S}function y(A,w,S){for(var B=m[S.dataMask],D=A.height,P=p(w),O=[],M=0,I=0,V=!0,W=D-1;W>0;W-=2){W===6&&W--;for(var _=0;_<D;_++)for(var z=V?D-1-_:_,R=0;R<2;R++){var q=W-R;if(!P.get(q,z)){I++;var G=A.get(q,z);B({y:z,x:q})&&(G=!G),M=f(G,M),I===8&&(O.push(M),I=0,M=0)}}V=!V}return O}function v(A){var w=A.height,S=Math.floor((w-17)/4);if(S<=6)return c.VERSIONS[S-1];for(var B=0,D=5;D>=0;D--)for(var P=w-9;P>=w-11;P--)B=f(A.get(P,D),B);for(var O=0,P=5;P>=0;P--)for(var D=w-9;D>=w-11;D--)O=f(A.get(P,D),O);for(var M=1/0,I,V=0,W=c.VERSIONS;V<W.length;V++){var _=W[V];if(_.infoBits===B||_.infoBits===O)return _;var z=u(B,_.infoBits);z<M&&(I=_,M=z),z=u(O,_.infoBits),z<M&&(I=_,M=z)}if(M<=3)return I}function b(A){for(var w=0,S=0;S<=8;S++)S!==6&&(w=f(A.get(S,8),w));for(var B=7;B>=0;B--)B!==6&&(w=f(A.get(8,B),w));for(var D=A.height,P=0,B=D-1;B>=D-7;B--)P=f(A.get(8,B),P);for(var S=D-8;S<D;S++)P=f(A.get(S,8),P);for(var O=1/0,M=null,I=0,V=x;I<V.length;I++){var W=V[I],_=W.bits,z=W.formatInfo;if(_===w||_===P)return z;var R=u(w,_);R<O&&(M=z,O=R),w!==P&&(R=u(P,_),R<O&&(M=z,O=R))}return O<=3?M:null}function E(A,w,S){var B=w.errorCorrectionLevels[S],D=[],P=0;if(B.ecBlocks.forEach(function(G){for(var K=0;K<G.numBlocks;K++)D.push({numDataCodewords:G.dataCodewordsPerBlock,codewords:[]}),P+=G.dataCodewordsPerBlock+B.ecCodewordsPerBlock}),A.length<P)return null;A=A.slice(0,P);for(var O=B.ecBlocks[0].dataCodewordsPerBlock,M=0;M<O;M++)for(var I=0,V=D;I<V.length;I++){var W=V[I];W.codewords.push(A.shift())}if(B.ecBlocks.length>1)for(var _=B.ecBlocks[0].numBlocks,z=B.ecBlocks[1].numBlocks,M=0;M<z;M++)D[_+M].codewords.push(A.shift());for(;A.length>0;)for(var R=0,q=D;R<q.length;R++){var W=q[R];W.codewords.push(A.shift())}return D}function N(A){var w=v(A);
284if(!w)return null;var S=b(A);if(!S)return null;var B=y(A,w,S),D=E(B,w,S.errorCorrectionLevel);if(!D)return null;for(var P=D.reduce(function(R,q){return R+q.numDataCodewords},0),O=new Uint8ClampedArray(P),M=0,I=0,V=D;I<V.length;I++){var W=V[I],_=l.decode(W.codewords,W.codewords.length-W.numDataCodewords);if(!_)return null;for(var z=0;z<W.numDataCodewords;z++)O[M++]=_[z]}try{return o.decode(O,w.versionNumber)}catch{return null}}function j(A){if(A==null)return null;var w=N(A);if(w)return w;for(var S=0;S<A.width;S++)for(var B=S+1;B<A.height;B++)A.get(S,B)!==A.get(B,S)&&(A.set(S,B,!A.get(S,B)),A.set(B,S,!A.get(B,S)));return N(A)}n.decode=j},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(7),o=i(8),l;(function(v){v.Numeric="numeric",v.Alphanumeric="alphanumeric",v.Byte="byte",v.Kanji="kanji",v.ECI="eci"})(l=n.Mode||(n.Mode={}));var c;(function(v){v[v.Terminator=0]="Terminator",v[v.Numeric=1]="Numeric",v[v.Alphanumeric=2]="Alphanumeric",v[v.Byte=4]="Byte",v[v.Kanji=8]="Kanji",v[v.ECI=7]="ECI"})(c||(c={}));function u(v,b){for(var E=[],N="",j=[10,12,14][b],A=v.readBits(j);A>=3;){var w=v.readBits(10);if(w>=1e3)throw new Error("Invalid numeric value above 999");var S=Math.floor(w/100),B=Math.floor(w/10)%10,D=w%10;E.push(48+S,48+B,48+D),N+=S.toString()+B.toString()+D.toString(),A-=3}if(A===2){var w=v.readBits(7);if(w>=100)throw new Error("Invalid numeric value above 99");var S=Math.floor(w/10),B=w%10;E.push(48+S,48+B),N+=S.toString()+B.toString()}else if(A===1){var w=v.readBits(4);if(w>=10)throw new Error("Invalid numeric value above 9");E.push(48+w),N+=w.toString()}return{bytes:E,text:N}}var f=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function x(v,b){for(var E=[],N="",j=[9,11,13][b],A=v.readBits(j);A>=2;){var w=v.readBits(11),S=Math.floor(w/45),B=w%45;E.push(f[S].charCodeAt(0),f[B].charCodeAt(0)),N+=f[S]+f[B],A-=2}if(A===1){var S=v.readBits(6);E.push(f[S].charCodeAt(0)),N+=f[S]}return{bytes:E,text:N}}function m(v,b){for(var E=[],N="",j=[8,16,16][b],A=v.readBits(j),w=0;w<A;w++){var S=v.readBits(8);E.push(S)}try{N+=decodeURIComponent(E.map(function(B){return"%"+("0"+B.toString(16)).substr(-2)}).join(""))}catch{}return{bytes:E,text:N}}function p(v,b){for(var E=[],N="",j=[8,10,12][b],A=v.readBits(j),w=0;w<A;w++){var S=v.readBits(13),B=Math.floor(S/192)<<8|S%192;B<7936?B+=33088:B+=49472,E.push(B>>8,B&255),N+=String.fromCharCode(o.shiftJISTable[B])}return{bytes:E,text:N}}function y(v,b){for(var E,N,j,A,w=new a.BitStream(v),S=b<=9?0:b<=26?1:2,B={text:"",bytes:[],chunks:[],version:b};w.available()>=4;){var D=w.readBits(4);if(D===c.Terminator)return B;if(D===c.ECI)w.readBits(1)===0?B.chunks.push({type:l.ECI,assignmentNumber:w.readBits(7)}):w.readBits(1)===0?B.chunks.push({type:l.ECI,assignmentNumber:w.readBits(14)}):w.readBits(1)===0?B.chunks.push({type:l.ECI,assignmentNumber:w.readBits(21)}):B.chunks.push({type:l.ECI,assignmentNumber:-1});else if(D===c.Numeric){var P=u(w,S);B.text+=P.text,(E=B.bytes).push.apply(E,P.bytes),B.chunks.push({type:l.Numeric,text:P.text})}else if(D===c.Alphanumeric){var O=x(w,S);B.text+=O.text,(N=B.bytes).push.apply(N,O.bytes),B.chunks.push({type:l.Alphanumeric,text:O.text})}else if(D===c.Byte){var M=m(w,S);B.text+=M.text,(j=B.bytes).push.apply(j,M.bytes),B.chunks.push({type:l.Byte,bytes:M.bytes,text:M.text})}else if(D===c.Kanji){var I=p(w,S);B.text+=I.text,(A=B.bytes).push.apply(A,I.bytes),B.chunks.push({type:l.Kanji,bytes:I.bytes,text:I.text})}}if(w.available()===0||w.readBits(w.available())===0)return B}n.decode=y},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function o(l){this.byteOffset=0,this.bitOffset=0,this.bytes=l}return o.prototype.readBits=function(l){if(l<1||l>32||l>this.available())throw new Error("Cannot read "+l.toString()+" bits");var c=0;if(this.bitOffset>0){var u=8-this.bitOffset,f=l<u?l:u,x=u-f,m=255>>8-f<<x;c=(this.bytes[this.byteOffset]&m)>>x,l-=f,this.bitOffset+=f,this.bitOffset===8&&(this.bitOffset=0,this.byteOffset++)}if(l>0){for(;l>=8;
284)c=c<<8|this.bytes[this.byteOffset]&255,this.byteOffset++,l-=8;if(l>0){var x=8-l,m=255>>x<<x;c=c<<l|(this.bytes[this.byteOffset]&m)>>x,this.bitOffset+=l}}return c},o.prototype.available=function(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset},o}();n.BitStream=a},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.shiftJISTable={32:32,33:33,34:34,35:35,36:36,37:37,38:38,39:39,40:40,41:41,42:42,43:43,44:44,45:45,46:46,47:47,48:48,49:49,50:50,51:51,52:52,53:53,54:54,55:55,56:56,57:57,58:58,59:59,60:60,61:61,62:62,63:63,64:64,65:65,66:66,67:67,68:68,69:69,70:70,71:71,72:72,73:73,74:74,75:75,76:76,77:77,78:78,79:79,80:80,81:81,82:82,83:83,84:84,85:85,86:86,87:87,88:88,89:89,90:90,91:91,92:165,93:93,94:94,95:95,96:96,97:97,98:98,99:99,100:100,101:101,102:102,103:103,104:104,105:105,106:106,107:107,108:108,109:109,110:110,111:111,112:112,113:113,114:114,115:115,116:116,117:117,118:118,119:119,120:120,121:121,122:122,123:123,124:124,125:125,126:8254,33088:12288,33089:12289,33090:12290,33091:65292,33092:65294,33093:12539,33094:65306,33095:65307,33096:65311,33097:65281,33098:12443,33099:12444,33100:180,33101:65344,33102:168,33103:65342,33104:65507,33105:65343,33106:12541,33107:12542,33108:12445,33109:12446,33110:12291,33111:20189,33112:12293,33113:12294,33114:12295,33115:12540,33116:8213,33117:8208,33118:65295,33119:92,33120:12316,33121:8214,33122:65372,33123:8230,33124:8229,33125:8216,33126:8217,33127:8220,33128:8221,33129:65288,33130:65289,33131:12308,33132:12309,33133:65339,33134:65341,33135:65371,33136:65373,33137:12296,33138:12297,33139:12298,33140:12299,33141:12300,33142:12301,33143:12302,33144:12303,33145:12304,33146:12305,33147:65291,33148:8722,33149:177,33150:215,33152:247,33153:65309,33154:8800,33155:65308,33156:65310,33157:8806,33158:8807,33159:8734,33160:8756,33161:9794,33162:9792,33163:176,33164:8242,33165:8243,33166:8451,33167:65509,33168:65284,33169:162,33170:163,33171:65285,33172:65283,33173:65286,33174:65290,33175:65312,33176:167,33177:9734,33178:9733,33179:9675,33180:9679,33181:9678,33182:9671,33183:9670,33184:9633,33185:9632,33186:9651,33187:9650,33188:9661,33189:9660,33190:8251,33191:12306,33192:8594,33193:8592,33194:8593,33195:8595,33196:12307,33208:8712,33209:8715,33210:8838,33211:8839,33212:8834,33213:8835,33214:8746,33215:8745,33224:8743,33225:8744,33226:172,33227:8658,33228:8660,33229:8704,33230:8707,33242:8736,33243:8869,33244:8978,33245:8706,33246:8711,33247:8801,33248:8786,33249:8810,33250:8811,33251:8730,33252:8765,33253:8733,33254:8757,33255:8747,33256:8748,33264:8491,33265:8240,33266:9839,33267:9837,33268:9834,33269:8224,33270:8225,33271:182,33276:9711,33359:65296,33360:65297,33361:65298,33362:65299,33363:65300,33364:65301,33365:65302,33366:65303,33367:65304,33368:65305,33376:65313,33377:65314,33378:65315,33379:65316,33380:65317,33381:65318,33382:65319,33383:65320,33384:65321,33385:65322,33386:65323,33387:65324,33388:65325,33389:65326,33390:65327,33391:65328,33392:65329,33393:65330,33394:65331,33395:65332,33396:65333,33397:65334,33398:65335,33399:65336,33400:65337,33401:65338,33409:65345,33410:65346,33411:65347,33412:65348,33413:65349,33414:65350,33415:65351,33416:65352,33417:65353,33418:65354,33419:65355,33420:65356,33421:65357,33422:65358,33423:65359,33424:65360,33425:65361,33426:65362,33427:65363,33428:65364,33429:65365,33430:65366,33431:65367,33432:65368,33433:65369,33434:65370,33439:12353,33440:12354,33441:12355,33442:12356,33443:12357,33444:12358,33445:12359,33446:12360,33447:12361,33448:12362,33449:12363,33450:12364,33451:12365,33452:12366,33453:12367,33454:12368,33455:12369,33456:12370,33457:12371,33458:12372,33459:12373,33460:12374,33461:12375,33462:12376,33463:12377,33464:12378,33465:12379,33466:12380,33467:12381,33468:12382,33469:12383,33470:12384,33471:12385,33472:12386,33473:12387,33474:12388,33475:12389,33476:12390,33477:12391,33478:12392,33479:12393,33480:12394,33481:12395,33482:12396,33483:12397,33484:12398,33485:12399,33486:12400,33487:12401,33488:12402,33489:12403,33490:12404,33491:12405,33492:12406,33493:12407,33494:12408,33495:12409,33496:12410,33497:12411,33498:12412,33499:12413,33500:12414,33501:12415,33502:12416,33503:12417,33504:12418,33505:12419,33506:12420,33507:12421,33508:12422,33509:12423,33510:12424,33511:12425,33512:12426,33513:12427,33514:12428,33515:12429,33516:12430,33517:12431,33518:12432,33519:12433,33520:12434,33521:12435,33600:12449,33601:12450,33602:12451,33603:12452,33604:12453,33605:12454,33606:12455,33607:12456,33608:12457,33609:12458,33610:12459,33611:12460,33612:12461,33613:12462,33614:12463,33615:12464,33616:12465,33617:12466,33618:12467,33619:12468,33620:12469,33621:12470,33622:12471,33623:12472,33624:12473,33625:12474,33626:12475,33627:12476,33628:12477,33629:12478,33630:12479,33631:12480,33632
284:12481,33633:12482,33634:12483,33635:12484,33636:12485,33637:12486,33638:12487,33639:12488,33640:12489,33641:12490,33642:12491,33643:12492,33644:12493,33645:12494,33646:12495,33647:12496,33648:12497,33649:12498,33650:12499,33651:12500,33652:12501,33653:12502,33654:12503,33655:12504,33656:12505,33657:12506,33658:12507,33659:12508,33660:12509,33661:12510,33662:12511,33664:12512,33665:12513,33666:12514,33667:12515,33668:12516,33669:12517,33670:12518,33671:12519,33672:12520,33673:12521,33674:12522,33675:12523,33676:12524,33677:12525,33678:12526,33679:12527,33680:12528,33681:12529,33682:12530,33683:12531,33684:12532,33685:12533,33686:12534,33695:913,33696:914,33697:915,33698:916,33699:917,33700:918,33701:919,33702:920,33703:921,33704:922,33705:923,33706:924,33707:925,33708:926,33709:927,33710:928,33711:929,33712:931,33713:932,33714:933,33715:934,33716:935,33717:936,33718:937,33727:945,33728:946,33729:947,33730:948,33731:949,33732:950,33733:951,33734:952,33735:953,33736:954,33737:955,33738:956,33739:957,33740:958,33741:959,33742:960,33743:961,33744:963,33745:964,33746:965,33747:966,33748:967,33749:968,33750:969,33856:1040,33857:1041,33858:1042,33859:1043,33860:1044,33861:1045,33862:1025,33863:1046,33864:1047,33865:1048,33866:1049,33867:1050,33868:1051,33869:1052,33870:1053,33871:1054,33872:1055,33873:1056,33874:1057,33875:1058,33876:1059,33877:1060,33878:1061,33879:1062,33880:1063,33881:1064,33882:1065,33883:1066,33884:1067,33885:1068,33886:1069,33887:1070,33888:1071,33904:1072,33905:1073,33906:1074,33907:1075,33908:1076,33909:1077,33910:1105,33911:1078,33912:1079,33913:1080,33914:1081,33915:1082,33916:1083,33917:1084,33918:1085,33920:1086,33921:1087,33922:1088,33923:1089,33924:1090,33925:1091,33926:1092,33927:1093,33928:1094,33929:1095,33930:1096,33931:1097,33932:1098,33933:1099,33934:1100,33935:1101,33936:1102,33937:1103,33951:9472,33952:9474,33953:9484,33954:9488,33955:9496,33956:9492,33957:9500,33958:9516,33959:9508,33960:9524,33961:9532,33962:9473,33963:9475,33964:9487,33965:9491,33966:9499,33967:9495,33968:9507,33969:9523,33970:9515,33971:9531,33972:9547,33973:9504,33974:9519,33975:9512,33976:9527,33977:9535,33978:9501,33979:9520,33980:9509,33981:9528,33982:9538,34975:20124,34976:21782,34977:23043,34978:38463,34979:21696,34980:24859,34981:25384,34982:23030,34983:36898,34984:33909,34985:33564,34986:31312,34987:24746,34988:25569,34989:28197,34990:26093,34991:33894,34992:33446,34993:39925,34994:26771,34995:22311,34996:26017,34997:25201,34998:23451,34999:22992,35e3:34427,35001:39156,35002:32098,35003:32190,35004:39822,35005:25110,35006:31903,35007:34999,35008:23433,35009:24245,35010:25353,35011:26263,35012:26696,35013:38343,35014:38797,35015:26447,35016:20197,35017:20234,35018:20301,35019:20381,35020:20553,35021:22258,35022:22839,35023:22996,35024:23041,35025:23561,35026:24799,35027:24847,35028:24944,35029:26131,35030:26885,35031:28858,35032:30031,35033:30064,35034:31227,35035:32173,35036:32239,35037:32963,35038:33806,35039:34915,35040:35586,35041:36949,35042:36986,35043:21307,35044:20117,35045:20133,35046:22495,35047:32946,35048:37057,35049:30959,35050:19968,35051:22769,35052:28322,35053:36920,35054:31282,35055:33576,35056:33419,35057:39983,35058:20801,35059:21360,35060:21693,35061:21729,35062:22240,35063:23035,35064:24341,35065:39154,35066:28139,35067:32996,35068:34093,35136:38498,35137:38512,35138:38560,35139:38907,35140:21515,35141:21491,35142:23431,35143:28879,35144:32701,35145:36802,35146:38632,35147:21359,35148:40284,35149:31418,35150:19985,35151:30867,35152:33276,35153:28198,35154:22040,35155:21764,35156:27421,35157:34074,35158:39995,35159:23013,35160:21417,35161:28006,35162:29916,35163:38287,35164:22082,35165:20113,35166:36939,35167:38642,35168:33615,35169:39180,35170:21473,35171:21942,35172:23344,35173:24433,35174:26144,35175:26355,35176:26628,35177:27704,35178:27891,35179:27945,35180:29787,35181:30408,35182:31310,35183:38964,35184:33521,35185:34907,35186:35424,35187:37613,35188:28082,35189:30123,35190:30410,35191:39365,35192:24742,35193:35585,35194:36234,35195:38322,35196:27022,35197:21421,35198:20870,35200:22290,35201:22576,35202:22852,35203:23476,35204:24310,35205:24616,35206:25513,35207:25588,35208:27839,35209:28436,35210:28814,35211:28948,35212:29017,35213:29141,35214:29503,35215:32257,35216:33398,35217:33489,35218:34199,35219:36960,35220:37467,35221:40219,35222:22633,35223:26044,35224:27738,35225:29989,35226:20985,35227:22830,35228:22885,35229:24448,35230:24540,35231:25276,35232:26106,35233:27178,35234:27431,35235:27572,35236:29579,35237:32705,35238:35158,35239:40236,35240:40206,35241:40644,35242:23713,35243:27798,35244:33659,35245:20740,35246:23627,35247:25014,35248:33222,35249:26742,35250:29281,35251:20057,35252:20474,35253:21368,35254:24681,35255:28201,35256:31311,35257:38899,35258:19979,35259:21270,35260:20206,35261:20309,35262:20285,35263:20385,35264:20339,35265:21152,35266:21487,35267:22025,35268:22799,35269:23233,35270:23478,35271:23521,35272:31185,35273:26247,35274:26524,35275:26550,35276:27468,35277:27827,35278:28779,35279:29634,35280:31117,35281:31166,35282:31292,35283:31623,35284:33457,35285:33499,35286:33540,35287:33655,35288:33775,35289:33747,35290:34662,35291:35506,35292:22057,35293:36008,35294:36838,35295:36942,35296:38686,35297:34442,35298:20420,35299:23784,35300:25105,35301:29273,35302:30011,35303:33253,35304:33469,35305:34558,35306:36032,35307:38597,35308:39187,35309:39381,35310:20171,35311:20250,35312:35299,35313:22238,35314:22602,35315:22730,35316:24315,35317:24555,35318:24618,35319:24724,35320:24674,35321:25040,35322:25106,35323:25296,35324:25913,35392:39745,35393:26214,35394:26800,35395:28023,35396:28784,35397:30028,35398:30342,35399:32117,35400:33445,35401:34809,35402:38283,35403:38542,35404:35997,35405:20977,35406:21182,35407:22806,35408:21683,35409:23475,35410:23830,35411:24936,35412:27010,35413:28079,35414:30861,35415:33995,35416:34903,35417:35442,35418:37799,35419:39608,35420:28012,35421:39336,35422:34521,35423:22435,35424:26623,35425:34510,35426:37390,35427:21123,35428:22151,35429:21508,35430:24275,35431:25313,35432:25785,35433:26684,35434:26680,35435:27579,35436:29554,35437:30906,35438:31339,35439:35226,35440:35282,35441:36203,35442:36611,35443:37101,35444:38307,35445:38548,35446:38761,35447:23398,35448:23731,35449:27005,35450:38989,35451:38990,35452:25499,35453:31520,35454:27179,35456:27263,35457:26806,35458:39949,35459:28511,35460:21106,35461:21917,35462:24688,35463:25324,35464:27963,35465:28167,35466:28369,35467:33883,35468:35088,35469:36676,35470:19988,35471:39993,35472:21494,35473:26907,35474:27194,35475:38788,35476:26666,35477:20828,35478:31427,35479:33970,35480:37340,35481:37772,35482:22107,35483:40232,35484:26658,35485:33541,35486:33841,35487:31909,35488:21e3,35489:33477,35490:29926,35491:20094,35492:20355,35493:20896,35494:23506,35495:21002,35496:21208,35497:21223,35498:24059,35499:21914,35500:22570,35501:23014,35502:23436,35503:23448,35504:23515,35505:24178,35506:24185,35507:24739,35508:24863,35509:24931,35510:25022,35511:25563,35512:25954,35513:26577,35514:26707,35515:26874,35516:27454,3551
2847:27475,35518:27735,35519:28450,35520:28567,35521:28485,35522:29872,35523:29976,35524:30435,35525:30475,35526:31487,35527:31649,35528:31777,35529:32233,35530:32566,35531:32752,35532:32925,35533:33382,35534:33694,35535:35251,35536:35532,35537:36011,35538:36996,35539:37969,35540:38291,35541:38289,35542:38306,35543:38501,35544:38867,35545:39208,35546:33304,35547:20024,35548:21547,35549:23736,35550:24012,35551:29609,35552:30284,35553:30524,35554:23721,35555:32747,35556:36107,35557:38593,35558:38929,35559:38996,35560:39e3,35561:20225,35562:20238,35563:21361,35564:21916,35565:22120,35566:22522,35567:22855,35568:23305,35569:23492,35570:23696,35571:24076,35572:24190,35573:24524,35574:25582,35575:26426,35576:26071,35577:26082,35578:26399,35579:26827,35580:26820,35648:27231,35649:24112,35650:27589,35651:27671,35652:27773,35653:30079,35654:31048,35655:23395,35656:31232,35657:32e3,35658:24509,35659:35215,35660:35352,35661:36020,35662:36215,35663:36556,35664:36637,35665:39138,35666:39438,35667:39740,35668:20096,35669:20605,35670:20736,35671:22931,35672:23452,35673:25135,35674:25216,35675:25836,35676:27450,35677:29344,35678:30097,35679:31047,35680:32681,35681:34811,35682:35516,35683:35696,35684:25516,35685:33738,35686:38816,35687:21513,35688:21507,35689:21931,35690:26708,35691:27224,35692:35440,35693:30759,35694:26485,35695:40653,35696:21364,35697:23458,35698:33050,35699:34384,35700:36870,35701:19992,35702:20037,35703:20167,35704:20241,35705:21450,35706:21560,35707:23470,35708:24339,35709:24613,35710:25937,35712:26429,35713:27714,35714:27762,35715:27875,35716:28792,35717:29699,35718:31350,35719:31406,35720:31496,35721:32026,35722:31998,35723:32102,35724:26087,35725:29275,35726:21435,35727:23621,35728:24040,35729:25298,35730:25312,35731:25369,35732:28192,35733:34394,35734:35377,35735:36317,35736:37624,35737:28417,35738:31142,35739:39770,35740:20136,35741:20139,35742:20140,35743:20379,35744:20384,35745:20689,35746:20807,35747:31478,35748:20849,35749:20982,35750:21332,35751:21281,35752:21375,35753:21483,35754:21932,35755:22659,35756:23777,35757:24375,35758:24394,35759:24623,35760:24656,35761:24685,35762:25375,35763:25945,35764:27211,35765:27841,35766:29378,35767:29421,35768:30703,35769:33016,35770:33029,35771:33288,35772:34126,35773:37111,35774:37857,35775:38911,35776:39255,35777:39514,35778:20208,35779:20957,35780:23597,35781:26241,35782:26989,35783:23616,35784:26354,35785:26997,35786:29577,35787:26704,35788:31873,35789:20677,35790:21220,35791:22343,35792:24062,35793:37670,35794:26020,35795:27427,35796:27453,35797:29748,35798:31105,35799:31165,35800:31563,35801:32202,35802:33465,35803:33740,35804:34943,35805:35167,35806:35641,35807:36817,35808:37329,35809:21535,35810:37504,35811:20061,35812:20534,35813:21477,35814:21306,35815:29399,35816:29590,35817:30697,35818:33510,35819:36527,35820:39366,35821:39368,35822:39378,35823:20855,35824:24858,35825:34398,35826:21936,35827:31354,35828:20598,35829:23507,35830:36935,35831:38533,35832:20018,35833:27355,35834:37351,35835:23633,35836:23624,35904:25496,35905:31391,35906:27795,35907:38772,35908:36705,35909:31402,35910:29066,35911:38536,35912:31874,35913:26647,35914:32368,35915:26705,35916:37740,35917:21234,35918:21531,35919:34219,35920:35347,35921:32676,35922:36557,35923:37089,35924:21350,35925:34952,35926:31041,35927:20418,35928:20670,35929:21009,35930:20804,35931:21843,35932:22317,35933:29674,35934:22411,35935:22865,35936:24418,35937:24452,35938:24693,35939:24950,35940:24935,35941:25001,35942:25522,35943:25658,35944:25964,35945:26223,35946:26690,35947:28179,35948:30054,35949:31293,35950:31995,35951:32076,35952:32153,35953:32331,35954:32619,35955:33550,35956:33610,35957:34509,35958:35336,35959:35427,35960:35686,35961:36605,35962:38938,35963:40335,35964:33464,35965:36814,35966:39912,35968:21127,35969:25119,35970:25731,35971:28608,35972:38553,35973:26689,35974:20625,35975:27424,35976:27770,35977:28500,35978:31348,35979:32080,35980:34880,35981:35363,35982:26376,35983:20214,35984:20537,35985:20518,35986:20581,35987:20860,35988:21048,35989:21091,35990:21927,35991:22287,35992:22533,35993:23244,35994:24314,35995:25010,35996:25080,35997:25331,35998:25458,35999:26908,36e3:27177,36001:29309,36002:29356,36003:29486,36004:30740,36005:30831,36006:32121,36007:30476,36008:32937,36009:35211,36010:35609,36011:36066,36012:36562,36013:36963,36014:37749,36015:38522,36016:38997,36017:39443,36018:40568,36019:20803,36020:21407,36021:21427,36022:24187,36023:24358,36024:28187,36025:28304,36026:29572,3
2846027:29694,36028:32067,36029:33335,36030:35328,36031:35578,36032:38480,36033:20046,36034:20491,36035:21476,36036:21628,36037:22266,36038:22993,36039:23396,36040:24049,36041:24235,36042:24359,36043:25144,36044:25925,36045:26543,36046:28246,36047:29392,36048:31946,36049:34996,36050:32929,36051:32993,36052:33776,36053:34382,36054:35463,36055:36328,36056:37431,36057:38599,36058:39015,36059:40723,36060:20116,36061:20114,36062:20237,36063:21320,36064:21577,36065:21566,36066:23087,36067:24460,36068:24481,36069:24735,36070:26791,36071:27278,36072:29786,36073:30849,36074:35486,36075:35492,36076:35703,36077:37264,36078:20062,36079:39881,36080:20132,36081:20348,36082:20399,36083:20505,36084:20502,36085:20809,36086:20844,36087:21151,36088:21177,36089:21246,36090:21402,36091:21475,36092:21521,36160:21518,36161:21897,36162:22353,36163:22434,36164:22909,36165:23380,36166:23389,36167:23439,36168:24037,36169:24039,36170:24055,36171:24184,36172:24195,36173:24218,36174:24247,36175:24344,36176:24658,36177:24908,36178:25239,36179:25304,36180:25511,36181:25915,36182:26114,36183:26179,36184:26356,36185:26477,36186:26657,36187:26775,36188:27083,36189:27743,36190:27946,36191:28009,36192:28207,36193:28317,36194:30002,36195:30343,36196:30828,36197:31295,36198:31968,36199:32005,36200:32024,36201:32094,36202:32177,36203:32789,36204:32771,36205:32943,36206:32945,36207:33108,36208:33167,36209:33322,36210:33618,36211:34892,36212:34913,36213:35611,36214:36002,36215:36092,36216:37066,36217:37237,36218:37489,36219:30783,36220:37628,36221:38308,36222:38477,36224:38917,36225:39321,36226:39640,36227:40251,36228:21083,36229:21163,36230:21495,36231:21512,36232:22741,36233:25335,36234:28640,36235:35946,36236:36703,36237:40633,36238:20811,36239:21051,36240:21578,36241:22269,36242:31296,36243:37239,36244:40288,36245:40658,36246:29508,36247:28425,36248:33136,36249:29969,36250:24573,36251:24794,36252:39592,36253:29403,36254:36796,36255:27492,36256:38915,36257:20170,36258:22256,36259:22372,36260:22718,36261:23130,36262:24680,36263:25031,36264:26127,36265:26118,36266:26681,36267:26801,36268:28151,36269:30165,36270:32058,36271:33390,36272:39746,36273:20123,36274:20304,36275:21449,36276:21766,36277:23919,36278:24038,36279:24046,36280:26619,36281:27801,36282:29811,36283:30722,36284:35408,36285:37782,36286:35039,36287:22352,36288:24231,36289:25387,36290:20661,36291:20652,36292:20877,36293:26368,36294:21705,36295:22622,36296:22971,36297:23472,36298:24425,36299:25165,36300:25505,36301:26685,36302:27507,36303:28168,36304:28797,36305:37319,36306:29312,36307:30741,36308:30758,36309:31085,36310:25998,36311:32048,36312:33756,36313:35009,36314:36617,36315:38555,36316:21092,36317:22312,36318:26448,36319:32618,36320:36001,36321:20916,36322:22338,36323:38442,36324:22586,36325:27018,36326:32948,36327:21682,36328:23822,36329:22524,36330:30869,36331:40442,36332:20316,36333:21066,36334:21643,36335:25662,36336:26152,36337:26388,36338:26613,36339:31364,36340:31574,36341:32034,36342:37679,36343:26716,36344:39853,36345:31545,36346:21273,36347:20874,36348:21047,36416:23519,36417:25334,36418:25774,36419:25830,36420:26413,36421:27578,36422:34217,36423:38609,36424:30352,36425:39894,36426:25420,36427:37638,36428:39851,36429:30399,36430:26194,36431:19977,36432:20632,36433:21442,36434:23665,36435:24808,36436:25746,36437:25955,36438:26719,36439:29158,36440:29642,36441:29987,36442:31639,36443:32386,36444:34453,36445:35715,36446:36059,36447:37240,36448:39184,36449:26028,36450:26283,36451:27531,36452:20181,36453:20180,36454:20282,36455:20351,36456:21050,36457:21496,36458:21490,36459:21987,36460:22235,36461:22763,36462:22987,36463:22985,36464:23039,36465:23376,36466:23629,36467:24066,36468:24107,36469:24535,36470:24605,36471:25351,36472:25903,36473:23388,36474:26031,36475:26045,36476:26088,36477:26525,36478:27490,36480:27515,36481:27663,36482:29509,36483:31049,36484:31169,36485:31992,36486:32025,36487:32043,36488:32930,36489:33026,36490:33267,36491:35222,36492:35422,36493:35433,36494:35430,36495:35468,36496:35566,36497:36039,36498:36060,36499:38604,36500:39164,36501:27503,36502:20107,36503:20284,36504:20365,36505:20816,36506:23383,36507:23546,36508:24904,36509:25345,36510:26178,36511:27425,36512:28363,36513:27835,36514:29246,36515:29885,36516:30164,36517:30913,36518:31034,36519:32780,36520:32819,36521:33258,36522:33940,36523:36766,36524:27728,36525:40575,36526:24335,36527:35672,36528:40235,36529:31482,36530:36600,36531:23437,36532:38635,36533:19971,36534:21489,36535:22519,36536:22833,36537:23241,36538:23460,36539:24713,36540:28287,36541:28422,36542:30142,36543:36074,36544:23455,36545:34048,36546:31712,36547:20594,36548:26612,36549:33437,36550:23649,36551:34122,36552:32286,36553:33294,36554:20889,36555:23556,36556:25448,36557:36198,36558:26012,36559:29038,36560:31038,3
2846561:32023,36562:32773,36563:35613,36564:36554,36565:36974,36566:34503,36567:37034,36568:20511,36569:21242,36570:23610,36571:26451,36572:28796,36573:29237,36574:37196,36575:37320,36576:37675,36577:33509,36578:23490,36579:24369,36580:24825,36581:20027,36582:21462,36583:23432,36584:25163,36585:26417,36586:27530,36587:29417,36588:29664,36589:31278,36590:33131,36591:36259,36592:37202,36593:39318,36594:20754,36595:21463,36596:21610,36597:23551,36598:25480,36599:27193,36600:32172,36601:38656,36602:22234,36603:21454,36604:21608,36672:23447,36673:23601,36674:24030,36675:20462,36676:24833,36677:25342,36678:27954,36679:31168,36680:31179,36681:32066,36682:32333,36683:32722,36684:33261,36685:33311,36686:33936,36687:34886,36688:35186,36689:35728,36690:36468,36691:36655,36692:36913,36693:37195,36694:37228,36695:38598,36696:37276,36697:20160,36698:20303,36699:20805,36700:21313,36701:24467,36702:25102,36703:26580,36704:27713,36705:28171,36706:29539,36707:32294,36708:37325,36709:37507,36710:21460,36711:22809,36712:23487,36713:28113,36714:31069,36715:32302,36716:31899,36717:22654,36718:29087,36719:20986,36720:34899,36721:36848,36722:20426,36723:23803,36724:26149,36725:30636,36726:31459,36727:33308,36728:39423,36729:20934,36730:24490,36731:26092,36732:26991,36733:27529,36734:28147,36736:28310,36737:28516,36738:30462,36739:32020,36740:24033,36741:36981,36742:37255,36743:38918,36744:20966,36745:21021,36746:25152,36747:26257,36748:26329,36749:28186,36750:24246,36751:32210,36752:32626,36753:26360,36754:34223,36755:34295,36756:35576,36757:21161,36758:21465,36759:22899,36760:24207,36761:24464,36762:24661,36763:37604,36764:38500,36765:20663,36766:20767,36767:21213,36768:21280,36769:21319,36770:21484,36771:21736,36772:21830,36773:21809,36774:22039,36775:22888,36776:22974,36777:23100,36778:23477,36779:23558,36780:23567,36781:23569,36782:23578,36783:24196,36784:24202,36785:24288,36786:24432,36787:25215,36788:25220,36789:25307,36790:25484,36791:25463,36792:26119,36793:26124,36794:26157,36795:26230,36796:26494,36797:26786,36798:27167,36799:27189,36800:27836,36801:28040,36802:28169,36803:28248,36804:28988,36805:28966,36806:29031,36807:30151,36808:30465,36809:30813,36810:30977,36811:31077,36812:31216,36813:31456,36814:31505,36815:31911,36816:32057,36817:32918,36818:33750,36819:33931,36820:34121,36821:34909,36822:35059,36823:35359,36824:35388,36825:35412,36826:35443,36827:35937,36828:36062,36829:37284,36830:37478,36831:37758,36832:37912,36833:38556,36834:38808,36835:19978,36836:19976,36837:19998,36838:20055,36839:20887,36840:21104,36841:22478,36842:22580,36843:22732,36844:23330,36845:24120,36846:24773,36847:25854,36848:26465,36849:26454,36850:27972,36851:29366,36852:30067,36853:31331,36854:33976,36855:35698,36856:37304,36857:37664,36858:22065,36859:22516,36860:39166,36928:25325,36929:26893,36930:27542,36931:29165,36932:32340,36933:32887,36934:33394,36935:35302,36936:39135,36937:34645,36938:36785,36939:23611,36940:20280,36941:20449,36942:20405,36943:21767,36944:23072,36945:23517,36946:23529,36947:24515,36948:24910,36949:25391,36950:26032,36951:26187,36952:26862,36953:27035,36954:28024,36955:28145,36956:30003,36957:30137,36958:30495,36959:31070,36960:31206,36961:32051,36962:33251,36963:33455,36964:34218,36965:35242,36966:35386,36967:36523,36968:36763,36969:36914,36970:37341,36971:38663,36972:20154,36973:20161,36974:20995,36975:22645,36976:22764,36977:23563,36978:29978,36979:23613,36980:33102,36981:35338,36982:36805,36983:38499,36984:38765,36985:31525,36986:35535,36987:38920,36988:37218,36989:22259,36990:21416,36992:36887,36993:21561,36994:22402,36995:24101,36996:25512,36997:27700,36998:28810,36999:30561,37e3:31883,37001:32736,37002:34928,37003:36930,37004:37204,37005:37648,37006:37656,37007:38543,37008:29790,37009:39620,37010:23815,37011:23913,37012:25968,37013:26530,37014:36264,37015:38619,37016:25454,37017:26441,37018:26905,37019:33733,37020:38935,37021:38592,37022:35070,37023:28548,37024:25722,37025:23544,37026:19990,37027:28716,37028:30045,37029:26159,37030:20932,37031:21046,37032:21218,37033:22995,37034:24449,37035:24615,37036:25104,37037:25919,37038:25972,37039:26143,37040:26228,37041:26866,37042:26646,37043:27491,37044:28165,37045:29298,37046:29983,37047:30427,37048:31934,37049:32854,37050:22768,37051:35069,37052:35199,37053:35488,37054:35475,37055:35531,37056:36893,37057:37266,37058:38738,37059:38745,37060:25993,37061:31246,37062:33030,37063:38587,37064:24109,37065:24796,37066:25114,37067:26021,37068:26132,37069:26512,37070:30707,37071:31309,37072:31821,37073:32318,37074:33034,37075:36012,37076:36196,37077:36321,37078:36447,37079:30889,37080:20999,37081:25305,37082:25509,37083:25666,37084:25240,37085:35373,37086:31363,37087:31680,37088:35500,37089:38634,37090:32118,37091:33292,37092:34633,37093:20185,37094:20808,37095:21315,37096:21344,37097:23459,37098:23554,37099:23574,37100:24029,37101:25126,37102:25159,37103:25776,37104:26643,37105:26676,37106:27849,37107:27973,37108:27927,37109:26579,37110:28508,37111:29006,37112:29053,37113:26059,37114:31359,37115:31661,37116:32218,37184:32330,37185:32680,37186:33146,37187:33307,37188:33337,37189:34214,37190:35438,37191:36046,37192:36341,37193:36984,37194:36983,37195:37549,37196:37521,37197:38275,37198:39854,37199:21069,37200:21892,37201:28472,37202:28982,37203:20840,37204:31109,37205:32341,37206:33203,37207:31950,37208:22092,37209:22609,37210:23720,37211:25514,37212:26366,37213:26365,37214:26970,37215:29401,37216:30095,37217:30094,37218:30990,37219:31062,37220:31199,37221:31895,37222:32032,37223:32068,37224:34311,37225:35380,37226:38459,37227:36961,37228:40736,37229:20711,37230:21109,37231:21452,37232:21474,37233:20489,37234:21930,37235:22766,37236:22863,37237:29245,37238:23435,37239:23652,37240:21277,37241:24803,37242:24819,37243:25436,37244:25475,37245:25407,37246:25531,37248:25805,37249:26089,37250:26361,37251:24035,37252:27085,37253:27133,37254:28437,37255:29157,37256:20105,37257:30185,37258:30456,37259:31379,37260:31967,37261:32207,37262:32156,37263:32865,37264:33609,37265:33624,37266:33900,37267:33980,37268:34299,37269:35013,37270:36208,37271:36865,37272:36973,37273:37783,37274:38684,37275:39442,37276:20687,37277:22679,37278:24974,37279:33235,37280:34101,37281:36104,37282:36896,37283:20419,37284:20596,37285:21063,37286:21363,37287:24687,37288:25417,37289:26463,37290:28204,37291:36275,37292:36895,37293:20439,37294:23646,37295:36042,37296:26063,37297:32154,37298:21330,37299:34966,37300:20854,37301:25539,37302:23384,37303:23403,37304:23562,37305:25613,37306:26449,37307:36956,37308:20182,37309:22810,37310:22826,37311:27760,37312:35409,37313:21822,37314:22549,37315:22949,37316:24816,37317:25171,37318:26561,37319:33333,37320:26965,37321:38464,37322:39364,37323:39464,37324:20307,37325:22534,37326:23550,37327:32784,37328:23729,37329:24111,37330:24453,37331:24608,37332:24907,37333:25140,37334:26367,37335:27888,37336:28382,37337:32974,37338:33151,37339:33492,37340:34955,37341:36024,37342:36864,37343:36910,37344:38538,37345:40667,37346:39899,37347:20195,37348:21488,37349:22823,37350:31532,37351:37261,37352:38988,37353:40441,37354:28381,37355:28711,37356:21331,37357:21828,37358:23429,37359:25176,37360:25246,37361:25299,37362:27810,37363:28655,37364:29730,37365:35351,37366:37944,37367:28609,37368:35582,37369:33592,37370:20967,37371:34552,37372:21482,37440:21481,37441:20294,37442:36948,37443:36784,37444:22890,37445:33073,37446:24061,37447:31466,37448:36799,37449:26842,37450:35895,37451:29432,37452:40008,37453:27197,37454:35504,37455:20025,37456:21336,37457:22022,37458:22374,37459:25285,37460:25506,37461:26086,37462:27470,37463:28129,37464:28251,37465:28845,37466:30701,37467:31471,37468:31658,37469:32187,37470:32829,37471:32966,37472:34507,37473:35477,37474:37723,37475:22243,37476:22727,37477:24382,37478:26029,37479:26262,37480:27264,37481:27573,37482:30007,37483:35527,37484:20516,37485:30693,37486:22320,37487:24347,37488:24677,37489:26234,37490:27744,37491:30196,37492:31258,37493:32622,37494:33268,37495:34584,37496:36933,37497:39347,37498:31689,37499:30044,37500:31481,37501:31569,37502:33988,37504:36880,37505:31209,37506:31378,3750
2847:33590,37508:23265,37509:30528,37510:20013,37511:20210,37512:23449,37513:24544,37514:25277,37515:26172,37516:26609,37517:27880,37518:34411,37519:34935,37520:35387,37521:37198,37522:37619,37523:39376,37524:27159,37525:28710,37526:29482,37527:33511,37528:33879,37529:36015,37530:19969,37531:20806,37532:20939,37533:21899,37534:23541,37535:24086,37536:24115,37537:24193,37538:24340,37539:24373,37540:24427,37541:24500,37542:25074,37543:25361,37544:26274,37545:26397,37546:28526,37547:29266,37548:30010,37549:30522,37550:32884,37551:33081,37552:33144,37553:34678,37554:35519,37555:35548,37556:36229,37557:36339,37558:37530,37559:38263,37560:38914,37561:40165,37562:21189,37563:25431,37564:30452,37565:26389,37566:27784,37567:29645,37568:36035,37569:37806,37570:38515,37571:27941,37572:22684,37573:26894,37574:27084,37575:36861,37576:37786,37577:30171,37578:36890,37579:22618,37580:26626,37581:25524,37582:27131,37583:20291,37584:28460,37585:26584,37586:36795,37587:34086,37588:32180,37589:37716,37590:26943,37591:28528,37592:22378,37593:22775,37594:23340,37595:32044,37596:29226,37597:21514,37598:37347,37599:40372,37600:20141,37601:20302,37602:20572,37603:20597,37604:21059,37605:35998,37606:21576,37607:22564,37608:23450,37609:24093,37610:24213,37611:24237,37612:24311,37613:24351,37614:24716,37615:25269,37616:25402,37617:25552,37618:26799,37619:27712,37620:30855,37621:31118,37622:31243,37623:32224,37624:33351,37625:35330,37626:35558,37627:36420,37628:36883,37696:37048,37697:37165,37698:37336,37699:40718,37700:27877,37701:25688,37702:25826,37703:25973,37704:28404,37705:30340,37706:31515,37707:36969,37708:37841,37709:28346,37710:21746,37711:24505,37712:25764,37713:36685,37714:36845,37715:37444,37716:20856,37717:22635,37718:22825,37719:23637,37720:24215,37721:28155,37722:32399,37723:29980,37724:36028,37725:36578,37726:39003,37727:28857,37728:20253,37729:27583,37730:28593,37731:3e4,37732:38651,37733:20814,37734:21520,37735:22581,37736:22615,37737:22956,37738:23648,37739:24466,37740:26007,37741:26460,37742:28193,37743:30331,37744:33759,37745:36077,37746:36884,37747:37117,37748:37709,37749:30757,37750:30778,37751:21162,37752:24230,37753:22303,37754:22900,37755:24594,37756:20498,37757:20826,37758:20908,37760:20941,37761:20992,37762:21776,37763:22612,37764:22616,37765:22871,37766:23445,37767:23798,37768:23947,37769:24764,37770:25237,37771:25645,37772:26481,37773:26691,37774:26812,37775:26847,37776:30423,37777:28120,37778:28271,37779:28059,37780:28783,37781:29128,37782:24403,37783:30168,37784:31095,37785:31561,37786:31572,37787:31570,37788:31958,37789:32113,37790:21040,37791:33891,37792:34153,37793:34276,37794:35342,37795:35588,37796:35910,37797:36367,37798:36867,37799:36879,37800:37913,37801:38518,37802:38957,37803:39472,37804:38360,37805:20685,37806:21205,37807:21516,37808:22530,37809:23566,37810:24999,37811:25758,37812:27934,37813:30643,37814:31461,37815:33012,37816:33796,37817:36947,37818:37509,37819:23776,37820:40199,37821:21311,37822:24471,37823:24499,37824:28060,37825:29305,37826:30563,37827:31167,37828:31716,37829:27602,37830:29420,37831:35501,37832:26627,37833:27233,37834:20984,37835:31361,37836:26932,37837:23626,37838:40182,37839:33515,37840:23493,37841:37193,37842:28702,37843:22136,37844:23663,37845:24775,37846:25958,37847:27788,37848:35930,37849:36929,37850:38931,37851:21585,37852:26311,37853:37389,37854:22856,37855:37027,37856:20869,37857:20045,37858:20970,37859:34201,37860:35598,37861:28760,37862:25466,37863:37707,37864:26978,37865:39348,37866:32260,37867:30071,37868:21335,37869:26976,37870:36575,37871:38627,37872:27741,37873:20108,37874:23612,37875:24336,37876:36841,37877:21250,37878:36049,37879:32905,37880:34425,37881:24319,37882:26085,37883:20083,37884:20837,37952:22914,37953:23615,37954:38894,37955:20219,37956:22922,37957:24525,37958:35469,37959:28641,37960:31152,37961:31074,37962:23527,37963:33905,37964:29483,37965:29105,37966:24180,37967:24565,37968:25467,37969:25754,37970:29123,37971:31896,37972:20035,37973:24316,37974:20043,37975:22492,37976:22178,37977:24745,37978:28611,37979:32013,37980:33021,37981:33075,37982:33215,37983:36786,37984:35223,37985:34468,37986:24052,37987:25226,37988:25773,37989:35207,37990:26487,37991:27874,37992:27966,37993:29750,37994:30772,37995:23110,37996:32629,37997:33453,37998:39340,37999:20467,38e3:24259,38001:25309,38002:25490,38003:25943,38004:26479,38005:30403,38006:29260,38007:32972,38008:32954,38009:36649,38010:37197,38011:20493,38012:22521,38013:23186,38014:26757,38016:26995,38017:29028,38018:29437,38019:36023,38020:22770,38021:36064,38022:38506,38023:36889,38024:34687,38025:31204,38026:30695,38027:33833,38028:20271,38029:21093,38030:21338,38031:25293,38032:26575,38033:27850,38034:30333,38035:31636,38036:31893,38037:33334,38038:34180,38039:36843,38040:26333,38041:28448,38042:29190,38043:32283,38044:33707,38045:39361,38046:40614,38047:20989,38048:31665,38049:30834,38050:31672,38051:32903,38052:31560,38053:27368,38054:24161,38055:32908,38056:30033,38057:30048,38058:20843,38059:37474,38060:28300,38061:30330,38062:37271,38063:39658,38064:20240,38065:32624,38066:25244,38067:31567,38068:38309,38069:40169,38070:22138,38071:22617,38072:34532,38073:38588,38074:20276,38075:21028,38076:21322,38077:21453,38078:21467,38079:24070,38080:25644,38081:26001,38082:26495,38083:27710,38084:27726,38085:29256,38086:29359,38087:29677,38088:30036,38089:32321,38090:33324,38091:34281,38092:36009,38093:31684,38094:37318,38095:29033,38096:38930,38097:39151,38098:25405,38099:26217,38100:30058,38101:30436,38102:30928,38103:34115,38104:34542,38105:21290,38106:21329,38107:21542,38108:22915,38109:24199,38110:24444,38111:24754,38112:25161,38113
284:25209,38114:25259,38115:26e3,38116:27604,38117:27852,38118:30130,38119:30382,38120:30865,38121:31192,38122:32203,38123:32631,38124:32933,38125:34987,38126:35513,38127:36027,38128:36991,38129:38750,38130:39131,38131:27147,38132:31800,38133:20633,38134:23614,38135:24494,38136:26503,38137:27608,38138:29749,38139:30473,38140:32654,38208:40763,38209:26570,38210:31255,38211:21305,38212:30091,38213:39661,38214:24422,38215:33181,38216:33777,38217:32920,38218:24380,38219:24517,38220:30050,38221:31558,38222:36924,38223:26727,38224:23019,38225:23195,38226:32016,38227:30334,38228:35628,38229:20469,38230:24426,38231:27161,38232:27703,38233:28418,38234:29922,38235:31080,38236:34920,38237:35413,38238:35961,38239:24287,38240:25551,38241:30149,38242:31186,38243:33495,38244:37672,38245:37618,38246:33948,38247:34541,38248:39981,38249:21697,38250:24428,38251:25996,38252:27996,38253:28693,38254:36007,38255:36051,38256:38971,38257:25935,38258:29942,38259:19981,38260:20184,38261:22496,38262:22827,38263:23142,38264:23500,38265:20904,38266:24067,38267:24220,38268:24598,38269:25206,38270:25975,38272:26023,38273:26222,38274:28014,38275:29238,38276:31526,38277:33104,38278:33178,38279:33433,38280:35676,38281:36e3,38282:36070,38283:36212,38284:38428,38285:38468,38286:20398,38287:25771,38288:27494,38289:33310,38290:33889,38291:34154,38292:37096,38293:23553,38294:26963,38295:39080,38296:33914,38297:34135,38298:20239,38299:21103,38300:24489,38301:24133,38302:26381,38303:31119,38304:33145,38305:35079,38306:35206,38307:28149,38308:24343,38309:25173,38310:27832,38311:20175,38312:29289,38313:39826,38314:20998,38315:21563,38316:22132,38317:22707,38318:24996,38319:25198,38320:28954,38321:22894,38322:31881,38323:31966,38324:32027,38325:38640,38326:25991,38327:32862,38328:19993,38329:20341,38330:20853,38331:22592,38332:24163,38333:24179,38334:24330,38335:26564,38336:20006,38337:34109,38338:38281,38339:38491,38340:31859,38341:38913,38342:20731,38343:22721,38344:30294,38345:30887,38346:21029,38347:30629,38348:34065,38349:31622,38350:20559,38351:22793,38352:29255,38353:31687,38354:32232,38355:36794,38356:36820,38357:36941,38358:20415,38359:21193,38360:23081,38361:24321,38362:38829,38363:20445,38364:33303,38365:37610,38366:22275,38367:25429,38368:27497,38369:29995,38370:35036,38371:36628,38372:31298,38373:21215,38374:22675,38375:24917,38376:25098,38377:26286,38378:27597,38379:31807,38380:33769,38381:20515,38382:20472,38383:21253,38384:21574,38385:22577,38386:22857,38387:23453,38388:23792,38389:23791,38390:23849,38391:24214,38392:25265,38393:25447,38394:25918,38395:26041,38396:26379,38464:27861,38465:27873,38466:28921,38467:30770,38468:32299,38469:32990,38470:33459,38471:33804,38472:34028,38473:34562,38474:35090,38475:35370,38476:35914,38477:37030,38478:37586,38479:39165,38480:40179,38481:40300,38482:20047,38483:20129,38484:20621,38485:21078,38486:22346,38487:22952,38488:24125,38489:24536,38490:24537,38491:25151,38492:26292,38493:26395,38494:26576,38495:26834,38496:20882,38497:32033,38498:32938,38499:33192,38500:35584,38501:35980,38502:36031,38503:37502,38504:38450,38505:21536,38506:38956,38507:21271,38508:20693,38509:21340,38510:22696,38511:25778,38512:26420,38513:29287,38514:30566,38515:31302,38516:37350,38517:21187,38518:27809,38519:27526,38520:22528,38521:24140,38522:22868,38523:26412,38524:32763,38525:20961,38526:30406,38528:25705,38529:30952,38530:39764,38531:40635,38532:22475,38533:22969,38534:26151,38535:26522,38536:27598,38537:21737,38538:27097,38539:24149,38540:33180,38541:26517,38542:39850,38543:26622,38544:40018,38545:26717,38546:20134,38547:20451,38548:21448,38549:25273,38550:26411,38551:27819,38552:36804,38553:20397,38554:32365,38555:40639,38556:19975,38557:24930,38558:28288,38559:28459,38560:34067,38561:21619,38562:26410,38563:39749,38564:24051,38565:31637,38566:23724,38567:23494,38568:34588,38569:28234,38570:34001,38571:31252,38572:33032,38573:22937,38574:31885,38575:27665,38576:30496,38577:21209,38578:22818,38579:28961,38580:29279,38581:30683,38582:38695,38583:40289,38584:26891,38585:23167,38586:23064,38587:20901,38588:21517,38589:21629,38590:26126,38591:30431,38592
284:36855,38593:37528,38594:40180,38595:23018,38596:29277,38597:28357,38598:20813,38599:26825,38600:32191,38601:32236,38602:38754,38603:40634,38604:25720,38605:27169,38606:33538,38607:22916,38608:23391,38609:27611,38610:29467,38611:30450,38612:32178,38613:32791,38614:33945,38615:20786,38616:26408,38617:40665,38618:30446,38619:26466,38620:21247,38621:39173,38622:23588,38623:25147,38624:31870,38625:36016,38626:21839,38627:24758,38628:32011,38629:38272,38630:21249,38631:20063,38632:20918,38633:22812,38634:29242,38635:32822,38636:37326,38637:24357,38638:30690,38639:21380,38640:24441,38641:32004,38642:34220,38643:35379,38644:36493,38645:38742,38646:26611,38647:34222,38648:37971,38649:24841,38650:24840,38651:27833,38652:30290,38720:35565,38721:36664,38722:21807,38723:20305,38724:20778,38725:21191,38726:21451,38727:23461,38728:24189,38729:24736,38730:24962,38731:25558,38732:26377,38733:26586,38734:28263,38735:28044,38736:29494,38737:29495,38738:30001,38739:31056,38740:35029,38741:35480,38742:36938,38743:37009,38744:37109,38745:38596,38746:34701,38747:22805,38748:20104,38749:20313,38750:19982,38751:35465,38752:36671,38753:38928,38754:20653,38755:24188,38756:22934,38757:23481,38758:24248,38759:25562,38760:25594,38761:25793,38762:26332,38763:26954,38764:27096,38765:27915,38766:28342,38767:29076,38768:29992,38769:31407,38770:32650,38771:32768,38772:33865,38773:33993,38774:35201,38775:35617,38776:36362,38777:36965,38778:38525,38779:39178,38780:24958,38781:25233,38782:27442,38784:27779,38785:28020,38786:32716,38787:32764,38788:28096,38789:32645,38790:34746,38791:35064,38792:26469,38793:33713,38794:38972,38795:38647,38796:27931,38797:32097,38798:33853,38799:37226,38800:20081,38801:21365,38802:23888,38803:27396,38804:28651,38805:34253,38806:34349,38807:35239,38808:21033,38809:21519,38810:23653,38811:26446,38812:26792,38813:29702,38814:29827,38815:30178,38816:35023,38817:35041,38818:37324,38819:38626,38820:38520,38821:24459,38822:29575,38823:31435,38824:33870,38825:25504,38826:30053,38827:21129,38828:27969,38829:28316,38830:29705,38831:30041,38832:30827,38833:31890,38834:38534,38835:31452,38836:40845,38837:20406,38838:24942,38839:26053,38840:34396,38841:20102,38842:20142,38843:20698,38844:20001,38845:20940,38846:23534,38847:26009,38848:26753,38849:28092,38850:29471,38851:30274,38852:30637,38853:31260,38854:31975,38855:33391,38856:35538,38857:36988,38858:37327,38859:38517,38860:38936,38861:21147,38862:32209,38863:20523,38864:21400,38865:26519,38866:28107,38867:29136,38868:29747,38869:33256,38870:36650,38871:38563,38872:40023,38873:40607,38874:29792,38875:22593,38876:28057,38877:32047,38878:39006,38879:20196,38880:20278,38881:20363,38882:20919,38883:21169,38884:23994,38885:24604,38886:29618,38887:31036,38888:33491,38889:37428,38890:38583,38891:38646,38892:38666,38893:40599,38894:40802,38895:26278,38896:27508,38897:21015,38898:21155,38899:28872,38900:35010,38901:24265,38902:24651,38903:24976,38904:28451,38905:29001,38906:31806,38907:32244,38908:32879,38976:34030,38977:36899,38978:37676,38979:21570,38980:39791,38981:27347,38982:28809,38983:36034,38984:36335,38985:38706,38986:21172,38987:23105,38988:24266,38989:24324,38990:26391,38991:27004,38992:27028,38993:28010,38994:28431,38995:29282,38996:29436,38997:31725,38998:32769,38999:32894,39e3:34635,39001:37070,39002:20845,39003:40595,39004:31108,39005:32907,39006:37682,39007:35542,39008:20525,39009:21644,39010:35441,39011:27498,39012:36036,39013:33031,39014:24785,39015:26528,39016:40434,39017:20121,39018:20120,39019:39952,39020:35435,39021:34241,39022:34152,39023:26880,39024:28286,39025:30871,39026:33109,39071:24332,39072:19984,39073:19989,39074:20010,39075:20017,39076:20022,39077:20028,39078:20031,39079:20034,39080:20054,39081:20056,39082:20098,39083:20101,39084:35947,39085:20106,39086:33298,39087:24333,39088:20110,39089:20126,39090:20127,39091:20128,39092:20130,39093:20144,39094:20147,39095:20150,39096:20174,39097:20173,39098:20164,39099:20166,39100:20162,39101:20183,39102:20190,39103:20205,39104:20191,39105:20215,39106:20233,39107:20314,39108:20272,39109:20315,39110:20317,39111:20311,39112:20295,39113:20342,39114:20360,39115:20367,39116:20376,39117:20347,39118:20329,39119:20336,39120:20369,39121:20335,39122:20358,39123:20374,39124:20760,39125:20436,39126:20447,39127:20430,39128:20440,39129:20443,39130:20433,39131:20442,39132:20432,39133:20452,39134:20453,39135:20506,39136:20520,39137:20500,39138:20522,39139:20517,39140:20485,39141:20252,39142:20470,39143:20513,39144:20521,39145:20524,39146:20478,39147:20463,39148:20497,39149:20486,39150:20547,39151:20551,39152:26371,39153:20565,39154:20560,39155:20552,39156:20570,39157:20566,39158:20588,39159:20600,39160:20608,39161:20634,39162:20613,39163:2
2840660,39164:20658,39232:20681,39233:20682,39234:20659,39235:20674,39236:20694,39237:20702,39238:20709,39239:20717,39240:20707,39241:20718,39242:20729,39243:20725,39244:20745,39245:20737,39246:20738,39247:20758,39248:20757,39249:20756,39250:20762,39251:20769,39252:20794,39253:20791,39254:20796,39255:20795,39256:20799,39257:20800,39258:20818,39259:20812,39260:20820,39261:20834,39262:31480,39263:20841,39264:20842,39265:20846,39266:20864,39267:20866,39268:22232,39269:20876,39270:20873,39271:20879,39272:20881,39273:20883,39274:20885,39275:20886,39276:20900,39277:20902,39278:20898,39279:20905,39280:20906,39281:20907,39282:20915,39283:20913,39284:20914,39285:20912,39286:20917,39287:20925,39288:20933,39289:20937,39290:20955,39291:20960,39292:34389,39293:20969,39294:20973,39296:20976,39297:20981,39298:20990,39299:20996,39300:21003,39301:21012,39302:21006,39303:21031,39304:21034,39305:21038,39306:21043,39307:21049,39308:21071,39309:21060,39310:21067,39311:21068,39312:21086,39313:21076,39314:21098,39315:21108,39316:21097,39317:21107,39318:21119,39319:21117,39320:21133,39321:21140,39322:21138,39323:21105,39324:21128,39325:21137,39326:36776,39327:36775,39328:21164,39329:21165,39330:21180,39331:21173,39332:21185,39333:21197,39334:21207,39335:21214,39336:21219,39337:21222,39338:39149,39339:21216,39340:21235,39341:21237,39342:21240,39343:21241,39344:21254,39345:21256,39346:30008,39347:21261,39348:21264,39349:21263,39350:21269,39351:21274,39352:21283,39353:21295,39354:21297,39355:21299,39356:21304,39357:21312,39358:21318,39359:21317,39360:19991,39361:21321,39362:21325,39363:20950,39364:21342,39365:21353,39366:21358,39367:22808,39368:21371,39369:21367,39370:21378,39371:21398,39372:21408,39373:21414,39374:21413,39375:21422,39376:21424,39377:21430,39378:21443,39379:31762,39380:38617,39381:21471,39382:26364,39383:29166,39384:21486,39385:21480,39386:21485,39387:21498,39388:21505,39389:21565,39390:21568,39391:21548,39392:21549,39393:21564,39394:21550,39395:21558,39396:21545,39397:21533,39398:21582,39399:21647,39400:21621,39401:21646,39402:21599,39403:21617,39404:21623,39405:21616,39406:21650,39407:21627,39408:21632,39409:21622,39410:21636,39411:21648,39412:21638,39413:21703,39414:21666,39415:21688,39416:21669,39417:21676,39418:21700,39419:21704,39420:21672,39488:21675,39489:21698,39490:21668,39491:21694,39492:21692,39493:21720,39494:21733,39495:21734,39496:21775,39497:21780,39498:21757,39499:21742,39500:21741,39501:21754,39502:21730,39503:21817,39504:21824,39505:21859,39506:21836,39507:21806,39508:21852,39509:21829,39510:21846,39511:21847,39512:21816,39513:21811,39514:21853,39515:21913,39516:21888,39517:21679,39518:21898,39519:21919,39520:21883,39521:21886,39522:21912,39523:21918,39524:21934,39525:21884,39526:21891,39527:21929,39528:21895,39529:21928,39530:21978,39531:21957,39532:21983,39533:21956,39534:21980,39535:21988,39536:21972,39537:22036,39538:22007,39539:22038,39540:22014,39541:22013,39542:22043,39543:22009,39544:22094,39545:22096,39546:29151,39547:22068,39548:22070,39549:22066,39550:22072,39552:22123,39553:22116,39554:22063,39555:22124,39556:22122,39557:22150,39558:22144,39559:22154,39560:22176,39561:22164,39562:22159,39563:22181,39564:22190,39565:22198,39566:22196,39567:22210,39568:22204,39569:22209,39570:22211,39571:22208,39572:22216,39573:22222,39574:22225,39575:22227,39576:22231,39577:22254,39578:22265,39579:22272,39580:22271,39581:22276,39582:22281,39583:22280,39584:22283,39585:22285,39586:22291,39587:22296,39588:22294,39589:21959,39590:22300,39591:22310,39592:22327,39593:22328,39594:22350,39595:22331,39596:22336,39597:22351,39598:22377,39599:22464,39600:22408,39601:22369,39602:22399,39603:22409,39604:22419,39605:22432,39606:22451,39607:22436,39608:22442,39609:22448,39610:22467,39611:22470,39612:22484,39613:22482,39614:22483,39615:22538,39616:22486,39617:22499,39618:22539,39619:22553,39620:22557,39621:22642,39622:22561,39623:22626,39624:22603,39625:22640,39626:27584,39627:22610,39628:22589,39629:22649,39630:22661,39631:22713,39632:22687,39633:22699,39634:22714,39635:22750,39636:22715,39637:22712,39638:22702,39639:22725,39640:22739,39641:22737,39642:22743,39643:22745,39644:22744,39645:22757,39646:22748,39647:22756,39648:22751,39649:22767,39650:22778,39651:22777,39652:22779,39653:22780,39654:22781,39655:22786,39656:22794,39657:22800,39658:22811,39659:26790,39660:22821,39661:22828,39662:22829,39663:22834,39664:22840,39665:22846,39666:31442,39667:22869,39668:22864,39669:22862,39670:22874,39671:22872,39672:22882,39673:22880,39674:22887,39675:22892,39676:22889,39744:22904,39745:22913,39746:22941,39747:20318,39748:20395,39749:22947,39750:22962,39751:22982,39752:23016,39753:23004,39754:22925,39755:23001,39756:23002,39757:23077,39758:23071,39759:23057,39760:23068,39761:23049,39762:23066,39763:23104,39764:23148,39765:23113,39766:23093,39767:23094,39768:23138,39769:23146,39770:23194,39771:23228,39772:23230,39773:23243,39774:23234,39775:23229,39776:23267,39777:23255,39778:23270,39779:23273,39780:23254,39781:23290,39782:23291,39783:23308,39784:23307,39785:23318,39786:23346,39787:23248,39788:23338,39789:23350,39790:23358,39791:23363,39792:23365,39793:23360,39794:23377,39795:23381,39796:23386,39797:23387,39798:23397,39799:23401,39800:23408,39801:23411,39802:23413,39803:23416,39804:25992,39805:23418,39806:23424,39808:23427,39809:23462,39810:23480,39811:23491,39812:23495,39813:23497,39814:23508,39815:23504,39816:23524,39817:23526,39818:23522,39819:23518,39820:23525,39821:23531,39822:23536,39823:23542,39824:23539,39825:23557,39826:23559,39827:23560,39828:23565,39829:23571,39830:23584,39831:23586,39832:23592,39833:23608,39834:23609,39835:23617,39836:23622,39837:23630,39838:23635,39839:23632,39840:23631,39841:23409,39842:23660,39843:23662,39844:20066,39845:23670,39846:23673,39847:23692,39848:23697,39849:23700,39850:22939,39851:23723,39852:23739,39853:23734,39854:23740,39855:23735,39856:23749,39857:23742,39858:23751,39859:23769,39860:23785,39861:23805,39862:23802,39863:23789,39864:23948,39865:23786,39866:23819,39867:23829,39868:23831,39869:23900,39870:23839,39871:23835,39872:23825,39873:23828,39874:23842,39875:23834,39876:23833,39877:23832,39878:23884,39879:23890,39880:23886,39881:23883,39882:23916,39883:23923,39884:23926,39885:23943,39886:23940,39887:23938,39888:23970,39889:239
28465,39890:23980,39891:23982,39892:23997,39893:23952,39894:23991,39895:23996,39896:24009,39897:24013,39898:24019,39899:24018,39900:24022,39901:24027,39902:24043,39903:24050,39904:24053,39905:24075,39906:24090,39907:24089,39908:24081,39909:24091,39910:24118,39911:24119,39912:24132,39913:24131,39914:24128,39915:24142,39916:24151,39917:24148,39918:24159,39919:24162,39920:24164,39921:24135,39922:24181,39923:24182,39924:24186,39925:40636,39926:24191,39927:24224,39928:24257,39929:24258,39930:24264,39931:24272,39932:24271,4e4:24278,40001:24291,40002:24285,40003:24282,40004:24283,40005:24290,40006:24289,40007:24296,40008:24297,40009:24300,40010:24305,40011:24307,40012:24304,40013:24308,40014:24312,40015:24318,40016:24323,40017:24329,40018:24413,40019:24412,40020:24331,40021:24337,40022:24342,40023:24361,40024:24365,40025:24376,40026:24385,40027:24392,40028:24396,40029:24398,40030:24367,40031:24401,40032:24406,40033:24407,40034:24409,40035:24417,40036:24429,40037:24435,40038:24439,40039:24451,40040:24450,40041:24447,40042:24458,40043:24456,40044:24465,40045:24455,40046:24478,40047:24473,40048:24472,40049:24480,40050:24488,40051:24493,40052:24508,40053:24534,40054:24571,40055:24548,40056:24568,40057:24561,40058:24541,40059:24755,40060:24575,40061:24609,40062:24672,40064:24601,40065:24592,40066:24617,40067:24590,40068:24625,40069:24603,40070:24597,40071:24619,40072:24614,40073:24591,40074:24634,40075:24666,40076:24641,40077:24682,40078:24695,40079:24671,40080:24650,40081:24646,40082:24653,40083:24675,40084:24643,40085:24676,40086:24642,40087:24684,40088:24683,40089:24665,40090:24705,40091:24717,40092:24807,40093:24707,40094:24730,40095:24708,40096:24731,40097:24726,40098:24727,40099:24722,40100:24743,40101:24715,40102:24801,40103:24760,40104:24800,40105:24787,40106:24756,40107:24560,40108:24765,40109:24774,40110:24757,40111:24792,40112:24909,40113:24853,40114:24838,40115:24822,40116:24823,40117:24832,40118:24820,40119:24826,40120:24835,40121:24865,40122:24827,40123:24817,40124:24845,40125:24846,40126:24903,40127:24894,40128:24872,40129:24871,40130:24906,40131:24895,40132:24892,40133:24876,40134:24884,40135:24893,40136:24898,40137:24900,40138:24947,40139:24951,40140:24920,40141:24921,40142:24922,40143:24939,40144:24948,40145:24943,40146:24933,40147:24945,40148:24927,40149:24925,40150:24915,40151:24949,40152:24985,40153:24982,40154:24967,40155:25004,40156:24980,40157:24986,40158:24970,40159:24977,40160:25003,40161:25006,40162:25036,40163:25034,40164:25033,40165:25079,40166:25032,40167:25027,40168:25030,40169:25018,40170:25035,40171:32633,40172:25037,40173:25062,40174:25059,40175:25078,40176:25082,40177:25076,40178:25087,40179:25085,40180:25084,40181:25086,40182:25088,40183:25096,40184:25097,40185:25101,40186:25100,40187:25108,40188:25115,40256:25118,40257:25121,40258:25130,40259:25134,40260:25136,40261:25138,40262:25139,40263:25153,40264:25166,40265:25182,40266:25187,40267:25179,40268:25184,40269:25192,40270:25212,40271:25218,40272:25225,40273:25214,40274:25234,40275:25235,40276:25238,40277:25300,40278:25219,40279:25236,40280:25303,40281:25297,40282:25275,40283:25295,40284:25343,40285:25286,40286:25812,40287:25288,40288:25308,40289:25292,40290:25290,40291:25282,40292:25287,40293:25243,40294:25289,40295:25356,40296:25326,40297:25329,40298:25383,40299:25346,40300:25352,40301:25327,40302:25333,40303:25424,40304:25406,40305:25421,40306:25628,40307:25423,40308:25494,40309:25486,40310:25472,40311:25515,40312:25462,40313:25507,40314:25487,40315:25481,40316:25503,40317:25525,40318:25451,40320:25449,40321:25534,40322:25577,40323:25536,40324:25542,40325:25571,40326:25545,40327:25554,40328:25590,40329:25540,40330:25622,40331:25652,40332:25606,40333:25619,40334:25638,40335:25654,40336:25885,40337:25623,40338:25640,40339:25615,40340:25703,40341:25711,40342:25718,40343:25678,40344:25898,40345:25749,40346:25747,40347:25765,40348:25769,40349:25736,40350:25788,40351:25818,40352:25810,40353:25797,40354:25799,40355:25787,40356:25816,40357:25794,40358:25841,40359:25831,40360:33289,40361:25824,40362:25825,40363:25260,40364:25827,40365:25839,40366:25900,40367:25846,40368:25844,40369:25842,40370:25850,40371:25856,40372:25853,40373:25880,40374:25884,40375:25861,40376:25892,40377:25891,40378:25899,40379:25908,40380:25909,40381:25911,40382:25910,40383:25912,40384:30027,40385:25928,40386:25942,40387:25941,40388:25933,40389:25944,40390:25950,40391:25949,40392:25970,40393:25976,40394:25986,40395:25987,40396:35722,40397:26011,40398:26015,40399:26027,40400:26039,40401:26051,40402:26054,40403:26049,40404:26052,40405:26060,40406:26066,40407:260
28475,40408:26073,40409:26080,40410:26081,40411:26097,40412:26482,40413:26122,40414:26115,40415:26107,40416:26483,40417:26165,40418:26166,40419:26164,40420:26140,40421:26191,40422:26180,40423:26185,40424:26177,40425:26206,40426:26205,40427:26212,40428:26215,40429:26216,40430:26207,40431:26210,40432:26224,40433:26243,40434:26248,40435:26254,40436:26249,40437:26244,40438:26264,40439:26269,40440:26305,40441:26297,40442:26313,40443:26302,40444:26300,40512:26308,40513:26296,40514:26326,40515:26330,40516:26336,40517:26175,40518:26342,40519:26345,40520:26352,40521:26357,40522:26359,40523:26383,40524:26390,40525:26398,40526:26406,40527:26407,40528:38712,40529:26414,40530:26431,40531:26422,40532:26433,40533:26424,40534:26423,40535:26438,40536:26462,40537:26464,40538:26457,40539:26467,40540:26468,40541:26505,40542:26480,40543:26537,40544:26492,40545:26474,40546:26508,40547:26507,40548:26534,40549:26529,40550:26501,40551:26551,40552:26607,40553:26548,40554:26604,40555:26547,40556:26601,40557:26552,40558:26596,40559:26590,40560:26589,40561:26594,40562:26606,40563:26553,40564:26574,40565:26566,40566:26599,40567:27292,40568:26654,40569:26694,40570:26665,40571:26688,40572:26701,40573:26674,40574:26702,40576:26803,40577:26667,40578:26713,40579:26723,40580:26743,40581:26751,40582:26783,40583:26767,40584:26797,40585:26772,40586:26781,40587:26779,40588:26755,40589:27310,40590:26809,40591:26740,40592:26805,40593:26784,40594:26810,40595:26895,40596:26765,40597:26750,40598:26881,40599:26826,40600:26888,40601:26840,40602:26914,40603:26918,40604:26849,40605:26892,40606:26829,40607:26836,40608:26855,40609:26837,40610:26934,40611:26898,40612:26884,40613:26839,40614:26851,40615:26917,40616:26873,40617:26848,40618:26863,40619:26920,40620:26922,40621:26906,40622:26915,40623:26913,40624:26822,40625:27001,40626:26999,40627:26972,40628:27e3,40629:26987,40630:26964,40631:27006,40632:26990,40633:26937,40634:26996,40635:26941,40636:26969,40637:26928,40638:26977,40639:26974,40640:26973,40641:27009,40642:26986,40643:27058,40644:27054,40645:27088,40646:27071,40647:27073,40648:27091,40649:27070,40650:27086,40651:23528,40652:27082,40653:27101,40654:27067,40655:27075,40656:27047,40657:27182,40658:27025,40659:27040,40660:27036,40661:27029,40662:27060,40663:27102,40664:27112,40665:27138,40666:27163,40667:27135,40668:27402,40669:27129,40670:27122,40671:27111,40672:27141,40673:27057,40674:27166,40675:27117,40676:27156,40677:27115,40678:27146,40679:27154,40680:27329,40681:27171,40682:27155,40683:27204,40684:27148,40685:27250,40686:27190,40687:27256,40688:27207,40689:27234,40690:27225,40691:27238,40692:27208,40693:27192,40694:27170,40695:27280,40696:27277,40697:27296,40698:27268,40699:27298,40700:27299,40768:27287,40769:34327,40770:27323,40771:27331,40772:27330,40773:27320,40774:27315,40775:27308,40776:27358,40777:27345,40778:27359,40779:27306,40780:27354,40781:27370,40782:27387,40783:27397,40784:34326,40785:27386,40786:27410,40787:27414,40788:39729,40789:27423,40790:27448,40791:27447,40792:30428,40793:27449,40794:39150,40795:27463,40796:27459,40797:27465,40798:27472,40799:27481,40800:27476,40801:27483,40802:27487,40803:27489,40804:27512,40805:27513,40806:27519,40807:27520,40808:27524,40809:27523,40810:27533,40811:27544,40812:27541,40813:27550,40814:27556,40815:27562,40816:27563,40817:27567,40818:27570,40819:27569,40820:27571,40821:27575,40822:27580,40823:27590,40824:27595,40825:27603,40826:27615,40827:27628,40828:27627,40829:27635,40830:27631,40832:40638,40833:27656,40834:27667,40835:27668,40836:27675,40837:27684,40838:27683,40839:27742,40840:27733,40841:27746,40842:27754,40843:27778,40844:27789,40845:27802,40846:27777,40847:27803,40848:27774,40849:27752,40850:27763,40851:27794,40852:27792,40853:27844,40854:27889,40855:27859,40856:27837,40857:27863,40858:27845,40859:27869,40860:27822,40861:27825,40862:27838,40863:27834,40864:27867,40865:27887,40866:27865,40867:27882,40868:27935,40869:34893,40870:27958,40871:27947,40872:27965,40873:27960,40874:27929,40875:27957,40876:27955,40877:27922,40878:27916,40879:28003,40880:28051,40881:28004,40882:27994,40883:28025,40884:27993,40885:28046,40886:28053,40887:28644,40888:28037,40889:28153,40890:28181,40891:28170,40892:28085,40893:28103,40894:28134,40895:28088,40896:28102,40897:28140,40898:28126,40899:28108,40900:28136,40901:28114,40902:28101,40903:28154,40904:28121,40905:28132,40906:28117,40907:28138,40908:28142,40909:28205,40910:28270,40911:28206,40912:28185,40913:28274,40914:28255,40915:28222,40916:28195,40917:28267,40918:28203,40919:28278,40920:28237,40921:28191,40922:28227,40923:28218,40924:28238,40925:28196,40926:28415,40927:28189,40928:28216,40929:28290,40930:28330,40931:28312,40932:28361,40933:28343,40934:28371,40935:28349,40936:28335,40937:28356,40938:28338,40939:28372,40940:28373,40941:28303,40942:28325,40943:28354,40944:28319,40945:28481,40946:28433,40947:28748,40948:28396,40949:28408,40950:28414,40951:28479,40952:28402,40953:28465,40954:28399,40955:28466,40956:28364,161:65377,162:65378,163:65379,164:65380,165:65381,166:65382,167:65383,168:65384,169:65385,170:65386,171:65387,172:65388,173:65389,174:65390,175:65391,176:65392,177:65393,178:65394,179:65395,180:65396,181:65397,182:65398,183:65399,184:65400,185:65401,186:65402,187:65403,188:65404,189:65405,190:65406,191:65407,192:65408,193:65409,194:65410,195:65411,196:65412,197:65413,198:65414,199:65415,200:65416,201:65417,202:65418,203:65419,204:65420,205:65421,206:65422,207:65423,208:65424,209:65425,210:65426,211:65427,212:65428,213:65429,214:65430,215:65431,216:65432,217:65433,218:65434,219:65435,220:65436,221:65437,222:65438,223:65439,57408:28478,57409:28435,57410:28407,57411:28550,57412:28538,57413:28536,57414:28545,57415:28544,57416:28527,57417:28507,57418:28659,57419:28525,57420:28546,57421:28540,57422:28504,57423:28558,57424:28561,57425:28610,57426:28518,57427:28595,57428:28579,57429:28577,57430:28580,57431:28601,57432:28614,57433:28586,57434:28639,57435:28629,57436:28652,57437:28628,57438:28632,57439:28657,57440:28654,57441:28635,5
2847442:28681,57443:28683,57444:28666,57445:28689,57446:28673,57447:28687,57448:28670,57449:28699,57450:28698,57451:28532,57452:28701,57453:28696,57454:28703,57455:28720,57456:28734,57457:28722,57458:28753,57459:28771,57460:28825,57461:28818,57462:28847,57463:28913,57464:28844,57465:28856,57466:28851,57467:28846,57468:28895,57469:28875,57470:28893,57472:28889,57473:28937,57474:28925,57475:28956,57476:28953,57477:29029,57478:29013,57479:29064,57480:29030,57481:29026,57482:29004,57483:29014,57484:29036,57485:29071,57486:29179,57487:29060,57488:29077,57489:29096,57490:29100,57491:29143,57492:29113,57493:29118,57494:29138,57495:29129,57496:29140,57497:29134,57498:29152,57499:29164,57500:29159,57501:29173,57502:29180,57503:29177,57504:29183,57505:29197,57506:29200,57507:29211,57508:29224,57509:29229,57510:29228,57511:29232,57512:29234,57513:29243,57514:29244,57515:29247,57516:29248,57517:29254,57518:29259,57519:29272,57520:29300,57521:29310,57522:29314,57523:29313,57524:29319,57525:29330,57526:29334,57527:29346,57528:29351,57529:29369,57530:29362,57531:29379,57532:29382,57533:29380,57534:29390,57535:29394,57536:29410,57537:29408,57538:29409,57539:29433,57540:29431,57541:20495,57542:29463,57543:29450,57544:29468,57545:29462,57546:29469,57547:29492,57548:29487,57549:29481,57550:29477,57551:29502,57552:29518,57553:29519,57554:40664,57555:29527,57556:29546,57557:29544,57558:29552,57559:29560,57560:29557,57561:29563,57562:29562,57563:29640,57564:29619,57565:29646,57566:29627,57567:29632,57568:29669,57569:29678,57570:29662,57571:29858,57572:29701,57573:29807,57574:29733,57575:29688,57576:29746,57577:29754,57578:29781,57579:29759,57580:29791,57581:29785,57582:29761,57583:29788,57584:29801,57585:29808,57586:29795,57587:29802,57588:29814,57589:29822,57590:29835,57591:29854,57592:29863,57593:29898,57594:29903,57595:29908,57596:29681,57664:29920,57665:29923,57666:29927,57667:29929,57668:29934,57669:29938,57670:29936,57671:29937,57672:29944,57673:29943,57674:29956,57675:29955,57676:29957,57677:29964,57678:29966,57679:29965,57680:29973,57681:29971,57682:29982,57683:29990,57684:29996,57685:30012,57686:30020,57687:30029,57688:30026,57689:30025,57690:30043,57691:30022,57692:30042,57693:30057,57694:30052,57695:30055,57696:30059,57697:30061,57698:30072,57699:30070,57700:30086,57701:30087,57702:30068,57703:30090,57704:30089,57705:30082,57706:30100,57707:30106,57708:30109,57709:30117,57710:30115,57711:30146,57712:30131,57713:30147,57714:30133,57715:30141,57716:30136,57717:30140,57718:30129,57719:30157,57720:30154,57721:30162,57722:30169,57723:30179,57724:30174,57725:30206,57726:30207,57728:30204,57729:30209,57730:30192,57731:30202,57732:30194,57733:30195,57734:30219,57735:30221,57736:30217,57737:30239,57738:30247,57739:30240,57740:30241,57741:30242,57742:30244,57743:30260,57744:30256,57745:30267,57746:30279,57747:30280,57748:30278,57749:30300,57750:30296,57751:30305,57752:30306,57753:30312,57754:30313,57755:30314,57756:30311,57757:30316,57758:30320,57759:30322,57760:30326,57761:30328,57762:30332,57763:30336,57764:30339,57765:30344,57766:30347,57767:30350,57768:30358,57769:30355,57770:30361,57771:30362,57772:30384,57773:30388,57774:30392,57775:30393,57776:30394,57777:30402,57778:30413,57779:30422,57780:30418,57781:30430,57782:30433,57783:30437,57784:30439,57785:30442,57786:34351,57787:30459,57788:30472,57789:30471,57790:30468,57791:30505,57792:30500,57793:30494,57794:30501,57795:30502,57796:30491,57797:30519,57798:30520,57799:30535,57800:30554,57801:30568,57802:30571,57803:30555,57804:30565,57805:30591,57806:30590,57807:30585,57808:30606,57809:30603,57810:30609,57811:30624,57812:30622,57813:30640,57814:30646,57815:30649,57816:30655,57817:30652,57818:30653,57819:30651,57820:30663,57821:30669,57822:30679,57823:30682,57824:30684,57825:30691,57826:30702,57827:30716,57828:30732,57829:30738,57830:31014,57831:30752,57832:31018,57833:30789,57834:30862,57835:30836,57836:30854,57837:30844,57838:30874,57839:30860,57840:30883,57841:30901,57842:30890,57843:30895,57844:30929,57845:30918,57846:30923,57847:30932,57848:30910,57849:30908,57850:30917,57851:30922,57852:30956,5
2847920:30951,57921:30938,57922:30973,57923:30964,57924:30983,57925:30994,57926:30993,57927:31001,57928:31020,57929:31019,57930:31040,57931:31072,57932:31063,57933:31071,57934:31066,57935:31061,57936:31059,57937:31098,57938:31103,57939:31114,57940:31133,57941:31143,57942:40779,57943:31146,57944:31150,57945:31155,57946:31161,57947:31162,57948:31177,57949:31189,57950:31207,57951:31212,57952:31201,57953:31203,57954:31240,57955:31245,57956:31256,57957:31257,57958:31264,57959:31263,57960:31104,57961:31281,57962:31291,57963:31294,57964:31287,57965:31299,57966:31319,57967:31305,57968:31329,57969:31330,57970:31337,57971:40861,57972:31344,57973:31353,57974:31357,57975:31368,57976:31383,57977:31381,57978:31384,57979:31382,57980:31401,57981:31432,57982:31408,57984:31414,57985:31429,57986:31428,57987:31423,57988:36995,57989:31431,57990:31434,57991:31437,57992:31439,57993:31445,57994:31443,57995:31449,57996:31450,57997:31453,57998:31457,57999:31458,58e3:31462,58001:31469,58002:31472,58003:31490,58004:31503,58005:31498,58006:31494,58007:31539,58008:31512,58009:31513,58010:31518,58011:31541,58012:31528,58013:31542,58014:31568,58015:31610,58016:31492,58017:31565,58018:31499,58019:31564,58020:31557,58021:31605,58022:31589,58023:31604,58024:31591,58025:31600,58026:31601,58027:31596,58028:31598,58029:31645,58030:31640,58031:31647,58032:31629,58033:31644,58034:31642,58035:31627,58036:31634,58037:31631,58038:31581,58039:31641,58040:31691,58041:31681,58042:31692,58043:31695,58044:31668,58045:31686,58046:31709,58047:31721,58048:31761,58049:31764,58050:31718,58051:31717,58052:31840,58053:31744,58054:31751,58055:31763,58056:31731,58057:31735,58058:31767,58059:31757,58060:31734,58061:31779,58062:31783,58063:31786,58064:31775,58065:31799,58066:31787,58067:31805,58068:31820,58069:31811,58070:31828,58071:31823,58072:31808,58073:31824,58074:31832,58075:31839,58076:31844,58077:31830,58078:31845,58079:31852,58080:31861,58081:31875,58082:31888,58083:31908,58084:31917,58085:31906,58086:31915,58087:31905,58088:31912,58089:31923,58090:31922,58091:31921,58092:31918,58093:31929,58094:31933,58095:31936,58096:31941,58097:31938,58098:31960,58099:31954,58100:31964,58101:31970,58102:39739,58103:31983,58104:31986,58105:31988,58106:31990,58107:31994,58108:32006,58176:32002,58177:32028,58178:32021,58179:32010,58180:32069,58181:32075,58182:32046,58183:32050,58184:32063,58185:32053,58186:32070,58187:32115,58188:32086,58189:32078,58190:32114,58191:32104,58192:32110,58193:32079,58194:32099,58195:32147,58196:32137,58197:32091,58198:32143,58199:32125,58200:32155,58201:32186,58202:32174,58203:32163,58204:32181,58205:32199,58206:32189,58207:32171,58208:32317,58209:32162,58210:32175,58211:32220,58212:32184,58213:32159,58214:32176,58215:32216,58216:32221,58217:32228,58218:32222,58219:32251,58220:32242,58221:32225,58222:32261,58223:32266,58224:32291,58225:32289,58226:32274,58227:32305,58228:32287,58229:32265,58230:32267,58231:32290,58232:32326,58233:32358,58234:32315,58235:32309,58236:32313,58237:32323,58238:32311,58240:32306,58241:32314,58242:32359,58243:32349,58244:32342,58245:32350,58246:32345,58247:32346,58248:32377,58249:32362,58250:32361,58251:32380,58252:32379,58253:32387,58254:32213,58255:32381,58256:36782,58257:32383,58258:32392,58259:32393,58260:32396,58261:32402,58262:32400,58263:32403,58264:32404,58265:32406,58266:32398,58267:32411,58268:32412,58269:32568,58270:32570,58271:32581,58272:32588,58273:32589,58274:32590,58275:32592,58276:32593,58277:32597,58278:32596,58279:32600,58280:32607,58281:32608,58282:32616,58283:32617,58284:32615,58285:32632,58286:32642,58287:32646,58288:32643,58289:32648,58290:32647,58291:32652,58292:32660,58293:32670,58294:32669,58295:32666,58296:32675,58297:32687,58298:32690,58299:32697,58300:32686,58301:32694,58302:32696,58303:35697,58304:32709,58305:32710,58306:32714,58307:32725,58308:32724,58309:32737,58310:32742,58311:32745,58312:32755,58313:32761,58314:39132,58315:32774,58316:32772,58317:32779,58318:32786,58319:32792,58320:32793,58321:32796,58322:32801,58323:32808,58324:32831,58325:32827,58326:32842,58327:32838,58328:32850,58329:32856,58330:32858,58331:32863,58332:32866,58333:32872,58334:32883,58335:32882,58336:32880,58337:32886,58338:32889,58339:32893,58340:32895,58341:32900,58342:32902,58343:32901,58344:32923,58345:32915,58346:32922,58347:32941,58348:20880,58349:32940,58350:32987,58351:32997,58352:32985,58353:32989,58354:32964,58355:32986,58356:32982,58357:33033,58358:33007,58359:33009,58360:33051,58361:33065,58362:33059,58363:33071,58364:33099,58432:38539,58433:33094,58434:33086,58435:33107,58436:33105,58437:33020,58438:33137,58439:33134,58440:33125,58441:33126,58442:33
284140,58443:33155,58444:33160,58445:33162,58446:33152,58447:33154,58448:33184,58449:33173,58450:33188,58451:33187,58452:33119,58453:33171,58454:33193,58455:33200,58456:33205,58457:33214,58458:33208,58459:33213,58460:33216,58461:33218,58462:33210,58463:33225,58464:33229,58465:33233,58466:33241,58467:33240,58468:33224,58469:33242,58470:33247,58471:33248,58472:33255,58473:33274,58474:33275,58475:33278,58476:33281,58477:33282,58478:33285,58479:33287,58480:33290,58481:33293,58482:33296,58483:33302,58484:33321,58485:33323,58486:33336,58487:33331,58488:33344,58489:33369,58490:33368,58491:33373,58492:33370,58493:33375,58494:33380,58496:33378,58497:33384,58498:33386,58499:33387,58500:33326,58501:33393,58502:33399,58503:33400,58504:33406,58505:33421,58506:33426,58507:33451,58508:33439,58509:33467,58510:33452,58511:33505,58512:33507,58513:33503,58514:33490,58515:33524,58516:33523,58517:33530,58518:33683,58519:33539,58520:33531,58521:33529,58522:33502,58523:33542,58524:33500,58525:33545,58526:33497,58527:33589,58528:33588,58529:33558,58530:33586,58531:33585,58532:33600,58533:33593,58534:33616,58535:33605,58536:33583,58537:33579,58538:33559,58539:33560,58540:33669,58541:33690,58542:33706,58543:33695,58544:33698,58545:33686,58546:33571,58547:33678,58548:33671,58549:33674,58550:33660,58551:33717,58552:33651,58553:33653,58554:33696,58555:33673,58556:33704,58557:33780,58558:33811,58559:33771,58560:33742,58561:33789,58562:33795,58563:33752,58564:33803,58565:33729,58566:33783,58567:33799,58568:33760,58569:33778,58570:33805,58571:33826,58572:33824,58573:33725,58574:33848,58575:34054,58576:33787,58577:33901,58578:33834,58579:33852,58580:34138,58581:33924,58582:33911,58583:33899,58584:33965,58585:33902,58586:33922,58587:33897,58588:33862,58589:33836,58590:33903,58591:33913,58592:33845,58593:33994,58594:33890,58595:33977,58596:33983,58597:33951,58598:34009,58599:33997,58600:33979,58601:34010,58602:34e3,58603:33985,58604:33990,58605:34006,58606:33953,58607:34081,58608:34047,58609:34036,58610:34071,58611:34072,58612:34092,58613:34079,58614:34069,58615:34068,58616:34044,58617:34112,58618:34147,58619:34136,58620:34120,58688:34113,58689:34306,58690:34123,58691:34133,58692:34176,58693:34212,58694:34184,58695:34193,58696:34186,58697:34216,58698:34157,58699:34196,58700:34203,58701:34282,58702:34183,58703:34204,58704:34167,58705:34174,58706:34192,58707:34249,58708:34234,58709:34255,58710:34233,58711:34256,58712:34261,58713:34269,58714:34277,58715:34268,58716:34297,58717:34314,58718:34323,58719:34315,58720:34302,58721:34298,58722:34310,58723:34338,58724:34330,58725:34352,58726:34367,58727:34381,58728:20053,58729:34388,58730:34399,58731:34407,58732:34417,58733:34451,58734:34467,58735:34473,58736:34474,58737:34443,58738:34444,58739:34486,58740:34479,58741:34500,58742:34502,58743:34480,58744:34505,58745:34851,58746:34475,58747:34516,58748:34526,58749:34537,58750:34540,58752:34527,58753:34523,58754:34543,58755:34578,58756:34566,58757:34568,58758:34560,58759:34563,58760:34555,58761:34577,58762:34569,58763:34573,58764:34553,58765:34570,58766:34612,58767:34623,58768:34615,58769:34619,58770:34597,58771:34601,58772:34586,58773:34656,58774:34655,58775:34680,58776:34636,58777:34638,58778:34676,58779:34647,58780:34664,58781:34670,58782:34649,58783:34643,58784:34659,58785:34666,58786:34821,58787:34722,58788:34719,58789:34690,58790:34735,58791:34763,58792:34749,58793:34752,58794:34768,58795:38614,58796:34731,58797:34756,58798:34739,58799:34759,58800:34758,58801:34747,58802:34799,58803:34802,58804:34784,58805:34831,58806:34829,58807:34814,58808:34806,58809:34807,58810:34830,58811:34770,58812:34833,58813:34838,58814:34837,58815:34850,58816:34849,58817:34865,58818:34870,58819:34873,58820:34855,58821:34875,58822:34884,58823:34882,58824:34898,58825:34905,58826:34910,58827:34914,58828:34923,58829:34945,58830:34942,58831:34974,58832:34933,58833:34941,58834:34997,58835:34930,58836:34946,58837:34967,58838:34962,58839:34990,58840:34969,58841:34978,58842:34957,58843:34980,58844:34992,58845:35007,58846:34993,58847:35011,58848:35012,58849:35028,58850:35032,58851:35033,58852:35037,58853:35065,58854:35074,58855:35068,58856:35060,58857:35048,58858:35058,58859:35076,58860:35084,58861:35082,58862:35091,58863:35139,58864:35102,58865:35109,58866:35114,58867:35115,58868:35137,58869:35140,58870:35131,58871:35126,58872:35128,58873:35148,58874:35101,58875:35168,58876:35166,58944:35174,58945:35172,58946:35181,58947:35178,58948:35183,58949:35188,58950:35191,58951:35198,58952:35203,58953:35208,58954:35210,58955:35219,58956:35224,58957:35233,58958:35241,58959:35238,58960:35244,58961:35247,58962:35250,58963:35258,58964:35261,58965:35263,58966:35264,58967:35290,58968:35292,58969:35293,58970:35303,58971:35316,58972:35320,58973:35331,58974:35350,58975:35344,58976:35340,58977:35355,58978:35357,58979:35365,58980:35382,58981:35393,58982:35419,58983:35410,58984:35398,58985:35400,58986:35452,58987:35437,58988:35436,58989:35426,58990:35461,58991:35458,58992:35460,58993:35496,58994:35489,58995:35473,58996:35493,58997:35494,58998:35482,58999:35491,59e3:35524,59001:35533,59002:35522,59003:35546,59004:35563,59005:35571,59006:35559,59008:35556,59009:35569,59010:35604,59011:35552,59012:35554,59013:35575,59014:35550,59015:35547,59016:35596,59017:35591,59018:35610,59019:35553,59020:35606,59021:35600,59022:35607,59023:35616,59024:35635,59025:38827,59026:35622,59027:35627,59028:35646,59029:35624,59030:35649,59031:35660,59032:35663,59033:35662,59034:35657,59035:35670,59036:35675,59037:35674,59038:35691,59039:35679,59040:35692,59041:35695,59042:35700,59043:35709,59044:35712,59045:35724,59046:35726,59047:35730,59048:35731,59049:35734,59050:35737,59051:35738,59052:35898,59053:35905,59054:35903,59055:35912,59056:35916,59057:35918,59058:35920,59059:35925,59060:35938,59061:35948,59062:35960,59063:35962,59064:35970,59065:35977,59066:35973,59067:35978,59068:35981,59069:35982,59070:35988,59071:35964,59072:35992,59073:25117,59074:36013,59075:36010,59076:36029,59077:36018,59078:36019,59079:36014,59080:36022,59081:36040,59082:36033,59083:36068,59084:36067,59085:36058,59086:36093,59087:36090,59088:36091,59089:36100,59090:36101,59091:36106,59092:36103,59093:36111,59094:36109,59095:36112,59096:40782,59097:36115,59098:36045,59099:36116,59100:36118,59101:36199,59102:36205,59103:36209,59104:36211,59105:36225,59106:36249,59107:36290,59108:36286,59109:36282,59110:36303,59111:36314,59112:36310,59113:36300,59114:36315,59115:36299,59116:36330,59117:36331,59118:36319,59119:36323,59120:36348,59121:36360,59122:36361,59123:36351,59124:36381,59125:36382,59126:36368,59127:36383,59128:36418,59129:36405,59130:36400,59131:36404,59132:36426,59200:36423,59201:36425,59202:36428,59203:36432,59204:36424,59205:36441,59206:36452,59207:36448,59208:36394,59209:36451,59210:36437,59211:36470,59212:36466,59213:36476,59214:36481,59215:36487,59216:36485,59217:36484,59218:36491,59219:36490,59220:36499,59221:36497,59222:36500,59223:36505,59224:36522,59225:36513,59226:36524,59227:36528,59228:36550,59229:36529,59230:36542,59231:36549,59232:36552,59233:36555,59234:36571,59235:36579,59236:36604,59237:36603,59238:36587,59239:36606,59240:36618,59241:36613,59242:36629,59243:36626,59244:36633,59245:36627,59246:36636,59247:36639,59248:36635,59249:36620,59250:36646,59251:36659,59252:36667,59253:36665,59254:36677,59255:36674,59256:36670,59257:36684,59258:36681,59259:36678,59260:36686,59261:36695,59262:36700,59264:36706,59265:36707,59266:36708,59267:36764,59268:36767,59269:36771,59270:36781,59271:36783,59272:36791,59273:36826,59274:36837,59275:36834,59276:36842,59277:36847,59278:36999,59279:36852,59280:36869,59281:36857,59282:36858,59283:36881,59284:36885,59285:36897,59286:36877,59287:36894,59288:36886,59289:36875,59290:36903,59291:36918,59292:36917,59293:36921,59294:36856,59295:36943,59296:36944,59297:36945,59298:36946,59299:36878,593
28400:36937,59301:36926,59302:36950,59303:36952,59304:36958,59305:36968,59306:36975,59307:36982,59308:38568,59309:36978,59310:36994,59311:36989,59312:36993,59313:36992,59314:37002,59315:37001,59316:37007,59317:37032,59318:37039,59319:37041,59320:37045,59321:37090,59322:37092,59323:25160,59324:37083,59325:37122,59326:37138,59327:37145,59328:37170,59329:37168,59330:37194,59331:37206,59332:37208,59333:37219,59334:37221,59335:37225,59336:37235,59337:37234,59338:37259,59339:37257,59340:37250,59341:37282,59342:37291,59343:37295,59344:37290,59345:37301,59346:37300,59347:37306,59348:37312,59349:37313,59350:37321,59351:37323,59352:37328,59353:37334,59354:37343,59355:37345,59356:37339,59357:37372,59358:37365,59359:37366,59360:37406,59361:37375,59362:37396,59363:37420,59364:37397,59365:37393,59366:37470,59367:37463,59368:37445,59369:37449,59370:37476,59371:37448,59372:37525,59373:37439,59374:37451,59375:37456,59376:37532,59377:37526,59378:37523,59379:37531,59380:37466,59381:37583,59382:37561,59383:37559,59384:37609,59385:37647,59386:37626,59387:37700,59388:37678,59456:37657,59457:37666,59458:37658,59459:37667,59460:37690,59461:37685,59462:37691,59463:37724,59464:37728,59465:37756,59466:37742,59467:37718,59468:37808,59469:37804,59470:37805,59471:37780,59472:37817,59473:37846,59474:37847,59475:37864,59476:37861,59477:37848,59478:37827,59479:37853,59480:37840,59481:37832,59482:37860,59483:37914,59484:37908,59485:37907,59486:37891,59487:37895,59488:37904,59489:37942,59490:37931,59491:37941,59492:37921,59493:37946,59494:37953,59495:37970,59496:37956,59497:37979,59498:37984,59499:37986,59500:37982,59501:37994,59502:37417,59503:38e3,59504:38005,59505:38007,59506:38013,59507:37978,59508:38012,59509:38014,59510:38017,59511:38015,59512:38274,59513:38279,59514:38282,59515:38292,59516:38294,59517:38296,59518:38297,59520:38304,59521:38312,59522:38311,59523:38317,59524:38332,59525:38331,59526:38329,59527:38334,59528:38346,59529:28662,59530:38339,59531:38349,59532:38348,59533:38357,59534:38356,59535:38358,59536:38364,59537:38369,59538:38373,59539:38370,59540:38433,59541:38440,59542:38446,59543:38447,59544:38466,59545:38476,59546:38479,59547:38475,59548:38519,59549:38492,59550:38494,59551:38493,59552:38495,59553:38502,59554:38514,59555:38508,59556:38541,59557:38552,59558:38549,59559:38551,59560:38570,59561:38567,59562:38577,59563:38578,59564:38576,59565:38580,59566:38582,59567:38584,59568:38585,59569:38606,59570:38603,59571:38601,59572:38605,59573:35149,59574:38620,59575:38669,59576:38613,59577:38649,59578:38660,59579:38662,59580:38664,59581:38675,59582:38670,59583:38673,59584:38671,59585:38678,59586:38681,59587:38692,59588:38698,59589:38704,59590:38713,59591:38717,59592:38718,59593:38724,59594:38726,59595:38728,59596:38722,59597:38729,59598:38748,59599:38752,59600:38756,59601:38758,59602:38760,59603:21202,59604:38763,59605:38769,59606:38777,59607:38789,59608:38780,59609:38785,59610:38778,59611:38790,59612:38795,59613:38799,59614:38800,59615:38812,59616:38824,59617:38822,59618:38819,59619:38835,59620:38836,59621:38851,59622:38854,59623:38856,59624:38859,59625:38876,59626:38893,59627:40783,59628:38898,59629:31455,59630:38902,59631:38901,59632:38927,59633:38924,59634:38968,59635:38948,59636:38945,59637:38967,59638:38973,59639:38982,59640:38991,59641:38987,59642:39019,59643:39023,59644:39024,59712:39025,59713:39028,59714:39027,59715:39082,59716:39087,59717:39089,59718:39094,59719:39108,59720:39107,59721:39110,59722:39145,59723:39147,59724:39171,59725:39177,59726:39186,59727:39188,59728:39192,59729:39201,59730:39197,59731:39198,59732:39204,59733:39200,59734:39212,59735:39214,59736:39229,59737:39230,59738:39234,59739:39241,59740:39237,59741:39248,59742:39243,59743:39249,59744:39250,59745:39244,59746:39253,59747:39319,59748:39320,59749:39333,59750:39341,59751:39342,59752:39356,59753:39391,59754:39387,59755:39389,59756:39384,59757:39377,59758:39405,59759:39406,59760:39409,59761:39410,59762:39419,59763:39416,59764:39425,59765:39439,59766:39429,59767:39394,59768:39449,59769:39467,59770:39479,59771:39493,59772:39490,59773:39488,59774:39491,59776:39486,59777:39509,59778:39501,59779:39515,59780:39511,59781:39519,59782:39522,59783:39525,59784:39524,59785:39529,59786:39531,59787:39530,59788:39597,59789:39600,59790:39612,59791:39616,59792:39631,59793:39633,59794:39635,59795:39636,59796:39646,59797:39647,59798:39650,59799:39651,59800:39654,59801:39663,59802:39659,59803:39662,59804:39668,59805:39665,59806:39671,59807:39675,59808:39686,59809:39704,59810:39706,59811:39711,59812:39714,59813:39715,59814:39717,59815:39719,59816:39720,59817:39721,59818:39722,59819:39726,59820:39727,59821:39730,59822:39748,59823:39747,59824:39759,59825:39757,59826:39758,59827:39761,59828:39768,59829:39796,59830:39827,59831:39811,59832:39825,59833:39830,59834:39831,59835:39839,59836:39840,59837:39848,59838:39860,59839:39872,59840:39882,59841:39865,59842:39878,59843:39887,59844:39889,59845:39890,59846:39907,59847:39906,59848:39908,59849:39892,59850:39905,59851:39994,59852:39922,59853:39921,59854:39920,59855:39957,59856:39956,59857:39945,59858:39955,59859:39948,59860:39942,598
28461:39944,59862:39954,59863:39946,59864:39940,59865:39982,59866:39963,59867:39973,59868:39972,59869:39969,59870:39984,59871:40007,59872:39986,59873:40006,59874:39998,59875:40026,59876:40032,59877:40039,59878:40054,59879:40056,59880:40167,59881:40172,59882:40176,59883:40201,59884:40200,59885:40171,59886:40195,59887:40198,59888:40234,59889:40230,59890:40367,59891:40227,59892:40223,59893:40260,59894:40213,59895:40210,59896:40257,59897:40255,59898:40254,59899:40262,59900:40264,59968:40285,59969:40286,59970:40292,59971:40273,59972:40272,59973:40281,59974:40306,59975:40329,59976:40327,59977:40363,59978:40303,59979:40314,59980:40346,59981:40356,59982:40361,59983:40370,59984:40388,59985:40385,59986:40379,59987:40376,59988:40378,59989:40390,59990:40399,59991:40386,59992:40409,59993:40403,59994:40440,59995:40422,59996:40429,59997:40431,59998:40445,59999:40474,6e4:40475,60001:40478,60002:40565,60003:40569,60004:40573,60005:40577,60006:40584,60007:40587,60008:40588,60009:40594,60010:40597,60011:40593,60012:40605,60013:40613,60014:40617,60015:40632,60016:40618,60017:40621,60018:38753,60019:40652,60020:40654,60021:40655,60022:40656,60023:40660,60024:40668,60025:40670,60026:40669,60027:40672,60028:40677,60029:40680,60030:40687,60032:40692,60033:40694,60034:40695,60035:40697,60036:40699,60037:40700,60038:40701,60039:40711,60040:40712,60041:30391,60042:40725,60043:40737,60044:40748,60045:40766,60046:40778,60047:40786,60048:40788,60049:40803,60050:40799,60051:40800,60052:40801,60053:40806,60054:40807,60055:40812,60056:40810,60057:40823,60058:40818,60059:40822,60060:40853,60061:40860,60062:40864,60063:22575,60064:27079,60065:36953,60066:29796,60067:20956,60068:29081}},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(1),o=i(2);function l(x,m,p,y){var v;m.degree()<p.degree()&&(v=[p,m],m=v[0],p=v[1]);for(var b=m,E=p,N=x.zero,j=x.one;E.degree()>=y/2;){var A=b,w=N;if(b=E,N=j,b.isZero())return null;E=A;for(var S=x.zero,B=b.getCoefficient(b.degree()),D=x.inverse(B);E.degree()>=b.degree()&&!E.isZero();){var P=E.degree()-b.degree(),O=x.multiply(E.getCoefficient(E.degree()),D);S=S.addOrSubtract(x.buildMonomial(P,O)),E=E.addOrSubtract(b.multiplyByMonomial(P,O))}if(j=S.multiplyPoly(N).addOrSubtract(w),E.degree()>=b.degree())return null}var M=j.getCoefficient(0);if(M===0)return null;var I=x.inverse(M);return[j.multiply(I),E.multiply(I)]}function c(x,m){var p=m.degree();if(p===1)return[m.getCoefficient(1)];for(var y=new Array(p),v=0,b=1;b<x.size&&v<p;b++)m.evaluateAt(b)===0&&(y[v]=x.inverse(b),v++);return v!==p?null:y}function u(x,m,p){for(var y=p.length,v=new Array(y),b=0;b<y;b++){for(var E=x.inverse(p[b]),N=1,j=0;j<y;j++)b!==j&&(N=x.multiply(N,a.addOrSubtractGF(1,x.multiply(p[j],E))));v[b]=x.multiply(m.evaluateAt(E),x.inverse(N)),x.generatorBase!==0&&(v[b]=x.multiply(v[b],E))}return v}function f(x,m){var p=new Uint8ClampedArray(x.length);p.set(x);for(var y=new a.default(285,256,0),v=new o.default(y,p),b=new Uint8ClampedArray(m),E=!1,N=0;N<m;N++){var j=v.evaluateAt(y.exp(N+y.generatorBase));b[b.length-1-N]=j,j!==0&&(E=!0)}if(!E)return p;var A=new o.default(y,b),w=l(y,y.buildMonomial(m,1),A,m);if(w===null)return null;var S=c(y,w[0]);if(S==null)return null;for(var B=u(y,w[1],S),D=0;D<S.length;D++){var P=p.length-1-y.log(S[D]);if(P<0)return null;p[P]=a.addOrSubtractGF(p[P],B[D])}return p}n.decode=f},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.VERSIONS=[{infoBits:null,versionNumber:1,alignmentPatternCenters:[],errorCorrectionLevels:[{ecCodewordsPerBlock:7,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:10,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:16}]},{ecCodewordsPerBlock:13,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:13}]},{ecCodewordsPerBlock:17,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:9}]}]},{infoBits:null,versionNumber:2,alignmentPatternCenters:[6,18],errorCorrectionLevels:[{ecCodewordsPerBlock:10,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:34}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:28}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:22}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:16}]}]},{infoBits:null,versionNumber:3,alignmentPatternCenters:[6,22],errorCorrectionLevels:[{ecCodewordsPerBlock:15,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:55}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:13}]}]},{infoBits:null,versionNumber:4,alignmentPatternCenters:[6,26],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:80}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:32}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:9}]}]},{infoBits:null,versionNumber:5,alignmentPatternCenters:[6,30],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:43}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:15},{numBlocks:2,dataCodewordsPerBlock:16}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:11}
vendor: 16,189 bytes, line 284
284,{numBlocks:2,dataCodewordsPerBlock:12}]}]},{infoBits:null,versionNumber:6,alignmentPatternCenters:[6,34],errorCorrectionLevels:[{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:68}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:27}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:15}]}]},{infoBits:31892,versionNumber:7,alignmentPatternCenters:[6,22,38],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:78}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:31}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:14},{numBlocks:4,dataCodewordsPerBlock:15}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:13},{numBlocks:1,dataCodewordsPerBlock:14}]}]},{infoBits:34236,versionNumber:8,alignmentPatternCenters:[6,24,42],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:97}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:38},{numBlocks:2,dataCodewordsPerBlock:39}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:18},{numBlocks:2,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:14},{numBlocks:2,dataCodewordsPerBlock:15}]}]},{infoBits:39577,versionNumber:9,alignmentPatternCenters:[6,26,46],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:36},{numBlocks:2,dataCodewordsPerBlock:37}]},{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:16},{numBlocks:4,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:12},{numBlocks:4,dataCodewordsPerBlock:13}]}]},{infoBits:42195,versionNumber:10,alignmentPatternCenters:[6,28,50],errorCorrectionLevels:[{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:68},{numBlocks:2,dataCodewordsPerBlock:69}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:43},{numBlocks:1,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:19},{numBlocks:2,dataCodewordsPerBlock:20}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:15},{numBlocks:2,dataCodewordsPerBlock:16}]}]},{infoBits:48118,versionNumber:11,alignmentPatternCenters:[6,30,54],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:81}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:50},{numBlocks:4,dataCodewordsPerBlock:51}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:22},{numBlocks:4,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:12},{numBlocks:8,dataCodewordsPerBlock:13}]}]},{infoBits:51042,versionNumber:12,alignmentPatternCenters:[6,32,58],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:92},{numBlocks:2,dataCodewordsPerBlock:93}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:36},{numBlocks:2,dataCodewordsPerBlock:37}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:20},{numBlocks:6,dataCodewordsPerBlock:21}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:14},{numBlocks:4,dataCodewordsPerBlock:15}]}]},{infoBits:55367,versionNumber:13,alignmentPatternCenters:[6,34,62],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:107}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:37},{numBlocks:1,dataCodewordsPerBlock:38}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:20},{numBlocks:4,dataCodewordsPerBlock:21}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:11},{numBlocks:4,dataCodewordsPerBlock:12}]}]},{infoBits:58893,versionNumber:14,alignmentPatternCenters:[6,26,46,66],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:115},{numBlocks:1,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:40},{numBlocks:5,dataCodewordsPerBlock:41}]},{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:16},{numBlocks:5,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:12},{numBlocks:5,dataCodewordsPerBlock:13}]}]},{infoBits:63784,versionNumber:15,alignmentPatternCenters:[6,26,48,70],errorCorrectionLevels:[{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:87},{numBlocks:1,dataCodewordsPerBlock:88}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:41},{numBlocks:5,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:24},{numBlocks:7,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:12},{numBlocks:7,dataCodewordsPerBlock:13}]}]},{infoBits:68472,versionNumber:16,alignmentPatternCenters:[6,26,50,74],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:98},{numBlocks:1,dataCodewordsPerBlock:99}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:45},{numBlocks:3,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:19},{numBlocks:2,dataCodewordsPerBlock:20}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:15},{numBlocks:13,dataCodewordsPerBlock:16}]}]},{infoBits:70749,versionNumber:17,alignmentPatternCenters:[6,30,54,78],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:107},{numBlocks:5,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:46},{numBlocks:1,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:22},{numBlocks:15,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:14},{numBlocks:17,dataCodewordsPerBlock:15}]}]},{infoBits:76311,versionNumber:18,alignmentPatternCenters:[6,30,56,82],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:120},{numBlocks:1,dataCodewordsPerBlock:121}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:9,dataCodewordsPerBlock:43},{numBlocks:4,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:22},{numBlocks:1,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:14},{numBlocks:19,dataCodewordsPerBlock:15}]}]},{infoBits:79154,versionNumber:19,alignmentPatternCenters:[6,30,58,86],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:113},{numBlocks:4,dataCodewordsPerBlock:114}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:44},{numBlocks:11,dataCodewordsPerBlock:45}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:21},{numBlocks:4,dataCodewordsPerBlock:22}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:9,dataCodewordsPerBlock:13},{numBlocks:16,dataCodewordsPerBlock:14}]}]},{infoBits:84390,versionNumber:20,alignmentPatternCenters:[6,34,62,90],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:107},{numBlocks:5,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:41},{numBlocks:13,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:24},{numBlocks:5,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:15},{numBlocks:10,dataCodewordsPerBlock:16}]}]},{infoBits:87683,versionNumber:21,alignmentPatternCenters:[6,28,50,72,94],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:116},{numBlocks:4,dataCodewordsPerBlock:117}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:22},{numBlocks:6,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:16},{numBlocks:6,dataCodewordsPerBlock:17}]}]},{infoBits:92361,versionNumber:22,alignmentPatternCenters:[6,26,50,74,98],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:111},{numBlocks:7,dataCodewordsPerBlock:112}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:24},{numBlocks:16,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:34,dataCodewordsPerBlock:13}]}]},{infoBits:96236,versionNumber:23,alignmentPatternCenters:[6,30,54,74,102],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:121},{numBlocks:5,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:47},{numBlocks:14,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:24},{numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:16,dataCodewordsPerBlock:15},{numBlocks:14,dataCodewordsPerBlock:16}]}]},{infoBits:102084,versionNumber:24,alignmentPatternCenters:[6,28,54,80,106],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:117},{numBlocks:4,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:45},{numBlocks:14,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:24},{numBlocks:16,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:30,dataCodewordsPerBlock:16},{numBlocks:2,dataCodewordsPerBlock:17}]}]},{infoBits:102881,versionNumber:25,alignmentPatternCenters:[6,32,58,84,110],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:106},{numBlocks:4,dataCodewordsPerBlock:107}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:47},{numBlocks:13,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:24},{numBlocks:22,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:15},{numBlocks:13,dataCodewordsPerBlock:16}]}]},{infoBits:110507,versionNumber:26,alignmentPatternCenters:[6,30,58,86,114],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:114},{numBlocks:2,dataCodewordsPerBlock:115}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:46},{numBlocks:4,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:28,dataCodewordsPerBlock:22},{numBlocks:6,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:33,dataCodewordsPerBlock:16},{numBlocks:4,dataCodewordsPerBlock:17}]}]},{infoBits:110734,versionNumber:27,alignmentPatternCenters:[6,34,62,90,118],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:122},{numBlocks:4,dataCodewordsPerBlock:123}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:45},{numBlocks:3,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:23},{numBlocks:26,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:15},{numBlocks:28,dataCodewordsPerBlock:16}]}]},{infoBits:117786,versionNumber:28,alignmentPatternCenters:[6,26,50,74,98,122],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:117},{numBlocks:10,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:45},{numBlocks:23,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:24},{numBlocks:31,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:15},{numBlocks:31,dataCodewordsPerBlock:16}]}]},{infoBits:119615,versionNumber:29,alignmentPatternCenters:[6,30,54,78,102,126],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:116},{numBlocks:7,dataCodewordsPerBlock:117}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:21,dataCodewordsPerBlock:45},{numBlocks:7,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:23},{numBlocks:37,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:15},{numBlocks:26,dataCodewordsPerBlock:16}]}]},{infoBits:126325,versionNumber:30,alignmentPatternCenters:[6,26,52,78,104,130],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:115},{numBlocks:10,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:47},{numBlocks:10,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:24},{numBlocks:25,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:23,dataCodewordsPerBlock:15},{numBlocks:25,dataCodewordsPerBlock:16}]}]},{infoBits:127568,versionNumber:31,alignmentPatternCenters:[6,30,56,82,108,134],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:115},{numBlocks:3,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:46},{numBlocks:29,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:42,dataCodewordsPerBlock:24},{numBlocks:1,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:23,dataCodewordsPerBlock:15},{numBlocks:28,dataCodewordsPerBlock:16}]}]},{infoBits:133589,versionNumber:32,alignmentPatternCenters:[6,34,60,86,112,138],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:115}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:46},{numBlocks:23,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:24},{numBlocks:35,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:15},{numBlocks:35,dataCodewordsPerBlock:16}]}]},{infoBits:136944,versionNumber:33,alignmentPatternCenters:[6,30,58,86,114,142],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:115},{numBlocks:1,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:14,dataCodewordsPerBlock:46},{numBlocks:21,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:29,dataCodewordsPerBlock:24},{numBlocks:19,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:15},{numBlocks:46,dataCodewordsPerBlock:16}]}]},{infoBits:141498,versionNumber:34,alignmentPatternCenters:[6,34,62,90,118,146],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:115},{numBlocks:6,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:14,dataCodewordsPerBlock:46},{numBlocks:23,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:44,dataCodewordsPerBlock:24},{numBlocks:7,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:59,dataCodewordsPerBlock:16},{numBlocks:1,dataCodewordsPerBlock:17}]}]},{infoBits:145311,versionNumber:35,alignmentPatternCenters:[6,30,54,78,102,126,150],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:121},{numBlocks:7,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:47},{numBlocks:26,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:39,dataCodewordsPerBlock:24},{numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:15}
284,{numBlocks:41,dataCodewordsPerBlock:16}]}]},{infoBits:150283,versionNumber:36,alignmentPatternCenters:[6,24,50,76,102,128,154],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:121},{numBlocks:14,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:47},{numBlocks:34,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:46,dataCodewordsPerBlock:24},{numBlocks:10,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:15},{numBlocks:64,dataCodewordsPerBlock:16}]}]},{infoBits:152622,versionNumber:37,alignmentPatternCenters:[6,28,54,80,106,132,158],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:122},{numBlocks:4,dataCodewordsPerBlock:123}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:29,dataCodewordsPerBlock:46},{numBlocks:14,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:49,dataCodewordsPerBlock:24},{numBlocks:10,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:24,dataCodewordsPerBlock:15},{numBlocks:46,dataCodewordsPerBlock:16}]}]},{infoBits:158308,versionNumber:38,alignmentPatternCenters:[6,32,58,84,110,136,162],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:122},{numBlocks:18,dataCodewordsPerBlock:123}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:46},{numBlocks:32,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:48,dataCodewordsPerBlock:24},{numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:42,dataCodewordsPerBlock:15},{numBlocks:32,dataCodewordsPerBlock:16}]}]},{infoBits:161089,versionNumber:39,alignmentPatternCenters:[6,26,54,82,110,138,166],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:20,dataCodewordsPerBlock:117},{numBlocks:4,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:40,dataCodewordsPerBlock:47},{numBlocks:7,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:43,dataCodewordsPerBlock:24},{numBlocks:22,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:15},{numBlocks:67,dataCodewordsPerBlock:16}]}]},{infoBits:167017,versionNumber:40,alignmentPatternCenters:[6,30,58,86,114,142,170],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:118},{numBlocks:6,dataCodewordsPerBlock:119}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:18,dataCodewordsPerBlock:47},{numBlocks:31,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:34,dataCodewordsPerBlock:24},{numBlocks:34,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:20,dataCodewordsPerBlock:15},{numBlocks:61,dataCodewordsPerBlock:16}]}]}]},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(0);function o(f,x,m,p){var y=f.x-x.x+m.x-p.x,v=f.y-x.y+m.y-p.y;if(y===0&&v===0)return{a11:x.x-f.x,a12:x.y-f.y,a13:0,a21:m.x-x.x,a22:m.y-x.y,a23:0,a31:f.x,a32:f.y,a33:1};var b=x.x-m.x,E=p.x-m.x,N=x.y-m.y,j=p.y-m.y,A=b*j-E*N,w=(y*j-E*v)/A,S=(b*v-y*N)/A;return{a11:x.x-f.x+w*x.x,a12:x.y-f.y+w*x.y,a13:w,a21:p.x-f.x+S*p.x,a22:p.y-f.y+S*p.y,a23:S,a31:f.x,a32:f.y,a33:1}}function l(f,x,m,p){var y=o(f,x,m,p);return{a11:y.a22*y.a33-y.a23*y.a32,a12:y.a13*y.a32-y.a12*y.a33,a13:y.a12*y.a23-y.a13*y.a22,a21:y.a23*y.a31-y.a21*y.a33,a22:y.a11*y.a33-y.a13*y.a31,a23:y.a13*y.a21-y.a11*y.a23,a31:y.a21*y.a32-y.a22*y.a31,a32:y.a12*y.a31-y.a11*y.a32,a33:y.a11*y.a22-y.a12*y.a21}}function c(f,x){return{a11:f.a11*x.a11+f.a21*x.a12+f.a31*x.a13,a12:f.a12*x.a11+f.a22*x.a12+f.a32*x.a13,a13:f.a13*x.a11+f.a23*x.a12+f.a33*x.a13,a21:f.a11*x.a21+f.a21*x.a22+f.a31*x.a23,a22:f.a12*x.a21+f.a22*x.a22+f.a32*x.a23,a23:f.a13*x.a21+f.a23*x.a22+f.a33*x.a23,a31:f.a11*x.a31+f.a21*x.a32+f.a31*x.a33,a32:f.a12*x.a31+f.a22*x.a32+f.a32*x.a33,a33:f.a13*x.a31+f.a23*x.a32+f.a33*x.a33}}function u(f,x){for(var m=l({x:3.5,y:3.5},{x:x.dimension-3.5,y:3.5},{x:x.dimension-6.5,y:x.dimension-6.5},{x:3.5,y:x.dimension-3.5}),p=o(x.topLeft,x.topRight,x.alignmentPattern,x.bottomLeft),y=c(p,m),v=a.BitMatrix.createEmpty(x.dimension,x.dimension),b=function(S,B){var D=y.a13*S+y.a23*B+y.a33;return{x:(y.a11*S+y.a21*B+y.a31)/D,y:(y.a12*S+y.a22*B+y.a32)/D}},E=0;E<x.dimension;E++)for(var N=0;N<x.dimension;N++){var j=N+.5,A=E+.5,w=b(j,A);v.set(N,E,f.get(Math.floor(w.x),Math.floor(w.y)))}return{matrix:v,mappingFunction:b}}n.extract=u},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=4,o=.5,l=1.5,c=function(j,A){return Math.sqrt(Math.pow(A.x-j.x,2)+Math.pow(A.y-j.y,2))};function u(j){return j.reduce(function(A,w){return A+w})}function f(j,A,w){var S,B,D,P,O=c(j,A),M=c(A,w),I=c(j,w),V,W,_;return M>=O&&M>
284=I?(S=[A,j,w],V=S[0],W=S[1],_=S[2]):I>=M&&I>=O?(B=[j,A,w],V=B[0],W=B[1],_=B[2]):(D=[j,w,A],V=D[0],W=D[1],_=D[2]),(_.x-W.x)*(V.y-W.y)-(_.y-W.y)*(V.x-W.x)<0&&(P=[_,V],V=P[0],_=P[1]),{bottomLeft:V,topLeft:W,topRight:_}}function x(j,A,w,S){var B=(u(p(j,w,S,5))/7+u(p(j,A,S,5))/7+u(p(w,j,S,5))/7+u(p(A,j,S,5))/7)/4;if(B<1)throw new Error("Invalid module size");var D=Math.round(c(j,A)/B),P=Math.round(c(j,w)/B),O=Math.floor((D+P)/2)+7;switch(O%4){case 0:O++;break;case 2:O--;break}return{dimension:O,moduleSize:B}}function m(j,A,w,S){var B=[{x:Math.floor(j.x),y:Math.floor(j.y)}],D=Math.abs(A.y-j.y)>Math.abs(A.x-j.x),P,O,M,I;D?(P=Math.floor(j.y),O=Math.floor(j.x),M=Math.floor(A.y),I=Math.floor(A.x)):(P=Math.floor(j.x),O=Math.floor(j.y),M=Math.floor(A.x),I=Math.floor(A.y));for(var V=Math.abs(M-P),W=Math.abs(I-O),_=Math.floor(-V/2),z=P<M?1:-1,R=O<I?1:-1,q=!0,G=P,K=O;G!==M+z;G+=z){var $=D?K:G,H=D?G:K;if(w.get($,H)!==q&&(q=!q,B.push({x:$,y:H}),B.length===S+1))break;if(_+=W,_>0){if(K===I)break;K+=R,_-=V}}for(var te=[],ne=0;ne<S;ne++)B[ne]&&B[ne+1]?te.push(c(B[ne],B[ne+1])):te.push(0);return te}function p(j,A,w,S){var B,D=A.y-j.y,P=A.x-j.x,O=m(j,A,w,Math.ceil(S/2)),M=m(j,{x:j.x-P,y:j.y-D},w,Math.ceil(S/2)),I=O.shift()+M.shift()-1;return(B=M.concat(I)).concat.apply(B,O)}function y(j,A){var w=u(j)/u(A),S=0;return A.forEach(function(B,D){S+=Math.pow(j[D]-B*w,2)}),{averageSize:w,error:S}}function v(j,A,w){try{var S=p(j,{x:-1,y:j.y},w,A.length),B=p(j,{x:j.x,y:-1},w,A.length),D={x:Math.max(0,j.x-j.y)-1,y:Math.max(0,j.y-j.x)-1},P=p(j,D,w,A.length),O={x:Math.min(w.width,j.x+j.y)+1,y:Math.min(w.height,j.y+j.x)+1},M=p(j,O,w,A.length),I=y(S,A),V=y(B,A),W=y(P,A),_=y(M,A),z=Math.sqrt(I.error*I.error+V.error*V.error+W.error*W.error+_.error*_.error),R=(I.averageSize+V.averageSize+W.averageSize+_.averageSize)/4,q=(Math.pow(I.averageSize-R,2)+Math.pow(V.averageSize-R,2)+Math.pow(W.averageSize-R,2)+Math.pow(_.averageSize-R,2))/R;return z+q}catch{return 1/0}}function b(j,A){for(var w=Math.round(A.x);j.get(w,Math.round(A.y));)w--;for(var S=Math.round(A.x);j.get(S,Math.round(A.y));)S++;for(var B=(w+S)/2,D=Math.round(A.y);j.get(Math.round(B),D);)D--;for(var P=Math.round(A.y);j.get(Math.round(B),P);)P++;var O=(D+P)/2;return{x:B,y:O}}function E(j){for(var A=[],w=[],S=[],B=[],D=function($){for(var H=0,te=!1,ne=[0,0,0,0,0],Y=function(oe){var he=j.get(oe,$);if(he===te)H++;else{ne=[ne[1],ne[2],ne[3],ne[4],H],H=1,te=he;var Q=u(ne)/7,ue=Math.abs(ne[0]-Q)<Q&&Math.abs(ne[1]-Q)<Q&&Math.abs(ne[2]-3*Q)<3*Q&&Math.abs(ne[3]-Q)<Q&&Math.abs(ne[4]-Q)<Q&&!he,de=u(ne.slice(-3))/3,me=Math.abs(ne[2]-de)<de&&Math.abs(ne[3]-de)<de&&Math.abs(ne[4]-de)<de&&he;if(ue){var Le=oe-ne[3]-ne[4],Ne=Le-ne[2],ye={startX:Ne,endX:Le,y:$},ee=w.filter(function(we){return Ne>=we.bottom.startX&&Ne<=we.bottom.endX||Le>=we.bottom.startX&&Ne<=we.bottom.endX||Ne<=we.bottom.startX&&Le>=we.bottom.endX&&ne[2]/(we.bottom.endX-we.bottom.startX)<l&&ne[2]/(we.bottom.endX-we.bottom.startX)>o});ee.length>0?ee[0].bottom=ye:w.push({top:ye,bottom:ye})}if(me){var Ae=oe-ne[4],De=Ae-ne[3],ye={startX:De,y:$,endX:Ae},ee=B.filter(function(Te){return De>=Te.bottom.startX&&De<=Te.bottom.endX||Ae>=Te.bottom.startX&&De<=Te.bottom.endX||De<=Te.bottom.startX&&Ae>=Te.bottom.endX&&ne[2]/(Te.bottom.endX-Te.bottom.startX)<l&&ne[2]/(Te.bottom.endX-Te.bottom.startX)>o});ee.length>0?ee[0].bottom=ye:B.push({top:ye,bottom:ye})}}},J=-1;J<=j.width;J++)Y(J);A.push.apply(A,w.filter(function(oe){return oe.bottom.y!==$&&oe.bottom.y-oe.top.y>=2})),w=w.filter(function(oe){return oe.bottom.y===$}),S.push.apply(S,B.filter(function(oe){return oe.bottom.y!==$})),B=B.filter(function(oe){return oe.bottom.y===$})},P=0;P<=j.height;P++)D(P);A.push.apply(A,w.filter(function($){return $.bottom.y-$.top.y>=2})),S.push.apply(S,B);var O=A.filter(function($){return $.bottom.y-$.top.y>=2}).map(function($){var H=($.top.startX+$.top.endX+$.bottom.startX+$.bottom.endX)/4,te=($.top.y+$.bottom.y+1)/2;if(j.get(Math.round(H),Math.round(te))){var ne=[$.top.endX-$.top.startX,$.bottom.endX-$.bottom.startX,$.bottom.y-$.top.y+1],Y=u(ne)/ne.length,J=v({x:Math.round(H),y:Math.round(te)},[1,1,3,1,1],j);return{score:J,x:H,y:te,size:Y}}}).filter(function($){return!!$}).sort(function($,H){return $.score-H.score}).map(function($,H,te){if(H>a)return null;var ne=te.filter(function(J,oe){return H!==oe}).map(function(J){return{x:J.x,y:J.y,score:J.score+Math.pow(J.size-$.size,2)/$.size,size:J.size}}).sort(function(J,oe){return J.score-oe.score});if(ne.length<2)return null;
284var Y=$.score+ne[0].score+ne[1].score;return{points:[$].concat(ne.slice(0,2)),score:Y}}).filter(function($){return!!$}).sort(function($,H){return $.score-H.score});if(O.length===0)return null;var M=f(O[0].points[0],O[0].points[1],O[0].points[2]),I=M.topRight,V=M.topLeft,W=M.bottomLeft,_=N(j,S,I,V,W),z=[];_&&z.push({alignmentPattern:{x:_.alignmentPattern.x,y:_.alignmentPattern.y},bottomLeft:{x:W.x,y:W.y},dimension:_.dimension,topLeft:{x:V.x,y:V.y},topRight:{x:I.x,y:I.y}});var R=b(j,I),q=b(j,V),G=b(j,W),K=N(j,S,R,q,G);return K&&z.push({alignmentPattern:{x:K.alignmentPattern.x,y:K.alignmentPattern.y},bottomLeft:{x:G.x,y:G.y},topLeft:{x:q.x,y:q.y},topRight:{x:R.x,y:R.y},dimension:K.dimension}),z.length===0?null:z}n.locate=E;function N(j,A,w,S,B){var D,P,O;try{D=x(S,w,B,j),P=D.dimension,O=D.moduleSize}catch{return null}var M={x:w.x-S.x+B.x,y:w.y-S.y+B.y},I=(c(S,B)+c(S,w))/2/O,V=1-3/I,W={x:S.x+V*(M.x-S.x),y:S.y+V*(M.y-S.y)},_=A.map(function(R){var q=(R.top.startX+R.top.endX+R.bottom.startX+R.bottom.endX)/4,G=(R.top.y+R.bottom.y+1)/2;if(j.get(Math.floor(q),Math.floor(G))){var K=[R.top.endX-R.top.startX,R.bottom.endX-R.bottom.startX,R.bottom.y-R.top.y+1];u(K)/K.length;var $=v({x:Math.floor(q),y:Math.floor(G)},[1,1,1],j),H=$+c({x:q,y:G},W);return{x:q,y:G,score:H}}}).filter(function(R){return!!R}).sort(function(R,q){return R.score-q.score}),z=I>=15&&_.length?_[0]:W;return{alignmentPattern:z,dimension:P}}}]).default})}(gg)),gg.exports}var LAe=OAe();const RAe=lr(LAe),LR={IDLE:{title:"Caméra",tone:"muted",icon:"📷"},SCANNING:{title:"Lecture…",tone:"primary",icon:"🔍"},VALID:{title:"Entrée validée",tone:"success",icon:"✅"},ALREADY_USED:{title:"Billet déjà utilisé",tone:"accent",icon:"⚠️"},INVALID:{title:"Billet invalide",tone:"danger",icon:"⛔"},CANCELLED:{title:"Billet annulé",tone:"danger",icon:"⛔"},REFUNDED:{title:"Billet remboursé",tone:"danger",icon:"⛔"},WRONG_EVENT:{title:"Autre événement",tone:"danger",icon:"⛔"},EVENT_NOT_OPEN:{title:"Événement non ouvert",tone:"accent",icon:"⚠️"},ERROR:{title:"Erreur",tone:"danger",icon:"⛔"}},_Ae=["VALID","ALREADY_USED","INVALID","CANCELLED","REFUNDED","WRONG_EVENT","EVENT_NOT_OPEN","ERROR"];function IAe(){const{id:e}=ta(),t=lt(),r=C.useRef(null),n=C.useRef(null),i=C.useRef(null),a=C.useRef(!1),[o,l]=C.useState({outcome:"IDLE",message:"Autorisez la caméra pour commencer."}),[c,u]=C.useState(null);C.useEffect(()=>{let v=null;return(async()=>{try{v=await navigator.mediaDevices.getUserMedia({video:{facingMode:"environment"}}),r.current&&(r.current.srcObject=v,await r.current.play(),l({outcome:"SCANNING",message:"Pointez la caméra vers un QR code."}),f())}catch(b){u((b==null?void 0:b.message)||"Caméra inaccessible."),l({outcome:"ERROR",message:"Impossible d'accéder à la caméra."})}})(),()=>{i.current&&cancelAnimationFrame(i.current),v==null||v.getTracks().forEach(b=>b.stop())}},[]);const f=()=>{const v=r.current,b=n.current;if(!(!v||!b)){if(v.readyState===v.HAVE_ENOUGH_DATA&&!a.current){b.width=v.videoWidth,b.height=v.videoHeight;const E=b.getContext("2d");if(E){E.drawImage(v,0,0,b.width,b.height);const N=E.getImageData(0,0,b.width,b.height),j=RAe(N.data,N.width,N.height,{inversionAttempts:"dontInvert"});j!=null&&j.data&&(a.current=!0,x(j.data))}}i.current=requestAnimationFrame(f)}},x=async v=>{var b,E,N,j,A,w,S;l({outcome:"SCANNING",message:"Vérification en cours..."});try{const B=await X.scanTicketQr({qrToken:v,expectedEventId:e,deviceInfo:navigator.userAgent});B.apiReportedSuccess&&((b=B.body)!=null&&b.data)?l({outcome:(E=B.body)==null?void 0:E.data.outcome,message:(N=B.body)==null?void 0:N.data.message,serial:(A=(j=B.body)==null?void 0:j.data.ticket)==null?void 0:A.serial,holderName:(S=(w=B.body)==null?void 0:w.data.ticket)==null?void 0:S.holderName}):l({outcome:"ERROR",message:B.message||"Erreur"})}catch(B){l({outcome:"ERROR",message:(B==null?void 0:B.message)||"Erreur réseau"})}},m=()=>{l({outcome:"SCANNING",message:"Pointez la caméra vers un QR code."}),a.current=!1},p=LR[o.outcome]??LR.ERROR,y=_Ae.includes(o.outcome)&&!c;return s.jsxs("div",{className:"min-h-screen bg-ink",children:[s.jsxs("div",{className:"p-4 flex items-center gap-3",children:[s.jsx(Ct,{onClick:()=>t(-1)}),s.jsx("h1",{className:"text-lg font-semibold text-white",children:"Scanner de billets"})]}),s.jsxs("div",{className:"relative w-full aspect-square bg-ink overflow-hidden",children:[s.jsx("video",{ref:r,playsInl
284ine:!0,muted:!0,className:"w-full h-full object-cover"}),s.jsx("canvas",{ref:n,className:"hidden"}),s.jsx("div",{className:"absolute inset-6 border-2 border-white/60 rounded-card pointer-events-none"})]}),s.jsxs("div",{className:"p-4 space-y-3",children:[s.jsxs("div",{className:`rounded-card p-5 text-center ${Zi[p.tone]}`,children:[s.jsx("div",{className:"text-3xl","aria-hidden":!0,children:p.icon}),s.jsx("div",{className:"text-xl font-bold mt-1",children:p.title}),s.jsx("div",{className:"text-sm mt-1 opacity-90",children:o.message}),o.outcome==="VALID"&&o.holderName&&s.jsxs("div",{className:"mt-3 pt-3 border-t border-border",children:[s.jsx("div",{className:"text-lg font-semibold",children:o.holderName}),o.serial&&s.jsxs("div",{className:"text-xs mt-0.5 opacity-80",children:["Billet n° ",o.serial]})]}),o.outcome!=="VALID"&&o.serial&&s.jsxs("div",{className:"text-xs mt-2 opacity-80",children:["Billet n° ",o.serial,o.holderName?` · ${o.holderName}`:""]})]}),y&&s.jsx("button",{onClick:m,className:"w-full bg-primary hover:bg-primary-hover text-white text-lg font-bold py-5 rounded-card transition-colors",children:"Scanner le billet suivant"}),c&&s.jsx("div",{className:"text-sm text-white/80",children:c})]})]})}const $Ae=120;function zAe(){const{id:e}=ta(),t=lt(),[r,n]=C.useState(!0),[i,a]=C.useState(null),[o,l]=C.useState(!1),[c,u]=C.useState(null),[f,x]=C.useState(null),[m,p]=C.useState(null),[y,v]=C.useState("");C.useEffect(()=>{e&&(async()=>{var B,D;try{const P=await X.getMyTicket(e);P.apiReportedSuccess&&((B=P.body)!=null&&B.data)?(u(P.body.data.ticket),x(P.body.data.ticketType),p(P.body.data.event),v(String(((D=P.body.data.ticketType)==null?void 0:D.price)??""))):a(P.message||"Billet introuvable.")}catch(P){a((P==null?void 0:P.message)||"Erreur réseau.")}finally{n(!1)}})()},[e]);const b=f==null?void 0:f.price,E=(m==null?void 0:m.maxResalePricePct)??$Ae,N=C.useMemo(()=>typeof b=="number"?Math.round(b*E/100):null,[b,E]),j=parseInt(y,10),A=Number.isFinite(j)&&j>=1,w=A&&N!==null&&j>N,S=async()=>{if(e){if(!A){a("Indiquez un prix valide.");return}if(w){a(`Le prix ne peut pas dépasser ${tr(N)} pour ce billet.`);return}l(!0),a(null);try{const B=await X.createResaleListing(e,j);B.apiReportedSuccess?t(`/events/mes-billets/${e}`,{replace:!0}):a(B.message||"Impossible de créer l'annonce.")}catch(B){a((B==null?void 0:B.message)||"Erreur réseau.")}finally{l(!1)}}};return r?s.jsxs("div",{className:"min-h-screen bg-bg px-4 pt-3 flex flex-col gap-3",children:[s.jsx($e,{height:"h-10",rounded:"rounded-card"}),s.jsx($e,{height:"h-28",rounded:"rounded-card"}),s.jsx($e,{height:"h-36",rounded:"rounded-card"})]}):i&&!c?s.jsx("div",{className:"min-h-screen bg-bg px-4 pt-10",children:s.jsx("p",{className:"bg-surface border border-border rounded-card p-6 text-center text-sm font-semibold text-danger",children:i})}):s.jsxs("div",{className:"min-h-screen bg-bg",children:[s.jsxs("div",{className:"px-4 pt-3 pb-2 flex items-center gap-3",children:[s.jsx(Ct,{onClick:()=>t(-1)}),s.jsx("h1",{className:"text-xl font-bold text-ink",children:"Revendre mon billet"})]}),s.jsxs("div",{className:"px-4 pb-8 flex flex-col gap-4",children:[s.jsxs("section",{className:"bg-surface border border-border rounded-card p-4",children:[s.jsx("p",{className:"text-xs text-ink-2",children:"Billet"}),s.jsx("p",{className:"font-semibold text-ink",children:c==null?void 0:c.serial}),s.jsx("p",{className:"text-sm text-ink-2 mt-0.5",children:m==null?void 0:m.title}),s.jsxs("p",{className:"text-xs text-ink-2 mt-1",children:[f==null?void 0:f.name," · prix d'origine ",s.jsx("span",{className:"font-medium text-ink",children:tr(b)})]})]}),s.jsxs("label",{className:"block",children:[s.jsx("span",{className:"text-sm font-medium text-ink",children:"Votre prix de revente"}),s.jsxs("span",{className:"relative mt-2 block",children:[s.jsx("input",{type:"number",inputMode:"numeric",min:1,max:N??void 0,value:y,onChange:B=>{v(B.target.value),a(null)},"aria-invalid":w,className:mt("w-full rounded-card border bg-surface px-3 py-3 pr-14 text-lg font-semibold text-ink focus:outline-none",w?"border-danger":"border-border focus:border-primary")}),s.jsx("span",{className:"pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 text-sm text-ink-3",children:"XAF"})]})]}),N!==null&&s.jsx("div",{className:mt("rounded-card p-3 text-xs",w?"bg-danger-soft text-danger":"bg-surface-2 text-ink-2"),children:w?s.jsxs(s.Fragment,{children:["Prix trop élevé : le maximum autorisé est ",s.jsx("strong",{className:"font-semibold",children:tr(N)})," (",E," % du prix d'origine)."]}):s.jsxs(s.Fragment,{children:["Prix maximum autorisé pour ce billet : ",s.jsx("strong",{className:"font-semibold text-ink",children:tr(N)})," (",E," % du prix d'origine)."]})}),s.jsxs("div",{className:"bg-primary-soft rounded-card p-3 text-xs text-ink-2",children:[s.jsx("p",{className:"font-semibold text-ink",children:"Comment ça marche"}),s.jsxs("ul",{className:"mt-1 flex flex-col gap-1",children:[s.jsx("li",{children:"· Une commission SBC est prélevée sur le prix de revente."}),s.jsx("li",{children:"· Une fois vendu, votre billet est invalidé et un nouveau QR est délivré à l'acheteur."}),s.jsx("li",{children:"· Le montant net est crédité sur votre solde organisateur SBC."}),s.jsx("li",{children:"· Vous pouvez retirer l'annonce tant que le billet n'a pas été acheté."})]})]}),i&&s.jsx("p",{className:"bg-danger-soft rounded-card p-3 text-sm text-danger",children:i}),s.jsx("button",{onClick:S,disabled:o||!A||w,className:"w-full rounded-xl bg-primary py-3 text-sm font-semibold text-white hover:bg-primary-hover transition-colors disabled:opacity-60 disabled:cursor-not-allowed",children:o?"Publication…":"Mettre en revente"})]})]})}const VAe=e=>
284e?X.generateThumbnailUrl(e,512):"",UAe=e=>new Date(e).toLocaleString("fr-FR",{dateStyle:"medium",timeStyle:"short"});function qAe(){const e=lt(),t=Cr(),{user:r}=Gt(),n=t.state??{},[i,a]=C.useState(n.eventId),[o,l]=C.useState([]),[c,u]=C.useState(!0),[f,x]=C.useState(null),[m,p]=C.useState(null);C.useEffect(()=>{u(!0),(async()=>{var v,b;try{const E=await X.listPublicResale({eventId:i,limit:30});E.apiReportedSuccess?l(((b=(v=E.body)==null?void 0:v.data)==null?void 0:b.items)||[]):x(E.message||"Impossible de charger la marketplace.")}catch(E){x((E==null?void 0:E.message)||"Erreur réseau.")}finally{u(!1)}})()},[i]);const y=async v=>{var b,E,N,j,A,w,S;if(!r){x("Connectez-vous pour acheter un billet.");return}p(v._id),x(null);try{const B=await X.buyResaleListing(v._id,{firstName:((b=r.name)==null?void 0:b.split(" ")[0])||"Client",lastName:((E=r.name)==null?void 0:E.split(" ").slice(1).join(" "))||"SBC",phone:r.phoneNumber||"",email:r.email}),D=(j=(N=B.body)==null?void 0:N.data)==null?void 0:j.paymentSessionId,P=(w=(A=B.body)==null?void 0:A.data)==null?void 0:w.orderId;if(!B.apiReportedSuccess||!D){x(B.message||"Impossible de démarrer le paiement."),p(null);return}window.open(X.generatePaymentUrl(D),"_blank","noopener,noreferrer"),P?e(`/events/commande/${P}`,{state:{eventTitle:(S=v.event)==null?void 0:S.title}}):e("/events/mes-billets")}catch(B){x((B==null?void 0:B.message)||"Erreur réseau."),p(null)}};return s.jsxs("div",{className:"min-h-screen bg-bg",children:[s.jsxs("div",{className:"px-4 pt-3 pb-2 flex items-center gap-3",children:[s.jsx(Ct,{onClick:()=>e(-1)}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("h1",{className:"text-xl font-bold text-ink",children:"Billets en revente"}),s.jsx("p",{className:"text-xs text-ink-2",children:"Revendus par des membres, sécurisés par SBC"})]})]}),s.jsxs("div",{className:"px-4 pb-8 flex flex-col gap-3",children:[i&&s.jsxs("button",{onClick:()=>a(void 0),className:"self-start inline-flex items-center gap-1.5 rounded-pill bg-primary-soft px-3 py-1.5 text-xs font-semibold text-primary",children:[n.eventTitle||"Événement filtré",s.jsx(L,{icon:gt,size:13})]}),f&&s.jsx("p",{className:"bg-danger-soft rounded-card p-3 text-sm text-danger",children:f}),c?s.jsx("div",{className:"flex flex-col gap-3",children:Array.from({length:2}).map((v,b)=>s.jsx($e,{height:"h-56",rounded:"rounded-card"},b))}):o.length===0?s.jsxs("div",{className:"bg-surface border border-border rounded-card p-6 text-center flex flex-col items-center gap-2",children:[s.jsx(L,{icon:$c,size:30,className:"text-ink-3"}),s.jsx("p",{className:"text-sm font-semibold text-ink",children:"Aucun billet en revente"}),s.jsx("p",{className:"text-xs text-ink-2",children:"Les billets remis en vente par des membres apparaîtront ici."})]}):s.jsx("ul",{className:"flex flex-col gap-3",children:o.map(v=>{var E,N,j,A,w,S;const b=v.originalPrice>v.askingPrice;return s.jsxs("li",{className:"bg-surface border border-border rounded-card overflow-hidden",children:[((E=v.event)==null?void 0:E.posterFileId)&&s.jsx("img",{src:VAe(v.event.posterFileId),alt:"","aria-hidden":!0,loading:"lazy",className:"w-full h-40 object-cover"}),s.jsxs("div",{className:"p-4",children:[s.jsxs("span",{className:"inline-flex items-center gap-1 rounded-pill bg-accent-soft px-2 py-0.5 text-[10px] font-semibold text-ink",children:[s.jsx(L,{icon:$c,size:11,className:"text-accent"}),"Revente"]}),s.jsx("p",{className:"font-semibold text-ink mt-1.5",children:((N=v.event)==null?void 0:N.title)||"—"}),s.jsx("p",{className:"text-xs text-ink-2 mt-0.5",children:((j=v.event)==null?void 0:j.startsAt)&&UAe(v.event.startsAt)}),s.jsxs("p",{className:"text-xs text-ink-2",children:[(A=v.event)==null?void 0:A.venue," · ",(w=v.event)==null?void 0:w.city]}),s.jsx("p",{className:"text-xs text-ink-2 mt-2",children:((S=v.ticketType)==null?void 0:S.name)||"Billet"}),s.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[s.jsx("span",{className:"text-lg font-bold text-primary tabular-nums",children:tr(v.askingPrice)}),v.originalPrice!==v.askingPrice&&s.jsx("span",{className:"text-xs text-ink-3 line-through tabular-nums",children:tr(v.originalPrice)}),b&&s.jsx("span",{className:"rounded-pill bg-success-soft px-1.5 py-0.5 text-[10px] font-semibold text-success",children:"Moins cher"})]}),s.jsx("button",{onClick:()=>y(v),disabled:m===v._id,className:"mt-3 w-full rounded-xl bg-primary py-2.5 text-sm font-semibold text-white hover:bg-primary-hover transition-colors disabled:opacity-60",children:m===v._id?"Ouverture du paiement…":"Acheter ce billet"}),s.jsx("p",{className:"mt-2 text-[11px] text-ink-3 text-center",children:"Un nouveau billet et un nouveau QR vous sont délivrés après paiement."})]})]},v._id)})})]})]})}const zu=({label:e,value:t,hint:r})=>s.jsxs("div",{className:"bg-surface border border-border rounded-card p-3",children:[s.jsx("div",{className:"text-xs text-ink-2",children:e}),s.jsx("div",{className:"text-lg font-bold text-ink mt-1",children:t}),r&&s.jsx("div",{className:"text-[10px] text-ink-3 mt-0.5",children:r})]}),RR=e=>e?new Date(e).toLocaleDateString("fr-FR",{day:"2-digit",month:"short",year:"numeric"}):"—";function WAe(){const e=lt(),[t,r]=C.useState(null),[n,i]=C.useState([]),[a,o]=C.useState(null),[l,c]=C.useState(null),[u,f]=C.useState(!0),[x,m]=C.useState(null),[p,y]=C.useState(!1),[v,b]=C.useState(""),E=async()=>{var A,w;f(!0);try{const[S,B]=await Promise.all([X.getOrganizerFinances(),X.getEventOrganizerBalance()]);if(S.apiReportedSuccess){const D=((A=S.body)==null?void 0:A.data)||{};r(D.totals||null),i(D.perEvent||[]);const P=D.movements??D.history??D.transactions;o(Array.isArray(P)&&P.length>0?P:null)}else m(S.message||"Erreur");B.apiReportedSuccess&&c(((w=B.body)==null?void 0:w.data)||null)}catch(S){m((S==null?void 0:S.message)||"Erreur réseau")}finally{f(!1)}};C.useEffect(()=>{E()},[]);const N=C.useMemo(()=>[...n].sort((A,w)=>new Date(w.startsAt).getTime()-new Date(A.startsAt).getTime()),[n]),j=async()=>{const A=parseInt(v,10);if(!A||A<((l==null?void 0:l.minTransferAmount)??2e3)){m(`Montant minimum : ${tr((l==null?void 0:l.minTransferAmount)??2e3)}.`);return}y(!0),m(null);try{const w=await X.transferEventOrganizerBalanceToMain(A);w.apiReportedSuccess?(b(""),await E()):m(w.message||"Transfert refusé.")}catch(w){m((w==null?void 0:w.message)||"Erreur réseau")}finally{y(!1)}};return u?s.jsx("div",{className:"min-h-screen bg-bg p-8 text-center text-ink-2",children:"Chargement..."}):s.jsxs("div",{className:"min-h-screen bg-bg",children:[s.jsxs("div",{className:"bg-surface p-4 flex items-center gap-3 border-b border-border",children:[s.jsx(Ct,{onClick:()=>e("/events/organizer")}),s.jsx("h1",{className:"text-lg font-semibold text-ink",children:"Finances organisateur"})]}),s.jsxs("div",{className:"p-4 space-y-4",children:[x&&s.jsx("div",{className:"bg-danger-soft border border-border rounded-card p-3 text-sm text-danger",children:x}),s.jsxs("div",{className:"bg-success-soft border border-border rounded-card p-5",children:[s.jsx("div",{className:"text-xs uppercase text-ink-2 tracking-wide",children:"Solde organisateur disponible"}),s.jsx("div",{className:"text-2xl font-bold text-success mt-1",children:tr((l==null?void 0:l.eventOrganizerBalance)??0)}),s.jsxs("div",{className:"text-[11px] text-ink-2 mt-1",children:["Transfert minimum : ",tr((l==null?void 0:l.minTransferAmount)??2e3),". Une fois transféré, le montant est disponible pour retrait via votre solde principal."]}),s.jsxs("div",{className:"mt-3 flex gap-2",children:[s.jsx("input",{type:"number",placeholder:"Montant à transférer",value:v,onCh
284ange:A=>b(A.target.value),className:"flex-1 min-w-0 bg-surface border border-border rounded-tile px-3 py-2 text-sm text-ink placeholder:text-ink-3 outline-none focus:border-primary"}),s.jsx("button",{onClick:j,disabled:p||!(l!=null&&l.eventOrganizerBalance),className:"shrink-0 bg-primary hover:bg-primary-hover text-white font-semibold rounded-tile px-4 py-2 text-sm transition-colors disabled:opacity-50",children:p?"...":"Transférer"})]})]}),t&&s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(zu,{label:"Chiffre d'affaires brut",value:tr(t.gross),hint:`${t.primaryOrders} commandes payées`}),s.jsx(zu,{label:"Commissions SBC",value:tr(t.commission),hint:"prélevées automatiquement"}),s.jsx(zu,{label:"Net organisateur",value:tr(t.net)}),s.jsx(zu,{label:"Déjà crédité sur solde",value:tr(t.credited)}),s.jsx(zu,{label:"Remboursements traités",value:tr(t.refunded),hint:`${t.refundedOrders} commandes`}),s.jsx(zu,{label:"Ventes en revente",value:tr(t.resaleGross),hint:`${t.resaleOrders} reventes`})]}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-base font-semibold text-ink mb-1",children:"Historique des mouvements"}),s.jsx("p",{className:"text-xs text-ink-2 mb-2",children:a?"Du plus récent au plus ancien.":"Récapitulatif par événement, du plus récent au plus ancien. Les transferts vers votre solde principal apparaissent, eux, dans l’historique de votre portefeuille."}),a?s.jsx("div",{className:"space-y-2",children:a.map((A,w)=>s.jsxs("div",{className:"bg-surface border border-border rounded-card p-3 flex items-center justify-between gap-3",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-sm font-medium text-ink truncate",children:A.label||A.description||A.type||"Mouvement"}),s.jsx("div",{className:"text-xs text-ink-2",children:RR(A.createdAt||A.date)})]}),s.jsx("div",{className:`text-sm font-semibold shrink-0 ${(A.amount??0)<0?"text-danger":"text-success"}`,children:tr(A.amount)})]},A._id||A.id||w))}):N.length===0?s.jsx("div",{className:"bg-surface border border-border rounded-card p-6 text-center text-sm text-ink-2",children:"Aucun mouvement pour l'instant."}):s.jsx("div",{className:"space-y-2",children:N.map(A=>{const w=F0("event",A.status);return s.jsxs("div",{className:"bg-surface border border-border rounded-card p-3 text-sm",children:[s.jsxs("div",{className:"flex justify-between items-start gap-2",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"font-medium text-ink truncate",children:A.title}),s.jsx("div",{className:"text-xs text-ink-2",children:RR(A.startsAt)})]}),s.jsx("span",{className:`shrink-0 rounded-pill px-2 py-0.5 text-[10px] font-bold ${Zi[w.tone]}`,children:w.label})]}),s.jsxs("div",{className:"mt-2 grid grid-cols-3 gap-2 text-xs",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-ink-3",children:"Brut"}),s.jsx("div",{className:"font-semibold text-ink",children:tr(A.gross)})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-ink-3",children:"Commission"}),s.jsx("div",{className:"font-semibold text-ink",children:tr(A.commission)})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-ink-3",children:"Net"}),s.jsx("div",{className:"font-semibold text-success",children:tr(A.net)})]}),A.refunded>0&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-ink-3",children:"Remboursé"}),s.jsx("div",{className:"font-semibold text-danger",children:tr(A.refunded)})]}),s.jsxs("div",{className:"col-span-2 self-end text-[10px] text-ink-3",children:[A.refundedOrders," commandes remboursées"]})]}),A.resaleGross>0&&s.jsx("div",{className:"col-span-3 mt-1 pt-2 border-t border-border",children:s.jsxs("div",{className:"text-[10px] text-accent",children:["Revente : ",tr(A.resaleGross)," · commission ",tr(A.resaleCommission)," · ",A.resaleOrders," transactions"]})})]})]},A.eventId)})})]})]})]})}const _R=[{value:"EVENT_NOT_AS_ADVERTISED",label:"L'événement ne correspond pas à la description"},{value:"RESALE_INVALID_TICKET",label:"Le billet acheté en revente est invalide",resaleOnly:!0},{value:"RESALE_NOT_RECEIVED",label:"Je n'ai pas reçu le billet acheté en revente",resaleOnly:!0},{value:"OTHER",label:"Autre problème"}],OC=10;function HAe(){const e=lt(),r=Cr().state??{},n=r.resaleOrderId?_R:_R.filter(b=>!b.resaleOnly),[i,a]=C.useState(r.resaleOrderId?"RESALE_INVALID_TICKET":"OTHER"),[o,l]=C.useState(""),[c,u]=C.useState(!1),[f,x]=C.useState(null),[m,p]=C.useState(!1),y=o.trim().length<OC,v=async()=>
284{if(y){x(`Décrivez le problème en au moins ${OC} caractères.`);return}u(!0),x(null);try{const b=await X.openTicketDispute({kind:i,description:o.trim(),ticketId:r.ticketId,resaleOrderId:r.resaleOrderId});b.apiReportedSuccess?p(!0):x(b.message||"Impossible d'enregistrer le signalement.")}catch(b){x((b==null?void 0:b.message)||"Erreur réseau.")}finally{u(!1)}};return s.jsxs("div",{className:"min-h-screen bg-bg",children:[s.jsxs("div",{className:"px-4 pt-3 pb-2 flex items-center gap-3",children:[s.jsx(Ct,{onClick:()=>e(-1)}),s.jsx("h1",{className:"text-xl font-bold text-ink",children:"Signaler un problème"})]}),s.jsx("div",{className:"px-4 pb-8 flex flex-col gap-4",children:m?s.jsxs("div",{className:"bg-success-soft rounded-card p-6 text-center flex flex-col items-center gap-2",children:[s.jsx("span",{className:"grid size-12 place-items-center rounded-pill bg-success text-white",children:s.jsx(L,{icon:Sa,size:24})}),s.jsx("p",{className:"text-base font-bold text-ink",children:"Signalement enregistré"}),s.jsx("p",{className:"text-sm text-ink-2 text-pretty",children:"L'équipe SBC va l'examiner. Vous serez notifié dès qu'une décision est prise."}),s.jsx("button",{onClick:()=>e("/events/mes-disputes"),className:"mt-2 rounded-pill bg-primary px-5 py-2 text-sm font-semibold text-white",children:"Suivre mes signalements"})]}):s.jsxs(s.Fragment,{children:[(r.eventTitle||r.serial)&&s.jsxs("div",{className:"bg-surface border border-border rounded-card p-3",children:[r.eventTitle&&s.jsx("p",{className:"text-sm font-medium text-ink",children:r.eventTitle}),r.serial&&s.jsxs("p",{className:"text-xs text-ink-2 mt-0.5",children:["Billet ",r.serial]}),r.resaleOrderId&&s.jsx("p",{className:"text-xs text-accent mt-0.5",children:"Acheté sur la marketplace de revente"})]}),s.jsxs("label",{className:"block",children:[s.jsx("span",{className:"text-sm font-medium text-ink",children:"Type de problème"}),s.jsx("select",{value:i,onChange:b=>a(b.target.value),className:"mt-2 w-full rounded-card border border-border bg-surface px-3 py-3 text-sm text-ink focus:outline-none focus:border-primary",children:n.map(b=>s.jsx("option",{value:b.value,children:b.label},b.value))})]}),s.jsxs("label",{className:"block",children:[s.jsx("span",{className:"text-sm font-medium text-ink",children:"Description"}),s.jsx("textarea",{value:o,onChange:b=>{l(b.target.value),x(null)},placeholder:"Décrivez ce qui s'est passé…",rows:6,className:"mt-2 w-full rounded-card border border-border bg-surface px-3 py-3 text-sm text-ink placeholder:text-ink-3 focus:outline-none focus:border-primary"}),s.jsxs("span",{className:mt("mt-1 block text-[11px]",y?"text-ink-3":"text-success"),children:[o.trim().length,"/",OC," caractères minimum"]})]}),f&&s.jsx("p",{className:"bg-danger-soft rounded-card p-3 text-sm text-danger",children:f}),s.jsx("button",{onClick:v,disabled:c||y,className:"w-full rounded-xl bg-primary py-3 text-sm font-semibold text-white hover:bg-primary-hover transition-colors disabled:opacity-60 disabled:cursor-not-allowed",children:c?"Envoi…":"Envoyer le signalement"}),s.jsx("button",{onClick:()=>e("/events/mes-disputes"),className:"w-full py-2 text-sm text-ink-2",children:"Voir mes signalements précédents"})]})})]})}const GAe={EVENT_NOT_AS_ADVERTISED:"Événement non conforme",RESALE_INVALID_TICKET:"Billet de revente invalide",RESALE_NOT_RECEIVED:"Billet de revente non reçu",OTHER:"Autre problème"},IR=e=>new Date(e).toLocaleString("fr-FR",{dateStyle:"medium",timeStyle:"short"});function KAe(){const e=lt(),[t,r]=C.useState([]),[n,i]=C.useState(!0),[a,o]=C.useState(null);return C.useEffect(()=>{(async()=>{var l;try{const c=await X.listMyDisputes();c.apiReportedSuccess?r(((l=c.body)==null?void 0:l.data)||[]):o(c.message||"Impossible de charger vos signalements.")}catch(c){o((c==null?void 0:c.message)||"Erreur réseau.")}finally{i(!1)}})()},[]),s.jsxs("div",{className:"min-h-screen bg-bg",children:[s.jsxs("div",{className:"px-4 pt-3 pb-2 flex items-center gap-3",children:[s.jsx(Ct,{onClick:()=>e(-1)}),s.jsx("h1",{className:"text-xl font-bold text-ink",children:"Mes signalements"})]}),s.jsx("div",{className:"px-4 pb-8 flex flex-col gap-3",children:n?s.jsx("div",{className:"flex flex-col gap-2",children:Array.from({length:2}).map((l,c)=>s.jsx($e,{height:"h-32",rounded:"rounded-card"},c))}):a?s.jsx("p",{className:"bg-danger-soft rounded-card p-3 text-sm text-danger",children:a}):t.length===0?s.jsxs("div",{className:"bg-surface border border-border rounded-card p-6 text-center flex flex-col items-center gap-2",children:[s.jsx(L,{icon:uy,size:30,className:"text-ink-3"}),s.jsx("p",{className:"text-sm font-semibold text-ink",children:"Aucun signalement"}),s.jsx("p",{className:"text-xs text-ink-2",children:"Un problème avec un billet ? Signalez-le depuis le billet concerné."}),s.jsx("button",{onClick:()=>e("/events/mes-billets"),className:"mt-2 rounded-pill bg-primary px-4 py-2 text-sm font-semibold text-white",children:"Mes billets"})]}):s.jsx("ul",{className:"flex flex-col gap-3",children:t.map(l=>{const c=F0("dispute",l.status);return s.jsxs("li",{className:"bg-surface border border-border rounded-card p-4",children:[s.jsxs("div",{className:"flex items-start justify-between gap-2",children:[s.jsx("p",{className:"text-sm font-semibold text-ink",children:GAe[l.kind]??l.kind}),s.jsx("span",{className:mt("shrink-0 rounded-pill px-2 py-0.5 text-[11px] font-semibold",Zi[c.tone]),children:c.label})]}),s.jsxs("p",{className:"text-[11px] text-ink-3 mt-0.5",children:["Ouvert le ",IR(l.createdAt)]}),s.jsx("p",{className:"mt-2 text-sm text-ink-2 whitespace-pre-wrap",children:l.description}),l.resolutionNote&&s.jsxs("div",{className:"mt-3 rounded-tile bg-surface-2 p-3",children:[s.jsxs("p",{className:"text-[11px] font-semibold text-ink",children:["Réponse de SBC",l.resolvedAt?` · ${IR(l.resolvedAt)}`:""]}),s.jsx("p",{className:"mt-1 text-xs text-ink-2 whitespace-pre-wrap",children:l.resolutionNote})]})]},l._id)})})})]})}function XAe(){const e=Cr(),{setAffiliationCode:t}=CW(),{isAuthenticated:r,loading:n,logout:i,user:a}=Gt(),{isSubscribed:o,isLoading:l}=nH(),c=x0(),u=(a==null?void 0:a.id)??(a==null?void 0:a._id)??null,f=C.useRef(null);C.useEffect(()=>{f.current!==u&&(c.clear(),f.current=u)},[u,c]),C.useEffect(()=>X8e(),[]),C.useEffect(()=>{localStorage.getItem("splashViewed")&&localStorage.removeItem("splashViewed")},[]),C.useEffect(()=>{const N=new URLSearchParams(e.search).get("affiliationCode");N&&t(N)},[e.search,t]),C.useEffect(()=>{r&&!l&&o&&e.pathname==="/"&&a&&!a.profession&&(!a.interests||a.interests.length===0)&&!localStorage.getItem("profileCompletionDone")&&!localStorage.getItem("profileCompletionSkipped")&&window.location.replace("/complete-profile")},[r,l,o,e.pathname,a]),C.useEffect(()=>{e.pathname==="/splash-screen"&&r&&!n&&window.location.replace("/")},[e.pathname,r,n]);const x=C.useRef(null);C.useEffect(()=>{if(!r||l)return;const E=x.current===!1&&o;x.current=o,e.pathname==="/connexion"?window.location.replace(o?"/":"/abonnement"):e.pathname==="/abonnement"&&E&&window.location.replace("/")},[r,l,o,e.pathname]);const m=r&&!l&&!o,p=e.pathname==="/chat"&&new URLSearchParams(e.search).has("conversation"),v=["/splash-screen","/connexion","/signup","/forgot-password","/reset-password","/reset-password-otp","/verify-otp","/verify-email-otp","/otp","/complete-profile","/a-propos","/conditions","/confidentialite","/sso/authorize","/withdrawal-otp-verification"].includes(e.pathname)||p,b=e.pathname==="/filleuls"||e.pathname==="/abonnement"||e.pathname==="/single-product"||e.pathname==="/profile"||e.pathname==="/contacts"||e.pathname==="/otp"||e.pathname==="/transaction-confirmation"||e.pathname==="/splash-screen"||e.pathname==="/connexion"||e.pathname==="/signup"||e.pathname==="/forgot-password"||e.pathname==="/change-password"||e.pathname==="/modifier-le-profil"||e.pathname==="/ajouter-produit"||e.pathname==="/mes-produits"||e.pathname.startsWith("/modifier-produit/")||e.pathname==="/verify-otp"||e.pathname==="/reset-password"||e.pathname==="/reset-password-otp"||e.pathname==="/verify-email-otp"||e.pathname==="/modifier-email"||e.pathname==="/change-email"||e.pathname==="/change-phone"||e.pathname==="/changer-mot-de-passe"||e.pathname==="/withdrawal-otp-verification"||e.pathname==="/relance"||e.pathname==="/relance/sms-links"||e.pathname==="/activation-balance"||e.pathname==="/complete-profile"||e.pathname==="/a-propos"||e.pathname==="/conditions"||e.pathname==="/confidentialite"||e.pathname==="/sso/authorize"||e.pathname.startsWith("/ads-network")||e.pathname.startsWith("/events/organizer/")&&e.pathname.endsWith("/scanner")||p;return s.jsxs("div",{className:`bg-white relative ${b?"":"pb-24"}`,children:[m&&s.jsx("button",{onClick:async()=>{await i(),window.location.replace("/connexion")},className:"absolute top-4 right-4 bg-red-500 hover:bg-red-600 text-white font-bold py-2 px-4 roun
284ded-xl z-50",children:"Se déconnecter"}),!v&&s.jsx(U8e,{}),s.jsxs(wY,{children:[s.jsx(Ye,{path:"/splash-screen",element:s.jsx(_5e,{})}),s.jsx(Ye,{path:"/connexion",element:s.jsx(Y5e,{})}),s.jsx(Ye,{path:"/signup",element:s.jsx(e8e,{})}),s.jsx(Ye,{path:"/forgot-password",element:s.jsx(t8e,{})}),s.jsx(Ye,{path:"/reset-password",element:s.jsx(Q8e,{})}),s.jsx(Ye,{path:"/verify-otp",element:s.jsx(Y8e,{})}),s.jsx(Ye,{path:"/verify-email-otp",element:s.jsx(Z8e,{})}),s.jsx(Ye,{path:"/otp",element:s.jsx(B5e,{})}),s.jsx(Ye,{path:"/a-propos",element:s.jsx(fCe,{})}),s.jsx(Ye,{path:"/conditions",element:s.jsx(hCe,{})}),s.jsx(Ye,{path:"/confidentialite",element:s.jsx(mCe,{})}),s.jsx(Ye,{path:"/sso/authorize",element:s.jsx(vCe,{})}),s.jsxs(Ye,{element:s.jsx(c3e,{}),children:[s.jsx(Ye,{path:"/abonnement",element:s.jsx(qO,{})}),s.jsx(Ye,{path:"/changer-abonnement",element:s.jsx(qO,{})}),s.jsx(Ye,{path:"/complete-profile",element:s.jsx(P4e,{})}),s.jsx(Ye,{path:"/change-password",element:s.jsx(r8e,{})}),s.jsx(Ye,{path:"/modifier-email",element:s.jsx(J8e,{})}),s.jsx(Ye,{path:"/change-phone",element:s.jsx(eCe,{})}),s.jsx(Ye,{path:"/withdrawal-otp-verification",element:s.jsx(rCe,{})}),s.jsx(Ye,{path:"/transaction-confirmation",element:s.jsx(D5e,{})})]}),s.jsxs(Ye,{element:s.jsx(u3e,{}),children:[s.jsx(Ye,{path:"/",element:s.jsx(Ioe,{})}),s.jsx(Ye,{path:"/money",element:s.jsx(Joe,{})}),s.jsx(Ye,{path:"/ads-pack",element:s.jsx(rle,{})}),s.jsx(Ye,{path:"/marketplace",element:s.jsx(xle,{})}),s.jsx(Ye,{path:"/wallet",element:s.jsx(v5e,{})}),s.jsx(Ye,{path:"/profile",element:s.jsx(C5e,{})}),s.jsx(Ye,{path:"/contacts",element:s.jsx(k5e,{})}),s.jsx(Ye,{path:"/modifier-le-profil",element:s.jsx(s8e,{})}),s.jsx(Ye,{path:"/single-product/:id",element:s.jsx(i8e,{})}),s.jsx(Ye,{path:"/ajouter-produit",element:s.jsx(l8e,{})}),s.jsx(Ye,{path:"/mes-produits",element:s.jsx(d8e,{})}),s.jsx(Ye,{path:"/modifier-produit/:id",element:s.jsx(h8e,{})}),s.jsx(Ye,{path:"/filleuls",element:s.jsx(p8e,{})}),s.jsx(Ye,{path:"/classement",element:s.jsx(N8e,{})}),s.jsx(Ye,{path:"/formations",element:s.jsx(M8e,{})}),s.jsx(Ye,{path:"/partenaire",element:s.jsx(tCe,{})}),s.jsx(Ye,{path:"/relance",element:s.jsx(aCe,{})}),s.jsx(Ye,{path:"/relance/sms-links",element:s.jsx(lCe,{})}),s.jsx(Ye,{path:"/activation-balance",element:s.jsx(cCe,{})}),s.jsx(Ye,{path:"/chat",element:s.jsx(F4e,{})}),s.jsx(Ye,{path:"/sbclove",element:s.jsx(j3e,{})}),s.jsx(Ye,{path:"/events",element:s.jsx(vAe,{})}),s.jsx(Ye,{path:"/events/revente",element:s.jsx(qAe,{})}),s.jsx(Ye,{path:"/events/commande/:orderId",element:s.jsx(AAe,{})}),s.jsx(Ye,{path:"/events/mes-billets",element:s.jsx(BAe,{})}),s.jsx(Ye,{path:"/events/mes-billets/:id",element:s.jsx(PAe,{})}),s.jsx(Ye,{path:"/events/mes-billets/:id/revendre",element:s.jsx(zAe,{})}),s.jsx(Ye,{path:"/events/signaler",element:s.jsx(HAe,{})}),s.jsx(Ye,{path:"/events/mes-disputes",element:s.jsx(KAe,{})}),s.jsx(Ye,{path:"/events/organizer",element:s.jsx(TAe,{})}),s.jsx(Ye,{path:"/events/organizer/finances",element:s.jsx(WAe,{})}),s.jsx(Ye,{path:"/events/organizer/nouveau",element:s.jsx(MR,{})}),s.jsx(Ye,{path:"/events/organizer/:id",element:s.jsx(MR,{})}),s.jsx(Ye,{path:"/events/organizer/:id/participants",element:s.jsx(kAe,{})}),s.jsx(Ye,{path:"/events/organizer/:id/scanner",element:s.jsx(IAe,{})}),s.jsx(Ye,{path:"/events/:slug",element:s.jsx(wAe,{})}),s.jsx(Ye,{path:"/events/:slug/checkout",element:s.jsx(EAe,{})}),s.jsxs(Ye,{element:s.jsx(O4e,{}),children:[s.jsx(Ye,{path:"/ads-network",element:s.jsx(R4e,{})}),s.jsx(Ye,{path:"/ads-network/diffuseur/onboarding",element:s.jsx(z4e,{})}),s.jsx(Ye,{path:"/ads-network/diffuseur",element:s.jsx(Z4e,{})}),s.jsx(Ye,{path:"/ads-network/annonceur/onboarding",element:s.jsx(s3e,{})}),s.jsx(Ye,{path:"/ads-network/annonceur/nouvelle-campagne",element:s.jsx(mL,{})}),s.jsx(Ye,{path:"/ads-network/annonceur/campagne/:id/modifier",element:s.jsx(mL,{})}),s.jsx(Ye,{path:"/ads-network/annonceur",element:s.jsx(o3e,{})})]})]}),s.jsx(Ye,{path:"*",element:s.jsx(w5e,{})})]}),!b&&s.jsx($oe,{}),!b&&s.jsx($8e,{})]})}function YAe(){return s.jsx(xQ,{reducedMotion:"user",children:s.jsx(zse,{children:s.jsx(fwe,{children:s.jsx(Q5e,{children:s.jsx(Poe,{children:s.jsx(Moe,{children:s.jsx(XAe,{})})})})})})})}const Ot=e=>typeof e=="string",Mx=()=>{let e,t;const r=new Promise((n,i)=>{e=n,t=i});return r.resolve=e,r.reject=t,r},$R=e=>e==null?"":""+e,QAe=(e,t,r)=>{e.forEach(n=>{t[n]&&(r[n]=t[n])})},ZAe=/###/g,zR=e=>e&&e.indexOf("###")>-1?e.replace(ZAe,"."):e,VR=e=>!e||Ot(e),xf=(e,t,r)=>{const n=Ot(t)?t.split("."):t;let i=0;for(;i<n.length-1;){if(VR(e))return{};const a=zR(n[i]);!e[a]&&r&&(e[a]=new r),Object.prototype.hasOwnProperty.call(e,a)?e=e[a]:e={},++i}return VR(e)?{}:{obj:e,k:zR(n[i])}},UR=(e,t,r)=>{const{obj:n,k:i}=xf(e,t,Object);if(n!==void 0||t.length===1){n[i]=r;return}let a=t[t.length-1],o=t.slice(0,t.length-1),l=xf(e,o,Object);for(;l.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),l=xf(e,o,Object),l!=null&&l.obj&&typeof l.obj[`${l.k}.${a}`]<"u"&&(l.obj=void 0);l.obj[`${l.k}.${a}`]=r},JAe=(e,t,r,n)=>{const{obj:i,k:a}=xf(e,t,Object);i[a]=i[a]||[],i[a].push(r)},X1=(e,t)=>{const{obj:r,k:n}=xf(e,t);if(r&&Object.prototype.hasOwnProperty.call(r,n))return r[n]},eke=(e,t,r)=>{const n=X1(e,r);return n!==void 0?n:X1(t,r)},LG=(e,t,r)=>{for(const n in t)n!=="__proto__"&&n!=="constructor"&&(n in e?Ot(e[n])||e[n]instanceof String||Ot(t[n])||t[n]instanceof String?r&&(e[n]=t[n]):LG(e[n],t[n],r):e[n]=t[n]);return e},Vu=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var tke={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const rke=e=>Ot(e)?e.replace(/[&<>
284"'\/]/g,t=>tke[t]):e;class nke{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const r=this.regExpMap.get(t);if(r!==void 0)return r;const n=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,n),this.regExpQueue.push(t),n}}const ske=[" ",",","?","!",";"],ike=new nke(20),ake=(e,t,r)=>{t=t||"",r=r||"";const n=ske.filter(o=>t.indexOf(o)<0&&r.indexOf(o)<0);if(n.length===0)return!0;const i=ike.getRegExp(`(${n.map(o=>o==="?"?"\\?":o).join("|")})`);let a=!i.test(e);if(!a){const o=e.indexOf(r);o>0&&!i.test(e.substring(0,o))&&(a=!0)}return a},B4=(e,t,r=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const n=t.split(r);let i=e;for(let a=0;a<n.length;){if(!i||typeof i!="object")return;let o,l="";for(let c=a;c<n.length;++c)if(c!==a&&(l+=r),l+=n[c],o=i[l],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&c<n.length-1)continue;a+=c-a+1;break}i=o}return i},bh=e=>e==null?void 0:e.replace("_","-"),oke={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var r,n;(n=(r=console==null?void 0:console[e])==null?void 0:r.apply)==null||n.call(r,console,t)}};class Y1{constructor(t,r={}){this.init(t,r)}init(t,r={}){this.prefix=r.prefix||"i18next:",this.logger=t||oke,this.options=r,this.debug=r.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,r,n,i){return i&&!this.debug?null:(Ot(t[0])&&(t[0]=`${n}${this.prefix} ${t[0]}`),this.logger[r](t))}create(t){return new Y1(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Y1(this.logger,t)}}var Na=new Y1;class tv{constructor(){this.observers={}}on(t,r){return t.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const i=this.observers[n].get(r)||0;this.observers[n].set(r,i+1)}),this}off(t,r){if(this.observers[t]){if(!r){delete this.observers[t];return}this.observers[t].delete(r)}}emit(t,...r){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([i,a])=>{for(let o=0;o<a;o++)i(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([i,a])=>{for(let o=0;o<a;o++)i.apply(i,[t,...r])})}}class qR extends tv{constructor(t,r={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const r=this.options.ns.indexOf(t);r>-1&&this.options.ns.splice(r,1)}getResource(t,r,n,i={}){var u,f;const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;t.indexOf(".")>-1?l=t.split("."):(l=[t,r],n&&(Array.isArray(n)?l.push(...n):Ot(n)&&a?l.push(...n.split(a)):l.push(n)));const c=X1(this.data,l);return!c&&!r&&!n&&t.indexOf(".")>-1&&(t=l[0],r=l[1],n=l.slice(2).join(".")),c||!o||!Ot(n)?c:B4((f=(u=this.data)==null?void 0:u[t])==null?void 0:f[r],n,a)}
284addResource(t,r,n,i,a={silent:!1}){const o=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let l=[t,r];n&&(l=l.concat(o?n.split(o):n)),t.indexOf(".")>-1&&(l=t.split("."),i=r,r=l[1]),this.addNamespaces(r),UR(this.data,l,i),a.silent||this.emit("added",t,r,n,i)}addResources(t,r,n,i={silent:!1}){for(const a in n)(Ot(n[a])||Array.isArray(n[a]))&&this.addResource(t,r,a,n[a],{silent:!0});i.silent||this.emit("added",t,r,n)}addResourceBundle(t,r,n,i,a,o={silent:!1,skipCopy:!1}){let l=[t,r];t.indexOf(".")>-1&&(l=t.split("."),i=n,n=r,r=l[1]),this.addNamespaces(r);let c=X1(this.data,l)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?LG(c,n,a):c={...c,...n},UR(this.data,l,c),o.silent||this.emit("added",t,r,n)}removeResourceBundle(t,r){this.hasResourceBundle(t,r)&&delete this.data[t][r],this.removeNamespaces(r),this.emit("removed",t,r)}hasResourceBundle(t,r){return this.getResource(t,r)!==void 0}getResourceBundle(t,r){return r||(r=this.options.defaultNS),this.getResource(t,r)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const r=this.getDataByLanguage(t);return!!(r&&Object.keys(r)||[]).find(i=>r[i]&&Object.keys(r[i]).length>0)}toJSON(){return this.data}}var RG={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,r,n,i){return e.forEach(a=>{var o;t=((o=this.processors[a])==null?void 0:o.process(t,r,n,i))??t}),t}};const WR={},HR=e=>!Ot(e)&&typeof e!="boolean"&&typeof e!="number";class Q1 extends tv{constructor(t,r={}){super(),QAe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","
284i18nFormat","utils"],t,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Na.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,r={interpolation:{}}){const n={...r};if(t==null)return!1;const i=this.resolve(t,n);return(i==null?void 0:i.res)!==void 0}extractFromKey(t,r){let n=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let a=r.ns||this.options.defaultNS||[];const o=n&&t.indexOf(n)>-1,l=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!ake(t,n,i);if(o&&!l){const c=t.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:t,namespaces:Ot(a)?[a]:a};const u=t.split(n);(n!==i||n===i&&this.options.ns.indexOf(u[0])>-1)&&(a=u.shift()),t=u.join(i)}return{key:t,namespaces:Ot(a)?[a]:a}}translate(t,r,n){let i=typeof r=="object"?{...r}:r;if(typeof i!="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof options=="object"&&(i={...i}),i||(i={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const a=i.returnDetails!==void 0?i.returnDetails:this.options.returnDetails,o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,{key:l,namespaces:c}=this.extractFromKey(t[t.length-1],i),u=c[c.length-1];let f=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;f===void 0&&(f=":");const x=i.lng||this.language,m=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((x==null?void 0:x.toLowerCase())==="cimode")return m?a?{res:`${u}${f}${l}`,usedKey:l,exactUsedKey:l,usedLng:x,usedNS:u,usedParams:this.getUsedParamsDetails(i)}:`${u}${f}${l}`:a?{res:l,usedKey:l,exactUsedKey:l,usedLng:x,usedNS:u,usedParams:this.getUsedParamsDetails(i)}:l;const p=this.resolve(t,i);let y=p==null?void 0:p.res;const v=(p==null?void 0:p.usedKey)||l,b=(p==null?void 0:p.exactUsedKey)||l,E=["[object Number]","[object Function]","[object RegExp]"],N=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,j=!this.i18nFormat||this.i18nFormat.handleAsObject,A=i.count!==void 0&&!Ot(i.count),w=Q1.hasDefaultValue(i),S=A?this.pluralResolver.getSuffix(x,i.count,i):"",B=i.ordinal&&A?this.pluralResolver.getSuffix(x,i.count,{ordinal:!1}):"",D=A&&!i.ordinal&&i.count===0,P=D&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${B}`]||i.defaultValue;let O=y;j&&!y&&w&&(O=P);const M=HR(O),I=Object.prototype.toString.apply(O);
284if(j&&O&&M&&E.indexOf(I)<0&&!(Ot(N)&&Array.isArray(O))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const V=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,O,{...i,ns:c}):`key '${l} (${this.language})' returned an object instead of string.`;return a?(p.res=V,p.usedParams=this.getUsedParamsDetails(i),p):V}if(o){const V=Array.isArray(O),W=V?[]:{},_=V?b:v;for(const z in O)if(Object.prototype.hasOwnProperty.call(O,z)){const R=`${_}${o}${z}`;w&&!y?W[z]=this.translate(R,{...i,defaultValue:HR(P)?P[z]:void 0,joinArrays:!1,ns:c}):W[z]=this.translate(R,{...i,joinArrays:!1,ns:c}),W[z]===R&&(W[z]=O[z])}y=W}}else if(j&&Ot(N)&&Array.isArray(y))y=y.join(N),y&&(y=this.extendTranslation(y,t,i,n));else{let V=!1,W=!1;!this.isValidLookup(y)&&w&&(V=!0,y=P),this.isValidLookup(y)||(W=!0,y=l);const z=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&W?void 0:y,R=w&&P!==y&&this.options.updateMissing;if(W||V||R){if(this.logger.log(R?"updateKey":"missingKey",x,u,l,R?P:y),o){const $=this.resolve(l,{...i,keySeparator:!1});$&&$.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let q=[];const G=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&G&&G[0])for(let $=0;$<G.length;$++)q.push(G[$]);else this.options.saveMissingTo==="all"?q=this.languageUtils.toResolveHierarchy(i.lng||this.language):q.push(i.lng||this.language);const K=($,H,te)=>{var Y;const ne=w&&te!==y?te:z;this.options.missingKeyHandler?this.options.missingKeyHandler($,u,H,ne,R,i):(Y=this.backendConnector)!=null&&Y.saveMissing&&this.backendConnector.saveMissing($,u,H,ne,R,i),this.emit("missingKey",$,u,H,y)};this.options.saveMissing&&(this.options.saveMissingPlurals&&A?q.forEach($=>{const H=this.pluralResolver.getSuffixes($,i);D&&i[`defaultValue${this.options.pluralSeparator}zero`]&&H.indexOf(`${this.options.pluralSeparator}zero`)<0&&H.push(`${this.options.pluralSeparator}zero`),H.forEach(te=>{K([$],l+te,i[`defaultValue${te}`]||P)})}):K(q,l,P))}y=this.extendTranslation(y,t,i,p,n),W&&y===l&&this.options.appendNamespaceToMissingKey&&(y=`${u}${f}${l}`),(W||V)&&this.options.parseMissingKeyHandler&&(y=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${f}${l}`:l,V?y:void 0,i))}return a?(p.res=y,p.usedParams=this.getUsedParamsDetails(i),p):y}extendTranslation(t,r,n,i,a){var c,u;if((c=this.i18nFormat)!=null&&c.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const f=Ot(t)&&(((u=n==null?void 0:n.interpolation)==null?void 0:u.skipOnVariables)!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let x;if(f){const p=t.match(this.interpolator.nestingRegexp);x=p&&p.length}let m=n.replace&&!Ot(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(m={...this.options.interpolation.defaultVariables,...m}),t=this.interpolator.interpolate(t,m,n.lng||this.language||i.usedLng,n),f){const p=t.match(this.interpolator.nestingRegexp),y=p&&p.length;x<y&&(n.nest=!1)}!n.lng&&i&&i.res&&(n.lng=this.language||i.usedLng),n.nest!==!1&&(t=this.interpolator.nest(t,(...p)=>(a==null?void 0:a[0])===p[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${p[0]} in key: ${r[0]}`),null):this.translate(...p,r),n)),n.interpolation&&this.interpolator.reset()}const o=n.postProcess||this.options.postProcess,l=Ot(o)?[o]:o;return t!=null&&(l!=null&&l.length)&&n.applyPostProcessor!==!1&&(t=RG.handle(l,t,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),t}resolve(t,r={}){let n,i,a,o,l;return Ot(t)&&(t=[t]),t.forEach(c=>{if(this.isValidLookup(n))return;const u=this.extractFromKey(c,r),f=u.key;i=f;let x=u.namespaces;this.options.fallbackNS&&(x=x.concat(this.options.fallbackNS));const m=r.count!==void 0&&!Ot(r.count),p=m&&!r.ordinal&&r.count===0,y=r.context!==void 0&&(Ot(r.context)||typeof r.context=="number")&&r.context!=="",v=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);x.forEach(b=>{var E,N;this.isValidLookup(n)||(l=b,!WR[`${v[0]}-${b}`]&&((E=this.utils)!=null&&E.hasLoadedNamespace)&&!((N=this.utils)!=null&&N.hasLoadedNamespace(l))&&(WR[`${v[0]}-${b}`]=!0,this.logger.warn(`key "${i}" for languages "${v.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),v.forEach(j=>{var S;if(this.isValidLookup(n))return;o=j;const A=[f];if((S=this.i18nFormat)!=null&&S.addLookupKeys)this.i18nFormat.addLookupKeys(A,f,j,b,r);else{let B;m&&(B=this.pluralResolver.getSuffix(j,r.count,r));const D=`${this.options.pluralSeparator}zero`,P=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(m&&(A.push(f+B),r.ordinal&&B.indexOf(P)===0&&A.push(f+B.replace(P,this.options.pluralSeparator)),p&&A.push(f+D)),y){const O=`${f}${this.options.contextSeparator}${r.context}`;A.push(O),m&&(A.push(O+B),r.ordinal&&B.indexOf(P)===0&&A.push(O+B.replace(P,this.options.pluralSeparator)),p&&A.push(O+D))}}let w;for(;w=A.pop();)this.isValidLookup(n)||(a=w,n=this.getResource(j,b,w,r))}))})}),{res:n,usedKey:i,exactUsedKey:a,usedLng:o,usedNS:l}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,r,n,i={}){var a;return(a=this.i18nFormat)!=null&&a.getResource?this.i18nFormat.getResource(t,r,n,i):this.resourceStore.getResource(t,r,n,i)}getUsedParamsDetails(t={}){const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=t.replace&&!Ot(t.replace);let i=n?t.replace:t;if(n&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const a of r)delete i[a]}return i}static hasDefaultValue(t){const r="defaultValue";for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&r===n.substring(0,r.length)&&t[n]!==void 0)return!0;return!1}}class GR{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Na.create("languageUtils")}getScriptPartFromCode(t){if(t=bh(t),!t||t.indexOf("-")<0)return null;const r=t.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(t){if(t=bh(t),!t||t.indexOf("-")<0)return t;const r=t.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(t){if(Ot(t)&&t.indexOf("-")>-1){let r;try{r=Intl.getCanonicalLocales(t)[0]}catch{}return r&&this.options.lowerCaseLng&&(r=r.toLowerCase()),r||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let r;return t.forEach(n=>{if(r)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(r=i)}),!r&&this.options.supportedLngs&&t.forEach(n=>{if(r)return;const i=this.getScriptPartFromCode(n);if(this.isSupportedCode(i))return r=i;const a=this.getLanguagePartFromCode(n);if(this.isSupportedCode(a))return r=a;r=this.options.supportedLngs.find(o=>{if(o===a)return o;if(!(o.indexOf("-")<0&&a.indexOf("-")<0)&&(o.indexOf("-")>0&&a.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===a||o.indexOf(a)===0&&a.length>1))return o}
284)}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(t,r){if(!t)return[];if(typeof t=="function"&&(t=t(r)),Ot(t)&&(t=[t]),Array.isArray(t))return t;if(!r)return t.default||[];let n=t[r];return n||(n=t[this.getScriptPartFromCode(r)]),n||(n=t[this.formatLanguageCode(r)]),n||(n=t[this.getLanguagePartFromCode(r)]),n||(n=t.default),n||[]}toResolveHierarchy(t,r){const n=this.getFallbackCodes((r===!1?[]:r)||this.options.fallbackLng||[],t),i=[],a=o=>{o&&(this.isSupportedCode(o)?i.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return Ot(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(t))):Ot(t)&&a(this.formatLanguageCode(t)),n.forEach(o=>{i.indexOf(o)<0&&a(this.formatLanguageCode(o))}),i}}const KR={zero:0,one:1,two:2,few:3,many:4,other:5},XR={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class lke{constructor(t,r={}){this.languageUtils=t,this.options=r,this.logger=Na.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,r){this.rules[t]=r}clearCache(){this.pluralRulesCache={}}getRule(t,r={}){const n=bh(t==="dev"?"en":t),i=r.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:n,type:i});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let o;try{o=new Intl.PluralRules(n,{type:i})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),XR;if(!t.match(/-|_/))return XR;const c=this.languageUtils.getLanguagePartFromCode(t);o=this.getRule(c,r)}return this.pluralRulesCache[a]=o,o}needsPlural(t,r={}){let n=this.getRule(t,r);return n||(n=this.getRule("dev",r)),(n==null?void 0:n.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,r,n={}){return this.getSuffixes(t,n).map(i=>`${r}${i}`)}getSuffixes(t,r={}){let n=this.getRule(t,r);return n||(n=this.getRule("dev",r)),n?n.resolvedOptions().pluralCategories.sort((i,a)=>KR[i]-KR[a]).map(i=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(t,r,n={}){const i=this.getRule(t,n);return i?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(r)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",r,n))}}const YR=(e,t,r,n=".",i=!0)=>{let a=eke(e,t,r);return!a&&i&&Ot(r)&&(a=B4(e,r,n),a===void 0&&(a=B4(t,r,n))),a},LC=e=>e.replace(/\$/g,"$$$$");class cke{constructor(t={}){var r;this.logger=Na.create("interpolator"),this.options=t,this.format=((r=t==null?void 0:t.interpolation)==null?void 0:r.format)||(n=>n),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:r,escapeValue:n,useRawValueToEscape:i,prefix:a,prefixEscaped:o,suffix:l,suffixEscaped:c,formatSeparator:u,unescapeSuffix:f,unescapePrefix:x,nestingPrefix:m,nestingPrefixEscaped:p,nestingSuffix:y,nestingSuffixEscaped:v,nestingOptionsSeparator:b,maxReplaces:E,alwaysFormat:N}=t.interpolation;this.escape=r!==void 0?r:rke,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=a?Vu(a):o||"{{",this.suffix=l?Vu(l):c||"}}",this.formatSeparator=u||",",this.unescapePrefix=f?"":x||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=m?Vu(m):p||Vu("$t("),this.nestingSuffix=y?Vu(y):v||Vu(")"),this.nestingOptionsSeparator=b||",",this.maxReplaces=E||1e3,this.alwaysFormat=N!==void 0?N:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(r,n)=>(r==null?void 0:r.source)===n?(r.lastIndex=0,r):new RegExp(n,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,r,n,i){var p;let a,o,l;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=y=>{if(y.indexOf(this.formatSeparator)<0){const N=YR(r,c,y,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(N,void 0,n,{...i,...r,interpolationkey:y}):N}const v=y.split(this.formatSeparator),b=v.shift().trim(),E=v.join(this.formatSeparator).trim();return this.format(YR(r,c,b,this.options.keySeparator,this.options.ignoreJSONStructure),E,n,{...i,...r,interpolationkey:b})};this.resetRegExp();const f=(i==null?void 0:i.missingInterpolationHandler)||this.options.missingInterpolationHandler,x=((p=i==null?void 0:i.interpolation)==null?void 0:p.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:y=>LC(y)},{regex:this.regexp,safeValue:y=>this.escapeValue?LC(this.escape(y)):LC(y)}
284].forEach(y=>{for(l=0;a=y.regex.exec(t);){const v=a[1].trim();if(o=u(v),o===void 0)if(typeof f=="function"){const E=f(t,a,i);o=Ot(E)?E:""}else if(i&&Object.prototype.hasOwnProperty.call(i,v))o="";else if(x){o=a[0];continue}else this.logger.warn(`missed to pass in variable ${v} for interpolating ${t}`),o="";else!Ot(o)&&!this.useRawValueToEscape&&(o=$R(o));const b=y.safeValue(o);if(t=t.replace(a[0],b),x?(y.regex.lastIndex+=o.length,y.regex.lastIndex-=a[0].length):y.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),t}nest(t,r,n={}){let i,a,o;const l=(c,u)=>{const f=this.nestingOptionsSeparator;if(c.indexOf(f)<0)return c;const x=c.split(new RegExp(`${f}[ ]*{`));let m=`{${x[1]}`;c=x[0],m=this.interpolate(m,o);const p=m.match(/'/g),y=m.match(/"/g);(((p==null?void 0:p.length)??0)%2===0&&!y||y.length%2!==0)&&(m=m.replace(/'/g,'"'));try{o=JSON.parse(m),u&&(o={...u,...o})}catch(v){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,v),`${c}${f}${m}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,c};for(;i=this.nestingRegexp.exec(t);){let c=[];o={...n},o=o.replace&&!Ot(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let u=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const f=i[1].split(this.formatSeparator).map(x=>x.trim());i[1]=f.shift(),c=f,u=!0}if(a=r(l.call(this,i[1].trim(),o),o),a&&i[0]===t&&!Ot(a))return a;Ot(a)||(a=$R(a)),a||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),a=""),u&&(a=c.reduce((f,x)=>this.format(f,x,n.lng,{...n,interpolationkey:i[1].trim()}),a.trim())),t=t.replace(i[0],a),this.regexp.lastIndex=0}return t}}const uke=e=>{let t=e.toLowerCase().trim();const r={};if(e.indexOf("(")>-1){const n=e.split("(");t=n[0].toLowerCase().trim();const i=n[1].substring(0,n[1].length-1);t==="currency"&&i.indexOf(":")<0?r.currency||(r.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?r.range||(r.range=i.trim()):i.split(";").forEach(o=>{if(o){const[l,...c]=o.split(":"),u=c.join(":").trim().replace(/^'+|'+$/g,""),f=l.trim();r[f]||(r[f]=u),u==="false"&&(r[f]=!1),u==="true"&&(r[f]=!0),isNaN(u)||(r[f]=parseInt(u,10))}})}return{formatName:t,formatOptions:r}},QR=e=>{const t={};return(r,n,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});const o=n+JSON.stringify(a);let l=t[o];return l||(l=e(bh(n),i),t[o]=l),l(r)}},dke=e=>(t,r,n)=>e(bh(r),n)(t);class xke{constructor(t={}){this.logger=Na.create("formatter"),this.options=t,this.init(t)}init(t,r={interpolation:{}}){this.formatSeparator=r.interpolation.formatSeparator||",";const n=r.cacheInBuiltFormats?QR:dke;this.formats={number:n((i,a)=>{const o=new Intl.NumberFormat(i,{...a});return l=>o.format(l)}),currency:n((i,a)=>{const o=new Intl.NumberFormat(i,{...a,style:"currency"});return l=>o.format(l)}),datetime:n((i,a)=>{const o=new Intl.DateTimeFormat(i,{...a});return l=>o.format(l)}),relativetime:n((i,a)=>{const o=new Intl.RelativeTimeFormat(i,{...a});return l=>o.format(l,a.range||"day")}),list:n((i,a)=>{const o=new Intl.ListFormat(i,{...a});return l=>o.format(l)})}}add(t,r){this.formats[t.toLowerCase().trim()]=r}addCached(t,r){this.formats[t.toLowerCase().trim()]=QR(r)}format(t,r,n,i={}){const a=r.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(l=>l.indexOf(")")>-1)){const l=a.findIndex(c=>c.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,l)].join(this.formatSeparator)}return a.reduce((l,c)=>{var x;const{formatName:u,formatOptions:f}=uke(c);if(this.formats[u]){let m=l;try{const p=((x=i==null?void 0:i.formatParams)==null?void 0:x[i.interpolationkey])||{},y=p.locale||p.lng||i.locale||i.lng||n;m=this.formats[u](l,y,{...f,...i,...p})}catch(p){this.logger.warn(p)}return m}else this.logger.warn(`there was no format function for ${u}`);return l},t)}}const fke=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class hke extends tv{constructor(t,r,n,i={}){var a,o;super(),this.backend=t,this.store=r,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=Na.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],(o=(a=this.backend)==null?void 0:a.init)==null||o.call(a,n,i.backend,i)}queueLoad(t,r,n,i){const a={},o={},l={},c={};return t.forEach(u=>{let f=!0;r.forEach(x=>{const m=`${u}|${x}
284`;!n.reload&&this.store.hasResourceBundle(u,x)?this.state[m]=2:this.state[m]<0||(this.state[m]===1?o[m]===void 0&&(o[m]=!0):(this.state[m]=1,f=!1,o[m]===void 0&&(o[m]=!0),a[m]===void 0&&(a[m]=!0),c[x]===void 0&&(c[x]=!0)))}),f||(l[u]=!0)}),(Object.keys(a).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(a),pending:Object.keys(o),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(c)}}loaded(t,r,n){const i=t.split("|"),a=i[0],o=i[1];r&&this.emit("failedLoading",a,o,r),!r&&n&&this.store.addResourceBundle(a,o,n,void 0,void 0,{skipCopy:!0}),this.state[t]=r?-1:2,r&&n&&(this.state[t]=0);const l={};this.queue.forEach(c=>{JAe(c.loaded,[a],o),fke(c,t),r&&c.errors.push(r),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(u=>{l[u]||(l[u]={});const f=c.loaded[u];f.length&&f.forEach(x=>{l[u][x]===void 0&&(l[u][x]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(c=>!c.done)}read(t,r,n,i=0,a=this.retryTimeout,o){if(!t.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:r,fcName:n,tried:i,wait:a,callback:o});return}this.readingCalls++;const l=(u,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const x=this.waitingReads.shift();this.read(x.lng,x.ns,x.fcName,x.tried,x.wait,x.callback)}if(u&&f&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,t,r,n,i+1,a*2,o)},a);return}o(u,f)},c=this.backend[n].bind(this.backend);if(c.length===2){try{const u=c(t,r);u&&typeof u.then=="function"?u.then(f=>l(null,f)).catch(l):l(null,u)}catch(u){l(u)}return}return c(t,r,l)}prepareLoading(t,r,n={},i){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();Ot(t)&&(t=this.languageUtils.toResolveHierarchy(t)),Ot(r)&&(r=[r]);const a=this.queueLoad(t,r,n,i);if(!a.toLoad.length)return a.pending.length||i(),null;a.toLoad.forEach(o=>{this.loadOne(o)})}load(t,r,n){this.prepareLoading(t,r,{},n)}reload(t,r,n){this.prepareLoading(t,r,{reload:!0},n)}loadOne(t,r=""){const n=t.split("|"),i=n[0],a=n[1];this.read(i,a,"read",void 0,void 0,(o,l)=>{o&&this.logger.warn(`${r}loading namespace ${a} for language ${i} failed`,o),!o&&l&&this.logger.log(`${r}loaded namespace ${a} for language ${i}`,l),this.loaded(t,o,l)})}saveMissing(t,r,n,i,a,o={},l=()=>{}){var c,u,f,x,m;if((u=(c=this.services)==null?void 0:c.utils)!=null&&u.hasLoadedNamespace&&!((x=(f=this.services)==null?void 0:f.utils)!=null&&x.hasLoadedNamespace(r))){this.logger.warn(`did not save key "${n}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if((m=this.backend)!=null&&m.create){const p={...o,isUpdate:a},y=this.backend.create.bind(this.backend);if(y.length<6)try{let v;y.length===5?v=y(t,r,n,i,p):v=y(t,r,n,i),v&&typeof v.then=="function"?v.then(b=>l(null,b)).catch(l):l(null,v)}catch(v){l(v)}else y(t,r,n,i,l,p)}!t||!t[0]||this.store.addResource(t[0],r,n,i)}}}const ZR=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),Ot(e[1])&&(t.defaultValue=e[1]),Ot(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const r=e[3]||e[2];Object.keys(r).forEach(n=>{t[n]=r[n]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),JR=e=>{var t,r;return Ot(e.ns)&&(e.ns=[e.ns]),Ot(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Ot(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),((r=(t=e.supportedLngs)==null?void 0:t.indexOf)==null?void 0:r.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e},Hp=()=>{},mke=e=>
284{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(r=>{typeof e[r]=="function"&&(e[r]=e[r].bind(e))})};class Ch extends tv{constructor(t={},r){if(super(),this.options=JR(t),this.services={},this.logger=Na,this.modules={external:[]},mke(this),r&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,r),this;setTimeout(()=>{this.init(t,r)},0)}}init(t={},r){this.isInitializing=!0,typeof t=="function"&&(r=t,t={}),t.defaultNS==null&&t.ns&&(Ot(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const n=ZR();this.options={...n,...this.options,...JR(t)},this.options.interpolation={...n.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const i=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?Na.init(i(this.modules.logger),this.options):Na.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=xke;const f=new GR(this.options);this.store=new qR(this.options.resources,this.options);const x=this.services;x.logger=Na,x.resourceStore=this.store,x.languageUtils=f,x.pluralResolver=new lke(f,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(x.formatter=i(u),x.formatter.init(x,this.options),this.options.interpolation.format=x.formatter.format.bind(x.formatter)),x.interpolator=new cke(this.options),x.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},x.backendConnector=new hke(i(this.modules.backend),x.resourceStore,x,this.options),x.backendConnector.on("*",(m,...p)=>{this.emit(m,...p)}),this.modules.languageDetector&&(x.languageDetector=i(this.modules.languageDetector),x.languageDetector.init&&x.languageDetector.init(x,this.options.detection,this.options)),this.modules.i18nFormat&&(x.i18nFormat=i(this.modules.i18nFormat),x.i18nFormat.init&&x.i18nFormat.init(this)),this.translator=new Q1(this.services,this.options),this.translator.on("*",(m,...p)=>{this.emit(m,...p)}),this.modules.external.forEach(m=>{m.init&&m.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Hp),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=(...f)=>this.store[u](...f)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=(...f)=>(this.store[u](...f),this)});const l=Mx(),c=()=>{const u=(f,x)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(x),r(f,x)};if(this.languages&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?c():setTimeout(c,0),l}loadResources(t,r=Hp){var a,o;let n=r;const i=Ot(t)?t:this.language;if(typeof t=="function"&&(n=t),!this.options.resources||this.options.partialBundledLanguages){if((i==null?void 0:i.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const l=[],c=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(x=>{x!=="cimode"&&l.indexOf(x)<0&&l.push(x)})};i?c(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(f=>c(f)),(o=(a=this.options.preload)==null?void 0:a.forEach)==null||o.call(a,u=>c(u)),this.services.backendConnector.load(l,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(u)})}else n(null)}reloadResources(t,r,n){const i=Mx();return typeof t=="function"&&(n=t,t=void 0),typeof r=="function"&&(n=r,r=void 0),t||(t=this.languages),r||(r=this.options.ns),n||(n=Hp),this.services.backendConnector.reload(t,r,a=>{i.resolve(),n(a)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&RG.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1)){for(let r=0;r<this.languages.length;r++){const n=this.languages[r];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,r){this.isLanguageChangingTo=t;const n=Mx();
284this.emit("languageChanging",t);const i=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},a=(l,c)=>{c?this.isLanguageChangingTo===t&&(i(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,n.resolve((...u)=>this.t(...u)),r&&r(l,(...u)=>this.t(...u))},o=l=>{var f,x;!t&&!l&&this.services.languageDetector&&(l=[]);const c=Ot(l)?l:l&&l[0],u=this.store.hasLanguageSomeTranslations(c)?c:this.services.languageUtils.getBestMatchFromCodes(Ot(l)?[l]:l);u&&(this.language||i(u),this.translator.language||this.translator.changeLanguage(u),(x=(f=this.services.languageDetector)==null?void 0:f.cacheUserLanguage)==null||x.call(f,u)),this.loadResources(u,m=>{a(m,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(t),n}getFixedT(t,r,n){const i=(a,o,...l)=>{let c;typeof o!="object"?c=this.options.overloadTranslationOptionHandler([a,o].concat(l)):c={...o},c.lng=c.lng||i.lng,c.lngs=c.lngs||i.lngs,c.ns=c.ns||i.ns,c.keyPrefix!==""&&(c.keyPrefix=c.keyPrefix||n||i.keyPrefix);const u=this.options.keySeparator||".";let f;return c.keyPrefix&&Array.isArray(a)?f=a.map(x=>`${c.keyPrefix}${u}${x}`):f=c.keyPrefix?`${c.keyPrefix}${u}${a}`:a,this.t(f,c)};return Ot(t)?i.lng=t:i.lngs=t,i.ns=r,i.keyPrefix=n,i}t(...t){var r;return(r=this.translator)==null?void 0:r.translate(...t)}exists(...t){var r;return(r=this.translator)==null?void 0:r.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,r={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;
284if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=r.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const o=(l,c)=>{const u=this.services.backendConnector.state[`${l}|${c}`];return u===-1||u===0||u===2};if(r.precheck){const l=r.precheck(this,o);if(l!==void 0)return l}return!!(this.hasResourceBundle(n,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,t)&&(!i||o(a,t)))}loadNamespaces(t,r){const n=Mx();return this.options.ns?(Ot(t)&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),r&&r(i)}),n):(r&&r(),Promise.resolve())}loadLanguages(t,r){const n=Mx();Ot(t)&&(t=[t]);const i=this.options.preload||[],a=t.filter(o=>i.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return a.length?(this.options.preload=i.concat(a),this.loadResources(o=>{n.resolve(),r&&r(o)}),n):(r&&r(),Promise.resolve())}dir(t){var i,a;if(t||(t=this.resolvedLanguage||(((i=this.languages)==null?void 0:i.length)>0?this.languages[0]:this.language)),!t)return"rtl";const r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=((a=this.services)==null?void 0:a.languageUtils)||new GR(ZR());return r.indexOf(n.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},r){return new Ch(t,r)}cloneInstance(t={},r=Hp){const n=t.forkResourceStore;n&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},a=new Ch(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),["store","services","language"].forEach(l=>{a[l]=this[l]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},n){const l=Object.keys(this.store.data).reduce((c,u)=>(c[u]={...this.store.data[u]},c[u]=Object.keys(c[u]).reduce((f,x)=>(f[x]={...c[u][x]},f),c[u]),c),{});a.store=new qR(l,i),a.services.resourceStore=a.store}return a.translator=new Q1(a.services,i),a.translator.on("*",(l,...c)=>{a.emit(l,...c)}),a.init(i,r),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const is=Ch.createInstance();is.createInstance=Ch.createInstance;is.createInstance;is.dir;is.init;is.loadResources;is.reloadResources;is.use;is.changeLanguage;is.getFixedT;is.t;is.exists;is.setDefaultNamespace;is.hasLoadedNamespace;is.loadNamespaces;is.loadLanguages;const{slice:pke,forEach:gke}=[];function yke(e){return gke.call(pke.call(arguments,1),t=>{if(t)for(const r in t)e[r]===void 0&&(e[r]=t[r])}),e}
284function vke(e){return typeof e!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(r=>r.test(e))}const e_=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,bke=function(e,t){const n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},i=encodeURIComponent(t);let a=`${e}=${i}`;if(n.maxAge>0){const o=n.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");a+=`; Max-Age=${Math.floor(o)}`}if(n.domain){if(!e_.test(n.domain))throw new TypeError("option domain is invalid");a+=`; Domain=${n.domain}`}if(n.path){if(!e_.test(n.path))throw new TypeError("option path is invalid");a+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(a+="; HttpOnly"),n.secure&&(a+="; Secure"),n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return n.partitioned&&(a+="; Partitioned"),a},t_={create(e,t,r,n){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+r*60*1e3)),n&&(i.domain=n),document.cookie=bke(e,t,i)},read(e){const t=`${e}=`,r=document.cookie.split(";");for(let n=0;n<r.length;n++){let i=r[n];for(;i.charAt(0)===" ";)i=i.substring(1,i.length);if(i.indexOf(t)===0)return i.substring(t.length,i.length)}return null},remove(e,t){this.create(e,"",-1,t)}};var Cke={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return t_.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:r,cookieMinutes:n,cookieDomain:i,cookieOptions:a}=t;r&&typeof document<"u"&&t_.create(r,e,n,i,a)}},wke={name:"querystring",lookup(e){var n;let{lookupQuerystring:t}=e,r;if(typeof window<"u"){let{search:i}=window.location;!window.location.search&&((n=window.location.hash)==null?void 0:n.indexOf("?"))>-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const o=i.substring(1).split("&");for(let l=0;l<o.length;l++){const c=o[l].indexOf("=");c>0&&o[l].substring(0,c)===t&&(r=o[l].substring(c+1))}}return r}},Eke={name:"hash",lookup(e){var i;let{lookupHash:t,lookupFromHashIndex:r}=e,n;if(typeof window<"u"){const{hash:a}=window.location;if(a&&a.length>2){const o=a.substring(1);if(t){const l=o.split("&");for(let c=0;c<l.length;c++){const u=l[c].indexOf("=");u>0&&l[c].substring(0,u)===t&&(n=l[c].substring(u+1))}}if(n)return n;if(!n&&r>-1){const l=a.match(/\/([a-zA-Z-]*)/g);return Array.isArray(l)?(i=l[typeof r=="number"?r:0])==null?void 0:i.replace("/",""):void 0}}}return n}};let Uu=null;const r_=()=>{if(Uu!==null)return Uu;try{if(Uu=typeof window<"u"&&window.localStorage!==null,!Uu)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Uu=!1}return Uu};var jke={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&r_())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:r}=t;r&&r_()&&window.localStorage.setItem(r,e)}};let qu=null;const n_=()=>{if(qu!==null)return qu;try{if(qu=typeof window<"u"&&window.sessionStorage!==null,!qu)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{qu=!1}return qu};var Nke={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&n_())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:r}=t;r&&n_()&&window.sessionStorage.setItem(r,e)}},Ake={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:r,userLanguage:n,language:i}=navigator;if(r)for(let a=0;a<r.length;a++)t.push(r[a]);
284n&&t.push(n),i&&t.push(i)}return t.length>0?t:void 0}},kke={name:"htmlTag",lookup(e){let{htmlTag:t}=e,r;const n=t||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(r=n.getAttribute("lang")),r}},Ske={name:"path",lookup(e){var i;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(r)?(i=r[typeof t=="number"?t:0])==null?void 0:i.replace("/",""):void 0}},Bke={name:"subdomain",lookup(e){var i,a;let{lookupFromSubdomainIndex:t}=e;const r=typeof t=="number"?t+1:1,n=typeof window<"u"&&((a=(i=window.location)==null?void 0:i.hostname)==null?void 0:a.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(n)return n[r]}};let _G=!1;try{document.cookie,_G=!0}catch{}const IG=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];_G||IG.splice(1,1);const Dke=()=>({order:IG,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class $G{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,r)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=yke(r,this.options||{},Dke()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(Cke),this.addDetector(wke),this.addDetector(jke),this.addDetector(Nke),this.addDetector(Ake),this.addDetector(kke),this.addDetector(Ske),this.addDetector(Bke),this.addDetector(Eke)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,r=[];return t.forEach(n=>{if(this.detectors[n]){let i=this.detectors[n].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(r=r.concat(i))}}),r=r.filter(n=>n!=null&&!vke(n)).map(n=>this.options.convertDetectedLanguage(n)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?r:r.length>0?r[0]:null}cacheUserLanguage(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||r.forEach(n=>{this.detectors[n]&&this.detectors[n].cacheUserLanguage(t,this.options)}))}}$G.type="languageDetector";const Fke={loading:"Loading...",error:"Error",success:"Success",confirm:"Confirm",cancel:"Cancel",close:"Close",save:"Save",delete:"Delete",edit:"Edit",back:"Back",refresh:"Refresh",yes:"Yes",no:"No",ok:"OK",continue:"Continue",next:"Next",previous:"Previous",submit:"Submit",logout:"Logout",login:"Login",signup:"Sign up",forgotPassword:"Forgot password",resetPassword:"Reset password",changePassword:"Change password",password:"Password",email:"Email",phoneNumber:"Phone number",phone:"Phone",username:"Username",name:"Name",firstName:"First name",lastName:"Last name",address:"Address",city:"City",country:"Country",zipCode:"Zip code",profile:"Profile",settings:"Settings",help:"Help",about:"About",version:"Version",language:"Language",notifications:"Notifications",privacy:"Privacy",terms:"Terms of use",empty:"No items",noData:"No data",searchPlaceholder:"Search...",filter:"Filter",sort:"Sort",more:"More",less:"Less",view:"View",hide:"Hide",show:"Show",download:"Download",upload:"Upload",send:"Send",receive:"Receive",copy:"Copy",copied:"Copied",copyLink:"Copy link",share:"Share",export:"Export",import:"Import",print:"Print",home:"Home",done:"Done",pleaseWait:"Please wait",tryAgain:"Try again",invalidInput:"Invalid input",required:"Required",optional:"Optional",statuses:{pending:"Pending",pendingOTP:"Pending OTP verification",pendingAdminApproval:"Pending approval",processing:"Processing",completed:"Completed",failed:"Failed",rejectedByAdmin:"Rejected",cancelled:"Cancelled",refunded:"Refunded"}
284,withdrawal:{pendingApprovalTitle:"Pending approval",pendingApprovalMessage:"Your withdrawal request is being verified by our team. You will be notified as soon as it is approved.",rejectedTitle:"Withdrawal rejected",rejectedMessage:"Your balance has been refunded.",estimatedApprovalTime:"Estimated approval time: 1-24 hours",submittedSuccessTitle:"Withdrawal submitted!",submittedSuccessMessage:"Your withdrawal request has been submitted successfully.",submittedSuccessInfo:"Your withdrawal is pending approval. We will notify you as soon as it is processed.",viewTransactions:"View my transactions",importantInfo:"Important",allWithdrawalsVerified:"All withdrawals are subject to verification for your security.",approvalTime:"Approval time: 1-24 hours",willBeNotified:"You will be notified of your withdrawal status.",pendingWithdrawalExists:"You already have a pending withdrawal",waitForProcessing:"Please wait for it to be processed before submitting a new request.",viewMyWithdrawals:"View my withdrawals",rejectionReason:"Reason: {reason}",rejectionDate:"Rejection date: {date}",balanceRefunded:"Your balance has been refunded."}},Pke=JSON.parse(`{"connexion":{"title":"Login","loginHere":"Login here","emailOrPhone":"Email or phone number","emailOrPhonePlaceholder":"E.g.: [email protected] or 237670123456","emailPhoneHint":"You can use your email ([email protected]) or phone number (237670123456)","password":"Password","forgotPassword":"Forgot password?","connectButton":"Login","noAccount":"Don't have an account?","createAccount":"Create an account","orConnectWith":"Or connect with","invalidEmailOrPhone":"Please enter a valid email or phone number.","passwordMinLength":"Password must be at least 6 characters.","loginFailed":"Login failed","checkCredentials":"Please check your credentials","accountBlocked":"Your account has been blocked","tooManyAttempts":"Too many attempts. Please try again later.","contactSupport":"Please contact support","recoveryMessage":"Your account information has been lost, but your transactions can be recovered!"},"signup":{"title":"Create an account","subtitle":"Create an account to grow your network and increase your earnings","fullName":"👤 Full name","fullNamePlaceholder":"E.g: John Paul","email":"📧 Email","emailPlaceholder":"E.g: [email protected]","password":"🔒 Password","passwordPlaceholder":"Password","confirmPassword":"🔐 Confirm password","confirmPasswordPlaceholder":"Confirm password","whatsapp":"📱 WhatsApp number","whatsappPlaceholder":"E.g: 675090755","city":"🏙️ City","cityPlaceholder":"E.g: Douala","region":"🗺️ Region","regionPlaceholder":"Enter region","dateOfBirth":"🎂 Date of birth","gender":"⚧️ Gender","genderPlaceholder":"Select","genderMale":"Male","genderFemale":"Female","genderOther":"Other","country":"🌍 Country","countryPlaceholder":"Select country","profession":"💼 Profession","professionPlaceholder":"Select profession","language":"🗣️ Language","languagePlaceholder":"Select language","languageFrench":"French","languageEnglish":"English","interests":"❤️ Interests","notificationPreference":"📬 Notification preferences","notificationEmail":"Email","notificationEmailDesc":"Receive OTP codes by email","notificationWhatsapp":"WhatsApp","notificationWhatsappDesc":"Receive OTP codes via WhatsApp","notificationHint":"💡 You can change this preference later","affiliationCode":"🔗 Sponsor code","affiliationCodePlaceholder":"Sponsor code","affiliationVerifying":"Verifying sponsor code...","affiliationSponsor":"Sponsor: {affiliateName}","affiliationInvalid":"Invalid sponsor code.","affiliationCheckError":"Error verifying sponsor code.","termsCheckbox":"I accept the terms of use","previousButton":"Previous","nextButton":"Next","verifyingButton":"Verifying...","signupButton":"Sign up","signupRecoverButton":"Sign up & Recover","alreadyHaveAccount":"Already have an account?","loginLink":"Login","termsLink":"Terms of use","termsLoading":"Loading terms of use...","termsError":"Error loading terms of use.","termsClickHint":"Please click the link to open the terms of use.","validationFullNameRequired":"Full name required","validationEmailInvalid":"Invalid email","validationPasswordLength":"Password must be at least 8 characters.","validationPasswordMismatch":"Passwords do not match","validationWhatsappRequired":"WhatsApp number required","validationCityRequired":"City required","validationRegionRequired":"Region required","validationDateRequired":"Date required","validationGenderRequired":"Gender required","validationCountryRequired":"Country required","validationProfessionRequired":"Profession required","validationLanguageRequired":"Language required","validationInterestsRequired":"At least one interest required","validationAffiliationRequired":"Sponsor code required.","validationAffiliationInvalid":"Invalid or unverified sponsor code.","emailAlreadyExists":"This email is already in use.","emailCheckError":"Error verifying email.","whatsappAlreadyExists":"This WhatsApp number is already in use.","whatsappCheckError":"Error verifying WhatsApp number.","recoveryDetected":"Recoverable account detected ({transactionCount} transaction{transactionCount > 1 ? 's' : ''}, {totalAmount} XAF)","recoveryVerifying":"Verifying recovery...","signupSuccess":"Sign up successful","signupHere":"Sign up here"},"home":{"title":"Home","welcome":"Welcome","balance":"Balance","myBalance":"My balance","earnings":"Earnings","referrals":"Referrals","totalReferrals":"Total referrals","level1":"Level 1","level2":"Level 2","level3":"Level 3","myProducts":"My products","mySubscription":"My subscription","noSubscription":"No subscription","activeSubscription":"Active subscription","subscriptionExpires":"Expires on","marketplace":"Marketplace","wallet":"Wallet","profile":"Profile","formations":"Trainings","viewFormations":"View trainings","negativeBalance":"Negative balance","balanceWarning":"You have a negative balance. Please top up your account.","errorLoading":"Error loading","retryButton":"Retry","services":"Our services","trainingsButton":"Trainings","marketplaceButton":"Marketplace","contactsButton":"Contacts","relanceButton":"Follow-up","comingSoon":"Coming soon","presentation":"Presentation","downloadPresentation":"Download the SBC presentation document","formationsTitle":"Available Trainings","formationsError":"Error loading trainings.","formationsEmpty":"No trainings available at the moment.","formationsClose":"Close","subscribed":"Subscribed","notSubscribed":"Not subscribed","defaultUser":"User"},"profile":{"title":"Profile","myProfile":"My profile","editProfile":"Edit profile","changeEmail":"Change email","changePhone":"Change phone number","changePassword":"Change password","mySubscription":"My subscription","myReferrals":"My referrals","myAffiliator":"My sponsor","partnerSpace":"Partner space","joinCommunity":"Join the community","referralCode":"Referral code","referralLink":"Referral link","copyCode":"Copy code","copyLink":"Copy link","shareable":"Shareable","viewAffiliator":"View my sponsor","comingSoon":"Coming soon","logoutConfirm":"Are you sure you want to logout?","logout":"Logout","notificationOTP":"OTP Notifications:","notificationWhatsapp":"📱 WhatsApp","notificationEmail":"📧 Email","referralDirect":"Direct:","referralIndirect":"Indirect:","copyReferralCode":"Copy my referral code","copied":"Copied!","copyReferralLink":"Copy my link","changeReferralCode":"Change my referral code","logoutError":"Logout failed.","loadingAffiliatorInfo":"Loading sponsor information...","noAffiliatorInfo":"You don't have a sponsor or the information is not available.","changeReferralCodeModal":"Change referral code","newReferralCode":"New referral code","newReferralCodePlaceholder":"Enter new code","saveButton":"Save","cancelButton":"Cancel","affiliatorInfoModal":"Sponsor information","closeButton":"Close","successMessage":"Success","errorMessage":"Error","confirmMessage":"Confirmation","confirmButton":"Confirm","usageGuideButton":"View usage guide","developedBy":"Developed by simbtech"},"wallet":{"title":"Wallet","myWallet":"My wallet","yourBalances":"Your balances","balance":"Balance","fcfa":"FCFA","usd":"USD","earnings":"Earnings","withdrawals":"Withdrawals","totalEarnings":"Total earnings","totalWithdrawals":"Total withdrawals","depositButton":"Deposit","withdrawButton":"Withdraw","convertButton":"Convert","recentTransactions":"Recent transactions","noRecentTransactions":"No recent transactions","viewAllTransactions":"View all transactions","allTransactions":"All transactions","transactionHistory":"Transaction history","filters":"Filters","filterByType":"Filter by type","filterByDate":"Filter by date","deposit":"Deposit","withdrawal":"Withdrawal","commission":"Commission","bonus":"Bonus","transfer":"Transfer","other":"Other","amount":"Amount","date":"Date","status":"Status","pen
284ding":"Pending","completed":"Completed","processing":"Processing","pendingOTP":"Pending OTP","failed":"Failed","cancelled":"Cancelled","viewDetails":"View details","withdrawalMobileMoneyTitle":"Mobile Money Withdrawal","withdrawalInfo":"Select your balance. USD will be automatically converted to FCFA for Mobile Money.","selectBalance":"Balance to use:","primaryBalance":"Primary Balance","usdBalance":"USD Balance","selected":"✓ Selected","withdrawAmount":"Withdrawal amount ({selectedBalanceType})","negativeBalanceWarning":"⚠️ Cannot withdraw with a negative balance.","amountPlaceholder":"Amount in {selectedBalanceType}","withdrawalAmount":"Withdrawal amount:","fees":"Fees (2.5%):","withdrawalMethod":"Withdrawal method:","cryptoWallet":"🪙 Crypto ({currency})","cryptoNotConfigured":"Not configured","totalDeducted":"Total deducted from {selectedBalanceType} balance:","insufficientBalance":"⚠️ {selectedBalanceType} balance insufficient. Current balance:","transactionSummary":"Transaction summary","received":"Received","withdrawn":"Withdrawn","daily":"Daily","weekly":"Weekly","monthly":"Monthly","conversionRate":"💡 USD converted at 1:500 FCFA for the chart","conversionInfo":"💡 USD amounts converted to FCFA (1:500) for chart display","noTransactionFound":"No transactions found.","allTransactionsLoaded":"All transactions have been loaded.","transactionID":"Transaction ID","transactionType":"Type","description":"Description","reference":"Reference","shareButton":"Share","cancelButton":"Cancel","closeButton":"Close","historyModalTitle":"Transaction history","transactionCopied":"Transaction copied to clipboard!","errorLoading":"Error loading","retryButton":"Retry","invalidAmount":"Invalid amount: must be greater than 0","cryptoPendingMessage":"Crypto withdrawal initiated. An OTP code has been sent to your phone number. Please verify it.","cryptoSuccess":"Crypto withdrawal initiated successfully! Amount: \${amount} to {currency} ({address}...)","mobileMoneyConfirm":"Withdrawal initiated. An OTP code has been sent to your phone number. Please verify it.","mobileMoneyProcessing":"Withdrawal initiated and processing. An OTP code has been sent to your phone number. Please verify it.","pendingWithdrawal":"You have a pending withdrawal request (ID: {transactionId}) that is being processed...","unexpectedError":"An unexpected error occurred while initiating withdrawal. Please retry.","withdrawalFailed":"Withdrawal initiation failed.","validAmountError":"Please enter a valid withdrawal amount.","transactionCancelled":"Transaction cancelled successfully.","cancellationError":"Error cancelling transaction.","negativeBalanceError":"Cannot withdraw with negative balances...","negativeConversionError":"Cannot convert with negative balances..."},"marketplace":{"title":"Marketplace","header":"Marketplace","products":"Products","myProducts":"My products","addProduct":"Add product","editProduct":"Edit product","deleteProduct":"Delete product","productName":"Product name","description":"Description","price":"Price","category":"Category","image":"Image","inStock":"In stock","outOfStock":"Out of stock","quantity":"Quantity","searchProducts":"Search products","searchPlaceholder":"Search a product or service","filterByCategory":"Filter by category","sortByPrice":"Sort by price","noProducts":"No products","noResultsFor":"No {category} found","addToCart":"Add to cart","removeFromCart":"Remove from cart","checkout":"Checkout","cart":"Cart","emptyCart":"Empty cart","totalPrice":"Total price","shippingAddress":"Shipping address","paymentMethod":"Payment method","sellBuyPrompt":"Sell and buy <br /> products and services","specialOffers":"Special offers","categories":"Categories","all":"All","services":"Services","productsCategory":"Products","errorLoading":"Error loading","retryButton":"Retry","menuAddProduct":"Add product","menuViewProducts":"View my products"},"subscription":{"title":"Subscription","mySubscription":"My subscription","plans":"Plans","basic":"Basic","premium":"Premium","professional":"Professional","enterprise":"Enterprise","features":"Features","price":"Price","subscribe":"Subscribe","upgrade":"Upgrade","downgrade":"Downgrade","renew":"Renew","cancel":"Cancel","active":"Active","expired":"Expired","expiresOn":"Expires on","autoRenew":"Auto renew
284al","enable":"Enable","disable":"Disable","manageSubscription":"Manage subscription","billingHistory":"Billing history","invoices":"Invoices"},"products":{"myProducts":"My products","addProduct":"Add product","editProduct":"Edit product","deleteProduct":"Delete product","productName":"Product name","description":"Description","price":"Price","category":"Category","image":"Image","images":"Images","inStock":"In stock","outOfStock":"Out of stock","quantity":"Quantity","sku":"SKU","details":"Details","specifications":"Specifications","reviews":"Reviews","rating":"Rating","noProducts":"No products","productAdded":"Product added","productUpdated":"Product updated","productDeleted":"Product deleted","deleteConfirm":"Are you sure you want to delete this product?","confirmDelete":"Confirm delete"},"mesFilleuls":{"title":"My referrals","myReferrals":"My referrals","directReferrals":"Direct referrals","indirectReferrals":"Indirect referrals","totalReferrals":"Total referrals","level1":"Level 1","level2":"Level 2","level3":"Level 3","name":"Name","email":"Email","phoneNumber":"Phone number","joinDate":"Join date","status":"Status","active":"Active","
284inactive":"Inactive","earnings":"Earnings","noReferrals":"No referrals","inviteReferral":"Invite a referral","shareReferralLink":"Share referral link","copyLink":"Copy link","copiedLink":"Link copied","referralStats":"Referral stats"},"otp":{"title":"OTP Verification","enterOtp":"Enter OTP code","otpSent":"An OTP code has been sent to","otpExpires":"OTP code expires in","resendOtp":"Resend code","verifyOtp":"Verify code","invalidOtp":"Invalid OTP code","otpExpired":"OTP code expired","resendIn":"Resend in","seconds":"seconds","minutes":"minutes"},"password":{"title":"Password","currentPassword":"Current password","newPassword":"New password","confirmPassword":"Confirm password","passwordChanged":"Password changed","passwordChangedSuccess":"Your password has been changed successfully","oldPasswordIncorrect":"Old password is incorrect","passwordMismatch":"Passwords do not match","passwordStrength":"Password strength","weak":"Weak","medium":"Medium","strong":"Strong","veryStrong":"Very strong"},"email":{"title":"Email","currentEmail":"Current email","newEmail":"New email","confirmEmail":"Confirm email","emailChanged":"Email changed","emailChangedSuccess":"Your email has been changed successfully","emailAlreadyExists":"This email is already in use","verifyEmail":"Verify email","emailVerified":"Email verified","emailNotVerified":"Email not verified"},"phone":{"title":"Phone number","currentPhone":"Current phone number","newPhone":"New phone number","confirmPhone":"Confirm phone number","phoneChanged":"Phone number changed","phoneChangedSuccess":"Your phone number has been changed successfully","phoneAlreadyExists":"This phone number is already in use","verifyPhone":"Verify phone number","phoneVerified":"Phone number verified"},"relance":{"title":"Follow-up"}}`),Tke={success:"Success",error:"Error",warning:"Warning",info:"Information",loading:"Loading...",saved:"Saved",deleted:"Deleted",updated:"Updated",created:"Created",failedToLoad:"Failed to load",failedToSave:"Failed to save",failedToDelete:"Failed to delete",failedToUpdate:"Failed to update",failedToCreate:"Failed to create",networkError:"Network error",pleaseCheckConnection:"Please check your connection",tryAgain:"Try again",contactSupport:"Contact support"},Mke={common:Fke,pages:Pke,messages:Tke},Oke={loading:"Chargement...",error:"Erreur",success:"Succès",confirm:"Confirmer",cancel:"Annuler",close:"Fermer",save:"Enregistrer",delete:"Supprimer",edit:"Modifier",back:"Retour",refresh:"Actualiser",yes:"Oui",no:"Non",ok:"OK",continue:"Continuer",next:"Suivant",previous:"Précédent",submit:"Envoyer",logout:"Déconnexion",login:"Connexion",signup:"S'inscrire",forgotPassword:"Mot de passe oublié",resetPassword:"Réinitialiser le mot de passe",changePassword:"Changer le mot de passe",password:"Mot de passe",email:"Email",phoneNumber:"Numéro de téléphone",phone:"Téléphone",username:"Nom d'utilisateur",name:"Nom",firstName:"Prénom",lastName:"Nom de famille",address:"Adresse",city:"Ville",country:"Pays",zipCode:"Code postal",profile:"Profil",settings:"Paramètres",help:"Aide",about:"À propos",version:"Version",language:"Langue",notifications:"Notifications",privacy:"Confidentialité",terms:"Conditions d'utilisation",empty:"Aucun élément",noData:"Pas de données",searchPlaceholder:"Rechercher...",filter:"Filtrer",sort:"Trier",more:"Plus",less:"Moins",view:"Voir",hide:"Masquer",show:"Afficher",download:"Télécharger",upload:"Téléverser",send:"Envoyer",receive:"Recevoir",copy:"Copier",copied:"Copié",copyLink:"Copier le lien",share:"Partager",export:"Exporter",import:"Importer",print:"Imprimer",home:"Accueil",done:"Fait",pleaseWait:"Veuillez patienter",tryAgain:"Réessayer",invalidInput:"Entrée invalide",required:"Requis",optional:"Optionnel",statuses:{pending:"En attente",pendingOTP:"En attente de vérification OTP",pendingAdminApproval:"En attente d'approbation",processing:"En cours de traitement",completed:"Terminé",failed:"Échoué",rejectedByAdmin:"Rejeté",cancelled:"Annulé",refunded:"Remboursé"},withdrawal:{pendingApprovalTitle:"En attente d'approbation",pendingApprovalMessage:"Votre demande de retrait est en cours de vérification par notre équipe. Vous serez notifié dès qu'elle sera approuvée.",rejectedTitle:"Retrait rejeté",rejectedMessage:"Votre solde a été remboursé.",estimatedApprovalTime:"Temps d'approbation estimé: 1-24 heures",submittedSuccessTitle:"Retrait soumis!",submittedSuccessMessage:"Votre demande de retrait a été soumise avec succès.",submittedSuccessInfo:"Votre retrait est en attente d'approbation. Nous vous notifierons dès qu'il sera traité.",viewTransactions:"Voir mes transactions",importantInfo:"Important",allWithdrawalsVerified:"Tous les retraits sont soumis à une vérification pour votre sécurité.",approvalTime:"Temps d'approbation: 1-24 heures",willBeNotified:"Vous serez notifié du statut de votre retrait.",pendingWithdrawalExists:"Vous avez déjà un retrait en attente d'approbation",waitForProcessing:"Veuillez attendre qu'il soit traité avant de soumettre une nouvelle demande.",viewMyWithdrawals:"Voir mes retraits",rejectionReason:"Raison: {reason}",rejectionDate:"Date de rejet: {date}",balanceRefunded:"Votre solde a été remboursé."}},Lke=JSON.parse(`{"connexion":{"title":"Connexion","loginHere":"Se connecter ici","emailOrPhone":"Email ou numéro de téléphone","emailOrPhonePlaceholder":"Ex : [email protected] ou 237670123456","emailPhoneHint":"Vous pouvez utiliser votre email ([email protected]) ou numéro de téléphone (237670123456)","password":"Mot de passe","forgotPassword":"Mot de passe oublié ?","connectButton":"Se connecter","noAccount":"Vous n'avez pas de compte ?","createAccount":"Créer un compte","orC
284onnectWith":"Ou connectez-vous avec","invalidEmailOrPhone":"Veuillez entrer un email ou numéro de téléphone valide.","passwordMinLength":"Le mot de passe doit contenir au moins 6 caractères.","loginFailed":"Échec de la connexion","checkCredentials":"Veuillez vérifier vos identifiants","accountBlocked":"Votre compte a été bloqué","tooManyAttempts":"Trop de tentatives. Veuillez réessayer plus tard.","contactSupport":"Veuillez contacter le support","recoveryMessage":"Vos informations de compte ont été perdues, mais vos transactions peuvent être récupérées !"},"signup":{"title":"Créer un compte","subtitle":"Créez un compte pour développer votre réseau et augmenter vos revenus","fullName":"👤 Nom complet","fullNamePlaceholder":"Ex: Jean Paul","email":"📧 Email","emailPlaceholder":"Ex: [email protected]","password":"🔒 Mot de passe","passwordPlaceholder":"Mot de passe","confirmPassword":"🔐 Confirmer le mot de passe","confirmPasswordPlaceholder":"Confirmer mot de passe","whatsapp":"📱 Numéro WhatsApp","whatsappPlaceholder":"Ex: 675090755","city":"🏙️ Ville","cityPlaceholder":"Ex: Douala","region":"🗺️ Région","regionPlaceholder":"Entrer la région","dateOfBirth":"🎂 Date de naissance","gender":"⚧️ Sexe","genderPlaceholder":"Sélectionner","genderMale":"Homme","genderFemale":"Femme","genderOther":"Autre","country":"🌍 Pays","countryPlaceholder":"Sélectionner le pays","profession":"💼 Profession","professionPlaceholder":"Sélectionner la profession","language":"🗣️ Langue","languagePlaceholder":"Sélectionner la langue","languageFrench":"Français","languageEnglish":"Anglais","interests":"❤️ Centres d'intérêt","notificationPreference":"📬 Préférences de notification","notificationEmail":"Email","notificationEmailDesc":"Recevoir les codes OTP par email","notificationWhatsapp":"WhatsApp","notificationWhatsappDesc":"Recevoir les codes OTP via WhatsApp","notificationHint":"💡 Vous pourrez modifier cette préférence plus tard","affiliationCode":"🔗 Code parrain","affiliationCodePlaceholder":"Code du parrain","affiliationVerifying":"Vérification du code parrain...","affiliationSponsor":"Parrain: {affiliateName}","affiliationInvalid":"Code parrain invalide.","affiliationCheckError":"Erreur lors de la vérification du code parrain.","termsCheckbox":"J'accepte les conditions d'utilisation","previousButton":"Précédent","nextButton":"Suivant","verifyingButton":"Vérification...","signupButton":"S'inscrire","signupRecoverButton":"S'inscrire & Récupérer","alreadyHaveAccount":"Déjà un compte ?","loginLink":"Connexion","termsLink":"Conditions d'utilisation","termsLoading":"Chargement des conditions d'utilisation...","termsError":"Erreur lors du chargement des conditions d'utilisation.","termsClickHint":"Veuillez cliquer sur le lien pour ouvrir les conditions d'utilisation.","validationFullNameRequired":"Nom complet requis","validationEmailInvalid":"Email invalide","validationPasswordLength":"Mot de passe doit avoir au moins 8 caractères.","validationPasswordMismatch":"Les mots de passe ne correspondent pas","validationWhatsappRequired":"Numéro WhatsApp requis","validationCityRequired":"Ville requise","validationRegionRequired":"Région requise","validationDateRequired":"Date requise","validationGenderRequired":"Sexe requis","validationCountryRequired":"Pays requis","validationProfessionRequired":"Profession requise","validationLanguageRequired":"Langue requise","validationInterestsRequired":"Au moins un centre d'intérêt requis","validationAffiliationRequired":"Code parrain requis.","validationAffiliationInvalid":"Code parrain invalide ou non vérifié.","emailAlreadyExists":"Cet email est déjà utilisé.","emailCheckError":"Erreur lors de la vérification de l'email.","whatsappAlreadyExists":"Ce numéro WhatsApp est déjà utilisé.","whatsappCheckError":"Erreur lors de la vérification du numéro WhatsApp.","recoveryDetected":"Compte récupérable détecté ({transactionCount} transaction{transactionCount > 1 ? 's' : ''}, {totalAmount} XAF)","recoveryVerifying":"Vérification de récupération...","signupSuccess":"Inscription réussie","signupHere":"S'inscrire ici"},"home":{"title":"Accueil","welcome":"Bienvenue","balance":"Solde","myBalance":"Mon solde","earnings":"Gains","referrals":"Filleuls","totalReferrals":"Total des filleuls","level1":"Niveau 1","level2":"Niveau 2","level3":"Niveau 3","myProducts":"Mes produits","mySubscription":"Mon abonnement","noSubscription":"Pas d'abonnement","activeSubscription":"Abonnement actif","subscriptionExpires":"Expire le","marketplace":"Marketplace","wallet":"Portefeuille","profile":"Profil","formations":"Formations","viewFormations":"Voir les formations","negativeBalance":"Solde négatif","balanceWarning":"Vous avez un solde négatif. Veuillez recharger votre compte.","errorLoading":"Erreur lors du chargement","retryButton":"Réessayer","services":"Nos services","trainingsButton":"Formations","marketplaceButton":"Marketplace","contactsButton":"Contacts","relanceButton":"Relance","comingSoon":"Bientôt","presentation":"Présentation","downloadPresentation":"Téléchargez le document de présentation de la SBC","formationsTitle":"Formations Disponibles","formationsError":"Erreur lors du chargement des formations.","formationsEmpty":"Aucune formation disponible pour le moment.","formationsClose":"Fermer","subscribed":"Abonné","notSubscribed":"Non abonné","defaultUser":"Utilisateur"},"profile":{"title":"Profil","myProfile":"Mon profil","editProfile":"Modifier le profil","changeEmail":"Modifier mon email","changePhone":"Changer le numéro de téléphone","changePassword":"Modifier mon mot de passe","mySubscription":"Mon Abonnement","myReferrals":"Mes filleuls","myAffiliator":"Mon Parrain","partnerSpace":"Espace partenaire","joinCommunity":"Rejoindre la communauté","referralCode":"Code de parrainage","referralLink":"Lien de parrainage","copyCode":"Copier le code","copyLink":"Copier le lien","shareable":"Partageable","viewAffiliator":"Voir mon parrain","comingSoon":"Bientôt","logoutConfirm":"Êtes-vous sûr de vouloir vous déconnecter ?","logout":"Se déconnecter","notificationOTP":"Notifications OTP:","notificationWhatsapp":"📱 WhatsApp","notificationEmail":"📧 Email","referralDirect":"Direct:","referralIndirect":"Indirect:","copyReferralCode":"Copier mon code parrain","copied":"Copié !","copyReferralLink":"Copier mon lien","changeReferralCode":"Changer mon code parrain","logoutError":"Échec de la déconnexion.","loadingAffiliatorInfo":"Chargement des informations du parrain...","noAffiliatorInfo":"Vous n'avez pas de parrain ou les informations ne sont pas disponibles.","changeReferralCodeModal":"Changer le code parrain","newReferralCode":"Nouveau code de parrainage","newReferralCodePlaceholder":"Entrez le nouveau code","saveButton":"Sauvegarder","cancelButton":"Annuler","affiliatorInfoModal":"Informations sur le parrain","closeButton":"Fermer","successMessage":"Succès","errorMessage":"Erreur","confirmMessage":"Confirmation","confirmButton":"Confirmer","usageGuideButton":"Voir le guide d'utilisation","developedBy":"Développé par simbtech"},"wallet":{"title":"Portefeuille","myWallet":"Mon portefeuille","yourBalances":"Vos soldes","balance":"Solde","fcfa":"FCFA","usd":"USD","earnings":"Bénéfices","withdrawals":"Retraits","totalEarnings":"Gains totaux","totalWithdrawals":"Retraits totaux","depositButton":"Dépôt","withdrawButton":"Retrait","convertButton":"Convertir","recentTransactions":"Transactions récentes","noRecentTransactions":"Aucune transaction récente","viewAllTransactions":"Voir toutes les transactions","allTransactions":"Toutes les transactions","transactionHistory":"Historique des transactions","filters":"Filtres","filterByType":"Filtrer par type","filterByDate":"Filtrer par date","deposit":"Dépôt","withdrawal":"Retrait","commission":"Commission","bonus":"Bonus","transfer":"Transfert","other":"Autre","amount":"Montant","date":"Date","status":"Statut","pending":"En attente","completed":"Terminé","processing":"En cours","pendingOTP":"En attente OTP","failed":"Échoué","cancelled":"Annulé","viewDetails":"Voir les détails","withdrawalMobileMoneyTitle":"Retrait Mobile Money","withdrawalInfo":"Choisissez votre solde. Les USD seront automatiquement convertis en FCFA pour le Mobile Money.","selectBalance":"Solde à utiliser:","primaryBalance":"Solde Principal","usdBalance":"Solde USD","selected":"✓ Sélectionné","withdrawAmount":"Montant à retirer ({selectedBalanceType})","negativeBalanceWarning":"⚠️ Impossible d'effectuer un retrait avec un solde négatif.","amountPlaceholder":"Montant en {selectedBalanceType}","withdrawalAmount":"Montant à retirer:","fees":"Frais (2.5%):","withdrawalMethod":"Méthode de retrait:","cryptoWallet":"ðŸª
284™ Crypto ({currency})","cryptoNotConfigured":"Non configuré","totalDeducted":"Total déduit du solde {selectedBalanceType}:","insufficientBalance":"⚠️ Solde {selectedBalanceType} insuffisant. Solde actuel:","transactionSummary":"Résumé des transactions","received":"Reçu","withdrawn":"Retrait","daily":"Journalier","weekly":"Hebdomadaire","monthly":"Mensuel","conversionRate":"💡 USD converti à 1:500 FCFA pour le graphique","conversionInfo":"💡 Montants USD convertis en FCFA (1:500) pour l'affichage du graphique","noTransactionFound":"Aucune transaction trouvée.","allTransactionsLoaded":"Toutes les transactions ont été chargées.","transactionID":"ID de la transaction","transactionType":"Type","description":"Description","reference":"Référence","shareButton":"Partager","cancelButton":"Annuler","closeButton":"Fermer","historyModalTitle":"Historique des transactions","transactionCopied":"Transaction copiée dans le presse-papier !","errorLoading":"Erreur lors du chargement","retryButton":"Réessayer","invalidAmount":"Montant invalide: doit être supérieur à 0","cryptoPendingMessage":"Demande de retrait crypto initiée. Un code OTP a été envoyé à votre numéro de téléphone. Veuillez le vérifier.","cryptoSuccess":"Retrait crypto initié avec succès! Montant: \${amount} vers {currency} ({address}...)","mobileMoneyConfirm":"Demande de retrait initiée. Un code OTP a été envoyé à votre numéro de téléphone. Veuillez le vérifier.","mobileMoneyProcessing":"Retrait initié et en cours de traitement. Un code OTP a été envoyé à votre numéro de téléphone. Veuillez le vérifier.","pendingWithdrawal":"Vous avez une demande de retrait en attente (ID: {transactionId}) qui est en cours de traitement...","unexpectedError":"Une erreur inattendue est survenue lors de l'initiation du retrait. Veuillez réessayer.","withdrawalFailed":"Échec de l'initiation du retrait.","validAmountError":"Veuillez entrer un montant de retrait valide.","transactionCancelled":"Transaction annulée avec succès.","cancellationError":"Erreur lors de l'annulation de la transaction.","negativeBalanceError":"Impossible d'effectuer un retrait avec des soldes négatifs...","negativeConversionError":"Impossible de convertir avec des soldes négatifs..."},"marketplace":{"title":"Marketplace","header":"Marketplace","products":"Produits","myProducts":"Mes produits","addProduct":"Ajouter un produit","editProduct":"Modifier le produit","deleteProduct":"Supprimer le produit","productName":"Nom du produit","description":"Description","price":"Prix","category":"Catégorie","image":"Image","inStock":"En stock","outOfStock":"Rupture de stock","quantity":"Quantité","searchProducts":"Rechercher des produits","searchPlaceholder":"Rechercher un produit ou un service","filterByCategory":"Filtrer par catégorie","sortByPrice":"Trier par prix","noProducts":"Aucun produit","noResultsFor":"Aucun {category} trouvé","addToCart":"Ajouter au panier","removeFromCart":"Retirer du panier","checkout":"Passer la commande","cart":"Panier","emptyCart":"Panier vide","totalPrice":"Prix total","shippingAddress":"Adresse de livraison","paymentMethod":"Méthode de paiement","sellBuyPrompt":"Vendez et achetez des <br /> produits et services","specialOffers":"Offres spéciales","categories":"Categories","all":"Tous","services":"Services","productsCategory":"Produits","errorLoading":"Erreur lors du chargement","retryButton":"Réessayer","menuAddProduct":"Ajouter un produit","menuViewProducts":"Voir mes produits"},"subscription":{"title":"Abonnement","mySubscription":"Mon abonnement","plans":"Plans","basic":"Basique","premium":"Premium","professional":"Professionnel","enterprise":"Entreprise","features":"Fonctionnalités","price":"Prix","subscribe":"S'abonner","upgrade":"Mettre à niveau","downgrade":"Rétrograder","renew":"Renouveler","cancel":"Annuler","active":"Actif","expired":"Expiré","expiresOn":"Expire le","autoRenew":"Renouvellement automatique","enable":"Activer","disable":"Désactiver","manageSubscription":"Gérer l'abonnement","billingHistory":"Historique de facturation","invoices":"Factures"},"products":{"myProducts":"Mes produits","addProduct":"Ajouter un produit","editProduct":"Modifier le produit","deleteProduct":"Supprimer le produit","productName":"Nom du produit","description":"Description","price":"Prix","category":"Catégorie","image":"Image","images":"Images","inStock":"En stock","outOfStock":"Rupture de stock","quantity":"Quantité","sku":"SKU","details":"Détails","specifications":"Spécifications","reviews":"Avis","rating":"Évaluation","noProducts":"Aucun produit","productAdded":"Produit ajouté","productUpdated":"Produit mis à jour","productDeleted":"Produit supprimé","deleteConfirm":"Êtes-vous sûr de vouloir supprimer ce produit ?","confirmDelete":"Confirmer la suppression"},"mesFilleuls":{"title":"Mes filleuls","myReferrals":"Mes filleuls","directReferrals":"Filleuls directs","indirectReferrals":"Filleuls indirects","totalReferrals":"Total des filleuls","level1":"Niveau 1","level2":"Niveau 2","level3":"Niveau 3","name":"Nom","email":"Email","phoneNumber":"Numéro de téléphone","joinDate":"Date d'adhésion","status":"Statut","active":"Actif","inactive":"Inactif","earnings":"Gains","
284noReferrals":"Aucun filleul","inviteReferral":"Inviter un filleul","shareReferralLink":"Partager le lien de parrainage","copyLink":"Copier le lien","copiedLink":"Lien copié","referralStats":"Statistiques de parrainage"},"otp":{"title":"Vérification OTP","enterOtp":"Entrez le code OTP","otpSent":"Un code OTP a été envoyé à","otpExpires":"Le code OTP expire dans","resendOtp":"Renvoyer le code","verifyOtp":"Vérifier le code","invalidOtp":"Code OTP invalide","otpExpired":"Le code OTP a expiré","resendIn":"Renvoyer dans","seconds":"secondes","minutes":"minutes"},"password":{"title":"Mot de passe","currentPassword":"Mot de passe actuel","newPassword":"Nouveau mot de passe","confirmPassword":"Confirmer le mot de passe","passwordChanged":"Mot de passe changé","passwordChangedSuccess":"Votre mot de passe a été changé avec succès","oldPasswordIncorrect":"L'ancien mot de passe est incorrect","passwordMismatch":"Les mots de passe ne correspondent pas","passwordStrength":"Force du mot de passe","weak":"Faible","medium":"Moyen","strong":"Fort","veryStrong":"Très fort"},"email":{"title":"Email","currentEmail":"Email actuel","newEmail":"Nouvel email","confirmEmail":"Confirmer l'email","emailChanged":"Email changé","emailChangedSuccess":"Votre email a été changé avec succès","emailAlreadyExists":"Cet email est déjà utilisé","verifyEmail":"Vérifier l'email","emailVerified":"Email vérifié","emailNotVerified":"Email non vérifié"},"phone":{"title":"Numéro de téléphone","currentPhone":"Numéro de téléphone actuel","newPhone":"Nouveau numéro de téléphone","confirmPhone":"Confirmer le numéro de téléphone","phoneChanged":"Numéro de téléphone changé","phoneChangedSuccess":"Votre numéro de téléphone a été changé avec succès","phoneAlreadyExists":"Ce numéro de téléphone est déjà utilisé","verifyPhone":"Vérifier le numéro de téléphone","phoneVerified":"Numéro de téléphone vérifié"},"relance":{"title":"Relance"}}`),Rke={success:"Succès",error:"Erreur",warning:"Avertissement",info:"Information",loading:"Chargement...",saved:"Enregistré",deleted:"Supprimé",updated:"Mis à jour",created:"Créé",failedToLoad:"Échec du chargement",failedToSave:"Échec de l'enregistrement",failedToDelete:"Échec de la suppression",failedToUpdate:"Échec de la mise à jour",failedToCreate:"Échec de la création",networkError:"Erreur réseau",pleaseCheckConnection:"Veuillez vérifier votre connexion",tryAgain:"Réessayer",contactSupport:"Contactez le support"},_ke={common:Oke,pages:Lke,messages:Rke},Ike={en:{translation:Mke},fr:{translation:_ke}};is.use($G).use(d5e).init({resources:Ike,fallbackLng:"fr",lng:localStorage.getItem("language")||"fr",interpolation:{escapeValue:!1},detection:{order:["localStorage","navigator"],caches:["localStorage"]}});const zG="/sw.js";async function $ke(){try{if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistrations();await Promise.all(e.filter(t=>{var n,i,a;return!(((n=t.active)==null?void 0:n.scriptURL)??((i=t.installing)==null?void 0:i.scriptURL)??((a=t.waiting)==null?void 0:a.scriptURL)??"").endsWith(zG)}).map(t=>t.unregister()))}}catch{}try{if(typeof caches<"u"){const e=await caches.keys();await Promise.all(e.map(t=>caches.delete(t)))}}catch{}}async function zke(){if("serviceWorker"in navigator&&!(location.protocol!=="https:"&&location.hostname!=="localhost"))try{await navigator.serviceWorker.register(zG,{scope:"/"})}catch{}}$ke().then(zke);const Vke=new lse({defaultOptions:{queries:{refetchOnWindowFocus:!1}}});BX.createRoot(document.getElementById("root")).render(s.jsx(C.StrictMode,{children:s.jsx(GY,{children:s.jsx(fse,{client:Vke,children:s.jsx(YAe,{})})})}));

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.