2025-09-17 15:58:37 -03:00

403 lines
361 KiB
JavaScript

function xh(n,a){for(var i=0;i<a.length;i++){const u=a[i];if(typeof u!="string"&&!Array.isArray(u)){for(const d in u)if(d!=="default"&&!(d in n)){const f=Object.getOwnPropertyDescriptor(u,d);f&&Object.defineProperty(n,d,f.get?f:{enumerable:!0,get:()=>u[d]})}}}return Object.freeze(Object.defineProperty(n,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"]'))u(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"&&u(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 u(d){if(d.ep)return;d.ep=!0;const f=i(d);fetch(d.href,f)}})();var ll=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ja(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function wh(n){if(Object.prototype.hasOwnProperty.call(n,"__esModule"))return n;var a=n.default;if(typeof a=="function"){var i=function u(){var d=!1;try{d=this instanceof u}catch{}return d?Reflect.construct(a,arguments,this.constructor):a.apply(this,arguments)};i.prototype=a.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(n).forEach(function(u){var d=Object.getOwnPropertyDescriptor(n,u);Object.defineProperty(i,u,d.get?d:{enumerable:!0,get:function(){return n[u]}})}),i}var ul={exports:{}},ha={},cl={exports:{}},me={};/**
* @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 Ud;function jh(){if(Ud)return me;Ud=1;var n=Symbol.for("react.element"),a=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),m=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),w=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),y=Symbol.iterator;function N(T){return T===null||typeof T!="object"?null:(T=y&&T[y]||T["@@iterator"],typeof T=="function"?T:null)}var O={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},$=Object.assign,z={};function P(T,U,de){this.props=T,this.context=U,this.refs=z,this.updater=de||O}P.prototype.isReactComponent={},P.prototype.setState=function(T,U){if(typeof T!="object"&&typeof T!="function"&&T!=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,T,U,"setState")},P.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function W(){}W.prototype=P.prototype;function _(T,U,de){this.props=T,this.context=U,this.refs=z,this.updater=de||O}var k=_.prototype=new W;k.constructor=_,$(k,P.prototype),k.isPureReactComponent=!0;var j=Array.isArray,D=Object.prototype.hasOwnProperty,R={current:null},A={key:!0,ref:!0,__self:!0,__source:!0};function Q(T,U,de){var he,ve={},ye=null,_e=null;if(U!=null)for(he in U.ref!==void 0&&(_e=U.ref),U.key!==void 0&&(ye=""+U.key),U)D.call(U,he)&&!A.hasOwnProperty(he)&&(ve[he]=U[he]);var we=arguments.length-2;if(we===1)ve.children=de;else if(1<we){for(var Pe=Array(we),ft=0;ft<we;ft++)Pe[ft]=arguments[ft+2];ve.children=Pe}if(T&&T.defaultProps)for(he in we=T.defaultProps,we)ve[he]===void 0&&(ve[he]=we[he]);return{$$typeof:n,type:T,key:ye,ref:_e,props:ve,_owner:R.current}}function oe(T,U){return{$$typeof:n,type:T.type,key:U,ref:T.ref,props:T.props,_owner:T._owner}}function fe(T){return typeof T=="object"&&T!==null&&T.$$typeof===n}function ce(T){var U={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(de){return U[de]})}var ie=/\/+/g;function pe(T,U){return typeof T=="object"&&T!==null&&T.key!=null?ce(""+T.key):U.toString(36)}function X(T,U,de,he,ve){var ye=typeof T;(ye==="undefined"||ye==="boolean")&&(T=null);var _e=!1;if(T===null)_e=!0;else switch(ye){case"string":case"number":_e=!0;break;case"object":switch(T.$$typeof){case n:case a:_e=!0}}if(_e)return _e=T,ve=ve(_e),T=he===""?"."+pe(_e,0):he,j(ve)?(de="",T!=null&&(de=T.replace(ie,"$&/")+"/"),X(ve,U,de,"",function(ft){return ft})):ve!=null&&(fe(ve)&&(ve=oe(ve,de+(!ve.key||_e&&_e.key===ve.key?"":(""+ve.key).replace(ie,"$&/")+"/")+T)),U.push(ve)),1;if(_e=0,he=he===""?".":he+":",j(T))for(var we=0;we<T.length;we++){ye=T[we];var Pe=he+pe(ye,we);_e+=X(ye,U,de,Pe,ve)}else if(Pe=N(T),typeof Pe=="function")for(T=Pe.call(T),we=0;!(ye=T.next()).done;)ye=ye.value,Pe=he+pe(ye,we++),_e+=X(ye,U,de,Pe,ve);else if(ye==="object")throw U=String(T),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.");return _e}function re(T,U,de){if(T==null)return T;var he=[],ve=0;return X(T,he,"","",function(ye){return U.call(de,ye,ve++)}),he}function le(T){if(T._status===-1){var U=T._result;U=U(),U.then(function(de){(T._status===0||T._status===-1)&&(T._status=1,T._result=de)},function(de){(T._status===0||T._status===-1)&&(T._status=2,T._result=de)}),T._status===-1&&(T._status=0,T._result=U)}if(T._status===1)return T._result.default;throw T._result}var E={current:null},F={transition:null},J={ReactCurrentDispatcher:E,ReactCurrentBatchConfig:F,ReactCurrentOwner:R};function Y(){throw Error("act(...) is not supported in production builds of React.")}return me.Children={map:re,forEach:function(T,U,de){re(T,function(){U.apply(this,arguments)},de)},count:function(T){var U=0;return re(T,function(){U++}),U},toArray:function(T){return re(T,function(U){return U})||[]},only:function(T){if(!fe(T))throw Error("React.Children.only expected to receive a single React element child.");return T}},me.Component=P,me.Fragment=i,me.Profiler=d,me.PureComponent=_,me.StrictMode=u,me.Suspense=g,me.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=J,me.act=Y,me.cloneElement=function(T,U,de){if(T==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+T+".");var he=$({},T.props),ve=T.key,ye=T.ref,_e=T._owner;if(U!=null){if(U.ref!==void 0&&(ye=U.ref,_e=R.current),U.key!==void 0&&(ve=""+U.key),T.type&&T.type.defaultProps)var we=T.type.defaultProps;for(Pe in U)D.call(U,Pe)&&!A.hasOwnProperty(Pe)&&(he[Pe]=U[Pe]===void 0&&we!==void 0?we[Pe]:U[Pe])}var Pe=arguments.length-2;if(Pe===1)he.children=de;else if(1<Pe){we=Array(Pe);for(var ft=0;ft<Pe;ft++)we[ft]=arguments[ft+2];he.children=we}return{$$typeof:n,type:T.type,key:ve,ref:ye,props:he,_owner:_e}},me.createContext=function(T){return T={$$typeof:m,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},T.Provider={$$typeof:f,_context:T},T.Consumer=T},me.createElement=Q,me.createFactory=function(T){var U=Q.bind(null,T);return U.type=T,U},me.createRef=function(){return{current:null}},me.forwardRef=function(T){return{$$typeof:v,render:T}},me.isValidElement=fe,me.lazy=function(T){return{$$typeof:h,_payload:{_status:-1,_result:T},_init:le}},me.memo=function(T,U){return{$$typeof:w,type:T,compare:U===void 0?null:U}},me.startTransition=function(T){var U=F.transition;F.transition={};try{T()}finally{F.transition=U}},me.unstable_act=Y,me.useCallback=function(T,U){return E.current.useCallback(T,U)},me.useContext=function(T){return E.current.useContext(T)},me.useDebugValue=function(){},me.useDeferredValue=function(T){return E.current.useDeferredValue(T)},me.useEffect=function(T,U){return E.current.useEffect(T,U)},me.useId=function(){return E.current.useId()},me.useImperativeHandle=function(T,U,de){return E.current.useImperativeHandle(T,U,de)},me.useInsertionEffect=function(T,U){return E.current.useInsertionEffect(T,U)},me.useLayoutEffect=function(T,U){return E.current.useLayoutEffect(T,U)},me.useMemo=function(T,U){return E.current.useMemo(T,U)},me.useReducer=function(T,U,de){return E.current.useReducer(T,U,de)},me.useRef=function(T){return E.current.useRef(T)},me.useState=function(T){return E.current.useState(T)},me.useSyncExternalStore=function(T,U,de){return E.current.useSyncExternalStore(T,U,de)},me.useTransition=function(){return E.current.useTransition()},me.version="18.3.1",me}var Fd;function Il(){return Fd||(Fd=1,cl.exports=jh()),cl.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 Hd;function Nh(){if(Hd)return ha;Hd=1;var n=Il(),a=Symbol.for("react.element"),i=Symbol.for("react.fragment"),u=Object.prototype.hasOwnProperty,d=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,f={key:!0,ref:!0,__self:!0,__source:!0};function m(v,g,w){var h,y={},N=null,O=null;w!==void 0&&(N=""+w),g.key!==void 0&&(N=""+g.key),g.ref!==void 0&&(O=g.ref);for(h in g)u.call(g,h)&&!f.hasOwnProperty(h)&&(y[h]=g[h]);if(v&&v.defaultProps)for(h in g=v.defaultProps,g)y[h]===void 0&&(y[h]=g[h]);return{$$typeof:a,type:v,key:N,ref:O,props:y,_owner:d.current}}return ha.Fragment=i,ha.jsx=m,ha.jsxs=m,ha}var Bd;function bh(){return Bd||(Bd=1,ul.exports=Nh()),ul.exports}var s=bh(),C=Il();const ke=ja(C),kh=xh({__proto__:null,default:ke},[C]);var $o={},dl={exports:{}},dt={},fl={exports:{}},ml={};/**
* @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 Wd;function Sh(){return Wd||(Wd=1,(function(n){function a(F,J){var Y=F.length;F.push(J);e:for(;0<Y;){var T=Y-1>>>1,U=F[T];if(0<d(U,J))F[T]=J,F[Y]=U,Y=T;else break e}}function i(F){return F.length===0?null:F[0]}function u(F){if(F.length===0)return null;var J=F[0],Y=F.pop();if(Y!==J){F[0]=Y;e:for(var T=0,U=F.length,de=U>>>1;T<de;){var he=2*(T+1)-1,ve=F[he],ye=he+1,_e=F[ye];if(0>d(ve,Y))ye<U&&0>d(_e,ve)?(F[T]=_e,F[ye]=Y,T=ye):(F[T]=ve,F[he]=Y,T=he);else if(ye<U&&0>d(_e,Y))F[T]=_e,F[ye]=Y,T=ye;else break e}}return J}function d(F,J){var Y=F.sortIndex-J.sortIndex;return Y!==0?Y:F.id-J.id}if(typeof performance=="object"&&typeof performance.now=="function"){var f=performance;n.unstable_now=function(){return f.now()}}else{var m=Date,v=m.now();n.unstable_now=function(){return m.now()-v}}var g=[],w=[],h=1,y=null,N=3,O=!1,$=!1,z=!1,P=typeof setTimeout=="function"?setTimeout:null,W=typeof clearTimeout=="function"?clearTimeout:null,_=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(F){for(var J=i(w);J!==null;){if(J.callback===null)u(w);else if(J.startTime<=F)u(w),J.sortIndex=J.expirationTime,a(g,J);else break;J=i(w)}}function j(F){if(z=!1,k(F),!$)if(i(g)!==null)$=!0,le(D);else{var J=i(w);J!==null&&E(j,J.startTime-F)}}function D(F,J){$=!1,z&&(z=!1,W(Q),Q=-1),O=!0;var Y=N;try{for(k(J),y=i(g);y!==null&&(!(y.expirationTime>J)||F&&!ce());){var T=y.callback;if(typeof T=="function"){y.callback=null,N=y.priorityLevel;var U=T(y.expirationTime<=J);J=n.unstable_now(),typeof U=="function"?y.callback=U:y===i(g)&&u(g),k(J)}else u(g);y=i(g)}if(y!==null)var de=!0;else{var he=i(w);he!==null&&E(j,he.startTime-J),de=!1}return de}finally{y=null,N=Y,O=!1}}var R=!1,A=null,Q=-1,oe=5,fe=-1;function ce(){return!(n.unstable_now()-fe<oe)}function ie(){if(A!==null){var F=n.unstable_now();fe=F;var J=!0;try{J=A(!0,F)}finally{J?pe():(R=!1,A=null)}}else R=!1}var pe;if(typeof _=="function")pe=function(){_(ie)};else if(typeof MessageChannel<"u"){var X=new MessageChannel,re=X.port2;X.port1.onmessage=ie,pe=function(){re.postMessage(null)}}else pe=function(){P(ie,0)};function le(F){A=F,R||(R=!0,pe())}function E(F,J){Q=P(function(){F(n.unstable_now())},J)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(F){F.callback=null},n.unstable_continueExecution=function(){$||O||($=!0,le(D))},n.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):oe=0<F?Math.floor(1e3/F):5},n.unstable_getCurrentPriorityLevel=function(){return N},n.unstable_getFirstCallbackNode=function(){return i(g)},n.unstable_next=function(F){switch(N){case 1:case 2:case 3:var J=3;break;default:J=N}var Y=N;N=J;try{return F()}finally{N=Y}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=function(){},n.unstable_runWithPriority=function(F,J){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var Y=N;N=F;try{return J()}finally{N=Y}},n.unstable_scheduleCallback=function(F,J,Y){var T=n.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0<Y?T+Y:T):Y=T,F){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}return U=Y+U,F={id:h++,callback:J,priorityLevel:F,startTime:Y,expirationTime:U,sortIndex:-1},Y>T?(F.sortIndex=Y,a(w,F),i(g)===null&&F===i(w)&&(z?(W(Q),Q=-1):z=!0,E(j,Y-T))):(F.sortIndex=U,a(g,F),$||O||($=!0,le(D))),F},n.unstable_shouldYield=ce,n.unstable_wrapCallback=function(F){var J=N;return function(){var Y=N;N=J;try{return F.apply(this,arguments)}finally{N=Y}}}})(ml)),ml}var Vd;function _h(){return Vd||(Vd=1,fl.exports=Sh()),fl.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 qd;function Ch(){if(qd)return dt;qd=1;var n=Il(),a=_h();function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var u=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++)u.add(t[e])}var v=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),g=Object.prototype.hasOwnProperty,w=/^[: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]*$/,h={},y={};function N(e){return g.call(y,e)?!0:g.call(h,e)?!1:w.test(e)?y[e]=!0:(h[e]=!0,!1)}function O(e,t,r,o){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return o?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function $(e,t,r,o){if(t===null||typeof t>"u"||O(e,t,r,o))return!0;if(o)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function z(e,t,r,o,l,c,p){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=o,this.attributeNamespace=l,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=c,this.removeEmptyString=p}var P={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){P[e]=new z(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];P[t]=new z(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){P[e]=new z(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){P[e]=new z(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){P[e]=new z(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){P[e]=new z(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){P[e]=new z(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){P[e]=new z(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){P[e]=new z(e,5,!1,e.toLowerCase(),null,!1,!1)});var W=/[\-:]([a-z])/g;function _(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(W,_);P[t]=new z(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(W,_);P[t]=new z(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(W,_);P[t]=new z(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){P[e]=new z(e,1,!1,e.toLowerCase(),null,!1,!1)}),P.xlinkHref=new z("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){P[e]=new z(e,1,!1,e.toLowerCase(),null,!0,!0)});function k(e,t,r,o){var l=P.hasOwnProperty(t)?P[t]:null;(l!==null?l.type!==0:o||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&($(t,r,l,o)&&(r=null),o||l===null?N(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):l.mustUseProperty?e[l.propertyName]=r===null?l.type===3?!1:"":r:(t=l.attributeName,o=l.attributeNamespace,r===null?e.removeAttribute(t):(l=l.type,r=l===3||l===4&&r===!0?"":""+r,o?e.setAttributeNS(o,t,r):e.setAttribute(t,r))))}var j=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,D=Symbol.for("react.element"),R=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),Q=Symbol.for("react.strict_mode"),oe=Symbol.for("react.profiler"),fe=Symbol.for("react.provider"),ce=Symbol.for("react.context"),ie=Symbol.for("react.forward_ref"),pe=Symbol.for("react.suspense"),X=Symbol.for("react.suspense_list"),re=Symbol.for("react.memo"),le=Symbol.for("react.lazy"),E=Symbol.for("react.offscreen"),F=Symbol.iterator;function J(e){return e===null||typeof e!="object"?null:(e=F&&e[F]||e["@@iterator"],typeof e=="function"?e:null)}var Y=Object.assign,T;function U(e){if(T===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);T=t&&t[1]||""}return`
`+T+e}var de=!1;function he(e,t){if(!e||de)return"";de=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(I){var o=I}Reflect.construct(e,[],t)}else{try{t.call()}catch(I){o=I}e.call(t.prototype)}else{try{throw Error()}catch(I){o=I}e()}}catch(I){if(I&&o&&typeof I.stack=="string"){for(var l=I.stack.split(`
`),c=o.stack.split(`
`),p=l.length-1,x=c.length-1;1<=p&&0<=x&&l[p]!==c[x];)x--;for(;1<=p&&0<=x;p--,x--)if(l[p]!==c[x]){if(p!==1||x!==1)do if(p--,x--,0>x||l[p]!==c[x]){var b=`
`+l[p].replace(" at new "," at ");return e.displayName&&b.includes("<anonymous>")&&(b=b.replace("<anonymous>",e.displayName)),b}while(1<=p&&0<=x);break}}}finally{de=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?U(e):""}function ve(e){switch(e.tag){case 5:return U(e.type);case 16:return U("Lazy");case 13:return U("Suspense");case 19:return U("SuspenseList");case 0:case 2:case 15:return e=he(e.type,!1),e;case 11:return e=he(e.type.render,!1),e;case 1:return e=he(e.type,!0),e;default:return""}}function ye(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 A:return"Fragment";case R:return"Portal";case oe:return"Profiler";case Q:return"StrictMode";case pe:return"Suspense";case X:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ce:return(e.displayName||"Context")+".Consumer";case fe:return(e._context.displayName||"Context")+".Provider";case ie:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case re:return t=e.displayName||null,t!==null?t:ye(e.type)||"Memo";case le:t=e._payload,e=e._init;try{return ye(e(t))}catch{}}return null}function _e(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 ye(t);case 8:return t===Q?"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 we(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Pe(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ft(e){var t=Pe(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),o=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var l=r.get,c=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(p){o=""+p,c.call(this,p)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return o},setValue:function(p){o=""+p},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ca(e){e._valueTracker||(e._valueTracker=ft(e))}function ql(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),o="";return e&&(o=Pe(e)?e.checked?"true":"false":e.value),e=o,e!==r?(t.setValue(e),!0):!1}function Ea(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 hs(e,t){var r=t.checked;return Y({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Ql(e,t){var r=t.defaultValue==null?"":t.defaultValue,o=t.checked!=null?t.checked:t.defaultChecked;r=we(t.value!=null?t.value:r),e._wrapperState={initialChecked:o,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Yl(e,t){t=t.checked,t!=null&&k(e,"checked",t,!1)}function gs(e,t){Yl(e,t);var r=we(t.value),o=t.type;if(r!=null)o==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(o==="submit"||o==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?vs(e,t.type,r):t.hasOwnProperty("defaultValue")&&vs(e,t.type,we(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Xl(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var o=t.type;if(!(o!=="submit"&&o!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function vs(e,t,r){(t!=="number"||Ea(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Pn=Array.isArray;function Kr(e,t,r,o){if(e=e.options,t){t={};for(var l=0;l<r.length;l++)t["$"+r[l]]=!0;for(r=0;r<e.length;r++)l=t.hasOwnProperty("$"+e[r].value),e[r].selected!==l&&(e[r].selected=l),l&&o&&(e[r].defaultSelected=!0)}else{for(r=""+we(r),t=null,l=0;l<e.length;l++){if(e[l].value===r){e[l].selected=!0,o&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function ys(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(i(91));return Y({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Kl(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(i(92));if(Pn(r)){if(1<r.length)throw Error(i(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:we(r)}}function Gl(e,t){var r=we(t.value),o=we(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),o!=null&&(e.defaultValue=""+o)}function Jl(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Zl(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 xs(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Zl(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ta,eu=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,o,l){MSApp.execUnsafeLocalFunction(function(){return e(t,r,o,l)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ta=Ta||document.createElement("div"),Ta.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ta.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Dn(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Mn={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},bm=["Webkit","ms","Moz","O"];Object.keys(Mn).forEach(function(e){bm.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Mn[t]=Mn[e]})});function tu(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Mn.hasOwnProperty(e)&&Mn[e]?(""+t).trim():t+"px"}function ru(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var o=r.indexOf("--")===0,l=tu(r,t[r],o);r==="float"&&(r="cssFloat"),o?e.setProperty(r,l):e[r]=l}}var km=Y({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 ws(e,t){if(t){if(km[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 js(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 Ns=null;function bs(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ks=null,Gr=null,Jr=null;function nu(e){if(e=ea(e)){if(typeof ks!="function")throw Error(i(280));var t=e.stateNode;t&&(t=Ja(t),ks(e.stateNode,e.type,t))}}function au(e){Gr?Jr?Jr.push(e):Jr=[e]:Gr=e}function ou(){if(Gr){var e=Gr,t=Jr;if(Jr=Gr=null,nu(e),t)for(e=0;e<t.length;e++)nu(t[e])}}function su(e,t){return e(t)}function iu(){}var Ss=!1;function lu(e,t,r){if(Ss)return e(t,r);Ss=!0;try{return su(e,t,r)}finally{Ss=!1,(Gr!==null||Jr!==null)&&(iu(),ou())}}function On(e,t){var r=e.stateNode;if(r===null)return null;var o=Ja(r);if(o===null)return null;r=o[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":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(i(231,t,typeof r));return r}var _s=!1;if(v)try{var Ln={};Object.defineProperty(Ln,"passive",{get:function(){_s=!0}}),window.addEventListener("test",Ln,Ln),window.removeEventListener("test",Ln,Ln)}catch{_s=!1}function Sm(e,t,r,o,l,c,p,x,b){var I=Array.prototype.slice.call(arguments,3);try{t.apply(r,I)}catch(B){this.onError(B)}}var Rn=!1,Pa=null,Da=!1,Cs=null,_m={onError:function(e){Rn=!0,Pa=e}};function Cm(e,t,r,o,l,c,p,x,b){Rn=!1,Pa=null,Sm.apply(_m,arguments)}function Em(e,t,r,o,l,c,p,x,b){if(Cm.apply(this,arguments),Rn){if(Rn){var I=Pa;Rn=!1,Pa=null}else throw Error(i(198));Da||(Da=!0,Cs=I)}}function Dr(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function uu(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 cu(e){if(Dr(e)!==e)throw Error(i(188))}function Tm(e){var t=e.alternate;if(!t){if(t=Dr(e),t===null)throw Error(i(188));return t!==e?null:e}for(var r=e,o=t;;){var l=r.return;if(l===null)break;var c=l.alternate;if(c===null){if(o=l.return,o!==null){r=o;continue}break}if(l.child===c.child){for(c=l.child;c;){if(c===r)return cu(l),e;if(c===o)return cu(l),t;c=c.sibling}throw Error(i(188))}if(r.return!==o.return)r=l,o=c;else{for(var p=!1,x=l.child;x;){if(x===r){p=!0,r=l,o=c;break}if(x===o){p=!0,o=l,r=c;break}x=x.sibling}if(!p){for(x=c.child;x;){if(x===r){p=!0,r=c,o=l;break}if(x===o){p=!0,o=c,r=l;break}x=x.sibling}if(!p)throw Error(i(189))}}if(r.alternate!==o)throw Error(i(190))}if(r.tag!==3)throw Error(i(188));return r.stateNode.current===r?e:t}function du(e){return e=Tm(e),e!==null?fu(e):null}function fu(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=fu(e);if(t!==null)return t;e=e.sibling}return null}var mu=a.unstable_scheduleCallback,pu=a.unstable_cancelCallback,Pm=a.unstable_shouldYield,Dm=a.unstable_requestPaint,ze=a.unstable_now,Mm=a.unstable_getCurrentPriorityLevel,Es=a.unstable_ImmediatePriority,hu=a.unstable_UserBlockingPriority,Ma=a.unstable_NormalPriority,Om=a.unstable_LowPriority,gu=a.unstable_IdlePriority,Oa=null,Lt=null;function Lm(e){if(Lt&&typeof Lt.onCommitFiberRoot=="function")try{Lt.onCommitFiberRoot(Oa,e,void 0,(e.current.flags&128)===128)}catch{}}var St=Math.clz32?Math.clz32:zm,Rm=Math.log,Im=Math.LN2;function zm(e){return e>>>=0,e===0?32:31-(Rm(e)/Im|0)|0}var La=64,Ra=4194304;function In(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 Ia(e,t){var r=e.pendingLanes;if(r===0)return 0;var o=0,l=e.suspendedLanes,c=e.pingedLanes,p=r&268435455;if(p!==0){var x=p&~l;x!==0?o=In(x):(c&=p,c!==0&&(o=In(c)))}else p=r&~l,p!==0?o=In(p):c!==0&&(o=In(c));if(o===0)return 0;if(t!==0&&t!==o&&(t&l)===0&&(l=o&-o,c=t&-t,l>=c||l===16&&(c&4194240)!==0))return t;if((o&4)!==0&&(o|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=o;0<t;)r=31-St(t),l=1<<r,o|=e[r],t&=~l;return o}function $m(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 Am(e,t){for(var r=e.suspendedLanes,o=e.pingedLanes,l=e.expirationTimes,c=e.pendingLanes;0<c;){var p=31-St(c),x=1<<p,b=l[p];b===-1?((x&r)===0||(x&o)!==0)&&(l[p]=$m(x,t)):b<=t&&(e.expiredLanes|=x),c&=~x}}function Ts(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function vu(){var e=La;return La<<=1,(La&4194240)===0&&(La=64),e}function Ps(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function zn(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-St(t),e[t]=r}function Um(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var o=e.eventTimes;for(e=e.expirationTimes;0<r;){var l=31-St(r),c=1<<l;t[l]=0,o[l]=-1,e[l]=-1,r&=~c}}function Ds(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var o=31-St(r),l=1<<o;l&t|e[o]&t&&(e[o]|=t),r&=~l}}var je=0;function yu(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var xu,Ms,wu,ju,Nu,Os=!1,za=[],rr=null,nr=null,ar=null,$n=new Map,An=new Map,or=[],Fm="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 bu(e,t){switch(e){case"focusin":case"focusout":rr=null;break;case"dragenter":case"dragleave":nr=null;break;case"mouseover":case"mouseout":ar=null;break;case"pointerover":case"pointerout":$n.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":An.delete(t.pointerId)}}function Un(e,t,r,o,l,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:r,eventSystemFlags:o,nativeEvent:c,targetContainers:[l]},t!==null&&(t=ea(t),t!==null&&Ms(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function Hm(e,t,r,o,l){switch(t){case"focusin":return rr=Un(rr,e,t,r,o,l),!0;case"dragenter":return nr=Un(nr,e,t,r,o,l),!0;case"mouseover":return ar=Un(ar,e,t,r,o,l),!0;case"pointerover":var c=l.pointerId;return $n.set(c,Un($n.get(c)||null,e,t,r,o,l)),!0;case"gotpointercapture":return c=l.pointerId,An.set(c,Un(An.get(c)||null,e,t,r,o,l)),!0}return!1}function ku(e){var t=Mr(e.target);if(t!==null){var r=Dr(t);if(r!==null){if(t=r.tag,t===13){if(t=uu(r),t!==null){e.blockedOn=t,Nu(e.priority,function(){wu(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function $a(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Rs(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var o=new r.constructor(r.type,r);Ns=o,r.target.dispatchEvent(o),Ns=null}else return t=ea(r),t!==null&&Ms(t),e.blockedOn=r,!1;t.shift()}return!0}function Su(e,t,r){$a(e)&&r.delete(t)}function Bm(){Os=!1,rr!==null&&$a(rr)&&(rr=null),nr!==null&&$a(nr)&&(nr=null),ar!==null&&$a(ar)&&(ar=null),$n.forEach(Su),An.forEach(Su)}function Fn(e,t){e.blockedOn===t&&(e.blockedOn=null,Os||(Os=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,Bm)))}function Hn(e){function t(l){return Fn(l,e)}if(0<za.length){Fn(za[0],e);for(var r=1;r<za.length;r++){var o=za[r];o.blockedOn===e&&(o.blockedOn=null)}}for(rr!==null&&Fn(rr,e),nr!==null&&Fn(nr,e),ar!==null&&Fn(ar,e),$n.forEach(t),An.forEach(t),r=0;r<or.length;r++)o=or[r],o.blockedOn===e&&(o.blockedOn=null);for(;0<or.length&&(r=or[0],r.blockedOn===null);)ku(r),r.blockedOn===null&&or.shift()}var Zr=j.ReactCurrentBatchConfig,Aa=!0;function Wm(e,t,r,o){var l=je,c=Zr.transition;Zr.transition=null;try{je=1,Ls(e,t,r,o)}finally{je=l,Zr.transition=c}}function Vm(e,t,r,o){var l=je,c=Zr.transition;Zr.transition=null;try{je=4,Ls(e,t,r,o)}finally{je=l,Zr.transition=c}}function Ls(e,t,r,o){if(Aa){var l=Rs(e,t,r,o);if(l===null)Js(e,t,o,Ua,r),bu(e,o);else if(Hm(l,e,t,r,o))o.stopPropagation();else if(bu(e,o),t&4&&-1<Fm.indexOf(e)){for(;l!==null;){var c=ea(l);if(c!==null&&xu(c),c=Rs(e,t,r,o),c===null&&Js(e,t,o,Ua,r),c===l)break;l=c}l!==null&&o.stopPropagation()}else Js(e,t,o,null,r)}}var Ua=null;function Rs(e,t,r,o){if(Ua=null,e=bs(o),e=Mr(e),e!==null)if(t=Dr(e),t===null)e=null;else if(r=t.tag,r===13){if(e=uu(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Ua=e,null}function _u(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(Mm()){case Es:return 1;case hu:return 4;case Ma:case Om:return 16;case gu:return 536870912;default:return 16}default:return 16}}var sr=null,Is=null,Fa=null;function Cu(){if(Fa)return Fa;var e,t=Is,r=t.length,o,l="value"in sr?sr.value:sr.textContent,c=l.length;for(e=0;e<r&&t[e]===l[e];e++);var p=r-e;for(o=1;o<=p&&t[r-o]===l[c-o];o++);return Fa=l.slice(e,1<o?1-o:void 0)}function Ha(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 Ba(){return!0}function Eu(){return!1}function mt(e){function t(r,o,l,c,p){this._reactName=r,this._targetInst=l,this.type=o,this.nativeEvent=c,this.target=p,this.currentTarget=null;for(var x in e)e.hasOwnProperty(x)&&(r=e[x],this[x]=r?r(c):c[x]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?Ba:Eu,this.isPropagationStopped=Eu,this}return Y(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Ba)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Ba)},persist:function(){},isPersistent:Ba}),t}var en={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},zs=mt(en),Bn=Y({},en,{view:0,detail:0}),qm=mt(Bn),$s,As,Wn,Wa=Y({},Bn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fs,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!==Wn&&(Wn&&e.type==="mousemove"?($s=e.screenX-Wn.screenX,As=e.screenY-Wn.screenY):As=$s=0,Wn=e),$s)},movementY:function(e){return"movementY"in e?e.movementY:As}}),Tu=mt(Wa),Qm=Y({},Wa,{dataTransfer:0}),Ym=mt(Qm),Xm=Y({},Bn,{relatedTarget:0}),Us=mt(Xm),Km=Y({},en,{animationName:0,elapsedTime:0,pseudoElement:0}),Gm=mt(Km),Jm=Y({},en,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Zm=mt(Jm),ep=Y({},en,{data:0}),Pu=mt(ep),tp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},rp={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"},np={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ap(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=np[e])?!!t[e]:!1}function Fs(){return ap}var op=Y({},Bn,{key:function(e){if(e.key){var t=tp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ha(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?rp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fs,charCode:function(e){return e.type==="keypress"?Ha(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ha(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),sp=mt(op),ip=Y({},Wa,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Du=mt(ip),lp=Y({},Bn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fs}),up=mt(lp),cp=Y({},en,{propertyName:0,elapsedTime:0,pseudoElement:0}),dp=mt(cp),fp=Y({},Wa,{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}),mp=mt(fp),pp=[9,13,27,32],Hs=v&&"CompositionEvent"in window,Vn=null;v&&"documentMode"in document&&(Vn=document.documentMode);var hp=v&&"TextEvent"in window&&!Vn,Mu=v&&(!Hs||Vn&&8<Vn&&11>=Vn),Ou=" ",Lu=!1;function Ru(e,t){switch(e){case"keyup":return pp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Iu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var tn=!1;function gp(e,t){switch(e){case"compositionend":return Iu(t);case"keypress":return t.which!==32?null:(Lu=!0,Ou);case"textInput":return e=t.data,e===Ou&&Lu?null:e;default:return null}}function vp(e,t){if(tn)return e==="compositionend"||!Hs&&Ru(e,t)?(e=Cu(),Fa=Is=sr=null,tn=!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 Mu&&t.locale!=="ko"?null:t.data;default:return null}}var yp={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 zu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!yp[e.type]:t==="textarea"}function $u(e,t,r,o){au(o),t=Xa(t,"onChange"),0<t.length&&(r=new zs("onChange","change",null,r,o),e.push({event:r,listeners:t}))}var qn=null,Qn=null;function xp(e){rc(e,0)}function Va(e){var t=sn(e);if(ql(t))return e}function wp(e,t){if(e==="change")return t}var Au=!1;if(v){var Bs;if(v){var Ws="oninput"in document;if(!Ws){var Uu=document.createElement("div");Uu.setAttribute("oninput","return;"),Ws=typeof Uu.oninput=="function"}Bs=Ws}else Bs=!1;Au=Bs&&(!document.documentMode||9<document.documentMode)}function Fu(){qn&&(qn.detachEvent("onpropertychange",Hu),Qn=qn=null)}function Hu(e){if(e.propertyName==="value"&&Va(Qn)){var t=[];$u(t,Qn,e,bs(e)),lu(xp,t)}}function jp(e,t,r){e==="focusin"?(Fu(),qn=t,Qn=r,qn.attachEvent("onpropertychange",Hu)):e==="focusout"&&Fu()}function Np(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Va(Qn)}function bp(e,t){if(e==="click")return Va(t)}function kp(e,t){if(e==="input"||e==="change")return Va(t)}function Sp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var _t=typeof Object.is=="function"?Object.is:Sp;function Yn(e,t){if(_t(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;for(o=0;o<r.length;o++){var l=r[o];if(!g.call(t,l)||!_t(e[l],t[l]))return!1}return!0}function Bu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Wu(e,t){var r=Bu(e);e=0;for(var o;r;){if(r.nodeType===3){if(o=e+r.textContent.length,e<=t&&o>=t)return{node:r,offset:t-e};e=o}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Bu(r)}}function Vu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Vu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function qu(){for(var e=window,t=Ea();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Ea(e.document)}return t}function Vs(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 _p(e){var t=qu(),r=e.focusedElem,o=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Vu(r.ownerDocument.documentElement,r)){if(o!==null&&Vs(r)){if(t=o.start,e=o.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=r.textContent.length,c=Math.min(o.start,l);o=o.end===void 0?c:Math.min(o.end,l),!e.extend&&c>o&&(l=o,o=c,c=l),l=Wu(r,c);var p=Wu(r,o);l&&p&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==p.node||e.focusOffset!==p.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),c>o?(e.addRange(t),e.extend(p.node,p.offset)):(t.setEnd(p.node,p.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Cp=v&&"documentMode"in document&&11>=document.documentMode,rn=null,qs=null,Xn=null,Qs=!1;function Qu(e,t,r){var o=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Qs||rn==null||rn!==Ea(o)||(o=rn,"selectionStart"in o&&Vs(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Xn&&Yn(Xn,o)||(Xn=o,o=Xa(qs,"onSelect"),0<o.length&&(t=new zs("onSelect","select",null,t,r),e.push({event:t,listeners:o}),t.target=rn)))}function qa(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var nn={animationend:qa("Animation","AnimationEnd"),animationiteration:qa("Animation","AnimationIteration"),animationstart:qa("Animation","AnimationStart"),transitionend:qa("Transition","TransitionEnd")},Ys={},Yu={};v&&(Yu=document.createElement("div").style,"AnimationEvent"in window||(delete nn.animationend.animation,delete nn.animationiteration.animation,delete nn.animationstart.animation),"TransitionEvent"in window||delete nn.transitionend.transition);function Qa(e){if(Ys[e])return Ys[e];if(!nn[e])return e;var t=nn[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Yu)return Ys[e]=t[r];return e}var Xu=Qa("animationend"),Ku=Qa("animationiteration"),Gu=Qa("animationstart"),Ju=Qa("transitionend"),Zu=new Map,ec="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 ir(e,t){Zu.set(e,t),f(t,[e])}for(var Xs=0;Xs<ec.length;Xs++){var Ks=ec[Xs],Ep=Ks.toLowerCase(),Tp=Ks[0].toUpperCase()+Ks.slice(1);ir(Ep,"on"+Tp)}ir(Xu,"onAnimationEnd"),ir(Ku,"onAnimationIteration"),ir(Gu,"onAnimationStart"),ir("dblclick","onDoubleClick"),ir("focusin","onFocus"),ir("focusout","onBlur"),ir(Ju,"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 Kn="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(" "),Pp=new Set("cancel close invalid load scroll toggle".split(" ").concat(Kn));function tc(e,t,r){var o=e.type||"unknown-event";e.currentTarget=r,Em(o,t,void 0,e),e.currentTarget=null}function rc(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var o=e[r],l=o.event;o=o.listeners;e:{var c=void 0;if(t)for(var p=o.length-1;0<=p;p--){var x=o[p],b=x.instance,I=x.currentTarget;if(x=x.listener,b!==c&&l.isPropagationStopped())break e;tc(l,x,I),c=b}else for(p=0;p<o.length;p++){if(x=o[p],b=x.instance,I=x.currentTarget,x=x.listener,b!==c&&l.isPropagationStopped())break e;tc(l,x,I),c=b}}}if(Da)throw e=Cs,Da=!1,Cs=null,e}function Ee(e,t){var r=t[ai];r===void 0&&(r=t[ai]=new Set);var o=e+"__bubble";r.has(o)||(nc(t,e,2,!1),r.add(o))}function Gs(e,t,r){var o=0;t&&(o|=4),nc(r,e,o,t)}var Ya="_reactListening"+Math.random().toString(36).slice(2);function Gn(e){if(!e[Ya]){e[Ya]=!0,u.forEach(function(r){r!=="selectionchange"&&(Pp.has(r)||Gs(r,!1,e),Gs(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ya]||(t[Ya]=!0,Gs("selectionchange",!1,t))}}function nc(e,t,r,o){switch(_u(t)){case 1:var l=Wm;break;case 4:l=Vm;break;default:l=Ls}r=l.bind(null,t,r,e),l=void 0,!_s||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),o?l!==void 0?e.addEventListener(t,r,{capture:!0,passive:l}):e.addEventListener(t,r,!0):l!==void 0?e.addEventListener(t,r,{passive:l}):e.addEventListener(t,r,!1)}function Js(e,t,r,o,l){var c=o;if((t&1)===0&&(t&2)===0&&o!==null)e:for(;;){if(o===null)return;var p=o.tag;if(p===3||p===4){var x=o.stateNode.containerInfo;if(x===l||x.nodeType===8&&x.parentNode===l)break;if(p===4)for(p=o.return;p!==null;){var b=p.tag;if((b===3||b===4)&&(b=p.stateNode.containerInfo,b===l||b.nodeType===8&&b.parentNode===l))return;p=p.return}for(;x!==null;){if(p=Mr(x),p===null)return;if(b=p.tag,b===5||b===6){o=c=p;continue e}x=x.parentNode}}o=o.return}lu(function(){var I=c,B=bs(r),V=[];e:{var H=Zu.get(e);if(H!==void 0){var K=zs,Z=e;switch(e){case"keypress":if(Ha(r)===0)break e;case"keydown":case"keyup":K=sp;break;case"focusin":Z="focus",K=Us;break;case"focusout":Z="blur",K=Us;break;case"beforeblur":case"afterblur":K=Us;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":K=Tu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":K=Ym;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":K=up;break;case Xu:case Ku:case Gu:K=Gm;break;case Ju:K=dp;break;case"scroll":K=qm;break;case"wheel":K=mp;break;case"copy":case"cut":case"paste":K=Zm;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":K=Du}var ee=(t&4)!==0,$e=!ee&&e==="scroll",M=ee?H!==null?H+"Capture":null:H;ee=[];for(var S=I,L;S!==null;){L=S;var q=L.stateNode;if(L.tag===5&&q!==null&&(L=q,M!==null&&(q=On(S,M),q!=null&&ee.push(Jn(S,q,L)))),$e)break;S=S.return}0<ee.length&&(H=new K(H,Z,null,r,B),V.push({event:H,listeners:ee}))}}if((t&7)===0){e:{if(H=e==="mouseover"||e==="pointerover",K=e==="mouseout"||e==="pointerout",H&&r!==Ns&&(Z=r.relatedTarget||r.fromElement)&&(Mr(Z)||Z[Ht]))break e;if((K||H)&&(H=B.window===B?B:(H=B.ownerDocument)?H.defaultView||H.parentWindow:window,K?(Z=r.relatedTarget||r.toElement,K=I,Z=Z?Mr(Z):null,Z!==null&&($e=Dr(Z),Z!==$e||Z.tag!==5&&Z.tag!==6)&&(Z=null)):(K=null,Z=I),K!==Z)){if(ee=Tu,q="onMouseLeave",M="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(ee=Du,q="onPointerLeave",M="onPointerEnter",S="pointer"),$e=K==null?H:sn(K),L=Z==null?H:sn(Z),H=new ee(q,S+"leave",K,r,B),H.target=$e,H.relatedTarget=L,q=null,Mr(B)===I&&(ee=new ee(M,S+"enter",Z,r,B),ee.target=L,ee.relatedTarget=$e,q=ee),$e=q,K&&Z)t:{for(ee=K,M=Z,S=0,L=ee;L;L=an(L))S++;for(L=0,q=M;q;q=an(q))L++;for(;0<S-L;)ee=an(ee),S--;for(;0<L-S;)M=an(M),L--;for(;S--;){if(ee===M||M!==null&&ee===M.alternate)break t;ee=an(ee),M=an(M)}ee=null}else ee=null;K!==null&&ac(V,H,K,ee,!1),Z!==null&&$e!==null&&ac(V,$e,Z,ee,!0)}}e:{if(H=I?sn(I):window,K=H.nodeName&&H.nodeName.toLowerCase(),K==="select"||K==="input"&&H.type==="file")var te=wp;else if(zu(H))if(Au)te=kp;else{te=Np;var ne=jp}else(K=H.nodeName)&&K.toLowerCase()==="input"&&(H.type==="checkbox"||H.type==="radio")&&(te=bp);if(te&&(te=te(e,I))){$u(V,te,r,B);break e}ne&&ne(e,H,I),e==="focusout"&&(ne=H._wrapperState)&&ne.controlled&&H.type==="number"&&vs(H,"number",H.value)}switch(ne=I?sn(I):window,e){case"focusin":(zu(ne)||ne.contentEditable==="true")&&(rn=ne,qs=I,Xn=null);break;case"focusout":Xn=qs=rn=null;break;case"mousedown":Qs=!0;break;case"contextmenu":case"mouseup":case"dragend":Qs=!1,Qu(V,r,B);break;case"selectionchange":if(Cp)break;case"keydown":case"keyup":Qu(V,r,B)}var ae;if(Hs)e:{switch(e){case"compositionstart":var se="onCompositionStart";break e;case"compositionend":se="onCompositionEnd";break e;case"compositionupdate":se="onCompositionUpdate";break e}se=void 0}else tn?Ru(e,r)&&(se="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(se="onCompositionStart");se&&(Mu&&r.locale!=="ko"&&(tn||se!=="onCompositionStart"?se==="onCompositionEnd"&&tn&&(ae=Cu()):(sr=B,Is="value"in sr?sr.value:sr.textContent,tn=!0)),ne=Xa(I,se),0<ne.length&&(se=new Pu(se,e,null,r,B),V.push({event:se,listeners:ne}),ae?se.data=ae:(ae=Iu(r),ae!==null&&(se.data=ae)))),(ae=hp?gp(e,r):vp(e,r))&&(I=Xa(I,"onBeforeInput"),0<I.length&&(B=new Pu("onBeforeInput","beforeinput",null,r,B),V.push({event:B,listeners:I}),B.data=ae))}rc(V,t)})}function Jn(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Xa(e,t){for(var r=t+"Capture",o=[];e!==null;){var l=e,c=l.stateNode;l.tag===5&&c!==null&&(l=c,c=On(e,r),c!=null&&o.unshift(Jn(e,c,l)),c=On(e,t),c!=null&&o.push(Jn(e,c,l))),e=e.return}return o}function an(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function ac(e,t,r,o,l){for(var c=t._reactName,p=[];r!==null&&r!==o;){var x=r,b=x.alternate,I=x.stateNode;if(b!==null&&b===o)break;x.tag===5&&I!==null&&(x=I,l?(b=On(r,c),b!=null&&p.unshift(Jn(r,b,x))):l||(b=On(r,c),b!=null&&p.push(Jn(r,b,x)))),r=r.return}p.length!==0&&e.push({event:t,listeners:p})}var Dp=/\r\n?/g,Mp=/\u0000|\uFFFD/g;function oc(e){return(typeof e=="string"?e:""+e).replace(Dp,`
`).replace(Mp,"")}function Ka(e,t,r){if(t=oc(t),oc(e)!==t&&r)throw Error(i(425))}function Ga(){}var Zs=null,ei=null;function ti(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 ri=typeof setTimeout=="function"?setTimeout:void 0,Op=typeof clearTimeout=="function"?clearTimeout:void 0,sc=typeof Promise=="function"?Promise:void 0,Lp=typeof queueMicrotask=="function"?queueMicrotask:typeof sc<"u"?function(e){return sc.resolve(null).then(e).catch(Rp)}:ri;function Rp(e){setTimeout(function(){throw e})}function ni(e,t){var r=t,o=0;do{var l=r.nextSibling;if(e.removeChild(r),l&&l.nodeType===8)if(r=l.data,r==="/$"){if(o===0){e.removeChild(l),Hn(t);return}o--}else r!=="$"&&r!=="$?"&&r!=="$!"||o++;r=l}while(r);Hn(t)}function lr(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 ic(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var on=Math.random().toString(36).slice(2),Rt="__reactFiber$"+on,Zn="__reactProps$"+on,Ht="__reactContainer$"+on,ai="__reactEvents$"+on,Ip="__reactListeners$"+on,zp="__reactHandles$"+on;function Mr(e){var t=e[Rt];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Ht]||r[Rt]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=ic(e);e!==null;){if(r=e[Rt])return r;e=ic(e)}return t}e=r,r=e.parentNode}return null}function ea(e){return e=e[Rt]||e[Ht],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function sn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(i(33))}function Ja(e){return e[Zn]||null}var oi=[],ln=-1;function ur(e){return{current:e}}function Te(e){0>ln||(e.current=oi[ln],oi[ln]=null,ln--)}function Ce(e,t){ln++,oi[ln]=e.current,e.current=t}var cr={},Ge=ur(cr),st=ur(!1),Or=cr;function un(e,t){var r=e.type.contextTypes;if(!r)return cr;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===t)return o.__reactInternalMemoizedMaskedChildContext;var l={},c;for(c in r)l[c]=t[c];return o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function it(e){return e=e.childContextTypes,e!=null}function Za(){Te(st),Te(Ge)}function lc(e,t,r){if(Ge.current!==cr)throw Error(i(168));Ce(Ge,t),Ce(st,r)}function uc(e,t,r){var o=e.stateNode;if(t=t.childContextTypes,typeof o.getChildContext!="function")return r;o=o.getChildContext();for(var l in o)if(!(l in t))throw Error(i(108,_e(e)||"Unknown",l));return Y({},r,o)}function eo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||cr,Or=Ge.current,Ce(Ge,e),Ce(st,st.current),!0}function cc(e,t,r){var o=e.stateNode;if(!o)throw Error(i(169));r?(e=uc(e,t,Or),o.__reactInternalMemoizedMergedChildContext=e,Te(st),Te(Ge),Ce(Ge,e)):Te(st),Ce(st,r)}var Bt=null,to=!1,si=!1;function dc(e){Bt===null?Bt=[e]:Bt.push(e)}function $p(e){to=!0,dc(e)}function dr(){if(!si&&Bt!==null){si=!0;var e=0,t=je;try{var r=Bt;for(je=1;e<r.length;e++){var o=r[e];do o=o(!0);while(o!==null)}Bt=null,to=!1}catch(l){throw Bt!==null&&(Bt=Bt.slice(e+1)),mu(Es,dr),l}finally{je=t,si=!1}}return null}var cn=[],dn=0,ro=null,no=0,vt=[],yt=0,Lr=null,Wt=1,Vt="";function Rr(e,t){cn[dn++]=no,cn[dn++]=ro,ro=e,no=t}function fc(e,t,r){vt[yt++]=Wt,vt[yt++]=Vt,vt[yt++]=Lr,Lr=e;var o=Wt;e=Vt;var l=32-St(o)-1;o&=~(1<<l),r+=1;var c=32-St(t)+l;if(30<c){var p=l-l%5;c=(o&(1<<p)-1).toString(32),o>>=p,l-=p,Wt=1<<32-St(t)+l|r<<l|o,Vt=c+e}else Wt=1<<c|r<<l|o,Vt=e}function ii(e){e.return!==null&&(Rr(e,1),fc(e,1,0))}function li(e){for(;e===ro;)ro=cn[--dn],cn[dn]=null,no=cn[--dn],cn[dn]=null;for(;e===Lr;)Lr=vt[--yt],vt[yt]=null,Vt=vt[--yt],vt[yt]=null,Wt=vt[--yt],vt[yt]=null}var pt=null,ht=null,De=!1,Ct=null;function mc(e,t){var r=Nt(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function pc(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,pt=e,ht=lr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,pt=e,ht=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Lr!==null?{id:Wt,overflow:Vt}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=Nt(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,pt=e,ht=null,!0):!1;default:return!1}}function ui(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ci(e){if(De){var t=ht;if(t){var r=t;if(!pc(e,t)){if(ui(e))throw Error(i(418));t=lr(r.nextSibling);var o=pt;t&&pc(e,t)?mc(o,r):(e.flags=e.flags&-4097|2,De=!1,pt=e)}}else{if(ui(e))throw Error(i(418));e.flags=e.flags&-4097|2,De=!1,pt=e}}}function hc(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;pt=e}function ao(e){if(e!==pt)return!1;if(!De)return hc(e),De=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!ti(e.type,e.memoizedProps)),t&&(t=ht)){if(ui(e))throw gc(),Error(i(418));for(;t;)mc(e,t),t=lr(t.nextSibling)}if(hc(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 r=e.data;if(r==="/$"){if(t===0){ht=lr(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}ht=null}}else ht=pt?lr(e.stateNode.nextSibling):null;return!0}function gc(){for(var e=ht;e;)e=lr(e.nextSibling)}function fn(){ht=pt=null,De=!1}function di(e){Ct===null?Ct=[e]:Ct.push(e)}var Ap=j.ReactCurrentBatchConfig;function ta(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(i(309));var o=r.stateNode}if(!o)throw Error(i(147,e));var l=o,c=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===c?t.ref:(t=function(p){var x=l.refs;p===null?delete x[c]:x[c]=p},t._stringRef=c,t)}if(typeof e!="string")throw Error(i(284));if(!r._owner)throw Error(i(290,e))}return e}function oo(e,t){throw e=Object.prototype.toString.call(t),Error(i(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function vc(e){var t=e._init;return t(e._payload)}function yc(e){function t(M,S){if(e){var L=M.deletions;L===null?(M.deletions=[S],M.flags|=16):L.push(S)}}function r(M,S){if(!e)return null;for(;S!==null;)t(M,S),S=S.sibling;return null}function o(M,S){for(M=new Map;S!==null;)S.key!==null?M.set(S.key,S):M.set(S.index,S),S=S.sibling;return M}function l(M,S){return M=xr(M,S),M.index=0,M.sibling=null,M}function c(M,S,L){return M.index=L,e?(L=M.alternate,L!==null?(L=L.index,L<S?(M.flags|=2,S):L):(M.flags|=2,S)):(M.flags|=1048576,S)}function p(M){return e&&M.alternate===null&&(M.flags|=2),M}function x(M,S,L,q){return S===null||S.tag!==6?(S=rl(L,M.mode,q),S.return=M,S):(S=l(S,L),S.return=M,S)}function b(M,S,L,q){var te=L.type;return te===A?B(M,S,L.props.children,q,L.key):S!==null&&(S.elementType===te||typeof te=="object"&&te!==null&&te.$$typeof===le&&vc(te)===S.type)?(q=l(S,L.props),q.ref=ta(M,S,L),q.return=M,q):(q=Po(L.type,L.key,L.props,null,M.mode,q),q.ref=ta(M,S,L),q.return=M,q)}function I(M,S,L,q){return S===null||S.tag!==4||S.stateNode.containerInfo!==L.containerInfo||S.stateNode.implementation!==L.implementation?(S=nl(L,M.mode,q),S.return=M,S):(S=l(S,L.children||[]),S.return=M,S)}function B(M,S,L,q,te){return S===null||S.tag!==7?(S=Br(L,M.mode,q,te),S.return=M,S):(S=l(S,L),S.return=M,S)}function V(M,S,L){if(typeof S=="string"&&S!==""||typeof S=="number")return S=rl(""+S,M.mode,L),S.return=M,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case D:return L=Po(S.type,S.key,S.props,null,M.mode,L),L.ref=ta(M,null,S),L.return=M,L;case R:return S=nl(S,M.mode,L),S.return=M,S;case le:var q=S._init;return V(M,q(S._payload),L)}if(Pn(S)||J(S))return S=Br(S,M.mode,L,null),S.return=M,S;oo(M,S)}return null}function H(M,S,L,q){var te=S!==null?S.key:null;if(typeof L=="string"&&L!==""||typeof L=="number")return te!==null?null:x(M,S,""+L,q);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case D:return L.key===te?b(M,S,L,q):null;case R:return L.key===te?I(M,S,L,q):null;case le:return te=L._init,H(M,S,te(L._payload),q)}if(Pn(L)||J(L))return te!==null?null:B(M,S,L,q,null);oo(M,L)}return null}function K(M,S,L,q,te){if(typeof q=="string"&&q!==""||typeof q=="number")return M=M.get(L)||null,x(S,M,""+q,te);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case D:return M=M.get(q.key===null?L:q.key)||null,b(S,M,q,te);case R:return M=M.get(q.key===null?L:q.key)||null,I(S,M,q,te);case le:var ne=q._init;return K(M,S,L,ne(q._payload),te)}if(Pn(q)||J(q))return M=M.get(L)||null,B(S,M,q,te,null);oo(S,q)}return null}function Z(M,S,L,q){for(var te=null,ne=null,ae=S,se=S=0,Qe=null;ae!==null&&se<L.length;se++){ae.index>se?(Qe=ae,ae=null):Qe=ae.sibling;var xe=H(M,ae,L[se],q);if(xe===null){ae===null&&(ae=Qe);break}e&&ae&&xe.alternate===null&&t(M,ae),S=c(xe,S,se),ne===null?te=xe:ne.sibling=xe,ne=xe,ae=Qe}if(se===L.length)return r(M,ae),De&&Rr(M,se),te;if(ae===null){for(;se<L.length;se++)ae=V(M,L[se],q),ae!==null&&(S=c(ae,S,se),ne===null?te=ae:ne.sibling=ae,ne=ae);return De&&Rr(M,se),te}for(ae=o(M,ae);se<L.length;se++)Qe=K(ae,M,se,L[se],q),Qe!==null&&(e&&Qe.alternate!==null&&ae.delete(Qe.key===null?se:Qe.key),S=c(Qe,S,se),ne===null?te=Qe:ne.sibling=Qe,ne=Qe);return e&&ae.forEach(function(wr){return t(M,wr)}),De&&Rr(M,se),te}function ee(M,S,L,q){var te=J(L);if(typeof te!="function")throw Error(i(150));if(L=te.call(L),L==null)throw Error(i(151));for(var ne=te=null,ae=S,se=S=0,Qe=null,xe=L.next();ae!==null&&!xe.done;se++,xe=L.next()){ae.index>se?(Qe=ae,ae=null):Qe=ae.sibling;var wr=H(M,ae,xe.value,q);if(wr===null){ae===null&&(ae=Qe);break}e&&ae&&wr.alternate===null&&t(M,ae),S=c(wr,S,se),ne===null?te=wr:ne.sibling=wr,ne=wr,ae=Qe}if(xe.done)return r(M,ae),De&&Rr(M,se),te;if(ae===null){for(;!xe.done;se++,xe=L.next())xe=V(M,xe.value,q),xe!==null&&(S=c(xe,S,se),ne===null?te=xe:ne.sibling=xe,ne=xe);return De&&Rr(M,se),te}for(ae=o(M,ae);!xe.done;se++,xe=L.next())xe=K(ae,M,se,xe.value,q),xe!==null&&(e&&xe.alternate!==null&&ae.delete(xe.key===null?se:xe.key),S=c(xe,S,se),ne===null?te=xe:ne.sibling=xe,ne=xe);return e&&ae.forEach(function(yh){return t(M,yh)}),De&&Rr(M,se),te}function $e(M,S,L,q){if(typeof L=="object"&&L!==null&&L.type===A&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case D:e:{for(var te=L.key,ne=S;ne!==null;){if(ne.key===te){if(te=L.type,te===A){if(ne.tag===7){r(M,ne.sibling),S=l(ne,L.props.children),S.return=M,M=S;break e}}else if(ne.elementType===te||typeof te=="object"&&te!==null&&te.$$typeof===le&&vc(te)===ne.type){r(M,ne.sibling),S=l(ne,L.props),S.ref=ta(M,ne,L),S.return=M,M=S;break e}r(M,ne);break}else t(M,ne);ne=ne.sibling}L.type===A?(S=Br(L.props.children,M.mode,q,L.key),S.return=M,M=S):(q=Po(L.type,L.key,L.props,null,M.mode,q),q.ref=ta(M,S,L),q.return=M,M=q)}return p(M);case R:e:{for(ne=L.key;S!==null;){if(S.key===ne)if(S.tag===4&&S.stateNode.containerInfo===L.containerInfo&&S.stateNode.implementation===L.implementation){r(M,S.sibling),S=l(S,L.children||[]),S.return=M,M=S;break e}else{r(M,S);break}else t(M,S);S=S.sibling}S=nl(L,M.mode,q),S.return=M,M=S}return p(M);case le:return ne=L._init,$e(M,S,ne(L._payload),q)}if(Pn(L))return Z(M,S,L,q);if(J(L))return ee(M,S,L,q);oo(M,L)}return typeof L=="string"&&L!==""||typeof L=="number"?(L=""+L,S!==null&&S.tag===6?(r(M,S.sibling),S=l(S,L),S.return=M,M=S):(r(M,S),S=rl(L,M.mode,q),S.return=M,M=S),p(M)):r(M,S)}return $e}var mn=yc(!0),xc=yc(!1),so=ur(null),io=null,pn=null,fi=null;function mi(){fi=pn=io=null}function pi(e){var t=so.current;Te(so),e._currentValue=t}function hi(e,t,r){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===r)break;e=e.return}}function hn(e,t){io=e,fi=pn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(lt=!0),e.firstContext=null)}function xt(e){var t=e._currentValue;if(fi!==e)if(e={context:e,memoizedValue:t,next:null},pn===null){if(io===null)throw Error(i(308));pn=e,io.dependencies={lanes:0,firstContext:e}}else pn=pn.next=e;return t}var Ir=null;function gi(e){Ir===null?Ir=[e]:Ir.push(e)}function wc(e,t,r,o){var l=t.interleaved;return l===null?(r.next=r,gi(t)):(r.next=l.next,l.next=r),t.interleaved=r,qt(e,o)}function qt(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var fr=!1;function vi(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function jc(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 Qt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function mr(e,t,r){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(ge&2)!==0){var l=o.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),o.pending=t,qt(e,r)}return l=o.interleaved,l===null?(t.next=t,gi(o)):(t.next=l.next,l.next=t),o.interleaved=t,qt(e,r)}function lo(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var o=t.lanes;o&=e.pendingLanes,r|=o,t.lanes=r,Ds(e,r)}}function Nc(e,t){var r=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,r===o)){var l=null,c=null;if(r=r.firstBaseUpdate,r!==null){do{var p={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};c===null?l=c=p:c=c.next=p,r=r.next}while(r!==null);c===null?l=c=t:c=c.next=t}else l=c=t;r={baseState:o.baseState,firstBaseUpdate:l,lastBaseUpdate:c,shared:o.shared,effects:o.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function uo(e,t,r,o){var l=e.updateQueue;fr=!1;var c=l.firstBaseUpdate,p=l.lastBaseUpdate,x=l.shared.pending;if(x!==null){l.shared.pending=null;var b=x,I=b.next;b.next=null,p===null?c=I:p.next=I,p=b;var B=e.alternate;B!==null&&(B=B.updateQueue,x=B.lastBaseUpdate,x!==p&&(x===null?B.firstBaseUpdate=I:x.next=I,B.lastBaseUpdate=b))}if(c!==null){var V=l.baseState;p=0,B=I=b=null,x=c;do{var H=x.lane,K=x.eventTime;if((o&H)===H){B!==null&&(B=B.next={eventTime:K,lane:0,tag:x.tag,payload:x.payload,callback:x.callback,next:null});e:{var Z=e,ee=x;switch(H=t,K=r,ee.tag){case 1:if(Z=ee.payload,typeof Z=="function"){V=Z.call(K,V,H);break e}V=Z;break e;case 3:Z.flags=Z.flags&-65537|128;case 0:if(Z=ee.payload,H=typeof Z=="function"?Z.call(K,V,H):Z,H==null)break e;V=Y({},V,H);break e;case 2:fr=!0}}x.callback!==null&&x.lane!==0&&(e.flags|=64,H=l.effects,H===null?l.effects=[x]:H.push(x))}else K={eventTime:K,lane:H,tag:x.tag,payload:x.payload,callback:x.callback,next:null},B===null?(I=B=K,b=V):B=B.next=K,p|=H;if(x=x.next,x===null){if(x=l.shared.pending,x===null)break;H=x,x=H.next,H.next=null,l.lastBaseUpdate=H,l.shared.pending=null}}while(!0);if(B===null&&(b=V),l.baseState=b,l.firstBaseUpdate=I,l.lastBaseUpdate=B,t=l.shared.interleaved,t!==null){l=t;do p|=l.lane,l=l.next;while(l!==t)}else c===null&&(l.shared.lanes=0);Ar|=p,e.lanes=p,e.memoizedState=V}}function bc(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var o=e[t],l=o.callback;if(l!==null){if(o.callback=null,o=r,typeof l!="function")throw Error(i(191,l));l.call(o)}}}var ra={},It=ur(ra),na=ur(ra),aa=ur(ra);function zr(e){if(e===ra)throw Error(i(174));return e}function yi(e,t){switch(Ce(aa,t),Ce(na,e),Ce(It,ra),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:xs(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=xs(t,e)}Te(It),Ce(It,t)}function gn(){Te(It),Te(na),Te(aa)}function kc(e){zr(aa.current);var t=zr(It.current),r=xs(t,e.type);t!==r&&(Ce(na,e),Ce(It,r))}function xi(e){na.current===e&&(Te(It),Te(na))}var Me=ur(0);function co(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==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 wi=[];function ji(){for(var e=0;e<wi.length;e++)wi[e]._workInProgressVersionPrimary=null;wi.length=0}var fo=j.ReactCurrentDispatcher,Ni=j.ReactCurrentBatchConfig,$r=0,Oe=null,He=null,Ve=null,mo=!1,oa=!1,sa=0,Up=0;function Je(){throw Error(i(321))}function bi(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!_t(e[r],t[r]))return!1;return!0}function ki(e,t,r,o,l,c){if($r=c,Oe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,fo.current=e===null||e.memoizedState===null?Wp:Vp,e=r(o,l),oa){c=0;do{if(oa=!1,sa=0,25<=c)throw Error(i(301));c+=1,Ve=He=null,t.updateQueue=null,fo.current=qp,e=r(o,l)}while(oa)}if(fo.current=go,t=He!==null&&He.next!==null,$r=0,Ve=He=Oe=null,mo=!1,t)throw Error(i(300));return e}function Si(){var e=sa!==0;return sa=0,e}function zt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ve===null?Oe.memoizedState=Ve=e:Ve=Ve.next=e,Ve}function wt(){if(He===null){var e=Oe.alternate;e=e!==null?e.memoizedState:null}else e=He.next;var t=Ve===null?Oe.memoizedState:Ve.next;if(t!==null)Ve=t,He=e;else{if(e===null)throw Error(i(310));He=e,e={memoizedState:He.memoizedState,baseState:He.baseState,baseQueue:He.baseQueue,queue:He.queue,next:null},Ve===null?Oe.memoizedState=Ve=e:Ve=Ve.next=e}return Ve}function ia(e,t){return typeof t=="function"?t(e):t}function _i(e){var t=wt(),r=t.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=e;var o=He,l=o.baseQueue,c=r.pending;if(c!==null){if(l!==null){var p=l.next;l.next=c.next,c.next=p}o.baseQueue=l=c,r.pending=null}if(l!==null){c=l.next,o=o.baseState;var x=p=null,b=null,I=c;do{var B=I.lane;if(($r&B)===B)b!==null&&(b=b.next={lane:0,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null}),o=I.hasEagerState?I.eagerState:e(o,I.action);else{var V={lane:B,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null};b===null?(x=b=V,p=o):b=b.next=V,Oe.lanes|=B,Ar|=B}I=I.next}while(I!==null&&I!==c);b===null?p=o:b.next=x,_t(o,t.memoizedState)||(lt=!0),t.memoizedState=o,t.baseState=p,t.baseQueue=b,r.lastRenderedState=o}if(e=r.interleaved,e!==null){l=e;do c=l.lane,Oe.lanes|=c,Ar|=c,l=l.next;while(l!==e)}else l===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Ci(e){var t=wt(),r=t.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=e;var o=r.dispatch,l=r.pending,c=t.memoizedState;if(l!==null){r.pending=null;var p=l=l.next;do c=e(c,p.action),p=p.next;while(p!==l);_t(c,t.memoizedState)||(lt=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),r.lastRenderedState=c}return[c,o]}function Sc(){}function _c(e,t){var r=Oe,o=wt(),l=t(),c=!_t(o.memoizedState,l);if(c&&(o.memoizedState=l,lt=!0),o=o.queue,Ei(Tc.bind(null,r,o,e),[e]),o.getSnapshot!==t||c||Ve!==null&&Ve.memoizedState.tag&1){if(r.flags|=2048,la(9,Ec.bind(null,r,o,l,t),void 0,null),qe===null)throw Error(i(349));($r&30)!==0||Cc(r,t,l)}return l}function Cc(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Oe.updateQueue,t===null?(t={lastEffect:null,stores:null},Oe.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Ec(e,t,r,o){t.value=r,t.getSnapshot=o,Pc(t)&&Dc(e)}function Tc(e,t,r){return r(function(){Pc(t)&&Dc(e)})}function Pc(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!_t(e,r)}catch{return!0}}function Dc(e){var t=qt(e,1);t!==null&&Dt(t,e,1,-1)}function Mc(e){var t=zt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ia,lastRenderedState:e},t.queue=e,e=e.dispatch=Bp.bind(null,Oe,e),[t.memoizedState,e]}function la(e,t,r,o){return e={tag:e,create:t,destroy:r,deps:o,next:null},t=Oe.updateQueue,t===null?(t={lastEffect:null,stores:null},Oe.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(o=r.next,r.next=e,e.next=o,t.lastEffect=e)),e}function Oc(){return wt().memoizedState}function po(e,t,r,o){var l=zt();Oe.flags|=e,l.memoizedState=la(1|t,r,void 0,o===void 0?null:o)}function ho(e,t,r,o){var l=wt();o=o===void 0?null:o;var c=void 0;if(He!==null){var p=He.memoizedState;if(c=p.destroy,o!==null&&bi(o,p.deps)){l.memoizedState=la(t,r,c,o);return}}Oe.flags|=e,l.memoizedState=la(1|t,r,c,o)}function Lc(e,t){return po(8390656,8,e,t)}function Ei(e,t){return ho(2048,8,e,t)}function Rc(e,t){return ho(4,2,e,t)}function Ic(e,t){return ho(4,4,e,t)}function zc(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 $c(e,t,r){return r=r!=null?r.concat([e]):null,ho(4,4,zc.bind(null,t,e),r)}function Ti(){}function Ac(e,t){var r=wt();t=t===void 0?null:t;var o=r.memoizedState;return o!==null&&t!==null&&bi(t,o[1])?o[0]:(r.memoizedState=[e,t],e)}function Uc(e,t){var r=wt();t=t===void 0?null:t;var o=r.memoizedState;return o!==null&&t!==null&&bi(t,o[1])?o[0]:(e=e(),r.memoizedState=[e,t],e)}function Fc(e,t,r){return($r&21)===0?(e.baseState&&(e.baseState=!1,lt=!0),e.memoizedState=r):(_t(r,t)||(r=vu(),Oe.lanes|=r,Ar|=r,e.baseState=!0),t)}function Fp(e,t){var r=je;je=r!==0&&4>r?r:4,e(!0);var o=Ni.transition;Ni.transition={};try{e(!1),t()}finally{je=r,Ni.transition=o}}function Hc(){return wt().memoizedState}function Hp(e,t,r){var o=vr(e);if(r={lane:o,action:r,hasEagerState:!1,eagerState:null,next:null},Bc(e))Wc(t,r);else if(r=wc(e,t,r,o),r!==null){var l=nt();Dt(r,e,o,l),Vc(r,t,o)}}function Bp(e,t,r){var o=vr(e),l={lane:o,action:r,hasEagerState:!1,eagerState:null,next:null};if(Bc(e))Wc(t,l);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var p=t.lastRenderedState,x=c(p,r);if(l.hasEagerState=!0,l.eagerState=x,_t(x,p)){var b=t.interleaved;b===null?(l.next=l,gi(t)):(l.next=b.next,b.next=l),t.interleaved=l;return}}catch{}finally{}r=wc(e,t,l,o),r!==null&&(l=nt(),Dt(r,e,o,l),Vc(r,t,o))}}function Bc(e){var t=e.alternate;return e===Oe||t!==null&&t===Oe}function Wc(e,t){oa=mo=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Vc(e,t,r){if((r&4194240)!==0){var o=t.lanes;o&=e.pendingLanes,r|=o,t.lanes=r,Ds(e,r)}}var go={readContext:xt,useCallback:Je,useContext:Je,useEffect:Je,useImperativeHandle:Je,useInsertionEffect:Je,useLayoutEffect:Je,useMemo:Je,useReducer:Je,useRef:Je,useState:Je,useDebugValue:Je,useDeferredValue:Je,useTransition:Je,useMutableSource:Je,useSyncExternalStore:Je,useId:Je,unstable_isNewReconciler:!1},Wp={readContext:xt,useCallback:function(e,t){return zt().memoizedState=[e,t===void 0?null:t],e},useContext:xt,useEffect:Lc,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,po(4194308,4,zc.bind(null,t,e),r)},useLayoutEffect:function(e,t){return po(4194308,4,e,t)},useInsertionEffect:function(e,t){return po(4,2,e,t)},useMemo:function(e,t){var r=zt();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var o=zt();return t=r!==void 0?r(t):t,o.memoizedState=o.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},o.queue=e,e=e.dispatch=Hp.bind(null,Oe,e),[o.memoizedState,e]},useRef:function(e){var t=zt();return e={current:e},t.memoizedState=e},useState:Mc,useDebugValue:Ti,useDeferredValue:function(e){return zt().memoizedState=e},useTransition:function(){var e=Mc(!1),t=e[0];return e=Fp.bind(null,e[1]),zt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var o=Oe,l=zt();if(De){if(r===void 0)throw Error(i(407));r=r()}else{if(r=t(),qe===null)throw Error(i(349));($r&30)!==0||Cc(o,t,r)}l.memoizedState=r;var c={value:r,getSnapshot:t};return l.queue=c,Lc(Tc.bind(null,o,c,e),[e]),o.flags|=2048,la(9,Ec.bind(null,o,c,r,t),void 0,null),r},useId:function(){var e=zt(),t=qe.identifierPrefix;if(De){var r=Vt,o=Wt;r=(o&~(1<<32-St(o)-1)).toString(32)+r,t=":"+t+"R"+r,r=sa++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=Up++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Vp={readContext:xt,useCallback:Ac,useContext:xt,useEffect:Ei,useImperativeHandle:$c,useInsertionEffect:Rc,useLayoutEffect:Ic,useMemo:Uc,useReducer:_i,useRef:Oc,useState:function(){return _i(ia)},useDebugValue:Ti,useDeferredValue:function(e){var t=wt();return Fc(t,He.memoizedState,e)},useTransition:function(){var e=_i(ia)[0],t=wt().memoizedState;return[e,t]},useMutableSource:Sc,useSyncExternalStore:_c,useId:Hc,unstable_isNewReconciler:!1},qp={readContext:xt,useCallback:Ac,useContext:xt,useEffect:Ei,useImperativeHandle:$c,useInsertionEffect:Rc,useLayoutEffect:Ic,useMemo:Uc,useReducer:Ci,useRef:Oc,useState:function(){return Ci(ia)},useDebugValue:Ti,useDeferredValue:function(e){var t=wt();return He===null?t.memoizedState=e:Fc(t,He.memoizedState,e)},useTransition:function(){var e=Ci(ia)[0],t=wt().memoizedState;return[e,t]},useMutableSource:Sc,useSyncExternalStore:_c,useId:Hc,unstable_isNewReconciler:!1};function Et(e,t){if(e&&e.defaultProps){t=Y({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Pi(e,t,r,o){t=e.memoizedState,r=r(o,t),r=r==null?t:Y({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var vo={isMounted:function(e){return(e=e._reactInternals)?Dr(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var o=nt(),l=vr(e),c=Qt(o,l);c.payload=t,r!=null&&(c.callback=r),t=mr(e,c,l),t!==null&&(Dt(t,e,l,o),lo(t,e,l))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var o=nt(),l=vr(e),c=Qt(o,l);c.tag=1,c.payload=t,r!=null&&(c.callback=r),t=mr(e,c,l),t!==null&&(Dt(t,e,l,o),lo(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=nt(),o=vr(e),l=Qt(r,o);l.tag=2,t!=null&&(l.callback=t),t=mr(e,l,o),t!==null&&(Dt(t,e,o,r),lo(t,e,o))}};function qc(e,t,r,o,l,c,p){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,c,p):t.prototype&&t.prototype.isPureReactComponent?!Yn(r,o)||!Yn(l,c):!0}function Qc(e,t,r){var o=!1,l=cr,c=t.contextType;return typeof c=="object"&&c!==null?c=xt(c):(l=it(t)?Or:Ge.current,o=t.contextTypes,c=(o=o!=null)?un(e,l):cr),t=new t(r,c),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=vo,e.stateNode=t,t._reactInternals=e,o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=c),t}function Yc(e,t,r,o){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,o),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,o),t.state!==e&&vo.enqueueReplaceState(t,t.state,null)}function Di(e,t,r,o){var l=e.stateNode;l.props=r,l.state=e.memoizedState,l.refs={},vi(e);var c=t.contextType;typeof c=="object"&&c!==null?l.context=xt(c):(c=it(t)?Or:Ge.current,l.context=un(e,c)),l.state=e.memoizedState,c=t.getDerivedStateFromProps,typeof c=="function"&&(Pi(e,t,c,r),l.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof l.getSnapshotBeforeUpdate=="function"||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(t=l.state,typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount(),t!==l.state&&vo.enqueueReplaceState(l,l.state,null),uo(e,r,l,o),l.state=e.memoizedState),typeof l.componentDidMount=="function"&&(e.flags|=4194308)}function vn(e,t){try{var r="",o=t;do r+=ve(o),o=o.return;while(o);var l=r}catch(c){l=`
Error generating stack: `+c.message+`
`+c.stack}return{value:e,source:t,stack:l,digest:null}}function Mi(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Oi(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var Qp=typeof WeakMap=="function"?WeakMap:Map;function Xc(e,t,r){r=Qt(-1,r),r.tag=3,r.payload={element:null};var o=t.value;return r.callback=function(){ko||(ko=!0,Yi=o),Oi(e,t)},r}function Kc(e,t,r){r=Qt(-1,r),r.tag=3;var o=e.type.getDerivedStateFromError;if(typeof o=="function"){var l=t.value;r.payload=function(){return o(l)},r.callback=function(){Oi(e,t)}}var c=e.stateNode;return c!==null&&typeof c.componentDidCatch=="function"&&(r.callback=function(){Oi(e,t),typeof o!="function"&&(hr===null?hr=new Set([this]):hr.add(this));var p=t.stack;this.componentDidCatch(t.value,{componentStack:p!==null?p:""})}),r}function Gc(e,t,r){var o=e.pingCache;if(o===null){o=e.pingCache=new Qp;var l=new Set;o.set(t,l)}else l=o.get(t),l===void 0&&(l=new Set,o.set(t,l));l.has(r)||(l.add(r),e=ih.bind(null,e,t,r),t.then(e,e))}function Jc(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 Zc(e,t,r,o,l){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Qt(-1,1),t.tag=2,mr(r,t,1))),r.lanes|=1),e):(e.flags|=65536,e.lanes=l,e)}var Yp=j.ReactCurrentOwner,lt=!1;function rt(e,t,r,o){t.child=e===null?xc(t,null,r,o):mn(t,e.child,r,o)}function ed(e,t,r,o,l){r=r.render;var c=t.ref;return hn(t,l),o=ki(e,t,r,o,c,l),r=Si(),e!==null&&!lt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Yt(e,t,l)):(De&&r&&ii(t),t.flags|=1,rt(e,t,o,l),t.child)}function td(e,t,r,o,l){if(e===null){var c=r.type;return typeof c=="function"&&!tl(c)&&c.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=c,rd(e,t,c,o,l)):(e=Po(r.type,null,o,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,(e.lanes&l)===0){var p=c.memoizedProps;if(r=r.compare,r=r!==null?r:Yn,r(p,o)&&e.ref===t.ref)return Yt(e,t,l)}return t.flags|=1,e=xr(c,o),e.ref=t.ref,e.return=t,t.child=e}function rd(e,t,r,o,l){if(e!==null){var c=e.memoizedProps;if(Yn(c,o)&&e.ref===t.ref)if(lt=!1,t.pendingProps=o=c,(e.lanes&l)!==0)(e.flags&131072)!==0&&(lt=!0);else return t.lanes=e.lanes,Yt(e,t,l)}return Li(e,t,r,o,l)}function nd(e,t,r){var o=t.pendingProps,l=o.children,c=e!==null?e.memoizedState:null;if(o.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ce(xn,gt),gt|=r;else{if((r&1073741824)===0)return e=c!==null?c.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ce(xn,gt),gt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},o=c!==null?c.baseLanes:r,Ce(xn,gt),gt|=o}else c!==null?(o=c.baseLanes|r,t.memoizedState=null):o=r,Ce(xn,gt),gt|=o;return rt(e,t,l,r),t.child}function ad(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Li(e,t,r,o,l){var c=it(r)?Or:Ge.current;return c=un(t,c),hn(t,l),r=ki(e,t,r,o,c,l),o=Si(),e!==null&&!lt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Yt(e,t,l)):(De&&o&&ii(t),t.flags|=1,rt(e,t,r,l),t.child)}function od(e,t,r,o,l){if(it(r)){var c=!0;eo(t)}else c=!1;if(hn(t,l),t.stateNode===null)xo(e,t),Qc(t,r,o),Di(t,r,o,l),o=!0;else if(e===null){var p=t.stateNode,x=t.memoizedProps;p.props=x;var b=p.context,I=r.contextType;typeof I=="object"&&I!==null?I=xt(I):(I=it(r)?Or:Ge.current,I=un(t,I));var B=r.getDerivedStateFromProps,V=typeof B=="function"||typeof p.getSnapshotBeforeUpdate=="function";V||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(x!==o||b!==I)&&Yc(t,p,o,I),fr=!1;var H=t.memoizedState;p.state=H,uo(t,o,p,l),b=t.memoizedState,x!==o||H!==b||st.current||fr?(typeof B=="function"&&(Pi(t,r,B,o),b=t.memoizedState),(x=fr||qc(t,r,x,o,H,b,I))?(V||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=o,t.memoizedState=b),p.props=o,p.state=b,p.context=I,o=x):(typeof p.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{p=t.stateNode,jc(e,t),x=t.memoizedProps,I=t.type===t.elementType?x:Et(t.type,x),p.props=I,V=t.pendingProps,H=p.context,b=r.contextType,typeof b=="object"&&b!==null?b=xt(b):(b=it(r)?Or:Ge.current,b=un(t,b));var K=r.getDerivedStateFromProps;(B=typeof K=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(x!==V||H!==b)&&Yc(t,p,o,b),fr=!1,H=t.memoizedState,p.state=H,uo(t,o,p,l);var Z=t.memoizedState;x!==V||H!==Z||st.current||fr?(typeof K=="function"&&(Pi(t,r,K,o),Z=t.memoizedState),(I=fr||qc(t,r,I,o,H,Z,b)||!1)?(B||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(o,Z,b),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(o,Z,b)),typeof p.componentDidUpdate=="function"&&(t.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof p.componentDidUpdate!="function"||x===e.memoizedProps&&H===e.memoizedState||(t.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&H===e.memoizedState||(t.flags|=1024),t.memoizedProps=o,t.memoizedState=Z),p.props=o,p.state=Z,p.context=b,o=I):(typeof p.componentDidUpdate!="function"||x===e.memoizedProps&&H===e.memoizedState||(t.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&H===e.memoizedState||(t.flags|=1024),o=!1)}return Ri(e,t,r,o,c,l)}function Ri(e,t,r,o,l,c){ad(e,t);var p=(t.flags&128)!==0;if(!o&&!p)return l&&cc(t,r,!1),Yt(e,t,c);o=t.stateNode,Yp.current=t;var x=p&&typeof r.getDerivedStateFromError!="function"?null:o.render();return t.flags|=1,e!==null&&p?(t.child=mn(t,e.child,null,c),t.child=mn(t,null,x,c)):rt(e,t,x,c),t.memoizedState=o.state,l&&cc(t,r,!0),t.child}function sd(e){var t=e.stateNode;t.pendingContext?lc(e,t.pendingContext,t.pendingContext!==t.context):t.context&&lc(e,t.context,!1),yi(e,t.containerInfo)}function id(e,t,r,o,l){return fn(),di(l),t.flags|=256,rt(e,t,r,o),t.child}var Ii={dehydrated:null,treeContext:null,retryLane:0};function zi(e){return{baseLanes:e,cachePool:null,transitions:null}}function ld(e,t,r){var o=t.pendingProps,l=Me.current,c=!1,p=(t.flags&128)!==0,x;if((x=p)||(x=e!==null&&e.memoizedState===null?!1:(l&2)!==0),x?(c=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),Ce(Me,l&1),e===null)return ci(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=o.children,e=o.fallback,c?(o=t.mode,c=t.child,p={mode:"hidden",children:p},(o&1)===0&&c!==null?(c.childLanes=0,c.pendingProps=p):c=Do(p,o,0,null),e=Br(e,o,r,null),c.return=t,e.return=t,c.sibling=e,t.child=c,t.child.memoizedState=zi(r),t.memoizedState=Ii,e):$i(t,p));if(l=e.memoizedState,l!==null&&(x=l.dehydrated,x!==null))return Xp(e,t,p,o,x,l,r);if(c){c=o.fallback,p=t.mode,l=e.child,x=l.sibling;var b={mode:"hidden",children:o.children};return(p&1)===0&&t.child!==l?(o=t.child,o.childLanes=0,o.pendingProps=b,t.deletions=null):(o=xr(l,b),o.subtreeFlags=l.subtreeFlags&14680064),x!==null?c=xr(x,c):(c=Br(c,p,r,null),c.flags|=2),c.return=t,o.return=t,o.sibling=c,t.child=o,o=c,c=t.child,p=e.child.memoizedState,p=p===null?zi(r):{baseLanes:p.baseLanes|r,cachePool:null,transitions:p.transitions},c.memoizedState=p,c.childLanes=e.childLanes&~r,t.memoizedState=Ii,o}return c=e.child,e=c.sibling,o=xr(c,{mode:"visible",children:o.children}),(t.mode&1)===0&&(o.lanes=r),o.return=t,o.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=o,t.memoizedState=null,o}function $i(e,t){return t=Do({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function yo(e,t,r,o){return o!==null&&di(o),mn(t,e.child,null,r),e=$i(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Xp(e,t,r,o,l,c,p){if(r)return t.flags&256?(t.flags&=-257,o=Mi(Error(i(422))),yo(e,t,p,o)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(c=o.fallback,l=t.mode,o=Do({mode:"visible",children:o.children},l,0,null),c=Br(c,l,p,null),c.flags|=2,o.return=t,c.return=t,o.sibling=c,t.child=o,(t.mode&1)!==0&&mn(t,e.child,null,p),t.child.memoizedState=zi(p),t.memoizedState=Ii,c);if((t.mode&1)===0)return yo(e,t,p,null);if(l.data==="$!"){if(o=l.nextSibling&&l.nextSibling.dataset,o)var x=o.dgst;return o=x,c=Error(i(419)),o=Mi(c,o,void 0),yo(e,t,p,o)}if(x=(p&e.childLanes)!==0,lt||x){if(o=qe,o!==null){switch(p&-p){case 4:l=2;break;case 16:l=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:l=32;break;case 536870912:l=268435456;break;default:l=0}l=(l&(o.suspendedLanes|p))!==0?0:l,l!==0&&l!==c.retryLane&&(c.retryLane=l,qt(e,l),Dt(o,e,l,-1))}return el(),o=Mi(Error(i(421))),yo(e,t,p,o)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=lh.bind(null,e),l._reactRetry=t,null):(e=c.treeContext,ht=lr(l.nextSibling),pt=t,De=!0,Ct=null,e!==null&&(vt[yt++]=Wt,vt[yt++]=Vt,vt[yt++]=Lr,Wt=e.id,Vt=e.overflow,Lr=t),t=$i(t,o.children),t.flags|=4096,t)}function ud(e,t,r){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),hi(e.return,t,r)}function Ai(e,t,r,o,l){var c=e.memoizedState;c===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:r,tailMode:l}:(c.isBackwards=t,c.rendering=null,c.renderingStartTime=0,c.last=o,c.tail=r,c.tailMode=l)}function cd(e,t,r){var o=t.pendingProps,l=o.revealOrder,c=o.tail;if(rt(e,t,o.children,r),o=Me.current,(o&2)!==0)o=o&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&&ud(e,r,t);else if(e.tag===19)ud(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}o&=1}if(Ce(Me,o),(t.mode&1)===0)t.memoizedState=null;else switch(l){case"forwards":for(r=t.child,l=null;r!==null;)e=r.alternate,e!==null&&co(e)===null&&(l=r),r=r.sibling;r=l,r===null?(l=t.child,t.child=null):(l=r.sibling,r.sibling=null),Ai(t,!1,l,r,c);break;case"backwards":for(r=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&co(e)===null){t.child=l;break}e=l.sibling,l.sibling=r,r=l,l=e}Ai(t,!0,r,null,c);break;case"together":Ai(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function xo(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Yt(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Ar|=t.lanes,(r&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,r=xr(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=xr(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function Kp(e,t,r){switch(t.tag){case 3:sd(t),fn();break;case 5:kc(t);break;case 1:it(t.type)&&eo(t);break;case 4:yi(t,t.stateNode.containerInfo);break;case 10:var o=t.type._context,l=t.memoizedProps.value;Ce(so,o._currentValue),o._currentValue=l;break;case 13:if(o=t.memoizedState,o!==null)return o.dehydrated!==null?(Ce(Me,Me.current&1),t.flags|=128,null):(r&t.child.childLanes)!==0?ld(e,t,r):(Ce(Me,Me.current&1),e=Yt(e,t,r),e!==null?e.sibling:null);Ce(Me,Me.current&1);break;case 19:if(o=(r&t.childLanes)!==0,(e.flags&128)!==0){if(o)return cd(e,t,r);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),Ce(Me,Me.current),o)break;return null;case 22:case 23:return t.lanes=0,nd(e,t,r)}return Yt(e,t,r)}var dd,Ui,fd,md;dd=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}},Ui=function(){},fd=function(e,t,r,o){var l=e.memoizedProps;if(l!==o){e=t.stateNode,zr(It.current);var c=null;switch(r){case"input":l=hs(e,l),o=hs(e,o),c=[];break;case"select":l=Y({},l,{value:void 0}),o=Y({},o,{value:void 0}),c=[];break;case"textarea":l=ys(e,l),o=ys(e,o),c=[];break;default:typeof l.onClick!="function"&&typeof o.onClick=="function"&&(e.onclick=Ga)}ws(r,o);var p;r=null;for(I in l)if(!o.hasOwnProperty(I)&&l.hasOwnProperty(I)&&l[I]!=null)if(I==="style"){var x=l[I];for(p in x)x.hasOwnProperty(p)&&(r||(r={}),r[p]="")}else I!=="dangerouslySetInnerHTML"&&I!=="children"&&I!=="suppressContentEditableWarning"&&I!=="suppressHydrationWarning"&&I!=="autoFocus"&&(d.hasOwnProperty(I)?c||(c=[]):(c=c||[]).push(I,null));for(I in o){var b=o[I];if(x=l?.[I],o.hasOwnProperty(I)&&b!==x&&(b!=null||x!=null))if(I==="style")if(x){for(p in x)!x.hasOwnProperty(p)||b&&b.hasOwnProperty(p)||(r||(r={}),r[p]="");for(p in b)b.hasOwnProperty(p)&&x[p]!==b[p]&&(r||(r={}),r[p]=b[p])}else r||(c||(c=[]),c.push(I,r)),r=b;else I==="dangerouslySetInnerHTML"?(b=b?b.__html:void 0,x=x?x.__html:void 0,b!=null&&x!==b&&(c=c||[]).push(I,b)):I==="children"?typeof b!="string"&&typeof b!="number"||(c=c||[]).push(I,""+b):I!=="suppressContentEditableWarning"&&I!=="suppressHydrationWarning"&&(d.hasOwnProperty(I)?(b!=null&&I==="onScroll"&&Ee("scroll",e),c||x===b||(c=[])):(c=c||[]).push(I,b))}r&&(c=c||[]).push("style",r);var I=c;(t.updateQueue=I)&&(t.flags|=4)}},md=function(e,t,r,o){r!==o&&(t.flags|=4)};function ua(e,t){if(!De)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var o=null;r!==null;)r.alternate!==null&&(o=r),r=r.sibling;o===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function Ze(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,o=0;if(t)for(var l=e.child;l!==null;)r|=l.lanes|l.childLanes,o|=l.subtreeFlags&14680064,o|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)r|=l.lanes|l.childLanes,o|=l.subtreeFlags,o|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=o,e.childLanes=r,t}function Gp(e,t,r){var o=t.pendingProps;switch(li(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ze(t),null;case 1:return it(t.type)&&Za(),Ze(t),null;case 3:return o=t.stateNode,gn(),Te(st),Te(Ge),ji(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(e===null||e.child===null)&&(ao(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ct!==null&&(Gi(Ct),Ct=null))),Ui(e,t),Ze(t),null;case 5:xi(t);var l=zr(aa.current);if(r=t.type,e!==null&&t.stateNode!=null)fd(e,t,r,o,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!o){if(t.stateNode===null)throw Error(i(166));return Ze(t),null}if(e=zr(It.current),ao(t)){o=t.stateNode,r=t.type;var c=t.memoizedProps;switch(o[Rt]=t,o[Zn]=c,e=(t.mode&1)!==0,r){case"dialog":Ee("cancel",o),Ee("close",o);break;case"iframe":case"object":case"embed":Ee("load",o);break;case"video":case"audio":for(l=0;l<Kn.length;l++)Ee(Kn[l],o);break;case"source":Ee("error",o);break;case"img":case"image":case"link":Ee("error",o),Ee("load",o);break;case"details":Ee("toggle",o);break;case"input":Ql(o,c),Ee("invalid",o);break;case"select":o._wrapperState={wasMultiple:!!c.multiple},Ee("invalid",o);break;case"textarea":Kl(o,c),Ee("invalid",o)}ws(r,c),l=null;for(var p in c)if(c.hasOwnProperty(p)){var x=c[p];p==="children"?typeof x=="string"?o.textContent!==x&&(c.suppressHydrationWarning!==!0&&Ka(o.textContent,x,e),l=["children",x]):typeof x=="number"&&o.textContent!==""+x&&(c.suppressHydrationWarning!==!0&&Ka(o.textContent,x,e),l=["children",""+x]):d.hasOwnProperty(p)&&x!=null&&p==="onScroll"&&Ee("scroll",o)}switch(r){case"input":Ca(o),Xl(o,c,!0);break;case"textarea":Ca(o),Jl(o);break;case"select":case"option":break;default:typeof c.onClick=="function"&&(o.onclick=Ga)}o=l,t.updateQueue=o,o!==null&&(t.flags|=4)}else{p=l.nodeType===9?l:l.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Zl(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=p.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof o.is=="string"?e=p.createElement(r,{is:o.is}):(e=p.createElement(r),r==="select"&&(p=e,o.multiple?p.multiple=!0:o.size&&(p.size=o.size))):e=p.createElementNS(e,r),e[Rt]=t,e[Zn]=o,dd(e,t,!1,!1),t.stateNode=e;e:{switch(p=js(r,o),r){case"dialog":Ee("cancel",e),Ee("close",e),l=o;break;case"iframe":case"object":case"embed":Ee("load",e),l=o;break;case"video":case"audio":for(l=0;l<Kn.length;l++)Ee(Kn[l],e);l=o;break;case"source":Ee("error",e),l=o;break;case"img":case"image":case"link":Ee("error",e),Ee("load",e),l=o;break;case"details":Ee("toggle",e),l=o;break;case"input":Ql(e,o),l=hs(e,o),Ee("invalid",e);break;case"option":l=o;break;case"select":e._wrapperState={wasMultiple:!!o.multiple},l=Y({},o,{value:void 0}),Ee("invalid",e);break;case"textarea":Kl(e,o),l=ys(e,o),Ee("invalid",e);break;default:l=o}ws(r,l),x=l;for(c in x)if(x.hasOwnProperty(c)){var b=x[c];c==="style"?ru(e,b):c==="dangerouslySetInnerHTML"?(b=b?b.__html:void 0,b!=null&&eu(e,b)):c==="children"?typeof b=="string"?(r!=="textarea"||b!=="")&&Dn(e,b):typeof b=="number"&&Dn(e,""+b):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(d.hasOwnProperty(c)?b!=null&&c==="onScroll"&&Ee("scroll",e):b!=null&&k(e,c,b,p))}switch(r){case"input":Ca(e),Xl(e,o,!1);break;case"textarea":Ca(e),Jl(e);break;case"option":o.value!=null&&e.setAttribute("value",""+we(o.value));break;case"select":e.multiple=!!o.multiple,c=o.value,c!=null?Kr(e,!!o.multiple,c,!1):o.defaultValue!=null&&Kr(e,!!o.multiple,o.defaultValue,!0);break;default:typeof l.onClick=="function"&&(e.onclick=Ga)}switch(r){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}}o&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ze(t),null;case 6:if(e&&t.stateNode!=null)md(e,t,e.memoizedProps,o);else{if(typeof o!="string"&&t.stateNode===null)throw Error(i(166));if(r=zr(aa.current),zr(It.current),ao(t)){if(o=t.stateNode,r=t.memoizedProps,o[Rt]=t,(c=o.nodeValue!==r)&&(e=pt,e!==null))switch(e.tag){case 3:Ka(o.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ka(o.nodeValue,r,(e.mode&1)!==0)}c&&(t.flags|=4)}else o=(r.nodeType===9?r:r.ownerDocument).createTextNode(o),o[Rt]=t,t.stateNode=o}return Ze(t),null;case 13:if(Te(Me),o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(De&&ht!==null&&(t.mode&1)!==0&&(t.flags&128)===0)gc(),fn(),t.flags|=98560,c=!1;else if(c=ao(t),o!==null&&o.dehydrated!==null){if(e===null){if(!c)throw Error(i(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(i(317));c[Rt]=t}else fn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ze(t),c=!1}else Ct!==null&&(Gi(Ct),Ct=null),c=!0;if(!c)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=r,t):(o=o!==null,o!==(e!==null&&e.memoizedState!==null)&&o&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(Me.current&1)!==0?Be===0&&(Be=3):el())),t.updateQueue!==null&&(t.flags|=4),Ze(t),null);case 4:return gn(),Ui(e,t),e===null&&Gn(t.stateNode.containerInfo),Ze(t),null;case 10:return pi(t.type._context),Ze(t),null;case 17:return it(t.type)&&Za(),Ze(t),null;case 19:if(Te(Me),c=t.memoizedState,c===null)return Ze(t),null;if(o=(t.flags&128)!==0,p=c.rendering,p===null)if(o)ua(c,!1);else{if(Be!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(p=co(e),p!==null){for(t.flags|=128,ua(c,!1),o=p.updateQueue,o!==null&&(t.updateQueue=o,t.flags|=4),t.subtreeFlags=0,o=r,r=t.child;r!==null;)c=r,e=o,c.flags&=14680066,p=c.alternate,p===null?(c.childLanes=0,c.lanes=e,c.child=null,c.subtreeFlags=0,c.memoizedProps=null,c.memoizedState=null,c.updateQueue=null,c.dependencies=null,c.stateNode=null):(c.childLanes=p.childLanes,c.lanes=p.lanes,c.child=p.child,c.subtreeFlags=0,c.deletions=null,c.memoizedProps=p.memoizedProps,c.memoizedState=p.memoizedState,c.updateQueue=p.updateQueue,c.type=p.type,e=p.dependencies,c.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Ce(Me,Me.current&1|2),t.child}e=e.sibling}c.tail!==null&&ze()>wn&&(t.flags|=128,o=!0,ua(c,!1),t.lanes=4194304)}else{if(!o)if(e=co(p),e!==null){if(t.flags|=128,o=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),ua(c,!0),c.tail===null&&c.tailMode==="hidden"&&!p.alternate&&!De)return Ze(t),null}else 2*ze()-c.renderingStartTime>wn&&r!==1073741824&&(t.flags|=128,o=!0,ua(c,!1),t.lanes=4194304);c.isBackwards?(p.sibling=t.child,t.child=p):(r=c.last,r!==null?r.sibling=p:t.child=p,c.last=p)}return c.tail!==null?(t=c.tail,c.rendering=t,c.tail=t.sibling,c.renderingStartTime=ze(),t.sibling=null,r=Me.current,Ce(Me,o?r&1|2:r&1),t):(Ze(t),null);case 22:case 23:return Zi(),o=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==o&&(t.flags|=8192),o&&(t.mode&1)!==0?(gt&1073741824)!==0&&(Ze(t),t.subtreeFlags&6&&(t.flags|=8192)):Ze(t),null;case 24:return null;case 25:return null}throw Error(i(156,t.tag))}function Jp(e,t){switch(li(t),t.tag){case 1:return it(t.type)&&Za(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return gn(),Te(st),Te(Ge),ji(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return xi(t),null;case 13:if(Te(Me),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));fn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Te(Me),null;case 4:return gn(),null;case 10:return pi(t.type._context),null;case 22:case 23:return Zi(),null;case 24:return null;default:return null}}var wo=!1,et=!1,Zp=typeof WeakSet=="function"?WeakSet:Set,G=null;function yn(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(o){Ie(e,t,o)}else r.current=null}function Fi(e,t,r){try{r()}catch(o){Ie(e,t,o)}}var pd=!1;function eh(e,t){if(Zs=Aa,e=qu(),Vs(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var o=r.getSelection&&r.getSelection();if(o&&o.rangeCount!==0){r=o.anchorNode;var l=o.anchorOffset,c=o.focusNode;o=o.focusOffset;try{r.nodeType,c.nodeType}catch{r=null;break e}var p=0,x=-1,b=-1,I=0,B=0,V=e,H=null;t:for(;;){for(var K;V!==r||l!==0&&V.nodeType!==3||(x=p+l),V!==c||o!==0&&V.nodeType!==3||(b=p+o),V.nodeType===3&&(p+=V.nodeValue.length),(K=V.firstChild)!==null;)H=V,V=K;for(;;){if(V===e)break t;if(H===r&&++I===l&&(x=p),H===c&&++B===o&&(b=p),(K=V.nextSibling)!==null)break;V=H,H=V.parentNode}V=K}r=x===-1||b===-1?null:{start:x,end:b}}else r=null}r=r||{start:0,end:0}}else r=null;for(ei={focusedElem:e,selectionRange:r},Aa=!1,G=t;G!==null;)if(t=G,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,G=e;else for(;G!==null;){t=G;try{var Z=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(Z!==null){var ee=Z.memoizedProps,$e=Z.memoizedState,M=t.stateNode,S=M.getSnapshotBeforeUpdate(t.elementType===t.type?ee:Et(t.type,ee),$e);M.__reactInternalSnapshotBeforeUpdate=S}break;case 3:var L=t.stateNode.containerInfo;L.nodeType===1?L.textContent="":L.nodeType===9&&L.documentElement&&L.removeChild(L.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(i(163))}}catch(q){Ie(t,t.return,q)}if(e=t.sibling,e!==null){e.return=t.return,G=e;break}G=t.return}return Z=pd,pd=!1,Z}function ca(e,t,r){var o=t.updateQueue;if(o=o!==null?o.lastEffect:null,o!==null){var l=o=o.next;do{if((l.tag&e)===e){var c=l.destroy;l.destroy=void 0,c!==void 0&&Fi(t,r,c)}l=l.next}while(l!==o)}}function jo(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var o=r.create;r.destroy=o()}r=r.next}while(r!==t)}}function Hi(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function hd(e){var t=e.alternate;t!==null&&(e.alternate=null,hd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Rt],delete t[Zn],delete t[ai],delete t[Ip],delete t[zp])),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 gd(e){return e.tag===5||e.tag===3||e.tag===4}function vd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||gd(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 Bi(e,t,r){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Ga));else if(o!==4&&(e=e.child,e!==null))for(Bi(e,t,r),e=e.sibling;e!==null;)Bi(e,t,r),e=e.sibling}function Wi(e,t,r){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(o!==4&&(e=e.child,e!==null))for(Wi(e,t,r),e=e.sibling;e!==null;)Wi(e,t,r),e=e.sibling}var Ye=null,Tt=!1;function pr(e,t,r){for(r=r.child;r!==null;)yd(e,t,r),r=r.sibling}function yd(e,t,r){if(Lt&&typeof Lt.onCommitFiberUnmount=="function")try{Lt.onCommitFiberUnmount(Oa,r)}catch{}switch(r.tag){case 5:et||yn(r,t);case 6:var o=Ye,l=Tt;Ye=null,pr(e,t,r),Ye=o,Tt=l,Ye!==null&&(Tt?(e=Ye,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Ye.removeChild(r.stateNode));break;case 18:Ye!==null&&(Tt?(e=Ye,r=r.stateNode,e.nodeType===8?ni(e.parentNode,r):e.nodeType===1&&ni(e,r),Hn(e)):ni(Ye,r.stateNode));break;case 4:o=Ye,l=Tt,Ye=r.stateNode.containerInfo,Tt=!0,pr(e,t,r),Ye=o,Tt=l;break;case 0:case 11:case 14:case 15:if(!et&&(o=r.updateQueue,o!==null&&(o=o.lastEffect,o!==null))){l=o=o.next;do{var c=l,p=c.destroy;c=c.tag,p!==void 0&&((c&2)!==0||(c&4)!==0)&&Fi(r,t,p),l=l.next}while(l!==o)}pr(e,t,r);break;case 1:if(!et&&(yn(r,t),o=r.stateNode,typeof o.componentWillUnmount=="function"))try{o.props=r.memoizedProps,o.state=r.memoizedState,o.componentWillUnmount()}catch(x){Ie(r,t,x)}pr(e,t,r);break;case 21:pr(e,t,r);break;case 22:r.mode&1?(et=(o=et)||r.memoizedState!==null,pr(e,t,r),et=o):pr(e,t,r);break;default:pr(e,t,r)}}function xd(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Zp),t.forEach(function(o){var l=uh.bind(null,e,o);r.has(o)||(r.add(o),o.then(l,l))})}}function Pt(e,t){var r=t.deletions;if(r!==null)for(var o=0;o<r.length;o++){var l=r[o];try{var c=e,p=t,x=p;e:for(;x!==null;){switch(x.tag){case 5:Ye=x.stateNode,Tt=!1;break e;case 3:Ye=x.stateNode.containerInfo,Tt=!0;break e;case 4:Ye=x.stateNode.containerInfo,Tt=!0;break e}x=x.return}if(Ye===null)throw Error(i(160));yd(c,p,l),Ye=null,Tt=!1;var b=l.alternate;b!==null&&(b.return=null),l.return=null}catch(I){Ie(l,t,I)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)wd(t,e),t=t.sibling}function wd(e,t){var r=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Pt(t,e),$t(e),o&4){try{ca(3,e,e.return),jo(3,e)}catch(ee){Ie(e,e.return,ee)}try{ca(5,e,e.return)}catch(ee){Ie(e,e.return,ee)}}break;case 1:Pt(t,e),$t(e),o&512&&r!==null&&yn(r,r.return);break;case 5:if(Pt(t,e),$t(e),o&512&&r!==null&&yn(r,r.return),e.flags&32){var l=e.stateNode;try{Dn(l,"")}catch(ee){Ie(e,e.return,ee)}}if(o&4&&(l=e.stateNode,l!=null)){var c=e.memoizedProps,p=r!==null?r.memoizedProps:c,x=e.type,b=e.updateQueue;if(e.updateQueue=null,b!==null)try{x==="input"&&c.type==="radio"&&c.name!=null&&Yl(l,c),js(x,p);var I=js(x,c);for(p=0;p<b.length;p+=2){var B=b[p],V=b[p+1];B==="style"?ru(l,V):B==="dangerouslySetInnerHTML"?eu(l,V):B==="children"?Dn(l,V):k(l,B,V,I)}switch(x){case"input":gs(l,c);break;case"textarea":Gl(l,c);break;case"select":var H=l._wrapperState.wasMultiple;l._wrapperState.wasMultiple=!!c.multiple;var K=c.value;K!=null?Kr(l,!!c.multiple,K,!1):H!==!!c.multiple&&(c.defaultValue!=null?Kr(l,!!c.multiple,c.defaultValue,!0):Kr(l,!!c.multiple,c.multiple?[]:"",!1))}l[Zn]=c}catch(ee){Ie(e,e.return,ee)}}break;case 6:if(Pt(t,e),$t(e),o&4){if(e.stateNode===null)throw Error(i(162));l=e.stateNode,c=e.memoizedProps;try{l.nodeValue=c}catch(ee){Ie(e,e.return,ee)}}break;case 3:if(Pt(t,e),$t(e),o&4&&r!==null&&r.memoizedState.isDehydrated)try{Hn(t.containerInfo)}catch(ee){Ie(e,e.return,ee)}break;case 4:Pt(t,e),$t(e);break;case 13:Pt(t,e),$t(e),l=e.child,l.flags&8192&&(c=l.memoizedState!==null,l.stateNode.isHidden=c,!c||l.alternate!==null&&l.alternate.memoizedState!==null||(Qi=ze())),o&4&&xd(e);break;case 22:if(B=r!==null&&r.memoizedState!==null,e.mode&1?(et=(I=et)||B,Pt(t,e),et=I):Pt(t,e),$t(e),o&8192){if(I=e.memoizedState!==null,(e.stateNode.isHidden=I)&&!B&&(e.mode&1)!==0)for(G=e,B=e.child;B!==null;){for(V=G=B;G!==null;){switch(H=G,K=H.child,H.tag){case 0:case 11:case 14:case 15:ca(4,H,H.return);break;case 1:yn(H,H.return);var Z=H.stateNode;if(typeof Z.componentWillUnmount=="function"){o=H,r=H.return;try{t=o,Z.props=t.memoizedProps,Z.state=t.memoizedState,Z.componentWillUnmount()}catch(ee){Ie(o,r,ee)}}break;case 5:yn(H,H.return);break;case 22:if(H.memoizedState!==null){bd(V);continue}}K!==null?(K.return=H,G=K):bd(V)}B=B.sibling}e:for(B=null,V=e;;){if(V.tag===5){if(B===null){B=V;try{l=V.stateNode,I?(c=l.style,typeof c.setProperty=="function"?c.setProperty("display","none","important"):c.display="none"):(x=V.stateNode,b=V.memoizedProps.style,p=b!=null&&b.hasOwnProperty("display")?b.display:null,x.style.display=tu("display",p))}catch(ee){Ie(e,e.return,ee)}}}else if(V.tag===6){if(B===null)try{V.stateNode.nodeValue=I?"":V.memoizedProps}catch(ee){Ie(e,e.return,ee)}}else if((V.tag!==22&&V.tag!==23||V.memoizedState===null||V===e)&&V.child!==null){V.child.return=V,V=V.child;continue}if(V===e)break e;for(;V.sibling===null;){if(V.return===null||V.return===e)break e;B===V&&(B=null),V=V.return}B===V&&(B=null),V.sibling.return=V.return,V=V.sibling}}break;case 19:Pt(t,e),$t(e),o&4&&xd(e);break;case 21:break;default:Pt(t,e),$t(e)}}function $t(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(gd(r)){var o=r;break e}r=r.return}throw Error(i(160))}switch(o.tag){case 5:var l=o.stateNode;o.flags&32&&(Dn(l,""),o.flags&=-33);var c=vd(e);Wi(e,c,l);break;case 3:case 4:var p=o.stateNode.containerInfo,x=vd(e);Bi(e,x,p);break;default:throw Error(i(161))}}catch(b){Ie(e,e.return,b)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function th(e,t,r){G=e,jd(e)}function jd(e,t,r){for(var o=(e.mode&1)!==0;G!==null;){var l=G,c=l.child;if(l.tag===22&&o){var p=l.memoizedState!==null||wo;if(!p){var x=l.alternate,b=x!==null&&x.memoizedState!==null||et;x=wo;var I=et;if(wo=p,(et=b)&&!I)for(G=l;G!==null;)p=G,b=p.child,p.tag===22&&p.memoizedState!==null?kd(l):b!==null?(b.return=p,G=b):kd(l);for(;c!==null;)G=c,jd(c),c=c.sibling;G=l,wo=x,et=I}Nd(e)}else(l.subtreeFlags&8772)!==0&&c!==null?(c.return=l,G=c):Nd(e)}}function Nd(e){for(;G!==null;){var t=G;if((t.flags&8772)!==0){var r=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:et||jo(5,t);break;case 1:var o=t.stateNode;if(t.flags&4&&!et)if(r===null)o.componentDidMount();else{var l=t.elementType===t.type?r.memoizedProps:Et(t.type,r.memoizedProps);o.componentDidUpdate(l,r.memoizedState,o.__reactInternalSnapshotBeforeUpdate)}var c=t.updateQueue;c!==null&&bc(t,c,o);break;case 3:var p=t.updateQueue;if(p!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}bc(t,p,r)}break;case 5:var x=t.stateNode;if(r===null&&t.flags&4){r=x;var b=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":b.autoFocus&&r.focus();break;case"img":b.src&&(r.src=b.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var I=t.alternate;if(I!==null){var B=I.memoizedState;if(B!==null){var V=B.dehydrated;V!==null&&Hn(V)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(i(163))}et||t.flags&512&&Hi(t)}catch(H){Ie(t,t.return,H)}}if(t===e){G=null;break}if(r=t.sibling,r!==null){r.return=t.return,G=r;break}G=t.return}}function bd(e){for(;G!==null;){var t=G;if(t===e){G=null;break}var r=t.sibling;if(r!==null){r.return=t.return,G=r;break}G=t.return}}function kd(e){for(;G!==null;){var t=G;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{jo(4,t)}catch(b){Ie(t,r,b)}break;case 1:var o=t.stateNode;if(typeof o.componentDidMount=="function"){var l=t.return;try{o.componentDidMount()}catch(b){Ie(t,l,b)}}var c=t.return;try{Hi(t)}catch(b){Ie(t,c,b)}break;case 5:var p=t.return;try{Hi(t)}catch(b){Ie(t,p,b)}}}catch(b){Ie(t,t.return,b)}if(t===e){G=null;break}var x=t.sibling;if(x!==null){x.return=t.return,G=x;break}G=t.return}}var rh=Math.ceil,No=j.ReactCurrentDispatcher,Vi=j.ReactCurrentOwner,jt=j.ReactCurrentBatchConfig,ge=0,qe=null,Fe=null,Xe=0,gt=0,xn=ur(0),Be=0,da=null,Ar=0,bo=0,qi=0,fa=null,ut=null,Qi=0,wn=1/0,Xt=null,ko=!1,Yi=null,hr=null,So=!1,gr=null,_o=0,ma=0,Xi=null,Co=-1,Eo=0;function nt(){return(ge&6)!==0?ze():Co!==-1?Co:Co=ze()}function vr(e){return(e.mode&1)===0?1:(ge&2)!==0&&Xe!==0?Xe&-Xe:Ap.transition!==null?(Eo===0&&(Eo=vu()),Eo):(e=je,e!==0||(e=window.event,e=e===void 0?16:_u(e.type)),e)}function Dt(e,t,r,o){if(50<ma)throw ma=0,Xi=null,Error(i(185));zn(e,r,o),((ge&2)===0||e!==qe)&&(e===qe&&((ge&2)===0&&(bo|=r),Be===4&&yr(e,Xe)),ct(e,o),r===1&&ge===0&&(t.mode&1)===0&&(wn=ze()+500,to&&dr()))}function ct(e,t){var r=e.callbackNode;Am(e,t);var o=Ia(e,e===qe?Xe:0);if(o===0)r!==null&&pu(r),e.callbackNode=null,e.callbackPriority=0;else if(t=o&-o,e.callbackPriority!==t){if(r!=null&&pu(r),t===1)e.tag===0?$p(_d.bind(null,e)):dc(_d.bind(null,e)),Lp(function(){(ge&6)===0&&dr()}),r=null;else{switch(yu(o)){case 1:r=Es;break;case 4:r=hu;break;case 16:r=Ma;break;case 536870912:r=gu;break;default:r=Ma}r=Ld(r,Sd.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function Sd(e,t){if(Co=-1,Eo=0,(ge&6)!==0)throw Error(i(327));var r=e.callbackNode;if(jn()&&e.callbackNode!==r)return null;var o=Ia(e,e===qe?Xe:0);if(o===0)return null;if((o&30)!==0||(o&e.expiredLanes)!==0||t)t=To(e,o);else{t=o;var l=ge;ge|=2;var c=Ed();(qe!==e||Xe!==t)&&(Xt=null,wn=ze()+500,Fr(e,t));do try{oh();break}catch(x){Cd(e,x)}while(!0);mi(),No.current=c,ge=l,Fe!==null?t=0:(qe=null,Xe=0,t=Be)}if(t!==0){if(t===2&&(l=Ts(e),l!==0&&(o=l,t=Ki(e,l))),t===1)throw r=da,Fr(e,0),yr(e,o),ct(e,ze()),r;if(t===6)yr(e,o);else{if(l=e.current.alternate,(o&30)===0&&!nh(l)&&(t=To(e,o),t===2&&(c=Ts(e),c!==0&&(o=c,t=Ki(e,c))),t===1))throw r=da,Fr(e,0),yr(e,o),ct(e,ze()),r;switch(e.finishedWork=l,e.finishedLanes=o,t){case 0:case 1:throw Error(i(345));case 2:Hr(e,ut,Xt);break;case 3:if(yr(e,o),(o&130023424)===o&&(t=Qi+500-ze(),10<t)){if(Ia(e,0)!==0)break;if(l=e.suspendedLanes,(l&o)!==o){nt(),e.pingedLanes|=e.suspendedLanes&l;break}e.timeoutHandle=ri(Hr.bind(null,e,ut,Xt),t);break}Hr(e,ut,Xt);break;case 4:if(yr(e,o),(o&4194240)===o)break;for(t=e.eventTimes,l=-1;0<o;){var p=31-St(o);c=1<<p,p=t[p],p>l&&(l=p),o&=~c}if(o=l,o=ze()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*rh(o/1960))-o,10<o){e.timeoutHandle=ri(Hr.bind(null,e,ut,Xt),o);break}Hr(e,ut,Xt);break;case 5:Hr(e,ut,Xt);break;default:throw Error(i(329))}}}return ct(e,ze()),e.callbackNode===r?Sd.bind(null,e):null}function Ki(e,t){var r=fa;return e.current.memoizedState.isDehydrated&&(Fr(e,t).flags|=256),e=To(e,t),e!==2&&(t=ut,ut=r,t!==null&&Gi(t)),e}function Gi(e){ut===null?ut=e:ut.push.apply(ut,e)}function nh(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var o=0;o<r.length;o++){var l=r[o],c=l.getSnapshot;l=l.value;try{if(!_t(c(),l))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function yr(e,t){for(t&=~qi,t&=~bo,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-St(t),o=1<<r;e[r]=-1,t&=~o}}function _d(e){if((ge&6)!==0)throw Error(i(327));jn();var t=Ia(e,0);if((t&1)===0)return ct(e,ze()),null;var r=To(e,t);if(e.tag!==0&&r===2){var o=Ts(e);o!==0&&(t=o,r=Ki(e,o))}if(r===1)throw r=da,Fr(e,0),yr(e,t),ct(e,ze()),r;if(r===6)throw Error(i(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Hr(e,ut,Xt),ct(e,ze()),null}function Ji(e,t){var r=ge;ge|=1;try{return e(t)}finally{ge=r,ge===0&&(wn=ze()+500,to&&dr())}}function Ur(e){gr!==null&&gr.tag===0&&(ge&6)===0&&jn();var t=ge;ge|=1;var r=jt.transition,o=je;try{if(jt.transition=null,je=1,e)return e()}finally{je=o,jt.transition=r,ge=t,(ge&6)===0&&dr()}}function Zi(){gt=xn.current,Te(xn)}function Fr(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,Op(r)),Fe!==null)for(r=Fe.return;r!==null;){var o=r;switch(li(o),o.tag){case 1:o=o.type.childContextTypes,o!=null&&Za();break;case 3:gn(),Te(st),Te(Ge),ji();break;case 5:xi(o);break;case 4:gn();break;case 13:Te(Me);break;case 19:Te(Me);break;case 10:pi(o.type._context);break;case 22:case 23:Zi()}r=r.return}if(qe=e,Fe=e=xr(e.current,null),Xe=gt=t,Be=0,da=null,qi=bo=Ar=0,ut=fa=null,Ir!==null){for(t=0;t<Ir.length;t++)if(r=Ir[t],o=r.interleaved,o!==null){r.interleaved=null;var l=o.next,c=r.pending;if(c!==null){var p=c.next;c.next=l,o.next=p}r.pending=o}Ir=null}return e}function Cd(e,t){do{var r=Fe;try{if(mi(),fo.current=go,mo){for(var o=Oe.memoizedState;o!==null;){var l=o.queue;l!==null&&(l.pending=null),o=o.next}mo=!1}if($r=0,Ve=He=Oe=null,oa=!1,sa=0,Vi.current=null,r===null||r.return===null){Be=1,da=t,Fe=null;break}e:{var c=e,p=r.return,x=r,b=t;if(t=Xe,x.flags|=32768,b!==null&&typeof b=="object"&&typeof b.then=="function"){var I=b,B=x,V=B.tag;if((B.mode&1)===0&&(V===0||V===11||V===15)){var H=B.alternate;H?(B.updateQueue=H.updateQueue,B.memoizedState=H.memoizedState,B.lanes=H.lanes):(B.updateQueue=null,B.memoizedState=null)}var K=Jc(p);if(K!==null){K.flags&=-257,Zc(K,p,x,c,t),K.mode&1&&Gc(c,I,t),t=K,b=I;var Z=t.updateQueue;if(Z===null){var ee=new Set;ee.add(b),t.updateQueue=ee}else Z.add(b);break e}else{if((t&1)===0){Gc(c,I,t),el();break e}b=Error(i(426))}}else if(De&&x.mode&1){var $e=Jc(p);if($e!==null){($e.flags&65536)===0&&($e.flags|=256),Zc($e,p,x,c,t),di(vn(b,x));break e}}c=b=vn(b,x),Be!==4&&(Be=2),fa===null?fa=[c]:fa.push(c),c=p;do{switch(c.tag){case 3:c.flags|=65536,t&=-t,c.lanes|=t;var M=Xc(c,b,t);Nc(c,M);break e;case 1:x=b;var S=c.type,L=c.stateNode;if((c.flags&128)===0&&(typeof S.getDerivedStateFromError=="function"||L!==null&&typeof L.componentDidCatch=="function"&&(hr===null||!hr.has(L)))){c.flags|=65536,t&=-t,c.lanes|=t;var q=Kc(c,x,t);Nc(c,q);break e}}c=c.return}while(c!==null)}Pd(r)}catch(te){t=te,Fe===r&&r!==null&&(Fe=r=r.return);continue}break}while(!0)}function Ed(){var e=No.current;return No.current=go,e===null?go:e}function el(){(Be===0||Be===3||Be===2)&&(Be=4),qe===null||(Ar&268435455)===0&&(bo&268435455)===0||yr(qe,Xe)}function To(e,t){var r=ge;ge|=2;var o=Ed();(qe!==e||Xe!==t)&&(Xt=null,Fr(e,t));do try{ah();break}catch(l){Cd(e,l)}while(!0);if(mi(),ge=r,No.current=o,Fe!==null)throw Error(i(261));return qe=null,Xe=0,Be}function ah(){for(;Fe!==null;)Td(Fe)}function oh(){for(;Fe!==null&&!Pm();)Td(Fe)}function Td(e){var t=Od(e.alternate,e,gt);e.memoizedProps=e.pendingProps,t===null?Pd(e):Fe=t,Vi.current=null}function Pd(e){var t=e;do{var r=t.alternate;if(e=t.return,(t.flags&32768)===0){if(r=Gp(r,t,gt),r!==null){Fe=r;return}}else{if(r=Jp(r,t),r!==null){r.flags&=32767,Fe=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Be=6,Fe=null;return}}if(t=t.sibling,t!==null){Fe=t;return}Fe=t=e}while(t!==null);Be===0&&(Be=5)}function Hr(e,t,r){var o=je,l=jt.transition;try{jt.transition=null,je=1,sh(e,t,r,o)}finally{jt.transition=l,je=o}return null}function sh(e,t,r,o){do jn();while(gr!==null);if((ge&6)!==0)throw Error(i(327));r=e.finishedWork;var l=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(i(177));e.callbackNode=null,e.callbackPriority=0;var c=r.lanes|r.childLanes;if(Um(e,c),e===qe&&(Fe=qe=null,Xe=0),(r.subtreeFlags&2064)===0&&(r.flags&2064)===0||So||(So=!0,Ld(Ma,function(){return jn(),null})),c=(r.flags&15990)!==0,(r.subtreeFlags&15990)!==0||c){c=jt.transition,jt.transition=null;var p=je;je=1;var x=ge;ge|=4,Vi.current=null,eh(e,r),wd(r,e),_p(ei),Aa=!!Zs,ei=Zs=null,e.current=r,th(r),Dm(),ge=x,je=p,jt.transition=c}else e.current=r;if(So&&(So=!1,gr=e,_o=l),c=e.pendingLanes,c===0&&(hr=null),Lm(r.stateNode),ct(e,ze()),t!==null)for(o=e.onRecoverableError,r=0;r<t.length;r++)l=t[r],o(l.value,{componentStack:l.stack,digest:l.digest});if(ko)throw ko=!1,e=Yi,Yi=null,e;return(_o&1)!==0&&e.tag!==0&&jn(),c=e.pendingLanes,(c&1)!==0?e===Xi?ma++:(ma=0,Xi=e):ma=0,dr(),null}function jn(){if(gr!==null){var e=yu(_o),t=jt.transition,r=je;try{if(jt.transition=null,je=16>e?16:e,gr===null)var o=!1;else{if(e=gr,gr=null,_o=0,(ge&6)!==0)throw Error(i(331));var l=ge;for(ge|=4,G=e.current;G!==null;){var c=G,p=c.child;if((G.flags&16)!==0){var x=c.deletions;if(x!==null){for(var b=0;b<x.length;b++){var I=x[b];for(G=I;G!==null;){var B=G;switch(B.tag){case 0:case 11:case 15:ca(8,B,c)}var V=B.child;if(V!==null)V.return=B,G=V;else for(;G!==null;){B=G;var H=B.sibling,K=B.return;if(hd(B),B===I){G=null;break}if(H!==null){H.return=K,G=H;break}G=K}}}var Z=c.alternate;if(Z!==null){var ee=Z.child;if(ee!==null){Z.child=null;do{var $e=ee.sibling;ee.sibling=null,ee=$e}while(ee!==null)}}G=c}}if((c.subtreeFlags&2064)!==0&&p!==null)p.return=c,G=p;else e:for(;G!==null;){if(c=G,(c.flags&2048)!==0)switch(c.tag){case 0:case 11:case 15:ca(9,c,c.return)}var M=c.sibling;if(M!==null){M.return=c.return,G=M;break e}G=c.return}}var S=e.current;for(G=S;G!==null;){p=G;var L=p.child;if((p.subtreeFlags&2064)!==0&&L!==null)L.return=p,G=L;else e:for(p=S;G!==null;){if(x=G,(x.flags&2048)!==0)try{switch(x.tag){case 0:case 11:case 15:jo(9,x)}}catch(te){Ie(x,x.return,te)}if(x===p){G=null;break e}var q=x.sibling;if(q!==null){q.return=x.return,G=q;break e}G=x.return}}if(ge=l,dr(),Lt&&typeof Lt.onPostCommitFiberRoot=="function")try{Lt.onPostCommitFiberRoot(Oa,e)}catch{}o=!0}return o}finally{je=r,jt.transition=t}}return!1}function Dd(e,t,r){t=vn(r,t),t=Xc(e,t,1),e=mr(e,t,1),t=nt(),e!==null&&(zn(e,1,t),ct(e,t))}function Ie(e,t,r){if(e.tag===3)Dd(e,e,r);else for(;t!==null;){if(t.tag===3){Dd(t,e,r);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(hr===null||!hr.has(o))){e=vn(r,e),e=Kc(t,e,1),t=mr(t,e,1),e=nt(),t!==null&&(zn(t,1,e),ct(t,e));break}}t=t.return}}function ih(e,t,r){var o=e.pingCache;o!==null&&o.delete(t),t=nt(),e.pingedLanes|=e.suspendedLanes&r,qe===e&&(Xe&r)===r&&(Be===4||Be===3&&(Xe&130023424)===Xe&&500>ze()-Qi?Fr(e,0):qi|=r),ct(e,t)}function Md(e,t){t===0&&((e.mode&1)===0?t=1:(t=Ra,Ra<<=1,(Ra&130023424)===0&&(Ra=4194304)));var r=nt();e=qt(e,t),e!==null&&(zn(e,t,r),ct(e,r))}function lh(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Md(e,r)}function uh(e,t){var r=0;switch(e.tag){case 13:var o=e.stateNode,l=e.memoizedState;l!==null&&(r=l.retryLane);break;case 19:o=e.stateNode;break;default:throw Error(i(314))}o!==null&&o.delete(t),Md(e,r)}var Od;Od=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||st.current)lt=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return lt=!1,Kp(e,t,r);lt=(e.flags&131072)!==0}else lt=!1,De&&(t.flags&1048576)!==0&&fc(t,no,t.index);switch(t.lanes=0,t.tag){case 2:var o=t.type;xo(e,t),e=t.pendingProps;var l=un(t,Ge.current);hn(t,r),l=ki(null,t,o,e,l,r);var c=Si();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,it(o)?(c=!0,eo(t)):c=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,vi(t),l.updater=vo,t.stateNode=l,l._reactInternals=t,Di(t,o,e,r),t=Ri(null,t,o,!0,c,r)):(t.tag=0,De&&c&&ii(t),rt(null,t,l,r),t=t.child),t;case 16:o=t.elementType;e:{switch(xo(e,t),e=t.pendingProps,l=o._init,o=l(o._payload),t.type=o,l=t.tag=dh(o),e=Et(o,e),l){case 0:t=Li(null,t,o,e,r);break e;case 1:t=od(null,t,o,e,r);break e;case 11:t=ed(null,t,o,e,r);break e;case 14:t=td(null,t,o,Et(o.type,e),r);break e}throw Error(i(306,o,""))}return t;case 0:return o=t.type,l=t.pendingProps,l=t.elementType===o?l:Et(o,l),Li(e,t,o,l,r);case 1:return o=t.type,l=t.pendingProps,l=t.elementType===o?l:Et(o,l),od(e,t,o,l,r);case 3:e:{if(sd(t),e===null)throw Error(i(387));o=t.pendingProps,c=t.memoizedState,l=c.element,jc(e,t),uo(t,o,null,r);var p=t.memoizedState;if(o=p.element,c.isDehydrated)if(c={element:o,isDehydrated:!1,cache:p.cache,pendingSuspenseBoundaries:p.pendingSuspenseBoundaries,transitions:p.transitions},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){l=vn(Error(i(423)),t),t=id(e,t,o,r,l);break e}else if(o!==l){l=vn(Error(i(424)),t),t=id(e,t,o,r,l);break e}else for(ht=lr(t.stateNode.containerInfo.firstChild),pt=t,De=!0,Ct=null,r=xc(t,null,o,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(fn(),o===l){t=Yt(e,t,r);break e}rt(e,t,o,r)}t=t.child}return t;case 5:return kc(t),e===null&&ci(t),o=t.type,l=t.pendingProps,c=e!==null?e.memoizedProps:null,p=l.children,ti(o,l)?p=null:c!==null&&ti(o,c)&&(t.flags|=32),ad(e,t),rt(e,t,p,r),t.child;case 6:return e===null&&ci(t),null;case 13:return ld(e,t,r);case 4:return yi(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=mn(t,null,o,r):rt(e,t,o,r),t.child;case 11:return o=t.type,l=t.pendingProps,l=t.elementType===o?l:Et(o,l),ed(e,t,o,l,r);case 7:return rt(e,t,t.pendingProps,r),t.child;case 8:return rt(e,t,t.pendingProps.children,r),t.child;case 12:return rt(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(o=t.type._context,l=t.pendingProps,c=t.memoizedProps,p=l.value,Ce(so,o._currentValue),o._currentValue=p,c!==null)if(_t(c.value,p)){if(c.children===l.children&&!st.current){t=Yt(e,t,r);break e}}else for(c=t.child,c!==null&&(c.return=t);c!==null;){var x=c.dependencies;if(x!==null){p=c.child;for(var b=x.firstContext;b!==null;){if(b.context===o){if(c.tag===1){b=Qt(-1,r&-r),b.tag=2;var I=c.updateQueue;if(I!==null){I=I.shared;var B=I.pending;B===null?b.next=b:(b.next=B.next,B.next=b),I.pending=b}}c.lanes|=r,b=c.alternate,b!==null&&(b.lanes|=r),hi(c.return,r,t),x.lanes|=r;break}b=b.next}}else if(c.tag===10)p=c.type===t.type?null:c.child;else if(c.tag===18){if(p=c.return,p===null)throw Error(i(341));p.lanes|=r,x=p.alternate,x!==null&&(x.lanes|=r),hi(p,r,t),p=c.sibling}else p=c.child;if(p!==null)p.return=c;else for(p=c;p!==null;){if(p===t){p=null;break}if(c=p.sibling,c!==null){c.return=p.return,p=c;break}p=p.return}c=p}rt(e,t,l.children,r),t=t.child}return t;case 9:return l=t.type,o=t.pendingProps.children,hn(t,r),l=xt(l),o=o(l),t.flags|=1,rt(e,t,o,r),t.child;case 14:return o=t.type,l=Et(o,t.pendingProps),l=Et(o.type,l),td(e,t,o,l,r);case 15:return rd(e,t,t.type,t.pendingProps,r);case 17:return o=t.type,l=t.pendingProps,l=t.elementType===o?l:Et(o,l),xo(e,t),t.tag=1,it(o)?(e=!0,eo(t)):e=!1,hn(t,r),Qc(t,o,l),Di(t,o,l,r),Ri(null,t,o,!0,e,r);case 19:return cd(e,t,r);case 22:return nd(e,t,r)}throw Error(i(156,t.tag))};function Ld(e,t){return mu(e,t)}function ch(e,t,r,o){this.tag=e,this.key=r,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=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Nt(e,t,r,o){return new ch(e,t,r,o)}function tl(e){return e=e.prototype,!(!e||!e.isReactComponent)}function dh(e){if(typeof e=="function")return tl(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ie)return 11;if(e===re)return 14}return 2}function xr(e,t){var r=e.alternate;return r===null?(r=Nt(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Po(e,t,r,o,l,c){var p=2;if(o=e,typeof e=="function")tl(e)&&(p=1);else if(typeof e=="string")p=5;else e:switch(e){case A:return Br(r.children,l,c,t);case Q:p=8,l|=8;break;case oe:return e=Nt(12,r,t,l|2),e.elementType=oe,e.lanes=c,e;case pe:return e=Nt(13,r,t,l),e.elementType=pe,e.lanes=c,e;case X:return e=Nt(19,r,t,l),e.elementType=X,e.lanes=c,e;case E:return Do(r,l,c,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case fe:p=10;break e;case ce:p=9;break e;case ie:p=11;break e;case re:p=14;break e;case le:p=16,o=null;break e}throw Error(i(130,e==null?e:typeof e,""))}return t=Nt(p,r,t,l),t.elementType=e,t.type=o,t.lanes=c,t}function Br(e,t,r,o){return e=Nt(7,e,o,t),e.lanes=r,e}function Do(e,t,r,o){return e=Nt(22,e,o,t),e.elementType=E,e.lanes=r,e.stateNode={isHidden:!1},e}function rl(e,t,r){return e=Nt(6,e,null,t),e.lanes=r,e}function nl(e,t,r){return t=Nt(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function fh(e,t,r,o,l){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=Ps(0),this.expirationTimes=Ps(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ps(0),this.identifierPrefix=o,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function al(e,t,r,o,l,c,p,x,b){return e=new fh(e,t,r,x,b),t===1?(t=1,c===!0&&(t|=8)):t=0,c=Nt(3,null,null,t),e.current=c,c.stateNode=e,c.memoizedState={element:o,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},vi(c),e}function mh(e,t,r){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:R,key:o==null?null:""+o,children:e,containerInfo:t,implementation:r}}function Rd(e){if(!e)return cr;e=e._reactInternals;e:{if(Dr(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(it(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(i(171))}if(e.tag===1){var r=e.type;if(it(r))return uc(e,r,t)}return t}function Id(e,t,r,o,l,c,p,x,b){return e=al(r,o,!0,e,l,c,p,x,b),e.context=Rd(null),r=e.current,o=nt(),l=vr(r),c=Qt(o,l),c.callback=t??null,mr(r,c,l),e.current.lanes=l,zn(e,l,o),ct(e,o),e}function Mo(e,t,r,o){var l=t.current,c=nt(),p=vr(l);return r=Rd(r),t.context===null?t.context=r:t.pendingContext=r,t=Qt(c,p),t.payload={element:e},o=o===void 0?null:o,o!==null&&(t.callback=o),e=mr(l,t,p),e!==null&&(Dt(e,l,p,c),lo(e,l,p)),p}function Oo(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 zd(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function ol(e,t){zd(e,t),(e=e.alternate)&&zd(e,t)}function ph(){return null}var $d=typeof reportError=="function"?reportError:function(e){console.error(e)};function sl(e){this._internalRoot=e}Lo.prototype.render=sl.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));Mo(e,t,null,null)},Lo.prototype.unmount=sl.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ur(function(){Mo(null,e,null,null)}),t[Ht]=null}};function Lo(e){this._internalRoot=e}Lo.prototype.unstable_scheduleHydration=function(e){if(e){var t=ju();e={blockedOn:null,target:e,priority:t};for(var r=0;r<or.length&&t!==0&&t<or[r].priority;r++);or.splice(r,0,e),r===0&&ku(e)}};function il(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ro(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Ad(){}function hh(e,t,r,o,l){if(l){if(typeof o=="function"){var c=o;o=function(){var I=Oo(p);c.call(I)}}var p=Id(t,o,e,0,null,!1,!1,"",Ad);return e._reactRootContainer=p,e[Ht]=p.current,Gn(e.nodeType===8?e.parentNode:e),Ur(),p}for(;l=e.lastChild;)e.removeChild(l);if(typeof o=="function"){var x=o;o=function(){var I=Oo(b);x.call(I)}}var b=al(e,0,!1,null,null,!1,!1,"",Ad);return e._reactRootContainer=b,e[Ht]=b.current,Gn(e.nodeType===8?e.parentNode:e),Ur(function(){Mo(t,b,r,o)}),b}function Io(e,t,r,o,l){var c=r._reactRootContainer;if(c){var p=c;if(typeof l=="function"){var x=l;l=function(){var b=Oo(p);x.call(b)}}Mo(t,p,e,l)}else p=hh(r,t,e,l,o);return Oo(p)}xu=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=In(t.pendingLanes);r!==0&&(Ds(t,r|1),ct(t,ze()),(ge&6)===0&&(wn=ze()+500,dr()))}break;case 13:Ur(function(){var o=qt(e,1);if(o!==null){var l=nt();Dt(o,e,1,l)}}),ol(e,1)}},Ms=function(e){if(e.tag===13){var t=qt(e,134217728);if(t!==null){var r=nt();Dt(t,e,134217728,r)}ol(e,134217728)}},wu=function(e){if(e.tag===13){var t=vr(e),r=qt(e,t);if(r!==null){var o=nt();Dt(r,e,t,o)}ol(e,t)}},ju=function(){return je},Nu=function(e,t){var r=je;try{return je=e,t()}finally{je=r}},ks=function(e,t,r){switch(t){case"input":if(gs(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var o=r[t];if(o!==e&&o.form===e.form){var l=Ja(o);if(!l)throw Error(i(90));ql(o),gs(o,l)}}}break;case"textarea":Gl(e,r);break;case"select":t=r.value,t!=null&&Kr(e,!!r.multiple,t,!1)}},su=Ji,iu=Ur;var gh={usingClientEntryPoint:!1,Events:[ea,sn,Ja,au,ou,Ji]},pa={findFiberByHostInstance:Mr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},vh={bundleType:pa.bundleType,version:pa.version,rendererPackageName:pa.rendererPackageName,rendererConfig:pa.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:j.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=du(e),e===null?null:e.stateNode},findFiberByHostInstance:pa.findFiberByHostInstance||ph,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 zo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zo.isDisabled&&zo.supportsFiber)try{Oa=zo.inject(vh),Lt=zo}catch{}}return dt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=gh,dt.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!il(t))throw Error(i(200));return mh(e,t,null,r)},dt.createRoot=function(e,t){if(!il(e))throw Error(i(299));var r=!1,o="",l=$d;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=al(e,1,!1,null,null,r,!1,o,l),e[Ht]=t.current,Gn(e.nodeType===8?e.parentNode:e),new sl(t)},dt.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=du(t),e=e===null?null:e.stateNode,e},dt.flushSync=function(e){return Ur(e)},dt.hydrate=function(e,t,r){if(!Ro(t))throw Error(i(200));return Io(null,e,t,!0,r)},dt.hydrateRoot=function(e,t,r){if(!il(e))throw Error(i(405));var o=r!=null&&r.hydratedSources||null,l=!1,c="",p=$d;if(r!=null&&(r.unstable_strictMode===!0&&(l=!0),r.identifierPrefix!==void 0&&(c=r.identifierPrefix),r.onRecoverableError!==void 0&&(p=r.onRecoverableError)),t=Id(t,null,e,1,r??null,l,!1,c,p),e[Ht]=t.current,Gn(e),o)for(e=0;e<o.length;e++)r=o[e],l=r._getVersion,l=l(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,l]:t.mutableSourceEagerHydrationData.push(r,l);return new Lo(t)},dt.render=function(e,t,r){if(!Ro(t))throw Error(i(200));return Io(null,e,t,!1,r)},dt.unmountComponentAtNode=function(e){if(!Ro(e))throw Error(i(40));return e._reactRootContainer?(Ur(function(){Io(null,null,e,!1,function(){e._reactRootContainer=null,e[Ht]=null})}),!0):!1},dt.unstable_batchedUpdates=Ji,dt.unstable_renderSubtreeIntoContainer=function(e,t,r,o){if(!Ro(r))throw Error(i(200));if(e==null||e._reactInternals===void 0)throw Error(i(38));return Io(e,t,r,!1,o)},dt.version="18.3.1-next-f1338f8080-20240426",dt}var Qd;function Of(){if(Qd)return dl.exports;Qd=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),dl.exports=Ch(),dl.exports}var Yd;function Eh(){if(Yd)return $o;Yd=1;var n=Of();return $o.createRoot=n.createRoot,$o.hydrateRoot=n.hydrateRoot,$o}var Th=Eh();Of();/**
* @remix-run/router v1.23.0
*
* 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 ya(){return ya=Object.assign?Object.assign.bind():function(n){for(var a=1;a<arguments.length;a++){var i=arguments[a];for(var u in i)Object.prototype.hasOwnProperty.call(i,u)&&(n[u]=i[u])}return n},ya.apply(this,arguments)}var br;(function(n){n.Pop="POP",n.Push="PUSH",n.Replace="REPLACE"})(br||(br={}));const Xd="popstate";function Ph(n){n===void 0&&(n={});function a(u,d){let{pathname:f,search:m,hash:v}=u.location;return yl("",{pathname:f,search:m,hash:v},d.state&&d.state.usr||null,d.state&&d.state.key||"default")}function i(u,d){return typeof d=="string"?d:Zo(d)}return Mh(a,i,null,n)}function Ue(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function Lf(n,a){if(!n){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function Dh(){return Math.random().toString(36).substr(2,8)}function Kd(n,a){return{usr:n.state,key:n.key,idx:a}}function yl(n,a,i,u){return i===void 0&&(i=null),ya({pathname:typeof n=="string"?n:n.pathname,search:"",hash:""},typeof a=="string"?_n(a):a,{state:i,key:a&&a.key||u||Dh()})}function Zo(n){let{pathname:a="/",search:i="",hash:u=""}=n;return i&&i!=="?"&&(a+=i.charAt(0)==="?"?i:"?"+i),u&&u!=="#"&&(a+=u.charAt(0)==="#"?u:"#"+u),a}function _n(n){let a={};if(n){let i=n.indexOf("#");i>=0&&(a.hash=n.substr(i),n=n.substr(0,i));let u=n.indexOf("?");u>=0&&(a.search=n.substr(u),n=n.substr(0,u)),n&&(a.pathname=n)}return a}function Mh(n,a,i,u){u===void 0&&(u={});let{window:d=document.defaultView,v5Compat:f=!1}=u,m=d.history,v=br.Pop,g=null,w=h();w==null&&(w=0,m.replaceState(ya({},m.state,{idx:w}),""));function h(){return(m.state||{idx:null}).idx}function y(){v=br.Pop;let P=h(),W=P==null?null:P-w;w=P,g&&g({action:v,location:z.location,delta:W})}function N(P,W){v=br.Push;let _=yl(z.location,P,W);w=h()+1;let k=Kd(_,w),j=z.createHref(_);try{m.pushState(k,"",j)}catch(D){if(D instanceof DOMException&&D.name==="DataCloneError")throw D;d.location.assign(j)}f&&g&&g({action:v,location:z.location,delta:1})}function O(P,W){v=br.Replace;let _=yl(z.location,P,W);w=h();let k=Kd(_,w),j=z.createHref(_);m.replaceState(k,"",j),f&&g&&g({action:v,location:z.location,delta:0})}function $(P){let W=d.location.origin!=="null"?d.location.origin:d.location.href,_=typeof P=="string"?P:Zo(P);return _=_.replace(/ $/,"%20"),Ue(W,"No window.location.(origin|href) available to create URL for href: "+_),new URL(_,W)}let z={get action(){return v},get location(){return n(d,m)},listen(P){if(g)throw new Error("A history only accepts one active listener");return d.addEventListener(Xd,y),g=P,()=>{d.removeEventListener(Xd,y),g=null}},createHref(P){return a(d,P)},createURL:$,encodeLocation(P){let W=$(P);return{pathname:W.pathname,search:W.search,hash:W.hash}},push:N,replace:O,go(P){return m.go(P)}};return z}var Gd;(function(n){n.data="data",n.deferred="deferred",n.redirect="redirect",n.error="error"})(Gd||(Gd={}));function Oh(n,a,i){return i===void 0&&(i="/"),Lh(n,a,i)}function Lh(n,a,i,u){let d=typeof a=="string"?_n(a):a,f=zl(d.pathname||"/",i);if(f==null)return null;let m=Rf(n);Rh(m);let v=null;for(let g=0;v==null&&g<m.length;++g){let w=Qh(f);v=Wh(m[g],w)}return v}function Rf(n,a,i,u){a===void 0&&(a=[]),i===void 0&&(i=[]),u===void 0&&(u="");let d=(f,m,v)=>{let g={relativePath:v===void 0?f.path||"":v,caseSensitive:f.caseSensitive===!0,childrenIndex:m,route:f};g.relativePath.startsWith("/")&&(Ue(g.relativePath.startsWith(u),'Absolute route path "'+g.relativePath+'" nested under path '+('"'+u+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),g.relativePath=g.relativePath.slice(u.length));let w=Sr([u,g.relativePath]),h=i.concat(g);f.children&&f.children.length>0&&(Ue(f.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+w+'".')),Rf(f.children,a,h,w)),!(f.path==null&&!f.index)&&a.push({path:w,score:Hh(w,f.index),routesMeta:h})};return n.forEach((f,m)=>{var v;if(f.path===""||!((v=f.path)!=null&&v.includes("?")))d(f,m);else for(let g of If(f.path))d(f,m,g)}),a}function If(n){let a=n.split("/");if(a.length===0)return[];let[i,...u]=a,d=i.endsWith("?"),f=i.replace(/\?$/,"");if(u.length===0)return d?[f,""]:[f];let m=If(u.join("/")),v=[];return v.push(...m.map(g=>g===""?f:[f,g].join("/"))),d&&v.push(...m),v.map(g=>n.startsWith("/")&&g===""?"/":g)}function Rh(n){n.sort((a,i)=>a.score!==i.score?i.score-a.score:Bh(a.routesMeta.map(u=>u.childrenIndex),i.routesMeta.map(u=>u.childrenIndex)))}const Ih=/^:[\w-]+$/,zh=3,$h=2,Ah=1,Uh=10,Fh=-2,Jd=n=>n==="*";function Hh(n,a){let i=n.split("/"),u=i.length;return i.some(Jd)&&(u+=Fh),a&&(u+=$h),i.filter(d=>!Jd(d)).reduce((d,f)=>d+(Ih.test(f)?zh:f===""?Ah:Uh),u)}function Bh(n,a){return n.length===a.length&&n.slice(0,-1).every((u,d)=>u===a[d])?n[n.length-1]-a[a.length-1]:0}function Wh(n,a,i){let{routesMeta:u}=n,d={},f="/",m=[];for(let v=0;v<u.length;++v){let g=u[v],w=v===u.length-1,h=f==="/"?a:a.slice(f.length)||"/",y=Vh({path:g.relativePath,caseSensitive:g.caseSensitive,end:w},h),N=g.route;if(!y)return null;Object.assign(d,y.params),m.push({params:d,pathname:Sr([f,y.pathname]),pathnameBase:Gh(Sr([f,y.pathnameBase])),route:N}),y.pathnameBase!=="/"&&(f=Sr([f,y.pathnameBase]))}return m}function Vh(n,a){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[i,u]=qh(n.path,n.caseSensitive,n.end),d=a.match(i);if(!d)return null;let f=d[0],m=f.replace(/(.)\/+$/,"$1"),v=d.slice(1);return{params:u.reduce((w,h,y)=>{let{paramName:N,isOptional:O}=h;if(N==="*"){let z=v[y]||"";m=f.slice(0,f.length-z.length).replace(/(.)\/+$/,"$1")}const $=v[y];return O&&!$?w[N]=void 0:w[N]=($||"").replace(/%2F/g,"/"),w},{}),pathname:f,pathnameBase:m,pattern:n}}function qh(n,a,i){a===void 0&&(a=!1),i===void 0&&(i=!0),Lf(n==="*"||!n.endsWith("*")||n.endsWith("/*"),'Route path "'+n+'" will be treated as if it were '+('"'+n.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+n.replace(/\*$/,"/*")+'".'));let u=[],d="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(m,v,g)=>(u.push({paramName:v,isOptional:g!=null}),g?"/?([^\\/]+)?":"/([^\\/]+)"));return n.endsWith("*")?(u.push({paramName:"*"}),d+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?d+="\\/*$":n!==""&&n!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,a?void 0:"i"),u]}function Qh(n){try{return n.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return Lf(!1,'The URL path "'+n+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+a+").")),n}}function zl(n,a){if(a==="/")return n;if(!n.toLowerCase().startsWith(a.toLowerCase()))return null;let i=a.endsWith("/")?a.length-1:a.length,u=n.charAt(i);return u&&u!=="/"?null:n.slice(i)||"/"}function Yh(n,a){a===void 0&&(a="/");let{pathname:i,search:u="",hash:d=""}=typeof n=="string"?_n(n):n;return{pathname:i?i.startsWith("/")?i:Xh(i,a):a,search:Jh(u),hash:Zh(d)}}function Xh(n,a){let i=a.replace(/\/+$/,"").split("/");return n.split("/").forEach(d=>{d===".."?i.length>1&&i.pop():d!=="."&&i.push(d)}),i.length>1?i.join("/"):"/"}function pl(n,a,i,u){return"Cannot include a '"+n+"' character in a manually specified "+("`to."+a+"` field ["+JSON.stringify(u)+"]. 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 Kh(n){return n.filter((a,i)=>i===0||a.route.path&&a.route.path.length>0)}function $l(n,a){let i=Kh(n);return a?i.map((u,d)=>d===i.length-1?u.pathname:u.pathnameBase):i.map(u=>u.pathnameBase)}function Al(n,a,i,u){u===void 0&&(u=!1);let d;typeof n=="string"?d=_n(n):(d=ya({},n),Ue(!d.pathname||!d.pathname.includes("?"),pl("?","pathname","search",d)),Ue(!d.pathname||!d.pathname.includes("#"),pl("#","pathname","hash",d)),Ue(!d.search||!d.search.includes("#"),pl("#","search","hash",d)));let f=n===""||d.pathname==="",m=f?"/":d.pathname,v;if(m==null)v=i;else{let y=a.length-1;if(!u&&m.startsWith("..")){let N=m.split("/");for(;N[0]==="..";)N.shift(),y-=1;d.pathname=N.join("/")}v=y>=0?a[y]:"/"}let g=Yh(d,v),w=m&&m!=="/"&&m.endsWith("/"),h=(f||m===".")&&i.endsWith("/");return!g.pathname.endsWith("/")&&(w||h)&&(g.pathname+="/"),g}const Sr=n=>n.join("/").replace(/\/\/+/g,"/"),Gh=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),Jh=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,Zh=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n;function e0(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}const zf=["post","put","patch","delete"];new Set(zf);const t0=["get",...zf];new Set(t0);/**
* React Router v6.30.1
*
* 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 xa(){return xa=Object.assign?Object.assign.bind():function(n){for(var a=1;a<arguments.length;a++){var i=arguments[a];for(var u in i)Object.prototype.hasOwnProperty.call(i,u)&&(n[u]=i[u])}return n},xa.apply(this,arguments)}const Ul=C.createContext(null),r0=C.createContext(null),Cr=C.createContext(null),is=C.createContext(null),Er=C.createContext({outlet:null,matches:[],isDataRoute:!1}),$f=C.createContext(null);function n0(n,a){let{relative:i}=a===void 0?{}:a;Cn()||Ue(!1);let{basename:u,navigator:d}=C.useContext(Cr),{hash:f,pathname:m,search:v}=Uf(n,{relative:i}),g=m;return u!=="/"&&(g=m==="/"?u:Sr([u,m])),d.createHref({pathname:g,search:v,hash:f})}function Cn(){return C.useContext(is)!=null}function En(){return Cn()||Ue(!1),C.useContext(is).location}function Af(n){C.useContext(Cr).static||C.useLayoutEffect(n)}function Tr(){let{isDataRoute:n}=C.useContext(Er);return n?g0():a0()}function a0(){Cn()||Ue(!1);let n=C.useContext(Ul),{basename:a,future:i,navigator:u}=C.useContext(Cr),{matches:d}=C.useContext(Er),{pathname:f}=En(),m=JSON.stringify($l(d,i.v7_relativeSplatPath)),v=C.useRef(!1);return Af(()=>{v.current=!0}),C.useCallback(function(w,h){if(h===void 0&&(h={}),!v.current)return;if(typeof w=="number"){u.go(w);return}let y=Al(w,JSON.parse(m),f,h.relative==="path");n==null&&a!=="/"&&(y.pathname=y.pathname==="/"?a:Sr([a,y.pathname])),(h.replace?u.replace:u.push)(y,h.state,h)},[a,u,m,f,n])}function Uf(n,a){let{relative:i}=a===void 0?{}:a,{future:u}=C.useContext(Cr),{matches:d}=C.useContext(Er),{pathname:f}=En(),m=JSON.stringify($l(d,u.v7_relativeSplatPath));return C.useMemo(()=>Al(n,JSON.parse(m),f,i==="path"),[n,m,f,i])}function o0(n,a){return s0(n,a)}function s0(n,a,i,u){Cn()||Ue(!1);let{navigator:d}=C.useContext(Cr),{matches:f}=C.useContext(Er),m=f[f.length-1],v=m?m.params:{};m&&m.pathname;let g=m?m.pathnameBase:"/";m&&m.route;let w=En(),h;if(a){var y;let P=typeof a=="string"?_n(a):a;g==="/"||(y=P.pathname)!=null&&y.startsWith(g)||Ue(!1),h=P}else h=w;let N=h.pathname||"/",O=N;if(g!=="/"){let P=g.replace(/^\//,"").split("/");O="/"+N.replace(/^\//,"").split("/").slice(P.length).join("/")}let $=Oh(n,{pathname:O}),z=d0($&&$.map(P=>Object.assign({},P,{params:Object.assign({},v,P.params),pathname:Sr([g,d.encodeLocation?d.encodeLocation(P.pathname).pathname:P.pathname]),pathnameBase:P.pathnameBase==="/"?g:Sr([g,d.encodeLocation?d.encodeLocation(P.pathnameBase).pathname:P.pathnameBase])})),f,i,u);return a&&z?C.createElement(is.Provider,{value:{location:xa({pathname:"/",search:"",hash:"",state:null,key:"default"},h),navigationType:br.Pop}},z):z}function i0(){let n=h0(),a=e0(n)?n.status+" "+n.statusText:n instanceof Error?n.message:JSON.stringify(n),i=n instanceof Error?n.stack:null,d={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return C.createElement(C.Fragment,null,C.createElement("h2",null,"Unexpected Application Error!"),C.createElement("h3",{style:{fontStyle:"italic"}},a),i?C.createElement("pre",{style:d},i):null,null)}const l0=C.createElement(i0,null);class u0 extends C.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?C.createElement(Er.Provider,{value:this.props.routeContext},C.createElement($f.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function c0(n){let{routeContext:a,match:i,children:u}=n,d=C.useContext(Ul);return d&&d.static&&d.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(d.staticContext._deepestRenderedBoundaryId=i.route.id),C.createElement(Er.Provider,{value:a},u)}function d0(n,a,i,u){var d;if(a===void 0&&(a=[]),i===void 0&&(i=null),u===void 0&&(u=null),n==null){var f;if(!i)return null;if(i.errors)n=i.matches;else if((f=u)!=null&&f.v7_partialHydration&&a.length===0&&!i.initialized&&i.matches.length>0)n=i.matches;else return null}let m=n,v=(d=i)==null?void 0:d.errors;if(v!=null){let h=m.findIndex(y=>y.route.id&&v?.[y.route.id]!==void 0);h>=0||Ue(!1),m=m.slice(0,Math.min(m.length,h+1))}let g=!1,w=-1;if(i&&u&&u.v7_partialHydration)for(let h=0;h<m.length;h++){let y=m[h];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(w=h),y.route.id){let{loaderData:N,errors:O}=i,$=y.route.loader&&N[y.route.id]===void 0&&(!O||O[y.route.id]===void 0);if(y.route.lazy||$){g=!0,w>=0?m=m.slice(0,w+1):m=[m[0]];break}}}return m.reduceRight((h,y,N)=>{let O,$=!1,z=null,P=null;i&&(O=v&&y.route.id?v[y.route.id]:void 0,z=y.route.errorElement||l0,g&&(w<0&&N===0?(v0("route-fallback"),$=!0,P=null):w===N&&($=!0,P=y.route.hydrateFallbackElement||null)));let W=a.concat(m.slice(0,N+1)),_=()=>{let k;return O?k=z:$?k=P:y.route.Component?k=C.createElement(y.route.Component,null):y.route.element?k=y.route.element:k=h,C.createElement(c0,{match:y,routeContext:{outlet:h,matches:W,isDataRoute:i!=null},children:k})};return i&&(y.route.ErrorBoundary||y.route.errorElement||N===0)?C.createElement(u0,{location:i.location,revalidation:i.revalidation,component:z,error:O,children:_(),routeContext:{outlet:null,matches:W,isDataRoute:!0}}):_()},null)}var Ff=(function(n){return n.UseBlocker="useBlocker",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n})(Ff||{}),Hf=(function(n){return n.UseBlocker="useBlocker",n.UseLoaderData="useLoaderData",n.UseActionData="useActionData",n.UseRouteError="useRouteError",n.UseNavigation="useNavigation",n.UseRouteLoaderData="useRouteLoaderData",n.UseMatches="useMatches",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n.UseRouteId="useRouteId",n})(Hf||{});function f0(n){let a=C.useContext(Ul);return a||Ue(!1),a}function m0(n){let a=C.useContext(r0);return a||Ue(!1),a}function p0(n){let a=C.useContext(Er);return a||Ue(!1),a}function Bf(n){let a=p0(),i=a.matches[a.matches.length-1];return i.route.id||Ue(!1),i.route.id}function h0(){var n;let a=C.useContext($f),i=m0(),u=Bf();return a!==void 0?a:(n=i.errors)==null?void 0:n[u]}function g0(){let{router:n}=f0(Ff.UseNavigateStable),a=Bf(Hf.UseNavigateStable),i=C.useRef(!1);return Af(()=>{i.current=!0}),C.useCallback(function(d,f){f===void 0&&(f={}),i.current&&(typeof d=="number"?n.navigate(d):n.navigate(d,xa({fromRouteId:a},f)))},[n,a])}const Zd={};function v0(n,a,i){Zd[n]||(Zd[n]=!0)}function y0(n,a){n?.v7_startTransition,n?.v7_relativeSplatPath}function x0(n){let{to:a,replace:i,state:u,relative:d}=n;Cn()||Ue(!1);let{future:f,static:m}=C.useContext(Cr),{matches:v}=C.useContext(Er),{pathname:g}=En(),w=Tr(),h=Al(a,$l(v,f.v7_relativeSplatPath),g,d==="path"),y=JSON.stringify(h);return C.useEffect(()=>w(JSON.parse(y),{replace:i,state:u,relative:d}),[w,y,d,i,u]),null}function Mt(n){Ue(!1)}function w0(n){let{basename:a="/",children:i=null,location:u,navigationType:d=br.Pop,navigator:f,static:m=!1,future:v}=n;Cn()&&Ue(!1);let g=a.replace(/^\/*/,"/"),w=C.useMemo(()=>({basename:g,navigator:f,static:m,future:xa({v7_relativeSplatPath:!1},v)}),[g,v,f,m]);typeof u=="string"&&(u=_n(u));let{pathname:h="/",search:y="",hash:N="",state:O=null,key:$="default"}=u,z=C.useMemo(()=>{let P=zl(h,g);return P==null?null:{location:{pathname:P,search:y,hash:N,state:O,key:$},navigationType:d}},[g,h,y,N,O,$,d]);return z==null?null:C.createElement(Cr.Provider,{value:w},C.createElement(is.Provider,{children:i,value:z}))}function j0(n){let{children:a,location:i}=n;return o0(xl(a),i)}new Promise(()=>{});function xl(n,a){a===void 0&&(a=[]);let i=[];return C.Children.forEach(n,(u,d)=>{if(!C.isValidElement(u))return;let f=[...a,d];if(u.type===C.Fragment){i.push.apply(i,xl(u.props.children,f));return}u.type!==Mt&&Ue(!1),!u.props.index||!u.props.children||Ue(!1);let m={id:u.props.id||f.join("-"),caseSensitive:u.props.caseSensitive,element:u.props.element,Component:u.props.Component,index:u.props.index,path:u.props.path,loader:u.props.loader,action:u.props.action,errorElement:u.props.errorElement,ErrorBoundary:u.props.ErrorBoundary,hasErrorBoundary:u.props.ErrorBoundary!=null||u.props.errorElement!=null,shouldRevalidate:u.props.shouldRevalidate,handle:u.props.handle,lazy:u.props.lazy};u.props.children&&(m.children=xl(u.props.children,f)),i.push(m)}),i}/**
* React Router DOM v6.30.1
*
* 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 wl(){return wl=Object.assign?Object.assign.bind():function(n){for(var a=1;a<arguments.length;a++){var i=arguments[a];for(var u in i)Object.prototype.hasOwnProperty.call(i,u)&&(n[u]=i[u])}return n},wl.apply(this,arguments)}function N0(n,a){if(n==null)return{};var i={},u=Object.keys(n),d,f;for(f=0;f<u.length;f++)d=u[f],!(a.indexOf(d)>=0)&&(i[d]=n[d]);return i}function b0(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function k0(n,a){return n.button===0&&(!a||a==="_self")&&!b0(n)}const S0=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],_0="6";try{window.__reactRouterVersion=_0}catch{}const C0="startTransition",ef=kh[C0];function E0(n){let{basename:a,children:i,future:u,window:d}=n,f=C.useRef();f.current==null&&(f.current=Ph({window:d,v5Compat:!0}));let m=f.current,[v,g]=C.useState({action:m.action,location:m.location}),{v7_startTransition:w}=u||{},h=C.useCallback(y=>{w&&ef?ef(()=>g(y)):g(y)},[g,w]);return C.useLayoutEffect(()=>m.listen(h),[m,h]),C.useEffect(()=>y0(u),[u]),C.createElement(w0,{basename:a,children:i,location:v.location,navigationType:v.action,navigator:m,future:u})}const T0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",P0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Kt=C.forwardRef(function(a,i){let{onClick:u,relative:d,reloadDocument:f,replace:m,state:v,target:g,to:w,preventScrollReset:h,viewTransition:y}=a,N=N0(a,S0),{basename:O}=C.useContext(Cr),$,z=!1;if(typeof w=="string"&&P0.test(w)&&($=w,T0))try{let k=new URL(window.location.href),j=w.startsWith("//")?new URL(k.protocol+w):new URL(w),D=zl(j.pathname,O);j.origin===k.origin&&D!=null?w=D+j.search+j.hash:z=!0}catch{}let P=n0(w,{relative:d}),W=D0(w,{replace:m,state:v,target:g,preventScrollReset:h,relative:d,viewTransition:y});function _(k){u&&u(k),k.defaultPrevented||W(k)}return C.createElement("a",wl({},N,{href:$||P,onClick:z||f?u:_,ref:i,target:g}))});var tf;(function(n){n.UseScrollRestoration="useScrollRestoration",n.UseSubmit="useSubmit",n.UseSubmitFetcher="useSubmitFetcher",n.UseFetcher="useFetcher",n.useViewTransitionState="useViewTransitionState"})(tf||(tf={}));var rf;(function(n){n.UseFetcher="useFetcher",n.UseFetchers="useFetchers",n.UseScrollRestoration="useScrollRestoration"})(rf||(rf={}));function D0(n,a){let{target:i,replace:u,state:d,preventScrollReset:f,relative:m,viewTransition:v}=a===void 0?{}:a,g=Tr(),w=En(),h=Uf(n,{relative:m});return C.useCallback(y=>{if(k0(y,i)){y.preventDefault();let N=u!==void 0?u:Zo(w)===Zo(h);g(n,{replace:N,state:d,preventScrollReset:f,relative:m,viewTransition:v})}},[w,g,h,u,d,i,n,f,m,v])}let M0={data:""},O0=n=>typeof window=="object"?((n?n.querySelector("#_goober"):window._goober)||Object.assign((n||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:n||M0,L0=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,R0=/\/\*[^]*?\*\/| +/g,nf=/\n+/g,Nr=(n,a)=>{let i="",u="",d="";for(let f in n){let m=n[f];f[0]=="@"?f[1]=="i"?i=f+" "+m+";":u+=f[1]=="f"?Nr(m,f):f+"{"+Nr(m,f[1]=="k"?"":a)+"}":typeof m=="object"?u+=Nr(m,a?a.replace(/([^,])+/g,v=>f.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,g=>/&/.test(g)?g.replace(/&/g,v):v?v+" "+g:g)):f):m!=null&&(f=/^--/.test(f)?f:f.replace(/[A-Z]/g,"-$&").toLowerCase(),d+=Nr.p?Nr.p(f,m):f+":"+m+";")}return i+(a&&d?a+"{"+d+"}":d)+u},Gt={},Wf=n=>{if(typeof n=="object"){let a="";for(let i in n)a+=i+Wf(n[i]);return a}return n},I0=(n,a,i,u,d)=>{let f=Wf(n),m=Gt[f]||(Gt[f]=(g=>{let w=0,h=11;for(;w<g.length;)h=101*h+g.charCodeAt(w++)>>>0;return"go"+h})(f));if(!Gt[m]){let g=f!==n?n:(w=>{let h,y,N=[{}];for(;h=L0.exec(w.replace(R0,""));)h[4]?N.shift():h[3]?(y=h[3].replace(nf," ").trim(),N.unshift(N[0][y]=N[0][y]||{})):N[0][h[1]]=h[2].replace(nf," ").trim();return N[0]})(n);Gt[m]=Nr(d?{["@keyframes "+m]:g}:g,i?"":"."+m)}let v=i&&Gt.g?Gt.g:null;return i&&(Gt.g=Gt[m]),((g,w,h,y)=>{y?w.data=w.data.replace(y,g):w.data.indexOf(g)===-1&&(w.data=h?g+w.data:w.data+g)})(Gt[m],a,u,v),m},z0=(n,a,i)=>n.reduce((u,d,f)=>{let m=a[f];if(m&&m.call){let v=m(i),g=v&&v.props&&v.props.className||/^go/.test(v)&&v;m=g?"."+g:v&&typeof v=="object"?v.props?"":Nr(v,""):v===!1?"":v}return u+d+(m??"")},"");function ls(n){let a=this||{},i=n.call?n(a.p):n;return I0(i.unshift?i.raw?z0(i,[].slice.call(arguments,1),a.p):i.reduce((u,d)=>Object.assign(u,d&&d.call?d(a.p):d),{}):i,O0(a.target),a.g,a.o,a.k)}let Vf,jl,Nl;ls.bind({g:1});let Zt=ls.bind({k:1});function $0(n,a,i,u){Nr.p=a,Vf=n,jl=i,Nl=u}function Pr(n,a){let i=this||{};return function(){let u=arguments;function d(f,m){let v=Object.assign({},f),g=v.className||d.className;i.p=Object.assign({theme:jl&&jl()},v),i.o=/ *go\d+/.test(g),v.className=ls.apply(i,u)+(g?" "+g:"");let w=n;return n[0]&&(w=v.as||n,delete v.as),Nl&&w[0]&&Nl(v),Vf(w,v)}return d}}var A0=n=>typeof n=="function",es=(n,a)=>A0(n)?n(a):n,U0=(()=>{let n=0;return()=>(++n).toString()})(),qf=(()=>{let n;return()=>{if(n===void 0&&typeof window<"u"){let a=matchMedia("(prefers-reduced-motion: reduce)");n=!a||a.matches}return n}})(),F0=20,Fl="default",Qf=(n,a)=>{let{toastLimit:i}=n.settings;switch(a.type){case 0:return{...n,toasts:[a.toast,...n.toasts].slice(0,i)};case 1:return{...n,toasts:n.toasts.map(m=>m.id===a.toast.id?{...m,...a.toast}:m)};case 2:let{toast:u}=a;return Qf(n,{type:n.toasts.find(m=>m.id===u.id)?1:0,toast:u});case 3:let{toastId:d}=a;return{...n,toasts:n.toasts.map(m=>m.id===d||d===void 0?{...m,dismissed:!0,visible:!1}:m)};case 4:return a.toastId===void 0?{...n,toasts:[]}:{...n,toasts:n.toasts.filter(m=>m.id!==a.toastId)};case 5:return{...n,pausedAt:a.time};case 6:let f=a.time-(n.pausedAt||0);return{...n,pausedAt:void 0,toasts:n.toasts.map(m=>({...m,pauseDuration:m.pauseDuration+f}))}}},Bo=[],Yf={toasts:[],pausedAt:void 0,settings:{toastLimit:F0}},Ft={},Xf=(n,a=Fl)=>{Ft[a]=Qf(Ft[a]||Yf,n),Bo.forEach(([i,u])=>{i===a&&u(Ft[a])})},Kf=n=>Object.keys(Ft).forEach(a=>Xf(n,a)),H0=n=>Object.keys(Ft).find(a=>Ft[a].toasts.some(i=>i.id===n)),us=(n=Fl)=>a=>{Xf(a,n)},B0={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},W0=(n={},a=Fl)=>{let[i,u]=C.useState(Ft[a]||Yf),d=C.useRef(Ft[a]);C.useEffect(()=>(d.current!==Ft[a]&&u(Ft[a]),Bo.push([a,u]),()=>{let m=Bo.findIndex(([v])=>v===a);m>-1&&Bo.splice(m,1)}),[a]);let f=i.toasts.map(m=>{var v,g,w;return{...n,...n[m.type],...m,removeDelay:m.removeDelay||((v=n[m.type])==null?void 0:v.removeDelay)||n?.removeDelay,duration:m.duration||((g=n[m.type])==null?void 0:g.duration)||n?.duration||B0[m.type],style:{...n.style,...(w=n[m.type])==null?void 0:w.style,...m.style}}});return{...i,toasts:f}},V0=(n,a="blank",i)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:a,ariaProps:{role:"status","aria-live":"polite"},message:n,pauseDuration:0,...i,id:i?.id||U0()}),Na=n=>(a,i)=>{let u=V0(a,n,i);return us(u.toasterId||H0(u.id))({type:2,toast:u}),u.id},We=(n,a)=>Na("blank")(n,a);We.error=Na("error");We.success=Na("success");We.loading=Na("loading");We.custom=Na("custom");We.dismiss=(n,a)=>{let i={type:3,toastId:n};a?us(a)(i):Kf(i)};We.dismissAll=n=>We.dismiss(void 0,n);We.remove=(n,a)=>{let i={type:4,toastId:n};a?us(a)(i):Kf(i)};We.removeAll=n=>We.remove(void 0,n);We.promise=(n,a,i)=>{let u=We.loading(a.loading,{...i,...i?.loading});return typeof n=="function"&&(n=n()),n.then(d=>{let f=a.success?es(a.success,d):void 0;return f?We.success(f,{id:u,...i,...i?.success}):We.dismiss(u),d}).catch(d=>{let f=a.error?es(a.error,d):void 0;f?We.error(f,{id:u,...i,...i?.error}):We.dismiss(u)}),n};var q0=1e3,Q0=(n,a="default")=>{let{toasts:i,pausedAt:u}=W0(n,a),d=C.useRef(new Map).current,f=C.useCallback((y,N=q0)=>{if(d.has(y))return;let O=setTimeout(()=>{d.delete(y),m({type:4,toastId:y})},N);d.set(y,O)},[]);C.useEffect(()=>{if(u)return;let y=Date.now(),N=i.map(O=>{if(O.duration===1/0)return;let $=(O.duration||0)+O.pauseDuration-(y-O.createdAt);if($<0){O.visible&&We.dismiss(O.id);return}return setTimeout(()=>We.dismiss(O.id,a),$)});return()=>{N.forEach(O=>O&&clearTimeout(O))}},[i,u,a]);let m=C.useCallback(us(a),[a]),v=C.useCallback(()=>{m({type:5,time:Date.now()})},[m]),g=C.useCallback((y,N)=>{m({type:1,toast:{id:y,height:N}})},[m]),w=C.useCallback(()=>{u&&m({type:6,time:Date.now()})},[u,m]),h=C.useCallback((y,N)=>{let{reverseOrder:O=!1,gutter:$=8,defaultPosition:z}=N||{},P=i.filter(k=>(k.position||z)===(y.position||z)&&k.height),W=P.findIndex(k=>k.id===y.id),_=P.filter((k,j)=>j<W&&k.visible).length;return P.filter(k=>k.visible).slice(...O?[_+1]:[0,_]).reduce((k,j)=>k+(j.height||0)+$,0)},[i]);return C.useEffect(()=>{i.forEach(y=>{if(y.dismissed)f(y.id,y.removeDelay);else{let N=d.get(y.id);N&&(clearTimeout(N),d.delete(y.id))}})},[i,f]),{toasts:i,handlers:{updateHeight:g,startPause:v,endPause:w,calculateOffset:h}}},Y0=Zt`
from {
transform: scale(0) rotate(45deg);
opacity: 0;
}
to {
transform: scale(1) rotate(45deg);
opacity: 1;
}`,X0=Zt`
from {
transform: scale(0);
opacity: 0;
}
to {
transform: scale(1);
opacity: 1;
}`,K0=Zt`
from {
transform: scale(0) rotate(90deg);
opacity: 0;
}
to {
transform: scale(1) rotate(90deg);
opacity: 1;
}`,G0=Pr("div")`
width: 20px;
opacity: 0;
height: 20px;
border-radius: 10px;
background: ${n=>n.primary||"#ff4b4b"};
position: relative;
transform: rotate(45deg);
animation: ${Y0} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
forwards;
animation-delay: 100ms;
&:after,
&:before {
content: '';
animation: ${X0} 0.15s ease-out forwards;
animation-delay: 150ms;
position: absolute;
border-radius: 3px;
opacity: 0;
background: ${n=>n.secondary||"#fff"};
bottom: 9px;
left: 4px;
height: 2px;
width: 12px;
}
&:before {
animation: ${K0} 0.15s ease-out forwards;
animation-delay: 180ms;
transform: rotate(90deg);
}
`,J0=Zt`
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
`,Z0=Pr("div")`
width: 12px;
height: 12px;
box-sizing: border-box;
border: 2px solid;
border-radius: 100%;
border-color: ${n=>n.secondary||"#e0e0e0"};
border-right-color: ${n=>n.primary||"#616161"};
animation: ${J0} 1s linear infinite;
`,eg=Zt`
from {
transform: scale(0) rotate(45deg);
opacity: 0;
}
to {
transform: scale(1) rotate(45deg);
opacity: 1;
}`,tg=Zt`
0% {
height: 0;
width: 0;
opacity: 0;
}
40% {
height: 0;
width: 6px;
opacity: 1;
}
100% {
opacity: 1;
height: 10px;
}`,rg=Pr("div")`
width: 20px;
opacity: 0;
height: 20px;
border-radius: 10px;
background: ${n=>n.primary||"#61d345"};
position: relative;
transform: rotate(45deg);
animation: ${eg} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
forwards;
animation-delay: 100ms;
&:after {
content: '';
box-sizing: border-box;
animation: ${tg} 0.2s ease-out forwards;
opacity: 0;
animation-delay: 200ms;
position: absolute;
border-right: 2px solid;
border-bottom: 2px solid;
border-color: ${n=>n.secondary||"#fff"};
bottom: 6px;
left: 6px;
height: 10px;
width: 6px;
}
`,ng=Pr("div")`
position: absolute;
`,ag=Pr("div")`
position: relative;
display: flex;
justify-content: center;
align-items: center;
min-width: 20px;
min-height: 20px;
`,og=Zt`
from {
transform: scale(0.6);
opacity: 0.4;
}
to {
transform: scale(1);
opacity: 1;
}`,sg=Pr("div")`
position: relative;
transform: scale(0.6);
opacity: 0.4;
min-width: 20px;
animation: ${og} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
forwards;
`,ig=({toast:n})=>{let{icon:a,type:i,iconTheme:u}=n;return a!==void 0?typeof a=="string"?C.createElement(sg,null,a):a:i==="blank"?null:C.createElement(ag,null,C.createElement(Z0,{...u}),i!=="loading"&&C.createElement(ng,null,i==="error"?C.createElement(G0,{...u}):C.createElement(rg,{...u})))},lg=n=>`
0% {transform: translate3d(0,${n*-200}%,0) scale(.6); opacity:.5;}
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
`,ug=n=>`
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
100% {transform: translate3d(0,${n*-150}%,-1px) scale(.6); opacity:0;}
`,cg="0%{opacity:0;} 100%{opacity:1;}",dg="0%{opacity:1;} 100%{opacity:0;}",fg=Pr("div")`
display: flex;
align-items: center;
background: #fff;
color: #363636;
line-height: 1.3;
will-change: transform;
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
max-width: 350px;
pointer-events: auto;
padding: 8px 10px;
border-radius: 8px;
`,mg=Pr("div")`
display: flex;
justify-content: center;
margin: 4px 10px;
color: inherit;
flex: 1 1 auto;
white-space: pre-line;
`,pg=(n,a)=>{let i=n.includes("top")?1:-1,[u,d]=qf()?[cg,dg]:[lg(i),ug(i)];return{animation:a?`${Zt(u)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${Zt(d)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},hg=C.memo(({toast:n,position:a,style:i,children:u})=>{let d=n.height?pg(n.position||a||"top-center",n.visible):{opacity:0},f=C.createElement(ig,{toast:n}),m=C.createElement(mg,{...n.ariaProps},es(n.message,n));return C.createElement(fg,{className:n.className,style:{...d,...i,...n.style}},typeof u=="function"?u({icon:f,message:m}):C.createElement(C.Fragment,null,f,m))});$0(C.createElement);var gg=({id:n,className:a,style:i,onHeightUpdate:u,children:d})=>{let f=C.useCallback(m=>{if(m){let v=()=>{let g=m.getBoundingClientRect().height;u(n,g)};v(),new MutationObserver(v).observe(m,{subtree:!0,childList:!0,characterData:!0})}},[n,u]);return C.createElement("div",{ref:f,className:a,style:i},d)},vg=(n,a)=>{let i=n.includes("top"),u=i?{top:0}:{bottom:0},d=n.includes("center")?{justifyContent:"center"}:n.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:qf()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${a*(i?1:-1)}px)`,...u,...d}},yg=ls`
z-index: 9999;
> * {
pointer-events: auto;
}
`,Ao=16,xg=({reverseOrder:n,position:a="top-center",toastOptions:i,gutter:u,children:d,toasterId:f,containerStyle:m,containerClassName:v})=>{let{toasts:g,handlers:w}=Q0(i,f);return C.createElement("div",{"data-rht-toaster":f||"",style:{position:"fixed",zIndex:9999,top:Ao,left:Ao,right:Ao,bottom:Ao,pointerEvents:"none",...m},className:v,onMouseEnter:w.startPause,onMouseLeave:w.endPause},g.map(h=>{let y=h.position||a,N=w.calculateOffset(h,{reverseOrder:n,gutter:u,defaultPosition:a}),O=vg(y,N);return C.createElement(gg,{id:h.id,key:h.id,onHeightUpdate:w.updateHeight,className:h.visible?yg:"",style:O},h.type==="custom"?es(h.message,h):d?d(h):C.createElement(hg,{toast:h,position:y}))}))},ue=We;/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const wg=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),jg=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,i,u)=>u?u.toUpperCase():i.toLowerCase()),af=n=>{const a=jg(n);return a.charAt(0).toUpperCase()+a.slice(1)},Gf=(...n)=>n.filter((a,i,u)=>!!a&&a.trim()!==""&&u.indexOf(a)===i).join(" ").trim(),Ng=n=>{for(const a in n)if(a.startsWith("aria-")||a==="role"||a==="title")return!0};/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var bg={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.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const kg=C.forwardRef(({color:n="currentColor",size:a=24,strokeWidth:i=2,absoluteStrokeWidth:u,className:d="",children:f,iconNode:m,...v},g)=>C.createElement("svg",{ref:g,...bg,width:a,height:a,stroke:n,strokeWidth:u?Number(i)*24/Number(a):i,className:Gf("lucide",d),...!f&&!Ng(v)&&{"aria-hidden":"true"},...v},[...m.map(([w,h])=>C.createElement(w,h)),...Array.isArray(f)?f:[f]]));/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Se=(n,a)=>{const i=C.forwardRef(({className:u,...d},f)=>C.createElement(kg,{ref:f,iconNode:a,className:Gf(`lucide-${wg(af(n))}`,`lucide-${n}`,u),...d}));return i.displayName=af(n),i};/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Sg=[["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"}]],bl=Se("activity",Sg);/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _g=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],_r=Se("calendar",_g);/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Cg=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Jf=Se("circle-alert",Cg);/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Eg=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],ts=Se("circle-check-big",Eg);/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Tg=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],of=Se("circle-x",Tg);/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Pg=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]],kl=Se("clipboard",Pg);/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Dg=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],bn=Se("clock",Dg);/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Mg=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Og=Se("eye",Mg);/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Lg=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],cs=Se("file-text",Lg);/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Rg=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],Ig=Se("funnel",Rg);/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const zg=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],sf=Se("heart",zg);/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const $g=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],Hl=Se("lock",$g);/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ag=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],Zf=Se("log-out",Ag);/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ug=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],ba=Se("mail",Ug);/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Fg=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],Hg=Se("map-pin",Fg);/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Bg=[["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"}]],Wg=Se("pen",Bg);/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Vg=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],Bl=Se("phone",Vg);/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const qg=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],lf=Se("plus",qg);/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Qg=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Wo=Se("search",Qg);/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Yg=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],Xg=Se("square-pen",Yg);/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Kg=[["path",{d:"M11 2v2",key:"1539x4"}],["path",{d:"M5 2v2",key:"1yf1q8"}],["path",{d:"M5 3H4a2 2 0 0 0-2 2v4a6 6 0 0 0 12 0V5a2 2 0 0 0-2-2h-1",key:"rb5t3r"}],["path",{d:"M8 15a6 6 0 0 0 12 0v-3",key:"x18d4x"}],["circle",{cx:"20",cy:"10",r:"2",key:"ts1r5v"}]],Vo=Se("stethoscope",Kg);/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Gg=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],em=Se("trash-2",Gg);/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Jg=[["path",{d:"m16 11 2 2 4-4",key:"9rsbq5"}],["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"}]],uf=Se("user-check",Jg);/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Zg=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],rs=Se("user-plus",Zg);/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ev=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Sn=Se("user",ev);/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const tv=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],qr=Se("users",tv);/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const rv=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Sl=Se("x",rv),nv=()=>{const n=En(),a=i=>n.pathname===i;return s.jsx("header",{className:"bg-white shadow-lg border-b border-gray-200",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsxs("div",{className:"flex items-center justify-between h-16",children:[s.jsxs(Kt,{to:"/",className:"flex items-center space-x-3",children:[s.jsx("div",{className:"bg-gradient-to-r from-blue-700 to-blue-400 p-2 rounded-lg",children:s.jsx(Vo,{className:"h-6 w-6 text-white"})}),s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-bold text-gray-900",children:"MediConnect"}),s.jsx("p",{className:"text-xs text-gray-500",children:"Sistema de Agendamento"})]})]}),s.jsxs("nav",{className:"hidden md:flex items-center space-x-1",children:[s.jsxs(Kt,{to:"/",className:`flex items-center space-x-2 px-4 py-2 rounded-lg text-sm font-medium transition-colors ${a("/")?"bg-gradient-to-r from-blue-700 to-blue-400 text-white":"text-gray-600 hover:text-blue-600 hover:bg-blue-50"}`,children:[s.jsx(sf,{className:"w-4 h-4"}),s.jsx("span",{children:"Início"})]}),s.jsxs(Kt,{to:"/paciente",className:`flex items-center space-x-2 px-4 py-2 rounded-lg text-sm font-medium transition-colors ${a("/paciente")||a("/agendamento")?"bg-gradient-to-r from-blue-700 to-blue-400 text-white":"text-gray-600 hover:text-blue-600 hover:bg-blue-50"}`,children:[s.jsx(Sn,{className:"w-4 h-4"}),s.jsx("span",{children:"Sou Paciente"})]}),s.jsxs(Kt,{to:"/login-secretaria",className:`flex items-center space-x-2 px-4 py-2 rounded-lg text-sm font-medium transition-colors ${a("/login-secretaria")||a("/secretaria")?"bg-gradient-to-r from-green-600 to-green-400 text-white":"text-gray-600 hover:text-green-600 hover:bg-green-50"}`,children:[s.jsx(kl,{className:"w-4 h-4"}),s.jsx("span",{children:" Menu da Secretaria"})]}),s.jsxs(Kt,{to:"/login-medico",className:`flex items-center space-x-2 px-4 py-2 rounded-lg text-sm font-medium transition-colors ${a("/login-medico")||a("/medico")?"bg-gradient-to-r from-indigo-600 to-indigo-400 text-white":"text-gray-600 hover:text-indigo-600 hover:bg-indigo-50"}`,children:[s.jsx(Vo,{className:"w-4 h-4"}),s.jsx("span",{children:"Sou Médico"})]})]}),s.jsx("div",{className:"md:hidden",children:s.jsx("button",{className:"text-gray-600 hover:text-blue-600",children:s.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})})]}),s.jsx("div",{className:"md:hidden border-t border-gray-200 py-3",children:s.jsxs("div",{className:"flex flex-col space-y-2",children:[s.jsxs(Kt,{to:"/",className:`flex items-center space-x-2 px-3 py-2 rounded-lg text-sm font-medium transition-colors ${a("/")?"bg-gradient-to-r from-blue-700 to-blue-400 text-white":"text-gray-600 hover:text-blue-600 hover:bg-blue-50"}`,children:[s.jsx(sf,{className:"w-4 h-4"}),s.jsx("span",{children:"Início"})]}),s.jsxs(Kt,{to:"/paciente",className:`flex items-center space-x-2 px-3 py-2 rounded-lg text-sm font-medium transition-colors ${a("/paciente")||a("/agendamento")?"bg-gradient-to-r from-blue-700 to-blue-400 text-white":"text-gray-600 hover:text-blue-600 hover:bg-blue-50"}`,children:[s.jsx(Sn,{className:"w-4 h-4"}),s.jsx("span",{children:"Sou Paciente"})]}),s.jsxs(Kt,{to:"/login-secretaria",className:`flex items-center space-x-2 px-3 py-2 rounded-lg text-sm font-medium transition-colors ${a("/login-secretaria")||a("/secretaria")?"bg-gradient-to-r from-green-600 to-green-400 text-white":"text-gray-600 hover:text-green-600 hover:bg-green-50"}`,children:[s.jsx(kl,{className:"w-4 h-4"}),s.jsx("span",{children:"Secretaria"})]}),s.jsxs(Kt,{to:"/login-medico",className:`flex items-center space-x-2 px-3 py-2 rounded-lg text-sm font-medium transition-colors ${a("/login-medico")||a("/medico")?"bg-gradient-to-r from-indigo-600 to-indigo-400 text-white":"text-gray-600 hover:text-indigo-600 hover:bg-indigo-50"}`,children:[s.jsx(Vo,{className:"w-4 h-4"}),s.jsx("span",{children:"Sou Médico"})]})]})})]})})},Ke=[];for(let n=0;n<256;++n)Ke.push((n+256).toString(16).slice(1));function av(n,a=0){return(Ke[n[a+0]]+Ke[n[a+1]]+Ke[n[a+2]]+Ke[n[a+3]]+"-"+Ke[n[a+4]]+Ke[n[a+5]]+"-"+Ke[n[a+6]]+Ke[n[a+7]]+"-"+Ke[n[a+8]]+Ke[n[a+9]]+"-"+Ke[n[a+10]]+Ke[n[a+11]]+Ke[n[a+12]]+Ke[n[a+13]]+Ke[n[a+14]]+Ke[n[a+15]]).toLowerCase()}let hl;const ov=new Uint8Array(16);function sv(){if(!hl){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");hl=crypto.getRandomValues.bind(crypto)}return hl(ov)}const iv=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),cf={randomUUID:iv};function lv(n,a,i){if(cf.randomUUID&&!n)return cf.randomUUID();n=n||{};const u=n.random??n.rng?.()??sv();if(u.length<16)throw new Error("Random bytes length must be >= 16");return u[6]=u[6]&15|64,u[8]=u[8]&63|128,av(u)}var qo={exports:{}};function uv(n){throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Qo={exports:{}};const cv={},dv=Object.freeze(Object.defineProperty({__proto__:null,default:cv},Symbol.toStringTag,{value:"Module"})),fv=wh(dv);var mv=Qo.exports,df;function ka(){return df||(df=1,(function(n,a){(function(i,u){n.exports=u()})(mv,function(){var i=i||(function(u,d){var f;if(typeof window<"u"&&window.crypto&&(f=window.crypto),typeof self<"u"&&self.crypto&&(f=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(f=globalThis.crypto),!f&&typeof window<"u"&&window.msCrypto&&(f=window.msCrypto),!f&&typeof ll<"u"&&ll.crypto&&(f=ll.crypto),!f&&typeof uv=="function")try{f=fv}catch{}var m=function(){if(f){if(typeof f.getRandomValues=="function")try{return f.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof f.randomBytes=="function")try{return f.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},v=Object.create||(function(){function _(){}return function(k){var j;return _.prototype=k,j=new _,_.prototype=null,j}})(),g={},w=g.lib={},h=w.Base=(function(){return{extend:function(_){var k=v(this);return _&&k.mixIn(_),(!k.hasOwnProperty("init")||this.init===k.init)&&(k.init=function(){k.$super.init.apply(this,arguments)}),k.init.prototype=k,k.$super=this,k},create:function(){var _=this.extend();return _.init.apply(_,arguments),_},init:function(){},mixIn:function(_){for(var k in _)_.hasOwnProperty(k)&&(this[k]=_[k]);_.hasOwnProperty("toString")&&(this.toString=_.toString)},clone:function(){return this.init.prototype.extend(this)}}})(),y=w.WordArray=h.extend({init:function(_,k){_=this.words=_||[],k!=d?this.sigBytes=k:this.sigBytes=_.length*4},toString:function(_){return(_||O).stringify(this)},concat:function(_){var k=this.words,j=_.words,D=this.sigBytes,R=_.sigBytes;if(this.clamp(),D%4)for(var A=0;A<R;A++){var Q=j[A>>>2]>>>24-A%4*8&255;k[D+A>>>2]|=Q<<24-(D+A)%4*8}else for(var oe=0;oe<R;oe+=4)k[D+oe>>>2]=j[oe>>>2];return this.sigBytes+=R,this},clamp:function(){var _=this.words,k=this.sigBytes;_[k>>>2]&=4294967295<<32-k%4*8,_.length=u.ceil(k/4)},clone:function(){var _=h.clone.call(this);return _.words=this.words.slice(0),_},random:function(_){for(var k=[],j=0;j<_;j+=4)k.push(m());return new y.init(k,_)}}),N=g.enc={},O=N.Hex={stringify:function(_){for(var k=_.words,j=_.sigBytes,D=[],R=0;R<j;R++){var A=k[R>>>2]>>>24-R%4*8&255;D.push((A>>>4).toString(16)),D.push((A&15).toString(16))}return D.join("")},parse:function(_){for(var k=_.length,j=[],D=0;D<k;D+=2)j[D>>>3]|=parseInt(_.substr(D,2),16)<<24-D%8*4;return new y.init(j,k/2)}},$=N.Latin1={stringify:function(_){for(var k=_.words,j=_.sigBytes,D=[],R=0;R<j;R++){var A=k[R>>>2]>>>24-R%4*8&255;D.push(String.fromCharCode(A))}return D.join("")},parse:function(_){for(var k=_.length,j=[],D=0;D<k;D++)j[D>>>2]|=(_.charCodeAt(D)&255)<<24-D%4*8;return new y.init(j,k)}},z=N.Utf8={stringify:function(_){try{return decodeURIComponent(escape($.stringify(_)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(_){return $.parse(unescape(encodeURIComponent(_)))}},P=w.BufferedBlockAlgorithm=h.extend({reset:function(){this._data=new y.init,this._nDataBytes=0},_append:function(_){typeof _=="string"&&(_=z.parse(_)),this._data.concat(_),this._nDataBytes+=_.sigBytes},_process:function(_){var k,j=this._data,D=j.words,R=j.sigBytes,A=this.blockSize,Q=A*4,oe=R/Q;_?oe=u.ceil(oe):oe=u.max((oe|0)-this._minBufferSize,0);var fe=oe*A,ce=u.min(fe*4,R);if(fe){for(var ie=0;ie<fe;ie+=A)this._doProcessBlock(D,ie);k=D.splice(0,fe),j.sigBytes-=ce}return new y.init(k,ce)},clone:function(){var _=h.clone.call(this);return _._data=this._data.clone(),_},_minBufferSize:0});w.Hasher=P.extend({cfg:h.extend(),init:function(_){this.cfg=this.cfg.extend(_),this.reset()},reset:function(){P.reset.call(this),this._doReset()},update:function(_){return this._append(_),this._process(),this},finalize:function(_){_&&this._append(_);var k=this._doFinalize();return k},blockSize:16,_createHelper:function(_){return function(k,j){return new _.init(j).finalize(k)}},_createHmacHelper:function(_){return function(k,j){return new W.HMAC.init(_,j).finalize(k)}}});var W=g.algo={};return g})(Math);return i})})(Qo)),Qo.exports}var pv=qo.exports,ff;function hv(){return ff||(ff=1,(function(n,a){(function(i,u){n.exports=u(ka())})(pv,function(i){return(function(){var u=i,d=u.lib,f=d.WordArray,m=u.enc;m.Base64={stringify:function(g){var w=g.words,h=g.sigBytes,y=this._map;g.clamp();for(var N=[],O=0;O<h;O+=3)for(var $=w[O>>>2]>>>24-O%4*8&255,z=w[O+1>>>2]>>>24-(O+1)%4*8&255,P=w[O+2>>>2]>>>24-(O+2)%4*8&255,W=$<<16|z<<8|P,_=0;_<4&&O+_*.75<h;_++)N.push(y.charAt(W>>>6*(3-_)&63));var k=y.charAt(64);if(k)for(;N.length%4;)N.push(k);return N.join("")},parse:function(g){var w=g.length,h=this._map,y=this._reverseMap;if(!y){y=this._reverseMap=[];for(var N=0;N<h.length;N++)y[h.charCodeAt(N)]=N}var O=h.charAt(64);if(O){var $=g.indexOf(O);$!==-1&&(w=$)}return v(g,w,y)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function v(g,w,h){for(var y=[],N=0,O=0;O<w;O++)if(O%4){var $=h[g.charCodeAt(O-1)]<<O%4*2,z=h[g.charCodeAt(O)]>>>6-O%4*2,P=$|z;y[N>>>2]|=P<<24-N%4*8,N++}return f.create(y,N)}})(),i.enc.Base64})})(qo)),qo.exports}var gv=hv();const vv=ja(gv);var Yo={exports:{}},yv=Yo.exports,mf;function xv(){return mf||(mf=1,(function(n,a){(function(i,u){n.exports=u(ka())})(yv,function(i){return i.enc.Hex})})(Yo)),Yo.exports}var wv=xv();const jv=ja(wv);var Xo={exports:{}},Ko={exports:{}},Nv=Ko.exports,pf;function tm(){return pf||(pf=1,(function(n,a){(function(i,u){n.exports=u(ka())})(Nv,function(i){return(function(u){var d=i,f=d.lib,m=f.WordArray,v=f.Hasher,g=d.algo,w=[],h=[];(function(){function O(W){for(var _=u.sqrt(W),k=2;k<=_;k++)if(!(W%k))return!1;return!0}function $(W){return(W-(W|0))*4294967296|0}for(var z=2,P=0;P<64;)O(z)&&(P<8&&(w[P]=$(u.pow(z,1/2))),h[P]=$(u.pow(z,1/3)),P++),z++})();var y=[],N=g.SHA256=v.extend({_doReset:function(){this._hash=new m.init(w.slice(0))},_doProcessBlock:function(O,$){for(var z=this._hash.words,P=z[0],W=z[1],_=z[2],k=z[3],j=z[4],D=z[5],R=z[6],A=z[7],Q=0;Q<64;Q++){if(Q<16)y[Q]=O[$+Q]|0;else{var oe=y[Q-15],fe=(oe<<25|oe>>>7)^(oe<<14|oe>>>18)^oe>>>3,ce=y[Q-2],ie=(ce<<15|ce>>>17)^(ce<<13|ce>>>19)^ce>>>10;y[Q]=fe+y[Q-7]+ie+y[Q-16]}var pe=j&D^~j&R,X=P&W^P&_^W&_,re=(P<<30|P>>>2)^(P<<19|P>>>13)^(P<<10|P>>>22),le=(j<<26|j>>>6)^(j<<21|j>>>11)^(j<<7|j>>>25),E=A+le+pe+h[Q]+y[Q],F=re+X;A=R,R=D,D=j,j=k+E|0,k=_,_=W,W=P,P=E+F|0}z[0]=z[0]+P|0,z[1]=z[1]+W|0,z[2]=z[2]+_|0,z[3]=z[3]+k|0,z[4]=z[4]+j|0,z[5]=z[5]+D|0,z[6]=z[6]+R|0,z[7]=z[7]+A|0},_doFinalize:function(){var O=this._data,$=O.words,z=this._nDataBytes*8,P=O.sigBytes*8;return $[P>>>5]|=128<<24-P%32,$[(P+64>>>9<<4)+14]=u.floor(z/4294967296),$[(P+64>>>9<<4)+15]=z,O.sigBytes=$.length*4,this._process(),this._hash},clone:function(){var O=v.clone.call(this);return O._hash=this._hash.clone(),O}});d.SHA256=v._createHelper(N),d.HmacSHA256=v._createHmacHelper(N)})(Math),i.SHA256})})(Ko)),Ko.exports}var Go={exports:{}},bv=Go.exports,hf;function kv(){return hf||(hf=1,(function(n,a){(function(i,u){n.exports=u(ka())})(bv,function(i){(function(){var u=i,d=u.lib,f=d.Base,m=u.enc,v=m.Utf8,g=u.algo;g.HMAC=f.extend({init:function(w,h){w=this._hasher=new w.init,typeof h=="string"&&(h=v.parse(h));var y=w.blockSize,N=y*4;h.sigBytes>N&&(h=w.finalize(h)),h.clamp();for(var O=this._oKey=h.clone(),$=this._iKey=h.clone(),z=O.words,P=$.words,W=0;W<y;W++)z[W]^=1549556828,P[W]^=909522486;O.sigBytes=$.sigBytes=N,this.reset()},reset:function(){var w=this._hasher;w.reset(),w.update(this._iKey)},update:function(w){return this._hasher.update(w),this},finalize:function(w){var h=this._hasher,y=h.finalize(w);h.reset();var N=h.finalize(this._oKey.clone().concat(y));return N}})})()})})(Go)),Go.exports}var Sv=Xo.exports,gf;function _v(){return gf||(gf=1,(function(n,a){(function(i,u,d){n.exports=u(ka(),tm(),kv())})(Sv,function(i){return i.HmacSHA256})})(Xo)),Xo.exports}var Cv=_v();const Ev=ja(Cv);var Tv=tm();const Pv=ja(Tv),Dv=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,Mv=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,Ov=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function Lv(n,a){if(n==="__proto__"||n==="constructor"&&a&&typeof a=="object"&&"prototype"in a){Rv(n);return}return a}function Rv(n){console.warn(`[destr] Dropping "${n}" key to prevent prototype pollution.`)}function Iv(n,a={}){if(typeof n!="string")return n;if(n[0]==='"'&&n[n.length-1]==='"'&&n.indexOf("\\")===-1)return n.slice(1,-1);const i=n.trim();if(i.length<=9)switch(i.toLowerCase()){case"true":return!0;case"false":return!1;case"undefined":return;case"null":return null;case"nan":return Number.NaN;case"infinity":return Number.POSITIVE_INFINITY;case"-infinity":return Number.NEGATIVE_INFINITY}if(!Ov.test(n)){if(a.strict)throw new SyntaxError("[destr] Invalid JSON");return n}try{if(Dv.test(n)||Mv.test(n)){if(a.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(n,Lv)}return JSON.parse(n)}catch(u){if(a.strict)throw u;return n}}const zv=/#/g,$v=/&/g,Av=/\//g,Uv=/=/g,Wl=/\+/g,Fv=/%5e/gi,Hv=/%60/gi,Bv=/%7c/gi,Wv=/%20/gi;function Vv(n){return encodeURI(""+n).replace(Bv,"|")}function _l(n){return Vv(typeof n=="string"?n:JSON.stringify(n)).replace(Wl,"%2B").replace(Wv,"+").replace(zv,"%23").replace($v,"%26").replace(Hv,"`").replace(Fv,"^").replace(Av,"%2F")}function gl(n){return _l(n).replace(Uv,"%3D")}function rm(n=""){try{return decodeURIComponent(""+n)}catch{return""+n}}function qv(n){return rm(n.replace(Wl," "))}function Qv(n){return rm(n.replace(Wl," "))}function Yv(n=""){const a=Object.create(null);n[0]==="?"&&(n=n.slice(1));for(const i of n.split("&")){const u=i.match(/([^=]+)=?(.*)/)||[];if(u.length<2)continue;const d=qv(u[1]);if(d==="__proto__"||d==="constructor")continue;const f=Qv(u[2]||"");a[d]===void 0?a[d]=f:Array.isArray(a[d])?a[d].push(f):a[d]=[a[d],f]}return a}function Xv(n,a){return(typeof a=="number"||typeof a=="boolean")&&(a=String(a)),a?Array.isArray(a)?a.map(i=>`${gl(n)}=${_l(i)}`).join("&"):`${gl(n)}=${_l(a)}`:gl(n)}function Kv(n){return Object.keys(n).filter(a=>n[a]!==void 0).map(a=>Xv(a,n[a])).filter(Boolean).join("&")}const Gv=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,Jv=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,Zv=/^([/\\]\s*){2,}[^/\\]/,ey=/^\.?\//;function nm(n,a={}){return typeof a=="boolean"&&(a={acceptRelative:a}),a.strict?Gv.test(n):Jv.test(n)||(a.acceptRelative?Zv.test(n):!1)}function ty(n="",a){return n.endsWith("/")}function ry(n="",a){return(ty(n)?n.slice(0,-1):n)||"/"}function ny(n="",a){return n.endsWith("/")?n:n+"/"}function ay(n,a){if(sy(a)||nm(n))return n;const i=ry(a);return n.startsWith(i)?n:ly(i,n)}function oy(n,a){const i=uy(n),u={...Yv(i.search),...a};return i.search=Kv(u),cy(i)}function sy(n){return!n||n==="/"}function iy(n){return n&&n!=="/"}function ly(n,...a){let i=n||"";for(const u of a.filter(d=>iy(d)))if(i){const d=u.replace(ey,"");i=ny(i)+d}else i=u;return i}const am=Symbol.for("ufo:protocolRelative");function uy(n="",a){const i=n.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(i){const[,y,N=""]=i;return{protocol:y.toLowerCase(),pathname:N,href:y+N,auth:"",host:"",search:"",hash:""}}if(!nm(n,{acceptRelative:!0}))return vf(n);const[,u="",d,f=""]=n.replace(/\\/g,"/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[];let[,m="",v=""]=f.match(/([^#/?]*)(.*)?/)||[];u==="file:"&&(v=v.replace(/\/(?=[A-Za-z]:)/,""));const{pathname:g,search:w,hash:h}=vf(v);return{protocol:u.toLowerCase(),auth:d?d.slice(0,Math.max(0,d.length-1)):"",host:m,pathname:g,search:w,hash:h,[am]:!u}}function vf(n=""){const[a="",i="",u=""]=(n.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:a,search:i,hash:u}}function cy(n){const a=n.pathname||"",i=n.search?(n.search.startsWith("?")?"":"?")+n.search:"",u=n.hash||"",d=n.auth?n.auth+"@":"",f=n.host||"";return(n.protocol||n[am]?(n.protocol||"")+"//":"")+d+f+a+i+u}class dy extends Error{constructor(a,i){super(a,i),this.name="FetchError",i?.cause&&!this.cause&&(this.cause=i.cause)}}function fy(n){const a=n.error?.message||n.error?.toString()||"",i=n.request?.method||n.options?.method||"GET",u=n.request?.url||String(n.request)||"/",d=`[${i}] ${JSON.stringify(u)}`,f=n.response?`${n.response.status} ${n.response.statusText}`:"<no response>",m=`${d}: ${f}${a?` ${a}`:""}`,v=new dy(m,n.error?{cause:n.error}:void 0);for(const g of["request","options","response"])Object.defineProperty(v,g,{get(){return n[g]}});for(const[g,w]of[["data","_data"],["status","status"],["statusCode","status"],["statusText","statusText"],["statusMessage","statusText"]])Object.defineProperty(v,g,{get(){return n.response&&n.response[w]}});return v}const my=new Set(Object.freeze(["PATCH","POST","PUT","DELETE"]));function yf(n="GET"){return my.has(n.toUpperCase())}function py(n){if(n===void 0)return!1;const a=typeof n;return a==="string"||a==="number"||a==="boolean"||a===null?!0:a!=="object"?!1:Array.isArray(n)?!0:n.buffer?!1:n.constructor&&n.constructor.name==="Object"||typeof n.toJSON=="function"}const hy=new Set(["image/svg","application/xml","application/xhtml","application/html"]),gy=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function vy(n=""){if(!n)return"json";const a=n.split(";").shift()||"";return gy.test(a)?"json":hy.has(a)||a.startsWith("text/")?"text":"blob"}function yy(n,a,i,u){const d=xy(a?.headers??n?.headers,i?.headers,u);let f;return(i?.query||i?.params||a?.params||a?.query)&&(f={...i?.params,...i?.query,...a?.params,...a?.query}),{...i,...a,query:f,params:f,headers:d}}function xy(n,a,i){if(!a)return new i(n);const u=new i(a);if(n)for(const[d,f]of Symbol.iterator in n||Array.isArray(n)?n:new i(n))u.set(d,f);return u}async function Uo(n,a){if(a)if(Array.isArray(a))for(const i of a)await i(n);else await a(n)}const wy=new Set([408,409,425,429,500,502,503,504]),jy=new Set([101,204,205,304]);function om(n={}){const{fetch:a=globalThis.fetch,Headers:i=globalThis.Headers,AbortController:u=globalThis.AbortController}=n;async function d(v){const g=v.error&&v.error.name==="AbortError"&&!v.options.timeout||!1;if(v.options.retry!==!1&&!g){let h;typeof v.options.retry=="number"?h=v.options.retry:h=yf(v.options.method)?0:1;const y=v.response&&v.response.status||500;if(h>0&&(Array.isArray(v.options.retryStatusCodes)?v.options.retryStatusCodes.includes(y):wy.has(y))){const N=typeof v.options.retryDelay=="function"?v.options.retryDelay(v):v.options.retryDelay||0;return N>0&&await new Promise(O=>setTimeout(O,N)),f(v.request,{...v.options,retry:h-1})}}const w=fy(v);throw Error.captureStackTrace&&Error.captureStackTrace(w,f),w}const f=async function(g,w={}){const h={request:g,options:yy(g,w,n.defaults,i),response:void 0,error:void 0};h.options.method&&(h.options.method=h.options.method.toUpperCase()),h.options.onRequest&&await Uo(h,h.options.onRequest),typeof h.request=="string"&&(h.options.baseURL&&(h.request=ay(h.request,h.options.baseURL)),h.options.query&&(h.request=oy(h.request,h.options.query),delete h.options.query),"query"in h.options&&delete h.options.query,"params"in h.options&&delete h.options.params),h.options.body&&yf(h.options.method)&&(py(h.options.body)?(h.options.body=typeof h.options.body=="string"?h.options.body:JSON.stringify(h.options.body),h.options.headers=new i(h.options.headers||{}),h.options.headers.has("content-type")||h.options.headers.set("content-type","application/json"),h.options.headers.has("accept")||h.options.headers.set("accept","application/json")):("pipeTo"in h.options.body&&typeof h.options.body.pipeTo=="function"||typeof h.options.body.pipe=="function")&&("duplex"in h.options||(h.options.duplex="half")));let y;if(!h.options.signal&&h.options.timeout){const O=new u;y=setTimeout(()=>{const $=new Error("[TimeoutError]: The operation was aborted due to timeout");$.name="TimeoutError",$.code=23,O.abort($)},h.options.timeout),h.options.signal=O.signal}try{h.response=await a(h.request,h.options)}catch(O){return h.error=O,h.options.onRequestError&&await Uo(h,h.options.onRequestError),await d(h)}finally{y&&clearTimeout(y)}if((h.response.body||h.response._bodyInit)&&!jy.has(h.response.status)&&h.options.method!=="HEAD"){const O=(h.options.parseResponse?"json":h.options.responseType)||vy(h.response.headers.get("content-type")||"");switch(O){case"json":{const $=await h.response.text(),z=h.options.parseResponse||Iv;h.response._data=z($);break}case"stream":{h.response._data=h.response.body||h.response._bodyInit;break}default:h.response._data=await h.response[O]()}}return h.options.onResponse&&await Uo(h,h.options.onResponse),!h.options.ignoreResponseError&&h.response.status>=400&&h.response.status<600?(h.options.onResponseError&&await Uo(h,h.options.onResponseError),await d(h)):h.response},m=async function(g,w){return(await f(g,w))._data};return m.raw=f,m.native=(...v)=>a(...v),m.create=(v={},g={})=>om({...n,...g,defaults:{...n.defaults,...g.defaults,...v}}),m}const ns=(function(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")})(),Ny=ns.fetch?(...n)=>ns.fetch(...n):()=>Promise.reject(new Error("[ofetch] global.fetch is not supported!")),by=ns.Headers,ky=ns.AbortController,Sy=om({fetch:Ny,Headers:by,AbortController:ky});var _y=Object.defineProperty,Cy=Object.defineProperties,Ey=Object.getOwnPropertyDescriptors,xf=Object.getOwnPropertySymbols,Ty=Object.prototype.hasOwnProperty,Py=Object.prototype.propertyIsEnumerable,sm=n=>{throw TypeError(n)},wf=(n,a,i)=>a in n?_y(n,a,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[a]=i,Cl=(n,a)=>{for(var i in a||(a={}))Ty.call(a,i)&&wf(n,i,a[i]);if(xf)for(var i of xf(a))Py.call(a,i)&&wf(n,i,a[i]);return n},Dy=(n,a)=>Cy(n,Ey(a)),im=(n,a,i)=>a.has(n)||sm("Cannot "+i),Le=(n,a,i)=>(im(n,a,"read from private field"),i?i.call(n):a.get(n)),Yr=(n,a,i)=>a.has(n)?sm("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(n):a.set(n,i),Tn=(n,a,i,u)=>(im(n,a,"write to private field"),a.set(n,i),i),Ot=(n,a,i)=>new Promise((u,d)=>{var f=g=>{try{v(i.next(g))}catch(w){d(w)}},m=g=>{try{v(i.throw(g))}catch(w){d(w)}},v=g=>g.done?u(g.value):Promise.resolve(g.value).then(f,m);v((i=i.apply(n,a)).next())}),My="6QrJZ7pFCmBZAeIJF7IArvkCz+EtzA0RVcpHkiQIsQyhs7QtCS9P+CueZdHfB2OtJcgX3BbqY9pfpWeAVTqCwQ==";function jf(n){return encodeURIComponent(n).replace(/[!'()*]/g,a=>`%${a.charCodeAt(0).toString(16).toUpperCase()}`)}function Oy(n){return a=>{let{options:i}=a,u=Math.floor(Date.now()/1e3).toString(),d=Math.random().toString(36).substring(2,15),f=Cl({},i.query),m=Object.keys(f).sort().map($=>`${jf($)}=${jf(String(f[$]))}`).join("&"),v={"x-timestamp":u,"x-nonce":d},g=Object.keys(v).sort().map($=>`${$}:${v[$]}`).join(`
`),w=i.body&&!(i.body instanceof FormData)?JSON.stringify(i.body):"",h=Pv(w).toString(jv),y=[m,g,h].join(`
`);console.warn(`Client-side Canonical Request V3:
`,y);let N=vv.stringify(Ev(y,n)),O=new Headers(i.headers);Object.entries(v).forEach(([$,z])=>{O.set($,z)}),O.set("X-Sign",N),i.headers=O}}function kt(n,a,i={}){return n.auth.accessToken&&(i.headers=Cl({Authorization:`Bearer ${n.auth.accessToken}`},i.headers)),Sy(a,Dy(Cl({baseURL:n.config.apiBaseUrl},i),{onRequest:Oy(My)}))}function Ly(){var n,a;return(a=(n=document.querySelector('link[rel="icon"]'))==null?void 0:n.href)!=null?a:null}function Ry(){var n;return(n=document.title)!=null?n:null}function Nf(n,a,i=localStorage){let u=i.getItem(n),d=a?JSON.stringify(a):null;d?i.setItem(n,d):i.removeItem(n),window.dispatchEvent(new StorageEvent("storage",{key:n,oldValue:u,newValue:d,storageArea:i}))}function bf(n,a=localStorage){let i=a.getItem(n);try{return i?JSON.parse(i):null}catch{return null}}var Jt,El,Iy=class{constructor(a){Yr(this,Jt),Yr(this,El,`lumi-auth-${lv()}`),Tn(this,Jt,a)}get accessToken(){return bf("lumi-access-token")}set accessToken(a){Nf("lumi-access-token",a)}get user(){return bf("lumi-user")}set user(a){Nf("lumi-user",a)}get isAuthenticated(){return!!this.accessToken}signIn(){let a=(window.screen.width-800)/2,i=(window.screen.height-600)/2,u=window.open(Le(this,Jt).config.authOrigin,Le(this,El),`width=800,height=600,left=${a},top=${i}`),d;return new Promise((f,m)=>{if(!u)return m(new Error("Open auth window failed"));let v=setInterval(()=>{u.closed&&m(new Error("Auth window closed"))},1e3),g=h=>{u.closed||(u.focus(),h.stopPropagation(),h.preventDefault())},w=({data:h,origin:y,source:N})=>{if(!(y!==Le(this,Jt).config.authOrigin||N!==u))switch(h?.type){case"lumi-ready":{u.postMessage({type:"lumi-init",data:{projectId:Le(this,Jt).config.projectId,icon:Ly(),title:Ry()}},Le(this,Jt).config.authOrigin);break}case"lumi-sign-in":{if(h.data.projectId!==Le(this,Jt).config.projectId)break;u.close(),window.focus(),this.accessToken=h.data.accessToken,this.user=h.data.user,f(h.data);break}}};window.addEventListener("message",w),document.addEventListener("click",g,!0),d=()=>{clearInterval(v),window.removeEventListener("message",w),document.removeEventListener("click",g,!0)}}).finally(()=>d?.())}signOut(){this.accessToken=null,this.user=null}refreshUser(){return Ot(this,null,function*(){let a=yield kt(Le(this,Jt),"/lm/user/info",{method:"POST"});if(a.code!==200)throw new Error(a.message);return this.user=a.data,a.data})}onAuthChange(a){let i=u=>{(u.key==="lumi-access-token"||u.key==="lumi-user"||u.key===null)&&a({isAuthenticated:this.isAuthenticated,user:this.user})};return window.addEventListener("storage",i),()=>{window.removeEventListener("storage",i)}}};Jt=new WeakMap,El=new WeakMap;var bt,zy=class{constructor(n,a){Yr(this,bt),Tn(this,bt,n),this.entityName=a}list(){return Ot(this,arguments,function*({filter:n,sort:a,limit:i,skip:u}={}){if(i){let d=yield kt(Le(this,bt),this.uri("/find"),{method:"POST",body:{filter:n,sort:a,limit:i,skip:u}});if(d.code!==200)throw new Error(d.message);return d.data}else{let d=yield kt(Le(this,bt),this.uri("/list"),{method:"POST",body:{filter:n,sort:a}});if(d.code!==200)throw new Error(d.message);return{total:d.data.length,list:d.data}}})}get(n){return Ot(this,null,function*(){let a=yield kt(Le(this,bt),this.uri(`/${n}`),{method:"GET"});if(a.code!==200)throw new Error(a.message);return a.data})}create(n){return Ot(this,null,function*(){let a=yield kt(Le(this,bt),this.uri(),{method:"POST",body:n});if(a.code!==200)throw new Error(a.message);return a.data})}createMany(n){return Ot(this,null,function*(){let a=yield kt(Le(this,bt),this.uri("/batch"),{method:"POST",body:n});if(a.code!==200)throw new Error(a.message);return a.data})}update(n,a){return Ot(this,null,function*(){let i=yield kt(Le(this,bt),this.uri(),{method:"PUT",body:{filter:{_id:n},update:a}});if(i.code!==200)throw new Error(i.message);return i.data})}delete(n){return Ot(this,null,function*(){let a=yield kt(Le(this,bt),this.uri(`/${n}`),{method:"DELETE"});if(a.code!==200)throw new Error(a.message)})}deleteMany(n){return Ot(this,null,function*(){let a=yield kt(Le(this,bt),this.uri("/batch-by-ids"),{method:"DELETE",params:{ids:n}});if(a.code!==200)throw new Error(a.message)})}uri(n=""){return`/lm/${Le(this,bt).config.projectId}/${this.entityName}/documents${n}`}};bt=new WeakMap;var Jo,$y=class{constructor(a){return Yr(this,Jo),Tn(this,Jo,a),new Proxy(this,{get(i,u){return u in i||(i[u]=new zy(Le(i,Jo),u)),i[u]}})}};Jo=new WeakMap;var Tl=class extends Error{constructor(n,a){super(a),this.name="LumiError",this.code=n}},va,Ay=class{constructor(n){Yr(this,va),Tn(this,va,n)}send(n){return Ot(this,arguments,function*({to:a,subject:i,fromName:u,html:d,text:f="",replyTo:m,scheduledAt:v}){if(!a||!i||!d&&!f)throw new Error("Failed to send email: Missing required parameters.");typeof a=="string"&&(a=[a]),typeof m=="string"&&(m=[m]);let g=yield kt(Le(this,va),`/lm/${Le(this,va).config.projectId}/email/send`,{method:"POST",body:{to:a,subject:i,fromName:u,html:d,text:f,replyTo:m,scheduledAt:v}});if(g.code!==200)throw new Tl(g.code,g.message)})}};va=new WeakMap;var Wr,Uy=class{constructor(n){Yr(this,Wr),Tn(this,Wr,n)}upload(n){return Ot(this,null,function*(){let a=new FormData;n.forEach(u=>{a.append("files",u)});let i=yield kt(Le(this,Wr),`/lm/${Le(this,Wr).config.projectId}/file/batch`,{method:"POST",body:a});if(i.code!==200)throw new Tl(i.code,i.message);return i.data})}delete(n){return Ot(this,null,function*(){let a=yield kt(Le(this,Wr),`/lm/${Le(this,Wr).config.projectId}/file/batch`,{method:"DELETE",body:{fileUrls:n}});if(a.code!==200)throw new Tl(a.code,a.message)})}};Wr=new WeakMap;var Pl,Fy=class{constructor(n){Yr(this,Pl),Tn(this,Pl,n),this.email=new Ay(n),this.file=new Uy(n)}};Pl=new WeakMap;var Hy=class{constructor(a){this.config=a,this.auth=new Iy(this),this.entities=new $y(this),this.tools=new Fy(this)}};function By(n){return new Hy(n)}const Ae=By({projectId:"p355815126673022976",apiBaseUrl:"https://api.lumi.new",authOrigin:"https://auth.lumi.new"}),Wy=()=>{const[n,a]=C.useState({totalPacientes:0,totalMedicos:0,consultasHoje:0,consultasPendentes:0});return C.useEffect(()=>{(async()=>{try{const[u,d,f]=await Promise.all([Ae.entities.pacientes.list(),Ae.entities.medicos.list(),Ae.entities.consultas.list()]),m=new Date().toISOString().split("T")[0],v=f.list?.filter(w=>w.dataHora?.startsWith(m)).length||0,g=f.list?.filter(w=>w.status==="agendada"||w.status==="confirmada").length||0;a({totalPacientes:u.list?.length||0,totalMedicos:d.list?.length||0,consultasHoje:v,consultasPendentes:g})}catch(u){console.error("Erro ao carregar estatísticas:",u)}})()},[]),s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{className:"text-center py-12 bg-gradient-to-l from-blue-800 to-blue-500 text-white rounded-xl shadow-lg",children:[s.jsx("h1",{className:"text-4xl font-bold mb-4",children:"Sistema de Agendamento Médico"}),s.jsx("p",{className:"text-xl opacity-90",children:"Gerencie consultas, pacientes e médicos de forma eficiente"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:[s.jsx("div",{className:"bg-white rounded-lg shadow-md p-6",children:s.jsxs("div",{className:"flex items-center",children:[s.jsx("div",{className:"p-3 bg-gradient-to-l from-blue-700 to-blue-400 rounded-full",children:s.jsx(qr,{className:"w-6 h-6 text-white"})}),s.jsxs("div",{className:"ml-4",children:[s.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Total de Pacientes"}),s.jsx("p",{className:"text-2xl font-bold text-gray-900",children:n.totalPacientes})]})]})}),s.jsx("div",{className:"bg-white rounded-lg shadow-md p-6",children:s.jsxs("div",{className:"flex items-center",children:[s.jsx("div",{className:"p-3 bg-green-100 rounded-full",children:s.jsx(uf,{className:"w-6 h-6 text-green-600"})}),s.jsxs("div",{className:"ml-4",children:[s.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Médicos Ativos"}),s.jsx("p",{className:"text-2xl font-bold text-gray-900",children:n.totalMedicos})]})]})}),s.jsx("div",{className:"bg-white rounded-lg shadow-md p-6",children:s.jsxs("div",{className:"flex items-center",children:[s.jsx("div",{className:"p-3 bg-yellow-100 rounded-full",children:s.jsx(_r,{className:"w-6 h-6 text-yellow-600"})}),s.jsxs("div",{className:"ml-4",children:[s.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Consultas Hoje"}),s.jsx("p",{className:"text-2xl font-bold text-gray-900",children:n.consultasHoje})]})]})}),s.jsx("div",{className:"bg-white rounded-lg shadow-md p-6",children:s.jsxs("div",{className:"flex items-center",children:[s.jsx("div",{className:"p-3 bg-purple-100 rounded-full",children:s.jsx(bn,{className:"w-6 h-6 text-purple-600"})}),s.jsxs("div",{className:"ml-4",children:[s.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Pendentes"}),s.jsx("p",{className:"text-2xl font-bold text-gray-900",children:n.consultasPendentes})]})]})})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[s.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6 hover:shadow-lg transition-shadow",children:[s.jsx("div",{className:"w-12 h-12 bg-gradient-to-l from-blue-700 to-blue-400 rounded-lg flex items-center justify-center mb-4",children:s.jsx(_r,{className:"w-6 h-6 text-white"})}),s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Agendar Consulta"}),s.jsx("p",{className:"text-gray-600 mb-4",children:"Interface para pacientes agendarem suas consultas médicas"}),s.jsx("a",{href:"/paciente",className:"btn-primary inline-block",children:"Acessar Agendamento"})]}),s.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6 hover:shadow-lg transition-shadow",children:[s.jsx(uf,{className:"w-12 h-12 text-green-600 mb-4"}),s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Painel do Médico"}),s.jsx("p",{className:"text-gray-600 mb-4",children:"Gerencie suas consultas, horários e informações dos pacientes"}),s.jsx("a",{href:"/login-medico",className:"btn-primary inline-block",children:"Acessar Painel"})]}),s.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6 hover:shadow-lg transition-shadow",children:[s.jsx(qr,{className:"w-12 h-12 text-purple-600 mb-4"}),s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Cadastro de Pacientes"}),s.jsx("p",{className:"text-gray-600 mb-4",children:"Área da secretaria para cadastrar e gerenciar pacientes"}),s.jsx("a",{href:"/login-secretaria",className:"btn-primary inline-block",children:"Acessar Cadastro"})]})]})]})},Vy=()=>{const[n,a]=C.useState({email:"",senha:""}),[i,u]=C.useState(!1),[d,f]=C.useState(!1),[m,v]=C.useState({nome:"",email:"",senha:"",confirmarSenha:"",telefone:"",cpf:"",dataNascimento:"",convenio:"",altura:"",peso:""}),g=Tr(),w=async y=>{y.preventDefault(),u(!0);try{const O=(await Ae.entities.pacientes.list({filter:{email:n.email,ativo:!0}})).list?.[0];if(!O){ue.error("Email não encontrado. Cadastre-se primeiro."),u(!1);return}O.senha===n.senha?(ue.success(`Bem-vindo(a), ${O.nome}!`),localStorage.setItem("pacienteLogado",JSON.stringify(O)),g("/acompanhamento")):ue.error("Senha incorreta")}catch(N){console.error("Erro no login:",N),ue.error("Erro ao fazer login. Tente novamente.")}finally{u(!1)}},h=async y=>{if(y.preventDefault(),m.senha!==m.confirmarSenha){ue.error("As senhas não coincidem");return}if(m.senha.length<6){ue.error("A senha deve ter pelo menos 6 caracteres");return}u(!0);try{const N=await Ae.entities.pacientes.list({filter:{email:m.email}});if(N.list&&N.list.length>0){ue.error("Este email já está cadastrado"),u(!1);return}const O=await Ae.entities.pacientes.create({nome:m.nome,email:m.email,senha:m.senha,telefone:m.telefone,cpf:m.cpf,dataNascimento:m.dataNascimento,convenio:m.convenio||"Particular",altura:m.altura?parseFloat(m.altura):void 0,peso:m.peso?parseFloat(m.peso):void 0,ativo:!0,criadoEm:new Date().toISOString(),atualizadoEm:new Date().toISOString()});ue.success("Cadastro realizado com sucesso!"),localStorage.setItem("pacienteLogado",JSON.stringify(O)),g("/acompanhamento")}catch(N){console.error("Erro no cadastro:",N),ue.error("Erro ao criar cadastro. Tente novamente.")}finally{u(!1)}};return s.jsx("div",{className:"min-h-screen bg-gradient-to-br from-blue-50 to-white flex items-center justify-center p-4",children:s.jsxs("div",{className:"max-w-md w-full",children:[s.jsxs("div",{className:"text-center mb-8",children:[s.jsx("div",{className:"bg-gradient-to-r from-blue-700 to-blue-400 w-16 h-16 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx(Sn,{className:"w-8 h-8 text-white"})}),s.jsx("h1",{className:"text-3xl font-bold text-gray-900 mb-2",children:d?"Criar Conta":"Área do Paciente"}),s.jsx("p",{className:"text-gray-600",children:d?"Preencha seus dados para criar sua conta":"Faça login para acompanhar suas consultas"})]}),s.jsx("div",{className:"bg-white rounded-lg shadow-lg p-8",children:d?s.jsxs("form",{onSubmit:h,className:"space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Nome Completo"}),s.jsx("input",{type:"text",value:m.nome,onChange:y=>v(N=>({...N,nome:y.target.value})),className:"form-input",required:!0})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"CPF"}),s.jsx("input",{type:"text",value:m.cpf,onChange:y=>v(N=>({...N,cpf:y.target.value})),className:"form-input",placeholder:"000.000.000-00",required:!0})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Email"}),s.jsx("input",{type:"email",value:m.email,onChange:y=>v(N=>({...N,email:y.target.value})),className:"form-input",required:!0})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Senha"}),s.jsx("input",{type:"password",value:m.senha,onChange:y=>v(N=>({...N,senha:y.target.value})),className:"form-input",minLength:6,required:!0})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Confirmar Senha"}),s.jsx("input",{type:"password",value:m.confirmarSenha,onChange:y=>v(N=>({...N,confirmarSenha:y.target.value})),className:"form-input",required:!0})]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Telefone"}),s.jsx("input",{type:"tel",value:m.telefone,onChange:y=>v(N=>({...N,telefone:y.target.value})),className:"form-input",placeholder:"(11) 99999-9999",required:!0})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Data de Nascimento"}),s.jsx("input",{type:"date",value:m.dataNascimento,onChange:y=>v(N=>({...N,dataNascimento:y.target.value})),className:"form-input",required:!0})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Convênio"}),s.jsxs("select",{value:m.convenio,onChange:y=>v(N=>({...N,convenio:y.target.value})),className:"form-input",children:[s.jsx("option",{value:"",children:"Selecione"}),s.jsx("option",{value:"Particular",children:"Particular"}),s.jsx("option",{value:"Unimed",children:"Unimed"}),s.jsx("option",{value:"Bradesco Saúde",children:"Bradesco Saúde"}),s.jsx("option",{value:"SulAmérica",children:"SulAmérica"}),s.jsx("option",{value:"Amil",children:"Amil"}),s.jsx("option",{value:"NotreDame",children:"NotreDame"})]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Altura (cm)"}),s.jsx("input",{type:"number",value:m.altura,onChange:y=>v(N=>({...N,altura:y.target.value})),className:"form-input",placeholder:"170",min:"50",max:"250"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Peso (kg)"}),s.jsx("input",{type:"number",value:m.peso,onChange:y=>v(N=>({...N,peso:y.target.value})),className:"form-input",placeholder:"70",min:"20",max:"300",step:"0.1"})]})]}),s.jsxs("div",{className:"flex space-x-4",children:[s.jsx("button",{type:"button",onClick:()=>f(!1),className:"flex-1 bg-gray-100 text-gray-700 py-3 px-4 rounded-lg font-medium hover:bg-gray-200 transition-colors",children:"Voltar"}),s.jsx("button",{type:"submit",disabled:i,className:"flex-1 bg-gradient-to-r from-blue-700 to-blue-400 text-white py-3 px-4 rounded-lg font-medium hover:from-blue-800 hover:to-blue-500 disabled:opacity-50 disabled:cursor-not-allowed transition-all",children:i?"Cadastrando...":"Cadastrar"})]})]}):s.jsxs("form",{onSubmit:w,className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Email"}),s.jsxs("div",{className:"relative",children:[s.jsx(ba,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-5 h-5 text-gray-400"}),s.jsx("input",{type:"email",value:n.email,onChange:y=>a(N=>({...N,email:y.target.value})),className:"form-input pl-10",placeholder:"seu@email.com",required:!0})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Senha"}),s.jsxs("div",{className:"relative",children:[s.jsx(Hl,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-5 h-5 text-gray-400"}),s.jsx("input",{type:"password",value:n.senha,onChange:y=>a(N=>({...N,senha:y.target.value})),className:"form-input pl-10",placeholder:"Sua senha",required:!0})]})]}),s.jsx("button",{type:"submit",disabled:i,className:"w-full bg-gradient-to-r from-blue-700 to-blue-400 text-white py-3 px-4 rounded-lg font-medium hover:from-blue-800 hover:to-blue-500 disabled:opacity-50 disabled:cursor-not-allowed transition-all",children:i?"Entrando...":"Entrar"}),s.jsx("div",{className:"text-center",children:s.jsx("button",{type:"button",onClick:()=>f(!0),className:"text-blue-600 hover:text-blue-800 text-sm font-medium",children:"Não tem conta? Cadastre-se aqui"})})]})})]})})},qy=()=>{const[n,a]=C.useState({email:"",senha:""}),[i,u]=C.useState(!1),d=Tr(),f={email:"secretaria@clinica.com",senha:"secretaria123"},m=async v=>{v.preventDefault(),u(!0);try{n.email===f.email&&n.senha===f.senha?(ue.success("Login realizado com sucesso!"),localStorage.setItem("secretariaLogada",JSON.stringify({nome:"Secretária",email:n.email,tipo:"secretaria"})),d("/painel-secretaria")):ue.error("Email ou senha incorretos")}catch(g){console.error("Erro no login:",g),ue.error("Erro ao fazer login. Tente novamente.")}finally{u(!1)}};return s.jsx("div",{className:"min-h-screen bg-gradient-to-br from-green-50 to-white flex items-center justify-center p-4",children:s.jsxs("div",{className:"max-w-md w-full",children:[s.jsxs("div",{className:"text-center mb-8",children:[s.jsx("div",{className:"bg-gradient-to-r from-green-600 to-green-400 w-16 h-16 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx(kl,{className:"w-8 h-8 text-white"})}),s.jsx("h1",{className:"text-3xl font-bold text-gray-900 mb-2",children:"Área da Secretaria"}),s.jsx("p",{className:"text-gray-600",children:"Faça login para acessar o sistema de gestão"})]}),s.jsxs("div",{className:"bg-white rounded-lg shadow-lg p-8",children:[s.jsxs("form",{onSubmit:m,className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Email"}),s.jsxs("div",{className:"relative",children:[s.jsx(ba,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-5 h-5 text-gray-400"}),s.jsx("input",{type:"email",value:n.email,onChange:v=>a(g=>({...g,email:v.target.value})),className:"form-input pl-10",placeholder:"secretaria@clinica.com",required:!0})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Senha"}),s.jsxs("div",{className:"relative",children:[s.jsx(Hl,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-5 h-5 text-gray-400"}),s.jsx("input",{type:"password",value:n.senha,onChange:v=>a(g=>({...g,senha:v.target.value})),className:"form-input pl-10",placeholder:"Sua senha",required:!0})]})]}),s.jsx("button",{type:"submit",disabled:i,className:"w-full bg-gradient-to-r from-green-600 to-green-400 text-white py-3 px-4 rounded-lg font-medium hover:from-green-700 hover:to-green-500 disabled:opacity-50 disabled:cursor-not-allowed transition-all",children:i?"Entrando...":"Entrar"})]}),s.jsxs("div",{className:"mt-6 p-4 bg-green-50 rounded-lg",children:[s.jsx("h3",{className:"text-sm font-medium text-green-800 mb-2",children:"Credenciais de Demonstração:"}),s.jsxs("div",{className:"text-sm text-green-700",children:[s.jsxs("p",{children:[s.jsx("strong",{children:"Email:"})," secretaria@clinica.com"]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Senha:"})," secretaria123"]})]})]})]})]})})},Qy=()=>{const[n,a]=C.useState({email:"",senha:""}),[i,u]=C.useState(!1),d=Tr(),f=async m=>{m.preventDefault(),u(!0);try{const g=(await Ae.entities.medicos.list({filter:{email:n.email,ativo:!0}})).list?.[0];if(!g){ue.error("Email não encontrado"),u(!1);return}g.senha===n.senha?(ue.success(`Bem-vindo(a), Dr(a). ${g.nome}!`),localStorage.setItem("medicoLogado",JSON.stringify(g)),d("/painel-medico")):ue.error("Senha incorreta")}catch(v){console.error("Erro no login:",v),ue.error("Erro ao fazer login. Tente novamente.")}finally{u(!1)}};return s.jsx("div",{className:"min-h-screen bg-gradient-to-br from-indigo-50 to-white flex items-center justify-center p-4",children:s.jsxs("div",{className:"max-w-md w-full",children:[s.jsxs("div",{className:"text-center mb-8",children:[s.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 w-16 h-16 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx(Vo,{className:"w-8 h-8 text-white"})}),s.jsx("h1",{className:"text-3xl font-bold text-gray-900 mb-2",children:"Área do Médico"}),s.jsx("p",{className:"text-gray-600",children:"Faça login para acessar seu painel médico"})]}),s.jsxs("div",{className:"bg-white rounded-lg shadow-lg p-8",children:[s.jsxs("form",{onSubmit:f,className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Email"}),s.jsxs("div",{className:"relative",children:[s.jsx(ba,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-5 h-5 text-gray-400"}),s.jsx("input",{type:"email",value:n.email,onChange:m=>a(v=>({...v,email:m.target.value})),className:"form-input pl-10",placeholder:"dr.medico@clinica.com",required:!0})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Senha"}),s.jsxs("div",{className:"relative",children:[s.jsx(Hl,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-5 h-5 text-gray-400"}),s.jsx("input",{type:"password",value:n.senha,onChange:m=>a(v=>({...v,senha:m.target.value})),className:"form-input pl-10",placeholder:"Sua senha",required:!0})]})]}),s.jsx("button",{type:"submit",disabled:i,className:"w-full bg-gradient-to-r from-indigo-600 to-indigo-400 text-white py-3 px-4 rounded-lg font-medium hover:from-indigo-700 hover:to-indigo-500 disabled:opacity-50 disabled:cursor-not-allowed transition-all",children:i?"Entrando...":"Entrar"})]}),s.jsxs("div",{className:"mt-6 p-4 bg-indigo-50 rounded-lg",children:[s.jsx("h3",{className:"text-sm font-medium text-indigo-800 mb-2",children:"Para Demonstração:"}),s.jsx("p",{className:"text-sm text-indigo-700",children:"Use as credenciais de qualquer médico cadastrado no sistema. Se não houver médicos cadastrados, acesse primeiro a área da secretaria para criar um."})]})]})]})})};function as(n){"@babel/helpers - typeof";return as=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},as(n)}function er(n){if(n===null||n===!0||n===!1)return NaN;var a=Number(n);return isNaN(a)?a:a<0?Math.ceil(a):Math.floor(a)}function Re(n,a){if(a.length<n)throw new TypeError(n+" argument"+(n>1?"s":"")+" required, but only "+a.length+" present")}function tt(n){Re(1,arguments);var a=Object.prototype.toString.call(n);return n instanceof Date||as(n)==="object"&&a==="[object Date]"?new Date(n.getTime()):typeof n=="number"||a==="[object Number]"?new Date(n):((typeof n=="string"||a==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function Vl(n,a){Re(2,arguments);var i=tt(n),u=er(a);return isNaN(u)?new Date(NaN):(u&&i.setDate(i.getDate()+u),i)}function Yy(n,a){Re(2,arguments);var i=tt(n).getTime(),u=er(a);return new Date(i+u)}var Xy={};function ds(){return Xy}function Ky(n){var a=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return a.setUTCFullYear(n.getFullYear()),n.getTime()-a.getTime()}function kf(n){Re(1,arguments);var a=tt(n);return a.setHours(0,0,0,0),a}var lm=6e4,um=36e5;function cm(n,a){Re(2,arguments);var i=kf(n),u=kf(a);return i.getTime()===u.getTime()}function Gy(n){return Re(1,arguments),n instanceof Date||as(n)==="object"&&Object.prototype.toString.call(n)==="[object Date]"}function Jy(n){if(Re(1,arguments),!Gy(n)&&typeof n!="number")return!1;var a=tt(n);return!isNaN(Number(a))}function Zy(n,a){Re(2,arguments);var i=er(a);return Yy(n,-i)}var ex=864e5;function tx(n){Re(1,arguments);var a=tt(n),i=a.getTime();a.setUTCMonth(0,1),a.setUTCHours(0,0,0,0);var u=a.getTime(),d=i-u;return Math.floor(d/ex)+1}function os(n){Re(1,arguments);var a=1,i=tt(n),u=i.getUTCDay(),d=(u<a?7:0)+u-a;return i.setUTCDate(i.getUTCDate()-d),i.setUTCHours(0,0,0,0),i}function dm(n){Re(1,arguments);var a=tt(n),i=a.getUTCFullYear(),u=new Date(0);u.setUTCFullYear(i+1,0,4),u.setUTCHours(0,0,0,0);var d=os(u),f=new Date(0);f.setUTCFullYear(i,0,4),f.setUTCHours(0,0,0,0);var m=os(f);return a.getTime()>=d.getTime()?i+1:a.getTime()>=m.getTime()?i:i-1}function rx(n){Re(1,arguments);var a=dm(n),i=new Date(0);i.setUTCFullYear(a,0,4),i.setUTCHours(0,0,0,0);var u=os(i);return u}var nx=6048e5;function ax(n){Re(1,arguments);var a=tt(n),i=os(a).getTime()-rx(a).getTime();return Math.round(i/nx)+1}function ss(n,a){var i,u,d,f,m,v,g,w;Re(1,arguments);var h=ds(),y=er((i=(u=(d=(f=a?.weekStartsOn)!==null&&f!==void 0?f:a==null||(m=a.locale)===null||m===void 0||(v=m.options)===null||v===void 0?void 0:v.weekStartsOn)!==null&&d!==void 0?d:h.weekStartsOn)!==null&&u!==void 0?u:(g=h.locale)===null||g===void 0||(w=g.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&i!==void 0?i:0);if(!(y>=0&&y<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var N=tt(n),O=N.getUTCDay(),$=(O<y?7:0)+O-y;return N.setUTCDate(N.getUTCDate()-$),N.setUTCHours(0,0,0,0),N}function fm(n,a){var i,u,d,f,m,v,g,w;Re(1,arguments);var h=tt(n),y=h.getUTCFullYear(),N=ds(),O=er((i=(u=(d=(f=a?.firstWeekContainsDate)!==null&&f!==void 0?f:a==null||(m=a.locale)===null||m===void 0||(v=m.options)===null||v===void 0?void 0:v.firstWeekContainsDate)!==null&&d!==void 0?d:N.firstWeekContainsDate)!==null&&u!==void 0?u:(g=N.locale)===null||g===void 0||(w=g.options)===null||w===void 0?void 0:w.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(O>=1&&O<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var $=new Date(0);$.setUTCFullYear(y+1,0,O),$.setUTCHours(0,0,0,0);var z=ss($,a),P=new Date(0);P.setUTCFullYear(y,0,O),P.setUTCHours(0,0,0,0);var W=ss(P,a);return h.getTime()>=z.getTime()?y+1:h.getTime()>=W.getTime()?y:y-1}function ox(n,a){var i,u,d,f,m,v,g,w;Re(1,arguments);var h=ds(),y=er((i=(u=(d=(f=a?.firstWeekContainsDate)!==null&&f!==void 0?f:a==null||(m=a.locale)===null||m===void 0||(v=m.options)===null||v===void 0?void 0:v.firstWeekContainsDate)!==null&&d!==void 0?d:h.firstWeekContainsDate)!==null&&u!==void 0?u:(g=h.locale)===null||g===void 0||(w=g.options)===null||w===void 0?void 0:w.firstWeekContainsDate)!==null&&i!==void 0?i:1),N=fm(n,a),O=new Date(0);O.setUTCFullYear(N,0,y),O.setUTCHours(0,0,0,0);var $=ss(O,a);return $}var sx=6048e5;function ix(n,a){Re(1,arguments);var i=tt(n),u=ss(i,a).getTime()-ox(i,a).getTime();return Math.round(u/sx)+1}function Ne(n,a){for(var i=n<0?"-":"",u=Math.abs(n).toString();u.length<a;)u="0"+u;return i+u}var jr={y:function(a,i){var u=a.getUTCFullYear(),d=u>0?u:1-u;return Ne(i==="yy"?d%100:d,i.length)},M:function(a,i){var u=a.getUTCMonth();return i==="M"?String(u+1):Ne(u+1,2)},d:function(a,i){return Ne(a.getUTCDate(),i.length)},a:function(a,i){var u=a.getUTCHours()/12>=1?"pm":"am";switch(i){case"a":case"aa":return u.toUpperCase();case"aaa":return u;case"aaaaa":return u[0];case"aaaa":default:return u==="am"?"a.m.":"p.m."}},h:function(a,i){return Ne(a.getUTCHours()%12||12,i.length)},H:function(a,i){return Ne(a.getUTCHours(),i.length)},m:function(a,i){return Ne(a.getUTCMinutes(),i.length)},s:function(a,i){return Ne(a.getUTCSeconds(),i.length)},S:function(a,i){var u=i.length,d=a.getUTCMilliseconds(),f=Math.floor(d*Math.pow(10,u-3));return Ne(f,i.length)}},Nn={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},lx={G:function(a,i,u){var d=a.getUTCFullYear()>0?1:0;switch(i){case"G":case"GG":case"GGG":return u.era(d,{width:"abbreviated"});case"GGGGG":return u.era(d,{width:"narrow"});case"GGGG":default:return u.era(d,{width:"wide"})}},y:function(a,i,u){if(i==="yo"){var d=a.getUTCFullYear(),f=d>0?d:1-d;return u.ordinalNumber(f,{unit:"year"})}return jr.y(a,i)},Y:function(a,i,u,d){var f=fm(a,d),m=f>0?f:1-f;if(i==="YY"){var v=m%100;return Ne(v,2)}return i==="Yo"?u.ordinalNumber(m,{unit:"year"}):Ne(m,i.length)},R:function(a,i){var u=dm(a);return Ne(u,i.length)},u:function(a,i){var u=a.getUTCFullYear();return Ne(u,i.length)},Q:function(a,i,u){var d=Math.ceil((a.getUTCMonth()+1)/3);switch(i){case"Q":return String(d);case"QQ":return Ne(d,2);case"Qo":return u.ordinalNumber(d,{unit:"quarter"});case"QQQ":return u.quarter(d,{width:"abbreviated",context:"formatting"});case"QQQQQ":return u.quarter(d,{width:"narrow",context:"formatting"});case"QQQQ":default:return u.quarter(d,{width:"wide",context:"formatting"})}},q:function(a,i,u){var d=Math.ceil((a.getUTCMonth()+1)/3);switch(i){case"q":return String(d);case"qq":return Ne(d,2);case"qo":return u.ordinalNumber(d,{unit:"quarter"});case"qqq":return u.quarter(d,{width:"abbreviated",context:"standalone"});case"qqqqq":return u.quarter(d,{width:"narrow",context:"standalone"});case"qqqq":default:return u.quarter(d,{width:"wide",context:"standalone"})}},M:function(a,i,u){var d=a.getUTCMonth();switch(i){case"M":case"MM":return jr.M(a,i);case"Mo":return u.ordinalNumber(d+1,{unit:"month"});case"MMM":return u.month(d,{width:"abbreviated",context:"formatting"});case"MMMMM":return u.month(d,{width:"narrow",context:"formatting"});case"MMMM":default:return u.month(d,{width:"wide",context:"formatting"})}},L:function(a,i,u){var d=a.getUTCMonth();switch(i){case"L":return String(d+1);case"LL":return Ne(d+1,2);case"Lo":return u.ordinalNumber(d+1,{unit:"month"});case"LLL":return u.month(d,{width:"abbreviated",context:"standalone"});case"LLLLL":return u.month(d,{width:"narrow",context:"standalone"});case"LLLL":default:return u.month(d,{width:"wide",context:"standalone"})}},w:function(a,i,u,d){var f=ix(a,d);return i==="wo"?u.ordinalNumber(f,{unit:"week"}):Ne(f,i.length)},I:function(a,i,u){var d=ax(a);return i==="Io"?u.ordinalNumber(d,{unit:"week"}):Ne(d,i.length)},d:function(a,i,u){return i==="do"?u.ordinalNumber(a.getUTCDate(),{unit:"date"}):jr.d(a,i)},D:function(a,i,u){var d=tx(a);return i==="Do"?u.ordinalNumber(d,{unit:"dayOfYear"}):Ne(d,i.length)},E:function(a,i,u){var d=a.getUTCDay();switch(i){case"E":case"EE":case"EEE":return u.day(d,{width:"abbreviated",context:"formatting"});case"EEEEE":return u.day(d,{width:"narrow",context:"formatting"});case"EEEEEE":return u.day(d,{width:"short",context:"formatting"});case"EEEE":default:return u.day(d,{width:"wide",context:"formatting"})}},e:function(a,i,u,d){var f=a.getUTCDay(),m=(f-d.weekStartsOn+8)%7||7;switch(i){case"e":return String(m);case"ee":return Ne(m,2);case"eo":return u.ordinalNumber(m,{unit:"day"});case"eee":return u.day(f,{width:"abbreviated",context:"formatting"});case"eeeee":return u.day(f,{width:"narrow",context:"formatting"});case"eeeeee":return u.day(f,{width:"short",context:"formatting"});case"eeee":default:return u.day(f,{width:"wide",context:"formatting"})}},c:function(a,i,u,d){var f=a.getUTCDay(),m=(f-d.weekStartsOn+8)%7||7;switch(i){case"c":return String(m);case"cc":return Ne(m,i.length);case"co":return u.ordinalNumber(m,{unit:"day"});case"ccc":return u.day(f,{width:"abbreviated",context:"standalone"});case"ccccc":return u.day(f,{width:"narrow",context:"standalone"});case"cccccc":return u.day(f,{width:"short",context:"standalone"});case"cccc":default:return u.day(f,{width:"wide",context:"standalone"})}},i:function(a,i,u){var d=a.getUTCDay(),f=d===0?7:d;switch(i){case"i":return String(f);case"ii":return Ne(f,i.length);case"io":return u.ordinalNumber(f,{unit:"day"});case"iii":return u.day(d,{width:"abbreviated",context:"formatting"});case"iiiii":return u.day(d,{width:"narrow",context:"formatting"});case"iiiiii":return u.day(d,{width:"short",context:"formatting"});case"iiii":default:return u.day(d,{width:"wide",context:"formatting"})}},a:function(a,i,u){var d=a.getUTCHours(),f=d/12>=1?"pm":"am";switch(i){case"a":case"aa":return u.dayPeriod(f,{width:"abbreviated",context:"formatting"});case"aaa":return u.dayPeriod(f,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return u.dayPeriod(f,{width:"narrow",context:"formatting"});case"aaaa":default:return u.dayPeriod(f,{width:"wide",context:"formatting"})}},b:function(a,i,u){var d=a.getUTCHours(),f;switch(d===12?f=Nn.noon:d===0?f=Nn.midnight:f=d/12>=1?"pm":"am",i){case"b":case"bb":return u.dayPeriod(f,{width:"abbreviated",context:"formatting"});case"bbb":return u.dayPeriod(f,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return u.dayPeriod(f,{width:"narrow",context:"formatting"});case"bbbb":default:return u.dayPeriod(f,{width:"wide",context:"formatting"})}},B:function(a,i,u){var d=a.getUTCHours(),f;switch(d>=17?f=Nn.evening:d>=12?f=Nn.afternoon:d>=4?f=Nn.morning:f=Nn.night,i){case"B":case"BB":case"BBB":return u.dayPeriod(f,{width:"abbreviated",context:"formatting"});case"BBBBB":return u.dayPeriod(f,{width:"narrow",context:"formatting"});case"BBBB":default:return u.dayPeriod(f,{width:"wide",context:"formatting"})}},h:function(a,i,u){if(i==="ho"){var d=a.getUTCHours()%12;return d===0&&(d=12),u.ordinalNumber(d,{unit:"hour"})}return jr.h(a,i)},H:function(a,i,u){return i==="Ho"?u.ordinalNumber(a.getUTCHours(),{unit:"hour"}):jr.H(a,i)},K:function(a,i,u){var d=a.getUTCHours()%12;return i==="Ko"?u.ordinalNumber(d,{unit:"hour"}):Ne(d,i.length)},k:function(a,i,u){var d=a.getUTCHours();return d===0&&(d=24),i==="ko"?u.ordinalNumber(d,{unit:"hour"}):Ne(d,i.length)},m:function(a,i,u){return i==="mo"?u.ordinalNumber(a.getUTCMinutes(),{unit:"minute"}):jr.m(a,i)},s:function(a,i,u){return i==="so"?u.ordinalNumber(a.getUTCSeconds(),{unit:"second"}):jr.s(a,i)},S:function(a,i){return jr.S(a,i)},X:function(a,i,u,d){var f=d._originalDate||a,m=f.getTimezoneOffset();if(m===0)return"Z";switch(i){case"X":return _f(m);case"XXXX":case"XX":return Vr(m);case"XXXXX":case"XXX":default:return Vr(m,":")}},x:function(a,i,u,d){var f=d._originalDate||a,m=f.getTimezoneOffset();switch(i){case"x":return _f(m);case"xxxx":case"xx":return Vr(m);case"xxxxx":case"xxx":default:return Vr(m,":")}},O:function(a,i,u,d){var f=d._originalDate||a,m=f.getTimezoneOffset();switch(i){case"O":case"OO":case"OOO":return"GMT"+Sf(m,":");case"OOOO":default:return"GMT"+Vr(m,":")}},z:function(a,i,u,d){var f=d._originalDate||a,m=f.getTimezoneOffset();switch(i){case"z":case"zz":case"zzz":return"GMT"+Sf(m,":");case"zzzz":default:return"GMT"+Vr(m,":")}},t:function(a,i,u,d){var f=d._originalDate||a,m=Math.floor(f.getTime()/1e3);return Ne(m,i.length)},T:function(a,i,u,d){var f=d._originalDate||a,m=f.getTime();return Ne(m,i.length)}};function Sf(n,a){var i=n>0?"-":"+",u=Math.abs(n),d=Math.floor(u/60),f=u%60;if(f===0)return i+String(d);var m=a;return i+String(d)+m+Ne(f,2)}function _f(n,a){if(n%60===0){var i=n>0?"-":"+";return i+Ne(Math.abs(n)/60,2)}return Vr(n,a)}function Vr(n,a){var i=a||"",u=n>0?"-":"+",d=Math.abs(n),f=Ne(Math.floor(d/60),2),m=Ne(d%60,2);return u+f+i+m}var Cf=function(a,i){switch(a){case"P":return i.date({width:"short"});case"PP":return i.date({width:"medium"});case"PPP":return i.date({width:"long"});case"PPPP":default:return i.date({width:"full"})}},mm=function(a,i){switch(a){case"p":return i.time({width:"short"});case"pp":return i.time({width:"medium"});case"ppp":return i.time({width:"long"});case"pppp":default:return i.time({width:"full"})}},ux=function(a,i){var u=a.match(/(P+)(p+)?/)||[],d=u[1],f=u[2];if(!f)return Cf(a,i);var m;switch(d){case"P":m=i.dateTime({width:"short"});break;case"PP":m=i.dateTime({width:"medium"});break;case"PPP":m=i.dateTime({width:"long"});break;case"PPPP":default:m=i.dateTime({width:"full"});break}return m.replace("{{date}}",Cf(d,i)).replace("{{time}}",mm(f,i))},cx={p:mm,P:ux},dx=["D","DD"],fx=["YY","YYYY"];function mx(n){return dx.indexOf(n)!==-1}function px(n){return fx.indexOf(n)!==-1}function Ef(n,a,i){if(n==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(a,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(a,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(a,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(a,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var hx={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},gx=function(a,i,u){var d,f=hx[a];return typeof f=="string"?d=f:i===1?d=f.one:d=f.other.replace("{{count}}",i.toString()),u!=null&&u.addSuffix?u.comparison&&u.comparison>0?"in "+d:d+" ago":d};function kn(n){return function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=a.width?String(a.width):n.defaultWidth,u=n.formats[i]||n.formats[n.defaultWidth];return u}}var vx={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},yx={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},xx={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},wx={date:kn({formats:vx,defaultWidth:"full"}),time:kn({formats:yx,defaultWidth:"full"}),dateTime:kn({formats:xx,defaultWidth:"full"})},jx={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Nx=function(a,i,u,d){return jx[a]};function At(n){return function(a,i){var u=i!=null&&i.context?String(i.context):"standalone",d;if(u==="formatting"&&n.formattingValues){var f=n.defaultFormattingWidth||n.defaultWidth,m=i!=null&&i.width?String(i.width):f;d=n.formattingValues[m]||n.formattingValues[f]}else{var v=n.defaultWidth,g=i!=null&&i.width?String(i.width):n.defaultWidth;d=n.values[g]||n.values[v]}var w=n.argumentCallback?n.argumentCallback(a):a;return d[w]}}var bx={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},kx={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Sx={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},_x={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Cx={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Ex={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Tx=function(a,i){var u=Number(a),d=u%100;if(d>20||d<10)switch(d%10){case 1:return u+"st";case 2:return u+"nd";case 3:return u+"rd"}return u+"th"},Px={ordinalNumber:Tx,era:At({values:bx,defaultWidth:"wide"}),quarter:At({values:kx,defaultWidth:"wide",argumentCallback:function(a){return a-1}}),month:At({values:Sx,defaultWidth:"wide"}),day:At({values:_x,defaultWidth:"wide"}),dayPeriod:At({values:Cx,defaultWidth:"wide",formattingValues:Ex,defaultFormattingWidth:"wide"})};function Ut(n){return function(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=i.width,d=u&&n.matchPatterns[u]||n.matchPatterns[n.defaultMatchWidth],f=a.match(d);if(!f)return null;var m=f[0],v=u&&n.parsePatterns[u]||n.parsePatterns[n.defaultParseWidth],g=Array.isArray(v)?Mx(v,function(y){return y.test(m)}):Dx(v,function(y){return y.test(m)}),w;w=n.valueCallback?n.valueCallback(g):g,w=i.valueCallback?i.valueCallback(w):w;var h=a.slice(m.length);return{value:w,rest:h}}}function Dx(n,a){for(var i in n)if(n.hasOwnProperty(i)&&a(n[i]))return i}function Mx(n,a){for(var i=0;i<n.length;i++)if(a(n[i]))return i}function pm(n){return function(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=a.match(n.matchPattern);if(!u)return null;var d=u[0],f=a.match(n.parsePattern);if(!f)return null;var m=n.valueCallback?n.valueCallback(f[0]):f[0];m=i.valueCallback?i.valueCallback(m):m;var v=a.slice(d.length);return{value:m,rest:v}}}var Ox=/^(\d+)(th|st|nd|rd)?/i,Lx=/\d+/i,Rx={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Ix={any:[/^b/i,/^(a|c)/i]},zx={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},$x={any:[/1/i,/2/i,/3/i,/4/i]},Ax={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Ux={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Fx={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Hx={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Bx={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Wx={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Vx={ordinalNumber:pm({matchPattern:Ox,parsePattern:Lx,valueCallback:function(a){return parseInt(a,10)}}),era:Ut({matchPatterns:Rx,defaultMatchWidth:"wide",parsePatterns:Ix,defaultParseWidth:"any"}),quarter:Ut({matchPatterns:zx,defaultMatchWidth:"wide",parsePatterns:$x,defaultParseWidth:"any",valueCallback:function(a){return a+1}}),month:Ut({matchPatterns:Ax,defaultMatchWidth:"wide",parsePatterns:Ux,defaultParseWidth:"any"}),day:Ut({matchPatterns:Fx,defaultMatchWidth:"wide",parsePatterns:Hx,defaultParseWidth:"any"}),dayPeriod:Ut({matchPatterns:Bx,defaultMatchWidth:"any",parsePatterns:Wx,defaultParseWidth:"any"})},qx={code:"en-US",formatDistance:gx,formatLong:wx,formatRelative:Nx,localize:Px,match:Vx,options:{weekStartsOn:0,firstWeekContainsDate:1}},Qx=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Yx=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Xx=/^'([^]*?)'?$/,Kx=/''/g,Gx=/[a-zA-Z]/;function at(n,a,i){var u,d,f,m,v,g,w,h,y,N,O,$,z,P,W,_,k,j;Re(2,arguments);var D=String(a),R=ds(),A=(u=(d=i?.locale)!==null&&d!==void 0?d:R.locale)!==null&&u!==void 0?u:qx,Q=er((f=(m=(v=(g=i?.firstWeekContainsDate)!==null&&g!==void 0?g:i==null||(w=i.locale)===null||w===void 0||(h=w.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&v!==void 0?v:R.firstWeekContainsDate)!==null&&m!==void 0?m:(y=R.locale)===null||y===void 0||(N=y.options)===null||N===void 0?void 0:N.firstWeekContainsDate)!==null&&f!==void 0?f:1);if(!(Q>=1&&Q<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var oe=er((O=($=(z=(P=i?.weekStartsOn)!==null&&P!==void 0?P:i==null||(W=i.locale)===null||W===void 0||(_=W.options)===null||_===void 0?void 0:_.weekStartsOn)!==null&&z!==void 0?z:R.weekStartsOn)!==null&&$!==void 0?$:(k=R.locale)===null||k===void 0||(j=k.options)===null||j===void 0?void 0:j.weekStartsOn)!==null&&O!==void 0?O:0);if(!(oe>=0&&oe<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!A.localize)throw new RangeError("locale must contain localize property");if(!A.formatLong)throw new RangeError("locale must contain formatLong property");var fe=tt(n);if(!Jy(fe))throw new RangeError("Invalid time value");var ce=Ky(fe),ie=Zy(fe,ce),pe={firstWeekContainsDate:Q,weekStartsOn:oe,locale:A,_originalDate:fe},X=D.match(Yx).map(function(re){var le=re[0];if(le==="p"||le==="P"){var E=cx[le];return E(re,A.formatLong)}return re}).join("").match(Qx).map(function(re){if(re==="''")return"'";var le=re[0];if(le==="'")return Jx(re);var E=lx[le];if(E)return!(i!=null&&i.useAdditionalWeekYearTokens)&&px(re)&&Ef(re,a,String(n)),!(i!=null&&i.useAdditionalDayOfYearTokens)&&mx(re)&&Ef(re,a,String(n)),E(ie,re,A.localize,pe);if(le.match(Gx))throw new RangeError("Format string contains an unescaped latin alphabet character `"+le+"`");return re}).join("");return X}function Jx(n){var a=n.match(Xx);return a?a[1].replace(Kx,"'"):n}function Tf(n,a){Re(2,arguments);var i=tt(n),u=tt(a);return i.getTime()>u.getTime()}function Pf(n,a){Re(2,arguments);var i=tt(n),u=tt(a);return i.getTime()<u.getTime()}function Dl(n){return Re(1,arguments),cm(n,Date.now())}function Zx(n){return Re(1,arguments),cm(n,Vl(Date.now(),1))}function Df(n,a){var i;Re(1,arguments);var u=er((i=void 0)!==null&&i!==void 0?i:2);if(u!==2&&u!==1&&u!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof n=="string"||Object.prototype.toString.call(n)==="[object String]"))return new Date(NaN);var d=n1(n),f;if(d.date){var m=a1(d.date,u);f=o1(m.restDateString,m.year)}if(!f||isNaN(f.getTime()))return new Date(NaN);var v=f.getTime(),g=0,w;if(d.time&&(g=s1(d.time),isNaN(g)))return new Date(NaN);if(d.timezone){if(w=i1(d.timezone),isNaN(w))return new Date(NaN)}else{var h=new Date(v+g),y=new Date(0);return y.setFullYear(h.getUTCFullYear(),h.getUTCMonth(),h.getUTCDate()),y.setHours(h.getUTCHours(),h.getUTCMinutes(),h.getUTCSeconds(),h.getUTCMilliseconds()),y}return new Date(v+g+w)}var Fo={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},e1=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,t1=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,r1=/^([+-])(\d{2})(?::?(\d{2}))?$/;function n1(n){var a={},i=n.split(Fo.dateTimeDelimiter),u;if(i.length>2)return a;if(/:/.test(i[0])?u=i[0]:(a.date=i[0],u=i[1],Fo.timeZoneDelimiter.test(a.date)&&(a.date=n.split(Fo.timeZoneDelimiter)[0],u=n.substr(a.date.length,n.length))),u){var d=Fo.timezone.exec(u);d?(a.time=u.replace(d[1],""),a.timezone=d[1]):a.time=u}return a}function a1(n,a){var i=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+a)+"})|(\\d{2}|[+-]\\d{"+(2+a)+"})$)"),u=n.match(i);if(!u)return{year:NaN,restDateString:""};var d=u[1]?parseInt(u[1]):null,f=u[2]?parseInt(u[2]):null;return{year:f===null?d:f*100,restDateString:n.slice((u[1]||u[2]).length)}}function o1(n,a){if(a===null)return new Date(NaN);var i=n.match(e1);if(!i)return new Date(NaN);var u=!!i[4],d=ga(i[1]),f=ga(i[2])-1,m=ga(i[3]),v=ga(i[4]),g=ga(i[5])-1;if(u)return f1(a,v,g)?l1(a,v,g):new Date(NaN);var w=new Date(0);return!c1(a,f,m)||!d1(a,d)?new Date(NaN):(w.setUTCFullYear(a,f,Math.max(d,m)),w)}function ga(n){return n?parseInt(n):1}function s1(n){var a=n.match(t1);if(!a)return NaN;var i=vl(a[1]),u=vl(a[2]),d=vl(a[3]);return m1(i,u,d)?i*um+u*lm+d*1e3:NaN}function vl(n){return n&&parseFloat(n.replace(",","."))||0}function i1(n){if(n==="Z")return 0;var a=n.match(r1);if(!a)return 0;var i=a[1]==="+"?-1:1,u=parseInt(a[2]),d=a[3]&&parseInt(a[3])||0;return p1(u,d)?i*(u*um+d*lm):NaN}function l1(n,a,i){var u=new Date(0);u.setUTCFullYear(n,0,4);var d=u.getUTCDay()||7,f=(a-1)*7+i+1-d;return u.setUTCDate(u.getUTCDate()+f),u}var u1=[31,null,31,30,31,30,31,31,30,31,30,31];function hm(n){return n%400===0||n%4===0&&n%100!==0}function c1(n,a,i){return a>=0&&a<=11&&i>=1&&i<=(u1[a]||(hm(n)?29:28))}function d1(n,a){return a>=1&&a<=(hm(n)?366:365)}function f1(n,a,i){return a>=1&&a<=53&&i>=0&&i<=6}function m1(n,a,i){return n===24?a===0&&i===0:i>=0&&i<60&&a>=0&&a<60&&n>=0&&n<25}function p1(n,a){return a>=0&&a<=59}var h1={lessThanXSeconds:{one:"menos de um segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"meio minuto",lessThanXMinutes:{one:"menos de um minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"cerca de 1 hora",other:"cerca de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 dia",other:"{{count}} dias"},aboutXWeeks:{one:"cerca de 1 semana",other:"cerca de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"cerca de 1 mês",other:"cerca de {{count}} meses"},xMonths:{one:"1 mês",other:"{{count}} meses"},aboutXYears:{one:"cerca de 1 ano",other:"cerca de {{count}} anos"},xYears:{one:"1 ano",other:"{{count}} anos"},overXYears:{one:"mais de 1 ano",other:"mais de {{count}} anos"},almostXYears:{one:"quase 1 ano",other:"quase {{count}} anos"}},g1=function(a,i,u){var d,f=h1[a];return typeof f=="string"?d=f:i===1?d=f.one:d=f.other.replace("{{count}}",String(i)),u!=null&&u.addSuffix?u.comparison&&u.comparison>0?"em "+d:"há "+d:d},v1={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/yyyy"},y1={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},x1={full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},w1={date:kn({formats:v1,defaultWidth:"full"}),time:kn({formats:y1,defaultWidth:"full"}),dateTime:kn({formats:x1,defaultWidth:"full"})},j1={lastWeek:function(a){var i=a.getUTCDay(),u=i===0||i===6?"último":"última";return"'"+u+"' eeee 'às' p"},yesterday:"'ontem às' p",today:"'hoje às' p",tomorrow:"'amanhã às' p",nextWeek:"eeee 'às' p",other:"P"},N1=function(a,i,u,d){var f=j1[a];return typeof f=="function"?f(i):f},b1={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","depois de cristo"]},k1={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},S1={narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],wide:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},_1={narrow:["D","S","T","Q","Q","S","S"],short:["dom","seg","ter","qua","qui","sex","sab"],abbreviated:["domingo","segunda","terça","quarta","quinta","sexta","sábado"],wide:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"]},C1={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"}},E1={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"}},T1=function(a,i){var u=Number(a);return i?.unit==="week"?u+"ª":u+"º"},P1={ordinalNumber:T1,era:At({values:b1,defaultWidth:"wide"}),quarter:At({values:k1,defaultWidth:"wide",argumentCallback:function(a){return a-1}}),month:At({values:S1,defaultWidth:"wide"}),day:At({values:_1,defaultWidth:"wide"}),dayPeriod:At({values:C1,defaultWidth:"wide",formattingValues:E1,defaultFormattingWidth:"wide"})},D1=/^(\d+)[ºªo]?/i,M1=/\d+/i,O1={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|d\.?\s?c\.?)/i,wide:/^(antes de cristo|depois de cristo)/i},L1={any:[/^ac/i,/^dc/i],wide:[/^antes de cristo/i,/^depois de cristo/i]},R1={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},I1={any:[/1/i,/2/i,/3/i,/4/i]},z1={narrow:/^[jfmajsond]/i,abbreviated:/^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,wide:/^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i},$1={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^fev/i,/^mar/i,/^abr/i,/^mai/i,/^jun/i,/^jul/i,/^ago/i,/^set/i,/^out/i,/^nov/i,/^dez/i]},A1={narrow:/^(dom|[23456]ª?|s[aá]b)/i,short:/^(dom|[23456]ª?|s[aá]b)/i,abbreviated:/^(dom|seg|ter|qua|qui|sex|s[aá]b)/i,wide:/^(domingo|(segunda|ter[cç]a|quarta|quinta|sexta)([- ]feira)?|s[aá]bado)/i},U1={short:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],narrow:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],any:[/^d/i,/^seg/i,/^t/i,/^qua/i,/^qui/i,/^sex/i,/^s[aá]b/i]},F1={narrow:/^(a|p|mn|md|(da) (manhã|tarde|noite))/i,any:/^([ap]\.?\s?m\.?|meia[-\s]noite|meio[-\s]dia|(da) (manhã|tarde|noite))/i},H1={any:{am:/^a/i,pm:/^p/i,midnight:/^mn|^meia[-\s]noite/i,noon:/^md|^meio[-\s]dia/i,morning:/manhã/i,afternoon:/tarde/i,evening:/tarde/i,night:/noite/i}},B1={ordinalNumber:pm({matchPattern:D1,parsePattern:M1,valueCallback:function(a){return parseInt(a,10)}}),era:Ut({matchPatterns:O1,defaultMatchWidth:"wide",parsePatterns:L1,defaultParseWidth:"any"}),quarter:Ut({matchPatterns:R1,defaultMatchWidth:"wide",parsePatterns:I1,defaultParseWidth:"any",valueCallback:function(a){return a+1}}),month:Ut({matchPatterns:z1,defaultMatchWidth:"wide",parsePatterns:$1,defaultParseWidth:"any"}),day:Ut({matchPatterns:A1,defaultMatchWidth:"wide",parsePatterns:U1,defaultParseWidth:"any"}),dayPeriod:Ut({matchPatterns:F1,defaultMatchWidth:"any",parsePatterns:H1,defaultParseWidth:"any"})},kr={code:"pt-BR",formatDistance:g1,formatLong:w1,formatRelative:N1,localize:P1,match:B1,options:{weekStartsOn:0,firstWeekContainsDate:1}};const W1=()=>{const[n,a]=C.useState([]),[i,u]=C.useState(null),[d,f]=C.useState(!1),[m,v]=C.useState(1),[g,w]=C.useState({medicoId:"",data:"",horario:"",tipoConsulta:"primeira-vez",motivoConsulta:"",observacoes:""}),[h,y]=C.useState([]),N=Tr();C.useEffect(()=>{const R=localStorage.getItem("pacienteLogado");if(!R){N("/paciente");return}try{const A=JSON.parse(R);u(A),O()}catch(A){console.error("Erro ao carregar dados do paciente:",A),N("/paciente")}},[N]);const O=async()=>{try{const R=await Ae.entities.medicos.list({filter:{ativo:!0}});a(R.list||[])}catch(R){console.error("Erro ao carregar médicos:",R),ue.error("Erro ao carregar lista de médicos")}},$=async(R,A)=>{try{const Q=n.find(le=>le._id===R);if(!Q)return;const oe=new Date(A),fe=["domingo","segunda","terca","quarta","quinta","sexta","sabado"][oe.getDay()],ce=Q.horarioAtendimento[fe]||[],X=((await Ae.entities.consultas.list({filter:{medicoId:R,dataHora:{$regex:A.split("T")[0]}}})).list||[]).map(le=>new Date(le.dataHora).toTimeString().slice(0,5)),re=ce.filter(le=>!X.includes(le));y(re)}catch(Q){console.error("Erro ao buscar horários:",Q),ue.error("Erro ao carregar horários disponíveis")}},z=R=>{w(A=>({...A,medicoId:R,data:"",horario:""})),y([])},P=R=>{w(A=>({...A,data:R,horario:""})),g.medicoId&&R&&$(g.medicoId,R)},W=async()=>{if(i)try{f(!0);const R=new Date(`${g.data}T${g.horario}:00.000Z`);await Ae.entities.consultas.create({pacienteId:i._id,medicoId:g.medicoId,dataHora:R.toISOString(),status:"agendada",tipoConsulta:g.tipoConsulta,motivoConsulta:g.motivoConsulta,observacoes:g.observacoes,lembrete:!1,criadoPor:"paciente",criadoEm:new Date().toISOString(),atualizadoEm:new Date().toISOString()}),ue.success("Consulta agendada com sucesso!"),v(4)}catch(R){console.error("Erro ao agendar consulta:",R),ue.error("Erro ao agendar consulta. Tente novamente.")}finally{f(!1)}},_=()=>{w({medicoId:"",data:"",horario:"",tipoConsulta:"primeira-vez",motivoConsulta:"",observacoes:""}),y([]),v(1)},k=()=>{localStorage.removeItem("pacienteLogado"),N("/paciente")},j=()=>{const R=[];for(let A=1;A<=7;A++){const Q=Vl(new Date,A);R.push({valor:at(Q,"yyyy-MM-dd"),label:at(Q,"EEEE, dd/MM",{locale:kr})})}return R},D=n.find(R=>R._id===g.medicoId);return i?m===4?s.jsx("div",{className:"max-w-2xl mx-auto",children:s.jsxs("div",{className:"bg-white rounded-lg shadow-md p-8 text-center",children:[s.jsx(ts,{className:"w-16 h-16 text-green-500 mx-auto mb-4"}),s.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-4",children:"Consulta Agendada com Sucesso!"}),s.jsxs("div",{className:"bg-gray-50 rounded-lg p-6 mb-6 text-left",children:[s.jsx("h3",{className:"font-semibold mb-3",children:"Detalhes do Agendamento:"}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("p",{children:[s.jsx("strong",{children:"Paciente:"})," ",i.nome]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Médico:"})," ",D?.nome]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Especialidade:"})," ",D?.especialidade]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Data:"})," ",at(new Date(g.data),"dd/MM/yyyy",{locale:kr})]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Horário:"})," ",g.horario]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Tipo:"})," ",g.tipoConsulta]}),g.motivoConsulta&&s.jsxs("p",{children:[s.jsx("strong",{children:"Motivo:"})," ",g.motivoConsulta]})]})]}),s.jsx("button",{onClick:_,className:"btn-primary",children:"Fazer Novo Agendamento"})]})}):s.jsxs("div",{className:"max-w-4xl mx-auto",children:[s.jsx("div",{className:"bg-gradient-to-r from-blue-700 to-blue-400 rounded-lg p-6 mb-8 text-white",children:s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("div",{children:[s.jsxs("h1",{className:"text-2xl font-bold",children:["Bem-vindo(a), ",i.nome,"!"]}),s.jsx("p",{className:"opacity-90",children:"Agende sua consulta médica"})]}),s.jsxs("button",{onClick:k,className:"flex items-center space-x-2 bg-white/20 hover:bg-white/30 px-4 py-2 rounded-lg transition-colors",children:[s.jsx(Zf,{className:"w-4 h-4"}),s.jsx("span",{children:"Sair"})]})]})}),s.jsx("div",{className:"flex items-center justify-center mb-8",children:[1,2,3].map(R=>s.jsxs(ke.Fragment,{children:[s.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center ${m>=R?"bg-blue-600 text-white":"bg-gray-300 text-gray-600"}`,children:R}),R<3&&s.jsx("div",{className:`w-16 h-1 ${m>R?"bg-blue-600":"bg-gray-300"}`})]},R))}),s.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[m===1&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("h2",{className:"text-xl font-semibold flex items-center",children:[s.jsx(Sn,{className:"w-5 h-5 mr-2"}),"Selecione o Médico"]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Médico/Especialidade"}),s.jsxs("select",{value:g.medicoId,onChange:R=>z(R.target.value),className:"form-input",required:!0,children:[s.jsx("option",{value:"",children:"Selecione um médico"}),n.map(R=>s.jsxs("option",{value:R._id,children:[R.nome," - ",R.especialidade," (R$ ",R.valorConsulta,")"]},R._id))]})]}),s.jsx("div",{className:"flex justify-end",children:s.jsx("button",{onClick:()=>v(2),disabled:!g.medicoId,className:"btn-primary disabled:opacity-50 disabled:cursor-not-allowed",children:"Próximo"})})]}),m===2&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("h2",{className:"text-xl font-semibold flex items-center",children:[s.jsx(_r,{className:"w-5 h-5 mr-2"}),"Selecione Data e Horário"]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Data da Consulta"}),s.jsxs("select",{value:g.data,onChange:R=>P(R.target.value),className:"form-input",required:!0,children:[s.jsx("option",{value:"",children:"Selecione uma data"}),j().map(R=>s.jsx("option",{value:R.valor,children:R.label},R.valor))]})]}),g.data&&s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Horário Disponível"}),h.length>0?s.jsx("div",{className:"grid grid-cols-3 md:grid-cols-4 gap-3",children:h.map(R=>s.jsx("button",{onClick:()=>w(A=>({...A,horario:R})),className:`p-3 border rounded-lg text-center transition-colors ${g.horario===R?"bg-blue-600 text-white border-blue-600":"bg-white text-gray-700 border-gray-300 hover:border-blue-300"}`,children:R},R))}):s.jsx("p",{className:"text-gray-500 text-center py-4",children:"Nenhum horário disponível para esta data"})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("button",{onClick:()=>v(1),className:"btn-secondary",children:"Voltar"}),s.jsx("button",{onClick:()=>v(3),disabled:!g.data||!g.horario,className:"btn-primary disabled:opacity-50 disabled:cursor-not-allowed",children:"Próximo"})]})]}),m===3&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("h2",{className:"text-xl font-semibold flex items-center",children:[s.jsx(cs,{className:"w-5 h-5 mr-2"}),"Informações da Consulta"]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Tipo de Consulta"}),s.jsxs("select",{value:g.tipoConsulta,onChange:R=>w(A=>({...A,tipoConsulta:R.target.value})),className:"form-input",children:[s.jsx("option",{value:"primeira-vez",children:"Primeira Consulta"}),s.jsx("option",{value:"retorno",children:"Retorno"}),s.jsx("option",{value:"urgencia",children:"Urgência"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Motivo da Consulta"}),s.jsx("textarea",{value:g.motivoConsulta,onChange:R=>w(A=>({...A,motivoConsulta:R.target.value})),className:"form-input",rows:3,placeholder:"Descreva brevemente o motivo da consulta"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Observações (opcional)"}),s.jsx("textarea",{value:g.observacoes,onChange:R=>w(A=>({...A,observacoes:R.target.value})),className:"form-input",rows:2,placeholder:"Informações adicionais relevantes"})]}),s.jsxs("div",{className:"bg-gray-50 rounded-lg p-4",children:[s.jsx("h3",{className:"font-semibold mb-3",children:"Resumo do Agendamento:"}),s.jsxs("div",{className:"space-y-1 text-sm",children:[s.jsxs("p",{children:[s.jsx("strong",{children:"Paciente:"})," ",i.nome]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Médico:"})," ",D?.nome]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Data:"})," ",at(new Date(g.data),"dd/MM/yyyy",{locale:kr})]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Horário:"})," ",g.horario]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Valor:"})," R$ ",D?.valorConsulta]})]})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("button",{onClick:()=>v(2),className:"btn-secondary",children:"Voltar"}),s.jsx("button",{onClick:W,disabled:d,className:"btn-primary disabled:opacity-50 disabled:cursor-not-allowed",children:d?"Agendando...":"Confirmar Agendamento"})]})]})]})]}):s.jsx("div",{className:"flex justify-center items-center min-h-screen",children:s.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})})},V1=()=>{const[n,a]=C.useState([]),[i,u]=C.useState([]),[d,f]=C.useState(null),[m,v]=C.useState(!0),[g,w]=C.useState("todas"),[h,y]=C.useState("todos"),[N,O]=C.useState(null),[$,z]=C.useState(!1),P=Tr();C.useEffect(()=>{const X=localStorage.getItem("pacienteLogado");if(!X){P("/paciente");return}try{const re=JSON.parse(X);f(re),W(re._id),_()}catch(re){console.error("Erro ao carregar dados do paciente:",re),P("/paciente")}},[P]);const W=async X=>{try{const re=await Ae.entities.consultas.list({filter:{pacienteId:X},sort:{dataHora:-1}});a(re.list||[])}catch(re){console.error("Erro ao carregar consultas:",re),ue.error("Erro ao carregar suas consultas")}finally{v(!1)}},_=async()=>{try{const X=await Ae.entities.medicos.list({});u(X.list||[])}catch(X){console.error("Erro ao carregar médicos:",X)}},k=X=>{const re=i.find(le=>le._id===X);return re?re.nome:"Médico não encontrado"},j=X=>{const re=i.find(le=>le._id===X);return re?re.especialidade:""},D=X=>{switch(X){case"agendada":return"bg-blue-100 text-blue-800";case"confirmada":return"bg-green-100 text-green-800";case"realizada":return"bg-gray-100 text-gray-800";case"cancelada":return"bg-red-100 text-red-800";case"faltou":return"bg-orange-100 text-orange-800";default:return"bg-gray-100 text-gray-800"}},R=X=>{switch(X){case"agendada":return s.jsx(bn,{className:"w-4 h-4"});case"confirmada":return s.jsx(ts,{className:"w-4 h-4"});case"realizada":return s.jsx(ts,{className:"w-4 h-4"});case"cancelada":return s.jsx(of,{className:"w-4 h-4"});case"faltou":return s.jsx(Jf,{className:"w-4 h-4"});default:return s.jsx(bn,{className:"w-4 h-4"})}},A=X=>{switch(X){case"agendada":return"Agendada";case"confirmada":return"Confirmada";case"realizada":return"Realizada";case"cancelada":return"Cancelada";case"faltou":return"Faltou";default:return X}},Q=()=>{let X=[...n];g!=="todas"&&(X=X.filter(le=>le.status===g));const re=new Date;switch(h){case"proximas":X=X.filter(E=>Tf(new Date(E.dataHora),re)&&(E.status==="agendada"||E.status==="confirmada"));break;case"hoje":X=X.filter(E=>Dl(new Date(E.dataHora)));break;case"semana":const le=Vl(re,7);X=X.filter(E=>Tf(new Date(E.dataHora),re)&&Pf(new Date(E.dataHora),le));break;case"historico":X=X.filter(E=>Pf(new Date(E.dataHora),re));break}return X},oe=X=>{O(X),z(!0)},fe=()=>{O(null),z(!1)},ce=()=>{P("/agendamento")},ie=()=>{localStorage.removeItem("pacienteLogado"),P("/paciente")};if(!d)return s.jsx("div",{className:"flex justify-center items-center min-h-screen",children:s.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})});const pe=Q();return s.jsxs("div",{className:"max-w-6xl mx-auto",children:[s.jsx("div",{className:"bg-gradient-to-r from-blue-700 to-blue-400 rounded-lg p-6 mb-8 text-white",children:s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("div",{children:[s.jsxs("h1",{className:"text-2xl font-bold",children:["Olá, ",d.nome,"!"]}),s.jsx("p",{className:"opacity-90",children:"Acompanhe suas consultas e exames"})]}),s.jsxs("div",{className:"flex space-x-4",children:[s.jsx("button",{onClick:ce,className:"bg-white/20 hover:bg-white/30 px-4 py-2 rounded-lg transition-colors",children:"Nova Consulta"}),s.jsxs("button",{onClick:ie,className:"flex items-center space-x-2 bg-white/20 hover:bg-white/30 px-4 py-2 rounded-lg transition-colors",children:[s.jsx(Zf,{className:"w-4 h-4"}),s.jsx("span",{children:"Sair"})]})]})]})}),s.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6 mb-6",children:[s.jsxs("div",{className:"flex items-center space-x-4 mb-4",children:[s.jsx(Ig,{className:"w-5 h-5 text-gray-600"}),s.jsx("h2",{className:"text-lg font-semibold",children:"Filtros"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Status"}),s.jsxs("select",{value:g,onChange:X=>w(X.target.value),className:"form-input",children:[s.jsx("option",{value:"todas",children:"Todas"}),s.jsx("option",{value:"agendada",children:"Agendadas"}),s.jsx("option",{value:"confirmada",children:"Confirmadas"}),s.jsx("option",{value:"realizada",children:"Realizadas"}),s.jsx("option",{value:"cancelada",children:"Canceladas"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Período"}),s.jsxs("select",{value:h,onChange:X=>y(X.target.value),className:"form-input",children:[s.jsx("option",{value:"todos",children:"Todos"}),s.jsx("option",{value:"proximas",children:"Próximas"}),s.jsx("option",{value:"hoje",children:"Hoje"}),s.jsx("option",{value:"semana",children:"Próximos 7 dias"}),s.jsx("option",{value:"historico",children:"Histórico"})]})]})]})]}),s.jsxs("div",{className:"bg-white rounded-lg shadow-md",children:[s.jsx("div",{className:"p-6 border-b border-gray-200",children:s.jsxs("h2",{className:"text-xl font-semibold",children:["Suas Consultas (",pe.length,")"]})}),m?s.jsx("div",{className:"flex justify-center items-center p-8",children:s.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})}):pe.length===0?s.jsxs("div",{className:"text-center p-8",children:[s.jsx(_r,{className:"w-16 h-16 text-gray-300 mx-auto mb-4"}),s.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"Nenhuma consulta encontrada"}),s.jsx("p",{className:"text-gray-500 mb-4",children:g!=="todas"||h!=="todos"?"Tente ajustar os filtros para ver mais consultas.":"Você ainda não tem consultas agendadas."}),s.jsx("button",{onClick:ce,className:"btn-primary",children:"Agendar Primeira Consulta"})]}):s.jsx("div",{className:"divide-y divide-gray-200",children:pe.map(X=>s.jsx("div",{className:"p-6 hover:bg-gray-50 transition-colors",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center space-x-4 mb-2",children:[s.jsxs("span",{className:`inline-flex items-center space-x-1 px-2.5 py-0.5 rounded-full text-xs font-medium ${D(X.status)}`,children:[R(X.status),s.jsx("span",{children:A(X.status)})]}),s.jsx("span",{className:"text-sm text-gray-500",children:X.tipoConsulta})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(Sn,{className:"w-4 h-4 text-gray-400"}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-gray-900",children:k(X.medicoId)}),s.jsx("p",{className:"text-sm text-gray-500",children:j(X.medicoId)})]})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(_r,{className:"w-4 h-4 text-gray-400"}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-gray-900",children:at(new Date(X.dataHora),"dd/MM/yyyy",{locale:kr})}),s.jsx("p",{className:"text-sm text-gray-500",children:at(new Date(X.dataHora),"EEEE",{locale:kr})})]})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(bn,{className:"w-4 h-4 text-gray-400"}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-gray-900",children:at(new Date(X.dataHora),"HH:mm")}),s.jsx("p",{className:"text-sm text-gray-500",children:X.motivoConsulta||"Consulta de rotina"})]})]})]})]}),s.jsx("button",{onClick:()=>oe(X),className:"ml-4 p-2 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-lg transition-colors",children:s.jsx(Og,{className:"w-5 h-5"})})]})},X._id))})]}),$&&N&&s.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50",children:s.jsxs("div",{className:"bg-white rounded-lg max-w-2xl w-full max-h-[90vh] overflow-y-auto",children:[s.jsx("div",{className:"p-6 border-b border-gray-200",children:s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("h3",{className:"text-lg font-semibold",children:"Detalhes da Consulta"}),s.jsx("button",{onClick:fe,className:"p-2 hover:bg-gray-100 rounded-lg transition-colors",children:s.jsx(of,{className:"w-5 h-5"})})]})}),s.jsxs("div",{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold mb-3",children:"Informações da Consulta"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 text-sm",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-gray-500",children:"Médico:"}),s.jsx("p",{className:"font-medium",children:k(N.medicoId)})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-gray-500",children:"Especialidade:"}),s.jsx("p",{className:"font-medium",children:j(N.medicoId)})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-gray-500",children:"Data:"}),s.jsx("p",{className:"font-medium",children:at(new Date(N.dataHora),"dd/MM/yyyy - HH:mm",{locale:kr})})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-gray-500",children:"Status:"}),s.jsxs("span",{className:`inline-flex items-center space-x-1 px-2.5 py-0.5 rounded-full text-xs font-medium ${D(N.status)}`,children:[R(N.status),s.jsx("span",{children:A(N.status)})]})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-gray-500",children:"Tipo:"}),s.jsx("p",{className:"font-medium",children:N.tipoConsulta})]})]})]}),N.motivoConsulta&&s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold mb-2",children:"Motivo da Consulta"}),s.jsx("p",{className:"text-gray-700 bg-gray-50 p-3 rounded-lg",children:N.motivoConsulta})]}),N.observacoes&&s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold mb-2",children:"Observações"}),s.jsx("p",{className:"text-gray-700 bg-gray-50 p-3 rounded-lg",children:N.observacoes})]}),N.status==="realizada"&&N.resultados&&s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold mb-2",children:"Resultados da Consulta"}),s.jsx("p",{className:"text-gray-700 bg-green-50 p-3 rounded-lg border-l-4 border-green-400",children:N.resultados})]}),N.prescricoes&&s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold mb-2",children:"Prescrições Médicas"}),s.jsx("p",{className:"text-gray-700 bg-blue-50 p-3 rounded-lg border-l-4 border-blue-400",children:N.prescricoes})]}),N.proximaConsulta&&s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold mb-2",children:"Próxima Consulta Recomendada"}),s.jsx("p",{className:"text-gray-700 bg-yellow-50 p-3 rounded-lg border-l-4 border-yellow-400",children:N.proximaConsulta})]}),s.jsxs("div",{className:"text-xs text-gray-500 pt-4 border-t",children:["Agendado em: ",at(new Date(N.criadoEm),"dd/MM/yyyy às HH:mm",{locale:kr})]})]})]})})]})},q1=()=>{const[n,a]=C.useState([]),[i,u]=C.useState(!0),[d,f]=C.useState(""),[m,v]=C.useState(!1),[g,w]=C.useState(null),[h,y]=C.useState({nome:"",cpf:"",telefone:"",email:"",dataNascimento:"",altura:"",peso:"",endereco:{rua:"",numero:"",bairro:"",cidade:"",cep:""},convenio:"",numeroCarteirinha:"",observacoes:""});C.useEffect(()=>{N()},[]);const N=async()=>{try{u(!0);const j=await Ae.entities.pacientes.list({filter:{ativo:!0},sort:{nome:1}});a(j.list||[])}catch(j){console.error("Erro ao carregar pacientes:",j),ue.error("Erro ao carregar lista de pacientes")}finally{u(!1)}},O=(j,D)=>{if(!j||!D)return null;const R=j/100;return(D/(R*R)).toFixed(1)},$=j=>j<18.5?{status:"Abaixo do peso",color:"text-blue-600"}:j<25?{status:"Peso normal",color:"text-green-600"}:j<30?{status:"Sobrepeso",color:"text-yellow-600"}:{status:"Obesidade",color:"text-red-600"},z=async j=>{j.preventDefault();try{u(!0);const D={...h,altura:h.altura?parseFloat(h.altura):void 0,peso:h.peso?parseFloat(h.peso):void 0,ativo:!0,criadoPor:"secretaria",criadoEm:new Date().toISOString(),atualizadoEm:new Date().toISOString()};g?(await Ae.entities.pacientes.update(g._id,{...D,atualizadoEm:new Date().toISOString()}),ue.success("Paciente atualizado com sucesso!")):(await Ae.entities.pacientes.create(D),ue.success("Paciente cadastrado com sucesso!")),P(),N()}catch(D){console.error("Erro ao salvar paciente:",D),ue.error("Erro ao salvar paciente. Tente novamente.")}finally{u(!1)}},P=()=>{y({nome:"",cpf:"",telefone:"",email:"",dataNascimento:"",altura:"",peso:"",endereco:{rua:"",numero:"",bairro:"",cidade:"",cep:""},convenio:"",numeroCarteirinha:"",observacoes:""}),w(null),v(!1)},W=j=>{y({nome:j.nome||"",cpf:j.cpf||"",telefone:j.telefone||"",email:j.email||"",dataNascimento:j.dataNascimento?j.dataNascimento.split("T")[0]:"",altura:j.altura?.toString()||"",peso:j.peso?.toString()||"",endereco:{rua:j.endereco?.rua||"",numero:j.endereco?.numero||"",bairro:j.endereco?.bairro||"",cidade:j.endereco?.cidade||"",cep:j.endereco?.cep||""},convenio:j.convenio||"",numeroCarteirinha:j.numeroCarteirinha||"",observacoes:j.observacoes||""}),w(j),v(!0)},_=async j=>{if(window.confirm("Tem certeza que deseja excluir este paciente?"))try{await Ae.entities.pacientes.update(j,{ativo:!1,atualizadoEm:new Date().toISOString()}),ue.success("Paciente removido com sucesso!"),N()}catch(D){console.error("Erro ao remover paciente:",D),ue.error("Erro ao remover paciente")}},k=n.filter(j=>(j.nome||"").toLowerCase().includes(d.toLowerCase())||(j.cpf||"").includes(d)||(j.telefone||"").includes(d));return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:"Cadastro de Pacientes"}),s.jsx("p",{className:"text-gray-600",children:"Gerencie o cadastro de pacientes da clínica"})]}),s.jsxs("button",{onClick:()=>v(!0),className:"btn-primary mt-4 md:mt-0",children:[s.jsx(rs,{className:"w-5 h-5 mr-2"}),"Novo Paciente"]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-6",children:[s.jsx("div",{className:"bg-white rounded-lg shadow-md p-6",children:s.jsxs("div",{className:"flex items-center",children:[s.jsx("div",{className:"p-3 bg-gradient-to-l from-blue-700 to-blue-400 rounded-full",children:s.jsx(qr,{className:"w-6 h-6 text-white"})}),s.jsxs("div",{className:"ml-4",children:[s.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Total de Pacientes"}),s.jsx("p",{className:"text-2xl font-bold text-gray-900",children:n.length})]})]})}),s.jsx("div",{className:"bg-white rounded-lg shadow-md p-6",children:s.jsxs("div",{className:"flex items-center",children:[s.jsx("div",{className:"p-3 bg-green-100 rounded-full",children:s.jsx(cs,{className:"w-6 h-6 text-green-600"})}),s.jsxs("div",{className:"ml-4",children:[s.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Com Convênio"}),s.jsx("p",{className:"text-2xl font-bold text-gray-900",children:n.filter(j=>j.convenio&&j.convenio!=="Particular").length})]})]})}),s.jsx("div",{className:"bg-white rounded-lg shadow-md p-6",children:s.jsxs("div",{className:"flex items-center",children:[s.jsx("div",{className:"p-3 bg-purple-100 rounded-full",children:s.jsx(rs,{className:"w-6 h-6 text-purple-600"})}),s.jsxs("div",{className:"ml-4",children:[s.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Cadastros Hoje"}),s.jsx("p",{className:"text-2xl font-bold text-gray-900",children:n.filter(j=>{const D=new Date().toISOString().split("T")[0];return j.criadoEm?.startsWith(D)}).length})]})]})}),s.jsx("div",{className:"bg-white rounded-lg shadow-md p-6",children:s.jsxs("div",{className:"flex items-center",children:[s.jsx("div",{className:"p-3 bg-orange-100 rounded-full",children:s.jsx(bl,{className:"w-6 h-6 text-orange-600"})}),s.jsxs("div",{className:"ml-4",children:[s.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Com Dados Físicos"}),s.jsx("p",{className:"text-2xl font-bold text-gray-900",children:n.filter(j=>j.altura&&j.peso).length})]})]})})]}),s.jsx("div",{className:"bg-white rounded-lg shadow-md p-6",children:s.jsxs("div",{className:"relative",children:[s.jsx(Wo,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 w-5 h-5"}),s.jsx("input",{type:"text",placeholder:"Buscar por nome, CPF ou telefone...",value:d,onChange:j=>f(j.target.value),className:"pl-10 form-input"})]})}),i?s.jsx("div",{className:"flex justify-center py-12",children:s.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})}):s.jsx("div",{className:"bg-white rounded-lg shadow-md overflow-hidden",children:s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[s.jsx("thead",{className:"bg-gradient-to-l from-blue-700 to-blue-400",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-white uppercase tracking-wider",children:"Paciente"}),s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-white uppercase tracking-wider",children:"Contato"}),s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-white uppercase tracking-wider",children:"Dados Físicos"}),s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-white uppercase tracking-wider",children:"Convênio"}),s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-white uppercase tracking-wider",children:"Ações"})]})}),s.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:k.map(j=>{const D=O(j.altura,j.peso),R=D?$(parseFloat(D)):null;return s.jsxs("tr",{className:"hover:bg-gray-50",children:[s.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-medium text-gray-900",children:j.nome||"Nome não informado"}),s.jsxs("div",{className:"text-sm text-gray-500",children:["CPF: ",j.cpf||"Não informado"]}),s.jsxs("div",{className:"text-sm text-gray-500",children:["Nascimento: ",j.dataNascimento?at(new Date(j.dataNascimento),"dd/MM/yyyy"):"Não informado"]})]})}),s.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:s.jsxs("div",{className:"space-y-1",children:[s.jsxs("div",{className:"flex items-center text-sm text-gray-900",children:[s.jsx(Bl,{className:"w-4 h-4 mr-2 text-gray-400"}),j.telefone||"Não informado"]}),s.jsxs("div",{className:"flex items-center text-sm text-gray-900",children:[s.jsx(ba,{className:"w-4 h-4 mr-2 text-gray-400"}),j.email||"Não informado"]}),s.jsxs("div",{className:"flex items-center text-sm text-gray-500",children:[s.jsx(Hg,{className:"w-4 h-4 mr-2 text-gray-400"}),j.endereco?.cidade||"Cidade não informada"]})]})}),s.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:s.jsxs("div",{className:"space-y-1",children:[j.altura&&s.jsxs("div",{className:"text-sm text-gray-900",children:["Altura: ",j.altura," cm"]}),j.peso&&s.jsxs("div",{className:"text-sm text-gray-900",children:["Peso: ",j.peso," kg"]}),D&&R&&s.jsxs("div",{className:"text-sm",children:[s.jsx("span",{className:"text-gray-600",children:"IMC: "}),s.jsxs("span",{className:`font-medium ${R.color}`,children:[D," (",R.status,")"]})]}),!j.altura&&!j.peso&&s.jsx("div",{className:"text-sm text-gray-400",children:"Dados não informados"})]})}),s.jsxs("td",{className:"px-6 py-4 whitespace-nowrap",children:[s.jsx("div",{className:"text-sm text-gray-900",children:j.convenio||"Não informado"}),j.numeroCarteirinha&&s.jsxs("div",{className:"text-sm text-gray-500",children:["Carteirinha: ",j.numeroCarteirinha]})]}),s.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium",children:s.jsxs("div",{className:"flex space-x-2",children:[s.jsx("button",{onClick:()=>W(j),className:"text-blue-600 hover:text-blue-900",children:s.jsx(Xg,{className:"w-4 h-4"})}),s.jsx("button",{onClick:()=>_(j._id),className:"text-red-600 hover:text-red-900",children:s.jsx(em,{className:"w-4 h-4"})})]})})]},j._id)})})]})})}),m&&s.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 p-4",children:s.jsx("div",{className:"bg-white rounded-lg max-w-2xl w-full max-h-[90vh] overflow-y-auto",children:s.jsxs("div",{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-semibold mb-6",children:g?"Editar Paciente":"Novo Paciente"}),s.jsxs("form",{onSubmit:z,className:"space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Nome Completo"}),s.jsx("input",{type:"text",value:h.nome,onChange:j=>y({...h,nome:j.target.value}),className:"form-input",required:!0})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"CPF"}),s.jsx("input",{type:"text",value:h.cpf,onChange:j=>y({...h,cpf:j.target.value}),className:"form-input",required:!0})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Telefone"}),s.jsx("input",{type:"tel",value:h.telefone,onChange:j=>y({...h,telefone:j.target.value}),className:"form-input",required:!0})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Email"}),s.jsx("input",{type:"email",value:h.email,onChange:j=>y({...h,email:j.target.value}),className:"form-input",required:!0})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Data de Nascimento"}),s.jsx("input",{type:"date",value:h.dataNascimento,onChange:j=>y({...h,dataNascimento:j.target.value}),className:"form-input",required:!0})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Altura (cm)"}),s.jsx("input",{type:"number",min:"50",max:"250",step:"0.1",value:h.altura,onChange:j=>y({...h,altura:j.target.value}),className:"form-input",placeholder:"Ex: 170"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Peso (kg)"}),s.jsx("input",{type:"number",min:"10",max:"300",step:"0.1",value:h.peso,onChange:j=>y({...h,peso:j.target.value}),className:"form-input",placeholder:"Ex: 70.5"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"CEP"}),s.jsx("input",{type:"text",value:h.endereco.cep,onChange:j=>y({...h,endereco:{...h.endereco,cep:j.target.value}}),className:"form-input"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Rua"}),s.jsx("input",{type:"text",value:h.endereco.rua,onChange:j=>y({...h,endereco:{...h.endereco,rua:j.target.value}}),className:"form-input"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Número"}),s.jsx("input",{type:"text",value:h.endereco.numero,onChange:j=>y({...h,endereco:{...h.endereco,numero:j.target.value}}),className:"form-input"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Bairro"}),s.jsx("input",{type:"text",value:h.endereco.bairro,onChange:j=>y({...h,endereco:{...h.endereco,bairro:j.target.value}}),className:"form-input"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Cidade"}),s.jsx("input",{type:"text",value:h.endereco.cidade,onChange:j=>y({...h,endereco:{...h.endereco,cidade:j.target.value}}),className:"form-input"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Convênio"}),s.jsxs("select",{value:h.convenio,onChange:j=>y({...h,convenio:j.target.value}),className:"form-input",children:[s.jsx("option",{value:"",children:"Selecione"}),s.jsx("option",{value:"Particular",children:"Particular"}),s.jsx("option",{value:"Unimed",children:"Unimed"}),s.jsx("option",{value:"SulAmérica",children:"SulAmérica"}),s.jsx("option",{value:"Bradesco Saúde",children:"Bradesco Saúde"}),s.jsx("option",{value:"Amil",children:"Amil"}),s.jsx("option",{value:"NotreDame",children:"NotreDame"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Número da Carteirinha"}),s.jsx("input",{type:"text",value:h.numeroCarteirinha,onChange:j=>y({...h,numeroCarteirinha:j.target.value}),className:"form-input"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Observações"}),s.jsx("textarea",{value:h.observacoes,onChange:j=>y({...h,observacoes:j.target.value}),className:"form-input",rows:3})]}),s.jsxs("div",{className:"flex justify-end space-x-3 pt-4",children:[s.jsx("button",{type:"button",onClick:P,className:"btn-secondary",children:"Cancelar"}),s.jsx("button",{type:"submit",disabled:i,className:"btn-primary disabled:opacity-50",children:i?"Salvando...":g?"Atualizar":"Cadastrar"})]})]})]})})})]})},Q1=()=>{const[n,a]=C.useState([]),[i,u]=C.useState({}),[d,f]=C.useState([]),[m,v]=C.useState(""),[g,w]=C.useState("hoje"),[h,y]=C.useState(!0),[N,O]=C.useState(null);C.useEffect(()=>{$()},[]),C.useEffect(()=>{m&&z()},[m,g]);const $=async()=>{try{const D=await Ae.entities.medicos.list({filter:{ativo:!0}});f(D.list||[]),D.list&&D.list.length>0&&v(D.list[0]._id)}catch(D){console.error("Erro ao carregar médicos:",D),ue.error("Erro ao carregar lista de médicos")}},z=async()=>{try{y(!0);let D={};const R=new Date,A=new Date(R);if(A.setDate(R.getDate()+1),g==="hoje")D={dataHora:{$regex:at(R,"yyyy-MM-dd")}};else if(g==="amanha")D={dataHora:{$regex:at(A,"yyyy-MM-dd")}};else if(g==="semana"){const ie=new Date(R);ie.setDate(R.getDate()-R.getDay());const pe=new Date(ie);pe.setDate(ie.getDate()+6),D={dataHora:{$gte:ie.toISOString(),$lte:pe.toISOString()}}}const oe=(await Ae.entities.consultas.list({filter:{medicoId:m,...D},sort:{dataHora:1}})).list||[];a(oe);const fe=[...new Set(oe.map(ie=>ie.pacienteId))],ce={};for(const ie of fe)try{const pe=await Ae.entities.pacientes.get(ie);pe&&(ce[ie]=pe)}catch(pe){console.error(`Erro ao carregar paciente ${ie}:`,pe)}u(ce)}catch(D){console.error("Erro ao carregar consultas:",D),ue.error("Erro ao carregar consultas")}finally{y(!1)}},P=async(D,R)=>{try{await Ae.entities.consultas.update(D,{status:R,atualizadoEm:new Date().toISOString()}),a(A=>A.map(Q=>Q._id===D?{...Q,status:R}:Q)),ue.success("Status da consulta atualizado")}catch(A){console.error("Erro ao atualizar status:",A),ue.error("Erro ao atualizar status da consulta")}},W=async(D,R)=>{try{await Ae.entities.consultas.update(D,{observacoes:R,atualizadoEm:new Date().toISOString()}),a(A=>A.map(Q=>Q._id===D?{...Q,observacoes:R}:Q)),ue.success("Observação adicionada"),O(null)}catch(A){console.error("Erro ao adicionar observação:",A),ue.error("Erro ao adicionar observação")}},_=D=>({agendada:"bg-yellow-100 text-yellow-800",confirmada:"bg-gradient-to-l from-blue-700 to-blue-400 text-white",realizada:"bg-green-100 text-green-800",cancelada:"bg-red-100 text-red-800",faltou:"bg-gray-100 text-gray-800"})[D]||"bg-gray-100 text-gray-800",k=D=>{const R=Df(D);return Dl(R)?`Hoje, ${at(R,"HH:mm")}`:Zx(R)?`Amanhã, ${at(R,"HH:mm")}`:at(R,"dd/MM/yyyy, HH:mm",{locale:kr})},j=d.find(D=>D._id===m);return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:"Painel do Médico"}),s.jsx("p",{className:"text-gray-600",children:"Gerencie suas consultas e agenda"})]}),s.jsxs("div",{className:"flex flex-col md:flex-row gap-4 mt-4 md:mt-0",children:[s.jsxs("select",{value:m,onChange:D=>v(D.target.value),className:"form-input",children:[s.jsx("option",{value:"",children:"Selecione um médico"}),d.map(D=>s.jsxs("option",{value:D._id,children:[D.nome," - ",D.especialidade]},D._id))]}),s.jsxs("select",{value:g,onChange:D=>w(D.target.value),className:"form-input",children:[s.jsx("option",{value:"hoje",children:"Hoje"}),s.jsx("option",{value:"amanha",children:"Amanhã"}),s.jsx("option",{value:"semana",children:"Esta Semana"}),s.jsx("option",{value:"todas",children:"Todas"})]})]})]}),j&&s.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[s.jsxs("h2",{className:"text-xl font-semibold mb-4",children:["Dr(a). ",j.nome," - ",j.especialidade]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsx("div",{className:"bg-gradient-to-l from-blue-600 to-blue-400 rounded-lg p-4 text-white",children:s.jsxs("div",{className:"flex items-center",children:[s.jsx(_r,{className:"w-6 h-6 mr-2"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm opacity-90",children:"Consultas Hoje"}),s.jsx("p",{className:"text-2xl font-bold",children:n.filter(D=>Dl(Df(D.dataHora))).length})]})]})}),s.jsx("div",{className:"bg-green-50 rounded-lg p-4",children:s.jsxs("div",{className:"flex items-center",children:[s.jsx(ts,{className:"w-6 h-6 text-green-600 mr-2"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-gray-600",children:"Realizadas"}),s.jsx("p",{className:"text-2xl font-bold text-green-600",children:n.filter(D=>D.status==="realizada").length})]})]})}),s.jsx("div",{className:"bg-yellow-50 rounded-lg p-4",children:s.jsxs("div",{className:"flex items-center",children:[s.jsx(bn,{className:"w-6 h-6 text-yellow-600 mr-2"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-gray-600",children:"Pendentes"}),s.jsx("p",{className:"text-2xl font-bold text-yellow-600",children:n.filter(D=>D.status==="agendada"||D.status==="confirmada").length})]})]})})]})]}),h?s.jsx("div",{className:"flex justify-center py-12",children:s.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})}):n.length>0?s.jsx("div",{className:"space-y-4",children:n.map(D=>{const R=i[D.pacienteId];return s.jsx("div",{className:"bg-white rounded-lg shadow-md p-6",children:s.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between",children:[s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center space-x-4 mb-3",children:[s.jsx("h3",{className:"text-lg font-semibold",children:R?.nome||"Paciente não encontrado"}),s.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${_(D.status)}`,children:D.status})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 text-sm text-gray-600",children:[s.jsxs("div",{className:"flex items-center",children:[s.jsx(bn,{className:"w-4 h-4 mr-2"}),k(D.dataHora)]}),R?.telefone&&s.jsxs("div",{className:"flex items-center",children:[s.jsx(Bl,{className:"w-4 h-4 mr-2"}),R.telefone]}),s.jsxs("div",{className:"flex items-center",children:[s.jsx(Sn,{className:"w-4 h-4 mr-2"}),D.tipoConsulta]}),R?.convenio&&s.jsxs("div",{className:"flex items-center",children:[s.jsx(cs,{className:"w-4 h-4 mr-2"}),R.convenio]})]}),D.motivoConsulta&&s.jsx("div",{className:"mt-3",children:s.jsxs("p",{className:"text-sm text-gray-700",children:[s.jsx("strong",{children:"Motivo:"})," ",D.motivoConsulta]})}),D.observacoes&&s.jsx("div",{className:"mt-2",children:s.jsxs("p",{className:"text-sm text-gray-700",children:[s.jsx("strong",{children:"Observações:"})," ",D.observacoes]})})]}),s.jsxs("div",{className:"flex flex-col space-y-2 mt-4 md:mt-0 md:ml-4",children:[D.status==="agendada"&&s.jsx("button",{onClick:()=>P(D._id,"confirmada"),className:"btn-primary text-sm",children:"Confirmar"}),(D.status==="confirmada"||D.status==="agendada")&&s.jsxs(s.Fragment,{children:[s.jsx("button",{onClick:()=>P(D._id,"realizada"),className:"bg-green-600 text-white px-3 py-1 rounded text-sm hover:bg-green-700",children:"Realizada"}),s.jsx("button",{onClick:()=>P(D._id,"faltou"),className:"bg-gray-600 text-white px-3 py-1 rounded text-sm hover:bg-gray-700",children:"Faltou"}),s.jsx("button",{onClick:()=>P(D._id,"cancelada"),className:"bg-red-600 text-white px-3 py-1 rounded text-sm hover:bg-red-700",children:"Cancelar"})]}),s.jsx("button",{onClick:()=>O(D),className:"btn-secondary text-sm",children:"Observações"})]})]})},D._id)})}):s.jsxs("div",{className:"bg-white rounded-lg shadow-md p-12 text-center",children:[s.jsx(Jf,{className:"w-12 h-12 text-gray-400 mx-auto mb-4"}),s.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"Nenhuma consulta encontrada"}),s.jsx("p",{className:"text-gray-600",children:"Não há consultas agendadas para o período selecionado."})]}),N&&s.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:s.jsxs("div",{className:"bg-white rounded-lg p-6 max-w-md w-full mx-4",children:[s.jsxs("div",{className:"flex justify-between items-center mb-4",children:[s.jsx("h3",{className:"text-lg font-semibold",children:"Observações da Consulta"}),s.jsx("button",{onClick:()=>O(null),className:"text-gray-400 hover:text-gray-600",children:s.jsx(Sl,{className:"w-5 h-5"})})]}),s.jsxs("form",{onSubmit:D=>{D.preventDefault();const A=new FormData(D.currentTarget).get("observacao");W(N._id,A)},children:[s.jsx("textarea",{name:"observacao",defaultValue:N.observacoes,className:"form-input",rows:4,placeholder:"Digite suas observações sobre a consulta..."}),s.jsxs("div",{className:"flex justify-end space-x-3 mt-4",children:[s.jsx("button",{type:"button",onClick:()=>O(null),className:"btn-secondary",children:"Cancelar"}),s.jsx("button",{type:"submit",className:"btn-primary",children:"Salvar"})]})]})]})})]})},Ho="https://mock.apidog.com/m1/1053378-0-default/pacientes",Y1=()=>{const[n,a]=C.useState("dashboard"),[i,u]=C.useState([]),[d,f]=C.useState([]),[m,v]=C.useState([]),[g,w]=C.useState(!0),[h,y]=C.useState(""),[N,O]=C.useState(!1),[$,z]=C.useState(!1),[P,W]=C.useState(null),_=Tr(),[k,j]=C.useState({nome:"",cpf:"",telefone:"",email:"",dataNascimento:"",altura:"",peso:"",endereco:{rua:"",numero:"",bairro:"",cidade:"",cep:""},convenio:"",numeroCarteirinha:"",observacoes:""}),[D,R]=C.useState({nome:"",especialidade:"",crm:"",telefone:"",email:"",senha:""});C.useEffect(()=>{if(!localStorage.getItem("secretariaLogada")){_("/secretaria");return}A()},[_]);const A=async()=>{try{w(!0);const F=await(await fetch(Ho)).json();u(Array.isArray(F.data)?F.data:Array.isArray(F)?F:[])}catch(E){console.error("Erro ao carregar dados:",E),ue.error("Erro ao carregar dados do sistema")}finally{w(!1)}},Q=()=>{localStorage.removeItem("secretariaLogada"),ue.success("Logout realizado com sucesso!"),_("/secretaria")},oe=()=>{W(null),j({nome:"",cpf:"",telefone:"",email:"",dataNascimento:"",altura:"",peso:"",endereco:{rua:"",numero:"",bairro:"",cidade:"",cep:""},convenio:"",numeroCarteirinha:"",observacoes:""}),O(!0),a("pacientes")},fe=E=>{W(E),j({nome:E.nome||"",cpf:E.cpf||"",telefone:E.telefone||"",email:E.email||"",dataNascimento:E.dataNascimento?E.dataNascimento.split("T")[0]:"",altura:E.altura!==void 0?String(E.altura):"",peso:E.peso!==void 0?String(E.peso):"",endereco:{rua:E.endereco?.rua||"",numero:E.endereco?.numero||"",bairro:E.endereco?.bairro||"",cidade:E.endereco?.cidade||"",cep:E.endereco?.cep||""},convenio:E.convenio||"",numeroCarteirinha:E.numeroCarteirinha||"",observacoes:E.observacoes||""}),O(!0),a("pacientes")},ce=()=>{j({nome:"",cpf:"",telefone:"",email:"",dataNascimento:"",altura:"",peso:"",endereco:{rua:"",numero:"",bairro:"",cidade:"",cep:""},convenio:"",numeroCarteirinha:"",observacoes:""}),W(null),O(!1)},ie=()=>{R({nome:"",especialidade:"",crm:"",telefone:"",email:"",senha:""}),z(!1)},pe=async E=>{E.preventDefault();try{w(!0);const F={nome:k.nome,cpf:k.cpf,data_nascimento:k.dataNascimento,telefone:k.telefone,email:k.email,altura:k.altura?Number(k.altura):void 0,peso:k.peso?Number(k.peso):void 0,endereco:k.endereco,convenio:k.convenio,numeroCarteirinha:k.numeroCarteirinha,observacoes:k.observacoes};if(P&&P._id){const J=await fetch(`${Ho}/${P._id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(F)});if(!J.ok)throw new Error("Erro ao atualizar paciente na API");const Y=await J.json();u(T=>T.map(U=>U._id===P._id?Y||{...U,...F}:U)),ue.success("Paciente atualizado com sucesso!")}else{const J=await fetch(Ho,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(F)});if(!J.ok)throw new Error("Erro ao cadastrar paciente na API");const Y=await J.json(),T=Y?.data||Y||F;u(U=>[...U,T]),ue.success("Paciente cadastrado com sucesso!")}ce()}catch(F){console.error("Erro ao cadastrar/atualizar paciente:",F),ue.error("Erro ao salvar paciente. Tente novamente.")}finally{w(!1)}},X=async E=>{if(window.confirm(`Você tem certeza que deseja remover ${E.nome}? Essa ação não pode ser desfeita.`))try{w(!0);const J=await fetch(`${Ho}/${E._id}`,{method:"DELETE"});if(J.ok)u(Y=>Y.filter(T=>T._id!==E._id)),ue.success("Paciente removido com sucesso!");else{const Y=await J.text();throw console.error("Erro ao remover paciente:",Y),new Error("Erro ao remover paciente")}}catch(J){console.error("Erro ao remover paciente:",J),ue.error("Não foi possível remover o paciente. Tente novamente.")}finally{w(!1)}},re=E=>{if(!E)return"Não informado";try{return new Date(E).toLocaleDateString("pt-BR",{day:"2-digit",month:"2-digit",year:"numeric"})}catch{return E}},le=i.filter(E=>(E.nome||"").toLowerCase().includes(h.toLowerCase())||(E.email||"").toLowerCase().includes(h.toLowerCase())||(E.telefone||"").toLowerCase().includes(h.toLowerCase()));return g&&!N&&!$?s.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center",children:s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-green-600 mx-auto mb-4"}),s.jsx("p",{className:"text-gray-600",children:"Carregando painel da secretária..."})]})}):s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx("div",{className:"bg-white shadow-sm border-b",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"flex justify-between items-center py-4",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Painel da Secretária"}),s.jsx("p",{className:"text-gray-600",children:"Sistema de Gestão Médica"})]}),s.jsxs("div",{className:"flex space-x-3",children:[s.jsxs("button",{onClick:oe,className:"bg-green-600 text-white px-4 py-2 rounded-lg hover:bg-green-700 transition-colors flex items-center",children:[s.jsx(lf,{className:"w-5 h-5 mr-2"}),"Novo Paciente"]}),s.jsxs("button",{onClick:()=>{z(!0),a("medicos")},className:"bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors flex items-center",children:[s.jsx(rs,{className:"w-5 h-5 mr-2"}),"Novo Médico"]}),s.jsx("button",{onClick:Q,className:"bg-red-600 text-white px-4 py-2 rounded-lg hover:bg-red-700 transition-colors",children:"Sair"})]})]})})}),s.jsx("div",{className:"bg-white border-b",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:s.jsx("nav",{className:"flex space-x-8",children:[{id:"dashboard",label:"Dashboard",icon:bl},{id:"pacientes",label:"Pacientes",icon:qr},{id:"medicos",label:"Médicos",icon:qr},{id:"consultas",label:"Consultas",icon:_r},{id:"relatorios",label:"Relatórios",icon:cs}].map(E=>{const F=E.icon;return s.jsxs("button",{onClick:()=>a(E.id),className:`flex items-center px-3 py-4 border-b-2 font-medium text-sm ${n===E.id?"border-green-500 text-green-600":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"}`,children:[s.jsx(F,{className:"w-5 h-5 mr-2"}),E.label]},E.id)})})})}),s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[n==="dashboard"&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-6",children:[s.jsx("div",{className:"bg-white p-6 rounded-lg shadow",children:s.jsxs("div",{className:"flex items-center",children:[s.jsx(qr,{className:"w-8 h-8 text-blue-600"}),s.jsxs("div",{className:"ml-4",children:[s.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Total Pacientes"}),s.jsx("p",{className:"text-2xl font-bold text-gray-900",children:i.length})]})]})}),s.jsx("div",{className:"bg-white p-6 rounded-lg shadow",children:s.jsxs("div",{className:"flex items-center",children:[s.jsx(qr,{className:"w-8 h-8 text-green-600"}),s.jsxs("div",{className:"ml-4",children:[s.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Total Médicos"}),s.jsx("p",{className:"text-2xl font-bold text-gray-900",children:d.length})]})]})}),s.jsx("div",{className:"bg-white p-6 rounded-lg shadow",children:s.jsxs("div",{className:"flex items-center",children:[s.jsx(_r,{className:"w-8 h-8 text-purple-600"}),s.jsxs("div",{className:"ml-4",children:[s.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Consultas Hoje"}),s.jsx("p",{className:"text-2xl font-bold text-gray-900",children:m.filter(E=>{const F=new Date().toDateString();return new Date(E.dataHora).toDateString()===F}).length})]})]})}),s.jsx("div",{className:"bg-white p-6 rounded-lg shadow",children:s.jsxs("div",{className:"flex items-center",children:[s.jsx(bl,{className:"w-8 h-8 text-orange-600"}),s.jsxs("div",{className:"ml-4",children:[s.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Consultas Pendentes"}),s.jsx("p",{className:"text-2xl font-bold text-gray-900",children:m.filter(E=>E.status==="agendada").length})]})]})})]}),s.jsxs("div",{className:"bg-white rounded-lg shadow",children:[s.jsx("div",{className:"px-6 py-4 border-b",children:s.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Próximas Consultas"})}),s.jsx("div",{className:"p-6",children:s.jsx("div",{className:"space-y-4",children:m.filter(E=>new Date(E.dataHora)>=new Date).sort((E,F)=>new Date(E.dataHora).getTime()-new Date(F.dataHora).getTime()).slice(0,5).map(E=>s.jsxs("div",{className:"flex items-center justify-between p-4 bg-gray-50 rounded-lg",children:[s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-gray-900",children:E.pacienteNome}),s.jsxs("p",{className:"text-sm text-gray-600",children:["Dr(a). ",E.medicoNome]}),s.jsx("p",{className:"text-sm text-gray-500",children:re(E.dataHora)})]}),s.jsx("span",{className:"px-3 py-1 rounded-full text-xs font-medium bg-gray-100 text-gray-800",children:E.status})]},E._id))})})]})]}),n==="pacientes"&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("h2",{className:"text-xl font-bold text-gray-900",children:"Gerenciar Pacientes"}),s.jsxs("button",{onClick:oe,className:"bg-green-600 text-white px-4 py-2 rounded-lg hover:bg-green-700 transition-colors flex items-center",children:[s.jsx(lf,{className:"w-5 h-5 mr-2"}),"Novo Paciente"]})]}),s.jsxs("div",{className:"bg-white rounded-lg shadow",children:[s.jsx("div",{className:"p-6 border-b",children:s.jsx("div",{className:"flex items-center space-x-4",children:s.jsxs("div",{className:"relative flex-1",children:[s.jsx(Wo,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-5 h-5 text-gray-400"}),s.jsx("input",{type:"text",placeholder:"Buscar pacientes...",value:h,onChange:E=>y(E.target.value),className:"pl-10 pr-4 py-2 w-full border border-gray-300 rounded-lg focus:ring-2 focus:ring-green-500 focus:border-transparent"})]})})}),s.jsx("div",{className:"p-6",children:le.length===0?s.jsx("p",{className:"text-gray-500",children:"Nenhum paciente encontrado."}):s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:le.map(E=>s.jsxs("div",{className:"bg-white rounded-xl shadow p-5 flex flex-col justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-semibold text-gray-800 mb-1",children:E.nome}),s.jsx("p",{className:"text-sm text-gray-500",children:E.endereco?.cidade||"Cidade não informada"}),s.jsxs("div",{className:"mt-3 text-sm text-gray-700 space-y-1",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ba,{className:"w-4 h-4 text-gray-400"}),s.jsx("span",{children:E.email})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Bl,{className:"w-4 h-4 text-gray-400"}),s.jsx("span",{children:E.telefone})]}),s.jsxs("p",{children:["Nascimento: ",E.dataNascimento||"Não informado"]}),s.jsxs("p",{children:["Altura/Peso: ",E.altura||"—"," / ",E.peso||"—"]})]})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-4",children:[s.jsxs("button",{onClick:()=>fe(E),className:"flex items-center gap-1 bg-green-600 hover:bg-green-700 text-white text-sm px-3 py-1.5 rounded-md transition",children:[s.jsx(Wg,{className:"w-4 h-4"})," Editar"]}),s.jsxs("button",{onClick:()=>X(E),className:"flex items-center gap-1 bg-red-500 hover:bg-red-600 text-white text-sm px-3 py-1.5 rounded-md transition",children:[s.jsx(em,{className:"w-4 h-4"})," Remover"]})]})]},E._id))})})]})]}),n==="medicos"&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("h2",{className:"text-xl font-bold text-gray-900",children:"Gerenciar Médicos"}),s.jsxs("button",{onClick:()=>{z(!0)},className:"bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors flex items-center",children:[s.jsx(rs,{className:"w-5 h-5 mr-2"}),"Novo Médico"]})]}),s.jsxs("div",{className:"bg-white rounded-lg shadow",children:[s.jsx("div",{className:"p-6 border-b",children:s.jsxs("div",{className:"relative",children:[s.jsx(Wo,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-5 h-5 text-gray-400"}),s.jsx("input",{type:"text",placeholder:"Buscar médicos...",value:h,onChange:E=>y(E.target.value),className:"pl-10 pr-4 py-2 w-full border border-gray-300 rounded-lg focus:ring-2 focus:ring-green-500 focus:border-transparent"})]})}),s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[s.jsx("thead",{className:"bg-gray-50",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Médico"}),s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Especialidade"}),s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"CRM"}),s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Contato"})]})}),s.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:d.filter(E=>(E.nome||"").toLowerCase().includes(h.toLowerCase())).map(E=>s.jsxs("tr",{className:"hover:bg-gray-50",children:[s.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:s.jsxs("div",{className:"text-sm font-medium text-gray-900",children:["Dr(a). ",E.nome||"Nome não informado"]})}),s.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:s.jsx("div",{className:"text-sm text-gray-900",children:E.especialidade||"Não informado"})}),s.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:s.jsx("div",{className:"text-sm text-gray-900",children:E.crm||"Não informado"})}),s.jsxs("td",{className:"px-6 py-4 whitespace-nowrap",children:[s.jsx("div",{className:"text-sm text-gray-900",children:E.email||"Email não informado"}),s.jsx("div",{className:"text-sm text-gray-500",children:E.telefone||"Telefone não informado"})]})]},E._id))})]})})]})]}),n==="consultas"&&s.jsxs("div",{className:"space-y-6",children:[s.jsx("div",{className:"flex justify-between items-center",children:s.jsx("h2",{className:"text-xl font-bold text-gray-900",children:"Gerenciar Consultas"})}),s.jsxs("div",{className:"bg-white rounded-lg shadow",children:[s.jsx("div",{className:"p-6 border-b",children:s.jsxs("div",{className:"relative",children:[s.jsx(Wo,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-5 h-5 text-gray-400"}),s.jsx("input",{type:"text",placeholder:"Buscar consultas...",value:h,onChange:E=>y(E.target.value),className:"pl-10 pr-4 py-2 w-full border border-gray-300 rounded-lg focus:ring-2 focus:ring-green-500 focus:border-transparent"})]})}),s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[s.jsx("thead",{className:"bg-gray-50",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Paciente"}),s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Médico"}),s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Data/Hora"}),s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Tipo"}),s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"})]})}),s.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:m.filter(E=>(E.pacienteNome||"").toLowerCase().includes(h.toLowerCase())||(E.medicoNome||"").toLowerCase().includes(h.toLowerCase())).map(E=>s.jsxs("tr",{className:"hover:bg-gray-50",children:[s.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:s.jsx("div",{className:"text-sm font-medium text-gray-900",children:E.pacienteNome})}),s.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:s.jsxs("div",{className:"text-sm text-gray-900",children:["Dr(a). ",E.medicoNome]})}),s.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:s.jsx("div",{className:"text-sm text-gray-900",children:re(E.dataHora)})}),s.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:s.jsx("div",{className:"text-sm text-gray-900",children:E.tipo||"Não informado"})}),s.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:s.jsx("span",{className:"px-3 py-1 rounded-full text-xs font-medium bg-gray-100 text-gray-800",children:E.status})})]},E._id))})]})})]})]}),n==="relatorios"&&s.jsxs("div",{className:"space-y-6",children:[s.jsx("h2",{className:"text-xl font-bold text-gray-900",children:"Relatórios"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs("div",{className:"bg-white p-6 rounded-lg shadow",children:[s.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Consultas por Status"}),s.jsx("div",{className:"space-y-3",children:["agendada","confirmada","realizada","cancelada"].map(E=>{const F=m.filter(Y=>Y.status===E).length,J=m.length>0?F/m.length*100:0;return s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-sm font-medium text-gray-600 capitalize",children:E}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("div",{className:"w-20 bg-gray-200 rounded-full h-2",children:s.jsx("div",{className:"bg-green-600 h-2 rounded-full",style:{width:`${J}%`}})}),s.jsx("span",{className:"text-sm font-medium text-gray-900",children:F})]})]},E)})})]}),s.jsxs("div",{className:"bg-white p-6 rounded-lg shadow",children:[s.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Médicos por Especialidade"}),s.jsx("div",{className:"space-y-3",children:[...new Set(d.map(E=>E.especialidade).filter(Boolean))].map(E=>{const F=d.filter(J=>J.especialidade===E).length;return s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-sm font-medium text-gray-600",children:E}),s.jsx("span",{className:"text-sm font-medium text-gray-900",children:F})]},E)})})]})]})]})]}),N&&s.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 p-4",children:s.jsx("div",{className:"bg-white rounded-lg max-w-2xl w-full max-h-[90vh] overflow-y-auto",children:s.jsxs("div",{className:"p-6",children:[s.jsxs("div",{className:"flex justify-between items-center mb-6",children:[s.jsx("h3",{className:"text-lg font-semibold",children:P?"Editar Paciente":"Cadastrar Novo Paciente"}),s.jsx("button",{onClick:ce,className:"text-gray-400 hover:text-gray-600",children:s.jsx(Sl,{className:"w-6 h-6"})})]}),s.jsxs("form",{onSubmit:pe,className:"space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Nome Completo *"}),s.jsx("input",{type:"text",value:k.nome,onChange:E=>j({...k,nome:E.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-green-500 focus:border-transparent",required:!0})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"CPF *"}),s.jsx("input",{type:"text",value:k.cpf,onChange:E=>j({...k,cpf:E.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-green-500 focus:border-transparent",required:!0})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Telefone *"}),s.jsx("input",{type:"tel",value:k.telefone,onChange:E=>j({...k,telefone:E.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-green-500 focus:border-transparent",required:!0})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Email *"}),s.jsx("input",{type:"email",value:k.email,onChange:E=>j({...k,email:E.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-green-500 focus:border-transparent",required:!0})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Data de Nascimento *"}),s.jsx("input",{type:"date",value:k.dataNascimento,onChange:E=>j({...k,dataNascimento:E.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-green-500 focus:border-transparent",required:!0})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Altura (cm)"}),s.jsx("input",{type:"number",min:"50",max:"250",step:"0.1",value:k.altura,onChange:E=>j({...k,altura:E.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-green-500 focus:border-transparent",placeholder:"Ex: 170"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Peso (kg)"}),s.jsx("input",{type:"number",min:"10",max:"300",step:"0.1",value:k.peso,onChange:E=>j({...k,peso:E.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-green-500 focus:border-transparent",placeholder:"Ex: 70.5"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"CEP"}),s.jsx("input",{type:"text",value:k.endereco.cep,onChange:E=>j({...k,endereco:{...k.endereco,cep:E.target.value}}),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-green-500 focus:border-transparent"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Cidade"}),s.jsx("input",{type:"text",value:k.endereco.cidade,onChange:E=>j({...k,endereco:{...k.endereco,cidade:E.target.value}}),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-green-500 focus:border-transparent"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Convênio"}),s.jsxs("select",{value:k.convenio,onChange:E=>j({...k,convenio:E.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-green-500 focus:border-transparent",children:[s.jsx("option",{value:"",children:"Selecione"}),s.jsx("option",{value:"Particular",children:"Particular"}),s.jsx("option",{value:"Unimed",children:"Unimed"}),s.jsx("option",{value:"SulAmérica",children:"SulAmérica"}),s.jsx("option",{value:"Bradesco Saúde",children:"Bradesco Saúde"}),s.jsx("option",{value:"Amil",children:"Amil"}),s.jsx("option",{value:"NotreDame",children:"NotreDame"})]})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Observações"}),s.jsx("textarea",{value:k.observacoes,onChange:E=>j({...k,observacoes:E.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-green-500 focus:border-transparent",rows:3})]}),s.jsxs("div",{className:"flex justify-end space-x-3 pt-4",children:[s.jsx("button",{type:"button",onClick:ce,className:"px-4 py-2 border border-gray-300 rounded-lg text-gray-700 hover:bg-gray-50 transition-colors",children:"Cancelar"}),s.jsx("button",{type:"submit",disabled:g,className:"px-4 py-2 bg-green-600 text-white rounded-lg hover:bg-green-700 transition-colors disabled:opacity-50",children:g?"Salvando...":P?"Salvar alterações":"Cadastrar Paciente"})]})]})]})})}),$&&s.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 p-4",children:s.jsx("div",{className:"bg-white rounded-lg max-w-md w-full max-h-[90vh] overflow-y-auto",children:s.jsxs("div",{className:"p-6",children:[s.jsxs("div",{className:"flex justify-between items-center mb-6",children:[s.jsx("h3",{className:"text-lg font-semibold",children:"Cadastrar Novo Médico"}),s.jsx("button",{onClick:ie,className:"text-gray-400 hover:text-gray-600",children:s.jsx(Sl,{className:"w-6 h-6"})})]}),s.jsxs("form",{onSubmit:E=>{E.preventDefault(),ue.success("Médico cadastrado com sucesso!"),ie()},children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Nome Completo *"}),s.jsx("input",{type:"text",value:D.nome,onChange:E=>R({...D,nome:E.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",required:!0})]}),s.jsxs("div",{className:"mt-4 flex justify-end space-x-3",children:[s.jsx("button",{type:"button",onClick:ie,className:"px-4 py-2 border border-gray-300 rounded-lg text-gray-700 hover:bg-gray-50 transition-colors",children:"Cancelar"}),s.jsx("button",{type:"submit",className:"px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors",children:"Cadastrar Médico"})]})]})]})})})]})};function X1(){return s.jsx(E0,{children:s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(nv,{}),s.jsx("main",{className:"container mx-auto px-4 py-8",children:s.jsxs(j0,{children:[s.jsx(Mt,{path:"/",element:s.jsx(Wy,{})}),s.jsx(Mt,{path:"/paciente",element:s.jsx(Vy,{})}),s.jsx(Mt,{path:"/login-secretaria",element:s.jsx(qy,{})}),s.jsx(Mt,{path:"/login-medico",element:s.jsx(Qy,{})}),s.jsx(Mt,{path:"/agendamento",element:s.jsx(W1,{})}),s.jsx(Mt,{path:"/acompanhamento",element:s.jsx(V1,{})}),s.jsx(Mt,{path:"/cadastro",element:s.jsx(q1,{})}),s.jsx(Mt,{path:"/painel-medico",element:s.jsx(Q1,{})}),s.jsx(Mt,{path:"/painel-secretaria",element:s.jsx(Y1,{})}),s.jsx(Mt,{path:"*",element:s.jsx(x0,{to:"/",replace:!0})})]})}),s.jsx(xg,{position:"top-right"})]})})}function gm(n){var a,i,u="";if(typeof n=="string"||typeof n=="number")u+=n;else if(typeof n=="object")if(Array.isArray(n)){var d=n.length;for(a=0;a<d;a++)n[a]&&(i=gm(n[a]))&&(u&&(u+=" "),u+=i)}else for(i in n)n[i]&&(u&&(u+=" "),u+=i);return u}function Qr(){for(var n,a,i=0,u="",d=arguments.length;i<d;i++)(n=arguments[i])&&(a=gm(n))&&(u&&(u+=" "),u+=a);return u}function K1(n){if(typeof document>"u")return;let a=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",a.firstChild?a.insertBefore(i,a.firstChild):a.appendChild(i),i.styleSheet?i.styleSheet.cssText=n:i.appendChild(document.createTextNode(n))}K1(`:root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-container-width: fit-content;--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
`);var Sa=n=>typeof n=="number"&&!isNaN(n),Xr=n=>typeof n=="string",tr=n=>typeof n=="function",G1=n=>Xr(n)||Sa(n),Ml=n=>Xr(n)||tr(n)?n:null,J1=(n,a)=>n===!1||Sa(n)&&n>0?n:a,Ol=n=>C.isValidElement(n)||Xr(n)||tr(n)||Sa(n);function Z1(n,a,i=300){let{scrollHeight:u,style:d}=n;requestAnimationFrame(()=>{d.minHeight="initial",d.height=u+"px",d.transition=`all ${i}ms`,requestAnimationFrame(()=>{d.height="0",d.padding="0",d.margin="0",setTimeout(a,i)})})}function ew({enter:n,exit:a,appendPosition:i=!1,collapse:u=!0,collapseDuration:d=300}){return function({children:f,position:m,preventExitTransition:v,done:g,nodeRef:w,isIn:h,playToast:y}){let N=i?`${n}--${m}`:n,O=i?`${a}--${m}`:a,$=C.useRef(0);return C.useLayoutEffect(()=>{let z=w.current,P=N.split(" "),W=_=>{_.target===w.current&&(y(),z.removeEventListener("animationend",W),z.removeEventListener("animationcancel",W),$.current===0&&_.type!=="animationcancel"&&z.classList.remove(...P))};z.classList.add(...P),z.addEventListener("animationend",W),z.addEventListener("animationcancel",W)},[]),C.useEffect(()=>{let z=w.current,P=()=>{z.removeEventListener("animationend",P),u?Z1(z,g,d):g()};h||(v?P():($.current=1,z.className+=` ${O}`,z.addEventListener("animationend",P)))},[h]),ke.createElement(ke.Fragment,null,f)}}function Mf(n,a){return{content:vm(n.content,n.props),containerId:n.props.containerId,id:n.props.toastId,theme:n.props.theme,type:n.props.type,data:n.props.data||{},isLoading:n.props.isLoading,icon:n.props.icon,reason:n.removalReason,status:a}}function vm(n,a,i=!1){return C.isValidElement(n)&&!Xr(n.type)?C.cloneElement(n,{closeToast:a.closeToast,toastProps:a,data:a.data,isPaused:i}):tr(n)?n({closeToast:a.closeToast,toastProps:a,data:a.data,isPaused:i}):n}function tw({closeToast:n,theme:a,ariaLabel:i="close"}){return ke.createElement("button",{className:`Toastify__close-button Toastify__close-button--${a}`,type:"button",onClick:u=>{u.stopPropagation(),n(!0)},"aria-label":i},ke.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},ke.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function rw({delay:n,isRunning:a,closeToast:i,type:u="default",hide:d,className:f,controlledProgress:m,progress:v,rtl:g,isIn:w,theme:h}){let y=d||m&&v===0,N={animationDuration:`${n}ms`,animationPlayState:a?"running":"paused"};m&&(N.transform=`scaleX(${v})`);let O=Qr("Toastify__progress-bar",m?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${h}`,`Toastify__progress-bar--${u}`,{"Toastify__progress-bar--rtl":g}),$=tr(f)?f({rtl:g,type:u,defaultClassName:O}):Qr(O,f),z={[m&&v>=1?"onTransitionEnd":"onAnimationEnd"]:m&&v<1?null:()=>{w&&i()}};return ke.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":y},ke.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${h} Toastify__progress-bar--${u}`}),ke.createElement("div",{role:"progressbar","aria-hidden":y?"true":"false","aria-label":"notification timer",className:$,style:N,...z}))}var nw=1,ym=()=>`${nw++}`;function aw(n,a,i){let u=1,d=0,f=[],m=[],v=a,g=new Map,w=new Set,h=_=>(w.add(_),()=>w.delete(_)),y=()=>{m=Array.from(g.values()),w.forEach(_=>_())},N=({containerId:_,toastId:k,updateId:j})=>{let D=_?_!==n:n!==1,R=g.has(k)&&j==null;return D||R},O=(_,k)=>{g.forEach(j=>{var D;(k==null||k===j.props.toastId)&&((D=j.toggle)==null||D.call(j,_))})},$=_=>{var k,j;(j=(k=_.props)==null?void 0:k.onClose)==null||j.call(k,_.removalReason),_.isActive=!1},z=_=>{if(_==null)g.forEach($);else{let k=g.get(_);k&&$(k)}y()},P=()=>{d-=f.length,f=[]},W=_=>{var k,j;let{toastId:D,updateId:R}=_.props,A=R==null;_.staleId&&g.delete(_.staleId),_.isActive=!0,g.set(D,_),y(),i(Mf(_,A?"added":"updated")),A&&((j=(k=_.props).onOpen)==null||j.call(k))};return{id:n,props:v,observe:h,toggle:O,removeToast:z,toasts:g,clearQueue:P,buildToast:(_,k)=>{if(N(k))return;let{toastId:j,updateId:D,data:R,staleId:A,delay:Q}=k,oe=D==null;oe&&d++;let fe={...v,style:v.toastStyle,key:u++,...Object.fromEntries(Object.entries(k).filter(([ie,pe])=>pe!=null)),toastId:j,updateId:D,data:R,isIn:!1,className:Ml(k.className||v.toastClassName),progressClassName:Ml(k.progressClassName||v.progressClassName),autoClose:k.isLoading?!1:J1(k.autoClose,v.autoClose),closeToast(ie){g.get(j).removalReason=ie,z(j)},deleteToast(){let ie=g.get(j);if(ie!=null){if(i(Mf(ie,"removed")),g.delete(j),d--,d<0&&(d=0),f.length>0){W(f.shift());return}y()}}};fe.closeButton=v.closeButton,k.closeButton===!1||Ol(k.closeButton)?fe.closeButton=k.closeButton:k.closeButton===!0&&(fe.closeButton=Ol(v.closeButton)?v.closeButton:!0);let ce={content:_,props:fe,staleId:A};v.limit&&v.limit>0&&d>v.limit&&oe?f.push(ce):Sa(Q)?setTimeout(()=>{W(ce)},Q):W(ce)},setProps(_){v=_},setToggle:(_,k)=>{let j=g.get(_);j&&(j.toggle=k)},isToastActive:_=>{var k;return(k=g.get(_))==null?void 0:k.isActive},getSnapshot:()=>m}}var ot=new Map,wa=[],Ll=new Set,ow=n=>Ll.forEach(a=>a(n)),xm=()=>ot.size>0;function sw(){wa.forEach(n=>jm(n.content,n.options)),wa=[]}var iw=(n,{containerId:a})=>{var i;return(i=ot.get(a||1))==null?void 0:i.toasts.get(n)};function wm(n,a){var i;if(a)return!!((i=ot.get(a))!=null&&i.isToastActive(n));let u=!1;return ot.forEach(d=>{d.isToastActive(n)&&(u=!0)}),u}function lw(n){if(!xm()){wa=wa.filter(a=>n!=null&&a.options.toastId!==n);return}if(n==null||G1(n))ot.forEach(a=>{a.removeToast(n)});else if(n&&("containerId"in n||"id"in n)){let a=ot.get(n.containerId);a?a.removeToast(n.id):ot.forEach(i=>{i.removeToast(n.id)})}}var uw=(n={})=>{ot.forEach(a=>{a.props.limit&&(!n.containerId||a.id===n.containerId)&&a.clearQueue()})};function jm(n,a){Ol(n)&&(xm()||wa.push({content:n,options:a}),ot.forEach(i=>{i.buildToast(n,a)}))}function cw(n){var a;(a=ot.get(n.containerId||1))==null||a.setToggle(n.id,n.fn)}function Nm(n,a){ot.forEach(i=>{(a==null||!(a!=null&&a.containerId)||a?.containerId===i.id)&&i.toggle(n,a?.id)})}function dw(n){let a=n.containerId||1;return{subscribe(i){let u=aw(a,n,ow);ot.set(a,u);let d=u.observe(i);return sw(),()=>{d(),ot.delete(a)}},setProps(i){var u;(u=ot.get(a))==null||u.setProps(i)},getSnapshot(){var i;return(i=ot.get(a))==null?void 0:i.getSnapshot()}}}function fw(n){return Ll.add(n),()=>{Ll.delete(n)}}function mw(n){return n&&(Xr(n.toastId)||Sa(n.toastId))?n.toastId:ym()}function _a(n,a){return jm(n,a),a.toastId}function fs(n,a){return{...a,type:a&&a.type||n,toastId:mw(a)}}function ms(n){return(a,i)=>_a(a,fs(n,i))}function be(n,a){return _a(n,fs("default",a))}be.loading=(n,a)=>_a(n,fs("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...a}));function pw(n,{pending:a,error:i,success:u},d){let f;a&&(f=Xr(a)?be.loading(a,d):be.loading(a.render,{...d,...a}));let m={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},v=(w,h,y)=>{if(h==null){be.dismiss(f);return}let N={type:w,...m,...d,data:y},O=Xr(h)?{render:h}:h;return f?be.update(f,{...N,...O}):be(O.render,{...N,...O}),y},g=tr(n)?n():n;return g.then(w=>v("success",u,w)).catch(w=>v("error",i,w)),g}be.promise=pw;be.success=ms("success");be.info=ms("info");be.error=ms("error");be.warning=ms("warning");be.warn=be.warning;be.dark=(n,a)=>_a(n,fs("default",{theme:"dark",...a}));function hw(n){lw(n)}be.dismiss=hw;be.clearWaitingQueue=uw;be.isActive=wm;be.update=(n,a={})=>{let i=iw(n,a);if(i){let{props:u,content:d}=i,f={delay:100,...u,...a,toastId:a.toastId||n,updateId:ym()};f.toastId!==n&&(f.staleId=n);let m=f.render||d;delete f.render,_a(m,f)}};be.done=n=>{be.update(n,{progress:1})};be.onChange=fw;be.play=n=>Nm(!0,n);be.pause=n=>Nm(!1,n);function gw(n){var a;let{subscribe:i,getSnapshot:u,setProps:d}=C.useRef(dw(n)).current;d(n);let f=(a=C.useSyncExternalStore(i,u,u))==null?void 0:a.slice();function m(v){if(!f)return[];let g=new Map;return n.newestOnTop&&f.reverse(),f.forEach(w=>{let{position:h}=w.props;g.has(h)||g.set(h,[]),g.get(h).push(w)}),Array.from(g,w=>v(w[0],w[1]))}return{getToastToRender:m,isToastActive:wm,count:f?.length}}function vw(n){let[a,i]=C.useState(!1),[u,d]=C.useState(!1),f=C.useRef(null),m=C.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:v,pauseOnHover:g,closeToast:w,onClick:h,closeOnClick:y}=n;cw({id:n.toastId,containerId:n.containerId,fn:i}),C.useEffect(()=>{if(n.pauseOnFocusLoss)return N(),()=>{O()}},[n.pauseOnFocusLoss]);function N(){document.hasFocus()||W(),window.addEventListener("focus",P),window.addEventListener("blur",W)}function O(){window.removeEventListener("focus",P),window.removeEventListener("blur",W)}function $(A){if(n.draggable===!0||n.draggable===A.pointerType){_();let Q=f.current;m.canCloseOnClick=!0,m.canDrag=!0,Q.style.transition="none",n.draggableDirection==="x"?(m.start=A.clientX,m.removalDistance=Q.offsetWidth*(n.draggablePercent/100)):(m.start=A.clientY,m.removalDistance=Q.offsetHeight*(n.draggablePercent===80?n.draggablePercent*1.5:n.draggablePercent)/100)}}function z(A){let{top:Q,bottom:oe,left:fe,right:ce}=f.current.getBoundingClientRect();A.nativeEvent.type!=="touchend"&&n.pauseOnHover&&A.clientX>=fe&&A.clientX<=ce&&A.clientY>=Q&&A.clientY<=oe?W():P()}function P(){i(!0)}function W(){i(!1)}function _(){m.didMove=!1,document.addEventListener("pointermove",j),document.addEventListener("pointerup",D)}function k(){document.removeEventListener("pointermove",j),document.removeEventListener("pointerup",D)}function j(A){let Q=f.current;if(m.canDrag&&Q){m.didMove=!0,a&&W(),n.draggableDirection==="x"?m.delta=A.clientX-m.start:m.delta=A.clientY-m.start,m.start!==A.clientX&&(m.canCloseOnClick=!1);let oe=n.draggableDirection==="x"?`${m.delta}px, var(--y)`:`0, calc(${m.delta}px + var(--y))`;Q.style.transform=`translate3d(${oe},0)`,Q.style.opacity=`${1-Math.abs(m.delta/m.removalDistance)}`}}function D(){k();let A=f.current;if(m.canDrag&&m.didMove&&A){if(m.canDrag=!1,Math.abs(m.delta)>m.removalDistance){d(!0),n.closeToast(!0),n.collapseAll();return}A.style.transition="transform 0.2s, opacity 0.2s",A.style.removeProperty("transform"),A.style.removeProperty("opacity")}}let R={onPointerDown:$,onPointerUp:z};return v&&g&&(R.onMouseEnter=W,n.stacked||(R.onMouseLeave=P)),y&&(R.onClick=A=>{h&&h(A),m.canCloseOnClick&&w(!0)}),{playToast:P,pauseToast:W,isRunning:a,preventExitTransition:u,toastRef:f,eventHandlers:R}}var yw=typeof window<"u"?C.useLayoutEffect:C.useEffect,ps=({theme:n,type:a,isLoading:i,...u})=>ke.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:n==="colored"?"currentColor":`var(--toastify-icon-color-${a})`,...u});function xw(n){return ke.createElement(ps,{...n},ke.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))}function ww(n){return ke.createElement(ps,{...n},ke.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))}function jw(n){return ke.createElement(ps,{...n},ke.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))}function Nw(n){return ke.createElement(ps,{...n},ke.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))}function bw(){return ke.createElement("div",{className:"Toastify__spinner"})}var Rl={info:ww,warning:xw,success:jw,error:Nw,spinner:bw},kw=n=>n in Rl;function Sw({theme:n,type:a,isLoading:i,icon:u}){let d=null,f={theme:n,type:a};return u===!1||(tr(u)?d=u({...f,isLoading:i}):C.isValidElement(u)?d=C.cloneElement(u,f):i?d=Rl.spinner():kw(a)&&(d=Rl[a](f))),d}var _w=n=>{let{isRunning:a,preventExitTransition:i,toastRef:u,eventHandlers:d,playToast:f}=vw(n),{closeButton:m,children:v,autoClose:g,onClick:w,type:h,hideProgressBar:y,closeToast:N,transition:O,position:$,className:z,style:P,progressClassName:W,updateId:_,role:k,progress:j,rtl:D,toastId:R,deleteToast:A,isIn:Q,isLoading:oe,closeOnClick:fe,theme:ce,ariaLabel:ie}=n,pe=Qr("Toastify__toast",`Toastify__toast-theme--${ce}`,`Toastify__toast--${h}`,{"Toastify__toast--rtl":D},{"Toastify__toast--close-on-click":fe}),X=tr(z)?z({rtl:D,position:$,type:h,defaultClassName:pe}):Qr(pe,z),re=Sw(n),le=!!j||!g,E={closeToast:N,type:h,theme:ce},F=null;return m===!1||(tr(m)?F=m(E):C.isValidElement(m)?F=C.cloneElement(m,E):F=tw(E)),ke.createElement(O,{isIn:Q,done:A,position:$,preventExitTransition:i,nodeRef:u,playToast:f},ke.createElement("div",{id:R,tabIndex:0,onClick:w,"data-in":Q,className:X,...d,style:P,ref:u,...Q&&{role:k,"aria-label":ie}},re!=null&&ke.createElement("div",{className:Qr("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!oe})},re),vm(v,n,!a),F,!n.customProgressBar&&ke.createElement(rw,{..._&&!le?{key:`p-${_}`}:{},rtl:D,theme:ce,delay:g,isRunning:a,isIn:Q,closeToast:N,hide:y,type:h,className:W,controlledProgress:le,progress:j||0})))},Cw=(n,a=!1)=>({enter:`Toastify--animate Toastify__${n}-enter`,exit:`Toastify--animate Toastify__${n}-exit`,appendPosition:a}),Ew=ew(Cw("bounce",!0)),Tw={position:"top-right",transition:Ew,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light","aria-label":"Notifications Alt+T",hotKeys:n=>n.altKey&&n.code==="KeyT"};function Pw(n){let a={...Tw,...n},i=n.stacked,[u,d]=C.useState(!0),f=C.useRef(null),{getToastToRender:m,isToastActive:v,count:g}=gw(a),{className:w,style:h,rtl:y,containerId:N,hotKeys:O}=a;function $(P){let W=Qr("Toastify__toast-container",`Toastify__toast-container--${P}`,{"Toastify__toast-container--rtl":y});return tr(w)?w({position:P,rtl:y,defaultClassName:W}):Qr(W,Ml(w))}function z(){i&&(d(!0),be.play())}return yw(()=>{var P;if(i){let W=f.current.querySelectorAll('[data-in="true"]'),_=12,k=(P=a.position)==null?void 0:P.includes("top"),j=0,D=0;Array.from(W).reverse().forEach((R,A)=>{let Q=R;Q.classList.add("Toastify__toast--stacked"),A>0&&(Q.dataset.collapsed=`${u}`),Q.dataset.pos||(Q.dataset.pos=k?"top":"bot");let oe=j*(u?.2:1)+(u?0:_*A);Q.style.setProperty("--y",`${k?oe:oe*-1}px`),Q.style.setProperty("--g",`${_}`),Q.style.setProperty("--s",`${1-(u?D:0)}`),j+=Q.offsetHeight,D+=.025})}},[u,g,i]),C.useEffect(()=>{function P(W){var _;let k=f.current;O(W)&&((_=k.querySelector('[tabIndex="0"]'))==null||_.focus(),d(!1),be.pause()),W.key==="Escape"&&(document.activeElement===k||k!=null&&k.contains(document.activeElement))&&(d(!0),be.play())}return document.addEventListener("keydown",P),()=>{document.removeEventListener("keydown",P)}},[O]),ke.createElement("section",{ref:f,className:"Toastify",id:N,onMouseEnter:()=>{i&&(d(!1),be.pause())},onMouseLeave:z,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions text","aria-label":a["aria-label"]},m((P,W)=>{let _=W.length?{...h}:{...h,pointerEvents:"none"};return ke.createElement("div",{tabIndex:-1,className:$(P),"data-stacked":i,style:_,key:`c-${P}`},W.map(({content:k,props:j})=>ke.createElement(_w,{...j,stacked:i,collapseAll:z,isIn:v(j.toastId,j.containerId),key:`t-${j.key}`},k)))}))}Th.createRoot(document.getElementById("root")).render(s.jsxs(C.StrictMode,{children:[s.jsx(X1,{}),s.jsx(Pw,{position:"top-right",autoClose:3e3,hideProgressBar:!1,newestOnTop:!1,closeOnClick:!0,rtl:!1,pauseOnFocusLoss:!0,draggable:!0,pauseOnHover:!0,theme:"colored"})]}));