Files
tautkan-kanban/client/dist/assets/index-h2AVDMMH.js
T

261 lines
358 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
var Fh=Object.defineProperty;var Uh=(e,t,n)=>t in e?Fh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Uo=(e,t,n)=>Uh(e,typeof t!="symbol"?t+"":t,n);(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 $h(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var kd={exports:{}},fo={},bd={exports:{}},ie={};/**
* @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 Ms=Symbol.for("react.element"),Hh=Symbol.for("react.portal"),Vh=Symbol.for("react.fragment"),Kh=Symbol.for("react.strict_mode"),Wh=Symbol.for("react.profiler"),Gh=Symbol.for("react.provider"),Qh=Symbol.for("react.context"),qh=Symbol.for("react.forward_ref"),Yh=Symbol.for("react.suspense"),Xh=Symbol.for("react.memo"),Jh=Symbol.for("react.lazy"),Hu=Symbol.iterator;function Zh(e){return e===null||typeof e!="object"?null:(e=Hu&&e[Hu]||e["@@iterator"],typeof e=="function"?e:null)}var wd={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Sd=Object.assign,Nd={};function Er(e,t,n){this.props=e,this.context=t,this.refs=Nd,this.updater=n||wd}Er.prototype.isReactComponent={};Er.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")};Er.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Cd(){}Cd.prototype=Er.prototype;function _l(e,t,n){this.props=e,this.context=t,this.refs=Nd,this.updater=n||wd}var Ll=_l.prototype=new Cd;Ll.constructor=_l;Sd(Ll,Er.prototype);Ll.isPureReactComponent=!0;var Vu=Array.isArray,Ed=Object.prototype.hasOwnProperty,Ml={current:null},Td={key:!0,ref:!0,__self:!0,__source:!0};function jd(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)Ed.call(t,r)&&!Td.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),c=0;c<a;c++)u[c]=arguments[c+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:Ms,type:e,key:i,ref:o,props:s,_owner:Ml.current}}function em(e,t){return{$$typeof:Ms,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Al(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ms}function tm(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ku=/\/+/g;function $o(e,t){return typeof e=="object"&&e!==null&&e.key!=null?tm(""+e.key):t.toString(36)}function di(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 Ms:case Hh:o=!0}}if(o)return o=e,s=s(o),e=r===""?"."+$o(o,0):r,Vu(s)?(n="",e!=null&&(n=e.replace(Ku,"$&/")+"/"),di(s,t,n,"",function(c){return c})):s!=null&&(Al(s)&&(s=em(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(Ku,"$&/")+"/")+e)),t.push(s)),1;if(o=0,r=r===""?".":r+":",Vu(e))for(var a=0;a<e.length;a++){i=e[a];var u=r+$o(i,a);o+=di(i,t,n,u,s)}else if(u=Zh(e),typeof u=="function")for(e=u.call(e),a=0;!(i=e.next()).done;)i=i.value,u=r+$o(i,a++),o+=di(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 $s(e,t,n){if(e==null)return e;var r=[],s=0;return di(e,r,"","",function(i){return t.call(n,i,s++)}),r}function nm(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 rt={current:null},fi={transition:null},rm={ReactCurrentDispatcher:rt,ReactCurrentBatchConfig:fi,ReactCurrentOwner:Ml};function Rd(){throw Error("act(...) is not supported in production builds of React.")}ie.Children={map:$s,forEach:function(e,t,n){$s(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return $s(e,function(){t++}),t},toArray:function(e){return $s(e,function(t){return t})||[]},only:function(e){if(!Al(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ie.Component=Er;ie.Fragment=Vh;ie.Profiler=Wh;ie.PureComponent=_l;ie.StrictMode=Kh;ie.Suspense=Yh;ie.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=rm;ie.act=Rd;ie.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=Sd({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=Ml.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(u in t)Ed.call(t,u)&&!Td.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 c=0;c<u;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:Ms,type:e.type,key:s,ref:i,props:r,_owner:o}};ie.createContext=function(e){return e={$$typeof:Qh,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Gh,_context:e},e.Consumer=e};ie.createElement=jd;ie.createFactory=function(e){var t=jd.bind(null,e);return t.type=e,t};ie.createRef=function(){return{current:null}};ie.forwardRef=function(e){return{$$typeof:qh,render:e}};ie.isValidElement=Al;ie.lazy=function(e){return{$$typeof:Jh,_payload:{_status:-1,_result:e},_init:nm}};ie.memo=function(e,t){return{$$typeof:Xh,type:e,compare:t===void 0?null:t}};ie.startTransition=function(e){var t=fi.transition;fi.transition={};try{e()}finally{fi.transition=t}};ie.unstable_act=Rd;ie.useCallback=function(e,t){return rt.current.useCallback(e,t)};ie.useContext=function(e){return rt.current.useContext(e)};ie.useDebugValue=function(){};ie.useDeferredValue=function(e){return rt.current.useDeferredValue(e)};ie.useEffect=function(e,t){return rt.current.useEffect(e,t)};ie.useId=function(){return rt.current.useId()};ie.useImperativeHandle=function(e,t,n){return rt.current.useImperativeHandle(e,t,n)};ie.useInsertionEffect=function(e,t){return rt.current.useInsertionEffect(e,t)};ie.useLayoutEffect=function(e,t){return rt.current.useLayoutEffect(e,t)};ie.useMemo=function(e,t){return rt.current.useMemo(e,t)};ie.useReducer=function(e,t,n){return rt.current.useReducer(e,t,n)};ie.useRef=function(e){return rt.current.useRef(e)};ie.useState=function(e){return rt.current.useState(e)};ie.useSyncExternalStore=function(e,t,n){return rt.current.useSyncExternalStore(e,t,n)};ie.useTransition=function(){return rt.current.useTransition()};ie.version="18.3.1";bd.exports=ie;var y=bd.exports;const Ne=$h(y);/**
* @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 sm=y,im=Symbol.for("react.element"),om=Symbol.for("react.fragment"),am=Object.prototype.hasOwnProperty,lm=sm.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,um={key:!0,ref:!0,__self:!0,__source:!0};function _d(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)am.call(t,r)&&!um.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:im,type:e,key:i,ref:o,props:s,_owner:lm.current}}fo.Fragment=om;fo.jsx=_d;fo.jsxs=_d;kd.exports=fo;var l=kd.exports,ba={},Ld={exports:{}},xt={},Md={exports:{}},Ad={};/**
* @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(A,W){var v=A.length;A.push(W);e:for(;0<v;){var x=v-1>>>1,_=A[x];if(0<s(_,W))A[x]=W,A[v]=_,v=x;else break e}}function n(A){return A.length===0?null:A[0]}function r(A){if(A.length===0)return null;var W=A[0],v=A.pop();if(v!==W){A[0]=v;e:for(var x=0,_=A.length,B=_>>>1;x<B;){var K=2*(x+1)-1,q=A[K],F=K+1,$=A[F];if(0>s(q,v))F<_&&0>s($,q)?(A[x]=$,A[F]=v,x=F):(A[x]=q,A[K]=v,x=K);else if(F<_&&0>s($,v))A[x]=$,A[F]=v,x=F;else break e}}return W}function s(A,W){var v=A.sortIndex-W.sortIndex;return v!==0?v:A.id-W.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=[],c=[],h=1,d=null,f=3,k=!1,N=!1,w=!1,S=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function g(A){for(var W=n(c);W!==null;){if(W.callback===null)r(c);else if(W.startTime<=A)r(c),W.sortIndex=W.expirationTime,t(u,W);else break;W=n(c)}}function b(A){if(w=!1,g(A),!N)if(n(u)!==null)N=!0,Fe(j);else{var W=n(c);W!==null&&ge(b,W.startTime-A)}}function j(A,W){N=!1,w&&(w=!1,m(T),T=-1),k=!0;var v=f;try{for(g(W),d=n(u);d!==null&&(!(d.expirationTime>W)||A&&!X());){var x=d.callback;if(typeof x=="function"){d.callback=null,f=d.priorityLevel;var _=x(d.expirationTime<=W);W=e.unstable_now(),typeof _=="function"?d.callback=_:d===n(u)&&r(u),g(W)}else r(u);d=n(u)}if(d!==null)var B=!0;else{var K=n(c);K!==null&&ge(b,K.startTime-W),B=!1}return B}finally{d=null,f=v,k=!1}}var R=!1,E=null,T=-1,D=5,I=-1;function X(){return!(e.unstable_now()-I<D)}function we(){if(E!==null){var A=e.unstable_now();I=A;var W=!0;try{W=E(!0,A)}finally{W?me():(R=!1,E=null)}}else R=!1}var me;if(typeof p=="function")me=function(){p(we)};else if(typeof MessageChannel<"u"){var Re=new MessageChannel,et=Re.port2;Re.port1.onmessage=we,me=function(){et.postMessage(null)}}else me=function(){S(we,0)};function Fe(A){E=A,R||(R=!0,me())}function ge(A,W){T=S(function(){A(e.unstable_now())},W)}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(A){A.callback=null},e.unstable_continueExecution=function(){N||k||(N=!0,Fe(j))},e.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<A?Math.floor(1e3/A):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(A){switch(f){case 1:case 2:case 3:var W=3;break;default:W=f}var v=f;f=W;try{return A()}finally{f=v}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(A,W){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var v=f;f=A;try{return W()}finally{f=v}},e.unstable_scheduleCallback=function(A,W,v){var x=e.unstable_now();switch(typeof v=="object"&&v!==null?(v=v.delay,v=typeof v=="number"&&0<v?x+v:x):v=x,A){case 1:var _=-1;break;case 2:_=250;break;case 5:_=1073741823;break;case 4:_=1e4;break;default:_=5e3}return _=v+_,A={id:h++,callback:W,priorityLevel:A,startTime:v,expirationTime:_,sortIndex:-1},v>x?(A.sortIndex=v,t(c,A),n(u)===null&&A===n(c)&&(w?(m(T),T=-1):w=!0,ge(b,v-x))):(A.sortIndex=_,t(u,A),N||k||(N=!0,Fe(j))),A},e.unstable_shouldYield=X,e.unstable_wrapCallback=function(A){var W=f;return function(){var v=f;f=W;try{return A.apply(this,arguments)}finally{f=v}}}})(Ad);Md.exports=Ad;var cm=Md.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 dm=y,yt=cm;function L(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 Dd=new Set,cs={};function Qn(e,t){vr(e,t),vr(e+"Capture",t)}function vr(e,t){for(cs[e]=t,e=0;e<t.length;e++)Dd.add(t[e])}var tn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),wa=Object.prototype.hasOwnProperty,fm=/^[: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]*$/,Wu={},Gu={};function pm(e){return wa.call(Gu,e)?!0:wa.call(Wu,e)?!1:fm.test(e)?Gu[e]=!0:(Wu[e]=!0,!1)}function hm(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 mm(e,t,n,r){if(t===null||typeof t>"u"||hm(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 st(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 Qe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Qe[e]=new st(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Qe[t]=new st(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Qe[e]=new st(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Qe[e]=new st(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){Qe[e]=new st(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Qe[e]=new st(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Qe[e]=new st(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Qe[e]=new st(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Qe[e]=new st(e,5,!1,e.toLowerCase(),null,!1,!1)});var Dl=/[\-:]([a-z])/g;function Il(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(Dl,Il);Qe[t]=new st(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(Dl,Il);Qe[t]=new st(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(Dl,Il);Qe[t]=new st(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Qe[e]=new st(e,1,!1,e.toLowerCase(),null,!1,!1)});Qe.xlinkHref=new st("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Qe[e]=new st(e,1,!1,e.toLowerCase(),null,!0,!0)});function Pl(e,t,n,r){var s=Qe.hasOwnProperty(t)?Qe[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(mm(t,n,s,r)&&(n=null),r||s===null?pm(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 an=dm.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Hs=Symbol.for("react.element"),Jn=Symbol.for("react.portal"),Zn=Symbol.for("react.fragment"),Ol=Symbol.for("react.strict_mode"),Sa=Symbol.for("react.profiler"),Id=Symbol.for("react.provider"),Pd=Symbol.for("react.context"),Bl=Symbol.for("react.forward_ref"),Na=Symbol.for("react.suspense"),Ca=Symbol.for("react.suspense_list"),zl=Symbol.for("react.memo"),pn=Symbol.for("react.lazy"),Od=Symbol.for("react.offscreen"),Qu=Symbol.iterator;function Br(e){return e===null||typeof e!="object"?null:(e=Qu&&e[Qu]||e["@@iterator"],typeof e=="function"?e:null)}var je=Object.assign,Ho;function Gr(e){if(Ho===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ho=t&&t[1]||""}return`
`+Ho+e}var Vo=!1;function Ko(e,t){if(!e||Vo)return"";Vo=!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(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var s=c.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{Vo=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Gr(e):""}function gm(e){switch(e.tag){case 5:return Gr(e.type);case 16:return Gr("Lazy");case 13:return Gr("Suspense");case 19:return Gr("SuspenseList");case 0:case 2:case 15:return e=Ko(e.type,!1),e;case 11:return e=Ko(e.type.render,!1),e;case 1:return e=Ko(e.type,!0),e;default:return""}}function Ea(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 Zn:return"Fragment";case Jn:return"Portal";case Sa:return"Profiler";case Ol:return"StrictMode";case Na:return"Suspense";case Ca:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Pd:return(e.displayName||"Context")+".Consumer";case Id:return(e._context.displayName||"Context")+".Provider";case Bl:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case zl:return t=e.displayName||null,t!==null?t:Ea(e.type)||"Memo";case pn:t=e._payload,e=e._init;try{return Ea(e(t))}catch{}}return null}function ym(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 Ea(t);case 8:return t===Ol?"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 _n(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Bd(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function xm(e){var t=Bd(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 Vs(e){e._valueTracker||(e._valueTracker=xm(e))}function zd(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Bd(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Li(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 Ta(e,t){var n=t.checked;return je({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function qu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=_n(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 Fd(e,t){t=t.checked,t!=null&&Pl(e,"checked",t,!1)}function ja(e,t){Fd(e,t);var n=_n(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")?Ra(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ra(e,t.type,_n(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Yu(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 Ra(e,t,n){(t!=="number"||Li(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Qr=Array.isArray;function dr(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=""+_n(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 _a(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(L(91));return je({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Xu(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(L(92));if(Qr(n)){if(1<n.length)throw Error(L(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:_n(n)}}function Ud(e,t){var n=_n(t.value),r=_n(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 Ju(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function $d(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 La(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?$d(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ks,Hd=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(Ks=Ks||document.createElement("div"),Ks.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ks.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ds(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Jr={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},vm=["Webkit","ms","Moz","O"];Object.keys(Jr).forEach(function(e){vm.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Jr[t]=Jr[e]})});function Vd(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Jr.hasOwnProperty(e)&&Jr[e]?(""+t).trim():t+"px"}function Kd(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=Vd(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var km=je({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 Ma(e,t){if(t){if(km[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(L(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(L(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(L(61))}if(t.style!=null&&typeof t.style!="object")throw Error(L(62))}}function Aa(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 Da=null;function Fl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ia=null,fr=null,pr=null;function Zu(e){if(e=Is(e)){if(typeof Ia!="function")throw Error(L(280));var t=e.stateNode;t&&(t=yo(t),Ia(e.stateNode,e.type,t))}}function Wd(e){fr?pr?pr.push(e):pr=[e]:fr=e}function Gd(){if(fr){var e=fr,t=pr;if(pr=fr=null,Zu(e),t)for(e=0;e<t.length;e++)Zu(t[e])}}function Qd(e,t){return e(t)}function qd(){}var Wo=!1;function Yd(e,t,n){if(Wo)return e(t,n);Wo=!0;try{return Qd(e,t,n)}finally{Wo=!1,(fr!==null||pr!==null)&&(qd(),Gd())}}function fs(e,t){var n=e.stateNode;if(n===null)return null;var r=yo(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(L(231,t,typeof n));return n}var Pa=!1;if(tn)try{var zr={};Object.defineProperty(zr,"passive",{get:function(){Pa=!0}}),window.addEventListener("test",zr,zr),window.removeEventListener("test",zr,zr)}catch{Pa=!1}function bm(e,t,n,r,s,i,o,a,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(h){this.onError(h)}}var Zr=!1,Mi=null,Ai=!1,Oa=null,wm={onError:function(e){Zr=!0,Mi=e}};function Sm(e,t,n,r,s,i,o,a,u){Zr=!1,Mi=null,bm.apply(wm,arguments)}function Nm(e,t,n,r,s,i,o,a,u){if(Sm.apply(this,arguments),Zr){if(Zr){var c=Mi;Zr=!1,Mi=null}else throw Error(L(198));Ai||(Ai=!0,Oa=c)}}function qn(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 Xd(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 ec(e){if(qn(e)!==e)throw Error(L(188))}function Cm(e){var t=e.alternate;if(!t){if(t=qn(e),t===null)throw Error(L(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 ec(s),e;if(i===r)return ec(s),t;i=i.sibling}throw Error(L(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(L(189))}}if(n.alternate!==r)throw Error(L(190))}if(n.tag!==3)throw Error(L(188));return n.stateNode.current===n?e:t}function Jd(e){return e=Cm(e),e!==null?Zd(e):null}function Zd(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Zd(e);if(t!==null)return t;e=e.sibling}return null}var ef=yt.unstable_scheduleCallback,tc=yt.unstable_cancelCallback,Em=yt.unstable_shouldYield,Tm=yt.unstable_requestPaint,Me=yt.unstable_now,jm=yt.unstable_getCurrentPriorityLevel,Ul=yt.unstable_ImmediatePriority,tf=yt.unstable_UserBlockingPriority,Di=yt.unstable_NormalPriority,Rm=yt.unstable_LowPriority,nf=yt.unstable_IdlePriority,po=null,Kt=null;function _m(e){if(Kt&&typeof Kt.onCommitFiberRoot=="function")try{Kt.onCommitFiberRoot(po,e,void 0,(e.current.flags&128)===128)}catch{}}var It=Math.clz32?Math.clz32:Am,Lm=Math.log,Mm=Math.LN2;function Am(e){return e>>>=0,e===0?32:31-(Lm(e)/Mm|0)|0}var Ws=64,Gs=4194304;function qr(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 Ii(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=qr(a):(i&=o,i!==0&&(r=qr(i)))}else o=n&~s,o!==0?r=qr(o):i!==0&&(r=qr(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-It(t),s=1<<n,r|=e[n],t&=~s;return r}function Dm(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 Im(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-It(i),a=1<<o,u=s[o];u===-1?(!(a&n)||a&r)&&(s[o]=Dm(a,t)):u<=t&&(e.expiredLanes|=a),i&=~a}}function Ba(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function rf(){var e=Ws;return Ws<<=1,!(Ws&4194240)&&(Ws=64),e}function Go(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function As(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-It(t),e[t]=n}function Pm(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-It(n),i=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~i}}function $l(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-It(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var pe=0;function sf(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var of,Hl,af,lf,uf,za=!1,Qs=[],bn=null,wn=null,Sn=null,ps=new Map,hs=new Map,gn=[],Om="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 nc(e,t){switch(e){case"focusin":case"focusout":bn=null;break;case"dragenter":case"dragleave":wn=null;break;case"mouseover":case"mouseout":Sn=null;break;case"pointerover":case"pointerout":ps.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":hs.delete(t.pointerId)}}function Fr(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=Is(t),t!==null&&Hl(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function Bm(e,t,n,r,s){switch(t){case"focusin":return bn=Fr(bn,e,t,n,r,s),!0;case"dragenter":return wn=Fr(wn,e,t,n,r,s),!0;case"mouseover":return Sn=Fr(Sn,e,t,n,r,s),!0;case"pointerover":var i=s.pointerId;return ps.set(i,Fr(ps.get(i)||null,e,t,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,hs.set(i,Fr(hs.get(i)||null,e,t,n,r,s)),!0}return!1}function cf(e){var t=Bn(e.target);if(t!==null){var n=qn(t);if(n!==null){if(t=n.tag,t===13){if(t=Xd(n),t!==null){e.blockedOn=t,uf(e.priority,function(){af(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 pi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Fa(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Da=r,n.target.dispatchEvent(r),Da=null}else return t=Is(n),t!==null&&Hl(t),e.blockedOn=n,!1;t.shift()}return!0}function rc(e,t,n){pi(e)&&n.delete(t)}function zm(){za=!1,bn!==null&&pi(bn)&&(bn=null),wn!==null&&pi(wn)&&(wn=null),Sn!==null&&pi(Sn)&&(Sn=null),ps.forEach(rc),hs.forEach(rc)}function Ur(e,t){e.blockedOn===t&&(e.blockedOn=null,za||(za=!0,yt.unstable_scheduleCallback(yt.unstable_NormalPriority,zm)))}function ms(e){function t(s){return Ur(s,e)}if(0<Qs.length){Ur(Qs[0],e);for(var n=1;n<Qs.length;n++){var r=Qs[n];r.blockedOn===e&&(r.blockedOn=null)}}for(bn!==null&&Ur(bn,e),wn!==null&&Ur(wn,e),Sn!==null&&Ur(Sn,e),ps.forEach(t),hs.forEach(t),n=0;n<gn.length;n++)r=gn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<gn.length&&(n=gn[0],n.blockedOn===null);)cf(n),n.blockedOn===null&&gn.shift()}var hr=an.ReactCurrentBatchConfig,Pi=!0;function Fm(e,t,n,r){var s=pe,i=hr.transition;hr.transition=null;try{pe=1,Vl(e,t,n,r)}finally{pe=s,hr.transition=i}}function Um(e,t,n,r){var s=pe,i=hr.transition;hr.transition=null;try{pe=4,Vl(e,t,n,r)}finally{pe=s,hr.transition=i}}function Vl(e,t,n,r){if(Pi){var s=Fa(e,t,n,r);if(s===null)ra(e,t,r,Oi,n),nc(e,r);else if(Bm(s,e,t,n,r))r.stopPropagation();else if(nc(e,r),t&4&&-1<Om.indexOf(e)){for(;s!==null;){var i=Is(s);if(i!==null&&of(i),i=Fa(e,t,n,r),i===null&&ra(e,t,r,Oi,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else ra(e,t,r,null,n)}}var Oi=null;function Fa(e,t,n,r){if(Oi=null,e=Fl(r),e=Bn(e),e!==null)if(t=qn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Xd(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 Oi=e,null}function df(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(jm()){case Ul:return 1;case tf:return 4;case Di:case Rm:return 16;case nf:return 536870912;default:return 16}default:return 16}}var xn=null,Kl=null,hi=null;function ff(){if(hi)return hi;var e,t=Kl,n=t.length,r,s="value"in xn?xn.value:xn.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 hi=s.slice(e,1<r?1-r:void 0)}function mi(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 qs(){return!0}function sc(){return!1}function vt(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)?qs:sc,this.isPropagationStopped=sc,this}return je(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=qs)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=qs)},persist:function(){},isPersistent:qs}),t}var Tr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Wl=vt(Tr),Ds=je({},Tr,{view:0,detail:0}),$m=vt(Ds),Qo,qo,$r,ho=je({},Ds,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Gl,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!==$r&&($r&&e.type==="mousemove"?(Qo=e.screenX-$r.screenX,qo=e.screenY-$r.screenY):qo=Qo=0,$r=e),Qo)},movementY:function(e){return"movementY"in e?e.movementY:qo}}),ic=vt(ho),Hm=je({},ho,{dataTransfer:0}),Vm=vt(Hm),Km=je({},Ds,{relatedTarget:0}),Yo=vt(Km),Wm=je({},Tr,{animationName:0,elapsedTime:0,pseudoElement:0}),Gm=vt(Wm),Qm=je({},Tr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),qm=vt(Qm),Ym=je({},Tr,{data:0}),oc=vt(Ym),Xm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Jm={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"},Zm={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function e0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Zm[e])?!!t[e]:!1}function Gl(){return e0}var t0=je({},Ds,{key:function(e){if(e.key){var t=Xm[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=mi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Jm[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Gl,charCode:function(e){return e.type==="keypress"?mi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?mi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),n0=vt(t0),r0=je({},ho,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ac=vt(r0),s0=je({},Ds,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Gl}),i0=vt(s0),o0=je({},Tr,{propertyName:0,elapsedTime:0,pseudoElement:0}),a0=vt(o0),l0=je({},ho,{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}),u0=vt(l0),c0=[9,13,27,32],Ql=tn&&"CompositionEvent"in window,es=null;tn&&"documentMode"in document&&(es=document.documentMode);var d0=tn&&"TextEvent"in window&&!es,pf=tn&&(!Ql||es&&8<es&&11>=es),lc=" ",uc=!1;function hf(e,t){switch(e){case"keyup":return c0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var er=!1;function f0(e,t){switch(e){case"compositionend":return mf(t);case"keypress":return t.which!==32?null:(uc=!0,lc);case"textInput":return e=t.data,e===lc&&uc?null:e;default:return null}}function p0(e,t){if(er)return e==="compositionend"||!Ql&&hf(e,t)?(e=ff(),hi=Kl=xn=null,er=!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 pf&&t.locale!=="ko"?null:t.data;default:return null}}var h0={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 cc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!h0[e.type]:t==="textarea"}function gf(e,t,n,r){Wd(r),t=Bi(t,"onChange"),0<t.length&&(n=new Wl("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ts=null,gs=null;function m0(e){Tf(e,0)}function mo(e){var t=rr(e);if(zd(t))return e}function g0(e,t){if(e==="change")return t}var yf=!1;if(tn){var Xo;if(tn){var Jo="oninput"in document;if(!Jo){var dc=document.createElement("div");dc.setAttribute("oninput","return;"),Jo=typeof dc.oninput=="function"}Xo=Jo}else Xo=!1;yf=Xo&&(!document.documentMode||9<document.documentMode)}function fc(){ts&&(ts.detachEvent("onpropertychange",xf),gs=ts=null)}function xf(e){if(e.propertyName==="value"&&mo(gs)){var t=[];gf(t,gs,e,Fl(e)),Yd(m0,t)}}function y0(e,t,n){e==="focusin"?(fc(),ts=t,gs=n,ts.attachEvent("onpropertychange",xf)):e==="focusout"&&fc()}function x0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return mo(gs)}function v0(e,t){if(e==="click")return mo(t)}function k0(e,t){if(e==="input"||e==="change")return mo(t)}function b0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ot=typeof Object.is=="function"?Object.is:b0;function ys(e,t){if(Ot(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!wa.call(t,s)||!Ot(e[s],t[s]))return!1}return!0}function pc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function hc(e,t){var n=pc(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=pc(n)}}function vf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?vf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function kf(){for(var e=window,t=Li();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Li(e.document)}return t}function ql(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 w0(e){var t=kf(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&vf(n.ownerDocument.documentElement,n)){if(r!==null&&ql(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=hc(n,i);var o=hc(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 S0=tn&&"documentMode"in document&&11>=document.documentMode,tr=null,Ua=null,ns=null,$a=!1;function mc(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;$a||tr==null||tr!==Li(r)||(r=tr,"selectionStart"in r&&ql(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}),ns&&ys(ns,r)||(ns=r,r=Bi(Ua,"onSelect"),0<r.length&&(t=new Wl("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=tr)))}function Ys(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var nr={animationend:Ys("Animation","AnimationEnd"),animationiteration:Ys("Animation","AnimationIteration"),animationstart:Ys("Animation","AnimationStart"),transitionend:Ys("Transition","TransitionEnd")},Zo={},bf={};tn&&(bf=document.createElement("div").style,"AnimationEvent"in window||(delete nr.animationend.animation,delete nr.animationiteration.animation,delete nr.animationstart.animation),"TransitionEvent"in window||delete nr.transitionend.transition);function go(e){if(Zo[e])return Zo[e];if(!nr[e])return e;var t=nr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in bf)return Zo[e]=t[n];return e}var wf=go("animationend"),Sf=go("animationiteration"),Nf=go("animationstart"),Cf=go("transitionend"),Ef=new Map,gc="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 Mn(e,t){Ef.set(e,t),Qn(t,[e])}for(var ea=0;ea<gc.length;ea++){var ta=gc[ea],N0=ta.toLowerCase(),C0=ta[0].toUpperCase()+ta.slice(1);Mn(N0,"on"+C0)}Mn(wf,"onAnimationEnd");Mn(Sf,"onAnimationIteration");Mn(Nf,"onAnimationStart");Mn("dblclick","onDoubleClick");Mn("focusin","onFocus");Mn("focusout","onBlur");Mn(Cf,"onTransitionEnd");vr("onMouseEnter",["mouseout","mouseover"]);vr("onMouseLeave",["mouseout","mouseover"]);vr("onPointerEnter",["pointerout","pointerover"]);vr("onPointerLeave",["pointerout","pointerover"]);Qn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Qn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Qn("onBeforeInput",["compositionend","keypress","textInput","paste"]);Qn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Qn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Qn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Yr="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(" "),E0=new Set("cancel close invalid load scroll toggle".split(" ").concat(Yr));function yc(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Nm(r,t,void 0,e),e.currentTarget=null}function Tf(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,c=a.currentTarget;if(a=a.listener,u!==i&&s.isPropagationStopped())break e;yc(s,a,c),i=u}else for(o=0;o<r.length;o++){if(a=r[o],u=a.instance,c=a.currentTarget,a=a.listener,u!==i&&s.isPropagationStopped())break e;yc(s,a,c),i=u}}}if(Ai)throw e=Oa,Ai=!1,Oa=null,e}function ke(e,t){var n=t[Ga];n===void 0&&(n=t[Ga]=new Set);var r=e+"__bubble";n.has(r)||(jf(t,e,2,!1),n.add(r))}function na(e,t,n){var r=0;t&&(r|=4),jf(n,e,r,t)}var Xs="_reactListening"+Math.random().toString(36).slice(2);function xs(e){if(!e[Xs]){e[Xs]=!0,Dd.forEach(function(n){n!=="selectionchange"&&(E0.has(n)||na(n,!1,e),na(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Xs]||(t[Xs]=!0,na("selectionchange",!1,t))}}function jf(e,t,n,r){switch(df(t)){case 1:var s=Fm;break;case 4:s=Um;break;default:s=Vl}n=s.bind(null,t,n,e),s=void 0,!Pa||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 ra(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=Bn(a),o===null)return;if(u=o.tag,u===5||u===6){r=i=o;continue e}a=a.parentNode}}r=r.return}Yd(function(){var c=i,h=Fl(n),d=[];e:{var f=Ef.get(e);if(f!==void 0){var k=Wl,N=e;switch(e){case"keypress":if(mi(n)===0)break e;case"keydown":case"keyup":k=n0;break;case"focusin":N="focus",k=Yo;break;case"focusout":N="blur",k=Yo;break;case"beforeblur":case"afterblur":k=Yo;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":k=ic;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":k=Vm;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":k=i0;break;case wf:case Sf:case Nf:k=Gm;break;case Cf:k=a0;break;case"scroll":k=$m;break;case"wheel":k=u0;break;case"copy":case"cut":case"paste":k=qm;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":k=ac}var w=(t&4)!==0,S=!w&&e==="scroll",m=w?f!==null?f+"Capture":null:f;w=[];for(var p=c,g;p!==null;){g=p;var b=g.stateNode;if(g.tag===5&&b!==null&&(g=b,m!==null&&(b=fs(p,m),b!=null&&w.push(vs(p,b,g)))),S)break;p=p.return}0<w.length&&(f=new k(f,N,null,n,h),d.push({event:f,listeners:w}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",k=e==="mouseout"||e==="pointerout",f&&n!==Da&&(N=n.relatedTarget||n.fromElement)&&(Bn(N)||N[nn]))break e;if((k||f)&&(f=h.window===h?h:(f=h.ownerDocument)?f.defaultView||f.parentWindow:window,k?(N=n.relatedTarget||n.toElement,k=c,N=N?Bn(N):null,N!==null&&(S=qn(N),N!==S||N.tag!==5&&N.tag!==6)&&(N=null)):(k=null,N=c),k!==N)){if(w=ic,b="onMouseLeave",m="onMouseEnter",p="mouse",(e==="pointerout"||e==="pointerover")&&(w=ac,b="onPointerLeave",m="onPointerEnter",p="pointer"),S=k==null?f:rr(k),g=N==null?f:rr(N),f=new w(b,p+"leave",k,n,h),f.target=S,f.relatedTarget=g,b=null,Bn(h)===c&&(w=new w(m,p+"enter",N,n,h),w.target=g,w.relatedTarget=S,b=w),S=b,k&&N)t:{for(w=k,m=N,p=0,g=w;g;g=Xn(g))p++;for(g=0,b=m;b;b=Xn(b))g++;for(;0<p-g;)w=Xn(w),p--;for(;0<g-p;)m=Xn(m),g--;for(;p--;){if(w===m||m!==null&&w===m.alternate)break t;w=Xn(w),m=Xn(m)}w=null}else w=null;k!==null&&xc(d,f,k,w,!1),N!==null&&S!==null&&xc(d,S,N,w,!0)}}e:{if(f=c?rr(c):window,k=f.nodeName&&f.nodeName.toLowerCase(),k==="select"||k==="input"&&f.type==="file")var j=g0;else if(cc(f))if(yf)j=k0;else{j=x0;var R=y0}else(k=f.nodeName)&&k.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(j=v0);if(j&&(j=j(e,c))){gf(d,j,n,h);break e}R&&R(e,f,c),e==="focusout"&&(R=f._wrapperState)&&R.controlled&&f.type==="number"&&Ra(f,"number",f.value)}switch(R=c?rr(c):window,e){case"focusin":(cc(R)||R.contentEditable==="true")&&(tr=R,Ua=c,ns=null);break;case"focusout":ns=Ua=tr=null;break;case"mousedown":$a=!0;break;case"contextmenu":case"mouseup":case"dragend":$a=!1,mc(d,n,h);break;case"selectionchange":if(S0)break;case"keydown":case"keyup":mc(d,n,h)}var E;if(Ql)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else er?hf(e,n)&&(T="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(pf&&n.locale!=="ko"&&(er||T!=="onCompositionStart"?T==="onCompositionEnd"&&er&&(E=ff()):(xn=h,Kl="value"in xn?xn.value:xn.textContent,er=!0)),R=Bi(c,T),0<R.length&&(T=new oc(T,e,null,n,h),d.push({event:T,listeners:R}),E?T.data=E:(E=mf(n),E!==null&&(T.data=E)))),(E=d0?f0(e,n):p0(e,n))&&(c=Bi(c,"onBeforeInput"),0<c.length&&(h=new oc("onBeforeInput","beforeinput",null,n,h),d.push({event:h,listeners:c}),h.data=E))}Tf(d,t)})}function vs(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Bi(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=fs(e,n),i!=null&&r.unshift(vs(e,i,s)),i=fs(e,t),i!=null&&r.push(vs(e,i,s))),e=e.return}return r}function Xn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function xc(e,t,n,r,s){for(var i=t._reactName,o=[];n!==null&&n!==r;){var a=n,u=a.alternate,c=a.stateNode;if(u!==null&&u===r)break;a.tag===5&&c!==null&&(a=c,s?(u=fs(n,i),u!=null&&o.unshift(vs(n,u,a))):s||(u=fs(n,i),u!=null&&o.push(vs(n,u,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var T0=/\r\n?/g,j0=/\u0000|\uFFFD/g;function vc(e){return(typeof e=="string"?e:""+e).replace(T0,`
`).replace(j0,"")}function Js(e,t,n){if(t=vc(t),vc(e)!==t&&n)throw Error(L(425))}function zi(){}var Ha=null,Va=null;function Ka(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 Wa=typeof setTimeout=="function"?setTimeout:void 0,R0=typeof clearTimeout=="function"?clearTimeout:void 0,kc=typeof Promise=="function"?Promise:void 0,_0=typeof queueMicrotask=="function"?queueMicrotask:typeof kc<"u"?function(e){return kc.resolve(null).then(e).catch(L0)}:Wa;function L0(e){setTimeout(function(){throw e})}function sa(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),ms(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);ms(t)}function Nn(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 bc(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 jr=Math.random().toString(36).slice(2),Vt="__reactFiber$"+jr,ks="__reactProps$"+jr,nn="__reactContainer$"+jr,Ga="__reactEvents$"+jr,M0="__reactListeners$"+jr,A0="__reactHandles$"+jr;function Bn(e){var t=e[Vt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[nn]||n[Vt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=bc(e);e!==null;){if(n=e[Vt])return n;e=bc(e)}return t}e=n,n=e.parentNode}return null}function Is(e){return e=e[Vt]||e[nn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function rr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(L(33))}function yo(e){return e[ks]||null}var Qa=[],sr=-1;function An(e){return{current:e}}function be(e){0>sr||(e.current=Qa[sr],Qa[sr]=null,sr--)}function xe(e,t){sr++,Qa[sr]=e.current,e.current=t}var Ln={},Ze=An(Ln),lt=An(!1),Hn=Ln;function kr(e,t){var n=e.type.contextTypes;if(!n)return Ln;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 ut(e){return e=e.childContextTypes,e!=null}function Fi(){be(lt),be(Ze)}function wc(e,t,n){if(Ze.current!==Ln)throw Error(L(168));xe(Ze,t),xe(lt,n)}function Rf(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(L(108,ym(e)||"Unknown",s));return je({},n,r)}function Ui(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ln,Hn=Ze.current,xe(Ze,e),xe(lt,lt.current),!0}function Sc(e,t,n){var r=e.stateNode;if(!r)throw Error(L(169));n?(e=Rf(e,t,Hn),r.__reactInternalMemoizedMergedChildContext=e,be(lt),be(Ze),xe(Ze,e)):be(lt),xe(lt,n)}var Xt=null,xo=!1,ia=!1;function _f(e){Xt===null?Xt=[e]:Xt.push(e)}function D0(e){xo=!0,_f(e)}function Dn(){if(!ia&&Xt!==null){ia=!0;var e=0,t=pe;try{var n=Xt;for(pe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Xt=null,xo=!1}catch(s){throw Xt!==null&&(Xt=Xt.slice(e+1)),ef(Ul,Dn),s}finally{pe=t,ia=!1}}return null}var ir=[],or=0,$i=null,Hi=0,wt=[],St=0,Vn=null,Jt=1,Zt="";function Pn(e,t){ir[or++]=Hi,ir[or++]=$i,$i=e,Hi=t}function Lf(e,t,n){wt[St++]=Jt,wt[St++]=Zt,wt[St++]=Vn,Vn=e;var r=Jt;e=Zt;var s=32-It(r)-1;r&=~(1<<s),n+=1;var i=32-It(t)+s;if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,Jt=1<<32-It(t)+s|n<<s|r,Zt=i+e}else Jt=1<<i|n<<s|r,Zt=e}function Yl(e){e.return!==null&&(Pn(e,1),Lf(e,1,0))}function Xl(e){for(;e===$i;)$i=ir[--or],ir[or]=null,Hi=ir[--or],ir[or]=null;for(;e===Vn;)Vn=wt[--St],wt[St]=null,Zt=wt[--St],wt[St]=null,Jt=wt[--St],wt[St]=null}var gt=null,mt=null,Ce=!1,Dt=null;function Mf(e,t){var n=Ct(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 Nc(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,gt=e,mt=Nn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,gt=e,mt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Vn!==null?{id:Jt,overflow:Zt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Ct(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,gt=e,mt=null,!0):!1;default:return!1}}function qa(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ya(e){if(Ce){var t=mt;if(t){var n=t;if(!Nc(e,t)){if(qa(e))throw Error(L(418));t=Nn(n.nextSibling);var r=gt;t&&Nc(e,t)?Mf(r,n):(e.flags=e.flags&-4097|2,Ce=!1,gt=e)}}else{if(qa(e))throw Error(L(418));e.flags=e.flags&-4097|2,Ce=!1,gt=e}}}function Cc(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;gt=e}function Zs(e){if(e!==gt)return!1;if(!Ce)return Cc(e),Ce=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ka(e.type,e.memoizedProps)),t&&(t=mt)){if(qa(e))throw Af(),Error(L(418));for(;t;)Mf(e,t),t=Nn(t.nextSibling)}if(Cc(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(L(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){mt=Nn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}mt=null}}else mt=gt?Nn(e.stateNode.nextSibling):null;return!0}function Af(){for(var e=mt;e;)e=Nn(e.nextSibling)}function br(){mt=gt=null,Ce=!1}function Jl(e){Dt===null?Dt=[e]:Dt.push(e)}var I0=an.ReactCurrentBatchConfig;function Hr(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(L(309));var r=n.stateNode}if(!r)throw Error(L(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(L(284));if(!n._owner)throw Error(L(290,e))}return e}function ei(e,t){throw e=Object.prototype.toString.call(t),Error(L(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ec(e){var t=e._init;return t(e._payload)}function Df(e){function t(m,p){if(e){var g=m.deletions;g===null?(m.deletions=[p],m.flags|=16):g.push(p)}}function n(m,p){if(!e)return null;for(;p!==null;)t(m,p),p=p.sibling;return null}function r(m,p){for(m=new Map;p!==null;)p.key!==null?m.set(p.key,p):m.set(p.index,p),p=p.sibling;return m}function s(m,p){return m=jn(m,p),m.index=0,m.sibling=null,m}function i(m,p,g){return m.index=g,e?(g=m.alternate,g!==null?(g=g.index,g<p?(m.flags|=2,p):g):(m.flags|=2,p)):(m.flags|=1048576,p)}function o(m){return e&&m.alternate===null&&(m.flags|=2),m}function a(m,p,g,b){return p===null||p.tag!==6?(p=fa(g,m.mode,b),p.return=m,p):(p=s(p,g),p.return=m,p)}function u(m,p,g,b){var j=g.type;return j===Zn?h(m,p,g.props.children,b,g.key):p!==null&&(p.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===pn&&Ec(j)===p.type)?(b=s(p,g.props),b.ref=Hr(m,p,g),b.return=m,b):(b=wi(g.type,g.key,g.props,null,m.mode,b),b.ref=Hr(m,p,g),b.return=m,b)}function c(m,p,g,b){return p===null||p.tag!==4||p.stateNode.containerInfo!==g.containerInfo||p.stateNode.implementation!==g.implementation?(p=pa(g,m.mode,b),p.return=m,p):(p=s(p,g.children||[]),p.return=m,p)}function h(m,p,g,b,j){return p===null||p.tag!==7?(p=$n(g,m.mode,b,j),p.return=m,p):(p=s(p,g),p.return=m,p)}function d(m,p,g){if(typeof p=="string"&&p!==""||typeof p=="number")return p=fa(""+p,m.mode,g),p.return=m,p;if(typeof p=="object"&&p!==null){switch(p.$$typeof){case Hs:return g=wi(p.type,p.key,p.props,null,m.mode,g),g.ref=Hr(m,null,p),g.return=m,g;case Jn:return p=pa(p,m.mode,g),p.return=m,p;case pn:var b=p._init;return d(m,b(p._payload),g)}if(Qr(p)||Br(p))return p=$n(p,m.mode,g,null),p.return=m,p;ei(m,p)}return null}function f(m,p,g,b){var j=p!==null?p.key:null;if(typeof g=="string"&&g!==""||typeof g=="number")return j!==null?null:a(m,p,""+g,b);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Hs:return g.key===j?u(m,p,g,b):null;case Jn:return g.key===j?c(m,p,g,b):null;case pn:return j=g._init,f(m,p,j(g._payload),b)}if(Qr(g)||Br(g))return j!==null?null:h(m,p,g,b,null);ei(m,g)}return null}function k(m,p,g,b,j){if(typeof b=="string"&&b!==""||typeof b=="number")return m=m.get(g)||null,a(p,m,""+b,j);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Hs:return m=m.get(b.key===null?g:b.key)||null,u(p,m,b,j);case Jn:return m=m.get(b.key===null?g:b.key)||null,c(p,m,b,j);case pn:var R=b._init;return k(m,p,g,R(b._payload),j)}if(Qr(b)||Br(b))return m=m.get(g)||null,h(p,m,b,j,null);ei(p,b)}return null}function N(m,p,g,b){for(var j=null,R=null,E=p,T=p=0,D=null;E!==null&&T<g.length;T++){E.index>T?(D=E,E=null):D=E.sibling;var I=f(m,E,g[T],b);if(I===null){E===null&&(E=D);break}e&&E&&I.alternate===null&&t(m,E),p=i(I,p,T),R===null?j=I:R.sibling=I,R=I,E=D}if(T===g.length)return n(m,E),Ce&&Pn(m,T),j;if(E===null){for(;T<g.length;T++)E=d(m,g[T],b),E!==null&&(p=i(E,p,T),R===null?j=E:R.sibling=E,R=E);return Ce&&Pn(m,T),j}for(E=r(m,E);T<g.length;T++)D=k(E,m,T,g[T],b),D!==null&&(e&&D.alternate!==null&&E.delete(D.key===null?T:D.key),p=i(D,p,T),R===null?j=D:R.sibling=D,R=D);return e&&E.forEach(function(X){return t(m,X)}),Ce&&Pn(m,T),j}function w(m,p,g,b){var j=Br(g);if(typeof j!="function")throw Error(L(150));if(g=j.call(g),g==null)throw Error(L(151));for(var R=j=null,E=p,T=p=0,D=null,I=g.next();E!==null&&!I.done;T++,I=g.next()){E.index>T?(D=E,E=null):D=E.sibling;var X=f(m,E,I.value,b);if(X===null){E===null&&(E=D);break}e&&E&&X.alternate===null&&t(m,E),p=i(X,p,T),R===null?j=X:R.sibling=X,R=X,E=D}if(I.done)return n(m,E),Ce&&Pn(m,T),j;if(E===null){for(;!I.done;T++,I=g.next())I=d(m,I.value,b),I!==null&&(p=i(I,p,T),R===null?j=I:R.sibling=I,R=I);return Ce&&Pn(m,T),j}for(E=r(m,E);!I.done;T++,I=g.next())I=k(E,m,T,I.value,b),I!==null&&(e&&I.alternate!==null&&E.delete(I.key===null?T:I.key),p=i(I,p,T),R===null?j=I:R.sibling=I,R=I);return e&&E.forEach(function(we){return t(m,we)}),Ce&&Pn(m,T),j}function S(m,p,g,b){if(typeof g=="object"&&g!==null&&g.type===Zn&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case Hs:e:{for(var j=g.key,R=p;R!==null;){if(R.key===j){if(j=g.type,j===Zn){if(R.tag===7){n(m,R.sibling),p=s(R,g.props.children),p.return=m,m=p;break e}}else if(R.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===pn&&Ec(j)===R.type){n(m,R.sibling),p=s(R,g.props),p.ref=Hr(m,R,g),p.return=m,m=p;break e}n(m,R);break}else t(m,R);R=R.sibling}g.type===Zn?(p=$n(g.props.children,m.mode,b,g.key),p.return=m,m=p):(b=wi(g.type,g.key,g.props,null,m.mode,b),b.ref=Hr(m,p,g),b.return=m,m=b)}return o(m);case Jn:e:{for(R=g.key;p!==null;){if(p.key===R)if(p.tag===4&&p.stateNode.containerInfo===g.containerInfo&&p.stateNode.implementation===g.implementation){n(m,p.sibling),p=s(p,g.children||[]),p.return=m,m=p;break e}else{n(m,p);break}else t(m,p);p=p.sibling}p=pa(g,m.mode,b),p.return=m,m=p}return o(m);case pn:return R=g._init,S(m,p,R(g._payload),b)}if(Qr(g))return N(m,p,g,b);if(Br(g))return w(m,p,g,b);ei(m,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,p!==null&&p.tag===6?(n(m,p.sibling),p=s(p,g),p.return=m,m=p):(n(m,p),p=fa(g,m.mode,b),p.return=m,m=p),o(m)):n(m,p)}return S}var wr=Df(!0),If=Df(!1),Vi=An(null),Ki=null,ar=null,Zl=null;function eu(){Zl=ar=Ki=null}function tu(e){var t=Vi.current;be(Vi),e._currentValue=t}function Xa(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 mr(e,t){Ki=e,Zl=ar=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(at=!0),e.firstContext=null)}function Tt(e){var t=e._currentValue;if(Zl!==e)if(e={context:e,memoizedValue:t,next:null},ar===null){if(Ki===null)throw Error(L(308));ar=e,Ki.dependencies={lanes:0,firstContext:e}}else ar=ar.next=e;return t}var zn=null;function nu(e){zn===null?zn=[e]:zn.push(e)}function Pf(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,nu(t)):(n.next=s.next,s.next=n),t.interleaved=n,rn(e,r)}function rn(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 hn=!1;function ru(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Of(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function en(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Cn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,fe&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,rn(e,n)}return s=r.interleaved,s===null?(t.next=t,nu(r)):(t.next=s.next,s.next=t),r.interleaved=t,rn(e,n)}function gi(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,$l(e,n)}}function Tc(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 Wi(e,t,n,r){var s=e.updateQueue;hn=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var u=a,c=u.next;u.next=null,o===null?i=c:o.next=c,o=u;var h=e.alternate;h!==null&&(h=h.updateQueue,a=h.lastBaseUpdate,a!==o&&(a===null?h.firstBaseUpdate=c:a.next=c,h.lastBaseUpdate=u))}if(i!==null){var d=s.baseState;o=0,h=c=u=null,a=i;do{var f=a.lane,k=a.eventTime;if((r&f)===f){h!==null&&(h=h.next={eventTime:k,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var N=e,w=a;switch(f=t,k=n,w.tag){case 1:if(N=w.payload,typeof N=="function"){d=N.call(k,d,f);break e}d=N;break e;case 3:N.flags=N.flags&-65537|128;case 0:if(N=w.payload,f=typeof N=="function"?N.call(k,d,f):N,f==null)break e;d=je({},d,f);break e;case 2:hn=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=s.effects,f===null?s.effects=[a]:f.push(a))}else k={eventTime:k,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},h===null?(c=h=k,u=d):h=h.next=k,o|=f;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;f=a,a=f.next,f.next=null,s.lastBaseUpdate=f,s.shared.pending=null}}while(!0);if(h===null&&(u=d),s.baseState=u,s.firstBaseUpdate=c,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);Wn|=o,e.lanes=o,e.memoizedState=d}}function jc(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(L(191,s));s.call(r)}}}var Ps={},Wt=An(Ps),bs=An(Ps),ws=An(Ps);function Fn(e){if(e===Ps)throw Error(L(174));return e}function su(e,t){switch(xe(ws,t),xe(bs,e),xe(Wt,Ps),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:La(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=La(t,e)}be(Wt),xe(Wt,t)}function Sr(){be(Wt),be(bs),be(ws)}function Bf(e){Fn(ws.current);var t=Fn(Wt.current),n=La(t,e.type);t!==n&&(xe(bs,e),xe(Wt,n))}function iu(e){bs.current===e&&(be(Wt),be(bs))}var Ee=An(0);function Gi(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 oa=[];function ou(){for(var e=0;e<oa.length;e++)oa[e]._workInProgressVersionPrimary=null;oa.length=0}var yi=an.ReactCurrentDispatcher,aa=an.ReactCurrentBatchConfig,Kn=0,Te=null,Oe=null,$e=null,Qi=!1,rs=!1,Ss=0,P0=0;function Ye(){throw Error(L(321))}function au(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ot(e[n],t[n]))return!1;return!0}function lu(e,t,n,r,s,i){if(Kn=i,Te=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,yi.current=e===null||e.memoizedState===null?F0:U0,e=n(r,s),rs){i=0;do{if(rs=!1,Ss=0,25<=i)throw Error(L(301));i+=1,$e=Oe=null,t.updateQueue=null,yi.current=$0,e=n(r,s)}while(rs)}if(yi.current=qi,t=Oe!==null&&Oe.next!==null,Kn=0,$e=Oe=Te=null,Qi=!1,t)throw Error(L(300));return e}function uu(){var e=Ss!==0;return Ss=0,e}function Ht(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $e===null?Te.memoizedState=$e=e:$e=$e.next=e,$e}function jt(){if(Oe===null){var e=Te.alternate;e=e!==null?e.memoizedState:null}else e=Oe.next;var t=$e===null?Te.memoizedState:$e.next;if(t!==null)$e=t,Oe=e;else{if(e===null)throw Error(L(310));Oe=e,e={memoizedState:Oe.memoizedState,baseState:Oe.baseState,baseQueue:Oe.baseQueue,queue:Oe.queue,next:null},$e===null?Te.memoizedState=$e=e:$e=$e.next=e}return $e}function Ns(e,t){return typeof t=="function"?t(e):t}function la(e){var t=jt(),n=t.queue;if(n===null)throw Error(L(311));n.lastRenderedReducer=e;var r=Oe,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,c=i;do{var h=c.lane;if((Kn&h)===h)u!==null&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:h,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};u===null?(a=u=d,o=r):u=u.next=d,Te.lanes|=h,Wn|=h}c=c.next}while(c!==null&&c!==i);u===null?o=r:u.next=a,Ot(r,t.memoizedState)||(at=!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,Te.lanes|=i,Wn|=i,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function ua(e){var t=jt(),n=t.queue;if(n===null)throw Error(L(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);Ot(i,t.memoizedState)||(at=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function zf(){}function Ff(e,t){var n=Te,r=jt(),s=t(),i=!Ot(r.memoizedState,s);if(i&&(r.memoizedState=s,at=!0),r=r.queue,cu(Hf.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||$e!==null&&$e.memoizedState.tag&1){if(n.flags|=2048,Cs(9,$f.bind(null,n,r,s,t),void 0,null),Ve===null)throw Error(L(349));Kn&30||Uf(n,t,s)}return s}function Uf(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Te.updateQueue,t===null?(t={lastEffect:null,stores:null},Te.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function $f(e,t,n,r){t.value=n,t.getSnapshot=r,Vf(t)&&Kf(e)}function Hf(e,t,n){return n(function(){Vf(t)&&Kf(e)})}function Vf(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ot(e,n)}catch{return!0}}function Kf(e){var t=rn(e,1);t!==null&&Pt(t,e,1,-1)}function Rc(e){var t=Ht();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ns,lastRenderedState:e},t.queue=e,e=e.dispatch=z0.bind(null,Te,e),[t.memoizedState,e]}function Cs(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Te.updateQueue,t===null?(t={lastEffect:null,stores:null},Te.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 Wf(){return jt().memoizedState}function xi(e,t,n,r){var s=Ht();Te.flags|=e,s.memoizedState=Cs(1|t,n,void 0,r===void 0?null:r)}function vo(e,t,n,r){var s=jt();r=r===void 0?null:r;var i=void 0;if(Oe!==null){var o=Oe.memoizedState;if(i=o.destroy,r!==null&&au(r,o.deps)){s.memoizedState=Cs(t,n,i,r);return}}Te.flags|=e,s.memoizedState=Cs(1|t,n,i,r)}function _c(e,t){return xi(8390656,8,e,t)}function cu(e,t){return vo(2048,8,e,t)}function Gf(e,t){return vo(4,2,e,t)}function Qf(e,t){return vo(4,4,e,t)}function qf(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 Yf(e,t,n){return n=n!=null?n.concat([e]):null,vo(4,4,qf.bind(null,t,e),n)}function du(){}function Xf(e,t){var n=jt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&au(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Jf(e,t){var n=jt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&au(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Zf(e,t,n){return Kn&21?(Ot(n,t)||(n=rf(),Te.lanes|=n,Wn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,at=!0),e.memoizedState=n)}function O0(e,t){var n=pe;pe=n!==0&&4>n?n:4,e(!0);var r=aa.transition;aa.transition={};try{e(!1),t()}finally{pe=n,aa.transition=r}}function ep(){return jt().memoizedState}function B0(e,t,n){var r=Tn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},tp(e))np(t,n);else if(n=Pf(e,t,n,r),n!==null){var s=nt();Pt(n,e,r,s),rp(n,t,r)}}function z0(e,t,n){var r=Tn(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(tp(e))np(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,Ot(a,o)){var u=t.interleaved;u===null?(s.next=s,nu(t)):(s.next=u.next,u.next=s),t.interleaved=s;return}}catch{}finally{}n=Pf(e,t,s,r),n!==null&&(s=nt(),Pt(n,e,r,s),rp(n,t,r))}}function tp(e){var t=e.alternate;return e===Te||t!==null&&t===Te}function np(e,t){rs=Qi=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function rp(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,$l(e,n)}}var qi={readContext:Tt,useCallback:Ye,useContext:Ye,useEffect:Ye,useImperativeHandle:Ye,useInsertionEffect:Ye,useLayoutEffect:Ye,useMemo:Ye,useReducer:Ye,useRef:Ye,useState:Ye,useDebugValue:Ye,useDeferredValue:Ye,useTransition:Ye,useMutableSource:Ye,useSyncExternalStore:Ye,useId:Ye,unstable_isNewReconciler:!1},F0={readContext:Tt,useCallback:function(e,t){return Ht().memoizedState=[e,t===void 0?null:t],e},useContext:Tt,useEffect:_c,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,xi(4194308,4,qf.bind(null,t,e),n)},useLayoutEffect:function(e,t){return xi(4194308,4,e,t)},useInsertionEffect:function(e,t){return xi(4,2,e,t)},useMemo:function(e,t){var n=Ht();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ht();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=B0.bind(null,Te,e),[r.memoizedState,e]},useRef:function(e){var t=Ht();return e={current:e},t.memoizedState=e},useState:Rc,useDebugValue:du,useDeferredValue:function(e){return Ht().memoizedState=e},useTransition:function(){var e=Rc(!1),t=e[0];return e=O0.bind(null,e[1]),Ht().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Te,s=Ht();if(Ce){if(n===void 0)throw Error(L(407));n=n()}else{if(n=t(),Ve===null)throw Error(L(349));Kn&30||Uf(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,_c(Hf.bind(null,r,i,e),[e]),r.flags|=2048,Cs(9,$f.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Ht(),t=Ve.identifierPrefix;if(Ce){var n=Zt,r=Jt;n=(r&~(1<<32-It(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ss++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=P0++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},U0={readContext:Tt,useCallback:Xf,useContext:Tt,useEffect:cu,useImperativeHandle:Yf,useInsertionEffect:Gf,useLayoutEffect:Qf,useMemo:Jf,useReducer:la,useRef:Wf,useState:function(){return la(Ns)},useDebugValue:du,useDeferredValue:function(e){var t=jt();return Zf(t,Oe.memoizedState,e)},useTransition:function(){var e=la(Ns)[0],t=jt().memoizedState;return[e,t]},useMutableSource:zf,useSyncExternalStore:Ff,useId:ep,unstable_isNewReconciler:!1},$0={readContext:Tt,useCallback:Xf,useContext:Tt,useEffect:cu,useImperativeHandle:Yf,useInsertionEffect:Gf,useLayoutEffect:Qf,useMemo:Jf,useReducer:ua,useRef:Wf,useState:function(){return ua(Ns)},useDebugValue:du,useDeferredValue:function(e){var t=jt();return Oe===null?t.memoizedState=e:Zf(t,Oe.memoizedState,e)},useTransition:function(){var e=ua(Ns)[0],t=jt().memoizedState;return[e,t]},useMutableSource:zf,useSyncExternalStore:Ff,useId:ep,unstable_isNewReconciler:!1};function Lt(e,t){if(e&&e.defaultProps){t=je({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Ja(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:je({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ko={isMounted:function(e){return(e=e._reactInternals)?qn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=nt(),s=Tn(e),i=en(r,s);i.payload=t,n!=null&&(i.callback=n),t=Cn(e,i,s),t!==null&&(Pt(t,e,s,r),gi(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=nt(),s=Tn(e),i=en(r,s);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Cn(e,i,s),t!==null&&(Pt(t,e,s,r),gi(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=nt(),r=Tn(e),s=en(n,r);s.tag=2,t!=null&&(s.callback=t),t=Cn(e,s,r),t!==null&&(Pt(t,e,r,n),gi(t,e,r))}};function Lc(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?!ys(n,r)||!ys(s,i):!0}function sp(e,t,n){var r=!1,s=Ln,i=t.contextType;return typeof i=="object"&&i!==null?i=Tt(i):(s=ut(t)?Hn:Ze.current,r=t.contextTypes,i=(r=r!=null)?kr(e,s):Ln),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=ko,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function Mc(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&&ko.enqueueReplaceState(t,t.state,null)}function Za(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},ru(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=Tt(i):(i=ut(t)?Hn:Ze.current,s.context=kr(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Ja(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&&ko.enqueueReplaceState(s,s.state,null),Wi(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Nr(e,t){try{var n="",r=t;do n+=gm(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 ca(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function el(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var H0=typeof WeakMap=="function"?WeakMap:Map;function ip(e,t,n){n=en(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Xi||(Xi=!0,cl=r),el(e,t)},n}function op(e,t,n){n=en(-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(){el(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){el(e,t),typeof r!="function"&&(En===null?En=new Set([this]):En.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Ac(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new H0;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=rg.bind(null,e,t,n),t.then(e,e))}function Dc(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 Ic(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=en(-1,1),t.tag=2,Cn(n,t,1))),n.lanes|=1),e)}var V0=an.ReactCurrentOwner,at=!1;function tt(e,t,n,r){t.child=e===null?If(t,null,n,r):wr(t,e.child,n,r)}function Pc(e,t,n,r,s){n=n.render;var i=t.ref;return mr(t,s),r=lu(e,t,n,r,i,s),n=uu(),e!==null&&!at?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,sn(e,t,s)):(Ce&&n&&Yl(t),t.flags|=1,tt(e,t,r,s),t.child)}function Oc(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!vu(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,ap(e,t,i,r,s)):(e=wi(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:ys,n(o,r)&&e.ref===t.ref)return sn(e,t,s)}return t.flags|=1,e=jn(i,r),e.ref=t.ref,e.return=t,t.child=e}function ap(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(ys(i,r)&&e.ref===t.ref)if(at=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(at=!0);else return t.lanes=e.lanes,sn(e,t,s)}return tl(e,t,n,r,s)}function lp(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},xe(ur,ht),ht|=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,xe(ur,ht),ht|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,xe(ur,ht),ht|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,xe(ur,ht),ht|=r;return tt(e,t,s,n),t.child}function up(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function tl(e,t,n,r,s){var i=ut(n)?Hn:Ze.current;return i=kr(t,i),mr(t,s),n=lu(e,t,n,r,i,s),r=uu(),e!==null&&!at?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,sn(e,t,s)):(Ce&&r&&Yl(t),t.flags|=1,tt(e,t,n,s),t.child)}function Bc(e,t,n,r,s){if(ut(n)){var i=!0;Ui(t)}else i=!1;if(mr(t,s),t.stateNode===null)vi(e,t),sp(t,n,r),Za(t,n,r,s),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var u=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=Tt(c):(c=ut(n)?Hn:Ze.current,c=kr(t,c));var h=n.getDerivedStateFromProps,d=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||u!==c)&&Mc(t,o,r,c),hn=!1;var f=t.memoizedState;o.state=f,Wi(t,r,o,s),u=t.memoizedState,a!==r||f!==u||lt.current||hn?(typeof h=="function"&&(Ja(t,n,h,r),u=t.memoizedState),(a=hn||Lc(t,n,a,r,f,u,c))?(d||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=c,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Of(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:Lt(t.type,a),o.props=c,d=t.pendingProps,f=o.context,u=n.contextType,typeof u=="object"&&u!==null?u=Tt(u):(u=ut(n)?Hn:Ze.current,u=kr(t,u));var k=n.getDerivedStateFromProps;(h=typeof k=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||f!==u)&&Mc(t,o,r,u),hn=!1,f=t.memoizedState,o.state=f,Wi(t,r,o,s);var N=t.memoizedState;a!==d||f!==N||lt.current||hn?(typeof k=="function"&&(Ja(t,n,k,r),N=t.memoizedState),(c=hn||Lc(t,n,c,r,f,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&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=N),o.props=r,o.state=N,o.context=u,r=c):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return nl(e,t,n,r,i,s)}function nl(e,t,n,r,s,i){up(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return s&&Sc(t,n,!1),sn(e,t,i);r=t.stateNode,V0.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=wr(t,e.child,null,i),t.child=wr(t,null,a,i)):tt(e,t,a,i),t.memoizedState=r.state,s&&Sc(t,n,!0),t.child}function cp(e){var t=e.stateNode;t.pendingContext?wc(e,t.pendingContext,t.pendingContext!==t.context):t.context&&wc(e,t.context,!1),su(e,t.containerInfo)}function zc(e,t,n,r,s){return br(),Jl(s),t.flags|=256,tt(e,t,n,r),t.child}var rl={dehydrated:null,treeContext:null,retryLane:0};function sl(e){return{baseLanes:e,cachePool:null,transitions:null}}function dp(e,t,n){var r=t.pendingProps,s=Ee.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),xe(Ee,s&1),e===null)return Ya(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=So(o,r,0,null),e=$n(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=sl(n),t.memoizedState=rl,e):fu(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return K0(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=jn(s,u),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=jn(a,i):(i=$n(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?sl(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=rl,r}return i=e.child,e=i.sibling,r=jn(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 fu(e,t){return t=So({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ti(e,t,n,r){return r!==null&&Jl(r),wr(t,e.child,null,n),e=fu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function K0(e,t,n,r,s,i,o){if(n)return t.flags&256?(t.flags&=-257,r=ca(Error(L(422))),ti(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=So({mode:"visible",children:r.children},s,0,null),i=$n(i,s,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&wr(t,e.child,null,o),t.child.memoizedState=sl(o),t.memoizedState=rl,i);if(!(t.mode&1))return ti(e,t,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(L(419)),r=ca(i,r,void 0),ti(e,t,o,r)}if(a=(o&e.childLanes)!==0,at||a){if(r=Ve,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,rn(e,s),Pt(r,e,s,-1))}return xu(),r=ca(Error(L(421))),ti(e,t,o,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=sg.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,mt=Nn(s.nextSibling),gt=t,Ce=!0,Dt=null,e!==null&&(wt[St++]=Jt,wt[St++]=Zt,wt[St++]=Vn,Jt=e.id,Zt=e.overflow,Vn=t),t=fu(t,r.children),t.flags|=4096,t)}function Fc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Xa(e.return,t,n)}function da(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 fp(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(tt(e,t,r.children,n),r=Ee.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&&Fc(e,n,t);else if(e.tag===19)Fc(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(xe(Ee,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&&Gi(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),da(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&&Gi(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}da(t,!0,n,null,i);break;case"together":da(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function vi(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function sn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Wn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(L(153));if(t.child!==null){for(e=t.child,n=jn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=jn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function W0(e,t,n){switch(t.tag){case 3:cp(t),br();break;case 5:Bf(t);break;case 1:ut(t.type)&&Ui(t);break;case 4:su(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;xe(Vi,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(xe(Ee,Ee.current&1),t.flags|=128,null):n&t.child.childLanes?dp(e,t,n):(xe(Ee,Ee.current&1),e=sn(e,t,n),e!==null?e.sibling:null);xe(Ee,Ee.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return fp(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),xe(Ee,Ee.current),r)break;return null;case 22:case 23:return t.lanes=0,lp(e,t,n)}return sn(e,t,n)}var pp,il,hp,mp;pp=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}};il=function(){};hp=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,Fn(Wt.current);var i=null;switch(n){case"input":s=Ta(e,s),r=Ta(e,r),i=[];break;case"select":s=je({},s,{value:void 0}),r=je({},r,{value:void 0}),i=[];break;case"textarea":s=_a(e,s),r=_a(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=zi)}Ma(n,r);var o;n=null;for(c in s)if(!r.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var a=s[c];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(cs.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var u=r[c];if(a=s!=null?s[c]:void 0,r.hasOwnProperty(c)&&u!==a&&(u!=null||a!=null))if(c==="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(c,n)),n=u;else c==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,a=a?a.__html:void 0,u!=null&&a!==u&&(i=i||[]).push(c,u)):c==="children"?typeof u!="string"&&typeof u!="number"||(i=i||[]).push(c,""+u):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(cs.hasOwnProperty(c)?(u!=null&&c==="onScroll"&&ke("scroll",e),i||a===u||(i=[])):(i=i||[]).push(c,u))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};mp=function(e,t,n,r){n!==r&&(t.flags|=4)};function Vr(e,t){if(!Ce)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 Xe(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 G0(e,t,n){var r=t.pendingProps;switch(Xl(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xe(t),null;case 1:return ut(t.type)&&Fi(),Xe(t),null;case 3:return r=t.stateNode,Sr(),be(lt),be(Ze),ou(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Zs(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Dt!==null&&(pl(Dt),Dt=null))),il(e,t),Xe(t),null;case 5:iu(t);var s=Fn(ws.current);if(n=t.type,e!==null&&t.stateNode!=null)hp(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(L(166));return Xe(t),null}if(e=Fn(Wt.current),Zs(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Vt]=t,r[ks]=i,e=(t.mode&1)!==0,n){case"dialog":ke("cancel",r),ke("close",r);break;case"iframe":case"object":case"embed":ke("load",r);break;case"video":case"audio":for(s=0;s<Yr.length;s++)ke(Yr[s],r);break;case"source":ke("error",r);break;case"img":case"image":case"link":ke("error",r),ke("load",r);break;case"details":ke("toggle",r);break;case"input":qu(r,i),ke("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},ke("invalid",r);break;case"textarea":Xu(r,i),ke("invalid",r)}Ma(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&&Js(r.textContent,a,e),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&Js(r.textContent,a,e),s=["children",""+a]):cs.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&ke("scroll",r)}switch(n){case"input":Vs(r),Yu(r,i,!0);break;case"textarea":Vs(r),Ju(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=zi)}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=$d(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[Vt]=t,e[ks]=r,pp(e,t,!1,!1),t.stateNode=e;e:{switch(o=Aa(n,r),n){case"dialog":ke("cancel",e),ke("close",e),s=r;break;case"iframe":case"object":case"embed":ke("load",e),s=r;break;case"video":case"audio":for(s=0;s<Yr.length;s++)ke(Yr[s],e);s=r;break;case"source":ke("error",e),s=r;break;case"img":case"image":case"link":ke("error",e),ke("load",e),s=r;break;case"details":ke("toggle",e),s=r;break;case"input":qu(e,r),s=Ta(e,r),ke("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=je({},r,{value:void 0}),ke("invalid",e);break;case"textarea":Xu(e,r),s=_a(e,r),ke("invalid",e);break;default:s=r}Ma(n,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var u=a[i];i==="style"?Kd(e,u):i==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&Hd(e,u)):i==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&ds(e,u):typeof u=="number"&&ds(e,""+u):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(cs.hasOwnProperty(i)?u!=null&&i==="onScroll"&&ke("scroll",e):u!=null&&Pl(e,i,u,o))}switch(n){case"input":Vs(e),Yu(e,r,!1);break;case"textarea":Vs(e),Ju(e);break;case"option":r.value!=null&&e.setAttribute("value",""+_n(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?dr(e,!!r.multiple,i,!1):r.defaultValue!=null&&dr(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=zi)}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 Xe(t),null;case 6:if(e&&t.stateNode!=null)mp(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(L(166));if(n=Fn(ws.current),Fn(Wt.current),Zs(t)){if(r=t.stateNode,n=t.memoizedProps,r[Vt]=t,(i=r.nodeValue!==n)&&(e=gt,e!==null))switch(e.tag){case 3:Js(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Js(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Vt]=t,t.stateNode=r}return Xe(t),null;case 13:if(be(Ee),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ce&&mt!==null&&t.mode&1&&!(t.flags&128))Af(),br(),t.flags|=98560,i=!1;else if(i=Zs(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(L(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(L(317));i[Vt]=t}else br(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Xe(t),i=!1}else Dt!==null&&(pl(Dt),Dt=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||Ee.current&1?ze===0&&(ze=3):xu())),t.updateQueue!==null&&(t.flags|=4),Xe(t),null);case 4:return Sr(),il(e,t),e===null&&xs(t.stateNode.containerInfo),Xe(t),null;case 10:return tu(t.type._context),Xe(t),null;case 17:return ut(t.type)&&Fi(),Xe(t),null;case 19:if(be(Ee),i=t.memoizedState,i===null)return Xe(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)Vr(i,!1);else{if(ze!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Gi(e),o!==null){for(t.flags|=128,Vr(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 xe(Ee,Ee.current&1|2),t.child}e=e.sibling}i.tail!==null&&Me()>Cr&&(t.flags|=128,r=!0,Vr(i,!1),t.lanes=4194304)}else{if(!r)if(e=Gi(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Vr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!Ce)return Xe(t),null}else 2*Me()-i.renderingStartTime>Cr&&n!==1073741824&&(t.flags|=128,r=!0,Vr(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=Me(),t.sibling=null,n=Ee.current,xe(Ee,r?n&1|2:n&1),t):(Xe(t),null);case 22:case 23:return yu(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ht&1073741824&&(Xe(t),t.subtreeFlags&6&&(t.flags|=8192)):Xe(t),null;case 24:return null;case 25:return null}throw Error(L(156,t.tag))}function Q0(e,t){switch(Xl(t),t.tag){case 1:return ut(t.type)&&Fi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Sr(),be(lt),be(Ze),ou(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return iu(t),null;case 13:if(be(Ee),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(L(340));br()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return be(Ee),null;case 4:return Sr(),null;case 10:return tu(t.type._context),null;case 22:case 23:return yu(),null;case 24:return null;default:return null}}var ni=!1,Je=!1,q0=typeof WeakSet=="function"?WeakSet:Set,O=null;function lr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Le(e,t,r)}else n.current=null}function ol(e,t,n){try{n()}catch(r){Le(e,t,r)}}var Uc=!1;function Y0(e,t){if(Ha=Pi,e=kf(),ql(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,c=0,h=0,d=e,f=null;t:for(;;){for(var k;d!==n||s!==0&&d.nodeType!==3||(a=o+s),d!==i||r!==0&&d.nodeType!==3||(u=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(k=d.firstChild)!==null;)f=d,d=k;for(;;){if(d===e)break t;if(f===n&&++c===s&&(a=o),f===i&&++h===r&&(u=o),(k=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=k}n=a===-1||u===-1?null:{start:a,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Va={focusedElem:e,selectionRange:n},Pi=!1,O=t;O!==null;)if(t=O,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,O=e;else for(;O!==null;){t=O;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 w=N.memoizedProps,S=N.memoizedState,m=t.stateNode,p=m.getSnapshotBeforeUpdate(t.elementType===t.type?w:Lt(t.type,w),S);m.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var g=t.stateNode.containerInfo;g.nodeType===1?g.textContent="":g.nodeType===9&&g.documentElement&&g.removeChild(g.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(L(163))}}catch(b){Le(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,O=e;break}O=t.return}return N=Uc,Uc=!1,N}function ss(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&&ol(t,n,i)}s=s.next}while(s!==r)}}function bo(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 al(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 gp(e){var t=e.alternate;t!==null&&(e.alternate=null,gp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Vt],delete t[ks],delete t[Ga],delete t[M0],delete t[A0])),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 yp(e){return e.tag===5||e.tag===3||e.tag===4}function $c(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||yp(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 ll(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=zi));else if(r!==4&&(e=e.child,e!==null))for(ll(e,t,n),e=e.sibling;e!==null;)ll(e,t,n),e=e.sibling}function ul(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(ul(e,t,n),e=e.sibling;e!==null;)ul(e,t,n),e=e.sibling}var We=null,Mt=!1;function fn(e,t,n){for(n=n.child;n!==null;)xp(e,t,n),n=n.sibling}function xp(e,t,n){if(Kt&&typeof Kt.onCommitFiberUnmount=="function")try{Kt.onCommitFiberUnmount(po,n)}catch{}switch(n.tag){case 5:Je||lr(n,t);case 6:var r=We,s=Mt;We=null,fn(e,t,n),We=r,Mt=s,We!==null&&(Mt?(e=We,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):We.removeChild(n.stateNode));break;case 18:We!==null&&(Mt?(e=We,n=n.stateNode,e.nodeType===8?sa(e.parentNode,n):e.nodeType===1&&sa(e,n),ms(e)):sa(We,n.stateNode));break;case 4:r=We,s=Mt,We=n.stateNode.containerInfo,Mt=!0,fn(e,t,n),We=r,Mt=s;break;case 0:case 11:case 14:case 15:if(!Je&&(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)&&ol(n,t,o),s=s.next}while(s!==r)}fn(e,t,n);break;case 1:if(!Je&&(lr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Le(n,t,a)}fn(e,t,n);break;case 21:fn(e,t,n);break;case 22:n.mode&1?(Je=(r=Je)||n.memoizedState!==null,fn(e,t,n),Je=r):fn(e,t,n);break;default:fn(e,t,n)}}function Hc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new q0),t.forEach(function(r){var s=ig.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function _t(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:We=a.stateNode,Mt=!1;break e;case 3:We=a.stateNode.containerInfo,Mt=!0;break e;case 4:We=a.stateNode.containerInfo,Mt=!0;break e}a=a.return}if(We===null)throw Error(L(160));xp(i,o,s),We=null,Mt=!1;var u=s.alternate;u!==null&&(u.return=null),s.return=null}catch(c){Le(s,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)vp(t,e),t=t.sibling}function vp(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(_t(t,e),$t(e),r&4){try{ss(3,e,e.return),bo(3,e)}catch(w){Le(e,e.return,w)}try{ss(5,e,e.return)}catch(w){Le(e,e.return,w)}}break;case 1:_t(t,e),$t(e),r&512&&n!==null&&lr(n,n.return);break;case 5:if(_t(t,e),$t(e),r&512&&n!==null&&lr(n,n.return),e.flags&32){var s=e.stateNode;try{ds(s,"")}catch(w){Le(e,e.return,w)}}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&&Fd(s,i),Aa(a,o);var c=Aa(a,i);for(o=0;o<u.length;o+=2){var h=u[o],d=u[o+1];h==="style"?Kd(s,d):h==="dangerouslySetInnerHTML"?Hd(s,d):h==="children"?ds(s,d):Pl(s,h,d,c)}switch(a){case"input":ja(s,i);break;case"textarea":Ud(s,i);break;case"select":var f=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var k=i.value;k!=null?dr(s,!!i.multiple,k,!1):f!==!!i.multiple&&(i.defaultValue!=null?dr(s,!!i.multiple,i.defaultValue,!0):dr(s,!!i.multiple,i.multiple?[]:"",!1))}s[ks]=i}catch(w){Le(e,e.return,w)}}break;case 6:if(_t(t,e),$t(e),r&4){if(e.stateNode===null)throw Error(L(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(w){Le(e,e.return,w)}}break;case 3:if(_t(t,e),$t(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ms(t.containerInfo)}catch(w){Le(e,e.return,w)}break;case 4:_t(t,e),$t(e);break;case 13:_t(t,e),$t(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(mu=Me())),r&4&&Hc(e);break;case 22:if(h=n!==null&&n.memoizedState!==null,e.mode&1?(Je=(c=Je)||h,_t(t,e),Je=c):_t(t,e),$t(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!h&&e.mode&1)for(O=e,h=e.child;h!==null;){for(d=O=h;O!==null;){switch(f=O,k=f.child,f.tag){case 0:case 11:case 14:case 15:ss(4,f,f.return);break;case 1:lr(f,f.return);var N=f.stateNode;if(typeof N.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,N.props=t.memoizedProps,N.state=t.memoizedState,N.componentWillUnmount()}catch(w){Le(r,n,w)}}break;case 5:lr(f,f.return);break;case 22:if(f.memoizedState!==null){Kc(d);continue}}k!==null?(k.return=f,O=k):Kc(d)}h=h.sibling}e:for(h=null,d=e;;){if(d.tag===5){if(h===null){h=d;try{s=d.stateNode,c?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=d.stateNode,u=d.memoizedProps.style,o=u!=null&&u.hasOwnProperty("display")?u.display:null,a.style.display=Vd("display",o))}catch(w){Le(e,e.return,w)}}}else if(d.tag===6){if(h===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(w){Le(e,e.return,w)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;h===d&&(h=null),d=d.return}h===d&&(h=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:_t(t,e),$t(e),r&4&&Hc(e);break;case 21:break;default:_t(t,e),$t(e)}}function $t(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(yp(n)){var r=n;break e}n=n.return}throw Error(L(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(ds(s,""),r.flags&=-33);var i=$c(e);ul(e,i,s);break;case 3:case 4:var o=r.stateNode.containerInfo,a=$c(e);ll(e,a,o);break;default:throw Error(L(161))}}catch(u){Le(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function X0(e,t,n){O=e,kp(e)}function kp(e,t,n){for(var r=(e.mode&1)!==0;O!==null;){var s=O,i=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||ni;if(!o){var a=s.alternate,u=a!==null&&a.memoizedState!==null||Je;a=ni;var c=Je;if(ni=o,(Je=u)&&!c)for(O=s;O!==null;)o=O,u=o.child,o.tag===22&&o.memoizedState!==null?Wc(s):u!==null?(u.return=o,O=u):Wc(s);for(;i!==null;)O=i,kp(i),i=i.sibling;O=s,ni=a,Je=c}Vc(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,O=i):Vc(e)}}function Vc(e){for(;O!==null;){var t=O;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Je||bo(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Je)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:Lt(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&jc(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}jc(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 c=t.alternate;if(c!==null){var h=c.memoizedState;if(h!==null){var d=h.dehydrated;d!==null&&ms(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(L(163))}Je||t.flags&512&&al(t)}catch(f){Le(t,t.return,f)}}if(t===e){O=null;break}if(n=t.sibling,n!==null){n.return=t.return,O=n;break}O=t.return}}function Kc(e){for(;O!==null;){var t=O;if(t===e){O=null;break}var n=t.sibling;if(n!==null){n.return=t.return,O=n;break}O=t.return}}function Wc(e){for(;O!==null;){var t=O;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{bo(4,t)}catch(u){Le(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(u){Le(t,s,u)}}var i=t.return;try{al(t)}catch(u){Le(t,i,u)}break;case 5:var o=t.return;try{al(t)}catch(u){Le(t,o,u)}}}catch(u){Le(t,t.return,u)}if(t===e){O=null;break}var a=t.sibling;if(a!==null){a.return=t.return,O=a;break}O=t.return}}var J0=Math.ceil,Yi=an.ReactCurrentDispatcher,pu=an.ReactCurrentOwner,Et=an.ReactCurrentBatchConfig,fe=0,Ve=null,Ie=null,Ge=0,ht=0,ur=An(0),ze=0,Es=null,Wn=0,wo=0,hu=0,is=null,ot=null,mu=0,Cr=1/0,Yt=null,Xi=!1,cl=null,En=null,ri=!1,vn=null,Ji=0,os=0,dl=null,ki=-1,bi=0;function nt(){return fe&6?Me():ki!==-1?ki:ki=Me()}function Tn(e){return e.mode&1?fe&2&&Ge!==0?Ge&-Ge:I0.transition!==null?(bi===0&&(bi=rf()),bi):(e=pe,e!==0||(e=window.event,e=e===void 0?16:df(e.type)),e):1}function Pt(e,t,n,r){if(50<os)throw os=0,dl=null,Error(L(185));As(e,n,r),(!(fe&2)||e!==Ve)&&(e===Ve&&(!(fe&2)&&(wo|=n),ze===4&&yn(e,Ge)),ct(e,r),n===1&&fe===0&&!(t.mode&1)&&(Cr=Me()+500,xo&&Dn()))}function ct(e,t){var n=e.callbackNode;Im(e,t);var r=Ii(e,e===Ve?Ge:0);if(r===0)n!==null&&tc(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&tc(n),t===1)e.tag===0?D0(Gc.bind(null,e)):_f(Gc.bind(null,e)),_0(function(){!(fe&6)&&Dn()}),n=null;else{switch(sf(r)){case 1:n=Ul;break;case 4:n=tf;break;case 16:n=Di;break;case 536870912:n=nf;break;default:n=Di}n=jp(n,bp.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function bp(e,t){if(ki=-1,bi=0,fe&6)throw Error(L(327));var n=e.callbackNode;if(gr()&&e.callbackNode!==n)return null;var r=Ii(e,e===Ve?Ge:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Zi(e,r);else{t=r;var s=fe;fe|=2;var i=Sp();(Ve!==e||Ge!==t)&&(Yt=null,Cr=Me()+500,Un(e,t));do try{tg();break}catch(a){wp(e,a)}while(!0);eu(),Yi.current=i,fe=s,Ie!==null?t=0:(Ve=null,Ge=0,t=ze)}if(t!==0){if(t===2&&(s=Ba(e),s!==0&&(r=s,t=fl(e,s))),t===1)throw n=Es,Un(e,0),yn(e,r),ct(e,Me()),n;if(t===6)yn(e,r);else{if(s=e.current.alternate,!(r&30)&&!Z0(s)&&(t=Zi(e,r),t===2&&(i=Ba(e),i!==0&&(r=i,t=fl(e,i))),t===1))throw n=Es,Un(e,0),yn(e,r),ct(e,Me()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(L(345));case 2:On(e,ot,Yt);break;case 3:if(yn(e,r),(r&130023424)===r&&(t=mu+500-Me(),10<t)){if(Ii(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){nt(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Wa(On.bind(null,e,ot,Yt),t);break}On(e,ot,Yt);break;case 4:if(yn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var o=31-It(r);i=1<<o,o=t[o],o>s&&(s=o),r&=~i}if(r=s,r=Me()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*J0(r/1960))-r,10<r){e.timeoutHandle=Wa(On.bind(null,e,ot,Yt),r);break}On(e,ot,Yt);break;case 5:On(e,ot,Yt);break;default:throw Error(L(329))}}}return ct(e,Me()),e.callbackNode===n?bp.bind(null,e):null}function fl(e,t){var n=is;return e.current.memoizedState.isDehydrated&&(Un(e,t).flags|=256),e=Zi(e,t),e!==2&&(t=ot,ot=n,t!==null&&pl(t)),e}function pl(e){ot===null?ot=e:ot.push.apply(ot,e)}function Z0(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(!Ot(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 yn(e,t){for(t&=~hu,t&=~wo,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-It(t),r=1<<n;e[n]=-1,t&=~r}}function Gc(e){if(fe&6)throw Error(L(327));gr();var t=Ii(e,0);if(!(t&1))return ct(e,Me()),null;var n=Zi(e,t);if(e.tag!==0&&n===2){var r=Ba(e);r!==0&&(t=r,n=fl(e,r))}if(n===1)throw n=Es,Un(e,0),yn(e,t),ct(e,Me()),n;if(n===6)throw Error(L(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,On(e,ot,Yt),ct(e,Me()),null}function gu(e,t){var n=fe;fe|=1;try{return e(t)}finally{fe=n,fe===0&&(Cr=Me()+500,xo&&Dn())}}function Gn(e){vn!==null&&vn.tag===0&&!(fe&6)&&gr();var t=fe;fe|=1;var n=Et.transition,r=pe;try{if(Et.transition=null,pe=1,e)return e()}finally{pe=r,Et.transition=n,fe=t,!(fe&6)&&Dn()}}function yu(){ht=ur.current,be(ur)}function Un(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,R0(n)),Ie!==null)for(n=Ie.return;n!==null;){var r=n;switch(Xl(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Fi();break;case 3:Sr(),be(lt),be(Ze),ou();break;case 5:iu(r);break;case 4:Sr();break;case 13:be(Ee);break;case 19:be(Ee);break;case 10:tu(r.type._context);break;case 22:case 23:yu()}n=n.return}if(Ve=e,Ie=e=jn(e.current,null),Ge=ht=t,ze=0,Es=null,hu=wo=Wn=0,ot=is=null,zn!==null){for(t=0;t<zn.length;t++)if(n=zn[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}zn=null}return e}function wp(e,t){do{var n=Ie;try{if(eu(),yi.current=qi,Qi){for(var r=Te.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Qi=!1}if(Kn=0,$e=Oe=Te=null,rs=!1,Ss=0,pu.current=null,n===null||n.return===null){ze=1,Es=t,Ie=null;break}e:{var i=e,o=n.return,a=n,u=t;if(t=Ge,a.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var c=u,h=a,d=h.tag;if(!(h.mode&1)&&(d===0||d===11||d===15)){var f=h.alternate;f?(h.updateQueue=f.updateQueue,h.memoizedState=f.memoizedState,h.lanes=f.lanes):(h.updateQueue=null,h.memoizedState=null)}var k=Dc(o);if(k!==null){k.flags&=-257,Ic(k,o,a,i,t),k.mode&1&&Ac(i,c,t),t=k,u=c;var N=t.updateQueue;if(N===null){var w=new Set;w.add(u),t.updateQueue=w}else N.add(u);break e}else{if(!(t&1)){Ac(i,c,t),xu();break e}u=Error(L(426))}}else if(Ce&&a.mode&1){var S=Dc(o);if(S!==null){!(S.flags&65536)&&(S.flags|=256),Ic(S,o,a,i,t),Jl(Nr(u,a));break e}}i=u=Nr(u,a),ze!==4&&(ze=2),is===null?is=[i]:is.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var m=ip(i,u,t);Tc(i,m);break e;case 1:a=u;var p=i.type,g=i.stateNode;if(!(i.flags&128)&&(typeof p.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(En===null||!En.has(g)))){i.flags|=65536,t&=-t,i.lanes|=t;var b=op(i,a,t);Tc(i,b);break e}}i=i.return}while(i!==null)}Cp(n)}catch(j){t=j,Ie===n&&n!==null&&(Ie=n=n.return);continue}break}while(!0)}function Sp(){var e=Yi.current;return Yi.current=qi,e===null?qi:e}function xu(){(ze===0||ze===3||ze===2)&&(ze=4),Ve===null||!(Wn&268435455)&&!(wo&268435455)||yn(Ve,Ge)}function Zi(e,t){var n=fe;fe|=2;var r=Sp();(Ve!==e||Ge!==t)&&(Yt=null,Un(e,t));do try{eg();break}catch(s){wp(e,s)}while(!0);if(eu(),fe=n,Yi.current=r,Ie!==null)throw Error(L(261));return Ve=null,Ge=0,ze}function eg(){for(;Ie!==null;)Np(Ie)}function tg(){for(;Ie!==null&&!Em();)Np(Ie)}function Np(e){var t=Tp(e.alternate,e,ht);e.memoizedProps=e.pendingProps,t===null?Cp(e):Ie=t,pu.current=null}function Cp(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Q0(n,t),n!==null){n.flags&=32767,Ie=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ze=6,Ie=null;return}}else if(n=G0(n,t,ht),n!==null){Ie=n;return}if(t=t.sibling,t!==null){Ie=t;return}Ie=t=e}while(t!==null);ze===0&&(ze=5)}function On(e,t,n){var r=pe,s=Et.transition;try{Et.transition=null,pe=1,ng(e,t,n,r)}finally{Et.transition=s,pe=r}return null}function ng(e,t,n,r){do gr();while(vn!==null);if(fe&6)throw Error(L(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(L(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(Pm(e,i),e===Ve&&(Ie=Ve=null,Ge=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||ri||(ri=!0,jp(Di,function(){return gr(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=Et.transition,Et.transition=null;var o=pe;pe=1;var a=fe;fe|=4,pu.current=null,Y0(e,n),vp(n,e),w0(Va),Pi=!!Ha,Va=Ha=null,e.current=n,X0(n),Tm(),fe=a,pe=o,Et.transition=i}else e.current=n;if(ri&&(ri=!1,vn=e,Ji=s),i=e.pendingLanes,i===0&&(En=null),_m(n.stateNode),ct(e,Me()),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(Xi)throw Xi=!1,e=cl,cl=null,e;return Ji&1&&e.tag!==0&&gr(),i=e.pendingLanes,i&1?e===dl?os++:(os=0,dl=e):os=0,Dn(),null}function gr(){if(vn!==null){var e=sf(Ji),t=Et.transition,n=pe;try{if(Et.transition=null,pe=16>e?16:e,vn===null)var r=!1;else{if(e=vn,vn=null,Ji=0,fe&6)throw Error(L(331));var s=fe;for(fe|=4,O=e.current;O!==null;){var i=O,o=i.child;if(O.flags&16){var a=i.deletions;if(a!==null){for(var u=0;u<a.length;u++){var c=a[u];for(O=c;O!==null;){var h=O;switch(h.tag){case 0:case 11:case 15:ss(8,h,i)}var d=h.child;if(d!==null)d.return=h,O=d;else for(;O!==null;){h=O;var f=h.sibling,k=h.return;if(gp(h),h===c){O=null;break}if(f!==null){f.return=k,O=f;break}O=k}}}var N=i.alternate;if(N!==null){var w=N.child;if(w!==null){N.child=null;do{var S=w.sibling;w.sibling=null,w=S}while(w!==null)}}O=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,O=o;else e:for(;O!==null;){if(i=O,i.flags&2048)switch(i.tag){case 0:case 11:case 15:ss(9,i,i.return)}var m=i.sibling;if(m!==null){m.return=i.return,O=m;break e}O=i.return}}var p=e.current;for(O=p;O!==null;){o=O;var g=o.child;if(o.subtreeFlags&2064&&g!==null)g.return=o,O=g;else e:for(o=p;O!==null;){if(a=O,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:bo(9,a)}}catch(j){Le(a,a.return,j)}if(a===o){O=null;break e}var b=a.sibling;if(b!==null){b.return=a.return,O=b;break e}O=a.return}}if(fe=s,Dn(),Kt&&typeof Kt.onPostCommitFiberRoot=="function")try{Kt.onPostCommitFiberRoot(po,e)}catch{}r=!0}return r}finally{pe=n,Et.transition=t}}return!1}function Qc(e,t,n){t=Nr(n,t),t=ip(e,t,1),e=Cn(e,t,1),t=nt(),e!==null&&(As(e,1,t),ct(e,t))}function Le(e,t,n){if(e.tag===3)Qc(e,e,n);else for(;t!==null;){if(t.tag===3){Qc(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(En===null||!En.has(r))){e=Nr(n,e),e=op(t,e,1),t=Cn(t,e,1),e=nt(),t!==null&&(As(t,1,e),ct(t,e));break}}t=t.return}}function rg(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=nt(),e.pingedLanes|=e.suspendedLanes&n,Ve===e&&(Ge&n)===n&&(ze===4||ze===3&&(Ge&130023424)===Ge&&500>Me()-mu?Un(e,0):hu|=n),ct(e,t)}function Ep(e,t){t===0&&(e.mode&1?(t=Gs,Gs<<=1,!(Gs&130023424)&&(Gs=4194304)):t=1);var n=nt();e=rn(e,t),e!==null&&(As(e,t,n),ct(e,n))}function sg(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ep(e,n)}function ig(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(L(314))}r!==null&&r.delete(t),Ep(e,n)}var Tp;Tp=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||lt.current)at=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return at=!1,W0(e,t,n);at=!!(e.flags&131072)}else at=!1,Ce&&t.flags&1048576&&Lf(t,Hi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;vi(e,t),e=t.pendingProps;var s=kr(t,Ze.current);mr(t,n),s=lu(null,t,r,e,s,n);var i=uu();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,ut(r)?(i=!0,Ui(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,ru(t),s.updater=ko,t.stateNode=s,s._reactInternals=t,Za(t,r,e,n),t=nl(null,t,r,!0,i,n)):(t.tag=0,Ce&&i&&Yl(t),tt(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(vi(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=ag(r),e=Lt(r,e),s){case 0:t=tl(null,t,r,e,n);break e;case 1:t=Bc(null,t,r,e,n);break e;case 11:t=Pc(null,t,r,e,n);break e;case 14:t=Oc(null,t,r,Lt(r.type,e),n);break e}throw Error(L(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Lt(r,s),tl(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Lt(r,s),Bc(e,t,r,s,n);case 3:e:{if(cp(t),e===null)throw Error(L(387));r=t.pendingProps,i=t.memoizedState,s=i.element,Of(e,t),Wi(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=Nr(Error(L(423)),t),t=zc(e,t,r,n,s);break e}else if(r!==s){s=Nr(Error(L(424)),t),t=zc(e,t,r,n,s);break e}else for(mt=Nn(t.stateNode.containerInfo.firstChild),gt=t,Ce=!0,Dt=null,n=If(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(br(),r===s){t=sn(e,t,n);break e}tt(e,t,r,n)}t=t.child}return t;case 5:return Bf(t),e===null&&Ya(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,Ka(r,s)?o=null:i!==null&&Ka(r,i)&&(t.flags|=32),up(e,t),tt(e,t,o,n),t.child;case 6:return e===null&&Ya(t),null;case 13:return dp(e,t,n);case 4:return su(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=wr(t,null,r,n):tt(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Lt(r,s),Pc(e,t,r,s,n);case 7:return tt(e,t,t.pendingProps,n),t.child;case 8:return tt(e,t,t.pendingProps.children,n),t.child;case 12:return tt(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,xe(Vi,r._currentValue),r._currentValue=o,i!==null)if(Ot(i.value,o)){if(i.children===s.children&&!lt.current){t=sn(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=en(-1,n&-n),u.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var h=c.pending;h===null?u.next=u:(u.next=h.next,h.next=u),c.pending=u}}i.lanes|=n,u=i.alternate,u!==null&&(u.lanes|=n),Xa(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(L(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Xa(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}tt(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,mr(t,n),s=Tt(s),r=r(s),t.flags|=1,tt(e,t,r,n),t.child;case 14:return r=t.type,s=Lt(r,t.pendingProps),s=Lt(r.type,s),Oc(e,t,r,s,n);case 15:return ap(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Lt(r,s),vi(e,t),t.tag=1,ut(r)?(e=!0,Ui(t)):e=!1,mr(t,n),sp(t,r,s),Za(t,r,s,n),nl(null,t,r,!0,e,n);case 19:return fp(e,t,n);case 22:return lp(e,t,n)}throw Error(L(156,t.tag))};function jp(e,t){return ef(e,t)}function og(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 Ct(e,t,n,r){return new og(e,t,n,r)}function vu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ag(e){if(typeof e=="function")return vu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Bl)return 11;if(e===zl)return 14}return 2}function jn(e,t){var n=e.alternate;return n===null?(n=Ct(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 wi(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")vu(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Zn:return $n(n.children,s,i,t);case Ol:o=8,s|=8;break;case Sa:return e=Ct(12,n,t,s|2),e.elementType=Sa,e.lanes=i,e;case Na:return e=Ct(13,n,t,s),e.elementType=Na,e.lanes=i,e;case Ca:return e=Ct(19,n,t,s),e.elementType=Ca,e.lanes=i,e;case Od:return So(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Id:o=10;break e;case Pd:o=9;break e;case Bl:o=11;break e;case zl:o=14;break e;case pn:o=16,r=null;break e}throw Error(L(130,e==null?e:typeof e,""))}return t=Ct(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function $n(e,t,n,r){return e=Ct(7,e,r,t),e.lanes=n,e}function So(e,t,n,r){return e=Ct(22,e,r,t),e.elementType=Od,e.lanes=n,e.stateNode={isHidden:!1},e}function fa(e,t,n){return e=Ct(6,e,null,t),e.lanes=n,e}function pa(e,t,n){return t=Ct(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function lg(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=Go(0),this.expirationTimes=Go(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Go(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function ku(e,t,n,r,s,i,o,a,u){return e=new lg(e,t,n,a,u),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Ct(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ru(i),e}function ug(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Jn,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Rp(e){if(!e)return Ln;e=e._reactInternals;e:{if(qn(e)!==e||e.tag!==1)throw Error(L(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(ut(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(L(171))}if(e.tag===1){var n=e.type;if(ut(n))return Rf(e,n,t)}return t}function _p(e,t,n,r,s,i,o,a,u){return e=ku(n,r,!0,e,s,i,o,a,u),e.context=Rp(null),n=e.current,r=nt(),s=Tn(n),i=en(r,s),i.callback=t??null,Cn(n,i,s),e.current.lanes=s,As(e,s,r),ct(e,r),e}function No(e,t,n,r){var s=t.current,i=nt(),o=Tn(s);return n=Rp(n),t.context===null?t.context=n:t.pendingContext=n,t=en(i,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Cn(s,t,o),e!==null&&(Pt(e,s,o,i),gi(e,s,o)),o}function eo(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 qc(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function bu(e,t){qc(e,t),(e=e.alternate)&&qc(e,t)}function cg(){return null}var Lp=typeof reportError=="function"?reportError:function(e){console.error(e)};function wu(e){this._internalRoot=e}Co.prototype.render=wu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(L(409));No(e,t,null,null)};Co.prototype.unmount=wu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Gn(function(){No(null,e,null,null)}),t[nn]=null}};function Co(e){this._internalRoot=e}Co.prototype.unstable_scheduleHydration=function(e){if(e){var t=lf();e={blockedOn:null,target:e,priority:t};for(var n=0;n<gn.length&&t!==0&&t<gn[n].priority;n++);gn.splice(n,0,e),n===0&&cf(e)}};function Su(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Eo(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Yc(){}function dg(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var c=eo(o);i.call(c)}}var o=_p(t,r,e,0,null,!1,!1,"",Yc);return e._reactRootContainer=o,e[nn]=o.current,xs(e.nodeType===8?e.parentNode:e),Gn(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var c=eo(u);a.call(c)}}var u=ku(e,0,!1,null,null,!1,!1,"",Yc);return e._reactRootContainer=u,e[nn]=u.current,xs(e.nodeType===8?e.parentNode:e),Gn(function(){No(t,u,n,r)}),u}function To(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=eo(o);a.call(u)}}No(t,o,e,s)}else o=dg(n,t,e,s,r);return eo(o)}of=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=qr(t.pendingLanes);n!==0&&($l(t,n|1),ct(t,Me()),!(fe&6)&&(Cr=Me()+500,Dn()))}break;case 13:Gn(function(){var r=rn(e,1);if(r!==null){var s=nt();Pt(r,e,1,s)}}),bu(e,1)}};Hl=function(e){if(e.tag===13){var t=rn(e,134217728);if(t!==null){var n=nt();Pt(t,e,134217728,n)}bu(e,134217728)}};af=function(e){if(e.tag===13){var t=Tn(e),n=rn(e,t);if(n!==null){var r=nt();Pt(n,e,t,r)}bu(e,t)}};lf=function(){return pe};uf=function(e,t){var n=pe;try{return pe=e,t()}finally{pe=n}};Ia=function(e,t,n){switch(t){case"input":if(ja(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=yo(r);if(!s)throw Error(L(90));zd(r),ja(r,s)}}}break;case"textarea":Ud(e,n);break;case"select":t=n.value,t!=null&&dr(e,!!n.multiple,t,!1)}};Qd=gu;qd=Gn;var fg={usingClientEntryPoint:!1,Events:[Is,rr,yo,Wd,Gd,gu]},Kr={findFiberByHostInstance:Bn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},pg={bundleType:Kr.bundleType,version:Kr.version,rendererPackageName:Kr.rendererPackageName,rendererConfig:Kr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:an.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Jd(e),e===null?null:e.stateNode},findFiberByHostInstance:Kr.findFiberByHostInstance||cg,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 si=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!si.isDisabled&&si.supportsFiber)try{po=si.inject(pg),Kt=si}catch{}}xt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=fg;xt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Su(t))throw Error(L(200));return ug(e,t,null,n)};xt.createRoot=function(e,t){if(!Su(e))throw Error(L(299));var n=!1,r="",s=Lp;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=ku(e,1,!1,null,null,n,!1,r,s),e[nn]=t.current,xs(e.nodeType===8?e.parentNode:e),new wu(t)};xt.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(L(188)):(e=Object.keys(e).join(","),Error(L(268,e)));return e=Jd(t),e=e===null?null:e.stateNode,e};xt.flushSync=function(e){return Gn(e)};xt.hydrate=function(e,t,n){if(!Eo(t))throw Error(L(200));return To(null,e,t,!0,n)};xt.hydrateRoot=function(e,t,n){if(!Su(e))throw Error(L(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",o=Lp;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=_p(t,null,e,1,n??null,s,!1,i,o),e[nn]=t.current,xs(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 Co(t)};xt.render=function(e,t,n){if(!Eo(t))throw Error(L(200));return To(null,e,t,!1,n)};xt.unmountComponentAtNode=function(e){if(!Eo(e))throw Error(L(40));return e._reactRootContainer?(Gn(function(){To(null,null,e,!1,function(){e._reactRootContainer=null,e[nn]=null})}),!0):!1};xt.unstable_batchedUpdates=gu;xt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Eo(n))throw Error(L(200));if(e==null||e._reactInternals===void 0)throw Error(L(38));return To(e,t,n,!1,r)};xt.version="18.3.1-next-f1338f8080-20240426";function Mp(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Mp)}catch(e){console.error(e)}}Mp(),Ld.exports=xt;var cr=Ld.exports,Xc=cr;ba.createRoot=Xc.createRoot,ba.hydrateRoot=Xc.hydrateRoot;/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const hg=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ap=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var mg={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.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const gg=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:i,iconNode:o,...a},u)=>y.createElement("svg",{ref:u,...mg,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Ap("lucide",s),...a},[...o.map(([c,h])=>y.createElement(c,h)),...Array.isArray(i)?i:[i]]));/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const re=(e,t)=>{const n=y.forwardRef(({className:r,...s},i)=>y.createElement(gg,{ref:i,iconNode:t,className:Ap(`lucide-${hg(e)}`,r),...s}));return n.displayName=`${e}`,n};/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yg=re("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const hl=re("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
* @license lucide-react v0.441.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=re("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.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ml=re("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const xg=re("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.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ip=re("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
* @license lucide-react v0.441.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=re("CirclePlus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);/**
* @license lucide-react v0.441.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=re("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const gl=re("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Op=re("Crown",[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]]);/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const vg=re("Gamepad2",[["line",{x1:"6",x2:"10",y1:"11",y2:"11",key:"1gktln"}],["line",{x1:"8",x2:"8",y1:"9",y2:"13",key:"qnk9ow"}],["line",{x1:"15",x2:"15.01",y1:"12",y2:"12",key:"krot7o"}],["line",{x1:"18",x2:"18.01",y1:"10",y2:"10",key:"1lcuu1"}],["path",{d:"M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z",key:"mfqc10"}]]);/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const kg=re("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const bg=re("GripHorizontal",[["circle",{cx:"12",cy:"9",r:"1",key:"124mty"}],["circle",{cx:"19",cy:"9",r:"1",key:"1ruzo2"}],["circle",{cx:"5",cy:"9",r:"1",key:"1a8b28"}],["circle",{cx:"12",cy:"15",r:"1",key:"1e56xg"}],["circle",{cx:"19",cy:"15",r:"1",key:"1a92ep"}],["circle",{cx:"5",cy:"15",r:"1",key:"5r1jwy"}]]);/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const wg=re("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
* @license lucide-react v0.441.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=re("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Sg=re("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/**
* @license lucide-react v0.441.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=re("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yl=re("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.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ng=re("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const xl=re("MoveRight",[["path",{d:"M18 8L22 12L18 16",key:"1r0oui"}],["path",{d:"M2 12H22",key:"1m8cig"}]]);/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const to=re("OctagonAlert",[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]]);/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Cu=re("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const no=re("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
* @license lucide-react v0.441.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=re("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Fp=re("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ro=re("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.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Cg=re("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.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Jc=re("SlidersVertical",[["line",{x1:"4",x2:"4",y1:"21",y2:"14",key:"1p332r"}],["line",{x1:"4",x2:"4",y1:"10",y2:"3",key:"gb41h5"}],["line",{x1:"12",x2:"12",y1:"21",y2:"12",key:"hf2csr"}],["line",{x1:"12",x2:"12",y1:"8",y2:"3",key:"1kfi7u"}],["line",{x1:"20",x2:"20",y1:"21",y2:"16",key:"1lhrwl"}],["line",{x1:"20",x2:"20",y1:"12",y2:"3",key:"16vvfq"}],["line",{x1:"2",x2:"6",y1:"14",y2:"14",key:"1uebub"}],["line",{x1:"10",x2:"14",y1:"8",y2:"8",key:"1yglbp"}],["line",{x1:"18",x2:"22",y1:"16",y2:"16",key:"1jxqpz"}]]);/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _o=re("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.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const vl=re("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Eg=re("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Tg=re("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.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Os=re("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.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const kl=re("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Lo=re("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.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Up=re("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.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const jg=re("Volume2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]);/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Rg=re("VolumeX",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]]);/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ts=re("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);class _g{constructor(){Uo(this,"ctx",null);Uo(this,"enabled",!0);const t=localStorage.getItem("retro_sound_enabled");this.enabled=t!==null?t==="true":!0}getContext(){if(!this.enabled)return null;if(!this.ctx){const t=window.AudioContext||window.webkitAudioContext;t&&(this.ctx=new t)}return this.ctx&&this.ctx.state==="suspended"&&this.ctx.resume().catch(()=>{}),this.ctx}isEnabled(){return this.enabled}toggle(){return this.enabled=!this.enabled,localStorage.setItem("retro_sound_enabled",String(this.enabled)),this.enabled&&this.playClick(),this.enabled}playClick(){const t=this.getContext();if(t)try{const n=t.createOscillator(),r=t.createGain();n.type="square",n.frequency.setValueAtTime(440,t.currentTime),n.frequency.exponentialRampToValueAtTime(880,t.currentTime+.08),r.gain.setValueAtTime(.1,t.currentTime),r.gain.exponentialRampToValueAtTime(.01,t.currentTime+.08),n.connect(r),r.connect(t.destination),n.start(),n.stop(t.currentTime+.08)}catch{}}playDrop(){const t=this.getContext();if(t)try{const n=t.createOscillator(),r=t.createGain();n.type="triangle",n.frequency.setValueAtTime(220,t.currentTime),n.frequency.exponentialRampToValueAtTime(110,t.currentTime+.12),r.gain.setValueAtTime(.2,t.currentTime),r.gain.exponentialRampToValueAtTime(.01,t.currentTime+.12),n.connect(r),r.connect(t.destination),n.start(),n.stop(t.currentTime+.12)}catch{}}playVictory(){const t=this.getContext();if(t)try{[392,523.25,659.25,783.99].forEach((r,s)=>{const i=t.createOscillator(),o=t.createGain();i.type="square",i.frequency.setValueAtTime(r,t.currentTime+s*.09),o.gain.setValueAtTime(.12,t.currentTime+s*.09),o.gain.exponentialRampToValueAtTime(.01,t.currentTime+s*.09+.15),i.connect(o),o.connect(t.destination),i.start(t.currentTime+s*.09),i.stop(t.currentTime+s*.09+.16)})}catch{}}playLock(){const t=this.getContext();if(t)try{const n=t.createOscillator(),r=t.createGain();n.type="sawtooth",n.frequency.setValueAtTime(320,t.currentTime),n.frequency.setValueAtTime(260,t.currentTime+.06),r.gain.setValueAtTime(.08,t.currentTime),r.gain.exponentialRampToValueAtTime(.01,t.currentTime+.14),n.connect(r),r.connect(t.destination),n.start(),n.stop(t.currentTime+.14)}catch{}}}const V=new _g,Eu="tautkan_saved_boards",Lg="retro_kanban_saved_boards",Si="tautkan_user_info",Mg="retro_kanban_user_info",Ni="tautkan_user_profile";function Ag(e){try{const t=document.cookie.match(new RegExp("(^| )"+e+"=([^;]+)"));if(t)return decodeURIComponent(t[2])}catch{}return null}function bl(e,t,n=365){try{const r=new Date(Date.now()+n*864e5).toUTCString();document.cookie=`${e}=${encodeURIComponent(t)}; expires=${r}; path=/; SameSite=Lax`}catch{}}function yr(){try{let e=localStorage.getItem(Eu);return e||(e=localStorage.getItem(Lg)),e?JSON.parse(e):[]}catch{return[]}}function $p(e){try{const t=yr(),n=e.role==="admin"?`#admin=${e.key}`:`#member=${e.key}`,r=`/b/${e.id}${n}`,s=t.filter(i=>i.id!==e.id);s.unshift({id:e.id,title:e.title||"Kanban Board",role:e.role,key:e.key,url:r,lastVisited:Date.now()}),localStorage.setItem(Eu,JSON.stringify(s.slice(0,20)))}catch(t){console.error("Failed to save board to localStorage:",t)}}function Dg(e){try{const n=yr().find(r=>r.id===e);if(n){if(n.key)return{key:n.key,role:n.role};if(n.url&&n.url.includes("#admin="))return{key:n.url.split("#admin=")[1].split("&")[0],role:"admin"};if(n.url&&n.url.includes("#member="))return{key:n.url.split("#member=")[1].split("&")[0],role:"member"}}}catch{}return null}function Ig(e){try{const t=yr().filter(n=>n.id!==e);localStorage.setItem(Eu,JSON.stringify(t))}catch{}}function Tu(){try{let o=localStorage.getItem(Si)||localStorage.getItem(Mg);if(o){const a=JSON.parse(o);if(a.userName&&a.userId)return bl(Ni,JSON.stringify(a)),a}}catch{}try{const o=Ag(Ni);if(o){const a=JSON.parse(o);if(a.userName&&a.userId)return localStorage.setItem(Si,JSON.stringify(a)),a}}catch{}const e=["Pixel","Swift","Nova","Cyber","Zenith","Vortex","Echo","Nexus","Solar","Pulse"],t=["Pilot","Maker","Dev","Voyager","Lead","Master","Engineer","Architect","Scout","Agent"],n=e[Math.floor(Math.random()*e.length)],r=t[Math.floor(Math.random()*t.length)],s=Math.floor(10+Math.random()*90),i={userId:"usr_"+Math.random().toString(36).substring(2,11),userName:`${n}${r}_${s}`};try{localStorage.setItem(Si,JSON.stringify(i)),bl(Ni,JSON.stringify(i))}catch{}return i}function Pg(e){const t=Tu();t.userName=e.trim()||t.userName;try{localStorage.setItem(Si,JSON.stringify(t)),bl(Ni,JSON.stringify(t)),window.dispatchEvent(new CustomEvent("user_profile_updated",{detail:t}))}catch{}return t}const Hp="tautkan_theme",Og="retro_kanban_theme";function ro(){try{const e=localStorage.getItem(Hp)||localStorage.getItem(Og);if(e==="dark"||e==="light")return e}catch{}return"light"}function Vp(e){const t=document.documentElement;e==="dark"?(t.classList.add("dark"),t.classList.remove("light")):(t.classList.remove("dark"),t.classList.add("light"));try{localStorage.setItem(Hp,e)}catch{}}function Bg(){const t=ro()==="dark"?"light":"dark";return Vp(t),t}const Kp="tautkan_view_mode";function js(){try{return localStorage.getItem(Kp)==="retro"}catch{return!1}}function zg(e){try{localStorage.setItem(Kp,e?"retro":"modern"),Wp(e)}catch{}}function Fg(){const t=!js();return zg(t),t}function Wp(e){const t=document.documentElement;e?(t.classList.add("retro-mode"),t.classList.remove("modern-mode")):(t.classList.remove("retro-mode"),t.classList.add("modern-mode"))}const so={id:{appName:"TautKan",appTagline:"Satu tautan untuk semua urusan.",appBadge:"AGILE KANBAN",lightMode:"Mode Terang",darkMode:"Mode Gelap",retroModeOn:"🕹️ 8-Bit Mode",retroModeOff:"✨ Modern Mode",muteAudio:"Matikan Suara Audio",unmuteAudio:"Nyalakan Suara Audio",changeName:"Ubah Nama Pengguna",superadmin:"Superadmin",member:"Anggota",roleSuperadminDesc:"Pemilik Papan (Akses Penuh)",roleMemberDesc:"Anggota Tim (Kolaborator)",heroBadge:"TANPA PASSWORD • TANPA EMAIL • 100% REAL-TIME",heroTitle:"Papan Kanban Real-Time Modern",heroSubtitle:"Kolaborasi manajemen proyek instan berbasis URL Fragment Hash. Tanpa registrasi akun, aman, cepat, dan terhubung secara langsung antar anggota tim.",createBoardHeader:"Buat Papan Kanban Baru",boardTitleLabel:"Judul Proyek / Papan",boardTitlePlaceholder:"Contoh: Pengembangan Fitur Sprint 1...",createBoardBtn:"Buat Papan Sekarang",creatingBoardBtn:"Sedang Membuat Papan...",rateLimitNote:"Batas: 5 papan per jam per IP",rbacNote:"Otorisasi Aman URL Fragment",savedBoardsTitle:"Papan Tersimpan",savedBoardsSub:"Riwayat tersimpan di browser Anda",noSavedBoards:"Belum ada papan yang tersimpan.",removeSaved:"Hapus dari daftar",onlineUsers:"Pengguna Online",shareInviteBtn:"Bagikan & Undang",rotateKeyBtn:"Putar Kunci Anggota",rotateKeyTooltip:"Regenerasi tautan anggota untuk mencabut akses lama",deleteBoardTooltip:"Hapus papan ini secara permanen",boardSettings:"Pengaturan Papan",autoMoveStaleSetting:"Otomatis kembalikan kartu macet (> batas jam) ke Backlog",backToHome:"Kembali ke Beranda",connectingToRealm:"Menghubungkan ke papan...",accessForbidden:"Akses Ditolak",accessForbiddenDesc:"Kunci otorisasi tidak valid atau sudah tidak berlaku.",reEnterKey:"Masukkan Kunci Kembali",boardLogsBtn:"Riwayat Log",activityLogTitle:"Riwayat Perpindahan & Log Aktivitas",noActivityLogs:"Belum ada riwayat pergerakan kartu yang tercatat.",addColumn:"Tambah Kolom",columnTitlePlaceholder:"Nama kolom (misal: QA Testing)...",addNewTask:"Tambah Tugas",taskTitlePlaceholder:"Tulis judul tugas...",enterToAdd:"Tekan Enter ↵ untuk simpan",cancel:"Batal",add:"Tambah",save:"Simpan",noTasksInCol:"Belum ada tugas di kolom ini",dragColTooltip:"Geser untuk mengatur urutan kolom",deleteColConfirm:"Hapus kolom ini beserta semua tugas di dalamnya?",editColSettings:"Pengaturan Kolom & WIP Limit",wipLimitLabel:"WIP Limit (Maksimal Kartu):",wipUnlimited:"0 = Tanpa Batas",autoStaleHoursLabel:"Batas Macet / Stale (Jam Inaktivitas):",wipLimitReached:"WIP Limit Tercapai",wipWarningModal:"Kolom ini telah mencapai batas kapasitas maksimum kartu (WIP Limit). Selesaikan tugas yang ada terlebih dahulu!",taskTitle:"Judul Tugas",taskDesc:"Deskripsi Tugas / Spesifikasi",taskDescPlaceholder:"Tuliskan rincian tugas, kriteria penerimaan, atau catatan penting...",priorityLabel:"Prioritas / Urgensi",tagsLabel:"Label / Tags (Tekan Enter)",tagsPlaceholder:"Contoh: FRONTEND, BUG, BACKEND...",assigneeLabel:"Penanggung Jawab (Assignee)",assigneePlaceholder:"Contoh: Budi Santoso",dueDateLabel:"Tenggat Waktu (Due Date)",subtasksLabel:"Checklist Sub-tugas",addSubtaskPlaceholder:"Tambah sub-tugas baru... (Enter)",blockedLabel:"Status Macet / Tertahan (Blocked)",markBlocked:"Tandai Sebagai Macet (Blocked)",blockedReasonLabel:"Alasan Kendala / Blocker:",blockedReasonPlaceholder:"Contoh: Menunggu API pihak ketiga selesai / Butuh approval...",staleIndicator:"Kartu Macet (Stale)",staleSince:"Tidak ada pergerakan selama",overdue:"Terlambat",dueToday:"Hari Ini",autoSaving:"Menyimpan otomatis...",synced:"Tersinkronisasi",isTypingTitle:"sedang mengetik judul tugas...",isTypingDesc:"sedang mengetik deskripsi...",isEditingGeneral:"sedang mengedit tugas ini...",deleteTask:"Hapus Tugas",close:"Tutup",deleteTaskConfirm:"Apakah Anda yakin ingin menghapus tugas ini?",cardMovementHistory:"Riwayat Perpindahan Kartu (Database Log)",prioLow:"Rendah",prioMedium:"Sedang",prioHigh:"Tinggi",prioUrgent:"Mendesak",boardCreatedTitle:"Papan TautKan Berhasil Dibuat!",boardName:"Nama Papan",adminLinkTitle:"Tautan Admin (Superadmin)",adminLinkWarning:"JANGAN BAGIKAN! HANYA UNTUK ANDA",adminLinkSavedNote:"Tautan ini tersimpan di browser Anda. Bookmark tautan ini untuk mengelola papan.",memberLinkTitle:"Tautan Undangan Anggota Tim",memberLinkBadge:"UNTUK REKAN TIM",copied:"Tersalin!",copy:"Salin",shareWhatsApp:"Bagikan ke WhatsApp / Aplikasi",enterBoardBtn:"Buka Papan Kanban",keyRotationTitle:"Rotasi Kunci Anggota",keyRotationSubtitle:"Buat Ulang Tautan Undangan Anggota Tim",keyRotationWarningTitle:"Peringatan: Menonaktifkan Tautan Lama!",keyRotationWarningDesc:"Membuat kunci anggota baru akan secara instan mencabut izin seluruh anggota yang menggunakan tautan lama dan memutuskan sesi mereka secara real-time.",regenerateBtn:"Buat Ulang Tautan",rotatingBtn:"Memproses...",newLinkActiveTitle:"Tautan Baru Berhasil Diaktifkan!",newLinkActiveDesc:"Tautan anggota lama telah dinonaktifkan. Bagikan tautan baru ini kepada rekan tim Anda:",done:"Selesai",keyPromptTitle:"Kunci Otorisasi Diperlukan",keyPromptDesc:"Papan ini terlindungi oleh URL Fragment Key. Silakan tempel tautan lengkap (#admin=... atau #member=...) atau kunci rahasia Anda di bawah ini.",keyPromptPlaceholder:"Tempel tautan #admin=... atau #member=... atau kunci Anda",unlockBoardBtn:"Buka Papan",keyPromptError:"Silakan masukkan kunci atau tautan undangan",sessionRevokedMsg:"Superadmin telah membuat ulang tautan anggota. Sesi Anda telah dihentikan.",movementFailed:"Gagal memindahkan kartu:",footerText:"TautKan • Satu tautan untuk semua urusan • Dual-Code URL Fragment Real-Time Agile"},en:{appName:"TautKan",appTagline:"One link to manage it all.",appBadge:"AGILE KANBAN",lightMode:"Light Mode",darkMode:"Dark Mode",retroModeOn:"🕹️ 8-Bit Mode",retroModeOff:"✨ Modern Mode",muteAudio:"Mute Audio",unmuteAudio:"Unmute Audio",changeName:"Change User Name",superadmin:"Superadmin",member:"Member",roleSuperadminDesc:"Board Owner (Full Access)",roleMemberDesc:"Team Member (Collaborator)",heroBadge:"ZERO PASSWORDS • ZERO EMAILS • 100% REAL-TIME",heroTitle:"Modern Real-Time Agile Kanban",heroSubtitle:"Instant project collaboration powered by URL Fragment Hashes. Zero sign-up required, ultra-secure, fast, and connected in real time.",createBoardHeader:"Create a New Kanban Board",boardTitleLabel:"Project / Board Title",boardTitlePlaceholder:"e.g. Sprint 1 - Core Feature Development...",createBoardBtn:"Create Board Now",creatingBoardBtn:"Creating Board...",rateLimitNote:"Limit: 5 boards/hour per IP",rbacNote:"Secure URL Fragment Key Auth",savedBoardsTitle:"Saved Boards",savedBoardsSub:"History stored securely in your browser",noSavedBoards:"No saved boards found.",removeSaved:"Remove from history",onlineUsers:"Online Teammates",shareInviteBtn:"Share & Invite",rotateKeyBtn:"Rotate Member Key",rotateKeyTooltip:"Regenerate member key and revoke all previous member links",deleteBoardTooltip:"Permanently delete this board",boardSettings:"Board Settings",autoMoveStaleSetting:"Automatically move stale cards (> threshold hours) back to Backlog",backToHome:"Back to Home",connectingToRealm:"Connecting to board realm...",accessForbidden:"Access Denied",accessForbiddenDesc:"The authorization key in this URL is invalid or has expired.",reEnterKey:"Re-Enter Key",boardLogsBtn:"Activity Logs",activityLogTitle:"Movement & Activity History",noActivityLogs:"No card movements logged yet.",addColumn:"Add Column",columnTitlePlaceholder:"Column name (e.g., QA Testing)...",addNewTask:"Add Task",taskTitlePlaceholder:"Write task title...",enterToAdd:"Press Enter ↵ to save",cancel:"Cancel",add:"Add",save:"Save",noTasksInCol:"No tasks in this column yet",dragColTooltip:"Drag to reorder column",deleteColConfirm:"Delete this column and all of its tasks?",editColSettings:"Column Settings & WIP Limit",wipLimitLabel:"WIP Limit (Max Cards):",wipUnlimited:"0 = Unlimited",autoStaleHoursLabel:"Stale Inactivity Limit (Hours):",wipLimitReached:"WIP Limit Reached",wipWarningModal:"This column has reached its maximum Work-In-Progress (WIP) limit. Please finish active tasks first!",taskTitle:"Task Title",taskDesc:"Task Description / Specs",taskDescPlaceholder:"Write specifications, acceptance criteria, or key implementation notes...",priorityLabel:"Priority / Urgency",tagsLabel:"Tags (Press Enter)",tagsPlaceholder:"e.g. FRONTEND, BUG, BACKEND...",assigneeLabel:"Assignee",assigneePlaceholder:"e.g. Alex Morgan",dueDateLabel:"Due Date",subtasksLabel:"Subtask Checklist",addSubtaskPlaceholder:"Add a new subtask... (Enter)",blockedLabel:"Blocker Status (Blocked)",markBlocked:"Mark as Blocked",blockedReasonLabel:"Blocker Explanation:",blockedReasonPlaceholder:"e.g. Waiting for 3rd-party API approval...",staleIndicator:"Stale Card",staleSince:"No movement for",overdue:"Overdue",dueToday:"Due Today",autoSaving:"Auto-saving...",synced:"Synced",isTypingTitle:"is typing title...",isTypingDesc:"is typing description...",isEditingGeneral:"is editing this task...",deleteTask:"Delete Task",close:"Close",deleteTaskConfirm:"Are you sure you want to delete this task?",cardMovementHistory:"Card Movement History (Database Log)",prioLow:"Low",prioMedium:"Medium",prioHigh:"High",prioUrgent:"Urgent",boardCreatedTitle:"TautKan Board Created!",boardName:"Board Name",adminLinkTitle:"Admin Key Link (Superadmin)",adminLinkWarning:"DO NOT SHARE! ADMIN ACCESS ONLY",adminLinkSavedNote:"This link is saved in your browser. Bookmark it to maintain management permissions.",memberLinkTitle:"Team Member Invite Link",memberLinkBadge:"FOR TEAMMATES",copied:"Copied!",copy:"Copy",shareWhatsApp:"Share via WhatsApp / Apps",enterBoardBtn:"Open Kanban Board",keyRotationTitle:"Member Key Rotation",keyRotationSubtitle:"Regenerate Team Member Invite Link",keyRotationWarningTitle:"Warning: Invalidates Old Links!",keyRotationWarningDesc:"Generating a new member key will immediately revoke access for all members using old links and disconnect active sessions in real time.",regenerateBtn:"Regenerate Link",rotatingBtn:"Rotating...",newLinkActiveTitle:"New Member Link Active!",newLinkActiveDesc:"Old member links have been successfully invalidated. Share this new link with your team:",done:"Done",keyPromptTitle:"Secret Key Required",keyPromptDesc:"This board is protected by a URL Fragment Key. Please paste your link (#admin=... or #member=...) or secret key below.",keyPromptPlaceholder:"Paste #admin=... or #member=... link or key",unlockBoardBtn:"Unlock Board",keyPromptError:"Please enter your key or invite link",sessionRevokedMsg:"The superadmin regenerated the member invite link. Your session has been revoked.",movementFailed:"Task movement failed:",footerText:"TautKan • One link to manage it all • Dual-Code URL Fragment Real-Time Agile"}},Ug={id:{...so.id,appBadge:"🕹️ 8-BIT RPG",superadmin:"OVERLORD / GUILD MASTER",member:"PARTY MEMBER",heroTitle:"QUEST REALM 8-BIT",heroSubtitle:"Bangun petualangan manajemen quest tim secara instan! Otorisasi URL Fragment Hash tanpa registrasi, chip-audio 8-bit, dan kolaborasi waktu nyata.",createBoardHeader:"FORGE QUEST REALM BARU",boardTitleLabel:"NAMA PETUALANGAN / REALM",boardTitlePlaceholder:"Contoh: SPRINT NETHERS / BOSS RAID...",createBoardBtn:"⚔️ FORGE REALM BARU",creatingBoardBtn:"FORGING REALM...",savedBoardsTitle:"REALM TERSIMPAN SAYA",onlineUsers:"PARTY ONLINE",shareInviteBtn:"📜 UNDANG GUILD",rotateKeyBtn:"🗝️ ROTASI KUNCI",boardLogsBtn:"📜 LOG QUEST",activityLogTitle:"GULUNGAN LOG RIWAYAT & PERGERAKAN QUEST",addColumn:"TAMBAH TAHAPAN QUEST",addNewTask:"TAMBAH QUEST",taskTitlePlaceholder:"Nama misi / quest...",taskTitle:"NAMA MISI / QUEST",taskDesc:"GULUNGAN DESKRIPSI & SPESIFIKASI",taskDescPlaceholder:"Tuliskan detail misi, item reward, atau catatan petualangan...",priorityLabel:"TINGKAT BAHAYA / URGENSI",prioLow:"WOOD (RENDAH)",prioMedium:"IRON (SEDANG)",prioHigh:"GOLD (TINGGI)",prioUrgent:"NETHERITE (MENDESAK)",subtasksLabel:"CHECKLIST SUB-QUEST",addSubtaskPlaceholder:"Tambah sub-quest baru... (Enter)",dueDateLabel:"TENGGAT WAKTU BOSS RAID",blockedLabel:"JEBAKAN / STATUS TERTAHAN (TRAPPED)",markBlocked:"🚩 TERKENA JEBAKAN (BLOCKED)",staleIndicator:"QUEST TERTIDUR (STALE)",wipLimitReached:"MANA WIP LIMIT PENUH",wipWarningModal:"Tahapan ini kehabisan Mana (WIP Limit Penuh)! Selesaikan quest yang aktif sebelum memulai quest baru.",cardMovementHistory:"GULUNGAN PERJALANAN QUEST (LOG DB)",footerText:"TautKan • 8-Bit Retro Mode • Satu tautan untuk semua urusan • Real-Time RPG Quest Board"},en:{...so.en,appBadge:"🕹️ 8-BIT RPG",superadmin:"OVERLORD / GUILD MASTER",member:"PARTY MEMBER",heroTitle:"8-BIT QUEST REALM",heroSubtitle:"Forge your team quest adventure instantly! URL Fragment Hash authorization, 8-bit chip audio, and real-time multiplayer board synchronization.",createBoardHeader:"FORGE NEW QUEST REALM",boardTitleLabel:"REALM / ADVENTURE NAME",boardTitlePlaceholder:"e.g. SPRINT NETHER / BOSS RAID...",createBoardBtn:"⚔️ FORGE REALM",creatingBoardBtn:"FORGING REALM...",savedBoardsTitle:"SAVED QUEST REALMS",onlineUsers:"PARTY ONLINE",shareInviteBtn:"📜 SUMMON PARTY",rotateKeyBtn:"🗝️ ROTATE KEY",boardLogsBtn:"📜 QUEST LOGS",activityLogTitle:"QUEST JOURNEY & ACTIVITY SCROLL",addColumn:"ADD QUEST STAGE",addNewTask:"ADD QUEST",taskTitlePlaceholder:"Quest / Mission name...",taskTitle:"QUEST / MISSION TITLE",taskDesc:"QUEST SCROLL & SPECIFICATIONS",taskDescPlaceholder:"Describe quest requirements, loot rewards, or tactical notes...",priorityLabel:"DANGER / URGENCY TIER",prioLow:"WOOD (LOW)",prioMedium:"IRON (MEDIUM)",prioHigh:"GOLD (HIGH)",prioUrgent:"NETHERITE (URGENT)",subtasksLabel:"SUB-QUEST CHECKLIST",addSubtaskPlaceholder:"Add new sub-quest... (Enter)",dueDateLabel:"BOSS RAID DUE DATE",blockedLabel:"TRAP / BLOCKED STATUS",markBlocked:"🚩 TRAPPED IN BLOCKER",staleIndicator:"DORMANT QUEST (STALE)",wipLimitReached:"MANA WIP LIMIT FULL",wipWarningModal:"This stage has reached its maximum Mana capacity (WIP Limit)! Finish ongoing quests first.",cardMovementHistory:"QUEST MOVEMENT SCROLL (DB LOG)",footerText:"TautKan • 8-Bit Retro Mode • One link to manage it all • Real-Time RPG Quest Board"}},Gp="tautkan_lang";function Qp(){try{const e=localStorage.getItem(Gp);if(e==="id"||e==="en")return e}catch{}return"id"}function $g(e){try{localStorage.setItem(Gp,e)}catch{}}function Rt(){const e=Qp(),t=js(),n=t?Ug[e]:so[e],r=so.id;return{t:i=>(n==null?void 0:n[i])||(r==null?void 0:r[i])||i,currentLang:e,isRetro:t}}const Hg=({onHomeClick:e,onLanguageChange:t,onThemeChange:n,onRetroModeChange:r})=>{const{t:s}=Rt(),[i,o]=y.useState(V.isEnabled()),[a,u]=y.useState(ro()),[c,h]=y.useState(Qp()),[d,f]=y.useState(js()),[k,N]=y.useState(Tu()),[w,S]=y.useState(!1),[m,p]=y.useState(k.userName);y.useEffect(()=>{const T=D=>{const I=D;I.detail&&(N(I.detail),p(I.detail.userName))};return window.addEventListener("user_profile_updated",T),()=>window.removeEventListener("user_profile_updated",T)},[]);const g=()=>{const T=V.toggle();o(T)},b=()=>{V.playClick();const T=Bg();u(T),n&&n(T)},j=()=>{V.playClick();const T=Fg();f(T),r&&r(T)},R=()=>{V.playClick();const T=c==="id"?"en":"id";$g(T),h(T),t&&t(T)},E=T=>{T&&T.preventDefault();const D=m.trim();if(D){const I=Pg(D);N(I),V.playClick()}S(!1)};return l.jsx("header",{className:"bg-white/95 dark:bg-[#090d18]/95 border-b border-slate-200 dark:border-slate-800/80 px-2.5 sm:px-4 py-2.5 sm:py-3 sticky top-0 z-40 backdrop-blur-md transition-colors duration-200",children:l.jsxs("div",{className:"max-w-7xl mx-auto flex items-center justify-between gap-2",children:[l.jsxs("div",{onClick:()=>{V.playClick(),e?e():window.location.href="/"},className:"flex items-center gap-2 sm:gap-3 cursor-pointer group select-none shrink-0",children:[l.jsx("div",{className:"w-8 h-8 sm:w-9 sm:h-9 bg-gradient-to-br from-indigo-500 to-cyan-500 rounded-lg flex items-center justify-center shadow-md shadow-indigo-500/20 group-hover:scale-105 transition-all",children:l.jsx(Bp,{size:18,className:"text-white stroke-[2.5]"})}),l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsxs("h1",{className:"text-sm sm:text-base md:text-lg font-bold text-slate-900 dark:text-white tracking-tight",children:["Taut",l.jsx("span",{className:"text-indigo-600 dark:text-indigo-400",children:"Kan"})]}),l.jsx("span",{className:"text-[9px] sm:text-[10px] bg-indigo-50 dark:bg-indigo-500/10 text-indigo-700 dark:text-indigo-300 border border-indigo-200 dark:border-indigo-500/30 px-1.5 sm:px-2 py-0.5 rounded-full font-medium hidden xs:inline-block",children:s("appBadge")})]}),l.jsx("p",{className:"text-[10px] sm:text-[11px] text-slate-500 dark:text-slate-400 hidden md:block",children:s("appTagline")})]})]}),l.jsxs("div",{className:"flex items-center gap-1 sm:gap-2",children:[l.jsx("div",{className:"relative",children:w?l.jsxs("form",{onSubmit:E,className:"flex items-center gap-1",children:[l.jsx("input",{type:"text",maxLength:18,value:m,onChange:T=>p(T.target.value),onKeyDown:T=>{T.key==="Escape"&&(p(k.userName),S(!1))},className:"bg-white dark:bg-slate-900 border border-indigo-500 text-slate-900 dark:text-indigo-300 text-xs px-2 py-1 rounded-md outline-none w-24 sm:w-36",autoFocus:!0}),l.jsx("button",{type:"submit",className:"bg-indigo-600 hover:bg-indigo-500 text-white text-[10px] font-bold px-2 py-1.5 rounded-md shadow-sm",children:"OK"})]}):l.jsxs("button",{onClick:()=>{V.playClick(),p(k.userName),S(!0)},className:"flex items-center gap-1 bg-slate-100 dark:bg-slate-900/90 border border-slate-200 dark:border-slate-800 px-2 py-1.5 text-xs text-slate-700 dark:text-slate-200 rounded-lg hover:border-indigo-500 transition-all",title:s("changeName"),children:[l.jsx(Lo,{size:12,className:"text-indigo-600 dark:text-indigo-400 shrink-0"}),l.jsx("span",{className:"max-w-[50px] xs:max-w-[70px] sm:max-w-[120px] truncate text-[11px] font-medium",children:k.userName}),l.jsx("span",{className:"text-[9px] text-slate-400",children:"✏️"})]})}),l.jsxs("button",{onClick:j,className:`flex items-center gap-1 px-2 py-1.5 text-xs font-medium rounded-lg transition-all border ${d?"bg-purple-100 dark:bg-purple-900/70 border-purple-300 dark:border-purple-400 text-purple-900 dark:text-purple-200 shadow-sm":"bg-slate-100 dark:bg-slate-900/90 border-slate-200 dark:border-slate-800 text-slate-700 dark:text-slate-300 hover:border-purple-400 hover:text-purple-600 dark:hover:text-purple-300"}`,title:"Toggle 8-Bit Retro RPG Mode",children:[d?l.jsx(_o,{size:12,className:"text-purple-600 dark:text-purple-300"}):l.jsx(vg,{size:12,className:"text-purple-600 dark:text-purple-400"}),l.jsx("span",{className:"hidden sm:inline-block font-semibold text-[11px]",children:d?"✨ Modern":"🕹️ 8-Bit"})]}),l.jsxs("button",{onClick:R,className:"flex items-center gap-0.5 bg-slate-100 dark:bg-slate-900/90 border border-slate-200 dark:border-slate-800 px-2 py-1.5 text-[11px] font-medium text-slate-700 dark:text-slate-200 rounded-lg hover:border-indigo-500 transition-all",title:"Switch Language / Ganti Bahasa",children:[l.jsx(kg,{size:12,className:"text-slate-500 dark:text-slate-400"}),l.jsx("span",{children:c==="id"?"ID":"EN"})]}),l.jsx("button",{onClick:b,className:"p-1.5 sm:p-2 border border-slate-200 dark:border-slate-800 bg-slate-100 dark:bg-slate-900/90 text-slate-700 dark:text-slate-300 rounded-lg hover:border-amber-400 transition-all",title:s(a==="dark"?"lightMode":"darkMode"),children:a==="dark"?l.jsx(Tg,{size:13,className:"text-amber-400"}):l.jsx(Ng,{size:13,className:"text-indigo-600"})}),l.jsx("button",{onClick:g,className:`p-1.5 sm:p-2 border rounded-lg transition-all ${i?"bg-indigo-50 dark:bg-indigo-500/15 border-indigo-200 dark:border-indigo-500/40 text-indigo-600 dark:text-indigo-400":"bg-slate-100 dark:bg-slate-900/90 border-slate-200 dark:border-slate-800 text-slate-400 dark:text-slate-500"}`,title:s(i?"muteAudio":"unmuteAudio"),children:i?l.jsx(jg,{size:13}):l.jsx(Rg,{size:13})})]})]})})};async function Vg(e){const t=await fetch("/api/boards",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:e})});if(!t.ok){const n=await t.json().catch(()=>({}));throw new Error(n.message||n.error||"Failed to forge board")}return t.json()}async function Kg(e,t){const n=await fetch(`/api/boards/${e}`,{method:"GET",headers:{Authorization:`Bearer ${t}`}});if(!n.ok){const r=await n.json().catch(()=>({}));throw new Error(r.message||r.error||"Failed to enter board")}return n.json()}async function Wg(e,t,n=50){const r=await fetch(`/api/boards/${e}/activity?limit=${n}`,{method:"GET",headers:{Authorization:`Bearer ${t}`}});if(!r.ok){const s=await r.json().catch(()=>({}));throw new Error(s.message||s.error||"Failed to fetch board activity")}return r.json()}async function Gg(e,t,n){const r=await fetch(`/api/boards/${e}/tickets/${t}/activity`,{method:"GET",headers:{Authorization:`Bearer ${n}`}});if(!r.ok){const s=await r.json().catch(()=>({}));throw new Error(s.message||s.error||"Failed to fetch ticket activity")}return r.json()}async function Qg(e,t){const n=await fetch(`/api/boards/${e}/rotate-member-key`,{method:"POST",headers:{Authorization:`Bearer ${t}`}});if(!n.ok){const r=await n.json().catch(()=>({}));throw new Error(r.message||r.error||"Failed to rotate member key")}return n.json()}async function qg(e,t){const n=await fetch(`/api/boards/${e}`,{method:"DELETE",headers:{Authorization:`Bearer ${t}`}});if(!n.ok){const r=await n.json().catch(()=>({}));throw new Error(r.message||r.error||"Failed to delete board")}}var ju={};(function e(t,n,r,s){var i=!!(t.Worker&&t.Blob&&t.Promise&&t.OffscreenCanvas&&t.OffscreenCanvasRenderingContext2D&&t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype.transferControlToOffscreen&&t.URL&&t.URL.createObjectURL),o=typeof Path2D=="function"&&typeof DOMMatrix=="function",a=function(){if(!t.OffscreenCanvas)return!1;try{var v=new OffscreenCanvas(1,1),x=v.getContext("2d");x.fillRect(0,0,1,1);var _=v.transferToImageBitmap();x.createPattern(_,"no-repeat")}catch{return!1}return!0}();function u(){}function c(v){var x=n.exports.Promise,_=x!==void 0?x:t.Promise;return typeof _=="function"?new _(v):(v(u,u),null)}var h=function(v,x){return{transform:function(_){if(v)return _;if(x.has(_))return x.get(_);var B=new OffscreenCanvas(_.width,_.height),K=B.getContext("2d");return K.drawImage(_,0,0),x.set(_,B),B},clear:function(){x.clear()}}}(a,new Map),d=function(){var v=Math.floor(16.666666666666668),x,_,B={},K=0;return typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"?(x=function(q){var F=Math.random();return B[F]=requestAnimationFrame(function $(J){K===J||K+v-1<J?(K=J,delete B[F],q()):B[F]=requestAnimationFrame($)}),F},_=function(q){B[q]&&cancelAnimationFrame(B[q])}):(x=function(q){return setTimeout(q,v)},_=function(q){return clearTimeout(q)}),{frame:x,cancel:_}}(),f=function(){var v,x,_={};function B(K){function q(F,$){K.postMessage({options:F||{},callback:$})}K.init=function($){var J=$.transferControlToOffscreen();K.postMessage({canvas:J},[J])},K.fire=function($,J,ne){if(x)return q($,null),x;var Q=Math.random().toString(36).slice(2);return x=c(function(ae){function se(he){he.data.callback===Q&&(delete _[Q],K.removeEventListener("message",se),x=null,h.clear(),ne(),ae())}K.addEventListener("message",se),q($,Q),_[Q]=se.bind(null,{data:{callback:Q}})}),x},K.reset=function(){K.postMessage({reset:!0});for(var $ in _)_[$](),delete _[$]}}return function(){if(v)return v;if(!r&&i){var K=["var CONFETTI, SIZE = {}, module = {};","("+e.toString()+")(this, module, true, SIZE);","onmessage = function(msg) {"," if (msg.data.options) {"," CONFETTI(msg.data.options).then(function () {"," if (msg.data.callback) {"," postMessage({ callback: msg.data.callback });"," }"," });"," } else if (msg.data.reset) {"," CONFETTI && CONFETTI.reset();"," } else if (msg.data.resize) {"," SIZE.width = msg.data.resize.width;"," SIZE.height = msg.data.resize.height;"," } else if (msg.data.canvas) {"," SIZE.width = msg.data.canvas.width;"," SIZE.height = msg.data.canvas.height;"," CONFETTI = module.exports.create(msg.data.canvas);"," }","}"].join(`
`);try{v=new Worker(URL.createObjectURL(new Blob([K])))}catch(q){return typeof console<"u"&&typeof console.warn=="function"&&console.warn("🎊 Could not load worker",q),null}B(v)}return v}}(),k={particleCount:50,angle:90,spread:45,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,x:.5,y:.5,shapes:["square","circle"],zIndex:100,colors:["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],disableForReducedMotion:!1,scalar:1};function N(v,x){return x?x(v):v}function w(v){return v!=null}function S(v,x,_){return N(v&&w(v[x])?v[x]:k[x],_)}function m(v){return v<0?0:Math.floor(v)}function p(v,x){return Math.floor(Math.random()*(x-v))+v}function g(v){return parseInt(v,16)}function b(v){return v.map(j)}function j(v){var x=String(v).replace(/[^0-9a-f]/gi,"");return x.length<6&&(x=x[0]+x[0]+x[1]+x[1]+x[2]+x[2]),{r:g(x.substring(0,2)),g:g(x.substring(2,4)),b:g(x.substring(4,6))}}function R(v){var x=S(v,"origin",Object);return x.x=S(x,"x",Number),x.y=S(x,"y",Number),x}function E(v){v.width=document.documentElement.clientWidth,v.height=document.documentElement.clientHeight}function T(v){var x=v.getBoundingClientRect();v.width=x.width,v.height=x.height}function D(v){var x=document.createElement("canvas");return x.style.position="fixed",x.style.top="0px",x.style.left="0px",x.style.pointerEvents="none",x.style.zIndex=v,x}function I(v,x,_,B,K,q,F,$,J){v.save(),v.translate(x,_),v.rotate(q),v.scale(B,K),v.arc(0,0,1,F,$,J),v.restore()}function X(v){var x=v.angle*(Math.PI/180),_=v.spread*(Math.PI/180);return{x:v.x,y:v.y,wobble:Math.random()*10,wobbleSpeed:Math.min(.11,Math.random()*.1+.05),velocity:v.startVelocity*.5+Math.random()*v.startVelocity,angle2D:-x+(.5*_-Math.random()*_),tiltAngle:(Math.random()*(.75-.25)+.25)*Math.PI,color:v.color,shape:v.shape,tick:0,totalTicks:v.ticks,decay:v.decay,drift:v.drift,random:Math.random()+2,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:v.gravity*3,ovalScalar:.6,scalar:v.scalar,flat:v.flat}}function we(v,x){x.x+=Math.cos(x.angle2D)*x.velocity+x.drift,x.y+=Math.sin(x.angle2D)*x.velocity+x.gravity,x.velocity*=x.decay,x.flat?(x.wobble=0,x.wobbleX=x.x+10*x.scalar,x.wobbleY=x.y+10*x.scalar,x.tiltSin=0,x.tiltCos=0,x.random=1):(x.wobble+=x.wobbleSpeed,x.wobbleX=x.x+10*x.scalar*Math.cos(x.wobble),x.wobbleY=x.y+10*x.scalar*Math.sin(x.wobble),x.tiltAngle+=.1,x.tiltSin=Math.sin(x.tiltAngle),x.tiltCos=Math.cos(x.tiltAngle),x.random=Math.random()+2);var _=x.tick++/x.totalTicks,B=x.x+x.random*x.tiltCos,K=x.y+x.random*x.tiltSin,q=x.wobbleX+x.random*x.tiltCos,F=x.wobbleY+x.random*x.tiltSin;if(v.fillStyle="rgba("+x.color.r+", "+x.color.g+", "+x.color.b+", "+(1-_)+")",v.beginPath(),o&&x.shape.type==="path"&&typeof x.shape.path=="string"&&Array.isArray(x.shape.matrix))v.fill(ge(x.shape.path,x.shape.matrix,x.x,x.y,Math.abs(q-B)*.1,Math.abs(F-K)*.1,Math.PI/10*x.wobble));else if(x.shape.type==="bitmap"){var $=Math.PI/10*x.wobble,J=Math.abs(q-B)*.1,ne=Math.abs(F-K)*.1,Q=x.shape.bitmap.width*x.scalar,ae=x.shape.bitmap.height*x.scalar,se=new DOMMatrix([Math.cos($)*J,Math.sin($)*J,-Math.sin($)*ne,Math.cos($)*ne,x.x,x.y]);se.multiplySelf(new DOMMatrix(x.shape.matrix));var he=v.createPattern(h.transform(x.shape.bitmap),"no-repeat");he.setTransform(se),v.globalAlpha=1-_,v.fillStyle=he,v.fillRect(x.x-Q/2,x.y-ae/2,Q,ae),v.globalAlpha=1}else if(x.shape==="circle")v.ellipse?v.ellipse(x.x,x.y,Math.abs(q-B)*x.ovalScalar,Math.abs(F-K)*x.ovalScalar,Math.PI/10*x.wobble,0,2*Math.PI):I(v,x.x,x.y,Math.abs(q-B)*x.ovalScalar,Math.abs(F-K)*x.ovalScalar,Math.PI/10*x.wobble,0,2*Math.PI);else if(x.shape==="star")for(var ee=Math.PI/2*3,ve=4*x.scalar,_e=8*x.scalar,Ue=x.x,P=x.y,U=5,z=Math.PI/U;U--;)Ue=x.x+Math.cos(ee)*_e,P=x.y+Math.sin(ee)*_e,v.lineTo(Ue,P),ee+=z,Ue=x.x+Math.cos(ee)*ve,P=x.y+Math.sin(ee)*ve,v.lineTo(Ue,P),ee+=z;else v.moveTo(Math.floor(x.x),Math.floor(x.y)),v.lineTo(Math.floor(x.wobbleX),Math.floor(K)),v.lineTo(Math.floor(q),Math.floor(F)),v.lineTo(Math.floor(B),Math.floor(x.wobbleY));return v.closePath(),v.fill(),x.tick<x.totalTicks}function me(v,x,_,B,K){var q=x.slice(),F=v.getContext("2d"),$,J,ne=c(function(Q){function ae(){$=J=null,F.clearRect(0,0,B.width,B.height),h.clear(),K(),Q()}function se(){r&&!(B.width===s.width&&B.height===s.height)&&(B.width=v.width=s.width,B.height=v.height=s.height),!B.width&&!B.height&&(_(v),B.width=v.width,B.height=v.height),F.clearRect(0,0,B.width,B.height),q=q.filter(function(he){return we(F,he)}),q.length?$=d.frame(se):ae()}$=d.frame(se),J=ae});return{addFettis:function(Q){return q=q.concat(Q),ne},canvas:v,promise:ne,reset:function(){$&&d.cancel($),J&&J()}}}function Re(v,x){var _=!v,B=!!S(x||{},"resize"),K=!1,q=S(x,"disableForReducedMotion",Boolean),F=i&&!!S(x||{},"useWorker"),$=F?f():null,J=_?E:T,ne=v&&$?!!v.__confetti_initialized:!1,Q=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion)").matches,ae;function se(ee,ve,_e){for(var Ue=S(ee,"particleCount",m),P=S(ee,"angle",Number),U=S(ee,"spread",Number),z=S(ee,"startVelocity",Number),oe=S(ee,"decay",Number),C=S(ee,"gravity",Number),H=S(ee,"drift",Number),Y=S(ee,"colors",b),M=S(ee,"ticks",Number),G=S(ee,"shapes"),te=S(ee,"scalar"),ce=!!S(ee,"flat"),Z=R(ee),Se=Ue,de=[],ln=v.width*Z.x,In=v.height*Z.y;Se--;)de.push(X({x:ln,y:In,angle:P,spread:U,startVelocity:z,color:Y[Se%Y.length],shape:G[p(0,G.length)],ticks:M,decay:oe,gravity:C,drift:H,scalar:te,flat:ce}));return ae?ae.addFettis(de):(ae=me(v,de,J,ve,_e),ae.promise)}function he(ee){var ve=q||S(ee,"disableForReducedMotion",Boolean),_e=S(ee,"zIndex",Number);if(ve&&Q)return c(function(z){z()});_&&ae?v=ae.canvas:_&&!v&&(v=D(_e),document.body.appendChild(v)),B&&!ne&&J(v);var Ue={width:v.width,height:v.height};$&&!ne&&$.init(v),ne=!0,$&&(v.__confetti_initialized=!0);function P(){if($){var z={getBoundingClientRect:function(){if(!_)return v.getBoundingClientRect()}};J(z),$.postMessage({resize:{width:z.width,height:z.height}});return}Ue.width=Ue.height=null}function U(){ae=null,B&&(K=!1,t.removeEventListener("resize",P)),_&&v&&(document.body.contains(v)&&document.body.removeChild(v),v=null,ne=!1)}return B&&!K&&(K=!0,t.addEventListener("resize",P,!1)),$?$.fire(ee,Ue,U):se(ee,Ue,U)}return he.reset=function(){$&&$.reset(),ae&&ae.reset()},he}var et;function Fe(){return et||(et=Re(null,{useWorker:!0,resize:!0})),et}function ge(v,x,_,B,K,q,F){var $=new Path2D(v),J=new Path2D;J.addPath($,new DOMMatrix(x));var ne=new Path2D;return ne.addPath(J,new DOMMatrix([Math.cos(F)*K,Math.sin(F)*K,-Math.sin(F)*q,Math.cos(F)*q,_,B])),ne}function A(v){if(!o)throw new Error("path confetti are not supported in this browser");var x,_;typeof v=="string"?x=v:(x=v.path,_=v.matrix);var B=new Path2D(x),K=document.createElement("canvas"),q=K.getContext("2d");if(!_){for(var F=1e3,$=F,J=F,ne=0,Q=0,ae,se,he=0;he<F;he+=2)for(var ee=0;ee<F;ee+=2)q.isPointInPath(B,he,ee,"nonzero")&&($=Math.min($,he),J=Math.min(J,ee),ne=Math.max(ne,he),Q=Math.max(Q,ee));ae=ne-$,se=Q-J;var ve=10,_e=Math.min(ve/ae,ve/se);_=[_e,0,0,_e,-Math.round(ae/2+$)*_e,-Math.round(se/2+J)*_e]}return{type:"path",path:x,matrix:_}}function W(v){var x,_=1,B="#000000",K='"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif';typeof v=="string"?x=v:(x=v.text,_="scalar"in v?v.scalar:_,K="fontFamily"in v?v.fontFamily:K,B="color"in v?v.color:B);var q=10*_,F=""+q+"px "+K,$=new OffscreenCanvas(q,q),J=$.getContext("2d");J.font=F;var ne=J.measureText(x),Q=Math.ceil(ne.actualBoundingBoxRight+ne.actualBoundingBoxLeft),ae=Math.ceil(ne.actualBoundingBoxAscent+ne.actualBoundingBoxDescent),se=2,he=ne.actualBoundingBoxLeft+se,ee=ne.actualBoundingBoxAscent+se;Q+=se+se,ae+=se+se,$=new OffscreenCanvas(Q,ae),J=$.getContext("2d"),J.font=F,J.fillStyle=B,J.fillText(x,he,ee);var ve=1/_;return{type:"bitmap",bitmap:$.transferToImageBitmap(),matrix:[ve,0,0,ve,-Q*ve/2,-ae*ve/2]}}n.exports=function(){return Fe().apply(this,arguments)},n.exports.reset=function(){Fe().reset()},n.exports.create=Re,n.exports.shapeFromPath=A,n.exports.shapeFromText=W})(function(){return typeof window<"u"?window:typeof self<"u"?self:this||{}}(),ju,!1);const Yg=ju.exports;ju.exports.create;const qp=({boardData:e,onEnterBoard:t})=>{const{t:n}=Rt(),[r,s]=y.useState(!1),[i,o]=y.useState(!1),a=`${window.location.origin}${e.adminUrlFragment}`,u=`${window.location.origin}${e.memberUrlFragment}`;y.useEffect(()=>{V.playVictory();try{Yg({particleCount:70,spread:60,origin:{y:.6},colors:["#10b981","#f59e0b","#06b6d4","#8b5cf6"]})}catch{}},[]);const c=async(d,f)=>{V.playClick();try{await navigator.clipboard.writeText(d),f==="admin"?(s(!0),setTimeout(()=>s(!1),2500)):(o(!0),setTimeout(()=>o(!1),2500))}catch(k){console.error("Failed to copy link:",k)}},h=async()=>{if(V.playClick(),typeof navigator<"u"&&navigator.share)try{await navigator.share({title:`TautKan Board: ${e.title}`,text:`Bergabung di papan Agile TautKan: ${e.title}`,url:u})}catch(d){d.name!=="AbortError"&&console.error("Error sharing:",d)}else c(u,"member")};return l.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-3 sm:p-4 bg-slate-950/70 backdrop-blur-md animate-fade-in",children:l.jsxs("div",{className:"bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-2xl shadow-2xl max-w-xl w-full p-4 sm:p-7 relative overflow-hidden text-slate-900 dark:text-slate-100 max-h-[92vh] overflow-y-auto",children:[l.jsxs("div",{className:"text-center mb-5 sm:mb-6",children:[l.jsx("div",{className:"w-10 h-10 sm:w-12 sm:h-12 bg-emerald-50 dark:bg-emerald-500/10 border border-emerald-200 dark:border-emerald-500/30 rounded-2xl mx-auto flex items-center justify-center mb-2.5 text-emerald-600 dark:text-emerald-400",children:l.jsx(_o,{size:22})}),l.jsx("h2",{className:"text-base sm:text-lg md:text-xl font-bold text-slate-900 dark:text-white tracking-tight",children:n("boardCreatedTitle")}),l.jsxs("p",{className:"text-xs text-slate-500 dark:text-slate-400 mt-1",children:[n("boardName"),": ",l.jsx("span",{className:"font-semibold text-indigo-600 dark:text-emerald-400",children:e.title})]})]}),l.jsxs("div",{className:"space-y-3.5 text-xs",children:[l.jsxs("div",{className:"bg-amber-50/70 dark:bg-slate-950/70 border border-amber-200 dark:border-amber-500/30 p-3.5 sm:p-4 rounded-xl",children:[l.jsxs("div",{className:"flex items-center justify-between mb-2",children:[l.jsxs("span",{className:"font-semibold text-amber-800 dark:text-amber-400 flex items-center gap-1.5 text-xs",children:[l.jsx(Op,{size:14,className:"text-amber-600 dark:text-amber-400 shrink-0"}),l.jsx("span",{children:n("adminLinkTitle")})]}),l.jsx("span",{className:"text-[9px] sm:text-[10px] font-semibold bg-amber-100 dark:bg-amber-500/15 text-amber-800 dark:text-amber-300 border border-amber-300 dark:border-amber-500/30 px-2 py-0.5 rounded-full",children:n("adminLinkWarning")})]}),l.jsxs("div",{className:"flex items-center gap-1.5 sm:gap-2 mt-2",children:[l.jsx("input",{type:"text",readOnly:!0,value:a,className:"bg-white dark:bg-slate-900 border border-slate-300 dark:border-slate-800 text-slate-800 dark:text-slate-300 font-mono text-[11px] sm:text-xs p-2 sm:p-2.5 rounded-lg flex-1 select-all outline-none truncate"}),l.jsxs("button",{onClick:()=>c(a,"admin"),className:`btn-modern ${r?"bg-emerald-500 text-slate-950":"btn-modern-gold"} py-2 px-2.5 sm:px-3 text-xs shrink-0`,children:[r?l.jsx(ml,{size:13}):l.jsx(gl,{size:13}),l.jsx("span",{children:n(r?"copied":"copy")})]})]}),l.jsxs("p",{className:"text-[10px] sm:text-[11px] text-amber-800 dark:text-amber-300/80 mt-2 flex items-center gap-1",children:[l.jsx(Ro,{size:12,className:"text-amber-600 dark:text-amber-400 shrink-0"}),l.jsx("span",{children:n("adminLinkSavedNote")})]})]}),l.jsxs("div",{className:"bg-emerald-50/70 dark:bg-slate-950/70 border border-emerald-200 dark:border-emerald-500/30 p-3.5 sm:p-4 rounded-xl",children:[l.jsxs("div",{className:"flex items-center justify-between mb-2",children:[l.jsxs("span",{className:"font-semibold text-emerald-800 dark:text-emerald-400 flex items-center gap-1.5 text-xs",children:[l.jsx(Up,{size:14,className:"text-emerald-600 dark:text-emerald-400 shrink-0"}),l.jsx("span",{children:n("memberLinkTitle")})]}),l.jsx("span",{className:"text-[9px] sm:text-[10px] font-semibold bg-emerald-100 dark:bg-emerald-500/15 text-emerald-800 dark:text-emerald-300 border border-emerald-300 dark:border-emerald-500/30 px-2 py-0.5 rounded-full",children:n("memberLinkBadge")})]}),l.jsxs("div",{className:"flex items-center gap-1.5 sm:gap-2 mt-2",children:[l.jsx("input",{type:"text",readOnly:!0,value:u,className:"bg-white dark:bg-slate-900 border border-slate-300 dark:border-slate-800 text-slate-800 dark:text-slate-300 font-mono text-[11px] sm:text-xs p-2 sm:p-2.5 rounded-lg flex-1 select-all outline-none truncate"}),l.jsxs("button",{onClick:()=>c(u,"member"),className:`btn-modern ${i?"bg-emerald-500 text-slate-950":"btn-modern-primary"} py-2 px-2.5 sm:px-3 text-xs shrink-0`,children:[i?l.jsx(ml,{size:13}):l.jsx(gl,{size:13}),l.jsx("span",{children:n(i?"copied":"copy")})]})]}),l.jsx("div",{className:"mt-2.5",children:l.jsxs("button",{onClick:h,className:"btn-modern w-full bg-cyan-50 dark:bg-cyan-500/15 hover:bg-cyan-100 dark:hover:bg-cyan-500/25 text-cyan-800 dark:text-cyan-300 border border-cyan-300 dark:border-cyan-500/40 flex items-center justify-center gap-2 py-2 text-xs font-semibold",children:[l.jsx(Fp,{size:13}),l.jsx("span",{children:n("shareWhatsApp")})]})})]})]}),l.jsx("div",{className:"mt-5 sm:mt-6 flex justify-end",children:l.jsxs("button",{onClick:()=>{V.playClick(),t()},className:"btn-modern-primary w-full sm:w-auto flex items-center justify-center gap-2 text-xs py-2.5 px-6 font-bold shadow-md",children:[l.jsx("span",{children:n("enterBoardBtn")}),l.jsx(hl,{size:15})]})})]})})},Xg=({onOpenBoard:e})=>{const{t}=Rt(),[n,r]=y.useState(""),[s,i]=y.useState(!1),[o,a]=y.useState(null),[u,c]=y.useState(null),[h,d]=y.useState([]);y.useEffect(()=>{d(yr())},[]);const f=async S=>{S.preventDefault(),V.playClick(),i(!0),a(null);try{const m=await Vg(n.trim()||"Sprint Agile Board");c(m),$p({id:m.id,title:m.title,role:"admin",key:m.adminKey}),d(yr())}catch(m){a(m.message||"Failed to create board"),V.playLock()}finally{i(!1)}},k=S=>{V.playClick();let m="";S.url&&S.url.includes("#")?m="#"+S.url.split("#")[1]:S.key&&(m=S.role==="admin"?`#admin=${S.key}`:`#member=${S.key}`),e(S.id,m)},N=(S,m)=>{S.stopPropagation(),V.playClick(),Ig(m),d(yr())},w=()=>{u&&(window.location.hash=`admin=${u.adminKey}`,e(u.id,`#admin=${u.adminKey}`))};return l.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-8 md:py-14",children:[l.jsxs("div",{className:"text-center mb-10 md:mb-12",children:[l.jsxs("div",{className:"inline-flex items-center gap-2 bg-indigo-50 dark:bg-indigo-500/10 border border-indigo-200 dark:border-indigo-500/25 text-indigo-700 dark:text-indigo-300 text-xs px-3.5 py-1.5 rounded-full mb-4 shadow-sm",children:[l.jsx(_o,{size:14,className:"text-indigo-600 dark:text-indigo-400"}),l.jsx("span",{className:"font-semibold tracking-wide",children:t("heroBadge")})]}),l.jsxs("h1",{className:"text-3xl md:text-5xl font-extrabold text-slate-900 dark:text-white tracking-tight mb-4 leading-tight",children:["Taut",l.jsx("span",{className:"text-indigo-600 dark:text-indigo-400",children:"Kan"})," ",l.jsx("br",{}),l.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-indigo-600 via-purple-600 to-cyan-600 dark:from-indigo-400 dark:via-purple-300 dark:to-cyan-400 text-2xl md:text-4xl font-bold",children:t("heroTitle")})]}),l.jsx("p",{className:"text-slate-600 dark:text-slate-300 text-sm md:text-base max-w-xl mx-auto leading-relaxed",children:t("heroSubtitle")})]}),l.jsxs("div",{className:"card-kanban p-6 md:p-8 mb-10 relative overflow-hidden",children:[l.jsx("div",{className:"absolute -top-12 -right-12 w-48 h-48 bg-indigo-500/10 rounded-full blur-3xl pointer-events-none"}),l.jsxs("h2",{className:"text-base md:text-lg font-bold text-slate-900 dark:text-white mb-4 flex items-center gap-2.5",children:[l.jsx(Pp,{size:20,className:"text-indigo-600 dark:text-indigo-400"}),l.jsx("span",{children:t("createBoardHeader")})]}),o&&l.jsxs("div",{className:"bg-rose-50 dark:bg-rose-950/70 border border-rose-200 dark:border-rose-500/50 p-3.5 mb-5 text-xs text-rose-700 dark:text-rose-200 rounded-lg flex items-center gap-2.5",children:[l.jsx(Ro,{size:16,className:"text-rose-600 dark:text-rose-400 shrink-0"}),l.jsx("span",{children:o})]}),l.jsxs("form",{onSubmit:f,className:"space-y-4",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs font-semibold text-slate-700 dark:text-slate-300 mb-2",children:t("boardTitleLabel")}),l.jsx("input",{type:"text",value:n,onChange:S=>r(S.target.value),placeholder:t("boardTitlePlaceholder"),className:"w-full bg-slate-50 dark:bg-[#080c18] border border-slate-300 dark:border-slate-800 focus:border-indigo-500 text-slate-900 dark:text-white text-sm p-3.5 rounded-lg outline-none transition-colors"})]}),l.jsx("div",{className:"pt-2",children:l.jsx("button",{type:"submit",disabled:s,className:"btn-modern-primary w-full py-3.5 text-sm flex items-center justify-center gap-2 font-bold shadow-md shadow-indigo-600/25",children:s?l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin"}),l.jsx("span",{children:t("creatingBoardBtn")})]}):l.jsxs(l.Fragment,{children:[l.jsx(Bp,{size:16}),l.jsx("span",{children:t("createBoardBtn")}),l.jsx(hl,{size:16})]})})})]}),l.jsxs("div",{className:"mt-4 flex flex-wrap items-center justify-between text-xs text-slate-500 dark:text-slate-400 gap-2",children:[l.jsxs("span",{className:"flex items-center gap-1",children:["🛡️ ",t("rateLimitNote")]}),l.jsxs("span",{className:"flex items-center gap-1",children:["🗝️ ",t("rbacNote")]})]})]}),h.length>0&&l.jsxs("div",{className:"card-kanban p-6",children:[l.jsxs("div",{className:"flex items-center justify-between mb-4",children:[l.jsxs("h3",{className:"text-sm md:text-base font-bold text-slate-900 dark:text-slate-200 flex items-center gap-2",children:[l.jsx(Ip,{size:16,className:"text-indigo-600 dark:text-indigo-400"}),l.jsxs("span",{children:[t("savedBoardsTitle")," (",h.length,")"]})]}),l.jsx("span",{className:"text-xs text-slate-500 dark:text-slate-400",children:t("savedBoardsSub")})]}),l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:h.map(S=>l.jsxs("div",{onClick:()=>k(S),className:"bg-slate-50 dark:bg-[#0b1020]/70 hover:bg-slate-100 dark:hover:bg-[#121830] border border-slate-200 dark:border-slate-800 p-3.5 rounded-lg transition-all cursor-pointer flex items-center justify-between group",children:[l.jsxs("div",{className:"min-w-0 flex-1 pr-2",children:[l.jsxs("div",{className:"flex items-center gap-1.5 mb-1",children:[l.jsx("span",{className:`text-[10px] font-semibold px-2 py-0.5 rounded-full border ${S.role==="admin"?"bg-amber-50 dark:bg-amber-500/10 text-amber-700 dark:text-amber-300 border-amber-200 dark:border-amber-500/30":"bg-indigo-50 dark:bg-indigo-500/10 text-indigo-700 dark:text-indigo-300 border-indigo-200 dark:border-indigo-500/30"}`,children:S.role==="admin"?`👑 ${t("superadmin")}`:`👤 ${t("member")}`}),l.jsx("span",{className:"text-[11px] text-slate-500 dark:text-slate-400 truncate",children:new Date(S.lastVisited).toLocaleDateString()})]}),l.jsx("h4",{className:"text-xs font-bold text-slate-900 dark:text-slate-200 group-hover:text-indigo-600 dark:group-hover:text-indigo-400 transition-colors truncate",children:S.title})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("button",{onClick:m=>N(m,S.id),className:"text-slate-400 hover:text-rose-600 dark:hover:text-rose-400 p-1.5 transition-colors",title:t("removeSaved"),children:l.jsx(Os,{size:14})}),l.jsx(hl,{size:14,className:"text-slate-400 group-hover:text-indigo-600 dark:group-hover:text-indigo-400 transition-colors"})]})]},S.id))})]}),u&&l.jsx(qp,{boardData:u,onEnterBoard:w})]})};function Jg(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return y.useMemo(()=>r=>{t.forEach(s=>s(r))},t)}const Mo=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Rr(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Ru(e){return"nodeType"in e}function it(e){var t,n;return e?Rr(e)?e:Ru(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function _u(e){const{Document:t}=it(e);return e instanceof t}function Bs(e){return Rr(e)?!1:e instanceof it(e).HTMLElement}function Yp(e){return e instanceof it(e).SVGElement}function _r(e){return e?Rr(e)?e.document:Ru(e)?_u(e)?e:Bs(e)||Yp(e)?e.ownerDocument:document:document:document}const Bt=Mo?y.useLayoutEffect:y.useEffect;function Ao(e){const t=y.useRef(e);return Bt(()=>{t.current=e}),y.useCallback(function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return t.current==null?void 0:t.current(...r)},[])}function Zg(){const e=y.useRef(null),t=y.useCallback((r,s)=>{e.current=setInterval(r,s)},[]),n=y.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Rs(e,t){t===void 0&&(t=[e]);const n=y.useRef(e);return Bt(()=>{n.current!==e&&(n.current=e)},t),n}function zs(e,t){const n=y.useRef();return y.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function io(e){const t=Ao(e),n=y.useRef(null),r=y.useCallback(s=>{s!==n.current&&(t==null||t(s,n.current)),n.current=s},[]);return[n,r]}function oo(e){const t=y.useRef();return y.useEffect(()=>{t.current=e},[e]),t.current}let ha={};function Fs(e,t){return y.useMemo(()=>{if(t)return t;const n=ha[e]==null?0:ha[e]+1;return ha[e]=n,e+"-"+n},[e,t])}function Xp(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return r.reduce((i,o)=>{const a=Object.entries(o);for(const[u,c]of a){const h=i[u];h!=null&&(i[u]=h+e*c)}return i},{...t})}}const xr=Xp(1),_s=Xp(-1);function ey(e){return"clientX"in e&&"clientY"in e}function Do(e){if(!e)return!1;const{KeyboardEvent:t}=it(e.target);return t&&e instanceof t}function ty(e){if(!e)return!1;const{TouchEvent:t}=it(e.target);return t&&e instanceof t}function ao(e){if(ty(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return ey(e)?{x:e.clientX,y:e.clientY}:null}const on=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[on.Translate.toString(e),on.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Zc="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function ny(e){return e.matches(Zc)?e:e.querySelector(Zc)}const ry={display:"none"};function sy(e){let{id:t,value:n}=e;return Ne.createElement("div",{id:t,style:ry},n)}function iy(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const s={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return Ne.createElement("div",{id:t,style:s,role:"status","aria-live":r,"aria-atomic":!0},n)}function oy(){const[e,t]=y.useState("");return{announce:y.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Jp=y.createContext(null);function ay(e){const t=y.useContext(Jp);y.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function ly(){const[e]=y.useState(()=>new Set),t=y.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[y.useCallback(r=>{let{type:s,event:i}=r;e.forEach(o=>{var a;return(a=o[s])==null?void 0:a.call(o,i)})},[e]),t]}const uy={draggable:`
To pick up a draggable item, press the space bar.
While dragging, use the arrow keys to move the item.
Press space again to drop the item in its new position, or press escape to cancel.
`},cy={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function dy(e){let{announcements:t=cy,container:n,hiddenTextDescribedById:r,screenReaderInstructions:s=uy}=e;const{announce:i,announcement:o}=oy(),a=Fs("DndLiveRegion"),[u,c]=y.useState(!1);if(y.useEffect(()=>{c(!0)},[]),ay(y.useMemo(()=>({onDragStart(d){let{active:f}=d;i(t.onDragStart({active:f}))},onDragMove(d){let{active:f,over:k}=d;t.onDragMove&&i(t.onDragMove({active:f,over:k}))},onDragOver(d){let{active:f,over:k}=d;i(t.onDragOver({active:f,over:k}))},onDragEnd(d){let{active:f,over:k}=d;i(t.onDragEnd({active:f,over:k}))},onDragCancel(d){let{active:f,over:k}=d;i(t.onDragCancel({active:f,over:k}))}}),[i,t])),!u)return null;const h=Ne.createElement(Ne.Fragment,null,Ne.createElement(sy,{id:r,value:s.draggable}),Ne.createElement(iy,{id:a,announcement:o}));return n?cr.createPortal(h,n):h}var Be;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Be||(Be={}));function lo(){}function ed(e,t){return y.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function fy(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return y.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const zt=Object.freeze({x:0,y:0});function py(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function hy(e,t){const n=ao(e);if(!n)return"0 0";const r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+"% "+r.y+"%"}function my(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function gy(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function td(e){let{left:t,top:n,height:r,width:s}=e;return[{x:t,y:n},{x:t+s,y:n},{x:t,y:n+r},{x:t+s,y:n+r}]}function Zp(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}const eh=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const s=td(t),i=[];for(const o of r){const{id:a}=o,u=n.get(a);if(u){const c=td(u),h=s.reduce((f,k,N)=>f+py(c[N],k),0),d=Number((h/4).toFixed(4));i.push({id:a,data:{droppableContainer:o,value:d}})}}return i.sort(my)};function yy(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),s=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),o=s-r,a=i-n;if(r<s&&n<i){const u=t.width*t.height,c=e.width*e.height,h=o*a,d=h/(u+c-h);return Number(d.toFixed(4))}return 0}const xy=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const s=[];for(const i of r){const{id:o}=i,a=n.get(o);if(a){const u=yy(a,t);u>0&&s.push({id:o,data:{droppableContainer:i,value:u}})}}return s.sort(gy)};function vy(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function th(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:zt}function ky(e){return function(n){for(var r=arguments.length,s=new Array(r>1?r-1:0),i=1;i<r;i++)s[i-1]=arguments[i];return s.reduce((o,a)=>({...o,top:o.top+e*a.y,bottom:o.bottom+e*a.y,left:o.left+e*a.x,right:o.right+e*a.x}),{...n})}}const by=ky(1);function nh(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function wy(e,t,n){const r=nh(t);if(!r)return e;const{scaleX:s,scaleY:i,x:o,y:a}=r,u=e.left-o-(1-s)*parseFloat(n),c=e.top-a-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),h=s?e.width/s:e.width,d=i?e.height/i:e.height;return{width:h,height:d,top:c,right:u+h,bottom:c+d,left:u}}const Sy={ignoreTransform:!1};function Lr(e,t){t===void 0&&(t=Sy);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:c,transformOrigin:h}=it(e).getComputedStyle(e);c&&(n=wy(n,c,h))}const{top:r,left:s,width:i,height:o,bottom:a,right:u}=n;return{top:r,left:s,width:i,height:o,bottom:a,right:u}}function nd(e){return Lr(e,{ignoreTransform:!0})}function Ny(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function Cy(e,t){return t===void 0&&(t=it(e).getComputedStyle(e)),t.position==="fixed"}function Ey(e,t){t===void 0&&(t=it(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(s=>{const i=t[s];return typeof i=="string"?n.test(i):!1})}function Io(e,t){const n=[];function r(s){if(t!=null&&n.length>=t||!s)return n;if(_u(s)&&s.scrollingElement!=null&&!n.includes(s.scrollingElement))return n.push(s.scrollingElement),n;if(!Bs(s)||Yp(s)||n.includes(s))return n;const i=it(e).getComputedStyle(s);return s!==e&&Ey(s,i)&&n.push(s),Cy(s,i)?n:r(s.parentNode)}return e?r(e):n}function rh(e){const[t]=Io(e,1);return t??null}function ma(e){return!Mo||!e?null:Rr(e)?e:Ru(e)?_u(e)||e===_r(e).scrollingElement?window:Bs(e)?e:null:null}function sh(e){return Rr(e)?e.scrollX:e.scrollLeft}function ih(e){return Rr(e)?e.scrollY:e.scrollTop}function wl(e){return{x:sh(e),y:ih(e)}}var He;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(He||(He={}));function oh(e){return!Mo||!e?!1:e===document.scrollingElement}function ah(e){const t={x:0,y:0},n=oh(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},s=e.scrollTop<=t.y,i=e.scrollLeft<=t.x,o=e.scrollTop>=r.y,a=e.scrollLeft>=r.x;return{isTop:s,isLeft:i,isBottom:o,isRight:a,maxScroll:r,minScroll:t}}const Ty={x:.2,y:.2};function jy(e,t,n,r,s){let{top:i,left:o,right:a,bottom:u}=n;r===void 0&&(r=10),s===void 0&&(s=Ty);const{isTop:c,isBottom:h,isLeft:d,isRight:f}=ah(e),k={x:0,y:0},N={x:0,y:0},w={height:t.height*s.y,width:t.width*s.x};return!c&&i<=t.top+w.height?(k.y=He.Backward,N.y=r*Math.abs((t.top+w.height-i)/w.height)):!h&&u>=t.bottom-w.height&&(k.y=He.Forward,N.y=r*Math.abs((t.bottom-w.height-u)/w.height)),!f&&a>=t.right-w.width?(k.x=He.Forward,N.x=r*Math.abs((t.right-w.width-a)/w.width)):!d&&o<=t.left+w.width&&(k.x=He.Backward,N.x=r*Math.abs((t.left+w.width-o)/w.width)),{direction:k,speed:N}}function Ry(e){if(e===document.scrollingElement){const{innerWidth:i,innerHeight:o}=window;return{top:0,left:0,right:i,bottom:o,width:i,height:o}}const{top:t,left:n,right:r,bottom:s}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:s,width:e.clientWidth,height:e.clientHeight}}function lh(e){return e.reduce((t,n)=>xr(t,wl(n)),zt)}function _y(e){return e.reduce((t,n)=>t+sh(n),0)}function Ly(e){return e.reduce((t,n)=>t+ih(n),0)}function uh(e,t){if(t===void 0&&(t=Lr),!e)return;const{top:n,left:r,bottom:s,right:i}=t(e);rh(e)&&(s<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const My=[["x",["left","right"],_y],["y",["top","bottom"],Ly]];class Lu{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=Io(n),s=lh(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[i,o,a]of My)for(const u of o)Object.defineProperty(this,u,{get:()=>{const c=a(r),h=s[i]-c;return this.rect[u]+h},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class as{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var s;(s=this.target)==null||s.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function Ay(e){const{EventTarget:t}=it(e);return e instanceof t?e:_r(e)}function ga(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var bt;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(bt||(bt={}));function rd(e){e.preventDefault()}function Dy(e){e.stopPropagation()}var le;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(le||(le={}));const ch={start:[le.Space,le.Enter],cancel:[le.Esc],end:[le.Space,le.Enter,le.Tab]},Iy=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case le.Right:return{...n,x:n.x+25};case le.Left:return{...n,x:n.x-25};case le.Down:return{...n,y:n.y+25};case le.Up:return{...n,y:n.y-25}}};class Mu{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new as(_r(n)),this.windowListeners=new as(it(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(bt.Resize,this.handleCancel),this.windowListeners.add(bt.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(bt.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&uh(r),n(zt)}handleKeyDown(t){if(Do(t)){const{active:n,context:r,options:s}=this.props,{keyboardCodes:i=ch,coordinateGetter:o=Iy,scrollBehavior:a="smooth"}=s,{code:u}=t;if(i.end.includes(u)){this.handleEnd(t);return}if(i.cancel.includes(u)){this.handleCancel(t);return}const{collisionRect:c}=r.current,h=c?{x:c.left,y:c.top}:zt;this.referenceCoordinates||(this.referenceCoordinates=h);const d=o(t,{active:n,context:r.current,currentCoordinates:h});if(d){const f=_s(d,h),k={x:0,y:0},{scrollableAncestors:N}=r.current;for(const w of N){const S=t.code,{isTop:m,isRight:p,isLeft:g,isBottom:b,maxScroll:j,minScroll:R}=ah(w),E=Ry(w),T={x:Math.min(S===le.Right?E.right-E.width/2:E.right,Math.max(S===le.Right?E.left:E.left+E.width/2,d.x)),y:Math.min(S===le.Down?E.bottom-E.height/2:E.bottom,Math.max(S===le.Down?E.top:E.top+E.height/2,d.y))},D=S===le.Right&&!p||S===le.Left&&!g,I=S===le.Down&&!b||S===le.Up&&!m;if(D&&T.x!==d.x){const X=w.scrollLeft+f.x,we=S===le.Right&&X<=j.x||S===le.Left&&X>=R.x;if(we&&!f.y){w.scrollTo({left:X,behavior:a});return}we?k.x=w.scrollLeft-X:k.x=S===le.Right?w.scrollLeft-j.x:w.scrollLeft-R.x,k.x&&w.scrollBy({left:-k.x,behavior:a});break}else if(I&&T.y!==d.y){const X=w.scrollTop+f.y,we=S===le.Down&&X<=j.y||S===le.Up&&X>=R.y;if(we&&!f.x){w.scrollTo({top:X,behavior:a});return}we?k.y=w.scrollTop-X:k.y=S===le.Down?w.scrollTop-j.y:w.scrollTop-R.y,k.y&&w.scrollBy({top:-k.y,behavior:a});break}}this.handleMove(t,xr(_s(d,this.referenceCoordinates),k))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Mu.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=ch,onActivation:s}=t,{active:i}=n;const{code:o}=e.nativeEvent;if(r.start.includes(o)){const a=i.activatorNode.current;return a&&e.target!==a?!1:(e.preventDefault(),s==null||s({event:e.nativeEvent}),!0)}return!1}}];function sd(e){return!!(e&&"distance"in e)}function id(e){return!!(e&&"delay"in e)}class Au{constructor(t,n,r){var s;r===void 0&&(r=Ay(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:i}=t,{target:o}=i;this.props=t,this.events=n,this.document=_r(o),this.documentListeners=new as(this.document),this.listeners=new as(r),this.windowListeners=new as(it(o)),this.initialCoordinates=(s=ao(i))!=null?s:zt,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(bt.Resize,this.handleCancel),this.windowListeners.add(bt.DragStart,rd),this.windowListeners.add(bt.VisibilityChange,this.handleCancel),this.windowListeners.add(bt.ContextMenu,rd),this.documentListeners.add(bt.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(id(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(sd(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:r,onPending:s}=this.props;s(r,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(bt.Click,Dy,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(bt.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:s,props:i}=this,{onMove:o,options:{activationConstraint:a}}=i;if(!s)return;const u=(n=ao(t))!=null?n:zt,c=_s(s,u);if(!r&&a){if(sd(a)){if(a.tolerance!=null&&ga(c,a.tolerance))return this.handleCancel();if(ga(c,a.distance))return this.handleStart()}if(id(a)&&ga(c,a.tolerance))return this.handleCancel();this.handlePending(a,c);return}t.cancelable&&t.preventDefault(),o(u)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===le.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Py={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Du extends Au{constructor(t){const{event:n}=t,r=_r(n.target);super(t,Py,r)}}Du.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const Oy={move:{name:"mousemove"},end:{name:"mouseup"}};var Sl;(function(e){e[e.RightClick=2]="RightClick"})(Sl||(Sl={}));class By extends Au{constructor(t){super(t,Oy,_r(t.event.target))}}By.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===Sl.RightClick?!1:(r==null||r({event:n}),!0)}}];const ya={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class zy extends Au{constructor(t){super(t,ya)}static setup(){return window.addEventListener(ya.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(ya.move.name,t)};function t(){}}}zy.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:s}=n;return s.length>1?!1:(r==null||r({event:n}),!0)}}];var ls;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(ls||(ls={}));var uo;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(uo||(uo={}));function Fy(e){let{acceleration:t,activator:n=ls.Pointer,canScroll:r,draggingRect:s,enabled:i,interval:o=5,order:a=uo.TreeOrder,pointerCoordinates:u,scrollableAncestors:c,scrollableAncestorRects:h,delta:d,threshold:f}=e;const k=$y({delta:d,disabled:!i}),[N,w]=Zg(),S=y.useRef({x:0,y:0}),m=y.useRef({x:0,y:0}),p=y.useMemo(()=>{switch(n){case ls.Pointer:return u?{top:u.y,bottom:u.y,left:u.x,right:u.x}:null;case ls.DraggableRect:return s}},[n,s,u]),g=y.useRef(null),b=y.useCallback(()=>{const R=g.current;if(!R)return;const E=S.current.x*m.current.x,T=S.current.y*m.current.y;R.scrollBy(E,T)},[]),j=y.useMemo(()=>a===uo.TreeOrder?[...c].reverse():c,[a,c]);y.useEffect(()=>{if(!i||!c.length||!p){w();return}for(const R of j){if((r==null?void 0:r(R))===!1)continue;const E=c.indexOf(R),T=h[E];if(!T)continue;const{direction:D,speed:I}=jy(R,T,p,t,f);for(const X of["x","y"])k[X][D[X]]||(I[X]=0,D[X]=0);if(I.x>0||I.y>0){w(),g.current=R,N(b,o),S.current=I,m.current=D;return}}S.current={x:0,y:0},m.current={x:0,y:0},w()},[t,b,r,w,i,o,JSON.stringify(p),JSON.stringify(k),N,c,j,h,JSON.stringify(f)])}const Uy={x:{[He.Backward]:!1,[He.Forward]:!1},y:{[He.Backward]:!1,[He.Forward]:!1}};function $y(e){let{delta:t,disabled:n}=e;const r=oo(t);return zs(s=>{if(n||!r||!s)return Uy;const i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[He.Backward]:s.x[He.Backward]||i.x===-1,[He.Forward]:s.x[He.Forward]||i.x===1},y:{[He.Backward]:s.y[He.Backward]||i.y===-1,[He.Forward]:s.y[He.Forward]||i.y===1}}},[n,t,r])}function Hy(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return zs(s=>{var i;return t==null?null:(i=r??s)!=null?i:null},[r,t])}function Vy(e,t){return y.useMemo(()=>e.reduce((n,r)=>{const{sensor:s}=r,i=s.activators.map(o=>({eventName:o.eventName,handler:t(o.handler,r)}));return[...n,...i]},[]),[e,t])}var Ls;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Ls||(Ls={}));var Nl;(function(e){e.Optimized="optimized"})(Nl||(Nl={}));const od=new Map;function Ky(e,t){let{dragging:n,dependencies:r,config:s}=t;const[i,o]=y.useState(null),{frequency:a,measure:u,strategy:c}=s,h=y.useRef(e),d=S(),f=Rs(d),k=y.useCallback(function(m){m===void 0&&(m=[]),!f.current&&o(p=>p===null?m:p.concat(m.filter(g=>!p.includes(g))))},[f]),N=y.useRef(null),w=zs(m=>{if(d&&!n)return od;if(!m||m===od||h.current!==e||i!=null){const p=new Map;for(let g of e){if(!g)continue;if(i&&i.length>0&&!i.includes(g.id)&&g.rect.current){p.set(g.id,g.rect.current);continue}const b=g.node.current,j=b?new Lu(u(b),b):null;g.rect.current=j,j&&p.set(g.id,j)}return p}return m},[e,i,n,d,u]);return y.useEffect(()=>{h.current=e},[e]),y.useEffect(()=>{d||k()},[n,d]),y.useEffect(()=>{i&&i.length>0&&o(null)},[JSON.stringify(i)]),y.useEffect(()=>{d||typeof a!="number"||N.current!==null||(N.current=setTimeout(()=>{k(),N.current=null},a))},[a,d,k,...r]),{droppableRects:w,measureDroppableContainers:k,measuringScheduled:i!=null};function S(){switch(c){case Ls.Always:return!1;case Ls.BeforeDragging:return n;default:return!n}}}function Iu(e,t){return zs(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Wy(e,t){return Iu(e,t)}function Gy(e){let{callback:t,disabled:n}=e;const r=Ao(t),s=y.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:i}=window;return new i(r)},[r,n]);return y.useEffect(()=>()=>s==null?void 0:s.disconnect(),[s]),s}function Po(e){let{callback:t,disabled:n}=e;const r=Ao(t),s=y.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:i}=window;return new i(r)},[n]);return y.useEffect(()=>()=>s==null?void 0:s.disconnect(),[s]),s}function Qy(e){return new Lu(Lr(e),e)}function ad(e,t,n){t===void 0&&(t=Qy);const[r,s]=y.useState(null);function i(){s(u=>{if(!e)return null;if(e.isConnected===!1){var c;return(c=u??n)!=null?c:null}const h=t(e);return JSON.stringify(u)===JSON.stringify(h)?u:h})}const o=Gy({callback(u){if(e)for(const c of u){const{type:h,target:d}=c;if(h==="childList"&&d instanceof HTMLElement&&d.contains(e)){i();break}}}}),a=Po({callback:i});return Bt(()=>{i(),e?(a==null||a.observe(e),o==null||o.observe(document.body,{childList:!0,subtree:!0})):(a==null||a.disconnect(),o==null||o.disconnect())},[e]),r}function qy(e){const t=Iu(e);return th(e,t)}const ld=[];function Yy(e){const t=y.useRef(e),n=zs(r=>e?r&&r!==ld&&e&&t.current&&e.parentNode===t.current.parentNode?r:Io(e):ld,[e]);return y.useEffect(()=>{t.current=e},[e]),n}function Xy(e){const[t,n]=y.useState(null),r=y.useRef(e),s=y.useCallback(i=>{const o=ma(i.target);o&&n(a=>a?(a.set(o,wl(o)),new Map(a)):null)},[]);return y.useEffect(()=>{const i=r.current;if(e!==i){o(i);const a=e.map(u=>{const c=ma(u);return c?(c.addEventListener("scroll",s,{passive:!0}),[c,wl(c)]):null}).filter(u=>u!=null);n(a.length?new Map(a):null),r.current=e}return()=>{o(e),o(i)};function o(a){a.forEach(u=>{const c=ma(u);c==null||c.removeEventListener("scroll",s)})}},[s,e]),y.useMemo(()=>e.length?t?Array.from(t.values()).reduce((i,o)=>xr(i,o),zt):lh(e):zt,[e,t])}function ud(e,t){t===void 0&&(t=[]);const n=y.useRef(null);return y.useEffect(()=>{n.current=null},t),y.useEffect(()=>{const r=e!==zt;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?_s(e,n.current):zt}function Jy(e){y.useEffect(()=>{if(!Mo)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function Zy(e,t){return y.useMemo(()=>e.reduce((n,r)=>{let{eventName:s,handler:i}=r;return n[s]=o=>{i(o,t)},n},{}),[e,t])}function dh(e){return y.useMemo(()=>e?Ny(e):null,[e])}const cd=[];function ex(e,t){t===void 0&&(t=Lr);const[n]=e,r=dh(n?it(n):null),[s,i]=y.useState(cd);function o(){i(()=>e.length?e.map(u=>oh(u)?r:new Lu(t(u),u)):cd)}const a=Po({callback:o});return Bt(()=>{a==null||a.disconnect(),o(),e.forEach(u=>a==null?void 0:a.observe(u))},[e]),s}function fh(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Bs(t)?t:e}function tx(e){let{measure:t}=e;const[n,r]=y.useState(null),s=y.useCallback(c=>{for(const{target:h}of c)if(Bs(h)){r(d=>{const f=t(h);return d?{...d,width:f.width,height:f.height}:f});break}},[t]),i=Po({callback:s}),o=y.useCallback(c=>{const h=fh(c);i==null||i.disconnect(),h&&(i==null||i.observe(h)),r(h?t(h):null)},[t,i]),[a,u]=io(o);return y.useMemo(()=>({nodeRef:a,rect:n,setRef:u}),[n,a,u])}const nx=[{sensor:Du,options:{}},{sensor:Mu,options:{}}],rx={current:{}},Ci={draggable:{measure:nd},droppable:{measure:nd,strategy:Ls.WhileDragging,frequency:Nl.Optimized},dragOverlay:{measure:Lr}};class us extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const sx={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new us,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:lo},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Ci,measureDroppableContainers:lo,windowRect:null,measuringScheduled:!1},ph={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:lo,draggableNodes:new Map,over:null,measureDroppableContainers:lo},Us=y.createContext(ph),hh=y.createContext(sx);function ix(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new us}}}function ox(e,t){switch(t.type){case Be.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Be.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Be.DragEnd:case Be.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Be.RegisterDroppable:{const{element:n}=t,{id:r}=n,s=new us(e.droppable.containers);return s.set(r,n),{...e,droppable:{...e.droppable,containers:s}}}case Be.SetDroppableDisabled:{const{id:n,key:r,disabled:s}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const o=new us(e.droppable.containers);return o.set(n,{...i,disabled:s}),{...e,droppable:{...e.droppable,containers:o}}}case Be.UnregisterDroppable:{const{id:n,key:r}=t,s=e.droppable.containers.get(n);if(!s||r!==s.key)return e;const i=new us(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function ax(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:s}=y.useContext(Us),i=oo(r),o=oo(n==null?void 0:n.id);return y.useEffect(()=>{if(!t&&!r&&i&&o!=null){if(!Do(i)||document.activeElement===i.target)return;const a=s.get(o);if(!a)return;const{activatorNode:u,node:c}=a;if(!u.current&&!c.current)return;requestAnimationFrame(()=>{for(const h of[u.current,c.current]){if(!h)continue;const d=ny(h);if(d){d.focus();break}}})}},[r,t,s,o,i]),null}function mh(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((s,i)=>i({transform:s,...r}),n):n}function lx(e){return y.useMemo(()=>({draggable:{...Ci.draggable,...e==null?void 0:e.draggable},droppable:{...Ci.droppable,...e==null?void 0:e.droppable},dragOverlay:{...Ci.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function ux(e){let{activeNode:t,measure:n,initialRect:r,config:s=!0}=e;const i=y.useRef(!1),{x:o,y:a}=typeof s=="boolean"?{x:s,y:s}:s;Bt(()=>{if(!o&&!a||!t){i.current=!1;return}if(i.current||!r)return;const c=t==null?void 0:t.node.current;if(!c||c.isConnected===!1)return;const h=n(c),d=th(h,r);if(o||(d.x=0),a||(d.y=0),i.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const f=rh(c);f&&f.scrollBy({top:d.y,left:d.x})}},[t,o,a,r,n])}const Oo=y.createContext({...zt,scaleX:1,scaleY:1});var mn;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(mn||(mn={}));const cx=y.memo(function(t){var n,r,s,i;let{id:o,accessibility:a,autoScroll:u=!0,children:c,sensors:h=nx,collisionDetection:d=xy,measuring:f,modifiers:k,...N}=t;const w=y.useReducer(ox,void 0,ix),[S,m]=w,[p,g]=ly(),[b,j]=y.useState(mn.Uninitialized),R=b===mn.Initialized,{draggable:{active:E,nodes:T,translate:D},droppable:{containers:I}}=S,X=E!=null?T.get(E):null,we=y.useRef({initial:null,translated:null}),me=y.useMemo(()=>{var qe;return E!=null?{id:E,data:(qe=X==null?void 0:X.data)!=null?qe:rx,rect:we}:null},[E,X]),Re=y.useRef(null),[et,Fe]=y.useState(null),[ge,A]=y.useState(null),W=Rs(N,Object.values(N)),v=Fs("DndDescribedBy",o),x=y.useMemo(()=>I.getEnabled(),[I]),_=lx(f),{droppableRects:B,measureDroppableContainers:K,measuringScheduled:q}=Ky(x,{dragging:R,dependencies:[D.x,D.y],config:_.droppable}),F=Hy(T,E),$=y.useMemo(()=>ge?ao(ge):null,[ge]),J=zh(),ne=Wy(F,_.draggable.measure);ux({activeNode:E!=null?T.get(E):null,config:J.layoutShiftCompensation,initialRect:ne,measure:_.draggable.measure});const Q=ad(F,_.draggable.measure,ne),ae=ad(F?F.parentElement:null),se=y.useRef({activatorEvent:null,active:null,activeNode:F,collisionRect:null,collisions:null,droppableRects:B,draggableNodes:T,draggingNode:null,draggingNodeRect:null,droppableContainers:I,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),he=I.getNodeFor((n=se.current.over)==null?void 0:n.id),ee=tx({measure:_.dragOverlay.measure}),ve=(r=ee.nodeRef.current)!=null?r:F,_e=R?(s=ee.rect)!=null?s:Q:null,Ue=!!(ee.nodeRef.current&&ee.rect),P=qy(Ue?null:Q),U=dh(ve?it(ve):null),z=Yy(R?he??F:null),oe=ex(z),C=mh(k,{transform:{x:D.x-P.x,y:D.y-P.y,scaleX:1,scaleY:1},activatorEvent:ge,active:me,activeNodeRect:Q,containerNodeRect:ae,draggingNodeRect:_e,over:se.current.over,overlayNodeRect:ee.rect,scrollableAncestors:z,scrollableAncestorRects:oe,windowRect:U}),H=$?xr($,D):null,Y=Xy(z),M=ud(Y),G=ud(Y,[Q]),te=xr(C,M),ce=_e?by(_e,C):null,Z=me&&ce?d({active:me,collisionRect:ce,droppableRects:B,droppableContainers:x,pointerCoordinates:H}):null,Se=Zp(Z,"id"),[de,ln]=y.useState(null),In=Ue?C:xr(C,G),Ar=vy(In,(i=de==null?void 0:de.rect)!=null?i:null,Q),Ae=y.useRef(null),De=y.useCallback((qe,dt)=>{let{sensor:ft,options:un}=dt;if(Re.current==null)return;const kt=T.get(Re.current);if(!kt)return;const pt=qe.nativeEvent,Ft=new ft({active:Re.current,activeNode:kt,event:pt,options:un,context:se,onAbort(Ke){if(!T.get(Ke))return;const{onDragAbort:Ut}=W.current,qt={id:Ke};Ut==null||Ut(qt),p({type:"onDragAbort",event:qt})},onPending(Ke,cn,Ut,qt){if(!T.get(Ke))return;const{onDragPending:Pr}=W.current,dn={id:Ke,constraint:cn,initialCoordinates:Ut,offset:qt};Pr==null||Pr(dn),p({type:"onDragPending",event:dn})},onStart(Ke){const cn=Re.current;if(cn==null)return;const Ut=T.get(cn);if(!Ut)return;const{onDragStart:qt}=W.current,Ir={activatorEvent:pt,active:{id:cn,data:Ut.data,rect:we}};cr.unstable_batchedUpdates(()=>{qt==null||qt(Ir),j(mn.Initializing),m({type:Be.DragStart,initialCoordinates:Ke,active:cn}),p({type:"onDragStart",event:Ir}),Fe(Ae.current),A(pt)})},onMove(Ke){m({type:Be.DragMove,coordinates:Ke})},onEnd:Yn(Be.DragEnd),onCancel:Yn(Be.DragCancel)});Ae.current=Ft;function Yn(Ke){return async function(){const{active:Ut,collisions:qt,over:Ir,scrollAdjustedTranslate:Pr}=se.current;let dn=null;if(Ut&&Pr){const{cancelDrop:Or}=W.current;dn={activatorEvent:pt,active:Ut,collisions:qt,delta:Pr,over:Ir},Ke===Be.DragEnd&&typeof Or=="function"&&await Promise.resolve(Or(dn))&&(Ke=Be.DragCancel)}Re.current=null,cr.unstable_batchedUpdates(()=>{m({type:Ke}),j(mn.Uninitialized),ln(null),Fe(null),A(null),Ae.current=null;const Or=Ke===Be.DragEnd?"onDragEnd":"onDragCancel";if(dn){const Fo=W.current[Or];Fo==null||Fo(dn),p({type:Or,event:dn})}})}}},[T]),Dr=y.useCallback((qe,dt)=>(ft,un)=>{const kt=ft.nativeEvent,pt=T.get(un);if(Re.current!==null||!pt||kt.dndKit||kt.defaultPrevented)return;const Ft={active:pt};qe(ft,dt.options,Ft)===!0&&(kt.dndKit={capturedBy:dt.sensor},Re.current=un,De(ft,dt))},[T,De]),$u=Vy(h,Dr);Jy(h),Bt(()=>{Q&&b===mn.Initializing&&j(mn.Initialized)},[Q,b]),y.useEffect(()=>{const{onDragMove:qe}=W.current,{active:dt,activatorEvent:ft,collisions:un,over:kt}=se.current;if(!dt||!ft)return;const pt={active:dt,activatorEvent:ft,collisions:un,delta:{x:te.x,y:te.y},over:kt};cr.unstable_batchedUpdates(()=>{qe==null||qe(pt),p({type:"onDragMove",event:pt})})},[te.x,te.y]),y.useEffect(()=>{const{active:qe,activatorEvent:dt,collisions:ft,droppableContainers:un,scrollAdjustedTranslate:kt}=se.current;if(!qe||Re.current==null||!dt||!kt)return;const{onDragOver:pt}=W.current,Ft=un.get(Se),Yn=Ft&&Ft.rect.current?{id:Ft.id,rect:Ft.rect.current,data:Ft.data,disabled:Ft.disabled}:null,Ke={active:qe,activatorEvent:dt,collisions:ft,delta:{x:kt.x,y:kt.y},over:Yn};cr.unstable_batchedUpdates(()=>{ln(Yn),pt==null||pt(Ke),p({type:"onDragOver",event:Ke})})},[Se]),Bt(()=>{se.current={activatorEvent:ge,active:me,activeNode:F,collisionRect:ce,collisions:Z,droppableRects:B,draggableNodes:T,draggingNode:ve,draggingNodeRect:_e,droppableContainers:I,over:de,scrollableAncestors:z,scrollAdjustedTranslate:te},we.current={initial:_e,translated:ce}},[me,F,Z,ce,T,ve,_e,B,I,de,z,te]),Fy({...J,delta:D,draggingRect:ce,pointerCoordinates:H,scrollableAncestors:z,scrollableAncestorRects:oe});const Oh=y.useMemo(()=>({active:me,activeNode:F,activeNodeRect:Q,activatorEvent:ge,collisions:Z,containerNodeRect:ae,dragOverlay:ee,draggableNodes:T,droppableContainers:I,droppableRects:B,over:de,measureDroppableContainers:K,scrollableAncestors:z,scrollableAncestorRects:oe,measuringConfiguration:_,measuringScheduled:q,windowRect:U}),[me,F,Q,ge,Z,ae,ee,T,I,B,de,K,z,oe,_,q,U]),Bh=y.useMemo(()=>({activatorEvent:ge,activators:$u,active:me,activeNodeRect:Q,ariaDescribedById:{draggable:v},dispatch:m,draggableNodes:T,over:de,measureDroppableContainers:K}),[ge,$u,me,Q,m,v,T,de,K]);return Ne.createElement(Jp.Provider,{value:g},Ne.createElement(Us.Provider,{value:Bh},Ne.createElement(hh.Provider,{value:Oh},Ne.createElement(Oo.Provider,{value:Ar},c)),Ne.createElement(ax,{disabled:(a==null?void 0:a.restoreFocus)===!1})),Ne.createElement(dy,{...a,hiddenTextDescribedById:v}));function zh(){const qe=(et==null?void 0:et.autoScrollEnabled)===!1,dt=typeof u=="object"?u.enabled===!1:u===!1,ft=R&&!qe&&!dt;return typeof u=="object"?{...u,enabled:ft}:{enabled:ft}}}),dx=y.createContext(null),dd="button",fx="Draggable";function px(e){let{id:t,data:n,disabled:r=!1,attributes:s}=e;const i=Fs(fx),{activators:o,activatorEvent:a,active:u,activeNodeRect:c,ariaDescribedById:h,draggableNodes:d,over:f}=y.useContext(Us),{role:k=dd,roleDescription:N="draggable",tabIndex:w=0}=s??{},S=(u==null?void 0:u.id)===t,m=y.useContext(S?Oo:dx),[p,g]=io(),[b,j]=io(),R=Zy(o,t),E=Rs(n);Bt(()=>(d.set(t,{id:t,key:i,node:p,activatorNode:b,data:E}),()=>{const D=d.get(t);D&&D.key===i&&d.delete(t)}),[d,t]);const T=y.useMemo(()=>({role:k,tabIndex:w,"aria-disabled":r,"aria-pressed":S&&k===dd?!0:void 0,"aria-roledescription":N,"aria-describedby":h.draggable}),[r,k,w,S,N,h.draggable]);return{active:u,activatorEvent:a,activeNodeRect:c,attributes:T,isDragging:S,listeners:r?void 0:R,node:p,over:f,setNodeRef:g,setActivatorNodeRef:j,transform:m}}function gh(){return y.useContext(hh)}const hx="Droppable",mx={timeout:25};function gx(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:s}=e;const i=Fs(hx),{active:o,dispatch:a,over:u,measureDroppableContainers:c}=y.useContext(Us),h=y.useRef({disabled:n}),d=y.useRef(!1),f=y.useRef(null),k=y.useRef(null),{disabled:N,updateMeasurementsFor:w,timeout:S}={...mx,...s},m=Rs(w??r),p=y.useCallback(()=>{if(!d.current){d.current=!0;return}k.current!=null&&clearTimeout(k.current),k.current=setTimeout(()=>{c(Array.isArray(m.current)?m.current:[m.current]),k.current=null},S)},[S]),g=Po({callback:p,disabled:N||!o}),b=y.useCallback((T,D)=>{g&&(D&&(g.unobserve(D),d.current=!1),T&&g.observe(T))},[g]),[j,R]=io(b),E=Rs(t);return y.useEffect(()=>{!g||!j.current||(g.disconnect(),d.current=!1,g.observe(j.current))},[j,g]),y.useEffect(()=>(a({type:Be.RegisterDroppable,element:{id:r,key:i,disabled:n,node:j,rect:f,data:E}}),()=>a({type:Be.UnregisterDroppable,key:i,id:r})),[r]),y.useEffect(()=>{n!==h.current.disabled&&(a({type:Be.SetDroppableDisabled,id:r,key:i,disabled:n}),h.current.disabled=n)},[r,i,n,a]),{active:o,rect:f,isOver:(u==null?void 0:u.id)===r,node:j,over:u,setNodeRef:R}}function yx(e){let{animation:t,children:n}=e;const[r,s]=y.useState(null),[i,o]=y.useState(null),a=oo(n);return!n&&!r&&a&&s(a),Bt(()=>{if(!i)return;const u=r==null?void 0:r.key,c=r==null?void 0:r.props.id;if(u==null||c==null){s(null);return}Promise.resolve(t(c,i)).then(()=>{s(null)})},[t,r,i]),Ne.createElement(Ne.Fragment,null,n,r?y.cloneElement(r,{ref:o}):null)}const xx={x:0,y:0,scaleX:1,scaleY:1};function vx(e){let{children:t}=e;return Ne.createElement(Us.Provider,{value:ph},Ne.createElement(Oo.Provider,{value:xx},t))}const kx={position:"fixed",touchAction:"none"},bx=e=>Do(e)?"transform 250ms ease":void 0,wx=y.forwardRef((e,t)=>{let{as:n,activatorEvent:r,adjustScale:s,children:i,className:o,rect:a,style:u,transform:c,transition:h=bx}=e;if(!a)return null;const d=s?c:{...c,scaleX:1,scaleY:1},f={...kx,width:a.width,height:a.height,top:a.top,left:a.left,transform:on.Transform.toString(d),transformOrigin:s&&r?hy(r,a):void 0,transition:typeof h=="function"?h(r):h,...u};return Ne.createElement(n,{className:o,style:f,ref:t},i)}),Sx=e=>t=>{let{active:n,dragOverlay:r}=t;const s={},{styles:i,className:o}=e;if(i!=null&&i.active)for(const[a,u]of Object.entries(i.active))u!==void 0&&(s[a]=n.node.style.getPropertyValue(a),n.node.style.setProperty(a,u));if(i!=null&&i.dragOverlay)for(const[a,u]of Object.entries(i.dragOverlay))u!==void 0&&r.node.style.setProperty(a,u);return o!=null&&o.active&&n.node.classList.add(o.active),o!=null&&o.dragOverlay&&r.node.classList.add(o.dragOverlay),function(){for(const[u,c]of Object.entries(s))n.node.style.setProperty(u,c);o!=null&&o.active&&n.node.classList.remove(o.active)}},Nx=e=>{let{transform:{initial:t,final:n}}=e;return[{transform:on.Transform.toString(t)},{transform:on.Transform.toString(n)}]},Cx={duration:250,easing:"ease",keyframes:Nx,sideEffects:Sx({styles:{active:{opacity:"0"}}})};function Ex(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:s}=e;return Ao((i,o)=>{if(t===null)return;const a=n.get(i);if(!a)return;const u=a.node.current;if(!u)return;const c=fh(o);if(!c)return;const{transform:h}=it(o).getComputedStyle(o),d=nh(h);if(!d)return;const f=typeof t=="function"?t:Tx(t);return uh(u,s.draggable.measure),f({active:{id:i,data:a.data,node:u,rect:s.draggable.measure(u)},draggableNodes:n,dragOverlay:{node:o,rect:s.dragOverlay.measure(c)},droppableContainers:r,measuringConfiguration:s,transform:d})})}function Tx(e){const{duration:t,easing:n,sideEffects:r,keyframes:s}={...Cx,...e};return i=>{let{active:o,dragOverlay:a,transform:u,...c}=i;if(!t)return;const h={x:a.rect.left-o.rect.left,y:a.rect.top-o.rect.top},d={scaleX:u.scaleX!==1?o.rect.width*u.scaleX/a.rect.width:1,scaleY:u.scaleY!==1?o.rect.height*u.scaleY/a.rect.height:1},f={x:u.x-h.x,y:u.y-h.y,...d},k=s({...c,active:o,dragOverlay:a,transform:{initial:u,final:f}}),[N]=k,w=k[k.length-1];if(JSON.stringify(N)===JSON.stringify(w))return;const S=r==null?void 0:r({active:o,dragOverlay:a,...c}),m=a.node.animate(k,{duration:t,easing:n,fill:"forwards"});return new Promise(p=>{m.onfinish=()=>{S==null||S(),p()}})}}let fd=0;function jx(e){return y.useMemo(()=>{if(e!=null)return fd++,fd},[e])}const Rx=Ne.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:s,transition:i,modifiers:o,wrapperElement:a="div",className:u,zIndex:c=999}=e;const{activatorEvent:h,active:d,activeNodeRect:f,containerNodeRect:k,draggableNodes:N,droppableContainers:w,dragOverlay:S,over:m,measuringConfiguration:p,scrollableAncestors:g,scrollableAncestorRects:b,windowRect:j}=gh(),R=y.useContext(Oo),E=jx(d==null?void 0:d.id),T=mh(o,{activatorEvent:h,active:d,activeNodeRect:f,containerNodeRect:k,draggingNodeRect:S.rect,over:m,overlayNodeRect:S.rect,scrollableAncestors:g,scrollableAncestorRects:b,transform:R,windowRect:j}),D=Iu(f),I=Ex({config:r,draggableNodes:N,droppableContainers:w,measuringConfiguration:p}),X=D?S.setRef:void 0;return Ne.createElement(vx,null,Ne.createElement(yx,{animation:I},d&&E?Ne.createElement(wx,{key:E,id:d.id,ref:X,as:a,activatorEvent:h,adjustScale:t,className:u,transition:i,rect:D,style:{zIndex:c,...s},transform:T},n):null))});function Pu(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function _x(e,t){return e.reduce((n,r,s)=>{const i=t.get(r);return i&&(n[s]=i),n},Array(e.length))}function ii(e){return e!==null&&e>=0}function Lx(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Mx(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const oi={scaleX:1,scaleY:1},Ax=e=>{var t;let{rects:n,activeNodeRect:r,activeIndex:s,overIndex:i,index:o}=e;const a=(t=n[s])!=null?t:r;if(!a)return null;const u=Dx(n,o,s);if(o===s){const c=n[i];return c?{x:s<i?c.left+c.width-(a.left+a.width):c.left-a.left,y:0,...oi}:null}return o>s&&o<=i?{x:-a.width-u,y:0,...oi}:o<s&&o>=i?{x:a.width+u,y:0,...oi}:{x:0,y:0,...oi}};function Dx(e,t,n){const r=e[t],s=e[t-1],i=e[t+1];return!r||!s&&!i?0:n<t?s?r.left-(s.left+s.width):i.left-(r.left+r.width):i?i.left-(r.left+r.width):r.left-(s.left+s.width)}const yh=e=>{let{rects:t,activeIndex:n,overIndex:r,index:s}=e;const i=Pu(t,r,n),o=t[s],a=i[s];return!a||!o?null:{x:a.left-o.left,y:a.top-o.top,scaleX:a.width/o.width,scaleY:a.height/o.height}},ai={scaleX:1,scaleY:1},Ix=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:s,rects:i,overIndex:o}=e;const a=(t=i[n])!=null?t:r;if(!a)return null;if(s===n){const c=i[o];return c?{x:0,y:n<o?c.top+c.height-(a.top+a.height):c.top-a.top,...ai}:null}const u=Px(i,s,n);return s>n&&s<=o?{x:0,y:-a.height-u,...ai}:s<n&&s>=o?{x:0,y:a.height+u,...ai}:{x:0,y:0,...ai}};function Px(e,t,n){const r=e[t],s=e[t-1],i=e[t+1];return r?n<t?s?r.top-(s.top+s.height):i?i.top-(r.top+r.height):0:i?i.top-(r.top+r.height):s?r.top-(s.top+s.height):0:0}const xh="Sortable",vh=Ne.createContext({activeIndex:-1,containerId:xh,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:yh,disabled:{draggable:!1,droppable:!1}});function pd(e){let{children:t,id:n,items:r,strategy:s=yh,disabled:i=!1}=e;const{active:o,dragOverlay:a,droppableRects:u,over:c,measureDroppableContainers:h}=gh(),d=Fs(xh,n),f=a.rect!==null,k=y.useMemo(()=>r.map(R=>typeof R=="object"&&"id"in R?R.id:R),[r]),N=o!=null,w=o?k.indexOf(o.id):-1,S=c?k.indexOf(c.id):-1,m=y.useRef(k),p=!Lx(k,m.current),g=S!==-1&&w===-1||p,b=Mx(i);Bt(()=>{p&&N&&h(k)},[p,k,N,h]),y.useEffect(()=>{m.current=k},[k]);const j=y.useMemo(()=>({activeIndex:w,containerId:d,disabled:b,disableTransforms:g,items:k,overIndex:S,useDragOverlay:f,sortedRects:_x(k,u),strategy:s}),[w,d,b.draggable,b.droppable,g,k,S,u,f,s]);return Ne.createElement(vh.Provider,{value:j},t)}const Ox=e=>{let{id:t,items:n,activeIndex:r,overIndex:s}=e;return Pu(n,r,s).indexOf(t)},Bx=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:s,items:i,newIndex:o,previousItems:a,previousContainerId:u,transition:c}=e;return!c||!r||a!==i&&s===o?!1:n?!0:o!==s&&t===u},zx={duration:200,easing:"ease"},kh="transform",Fx=on.Transition.toString({property:kh,duration:0,easing:"linear"}),Ux={roleDescription:"sortable"};function $x(e){let{disabled:t,index:n,node:r,rect:s}=e;const[i,o]=y.useState(null),a=y.useRef(n);return Bt(()=>{if(!t&&n!==a.current&&r.current){const u=s.current;if(u){const c=Lr(r.current,{ignoreTransform:!0}),h={x:u.left-c.left,y:u.top-c.top,scaleX:u.width/c.width,scaleY:u.height/c.height};(h.x||h.y)&&o(h)}}n!==a.current&&(a.current=n)},[t,n,r,s]),y.useEffect(()=>{i&&o(null)},[i]),i}function bh(e){let{animateLayoutChanges:t=Bx,attributes:n,disabled:r,data:s,getNewIndex:i=Ox,id:o,strategy:a,resizeObserverConfig:u,transition:c=zx}=e;const{items:h,containerId:d,activeIndex:f,disabled:k,disableTransforms:N,sortedRects:w,overIndex:S,useDragOverlay:m,strategy:p}=y.useContext(vh),g=Hx(r,k),b=h.indexOf(o),j=y.useMemo(()=>({sortable:{containerId:d,index:b,items:h},...s}),[d,s,b,h]),R=y.useMemo(()=>h.slice(h.indexOf(o)),[h,o]),{rect:E,node:T,isOver:D,setNodeRef:I}=gx({id:o,data:j,disabled:g.droppable,resizeObserverConfig:{updateMeasurementsFor:R,...u}}),{active:X,activatorEvent:we,activeNodeRect:me,attributes:Re,setNodeRef:et,listeners:Fe,isDragging:ge,over:A,setActivatorNodeRef:W,transform:v}=px({id:o,data:j,attributes:{...Ux,...n},disabled:g.draggable}),x=Jg(I,et),_=!!X,B=_&&!N&&ii(f)&&ii(S),K=!m&&ge,q=K&&B?v:null,$=B?q??(a??p)({rects:w,activeNodeRect:me,activeIndex:f,overIndex:S,index:b}):null,J=ii(f)&&ii(S)?i({id:o,items:h,activeIndex:f,overIndex:S}):b,ne=X==null?void 0:X.id,Q=y.useRef({activeId:ne,items:h,newIndex:J,containerId:d}),ae=h!==Q.current.items,se=t({active:X,containerId:d,isDragging:ge,isSorting:_,id:o,index:b,items:h,newIndex:Q.current.newIndex,previousItems:Q.current.items,previousContainerId:Q.current.containerId,transition:c,wasDragging:Q.current.activeId!=null}),he=$x({disabled:!se,index:b,node:T,rect:E});return y.useEffect(()=>{_&&Q.current.newIndex!==J&&(Q.current.newIndex=J),d!==Q.current.containerId&&(Q.current.containerId=d),h!==Q.current.items&&(Q.current.items=h)},[_,J,d,h]),y.useEffect(()=>{if(ne===Q.current.activeId)return;if(ne&&!Q.current.activeId){Q.current.activeId=ne;return}const ve=setTimeout(()=>{Q.current.activeId=ne},50);return()=>clearTimeout(ve)},[ne]),{active:X,activeIndex:f,attributes:Re,data:j,rect:E,index:b,newIndex:J,items:h,isOver:D,isSorting:_,isDragging:ge,listeners:Fe,node:T,overIndex:S,over:A,setNodeRef:x,setActivatorNodeRef:W,setDroppableNodeRef:I,setDraggableNodeRef:et,transform:he??$,transition:ee()};function ee(){if(he||ae&&Q.current.newIndex===b)return Fx;if(!(K&&!Do(we)||!c)&&(_||se))return on.Transition.toString({...c,property:kh})}}function Hx(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e==null?void 0:e.draggable)!=null?n:t.draggable,droppable:(r=e==null?void 0:e.droppable)!=null?r:t.droppable}}function co(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const Vx=[le.Down,le.Right,le.Up,le.Left],Kx=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:s,droppableContainers:i,over:o,scrollableAncestors:a}}=t;if(Vx.includes(e.code)){if(e.preventDefault(),!n||!r)return;const u=[];i.getEnabled().forEach(d=>{if(!d||d!=null&&d.disabled)return;const f=s.get(d.id);if(f)switch(e.code){case le.Down:r.top<f.top&&u.push(d);break;case le.Up:r.top>f.top&&u.push(d);break;case le.Left:r.left>f.left&&u.push(d);break;case le.Right:r.left<f.left&&u.push(d);break}});const c=eh({collisionRect:r,droppableRects:s,droppableContainers:u});let h=Zp(c,"id");if(h===(o==null?void 0:o.id)&&c.length>1&&(h=c[1].id),h!=null){const d=i.get(n.id),f=i.get(h),k=f?s.get(f.id):null,N=f==null?void 0:f.node.current;if(N&&k&&d&&f){const S=Io(N).some((R,E)=>a[E]!==R),m=wh(d,f),p=Wx(d,f),g=S||!m?{x:0,y:0}:{x:p?r.width-k.width:0,y:p?r.height-k.height:0},b={x:k.left,y:k.top};return g.x&&g.y?b:_s(b,g)}}}};function wh(e,t){return!co(e)||!co(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function Wx(e,t){return!co(e)||!co(t)||!wh(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const Sh=({ticket:e,autoStaleHours:t=0,activeLocks:n,currentUserId:r,onClick:s})=>{const{t:i,isRetro:o}=Rt(),a={LOW:{label:i("prioLow"),badge:"bg-emerald-50 text-emerald-700 border-emerald-200 dark:bg-emerald-950/60 dark:text-emerald-300 dark:border-emerald-500/20"},MEDIUM:{label:i("prioMedium"),badge:"bg-blue-50 text-blue-700 border-blue-200 dark:bg-blue-950/60 dark:text-blue-300 dark:border-blue-500/20"},HIGH:{label:i("prioHigh"),badge:"bg-amber-50 text-amber-700 border-amber-200 dark:bg-amber-950/60 dark:text-amber-300 dark:border-amber-500/20"},URGENT:{label:i("prioUrgent"),badge:"bg-rose-50 text-rose-700 border-rose-200 dark:bg-rose-950/60 dark:text-rose-300 dark:border-rose-500/20"}},{attributes:u,listeners:c,setNodeRef:h,transform:d,transition:f,isDragging:k}=bh({id:e.id,data:{type:"Ticket",ticket:e}}),N={transform:on.Translate.toString(d),transition:f,opacity:k?.35:1},w=n.some(E=>E.ticketId===e.id&&E.userId!==r),S=n.find(E=>E.ticketId===e.id&&E.userId!==r);let m=null;if(e.dueDate){const E=new Date().toISOString().split("T")[0];e.dueDate<E?m="overdue":e.dueDate===E?m="today":m="upcoming"}const p=e.subtasks?e.subtasks.length:0,g=e.subtasks?e.subtasks.filter(E=>E.completed).length:0;let b=!1,j=0;if(t>0&&e.movedAt){const E=new Date(e.movedAt).getTime(),T=(Date.now()-E)/(1e3*60*60);j=Math.floor(T),T>=t&&(b=!0)}const R=a[e.priority]||a.MEDIUM;return l.jsxs("div",{ref:h,style:N,className:`ticket-kanban group relative p-3.5 mb-2.5 transition-all select-none ${e.isBlocked?"border-rose-300 dark:border-rose-500/60 bg-rose-50/70 dark:bg-rose-950/20":""} ${w?"border-amber-500/80 ring-1 ring-amber-500":""}`,children:[w&&S&&l.jsxs("div",{className:"bg-amber-50 dark:bg-amber-500/15 text-amber-800 dark:text-amber-300 border border-amber-200 dark:border-amber-500/30 px-2.5 py-1 text-xs rounded-md flex items-center gap-1.5 mb-2 animate-pulse",children:[l.jsx(yl,{size:12,className:"text-amber-600 dark:text-amber-400 shrink-0"}),l.jsxs("span",{className:"truncate",children:[S.userName," ",i("isEditingGeneral")]})]}),e.isBlocked&&l.jsxs("div",{className:"bg-rose-50 dark:bg-rose-500/15 text-rose-800 dark:text-rose-300 border border-rose-200 dark:border-rose-500/30 px-2.5 py-1 text-xs rounded-md flex items-start gap-1.5 mb-2",children:[l.jsx(to,{size:13,className:"text-rose-600 dark:text-rose-400 shrink-0 mt-0.5"}),l.jsxs("div",{className:"truncate",children:[l.jsx("span",{className:"font-semibold text-rose-700 dark:text-rose-400 mr-1",children:o?"🚩 TRAP:":"🚩 BLOCKED:"}),l.jsx("span",{children:e.blockedReason||"Ada kendala"})]})]}),b&&!e.isBlocked&&l.jsxs("div",{className:"bg-amber-50 dark:bg-amber-500/15 text-amber-800 dark:text-amber-300 border border-amber-200 dark:border-amber-500/30 px-2.5 py-0.5 text-xs rounded-md flex items-center gap-1.5 mb-2",children:[l.jsx(jo,{size:12,className:"text-amber-600 dark:text-amber-400 shrink-0"}),l.jsxs("span",{className:"truncate text-[11px]",children:["⏳ ",j,"j tanpa pergerakan"]})]}),l.jsxs("div",{className:"flex items-start justify-between gap-2",children:[l.jsxs("div",{onClick:()=>{V.playClick(),s()},className:"flex-1 cursor-pointer",children:[l.jsx("h4",{className:"text-sm font-semibold text-slate-900 dark:text-slate-100 group-hover:text-indigo-600 dark:group-hover:text-indigo-400 transition-colors leading-snug line-clamp-2",children:e.title}),e.description&&l.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400 line-clamp-2 mt-1.5 leading-relaxed",children:e.description})]}),l.jsx("button",{...u,...c,className:"text-slate-400 dark:text-slate-500 hover:text-slate-600 dark:hover:text-slate-300 cursor-grab active:cursor-grabbing p-1 rounded-md touch-none",title:"Drag card",children:l.jsx(wg,{size:15})})]}),p>0&&l.jsxs("div",{className:"mt-3 pt-2 border-t border-slate-100 dark:border-slate-800/80",children:[l.jsxs("div",{className:"flex items-center justify-between text-xs text-slate-500 dark:text-slate-400 mb-1.5",children:[l.jsxs("span",{className:"flex items-center gap-1.5 font-medium text-[11px]",children:[l.jsx(vl,{size:12,className:"text-indigo-600 dark:text-indigo-400"}),l.jsx("span",{children:"Subtasks"})]}),l.jsxs("span",{className:"text-[11px] font-semibold",children:[g,"/",p]})]}),l.jsx("div",{className:"w-full bg-slate-100 dark:bg-slate-950/60 h-1.5 rounded-full overflow-hidden",children:l.jsx("div",{className:`h-full rounded-full transition-all duration-300 ${g===p?"bg-emerald-500":"bg-indigo-500"}`,style:{width:`${g/p*100}%`}})})]}),l.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 mt-3 pt-2.5 border-t border-slate-100 dark:border-slate-800/80",children:[l.jsx("span",{className:`text-[10px] font-medium px-2 py-0.5 rounded-full border ${R.badge}`,children:R.label}),e.dueDate&&l.jsxs("span",{className:`text-[10px] font-medium px-2 py-0.5 rounded-full border flex items-center gap-1 ${m==="overdue"?"bg-rose-50 text-rose-700 border-rose-200 dark:bg-rose-950/70 dark:text-rose-300 dark:border-rose-500/30":m==="today"?"bg-amber-50 text-amber-700 border-amber-200 dark:bg-amber-950/70 dark:text-amber-300 dark:border-amber-500/30":"bg-slate-100 text-slate-700 border-slate-200 dark:bg-slate-800 dark:text-slate-300 dark:border-slate-700/80"}`,children:[l.jsx(Dp,{size:10}),l.jsx("span",{children:m==="overdue"?`⚠️ ${e.dueDate}`:e.dueDate})]}),l.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[e.tags&&e.tags.slice(0,2).map(E=>l.jsxs("span",{className:"bg-indigo-50 dark:bg-indigo-500/10 text-indigo-700 dark:text-indigo-300 border border-indigo-200 dark:border-indigo-500/20 px-2 py-0.5 text-[10px] font-medium rounded-full",children:["#",E]},E)),e.tags&&e.tags.length>2&&l.jsxs("span",{className:"text-[10px] text-slate-400",children:["+",e.tags.length-2]})]}),e.assignee&&l.jsxs("div",{className:"flex items-center gap-1.5 bg-slate-100 dark:bg-slate-800/80 border border-slate-200 dark:border-slate-700/60 px-2 py-0.5 rounded-full text-[11px] text-slate-700 dark:text-slate-300",children:[l.jsx(Lo,{size:11,className:"text-indigo-600 dark:text-indigo-400"}),l.jsx("span",{className:"max-w-[70px] truncate font-medium",children:e.assignee})]})]})]})},Gx=({column:e,onClose:t,onSave:n})=>{const{t:r}=Rt(),[s,i]=y.useState(e.title),[o,a]=y.useState(e.maxWipLimit||0),[u,c]=y.useState(e.autoStaleHours||0),h=d=>{d.preventDefault(),V.playClick(),n(e.id,{title:s.trim()||e.title,maxWipLimit:Number(o)||0,autoStaleHours:Number(u)||0}),t()};return l.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-3 sm:p-4 bg-slate-950/70 backdrop-blur-md animate-fade-in",children:l.jsxs("div",{className:"bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-2xl shadow-2xl max-w-md w-full p-4 sm:p-6 relative text-slate-900 dark:text-slate-100 max-h-[92vh] overflow-y-auto",children:[l.jsx("button",{onClick:()=>{V.playClick(),t()},className:"absolute top-4 right-4 text-slate-400 hover:text-slate-700 dark:hover:text-slate-200 p-1 rounded-md",children:l.jsx(Ts,{size:18})}),l.jsxs("div",{className:"flex items-center gap-3 mb-4 sm:mb-5",children:[l.jsx("div",{className:"w-9 h-9 sm:w-10 sm:h-10 bg-indigo-50 dark:bg-emerald-500/10 border border-indigo-200 dark:border-emerald-500/30 rounded-xl flex items-center justify-center text-indigo-600 dark:text-emerald-400",children:l.jsx(zp,{size:18})}),l.jsxs("div",{children:[l.jsx("h2",{className:"text-sm sm:text-base font-bold text-slate-900 dark:text-slate-100",children:r("editColSettings")}),l.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400 truncate max-w-[200px]",children:e.title})]})]}),l.jsxs("form",{onSubmit:h,className:"space-y-3.5 text-xs",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs font-semibold text-slate-700 dark:text-slate-300 mb-1.5",children:r("taskTitle")}),l.jsx("input",{type:"text",value:s,onChange:d=>i(d.target.value),className:"w-full bg-slate-50 dark:bg-slate-950/70 border border-slate-300 dark:border-slate-800 rounded-lg p-2.5 text-slate-900 dark:text-slate-100 text-xs outline-none focus:border-indigo-500",required:!0})]}),l.jsxs("div",{className:"bg-amber-50/70 dark:bg-slate-950/70 border border-amber-200 dark:border-amber-500/30 p-3.5 rounded-xl",children:[l.jsxs("label",{className:"flex items-center gap-1.5 text-xs font-semibold text-amber-800 dark:text-amber-400 mb-1",children:[l.jsx(kl,{size:14,className:"text-amber-600 dark:text-amber-400 shrink-0"}),l.jsx("span",{children:r("wipLimitLabel")})]}),l.jsx("p",{className:"text-[11px] text-slate-600 dark:text-slate-400 mb-2 leading-relaxed",children:"Membatasi jumlah kartu aktif di kolom ini agar tim fokus menyelesaikan tugas sebelum mengambil yang baru."}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("input",{type:"number",min:0,max:50,value:o,onChange:d=>a(parseInt(d.target.value,10)||0),className:"w-20 sm:w-24 bg-white dark:bg-slate-900 border border-slate-300 dark:border-slate-800 rounded-lg p-2 text-slate-900 dark:text-slate-100 text-xs text-center outline-none"}),l.jsx("span",{className:"text-[11px] sm:text-xs text-amber-800 dark:text-amber-300 font-medium",children:o===0?`(${r("wipUnlimited")})`:`(Maks. ${o} kartu)`})]})]}),l.jsxs("div",{className:"bg-cyan-50/70 dark:bg-slate-950/70 border border-cyan-200 dark:border-cyan-500/30 p-3.5 rounded-xl",children:[l.jsxs("label",{className:"flex items-center gap-1.5 text-xs font-semibold text-cyan-800 dark:text-cyan-400 mb-1",children:[l.jsx(jo,{size:14,className:"text-cyan-600 dark:text-cyan-400 shrink-0"}),l.jsx("span",{children:r("autoStaleHoursLabel")})]}),l.jsx("p",{className:"text-[11px] text-slate-600 dark:text-slate-400 mb-2 leading-relaxed",children:"Memberikan tanda peringatan jika kartu tidak bergerak di kolom ini melebihi durasi yang ditentukan."}),l.jsx("div",{className:"flex items-center gap-2",children:l.jsxs("select",{value:u,onChange:d=>c(parseInt(d.target.value,10)||0),className:"bg-white dark:bg-slate-900 border border-slate-300 dark:border-slate-800 rounded-lg p-2 text-slate-900 dark:text-slate-100 text-xs outline-none flex-1",children:[l.jsx("option",{value:0,children:"🚫 Nonaktif (0 Jam)"}),l.jsx("option",{value:12,children:"⏳ 12 Jam"}),l.jsx("option",{value:24,children:"⏳ 24 Jam (1 Hari) [Standar]"}),l.jsx("option",{value:48,children:"⏳ 48 Jam (2 Hari)"}),l.jsx("option",{value:72,children:"⏳ 72 Jam (3 Hari)"}),l.jsx("option",{value:168,children:"⏳ 7 Hari"})]})})]}),l.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[l.jsx("button",{type:"button",onClick:()=>{V.playClick(),t()},className:"btn-modern-secondary py-2 px-4",children:r("cancel")}),l.jsx("button",{type:"submit",className:"btn-modern-primary py-2 px-5 font-bold",children:r("save")})]})]})]})})},Qx=({column:e,role:t,activeLocks:n,currentUserId:r,onTicketClick:s,onAddTicket:i,onDeleteColumn:o,onUpdateColumn:a})=>{const{t:u}=Rt(),[c,h]=y.useState(!1),[d,f]=y.useState(""),[k,N]=y.useState(!1),{attributes:w,listeners:S,setNodeRef:m,transform:p,transition:g,isDragging:b}=bh({id:e.id,data:{type:"Column",column:e}}),j={transform:on.Translate.toString(p),transition:g,opacity:b?.4:1},R=e.maxWipLimit>0&&e.tickets.length>=e.maxWipLimit,E=D=>{D.preventDefault(),d.trim()&&(V.playClick(),i(e.id,d.trim()),f(""),h(!1))},T=()=>{V.playClick(),confirm(u("deleteColConfirm"))&&o(e.id)};return l.jsxs("div",{ref:m,style:j,className:`column-kanban w-[82vw] max-w-[320px] sm:w-80 shrink-0 flex flex-col max-h-[calc(100vh-170px)] sm:max-h-[calc(100vh-140px)] select-none ${R?"border-amber-500/60 ring-1 ring-amber-500/30":""}`,children:[l.jsxs("div",{className:"p-3 sm:p-3.5 flex items-center justify-between border-b border-slate-200 dark:border-slate-800/80",children:[l.jsxs("div",{className:"flex items-center gap-1.5 sm:gap-2 flex-1 min-w-0",children:[t==="admin"&&l.jsx("button",{...w,...S,className:"text-slate-400 dark:text-slate-500 hover:text-slate-600 dark:hover:text-slate-300 cursor-grab active:cursor-grabbing p-1 rounded touch-none",title:u("dragColTooltip"),children:l.jsx(bg,{size:14})}),l.jsx("div",{className:"flex items-center gap-1.5 flex-1 min-w-0",children:l.jsx("h3",{className:"text-xs md:text-sm font-bold text-slate-800 dark:text-slate-200 truncate",children:e.title})})]}),l.jsxs("div",{className:"flex items-center gap-1 sm:gap-1.5 ml-1.5",children:[l.jsxs("span",{className:`text-[11px] sm:text-xs font-semibold px-2 py-0.5 rounded-full flex items-center gap-1 border ${R?"bg-amber-100 dark:bg-amber-500/20 text-amber-800 dark:text-amber-300 border-amber-300 dark:border-amber-500/40 animate-pulse":"bg-white dark:bg-slate-800/90 text-slate-700 dark:text-slate-300 border-slate-200 dark:border-slate-700/80"}`,title:e.maxWipLimit>0?`WIP Limit: Maks ${e.maxWipLimit} kartu`:"Jumlah tugas",children:[R&&l.jsx(kl,{size:10,className:"text-amber-600 dark:text-amber-400"}),l.jsxs("span",{children:[e.tickets.length,e.maxWipLimit>0?`/${e.maxWipLimit}`:""]})]}),t==="admin"&&l.jsx("button",{onClick:()=>{V.playClick(),N(!0)},className:"text-slate-400 hover:text-indigo-600 dark:hover:text-indigo-400 p-1 rounded-md transition-colors",title:u("editColSettings"),children:l.jsx(zp,{size:13})}),t==="admin"&&l.jsx("button",{onClick:T,className:"text-slate-400 hover:text-rose-600 dark:hover:text-rose-400 p-1 rounded-md transition-colors",title:"Delete Column",children:l.jsx(Os,{size:13})})]})]}),R&&l.jsxs("div",{className:"bg-amber-50 dark:bg-amber-500/15 border-b border-amber-200 dark:border-amber-500/30 text-amber-800 dark:text-amber-300 px-3 py-1 text-xs font-medium flex items-center justify-between",children:[l.jsxs("span",{className:"flex items-center gap-1.5 text-[11px]",children:[l.jsx(kl,{size:12,className:"text-amber-600 dark:text-amber-400"}),l.jsx("span",{children:u("wipLimitReached")})]}),l.jsxs("span",{className:"text-[10px] font-semibold",children:["(",e.tickets.length,"/",e.maxWipLimit,")"]})]}),l.jsxs("div",{className:"p-2.5 sm:p-3 flex-1 overflow-y-auto min-h-[100px]",children:[e.tickets.map(D=>l.jsx(Sh,{ticket:D,autoStaleHours:e.autoStaleHours||0,activeLocks:n,currentUserId:r,onClick:()=>s(D)},D.id)),e.tickets.length===0&&!c&&l.jsx("div",{className:"border border-dashed border-slate-300 dark:border-slate-800 rounded-xl p-5 sm:p-6 text-center text-slate-400 dark:text-slate-500 text-xs select-none",children:u("noTasksInCol")}),c&&l.jsxs("form",{onSubmit:E,className:"bg-white dark:bg-slate-900 border border-indigo-500/60 rounded-xl p-3 mb-2.5 shadow-sm",children:[l.jsx("textarea",{value:d,onChange:D=>f(D.target.value),placeholder:u("taskTitlePlaceholder"),rows:2,className:"w-full bg-slate-50 dark:bg-slate-950/80 border border-slate-200 dark:border-slate-800 rounded-lg text-slate-900 dark:text-slate-100 text-xs p-2.5 outline-none resize-none mb-2 focus:border-indigo-500",autoFocus:!0,onKeyDown:D=>{D.key==="Enter"&&!D.shiftKey&&(D.preventDefault(),E(D))}}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-[10px] text-slate-400",children:u("enterToAdd")}),l.jsxs("div",{className:"flex gap-1.5",children:[l.jsx("button",{type:"button",onClick:()=>h(!1),className:"px-2.5 py-1 bg-slate-100 dark:bg-slate-800 text-slate-700 dark:text-slate-300 text-xs rounded-md hover:bg-slate-200 dark:hover:bg-slate-700 transition-colors",children:u("cancel")}),l.jsx("button",{type:"submit",className:"px-3 py-1 bg-indigo-600 text-white text-xs font-bold rounded-md hover:bg-indigo-500 transition-colors",children:u("add")})]})]})]})]}),!c&&l.jsx("div",{className:"p-2 sm:p-2.5 border-t border-slate-200 dark:border-slate-800/80 bg-slate-50/50 dark:bg-slate-900/30 rounded-b-2xl",children:l.jsxs("button",{onClick:()=>{V.playClick(),h(!0)},className:"w-full py-2 bg-white dark:bg-slate-800/60 hover:bg-slate-100 dark:hover:bg-slate-800 text-slate-700 dark:text-slate-300 text-xs font-medium rounded-lg border border-slate-200 dark:border-slate-700/60 flex items-center justify-center gap-1.5 transition-all shadow-sm",children:[l.jsx(Cu,{size:14,className:"text-indigo-600 dark:text-indigo-400"}),l.jsx("span",{children:u("addNewTask")})]})}),k&&l.jsx(Gx,{column:e,onClose:()=>N(!1),onSave:(D,I)=>a(D,I)})]})},Qt=Object.create(null);Qt.open="0";Qt.close="1";Qt.ping="2";Qt.pong="3";Qt.message="4";Qt.upgrade="5";Qt.noop="6";const Ei=Object.create(null);Object.keys(Qt).forEach(e=>{Ei[Qt[e]]=e});const Cl={type:"error",data:"parser error"},Nh=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Ch=typeof ArrayBuffer=="function",Eh=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Ou=({type:e,data:t},n,r)=>Nh&&t instanceof Blob?n?r(t):hd(t,r):Ch&&(t instanceof ArrayBuffer||Eh(t))?n?r(t):hd(new Blob([t]),r):r(Qt[e]+(t||"")),hd=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function md(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let xa;function qx(e,t){if(Nh&&e.data instanceof Blob)return e.data.arrayBuffer().then(md).then(t);if(Ch&&(e.data instanceof ArrayBuffer||Eh(e.data)))return t(md(e.data));Ou(e,!1,n=>{xa||(xa=new TextEncoder),t(xa.encode(n))})}const gd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Xr=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<gd.length;e++)Xr[gd.charCodeAt(e)]=e;const Yx=e=>{let t=e.length*.75,n=e.length,r,s=0,i,o,a,u;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const c=new ArrayBuffer(t),h=new Uint8Array(c);for(r=0;r<n;r+=4)i=Xr[e.charCodeAt(r)],o=Xr[e.charCodeAt(r+1)],a=Xr[e.charCodeAt(r+2)],u=Xr[e.charCodeAt(r+3)],h[s++]=i<<2|o>>4,h[s++]=(o&15)<<4|a>>2,h[s++]=(a&3)<<6|u&63;return c},Xx=typeof ArrayBuffer=="function",Bu=(e,t)=>{if(typeof e!="string")return{type:"message",data:Th(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:Jx(e.substring(1),t)}:Ei[n]?e.length>1?{type:Ei[n],data:e.substring(1)}:{type:Ei[n]}:Cl},Jx=(e,t)=>{if(Xx){const n=Yx(e);return Th(n,t)}else return{base64:!0,data:e}},Th=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},jh="",Zx=(e,t)=>{const n=e.length,r=new Array(n);let s=0;e.forEach((i,o)=>{Ou(i,!1,a=>{r[o]=a,++s===n&&t(r.join(jh))})})},ev=(e,t)=>{const n=e.split(jh),r=[];for(let s=0;s<n.length;s++){const i=Bu(n[s],t);if(r.push(i),i.type==="error")break}return r};function tv(){return new TransformStream({transform(e,t){qx(e,n=>{const r=n.length;let s;if(r<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,r);else if(r<65536){s=new Uint8Array(3);const i=new DataView(s.buffer);i.setUint8(0,126),i.setUint16(1,r)}else{s=new Uint8Array(9);const i=new DataView(s.buffer);i.setUint8(0,127),i.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(s[0]|=128),t.enqueue(s),t.enqueue(n)})}})}let va;function li(e){return e.reduce((t,n)=>t+n.length,0)}function ui(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let s=0;s<t;s++)n[s]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function nv(e,t){va||(va=new TextDecoder);const n=[];let r=0,s=-1,i=!1;return new TransformStream({transform(o,a){for(n.push(o);;){if(r===0){if(li(n)<1)break;const u=ui(n,1);i=(u[0]&128)===128,s=u[0]&127,s<126?r=3:s===126?r=1:r=2}else if(r===1){if(li(n)<2)break;const u=ui(n,2);s=new DataView(u.buffer,u.byteOffset,u.length).getUint16(0),r=3}else if(r===2){if(li(n)<8)break;const u=ui(n,8),c=new DataView(u.buffer,u.byteOffset,u.length),h=c.getUint32(0);if(h>Math.pow(2,21)-1){a.enqueue(Cl);break}s=h*Math.pow(2,32)+c.getUint32(4),r=3}else{if(li(n)<s)break;const u=ui(n,s);a.enqueue(Bu(i?u:va.decode(u),t)),r=0}if(s===0||s>e){a.enqueue(Cl);break}}}})}const Rh=4;function Pe(e){if(e)return rv(e)}function rv(e){for(var t in Pe.prototype)e[t]=Pe.prototype[t];return e}Pe.prototype.on=Pe.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Pe.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Pe.prototype.off=Pe.prototype.removeListener=Pe.prototype.removeAllListeners=Pe.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,s=0;s<n.length;s++)if(r=n[s],r===t||r.fn===t){n.splice(s,1);break}return n.length===0&&delete this._callbacks["$"+e],this};Pe.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,s=n.length;r<s;++r)n[r].apply(this,t)}return this};Pe.prototype.emitReserved=Pe.prototype.emit;Pe.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Pe.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Bo=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Nt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),sv="arraybuffer";function _h(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const iv=Nt.setTimeout,ov=Nt.clearTimeout;function zo(e,t){t.useNativeTimers?(e.setTimeoutFn=iv.bind(Nt),e.clearTimeoutFn=ov.bind(Nt)):(e.setTimeoutFn=Nt.setTimeout.bind(Nt),e.clearTimeoutFn=Nt.clearTimeout.bind(Nt))}const av=1.33;function lv(e){return typeof e=="string"?uv(e):Math.ceil((e.byteLength||e.size)*av)}function uv(e){let t=0,n=0;for(let r=0,s=e.length;r<s;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function Lh(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function cv(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function dv(e){let t={},n=e.split("&");for(let r=0,s=n.length;r<s;r++){let i=n[r].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t}class fv extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class zu extends Pe{constructor(t){super(),this.writable=!1,zo(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new fv(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=Bu(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=cv(t);return n.length?"?"+n:""}}class pv extends zu{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};ev(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Zx(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=Lh()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let Mh=!1;try{Mh=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const hv=Mh;function mv(){}class gv extends pv{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(s,i)=>{this.onError("xhr post error",s,i)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Gt extends Pe{constructor(t,n,r){super(),this.createRequest=t,zo(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=_h(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let s in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(s)&&r.setRequestHeader(s,this._opts.extraHeaders[s])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var s;r.readyState===3&&((s=this._opts.cookieJar)===null||s===void 0||s.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(s){this.setTimeoutFn(()=>{this._onError(s)},0);return}typeof document<"u"&&(this._index=Gt.requestsCount++,Gt.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=mv,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Gt.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Gt.requestsCount=0;Gt.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",yd);else if(typeof addEventListener=="function"){const e="onpagehide"in Nt?"pagehide":"unload";addEventListener(e,yd,!1)}}function yd(){for(let e in Gt.requests)Gt.requests.hasOwnProperty(e)&&Gt.requests[e].abort()}const yv=function(){const e=Ah({xdomain:!1});return e&&e.responseType!==null}();class xv extends gv{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=yv&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Gt(Ah,this.uri(),t)}}function Ah(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||hv))return new XMLHttpRequest}catch{}if(!t)try{return new Nt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Dh=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class vv extends zu{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=Dh?{}:_h(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(s){return this.emitReserved("error",s)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],s=n===t.length-1;Ou(r,this.supportsBinary,i=>{try{this.doWrite(r,i)}catch{}s&&Bo(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=Lh()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const ka=Nt.WebSocket||Nt.MozWebSocket;class kv extends vv{createSocket(t,n,r){return Dh?new ka(t,n,r):n?new ka(t,n):new ka(t)}doWrite(t,n){this.ws.send(n)}}class bv extends zu{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=nv(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=tv();s.readable.pipeTo(t.writable),this._writer=s.writable.getWriter();const i=()=>{r.read().then(({done:a,value:u})=>{a||(this.onPacket(u),i())}).catch(a=>{})};i();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],s=n===t.length-1;this._writer.write(r).then(()=>{s&&Bo(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const wv={websocket:kv,webtransport:bv,polling:xv},Sv=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Nv=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function El(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let s=Sv.exec(e||""),i={},o=14;for(;o--;)i[Nv[o]]=s[o]||"";return n!=-1&&r!=-1&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=Cv(i,i.path),i.queryKey=Ev(i,i.query),i}function Cv(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Ev(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,i){s&&(n[s]=i)}),n}const Tl=typeof addEventListener=="function"&&typeof removeEventListener=="function",Ti=[];Tl&&addEventListener("offline",()=>{Ti.forEach(e=>e())},!1);class Rn extends Pe{constructor(t,n){if(super(),this.binaryType=sv,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=El(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=El(n.host).host);zo(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const s=r.prototype.name;this.transports.push(s),this._transportsByName[s]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=dv(this.opts.query)),Tl&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Ti.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Rh,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Rn.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Rn.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const s=this.writeBuffer[r].data;if(s&&(n+=lv(s)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Bo(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,s){if(typeof n=="function"&&(s=n,n=void 0),typeof r=="function"&&(s=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const i={type:t,data:n,options:r};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),s&&this.once("flush",s),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(Rn.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Tl&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Ti.indexOf(this._offlineEventListener);r!==-1&&Ti.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Rn.protocol=Rh;class Tv extends Rn{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;Rn.priorWebsocketSuccess=!1;const s=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",d=>{if(!r)if(d.type==="pong"&&d.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Rn.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const f=new Error("probe error");f.transport=n.name,this.emitReserved("upgradeError",f)}}))};function i(){r||(r=!0,h(),n.close(),n=null)}const o=d=>{const f=new Error("probe error: "+d);f.transport=n.name,i(),this.emitReserved("upgradeError",f)};function a(){o("transport closed")}function u(){o("socket closed")}function c(d){n&&d.name!==n.name&&i()}const h=()=>{n.removeListener("open",s),n.removeListener("error",o),n.removeListener("close",a),this.off("close",u),this.off("upgrading",c)};n.once("open",s),n.once("error",o),n.once("close",a),this.once("close",u),this.once("upgrading",c),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let jv=class extends Tv{constructor(t,n={}){const r=typeof t=="object",s=r?{...t}:{...n};(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(i=>wv[i]).filter(i=>!!i)),super(r?s:t,s)}};function Rv(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=El(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const i=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+i+":"+r.port+t,r.href=r.protocol+"://"+i+(n&&n.port===r.port?"":":"+r.port),r}const _v=typeof ArrayBuffer=="function",Lv=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Ih=Object.prototype.toString,Mv=typeof Blob=="function"||typeof Blob<"u"&&Ih.call(Blob)==="[object BlobConstructor]",Av=typeof File=="function"||typeof File<"u"&&Ih.call(File)==="[object FileConstructor]";function Fu(e){return _v&&(e instanceof ArrayBuffer||Lv(e))||Mv&&e instanceof Blob||Av&&e instanceof File}function ji(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(ji(e[n]))return!0;return!1}if(Fu(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return ji(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&ji(e[n]))return!0;return!1}function Dv(e){const t=[],n=e.data,r=e;return r.data=Ri(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Ri(e,t,n){if(!e)return e;if(Fu(e)){const r={_placeholder:!0,num:t.length};return t.push(e),r}else if(Array.isArray(e)){const r=new Array(e.length);for(let s=0;s<e.length;s++)r[s]=Ri(e[s],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON=="function"&&!n)return Ri(e.toJSON(),t,!0);const r={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=Ri(e[s],t));return r}return e}function Iv(e,t){return e.data=jl(e.data,t),delete e.attachments,e}function jl(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=jl(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=jl(e[n],t));return e}const Pv=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var ue;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(ue||(ue={}));class Ov{constructor(t){this.replacer=t}encode(t){return(t.type===ue.EVENT||t.type===ue.ACK)&&ji(t)?this.encodeAsBinary({type:t.type===ue.EVENT?ue.BINARY_EVENT:ue.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===ue.BINARY_EVENT||t.type===ue.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=Dv(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class Uu extends Pe{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===ue.BINARY_EVENT;r||n.type===ue.BINARY_ACK?(n.type=r?ue.EVENT:ue.ACK,this.reconstructor=new Bv(n)):super.emitReserved("decoded",n)}else if(Fu(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(ue[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===ue.BINARY_EVENT||r.type===ue.BINARY_ACK){const i=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const o=t.substring(i,n);if(o!=Number(o)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const a=Number(o);if(!zv(a)||a<1)throw new Error("Illegal attachments");if(a>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=a}if(t.charAt(n+1)==="/"){const i=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(i,n)}else r.nsp="/";const s=t.charAt(n+1);if(s!==""&&Number(s)==s){const i=n+1;for(;++n;){const o=t.charAt(n);if(o==null||Number(o)!=o){--n;break}if(n===t.length)break}r.id=Number(t.substring(i,n+1))}if(t.charAt(++n)){const i=this.tryParse(t.substr(n));if(Uu.isPayloadValid(r.type,i))r.data=i;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case ue.CONNECT:return xd(n);case ue.DISCONNECT:return n===void 0;case ue.CONNECT_ERROR:return typeof n=="string"||xd(n);case ue.EVENT:case ue.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Pv.indexOf(n[0])===-1);case ue.ACK:case ue.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Bv{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=Iv(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const zv=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function xd(e){return Object.prototype.toString.call(e)==="[object Object]"}const Fv=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Uu,Encoder:Ov,get PacketType(){return ue}},Symbol.toStringTag,{value:"Module"}));function At(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Uv=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Ph extends Pe{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[At(t,"open",this.onopen.bind(this)),At(t,"packet",this.onpacket.bind(this)),At(t,"error",this.onerror.bind(this)),At(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,s,i;if(Uv.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const o={type:ue.EVENT,data:n};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const h=this.ids++,d=n.pop();this._registerAckCallback(h,d),o.id=h}const a=(s=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||s===void 0?void 0:s.writable,u=this.connected&&!(!((i=this.io.engine)===null||i===void 0)&&i._hasPingExpired());return this.flags.volatile&&!a||(u?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(t,n){var r;const s=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(s===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},s),o=(...a)=>{this.io.clearTimeoutFn(i),n.apply(this,a)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...n){return new Promise((r,s)=>{const i=(o,a)=>o?s(o):r(a);i.withError=!0,n.push(i),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((s,...i)=>(this._queue[0],s!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(s)):(this._queue.shift(),n&&n(null,...i)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:ue.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case ue.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case ue.EVENT:case ue.BINARY_EVENT:this.onevent(t);break;case ue.ACK:case ue.BINARY_ACK:this.onack(t);break;case ue.DISCONNECT:this.ondisconnect();break;case ue.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...s){r||(r=!0,n.packet({type:ue.ACK,id:t,data:s}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:ue.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Mr(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Mr.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};Mr.prototype.reset=function(){this.attempts=0};Mr.prototype.setMin=function(e){this.ms=e};Mr.prototype.setMax=function(e){this.max=e};Mr.prototype.setJitter=function(e){this.jitter=e};class Rl extends Pe{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,zo(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Mr({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const s=n.parser||Fv;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new jv(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const s=At(n,"open",function(){r.onopen(),t&&t()}),i=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},o=At(n,"error",i);if(this._timeout!==!1){const a=this._timeout,u=this.setTimeoutFn(()=>{s(),i(new Error("timeout")),n.close()},a);this.opts.autoUnref&&u.unref(),this.subs.push(()=>{this.clearTimeoutFn(u)})}return this.subs.push(s),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(At(t,"ping",this.onping.bind(this)),At(t,"data",this.ondata.bind(this)),At(t,"error",this.onerror.bind(this)),At(t,"close",this.onclose.bind(this)),At(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Bo(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new Ph(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(s=>{s?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",s)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Wr={};function _i(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Rv(e,t.path||"/socket.io"),r=n.source,s=n.id,i=n.path,o=Wr[s]&&i in Wr[s].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let u;return a?u=new Rl(r,t):(Wr[s]||(Wr[s]=new Rl(r,t)),u=Wr[s]),n.query&&!t.query&&(t.query=n.queryKey),u.socket(n.path,t)}Object.assign(_i,{Manager:Rl,Socket:Ph,io:_i,connect:_i});let kn=null;function $v(e,t,n,r){return kn&&kn.disconnect(),kn=_i({auth:{boardId:e,key:t,userName:n,userId:r},transports:["websocket","polling"]}),kn}function ye(){return kn}function Hv(){kn&&(kn.disconnect(),kn=null)}function vd(e,t=500){const n=y.useRef(null),r=y.useRef(e);r.current=e;const s=y.useCallback((...o)=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{r.current(...o)},t)},[t]),i=y.useCallback(()=>{n.current&&(clearTimeout(n.current),n.current=null)},[]);return y.useEffect(()=>i,[i]),[s,i]}function Vv(e){try{const t=Date.now()-new Date(e).getTime(),n=Math.floor(t/1e3);if(n<60)return`${Math.max(1,n)} detik lalu`;const r=Math.floor(n/60);if(r<60)return`${r} menit lalu`;const s=Math.floor(r/60);return s<24?`${s} jam lalu`:`${Math.floor(s/24)} hari lalu`}catch{return e}}const Kv=({ticket:e,boardId:t,boardKey:n,activeLocks:r,currentUserId:s,onClose:i,onUpdateTicket:o,onDeleteTicket:a})=>{const{t:u}=Rt(),[c,h]=y.useState(e.title),[d,f]=y.useState(e.description),[k,N]=y.useState(e.priority),[w,S]=y.useState(e.tags||[]),[m,p]=y.useState(""),[g,b]=y.useState(e.subtasks||[]),[j,R]=y.useState(""),[E,T]=y.useState(e.dueDate||""),[D,I]=y.useState(e.isBlocked||!1),[X,we]=y.useState(e.blockedReason||""),[me,Re]=y.useState(e.assignee||""),[et,Fe]=y.useState(!1),[ge,A]=y.useState([]),[W,v]=y.useState(!1);y.useEffect(()=>{h(e.title),f(e.description),N(e.priority),S(e.tags||[]),b(e.subtasks||[]),T(e.dueDate||""),I(e.isBlocked||!1),we(e.blockedReason||""),Re(e.assignee||"")},[e]),y.useEffect(()=>{t&&n&&e.id&&(v(!0),Gg(t,e.id,n).then(H=>A(H)).catch(()=>{}).finally(()=>v(!1)));const C=ye();if(C){const H=Y=>{Y.activity&&Y.activity.ticketId===e.id&&A(M=>[Y.activity,...M])};return C.on("activity_logged",H),()=>{C.off("activity_logged",H)}}},[t,n,e.id]);const x=r.find(C=>C.ticketId===e.id&&C.field==="title"&&C.userId!==s),_=r.find(C=>C.ticketId===e.id&&C.field==="description"&&C.userId!==s),[B]=vd(C=>{Fe(!0);const H=ye();H&&H.emit("update_ticket",{ticketId:e.id,updates:{title:C}}),o(e.id,{title:C}),setTimeout(()=>Fe(!1),300)},500),[K]=vd(C=>{Fe(!0);const H=ye();H&&H.emit("update_ticket",{ticketId:e.id,updates:{description:C}}),o(e.id,{description:C}),setTimeout(()=>Fe(!1),300)},600),q=C=>{const H=C.target.value;h(H),B(H)},F=()=>{const C=ye();C&&C.emit("lock_field",{ticketId:e.id,field:"title"})},$=()=>{const C=ye();C&&C.emit("unlock_field",{ticketId:e.id,field:"title"})},J=C=>{const H=C.target.value;f(H),K(H)},ne=()=>{const C=ye();C&&C.emit("lock_field",{ticketId:e.id,field:"description"})},Q=()=>{const C=ye();C&&C.emit("unlock_field",{ticketId:e.id,field:"description"})},ae=C=>{V.playClick(),N(C);const H=ye();H&&H.emit("update_ticket",{ticketId:e.id,updates:{priority:C}}),o(e.id,{priority:C})},se=C=>{if(C.preventDefault(),!j.trim())return;V.playClick();const H={id:"st_"+Math.random().toString(36).substring(2,9),title:j.trim(),completed:!1},Y=[...g,H];b(Y),R("");const M=ye();M&&M.emit("update_ticket",{ticketId:e.id,updates:{subtasks:Y}}),o(e.id,{subtasks:Y})},he=C=>{V.playClick();const H=g.map(M=>M.id===C?{...M,completed:!M.completed}:M);b(H);const Y=ye();Y&&Y.emit("update_ticket",{ticketId:e.id,updates:{subtasks:H}}),o(e.id,{subtasks:H})},ee=C=>{V.playClick();const H=g.filter(M=>M.id!==C);b(H);const Y=ye();Y&&Y.emit("update_ticket",{ticketId:e.id,updates:{subtasks:H}}),o(e.id,{subtasks:H})},ve=C=>{const H=C.target.value;T(H);const Y=ye();Y&&Y.emit("update_ticket",{ticketId:e.id,updates:{dueDate:H||null}}),o(e.id,{dueDate:H||null})},_e=()=>{V.playLock();const C=!D;I(C);const H=ye();H&&H.emit("update_ticket",{ticketId:e.id,updates:{isBlocked:C,blockedReason:C?X:null}}),o(e.id,{isBlocked:C,blockedReason:C?X:null})},Ue=()=>{const C=ye();C&&C.emit("update_ticket",{ticketId:e.id,updates:{blockedReason:X.trim()||null}}),o(e.id,{blockedReason:X.trim()||null})},P=C=>{if(C.key==="Enter"&&m.trim()){C.preventDefault(),V.playClick();const H=m.trim().replace(/^#/,"");if(!w.includes(H)){const Y=[...w,H];S(Y),p("");const M=ye();M&&M.emit("update_ticket",{ticketId:e.id,updates:{tags:Y}}),o(e.id,{tags:Y})}}},U=C=>{V.playClick();const H=w.filter(M=>M!==C);S(H);const Y=ye();Y&&Y.emit("update_ticket",{ticketId:e.id,updates:{tags:H}}),o(e.id,{tags:H})},z=()=>{const C=ye();C&&C.emit("update_ticket",{ticketId:e.id,updates:{assignee:me.trim()||null}}),o(e.id,{assignee:me.trim()||null})},oe=()=>{if(V.playClick(),confirm(u("deleteTaskConfirm"))){const C=ye();C&&C.emit("delete_ticket",{ticketId:e.id,columnId:e.columnId}),a(e.id,e.columnId),i()}};return l.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-3 sm:p-4 bg-slate-950/70 backdrop-blur-md animate-fade-in",children:l.jsxs("div",{className:"bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-2xl shadow-2xl max-w-2xl w-full p-4 sm:p-7 relative max-h-[92vh] overflow-y-auto text-slate-900 dark:text-slate-100",children:[l.jsx("button",{onClick:()=>{V.playClick(),i()},className:"absolute top-4 right-4 sm:top-5 sm:right-5 text-slate-400 hover:text-slate-700 dark:hover:text-slate-200 p-1 rounded-md transition-colors",children:l.jsx(Ts,{size:20})}),l.jsx("div",{className:"flex items-center gap-2 mb-4",children:l.jsxs("span",{className:"text-xs font-medium bg-emerald-50 text-emerald-700 dark:bg-emerald-500/10 dark:text-emerald-400 border border-emerald-200 dark:border-emerald-500/20 px-2.5 py-1 rounded-full flex items-center gap-1.5",children:[l.jsx(_o,{size:13,className:"text-emerald-600 dark:text-emerald-400"}),l.jsx("span",{children:u(et?"autoSaving":"synced")})]})}),l.jsxs("div",{className:"mb-4",children:[l.jsx("label",{className:"block text-xs font-semibold text-slate-700 dark:text-slate-300 mb-1.5",children:u("taskTitle")}),x&&l.jsxs("div",{className:"bg-amber-50 dark:bg-amber-500/15 border border-amber-200 dark:border-amber-500/30 text-amber-800 dark:text-amber-300 text-xs px-3 py-1.5 mb-2 rounded-lg flex items-center gap-2 animate-pulse",children:[l.jsx(yl,{size:14,className:"shrink-0 text-amber-600 dark:text-amber-400"}),l.jsxs("span",{children:[x.userName," ",u("isTypingTitle")]})]}),l.jsx("input",{type:"text",value:c,disabled:!!x,onChange:q,onFocus:F,onBlur:$,placeholder:"Judul tugas...",className:`w-full bg-slate-50 dark:bg-slate-950/70 border ${x?"border-amber-500/40 opacity-60 cursor-not-allowed":"border-slate-300 dark:border-slate-800 focus:border-indigo-500"} text-slate-900 dark:text-slate-100 text-sm font-semibold p-3 rounded-lg outline-none transition-colors`})]}),l.jsxs("div",{className:"mb-5",children:[l.jsx("label",{className:"block text-xs font-semibold text-slate-700 dark:text-slate-300 mb-1.5",children:u("taskDesc")}),_&&l.jsxs("div",{className:"bg-amber-50 dark:bg-amber-500/15 border border-amber-200 dark:border-amber-500/30 text-amber-800 dark:text-amber-300 text-xs px-3 py-1.5 mb-2 rounded-lg flex items-center gap-2 animate-pulse",children:[l.jsx(yl,{size:14,className:"shrink-0 text-amber-600 dark:text-amber-400"}),l.jsxs("span",{children:[_.userName," ",u("isTypingDesc")]})]}),l.jsx("textarea",{rows:4,value:d,disabled:!!_,onChange:J,onFocus:ne,onBlur:Q,placeholder:u("taskDescPlaceholder"),className:`w-full bg-slate-50 dark:bg-slate-950/70 border ${_?"border-amber-500/40 opacity-60 cursor-not-allowed":"border-slate-300 dark:border-slate-800 focus:border-indigo-500"} text-slate-800 dark:text-slate-200 text-xs p-3 rounded-lg outline-none leading-relaxed transition-colors`})]}),l.jsxs("div",{className:"mb-5",children:[l.jsx("label",{className:"block text-xs font-semibold text-slate-700 dark:text-slate-300 mb-2",children:u("priorityLabel")}),l.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-2",children:[{id:"LOW",label:`🟢 ${u("prioLow")}`,activeClass:"bg-emerald-50 dark:bg-emerald-500/20 text-emerald-700 dark:text-emerald-300 border-emerald-500 font-bold"},{id:"MEDIUM",label:`🔵 ${u("prioMedium")}`,activeClass:"bg-blue-50 dark:bg-blue-500/20 text-blue-700 dark:text-blue-300 border-blue-500 font-bold"},{id:"HIGH",label:`🟡 ${u("prioHigh")}`,activeClass:"bg-amber-50 dark:bg-amber-500/20 text-amber-700 dark:text-amber-300 border-amber-500 font-bold"},{id:"URGENT",label:`🔴 ${u("prioUrgent")}`,activeClass:"bg-rose-50 dark:bg-rose-500/20 text-rose-700 dark:text-rose-300 border-rose-500 font-bold"}].map(C=>l.jsx("button",{type:"button",onClick:()=>ae(C.id),className:`py-2 px-3 text-xs font-medium rounded-lg border transition-all ${k===C.id?C.activeClass:"bg-slate-50 dark:bg-slate-950/60 border-slate-300 dark:border-slate-800 text-slate-600 dark:text-slate-400 hover:text-slate-900 dark:hover:text-slate-200"}`,children:C.label},C.id))})]}),l.jsxs("div",{className:"mb-5 bg-slate-50 dark:bg-slate-950/60 border border-slate-200 dark:border-slate-800 rounded-xl p-4",children:[l.jsx("div",{className:"flex items-center justify-between mb-3",children:l.jsxs("label",{className:"text-xs font-bold text-slate-800 dark:text-slate-200 flex items-center gap-2",children:[l.jsx(vl,{size:15,className:"text-indigo-600 dark:text-emerald-400"}),l.jsxs("span",{children:[u("subtasksLabel")," (",g.filter(C=>C.completed).length,"/",g.length,")"]})]})}),l.jsx("div",{className:"space-y-2 mb-3",children:g.map(C=>l.jsxs("div",{className:"flex items-center justify-between gap-2 bg-white dark:bg-slate-900/80 border border-slate-200 dark:border-slate-800 p-2.5 rounded-lg group",children:[l.jsxs("div",{onClick:()=>he(C.id),className:"flex items-center gap-2.5 cursor-pointer flex-1",children:[l.jsx("button",{type:"button",className:"text-indigo-600 dark:text-emerald-400",children:C.completed?l.jsx(vl,{size:16}):l.jsx(Eg,{size:16})}),l.jsx("span",{className:`text-xs ${C.completed?"line-through text-slate-400 dark:text-slate-500":"text-slate-800 dark:text-slate-200"}`,children:C.title})]}),l.jsx("button",{type:"button",onClick:()=>ee(C.id),className:"text-slate-400 hover:text-rose-600 dark:hover:text-rose-400 p-1 opacity-0 group-hover:opacity-100 transition-opacity",children:l.jsx(Ts,{size:14})})]},C.id))}),l.jsxs("form",{onSubmit:se,className:"flex items-center gap-2",children:[l.jsx("input",{type:"text",value:j,onChange:C=>R(C.target.value),placeholder:u("addSubtaskPlaceholder"),className:"flex-1 bg-white dark:bg-slate-900 border border-slate-300 dark:border-slate-800 p-2 text-xs text-slate-900 dark:text-slate-100 rounded-lg outline-none focus:border-indigo-500"}),l.jsxs("button",{type:"submit",className:"btn-modern-primary py-2 px-3 text-xs flex items-center gap-1 font-semibold",children:[l.jsx(Cu,{size:14}),l.jsx("span",{children:u("add")})]})]})]}),l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 mb-5",children:[l.jsxs("div",{className:"bg-slate-50 dark:bg-slate-950/60 border border-slate-200 dark:border-slate-800 p-3.5 rounded-xl",children:[l.jsxs("label",{className:"block text-xs font-semibold text-slate-700 dark:text-slate-300 mb-1.5 flex items-center gap-1.5",children:[l.jsx(Dp,{size:14,className:"text-indigo-600 dark:text-emerald-400"}),l.jsx("span",{children:u("dueDateLabel")})]}),l.jsx("input",{type:"date",value:E,onChange:ve,className:"w-full bg-white dark:bg-slate-900 border border-slate-300 dark:border-slate-800 p-2 text-xs text-slate-900 dark:text-slate-100 rounded-lg outline-none"})]}),l.jsxs("div",{className:"bg-slate-50 dark:bg-slate-950/60 border border-slate-200 dark:border-slate-800 p-3.5 rounded-xl",children:[l.jsxs("label",{className:"block text-xs font-semibold text-slate-700 dark:text-slate-300 mb-1.5 flex items-center gap-1.5",children:[l.jsx(to,{size:14,className:"text-rose-600 dark:text-rose-400"}),l.jsx("span",{children:u("blockedLabel")})]}),l.jsxs("button",{type:"button",onClick:_e,className:`w-full py-2 px-3 text-xs font-semibold rounded-lg border flex items-center justify-center gap-2 transition-all ${D?"bg-rose-50 dark:bg-rose-500/20 text-rose-700 dark:text-rose-300 border-rose-500":"bg-white dark:bg-slate-900 border-slate-300 dark:border-slate-800 text-slate-600 dark:text-slate-400 hover:text-slate-900 dark:hover:text-slate-200"}`,children:[l.jsx(to,{size:14}),l.jsx("span",{children:D?"🚩 Status: BLOCKED":"Normal (Tidak Macet)"})]}),D&&l.jsx("input",{type:"text",value:X,onChange:C=>we(C.target.value),onBlur:Ue,placeholder:u("blockedReasonPlaceholder"),className:"w-full mt-2 bg-white dark:bg-slate-900 border border-rose-400 dark:border-rose-500/50 p-2 text-xs text-rose-700 dark:text-rose-300 rounded-lg outline-none"})]})]}),l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 mb-5",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs font-semibold text-slate-700 dark:text-slate-300 mb-1.5",children:u("tagsLabel")}),l.jsx("div",{className:"flex flex-wrap gap-1.5 mb-2",children:w.map(C=>l.jsxs("span",{className:"bg-indigo-50 dark:bg-indigo-500/15 text-indigo-700 dark:text-indigo-300 border border-indigo-200 dark:border-indigo-500/30 px-2.5 py-0.5 text-xs font-medium rounded-full flex items-center gap-1.5",children:["#",C,l.jsx("button",{onClick:()=>U(C),className:"text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-200",children:"×"})]},C))}),l.jsx("input",{type:"text",value:m,onChange:C=>p(C.target.value),onKeyDown:P,placeholder:u("tagsPlaceholder"),className:"w-full bg-slate-50 dark:bg-slate-950/70 border border-slate-300 dark:border-slate-800 text-xs p-2 text-indigo-700 dark:text-indigo-300 rounded-lg outline-none focus:border-indigo-500"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs font-semibold text-slate-700 dark:text-slate-300 mb-1.5",children:u("assigneeLabel")}),l.jsx("input",{type:"text",value:me,onChange:C=>Re(C.target.value),onBlur:z,placeholder:u("assigneePlaceholder"),className:"w-full bg-slate-50 dark:bg-slate-950/70 border border-slate-300 dark:border-slate-800 text-xs p-2 text-slate-900 dark:text-slate-200 rounded-lg outline-none focus:border-indigo-500"})]})]}),l.jsxs("div",{className:"mb-6 bg-slate-50 dark:bg-slate-950/60 border border-slate-200 dark:border-slate-800 rounded-xl p-3.5 sm:p-4",children:[l.jsxs("div",{className:"flex items-center justify-between mb-2.5",children:[l.jsxs("label",{className:"text-xs font-bold text-slate-800 dark:text-slate-200 flex items-center gap-2",children:[l.jsx(Nu,{size:14,className:"text-indigo-600 dark:text-indigo-400"}),l.jsx("span",{children:u("cardMovementHistory")})]}),l.jsxs("span",{className:"text-[10px] text-slate-400 font-mono",children:[ge.length," catatan"]})]}),l.jsx("div",{className:"space-y-2 max-h-44 overflow-y-auto pr-1",children:W?l.jsx("p",{className:"text-[11px] text-slate-400 text-center py-2",children:"Memuat riwayat..."}):ge.length===0?l.jsx("p",{className:"text-[11px] text-slate-400 text-center py-2",children:"Belum ada pergerakan kolom yang tercatat"}):ge.map(C=>l.jsx("div",{className:"bg-white dark:bg-slate-900/80 border border-slate-200 dark:border-slate-800/80 p-2.5 rounded-lg text-xs flex items-start justify-between gap-2",children:l.jsxs("div",{className:"space-y-0.5 flex-1 min-w-0",children:[C.action==="MOVED"&&C.fromColumnTitle&&C.toColumnTitle?l.jsxs("p",{className:"text-[11px] text-slate-700 dark:text-slate-300 flex items-center gap-1.5 flex-wrap",children:[l.jsx("span",{className:"font-semibold",children:C.fromColumnTitle}),l.jsx(xl,{size:11,className:"text-slate-400"}),l.jsx("span",{className:"font-semibold text-indigo-600 dark:text-indigo-400",children:C.toColumnTitle})]}):l.jsx("p",{className:"text-[11px] text-slate-700 dark:text-slate-300 font-medium",children:C.details||C.action}),l.jsxs("div",{className:"flex items-center gap-2 text-[10px] text-slate-400",children:[l.jsxs("span",{className:"flex items-center gap-0.5",children:[l.jsx(Lo,{size:10}),l.jsx("span",{children:C.userName})]}),l.jsx("span",{children:"•"}),l.jsxs("span",{className:"flex items-center gap-0.5",children:[l.jsx(jo,{size:10}),l.jsx("span",{children:Vv(C.createdAt)})]})]})]})},C.id))})]}),l.jsxs("div",{className:"flex items-center justify-between pt-4 border-t border-slate-200 dark:border-slate-800",children:[l.jsxs("button",{onClick:oe,className:"btn-modern-danger flex items-center gap-1.5 text-xs py-2 px-3.5",children:[l.jsx(Os,{size:14}),l.jsx("span",{children:u("deleteTask")})]}),l.jsx("button",{onClick:()=>{V.playClick(),i()},className:"btn-modern-primary py-2 px-6 font-bold",children:u("save")})]})]})})},Wv=({boardId:e,adminKey:t,onClose:n})=>{const{t:r}=Rt(),[s,i]=y.useState(!1),[o,a]=y.useState(null),[u,c]=y.useState(!1),[h,d]=y.useState(""),f=async()=>{V.playClick(),i(!0),d("");try{const N=await Qg(e,t),w=`${window.location.origin}${N.memberUrlFragment}`;a(w);const S=ye();S&&S.emit("member_key_rotated"),V.playVictory()}catch(N){d(N.message||"Failed to rotate key")}finally{i(!1)}},k=async()=>{o&&(V.playClick(),await navigator.clipboard.writeText(o),c(!0),setTimeout(()=>c(!1),2e3))};return l.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-3 sm:p-4 bg-slate-950/70 backdrop-blur-md animate-fade-in",children:l.jsxs("div",{className:"bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-2xl shadow-2xl max-w-lg w-full p-4 sm:p-7 relative text-slate-900 dark:text-slate-100 max-h-[92vh] overflow-y-auto",children:[l.jsx("button",{onClick:()=>{V.playClick(),n()},className:"absolute top-4 right-4 text-slate-400 hover:text-slate-700 dark:hover:text-slate-200 p-1 rounded-md",children:l.jsx(Ts,{size:18})}),l.jsxs("div",{className:"flex items-center gap-3 mb-4 sm:mb-5",children:[l.jsx("div",{className:"w-9 h-9 sm:w-10 sm:h-10 bg-amber-50 dark:bg-amber-500/10 border border-amber-200 dark:border-amber-500/30 rounded-xl flex items-center justify-center text-amber-600 dark:text-amber-400",children:l.jsx(no,{size:18})}),l.jsxs("div",{children:[l.jsx("h2",{className:"text-sm sm:text-base font-bold text-slate-900 dark:text-slate-100",children:r("keyRotationTitle")}),l.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400",children:r("keyRotationSubtitle")})]})]}),o?l.jsxs("div",{className:"space-y-3.5",children:[l.jsxs("div",{className:"bg-emerald-50 dark:bg-emerald-500/15 border border-emerald-200 dark:border-emerald-500/30 p-3.5 rounded-xl text-xs text-emerald-800 dark:text-emerald-200",children:[l.jsx("p",{className:"font-bold text-emerald-700 dark:text-emerald-400 mb-1 text-xs",children:r("newLinkActiveTitle")}),l.jsx("p",{className:"text-xs leading-relaxed opacity-90",children:r("newLinkActiveDesc")})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("input",{type:"text",readOnly:!0,value:o,className:"bg-slate-50 dark:bg-slate-950/70 border border-slate-300 dark:border-slate-800 text-slate-800 dark:text-slate-300 font-mono text-[11px] sm:text-xs p-2.5 rounded-lg flex-1 select-all outline-none"}),l.jsxs("button",{onClick:k,className:`btn-modern ${u?"bg-emerald-500 text-slate-950":"btn-modern-primary"} py-2.5 px-3 flex items-center gap-1.5`,children:[u?l.jsx(ml,{size:14}):l.jsx(gl,{size:14}),l.jsx("span",{children:r(u?"copied":"copy")})]})]}),l.jsx("div",{className:"flex justify-end pt-2",children:l.jsx("button",{onClick:()=>{V.playClick(),n()},className:"btn-modern-primary py-2 px-6 font-bold",children:r("done")})})]}):l.jsxs("div",{className:"space-y-3.5",children:[l.jsxs("div",{className:"bg-rose-50 dark:bg-rose-500/15 border border-rose-200 dark:border-rose-500/30 p-3.5 rounded-xl text-xs text-rose-800 dark:text-rose-200 flex items-start gap-2.5",children:[l.jsx(Ro,{size:18,className:"text-rose-600 dark:text-rose-400 shrink-0 mt-0.5"}),l.jsxs("div",{children:[l.jsx("p",{className:"font-bold mb-1 text-rose-700 dark:text-rose-300",children:r("keyRotationWarningTitle")}),l.jsx("p",{className:"text-xs leading-relaxed opacity-90",children:r("keyRotationWarningDesc")})]})]}),h&&l.jsx("p",{className:"text-xs text-rose-600 dark:text-rose-400 font-bold",children:h}),l.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[l.jsx("button",{onClick:()=>{V.playClick(),n()},className:"btn-modern-secondary py-2 px-4",children:r("cancel")}),l.jsxs("button",{onClick:f,disabled:s,className:"btn-modern-danger py-2 px-4 font-bold flex items-center gap-2",children:[l.jsx(no,{size:14,className:s?"animate-spin":""}),l.jsx("span",{children:r(s?"rotatingBtn":"regenerateBtn")})]})]})]})]})})},Gv=({onKeyProvided:e})=>{const{t}=Rt(),[n,r]=y.useState(""),[s,i]=y.useState(""),o=a=>{var c,h;a.preventDefault(),V.playClick();const u=n.trim();if(!u){i(t("keyPromptError"));return}if(u.includes("#admin=")){const d=(c=u.split("#admin=")[1])==null?void 0:c.split("&")[0];if(d){window.location.hash=`admin=${d}`,e(d,"admin");return}}else if(u.includes("#member=")){const d=(h=u.split("#member=")[1])==null?void 0:h.split("&")[0];if(d){window.location.hash=`member=${d}`,e(d,"member");return}}window.location.hash=`member=${u}`,e(u)};return l.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-3 sm:p-4 bg-slate-950/70 backdrop-blur-md",children:l.jsxs("div",{className:"bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-2xl shadow-2xl max-w-md w-full p-4 sm:p-7 text-center text-slate-900 dark:text-slate-100 max-h-[92vh] overflow-y-auto",children:[l.jsx("div",{className:"w-10 h-10 sm:w-12 sm:h-12 bg-amber-50 dark:bg-amber-500/10 border border-amber-200 dark:border-amber-500/30 rounded-2xl mx-auto flex items-center justify-center mb-3 text-amber-600 dark:text-amber-400",children:l.jsx(Sg,{size:22})}),l.jsx("h2",{className:"text-sm sm:text-base md:text-lg font-bold text-slate-900 dark:text-slate-100 mb-1.5",children:t("keyPromptTitle")}),l.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400 mb-4 sm:mb-5 leading-relaxed",children:t("keyPromptDesc")}),s&&l.jsxs("div",{className:"bg-rose-50 dark:bg-rose-500/15 border border-rose-200 dark:border-rose-500/30 text-rose-700 dark:text-rose-300 text-xs p-2.5 sm:p-3 rounded-lg mb-4 flex items-center gap-2 text-left",children:[l.jsx(Ro,{size:15,className:"shrink-0 text-rose-600 dark:text-rose-400"}),l.jsx("span",{children:s})]}),l.jsxs("form",{onSubmit:o,className:"space-y-3.5",children:[l.jsx("input",{type:"text",value:n,onChange:a=>{r(a.target.value),i("")},placeholder:t("keyPromptPlaceholder"),className:"w-full bg-slate-50 dark:bg-slate-950/70 border border-slate-300 dark:border-slate-800 rounded-lg text-indigo-600 dark:text-emerald-400 font-mono text-xs p-3 outline-none focus:border-indigo-500",autoFocus:!0}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx("button",{type:"button",onClick:()=>{V.playClick(),window.location.href="/"},className:"btn-modern-secondary flex-1 py-2.5 text-xs",children:t("backToHome")}),l.jsx("button",{type:"submit",className:"btn-modern-primary flex-1 py-2.5 font-bold text-xs",children:t("unlockBoardBtn")})]})]})]})})};function Qv(e){try{const t=Date.now()-new Date(e).getTime(),n=Math.floor(t/1e3);if(n<60)return`${Math.max(1,n)} detik lalu`;const r=Math.floor(n/60);if(r<60)return`${r} menit lalu`;const s=Math.floor(r/60);return s<24?`${s} jam lalu`:`${Math.floor(s/24)} hari lalu`}catch{return e}}const qv=({boardId:e,boardKey:t,onClose:n})=>{const{t:r}=Rt(),[s,i]=y.useState([]),[o,a]=y.useState(!0),[u,c]=y.useState(null),h=async()=>{a(!0),c(null);try{const f=await Wg(e,t,60);i(f)}catch(f){c(f.message||"Failed to load activity logs")}finally{a(!1)}};y.useEffect(()=>{h()},[e,t]);const d=f=>{switch(f.action){case"MOVED":return l.jsxs("span",{className:"bg-indigo-50 dark:bg-indigo-500/15 text-indigo-700 dark:text-indigo-300 border border-indigo-200 dark:border-indigo-500/30 text-[10px] font-semibold px-2 py-0.5 rounded-full flex items-center gap-1 shrink-0",children:[l.jsx(xl,{size:11,className:"text-indigo-600 dark:text-indigo-400"}),l.jsx("span",{children:"Pindah Kolom"})]});case"CREATED":return l.jsxs("span",{className:"bg-emerald-50 dark:bg-emerald-500/15 text-emerald-700 dark:text-emerald-300 border border-emerald-200 dark:border-emerald-500/30 text-[10px] font-semibold px-2 py-0.5 rounded-full flex items-center gap-1 shrink-0",children:[l.jsx(Pp,{size:11,className:"text-emerald-600 dark:text-emerald-400"}),l.jsx("span",{children:"Dibuat"})]});case"BLOCKED":return l.jsxs("span",{className:"bg-rose-50 dark:bg-rose-500/15 text-rose-700 dark:text-rose-300 border border-rose-200 dark:border-rose-500/30 text-[10px] font-semibold px-2 py-0.5 rounded-full flex items-center gap-1 shrink-0",children:[l.jsx(to,{size:11,className:"text-rose-600 dark:text-rose-400"}),l.jsx("span",{children:"Blocked"})]});case"UNBLOCKED":return l.jsxs("span",{className:"bg-cyan-50 dark:bg-cyan-500/15 text-cyan-700 dark:text-cyan-300 border border-cyan-200 dark:border-cyan-500/30 text-[10px] font-semibold px-2 py-0.5 rounded-full flex items-center gap-1 shrink-0",children:[l.jsx(Ip,{size:11,className:"text-cyan-600 dark:text-cyan-400"}),l.jsx("span",{children:"Unblocked"})]});case"DELETED":return l.jsxs("span",{className:"bg-slate-100 dark:bg-slate-800 text-slate-600 dark:text-slate-400 border border-slate-300 dark:border-slate-700 text-[10px] font-semibold px-2 py-0.5 rounded-full flex items-center gap-1 shrink-0",children:[l.jsx(Os,{size:11}),l.jsx("span",{children:"Dihapus"})]});default:return null}};return l.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-3 sm:p-4 bg-slate-950/70 backdrop-blur-md animate-fade-in",children:l.jsxs("div",{className:"bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-2xl shadow-2xl max-w-xl w-full p-4 sm:p-7 relative text-slate-900 dark:text-slate-100 max-h-[92vh] flex flex-col",children:[l.jsxs("div",{className:"flex items-center justify-between pb-3.5 border-b border-slate-200 dark:border-slate-800",children:[l.jsxs("div",{className:"flex items-center gap-2.5",children:[l.jsx("div",{className:"w-9 h-9 bg-indigo-50 dark:bg-indigo-500/10 border border-indigo-200 dark:border-indigo-500/30 rounded-xl flex items-center justify-center text-indigo-600 dark:text-indigo-400 shrink-0",children:l.jsx(Nu,{size:18})}),l.jsxs("div",{children:[l.jsx("h2",{className:"text-sm sm:text-base font-bold text-slate-900 dark:text-white tracking-tight",children:r("activityLogTitle")}),l.jsx("p",{className:"text-[11px] text-slate-500 dark:text-slate-400",children:"Log pergerakan kartu & aktivitas real-time tersimpan di database"})]})]}),l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx("button",{onClick:()=>{V.playClick(),h()},className:"p-1.5 text-slate-400 hover:text-slate-700 dark:hover:text-slate-200 rounded-md transition-colors",title:"Refresh logs",children:l.jsx(no,{size:15,className:o?"animate-spin text-indigo-500":""})}),l.jsx("button",{onClick:()=>{V.playClick(),n()},className:"p-1.5 text-slate-400 hover:text-slate-700 dark:hover:text-slate-200 rounded-md transition-colors",children:l.jsx(Ts,{size:18})})]})]}),l.jsx("div",{className:"flex-1 overflow-y-auto py-3.5 space-y-2.5 pr-1",children:o&&s.length===0?l.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center text-slate-400 text-xs gap-2",children:[l.jsx("div",{className:"w-6 h-6 border-2 border-indigo-500 border-t-transparent rounded-full animate-spin"}),l.jsx("span",{children:"Memuat riwayat database..."})]}):u?l.jsx("div",{className:"p-4 bg-rose-50 dark:bg-rose-500/10 border border-rose-200 dark:border-rose-500/30 text-rose-700 dark:text-rose-300 rounded-xl text-xs",children:u}):s.length===0?l.jsx("div",{className:"p-8 text-center text-slate-400 text-xs border border-dashed border-slate-200 dark:border-slate-800 rounded-xl",children:r("noActivityLogs")}):s.map(f=>l.jsx("div",{className:"bg-slate-50 dark:bg-slate-950/60 border border-slate-200 dark:border-slate-800/80 p-3 rounded-xl flex items-start justify-between gap-3 text-xs",children:l.jsxs("div",{className:"space-y-1 min-w-0 flex-1",children:[l.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[d(f),l.jsx("span",{className:"font-bold text-slate-900 dark:text-slate-100 truncate",children:f.ticketTitle||"Tugas"})]}),f.fromColumnTitle&&f.toColumnTitle&&f.action==="MOVED"?l.jsxs("p",{className:"text-[11px] text-slate-600 dark:text-slate-300 flex items-center gap-1.5 flex-wrap",children:[l.jsx("span",{className:"px-1.5 py-0.5 bg-slate-200/80 dark:bg-slate-800 rounded font-medium",children:f.fromColumnTitle}),l.jsx(xl,{size:12,className:"text-slate-400"}),l.jsx("span",{className:"px-1.5 py-0.5 bg-indigo-100 dark:bg-indigo-900/50 text-indigo-800 dark:text-indigo-300 rounded font-semibold",children:f.toColumnTitle})]}):f.details?l.jsx("p",{className:"text-[11px] text-slate-500 dark:text-slate-400",children:f.details}):null,l.jsxs("div",{className:"flex items-center gap-3 pt-0.5 text-[10px] text-slate-400 dark:text-slate-500",children:[l.jsxs("span",{className:"flex items-center gap-1",children:[l.jsx(Lo,{size:11}),l.jsx("span",{className:"font-medium text-slate-600 dark:text-slate-400",children:f.userName})]}),l.jsxs("span",{className:"flex items-center gap-1",children:[l.jsx(jo,{size:11}),l.jsx("span",{children:Qv(f.createdAt)})]})]})]})},f.id))}),l.jsx("div",{className:"pt-3 border-t border-slate-200 dark:border-slate-800 flex justify-end",children:l.jsx("button",{onClick:()=>{V.playClick(),n()},className:"btn-modern-primary py-2 px-5 text-xs font-bold",children:r("close")})})]})})};function ci(e){try{return decodeURIComponent(e)}catch{return e}}function Yv(e,t){try{let n=(t||window.location.hash||"").trim();if(n.startsWith("#")&&(n=n.substring(1)),n.includes("admin=")){const a=n.split("admin=")[1].split("&")[0];if(a)return{key:ci(a),role:"admin"}}if(n.includes("member=")){const a=n.split("member=")[1].split("&")[0];if(a)return{key:ci(a),role:"member"}}if(n&&!n.includes("="))return{key:ci(n),role:"member"};const r=new URLSearchParams(window.location.search),s=r.get("admin"),i=r.get("member");if(s)return{key:ci(s),role:"admin"};if(i)return{key:i,role:"member"};const o=Dg(e);if(o&&o.key)return{key:o.key,role:o.role}}catch(n){console.error("Error extracting key from sources:",n)}return null}const Xv=({boardId:e,hash:t,onBackHome:n})=>{const{t:r}=Rt(),[s,i]=y.useState(""),[o,a]=y.useState(null),[u,c]=y.useState(!0),[h,d]=y.useState(null),[f,k]=y.useState("member"),[N,w]=y.useState([]),[S,m]=y.useState([]),[p,g]=y.useState(Tu()),[b,j]=y.useState(null),[R,E]=y.useState(null),[T,D]=y.useState(!1),[I,X]=y.useState(!1),[we,me]=y.useState(!1),[Re,et]=y.useState(!1),[Fe,ge]=y.useState(!1),[A,W]=y.useState(!1),[v,x]=y.useState(""),[_,B]=y.useState(0),[K,q]=y.useState(0);y.useEffect(()=>{const P=U=>{const z=U;z.detail&&g(z.detail)};return window.addEventListener("user_profile_updated",P),()=>window.removeEventListener("user_profile_updated",P)},[]),y.useEffect(()=>{let P=!0;c(!0),d(null);const U=Yv(e,t);if(!U||!U.key){c(!1),me(!0);return}const z=U.key,oe=U.role;i(z),k(oe),(!window.location.hash||!window.location.hash.includes(z))&&(window.location.hash=`${oe}=${z}`);const C=setTimeout(()=>{P&&u&&(c(!1),d("Waktu koneksi habis (Connection timeout). Silakan periksa kembali tautan Anda."))},1e4);return Kg(e,z).then(H=>{if(!P)return;clearTimeout(C),a(H),k(H.role),c(!1),$p({id:H.id,title:H.title,role:H.role,key:z});const Y=$v(e,z,p.userName,p.userId);Y.on("presence_update",M=>{m(M)}),Y.on("active_locks",M=>{w(M)}),Y.on("field_locked",M=>{w(G=>[...G.filter(ce=>!(ce.ticketId===M.ticketId&&ce.field===M.field)),M])}),Y.on("field_unlocked",M=>{w(G=>G.filter(te=>!(te.ticketId===M.ticketId&&te.field===M.field))),M.updatedTicket&&F(M.updatedTicket)}),Y.on("ticket_created",M=>{a(G=>G&&{...G,columns:G.columns.map(te=>te.id===M.ticket.columnId?te.tickets.some(ce=>ce.id===M.ticket.id)?te:{...te,tickets:[...te.tickets,M.ticket]}:te)}),V.playDrop()}),Y.on("ticket_updated",M=>{F(M.ticket)}),Y.on("ticket_deleted",M=>{a(G=>G&&{...G,columns:G.columns.map(te=>({...te,tickets:te.tickets.filter(ce=>ce.id!==M.ticketId)}))}),R&&R.id===M.ticketId&&E(null)}),Y.on("card_moved",M=>{a(G=>{if(!G)return G;let te=null;for(const ce of G.columns){const Z=ce.tickets.find(Se=>Se.id===M.ticketId);if(Z){te={...Z,columnId:M.targetColumnId,order:M.newOrder,movedAt:new Date().toISOString()};break}}return te?{...G,columns:G.columns.map(ce=>{if(ce.id===M.targetColumnId){const Se=[...ce.tickets.filter(de=>de.id!==M.ticketId)];return Se.splice(M.newOrder,0,te),{...ce,tickets:Se}}else return{...ce,tickets:ce.tickets.filter(Z=>Z.id!==M.ticketId)}})}:G}),V.playDrop()}),Y.on("card_move_failed",M=>{V.playLock(),alert(`${r("movementFailed")} ${M.error}`)}),Y.on("column_created",M=>{a(G=>!G||G.columns.some(te=>te.id===M.column.id)?G:{...G,columns:[...G.columns,M.column]})}),Y.on("column_updated",M=>{a(G=>G&&{...G,columns:G.columns.map(te=>te.id===M.column.id?M.column:te)})}),Y.on("column_deleted",M=>{a(G=>G&&{...G,columns:G.columns.filter(te=>te.id!==M.columnId)})}),Y.on("columns_reordered",M=>{a(G=>{if(!G)return G;const te=new Map(G.columns.map(Z=>[Z.id,Z])),ce=M.columnIdsInOrder.map(Z=>te.get(Z)).filter(Boolean);return{...G,columns:ce}})}),Y.on("board_settings_updated",M=>{a(G=>G&&{...G,autoMoveStale:M.autoMoveStale})}),Y.on("member_session_revoked",M=>{V.playLock(),alert(M.message||r("sessionRevokedMsg")),window.location.href="/"}),Y.on("board_refreshed",M=>{a(M)})}).catch(H=>{P&&(clearTimeout(C),d(H.message||"Failed to authenticate or load board"),c(!1))}),()=>{P=!1,clearTimeout(C),Hv()}},[e,t]);const F=y.useCallback(P=>{a(U=>U&&{...U,columns:U.columns.map(z=>({...z,tickets:z.tickets.map(oe=>oe.id===P.id?P:oe)}))}),E(U=>U&&U.id===P.id?P:U)},[]),$=fy(ed(Du,{activationConstraint:{distance:8}}),ed(Mu,{coordinateGetter:Kx})),J=y.useMemo(()=>(o==null?void 0:o.columns.map(P=>P.id))||[],[o]),ne=P=>{V.playClick();const{active:U}=P,z=U.data.current;(z==null?void 0:z.type)==="Ticket"?j({type:"Ticket",data:z.ticket}):(z==null?void 0:z.type)==="Column"&&j({type:"Column",data:z.column})},Q=P=>{var G,te,ce;const{active:U,over:z}=P;if(!z||!o)return;const oe=String(U.id),C=String(z.id);if(oe===C)return;const H=((G=U.data.current)==null?void 0:G.type)==="Ticket",Y=((te=z.data.current)==null?void 0:te.type)==="Ticket",M=((ce=z.data.current)==null?void 0:ce.type)==="Column";H&&(Y&&a(Z=>{if(!Z)return Z;const Se=Z.columns.find(De=>De.tickets.some(Dr=>Dr.id===oe)),de=Z.columns.find(De=>De.tickets.some(Dr=>Dr.id===C));if(!Se||!de||Se.id===de.id||de.maxWipLimit>0&&de.tickets.length>=de.maxWipLimit)return Z;const ln=Se.tickets.find(De=>De.id===oe),In=de.tickets.findIndex(De=>De.id===C),Ar=Se.tickets.filter(De=>De.id!==oe),Ae=[...de.tickets];return Ae.splice(In,0,{...ln,columnId:de.id,movedAt:new Date().toISOString()}),{...Z,columns:Z.columns.map(De=>De.id===Se.id?{...De,tickets:Ar}:De.id===de.id?{...De,tickets:Ae}:De)}}),M&&a(Z=>{if(!Z)return Z;const Se=Z.columns.find(Ae=>Ae.tickets.some(De=>De.id===oe)),de=Z.columns.find(Ae=>Ae.id===C);if(!Se||!de||Se.id===de.id||de.maxWipLimit>0&&de.tickets.length>=de.maxWipLimit)return Z;const ln=Se.tickets.find(Ae=>Ae.id===oe),In=Se.tickets.filter(Ae=>Ae.id!==oe),Ar=[...de.tickets,{...ln,columnId:de.id,movedAt:new Date().toISOString()}];return{...Z,columns:Z.columns.map(Ae=>Ae.id===Se.id?{...Ae,tickets:In}:Ae.id===de.id?{...Ae,tickets:Ar}:Ae)}}))},ae=P=>{var H,Y;j(null);const{active:U,over:z}=P;if(!z||!o)return;const oe=String(U.id),C=String(z.id);if(V.playDrop(),((H=U.data.current)==null?void 0:H.type)==="Column"&&f==="admin"){if(oe!==C){const M=o.columns.findIndex(Z=>Z.id===oe),G=o.columns.findIndex(Z=>Z.id===C),te=Pu(o.columns,M,G);a({...o,columns:te});const ce=ye();ce&&ce.emit("reorder_columns",{columnIdsInOrder:te.map(Z=>Z.id)})}return}if(((Y=U.data.current)==null?void 0:Y.type)==="Ticket"){const M=o.columns.find(Z=>Z.tickets.some(Se=>Se.id===oe));if(!M)return;const G=M.tickets.findIndex(Z=>Z.id===oe),te=M.tickets.map(Z=>Z.id),ce=ye();ce&&ce.emit("card_moved",{ticketId:oe,targetColumnId:M.id,newOrder:G,ticketIdsInTargetColumn:te})}},se=P=>{if(P.preventDefault(),!v.trim())return;V.playClick();const U=ye();U&&U.emit("create_column",{title:v.trim(),maxWipLimit:_,autoStaleHours:K}),x(""),B(0),q(0),W(!1)},he=(P,U)=>{const z=ye();z&&z.emit("update_column",{columnId:P,updates:U})},ee=P=>{const U=ye();U&&U.emit("delete_column",{columnId:P})},ve=(P,U)=>{const z=o==null?void 0:o.columns.find(C=>C.id===P);if(z&&z.maxWipLimit>0&&z.tickets.length>=z.maxWipLimit){V.playLock(),alert(r("wipWarningModal"));return}const oe=ye();oe&&oe.emit("create_ticket",{columnId:P,title:U,priority:"MEDIUM",tags:[],subtasks:[],dueDate:"",isBlocked:!1})},_e=()=>{if(f!=="admin"||!o)return;V.playClick();const P=!o.autoMoveStale;a({...o,autoMoveStale:P});const U=ye();U&&U.emit("update_board_settings",{autoMoveStale:P})},Ue=async()=>{if(f==="admin"&&(V.playClick(),confirm("🚨 Hapus papan Kanban ini secara permanen? Tindakan ini tidak dapat dibatalkan.")))try{await qg(e,s),window.location.href="/"}catch(P){alert(P.message||"Failed to delete board")}};return we?l.jsx(Gv,{boardId:e,onKeyProvided:(P,U)=>{me(!1),i(P),U&&k(U)}}):u?l.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[70vh] gap-4",children:[l.jsx("div",{className:"w-10 h-10 border-3 border-indigo-500 border-t-transparent rounded-full animate-spin"}),l.jsx("p",{className:"text-sm font-semibold text-indigo-600 dark:text-indigo-400 animate-pulse",children:r("connectingToRealm")})]}):h||!o?l.jsxs("div",{className:"max-w-md mx-auto my-12 sm:my-20 p-5 sm:p-8 card-kanban border-rose-500/50 text-center mx-4",children:[l.jsx(xg,{size:36,className:"text-rose-500 mx-auto mb-3"}),l.jsx("h2",{className:"text-base font-bold text-rose-600 dark:text-rose-400 mb-2",children:r("accessForbidden")}),l.jsx("p",{className:"text-xs text-slate-600 dark:text-slate-300 mb-5 leading-relaxed",children:h||r("accessForbiddenDesc")}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx("button",{onClick:n,className:"btn-modern-secondary flex-1 py-2",children:r("backToHome")}),l.jsx("button",{onClick:()=>{me(!0),d(null)},className:"btn-modern-primary flex-1 py-2",children:r("reEnterKey")})]})]}):l.jsxs("div",{className:"flex flex-col min-h-[calc(100vh-60px)]",children:[l.jsxs("div",{className:"bg-white/95 dark:bg-[#090d18]/90 border-b border-slate-200 dark:border-slate-800 px-3 sm:px-4 py-2.5 sm:py-3 shadow-sm transition-colors duration-200",children:[l.jsxs("div",{className:"max-w-7xl mx-auto flex flex-wrap items-center justify-between gap-2.5 sm:gap-3",children:[l.jsxs("div",{className:"flex items-center gap-2 sm:gap-3 min-w-0",children:[l.jsx("button",{onClick:()=>{V.playClick(),n()},className:"p-1.5 sm:p-2 bg-slate-100 dark:bg-slate-800/80 border border-slate-200 dark:border-slate-700/80 rounded-lg text-slate-600 dark:text-slate-400 hover:text-slate-900 dark:hover:text-slate-100 transition-colors shrink-0",title:r("backToHome"),children:l.jsx(yg,{size:15})}),l.jsx("div",{className:"min-w-0",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("h2",{className:"text-sm sm:text-base md:text-lg font-bold text-slate-900 dark:text-white tracking-tight truncate max-w-[140px] sm:max-w-[280px] md:max-w-md",children:o.title}),l.jsxs("span",{className:`text-[10px] sm:text-[11px] font-semibold px-2 py-0.5 rounded-full flex items-center gap-1 border shrink-0 ${f==="admin"?"bg-amber-50 dark:bg-amber-500/10 text-amber-700 dark:text-amber-300 border-amber-200 dark:border-amber-500/30":"bg-indigo-50 dark:bg-indigo-500/10 text-indigo-700 dark:text-indigo-300 border-indigo-200 dark:border-indigo-500/30"}`,children:[f==="admin"?l.jsx(Op,{size:11,className:"text-amber-600 dark:text-amber-400"}):l.jsx(Cg,{size:11,className:"text-indigo-600 dark:text-indigo-400"}),l.jsx("span",{children:r(f==="admin"?"superadmin":"member")})]})]})})]}),l.jsxs("div",{className:"flex items-center gap-1.5 sm:gap-2 ml-auto",children:[l.jsxs("div",{className:"flex items-center bg-slate-100 dark:bg-slate-950/70 border border-slate-200 dark:border-slate-800 px-2 sm:px-3 py-1 sm:py-1.5 rounded-lg gap-1.5",children:[l.jsx(Up,{size:13,className:"text-indigo-600 dark:text-indigo-400 shrink-0"}),l.jsx("div",{className:"flex -space-x-1 items-center",children:S.slice(0,4).map(P=>l.jsxs("div",{style:{backgroundColor:P.color},className:"w-4 h-4 sm:w-5 sm:h-5 rounded-full border border-white dark:border-slate-900 flex items-center justify-center text-[8px] sm:text-[9px] text-slate-950 font-bold uppercase relative group cursor-default shadow-sm",children:[P.userName.charAt(0),l.jsxs("span",{className:"absolute bottom-full mb-1 left-1/2 -translate-x-1/2 bg-slate-950 text-white text-[10px] px-2 py-1 rounded-md whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none z-30 border border-slate-800 shadow-md",children:[P.userName," (",P.role,")"]})]},P.socketId))}),l.jsx("span",{className:"text-[11px] sm:text-xs font-semibold text-slate-700 dark:text-slate-300",children:S.length})]}),l.jsxs("button",{onClick:()=>{V.playClick(),ge(!0)},className:"btn-modern-secondary text-[11px] sm:text-xs py-1.5 sm:py-2 px-2.5 sm:px-3",title:r("boardLogsBtn"),children:[l.jsx(Nu,{size:13,className:"text-indigo-600 dark:text-indigo-400"}),l.jsx("span",{className:"hidden sm:inline",children:r("boardLogsBtn")})]}),l.jsxs("button",{onClick:()=>{V.playClick(),D(!0)},className:"btn-modern-primary text-[11px] sm:text-xs py-1.5 sm:py-2 px-2.5 sm:px-3.5",children:[l.jsx(Fp,{size:13}),l.jsx("span",{className:"hidden xs:inline",children:r("shareInviteBtn")})]}),f==="admin"&&l.jsxs("button",{onClick:()=>{V.playClick(),et(!Re)},className:`btn-modern text-[11px] sm:text-xs py-1.5 sm:py-2 px-2 sm:px-3 ${o.autoMoveStale?"bg-cyan-600 text-white font-bold":"btn-modern-secondary"}`,title:r("boardSettings"),children:[l.jsx(Jc,{size:13}),l.jsx("span",{className:"hidden sm:inline",children:r("boardSettings")})]}),f==="admin"&&l.jsxs("button",{onClick:()=>{V.playClick(),X(!0)},className:"btn-modern-gold text-[11px] sm:text-xs py-1.5 sm:py-2 px-2 sm:px-3",title:r("rotateKeyTooltip"),children:[l.jsx(no,{size:12}),l.jsx("span",{className:"hidden md:inline",children:r("rotateKeyBtn")})]}),f==="admin"&&l.jsx("button",{onClick:Ue,className:"btn-modern-danger p-1.5 sm:p-2 text-xs",title:r("deleteBoardTooltip"),children:l.jsx(Os,{size:13})})]})]}),Re&&f==="admin"&&l.jsxs("div",{className:"max-w-7xl mx-auto mt-3 p-3 bg-slate-50 dark:bg-slate-950/80 border border-cyan-500/40 rounded-xl flex flex-wrap items-center justify-between gap-2.5 text-xs animate-fade-in shadow-sm",children:[l.jsxs("div",{className:"flex items-center gap-2 text-cyan-800 dark:text-cyan-300 font-medium text-xs",children:[l.jsx(Jc,{size:14}),l.jsx("span",{children:r("autoMoveStaleSetting")})]}),l.jsx("button",{onClick:_e,className:`btn-modern text-xs py-1.5 px-3 font-semibold ${o.autoMoveStale?"bg-emerald-600 text-white":"btn-modern-secondary"}`,children:o.autoMoveStale?"✅ Aktif (Auto-Move ON)":"🚫 Nonaktif"})]})]}),l.jsx("div",{className:"flex-1 p-3 sm:p-4 md:p-6 overflow-x-auto snap-x snap-mandatory scroll-smooth",children:l.jsxs(cx,{sensors:$,collisionDetection:eh,onDragStart:ne,onDragOver:Q,onDragEnd:ae,children:[l.jsxs("div",{className:"flex items-start gap-3.5 sm:gap-5 pb-6",children:[l.jsx(pd,{items:J,strategy:Ax,children:o.columns.map(P=>l.jsx("div",{className:"snap-center",children:l.jsx(pd,{items:P.tickets.map(U=>U.id),strategy:Ix,children:l.jsx(Qx,{column:P,role:f,activeLocks:N,currentUserId:p.userId,onTicketClick:U=>E(U),onAddTicket:ve,onDeleteColumn:ee,onUpdateColumn:he})})},P.id))}),f==="admin"&&l.jsx("div",{className:"w-[82vw] max-w-[320px] sm:w-80 shrink-0 snap-center",children:A?l.jsxs("form",{onSubmit:se,className:"card-kanban border-indigo-500/50 p-4 space-y-3",children:[l.jsx("input",{type:"text",value:v,onChange:P=>x(P.target.value),placeholder:r("columnTitlePlaceholder"),className:"w-full bg-slate-50 dark:bg-slate-950/70 border border-slate-300 dark:border-slate-800 rounded-lg text-slate-900 dark:text-slate-100 text-xs p-2.5 outline-none focus:border-indigo-500",autoFocus:!0}),l.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs text-slate-500 dark:text-slate-400",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-[11px] mb-1 font-medium",children:"WIP Limit:"}),l.jsx("input",{type:"number",min:0,value:_,onChange:P=>B(parseInt(P.target.value,10)||0),placeholder:"0 = unlim",className:"w-full bg-slate-50 dark:bg-slate-950/70 border border-slate-300 dark:border-slate-800 rounded-lg p-1.5 text-slate-900 dark:text-slate-100 text-center"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-[11px] mb-1 font-medium",children:"Stale (Jam):"}),l.jsx("input",{type:"number",min:0,value:K,onChange:P=>q(parseInt(P.target.value,10)||0),placeholder:"0 = off",className:"w-full bg-slate-50 dark:bg-slate-950/70 border border-slate-300 dark:border-slate-800 rounded-lg p-1.5 text-slate-900 dark:text-slate-100 text-center"})]})]}),l.jsxs("div",{className:"flex justify-end gap-2 pt-1",children:[l.jsx("button",{type:"button",onClick:()=>W(!1),className:"btn-modern-secondary text-xs py-1.5 px-3",children:r("cancel")}),l.jsx("button",{type:"submit",className:"btn-modern-primary text-xs py-1.5 px-3 font-bold",children:r("addColumn")})]})]}):l.jsxs("button",{onClick:()=>{V.playClick(),W(!0)},className:"w-full bg-slate-100 hover:bg-slate-200 dark:bg-slate-900/40 dark:hover:bg-slate-900/80 border border-dashed border-slate-300 dark:border-slate-800 hover:border-indigo-500 rounded-2xl p-5 text-xs font-semibold text-slate-600 dark:text-slate-400 hover:text-indigo-600 dark:hover:text-indigo-400 flex items-center justify-center gap-2 transition-all shadow-sm select-none",children:[l.jsx(Cu,{size:16}),l.jsx("span",{children:r("addColumn")})]})})]}),l.jsx(Rx,{children:(b==null?void 0:b.type)==="Ticket"&&l.jsx("div",{className:"w-[82vw] max-w-[320px] sm:w-72 opacity-95 rotate-1 scale-105 shadow-2xl pointer-events-none",children:l.jsx(Sh,{ticket:b.data,activeLocks:[],currentUserId:p.userId,onClick:()=>{}})})})]})}),R&&l.jsx(Kv,{ticket:R,boardId:o.id,boardKey:s,activeLocks:N,currentUserId:p.userId,onClose:()=>E(null),onUpdateTicket:(P,U)=>{F({...R,...U,id:P})},onDeleteTicket:(P,U)=>{a(z=>z&&{...z,columns:z.columns.map(oe=>oe.id===U?{...oe,tickets:oe.tickets.filter(C=>C.id!==P)}:oe)})}}),Fe&&l.jsx(qv,{boardId:o.id,boardKey:s,onClose:()=>ge(!1)}),T&&l.jsx(qp,{boardData:{id:o.id,title:o.title,adminKey:f==="admin"?s:"***",memberKey:f==="admin"?o.memberKey||"":f==="member"?s:"***",adminUrlFragment:f==="admin"?`/b/${o.id}#admin=${s}`:"",memberUrlFragment:f==="admin"?o.memberKey?`/b/${o.id}#member=${o.memberKey}`:`/b/${o.id}#member=`:`/b/${o.id}#member=${s}`,createdAt:o.createdAt},onEnterBoard:()=>D(!1)}),I&&f==="admin"&&l.jsx(Wv,{boardId:o.id,adminKey:s,onClose:()=>X(!1)})]})};function Jv(){const{t:e}=Rt(),[t,n]=y.useState(window.location.pathname),[r,s]=y.useState(window.location.hash),[,i]=y.useState("id"),[,o]=y.useState(ro()),[,a]=y.useState(js());y.useEffect(()=>{Vp(ro()),Wp(js());const f=()=>{n(window.location.pathname),s(window.location.hash)},k=()=>{s(window.location.hash)};return window.addEventListener("popstate",f),window.addEventListener("hashchange",k),()=>{window.removeEventListener("popstate",f),window.removeEventListener("hashchange",k)}},[]);const u=t.startsWith("/b/"),c=u?t.replace("/b/","").split("/")[0]:null,h=()=>{window.history.pushState({},"","/"),n("/"),s("")},d=(f,k)=>{window.history.pushState({},"",`/b/${f}${k}`),n(`/b/${f}`),s(k)};return l.jsxs("div",{className:"min-h-screen bg-slate-50 dark:bg-[#080c18] text-slate-900 dark:text-slate-100 flex flex-col selection:bg-indigo-500 selection:text-white transition-colors duration-200",children:[l.jsx(Hg,{onHomeClick:h,onLanguageChange:f=>i(f),onThemeChange:f=>o(f),onRetroModeChange:f=>a(f)}),l.jsx("main",{className:"flex-1",children:u&&c?l.jsx(Xv,{boardId:c,hash:r,onBackHome:h},`${c}_${r}`):l.jsx(Xg,{onOpenBoard:d})}),l.jsx("footer",{className:"border-t border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-950/80 py-4 px-4 text-center text-xs text-slate-500 dark:text-slate-400 transition-colors duration-200",children:l.jsxs("p",{children:["🔗 ",e("footerText")]})})]})}ba.createRoot(document.getElementById("root")).render(l.jsx(Ne.StrictMode,{children:l.jsx(Jv,{})}));