Files
KiraTV/backend/static/assets/index-H1dlHjcY.js
T
KiraStream b969b7e5af Mejoras de estabilidad de stream IPTV y nuevo registro de fallos
- restream.py: eliminar -reconnect_streamed de ffmpeg para evitar rebobinados
  al reconectar (el proveedor re-enviaba desde keyframe anterior causando PTS
  backward). El loop de Python gestiona las reconexiones con conexión fresca.
- restream.py: eliminar _drain_queue del loop de reconexión para que el buffer
  de la cola cubra el tiempo de reconexión sin pantalla negra en el player.
- restream.py: añadir buffer_server_bytes/secs/capacity a stats() y método
  _log_stream_event() para persistir eventos de caída y recuperación en BD.
- models/stream_event.py: nuevo modelo StreamEvent para registro de fallos.
- database.py: registrar StreamEvent en init_db.
- api/admin/logs.py: nuevos endpoints GET/DELETE /logs/events.
- Dashboard.tsx: mostrar reserva de buffer del servidor (capacidad + estado).
- Logs.tsx: añadir pestaña "Fallos de stream" con tabla de eventos persistidos.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 14:43:31 +00:00

279 lines
328 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
function Im(s,a){for(var i=0;i<a.length;i++){const c=a[i];if(typeof c!="string"&&!Array.isArray(c)){for(const d in c)if(d!=="default"&&!(d in s)){const f=Object.getOwnPropertyDescriptor(c,d);f&&Object.defineProperty(s,d,f.get?f:{enumerable:!0,get:()=>c[d]})}}}return Object.freeze(Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}))}(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))c(d);new MutationObserver(d=>{for(const f of d)if(f.type==="childList")for(const m of f.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&c(m)}).observe(document,{childList:!0,subtree:!0});function i(d){const f={};return d.integrity&&(f.integrity=d.integrity),d.referrerPolicy&&(f.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?f.credentials="include":d.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function c(d){if(d.ep)return;d.ep=!0;const f=i(d);fetch(d.href,f)}})();function nf(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var no={exports:{}},Es={},ro={exports:{}},be={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var yd;function $m(){if(yd)return be;yd=1;var s=Symbol.for("react.element"),a=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),m=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),_=Symbol.iterator;function O(b){return b===null||typeof b!="object"?null:(b=_&&b[_]||b["@@iterator"],typeof b=="function"?b:null)}var B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},L=Object.assign,P={};function N(b,I,te){this.props=b,this.context=I,this.refs=P,this.updater=te||B}N.prototype.isReactComponent={},N.prototype.setState=function(b,I){if(typeof b!="object"&&typeof b!="function"&&b!=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,b,I,"setState")},N.prototype.forceUpdate=function(b){this.updater.enqueueForceUpdate(this,b,"forceUpdate")};function A(){}A.prototype=N.prototype;function M(b,I,te){this.props=b,this.context=I,this.refs=P,this.updater=te||B}var K=M.prototype=new A;K.constructor=M,L(K,N.prototype),K.isPureReactComponent=!0;var Q=Array.isArray,me=Object.prototype.hasOwnProperty,fe={current:null},z={key:!0,ref:!0,__self:!0,__source:!0};function ae(b,I,te){var pe,ye={},Ne=null,we=null;if(I!=null)for(pe in I.ref!==void 0&&(we=I.ref),I.key!==void 0&&(Ne=""+I.key),I)me.call(I,pe)&&!z.hasOwnProperty(pe)&&(ye[pe]=I[pe]);var oe=arguments.length-2;if(oe===1)ye.children=te;else if(1<oe){for(var F=Array(oe),ne=0;ne<oe;ne++)F[ne]=arguments[ne+2];ye.children=F}if(b&&b.defaultProps)for(pe in oe=b.defaultProps,oe)ye[pe]===void 0&&(ye[pe]=oe[pe]);return{$$typeof:s,type:b,key:Ne,ref:we,props:ye,_owner:fe.current}}function de(b,I){return{$$typeof:s,type:b.type,key:I,ref:b.ref,props:b.props,_owner:b._owner}}function Y(b){return typeof b=="object"&&b!==null&&b.$$typeof===s}function je(b){var I={"=":"=0",":":"=2"};return"$"+b.replace(/[=:]/g,function(te){return I[te]})}var Te=/\/+/g;function ze(b,I){return typeof b=="object"&&b!==null&&b.key!=null?je(""+b.key):I.toString(36)}function Ee(b,I,te,pe,ye){var Ne=typeof b;(Ne==="undefined"||Ne==="boolean")&&(b=null);var we=!1;if(b===null)we=!0;else switch(Ne){case"string":case"number":we=!0;break;case"object":switch(b.$$typeof){case s:case a:we=!0}}if(we)return we=b,ye=ye(we),b=pe===""?"."+ze(we,0):pe,Q(ye)?(te="",b!=null&&(te=b.replace(Te,"$&/")+"/"),Ee(ye,I,te,"",function(ne){return ne})):ye!=null&&(Y(ye)&&(ye=de(ye,te+(!ye.key||we&&we.key===ye.key?"":(""+ye.key).replace(Te,"$&/")+"/")+b)),I.push(ye)),1;if(we=0,pe=pe===""?".":pe+":",Q(b))for(var oe=0;oe<b.length;oe++){Ne=b[oe];var F=pe+ze(Ne,oe);we+=Ee(Ne,I,te,F,ye)}else if(F=O(b),typeof F=="function")for(b=F.call(b),oe=0;!(Ne=b.next()).done;)Ne=Ne.value,F=pe+ze(Ne,oe++),we+=Ee(Ne,I,te,F,ye);else if(Ne==="object")throw I=String(b),Error("Objects are not valid as a React child (found: "+(I==="[object Object]"?"object with keys {"+Object.keys(b).join(", ")+"}":I)+"). If you meant to render a collection of children, use an array instead.");return we}function q(b,I,te){if(b==null)return b;var pe=[],ye=0;return Ee(b,pe,"","",function(Ne){return I.call(te,Ne,ye++)}),pe}function ge(b){if(b._status===-1){var I=b._result;I=I(),I.then(function(te){(b._status===0||b._status===-1)&&(b._status=1,b._result=te)},function(te){(b._status===0||b._status===-1)&&(b._status=2,b._result=te)}),b._status===-1&&(b._status=0,b._result=I)}if(b._status===1)return b._result.default;throw b._result}var D={current:null},U={transition:null},ee={ReactCurrentDispatcher:D,ReactCurrentBatchConfig:U,ReactCurrentOwner:fe};function G(){throw Error("act(...) is not supported in production builds of React.")}return be.Children={map:q,forEach:function(b,I,te){q(b,function(){I.apply(this,arguments)},te)},count:function(b){var I=0;return q(b,function(){I++}),I},toArray:function(b){return q(b,function(I){return I})||[]},only:function(b){if(!Y(b))throw Error("React.Children.only expected to receive a single React element child.");return b}},be.Component=N,be.Fragment=i,be.Profiler=d,be.PureComponent=M,be.StrictMode=c,be.Suspense=x,be.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ee,be.act=G,be.cloneElement=function(b,I,te){if(b==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+b+".");var pe=L({},b.props),ye=b.key,Ne=b.ref,we=b._owner;if(I!=null){if(I.ref!==void 0&&(Ne=I.ref,we=fe.current),I.key!==void 0&&(ye=""+I.key),b.type&&b.type.defaultProps)var oe=b.type.defaultProps;for(F in I)me.call(I,F)&&!z.hasOwnProperty(F)&&(pe[F]=I[F]===void 0&&oe!==void 0?oe[F]:I[F])}var F=arguments.length-2;if(F===1)pe.children=te;else if(1<F){oe=Array(F);for(var ne=0;ne<F;ne++)oe[ne]=arguments[ne+2];pe.children=oe}return{$$typeof:s,type:b.type,key:ye,ref:Ne,props:pe,_owner:we}},be.createContext=function(b){return b={$$typeof:m,_currentValue:b,_currentValue2:b,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},b.Provider={$$typeof:f,_context:b},b.Consumer=b},be.createElement=ae,be.createFactory=function(b){var I=ae.bind(null,b);return I.type=b,I},be.createRef=function(){return{current:null}},be.forwardRef=function(b){return{$$typeof:h,render:b}},be.isValidElement=Y,be.lazy=function(b){return{$$typeof:j,_payload:{_status:-1,_result:b},_init:ge}},be.memo=function(b,I){return{$$typeof:y,type:b,compare:I===void 0?null:I}},be.startTransition=function(b){var I=U.transition;U.transition={};try{b()}finally{U.transition=I}},be.unstable_act=G,be.useCallback=function(b,I){return D.current.useCallback(b,I)},be.useContext=function(b){return D.current.useContext(b)},be.useDebugValue=function(){},be.useDeferredValue=function(b){return D.current.useDeferredValue(b)},be.useEffect=function(b,I){return D.current.useEffect(b,I)},be.useId=function(){return D.current.useId()},be.useImperativeHandle=function(b,I,te){return D.current.useImperativeHandle(b,I,te)},be.useInsertionEffect=function(b,I){return D.current.useInsertionEffect(b,I)},be.useLayoutEffect=function(b,I){return D.current.useLayoutEffect(b,I)},be.useMemo=function(b,I){return D.current.useMemo(b,I)},be.useReducer=function(b,I,te){return D.current.useReducer(b,I,te)},be.useRef=function(b){return D.current.useRef(b)},be.useState=function(b){return D.current.useState(b)},be.useSyncExternalStore=function(b,I,te){return D.current.useSyncExternalStore(b,I,te)},be.useTransition=function(){return D.current.useTransition()},be.version="18.3.1",be}var vd;function Ro(){return vd||(vd=1,ro.exports=$m()),ro.exports}/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var wd;function Bm(){if(wd)return Es;wd=1;var s=Ro(),a=Symbol.for("react.element"),i=Symbol.for("react.fragment"),c=Object.prototype.hasOwnProperty,d=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,f={key:!0,ref:!0,__self:!0,__source:!0};function m(h,x,y){var j,_={},O=null,B=null;y!==void 0&&(O=""+y),x.key!==void 0&&(O=""+x.key),x.ref!==void 0&&(B=x.ref);for(j in x)c.call(x,j)&&!f.hasOwnProperty(j)&&(_[j]=x[j]);if(h&&h.defaultProps)for(j in x=h.defaultProps,x)_[j]===void 0&&(_[j]=x[j]);return{$$typeof:a,type:h,key:O,ref:B,props:_,_owner:d.current}}return Es.Fragment=i,Es.jsx=m,Es.jsxs=m,Es}var kd;function Vm(){return kd||(kd=1,no.exports=Bm()),no.exports}var l=Vm(),v=Ro();const rf=nf(v),Hm=Im({__proto__:null,default:rf},[v]);var Yl={},so={exports:{}},gt={},lo={exports:{}},ao={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var jd;function Wm(){return jd||(jd=1,(function(s){function a(U,ee){var G=U.length;U.push(ee);e:for(;0<G;){var b=G-1>>>1,I=U[b];if(0<d(I,ee))U[b]=ee,U[G]=I,G=b;else break e}}function i(U){return U.length===0?null:U[0]}function c(U){if(U.length===0)return null;var ee=U[0],G=U.pop();if(G!==ee){U[0]=G;e:for(var b=0,I=U.length,te=I>>>1;b<te;){var pe=2*(b+1)-1,ye=U[pe],Ne=pe+1,we=U[Ne];if(0>d(ye,G))Ne<I&&0>d(we,ye)?(U[b]=we,U[Ne]=G,b=Ne):(U[b]=ye,U[pe]=G,b=pe);else if(Ne<I&&0>d(we,G))U[b]=we,U[Ne]=G,b=Ne;else break e}}return ee}function d(U,ee){var G=U.sortIndex-ee.sortIndex;return G!==0?G:U.id-ee.id}if(typeof performance=="object"&&typeof performance.now=="function"){var f=performance;s.unstable_now=function(){return f.now()}}else{var m=Date,h=m.now();s.unstable_now=function(){return m.now()-h}}var x=[],y=[],j=1,_=null,O=3,B=!1,L=!1,P=!1,N=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function K(U){for(var ee=i(y);ee!==null;){if(ee.callback===null)c(y);else if(ee.startTime<=U)c(y),ee.sortIndex=ee.expirationTime,a(x,ee);else break;ee=i(y)}}function Q(U){if(P=!1,K(U),!L)if(i(x)!==null)L=!0,ge(me);else{var ee=i(y);ee!==null&&D(Q,ee.startTime-U)}}function me(U,ee){L=!1,P&&(P=!1,A(ae),ae=-1),B=!0;var G=O;try{for(K(ee),_=i(x);_!==null&&(!(_.expirationTime>ee)||U&&!je());){var b=_.callback;if(typeof b=="function"){_.callback=null,O=_.priorityLevel;var I=b(_.expirationTime<=ee);ee=s.unstable_now(),typeof I=="function"?_.callback=I:_===i(x)&&c(x),K(ee)}else c(x);_=i(x)}if(_!==null)var te=!0;else{var pe=i(y);pe!==null&&D(Q,pe.startTime-ee),te=!1}return te}finally{_=null,O=G,B=!1}}var fe=!1,z=null,ae=-1,de=5,Y=-1;function je(){return!(s.unstable_now()-Y<de)}function Te(){if(z!==null){var U=s.unstable_now();Y=U;var ee=!0;try{ee=z(!0,U)}finally{ee?ze():(fe=!1,z=null)}}else fe=!1}var ze;if(typeof M=="function")ze=function(){M(Te)};else if(typeof MessageChannel<"u"){var Ee=new MessageChannel,q=Ee.port2;Ee.port1.onmessage=Te,ze=function(){q.postMessage(null)}}else ze=function(){N(Te,0)};function ge(U){z=U,fe||(fe=!0,ze())}function D(U,ee){ae=N(function(){U(s.unstable_now())},ee)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(U){U.callback=null},s.unstable_continueExecution=function(){L||B||(L=!0,ge(me))},s.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):de=0<U?Math.floor(1e3/U):5},s.unstable_getCurrentPriorityLevel=function(){return O},s.unstable_getFirstCallbackNode=function(){return i(x)},s.unstable_next=function(U){switch(O){case 1:case 2:case 3:var ee=3;break;default:ee=O}var G=O;O=ee;try{return U()}finally{O=G}},s.unstable_pauseExecution=function(){},s.unstable_requestPaint=function(){},s.unstable_runWithPriority=function(U,ee){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var G=O;O=U;try{return ee()}finally{O=G}},s.unstable_scheduleCallback=function(U,ee,G){var b=s.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?b+G:b):G=b,U){case 1:var I=-1;break;case 2:I=250;break;case 5:I=1073741823;break;case 4:I=1e4;break;default:I=5e3}return I=G+I,U={id:j++,callback:ee,priorityLevel:U,startTime:G,expirationTime:I,sortIndex:-1},G>b?(U.sortIndex=G,a(y,U),i(x)===null&&U===i(y)&&(P?(A(ae),ae=-1):P=!0,D(Q,G-b))):(U.sortIndex=I,a(x,U),L||B||(L=!0,ge(me))),U},s.unstable_shouldYield=je,s.unstable_wrapCallback=function(U){var ee=O;return function(){var G=O;O=ee;try{return U.apply(this,arguments)}finally{O=G}}}})(ao)),ao}var Nd;function qm(){return Nd||(Nd=1,lo.exports=Wm()),lo.exports}/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Sd;function Km(){if(Sd)return gt;Sd=1;var s=Ro(),a=qm();function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var c=new Set,d={};function f(e,t){m(e,t),m(e+"Capture",t)}function m(e,t){for(d[e]=t,e=0;e<t.length;e++)c.add(t[e])}var h=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),x=Object.prototype.hasOwnProperty,y=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,j={},_={};function O(e){return x.call(_,e)?!0:x.call(j,e)?!1:y.test(e)?_[e]=!0:(j[e]=!0,!1)}function B(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function L(e,t,n,r){if(t===null||typeof t>"u"||B(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function P(e,t,n,r,o,u,p){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=u,this.removeEmptyString=p}var N={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){N[e]=new P(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];N[t]=new P(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){N[e]=new P(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){N[e]=new P(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){N[e]=new P(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){N[e]=new P(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){N[e]=new P(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){N[e]=new P(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){N[e]=new P(e,5,!1,e.toLowerCase(),null,!1,!1)});var A=/[\-:]([a-z])/g;function M(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(A,M);N[t]=new P(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(A,M);N[t]=new P(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(A,M);N[t]=new P(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){N[e]=new P(e,1,!1,e.toLowerCase(),null,!1,!1)}),N.xlinkHref=new P("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){N[e]=new P(e,1,!1,e.toLowerCase(),null,!0,!0)});function K(e,t,n,r){var o=N.hasOwnProperty(t)?N[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(L(t,n,o,r)&&(n=null),r||o===null?O(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Q=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,me=Symbol.for("react.element"),fe=Symbol.for("react.portal"),z=Symbol.for("react.fragment"),ae=Symbol.for("react.strict_mode"),de=Symbol.for("react.profiler"),Y=Symbol.for("react.provider"),je=Symbol.for("react.context"),Te=Symbol.for("react.forward_ref"),ze=Symbol.for("react.suspense"),Ee=Symbol.for("react.suspense_list"),q=Symbol.for("react.memo"),ge=Symbol.for("react.lazy"),D=Symbol.for("react.offscreen"),U=Symbol.iterator;function ee(e){return e===null||typeof e!="object"?null:(e=U&&e[U]||e["@@iterator"],typeof e=="function"?e:null)}var G=Object.assign,b;function I(e){if(b===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);b=t&&t[1]||""}return`
`+b+e}var te=!1;function pe(e,t){if(!e||te)return"";te=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(T){var r=T}Reflect.construct(e,[],t)}else{try{t.call()}catch(T){r=T}e.call(t.prototype)}else{try{throw Error()}catch(T){r=T}e()}}catch(T){if(T&&r&&typeof T.stack=="string"){for(var o=T.stack.split(`
`),u=r.stack.split(`
`),p=o.length-1,g=u.length-1;1<=p&&0<=g&&o[p]!==u[g];)g--;for(;1<=p&&0<=g;p--,g--)if(o[p]!==u[g]){if(p!==1||g!==1)do if(p--,g--,0>g||o[p]!==u[g]){var k=`
`+o[p].replace(" at new "," at ");return e.displayName&&k.includes("<anonymous>")&&(k=k.replace("<anonymous>",e.displayName)),k}while(1<=p&&0<=g);break}}}finally{te=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?I(e):""}function ye(e){switch(e.tag){case 5:return I(e.type);case 16:return I("Lazy");case 13:return I("Suspense");case 19:return I("SuspenseList");case 0:case 2:case 15:return e=pe(e.type,!1),e;case 11:return e=pe(e.type.render,!1),e;case 1:return e=pe(e.type,!0),e;default:return""}}function Ne(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case z:return"Fragment";case fe:return"Portal";case de:return"Profiler";case ae:return"StrictMode";case ze:return"Suspense";case Ee:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case je:return(e.displayName||"Context")+".Consumer";case Y:return(e._context.displayName||"Context")+".Provider";case Te:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case q:return t=e.displayName||null,t!==null?t:Ne(e.type)||"Memo";case ge:t=e._payload,e=e._init;try{return Ne(e(t))}catch{}}return null}function we(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ne(t);case 8:return t===ae?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function oe(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function F(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ne(e){var t=F(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,u=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(p){r=""+p,u.call(this,p)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(p){r=""+p},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ke(e){e._valueTracker||(e._valueTracker=ne(e))}function Ce(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=F(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function De(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Le(e,t){var n=t.checked;return G({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Fr(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=oe(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Ur(e,t){t=t.checked,t!=null&&K(e,"checked",t,!1)}function wt(e,t){Ur(e,t);var n=oe(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Mr(e,t.type,n):t.hasOwnProperty("defaultValue")&&Mr(e,t.type,oe(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function rr(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Mr(e,t,n){(t!=="number"||De(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var On=Array.isArray;function an(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+oe(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Ir(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(i(91));return G({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Fs(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(i(92));if(On(n)){if(1<n.length)throw Error(i(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:oe(n)}}function Us(e,t){var n=oe(t.value),r=oe(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Ms(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Is(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function $r(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Is(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var sr,$s=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(sr=sr||document.createElement("div"),sr.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=sr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function zn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var An={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},va=["Webkit","ms","Moz","O"];Object.keys(An).forEach(function(e){va.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),An[t]=An[e]})});function Bs(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||An.hasOwnProperty(e)&&An[e]?(""+t).trim():t+"px"}function Vs(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Bs(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var wa=G({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 Br(e,t){if(t){if(wa[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(i(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(i(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(i(61))}if(t.style!=null&&typeof t.style!="object")throw Error(i(62))}}function on(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Vr=null;function Hr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Wr=null,Qt=null,w=null;function $(e){if(e=ps(e)){if(typeof Wr!="function")throw Error(i(280));var t=e.stateNode;t&&(t=fl(t),Wr(e.stateNode,e.type,t))}}function ue(e){Qt?w?w.push(e):w=[e]:Qt=e}function Se(){if(Qt){var e=Qt,t=w;if(w=Qt=null,$(e),t)for(e=0;e<t.length;e++)$(t[e])}}function Ae(e,t){return e(t)}function $e(){}var lr=!1;function qr(e,t,n){if(lr)return e(t,n);lr=!0;try{return Ae(e,t,n)}finally{lr=!1,(Qt!==null||w!==null)&&($e(),Se())}}function un(e,t){var n=e.stateNode;if(n===null)return null;var r=fl(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(i(231,t,typeof n));return n}var $t=!1;if(h)try{var Kr={};Object.defineProperty(Kr,"passive",{get:function(){$t=!0}}),window.addEventListener("test",Kr,Kr),window.removeEventListener("test",Kr,Kr)}catch{$t=!1}function qf(e,t,n,r,o,u,p,g,k){var T=Array.prototype.slice.call(arguments,3);try{t.apply(n,T)}catch(H){this.onError(H)}}var Qr=!1,Hs=null,Ws=!1,ka=null,Kf={onError:function(e){Qr=!0,Hs=e}};function Qf(e,t,n,r,o,u,p,g,k){Qr=!1,Hs=null,qf.apply(Kf,arguments)}function Jf(e,t,n,r,o,u,p,g,k){if(Qf.apply(this,arguments),Qr){if(Qr){var T=Hs;Qr=!1,Hs=null}else throw Error(i(198));Ws||(Ws=!0,ka=T)}}function Dn(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function $o(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Bo(e){if(Dn(e)!==e)throw Error(i(188))}function Gf(e){var t=e.alternate;if(!t){if(t=Dn(e),t===null)throw Error(i(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var u=o.alternate;if(u===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===u.child){for(u=o.child;u;){if(u===n)return Bo(o),e;if(u===r)return Bo(o),t;u=u.sibling}throw Error(i(188))}if(n.return!==r.return)n=o,r=u;else{for(var p=!1,g=o.child;g;){if(g===n){p=!0,n=o,r=u;break}if(g===r){p=!0,r=o,n=u;break}g=g.sibling}if(!p){for(g=u.child;g;){if(g===n){p=!0,n=u,r=o;break}if(g===r){p=!0,r=u,n=o;break}g=g.sibling}if(!p)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function Vo(e){return e=Gf(e),e!==null?Ho(e):null}function Ho(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Ho(e);if(t!==null)return t;e=e.sibling}return null}var Wo=a.unstable_scheduleCallback,qo=a.unstable_cancelCallback,Yf=a.unstable_shouldYield,Xf=a.unstable_requestPaint,Ke=a.unstable_now,Zf=a.unstable_getCurrentPriorityLevel,ja=a.unstable_ImmediatePriority,Ko=a.unstable_UserBlockingPriority,qs=a.unstable_NormalPriority,ep=a.unstable_LowPriority,Qo=a.unstable_IdlePriority,Ks=null,Bt=null;function tp(e){if(Bt&&typeof Bt.onCommitFiberRoot=="function")try{Bt.onCommitFiberRoot(Ks,e,void 0,(e.current.flags&128)===128)}catch{}}var Lt=Math.clz32?Math.clz32:sp,np=Math.log,rp=Math.LN2;function sp(e){return e>>>=0,e===0?32:31-(np(e)/rp|0)|0}var Qs=64,Js=4194304;function Jr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Gs(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,u=e.pingedLanes,p=n&268435455;if(p!==0){var g=p&~o;g!==0?r=Jr(g):(u&=p,u!==0&&(r=Jr(u)))}else p=n&~o,p!==0?r=Jr(p):u!==0&&(r=Jr(u));if(r===0)return 0;if(t!==0&&t!==r&&(t&o)===0&&(o=r&-r,u=t&-t,o>=u||o===16&&(u&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Lt(t),o=1<<n,r|=e[n],t&=~o;return r}function lp(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ap(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,u=e.pendingLanes;0<u;){var p=31-Lt(u),g=1<<p,k=o[p];k===-1?((g&n)===0||(g&r)!==0)&&(o[p]=lp(g,t)):k<=t&&(e.expiredLanes|=g),u&=~g}}function Na(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Jo(){var e=Qs;return Qs<<=1,(Qs&4194240)===0&&(Qs=64),e}function Sa(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Gr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Lt(t),e[t]=n}function ip(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-Lt(n),u=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~u}}function ba(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Lt(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var Oe=0;function Go(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var Yo,Ca,Xo,Zo,eu,_a=!1,Ys=[],cn=null,dn=null,fn=null,Yr=new Map,Xr=new Map,pn=[],op="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 tu(e,t){switch(e){case"focusin":case"focusout":cn=null;break;case"dragenter":case"dragleave":dn=null;break;case"mouseover":case"mouseout":fn=null;break;case"pointerover":case"pointerout":Yr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Xr.delete(t.pointerId)}}function Zr(e,t,n,r,o,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:u,targetContainers:[o]},t!==null&&(t=ps(t),t!==null&&Ca(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function up(e,t,n,r,o){switch(t){case"focusin":return cn=Zr(cn,e,t,n,r,o),!0;case"dragenter":return dn=Zr(dn,e,t,n,r,o),!0;case"mouseover":return fn=Zr(fn,e,t,n,r,o),!0;case"pointerover":var u=o.pointerId;return Yr.set(u,Zr(Yr.get(u)||null,e,t,n,r,o)),!0;case"gotpointercapture":return u=o.pointerId,Xr.set(u,Zr(Xr.get(u)||null,e,t,n,r,o)),!0}return!1}function nu(e){var t=Fn(e.target);if(t!==null){var n=Dn(t);if(n!==null){if(t=n.tag,t===13){if(t=$o(n),t!==null){e.blockedOn=t,eu(e.priority,function(){Xo(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Xs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Pa(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Vr=r,n.target.dispatchEvent(r),Vr=null}else return t=ps(n),t!==null&&Ca(t),e.blockedOn=n,!1;t.shift()}return!0}function ru(e,t,n){Xs(e)&&n.delete(t)}function cp(){_a=!1,cn!==null&&Xs(cn)&&(cn=null),dn!==null&&Xs(dn)&&(dn=null),fn!==null&&Xs(fn)&&(fn=null),Yr.forEach(ru),Xr.forEach(ru)}function es(e,t){e.blockedOn===t&&(e.blockedOn=null,_a||(_a=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,cp)))}function ts(e){function t(o){return es(o,e)}if(0<Ys.length){es(Ys[0],e);for(var n=1;n<Ys.length;n++){var r=Ys[n];r.blockedOn===e&&(r.blockedOn=null)}}for(cn!==null&&es(cn,e),dn!==null&&es(dn,e),fn!==null&&es(fn,e),Yr.forEach(t),Xr.forEach(t),n=0;n<pn.length;n++)r=pn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<pn.length&&(n=pn[0],n.blockedOn===null);)nu(n),n.blockedOn===null&&pn.shift()}var ar=Q.ReactCurrentBatchConfig,Zs=!0;function dp(e,t,n,r){var o=Oe,u=ar.transition;ar.transition=null;try{Oe=1,Ea(e,t,n,r)}finally{Oe=o,ar.transition=u}}function fp(e,t,n,r){var o=Oe,u=ar.transition;ar.transition=null;try{Oe=4,Ea(e,t,n,r)}finally{Oe=o,ar.transition=u}}function Ea(e,t,n,r){if(Zs){var o=Pa(e,t,n,r);if(o===null)qa(e,t,r,el,n),tu(e,r);else if(up(o,e,t,n,r))r.stopPropagation();else if(tu(e,r),t&4&&-1<op.indexOf(e)){for(;o!==null;){var u=ps(o);if(u!==null&&Yo(u),u=Pa(e,t,n,r),u===null&&qa(e,t,r,el,n),u===o)break;o=u}o!==null&&r.stopPropagation()}else qa(e,t,r,null,n)}}var el=null;function Pa(e,t,n,r){if(el=null,e=Hr(r),e=Fn(e),e!==null)if(t=Dn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=$o(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return el=e,null}function su(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Zf()){case ja:return 1;case Ko:return 4;case qs:case ep:return 16;case Qo:return 536870912;default:return 16}default:return 16}}var mn=null,Ra=null,tl=null;function lu(){if(tl)return tl;var e,t=Ra,n=t.length,r,o="value"in mn?mn.value:mn.textContent,u=o.length;for(e=0;e<n&&t[e]===o[e];e++);var p=n-e;for(r=1;r<=p&&t[n-r]===o[u-r];r++);return tl=o.slice(e,1<r?1-r:void 0)}function nl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function rl(){return!0}function au(){return!1}function kt(e){function t(n,r,o,u,p){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=u,this.target=p,this.currentTarget=null;for(var g in e)e.hasOwnProperty(g)&&(n=e[g],this[g]=n?n(u):u[g]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?rl:au,this.isPropagationStopped=au,this}return G(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=rl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=rl)},persist:function(){},isPersistent:rl}),t}var ir={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ta=kt(ir),ns=G({},ir,{view:0,detail:0}),pp=kt(ns),La,Oa,rs,sl=G({},ns,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Aa,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==rs&&(rs&&e.type==="mousemove"?(La=e.screenX-rs.screenX,Oa=e.screenY-rs.screenY):Oa=La=0,rs=e),La)},movementY:function(e){return"movementY"in e?e.movementY:Oa}}),iu=kt(sl),mp=G({},sl,{dataTransfer:0}),hp=kt(mp),xp=G({},ns,{relatedTarget:0}),za=kt(xp),gp=G({},ir,{animationName:0,elapsedTime:0,pseudoElement:0}),yp=kt(gp),vp=G({},ir,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),wp=kt(vp),kp=G({},ir,{data:0}),ou=kt(kp),jp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Np={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"},Sp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function bp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Sp[e])?!!t[e]:!1}function Aa(){return bp}var Cp=G({},ns,{key:function(e){if(e.key){var t=jp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=nl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Np[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Aa,charCode:function(e){return e.type==="keypress"?nl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?nl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),_p=kt(Cp),Ep=G({},sl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),uu=kt(Ep),Pp=G({},ns,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Aa}),Rp=kt(Pp),Tp=G({},ir,{propertyName:0,elapsedTime:0,pseudoElement:0}),Lp=kt(Tp),Op=G({},sl,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),zp=kt(Op),Ap=[9,13,27,32],Da=h&&"CompositionEvent"in window,ss=null;h&&"documentMode"in document&&(ss=document.documentMode);var Dp=h&&"TextEvent"in window&&!ss,cu=h&&(!Da||ss&&8<ss&&11>=ss),du=" ",fu=!1;function pu(e,t){switch(e){case"keyup":return Ap.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var or=!1;function Fp(e,t){switch(e){case"compositionend":return mu(t);case"keypress":return t.which!==32?null:(fu=!0,du);case"textInput":return e=t.data,e===du&&fu?null:e;default:return null}}function Up(e,t){if(or)return e==="compositionend"||!Da&&pu(e,t)?(e=lu(),tl=Ra=mn=null,or=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return cu&&t.locale!=="ko"?null:t.data;default:return null}}var Mp={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 hu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Mp[e.type]:t==="textarea"}function xu(e,t,n,r){ue(r),t=ul(t,"onChange"),0<t.length&&(n=new Ta("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ls=null,as=null;function Ip(e){zu(e,0)}function ll(e){var t=pr(e);if(Ce(t))return e}function $p(e,t){if(e==="change")return t}var gu=!1;if(h){var Fa;if(h){var Ua="oninput"in document;if(!Ua){var yu=document.createElement("div");yu.setAttribute("oninput","return;"),Ua=typeof yu.oninput=="function"}Fa=Ua}else Fa=!1;gu=Fa&&(!document.documentMode||9<document.documentMode)}function vu(){ls&&(ls.detachEvent("onpropertychange",wu),as=ls=null)}function wu(e){if(e.propertyName==="value"&&ll(as)){var t=[];xu(t,as,e,Hr(e)),qr(Ip,t)}}function Bp(e,t,n){e==="focusin"?(vu(),ls=t,as=n,ls.attachEvent("onpropertychange",wu)):e==="focusout"&&vu()}function Vp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ll(as)}function Hp(e,t){if(e==="click")return ll(t)}function Wp(e,t){if(e==="input"||e==="change")return ll(t)}function qp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ot=typeof Object.is=="function"?Object.is:qp;function is(e,t){if(Ot(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!x.call(t,o)||!Ot(e[o],t[o]))return!1}return!0}function ku(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ju(e,t){var n=ku(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=ku(n)}}function Nu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Nu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Su(){for(var e=window,t=De();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=De(e.document)}return t}function Ma(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Kp(e){var t=Su(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Nu(n.ownerDocument.documentElement,n)){if(r!==null&&Ma(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,u=Math.min(r.start,o);r=r.end===void 0?u:Math.min(r.end,o),!e.extend&&u>r&&(o=r,r=u,u=o),o=ju(n,u);var p=ju(n,r);o&&p&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==p.node||e.focusOffset!==p.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),u>r?(e.addRange(t),e.extend(p.node,p.offset)):(t.setEnd(p.node,p.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Qp=h&&"documentMode"in document&&11>=document.documentMode,ur=null,Ia=null,os=null,$a=!1;function bu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;$a||ur==null||ur!==De(r)||(r=ur,"selectionStart"in r&&Ma(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),os&&is(os,r)||(os=r,r=ul(Ia,"onSelect"),0<r.length&&(t=new Ta("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ur)))}function al(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var cr={animationend:al("Animation","AnimationEnd"),animationiteration:al("Animation","AnimationIteration"),animationstart:al("Animation","AnimationStart"),transitionend:al("Transition","TransitionEnd")},Ba={},Cu={};h&&(Cu=document.createElement("div").style,"AnimationEvent"in window||(delete cr.animationend.animation,delete cr.animationiteration.animation,delete cr.animationstart.animation),"TransitionEvent"in window||delete cr.transitionend.transition);function il(e){if(Ba[e])return Ba[e];if(!cr[e])return e;var t=cr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Cu)return Ba[e]=t[n];return e}var _u=il("animationend"),Eu=il("animationiteration"),Pu=il("animationstart"),Ru=il("transitionend"),Tu=new Map,Lu="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 hn(e,t){Tu.set(e,t),f(t,[e])}for(var Va=0;Va<Lu.length;Va++){var Ha=Lu[Va],Jp=Ha.toLowerCase(),Gp=Ha[0].toUpperCase()+Ha.slice(1);hn(Jp,"on"+Gp)}hn(_u,"onAnimationEnd"),hn(Eu,"onAnimationIteration"),hn(Pu,"onAnimationStart"),hn("dblclick","onDoubleClick"),hn("focusin","onFocus"),hn("focusout","onBlur"),hn(Ru,"onTransitionEnd"),m("onMouseEnter",["mouseout","mouseover"]),m("onMouseLeave",["mouseout","mouseover"]),m("onPointerEnter",["pointerout","pointerover"]),m("onPointerLeave",["pointerout","pointerover"]),f("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),f("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),f("onBeforeInput",["compositionend","keypress","textInput","paste"]),f("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),f("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),f("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var us="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(" "),Yp=new Set("cancel close invalid load scroll toggle".split(" ").concat(us));function Ou(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Jf(r,t,void 0,e),e.currentTarget=null}function zu(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var u=void 0;if(t)for(var p=r.length-1;0<=p;p--){var g=r[p],k=g.instance,T=g.currentTarget;if(g=g.listener,k!==u&&o.isPropagationStopped())break e;Ou(o,g,T),u=k}else for(p=0;p<r.length;p++){if(g=r[p],k=g.instance,T=g.currentTarget,g=g.listener,k!==u&&o.isPropagationStopped())break e;Ou(o,g,T),u=k}}}if(Ws)throw e=ka,Ws=!1,ka=null,e}function Ue(e,t){var n=t[Xa];n===void 0&&(n=t[Xa]=new Set);var r=e+"__bubble";n.has(r)||(Au(t,e,2,!1),n.add(r))}function Wa(e,t,n){var r=0;t&&(r|=4),Au(n,e,r,t)}var ol="_reactListening"+Math.random().toString(36).slice(2);function cs(e){if(!e[ol]){e[ol]=!0,c.forEach(function(n){n!=="selectionchange"&&(Yp.has(n)||Wa(n,!1,e),Wa(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ol]||(t[ol]=!0,Wa("selectionchange",!1,t))}}function Au(e,t,n,r){switch(su(t)){case 1:var o=dp;break;case 4:o=fp;break;default:o=Ea}n=o.bind(null,t,n,e),o=void 0,!$t||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function qa(e,t,n,r,o){var u=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var p=r.tag;if(p===3||p===4){var g=r.stateNode.containerInfo;if(g===o||g.nodeType===8&&g.parentNode===o)break;if(p===4)for(p=r.return;p!==null;){var k=p.tag;if((k===3||k===4)&&(k=p.stateNode.containerInfo,k===o||k.nodeType===8&&k.parentNode===o))return;p=p.return}for(;g!==null;){if(p=Fn(g),p===null)return;if(k=p.tag,k===5||k===6){r=u=p;continue e}g=g.parentNode}}r=r.return}qr(function(){var T=u,H=Hr(n),W=[];e:{var V=Tu.get(e);if(V!==void 0){var Z=Ta,se=e;switch(e){case"keypress":if(nl(n)===0)break e;case"keydown":case"keyup":Z=_p;break;case"focusin":se="focus",Z=za;break;case"focusout":se="blur",Z=za;break;case"beforeblur":case"afterblur":Z=za;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Z=iu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Z=hp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Z=Rp;break;case _u:case Eu:case Pu:Z=yp;break;case Ru:Z=Lp;break;case"scroll":Z=pp;break;case"wheel":Z=zp;break;case"copy":case"cut":case"paste":Z=wp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Z=uu}var ie=(t&4)!==0,Qe=!ie&&e==="scroll",E=ie?V!==null?V+"Capture":null:V;ie=[];for(var S=T,R;S!==null;){R=S;var J=R.stateNode;if(R.tag===5&&J!==null&&(R=J,E!==null&&(J=un(S,E),J!=null&&ie.push(ds(S,J,R)))),Qe)break;S=S.return}0<ie.length&&(V=new Z(V,se,null,n,H),W.push({event:V,listeners:ie}))}}if((t&7)===0){e:{if(V=e==="mouseover"||e==="pointerover",Z=e==="mouseout"||e==="pointerout",V&&n!==Vr&&(se=n.relatedTarget||n.fromElement)&&(Fn(se)||se[Jt]))break e;if((Z||V)&&(V=H.window===H?H:(V=H.ownerDocument)?V.defaultView||V.parentWindow:window,Z?(se=n.relatedTarget||n.toElement,Z=T,se=se?Fn(se):null,se!==null&&(Qe=Dn(se),se!==Qe||se.tag!==5&&se.tag!==6)&&(se=null)):(Z=null,se=T),Z!==se)){if(ie=iu,J="onMouseLeave",E="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(ie=uu,J="onPointerLeave",E="onPointerEnter",S="pointer"),Qe=Z==null?V:pr(Z),R=se==null?V:pr(se),V=new ie(J,S+"leave",Z,n,H),V.target=Qe,V.relatedTarget=R,J=null,Fn(H)===T&&(ie=new ie(E,S+"enter",se,n,H),ie.target=R,ie.relatedTarget=Qe,J=ie),Qe=J,Z&&se)t:{for(ie=Z,E=se,S=0,R=ie;R;R=dr(R))S++;for(R=0,J=E;J;J=dr(J))R++;for(;0<S-R;)ie=dr(ie),S--;for(;0<R-S;)E=dr(E),R--;for(;S--;){if(ie===E||E!==null&&ie===E.alternate)break t;ie=dr(ie),E=dr(E)}ie=null}else ie=null;Z!==null&&Du(W,V,Z,ie,!1),se!==null&&Qe!==null&&Du(W,Qe,se,ie,!0)}}e:{if(V=T?pr(T):window,Z=V.nodeName&&V.nodeName.toLowerCase(),Z==="select"||Z==="input"&&V.type==="file")var ce=$p;else if(hu(V))if(gu)ce=Wp;else{ce=Vp;var he=Bp}else(Z=V.nodeName)&&Z.toLowerCase()==="input"&&(V.type==="checkbox"||V.type==="radio")&&(ce=Hp);if(ce&&(ce=ce(e,T))){xu(W,ce,n,H);break e}he&&he(e,V,T),e==="focusout"&&(he=V._wrapperState)&&he.controlled&&V.type==="number"&&Mr(V,"number",V.value)}switch(he=T?pr(T):window,e){case"focusin":(hu(he)||he.contentEditable==="true")&&(ur=he,Ia=T,os=null);break;case"focusout":os=Ia=ur=null;break;case"mousedown":$a=!0;break;case"contextmenu":case"mouseup":case"dragend":$a=!1,bu(W,n,H);break;case"selectionchange":if(Qp)break;case"keydown":case"keyup":bu(W,n,H)}var xe;if(Da)e:{switch(e){case"compositionstart":var ve="onCompositionStart";break e;case"compositionend":ve="onCompositionEnd";break e;case"compositionupdate":ve="onCompositionUpdate";break e}ve=void 0}else or?pu(e,n)&&(ve="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(ve="onCompositionStart");ve&&(cu&&n.locale!=="ko"&&(or||ve!=="onCompositionStart"?ve==="onCompositionEnd"&&or&&(xe=lu()):(mn=H,Ra="value"in mn?mn.value:mn.textContent,or=!0)),he=ul(T,ve),0<he.length&&(ve=new ou(ve,e,null,n,H),W.push({event:ve,listeners:he}),xe?ve.data=xe:(xe=mu(n),xe!==null&&(ve.data=xe)))),(xe=Dp?Fp(e,n):Up(e,n))&&(T=ul(T,"onBeforeInput"),0<T.length&&(H=new ou("onBeforeInput","beforeinput",null,n,H),W.push({event:H,listeners:T}),H.data=xe))}zu(W,t)})}function ds(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ul(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,u=o.stateNode;o.tag===5&&u!==null&&(o=u,u=un(e,n),u!=null&&r.unshift(ds(e,u,o)),u=un(e,t),u!=null&&r.push(ds(e,u,o))),e=e.return}return r}function dr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Du(e,t,n,r,o){for(var u=t._reactName,p=[];n!==null&&n!==r;){var g=n,k=g.alternate,T=g.stateNode;if(k!==null&&k===r)break;g.tag===5&&T!==null&&(g=T,o?(k=un(n,u),k!=null&&p.unshift(ds(n,k,g))):o||(k=un(n,u),k!=null&&p.push(ds(n,k,g)))),n=n.return}p.length!==0&&e.push({event:t,listeners:p})}var Xp=/\r\n?/g,Zp=/\u0000|\uFFFD/g;function Fu(e){return(typeof e=="string"?e:""+e).replace(Xp,`
`).replace(Zp,"")}function cl(e,t,n){if(t=Fu(t),Fu(e)!==t&&n)throw Error(i(425))}function dl(){}var Ka=null,Qa=null;function Ja(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ga=typeof setTimeout=="function"?setTimeout:void 0,em=typeof clearTimeout=="function"?clearTimeout:void 0,Uu=typeof Promise=="function"?Promise:void 0,tm=typeof queueMicrotask=="function"?queueMicrotask:typeof Uu<"u"?function(e){return Uu.resolve(null).then(e).catch(nm)}:Ga;function nm(e){setTimeout(function(){throw e})}function Ya(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),ts(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);ts(t)}function xn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Mu(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var fr=Math.random().toString(36).slice(2),Vt="__reactFiber$"+fr,fs="__reactProps$"+fr,Jt="__reactContainer$"+fr,Xa="__reactEvents$"+fr,rm="__reactListeners$"+fr,sm="__reactHandles$"+fr;function Fn(e){var t=e[Vt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Jt]||n[Vt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Mu(e);e!==null;){if(n=e[Vt])return n;e=Mu(e)}return t}e=n,n=e.parentNode}return null}function ps(e){return e=e[Vt]||e[Jt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function pr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(i(33))}function fl(e){return e[fs]||null}var Za=[],mr=-1;function gn(e){return{current:e}}function Me(e){0>mr||(e.current=Za[mr],Za[mr]=null,mr--)}function Fe(e,t){mr++,Za[mr]=e.current,e.current=t}var yn={},st=gn(yn),ft=gn(!1),Un=yn;function hr(e,t){var n=e.type.contextTypes;if(!n)return yn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},u;for(u in n)o[u]=t[u];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function pt(e){return e=e.childContextTypes,e!=null}function pl(){Me(ft),Me(st)}function Iu(e,t,n){if(st.current!==yn)throw Error(i(168));Fe(st,t),Fe(ft,n)}function $u(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(i(108,we(e)||"Unknown",o));return G({},n,r)}function ml(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||yn,Un=st.current,Fe(st,e),Fe(ft,ft.current),!0}function Bu(e,t,n){var r=e.stateNode;if(!r)throw Error(i(169));n?(e=$u(e,t,Un),r.__reactInternalMemoizedMergedChildContext=e,Me(ft),Me(st),Fe(st,e)):Me(ft),Fe(ft,n)}var Gt=null,hl=!1,ei=!1;function Vu(e){Gt===null?Gt=[e]:Gt.push(e)}function lm(e){hl=!0,Vu(e)}function vn(){if(!ei&&Gt!==null){ei=!0;var e=0,t=Oe;try{var n=Gt;for(Oe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Gt=null,hl=!1}catch(o){throw Gt!==null&&(Gt=Gt.slice(e+1)),Wo(ja,vn),o}finally{Oe=t,ei=!1}}return null}var xr=[],gr=0,xl=null,gl=0,bt=[],Ct=0,Mn=null,Yt=1,Xt="";function In(e,t){xr[gr++]=gl,xr[gr++]=xl,xl=e,gl=t}function Hu(e,t,n){bt[Ct++]=Yt,bt[Ct++]=Xt,bt[Ct++]=Mn,Mn=e;var r=Yt;e=Xt;var o=32-Lt(r)-1;r&=~(1<<o),n+=1;var u=32-Lt(t)+o;if(30<u){var p=o-o%5;u=(r&(1<<p)-1).toString(32),r>>=p,o-=p,Yt=1<<32-Lt(t)+o|n<<o|r,Xt=u+e}else Yt=1<<u|n<<o|r,Xt=e}function ti(e){e.return!==null&&(In(e,1),Hu(e,1,0))}function ni(e){for(;e===xl;)xl=xr[--gr],xr[gr]=null,gl=xr[--gr],xr[gr]=null;for(;e===Mn;)Mn=bt[--Ct],bt[Ct]=null,Xt=bt[--Ct],bt[Ct]=null,Yt=bt[--Ct],bt[Ct]=null}var jt=null,Nt=null,Ie=!1,zt=null;function Wu(e,t){var n=Rt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function qu(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,jt=e,Nt=xn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,jt=e,Nt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Mn!==null?{id:Yt,overflow:Xt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Rt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,jt=e,Nt=null,!0):!1;default:return!1}}function ri(e){return(e.mode&1)!==0&&(e.flags&128)===0}function si(e){if(Ie){var t=Nt;if(t){var n=t;if(!qu(e,t)){if(ri(e))throw Error(i(418));t=xn(n.nextSibling);var r=jt;t&&qu(e,t)?Wu(r,n):(e.flags=e.flags&-4097|2,Ie=!1,jt=e)}}else{if(ri(e))throw Error(i(418));e.flags=e.flags&-4097|2,Ie=!1,jt=e}}}function Ku(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;jt=e}function yl(e){if(e!==jt)return!1;if(!Ie)return Ku(e),Ie=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ja(e.type,e.memoizedProps)),t&&(t=Nt)){if(ri(e))throw Qu(),Error(i(418));for(;t;)Wu(e,t),t=xn(t.nextSibling)}if(Ku(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Nt=xn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Nt=null}}else Nt=jt?xn(e.stateNode.nextSibling):null;return!0}function Qu(){for(var e=Nt;e;)e=xn(e.nextSibling)}function yr(){Nt=jt=null,Ie=!1}function li(e){zt===null?zt=[e]:zt.push(e)}var am=Q.ReactCurrentBatchConfig;function ms(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(i(309));var r=n.stateNode}if(!r)throw Error(i(147,e));var o=r,u=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===u?t.ref:(t=function(p){var g=o.refs;p===null?delete g[u]:g[u]=p},t._stringRef=u,t)}if(typeof e!="string")throw Error(i(284));if(!n._owner)throw Error(i(290,e))}return e}function vl(e,t){throw e=Object.prototype.toString.call(t),Error(i(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ju(e){var t=e._init;return t(e._payload)}function Gu(e){function t(E,S){if(e){var R=E.deletions;R===null?(E.deletions=[S],E.flags|=16):R.push(S)}}function n(E,S){if(!e)return null;for(;S!==null;)t(E,S),S=S.sibling;return null}function r(E,S){for(E=new Map;S!==null;)S.key!==null?E.set(S.key,S):E.set(S.index,S),S=S.sibling;return E}function o(E,S){return E=_n(E,S),E.index=0,E.sibling=null,E}function u(E,S,R){return E.index=R,e?(R=E.alternate,R!==null?(R=R.index,R<S?(E.flags|=2,S):R):(E.flags|=2,S)):(E.flags|=1048576,S)}function p(E){return e&&E.alternate===null&&(E.flags|=2),E}function g(E,S,R,J){return S===null||S.tag!==6?(S=Gi(R,E.mode,J),S.return=E,S):(S=o(S,R),S.return=E,S)}function k(E,S,R,J){var ce=R.type;return ce===z?H(E,S,R.props.children,J,R.key):S!==null&&(S.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===ge&&Ju(ce)===S.type)?(J=o(S,R.props),J.ref=ms(E,S,R),J.return=E,J):(J=Vl(R.type,R.key,R.props,null,E.mode,J),J.ref=ms(E,S,R),J.return=E,J)}function T(E,S,R,J){return S===null||S.tag!==4||S.stateNode.containerInfo!==R.containerInfo||S.stateNode.implementation!==R.implementation?(S=Yi(R,E.mode,J),S.return=E,S):(S=o(S,R.children||[]),S.return=E,S)}function H(E,S,R,J,ce){return S===null||S.tag!==7?(S=Qn(R,E.mode,J,ce),S.return=E,S):(S=o(S,R),S.return=E,S)}function W(E,S,R){if(typeof S=="string"&&S!==""||typeof S=="number")return S=Gi(""+S,E.mode,R),S.return=E,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case me:return R=Vl(S.type,S.key,S.props,null,E.mode,R),R.ref=ms(E,null,S),R.return=E,R;case fe:return S=Yi(S,E.mode,R),S.return=E,S;case ge:var J=S._init;return W(E,J(S._payload),R)}if(On(S)||ee(S))return S=Qn(S,E.mode,R,null),S.return=E,S;vl(E,S)}return null}function V(E,S,R,J){var ce=S!==null?S.key:null;if(typeof R=="string"&&R!==""||typeof R=="number")return ce!==null?null:g(E,S,""+R,J);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case me:return R.key===ce?k(E,S,R,J):null;case fe:return R.key===ce?T(E,S,R,J):null;case ge:return ce=R._init,V(E,S,ce(R._payload),J)}if(On(R)||ee(R))return ce!==null?null:H(E,S,R,J,null);vl(E,R)}return null}function Z(E,S,R,J,ce){if(typeof J=="string"&&J!==""||typeof J=="number")return E=E.get(R)||null,g(S,E,""+J,ce);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case me:return E=E.get(J.key===null?R:J.key)||null,k(S,E,J,ce);case fe:return E=E.get(J.key===null?R:J.key)||null,T(S,E,J,ce);case ge:var he=J._init;return Z(E,S,R,he(J._payload),ce)}if(On(J)||ee(J))return E=E.get(R)||null,H(S,E,J,ce,null);vl(S,J)}return null}function se(E,S,R,J){for(var ce=null,he=null,xe=S,ve=S=0,tt=null;xe!==null&&ve<R.length;ve++){xe.index>ve?(tt=xe,xe=null):tt=xe.sibling;var Re=V(E,xe,R[ve],J);if(Re===null){xe===null&&(xe=tt);break}e&&xe&&Re.alternate===null&&t(E,xe),S=u(Re,S,ve),he===null?ce=Re:he.sibling=Re,he=Re,xe=tt}if(ve===R.length)return n(E,xe),Ie&&In(E,ve),ce;if(xe===null){for(;ve<R.length;ve++)xe=W(E,R[ve],J),xe!==null&&(S=u(xe,S,ve),he===null?ce=xe:he.sibling=xe,he=xe);return Ie&&In(E,ve),ce}for(xe=r(E,xe);ve<R.length;ve++)tt=Z(xe,E,ve,R[ve],J),tt!==null&&(e&&tt.alternate!==null&&xe.delete(tt.key===null?ve:tt.key),S=u(tt,S,ve),he===null?ce=tt:he.sibling=tt,he=tt);return e&&xe.forEach(function(En){return t(E,En)}),Ie&&In(E,ve),ce}function ie(E,S,R,J){var ce=ee(R);if(typeof ce!="function")throw Error(i(150));if(R=ce.call(R),R==null)throw Error(i(151));for(var he=ce=null,xe=S,ve=S=0,tt=null,Re=R.next();xe!==null&&!Re.done;ve++,Re=R.next()){xe.index>ve?(tt=xe,xe=null):tt=xe.sibling;var En=V(E,xe,Re.value,J);if(En===null){xe===null&&(xe=tt);break}e&&xe&&En.alternate===null&&t(E,xe),S=u(En,S,ve),he===null?ce=En:he.sibling=En,he=En,xe=tt}if(Re.done)return n(E,xe),Ie&&In(E,ve),ce;if(xe===null){for(;!Re.done;ve++,Re=R.next())Re=W(E,Re.value,J),Re!==null&&(S=u(Re,S,ve),he===null?ce=Re:he.sibling=Re,he=Re);return Ie&&In(E,ve),ce}for(xe=r(E,xe);!Re.done;ve++,Re=R.next())Re=Z(xe,E,ve,Re.value,J),Re!==null&&(e&&Re.alternate!==null&&xe.delete(Re.key===null?ve:Re.key),S=u(Re,S,ve),he===null?ce=Re:he.sibling=Re,he=Re);return e&&xe.forEach(function(Mm){return t(E,Mm)}),Ie&&In(E,ve),ce}function Qe(E,S,R,J){if(typeof R=="object"&&R!==null&&R.type===z&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case me:e:{for(var ce=R.key,he=S;he!==null;){if(he.key===ce){if(ce=R.type,ce===z){if(he.tag===7){n(E,he.sibling),S=o(he,R.props.children),S.return=E,E=S;break e}}else if(he.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===ge&&Ju(ce)===he.type){n(E,he.sibling),S=o(he,R.props),S.ref=ms(E,he,R),S.return=E,E=S;break e}n(E,he);break}else t(E,he);he=he.sibling}R.type===z?(S=Qn(R.props.children,E.mode,J,R.key),S.return=E,E=S):(J=Vl(R.type,R.key,R.props,null,E.mode,J),J.ref=ms(E,S,R),J.return=E,E=J)}return p(E);case fe:e:{for(he=R.key;S!==null;){if(S.key===he)if(S.tag===4&&S.stateNode.containerInfo===R.containerInfo&&S.stateNode.implementation===R.implementation){n(E,S.sibling),S=o(S,R.children||[]),S.return=E,E=S;break e}else{n(E,S);break}else t(E,S);S=S.sibling}S=Yi(R,E.mode,J),S.return=E,E=S}return p(E);case ge:return he=R._init,Qe(E,S,he(R._payload),J)}if(On(R))return se(E,S,R,J);if(ee(R))return ie(E,S,R,J);vl(E,R)}return typeof R=="string"&&R!==""||typeof R=="number"?(R=""+R,S!==null&&S.tag===6?(n(E,S.sibling),S=o(S,R),S.return=E,E=S):(n(E,S),S=Gi(R,E.mode,J),S.return=E,E=S),p(E)):n(E,S)}return Qe}var vr=Gu(!0),Yu=Gu(!1),wl=gn(null),kl=null,wr=null,ai=null;function ii(){ai=wr=kl=null}function oi(e){var t=wl.current;Me(wl),e._currentValue=t}function ui(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function kr(e,t){kl=e,ai=wr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(mt=!0),e.firstContext=null)}function _t(e){var t=e._currentValue;if(ai!==e)if(e={context:e,memoizedValue:t,next:null},wr===null){if(kl===null)throw Error(i(308));wr=e,kl.dependencies={lanes:0,firstContext:e}}else wr=wr.next=e;return t}var $n=null;function ci(e){$n===null?$n=[e]:$n.push(e)}function Xu(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,ci(t)):(n.next=o.next,o.next=n),t.interleaved=n,Zt(e,r)}function Zt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var wn=!1;function di(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Zu(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function en(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function kn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Pe&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Zt(e,n)}return o=r.interleaved,o===null?(t.next=t,ci(r)):(t.next=o.next,o.next=t),r.interleaved=t,Zt(e,n)}function jl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ba(e,n)}}function ec(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,u=null;if(n=n.firstBaseUpdate,n!==null){do{var p={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};u===null?o=u=p:u=u.next=p,n=n.next}while(n!==null);u===null?o=u=t:u=u.next=t}else o=u=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:u,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Nl(e,t,n,r){var o=e.updateQueue;wn=!1;var u=o.firstBaseUpdate,p=o.lastBaseUpdate,g=o.shared.pending;if(g!==null){o.shared.pending=null;var k=g,T=k.next;k.next=null,p===null?u=T:p.next=T,p=k;var H=e.alternate;H!==null&&(H=H.updateQueue,g=H.lastBaseUpdate,g!==p&&(g===null?H.firstBaseUpdate=T:g.next=T,H.lastBaseUpdate=k))}if(u!==null){var W=o.baseState;p=0,H=T=k=null,g=u;do{var V=g.lane,Z=g.eventTime;if((r&V)===V){H!==null&&(H=H.next={eventTime:Z,lane:0,tag:g.tag,payload:g.payload,callback:g.callback,next:null});e:{var se=e,ie=g;switch(V=t,Z=n,ie.tag){case 1:if(se=ie.payload,typeof se=="function"){W=se.call(Z,W,V);break e}W=se;break e;case 3:se.flags=se.flags&-65537|128;case 0:if(se=ie.payload,V=typeof se=="function"?se.call(Z,W,V):se,V==null)break e;W=G({},W,V);break e;case 2:wn=!0}}g.callback!==null&&g.lane!==0&&(e.flags|=64,V=o.effects,V===null?o.effects=[g]:V.push(g))}else Z={eventTime:Z,lane:V,tag:g.tag,payload:g.payload,callback:g.callback,next:null},H===null?(T=H=Z,k=W):H=H.next=Z,p|=V;if(g=g.next,g===null){if(g=o.shared.pending,g===null)break;V=g,g=V.next,V.next=null,o.lastBaseUpdate=V,o.shared.pending=null}}while(!0);if(H===null&&(k=W),o.baseState=k,o.firstBaseUpdate=T,o.lastBaseUpdate=H,t=o.shared.interleaved,t!==null){o=t;do p|=o.lane,o=o.next;while(o!==t)}else u===null&&(o.shared.lanes=0);Hn|=p,e.lanes=p,e.memoizedState=W}}function tc(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(i(191,o));o.call(r)}}}var hs={},Ht=gn(hs),xs=gn(hs),gs=gn(hs);function Bn(e){if(e===hs)throw Error(i(174));return e}function fi(e,t){switch(Fe(gs,t),Fe(xs,e),Fe(Ht,hs),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:$r(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=$r(t,e)}Me(Ht),Fe(Ht,t)}function jr(){Me(Ht),Me(xs),Me(gs)}function nc(e){Bn(gs.current);var t=Bn(Ht.current),n=$r(t,e.type);t!==n&&(Fe(xs,e),Fe(Ht,n))}function pi(e){xs.current===e&&(Me(Ht),Me(xs))}var Be=gn(0);function Sl(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var mi=[];function hi(){for(var e=0;e<mi.length;e++)mi[e]._workInProgressVersionPrimary=null;mi.length=0}var bl=Q.ReactCurrentDispatcher,xi=Q.ReactCurrentBatchConfig,Vn=0,Ve=null,Ye=null,Ze=null,Cl=!1,ys=!1,vs=0,im=0;function lt(){throw Error(i(321))}function gi(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ot(e[n],t[n]))return!1;return!0}function yi(e,t,n,r,o,u){if(Vn=u,Ve=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,bl.current=e===null||e.memoizedState===null?dm:fm,e=n(r,o),ys){u=0;do{if(ys=!1,vs=0,25<=u)throw Error(i(301));u+=1,Ze=Ye=null,t.updateQueue=null,bl.current=pm,e=n(r,o)}while(ys)}if(bl.current=Pl,t=Ye!==null&&Ye.next!==null,Vn=0,Ze=Ye=Ve=null,Cl=!1,t)throw Error(i(300));return e}function vi(){var e=vs!==0;return vs=0,e}function Wt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ze===null?Ve.memoizedState=Ze=e:Ze=Ze.next=e,Ze}function Et(){if(Ye===null){var e=Ve.alternate;e=e!==null?e.memoizedState:null}else e=Ye.next;var t=Ze===null?Ve.memoizedState:Ze.next;if(t!==null)Ze=t,Ye=e;else{if(e===null)throw Error(i(310));Ye=e,e={memoizedState:Ye.memoizedState,baseState:Ye.baseState,baseQueue:Ye.baseQueue,queue:Ye.queue,next:null},Ze===null?Ve.memoizedState=Ze=e:Ze=Ze.next=e}return Ze}function ws(e,t){return typeof t=="function"?t(e):t}function wi(e){var t=Et(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=Ye,o=r.baseQueue,u=n.pending;if(u!==null){if(o!==null){var p=o.next;o.next=u.next,u.next=p}r.baseQueue=o=u,n.pending=null}if(o!==null){u=o.next,r=r.baseState;var g=p=null,k=null,T=u;do{var H=T.lane;if((Vn&H)===H)k!==null&&(k=k.next={lane:0,action:T.action,hasEagerState:T.hasEagerState,eagerState:T.eagerState,next:null}),r=T.hasEagerState?T.eagerState:e(r,T.action);else{var W={lane:H,action:T.action,hasEagerState:T.hasEagerState,eagerState:T.eagerState,next:null};k===null?(g=k=W,p=r):k=k.next=W,Ve.lanes|=H,Hn|=H}T=T.next}while(T!==null&&T!==u);k===null?p=r:k.next=g,Ot(r,t.memoizedState)||(mt=!0),t.memoizedState=r,t.baseState=p,t.baseQueue=k,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do u=o.lane,Ve.lanes|=u,Hn|=u,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function ki(e){var t=Et(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,u=t.memoizedState;if(o!==null){n.pending=null;var p=o=o.next;do u=e(u,p.action),p=p.next;while(p!==o);Ot(u,t.memoizedState)||(mt=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),n.lastRenderedState=u}return[u,r]}function rc(){}function sc(e,t){var n=Ve,r=Et(),o=t(),u=!Ot(r.memoizedState,o);if(u&&(r.memoizedState=o,mt=!0),r=r.queue,ji(ic.bind(null,n,r,e),[e]),r.getSnapshot!==t||u||Ze!==null&&Ze.memoizedState.tag&1){if(n.flags|=2048,ks(9,ac.bind(null,n,r,o,t),void 0,null),et===null)throw Error(i(349));(Vn&30)!==0||lc(n,t,o)}return o}function lc(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ve.updateQueue,t===null?(t={lastEffect:null,stores:null},Ve.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ac(e,t,n,r){t.value=n,t.getSnapshot=r,oc(t)&&uc(e)}function ic(e,t,n){return n(function(){oc(t)&&uc(e)})}function oc(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ot(e,n)}catch{return!0}}function uc(e){var t=Zt(e,1);t!==null&&Ut(t,e,1,-1)}function cc(e){var t=Wt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ws,lastRenderedState:e},t.queue=e,e=e.dispatch=cm.bind(null,Ve,e),[t.memoizedState,e]}function ks(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ve.updateQueue,t===null?(t={lastEffect:null,stores:null},Ve.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function dc(){return Et().memoizedState}function _l(e,t,n,r){var o=Wt();Ve.flags|=e,o.memoizedState=ks(1|t,n,void 0,r===void 0?null:r)}function El(e,t,n,r){var o=Et();r=r===void 0?null:r;var u=void 0;if(Ye!==null){var p=Ye.memoizedState;if(u=p.destroy,r!==null&&gi(r,p.deps)){o.memoizedState=ks(t,n,u,r);return}}Ve.flags|=e,o.memoizedState=ks(1|t,n,u,r)}function fc(e,t){return _l(8390656,8,e,t)}function ji(e,t){return El(2048,8,e,t)}function pc(e,t){return El(4,2,e,t)}function mc(e,t){return El(4,4,e,t)}function hc(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function xc(e,t,n){return n=n!=null?n.concat([e]):null,El(4,4,hc.bind(null,t,e),n)}function Ni(){}function gc(e,t){var n=Et();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&gi(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function yc(e,t){var n=Et();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&gi(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function vc(e,t,n){return(Vn&21)===0?(e.baseState&&(e.baseState=!1,mt=!0),e.memoizedState=n):(Ot(n,t)||(n=Jo(),Ve.lanes|=n,Hn|=n,e.baseState=!0),t)}function om(e,t){var n=Oe;Oe=n!==0&&4>n?n:4,e(!0);var r=xi.transition;xi.transition={};try{e(!1),t()}finally{Oe=n,xi.transition=r}}function wc(){return Et().memoizedState}function um(e,t,n){var r=bn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},kc(e))jc(t,n);else if(n=Xu(e,t,n,r),n!==null){var o=ct();Ut(n,e,r,o),Nc(n,t,r)}}function cm(e,t,n){var r=bn(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(kc(e))jc(t,o);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var p=t.lastRenderedState,g=u(p,n);if(o.hasEagerState=!0,o.eagerState=g,Ot(g,p)){var k=t.interleaved;k===null?(o.next=o,ci(t)):(o.next=k.next,k.next=o),t.interleaved=o;return}}catch{}finally{}n=Xu(e,t,o,r),n!==null&&(o=ct(),Ut(n,e,r,o),Nc(n,t,r))}}function kc(e){var t=e.alternate;return e===Ve||t!==null&&t===Ve}function jc(e,t){ys=Cl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Nc(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ba(e,n)}}var Pl={readContext:_t,useCallback:lt,useContext:lt,useEffect:lt,useImperativeHandle:lt,useInsertionEffect:lt,useLayoutEffect:lt,useMemo:lt,useReducer:lt,useRef:lt,useState:lt,useDebugValue:lt,useDeferredValue:lt,useTransition:lt,useMutableSource:lt,useSyncExternalStore:lt,useId:lt,unstable_isNewReconciler:!1},dm={readContext:_t,useCallback:function(e,t){return Wt().memoizedState=[e,t===void 0?null:t],e},useContext:_t,useEffect:fc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,_l(4194308,4,hc.bind(null,t,e),n)},useLayoutEffect:function(e,t){return _l(4194308,4,e,t)},useInsertionEffect:function(e,t){return _l(4,2,e,t)},useMemo:function(e,t){var n=Wt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Wt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=um.bind(null,Ve,e),[r.memoizedState,e]},useRef:function(e){var t=Wt();return e={current:e},t.memoizedState=e},useState:cc,useDebugValue:Ni,useDeferredValue:function(e){return Wt().memoizedState=e},useTransition:function(){var e=cc(!1),t=e[0];return e=om.bind(null,e[1]),Wt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ve,o=Wt();if(Ie){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),et===null)throw Error(i(349));(Vn&30)!==0||lc(r,t,n)}o.memoizedState=n;var u={value:n,getSnapshot:t};return o.queue=u,fc(ic.bind(null,r,u,e),[e]),r.flags|=2048,ks(9,ac.bind(null,r,u,n,t),void 0,null),n},useId:function(){var e=Wt(),t=et.identifierPrefix;if(Ie){var n=Xt,r=Yt;n=(r&~(1<<32-Lt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=vs++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=im++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},fm={readContext:_t,useCallback:gc,useContext:_t,useEffect:ji,useImperativeHandle:xc,useInsertionEffect:pc,useLayoutEffect:mc,useMemo:yc,useReducer:wi,useRef:dc,useState:function(){return wi(ws)},useDebugValue:Ni,useDeferredValue:function(e){var t=Et();return vc(t,Ye.memoizedState,e)},useTransition:function(){var e=wi(ws)[0],t=Et().memoizedState;return[e,t]},useMutableSource:rc,useSyncExternalStore:sc,useId:wc,unstable_isNewReconciler:!1},pm={readContext:_t,useCallback:gc,useContext:_t,useEffect:ji,useImperativeHandle:xc,useInsertionEffect:pc,useLayoutEffect:mc,useMemo:yc,useReducer:ki,useRef:dc,useState:function(){return ki(ws)},useDebugValue:Ni,useDeferredValue:function(e){var t=Et();return Ye===null?t.memoizedState=e:vc(t,Ye.memoizedState,e)},useTransition:function(){var e=ki(ws)[0],t=Et().memoizedState;return[e,t]},useMutableSource:rc,useSyncExternalStore:sc,useId:wc,unstable_isNewReconciler:!1};function At(e,t){if(e&&e.defaultProps){t=G({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Si(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:G({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Rl={isMounted:function(e){return(e=e._reactInternals)?Dn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ct(),o=bn(e),u=en(r,o);u.payload=t,n!=null&&(u.callback=n),t=kn(e,u,o),t!==null&&(Ut(t,e,o,r),jl(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ct(),o=bn(e),u=en(r,o);u.tag=1,u.payload=t,n!=null&&(u.callback=n),t=kn(e,u,o),t!==null&&(Ut(t,e,o,r),jl(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ct(),r=bn(e),o=en(n,r);o.tag=2,t!=null&&(o.callback=t),t=kn(e,o,r),t!==null&&(Ut(t,e,r,n),jl(t,e,r))}};function Sc(e,t,n,r,o,u,p){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,u,p):t.prototype&&t.prototype.isPureReactComponent?!is(n,r)||!is(o,u):!0}function bc(e,t,n){var r=!1,o=yn,u=t.contextType;return typeof u=="object"&&u!==null?u=_t(u):(o=pt(t)?Un:st.current,r=t.contextTypes,u=(r=r!=null)?hr(e,o):yn),t=new t(n,u),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Rl,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=u),t}function Cc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Rl.enqueueReplaceState(t,t.state,null)}function bi(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},di(e);var u=t.contextType;typeof u=="object"&&u!==null?o.context=_t(u):(u=pt(t)?Un:st.current,o.context=hr(e,u)),o.state=e.memoizedState,u=t.getDerivedStateFromProps,typeof u=="function"&&(Si(e,t,u,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&Rl.enqueueReplaceState(o,o.state,null),Nl(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Nr(e,t){try{var n="",r=t;do n+=ye(r),r=r.return;while(r);var o=n}catch(u){o=`
Error generating stack: `+u.message+`
`+u.stack}return{value:e,source:t,stack:o,digest:null}}function Ci(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function _i(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var mm=typeof WeakMap=="function"?WeakMap:Map;function _c(e,t,n){n=en(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Fl||(Fl=!0,Bi=r),_i(e,t)},n}function Ec(e,t,n){n=en(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){_i(e,t)}}var u=e.stateNode;return u!==null&&typeof u.componentDidCatch=="function"&&(n.callback=function(){_i(e,t),typeof r!="function"&&(Nn===null?Nn=new Set([this]):Nn.add(this));var p=t.stack;this.componentDidCatch(t.value,{componentStack:p!==null?p:""})}),n}function Pc(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new mm;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=Em.bind(null,e,t,n),t.then(e,e))}function Rc(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Tc(e,t,n,r,o){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=en(-1,1),t.tag=2,kn(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var hm=Q.ReactCurrentOwner,mt=!1;function ut(e,t,n,r){t.child=e===null?Yu(t,null,n,r):vr(t,e.child,n,r)}function Lc(e,t,n,r,o){n=n.render;var u=t.ref;return kr(t,o),r=yi(e,t,n,r,u,o),n=vi(),e!==null&&!mt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,tn(e,t,o)):(Ie&&n&&ti(t),t.flags|=1,ut(e,t,r,o),t.child)}function Oc(e,t,n,r,o){if(e===null){var u=n.type;return typeof u=="function"&&!Ji(u)&&u.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=u,zc(e,t,u,r,o)):(e=Vl(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,(e.lanes&o)===0){var p=u.memoizedProps;if(n=n.compare,n=n!==null?n:is,n(p,r)&&e.ref===t.ref)return tn(e,t,o)}return t.flags|=1,e=_n(u,r),e.ref=t.ref,e.return=t,t.child=e}function zc(e,t,n,r,o){if(e!==null){var u=e.memoizedProps;if(is(u,r)&&e.ref===t.ref)if(mt=!1,t.pendingProps=r=u,(e.lanes&o)!==0)(e.flags&131072)!==0&&(mt=!0);else return t.lanes=e.lanes,tn(e,t,o)}return Ei(e,t,n,r,o)}function Ac(e,t,n){var r=t.pendingProps,o=r.children,u=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Fe(br,St),St|=n;else{if((n&1073741824)===0)return e=u!==null?u.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Fe(br,St),St|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=u!==null?u.baseLanes:n,Fe(br,St),St|=r}else u!==null?(r=u.baseLanes|n,t.memoizedState=null):r=n,Fe(br,St),St|=r;return ut(e,t,o,n),t.child}function Dc(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ei(e,t,n,r,o){var u=pt(n)?Un:st.current;return u=hr(t,u),kr(t,o),n=yi(e,t,n,r,u,o),r=vi(),e!==null&&!mt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,tn(e,t,o)):(Ie&&r&&ti(t),t.flags|=1,ut(e,t,n,o),t.child)}function Fc(e,t,n,r,o){if(pt(n)){var u=!0;ml(t)}else u=!1;if(kr(t,o),t.stateNode===null)Ll(e,t),bc(t,n,r),bi(t,n,r,o),r=!0;else if(e===null){var p=t.stateNode,g=t.memoizedProps;p.props=g;var k=p.context,T=n.contextType;typeof T=="object"&&T!==null?T=_t(T):(T=pt(n)?Un:st.current,T=hr(t,T));var H=n.getDerivedStateFromProps,W=typeof H=="function"||typeof p.getSnapshotBeforeUpdate=="function";W||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(g!==r||k!==T)&&Cc(t,p,r,T),wn=!1;var V=t.memoizedState;p.state=V,Nl(t,r,p,o),k=t.memoizedState,g!==r||V!==k||ft.current||wn?(typeof H=="function"&&(Si(t,n,H,r),k=t.memoizedState),(g=wn||Sc(t,n,g,r,V,k,T))?(W||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(t.flags|=4194308)):(typeof p.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=k),p.props=r,p.state=k,p.context=T,r=g):(typeof p.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{p=t.stateNode,Zu(e,t),g=t.memoizedProps,T=t.type===t.elementType?g:At(t.type,g),p.props=T,W=t.pendingProps,V=p.context,k=n.contextType,typeof k=="object"&&k!==null?k=_t(k):(k=pt(n)?Un:st.current,k=hr(t,k));var Z=n.getDerivedStateFromProps;(H=typeof Z=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(g!==W||V!==k)&&Cc(t,p,r,k),wn=!1,V=t.memoizedState,p.state=V,Nl(t,r,p,o);var se=t.memoizedState;g!==W||V!==se||ft.current||wn?(typeof Z=="function"&&(Si(t,n,Z,r),se=t.memoizedState),(T=wn||Sc(t,n,T,r,V,se,k)||!1)?(H||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(r,se,k),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(r,se,k)),typeof p.componentDidUpdate=="function"&&(t.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof p.componentDidUpdate!="function"||g===e.memoizedProps&&V===e.memoizedState||(t.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&V===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=se),p.props=r,p.state=se,p.context=k,r=T):(typeof p.componentDidUpdate!="function"||g===e.memoizedProps&&V===e.memoizedState||(t.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&V===e.memoizedState||(t.flags|=1024),r=!1)}return Pi(e,t,n,r,u,o)}function Pi(e,t,n,r,o,u){Dc(e,t);var p=(t.flags&128)!==0;if(!r&&!p)return o&&Bu(t,n,!1),tn(e,t,u);r=t.stateNode,hm.current=t;var g=p&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&p?(t.child=vr(t,e.child,null,u),t.child=vr(t,null,g,u)):ut(e,t,g,u),t.memoizedState=r.state,o&&Bu(t,n,!0),t.child}function Uc(e){var t=e.stateNode;t.pendingContext?Iu(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Iu(e,t.context,!1),fi(e,t.containerInfo)}function Mc(e,t,n,r,o){return yr(),li(o),t.flags|=256,ut(e,t,n,r),t.child}var Ri={dehydrated:null,treeContext:null,retryLane:0};function Ti(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ic(e,t,n){var r=t.pendingProps,o=Be.current,u=!1,p=(t.flags&128)!==0,g;if((g=p)||(g=e!==null&&e.memoizedState===null?!1:(o&2)!==0),g?(u=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),Fe(Be,o&1),e===null)return si(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(p=r.children,e=r.fallback,u?(r=t.mode,u=t.child,p={mode:"hidden",children:p},(r&1)===0&&u!==null?(u.childLanes=0,u.pendingProps=p):u=Hl(p,r,0,null),e=Qn(e,r,n,null),u.return=t,e.return=t,u.sibling=e,t.child=u,t.child.memoizedState=Ti(n),t.memoizedState=Ri,e):Li(t,p));if(o=e.memoizedState,o!==null&&(g=o.dehydrated,g!==null))return xm(e,t,p,r,g,o,n);if(u){u=r.fallback,p=t.mode,o=e.child,g=o.sibling;var k={mode:"hidden",children:r.children};return(p&1)===0&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=k,t.deletions=null):(r=_n(o,k),r.subtreeFlags=o.subtreeFlags&14680064),g!==null?u=_n(g,u):(u=Qn(u,p,n,null),u.flags|=2),u.return=t,r.return=t,r.sibling=u,t.child=r,r=u,u=t.child,p=e.child.memoizedState,p=p===null?Ti(n):{baseLanes:p.baseLanes|n,cachePool:null,transitions:p.transitions},u.memoizedState=p,u.childLanes=e.childLanes&~n,t.memoizedState=Ri,r}return u=e.child,e=u.sibling,r=_n(u,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Li(e,t){return t=Hl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Tl(e,t,n,r){return r!==null&&li(r),vr(t,e.child,null,n),e=Li(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function xm(e,t,n,r,o,u,p){if(n)return t.flags&256?(t.flags&=-257,r=Ci(Error(i(422))),Tl(e,t,p,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(u=r.fallback,o=t.mode,r=Hl({mode:"visible",children:r.children},o,0,null),u=Qn(u,o,p,null),u.flags|=2,r.return=t,u.return=t,r.sibling=u,t.child=r,(t.mode&1)!==0&&vr(t,e.child,null,p),t.child.memoizedState=Ti(p),t.memoizedState=Ri,u);if((t.mode&1)===0)return Tl(e,t,p,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var g=r.dgst;return r=g,u=Error(i(419)),r=Ci(u,r,void 0),Tl(e,t,p,r)}if(g=(p&e.childLanes)!==0,mt||g){if(r=et,r!==null){switch(p&-p){case 4:o=2;break;case 16:o=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:o=32;break;case 536870912:o=268435456;break;default:o=0}o=(o&(r.suspendedLanes|p))!==0?0:o,o!==0&&o!==u.retryLane&&(u.retryLane=o,Zt(e,o),Ut(r,e,o,-1))}return Qi(),r=Ci(Error(i(421))),Tl(e,t,p,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=Pm.bind(null,e),o._reactRetry=t,null):(e=u.treeContext,Nt=xn(o.nextSibling),jt=t,Ie=!0,zt=null,e!==null&&(bt[Ct++]=Yt,bt[Ct++]=Xt,bt[Ct++]=Mn,Yt=e.id,Xt=e.overflow,Mn=t),t=Li(t,r.children),t.flags|=4096,t)}function $c(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ui(e.return,t,n)}function Oi(e,t,n,r,o){var u=e.memoizedState;u===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(u.isBackwards=t,u.rendering=null,u.renderingStartTime=0,u.last=r,u.tail=n,u.tailMode=o)}function Bc(e,t,n){var r=t.pendingProps,o=r.revealOrder,u=r.tail;if(ut(e,t,r.children,n),r=Be.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&$c(e,n,t);else if(e.tag===19)$c(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Fe(Be,r),(t.mode&1)===0)t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&Sl(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Oi(t,!1,o,n,u);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Sl(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Oi(t,!0,n,null,u);break;case"together":Oi(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ll(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function tn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Hn|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=_n(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=_n(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function gm(e,t,n){switch(t.tag){case 3:Uc(t),yr();break;case 5:nc(t);break;case 1:pt(t.type)&&ml(t);break;case 4:fi(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Fe(wl,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Fe(Be,Be.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?Ic(e,t,n):(Fe(Be,Be.current&1),e=tn(e,t,n),e!==null?e.sibling:null);Fe(Be,Be.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return Bc(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Fe(Be,Be.current),r)break;return null;case 22:case 23:return t.lanes=0,Ac(e,t,n)}return tn(e,t,n)}var Vc,zi,Hc,Wc;Vc=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},zi=function(){},Hc=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Bn(Ht.current);var u=null;switch(n){case"input":o=Le(e,o),r=Le(e,r),u=[];break;case"select":o=G({},o,{value:void 0}),r=G({},r,{value:void 0}),u=[];break;case"textarea":o=Ir(e,o),r=Ir(e,r),u=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=dl)}Br(n,r);var p;n=null;for(T in o)if(!r.hasOwnProperty(T)&&o.hasOwnProperty(T)&&o[T]!=null)if(T==="style"){var g=o[T];for(p in g)g.hasOwnProperty(p)&&(n||(n={}),n[p]="")}else T!=="dangerouslySetInnerHTML"&&T!=="children"&&T!=="suppressContentEditableWarning"&&T!=="suppressHydrationWarning"&&T!=="autoFocus"&&(d.hasOwnProperty(T)?u||(u=[]):(u=u||[]).push(T,null));for(T in r){var k=r[T];if(g=o!=null?o[T]:void 0,r.hasOwnProperty(T)&&k!==g&&(k!=null||g!=null))if(T==="style")if(g){for(p in g)!g.hasOwnProperty(p)||k&&k.hasOwnProperty(p)||(n||(n={}),n[p]="");for(p in k)k.hasOwnProperty(p)&&g[p]!==k[p]&&(n||(n={}),n[p]=k[p])}else n||(u||(u=[]),u.push(T,n)),n=k;else T==="dangerouslySetInnerHTML"?(k=k?k.__html:void 0,g=g?g.__html:void 0,k!=null&&g!==k&&(u=u||[]).push(T,k)):T==="children"?typeof k!="string"&&typeof k!="number"||(u=u||[]).push(T,""+k):T!=="suppressContentEditableWarning"&&T!=="suppressHydrationWarning"&&(d.hasOwnProperty(T)?(k!=null&&T==="onScroll"&&Ue("scroll",e),u||g===k||(u=[])):(u=u||[]).push(T,k))}n&&(u=u||[]).push("style",n);var T=u;(t.updateQueue=T)&&(t.flags|=4)}},Wc=function(e,t,n,r){n!==r&&(t.flags|=4)};function js(e,t){if(!Ie)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function at(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function ym(e,t,n){var r=t.pendingProps;switch(ni(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return at(t),null;case 1:return pt(t.type)&&pl(),at(t),null;case 3:return r=t.stateNode,jr(),Me(ft),Me(st),hi(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(yl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,zt!==null&&(Wi(zt),zt=null))),zi(e,t),at(t),null;case 5:pi(t);var o=Bn(gs.current);if(n=t.type,e!==null&&t.stateNode!=null)Hc(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(i(166));return at(t),null}if(e=Bn(Ht.current),yl(t)){r=t.stateNode,n=t.type;var u=t.memoizedProps;switch(r[Vt]=t,r[fs]=u,e=(t.mode&1)!==0,n){case"dialog":Ue("cancel",r),Ue("close",r);break;case"iframe":case"object":case"embed":Ue("load",r);break;case"video":case"audio":for(o=0;o<us.length;o++)Ue(us[o],r);break;case"source":Ue("error",r);break;case"img":case"image":case"link":Ue("error",r),Ue("load",r);break;case"details":Ue("toggle",r);break;case"input":Fr(r,u),Ue("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!u.multiple},Ue("invalid",r);break;case"textarea":Fs(r,u),Ue("invalid",r)}Br(n,u),o=null;for(var p in u)if(u.hasOwnProperty(p)){var g=u[p];p==="children"?typeof g=="string"?r.textContent!==g&&(u.suppressHydrationWarning!==!0&&cl(r.textContent,g,e),o=["children",g]):typeof g=="number"&&r.textContent!==""+g&&(u.suppressHydrationWarning!==!0&&cl(r.textContent,g,e),o=["children",""+g]):d.hasOwnProperty(p)&&g!=null&&p==="onScroll"&&Ue("scroll",r)}switch(n){case"input":ke(r),rr(r,u,!0);break;case"textarea":ke(r),Ms(r);break;case"select":case"option":break;default:typeof u.onClick=="function"&&(r.onclick=dl)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{p=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Is(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=p.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=p.createElement(n,{is:r.is}):(e=p.createElement(n),n==="select"&&(p=e,r.multiple?p.multiple=!0:r.size&&(p.size=r.size))):e=p.createElementNS(e,n),e[Vt]=t,e[fs]=r,Vc(e,t,!1,!1),t.stateNode=e;e:{switch(p=on(n,r),n){case"dialog":Ue("cancel",e),Ue("close",e),o=r;break;case"iframe":case"object":case"embed":Ue("load",e),o=r;break;case"video":case"audio":for(o=0;o<us.length;o++)Ue(us[o],e);o=r;break;case"source":Ue("error",e),o=r;break;case"img":case"image":case"link":Ue("error",e),Ue("load",e),o=r;break;case"details":Ue("toggle",e),o=r;break;case"input":Fr(e,r),o=Le(e,r),Ue("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=G({},r,{value:void 0}),Ue("invalid",e);break;case"textarea":Fs(e,r),o=Ir(e,r),Ue("invalid",e);break;default:o=r}Br(n,o),g=o;for(u in g)if(g.hasOwnProperty(u)){var k=g[u];u==="style"?Vs(e,k):u==="dangerouslySetInnerHTML"?(k=k?k.__html:void 0,k!=null&&$s(e,k)):u==="children"?typeof k=="string"?(n!=="textarea"||k!=="")&&zn(e,k):typeof k=="number"&&zn(e,""+k):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(d.hasOwnProperty(u)?k!=null&&u==="onScroll"&&Ue("scroll",e):k!=null&&K(e,u,k,p))}switch(n){case"input":ke(e),rr(e,r,!1);break;case"textarea":ke(e),Ms(e);break;case"option":r.value!=null&&e.setAttribute("value",""+oe(r.value));break;case"select":e.multiple=!!r.multiple,u=r.value,u!=null?an(e,!!r.multiple,u,!1):r.defaultValue!=null&&an(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=dl)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return at(t),null;case 6:if(e&&t.stateNode!=null)Wc(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(i(166));if(n=Bn(gs.current),Bn(Ht.current),yl(t)){if(r=t.stateNode,n=t.memoizedProps,r[Vt]=t,(u=r.nodeValue!==n)&&(e=jt,e!==null))switch(e.tag){case 3:cl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&cl(r.nodeValue,n,(e.mode&1)!==0)}u&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Vt]=t,t.stateNode=r}return at(t),null;case 13:if(Me(Be),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ie&&Nt!==null&&(t.mode&1)!==0&&(t.flags&128)===0)Qu(),yr(),t.flags|=98560,u=!1;else if(u=yl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!u)throw Error(i(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(i(317));u[Vt]=t}else yr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;at(t),u=!1}else zt!==null&&(Wi(zt),zt=null),u=!0;if(!u)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(Be.current&1)!==0?Xe===0&&(Xe=3):Qi())),t.updateQueue!==null&&(t.flags|=4),at(t),null);case 4:return jr(),zi(e,t),e===null&&cs(t.stateNode.containerInfo),at(t),null;case 10:return oi(t.type._context),at(t),null;case 17:return pt(t.type)&&pl(),at(t),null;case 19:if(Me(Be),u=t.memoizedState,u===null)return at(t),null;if(r=(t.flags&128)!==0,p=u.rendering,p===null)if(r)js(u,!1);else{if(Xe!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(p=Sl(e),p!==null){for(t.flags|=128,js(u,!1),r=p.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)u=n,e=r,u.flags&=14680066,p=u.alternate,p===null?(u.childLanes=0,u.lanes=e,u.child=null,u.subtreeFlags=0,u.memoizedProps=null,u.memoizedState=null,u.updateQueue=null,u.dependencies=null,u.stateNode=null):(u.childLanes=p.childLanes,u.lanes=p.lanes,u.child=p.child,u.subtreeFlags=0,u.deletions=null,u.memoizedProps=p.memoizedProps,u.memoizedState=p.memoizedState,u.updateQueue=p.updateQueue,u.type=p.type,e=p.dependencies,u.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Fe(Be,Be.current&1|2),t.child}e=e.sibling}u.tail!==null&&Ke()>Cr&&(t.flags|=128,r=!0,js(u,!1),t.lanes=4194304)}else{if(!r)if(e=Sl(p),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),js(u,!0),u.tail===null&&u.tailMode==="hidden"&&!p.alternate&&!Ie)return at(t),null}else 2*Ke()-u.renderingStartTime>Cr&&n!==1073741824&&(t.flags|=128,r=!0,js(u,!1),t.lanes=4194304);u.isBackwards?(p.sibling=t.child,t.child=p):(n=u.last,n!==null?n.sibling=p:t.child=p,u.last=p)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=Ke(),t.sibling=null,n=Be.current,Fe(Be,r?n&1|2:n&1),t):(at(t),null);case 22:case 23:return Ki(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(St&1073741824)!==0&&(at(t),t.subtreeFlags&6&&(t.flags|=8192)):at(t),null;case 24:return null;case 25:return null}throw Error(i(156,t.tag))}function vm(e,t){switch(ni(t),t.tag){case 1:return pt(t.type)&&pl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return jr(),Me(ft),Me(st),hi(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return pi(t),null;case 13:if(Me(Be),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));yr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Me(Be),null;case 4:return jr(),null;case 10:return oi(t.type._context),null;case 22:case 23:return Ki(),null;case 24:return null;default:return null}}var Ol=!1,it=!1,wm=typeof WeakSet=="function"?WeakSet:Set,re=null;function Sr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){We(e,t,r)}else n.current=null}function Ai(e,t,n){try{n()}catch(r){We(e,t,r)}}var qc=!1;function km(e,t){if(Ka=Zs,e=Su(),Ma(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,u=r.focusNode;r=r.focusOffset;try{n.nodeType,u.nodeType}catch{n=null;break e}var p=0,g=-1,k=-1,T=0,H=0,W=e,V=null;t:for(;;){for(var Z;W!==n||o!==0&&W.nodeType!==3||(g=p+o),W!==u||r!==0&&W.nodeType!==3||(k=p+r),W.nodeType===3&&(p+=W.nodeValue.length),(Z=W.firstChild)!==null;)V=W,W=Z;for(;;){if(W===e)break t;if(V===n&&++T===o&&(g=p),V===u&&++H===r&&(k=p),(Z=W.nextSibling)!==null)break;W=V,V=W.parentNode}W=Z}n=g===-1||k===-1?null:{start:g,end:k}}else n=null}n=n||{start:0,end:0}}else n=null;for(Qa={focusedElem:e,selectionRange:n},Zs=!1,re=t;re!==null;)if(t=re,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,re=e;else for(;re!==null;){t=re;try{var se=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(se!==null){var ie=se.memoizedProps,Qe=se.memoizedState,E=t.stateNode,S=E.getSnapshotBeforeUpdate(t.elementType===t.type?ie:At(t.type,ie),Qe);E.__reactInternalSnapshotBeforeUpdate=S}break;case 3:var R=t.stateNode.containerInfo;R.nodeType===1?R.textContent="":R.nodeType===9&&R.documentElement&&R.removeChild(R.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(i(163))}}catch(J){We(t,t.return,J)}if(e=t.sibling,e!==null){e.return=t.return,re=e;break}re=t.return}return se=qc,qc=!1,se}function Ns(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var u=o.destroy;o.destroy=void 0,u!==void 0&&Ai(t,n,u)}o=o.next}while(o!==r)}}function zl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Di(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Kc(e){var t=e.alternate;t!==null&&(e.alternate=null,Kc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Vt],delete t[fs],delete t[Xa],delete t[rm],delete t[sm])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Qc(e){return e.tag===5||e.tag===3||e.tag===4}function Jc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Qc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Fi(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=dl));else if(r!==4&&(e=e.child,e!==null))for(Fi(e,t,n),e=e.sibling;e!==null;)Fi(e,t,n),e=e.sibling}function Ui(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Ui(e,t,n),e=e.sibling;e!==null;)Ui(e,t,n),e=e.sibling}var nt=null,Dt=!1;function jn(e,t,n){for(n=n.child;n!==null;)Gc(e,t,n),n=n.sibling}function Gc(e,t,n){if(Bt&&typeof Bt.onCommitFiberUnmount=="function")try{Bt.onCommitFiberUnmount(Ks,n)}catch{}switch(n.tag){case 5:it||Sr(n,t);case 6:var r=nt,o=Dt;nt=null,jn(e,t,n),nt=r,Dt=o,nt!==null&&(Dt?(e=nt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):nt.removeChild(n.stateNode));break;case 18:nt!==null&&(Dt?(e=nt,n=n.stateNode,e.nodeType===8?Ya(e.parentNode,n):e.nodeType===1&&Ya(e,n),ts(e)):Ya(nt,n.stateNode));break;case 4:r=nt,o=Dt,nt=n.stateNode.containerInfo,Dt=!0,jn(e,t,n),nt=r,Dt=o;break;case 0:case 11:case 14:case 15:if(!it&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var u=o,p=u.destroy;u=u.tag,p!==void 0&&((u&2)!==0||(u&4)!==0)&&Ai(n,t,p),o=o.next}while(o!==r)}jn(e,t,n);break;case 1:if(!it&&(Sr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(g){We(n,t,g)}jn(e,t,n);break;case 21:jn(e,t,n);break;case 22:n.mode&1?(it=(r=it)||n.memoizedState!==null,jn(e,t,n),it=r):jn(e,t,n);break;default:jn(e,t,n)}}function Yc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new wm),t.forEach(function(r){var o=Rm.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Ft(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var u=e,p=t,g=p;e:for(;g!==null;){switch(g.tag){case 5:nt=g.stateNode,Dt=!1;break e;case 3:nt=g.stateNode.containerInfo,Dt=!0;break e;case 4:nt=g.stateNode.containerInfo,Dt=!0;break e}g=g.return}if(nt===null)throw Error(i(160));Gc(u,p,o),nt=null,Dt=!1;var k=o.alternate;k!==null&&(k.return=null),o.return=null}catch(T){We(o,t,T)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Xc(t,e),t=t.sibling}function Xc(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ft(t,e),qt(e),r&4){try{Ns(3,e,e.return),zl(3,e)}catch(ie){We(e,e.return,ie)}try{Ns(5,e,e.return)}catch(ie){We(e,e.return,ie)}}break;case 1:Ft(t,e),qt(e),r&512&&n!==null&&Sr(n,n.return);break;case 5:if(Ft(t,e),qt(e),r&512&&n!==null&&Sr(n,n.return),e.flags&32){var o=e.stateNode;try{zn(o,"")}catch(ie){We(e,e.return,ie)}}if(r&4&&(o=e.stateNode,o!=null)){var u=e.memoizedProps,p=n!==null?n.memoizedProps:u,g=e.type,k=e.updateQueue;if(e.updateQueue=null,k!==null)try{g==="input"&&u.type==="radio"&&u.name!=null&&Ur(o,u),on(g,p);var T=on(g,u);for(p=0;p<k.length;p+=2){var H=k[p],W=k[p+1];H==="style"?Vs(o,W):H==="dangerouslySetInnerHTML"?$s(o,W):H==="children"?zn(o,W):K(o,H,W,T)}switch(g){case"input":wt(o,u);break;case"textarea":Us(o,u);break;case"select":var V=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!u.multiple;var Z=u.value;Z!=null?an(o,!!u.multiple,Z,!1):V!==!!u.multiple&&(u.defaultValue!=null?an(o,!!u.multiple,u.defaultValue,!0):an(o,!!u.multiple,u.multiple?[]:"",!1))}o[fs]=u}catch(ie){We(e,e.return,ie)}}break;case 6:if(Ft(t,e),qt(e),r&4){if(e.stateNode===null)throw Error(i(162));o=e.stateNode,u=e.memoizedProps;try{o.nodeValue=u}catch(ie){We(e,e.return,ie)}}break;case 3:if(Ft(t,e),qt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ts(t.containerInfo)}catch(ie){We(e,e.return,ie)}break;case 4:Ft(t,e),qt(e);break;case 13:Ft(t,e),qt(e),o=e.child,o.flags&8192&&(u=o.memoizedState!==null,o.stateNode.isHidden=u,!u||o.alternate!==null&&o.alternate.memoizedState!==null||($i=Ke())),r&4&&Yc(e);break;case 22:if(H=n!==null&&n.memoizedState!==null,e.mode&1?(it=(T=it)||H,Ft(t,e),it=T):Ft(t,e),qt(e),r&8192){if(T=e.memoizedState!==null,(e.stateNode.isHidden=T)&&!H&&(e.mode&1)!==0)for(re=e,H=e.child;H!==null;){for(W=re=H;re!==null;){switch(V=re,Z=V.child,V.tag){case 0:case 11:case 14:case 15:Ns(4,V,V.return);break;case 1:Sr(V,V.return);var se=V.stateNode;if(typeof se.componentWillUnmount=="function"){r=V,n=V.return;try{t=r,se.props=t.memoizedProps,se.state=t.memoizedState,se.componentWillUnmount()}catch(ie){We(r,n,ie)}}break;case 5:Sr(V,V.return);break;case 22:if(V.memoizedState!==null){td(W);continue}}Z!==null?(Z.return=V,re=Z):td(W)}H=H.sibling}e:for(H=null,W=e;;){if(W.tag===5){if(H===null){H=W;try{o=W.stateNode,T?(u=o.style,typeof u.setProperty=="function"?u.setProperty("display","none","important"):u.display="none"):(g=W.stateNode,k=W.memoizedProps.style,p=k!=null&&k.hasOwnProperty("display")?k.display:null,g.style.display=Bs("display",p))}catch(ie){We(e,e.return,ie)}}}else if(W.tag===6){if(H===null)try{W.stateNode.nodeValue=T?"":W.memoizedProps}catch(ie){We(e,e.return,ie)}}else if((W.tag!==22&&W.tag!==23||W.memoizedState===null||W===e)&&W.child!==null){W.child.return=W,W=W.child;continue}if(W===e)break e;for(;W.sibling===null;){if(W.return===null||W.return===e)break e;H===W&&(H=null),W=W.return}H===W&&(H=null),W.sibling.return=W.return,W=W.sibling}}break;case 19:Ft(t,e),qt(e),r&4&&Yc(e);break;case 21:break;default:Ft(t,e),qt(e)}}function qt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Qc(n)){var r=n;break e}n=n.return}throw Error(i(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(zn(o,""),r.flags&=-33);var u=Jc(e);Ui(e,u,o);break;case 3:case 4:var p=r.stateNode.containerInfo,g=Jc(e);Fi(e,g,p);break;default:throw Error(i(161))}}catch(k){We(e,e.return,k)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function jm(e,t,n){re=e,Zc(e)}function Zc(e,t,n){for(var r=(e.mode&1)!==0;re!==null;){var o=re,u=o.child;if(o.tag===22&&r){var p=o.memoizedState!==null||Ol;if(!p){var g=o.alternate,k=g!==null&&g.memoizedState!==null||it;g=Ol;var T=it;if(Ol=p,(it=k)&&!T)for(re=o;re!==null;)p=re,k=p.child,p.tag===22&&p.memoizedState!==null?nd(o):k!==null?(k.return=p,re=k):nd(o);for(;u!==null;)re=u,Zc(u),u=u.sibling;re=o,Ol=g,it=T}ed(e)}else(o.subtreeFlags&8772)!==0&&u!==null?(u.return=o,re=u):ed(e)}}function ed(e){for(;re!==null;){var t=re;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:it||zl(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!it)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:At(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var u=t.updateQueue;u!==null&&tc(t,u,r);break;case 3:var p=t.updateQueue;if(p!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}tc(t,p,n)}break;case 5:var g=t.stateNode;if(n===null&&t.flags&4){n=g;var k=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":k.autoFocus&&n.focus();break;case"img":k.src&&(n.src=k.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var T=t.alternate;if(T!==null){var H=T.memoizedState;if(H!==null){var W=H.dehydrated;W!==null&&ts(W)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(i(163))}it||t.flags&512&&Di(t)}catch(V){We(t,t.return,V)}}if(t===e){re=null;break}if(n=t.sibling,n!==null){n.return=t.return,re=n;break}re=t.return}}function td(e){for(;re!==null;){var t=re;if(t===e){re=null;break}var n=t.sibling;if(n!==null){n.return=t.return,re=n;break}re=t.return}}function nd(e){for(;re!==null;){var t=re;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{zl(4,t)}catch(k){We(t,n,k)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(k){We(t,o,k)}}var u=t.return;try{Di(t)}catch(k){We(t,u,k)}break;case 5:var p=t.return;try{Di(t)}catch(k){We(t,p,k)}}}catch(k){We(t,t.return,k)}if(t===e){re=null;break}var g=t.sibling;if(g!==null){g.return=t.return,re=g;break}re=t.return}}var Nm=Math.ceil,Al=Q.ReactCurrentDispatcher,Mi=Q.ReactCurrentOwner,Pt=Q.ReactCurrentBatchConfig,Pe=0,et=null,Je=null,rt=0,St=0,br=gn(0),Xe=0,Ss=null,Hn=0,Dl=0,Ii=0,bs=null,ht=null,$i=0,Cr=1/0,nn=null,Fl=!1,Bi=null,Nn=null,Ul=!1,Sn=null,Ml=0,Cs=0,Vi=null,Il=-1,$l=0;function ct(){return(Pe&6)!==0?Ke():Il!==-1?Il:Il=Ke()}function bn(e){return(e.mode&1)===0?1:(Pe&2)!==0&&rt!==0?rt&-rt:am.transition!==null?($l===0&&($l=Jo()),$l):(e=Oe,e!==0||(e=window.event,e=e===void 0?16:su(e.type)),e)}function Ut(e,t,n,r){if(50<Cs)throw Cs=0,Vi=null,Error(i(185));Gr(e,n,r),((Pe&2)===0||e!==et)&&(e===et&&((Pe&2)===0&&(Dl|=n),Xe===4&&Cn(e,rt)),xt(e,r),n===1&&Pe===0&&(t.mode&1)===0&&(Cr=Ke()+500,hl&&vn()))}function xt(e,t){var n=e.callbackNode;ap(e,t);var r=Gs(e,e===et?rt:0);if(r===0)n!==null&&qo(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&qo(n),t===1)e.tag===0?lm(sd.bind(null,e)):Vu(sd.bind(null,e)),tm(function(){(Pe&6)===0&&vn()}),n=null;else{switch(Go(r)){case 1:n=ja;break;case 4:n=Ko;break;case 16:n=qs;break;case 536870912:n=Qo;break;default:n=qs}n=fd(n,rd.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function rd(e,t){if(Il=-1,$l=0,(Pe&6)!==0)throw Error(i(327));var n=e.callbackNode;if(_r()&&e.callbackNode!==n)return null;var r=Gs(e,e===et?rt:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=Bl(e,r);else{t=r;var o=Pe;Pe|=2;var u=ad();(et!==e||rt!==t)&&(nn=null,Cr=Ke()+500,qn(e,t));do try{Cm();break}catch(g){ld(e,g)}while(!0);ii(),Al.current=u,Pe=o,Je!==null?t=0:(et=null,rt=0,t=Xe)}if(t!==0){if(t===2&&(o=Na(e),o!==0&&(r=o,t=Hi(e,o))),t===1)throw n=Ss,qn(e,0),Cn(e,r),xt(e,Ke()),n;if(t===6)Cn(e,r);else{if(o=e.current.alternate,(r&30)===0&&!Sm(o)&&(t=Bl(e,r),t===2&&(u=Na(e),u!==0&&(r=u,t=Hi(e,u))),t===1))throw n=Ss,qn(e,0),Cn(e,r),xt(e,Ke()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(i(345));case 2:Kn(e,ht,nn);break;case 3:if(Cn(e,r),(r&130023424)===r&&(t=$i+500-Ke(),10<t)){if(Gs(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){ct(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Ga(Kn.bind(null,e,ht,nn),t);break}Kn(e,ht,nn);break;case 4:if(Cn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var p=31-Lt(r);u=1<<p,p=t[p],p>o&&(o=p),r&=~u}if(r=o,r=Ke()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Nm(r/1960))-r,10<r){e.timeoutHandle=Ga(Kn.bind(null,e,ht,nn),r);break}Kn(e,ht,nn);break;case 5:Kn(e,ht,nn);break;default:throw Error(i(329))}}}return xt(e,Ke()),e.callbackNode===n?rd.bind(null,e):null}function Hi(e,t){var n=bs;return e.current.memoizedState.isDehydrated&&(qn(e,t).flags|=256),e=Bl(e,t),e!==2&&(t=ht,ht=n,t!==null&&Wi(t)),e}function Wi(e){ht===null?ht=e:ht.push.apply(ht,e)}function Sm(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],u=o.getSnapshot;o=o.value;try{if(!Ot(u(),o))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Cn(e,t){for(t&=~Ii,t&=~Dl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Lt(t),r=1<<n;e[n]=-1,t&=~r}}function sd(e){if((Pe&6)!==0)throw Error(i(327));_r();var t=Gs(e,0);if((t&1)===0)return xt(e,Ke()),null;var n=Bl(e,t);if(e.tag!==0&&n===2){var r=Na(e);r!==0&&(t=r,n=Hi(e,r))}if(n===1)throw n=Ss,qn(e,0),Cn(e,t),xt(e,Ke()),n;if(n===6)throw Error(i(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Kn(e,ht,nn),xt(e,Ke()),null}function qi(e,t){var n=Pe;Pe|=1;try{return e(t)}finally{Pe=n,Pe===0&&(Cr=Ke()+500,hl&&vn())}}function Wn(e){Sn!==null&&Sn.tag===0&&(Pe&6)===0&&_r();var t=Pe;Pe|=1;var n=Pt.transition,r=Oe;try{if(Pt.transition=null,Oe=1,e)return e()}finally{Oe=r,Pt.transition=n,Pe=t,(Pe&6)===0&&vn()}}function Ki(){St=br.current,Me(br)}function qn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,em(n)),Je!==null)for(n=Je.return;n!==null;){var r=n;switch(ni(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&pl();break;case 3:jr(),Me(ft),Me(st),hi();break;case 5:pi(r);break;case 4:jr();break;case 13:Me(Be);break;case 19:Me(Be);break;case 10:oi(r.type._context);break;case 22:case 23:Ki()}n=n.return}if(et=e,Je=e=_n(e.current,null),rt=St=t,Xe=0,Ss=null,Ii=Dl=Hn=0,ht=bs=null,$n!==null){for(t=0;t<$n.length;t++)if(n=$n[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,u=n.pending;if(u!==null){var p=u.next;u.next=o,r.next=p}n.pending=r}$n=null}return e}function ld(e,t){do{var n=Je;try{if(ii(),bl.current=Pl,Cl){for(var r=Ve.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Cl=!1}if(Vn=0,Ze=Ye=Ve=null,ys=!1,vs=0,Mi.current=null,n===null||n.return===null){Xe=1,Ss=t,Je=null;break}e:{var u=e,p=n.return,g=n,k=t;if(t=rt,g.flags|=32768,k!==null&&typeof k=="object"&&typeof k.then=="function"){var T=k,H=g,W=H.tag;if((H.mode&1)===0&&(W===0||W===11||W===15)){var V=H.alternate;V?(H.updateQueue=V.updateQueue,H.memoizedState=V.memoizedState,H.lanes=V.lanes):(H.updateQueue=null,H.memoizedState=null)}var Z=Rc(p);if(Z!==null){Z.flags&=-257,Tc(Z,p,g,u,t),Z.mode&1&&Pc(u,T,t),t=Z,k=T;var se=t.updateQueue;if(se===null){var ie=new Set;ie.add(k),t.updateQueue=ie}else se.add(k);break e}else{if((t&1)===0){Pc(u,T,t),Qi();break e}k=Error(i(426))}}else if(Ie&&g.mode&1){var Qe=Rc(p);if(Qe!==null){(Qe.flags&65536)===0&&(Qe.flags|=256),Tc(Qe,p,g,u,t),li(Nr(k,g));break e}}u=k=Nr(k,g),Xe!==4&&(Xe=2),bs===null?bs=[u]:bs.push(u),u=p;do{switch(u.tag){case 3:u.flags|=65536,t&=-t,u.lanes|=t;var E=_c(u,k,t);ec(u,E);break e;case 1:g=k;var S=u.type,R=u.stateNode;if((u.flags&128)===0&&(typeof S.getDerivedStateFromError=="function"||R!==null&&typeof R.componentDidCatch=="function"&&(Nn===null||!Nn.has(R)))){u.flags|=65536,t&=-t,u.lanes|=t;var J=Ec(u,g,t);ec(u,J);break e}}u=u.return}while(u!==null)}od(n)}catch(ce){t=ce,Je===n&&n!==null&&(Je=n=n.return);continue}break}while(!0)}function ad(){var e=Al.current;return Al.current=Pl,e===null?Pl:e}function Qi(){(Xe===0||Xe===3||Xe===2)&&(Xe=4),et===null||(Hn&268435455)===0&&(Dl&268435455)===0||Cn(et,rt)}function Bl(e,t){var n=Pe;Pe|=2;var r=ad();(et!==e||rt!==t)&&(nn=null,qn(e,t));do try{bm();break}catch(o){ld(e,o)}while(!0);if(ii(),Pe=n,Al.current=r,Je!==null)throw Error(i(261));return et=null,rt=0,Xe}function bm(){for(;Je!==null;)id(Je)}function Cm(){for(;Je!==null&&!Yf();)id(Je)}function id(e){var t=dd(e.alternate,e,St);e.memoizedProps=e.pendingProps,t===null?od(e):Je=t,Mi.current=null}function od(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=ym(n,t,St),n!==null){Je=n;return}}else{if(n=vm(n,t),n!==null){n.flags&=32767,Je=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Xe=6,Je=null;return}}if(t=t.sibling,t!==null){Je=t;return}Je=t=e}while(t!==null);Xe===0&&(Xe=5)}function Kn(e,t,n){var r=Oe,o=Pt.transition;try{Pt.transition=null,Oe=1,_m(e,t,n,r)}finally{Pt.transition=o,Oe=r}return null}function _m(e,t,n,r){do _r();while(Sn!==null);if((Pe&6)!==0)throw Error(i(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(i(177));e.callbackNode=null,e.callbackPriority=0;var u=n.lanes|n.childLanes;if(ip(e,u),e===et&&(Je=et=null,rt=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||Ul||(Ul=!0,fd(qs,function(){return _r(),null})),u=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||u){u=Pt.transition,Pt.transition=null;var p=Oe;Oe=1;var g=Pe;Pe|=4,Mi.current=null,km(e,n),Xc(n,e),Kp(Qa),Zs=!!Ka,Qa=Ka=null,e.current=n,jm(n),Xf(),Pe=g,Oe=p,Pt.transition=u}else e.current=n;if(Ul&&(Ul=!1,Sn=e,Ml=o),u=e.pendingLanes,u===0&&(Nn=null),tp(n.stateNode),xt(e,Ke()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Fl)throw Fl=!1,e=Bi,Bi=null,e;return(Ml&1)!==0&&e.tag!==0&&_r(),u=e.pendingLanes,(u&1)!==0?e===Vi?Cs++:(Cs=0,Vi=e):Cs=0,vn(),null}function _r(){if(Sn!==null){var e=Go(Ml),t=Pt.transition,n=Oe;try{if(Pt.transition=null,Oe=16>e?16:e,Sn===null)var r=!1;else{if(e=Sn,Sn=null,Ml=0,(Pe&6)!==0)throw Error(i(331));var o=Pe;for(Pe|=4,re=e.current;re!==null;){var u=re,p=u.child;if((re.flags&16)!==0){var g=u.deletions;if(g!==null){for(var k=0;k<g.length;k++){var T=g[k];for(re=T;re!==null;){var H=re;switch(H.tag){case 0:case 11:case 15:Ns(8,H,u)}var W=H.child;if(W!==null)W.return=H,re=W;else for(;re!==null;){H=re;var V=H.sibling,Z=H.return;if(Kc(H),H===T){re=null;break}if(V!==null){V.return=Z,re=V;break}re=Z}}}var se=u.alternate;if(se!==null){var ie=se.child;if(ie!==null){se.child=null;do{var Qe=ie.sibling;ie.sibling=null,ie=Qe}while(ie!==null)}}re=u}}if((u.subtreeFlags&2064)!==0&&p!==null)p.return=u,re=p;else e:for(;re!==null;){if(u=re,(u.flags&2048)!==0)switch(u.tag){case 0:case 11:case 15:Ns(9,u,u.return)}var E=u.sibling;if(E!==null){E.return=u.return,re=E;break e}re=u.return}}var S=e.current;for(re=S;re!==null;){p=re;var R=p.child;if((p.subtreeFlags&2064)!==0&&R!==null)R.return=p,re=R;else e:for(p=S;re!==null;){if(g=re,(g.flags&2048)!==0)try{switch(g.tag){case 0:case 11:case 15:zl(9,g)}}catch(ce){We(g,g.return,ce)}if(g===p){re=null;break e}var J=g.sibling;if(J!==null){J.return=g.return,re=J;break e}re=g.return}}if(Pe=o,vn(),Bt&&typeof Bt.onPostCommitFiberRoot=="function")try{Bt.onPostCommitFiberRoot(Ks,e)}catch{}r=!0}return r}finally{Oe=n,Pt.transition=t}}return!1}function ud(e,t,n){t=Nr(n,t),t=_c(e,t,1),e=kn(e,t,1),t=ct(),e!==null&&(Gr(e,1,t),xt(e,t))}function We(e,t,n){if(e.tag===3)ud(e,e,n);else for(;t!==null;){if(t.tag===3){ud(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Nn===null||!Nn.has(r))){e=Nr(n,e),e=Ec(t,e,1),t=kn(t,e,1),e=ct(),t!==null&&(Gr(t,1,e),xt(t,e));break}}t=t.return}}function Em(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ct(),e.pingedLanes|=e.suspendedLanes&n,et===e&&(rt&n)===n&&(Xe===4||Xe===3&&(rt&130023424)===rt&&500>Ke()-$i?qn(e,0):Ii|=n),xt(e,t)}function cd(e,t){t===0&&((e.mode&1)===0?t=1:(t=Js,Js<<=1,(Js&130023424)===0&&(Js=4194304)));var n=ct();e=Zt(e,t),e!==null&&(Gr(e,t,n),xt(e,n))}function Pm(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),cd(e,n)}function Rm(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(i(314))}r!==null&&r.delete(t),cd(e,n)}var dd;dd=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ft.current)mt=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return mt=!1,gm(e,t,n);mt=(e.flags&131072)!==0}else mt=!1,Ie&&(t.flags&1048576)!==0&&Hu(t,gl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ll(e,t),e=t.pendingProps;var o=hr(t,st.current);kr(t,n),o=yi(null,t,r,e,o,n);var u=vi();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,pt(r)?(u=!0,ml(t)):u=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,di(t),o.updater=Rl,t.stateNode=o,o._reactInternals=t,bi(t,r,e,n),t=Pi(null,t,r,!0,u,n)):(t.tag=0,Ie&&u&&ti(t),ut(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ll(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=Lm(r),e=At(r,e),o){case 0:t=Ei(null,t,r,e,n);break e;case 1:t=Fc(null,t,r,e,n);break e;case 11:t=Lc(null,t,r,e,n);break e;case 14:t=Oc(null,t,r,At(r.type,e),n);break e}throw Error(i(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:At(r,o),Ei(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:At(r,o),Fc(e,t,r,o,n);case 3:e:{if(Uc(t),e===null)throw Error(i(387));r=t.pendingProps,u=t.memoizedState,o=u.element,Zu(e,t),Nl(t,r,null,n);var p=t.memoizedState;if(r=p.element,u.isDehydrated)if(u={element:r,isDehydrated:!1,cache:p.cache,pendingSuspenseBoundaries:p.pendingSuspenseBoundaries,transitions:p.transitions},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){o=Nr(Error(i(423)),t),t=Mc(e,t,r,n,o);break e}else if(r!==o){o=Nr(Error(i(424)),t),t=Mc(e,t,r,n,o);break e}else for(Nt=xn(t.stateNode.containerInfo.firstChild),jt=t,Ie=!0,zt=null,n=Yu(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(yr(),r===o){t=tn(e,t,n);break e}ut(e,t,r,n)}t=t.child}return t;case 5:return nc(t),e===null&&si(t),r=t.type,o=t.pendingProps,u=e!==null?e.memoizedProps:null,p=o.children,Ja(r,o)?p=null:u!==null&&Ja(r,u)&&(t.flags|=32),Dc(e,t),ut(e,t,p,n),t.child;case 6:return e===null&&si(t),null;case 13:return Ic(e,t,n);case 4:return fi(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=vr(t,null,r,n):ut(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:At(r,o),Lc(e,t,r,o,n);case 7:return ut(e,t,t.pendingProps,n),t.child;case 8:return ut(e,t,t.pendingProps.children,n),t.child;case 12:return ut(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,u=t.memoizedProps,p=o.value,Fe(wl,r._currentValue),r._currentValue=p,u!==null)if(Ot(u.value,p)){if(u.children===o.children&&!ft.current){t=tn(e,t,n);break e}}else for(u=t.child,u!==null&&(u.return=t);u!==null;){var g=u.dependencies;if(g!==null){p=u.child;for(var k=g.firstContext;k!==null;){if(k.context===r){if(u.tag===1){k=en(-1,n&-n),k.tag=2;var T=u.updateQueue;if(T!==null){T=T.shared;var H=T.pending;H===null?k.next=k:(k.next=H.next,H.next=k),T.pending=k}}u.lanes|=n,k=u.alternate,k!==null&&(k.lanes|=n),ui(u.return,n,t),g.lanes|=n;break}k=k.next}}else if(u.tag===10)p=u.type===t.type?null:u.child;else if(u.tag===18){if(p=u.return,p===null)throw Error(i(341));p.lanes|=n,g=p.alternate,g!==null&&(g.lanes|=n),ui(p,n,t),p=u.sibling}else p=u.child;if(p!==null)p.return=u;else for(p=u;p!==null;){if(p===t){p=null;break}if(u=p.sibling,u!==null){u.return=p.return,p=u;break}p=p.return}u=p}ut(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,kr(t,n),o=_t(o),r=r(o),t.flags|=1,ut(e,t,r,n),t.child;case 14:return r=t.type,o=At(r,t.pendingProps),o=At(r.type,o),Oc(e,t,r,o,n);case 15:return zc(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:At(r,o),Ll(e,t),t.tag=1,pt(r)?(e=!0,ml(t)):e=!1,kr(t,n),bc(t,r,o),bi(t,r,o,n),Pi(null,t,r,!0,e,n);case 19:return Bc(e,t,n);case 22:return Ac(e,t,n)}throw Error(i(156,t.tag))};function fd(e,t){return Wo(e,t)}function Tm(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Rt(e,t,n,r){return new Tm(e,t,n,r)}function Ji(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Lm(e){if(typeof e=="function")return Ji(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Te)return 11;if(e===q)return 14}return 2}function _n(e,t){var n=e.alternate;return n===null?(n=Rt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Vl(e,t,n,r,o,u){var p=2;if(r=e,typeof e=="function")Ji(e)&&(p=1);else if(typeof e=="string")p=5;else e:switch(e){case z:return Qn(n.children,o,u,t);case ae:p=8,o|=8;break;case de:return e=Rt(12,n,t,o|2),e.elementType=de,e.lanes=u,e;case ze:return e=Rt(13,n,t,o),e.elementType=ze,e.lanes=u,e;case Ee:return e=Rt(19,n,t,o),e.elementType=Ee,e.lanes=u,e;case D:return Hl(n,o,u,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Y:p=10;break e;case je:p=9;break e;case Te:p=11;break e;case q:p=14;break e;case ge:p=16,r=null;break e}throw Error(i(130,e==null?e:typeof e,""))}return t=Rt(p,n,t,o),t.elementType=e,t.type=r,t.lanes=u,t}function Qn(e,t,n,r){return e=Rt(7,e,r,t),e.lanes=n,e}function Hl(e,t,n,r){return e=Rt(22,e,r,t),e.elementType=D,e.lanes=n,e.stateNode={isHidden:!1},e}function Gi(e,t,n){return e=Rt(6,e,null,t),e.lanes=n,e}function Yi(e,t,n){return t=Rt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Om(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Sa(0),this.expirationTimes=Sa(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Sa(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Xi(e,t,n,r,o,u,p,g,k){return e=new Om(e,t,n,g,k),t===1?(t=1,u===!0&&(t|=8)):t=0,u=Rt(3,null,null,t),e.current=u,u.stateNode=e,u.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},di(u),e}function zm(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:fe,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function pd(e){if(!e)return yn;e=e._reactInternals;e:{if(Dn(e)!==e||e.tag!==1)throw Error(i(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(pt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(i(171))}if(e.tag===1){var n=e.type;if(pt(n))return $u(e,n,t)}return t}function md(e,t,n,r,o,u,p,g,k){return e=Xi(n,r,!0,e,o,u,p,g,k),e.context=pd(null),n=e.current,r=ct(),o=bn(n),u=en(r,o),u.callback=t??null,kn(n,u,o),e.current.lanes=o,Gr(e,o,r),xt(e,r),e}function Wl(e,t,n,r){var o=t.current,u=ct(),p=bn(o);return n=pd(n),t.context===null?t.context=n:t.pendingContext=n,t=en(u,p),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=kn(o,t,p),e!==null&&(Ut(e,o,p,u),jl(e,o,p)),p}function ql(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function hd(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Zi(e,t){hd(e,t),(e=e.alternate)&&hd(e,t)}function Am(){return null}var xd=typeof reportError=="function"?reportError:function(e){console.error(e)};function eo(e){this._internalRoot=e}Kl.prototype.render=eo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));Wl(e,t,null,null)},Kl.prototype.unmount=eo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Wn(function(){Wl(null,e,null,null)}),t[Jt]=null}};function Kl(e){this._internalRoot=e}Kl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Zo();e={blockedOn:null,target:e,priority:t};for(var n=0;n<pn.length&&t!==0&&t<pn[n].priority;n++);pn.splice(n,0,e),n===0&&nu(e)}};function to(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ql(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function gd(){}function Dm(e,t,n,r,o){if(o){if(typeof r=="function"){var u=r;r=function(){var T=ql(p);u.call(T)}}var p=md(t,r,e,0,null,!1,!1,"",gd);return e._reactRootContainer=p,e[Jt]=p.current,cs(e.nodeType===8?e.parentNode:e),Wn(),p}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var g=r;r=function(){var T=ql(k);g.call(T)}}var k=Xi(e,0,!1,null,null,!1,!1,"",gd);return e._reactRootContainer=k,e[Jt]=k.current,cs(e.nodeType===8?e.parentNode:e),Wn(function(){Wl(t,k,n,r)}),k}function Jl(e,t,n,r,o){var u=n._reactRootContainer;if(u){var p=u;if(typeof o=="function"){var g=o;o=function(){var k=ql(p);g.call(k)}}Wl(t,p,e,o)}else p=Dm(n,t,e,o,r);return ql(p)}Yo=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Jr(t.pendingLanes);n!==0&&(ba(t,n|1),xt(t,Ke()),(Pe&6)===0&&(Cr=Ke()+500,vn()))}break;case 13:Wn(function(){var r=Zt(e,1);if(r!==null){var o=ct();Ut(r,e,1,o)}}),Zi(e,1)}},Ca=function(e){if(e.tag===13){var t=Zt(e,134217728);if(t!==null){var n=ct();Ut(t,e,134217728,n)}Zi(e,134217728)}},Xo=function(e){if(e.tag===13){var t=bn(e),n=Zt(e,t);if(n!==null){var r=ct();Ut(n,e,t,r)}Zi(e,t)}},Zo=function(){return Oe},eu=function(e,t){var n=Oe;try{return Oe=e,t()}finally{Oe=n}},Wr=function(e,t,n){switch(t){case"input":if(wt(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=fl(r);if(!o)throw Error(i(90));Ce(r),wt(r,o)}}}break;case"textarea":Us(e,n);break;case"select":t=n.value,t!=null&&an(e,!!n.multiple,t,!1)}},Ae=qi,$e=Wn;var Fm={usingClientEntryPoint:!1,Events:[ps,pr,fl,ue,Se,qi]},_s={findFiberByHostInstance:Fn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Um={bundleType:_s.bundleType,version:_s.version,rendererPackageName:_s.rendererPackageName,rendererConfig:_s.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Q.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Vo(e),e===null?null:e.stateNode},findFiberByHostInstance:_s.findFiberByHostInstance||Am,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 Gl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Gl.isDisabled&&Gl.supportsFiber)try{Ks=Gl.inject(Um),Bt=Gl}catch{}}return gt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Fm,gt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!to(t))throw Error(i(200));return zm(e,t,null,n)},gt.createRoot=function(e,t){if(!to(e))throw Error(i(299));var n=!1,r="",o=xd;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Xi(e,1,!1,null,null,n,!1,r,o),e[Jt]=t.current,cs(e.nodeType===8?e.parentNode:e),new eo(t)},gt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(i(188)):(e=Object.keys(e).join(","),Error(i(268,e)));return e=Vo(t),e=e===null?null:e.stateNode,e},gt.flushSync=function(e){return Wn(e)},gt.hydrate=function(e,t,n){if(!Ql(t))throw Error(i(200));return Jl(null,e,t,!0,n)},gt.hydrateRoot=function(e,t,n){if(!to(e))throw Error(i(405));var r=n!=null&&n.hydratedSources||null,o=!1,u="",p=xd;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onRecoverableError!==void 0&&(p=n.onRecoverableError)),t=md(t,null,e,1,n??null,o,!1,u,p),e[Jt]=t.current,cs(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Kl(t)},gt.render=function(e,t,n){if(!Ql(t))throw Error(i(200));return Jl(null,e,t,!1,n)},gt.unmountComponentAtNode=function(e){if(!Ql(e))throw Error(i(40));return e._reactRootContainer?(Wn(function(){Jl(null,null,e,!1,function(){e._reactRootContainer=null,e[Jt]=null})}),!0):!1},gt.unstable_batchedUpdates=qi,gt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ql(n))throw Error(i(200));if(e==null||e._reactInternals===void 0)throw Error(i(38));return Jl(e,t,n,!1,r)},gt.version="18.3.1-next-f1338f8080-20240426",gt}var bd;function sf(){if(bd)return so.exports;bd=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(a){console.error(a)}}return s(),so.exports=Km(),so.exports}var Cd;function Qm(){if(Cd)return Yl;Cd=1;var s=sf();return Yl.createRoot=s.createRoot,Yl.hydrateRoot=s.hydrateRoot,Yl}var Jm=Qm();const Gm=nf(Jm);sf();/**
* @remix-run/router v1.23.2
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function Rs(){return Rs=Object.assign?Object.assign.bind():function(s){for(var a=1;a<arguments.length;a++){var i=arguments[a];for(var c in i)Object.prototype.hasOwnProperty.call(i,c)&&(s[c]=i[c])}return s},Rs.apply(this,arguments)}var Rn;(function(s){s.Pop="POP",s.Push="PUSH",s.Replace="REPLACE"})(Rn||(Rn={}));const _d="popstate";function Ym(s){s===void 0&&(s={});function a(c,d){let{pathname:f,search:m,hash:h}=c.location;return go("",{pathname:f,search:m,hash:h},d.state&&d.state.usr||null,d.state&&d.state.key||"default")}function i(c,d){return typeof d=="string"?d:sa(d)}return Zm(a,i,null,s)}function He(s,a){if(s===!1||s===null||typeof s>"u")throw new Error(a)}function To(s,a){if(!s){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function Xm(){return Math.random().toString(36).substr(2,8)}function Ed(s,a){return{usr:s.state,key:s.key,idx:a}}function go(s,a,i,c){return i===void 0&&(i=null),Rs({pathname:typeof s=="string"?s:s.pathname,search:"",hash:""},typeof a=="string"?Or(a):a,{state:i,key:a&&a.key||c||Xm()})}function sa(s){let{pathname:a="/",search:i="",hash:c=""}=s;return i&&i!=="?"&&(a+=i.charAt(0)==="?"?i:"?"+i),c&&c!=="#"&&(a+=c.charAt(0)==="#"?c:"#"+c),a}function Or(s){let a={};if(s){let i=s.indexOf("#");i>=0&&(a.hash=s.substr(i),s=s.substr(0,i));let c=s.indexOf("?");c>=0&&(a.search=s.substr(c),s=s.substr(0,c)),s&&(a.pathname=s)}return a}function Zm(s,a,i,c){c===void 0&&(c={});let{window:d=document.defaultView,v5Compat:f=!1}=c,m=d.history,h=Rn.Pop,x=null,y=j();y==null&&(y=0,m.replaceState(Rs({},m.state,{idx:y}),""));function j(){return(m.state||{idx:null}).idx}function _(){h=Rn.Pop;let N=j(),A=N==null?null:N-y;y=N,x&&x({action:h,location:P.location,delta:A})}function O(N,A){h=Rn.Push;let M=go(P.location,N,A);y=j()+1;let K=Ed(M,y),Q=P.createHref(M);try{m.pushState(K,"",Q)}catch(me){if(me instanceof DOMException&&me.name==="DataCloneError")throw me;d.location.assign(Q)}f&&x&&x({action:h,location:P.location,delta:1})}function B(N,A){h=Rn.Replace;let M=go(P.location,N,A);y=j();let K=Ed(M,y),Q=P.createHref(M);m.replaceState(K,"",Q),f&&x&&x({action:h,location:P.location,delta:0})}function L(N){let A=d.location.origin!=="null"?d.location.origin:d.location.href,M=typeof N=="string"?N:sa(N);return M=M.replace(/ $/,"%20"),He(A,"No window.location.(origin|href) available to create URL for href: "+M),new URL(M,A)}let P={get action(){return h},get location(){return s(d,m)},listen(N){if(x)throw new Error("A history only accepts one active listener");return d.addEventListener(_d,_),x=N,()=>{d.removeEventListener(_d,_),x=null}},createHref(N){return a(d,N)},createURL:L,encodeLocation(N){let A=L(N);return{pathname:A.pathname,search:A.search,hash:A.hash}},push:O,replace:B,go(N){return m.go(N)}};return P}var Pd;(function(s){s.data="data",s.deferred="deferred",s.redirect="redirect",s.error="error"})(Pd||(Pd={}));function e0(s,a,i){return i===void 0&&(i="/"),t0(s,a,i)}function t0(s,a,i,c){let d=typeof a=="string"?Or(a):a,f=Rr(d.pathname||"/",i);if(f==null)return null;let m=lf(s);n0(m);let h=null;for(let x=0;h==null&&x<m.length;++x){let y=p0(f);h=d0(m[x],y)}return h}function lf(s,a,i,c){a===void 0&&(a=[]),i===void 0&&(i=[]),c===void 0&&(c="");let d=(f,m,h)=>{let x={relativePath:h===void 0?f.path||"":h,caseSensitive:f.caseSensitive===!0,childrenIndex:m,route:f};x.relativePath.startsWith("/")&&(He(x.relativePath.startsWith(c),'Absolute route path "'+x.relativePath+'" nested under path '+('"'+c+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),x.relativePath=x.relativePath.slice(c.length));let y=Tn([c,x.relativePath]),j=i.concat(x);f.children&&f.children.length>0&&(He(f.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+y+'".')),lf(f.children,a,j,y)),!(f.path==null&&!f.index)&&a.push({path:y,score:u0(y,f.index),routesMeta:j})};return s.forEach((f,m)=>{var h;if(f.path===""||!((h=f.path)!=null&&h.includes("?")))d(f,m);else for(let x of af(f.path))d(f,m,x)}),a}function af(s){let a=s.split("/");if(a.length===0)return[];let[i,...c]=a,d=i.endsWith("?"),f=i.replace(/\?$/,"");if(c.length===0)return d?[f,""]:[f];let m=af(c.join("/")),h=[];return h.push(...m.map(x=>x===""?f:[f,x].join("/"))),d&&h.push(...m),h.map(x=>s.startsWith("/")&&x===""?"/":x)}function n0(s){s.sort((a,i)=>a.score!==i.score?i.score-a.score:c0(a.routesMeta.map(c=>c.childrenIndex),i.routesMeta.map(c=>c.childrenIndex)))}const r0=/^:[\w-]+$/,s0=3,l0=2,a0=1,i0=10,o0=-2,Rd=s=>s==="*";function u0(s,a){let i=s.split("/"),c=i.length;return i.some(Rd)&&(c+=o0),a&&(c+=l0),i.filter(d=>!Rd(d)).reduce((d,f)=>d+(r0.test(f)?s0:f===""?a0:i0),c)}function c0(s,a){return s.length===a.length&&s.slice(0,-1).every((c,d)=>c===a[d])?s[s.length-1]-a[a.length-1]:0}function d0(s,a,i){let{routesMeta:c}=s,d={},f="/",m=[];for(let h=0;h<c.length;++h){let x=c[h],y=h===c.length-1,j=f==="/"?a:a.slice(f.length)||"/",_=yo({path:x.relativePath,caseSensitive:x.caseSensitive,end:y},j),O=x.route;if(!_)return null;Object.assign(d,_.params),m.push({params:d,pathname:Tn([f,_.pathname]),pathnameBase:y0(Tn([f,_.pathnameBase])),route:O}),_.pathnameBase!=="/"&&(f=Tn([f,_.pathnameBase]))}return m}function yo(s,a){typeof s=="string"&&(s={path:s,caseSensitive:!1,end:!0});let[i,c]=f0(s.path,s.caseSensitive,s.end),d=a.match(i);if(!d)return null;let f=d[0],m=f.replace(/(.)\/+$/,"$1"),h=d.slice(1);return{params:c.reduce((y,j,_)=>{let{paramName:O,isOptional:B}=j;if(O==="*"){let P=h[_]||"";m=f.slice(0,f.length-P.length).replace(/(.)\/+$/,"$1")}const L=h[_];return B&&!L?y[O]=void 0:y[O]=(L||"").replace(/%2F/g,"/"),y},{}),pathname:f,pathnameBase:m,pattern:s}}function f0(s,a,i){a===void 0&&(a=!1),i===void 0&&(i=!0),To(s==="*"||!s.endsWith("*")||s.endsWith("/*"),'Route path "'+s+'" will be treated as if it were '+('"'+s.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+s.replace(/\*$/,"/*")+'".'));let c=[],d="^"+s.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(m,h,x)=>(c.push({paramName:h,isOptional:x!=null}),x?"/?([^\\/]+)?":"/([^\\/]+)"));return s.endsWith("*")?(c.push({paramName:"*"}),d+=s==="*"||s==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?d+="\\/*$":s!==""&&s!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,a?void 0:"i"),c]}function p0(s){try{return s.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return To(!1,'The URL path "'+s+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+a+").")),s}}function Rr(s,a){if(a==="/")return s;if(!s.toLowerCase().startsWith(a.toLowerCase()))return null;let i=a.endsWith("/")?a.length-1:a.length,c=s.charAt(i);return c&&c!=="/"?null:s.slice(i)||"/"}const m0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,h0=s=>m0.test(s);function x0(s,a){a===void 0&&(a="/");let{pathname:i,search:c="",hash:d=""}=typeof s=="string"?Or(s):s,f;if(i)if(h0(i))f=i;else{if(i.includes("//")){let m=i;i=i.replace(/\/\/+/g,"/"),To(!1,"Pathnames cannot have embedded double slashes - normalizing "+(m+" -> "+i))}i.startsWith("/")?f=Td(i.substring(1),"/"):f=Td(i,a)}else f=a;return{pathname:f,search:v0(c),hash:w0(d)}}function Td(s,a){let i=a.replace(/\/+$/,"").split("/");return s.split("/").forEach(d=>{d===".."?i.length>1&&i.pop():d!=="."&&i.push(d)}),i.length>1?i.join("/"):"/"}function io(s,a,i,c){return"Cannot include a '"+s+"' character in a manually specified "+("`to."+a+"` field ["+JSON.stringify(c)+"]. Please separate it out to the ")+("`to."+i+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function g0(s){return s.filter((a,i)=>i===0||a.route.path&&a.route.path.length>0)}function Lo(s,a){let i=g0(s);return a?i.map((c,d)=>d===i.length-1?c.pathname:c.pathnameBase):i.map(c=>c.pathnameBase)}function Oo(s,a,i,c){c===void 0&&(c=!1);let d;typeof s=="string"?d=Or(s):(d=Rs({},s),He(!d.pathname||!d.pathname.includes("?"),io("?","pathname","search",d)),He(!d.pathname||!d.pathname.includes("#"),io("#","pathname","hash",d)),He(!d.search||!d.search.includes("#"),io("#","search","hash",d)));let f=s===""||d.pathname==="",m=f?"/":d.pathname,h;if(m==null)h=i;else{let _=a.length-1;if(!c&&m.startsWith("..")){let O=m.split("/");for(;O[0]==="..";)O.shift(),_-=1;d.pathname=O.join("/")}h=_>=0?a[_]:"/"}let x=x0(d,h),y=m&&m!=="/"&&m.endsWith("/"),j=(f||m===".")&&i.endsWith("/");return!x.pathname.endsWith("/")&&(y||j)&&(x.pathname+="/"),x}const Tn=s=>s.join("/").replace(/\/\/+/g,"/"),y0=s=>s.replace(/\/+$/,"").replace(/^\/*/,"/"),v0=s=>!s||s==="?"?"":s.startsWith("?")?s:"?"+s,w0=s=>!s||s==="#"?"":s.startsWith("#")?s:"#"+s;function k0(s){return s!=null&&typeof s.status=="number"&&typeof s.statusText=="string"&&typeof s.internal=="boolean"&&"data"in s}const of=["post","put","patch","delete"];new Set(of);const j0=["get",...of];new Set(j0);/**
* React Router v6.30.3
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function Ts(){return Ts=Object.assign?Object.assign.bind():function(s){for(var a=1;a<arguments.length;a++){var i=arguments[a];for(var c in i)Object.prototype.hasOwnProperty.call(i,c)&&(s[c]=i[c])}return s},Ts.apply(this,arguments)}const oa=v.createContext(null),uf=v.createContext(null),sn=v.createContext(null),ua=v.createContext(null),ln=v.createContext({outlet:null,matches:[],isDataRoute:!1}),cf=v.createContext(null);function N0(s,a){let{relative:i}=a===void 0?{}:a;zr()||He(!1);let{basename:c,navigator:d}=v.useContext(sn),{hash:f,pathname:m,search:h}=da(s,{relative:i}),x=m;return c!=="/"&&(x=m==="/"?c:Tn([c,m])),d.createHref({pathname:x,search:h,hash:f})}function zr(){return v.useContext(ua)!=null}function Ar(){return zr()||He(!1),v.useContext(ua).location}function df(s){v.useContext(sn).static||v.useLayoutEffect(s)}function ca(){let{isDataRoute:s}=v.useContext(ln);return s?U0():S0()}function S0(){zr()||He(!1);let s=v.useContext(oa),{basename:a,future:i,navigator:c}=v.useContext(sn),{matches:d}=v.useContext(ln),{pathname:f}=Ar(),m=JSON.stringify(Lo(d,i.v7_relativeSplatPath)),h=v.useRef(!1);return df(()=>{h.current=!0}),v.useCallback(function(y,j){if(j===void 0&&(j={}),!h.current)return;if(typeof y=="number"){c.go(y);return}let _=Oo(y,JSON.parse(m),f,j.relative==="path");s==null&&a!=="/"&&(_.pathname=_.pathname==="/"?a:Tn([a,_.pathname])),(j.replace?c.replace:c.push)(_,j.state,j)},[a,c,m,f,s])}const b0=v.createContext(null);function C0(s){let a=v.useContext(ln).outlet;return a&&v.createElement(b0.Provider,{value:s},a)}function da(s,a){let{relative:i}=a===void 0?{}:a,{future:c}=v.useContext(sn),{matches:d}=v.useContext(ln),{pathname:f}=Ar(),m=JSON.stringify(Lo(d,c.v7_relativeSplatPath));return v.useMemo(()=>Oo(s,JSON.parse(m),f,i==="path"),[s,m,f,i])}function _0(s,a){return E0(s,a)}function E0(s,a,i,c){zr()||He(!1);let{navigator:d}=v.useContext(sn),{matches:f}=v.useContext(ln),m=f[f.length-1],h=m?m.params:{};m&&m.pathname;let x=m?m.pathnameBase:"/";m&&m.route;let y=Ar(),j;if(a){var _;let N=typeof a=="string"?Or(a):a;x==="/"||(_=N.pathname)!=null&&_.startsWith(x)||He(!1),j=N}else j=y;let O=j.pathname||"/",B=O;if(x!=="/"){let N=x.replace(/^\//,"").split("/");B="/"+O.replace(/^\//,"").split("/").slice(N.length).join("/")}let L=e0(s,{pathname:B}),P=O0(L&&L.map(N=>Object.assign({},N,{params:Object.assign({},h,N.params),pathname:Tn([x,d.encodeLocation?d.encodeLocation(N.pathname).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?x:Tn([x,d.encodeLocation?d.encodeLocation(N.pathnameBase).pathname:N.pathnameBase])})),f,i,c);return a&&P?v.createElement(ua.Provider,{value:{location:Ts({pathname:"/",search:"",hash:"",state:null,key:"default"},j),navigationType:Rn.Pop}},P):P}function P0(){let s=F0(),a=k0(s)?s.status+" "+s.statusText:s instanceof Error?s.message:JSON.stringify(s),i=s instanceof Error?s.stack:null,d={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},a),i?v.createElement("pre",{style:d},i):null,null)}const R0=v.createElement(P0,null);class T0 extends v.Component{constructor(a){super(a),this.state={location:a.location,revalidation:a.revalidation,error:a.error}}static getDerivedStateFromError(a){return{error:a}}static getDerivedStateFromProps(a,i){return i.location!==a.location||i.revalidation!=="idle"&&a.revalidation==="idle"?{error:a.error,location:a.location,revalidation:a.revalidation}:{error:a.error!==void 0?a.error:i.error,location:i.location,revalidation:a.revalidation||i.revalidation}}componentDidCatch(a,i){console.error("React Router caught the following error during render",a,i)}render(){return this.state.error!==void 0?v.createElement(ln.Provider,{value:this.props.routeContext},v.createElement(cf.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function L0(s){let{routeContext:a,match:i,children:c}=s,d=v.useContext(oa);return d&&d.static&&d.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(d.staticContext._deepestRenderedBoundaryId=i.route.id),v.createElement(ln.Provider,{value:a},c)}function O0(s,a,i,c){var d;if(a===void 0&&(a=[]),i===void 0&&(i=null),c===void 0&&(c=null),s==null){var f;if(!i)return null;if(i.errors)s=i.matches;else if((f=c)!=null&&f.v7_partialHydration&&a.length===0&&!i.initialized&&i.matches.length>0)s=i.matches;else return null}let m=s,h=(d=i)==null?void 0:d.errors;if(h!=null){let j=m.findIndex(_=>_.route.id&&(h==null?void 0:h[_.route.id])!==void 0);j>=0||He(!1),m=m.slice(0,Math.min(m.length,j+1))}let x=!1,y=-1;if(i&&c&&c.v7_partialHydration)for(let j=0;j<m.length;j++){let _=m[j];if((_.route.HydrateFallback||_.route.hydrateFallbackElement)&&(y=j),_.route.id){let{loaderData:O,errors:B}=i,L=_.route.loader&&O[_.route.id]===void 0&&(!B||B[_.route.id]===void 0);if(_.route.lazy||L){x=!0,y>=0?m=m.slice(0,y+1):m=[m[0]];break}}}return m.reduceRight((j,_,O)=>{let B,L=!1,P=null,N=null;i&&(B=h&&_.route.id?h[_.route.id]:void 0,P=_.route.errorElement||R0,x&&(y<0&&O===0?(M0("route-fallback"),L=!0,N=null):y===O&&(L=!0,N=_.route.hydrateFallbackElement||null)));let A=a.concat(m.slice(0,O+1)),M=()=>{let K;return B?K=P:L?K=N:_.route.Component?K=v.createElement(_.route.Component,null):_.route.element?K=_.route.element:K=j,v.createElement(L0,{match:_,routeContext:{outlet:j,matches:A,isDataRoute:i!=null},children:K})};return i&&(_.route.ErrorBoundary||_.route.errorElement||O===0)?v.createElement(T0,{location:i.location,revalidation:i.revalidation,component:P,error:B,children:M(),routeContext:{outlet:null,matches:A,isDataRoute:!0}}):M()},null)}var ff=(function(s){return s.UseBlocker="useBlocker",s.UseRevalidator="useRevalidator",s.UseNavigateStable="useNavigate",s})(ff||{}),pf=(function(s){return s.UseBlocker="useBlocker",s.UseLoaderData="useLoaderData",s.UseActionData="useActionData",s.UseRouteError="useRouteError",s.UseNavigation="useNavigation",s.UseRouteLoaderData="useRouteLoaderData",s.UseMatches="useMatches",s.UseRevalidator="useRevalidator",s.UseNavigateStable="useNavigate",s.UseRouteId="useRouteId",s})(pf||{});function z0(s){let a=v.useContext(oa);return a||He(!1),a}function A0(s){let a=v.useContext(uf);return a||He(!1),a}function D0(s){let a=v.useContext(ln);return a||He(!1),a}function mf(s){let a=D0(),i=a.matches[a.matches.length-1];return i.route.id||He(!1),i.route.id}function F0(){var s;let a=v.useContext(cf),i=A0(),c=mf();return a!==void 0?a:(s=i.errors)==null?void 0:s[c]}function U0(){let{router:s}=z0(ff.UseNavigateStable),a=mf(pf.UseNavigateStable),i=v.useRef(!1);return df(()=>{i.current=!0}),v.useCallback(function(d,f){f===void 0&&(f={}),i.current&&(typeof d=="number"?s.navigate(d):s.navigate(d,Ts({fromRouteId:a},f)))},[s,a])}const Ld={};function M0(s,a,i){Ld[s]||(Ld[s]=!0)}function I0(s,a){s==null||s.v7_startTransition,s==null||s.v7_relativeSplatPath}function vo(s){let{to:a,replace:i,state:c,relative:d}=s;zr()||He(!1);let{future:f,static:m}=v.useContext(sn),{matches:h}=v.useContext(ln),{pathname:x}=Ar(),y=ca(),j=Oo(a,Lo(h,f.v7_relativeSplatPath),x,d==="path"),_=JSON.stringify(j);return v.useEffect(()=>y(JSON.parse(_),{replace:i,state:c,relative:d}),[y,_,d,i,c]),null}function $0(s){return C0(s.context)}function yt(s){He(!1)}function B0(s){let{basename:a="/",children:i=null,location:c,navigationType:d=Rn.Pop,navigator:f,static:m=!1,future:h}=s;zr()&&He(!1);let x=a.replace(/^\/*/,"/"),y=v.useMemo(()=>({basename:x,navigator:f,static:m,future:Ts({v7_relativeSplatPath:!1},h)}),[x,h,f,m]);typeof c=="string"&&(c=Or(c));let{pathname:j="/",search:_="",hash:O="",state:B=null,key:L="default"}=c,P=v.useMemo(()=>{let N=Rr(j,x);return N==null?null:{location:{pathname:N,search:_,hash:O,state:B,key:L},navigationType:d}},[x,j,_,O,B,L,d]);return P==null?null:v.createElement(sn.Provider,{value:y},v.createElement(ua.Provider,{children:i,value:P}))}function V0(s){let{children:a,location:i}=s;return _0(wo(a),i)}new Promise(()=>{});function wo(s,a){a===void 0&&(a=[]);let i=[];return v.Children.forEach(s,(c,d)=>{if(!v.isValidElement(c))return;let f=[...a,d];if(c.type===v.Fragment){i.push.apply(i,wo(c.props.children,f));return}c.type!==yt&&He(!1),!c.props.index||!c.props.children||He(!1);let m={id:c.props.id||f.join("-"),caseSensitive:c.props.caseSensitive,element:c.props.element,Component:c.props.Component,index:c.props.index,path:c.props.path,loader:c.props.loader,action:c.props.action,errorElement:c.props.errorElement,ErrorBoundary:c.props.ErrorBoundary,hasErrorBoundary:c.props.ErrorBoundary!=null||c.props.errorElement!=null,shouldRevalidate:c.props.shouldRevalidate,handle:c.props.handle,lazy:c.props.lazy};c.props.children&&(m.children=wo(c.props.children,f)),i.push(m)}),i}/**
* React Router DOM v6.30.3
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function la(){return la=Object.assign?Object.assign.bind():function(s){for(var a=1;a<arguments.length;a++){var i=arguments[a];for(var c in i)Object.prototype.hasOwnProperty.call(i,c)&&(s[c]=i[c])}return s},la.apply(this,arguments)}function hf(s,a){if(s==null)return{};var i={},c=Object.keys(s),d,f;for(f=0;f<c.length;f++)d=c[f],!(a.indexOf(d)>=0)&&(i[d]=s[d]);return i}function H0(s){return!!(s.metaKey||s.altKey||s.ctrlKey||s.shiftKey)}function W0(s,a){return s.button===0&&(!a||a==="_self")&&!H0(s)}const q0=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],K0=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],Q0="6";try{window.__reactRouterVersion=Q0}catch{}const J0=v.createContext({isTransitioning:!1}),G0="startTransition",Od=Hm[G0];function Y0(s){let{basename:a,children:i,future:c,window:d}=s,f=v.useRef();f.current==null&&(f.current=Ym({window:d,v5Compat:!0}));let m=f.current,[h,x]=v.useState({action:m.action,location:m.location}),{v7_startTransition:y}=c||{},j=v.useCallback(_=>{y&&Od?Od(()=>x(_)):x(_)},[x,y]);return v.useLayoutEffect(()=>m.listen(j),[m,j]),v.useEffect(()=>I0(c),[c]),v.createElement(B0,{basename:a,children:i,location:h.location,navigationType:h.action,navigator:m,future:c})}const X0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Z0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,eh=v.forwardRef(function(a,i){let{onClick:c,relative:d,reloadDocument:f,replace:m,state:h,target:x,to:y,preventScrollReset:j,viewTransition:_}=a,O=hf(a,q0),{basename:B}=v.useContext(sn),L,P=!1;if(typeof y=="string"&&Z0.test(y)&&(L=y,X0))try{let K=new URL(window.location.href),Q=y.startsWith("//")?new URL(K.protocol+y):new URL(y),me=Rr(Q.pathname,B);Q.origin===K.origin&&me!=null?y=me+Q.search+Q.hash:P=!0}catch{}let N=N0(y,{relative:d}),A=rh(y,{replace:m,state:h,target:x,preventScrollReset:j,relative:d,viewTransition:_});function M(K){c&&c(K),K.defaultPrevented||A(K)}return v.createElement("a",la({},O,{href:L||N,onClick:P||f?c:M,ref:i,target:x}))}),th=v.forwardRef(function(a,i){let{"aria-current":c="page",caseSensitive:d=!1,className:f="",end:m=!1,style:h,to:x,viewTransition:y,children:j}=a,_=hf(a,K0),O=da(x,{relative:_.relative}),B=Ar(),L=v.useContext(uf),{navigator:P,basename:N}=v.useContext(sn),A=L!=null&&sh(O)&&y===!0,M=P.encodeLocation?P.encodeLocation(O).pathname:O.pathname,K=B.pathname,Q=L&&L.navigation&&L.navigation.location?L.navigation.location.pathname:null;d||(K=K.toLowerCase(),Q=Q?Q.toLowerCase():null,M=M.toLowerCase()),Q&&N&&(Q=Rr(Q,N)||Q);const me=M!=="/"&&M.endsWith("/")?M.length-1:M.length;let fe=K===M||!m&&K.startsWith(M)&&K.charAt(me)==="/",z=Q!=null&&(Q===M||!m&&Q.startsWith(M)&&Q.charAt(M.length)==="/"),ae={isActive:fe,isPending:z,isTransitioning:A},de=fe?c:void 0,Y;typeof f=="function"?Y=f(ae):Y=[f,fe?"active":null,z?"pending":null,A?"transitioning":null].filter(Boolean).join(" ");let je=typeof h=="function"?h(ae):h;return v.createElement(eh,la({},_,{"aria-current":de,className:Y,ref:i,style:je,to:x,viewTransition:y}),typeof j=="function"?j(ae):j)});var ko;(function(s){s.UseScrollRestoration="useScrollRestoration",s.UseSubmit="useSubmit",s.UseSubmitFetcher="useSubmitFetcher",s.UseFetcher="useFetcher",s.useViewTransitionState="useViewTransitionState"})(ko||(ko={}));var zd;(function(s){s.UseFetcher="useFetcher",s.UseFetchers="useFetchers",s.UseScrollRestoration="useScrollRestoration"})(zd||(zd={}));function nh(s){let a=v.useContext(oa);return a||He(!1),a}function rh(s,a){let{target:i,replace:c,state:d,preventScrollReset:f,relative:m,viewTransition:h}=a===void 0?{}:a,x=ca(),y=Ar(),j=da(s,{relative:m});return v.useCallback(_=>{if(W0(_,i)){_.preventDefault();let O=c!==void 0?c:sa(y)===sa(j);x(s,{replace:O,state:d,preventScrollReset:f,relative:m,viewTransition:h})}},[y,x,j,c,d,i,s,f,m,h])}function sh(s,a){a===void 0&&(a={});let i=v.useContext(J0);i==null&&He(!1);let{basename:c}=nh(ko.useViewTransitionState),d=da(s,{relative:a.relative});if(!i.isTransitioning)return!1;let f=Rr(i.currentLocation.pathname,c)||i.currentLocation.pathname,m=Rr(i.nextLocation.pathname,c)||i.nextLocation.pathname;return yo(d.pathname,m)!=null||yo(d.pathname,f)!=null}/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const lh=s=>s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),xf=(...s)=>s.filter((a,i,c)=>!!a&&a.trim()!==""&&c.indexOf(a)===i).join(" ").trim();/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var ah={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ih=v.forwardRef(({color:s="currentColor",size:a=24,strokeWidth:i=2,absoluteStrokeWidth:c,className:d="",children:f,iconNode:m,...h},x)=>v.createElement("svg",{ref:x,...ah,width:a,height:a,stroke:s,strokeWidth:c?Number(i)*24/Number(a):i,className:xf("lucide",d),...h},[...m.map(([y,j])=>v.createElement(y,j)),...Array.isArray(f)?f:[f]]));/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _e=(s,a)=>{const i=v.forwardRef(({className:c,...d},f)=>v.createElement(ih,{ref:f,iconNode:a,className:xf(`lucide-${lh(s)}`,c),...d}));return i.displayName=`${s}`,i};/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const oh=_e("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const gf=_e("Bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]);/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const oo=_e("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const jo=_e("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const No=_e("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const uh=_e("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ad=_e("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yf=_e("Clapperboard",[["path",{d:"M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3Z",key:"1tn4o7"}],["path",{d:"m6.2 5.3 3.1 3.9",key:"iuk76l"}],["path",{d:"m12.4 3.4 3.1 4",key:"6hsd6n"}],["path",{d:"M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z",key:"ltgou9"}]]);/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const So=_e("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Dd=_e("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ch=_e("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Gn=_e("Film",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]]);/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const vf=_e("HeartPulse",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}],["path",{d:"M3.22 12H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27",key:"1uw2ng"}]]);/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const dh=_e("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const fh=_e("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ph=_e("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const wf=_e("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Xl=_e("Loader",[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]]);/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const mh=_e("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const kf=_e("Pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const hh=_e("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const tr=_e("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ge=_e("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const xh=_e("ScrollText",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Kt=_e("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const zo=_e("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const gh=_e("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yh=_e("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Pn=_e("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const rn=_e("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Zn=_e("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Tr=_e("Tv",[["rect",{width:"20",height:"15",x:"2",y:"7",rx:"2",ry:"2",key:"10ag99"}],["polyline",{points:"17 2 12 7 7 2",key:"11pgbg"}]]);/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const vh=_e("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const aa=_e("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const fa=_e("Wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ln=_e("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function jf(s,a){return function(){return s.apply(a,arguments)}}const{toString:wh}=Object.prototype,{getPrototypeOf:pa}=Object,{iterator:ma,toStringTag:Nf}=Symbol,ha=(s=>a=>{const i=wh.call(a);return s[i]||(s[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),It=s=>(s=s.toLowerCase(),a=>ha(a)===s),xa=s=>a=>typeof a===s,{isArray:Dr}=Array,Lr=xa("undefined");function Ls(s){return s!==null&&!Lr(s)&&s.constructor!==null&&!Lr(s.constructor)&&vt(s.constructor.isBuffer)&&s.constructor.isBuffer(s)}const Sf=It("ArrayBuffer");function kh(s){let a;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?a=ArrayBuffer.isView(s):a=s&&s.buffer&&Sf(s.buffer),a}const jh=xa("string"),vt=xa("function"),bf=xa("number"),Os=s=>s!==null&&typeof s=="object",Nh=s=>s===!0||s===!1,ta=s=>{if(ha(s)!=="object")return!1;const a=pa(s);return(a===null||a===Object.prototype||Object.getPrototypeOf(a)===null)&&!(Nf in s)&&!(ma in s)},Sh=s=>{if(!Os(s)||Ls(s))return!1;try{return Object.keys(s).length===0&&Object.getPrototypeOf(s)===Object.prototype}catch{return!1}},bh=It("Date"),Ch=It("File"),_h=s=>!!(s&&typeof s.uri<"u"),Eh=s=>s&&typeof s.getParts<"u",Ph=It("Blob"),Rh=It("FileList"),Th=s=>Os(s)&&vt(s.pipe);function Lh(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Fd=Lh(),Ud=typeof Fd.FormData<"u"?Fd.FormData:void 0,Oh=s=>{if(!s)return!1;if(Ud&&s instanceof Ud)return!0;const a=pa(s);if(!a||a===Object.prototype||!vt(s.append))return!1;const i=ha(s);return i==="formdata"||i==="object"&&vt(s.toString)&&s.toString()==="[object FormData]"},zh=It("URLSearchParams"),[Ah,Dh,Fh,Uh]=["ReadableStream","Request","Response","Headers"].map(It),Mh=s=>s.trim?s.trim():s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function zs(s,a,{allOwnKeys:i=!1}={}){if(s===null||typeof s>"u")return;let c,d;if(typeof s!="object"&&(s=[s]),Dr(s))for(c=0,d=s.length;c<d;c++)a.call(null,s[c],c,s);else{if(Ls(s))return;const f=i?Object.getOwnPropertyNames(s):Object.keys(s),m=f.length;let h;for(c=0;c<m;c++)h=f[c],a.call(null,s[h],h,s)}}function Cf(s,a){if(Ls(s))return null;a=a.toLowerCase();const i=Object.keys(s);let c=i.length,d;for(;c-- >0;)if(d=i[c],a===d.toLowerCase())return d;return null}const Yn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,_f=s=>!Lr(s)&&s!==Yn;function bo(...s){const{caseless:a,skipUndefined:i}=_f(this)&&this||{},c={},d=(f,m)=>{if(m==="__proto__"||m==="constructor"||m==="prototype")return;const h=a&&Cf(c,m)||m,x=Co(c,h)?c[h]:void 0;ta(x)&&ta(f)?c[h]=bo(x,f):ta(f)?c[h]=bo({},f):Dr(f)?c[h]=f.slice():(!i||!Lr(f))&&(c[h]=f)};for(let f=0,m=s.length;f<m;f++)s[f]&&zs(s[f],d);return c}const Ih=(s,a,i,{allOwnKeys:c}={})=>(zs(a,(d,f)=>{i&&vt(d)?Object.defineProperty(s,f,{__proto__:null,value:jf(d,i),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(s,f,{__proto__:null,value:d,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:c}),s),$h=s=>(s.charCodeAt(0)===65279&&(s=s.slice(1)),s),Bh=(s,a,i,c)=>{s.prototype=Object.create(a.prototype,c),Object.defineProperty(s.prototype,"constructor",{__proto__:null,value:s,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(s,"super",{__proto__:null,value:a.prototype}),i&&Object.assign(s.prototype,i)},Vh=(s,a,i,c)=>{let d,f,m;const h={};if(a=a||{},s==null)return a;do{for(d=Object.getOwnPropertyNames(s),f=d.length;f-- >0;)m=d[f],(!c||c(m,s,a))&&!h[m]&&(a[m]=s[m],h[m]=!0);s=i!==!1&&pa(s)}while(s&&(!i||i(s,a))&&s!==Object.prototype);return a},Hh=(s,a,i)=>{s=String(s),(i===void 0||i>s.length)&&(i=s.length),i-=a.length;const c=s.indexOf(a,i);return c!==-1&&c===i},Wh=s=>{if(!s)return null;if(Dr(s))return s;let a=s.length;if(!bf(a))return null;const i=new Array(a);for(;a-- >0;)i[a]=s[a];return i},qh=(s=>a=>s&&a instanceof s)(typeof Uint8Array<"u"&&pa(Uint8Array)),Kh=(s,a)=>{const c=(s&&s[ma]).call(s);let d;for(;(d=c.next())&&!d.done;){const f=d.value;a.call(s,f[0],f[1])}},Qh=(s,a)=>{let i;const c=[];for(;(i=s.exec(a))!==null;)c.push(i);return c},Jh=It("HTMLFormElement"),Gh=s=>s.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(i,c,d){return c.toUpperCase()+d}),Co=(({hasOwnProperty:s})=>(a,i)=>s.call(a,i))(Object.prototype),Yh=It("RegExp"),Ef=(s,a)=>{const i=Object.getOwnPropertyDescriptors(s),c={};zs(i,(d,f)=>{let m;(m=a(d,f,s))!==!1&&(c[f]=m||d)}),Object.defineProperties(s,c)},Xh=s=>{Ef(s,(a,i)=>{if(vt(s)&&["arguments","caller","callee"].includes(i))return!1;const c=s[i];if(vt(c)){if(a.enumerable=!1,"writable"in a){a.writable=!1;return}a.set||(a.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")})}})},Zh=(s,a)=>{const i={},c=d=>{d.forEach(f=>{i[f]=!0})};return Dr(s)?c(s):c(String(s).split(a)),i},ex=()=>{},tx=(s,a)=>s!=null&&Number.isFinite(s=+s)?s:a;function nx(s){return!!(s&&vt(s.append)&&s[Nf]==="FormData"&&s[ma])}const rx=s=>{const a=new WeakSet,i=c=>{if(Os(c)){if(a.has(c))return;if(Ls(c))return c;if(!("toJSON"in c)){a.add(c);const d=Dr(c)?[]:{};return zs(c,(f,m)=>{const h=i(f);!Lr(h)&&(d[m]=h)}),a.delete(c),d}}return c};return i(s)},sx=It("AsyncFunction"),lx=s=>s&&(Os(s)||vt(s))&&vt(s.then)&&vt(s.catch),Pf=((s,a)=>s?setImmediate:a?((i,c)=>(Yn.addEventListener("message",({source:d,data:f})=>{d===Yn&&f===i&&c.length&&c.shift()()},!1),d=>{c.push(d),Yn.postMessage(i,"*")}))(`axios@${Math.random()}`,[]):i=>setTimeout(i))(typeof setImmediate=="function",vt(Yn.postMessage)),ax=typeof queueMicrotask<"u"?queueMicrotask.bind(Yn):typeof process<"u"&&process.nextTick||Pf,ix=s=>s!=null&&vt(s[ma]),C={isArray:Dr,isArrayBuffer:Sf,isBuffer:Ls,isFormData:Oh,isArrayBufferView:kh,isString:jh,isNumber:bf,isBoolean:Nh,isObject:Os,isPlainObject:ta,isEmptyObject:Sh,isReadableStream:Ah,isRequest:Dh,isResponse:Fh,isHeaders:Uh,isUndefined:Lr,isDate:bh,isFile:Ch,isReactNativeBlob:_h,isReactNative:Eh,isBlob:Ph,isRegExp:Yh,isFunction:vt,isStream:Th,isURLSearchParams:zh,isTypedArray:qh,isFileList:Rh,forEach:zs,merge:bo,extend:Ih,trim:Mh,stripBOM:$h,inherits:Bh,toFlatObject:Vh,kindOf:ha,kindOfTest:It,endsWith:Hh,toArray:Wh,forEachEntry:Kh,matchAll:Qh,isHTMLForm:Jh,hasOwnProperty:Co,hasOwnProp:Co,reduceDescriptors:Ef,freezeMethods:Xh,toObjectSet:Zh,toCamelCase:Gh,noop:ex,toFiniteNumber:tx,findKey:Cf,global:Yn,isContextDefined:_f,isSpecCompliantForm:nx,toJSONObject:rx,isAsyncFn:sx,isThenable:lx,setImmediate:Pf,asap:ax,isIterable:ix},ox=C.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ux=s=>{const a={};let i,c,d;return s&&s.split(`
`).forEach(function(m){d=m.indexOf(":"),i=m.substring(0,d).trim().toLowerCase(),c=m.substring(d+1).trim(),!(!i||a[i]&&ox[i])&&(i==="set-cookie"?a[i]?a[i].push(c):a[i]=[c]:a[i]=a[i]?a[i]+", "+c:c)}),a};function cx(s){let a=0,i=s.length;for(;a<i;){const c=s.charCodeAt(a);if(c!==9&&c!==32)break;a+=1}for(;i>a;){const c=s.charCodeAt(i-1);if(c!==9&&c!==32)break;i-=1}return a===0&&i===s.length?s:s.slice(a,i)}const dx=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),fx=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Ao(s,a){return C.isArray(s)?s.map(i=>Ao(i,a)):cx(String(s).replace(a,""))}const px=s=>Ao(s,dx),mx=s=>Ao(s,fx);function Rf(s){const a=Object.create(null);return C.forEach(s.toJSON(),(i,c)=>{a[c]=mx(i)}),a}const Md=Symbol("internals");function Ps(s){return s&&String(s).trim().toLowerCase()}function na(s){return s===!1||s==null?s:C.isArray(s)?s.map(na):px(String(s))}function hx(s){const a=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let c;for(;c=i.exec(s);)a[c[1]]=c[2];return a}const xx=s=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(s.trim());function uo(s,a,i,c,d){if(C.isFunction(c))return c.call(this,a,i);if(d&&(a=i),!!C.isString(a)){if(C.isString(c))return a.indexOf(c)!==-1;if(C.isRegExp(c))return c.test(a)}}function gx(s){return s.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(a,i,c)=>i.toUpperCase()+c)}function yx(s,a){const i=C.toCamelCase(" "+a);["get","set","has"].forEach(c=>{Object.defineProperty(s,c+i,{__proto__:null,value:function(d,f,m){return this[c].call(this,a,d,f,m)},configurable:!0})})}let dt=class{constructor(a){a&&this.set(a)}set(a,i,c){const d=this;function f(h,x,y){const j=Ps(x);if(!j)throw new Error("header name must be a non-empty string");const _=C.findKey(d,j);(!_||d[_]===void 0||y===!0||y===void 0&&d[_]!==!1)&&(d[_||x]=na(h))}const m=(h,x)=>C.forEach(h,(y,j)=>f(y,j,x));if(C.isPlainObject(a)||a instanceof this.constructor)m(a,i);else if(C.isString(a)&&(a=a.trim())&&!xx(a))m(ux(a),i);else if(C.isObject(a)&&C.isIterable(a)){let h={},x,y;for(const j of a){if(!C.isArray(j))throw TypeError("Object iterator must return a key-value pair");h[y=j[0]]=(x=h[y])?C.isArray(x)?[...x,j[1]]:[x,j[1]]:j[1]}m(h,i)}else a!=null&&f(i,a,c);return this}get(a,i){if(a=Ps(a),a){const c=C.findKey(this,a);if(c){const d=this[c];if(!i)return d;if(i===!0)return hx(d);if(C.isFunction(i))return i.call(this,d,c);if(C.isRegExp(i))return i.exec(d);throw new TypeError("parser must be boolean|regexp|function")}}}has(a,i){if(a=Ps(a),a){const c=C.findKey(this,a);return!!(c&&this[c]!==void 0&&(!i||uo(this,this[c],c,i)))}return!1}delete(a,i){const c=this;let d=!1;function f(m){if(m=Ps(m),m){const h=C.findKey(c,m);h&&(!i||uo(c,c[h],h,i))&&(delete c[h],d=!0)}}return C.isArray(a)?a.forEach(f):f(a),d}clear(a){const i=Object.keys(this);let c=i.length,d=!1;for(;c--;){const f=i[c];(!a||uo(this,this[f],f,a,!0))&&(delete this[f],d=!0)}return d}normalize(a){const i=this,c={};return C.forEach(this,(d,f)=>{const m=C.findKey(c,f);if(m){i[m]=na(d),delete i[f];return}const h=a?gx(f):String(f).trim();h!==f&&delete i[f],i[h]=na(d),c[h]=!0}),this}concat(...a){return this.constructor.concat(this,...a)}toJSON(a){const i=Object.create(null);return C.forEach(this,(c,d)=>{c!=null&&c!==!1&&(i[d]=a&&C.isArray(c)?c.join(", "):c)}),i}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([a,i])=>a+": "+i).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(a){return a instanceof this?a:new this(a)}static concat(a,...i){const c=new this(a);return i.forEach(d=>c.set(d)),c}static accessor(a){const c=(this[Md]=this[Md]={accessors:{}}).accessors,d=this.prototype;function f(m){const h=Ps(m);c[h]||(yx(d,m),c[h]=!0)}return C.isArray(a)?a.forEach(f):f(a),this}};dt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);C.reduceDescriptors(dt.prototype,({value:s},a)=>{let i=a[0].toUpperCase()+a.slice(1);return{get:()=>s,set(c){this[i]=c}}});C.freezeMethods(dt);const vx="[REDACTED ****]";function wx(s){if(C.hasOwnProp(s,"toJSON"))return!0;let a=Object.getPrototypeOf(s);for(;a&&a!==Object.prototype;){if(C.hasOwnProp(a,"toJSON"))return!0;a=Object.getPrototypeOf(a)}return!1}function kx(s,a){const i=new Set(a.map(f=>String(f).toLowerCase())),c=[],d=f=>{if(f===null||typeof f!="object"||C.isBuffer(f))return f;if(c.indexOf(f)!==-1)return;f instanceof dt&&(f=f.toJSON()),c.push(f);let m;if(C.isArray(f))m=[],f.forEach((h,x)=>{const y=d(h);C.isUndefined(y)||(m[x]=y)});else{if(!C.isPlainObject(f)&&wx(f))return c.pop(),f;m=Object.create(null);for(const[h,x]of Object.entries(f)){const y=i.has(h.toLowerCase())?vx:d(x);C.isUndefined(y)||(m[h]=y)}}return c.pop(),m};return d(s)}let le=class Tf extends Error{static from(a,i,c,d,f,m){const h=new Tf(a.message,i||a.code,c,d,f);return h.cause=a,h.name=a.name,a.status!=null&&h.status==null&&(h.status=a.status),m&&Object.assign(h,m),h}constructor(a,i,c,d,f){super(a),Object.defineProperty(this,"message",{__proto__:null,value:a,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,i&&(this.code=i),c&&(this.config=c),d&&(this.request=d),f&&(this.response=f,this.status=f.status)}toJSON(){const a=this.config,i=a&&C.hasOwnProp(a,"redact")?a.redact:void 0,c=C.isArray(i)&&i.length>0?kx(a,i):C.toJSONObject(a);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:c,code:this.code,status:this.status}}};le.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";le.ERR_BAD_OPTION="ERR_BAD_OPTION";le.ECONNABORTED="ECONNABORTED";le.ETIMEDOUT="ETIMEDOUT";le.ECONNREFUSED="ECONNREFUSED";le.ERR_NETWORK="ERR_NETWORK";le.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";le.ERR_DEPRECATED="ERR_DEPRECATED";le.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";le.ERR_BAD_REQUEST="ERR_BAD_REQUEST";le.ERR_CANCELED="ERR_CANCELED";le.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";le.ERR_INVALID_URL="ERR_INVALID_URL";le.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const jx=null;function _o(s){return C.isPlainObject(s)||C.isArray(s)}function Lf(s){return C.endsWith(s,"[]")?s.slice(0,-2):s}function co(s,a,i){return s?s.concat(a).map(function(d,f){return d=Lf(d),!i&&f?"["+d+"]":d}).join(i?".":""):a}function Nx(s){return C.isArray(s)&&!s.some(_o)}const Sx=C.toFlatObject(C,{},null,function(a){return/^is[A-Z]/.test(a)});function ga(s,a,i){if(!C.isObject(s))throw new TypeError("target must be an object");a=a||new FormData,i=C.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,function(N,A){return!C.isUndefined(A[N])});const c=i.metaTokens,d=i.visitor||_,f=i.dots,m=i.indexes,h=i.Blob||typeof Blob<"u"&&Blob,x=i.maxDepth===void 0?100:i.maxDepth,y=h&&C.isSpecCompliantForm(a);if(!C.isFunction(d))throw new TypeError("visitor must be a function");function j(P){if(P===null)return"";if(C.isDate(P))return P.toISOString();if(C.isBoolean(P))return P.toString();if(!y&&C.isBlob(P))throw new le("Blob is not supported. Use a Buffer instead.");return C.isArrayBuffer(P)||C.isTypedArray(P)?y&&typeof Blob=="function"?new Blob([P]):Buffer.from(P):P}function _(P,N,A){let M=P;if(C.isReactNative(a)&&C.isReactNativeBlob(P))return a.append(co(A,N,f),j(P)),!1;if(P&&!A&&typeof P=="object"){if(C.endsWith(N,"{}"))N=c?N:N.slice(0,-2),P=JSON.stringify(P);else if(C.isArray(P)&&Nx(P)||(C.isFileList(P)||C.endsWith(N,"[]"))&&(M=C.toArray(P)))return N=Lf(N),M.forEach(function(Q,me){!(C.isUndefined(Q)||Q===null)&&a.append(m===!0?co([N],me,f):m===null?N:N+"[]",j(Q))}),!1}return _o(P)?!0:(a.append(co(A,N,f),j(P)),!1)}const O=[],B=Object.assign(Sx,{defaultVisitor:_,convertValue:j,isVisitable:_o});function L(P,N,A=0){if(!C.isUndefined(P)){if(A>x)throw new le("Object is too deeply nested ("+A+" levels). Max depth: "+x,le.ERR_FORM_DATA_DEPTH_EXCEEDED);if(O.indexOf(P)!==-1)throw Error("Circular reference detected in "+N.join("."));O.push(P),C.forEach(P,function(K,Q){(!(C.isUndefined(K)||K===null)&&d.call(a,K,C.isString(Q)?Q.trim():Q,N,B))===!0&&L(K,N?N.concat(Q):[Q],A+1)}),O.pop()}}if(!C.isObject(s))throw new TypeError("data must be an object");return L(s),a}function Id(s){const a={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(s).replace(/[!'()~]|%20/g,function(c){return a[c]})}function Do(s,a){this._pairs=[],s&&ga(s,this,a)}const Of=Do.prototype;Of.append=function(a,i){this._pairs.push([a,i])};Of.toString=function(a){const i=a?function(c){return a.call(this,c,Id)}:Id;return this._pairs.map(function(d){return i(d[0])+"="+i(d[1])},"").join("&")};function bx(s){return encodeURIComponent(s).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function zf(s,a,i){if(!a)return s;const c=i&&i.encode||bx,d=C.isFunction(i)?{serialize:i}:i,f=d&&d.serialize;let m;if(f?m=f(a,d):m=C.isURLSearchParams(a)?a.toString():new Do(a,d).toString(c),m){const h=s.indexOf("#");h!==-1&&(s=s.slice(0,h)),s+=(s.indexOf("?")===-1?"?":"&")+m}return s}class $d{constructor(){this.handlers=[]}use(a,i,c){return this.handlers.push({fulfilled:a,rejected:i,synchronous:c?c.synchronous:!1,runWhen:c?c.runWhen:null}),this.handlers.length-1}eject(a){this.handlers[a]&&(this.handlers[a]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(a){C.forEach(this.handlers,function(c){c!==null&&a(c)})}}const Fo={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Cx=typeof URLSearchParams<"u"?URLSearchParams:Do,_x=typeof FormData<"u"?FormData:null,Ex=typeof Blob<"u"?Blob:null,Px={isBrowser:!0,classes:{URLSearchParams:Cx,FormData:_x,Blob:Ex},protocols:["http","https","file","blob","url","data"]},Uo=typeof window<"u"&&typeof document<"u",Eo=typeof navigator=="object"&&navigator||void 0,Rx=Uo&&(!Eo||["ReactNative","NativeScript","NS"].indexOf(Eo.product)<0),Tx=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Lx=Uo&&window.location.href||"http://localhost",Ox=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Uo,hasStandardBrowserEnv:Rx,hasStandardBrowserWebWorkerEnv:Tx,navigator:Eo,origin:Lx},Symbol.toStringTag,{value:"Module"})),ot={...Ox,...Px};function zx(s,a){return ga(s,new ot.classes.URLSearchParams,{visitor:function(i,c,d,f){return ot.isNode&&C.isBuffer(i)?(this.append(c,i.toString("base64")),!1):f.defaultVisitor.apply(this,arguments)},...a})}function Ax(s){return C.matchAll(/\w+|\[(\w*)]/g,s).map(a=>a[0]==="[]"?"":a[1]||a[0])}function Dx(s){const a={},i=Object.keys(s);let c;const d=i.length;let f;for(c=0;c<d;c++)f=i[c],a[f]=s[f];return a}function Af(s){function a(i,c,d,f){let m=i[f++];if(m==="__proto__")return!0;const h=Number.isFinite(+m),x=f>=i.length;return m=!m&&C.isArray(d)?d.length:m,x?(C.hasOwnProp(d,m)?d[m]=C.isArray(d[m])?d[m].concat(c):[d[m],c]:d[m]=c,!h):((!C.hasOwnProp(d,m)||!C.isObject(d[m]))&&(d[m]=[]),a(i,c,d[m],f)&&C.isArray(d[m])&&(d[m]=Dx(d[m])),!h)}if(C.isFormData(s)&&C.isFunction(s.entries)){const i={};return C.forEachEntry(s,(c,d)=>{a(Ax(c),d,i,0)}),i}return null}const Er=(s,a)=>s!=null&&C.hasOwnProp(s,a)?s[a]:void 0;function Fx(s,a,i){if(C.isString(s))try{return(a||JSON.parse)(s),C.trim(s)}catch(c){if(c.name!=="SyntaxError")throw c}return(i||JSON.stringify)(s)}const As={transitional:Fo,adapter:["xhr","http","fetch"],transformRequest:[function(a,i){const c=i.getContentType()||"",d=c.indexOf("application/json")>-1,f=C.isObject(a);if(f&&C.isHTMLForm(a)&&(a=new FormData(a)),C.isFormData(a))return d?JSON.stringify(Af(a)):a;if(C.isArrayBuffer(a)||C.isBuffer(a)||C.isStream(a)||C.isFile(a)||C.isBlob(a)||C.isReadableStream(a))return a;if(C.isArrayBufferView(a))return a.buffer;if(C.isURLSearchParams(a))return i.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),a.toString();let h;if(f){const x=Er(this,"formSerializer");if(c.indexOf("application/x-www-form-urlencoded")>-1)return zx(a,x).toString();if((h=C.isFileList(a))||c.indexOf("multipart/form-data")>-1){const y=Er(this,"env"),j=y&&y.FormData;return ga(h?{"files[]":a}:a,j&&new j,x)}}return f||d?(i.setContentType("application/json",!1),Fx(a)):a}],transformResponse:[function(a){const i=Er(this,"transitional")||As.transitional,c=i&&i.forcedJSONParsing,d=Er(this,"responseType"),f=d==="json";if(C.isResponse(a)||C.isReadableStream(a))return a;if(a&&C.isString(a)&&(c&&!d||f)){const h=!(i&&i.silentJSONParsing)&&f;try{return JSON.parse(a,Er(this,"parseReviver"))}catch(x){if(h)throw x.name==="SyntaxError"?le.from(x,le.ERR_BAD_RESPONSE,this,null,Er(this,"response")):x}}return a}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ot.classes.FormData,Blob:ot.classes.Blob},validateStatus:function(a){return a>=200&&a<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};C.forEach(["delete","get","head","post","put","patch","query"],s=>{As.headers[s]={}});function fo(s,a){const i=this||As,c=a||i,d=dt.from(c.headers);let f=c.data;return C.forEach(s,function(h){f=h.call(i,f,d.normalize(),a?a.status:void 0)}),d.normalize(),f}function Df(s){return!!(s&&s.__CANCEL__)}let Ds=class extends le{constructor(a,i,c){super(a??"canceled",le.ERR_CANCELED,i,c),this.name="CanceledError",this.__CANCEL__=!0}};function Ff(s,a,i){const c=i.config.validateStatus;!i.status||!c||c(i.status)?s(i):a(new le("Request failed with status code "+i.status,i.status>=400&&i.status<500?le.ERR_BAD_REQUEST:le.ERR_BAD_RESPONSE,i.config,i.request,i))}function Ux(s){const a=/^([-+\w]{1,25}):(?:\/\/)?/.exec(s);return a&&a[1]||""}function Mx(s,a){s=s||10;const i=new Array(s),c=new Array(s);let d=0,f=0,m;return a=a!==void 0?a:1e3,function(x){const y=Date.now(),j=c[f];m||(m=y),i[d]=x,c[d]=y;let _=f,O=0;for(;_!==d;)O+=i[_++],_=_%s;if(d=(d+1)%s,d===f&&(f=(f+1)%s),y-m<a)return;const B=j&&y-j;return B?Math.round(O*1e3/B):void 0}}function Ix(s,a){let i=0,c=1e3/a,d,f;const m=(y,j=Date.now())=>{i=j,d=null,f&&(clearTimeout(f),f=null),s(...y)};return[(...y)=>{const j=Date.now(),_=j-i;_>=c?m(y,j):(d=y,f||(f=setTimeout(()=>{f=null,m(d)},c-_)))},()=>d&&m(d)]}const ia=(s,a,i=3)=>{let c=0;const d=Mx(50,250);return Ix(f=>{if(!f||typeof f.loaded!="number")return;const m=f.loaded,h=f.lengthComputable?f.total:void 0,x=h!=null?Math.min(m,h):m,y=Math.max(0,x-c),j=d(y);c=Math.max(c,x);const _={loaded:x,total:h,progress:h?x/h:void 0,bytes:y,rate:j||void 0,estimated:j&&h?(h-x)/j:void 0,event:f,lengthComputable:h!=null,[a?"download":"upload"]:!0};s(_)},i)},Bd=(s,a)=>{const i=s!=null;return[c=>a[0]({lengthComputable:i,total:s,loaded:c}),a[1]]},Vd=s=>(...a)=>C.asap(()=>s(...a)),$x=ot.hasStandardBrowserEnv?((s,a)=>i=>(i=new URL(i,ot.origin),s.protocol===i.protocol&&s.host===i.host&&(a||s.port===i.port)))(new URL(ot.origin),ot.navigator&&/(msie|trident)/i.test(ot.navigator.userAgent)):()=>!0,Bx=ot.hasStandardBrowserEnv?{write(s,a,i,c,d,f,m){if(typeof document>"u")return;const h=[`${s}=${encodeURIComponent(a)}`];C.isNumber(i)&&h.push(`expires=${new Date(i).toUTCString()}`),C.isString(c)&&h.push(`path=${c}`),C.isString(d)&&h.push(`domain=${d}`),f===!0&&h.push("secure"),C.isString(m)&&h.push(`SameSite=${m}`),document.cookie=h.join("; ")},read(s){if(typeof document>"u")return null;const a=document.cookie.split(";");for(let i=0;i<a.length;i++){const c=a[i].replace(/^\s+/,""),d=c.indexOf("=");if(d!==-1&&c.slice(0,d)===s)return decodeURIComponent(c.slice(d+1))}return null},remove(s){this.write(s,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Vx(s){return typeof s!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(s)}function Hx(s,a){return a?s.replace(/\/?\/$/,"")+"/"+a.replace(/^\/+/,""):s}function Uf(s,a,i){let c=!Vx(a);return s&&(c||i===!1)?Hx(s,a):a}const Hd=s=>s instanceof dt?{...s}:s;function nr(s,a){a=a||{};const i=Object.create(null);Object.defineProperty(i,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function c(y,j,_,O){return C.isPlainObject(y)&&C.isPlainObject(j)?C.merge.call({caseless:O},y,j):C.isPlainObject(j)?C.merge({},j):C.isArray(j)?j.slice():j}function d(y,j,_,O){if(C.isUndefined(j)){if(!C.isUndefined(y))return c(void 0,y,_,O)}else return c(y,j,_,O)}function f(y,j){if(!C.isUndefined(j))return c(void 0,j)}function m(y,j){if(C.isUndefined(j)){if(!C.isUndefined(y))return c(void 0,y)}else return c(void 0,j)}function h(y,j,_){if(C.hasOwnProp(a,_))return c(y,j);if(C.hasOwnProp(s,_))return c(void 0,y)}const x={url:f,method:f,data:f,baseURL:m,transformRequest:m,transformResponse:m,paramsSerializer:m,timeout:m,timeoutMessage:m,withCredentials:m,withXSRFToken:m,adapter:m,responseType:m,xsrfCookieName:m,xsrfHeaderName:m,onUploadProgress:m,onDownloadProgress:m,decompress:m,maxContentLength:m,maxBodyLength:m,beforeRedirect:m,transport:m,httpAgent:m,httpsAgent:m,cancelToken:m,socketPath:m,allowedSocketPaths:m,responseEncoding:m,validateStatus:h,headers:(y,j,_)=>d(Hd(y),Hd(j),_,!0)};return C.forEach(Object.keys({...s,...a}),function(j){if(j==="__proto__"||j==="constructor"||j==="prototype")return;const _=C.hasOwnProp(x,j)?x[j]:d,O=C.hasOwnProp(s,j)?s[j]:void 0,B=C.hasOwnProp(a,j)?a[j]:void 0,L=_(O,B,j);C.isUndefined(L)&&_!==h||(i[j]=L)}),i}const Wx=["content-type","content-length"];function qx(s,a,i){if(i!=="content-only"){s.set(a);return}Object.entries(a).forEach(([c,d])=>{Wx.includes(c.toLowerCase())&&s.set(c,d)})}const Kx=s=>encodeURIComponent(s).replace(/%([0-9A-F]{2})/gi,(a,i)=>String.fromCharCode(parseInt(i,16))),Mf=s=>{const a=nr({},s),i=O=>C.hasOwnProp(a,O)?a[O]:void 0,c=i("data");let d=i("withXSRFToken");const f=i("xsrfHeaderName"),m=i("xsrfCookieName");let h=i("headers");const x=i("auth"),y=i("baseURL"),j=i("allowAbsoluteUrls"),_=i("url");if(a.headers=h=dt.from(h),a.url=zf(Uf(y,_,j),s.params,s.paramsSerializer),x&&h.set("Authorization","Basic "+btoa((x.username||"")+":"+(x.password?Kx(x.password):""))),C.isFormData(c)&&(ot.hasStandardBrowserEnv||ot.hasStandardBrowserWebWorkerEnv?h.setContentType(void 0):C.isFunction(c.getHeaders)&&qx(h,c.getHeaders(),i("formDataHeaderPolicy"))),ot.hasStandardBrowserEnv&&(C.isFunction(d)&&(d=d(a)),d===!0||d==null&&$x(a.url))){const B=f&&m&&Bx.read(m);B&&h.set(f,B)}return a},Qx=typeof XMLHttpRequest<"u",Jx=Qx&&function(s){return new Promise(function(i,c){const d=Mf(s);let f=d.data;const m=dt.from(d.headers).normalize();let{responseType:h,onUploadProgress:x,onDownloadProgress:y}=d,j,_,O,B,L;function P(){B&&B(),L&&L(),d.cancelToken&&d.cancelToken.unsubscribe(j),d.signal&&d.signal.removeEventListener("abort",j)}let N=new XMLHttpRequest;N.open(d.method.toUpperCase(),d.url,!0),N.timeout=d.timeout;function A(){if(!N)return;const K=dt.from("getAllResponseHeaders"in N&&N.getAllResponseHeaders()),me={data:!h||h==="text"||h==="json"?N.responseText:N.response,status:N.status,statusText:N.statusText,headers:K,config:s,request:N};Ff(function(z){i(z),P()},function(z){c(z),P()},me),N=null}"onloadend"in N?N.onloadend=A:N.onreadystatechange=function(){!N||N.readyState!==4||N.status===0&&!(N.responseURL&&N.responseURL.startsWith("file:"))||setTimeout(A)},N.onabort=function(){N&&(c(new le("Request aborted",le.ECONNABORTED,s,N)),P(),N=null)},N.onerror=function(Q){const me=Q&&Q.message?Q.message:"Network Error",fe=new le(me,le.ERR_NETWORK,s,N);fe.event=Q||null,c(fe),P(),N=null},N.ontimeout=function(){let Q=d.timeout?"timeout of "+d.timeout+"ms exceeded":"timeout exceeded";const me=d.transitional||Fo;d.timeoutErrorMessage&&(Q=d.timeoutErrorMessage),c(new le(Q,me.clarifyTimeoutError?le.ETIMEDOUT:le.ECONNABORTED,s,N)),P(),N=null},f===void 0&&m.setContentType(null),"setRequestHeader"in N&&C.forEach(Rf(m),function(Q,me){N.setRequestHeader(me,Q)}),C.isUndefined(d.withCredentials)||(N.withCredentials=!!d.withCredentials),h&&h!=="json"&&(N.responseType=d.responseType),y&&([O,L]=ia(y,!0),N.addEventListener("progress",O)),x&&N.upload&&([_,B]=ia(x),N.upload.addEventListener("progress",_),N.upload.addEventListener("loadend",B)),(d.cancelToken||d.signal)&&(j=K=>{N&&(c(!K||K.type?new Ds(null,s,N):K),N.abort(),P(),N=null)},d.cancelToken&&d.cancelToken.subscribe(j),d.signal&&(d.signal.aborted?j():d.signal.addEventListener("abort",j)));const M=Ux(d.url);if(M&&!ot.protocols.includes(M)){c(new le("Unsupported protocol "+M+":",le.ERR_BAD_REQUEST,s));return}N.send(f||null)})},Gx=(s,a)=>{if(s=s?s.filter(Boolean):[],!a&&!s.length)return;const i=new AbortController;let c=!1;const d=function(x){if(!c){c=!0,m();const y=x instanceof Error?x:this.reason;i.abort(y instanceof le?y:new Ds(y instanceof Error?y.message:y))}};let f=a&&setTimeout(()=>{f=null,d(new le(`timeout of ${a}ms exceeded`,le.ETIMEDOUT))},a);const m=()=>{s&&(f&&clearTimeout(f),f=null,s.forEach(x=>{x.unsubscribe?x.unsubscribe(d):x.removeEventListener("abort",d)}),s=null)};s.forEach(x=>x.addEventListener("abort",d));const{signal:h}=i;return h.unsubscribe=()=>C.asap(m),h},Yx=function*(s,a){let i=s.byteLength;if(i<a){yield s;return}let c=0,d;for(;c<i;)d=c+a,yield s.slice(c,d),c=d},Xx=async function*(s,a){for await(const i of Zx(s))yield*Yx(i,a)},Zx=async function*(s){if(s[Symbol.asyncIterator]){yield*s;return}const a=s.getReader();try{for(;;){const{done:i,value:c}=await a.read();if(i)break;yield c}}finally{await a.cancel()}},Wd=(s,a,i,c)=>{const d=Xx(s,a);let f=0,m,h=x=>{m||(m=!0,c&&c(x))};return new ReadableStream({async pull(x){try{const{done:y,value:j}=await d.next();if(y){h(),x.close();return}let _=j.byteLength;if(i){let O=f+=_;i(O)}x.enqueue(new Uint8Array(j))}catch(y){throw h(y),y}},cancel(x){return h(x),d.return()}},{highWaterMark:2})};function eg(s){if(!s||typeof s!="string"||!s.startsWith("data:"))return 0;const a=s.indexOf(",");if(a<0)return 0;const i=s.slice(5,a),c=s.slice(a+1);if(/;base64/i.test(i)){let m=c.length;const h=c.length;for(let B=0;B<h;B++)if(c.charCodeAt(B)===37&&B+2<h){const L=c.charCodeAt(B+1),P=c.charCodeAt(B+2);(L>=48&&L<=57||L>=65&&L<=70||L>=97&&L<=102)&&(P>=48&&P<=57||P>=65&&P<=70||P>=97&&P<=102)&&(m-=2,B+=2)}let x=0,y=h-1;const j=B=>B>=2&&c.charCodeAt(B-2)===37&&c.charCodeAt(B-1)===51&&(c.charCodeAt(B)===68||c.charCodeAt(B)===100);y>=0&&(c.charCodeAt(y)===61?(x++,y--):j(y)&&(x++,y-=3)),x===1&&y>=0&&(c.charCodeAt(y)===61||j(y))&&x++;const O=Math.floor(m/4)*3-(x||0);return O>0?O:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(c,"utf8");let f=0;for(let m=0,h=c.length;m<h;m++){const x=c.charCodeAt(m);if(x<128)f+=1;else if(x<2048)f+=2;else if(x>=55296&&x<=56319&&m+1<h){const y=c.charCodeAt(m+1);y>=56320&&y<=57343?(f+=4,m++):f+=3}else f+=3}return f}const Mo="1.16.1",qd=64*1024,{isFunction:Zl}=C,Kd=(s,...a)=>{try{return!!s(...a)}catch{return!1}},tg=s=>{const a=C.global!==void 0&&C.global!==null?C.global:globalThis,{ReadableStream:i,TextEncoder:c}=a;s=C.merge.call({skipUndefined:!0},{Request:a.Request,Response:a.Response},s);const{fetch:d,Request:f,Response:m}=s,h=d?Zl(d):typeof fetch=="function",x=Zl(f),y=Zl(m);if(!h)return!1;const j=h&&Zl(i),_=h&&(typeof c=="function"?(A=>M=>A.encode(M))(new c):async A=>new Uint8Array(await new f(A).arrayBuffer())),O=x&&j&&Kd(()=>{let A=!1;const M=new f(ot.origin,{body:new i,method:"POST",get duplex(){return A=!0,"half"}}),K=M.headers.has("Content-Type");return M.body!=null&&M.body.cancel(),A&&!K}),B=y&&j&&Kd(()=>C.isReadableStream(new m("").body)),L={stream:B&&(A=>A.body)};h&&["text","arrayBuffer","blob","formData","stream"].forEach(A=>{!L[A]&&(L[A]=(M,K)=>{let Q=M&&M[A];if(Q)return Q.call(M);throw new le(`Response type '${A}' is not supported`,le.ERR_NOT_SUPPORT,K)})});const P=async A=>{if(A==null)return 0;if(C.isBlob(A))return A.size;if(C.isSpecCompliantForm(A))return(await new f(ot.origin,{method:"POST",body:A}).arrayBuffer()).byteLength;if(C.isArrayBufferView(A)||C.isArrayBuffer(A))return A.byteLength;if(C.isURLSearchParams(A)&&(A=A+""),C.isString(A))return(await _(A)).byteLength},N=async(A,M)=>{const K=C.toFiniteNumber(A.getContentLength());return K??P(M)};return async A=>{let{url:M,method:K,data:Q,signal:me,cancelToken:fe,timeout:z,onDownloadProgress:ae,onUploadProgress:de,responseType:Y,headers:je,withCredentials:Te="same-origin",fetchOptions:ze,maxContentLength:Ee,maxBodyLength:q}=Mf(A);const ge=C.isNumber(Ee)&&Ee>-1,D=C.isNumber(q)&&q>-1;let U=d||fetch;Y=Y?(Y+"").toLowerCase():"text";let ee=Gx([me,fe&&fe.toAbortSignal()],z),G=null;const b=ee&&ee.unsubscribe&&(()=>{ee.unsubscribe()});let I;try{if(ge&&typeof M=="string"&&M.startsWith("data:")&&eg(M)>Ee)throw new le("maxContentLength size of "+Ee+" exceeded",le.ERR_BAD_RESPONSE,A,G);if(D&&K!=="get"&&K!=="head"){const oe=await N(je,Q);if(typeof oe=="number"&&isFinite(oe)&&oe>q)throw new le("Request body larger than maxBodyLength limit",le.ERR_BAD_REQUEST,A,G)}if(de&&O&&K!=="get"&&K!=="head"&&(I=await N(je,Q))!==0){let oe=new f(M,{method:"POST",body:Q,duplex:"half"}),F;if(C.isFormData(Q)&&(F=oe.headers.get("content-type"))&&je.setContentType(F),oe.body){const[ne,ke]=Bd(I,ia(Vd(de)));Q=Wd(oe.body,qd,ne,ke)}}C.isString(Te)||(Te=Te?"include":"omit");const te=x&&"credentials"in f.prototype;if(C.isFormData(Q)){const oe=je.getContentType();oe&&/^multipart\/form-data/i.test(oe)&&!/boundary=/i.test(oe)&&je.delete("content-type")}je.set("User-Agent","axios/"+Mo,!1);const pe={...ze,signal:ee,method:K.toUpperCase(),headers:Rf(je.normalize()),body:Q,duplex:"half",credentials:te?Te:void 0};G=x&&new f(M,pe);let ye=await(x?U(G,ze):U(M,pe));if(ge){const oe=C.toFiniteNumber(ye.headers.get("content-length"));if(oe!=null&&oe>Ee)throw new le("maxContentLength size of "+Ee+" exceeded",le.ERR_BAD_RESPONSE,A,G)}const Ne=B&&(Y==="stream"||Y==="response");if(B&&ye.body&&(ae||ge||Ne&&b)){const oe={};["status","statusText","headers"].forEach(Le=>{oe[Le]=ye[Le]});const F=C.toFiniteNumber(ye.headers.get("content-length")),[ne,ke]=ae&&Bd(F,ia(Vd(ae),!0))||[];let Ce=0;const De=Le=>{if(ge&&(Ce=Le,Ce>Ee))throw new le("maxContentLength size of "+Ee+" exceeded",le.ERR_BAD_RESPONSE,A,G);ne&&ne(Le)};ye=new m(Wd(ye.body,qd,De,()=>{ke&&ke(),b&&b()}),oe)}Y=Y||"text";let we=await L[C.findKey(L,Y)||"text"](ye,A);if(ge&&!B&&!Ne){let oe;if(we!=null&&(typeof we.byteLength=="number"?oe=we.byteLength:typeof we.size=="number"?oe=we.size:typeof we=="string"&&(oe=typeof c=="function"?new c().encode(we).byteLength:we.length)),typeof oe=="number"&&oe>Ee)throw new le("maxContentLength size of "+Ee+" exceeded",le.ERR_BAD_RESPONSE,A,G)}return!Ne&&b&&b(),await new Promise((oe,F)=>{Ff(oe,F,{data:we,headers:dt.from(ye.headers),status:ye.status,statusText:ye.statusText,config:A,request:G})})}catch(te){if(b&&b(),ee&&ee.aborted&&ee.reason instanceof le){const pe=ee.reason;throw pe.config=A,G&&(pe.request=G),te!==pe&&(pe.cause=te),pe}throw te&&te.name==="TypeError"&&/Load failed|fetch/i.test(te.message)?Object.assign(new le("Network Error",le.ERR_NETWORK,A,G,te&&te.response),{cause:te.cause||te}):le.from(te,te&&te.code,A,G,te&&te.response)}}},ng=new Map,If=s=>{let a=s&&s.env||{};const{fetch:i,Request:c,Response:d}=a,f=[c,d,i];let m=f.length,h=m,x,y,j=ng;for(;h--;)x=f[h],y=j.get(x),y===void 0&&j.set(x,y=h?new Map:tg(a)),j=y;return y};If();const Io={http:jx,xhr:Jx,fetch:{get:If}};C.forEach(Io,(s,a)=>{if(s){try{Object.defineProperty(s,"name",{__proto__:null,value:a})}catch{}Object.defineProperty(s,"adapterName",{__proto__:null,value:a})}});const Qd=s=>`- ${s}`,rg=s=>C.isFunction(s)||s===null||s===!1;function sg(s,a){s=C.isArray(s)?s:[s];const{length:i}=s;let c,d;const f={};for(let m=0;m<i;m++){c=s[m];let h;if(d=c,!rg(c)&&(d=Io[(h=String(c)).toLowerCase()],d===void 0))throw new le(`Unknown adapter '${h}'`);if(d&&(C.isFunction(d)||(d=d.get(a))))break;f[h||"#"+m]=d}if(!d){const m=Object.entries(f).map(([x,y])=>`adapter ${x} `+(y===!1?"is not supported by the environment":"is not available in the build"));let h=i?m.length>1?`since :
`+m.map(Qd).join(`
`):" "+Qd(m[0]):"as no adapter specified";throw new le("There is no suitable adapter to dispatch the request "+h,"ERR_NOT_SUPPORT")}return d}const $f={getAdapter:sg,adapters:Io};function po(s){if(s.cancelToken&&s.cancelToken.throwIfRequested(),s.signal&&s.signal.aborted)throw new Ds(null,s)}function Jd(s){return po(s),s.headers=dt.from(s.headers),s.data=fo.call(s,s.transformRequest),["post","put","patch"].indexOf(s.method)!==-1&&s.headers.setContentType("application/x-www-form-urlencoded",!1),$f.getAdapter(s.adapter||As.adapter,s)(s).then(function(c){po(s),s.response=c;try{c.data=fo.call(s,s.transformResponse,c)}finally{delete s.response}return c.headers=dt.from(c.headers),c},function(c){if(!Df(c)&&(po(s),c&&c.response)){s.response=c.response;try{c.response.data=fo.call(s,s.transformResponse,c.response)}finally{delete s.response}c.response.headers=dt.from(c.response.headers)}return Promise.reject(c)})}const ya={};["object","boolean","number","function","string","symbol"].forEach((s,a)=>{ya[s]=function(c){return typeof c===s||"a"+(a<1?"n ":" ")+s}});const Gd={};ya.transitional=function(a,i,c){function d(f,m){return"[Axios v"+Mo+"] Transitional option '"+f+"'"+m+(c?". "+c:"")}return(f,m,h)=>{if(a===!1)throw new le(d(m," has been removed"+(i?" in "+i:"")),le.ERR_DEPRECATED);return i&&!Gd[m]&&(Gd[m]=!0,console.warn(d(m," has been deprecated since v"+i+" and will be removed in the near future"))),a?a(f,m,h):!0}};ya.spelling=function(a){return(i,c)=>(console.warn(`${c} is likely a misspelling of ${a}`),!0)};function lg(s,a,i){if(typeof s!="object")throw new le("options must be an object",le.ERR_BAD_OPTION_VALUE);const c=Object.keys(s);let d=c.length;for(;d-- >0;){const f=c[d],m=Object.prototype.hasOwnProperty.call(a,f)?a[f]:void 0;if(m){const h=s[f],x=h===void 0||m(h,f,s);if(x!==!0)throw new le("option "+f+" must be "+x,le.ERR_BAD_OPTION_VALUE);continue}if(i!==!0)throw new le("Unknown option "+f,le.ERR_BAD_OPTION)}}const ra={assertOptions:lg,validators:ya},Tt=ra.validators;let er=class{constructor(a){this.defaults=a||{},this.interceptors={request:new $d,response:new $d}}async request(a,i){try{return await this._request(a,i)}catch(c){if(c instanceof Error){let d={};Error.captureStackTrace?Error.captureStackTrace(d):d=new Error;const f=(()=>{if(!d.stack)return"";const m=d.stack.indexOf(`
`);return m===-1?"":d.stack.slice(m+1)})();try{if(!c.stack)c.stack=f;else if(f){const m=f.indexOf(`
`),h=m===-1?-1:f.indexOf(`
`,m+1),x=h===-1?"":f.slice(h+1);String(c.stack).endsWith(x)||(c.stack+=`
`+f)}}catch{}}throw c}}_request(a,i){typeof a=="string"?(i=i||{},i.url=a):i=a||{},i=nr(this.defaults,i);const{transitional:c,paramsSerializer:d,headers:f}=i;c!==void 0&&ra.assertOptions(c,{silentJSONParsing:Tt.transitional(Tt.boolean),forcedJSONParsing:Tt.transitional(Tt.boolean),clarifyTimeoutError:Tt.transitional(Tt.boolean),legacyInterceptorReqResOrdering:Tt.transitional(Tt.boolean)},!1),d!=null&&(C.isFunction(d)?i.paramsSerializer={serialize:d}:ra.assertOptions(d,{encode:Tt.function,serialize:Tt.function},!0)),i.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?i.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:i.allowAbsoluteUrls=!0),ra.assertOptions(i,{baseUrl:Tt.spelling("baseURL"),withXsrfToken:Tt.spelling("withXSRFToken")},!0),i.method=(i.method||this.defaults.method||"get").toLowerCase();let m=f&&C.merge(f.common,f[i.method]);f&&C.forEach(["delete","get","head","post","put","patch","query","common"],L=>{delete f[L]}),i.headers=dt.concat(m,f);const h=[];let x=!0;this.interceptors.request.forEach(function(P){if(typeof P.runWhen=="function"&&P.runWhen(i)===!1)return;x=x&&P.synchronous;const N=i.transitional||Fo;N&&N.legacyInterceptorReqResOrdering?h.unshift(P.fulfilled,P.rejected):h.push(P.fulfilled,P.rejected)});const y=[];this.interceptors.response.forEach(function(P){y.push(P.fulfilled,P.rejected)});let j,_=0,O;if(!x){const L=[Jd.bind(this),void 0];for(L.unshift(...h),L.push(...y),O=L.length,j=Promise.resolve(i);_<O;)j=j.then(L[_++],L[_++]);return j}O=h.length;let B=i;for(;_<O;){const L=h[_++],P=h[_++];try{B=L(B)}catch(N){P.call(this,N);break}}try{j=Jd.call(this,B)}catch(L){return Promise.reject(L)}for(_=0,O=y.length;_<O;)j=j.then(y[_++],y[_++]);return j}getUri(a){a=nr(this.defaults,a);const i=Uf(a.baseURL,a.url,a.allowAbsoluteUrls);return zf(i,a.params,a.paramsSerializer)}};C.forEach(["delete","get","head","options"],function(a){er.prototype[a]=function(i,c){return this.request(nr(c||{},{method:a,url:i,data:(c||{}).data}))}});C.forEach(["post","put","patch","query"],function(a){function i(c){return function(f,m,h){return this.request(nr(h||{},{method:a,headers:c?{"Content-Type":"multipart/form-data"}:{},url:f,data:m}))}}er.prototype[a]=i(),a!=="query"&&(er.prototype[a+"Form"]=i(!0))});let ag=class Bf{constructor(a){if(typeof a!="function")throw new TypeError("executor must be a function.");let i;this.promise=new Promise(function(f){i=f});const c=this;this.promise.then(d=>{if(!c._listeners)return;let f=c._listeners.length;for(;f-- >0;)c._listeners[f](d);c._listeners=null}),this.promise.then=d=>{let f;const m=new Promise(h=>{c.subscribe(h),f=h}).then(d);return m.cancel=function(){c.unsubscribe(f)},m},a(function(f,m,h){c.reason||(c.reason=new Ds(f,m,h),i(c.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(a){if(this.reason){a(this.reason);return}this._listeners?this._listeners.push(a):this._listeners=[a]}unsubscribe(a){if(!this._listeners)return;const i=this._listeners.indexOf(a);i!==-1&&this._listeners.splice(i,1)}toAbortSignal(){const a=new AbortController,i=c=>{a.abort(c)};return this.subscribe(i),a.signal.unsubscribe=()=>this.unsubscribe(i),a.signal}static source(){let a;return{token:new Bf(function(d){a=d}),cancel:a}}};function ig(s){return function(i){return s.apply(null,i)}}function og(s){return C.isObject(s)&&s.isAxiosError===!0}const Po={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Po).forEach(([s,a])=>{Po[a]=s});function Vf(s){const a=new er(s),i=jf(er.prototype.request,a);return C.extend(i,er.prototype,a,{allOwnKeys:!0}),C.extend(i,a,null,{allOwnKeys:!0}),i.create=function(d){return Vf(nr(s,d))},i}const qe=Vf(As);qe.Axios=er;qe.CanceledError=Ds;qe.CancelToken=ag;qe.isCancel=Df;qe.VERSION=Mo;qe.toFormData=ga;qe.AxiosError=le;qe.Cancel=qe.CanceledError;qe.all=function(a){return Promise.all(a)};qe.spread=ig;qe.isAxiosError=og;qe.mergeConfig=nr;qe.AxiosHeaders=dt;qe.formToJSON=s=>Af(C.isHTMLForm(s)?new FormData(s):s);qe.getAdapter=$f.getAdapter;qe.HttpStatusCode=Po;qe.default=qe;const{Axios:Qg,AxiosError:Jg,CanceledError:Gg,isCancel:Yg,CancelToken:Xg,VERSION:Zg,all:ey,Cancel:ty,isAxiosError:ny,spread:ry,toFormData:sy,AxiosHeaders:ly,HttpStatusCode:ay,formToJSON:iy,getAdapter:oy,mergeConfig:uy,create:cy}=qe,X=qe.create({baseURL:"/api/admin"});X.interceptors.request.use(s=>{const a=localStorage.getItem("token");return a&&(s.headers.Authorization=`Bearer ${a}`),s});X.interceptors.response.use(s=>s,s=>{var a;return((a=s.response)==null?void 0:a.status)===401&&(localStorage.removeItem("token"),window.location.href="/login"),Promise.reject(s)});async function ug(s,a){const i=new FormData;i.append("username",s),i.append("password",a);const{data:c}=await qe.post("/api/admin/auth/token",i);return c.access_token}function cg(){const[s,a]=v.useState(""),[i,c]=v.useState(""),[d,f]=v.useState(""),[m,h]=v.useState(!1),x=ca();async function y(j){j.preventDefault(),h(!0),f("");try{const _=await ug(s,i);localStorage.setItem("token",_),x("/dashboard")}catch{f("Credenciales incorrectas")}finally{h(!1)}}return l.jsx("div",{className:"min-h-screen bg-dark-900 flex items-center justify-center p-4",children:l.jsxs("div",{className:"w-full max-w-sm",children:[l.jsxs("div",{className:"flex items-center justify-center gap-3 mb-8",children:[l.jsx(fa,{className:"text-primary-500",size:32}),l.jsx("h1",{className:"text-3xl font-bold",children:"KiraStream"})]}),l.jsxs("form",{onSubmit:y,className:"bg-dark-800 rounded-xl p-6 space-y-4 border border-dark-700",children:[l.jsx("h2",{className:"text-center text-gray-400 text-sm",children:"Panel de Administración"}),d&&l.jsx("div",{className:"bg-red-900/30 border border-red-700 text-red-400 text-sm rounded p-2 text-center",children:d}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Usuario"}),l.jsx("input",{value:s,onChange:j=>a(j.target.value),className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm focus:outline-none focus:border-primary-500",autoComplete:"username",required:!0})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Contraseña"}),l.jsx("input",{type:"password",value:i,onChange:j=>c(j.target.value),className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm focus:outline-none focus:border-primary-500",autoComplete:"current-password",required:!0})]}),l.jsx("button",{type:"submit",disabled:m,className:"w-full bg-primary-500 hover:bg-primary-600 disabled:opacity-50 rounded-lg py-2 text-sm font-medium transition-colors",children:m?"Entrando...":"Entrar"})]})]})})}function Hf(s){var a,i,c="";if(typeof s=="string"||typeof s=="number")c+=s;else if(typeof s=="object")if(Array.isArray(s)){var d=s.length;for(a=0;a<d;a++)s[a]&&(i=Hf(s[a]))&&(c&&(c+=" "),c+=i)}else for(i in s)s[i]&&(c&&(c+=" "),c+=i);return c}function Mt(){for(var s,a,i=0,c="",d=arguments.length;i<d;i++)(s=arguments[i])&&(a=Hf(s))&&(c&&(c+=" "),c+=a);return c}const dg=[{to:"/dashboard",icon:ph,label:"Dashboard"},{to:"/providers",icon:zo,label:"Proveedores"},{to:"/users",icon:aa,label:"Usuarios"},{to:"/catalogs",icon:wf,label:"Catálogos"},{to:"/custom-categories",icon:Pn,label:"Cat. personalizadas"},{to:"/jellyfin",icon:Gn,label:"Jellyfin"},{to:"/epg",icon:Tr,label:"EPG"},{to:"/logs",icon:xh,label:"Registros"},{to:"/settings",icon:gh,label:"Ajustes"}],fg={live:"Directo",movie:"Película",series:"Serie"},pg={live:"bg-blue-900/30 text-blue-300 border-blue-800",movie:"bg-purple-900/30 text-purple-300 border-purple-800",series:"bg-green-900/30 text-green-300 border-green-800"};function mg(){const s=ca(),[a,i]=v.useState(!1),[c,d]=v.useState([]),[f,m]=v.useState(0),[h,x]=v.useState(!1),y=v.useRef(null);function j(){localStorage.removeItem("token"),s("/login")}async function _(){x(!0);try{const{data:L}=await X.get("/providers/notifications/all");d(L.notifications||[]),m(L.total||0)}catch{d([]),m(0)}finally{x(!1)}}v.useEffect(()=>{const L=async()=>{try{const{data:N}=await X.get("/providers/notifications/all");m(N.total||0),a&&d(N.notifications||[])}catch{}};L();const P=setInterval(L,12e4);return()=>clearInterval(P)},[a]),v.useEffect(()=>{a&&_()},[a]),v.useEffect(()=>{const L=P=>{y.current&&!y.current.contains(P.target)&&i(!1)};return a&&document.addEventListener("mousedown",L),()=>document.removeEventListener("mousedown",L)},[a]);async function O(L,P,N){await X.post("/providers/notifications/dismiss",{provider_id:L,category_id:P,category_type:N}),d(A=>A.map(M=>M.provider_id===L?{...M,categories:M.categories.filter(K=>!(K.id===P&&K.type===N))}:M).filter(M=>M.categories.length>0)),m(A=>Math.max(0,A-1))}async function B(L){var N;await X.post(`/providers/notifications/dismiss-provider/${L}`),d(A=>A.filter(M=>M.provider_id!==L));const P=((N=c.find(A=>A.provider_id===L))==null?void 0:N.categories.length)??0;m(A=>Math.max(0,A-P))}return l.jsxs("div",{className:"flex h-screen overflow-hidden",children:[l.jsxs("aside",{className:"w-56 bg-dark-800 border-r border-dark-700 flex flex-col shrink-0",children:[l.jsxs("div",{className:"flex items-center gap-2 p-4 border-b border-dark-700",children:[l.jsx(fa,{className:"text-primary-500",size:22}),l.jsx("span",{className:"font-bold text-lg tracking-tight flex-1",children:"KiraStream"}),l.jsxs("div",{className:"relative",ref:y,children:[l.jsxs("button",{onClick:()=>i(L=>!L),className:Mt("relative p-1 rounded-lg transition-colors",a?"bg-dark-600 text-yellow-400":"text-gray-500 hover:text-yellow-400 hover:bg-dark-700"),title:"Notificaciones",children:[l.jsx(gf,{size:16}),f>0&&l.jsx("span",{className:"absolute -top-1 -right-1 bg-yellow-500 text-black text-[9px] font-bold rounded-full w-4 h-4 flex items-center justify-center",children:f>99?"99+":f})]}),a&&l.jsxs("div",{className:"absolute left-0 top-full mt-2 w-80 bg-dark-800 border border-dark-700 rounded-xl shadow-2xl z-50 flex flex-col max-h-[70vh]",children:[l.jsxs("div",{className:"p-3 border-b border-dark-700 flex items-center justify-between shrink-0",children:[l.jsx("span",{className:"font-semibold text-sm",children:"Nuevas categorías"}),l.jsx("button",{onClick:()=>i(!1),className:"text-gray-500 hover:text-white",children:l.jsx(Ln,{size:14})})]}),h?l.jsx("div",{className:"flex items-center justify-center p-8",children:l.jsx(Ge,{size:18,className:"animate-spin text-gray-400"})}):c.length===0?l.jsx("div",{className:"p-6 text-center text-gray-500 text-sm",children:"Sin novedades pendientes ✓"}):l.jsx("div",{className:"overflow-y-auto flex-1 p-2 space-y-3",children:c.map(L=>l.jsxs("div",{className:"bg-dark-900/50 rounded-lg border border-dark-700 overflow-hidden",children:[l.jsxs("div",{className:"flex items-center justify-between px-3 py-2 bg-dark-700/40",children:[l.jsx("span",{className:"text-xs font-semibold text-gray-300 truncate",children:L.provider_name}),l.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[l.jsx("span",{className:"text-xs text-gray-500",children:L.categories.length}),l.jsx("button",{onClick:()=>B(L.provider_id),className:"text-xs text-gray-500 hover:text-red-400 ml-1 px-1.5 py-0.5 rounded hover:bg-dark-600",title:"Descartar todas",children:"Ignorar todas"})]})]}),l.jsx("div",{className:"p-2 space-y-1 max-h-48 overflow-y-auto",children:L.categories.map(P=>l.jsxs("div",{className:"flex items-center gap-2 px-2 py-1 rounded hover:bg-dark-700 group",children:[l.jsx("span",{className:"text-xs flex-1 truncate",children:P.name}),l.jsx("span",{className:`text-[10px] px-1 py-0.5 rounded border shrink-0 ${pg[P.type]}`,children:fg[P.type]}),l.jsx("button",{onClick:()=>O(L.provider_id,P.id,P.type),className:"opacity-0 group-hover:opacity-100 text-gray-600 hover:text-red-400 transition-opacity shrink-0",title:"Descartar",children:l.jsx(Ln,{size:12})})]},`${P.id}_${P.type}`))}),l.jsx("div",{className:"px-3 py-2 border-t border-dark-700",children:l.jsxs("button",{onClick:()=>{i(!1),s("/providers")},className:"text-xs text-primary-400 hover:text-primary-300 flex items-center gap-1",children:["Ir a Proveedores para sincronizar ",l.jsx(No,{size:11})]})})]},L.provider_id))})]})]})]}),l.jsx("nav",{className:"flex-1 p-3 space-y-1",children:dg.map(({to:L,icon:P,label:N})=>l.jsxs(th,{to:L,className:({isActive:A})=>Mt("flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-colors",A?"bg-primary-500/20 text-primary-400":"text-gray-400 hover:bg-dark-700 hover:text-gray-100"),children:[l.jsx(P,{size:17}),N]},L))}),l.jsxs("button",{onClick:j,className:"flex items-center gap-3 p-4 text-sm text-gray-500 hover:text-red-400 border-t border-dark-700 transition-colors",children:[l.jsx(mh,{size:16})," Cerrar sesión"]})]}),l.jsx("main",{className:"flex-1 overflow-auto bg-dark-900",children:l.jsx($0,{})})]})}function hg(s){return s<1024?s+" B":s<1048576?(s/1024).toFixed(1)+" KB":s<1073741824?(s/1048576).toFixed(1)+" MB":(s/1073741824).toFixed(2)+" GB"}function mo(s){return s<=0?"—":s<1024?s.toFixed(0)+" B/s":s<1048576?(s/1024).toFixed(0)+" KB/s":(s/1048576).toFixed(1)+" MB/s"}function xg(s){const a=Math.floor(Date.now()/1e3-s),i=Math.floor(a/3600),c=Math.floor(a%3600/60),d=a%60;return i>0?`${i}h ${c}m`:c>0?`${c}m ${d}s`:`${d}s`}function gg(s){if(!s.width||!s.height)return null;const a=s.width>=3840?"4K":s.width>=1920?"FHD":s.width>=1280?"HD":s.width>=720?"SD":"LD";return`${s.width}×${s.height} (${a})`}function yg({info:s}){if(!s||Object.keys(s).length===0)return l.jsx("span",{className:"text-gray-600 text-xs italic",children:"Detectando..."});const a=gg(s),i=s.fps?`${s.fps} fps`:null,c=s.video_codec?s.video_codec.toUpperCase():null,d=s.audio_codec?s.audio_codec.toUpperCase():null,f=s.bitrate_bps?`${(s.bitrate_bps/1e6).toFixed(1)} Mb/s`:null;return l.jsxs("div",{className:"space-y-0.5",children:[a&&l.jsxs("div",{className:"text-gray-200 font-mono text-xs",children:[a,i?` · ${i}`:""]}),l.jsxs("div",{className:"flex gap-1 flex-wrap",children:[c&&l.jsx("span",{className:"bg-blue-900/40 text-blue-300 text-[10px] px-1.5 py-0.5 rounded border border-blue-800",children:c}),d&&l.jsxs("span",{className:"bg-purple-900/40 text-purple-300 text-[10px] px-1.5 py-0.5 rounded border border-purple-800",children:[d,s.audio_channels?` ${s.audio_channels}ch`:""]}),f&&l.jsx("span",{className:"text-gray-500 text-[10px]",children:f})]})]})}function vg({status:s,reconnectCount:a}){return!s||s==="ok"?a&&a>0?l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] px-1.5 py-0.5 rounded bg-yellow-900/40 text-yellow-300 border border-yellow-800",title:`${a} reconexión(es)`,children:[l.jsx(Ge,{size:9})," ",a]}):l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] text-green-500",children:[l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse inline-block"})," OK"]}):s==="connecting"?l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] text-gray-400",children:[l.jsx(Ge,{size:9,className:"animate-spin"})," Conectando"]}):s==="reconnecting"?l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] text-orange-400",children:[l.jsx(Ge,{size:9,className:"animate-spin"})," Reconectando ",a?`(×${a})`:""]}):l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] text-red-400",children:[l.jsx(Zn,{size:9})," ",s]})}function wg({health:s,desyncs:a,corrections:i}){const c=i!=null&&i>0,d=a!=null&&a>0,f=s==="error"?l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] px-1.5 py-0.5 rounded bg-red-900/40 text-red-300 border border-red-800",children:[l.jsx(Zn,{size:9})," A/V error"]}):s==="warning"?l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] px-1.5 py-0.5 rounded bg-yellow-900/40 text-yellow-300 border border-yellow-800",children:[l.jsx(vf,{size:9})," A/V aviso"]}):l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] text-emerald-500",children:[l.jsx(yh,{size:9})," A/V ok"]});return l.jsxs("div",{className:"flex flex-wrap items-center gap-1 mt-1",children:[f,c&&l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] px-1.5 py-0.5 rounded bg-violet-900/40 text-violet-300 border border-violet-800",title:"Correcciones automáticas del monitor de salud",children:[l.jsx(Ge,{size:9})," ×",i]}),d&&l.jsxs("span",{className:"text-[10px] text-gray-600 tabular-nums",title:"Eventos A/V en stderr de ffmpeg (informativos)",children:[a," ev."]})]})}function kg({pct:s,serverSecs:a,serverCapacity:i}){const c=s??0,d=c>=70?"bg-red-500":c>=40?"bg-yellow-400":"bg-emerald-500",f=c>=70?"text-red-400":c>=40?"text-yellow-400":"text-emerald-500",m=a??0,h=((i??0)/1048576).toFixed(0),x=m>.5?`${m.toFixed(1)}s`:"ok",y=m>10?"text-yellow-400":"text-emerald-500",j=`Buffer servidor: ${m>0?m.toFixed(1)+"s de cobertura":"0 — normal en reposo"}. Capacidad máx: ${h} MB. El buffer se activa durante reconexiones del proveedor.`;return l.jsxs("div",{className:"mt-1.5 space-y-0.5",children:[l.jsxs("div",{className:"flex items-center justify-between",title:`Cola cliente: ${c.toFixed(0)}% — 0%=consume sin retraso, 100%=cliente lento`,children:[l.jsx("span",{className:"text-[10px] text-gray-500",children:"Cola cliente"}),l.jsxs("span",{className:`text-[10px] font-mono tabular-nums ${f}`,children:[c.toFixed(0),"%"]})]}),l.jsx("div",{className:"w-full h-1.5 rounded-full bg-dark-700 overflow-hidden",children:l.jsx("div",{className:`h-full rounded-full transition-all duration-700 ${d}`,style:{width:`${Math.min(c,100)}%`}})}),l.jsxs("div",{className:"flex items-center justify-between pt-0.5",title:j,children:[l.jsxs("span",{className:"text-[10px] text-gray-500",children:["Reserva (",h," MB)"]}),l.jsx("span",{className:`text-[10px] font-mono tabular-nums ${y}`,children:x})]})]})}const jg={live:l.jsx(Tr,{size:12,className:"text-blue-400"}),movie:l.jsx(Gn,{size:12,className:"text-purple-400"}),series:l.jsx(yf,{size:12,className:"text-green-400"})},Ng={live:"Directo",movie:"Película",series:"Serie"},Sg={live:"bg-blue-900/30 border-blue-800 text-blue-300",movie:"bg-purple-900/30 border-purple-800 text-purple-300",series:"bg-green-900/30 border-green-800 text-green-300"};function bg(){const[s,a]=v.useState([]),[i,c]=v.useState([]),[d,f]=v.useState(!1),[m,h]=v.useState(null),[x,y]=v.useState(null),j=v.useRef(null);v.useEffect(()=>{const ae=`${window.location.protocol==="https:"?"wss":"ws"}://${window.location.host}/api/admin/monitoring/ws`,de=new WebSocket(ae);return j.current=de,de.onopen=()=>f(!0),de.onclose=()=>f(!1),de.onmessage=Y=>{const je=JSON.parse(Y.data);(je.type==="state"||je.type==="update")&&a(je.data)},()=>de.close()},[]),v.useEffect(()=>{X.get("/monitoring/slots").then(z=>c(z.data)).catch(()=>{})},[s]);async function _(z,ae){var de,Y;if(confirm(`¿Cortar la conexión de "${ae}"?`)){h(z),y(null);try{await X.post("/monitoring/kill",{client_id:z})}catch(je){const Te=(Y=(de=je==null?void 0:je.response)==null?void 0:de.data)==null?void 0:Y.detail;y(Te||"Error al cortar la conexión"),setTimeout(()=>y(null),4e3)}finally{h(null)}}}const O=s.reduce((z,ae)=>z+ae.client_count,0),B=i.filter(z=>z.status==="busy").length,L=s.reduce((z,ae)=>z+(ae.bps_down||0),0),P=s.reduce((z,ae)=>z+(ae.ffmpeg_cpu_pct??0),0),N=s.some(z=>z.status==="reconnecting"),A=s.filter(z=>!z.av_health||z.av_health==="ok").length,M=s.filter(z=>z.av_health==="warning").length,K=s.filter(z=>z.av_health==="error").length,Q=s.reduce((z,ae)=>z+(ae.corrections??0),0),me=K>0?"text-red-400":M>0?"text-yellow-400":"text-emerald-400",fe=s.length===0?"—":K>0?`${K} error${K>1?"es":""}`:M>0?`${M} aviso${M>1?"s":""}`:`${A} ok`;return l.jsxs("div",{className:"p-6 space-y-6",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h1",{className:"text-xl font-bold",children:"Dashboard"}),l.jsxs("div",{className:"flex items-center gap-3",children:[N&&l.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-orange-400 bg-orange-900/30 border border-orange-800 px-2 py-1 rounded-lg",children:[l.jsx(Ge,{size:11,className:"animate-spin"}),"Reconectando stream(s)..."]}),K>0&&l.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-red-400 bg-red-900/30 border border-red-800 px-2 py-1 rounded-lg",children:[l.jsx(Zn,{size:11}),K," stream",K>1?"s":""," con error A/V"]}),l.jsxs("div",{className:`flex items-center gap-2 text-xs ${d?"text-green-400":"text-red-400"}`,children:[l.jsx("span",{className:`w-2 h-2 rounded-full ${d?"bg-green-400 animate-pulse":"bg-red-400"}`}),d?"Conectado en tiempo real":"Desconectado"]})]})]}),x&&l.jsx("div",{className:"bg-red-900/40 border border-red-700 rounded-lg px-4 py-2 text-sm text-red-300",children:x}),l.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-6 gap-4",children:[l.jsx(Pr,{icon:l.jsx(oh,{size:20,className:"text-blue-400"}),label:"Streams activos",value:s.length}),l.jsx(Pr,{icon:l.jsx(aa,{size:20,className:"text-green-400"}),label:"Usuarios conectados",value:O}),l.jsx(Pr,{icon:l.jsx(zo,{size:20,className:"text-orange-400"}),label:"Slots ocupados",value:`${B}/${i.length}`}),l.jsx(Pr,{icon:l.jsx(fa,{size:20,className:"text-purple-400"}),label:"↓ Total proveedor",value:mo(L)}),l.jsx(Pr,{icon:l.jsx(Dd,{size:20,className:P>80?"text-red-400":P>40?"text-yellow-400":"text-cyan-400"}),label:"ffmpeg CPU total",value:`${P.toFixed(2)}%`}),l.jsx(Pr,{icon:l.jsx(vf,{size:20,className:me}),label:`Salud A/V${Q>0?` · ${Q} corr.`:""}`,value:fe,valueClass:me})]}),i.length>0&&l.jsxs("div",{className:"bg-dark-800 rounded-xl border border-dark-700 p-4",children:[l.jsx("h2",{className:"text-sm font-semibold text-gray-400 mb-3",children:"Estado de Slots del Proveedor"}),l.jsx("div",{className:"flex flex-wrap gap-2",children:i.map(z=>l.jsxs("div",{className:`px-3 py-1.5 rounded-lg text-xs font-medium border ${z.status==="busy"?"bg-orange-900/30 border-orange-700 text-orange-300":"bg-green-900/30 border-green-800 text-green-400"}`,children:[l.jsx("span",{className:"font-bold",children:z.name}),l.jsx("span",{className:"ml-2 opacity-70",children:z.status==="busy"?`ch#${z.channel_id}`:"libre"})]},z.id))})]}),l.jsxs("div",{className:"bg-dark-800 rounded-xl border border-dark-700",children:[l.jsx("div",{className:"p-4 border-b border-dark-700",children:l.jsx("h2",{className:"text-sm font-semibold text-gray-300",children:"Streams en Reproducción"})}),s.length===0?l.jsx("div",{className:"p-8 text-center text-gray-500 text-sm",children:"No hay streams activos"}):l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"text-left text-xs text-gray-500 border-b border-dark-700",children:[l.jsx("th",{className:"px-4 py-2",children:"Tipo"}),l.jsx("th",{className:"px-4 py-2",children:"Canal"}),l.jsx("th",{className:"px-4 py-2",children:"Proveedor"}),l.jsx("th",{className:"px-4 py-2",children:"Stream"}),l.jsx("th",{className:"px-4 py-2",children:"Estado"}),l.jsx("th",{className:"px-4 py-2",children:"Salud A/V"}),l.jsx("th",{className:"px-4 py-2",children:"Usuarios"}),l.jsx("th",{className:"px-4 py-2",children:"↓ / ↑"}),l.jsx("th",{className:"px-4 py-2",children:"Tiempo"}),l.jsx("th",{className:"px-4 py-2",children:"Datos"})]})}),l.jsx("tbody",{children:s.map((z,ae)=>l.jsxs("tr",{className:"border-b border-dark-700 hover:bg-dark-700/30 align-top",children:[l.jsx("td",{className:"px-4 py-2.5",children:l.jsxs("span",{className:`inline-flex items-center gap-1 text-xs px-2 py-0.5 rounded border ${Sg[z.stream_type]}`,children:[jg[z.stream_type],Ng[z.stream_type]]})}),l.jsxs("td",{className:"px-4 py-2.5",children:[l.jsx("span",{className:"font-medium text-gray-200 text-xs leading-tight block max-w-[160px] truncate",title:z.channel_name,children:z.channel_name}),l.jsxs("span",{className:"text-gray-600 text-xs",children:["#",z.channel_id]})]}),l.jsx("td",{className:"px-4 py-2.5",children:l.jsx("span",{className:"bg-orange-900/40 text-orange-300 text-xs px-2 py-0.5 rounded",children:z.provider_name||`#${z.provider_account_id}`})}),l.jsx("td",{className:"px-4 py-2.5 min-w-[160px]",children:z.stream_info?l.jsx(yg,{info:z.stream_info}):l.jsx("span",{className:"text-gray-600 text-xs italic",children:"—"})}),l.jsxs("td",{className:"px-4 py-2.5",children:[l.jsx(vg,{status:z.status,reconnectCount:z.reconnect_count}),z.ffmpeg_pid&&l.jsxs("div",{className:"mt-1.5 flex items-center gap-1.5",children:[l.jsxs("span",{className:"inline-flex items-center gap-1 bg-cyan-900/40 text-cyan-300 text-[10px] px-1.5 py-0.5 rounded border border-cyan-800 font-mono",children:[l.jsx(Dd,{size:9}),"ffmpeg"]}),z.ffmpeg_cpu_pct!==void 0&&l.jsxs("span",{className:`font-mono text-[10px] tabular-nums ${z.ffmpeg_cpu_pct>80?"text-red-400":z.ffmpeg_cpu_pct>40?"text-yellow-400":"text-gray-400"}`,children:[z.ffmpeg_cpu_pct.toFixed(2),"%"]})]})]}),l.jsxs("td",{className:"px-4 py-2.5 min-w-[140px]",children:[l.jsx(wg,{health:z.av_health,desyncs:z.av_desync_count,corrections:z.corrections}),l.jsx(kg,{pct:z.buffer_pct,serverSecs:z.buffer_server_secs,serverCapacity:z.buffer_capacity})]}),l.jsx("td",{className:"px-4 py-2.5",children:l.jsx("div",{className:"flex flex-col gap-1",children:z.clients.map(de=>l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx("span",{className:"text-gray-300 text-xs font-medium",children:de.username}),l.jsx("button",{onClick:()=>_(de.client_id,de.username),disabled:m===de.client_id,title:`Cortar conexión de ${de.username}`,className:"p-0.5 rounded hover:bg-red-900/40 text-gray-600 hover:text-red-400 transition-colors disabled:opacity-40 shrink-0",children:l.jsx(Ln,{size:11})})]},de.client_id))})}),l.jsxs("td",{className:"px-4 py-2.5 font-mono text-xs",children:[l.jsxs("div",{className:"text-cyan-400",children:["↓ ",mo(z.bps_down)]}),l.jsxs("div",{className:"text-green-400",children:["↑ ",mo(z.bps_up)]})]}),l.jsxs("td",{className:"px-4 py-2.5 text-gray-400 font-mono text-xs",children:[l.jsx(So,{size:11,className:"inline mr-1"}),xg(z.started_at)]}),l.jsx("td",{className:"px-4 py-2.5 text-gray-500 text-xs font-mono",children:hg(z.bytes_pumped)})]},ae))})]})})]})]})}function Pr({icon:s,label:a,value:i,valueClass:c}){return l.jsxs("div",{className:"bg-dark-800 border border-dark-700 rounded-xl p-4 flex items-center gap-4",children:[l.jsx("div",{className:"bg-dark-700 p-2.5 rounded-lg",children:s}),l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-gray-500",children:a}),l.jsx("p",{className:`text-2xl font-bold ${c??""}`,children:i})]})]})}function Cg(s){if(!s)return null;const a=new Date(s),i=Math.ceil((a.getTime()-Date.now())/864e5);return i<0?{label:"Expirado",cls:"text-red-400 bg-red-900/20 border border-red-800"}:i<=7?{label:`Caduca en ${i}d`,cls:"text-red-400 bg-red-900/20 border border-red-800"}:i<=30?{label:`Caduca en ${i}d`,cls:"text-yellow-400 bg-yellow-900/20 border border-yellow-800"}:{label:`Caduca: ${a.toLocaleDateString("es-ES")}`,cls:"text-green-400 bg-green-900/20 border border-green-800"}}const _g=[{key:"live",label:"Canales en directo"},{key:"movie",label:"Películas (VOD)"},{key:"series",label:"Series"}],Yd=[{value:0,label:"Desactivado"},{value:6,label:"Cada 6 horas"},{value:12,label:"Cada 12 horas"},{value:24,label:"Cada 24 horas"}],Xd={name:"",base_url:"",username:"",password:"",max_connections:1,auto_sync_hours:0};function Eg(){const[s,a]=v.useState([]),[i,c]=v.useState(Xd),[d,f]=v.useState(!1),[m,h]=v.useState(new Set),[x,y]=v.useState({}),[j,_]=v.useState({}),[O,B]=v.useState(null),[L,P]=v.useState({}),N=v.useRef({}),[A,M]=v.useState(null),[K,Q]=v.useState(!1),[me,fe]=v.useState({live:[],movie:[],series:[]}),[z,ae]=v.useState({live:new Set,movie:new Set,series:new Set}),[de,Y]=v.useState(""),[je,Te]=v.useState({}),[ze,Ee]=v.useState(null),[q,ge]=v.useState({name:"",base_url:"",username:"",password:"",max_connections:1,auto_sync_hours:0}),[D,U]=v.useState(null),[ee,G]=v.useState(!1),[b,I]=v.useState([]),[te,pe]=v.useState(new Set),[ye,Ne]=v.useState(""),[we,oe]=v.useState({}),[F,ne]=v.useState(new Set),[ke,Ce]=v.useState(null),[De,Le]=v.useState({url:"",priority:10,is_active:!0}),[Fr,Ur]=v.useState(new Set);async function wt(){const{data:w}=await X.get("/providers/");return a(w),w}v.useEffect(()=>(wt().then(async w=>{for(const $ of w)try{const{data:ue}=await X.get(`/providers/${$.id}/sync/status`);ue.status==="running"&&(h(Se=>new Set(Se).add($.id)),y(Se=>({...Se,[$.id]:ue.progress||"Sincronizando..."})),rr($.id))}catch{}}),()=>{Object.keys(N.current).forEach(w=>{N.current[+w]=!1})}),[]);function rr(w){N.current[w]=!0;const $=async()=>{if(N.current[w])try{const{data:ue}=await X.get(`/providers/${w}/sync/status`);y(Se=>({...Se,[w]:ue.progress||""})),_(Se=>({...Se,[w]:ue.stats||{}})),ue.status==="running"?setTimeout($,1500):(N.current[w]=!1,h(Se=>{const Ae=new Set(Se);return Ae.delete(w),Ae}),y(Se=>({...Se,[w]:ue.status==="done"?"✓ Sync completado":`Error: ${ue.progress}`})),wt())}catch{N.current[w]=!1,h(ue=>{const Se=new Set(ue);return Se.delete(w),Se})}};$()}async function Mr(w){w.preventDefault(),await X.post("/providers/",i),c(Xd),f(!1),wt()}async function On(w){confirm("¿Eliminar este proveedor y todos sus canales?")&&(await X.delete(`/providers/${w}`),wt())}async function an(w){B(w);try{const{data:$}=await X.post(`/providers/${w}/test`);P(ue=>({...ue,[w]:$.connected})),$.connected&&wt()}finally{B(null)}}function Ir(w){Ee(w),ge({name:w.name,base_url:w.base_url,username:w.username,password:"",max_connections:w.max_connections,auto_sync_hours:w.auto_sync_hours})}async function Fs(){var w,$;if(ze)try{await X.put(`/providers/${ze.id}`,q),Ee(null),wt()}catch(ue){alert("Error al guardar: "+((($=(w=ue.response)==null?void 0:w.data)==null?void 0:$.detail)||ue.message))}}async function Us(w){var $,ue,Se;M(w),Q(!0),Y(""),Te({});try{const[Ae,$e]=await Promise.all([X.get(`/providers/${w.id}/sync/categories`),X.get(`/providers/${w.id}/synced-category-ids`)]);fe(Ae.data);let lr=$e.data.live,qr=$e.data.movie,un=$e.data.series;if(w.last_sync_categories)try{const $t=JSON.parse(w.last_sync_categories);((($=$t.live)==null?void 0:$.length)??0)+(((ue=$t.movie)==null?void 0:ue.length)??0)+(((Se=$t.series)==null?void 0:Se.length)??0)>0&&(lr=$t.live??[],qr=$t.movie??[],un=$t.series??[])}catch{}ae({live:new Set(lr),movie:new Set(qr),series:new Set(un)})}catch{M(null)}finally{Q(!1)}}async function Ms(){if(!A)return;const w=A.id;M(null),h($=>new Set($).add(w)),y($=>({...$,[w]:"Iniciando..."}));try{await X.post(`/providers/${w}/sync`,{live_category_ids:Array.from(z.live),movie_category_ids:Array.from(z.movie),series_category_ids:Array.from(z.series)}),rr(w)}catch{h($=>{const ue=new Set($);return ue.delete(w),ue}),y($=>({...$,[w]:"Error al iniciar sync"}))}}function Is(w,$){ae(ue=>{const Se=new Set(ue[w]);return Se.has($)?Se.delete($):Se.add($),{...ue,[w]:Se}})}function $r(w,$){ae(ue=>({...ue,[w]:new Set($.map(Se=>Se.id))}))}function sr(w){ae($=>({...$,[w]:new Set}))}async function $s(w){U(w),G(!0),Ne(""),pe(new Set);try{const{data:$}=await X.get(`/providers/${w.id}/available-updates`);I($.new_categories||[])}catch{I([])}finally{G(!1)}}async function zn(w){try{const{data:$}=await X.get(`/providers/${w}/available-updates`);oe(ue=>({...ue,[w]:$.total||0}))}catch{}}v.useEffect(()=>{s.forEach(w=>{w.last_sync_at&&zn(w.id)})},[s.length]);async function An(){if(!D||te.size===0)return;const w=D.id,$=[],ue=[],Se=[];b.filter(Ae=>te.has(Ae.id+"_"+Ae.type)).forEach(Ae=>{Ae.type==="live"?$.push(Ae.id):Ae.type==="movie"?ue.push(Ae.id):Ae.type==="series"&&Se.push(Ae.id)}),U(null),h(Ae=>new Set(Ae).add(w)),y(Ae=>({...Ae,[w]:"Iniciando..."}));try{await X.post(`/providers/${w}/sync`,{live_category_ids:$.length>0?$:void 0,movie_category_ids:ue.length>0?ue:void 0,series_category_ids:Se.length>0?Se:void 0}),rr(w)}catch{h(Ae=>{const $e=new Set(Ae);return $e.delete(w),$e}),y(Ae=>({...Ae,[w]:"Error al iniciar sync"}))}}function va(w){ne($=>{const ue=new Set($);return ue.has(w)?ue.delete(w):ue.add(w),ue})}async function Bs(w){await X.post(`/providers/${w}/urls`,De),Ce(null),Le({url:"",priority:10,is_active:!0}),wt()}async function Vs(w,$){confirm("¿Eliminar esta URL de failover?")&&(await X.delete(`/providers/${w}/urls/${$}`),wt())}async function wa(w){Ur($=>new Set($).add(w));try{await X.post(`/providers/${w}/urls/check-all`),wt()}finally{Ur($=>{const ue=new Set($);return ue.delete(w),ue})}}function Br(w){return w.status==="ok"?l.jsxs("span",{className:"text-green-400 text-xs font-mono",children:["● ",w.response_ms!=null?`${w.response_ms}ms`:"OK"]}):w.status==="error"?l.jsx("span",{className:"text-red-400 text-xs font-mono",children:"● Error"}):w.status==="timeout"?l.jsx("span",{className:"text-yellow-400 text-xs font-mono",children:"● Timeout"}):l.jsx("span",{className:"text-gray-500 text-xs font-mono",children:"○ Desconocido"})}const on=Object.values(z).reduce((w,$)=>w+$.size,0),Vr=Object.values(me).reduce((w,$)=>w+$.length,0),Hr={live:"Directo",movie:"Película",series:"Serie"},Wr={live:"bg-blue-900/30 text-blue-300 border-blue-800",movie:"bg-purple-900/30 text-purple-300 border-purple-800",series:"bg-green-900/30 text-green-300 border-green-800"},Qt=b.filter(w=>!ye||w.name.toLowerCase().includes(ye.toLowerCase()));return l.jsxs("div",{className:"p-6 space-y-5",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h1",{className:"text-xl font-bold",children:"Proveedores IPTV"}),l.jsxs("button",{onClick:()=>f(w=>!w),className:"flex items-center gap-2 bg-primary-500 hover:bg-primary-600 px-4 py-2 rounded-lg text-sm font-medium transition-colors",children:[l.jsx(tr,{size:16})," Añadir proveedor"]})]}),d&&l.jsxs("form",{onSubmit:Mr,className:"bg-dark-800 border border-dark-700 rounded-xl p-5 space-y-3",children:[l.jsx("h3",{className:"font-semibold text-sm mb-2",children:"Nueva cuenta de proveedor"}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsx(Jn,{label:"Nombre",value:i.name,onChange:w=>c($=>({...$,name:w})),required:!0}),l.jsx(Jn,{label:"URL base (ej: http://provider.com:8080)",value:i.base_url,onChange:w=>c($=>({...$,base_url:w})),required:!0}),l.jsx(Jn,{label:"Usuario",value:i.username,onChange:w=>c($=>({...$,username:w})),required:!0}),l.jsx(Jn,{label:"Contraseña",value:i.password,onChange:w=>c($=>({...$,password:w})),required:!0}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Conexiones máx."}),l.jsx("input",{type:"number",min:1,max:100,value:i.max_connections,onChange:w=>c($=>({...$,max_connections:+w.target.value})),className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Auto-sincronización"}),l.jsx("select",{value:i.auto_sync_hours,onChange:w=>c($=>({...$,auto_sync_hours:+w.target.value})),className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm",children:Yd.map(w=>l.jsx("option",{value:w.value,children:w.label},w.value))})]})]}),l.jsxs("div",{className:"flex gap-2 pt-1",children:[l.jsx("button",{type:"submit",className:"bg-primary-500 hover:bg-primary-600 px-4 py-2 rounded-lg text-sm font-medium",children:"Guardar"}),l.jsx("button",{type:"button",onClick:()=>f(!1),className:"bg-dark-700 hover:bg-dark-600 px-4 py-2 rounded-lg text-sm",children:"Cancelar"})]})]}),A&&l.jsx("div",{className:"fixed inset-0 bg-black/70 flex items-center justify-center z-50 p-4",children:l.jsxs("div",{className:"bg-dark-800 rounded-xl border border-dark-700 w-full max-w-2xl flex flex-col max-h-[90vh]",children:[l.jsxs("div",{className:"p-4 border-b border-dark-700 flex items-center justify-between shrink-0",children:[l.jsxs("div",{children:[l.jsxs("h2",{className:"font-semibold",children:["Seleccionar categorías — ",l.jsx("span",{className:"text-primary-400",children:A.name})]}),!K&&l.jsxs("p",{className:"text-xs text-gray-500 mt-0.5",children:[on," de ",Vr," categorías seleccionadas"]})]}),l.jsx("button",{onClick:()=>M(null),className:"text-gray-500 hover:text-white",children:"✕"})]}),K?l.jsx("div",{className:"flex-1 flex items-center justify-center p-12",children:l.jsxs("div",{className:"text-center text-gray-400",children:[l.jsx(Ge,{size:24,className:"animate-spin mx-auto mb-3"}),l.jsx("p",{className:"text-sm",children:"Obteniendo categorías del proveedor..."})]})}):l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"p-3 border-b border-dark-700 shrink-0",children:l.jsxs("div",{className:"relative",children:[l.jsx(Kt,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-500"}),l.jsx("input",{value:de,onChange:w=>Y(w.target.value),placeholder:"Buscar categoría...",className:"w-full bg-dark-700 border border-dark-600 rounded-lg pl-9 pr-3 py-2 text-sm focus:outline-none focus:border-primary-500"})]})}),l.jsx("div",{className:"overflow-y-auto flex-1 p-3 space-y-2",children:_g.map(({key:w,label:$})=>{const ue=me[w].filter($e=>!de||$e.name.toLowerCase().includes(de.toLowerCase()));if(!ue.length&&!de)return null;const Se=ue.filter($e=>z[w].has($e.id)).length,Ae=je[w];return l.jsxs("div",{className:"bg-dark-900/50 rounded-lg border border-dark-700 overflow-hidden",children:[l.jsxs("div",{className:"flex items-center justify-between px-3 py-2 cursor-pointer hover:bg-dark-700/50 select-none",onClick:()=>Te($e=>({...$e,[w]:!$e[w]})),children:[l.jsxs("div",{className:"flex items-center gap-2",children:[Ae?l.jsx(No,{size:14,className:"text-gray-500"}):l.jsx(jo,{size:14,className:"text-gray-500"}),l.jsx("span",{className:"text-sm font-medium",children:$}),l.jsxs("span",{className:"text-xs text-gray-500",children:["(",Se,"/",ue.length," sel.)"]})]}),l.jsxs("div",{className:"flex gap-2",onClick:$e=>$e.stopPropagation(),children:[l.jsx("button",{onClick:()=>$r(w,ue),className:"text-xs text-primary-400 hover:text-primary-300 px-2 py-0.5 rounded hover:bg-dark-600",children:"Todo"}),l.jsx("button",{onClick:()=>sr(w),className:"text-xs text-gray-500 hover:text-gray-300 px-2 py-0.5 rounded hover:bg-dark-600",children:"Nada"})]})]}),!Ae&&l.jsx("div",{className:"grid grid-cols-2 gap-0.5 p-2 border-t border-dark-700 max-h-64 overflow-y-auto",children:ue.length===0?l.jsx("div",{className:"col-span-2 text-center text-gray-500 text-xs py-3",children:"Sin resultados"}):ue.map($e=>l.jsxs("label",{className:"flex items-center gap-2 px-2 py-1 rounded hover:bg-dark-700 cursor-pointer text-sm",children:[l.jsx("input",{type:"checkbox",checked:z[w].has($e.id),onChange:()=>Is(w,$e.id),className:"shrink-0"}),l.jsx("span",{className:"truncate text-xs",children:$e.name})]},$e.id))})]},w)})}),l.jsxs("div",{className:"p-4 border-t border-dark-700 flex gap-2 justify-end shrink-0",children:[l.jsx("button",{onClick:()=>M(null),className:"bg-dark-700 hover:bg-dark-600 px-4 py-2 rounded-lg text-sm",children:"Cancelar"}),l.jsxs("button",{onClick:Ms,disabled:on===0,className:"bg-primary-500 hover:bg-primary-600 disabled:opacity-40 px-4 py-2 rounded-lg text-sm font-medium flex items-center gap-2",children:[l.jsx(Ge,{size:14}),"Importar ",on," ",on===1?"categoría":"categorías"]})]})]})]})}),D&&l.jsx("div",{className:"fixed inset-0 bg-black/70 flex items-center justify-center z-50 p-4",children:l.jsxs("div",{className:"bg-dark-800 rounded-xl border border-dark-700 w-full max-w-lg flex flex-col max-h-[80vh]",children:[l.jsxs("div",{className:"p-4 border-b border-dark-700 flex items-center justify-between shrink-0",children:[l.jsxs("div",{children:[l.jsxs("h2",{className:"font-semibold",children:["Novedades — ",l.jsx("span",{className:"text-primary-400",children:D.name})]}),!ee&&l.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:b.length===0?"No hay categorías nuevas":`${b.length} categorías nuevas sin sincronizar`})]}),l.jsx("button",{onClick:()=>U(null),className:"text-gray-500 hover:text-white",children:"✕"})]}),ee?l.jsx("div",{className:"flex-1 flex items-center justify-center p-10",children:l.jsx(Ge,{size:22,className:"animate-spin text-gray-400"})}):b.length===0?l.jsx("div",{className:"flex-1 flex items-center justify-center p-10 text-gray-500 text-sm",children:"Todo está actualizado ✓"}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"p-3 border-b border-dark-700 shrink-0",children:[l.jsxs("div",{className:"relative",children:[l.jsx(Kt,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-500"}),l.jsx("input",{value:ye,onChange:w=>Ne(w.target.value),placeholder:"Buscar...",className:"w-full bg-dark-700 border border-dark-600 rounded-lg pl-9 pr-3 py-2 text-sm focus:outline-none focus:border-primary-500"})]}),l.jsxs("div",{className:"flex gap-2 mt-2",children:[l.jsx("button",{onClick:()=>pe(new Set(Qt.map(w=>w.id+"_"+w.type))),className:"text-xs text-primary-400 hover:text-primary-300 px-2 py-0.5 rounded hover:bg-dark-600",children:"Seleccionar todo"}),l.jsx("button",{onClick:()=>pe(new Set),className:"text-xs text-gray-500 hover:text-gray-300 px-2 py-0.5 rounded hover:bg-dark-600",children:"Ninguna"}),l.jsxs("span",{className:"text-xs text-gray-600 ml-auto self-center",children:[te.size," seleccionadas"]})]})]}),l.jsx("div",{className:"overflow-y-auto flex-1 p-3 space-y-1",children:Qt.map(w=>{const $=w.id+"_"+w.type;return l.jsxs("label",{className:"flex items-center gap-3 px-3 py-2 rounded-lg hover:bg-dark-700 cursor-pointer",children:[l.jsx("input",{type:"checkbox",checked:te.has($),onChange:()=>{pe(ue=>{const Se=new Set(ue);return Se.has($)?Se.delete($):Se.add($),Se})},className:"shrink-0"}),l.jsx("span",{className:"text-sm flex-1 truncate",children:w.name}),l.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded border ${Wr[w.type]}`,children:Hr[w.type]})]},$)})}),l.jsxs("div",{className:"p-4 border-t border-dark-700 flex gap-2 justify-end shrink-0",children:[l.jsx("button",{onClick:()=>U(null),className:"bg-dark-700 hover:bg-dark-600 px-4 py-2 rounded-lg text-sm",children:"Cancelar"}),l.jsxs("button",{onClick:An,disabled:te.size===0,className:"bg-primary-500 hover:bg-primary-600 disabled:opacity-40 px-4 py-2 rounded-lg text-sm font-medium flex items-center gap-2",children:[l.jsx(Ge,{size:14}),"Importar ",te.size," ",te.size===1?"categoría":"categorías"]})]})]})]})}),ze&&l.jsx("div",{className:"fixed inset-0 bg-black/70 flex items-center justify-center z-50 p-4",children:l.jsxs("div",{className:"bg-dark-800 rounded-xl border border-dark-700 w-full max-w-lg",children:[l.jsxs("div",{className:"p-4 border-b border-dark-700 flex items-center justify-between",children:[l.jsxs("h2",{className:"font-semibold",children:["Editar proveedor — ",l.jsx("span",{className:"text-primary-400",children:ze.name})]}),l.jsx("button",{onClick:()=>Ee(null),className:"text-gray-500 hover:text-white",children:"✕"})]}),l.jsx("div",{className:"p-4 space-y-3",children:l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsx(Jn,{label:"Nombre",value:q.name,onChange:w=>ge($=>({...$,name:w})),required:!0}),l.jsx(Jn,{label:"URL base",value:q.base_url,onChange:w=>ge($=>({...$,base_url:w})),required:!0}),l.jsx(Jn,{label:"Usuario",value:q.username,onChange:w=>ge($=>({...$,username:w})),required:!0}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Contraseña (vacío = no cambiar)"}),l.jsx("input",{type:"password",value:q.password,onChange:w=>ge($=>({...$,password:w.target.value})),placeholder:"••••••••",className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm focus:outline-none focus:border-primary-500"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Conexiones máx."}),l.jsx("input",{type:"number",min:1,max:100,value:q.max_connections,onChange:w=>ge($=>({...$,max_connections:+w.target.value})),className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Auto-sincronización"}),l.jsx("select",{value:q.auto_sync_hours,onChange:w=>ge($=>({...$,auto_sync_hours:+w.target.value})),className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm",children:Yd.map(w=>l.jsx("option",{value:w.value,children:w.label},w.value))})]})]})}),l.jsxs("div",{className:"p-4 border-t border-dark-700 flex gap-2 justify-end",children:[l.jsx("button",{onClick:()=>Ee(null),className:"bg-dark-700 hover:bg-dark-600 px-4 py-2 rounded-lg text-sm",children:"Cancelar"}),l.jsx("button",{onClick:Fs,className:"bg-primary-500 hover:bg-primary-600 px-4 py-2 rounded-lg text-sm font-medium",children:"Guardar"})]})]})}),l.jsxs("div",{className:"space-y-3",children:[s.map(w=>l.jsxs("div",{className:"bg-dark-800 border border-dark-700 rounded-xl overflow-hidden",children:[l.jsxs("div",{className:"p-4 flex items-center justify-between gap-4",children:[l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"font-semibold",children:w.name}),w.auto_sync_hours>0&&l.jsxs("span",{className:"text-xs bg-dark-700 text-gray-400 px-1.5 py-0.5 rounded",children:["Auto ",w.auto_sync_hours,"h"]})]}),l.jsxs("div",{className:"flex items-center gap-2 flex-wrap mt-0.5",children:[l.jsxs("span",{className:"text-xs text-gray-500 truncate",children:[w.base_url," • ",w.username," • ",w.max_connections," conex."]}),(()=>{const $=Cg(w.expiry_date);return $?l.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${$.cls}`,children:$.label}):null})()]}),w.last_sync_at&&l.jsxs("div",{className:"text-xs text-gray-600 mt-0.5",children:["Último sync: ",new Date(w.last_sync_at).toLocaleString("es-ES")]}),L[w.id]!==void 0&&l.jsx("div",{className:`text-xs mt-0.5 ${L[w.id]?"text-green-400":"text-red-400"}`,children:L[w.id]?"✓ Conexión OK":"✗ Sin conexión"}),x[w.id]&&l.jsxs("div",{className:`text-xs mt-1 ${x[w.id].startsWith("✓")?"text-green-400":x[w.id].startsWith("Error")?"text-red-400":"text-blue-400"}`,children:[m.has(w.id)&&l.jsx(Ge,{size:10,className:"inline animate-spin mr-1"}),x[w.id],j[w.id]&&m.has(w.id)&&l.jsxs("span",{className:"text-gray-500 ml-1",children:["(",Object.entries(j[w.id]).filter(([,$])=>$>0).map(([$,ue])=>`${ue} ${$}`).join(", "),")"]})]})]}),l.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[l.jsx("button",{onClick:()=>an(w.id),disabled:O===w.id,title:"Probar conexión",className:"p-2 rounded-lg bg-dark-700 hover:bg-dark-600 text-gray-400 hover:text-blue-400 transition-colors",children:O===w.id?l.jsx(Ge,{size:15,className:"animate-spin"}):l.jsx(fa,{size:15})}),w.last_sync_at&&l.jsxs("button",{onClick:()=>$s(w),title:"Ver novedades del proveedor",className:"relative p-2 rounded-lg bg-dark-700 hover:bg-dark-600 text-gray-400 hover:text-yellow-400 transition-colors",children:[l.jsx(gf,{size:15}),(we[w.id]??0)>0&&l.jsx("span",{className:"absolute -top-1 -right-1 bg-yellow-500 text-black text-[10px] font-bold rounded-full w-4 h-4 flex items-center justify-center",children:we[w.id]>9?"9+":we[w.id]})]}),l.jsxs("button",{onClick:()=>Us(w),disabled:m.has(w.id),title:"Sincronizar canales",className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-dark-700 hover:bg-dark-600 text-xs text-gray-300 hover:text-white transition-colors disabled:opacity-50",children:[l.jsx(Ge,{size:13,className:m.has(w.id)?"animate-spin":""}),m.has(w.id)?"Sincronizando...":"Sync canales"]}),l.jsx("button",{onClick:()=>Ir(w),title:"Editar proveedor",className:"p-2 rounded-lg bg-dark-700 hover:bg-dark-600 text-gray-400 hover:text-yellow-400 transition-colors",children:l.jsx(kf,{size:15})}),l.jsx("button",{onClick:()=>va(w.id),title:"Gestionar dominios de failover",className:`p-2 rounded-lg bg-dark-700 hover:bg-dark-600 transition-colors ${F.has(w.id)?"text-primary-400":"text-gray-400 hover:text-primary-400"}`,children:F.has(w.id)?l.jsx(jo,{size:15}):l.jsx(No,{size:15})}),l.jsx("button",{onClick:()=>On(w.id),className:"p-2 rounded-lg bg-dark-700 hover:bg-red-900/40 text-gray-500 hover:text-red-400 transition-colors",children:l.jsx(rn,{size:15})})]})]}),F.has(w.id)&&l.jsxs("div",{className:"border-t border-dark-700 bg-dark-900/40 p-4 space-y-2",children:[l.jsxs("div",{className:"flex items-center justify-between mb-2",children:[l.jsx("span",{className:"text-xs font-semibold text-gray-400 uppercase tracking-wider",children:"Dominios (failover)"}),l.jsxs("div",{className:"flex gap-2",children:[l.jsxs("button",{onClick:()=>wa(w.id),disabled:Fr.has(w.id),className:"flex items-center gap-1 text-xs px-2 py-1 rounded bg-dark-700 hover:bg-dark-600 text-gray-400 hover:text-blue-400 transition-colors disabled:opacity-50",children:[l.jsx(Ge,{size:11,className:Fr.has(w.id)?"animate-spin":""}),"Verificar todos"]}),l.jsxs("button",{onClick:()=>{Ce(w.id),Le({url:"",priority:10,is_active:!0})},className:"flex items-center gap-1 text-xs px-2 py-1 rounded bg-dark-700 hover:bg-dark-600 text-gray-400 hover:text-green-400 transition-colors",children:[l.jsx(tr,{size:11}),"Añadir URL"]})]})]}),(w.urls??[]).length===0&&ke!==w.id&&l.jsx("div",{className:"text-xs text-gray-600 text-center py-2",children:"No hay URLs adicionales configuradas"}),(w.urls??[]).map($=>l.jsxs("div",{className:"flex items-center gap-3 bg-dark-800 rounded-lg px-3 py-2",children:[l.jsx("div",{className:"flex-1 min-w-0",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-xs font-mono text-gray-300 truncate",children:$.url}),$.priority===0&&l.jsx("span",{className:"text-[10px] bg-primary-900/40 text-primary-400 px-1 rounded",children:"primaria"}),!$.is_active&&l.jsx("span",{className:"text-[10px] bg-dark-600 text-gray-500 px-1 rounded",children:"inactiva"})]})}),l.jsx("div",{className:"shrink-0",children:Br($)}),l.jsx("button",{onClick:()=>Vs(w.id,$.id),className:"p-1 rounded text-gray-600 hover:text-red-400 transition-colors",children:l.jsx(rn,{size:12})})]},$.id)),ke===w.id&&l.jsxs("div",{className:"bg-dark-800 rounded-lg p-3 space-y-2 border border-dark-600",children:[l.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[l.jsxs("div",{className:"col-span-2",children:[l.jsx("label",{className:"block text-[10px] text-gray-500 mb-1",children:"URL base (ej: http://mirror.com:8080)"}),l.jsx("input",{value:De.url,onChange:$=>Le(ue=>({...ue,url:$.target.value})),placeholder:"http://...",className:"w-full bg-dark-700 border border-dark-600 rounded px-2 py-1.5 text-xs focus:outline-none focus:border-primary-500"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-[10px] text-gray-500 mb-1",children:"Prioridad (0=más alta)"}),l.jsx("input",{type:"number",min:0,max:999,value:De.priority,onChange:$=>Le(ue=>({...ue,priority:+$.target.value})),className:"w-full bg-dark-700 border border-dark-600 rounded px-2 py-1.5 text-xs"})]})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("label",{className:"flex items-center gap-1.5 text-xs text-gray-400 cursor-pointer",children:[l.jsx("input",{type:"checkbox",checked:De.is_active,onChange:$=>Le(ue=>({...ue,is_active:$.target.checked}))}),"Activa"]}),l.jsxs("div",{className:"flex gap-2 ml-auto",children:[l.jsx("button",{onClick:()=>Ce(null),className:"text-xs px-2 py-1 rounded bg-dark-700 hover:bg-dark-600 text-gray-400",children:"Cancelar"}),l.jsx("button",{onClick:()=>Bs(w.id),disabled:!De.url,className:"text-xs px-2 py-1 rounded bg-primary-500 hover:bg-primary-600 disabled:opacity-40 font-medium",children:"Guardar"})]})]})]})]})]},w.id)),s.length===0&&l.jsx("div",{className:"bg-dark-800 border border-dark-700 border-dashed rounded-xl p-10 text-center text-gray-500 text-sm",children:"No hay proveedores. Añade uno para empezar."})]})]})}function Jn({label:s,value:a,onChange:i,required:c}){return l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:s}),l.jsx("input",{value:a,onChange:d=>i(d.target.value),required:c,className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm focus:outline-none focus:border-primary-500"})]})}const Pg={live:"Canales en directo",movie:"Películas",series:"Series"};function Rg(){const[s,a]=v.useState([]),[i,c]=v.useState(!1),[d,f]=v.useState(null),[m,h]=v.useState(null),[x,y]=v.useState(null),[j,_]=v.useState([]),[O,B]=v.useState(new Set),[L,P]=v.useState([]),[N,A]=v.useState(new Set),[M,K]=v.useState(""),[Q,me]=v.useState([]),[fe,z]=v.useState([]),[ae,de]=v.useState({username:"",password:"",max_connections:1,expiry_date:"",is_active:!0,is_priority:!1});async function Y(){const{data:F}=await X.get("/users/");a(F)}v.useEffect(()=>{Y()},[]);async function je(F){F.preventDefault();const ne={...ae,expiry_date:ae.expiry_date||null};d?await X.put(`/users/${d.id}`,ne):await X.post("/users/",ne),Te(),Y()}function Te(){de({username:"",password:"",max_connections:1,expiry_date:"",is_active:!0,is_priority:!1}),c(!1),f(null)}function ze(F){var ne;de({username:F.username,password:"",max_connections:F.max_connections,expiry_date:((ne=F.expiry_date)==null?void 0:ne.split("T")[0])||"",is_active:F.is_active,is_priority:F.is_priority}),f(F),c(!0)}async function Ee(F){confirm("¿Eliminar usuario?")&&(await X.delete(`/users/${F}`),Y())}async function q(F){await X.put(`/users/${F.id}`,{is_priority:!F.is_priority}),Y()}async function ge(F){h(F),K("");const[ne,ke,Ce,De]=await Promise.all([X.get("/catalogs/grouped").then(Le=>Le.data),X.get(`/users/${F.id}/catalog`).then(Le=>Le.data),X.get("/custom-categories/").then(Le=>Le.data),X.get(`/users/${F.id}/custom-catalog`).then(Le=>Le.data)]);_(ne),B(new Set(ke.map(Le=>Le.category_id))),P(Ce),A(new Set(De))}function D(F){return F.category_ids.some(ne=>O.has(ne))}function U(F,ne){B(ke=>{const Ce=new Set(ke);return ne?F.category_ids.forEach(De=>Ce.add(De)):F.category_ids.forEach(De=>Ce.delete(De)),Ce})}function ee(F){B(ke=>{const Ce=new Set(ke);return F.forEach(De=>De.category_ids.forEach(Le=>Ce.add(Le))),Ce});const ne=L.filter(ke=>!M||ke.name.toLowerCase().includes(M.toLowerCase()));A(ke=>{const Ce=new Set(ke);return ne.forEach(De=>Ce.add(De.id)),Ce})}function G(F){B(ke=>{const Ce=new Set(ke);return F.forEach(De=>De.category_ids.forEach(Le=>Ce.delete(Le))),Ce});const ne=L.filter(ke=>!M||ke.name.toLowerCase().includes(M.toLowerCase()));A(ke=>{const Ce=new Set(ke);return ne.forEach(De=>Ce.delete(De.id)),Ce})}async function b(){m&&(await Promise.all([X.post(`/users/${m.id}/catalog`,Array.from(O)),X.post(`/users/${m.id}/custom-catalog`,Array.from(N))]),h(null))}async function I(F){y(F);const[ne,ke]=await Promise.all([X.get("/providers/").then(Ce=>Ce.data),X.get(`/users/${F.id}/providers`).then(Ce=>Ce.data)]);me(ne),z(ke)}async function te(F){if(!x)return;await X.post(`/users/${x.id}/providers`,{provider_account_id:F,priority:fe.length});const{data:ne}=await X.get(`/users/${x.id}/providers`);z(ne)}async function pe(F){if(!x)return;await X.delete(`/users/${x.id}/providers/${F}`);const{data:ne}=await X.get(`/users/${x.id}/providers`);z(ne)}const ye=new Set(fe.map(F=>F.provider_account_id)),Ne=j.filter(F=>!M||F.name.toLowerCase().includes(M.toLowerCase())),we=L.filter(F=>!M||F.name.toLowerCase().includes(M.toLowerCase())),oe=j.filter(F=>D(F)).length+N.size;return l.jsxs("div",{className:"p-6 space-y-5",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h1",{className:"text-xl font-bold",children:"Usuarios"}),l.jsxs("button",{onClick:()=>c(F=>!F),className:"flex items-center gap-2 bg-primary-500 hover:bg-primary-600 px-4 py-2 rounded-lg text-sm font-medium transition-colors",children:[l.jsx(tr,{size:16})," Nuevo usuario"]})]}),i&&l.jsxs("form",{onSubmit:je,className:"bg-dark-800 border border-dark-700 rounded-xl p-5 space-y-3",children:[l.jsx("h3",{className:"font-semibold text-sm",children:d?"Editar usuario":"Nuevo usuario"}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Usuario"}),l.jsx("input",{value:ae.username,onChange:F=>de(ne=>({...ne,username:F.target.value})),required:!0,disabled:!!d,className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm"})]}),l.jsxs("div",{children:[l.jsxs("label",{className:"block text-xs text-gray-500 mb-1",children:["Contraseña ",d&&"(dejar vacío para no cambiar)"]}),l.jsx("input",{type:"password",value:ae.password,onChange:F=>de(ne=>({...ne,password:F.target.value})),required:!d,className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Max. conexiones simultáneas"}),l.jsx("input",{type:"number",min:1,value:ae.max_connections,onChange:F=>de(ne=>({...ne,max_connections:+F.target.value})),className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Fecha expiración"}),l.jsx("input",{type:"date",value:ae.expiry_date,onChange:F=>de(ne=>({...ne,expiry_date:F.target.value})),className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm"})]}),l.jsxs("div",{className:"flex items-center gap-4 col-span-2",children:[l.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[l.jsx("input",{type:"checkbox",checked:ae.is_active,onChange:F=>de(ne=>({...ne,is_active:F.target.checked}))}),"Activo"]}),l.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[l.jsx("input",{type:"checkbox",checked:ae.is_priority,onChange:F=>de(ne=>({...ne,is_priority:F.target.checked}))}),l.jsx(Pn,{size:13,className:"text-yellow-400"}),"Usuario prioritario"]})]})]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx("button",{type:"submit",className:"bg-primary-500 hover:bg-primary-600 px-4 py-2 rounded-lg text-sm font-medium",children:"Guardar"}),l.jsx("button",{type:"button",onClick:Te,className:"bg-dark-700 hover:bg-dark-600 px-4 py-2 rounded-lg text-sm",children:"Cancelar"})]})]}),m&&l.jsx("div",{className:"fixed inset-0 bg-black/70 flex items-center justify-center z-50 p-4",children:l.jsxs("div",{className:"bg-dark-800 rounded-xl border border-dark-700 w-full max-w-2xl max-h-[85vh] flex flex-col",children:[l.jsxs("div",{className:"p-4 border-b border-dark-700 flex items-center justify-between shrink-0",children:[l.jsxs("div",{children:[l.jsxs("h2",{className:"font-semibold",children:["Catálogo de ",l.jsx("span",{className:"text-primary-400",children:m.username})]}),l.jsxs("p",{className:"text-xs text-gray-500 mt-0.5",children:[oe," de ",j.length+L.length," categorías seleccionadas"]})]}),l.jsx("button",{onClick:()=>h(null),className:"text-gray-500 hover:text-white",children:"✕"})]}),l.jsxs("div",{className:"p-3 border-b border-dark-700 shrink-0 space-y-2",children:[l.jsxs("div",{className:"relative",children:[l.jsx(Kt,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-500"}),l.jsx("input",{value:M,onChange:F=>K(F.target.value),placeholder:"Buscar categoría...",className:"w-full bg-dark-700 border border-dark-600 rounded-lg pl-9 pr-3 py-2 text-sm focus:outline-none focus:border-primary-500"})]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx("button",{onClick:()=>ee(Ne),className:"text-xs px-3 py-1 rounded-lg bg-primary-900/40 hover:bg-primary-900/70 text-primary-300 border border-primary-800 transition-colors",children:"Seleccionar todo"}),l.jsx("button",{onClick:()=>G(Ne),className:"text-xs px-3 py-1 rounded-lg bg-dark-700 hover:bg-dark-600 text-gray-400 border border-dark-600 transition-colors",children:"Ninguna"})]})]}),l.jsxs("div",{className:"overflow-y-auto flex-1 p-4 space-y-4",children:[["live","movie","series"].map(F=>{const ne=Ne.filter(ke=>ke.type===F);return ne.length?l.jsxs("div",{children:[l.jsxs("h3",{className:"text-xs text-gray-500 uppercase tracking-wider mb-2 flex items-center justify-between",children:[l.jsx("span",{children:Pg[F]}),l.jsxs("span",{className:"normal-case text-gray-600",children:[ne.filter(ke=>D(ke)).length,"/",ne.length]})]}),l.jsx("div",{className:"grid grid-cols-2 gap-1",children:ne.map(ke=>l.jsxs("label",{className:`flex items-center gap-2 text-sm p-2 rounded-lg cursor-pointer transition-colors ${D(ke)?"bg-primary-900/20 hover:bg-primary-900/30":"hover:bg-dark-700"}`,children:[l.jsx("input",{type:"checkbox",checked:D(ke),onChange:Ce=>U(ke,Ce.target.checked),className:"shrink-0"}),l.jsx("span",{className:"truncate",children:ke.name}),ke.provider_count>0&&l.jsxs("span",{className:`shrink-0 text-xs px-1.5 py-0.5 rounded ml-auto font-medium ${ke.provider_count>1?"bg-green-900/50 text-green-400":"bg-dark-600 text-gray-500"}`,children:[ke.provider_count,"p"]})]},ke.name))})]},F):null}),Ne.length===0&&we.length===0&&l.jsx("div",{className:"text-center text-gray-500 text-sm py-8",children:"Sin resultados"}),we.length>0&&l.jsxs("div",{children:[l.jsxs("h3",{className:"text-xs text-gray-500 uppercase tracking-wider mb-2 flex items-center gap-2",children:[l.jsx(Pn,{size:11,className:"text-yellow-400"}),l.jsx("span",{children:"Categorías personalizadas"}),l.jsxs("span",{className:"normal-case text-gray-600",children:[we.filter(F=>N.has(F.id)).length,"/",we.length]})]}),l.jsx("div",{className:"grid grid-cols-2 gap-1",children:we.map(F=>l.jsxs("label",{className:`flex items-center gap-2 text-sm p-2 rounded-lg cursor-pointer transition-colors ${N.has(F.id)?"bg-yellow-900/20 hover:bg-yellow-900/30":"hover:bg-dark-700"}`,children:[l.jsx("input",{type:"checkbox",checked:N.has(F.id),onChange:ne=>{A(ke=>{const Ce=new Set(ke);return ne.target.checked?Ce.add(F.id):Ce.delete(F.id),Ce})},className:"shrink-0"}),l.jsx("span",{className:"truncate",children:F.name}),l.jsx(Pn,{size:10,className:"shrink-0 text-yellow-500 ml-auto"})]},F.id))})]})]}),l.jsxs("div",{className:"p-4 border-t border-dark-700 flex gap-2 justify-end shrink-0",children:[l.jsx("button",{onClick:()=>h(null),className:"bg-dark-700 px-4 py-2 rounded-lg text-sm",children:"Cancelar"}),l.jsx("button",{onClick:b,className:"bg-primary-500 hover:bg-primary-600 px-4 py-2 rounded-lg text-sm font-medium",children:"Guardar catálogo"})]})]})}),x&&l.jsx("div",{className:"fixed inset-0 bg-black/70 flex items-center justify-center z-50 p-4",children:l.jsxs("div",{className:"bg-dark-800 rounded-xl border border-dark-700 w-full max-w-md flex flex-col",children:[l.jsxs("div",{className:"p-4 border-b border-dark-700 flex items-center justify-between",children:[l.jsxs("h2",{className:"font-semibold",children:["Proveedores preferidos — ",l.jsx("span",{className:"text-primary-400",children:x.username})]}),l.jsx("button",{onClick:()=>y(null),className:"text-gray-500 hover:text-white",children:"✕"})]}),l.jsxs("div",{className:"p-4 space-y-2",children:[l.jsx("p",{className:"text-xs text-gray-500 mb-3",children:"Los proveedores marcados se intentan primero al asignar un slot. Si ninguno está disponible, se usa cualquiera con slot libre."}),Q.map(F=>{const ne=ye.has(F.id);return l.jsxs("div",{className:`flex items-center justify-between p-3 rounded-lg border ${ne?"border-primary-700 bg-primary-900/20":"border-dark-600 bg-dark-700"}`,children:[l.jsx("span",{className:"text-sm",children:F.name}),l.jsx("button",{onClick:()=>ne?pe(F.id):te(F.id),className:`text-xs px-3 py-1 rounded-lg font-medium transition-colors ${ne?"bg-primary-600 hover:bg-red-700 text-white":"bg-dark-600 hover:bg-primary-700 text-gray-300 hover:text-white"}`,children:ne?"Quitar":"Preferido"})]},F.id)}),Q.length===0&&l.jsx("div",{className:"text-center text-gray-500 text-sm py-4",children:"No hay proveedores configurados"})]}),l.jsx("div",{className:"p-4 border-t border-dark-700 flex justify-end",children:l.jsx("button",{onClick:()=>y(null),className:"bg-dark-700 px-4 py-2 rounded-lg text-sm",children:"Cerrar"})})]})}),l.jsx("div",{className:"bg-dark-800 border border-dark-700 rounded-xl overflow-hidden",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{className:"border-b border-dark-700 text-xs text-gray-500",children:l.jsxs("tr",{children:[l.jsx("th",{className:"text-left px-4 py-3",children:"Usuario"}),l.jsx("th",{className:"text-left px-4 py-3",children:"Conexiones"}),l.jsx("th",{className:"text-left px-4 py-3",children:"Expiración"}),l.jsx("th",{className:"text-left px-4 py-3",children:"Estado"}),l.jsx("th",{className:"text-left px-4 py-3",children:"Acciones"})]})}),l.jsxs("tbody",{children:[s.map(F=>l.jsxs("tr",{className:"border-b border-dark-700 hover:bg-dark-700/30",children:[l.jsx("td",{className:"px-4 py-3",children:l.jsxs("div",{className:"flex items-center gap-1.5",children:[F.is_priority&&l.jsx(Pn,{size:12,className:"text-yellow-400 shrink-0"}),l.jsx("span",{className:"font-mono",children:F.username})]})}),l.jsx("td",{className:"px-4 py-3",children:F.max_connections}),l.jsx("td",{className:"px-4 py-3 text-gray-400",children:F.expiry_date?new Date(F.expiry_date).toLocaleDateString("es-ES"):"—"}),l.jsx("td",{className:"px-4 py-3",children:l.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${F.is_active?"bg-green-900/40 text-green-400":"bg-red-900/40 text-red-400"}`,children:F.is_active?"Activo":"Inactivo"})}),l.jsx("td",{className:"px-4 py-3",children:l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx("button",{onClick:()=>ge(F),title:"Asignar catálogo",className:"p-1.5 rounded hover:bg-dark-600 text-gray-400 hover:text-blue-400",children:l.jsx(wf,{size:14})}),l.jsx("button",{onClick:()=>I(F),title:"Proveedores preferidos",className:"p-1.5 rounded hover:bg-dark-600 text-gray-400 hover:text-purple-400",children:l.jsx(zo,{size:14})}),l.jsx("button",{onClick:()=>q(F),title:F.is_priority?"Quitar prioridad":"Hacer prioritario",className:`p-1.5 rounded hover:bg-dark-600 transition-colors ${F.is_priority?"text-yellow-400":"text-gray-400 hover:text-yellow-400"}`,children:l.jsx(Pn,{size:14})}),l.jsx("button",{onClick:()=>ze(F),title:"Editar",className:"p-1.5 rounded hover:bg-dark-600 text-gray-400 hover:text-yellow-400",children:l.jsx(kf,{size:14})}),l.jsx("button",{onClick:()=>Ee(F.id),title:"Eliminar",className:"p-1.5 rounded hover:bg-dark-600 text-gray-400 hover:text-red-400",children:l.jsx(rn,{size:14})})]})})]},F.id)),s.length===0&&l.jsx("tr",{children:l.jsx("td",{colSpan:5,className:"px-4 py-8 text-center text-gray-500",children:"No hay usuarios"})})]})]})})]})}const Tg={live:"Directo",movie:"Películas",series:"Series"},Lg={live:"bg-blue-900/40 text-blue-300",movie:"bg-purple-900/40 text-purple-300",series:"bg-green-900/40 text-green-300"};function Og(){const[s,a]=v.useState([]),[i,c]=v.useState(""),[d,f]=v.useState("");v.useEffect(()=>{X.get("/catalogs/grouped").then(h=>a(h.data))},[]);const m=s.filter(h=>{const x=!d||h.type===d,y=!i||h.name.toLowerCase().includes(i.toLowerCase());return x&&y});return l.jsxs("div",{className:"p-6 space-y-5",children:[l.jsx("h1",{className:"text-xl font-bold",children:"Catálogos de Categorías"}),l.jsx("p",{className:"text-sm text-gray-400",children:"Categorías importadas de los proveedores. El badge indica cuántos proveedores cubren cada categoría (= streams simultáneos posibles). Asígnalas a usuarios desde la sección Usuarios."}),l.jsxs("div",{className:"flex gap-3",children:[l.jsxs("div",{className:"relative flex-1 max-w-sm",children:[l.jsx(Kt,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-500"}),l.jsx("input",{value:i,onChange:h=>c(h.target.value),placeholder:"Buscar categoría...",className:"w-full bg-dark-800 border border-dark-700 rounded-lg pl-8 pr-3 py-2 text-sm focus:outline-none focus:border-primary-500"})]}),l.jsxs("select",{value:d,onChange:h=>f(h.target.value),className:"bg-dark-800 border border-dark-700 rounded-lg px-3 py-2 text-sm focus:outline-none",children:[l.jsx("option",{value:"",children:"Todos los tipos"}),l.jsx("option",{value:"live",children:"Directo"}),l.jsx("option",{value:"movie",children:"Películas"}),l.jsx("option",{value:"series",children:"Series"})]})]}),l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3",children:[m.map(h=>l.jsxs("div",{className:"bg-dark-800 border border-dark-700 rounded-xl p-3 flex items-center gap-2",children:[l.jsx("span",{className:"text-sm truncate flex-1 min-w-0",title:h.name,children:h.name}),l.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[h.provider_count>0&&l.jsxs("span",{title:`${h.provider_count} proveedor${h.provider_count!==1?"es":""} — ${h.provider_count} stream${h.provider_count!==1?"s":""} simultáneo${h.provider_count!==1?"s":""} posible${h.provider_count!==1?"s":""}`,className:`text-xs px-1.5 py-0.5 rounded font-medium ${h.provider_count>1?"bg-green-900/50 text-green-400":"bg-dark-600 text-gray-500"}`,children:[h.provider_count,"p"]}),l.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${Lg[h.type]}`,children:Tg[h.type]})]})]},h.name+h.type)),m.length===0&&l.jsx("div",{className:"col-span-full bg-dark-800 border border-dark-700 border-dashed rounded-xl p-8 text-center text-gray-500 text-sm",children:s.length===0?"Sincroniza un proveedor para ver las categorías":"No se encontraron categorías"})]}),l.jsxs("p",{className:"text-xs text-gray-600",children:[m.length," categorías mostradas de ",s.length," totales"]})]})}function zg(){const[s,a]=v.useState([]),[i,c]=v.useState(!1),[d,f]=v.useState({name:"",url:""}),[m,h]=v.useState(!1);async function x(){const{data:O}=await X.get("/epg/");a(O)}v.useEffect(()=>{x()},[]);async function y(O){O.preventDefault(),await X.post("/epg/",d),f({name:"",url:""}),c(!1),x()}async function j(O){confirm("¿Eliminar fuente EPG?")&&(await X.delete(`/epg/${O}`),x())}async function _(){h(!0);try{await X.post("/epg/refresh"),alert("EPG actualización iniciada en segundo plano")}finally{h(!1)}}return l.jsxs("div",{className:"p-6 space-y-5",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h1",{className:"text-xl font-bold",children:"Gestión EPG"}),l.jsxs("div",{className:"flex gap-2",children:[l.jsxs("button",{onClick:_,disabled:m,className:"flex items-center gap-2 bg-dark-700 hover:bg-dark-600 px-4 py-2 rounded-lg text-sm font-medium transition-colors",children:[l.jsx(Ge,{size:15,className:m?"animate-spin":""}),"Actualizar EPG"]}),l.jsxs("button",{onClick:()=>c(O=>!O),className:"flex items-center gap-2 bg-primary-500 hover:bg-primary-600 px-4 py-2 rounded-lg text-sm font-medium",children:[l.jsx(tr,{size:16})," Añadir fuente"]})]})]}),l.jsxs("div",{className:"bg-dark-800 border border-primary-500/20 rounded-xl p-4 text-sm text-gray-400",children:[l.jsx("strong",{className:"text-gray-200",children:"Endpoint EPG para tus apps IPTV:"}),l.jsx("div",{className:"font-mono text-xs mt-1 bg-dark-700 rounded p-2 text-green-400",children:"http://10.10.10.234/xmltv.php?username=USUARIO&password=CONTRASEÑA"})]}),i&&l.jsxs("form",{onSubmit:y,className:"bg-dark-800 border border-dark-700 rounded-xl p-5 space-y-3",children:[l.jsx("h3",{className:"font-semibold text-sm",children:"Nueva fuente XMLTV"}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Nombre"}),l.jsx("input",{value:d.name,onChange:O=>f(B=>({...B,name:O.target.value})),required:!0,className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"URL XMLTV (o del proveedor)"}),l.jsx("input",{value:d.url,onChange:O=>f(B=>({...B,url:O.target.value})),required:!0,placeholder:"http://proveedor.com/xmltv.php?username=X&password=Y",className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm"})]})]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx("button",{type:"submit",className:"bg-primary-500 hover:bg-primary-600 px-4 py-2 rounded-lg text-sm font-medium",children:"Guardar"}),l.jsx("button",{type:"button",onClick:()=>c(!1),className:"bg-dark-700 px-4 py-2 rounded-lg text-sm",children:"Cancelar"})]})]}),l.jsxs("div",{className:"space-y-3",children:[s.map(O=>l.jsxs("div",{className:"bg-dark-800 border border-dark-700 rounded-xl p-4 flex items-center justify-between gap-4",children:[l.jsxs("div",{children:[l.jsx("div",{className:"font-semibold",children:O.name}),l.jsx("div",{className:"text-xs text-gray-500 truncate max-w-xl",children:O.url}),O.last_fetched_at&&l.jsxs("div",{className:"text-xs text-gray-600 mt-0.5",children:["Última actualización: ",new Date(O.last_fetched_at).toLocaleString("es-ES")]})]}),l.jsx("button",{onClick:()=>j(O.id),className:"p-2 rounded-lg bg-dark-700 hover:bg-red-900/40 text-gray-500 hover:text-red-400 transition-colors",children:l.jsx(rn,{size:15})})]},O.id)),s.length===0&&l.jsx("div",{className:"bg-dark-800 border border-dark-700 border-dashed rounded-xl p-8 text-center text-gray-500 text-sm",children:"No hay fuentes EPG configuradas"})]})]})}const ho={live:"Directo",movie:"Película",series:"Serie"},Zd={live:Tr,movie:Gn,series:yf},ea={live:"bg-blue-500/20 text-blue-400",movie:"bg-purple-500/20 text-purple-400",series:"bg-orange-500/20 text-orange-400"};function Ag(){const[s,a]=v.useState([]),[i,c]=v.useState(null),[d,f]=v.useState([]),[m,h]=v.useState(""),[x,y]=v.useState(""),[j,_]=v.useState([]),[O,B]=v.useState(!1),[L,P]=v.useState(!1),[N,A]=v.useState(""),[M,K]=v.useState("live"),[Q,me]=v.useState(!1),fe=v.useCallback(async()=>{const{data:q}=await X.get("/custom-categories");a(q)},[]),z=v.useCallback(async q=>{const{data:ge}=await X.get(`/custom-categories/${q.id}/channels`);f(ge)},[]);v.useEffect(()=>{fe()},[fe]),v.useEffect(()=>{i&&z(i)},[i,z]);const ae=q=>{c(q),B(!1),h(""),_([])},de=async()=>{N.trim()&&(await X.post("/custom-categories",{name:N.trim(),type:M}),A(""),P(!1),await fe())},Y=async q=>{confirm(`¿Eliminar categoría "${q.name}"?`)&&(await X.delete(`/custom-categories/${q.id}`),(i==null?void 0:i.id)===q.id&&c(null),await fe())},je=async q=>{await X.patch(`/custom-categories/${q.id}`,{is_visible:!q.is_visible}),await fe(),(i==null?void 0:i.id)===q.id&&c({...q,is_visible:!q.is_visible})},Te=v.useCallback(async(q,ge)=>{if(!q&&!ge){_([]);return}const{data:D}=await X.get("/custom-categories/channels/search",{params:{q,type:ge}});_(D)},[]);v.useEffect(()=>{const q=setTimeout(()=>Te(m,x),300);return()=>clearTimeout(q)},[m,x,Te]);const ze=async q=>{var ge;if(i)try{await X.post(`/custom-categories/${i.id}/channels`,{channel_id:q.id}),await z(i),await fe()}catch(D){((ge=D.response)==null?void 0:ge.status)!==409&&alert("Error al añadir canal")}},Ee=async q=>{i&&(await X.delete(`/custom-categories/${i.id}/channels/${q.item_id}`),await z(i),await fe())};return l.jsxs("div",{className:"flex h-full",children:[l.jsxs("aside",{className:"w-72 border-r border-dark-700 flex flex-col bg-dark-800",children:[l.jsxs("div",{className:"p-4 border-b border-dark-700 flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Pn,{size:18,className:"text-yellow-400"}),l.jsx("h2",{className:"font-semibold text-sm",children:"Categorías personalizadas"})]}),l.jsx("button",{onClick:()=>P(!0),className:"p-1.5 rounded-lg bg-primary-500/20 text-primary-400 hover:bg-primary-500/30 transition-colors",children:l.jsx(tr,{size:15})})]}),L&&l.jsxs("div",{className:"p-3 border-b border-dark-700 bg-dark-900 space-y-2",children:[l.jsx("input",{autoFocus:!0,value:N,onChange:q=>A(q.target.value),onKeyDown:q=>q.key==="Enter"&&de(),placeholder:"Nombre de la categoría",className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-1.5 text-sm focus:outline-none focus:border-primary-500"}),l.jsxs("select",{value:M,onChange:q=>K(q.target.value),className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-1.5 text-sm focus:outline-none",children:[l.jsx("option",{value:"live",children:"Directo"}),l.jsx("option",{value:"movie",children:"Película"}),l.jsx("option",{value:"series",children:"Serie"})]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx("button",{onClick:de,className:"flex-1 bg-primary-500 hover:bg-primary-600 text-white text-xs py-1.5 rounded-lg transition-colors",children:"Crear"}),l.jsx("button",{onClick:()=>P(!1),className:"flex-1 bg-dark-700 hover:bg-dark-600 text-xs py-1.5 rounded-lg transition-colors",children:"Cancelar"})]})]}),l.jsxs("div",{className:"flex-1 overflow-y-auto p-2 space-y-1",children:[s.length===0&&l.jsx("p",{className:"text-xs text-gray-500 text-center py-8",children:"No hay categorías personalizadas"}),s.map(q=>{const ge=Zd[q.type];return l.jsxs("div",{onClick:()=>ae(q),className:Mt("flex items-center gap-2 px-3 py-2 rounded-lg cursor-pointer group transition-colors",(i==null?void 0:i.id)===q.id?"bg-primary-500/20":"hover:bg-dark-700"),children:[l.jsx(ge,{size:14,className:ea[q.type].split(" ")[1]}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("p",{className:Mt("text-sm font-medium truncate",(i==null?void 0:i.id)===q.id?"text-primary-300":"text-gray-200"),children:q.name}),l.jsxs("p",{className:"text-xs text-gray-500",children:[ho[q.type]," · ",q.item_count," canales"]})]}),l.jsxs("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",onClick:D=>D.stopPropagation(),children:[l.jsx("button",{onClick:()=>je(q),className:Mt("text-xs px-1.5 py-0.5 rounded",q.is_visible?"text-green-400":"text-gray-600"),title:q.is_visible?"Visible (clic para ocultar)":"Oculto (clic para mostrar)",children:q.is_visible?"●":"○"}),l.jsx("button",{onClick:()=>Y(q),className:"text-red-500 hover:text-red-400 p-0.5 rounded",children:l.jsx(rn,{size:12})})]})]},q.id)})]})]}),l.jsx("main",{className:"flex-1 flex flex-col overflow-hidden",children:i?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"p-4 border-b border-dark-700 flex items-center justify-between bg-dark-800",children:[l.jsxs("div",{children:[l.jsxs("h2",{className:"font-semibold flex items-center gap-2",children:[(()=>{const q=Zd[i.type];return l.jsx(q,{size:16,className:ea[i.type].split(" ")[1]})})(),i.name,l.jsx("span",{className:Mt("text-xs px-2 py-0.5 rounded-full",ea[i.type]),children:ho[i.type]})]}),l.jsxs("p",{className:"text-xs text-gray-500 mt-0.5",children:[d.length," canales asignados"]})]}),l.jsxs("button",{onClick:()=>B(!O),className:"flex items-center gap-2 px-3 py-1.5 bg-primary-500/20 text-primary-400 hover:bg-primary-500/30 rounded-lg text-sm transition-colors",children:[l.jsx(tr,{size:14})," Añadir canales"]})]}),O&&l.jsxs("div",{className:"border-b border-dark-700 bg-dark-900 p-4 space-y-3",children:[l.jsxs("div",{className:"flex gap-2",children:[l.jsxs("div",{className:"relative flex-1",children:[l.jsx(Kt,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-500"}),l.jsx("input",{autoFocus:!0,value:m,onChange:q=>h(q.target.value),placeholder:"Buscar canal...",className:"w-full bg-dark-700 border border-dark-600 rounded-lg pl-9 pr-3 py-2 text-sm focus:outline-none focus:border-primary-500"})]}),l.jsxs("select",{value:x,onChange:q=>y(q.target.value),className:"bg-dark-700 border border-dark-600 rounded-lg px-3 text-sm focus:outline-none",children:[l.jsx("option",{value:"",children:"Todos los tipos"}),l.jsx("option",{value:"live",children:"Directo"}),l.jsx("option",{value:"movie",children:"Película"}),l.jsx("option",{value:"series",children:"Serie"})]}),l.jsx("button",{onClick:()=>B(!1),className:"text-gray-500 hover:text-gray-300 p-2",children:l.jsx(Ln,{size:16})})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-1 max-h-48 overflow-y-auto",children:[j.map(q=>{const ge=d.some(D=>D.channel_id===q.id);return l.jsxs("button",{onClick:()=>!ge&&ze(q),disabled:ge,className:Mt("flex items-center gap-2 px-3 py-2 rounded-lg text-left text-sm transition-colors",ge?"opacity-40 cursor-not-allowed bg-dark-700":"bg-dark-700 hover:bg-dark-600 cursor-pointer"),children:[q.logo?l.jsx("img",{src:q.logo,alt:"",className:"w-6 h-6 object-contain rounded",onError:D=>D.currentTarget.style.display="none"}):l.jsx("div",{className:"w-6 h-6 bg-dark-600 rounded"}),l.jsx("span",{className:"truncate flex-1",children:q.name}),ge&&l.jsx("span",{className:"text-xs text-green-500",children:"✓"})]},q.id)}),j.length===0&&(m||x)&&l.jsx("p",{className:"col-span-2 text-xs text-gray-500 text-center py-4",children:"Sin resultados"})]})]}),l.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:d.length===0?l.jsxs("div",{className:"text-center py-16 text-gray-500",children:[l.jsx("p",{children:"Esta categoría está vacía."}),l.jsx("p",{className:"text-xs mt-1",children:'Usa "Añadir canales" para añadir contenido.'})]}):l.jsx("div",{className:"grid grid-cols-1 gap-1",children:d.map((q,ge)=>l.jsxs("div",{className:"flex items-center gap-3 px-3 py-2 rounded-lg bg-dark-800 hover:bg-dark-700 group transition-colors",children:[l.jsx("span",{className:"text-xs text-gray-600 w-6 text-right",children:ge+1}),q.logo?l.jsx("img",{src:q.logo,alt:"",className:"w-8 h-8 object-contain rounded",onError:D=>D.currentTarget.style.display="none"}):l.jsx("div",{className:"w-8 h-8 bg-dark-600 rounded"}),l.jsx("span",{className:"flex-1 text-sm",children:q.name}),l.jsx("span",{className:Mt("text-xs px-1.5 py-0.5 rounded",ea[q.type]||"bg-gray-700 text-gray-400"),children:ho[q.type]||q.type}),l.jsx("button",{onClick:()=>Ee(q),className:"opacity-0 group-hover:opacity-100 text-red-500 hover:text-red-400 p-1 transition-all",children:l.jsx(Ln,{size:14})})]},q.item_id))})})]}):l.jsx("div",{className:"flex-1 flex items-center justify-center text-gray-500",children:l.jsxs("div",{className:"text-center",children:[l.jsx(Pn,{size:40,className:"mx-auto mb-3 text-gray-700"}),l.jsx("p",{children:"Selecciona una categoría para gestionar sus canales"})]})})})]})}function xo(s){return s>=1e9?(s/1e9).toFixed(2)+" GB":s>=1e6?(s/1e6).toFixed(1)+" MB":s>=1e3?(s/1e3).toFixed(0)+" KB":s+" B"}function ef(s){return s?s<60?`${s}s`:s<3600?`${Math.floor(s/60)}m ${s%60}s`:`${Math.floor(s/3600)}h ${Math.floor(s%3600/60)}m`:"—"}function Wf(s){return s?new Date(s).toLocaleString("es-ES",{dateStyle:"short",timeStyle:"short"}):"—"}const Dg={live:"bg-blue-500/20 text-blue-400",movie:"bg-purple-500/20 text-purple-400",series:"bg-orange-500/20 text-orange-400"},Fg={live:"Directo",movie:"Película",series:"Serie"};function Xn({icon:s,label:a,value:i,color:c}){return l.jsxs("div",{className:"bg-dark-800 rounded-xl p-4 flex items-center gap-3",children:[l.jsx(s,{size:20,className:c}),l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-gray-500",children:a}),l.jsx("p",{className:"text-lg font-bold",children:i})]})]})}function Ug(){const[s,a]=v.useState([]),[i,c]=v.useState(null),[d,f]=v.useState(0),[m,h]=v.useState(1),[x,y]=v.useState(!1),[j,_]=v.useState(""),[O,B]=v.useState(""),[L,P]=v.useState(""),[N,A]=v.useState(""),[M,K]=v.useState(""),Q=50,me=v.useCallback(async()=>{try{const{data:Y}=await X.get("/logs/stats");c(Y)}catch{}},[]),fe=v.useCallback(async(Y=1)=>{y(!0);try{const je={page:Y,limit:Q};j&&(je.username=j),O&&(je.channel=O),L&&(je.content_type=L),N&&(je.date_from=N),M&&(je.date_to=M);const{data:Te}=await X.get("/logs",{params:je});a(Te.items),f(Te.total),h(Y)}finally{y(!1)}},[j,O,L,N,M]);v.useEffect(()=>{me(),fe(1)},[]);const z=()=>{me(),fe(1)},ae=async()=>{confirm("¿Eliminar todos los registros de conexión?")&&(await X.delete("/logs"),a([]),f(0),me())},de=Math.ceil(d/Q);return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex justify-end gap-2",children:[l.jsxs("button",{onClick:()=>{me(),fe(m)},className:"flex items-center gap-2 px-3 py-1.5 bg-dark-700 hover:bg-dark-600 rounded-lg text-sm transition-colors",children:[l.jsx(Ge,{size:14})," Actualizar"]}),l.jsxs("button",{onClick:ae,className:"flex items-center gap-2 px-3 py-1.5 bg-red-500/20 text-red-400 hover:bg-red-500/30 rounded-lg text-sm transition-colors",children:[l.jsx(rn,{size:14})," Limpiar todo"]})]}),i&&l.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[l.jsx(Xn,{icon:So,label:"Total sesiones",value:i.total_sessions.toLocaleString(),color:"text-primary-400"}),l.jsx(Xn,{icon:ch,label:"Datos totales",value:xo(i.total_bytes),color:"text-green-400"}),l.jsx(Xn,{icon:So,label:"Duración media",value:ef(i.avg_duration_seconds),color:"text-yellow-400"}),l.jsx(Xn,{icon:aa,label:"Usuarios únicos",value:i.unique_users.toString(),color:"text-blue-400"})]}),i&&l.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[l.jsxs("div",{className:"bg-dark-800 rounded-xl p-4",children:[l.jsxs("h3",{className:"text-sm font-semibold mb-3 text-gray-300 flex items-center gap-2",children:[l.jsx(aa,{size:14})," Top usuarios"]}),l.jsxs("div",{className:"space-y-2",children:[i.top_users.map((Y,je)=>l.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[l.jsx("span",{className:"text-gray-600 w-4",children:je+1}),l.jsx("span",{className:"flex-1 text-gray-200 font-medium",children:Y.username}),l.jsxs("span",{className:"text-gray-400",children:[Y.sessions," sesiones"]}),l.jsx("span",{className:"text-green-400 text-xs",children:xo(Y.bytes)})]},Y.username)),i.top_users.length===0&&l.jsx("p",{className:"text-xs text-gray-600",children:"Sin datos"})]})]}),l.jsxs("div",{className:"bg-dark-800 rounded-xl p-4",children:[l.jsxs("h3",{className:"text-sm font-semibold mb-3 text-gray-300 flex items-center gap-2",children:[l.jsx(Tr,{size:14})," Top canales/contenido"]}),l.jsxs("div",{className:"space-y-2",children:[i.top_channels.map((Y,je)=>l.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[l.jsx("span",{className:"text-gray-600 w-4",children:je+1}),l.jsx("span",{className:"flex-1 text-gray-200 truncate",children:Y.channel_name}),l.jsx("span",{className:"text-gray-400",children:Y.sessions})]},Y.channel_name)),i.top_channels.length===0&&l.jsx("p",{className:"text-xs text-gray-600",children:"Sin datos"})]})]})]}),l.jsx("div",{className:"bg-dark-800 rounded-xl p-4",children:l.jsxs("div",{className:"flex flex-wrap gap-2 items-end",children:[l.jsxs("div",{className:"relative",children:[l.jsx(Kt,{size:13,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-gray-500"}),l.jsx("input",{value:j,onChange:Y=>_(Y.target.value),onKeyDown:Y=>Y.key==="Enter"&&z(),placeholder:"Usuario",className:"bg-dark-700 border border-dark-600 rounded-lg pl-8 pr-3 py-1.5 text-sm w-36 focus:outline-none focus:border-primary-500"})]}),l.jsxs("div",{className:"relative",children:[l.jsx(Kt,{size:13,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-gray-500"}),l.jsx("input",{value:O,onChange:Y=>B(Y.target.value),onKeyDown:Y=>Y.key==="Enter"&&z(),placeholder:"Canal / película",className:"bg-dark-700 border border-dark-600 rounded-lg pl-8 pr-3 py-1.5 text-sm w-48 focus:outline-none focus:border-primary-500"})]}),l.jsxs("select",{value:L,onChange:Y=>P(Y.target.value),className:"bg-dark-700 border border-dark-600 rounded-lg px-3 py-1.5 text-sm focus:outline-none",children:[l.jsx("option",{value:"",children:"Todos los tipos"}),l.jsx("option",{value:"live",children:"Directo"}),l.jsx("option",{value:"movie",children:"Película"}),l.jsx("option",{value:"series",children:"Serie"})]}),l.jsx("input",{type:"date",value:N,onChange:Y=>A(Y.target.value),className:"bg-dark-700 border border-dark-600 rounded-lg px-3 py-1.5 text-sm focus:outline-none"}),l.jsx("span",{className:"text-gray-500 text-sm",children:"→"}),l.jsx("input",{type:"date",value:M,onChange:Y=>K(Y.target.value),className:"bg-dark-700 border border-dark-600 rounded-lg px-3 py-1.5 text-sm focus:outline-none"}),l.jsxs("button",{onClick:z,className:"flex items-center gap-2 px-4 py-1.5 bg-primary-500 hover:bg-primary-600 rounded-lg text-sm transition-colors",children:[l.jsx(Kt,{size:13})," Buscar"]})]})}),l.jsxs("div",{className:"bg-dark-800 rounded-xl overflow-hidden",children:[l.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-dark-700",children:[l.jsxs("span",{className:"text-sm text-gray-400",children:[d.toLocaleString()," registros"]}),de>1&&l.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[l.jsx("button",{onClick:()=>fe(m-1),disabled:m===1,className:"px-2 py-1 bg-dark-700 rounded disabled:opacity-40",children:"←"}),l.jsxs("span",{className:"text-gray-400",children:[m," / ",de]}),l.jsx("button",{onClick:()=>fe(m+1),disabled:m===de,className:"px-2 py-1 bg-dark-700 rounded disabled:opacity-40",children:"→"})]})]}),l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"text-xs text-gray-500 border-b border-dark-700",children:[l.jsx("th",{className:"text-left px-4 py-2",children:"Usuario"}),l.jsx("th",{className:"text-left px-4 py-2",children:"IP"}),l.jsx("th",{className:"text-left px-4 py-2",children:"Canal / Contenido"}),l.jsx("th",{className:"text-left px-4 py-2",children:"Tipo"}),l.jsx("th",{className:"text-left px-4 py-2",children:"Inicio"}),l.jsx("th",{className:"text-left px-4 py-2",children:"Duración"}),l.jsx("th",{className:"text-right px-4 py-2",children:"Datos"})]})}),l.jsxs("tbody",{children:[x&&l.jsx("tr",{children:l.jsx("td",{colSpan:7,className:"text-center py-8 text-gray-500",children:"Cargando..."})}),!x&&s.length===0&&l.jsx("tr",{children:l.jsx("td",{colSpan:7,className:"text-center py-8 text-gray-500",children:"No hay registros"})}),s.map(Y=>l.jsxs("tr",{className:"border-b border-dark-700/50 hover:bg-dark-700/30 transition-colors",children:[l.jsx("td",{className:"px-4 py-2 font-medium text-gray-200",children:Y.username}),l.jsx("td",{className:"px-4 py-2 text-gray-400 font-mono text-xs",children:Y.client_ip||"—"}),l.jsx("td",{className:"px-4 py-2 text-gray-300 max-w-xs truncate",children:Y.channel_name||Y.stream_id||"—"}),l.jsx("td",{className:"px-4 py-2",children:Y.content_type?l.jsx("span",{className:Mt("text-xs px-2 py-0.5 rounded-full",Dg[Y.content_type]||"bg-gray-700 text-gray-400"),children:Fg[Y.content_type]||Y.content_type}):"—"}),l.jsx("td",{className:"px-4 py-2 text-gray-400 text-xs",children:Wf(Y.started_at)}),l.jsx("td",{className:"px-4 py-2 text-gray-400",children:ef(Y.duration_seconds)}),l.jsx("td",{className:"px-4 py-2 text-right text-green-400 text-xs",children:xo(Y.bytes_transferred)})]},Y.id))]})]})})]})]})}function Mg(){const[s,a]=v.useState([]),[i,c]=v.useState(0),[d,f]=v.useState(1),[m,h]=v.useState(!1),[x,y]=v.useState(""),[j,_]=v.useState(""),[O,B]=v.useState(""),[L,P]=v.useState(""),N=50,A=v.useCallback(async(z=1)=>{h(!0);try{const ae={page:z,limit:N};x&&(ae.channel=x),j&&(ae.event_type=j),O&&(ae.date_from=O),L&&(ae.date_to=L);const{data:de}=await X.get("/logs/events",{params:ae});a(de.items),c(de.total),f(z)}finally{h(!1)}},[x,j,O,L]);v.useEffect(()=>{A(1)},[]);const M=()=>A(1),K=async()=>{confirm("¿Eliminar todos los registros de fallos?")&&(await X.delete("/logs/events"),a([]),c(0))},Q=Math.ceil(i/N),me=s.filter(z=>z.event_type==="caida").length,fe=s.filter(z=>z.event_type==="recuperado").length;return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex justify-end gap-2",children:[l.jsxs("button",{onClick:()=>A(d),className:"flex items-center gap-2 px-3 py-1.5 bg-dark-700 hover:bg-dark-600 rounded-lg text-sm transition-colors",children:[l.jsx(Ge,{size:14})," Actualizar"]}),l.jsxs("button",{onClick:K,className:"flex items-center gap-2 px-3 py-1.5 bg-red-500/20 text-red-400 hover:bg-red-500/30 rounded-lg text-sm transition-colors",children:[l.jsx(rn,{size:14})," Limpiar todo"]})]}),l.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-3 gap-4",children:[l.jsx(Xn,{icon:Zn,label:"Total fallos registrados",value:i.toLocaleString(),color:"text-orange-400"}),l.jsx(Xn,{icon:Zn,label:"Caídas (en vista actual)",value:me.toString(),color:"text-red-400"}),l.jsx(Xn,{icon:Ad,label:"Recuperaciones (en vista actual)",value:fe.toString(),color:"text-emerald-400"})]}),l.jsx("div",{className:"bg-dark-800 rounded-xl p-4",children:l.jsxs("div",{className:"flex flex-wrap gap-2 items-end",children:[l.jsxs("div",{className:"relative",children:[l.jsx(Kt,{size:13,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-gray-500"}),l.jsx("input",{value:x,onChange:z=>y(z.target.value),onKeyDown:z=>z.key==="Enter"&&M(),placeholder:"Canal / proveedor",className:"bg-dark-700 border border-dark-600 rounded-lg pl-8 pr-3 py-1.5 text-sm w-48 focus:outline-none focus:border-primary-500"})]}),l.jsxs("select",{value:j,onChange:z=>_(z.target.value),className:"bg-dark-700 border border-dark-600 rounded-lg px-3 py-1.5 text-sm focus:outline-none",children:[l.jsx("option",{value:"",children:"Todos los eventos"}),l.jsx("option",{value:"caida",children:"Caídas"}),l.jsx("option",{value:"recuperado",children:"Recuperaciones"})]}),l.jsx("input",{type:"date",value:O,onChange:z=>B(z.target.value),className:"bg-dark-700 border border-dark-600 rounded-lg px-3 py-1.5 text-sm focus:outline-none"}),l.jsx("span",{className:"text-gray-500 text-sm",children:"→"}),l.jsx("input",{type:"date",value:L,onChange:z=>P(z.target.value),className:"bg-dark-700 border border-dark-600 rounded-lg px-3 py-1.5 text-sm focus:outline-none"}),l.jsxs("button",{onClick:M,className:"flex items-center gap-2 px-4 py-1.5 bg-primary-500 hover:bg-primary-600 rounded-lg text-sm transition-colors",children:[l.jsx(Kt,{size:13})," Buscar"]})]})}),l.jsxs("div",{className:"bg-dark-800 rounded-xl overflow-hidden",children:[l.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-dark-700",children:[l.jsxs("span",{className:"text-sm text-gray-400",children:[i.toLocaleString()," eventos"]}),Q>1&&l.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[l.jsx("button",{onClick:()=>A(d-1),disabled:d===1,className:"px-2 py-1 bg-dark-700 rounded disabled:opacity-40",children:"←"}),l.jsxs("span",{className:"text-gray-400",children:[d," / ",Q]}),l.jsx("button",{onClick:()=>A(d+1),disabled:d===Q,className:"px-2 py-1 bg-dark-700 rounded disabled:opacity-40",children:"→"})]})]}),l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"text-xs text-gray-500 border-b border-dark-700",children:[l.jsx("th",{className:"text-left px-4 py-2",children:"Fecha"}),l.jsx("th",{className:"text-left px-4 py-2",children:"Tipo"}),l.jsx("th",{className:"text-left px-4 py-2",children:"Canal"}),l.jsx("th",{className:"text-left px-4 py-2",children:"Proveedor"}),l.jsx("th",{className:"text-left px-4 py-2",children:"Dominio"}),l.jsx("th",{className:"text-left px-4 py-2",children:"Detalle"}),l.jsx("th",{className:"text-right px-4 py-2",children:"Intento"})]})}),l.jsxs("tbody",{children:[m&&l.jsx("tr",{children:l.jsx("td",{colSpan:7,className:"text-center py-8 text-gray-500",children:"Cargando..."})}),!m&&s.length===0&&l.jsx("tr",{children:l.jsx("td",{colSpan:7,className:"text-center py-8 text-gray-500",children:"No hay eventos registrados — los fallos aparecerán aquí automáticamente"})}),s.map(z=>l.jsxs("tr",{className:"border-b border-dark-700/50 hover:bg-dark-700/30 transition-colors",children:[l.jsx("td",{className:"px-4 py-2 text-gray-400 text-xs whitespace-nowrap",children:Wf(z.created_at)}),l.jsx("td",{className:"px-4 py-2",children:z.event_type==="caida"?l.jsxs("span",{className:"inline-flex items-center gap-1 text-xs px-2 py-0.5 rounded-full bg-red-500/20 text-red-400",children:[l.jsx(Zn,{size:10})," Caída"]}):z.event_type==="recuperado"?l.jsxs("span",{className:"inline-flex items-center gap-1 text-xs px-2 py-0.5 rounded-full bg-emerald-500/20 text-emerald-400",children:[l.jsx(Ad,{size:10})," Recuperado"]}):l.jsx("span",{className:"text-xs text-gray-400",children:z.event_type})}),l.jsx("td",{className:"px-4 py-2 text-gray-200 max-w-[180px] truncate",title:z.channel_name??"",children:z.channel_name||`#${z.channel_id}`||"—"}),l.jsx("td",{className:"px-4 py-2 text-gray-400 text-xs",children:z.provider_name||"—"}),l.jsx("td",{className:"px-4 py-2 text-gray-400 font-mono text-xs",children:z.domain||"—"}),l.jsx("td",{className:"px-4 py-2 text-gray-500 text-xs max-w-[240px] truncate",title:z.error_message??"",children:z.error_message||"—"}),l.jsx("td",{className:"px-4 py-2 text-right text-gray-500 text-xs tabular-nums",children:z.attempt_number??"—"})]},z.id))]})]})})]})]})}function Ig(){const[s,a]=v.useState("connections");return l.jsxs("div",{className:"p-6 space-y-6",children:[l.jsx("div",{className:"flex items-center justify-between",children:l.jsx("h1",{className:"text-xl font-bold",children:"Registro"})}),l.jsxs("div",{className:"flex gap-1 border-b border-dark-700 pb-0",children:[l.jsx("button",{onClick:()=>a("connections"),className:Mt("px-4 py-2 text-sm font-medium rounded-t-lg transition-colors border-b-2 -mb-px",s==="connections"?"border-primary-500 text-primary-400 bg-dark-800":"border-transparent text-gray-500 hover:text-gray-300"),children:"Conexiones de usuarios"}),l.jsxs("button",{onClick:()=>a("events"),className:Mt("px-4 py-2 text-sm font-medium rounded-t-lg transition-colors border-b-2 -mb-px flex items-center gap-1.5",s==="events"?"border-red-500 text-red-400 bg-dark-800":"border-transparent text-gray-500 hover:text-gray-300"),children:[l.jsx(Zn,{size:13})," Fallos de stream"]})]}),s==="connections"&&l.jsx(Ug,{}),s==="events"&&l.jsx(Mg,{})]})}function $g(){const[s,a]=v.useState(!1),[i,c]=v.useState(""),[d,f]=v.useState(!1),[m,h]=v.useState(!1),x=v.useRef(null),y=async()=>{try{const L=localStorage.getItem("token");(await fetch("/api/admin/settings/blocked-image",{headers:{Authorization:`Bearer ${L}`}})).ok?(a(!0),c("/panel/blocked_image.jpg?t="+Date.now())):(a(!1),c(""))}catch{a(!1)}};v.useEffect(()=>{y()},[]);const j=async L=>{var P,N;if(!L.type.startsWith("image/")){alert("Solo se permiten imágenes (JPEG, PNG, WebP, GIF)");return}f(!0);try{const A=new FormData;A.append("file",L),await X.post("/settings/blocked-image",A,{headers:{"Content-Type":"multipart/form-data"}}),await y()}catch(A){alert("Error al subir la imagen: "+(((N=(P=A.response)==null?void 0:P.data)==null?void 0:N.detail)||A.message))}finally{f(!1)}},_=L=>{var N;const P=(N=L.target.files)==null?void 0:N[0];P&&j(P),L.target.value=""},O=L=>{L.preventDefault(),h(!1);const P=L.dataTransfer.files[0];P&&j(P)},B=async()=>{confirm("¿Eliminar la imagen de bloqueo?")&&(await X.delete("/settings/blocked-image"),a(!1),c(""))};return l.jsxs("div",{className:"p-6 max-w-2xl space-y-6",children:[l.jsx("h1",{className:"text-xl font-bold",children:"Ajustes"}),l.jsxs("div",{className:"bg-dark-800 rounded-xl p-6 space-y-4",children:[l.jsxs("div",{children:[l.jsxs("h2",{className:"font-semibold text-base flex items-center gap-2",children:[l.jsx(dh,{size:18,className:"text-primary-400"}),"Imagen de conexión bloqueada"]}),l.jsx("p",{className:"text-sm text-gray-400 mt-1",children:"Esta imagen se mostrará como canal de vídeo cuando un usuario intente reproducir en un segundo dispositivo habiendo alcanzado su límite de conexiones simultáneas."})]}),l.jsxs("div",{className:"flex items-start gap-2 text-xs text-blue-400 bg-blue-500/10 rounded-lg px-3 py-2",children:[l.jsx(fh,{size:13,className:"mt-0.5 shrink-0"}),l.jsx("span",{children:"El zapping normal (cambiar de canal en el mismo dispositivo) sigue funcionando sin interrupciones. La imagen solo aparece cuando se conecta un segundo dispositivo diferente con la misma cuenta."})]}),l.jsxs("div",{onDragOver:L=>{L.preventDefault(),h(!0)},onDragLeave:()=>h(!1),onDrop:O,onClick:()=>{var L;return!d&&((L=x.current)==null?void 0:L.click())},className:`
relative border-2 border-dashed rounded-xl cursor-pointer transition-colors
${m?"border-primary-400 bg-primary-500/10":"border-dark-600 hover:border-dark-500"}
`,children:[l.jsx("input",{ref:x,type:"file",accept:"image/*",className:"hidden",onChange:_}),s&&i?l.jsxs("div",{className:"relative",children:[l.jsx("img",{src:i,alt:"Blocked image",className:"w-full rounded-xl object-contain max-h-72"}),l.jsx("div",{className:"absolute inset-0 bg-black/40 opacity-0 hover:opacity-100 transition-opacity rounded-xl flex items-center justify-center",children:l.jsx("span",{className:"text-white text-sm font-medium",children:"Haz clic para cambiar"})})]}):l.jsxs("div",{className:"py-12 flex flex-col items-center gap-3 text-gray-500",children:[l.jsx(vh,{size:32,className:m?"text-primary-400":""}),l.jsxs("div",{className:"text-center",children:[l.jsx("p",{className:"font-medium text-sm",children:"Arrastra una imagen o haz clic para subir"}),l.jsx("p",{className:"text-xs mt-1",children:"JPEG, PNG, WebP o GIF · máx. 10 MB"})]})]}),d&&l.jsx("div",{className:"absolute inset-0 bg-dark-900/80 rounded-xl flex items-center justify-center",children:l.jsx("div",{className:"text-sm text-primary-400",children:"Subiendo..."})})]}),s&&l.jsx("div",{className:"flex justify-end",children:l.jsxs("button",{onClick:B,className:"flex items-center gap-2 px-3 py-1.5 bg-red-500/20 text-red-400 hover:bg-red-500/30 rounded-lg text-sm transition-colors",children:[l.jsx(rn,{size:14})," Eliminar imagen"]})})]})]})}const tf={name:"",url:"http://10.10.10.15:8096",api_key:"c339ccd3b7234c9a874bcfb70e92364a",movies_category_name:"Películas KiraTV",series_category_name:"Series KiraTV",movies_library_id:"",series_library_id:""};function Bg(){const[s,a]=v.useState([]),[i,c]=v.useState(!0),[d,f]=v.useState(!1),[m,h]=v.useState(null),[x,y]=v.useState({...tf}),[j,_]=v.useState(!1),[O,B]=v.useState(null),[L,P]=v.useState(!1),[N,A]=v.useState([]),[M,K]=v.useState(!1),[Q,me]=v.useState({}),[fe,z]=v.useState(null);v.useEffect(()=>{ae()},[]);async function ae(){c(!0);try{const{data:D}=await X.get("/jellyfin");a(D)}finally{c(!1)}}function de(){h(null),y({...tf}),B(null),A([]),f(!0)}function Y(D){h(D.id),y({name:D.name,url:D.url,api_key:D.api_key,movies_category_name:D.movies_category_name,series_category_name:D.series_category_name,movies_library_id:D.movies_library_id??"",series_library_id:D.series_library_id??""}),B(null),A([]),f(!0)}async function je(){if(!(!x.url||!x.api_key)){P(!0),B(null);try{if(m){const{data:D}=await X.post(`/jellyfin/${m}/test`);B(D)}else{const{data:D}=await X.post("/jellyfin",{name:"__test__",url:x.url,api_key:x.api_key,movies_category_name:x.movies_category_name,series_category_name:x.series_category_name}),{data:U}=await X.post(`/jellyfin/${D.id}/test`);await X.delete(`/jellyfin/${D.id}`),B(U)}}catch{B({ok:!1,error:"Error de red"})}finally{P(!1)}}}async function Te(){if(!m){await ze();return}K(!0);try{const{data:D}=await X.get(`/jellyfin/${m}/libraries`);A(D)}catch{A([])}finally{K(!1)}}async function ze(){_(!0);try{const D={...x,movies_library_id:x.movies_library_id||null,series_library_id:x.series_library_id||null};if(m)await X.put(`/jellyfin/${m}`,D);else{const{data:U}=await X.post("/jellyfin",D);h(U.id)}await ae()}finally{_(!1)}}async function Ee(D){confirm("¿Eliminar esta configuración de Jellyfin? Se borrarán todos los canales sincronizados.")&&(await X.delete(`/jellyfin/${D}`),a(U=>U.filter(ee=>ee.id!==D)),m===D&&f(!1))}async function q(D){me(U=>({...U,[D]:{status:"running",message:"Iniciando…",synced:0}})),await X.post(`/jellyfin/${D}/sync`),ge(D)}function ge(D){const U=setInterval(async()=>{try{const{data:ee}=await X.get(`/jellyfin/${D}/sync-status`);me(G=>({...G,[D]:ee})),ee.status!=="running"&&(clearInterval(U),ee.status==="done"&&ae())}catch{clearInterval(U)}},1500)}return N.filter(D=>D.type==="movies"||D.type===""),N.filter(D=>D.type==="tvshows"||D.type===""),l.jsxs("div",{className:"p-6 max-w-4xl mx-auto",children:[l.jsxs("div",{className:"flex items-center justify-between mb-6",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-bold",children:"Biblioteca Jellyfin"}),l.jsx("p",{className:"text-gray-400 text-sm mt-1",children:"Integra tu catálogo local de Jellyfin como VOD y Series en KiraStream"})]}),l.jsxs("button",{onClick:de,className:"flex items-center gap-2 bg-primary-600 hover:bg-primary-500 text-white px-4 py-2 rounded-lg text-sm font-medium transition-colors",children:[l.jsx(tr,{size:16})," Nueva conexión"]})]}),i?l.jsx("div",{className:"flex justify-center py-12",children:l.jsx(Xl,{size:24,className:"animate-spin text-gray-400"})}):s.length===0?l.jsxs("div",{className:"bg-dark-800 border border-dark-700 rounded-xl p-12 text-center text-gray-500",children:[l.jsx(Gn,{size:36,className:"mx-auto mb-3 opacity-30"}),l.jsx("p",{className:"text-sm",children:"No hay conexiones Jellyfin configuradas"}),l.jsx("button",{onClick:de,className:"mt-4 text-primary-400 hover:text-primary-300 text-sm",children:"+ Añadir primera conexión"})]}):l.jsx("div",{className:"space-y-4",children:s.map(D=>{const U=Q[D.id];return l.jsxs("div",{className:"bg-dark-800 border border-dark-700 rounded-xl overflow-hidden",children:[l.jsxs("div",{className:"flex items-center gap-4 p-4",children:[l.jsx("div",{className:"w-10 h-10 rounded-lg bg-purple-900/30 flex items-center justify-center shrink-0",children:l.jsx(Gn,{size:20,className:"text-purple-400"})}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"font-medium",children:D.name}),l.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${D.is_active?"bg-green-900/30 text-green-400":"bg-gray-700 text-gray-400"}`,children:D.is_active?"activo":"inactivo"})]}),l.jsx("div",{className:"text-xs text-gray-500 mt-0.5 truncate",children:D.url}),l.jsxs("div",{className:"text-xs text-gray-600 mt-0.5",children:[D.item_count," elementos",D.last_sync_at&&` · Última sync: ${new Date(D.last_sync_at).toLocaleString("es-ES")}`]})]}),l.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[(U==null?void 0:U.status)==="running"?l.jsxs("span",{className:"flex items-center gap-1 text-xs text-yellow-400",children:[l.jsx(Ge,{size:12,className:"animate-spin"})," ",U.message]}):l.jsxs("button",{onClick:()=>q(D.id),className:"flex items-center gap-1.5 text-xs bg-dark-700 hover:bg-primary-600 text-gray-300 hover:text-white px-3 py-1.5 rounded-lg transition-colors",children:[l.jsx(Ge,{size:12})," Sincronizar"]}),l.jsx("button",{onClick:()=>Y(D),className:"text-gray-500 hover:text-primary-400 p-1.5 rounded transition-colors",title:"Editar",children:l.jsx(hh,{size:14})}),l.jsx("button",{onClick:()=>Ee(D.id),className:"text-gray-500 hover:text-red-400 p-1.5 rounded transition-colors",title:"Eliminar",children:l.jsx(rn,{size:14})}),l.jsx("button",{onClick:()=>z(fe===D.id?null:D.id),className:"text-gray-500 hover:text-gray-300 p-1.5 rounded transition-colors",children:fe===D.id?l.jsx(uh,{size:14}):l.jsx(jo,{size:14})})]})]}),(U==null?void 0:U.status)==="done"&&l.jsxs("div",{className:"px-4 pb-3 text-xs text-green-400 flex items-center gap-1",children:[l.jsx(oo,{size:12})," ",U.message," · ",U.synced," elementos importados"]}),(U==null?void 0:U.status)==="error"&&l.jsxs("div",{className:"px-4 pb-3 text-xs text-red-400 flex items-center gap-1",children:[l.jsx(Ln,{size:12})," Error: ",U.message]}),fe===D.id&&l.jsxs("div",{className:"px-4 pb-4 border-t border-dark-700 pt-3 grid grid-cols-2 gap-4 text-xs text-gray-400",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-1 mb-1 text-purple-400 font-medium",children:[l.jsx(Gn,{size:12})," Películas"]}),l.jsxs("div",{children:["Categoría: ",l.jsx("span",{className:"text-gray-300",children:D.movies_category_name})]}),l.jsxs("div",{children:["Biblioteca: ",l.jsx("span",{className:"text-gray-300",children:D.movies_library_id||"—"})]})]}),l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-1 mb-1 text-blue-400 font-medium",children:[l.jsx(Tr,{size:12})," Series"]}),l.jsxs("div",{children:["Categoría: ",l.jsx("span",{className:"text-gray-300",children:D.series_category_name})]}),l.jsxs("div",{children:["Biblioteca: ",l.jsx("span",{className:"text-gray-300",children:D.series_library_id||"—"})]})]})]})]},D.id)})}),d&&l.jsx("div",{className:"fixed inset-0 bg-black/60 flex items-center justify-center z-50 p-4",children:l.jsxs("div",{className:"bg-dark-800 border border-dark-700 rounded-xl w-full max-w-lg max-h-[90vh] overflow-y-auto",children:[l.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-dark-700",children:[l.jsx("h2",{className:"font-semibold",children:m?"Editar conexión":"Nueva conexión Jellyfin"}),l.jsx("button",{onClick:()=>f(!1),className:"text-gray-500 hover:text-white",children:l.jsx(Ln,{size:16})})]}),l.jsxs("div",{className:"p-4 space-y-4",children:[l.jsxs("div",{children:[l.jsx("label",{className:"text-xs text-gray-400 mb-1 block",children:"Nombre"}),l.jsx("input",{className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm",value:x.name,onChange:D=>y(U=>({...U,name:D.target.value})),placeholder:"Mi Jellyfin"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-xs text-gray-400 mb-1 block",children:"URL del servidor"}),l.jsx("input",{className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm font-mono",value:x.url,onChange:D=>y(U=>({...U,url:D.target.value})),placeholder:"http://192.168.1.x:8096"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-xs text-gray-400 mb-1 block",children:"API Key"}),l.jsx("input",{className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm font-mono",value:x.api_key,onChange:D=>y(U=>({...U,api_key:D.target.value})),placeholder:"Tu API key de Jellyfin"})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("button",{onClick:je,disabled:L||!x.url||!x.api_key,className:"flex items-center gap-1.5 bg-dark-700 hover:bg-dark-600 text-sm px-3 py-2 rounded-lg transition-colors disabled:opacity-50",children:[L?l.jsx(Xl,{size:14,className:"animate-spin"}):l.jsx(oo,{size:14}),"Probar conexión"]}),O&&l.jsx("span",{className:`text-xs flex items-center gap-1 ${O.ok?"text-green-400":"text-red-400"}`,children:O.ok?l.jsxs(l.Fragment,{children:[l.jsx(oo,{size:12})," ",O.server_name]}):l.jsxs(l.Fragment,{children:[l.jsx(Ln,{size:12})," ",O.error]})})]}),l.jsx("hr",{className:"border-dark-600"}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-xs text-gray-400 font-medium uppercase tracking-wider",children:"Bibliotecas"}),l.jsxs("button",{onClick:Te,disabled:M,className:"flex items-center gap-1 text-xs text-primary-400 hover:text-primary-300 transition-colors disabled:opacity-50",children:[M?l.jsx(Xl,{size:11,className:"animate-spin"}):l.jsx(Ge,{size:11}),m?"Cargar bibliotecas":"Guardar primero para cargar"]})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{children:[l.jsxs("label",{className:"text-xs text-gray-400 mb-1 block flex items-center gap-1",children:[l.jsx(Gn,{size:11})," Biblioteca de Películas"]}),N.length>0?l.jsxs("select",{className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm",value:x.movies_library_id,onChange:D=>y(U=>({...U,movies_library_id:D.target.value})),children:[l.jsx("option",{value:"",children:"— ninguna —"}),N.map(D=>l.jsxs("option",{value:D.id,children:[D.name," (",D.type||"sin tipo",")"]},D.id))]}):l.jsx("input",{className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm font-mono text-xs",value:x.movies_library_id,onChange:D=>y(U=>({...U,movies_library_id:D.target.value})),placeholder:"ID de biblioteca"})]}),l.jsxs("div",{children:[l.jsxs("label",{className:"text-xs text-gray-400 mb-1 block flex items-center gap-1",children:[l.jsx(Tr,{size:11})," Biblioteca de Series"]}),N.length>0?l.jsxs("select",{className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm",value:x.series_library_id,onChange:D=>y(U=>({...U,series_library_id:D.target.value})),children:[l.jsx("option",{value:"",children:"— ninguna —"}),N.map(D=>l.jsxs("option",{value:D.id,children:[D.name," (",D.type||"sin tipo",")"]},D.id))]}):l.jsx("input",{className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm font-mono text-xs",value:x.series_library_id,onChange:D=>y(U=>({...U,series_library_id:D.target.value})),placeholder:"ID de biblioteca"})]})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{children:[l.jsx("label",{className:"text-xs text-gray-400 mb-1 block",children:"Nombre categoría Películas"}),l.jsx("input",{className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm",value:x.movies_category_name,onChange:D=>y(U=>({...U,movies_category_name:D.target.value}))})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-xs text-gray-400 mb-1 block",children:"Nombre categoría Series"}),l.jsx("input",{className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm",value:x.series_category_name,onChange:D=>y(U=>({...U,series_category_name:D.target.value}))})]})]})]}),l.jsxs("div",{className:"flex justify-end gap-3 p-4 border-t border-dark-700",children:[l.jsx("button",{onClick:()=>f(!1),className:"px-4 py-2 text-sm text-gray-400 hover:text-white",children:"Cancelar"}),l.jsxs("button",{onClick:async()=>{await ze(),f(!1)},disabled:j||!x.name||!x.url||!x.api_key,className:"flex items-center gap-2 bg-primary-600 hover:bg-primary-500 text-white px-4 py-2 rounded-lg text-sm font-medium transition-colors disabled:opacity-50",children:[j&&l.jsx(Xl,{size:14,className:"animate-spin"}),m?"Guardar cambios":"Crear"]})]})]})})]})}function Vg({children:s}){return localStorage.getItem("token")?l.jsx(l.Fragment,{children:s}):l.jsx(vo,{to:"/login",replace:!0})}function Hg(){return l.jsx(Y0,{basename:"/panel",children:l.jsxs(V0,{children:[l.jsx(yt,{path:"/login",element:l.jsx(cg,{})}),l.jsxs(yt,{path:"/",element:l.jsx(Vg,{children:l.jsx(mg,{})}),children:[l.jsx(yt,{index:!0,element:l.jsx(vo,{to:"/dashboard",replace:!0})}),l.jsx(yt,{path:"dashboard",element:l.jsx(bg,{})}),l.jsx(yt,{path:"providers",element:l.jsx(Eg,{})}),l.jsx(yt,{path:"users",element:l.jsx(Rg,{})}),l.jsx(yt,{path:"catalogs",element:l.jsx(Og,{})}),l.jsx(yt,{path:"custom-categories",element:l.jsx(Ag,{})}),l.jsx(yt,{path:"epg",element:l.jsx(zg,{})}),l.jsx(yt,{path:"logs",element:l.jsx(Ig,{})}),l.jsx(yt,{path:"settings",element:l.jsx($g,{})}),l.jsx(yt,{path:"jellyfin",element:l.jsx(Bg,{})})]}),l.jsx(yt,{path:"*",element:l.jsx(vo,{to:"/dashboard",replace:!0})})]})})}Gm.createRoot(document.getElementById("root")).render(l.jsx(rf.StrictMode,{children:l.jsx(Hg,{})}));