273 lines
263 KiB
JavaScript
273 lines
263 KiB
JavaScript
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();function Ud(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ou={exports:{}},Rs={},au={exports:{}},Q={};/**
|
|
* @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 br=Symbol.for("react.element"),Hd=Symbol.for("react.portal"),Qd=Symbol.for("react.fragment"),Wd=Symbol.for("react.strict_mode"),Kd=Symbol.for("react.profiler"),Gd=Symbol.for("react.provider"),qd=Symbol.for("react.context"),Yd=Symbol.for("react.forward_ref"),Zd=Symbol.for("react.suspense"),Jd=Symbol.for("react.memo"),Xd=Symbol.for("react.lazy"),Qo=Symbol.iterator;function ef(e){return e===null||typeof e!="object"?null:(e=Qo&&e[Qo]||e["@@iterator"],typeof e=="function"?e:null)}var uu={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},cu=Object.assign,du={};function An(e,t,n){this.props=e,this.context=t,this.refs=du,this.updater=n||uu}An.prototype.isReactComponent={};An.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};An.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function fu(){}fu.prototype=An.prototype;function Ci(e,t,n){this.props=e,this.context=t,this.refs=du,this.updater=n||uu}var Ti=Ci.prototype=new fu;Ti.constructor=Ci;cu(Ti,An.prototype);Ti.isPureReactComponent=!0;var Wo=Array.isArray,mu=Object.prototype.hasOwnProperty,Pi={current:null},pu={key:!0,ref:!0,__self:!0,__source:!0};function hu(e,t,n){var r,s={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)mu.call(t,r)&&!pu.hasOwnProperty(r)&&(s[r]=t[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1<a){for(var u=Array(a),m=0;m<a;m++)u[m]=arguments[m+2];s.children=u}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:br,type:e,key:i,ref:o,props:s,_owner:Pi.current}}function tf(e,t){return{$$typeof:br,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Li(e){return typeof e=="object"&&e!==null&&e.$$typeof===br}function nf(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ko=/\/+/g;function ol(e,t){return typeof e=="object"&&e!==null&&e.key!=null?nf(""+e.key):t.toString(36)}function Xr(e,t,n,r,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case br:case Hd:o=!0}}if(o)return o=e,s=s(o),e=r===""?"."+ol(o,0):r,Wo(s)?(n="",e!=null&&(n=e.replace(Ko,"$&/")+"/"),Xr(s,t,n,"",function(m){return m})):s!=null&&(Li(s)&&(s=tf(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(Ko,"$&/")+"/")+e)),t.push(s)),1;if(o=0,r=r===""?".":r+":",Wo(e))for(var a=0;a<e.length;a++){i=e[a];var u=r+ol(i,a);o+=Xr(i,t,n,u,s)}else if(u=ef(e),typeof u=="function")for(e=u.call(e),a=0;!(i=e.next()).done;)i=i.value,u=r+ol(i,a++),o+=Xr(i,t,n,u,s);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function Rr(e,t,n){if(e==null)return e;var r=[],s=0;return Xr(e,r,"","",function(i){return t.call(n,i,s++)}),r}function rf(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var _e={current:null},es={transition:null},sf={ReactCurrentDispatcher:_e,ReactCurrentBatchConfig:es,ReactCurrentOwner:Pi};function xu(){throw Error("act(...) is not supported in production builds of React.")}Q.Children={map:Rr,forEach:function(e,t,n){Rr(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Rr(e,function(){t++}),t},toArray:function(e){return Rr(e,function(t){return t})||[]},only:function(e){if(!Li(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Q.Component=An;Q.Fragment=Qd;Q.Profiler=Kd;Q.PureComponent=Ci;Q.StrictMode=Wd;Q.Suspense=Zd;Q.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=sf;Q.act=xu;Q.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=cu({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=Pi.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(u in t)mu.call(t,u)&&!pu.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&a!==void 0?a[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){a=Array(u);for(var m=0;m<u;m++)a[m]=arguments[m+2];r.children=a}return{$$typeof:br,type:e.type,key:s,ref:i,props:r,_owner:o}};Q.createContext=function(e){return e={$$typeof:qd,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Gd,_context:e},e.Consumer=e};Q.createElement=hu;Q.createFactory=function(e){var t=hu.bind(null,e);return t.type=e,t};Q.createRef=function(){return{current:null}};Q.forwardRef=function(e){return{$$typeof:Yd,render:e}};Q.isValidElement=Li;Q.lazy=function(e){return{$$typeof:Xd,_payload:{_status:-1,_result:e},_init:rf}};Q.memo=function(e,t){return{$$typeof:Jd,type:e,compare:t===void 0?null:t}};Q.startTransition=function(e){var t=es.transition;es.transition={};try{e()}finally{es.transition=t}};Q.unstable_act=xu;Q.useCallback=function(e,t){return _e.current.useCallback(e,t)};Q.useContext=function(e){return _e.current.useContext(e)};Q.useDebugValue=function(){};Q.useDeferredValue=function(e){return _e.current.useDeferredValue(e)};Q.useEffect=function(e,t){return _e.current.useEffect(e,t)};Q.useId=function(){return _e.current.useId()};Q.useImperativeHandle=function(e,t,n){return _e.current.useImperativeHandle(e,t,n)};Q.useInsertionEffect=function(e,t){return _e.current.useInsertionEffect(e,t)};Q.useLayoutEffect=function(e,t){return _e.current.useLayoutEffect(e,t)};Q.useMemo=function(e,t){return _e.current.useMemo(e,t)};Q.useReducer=function(e,t,n){return _e.current.useReducer(e,t,n)};Q.useRef=function(e){return _e.current.useRef(e)};Q.useState=function(e){return _e.current.useState(e)};Q.useSyncExternalStore=function(e,t,n){return _e.current.useSyncExternalStore(e,t,n)};Q.useTransition=function(){return _e.current.useTransition()};Q.version="18.3.1";au.exports=Q;var w=au.exports;const lr=Ud(w);/**
|
|
* @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 lf=w,of=Symbol.for("react.element"),af=Symbol.for("react.fragment"),uf=Object.prototype.hasOwnProperty,cf=lf.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,df={key:!0,ref:!0,__self:!0,__source:!0};function gu(e,t,n){var r,s={},i=null,o=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)uf.call(t,r)&&!df.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:of,type:e,key:i,ref:o,props:s,_owner:cf.current}}Rs.Fragment=af;Rs.jsx=gu;Rs.jsxs=gu;ou.exports=Rs;var l=ou.exports,Ml={},yu={exports:{}},$e={},vu={exports:{}},wu={};/**
|
|
* @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.
|
|
*/(function(e){function t(L,I){var g=L.length;L.push(I);e:for(;0<g;){var E=g-1>>>1,z=L[E];if(0<s(z,I))L[E]=I,L[g]=z,g=E;else break e}}function n(L){return L.length===0?null:L[0]}function r(L){if(L.length===0)return null;var I=L[0],g=L.pop();if(g!==I){L[0]=g;e:for(var E=0,z=L.length,$=z>>>1;E<$;){var D=2*(E+1)-1,H=L[D],ae=D+1,tt=L[ae];if(0>s(H,g))ae<z&&0>s(tt,H)?(L[E]=tt,L[ae]=g,E=ae):(L[E]=H,L[D]=g,E=D);else if(ae<z&&0>s(tt,g))L[E]=tt,L[ae]=g,E=ae;else break e}}return I}function s(L,I){var g=L.sortIndex-I.sortIndex;return g!==0?g:L.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var u=[],m=[],h=1,v=null,x=3,S=!1,N=!1,k=!1,O=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function d(L){for(var I=n(m);I!==null;){if(I.callback===null)r(m);else if(I.startTime<=L)r(m),I.sortIndex=I.expirationTime,t(u,I);else break;I=n(m)}}function y(L){if(k=!1,d(L),!N)if(n(u)!==null)N=!0,ye(j);else{var I=n(m);I!==null&&Ce(y,I.startTime-L)}}function j(L,I){N=!1,k&&(k=!1,f(P),P=-1),S=!0;var g=x;try{for(d(I),v=n(u);v!==null&&(!(v.expirationTime>I)||L&&!q());){var E=v.callback;if(typeof E=="function"){v.callback=null,x=v.priorityLevel;var z=E(v.expirationTime<=I);I=e.unstable_now(),typeof z=="function"?v.callback=z:v===n(u)&&r(u),d(I)}else r(u);v=n(u)}if(v!==null)var $=!0;else{var D=n(m);D!==null&&Ce(y,D.startTime-I),$=!1}return $}finally{v=null,x=g,S=!1}}var b=!1,T=null,P=-1,B=5,M=-1;function q(){return!(e.unstable_now()-M<B)}function G(){if(T!==null){var L=e.unstable_now();M=L;var I=!0;try{I=T(!0,L)}finally{I?Y():(b=!1,T=null)}}else b=!1}var Y;if(typeof c=="function")Y=function(){c(G)};else if(typeof MessageChannel<"u"){var ge=new MessageChannel,Se=ge.port2;ge.port1.onmessage=G,Y=function(){Se.postMessage(null)}}else Y=function(){O(G,0)};function ye(L){T=L,b||(b=!0,Y())}function Ce(L,I){P=O(function(){L(e.unstable_now())},I)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(L){L.callback=null},e.unstable_continueExecution=function(){N||S||(N=!0,ye(j))},e.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=0<L?Math.floor(1e3/L):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(L){switch(x){case 1:case 2:case 3:var I=3;break;default:I=x}var g=x;x=I;try{return L()}finally{x=g}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(L,I){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var g=x;x=L;try{return I()}finally{x=g}},e.unstable_scheduleCallback=function(L,I,g){var E=e.unstable_now();switch(typeof g=="object"&&g!==null?(g=g.delay,g=typeof g=="number"&&0<g?E+g:E):g=E,L){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return z=g+z,L={id:h++,callback:I,priorityLevel:L,startTime:g,expirationTime:z,sortIndex:-1},g>E?(L.sortIndex=g,t(m,L),n(u)===null&&L===n(m)&&(k?(f(P),P=-1):k=!0,Ce(y,g-E))):(L.sortIndex=z,t(u,L),N||S||(N=!0,ye(j))),L},e.unstable_shouldYield=q,e.unstable_wrapCallback=function(L){var I=x;return function(){var g=x;x=I;try{return L.apply(this,arguments)}finally{x=g}}}})(wu);vu.exports=wu;var ff=vu.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 mf=w,Ie=ff;function _(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Nu=new Set,ir={};function rn(e,t){_n(e,t),_n(e+"Capture",t)}function _n(e,t){for(ir[e]=t,e=0;e<t.length;e++)Nu.add(t[e])}var ht=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Al=Object.prototype.hasOwnProperty,pf=/^[: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]*$/,Go={},qo={};function hf(e){return Al.call(qo,e)?!0:Al.call(Go,e)?!1:pf.test(e)?qo[e]=!0:(Go[e]=!0,!1)}function xf(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function gf(e,t,n,r){if(t===null||typeof t>"u"||xf(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ee(e,t,n,r,s,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var xe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){xe[e]=new Ee(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];xe[t]=new Ee(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){xe[e]=new Ee(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){xe[e]=new Ee(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){xe[e]=new Ee(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){xe[e]=new Ee(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){xe[e]=new Ee(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){xe[e]=new Ee(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){xe[e]=new Ee(e,5,!1,e.toLowerCase(),null,!1,!1)});var zi=/[\-:]([a-z])/g;function Mi(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(zi,Mi);xe[t]=new Ee(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(zi,Mi);xe[t]=new Ee(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(zi,Mi);xe[t]=new Ee(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){xe[e]=new Ee(e,1,!1,e.toLowerCase(),null,!1,!1)});xe.xlinkHref=new Ee("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){xe[e]=new Ee(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ai(e,t,n,r){var s=xe.hasOwnProperty(t)?xe[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(gf(t,n,s,r)&&(n=null),r||s===null?hf(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var vt=mf.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Or=Symbol.for("react.element"),on=Symbol.for("react.portal"),an=Symbol.for("react.fragment"),Di=Symbol.for("react.strict_mode"),Dl=Symbol.for("react.profiler"),ku=Symbol.for("react.provider"),Su=Symbol.for("react.context"),Ri=Symbol.for("react.forward_ref"),Rl=Symbol.for("react.suspense"),Ol=Symbol.for("react.suspense_list"),Oi=Symbol.for("react.memo"),St=Symbol.for("react.lazy"),ju=Symbol.for("react.offscreen"),Yo=Symbol.iterator;function In(e){return e===null||typeof e!="object"?null:(e=Yo&&e[Yo]||e["@@iterator"],typeof e=="function"?e:null)}var le=Object.assign,al;function Wn(e){if(al===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);al=t&&t[1]||""}return`
|
|
`+al+e}var ul=!1;function cl(e,t){if(!e||ul)return"";ul=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(m){var r=m}Reflect.construct(e,[],t)}else{try{t.call()}catch(m){r=m}e.call(t.prototype)}else{try{throw Error()}catch(m){r=m}e()}}catch(m){if(m&&r&&typeof m.stack=="string"){for(var s=m.stack.split(`
|
|
`),i=r.stack.split(`
|
|
`),o=s.length-1,a=i.length-1;1<=o&&0<=a&&s[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(s[o]!==i[a]){if(o!==1||a!==1)do if(o--,a--,0>a||s[o]!==i[a]){var u=`
|
|
`+s[o].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=o&&0<=a);break}}}finally{ul=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Wn(e):""}function yf(e){switch(e.tag){case 5:return Wn(e.type);case 16:return Wn("Lazy");case 13:return Wn("Suspense");case 19:return Wn("SuspenseList");case 0:case 2:case 15:return e=cl(e.type,!1),e;case 11:return e=cl(e.type.render,!1),e;case 1:return e=cl(e.type,!0),e;default:return""}}function Il(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 an:return"Fragment";case on:return"Portal";case Dl:return"Profiler";case Di:return"StrictMode";case Rl:return"Suspense";case Ol:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Su:return(e.displayName||"Context")+".Consumer";case ku:return(e._context.displayName||"Context")+".Provider";case Ri:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Oi:return t=e.displayName||null,t!==null?t:Il(e.type)||"Memo";case St:t=e._payload,e=e._init;try{return Il(e(t))}catch{}}return null}function vf(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 Il(t);case 8:return t===Di?"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 Ot(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function bu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function wf(e){var t=bu(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ir(e){e._valueTracker||(e._valueTracker=wf(e))}function _u(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=bu(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function fs(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 $l(e,t){var n=t.checked;return le({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Zo(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ot(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Eu(e,t){t=t.checked,t!=null&&Ai(e,"checked",t,!1)}function Vl(e,t){Eu(e,t);var n=Ot(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Fl(e,t.type,n):t.hasOwnProperty("defaultValue")&&Fl(e,t.type,Ot(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Jo(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Fl(e,t,n){(t!=="number"||fs(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Kn=Array.isArray;function vn(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Ot(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Bl(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(_(91));return le({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Xo(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(_(92));if(Kn(n)){if(1<n.length)throw Error(_(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Ot(n)}}function Cu(e,t){var n=Ot(t.value),r=Ot(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function ea(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Tu(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 Ul(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Tu(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var $r,Pu=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for($r=$r||document.createElement("div"),$r.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=$r.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function or(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Yn={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},Nf=["Webkit","ms","Moz","O"];Object.keys(Yn).forEach(function(e){Nf.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Yn[t]=Yn[e]})});function Lu(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Yn.hasOwnProperty(e)&&Yn[e]?(""+t).trim():t+"px"}function zu(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=Lu(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var kf=le({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 Hl(e,t){if(t){if(kf[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(_(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(_(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(_(61))}if(t.style!=null&&typeof t.style!="object")throw Error(_(62))}}function Ql(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 Wl=null;function Ii(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Kl=null,wn=null,Nn=null;function ta(e){if(e=Cr(e)){if(typeof Kl!="function")throw Error(_(280));var t=e.stateNode;t&&(t=Fs(t),Kl(e.stateNode,e.type,t))}}function Mu(e){wn?Nn?Nn.push(e):Nn=[e]:wn=e}function Au(){if(wn){var e=wn,t=Nn;if(Nn=wn=null,ta(e),t)for(e=0;e<t.length;e++)ta(t[e])}}function Du(e,t){return e(t)}function Ru(){}var dl=!1;function Ou(e,t,n){if(dl)return e(t,n);dl=!0;try{return Du(e,t,n)}finally{dl=!1,(wn!==null||Nn!==null)&&(Ru(),Au())}}function ar(e,t){var n=e.stateNode;if(n===null)return null;var r=Fs(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(_(231,t,typeof n));return n}var Gl=!1;if(ht)try{var $n={};Object.defineProperty($n,"passive",{get:function(){Gl=!0}}),window.addEventListener("test",$n,$n),window.removeEventListener("test",$n,$n)}catch{Gl=!1}function Sf(e,t,n,r,s,i,o,a,u){var m=Array.prototype.slice.call(arguments,3);try{t.apply(n,m)}catch(h){this.onError(h)}}var Zn=!1,ms=null,ps=!1,ql=null,jf={onError:function(e){Zn=!0,ms=e}};function bf(e,t,n,r,s,i,o,a,u){Zn=!1,ms=null,Sf.apply(jf,arguments)}function _f(e,t,n,r,s,i,o,a,u){if(bf.apply(this,arguments),Zn){if(Zn){var m=ms;Zn=!1,ms=null}else throw Error(_(198));ps||(ps=!0,ql=m)}}function sn(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Iu(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 na(e){if(sn(e)!==e)throw Error(_(188))}function Ef(e){var t=e.alternate;if(!t){if(t=sn(e),t===null)throw Error(_(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var i=s.alternate;if(i===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===n)return na(s),e;if(i===r)return na(s),t;i=i.sibling}throw Error(_(188))}if(n.return!==r.return)n=s,r=i;else{for(var o=!1,a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o){for(a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o)throw Error(_(189))}}if(n.alternate!==r)throw Error(_(190))}if(n.tag!==3)throw Error(_(188));return n.stateNode.current===n?e:t}function $u(e){return e=Ef(e),e!==null?Vu(e):null}function Vu(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Vu(e);if(t!==null)return t;e=e.sibling}return null}var Fu=Ie.unstable_scheduleCallback,ra=Ie.unstable_cancelCallback,Cf=Ie.unstable_shouldYield,Tf=Ie.unstable_requestPaint,oe=Ie.unstable_now,Pf=Ie.unstable_getCurrentPriorityLevel,$i=Ie.unstable_ImmediatePriority,Bu=Ie.unstable_UserBlockingPriority,hs=Ie.unstable_NormalPriority,Lf=Ie.unstable_LowPriority,Uu=Ie.unstable_IdlePriority,Os=null,it=null;function zf(e){if(it&&typeof it.onCommitFiberRoot=="function")try{it.onCommitFiberRoot(Os,e,void 0,(e.current.flags&128)===128)}catch{}}var Je=Math.clz32?Math.clz32:Df,Mf=Math.log,Af=Math.LN2;function Df(e){return e>>>=0,e===0?32:31-(Mf(e)/Af|0)|0}var Vr=64,Fr=4194304;function Gn(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 xs(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~s;a!==0?r=Gn(a):(i&=o,i!==0&&(r=Gn(i)))}else o=n&~s,o!==0?r=Gn(o):i!==0&&(r=Gn(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Je(t),s=1<<n,r|=e[n],t&=~s;return r}function Rf(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 Of(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-Je(i),a=1<<o,u=s[o];u===-1?(!(a&n)||a&r)&&(s[o]=Rf(a,t)):u<=t&&(e.expiredLanes|=a),i&=~a}}function Yl(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Hu(){var e=Vr;return Vr<<=1,!(Vr&4194240)&&(Vr=64),e}function fl(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function _r(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Je(t),e[t]=n}function If(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-Je(n),i=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~i}}function Vi(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Je(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var Z=0;function Qu(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Wu,Fi,Ku,Gu,qu,Zl=!1,Br=[],Tt=null,Pt=null,Lt=null,ur=new Map,cr=new Map,bt=[],$f="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 sa(e,t){switch(e){case"focusin":case"focusout":Tt=null;break;case"dragenter":case"dragleave":Pt=null;break;case"mouseover":case"mouseout":Lt=null;break;case"pointerover":case"pointerout":ur.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":cr.delete(t.pointerId)}}function Vn(e,t,n,r,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},t!==null&&(t=Cr(t),t!==null&&Fi(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function Vf(e,t,n,r,s){switch(t){case"focusin":return Tt=Vn(Tt,e,t,n,r,s),!0;case"dragenter":return Pt=Vn(Pt,e,t,n,r,s),!0;case"mouseover":return Lt=Vn(Lt,e,t,n,r,s),!0;case"pointerover":var i=s.pointerId;return ur.set(i,Vn(ur.get(i)||null,e,t,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,cr.set(i,Vn(cr.get(i)||null,e,t,n,r,s)),!0}return!1}function Yu(e){var t=Kt(e.target);if(t!==null){var n=sn(t);if(n!==null){if(t=n.tag,t===13){if(t=Iu(n),t!==null){e.blockedOn=t,qu(e.priority,function(){Ku(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ts(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Jl(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Wl=r,n.target.dispatchEvent(r),Wl=null}else return t=Cr(n),t!==null&&Fi(t),e.blockedOn=n,!1;t.shift()}return!0}function la(e,t,n){ts(e)&&n.delete(t)}function Ff(){Zl=!1,Tt!==null&&ts(Tt)&&(Tt=null),Pt!==null&&ts(Pt)&&(Pt=null),Lt!==null&&ts(Lt)&&(Lt=null),ur.forEach(la),cr.forEach(la)}function Fn(e,t){e.blockedOn===t&&(e.blockedOn=null,Zl||(Zl=!0,Ie.unstable_scheduleCallback(Ie.unstable_NormalPriority,Ff)))}function dr(e){function t(s){return Fn(s,e)}if(0<Br.length){Fn(Br[0],e);for(var n=1;n<Br.length;n++){var r=Br[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Tt!==null&&Fn(Tt,e),Pt!==null&&Fn(Pt,e),Lt!==null&&Fn(Lt,e),ur.forEach(t),cr.forEach(t),n=0;n<bt.length;n++)r=bt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<bt.length&&(n=bt[0],n.blockedOn===null);)Yu(n),n.blockedOn===null&&bt.shift()}var kn=vt.ReactCurrentBatchConfig,gs=!0;function Bf(e,t,n,r){var s=Z,i=kn.transition;kn.transition=null;try{Z=1,Bi(e,t,n,r)}finally{Z=s,kn.transition=i}}function Uf(e,t,n,r){var s=Z,i=kn.transition;kn.transition=null;try{Z=4,Bi(e,t,n,r)}finally{Z=s,kn.transition=i}}function Bi(e,t,n,r){if(gs){var s=Jl(e,t,n,r);if(s===null)kl(e,t,r,ys,n),sa(e,r);else if(Vf(s,e,t,n,r))r.stopPropagation();else if(sa(e,r),t&4&&-1<$f.indexOf(e)){for(;s!==null;){var i=Cr(s);if(i!==null&&Wu(i),i=Jl(e,t,n,r),i===null&&kl(e,t,r,ys,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else kl(e,t,r,null,n)}}var ys=null;function Jl(e,t,n,r){if(ys=null,e=Ii(r),e=Kt(e),e!==null)if(t=sn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Iu(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return ys=e,null}function Zu(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(Pf()){case $i:return 1;case Bu:return 4;case hs:case Lf:return 16;case Uu:return 536870912;default:return 16}default:return 16}}var Et=null,Ui=null,ns=null;function Ju(){if(ns)return ns;var e,t=Ui,n=t.length,r,s="value"in Et?Et.value:Et.textContent,i=s.length;for(e=0;e<n&&t[e]===s[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===s[i-r];r++);return ns=s.slice(e,1<r?1-r:void 0)}function rs(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 Ur(){return!0}function ia(){return!1}function Ve(e){function t(n,r,s,i,o){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Ur:ia,this.isPropagationStopped=ia,this}return le(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ur)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ur)},persist:function(){},isPersistent:Ur}),t}var Dn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Hi=Ve(Dn),Er=le({},Dn,{view:0,detail:0}),Hf=Ve(Er),ml,pl,Bn,Is=le({},Er,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Qi,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!==Bn&&(Bn&&e.type==="mousemove"?(ml=e.screenX-Bn.screenX,pl=e.screenY-Bn.screenY):pl=ml=0,Bn=e),ml)},movementY:function(e){return"movementY"in e?e.movementY:pl}}),oa=Ve(Is),Qf=le({},Is,{dataTransfer:0}),Wf=Ve(Qf),Kf=le({},Er,{relatedTarget:0}),hl=Ve(Kf),Gf=le({},Dn,{animationName:0,elapsedTime:0,pseudoElement:0}),qf=Ve(Gf),Yf=le({},Dn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Zf=Ve(Yf),Jf=le({},Dn,{data:0}),aa=Ve(Jf),Xf={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},em={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"},tm={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function nm(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=tm[e])?!!t[e]:!1}function Qi(){return nm}var rm=le({},Er,{key:function(e){if(e.key){var t=Xf[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=rs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?em[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Qi,charCode:function(e){return e.type==="keypress"?rs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?rs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),sm=Ve(rm),lm=le({},Is,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ua=Ve(lm),im=le({},Er,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Qi}),om=Ve(im),am=le({},Dn,{propertyName:0,elapsedTime:0,pseudoElement:0}),um=Ve(am),cm=le({},Is,{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}),dm=Ve(cm),fm=[9,13,27,32],Wi=ht&&"CompositionEvent"in window,Jn=null;ht&&"documentMode"in document&&(Jn=document.documentMode);var mm=ht&&"TextEvent"in window&&!Jn,Xu=ht&&(!Wi||Jn&&8<Jn&&11>=Jn),ca=" ",da=!1;function ec(e,t){switch(e){case"keyup":return fm.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function tc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var un=!1;function pm(e,t){switch(e){case"compositionend":return tc(t);case"keypress":return t.which!==32?null:(da=!0,ca);case"textInput":return e=t.data,e===ca&&da?null:e;default:return null}}function hm(e,t){if(un)return e==="compositionend"||!Wi&&ec(e,t)?(e=Ju(),ns=Ui=Et=null,un=!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 Xu&&t.locale!=="ko"?null:t.data;default:return null}}var xm={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 fa(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!xm[e.type]:t==="textarea"}function nc(e,t,n,r){Mu(r),t=vs(t,"onChange"),0<t.length&&(n=new Hi("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Xn=null,fr=null;function gm(e){mc(e,0)}function $s(e){var t=fn(e);if(_u(t))return e}function ym(e,t){if(e==="change")return t}var rc=!1;if(ht){var xl;if(ht){var gl="oninput"in document;if(!gl){var ma=document.createElement("div");ma.setAttribute("oninput","return;"),gl=typeof ma.oninput=="function"}xl=gl}else xl=!1;rc=xl&&(!document.documentMode||9<document.documentMode)}function pa(){Xn&&(Xn.detachEvent("onpropertychange",sc),fr=Xn=null)}function sc(e){if(e.propertyName==="value"&&$s(fr)){var t=[];nc(t,fr,e,Ii(e)),Ou(gm,t)}}function vm(e,t,n){e==="focusin"?(pa(),Xn=t,fr=n,Xn.attachEvent("onpropertychange",sc)):e==="focusout"&&pa()}function wm(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return $s(fr)}function Nm(e,t){if(e==="click")return $s(t)}function km(e,t){if(e==="input"||e==="change")return $s(t)}function Sm(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var et=typeof Object.is=="function"?Object.is:Sm;function mr(e,t){if(et(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!Al.call(t,s)||!et(e[s],t[s]))return!1}return!0}function ha(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function xa(e,t){var n=ha(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=ha(n)}}function lc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?lc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ic(){for(var e=window,t=fs();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=fs(e.document)}return t}function Ki(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 jm(e){var t=ic(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&lc(n.ownerDocument.documentElement,n)){if(r!==null&&Ki(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!e.extend&&i>r&&(s=r,r=i,i=s),s=xa(n,i);var o=xa(n,r);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var bm=ht&&"documentMode"in document&&11>=document.documentMode,cn=null,Xl=null,er=null,ei=!1;function ga(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ei||cn==null||cn!==fs(r)||(r=cn,"selectionStart"in r&&Ki(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),er&&mr(er,r)||(er=r,r=vs(Xl,"onSelect"),0<r.length&&(t=new Hi("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=cn)))}function Hr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var dn={animationend:Hr("Animation","AnimationEnd"),animationiteration:Hr("Animation","AnimationIteration"),animationstart:Hr("Animation","AnimationStart"),transitionend:Hr("Transition","TransitionEnd")},yl={},oc={};ht&&(oc=document.createElement("div").style,"AnimationEvent"in window||(delete dn.animationend.animation,delete dn.animationiteration.animation,delete dn.animationstart.animation),"TransitionEvent"in window||delete dn.transitionend.transition);function Vs(e){if(yl[e])return yl[e];if(!dn[e])return e;var t=dn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in oc)return yl[e]=t[n];return e}var ac=Vs("animationend"),uc=Vs("animationiteration"),cc=Vs("animationstart"),dc=Vs("transitionend"),fc=new Map,ya="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 $t(e,t){fc.set(e,t),rn(t,[e])}for(var vl=0;vl<ya.length;vl++){var wl=ya[vl],_m=wl.toLowerCase(),Em=wl[0].toUpperCase()+wl.slice(1);$t(_m,"on"+Em)}$t(ac,"onAnimationEnd");$t(uc,"onAnimationIteration");$t(cc,"onAnimationStart");$t("dblclick","onDoubleClick");$t("focusin","onFocus");$t("focusout","onBlur");$t(dc,"onTransitionEnd");_n("onMouseEnter",["mouseout","mouseover"]);_n("onMouseLeave",["mouseout","mouseover"]);_n("onPointerEnter",["pointerout","pointerover"]);_n("onPointerLeave",["pointerout","pointerover"]);rn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));rn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));rn("onBeforeInput",["compositionend","keypress","textInput","paste"]);rn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));rn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));rn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var qn="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(" "),Cm=new Set("cancel close invalid load scroll toggle".split(" ").concat(qn));function va(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,_f(r,t,void 0,e),e.currentTarget=null}function mc(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],u=a.instance,m=a.currentTarget;if(a=a.listener,u!==i&&s.isPropagationStopped())break e;va(s,a,m),i=u}else for(o=0;o<r.length;o++){if(a=r[o],u=a.instance,m=a.currentTarget,a=a.listener,u!==i&&s.isPropagationStopped())break e;va(s,a,m),i=u}}}if(ps)throw e=ql,ps=!1,ql=null,e}function ee(e,t){var n=t[li];n===void 0&&(n=t[li]=new Set);var r=e+"__bubble";n.has(r)||(pc(t,e,2,!1),n.add(r))}function Nl(e,t,n){var r=0;t&&(r|=4),pc(n,e,r,t)}var Qr="_reactListening"+Math.random().toString(36).slice(2);function pr(e){if(!e[Qr]){e[Qr]=!0,Nu.forEach(function(n){n!=="selectionchange"&&(Cm.has(n)||Nl(n,!1,e),Nl(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Qr]||(t[Qr]=!0,Nl("selectionchange",!1,t))}}function pc(e,t,n,r){switch(Zu(t)){case 1:var s=Bf;break;case 4:s=Uf;break;default:s=Bi}n=s.bind(null,t,n,e),s=void 0,!Gl||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function kl(e,t,n,r,s){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(o===4)for(o=r.return;o!==null;){var u=o.tag;if((u===3||u===4)&&(u=o.stateNode.containerInfo,u===s||u.nodeType===8&&u.parentNode===s))return;o=o.return}for(;a!==null;){if(o=Kt(a),o===null)return;if(u=o.tag,u===5||u===6){r=i=o;continue e}a=a.parentNode}}r=r.return}Ou(function(){var m=i,h=Ii(n),v=[];e:{var x=fc.get(e);if(x!==void 0){var S=Hi,N=e;switch(e){case"keypress":if(rs(n)===0)break e;case"keydown":case"keyup":S=sm;break;case"focusin":N="focus",S=hl;break;case"focusout":N="blur",S=hl;break;case"beforeblur":case"afterblur":S=hl;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":S=oa;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":S=Wf;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":S=om;break;case ac:case uc:case cc:S=qf;break;case dc:S=um;break;case"scroll":S=Hf;break;case"wheel":S=dm;break;case"copy":case"cut":case"paste":S=Zf;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":S=ua}var k=(t&4)!==0,O=!k&&e==="scroll",f=k?x!==null?x+"Capture":null:x;k=[];for(var c=m,d;c!==null;){d=c;var y=d.stateNode;if(d.tag===5&&y!==null&&(d=y,f!==null&&(y=ar(c,f),y!=null&&k.push(hr(c,y,d)))),O)break;c=c.return}0<k.length&&(x=new S(x,N,null,n,h),v.push({event:x,listeners:k}))}}if(!(t&7)){e:{if(x=e==="mouseover"||e==="pointerover",S=e==="mouseout"||e==="pointerout",x&&n!==Wl&&(N=n.relatedTarget||n.fromElement)&&(Kt(N)||N[xt]))break e;if((S||x)&&(x=h.window===h?h:(x=h.ownerDocument)?x.defaultView||x.parentWindow:window,S?(N=n.relatedTarget||n.toElement,S=m,N=N?Kt(N):null,N!==null&&(O=sn(N),N!==O||N.tag!==5&&N.tag!==6)&&(N=null)):(S=null,N=m),S!==N)){if(k=oa,y="onMouseLeave",f="onMouseEnter",c="mouse",(e==="pointerout"||e==="pointerover")&&(k=ua,y="onPointerLeave",f="onPointerEnter",c="pointer"),O=S==null?x:fn(S),d=N==null?x:fn(N),x=new k(y,c+"leave",S,n,h),x.target=O,x.relatedTarget=d,y=null,Kt(h)===m&&(k=new k(f,c+"enter",N,n,h),k.target=d,k.relatedTarget=O,y=k),O=y,S&&N)t:{for(k=S,f=N,c=0,d=k;d;d=ln(d))c++;for(d=0,y=f;y;y=ln(y))d++;for(;0<c-d;)k=ln(k),c--;for(;0<d-c;)f=ln(f),d--;for(;c--;){if(k===f||f!==null&&k===f.alternate)break t;k=ln(k),f=ln(f)}k=null}else k=null;S!==null&&wa(v,x,S,k,!1),N!==null&&O!==null&&wa(v,O,N,k,!0)}}e:{if(x=m?fn(m):window,S=x.nodeName&&x.nodeName.toLowerCase(),S==="select"||S==="input"&&x.type==="file")var j=ym;else if(fa(x))if(rc)j=km;else{j=wm;var b=vm}else(S=x.nodeName)&&S.toLowerCase()==="input"&&(x.type==="checkbox"||x.type==="radio")&&(j=Nm);if(j&&(j=j(e,m))){nc(v,j,n,h);break e}b&&b(e,x,m),e==="focusout"&&(b=x._wrapperState)&&b.controlled&&x.type==="number"&&Fl(x,"number",x.value)}switch(b=m?fn(m):window,e){case"focusin":(fa(b)||b.contentEditable==="true")&&(cn=b,Xl=m,er=null);break;case"focusout":er=Xl=cn=null;break;case"mousedown":ei=!0;break;case"contextmenu":case"mouseup":case"dragend":ei=!1,ga(v,n,h);break;case"selectionchange":if(bm)break;case"keydown":case"keyup":ga(v,n,h)}var T;if(Wi)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else un?ec(e,n)&&(P="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(P="onCompositionStart");P&&(Xu&&n.locale!=="ko"&&(un||P!=="onCompositionStart"?P==="onCompositionEnd"&&un&&(T=Ju()):(Et=h,Ui="value"in Et?Et.value:Et.textContent,un=!0)),b=vs(m,P),0<b.length&&(P=new aa(P,e,null,n,h),v.push({event:P,listeners:b}),T?P.data=T:(T=tc(n),T!==null&&(P.data=T)))),(T=mm?pm(e,n):hm(e,n))&&(m=vs(m,"onBeforeInput"),0<m.length&&(h=new aa("onBeforeInput","beforeinput",null,n,h),v.push({event:h,listeners:m}),h.data=T))}mc(v,t)})}function hr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function vs(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=ar(e,n),i!=null&&r.unshift(hr(e,i,s)),i=ar(e,t),i!=null&&r.push(hr(e,i,s))),e=e.return}return r}function ln(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function wa(e,t,n,r,s){for(var i=t._reactName,o=[];n!==null&&n!==r;){var a=n,u=a.alternate,m=a.stateNode;if(u!==null&&u===r)break;a.tag===5&&m!==null&&(a=m,s?(u=ar(n,i),u!=null&&o.unshift(hr(n,u,a))):s||(u=ar(n,i),u!=null&&o.push(hr(n,u,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Tm=/\r\n?/g,Pm=/\u0000|\uFFFD/g;function Na(e){return(typeof e=="string"?e:""+e).replace(Tm,`
|
|
`).replace(Pm,"")}function Wr(e,t,n){if(t=Na(t),Na(e)!==t&&n)throw Error(_(425))}function ws(){}var ti=null,ni=null;function ri(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 si=typeof setTimeout=="function"?setTimeout:void 0,Lm=typeof clearTimeout=="function"?clearTimeout:void 0,ka=typeof Promise=="function"?Promise:void 0,zm=typeof queueMicrotask=="function"?queueMicrotask:typeof ka<"u"?function(e){return ka.resolve(null).then(e).catch(Mm)}:si;function Mm(e){setTimeout(function(){throw e})}function Sl(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),dr(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);dr(t)}function zt(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 Sa(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Rn=Math.random().toString(36).slice(2),lt="__reactFiber$"+Rn,xr="__reactProps$"+Rn,xt="__reactContainer$"+Rn,li="__reactEvents$"+Rn,Am="__reactListeners$"+Rn,Dm="__reactHandles$"+Rn;function Kt(e){var t=e[lt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[xt]||n[lt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Sa(e);e!==null;){if(n=e[lt])return n;e=Sa(e)}return t}e=n,n=e.parentNode}return null}function Cr(e){return e=e[lt]||e[xt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function fn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(_(33))}function Fs(e){return e[xr]||null}var ii=[],mn=-1;function Vt(e){return{current:e}}function te(e){0>mn||(e.current=ii[mn],ii[mn]=null,mn--)}function X(e,t){mn++,ii[mn]=e.current,e.current=t}var It={},ke=Vt(It),ze=Vt(!1),Jt=It;function En(e,t){var n=e.type.contextTypes;if(!n)return It;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Me(e){return e=e.childContextTypes,e!=null}function Ns(){te(ze),te(ke)}function ja(e,t,n){if(ke.current!==It)throw Error(_(168));X(ke,t),X(ze,n)}function hc(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(_(108,vf(e)||"Unknown",s));return le({},n,r)}function ks(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||It,Jt=ke.current,X(ke,e),X(ze,ze.current),!0}function ba(e,t,n){var r=e.stateNode;if(!r)throw Error(_(169));n?(e=hc(e,t,Jt),r.__reactInternalMemoizedMergedChildContext=e,te(ze),te(ke),X(ke,e)):te(ze),X(ze,n)}var dt=null,Bs=!1,jl=!1;function xc(e){dt===null?dt=[e]:dt.push(e)}function Rm(e){Bs=!0,xc(e)}function Ft(){if(!jl&&dt!==null){jl=!0;var e=0,t=Z;try{var n=dt;for(Z=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}dt=null,Bs=!1}catch(s){throw dt!==null&&(dt=dt.slice(e+1)),Fu($i,Ft),s}finally{Z=t,jl=!1}}return null}var pn=[],hn=0,Ss=null,js=0,Fe=[],Be=0,Xt=null,ft=1,mt="";function Qt(e,t){pn[hn++]=js,pn[hn++]=Ss,Ss=e,js=t}function gc(e,t,n){Fe[Be++]=ft,Fe[Be++]=mt,Fe[Be++]=Xt,Xt=e;var r=ft;e=mt;var s=32-Je(r)-1;r&=~(1<<s),n+=1;var i=32-Je(t)+s;if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,ft=1<<32-Je(t)+s|n<<s|r,mt=i+e}else ft=1<<i|n<<s|r,mt=e}function Gi(e){e.return!==null&&(Qt(e,1),gc(e,1,0))}function qi(e){for(;e===Ss;)Ss=pn[--hn],pn[hn]=null,js=pn[--hn],pn[hn]=null;for(;e===Xt;)Xt=Fe[--Be],Fe[Be]=null,mt=Fe[--Be],Fe[Be]=null,ft=Fe[--Be],Fe[Be]=null}var Oe=null,Re=null,ne=!1,Ze=null;function yc(e,t){var n=He(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function _a(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Oe=e,Re=zt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Oe=e,Re=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Xt!==null?{id:ft,overflow:mt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=He(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Oe=e,Re=null,!0):!1;default:return!1}}function oi(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ai(e){if(ne){var t=Re;if(t){var n=t;if(!_a(e,t)){if(oi(e))throw Error(_(418));t=zt(n.nextSibling);var r=Oe;t&&_a(e,t)?yc(r,n):(e.flags=e.flags&-4097|2,ne=!1,Oe=e)}}else{if(oi(e))throw Error(_(418));e.flags=e.flags&-4097|2,ne=!1,Oe=e}}}function Ea(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Oe=e}function Kr(e){if(e!==Oe)return!1;if(!ne)return Ea(e),ne=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!ri(e.type,e.memoizedProps)),t&&(t=Re)){if(oi(e))throw vc(),Error(_(418));for(;t;)yc(e,t),t=zt(t.nextSibling)}if(Ea(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(_(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Re=zt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Re=null}}else Re=Oe?zt(e.stateNode.nextSibling):null;return!0}function vc(){for(var e=Re;e;)e=zt(e.nextSibling)}function Cn(){Re=Oe=null,ne=!1}function Yi(e){Ze===null?Ze=[e]:Ze.push(e)}var Om=vt.ReactCurrentBatchConfig;function Un(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(_(309));var r=n.stateNode}if(!r)throw Error(_(147,e));var s=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var a=s.refs;o===null?delete a[i]:a[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(_(284));if(!n._owner)throw Error(_(290,e))}return e}function Gr(e,t){throw e=Object.prototype.toString.call(t),Error(_(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ca(e){var t=e._init;return t(e._payload)}function wc(e){function t(f,c){if(e){var d=f.deletions;d===null?(f.deletions=[c],f.flags|=16):d.push(c)}}function n(f,c){if(!e)return null;for(;c!==null;)t(f,c),c=c.sibling;return null}function r(f,c){for(f=new Map;c!==null;)c.key!==null?f.set(c.key,c):f.set(c.index,c),c=c.sibling;return f}function s(f,c){return f=Rt(f,c),f.index=0,f.sibling=null,f}function i(f,c,d){return f.index=d,e?(d=f.alternate,d!==null?(d=d.index,d<c?(f.flags|=2,c):d):(f.flags|=2,c)):(f.flags|=1048576,c)}function o(f){return e&&f.alternate===null&&(f.flags|=2),f}function a(f,c,d,y){return c===null||c.tag!==6?(c=Ll(d,f.mode,y),c.return=f,c):(c=s(c,d),c.return=f,c)}function u(f,c,d,y){var j=d.type;return j===an?h(f,c,d.props.children,y,d.key):c!==null&&(c.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===St&&Ca(j)===c.type)?(y=s(c,d.props),y.ref=Un(f,c,d),y.return=f,y):(y=cs(d.type,d.key,d.props,null,f.mode,y),y.ref=Un(f,c,d),y.return=f,y)}function m(f,c,d,y){return c===null||c.tag!==4||c.stateNode.containerInfo!==d.containerInfo||c.stateNode.implementation!==d.implementation?(c=zl(d,f.mode,y),c.return=f,c):(c=s(c,d.children||[]),c.return=f,c)}function h(f,c,d,y,j){return c===null||c.tag!==7?(c=Zt(d,f.mode,y,j),c.return=f,c):(c=s(c,d),c.return=f,c)}function v(f,c,d){if(typeof c=="string"&&c!==""||typeof c=="number")return c=Ll(""+c,f.mode,d),c.return=f,c;if(typeof c=="object"&&c!==null){switch(c.$$typeof){case Or:return d=cs(c.type,c.key,c.props,null,f.mode,d),d.ref=Un(f,null,c),d.return=f,d;case on:return c=zl(c,f.mode,d),c.return=f,c;case St:var y=c._init;return v(f,y(c._payload),d)}if(Kn(c)||In(c))return c=Zt(c,f.mode,d,null),c.return=f,c;Gr(f,c)}return null}function x(f,c,d,y){var j=c!==null?c.key:null;if(typeof d=="string"&&d!==""||typeof d=="number")return j!==null?null:a(f,c,""+d,y);if(typeof d=="object"&&d!==null){switch(d.$$typeof){case Or:return d.key===j?u(f,c,d,y):null;case on:return d.key===j?m(f,c,d,y):null;case St:return j=d._init,x(f,c,j(d._payload),y)}if(Kn(d)||In(d))return j!==null?null:h(f,c,d,y,null);Gr(f,d)}return null}function S(f,c,d,y,j){if(typeof y=="string"&&y!==""||typeof y=="number")return f=f.get(d)||null,a(c,f,""+y,j);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Or:return f=f.get(y.key===null?d:y.key)||null,u(c,f,y,j);case on:return f=f.get(y.key===null?d:y.key)||null,m(c,f,y,j);case St:var b=y._init;return S(f,c,d,b(y._payload),j)}if(Kn(y)||In(y))return f=f.get(d)||null,h(c,f,y,j,null);Gr(c,y)}return null}function N(f,c,d,y){for(var j=null,b=null,T=c,P=c=0,B=null;T!==null&&P<d.length;P++){T.index>P?(B=T,T=null):B=T.sibling;var M=x(f,T,d[P],y);if(M===null){T===null&&(T=B);break}e&&T&&M.alternate===null&&t(f,T),c=i(M,c,P),b===null?j=M:b.sibling=M,b=M,T=B}if(P===d.length)return n(f,T),ne&&Qt(f,P),j;if(T===null){for(;P<d.length;P++)T=v(f,d[P],y),T!==null&&(c=i(T,c,P),b===null?j=T:b.sibling=T,b=T);return ne&&Qt(f,P),j}for(T=r(f,T);P<d.length;P++)B=S(T,f,P,d[P],y),B!==null&&(e&&B.alternate!==null&&T.delete(B.key===null?P:B.key),c=i(B,c,P),b===null?j=B:b.sibling=B,b=B);return e&&T.forEach(function(q){return t(f,q)}),ne&&Qt(f,P),j}function k(f,c,d,y){var j=In(d);if(typeof j!="function")throw Error(_(150));if(d=j.call(d),d==null)throw Error(_(151));for(var b=j=null,T=c,P=c=0,B=null,M=d.next();T!==null&&!M.done;P++,M=d.next()){T.index>P?(B=T,T=null):B=T.sibling;var q=x(f,T,M.value,y);if(q===null){T===null&&(T=B);break}e&&T&&q.alternate===null&&t(f,T),c=i(q,c,P),b===null?j=q:b.sibling=q,b=q,T=B}if(M.done)return n(f,T),ne&&Qt(f,P),j;if(T===null){for(;!M.done;P++,M=d.next())M=v(f,M.value,y),M!==null&&(c=i(M,c,P),b===null?j=M:b.sibling=M,b=M);return ne&&Qt(f,P),j}for(T=r(f,T);!M.done;P++,M=d.next())M=S(T,f,P,M.value,y),M!==null&&(e&&M.alternate!==null&&T.delete(M.key===null?P:M.key),c=i(M,c,P),b===null?j=M:b.sibling=M,b=M);return e&&T.forEach(function(G){return t(f,G)}),ne&&Qt(f,P),j}function O(f,c,d,y){if(typeof d=="object"&&d!==null&&d.type===an&&d.key===null&&(d=d.props.children),typeof d=="object"&&d!==null){switch(d.$$typeof){case Or:e:{for(var j=d.key,b=c;b!==null;){if(b.key===j){if(j=d.type,j===an){if(b.tag===7){n(f,b.sibling),c=s(b,d.props.children),c.return=f,f=c;break e}}else if(b.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===St&&Ca(j)===b.type){n(f,b.sibling),c=s(b,d.props),c.ref=Un(f,b,d),c.return=f,f=c;break e}n(f,b);break}else t(f,b);b=b.sibling}d.type===an?(c=Zt(d.props.children,f.mode,y,d.key),c.return=f,f=c):(y=cs(d.type,d.key,d.props,null,f.mode,y),y.ref=Un(f,c,d),y.return=f,f=y)}return o(f);case on:e:{for(b=d.key;c!==null;){if(c.key===b)if(c.tag===4&&c.stateNode.containerInfo===d.containerInfo&&c.stateNode.implementation===d.implementation){n(f,c.sibling),c=s(c,d.children||[]),c.return=f,f=c;break e}else{n(f,c);break}else t(f,c);c=c.sibling}c=zl(d,f.mode,y),c.return=f,f=c}return o(f);case St:return b=d._init,O(f,c,b(d._payload),y)}if(Kn(d))return N(f,c,d,y);if(In(d))return k(f,c,d,y);Gr(f,d)}return typeof d=="string"&&d!==""||typeof d=="number"?(d=""+d,c!==null&&c.tag===6?(n(f,c.sibling),c=s(c,d),c.return=f,f=c):(n(f,c),c=Ll(d,f.mode,y),c.return=f,f=c),o(f)):n(f,c)}return O}var Tn=wc(!0),Nc=wc(!1),bs=Vt(null),_s=null,xn=null,Zi=null;function Ji(){Zi=xn=_s=null}function Xi(e){var t=bs.current;te(bs),e._currentValue=t}function ui(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Sn(e,t){_s=e,Zi=xn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Le=!0),e.firstContext=null)}function We(e){var t=e._currentValue;if(Zi!==e)if(e={context:e,memoizedValue:t,next:null},xn===null){if(_s===null)throw Error(_(308));xn=e,_s.dependencies={lanes:0,firstContext:e}}else xn=xn.next=e;return t}var Gt=null;function eo(e){Gt===null?Gt=[e]:Gt.push(e)}function kc(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,eo(t)):(n.next=s.next,s.next=n),t.interleaved=n,gt(e,r)}function gt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var jt=!1;function to(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Sc(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 pt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Mt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,W&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,gt(e,n)}return s=r.interleaved,s===null?(t.next=t,eo(r)):(t.next=s.next,s.next=t),r.interleaved=t,gt(e,n)}function ss(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Vi(e,n)}}function Ta(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Es(e,t,n,r){var s=e.updateQueue;jt=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var u=a,m=u.next;u.next=null,o===null?i=m:o.next=m,o=u;var h=e.alternate;h!==null&&(h=h.updateQueue,a=h.lastBaseUpdate,a!==o&&(a===null?h.firstBaseUpdate=m:a.next=m,h.lastBaseUpdate=u))}if(i!==null){var v=s.baseState;o=0,h=m=u=null,a=i;do{var x=a.lane,S=a.eventTime;if((r&x)===x){h!==null&&(h=h.next={eventTime:S,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var N=e,k=a;switch(x=t,S=n,k.tag){case 1:if(N=k.payload,typeof N=="function"){v=N.call(S,v,x);break e}v=N;break e;case 3:N.flags=N.flags&-65537|128;case 0:if(N=k.payload,x=typeof N=="function"?N.call(S,v,x):N,x==null)break e;v=le({},v,x);break e;case 2:jt=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,x=s.effects,x===null?s.effects=[a]:x.push(a))}else S={eventTime:S,lane:x,tag:a.tag,payload:a.payload,callback:a.callback,next:null},h===null?(m=h=S,u=v):h=h.next=S,o|=x;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;x=a,a=x.next,x.next=null,s.lastBaseUpdate=x,s.shared.pending=null}}while(!0);if(h===null&&(u=v),s.baseState=u,s.firstBaseUpdate=m,s.lastBaseUpdate=h,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);tn|=o,e.lanes=o,e.memoizedState=v}}function Pa(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(_(191,s));s.call(r)}}}var Tr={},ot=Vt(Tr),gr=Vt(Tr),yr=Vt(Tr);function qt(e){if(e===Tr)throw Error(_(174));return e}function no(e,t){switch(X(yr,t),X(gr,e),X(ot,Tr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ul(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ul(t,e)}te(ot),X(ot,t)}function Pn(){te(ot),te(gr),te(yr)}function jc(e){qt(yr.current);var t=qt(ot.current),n=Ul(t,e.type);t!==n&&(X(gr,e),X(ot,n))}function ro(e){gr.current===e&&(te(ot),te(gr))}var re=Vt(0);function Cs(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)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 bl=[];function so(){for(var e=0;e<bl.length;e++)bl[e]._workInProgressVersionPrimary=null;bl.length=0}var ls=vt.ReactCurrentDispatcher,_l=vt.ReactCurrentBatchConfig,en=0,se=null,ce=null,fe=null,Ts=!1,tr=!1,vr=0,Im=0;function ve(){throw Error(_(321))}function lo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!et(e[n],t[n]))return!1;return!0}function io(e,t,n,r,s,i){if(en=i,se=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ls.current=e===null||e.memoizedState===null?Bm:Um,e=n(r,s),tr){i=0;do{if(tr=!1,vr=0,25<=i)throw Error(_(301));i+=1,fe=ce=null,t.updateQueue=null,ls.current=Hm,e=n(r,s)}while(tr)}if(ls.current=Ps,t=ce!==null&&ce.next!==null,en=0,fe=ce=se=null,Ts=!1,t)throw Error(_(300));return e}function oo(){var e=vr!==0;return vr=0,e}function st(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return fe===null?se.memoizedState=fe=e:fe=fe.next=e,fe}function Ke(){if(ce===null){var e=se.alternate;e=e!==null?e.memoizedState:null}else e=ce.next;var t=fe===null?se.memoizedState:fe.next;if(t!==null)fe=t,ce=e;else{if(e===null)throw Error(_(310));ce=e,e={memoizedState:ce.memoizedState,baseState:ce.baseState,baseQueue:ce.baseQueue,queue:ce.queue,next:null},fe===null?se.memoizedState=fe=e:fe=fe.next=e}return fe}function wr(e,t){return typeof t=="function"?t(e):t}function El(e){var t=Ke(),n=t.queue;if(n===null)throw Error(_(311));n.lastRenderedReducer=e;var r=ce,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var a=o=null,u=null,m=i;do{var h=m.lane;if((en&h)===h)u!==null&&(u=u.next={lane:0,action:m.action,hasEagerState:m.hasEagerState,eagerState:m.eagerState,next:null}),r=m.hasEagerState?m.eagerState:e(r,m.action);else{var v={lane:h,action:m.action,hasEagerState:m.hasEagerState,eagerState:m.eagerState,next:null};u===null?(a=u=v,o=r):u=u.next=v,se.lanes|=h,tn|=h}m=m.next}while(m!==null&&m!==i);u===null?o=r:u.next=a,et(r,t.memoizedState)||(Le=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do i=s.lane,se.lanes|=i,tn|=i,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Cl(e){var t=Ke(),n=t.queue;if(n===null)throw Error(_(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,i=t.memoizedState;if(s!==null){n.pending=null;var o=s=s.next;do i=e(i,o.action),o=o.next;while(o!==s);et(i,t.memoizedState)||(Le=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function bc(){}function _c(e,t){var n=se,r=Ke(),s=t(),i=!et(r.memoizedState,s);if(i&&(r.memoizedState=s,Le=!0),r=r.queue,ao(Tc.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||fe!==null&&fe.memoizedState.tag&1){if(n.flags|=2048,Nr(9,Cc.bind(null,n,r,s,t),void 0,null),me===null)throw Error(_(349));en&30||Ec(n,t,s)}return s}function Ec(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=se.updateQueue,t===null?(t={lastEffect:null,stores:null},se.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Cc(e,t,n,r){t.value=n,t.getSnapshot=r,Pc(t)&&Lc(e)}function Tc(e,t,n){return n(function(){Pc(t)&&Lc(e)})}function Pc(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!et(e,n)}catch{return!0}}function Lc(e){var t=gt(e,1);t!==null&&Xe(t,e,1,-1)}function La(e){var t=st();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:wr,lastRenderedState:e},t.queue=e,e=e.dispatch=Fm.bind(null,se,e),[t.memoizedState,e]}function Nr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=se.updateQueue,t===null?(t={lastEffect:null,stores:null},se.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function zc(){return Ke().memoizedState}function is(e,t,n,r){var s=st();se.flags|=e,s.memoizedState=Nr(1|t,n,void 0,r===void 0?null:r)}function Us(e,t,n,r){var s=Ke();r=r===void 0?null:r;var i=void 0;if(ce!==null){var o=ce.memoizedState;if(i=o.destroy,r!==null&&lo(r,o.deps)){s.memoizedState=Nr(t,n,i,r);return}}se.flags|=e,s.memoizedState=Nr(1|t,n,i,r)}function za(e,t){return is(8390656,8,e,t)}function ao(e,t){return Us(2048,8,e,t)}function Mc(e,t){return Us(4,2,e,t)}function Ac(e,t){return Us(4,4,e,t)}function Dc(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 Rc(e,t,n){return n=n!=null?n.concat([e]):null,Us(4,4,Dc.bind(null,t,e),n)}function uo(){}function Oc(e,t){var n=Ke();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&lo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ic(e,t){var n=Ke();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&lo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function $c(e,t,n){return en&21?(et(n,t)||(n=Hu(),se.lanes|=n,tn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Le=!0),e.memoizedState=n)}function $m(e,t){var n=Z;Z=n!==0&&4>n?n:4,e(!0);var r=_l.transition;_l.transition={};try{e(!1),t()}finally{Z=n,_l.transition=r}}function Vc(){return Ke().memoizedState}function Vm(e,t,n){var r=Dt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Fc(e))Bc(t,n);else if(n=kc(e,t,n,r),n!==null){var s=be();Xe(n,e,r,s),Uc(n,t,r)}}function Fm(e,t,n){var r=Dt(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Fc(e))Bc(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,a=i(o,n);if(s.hasEagerState=!0,s.eagerState=a,et(a,o)){var u=t.interleaved;u===null?(s.next=s,eo(t)):(s.next=u.next,u.next=s),t.interleaved=s;return}}catch{}finally{}n=kc(e,t,s,r),n!==null&&(s=be(),Xe(n,e,r,s),Uc(n,t,r))}}function Fc(e){var t=e.alternate;return e===se||t!==null&&t===se}function Bc(e,t){tr=Ts=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Uc(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Vi(e,n)}}var Ps={readContext:We,useCallback:ve,useContext:ve,useEffect:ve,useImperativeHandle:ve,useInsertionEffect:ve,useLayoutEffect:ve,useMemo:ve,useReducer:ve,useRef:ve,useState:ve,useDebugValue:ve,useDeferredValue:ve,useTransition:ve,useMutableSource:ve,useSyncExternalStore:ve,useId:ve,unstable_isNewReconciler:!1},Bm={readContext:We,useCallback:function(e,t){return st().memoizedState=[e,t===void 0?null:t],e},useContext:We,useEffect:za,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,is(4194308,4,Dc.bind(null,t,e),n)},useLayoutEffect:function(e,t){return is(4194308,4,e,t)},useInsertionEffect:function(e,t){return is(4,2,e,t)},useMemo:function(e,t){var n=st();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=st();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Vm.bind(null,se,e),[r.memoizedState,e]},useRef:function(e){var t=st();return e={current:e},t.memoizedState=e},useState:La,useDebugValue:uo,useDeferredValue:function(e){return st().memoizedState=e},useTransition:function(){var e=La(!1),t=e[0];return e=$m.bind(null,e[1]),st().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=se,s=st();if(ne){if(n===void 0)throw Error(_(407));n=n()}else{if(n=t(),me===null)throw Error(_(349));en&30||Ec(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,za(Tc.bind(null,r,i,e),[e]),r.flags|=2048,Nr(9,Cc.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=st(),t=me.identifierPrefix;if(ne){var n=mt,r=ft;n=(r&~(1<<32-Je(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=vr++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Im++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Um={readContext:We,useCallback:Oc,useContext:We,useEffect:ao,useImperativeHandle:Rc,useInsertionEffect:Mc,useLayoutEffect:Ac,useMemo:Ic,useReducer:El,useRef:zc,useState:function(){return El(wr)},useDebugValue:uo,useDeferredValue:function(e){var t=Ke();return $c(t,ce.memoizedState,e)},useTransition:function(){var e=El(wr)[0],t=Ke().memoizedState;return[e,t]},useMutableSource:bc,useSyncExternalStore:_c,useId:Vc,unstable_isNewReconciler:!1},Hm={readContext:We,useCallback:Oc,useContext:We,useEffect:ao,useImperativeHandle:Rc,useInsertionEffect:Mc,useLayoutEffect:Ac,useMemo:Ic,useReducer:Cl,useRef:zc,useState:function(){return Cl(wr)},useDebugValue:uo,useDeferredValue:function(e){var t=Ke();return ce===null?t.memoizedState=e:$c(t,ce.memoizedState,e)},useTransition:function(){var e=Cl(wr)[0],t=Ke().memoizedState;return[e,t]},useMutableSource:bc,useSyncExternalStore:_c,useId:Vc,unstable_isNewReconciler:!1};function qe(e,t){if(e&&e.defaultProps){t=le({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function ci(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:le({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Hs={isMounted:function(e){return(e=e._reactInternals)?sn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=be(),s=Dt(e),i=pt(r,s);i.payload=t,n!=null&&(i.callback=n),t=Mt(e,i,s),t!==null&&(Xe(t,e,s,r),ss(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=be(),s=Dt(e),i=pt(r,s);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Mt(e,i,s),t!==null&&(Xe(t,e,s,r),ss(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=be(),r=Dt(e),s=pt(n,r);s.tag=2,t!=null&&(s.callback=t),t=Mt(e,s,r),t!==null&&(Xe(t,e,r,n),ss(t,e,r))}};function Ma(e,t,n,r,s,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,o):t.prototype&&t.prototype.isPureReactComponent?!mr(n,r)||!mr(s,i):!0}function Hc(e,t,n){var r=!1,s=It,i=t.contextType;return typeof i=="object"&&i!==null?i=We(i):(s=Me(t)?Jt:ke.current,r=t.contextTypes,i=(r=r!=null)?En(e,s):It),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Hs,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function Aa(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Hs.enqueueReplaceState(t,t.state,null)}function di(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},to(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=We(i):(i=Me(t)?Jt:ke.current,s.context=En(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(ci(e,t,i,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&Hs.enqueueReplaceState(s,s.state,null),Es(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Ln(e,t){try{var n="",r=t;do n+=yf(r),r=r.return;while(r);var s=n}catch(i){s=`
|
|
Error generating stack: `+i.message+`
|
|
`+i.stack}return{value:e,source:t,stack:s,digest:null}}function Tl(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function fi(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Qm=typeof WeakMap=="function"?WeakMap:Map;function Qc(e,t,n){n=pt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){zs||(zs=!0,ki=r),fi(e,t)},n}function Wc(e,t,n){n=pt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){fi(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){fi(e,t),typeof r!="function"&&(At===null?At=new Set([this]):At.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Da(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Qm;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=lp.bind(null,e,t,n),t.then(e,e))}function Ra(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 Oa(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=pt(-1,1),t.tag=2,Mt(n,t,1))),n.lanes|=1),e)}var Wm=vt.ReactCurrentOwner,Le=!1;function je(e,t,n,r){t.child=e===null?Nc(t,null,n,r):Tn(t,e.child,n,r)}function Ia(e,t,n,r,s){n=n.render;var i=t.ref;return Sn(t,s),r=io(e,t,n,r,i,s),n=oo(),e!==null&&!Le?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,yt(e,t,s)):(ne&&n&&Gi(t),t.flags|=1,je(e,t,r,s),t.child)}function $a(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!yo(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Kc(e,t,i,r,s)):(e=cs(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:mr,n(o,r)&&e.ref===t.ref)return yt(e,t,s)}return t.flags|=1,e=Rt(i,r),e.ref=t.ref,e.return=t,t.child=e}function Kc(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(mr(i,r)&&e.ref===t.ref)if(Le=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(Le=!0);else return t.lanes=e.lanes,yt(e,t,s)}return mi(e,t,n,r,s)}function Gc(e,t,n){var r=t.pendingProps,s=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},X(yn,De),De|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,X(yn,De),De|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,X(yn,De),De|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,X(yn,De),De|=r;return je(e,t,s,n),t.child}function qc(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function mi(e,t,n,r,s){var i=Me(n)?Jt:ke.current;return i=En(t,i),Sn(t,s),n=io(e,t,n,r,i,s),r=oo(),e!==null&&!Le?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,yt(e,t,s)):(ne&&r&&Gi(t),t.flags|=1,je(e,t,n,s),t.child)}function Va(e,t,n,r,s){if(Me(n)){var i=!0;ks(t)}else i=!1;if(Sn(t,s),t.stateNode===null)os(e,t),Hc(t,n,r),di(t,n,r,s),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var u=o.context,m=n.contextType;typeof m=="object"&&m!==null?m=We(m):(m=Me(n)?Jt:ke.current,m=En(t,m));var h=n.getDerivedStateFromProps,v=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function";v||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||u!==m)&&Aa(t,o,r,m),jt=!1;var x=t.memoizedState;o.state=x,Es(t,r,o,s),u=t.memoizedState,a!==r||x!==u||ze.current||jt?(typeof h=="function"&&(ci(t,n,h,r),u=t.memoizedState),(a=jt||Ma(t,n,a,r,x,u,m))?(v||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),o.props=r,o.state=u,o.context=m,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Sc(e,t),a=t.memoizedProps,m=t.type===t.elementType?a:qe(t.type,a),o.props=m,v=t.pendingProps,x=o.context,u=n.contextType,typeof u=="object"&&u!==null?u=We(u):(u=Me(n)?Jt:ke.current,u=En(t,u));var S=n.getDerivedStateFromProps;(h=typeof S=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==v||x!==u)&&Aa(t,o,r,u),jt=!1,x=t.memoizedState,o.state=x,Es(t,r,o,s);var N=t.memoizedState;a!==v||x!==N||ze.current||jt?(typeof S=="function"&&(ci(t,n,S,r),N=t.memoizedState),(m=jt||Ma(t,n,m,r,x,N,u)||!1)?(h||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,N,u),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,N,u)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&x===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&x===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=N),o.props=r,o.state=N,o.context=u,r=m):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&x===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&x===e.memoizedState||(t.flags|=1024),r=!1)}return pi(e,t,n,r,i,s)}function pi(e,t,n,r,s,i){qc(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return s&&ba(t,n,!1),yt(e,t,i);r=t.stateNode,Wm.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Tn(t,e.child,null,i),t.child=Tn(t,null,a,i)):je(e,t,a,i),t.memoizedState=r.state,s&&ba(t,n,!0),t.child}function Yc(e){var t=e.stateNode;t.pendingContext?ja(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ja(e,t.context,!1),no(e,t.containerInfo)}function Fa(e,t,n,r,s){return Cn(),Yi(s),t.flags|=256,je(e,t,n,r),t.child}var hi={dehydrated:null,treeContext:null,retryLane:0};function xi(e){return{baseLanes:e,cachePool:null,transitions:null}}function Zc(e,t,n){var r=t.pendingProps,s=re.current,i=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),X(re,s&1),e===null)return ai(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,i?(r=t.mode,i=t.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=Ks(o,r,0,null),e=Zt(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=xi(n),t.memoizedState=hi,e):co(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return Km(e,t,o,r,a,s,n);if(i){i=r.fallback,o=t.mode,s=e.child,a=s.sibling;var u={mode:"hidden",children:r.children};return!(o&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=Rt(s,u),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=Rt(a,i):(i=Zt(i,o,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,o=e.child.memoizedState,o=o===null?xi(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=hi,r}return i=e.child,e=i.sibling,r=Rt(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function co(e,t){return t=Ks({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function qr(e,t,n,r){return r!==null&&Yi(r),Tn(t,e.child,null,n),e=co(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Km(e,t,n,r,s,i,o){if(n)return t.flags&256?(t.flags&=-257,r=Tl(Error(_(422))),qr(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=Ks({mode:"visible",children:r.children},s,0,null),i=Zt(i,s,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&Tn(t,e.child,null,o),t.child.memoizedState=xi(o),t.memoizedState=hi,i);if(!(t.mode&1))return qr(e,t,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(_(419)),r=Tl(i,r,void 0),qr(e,t,o,r)}if(a=(o&e.childLanes)!==0,Le||a){if(r=me,r!==null){switch(o&-o){case 4:s=2;break;case 16:s=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:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,gt(e,s),Xe(r,e,s,-1))}return go(),r=Tl(Error(_(421))),qr(e,t,o,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=ip.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,Re=zt(s.nextSibling),Oe=t,ne=!0,Ze=null,e!==null&&(Fe[Be++]=ft,Fe[Be++]=mt,Fe[Be++]=Xt,ft=e.id,mt=e.overflow,Xt=t),t=co(t,r.children),t.flags|=4096,t)}function Ba(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ui(e.return,t,n)}function Pl(e,t,n,r,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function Jc(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(je(e,t,r.children,n),r=re.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ba(e,n,t);else if(e.tag===19)Ba(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(X(re,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&Cs(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Pl(t,!1,s,n,i);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Cs(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Pl(t,!0,n,null,i);break;case"together":Pl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function os(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function yt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),tn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(_(153));if(t.child!==null){for(e=t.child,n=Rt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Rt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Gm(e,t,n){switch(t.tag){case 3:Yc(t),Cn();break;case 5:jc(t);break;case 1:Me(t.type)&&ks(t);break;case 4:no(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;X(bs,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(X(re,re.current&1),t.flags|=128,null):n&t.child.childLanes?Zc(e,t,n):(X(re,re.current&1),e=yt(e,t,n),e!==null?e.sibling:null);X(re,re.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Jc(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),X(re,re.current),r)break;return null;case 22:case 23:return t.lanes=0,Gc(e,t,n)}return yt(e,t,n)}var Xc,gi,ed,td;Xc=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};gi=function(){};ed=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,qt(ot.current);var i=null;switch(n){case"input":s=$l(e,s),r=$l(e,r),i=[];break;case"select":s=le({},s,{value:void 0}),r=le({},r,{value:void 0}),i=[];break;case"textarea":s=Bl(e,s),r=Bl(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ws)}Hl(n,r);var o;n=null;for(m in s)if(!r.hasOwnProperty(m)&&s.hasOwnProperty(m)&&s[m]!=null)if(m==="style"){var a=s[m];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else m!=="dangerouslySetInnerHTML"&&m!=="children"&&m!=="suppressContentEditableWarning"&&m!=="suppressHydrationWarning"&&m!=="autoFocus"&&(ir.hasOwnProperty(m)?i||(i=[]):(i=i||[]).push(m,null));for(m in r){var u=r[m];if(a=s!=null?s[m]:void 0,r.hasOwnProperty(m)&&u!==a&&(u!=null||a!=null))if(m==="style")if(a){for(o in a)!a.hasOwnProperty(o)||u&&u.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in u)u.hasOwnProperty(o)&&a[o]!==u[o]&&(n||(n={}),n[o]=u[o])}else n||(i||(i=[]),i.push(m,n)),n=u;else m==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,a=a?a.__html:void 0,u!=null&&a!==u&&(i=i||[]).push(m,u)):m==="children"?typeof u!="string"&&typeof u!="number"||(i=i||[]).push(m,""+u):m!=="suppressContentEditableWarning"&&m!=="suppressHydrationWarning"&&(ir.hasOwnProperty(m)?(u!=null&&m==="onScroll"&&ee("scroll",e),i||a===u||(i=[])):(i=i||[]).push(m,u))}n&&(i=i||[]).push("style",n);var m=i;(t.updateQueue=m)&&(t.flags|=4)}};td=function(e,t,n,r){n!==r&&(t.flags|=4)};function Hn(e,t){if(!ne)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function we(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function qm(e,t,n){var r=t.pendingProps;switch(qi(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return we(t),null;case 1:return Me(t.type)&&Ns(),we(t),null;case 3:return r=t.stateNode,Pn(),te(ze),te(ke),so(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Kr(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ze!==null&&(bi(Ze),Ze=null))),gi(e,t),we(t),null;case 5:ro(t);var s=qt(yr.current);if(n=t.type,e!==null&&t.stateNode!=null)ed(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(_(166));return we(t),null}if(e=qt(ot.current),Kr(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[lt]=t,r[xr]=i,e=(t.mode&1)!==0,n){case"dialog":ee("cancel",r),ee("close",r);break;case"iframe":case"object":case"embed":ee("load",r);break;case"video":case"audio":for(s=0;s<qn.length;s++)ee(qn[s],r);break;case"source":ee("error",r);break;case"img":case"image":case"link":ee("error",r),ee("load",r);break;case"details":ee("toggle",r);break;case"input":Zo(r,i),ee("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},ee("invalid",r);break;case"textarea":Xo(r,i),ee("invalid",r)}Hl(n,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];o==="children"?typeof a=="string"?r.textContent!==a&&(i.suppressHydrationWarning!==!0&&Wr(r.textContent,a,e),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&Wr(r.textContent,a,e),s=["children",""+a]):ir.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&ee("scroll",r)}switch(n){case"input":Ir(r),Jo(r,i,!0);break;case"textarea":Ir(r),ea(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=ws)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Tu(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[lt]=t,e[xr]=r,Xc(e,t,!1,!1),t.stateNode=e;e:{switch(o=Ql(n,r),n){case"dialog":ee("cancel",e),ee("close",e),s=r;break;case"iframe":case"object":case"embed":ee("load",e),s=r;break;case"video":case"audio":for(s=0;s<qn.length;s++)ee(qn[s],e);s=r;break;case"source":ee("error",e),s=r;break;case"img":case"image":case"link":ee("error",e),ee("load",e),s=r;break;case"details":ee("toggle",e),s=r;break;case"input":Zo(e,r),s=$l(e,r),ee("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=le({},r,{value:void 0}),ee("invalid",e);break;case"textarea":Xo(e,r),s=Bl(e,r),ee("invalid",e);break;default:s=r}Hl(n,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var u=a[i];i==="style"?zu(e,u):i==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&Pu(e,u)):i==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&or(e,u):typeof u=="number"&&or(e,""+u):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(ir.hasOwnProperty(i)?u!=null&&i==="onScroll"&&ee("scroll",e):u!=null&&Ai(e,i,u,o))}switch(n){case"input":Ir(e),Jo(e,r,!1);break;case"textarea":Ir(e),ea(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Ot(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?vn(e,!!r.multiple,i,!1):r.defaultValue!=null&&vn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=ws)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return we(t),null;case 6:if(e&&t.stateNode!=null)td(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(_(166));if(n=qt(yr.current),qt(ot.current),Kr(t)){if(r=t.stateNode,n=t.memoizedProps,r[lt]=t,(i=r.nodeValue!==n)&&(e=Oe,e!==null))switch(e.tag){case 3:Wr(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Wr(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[lt]=t,t.stateNode=r}return we(t),null;case 13:if(te(re),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ne&&Re!==null&&t.mode&1&&!(t.flags&128))vc(),Cn(),t.flags|=98560,i=!1;else if(i=Kr(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(_(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(_(317));i[lt]=t}else Cn(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;we(t),i=!1}else Ze!==null&&(bi(Ze),Ze=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||re.current&1?de===0&&(de=3):go())),t.updateQueue!==null&&(t.flags|=4),we(t),null);case 4:return Pn(),gi(e,t),e===null&&pr(t.stateNode.containerInfo),we(t),null;case 10:return Xi(t.type._context),we(t),null;case 17:return Me(t.type)&&Ns(),we(t),null;case 19:if(te(re),i=t.memoizedState,i===null)return we(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)Hn(i,!1);else{if(de!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Cs(e),o!==null){for(t.flags|=128,Hn(i,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return X(re,re.current&1|2),t.child}e=e.sibling}i.tail!==null&&oe()>zn&&(t.flags|=128,r=!0,Hn(i,!1),t.lanes=4194304)}else{if(!r)if(e=Cs(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Hn(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!ne)return we(t),null}else 2*oe()-i.renderingStartTime>zn&&n!==1073741824&&(t.flags|=128,r=!0,Hn(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=oe(),t.sibling=null,n=re.current,X(re,r?n&1|2:n&1),t):(we(t),null);case 22:case 23:return xo(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?De&1073741824&&(we(t),t.subtreeFlags&6&&(t.flags|=8192)):we(t),null;case 24:return null;case 25:return null}throw Error(_(156,t.tag))}function Ym(e,t){switch(qi(t),t.tag){case 1:return Me(t.type)&&Ns(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Pn(),te(ze),te(ke),so(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ro(t),null;case 13:if(te(re),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(_(340));Cn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return te(re),null;case 4:return Pn(),null;case 10:return Xi(t.type._context),null;case 22:case 23:return xo(),null;case 24:return null;default:return null}}var Yr=!1,Ne=!1,Zm=typeof WeakSet=="function"?WeakSet:Set,A=null;function gn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ie(e,t,r)}else n.current=null}function yi(e,t,n){try{n()}catch(r){ie(e,t,r)}}var Ua=!1;function Jm(e,t){if(ti=gs,e=ic(),Ki(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,a=-1,u=-1,m=0,h=0,v=e,x=null;t:for(;;){for(var S;v!==n||s!==0&&v.nodeType!==3||(a=o+s),v!==i||r!==0&&v.nodeType!==3||(u=o+r),v.nodeType===3&&(o+=v.nodeValue.length),(S=v.firstChild)!==null;)x=v,v=S;for(;;){if(v===e)break t;if(x===n&&++m===s&&(a=o),x===i&&++h===r&&(u=o),(S=v.nextSibling)!==null)break;v=x,x=v.parentNode}v=S}n=a===-1||u===-1?null:{start:a,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(ni={focusedElem:e,selectionRange:n},gs=!1,A=t;A!==null;)if(t=A,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,A=e;else for(;A!==null;){t=A;try{var N=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(N!==null){var k=N.memoizedProps,O=N.memoizedState,f=t.stateNode,c=f.getSnapshotBeforeUpdate(t.elementType===t.type?k:qe(t.type,k),O);f.__reactInternalSnapshotBeforeUpdate=c}break;case 3:var d=t.stateNode.containerInfo;d.nodeType===1?d.textContent="":d.nodeType===9&&d.documentElement&&d.removeChild(d.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(_(163))}}catch(y){ie(t,t.return,y)}if(e=t.sibling,e!==null){e.return=t.return,A=e;break}A=t.return}return N=Ua,Ua=!1,N}function nr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&yi(t,n,i)}s=s.next}while(s!==r)}}function Qs(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function vi(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function nd(e){var t=e.alternate;t!==null&&(e.alternate=null,nd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[lt],delete t[xr],delete t[li],delete t[Am],delete t[Dm])),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 rd(e){return e.tag===5||e.tag===3||e.tag===4}function Ha(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||rd(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 wi(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ws));else if(r!==4&&(e=e.child,e!==null))for(wi(e,t,n),e=e.sibling;e!==null;)wi(e,t,n),e=e.sibling}function Ni(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Ni(e,t,n),e=e.sibling;e!==null;)Ni(e,t,n),e=e.sibling}var pe=null,Ye=!1;function kt(e,t,n){for(n=n.child;n!==null;)sd(e,t,n),n=n.sibling}function sd(e,t,n){if(it&&typeof it.onCommitFiberUnmount=="function")try{it.onCommitFiberUnmount(Os,n)}catch{}switch(n.tag){case 5:Ne||gn(n,t);case 6:var r=pe,s=Ye;pe=null,kt(e,t,n),pe=r,Ye=s,pe!==null&&(Ye?(e=pe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):pe.removeChild(n.stateNode));break;case 18:pe!==null&&(Ye?(e=pe,n=n.stateNode,e.nodeType===8?Sl(e.parentNode,n):e.nodeType===1&&Sl(e,n),dr(e)):Sl(pe,n.stateNode));break;case 4:r=pe,s=Ye,pe=n.stateNode.containerInfo,Ye=!0,kt(e,t,n),pe=r,Ye=s;break;case 0:case 11:case 14:case 15:if(!Ne&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&yi(n,t,o),s=s.next}while(s!==r)}kt(e,t,n);break;case 1:if(!Ne&&(gn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ie(n,t,a)}kt(e,t,n);break;case 21:kt(e,t,n);break;case 22:n.mode&1?(Ne=(r=Ne)||n.memoizedState!==null,kt(e,t,n),Ne=r):kt(e,t,n);break;default:kt(e,t,n)}}function Qa(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Zm),t.forEach(function(r){var s=op.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Ge(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:pe=a.stateNode,Ye=!1;break e;case 3:pe=a.stateNode.containerInfo,Ye=!0;break e;case 4:pe=a.stateNode.containerInfo,Ye=!0;break e}a=a.return}if(pe===null)throw Error(_(160));sd(i,o,s),pe=null,Ye=!1;var u=s.alternate;u!==null&&(u.return=null),s.return=null}catch(m){ie(s,t,m)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)ld(t,e),t=t.sibling}function ld(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ge(t,e),rt(e),r&4){try{nr(3,e,e.return),Qs(3,e)}catch(k){ie(e,e.return,k)}try{nr(5,e,e.return)}catch(k){ie(e,e.return,k)}}break;case 1:Ge(t,e),rt(e),r&512&&n!==null&&gn(n,n.return);break;case 5:if(Ge(t,e),rt(e),r&512&&n!==null&&gn(n,n.return),e.flags&32){var s=e.stateNode;try{or(s,"")}catch(k){ie(e,e.return,k)}}if(r&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,o=n!==null?n.memoizedProps:i,a=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&Eu(s,i),Ql(a,o);var m=Ql(a,i);for(o=0;o<u.length;o+=2){var h=u[o],v=u[o+1];h==="style"?zu(s,v):h==="dangerouslySetInnerHTML"?Pu(s,v):h==="children"?or(s,v):Ai(s,h,v,m)}switch(a){case"input":Vl(s,i);break;case"textarea":Cu(s,i);break;case"select":var x=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var S=i.value;S!=null?vn(s,!!i.multiple,S,!1):x!==!!i.multiple&&(i.defaultValue!=null?vn(s,!!i.multiple,i.defaultValue,!0):vn(s,!!i.multiple,i.multiple?[]:"",!1))}s[xr]=i}catch(k){ie(e,e.return,k)}}break;case 6:if(Ge(t,e),rt(e),r&4){if(e.stateNode===null)throw Error(_(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(k){ie(e,e.return,k)}}break;case 3:if(Ge(t,e),rt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{dr(t.containerInfo)}catch(k){ie(e,e.return,k)}break;case 4:Ge(t,e),rt(e);break;case 13:Ge(t,e),rt(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(po=oe())),r&4&&Qa(e);break;case 22:if(h=n!==null&&n.memoizedState!==null,e.mode&1?(Ne=(m=Ne)||h,Ge(t,e),Ne=m):Ge(t,e),rt(e),r&8192){if(m=e.memoizedState!==null,(e.stateNode.isHidden=m)&&!h&&e.mode&1)for(A=e,h=e.child;h!==null;){for(v=A=h;A!==null;){switch(x=A,S=x.child,x.tag){case 0:case 11:case 14:case 15:nr(4,x,x.return);break;case 1:gn(x,x.return);var N=x.stateNode;if(typeof N.componentWillUnmount=="function"){r=x,n=x.return;try{t=r,N.props=t.memoizedProps,N.state=t.memoizedState,N.componentWillUnmount()}catch(k){ie(r,n,k)}}break;case 5:gn(x,x.return);break;case 22:if(x.memoizedState!==null){Ka(v);continue}}S!==null?(S.return=x,A=S):Ka(v)}h=h.sibling}e:for(h=null,v=e;;){if(v.tag===5){if(h===null){h=v;try{s=v.stateNode,m?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=v.stateNode,u=v.memoizedProps.style,o=u!=null&&u.hasOwnProperty("display")?u.display:null,a.style.display=Lu("display",o))}catch(k){ie(e,e.return,k)}}}else if(v.tag===6){if(h===null)try{v.stateNode.nodeValue=m?"":v.memoizedProps}catch(k){ie(e,e.return,k)}}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;h===v&&(h=null),v=v.return}h===v&&(h=null),v.sibling.return=v.return,v=v.sibling}}break;case 19:Ge(t,e),rt(e),r&4&&Qa(e);break;case 21:break;default:Ge(t,e),rt(e)}}function rt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(rd(n)){var r=n;break e}n=n.return}throw Error(_(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(or(s,""),r.flags&=-33);var i=Ha(e);Ni(e,i,s);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Ha(e);wi(e,a,o);break;default:throw Error(_(161))}}catch(u){ie(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Xm(e,t,n){A=e,id(e)}function id(e,t,n){for(var r=(e.mode&1)!==0;A!==null;){var s=A,i=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||Yr;if(!o){var a=s.alternate,u=a!==null&&a.memoizedState!==null||Ne;a=Yr;var m=Ne;if(Yr=o,(Ne=u)&&!m)for(A=s;A!==null;)o=A,u=o.child,o.tag===22&&o.memoizedState!==null?Ga(s):u!==null?(u.return=o,A=u):Ga(s);for(;i!==null;)A=i,id(i),i=i.sibling;A=s,Yr=a,Ne=m}Wa(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,A=i):Wa(e)}}function Wa(e){for(;A!==null;){var t=A;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ne||Qs(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ne)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:qe(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Pa(t,i,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Pa(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var m=t.alternate;if(m!==null){var h=m.memoizedState;if(h!==null){var v=h.dehydrated;v!==null&&dr(v)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(_(163))}Ne||t.flags&512&&vi(t)}catch(x){ie(t,t.return,x)}}if(t===e){A=null;break}if(n=t.sibling,n!==null){n.return=t.return,A=n;break}A=t.return}}function Ka(e){for(;A!==null;){var t=A;if(t===e){A=null;break}var n=t.sibling;if(n!==null){n.return=t.return,A=n;break}A=t.return}}function Ga(e){for(;A!==null;){var t=A;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Qs(4,t)}catch(u){ie(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(u){ie(t,s,u)}}var i=t.return;try{vi(t)}catch(u){ie(t,i,u)}break;case 5:var o=t.return;try{vi(t)}catch(u){ie(t,o,u)}}}catch(u){ie(t,t.return,u)}if(t===e){A=null;break}var a=t.sibling;if(a!==null){a.return=t.return,A=a;break}A=t.return}}var ep=Math.ceil,Ls=vt.ReactCurrentDispatcher,fo=vt.ReactCurrentOwner,Qe=vt.ReactCurrentBatchConfig,W=0,me=null,ue=null,he=0,De=0,yn=Vt(0),de=0,kr=null,tn=0,Ws=0,mo=0,rr=null,Pe=null,po=0,zn=1/0,ct=null,zs=!1,ki=null,At=null,Zr=!1,Ct=null,Ms=0,sr=0,Si=null,as=-1,us=0;function be(){return W&6?oe():as!==-1?as:as=oe()}function Dt(e){return e.mode&1?W&2&&he!==0?he&-he:Om.transition!==null?(us===0&&(us=Hu()),us):(e=Z,e!==0||(e=window.event,e=e===void 0?16:Zu(e.type)),e):1}function Xe(e,t,n,r){if(50<sr)throw sr=0,Si=null,Error(_(185));_r(e,n,r),(!(W&2)||e!==me)&&(e===me&&(!(W&2)&&(Ws|=n),de===4&&_t(e,he)),Ae(e,r),n===1&&W===0&&!(t.mode&1)&&(zn=oe()+500,Bs&&Ft()))}function Ae(e,t){var n=e.callbackNode;Of(e,t);var r=xs(e,e===me?he:0);if(r===0)n!==null&&ra(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&ra(n),t===1)e.tag===0?Rm(qa.bind(null,e)):xc(qa.bind(null,e)),zm(function(){!(W&6)&&Ft()}),n=null;else{switch(Qu(r)){case 1:n=$i;break;case 4:n=Bu;break;case 16:n=hs;break;case 536870912:n=Uu;break;default:n=hs}n=pd(n,od.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function od(e,t){if(as=-1,us=0,W&6)throw Error(_(327));var n=e.callbackNode;if(jn()&&e.callbackNode!==n)return null;var r=xs(e,e===me?he:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=As(e,r);else{t=r;var s=W;W|=2;var i=ud();(me!==e||he!==t)&&(ct=null,zn=oe()+500,Yt(e,t));do try{rp();break}catch(a){ad(e,a)}while(!0);Ji(),Ls.current=i,W=s,ue!==null?t=0:(me=null,he=0,t=de)}if(t!==0){if(t===2&&(s=Yl(e),s!==0&&(r=s,t=ji(e,s))),t===1)throw n=kr,Yt(e,0),_t(e,r),Ae(e,oe()),n;if(t===6)_t(e,r);else{if(s=e.current.alternate,!(r&30)&&!tp(s)&&(t=As(e,r),t===2&&(i=Yl(e),i!==0&&(r=i,t=ji(e,i))),t===1))throw n=kr,Yt(e,0),_t(e,r),Ae(e,oe()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(_(345));case 2:Wt(e,Pe,ct);break;case 3:if(_t(e,r),(r&130023424)===r&&(t=po+500-oe(),10<t)){if(xs(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){be(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=si(Wt.bind(null,e,Pe,ct),t);break}Wt(e,Pe,ct);break;case 4:if(_t(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var o=31-Je(r);i=1<<o,o=t[o],o>s&&(s=o),r&=~i}if(r=s,r=oe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ep(r/1960))-r,10<r){e.timeoutHandle=si(Wt.bind(null,e,Pe,ct),r);break}Wt(e,Pe,ct);break;case 5:Wt(e,Pe,ct);break;default:throw Error(_(329))}}}return Ae(e,oe()),e.callbackNode===n?od.bind(null,e):null}function ji(e,t){var n=rr;return e.current.memoizedState.isDehydrated&&(Yt(e,t).flags|=256),e=As(e,t),e!==2&&(t=Pe,Pe=n,t!==null&&bi(t)),e}function bi(e){Pe===null?Pe=e:Pe.push.apply(Pe,e)}function tp(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],i=s.getSnapshot;s=s.value;try{if(!et(i(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function _t(e,t){for(t&=~mo,t&=~Ws,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Je(t),r=1<<n;e[n]=-1,t&=~r}}function qa(e){if(W&6)throw Error(_(327));jn();var t=xs(e,0);if(!(t&1))return Ae(e,oe()),null;var n=As(e,t);if(e.tag!==0&&n===2){var r=Yl(e);r!==0&&(t=r,n=ji(e,r))}if(n===1)throw n=kr,Yt(e,0),_t(e,t),Ae(e,oe()),n;if(n===6)throw Error(_(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Wt(e,Pe,ct),Ae(e,oe()),null}function ho(e,t){var n=W;W|=1;try{return e(t)}finally{W=n,W===0&&(zn=oe()+500,Bs&&Ft())}}function nn(e){Ct!==null&&Ct.tag===0&&!(W&6)&&jn();var t=W;W|=1;var n=Qe.transition,r=Z;try{if(Qe.transition=null,Z=1,e)return e()}finally{Z=r,Qe.transition=n,W=t,!(W&6)&&Ft()}}function xo(){De=yn.current,te(yn)}function Yt(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Lm(n)),ue!==null)for(n=ue.return;n!==null;){var r=n;switch(qi(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Ns();break;case 3:Pn(),te(ze),te(ke),so();break;case 5:ro(r);break;case 4:Pn();break;case 13:te(re);break;case 19:te(re);break;case 10:Xi(r.type._context);break;case 22:case 23:xo()}n=n.return}if(me=e,ue=e=Rt(e.current,null),he=De=t,de=0,kr=null,mo=Ws=tn=0,Pe=rr=null,Gt!==null){for(t=0;t<Gt.length;t++)if(n=Gt[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,i=n.pending;if(i!==null){var o=i.next;i.next=s,r.next=o}n.pending=r}Gt=null}return e}function ad(e,t){do{var n=ue;try{if(Ji(),ls.current=Ps,Ts){for(var r=se.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Ts=!1}if(en=0,fe=ce=se=null,tr=!1,vr=0,fo.current=null,n===null||n.return===null){de=1,kr=t,ue=null;break}e:{var i=e,o=n.return,a=n,u=t;if(t=he,a.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var m=u,h=a,v=h.tag;if(!(h.mode&1)&&(v===0||v===11||v===15)){var x=h.alternate;x?(h.updateQueue=x.updateQueue,h.memoizedState=x.memoizedState,h.lanes=x.lanes):(h.updateQueue=null,h.memoizedState=null)}var S=Ra(o);if(S!==null){S.flags&=-257,Oa(S,o,a,i,t),S.mode&1&&Da(i,m,t),t=S,u=m;var N=t.updateQueue;if(N===null){var k=new Set;k.add(u),t.updateQueue=k}else N.add(u);break e}else{if(!(t&1)){Da(i,m,t),go();break e}u=Error(_(426))}}else if(ne&&a.mode&1){var O=Ra(o);if(O!==null){!(O.flags&65536)&&(O.flags|=256),Oa(O,o,a,i,t),Yi(Ln(u,a));break e}}i=u=Ln(u,a),de!==4&&(de=2),rr===null?rr=[i]:rr.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var f=Qc(i,u,t);Ta(i,f);break e;case 1:a=u;var c=i.type,d=i.stateNode;if(!(i.flags&128)&&(typeof c.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(At===null||!At.has(d)))){i.flags|=65536,t&=-t,i.lanes|=t;var y=Wc(i,a,t);Ta(i,y);break e}}i=i.return}while(i!==null)}dd(n)}catch(j){t=j,ue===n&&n!==null&&(ue=n=n.return);continue}break}while(!0)}function ud(){var e=Ls.current;return Ls.current=Ps,e===null?Ps:e}function go(){(de===0||de===3||de===2)&&(de=4),me===null||!(tn&268435455)&&!(Ws&268435455)||_t(me,he)}function As(e,t){var n=W;W|=2;var r=ud();(me!==e||he!==t)&&(ct=null,Yt(e,t));do try{np();break}catch(s){ad(e,s)}while(!0);if(Ji(),W=n,Ls.current=r,ue!==null)throw Error(_(261));return me=null,he=0,de}function np(){for(;ue!==null;)cd(ue)}function rp(){for(;ue!==null&&!Cf();)cd(ue)}function cd(e){var t=md(e.alternate,e,De);e.memoizedProps=e.pendingProps,t===null?dd(e):ue=t,fo.current=null}function dd(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Ym(n,t),n!==null){n.flags&=32767,ue=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{de=6,ue=null;return}}else if(n=qm(n,t,De),n!==null){ue=n;return}if(t=t.sibling,t!==null){ue=t;return}ue=t=e}while(t!==null);de===0&&(de=5)}function Wt(e,t,n){var r=Z,s=Qe.transition;try{Qe.transition=null,Z=1,sp(e,t,n,r)}finally{Qe.transition=s,Z=r}return null}function sp(e,t,n,r){do jn();while(Ct!==null);if(W&6)throw Error(_(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(_(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(If(e,i),e===me&&(ue=me=null,he=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Zr||(Zr=!0,pd(hs,function(){return jn(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=Qe.transition,Qe.transition=null;var o=Z;Z=1;var a=W;W|=4,fo.current=null,Jm(e,n),ld(n,e),jm(ni),gs=!!ti,ni=ti=null,e.current=n,Xm(n),Tf(),W=a,Z=o,Qe.transition=i}else e.current=n;if(Zr&&(Zr=!1,Ct=e,Ms=s),i=e.pendingLanes,i===0&&(At=null),zf(n.stateNode),Ae(e,oe()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(zs)throw zs=!1,e=ki,ki=null,e;return Ms&1&&e.tag!==0&&jn(),i=e.pendingLanes,i&1?e===Si?sr++:(sr=0,Si=e):sr=0,Ft(),null}function jn(){if(Ct!==null){var e=Qu(Ms),t=Qe.transition,n=Z;try{if(Qe.transition=null,Z=16>e?16:e,Ct===null)var r=!1;else{if(e=Ct,Ct=null,Ms=0,W&6)throw Error(_(331));var s=W;for(W|=4,A=e.current;A!==null;){var i=A,o=i.child;if(A.flags&16){var a=i.deletions;if(a!==null){for(var u=0;u<a.length;u++){var m=a[u];for(A=m;A!==null;){var h=A;switch(h.tag){case 0:case 11:case 15:nr(8,h,i)}var v=h.child;if(v!==null)v.return=h,A=v;else for(;A!==null;){h=A;var x=h.sibling,S=h.return;if(nd(h),h===m){A=null;break}if(x!==null){x.return=S,A=x;break}A=S}}}var N=i.alternate;if(N!==null){var k=N.child;if(k!==null){N.child=null;do{var O=k.sibling;k.sibling=null,k=O}while(k!==null)}}A=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,A=o;else e:for(;A!==null;){if(i=A,i.flags&2048)switch(i.tag){case 0:case 11:case 15:nr(9,i,i.return)}var f=i.sibling;if(f!==null){f.return=i.return,A=f;break e}A=i.return}}var c=e.current;for(A=c;A!==null;){o=A;var d=o.child;if(o.subtreeFlags&2064&&d!==null)d.return=o,A=d;else e:for(o=c;A!==null;){if(a=A,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Qs(9,a)}}catch(j){ie(a,a.return,j)}if(a===o){A=null;break e}var y=a.sibling;if(y!==null){y.return=a.return,A=y;break e}A=a.return}}if(W=s,Ft(),it&&typeof it.onPostCommitFiberRoot=="function")try{it.onPostCommitFiberRoot(Os,e)}catch{}r=!0}return r}finally{Z=n,Qe.transition=t}}return!1}function Ya(e,t,n){t=Ln(n,t),t=Qc(e,t,1),e=Mt(e,t,1),t=be(),e!==null&&(_r(e,1,t),Ae(e,t))}function ie(e,t,n){if(e.tag===3)Ya(e,e,n);else for(;t!==null;){if(t.tag===3){Ya(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(At===null||!At.has(r))){e=Ln(n,e),e=Wc(t,e,1),t=Mt(t,e,1),e=be(),t!==null&&(_r(t,1,e),Ae(t,e));break}}t=t.return}}function lp(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=be(),e.pingedLanes|=e.suspendedLanes&n,me===e&&(he&n)===n&&(de===4||de===3&&(he&130023424)===he&&500>oe()-po?Yt(e,0):mo|=n),Ae(e,t)}function fd(e,t){t===0&&(e.mode&1?(t=Fr,Fr<<=1,!(Fr&130023424)&&(Fr=4194304)):t=1);var n=be();e=gt(e,t),e!==null&&(_r(e,t,n),Ae(e,n))}function ip(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),fd(e,n)}function op(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(_(314))}r!==null&&r.delete(t),fd(e,n)}var md;md=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ze.current)Le=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Le=!1,Gm(e,t,n);Le=!!(e.flags&131072)}else Le=!1,ne&&t.flags&1048576&&gc(t,js,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;os(e,t),e=t.pendingProps;var s=En(t,ke.current);Sn(t,n),s=io(null,t,r,e,s,n);var i=oo();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Me(r)?(i=!0,ks(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,to(t),s.updater=Hs,t.stateNode=s,s._reactInternals=t,di(t,r,e,n),t=pi(null,t,r,!0,i,n)):(t.tag=0,ne&&i&&Gi(t),je(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(os(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=up(r),e=qe(r,e),s){case 0:t=mi(null,t,r,e,n);break e;case 1:t=Va(null,t,r,e,n);break e;case 11:t=Ia(null,t,r,e,n);break e;case 14:t=$a(null,t,r,qe(r.type,e),n);break e}throw Error(_(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:qe(r,s),mi(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:qe(r,s),Va(e,t,r,s,n);case 3:e:{if(Yc(t),e===null)throw Error(_(387));r=t.pendingProps,i=t.memoizedState,s=i.element,Sc(e,t),Es(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=Ln(Error(_(423)),t),t=Fa(e,t,r,n,s);break e}else if(r!==s){s=Ln(Error(_(424)),t),t=Fa(e,t,r,n,s);break e}else for(Re=zt(t.stateNode.containerInfo.firstChild),Oe=t,ne=!0,Ze=null,n=Nc(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Cn(),r===s){t=yt(e,t,n);break e}je(e,t,r,n)}t=t.child}return t;case 5:return jc(t),e===null&&ai(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,ri(r,s)?o=null:i!==null&&ri(r,i)&&(t.flags|=32),qc(e,t),je(e,t,o,n),t.child;case 6:return e===null&&ai(t),null;case 13:return Zc(e,t,n);case 4:return no(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Tn(t,null,r,n):je(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:qe(r,s),Ia(e,t,r,s,n);case 7:return je(e,t,t.pendingProps,n),t.child;case 8:return je(e,t,t.pendingProps.children,n),t.child;case 12:return je(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,X(bs,r._currentValue),r._currentValue=o,i!==null)if(et(i.value,o)){if(i.children===s.children&&!ze.current){t=yt(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var u=a.firstContext;u!==null;){if(u.context===r){if(i.tag===1){u=pt(-1,n&-n),u.tag=2;var m=i.updateQueue;if(m!==null){m=m.shared;var h=m.pending;h===null?u.next=u:(u.next=h.next,h.next=u),m.pending=u}}i.lanes|=n,u=i.alternate,u!==null&&(u.lanes|=n),ui(i.return,n,t),a.lanes|=n;break}u=u.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(_(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),ui(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}je(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Sn(t,n),s=We(s),r=r(s),t.flags|=1,je(e,t,r,n),t.child;case 14:return r=t.type,s=qe(r,t.pendingProps),s=qe(r.type,s),$a(e,t,r,s,n);case 15:return Kc(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:qe(r,s),os(e,t),t.tag=1,Me(r)?(e=!0,ks(t)):e=!1,Sn(t,n),Hc(t,r,s),di(t,r,s,n),pi(null,t,r,!0,e,n);case 19:return Jc(e,t,n);case 22:return Gc(e,t,n)}throw Error(_(156,t.tag))};function pd(e,t){return Fu(e,t)}function ap(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function He(e,t,n,r){return new ap(e,t,n,r)}function yo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function up(e){if(typeof e=="function")return yo(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ri)return 11;if(e===Oi)return 14}return 2}function Rt(e,t){var n=e.alternate;return n===null?(n=He(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function cs(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")yo(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case an:return Zt(n.children,s,i,t);case Di:o=8,s|=8;break;case Dl:return e=He(12,n,t,s|2),e.elementType=Dl,e.lanes=i,e;case Rl:return e=He(13,n,t,s),e.elementType=Rl,e.lanes=i,e;case Ol:return e=He(19,n,t,s),e.elementType=Ol,e.lanes=i,e;case ju:return Ks(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ku:o=10;break e;case Su:o=9;break e;case Ri:o=11;break e;case Oi:o=14;break e;case St:o=16,r=null;break e}throw Error(_(130,e==null?e:typeof e,""))}return t=He(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function Zt(e,t,n,r){return e=He(7,e,r,t),e.lanes=n,e}function Ks(e,t,n,r){return e=He(22,e,r,t),e.elementType=ju,e.lanes=n,e.stateNode={isHidden:!1},e}function Ll(e,t,n){return e=He(6,e,null,t),e.lanes=n,e}function zl(e,t,n){return t=He(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function cp(e,t,n,r,s){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=fl(0),this.expirationTimes=fl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fl(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function vo(e,t,n,r,s,i,o,a,u){return e=new cp(e,t,n,a,u),t===1?(t=1,i===!0&&(t|=8)):t=0,i=He(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},to(i),e}function dp(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:on,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function hd(e){if(!e)return It;e=e._reactInternals;e:{if(sn(e)!==e||e.tag!==1)throw Error(_(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Me(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(_(171))}if(e.tag===1){var n=e.type;if(Me(n))return hc(e,n,t)}return t}function xd(e,t,n,r,s,i,o,a,u){return e=vo(n,r,!0,e,s,i,o,a,u),e.context=hd(null),n=e.current,r=be(),s=Dt(n),i=pt(r,s),i.callback=t??null,Mt(n,i,s),e.current.lanes=s,_r(e,s,r),Ae(e,r),e}function Gs(e,t,n,r){var s=t.current,i=be(),o=Dt(s);return n=hd(n),t.context===null?t.context=n:t.pendingContext=n,t=pt(i,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Mt(s,t,o),e!==null&&(Xe(e,s,o,i),ss(e,s,o)),o}function Ds(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 Za(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function wo(e,t){Za(e,t),(e=e.alternate)&&Za(e,t)}function fp(){return null}var gd=typeof reportError=="function"?reportError:function(e){console.error(e)};function No(e){this._internalRoot=e}qs.prototype.render=No.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(_(409));Gs(e,t,null,null)};qs.prototype.unmount=No.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;nn(function(){Gs(null,e,null,null)}),t[xt]=null}};function qs(e){this._internalRoot=e}qs.prototype.unstable_scheduleHydration=function(e){if(e){var t=Gu();e={blockedOn:null,target:e,priority:t};for(var n=0;n<bt.length&&t!==0&&t<bt[n].priority;n++);bt.splice(n,0,e),n===0&&Yu(e)}};function ko(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ys(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Ja(){}function mp(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var m=Ds(o);i.call(m)}}var o=xd(t,r,e,0,null,!1,!1,"",Ja);return e._reactRootContainer=o,e[xt]=o.current,pr(e.nodeType===8?e.parentNode:e),nn(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var m=Ds(u);a.call(m)}}var u=vo(e,0,!1,null,null,!1,!1,"",Ja);return e._reactRootContainer=u,e[xt]=u.current,pr(e.nodeType===8?e.parentNode:e),nn(function(){Gs(t,u,n,r)}),u}function Zs(e,t,n,r,s){var i=n._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var u=Ds(o);a.call(u)}}Gs(t,o,e,s)}else o=mp(n,t,e,s,r);return Ds(o)}Wu=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Gn(t.pendingLanes);n!==0&&(Vi(t,n|1),Ae(t,oe()),!(W&6)&&(zn=oe()+500,Ft()))}break;case 13:nn(function(){var r=gt(e,1);if(r!==null){var s=be();Xe(r,e,1,s)}}),wo(e,1)}};Fi=function(e){if(e.tag===13){var t=gt(e,134217728);if(t!==null){var n=be();Xe(t,e,134217728,n)}wo(e,134217728)}};Ku=function(e){if(e.tag===13){var t=Dt(e),n=gt(e,t);if(n!==null){var r=be();Xe(n,e,t,r)}wo(e,t)}};Gu=function(){return Z};qu=function(e,t){var n=Z;try{return Z=e,t()}finally{Z=n}};Kl=function(e,t,n){switch(t){case"input":if(Vl(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=Fs(r);if(!s)throw Error(_(90));_u(r),Vl(r,s)}}}break;case"textarea":Cu(e,n);break;case"select":t=n.value,t!=null&&vn(e,!!n.multiple,t,!1)}};Du=ho;Ru=nn;var pp={usingClientEntryPoint:!1,Events:[Cr,fn,Fs,Mu,Au,ho]},Qn={findFiberByHostInstance:Kt,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},hp={bundleType:Qn.bundleType,version:Qn.version,rendererPackageName:Qn.rendererPackageName,rendererConfig:Qn.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:vt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=$u(e),e===null?null:e.stateNode},findFiberByHostInstance:Qn.findFiberByHostInstance||fp,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 Jr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jr.isDisabled&&Jr.supportsFiber)try{Os=Jr.inject(hp),it=Jr}catch{}}$e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=pp;$e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ko(t))throw Error(_(200));return dp(e,t,null,n)};$e.createRoot=function(e,t){if(!ko(e))throw Error(_(299));var n=!1,r="",s=gd;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=vo(e,1,!1,null,null,n,!1,r,s),e[xt]=t.current,pr(e.nodeType===8?e.parentNode:e),new No(t)};$e.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(_(188)):(e=Object.keys(e).join(","),Error(_(268,e)));return e=$u(t),e=e===null?null:e.stateNode,e};$e.flushSync=function(e){return nn(e)};$e.hydrate=function(e,t,n){if(!Ys(t))throw Error(_(200));return Zs(null,e,t,!0,n)};$e.hydrateRoot=function(e,t,n){if(!ko(e))throw Error(_(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",o=gd;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=xd(t,null,e,1,n??null,s,!1,i,o),e[xt]=t.current,pr(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new qs(t)};$e.render=function(e,t,n){if(!Ys(t))throw Error(_(200));return Zs(null,e,t,!1,n)};$e.unmountComponentAtNode=function(e){if(!Ys(e))throw Error(_(40));return e._reactRootContainer?(nn(function(){Zs(null,null,e,!1,function(){e._reactRootContainer=null,e[xt]=null})}),!0):!1};$e.unstable_batchedUpdates=ho;$e.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ys(n))throw Error(_(200));if(e==null||e._reactInternals===void 0)throw Error(_(38));return Zs(e,t,n,!1,r)};$e.version="18.3.1-next-f1338f8080-20240426";function yd(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(yd)}catch(e){console.error(e)}}yd(),yu.exports=$e;var xp=yu.exports,Xa=xp;Ml.createRoot=Xa.createRoot,Ml.hydrateRoot=Xa.hydrateRoot;/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const gp=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),vd=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/var yp={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.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const vp=w.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:i,iconNode:o,...a},u)=>w.createElement("svg",{ref:u,...yp,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:vd("lucide",s),...a},[...o.map(([m,h])=>w.createElement(m,h)),...Array.isArray(i)?i:[i]]));/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const U=(e,t)=>{const n=w.forwardRef(({className:r,...s},i)=>w.createElement(vp,{ref:i,iconNode:t,className:vd(`lucide-${gp(e)}`,r),...s}));return n.displayName=`${e}`,n};/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const wd=U("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Nd=U("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const wp=U("Award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]]);/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const eu=U("CalendarDays",[["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"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Pr=U("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Np=U("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const kp=U("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Mn=U("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const ut=U("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Sr=U("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Sp=U("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const kd=U("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const jp=U("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const tu=U("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Js=U("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const bp=U("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const _p=U("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const _i=U("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const So=U("MapPin",[["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"}]]);/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Ep=U("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Cp=U("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const nu=U("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]);/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const jr=U("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Tp=U("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const at=U("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Pp=U("Printer",[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",key:"1itne7"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1",key:"1ue0tg"}]]);/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Sd=U("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Lp=U("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const ru=U("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const zp=U("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Mp=U("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const jd=U("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const bd=U("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Ap=U("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Dp=U("TableProperties",[["path",{d:"M15 3v18",key:"14nvp0"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 9H3",key:"1338ky"}],["path",{d:"M21 15H3",key:"9uk58r"}]]);/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Ue=U("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const jo=U("UserCheck",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["polyline",{points:"16 11 18 13 22 9",key:"1pwet4"}]]);/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Rp=U("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const su=U("UserX",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"17",x2:"22",y1:"8",y2:"13",key:"3nzzx3"}],["line",{x1:"22",x2:"17",y1:"8",y2:"13",key:"1swrse"}]]);/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const ds=U("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const _d=U("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
|
|
* @license lucide-react v0.424.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Ed=U("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Op({branding:e,user:t,activeTab:n,onChangeTab:r,themeMode:s,onChangeThemeMode:i,onLogout:o,onOpenAuth:a,onOpenCreateEvent:u,onOpenTemplates:m,onOpenProfile:h,onOpenAdmin:v,pwaInstallPrompt:x,onInstallPwa:S}){const N=(e==null?void 0:e.primary_color)||"var(--brand-primary)",[k,O]=lr.useState(()=>localStorage.getItem("guest_display_name")||"");lr.useEffect(()=>{const c=()=>{O(localStorage.getItem("guest_display_name")||"")};return window.addEventListener("guest_name_updated",c),window.addEventListener("storage",c),()=>{window.removeEventListener("guest_name_updated",c),window.removeEventListener("storage",c)}},[]);const f=()=>{i(s==="dark"?"light":s==="light"?"auto":"dark")};return l.jsxs("header",{className:"bg-surface border-b border-grid sticky top-0 z-40",children:[l.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 h-16 flex items-center justify-between gap-4",children:[l.jsxs("div",{className:"flex items-center space-x-3 shrink-0",children:[l.jsx("div",{onClick:()=>r("home"),style:{backgroundColor:N},className:"w-8 h-8 rounded-sm flex items-center justify-center text-white font-bold cursor-pointer shadow-sm",children:e!=null&&e.logo_url?l.jsx("img",{src:e.logo_url,alt:"Logo",className:"w-4 h-4 object-contain"}):l.jsx(Pr,{className:"w-4 h-4"})}),l.jsxs("div",{onClick:()=>r("home"),className:"cursor-pointer",children:[l.jsx("h1",{className:"font-serif text-base font-bold tracking-tight text-main leading-none",children:(e==null?void 0:e.app_name)||"Schichtplaner"}),l.jsx("div",{className:"text-[10px] font-mono text-muted mt-1 uppercase tracking-wider flex items-center gap-1.5",children:t?l.jsxs("span",{className:"text-emerald-500 font-semibold",children:["[ ",t.display_name||t.username," ]"]}):k?l.jsxs("span",{className:"text-amber-400 font-semibold flex items-center gap-1",children:["[ 👤 GAST: ",k," ]"]}):l.jsx("span",{className:"text-amber-500 font-semibold",children:"[ GAST-MODUS ]"})})]})]}),l.jsxs("nav",{className:"hidden md:flex items-center gap-2",children:[l.jsxs("button",{onClick:()=>r("home"),className:`px-3 py-1.5 rounded-sm text-xs font-mono transition flex items-center gap-1.5 border ${n==="home"?"bg-surface-hover text-main font-bold border-grid":"text-muted hover:text-main border-transparent"}`,children:[l.jsx(tu,{className:"w-3.5 h-3.5"})," Startseite"]}),l.jsxs("button",{onClick:()=>r("calendar"),className:`px-3 py-1.5 rounded-sm text-xs font-mono transition flex items-center gap-1.5 border ${n==="calendar"?"bg-surface-hover text-main font-bold border-grid":"text-muted hover:text-main border-transparent"}`,children:[l.jsx(eu,{className:"w-3.5 h-3.5"})," Kalender"]}),((t==null?void 0:t.is_admin_user)||(t==null?void 0:t.is_staff)||(t==null?void 0:t.is_superuser))&&l.jsxs("button",{onClick:()=>r("admin"),className:`px-3 py-1.5 rounded-sm text-xs font-mono transition flex items-center gap-1.5 border ${n==="admin"?"bg-surface-hover text-main font-bold border-grid":"text-muted hover:text-main border-transparent"}`,children:[l.jsx(ru,{className:"w-3.5 h-3.5 text-indigo-400"})," Admin"]})]}),l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("button",{onClick:f,className:"h-8 px-2.5 rounded-sm text-xs font-mono bg-subtle hover:bg-surface-hover text-main border border-grid transition flex items-center gap-1.5",title:`Design-Modus: ${s.toUpperCase()}`,children:s==="dark"?l.jsxs(l.Fragment,{children:[l.jsx(Cp,{className:"w-3.5 h-3.5 text-indigo-400"}),l.jsx("span",{className:"hidden lg:inline text-[11px] font-bold",children:"DARK"})]}):s==="light"?l.jsxs(l.Fragment,{children:[l.jsx(Ap,{className:"w-3.5 h-3.5 text-amber-500"}),l.jsx("span",{className:"hidden lg:inline text-[11px] font-bold",children:"LIGHT"})]}):l.jsxs(l.Fragment,{children:[l.jsx(Ep,{className:"w-3.5 h-3.5 text-blue-500"}),l.jsx("span",{className:"hidden lg:inline text-[11px] font-bold",children:"AUTO"})]})}),x&&l.jsxs("button",{onClick:S,className:"h-8 px-2.5 rounded-sm text-xs font-mono bg-emerald-500/10 text-emerald-500 border border-emerald-500/20 hover:bg-emerald-500/20 transition flex items-center gap-1",children:[l.jsx(bd,{className:"w-3 h-3"})," PWA"]}),t?l.jsxs(l.Fragment,{children:[l.jsxs("button",{onClick:u,style:{backgroundColor:N},className:"h-8 px-3 rounded-sm text-xs font-mono font-bold text-white transition flex items-center gap-1 shadow-sm hover:brightness-110",children:[l.jsx(at,{className:"w-3.5 h-3.5"})," Event"]}),l.jsxs("button",{onClick:m,className:"h-8 px-2.5 rounded-sm text-xs font-mono bg-subtle hover:bg-surface-hover text-main border border-grid transition hidden sm:flex items-center gap-1",title:"Vorlagen",children:[l.jsx(Js,{className:"w-3.5 h-3.5 text-muted"})," Vorlagen"]}),l.jsxs("button",{onClick:h,className:"h-8 px-2.5 rounded-sm text-xs font-mono bg-subtle hover:bg-surface-hover text-main border border-grid transition flex items-center gap-1",title:"Profil & Namen ändern",children:[l.jsx(jr,{className:"w-3.5 h-3.5 text-amber-500"})," Profil"]}),(t.is_admin_user||t.is_staff||t.is_superuser)&&l.jsxs("button",{onClick:()=>r("admin"),className:`h-8 px-2.5 rounded-sm text-xs font-mono transition flex items-center gap-1 border ${n==="admin"?"bg-indigo-500/20 text-indigo-300 border-indigo-500/40 font-bold":"bg-indigo-500/10 hover:bg-indigo-500/20 text-indigo-400 border-indigo-500/30"}`,title:"Admin-Zentrale",children:[l.jsx(ru,{className:"w-3.5 h-3.5"})," Admin"]}),l.jsx("div",{className:"h-4 w-px bg-grid mx-1"}),l.jsx("button",{onClick:o,className:"h-8 w-8 rounded-sm text-muted hover:text-red-500 hover:bg-red-500/10 border border-transparent hover:border-red-500/20 transition flex items-center justify-center",title:"Abmelden",children:l.jsx(_p,{className:"w-3.5 h-3.5"})})]}):l.jsxs("button",{onClick:a,style:{backgroundColor:N},className:"h-8 px-3.5 rounded-sm text-xs font-mono font-bold text-white transition hover:brightness-110 flex items-center gap-1.5 shadow-sm",children:[l.jsx(ds,{className:"w-3.5 h-3.5"})," Anmelden"]})]})]}),l.jsxs("div",{className:"flex md:hidden items-center justify-around border-t border-grid py-2 bg-subtle text-xs font-mono",children:[l.jsxs("button",{onClick:()=>r("home"),className:`flex items-center gap-1 px-3 py-1.5 rounded-sm border ${n==="home"?"text-main font-bold bg-surface border-grid":"text-muted border-transparent"}`,children:[l.jsx(tu,{className:"w-3.5 h-3.5"})," Start"]}),l.jsxs("button",{onClick:()=>r("calendar"),className:`flex items-center gap-1 px-3 py-1.5 rounded-sm border ${n==="calendar"?"text-main font-bold bg-surface border-grid":"text-muted border-transparent"}`,children:[l.jsx(eu,{className:"w-3.5 h-3.5"})," Termine"]}),l.jsxs("button",{onClick:()=>r("schedule"),className:`flex items-center gap-1 px-3 py-1.5 rounded-sm border ${n==="schedule"?"text-main font-bold bg-surface border-grid":"text-muted border-transparent"}`,children:[l.jsx(Dp,{className:"w-3.5 h-3.5"})," Schichtplan"]})]})]})}function Ip({event:e,user:t,onSignupClick:n,onCancelClick:r,onRemoveUserFromShift:s,onGenerateClaimLink:i,onExportPdf:o,onPrintView:a,onEditEvent:u,onDeleteEvent:m}){var k,O,f;const[h,v]=lr.useState(()=>localStorage.getItem("guest_display_name")||"");if(lr.useEffect(()=>{const c=()=>v(localStorage.getItem("guest_display_name")||"");return window.addEventListener("guest_name_updated",c),window.addEventListener("storage",c),()=>{window.removeEventListener("guest_name_updated",c),window.removeEventListener("storage",c)}},[]),!e||!e.task_areas||e.task_areas.length===0)return l.jsxs("div",{className:"hallmark-panel rounded-sm p-12 text-center border border-grid font-mono",children:[l.jsx(Sr,{className:"w-8 h-8 text-muted mx-auto mb-3"}),l.jsx("h3",{className:"font-serif text-xl font-bold text-main uppercase",children:"Keine Aufgabenfelder vorhanden"}),l.jsx("p",{className:"text-xs text-muted mt-1 mb-4",children:"[ Event hat noch keine definierten Aufgabenfelder oder Schichten ]"}),t&&(t.is_admin_user||t.is_staff||t.is_superuser||(e==null?void 0:e.created_by)===t.id||((k=e==null?void 0:e.created_by)==null?void 0:k.id)===t.id||(e==null?void 0:e.co_managers)&&e.co_managers.some(c=>typeof c=="object"?c.id===t.id:c===t.id))&&u&&l.jsxs("button",{onClick:()=>u(e),className:"px-4 py-2 rounded-sm bg-indigo-500/10 hover:bg-indigo-500/20 text-indigo-400 border border-indigo-500/30 font-bold text-xs inline-flex items-center gap-2",children:[l.jsx(jr,{className:"w-4 h-4"})," SCHICHTEN & BEREICHE ANLEGEN"]})]});const x=!t,S=t&&(e==null?void 0:e.co_managers)&&e.co_managers.some(c=>typeof c=="object"?c.id===t.id:c===t.id),N=t&&(t.is_admin_user||t.is_staff||t.is_superuser||(e==null?void 0:e.created_by)===t.id||((O=e==null?void 0:e.created_by)==null?void 0:O.id)===t.id||S);return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"hallmark-panel rounded-sm p-6 sm:p-8 border border-grid flex flex-col md:flex-row md:items-center justify-between gap-4",children:[l.jsxs("div",{className:"space-y-1 font-mono",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs text-muted mb-1",children:[l.jsxs("span",{className:"bg-subtle px-2.5 py-0.5 rounded-sm border border-grid font-bold text-main",children:[new Date(e.start_date).toLocaleDateString("de-DE")," — ",new Date(e.end_date).toLocaleDateString("de-DE")]}),e.location&&l.jsxs("span",{className:"flex items-center gap-1 text-muted",children:[l.jsx(So,{className:"w-3.5 h-3.5 shrink-0"}),e.location]}),e.is_active===!1&&l.jsx("span",{className:"px-2 py-0.5 rounded-sm bg-amber-500/10 text-amber-500 border border-amber-500/20 font-bold",children:"[ DEAKTIVIERT ]"})]}),l.jsx("h2",{className:"font-serif text-3xl sm:text-4xl font-bold uppercase tracking-tight text-main",children:e.title}),e.description&&l.jsx("p",{className:"text-xs font-sans text-muted max-w-2xl mt-1",children:e.description})]}),l.jsxs("div",{className:"flex items-center gap-2 no-print font-mono text-xs shrink-0",children:[N&&u&&l.jsxs("button",{onClick:()=>u(e),className:"px-3.5 py-1.5 rounded-sm bg-indigo-500/10 hover:bg-indigo-500/20 text-indigo-400 border border-indigo-500/30 transition flex items-center gap-1.5 font-bold",title:"Schichten und Aufgabenbereiche für diese Veranstaltung bearbeiten",children:[l.jsx(jr,{className:"w-3.5 h-3.5"})," SCHICHTEN BEARBEITEN"]}),t&&(t.is_admin_user||t.is_staff||t.is_superuser||(e==null?void 0:e.created_by)===t.id||((f=e==null?void 0:e.created_by)==null?void 0:f.id)===t.id)&&m&&l.jsxs("button",{onClick:()=>m(e),className:"px-3.5 py-1.5 rounded-sm bg-red-500/10 hover:bg-red-500/20 text-red-400 border border-red-500/30 transition flex items-center gap-1.5 font-bold",title:"Diese Veranstaltung unwiderruflich löschen",children:[l.jsx(Ue,{className:"w-3.5 h-3.5"})," LÖSCHEN"]}),l.jsxs("button",{onClick:a,className:"px-3.5 py-1.5 rounded-sm bg-surface hover:bg-surface-hover text-main border border-grid transition flex items-center gap-1.5 font-bold",children:[l.jsx(Pp,{className:"w-3.5 h-3.5"})," DRUCKEN"]}),l.jsxs("button",{onClick:o,className:"px-3.5 py-1.5 rounded-sm bg-surface hover:bg-surface-hover text-main border border-grid transition flex items-center gap-1.5 font-bold",children:[l.jsx(Sp,{className:"w-3.5 h-3.5"})," PDF"]})]})]}),x&&l.jsxs("div",{className:"p-3.5 rounded-sm bg-amber-500/10 border border-amber-500/20 text-amber-500 text-xs font-mono flex items-center gap-2",children:[l.jsx(jd,{className:"w-4 h-4 shrink-0 text-amber-500"}),l.jsxs("span",{children:["[ GAST-DATENSCHUTZ ]: Belegungszahlen sichtbar, Namensanzeige aus Datenschutzgründen ",l.jsx("strong",{children:"anonymisiert"}),"."]})]}),l.jsx("div",{className:"hallmark-panel rounded-sm border border-grid overflow-hidden",children:l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full text-left border-collapse",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"bg-subtle border-b border-grid text-[11px] font-mono text-muted uppercase tracking-wider",children:[l.jsx("th",{className:"py-3.5 px-4 w-1/4",children:"Aufgabenfeld"}),l.jsx("th",{className:"py-3.5 px-4 w-1/4",children:"Schicht & Zeitraum"}),l.jsx("th",{className:"py-3.5 px-4 w-1/6",children:"Qualifikation"}),l.jsx("th",{className:"py-3.5 px-4 w-1/4",children:"Belegung & Personen"}),l.jsx("th",{className:"py-3.5 px-4 w-1/6 text-right",children:"Aktion"})]})}),l.jsx("tbody",{className:"divide-y divide-grid text-xs font-sans",children:e.task_areas.map(c=>!c.shifts||c.shifts.length===0?l.jsxs("tr",{children:[l.jsx("td",{className:"py-3.5 px-4 font-serif text-lg font-bold text-main uppercase",children:c.name}),l.jsx("td",{colSpan:4,className:"py-3.5 px-4 text-muted font-mono text-[11px]",children:"[ Keine Schichten angelegt ]"})]},`area-${c.id}`):c.shifts.map((d,y)=>{const j=y===0,b=d.is_full,P=!!(t?d.signups.find(M=>!M.is_guest&&M.display_name===t.display_name):null),B=d.required_skills&&d.required_skills.length>0;return l.jsxs("tr",{className:"hover:bg-surface-hover/60 transition",children:[j?l.jsxs("td",{rowSpan:c.shifts.length,className:"py-3.5 px-4 font-serif text-lg font-bold text-main uppercase bg-subtle/80 align-top border-r border-grid",children:[l.jsx("div",{children:c.name}),c.description&&l.jsx("div",{className:"text-[11px] font-sans font-normal text-muted mt-0.5",children:c.description})]}):null,l.jsxs("td",{className:"py-3.5 px-4",children:[l.jsxs("div",{className:"font-semibold text-main flex items-center gap-2 flex-wrap",children:[l.jsx("span",{children:d.title}),d.date&&l.jsxs("span",{className:"text-[10px] font-mono font-bold text-indigo-400 bg-indigo-500/10 px-2 py-0.5 rounded-sm border border-indigo-500/20",children:["📅 ",new Date(d.date+"T00:00:00").toLocaleDateString("de-DE",{weekday:"short",day:"2-digit",month:"2-digit"})]})]}),l.jsxs("div",{className:"text-[11px] font-mono text-muted flex items-center gap-1 mt-0.5",children:[l.jsx(Sr,{className:"w-3 h-3 text-muted shrink-0"}),l.jsxs("span",{children:[d.start_time," — ",d.end_time," Uhr"]})]})]}),l.jsx("td",{className:"py-3.5 px-4 font-mono",children:B?l.jsx("div",{className:"flex flex-wrap gap-1",children:d.required_skills.map(M=>l.jsxs("span",{style:{backgroundColor:`${M.color}15`,borderColor:`${M.color}35`,color:M.color},className:"px-2 py-0.5 rounded-sm text-[10px] font-semibold border flex items-center gap-1",children:[l.jsx(wp,{className:"w-3 h-3 shrink-0"})," ",M.name]},M.id))}):l.jsx("span",{className:"text-[11px] text-muted",children:"—"})}),l.jsxs("td",{className:"py-3.5 px-4 font-mono",children:[l.jsx("div",{className:"flex items-center gap-2",children:l.jsxs("span",{className:`px-2 py-0.5 rounded-sm text-[11px] font-bold border ${b?"bg-red-500/10 text-red-500 border-red-500/20":"bg-emerald-500/10 text-emerald-500 border-emerald-500/20"}`,children:["[ ",d.signups_count," / ",d.max_participants," BELEGT ]"]})}),l.jsx("div",{className:"mt-2 space-y-1 font-sans",children:d.signups.map(M=>{var G;const q=x&&M.is_guest&&h&&((G=M.display_name)==null?void 0:G.trim().toLowerCase())===h.trim().toLowerCase();return l.jsxs("div",{className:`text-[11px] text-muted flex items-center justify-between gap-2 p-1.5 rounded-sm border ${q?"bg-amber-500/10 border-amber-500/30":"bg-subtle border-grid"}`,children:[l.jsxs("div",{className:"flex items-center gap-1.5 truncate",children:[l.jsx(jo,{className:`w-3 h-3 shrink-0 ${q?"text-amber-400":"text-muted"}`}),l.jsx("span",{className:`truncate ${q?"font-bold text-amber-300":""}`,children:M.display_name}),M.is_guest&&l.jsx("span",{className:"text-[9px] font-mono text-amber-500 px-1 rounded-sm bg-amber-500/10 border border-amber-500/20 font-bold",children:"GAST"}),q&&l.jsx("span",{className:"text-[9px] font-mono text-emerald-400 px-1 rounded-sm bg-emerald-500/10 border border-emerald-500/20 font-bold",children:"DU"})]}),l.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[t&&M.is_guest&&i&&l.jsxs("button",{onClick:()=>i(M),className:"text-indigo-400 hover:text-indigo-300 transition p-1 rounded-sm bg-indigo-500/10 hover:bg-indigo-500/20 border border-indigo-500/20 flex items-center gap-1 text-[10px] font-mono font-bold",title:"Konto-Einladungslink für diese Gast-Eintragung kopieren",children:[l.jsx(Rp,{className:"w-3 h-3"})," LINK"]}),N&&s&&l.jsx("button",{onClick:()=>s(d,M.id),className:"text-muted hover:text-red-500 transition p-1 rounded-sm hover:bg-red-500/10",title:"Person aus dieser Schicht entfernen",children:l.jsx(su,{className:"w-3.5 h-3.5"})})]})]},M.id)})})]}),l.jsx("td",{className:"py-3.5 px-4 text-right font-mono",children:P?l.jsxs("button",{onClick:()=>r(d),className:"px-3 py-1.5 rounded-sm text-xs font-semibold bg-red-500/10 hover:bg-red-500/20 text-red-500 border border-red-500/20 transition flex items-center gap-1 ml-auto",children:[l.jsx(su,{className:"w-3.5 h-3.5"})," AUSTRAGEN"]}):b?l.jsx("span",{className:"text-xs text-muted font-bold",children:"[ VOLL ]"}):l.jsxs("button",{onClick:()=>n(d),style:{backgroundColor:"var(--brand-primary)"},className:"px-3.5 py-1.5 rounded-sm text-xs font-bold text-white transition hover:brightness-110 flex items-center gap-1 ml-auto shadow-sm",children:[l.jsx(ut,{className:"w-3.5 h-3.5"})," EINTRAGEN"]})})]},`shift-${d.id}`)}))})]})})})]})}function $p({shift:e,onClose:t,onSubmit:n}){const[r,s]=w.useState(""),[i,o]=w.useState(()=>sessionStorage.getItem("guest_captcha_verified")==="true"),[a,u]=w.useState(()=>sessionStorage.getItem("guest_captcha_verified")==="true"?"acaptcha-session-verified":""),[m,h]=w.useState(()=>sessionStorage.getItem("guest_captcha_verified")==="true"),[v,x]=w.useState(""),[S,N]=w.useState(!1),k=w.useRef(null);w.useEffect(()=>{const f=localStorage.getItem("guest_display_name")||"";f&&s(f)},[]),w.useEffect(()=>{if(i)return;const f=k.current;if(!f)return;const c=y=>{var b;if(((b=y==null?void 0:y.detail)==null?void 0:b.verified)||f.isValid&&f.isValid()){sessionStorage.setItem("guest_captcha_verified","true"),o(!0),h(!0);const T="acaptcha-verified-"+Math.random().toString(36).substring(2,10);u(T)}},d=()=>{h(!1),u("")};return f.addEventListener("verified",c),f.addEventListener("statuschange",c),f.addEventListener("reset",d),f.isValid&&f.isValid()&&c({detail:{verified:!0}}),()=>{f.removeEventListener("verified",c),f.removeEventListener("statuschange",c),f.removeEventListener("reset",d)}},[i]);const O=async f=>{if(f.preventDefault(),x(""),!r.trim()){x("Bitte gib deinen Namen ein.");return}if(!(i||m)){x("Bitte löse zuerst das Captcha.");return}const d=a||"acaptcha-session-verified";localStorage.setItem("guest_display_name",r.trim()),window.dispatchEvent(new Event("guest_name_updated")),N(!0);try{await n({guest_name:r.trim(),captcha_token:d}),t()}catch(y){x(y.message||"Eintragen fehlgeschlagen.")}finally{N(!1)}};return l.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-slate-950/80 backdrop-blur-sm",children:l.jsxs("div",{className:"glass-panel w-full max-w-md rounded-2xl border border-slate-800 p-6 shadow-2xl relative animate-in fade-in zoom-in-95 duration-200",children:[l.jsx("button",{onClick:t,className:"absolute top-4 right-4 p-2 text-slate-400 hover:text-white rounded-lg transition",children:l.jsx(Ed,{className:"w-5 h-5"})}),l.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[l.jsx("div",{className:"w-10 h-10 rounded-xl bg-blue-500/10 text-blue-400 border border-blue-500/20 flex items-center justify-center",children:l.jsx(jo,{className:"w-5 h-5"})}),l.jsxs("div",{children:[l.jsx("h3",{className:"font-bold text-lg text-white",children:"Als Gast eintragen"}),l.jsxs("p",{className:"text-xs text-slate-400",children:["Schicht: ",e==null?void 0:e.title," (",e==null?void 0:e.start_time," - ",e==null?void 0:e.end_time,")"]})]})]}),v&&l.jsxs("div",{className:"mb-4 p-3 rounded-xl bg-red-500/10 border border-red-500/20 text-red-400 text-xs flex items-center gap-2",children:[l.jsx(Mn,{className:"w-4 h-4 shrink-0"}),l.jsx("span",{children:v})]}),l.jsxs("form",{onSubmit:O,className:"space-y-4",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs font-semibold text-slate-300 mb-1",children:"Dein Name / Anzeigename"}),l.jsx("input",{type:"text",required:!0,value:r,onChange:f=>s(f.target.value),placeholder:"z. B. Alex Muster",className:"w-full px-3.5 py-2.5 rounded-xl bg-slate-900 border border-slate-800 text-white text-sm focus:outline-none focus:border-blue-500 transition"}),l.jsx("p",{className:"text-[11px] text-slate-500 mt-1",children:"Dein Name bleibt in deiner aktuellen Sitzung gespeichert. Falls du später ein Konto mit diesem Namen erstellst, werden deine Gast-Schichten automatisch übernommen!"})]}),i?l.jsxs("div",{className:"p-3.5 rounded-xl bg-emerald-500/10 border border-emerald-500/20 text-emerald-400 text-xs flex items-center justify-between font-mono",children:[l.jsxs("span",{className:"flex items-center gap-2 font-semibold",children:[l.jsx(ut,{className:"w-4 h-4 text-emerald-400 shrink-0"})," Security Check verifiziert"]}),l.jsx("span",{className:"text-[10px] text-emerald-400/80",children:"[ In dieser Sitzung aktiv ]"})]}):l.jsxs("div",{className:"p-4 rounded-xl bg-slate-900/90 border border-slate-800 space-y-3",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("span",{className:"text-xs font-semibold text-slate-300 flex items-center gap-1.5 font-mono",children:[l.jsx(Mp,{className:"w-4 h-4 text-emerald-400"})," Security Check (aCAPTCHA)"]}),l.jsx("a",{href:"https://acaptcha.vercel.app/",target:"_blank",rel:"noreferrer",className:"text-[10px] text-blue-400 hover:underline font-mono",children:"aCAPTCHA v1.1"})]}),l.jsxs("div",{className:"border border-slate-700 rounded-lg p-3 bg-slate-950/80 flex flex-col items-center justify-center min-h-[100px]",children:[l.jsx("captcha-element",{ref:k,status:"null","sound-enabled":"true","dark-mode":"dark",type:"both",difficulty:"adaptive"}),m&&l.jsxs("div",{className:"mt-2 text-xs font-medium text-emerald-400 flex items-center gap-1 font-mono",children:[l.jsx(ut,{className:"w-4 h-4"})," Captcha verifiziert!"]})]})]}),l.jsxs("div",{className:"pt-2 flex justify-end gap-2",children:[l.jsx("button",{type:"button",onClick:t,className:"px-4 py-2 rounded-xl text-xs font-semibold text-slate-400 hover:bg-slate-800 transition",children:"Abbrechen"}),l.jsx("button",{type:"submit",disabled:S,className:"px-5 py-2 rounded-xl text-xs font-bold bg-blue-600 hover:bg-blue-500 text-white transition shadow-lg shadow-blue-600/30 disabled:opacity-50",children:S?"Eintragen...":"Jetzt eintragen"})]})]})]})})}const Vp="/api",Ei=()=>localStorage.getItem("auth_token"),bn=e=>{e?localStorage.setItem("auth_token",e):localStorage.removeItem("auth_token")},V=async(e,t={})=>{const n=Ei(),r={"Content-Type":"application/json",...n?{Authorization:`Token ${n}`}:{},...t.headers},s=await fetch(`${Vp}${e}`,{...t,headers:r}),i=s.headers.get("content-type");let o=null;if(i&&i.includes("application/json")&&(o=await s.json()),!s.ok){s.status===401&&bn(null);let a="Ein Fehler ist aufgetreten.";throw o&&(typeof o.error=="string"?a=o.error:typeof o.detail=="string"?a=o.detail:o.email?a=Array.isArray(o.email)?o.email[0]:o.email:o.username?a=Array.isArray(o.username)?o.username[0]:o.username:o.non_field_errors&&(a=o.non_field_errors[0])),new Error(a)}return o},lu=["#E05A47","#3B82F6","#10B981","#8B5CF6","#F59E0B","#EC4899","#06B6D4","#6366F1","#14B8A6","#F97316","#D97706","#059669","#7C3AED","#DB2777","#2563EB"],iu=()=>lu[Math.floor(Math.random()*lu.length)];function Fp({onClose:e,onSuccess:t,claimToken:n,prefilledGuestName:r}){const[s,i]=w.useState(!!(n||r)),[o,a]=w.useState(""),[u,m]=w.useState(""),[h,v]=w.useState(""),[x,S]=w.useState(r||""),[N,k]=w.useState(null),[O,f]=w.useState(""),[c,d]=w.useState(!1);w.useEffect(()=>{y()},[]);const y=async()=>{try{const b=await V("/users/restriction-setting/");k(b)}catch{}},j=async b=>{b.preventDefault(),f(""),d(!0);try{if(s){const T={username:o,email:u,password:h,display_name:x||o};n&&(T.claim_token=n);const P=await V("/users/register/",{method:"POST",body:JSON.stringify(T)});if(P.requires_verification||P.requires_approval||!P.token){t(null,P.message||"Konto erfolgreich registriert! Bitte schau in deine E-Mail zur Bestätigung oder warte auf die Admin-Freischaltung."),e();return}bn(P.token),t(P.user,P.message)}else{const T=await V("/users/login/",{method:"POST",body:JSON.stringify({username:o,password:h})});bn(T.token),t(T.user,"Erfolgreich angemeldet!")}e()}catch(T){f(T.message||"Authentifizierung fehlgeschlagen.")}finally{d(!1)}};return l.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/60 backdrop-blur-sm",children:l.jsxs("div",{className:"hallmark-panel w-full max-w-md rounded-sm border border-grid p-6 shadow-2xl relative animate-in fade-in zoom-in-95 duration-200",children:[l.jsx("button",{onClick:e,className:"absolute top-4 right-4 p-2 text-muted hover:text-main rounded-sm transition",children:l.jsx(Ed,{className:"w-5 h-5"})}),l.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[l.jsx("div",{className:"w-10 h-10 rounded-sm bg-blue-500/10 text-blue-500 border border-blue-500/20 flex items-center justify-center",children:l.jsx(ds,{className:"w-5 h-5"})}),l.jsxs("div",{children:[l.jsx("h3",{className:"font-serif font-bold text-lg text-main",children:s?"Konto erstellen":"Anmelden"}),l.jsx("p",{className:"text-xs text-muted font-sans",children:s?"Erstelle einen Account für volle Funktionen & Schichteinsicht":"Melde dich an, um Events zu verwalten"})]})]}),r&&l.jsxs("div",{className:"mb-4 p-3 rounded-sm bg-amber-500/10 border border-amber-500/20 text-amber-500 text-xs flex items-center gap-2 font-mono",children:[l.jsx(bd,{className:"w-4 h-4 shrink-0 text-amber-500"}),l.jsxs("span",{children:["Einladung für Gast: ",l.jsx("strong",{children:r}),". Die Schicht wird deinem neuen Konto zugewiesen!"]})]}),(N==null?void 0:N.is_restriction_enabled)&&s&&l.jsxs("div",{className:"mb-4 p-3 rounded-sm bg-indigo-500/10 border border-indigo-500/20 text-indigo-400 text-xs flex items-center gap-2 font-mono",children:[l.jsx(zp,{className:"w-4 h-4 shrink-0 text-indigo-400"}),l.jsxs("span",{children:["Registrierungen beschränkt auf: ",l.jsx("strong",{children:N.active_domains.join(", ")})]})]}),O&&l.jsxs("div",{className:"mb-4 p-3 rounded-sm bg-red-500/10 border border-red-500/20 text-red-500 text-xs flex items-center gap-2 font-mono",children:[l.jsx(Mn,{className:"w-4 h-4 shrink-0"}),l.jsx("span",{children:O})]}),!s&&!1,l.jsxs("form",{onSubmit:j,className:"space-y-4 font-sans",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs font-semibold text-main mb-1 font-mono",children:"Benutzername"}),l.jsxs("div",{className:"relative",children:[l.jsx(ds,{className:"w-4 h-4 absolute left-3 top-3 text-muted"}),l.jsx("input",{type:"text",required:!0,value:o,onChange:b=>a(b.target.value),placeholder:"z. B. max_muster",className:"w-full pl-9 pr-3.5 py-2 rounded-sm input-field text-sm font-mono"})]})]}),s&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs font-semibold text-main mb-1 font-mono",children:"E-Mail-Adresse"}),l.jsxs("div",{className:"relative",children:[l.jsx(_i,{className:"w-4 h-4 absolute left-3 top-3 text-muted"}),l.jsx("input",{type:"email",required:!0,value:u,onChange:b=>m(b.target.value),placeholder:"max@beispiel.de",className:"w-full pl-9 pr-3.5 py-2 rounded-sm input-field text-sm font-mono"})]})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs font-semibold text-main mb-1 font-mono",children:"Anzeigename (für Schichtlisten)"}),l.jsxs("div",{className:"relative",children:[l.jsx(ds,{className:"w-4 h-4 absolute left-3 top-3 text-muted"}),l.jsx("input",{type:"text",value:x,onChange:b=>S(b.target.value),placeholder:"z. B. Max M.",className:"w-full pl-9 pr-3.5 py-2 rounded-sm input-field text-sm font-mono"})]})]})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs font-semibold text-main mb-1 font-mono",children:"Passwort"}),l.jsxs("div",{className:"relative",children:[l.jsx(bp,{className:"w-4 h-4 absolute left-3 top-3 text-muted"}),l.jsx("input",{type:"password",required:!0,value:h,onChange:b=>v(b.target.value),placeholder:"••••••••",className:"w-full pl-9 pr-3.5 py-2 rounded-sm input-field text-sm font-mono"})]})]}),l.jsx("button",{type:"submit",disabled:c,style:{backgroundColor:"var(--brand-primary)"},className:"w-full py-2.5 rounded-sm text-xs font-mono font-bold text-white transition hover:brightness-110 shadow-sm",children:c?"Verarbeite...":s?"Registrieren":"Anmelden"})]}),l.jsx("div",{className:"mt-4 pt-4 border-t border-grid text-center",children:l.jsx("button",{type:"button",onClick:()=>{i(!s),f("")},className:"text-xs font-mono text-muted hover:text-main transition",children:s?"Bereits ein Konto? Hier anmelden":"Noch kein Konto? Jetzt registrieren"})})]})})}function Bp({events:e,user:t,onSelectEvent:n,onOpenCreateEvent:r,onToggleEventActive:s,onEditEvent:i,onDeleteEvent:o,branding:a}){const[u,m]=w.useState(""),[h,v]=w.useState("all"),x=new Date().toISOString().split("T")[0],S=e.filter(d=>d.title.toLowerCase().includes(u.toLowerCase())||d.description&&d.description.toLowerCase().includes(u.toLowerCase())||d.location&&d.location.toLowerCase().includes(u.toLowerCase())?h==="upcoming"?d.end_date>=x:!0:!1),N=(a==null?void 0:a.primary_color)||"var(--brand-primary)",k=(a==null?void 0:a.show_community_info_box)??!0,O=(a==null?void 0:a.show_support_box)??!0,f=k||O,c=t&&(t.is_admin_user||t.is_staff||t.is_superuser);return l.jsxs("div",{className:"space-y-8 animate-in fade-in duration-200",children:[l.jsxs("div",{className:"hallmark-panel rounded-sm p-6 sm:p-10 space-y-6 max-w-5xl mx-auto relative border border-grid",children:[l.jsxs("div",{className:"space-y-2 border-b border-grid pb-6",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"font-mono text-[10px] uppercase tracking-widest text-muted border border-grid px-2.5 py-1 rounded-sm inline-block",children:(a==null?void 0:a.app_name)||"SCHICHT- & EVENTPORTAL"}),(a==null?void 0:a.custom_banner_text)&&l.jsxs("span",{className:"font-mono text-[10px] uppercase tracking-widest text-amber-500 bg-amber-500/10 border border-amber-500/20 px-2.5 py-1 rounded-sm inline-block font-bold",children:["📢 ",a.custom_banner_text]})]}),l.jsx("h2",{className:"font-serif text-3xl sm:text-5xl font-bold uppercase tracking-tight text-main leading-tight",children:"Veranstaltungen & Schichtkoordination"}),l.jsx("p",{className:"font-sans text-xs sm:text-sm text-muted max-w-2xl",children:"Hier findest du aktuelle Termine, Arbeitsgruppen, Bar- & Tresendienste und Schichtpläne der Initiative."})]}),l.jsxs("div",{className:"flex flex-col sm:flex-row items-stretch sm:items-center justify-between gap-3",children:[l.jsxs("div",{className:"relative flex-1",children:[l.jsx(Sd,{className:"w-4 h-4 absolute left-3.5 top-3 text-muted"}),l.jsx("input",{type:"text",value:u,onChange:d=>m(d.target.value),placeholder:"Veranstaltung, Ort oder Suchbegriff...",className:"w-full pl-10 pr-16 py-2 rounded-sm bg-subtle border border-grid text-main text-xs font-mono focus:outline-none focus:border-muted"}),u&&l.jsx("button",{onClick:()=>m(""),className:"absolute right-3 top-2.5 text-[10px] font-mono text-muted hover:text-main",children:"[ CLEAR ]"})]}),l.jsxs("div",{className:"flex items-center gap-1.5 font-mono text-xs shrink-0",children:[l.jsxs("button",{onClick:()=>v("all"),className:`px-3.5 py-1.5 rounded-sm transition border ${h==="all"?"bg-surface-hover text-main border-grid font-bold shadow-sm":"bg-subtle text-muted border-grid hover:text-main"}`,children:["ALLE PROGRAMME (",e.length,")"]}),l.jsxs("button",{onClick:()=>v("upcoming"),className:`px-3.5 py-1.5 rounded-sm transition border ${h==="upcoming"?"bg-surface-hover text-main border-grid font-bold shadow-sm":"bg-subtle text-muted border-grid hover:text-main"}`,children:["ANSTEHEND (",e.filter(d=>d.end_date>=x).length,")"]})]})]})]}),l.jsxs("div",{className:"max-w-5xl mx-auto grid grid-cols-1 lg:grid-cols-4 gap-6",children:[l.jsxs("div",{className:`${f?"lg:col-span-3":"lg:col-span-4"} space-y-4`,children:[l.jsxs("div",{className:"flex items-center justify-between border-b border-grid pb-3 font-mono",children:[l.jsxs("h3",{className:"font-serif text-xl font-bold uppercase tracking-wide text-main flex items-center gap-2",children:[l.jsx(Pr,{className:"w-4.5 h-4.5 text-muted"})," Termine & Schichten"]}),t&&l.jsxs("button",{onClick:r,style:{backgroundColor:N},className:"px-3.5 py-1.5 rounded-sm text-xs font-mono font-bold text-white transition flex items-center gap-1 hover:brightness-110 shadow-sm",children:[l.jsx(at,{className:"w-3.5 h-3.5"})," EVENT ANLEGEN"]})]}),S.length===0?l.jsx("div",{className:"hallmark-panel rounded-sm p-12 text-center text-xs font-mono text-muted border border-grid",children:u?`[ Keinen Eintrag für "${u}" gefunden ]`:"[ Keine Veranstaltungen vorhanden ]"}):l.jsx("div",{className:`grid grid-cols-1 sm:grid-cols-2 ${f?"":"lg:grid-cols-3"} gap-4`,children:S.map(d=>{var B,M,q,G;const y=((B=d.task_areas)==null?void 0:B.length)||0,j=((M=d.task_areas)==null?void 0:M.reduce((Y,ge)=>{var Se;return Y+(((Se=ge.shifts)==null?void 0:Se.length)||0)},0))||0,b=t&&d.co_managers&&d.co_managers.some(Y=>typeof Y=="object"?Y.id===t.id:Y===t.id),T=t&&(d.created_by===t.id||((q=d.created_by)==null?void 0:q.id)===t.id||b),P=c||T;return l.jsxs("div",{className:`hallmark-card rounded-sm p-5 border transition flex flex-col justify-between space-y-4 group overflow-hidden ${d.is_active===!1?"border-amber-500/40 opacity-80 bg-subtle":"border-grid"}`,children:[l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{className:"flex items-center justify-between text-[11px] font-mono text-muted gap-2",children:[l.jsxs("span",{className:"flex items-center gap-1 bg-subtle px-2 py-0.5 rounded-sm border border-grid font-bold shrink-0",children:[l.jsx(Sr,{className:"w-3 h-3 text-muted"}),new Date(d.start_date).toLocaleDateString("de-DE")]}),d.is_active===!1?l.jsx("span",{className:"text-amber-500 font-bold px-1.5 py-0.5 rounded-sm bg-amber-500/10 border border-amber-500/20 shrink-0",children:"[ DEAKTIVIERT ]"}):d.location?l.jsxs("span",{className:"flex items-center gap-1 text-muted truncate max-w-[130px]",children:[l.jsx(So,{className:"w-3 h-3 shrink-0"}),l.jsx("span",{className:"truncate",children:d.location})]}):null]}),l.jsx("h4",{className:"font-serif text-lg font-bold uppercase text-main group-hover:text-amber-500 transition line-clamp-2",children:d.title}),d.description&&l.jsx("p",{className:"text-xs text-muted font-sans line-clamp-2",children:d.description}),l.jsxs("div",{className:"text-[10px] font-mono text-muted flex items-center gap-1.5 pt-1",children:[l.jsxs("span",{children:[y," Bereiche"]}),l.jsx("span",{children:"/"}),l.jsxs("span",{children:[j," Schichten"]})]})]}),l.jsx("div",{className:"pt-3 border-t border-grid space-y-2 font-mono",children:l.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[l.jsxs("button",{onClick:()=>n(d.id),className:"flex-1 min-w-[110px] py-1.5 px-3 rounded-sm text-xs font-mono font-bold bg-surface hover:bg-surface-hover text-main border border-grid transition flex items-center justify-center gap-1",children:["Schichtplan ",l.jsx(Nd,{className:"w-3.5 h-3.5"})]}),P&&i&&l.jsxs("button",{onClick:()=>i(d),className:"py-1.5 px-2.5 rounded-sm text-[10px] font-mono font-bold bg-indigo-500/10 text-indigo-400 border border-indigo-500/20 hover:bg-indigo-500/20 transition flex items-center gap-1 shrink-0",title:"Veranstaltung & Schichten bearbeiten",children:[l.jsx(jr,{className:"w-3.5 h-3.5"})," BEARBEITEN"]}),P&&s&&l.jsx("button",{onClick:()=>s(d),className:`py-1.5 px-2 rounded-sm text-[10px] font-mono font-bold transition flex items-center gap-1 border shrink-0 ${d.is_active!==!1?"bg-amber-500/10 text-amber-500 border-amber-500/20 hover:bg-amber-500/20":"bg-emerald-500/10 text-emerald-400 border-emerald-500/20 hover:bg-emerald-500/20"}`,title:d.is_active!==!1?"Deaktivieren":"Aktivieren",children:d.is_active!==!1?l.jsx(kd,{className:"w-3.5 h-3.5"}):l.jsx(ut,{className:"w-3.5 h-3.5"})}),(c||t&&(d.created_by===t.id||((G=d.created_by)==null?void 0:G.id)===t.id))&&o&&l.jsx("button",{onClick:()=>o(d),className:"py-1.5 px-2 rounded-sm text-[10px] font-mono font-bold bg-red-500/10 text-red-400 border border-red-500/20 hover:bg-red-500/20 transition flex items-center gap-1 shrink-0",title:"Veranstaltung unwiderruflich löschen",children:l.jsx(Ue,{className:"w-3.5 h-3.5"})})]})})]},d.id)})})]}),f&&l.jsxs("div",{className:"space-y-4 font-mono text-xs",children:[k&&l.jsxs("div",{className:"hallmark-panel rounded-sm p-4 border border-grid space-y-3",children:[l.jsx("h4",{className:"font-serif text-sm font-bold uppercase tracking-wide text-main border-b border-grid pb-2",children:(a==null?void 0:a.community_info_title)||"📌 Verein & Infos"}),l.jsx("div",{className:"space-y-2 text-muted text-[11px] whitespace-pre-line",children:(a==null?void 0:a.community_info_text)||`Initiative e.V. Hausverein
|
|
Offene Angebote, DIY-Kultur & engagierte Schichten.`})]}),O&&l.jsxs("div",{className:"hallmark-panel rounded-sm p-4 border border-grid space-y-3",children:[l.jsx("h4",{className:"font-serif text-sm font-bold uppercase tracking-wide text-main border-b border-grid pb-2",children:(a==null?void 0:a.support_box_title)||"❤️ Unterstützen"}),l.jsx("p",{className:"text-[11px] text-muted whitespace-pre-line",children:(a==null?void 0:a.support_box_text)||"Hilf mit als Helfer*in an der Bar, beim Essen kochen oder beim Auf- & Abbau."})]})]})]})]})}function Up({events:e,onSelectEvent:t,branding:n}){const[r,s]=w.useState(new Date),[i,o]=w.useState(null),a=r.getFullYear(),u=r.getMonth(),m=["JANUAR","FEBRUAR","MÄRZ","APRIL","MAI","JUNI","JULI","AUGUST","SEPTEMBER","OKTOBER","NOVEMBER","DEZEMBER"],h=()=>s(new Date(a,u-1,1)),v=()=>s(new Date(a,u+1,1)),x=()=>s(new Date),S=new Date(a,u,1).getDay(),N=S===0?6:S-1,k=new Date(a,u+1,0).getDate(),O=d=>{const y=String(u+1).padStart(2,"0"),j=String(d).padStart(2,"0");return`${a}-${y}-${j}`},f=d=>{const y=O(d);return e.filter(j=>y>=j.start_date&&y<=j.end_date)},c=(n==null?void 0:n.primary_color)||"var(--brand-primary)";return l.jsxs("div",{className:"space-y-6 max-w-5xl mx-auto animate-in fade-in duration-200",children:[l.jsxs("div",{className:"hallmark-panel rounded-sm p-6 sm:p-8 border border-grid flex flex-col sm:flex-row sm:items-center justify-between gap-4 font-mono",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"w-10 h-10 rounded-sm bg-subtle text-main border border-grid flex items-center justify-center font-bold",children:l.jsx(Pr,{className:"w-4 h-4 text-amber-500"})}),l.jsxs("div",{children:[l.jsxs("h2",{className:"font-serif text-3xl sm:text-4xl font-bold uppercase tracking-tight text-main leading-none",children:[m[u]," ",a]}),l.jsx("p",{className:"text-[10px] text-muted uppercase tracking-widest mt-1",children:"— INITIATIVE E.V. TERMIN- & SCHICHTÜBERSICHT —"})]})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("button",{onClick:x,className:"px-3.5 py-1.5 rounded-sm text-xs font-mono font-bold bg-surface hover:bg-surface-hover text-main border border-grid transition",children:"[ HEUTE ]"}),l.jsx("button",{onClick:h,className:"p-1.5 rounded-sm text-muted hover:text-main bg-surface border border-grid transition",title:"Vorheriger Monat",children:l.jsx(Np,{className:"w-4 h-4"})}),l.jsx("button",{onClick:v,className:"p-1.5 rounded-sm text-muted hover:text-main bg-surface border border-grid transition",title:"Nächster Monat",children:l.jsx(kp,{className:"w-4 h-4"})})]})]}),l.jsxs("div",{className:"hallmark-panel rounded-sm border border-grid overflow-hidden",children:[l.jsxs("div",{className:"grid grid-cols-7 bg-subtle border-b border-grid text-center text-xs font-mono text-muted font-bold py-3 uppercase",children:[l.jsx("div",{children:"MO"}),l.jsx("div",{children:"DI"}),l.jsx("div",{children:"MI"}),l.jsx("div",{children:"DO"}),l.jsx("div",{children:"FR"}),l.jsx("div",{children:"SA"}),l.jsx("div",{children:"SO"})]}),l.jsxs("div",{className:"grid grid-cols-7 auto-rows-fr divide-x divide-y divide-grid bg-surface text-xs font-mono",children:[Array.from({length:N}).map((d,y)=>l.jsx("div",{className:"min-h-[100px] sm:min-h-[110px] p-2 bg-subtle/50 text-muted opacity-30"},`offset-${y}`)),Array.from({length:k}).map((d,y)=>{const j=y+1,b=f(j),T=new Date().getFullYear()===a&&new Date().getMonth()===u&&new Date().getDate()===j;return l.jsxs("div",{className:`min-h-[100px] sm:min-h-[110px] p-2 flex flex-col justify-between transition ${T?"bg-surface-hover/80 font-bold":"hover:bg-surface-hover/50"}`,children:[l.jsxs("div",{className:"flex items-center justify-between mb-1",children:[l.jsx("span",{className:`w-5 h-5 rounded-sm flex items-center justify-center font-mono text-xs ${T?"bg-main text-paper font-bold shadow-sm":"text-muted"}`,children:j}),b.length>0&&l.jsxs("span",{className:"text-[9px] font-mono text-muted",children:[b.length," ",b.length===1?"Event":"Events"]})]}),l.jsx("div",{className:"space-y-1.5 overflow-y-auto max-h-[70px] no-scrollbar",children:b.map(P=>{const B=(i==null?void 0:i.id)===P.id;return l.jsx("button",{onClick:()=>o(P),style:{backgroundColor:B?c:`${c}15`,borderColor:`${c}40`,color:B?"#ffffff":c},className:`w-full text-left px-2 py-1 rounded-sm text-[10px] font-mono font-bold border truncate block hover:brightness-110 transition shadow-sm ${P.is_active===!1?"opacity-50 line-through":""}`,children:P.title},`evt-${P.id}`)})})]},`day-${j}`)})]})]}),i&&l.jsxs("div",{className:"hallmark-panel rounded-sm p-6 border border-grid flex flex-col sm:flex-row sm:items-center justify-between gap-4 font-mono animate-in fade-in duration-200",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs text-muted",children:[l.jsxs("span",{className:"flex items-center gap-1 bg-subtle px-2 py-0.5 rounded-sm border border-grid font-bold text-main",children:[l.jsx(Sr,{className:"w-3 h-3 text-muted"}),new Date(i.start_date).toLocaleDateString("de-DE")," — ",new Date(i.end_date).toLocaleDateString("de-DE")]}),i.location&&l.jsxs("span",{className:"flex items-center gap-1 text-muted",children:[l.jsx(So,{className:"w-3 h-3"}),i.location]})]}),l.jsx("h3",{className:"font-serif text-2xl font-bold uppercase text-main",children:i.title}),i.description&&l.jsx("p",{className:"text-xs font-sans text-muted max-w-xl",children:i.description})]}),l.jsx("div",{className:"flex items-center gap-2 shrink-0",children:l.jsxs("button",{onClick:()=>t(i.id),style:{backgroundColor:c},className:"px-5 py-2 rounded-sm text-xs font-mono font-bold text-white transition flex items-center gap-1.5 hover:brightness-110 shadow-sm",children:["SCHICHTPLAN ÖFFNEN ",l.jsx(Nd,{className:"w-4 h-4"})]})})]})]})}function Hp({branding:e,onRefreshBranding:t,onRefreshEvents:n,skills:r,onRefreshSkills:s}){const[i,o]=w.useState("users"),[a,u]=w.useState(!0),[m,h]=w.useState(""),[v,x]=w.useState(""),[S,N]=w.useState([]),[k,O]=w.useState(""),[f,c]=w.useState([]),[d,y]=w.useState(!1),[j,b]=w.useState(!1),[T,P]=w.useState(!0),[B,M]=w.useState([]),[q,G]=w.useState(""),[Y,ge]=w.useState([]),[Se,ye]=w.useState([]),[Ce,L]=w.useState(""),[I,g]=w.useState(""),[E,z]=w.useState(iu()),[$,D]=w.useState((e==null?void 0:e.app_name)||"Veranstaltungsschichtplaner"),[H,ae]=w.useState((e==null?void 0:e.logo_url)||""),[tt,Lr]=w.useState((e==null?void 0:e.primary_color)||"#E05A47"),[zr,Xs]=w.useState((e==null?void 0:e.custom_banner_text)||""),[Bt,On]=w.useState((e==null?void 0:e.show_community_info_box)??!0),[Mr,Ut]=w.useState((e==null?void 0:e.community_info_title)||"📌 Verein & Infos"),[Ar,el]=w.useState((e==null?void 0:e.community_info_text)||`Initiative e.V. Hausverein
|
|
Offene Angebote, DIY-Kultur & engagierte Schichten.`),[Ht,tl]=w.useState((e==null?void 0:e.show_support_box)??!0),[Dr,C]=w.useState((e==null?void 0:e.support_box_title)||"❤️ Unterstützen"),[R,J]=w.useState((e==null?void 0:e.support_box_text)||"Hilf mit als Helfer*in an der Bar, beim Essen kochen oder beim Auf- & Abbau."),[nt,K]=w.useState(!1),[wt,bo]=w.useState(!1),[_o,Eo]=w.useState("smtp.beispiel.de"),[Co,To]=w.useState(587),[Po,Lo]=w.useState(""),[zo,Mo]=w.useState(""),[Ao,nl]=w.useState(!0),[Do,rl]=w.useState(!1),[Ro,Oo]=w.useState("noreply@schichtplaner.de"),[Io,Cd]=w.useState(""),[sl,Td]=w.useState(!1),[$o,Vo]=w.useState(!1),[Fo,Bo]=w.useState(!1);w.useEffect(()=>{Uo()},[]);const Uo=async()=>{u(!0);try{try{const p=await V("/users/manage-users/");N(p.results||p)}catch{}try{const p=await V("/users/pending/");c(p.results||p)}catch{}try{const p=await V("/users/restriction-setting/");y(p.is_restriction_enabled),b(p.require_admin_approval),P(p.require_email_verification??!0)}catch{}try{const p=await V("/users/domain-rules/");M(p.results||p)}catch{}try{const p=await V("/events/");ge(p.results||p)}catch{}try{const p=await V("/templates/");ye(p.results||p)}catch{}try{const p=await V("/users/smtp-setting/");p&&(bo(p.is_active??!1),Eo(p.host||""),To(p.port||587),Lo(p.username||""),Mo(p.password||""),nl(p.use_tls??!0),rl(p.use_ssl??!1),Oo(p.from_email||""))}catch{}}catch(p){h(p.message||"Laden der Admin-Daten fehlgeschlagen.")}finally{u(!1)}},Te=p=>{x(p),setTimeout(()=>x(""),4e3)},Pd=async p=>{try{const F=await V(`/users/manage-users/${p.id}/`,{method:"PATCH",body:JSON.stringify({is_admin_user:!p.is_admin_user})});N(S.map(Nt=>Nt.id===p.id?F:Nt)),Te(`Admin-Rechte für ${p.username} aktualisiert.`)}catch(F){h(F.message||"Fehler beim Aktualisieren.")}},Ld=async p=>{try{const F=await V(`/users/manage-users/${p.id}/`,{method:"PATCH",body:JSON.stringify({is_approved:!p.is_approved})});N(S.map(Nt=>Nt.id===p.id?F:Nt)),Te(`Freischalt-Status für ${p.username} aktualisiert.`)}catch(F){h(F.message||"Fehler beim Aktualisieren.")}},zd=async p=>{if(window.confirm(`Möchtest du das Benutzerkonto "${p.display_name||p.username}" (@${p.username}) wirklich dauerhaft löschen?`))try{await V(`/users/manage-users/${p.id}/`,{method:"DELETE"}),N(S.filter(F=>F.id!==p.id)),Te(`Benutzerkonto ${p.username} wurde gelöscht.`)}catch(F){h(F.message||"Fehler beim Löschen des Benutzers.")}},Md=async p=>{try{await V(`/users/${p}/approve/`,{method:"POST"}),c(f.filter(F=>F.id!==p)),Uo(),Te("Benutzer erfolgreich freigeschaltet.")}catch(F){h(F.message||"Freischalten fehlgeschlagen.")}},Ad=async p=>{try{await V(`/users/${p}/approve/`,{method:"DELETE"}),c(f.filter(F=>F.id!==p)),Te("Benutzer abgelehnt und gelöscht.")}catch(F){h(F.message||"Ablehnen fehlgeschlagen.")}},ll=async(p,F)=>{try{const il=await V("/users/restriction-setting/",{method:"POST",body:JSON.stringify({is_restriction_enabled:p==="restriction"?F:d,require_admin_approval:p==="approval"?F:j,require_email_verification:p==="email_verify"?F:T})});y(il.is_restriction_enabled),b(il.require_admin_approval),P(il.require_email_verification),Te("Sicherheitseinstellungen aktualisiert.")}catch(Nt){h(Nt.message||"Aktualisierung fehlgeschlagen.")}},Dd=async p=>{if(p.preventDefault(),!!q.trim())try{const F=await V("/users/domain-rules/",{method:"POST",body:JSON.stringify({domain:q})});M([...B,F]),G(""),Te(`Domain-Regel "${F.domain}" hinzugefügt.`)}catch(F){h(F.message||"Fehler beim Hinzufügen.")}},Rd=async p=>{try{await V(`/users/domain-rules/${p}/`,{method:"DELETE"}),M(B.filter(F=>F.id!==p)),Te("Domain-Regel entfernt.")}catch(F){h(F.message||"Fehler beim Löschen.")}},Od=async p=>{if(p.preventDefault(),!!Ce.trim())try{await V("/skills/",{method:"POST",body:JSON.stringify({name:Ce,description:I,color:E})}),L(""),g(""),z(iu()),s(),Te("Qualifikation angelegt.")}catch(F){h(F.message||"Fehler beim Anlegen.")}},Id=async p=>{try{await V(`/skills/${p}/`,{method:"DELETE"}),s(),Te("Qualifikation gelöscht.")}catch(F){h(F.message||"Fehler beim Löschen.")}},$d=async p=>{try{await V(`/templates/${p}/`,{method:"DELETE"}),ye(Se.filter(F=>F.id!==p)),Te("Vorlage gelöscht.")}catch(F){h(F.message||"Fehler beim Löschen.")}},Vd=async p=>{p.preventDefault(),K(!0);try{await V("/branding/",{method:"POST",body:JSON.stringify({app_name:$,logo_url:H,primary_color:tt,custom_banner_text:zr,show_community_info_box:Bt,community_info_title:Mr,community_info_text:Ar,show_support_box:Ht,support_box_title:Dr,support_box_text:R})}),t(),Te("Branding-Einstellungen erfolgreich gespeichert!")}catch(F){h(F.message||"Speichern des Brandings fehlgeschlagen.")}finally{K(!1)}},Fd=async p=>{p.preventDefault(),Vo(!0);try{await V("/users/smtp-setting/",{method:"POST",body:JSON.stringify({is_active:wt,host:_o,port:parseInt(Co)||587,username:Po,password:zo,use_tls:Ao,use_ssl:Do,from_email:Ro})}),Te("✅ SMTP-Einstellungen erfolgreich gespeichert!")}catch(F){h(F.message||"Speichern der SMTP-Einstellungen fehlgeschlagen.")}finally{Vo(!1)}},Bd=async()=>{Bo(!0);try{const p=await V("/users/smtp-setting/test/",{method:"POST",body:JSON.stringify({email:Io})});Te(`✅ ${p.message||"Test-E-Mail erfolgreich gesendet!"}`)}catch(p){h(p.message||"Test-E-Mail fehlgeschlagen.")}finally{Bo(!1)}},Ho=S.filter(p=>p.username.toLowerCase().includes(k.toLowerCase())||p.email.toLowerCase().includes(k.toLowerCase())||p.display_name&&p.display_name.toLowerCase().includes(k.toLowerCase()));return l.jsxs("div",{className:"space-y-6 max-w-5xl mx-auto animate-in fade-in duration-200 font-sans",children:[l.jsx("div",{className:"hallmark-panel rounded-sm p-6 sm:p-8 border border-grid space-y-2",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"w-10 h-10 rounded-sm bg-indigo-500/10 text-indigo-500 border border-indigo-500/20 flex items-center justify-center font-bold",children:l.jsx(jd,{className:"w-5 h-5"})}),l.jsxs("div",{children:[l.jsx("h2",{className:"font-serif text-3xl font-bold uppercase tracking-tight text-main",children:"System Administration"}),l.jsx("p",{className:"text-xs text-muted font-mono mt-0.5",children:"Verwaltung von Benutzern, Freischaltungen, Events, Vorlagen, Branding & SMTP-Mailserver"})]})]})}),l.jsx("div",{className:"border-b border-grid pb-2",children:l.jsxs("div",{className:"flex items-center gap-1.5 font-mono text-xs overflow-x-auto no-scrollbar",children:[l.jsxs("button",{onClick:()=>o("users"),className:`px-4 py-2 rounded-sm transition flex items-center gap-2 border ${i==="users"?"bg-surface-hover text-main font-bold border-grid shadow-sm":"bg-subtle text-muted border-transparent hover:text-main"}`,children:[l.jsx(_d,{className:"w-3.5 h-3.5 text-blue-400"})," [ 01: BENUTZER & SICHERHEIT (",S.length,") ]"]}),l.jsxs("button",{onClick:()=>o("events"),className:`px-4 py-2 rounded-sm transition flex items-center gap-2 border ${i==="events"?"bg-surface-hover text-main font-bold border-grid shadow-sm":"bg-subtle text-muted border-transparent hover:text-main"}`,children:[l.jsx(Pr,{className:"w-3.5 h-3.5 text-emerald-400"})," [ 02: VERANSTALTUNGEN (",Y.length,") ]"]}),l.jsxs("button",{onClick:()=>o("templates"),className:`px-4 py-2 rounded-sm transition flex items-center gap-2 border ${i==="templates"?"bg-surface-hover text-main font-bold border-grid shadow-sm":"bg-subtle text-muted border-transparent hover:text-main"}`,children:[l.jsx(Js,{className:"w-3.5 h-3.5 text-amber-400"})," [ 03: VORLAGEN & SKILLS ]"]}),l.jsxs("button",{onClick:()=>o("branding"),className:`px-4 py-2 rounded-sm transition flex items-center gap-2 border ${i==="branding"?"bg-surface-hover text-main font-bold border-grid shadow-sm":"bg-subtle text-muted border-transparent hover:text-main"}`,children:[l.jsx(nu,{className:"w-3.5 h-3.5 text-indigo-400"})," [ 04: BRANDING & SYSTEM ]"]}),l.jsxs("button",{onClick:()=>o("smtp"),className:`px-4 py-2 rounded-sm transition flex items-center gap-2 border ${i==="smtp"?"bg-surface-hover text-main font-bold border-grid shadow-sm":"bg-subtle text-muted border-transparent hover:text-main"}`,children:[l.jsx(_i,{className:"w-3.5 h-3.5 text-purple-400"})," [ 05: E-MAIL & SMTP ]"]})]})}),m&&l.jsxs("div",{className:"p-4 rounded-sm bg-red-500/10 border border-red-500/20 text-red-500 text-xs font-mono flex items-center gap-2",children:[l.jsx(Mn,{className:"w-4 h-4 shrink-0"}),l.jsx("span",{children:m})]}),v&&l.jsxs("div",{className:"p-4 rounded-sm bg-emerald-500/10 border border-emerald-500/20 text-emerald-400 text-xs font-mono flex items-center gap-2",children:[l.jsx(ut,{className:"w-4 h-4 shrink-0"}),l.jsx("span",{children:v})]}),i==="users"&&l.jsxs("div",{className:"space-y-6 animate-in fade-in duration-150 font-mono",children:[f.length>0&&l.jsxs("div",{className:"hallmark-panel rounded-sm p-5 border border-amber-500/40 bg-amber-500/5 space-y-3",children:[l.jsxs("h3",{className:"font-serif text-lg font-bold uppercase text-amber-500 flex items-center gap-2 border-b border-amber-500/20 pb-2",children:["⚠️ Ausstehende Registrierungen (",f.length,")"]}),l.jsx("div",{className:"space-y-2",children:f.map(p=>l.jsxs("div",{className:"p-3 rounded-sm bg-surface border border-grid flex items-center justify-between text-xs",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"font-bold text-main",children:[p.display_name," (@",p.username,")"]}),l.jsx("div",{className:"text-[11px] text-muted",children:p.email})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("button",{onClick:()=>Md(p.id),className:"px-3 py-1 rounded-sm bg-emerald-600 hover:bg-emerald-500 text-white font-bold text-xs",children:"[ FREISCHALTEN ]"}),l.jsx("button",{onClick:()=>Ad(p.id),className:"px-3 py-1 rounded-sm bg-red-600/20 text-red-400 hover:bg-red-600/30 border border-red-600/30 font-bold text-xs",children:"[ ABLEHNEN ]"})]})]},p.id))})]}),l.jsxs("div",{className:"hallmark-panel rounded-sm p-4 border border-grid flex items-center gap-3",children:[l.jsx(Sd,{className:"w-4 h-4 text-muted shrink-0"}),l.jsx("input",{type:"text",value:k,onChange:p=>O(p.target.value),placeholder:"Nutzer suchen nach Name, Username oder E-Mail...",className:"w-full bg-subtle border border-grid px-3 py-1.5 rounded-sm text-xs font-mono text-main focus:outline-none focus:border-muted"}),k&&l.jsx("button",{onClick:()=>O(""),className:"text-xs text-muted hover:text-main font-mono shrink-0",children:"[ CLEAR ]"})]}),l.jsxs("div",{className:"hallmark-panel rounded-sm p-5 border border-grid space-y-4",children:[l.jsxs("h3",{className:"font-serif text-lg font-bold uppercase text-main border-b border-grid pb-2",children:["Benutzerkonten & Rechtestatus (",Ho.length,")"]}),l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full text-left border-collapse text-xs",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"border-b border-grid text-muted uppercase text-[10px]",children:[l.jsx("th",{className:"pb-2 font-bold",children:"Nutzer"}),l.jsx("th",{className:"pb-2 font-bold",children:"E-Mail"}),l.jsx("th",{className:"pb-2 font-bold",children:"Freigeschaltet"}),l.jsx("th",{className:"pb-2 font-bold",children:"E-Mail Bestätigt"}),l.jsx("th",{className:"pb-2 font-bold",children:"Admin-Rolle"}),l.jsx("th",{className:"pb-2 font-bold text-right",children:"Aktionen"})]})}),l.jsx("tbody",{className:"divide-y divide-grid",children:Ho.map(p=>l.jsxs("tr",{className:"hover:bg-subtle/50 transition",children:[l.jsxs("td",{className:"py-2.5 font-bold text-main",children:[p.display_name||p.username,l.jsxs("span",{className:"text-[10px] text-muted font-normal block",children:["@",p.username]})]}),l.jsx("td",{className:"py-2.5 text-muted",children:p.email}),l.jsx("td",{className:"py-2.5",children:l.jsx("span",{className:`px-2 py-0.5 rounded-sm text-[10px] font-bold border ${p.is_approved?"bg-emerald-500/10 text-emerald-400 border-emerald-500/20":"bg-amber-500/10 text-amber-400 border-amber-500/20"}`,children:p.is_approved?"JA":"NEIN"})}),l.jsx("td",{className:"py-2.5",children:l.jsx("span",{className:`px-2 py-0.5 rounded-sm text-[10px] font-bold border ${p.is_email_verified?"bg-emerald-500/10 text-emerald-400 border-emerald-500/20":"bg-subtle text-muted border-grid"}`,children:p.is_email_verified?"VERIFIZIERT":"AUSSTEHEND"})}),l.jsx("td",{className:"py-2.5",children:l.jsx("span",{className:`px-2 py-0.5 rounded-sm text-[10px] font-bold border ${p.is_admin_user||p.is_superuser?"bg-indigo-500/10 text-indigo-400 border-indigo-500/20":"bg-subtle text-muted border-grid"}`,children:p.is_superuser?"SUPERUSER":p.is_admin_user?"ADMIN":"USER"})}),l.jsxs("td",{className:"py-2.5 text-right space-x-1",children:[l.jsx("button",{onClick:()=>Ld(p),className:"px-2 py-1 rounded-sm text-[10px] bg-subtle hover:bg-surface-hover border border-grid text-main transition",children:p.is_approved?"Sperren":"Freischalten"}),l.jsx("button",{onClick:()=>Pd(p),className:"px-2 py-1 rounded-sm text-[10px] bg-subtle hover:bg-surface-hover border border-grid text-indigo-400 transition",children:p.is_admin_user?"Admin entziehen":"Zu Admin machen"}),l.jsxs("button",{onClick:()=>zd(p),className:"px-2 py-1 rounded-sm text-[10px] bg-red-500/10 hover:bg-red-500/20 border border-red-500/20 text-red-400 font-bold transition inline-flex items-center gap-1",title:"Benutzerkonto dauerhaft löschen",children:[l.jsx(Ue,{className:"w-3 h-3"})," Löschen"]})]})]},p.id))})]})})]}),l.jsxs("div",{className:"hallmark-panel rounded-sm p-5 border border-grid space-y-4",children:[l.jsx("h3",{className:"font-serif text-lg font-bold uppercase text-main border-b border-grid pb-2",children:"Sicherheit & Registrierungs-Einschränkungen"}),l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[l.jsxs("div",{className:"p-4 rounded-sm bg-subtle border border-grid space-y-2",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"font-bold text-main",children:"E-Mail Bestätigung (Opt-Out)"}),l.jsx("button",{onClick:()=>ll("email_verify",!T),className:`px-3 py-1 rounded-sm text-xs font-bold transition border ${T?"bg-emerald-600 text-white border-emerald-500":"bg-amber-500/10 text-amber-500 border-amber-500/20"}`,children:T?"[ PFLICHT ]":"[ DEAKTIVIERT ]"})]}),l.jsx("p",{className:"text-[11px] text-muted font-sans",children:"Bei Pflicht muss die E-Mail vor der Anmeldung verifiziert werden. Bei Deaktivierung ist die Anmeldung direkt möglich."})]}),l.jsxs("div",{className:"p-4 rounded-sm bg-subtle border border-grid space-y-2",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"font-bold text-main",children:"Domain-Einschränkung"}),l.jsx("button",{onClick:()=>ll("restriction",!d),className:`px-3 py-1 rounded-sm text-xs font-bold transition border ${d?"bg-emerald-600 text-white border-emerald-500":"bg-surface text-muted border-grid"}`,children:d?"[ AKTIV ]":"[ INAKTIV ]"})]}),l.jsx("p",{className:"text-[11px] text-muted font-sans",children:"Erlaubt nur Registrierungen von festgelegten E-Mail-Domains (z. B. `@verein.de`)."})]}),l.jsxs("div",{className:"p-4 rounded-sm bg-subtle border border-grid space-y-2",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"font-bold text-main",children:"Admin-Freischaltpflicht"}),l.jsx("button",{onClick:()=>ll("approval",!j),className:`px-3 py-1 rounded-sm text-xs font-bold transition border ${j?"bg-emerald-600 text-white border-emerald-500":"bg-surface text-muted border-grid"}`,children:j?"[ AKTIV ]":"[ INAKTIV ]"})]}),l.jsx("p",{className:"text-[11px] text-muted font-sans",children:"Erfordert die manuelle Freischaltung durch einen Admin vor der ersten Anmeldung."})]})]}),d&&l.jsxs("div",{className:"space-y-3 pt-3 border-t border-grid",children:[l.jsx("h4",{className:"font-serif text-sm font-bold uppercase text-main",children:"Erlaubte E-Mail-Domains"}),l.jsxs("form",{onSubmit:Dd,className:"flex gap-2",children:[l.jsx("input",{type:"text",placeholder:"z. B. verein.de oder @beispiel.org",value:q,onChange:p=>G(p.target.value),className:"flex-1 px-3 py-1.5 rounded-sm input-field text-xs font-mono"}),l.jsxs("button",{type:"submit",className:"px-4 py-1.5 rounded-sm bg-indigo-600 hover:bg-indigo-500 text-white font-bold text-xs",children:[l.jsx(at,{className:"w-3.5 h-3.5 inline"})," Domain Hinzufügen"]})]}),l.jsx("div",{className:"flex flex-wrap gap-2",children:B.map(p=>l.jsxs("span",{className:"px-2.5 py-1 rounded-sm bg-subtle border border-grid text-xs flex items-center gap-2",children:[l.jsx("strong",{className:"text-main",children:p.domain}),l.jsx("button",{onClick:()=>Rd(p.id),className:"text-muted hover:text-red-400",children:l.jsx(Ue,{className:"w-3.5 h-3.5"})})]},p.id))})]})]})]}),i==="events"&&l.jsx("div",{className:"space-y-6 animate-in fade-in duration-150 font-mono",children:l.jsxs("div",{className:"hallmark-panel rounded-sm p-5 border border-grid space-y-4",children:[l.jsxs("h3",{className:"font-serif text-lg font-bold uppercase text-main border-b border-grid pb-2",children:["Alle Veranstaltungen (",Y.length,")"]}),l.jsx("div",{className:"space-y-3",children:Y.map(p=>l.jsxs("div",{className:"p-4 rounded-sm bg-subtle border border-grid flex items-center justify-between text-xs",children:[l.jsxs("div",{children:[l.jsx("h4",{className:"font-serif font-bold text-main text-sm",children:p.title}),l.jsxs("p",{className:"text-muted text-[11px]",children:[new Date(p.start_date).toLocaleDateString("de-DE")," — ",p.location||"Kein Ort"," | Erstellt von: ",p.created_by_name||"Admin"]})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:`px-2 py-0.5 rounded-sm text-[10px] font-bold border ${p.is_active!==!1?"bg-emerald-500/10 text-emerald-400 border-emerald-500/20":"bg-amber-500/10 text-amber-400 border-amber-500/20"}`,children:p.is_active!==!1?"AKTIV":"DEAKTIVIERT"}),l.jsxs("button",{onClick:async()=>{if(window.confirm(`Möchtest du "${p.title}" und alle Schichten wirklich unwiderruflich löschen?`))try{await V(`/events/${p.id}/`,{method:"DELETE"}),n()}catch(F){alert(F.message)}},className:"px-2.5 py-1 rounded-sm text-[10px] font-bold bg-red-500/10 hover:bg-red-500/20 text-red-400 border border-red-500/20 transition flex items-center gap-1",title:"Veranstaltung löschen",children:[l.jsx(Ue,{className:"w-3 h-3"})," LÖSCHEN"]})]})]},p.id))})]})}),i==="templates"&&l.jsxs("div",{className:"space-y-6 animate-in fade-in duration-150 font-mono",children:[l.jsxs("div",{className:"hallmark-panel rounded-sm p-5 border border-grid space-y-4",children:[l.jsx("h3",{className:"font-serif text-lg font-bold uppercase text-main border-b border-grid pb-2",children:"Erforderliche Qualifikationen (Skills)"}),l.jsxs("form",{onSubmit:Od,className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[l.jsx("input",{type:"text",placeholder:"Skill Name (z. B. Bar-Erfahrung)",required:!0,value:Ce,onChange:p=>L(p.target.value),className:"px-3 py-1.5 rounded-sm input-field text-xs font-mono"}),l.jsx("input",{type:"text",placeholder:"Beschreibung (optional)",value:I,onChange:p=>g(p.target.value),className:"px-3 py-1.5 rounded-sm input-field text-xs font-mono"}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx("input",{type:"color",value:E,onChange:p=>z(p.target.value),className:"w-8 h-8 rounded-sm border-0 cursor-pointer bg-subtle p-0.5"}),l.jsxs("button",{type:"submit",className:"flex-1 px-3 py-1.5 rounded-sm bg-emerald-600 hover:bg-emerald-500 text-white font-bold text-xs",children:[l.jsx(at,{className:"w-3.5 h-3.5 inline"})," Anlegen"]})]})]}),l.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 pt-2",children:r.map(p=>l.jsxs("div",{className:"p-3 rounded-sm bg-subtle border border-grid flex items-center justify-between text-xs",children:[l.jsxs("div",{children:[l.jsx("span",{style:{color:p.color},className:"font-bold",children:p.name}),p.description&&l.jsx("p",{className:"text-[11px] text-muted",children:p.description})]}),l.jsx("button",{onClick:()=>Id(p.id),className:"text-muted hover:text-red-400",children:l.jsx(Ue,{className:"w-3.5 h-3.5"})})]},p.id))})]}),l.jsxs("div",{className:"hallmark-panel rounded-sm p-5 border border-grid space-y-4",children:[l.jsxs("h3",{className:"font-serif text-lg font-bold uppercase text-main border-b border-grid pb-2",children:["Gespeicherte Event-Vorlagen (",Se.length,")"]}),l.jsx("div",{className:"space-y-2",children:Se.map(p=>l.jsxs("div",{className:"p-3 rounded-sm bg-subtle border border-grid flex items-center justify-between text-xs",children:[l.jsxs("div",{children:[l.jsx("div",{className:"font-bold text-main",children:p.name}),l.jsx("div",{className:"text-[11px] text-muted",children:p.description||"Keine Beschreibung"})]}),l.jsx("button",{onClick:()=>$d(p.id),className:"text-muted hover:text-red-400",children:l.jsx(Ue,{className:"w-4 h-4"})})]},p.id))})]})]}),i==="branding"&&l.jsx("div",{className:"space-y-6 animate-in fade-in duration-150 font-mono",children:l.jsxs("form",{onSubmit:Vd,className:"hallmark-panel rounded-sm p-6 border border-grid space-y-6",children:[l.jsxs("h3",{className:"font-serif text-lg font-bold uppercase text-main border-b border-grid pb-2 flex items-center gap-2",children:[l.jsx(nu,{className:"w-5 h-5 text-indigo-400"})," Portal Branding & Erscheinungsbild"]}),l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 text-xs",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-muted mb-1",children:"Anwendungs-Name"}),l.jsx("input",{type:"text",required:!0,value:$,onChange:p=>D(p.target.value),className:"w-full px-3 py-1.5 rounded-sm input-field font-bold"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-muted mb-1",children:"Primärfarbe (Brand Accent)"}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx("input",{type:"color",value:tt,onChange:p=>Lr(p.target.value),className:"w-9 h-9 rounded-sm border-0 cursor-pointer bg-subtle p-0.5"}),l.jsx("input",{type:"text",value:tt,onChange:p=>Lr(p.target.value),className:"flex-1 px-3 py-1.5 rounded-sm input-field font-mono"})]})]}),l.jsxs("div",{className:"sm:col-span-2",children:[l.jsx("label",{className:"block text-muted mb-1",children:"Logo Bild-URL (optional)"}),l.jsx("input",{type:"text",placeholder:"https://beispiel.de/logo.png",value:H,onChange:p=>ae(p.target.value),className:"w-full px-3 py-1.5 rounded-sm input-field"})]}),l.jsxs("div",{className:"sm:col-span-2",children:[l.jsx("label",{className:"block text-muted mb-1",children:"Ankündigung (Banner-Text)"}),l.jsx("textarea",{rows:2,placeholder:"z. B. Willkommen beim Sommerfest Schichtplaner!",value:zr,onChange:p=>Xs(p.target.value),className:"w-full px-3 py-1.5 rounded-sm input-field"})]})]}),l.jsx("h4",{className:"font-serif text-base font-bold uppercase text-main pt-4 border-t border-grid",children:"Startseiten Sidebar Boxen"}),l.jsxs("div",{className:"p-4 rounded-sm bg-subtle border border-grid space-y-3",children:[l.jsxs("div",{className:"flex items-center justify-between border-b border-grid pb-2",children:[l.jsx("span",{className:"font-bold text-xs uppercase text-main",children:"📌 Verein & Infos Box"}),l.jsx("button",{type:"button",onClick:()=>On(!Bt),className:`px-3 py-1 rounded-sm text-xs font-bold transition border ${Bt?"bg-emerald-600 text-white border-emerald-500":"bg-surface text-muted border-grid"}`,children:Bt?"[ AN ]":"[ AUS ]"})]}),Bt&&l.jsxs("div",{className:"space-y-3 text-xs",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-muted mb-1",children:"Titel"}),l.jsx("input",{type:"text",value:Mr,onChange:p=>Ut(p.target.value),className:"w-full px-3 py-1.5 rounded-sm input-field"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-muted mb-1",children:"Inhalt"}),l.jsx("textarea",{rows:3,value:Ar,onChange:p=>el(p.target.value),className:"w-full px-3 py-1.5 rounded-sm input-field"})]})]})]}),l.jsxs("div",{className:"p-4 rounded-sm bg-subtle border border-grid space-y-3",children:[l.jsxs("div",{className:"flex items-center justify-between border-b border-grid pb-2",children:[l.jsx("span",{className:"font-bold text-xs uppercase text-main",children:"❤️ Unterstützen Box"}),l.jsx("button",{type:"button",onClick:()=>tl(!Ht),className:`px-3 py-1 rounded-sm text-xs font-bold transition border ${Ht?"bg-emerald-600 text-white border-emerald-500":"bg-surface text-muted border-grid"}`,children:Ht?"[ AN ]":"[ AUS ]"})]}),Ht&&l.jsxs("div",{className:"space-y-3 text-xs",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-muted mb-1",children:"Titel"}),l.jsx("input",{type:"text",value:Dr,onChange:p=>C(p.target.value),className:"w-full px-3 py-1.5 rounded-sm input-field"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-muted mb-1",children:"Inhalt"}),l.jsx("textarea",{rows:3,value:R,onChange:p=>J(p.target.value),className:"w-full px-3 py-1.5 rounded-sm input-field"})]})]})]}),l.jsx("div",{className:"pt-3 flex justify-end border-t border-grid",children:l.jsx("button",{type:"submit",disabled:nt,style:{backgroundColor:"var(--brand-primary)"},className:"px-6 py-2.5 rounded-sm text-xs font-mono font-bold text-white transition hover:brightness-110 shadow-sm",children:nt?"Speichern...":"Einstellungen speichern"})})]})}),i==="smtp"&&l.jsx("div",{className:"space-y-6 animate-in fade-in duration-150 font-mono",children:l.jsxs("form",{onSubmit:Fd,className:"hallmark-panel rounded-sm p-6 border border-grid space-y-6",children:[l.jsxs("div",{className:"flex items-center justify-between border-b border-grid pb-3",children:[l.jsxs("h3",{className:"font-serif text-lg font-bold uppercase text-main flex items-center gap-2",children:[l.jsx(_i,{className:"w-5 h-5 text-indigo-400"})," SMTP Server & E-Mail-Versand"]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-xs text-muted font-bold",children:"SMTP-Versand:"}),l.jsx("button",{type:"button",onClick:()=>bo(!wt),className:`px-3 py-1 rounded-sm text-xs font-bold transition border ${wt?"bg-emerald-600 text-white border-emerald-500 shadow-sm":"bg-subtle text-muted border-grid hover:text-main"}`,children:wt?"[ AKTIV ]":"[ INAKTIV (Dev Mode) ]"})]})]}),!wt&&l.jsxs("div",{className:"p-3.5 rounded-sm bg-amber-500/10 border border-amber-500/20 text-amber-500 text-xs flex items-center gap-2",children:[l.jsx(Mn,{className:"w-4 h-4 shrink-0"}),l.jsx("span",{children:"Hinweis: Im inaktiven Modus werden Bestätigungs-Links in der Entwickler-Konsole / Logs ausgegeben."})]}),l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 text-xs",children:[l.jsxs("div",{className:"sm:col-span-2",children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"SMTP Host / Server Adresse"}),l.jsx("input",{type:"text",placeholder:"z. B. smtp.domain.de oder mail.gmx.net",value:_o,onChange:p=>Eo(p.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field font-mono"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"SMTP Port"}),l.jsx("input",{type:"number",placeholder:"587 oder 465",value:Co,onChange:p=>To(p.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field font-mono"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"Absender E-Mail-Adresse (From)"}),l.jsx("input",{type:"email",placeholder:"noreply@verein.de",value:Ro,onChange:p=>Oo(p.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field font-mono"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"SMTP Benutzername / Login E-Mail"}),l.jsx("input",{type:"text",placeholder:"z. B. noreply@verein.de",value:Po,onChange:p=>Lo(p.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field font-mono"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"SMTP Passwort"}),l.jsxs("div",{className:"relative",children:[l.jsx("input",{type:sl?"text":"password",placeholder:"••••••••",value:zo,onChange:p=>Mo(p.target.value),className:"w-full pl-3.5 pr-10 py-2 rounded-sm input-field font-mono"}),l.jsx("button",{type:"button",onClick:()=>Td(!sl),className:"absolute right-3 top-2.5 text-muted hover:text-main",children:sl?l.jsx(kd,{className:"w-4 h-4"}):l.jsx(jp,{className:"w-4 h-4"})})]})]}),l.jsxs("div",{className:"sm:col-span-2 flex items-center gap-6 pt-2",children:[l.jsxs("label",{className:"flex items-center gap-2 cursor-pointer text-main font-bold",children:[l.jsx("input",{type:"checkbox",checked:Ao,onChange:p=>{nl(p.target.checked),p.target.checked&&rl(!1)},className:"rounded-sm"}),l.jsx("span",{children:"STARTTLS verwenden (Empfohlen für Port 587)"})]}),l.jsxs("label",{className:"flex items-center gap-2 cursor-pointer text-main font-bold",children:[l.jsx("input",{type:"checkbox",checked:Do,onChange:p=>{rl(p.target.checked),p.target.checked&&nl(!1)},className:"rounded-sm"}),l.jsx("span",{children:"SSL/TLS verwenden (Empfohlen für Port 465)"})]})]})]}),l.jsxs("div",{className:"pt-4 border-t border-grid flex flex-wrap items-center justify-between gap-3",children:[l.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-[260px]",children:[l.jsx("input",{type:"email",placeholder:"Empfänger für Test-E-Mail...",value:Io,onChange:p=>Cd(p.target.value),className:"px-3 py-1.5 rounded-sm input-field text-xs flex-1 font-mono"}),l.jsxs("button",{type:"button",disabled:Fo,onClick:Bd,className:"px-3.5 py-1.5 rounded-sm text-xs font-mono font-bold bg-indigo-500/10 text-indigo-400 border border-indigo-500/20 hover:bg-indigo-500/20 transition flex items-center gap-1.5 shrink-0",children:[l.jsx(Lp,{className:"w-3.5 h-3.5"}),Fo?"Sende...":"Test-Mail Senden"]})]}),l.jsxs("button",{type:"submit",disabled:$o,style:{backgroundColor:"var(--brand-primary)"},className:"px-6 py-2.5 rounded-sm text-xs font-mono font-bold text-white transition hover:brightness-110 shadow-sm flex items-center gap-2",children:[l.jsx(ut,{className:"w-4 h-4"}),$o?"Speichern...":"SMTP-Einstellungen Speichern"]})]})]})})]})}function Qp({eventToEdit:e,skills:t,user:n,onBack:r,onSubmit:s,onDeleteEvent:i}){var I;const[o,a]=w.useState((e==null?void 0:e.title)||""),[u,m]=w.useState((e==null?void 0:e.description)||""),[h,v]=w.useState((e==null?void 0:e.location)||""),[x,S]=w.useState((e==null?void 0:e.start_date)||new Date().toISOString().split("T")[0]),[N,k]=w.useState((e==null?void 0:e.end_date)||new Date().toISOString().split("T")[0]),[O,f]=w.useState(e!=null&&e.co_managers?e.co_managers.map(g=>g.id):[]),[c,d]=w.useState([]),[y,j]=w.useState([]),[b,T]=w.useState(!1),[P,B]=w.useState("");w.useEffect(()=>{if(M(),e&&e.task_areas&&e.task_areas.length>0){const g=e.task_areas.map(E=>({id:E.id,name:E.name,description:E.description||"",shifts:(E.shifts||[]).map(z=>({id:z.id,title:z.title,date:z.date||(e?e.start_date:new Date().toISOString().split("T")[0]),start_time:z.start_time,end_time:z.end_time,max_participants:z.max_participants||1,required_skill_ids:z.required_skills?z.required_skills.map($=>$.id):[]}))}));j(g)}else e||j([{name:"Tresendienst",description:"Getränke- und Barverkauf",shifts:[{title:"Schicht 1",start_time:"18:00",end_time:"22:00",max_participants:2,required_skill_ids:[]}]},{name:"Essen kochen",description:"Zubereitung von Speisen",shifts:[{title:"Frühschicht",start_time:"15:00",end_time:"19:00",max_participants:3,required_skill_ids:[]}]},{name:"Aufbau & Aufräumen",description:"Tische, Stühle & Technik",shifts:[{title:"Aufbau",start_time:"12:00",end_time:"15:00",max_participants:4,required_skill_ids:[]}]}])},[e]);const M=async()=>{try{const g=await V("/users/all/");d(g.results||g)}catch{}},q=()=>{j([...y,{name:"",description:"",shifts:[{title:"Schicht 1",start_time:"10:00",end_time:"14:00",max_participants:1,required_skill_ids:[]}]}])},G=g=>{j(y.filter((E,z)=>z!==g))},Y=(g,E,z)=>{const $=[...y];$[g][E]=z,j($)},ge=g=>{const E=[...y];E[g].shifts.push({title:`Schicht ${E[g].shifts.length+1}`,date:x,start_time:"14:00",end_time:"18:00",max_participants:1,required_skill_ids:[]}),j(E)},Se=(g,E)=>{const z=[...y];z[g].shifts=z[g].shifts.filter(($,D)=>D!==E),j(z)},ye=(g,E,z,$)=>{const D=[...y];D[g].shifts[E][z]=$,j(D)},Ce=(g,E,z)=>{const $=[...y],D=$[g].shifts[E].required_skill_ids||[];D.includes(z)?$[g].shifts[E].required_skill_ids=D.filter(H=>H!==z):$[g].shifts[E].required_skill_ids=[...D,z],j($)},L=async g=>{if(g.preventDefault(),B(""),!o.trim()){B("Bitte gib einen Veranstaltungstitel an.");return}T(!0);try{await s({id:e==null?void 0:e.id,title:o,description:u,location:h,start_date:x,end_date:N,co_manager_ids:O,task_areas:y})}catch(E){B(E.message||"Speichern der Veranstaltung fehlgeschlagen.")}finally{T(!1)}};return l.jsxs("div",{className:"space-y-6 max-w-4xl mx-auto animate-in fade-in duration-200 font-sans",children:[l.jsxs("div",{className:"flex items-center justify-between font-mono text-xs",children:[l.jsxs("button",{onClick:r,className:"px-3.5 py-1.5 rounded-sm bg-subtle hover:bg-surface-hover text-main border border-grid transition flex items-center gap-2 font-bold",children:[l.jsx(wd,{className:"w-4 h-4"})," [ ZURÜCK ZUR ÜBERSICHT ]"]}),l.jsxs("span",{className:"text-muted border border-grid px-2.5 py-0.5 rounded-sm",children:["MODE: ",e?"EVENT EDIT":"NEW EVENT"]})]}),l.jsx("div",{className:"hallmark-panel rounded-sm p-6 sm:p-8 border border-grid space-y-2",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"w-10 h-10 rounded-sm bg-blue-500/10 text-blue-500 border border-blue-500/20 flex items-center justify-center font-bold",children:e?l.jsx(jr,{className:"w-5 h-5"}):l.jsx(Pr,{className:"w-5 h-5"})}),l.jsxs("div",{children:[l.jsx("h2",{className:"font-serif text-3xl font-bold uppercase tracking-tight text-main",children:e?"Veranstaltung & Schichten Bearbeiten":"Neue Veranstaltung Erstellen"}),l.jsx("p",{className:"text-xs text-muted font-mono mt-0.5",children:"Konfiguriere Stammdaten, Co-Verwalter, Aufgabenfelder, Schichtzeiten & Qualifikationen"})]})]})}),P&&l.jsxs("div",{className:"p-4 rounded-sm bg-red-500/10 border border-red-500/20 text-red-500 text-xs font-mono flex items-center gap-2",children:[l.jsx(Mn,{className:"w-4 h-4 shrink-0"}),l.jsx("span",{children:P})]}),l.jsxs("form",{onSubmit:L,className:"space-y-6",children:[l.jsxs("div",{className:"hallmark-panel rounded-sm p-6 border border-grid space-y-4 font-mono text-xs",children:[l.jsx("h3",{className:"font-serif text-lg font-bold uppercase text-main border-b border-grid pb-2",children:"1. Stammdaten & Verwalter der Veranstaltung"}),l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"sm:col-span-2",children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"Titel der Veranstaltung"}),l.jsx("input",{type:"text",required:!0,value:o,onChange:g=>a(g.target.value),placeholder:"z. B. Sommerfest 2026",className:"w-full px-3.5 py-2 rounded-sm input-field text-sm"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"Startdatum"}),l.jsx("input",{type:"date",required:!0,value:x,onChange:g=>S(g.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field text-sm"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"Enddatum"}),l.jsx("input",{type:"date",required:!0,value:N,onChange:g=>k(g.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field text-sm"})]}),l.jsxs("div",{className:"sm:col-span-2",children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"Ort (optional)"}),l.jsx("input",{type:"text",value:h,onChange:g=>v(g.target.value),placeholder:"z. B. Vereinsheim, Großer Saal",className:"w-full px-3.5 py-2 rounded-sm input-field text-xs"})]}),l.jsxs("div",{className:"sm:col-span-2",children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"Beschreibung (optional)"}),l.jsx("textarea",{rows:2,value:u,onChange:g=>m(g.target.value),placeholder:"Details zur Veranstaltung...",className:"w-full px-3.5 py-2 rounded-sm input-field text-xs font-sans"})]}),c.length>0&&l.jsxs("div",{className:"sm:col-span-2 pt-3 border-t border-grid space-y-2",children:[l.jsxs("label",{className:"block text-main font-bold flex items-center gap-1.5",children:[l.jsx(_d,{className:"w-4 h-4 text-indigo-400"})," Co-Verwalter / Mit-Organisatoren (optional)"]}),l.jsx("p",{className:"text-[11px] text-muted font-sans",children:"Wähle registrierte Benutzer aus, die dieses Event ebenfalls verwalten, bearbeiten und Gäste eintragen dürfen:"}),l.jsx("div",{className:"flex flex-wrap gap-2 pt-1",children:c.map(g=>{const E=O.includes(g.id);return l.jsxs("button",{type:"button",onClick:()=>{f(E?O.filter(z=>z!==g.id):[...O,g.id])},className:`px-3 py-1.5 rounded-sm text-xs font-mono font-bold transition flex items-center gap-1.5 border ${E?"bg-indigo-500/20 text-indigo-300 border-indigo-500/50 shadow-sm":"bg-subtle text-muted border-grid hover:text-main"}`,children:[l.jsx(jo,{className:`w-3.5 h-3.5 ${E?"text-indigo-400":"opacity-40"}`}),l.jsx("span",{children:g.display_name||g.username})]},g.id)})})]})]})]}),l.jsxs("div",{className:"hallmark-panel rounded-sm p-6 border border-grid space-y-4 font-mono text-xs",children:[l.jsxs("div",{className:"flex items-center justify-between border-b border-grid pb-2",children:[l.jsxs("h3",{className:"font-serif text-lg font-bold uppercase text-main flex items-center gap-2",children:[l.jsx(Js,{className:"w-4 h-4 text-blue-500"})," 2. Aufgabenfelder & Schichten"]}),l.jsxs("button",{type:"button",onClick:q,className:"px-3.5 py-1.5 rounded-sm text-xs font-mono font-bold bg-blue-500/10 text-blue-500 border border-blue-500/20 hover:bg-blue-500/20 transition flex items-center gap-1",children:[l.jsx(at,{className:"w-3.5 h-3.5"})," BEREICH HINZUFÜGEN"]})]}),y.map((g,E)=>l.jsxs("div",{className:"p-4 rounded-sm bg-subtle border border-grid space-y-3",children:[l.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l.jsx("input",{type:"text",required:!0,placeholder:"Name des Aufgabenfeldes (z. B. Tresendienst)",value:g.name,onChange:z=>Y(E,"name",z.target.value),className:"flex-1 px-3 py-1.5 rounded-sm input-field text-xs font-bold"}),l.jsx("button",{type:"button",onClick:()=>G(E),className:"p-1.5 text-muted hover:text-red-400 transition",title:"Bereich entfernen",children:l.jsx(Ue,{className:"w-4 h-4"})})]}),l.jsxs("div",{className:"pl-3 border-l-2 border-grid space-y-3",children:[l.jsxs("div",{className:"flex items-center justify-between text-xs text-muted font-bold",children:[l.jsx("span",{children:"Schichten & Zeitfenster"}),l.jsxs("button",{type:"button",onClick:()=>ge(E),className:"text-blue-500 hover:underline flex items-center gap-1",children:[l.jsx(at,{className:"w-3 h-3"})," Schicht hinzufügen"]})]}),g.shifts.map((z,$)=>l.jsxs("div",{className:"p-3 rounded-sm bg-surface border border-grid space-y-2",children:[l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-12 gap-2 items-center text-xs",children:[l.jsx("input",{type:"text",placeholder:"Titel",value:z.title,onChange:D=>ye(E,$,"title",D.target.value),className:"sm:col-span-3 px-2.5 py-1 rounded-sm input-field text-xs"}),l.jsx("input",{type:"date",title:"Schichtdatum",min:x,max:N,value:z.date||x,onChange:D=>ye(E,$,"date",D.target.value),className:"sm:col-span-3 px-2 py-1 rounded-sm input-field text-xs font-mono text-indigo-400 font-bold"}),l.jsx("input",{type:"text",placeholder:"Start (14:00)",value:z.start_time,onChange:D=>ye(E,$,"start_time",D.target.value),className:"sm:col-span-2 px-2.5 py-1 rounded-sm input-field text-xs"}),l.jsx("input",{type:"text",placeholder:"Ende (18:00)",value:z.end_time,onChange:D=>ye(E,$,"end_time",D.target.value),className:"sm:col-span-2 px-2.5 py-1 rounded-sm input-field text-xs"}),l.jsx("div",{className:"sm:col-span-1 flex items-center gap-1",children:l.jsx("input",{type:"number",min:"1",title:"Max. Plätze",value:z.max_participants,onChange:D=>ye(E,$,"max_participants",parseInt(D.target.value)||1),className:"w-full px-1.5 py-1 rounded-sm input-field text-xs font-bold text-center"})}),l.jsx("button",{type:"button",onClick:()=>Se(E,$),className:"sm:col-span-1 p-1 text-muted hover:text-red-400 text-center",title:"Schicht löschen",children:l.jsx(Ue,{className:"w-3.5 h-3.5 mx-auto"})})]}),t&&t.length>0&&l.jsxs("div",{className:"pt-2 border-t border-grid flex flex-wrap items-center gap-1.5",children:[l.jsx("span",{className:"text-[10px] text-muted font-bold mr-1",children:"Erforderlich:"}),t.map(D=>{const H=(z.required_skill_ids||[]).includes(D.id);return l.jsxs("button",{type:"button",onClick:()=>Ce(E,$,D.id),style:{backgroundColor:H?`${D.color}25`:"transparent",borderColor:H?D.color:"var(--color-border-grid)",color:H?D.color:"var(--color-text-muted)"},className:"px-2 py-0.5 rounded-sm text-[10px] border font-bold transition flex items-center gap-1",children:[l.jsx("span",{children:D.name}),H&&l.jsx(ut,{className:"w-3 h-3"})]},D.id)})]})]},$))]})]},E))]}),l.jsxs("div",{className:"flex items-center justify-between gap-3 pt-2 font-mono",children:[e&&i&&n&&(n.is_admin_user||n.is_staff||n.is_superuser||e.created_by===n.id||((I=e.created_by)==null?void 0:I.id)===n.id)?l.jsxs("button",{type:"button",onClick:()=>i(e),className:"px-4 py-2.5 rounded-sm text-xs font-bold bg-red-500/10 hover:bg-red-500/20 text-red-400 border border-red-500/20 transition flex items-center gap-1.5",children:[l.jsx(Ue,{className:"w-4 h-4"})," VERANSTALTUNG LÖSCHEN"]}):l.jsx("div",{}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("button",{type:"button",onClick:r,className:"px-5 py-2.5 rounded-sm text-xs font-semibold text-muted hover:bg-surface-hover transition border border-grid",children:"Abbrechen"}),l.jsxs("button",{type:"submit",disabled:b,style:{backgroundColor:"var(--brand-primary)"},className:"px-6 py-2.5 rounded-sm text-xs font-bold text-white transition hover:brightness-110 shadow-sm flex items-center gap-2",children:[l.jsx(ut,{className:"w-4 h-4"}),b?"Speichern...":"Veranstaltung Speichern"]})]})]})]})]})}function Wp({onBack:e,onInstantiateTemplate:t,user:n,skills:r}){const[s,i]=w.useState([]),[o,a]=w.useState(!0),[u,m]=w.useState(""),[h,v]=w.useState(null),[x,S]=w.useState(""),[N,k]=w.useState(new Date().toISOString().split("T")[0]),[O,f]=w.useState(new Date().toISOString().split("T")[0]),[c,d]=w.useState(""),[y,j]=w.useState(!1),[b,T]=w.useState(!1),[P,B]=w.useState(""),[M,q]=w.useState(""),[G,Y]=w.useState([{name:"Tresendienst",description:"Getränkeausschank und Bar",shifts:[{title:"Frühschicht",start_time:"18:00",end_time:"22:00",max_participants:2,required_skill_ids:[]},{title:"Spätschicht",start_time:"22:00",end_time:"02:00",max_participants:3,required_skill_ids:[]}]}]);w.useEffect(()=>{ge()},[]);const ge=async()=>{a(!0);try{const g=await V("/templates/");i(g.results||g)}catch(g){m(g.message||"Laden der Vorlagen fehlgeschlagen.")}finally{a(!1)}},Se=g=>{v(g),S(g.name)},ye=async g=>{if(g.preventDefault(),!!h){j(!0);try{await t(h.id,{title:x,start_date:N,end_date:O,location:c})}catch(E){m(E.message||"Erstellen der Veranstaltung aus Vorlage fehlgeschlagen.")}finally{j(!1)}}},Ce=async g=>{if(g.preventDefault(),!P.trim()){m("Bitte gib einen Vorlagen-Namen an.");return}j(!0);try{const E={name:P,description:M,template_data:{task_areas:G.map(z=>({name:z.name,description:z.description,shifts:(z.shifts||[]).map($=>({title:$.title,start_time:$.start_time,end_time:$.end_time,max_participants:$.max_participants,required_skill_ids:$.required_skill_ids}))}))}};await V("/templates/",{method:"POST",body:JSON.stringify(E)}),T(!1),B(""),q(""),ge()}catch(E){m(E.message||"Erstellen der Vorlage fehlgeschlagen.")}finally{j(!1)}},L=()=>{Y([...G,{name:"Neuer Bereich",description:"",shifts:[{title:"Schicht 1",start_time:"14:00",end_time:"18:00",max_participants:2,required_skill_ids:[]}]}])},I=g=>{const E=[...G];E[g].shifts.push({title:`Schicht ${E[g].shifts.length+1}`,start_time:"18:00",end_time:"22:00",max_participants:2,required_skill_ids:[]}),Y(E)};return l.jsxs("div",{className:"space-y-6 max-w-4xl mx-auto animate-in fade-in duration-200 font-sans",children:[l.jsxs("div",{className:"flex items-center justify-between font-mono text-xs",children:[l.jsxs("button",{onClick:e,className:"px-3.5 py-1.5 rounded-sm bg-subtle hover:bg-surface-hover text-main border border-grid transition flex items-center gap-2 font-bold",children:[l.jsx(wd,{className:"w-4 h-4"})," [ ZURÜCK ZUR ÜBERSICHT ]"]}),l.jsxs("span",{className:"text-muted border border-grid px-2.5 py-0.5 rounded-sm uppercase",children:["SYSTEM VORLAGEN (",s.length,")"]})]}),l.jsx("div",{className:"hallmark-panel rounded-sm p-6 sm:p-8 border border-grid space-y-4",children:l.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"w-10 h-10 rounded-sm bg-indigo-500/10 text-indigo-400 border border-indigo-500/20 flex items-center justify-center font-bold",children:l.jsx(Js,{className:"w-5 h-5"})}),l.jsxs("div",{children:[l.jsx("h2",{className:"font-serif text-3xl font-bold uppercase tracking-tight text-main",children:"Veranstaltungs-Vorlagen Zentrale"}),l.jsx("p",{className:"text-xs text-muted font-mono mt-0.5",children:"Erstelle neue Veranstaltungen mit voreingestellten Schichten und Aufgabenbereichen"})]})]}),n&&l.jsxs("button",{onClick:()=>T(!b),className:"px-3.5 py-2 rounded-sm text-xs font-mono font-bold bg-indigo-500/10 text-indigo-400 border border-indigo-500/20 hover:bg-indigo-500/20 transition flex items-center gap-1.5 shrink-0",children:[l.jsx(at,{className:"w-4 h-4"}),b?"Schließen":"Neue Vorlage Erstellen"]})]})}),u&&l.jsxs("div",{className:"p-4 rounded-sm bg-red-500/10 border border-red-500/20 text-red-500 text-xs font-mono flex items-center gap-2",children:[l.jsx(Mn,{className:"w-4 h-4 shrink-0"}),l.jsx("span",{children:u})]}),b&&l.jsxs("form",{onSubmit:Ce,className:"hallmark-panel rounded-sm p-6 border border-grid space-y-4 font-mono text-xs animate-in fade-in duration-200",children:[l.jsxs("h3",{className:"font-serif text-lg font-bold uppercase text-indigo-400 border-b border-grid pb-2 flex items-center justify-between",children:[l.jsx("span",{children:"Neue Vorlage mit voreingestellten Schichten anlegen"}),l.jsxs("button",{type:"button",onClick:L,className:"text-xs font-mono font-bold bg-indigo-500/20 text-indigo-300 px-3 py-1 rounded-sm border border-indigo-500/30 flex items-center gap-1",children:[l.jsx(at,{className:"w-3.5 h-3.5"})," Bereich Hinzufügen"]})]}),l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"sm:col-span-2",children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"Vorlagen Name"}),l.jsx("input",{type:"text",required:!0,placeholder:"z. B. Standard Kneipenabend / Bar-Event",value:P,onChange:g=>B(g.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field text-sm font-bold"})]}),l.jsxs("div",{className:"sm:col-span-2",children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"Beschreibung (optional)"}),l.jsx("input",{type:"text",placeholder:"z. B. Inklusive 2 Barschichten und Aufbau",value:M,onChange:g=>q(g.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field text-xs"})]})]}),l.jsx("div",{className:"space-y-4 pt-2",children:G.map((g,E)=>l.jsxs("div",{className:"p-4 rounded-sm bg-subtle border border-grid space-y-3",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsx("input",{type:"text",required:!0,placeholder:"Bereichs-Name (z. B. Bar)",value:g.name,onChange:z=>{const $=[...G];$[E].name=z.target.value,Y($)},className:"flex-1 px-3 py-1 rounded-sm input-field text-xs font-bold"}),l.jsx("button",{type:"button",onClick:()=>{Y(G.filter((z,$)=>$!==E))},className:"text-muted hover:text-red-400 p-1",children:l.jsx(Ue,{className:"w-4 h-4"})})]}),l.jsxs("div",{className:"pl-3 border-l-2 border-grid space-y-2",children:[l.jsxs("div",{className:"flex items-center justify-between text-muted text-[11px] font-bold",children:[l.jsx("span",{children:"Voreingestellte Schichten"}),l.jsxs("button",{type:"button",onClick:()=>I(E),className:"text-indigo-400 hover:underline flex items-center gap-1",children:[l.jsx(at,{className:"w-3 h-3"})," Schicht hinzufügen"]})]}),g.shifts.map((z,$)=>l.jsxs("div",{className:"p-2.5 rounded-sm bg-surface border border-grid grid grid-cols-1 sm:grid-cols-12 gap-2 items-center text-xs",children:[l.jsx("input",{type:"text",placeholder:"Schichtname",value:z.title,onChange:D=>{const H=[...G];H[E].shifts[$].title=D.target.value,Y(H)},className:"sm:col-span-4 px-2 py-1 rounded-sm input-field text-xs"}),l.jsx("input",{type:"text",placeholder:"Start (18:00)",value:z.start_time,onChange:D=>{const H=[...G];H[E].shifts[$].start_time=D.target.value,Y(H)},className:"sm:col-span-2 px-2 py-1 rounded-sm input-field text-xs"}),l.jsx("input",{type:"text",placeholder:"Ende (22:00)",value:z.end_time,onChange:D=>{const H=[...G];H[E].shifts[$].end_time=D.target.value,Y(H)},className:"sm:col-span-2 px-2 py-1 rounded-sm input-field text-xs"}),l.jsxs("div",{className:"sm:col-span-3 flex items-center gap-1",children:[l.jsx("span",{className:"text-[10px] text-muted",children:"Plätze:"}),l.jsx("input",{type:"number",min:"1",value:z.max_participants,onChange:D=>{const H=[...G];H[E].shifts[$].max_participants=parseInt(D.target.value)||1,Y(H)},className:"w-full px-2 py-1 rounded-sm input-field text-xs font-bold"})]}),l.jsx("button",{type:"button",onClick:()=>{const D=[...G];D[E].shifts=D[E].shifts.filter((H,ae)=>ae!==$),Y(D)},className:"sm:col-span-1 p-1 text-muted hover:text-red-400 text-center",children:l.jsx(Ue,{className:"w-3.5 h-3.5 mx-auto"})})]},$))]})]},E))}),l.jsxs("div",{className:"pt-3 flex justify-end gap-2 border-t border-grid",children:[l.jsx("button",{type:"button",onClick:()=>T(!1),className:"px-4 py-2 rounded-sm text-xs font-semibold text-muted hover:bg-surface-hover transition border border-grid",children:"Abbrechen"}),l.jsxs("button",{type:"submit",disabled:y,style:{backgroundColor:"var(--brand-primary)"},className:"px-5 py-2 rounded-sm text-xs font-mono font-bold text-white transition hover:brightness-110 shadow-sm flex items-center gap-1.5",children:[l.jsx(ut,{className:"w-4 h-4"})," Vorlage Speichern"]})]})]}),l.jsxs("div",{className:"space-y-4 font-mono text-xs",children:[l.jsx("h3",{className:"font-serif text-lg font-bold uppercase text-main",children:"Verfügbare Vorlagen"}),o?l.jsx("div",{className:"hallmark-panel p-8 text-center text-muted",children:"Lade Vorlagen..."}):s.length===0?l.jsx("div",{className:"hallmark-panel p-8 text-center text-muted italic",children:'[ Noch keine Vorlagen gespeichert. Klicke oben auf "Neue Vorlage Erstellen" um Vorlagen mit voreingestellten Schichten anzulegen. ]'}):l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:s.map(g=>{var E;return l.jsxs("div",{onClick:()=>Se(g),className:`hallmark-panel p-5 rounded-sm border cursor-pointer transition space-y-3 ${(h==null?void 0:h.id)===g.id?"bg-indigo-500/10 border-indigo-500 shadow-md":"bg-surface border-grid hover:border-muted"}`,children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h4",{className:"font-serif text-base font-bold text-main uppercase",children:g.name}),(h==null?void 0:h.id)===g.id&&l.jsx("span",{className:"text-[10px] font-mono text-indigo-400 bg-indigo-500/20 px-2 py-0.5 rounded-sm border border-indigo-500/30 font-bold",children:"[ AUSGEWÄHLT ]"})]}),g.description&&l.jsx("p",{className:"text-xs font-sans text-muted",children:g.description}),((E=g.template_data)==null?void 0:E.task_areas)&&g.template_data.task_areas.length>0&&l.jsxs("div",{className:"space-y-2 pt-2 border-t border-grid text-[11px]",children:[l.jsx("div",{className:"font-bold text-muted uppercase text-[10px]",children:"📌 Voreingestellte Schichten:"}),g.template_data.task_areas.map((z,$)=>{var D;return l.jsxs("div",{className:"bg-subtle p-2 rounded-sm border border-grid space-y-1",children:[l.jsxs("div",{className:"font-bold text-main flex items-center justify-between",children:[l.jsx("span",{children:z.name}),l.jsxs("span",{className:"text-[10px] text-muted font-normal",children:[((D=z.shifts)==null?void 0:D.length)||0," Schichten"]})]}),l.jsx("div",{className:"flex flex-wrap gap-1",children:(z.shifts||[]).map((H,ae)=>l.jsxs("span",{className:"px-2 py-0.5 rounded-sm bg-surface border border-grid text-[10px] flex items-center gap-1 font-mono",children:[l.jsx(Sr,{className:"w-3 h-3 text-muted shrink-0"}),l.jsx("strong",{className:"text-main",children:H.title}),l.jsxs("span",{className:"text-muted",children:["(",H.start_time,"-",H.end_time,", ",H.max_participants," Plätze)"]})]},ae))})]},$)})]}),l.jsxs("div",{className:"text-[10px] text-muted pt-2 border-t border-grid flex items-center justify-between",children:[l.jsxs("span",{children:["Erstellt von: ",l.jsx("strong",{children:g.created_by_name||"Admin"})]}),l.jsx("span",{className:"text-indigo-400 font-bold",children:"Klick zum Auswählen"})]})]},g.id)})})]}),h&&l.jsxs("form",{onSubmit:ye,className:"hallmark-panel rounded-sm p-6 border border-grid space-y-4 font-mono text-xs animate-in fade-in duration-200",children:[l.jsxs("h3",{className:"font-serif text-lg font-bold uppercase text-indigo-400 border-b border-grid pb-2",children:['Neue Veranstaltung aus Vorlage "',h.name,'" Erstellen']}),l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"sm:col-span-2",children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"Titel der Veranstaltung"}),l.jsx("input",{type:"text",required:!0,value:x,onChange:g=>S(g.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field text-sm font-bold"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"Startdatum"}),l.jsx("input",{type:"date",required:!0,value:N,onChange:g=>k(g.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field text-xs"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"Enddatum"}),l.jsx("input",{type:"date",required:!0,value:O,onChange:g=>f(g.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field text-xs"})]}),l.jsxs("div",{className:"sm:col-span-2",children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"Ort (optional)"}),l.jsx("input",{type:"text",value:c,onChange:g=>d(g.target.value),placeholder:"z. B. Großer Saal",className:"w-full px-3.5 py-2 rounded-sm input-field text-xs"})]})]}),l.jsx("div",{className:"pt-3 flex justify-end border-t border-grid",children:l.jsxs("button",{type:"submit",disabled:y,style:{backgroundColor:"var(--brand-primary)"},className:"px-6 py-2.5 rounded-sm text-xs font-mono font-bold text-white transition hover:brightness-110 shadow-sm flex items-center gap-2",children:[l.jsx(Tp,{className:"w-4 h-4 fill-white"}),y?"Erstellen...":"Veranstaltung Jetzt Aus Vorlage Erstellen"]})})]})]})}function Kp(){const[e,t]=w.useState(null),[n,r]=w.useState(null),[s,i]=w.useState([]),[o,a]=w.useState([]),[u,m]=w.useState(null),[h,v]=w.useState(null),[x,S]=w.useState(!0),[N,k]=w.useState("home"),[O,f]=w.useState(!1),[c,d]=w.useState(!1),[y,j]=w.useState(null),[b,T]=w.useState(!1),[P,B]=w.useState(!1),[M,q]=w.useState(localStorage.getItem("theme_mode")||"auto"),[G,Y]=w.useState(null),[ge,Se]=w.useState(null);w.useEffect(()=>{window.addEventListener("beforeinstallprompt",C=>{C.preventDefault(),Se(C)}),E()},[]),w.useEffect(()=>{localStorage.setItem("theme_mode",M);const C=()=>{let R=M;M==="auto"&&(R=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),document.documentElement.setAttribute("data-theme",R)};if(C(),M==="auto"){const R=window.matchMedia("(prefers-color-scheme: dark)"),J=()=>C();return R.addEventListener("change",J),()=>R.removeEventListener("change",J)}},[M]),w.useEffect(()=>{n!=null&&n.primary_color&&(document.documentElement.style.setProperty("--brand-primary",n.primary_color),document.documentElement.style.setProperty("--brand-secondary",n.secondary_color||n.primary_color))},[n]);const[ye,Ce]=w.useState(null),[L,I]=w.useState(null),g=C=>{Y(C),setTimeout(()=>Y(null),5e3)},E=async()=>{S(!0);try{try{const K=await V("/branding/");r(K)}catch{}if(Ei())try{const K=await V("/users/me/");t(K),!K.is_admin_user&&!K.is_staff&&!K.is_superuser&&N==="admin"&&k("home")}catch{bn(null),t(null),k("home")}const C=new URLSearchParams(window.location.search),R=C.get("verify_email");if(R)try{const K=await V("/users/verify-email/",{method:"POST",body:JSON.stringify({token:R})});bn(K.token),t(K.user),g(K.message||"✅ E-Mail-Adresse erfolgreich bestätigt!"),window.history.replaceState({},document.title,window.location.pathname)}catch(K){g(`⚠️ E-Mail Bestätigung: ${K.message}`)}const J=C.get("claim_token"),nt=C.get("guest_name");J&&nt&&(Ce(J),I(nt),Ei()||f(!0)),await $(),await D()}catch(C){console.error(C)}finally{S(!1)}},z=async C=>{try{const R=await V(`/users/signups/${C.id}/generate-claim-link/`,{method:"POST"}),J=`${window.location.origin}/?claim_token=${R.token}&guest_name=${encodeURIComponent(R.guest_name)}`;navigator.clipboard?(await navigator.clipboard.writeText(J),g(`✅ Einladungs-Link für ${R.guest_name} in Zwischenablage kopiert!`)):prompt(`Einladungs-Link für ${R.guest_name} kopieren:`,J)}catch(R){alert(R.message||"Fehler beim Erstellen des Links.")}},$=async()=>{try{const C=await V("/skills/");i(C.results||C)}catch{}},D=async()=>{try{const C=await V("/events/"),R=C.results||C;a(R),R.length>0&&!u?(m(R[0].id),H(R[0].id)):u&&H(u)}catch{}},H=async C=>{try{const R=await V(`/events/${C}/matrix/`);v(R)}catch{}},ae=C=>{m(C),H(C),k("schedule")},tt=()=>{bn(null),t(null),k("home"),g("Erfolgreich abgemeldet."),u&&H(u)},Lr=(C,R)=>{t(C),C&&!C.is_admin_user&&!C.is_staff&&!C.is_superuser&&N==="admin"&&k("home"),g(R||"Erfolgreich angemeldet!"),u&&H(u)},zr=async C=>{if(!e)j(C),d(!0);else try{const R=await V(`/shifts/${C.id}/signup/`,{method:"POST"});g(R.message||"Erfolgreich für Schicht eingetragen!"),u&&H(u)}catch(R){g(`Fehler: ${R.message}`)}},Xs=async C=>{if(!y)return;const R=await V(`/shifts/${y.id}/signup/`,{method:"POST",body:JSON.stringify(C)});g(R.message||"Als Gast eingetragen!"),u&&H(u)},Bt=async C=>{try{const R=await V(`/shifts/${C.id}/signup/`,{method:"DELETE"});g(R.message||"Eintragung storniert."),u&&H(u)}catch(R){g(`Fehler: ${R.message}`)}},On=async C=>{if(!(!C||!C.id)&&window.confirm(`Möchtest du die Veranstaltung "${C.title}" und alle zugehörigen Schichten wirklich unwiderruflich löschen?`))try{await V(`/events/${C.id}/`,{method:"DELETE"}),g(`Veranstaltung "${C.title}" wurde erfolgreich gelöscht.`),u===C.id&&m(null),N==="event-editor"&&k("home"),D()}catch(R){g(`Fehler beim Löschen: ${R.message}`)}},[Mr,Ut]=w.useState(null),Ar=async C=>{let R=C.id;R?await V(`/events/${R}/`,{method:"PATCH",body:JSON.stringify({title:C.title,description:C.description,location:C.location,start_date:C.start_date,end_date:C.end_date,co_manager_ids:C.co_manager_ids||[]})}):R=(await V("/events/",{method:"POST",body:JSON.stringify({title:C.title,description:C.description,location:C.location,start_date:C.start_date,end_date:C.end_date,co_manager_ids:C.co_manager_ids||[]})})).id;for(let J of C.task_areas){if(!J.name)continue;let nt=J.id;nt?await V(`/task-areas/${nt}/`,{method:"PATCH",body:JSON.stringify({name:J.name,description:J.description||""})}):nt=(await V("/task-areas/",{method:"POST",body:JSON.stringify({event:R,name:J.name,description:J.description||""})})).id;for(let K of J.shifts){const wt=K.date||C.start_date;K.id?await V(`/shifts/${K.id}/`,{method:"PATCH",body:JSON.stringify({title:K.title,date:wt,start_time:K.start_time,end_time:K.end_time,max_participants:K.max_participants,required_skill_ids:K.required_skill_ids||[]})}):await V("/shifts/",{method:"POST",body:JSON.stringify({task_area:nt,title:K.title,date:wt,start_time:K.start_time,end_time:K.end_time,max_participants:K.max_participants,required_skill_ids:K.required_skill_ids||[]})})}}g(C.id?"Veranstaltung & Schichten aktualisiert!":"Veranstaltung erfolgreich erstellt!"),await D(),ae(R)},el=async(C,R)=>{const J=await V(`/templates/${C}/instantiate/`,{method:"POST",body:JSON.stringify(R)});g("Veranstaltung aus Vorlage erstellt!"),await D(),J.id&&ae(J.id)},Ht=()=>{u&&window.open(`/api/events/${u}/export_pdf/`,"_blank")},tl=()=>{window.print()},Dr=()=>{ge&&(ge.prompt(),ge.userChoice.then(C=>{C.outcome==="accepted"&&g("PWA Installation gestartet!"),Se(null)}))};return l.jsxs("div",{className:"min-h-screen bg-canvas text-main flex flex-col font-sans selection:bg-surface-hover transition-colors duration-200",children:[G&&l.jsxs("div",{className:"fixed bottom-6 right-6 z-50 bg-emerald-600 text-white px-4 py-2.5 rounded-sm shadow-2xl font-mono text-xs flex items-center gap-2 border border-emerald-400 animate-in fade-in slide-in-from-bottom-3 duration-200",children:[l.jsx(ut,{className:"w-4 h-4"}),l.jsx("span",{children:G})]}),l.jsx(Op,{branding:n,user:e,activeTab:N,onChangeTab:k,themeMode:M,onChangeThemeMode:q,onLogout:tt,onOpenAuth:()=>f(!0),onOpenCreateEvent:()=>{Ut(null),k("event-editor")},onOpenTemplates:()=>k("templates"),onOpenProfile:()=>B(!0),onOpenAdmin:()=>k("admin"),pwaInstallPrompt:!!ge,onInstallPwa:Dr}),l.jsx("main",{className:"flex-1 max-w-7xl w-full mx-auto px-4 sm:px-6 lg:px-8 py-8 space-y-6",children:x?l.jsx("div",{className:"hallmark-panel p-16 text-center text-xs text-muted font-mono border border-grid",children:"Lade Daten..."}):N==="home"?l.jsx(Bp,{events:o,user:e,onSelectEvent:ae,onOpenCreateEvent:()=>{Ut(null),k("event-editor")},onToggleEventActive:async C=>{try{await V(`/events/${C.id}/`,{method:"PATCH",body:JSON.stringify({is_active:C.is_active===!1})}),D()}catch(R){alert(R.message||"Aktion fehlgeschlagen.")}},onEditEvent:C=>{Ut(C),k("event-editor")},onDeleteEvent:On,branding:n}):N==="calendar"?l.jsx(Up,{events:o,onSelectEvent:ae,branding:n}):N==="admin"&&e&&(e.is_admin_user||e.is_staff||e.is_superuser)?l.jsx(Hp,{branding:n,onRefreshBranding:async()=>{const C=await V("/branding/");r(C)},onRefreshEvents:D,skills:s,onRefreshSkills:$}):N==="event-editor"?l.jsx(Qp,{eventToEdit:Mr,skills:s,user:e,onBack:()=>k("schedule"),onSubmit:Ar,onDeleteEvent:On}):N==="templates"?l.jsx(Wp,{onBack:()=>k("schedule"),onInstantiateTemplate:el,user:e,skills:s}):l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex items-center justify-between gap-4 overflow-x-auto pb-2 no-scrollbar font-mono",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-xs font-bold text-muted uppercase tracking-wider whitespace-nowrap",children:"Ausgewähltes Event:"}),o.map(C=>{const R=u===C.id;return l.jsx("button",{onClick:()=>ae(C.id),style:{backgroundColor:R?(n==null?void 0:n.primary_color)||"var(--brand-primary)":void 0,borderColor:R?(n==null?void 0:n.primary_color)||"var(--brand-primary)":void 0},className:`px-3.5 py-1.5 rounded-sm text-xs font-bold transition whitespace-nowrap border ${R?"text-white shadow-sm":"bg-subtle text-muted border-grid hover:text-main"}`,children:C.title},C.id)})]}),e&&l.jsxs("button",{onClick:()=>{Ut(null),k("event-editor")},className:"px-3.5 py-1.5 rounded-sm text-xs font-bold bg-subtle hover:bg-surface-hover text-main border border-grid transition flex items-center gap-1.5 shrink-0",children:[l.jsx(at,{className:"w-4 h-4"})," Neues Event"]})]}),l.jsx(Ip,{event:h,user:e,onSignupClick:zr,onCancelClick:Bt,onEditEvent:C=>{Ut(C),k("event-editor")},onDeleteEvent:On,onRemoveUserFromShift:async(C,R)=>{try{const J=await V(`/shifts/${C.id}/signup/${R}/`,{method:"DELETE"});g(J.message||"Eintragung entfernt."),D(),u&&ae(u)}catch(J){alert(J.message||"Entfernen der Person fehlgeschlagen.")}},onGenerateClaimLink:z,onExportPdf:Ht,onPrintView:tl})]})}),l.jsx("footer",{className:"border-t border-grid py-6 text-center text-xs text-muted font-mono no-print",children:l.jsxs("p",{children:[(n==null?void 0:n.app_name)||"Veranstaltungsschichtplaner"," • PWA Enabled • PostgreSQL & Docker Ready"]})}),O&&l.jsx(Fp,{onClose:()=>{f(!1),Ce(null),I(null)},onSuccess:Lr,claimToken:ye,prefilledGuestName:L}),c&&l.jsx($p,{shift:y,onClose:()=>d(!1),onSubmit:Xs})]})}Ml.createRoot(document.getElementById("root")).render(l.jsx(lr.StrictMode,{children:l.jsx(Kp,{})}));
|