@openclaw-caribbean/server 0.1.9 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,7 +22,7 @@
22
22
  *
23
23
  * This source code is licensed under the MIT license found in the
24
24
  * LICENSE file in the root directory of this source tree.
25
- */(function(e){function t(N,D){var $=N.length;N.push(D);e:for(;0<$;){var V=$-1>>>1,G=N[V];if(0<s(G,D))N[V]=D,N[$]=G,$=V;else break e}}function n(N){return N.length===0?null:N[0]}function r(N){if(N.length===0)return null;var D=N[0],$=N.pop();if($!==D){N[0]=$;e:for(var V=0,G=N.length,Pe=G>>>1;V<Pe;){var Re=2*(V+1)-1,ot=N[Re],Ht=Re+1,Fn=N[Ht];if(0>s(ot,$))Ht<G&&0>s(Fn,ot)?(N[V]=Fn,N[Ht]=$,V=Ht):(N[V]=ot,N[Re]=$,V=Re);else if(Ht<G&&0>s(Fn,$))N[V]=Fn,N[Ht]=$,V=Ht;else break e}}return D}function s(N,D){var $=N.sortIndex-D.sortIndex;return $!==0?$:N.id-D.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 l=[],u=[],c=1,d=null,f=3,g=!1,p=!1,v=!1,w=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(N){for(var D=n(u);D!==null;){if(D.callback===null)r(u);else if(D.startTime<=N)r(u),D.sortIndex=D.expirationTime,t(l,D);else break;D=n(u)}}function k(N){if(v=!1,x(N),!p)if(n(l)!==null)p=!0,z(C);else{var D=n(u);D!==null&&Z(k,D.startTime-N)}}function C(N,D){p=!1,v&&(v=!1,m(P),P=-1),g=!0;var $=f;try{for(x(D),d=n(l);d!==null&&(!(d.expirationTime>D)||N&&!B());){var V=d.callback;if(typeof V=="function"){d.callback=null,f=d.priorityLevel;var G=V(d.expirationTime<=D);D=e.unstable_now(),typeof G=="function"?d.callback=G:d===n(l)&&r(l),x(D)}else r(l);d=n(l)}if(d!==null)var Pe=!0;else{var Re=n(u);Re!==null&&Z(k,Re.startTime-D),Pe=!1}return Pe}finally{d=null,f=$,g=!1}}var b=!1,T=null,P=-1,L=5,R=-1;function B(){return!(e.unstable_now()-R<L)}function A(){if(T!==null){var N=e.unstable_now();R=N;var D=!0;try{D=T(!0,N)}finally{D?M():(b=!1,T=null)}}else b=!1}var M;if(typeof y=="function")M=function(){y(A)};else if(typeof MessageChannel<"u"){var _=new MessageChannel,U=_.port2;_.port1.onmessage=A,M=function(){U.postMessage(null)}}else M=function(){w(A,0)};function z(N){T=N,b||(b=!0,M())}function Z(N,D){P=w(function(){N(e.unstable_now())},D)}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(N){N.callback=null},e.unstable_continueExecution=function(){p||g||(p=!0,z(C))},e.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<N?Math.floor(1e3/N):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(N){switch(f){case 1:case 2:case 3:var D=3;break;default:D=f}var $=f;f=D;try{return N()}finally{f=$}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(N,D){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var $=f;f=N;try{return D()}finally{f=$}},e.unstable_scheduleCallback=function(N,D,$){var V=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?V+$:V):$=V,N){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=$+G,N={id:c++,callback:D,priorityLevel:N,startTime:$,expirationTime:G,sortIndex:-1},$>V?(N.sortIndex=$,t(u,N),n(l)===null&&N===n(u)&&(v?(m(P),P=-1):v=!0,Z(k,$-V))):(N.sortIndex=G,t(l,N),p||g||(p=!0,z(C))),N},e.unstable_shouldYield=B,e.unstable_wrapCallback=function(N){var D=f;return function(){var $=f;f=D;try{return N.apply(this,arguments)}finally{f=$}}}})(ng);tg.exports=ng;var Ow=tg.exports;/**
25
+ */(function(e){function t(N,D){var $=N.length;N.push(D);e:for(;0<$;){var V=$-1>>>1,G=N[V];if(0<s(G,D))N[V]=D,N[$]=G,$=V;else break e}}function n(N){return N.length===0?null:N[0]}function r(N){if(N.length===0)return null;var D=N[0],$=N.pop();if($!==D){N[0]=$;e:for(var V=0,G=N.length,Pe=G>>>1;V<Pe;){var Re=2*(V+1)-1,at=N[Re],Ht=Re+1,Fn=N[Ht];if(0>s(at,$))Ht<G&&0>s(Fn,at)?(N[V]=Fn,N[Ht]=$,V=Ht):(N[V]=at,N[Re]=$,V=Re);else if(Ht<G&&0>s(Fn,$))N[V]=Fn,N[Ht]=$,V=Ht;else break e}}return D}function s(N,D){var $=N.sortIndex-D.sortIndex;return $!==0?$:N.id-D.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 l=[],u=[],c=1,d=null,f=3,g=!1,p=!1,v=!1,w=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(N){for(var D=n(u);D!==null;){if(D.callback===null)r(u);else if(D.startTime<=N)r(u),D.sortIndex=D.expirationTime,t(l,D);else break;D=n(u)}}function k(N){if(v=!1,x(N),!p)if(n(l)!==null)p=!0,z(C);else{var D=n(u);D!==null&&Z(k,D.startTime-N)}}function C(N,D){p=!1,v&&(v=!1,m(P),P=-1),g=!0;var $=f;try{for(x(D),d=n(l);d!==null&&(!(d.expirationTime>D)||N&&!B());){var V=d.callback;if(typeof V=="function"){d.callback=null,f=d.priorityLevel;var G=V(d.expirationTime<=D);D=e.unstable_now(),typeof G=="function"?d.callback=G:d===n(l)&&r(l),x(D)}else r(l);d=n(l)}if(d!==null)var Pe=!0;else{var Re=n(u);Re!==null&&Z(k,Re.startTime-D),Pe=!1}return Pe}finally{d=null,f=$,g=!1}}var b=!1,T=null,P=-1,L=5,R=-1;function B(){return!(e.unstable_now()-R<L)}function A(){if(T!==null){var N=e.unstable_now();R=N;var D=!0;try{D=T(!0,N)}finally{D?M():(b=!1,T=null)}}else b=!1}var M;if(typeof y=="function")M=function(){y(A)};else if(typeof MessageChannel<"u"){var _=new MessageChannel,U=_.port2;_.port1.onmessage=A,M=function(){U.postMessage(null)}}else M=function(){w(A,0)};function z(N){T=N,b||(b=!0,M())}function Z(N,D){P=w(function(){N(e.unstable_now())},D)}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(N){N.callback=null},e.unstable_continueExecution=function(){p||g||(p=!0,z(C))},e.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<N?Math.floor(1e3/N):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(N){switch(f){case 1:case 2:case 3:var D=3;break;default:D=f}var $=f;f=D;try{return N()}finally{f=$}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(N,D){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var $=f;f=N;try{return D()}finally{f=$}},e.unstable_scheduleCallback=function(N,D,$){var V=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?V+$:V):$=V,N){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=$+G,N={id:c++,callback:D,priorityLevel:N,startTime:$,expirationTime:G,sortIndex:-1},$>V?(N.sortIndex=$,t(u,N),n(l)===null&&N===n(u)&&(v?(m(P),P=-1):v=!0,Z(k,$-V))):(N.sortIndex=G,t(l,N),p||g||(p=!0,z(C))),N},e.unstable_shouldYield=B,e.unstable_wrapCallback=function(N){var D=f;return function(){var $=f;f=D;try{return N.apply(this,arguments)}finally{f=$}}}})(ng);tg.exports=ng;var Ow=tg.exports;/**
26
26
  * @license React
27
27
  * react-dom.production.min.js
28
28
  *
@@ -35,9 +35,9 @@
35
35
  `),i=r.stack.split(`
36
36
  `),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 l=`
37
37
  `+s[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{Ja=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?xs(e):""}function Vw(e){switch(e.tag){case 5:return xs(e.type);case 16:return xs("Lazy");case 13:return xs("Suspense");case 19:return xs("SuspenseList");case 0:case 2:case 15:return e=Za(e.type,!1),e;case 11:return e=Za(e.type.render,!1),e;case 1:return e=Za(e.type,!0),e;default:return""}}function ou(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 mr:return"Fragment";case pr:return"Portal";case ru:return"Profiler";case _c:return"StrictMode";case su:return"Suspense";case iu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ig:return(e.displayName||"Context")+".Consumer";case sg:return(e._context.displayName||"Context")+".Provider";case Vc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case zc:return t=e.displayName||null,t!==null?t:ou(e.type)||"Memo";case hn:t=e._payload,e=e._init;try{return ou(e(t))}catch{}}return null}function zw(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 ou(t);case 8:return t===_c?"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 Rn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ag(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function $w(e){var t=ag(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 Ai(e){e._valueTracker||(e._valueTracker=$w(e))}function lg(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ag(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ro(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 au(e,t){var n=t.checked;return pe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Nf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Rn(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 ug(e,t){t=t.checked,t!=null&&Ic(e,"checked",t,!1)}function lu(e,t){ug(e,t);var n=Rn(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")?uu(e,t.type,n):t.hasOwnProperty("defaultValue")&&uu(e,t.type,Rn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function jf(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 uu(e,t,n){(t!=="number"||Ro(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ws=Array.isArray;function Nr(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=""+Rn(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 cu(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(j(91));return pe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Lf(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(j(92));if(ws(n)){if(1<n.length)throw Error(j(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Rn(n)}}function cg(e,t){var n=Rn(t.value),r=Rn(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 Af(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function dg(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 du(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?dg(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Oi,fg=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(Oi=Oi||document.createElement("div"),Oi.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Oi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function zs(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Es={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},Bw=["Webkit","ms","Moz","O"];Object.keys(Es).forEach(function(e){Bw.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Es[t]=Es[e]})});function hg(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Es.hasOwnProperty(e)&&Es[e]?(""+t).trim():t+"px"}function pg(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=hg(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var Uw=pe({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 fu(e,t){if(t){if(Uw[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(j(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(j(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(j(61))}if(t.style!=null&&typeof t.style!="object")throw Error(j(62))}}function hu(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 pu=null;function $c(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var mu=null,jr=null,Lr=null;function Of(e){if(e=hi(e)){if(typeof mu!="function")throw Error(j(280));var t=e.stateNode;t&&(t=xa(t),mu(e.stateNode,e.type,t))}}function mg(e){jr?Lr?Lr.push(e):Lr=[e]:jr=e}function gg(){if(jr){var e=jr,t=Lr;if(Lr=jr=null,Of(e),t)for(e=0;e<t.length;e++)Of(t[e])}}function yg(e,t){return e(t)}function vg(){}var el=!1;function xg(e,t,n){if(el)return e(t,n);el=!0;try{return yg(e,t,n)}finally{el=!1,(jr!==null||Lr!==null)&&(vg(),gg())}}function $s(e,t){var n=e.stateNode;if(n===null)return null;var r=xa(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(j(231,t,typeof n));return n}var gu=!1;if(Zt)try{var os={};Object.defineProperty(os,"passive",{get:function(){gu=!0}}),window.addEventListener("test",os,os),window.removeEventListener("test",os,os)}catch{gu=!1}function Hw(e,t,n,r,s,i,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var bs=!1,No=null,jo=!1,yu=null,Ww={onError:function(e){bs=!0,No=e}};function Kw(e,t,n,r,s,i,o,a,l){bs=!1,No=null,Hw.apply(Ww,arguments)}function Gw(e,t,n,r,s,i,o,a,l){if(Kw.apply(this,arguments),bs){if(bs){var u=No;bs=!1,No=null}else throw Error(j(198));jo||(jo=!0,yu=u)}}function ur(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 wg(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 Df(e){if(ur(e)!==e)throw Error(j(188))}function qw(e){var t=e.alternate;if(!t){if(t=ur(e),t===null)throw Error(j(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 Df(s),e;if(i===r)return Df(s),t;i=i.sibling}throw Error(j(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(j(189))}}if(n.alternate!==r)throw Error(j(190))}if(n.tag!==3)throw Error(j(188));return n.stateNode.current===n?e:t}function Sg(e){return e=qw(e),e!==null?kg(e):null}function kg(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=kg(e);if(t!==null)return t;e=e.sibling}return null}var Cg=rt.unstable_scheduleCallback,Mf=rt.unstable_cancelCallback,Yw=rt.unstable_shouldYield,Xw=rt.unstable_requestPaint,ye=rt.unstable_now,Qw=rt.unstable_getCurrentPriorityLevel,Bc=rt.unstable_ImmediatePriority,Eg=rt.unstable_UserBlockingPriority,Lo=rt.unstable_NormalPriority,Jw=rt.unstable_LowPriority,bg=rt.unstable_IdlePriority,ma=null,It=null;function Zw(e){if(It&&typeof It.onCommitFiberRoot=="function")try{It.onCommitFiberRoot(ma,e,void 0,(e.current.flags&128)===128)}catch{}}var Tt=Math.clz32?Math.clz32:n1,e1=Math.log,t1=Math.LN2;function n1(e){return e>>>=0,e===0?32:31-(e1(e)/t1|0)|0}var Di=64,Mi=4194304;function Ss(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 Ao(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=Ss(a):(i&=o,i!==0&&(r=Ss(i)))}else o=n&~s,o!==0?r=Ss(o):i!==0&&(r=Ss(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-Tt(t),s=1<<n,r|=e[n],t&=~s;return r}function r1(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 s1(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-Tt(i),a=1<<o,l=s[o];l===-1?(!(a&n)||a&r)&&(s[o]=r1(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function vu(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Tg(){var e=Di;return Di<<=1,!(Di&4194240)&&(Di=64),e}function tl(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function di(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Tt(t),e[t]=n}function i1(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-Tt(n),i=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~i}}function Uc(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Tt(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var J=0;function Pg(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Rg,Hc,Ng,jg,Lg,xu=!1,Fi=[],wn=null,Sn=null,kn=null,Bs=new Map,Us=new Map,mn=[],o1="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 Ff(e,t){switch(e){case"focusin":case"focusout":wn=null;break;case"dragenter":case"dragleave":Sn=null;break;case"mouseover":case"mouseout":kn=null;break;case"pointerover":case"pointerout":Bs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Us.delete(t.pointerId)}}function as(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=hi(t),t!==null&&Hc(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function a1(e,t,n,r,s){switch(t){case"focusin":return wn=as(wn,e,t,n,r,s),!0;case"dragenter":return Sn=as(Sn,e,t,n,r,s),!0;case"mouseover":return kn=as(kn,e,t,n,r,s),!0;case"pointerover":var i=s.pointerId;return Bs.set(i,as(Bs.get(i)||null,e,t,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,Us.set(i,as(Us.get(i)||null,e,t,n,r,s)),!0}return!1}function Ag(e){var t=Un(e.target);if(t!==null){var n=ur(t);if(n!==null){if(t=n.tag,t===13){if(t=wg(n),t!==null){e.blockedOn=t,Lg(e.priority,function(){Ng(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 ro(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=wu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);pu=r,n.target.dispatchEvent(r),pu=null}else return t=hi(n),t!==null&&Hc(t),e.blockedOn=n,!1;t.shift()}return!0}function If(e,t,n){ro(e)&&n.delete(t)}function l1(){xu=!1,wn!==null&&ro(wn)&&(wn=null),Sn!==null&&ro(Sn)&&(Sn=null),kn!==null&&ro(kn)&&(kn=null),Bs.forEach(If),Us.forEach(If)}function ls(e,t){e.blockedOn===t&&(e.blockedOn=null,xu||(xu=!0,rt.unstable_scheduleCallback(rt.unstable_NormalPriority,l1)))}function Hs(e){function t(s){return ls(s,e)}if(0<Fi.length){ls(Fi[0],e);for(var n=1;n<Fi.length;n++){var r=Fi[n];r.blockedOn===e&&(r.blockedOn=null)}}for(wn!==null&&ls(wn,e),Sn!==null&&ls(Sn,e),kn!==null&&ls(kn,e),Bs.forEach(t),Us.forEach(t),n=0;n<mn.length;n++)r=mn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<mn.length&&(n=mn[0],n.blockedOn===null);)Ag(n),n.blockedOn===null&&mn.shift()}var Ar=sn.ReactCurrentBatchConfig,Oo=!0;function u1(e,t,n,r){var s=J,i=Ar.transition;Ar.transition=null;try{J=1,Wc(e,t,n,r)}finally{J=s,Ar.transition=i}}function c1(e,t,n,r){var s=J,i=Ar.transition;Ar.transition=null;try{J=4,Wc(e,t,n,r)}finally{J=s,Ar.transition=i}}function Wc(e,t,n,r){if(Oo){var s=wu(e,t,n,r);if(s===null)dl(e,t,r,Do,n),Ff(e,r);else if(a1(s,e,t,n,r))r.stopPropagation();else if(Ff(e,r),t&4&&-1<o1.indexOf(e)){for(;s!==null;){var i=hi(s);if(i!==null&&Rg(i),i=wu(e,t,n,r),i===null&&dl(e,t,r,Do,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else dl(e,t,r,null,n)}}var Do=null;function wu(e,t,n,r){if(Do=null,e=$c(r),e=Un(e),e!==null)if(t=ur(e),t===null)e=null;else if(n=t.tag,n===13){if(e=wg(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 Do=e,null}function Og(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(Qw()){case Bc:return 1;case Eg:return 4;case Lo:case Jw:return 16;case bg:return 536870912;default:return 16}default:return 16}}var yn=null,Kc=null,so=null;function Dg(){if(so)return so;var e,t=Kc,n=t.length,r,s="value"in yn?yn.value:yn.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 so=s.slice(e,1<r?1-r:void 0)}function io(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 Ii(){return!0}function _f(){return!1}function it(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)?Ii:_f,this.isPropagationStopped=_f,this}return pe(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=Ii)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ii)},persist:function(){},isPersistent:Ii}),t}var Yr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Gc=it(Yr),fi=pe({},Yr,{view:0,detail:0}),d1=it(fi),nl,rl,us,ga=pe({},fi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:qc,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!==us&&(us&&e.type==="mousemove"?(nl=e.screenX-us.screenX,rl=e.screenY-us.screenY):rl=nl=0,us=e),nl)},movementY:function(e){return"movementY"in e?e.movementY:rl}}),Vf=it(ga),f1=pe({},ga,{dataTransfer:0}),h1=it(f1),p1=pe({},fi,{relatedTarget:0}),sl=it(p1),m1=pe({},Yr,{animationName:0,elapsedTime:0,pseudoElement:0}),g1=it(m1),y1=pe({},Yr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),v1=it(y1),x1=pe({},Yr,{data:0}),zf=it(x1),w1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},S1={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"},k1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function C1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=k1[e])?!!t[e]:!1}function qc(){return C1}var E1=pe({},fi,{key:function(e){if(e.key){var t=w1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=io(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?S1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:qc,charCode:function(e){return e.type==="keypress"?io(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?io(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),b1=it(E1),T1=pe({},ga,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),$f=it(T1),P1=pe({},fi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:qc}),R1=it(P1),N1=pe({},Yr,{propertyName:0,elapsedTime:0,pseudoElement:0}),j1=it(N1),L1=pe({},ga,{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}),A1=it(L1),O1=[9,13,27,32],Yc=Zt&&"CompositionEvent"in window,Ts=null;Zt&&"documentMode"in document&&(Ts=document.documentMode);var D1=Zt&&"TextEvent"in window&&!Ts,Mg=Zt&&(!Yc||Ts&&8<Ts&&11>=Ts),Bf=" ",Uf=!1;function Fg(e,t){switch(e){case"keyup":return O1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ig(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var gr=!1;function M1(e,t){switch(e){case"compositionend":return Ig(t);case"keypress":return t.which!==32?null:(Uf=!0,Bf);case"textInput":return e=t.data,e===Bf&&Uf?null:e;default:return null}}function F1(e,t){if(gr)return e==="compositionend"||!Yc&&Fg(e,t)?(e=Dg(),so=Kc=yn=null,gr=!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 Mg&&t.locale!=="ko"?null:t.data;default:return null}}var I1={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 Hf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!I1[e.type]:t==="textarea"}function _g(e,t,n,r){mg(r),t=Mo(t,"onChange"),0<t.length&&(n=new Gc("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Ps=null,Ws=null;function _1(e){Yg(e,0)}function ya(e){var t=xr(e);if(lg(t))return e}function V1(e,t){if(e==="change")return t}var Vg=!1;if(Zt){var il;if(Zt){var ol="oninput"in document;if(!ol){var Wf=document.createElement("div");Wf.setAttribute("oninput","return;"),ol=typeof Wf.oninput=="function"}il=ol}else il=!1;Vg=il&&(!document.documentMode||9<document.documentMode)}function Kf(){Ps&&(Ps.detachEvent("onpropertychange",zg),Ws=Ps=null)}function zg(e){if(e.propertyName==="value"&&ya(Ws)){var t=[];_g(t,Ws,e,$c(e)),xg(_1,t)}}function z1(e,t,n){e==="focusin"?(Kf(),Ps=t,Ws=n,Ps.attachEvent("onpropertychange",zg)):e==="focusout"&&Kf()}function $1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ya(Ws)}function B1(e,t){if(e==="click")return ya(t)}function U1(e,t){if(e==="input"||e==="change")return ya(t)}function H1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Nt=typeof Object.is=="function"?Object.is:H1;function Ks(e,t){if(Nt(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(!nu.call(t,s)||!Nt(e[s],t[s]))return!1}return!0}function Gf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function qf(e,t){var n=Gf(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=Gf(n)}}function $g(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?$g(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Bg(){for(var e=window,t=Ro();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ro(e.document)}return t}function Xc(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 W1(e){var t=Bg(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&$g(n.ownerDocument.documentElement,n)){if(r!==null&&Xc(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=qf(n,i);var o=qf(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 K1=Zt&&"documentMode"in document&&11>=document.documentMode,yr=null,Su=null,Rs=null,ku=!1;function Yf(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ku||yr==null||yr!==Ro(r)||(r=yr,"selectionStart"in r&&Xc(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}),Rs&&Ks(Rs,r)||(Rs=r,r=Mo(Su,"onSelect"),0<r.length&&(t=new Gc("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=yr)))}function _i(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var vr={animationend:_i("Animation","AnimationEnd"),animationiteration:_i("Animation","AnimationIteration"),animationstart:_i("Animation","AnimationStart"),transitionend:_i("Transition","TransitionEnd")},al={},Ug={};Zt&&(Ug=document.createElement("div").style,"AnimationEvent"in window||(delete vr.animationend.animation,delete vr.animationiteration.animation,delete vr.animationstart.animation),"TransitionEvent"in window||delete vr.transitionend.transition);function va(e){if(al[e])return al[e];if(!vr[e])return e;var t=vr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ug)return al[e]=t[n];return e}var Hg=va("animationend"),Wg=va("animationiteration"),Kg=va("animationstart"),Gg=va("transitionend"),qg=new Map,Xf="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 An(e,t){qg.set(e,t),lr(t,[e])}for(var ll=0;ll<Xf.length;ll++){var ul=Xf[ll],G1=ul.toLowerCase(),q1=ul[0].toUpperCase()+ul.slice(1);An(G1,"on"+q1)}An(Hg,"onAnimationEnd");An(Wg,"onAnimationIteration");An(Kg,"onAnimationStart");An("dblclick","onDoubleClick");An("focusin","onFocus");An("focusout","onBlur");An(Gg,"onTransitionEnd");Ir("onMouseEnter",["mouseout","mouseover"]);Ir("onMouseLeave",["mouseout","mouseover"]);Ir("onPointerEnter",["pointerout","pointerover"]);Ir("onPointerLeave",["pointerout","pointerover"]);lr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));lr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));lr("onBeforeInput",["compositionend","keypress","textInput","paste"]);lr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));lr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));lr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ks="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(" "),Y1=new Set("cancel close invalid load scroll toggle".split(" ").concat(ks));function Qf(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Gw(r,t,void 0,e),e.currentTarget=null}function Yg(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],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;Qf(s,a,u),i=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==i&&s.isPropagationStopped())break e;Qf(s,a,u),i=l}}}if(jo)throw e=yu,jo=!1,yu=null,e}function oe(e,t){var n=t[Pu];n===void 0&&(n=t[Pu]=new Set);var r=e+"__bubble";n.has(r)||(Xg(t,e,2,!1),n.add(r))}function cl(e,t,n){var r=0;t&&(r|=4),Xg(n,e,r,t)}var Vi="_reactListening"+Math.random().toString(36).slice(2);function Gs(e){if(!e[Vi]){e[Vi]=!0,rg.forEach(function(n){n!=="selectionchange"&&(Y1.has(n)||cl(n,!1,e),cl(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Vi]||(t[Vi]=!0,cl("selectionchange",!1,t))}}function Xg(e,t,n,r){switch(Og(t)){case 1:var s=u1;break;case 4:s=c1;break;default:s=Wc}n=s.bind(null,t,n,e),s=void 0,!gu||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 dl(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 l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;o=o.return}for(;a!==null;){if(o=Un(a),o===null)return;if(l=o.tag,l===5||l===6){r=i=o;continue e}a=a.parentNode}}r=r.return}xg(function(){var u=i,c=$c(n),d=[];e:{var f=qg.get(e);if(f!==void 0){var g=Gc,p=e;switch(e){case"keypress":if(io(n)===0)break e;case"keydown":case"keyup":g=b1;break;case"focusin":p="focus",g=sl;break;case"focusout":p="blur",g=sl;break;case"beforeblur":case"afterblur":g=sl;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":g=Vf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":g=h1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":g=R1;break;case Hg:case Wg:case Kg:g=g1;break;case Gg:g=j1;break;case"scroll":g=d1;break;case"wheel":g=A1;break;case"copy":case"cut":case"paste":g=v1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":g=$f}var v=(t&4)!==0,w=!v&&e==="scroll",m=v?f!==null?f+"Capture":null:f;v=[];for(var y=u,x;y!==null;){x=y;var k=x.stateNode;if(x.tag===5&&k!==null&&(x=k,m!==null&&(k=$s(y,m),k!=null&&v.push(qs(y,k,x)))),w)break;y=y.return}0<v.length&&(f=new g(f,p,null,n,c),d.push({event:f,listeners:v}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",g=e==="mouseout"||e==="pointerout",f&&n!==pu&&(p=n.relatedTarget||n.fromElement)&&(Un(p)||p[en]))break e;if((g||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,g?(p=n.relatedTarget||n.toElement,g=u,p=p?Un(p):null,p!==null&&(w=ur(p),p!==w||p.tag!==5&&p.tag!==6)&&(p=null)):(g=null,p=u),g!==p)){if(v=Vf,k="onMouseLeave",m="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(v=$f,k="onPointerLeave",m="onPointerEnter",y="pointer"),w=g==null?f:xr(g),x=p==null?f:xr(p),f=new v(k,y+"leave",g,n,c),f.target=w,f.relatedTarget=x,k=null,Un(c)===u&&(v=new v(m,y+"enter",p,n,c),v.target=x,v.relatedTarget=w,k=v),w=k,g&&p)t:{for(v=g,m=p,y=0,x=v;x;x=cr(x))y++;for(x=0,k=m;k;k=cr(k))x++;for(;0<y-x;)v=cr(v),y--;for(;0<x-y;)m=cr(m),x--;for(;y--;){if(v===m||m!==null&&v===m.alternate)break t;v=cr(v),m=cr(m)}v=null}else v=null;g!==null&&Jf(d,f,g,v,!1),p!==null&&w!==null&&Jf(d,w,p,v,!0)}}e:{if(f=u?xr(u):window,g=f.nodeName&&f.nodeName.toLowerCase(),g==="select"||g==="input"&&f.type==="file")var C=V1;else if(Hf(f))if(Vg)C=U1;else{C=$1;var b=z1}else(g=f.nodeName)&&g.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(C=B1);if(C&&(C=C(e,u))){_g(d,C,n,c);break e}b&&b(e,f,u),e==="focusout"&&(b=f._wrapperState)&&b.controlled&&f.type==="number"&&uu(f,"number",f.value)}switch(b=u?xr(u):window,e){case"focusin":(Hf(b)||b.contentEditable==="true")&&(yr=b,Su=u,Rs=null);break;case"focusout":Rs=Su=yr=null;break;case"mousedown":ku=!0;break;case"contextmenu":case"mouseup":case"dragend":ku=!1,Yf(d,n,c);break;case"selectionchange":if(K1)break;case"keydown":case"keyup":Yf(d,n,c)}var T;if(Yc)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else gr?Fg(e,n)&&(P="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(P="onCompositionStart");P&&(Mg&&n.locale!=="ko"&&(gr||P!=="onCompositionStart"?P==="onCompositionEnd"&&gr&&(T=Dg()):(yn=c,Kc="value"in yn?yn.value:yn.textContent,gr=!0)),b=Mo(u,P),0<b.length&&(P=new zf(P,e,null,n,c),d.push({event:P,listeners:b}),T?P.data=T:(T=Ig(n),T!==null&&(P.data=T)))),(T=D1?M1(e,n):F1(e,n))&&(u=Mo(u,"onBeforeInput"),0<u.length&&(c=new zf("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=T))}Yg(d,t)})}function qs(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Mo(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=$s(e,n),i!=null&&r.unshift(qs(e,i,s)),i=$s(e,t),i!=null&&r.push(qs(e,i,s))),e=e.return}return r}function cr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Jf(e,t,n,r,s){for(var i=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,s?(l=$s(n,i),l!=null&&o.unshift(qs(n,l,a))):s||(l=$s(n,i),l!=null&&o.push(qs(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var X1=/\r\n?/g,Q1=/\u0000|\uFFFD/g;function Zf(e){return(typeof e=="string"?e:""+e).replace(X1,`
38
- `).replace(Q1,"")}function zi(e,t,n){if(t=Zf(t),Zf(e)!==t&&n)throw Error(j(425))}function Fo(){}var Cu=null,Eu=null;function bu(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 Tu=typeof setTimeout=="function"?setTimeout:void 0,J1=typeof clearTimeout=="function"?clearTimeout:void 0,eh=typeof Promise=="function"?Promise:void 0,Z1=typeof queueMicrotask=="function"?queueMicrotask:typeof eh<"u"?function(e){return eh.resolve(null).then(e).catch(eS)}:Tu;function eS(e){setTimeout(function(){throw e})}function fl(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),Hs(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);Hs(t)}function Cn(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 th(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 Xr=Math.random().toString(36).slice(2),Mt="__reactFiber$"+Xr,Ys="__reactProps$"+Xr,en="__reactContainer$"+Xr,Pu="__reactEvents$"+Xr,tS="__reactListeners$"+Xr,nS="__reactHandles$"+Xr;function Un(e){var t=e[Mt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[en]||n[Mt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=th(e);e!==null;){if(n=e[Mt])return n;e=th(e)}return t}e=n,n=e.parentNode}return null}function hi(e){return e=e[Mt]||e[en],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function xr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(j(33))}function xa(e){return e[Ys]||null}var Ru=[],wr=-1;function On(e){return{current:e}}function le(e){0>wr||(e.current=Ru[wr],Ru[wr]=null,wr--)}function se(e,t){wr++,Ru[wr]=e.current,e.current=t}var Nn={},_e=On(Nn),qe=On(!1),er=Nn;function _r(e,t){var n=e.type.contextTypes;if(!n)return Nn;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 Ye(e){return e=e.childContextTypes,e!=null}function Io(){le(qe),le(_e)}function nh(e,t,n){if(_e.current!==Nn)throw Error(j(168));se(_e,t),se(qe,n)}function Qg(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(j(108,zw(e)||"Unknown",s));return pe({},n,r)}function _o(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Nn,er=_e.current,se(_e,e),se(qe,qe.current),!0}function rh(e,t,n){var r=e.stateNode;if(!r)throw Error(j(169));n?(e=Qg(e,t,er),r.__reactInternalMemoizedMergedChildContext=e,le(qe),le(_e),se(_e,e)):le(qe),se(qe,n)}var Gt=null,wa=!1,hl=!1;function Jg(e){Gt===null?Gt=[e]:Gt.push(e)}function rS(e){wa=!0,Jg(e)}function Dn(){if(!hl&&Gt!==null){hl=!0;var e=0,t=J;try{var n=Gt;for(J=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Gt=null,wa=!1}catch(s){throw Gt!==null&&(Gt=Gt.slice(e+1)),Cg(Bc,Dn),s}finally{J=t,hl=!1}}return null}var Sr=[],kr=0,Vo=null,zo=0,ct=[],dt=0,tr=null,qt=1,Yt="";function zn(e,t){Sr[kr++]=zo,Sr[kr++]=Vo,Vo=e,zo=t}function Zg(e,t,n){ct[dt++]=qt,ct[dt++]=Yt,ct[dt++]=tr,tr=e;var r=qt;e=Yt;var s=32-Tt(r)-1;r&=~(1<<s),n+=1;var i=32-Tt(t)+s;if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,qt=1<<32-Tt(t)+s|n<<s|r,Yt=i+e}else qt=1<<i|n<<s|r,Yt=e}function Qc(e){e.return!==null&&(zn(e,1),Zg(e,1,0))}function Jc(e){for(;e===Vo;)Vo=Sr[--kr],Sr[kr]=null,zo=Sr[--kr],Sr[kr]=null;for(;e===tr;)tr=ct[--dt],ct[dt]=null,Yt=ct[--dt],ct[dt]=null,qt=ct[--dt],ct[dt]=null}var tt=null,et=null,ce=!1,bt=null;function ey(e,t){var n=ft(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 sh(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,tt=e,et=Cn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,tt=e,et=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=tr!==null?{id:qt,overflow:Yt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=ft(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,tt=e,et=null,!0):!1;default:return!1}}function Nu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ju(e){if(ce){var t=et;if(t){var n=t;if(!sh(e,t)){if(Nu(e))throw Error(j(418));t=Cn(n.nextSibling);var r=tt;t&&sh(e,t)?ey(r,n):(e.flags=e.flags&-4097|2,ce=!1,tt=e)}}else{if(Nu(e))throw Error(j(418));e.flags=e.flags&-4097|2,ce=!1,tt=e}}}function ih(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;tt=e}function $i(e){if(e!==tt)return!1;if(!ce)return ih(e),ce=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!bu(e.type,e.memoizedProps)),t&&(t=et)){if(Nu(e))throw ty(),Error(j(418));for(;t;)ey(e,t),t=Cn(t.nextSibling)}if(ih(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(j(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){et=Cn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}et=null}}else et=tt?Cn(e.stateNode.nextSibling):null;return!0}function ty(){for(var e=et;e;)e=Cn(e.nextSibling)}function Vr(){et=tt=null,ce=!1}function Zc(e){bt===null?bt=[e]:bt.push(e)}var sS=sn.ReactCurrentBatchConfig;function cs(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(j(309));var r=n.stateNode}if(!r)throw Error(j(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(j(284));if(!n._owner)throw Error(j(290,e))}return e}function Bi(e,t){throw e=Object.prototype.toString.call(t),Error(j(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function oh(e){var t=e._init;return t(e._payload)}function ny(e){function t(m,y){if(e){var x=m.deletions;x===null?(m.deletions=[y],m.flags|=16):x.push(y)}}function n(m,y){if(!e)return null;for(;y!==null;)t(m,y),y=y.sibling;return null}function r(m,y){for(m=new Map;y!==null;)y.key!==null?m.set(y.key,y):m.set(y.index,y),y=y.sibling;return m}function s(m,y){return m=Pn(m,y),m.index=0,m.sibling=null,m}function i(m,y,x){return m.index=x,e?(x=m.alternate,x!==null?(x=x.index,x<y?(m.flags|=2,y):x):(m.flags|=2,y)):(m.flags|=1048576,y)}function o(m){return e&&m.alternate===null&&(m.flags|=2),m}function a(m,y,x,k){return y===null||y.tag!==6?(y=wl(x,m.mode,k),y.return=m,y):(y=s(y,x),y.return=m,y)}function l(m,y,x,k){var C=x.type;return C===mr?c(m,y,x.props.children,k,x.key):y!==null&&(y.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===hn&&oh(C)===y.type)?(k=s(y,x.props),k.ref=cs(m,y,x),k.return=m,k):(k=ho(x.type,x.key,x.props,null,m.mode,k),k.ref=cs(m,y,x),k.return=m,k)}function u(m,y,x,k){return y===null||y.tag!==4||y.stateNode.containerInfo!==x.containerInfo||y.stateNode.implementation!==x.implementation?(y=Sl(x,m.mode,k),y.return=m,y):(y=s(y,x.children||[]),y.return=m,y)}function c(m,y,x,k,C){return y===null||y.tag!==7?(y=Xn(x,m.mode,k,C),y.return=m,y):(y=s(y,x),y.return=m,y)}function d(m,y,x){if(typeof y=="string"&&y!==""||typeof y=="number")return y=wl(""+y,m.mode,x),y.return=m,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Li:return x=ho(y.type,y.key,y.props,null,m.mode,x),x.ref=cs(m,null,y),x.return=m,x;case pr:return y=Sl(y,m.mode,x),y.return=m,y;case hn:var k=y._init;return d(m,k(y._payload),x)}if(ws(y)||is(y))return y=Xn(y,m.mode,x,null),y.return=m,y;Bi(m,y)}return null}function f(m,y,x,k){var C=y!==null?y.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return C!==null?null:a(m,y,""+x,k);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Li:return x.key===C?l(m,y,x,k):null;case pr:return x.key===C?u(m,y,x,k):null;case hn:return C=x._init,f(m,y,C(x._payload),k)}if(ws(x)||is(x))return C!==null?null:c(m,y,x,k,null);Bi(m,x)}return null}function g(m,y,x,k,C){if(typeof k=="string"&&k!==""||typeof k=="number")return m=m.get(x)||null,a(y,m,""+k,C);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case Li:return m=m.get(k.key===null?x:k.key)||null,l(y,m,k,C);case pr:return m=m.get(k.key===null?x:k.key)||null,u(y,m,k,C);case hn:var b=k._init;return g(m,y,x,b(k._payload),C)}if(ws(k)||is(k))return m=m.get(x)||null,c(y,m,k,C,null);Bi(y,k)}return null}function p(m,y,x,k){for(var C=null,b=null,T=y,P=y=0,L=null;T!==null&&P<x.length;P++){T.index>P?(L=T,T=null):L=T.sibling;var R=f(m,T,x[P],k);if(R===null){T===null&&(T=L);break}e&&T&&R.alternate===null&&t(m,T),y=i(R,y,P),b===null?C=R:b.sibling=R,b=R,T=L}if(P===x.length)return n(m,T),ce&&zn(m,P),C;if(T===null){for(;P<x.length;P++)T=d(m,x[P],k),T!==null&&(y=i(T,y,P),b===null?C=T:b.sibling=T,b=T);return ce&&zn(m,P),C}for(T=r(m,T);P<x.length;P++)L=g(T,m,P,x[P],k),L!==null&&(e&&L.alternate!==null&&T.delete(L.key===null?P:L.key),y=i(L,y,P),b===null?C=L:b.sibling=L,b=L);return e&&T.forEach(function(B){return t(m,B)}),ce&&zn(m,P),C}function v(m,y,x,k){var C=is(x);if(typeof C!="function")throw Error(j(150));if(x=C.call(x),x==null)throw Error(j(151));for(var b=C=null,T=y,P=y=0,L=null,R=x.next();T!==null&&!R.done;P++,R=x.next()){T.index>P?(L=T,T=null):L=T.sibling;var B=f(m,T,R.value,k);if(B===null){T===null&&(T=L);break}e&&T&&B.alternate===null&&t(m,T),y=i(B,y,P),b===null?C=B:b.sibling=B,b=B,T=L}if(R.done)return n(m,T),ce&&zn(m,P),C;if(T===null){for(;!R.done;P++,R=x.next())R=d(m,R.value,k),R!==null&&(y=i(R,y,P),b===null?C=R:b.sibling=R,b=R);return ce&&zn(m,P),C}for(T=r(m,T);!R.done;P++,R=x.next())R=g(T,m,P,R.value,k),R!==null&&(e&&R.alternate!==null&&T.delete(R.key===null?P:R.key),y=i(R,y,P),b===null?C=R:b.sibling=R,b=R);return e&&T.forEach(function(A){return t(m,A)}),ce&&zn(m,P),C}function w(m,y,x,k){if(typeof x=="object"&&x!==null&&x.type===mr&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Li:e:{for(var C=x.key,b=y;b!==null;){if(b.key===C){if(C=x.type,C===mr){if(b.tag===7){n(m,b.sibling),y=s(b,x.props.children),y.return=m,m=y;break e}}else if(b.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===hn&&oh(C)===b.type){n(m,b.sibling),y=s(b,x.props),y.ref=cs(m,b,x),y.return=m,m=y;break e}n(m,b);break}else t(m,b);b=b.sibling}x.type===mr?(y=Xn(x.props.children,m.mode,k,x.key),y.return=m,m=y):(k=ho(x.type,x.key,x.props,null,m.mode,k),k.ref=cs(m,y,x),k.return=m,m=k)}return o(m);case pr:e:{for(b=x.key;y!==null;){if(y.key===b)if(y.tag===4&&y.stateNode.containerInfo===x.containerInfo&&y.stateNode.implementation===x.implementation){n(m,y.sibling),y=s(y,x.children||[]),y.return=m,m=y;break e}else{n(m,y);break}else t(m,y);y=y.sibling}y=Sl(x,m.mode,k),y.return=m,m=y}return o(m);case hn:return b=x._init,w(m,y,b(x._payload),k)}if(ws(x))return p(m,y,x,k);if(is(x))return v(m,y,x,k);Bi(m,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,y!==null&&y.tag===6?(n(m,y.sibling),y=s(y,x),y.return=m,m=y):(n(m,y),y=wl(x,m.mode,k),y.return=m,m=y),o(m)):n(m,y)}return w}var zr=ny(!0),ry=ny(!1),$o=On(null),Bo=null,Cr=null,ed=null;function td(){ed=Cr=Bo=null}function nd(e){var t=$o.current;le($o),e._currentValue=t}function Lu(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 Or(e,t){Bo=e,ed=Cr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ge=!0),e.firstContext=null)}function gt(e){var t=e._currentValue;if(ed!==e)if(e={context:e,memoizedValue:t,next:null},Cr===null){if(Bo===null)throw Error(j(308));Cr=e,Bo.dependencies={lanes:0,firstContext:e}}else Cr=Cr.next=e;return t}var Hn=null;function rd(e){Hn===null?Hn=[e]:Hn.push(e)}function sy(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,rd(t)):(n.next=s.next,s.next=n),t.interleaved=n,tn(e,r)}function tn(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 pn=!1;function sd(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function iy(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 Xt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function En(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,X&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,tn(e,n)}return s=r.interleaved,s===null?(t.next=t,rd(r)):(t.next=s.next,s.next=t),r.interleaved=t,tn(e,n)}function oo(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,Uc(e,n)}}function ah(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 Uo(e,t,n,r){var s=e.updateQueue;pn=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?i=u:o.next=u,o=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==o&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(i!==null){var d=s.baseState;o=0,c=u=l=null,a=i;do{var f=a.lane,g=a.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:g,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=e,v=a;switch(f=t,g=n,v.tag){case 1:if(p=v.payload,typeof p=="function"){d=p.call(g,d,f);break e}d=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=v.payload,f=typeof p=="function"?p.call(g,d,f):p,f==null)break e;d=pe({},d,f);break e;case 2:pn=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=s.effects,f===null?s.effects=[a]:f.push(a))}else g={eventTime:g,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=g,l=d):c=c.next=g,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(c===null&&(l=d),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=c,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);rr|=o,e.lanes=o,e.memoizedState=d}}function lh(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(j(191,s));s.call(r)}}}var pi={},_t=On(pi),Xs=On(pi),Qs=On(pi);function Wn(e){if(e===pi)throw Error(j(174));return e}function id(e,t){switch(se(Qs,t),se(Xs,e),se(_t,pi),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:du(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=du(t,e)}le(_t),se(_t,t)}function $r(){le(_t),le(Xs),le(Qs)}function oy(e){Wn(Qs.current);var t=Wn(_t.current),n=du(t,e.type);t!==n&&(se(Xs,e),se(_t,n))}function od(e){Xs.current===e&&(le(_t),le(Xs))}var de=On(0);function Ho(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 pl=[];function ad(){for(var e=0;e<pl.length;e++)pl[e]._workInProgressVersionPrimary=null;pl.length=0}var ao=sn.ReactCurrentDispatcher,ml=sn.ReactCurrentBatchConfig,nr=0,fe=null,Ce=null,be=null,Wo=!1,Ns=!1,Js=0,iS=0;function De(){throw Error(j(321))}function ld(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Nt(e[n],t[n]))return!1;return!0}function ud(e,t,n,r,s,i){if(nr=i,fe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ao.current=e===null||e.memoizedState===null?uS:cS,e=n(r,s),Ns){i=0;do{if(Ns=!1,Js=0,25<=i)throw Error(j(301));i+=1,be=Ce=null,t.updateQueue=null,ao.current=dS,e=n(r,s)}while(Ns)}if(ao.current=Ko,t=Ce!==null&&Ce.next!==null,nr=0,be=Ce=fe=null,Wo=!1,t)throw Error(j(300));return e}function cd(){var e=Js!==0;return Js=0,e}function At(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return be===null?fe.memoizedState=be=e:be=be.next=e,be}function yt(){if(Ce===null){var e=fe.alternate;e=e!==null?e.memoizedState:null}else e=Ce.next;var t=be===null?fe.memoizedState:be.next;if(t!==null)be=t,Ce=e;else{if(e===null)throw Error(j(310));Ce=e,e={memoizedState:Ce.memoizedState,baseState:Ce.baseState,baseQueue:Ce.baseQueue,queue:Ce.queue,next:null},be===null?fe.memoizedState=be=e:be=be.next=e}return be}function Zs(e,t){return typeof t=="function"?t(e):t}function gl(e){var t=yt(),n=t.queue;if(n===null)throw Error(j(311));n.lastRenderedReducer=e;var r=Ce,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var a=o=null,l=null,u=i;do{var c=u.lane;if((nr&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=d,o=r):l=l.next=d,fe.lanes|=c,rr|=c}u=u.next}while(u!==null&&u!==i);l===null?o=r:l.next=a,Nt(r,t.memoizedState)||(Ge=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do i=s.lane,fe.lanes|=i,rr|=i,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function yl(e){var t=yt(),n=t.queue;if(n===null)throw Error(j(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);Nt(i,t.memoizedState)||(Ge=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function ay(){}function ly(e,t){var n=fe,r=yt(),s=t(),i=!Nt(r.memoizedState,s);if(i&&(r.memoizedState=s,Ge=!0),r=r.queue,dd(dy.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||be!==null&&be.memoizedState.tag&1){if(n.flags|=2048,ei(9,cy.bind(null,n,r,s,t),void 0,null),Te===null)throw Error(j(349));nr&30||uy(n,t,s)}return s}function uy(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=fe.updateQueue,t===null?(t={lastEffect:null,stores:null},fe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function cy(e,t,n,r){t.value=n,t.getSnapshot=r,fy(t)&&hy(e)}function dy(e,t,n){return n(function(){fy(t)&&hy(e)})}function fy(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Nt(e,n)}catch{return!0}}function hy(e){var t=tn(e,1);t!==null&&Pt(t,e,1,-1)}function uh(e){var t=At();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Zs,lastRenderedState:e},t.queue=e,e=e.dispatch=lS.bind(null,fe,e),[t.memoizedState,e]}function ei(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=fe.updateQueue,t===null?(t={lastEffect:null,stores:null},fe.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 py(){return yt().memoizedState}function lo(e,t,n,r){var s=At();fe.flags|=e,s.memoizedState=ei(1|t,n,void 0,r===void 0?null:r)}function Sa(e,t,n,r){var s=yt();r=r===void 0?null:r;var i=void 0;if(Ce!==null){var o=Ce.memoizedState;if(i=o.destroy,r!==null&&ld(r,o.deps)){s.memoizedState=ei(t,n,i,r);return}}fe.flags|=e,s.memoizedState=ei(1|t,n,i,r)}function ch(e,t){return lo(8390656,8,e,t)}function dd(e,t){return Sa(2048,8,e,t)}function my(e,t){return Sa(4,2,e,t)}function gy(e,t){return Sa(4,4,e,t)}function yy(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 vy(e,t,n){return n=n!=null?n.concat([e]):null,Sa(4,4,yy.bind(null,t,e),n)}function fd(){}function xy(e,t){var n=yt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ld(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function wy(e,t){var n=yt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ld(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Sy(e,t,n){return nr&21?(Nt(n,t)||(n=Tg(),fe.lanes|=n,rr|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ge=!0),e.memoizedState=n)}function oS(e,t){var n=J;J=n!==0&&4>n?n:4,e(!0);var r=ml.transition;ml.transition={};try{e(!1),t()}finally{J=n,ml.transition=r}}function ky(){return yt().memoizedState}function aS(e,t,n){var r=Tn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Cy(e))Ey(t,n);else if(n=sy(e,t,n,r),n!==null){var s=Be();Pt(n,e,r,s),by(n,t,r)}}function lS(e,t,n){var r=Tn(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Cy(e))Ey(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,Nt(a,o)){var l=t.interleaved;l===null?(s.next=s,rd(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}n=sy(e,t,s,r),n!==null&&(s=Be(),Pt(n,e,r,s),by(n,t,r))}}function Cy(e){var t=e.alternate;return e===fe||t!==null&&t===fe}function Ey(e,t){Ns=Wo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function by(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Uc(e,n)}}var Ko={readContext:gt,useCallback:De,useContext:De,useEffect:De,useImperativeHandle:De,useInsertionEffect:De,useLayoutEffect:De,useMemo:De,useReducer:De,useRef:De,useState:De,useDebugValue:De,useDeferredValue:De,useTransition:De,useMutableSource:De,useSyncExternalStore:De,useId:De,unstable_isNewReconciler:!1},uS={readContext:gt,useCallback:function(e,t){return At().memoizedState=[e,t===void 0?null:t],e},useContext:gt,useEffect:ch,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,lo(4194308,4,yy.bind(null,t,e),n)},useLayoutEffect:function(e,t){return lo(4194308,4,e,t)},useInsertionEffect:function(e,t){return lo(4,2,e,t)},useMemo:function(e,t){var n=At();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=At();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=aS.bind(null,fe,e),[r.memoizedState,e]},useRef:function(e){var t=At();return e={current:e},t.memoizedState=e},useState:uh,useDebugValue:fd,useDeferredValue:function(e){return At().memoizedState=e},useTransition:function(){var e=uh(!1),t=e[0];return e=oS.bind(null,e[1]),At().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=fe,s=At();if(ce){if(n===void 0)throw Error(j(407));n=n()}else{if(n=t(),Te===null)throw Error(j(349));nr&30||uy(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,ch(dy.bind(null,r,i,e),[e]),r.flags|=2048,ei(9,cy.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=At(),t=Te.identifierPrefix;if(ce){var n=Yt,r=qt;n=(r&~(1<<32-Tt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Js++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=iS++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},cS={readContext:gt,useCallback:xy,useContext:gt,useEffect:dd,useImperativeHandle:vy,useInsertionEffect:my,useLayoutEffect:gy,useMemo:wy,useReducer:gl,useRef:py,useState:function(){return gl(Zs)},useDebugValue:fd,useDeferredValue:function(e){var t=yt();return Sy(t,Ce.memoizedState,e)},useTransition:function(){var e=gl(Zs)[0],t=yt().memoizedState;return[e,t]},useMutableSource:ay,useSyncExternalStore:ly,useId:ky,unstable_isNewReconciler:!1},dS={readContext:gt,useCallback:xy,useContext:gt,useEffect:dd,useImperativeHandle:vy,useInsertionEffect:my,useLayoutEffect:gy,useMemo:wy,useReducer:yl,useRef:py,useState:function(){return yl(Zs)},useDebugValue:fd,useDeferredValue:function(e){var t=yt();return Ce===null?t.memoizedState=e:Sy(t,Ce.memoizedState,e)},useTransition:function(){var e=yl(Zs)[0],t=yt().memoizedState;return[e,t]},useMutableSource:ay,useSyncExternalStore:ly,useId:ky,unstable_isNewReconciler:!1};function Ct(e,t){if(e&&e.defaultProps){t=pe({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Au(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:pe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ka={isMounted:function(e){return(e=e._reactInternals)?ur(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Be(),s=Tn(e),i=Xt(r,s);i.payload=t,n!=null&&(i.callback=n),t=En(e,i,s),t!==null&&(Pt(t,e,s,r),oo(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Be(),s=Tn(e),i=Xt(r,s);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=En(e,i,s),t!==null&&(Pt(t,e,s,r),oo(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Be(),r=Tn(e),s=Xt(n,r);s.tag=2,t!=null&&(s.callback=t),t=En(e,s,r),t!==null&&(Pt(t,e,r,n),oo(t,e,r))}};function dh(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?!Ks(n,r)||!Ks(s,i):!0}function Ty(e,t,n){var r=!1,s=Nn,i=t.contextType;return typeof i=="object"&&i!==null?i=gt(i):(s=Ye(t)?er:_e.current,r=t.contextTypes,i=(r=r!=null)?_r(e,s):Nn),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=ka,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function fh(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&&ka.enqueueReplaceState(t,t.state,null)}function Ou(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},sd(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=gt(i):(i=Ye(t)?er:_e.current,s.context=_r(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Au(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&&ka.enqueueReplaceState(s,s.state,null),Uo(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Br(e,t){try{var n="",r=t;do n+=Vw(r),r=r.return;while(r);var s=n}catch(i){s=`
38
+ `).replace(Q1,"")}function zi(e,t,n){if(t=Zf(t),Zf(e)!==t&&n)throw Error(j(425))}function Fo(){}var Cu=null,Eu=null;function bu(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 Tu=typeof setTimeout=="function"?setTimeout:void 0,J1=typeof clearTimeout=="function"?clearTimeout:void 0,eh=typeof Promise=="function"?Promise:void 0,Z1=typeof queueMicrotask=="function"?queueMicrotask:typeof eh<"u"?function(e){return eh.resolve(null).then(e).catch(eS)}:Tu;function eS(e){setTimeout(function(){throw e})}function fl(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),Hs(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);Hs(t)}function Cn(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 th(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 Xr=Math.random().toString(36).slice(2),Mt="__reactFiber$"+Xr,Ys="__reactProps$"+Xr,en="__reactContainer$"+Xr,Pu="__reactEvents$"+Xr,tS="__reactListeners$"+Xr,nS="__reactHandles$"+Xr;function Un(e){var t=e[Mt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[en]||n[Mt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=th(e);e!==null;){if(n=e[Mt])return n;e=th(e)}return t}e=n,n=e.parentNode}return null}function hi(e){return e=e[Mt]||e[en],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function xr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(j(33))}function xa(e){return e[Ys]||null}var Ru=[],wr=-1;function On(e){return{current:e}}function le(e){0>wr||(e.current=Ru[wr],Ru[wr]=null,wr--)}function se(e,t){wr++,Ru[wr]=e.current,e.current=t}var Nn={},_e=On(Nn),qe=On(!1),er=Nn;function _r(e,t){var n=e.type.contextTypes;if(!n)return Nn;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 Ye(e){return e=e.childContextTypes,e!=null}function Io(){le(qe),le(_e)}function nh(e,t,n){if(_e.current!==Nn)throw Error(j(168));se(_e,t),se(qe,n)}function Qg(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(j(108,zw(e)||"Unknown",s));return pe({},n,r)}function _o(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Nn,er=_e.current,se(_e,e),se(qe,qe.current),!0}function rh(e,t,n){var r=e.stateNode;if(!r)throw Error(j(169));n?(e=Qg(e,t,er),r.__reactInternalMemoizedMergedChildContext=e,le(qe),le(_e),se(_e,e)):le(qe),se(qe,n)}var Gt=null,wa=!1,hl=!1;function Jg(e){Gt===null?Gt=[e]:Gt.push(e)}function rS(e){wa=!0,Jg(e)}function Dn(){if(!hl&&Gt!==null){hl=!0;var e=0,t=J;try{var n=Gt;for(J=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Gt=null,wa=!1}catch(s){throw Gt!==null&&(Gt=Gt.slice(e+1)),Cg(Bc,Dn),s}finally{J=t,hl=!1}}return null}var Sr=[],kr=0,Vo=null,zo=0,dt=[],ft=0,tr=null,qt=1,Yt="";function zn(e,t){Sr[kr++]=zo,Sr[kr++]=Vo,Vo=e,zo=t}function Zg(e,t,n){dt[ft++]=qt,dt[ft++]=Yt,dt[ft++]=tr,tr=e;var r=qt;e=Yt;var s=32-Tt(r)-1;r&=~(1<<s),n+=1;var i=32-Tt(t)+s;if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,qt=1<<32-Tt(t)+s|n<<s|r,Yt=i+e}else qt=1<<i|n<<s|r,Yt=e}function Qc(e){e.return!==null&&(zn(e,1),Zg(e,1,0))}function Jc(e){for(;e===Vo;)Vo=Sr[--kr],Sr[kr]=null,zo=Sr[--kr],Sr[kr]=null;for(;e===tr;)tr=dt[--ft],dt[ft]=null,Yt=dt[--ft],dt[ft]=null,qt=dt[--ft],dt[ft]=null}var tt=null,et=null,ce=!1,bt=null;function ey(e,t){var n=ht(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 sh(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,tt=e,et=Cn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,tt=e,et=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=tr!==null?{id:qt,overflow:Yt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=ht(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,tt=e,et=null,!0):!1;default:return!1}}function Nu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ju(e){if(ce){var t=et;if(t){var n=t;if(!sh(e,t)){if(Nu(e))throw Error(j(418));t=Cn(n.nextSibling);var r=tt;t&&sh(e,t)?ey(r,n):(e.flags=e.flags&-4097|2,ce=!1,tt=e)}}else{if(Nu(e))throw Error(j(418));e.flags=e.flags&-4097|2,ce=!1,tt=e}}}function ih(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;tt=e}function $i(e){if(e!==tt)return!1;if(!ce)return ih(e),ce=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!bu(e.type,e.memoizedProps)),t&&(t=et)){if(Nu(e))throw ty(),Error(j(418));for(;t;)ey(e,t),t=Cn(t.nextSibling)}if(ih(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(j(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){et=Cn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}et=null}}else et=tt?Cn(e.stateNode.nextSibling):null;return!0}function ty(){for(var e=et;e;)e=Cn(e.nextSibling)}function Vr(){et=tt=null,ce=!1}function Zc(e){bt===null?bt=[e]:bt.push(e)}var sS=sn.ReactCurrentBatchConfig;function cs(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(j(309));var r=n.stateNode}if(!r)throw Error(j(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(j(284));if(!n._owner)throw Error(j(290,e))}return e}function Bi(e,t){throw e=Object.prototype.toString.call(t),Error(j(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function oh(e){var t=e._init;return t(e._payload)}function ny(e){function t(m,y){if(e){var x=m.deletions;x===null?(m.deletions=[y],m.flags|=16):x.push(y)}}function n(m,y){if(!e)return null;for(;y!==null;)t(m,y),y=y.sibling;return null}function r(m,y){for(m=new Map;y!==null;)y.key!==null?m.set(y.key,y):m.set(y.index,y),y=y.sibling;return m}function s(m,y){return m=Pn(m,y),m.index=0,m.sibling=null,m}function i(m,y,x){return m.index=x,e?(x=m.alternate,x!==null?(x=x.index,x<y?(m.flags|=2,y):x):(m.flags|=2,y)):(m.flags|=1048576,y)}function o(m){return e&&m.alternate===null&&(m.flags|=2),m}function a(m,y,x,k){return y===null||y.tag!==6?(y=wl(x,m.mode,k),y.return=m,y):(y=s(y,x),y.return=m,y)}function l(m,y,x,k){var C=x.type;return C===mr?c(m,y,x.props.children,k,x.key):y!==null&&(y.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===hn&&oh(C)===y.type)?(k=s(y,x.props),k.ref=cs(m,y,x),k.return=m,k):(k=ho(x.type,x.key,x.props,null,m.mode,k),k.ref=cs(m,y,x),k.return=m,k)}function u(m,y,x,k){return y===null||y.tag!==4||y.stateNode.containerInfo!==x.containerInfo||y.stateNode.implementation!==x.implementation?(y=Sl(x,m.mode,k),y.return=m,y):(y=s(y,x.children||[]),y.return=m,y)}function c(m,y,x,k,C){return y===null||y.tag!==7?(y=Xn(x,m.mode,k,C),y.return=m,y):(y=s(y,x),y.return=m,y)}function d(m,y,x){if(typeof y=="string"&&y!==""||typeof y=="number")return y=wl(""+y,m.mode,x),y.return=m,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Li:return x=ho(y.type,y.key,y.props,null,m.mode,x),x.ref=cs(m,null,y),x.return=m,x;case pr:return y=Sl(y,m.mode,x),y.return=m,y;case hn:var k=y._init;return d(m,k(y._payload),x)}if(ws(y)||is(y))return y=Xn(y,m.mode,x,null),y.return=m,y;Bi(m,y)}return null}function f(m,y,x,k){var C=y!==null?y.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return C!==null?null:a(m,y,""+x,k);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Li:return x.key===C?l(m,y,x,k):null;case pr:return x.key===C?u(m,y,x,k):null;case hn:return C=x._init,f(m,y,C(x._payload),k)}if(ws(x)||is(x))return C!==null?null:c(m,y,x,k,null);Bi(m,x)}return null}function g(m,y,x,k,C){if(typeof k=="string"&&k!==""||typeof k=="number")return m=m.get(x)||null,a(y,m,""+k,C);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case Li:return m=m.get(k.key===null?x:k.key)||null,l(y,m,k,C);case pr:return m=m.get(k.key===null?x:k.key)||null,u(y,m,k,C);case hn:var b=k._init;return g(m,y,x,b(k._payload),C)}if(ws(k)||is(k))return m=m.get(x)||null,c(y,m,k,C,null);Bi(y,k)}return null}function p(m,y,x,k){for(var C=null,b=null,T=y,P=y=0,L=null;T!==null&&P<x.length;P++){T.index>P?(L=T,T=null):L=T.sibling;var R=f(m,T,x[P],k);if(R===null){T===null&&(T=L);break}e&&T&&R.alternate===null&&t(m,T),y=i(R,y,P),b===null?C=R:b.sibling=R,b=R,T=L}if(P===x.length)return n(m,T),ce&&zn(m,P),C;if(T===null){for(;P<x.length;P++)T=d(m,x[P],k),T!==null&&(y=i(T,y,P),b===null?C=T:b.sibling=T,b=T);return ce&&zn(m,P),C}for(T=r(m,T);P<x.length;P++)L=g(T,m,P,x[P],k),L!==null&&(e&&L.alternate!==null&&T.delete(L.key===null?P:L.key),y=i(L,y,P),b===null?C=L:b.sibling=L,b=L);return e&&T.forEach(function(B){return t(m,B)}),ce&&zn(m,P),C}function v(m,y,x,k){var C=is(x);if(typeof C!="function")throw Error(j(150));if(x=C.call(x),x==null)throw Error(j(151));for(var b=C=null,T=y,P=y=0,L=null,R=x.next();T!==null&&!R.done;P++,R=x.next()){T.index>P?(L=T,T=null):L=T.sibling;var B=f(m,T,R.value,k);if(B===null){T===null&&(T=L);break}e&&T&&B.alternate===null&&t(m,T),y=i(B,y,P),b===null?C=B:b.sibling=B,b=B,T=L}if(R.done)return n(m,T),ce&&zn(m,P),C;if(T===null){for(;!R.done;P++,R=x.next())R=d(m,R.value,k),R!==null&&(y=i(R,y,P),b===null?C=R:b.sibling=R,b=R);return ce&&zn(m,P),C}for(T=r(m,T);!R.done;P++,R=x.next())R=g(T,m,P,R.value,k),R!==null&&(e&&R.alternate!==null&&T.delete(R.key===null?P:R.key),y=i(R,y,P),b===null?C=R:b.sibling=R,b=R);return e&&T.forEach(function(A){return t(m,A)}),ce&&zn(m,P),C}function w(m,y,x,k){if(typeof x=="object"&&x!==null&&x.type===mr&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Li:e:{for(var C=x.key,b=y;b!==null;){if(b.key===C){if(C=x.type,C===mr){if(b.tag===7){n(m,b.sibling),y=s(b,x.props.children),y.return=m,m=y;break e}}else if(b.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===hn&&oh(C)===b.type){n(m,b.sibling),y=s(b,x.props),y.ref=cs(m,b,x),y.return=m,m=y;break e}n(m,b);break}else t(m,b);b=b.sibling}x.type===mr?(y=Xn(x.props.children,m.mode,k,x.key),y.return=m,m=y):(k=ho(x.type,x.key,x.props,null,m.mode,k),k.ref=cs(m,y,x),k.return=m,m=k)}return o(m);case pr:e:{for(b=x.key;y!==null;){if(y.key===b)if(y.tag===4&&y.stateNode.containerInfo===x.containerInfo&&y.stateNode.implementation===x.implementation){n(m,y.sibling),y=s(y,x.children||[]),y.return=m,m=y;break e}else{n(m,y);break}else t(m,y);y=y.sibling}y=Sl(x,m.mode,k),y.return=m,m=y}return o(m);case hn:return b=x._init,w(m,y,b(x._payload),k)}if(ws(x))return p(m,y,x,k);if(is(x))return v(m,y,x,k);Bi(m,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,y!==null&&y.tag===6?(n(m,y.sibling),y=s(y,x),y.return=m,m=y):(n(m,y),y=wl(x,m.mode,k),y.return=m,m=y),o(m)):n(m,y)}return w}var zr=ny(!0),ry=ny(!1),$o=On(null),Bo=null,Cr=null,ed=null;function td(){ed=Cr=Bo=null}function nd(e){var t=$o.current;le($o),e._currentValue=t}function Lu(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 Or(e,t){Bo=e,ed=Cr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ge=!0),e.firstContext=null)}function yt(e){var t=e._currentValue;if(ed!==e)if(e={context:e,memoizedValue:t,next:null},Cr===null){if(Bo===null)throw Error(j(308));Cr=e,Bo.dependencies={lanes:0,firstContext:e}}else Cr=Cr.next=e;return t}var Hn=null;function rd(e){Hn===null?Hn=[e]:Hn.push(e)}function sy(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,rd(t)):(n.next=s.next,s.next=n),t.interleaved=n,tn(e,r)}function tn(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 pn=!1;function sd(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function iy(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 Xt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function En(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,X&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,tn(e,n)}return s=r.interleaved,s===null?(t.next=t,rd(r)):(t.next=s.next,s.next=t),r.interleaved=t,tn(e,n)}function oo(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,Uc(e,n)}}function ah(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 Uo(e,t,n,r){var s=e.updateQueue;pn=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?i=u:o.next=u,o=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==o&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(i!==null){var d=s.baseState;o=0,c=u=l=null,a=i;do{var f=a.lane,g=a.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:g,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=e,v=a;switch(f=t,g=n,v.tag){case 1:if(p=v.payload,typeof p=="function"){d=p.call(g,d,f);break e}d=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=v.payload,f=typeof p=="function"?p.call(g,d,f):p,f==null)break e;d=pe({},d,f);break e;case 2:pn=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=s.effects,f===null?s.effects=[a]:f.push(a))}else g={eventTime:g,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=g,l=d):c=c.next=g,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(c===null&&(l=d),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=c,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);rr|=o,e.lanes=o,e.memoizedState=d}}function lh(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(j(191,s));s.call(r)}}}var pi={},_t=On(pi),Xs=On(pi),Qs=On(pi);function Wn(e){if(e===pi)throw Error(j(174));return e}function id(e,t){switch(se(Qs,t),se(Xs,e),se(_t,pi),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:du(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=du(t,e)}le(_t),se(_t,t)}function $r(){le(_t),le(Xs),le(Qs)}function oy(e){Wn(Qs.current);var t=Wn(_t.current),n=du(t,e.type);t!==n&&(se(Xs,e),se(_t,n))}function od(e){Xs.current===e&&(le(_t),le(Xs))}var de=On(0);function Ho(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 pl=[];function ad(){for(var e=0;e<pl.length;e++)pl[e]._workInProgressVersionPrimary=null;pl.length=0}var ao=sn.ReactCurrentDispatcher,ml=sn.ReactCurrentBatchConfig,nr=0,fe=null,Ce=null,be=null,Wo=!1,Ns=!1,Js=0,iS=0;function De(){throw Error(j(321))}function ld(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Nt(e[n],t[n]))return!1;return!0}function ud(e,t,n,r,s,i){if(nr=i,fe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ao.current=e===null||e.memoizedState===null?uS:cS,e=n(r,s),Ns){i=0;do{if(Ns=!1,Js=0,25<=i)throw Error(j(301));i+=1,be=Ce=null,t.updateQueue=null,ao.current=dS,e=n(r,s)}while(Ns)}if(ao.current=Ko,t=Ce!==null&&Ce.next!==null,nr=0,be=Ce=fe=null,Wo=!1,t)throw Error(j(300));return e}function cd(){var e=Js!==0;return Js=0,e}function At(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return be===null?fe.memoizedState=be=e:be=be.next=e,be}function vt(){if(Ce===null){var e=fe.alternate;e=e!==null?e.memoizedState:null}else e=Ce.next;var t=be===null?fe.memoizedState:be.next;if(t!==null)be=t,Ce=e;else{if(e===null)throw Error(j(310));Ce=e,e={memoizedState:Ce.memoizedState,baseState:Ce.baseState,baseQueue:Ce.baseQueue,queue:Ce.queue,next:null},be===null?fe.memoizedState=be=e:be=be.next=e}return be}function Zs(e,t){return typeof t=="function"?t(e):t}function gl(e){var t=vt(),n=t.queue;if(n===null)throw Error(j(311));n.lastRenderedReducer=e;var r=Ce,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var a=o=null,l=null,u=i;do{var c=u.lane;if((nr&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=d,o=r):l=l.next=d,fe.lanes|=c,rr|=c}u=u.next}while(u!==null&&u!==i);l===null?o=r:l.next=a,Nt(r,t.memoizedState)||(Ge=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do i=s.lane,fe.lanes|=i,rr|=i,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function yl(e){var t=vt(),n=t.queue;if(n===null)throw Error(j(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);Nt(i,t.memoizedState)||(Ge=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function ay(){}function ly(e,t){var n=fe,r=vt(),s=t(),i=!Nt(r.memoizedState,s);if(i&&(r.memoizedState=s,Ge=!0),r=r.queue,dd(dy.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||be!==null&&be.memoizedState.tag&1){if(n.flags|=2048,ei(9,cy.bind(null,n,r,s,t),void 0,null),Te===null)throw Error(j(349));nr&30||uy(n,t,s)}return s}function uy(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=fe.updateQueue,t===null?(t={lastEffect:null,stores:null},fe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function cy(e,t,n,r){t.value=n,t.getSnapshot=r,fy(t)&&hy(e)}function dy(e,t,n){return n(function(){fy(t)&&hy(e)})}function fy(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Nt(e,n)}catch{return!0}}function hy(e){var t=tn(e,1);t!==null&&Pt(t,e,1,-1)}function uh(e){var t=At();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Zs,lastRenderedState:e},t.queue=e,e=e.dispatch=lS.bind(null,fe,e),[t.memoizedState,e]}function ei(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=fe.updateQueue,t===null?(t={lastEffect:null,stores:null},fe.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 py(){return vt().memoizedState}function lo(e,t,n,r){var s=At();fe.flags|=e,s.memoizedState=ei(1|t,n,void 0,r===void 0?null:r)}function Sa(e,t,n,r){var s=vt();r=r===void 0?null:r;var i=void 0;if(Ce!==null){var o=Ce.memoizedState;if(i=o.destroy,r!==null&&ld(r,o.deps)){s.memoizedState=ei(t,n,i,r);return}}fe.flags|=e,s.memoizedState=ei(1|t,n,i,r)}function ch(e,t){return lo(8390656,8,e,t)}function dd(e,t){return Sa(2048,8,e,t)}function my(e,t){return Sa(4,2,e,t)}function gy(e,t){return Sa(4,4,e,t)}function yy(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 vy(e,t,n){return n=n!=null?n.concat([e]):null,Sa(4,4,yy.bind(null,t,e),n)}function fd(){}function xy(e,t){var n=vt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ld(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function wy(e,t){var n=vt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ld(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Sy(e,t,n){return nr&21?(Nt(n,t)||(n=Tg(),fe.lanes|=n,rr|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ge=!0),e.memoizedState=n)}function oS(e,t){var n=J;J=n!==0&&4>n?n:4,e(!0);var r=ml.transition;ml.transition={};try{e(!1),t()}finally{J=n,ml.transition=r}}function ky(){return vt().memoizedState}function aS(e,t,n){var r=Tn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Cy(e))Ey(t,n);else if(n=sy(e,t,n,r),n!==null){var s=Be();Pt(n,e,r,s),by(n,t,r)}}function lS(e,t,n){var r=Tn(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Cy(e))Ey(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,Nt(a,o)){var l=t.interleaved;l===null?(s.next=s,rd(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}n=sy(e,t,s,r),n!==null&&(s=Be(),Pt(n,e,r,s),by(n,t,r))}}function Cy(e){var t=e.alternate;return e===fe||t!==null&&t===fe}function Ey(e,t){Ns=Wo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function by(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Uc(e,n)}}var Ko={readContext:yt,useCallback:De,useContext:De,useEffect:De,useImperativeHandle:De,useInsertionEffect:De,useLayoutEffect:De,useMemo:De,useReducer:De,useRef:De,useState:De,useDebugValue:De,useDeferredValue:De,useTransition:De,useMutableSource:De,useSyncExternalStore:De,useId:De,unstable_isNewReconciler:!1},uS={readContext:yt,useCallback:function(e,t){return At().memoizedState=[e,t===void 0?null:t],e},useContext:yt,useEffect:ch,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,lo(4194308,4,yy.bind(null,t,e),n)},useLayoutEffect:function(e,t){return lo(4194308,4,e,t)},useInsertionEffect:function(e,t){return lo(4,2,e,t)},useMemo:function(e,t){var n=At();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=At();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=aS.bind(null,fe,e),[r.memoizedState,e]},useRef:function(e){var t=At();return e={current:e},t.memoizedState=e},useState:uh,useDebugValue:fd,useDeferredValue:function(e){return At().memoizedState=e},useTransition:function(){var e=uh(!1),t=e[0];return e=oS.bind(null,e[1]),At().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=fe,s=At();if(ce){if(n===void 0)throw Error(j(407));n=n()}else{if(n=t(),Te===null)throw Error(j(349));nr&30||uy(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,ch(dy.bind(null,r,i,e),[e]),r.flags|=2048,ei(9,cy.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=At(),t=Te.identifierPrefix;if(ce){var n=Yt,r=qt;n=(r&~(1<<32-Tt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Js++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=iS++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},cS={readContext:yt,useCallback:xy,useContext:yt,useEffect:dd,useImperativeHandle:vy,useInsertionEffect:my,useLayoutEffect:gy,useMemo:wy,useReducer:gl,useRef:py,useState:function(){return gl(Zs)},useDebugValue:fd,useDeferredValue:function(e){var t=vt();return Sy(t,Ce.memoizedState,e)},useTransition:function(){var e=gl(Zs)[0],t=vt().memoizedState;return[e,t]},useMutableSource:ay,useSyncExternalStore:ly,useId:ky,unstable_isNewReconciler:!1},dS={readContext:yt,useCallback:xy,useContext:yt,useEffect:dd,useImperativeHandle:vy,useInsertionEffect:my,useLayoutEffect:gy,useMemo:wy,useReducer:yl,useRef:py,useState:function(){return yl(Zs)},useDebugValue:fd,useDeferredValue:function(e){var t=vt();return Ce===null?t.memoizedState=e:Sy(t,Ce.memoizedState,e)},useTransition:function(){var e=yl(Zs)[0],t=vt().memoizedState;return[e,t]},useMutableSource:ay,useSyncExternalStore:ly,useId:ky,unstable_isNewReconciler:!1};function Ct(e,t){if(e&&e.defaultProps){t=pe({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Au(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:pe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ka={isMounted:function(e){return(e=e._reactInternals)?ur(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Be(),s=Tn(e),i=Xt(r,s);i.payload=t,n!=null&&(i.callback=n),t=En(e,i,s),t!==null&&(Pt(t,e,s,r),oo(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Be(),s=Tn(e),i=Xt(r,s);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=En(e,i,s),t!==null&&(Pt(t,e,s,r),oo(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Be(),r=Tn(e),s=Xt(n,r);s.tag=2,t!=null&&(s.callback=t),t=En(e,s,r),t!==null&&(Pt(t,e,r,n),oo(t,e,r))}};function dh(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?!Ks(n,r)||!Ks(s,i):!0}function Ty(e,t,n){var r=!1,s=Nn,i=t.contextType;return typeof i=="object"&&i!==null?i=yt(i):(s=Ye(t)?er:_e.current,r=t.contextTypes,i=(r=r!=null)?_r(e,s):Nn),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=ka,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function fh(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&&ka.enqueueReplaceState(t,t.state,null)}function Ou(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},sd(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=yt(i):(i=Ye(t)?er:_e.current,s.context=_r(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Au(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&&ka.enqueueReplaceState(s,s.state,null),Uo(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Br(e,t){try{var n="",r=t;do n+=Vw(r),r=r.return;while(r);var s=n}catch(i){s=`
39
39
  Error generating stack: `+i.message+`
40
- `+i.stack}return{value:e,source:t,stack:s,digest:null}}function vl(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Du(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var fS=typeof WeakMap=="function"?WeakMap:Map;function Py(e,t,n){n=Xt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){qo||(qo=!0,Hu=r),Du(e,t)},n}function Ry(e,t,n){n=Xt(-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(){Du(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Du(e,t),typeof r!="function"&&(bn===null?bn=new Set([this]):bn.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function hh(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new fS;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=TS.bind(null,e,t,n),t.then(e,e))}function ph(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 mh(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=Xt(-1,1),t.tag=2,En(n,t,1))),n.lanes|=1),e)}var hS=sn.ReactCurrentOwner,Ge=!1;function Ve(e,t,n,r){t.child=e===null?ry(t,null,n,r):zr(t,e.child,n,r)}function gh(e,t,n,r,s){n=n.render;var i=t.ref;return Or(t,s),r=ud(e,t,n,r,i,s),n=cd(),e!==null&&!Ge?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,nn(e,t,s)):(ce&&n&&Qc(t),t.flags|=1,Ve(e,t,r,s),t.child)}function yh(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!wd(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Ny(e,t,i,r,s)):(e=ho(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:Ks,n(o,r)&&e.ref===t.ref)return nn(e,t,s)}return t.flags|=1,e=Pn(i,r),e.ref=t.ref,e.return=t,t.child=e}function Ny(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(Ks(i,r)&&e.ref===t.ref)if(Ge=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(Ge=!0);else return t.lanes=e.lanes,nn(e,t,s)}return Mu(e,t,n,r,s)}function jy(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},se(br,Ze),Ze|=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,se(br,Ze),Ze|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,se(br,Ze),Ze|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,se(br,Ze),Ze|=r;return Ve(e,t,s,n),t.child}function Ly(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Mu(e,t,n,r,s){var i=Ye(n)?er:_e.current;return i=_r(t,i),Or(t,s),n=ud(e,t,n,r,i,s),r=cd(),e!==null&&!Ge?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,nn(e,t,s)):(ce&&r&&Qc(t),t.flags|=1,Ve(e,t,n,s),t.child)}function vh(e,t,n,r,s){if(Ye(n)){var i=!0;_o(t)}else i=!1;if(Or(t,s),t.stateNode===null)uo(e,t),Ty(t,n,r),Ou(t,n,r,s),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=gt(u):(u=Ye(n)?er:_e.current,u=_r(t,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==u)&&fh(t,o,r,u),pn=!1;var f=t.memoizedState;o.state=f,Uo(t,r,o,s),l=t.memoizedState,a!==r||f!==l||qe.current||pn?(typeof c=="function"&&(Au(t,n,c,r),l=t.memoizedState),(a=pn||dh(t,n,a,r,f,l,u))?(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=l),o.props=r,o.state=l,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,iy(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Ct(t.type,a),o.props=u,d=t.pendingProps,f=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=gt(l):(l=Ye(n)?er:_e.current,l=_r(t,l));var g=n.getDerivedStateFromProps;(c=typeof g=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||f!==l)&&fh(t,o,r,l),pn=!1,f=t.memoizedState,o.state=f,Uo(t,r,o,s);var p=t.memoizedState;a!==d||f!==p||qe.current||pn?(typeof g=="function"&&(Au(t,n,g,r),p=t.memoizedState),(u=pn||dh(t,n,u,r,f,p,l)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,p,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,p,l)),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=p),o.props=r,o.state=p,o.context=l,r=u):(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 Fu(e,t,n,r,i,s)}function Fu(e,t,n,r,s,i){Ly(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return s&&rh(t,n,!1),nn(e,t,i);r=t.stateNode,hS.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=zr(t,e.child,null,i),t.child=zr(t,null,a,i)):Ve(e,t,a,i),t.memoizedState=r.state,s&&rh(t,n,!0),t.child}function Ay(e){var t=e.stateNode;t.pendingContext?nh(e,t.pendingContext,t.pendingContext!==t.context):t.context&&nh(e,t.context,!1),id(e,t.containerInfo)}function xh(e,t,n,r,s){return Vr(),Zc(s),t.flags|=256,Ve(e,t,n,r),t.child}var Iu={dehydrated:null,treeContext:null,retryLane:0};function _u(e){return{baseLanes:e,cachePool:null,transitions:null}}function Oy(e,t,n){var r=t.pendingProps,s=de.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),se(de,s&1),e===null)return ju(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=ba(o,r,0,null),e=Xn(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=_u(n),t.memoizedState=Iu,e):hd(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return pS(e,t,o,r,a,s,n);if(i){i=r.fallback,o=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Pn(s,l),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=Pn(a,i):(i=Xn(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?_u(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=Iu,r}return i=e.child,e=i.sibling,r=Pn(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 hd(e,t){return t=ba({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ui(e,t,n,r){return r!==null&&Zc(r),zr(t,e.child,null,n),e=hd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function pS(e,t,n,r,s,i,o){if(n)return t.flags&256?(t.flags&=-257,r=vl(Error(j(422))),Ui(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=ba({mode:"visible",children:r.children},s,0,null),i=Xn(i,s,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&zr(t,e.child,null,o),t.child.memoizedState=_u(o),t.memoizedState=Iu,i);if(!(t.mode&1))return Ui(e,t,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(j(419)),r=vl(i,r,void 0),Ui(e,t,o,r)}if(a=(o&e.childLanes)!==0,Ge||a){if(r=Te,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,tn(e,s),Pt(r,e,s,-1))}return xd(),r=vl(Error(j(421))),Ui(e,t,o,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=PS.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,et=Cn(s.nextSibling),tt=t,ce=!0,bt=null,e!==null&&(ct[dt++]=qt,ct[dt++]=Yt,ct[dt++]=tr,qt=e.id,Yt=e.overflow,tr=t),t=hd(t,r.children),t.flags|=4096,t)}function wh(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Lu(e.return,t,n)}function xl(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 Dy(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(Ve(e,t,r.children,n),r=de.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&&wh(e,n,t);else if(e.tag===19)wh(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(se(de,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&&Ho(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),xl(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&&Ho(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}xl(t,!0,n,null,i);break;case"together":xl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function uo(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function nn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),rr|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(j(153));if(t.child!==null){for(e=t.child,n=Pn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Pn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function mS(e,t,n){switch(t.tag){case 3:Ay(t),Vr();break;case 5:oy(t);break;case 1:Ye(t.type)&&_o(t);break;case 4:id(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;se($o,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(se(de,de.current&1),t.flags|=128,null):n&t.child.childLanes?Oy(e,t,n):(se(de,de.current&1),e=nn(e,t,n),e!==null?e.sibling:null);se(de,de.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Dy(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),se(de,de.current),r)break;return null;case 22:case 23:return t.lanes=0,jy(e,t,n)}return nn(e,t,n)}var My,Vu,Fy,Iy;My=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}};Vu=function(){};Fy=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,Wn(_t.current);var i=null;switch(n){case"input":s=au(e,s),r=au(e,r),i=[];break;case"select":s=pe({},s,{value:void 0}),r=pe({},r,{value:void 0}),i=[];break;case"textarea":s=cu(e,s),r=cu(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Fo)}fu(n,r);var o;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var a=s[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Vs.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var l=r[u];if(a=s!=null?s[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(i||(i=[]),i.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Vs.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&oe("scroll",e),i||a===l||(i=[])):(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};Iy=function(e,t,n,r){n!==r&&(t.flags|=4)};function ds(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 Me(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 gS(e,t,n){var r=t.pendingProps;switch(Jc(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Me(t),null;case 1:return Ye(t.type)&&Io(),Me(t),null;case 3:return r=t.stateNode,$r(),le(qe),le(_e),ad(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&($i(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,bt!==null&&(Gu(bt),bt=null))),Vu(e,t),Me(t),null;case 5:od(t);var s=Wn(Qs.current);if(n=t.type,e!==null&&t.stateNode!=null)Fy(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(j(166));return Me(t),null}if(e=Wn(_t.current),$i(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Mt]=t,r[Ys]=i,e=(t.mode&1)!==0,n){case"dialog":oe("cancel",r),oe("close",r);break;case"iframe":case"object":case"embed":oe("load",r);break;case"video":case"audio":for(s=0;s<ks.length;s++)oe(ks[s],r);break;case"source":oe("error",r);break;case"img":case"image":case"link":oe("error",r),oe("load",r);break;case"details":oe("toggle",r);break;case"input":Nf(r,i),oe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},oe("invalid",r);break;case"textarea":Lf(r,i),oe("invalid",r)}fu(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&&zi(r.textContent,a,e),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&zi(r.textContent,a,e),s=["children",""+a]):Vs.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&oe("scroll",r)}switch(n){case"input":Ai(r),jf(r,i,!0);break;case"textarea":Ai(r),Af(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Fo)}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=dg(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[Mt]=t,e[Ys]=r,My(e,t,!1,!1),t.stateNode=e;e:{switch(o=hu(n,r),n){case"dialog":oe("cancel",e),oe("close",e),s=r;break;case"iframe":case"object":case"embed":oe("load",e),s=r;break;case"video":case"audio":for(s=0;s<ks.length;s++)oe(ks[s],e);s=r;break;case"source":oe("error",e),s=r;break;case"img":case"image":case"link":oe("error",e),oe("load",e),s=r;break;case"details":oe("toggle",e),s=r;break;case"input":Nf(e,r),s=au(e,r),oe("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=pe({},r,{value:void 0}),oe("invalid",e);break;case"textarea":Lf(e,r),s=cu(e,r),oe("invalid",e);break;default:s=r}fu(n,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?pg(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&fg(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&zs(e,l):typeof l=="number"&&zs(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Vs.hasOwnProperty(i)?l!=null&&i==="onScroll"&&oe("scroll",e):l!=null&&Ic(e,i,l,o))}switch(n){case"input":Ai(e),jf(e,r,!1);break;case"textarea":Ai(e),Af(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Rn(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Nr(e,!!r.multiple,i,!1):r.defaultValue!=null&&Nr(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Fo)}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 Me(t),null;case 6:if(e&&t.stateNode!=null)Iy(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(j(166));if(n=Wn(Qs.current),Wn(_t.current),$i(t)){if(r=t.stateNode,n=t.memoizedProps,r[Mt]=t,(i=r.nodeValue!==n)&&(e=tt,e!==null))switch(e.tag){case 3:zi(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&zi(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Mt]=t,t.stateNode=r}return Me(t),null;case 13:if(le(de),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ce&&et!==null&&t.mode&1&&!(t.flags&128))ty(),Vr(),t.flags|=98560,i=!1;else if(i=$i(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(j(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(j(317));i[Mt]=t}else Vr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Me(t),i=!1}else bt!==null&&(Gu(bt),bt=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||de.current&1?Ee===0&&(Ee=3):xd())),t.updateQueue!==null&&(t.flags|=4),Me(t),null);case 4:return $r(),Vu(e,t),e===null&&Gs(t.stateNode.containerInfo),Me(t),null;case 10:return nd(t.type._context),Me(t),null;case 17:return Ye(t.type)&&Io(),Me(t),null;case 19:if(le(de),i=t.memoizedState,i===null)return Me(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)ds(i,!1);else{if(Ee!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Ho(e),o!==null){for(t.flags|=128,ds(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 se(de,de.current&1|2),t.child}e=e.sibling}i.tail!==null&&ye()>Ur&&(t.flags|=128,r=!0,ds(i,!1),t.lanes=4194304)}else{if(!r)if(e=Ho(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ds(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!ce)return Me(t),null}else 2*ye()-i.renderingStartTime>Ur&&n!==1073741824&&(t.flags|=128,r=!0,ds(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=ye(),t.sibling=null,n=de.current,se(de,r?n&1|2:n&1),t):(Me(t),null);case 22:case 23:return vd(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ze&1073741824&&(Me(t),t.subtreeFlags&6&&(t.flags|=8192)):Me(t),null;case 24:return null;case 25:return null}throw Error(j(156,t.tag))}function yS(e,t){switch(Jc(t),t.tag){case 1:return Ye(t.type)&&Io(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return $r(),le(qe),le(_e),ad(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return od(t),null;case 13:if(le(de),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(j(340));Vr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return le(de),null;case 4:return $r(),null;case 10:return nd(t.type._context),null;case 22:case 23:return vd(),null;case 24:return null;default:return null}}var Hi=!1,Fe=!1,vS=typeof WeakSet=="function"?WeakSet:Set,F=null;function Er(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ge(e,t,r)}else n.current=null}function zu(e,t,n){try{n()}catch(r){ge(e,t,r)}}var Sh=!1;function xS(e,t){if(Cu=Oo,e=Bg(),Xc(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,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var g;d!==n||s!==0&&d.nodeType!==3||(a=o+s),d!==i||r!==0&&d.nodeType!==3||(l=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(g=d.firstChild)!==null;)f=d,d=g;for(;;){if(d===e)break t;if(f===n&&++u===s&&(a=o),f===i&&++c===r&&(l=o),(g=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=g}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Eu={focusedElem:e,selectionRange:n},Oo=!1,F=t;F!==null;)if(t=F,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,F=e;else for(;F!==null;){t=F;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var v=p.memoizedProps,w=p.memoizedState,m=t.stateNode,y=m.getSnapshotBeforeUpdate(t.elementType===t.type?v:Ct(t.type,v),w);m.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(j(163))}}catch(k){ge(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,F=e;break}F=t.return}return p=Sh,Sh=!1,p}function js(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&&zu(t,n,i)}s=s.next}while(s!==r)}}function Ca(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 $u(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 _y(e){var t=e.alternate;t!==null&&(e.alternate=null,_y(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Mt],delete t[Ys],delete t[Pu],delete t[tS],delete t[nS])),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 Vy(e){return e.tag===5||e.tag===3||e.tag===4}function kh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Vy(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 Bu(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=Fo));else if(r!==4&&(e=e.child,e!==null))for(Bu(e,t,n),e=e.sibling;e!==null;)Bu(e,t,n),e=e.sibling}function Uu(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(Uu(e,t,n),e=e.sibling;e!==null;)Uu(e,t,n),e=e.sibling}var Ne=null,Et=!1;function ln(e,t,n){for(n=n.child;n!==null;)zy(e,t,n),n=n.sibling}function zy(e,t,n){if(It&&typeof It.onCommitFiberUnmount=="function")try{It.onCommitFiberUnmount(ma,n)}catch{}switch(n.tag){case 5:Fe||Er(n,t);case 6:var r=Ne,s=Et;Ne=null,ln(e,t,n),Ne=r,Et=s,Ne!==null&&(Et?(e=Ne,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ne.removeChild(n.stateNode));break;case 18:Ne!==null&&(Et?(e=Ne,n=n.stateNode,e.nodeType===8?fl(e.parentNode,n):e.nodeType===1&&fl(e,n),Hs(e)):fl(Ne,n.stateNode));break;case 4:r=Ne,s=Et,Ne=n.stateNode.containerInfo,Et=!0,ln(e,t,n),Ne=r,Et=s;break;case 0:case 11:case 14:case 15:if(!Fe&&(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)&&zu(n,t,o),s=s.next}while(s!==r)}ln(e,t,n);break;case 1:if(!Fe&&(Er(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ge(n,t,a)}ln(e,t,n);break;case 21:ln(e,t,n);break;case 22:n.mode&1?(Fe=(r=Fe)||n.memoizedState!==null,ln(e,t,n),Fe=r):ln(e,t,n);break;default:ln(e,t,n)}}function Ch(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new vS),t.forEach(function(r){var s=RS.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function wt(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:Ne=a.stateNode,Et=!1;break e;case 3:Ne=a.stateNode.containerInfo,Et=!0;break e;case 4:Ne=a.stateNode.containerInfo,Et=!0;break e}a=a.return}if(Ne===null)throw Error(j(160));zy(i,o,s),Ne=null,Et=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(u){ge(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)$y(t,e),t=t.sibling}function $y(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(wt(t,e),Lt(e),r&4){try{js(3,e,e.return),Ca(3,e)}catch(v){ge(e,e.return,v)}try{js(5,e,e.return)}catch(v){ge(e,e.return,v)}}break;case 1:wt(t,e),Lt(e),r&512&&n!==null&&Er(n,n.return);break;case 5:if(wt(t,e),Lt(e),r&512&&n!==null&&Er(n,n.return),e.flags&32){var s=e.stateNode;try{zs(s,"")}catch(v){ge(e,e.return,v)}}if(r&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,o=n!==null?n.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&ug(s,i),hu(a,o);var u=hu(a,i);for(o=0;o<l.length;o+=2){var c=l[o],d=l[o+1];c==="style"?pg(s,d):c==="dangerouslySetInnerHTML"?fg(s,d):c==="children"?zs(s,d):Ic(s,c,d,u)}switch(a){case"input":lu(s,i);break;case"textarea":cg(s,i);break;case"select":var f=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var g=i.value;g!=null?Nr(s,!!i.multiple,g,!1):f!==!!i.multiple&&(i.defaultValue!=null?Nr(s,!!i.multiple,i.defaultValue,!0):Nr(s,!!i.multiple,i.multiple?[]:"",!1))}s[Ys]=i}catch(v){ge(e,e.return,v)}}break;case 6:if(wt(t,e),Lt(e),r&4){if(e.stateNode===null)throw Error(j(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(v){ge(e,e.return,v)}}break;case 3:if(wt(t,e),Lt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Hs(t.containerInfo)}catch(v){ge(e,e.return,v)}break;case 4:wt(t,e),Lt(e);break;case 13:wt(t,e),Lt(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(gd=ye())),r&4&&Ch(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(Fe=(u=Fe)||c,wt(t,e),Fe=u):wt(t,e),Lt(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(F=e,c=e.child;c!==null;){for(d=F=c;F!==null;){switch(f=F,g=f.child,f.tag){case 0:case 11:case 14:case 15:js(4,f,f.return);break;case 1:Er(f,f.return);var p=f.stateNode;if(typeof p.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,p.props=t.memoizedProps,p.state=t.memoizedState,p.componentWillUnmount()}catch(v){ge(r,n,v)}}break;case 5:Er(f,f.return);break;case 22:if(f.memoizedState!==null){bh(d);continue}}g!==null?(g.return=f,F=g):bh(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{s=d.stateNode,u?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=d.stateNode,l=d.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=hg("display",o))}catch(v){ge(e,e.return,v)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(v){ge(e,e.return,v)}}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;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:wt(t,e),Lt(e),r&4&&Ch(e);break;case 21:break;default:wt(t,e),Lt(e)}}function Lt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Vy(n)){var r=n;break e}n=n.return}throw Error(j(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(zs(s,""),r.flags&=-33);var i=kh(e);Uu(e,i,s);break;case 3:case 4:var o=r.stateNode.containerInfo,a=kh(e);Bu(e,a,o);break;default:throw Error(j(161))}}catch(l){ge(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function wS(e,t,n){F=e,By(e)}function By(e,t,n){for(var r=(e.mode&1)!==0;F!==null;){var s=F,i=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||Hi;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||Fe;a=Hi;var u=Fe;if(Hi=o,(Fe=l)&&!u)for(F=s;F!==null;)o=F,l=o.child,o.tag===22&&o.memoizedState!==null?Th(s):l!==null?(l.return=o,F=l):Th(s);for(;i!==null;)F=i,By(i),i=i.sibling;F=s,Hi=a,Fe=u}Eh(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,F=i):Eh(e)}}function Eh(e){for(;F!==null;){var t=F;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Fe||Ca(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Fe)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:Ct(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&lh(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}lh(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&Hs(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(j(163))}Fe||t.flags&512&&$u(t)}catch(f){ge(t,t.return,f)}}if(t===e){F=null;break}if(n=t.sibling,n!==null){n.return=t.return,F=n;break}F=t.return}}function bh(e){for(;F!==null;){var t=F;if(t===e){F=null;break}var n=t.sibling;if(n!==null){n.return=t.return,F=n;break}F=t.return}}function Th(e){for(;F!==null;){var t=F;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Ca(4,t)}catch(l){ge(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(l){ge(t,s,l)}}var i=t.return;try{$u(t)}catch(l){ge(t,i,l)}break;case 5:var o=t.return;try{$u(t)}catch(l){ge(t,o,l)}}}catch(l){ge(t,t.return,l)}if(t===e){F=null;break}var a=t.sibling;if(a!==null){a.return=t.return,F=a;break}F=t.return}}var SS=Math.ceil,Go=sn.ReactCurrentDispatcher,pd=sn.ReactCurrentOwner,pt=sn.ReactCurrentBatchConfig,X=0,Te=null,Se=null,Ae=0,Ze=0,br=On(0),Ee=0,ti=null,rr=0,Ea=0,md=0,Ls=null,Ke=null,gd=0,Ur=1/0,Kt=null,qo=!1,Hu=null,bn=null,Wi=!1,vn=null,Yo=0,As=0,Wu=null,co=-1,fo=0;function Be(){return X&6?ye():co!==-1?co:co=ye()}function Tn(e){return e.mode&1?X&2&&Ae!==0?Ae&-Ae:sS.transition!==null?(fo===0&&(fo=Tg()),fo):(e=J,e!==0||(e=window.event,e=e===void 0?16:Og(e.type)),e):1}function Pt(e,t,n,r){if(50<As)throw As=0,Wu=null,Error(j(185));di(e,n,r),(!(X&2)||e!==Te)&&(e===Te&&(!(X&2)&&(Ea|=n),Ee===4&&gn(e,Ae)),Xe(e,r),n===1&&X===0&&!(t.mode&1)&&(Ur=ye()+500,wa&&Dn()))}function Xe(e,t){var n=e.callbackNode;s1(e,t);var r=Ao(e,e===Te?Ae:0);if(r===0)n!==null&&Mf(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Mf(n),t===1)e.tag===0?rS(Ph.bind(null,e)):Jg(Ph.bind(null,e)),Z1(function(){!(X&6)&&Dn()}),n=null;else{switch(Pg(r)){case 1:n=Bc;break;case 4:n=Eg;break;case 16:n=Lo;break;case 536870912:n=bg;break;default:n=Lo}n=Xy(n,Uy.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Uy(e,t){if(co=-1,fo=0,X&6)throw Error(j(327));var n=e.callbackNode;if(Dr()&&e.callbackNode!==n)return null;var r=Ao(e,e===Te?Ae:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Xo(e,r);else{t=r;var s=X;X|=2;var i=Wy();(Te!==e||Ae!==t)&&(Kt=null,Ur=ye()+500,Yn(e,t));do try{ES();break}catch(a){Hy(e,a)}while(!0);td(),Go.current=i,X=s,Se!==null?t=0:(Te=null,Ae=0,t=Ee)}if(t!==0){if(t===2&&(s=vu(e),s!==0&&(r=s,t=Ku(e,s))),t===1)throw n=ti,Yn(e,0),gn(e,r),Xe(e,ye()),n;if(t===6)gn(e,r);else{if(s=e.current.alternate,!(r&30)&&!kS(s)&&(t=Xo(e,r),t===2&&(i=vu(e),i!==0&&(r=i,t=Ku(e,i))),t===1))throw n=ti,Yn(e,0),gn(e,r),Xe(e,ye()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(j(345));case 2:$n(e,Ke,Kt);break;case 3:if(gn(e,r),(r&130023424)===r&&(t=gd+500-ye(),10<t)){if(Ao(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){Be(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Tu($n.bind(null,e,Ke,Kt),t);break}$n(e,Ke,Kt);break;case 4:if(gn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var o=31-Tt(r);i=1<<o,o=t[o],o>s&&(s=o),r&=~i}if(r=s,r=ye()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*SS(r/1960))-r,10<r){e.timeoutHandle=Tu($n.bind(null,e,Ke,Kt),r);break}$n(e,Ke,Kt);break;case 5:$n(e,Ke,Kt);break;default:throw Error(j(329))}}}return Xe(e,ye()),e.callbackNode===n?Uy.bind(null,e):null}function Ku(e,t){var n=Ls;return e.current.memoizedState.isDehydrated&&(Yn(e,t).flags|=256),e=Xo(e,t),e!==2&&(t=Ke,Ke=n,t!==null&&Gu(t)),e}function Gu(e){Ke===null?Ke=e:Ke.push.apply(Ke,e)}function kS(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(!Nt(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 gn(e,t){for(t&=~md,t&=~Ea,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Tt(t),r=1<<n;e[n]=-1,t&=~r}}function Ph(e){if(X&6)throw Error(j(327));Dr();var t=Ao(e,0);if(!(t&1))return Xe(e,ye()),null;var n=Xo(e,t);if(e.tag!==0&&n===2){var r=vu(e);r!==0&&(t=r,n=Ku(e,r))}if(n===1)throw n=ti,Yn(e,0),gn(e,t),Xe(e,ye()),n;if(n===6)throw Error(j(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,$n(e,Ke,Kt),Xe(e,ye()),null}function yd(e,t){var n=X;X|=1;try{return e(t)}finally{X=n,X===0&&(Ur=ye()+500,wa&&Dn())}}function sr(e){vn!==null&&vn.tag===0&&!(X&6)&&Dr();var t=X;X|=1;var n=pt.transition,r=J;try{if(pt.transition=null,J=1,e)return e()}finally{J=r,pt.transition=n,X=t,!(X&6)&&Dn()}}function vd(){Ze=br.current,le(br)}function Yn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,J1(n)),Se!==null)for(n=Se.return;n!==null;){var r=n;switch(Jc(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Io();break;case 3:$r(),le(qe),le(_e),ad();break;case 5:od(r);break;case 4:$r();break;case 13:le(de);break;case 19:le(de);break;case 10:nd(r.type._context);break;case 22:case 23:vd()}n=n.return}if(Te=e,Se=e=Pn(e.current,null),Ae=Ze=t,Ee=0,ti=null,md=Ea=rr=0,Ke=Ls=null,Hn!==null){for(t=0;t<Hn.length;t++)if(n=Hn[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}Hn=null}return e}function Hy(e,t){do{var n=Se;try{if(td(),ao.current=Ko,Wo){for(var r=fe.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Wo=!1}if(nr=0,be=Ce=fe=null,Ns=!1,Js=0,pd.current=null,n===null||n.return===null){Ee=1,ti=t,Se=null;break}e:{var i=e,o=n.return,a=n,l=t;if(t=Ae,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=a,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var g=ph(o);if(g!==null){g.flags&=-257,mh(g,o,a,i,t),g.mode&1&&hh(i,u,t),t=g,l=u;var p=t.updateQueue;if(p===null){var v=new Set;v.add(l),t.updateQueue=v}else p.add(l);break e}else{if(!(t&1)){hh(i,u,t),xd();break e}l=Error(j(426))}}else if(ce&&a.mode&1){var w=ph(o);if(w!==null){!(w.flags&65536)&&(w.flags|=256),mh(w,o,a,i,t),Zc(Br(l,a));break e}}i=l=Br(l,a),Ee!==4&&(Ee=2),Ls===null?Ls=[i]:Ls.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var m=Py(i,l,t);ah(i,m);break e;case 1:a=l;var y=i.type,x=i.stateNode;if(!(i.flags&128)&&(typeof y.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(bn===null||!bn.has(x)))){i.flags|=65536,t&=-t,i.lanes|=t;var k=Ry(i,a,t);ah(i,k);break e}}i=i.return}while(i!==null)}Gy(n)}catch(C){t=C,Se===n&&n!==null&&(Se=n=n.return);continue}break}while(!0)}function Wy(){var e=Go.current;return Go.current=Ko,e===null?Ko:e}function xd(){(Ee===0||Ee===3||Ee===2)&&(Ee=4),Te===null||!(rr&268435455)&&!(Ea&268435455)||gn(Te,Ae)}function Xo(e,t){var n=X;X|=2;var r=Wy();(Te!==e||Ae!==t)&&(Kt=null,Yn(e,t));do try{CS();break}catch(s){Hy(e,s)}while(!0);if(td(),X=n,Go.current=r,Se!==null)throw Error(j(261));return Te=null,Ae=0,Ee}function CS(){for(;Se!==null;)Ky(Se)}function ES(){for(;Se!==null&&!Yw();)Ky(Se)}function Ky(e){var t=Yy(e.alternate,e,Ze);e.memoizedProps=e.pendingProps,t===null?Gy(e):Se=t,pd.current=null}function Gy(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=yS(n,t),n!==null){n.flags&=32767,Se=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ee=6,Se=null;return}}else if(n=gS(n,t,Ze),n!==null){Se=n;return}if(t=t.sibling,t!==null){Se=t;return}Se=t=e}while(t!==null);Ee===0&&(Ee=5)}function $n(e,t,n){var r=J,s=pt.transition;try{pt.transition=null,J=1,bS(e,t,n,r)}finally{pt.transition=s,J=r}return null}function bS(e,t,n,r){do Dr();while(vn!==null);if(X&6)throw Error(j(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(j(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(i1(e,i),e===Te&&(Se=Te=null,Ae=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Wi||(Wi=!0,Xy(Lo,function(){return Dr(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=pt.transition,pt.transition=null;var o=J;J=1;var a=X;X|=4,pd.current=null,xS(e,n),$y(n,e),W1(Eu),Oo=!!Cu,Eu=Cu=null,e.current=n,wS(n),Xw(),X=a,J=o,pt.transition=i}else e.current=n;if(Wi&&(Wi=!1,vn=e,Yo=s),i=e.pendingLanes,i===0&&(bn=null),Zw(n.stateNode),Xe(e,ye()),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(qo)throw qo=!1,e=Hu,Hu=null,e;return Yo&1&&e.tag!==0&&Dr(),i=e.pendingLanes,i&1?e===Wu?As++:(As=0,Wu=e):As=0,Dn(),null}function Dr(){if(vn!==null){var e=Pg(Yo),t=pt.transition,n=J;try{if(pt.transition=null,J=16>e?16:e,vn===null)var r=!1;else{if(e=vn,vn=null,Yo=0,X&6)throw Error(j(331));var s=X;for(X|=4,F=e.current;F!==null;){var i=F,o=i.child;if(F.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(F=u;F!==null;){var c=F;switch(c.tag){case 0:case 11:case 15:js(8,c,i)}var d=c.child;if(d!==null)d.return=c,F=d;else for(;F!==null;){c=F;var f=c.sibling,g=c.return;if(_y(c),c===u){F=null;break}if(f!==null){f.return=g,F=f;break}F=g}}}var p=i.alternate;if(p!==null){var v=p.child;if(v!==null){p.child=null;do{var w=v.sibling;v.sibling=null,v=w}while(v!==null)}}F=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,F=o;else e:for(;F!==null;){if(i=F,i.flags&2048)switch(i.tag){case 0:case 11:case 15:js(9,i,i.return)}var m=i.sibling;if(m!==null){m.return=i.return,F=m;break e}F=i.return}}var y=e.current;for(F=y;F!==null;){o=F;var x=o.child;if(o.subtreeFlags&2064&&x!==null)x.return=o,F=x;else e:for(o=y;F!==null;){if(a=F,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Ca(9,a)}}catch(C){ge(a,a.return,C)}if(a===o){F=null;break e}var k=a.sibling;if(k!==null){k.return=a.return,F=k;break e}F=a.return}}if(X=s,Dn(),It&&typeof It.onPostCommitFiberRoot=="function")try{It.onPostCommitFiberRoot(ma,e)}catch{}r=!0}return r}finally{J=n,pt.transition=t}}return!1}function Rh(e,t,n){t=Br(n,t),t=Py(e,t,1),e=En(e,t,1),t=Be(),e!==null&&(di(e,1,t),Xe(e,t))}function ge(e,t,n){if(e.tag===3)Rh(e,e,n);else for(;t!==null;){if(t.tag===3){Rh(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(bn===null||!bn.has(r))){e=Br(n,e),e=Ry(t,e,1),t=En(t,e,1),e=Be(),t!==null&&(di(t,1,e),Xe(t,e));break}}t=t.return}}function TS(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Be(),e.pingedLanes|=e.suspendedLanes&n,Te===e&&(Ae&n)===n&&(Ee===4||Ee===3&&(Ae&130023424)===Ae&&500>ye()-gd?Yn(e,0):md|=n),Xe(e,t)}function qy(e,t){t===0&&(e.mode&1?(t=Mi,Mi<<=1,!(Mi&130023424)&&(Mi=4194304)):t=1);var n=Be();e=tn(e,t),e!==null&&(di(e,t,n),Xe(e,n))}function PS(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qy(e,n)}function RS(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(j(314))}r!==null&&r.delete(t),qy(e,n)}var Yy;Yy=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||qe.current)Ge=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ge=!1,mS(e,t,n);Ge=!!(e.flags&131072)}else Ge=!1,ce&&t.flags&1048576&&Zg(t,zo,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;uo(e,t),e=t.pendingProps;var s=_r(t,_e.current);Or(t,n),s=ud(null,t,r,e,s,n);var i=cd();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,Ye(r)?(i=!0,_o(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,sd(t),s.updater=ka,t.stateNode=s,s._reactInternals=t,Ou(t,r,e,n),t=Fu(null,t,r,!0,i,n)):(t.tag=0,ce&&i&&Qc(t),Ve(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(uo(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=jS(r),e=Ct(r,e),s){case 0:t=Mu(null,t,r,e,n);break e;case 1:t=vh(null,t,r,e,n);break e;case 11:t=gh(null,t,r,e,n);break e;case 14:t=yh(null,t,r,Ct(r.type,e),n);break e}throw Error(j(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Ct(r,s),Mu(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Ct(r,s),vh(e,t,r,s,n);case 3:e:{if(Ay(t),e===null)throw Error(j(387));r=t.pendingProps,i=t.memoizedState,s=i.element,iy(e,t),Uo(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=Br(Error(j(423)),t),t=xh(e,t,r,n,s);break e}else if(r!==s){s=Br(Error(j(424)),t),t=xh(e,t,r,n,s);break e}else for(et=Cn(t.stateNode.containerInfo.firstChild),tt=t,ce=!0,bt=null,n=ry(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Vr(),r===s){t=nn(e,t,n);break e}Ve(e,t,r,n)}t=t.child}return t;case 5:return oy(t),e===null&&ju(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,bu(r,s)?o=null:i!==null&&bu(r,i)&&(t.flags|=32),Ly(e,t),Ve(e,t,o,n),t.child;case 6:return e===null&&ju(t),null;case 13:return Oy(e,t,n);case 4:return id(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=zr(t,null,r,n):Ve(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Ct(r,s),gh(e,t,r,s,n);case 7:return Ve(e,t,t.pendingProps,n),t.child;case 8:return Ve(e,t,t.pendingProps.children,n),t.child;case 12:return Ve(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,se($o,r._currentValue),r._currentValue=o,i!==null)if(Nt(i.value,o)){if(i.children===s.children&&!qe.current){t=nn(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 l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=Xt(-1,n&-n),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Lu(i.return,n,t),a.lanes|=n;break}l=l.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(j(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Lu(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}Ve(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Or(t,n),s=gt(s),r=r(s),t.flags|=1,Ve(e,t,r,n),t.child;case 14:return r=t.type,s=Ct(r,t.pendingProps),s=Ct(r.type,s),yh(e,t,r,s,n);case 15:return Ny(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Ct(r,s),uo(e,t),t.tag=1,Ye(r)?(e=!0,_o(t)):e=!1,Or(t,n),Ty(t,r,s),Ou(t,r,s,n),Fu(null,t,r,!0,e,n);case 19:return Dy(e,t,n);case 22:return jy(e,t,n)}throw Error(j(156,t.tag))};function Xy(e,t){return Cg(e,t)}function NS(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 ft(e,t,n,r){return new NS(e,t,n,r)}function wd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function jS(e){if(typeof e=="function")return wd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Vc)return 11;if(e===zc)return 14}return 2}function Pn(e,t){var n=e.alternate;return n===null?(n=ft(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 ho(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")wd(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case mr:return Xn(n.children,s,i,t);case _c:o=8,s|=8;break;case ru:return e=ft(12,n,t,s|2),e.elementType=ru,e.lanes=i,e;case su:return e=ft(13,n,t,s),e.elementType=su,e.lanes=i,e;case iu:return e=ft(19,n,t,s),e.elementType=iu,e.lanes=i,e;case og:return ba(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case sg:o=10;break e;case ig:o=9;break e;case Vc:o=11;break e;case zc:o=14;break e;case hn:o=16,r=null;break e}throw Error(j(130,e==null?e:typeof e,""))}return t=ft(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function Xn(e,t,n,r){return e=ft(7,e,r,t),e.lanes=n,e}function ba(e,t,n,r){return e=ft(22,e,r,t),e.elementType=og,e.lanes=n,e.stateNode={isHidden:!1},e}function wl(e,t,n){return e=ft(6,e,null,t),e.lanes=n,e}function Sl(e,t,n){return t=ft(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function LS(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=tl(0),this.expirationTimes=tl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=tl(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Sd(e,t,n,r,s,i,o,a,l){return e=new LS(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=ft(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},sd(i),e}function AS(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:pr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Qy(e){if(!e)return Nn;e=e._reactInternals;e:{if(ur(e)!==e||e.tag!==1)throw Error(j(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ye(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(j(171))}if(e.tag===1){var n=e.type;if(Ye(n))return Qg(e,n,t)}return t}function Jy(e,t,n,r,s,i,o,a,l){return e=Sd(n,r,!0,e,s,i,o,a,l),e.context=Qy(null),n=e.current,r=Be(),s=Tn(n),i=Xt(r,s),i.callback=t??null,En(n,i,s),e.current.lanes=s,di(e,s,r),Xe(e,r),e}function Ta(e,t,n,r){var s=t.current,i=Be(),o=Tn(s);return n=Qy(n),t.context===null?t.context=n:t.pendingContext=n,t=Xt(i,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=En(s,t,o),e!==null&&(Pt(e,s,o,i),oo(e,s,o)),o}function Qo(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 Nh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function kd(e,t){Nh(e,t),(e=e.alternate)&&Nh(e,t)}function OS(){return null}var Zy=typeof reportError=="function"?reportError:function(e){console.error(e)};function Cd(e){this._internalRoot=e}Pa.prototype.render=Cd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(j(409));Ta(e,t,null,null)};Pa.prototype.unmount=Cd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;sr(function(){Ta(null,e,null,null)}),t[en]=null}};function Pa(e){this._internalRoot=e}Pa.prototype.unstable_scheduleHydration=function(e){if(e){var t=jg();e={blockedOn:null,target:e,priority:t};for(var n=0;n<mn.length&&t!==0&&t<mn[n].priority;n++);mn.splice(n,0,e),n===0&&Ag(e)}};function Ed(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ra(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function jh(){}function DS(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var u=Qo(o);i.call(u)}}var o=Jy(t,r,e,0,null,!1,!1,"",jh);return e._reactRootContainer=o,e[en]=o.current,Gs(e.nodeType===8?e.parentNode:e),sr(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var u=Qo(l);a.call(u)}}var l=Sd(e,0,!1,null,null,!1,!1,"",jh);return e._reactRootContainer=l,e[en]=l.current,Gs(e.nodeType===8?e.parentNode:e),sr(function(){Ta(t,l,n,r)}),l}function Na(e,t,n,r,s){var i=n._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=Qo(o);a.call(l)}}Ta(t,o,e,s)}else o=DS(n,t,e,s,r);return Qo(o)}Rg=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Ss(t.pendingLanes);n!==0&&(Uc(t,n|1),Xe(t,ye()),!(X&6)&&(Ur=ye()+500,Dn()))}break;case 13:sr(function(){var r=tn(e,1);if(r!==null){var s=Be();Pt(r,e,1,s)}}),kd(e,1)}};Hc=function(e){if(e.tag===13){var t=tn(e,134217728);if(t!==null){var n=Be();Pt(t,e,134217728,n)}kd(e,134217728)}};Ng=function(e){if(e.tag===13){var t=Tn(e),n=tn(e,t);if(n!==null){var r=Be();Pt(n,e,t,r)}kd(e,t)}};jg=function(){return J};Lg=function(e,t){var n=J;try{return J=e,t()}finally{J=n}};mu=function(e,t,n){switch(t){case"input":if(lu(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=xa(r);if(!s)throw Error(j(90));lg(r),lu(r,s)}}}break;case"textarea":cg(e,n);break;case"select":t=n.value,t!=null&&Nr(e,!!n.multiple,t,!1)}};yg=yd;vg=sr;var MS={usingClientEntryPoint:!1,Events:[hi,xr,xa,mg,gg,yd]},fs={findFiberByHostInstance:Un,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},FS={bundleType:fs.bundleType,version:fs.version,rendererPackageName:fs.rendererPackageName,rendererConfig:fs.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:sn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Sg(e),e===null?null:e.stateNode},findFiberByHostInstance:fs.findFiberByHostInstance||OS,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 Ki=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ki.isDisabled&&Ki.supportsFiber)try{ma=Ki.inject(FS),It=Ki}catch{}}st.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=MS;st.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ed(t))throw Error(j(200));return AS(e,t,null,n)};st.createRoot=function(e,t){if(!Ed(e))throw Error(j(299));var n=!1,r="",s=Zy;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Sd(e,1,!1,null,null,n,!1,r,s),e[en]=t.current,Gs(e.nodeType===8?e.parentNode:e),new Cd(t)};st.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(j(188)):(e=Object.keys(e).join(","),Error(j(268,e)));return e=Sg(t),e=e===null?null:e.stateNode,e};st.flushSync=function(e){return sr(e)};st.hydrate=function(e,t,n){if(!Ra(t))throw Error(j(200));return Na(null,e,t,!0,n)};st.hydrateRoot=function(e,t,n){if(!Ed(e))throw Error(j(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",o=Zy;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Jy(t,null,e,1,n??null,s,!1,i,o),e[en]=t.current,Gs(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 Pa(t)};st.render=function(e,t,n){if(!Ra(t))throw Error(j(200));return Na(null,e,t,!1,n)};st.unmountComponentAtNode=function(e){if(!Ra(e))throw Error(j(40));return e._reactRootContainer?(sr(function(){Na(null,null,e,!1,function(){e._reactRootContainer=null,e[en]=null})}),!0):!1};st.unstable_batchedUpdates=yd;st.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ra(n))throw Error(j(200));if(e==null||e._reactInternals===void 0)throw Error(j(38));return Na(e,t,n,!1,r)};st.version="18.3.1-next-f1338f8080-20240426";function ev(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ev)}catch(e){console.error(e)}}ev(),eg.exports=st;var IS=eg.exports,tv,Lh=IS;tv=Lh.createRoot,Lh.hydrateRoot;var kl={};const W=e=>typeof e=="string",hs=()=>{let e,t;const n=new Promise((r,s)=>{e=r,t=s});return n.resolve=e,n.reject=t,n},Ah=e=>e==null?"":""+e,_S=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},VS=/###/g,Oh=e=>e&&e.indexOf("###")>-1?e.replace(VS,"."):e,Dh=e=>!e||W(e),Os=(e,t,n)=>{const r=W(t)?t.split("."):t;let s=0;for(;s<r.length-1;){if(Dh(e))return{};const i=Oh(r[s]);!e[i]&&n&&(e[i]=new n),Object.prototype.hasOwnProperty.call(e,i)?e=e[i]:e={},++s}return Dh(e)?{}:{obj:e,k:Oh(r[s])}},Mh=(e,t,n)=>{const{obj:r,k:s}=Os(e,t,Object);if(r!==void 0||t.length===1){r[s]=n;return}let i=t[t.length-1],o=t.slice(0,t.length-1),a=Os(e,o,Object);for(;a.obj===void 0&&o.length;)i=`${o[o.length-1]}.${i}`,o=o.slice(0,o.length-1),a=Os(e,o,Object),a!=null&&a.obj&&typeof a.obj[`${a.k}.${i}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${i}`]=n},zS=(e,t,n,r)=>{const{obj:s,k:i}=Os(e,t,Object);s[i]=s[i]||[],s[i].push(n)},Jo=(e,t)=>{const{obj:n,k:r}=Os(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},$S=(e,t,n)=>{const r=Jo(e,n);return r!==void 0?r:Jo(t,n)},nv=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?W(e[r])||e[r]instanceof String||W(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):nv(e[r],t[r],n):e[r]=t[r]);return e},_n=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var BS={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const US=e=>W(e)?e.replace(/[&<>"'\/]/g,t=>BS[t]):e;class HS{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const WS=[" ",",","?","!",";"],KS=new HS(20),GS=(e,t,n)=>{t=t||"",n=n||"";const r=WS.filter(o=>t.indexOf(o)<0&&n.indexOf(o)<0);if(r.length===0)return!0;const s=KS.getRegExp(`(${r.map(o=>o==="?"?"\\?":o).join("|")})`);let i=!s.test(e);if(!i){const o=e.indexOf(n);o>0&&!s.test(e.substring(0,o))&&(i=!0)}return i},qu=(e,t,n=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let s=e;for(let i=0;i<r.length;){if(!s||typeof s!="object")return;let o,a="";for(let l=i;l<r.length;++l)if(l!==i&&(a+=n),a+=r[l],o=s[a],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&l<r.length-1)continue;i+=l-i+1;break}s=o}return s},ni=e=>e==null?void 0:e.replace(/_/g,"-"),qS={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var n,r;(r=(n=console==null?void 0:console[e])==null?void 0:n.apply)==null||r.call(n,console,t)}};class Zo{constructor(t,n={}){this.init(t,n)}init(t,n={}){this.prefix=n.prefix||"i18next:",this.logger=t||qS,this.options=n,this.debug=n.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,s){return s&&!this.debug?null:(W(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new Zo(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Zo(this.logger,t)}}var Ft=new Zo;class ja{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const s=this.observers[r].get(n)||0;this.observers[r].set(n,s+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t,...n){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([s,i])=>{for(let o=0;o<i;o++)s(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,i])=>{for(let o=0;o<i;o++)s.apply(s,[t,...n])})}}class Fh extends ja{constructor(t,n={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r,s={}){var u,c;const i=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,o=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.indexOf(".")>-1?a=t.split("."):(a=[t,n],r&&(Array.isArray(r)?a.push(...r):W(r)&&i?a.push(...r.split(i)):a.push(r)));const l=Jo(this.data,a);return!l&&!n&&!r&&t.indexOf(".")>-1&&(t=a[0],n=a[1],r=a.slice(2).join(".")),l||!o||!W(r)?l:qu((c=(u=this.data)==null?void 0:u[t])==null?void 0:c[n],r,i)}addResource(t,n,r,s,i={silent:!1}){const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let a=[t,n];r&&(a=a.concat(o?r.split(o):r)),t.indexOf(".")>-1&&(a=t.split("."),s=n,n=a[1]),this.addNamespaces(n),Mh(this.data,a,s),i.silent||this.emit("added",t,n,r,s)}addResources(t,n,r,s={silent:!1}){for(const i in r)(W(r[i])||Array.isArray(r[i]))&&this.addResource(t,n,i,r[i],{silent:!0});s.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,s,i,o={silent:!1,skipCopy:!1}){let a=[t,n];t.indexOf(".")>-1&&(a=t.split("."),s=r,r=n,n=a[1]),this.addNamespaces(n);let l=Jo(this.data,a)||{};o.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?nv(l,r,i):l={...l,...r},Mh(this.data,a,l),o.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(s=>n[s]&&Object.keys(n[s]).length>0)}toJSON(){return this.data}}var rv={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,s){return e.forEach(i=>{var o;t=((o=this.processors[i])==null?void 0:o.process(t,n,r,s))??t}),t}};const sv=Symbol("i18next/PATH_KEY");function YS(){const e=[],t=Object.create(null);let n;return t.get=(r,s)=>{var i;return(i=n==null?void 0:n.revoke)==null||i.call(n),s===sv?e:(e.push(s),n=Proxy.revocable(r,t),n.proxy)},Proxy.revocable(Object.create(null),t).proxy}function Mr(e,t){const{[sv]:n}=e(YS()),r=(t==null?void 0:t.keySeparator)??".",s=(t==null?void 0:t.nsSeparator)??":";if(n.length>1&&s){const i=t==null?void 0:t.ns,o=Array.isArray(i)?i:null;if(o&&o.length>1&&o.slice(1).includes(n[0]))return`${n[0]}${s}${n.slice(1).join(r)}`}return n.join(r)}const Ih={},Cl=e=>!W(e)&&typeof e!="boolean"&&typeof e!="number";class ea extends ja{constructor(t,n={}){super(),_S(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Ft.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,n={interpolation:{}}){const r={...n};if(t==null)return!1;const s=this.resolve(t,r);if((s==null?void 0:s.res)===void 0)return!1;const i=Cl(s.res);return!(r.returnObjects===!1&&i)}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const o=r&&t.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!GS(t,r,s);if(o&&!a){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:W(i)?[i]:i};const u=t.split(r);(r!==s||r===s&&this.options.ns.indexOf(u[0])>-1)&&(i=u.shift()),t=u.join(s)}return{key:t,namespaces:W(i)?[i]:i}}translate(t,n,r){let s=typeof n=="object"?{...n}:n;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof s=="object"&&(s={...s}),s||(s={}),t==null)return"";typeof t=="function"&&(t=Mr(t,{...this.options,...s})),Array.isArray(t)||(t=[String(t)]),t=t.map(M=>typeof M=="function"?Mr(M,{...this.options,...s}):String(M));const i=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:a,namespaces:l}=this.extractFromKey(t[t.length-1],s),u=l[l.length-1];let c=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;c===void 0&&(c=":");const d=s.lng||this.language,f=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((d==null?void 0:d.toLowerCase())==="cimode")return f?i?{res:`${u}${c}${a}`,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:u,usedParams:this.getUsedParamsDetails(s)}:`${u}${c}${a}`:i?{res:a,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:u,usedParams:this.getUsedParamsDetails(s)}:a;const g=this.resolve(t,s);let p=g==null?void 0:g.res;const v=(g==null?void 0:g.usedKey)||a,w=(g==null?void 0:g.exactUsedKey)||a,m=["[object Number]","[object Function]","[object RegExp]"],y=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,k=s.count!==void 0&&!W(s.count),C=ea.hasDefaultValue(s),b=k?this.pluralResolver.getSuffix(d,s.count,s):"",T=s.ordinal&&k?this.pluralResolver.getSuffix(d,s.count,{ordinal:!1}):"",P=k&&!s.ordinal&&s.count===0,L=P&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${b}`]||s[`defaultValue${T}`]||s.defaultValue;let R=p;x&&!p&&C&&(R=L);const B=Cl(R),A=Object.prototype.toString.apply(R);if(x&&R&&B&&m.indexOf(A)<0&&!(W(y)&&Array.isArray(R))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const M=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,R,{...s,ns:l}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(g.res=M,g.usedParams=this.getUsedParamsDetails(s),g):M}if(o){const M=Array.isArray(R),_=M?[]:{},U=M?w:v;for(const z in R)if(Object.prototype.hasOwnProperty.call(R,z)){const Z=`${U}${o}${z}`;C&&!p?_[z]=this.translate(Z,{...s,defaultValue:Cl(L)?L[z]:void 0,joinArrays:!1,ns:l}):_[z]=this.translate(Z,{...s,joinArrays:!1,ns:l}),_[z]===Z&&(_[z]=R[z])}p=_}}else if(x&&W(y)&&Array.isArray(p))p=p.join(y),p&&(p=this.extendTranslation(p,t,s,r));else{let M=!1,_=!1;!this.isValidLookup(p)&&C&&(M=!0,p=L),this.isValidLookup(p)||(_=!0,p=a);const z=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&_?void 0:p,Z=C&&L!==p&&this.options.updateMissing;if(_||M||Z){if(this.logger.log(Z?"updateKey":"missingKey",d,u,a,Z?L:p),o){const V=this.resolve(a,{...s,keySeparator:!1});V&&V.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let N=[];const D=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&D&&D[0])for(let V=0;V<D.length;V++)N.push(D[V]);else this.options.saveMissingTo==="all"?N=this.languageUtils.toResolveHierarchy(s.lng||this.language):N.push(s.lng||this.language);const $=(V,G,Pe)=>{var ot;const Re=C&&Pe!==p?Pe:z;this.options.missingKeyHandler?this.options.missingKeyHandler(V,u,G,Re,Z,s):(ot=this.backendConnector)!=null&&ot.saveMissing&&this.backendConnector.saveMissing(V,u,G,Re,Z,s),this.emit("missingKey",V,u,G,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&k?N.forEach(V=>{const G=this.pluralResolver.getSuffixes(V,s);P&&s[`defaultValue${this.options.pluralSeparator}zero`]&&G.indexOf(`${this.options.pluralSeparator}zero`)<0&&G.push(`${this.options.pluralSeparator}zero`),G.forEach(Pe=>{$([V],a+Pe,s[`defaultValue${Pe}`]||L)})}):$(N,a,L))}p=this.extendTranslation(p,t,s,g,r),_&&p===a&&this.options.appendNamespaceToMissingKey&&(p=`${u}${c}${a}`),(_||M)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${c}${a}`:a,M?p:void 0,s))}return i?(g.res=p,g.usedParams=this.getUsedParamsDetails(s),g):p}extendTranslation(t,n,r,s,i){var l,u;if((l=this.i18nFormat)!=null&&l.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const c=W(t)&&(((u=r==null?void 0:r.interpolation)==null?void 0:u.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(c){const g=t.match(this.interpolator.nestingRegexp);d=g&&g.length}let f=r.replace&&!W(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),t=this.interpolator.interpolate(t,f,r.lng||this.language||s.usedLng,r),c){const g=t.match(this.interpolator.nestingRegexp),p=g&&g.length;d<p&&(r.nest=!1)}!r.lng&&s&&s.res&&(r.lng=this.language||s.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,(...g)=>(i==null?void 0:i[0])===g[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${g[0]} in key: ${n[0]}`),null):this.translate(...g,n),r)),r.interpolation&&this.interpolator.reset()}const o=r.postProcess||this.options.postProcess,a=W(o)?[o]:o;return t!=null&&(a!=null&&a.length)&&r.applyPostProcessor!==!1&&(t=rv.handle(a,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t,n={}){let r,s,i,o,a;return W(t)&&(t=[t]),Array.isArray(t)&&(t=t.map(l=>typeof l=="function"?Mr(l,{...this.options,...n}):l)),t.forEach(l=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(l,n),c=u.key;s=c;let d=u.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=n.count!==void 0&&!W(n.count),g=f&&!n.ordinal&&n.count===0,p=n.context!==void 0&&(W(n.context)||typeof n.context=="number")&&n.context!=="",v=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(w=>{var m,y;this.isValidLookup(r)||(a=w,!Ih[`${v[0]}-${w}`]&&((m=this.utils)!=null&&m.hasLoadedNamespace)&&!((y=this.utils)!=null&&y.hasLoadedNamespace(a))&&(Ih[`${v[0]}-${w}`]=!0,this.logger.warn(`key "${s}" for languages "${v.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),v.forEach(x=>{var b;if(this.isValidLookup(r))return;o=x;const k=[c];if((b=this.i18nFormat)!=null&&b.addLookupKeys)this.i18nFormat.addLookupKeys(k,c,x,w,n);else{let T;f&&(T=this.pluralResolver.getSuffix(x,n.count,n));const P=`${this.options.pluralSeparator}zero`,L=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(n.ordinal&&T.indexOf(L)===0&&k.push(c+T.replace(L,this.options.pluralSeparator)),k.push(c+T),g&&k.push(c+P)),p){const R=`${c}${this.options.contextSeparator||"_"}${n.context}`;k.push(R),f&&(n.ordinal&&T.indexOf(L)===0&&k.push(R+T.replace(L,this.options.pluralSeparator)),k.push(R+T),g&&k.push(R+P))}}let C;for(;C=k.pop();)this.isValidLookup(r)||(i=C,r=this.getResource(x,w,C,n))}))})}),{res:r,usedKey:s,exactUsedKey:i,usedLng:o,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r,s={}){var i;return(i=this.i18nFormat)!=null&&i.getResource?this.i18nFormat.getResource(t,n,r,s):this.resourceStore.getResource(t,n,r,s)}getUsedParamsDetails(t={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!W(t.replace);let s=r?t.replace:t;if(r&&typeof t.count<"u"&&(s.count=t.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!r){s={...s};for(const i of n)delete s[i]}return s}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}class _h{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Ft.create("languageUtils")}getScriptPartFromCode(t){if(t=ni(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=ni(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(W(t)&&t.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const s=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(s))&&(n=s)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const s=this.getScriptPartFromCode(r);if(this.isSupportedCode(s))return n=s;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(o=>{if(o===i)return o;if(!(o.indexOf("-")<0&&i.indexOf("-")<0)&&(o.indexOf("-")>0&&i.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===i||o.indexOf(i)===0&&i.length>1))return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),W(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],t),s=[],i=o=>{o&&(this.isSupportedCode(o)?s.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return W(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(t))):W(t)&&i(this.formatLanguageCode(t)),r.forEach(o=>{s.indexOf(o)<0&&i(this.formatLanguageCode(o))}),s}}const Vh={zero:0,one:1,two:2,few:3,many:4,other:5},zh={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class XS{constructor(t,n={}){this.languageUtils=t,this.options=n,this.logger=Ft.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,n={}){const r=ni(t==="dev"?"en":t),s=n.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:s});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let o;try{o=new Intl.PluralRules(r,{type:s})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),zh;if(!t.match(/-|_/))return zh;const l=this.languageUtils.getLanguagePartFromCode(t);o=this.getRule(l,n)}return this.pluralRulesCache[i]=o,o}needsPlural(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,n,r={}){return this.getSuffixes(t,r).map(s=>`${n}${s}`)}getSuffixes(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((s,i)=>Vh[s]-Vh[i]).map(s=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(t,n,r={}){const s=this.getRule(t,r);return s?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const $h=(e,t,n,r=".",s=!0)=>{let i=$S(e,t,n);return!i&&s&&W(n)&&(i=qu(e,n,r),i===void 0&&(i=qu(t,n,r))),i},El=e=>e.replace(/\$/g,"$$$$");class Bh{constructor(t={}){var n;this.logger=Ft.create("interpolator"),this.options=t,this.format=((n=t==null?void 0:t.interpolation)==null?void 0:n.format)||(r=>r),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:s,prefix:i,prefixEscaped:o,suffix:a,suffixEscaped:l,formatSeparator:u,unescapeSuffix:c,unescapePrefix:d,nestingPrefix:f,nestingPrefixEscaped:g,nestingSuffix:p,nestingSuffixEscaped:v,nestingOptionsSeparator:w,maxReplaces:m,alwaysFormat:y}=t.interpolation;this.escape=n!==void 0?n:US,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=i?_n(i):o||"{{",this.suffix=a?_n(a):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=c?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=f?_n(f):g||_n("$t("),this.nestingSuffix=p?_n(p):v||_n(")"),this.nestingOptionsSeparator=w||",",this.maxReplaces=m||1e3,this.alwaysFormat=y!==void 0?y:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>(n==null?void 0:n.source)===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,n,r,s){var g;let i,o,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=p=>{if(p.indexOf(this.formatSeparator)<0){const y=$h(n,l,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(y,void 0,r,{...s,...n,interpolationkey:p}):y}const v=p.split(this.formatSeparator),w=v.shift().trim(),m=v.join(this.formatSeparator).trim();return this.format($h(n,l,w,this.options.keySeparator,this.options.ignoreJSONStructure),m,r,{...s,...n,interpolationkey:w})};this.resetRegExp();const c=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,d=((g=s==null?void 0:s.interpolation)==null?void 0:g.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>El(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?El(this.escape(p)):El(p)}].forEach(p=>{for(a=0;i=p.regex.exec(t);){const v=i[1].trim();if(o=u(v),o===void 0)if(typeof c=="function"){const m=c(t,i,s);o=W(m)?m:""}else if(s&&Object.prototype.hasOwnProperty.call(s,v))o="";else if(d){o=i[0];continue}else this.logger.warn(`missed to pass in variable ${v} for interpolating ${t}`),o="";else!W(o)&&!this.useRawValueToEscape&&(o=Ah(o));const w=p.safeValue(o);if(t=t.replace(i[0],w),d?(p.regex.lastIndex+=o.length,p.regex.lastIndex-=i[0].length):p.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,n,r={}){let s,i,o;const a=(l,u)=>{const c=this.nestingOptionsSeparator;if(l.indexOf(c)<0)return l;const d=l.split(new RegExp(`${_n(c)}[ ]*{`));let f=`{${d[1]}`;l=d[0],f=this.interpolate(f,o);const g=f.match(/'/g),p=f.match(/"/g);(((g==null?void 0:g.length)??0)%2===0&&!p||((p==null?void 0:p.length)??0)%2!==0)&&(f=f.replace(/'/g,'"'));try{o=JSON.parse(f),u&&(o={...u,...o})}catch(v){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,v),`${l}${c}${f}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,l};for(;s=this.nestingRegexp.exec(t);){let l=[];o={...r},o=o.replace&&!W(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;const u=/{.*}/.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(u!==-1&&(l=s[1].slice(u).split(this.formatSeparator).map(c=>c.trim()).filter(Boolean),s[1]=s[1].slice(0,u)),i=n(a.call(this,s[1].trim(),o),o),i&&s[0]===t&&!W(i))return i;W(i)||(i=Ah(i)),i||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${t}`),i=""),l.length&&(i=l.reduce((c,d)=>this.format(c,d,r.lng,{...r,interpolationkey:s[1].trim()}),i.trim())),t=t.replace(s[0],i),this.regexp.lastIndex=0}return t}}const QS=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const s=r[1].substring(0,r[1].length-1);t==="currency"&&s.indexOf(":")<0?n.currency||(n.currency=s.trim()):t==="relativetime"&&s.indexOf(":")<0?n.range||(n.range=s.trim()):s.split(";").forEach(o=>{if(o){const[a,...l]=o.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),c=a.trim();n[c]||(n[c]=u),u==="false"&&(n[c]=!1),u==="true"&&(n[c]=!0),isNaN(u)||(n[c]=parseInt(u,10))}})}return{formatName:t,formatOptions:n}},Uh=e=>{const t={};return(n,r,s)=>{let i=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(i={...i,[s.interpolationkey]:void 0});const o=r+JSON.stringify(i);let a=t[o];return a||(a=e(ni(r),s),t[o]=a),a(n)}},JS=e=>(t,n,r)=>e(ni(n),r)(t);class ZS{constructor(t={}){this.logger=Ft.create("formatter"),this.options=t,this.init(t)}init(t,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const r=n.cacheInBuiltFormats?Uh:JS;this.formats={number:r((s,i)=>{const o=new Intl.NumberFormat(s,{...i});return a=>o.format(a)}),currency:r((s,i)=>{const o=new Intl.NumberFormat(s,{...i,style:"currency"});return a=>o.format(a)}),datetime:r((s,i)=>{const o=new Intl.DateTimeFormat(s,{...i});return a=>o.format(a)}),relativetime:r((s,i)=>{const o=new Intl.RelativeTimeFormat(s,{...i});return a=>o.format(a,i.range||"day")}),list:r((s,i)=>{const o=new Intl.ListFormat(s,{...i});return a=>o.format(a)})}}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Uh(n)}format(t,n,r,s={}){const i=n.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(a=>a.indexOf(")")>-1)){const a=i.findIndex(l=>l.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,a)].join(this.formatSeparator)}return i.reduce((a,l)=>{var d;const{formatName:u,formatOptions:c}=QS(l);if(this.formats[u]){let f=a;try{const g=((d=s==null?void 0:s.formatParams)==null?void 0:d[s.interpolationkey])||{},p=g.locale||g.lng||s.locale||s.lng||r;f=this.formats[u](a,p,{...c,...s,...g})}catch(g){this.logger.warn(g)}return f}else this.logger.warn(`there was no format function for ${u}`);return a},t)}}const ek=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class tk extends ja{constructor(t,n,r,s={}){var i,o;super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=s,this.logger=Ft.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],(o=(i=this.backend)==null?void 0:i.init)==null||o.call(i,r,s.backend,s)}queueLoad(t,n,r,s){const i={},o={},a={},l={};return t.forEach(u=>{let c=!0;n.forEach(d=>{const f=`${u}|${d}`;!r.reload&&this.store.hasResourceBundle(u,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?o[f]===void 0&&(o[f]=!0):(this.state[f]=1,c=!1,o[f]===void 0&&(o[f]=!0),i[f]===void 0&&(i[f]=!0),l[d]===void 0&&(l[d]=!0)))}),c||(a[u]=!0)}),(Object.keys(i).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(i),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(t,n,r){const s=t.split("|"),i=s[0],o=s[1];n&&this.emit("failedLoading",i,o,n),!n&&r&&this.store.addResourceBundle(i,o,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const a={};this.queue.forEach(l=>{zS(l.loaded,[i],o),ek(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{a[u]||(a[u]={});const c=l.loaded[u];c.length&&c.forEach(d=>{a[u][d]===void 0&&(a[u][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(l=>!l.done)}read(t,n,r,s=0,i=this.retryTimeout,o){if(!t.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:s,wait:i,callback:o});return}this.readingCalls++;const a=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(u&&c&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,s+1,i*2,o)},i);return}o(u,c)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const u=l(t,n);u&&typeof u.then=="function"?u.then(c=>a(null,c)).catch(a):a(null,u)}catch(u){a(u)}return}return l(t,n,a)}prepareLoading(t,n,r={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();W(t)&&(t=this.languageUtils.toResolveHierarchy(t)),W(n)&&(n=[n]);const i=this.queueLoad(t,n,r,s);if(!i.toLoad.length)return i.pending.length||s(),null;i.toLoad.forEach(o=>{this.loadOne(o)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t,n=""){const r=t.split("|"),s=r[0],i=r[1];this.read(s,i,"read",void 0,void 0,(o,a)=>{o&&this.logger.warn(`${n}loading namespace ${i} for language ${s} failed`,o),!o&&a&&this.logger.log(`${n}loaded namespace ${i} for language ${s}`,a),this.loaded(t,o,a)})}saveMissing(t,n,r,s,i,o={},a=()=>{}){var l,u,c,d,f;if((u=(l=this.services)==null?void 0:l.utils)!=null&&u.hasLoadedNamespace&&!((d=(c=this.services)==null?void 0:c.utils)!=null&&d.hasLoadedNamespace(n))){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((f=this.backend)!=null&&f.create){const g={...o,isUpdate:i},p=this.backend.create.bind(this.backend);if(p.length<6)try{let v;p.length===5?v=p(t,n,r,s,g):v=p(t,n,r,s),v&&typeof v.then=="function"?v.then(w=>a(null,w)).catch(a):a(null,v)}catch(v){a(v)}else p(t,n,r,s,a,g)}!t||!t[0]||this.store.addResource(t[0],n,r,s)}}}const bl=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),W(e[1])&&(t.defaultValue=e[1]),W(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Hh=e=>{var t,n;return W(e.ns)&&(e.ns=[e.ns]),W(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),W(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),((n=(t=e.supportedLngs)==null?void 0:t.indexOf)==null?void 0:n.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e},Gi=()=>{},nk=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})},iv="__i18next_supportNoticeShown",rk=()=>!!(typeof globalThis<"u"&&globalThis[iv]||typeof process<"u"&&kl&&kl.I18NEXT_NO_SUPPORT_NOTICE||typeof process<"u"&&kl),sk=()=>{typeof globalThis<"u"&&(globalThis[iv]=!0)},ik=e=>{var t,n,r,s,i,o,a,l,u,c,d,f,g;return!!(((r=(n=(t=e==null?void 0:e.modules)==null?void 0:t.backend)==null?void 0:n.name)==null?void 0:r.indexOf("Locize"))>0||((a=(o=(i=(s=e==null?void 0:e.modules)==null?void 0:s.backend)==null?void 0:i.constructor)==null?void 0:o.name)==null?void 0:a.indexOf("Locize"))>0||(u=(l=e==null?void 0:e.options)==null?void 0:l.backend)!=null&&u.backends&&e.options.backend.backends.some(p=>{var v,w,m;return((v=p==null?void 0:p.name)==null?void 0:v.indexOf("Locize"))>0||((m=(w=p==null?void 0:p.constructor)==null?void 0:w.name)==null?void 0:m.indexOf("Locize"))>0})||(d=(c=e==null?void 0:e.options)==null?void 0:c.backend)!=null&&d.projectId||(g=(f=e==null?void 0:e.options)==null?void 0:f.backend)!=null&&g.backendOptions&&e.options.backend.backendOptions.some(p=>p==null?void 0:p.projectId))};class Ds extends ja{constructor(t={},n){if(super(),this.options=Hh(t),this.services={},this.logger=Ft,this.modules={external:[]},nk(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(t={},n){this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&(W(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=bl();this.options={...r,...this.options,...Hh(t)},this.options.interpolation={...r.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!ik(this)&&!rk()&&(typeof console<"u"&&typeof console.info<"u"&&console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),sk());const s=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?Ft.init(s(this.modules.logger),this.options):Ft.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=ZS;const c=new _h(this.options);this.store=new Fh(this.options.resources,this.options);const d=this.services;d.logger=Ft,d.resourceStore=this.store,d.languageUtils=c,d.pluralResolver=new XS(c,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),u&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(d.formatter=s(u),d.formatter.init&&d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new Bh(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new tk(s(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",(g,...p)=>{this.emit(g,...p)}),this.modules.languageDetector&&(d.languageDetector=s(this.modules.languageDetector),d.languageDetector.init&&d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=s(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new ea(this.services,this.options),this.translator.on("*",(g,...p)=>{this.emit(g,...p)}),this.modules.external.forEach(g=>{g.init&&g.init(this)})}if(this.format=this.options.interpolation.format,n||(n=Gi),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=(...c)=>this.store[u](...c)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=(...c)=>(this.store[u](...c),this)});const a=hs(),l=()=>{const u=(c,d)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(d),n(c,d)};if(this.languages&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),a}loadResources(t,n=Gi){var i,o;let r=n;const s=W(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if((s==null?void 0:s.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const a=[],l=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(d=>{d!=="cimode"&&a.indexOf(d)<0&&a.push(d)})};s?l(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>l(c)),(o=(i=this.options.preload)==null?void 0:i.forEach)==null||o.call(i,u=>l(u)),this.services.backendConnector.load(a,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(u)})}else r(null)}reloadResources(t,n,r){const s=hs();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=Gi),this.services.backendConnector.reload(t,n,i=>{s.resolve(),r(i)}),s}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&rv.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1)){for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,n){this.isLanguageChangingTo=t;const r=hs();this.emit("languageChanging",t);const s=a=>{this.language=a,this.languages=this.services.languageUtils.toResolveHierarchy(a),this.resolvedLanguage=void 0,this.setResolvedLanguage(a)},i=(a,l)=>{l?this.isLanguageChangingTo===t&&(s(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,r.resolve((...u)=>this.t(...u)),n&&n(a,(...u)=>this.t(...u))},o=a=>{var c,d;!t&&!a&&this.services.languageDetector&&(a=[]);const l=W(a)?a:a&&a[0],u=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(W(a)?[a]:a);u&&(this.language||s(u),this.translator.language||this.translator.changeLanguage(u),(d=(c=this.services.languageDetector)==null?void 0:c.cacheUserLanguage)==null||d.call(c,u)),this.loadResources(u,f=>{i(f,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(t),r}getFixedT(t,n,r){const s=(i,o,...a)=>{let l;typeof o!="object"?l=this.options.overloadTranslationOptionHandler([i,o].concat(a)):l={...o},l.lng=l.lng||s.lng,l.lngs=l.lngs||s.lngs,l.ns=l.ns||s.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||r||s.keyPrefix);const u={...this.options,...l};typeof l.keyPrefix=="function"&&(l.keyPrefix=Mr(l.keyPrefix,u));const c=this.options.keySeparator||".";let d;return l.keyPrefix&&Array.isArray(i)?d=i.map(f=>(typeof f=="function"&&(f=Mr(f,u)),`${l.keyPrefix}${c}${f}`)):(typeof i=="function"&&(i=Mr(i,u)),d=l.keyPrefix?`${l.keyPrefix}${c}${i}`:i),this.t(d,l)};return W(t)?s.lng=t:s.lngs=t,s.ns=n,s.keyPrefix=r,s}t(...t){var n;return(n=this.translator)==null?void 0:n.translate(...t)}exists(...t){var n;return(n=this.translator)==null?void 0:n.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const o=(a,l)=>{const u=this.services.backendConnector.state[`${a}|${l}`];return u===-1||u===0||u===2};if(n.precheck){const a=n.precheck(this,o);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(r,t)&&(!s||o(i,t)))}loadNamespaces(t,n){const r=hs();return this.options.ns?(W(t)&&(t=[t]),t.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=hs();W(t)&&(t=[t]);const s=this.options.preload||[],i=t.filter(o=>s.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return i.length?(this.options.preload=s.concat(i),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}dir(t){var s,i;if(t||(t=this.resolvedLanguage||(((s=this.languages)==null?void 0:s.length)>0?this.languages[0]:this.language)),!t)return"rtl";try{const o=new Intl.Locale(t);if(o&&o.getTextInfo){const a=o.getTextInfo();if(a&&a.direction)return a.direction}}catch{}const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=((i=this.services)==null?void 0:i.languageUtils)||new _h(bl());return t.toLowerCase().indexOf("-latn")>1?"ltr":n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},n){const r=new Ds(t,n);return r.createInstance=Ds.createInstance,r}cloneInstance(t={},n=Gi){const r=t.forkResourceStore;r&&delete t.forkResourceStore;const s={...this.options,...t,isClone:!0},i=new Ds(s);if((t.debug!==void 0||t.prefix!==void 0)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(a=>{i[a]=this[a]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r){const a=Object.keys(this.store.data).reduce((l,u)=>(l[u]={...this.store.data[u]},l[u]=Object.keys(l[u]).reduce((c,d)=>(c[d]={...l[u][d]},c),l[u]),l),{});i.store=new Fh(a,s),i.services.resourceStore=i.store}if(t.interpolation){const l={...bl().interpolation,...this.options.interpolation,...t.interpolation},u={...s,interpolation:l};i.services.interpolator=new Bh(u)}return i.translator=new ea(i.services,s),i.translator.on("*",(a,...l)=>{i.emit(a,...l)}),i.init(s,n),i.translator.options=s,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const We=Ds.createInstance();We.createInstance;We.dir;We.init;We.loadResources;We.reloadResources;We.use;We.changeLanguage;We.getFixedT;We.t;We.exists;We.setDefaultNamespace;We.hasLoadedNamespace;We.loadNamespaces;We.loadLanguages;const ok=(e,t,n,r)=>{var i,o,a,l;const s=[n,{code:t,...r||{}}];if((o=(i=e==null?void 0:e.services)==null?void 0:i.logger)!=null&&o.forward)return e.services.logger.forward(s,"warn","react-i18next::",!0);ir(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),(l=(a=e==null?void 0:e.services)==null?void 0:a.logger)!=null&&l.warn?e.services.logger.warn(...s):console!=null&&console.warn&&console.warn(...s)},Wh={},Yu=(e,t,n,r)=>{ir(n)&&Wh[n]||(ir(n)&&(Wh[n]=new Date),ok(e,t,n,r))},ov=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},Xu=(e,t,n)=>{e.loadNamespaces(t,ov(e,n))},Kh=(e,t,n,r)=>{if(ir(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Xu(e,n,r);n.forEach(s=>{e.options.ns.indexOf(s)<0&&e.options.ns.push(s)}),e.loadLanguages(t,ov(e,r))},ak=(e,t,n={})=>!t.languages||!t.languages.length?(Yu(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,s)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!s(r.isLanguageChangingTo,e))return!1}}),ir=e=>typeof e=="string",lk=e=>typeof e=="object"&&e!==null,uk=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,ck={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},dk=e=>ck[e],fk=e=>e.replace(uk,dk);let Qu={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:fk,transDefaultProps:void 0};const hk=(e={})=>{Qu={...Qu,...e}},pk=()=>Qu;let av;const mk=e=>{av=e},gk=()=>av,yk={type:"3rdParty",init(e){hk(e.options.react),mk(e)}},vk=S.createContext();class xk{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var lv={exports:{}},uv={};/**
40
+ `+i.stack}return{value:e,source:t,stack:s,digest:null}}function vl(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Du(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var fS=typeof WeakMap=="function"?WeakMap:Map;function Py(e,t,n){n=Xt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){qo||(qo=!0,Hu=r),Du(e,t)},n}function Ry(e,t,n){n=Xt(-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(){Du(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Du(e,t),typeof r!="function"&&(bn===null?bn=new Set([this]):bn.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function hh(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new fS;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=TS.bind(null,e,t,n),t.then(e,e))}function ph(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 mh(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=Xt(-1,1),t.tag=2,En(n,t,1))),n.lanes|=1),e)}var hS=sn.ReactCurrentOwner,Ge=!1;function Ve(e,t,n,r){t.child=e===null?ry(t,null,n,r):zr(t,e.child,n,r)}function gh(e,t,n,r,s){n=n.render;var i=t.ref;return Or(t,s),r=ud(e,t,n,r,i,s),n=cd(),e!==null&&!Ge?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,nn(e,t,s)):(ce&&n&&Qc(t),t.flags|=1,Ve(e,t,r,s),t.child)}function yh(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!wd(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Ny(e,t,i,r,s)):(e=ho(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:Ks,n(o,r)&&e.ref===t.ref)return nn(e,t,s)}return t.flags|=1,e=Pn(i,r),e.ref=t.ref,e.return=t,t.child=e}function Ny(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(Ks(i,r)&&e.ref===t.ref)if(Ge=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(Ge=!0);else return t.lanes=e.lanes,nn(e,t,s)}return Mu(e,t,n,r,s)}function jy(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},se(br,Ze),Ze|=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,se(br,Ze),Ze|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,se(br,Ze),Ze|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,se(br,Ze),Ze|=r;return Ve(e,t,s,n),t.child}function Ly(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Mu(e,t,n,r,s){var i=Ye(n)?er:_e.current;return i=_r(t,i),Or(t,s),n=ud(e,t,n,r,i,s),r=cd(),e!==null&&!Ge?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,nn(e,t,s)):(ce&&r&&Qc(t),t.flags|=1,Ve(e,t,n,s),t.child)}function vh(e,t,n,r,s){if(Ye(n)){var i=!0;_o(t)}else i=!1;if(Or(t,s),t.stateNode===null)uo(e,t),Ty(t,n,r),Ou(t,n,r,s),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=yt(u):(u=Ye(n)?er:_e.current,u=_r(t,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==u)&&fh(t,o,r,u),pn=!1;var f=t.memoizedState;o.state=f,Uo(t,r,o,s),l=t.memoizedState,a!==r||f!==l||qe.current||pn?(typeof c=="function"&&(Au(t,n,c,r),l=t.memoizedState),(a=pn||dh(t,n,a,r,f,l,u))?(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=l),o.props=r,o.state=l,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,iy(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Ct(t.type,a),o.props=u,d=t.pendingProps,f=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=yt(l):(l=Ye(n)?er:_e.current,l=_r(t,l));var g=n.getDerivedStateFromProps;(c=typeof g=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||f!==l)&&fh(t,o,r,l),pn=!1,f=t.memoizedState,o.state=f,Uo(t,r,o,s);var p=t.memoizedState;a!==d||f!==p||qe.current||pn?(typeof g=="function"&&(Au(t,n,g,r),p=t.memoizedState),(u=pn||dh(t,n,u,r,f,p,l)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,p,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,p,l)),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=p),o.props=r,o.state=p,o.context=l,r=u):(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 Fu(e,t,n,r,i,s)}function Fu(e,t,n,r,s,i){Ly(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return s&&rh(t,n,!1),nn(e,t,i);r=t.stateNode,hS.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=zr(t,e.child,null,i),t.child=zr(t,null,a,i)):Ve(e,t,a,i),t.memoizedState=r.state,s&&rh(t,n,!0),t.child}function Ay(e){var t=e.stateNode;t.pendingContext?nh(e,t.pendingContext,t.pendingContext!==t.context):t.context&&nh(e,t.context,!1),id(e,t.containerInfo)}function xh(e,t,n,r,s){return Vr(),Zc(s),t.flags|=256,Ve(e,t,n,r),t.child}var Iu={dehydrated:null,treeContext:null,retryLane:0};function _u(e){return{baseLanes:e,cachePool:null,transitions:null}}function Oy(e,t,n){var r=t.pendingProps,s=de.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),se(de,s&1),e===null)return ju(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=ba(o,r,0,null),e=Xn(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=_u(n),t.memoizedState=Iu,e):hd(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return pS(e,t,o,r,a,s,n);if(i){i=r.fallback,o=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Pn(s,l),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=Pn(a,i):(i=Xn(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?_u(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=Iu,r}return i=e.child,e=i.sibling,r=Pn(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 hd(e,t){return t=ba({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ui(e,t,n,r){return r!==null&&Zc(r),zr(t,e.child,null,n),e=hd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function pS(e,t,n,r,s,i,o){if(n)return t.flags&256?(t.flags&=-257,r=vl(Error(j(422))),Ui(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=ba({mode:"visible",children:r.children},s,0,null),i=Xn(i,s,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&zr(t,e.child,null,o),t.child.memoizedState=_u(o),t.memoizedState=Iu,i);if(!(t.mode&1))return Ui(e,t,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(j(419)),r=vl(i,r,void 0),Ui(e,t,o,r)}if(a=(o&e.childLanes)!==0,Ge||a){if(r=Te,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,tn(e,s),Pt(r,e,s,-1))}return xd(),r=vl(Error(j(421))),Ui(e,t,o,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=PS.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,et=Cn(s.nextSibling),tt=t,ce=!0,bt=null,e!==null&&(dt[ft++]=qt,dt[ft++]=Yt,dt[ft++]=tr,qt=e.id,Yt=e.overflow,tr=t),t=hd(t,r.children),t.flags|=4096,t)}function wh(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Lu(e.return,t,n)}function xl(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 Dy(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(Ve(e,t,r.children,n),r=de.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&&wh(e,n,t);else if(e.tag===19)wh(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(se(de,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&&Ho(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),xl(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&&Ho(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}xl(t,!0,n,null,i);break;case"together":xl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function uo(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function nn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),rr|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(j(153));if(t.child!==null){for(e=t.child,n=Pn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Pn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function mS(e,t,n){switch(t.tag){case 3:Ay(t),Vr();break;case 5:oy(t);break;case 1:Ye(t.type)&&_o(t);break;case 4:id(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;se($o,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(se(de,de.current&1),t.flags|=128,null):n&t.child.childLanes?Oy(e,t,n):(se(de,de.current&1),e=nn(e,t,n),e!==null?e.sibling:null);se(de,de.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Dy(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),se(de,de.current),r)break;return null;case 22:case 23:return t.lanes=0,jy(e,t,n)}return nn(e,t,n)}var My,Vu,Fy,Iy;My=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}};Vu=function(){};Fy=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,Wn(_t.current);var i=null;switch(n){case"input":s=au(e,s),r=au(e,r),i=[];break;case"select":s=pe({},s,{value:void 0}),r=pe({},r,{value:void 0}),i=[];break;case"textarea":s=cu(e,s),r=cu(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Fo)}fu(n,r);var o;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var a=s[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Vs.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var l=r[u];if(a=s!=null?s[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(i||(i=[]),i.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Vs.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&oe("scroll",e),i||a===l||(i=[])):(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};Iy=function(e,t,n,r){n!==r&&(t.flags|=4)};function ds(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 Me(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 gS(e,t,n){var r=t.pendingProps;switch(Jc(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Me(t),null;case 1:return Ye(t.type)&&Io(),Me(t),null;case 3:return r=t.stateNode,$r(),le(qe),le(_e),ad(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&($i(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,bt!==null&&(Gu(bt),bt=null))),Vu(e,t),Me(t),null;case 5:od(t);var s=Wn(Qs.current);if(n=t.type,e!==null&&t.stateNode!=null)Fy(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(j(166));return Me(t),null}if(e=Wn(_t.current),$i(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Mt]=t,r[Ys]=i,e=(t.mode&1)!==0,n){case"dialog":oe("cancel",r),oe("close",r);break;case"iframe":case"object":case"embed":oe("load",r);break;case"video":case"audio":for(s=0;s<ks.length;s++)oe(ks[s],r);break;case"source":oe("error",r);break;case"img":case"image":case"link":oe("error",r),oe("load",r);break;case"details":oe("toggle",r);break;case"input":Nf(r,i),oe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},oe("invalid",r);break;case"textarea":Lf(r,i),oe("invalid",r)}fu(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&&zi(r.textContent,a,e),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&zi(r.textContent,a,e),s=["children",""+a]):Vs.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&oe("scroll",r)}switch(n){case"input":Ai(r),jf(r,i,!0);break;case"textarea":Ai(r),Af(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Fo)}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=dg(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[Mt]=t,e[Ys]=r,My(e,t,!1,!1),t.stateNode=e;e:{switch(o=hu(n,r),n){case"dialog":oe("cancel",e),oe("close",e),s=r;break;case"iframe":case"object":case"embed":oe("load",e),s=r;break;case"video":case"audio":for(s=0;s<ks.length;s++)oe(ks[s],e);s=r;break;case"source":oe("error",e),s=r;break;case"img":case"image":case"link":oe("error",e),oe("load",e),s=r;break;case"details":oe("toggle",e),s=r;break;case"input":Nf(e,r),s=au(e,r),oe("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=pe({},r,{value:void 0}),oe("invalid",e);break;case"textarea":Lf(e,r),s=cu(e,r),oe("invalid",e);break;default:s=r}fu(n,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?pg(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&fg(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&zs(e,l):typeof l=="number"&&zs(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Vs.hasOwnProperty(i)?l!=null&&i==="onScroll"&&oe("scroll",e):l!=null&&Ic(e,i,l,o))}switch(n){case"input":Ai(e),jf(e,r,!1);break;case"textarea":Ai(e),Af(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Rn(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Nr(e,!!r.multiple,i,!1):r.defaultValue!=null&&Nr(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Fo)}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 Me(t),null;case 6:if(e&&t.stateNode!=null)Iy(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(j(166));if(n=Wn(Qs.current),Wn(_t.current),$i(t)){if(r=t.stateNode,n=t.memoizedProps,r[Mt]=t,(i=r.nodeValue!==n)&&(e=tt,e!==null))switch(e.tag){case 3:zi(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&zi(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Mt]=t,t.stateNode=r}return Me(t),null;case 13:if(le(de),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ce&&et!==null&&t.mode&1&&!(t.flags&128))ty(),Vr(),t.flags|=98560,i=!1;else if(i=$i(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(j(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(j(317));i[Mt]=t}else Vr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Me(t),i=!1}else bt!==null&&(Gu(bt),bt=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||de.current&1?Ee===0&&(Ee=3):xd())),t.updateQueue!==null&&(t.flags|=4),Me(t),null);case 4:return $r(),Vu(e,t),e===null&&Gs(t.stateNode.containerInfo),Me(t),null;case 10:return nd(t.type._context),Me(t),null;case 17:return Ye(t.type)&&Io(),Me(t),null;case 19:if(le(de),i=t.memoizedState,i===null)return Me(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)ds(i,!1);else{if(Ee!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Ho(e),o!==null){for(t.flags|=128,ds(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 se(de,de.current&1|2),t.child}e=e.sibling}i.tail!==null&&ye()>Ur&&(t.flags|=128,r=!0,ds(i,!1),t.lanes=4194304)}else{if(!r)if(e=Ho(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ds(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!ce)return Me(t),null}else 2*ye()-i.renderingStartTime>Ur&&n!==1073741824&&(t.flags|=128,r=!0,ds(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=ye(),t.sibling=null,n=de.current,se(de,r?n&1|2:n&1),t):(Me(t),null);case 22:case 23:return vd(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ze&1073741824&&(Me(t),t.subtreeFlags&6&&(t.flags|=8192)):Me(t),null;case 24:return null;case 25:return null}throw Error(j(156,t.tag))}function yS(e,t){switch(Jc(t),t.tag){case 1:return Ye(t.type)&&Io(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return $r(),le(qe),le(_e),ad(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return od(t),null;case 13:if(le(de),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(j(340));Vr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return le(de),null;case 4:return $r(),null;case 10:return nd(t.type._context),null;case 22:case 23:return vd(),null;case 24:return null;default:return null}}var Hi=!1,Fe=!1,vS=typeof WeakSet=="function"?WeakSet:Set,F=null;function Er(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ge(e,t,r)}else n.current=null}function zu(e,t,n){try{n()}catch(r){ge(e,t,r)}}var Sh=!1;function xS(e,t){if(Cu=Oo,e=Bg(),Xc(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,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var g;d!==n||s!==0&&d.nodeType!==3||(a=o+s),d!==i||r!==0&&d.nodeType!==3||(l=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(g=d.firstChild)!==null;)f=d,d=g;for(;;){if(d===e)break t;if(f===n&&++u===s&&(a=o),f===i&&++c===r&&(l=o),(g=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=g}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Eu={focusedElem:e,selectionRange:n},Oo=!1,F=t;F!==null;)if(t=F,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,F=e;else for(;F!==null;){t=F;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var v=p.memoizedProps,w=p.memoizedState,m=t.stateNode,y=m.getSnapshotBeforeUpdate(t.elementType===t.type?v:Ct(t.type,v),w);m.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(j(163))}}catch(k){ge(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,F=e;break}F=t.return}return p=Sh,Sh=!1,p}function js(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&&zu(t,n,i)}s=s.next}while(s!==r)}}function Ca(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 $u(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 _y(e){var t=e.alternate;t!==null&&(e.alternate=null,_y(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Mt],delete t[Ys],delete t[Pu],delete t[tS],delete t[nS])),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 Vy(e){return e.tag===5||e.tag===3||e.tag===4}function kh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Vy(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 Bu(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=Fo));else if(r!==4&&(e=e.child,e!==null))for(Bu(e,t,n),e=e.sibling;e!==null;)Bu(e,t,n),e=e.sibling}function Uu(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(Uu(e,t,n),e=e.sibling;e!==null;)Uu(e,t,n),e=e.sibling}var Ne=null,Et=!1;function ln(e,t,n){for(n=n.child;n!==null;)zy(e,t,n),n=n.sibling}function zy(e,t,n){if(It&&typeof It.onCommitFiberUnmount=="function")try{It.onCommitFiberUnmount(ma,n)}catch{}switch(n.tag){case 5:Fe||Er(n,t);case 6:var r=Ne,s=Et;Ne=null,ln(e,t,n),Ne=r,Et=s,Ne!==null&&(Et?(e=Ne,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ne.removeChild(n.stateNode));break;case 18:Ne!==null&&(Et?(e=Ne,n=n.stateNode,e.nodeType===8?fl(e.parentNode,n):e.nodeType===1&&fl(e,n),Hs(e)):fl(Ne,n.stateNode));break;case 4:r=Ne,s=Et,Ne=n.stateNode.containerInfo,Et=!0,ln(e,t,n),Ne=r,Et=s;break;case 0:case 11:case 14:case 15:if(!Fe&&(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)&&zu(n,t,o),s=s.next}while(s!==r)}ln(e,t,n);break;case 1:if(!Fe&&(Er(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ge(n,t,a)}ln(e,t,n);break;case 21:ln(e,t,n);break;case 22:n.mode&1?(Fe=(r=Fe)||n.memoizedState!==null,ln(e,t,n),Fe=r):ln(e,t,n);break;default:ln(e,t,n)}}function Ch(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new vS),t.forEach(function(r){var s=RS.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function wt(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:Ne=a.stateNode,Et=!1;break e;case 3:Ne=a.stateNode.containerInfo,Et=!0;break e;case 4:Ne=a.stateNode.containerInfo,Et=!0;break e}a=a.return}if(Ne===null)throw Error(j(160));zy(i,o,s),Ne=null,Et=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(u){ge(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)$y(t,e),t=t.sibling}function $y(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(wt(t,e),Lt(e),r&4){try{js(3,e,e.return),Ca(3,e)}catch(v){ge(e,e.return,v)}try{js(5,e,e.return)}catch(v){ge(e,e.return,v)}}break;case 1:wt(t,e),Lt(e),r&512&&n!==null&&Er(n,n.return);break;case 5:if(wt(t,e),Lt(e),r&512&&n!==null&&Er(n,n.return),e.flags&32){var s=e.stateNode;try{zs(s,"")}catch(v){ge(e,e.return,v)}}if(r&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,o=n!==null?n.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&ug(s,i),hu(a,o);var u=hu(a,i);for(o=0;o<l.length;o+=2){var c=l[o],d=l[o+1];c==="style"?pg(s,d):c==="dangerouslySetInnerHTML"?fg(s,d):c==="children"?zs(s,d):Ic(s,c,d,u)}switch(a){case"input":lu(s,i);break;case"textarea":cg(s,i);break;case"select":var f=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var g=i.value;g!=null?Nr(s,!!i.multiple,g,!1):f!==!!i.multiple&&(i.defaultValue!=null?Nr(s,!!i.multiple,i.defaultValue,!0):Nr(s,!!i.multiple,i.multiple?[]:"",!1))}s[Ys]=i}catch(v){ge(e,e.return,v)}}break;case 6:if(wt(t,e),Lt(e),r&4){if(e.stateNode===null)throw Error(j(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(v){ge(e,e.return,v)}}break;case 3:if(wt(t,e),Lt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Hs(t.containerInfo)}catch(v){ge(e,e.return,v)}break;case 4:wt(t,e),Lt(e);break;case 13:wt(t,e),Lt(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(gd=ye())),r&4&&Ch(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(Fe=(u=Fe)||c,wt(t,e),Fe=u):wt(t,e),Lt(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(F=e,c=e.child;c!==null;){for(d=F=c;F!==null;){switch(f=F,g=f.child,f.tag){case 0:case 11:case 14:case 15:js(4,f,f.return);break;case 1:Er(f,f.return);var p=f.stateNode;if(typeof p.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,p.props=t.memoizedProps,p.state=t.memoizedState,p.componentWillUnmount()}catch(v){ge(r,n,v)}}break;case 5:Er(f,f.return);break;case 22:if(f.memoizedState!==null){bh(d);continue}}g!==null?(g.return=f,F=g):bh(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{s=d.stateNode,u?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=d.stateNode,l=d.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=hg("display",o))}catch(v){ge(e,e.return,v)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(v){ge(e,e.return,v)}}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;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:wt(t,e),Lt(e),r&4&&Ch(e);break;case 21:break;default:wt(t,e),Lt(e)}}function Lt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Vy(n)){var r=n;break e}n=n.return}throw Error(j(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(zs(s,""),r.flags&=-33);var i=kh(e);Uu(e,i,s);break;case 3:case 4:var o=r.stateNode.containerInfo,a=kh(e);Bu(e,a,o);break;default:throw Error(j(161))}}catch(l){ge(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function wS(e,t,n){F=e,By(e)}function By(e,t,n){for(var r=(e.mode&1)!==0;F!==null;){var s=F,i=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||Hi;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||Fe;a=Hi;var u=Fe;if(Hi=o,(Fe=l)&&!u)for(F=s;F!==null;)o=F,l=o.child,o.tag===22&&o.memoizedState!==null?Th(s):l!==null?(l.return=o,F=l):Th(s);for(;i!==null;)F=i,By(i),i=i.sibling;F=s,Hi=a,Fe=u}Eh(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,F=i):Eh(e)}}function Eh(e){for(;F!==null;){var t=F;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Fe||Ca(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Fe)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:Ct(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&lh(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}lh(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&Hs(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(j(163))}Fe||t.flags&512&&$u(t)}catch(f){ge(t,t.return,f)}}if(t===e){F=null;break}if(n=t.sibling,n!==null){n.return=t.return,F=n;break}F=t.return}}function bh(e){for(;F!==null;){var t=F;if(t===e){F=null;break}var n=t.sibling;if(n!==null){n.return=t.return,F=n;break}F=t.return}}function Th(e){for(;F!==null;){var t=F;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Ca(4,t)}catch(l){ge(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(l){ge(t,s,l)}}var i=t.return;try{$u(t)}catch(l){ge(t,i,l)}break;case 5:var o=t.return;try{$u(t)}catch(l){ge(t,o,l)}}}catch(l){ge(t,t.return,l)}if(t===e){F=null;break}var a=t.sibling;if(a!==null){a.return=t.return,F=a;break}F=t.return}}var SS=Math.ceil,Go=sn.ReactCurrentDispatcher,pd=sn.ReactCurrentOwner,mt=sn.ReactCurrentBatchConfig,X=0,Te=null,Se=null,Ae=0,Ze=0,br=On(0),Ee=0,ti=null,rr=0,Ea=0,md=0,Ls=null,Ke=null,gd=0,Ur=1/0,Kt=null,qo=!1,Hu=null,bn=null,Wi=!1,vn=null,Yo=0,As=0,Wu=null,co=-1,fo=0;function Be(){return X&6?ye():co!==-1?co:co=ye()}function Tn(e){return e.mode&1?X&2&&Ae!==0?Ae&-Ae:sS.transition!==null?(fo===0&&(fo=Tg()),fo):(e=J,e!==0||(e=window.event,e=e===void 0?16:Og(e.type)),e):1}function Pt(e,t,n,r){if(50<As)throw As=0,Wu=null,Error(j(185));di(e,n,r),(!(X&2)||e!==Te)&&(e===Te&&(!(X&2)&&(Ea|=n),Ee===4&&gn(e,Ae)),Xe(e,r),n===1&&X===0&&!(t.mode&1)&&(Ur=ye()+500,wa&&Dn()))}function Xe(e,t){var n=e.callbackNode;s1(e,t);var r=Ao(e,e===Te?Ae:0);if(r===0)n!==null&&Mf(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Mf(n),t===1)e.tag===0?rS(Ph.bind(null,e)):Jg(Ph.bind(null,e)),Z1(function(){!(X&6)&&Dn()}),n=null;else{switch(Pg(r)){case 1:n=Bc;break;case 4:n=Eg;break;case 16:n=Lo;break;case 536870912:n=bg;break;default:n=Lo}n=Xy(n,Uy.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Uy(e,t){if(co=-1,fo=0,X&6)throw Error(j(327));var n=e.callbackNode;if(Dr()&&e.callbackNode!==n)return null;var r=Ao(e,e===Te?Ae:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Xo(e,r);else{t=r;var s=X;X|=2;var i=Wy();(Te!==e||Ae!==t)&&(Kt=null,Ur=ye()+500,Yn(e,t));do try{ES();break}catch(a){Hy(e,a)}while(!0);td(),Go.current=i,X=s,Se!==null?t=0:(Te=null,Ae=0,t=Ee)}if(t!==0){if(t===2&&(s=vu(e),s!==0&&(r=s,t=Ku(e,s))),t===1)throw n=ti,Yn(e,0),gn(e,r),Xe(e,ye()),n;if(t===6)gn(e,r);else{if(s=e.current.alternate,!(r&30)&&!kS(s)&&(t=Xo(e,r),t===2&&(i=vu(e),i!==0&&(r=i,t=Ku(e,i))),t===1))throw n=ti,Yn(e,0),gn(e,r),Xe(e,ye()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(j(345));case 2:$n(e,Ke,Kt);break;case 3:if(gn(e,r),(r&130023424)===r&&(t=gd+500-ye(),10<t)){if(Ao(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){Be(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Tu($n.bind(null,e,Ke,Kt),t);break}$n(e,Ke,Kt);break;case 4:if(gn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var o=31-Tt(r);i=1<<o,o=t[o],o>s&&(s=o),r&=~i}if(r=s,r=ye()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*SS(r/1960))-r,10<r){e.timeoutHandle=Tu($n.bind(null,e,Ke,Kt),r);break}$n(e,Ke,Kt);break;case 5:$n(e,Ke,Kt);break;default:throw Error(j(329))}}}return Xe(e,ye()),e.callbackNode===n?Uy.bind(null,e):null}function Ku(e,t){var n=Ls;return e.current.memoizedState.isDehydrated&&(Yn(e,t).flags|=256),e=Xo(e,t),e!==2&&(t=Ke,Ke=n,t!==null&&Gu(t)),e}function Gu(e){Ke===null?Ke=e:Ke.push.apply(Ke,e)}function kS(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(!Nt(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 gn(e,t){for(t&=~md,t&=~Ea,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Tt(t),r=1<<n;e[n]=-1,t&=~r}}function Ph(e){if(X&6)throw Error(j(327));Dr();var t=Ao(e,0);if(!(t&1))return Xe(e,ye()),null;var n=Xo(e,t);if(e.tag!==0&&n===2){var r=vu(e);r!==0&&(t=r,n=Ku(e,r))}if(n===1)throw n=ti,Yn(e,0),gn(e,t),Xe(e,ye()),n;if(n===6)throw Error(j(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,$n(e,Ke,Kt),Xe(e,ye()),null}function yd(e,t){var n=X;X|=1;try{return e(t)}finally{X=n,X===0&&(Ur=ye()+500,wa&&Dn())}}function sr(e){vn!==null&&vn.tag===0&&!(X&6)&&Dr();var t=X;X|=1;var n=mt.transition,r=J;try{if(mt.transition=null,J=1,e)return e()}finally{J=r,mt.transition=n,X=t,!(X&6)&&Dn()}}function vd(){Ze=br.current,le(br)}function Yn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,J1(n)),Se!==null)for(n=Se.return;n!==null;){var r=n;switch(Jc(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Io();break;case 3:$r(),le(qe),le(_e),ad();break;case 5:od(r);break;case 4:$r();break;case 13:le(de);break;case 19:le(de);break;case 10:nd(r.type._context);break;case 22:case 23:vd()}n=n.return}if(Te=e,Se=e=Pn(e.current,null),Ae=Ze=t,Ee=0,ti=null,md=Ea=rr=0,Ke=Ls=null,Hn!==null){for(t=0;t<Hn.length;t++)if(n=Hn[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}Hn=null}return e}function Hy(e,t){do{var n=Se;try{if(td(),ao.current=Ko,Wo){for(var r=fe.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Wo=!1}if(nr=0,be=Ce=fe=null,Ns=!1,Js=0,pd.current=null,n===null||n.return===null){Ee=1,ti=t,Se=null;break}e:{var i=e,o=n.return,a=n,l=t;if(t=Ae,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=a,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var g=ph(o);if(g!==null){g.flags&=-257,mh(g,o,a,i,t),g.mode&1&&hh(i,u,t),t=g,l=u;var p=t.updateQueue;if(p===null){var v=new Set;v.add(l),t.updateQueue=v}else p.add(l);break e}else{if(!(t&1)){hh(i,u,t),xd();break e}l=Error(j(426))}}else if(ce&&a.mode&1){var w=ph(o);if(w!==null){!(w.flags&65536)&&(w.flags|=256),mh(w,o,a,i,t),Zc(Br(l,a));break e}}i=l=Br(l,a),Ee!==4&&(Ee=2),Ls===null?Ls=[i]:Ls.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var m=Py(i,l,t);ah(i,m);break e;case 1:a=l;var y=i.type,x=i.stateNode;if(!(i.flags&128)&&(typeof y.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(bn===null||!bn.has(x)))){i.flags|=65536,t&=-t,i.lanes|=t;var k=Ry(i,a,t);ah(i,k);break e}}i=i.return}while(i!==null)}Gy(n)}catch(C){t=C,Se===n&&n!==null&&(Se=n=n.return);continue}break}while(!0)}function Wy(){var e=Go.current;return Go.current=Ko,e===null?Ko:e}function xd(){(Ee===0||Ee===3||Ee===2)&&(Ee=4),Te===null||!(rr&268435455)&&!(Ea&268435455)||gn(Te,Ae)}function Xo(e,t){var n=X;X|=2;var r=Wy();(Te!==e||Ae!==t)&&(Kt=null,Yn(e,t));do try{CS();break}catch(s){Hy(e,s)}while(!0);if(td(),X=n,Go.current=r,Se!==null)throw Error(j(261));return Te=null,Ae=0,Ee}function CS(){for(;Se!==null;)Ky(Se)}function ES(){for(;Se!==null&&!Yw();)Ky(Se)}function Ky(e){var t=Yy(e.alternate,e,Ze);e.memoizedProps=e.pendingProps,t===null?Gy(e):Se=t,pd.current=null}function Gy(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=yS(n,t),n!==null){n.flags&=32767,Se=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ee=6,Se=null;return}}else if(n=gS(n,t,Ze),n!==null){Se=n;return}if(t=t.sibling,t!==null){Se=t;return}Se=t=e}while(t!==null);Ee===0&&(Ee=5)}function $n(e,t,n){var r=J,s=mt.transition;try{mt.transition=null,J=1,bS(e,t,n,r)}finally{mt.transition=s,J=r}return null}function bS(e,t,n,r){do Dr();while(vn!==null);if(X&6)throw Error(j(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(j(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(i1(e,i),e===Te&&(Se=Te=null,Ae=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Wi||(Wi=!0,Xy(Lo,function(){return Dr(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=mt.transition,mt.transition=null;var o=J;J=1;var a=X;X|=4,pd.current=null,xS(e,n),$y(n,e),W1(Eu),Oo=!!Cu,Eu=Cu=null,e.current=n,wS(n),Xw(),X=a,J=o,mt.transition=i}else e.current=n;if(Wi&&(Wi=!1,vn=e,Yo=s),i=e.pendingLanes,i===0&&(bn=null),Zw(n.stateNode),Xe(e,ye()),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(qo)throw qo=!1,e=Hu,Hu=null,e;return Yo&1&&e.tag!==0&&Dr(),i=e.pendingLanes,i&1?e===Wu?As++:(As=0,Wu=e):As=0,Dn(),null}function Dr(){if(vn!==null){var e=Pg(Yo),t=mt.transition,n=J;try{if(mt.transition=null,J=16>e?16:e,vn===null)var r=!1;else{if(e=vn,vn=null,Yo=0,X&6)throw Error(j(331));var s=X;for(X|=4,F=e.current;F!==null;){var i=F,o=i.child;if(F.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(F=u;F!==null;){var c=F;switch(c.tag){case 0:case 11:case 15:js(8,c,i)}var d=c.child;if(d!==null)d.return=c,F=d;else for(;F!==null;){c=F;var f=c.sibling,g=c.return;if(_y(c),c===u){F=null;break}if(f!==null){f.return=g,F=f;break}F=g}}}var p=i.alternate;if(p!==null){var v=p.child;if(v!==null){p.child=null;do{var w=v.sibling;v.sibling=null,v=w}while(v!==null)}}F=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,F=o;else e:for(;F!==null;){if(i=F,i.flags&2048)switch(i.tag){case 0:case 11:case 15:js(9,i,i.return)}var m=i.sibling;if(m!==null){m.return=i.return,F=m;break e}F=i.return}}var y=e.current;for(F=y;F!==null;){o=F;var x=o.child;if(o.subtreeFlags&2064&&x!==null)x.return=o,F=x;else e:for(o=y;F!==null;){if(a=F,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Ca(9,a)}}catch(C){ge(a,a.return,C)}if(a===o){F=null;break e}var k=a.sibling;if(k!==null){k.return=a.return,F=k;break e}F=a.return}}if(X=s,Dn(),It&&typeof It.onPostCommitFiberRoot=="function")try{It.onPostCommitFiberRoot(ma,e)}catch{}r=!0}return r}finally{J=n,mt.transition=t}}return!1}function Rh(e,t,n){t=Br(n,t),t=Py(e,t,1),e=En(e,t,1),t=Be(),e!==null&&(di(e,1,t),Xe(e,t))}function ge(e,t,n){if(e.tag===3)Rh(e,e,n);else for(;t!==null;){if(t.tag===3){Rh(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(bn===null||!bn.has(r))){e=Br(n,e),e=Ry(t,e,1),t=En(t,e,1),e=Be(),t!==null&&(di(t,1,e),Xe(t,e));break}}t=t.return}}function TS(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Be(),e.pingedLanes|=e.suspendedLanes&n,Te===e&&(Ae&n)===n&&(Ee===4||Ee===3&&(Ae&130023424)===Ae&&500>ye()-gd?Yn(e,0):md|=n),Xe(e,t)}function qy(e,t){t===0&&(e.mode&1?(t=Mi,Mi<<=1,!(Mi&130023424)&&(Mi=4194304)):t=1);var n=Be();e=tn(e,t),e!==null&&(di(e,t,n),Xe(e,n))}function PS(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qy(e,n)}function RS(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(j(314))}r!==null&&r.delete(t),qy(e,n)}var Yy;Yy=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||qe.current)Ge=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ge=!1,mS(e,t,n);Ge=!!(e.flags&131072)}else Ge=!1,ce&&t.flags&1048576&&Zg(t,zo,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;uo(e,t),e=t.pendingProps;var s=_r(t,_e.current);Or(t,n),s=ud(null,t,r,e,s,n);var i=cd();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,Ye(r)?(i=!0,_o(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,sd(t),s.updater=ka,t.stateNode=s,s._reactInternals=t,Ou(t,r,e,n),t=Fu(null,t,r,!0,i,n)):(t.tag=0,ce&&i&&Qc(t),Ve(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(uo(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=jS(r),e=Ct(r,e),s){case 0:t=Mu(null,t,r,e,n);break e;case 1:t=vh(null,t,r,e,n);break e;case 11:t=gh(null,t,r,e,n);break e;case 14:t=yh(null,t,r,Ct(r.type,e),n);break e}throw Error(j(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Ct(r,s),Mu(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Ct(r,s),vh(e,t,r,s,n);case 3:e:{if(Ay(t),e===null)throw Error(j(387));r=t.pendingProps,i=t.memoizedState,s=i.element,iy(e,t),Uo(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=Br(Error(j(423)),t),t=xh(e,t,r,n,s);break e}else if(r!==s){s=Br(Error(j(424)),t),t=xh(e,t,r,n,s);break e}else for(et=Cn(t.stateNode.containerInfo.firstChild),tt=t,ce=!0,bt=null,n=ry(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Vr(),r===s){t=nn(e,t,n);break e}Ve(e,t,r,n)}t=t.child}return t;case 5:return oy(t),e===null&&ju(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,bu(r,s)?o=null:i!==null&&bu(r,i)&&(t.flags|=32),Ly(e,t),Ve(e,t,o,n),t.child;case 6:return e===null&&ju(t),null;case 13:return Oy(e,t,n);case 4:return id(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=zr(t,null,r,n):Ve(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Ct(r,s),gh(e,t,r,s,n);case 7:return Ve(e,t,t.pendingProps,n),t.child;case 8:return Ve(e,t,t.pendingProps.children,n),t.child;case 12:return Ve(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,se($o,r._currentValue),r._currentValue=o,i!==null)if(Nt(i.value,o)){if(i.children===s.children&&!qe.current){t=nn(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 l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=Xt(-1,n&-n),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Lu(i.return,n,t),a.lanes|=n;break}l=l.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(j(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Lu(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}Ve(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Or(t,n),s=yt(s),r=r(s),t.flags|=1,Ve(e,t,r,n),t.child;case 14:return r=t.type,s=Ct(r,t.pendingProps),s=Ct(r.type,s),yh(e,t,r,s,n);case 15:return Ny(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Ct(r,s),uo(e,t),t.tag=1,Ye(r)?(e=!0,_o(t)):e=!1,Or(t,n),Ty(t,r,s),Ou(t,r,s,n),Fu(null,t,r,!0,e,n);case 19:return Dy(e,t,n);case 22:return jy(e,t,n)}throw Error(j(156,t.tag))};function Xy(e,t){return Cg(e,t)}function NS(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 ht(e,t,n,r){return new NS(e,t,n,r)}function wd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function jS(e){if(typeof e=="function")return wd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Vc)return 11;if(e===zc)return 14}return 2}function Pn(e,t){var n=e.alternate;return n===null?(n=ht(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 ho(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")wd(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case mr:return Xn(n.children,s,i,t);case _c:o=8,s|=8;break;case ru:return e=ht(12,n,t,s|2),e.elementType=ru,e.lanes=i,e;case su:return e=ht(13,n,t,s),e.elementType=su,e.lanes=i,e;case iu:return e=ht(19,n,t,s),e.elementType=iu,e.lanes=i,e;case og:return ba(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case sg:o=10;break e;case ig:o=9;break e;case Vc:o=11;break e;case zc:o=14;break e;case hn:o=16,r=null;break e}throw Error(j(130,e==null?e:typeof e,""))}return t=ht(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function Xn(e,t,n,r){return e=ht(7,e,r,t),e.lanes=n,e}function ba(e,t,n,r){return e=ht(22,e,r,t),e.elementType=og,e.lanes=n,e.stateNode={isHidden:!1},e}function wl(e,t,n){return e=ht(6,e,null,t),e.lanes=n,e}function Sl(e,t,n){return t=ht(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function LS(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=tl(0),this.expirationTimes=tl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=tl(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Sd(e,t,n,r,s,i,o,a,l){return e=new LS(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=ht(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},sd(i),e}function AS(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:pr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Qy(e){if(!e)return Nn;e=e._reactInternals;e:{if(ur(e)!==e||e.tag!==1)throw Error(j(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ye(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(j(171))}if(e.tag===1){var n=e.type;if(Ye(n))return Qg(e,n,t)}return t}function Jy(e,t,n,r,s,i,o,a,l){return e=Sd(n,r,!0,e,s,i,o,a,l),e.context=Qy(null),n=e.current,r=Be(),s=Tn(n),i=Xt(r,s),i.callback=t??null,En(n,i,s),e.current.lanes=s,di(e,s,r),Xe(e,r),e}function Ta(e,t,n,r){var s=t.current,i=Be(),o=Tn(s);return n=Qy(n),t.context===null?t.context=n:t.pendingContext=n,t=Xt(i,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=En(s,t,o),e!==null&&(Pt(e,s,o,i),oo(e,s,o)),o}function Qo(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 Nh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function kd(e,t){Nh(e,t),(e=e.alternate)&&Nh(e,t)}function OS(){return null}var Zy=typeof reportError=="function"?reportError:function(e){console.error(e)};function Cd(e){this._internalRoot=e}Pa.prototype.render=Cd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(j(409));Ta(e,t,null,null)};Pa.prototype.unmount=Cd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;sr(function(){Ta(null,e,null,null)}),t[en]=null}};function Pa(e){this._internalRoot=e}Pa.prototype.unstable_scheduleHydration=function(e){if(e){var t=jg();e={blockedOn:null,target:e,priority:t};for(var n=0;n<mn.length&&t!==0&&t<mn[n].priority;n++);mn.splice(n,0,e),n===0&&Ag(e)}};function Ed(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ra(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function jh(){}function DS(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var u=Qo(o);i.call(u)}}var o=Jy(t,r,e,0,null,!1,!1,"",jh);return e._reactRootContainer=o,e[en]=o.current,Gs(e.nodeType===8?e.parentNode:e),sr(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var u=Qo(l);a.call(u)}}var l=Sd(e,0,!1,null,null,!1,!1,"",jh);return e._reactRootContainer=l,e[en]=l.current,Gs(e.nodeType===8?e.parentNode:e),sr(function(){Ta(t,l,n,r)}),l}function Na(e,t,n,r,s){var i=n._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=Qo(o);a.call(l)}}Ta(t,o,e,s)}else o=DS(n,t,e,s,r);return Qo(o)}Rg=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Ss(t.pendingLanes);n!==0&&(Uc(t,n|1),Xe(t,ye()),!(X&6)&&(Ur=ye()+500,Dn()))}break;case 13:sr(function(){var r=tn(e,1);if(r!==null){var s=Be();Pt(r,e,1,s)}}),kd(e,1)}};Hc=function(e){if(e.tag===13){var t=tn(e,134217728);if(t!==null){var n=Be();Pt(t,e,134217728,n)}kd(e,134217728)}};Ng=function(e){if(e.tag===13){var t=Tn(e),n=tn(e,t);if(n!==null){var r=Be();Pt(n,e,t,r)}kd(e,t)}};jg=function(){return J};Lg=function(e,t){var n=J;try{return J=e,t()}finally{J=n}};mu=function(e,t,n){switch(t){case"input":if(lu(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=xa(r);if(!s)throw Error(j(90));lg(r),lu(r,s)}}}break;case"textarea":cg(e,n);break;case"select":t=n.value,t!=null&&Nr(e,!!n.multiple,t,!1)}};yg=yd;vg=sr;var MS={usingClientEntryPoint:!1,Events:[hi,xr,xa,mg,gg,yd]},fs={findFiberByHostInstance:Un,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},FS={bundleType:fs.bundleType,version:fs.version,rendererPackageName:fs.rendererPackageName,rendererConfig:fs.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:sn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Sg(e),e===null?null:e.stateNode},findFiberByHostInstance:fs.findFiberByHostInstance||OS,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 Ki=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ki.isDisabled&&Ki.supportsFiber)try{ma=Ki.inject(FS),It=Ki}catch{}}st.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=MS;st.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ed(t))throw Error(j(200));return AS(e,t,null,n)};st.createRoot=function(e,t){if(!Ed(e))throw Error(j(299));var n=!1,r="",s=Zy;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Sd(e,1,!1,null,null,n,!1,r,s),e[en]=t.current,Gs(e.nodeType===8?e.parentNode:e),new Cd(t)};st.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(j(188)):(e=Object.keys(e).join(","),Error(j(268,e)));return e=Sg(t),e=e===null?null:e.stateNode,e};st.flushSync=function(e){return sr(e)};st.hydrate=function(e,t,n){if(!Ra(t))throw Error(j(200));return Na(null,e,t,!0,n)};st.hydrateRoot=function(e,t,n){if(!Ed(e))throw Error(j(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",o=Zy;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Jy(t,null,e,1,n??null,s,!1,i,o),e[en]=t.current,Gs(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 Pa(t)};st.render=function(e,t,n){if(!Ra(t))throw Error(j(200));return Na(null,e,t,!1,n)};st.unmountComponentAtNode=function(e){if(!Ra(e))throw Error(j(40));return e._reactRootContainer?(sr(function(){Na(null,null,e,!1,function(){e._reactRootContainer=null,e[en]=null})}),!0):!1};st.unstable_batchedUpdates=yd;st.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ra(n))throw Error(j(200));if(e==null||e._reactInternals===void 0)throw Error(j(38));return Na(e,t,n,!1,r)};st.version="18.3.1-next-f1338f8080-20240426";function ev(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ev)}catch(e){console.error(e)}}ev(),eg.exports=st;var IS=eg.exports,tv,Lh=IS;tv=Lh.createRoot,Lh.hydrateRoot;var kl={};const W=e=>typeof e=="string",hs=()=>{let e,t;const n=new Promise((r,s)=>{e=r,t=s});return n.resolve=e,n.reject=t,n},Ah=e=>e==null?"":""+e,_S=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},VS=/###/g,Oh=e=>e&&e.indexOf("###")>-1?e.replace(VS,"."):e,Dh=e=>!e||W(e),Os=(e,t,n)=>{const r=W(t)?t.split("."):t;let s=0;for(;s<r.length-1;){if(Dh(e))return{};const i=Oh(r[s]);!e[i]&&n&&(e[i]=new n),Object.prototype.hasOwnProperty.call(e,i)?e=e[i]:e={},++s}return Dh(e)?{}:{obj:e,k:Oh(r[s])}},Mh=(e,t,n)=>{const{obj:r,k:s}=Os(e,t,Object);if(r!==void 0||t.length===1){r[s]=n;return}let i=t[t.length-1],o=t.slice(0,t.length-1),a=Os(e,o,Object);for(;a.obj===void 0&&o.length;)i=`${o[o.length-1]}.${i}`,o=o.slice(0,o.length-1),a=Os(e,o,Object),a!=null&&a.obj&&typeof a.obj[`${a.k}.${i}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${i}`]=n},zS=(e,t,n,r)=>{const{obj:s,k:i}=Os(e,t,Object);s[i]=s[i]||[],s[i].push(n)},Jo=(e,t)=>{const{obj:n,k:r}=Os(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},$S=(e,t,n)=>{const r=Jo(e,n);return r!==void 0?r:Jo(t,n)},nv=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?W(e[r])||e[r]instanceof String||W(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):nv(e[r],t[r],n):e[r]=t[r]);return e},_n=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var BS={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const US=e=>W(e)?e.replace(/[&<>"'\/]/g,t=>BS[t]):e;class HS{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const WS=[" ",",","?","!",";"],KS=new HS(20),GS=(e,t,n)=>{t=t||"",n=n||"";const r=WS.filter(o=>t.indexOf(o)<0&&n.indexOf(o)<0);if(r.length===0)return!0;const s=KS.getRegExp(`(${r.map(o=>o==="?"?"\\?":o).join("|")})`);let i=!s.test(e);if(!i){const o=e.indexOf(n);o>0&&!s.test(e.substring(0,o))&&(i=!0)}return i},qu=(e,t,n=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let s=e;for(let i=0;i<r.length;){if(!s||typeof s!="object")return;let o,a="";for(let l=i;l<r.length;++l)if(l!==i&&(a+=n),a+=r[l],o=s[a],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&l<r.length-1)continue;i+=l-i+1;break}s=o}return s},ni=e=>e==null?void 0:e.replace(/_/g,"-"),qS={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var n,r;(r=(n=console==null?void 0:console[e])==null?void 0:n.apply)==null||r.call(n,console,t)}};class Zo{constructor(t,n={}){this.init(t,n)}init(t,n={}){this.prefix=n.prefix||"i18next:",this.logger=t||qS,this.options=n,this.debug=n.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,s){return s&&!this.debug?null:(W(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new Zo(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Zo(this.logger,t)}}var Ft=new Zo;class ja{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const s=this.observers[r].get(n)||0;this.observers[r].set(n,s+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t,...n){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([s,i])=>{for(let o=0;o<i;o++)s(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,i])=>{for(let o=0;o<i;o++)s.apply(s,[t,...n])})}}class Fh extends ja{constructor(t,n={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r,s={}){var u,c;const i=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,o=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.indexOf(".")>-1?a=t.split("."):(a=[t,n],r&&(Array.isArray(r)?a.push(...r):W(r)&&i?a.push(...r.split(i)):a.push(r)));const l=Jo(this.data,a);return!l&&!n&&!r&&t.indexOf(".")>-1&&(t=a[0],n=a[1],r=a.slice(2).join(".")),l||!o||!W(r)?l:qu((c=(u=this.data)==null?void 0:u[t])==null?void 0:c[n],r,i)}addResource(t,n,r,s,i={silent:!1}){const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let a=[t,n];r&&(a=a.concat(o?r.split(o):r)),t.indexOf(".")>-1&&(a=t.split("."),s=n,n=a[1]),this.addNamespaces(n),Mh(this.data,a,s),i.silent||this.emit("added",t,n,r,s)}addResources(t,n,r,s={silent:!1}){for(const i in r)(W(r[i])||Array.isArray(r[i]))&&this.addResource(t,n,i,r[i],{silent:!0});s.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,s,i,o={silent:!1,skipCopy:!1}){let a=[t,n];t.indexOf(".")>-1&&(a=t.split("."),s=r,r=n,n=a[1]),this.addNamespaces(n);let l=Jo(this.data,a)||{};o.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?nv(l,r,i):l={...l,...r},Mh(this.data,a,l),o.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(s=>n[s]&&Object.keys(n[s]).length>0)}toJSON(){return this.data}}var rv={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,s){return e.forEach(i=>{var o;t=((o=this.processors[i])==null?void 0:o.process(t,n,r,s))??t}),t}};const sv=Symbol("i18next/PATH_KEY");function YS(){const e=[],t=Object.create(null);let n;return t.get=(r,s)=>{var i;return(i=n==null?void 0:n.revoke)==null||i.call(n),s===sv?e:(e.push(s),n=Proxy.revocable(r,t),n.proxy)},Proxy.revocable(Object.create(null),t).proxy}function Mr(e,t){const{[sv]:n}=e(YS()),r=(t==null?void 0:t.keySeparator)??".",s=(t==null?void 0:t.nsSeparator)??":";if(n.length>1&&s){const i=t==null?void 0:t.ns,o=Array.isArray(i)?i:null;if(o&&o.length>1&&o.slice(1).includes(n[0]))return`${n[0]}${s}${n.slice(1).join(r)}`}return n.join(r)}const Ih={},Cl=e=>!W(e)&&typeof e!="boolean"&&typeof e!="number";class ea extends ja{constructor(t,n={}){super(),_S(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Ft.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,n={interpolation:{}}){const r={...n};if(t==null)return!1;const s=this.resolve(t,r);if((s==null?void 0:s.res)===void 0)return!1;const i=Cl(s.res);return!(r.returnObjects===!1&&i)}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const o=r&&t.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!GS(t,r,s);if(o&&!a){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:W(i)?[i]:i};const u=t.split(r);(r!==s||r===s&&this.options.ns.indexOf(u[0])>-1)&&(i=u.shift()),t=u.join(s)}return{key:t,namespaces:W(i)?[i]:i}}translate(t,n,r){let s=typeof n=="object"?{...n}:n;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof s=="object"&&(s={...s}),s||(s={}),t==null)return"";typeof t=="function"&&(t=Mr(t,{...this.options,...s})),Array.isArray(t)||(t=[String(t)]),t=t.map(M=>typeof M=="function"?Mr(M,{...this.options,...s}):String(M));const i=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:a,namespaces:l}=this.extractFromKey(t[t.length-1],s),u=l[l.length-1];let c=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;c===void 0&&(c=":");const d=s.lng||this.language,f=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((d==null?void 0:d.toLowerCase())==="cimode")return f?i?{res:`${u}${c}${a}`,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:u,usedParams:this.getUsedParamsDetails(s)}:`${u}${c}${a}`:i?{res:a,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:u,usedParams:this.getUsedParamsDetails(s)}:a;const g=this.resolve(t,s);let p=g==null?void 0:g.res;const v=(g==null?void 0:g.usedKey)||a,w=(g==null?void 0:g.exactUsedKey)||a,m=["[object Number]","[object Function]","[object RegExp]"],y=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,k=s.count!==void 0&&!W(s.count),C=ea.hasDefaultValue(s),b=k?this.pluralResolver.getSuffix(d,s.count,s):"",T=s.ordinal&&k?this.pluralResolver.getSuffix(d,s.count,{ordinal:!1}):"",P=k&&!s.ordinal&&s.count===0,L=P&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${b}`]||s[`defaultValue${T}`]||s.defaultValue;let R=p;x&&!p&&C&&(R=L);const B=Cl(R),A=Object.prototype.toString.apply(R);if(x&&R&&B&&m.indexOf(A)<0&&!(W(y)&&Array.isArray(R))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const M=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,R,{...s,ns:l}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(g.res=M,g.usedParams=this.getUsedParamsDetails(s),g):M}if(o){const M=Array.isArray(R),_=M?[]:{},U=M?w:v;for(const z in R)if(Object.prototype.hasOwnProperty.call(R,z)){const Z=`${U}${o}${z}`;C&&!p?_[z]=this.translate(Z,{...s,defaultValue:Cl(L)?L[z]:void 0,joinArrays:!1,ns:l}):_[z]=this.translate(Z,{...s,joinArrays:!1,ns:l}),_[z]===Z&&(_[z]=R[z])}p=_}}else if(x&&W(y)&&Array.isArray(p))p=p.join(y),p&&(p=this.extendTranslation(p,t,s,r));else{let M=!1,_=!1;!this.isValidLookup(p)&&C&&(M=!0,p=L),this.isValidLookup(p)||(_=!0,p=a);const z=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&_?void 0:p,Z=C&&L!==p&&this.options.updateMissing;if(_||M||Z){if(this.logger.log(Z?"updateKey":"missingKey",d,u,a,Z?L:p),o){const V=this.resolve(a,{...s,keySeparator:!1});V&&V.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let N=[];const D=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&D&&D[0])for(let V=0;V<D.length;V++)N.push(D[V]);else this.options.saveMissingTo==="all"?N=this.languageUtils.toResolveHierarchy(s.lng||this.language):N.push(s.lng||this.language);const $=(V,G,Pe)=>{var at;const Re=C&&Pe!==p?Pe:z;this.options.missingKeyHandler?this.options.missingKeyHandler(V,u,G,Re,Z,s):(at=this.backendConnector)!=null&&at.saveMissing&&this.backendConnector.saveMissing(V,u,G,Re,Z,s),this.emit("missingKey",V,u,G,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&k?N.forEach(V=>{const G=this.pluralResolver.getSuffixes(V,s);P&&s[`defaultValue${this.options.pluralSeparator}zero`]&&G.indexOf(`${this.options.pluralSeparator}zero`)<0&&G.push(`${this.options.pluralSeparator}zero`),G.forEach(Pe=>{$([V],a+Pe,s[`defaultValue${Pe}`]||L)})}):$(N,a,L))}p=this.extendTranslation(p,t,s,g,r),_&&p===a&&this.options.appendNamespaceToMissingKey&&(p=`${u}${c}${a}`),(_||M)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${c}${a}`:a,M?p:void 0,s))}return i?(g.res=p,g.usedParams=this.getUsedParamsDetails(s),g):p}extendTranslation(t,n,r,s,i){var l,u;if((l=this.i18nFormat)!=null&&l.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const c=W(t)&&(((u=r==null?void 0:r.interpolation)==null?void 0:u.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(c){const g=t.match(this.interpolator.nestingRegexp);d=g&&g.length}let f=r.replace&&!W(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),t=this.interpolator.interpolate(t,f,r.lng||this.language||s.usedLng,r),c){const g=t.match(this.interpolator.nestingRegexp),p=g&&g.length;d<p&&(r.nest=!1)}!r.lng&&s&&s.res&&(r.lng=this.language||s.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,(...g)=>(i==null?void 0:i[0])===g[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${g[0]} in key: ${n[0]}`),null):this.translate(...g,n),r)),r.interpolation&&this.interpolator.reset()}const o=r.postProcess||this.options.postProcess,a=W(o)?[o]:o;return t!=null&&(a!=null&&a.length)&&r.applyPostProcessor!==!1&&(t=rv.handle(a,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t,n={}){let r,s,i,o,a;return W(t)&&(t=[t]),Array.isArray(t)&&(t=t.map(l=>typeof l=="function"?Mr(l,{...this.options,...n}):l)),t.forEach(l=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(l,n),c=u.key;s=c;let d=u.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=n.count!==void 0&&!W(n.count),g=f&&!n.ordinal&&n.count===0,p=n.context!==void 0&&(W(n.context)||typeof n.context=="number")&&n.context!=="",v=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(w=>{var m,y;this.isValidLookup(r)||(a=w,!Ih[`${v[0]}-${w}`]&&((m=this.utils)!=null&&m.hasLoadedNamespace)&&!((y=this.utils)!=null&&y.hasLoadedNamespace(a))&&(Ih[`${v[0]}-${w}`]=!0,this.logger.warn(`key "${s}" for languages "${v.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),v.forEach(x=>{var b;if(this.isValidLookup(r))return;o=x;const k=[c];if((b=this.i18nFormat)!=null&&b.addLookupKeys)this.i18nFormat.addLookupKeys(k,c,x,w,n);else{let T;f&&(T=this.pluralResolver.getSuffix(x,n.count,n));const P=`${this.options.pluralSeparator}zero`,L=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(n.ordinal&&T.indexOf(L)===0&&k.push(c+T.replace(L,this.options.pluralSeparator)),k.push(c+T),g&&k.push(c+P)),p){const R=`${c}${this.options.contextSeparator||"_"}${n.context}`;k.push(R),f&&(n.ordinal&&T.indexOf(L)===0&&k.push(R+T.replace(L,this.options.pluralSeparator)),k.push(R+T),g&&k.push(R+P))}}let C;for(;C=k.pop();)this.isValidLookup(r)||(i=C,r=this.getResource(x,w,C,n))}))})}),{res:r,usedKey:s,exactUsedKey:i,usedLng:o,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r,s={}){var i;return(i=this.i18nFormat)!=null&&i.getResource?this.i18nFormat.getResource(t,n,r,s):this.resourceStore.getResource(t,n,r,s)}getUsedParamsDetails(t={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!W(t.replace);let s=r?t.replace:t;if(r&&typeof t.count<"u"&&(s.count=t.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!r){s={...s};for(const i of n)delete s[i]}return s}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}class _h{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Ft.create("languageUtils")}getScriptPartFromCode(t){if(t=ni(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=ni(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(W(t)&&t.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const s=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(s))&&(n=s)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const s=this.getScriptPartFromCode(r);if(this.isSupportedCode(s))return n=s;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(o=>{if(o===i)return o;if(!(o.indexOf("-")<0&&i.indexOf("-")<0)&&(o.indexOf("-")>0&&i.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===i||o.indexOf(i)===0&&i.length>1))return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),W(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],t),s=[],i=o=>{o&&(this.isSupportedCode(o)?s.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return W(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(t))):W(t)&&i(this.formatLanguageCode(t)),r.forEach(o=>{s.indexOf(o)<0&&i(this.formatLanguageCode(o))}),s}}const Vh={zero:0,one:1,two:2,few:3,many:4,other:5},zh={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class XS{constructor(t,n={}){this.languageUtils=t,this.options=n,this.logger=Ft.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,n={}){const r=ni(t==="dev"?"en":t),s=n.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:s});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let o;try{o=new Intl.PluralRules(r,{type:s})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),zh;if(!t.match(/-|_/))return zh;const l=this.languageUtils.getLanguagePartFromCode(t);o=this.getRule(l,n)}return this.pluralRulesCache[i]=o,o}needsPlural(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,n,r={}){return this.getSuffixes(t,r).map(s=>`${n}${s}`)}getSuffixes(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((s,i)=>Vh[s]-Vh[i]).map(s=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(t,n,r={}){const s=this.getRule(t,r);return s?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const $h=(e,t,n,r=".",s=!0)=>{let i=$S(e,t,n);return!i&&s&&W(n)&&(i=qu(e,n,r),i===void 0&&(i=qu(t,n,r))),i},El=e=>e.replace(/\$/g,"$$$$");class Bh{constructor(t={}){var n;this.logger=Ft.create("interpolator"),this.options=t,this.format=((n=t==null?void 0:t.interpolation)==null?void 0:n.format)||(r=>r),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:s,prefix:i,prefixEscaped:o,suffix:a,suffixEscaped:l,formatSeparator:u,unescapeSuffix:c,unescapePrefix:d,nestingPrefix:f,nestingPrefixEscaped:g,nestingSuffix:p,nestingSuffixEscaped:v,nestingOptionsSeparator:w,maxReplaces:m,alwaysFormat:y}=t.interpolation;this.escape=n!==void 0?n:US,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=i?_n(i):o||"{{",this.suffix=a?_n(a):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=c?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=f?_n(f):g||_n("$t("),this.nestingSuffix=p?_n(p):v||_n(")"),this.nestingOptionsSeparator=w||",",this.maxReplaces=m||1e3,this.alwaysFormat=y!==void 0?y:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>(n==null?void 0:n.source)===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,n,r,s){var g;let i,o,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=p=>{if(p.indexOf(this.formatSeparator)<0){const y=$h(n,l,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(y,void 0,r,{...s,...n,interpolationkey:p}):y}const v=p.split(this.formatSeparator),w=v.shift().trim(),m=v.join(this.formatSeparator).trim();return this.format($h(n,l,w,this.options.keySeparator,this.options.ignoreJSONStructure),m,r,{...s,...n,interpolationkey:w})};this.resetRegExp();const c=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,d=((g=s==null?void 0:s.interpolation)==null?void 0:g.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>El(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?El(this.escape(p)):El(p)}].forEach(p=>{for(a=0;i=p.regex.exec(t);){const v=i[1].trim();if(o=u(v),o===void 0)if(typeof c=="function"){const m=c(t,i,s);o=W(m)?m:""}else if(s&&Object.prototype.hasOwnProperty.call(s,v))o="";else if(d){o=i[0];continue}else this.logger.warn(`missed to pass in variable ${v} for interpolating ${t}`),o="";else!W(o)&&!this.useRawValueToEscape&&(o=Ah(o));const w=p.safeValue(o);if(t=t.replace(i[0],w),d?(p.regex.lastIndex+=o.length,p.regex.lastIndex-=i[0].length):p.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,n,r={}){let s,i,o;const a=(l,u)=>{const c=this.nestingOptionsSeparator;if(l.indexOf(c)<0)return l;const d=l.split(new RegExp(`${_n(c)}[ ]*{`));let f=`{${d[1]}`;l=d[0],f=this.interpolate(f,o);const g=f.match(/'/g),p=f.match(/"/g);(((g==null?void 0:g.length)??0)%2===0&&!p||((p==null?void 0:p.length)??0)%2!==0)&&(f=f.replace(/'/g,'"'));try{o=JSON.parse(f),u&&(o={...u,...o})}catch(v){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,v),`${l}${c}${f}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,l};for(;s=this.nestingRegexp.exec(t);){let l=[];o={...r},o=o.replace&&!W(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;const u=/{.*}/.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(u!==-1&&(l=s[1].slice(u).split(this.formatSeparator).map(c=>c.trim()).filter(Boolean),s[1]=s[1].slice(0,u)),i=n(a.call(this,s[1].trim(),o),o),i&&s[0]===t&&!W(i))return i;W(i)||(i=Ah(i)),i||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${t}`),i=""),l.length&&(i=l.reduce((c,d)=>this.format(c,d,r.lng,{...r,interpolationkey:s[1].trim()}),i.trim())),t=t.replace(s[0],i),this.regexp.lastIndex=0}return t}}const QS=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const s=r[1].substring(0,r[1].length-1);t==="currency"&&s.indexOf(":")<0?n.currency||(n.currency=s.trim()):t==="relativetime"&&s.indexOf(":")<0?n.range||(n.range=s.trim()):s.split(";").forEach(o=>{if(o){const[a,...l]=o.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),c=a.trim();n[c]||(n[c]=u),u==="false"&&(n[c]=!1),u==="true"&&(n[c]=!0),isNaN(u)||(n[c]=parseInt(u,10))}})}return{formatName:t,formatOptions:n}},Uh=e=>{const t={};return(n,r,s)=>{let i=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(i={...i,[s.interpolationkey]:void 0});const o=r+JSON.stringify(i);let a=t[o];return a||(a=e(ni(r),s),t[o]=a),a(n)}},JS=e=>(t,n,r)=>e(ni(n),r)(t);class ZS{constructor(t={}){this.logger=Ft.create("formatter"),this.options=t,this.init(t)}init(t,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const r=n.cacheInBuiltFormats?Uh:JS;this.formats={number:r((s,i)=>{const o=new Intl.NumberFormat(s,{...i});return a=>o.format(a)}),currency:r((s,i)=>{const o=new Intl.NumberFormat(s,{...i,style:"currency"});return a=>o.format(a)}),datetime:r((s,i)=>{const o=new Intl.DateTimeFormat(s,{...i});return a=>o.format(a)}),relativetime:r((s,i)=>{const o=new Intl.RelativeTimeFormat(s,{...i});return a=>o.format(a,i.range||"day")}),list:r((s,i)=>{const o=new Intl.ListFormat(s,{...i});return a=>o.format(a)})}}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Uh(n)}format(t,n,r,s={}){const i=n.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(a=>a.indexOf(")")>-1)){const a=i.findIndex(l=>l.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,a)].join(this.formatSeparator)}return i.reduce((a,l)=>{var d;const{formatName:u,formatOptions:c}=QS(l);if(this.formats[u]){let f=a;try{const g=((d=s==null?void 0:s.formatParams)==null?void 0:d[s.interpolationkey])||{},p=g.locale||g.lng||s.locale||s.lng||r;f=this.formats[u](a,p,{...c,...s,...g})}catch(g){this.logger.warn(g)}return f}else this.logger.warn(`there was no format function for ${u}`);return a},t)}}const ek=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class tk extends ja{constructor(t,n,r,s={}){var i,o;super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=s,this.logger=Ft.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],(o=(i=this.backend)==null?void 0:i.init)==null||o.call(i,r,s.backend,s)}queueLoad(t,n,r,s){const i={},o={},a={},l={};return t.forEach(u=>{let c=!0;n.forEach(d=>{const f=`${u}|${d}`;!r.reload&&this.store.hasResourceBundle(u,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?o[f]===void 0&&(o[f]=!0):(this.state[f]=1,c=!1,o[f]===void 0&&(o[f]=!0),i[f]===void 0&&(i[f]=!0),l[d]===void 0&&(l[d]=!0)))}),c||(a[u]=!0)}),(Object.keys(i).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(i),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(t,n,r){const s=t.split("|"),i=s[0],o=s[1];n&&this.emit("failedLoading",i,o,n),!n&&r&&this.store.addResourceBundle(i,o,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const a={};this.queue.forEach(l=>{zS(l.loaded,[i],o),ek(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{a[u]||(a[u]={});const c=l.loaded[u];c.length&&c.forEach(d=>{a[u][d]===void 0&&(a[u][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(l=>!l.done)}read(t,n,r,s=0,i=this.retryTimeout,o){if(!t.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:s,wait:i,callback:o});return}this.readingCalls++;const a=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(u&&c&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,s+1,i*2,o)},i);return}o(u,c)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const u=l(t,n);u&&typeof u.then=="function"?u.then(c=>a(null,c)).catch(a):a(null,u)}catch(u){a(u)}return}return l(t,n,a)}prepareLoading(t,n,r={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();W(t)&&(t=this.languageUtils.toResolveHierarchy(t)),W(n)&&(n=[n]);const i=this.queueLoad(t,n,r,s);if(!i.toLoad.length)return i.pending.length||s(),null;i.toLoad.forEach(o=>{this.loadOne(o)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t,n=""){const r=t.split("|"),s=r[0],i=r[1];this.read(s,i,"read",void 0,void 0,(o,a)=>{o&&this.logger.warn(`${n}loading namespace ${i} for language ${s} failed`,o),!o&&a&&this.logger.log(`${n}loaded namespace ${i} for language ${s}`,a),this.loaded(t,o,a)})}saveMissing(t,n,r,s,i,o={},a=()=>{}){var l,u,c,d,f;if((u=(l=this.services)==null?void 0:l.utils)!=null&&u.hasLoadedNamespace&&!((d=(c=this.services)==null?void 0:c.utils)!=null&&d.hasLoadedNamespace(n))){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((f=this.backend)!=null&&f.create){const g={...o,isUpdate:i},p=this.backend.create.bind(this.backend);if(p.length<6)try{let v;p.length===5?v=p(t,n,r,s,g):v=p(t,n,r,s),v&&typeof v.then=="function"?v.then(w=>a(null,w)).catch(a):a(null,v)}catch(v){a(v)}else p(t,n,r,s,a,g)}!t||!t[0]||this.store.addResource(t[0],n,r,s)}}}const bl=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),W(e[1])&&(t.defaultValue=e[1]),W(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Hh=e=>{var t,n;return W(e.ns)&&(e.ns=[e.ns]),W(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),W(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),((n=(t=e.supportedLngs)==null?void 0:t.indexOf)==null?void 0:n.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e},Gi=()=>{},nk=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})},iv="__i18next_supportNoticeShown",rk=()=>!!(typeof globalThis<"u"&&globalThis[iv]||typeof process<"u"&&kl&&kl.I18NEXT_NO_SUPPORT_NOTICE||typeof process<"u"&&kl),sk=()=>{typeof globalThis<"u"&&(globalThis[iv]=!0)},ik=e=>{var t,n,r,s,i,o,a,l,u,c,d,f,g;return!!(((r=(n=(t=e==null?void 0:e.modules)==null?void 0:t.backend)==null?void 0:n.name)==null?void 0:r.indexOf("Locize"))>0||((a=(o=(i=(s=e==null?void 0:e.modules)==null?void 0:s.backend)==null?void 0:i.constructor)==null?void 0:o.name)==null?void 0:a.indexOf("Locize"))>0||(u=(l=e==null?void 0:e.options)==null?void 0:l.backend)!=null&&u.backends&&e.options.backend.backends.some(p=>{var v,w,m;return((v=p==null?void 0:p.name)==null?void 0:v.indexOf("Locize"))>0||((m=(w=p==null?void 0:p.constructor)==null?void 0:w.name)==null?void 0:m.indexOf("Locize"))>0})||(d=(c=e==null?void 0:e.options)==null?void 0:c.backend)!=null&&d.projectId||(g=(f=e==null?void 0:e.options)==null?void 0:f.backend)!=null&&g.backendOptions&&e.options.backend.backendOptions.some(p=>p==null?void 0:p.projectId))};class Ds extends ja{constructor(t={},n){if(super(),this.options=Hh(t),this.services={},this.logger=Ft,this.modules={external:[]},nk(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(t={},n){this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&(W(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=bl();this.options={...r,...this.options,...Hh(t)},this.options.interpolation={...r.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!ik(this)&&!rk()&&(typeof console<"u"&&typeof console.info<"u"&&console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),sk());const s=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?Ft.init(s(this.modules.logger),this.options):Ft.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=ZS;const c=new _h(this.options);this.store=new Fh(this.options.resources,this.options);const d=this.services;d.logger=Ft,d.resourceStore=this.store,d.languageUtils=c,d.pluralResolver=new XS(c,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),u&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(d.formatter=s(u),d.formatter.init&&d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new Bh(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new tk(s(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",(g,...p)=>{this.emit(g,...p)}),this.modules.languageDetector&&(d.languageDetector=s(this.modules.languageDetector),d.languageDetector.init&&d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=s(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new ea(this.services,this.options),this.translator.on("*",(g,...p)=>{this.emit(g,...p)}),this.modules.external.forEach(g=>{g.init&&g.init(this)})}if(this.format=this.options.interpolation.format,n||(n=Gi),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=(...c)=>this.store[u](...c)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=(...c)=>(this.store[u](...c),this)});const a=hs(),l=()=>{const u=(c,d)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(d),n(c,d)};if(this.languages&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),a}loadResources(t,n=Gi){var i,o;let r=n;const s=W(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if((s==null?void 0:s.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const a=[],l=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(d=>{d!=="cimode"&&a.indexOf(d)<0&&a.push(d)})};s?l(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>l(c)),(o=(i=this.options.preload)==null?void 0:i.forEach)==null||o.call(i,u=>l(u)),this.services.backendConnector.load(a,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(u)})}else r(null)}reloadResources(t,n,r){const s=hs();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=Gi),this.services.backendConnector.reload(t,n,i=>{s.resolve(),r(i)}),s}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&rv.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1)){for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,n){this.isLanguageChangingTo=t;const r=hs();this.emit("languageChanging",t);const s=a=>{this.language=a,this.languages=this.services.languageUtils.toResolveHierarchy(a),this.resolvedLanguage=void 0,this.setResolvedLanguage(a)},i=(a,l)=>{l?this.isLanguageChangingTo===t&&(s(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,r.resolve((...u)=>this.t(...u)),n&&n(a,(...u)=>this.t(...u))},o=a=>{var c,d;!t&&!a&&this.services.languageDetector&&(a=[]);const l=W(a)?a:a&&a[0],u=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(W(a)?[a]:a);u&&(this.language||s(u),this.translator.language||this.translator.changeLanguage(u),(d=(c=this.services.languageDetector)==null?void 0:c.cacheUserLanguage)==null||d.call(c,u)),this.loadResources(u,f=>{i(f,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(t),r}getFixedT(t,n,r){const s=(i,o,...a)=>{let l;typeof o!="object"?l=this.options.overloadTranslationOptionHandler([i,o].concat(a)):l={...o},l.lng=l.lng||s.lng,l.lngs=l.lngs||s.lngs,l.ns=l.ns||s.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||r||s.keyPrefix);const u={...this.options,...l};typeof l.keyPrefix=="function"&&(l.keyPrefix=Mr(l.keyPrefix,u));const c=this.options.keySeparator||".";let d;return l.keyPrefix&&Array.isArray(i)?d=i.map(f=>(typeof f=="function"&&(f=Mr(f,u)),`${l.keyPrefix}${c}${f}`)):(typeof i=="function"&&(i=Mr(i,u)),d=l.keyPrefix?`${l.keyPrefix}${c}${i}`:i),this.t(d,l)};return W(t)?s.lng=t:s.lngs=t,s.ns=n,s.keyPrefix=r,s}t(...t){var n;return(n=this.translator)==null?void 0:n.translate(...t)}exists(...t){var n;return(n=this.translator)==null?void 0:n.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const o=(a,l)=>{const u=this.services.backendConnector.state[`${a}|${l}`];return u===-1||u===0||u===2};if(n.precheck){const a=n.precheck(this,o);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(r,t)&&(!s||o(i,t)))}loadNamespaces(t,n){const r=hs();return this.options.ns?(W(t)&&(t=[t]),t.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=hs();W(t)&&(t=[t]);const s=this.options.preload||[],i=t.filter(o=>s.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return i.length?(this.options.preload=s.concat(i),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}dir(t){var s,i;if(t||(t=this.resolvedLanguage||(((s=this.languages)==null?void 0:s.length)>0?this.languages[0]:this.language)),!t)return"rtl";try{const o=new Intl.Locale(t);if(o&&o.getTextInfo){const a=o.getTextInfo();if(a&&a.direction)return a.direction}}catch{}const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=((i=this.services)==null?void 0:i.languageUtils)||new _h(bl());return t.toLowerCase().indexOf("-latn")>1?"ltr":n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},n){const r=new Ds(t,n);return r.createInstance=Ds.createInstance,r}cloneInstance(t={},n=Gi){const r=t.forkResourceStore;r&&delete t.forkResourceStore;const s={...this.options,...t,isClone:!0},i=new Ds(s);if((t.debug!==void 0||t.prefix!==void 0)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(a=>{i[a]=this[a]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r){const a=Object.keys(this.store.data).reduce((l,u)=>(l[u]={...this.store.data[u]},l[u]=Object.keys(l[u]).reduce((c,d)=>(c[d]={...l[u][d]},c),l[u]),l),{});i.store=new Fh(a,s),i.services.resourceStore=i.store}if(t.interpolation){const l={...bl().interpolation,...this.options.interpolation,...t.interpolation},u={...s,interpolation:l};i.services.interpolator=new Bh(u)}return i.translator=new ea(i.services,s),i.translator.on("*",(a,...l)=>{i.emit(a,...l)}),i.init(s,n),i.translator.options=s,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const We=Ds.createInstance();We.createInstance;We.dir;We.init;We.loadResources;We.reloadResources;We.use;We.changeLanguage;We.getFixedT;We.t;We.exists;We.setDefaultNamespace;We.hasLoadedNamespace;We.loadNamespaces;We.loadLanguages;const ok=(e,t,n,r)=>{var i,o,a,l;const s=[n,{code:t,...r||{}}];if((o=(i=e==null?void 0:e.services)==null?void 0:i.logger)!=null&&o.forward)return e.services.logger.forward(s,"warn","react-i18next::",!0);ir(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),(l=(a=e==null?void 0:e.services)==null?void 0:a.logger)!=null&&l.warn?e.services.logger.warn(...s):console!=null&&console.warn&&console.warn(...s)},Wh={},Yu=(e,t,n,r)=>{ir(n)&&Wh[n]||(ir(n)&&(Wh[n]=new Date),ok(e,t,n,r))},ov=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},Xu=(e,t,n)=>{e.loadNamespaces(t,ov(e,n))},Kh=(e,t,n,r)=>{if(ir(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Xu(e,n,r);n.forEach(s=>{e.options.ns.indexOf(s)<0&&e.options.ns.push(s)}),e.loadLanguages(t,ov(e,r))},ak=(e,t,n={})=>!t.languages||!t.languages.length?(Yu(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,s)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!s(r.isLanguageChangingTo,e))return!1}}),ir=e=>typeof e=="string",lk=e=>typeof e=="object"&&e!==null,uk=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,ck={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},dk=e=>ck[e],fk=e=>e.replace(uk,dk);let Qu={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:fk,transDefaultProps:void 0};const hk=(e={})=>{Qu={...Qu,...e}},pk=()=>Qu;let av;const mk=e=>{av=e},gk=()=>av,yk={type:"3rdParty",init(e){hk(e.options.react),mk(e)}},vk=S.createContext();class xk{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var lv={exports:{}},uv={};/**
41
41
  * @license React
42
42
  * use-sync-external-store-shim.production.js
43
43
  *
@@ -54,9 +54,9 @@ Error generating stack: `+i.message+`
54
54
  * LICENSE.md file in the root directory of this source tree.
55
55
  *
56
56
  * @license MIT
57
- */var Qh="popstate";function Jh(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function uC(e={}){function t(r,s){var u;let i=(u=s.state)==null?void 0:u.masked,{pathname:o,search:a,hash:l}=i||r.location;return Ju("",{pathname:o,search:a,hash:l},s.state&&s.state.usr||null,s.state&&s.state.key||"default",i?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,s){return typeof s=="string"?s:ri(s)}return dC(t,n,null,e)}function he(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function $t(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function cC(){return Math.random().toString(36).substring(2,10)}function Zh(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Ju(e,t,n=null,r,s){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Qr(t):t,state:n,key:t&&t.key||r||cC(),unstable_mask:s}}function ri({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Qr(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function dC(e,t,n,r={}){let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,a="POP",l=null,u=c();u==null&&(u=0,o.replaceState({...o.state,idx:u},""));function c(){return(o.state||{idx:null}).idx}function d(){a="POP";let w=c(),m=w==null?null:w-u;u=w,l&&l({action:a,location:v.location,delta:m})}function f(w,m){a="PUSH";let y=Jh(w)?w:Ju(v.location,w,m);u=c()+1;let x=Zh(y,u),k=v.createHref(y.unstable_mask||y);try{o.pushState(x,"",k)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;s.location.assign(k)}i&&l&&l({action:a,location:v.location,delta:1})}function g(w,m){a="REPLACE";let y=Jh(w)?w:Ju(v.location,w,m);u=c();let x=Zh(y,u),k=v.createHref(y.unstable_mask||y);o.replaceState(x,"",k),i&&l&&l({action:a,location:v.location,delta:0})}function p(w){return fC(w)}let v={get action(){return a},get location(){return e(s,o)},listen(w){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(Qh,d),l=w,()=>{s.removeEventListener(Qh,d),l=null}},createHref(w){return t(s,w)},createURL:p,encodeLocation(w){let m=p(w);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:f,replace:g,go(w){return o.go(w)}};return v}function fC(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),he(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:ri(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function hv(e,t,n="/"){return hC(e,t,n,!1)}function hC(e,t,n,r){let s=typeof t=="string"?Qr(t):t,i=rn(s.pathname||"/",n);if(i==null)return null;let o=pv(e);pC(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=bC(i);a=CC(o[l],u,r)}return a}function pv(e,t=[],n=[],r="",s=!1){let i=(o,a,l=s,u)=>{let c={relativePath:u===void 0?o.path||"":u,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};if(c.relativePath.startsWith("/")){if(!c.relativePath.startsWith(r)&&l)return;he(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let d=Vt([r,c.relativePath]),f=n.concat(c);o.children&&o.children.length>0&&(he(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),pv(o.children,t,f,d,l)),!(o.path==null&&!o.index)&&t.push({path:d,score:SC(d,o.index),routesMeta:f})};return e.forEach((o,a)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))i(o,a);else for(let u of mv(o.path))i(o,a,!0,u)}),t}function mv(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let o=mv(r.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function pC(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:kC(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var mC=/^:[\w-]+$/,gC=3,yC=2,vC=1,xC=10,wC=-2,ep=e=>e==="*";function SC(e,t){let n=e.split("/"),r=n.length;return n.some(ep)&&(r+=wC),t&&(r+=yC),n.filter(s=>!ep(s)).reduce((s,i)=>s+(mC.test(i)?gC:i===""?vC:xC),r)}function kC(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function CC(e,t,n=!1){let{routesMeta:r}=e,s={},i="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],u=a===r.length-1,c=i==="/"?t:t.slice(i.length)||"/",d=ta({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},c),f=l.route;if(!d&&u&&n&&!r[r.length-1].route.index&&(d=ta({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},c)),!d)return null;Object.assign(s,d.params),o.push({params:s,pathname:Vt([i,d.pathname]),pathnameBase:NC(Vt([i,d.pathnameBase])),route:f}),d.pathnameBase!=="/"&&(i=Vt([i,d.pathnameBase]))}return o}function ta(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=EC(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:r.reduce((u,{paramName:c,isOptional:d},f)=>{if(c==="*"){let p=a[f]||"";o=i.slice(0,i.length-p.length).replace(/(.)\/+$/,"$1")}const g=a[f];return d&&!g?u[c]=void 0:u[c]=(g||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:e}}function EC(e,t=!1,n=!0){$t(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l,u,c)=>{if(r.push({paramName:a,isOptional:l!=null}),l){let d=c.charAt(u+o.length);return d&&d!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function bC(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return $t(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function rn(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}var TC=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function PC(e,t="/"){let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?Qr(e):e,i;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?i=tp(n.substring(1),"/"):i=tp(n,t)):i=t,{pathname:i,search:jC(r),hash:LC(s)}}function tp(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function Pl(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function RC(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function gv(e){let t=RC(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function bd(e,t,n,r=!1){let s;typeof e=="string"?s=Qr(e):(s={...e},he(!s.pathname||!s.pathname.includes("?"),Pl("?","pathname","search",s)),he(!s.pathname||!s.pathname.includes("#"),Pl("#","pathname","hash",s)),he(!s.search||!s.search.includes("#"),Pl("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=n;else{let d=t.length-1;if(!r&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),d-=1;s.pathname=f.join("/")}a=d>=0?t[d]:"/"}let l=PC(s,a),u=o&&o!=="/"&&o.endsWith("/"),c=(i||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}var Vt=e=>e.join("/").replace(/\/\/+/g,"/"),NC=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),jC=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,LC=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,AC=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function OC(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function DC(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var yv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function vv(e,t){let n=e;if(typeof n!="string"||!TC.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,s=!1;if(yv)try{let i=new URL(window.location.href),o=n.startsWith("//")?new URL(i.protocol+n):new URL(n),a=rn(o.pathname,t);o.origin===i.origin&&a!=null?n=a+o.search+o.hash:s=!0}catch{$t(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:s,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var xv=["POST","PUT","PATCH","DELETE"];new Set(xv);var MC=["GET",...xv];new Set(MC);var Jr=S.createContext(null);Jr.displayName="DataRouter";var Aa=S.createContext(null);Aa.displayName="DataRouterState";var wv=S.createContext(!1);function FC(){return S.useContext(wv)}var Sv=S.createContext({isTransitioning:!1});Sv.displayName="ViewTransition";var IC=S.createContext(new Map);IC.displayName="Fetchers";var _C=S.createContext(null);_C.displayName="Await";var vt=S.createContext(null);vt.displayName="Navigation";var mi=S.createContext(null);mi.displayName="Location";var on=S.createContext({outlet:null,matches:[],isDataRoute:!1});on.displayName="Route";var Td=S.createContext(null);Td.displayName="RouteError";var kv="REACT_ROUTER_ERROR",VC="REDIRECT",zC="ROUTE_ERROR_RESPONSE";function $C(e){if(e.startsWith(`${kv}:${VC}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function BC(e){if(e.startsWith(`${kv}:${zC}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new AC(t.status,t.statusText,t.data)}catch{}}function UC(e,{relative:t}={}){he(gi(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=S.useContext(vt),{hash:s,pathname:i,search:o}=vi(e,{relative:t}),a=i;return n!=="/"&&(a=i==="/"?n:Vt([n,i])),r.createHref({pathname:a,search:o,hash:s})}function gi(){return S.useContext(mi)!=null}function Ut(){return he(gi(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(mi).location}var Cv="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Ev(e){S.useContext(vt).static||S.useLayoutEffect(e)}function yi(){let{isDataRoute:e}=S.useContext(on);return e?nE():HC()}function HC(){he(gi(),"useNavigate() may be used only in the context of a <Router> component.");let e=S.useContext(Jr),{basename:t,navigator:n}=S.useContext(vt),{matches:r}=S.useContext(on),{pathname:s}=Ut(),i=JSON.stringify(gv(r)),o=S.useRef(!1);return Ev(()=>{o.current=!0}),S.useCallback((l,u={})=>{if($t(o.current,Cv),!o.current)return;if(typeof l=="number"){n.go(l);return}let c=bd(l,JSON.parse(i),s,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Vt([t,c.pathname])),(u.replace?n.replace:n.push)(c,u.state,u)},[t,n,i,s,e])}S.createContext(null);function vi(e,{relative:t}={}){let{matches:n}=S.useContext(on),{pathname:r}=Ut(),s=JSON.stringify(gv(n));return S.useMemo(()=>bd(e,JSON.parse(s),r,t==="path"),[e,s,r,t])}function WC(e,t){return bv(e,t)}function bv(e,t,n){var w;he(gi(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=S.useContext(vt),{matches:s}=S.useContext(on),i=s[s.length-1],o=i?i.params:{},a=i?i.pathname:"/",l=i?i.pathnameBase:"/",u=i&&i.route;{let m=u&&u.path||"";Pv(a,!u||m.endsWith("*")||m.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${a}" (under <Route path="${m}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
57
+ */var Qh="popstate";function Jh(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function uC(e={}){function t(r,s){var u;let i=(u=s.state)==null?void 0:u.masked,{pathname:o,search:a,hash:l}=i||r.location;return Ju("",{pathname:o,search:a,hash:l},s.state&&s.state.usr||null,s.state&&s.state.key||"default",i?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,s){return typeof s=="string"?s:ri(s)}return dC(t,n,null,e)}function he(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function $t(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function cC(){return Math.random().toString(36).substring(2,10)}function Zh(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Ju(e,t,n=null,r,s){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Qr(t):t,state:n,key:t&&t.key||r||cC(),unstable_mask:s}}function ri({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Qr(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function dC(e,t,n,r={}){let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,a="POP",l=null,u=c();u==null&&(u=0,o.replaceState({...o.state,idx:u},""));function c(){return(o.state||{idx:null}).idx}function d(){a="POP";let w=c(),m=w==null?null:w-u;u=w,l&&l({action:a,location:v.location,delta:m})}function f(w,m){a="PUSH";let y=Jh(w)?w:Ju(v.location,w,m);u=c()+1;let x=Zh(y,u),k=v.createHref(y.unstable_mask||y);try{o.pushState(x,"",k)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;s.location.assign(k)}i&&l&&l({action:a,location:v.location,delta:1})}function g(w,m){a="REPLACE";let y=Jh(w)?w:Ju(v.location,w,m);u=c();let x=Zh(y,u),k=v.createHref(y.unstable_mask||y);o.replaceState(x,"",k),i&&l&&l({action:a,location:v.location,delta:0})}function p(w){return fC(w)}let v={get action(){return a},get location(){return e(s,o)},listen(w){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(Qh,d),l=w,()=>{s.removeEventListener(Qh,d),l=null}},createHref(w){return t(s,w)},createURL:p,encodeLocation(w){let m=p(w);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:f,replace:g,go(w){return o.go(w)}};return v}function fC(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),he(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:ri(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function hv(e,t,n="/"){return hC(e,t,n,!1)}function hC(e,t,n,r){let s=typeof t=="string"?Qr(t):t,i=rn(s.pathname||"/",n);if(i==null)return null;let o=pv(e);pC(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=bC(i);a=CC(o[l],u,r)}return a}function pv(e,t=[],n=[],r="",s=!1){let i=(o,a,l=s,u)=>{let c={relativePath:u===void 0?o.path||"":u,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};if(c.relativePath.startsWith("/")){if(!c.relativePath.startsWith(r)&&l)return;he(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let d=Vt([r,c.relativePath]),f=n.concat(c);o.children&&o.children.length>0&&(he(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),pv(o.children,t,f,d,l)),!(o.path==null&&!o.index)&&t.push({path:d,score:SC(d,o.index),routesMeta:f})};return e.forEach((o,a)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))i(o,a);else for(let u of mv(o.path))i(o,a,!0,u)}),t}function mv(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let o=mv(r.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function pC(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:kC(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var mC=/^:[\w-]+$/,gC=3,yC=2,vC=1,xC=10,wC=-2,ep=e=>e==="*";function SC(e,t){let n=e.split("/"),r=n.length;return n.some(ep)&&(r+=wC),t&&(r+=yC),n.filter(s=>!ep(s)).reduce((s,i)=>s+(mC.test(i)?gC:i===""?vC:xC),r)}function kC(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function CC(e,t,n=!1){let{routesMeta:r}=e,s={},i="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],u=a===r.length-1,c=i==="/"?t:t.slice(i.length)||"/",d=ta({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},c),f=l.route;if(!d&&u&&n&&!r[r.length-1].route.index&&(d=ta({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},c)),!d)return null;Object.assign(s,d.params),o.push({params:s,pathname:Vt([i,d.pathname]),pathnameBase:NC(Vt([i,d.pathnameBase])),route:f}),d.pathnameBase!=="/"&&(i=Vt([i,d.pathnameBase]))}return o}function ta(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=EC(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:r.reduce((u,{paramName:c,isOptional:d},f)=>{if(c==="*"){let p=a[f]||"";o=i.slice(0,i.length-p.length).replace(/(.)\/+$/,"$1")}const g=a[f];return d&&!g?u[c]=void 0:u[c]=(g||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:e}}function EC(e,t=!1,n=!0){$t(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l,u,c)=>{if(r.push({paramName:a,isOptional:l!=null}),l){let d=c.charAt(u+o.length);return d&&d!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function bC(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return $t(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function rn(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}var TC=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function PC(e,t="/"){let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?Qr(e):e,i;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?i=tp(n.substring(1),"/"):i=tp(n,t)):i=t,{pathname:i,search:jC(r),hash:LC(s)}}function tp(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function Pl(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function RC(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function gv(e){let t=RC(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function bd(e,t,n,r=!1){let s;typeof e=="string"?s=Qr(e):(s={...e},he(!s.pathname||!s.pathname.includes("?"),Pl("?","pathname","search",s)),he(!s.pathname||!s.pathname.includes("#"),Pl("#","pathname","hash",s)),he(!s.search||!s.search.includes("#"),Pl("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=n;else{let d=t.length-1;if(!r&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),d-=1;s.pathname=f.join("/")}a=d>=0?t[d]:"/"}let l=PC(s,a),u=o&&o!=="/"&&o.endsWith("/"),c=(i||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}var Vt=e=>e.join("/").replace(/\/\/+/g,"/"),NC=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),jC=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,LC=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,AC=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function OC(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function DC(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var yv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function vv(e,t){let n=e;if(typeof n!="string"||!TC.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,s=!1;if(yv)try{let i=new URL(window.location.href),o=n.startsWith("//")?new URL(i.protocol+n):new URL(n),a=rn(o.pathname,t);o.origin===i.origin&&a!=null?n=a+o.search+o.hash:s=!0}catch{$t(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:s,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var xv=["POST","PUT","PATCH","DELETE"];new Set(xv);var MC=["GET",...xv];new Set(MC);var Jr=S.createContext(null);Jr.displayName="DataRouter";var Aa=S.createContext(null);Aa.displayName="DataRouterState";var wv=S.createContext(!1);function FC(){return S.useContext(wv)}var Sv=S.createContext({isTransitioning:!1});Sv.displayName="ViewTransition";var IC=S.createContext(new Map);IC.displayName="Fetchers";var _C=S.createContext(null);_C.displayName="Await";var xt=S.createContext(null);xt.displayName="Navigation";var mi=S.createContext(null);mi.displayName="Location";var on=S.createContext({outlet:null,matches:[],isDataRoute:!1});on.displayName="Route";var Td=S.createContext(null);Td.displayName="RouteError";var kv="REACT_ROUTER_ERROR",VC="REDIRECT",zC="ROUTE_ERROR_RESPONSE";function $C(e){if(e.startsWith(`${kv}:${VC}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function BC(e){if(e.startsWith(`${kv}:${zC}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new AC(t.status,t.statusText,t.data)}catch{}}function UC(e,{relative:t}={}){he(gi(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=S.useContext(xt),{hash:s,pathname:i,search:o}=vi(e,{relative:t}),a=i;return n!=="/"&&(a=i==="/"?n:Vt([n,i])),r.createHref({pathname:a,search:o,hash:s})}function gi(){return S.useContext(mi)!=null}function Ut(){return he(gi(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(mi).location}var Cv="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Ev(e){S.useContext(xt).static||S.useLayoutEffect(e)}function yi(){let{isDataRoute:e}=S.useContext(on);return e?nE():HC()}function HC(){he(gi(),"useNavigate() may be used only in the context of a <Router> component.");let e=S.useContext(Jr),{basename:t,navigator:n}=S.useContext(xt),{matches:r}=S.useContext(on),{pathname:s}=Ut(),i=JSON.stringify(gv(r)),o=S.useRef(!1);return Ev(()=>{o.current=!0}),S.useCallback((l,u={})=>{if($t(o.current,Cv),!o.current)return;if(typeof l=="number"){n.go(l);return}let c=bd(l,JSON.parse(i),s,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Vt([t,c.pathname])),(u.replace?n.replace:n.push)(c,u.state,u)},[t,n,i,s,e])}S.createContext(null);function vi(e,{relative:t}={}){let{matches:n}=S.useContext(on),{pathname:r}=Ut(),s=JSON.stringify(gv(n));return S.useMemo(()=>bd(e,JSON.parse(s),r,t==="path"),[e,s,r,t])}function WC(e,t){return bv(e,t)}function bv(e,t,n){var w;he(gi(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=S.useContext(xt),{matches:s}=S.useContext(on),i=s[s.length-1],o=i?i.params:{},a=i?i.pathname:"/",l=i?i.pathnameBase:"/",u=i&&i.route;{let m=u&&u.path||"";Pv(a,!u||m.endsWith("*")||m.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${a}" (under <Route path="${m}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
58
58
 
59
- Please change the parent <Route path="${m}"> to <Route path="${m==="/"?"*":`${m}/*`}">.`)}let c=Ut(),d;if(t){let m=typeof t=="string"?Qr(t):t;he(l==="/"||((w=m.pathname)==null?void 0:w.startsWith(l)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${l}" but pathname "${m.pathname}" was given in the \`location\` prop.`),d=m}else d=c;let f=d.pathname||"/",g=f;if(l!=="/"){let m=l.replace(/^\//,"").split("/");g="/"+f.replace(/^\//,"").split("/").slice(m.length).join("/")}let p=hv(e,{pathname:g});$t(u||p!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),$t(p==null||p[p.length-1].route.element!==void 0||p[p.length-1].route.Component!==void 0||p[p.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let v=XC(p&&p.map(m=>Object.assign({},m,{params:Object.assign({},o,m.params),pathname:Vt([l,r.encodeLocation?r.encodeLocation(m.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?l:Vt([l,r.encodeLocation?r.encodeLocation(m.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:m.pathnameBase])})),s,n);return t&&v?S.createElement(mi.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...d},navigationType:"POP"}},v):v}function KC(){let e=tE(),t=OC(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:r},i={padding:"2px 4px",backgroundColor:r},o=null;return console.error("Error handled by React Router default ErrorBoundary:",e),o=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:i},"ErrorBoundary")," or"," ",S.createElement("code",{style:i},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},t),n?S.createElement("pre",{style:s},n):null,o)}var GC=S.createElement(KC,null),Tv=class extends S.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=BC(e.digest);n&&(e=n)}let t=e!==void 0?S.createElement(on.Provider,{value:this.props.routeContext},S.createElement(Td.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?S.createElement(qC,{error:e},t):t}};Tv.contextType=wv;var Rl=new WeakMap;function qC({children:e,error:t}){let{basename:n}=S.useContext(vt);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=$C(t.digest);if(r){let s=Rl.get(t);if(s)throw s;let i=vv(r.location,n);if(yv&&!Rl.get(t))if(i.isExternal||r.reloadDocument)window.location.href=i.absoluteURL||i.to;else{const o=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:r.replace}));throw Rl.set(t,o),o}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i.absoluteURL||i.to}`})}}return e}function YC({routeContext:e,match:t,children:n}){let r=S.useContext(Jr);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),S.createElement(on.Provider,{value:e},n)}function XC(e,t=[],n){let r=n==null?void 0:n.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let s=e,i=r==null?void 0:r.errors;if(i!=null){let c=s.findIndex(d=>d.route.id&&(i==null?void 0:i[d.route.id])!==void 0);he(c>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),s=s.slice(0,Math.min(s.length,c+1))}let o=!1,a=-1;if(n&&r){o=r.renderFallback;for(let c=0;c<s.length;c++){let d=s[c];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(a=c),d.route.id){let{loaderData:f,errors:g}=r,p=d.route.loader&&!f.hasOwnProperty(d.route.id)&&(!g||g[d.route.id]===void 0);if(d.route.lazy||p){n.isStatic&&(o=!0),a>=0?s=s.slice(0,a+1):s=[s[0]];break}}}}let l=n==null?void 0:n.onError,u=r&&l?(c,d)=>{var f,g;l(c,{location:r.location,params:((g=(f=r.matches)==null?void 0:f[0])==null?void 0:g.params)??{},unstable_pattern:DC(r.matches),errorInfo:d})}:void 0;return s.reduceRight((c,d,f)=>{let g,p=!1,v=null,w=null;r&&(g=i&&d.route.id?i[d.route.id]:void 0,v=d.route.errorElement||GC,o&&(a<0&&f===0?(Pv("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,w=null):a===f&&(p=!0,w=d.route.hydrateFallbackElement||null)));let m=t.concat(s.slice(0,f+1)),y=()=>{let x;return g?x=v:p?x=w:d.route.Component?x=S.createElement(d.route.Component,null):d.route.element?x=d.route.element:x=c,S.createElement(YC,{match:d,routeContext:{outlet:c,matches:m,isDataRoute:r!=null},children:x})};return r&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?S.createElement(Tv,{location:r.location,revalidation:r.revalidation,component:v,error:g,children:y(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:u}):y()},null)}function Pd(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function QC(e){let t=S.useContext(Jr);return he(t,Pd(e)),t}function JC(e){let t=S.useContext(Aa);return he(t,Pd(e)),t}function ZC(e){let t=S.useContext(on);return he(t,Pd(e)),t}function Rd(e){let t=ZC(e),n=t.matches[t.matches.length-1];return he(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function eE(){return Rd("useRouteId")}function tE(){var r;let e=S.useContext(Td),t=JC("useRouteError"),n=Rd("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function nE(){let{router:e}=QC("useNavigate"),t=Rd("useNavigate"),n=S.useRef(!1);return Ev(()=>{n.current=!0}),S.useCallback(async(s,i={})=>{$t(n.current,Cv),n.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:t,...i}))},[e,t])}var np={};function Pv(e,t,n){!t&&!np[e]&&(np[e]=!0,$t(!1,n))}S.memo(rE);function rE({routes:e,future:t,state:n,isStatic:r,onError:s}){return bv(e,void 0,{state:n,isStatic:r,onError:s})}function po(e){he(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function sE({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:s,static:i=!1,unstable_useTransitions:o}){he(!gi(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let a=e.replace(/^\/*/,"/"),l=S.useMemo(()=>({basename:a,navigator:s,static:i,unstable_useTransitions:o,future:{}}),[a,s,i,o]);typeof n=="string"&&(n=Qr(n));let{pathname:u="/",search:c="",hash:d="",state:f=null,key:g="default",unstable_mask:p}=n,v=S.useMemo(()=>{let w=rn(u,a);return w==null?null:{location:{pathname:w,search:c,hash:d,state:f,key:g,unstable_mask:p},navigationType:r}},[a,u,c,d,f,g,r,p]);return $t(v!=null,`<Router basename="${a}"> is not able to match the URL "${u}${c}${d}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:S.createElement(vt.Provider,{value:l},S.createElement(mi.Provider,{children:t,value:v}))}function iE({children:e,location:t}){return WC(Zu(e),t)}function Zu(e,t=[]){let n=[];return S.Children.forEach(e,(r,s)=>{if(!S.isValidElement(r))return;let i=[...t,s];if(r.type===S.Fragment){n.push.apply(n,Zu(r.props.children,i));return}he(r.type===po,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),he(!r.props.index||!r.props.children,"An index route cannot have child routes.");let o={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Zu(r.props.children,i)),n.push(o)}),n}var mo="get",go="application/x-www-form-urlencoded";function Oa(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function oE(e){return Oa(e)&&e.tagName.toLowerCase()==="button"}function aE(e){return Oa(e)&&e.tagName.toLowerCase()==="form"}function lE(e){return Oa(e)&&e.tagName.toLowerCase()==="input"}function uE(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function cE(e,t){return e.button===0&&(!t||t==="_self")&&!uE(e)}var qi=null;function dE(){if(qi===null)try{new FormData(document.createElement("form"),0),qi=!1}catch{qi=!0}return qi}var fE=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Nl(e){return e!=null&&!fE.has(e)?($t(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${go}"`),null):e}function hE(e,t){let n,r,s,i,o;if(aE(e)){let a=e.getAttribute("action");r=a?rn(a,t):null,n=e.getAttribute("method")||mo,s=Nl(e.getAttribute("enctype"))||go,i=new FormData(e)}else if(oE(e)||lE(e)&&(e.type==="submit"||e.type==="image")){let a=e.form;if(a==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||a.getAttribute("action");if(r=l?rn(l,t):null,n=e.getAttribute("formmethod")||a.getAttribute("method")||mo,s=Nl(e.getAttribute("formenctype"))||Nl(a.getAttribute("enctype"))||go,i=new FormData(a,e),!dE()){let{name:u,type:c,value:d}=e;if(c==="image"){let f=u?`${u}.`:"";i.append(`${f}x`,"0"),i.append(`${f}y`,"0")}else u&&i.append(u,d)}}else{if(Oa(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=mo,r=null,s=go,o=e}return i&&s==="text/plain"&&(o=i,i=void 0),{action:r,method:n.toLowerCase(),encType:s,formData:i,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Nd(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Rv(e,t,n,r){let s=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${r}`:s.pathname=`${s.pathname}.${r}`:s.pathname==="/"?s.pathname=`_root.${r}`:t&&rn(s.pathname,t)==="/"?s.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:s.pathname=`${s.pathname.replace(/\/$/,"")}.${r}`,s}async function pE(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function mE(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function gE(e,t,n){let r=await Promise.all(e.map(async s=>{let i=t.routes[s.route.id];if(i){let o=await pE(i,n);return o.links?o.links():[]}return[]}));return wE(r.flat(1).filter(mE).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function rp(e,t,n,r,s,i){let o=(l,u)=>n[u]?l.route.id!==n[u].route.id:!0,a=(l,u)=>{var c;return n[u].pathname!==l.pathname||((c=n[u].route.path)==null?void 0:c.endsWith("*"))&&n[u].params["*"]!==l.params["*"]};return i==="assets"?t.filter((l,u)=>o(l,u)||a(l,u)):i==="data"?t.filter((l,u)=>{var d;let c=r.routes[l.route.id];if(!c||!c.hasLoader)return!1;if(o(l,u)||a(l,u))return!0;if(l.route.shouldRevalidate){let f=l.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:((d=n[0])==null?void 0:d.params)||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof f=="boolean")return f}return!0}):[]}function yE(e,t,{includeHydrateFallback:n}={}){return vE(e.map(r=>{let s=t.routes[r.route.id];if(!s)return[];let i=[s.module];return s.clientActionModule&&(i=i.concat(s.clientActionModule)),s.clientLoaderModule&&(i=i.concat(s.clientLoaderModule)),n&&s.hydrateFallbackModule&&(i=i.concat(s.hydrateFallbackModule)),s.imports&&(i=i.concat(s.imports)),i}).flat(1))}function vE(e){return[...new Set(e)]}function xE(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function wE(e,t){let n=new Set;return new Set(t),e.reduce((r,s)=>{let i=JSON.stringify(xE(s));return n.has(i)||(n.add(i),r.push({key:i,link:s})),r},[])}function jd(){let e=S.useContext(Jr);return Nd(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function SE(){let e=S.useContext(Aa);return Nd(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Ld=S.createContext(void 0);Ld.displayName="FrameworkContext";function Ad(){let e=S.useContext(Ld);return Nd(e,"You must render this element inside a <HydratedRouter> element"),e}function kE(e,t){let n=S.useContext(Ld),[r,s]=S.useState(!1),[i,o]=S.useState(!1),{onFocus:a,onBlur:l,onMouseEnter:u,onMouseLeave:c,onTouchStart:d}=t,f=S.useRef(null);S.useEffect(()=>{if(e==="render"&&o(!0),e==="viewport"){let v=m=>{m.forEach(y=>{o(y.isIntersecting)})},w=new IntersectionObserver(v,{threshold:.5});return f.current&&w.observe(f.current),()=>{w.disconnect()}}},[e]),S.useEffect(()=>{if(r){let v=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(v)}}},[r]);let g=()=>{s(!0)},p=()=>{s(!1),o(!1)};return n?e!=="intent"?[i,f,{}]:[i,f,{onFocus:ps(a,g),onBlur:ps(l,p),onMouseEnter:ps(u,g),onMouseLeave:ps(c,p),onTouchStart:ps(d,g)}]:[!1,f,{}]}function ps(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function CE({page:e,...t}){let n=FC(),{router:r}=jd(),s=S.useMemo(()=>hv(r.routes,e,r.basename),[r.routes,e,r.basename]);return s?n?S.createElement(bE,{page:e,matches:s,...t}):S.createElement(TE,{page:e,matches:s,...t}):null}function EE(e){let{manifest:t,routeModules:n}=Ad(),[r,s]=S.useState([]);return S.useEffect(()=>{let i=!1;return gE(e,t,n).then(o=>{i||s(o)}),()=>{i=!0}},[e,t,n]),r}function bE({page:e,matches:t,...n}){let r=Ut(),{future:s}=Ad(),{basename:i}=jd(),o=S.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let a=Rv(e,i,s.unstable_trailingSlashAwareDataRequests,"rsc"),l=!1,u=[];for(let c of t)typeof c.route.shouldRevalidate=="function"?l=!0:u.push(c.route.id);return l&&u.length>0&&a.searchParams.set("_routes",u.join(",")),[a.pathname+a.search]},[i,s.unstable_trailingSlashAwareDataRequests,e,r,t]);return S.createElement(S.Fragment,null,o.map(a=>S.createElement("link",{key:a,rel:"prefetch",as:"fetch",href:a,...n})))}function TE({page:e,matches:t,...n}){let r=Ut(),{future:s,manifest:i,routeModules:o}=Ad(),{basename:a}=jd(),{loaderData:l,matches:u}=SE(),c=S.useMemo(()=>rp(e,t,u,i,r,"data"),[e,t,u,i,r]),d=S.useMemo(()=>rp(e,t,u,i,r,"assets"),[e,t,u,i,r]),f=S.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let v=new Set,w=!1;if(t.forEach(y=>{var k;let x=i.routes[y.route.id];!x||!x.hasLoader||(!c.some(C=>C.route.id===y.route.id)&&y.route.id in l&&((k=o[y.route.id])!=null&&k.shouldRevalidate)||x.hasClientLoader?w=!0:v.add(y.route.id))}),v.size===0)return[];let m=Rv(e,a,s.unstable_trailingSlashAwareDataRequests,"data");return w&&v.size>0&&m.searchParams.set("_routes",t.filter(y=>v.has(y.route.id)).map(y=>y.route.id).join(",")),[m.pathname+m.search]},[a,s.unstable_trailingSlashAwareDataRequests,l,r,i,c,t,e,o]),g=S.useMemo(()=>yE(d,i),[d,i]),p=EE(d);return S.createElement(S.Fragment,null,f.map(v=>S.createElement("link",{key:v,rel:"prefetch",as:"fetch",href:v,...n})),g.map(v=>S.createElement("link",{key:v,rel:"modulepreload",href:v,...n})),p.map(({key:v,link:w})=>S.createElement("link",{key:v,nonce:n.nonce,...w,crossOrigin:w.crossOrigin??n.crossOrigin})))}function PE(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var RE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{RE&&(window.__reactRouterVersion="7.14.0")}catch{}function NE({basename:e,children:t,unstable_useTransitions:n,window:r}){let s=S.useRef();s.current==null&&(s.current=uC({window:r,v5Compat:!0}));let i=s.current,[o,a]=S.useState({action:i.action,location:i.location}),l=S.useCallback(u=>{n===!1?a(u):S.startTransition(()=>a(u))},[n]);return S.useLayoutEffect(()=>i.listen(l),[i,l]),S.createElement(sE,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:i,unstable_useTransitions:n})}var Nv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,jv=S.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:s,reloadDocument:i,replace:o,unstable_mask:a,state:l,target:u,to:c,preventScrollReset:d,viewTransition:f,unstable_defaultShouldRevalidate:g,...p},v){let{basename:w,navigator:m,unstable_useTransitions:y}=S.useContext(vt),x=typeof c=="string"&&Nv.test(c),k=vv(c,w);c=k.to;let C=UC(c,{relative:s}),b=Ut(),T=null;if(a){let U=bd(a,[],b.unstable_mask?b.unstable_mask.pathname:"/",!0);w!=="/"&&(U.pathname=U.pathname==="/"?w:Vt([w,U.pathname])),T=m.createHref(U)}let[P,L,R]=kE(r,p),B=OE(c,{replace:o,unstable_mask:a,state:l,target:u,preventScrollReset:d,relative:s,viewTransition:f,unstable_defaultShouldRevalidate:g,unstable_useTransitions:y});function A(U){t&&t(U),U.defaultPrevented||B(U)}let M=!(k.isExternal||i),_=S.createElement("a",{...p,...R,href:(M?T:void 0)||k.absoluteURL||C,onClick:M?A:t,ref:PE(v,L),target:u,"data-discover":!x&&n==="render"?"true":void 0});return P&&!x?S.createElement(S.Fragment,null,_,S.createElement(CE,{page:C})):_});jv.displayName="Link";var jE=S.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:s=!1,style:i,to:o,viewTransition:a,children:l,...u},c){let d=vi(o,{relative:u.relative}),f=Ut(),g=S.useContext(Aa),{navigator:p,basename:v}=S.useContext(vt),w=g!=null&&_E(d)&&a===!0,m=p.encodeLocation?p.encodeLocation(d).pathname:d.pathname,y=f.pathname,x=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;n||(y=y.toLowerCase(),x=x?x.toLowerCase():null,m=m.toLowerCase()),x&&v&&(x=rn(x,v)||x);const k=m!=="/"&&m.endsWith("/")?m.length-1:m.length;let C=y===m||!s&&y.startsWith(m)&&y.charAt(k)==="/",b=x!=null&&(x===m||!s&&x.startsWith(m)&&x.charAt(m.length)==="/"),T={isActive:C,isPending:b,isTransitioning:w},P=C?t:void 0,L;typeof r=="function"?L=r(T):L=[r,C?"active":null,b?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let R=typeof i=="function"?i(T):i;return S.createElement(jv,{...u,"aria-current":P,className:L,ref:c,style:R,to:o,viewTransition:a},typeof l=="function"?l(T):l)});jE.displayName="NavLink";var LE=S.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:s,state:i,method:o=mo,action:a,onSubmit:l,relative:u,preventScrollReset:c,viewTransition:d,unstable_defaultShouldRevalidate:f,...g},p)=>{let{unstable_useTransitions:v}=S.useContext(vt),w=FE(),m=IE(a,{relative:u}),y=o.toLowerCase()==="get"?"get":"post",x=typeof a=="string"&&Nv.test(a),k=C=>{if(l&&l(C),C.defaultPrevented)return;C.preventDefault();let b=C.nativeEvent.submitter,T=(b==null?void 0:b.getAttribute("formmethod"))||o,P=()=>w(b||C.currentTarget,{fetcherKey:t,method:T,navigate:n,replace:s,state:i,relative:u,preventScrollReset:c,viewTransition:d,unstable_defaultShouldRevalidate:f});v&&n!==!1?S.startTransition(()=>P()):P()};return S.createElement("form",{ref:p,method:y,action:m,onSubmit:r?l:k,...g,"data-discover":!x&&e==="render"?"true":void 0})});LE.displayName="Form";function AE(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Lv(e){let t=S.useContext(Jr);return he(t,AE(e)),t}function OE(e,{target:t,replace:n,unstable_mask:r,state:s,preventScrollReset:i,relative:o,viewTransition:a,unstable_defaultShouldRevalidate:l,unstable_useTransitions:u}={}){let c=yi(),d=Ut(),f=vi(e,{relative:o});return S.useCallback(g=>{if(cE(g,t)){g.preventDefault();let p=n!==void 0?n:ri(d)===ri(f),v=()=>c(e,{replace:p,unstable_mask:r,state:s,preventScrollReset:i,relative:o,viewTransition:a,unstable_defaultShouldRevalidate:l});u?S.startTransition(()=>v()):v()}},[d,c,f,n,r,s,t,e,i,o,a,l,u])}var DE=0,ME=()=>`__${String(++DE)}__`;function FE(){let{router:e}=Lv("useSubmit"),{basename:t}=S.useContext(vt),n=eE(),r=e.fetch,s=e.navigate;return S.useCallback(async(i,o={})=>{let{action:a,method:l,encType:u,formData:c,body:d}=hE(i,t);if(o.navigate===!1){let f=o.fetcherKey||ME();await r(f,n,o.action||a,{unstable_defaultShouldRevalidate:o.unstable_defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:c,body:d,formMethod:o.method||l,formEncType:o.encType||u,flushSync:o.flushSync})}else await s(o.action||a,{unstable_defaultShouldRevalidate:o.unstable_defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:c,body:d,formMethod:o.method||l,formEncType:o.encType||u,replace:o.replace,state:o.state,fromRouteId:n,flushSync:o.flushSync,viewTransition:o.viewTransition})},[r,s,t,n])}function IE(e,{relative:t}={}){let{basename:n}=S.useContext(vt),r=S.useContext(on);he(r,"useFormAction must be used inside a RouteContext");let[s]=r.matches.slice(-1),i={...vi(e||".",{relative:t})},o=Ut();if(e==null){i.search=o.search;let a=new URLSearchParams(i.search),l=a.getAll("index");if(l.some(c=>c==="")){a.delete("index"),l.filter(d=>d).forEach(d=>a.append("index",d));let c=a.toString();i.search=c?`?${c}`:""}}return(!e||e===".")&&s.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(i.pathname=i.pathname==="/"?n:Vt([n,i.pathname])),ri(i)}function _E(e,{relative:t}={}){let n=S.useContext(Sv);he(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Lv("useViewTransitionState"),s=vi(e,{relative:t});if(!n.isTransitioning)return!1;let i=rn(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=rn(n.nextLocation.pathname,r)||n.nextLocation.pathname;return ta(s.pathname,o)!=null||ta(s.pathname,i)!=null}function Av(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=Av(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function VE(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=Av(e))&&(r&&(r+=" "),r+=t);return r}const Od="-",zE=e=>{const t=BE(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(Od);return a[0]===""&&a.length!==1&&a.shift(),Ov(a,t)||$E(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},Ov=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?Ov(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(Od);return(o=t.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},sp=/^\[(.+)\]$/,$E=e=>{if(sp.test(e)){const t=sp.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},BE=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return HE(Object.entries(e.classGroups),n).forEach(([i,o])=>{ec(o,r,i,t)}),r},ec=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:ip(t,s);i.classGroupId=n;return}if(typeof s=="function"){if(UE(s)){ec(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,o])=>{ec(o,ip(t,i),n,r)})})},ip=(e,t)=>{let n=e;return t.split(Od).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},UE=e=>e.isThemeGetter,HE=(e,t)=>t?e.map(([n,r])=>{const s=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[t+o,a])):i);return[n,s]}):e,WE=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(i,o)=>{n.set(i,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let o=n.get(i);if(o!==void 0)return o;if((o=r.get(i))!==void 0)return s(i,o),o},set(i,o){n.has(i)?n.set(i,o):s(i,o)}}},Dv="!",KE=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],i=t.length,o=a=>{const l=[];let u=0,c=0,d;for(let w=0;w<a.length;w++){let m=a[w];if(u===0){if(m===s&&(r||a.slice(w,w+i)===t)){l.push(a.slice(c,w)),c=w+i;continue}if(m==="/"){d=w;continue}}m==="["?u++:m==="]"&&u--}const f=l.length===0?a:a.substring(c),g=f.startsWith(Dv),p=g?f.substring(1):f,v=d&&d>c?d-c:void 0;return{modifiers:l,hasImportantModifier:g,baseClassName:p,maybePostfixModifierPosition:v}};return n?a=>n({className:a,parseClassName:o}):o},GE=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},qE=e=>({cache:WE(e.cacheSize),parseClassName:KE(e),...zE(e)}),YE=/\s+/,XE=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,i=[],o=e.trim().split(YE);let a="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:c,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:g}=n(u);let p=!!g,v=r(p?f.substring(0,g):f);if(!v){if(!p){a=u+(a.length>0?" "+a:a);continue}if(v=r(f),!v){a=u+(a.length>0?" "+a:a);continue}p=!1}const w=GE(c).join(":"),m=d?w+Dv:w,y=m+v;if(i.includes(y))continue;i.push(y);const x=s(v,p);for(let k=0;k<x.length;++k){const C=x[k];i.push(m+C)}a=u+(a.length>0?" "+a:a)}return a};function QE(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Mv(t))&&(r&&(r+=" "),r+=n);return r}const Mv=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Mv(e[r]))&&(n&&(n+=" "),n+=t);return n};function JE(e,...t){let n,r,s,i=o;function o(l){const u=t.reduce((c,d)=>d(c),e());return n=qE(u),r=n.cache.get,s=n.cache.set,i=a,a(l)}function a(l){const u=r(l);if(u)return u;const c=XE(l,n);return s(l,c),c}return function(){return i(QE.apply(null,arguments))}}const ie=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Fv=/^\[(?:([a-z-]+):)?(.+)\]$/i,ZE=/^\d+\/\d+$/,eb=new Set(["px","full","screen"]),tb=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,nb=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,rb=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,sb=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ib=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Wt=e=>Fr(e)||eb.has(e)||ZE.test(e),un=e=>Zr(e,"length",hb),Fr=e=>!!e&&!Number.isNaN(Number(e)),jl=e=>Zr(e,"number",Fr),ms=e=>!!e&&Number.isInteger(Number(e)),ob=e=>e.endsWith("%")&&Fr(e.slice(0,-1)),K=e=>Fv.test(e),cn=e=>tb.test(e),ab=new Set(["length","size","percentage"]),lb=e=>Zr(e,ab,Iv),ub=e=>Zr(e,"position",Iv),cb=new Set(["image","url"]),db=e=>Zr(e,cb,mb),fb=e=>Zr(e,"",pb),gs=()=>!0,Zr=(e,t,n)=>{const r=Fv.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},hb=e=>nb.test(e)&&!rb.test(e),Iv=()=>!1,pb=e=>sb.test(e),mb=e=>ib.test(e),gb=()=>{const e=ie("colors"),t=ie("spacing"),n=ie("blur"),r=ie("brightness"),s=ie("borderColor"),i=ie("borderRadius"),o=ie("borderSpacing"),a=ie("borderWidth"),l=ie("contrast"),u=ie("grayscale"),c=ie("hueRotate"),d=ie("invert"),f=ie("gap"),g=ie("gradientColorStops"),p=ie("gradientColorStopPositions"),v=ie("inset"),w=ie("margin"),m=ie("opacity"),y=ie("padding"),x=ie("saturate"),k=ie("scale"),C=ie("sepia"),b=ie("skew"),T=ie("space"),P=ie("translate"),L=()=>["auto","contain","none"],R=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto",K,t],A=()=>[K,t],M=()=>["",Wt,un],_=()=>["auto",Fr,K],U=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],z=()=>["solid","dashed","dotted","double","none"],Z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],N=()=>["start","end","center","between","around","evenly","stretch"],D=()=>["","0",K],$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>[Fr,K];return{cacheSize:500,separator:":",theme:{colors:[gs],spacing:[Wt,un],blur:["none","",cn,K],brightness:V(),borderColor:[e],borderRadius:["none","","full",cn,K],borderSpacing:A(),borderWidth:M(),contrast:V(),grayscale:D(),hueRotate:V(),invert:D(),gap:A(),gradientColorStops:[e],gradientColorStopPositions:[ob,un],inset:B(),margin:B(),opacity:V(),padding:A(),saturate:V(),scale:V(),sepia:D(),skew:V(),space:A(),translate:A()},classGroups:{aspect:[{aspect:["auto","square","video",K]}],container:["container"],columns:[{columns:[cn]}],"break-after":[{"break-after":$()}],"break-before":[{"break-before":$()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...U(),K]}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ms,K]}],basis:[{basis:B()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",K]}],grow:[{grow:D()}],shrink:[{shrink:D()}],order:[{order:["first","last","none",ms,K]}],"grid-cols":[{"grid-cols":[gs]}],"col-start-end":[{col:["auto",{span:["full",ms,K]},K]}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":[gs]}],"row-start-end":[{row:["auto",{span:[ms,K]},K]}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",K]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",K]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...N()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...N(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...N(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",K,t]}],"min-w":[{"min-w":[K,t,"min","max","fit"]}],"max-w":[{"max-w":[K,t,"none","full","min","max","fit","prose",{screen:[cn]},cn]}],h:[{h:[K,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[K,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[K,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[K,t,"auto","min","max","fit"]}],"font-size":[{text:["base",cn,un]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",jl]}],"font-family":[{font:[gs]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",K]}],"line-clamp":[{"line-clamp":["none",Fr,jl]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Wt,K]}],"list-image":[{"list-image":["none",K]}],"list-style-type":[{list:["none","disc","decimal",K]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...z(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Wt,un]}],"underline-offset":[{"underline-offset":["auto",Wt,K]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",K]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",K]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...U(),ub]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",lb]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},db]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[g]}],"gradient-via":[{via:[g]}],"gradient-to":[{to:[g]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[m]}],"border-style":[{border:[...z(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[m]}],"divide-style":[{divide:z()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...z()]}],"outline-offset":[{"outline-offset":[Wt,K]}],"outline-w":[{outline:[Wt,un]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:M()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[Wt,un]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",cn,fb]}],"shadow-color":[{shadow:[gs]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":[...Z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Z()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",cn,K]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[x]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",K]}],duration:[{duration:V()}],ease:[{ease:["linear","in","out","in-out",K]}],delay:[{delay:V()}],animate:[{animate:["none","spin","ping","pulse","bounce",K]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[k]}],"scale-x":[{"scale-x":[k]}],"scale-y":[{"scale-y":[k]}],rotate:[{rotate:[ms,K]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[b]}],"skew-y":[{"skew-y":[b]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",K]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",K]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",K]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Wt,un,jl]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},yb=JE(gb);function te(...e){return yb(VE(e))}const Qt=S.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:te("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));Qt.displayName="Card";const si=S.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:te("flex flex-col space-y-1.5 p-6",e),...t}));si.displayName="CardHeader";const ii=S.forwardRef(({className:e,...t},n)=>h.jsx("h3",{ref:n,className:te("text-2xl font-semibold leading-none tracking-tight",e),...t}));ii.displayName="CardTitle";const Jt=S.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:te("p-6 pt-0",e),...t}));Jt.displayName="CardContent";const re=S.forwardRef(({className:e,variant:t="default",size:n="default",...r},s)=>h.jsx("button",{className:te("inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{"bg-primary text-primary-foreground hover:bg-primary/90":t==="default","bg-destructive text-destructive-foreground hover:bg-destructive/90":t==="destructive","border border-input bg-background hover:bg-accent hover:text-accent-foreground":t==="outline","hover:bg-accent hover:text-accent-foreground":t==="ghost"},{"h-10 px-4 py-2":n==="default","h-9 rounded-md px-3":n==="sm","h-11 rounded-md px-8":n==="lg"},e),ref:s,...r}));re.displayName="Button";const _v=S.forwardRef(({className:e,...t},n)=>h.jsx("div",{className:"relative w-full overflow-auto",children:h.jsx("table",{ref:n,className:te("w-full caption-bottom text-sm",e),...t})}));_v.displayName="Table";const Vv=S.forwardRef(({className:e,...t},n)=>h.jsx("thead",{ref:n,className:te("[&_tr]:border-b",e),...t}));Vv.displayName="TableHeader";const zv=S.forwardRef(({className:e,...t},n)=>h.jsx("tbody",{ref:n,className:te("[&_tr:last-child]:border-0",e),...t}));zv.displayName="TableBody";const vb=S.forwardRef(({className:e,...t},n)=>h.jsx("tfoot",{ref:n,className:te("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));vb.displayName="TableFooter";const tc=S.forwardRef(({className:e,...t},n)=>h.jsx("tr",{ref:n,className:te("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));tc.displayName="TableRow";const lt=S.forwardRef(({className:e,...t},n)=>h.jsx("th",{ref:n,className:te("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));lt.displayName="TableHead";const ut=S.forwardRef(({className:e,...t},n)=>h.jsx("td",{ref:n,className:te("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));ut.displayName="TableCell";const xb=S.forwardRef(({className:e,...t},n)=>h.jsx("caption",{ref:n,className:te("mt-4 text-sm text-muted-foreground",e),...t}));xb.displayName="TableCaption";function or({className:e,variant:t="default",...n}){return h.jsx("div",{className:te("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{"border-transparent bg-primary text-primary-foreground hover:bg-primary/80":t==="default","border-transparent bg-green-500 text-white hover:bg-green-600":t==="success","border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80":t==="destructive","border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80":t==="secondary","border-transparent bg-blue-500 text-white hover:bg-blue-600":t==="blue"},e),...n})}/**
59
+ Please change the parent <Route path="${m}"> to <Route path="${m==="/"?"*":`${m}/*`}">.`)}let c=Ut(),d;if(t){let m=typeof t=="string"?Qr(t):t;he(l==="/"||((w=m.pathname)==null?void 0:w.startsWith(l)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${l}" but pathname "${m.pathname}" was given in the \`location\` prop.`),d=m}else d=c;let f=d.pathname||"/",g=f;if(l!=="/"){let m=l.replace(/^\//,"").split("/");g="/"+f.replace(/^\//,"").split("/").slice(m.length).join("/")}let p=hv(e,{pathname:g});$t(u||p!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),$t(p==null||p[p.length-1].route.element!==void 0||p[p.length-1].route.Component!==void 0||p[p.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let v=XC(p&&p.map(m=>Object.assign({},m,{params:Object.assign({},o,m.params),pathname:Vt([l,r.encodeLocation?r.encodeLocation(m.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?l:Vt([l,r.encodeLocation?r.encodeLocation(m.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:m.pathnameBase])})),s,n);return t&&v?S.createElement(mi.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...d},navigationType:"POP"}},v):v}function KC(){let e=tE(),t=OC(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:r},i={padding:"2px 4px",backgroundColor:r},o=null;return console.error("Error handled by React Router default ErrorBoundary:",e),o=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:i},"ErrorBoundary")," or"," ",S.createElement("code",{style:i},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},t),n?S.createElement("pre",{style:s},n):null,o)}var GC=S.createElement(KC,null),Tv=class extends S.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=BC(e.digest);n&&(e=n)}let t=e!==void 0?S.createElement(on.Provider,{value:this.props.routeContext},S.createElement(Td.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?S.createElement(qC,{error:e},t):t}};Tv.contextType=wv;var Rl=new WeakMap;function qC({children:e,error:t}){let{basename:n}=S.useContext(xt);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=$C(t.digest);if(r){let s=Rl.get(t);if(s)throw s;let i=vv(r.location,n);if(yv&&!Rl.get(t))if(i.isExternal||r.reloadDocument)window.location.href=i.absoluteURL||i.to;else{const o=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:r.replace}));throw Rl.set(t,o),o}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i.absoluteURL||i.to}`})}}return e}function YC({routeContext:e,match:t,children:n}){let r=S.useContext(Jr);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),S.createElement(on.Provider,{value:e},n)}function XC(e,t=[],n){let r=n==null?void 0:n.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let s=e,i=r==null?void 0:r.errors;if(i!=null){let c=s.findIndex(d=>d.route.id&&(i==null?void 0:i[d.route.id])!==void 0);he(c>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),s=s.slice(0,Math.min(s.length,c+1))}let o=!1,a=-1;if(n&&r){o=r.renderFallback;for(let c=0;c<s.length;c++){let d=s[c];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(a=c),d.route.id){let{loaderData:f,errors:g}=r,p=d.route.loader&&!f.hasOwnProperty(d.route.id)&&(!g||g[d.route.id]===void 0);if(d.route.lazy||p){n.isStatic&&(o=!0),a>=0?s=s.slice(0,a+1):s=[s[0]];break}}}}let l=n==null?void 0:n.onError,u=r&&l?(c,d)=>{var f,g;l(c,{location:r.location,params:((g=(f=r.matches)==null?void 0:f[0])==null?void 0:g.params)??{},unstable_pattern:DC(r.matches),errorInfo:d})}:void 0;return s.reduceRight((c,d,f)=>{let g,p=!1,v=null,w=null;r&&(g=i&&d.route.id?i[d.route.id]:void 0,v=d.route.errorElement||GC,o&&(a<0&&f===0?(Pv("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,w=null):a===f&&(p=!0,w=d.route.hydrateFallbackElement||null)));let m=t.concat(s.slice(0,f+1)),y=()=>{let x;return g?x=v:p?x=w:d.route.Component?x=S.createElement(d.route.Component,null):d.route.element?x=d.route.element:x=c,S.createElement(YC,{match:d,routeContext:{outlet:c,matches:m,isDataRoute:r!=null},children:x})};return r&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?S.createElement(Tv,{location:r.location,revalidation:r.revalidation,component:v,error:g,children:y(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:u}):y()},null)}function Pd(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function QC(e){let t=S.useContext(Jr);return he(t,Pd(e)),t}function JC(e){let t=S.useContext(Aa);return he(t,Pd(e)),t}function ZC(e){let t=S.useContext(on);return he(t,Pd(e)),t}function Rd(e){let t=ZC(e),n=t.matches[t.matches.length-1];return he(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function eE(){return Rd("useRouteId")}function tE(){var r;let e=S.useContext(Td),t=JC("useRouteError"),n=Rd("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function nE(){let{router:e}=QC("useNavigate"),t=Rd("useNavigate"),n=S.useRef(!1);return Ev(()=>{n.current=!0}),S.useCallback(async(s,i={})=>{$t(n.current,Cv),n.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:t,...i}))},[e,t])}var np={};function Pv(e,t,n){!t&&!np[e]&&(np[e]=!0,$t(!1,n))}S.memo(rE);function rE({routes:e,future:t,state:n,isStatic:r,onError:s}){return bv(e,void 0,{state:n,isStatic:r,onError:s})}function po(e){he(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function sE({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:s,static:i=!1,unstable_useTransitions:o}){he(!gi(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let a=e.replace(/^\/*/,"/"),l=S.useMemo(()=>({basename:a,navigator:s,static:i,unstable_useTransitions:o,future:{}}),[a,s,i,o]);typeof n=="string"&&(n=Qr(n));let{pathname:u="/",search:c="",hash:d="",state:f=null,key:g="default",unstable_mask:p}=n,v=S.useMemo(()=>{let w=rn(u,a);return w==null?null:{location:{pathname:w,search:c,hash:d,state:f,key:g,unstable_mask:p},navigationType:r}},[a,u,c,d,f,g,r,p]);return $t(v!=null,`<Router basename="${a}"> is not able to match the URL "${u}${c}${d}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:S.createElement(xt.Provider,{value:l},S.createElement(mi.Provider,{children:t,value:v}))}function iE({children:e,location:t}){return WC(Zu(e),t)}function Zu(e,t=[]){let n=[];return S.Children.forEach(e,(r,s)=>{if(!S.isValidElement(r))return;let i=[...t,s];if(r.type===S.Fragment){n.push.apply(n,Zu(r.props.children,i));return}he(r.type===po,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),he(!r.props.index||!r.props.children,"An index route cannot have child routes.");let o={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Zu(r.props.children,i)),n.push(o)}),n}var mo="get",go="application/x-www-form-urlencoded";function Oa(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function oE(e){return Oa(e)&&e.tagName.toLowerCase()==="button"}function aE(e){return Oa(e)&&e.tagName.toLowerCase()==="form"}function lE(e){return Oa(e)&&e.tagName.toLowerCase()==="input"}function uE(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function cE(e,t){return e.button===0&&(!t||t==="_self")&&!uE(e)}var qi=null;function dE(){if(qi===null)try{new FormData(document.createElement("form"),0),qi=!1}catch{qi=!0}return qi}var fE=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Nl(e){return e!=null&&!fE.has(e)?($t(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${go}"`),null):e}function hE(e,t){let n,r,s,i,o;if(aE(e)){let a=e.getAttribute("action");r=a?rn(a,t):null,n=e.getAttribute("method")||mo,s=Nl(e.getAttribute("enctype"))||go,i=new FormData(e)}else if(oE(e)||lE(e)&&(e.type==="submit"||e.type==="image")){let a=e.form;if(a==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||a.getAttribute("action");if(r=l?rn(l,t):null,n=e.getAttribute("formmethod")||a.getAttribute("method")||mo,s=Nl(e.getAttribute("formenctype"))||Nl(a.getAttribute("enctype"))||go,i=new FormData(a,e),!dE()){let{name:u,type:c,value:d}=e;if(c==="image"){let f=u?`${u}.`:"";i.append(`${f}x`,"0"),i.append(`${f}y`,"0")}else u&&i.append(u,d)}}else{if(Oa(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=mo,r=null,s=go,o=e}return i&&s==="text/plain"&&(o=i,i=void 0),{action:r,method:n.toLowerCase(),encType:s,formData:i,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Nd(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Rv(e,t,n,r){let s=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${r}`:s.pathname=`${s.pathname}.${r}`:s.pathname==="/"?s.pathname=`_root.${r}`:t&&rn(s.pathname,t)==="/"?s.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:s.pathname=`${s.pathname.replace(/\/$/,"")}.${r}`,s}async function pE(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function mE(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function gE(e,t,n){let r=await Promise.all(e.map(async s=>{let i=t.routes[s.route.id];if(i){let o=await pE(i,n);return o.links?o.links():[]}return[]}));return wE(r.flat(1).filter(mE).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function rp(e,t,n,r,s,i){let o=(l,u)=>n[u]?l.route.id!==n[u].route.id:!0,a=(l,u)=>{var c;return n[u].pathname!==l.pathname||((c=n[u].route.path)==null?void 0:c.endsWith("*"))&&n[u].params["*"]!==l.params["*"]};return i==="assets"?t.filter((l,u)=>o(l,u)||a(l,u)):i==="data"?t.filter((l,u)=>{var d;let c=r.routes[l.route.id];if(!c||!c.hasLoader)return!1;if(o(l,u)||a(l,u))return!0;if(l.route.shouldRevalidate){let f=l.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:((d=n[0])==null?void 0:d.params)||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof f=="boolean")return f}return!0}):[]}function yE(e,t,{includeHydrateFallback:n}={}){return vE(e.map(r=>{let s=t.routes[r.route.id];if(!s)return[];let i=[s.module];return s.clientActionModule&&(i=i.concat(s.clientActionModule)),s.clientLoaderModule&&(i=i.concat(s.clientLoaderModule)),n&&s.hydrateFallbackModule&&(i=i.concat(s.hydrateFallbackModule)),s.imports&&(i=i.concat(s.imports)),i}).flat(1))}function vE(e){return[...new Set(e)]}function xE(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function wE(e,t){let n=new Set;return new Set(t),e.reduce((r,s)=>{let i=JSON.stringify(xE(s));return n.has(i)||(n.add(i),r.push({key:i,link:s})),r},[])}function jd(){let e=S.useContext(Jr);return Nd(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function SE(){let e=S.useContext(Aa);return Nd(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Ld=S.createContext(void 0);Ld.displayName="FrameworkContext";function Ad(){let e=S.useContext(Ld);return Nd(e,"You must render this element inside a <HydratedRouter> element"),e}function kE(e,t){let n=S.useContext(Ld),[r,s]=S.useState(!1),[i,o]=S.useState(!1),{onFocus:a,onBlur:l,onMouseEnter:u,onMouseLeave:c,onTouchStart:d}=t,f=S.useRef(null);S.useEffect(()=>{if(e==="render"&&o(!0),e==="viewport"){let v=m=>{m.forEach(y=>{o(y.isIntersecting)})},w=new IntersectionObserver(v,{threshold:.5});return f.current&&w.observe(f.current),()=>{w.disconnect()}}},[e]),S.useEffect(()=>{if(r){let v=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(v)}}},[r]);let g=()=>{s(!0)},p=()=>{s(!1),o(!1)};return n?e!=="intent"?[i,f,{}]:[i,f,{onFocus:ps(a,g),onBlur:ps(l,p),onMouseEnter:ps(u,g),onMouseLeave:ps(c,p),onTouchStart:ps(d,g)}]:[!1,f,{}]}function ps(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function CE({page:e,...t}){let n=FC(),{router:r}=jd(),s=S.useMemo(()=>hv(r.routes,e,r.basename),[r.routes,e,r.basename]);return s?n?S.createElement(bE,{page:e,matches:s,...t}):S.createElement(TE,{page:e,matches:s,...t}):null}function EE(e){let{manifest:t,routeModules:n}=Ad(),[r,s]=S.useState([]);return S.useEffect(()=>{let i=!1;return gE(e,t,n).then(o=>{i||s(o)}),()=>{i=!0}},[e,t,n]),r}function bE({page:e,matches:t,...n}){let r=Ut(),{future:s}=Ad(),{basename:i}=jd(),o=S.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let a=Rv(e,i,s.unstable_trailingSlashAwareDataRequests,"rsc"),l=!1,u=[];for(let c of t)typeof c.route.shouldRevalidate=="function"?l=!0:u.push(c.route.id);return l&&u.length>0&&a.searchParams.set("_routes",u.join(",")),[a.pathname+a.search]},[i,s.unstable_trailingSlashAwareDataRequests,e,r,t]);return S.createElement(S.Fragment,null,o.map(a=>S.createElement("link",{key:a,rel:"prefetch",as:"fetch",href:a,...n})))}function TE({page:e,matches:t,...n}){let r=Ut(),{future:s,manifest:i,routeModules:o}=Ad(),{basename:a}=jd(),{loaderData:l,matches:u}=SE(),c=S.useMemo(()=>rp(e,t,u,i,r,"data"),[e,t,u,i,r]),d=S.useMemo(()=>rp(e,t,u,i,r,"assets"),[e,t,u,i,r]),f=S.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let v=new Set,w=!1;if(t.forEach(y=>{var k;let x=i.routes[y.route.id];!x||!x.hasLoader||(!c.some(C=>C.route.id===y.route.id)&&y.route.id in l&&((k=o[y.route.id])!=null&&k.shouldRevalidate)||x.hasClientLoader?w=!0:v.add(y.route.id))}),v.size===0)return[];let m=Rv(e,a,s.unstable_trailingSlashAwareDataRequests,"data");return w&&v.size>0&&m.searchParams.set("_routes",t.filter(y=>v.has(y.route.id)).map(y=>y.route.id).join(",")),[m.pathname+m.search]},[a,s.unstable_trailingSlashAwareDataRequests,l,r,i,c,t,e,o]),g=S.useMemo(()=>yE(d,i),[d,i]),p=EE(d);return S.createElement(S.Fragment,null,f.map(v=>S.createElement("link",{key:v,rel:"prefetch",as:"fetch",href:v,...n})),g.map(v=>S.createElement("link",{key:v,rel:"modulepreload",href:v,...n})),p.map(({key:v,link:w})=>S.createElement("link",{key:v,nonce:n.nonce,...w,crossOrigin:w.crossOrigin??n.crossOrigin})))}function PE(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var RE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{RE&&(window.__reactRouterVersion="7.14.0")}catch{}function NE({basename:e,children:t,unstable_useTransitions:n,window:r}){let s=S.useRef();s.current==null&&(s.current=uC({window:r,v5Compat:!0}));let i=s.current,[o,a]=S.useState({action:i.action,location:i.location}),l=S.useCallback(u=>{n===!1?a(u):S.startTransition(()=>a(u))},[n]);return S.useLayoutEffect(()=>i.listen(l),[i,l]),S.createElement(sE,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:i,unstable_useTransitions:n})}var Nv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,jv=S.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:s,reloadDocument:i,replace:o,unstable_mask:a,state:l,target:u,to:c,preventScrollReset:d,viewTransition:f,unstable_defaultShouldRevalidate:g,...p},v){let{basename:w,navigator:m,unstable_useTransitions:y}=S.useContext(xt),x=typeof c=="string"&&Nv.test(c),k=vv(c,w);c=k.to;let C=UC(c,{relative:s}),b=Ut(),T=null;if(a){let U=bd(a,[],b.unstable_mask?b.unstable_mask.pathname:"/",!0);w!=="/"&&(U.pathname=U.pathname==="/"?w:Vt([w,U.pathname])),T=m.createHref(U)}let[P,L,R]=kE(r,p),B=OE(c,{replace:o,unstable_mask:a,state:l,target:u,preventScrollReset:d,relative:s,viewTransition:f,unstable_defaultShouldRevalidate:g,unstable_useTransitions:y});function A(U){t&&t(U),U.defaultPrevented||B(U)}let M=!(k.isExternal||i),_=S.createElement("a",{...p,...R,href:(M?T:void 0)||k.absoluteURL||C,onClick:M?A:t,ref:PE(v,L),target:u,"data-discover":!x&&n==="render"?"true":void 0});return P&&!x?S.createElement(S.Fragment,null,_,S.createElement(CE,{page:C})):_});jv.displayName="Link";var jE=S.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:s=!1,style:i,to:o,viewTransition:a,children:l,...u},c){let d=vi(o,{relative:u.relative}),f=Ut(),g=S.useContext(Aa),{navigator:p,basename:v}=S.useContext(xt),w=g!=null&&_E(d)&&a===!0,m=p.encodeLocation?p.encodeLocation(d).pathname:d.pathname,y=f.pathname,x=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;n||(y=y.toLowerCase(),x=x?x.toLowerCase():null,m=m.toLowerCase()),x&&v&&(x=rn(x,v)||x);const k=m!=="/"&&m.endsWith("/")?m.length-1:m.length;let C=y===m||!s&&y.startsWith(m)&&y.charAt(k)==="/",b=x!=null&&(x===m||!s&&x.startsWith(m)&&x.charAt(m.length)==="/"),T={isActive:C,isPending:b,isTransitioning:w},P=C?t:void 0,L;typeof r=="function"?L=r(T):L=[r,C?"active":null,b?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let R=typeof i=="function"?i(T):i;return S.createElement(jv,{...u,"aria-current":P,className:L,ref:c,style:R,to:o,viewTransition:a},typeof l=="function"?l(T):l)});jE.displayName="NavLink";var LE=S.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:s,state:i,method:o=mo,action:a,onSubmit:l,relative:u,preventScrollReset:c,viewTransition:d,unstable_defaultShouldRevalidate:f,...g},p)=>{let{unstable_useTransitions:v}=S.useContext(xt),w=FE(),m=IE(a,{relative:u}),y=o.toLowerCase()==="get"?"get":"post",x=typeof a=="string"&&Nv.test(a),k=C=>{if(l&&l(C),C.defaultPrevented)return;C.preventDefault();let b=C.nativeEvent.submitter,T=(b==null?void 0:b.getAttribute("formmethod"))||o,P=()=>w(b||C.currentTarget,{fetcherKey:t,method:T,navigate:n,replace:s,state:i,relative:u,preventScrollReset:c,viewTransition:d,unstable_defaultShouldRevalidate:f});v&&n!==!1?S.startTransition(()=>P()):P()};return S.createElement("form",{ref:p,method:y,action:m,onSubmit:r?l:k,...g,"data-discover":!x&&e==="render"?"true":void 0})});LE.displayName="Form";function AE(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Lv(e){let t=S.useContext(Jr);return he(t,AE(e)),t}function OE(e,{target:t,replace:n,unstable_mask:r,state:s,preventScrollReset:i,relative:o,viewTransition:a,unstable_defaultShouldRevalidate:l,unstable_useTransitions:u}={}){let c=yi(),d=Ut(),f=vi(e,{relative:o});return S.useCallback(g=>{if(cE(g,t)){g.preventDefault();let p=n!==void 0?n:ri(d)===ri(f),v=()=>c(e,{replace:p,unstable_mask:r,state:s,preventScrollReset:i,relative:o,viewTransition:a,unstable_defaultShouldRevalidate:l});u?S.startTransition(()=>v()):v()}},[d,c,f,n,r,s,t,e,i,o,a,l,u])}var DE=0,ME=()=>`__${String(++DE)}__`;function FE(){let{router:e}=Lv("useSubmit"),{basename:t}=S.useContext(xt),n=eE(),r=e.fetch,s=e.navigate;return S.useCallback(async(i,o={})=>{let{action:a,method:l,encType:u,formData:c,body:d}=hE(i,t);if(o.navigate===!1){let f=o.fetcherKey||ME();await r(f,n,o.action||a,{unstable_defaultShouldRevalidate:o.unstable_defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:c,body:d,formMethod:o.method||l,formEncType:o.encType||u,flushSync:o.flushSync})}else await s(o.action||a,{unstable_defaultShouldRevalidate:o.unstable_defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:c,body:d,formMethod:o.method||l,formEncType:o.encType||u,replace:o.replace,state:o.state,fromRouteId:n,flushSync:o.flushSync,viewTransition:o.viewTransition})},[r,s,t,n])}function IE(e,{relative:t}={}){let{basename:n}=S.useContext(xt),r=S.useContext(on);he(r,"useFormAction must be used inside a RouteContext");let[s]=r.matches.slice(-1),i={...vi(e||".",{relative:t})},o=Ut();if(e==null){i.search=o.search;let a=new URLSearchParams(i.search),l=a.getAll("index");if(l.some(c=>c==="")){a.delete("index"),l.filter(d=>d).forEach(d=>a.append("index",d));let c=a.toString();i.search=c?`?${c}`:""}}return(!e||e===".")&&s.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(i.pathname=i.pathname==="/"?n:Vt([n,i.pathname])),ri(i)}function _E(e,{relative:t}={}){let n=S.useContext(Sv);he(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Lv("useViewTransitionState"),s=vi(e,{relative:t});if(!n.isTransitioning)return!1;let i=rn(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=rn(n.nextLocation.pathname,r)||n.nextLocation.pathname;return ta(s.pathname,o)!=null||ta(s.pathname,i)!=null}function Av(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=Av(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function VE(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=Av(e))&&(r&&(r+=" "),r+=t);return r}const Od="-",zE=e=>{const t=BE(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(Od);return a[0]===""&&a.length!==1&&a.shift(),Ov(a,t)||$E(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},Ov=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?Ov(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(Od);return(o=t.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},sp=/^\[(.+)\]$/,$E=e=>{if(sp.test(e)){const t=sp.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},BE=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return HE(Object.entries(e.classGroups),n).forEach(([i,o])=>{ec(o,r,i,t)}),r},ec=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:ip(t,s);i.classGroupId=n;return}if(typeof s=="function"){if(UE(s)){ec(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,o])=>{ec(o,ip(t,i),n,r)})})},ip=(e,t)=>{let n=e;return t.split(Od).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},UE=e=>e.isThemeGetter,HE=(e,t)=>t?e.map(([n,r])=>{const s=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[t+o,a])):i);return[n,s]}):e,WE=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(i,o)=>{n.set(i,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let o=n.get(i);if(o!==void 0)return o;if((o=r.get(i))!==void 0)return s(i,o),o},set(i,o){n.has(i)?n.set(i,o):s(i,o)}}},Dv="!",KE=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],i=t.length,o=a=>{const l=[];let u=0,c=0,d;for(let w=0;w<a.length;w++){let m=a[w];if(u===0){if(m===s&&(r||a.slice(w,w+i)===t)){l.push(a.slice(c,w)),c=w+i;continue}if(m==="/"){d=w;continue}}m==="["?u++:m==="]"&&u--}const f=l.length===0?a:a.substring(c),g=f.startsWith(Dv),p=g?f.substring(1):f,v=d&&d>c?d-c:void 0;return{modifiers:l,hasImportantModifier:g,baseClassName:p,maybePostfixModifierPosition:v}};return n?a=>n({className:a,parseClassName:o}):o},GE=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},qE=e=>({cache:WE(e.cacheSize),parseClassName:KE(e),...zE(e)}),YE=/\s+/,XE=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,i=[],o=e.trim().split(YE);let a="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:c,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:g}=n(u);let p=!!g,v=r(p?f.substring(0,g):f);if(!v){if(!p){a=u+(a.length>0?" "+a:a);continue}if(v=r(f),!v){a=u+(a.length>0?" "+a:a);continue}p=!1}const w=GE(c).join(":"),m=d?w+Dv:w,y=m+v;if(i.includes(y))continue;i.push(y);const x=s(v,p);for(let k=0;k<x.length;++k){const C=x[k];i.push(m+C)}a=u+(a.length>0?" "+a:a)}return a};function QE(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Mv(t))&&(r&&(r+=" "),r+=n);return r}const Mv=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Mv(e[r]))&&(n&&(n+=" "),n+=t);return n};function JE(e,...t){let n,r,s,i=o;function o(l){const u=t.reduce((c,d)=>d(c),e());return n=qE(u),r=n.cache.get,s=n.cache.set,i=a,a(l)}function a(l){const u=r(l);if(u)return u;const c=XE(l,n);return s(l,c),c}return function(){return i(QE.apply(null,arguments))}}const ie=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Fv=/^\[(?:([a-z-]+):)?(.+)\]$/i,ZE=/^\d+\/\d+$/,eb=new Set(["px","full","screen"]),tb=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,nb=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,rb=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,sb=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ib=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Wt=e=>Fr(e)||eb.has(e)||ZE.test(e),un=e=>Zr(e,"length",hb),Fr=e=>!!e&&!Number.isNaN(Number(e)),jl=e=>Zr(e,"number",Fr),ms=e=>!!e&&Number.isInteger(Number(e)),ob=e=>e.endsWith("%")&&Fr(e.slice(0,-1)),K=e=>Fv.test(e),cn=e=>tb.test(e),ab=new Set(["length","size","percentage"]),lb=e=>Zr(e,ab,Iv),ub=e=>Zr(e,"position",Iv),cb=new Set(["image","url"]),db=e=>Zr(e,cb,mb),fb=e=>Zr(e,"",pb),gs=()=>!0,Zr=(e,t,n)=>{const r=Fv.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},hb=e=>nb.test(e)&&!rb.test(e),Iv=()=>!1,pb=e=>sb.test(e),mb=e=>ib.test(e),gb=()=>{const e=ie("colors"),t=ie("spacing"),n=ie("blur"),r=ie("brightness"),s=ie("borderColor"),i=ie("borderRadius"),o=ie("borderSpacing"),a=ie("borderWidth"),l=ie("contrast"),u=ie("grayscale"),c=ie("hueRotate"),d=ie("invert"),f=ie("gap"),g=ie("gradientColorStops"),p=ie("gradientColorStopPositions"),v=ie("inset"),w=ie("margin"),m=ie("opacity"),y=ie("padding"),x=ie("saturate"),k=ie("scale"),C=ie("sepia"),b=ie("skew"),T=ie("space"),P=ie("translate"),L=()=>["auto","contain","none"],R=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto",K,t],A=()=>[K,t],M=()=>["",Wt,un],_=()=>["auto",Fr,K],U=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],z=()=>["solid","dashed","dotted","double","none"],Z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],N=()=>["start","end","center","between","around","evenly","stretch"],D=()=>["","0",K],$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>[Fr,K];return{cacheSize:500,separator:":",theme:{colors:[gs],spacing:[Wt,un],blur:["none","",cn,K],brightness:V(),borderColor:[e],borderRadius:["none","","full",cn,K],borderSpacing:A(),borderWidth:M(),contrast:V(),grayscale:D(),hueRotate:V(),invert:D(),gap:A(),gradientColorStops:[e],gradientColorStopPositions:[ob,un],inset:B(),margin:B(),opacity:V(),padding:A(),saturate:V(),scale:V(),sepia:D(),skew:V(),space:A(),translate:A()},classGroups:{aspect:[{aspect:["auto","square","video",K]}],container:["container"],columns:[{columns:[cn]}],"break-after":[{"break-after":$()}],"break-before":[{"break-before":$()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...U(),K]}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ms,K]}],basis:[{basis:B()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",K]}],grow:[{grow:D()}],shrink:[{shrink:D()}],order:[{order:["first","last","none",ms,K]}],"grid-cols":[{"grid-cols":[gs]}],"col-start-end":[{col:["auto",{span:["full",ms,K]},K]}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":[gs]}],"row-start-end":[{row:["auto",{span:[ms,K]},K]}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",K]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",K]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...N()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...N(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...N(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",K,t]}],"min-w":[{"min-w":[K,t,"min","max","fit"]}],"max-w":[{"max-w":[K,t,"none","full","min","max","fit","prose",{screen:[cn]},cn]}],h:[{h:[K,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[K,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[K,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[K,t,"auto","min","max","fit"]}],"font-size":[{text:["base",cn,un]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",jl]}],"font-family":[{font:[gs]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",K]}],"line-clamp":[{"line-clamp":["none",Fr,jl]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Wt,K]}],"list-image":[{"list-image":["none",K]}],"list-style-type":[{list:["none","disc","decimal",K]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...z(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Wt,un]}],"underline-offset":[{"underline-offset":["auto",Wt,K]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",K]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",K]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...U(),ub]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",lb]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},db]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[g]}],"gradient-via":[{via:[g]}],"gradient-to":[{to:[g]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[m]}],"border-style":[{border:[...z(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[m]}],"divide-style":[{divide:z()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...z()]}],"outline-offset":[{"outline-offset":[Wt,K]}],"outline-w":[{outline:[Wt,un]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:M()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[Wt,un]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",cn,fb]}],"shadow-color":[{shadow:[gs]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":[...Z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Z()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",cn,K]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[x]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",K]}],duration:[{duration:V()}],ease:[{ease:["linear","in","out","in-out",K]}],delay:[{delay:V()}],animate:[{animate:["none","spin","ping","pulse","bounce",K]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[k]}],"scale-x":[{"scale-x":[k]}],"scale-y":[{"scale-y":[k]}],rotate:[{rotate:[ms,K]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[b]}],"skew-y":[{"skew-y":[b]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",K]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",K]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",K]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Wt,un,jl]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},yb=JE(gb);function te(...e){return yb(VE(e))}const Qt=S.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:te("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));Qt.displayName="Card";const si=S.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:te("flex flex-col space-y-1.5 p-6",e),...t}));si.displayName="CardHeader";const ii=S.forwardRef(({className:e,...t},n)=>h.jsx("h3",{ref:n,className:te("text-2xl font-semibold leading-none tracking-tight",e),...t}));ii.displayName="CardTitle";const Jt=S.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:te("p-6 pt-0",e),...t}));Jt.displayName="CardContent";const re=S.forwardRef(({className:e,variant:t="default",size:n="default",...r},s)=>h.jsx("button",{className:te("inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{"bg-primary text-primary-foreground hover:bg-primary/90":t==="default","bg-destructive text-destructive-foreground hover:bg-destructive/90":t==="destructive","border border-input bg-background hover:bg-accent hover:text-accent-foreground":t==="outline","hover:bg-accent hover:text-accent-foreground":t==="ghost"},{"h-10 px-4 py-2":n==="default","h-9 rounded-md px-3":n==="sm","h-11 rounded-md px-8":n==="lg"},e),ref:s,...r}));re.displayName="Button";const _v=S.forwardRef(({className:e,...t},n)=>h.jsx("div",{className:"relative w-full overflow-auto",children:h.jsx("table",{ref:n,className:te("w-full caption-bottom text-sm",e),...t})}));_v.displayName="Table";const Vv=S.forwardRef(({className:e,...t},n)=>h.jsx("thead",{ref:n,className:te("[&_tr]:border-b",e),...t}));Vv.displayName="TableHeader";const zv=S.forwardRef(({className:e,...t},n)=>h.jsx("tbody",{ref:n,className:te("[&_tr:last-child]:border-0",e),...t}));zv.displayName="TableBody";const vb=S.forwardRef(({className:e,...t},n)=>h.jsx("tfoot",{ref:n,className:te("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));vb.displayName="TableFooter";const tc=S.forwardRef(({className:e,...t},n)=>h.jsx("tr",{ref:n,className:te("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));tc.displayName="TableRow";const ut=S.forwardRef(({className:e,...t},n)=>h.jsx("th",{ref:n,className:te("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));ut.displayName="TableHead";const ct=S.forwardRef(({className:e,...t},n)=>h.jsx("td",{ref:n,className:te("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));ct.displayName="TableCell";const xb=S.forwardRef(({className:e,...t},n)=>h.jsx("caption",{ref:n,className:te("mt-4 text-sm text-muted-foreground",e),...t}));xb.displayName="TableCaption";function or({className:e,variant:t="default",...n}){return h.jsx("div",{className:te("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{"border-transparent bg-primary text-primary-foreground hover:bg-primary/80":t==="default","border-transparent bg-green-500 text-white hover:bg-green-600":t==="success","border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80":t==="destructive","border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80":t==="secondary","border-transparent bg-blue-500 text-white hover:bg-blue-600":t==="blue"},e),...n})}/**
60
60
  * @license lucide-react v0.400.0 - ISC
61
61
  *
62
62
  * This source code is licensed under the ISC license.
@@ -201,12 +201,12 @@ Please change the parent <Route path="${m}"> to <Route path="${m==="/"?"*":`${m}
201
201
  *
202
202
  * This source code is licensed under the ISC license.
203
203
  * See the LICENSE file in the root directory of this source tree.
204
- */const Ma=ue("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ra=S.forwardRef(({className:e,checked:t,onCheckedChange:n,...r},s)=>h.jsx("button",{type:"button",role:"checkbox","aria-checked":t,className:te("h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50",t&&"bg-primary text-primary-foreground",e),onClick:()=>n==null?void 0:n(!t),ref:s,...r,children:t&&h.jsx(Da,{className:"h-3 w-3"})}));ra.displayName="Checkbox";const Fa=S.createContext({open:!1,setOpen:()=>{}});function Ib({children:e}){const[t,n]=S.useState(!1);return h.jsx(Fa.Provider,{value:{open:t,setOpen:n},children:h.jsx("div",{className:"relative inline-block",children:e})})}function _b({children:e,className:t}){const{open:n,setOpen:r}=S.useContext(Fa);return h.jsx("button",{type:"button",className:t,onClick:()=>r(!n),children:e})}function Vb({children:e,className:t,align:n="end"}){const{open:r,setOpen:s}=S.useContext(Fa),i=S.useRef(null);return S.useEffect(()=>{if(!r)return;const o=a=>{i.current&&!i.current.contains(a.target)&&s(!1)};return document.addEventListener("mousedown",o),()=>document.removeEventListener("mousedown",o)},[r,s]),r?h.jsx("div",{ref:i,className:te("absolute z-50 mt-1 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",n==="end"?"right-0":"left-0",t),children:e}):null}function Dl({children:e,className:t,disabled:n,onSelect:r}){const{setOpen:s}=S.useContext(Fa);return h.jsx("button",{type:"button",className:te("relative flex w-full cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors","hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",n&&"pointer-events-none opacity-50",t),disabled:n,onClick:()=>{r==null||r(),s(!1)},children:e})}function nc(){const{i18n:e}=La(),[t,n]=S.useState(!1),r=[{code:"zh",name:"中文",flag:"🇨🇳"},{code:"en",name:"English",flag:"🇺🇸"}],s=r.find(o=>o.code===e.language),i=o=>{e.changeLanguage(o),localStorage.setItem("language",o),n(!1)};return h.jsxs("div",{className:"relative",children:[h.jsxs(re,{variant:"outline",size:"sm",onClick:()=>n(!t),children:[h.jsx(Tb,{className:"h-4 w-4 mr-2"}),s==null?void 0:s.flag," ",s==null?void 0:s.name]}),t&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>n(!1)}),h.jsx("div",{className:"absolute right-0 mt-2 w-48 bg-white dark:bg-gray-800 rounded-lg shadow-lg border border-gray-200 dark:border-gray-700 z-50",children:r.map(o=>h.jsxs("button",{onClick:()=>i(o.code),className:"w-full px-4 py-3 text-left hover:bg-gray-100 dark:hover:bg-gray-700 first:rounded-t-lg last:rounded-b-lg flex items-center justify-between",children:[h.jsxs("span",{className:"flex items-center",children:[h.jsx("span",{className:"text-xl mr-3",children:o.flag}),h.jsx("span",{className:"text-sm",children:o.name})]}),(s==null?void 0:s.code)===o.code&&h.jsx(Da,{className:"h-4 w-4 text-green-500"})]},o.code))})]})]})}function zb({isOpen:e,onClose:t,nodeId:n,currentName:r,onSave:s}){const[i,o]=S.useState(r),[a,l]=S.useState(!1),[u,c]=S.useState(null);S.useEffect(()=>{e&&(o(r),c(null))},[e,r]);const d=async f=>{if(f.preventDefault(),!i.trim()){c("名称不能为空");return}if(i===r){t();return}l(!0),c(null);try{await s(n,i.trim()),t()}catch(g){c(g instanceof Error?g.message:"保存失败"),l(!1)}};return e?h.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[h.jsx("div",{className:"absolute inset-0 bg-black/50",onClick:t}),h.jsxs(Qt,{className:"relative z-10 w-full max-w-md",children:[h.jsx(si,{children:h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx(ii,{children:"修改节点名称"}),h.jsx(re,{variant:"ghost",size:"sm",onClick:t,children:h.jsx(Ma,{className:"h-4 w-4"})})]})}),h.jsx(Jt,{children:h.jsxs("form",{onSubmit:d,className:"space-y-4",children:[h.jsxs("div",{children:[h.jsx("label",{className:"block text-sm font-medium mb-2",children:"节点 ID"}),h.jsx("div",{className:"text-sm text-muted-foreground bg-muted/50 p-2 rounded",children:n})]}),h.jsxs("div",{children:[h.jsxs("label",{className:"block text-sm font-medium mb-2",children:["节点名称 ",h.jsx("span",{className:"text-red-500",children:"*"})]}),h.jsx("input",{type:"text",value:i,onChange:f=>o(f.target.value),placeholder:"请输入节点名称",className:"w-full px-3 py-2 border border-input bg-background rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",disabled:a,autoFocus:!0}),u&&h.jsx("p",{className:"text-sm text-destructive mt-1",children:u})]}),h.jsxs("div",{className:"flex gap-2 justify-end",children:[h.jsx(re,{type:"button",variant:"outline",onClick:t,disabled:a,children:"取消"}),h.jsx(re,{type:"submit",disabled:a,className:"flex items-center gap-2",children:a?h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"h-4 w-4 border-2 border-primary border-t-transparent rounded-full animate-spin"}),"保存中..."]}):h.jsxs(h.Fragment,{children:[h.jsx(Da,{className:"h-4 w-4"}),"保存"]})})]})]})})]})]}):null}function $b({status:e}){return h.jsx(or,{variant:e==="running"?"blue":"destructive",className:"whitespace-nowrap",children:e})}function Bb({node:e,selected:t,onToggle:n,onViewConfig:r,onViewLogs:s,getGatewayStatus:i,formatUptime:o,formatLastSeen:a}){var u,c,d,f;const{t:l}=La();return h.jsx(Qt,{className:te("transition-all hover:shadow-md",!e.connected&&"opacity-60",t&&"ring-2 ring-blue-500"),children:h.jsxs(Jt,{className:"p-4",children:[h.jsxs("div",{className:"flex items-start justify-between mb-3",children:[h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx(ra,{checked:t,onCheckedChange:()=>n(e.id)}),h.jsxs("div",{className:"flex items-center gap-2",children:[e.connected?h.jsx("img",{src:"/img/openclaw-logo.svg",alt:"OpenClaw Logo",className:"h-5 w-5"}):h.jsx("img",{src:"/img/openclaw-logo.svg",alt:"OpenClaw Logo",className:"h-5 w-5 opacity-50",style:{filter:"grayscale(100%)"}}),h.jsxs("div",{children:[h.jsx("h3",{className:"font-semibold",children:e.name||"unknown"}),h.jsx("p",{className:"text-xs text-muted-foreground",children:e.id})]})]})]}),h.jsx(or,{variant:e.connected?"success":"destructive",className:"whitespace-nowrap",children:e.connected?l("nodes.connected"):l("nodes.disconnected")})]}),h.jsxs("div",{className:"grid grid-cols-2 gap-3 mb-4",children:[h.jsxs("div",{children:[h.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:l("nodes.clientIp")}),h.jsx("p",{className:"text-sm",children:e.clientIp||"-"})]}),h.jsxs("div",{children:[h.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Gateway"}),e.connected?(u=e.status)!=null&&u.openclawGateway?h.jsx($b,{status:i(e)}):h.jsx("span",{className:"text-sm text-muted-foreground",children:"-"}):h.jsx(or,{variant:"secondary",className:"whitespace-nowrap",children:"unknown"})]}),h.jsxs("div",{children:[h.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:l("nodes.lastSeen")}),h.jsx("p",{className:"text-sm",children:a(e.lastSeen)})]}),h.jsxs("div",{children:[h.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:l("nodes.cpu")}),e.connected&&((c=e.status)!=null&&c.cpu)?h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx(Uv,{className:"h-3 w-3 text-muted-foreground"}),h.jsxs("span",{className:"text-sm",children:[e.status.cpu.percent,"%"]})]}):h.jsx("span",{className:"text-sm text-muted-foreground",children:"-"})]}),h.jsxs("div",{children:[h.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:l("nodes.memory")}),e.connected&&((d=e.status)!=null&&d.memory)?h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx(Hv,{className:"h-3 w-3 text-muted-foreground"}),h.jsxs("span",{className:"text-sm",children:[e.status.memory.percent,"%"]})]}):h.jsx("span",{className:"text-sm text-muted-foreground",children:"-"})]}),h.jsxs("div",{children:[h.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:l("nodes.uptime")}),e.connected&&((f=e.status)!=null&&f.uptime)?h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx(Bv,{className:"h-3 w-3 text-muted-foreground"}),h.jsx("span",{className:"text-sm",children:o(e.status.uptime)})]}):h.jsx("span",{className:"text-sm text-muted-foreground",children:"-"})]})]}),h.jsxs("div",{className:"flex gap-2 pt-3 border-t",children:[h.jsxs(re,{variant:"outline",size:"sm",className:"flex-1",onClick:()=>r(e),disabled:!e.connected,children:[h.jsx(na,{className:"h-4 w-4 mr-1"}),l("nodes.configuration")]}),h.jsxs(re,{variant:"outline",size:"sm",className:"flex-1",onClick:()=>s(e),disabled:!e.connected,children:[h.jsx(bb,{className:"h-4 w-4 mr-1"}),l("nodes.logs")]})]})]})})}const Md=({open:e,onOpenChange:t,children:n})=>e?h.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[h.jsx("div",{className:"fixed inset-0 bg-black/50",onClick:()=>t==null?void 0:t(!1)}),h.jsx("div",{className:"relative z-50 w-full max-w-lg",children:n})]}):null,Ia=S.forwardRef(({className:e,children:t,...n},r)=>h.jsx("div",{ref:r,className:te("relative bg-background rounded-lg shadow-lg p-6",e),...n,children:t}));Ia.displayName="DialogContent";const _a=({className:e,...t})=>h.jsx("div",{className:te("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});_a.displayName="DialogHeader";const Va=S.forwardRef(({className:e,...t},n)=>h.jsx("h2",{ref:n,className:te("text-lg font-semibold leading-none tracking-tight",e),...t}));Va.displayName="DialogTitle";function Ub({isOpen:e,onClose:t,node:n,config:r,loading:s,error:i}){return h.jsx(Md,{open:e,onOpenChange:t,children:h.jsxs(Ia,{className:"max-w-4xl max-h-[80vh] overflow-hidden flex flex-col",children:[h.jsx(_a,{children:h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs(Va,{className:"flex items-center gap-2",children:["Configuration - ",(n==null?void 0:n.name)||"unknown"]}),h.jsx(re,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:t,children:h.jsx(Ma,{className:"h-4 w-4"})})]})}),h.jsx("div",{className:"flex-1 overflow-auto mt-4",children:s?h.jsx("div",{className:"flex items-center justify-center py-12",children:h.jsx(Dd,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):i?h.jsx("div",{className:"p-6 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg",children:h.jsx("p",{className:"text-red-800 dark:text-red-200",children:i})}):r?h.jsx("pre",{className:"text-sm bg-muted p-4 rounded-lg overflow-auto",children:h.jsx("code",{children:JSON.stringify(r,null,2)})}):h.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"No configuration data available"})})]})})}function Hb({isOpen:e,onClose:t,node:n,logs:r,loading:s,error:i}){const o=()=>{if(!r||!n)return;const a=new Blob([r],{type:"text/plain"}),l=URL.createObjectURL(a),u=document.createElement("a");u.href=l,u.download=`openclaw-logs-${n.name||n.id}.txt`,document.body.appendChild(u),u.click(),document.body.removeChild(u),URL.revokeObjectURL(l)};return h.jsx(Md,{open:e,onOpenChange:t,children:h.jsxs(Ia,{className:"max-w-4xl max-h-[80vh] overflow-hidden flex flex-col",children:[h.jsx(_a,{children:h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs(Va,{className:"flex items-center gap-2",children:["Logs - ",(n==null?void 0:n.name)||"unknown"]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsxs(re,{variant:"outline",size:"sm",className:"h-8 px-2",onClick:o,disabled:!r||s,children:[h.jsx(Eb,{className:"h-4 w-4 mr-1"}),"Download"]}),h.jsx(re,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:t,children:h.jsx(Ma,{className:"h-4 w-4"})})]})]})}),h.jsx("div",{className:"flex-1 overflow-auto mt-4 bg-muted rounded-lg",children:s?h.jsx("div",{className:"flex items-center justify-center py-12",children:h.jsx(Dd,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):i?h.jsx("div",{className:"p-6 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg",children:h.jsx("p",{className:"text-red-800 dark:text-red-200",children:i})}):r?h.jsx("pre",{className:"p-4 text-sm whitespace-pre-wrap break-words font-mono",children:r}):h.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"No logs available"})})]})})}function Wb({isOpen:e,onClose:t}){return h.jsx(Md,{open:e,onOpenChange:t,children:h.jsxs(Ia,{className:"max-w-md",children:[h.jsx(_a,{children:h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx(Va,{children:"Caribbean"}),h.jsx(re,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:t,children:h.jsx(Ma,{className:"h-4 w-4"})})]})}),h.jsxs("div",{className:"flex flex-col items-center justify-center py-8",children:[h.jsx("img",{src:"/img/caribbean-logo.png",alt:"Caribbean",className:"w-48 h-auto"}),h.jsx("p",{className:"mt-4 text-muted-foreground",children:"Caribbean Dashboard"})]})]})})}function Wv(e,t){return function(){return e.apply(t,arguments)}}const{toString:Kb}=Object.prototype,{getPrototypeOf:Fd}=Object,{iterator:za,toStringTag:Kv}=Symbol,$a=(e=>t=>{const n=Kb.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),jt=e=>(e=e.toLowerCase(),t=>$a(t)===e),Ba=e=>t=>typeof t===e,{isArray:es}=Array,Wr=Ba("undefined");function xi(e){return e!==null&&!Wr(e)&&e.constructor!==null&&!Wr(e.constructor)&&Qe(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Gv=jt("ArrayBuffer");function Gb(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Gv(e.buffer),t}const qb=Ba("string"),Qe=Ba("function"),qv=Ba("number"),wi=e=>e!==null&&typeof e=="object",Yb=e=>e===!0||e===!1,yo=e=>{if($a(e)!=="object")return!1;const t=Fd(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Kv in e)&&!(za in e)},Xb=e=>{if(!wi(e)||xi(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Qb=jt("Date"),Jb=jt("File"),Zb=e=>!!(e&&typeof e.uri<"u"),eT=e=>e&&typeof e.getParts<"u",tT=jt("Blob"),nT=jt("FileList"),rT=e=>wi(e)&&Qe(e.pipe);function sT(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const ap=sT(),lp=typeof ap.FormData<"u"?ap.FormData:void 0,iT=e=>{let t;return e&&(lp&&e instanceof lp||Qe(e.append)&&((t=$a(e))==="formdata"||t==="object"&&Qe(e.toString)&&e.toString()==="[object FormData]"))},oT=jt("URLSearchParams"),[aT,lT,uT,cT]=["ReadableStream","Request","Response","Headers"].map(jt),dT=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Si(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),es(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(xi(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let a;for(r=0;r<o;r++)a=i[r],t.call(null,e[a],a,e)}}function Yv(e,t){if(xi(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const Kn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Xv=e=>!Wr(e)&&e!==Kn;function rc(){const{caseless:e,skipUndefined:t}=Xv(this)&&this||{},n={},r=(s,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const o=e&&Yv(n,i)||i;yo(n[o])&&yo(s)?n[o]=rc(n[o],s):yo(s)?n[o]=rc({},s):es(s)?n[o]=s.slice():(!t||!Wr(s))&&(n[o]=s)};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&Si(arguments[s],r);return n}const fT=(e,t,n,{allOwnKeys:r}={})=>(Si(t,(s,i)=>{n&&Qe(s)?Object.defineProperty(e,i,{value:Wv(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),hT=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),pT=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},mT=(e,t,n,r)=>{let s,i,o;const a={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],(!r||r(o,e,t))&&!a[o]&&(t[o]=e[o],a[o]=!0);e=n!==!1&&Fd(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},gT=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},yT=e=>{if(!e)return null;if(es(e))return e;let t=e.length;if(!qv(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},vT=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Fd(Uint8Array)),xT=(e,t)=>{const r=(e&&e[za]).call(e);let s;for(;(s=r.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},wT=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},ST=jt("HTMLFormElement"),kT=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),up=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),CT=jt("RegExp"),Qv=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Si(n,(s,i)=>{let o;(o=t(s,i,e))!==!1&&(r[i]=o||s)}),Object.defineProperties(e,r)},ET=e=>{Qv(e,(t,n)=>{if(Qe(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Qe(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},bT=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return es(e)?r(e):r(String(e).split(t)),n},TT=()=>{},PT=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function RT(e){return!!(e&&Qe(e.append)&&e[Kv]==="FormData"&&e[za])}const NT=e=>{const t=new Array(10),n=(r,s)=>{if(wi(r)){if(t.indexOf(r)>=0)return;if(xi(r))return r;if(!("toJSON"in r)){t[s]=r;const i=es(r)?[]:{};return Si(r,(o,a)=>{const l=n(o,s+1);!Wr(l)&&(i[a]=l)}),t[s]=void 0,i}}return r};return n(e,0)},jT=jt("AsyncFunction"),LT=e=>e&&(wi(e)||Qe(e))&&Qe(e.then)&&Qe(e.catch),Jv=((e,t)=>e?setImmediate:t?((n,r)=>(Kn.addEventListener("message",({source:s,data:i})=>{s===Kn&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),Kn.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Qe(Kn.postMessage)),AT=typeof queueMicrotask<"u"?queueMicrotask.bind(Kn):typeof process<"u"&&process.nextTick||Jv,OT=e=>e!=null&&Qe(e[za]),E={isArray:es,isArrayBuffer:Gv,isBuffer:xi,isFormData:iT,isArrayBufferView:Gb,isString:qb,isNumber:qv,isBoolean:Yb,isObject:wi,isPlainObject:yo,isEmptyObject:Xb,isReadableStream:aT,isRequest:lT,isResponse:uT,isHeaders:cT,isUndefined:Wr,isDate:Qb,isFile:Jb,isReactNativeBlob:Zb,isReactNative:eT,isBlob:tT,isRegExp:CT,isFunction:Qe,isStream:rT,isURLSearchParams:oT,isTypedArray:vT,isFileList:nT,forEach:Si,merge:rc,extend:fT,trim:dT,stripBOM:hT,inherits:pT,toFlatObject:mT,kindOf:$a,kindOfTest:jt,endsWith:gT,toArray:yT,forEachEntry:xT,matchAll:wT,isHTMLForm:ST,hasOwnProperty:up,hasOwnProp:up,reduceDescriptors:Qv,freezeMethods:ET,toObjectSet:bT,toCamelCase:kT,noop:TT,toFiniteNumber:PT,findKey:Yv,global:Kn,isContextDefined:Xv,isSpecCompliantForm:RT,toJSONObject:NT,isAsyncFn:jT,isThenable:LT,setImmediate:Jv,asap:AT,isIterable:OT};let H=class Zv extends Error{static from(t,n,r,s,i,o){const a=new Zv(t.message,n||t.code,r,s,i);return a.cause=t,a.name=t.name,t.status!=null&&a.status==null&&(a.status=t.status),o&&Object.assign(a,o),a}constructor(t,n,r,s,i){super(t),Object.defineProperty(this,"message",{value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),s&&(this.request=s),i&&(this.response=i,this.status=i.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:E.toJSONObject(this.config),code:this.code,status:this.status}}};H.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";H.ERR_BAD_OPTION="ERR_BAD_OPTION";H.ECONNABORTED="ECONNABORTED";H.ETIMEDOUT="ETIMEDOUT";H.ERR_NETWORK="ERR_NETWORK";H.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";H.ERR_DEPRECATED="ERR_DEPRECATED";H.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";H.ERR_BAD_REQUEST="ERR_BAD_REQUEST";H.ERR_CANCELED="ERR_CANCELED";H.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";H.ERR_INVALID_URL="ERR_INVALID_URL";const DT=null;function sc(e){return E.isPlainObject(e)||E.isArray(e)}function e0(e){return E.endsWith(e,"[]")?e.slice(0,-2):e}function Ml(e,t,n){return e?e.concat(t).map(function(s,i){return s=e0(s),!n&&i?"["+s+"]":s}).join(n?".":""):t}function MT(e){return E.isArray(e)&&!e.some(sc)}const FT=E.toFlatObject(E,{},null,function(t){return/^is[A-Z]/.test(t)});function Ua(e,t,n){if(!E.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=E.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,w){return!E.isUndefined(w[v])});const r=n.metaTokens,s=n.visitor||c,i=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&E.isSpecCompliantForm(t);if(!E.isFunction(s))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(E.isDate(p))return p.toISOString();if(E.isBoolean(p))return p.toString();if(!l&&E.isBlob(p))throw new H("Blob is not supported. Use a Buffer instead.");return E.isArrayBuffer(p)||E.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function c(p,v,w){let m=p;if(E.isReactNative(t)&&E.isReactNativeBlob(p))return t.append(Ml(w,v,i),u(p)),!1;if(p&&!w&&typeof p=="object"){if(E.endsWith(v,"{}"))v=r?v:v.slice(0,-2),p=JSON.stringify(p);else if(E.isArray(p)&&MT(p)||(E.isFileList(p)||E.endsWith(v,"[]"))&&(m=E.toArray(p)))return v=e0(v),m.forEach(function(x,k){!(E.isUndefined(x)||x===null)&&t.append(o===!0?Ml([v],k,i):o===null?v:v+"[]",u(x))}),!1}return sc(p)?!0:(t.append(Ml(w,v,i),u(p)),!1)}const d=[],f=Object.assign(FT,{defaultVisitor:c,convertValue:u,isVisitable:sc});function g(p,v){if(!E.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+v.join("."));d.push(p),E.forEach(p,function(m,y){(!(E.isUndefined(m)||m===null)&&s.call(t,m,E.isString(y)?y.trim():y,v,f))===!0&&g(m,v?v.concat(y):[y])}),d.pop()}}if(!E.isObject(e))throw new TypeError("data must be an object");return g(e),t}function cp(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Id(e,t){this._pairs=[],e&&Ua(e,this,t)}const t0=Id.prototype;t0.append=function(t,n){this._pairs.push([t,n])};t0.toString=function(t){const n=t?function(r){return t.call(this,r,cp)}:cp;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function IT(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function n0(e,t,n){if(!t)return e;const r=n&&n.encode||IT,s=E.isFunction(n)?{serialize:n}:n,i=s&&s.serialize;let o;if(i?o=i(t,s):o=E.isURLSearchParams(t)?t.toString():new Id(t,s).toString(r),o){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class dp{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){E.forEach(this.handlers,function(r){r!==null&&t(r)})}}const _d={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},_T=typeof URLSearchParams<"u"?URLSearchParams:Id,VT=typeof FormData<"u"?FormData:null,zT=typeof Blob<"u"?Blob:null,$T={isBrowser:!0,classes:{URLSearchParams:_T,FormData:VT,Blob:zT},protocols:["http","https","file","blob","url","data"]},Vd=typeof window<"u"&&typeof document<"u",ic=typeof navigator=="object"&&navigator||void 0,BT=Vd&&(!ic||["ReactNative","NativeScript","NS"].indexOf(ic.product)<0),UT=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",HT=Vd&&window.location.href||"http://localhost",WT=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Vd,hasStandardBrowserEnv:BT,hasStandardBrowserWebWorkerEnv:UT,navigator:ic,origin:HT},Symbol.toStringTag,{value:"Module"})),Ie={...WT,...$T};function KT(e,t){return Ua(e,new Ie.classes.URLSearchParams,{visitor:function(n,r,s,i){return Ie.isNode&&E.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function GT(e){return E.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function qT(e){const t={},n=Object.keys(e);let r;const s=n.length;let i;for(r=0;r<s;r++)i=n[r],t[i]=e[i];return t}function r0(e){function t(n,r,s,i){let o=n[i++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),l=i>=n.length;return o=!o&&E.isArray(s)?s.length:o,l?(E.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!a):((!s[o]||!E.isObject(s[o]))&&(s[o]=[]),t(n,r,s[o],i)&&E.isArray(s[o])&&(s[o]=qT(s[o])),!a)}if(E.isFormData(e)&&E.isFunction(e.entries)){const n={};return E.forEachEntry(e,(r,s)=>{t(GT(r),s,n,0)}),n}return null}function YT(e,t,n){if(E.isString(e))try{return(t||JSON.parse)(e),E.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ki={transitional:_d,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=E.isObject(t);if(i&&E.isHTMLForm(t)&&(t=new FormData(t)),E.isFormData(t))return s?JSON.stringify(r0(t)):t;if(E.isArrayBuffer(t)||E.isBuffer(t)||E.isStream(t)||E.isFile(t)||E.isBlob(t)||E.isReadableStream(t))return t;if(E.isArrayBufferView(t))return t.buffer;if(E.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return KT(t,this.formSerializer).toString();if((a=E.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Ua(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),YT(t)):t}],transformResponse:[function(t){const n=this.transitional||ki.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(E.isResponse(t)||E.isReadableStream(t))return t;if(t&&E.isString(t)&&(r&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(a){if(o)throw a.name==="SyntaxError"?H.from(a,H.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ie.classes.FormData,Blob:Ie.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};E.forEach(["delete","get","head","post","put","patch"],e=>{ki.headers[e]={}});const XT=E.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),QT=e=>{const t={};let n,r,s;return e&&e.split(`
205
- `).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!n||t[n]&&XT[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},fp=Symbol("internals");function ys(e){return e&&String(e).trim().toLowerCase()}function vo(e){return e===!1||e==null?e:E.isArray(e)?e.map(vo):String(e).replace(/[\r\n]+$/,"")}function JT(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const ZT=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Fl(e,t,n,r,s){if(E.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!E.isString(t)){if(E.isString(r))return t.indexOf(r)!==-1;if(E.isRegExp(r))return r.test(t)}}function eP(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function tP(e,t){const n=E.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,i,o){return this[r].call(this,t,s,i,o)},configurable:!0})})}let Je=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function i(a,l,u){const c=ys(l);if(!c)throw new Error("header name must be a non-empty string");const d=E.findKey(s,c);(!d||s[d]===void 0||u===!0||u===void 0&&s[d]!==!1)&&(s[d||l]=vo(a))}const o=(a,l)=>E.forEach(a,(u,c)=>i(u,c,l));if(E.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(E.isString(t)&&(t=t.trim())&&!ZT(t))o(QT(t),n);else if(E.isObject(t)&&E.isIterable(t)){let a={},l,u;for(const c of t){if(!E.isArray(c))throw TypeError("Object iterator must return a key-value pair");a[u=c[0]]=(l=a[u])?E.isArray(l)?[...l,c[1]]:[l,c[1]]:c[1]}o(a,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=ys(t),t){const r=E.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return JT(s);if(E.isFunction(n))return n.call(this,s,r);if(E.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ys(t),t){const r=E.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Fl(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function i(o){if(o=ys(o),o){const a=E.findKey(r,o);a&&(!n||Fl(r,r[a],a,n))&&(delete r[a],s=!0)}}return E.isArray(t)?t.forEach(i):i(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const i=n[r];(!t||Fl(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const n=this,r={};return E.forEach(this,(s,i)=>{const o=E.findKey(r,i);if(o){n[o]=vo(s),delete n[i];return}const a=t?eP(i):String(i).trim();a!==i&&delete n[i],n[a]=vo(s),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return E.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&E.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
206
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[fp]=this[fp]={accessors:{}}).accessors,s=this.prototype;function i(o){const a=ys(o);r[a]||(tP(s,o),r[a]=!0)}return E.isArray(t)?t.forEach(i):i(t),this}};Je.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);E.reduceDescriptors(Je.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});E.freezeMethods(Je);function Il(e,t){const n=this||ki,r=t||n,s=Je.from(r.headers);let i=r.data;return E.forEach(e,function(a){i=a.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function s0(e){return!!(e&&e.__CANCEL__)}let Ci=class extends H{constructor(t,n,r){super(t??"canceled",H.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function i0(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new H("Request failed with status code "+n.status,[H.ERR_BAD_REQUEST,H.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function nP(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function rP(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,i=0,o;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=r[i];o||(o=u),n[s]=l,r[s]=u;let d=i,f=0;for(;d!==s;)f+=n[d++],d=d%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),u-o<t)return;const g=c&&u-c;return g?Math.round(f*1e3/g):void 0}}function sP(e,t){let n=0,r=1e3/t,s,i;const o=(u,c=Date.now())=>{n=c,s=null,i&&(clearTimeout(i),i=null),e(...u)};return[(...u)=>{const c=Date.now(),d=c-n;d>=r?o(u,c):(s=u,i||(i=setTimeout(()=>{i=null,o(s)},r-d)))},()=>s&&o(s)]}const sa=(e,t,n=3)=>{let r=0;const s=rP(50,250);return sP(i=>{const o=i.loaded,a=i.lengthComputable?i.total:void 0,l=o-r,u=s(l),c=o<=a;r=o;const d={loaded:o,total:a,progress:a?o/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a&&c?(a-o)/u:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},hp=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},pp=e=>(...t)=>E.asap(()=>e(...t)),iP=Ie.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Ie.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Ie.origin),Ie.navigator&&/(msie|trident)/i.test(Ie.navigator.userAgent)):()=>!0,oP=Ie.hasStandardBrowserEnv?{write(e,t,n,r,s,i,o){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];E.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),E.isString(r)&&a.push(`path=${r}`),E.isString(s)&&a.push(`domain=${s}`),i===!0&&a.push("secure"),E.isString(o)&&a.push(`SameSite=${o}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function aP(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function lP(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function o0(e,t,n){let r=!aP(t);return e&&(r||n==!1)?lP(e,t):t}const mp=e=>e instanceof Je?{...e}:e;function ar(e,t){t=t||{};const n={};function r(u,c,d,f){return E.isPlainObject(u)&&E.isPlainObject(c)?E.merge.call({caseless:f},u,c):E.isPlainObject(c)?E.merge({},c):E.isArray(c)?c.slice():c}function s(u,c,d,f){if(E.isUndefined(c)){if(!E.isUndefined(u))return r(void 0,u,d,f)}else return r(u,c,d,f)}function i(u,c){if(!E.isUndefined(c))return r(void 0,c)}function o(u,c){if(E.isUndefined(c)){if(!E.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function a(u,c,d){if(d in t)return r(u,c);if(d in e)return r(void 0,u)}const l={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(u,c,d)=>s(mp(u),mp(c),d,!0)};return E.forEach(Object.keys({...e,...t}),function(c){if(c==="__proto__"||c==="constructor"||c==="prototype")return;const d=E.hasOwnProp(l,c)?l[c]:s,f=d(e[c],t[c],c);E.isUndefined(f)&&d!==a||(n[c]=f)}),n}const a0=e=>{const t=ar({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:a}=t;if(t.headers=o=Je.from(o),t.url=n0(o0(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),E.isFormData(n)){if(Ie.hasStandardBrowserEnv||Ie.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(E.isFunction(n.getHeaders)){const l=n.getHeaders(),u=["content-type","content-length"];Object.entries(l).forEach(([c,d])=>{u.includes(c.toLowerCase())&&o.set(c,d)})}}if(Ie.hasStandardBrowserEnv&&(r&&E.isFunction(r)&&(r=r(t)),r||r!==!1&&iP(t.url))){const l=s&&i&&oP.read(i);l&&o.set(s,l)}return t},uP=typeof XMLHttpRequest<"u",cP=uP&&function(e){return new Promise(function(n,r){const s=a0(e);let i=s.data;const o=Je.from(s.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=s,c,d,f,g,p;function v(){g&&g(),p&&p(),s.cancelToken&&s.cancelToken.unsubscribe(c),s.signal&&s.signal.removeEventListener("abort",c)}let w=new XMLHttpRequest;w.open(s.method.toUpperCase(),s.url,!0),w.timeout=s.timeout;function m(){if(!w)return;const x=Je.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),C={data:!a||a==="text"||a==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:x,config:e,request:w};i0(function(T){n(T),v()},function(T){r(T),v()},C),w=null}"onloadend"in w?w.onloadend=m:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(m)},w.onabort=function(){w&&(r(new H("Request aborted",H.ECONNABORTED,e,w)),w=null)},w.onerror=function(k){const C=k&&k.message?k.message:"Network Error",b=new H(C,H.ERR_NETWORK,e,w);b.event=k||null,r(b),w=null},w.ontimeout=function(){let k=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const C=s.transitional||_d;s.timeoutErrorMessage&&(k=s.timeoutErrorMessage),r(new H(k,C.clarifyTimeoutError?H.ETIMEDOUT:H.ECONNABORTED,e,w)),w=null},i===void 0&&o.setContentType(null),"setRequestHeader"in w&&E.forEach(o.toJSON(),function(k,C){w.setRequestHeader(C,k)}),E.isUndefined(s.withCredentials)||(w.withCredentials=!!s.withCredentials),a&&a!=="json"&&(w.responseType=s.responseType),u&&([f,p]=sa(u,!0),w.addEventListener("progress",f)),l&&w.upload&&([d,g]=sa(l),w.upload.addEventListener("progress",d),w.upload.addEventListener("loadend",g)),(s.cancelToken||s.signal)&&(c=x=>{w&&(r(!x||x.type?new Ci(null,e,w):x),w.abort(),w=null)},s.cancelToken&&s.cancelToken.subscribe(c),s.signal&&(s.signal.aborted?c():s.signal.addEventListener("abort",c)));const y=nP(s.url);if(y&&Ie.protocols.indexOf(y)===-1){r(new H("Unsupported protocol "+y+":",H.ERR_BAD_REQUEST,e));return}w.send(i||null)})},dP=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const i=function(u){if(!s){s=!0,a();const c=u instanceof Error?u:this.reason;r.abort(c instanceof H?c:new Ci(c instanceof Error?c.message:c))}};let o=t&&setTimeout(()=>{o=null,i(new H(`timeout of ${t}ms exceeded`,H.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));const{signal:l}=r;return l.unsubscribe=()=>E.asap(a),l}},fP=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},hP=async function*(e,t){for await(const n of pP(e))yield*fP(n,t)},pP=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},gp=(e,t,n,r)=>{const s=hP(e,t);let i=0,o,a=l=>{o||(o=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await s.next();if(u){a(),l.close();return}let d=c.byteLength;if(n){let f=i+=d;n(f)}l.enqueue(new Uint8Array(c))}catch(u){throw a(u),u}},cancel(l){return a(l),s.return()}},{highWaterMark:2})},yp=64*1024,{isFunction:Yi}=E,mP=(({Request:e,Response:t})=>({Request:e,Response:t}))(E.global),{ReadableStream:vp,TextEncoder:xp}=E.global,wp=(e,...t)=>{try{return!!e(...t)}catch{return!1}},gP=e=>{e=E.merge.call({skipUndefined:!0},mP,e);const{fetch:t,Request:n,Response:r}=e,s=t?Yi(t):typeof fetch=="function",i=Yi(n),o=Yi(r);if(!s)return!1;const a=s&&Yi(vp),l=s&&(typeof xp=="function"?(p=>v=>p.encode(v))(new xp):async p=>new Uint8Array(await new n(p).arrayBuffer())),u=i&&a&&wp(()=>{let p=!1;const v=new vp,w=new n(Ie.origin,{body:v,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return v.cancel(),p&&!w}),c=o&&a&&wp(()=>E.isReadableStream(new r("").body)),d={stream:c&&(p=>p.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!d[p]&&(d[p]=(v,w)=>{let m=v&&v[p];if(m)return m.call(v);throw new H(`Response type '${p}' is not supported`,H.ERR_NOT_SUPPORT,w)})});const f=async p=>{if(p==null)return 0;if(E.isBlob(p))return p.size;if(E.isSpecCompliantForm(p))return(await new n(Ie.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(E.isArrayBufferView(p)||E.isArrayBuffer(p))return p.byteLength;if(E.isURLSearchParams(p)&&(p=p+""),E.isString(p))return(await l(p)).byteLength},g=async(p,v)=>{const w=E.toFiniteNumber(p.getContentLength());return w??f(v)};return async p=>{let{url:v,method:w,data:m,signal:y,cancelToken:x,timeout:k,onDownloadProgress:C,onUploadProgress:b,responseType:T,headers:P,withCredentials:L="same-origin",fetchOptions:R}=a0(p),B=t||fetch;T=T?(T+"").toLowerCase():"text";let A=dP([y,x&&x.toAbortSignal()],k),M=null;const _=A&&A.unsubscribe&&(()=>{A.unsubscribe()});let U;try{if(b&&u&&w!=="get"&&w!=="head"&&(U=await g(P,m))!==0){let V=new n(v,{method:"POST",body:m,duplex:"half"}),G;if(E.isFormData(m)&&(G=V.headers.get("content-type"))&&P.setContentType(G),V.body){const[Pe,Re]=hp(U,sa(pp(b)));m=gp(V.body,yp,Pe,Re)}}E.isString(L)||(L=L?"include":"omit");const z=i&&"credentials"in n.prototype,Z={...R,signal:A,method:w.toUpperCase(),headers:P.normalize().toJSON(),body:m,duplex:"half",credentials:z?L:void 0};M=i&&new n(v,Z);let N=await(i?B(M,R):B(v,Z));const D=c&&(T==="stream"||T==="response");if(c&&(C||D&&_)){const V={};["status","statusText","headers"].forEach(ot=>{V[ot]=N[ot]});const G=E.toFiniteNumber(N.headers.get("content-length")),[Pe,Re]=C&&hp(G,sa(pp(C),!0))||[];N=new r(gp(N.body,yp,Pe,()=>{Re&&Re(),_&&_()}),V)}T=T||"text";let $=await d[E.findKey(d,T)||"text"](N,p);return!D&&_&&_(),await new Promise((V,G)=>{i0(V,G,{data:$,headers:Je.from(N.headers),status:N.status,statusText:N.statusText,config:p,request:M})})}catch(z){throw _&&_(),z&&z.name==="TypeError"&&/Load failed|fetch/i.test(z.message)?Object.assign(new H("Network Error",H.ERR_NETWORK,p,M,z&&z.response),{cause:z.cause||z}):H.from(z,z&&z.code,p,M,z&&z.response)}}},yP=new Map,l0=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,i=[r,s,n];let o=i.length,a=o,l,u,c=yP;for(;a--;)l=i[a],u=c.get(l),u===void 0&&c.set(l,u=a?new Map:gP(t)),c=u;return u};l0();const zd={http:DT,xhr:cP,fetch:{get:l0}};E.forEach(zd,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Sp=e=>`- ${e}`,vP=e=>E.isFunction(e)||e===null||e===!1;function xP(e,t){e=E.isArray(e)?e:[e];const{length:n}=e;let r,s;const i={};for(let o=0;o<n;o++){r=e[o];let a;if(s=r,!vP(r)&&(s=zd[(a=String(r)).toLowerCase()],s===void 0))throw new H(`Unknown adapter '${a}'`);if(s&&(E.isFunction(s)||(s=s.get(t))))break;i[a||"#"+o]=s}if(!s){const o=Object.entries(i).map(([l,u])=>`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=n?o.length>1?`since :
204
+ */const Ma=ue("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ra=S.forwardRef(({className:e,checked:t,onCheckedChange:n,...r},s)=>h.jsx("button",{type:"button",role:"checkbox","aria-checked":t,className:te("h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50",t&&"bg-primary text-primary-foreground",e),onClick:()=>n==null?void 0:n(!t),ref:s,...r,children:t&&h.jsx(Da,{className:"h-3 w-3"})}));ra.displayName="Checkbox";const Fa=S.createContext({open:!1,setOpen:()=>{}});function Ib({children:e}){const[t,n]=S.useState(!1);return h.jsx(Fa.Provider,{value:{open:t,setOpen:n},children:h.jsx("div",{className:"relative inline-block",children:e})})}function _b({children:e,className:t}){const{open:n,setOpen:r}=S.useContext(Fa);return h.jsx("button",{type:"button",className:t,onClick:()=>r(!n),children:e})}function Vb({children:e,className:t,align:n="end"}){const{open:r,setOpen:s}=S.useContext(Fa),i=S.useRef(null);return S.useEffect(()=>{if(!r)return;const o=a=>{i.current&&!i.current.contains(a.target)&&s(!1)};return document.addEventListener("mousedown",o),()=>document.removeEventListener("mousedown",o)},[r,s]),r?h.jsx("div",{ref:i,className:te("absolute z-50 mt-1 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",n==="end"?"right-0":"left-0",t),children:e}):null}function Dl({children:e,className:t,disabled:n,onSelect:r}){const{setOpen:s}=S.useContext(Fa);return h.jsx("button",{type:"button",className:te("relative flex w-full cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors","hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",n&&"pointer-events-none opacity-50",t),disabled:n,onClick:()=>{r==null||r(),s(!1)},children:e})}function nc(){const{i18n:e}=La(),[t,n]=S.useState(!1),r=[{code:"zh",name:"中文",flag:"🇨🇳"},{code:"en",name:"English",flag:"🇺🇸"}],s=r.find(o=>o.code===e.language),i=o=>{e.changeLanguage(o),localStorage.setItem("language",o),n(!1)};return h.jsxs("div",{className:"relative",children:[h.jsxs(re,{variant:"outline",size:"sm",onClick:()=>n(!t),children:[h.jsx(Tb,{className:"h-4 w-4 mr-2"}),s==null?void 0:s.flag," ",s==null?void 0:s.name]}),t&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>n(!1)}),h.jsx("div",{className:"absolute right-0 mt-2 w-48 bg-white dark:bg-gray-800 rounded-lg shadow-lg border border-gray-200 dark:border-gray-700 z-50",children:r.map(o=>h.jsxs("button",{onClick:()=>i(o.code),className:"w-full px-4 py-3 text-left hover:bg-gray-100 dark:hover:bg-gray-700 first:rounded-t-lg last:rounded-b-lg flex items-center justify-between",children:[h.jsxs("span",{className:"flex items-center",children:[h.jsx("span",{className:"text-xl mr-3",children:o.flag}),h.jsx("span",{className:"text-sm",children:o.name})]}),(s==null?void 0:s.code)===o.code&&h.jsx(Da,{className:"h-4 w-4 text-green-500"})]},o.code))})]})]})}function zb({isOpen:e,onClose:t,nodeId:n,currentName:r,onSave:s}){const[i,o]=S.useState(r),[a,l]=S.useState(!1),[u,c]=S.useState(null);S.useEffect(()=>{e&&(o(r),c(null))},[e,r]);const d=async f=>{if(f.preventDefault(),!i.trim()){c("名称不能为空");return}if(i===r){t();return}l(!0),c(null);try{await s(n,i.trim()),t()}catch(g){c(g instanceof Error?g.message:"保存失败"),l(!1)}};return e?h.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[h.jsx("div",{className:"absolute inset-0 bg-black/50",onClick:t}),h.jsxs(Qt,{className:"relative z-10 w-full max-w-md",children:[h.jsx(si,{children:h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx(ii,{children:"修改节点名称"}),h.jsx(re,{variant:"ghost",size:"sm",onClick:t,children:h.jsx(Ma,{className:"h-4 w-4"})})]})}),h.jsx(Jt,{children:h.jsxs("form",{onSubmit:d,className:"space-y-4",children:[h.jsxs("div",{children:[h.jsx("label",{className:"block text-sm font-medium mb-2",children:"节点 ID"}),h.jsx("div",{className:"text-sm text-muted-foreground bg-muted/50 p-2 rounded",children:n})]}),h.jsxs("div",{children:[h.jsxs("label",{className:"block text-sm font-medium mb-2",children:["节点名称 ",h.jsx("span",{className:"text-red-500",children:"*"})]}),h.jsx("input",{type:"text",value:i,onChange:f=>o(f.target.value),placeholder:"请输入节点名称",className:"w-full px-3 py-2 border border-input bg-background rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",disabled:a,autoFocus:!0}),u&&h.jsx("p",{className:"text-sm text-destructive mt-1",children:u})]}),h.jsxs("div",{className:"flex gap-2 justify-end",children:[h.jsx(re,{type:"button",variant:"outline",onClick:t,disabled:a,children:"取消"}),h.jsx(re,{type:"submit",disabled:a,className:"flex items-center gap-2",children:a?h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"h-4 w-4 border-2 border-primary border-t-transparent rounded-full animate-spin"}),"保存中..."]}):h.jsxs(h.Fragment,{children:[h.jsx(Da,{className:"h-4 w-4"}),"保存"]})})]})]})})]})]}):null}function $b({status:e}){return h.jsx(or,{variant:e==="running"?"blue":"destructive",className:"whitespace-nowrap",children:e})}function Bb({node:e,selected:t,onToggle:n,onViewConfig:r,onViewLogs:s,getGatewayStatus:i,formatUptime:o,formatLastSeen:a}){var u,c,d,f;const{t:l}=La();return h.jsx(Qt,{className:te("transition-all hover:shadow-md",!e.connected&&"opacity-60",t&&"ring-2 ring-blue-500"),children:h.jsxs(Jt,{className:"p-4",children:[h.jsxs("div",{className:"flex items-start justify-between mb-3",children:[h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx(ra,{checked:t,onCheckedChange:()=>n(e.id)}),h.jsxs("div",{className:"flex items-center gap-2",children:[e.connected?h.jsx("img",{src:"/img/openclaw-logo.svg",alt:"OpenClaw Logo",className:"h-5 w-5"}):h.jsx("img",{src:"/img/openclaw-logo.svg",alt:"OpenClaw Logo",className:"h-5 w-5 opacity-50",style:{filter:"grayscale(100%)"}}),h.jsxs("div",{children:[h.jsx("h3",{className:"font-semibold",children:e.name||"unknown"}),h.jsx("p",{className:"text-xs text-muted-foreground",children:e.id})]})]})]}),h.jsx(or,{variant:e.connected?"success":"destructive",className:"whitespace-nowrap",children:e.connected?l("nodes.connected"):l("nodes.disconnected")})]}),h.jsxs("div",{className:"grid grid-cols-2 gap-3 mb-4",children:[h.jsxs("div",{children:[h.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:l("nodes.clientIp")}),h.jsx("p",{className:"text-sm",children:e.clientIp||"-"})]}),h.jsxs("div",{children:[h.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Gateway"}),e.connected?(u=e.status)!=null&&u.openclawGateway?h.jsx($b,{status:i(e)}):h.jsx("span",{className:"text-sm text-muted-foreground",children:"-"}):h.jsx(or,{variant:"secondary",className:"whitespace-nowrap",children:"unknown"})]}),h.jsxs("div",{children:[h.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:l("nodes.lastSeen")}),h.jsx("p",{className:"text-sm",children:a(e.lastSeen)})]}),h.jsxs("div",{children:[h.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:l("nodes.cpu")}),e.connected&&((c=e.status)!=null&&c.cpu)?h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx(Uv,{className:"h-3 w-3 text-muted-foreground"}),h.jsxs("span",{className:"text-sm",children:[e.status.cpu.percent,"%"]})]}):h.jsx("span",{className:"text-sm text-muted-foreground",children:"-"})]}),h.jsxs("div",{children:[h.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:l("nodes.memory")}),e.connected&&((d=e.status)!=null&&d.memory)?h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx(Hv,{className:"h-3 w-3 text-muted-foreground"}),h.jsxs("span",{className:"text-sm",children:[e.status.memory.percent,"%"]})]}):h.jsx("span",{className:"text-sm text-muted-foreground",children:"-"})]}),h.jsxs("div",{children:[h.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:l("nodes.uptime")}),e.connected&&((f=e.status)!=null&&f.uptime)?h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx(Bv,{className:"h-3 w-3 text-muted-foreground"}),h.jsx("span",{className:"text-sm",children:o(e.status.uptime)})]}):h.jsx("span",{className:"text-sm text-muted-foreground",children:"-"})]})]}),h.jsxs("div",{className:"flex gap-2 pt-3 border-t",children:[h.jsxs(re,{variant:"outline",size:"sm",className:"flex-1",onClick:()=>r(e),disabled:!e.connected,children:[h.jsx(na,{className:"h-4 w-4 mr-1"}),l("nodes.configuration")]}),h.jsxs(re,{variant:"outline",size:"sm",className:"flex-1",onClick:()=>s(e),disabled:!e.connected,children:[h.jsx(bb,{className:"h-4 w-4 mr-1"}),l("nodes.logs")]})]})]})})}const Md=({open:e,onOpenChange:t,children:n})=>e?h.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[h.jsx("div",{className:"fixed inset-0 bg-black/50",onClick:()=>t==null?void 0:t(!1)}),h.jsx("div",{className:"relative z-50 w-full max-w-lg",children:n})]}):null,Ia=S.forwardRef(({className:e,children:t,...n},r)=>h.jsx("div",{ref:r,className:te("relative bg-background rounded-lg shadow-lg p-6",e),...n,children:t}));Ia.displayName="DialogContent";const _a=({className:e,...t})=>h.jsx("div",{className:te("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});_a.displayName="DialogHeader";const Va=S.forwardRef(({className:e,...t},n)=>h.jsx("h2",{ref:n,className:te("text-lg font-semibold leading-none tracking-tight",e),...t}));Va.displayName="DialogTitle";function Ub({isOpen:e,onClose:t,node:n,config:r,loading:s,error:i}){return h.jsx(Md,{open:e,onOpenChange:t,children:h.jsxs(Ia,{className:"max-w-4xl max-h-[80vh] overflow-hidden flex flex-col",children:[h.jsx(_a,{children:h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs(Va,{className:"flex items-center gap-2",children:["Configuration - ",(n==null?void 0:n.name)||"unknown"]}),h.jsx(re,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:t,children:h.jsx(Ma,{className:"h-4 w-4"})})]})}),h.jsx("div",{className:"flex-1 overflow-auto mt-4",children:s?h.jsx("div",{className:"flex items-center justify-center py-12",children:h.jsx(Dd,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):i?h.jsx("div",{className:"p-6 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg",children:h.jsx("p",{className:"text-red-800 dark:text-red-200",children:i})}):r?h.jsx("pre",{className:"text-sm bg-muted p-4 rounded-lg overflow-auto",children:h.jsx("code",{children:JSON.stringify(r,null,2)})}):h.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"No configuration data available"})})]})})}function Hb({isOpen:e,onClose:t,node:n,logs:r,loading:s,error:i}){const o=()=>{if(!r||!n)return;const a=new Blob([r],{type:"text/plain"}),l=URL.createObjectURL(a),u=document.createElement("a");u.href=l,u.download=`openclaw-logs-${n.name||n.id}.txt`,document.body.appendChild(u),u.click(),document.body.removeChild(u),URL.revokeObjectURL(l)};return h.jsx(Md,{open:e,onOpenChange:t,children:h.jsxs(Ia,{className:"max-w-4xl max-h-[80vh] overflow-hidden flex flex-col",children:[h.jsx(_a,{children:h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs(Va,{className:"flex items-center gap-2",children:["Logs - ",(n==null?void 0:n.name)||"unknown"]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsxs(re,{variant:"outline",size:"sm",className:"h-8 px-2",onClick:o,disabled:!r||s,children:[h.jsx(Eb,{className:"h-4 w-4 mr-1"}),"Download"]}),h.jsx(re,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:t,children:h.jsx(Ma,{className:"h-4 w-4"})})]})]})}),h.jsx("div",{className:"flex-1 overflow-auto mt-4 bg-muted rounded-lg",children:s?h.jsx("div",{className:"flex items-center justify-center py-12",children:h.jsx(Dd,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):i?h.jsx("div",{className:"p-6 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg",children:h.jsx("p",{className:"text-red-800 dark:text-red-200",children:i})}):r?h.jsx("pre",{className:"p-4 text-sm whitespace-pre-wrap break-words font-mono",children:r}):h.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"No logs available"})})]})})}function Wv(e,t){return function(){return e.apply(t,arguments)}}const{toString:Wb}=Object.prototype,{getPrototypeOf:Fd}=Object,{iterator:za,toStringTag:Kv}=Symbol,$a=(e=>t=>{const n=Wb.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),jt=e=>(e=e.toLowerCase(),t=>$a(t)===e),Ba=e=>t=>typeof t===e,{isArray:es}=Array,Wr=Ba("undefined");function xi(e){return e!==null&&!Wr(e)&&e.constructor!==null&&!Wr(e.constructor)&&Qe(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Gv=jt("ArrayBuffer");function Kb(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Gv(e.buffer),t}const Gb=Ba("string"),Qe=Ba("function"),qv=Ba("number"),wi=e=>e!==null&&typeof e=="object",qb=e=>e===!0||e===!1,yo=e=>{if($a(e)!=="object")return!1;const t=Fd(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Kv in e)&&!(za in e)},Yb=e=>{if(!wi(e)||xi(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Xb=jt("Date"),Qb=jt("File"),Jb=e=>!!(e&&typeof e.uri<"u"),Zb=e=>e&&typeof e.getParts<"u",eT=jt("Blob"),tT=jt("FileList"),nT=e=>wi(e)&&Qe(e.pipe);function rT(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const ap=rT(),lp=typeof ap.FormData<"u"?ap.FormData:void 0,sT=e=>{let t;return e&&(lp&&e instanceof lp||Qe(e.append)&&((t=$a(e))==="formdata"||t==="object"&&Qe(e.toString)&&e.toString()==="[object FormData]"))},iT=jt("URLSearchParams"),[oT,aT,lT,uT]=["ReadableStream","Request","Response","Headers"].map(jt),cT=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Si(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),es(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(xi(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let a;for(r=0;r<o;r++)a=i[r],t.call(null,e[a],a,e)}}function Yv(e,t){if(xi(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const Kn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Xv=e=>!Wr(e)&&e!==Kn;function rc(){const{caseless:e,skipUndefined:t}=Xv(this)&&this||{},n={},r=(s,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const o=e&&Yv(n,i)||i;yo(n[o])&&yo(s)?n[o]=rc(n[o],s):yo(s)?n[o]=rc({},s):es(s)?n[o]=s.slice():(!t||!Wr(s))&&(n[o]=s)};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&Si(arguments[s],r);return n}const dT=(e,t,n,{allOwnKeys:r}={})=>(Si(t,(s,i)=>{n&&Qe(s)?Object.defineProperty(e,i,{value:Wv(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),fT=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),hT=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},pT=(e,t,n,r)=>{let s,i,o;const a={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],(!r||r(o,e,t))&&!a[o]&&(t[o]=e[o],a[o]=!0);e=n!==!1&&Fd(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},mT=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},gT=e=>{if(!e)return null;if(es(e))return e;let t=e.length;if(!qv(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},yT=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Fd(Uint8Array)),vT=(e,t)=>{const r=(e&&e[za]).call(e);let s;for(;(s=r.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},xT=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},wT=jt("HTMLFormElement"),ST=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),up=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),kT=jt("RegExp"),Qv=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Si(n,(s,i)=>{let o;(o=t(s,i,e))!==!1&&(r[i]=o||s)}),Object.defineProperties(e,r)},CT=e=>{Qv(e,(t,n)=>{if(Qe(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Qe(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},ET=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return es(e)?r(e):r(String(e).split(t)),n},bT=()=>{},TT=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function PT(e){return!!(e&&Qe(e.append)&&e[Kv]==="FormData"&&e[za])}const RT=e=>{const t=new Array(10),n=(r,s)=>{if(wi(r)){if(t.indexOf(r)>=0)return;if(xi(r))return r;if(!("toJSON"in r)){t[s]=r;const i=es(r)?[]:{};return Si(r,(o,a)=>{const l=n(o,s+1);!Wr(l)&&(i[a]=l)}),t[s]=void 0,i}}return r};return n(e,0)},NT=jt("AsyncFunction"),jT=e=>e&&(wi(e)||Qe(e))&&Qe(e.then)&&Qe(e.catch),Jv=((e,t)=>e?setImmediate:t?((n,r)=>(Kn.addEventListener("message",({source:s,data:i})=>{s===Kn&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),Kn.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Qe(Kn.postMessage)),LT=typeof queueMicrotask<"u"?queueMicrotask.bind(Kn):typeof process<"u"&&process.nextTick||Jv,AT=e=>e!=null&&Qe(e[za]),E={isArray:es,isArrayBuffer:Gv,isBuffer:xi,isFormData:sT,isArrayBufferView:Kb,isString:Gb,isNumber:qv,isBoolean:qb,isObject:wi,isPlainObject:yo,isEmptyObject:Yb,isReadableStream:oT,isRequest:aT,isResponse:lT,isHeaders:uT,isUndefined:Wr,isDate:Xb,isFile:Qb,isReactNativeBlob:Jb,isReactNative:Zb,isBlob:eT,isRegExp:kT,isFunction:Qe,isStream:nT,isURLSearchParams:iT,isTypedArray:yT,isFileList:tT,forEach:Si,merge:rc,extend:dT,trim:cT,stripBOM:fT,inherits:hT,toFlatObject:pT,kindOf:$a,kindOfTest:jt,endsWith:mT,toArray:gT,forEachEntry:vT,matchAll:xT,isHTMLForm:wT,hasOwnProperty:up,hasOwnProp:up,reduceDescriptors:Qv,freezeMethods:CT,toObjectSet:ET,toCamelCase:ST,noop:bT,toFiniteNumber:TT,findKey:Yv,global:Kn,isContextDefined:Xv,isSpecCompliantForm:PT,toJSONObject:RT,isAsyncFn:NT,isThenable:jT,setImmediate:Jv,asap:LT,isIterable:AT};let H=class Zv extends Error{static from(t,n,r,s,i,o){const a=new Zv(t.message,n||t.code,r,s,i);return a.cause=t,a.name=t.name,t.status!=null&&a.status==null&&(a.status=t.status),o&&Object.assign(a,o),a}constructor(t,n,r,s,i){super(t),Object.defineProperty(this,"message",{value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),s&&(this.request=s),i&&(this.response=i,this.status=i.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:E.toJSONObject(this.config),code:this.code,status:this.status}}};H.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";H.ERR_BAD_OPTION="ERR_BAD_OPTION";H.ECONNABORTED="ECONNABORTED";H.ETIMEDOUT="ETIMEDOUT";H.ERR_NETWORK="ERR_NETWORK";H.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";H.ERR_DEPRECATED="ERR_DEPRECATED";H.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";H.ERR_BAD_REQUEST="ERR_BAD_REQUEST";H.ERR_CANCELED="ERR_CANCELED";H.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";H.ERR_INVALID_URL="ERR_INVALID_URL";const OT=null;function sc(e){return E.isPlainObject(e)||E.isArray(e)}function e0(e){return E.endsWith(e,"[]")?e.slice(0,-2):e}function Ml(e,t,n){return e?e.concat(t).map(function(s,i){return s=e0(s),!n&&i?"["+s+"]":s}).join(n?".":""):t}function DT(e){return E.isArray(e)&&!e.some(sc)}const MT=E.toFlatObject(E,{},null,function(t){return/^is[A-Z]/.test(t)});function Ua(e,t,n){if(!E.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=E.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,w){return!E.isUndefined(w[v])});const r=n.metaTokens,s=n.visitor||c,i=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&E.isSpecCompliantForm(t);if(!E.isFunction(s))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(E.isDate(p))return p.toISOString();if(E.isBoolean(p))return p.toString();if(!l&&E.isBlob(p))throw new H("Blob is not supported. Use a Buffer instead.");return E.isArrayBuffer(p)||E.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function c(p,v,w){let m=p;if(E.isReactNative(t)&&E.isReactNativeBlob(p))return t.append(Ml(w,v,i),u(p)),!1;if(p&&!w&&typeof p=="object"){if(E.endsWith(v,"{}"))v=r?v:v.slice(0,-2),p=JSON.stringify(p);else if(E.isArray(p)&&DT(p)||(E.isFileList(p)||E.endsWith(v,"[]"))&&(m=E.toArray(p)))return v=e0(v),m.forEach(function(x,k){!(E.isUndefined(x)||x===null)&&t.append(o===!0?Ml([v],k,i):o===null?v:v+"[]",u(x))}),!1}return sc(p)?!0:(t.append(Ml(w,v,i),u(p)),!1)}const d=[],f=Object.assign(MT,{defaultVisitor:c,convertValue:u,isVisitable:sc});function g(p,v){if(!E.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+v.join("."));d.push(p),E.forEach(p,function(m,y){(!(E.isUndefined(m)||m===null)&&s.call(t,m,E.isString(y)?y.trim():y,v,f))===!0&&g(m,v?v.concat(y):[y])}),d.pop()}}if(!E.isObject(e))throw new TypeError("data must be an object");return g(e),t}function cp(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Id(e,t){this._pairs=[],e&&Ua(e,this,t)}const t0=Id.prototype;t0.append=function(t,n){this._pairs.push([t,n])};t0.toString=function(t){const n=t?function(r){return t.call(this,r,cp)}:cp;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function FT(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function n0(e,t,n){if(!t)return e;const r=n&&n.encode||FT,s=E.isFunction(n)?{serialize:n}:n,i=s&&s.serialize;let o;if(i?o=i(t,s):o=E.isURLSearchParams(t)?t.toString():new Id(t,s).toString(r),o){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class dp{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){E.forEach(this.handlers,function(r){r!==null&&t(r)})}}const _d={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},IT=typeof URLSearchParams<"u"?URLSearchParams:Id,_T=typeof FormData<"u"?FormData:null,VT=typeof Blob<"u"?Blob:null,zT={isBrowser:!0,classes:{URLSearchParams:IT,FormData:_T,Blob:VT},protocols:["http","https","file","blob","url","data"]},Vd=typeof window<"u"&&typeof document<"u",ic=typeof navigator=="object"&&navigator||void 0,$T=Vd&&(!ic||["ReactNative","NativeScript","NS"].indexOf(ic.product)<0),BT=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",UT=Vd&&window.location.href||"http://localhost",HT=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Vd,hasStandardBrowserEnv:$T,hasStandardBrowserWebWorkerEnv:BT,navigator:ic,origin:UT},Symbol.toStringTag,{value:"Module"})),Ie={...HT,...zT};function WT(e,t){return Ua(e,new Ie.classes.URLSearchParams,{visitor:function(n,r,s,i){return Ie.isNode&&E.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function KT(e){return E.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function GT(e){const t={},n=Object.keys(e);let r;const s=n.length;let i;for(r=0;r<s;r++)i=n[r],t[i]=e[i];return t}function r0(e){function t(n,r,s,i){let o=n[i++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),l=i>=n.length;return o=!o&&E.isArray(s)?s.length:o,l?(E.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!a):((!s[o]||!E.isObject(s[o]))&&(s[o]=[]),t(n,r,s[o],i)&&E.isArray(s[o])&&(s[o]=GT(s[o])),!a)}if(E.isFormData(e)&&E.isFunction(e.entries)){const n={};return E.forEachEntry(e,(r,s)=>{t(KT(r),s,n,0)}),n}return null}function qT(e,t,n){if(E.isString(e))try{return(t||JSON.parse)(e),E.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ki={transitional:_d,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=E.isObject(t);if(i&&E.isHTMLForm(t)&&(t=new FormData(t)),E.isFormData(t))return s?JSON.stringify(r0(t)):t;if(E.isArrayBuffer(t)||E.isBuffer(t)||E.isStream(t)||E.isFile(t)||E.isBlob(t)||E.isReadableStream(t))return t;if(E.isArrayBufferView(t))return t.buffer;if(E.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return WT(t,this.formSerializer).toString();if((a=E.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Ua(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),qT(t)):t}],transformResponse:[function(t){const n=this.transitional||ki.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(E.isResponse(t)||E.isReadableStream(t))return t;if(t&&E.isString(t)&&(r&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(a){if(o)throw a.name==="SyntaxError"?H.from(a,H.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ie.classes.FormData,Blob:Ie.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};E.forEach(["delete","get","head","post","put","patch"],e=>{ki.headers[e]={}});const YT=E.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),XT=e=>{const t={};let n,r,s;return e&&e.split(`
205
+ `).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!n||t[n]&&YT[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},fp=Symbol("internals");function ys(e){return e&&String(e).trim().toLowerCase()}function vo(e){return e===!1||e==null?e:E.isArray(e)?e.map(vo):String(e).replace(/[\r\n]+$/,"")}function QT(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const JT=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Fl(e,t,n,r,s){if(E.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!E.isString(t)){if(E.isString(r))return t.indexOf(r)!==-1;if(E.isRegExp(r))return r.test(t)}}function ZT(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function eP(e,t){const n=E.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,i,o){return this[r].call(this,t,s,i,o)},configurable:!0})})}let Je=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function i(a,l,u){const c=ys(l);if(!c)throw new Error("header name must be a non-empty string");const d=E.findKey(s,c);(!d||s[d]===void 0||u===!0||u===void 0&&s[d]!==!1)&&(s[d||l]=vo(a))}const o=(a,l)=>E.forEach(a,(u,c)=>i(u,c,l));if(E.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(E.isString(t)&&(t=t.trim())&&!JT(t))o(XT(t),n);else if(E.isObject(t)&&E.isIterable(t)){let a={},l,u;for(const c of t){if(!E.isArray(c))throw TypeError("Object iterator must return a key-value pair");a[u=c[0]]=(l=a[u])?E.isArray(l)?[...l,c[1]]:[l,c[1]]:c[1]}o(a,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=ys(t),t){const r=E.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return QT(s);if(E.isFunction(n))return n.call(this,s,r);if(E.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ys(t),t){const r=E.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Fl(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function i(o){if(o=ys(o),o){const a=E.findKey(r,o);a&&(!n||Fl(r,r[a],a,n))&&(delete r[a],s=!0)}}return E.isArray(t)?t.forEach(i):i(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const i=n[r];(!t||Fl(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const n=this,r={};return E.forEach(this,(s,i)=>{const o=E.findKey(r,i);if(o){n[o]=vo(s),delete n[i];return}const a=t?ZT(i):String(i).trim();a!==i&&delete n[i],n[a]=vo(s),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return E.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&E.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
206
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[fp]=this[fp]={accessors:{}}).accessors,s=this.prototype;function i(o){const a=ys(o);r[a]||(eP(s,o),r[a]=!0)}return E.isArray(t)?t.forEach(i):i(t),this}};Je.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);E.reduceDescriptors(Je.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});E.freezeMethods(Je);function Il(e,t){const n=this||ki,r=t||n,s=Je.from(r.headers);let i=r.data;return E.forEach(e,function(a){i=a.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function s0(e){return!!(e&&e.__CANCEL__)}let Ci=class extends H{constructor(t,n,r){super(t??"canceled",H.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function i0(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new H("Request failed with status code "+n.status,[H.ERR_BAD_REQUEST,H.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function tP(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function nP(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,i=0,o;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=r[i];o||(o=u),n[s]=l,r[s]=u;let d=i,f=0;for(;d!==s;)f+=n[d++],d=d%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),u-o<t)return;const g=c&&u-c;return g?Math.round(f*1e3/g):void 0}}function rP(e,t){let n=0,r=1e3/t,s,i;const o=(u,c=Date.now())=>{n=c,s=null,i&&(clearTimeout(i),i=null),e(...u)};return[(...u)=>{const c=Date.now(),d=c-n;d>=r?o(u,c):(s=u,i||(i=setTimeout(()=>{i=null,o(s)},r-d)))},()=>s&&o(s)]}const sa=(e,t,n=3)=>{let r=0;const s=nP(50,250);return rP(i=>{const o=i.loaded,a=i.lengthComputable?i.total:void 0,l=o-r,u=s(l),c=o<=a;r=o;const d={loaded:o,total:a,progress:a?o/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a&&c?(a-o)/u:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},hp=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},pp=e=>(...t)=>E.asap(()=>e(...t)),sP=Ie.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Ie.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Ie.origin),Ie.navigator&&/(msie|trident)/i.test(Ie.navigator.userAgent)):()=>!0,iP=Ie.hasStandardBrowserEnv?{write(e,t,n,r,s,i,o){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];E.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),E.isString(r)&&a.push(`path=${r}`),E.isString(s)&&a.push(`domain=${s}`),i===!0&&a.push("secure"),E.isString(o)&&a.push(`SameSite=${o}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function oP(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function aP(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function o0(e,t,n){let r=!oP(t);return e&&(r||n==!1)?aP(e,t):t}const mp=e=>e instanceof Je?{...e}:e;function ar(e,t){t=t||{};const n={};function r(u,c,d,f){return E.isPlainObject(u)&&E.isPlainObject(c)?E.merge.call({caseless:f},u,c):E.isPlainObject(c)?E.merge({},c):E.isArray(c)?c.slice():c}function s(u,c,d,f){if(E.isUndefined(c)){if(!E.isUndefined(u))return r(void 0,u,d,f)}else return r(u,c,d,f)}function i(u,c){if(!E.isUndefined(c))return r(void 0,c)}function o(u,c){if(E.isUndefined(c)){if(!E.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function a(u,c,d){if(d in t)return r(u,c);if(d in e)return r(void 0,u)}const l={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(u,c,d)=>s(mp(u),mp(c),d,!0)};return E.forEach(Object.keys({...e,...t}),function(c){if(c==="__proto__"||c==="constructor"||c==="prototype")return;const d=E.hasOwnProp(l,c)?l[c]:s,f=d(e[c],t[c],c);E.isUndefined(f)&&d!==a||(n[c]=f)}),n}const a0=e=>{const t=ar({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:a}=t;if(t.headers=o=Je.from(o),t.url=n0(o0(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),E.isFormData(n)){if(Ie.hasStandardBrowserEnv||Ie.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(E.isFunction(n.getHeaders)){const l=n.getHeaders(),u=["content-type","content-length"];Object.entries(l).forEach(([c,d])=>{u.includes(c.toLowerCase())&&o.set(c,d)})}}if(Ie.hasStandardBrowserEnv&&(r&&E.isFunction(r)&&(r=r(t)),r||r!==!1&&sP(t.url))){const l=s&&i&&iP.read(i);l&&o.set(s,l)}return t},lP=typeof XMLHttpRequest<"u",uP=lP&&function(e){return new Promise(function(n,r){const s=a0(e);let i=s.data;const o=Je.from(s.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=s,c,d,f,g,p;function v(){g&&g(),p&&p(),s.cancelToken&&s.cancelToken.unsubscribe(c),s.signal&&s.signal.removeEventListener("abort",c)}let w=new XMLHttpRequest;w.open(s.method.toUpperCase(),s.url,!0),w.timeout=s.timeout;function m(){if(!w)return;const x=Je.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),C={data:!a||a==="text"||a==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:x,config:e,request:w};i0(function(T){n(T),v()},function(T){r(T),v()},C),w=null}"onloadend"in w?w.onloadend=m:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(m)},w.onabort=function(){w&&(r(new H("Request aborted",H.ECONNABORTED,e,w)),w=null)},w.onerror=function(k){const C=k&&k.message?k.message:"Network Error",b=new H(C,H.ERR_NETWORK,e,w);b.event=k||null,r(b),w=null},w.ontimeout=function(){let k=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const C=s.transitional||_d;s.timeoutErrorMessage&&(k=s.timeoutErrorMessage),r(new H(k,C.clarifyTimeoutError?H.ETIMEDOUT:H.ECONNABORTED,e,w)),w=null},i===void 0&&o.setContentType(null),"setRequestHeader"in w&&E.forEach(o.toJSON(),function(k,C){w.setRequestHeader(C,k)}),E.isUndefined(s.withCredentials)||(w.withCredentials=!!s.withCredentials),a&&a!=="json"&&(w.responseType=s.responseType),u&&([f,p]=sa(u,!0),w.addEventListener("progress",f)),l&&w.upload&&([d,g]=sa(l),w.upload.addEventListener("progress",d),w.upload.addEventListener("loadend",g)),(s.cancelToken||s.signal)&&(c=x=>{w&&(r(!x||x.type?new Ci(null,e,w):x),w.abort(),w=null)},s.cancelToken&&s.cancelToken.subscribe(c),s.signal&&(s.signal.aborted?c():s.signal.addEventListener("abort",c)));const y=tP(s.url);if(y&&Ie.protocols.indexOf(y)===-1){r(new H("Unsupported protocol "+y+":",H.ERR_BAD_REQUEST,e));return}w.send(i||null)})},cP=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const i=function(u){if(!s){s=!0,a();const c=u instanceof Error?u:this.reason;r.abort(c instanceof H?c:new Ci(c instanceof Error?c.message:c))}};let o=t&&setTimeout(()=>{o=null,i(new H(`timeout of ${t}ms exceeded`,H.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));const{signal:l}=r;return l.unsubscribe=()=>E.asap(a),l}},dP=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},fP=async function*(e,t){for await(const n of hP(e))yield*dP(n,t)},hP=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},gp=(e,t,n,r)=>{const s=fP(e,t);let i=0,o,a=l=>{o||(o=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await s.next();if(u){a(),l.close();return}let d=c.byteLength;if(n){let f=i+=d;n(f)}l.enqueue(new Uint8Array(c))}catch(u){throw a(u),u}},cancel(l){return a(l),s.return()}},{highWaterMark:2})},yp=64*1024,{isFunction:Yi}=E,pP=(({Request:e,Response:t})=>({Request:e,Response:t}))(E.global),{ReadableStream:vp,TextEncoder:xp}=E.global,wp=(e,...t)=>{try{return!!e(...t)}catch{return!1}},mP=e=>{e=E.merge.call({skipUndefined:!0},pP,e);const{fetch:t,Request:n,Response:r}=e,s=t?Yi(t):typeof fetch=="function",i=Yi(n),o=Yi(r);if(!s)return!1;const a=s&&Yi(vp),l=s&&(typeof xp=="function"?(p=>v=>p.encode(v))(new xp):async p=>new Uint8Array(await new n(p).arrayBuffer())),u=i&&a&&wp(()=>{let p=!1;const v=new vp,w=new n(Ie.origin,{body:v,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return v.cancel(),p&&!w}),c=o&&a&&wp(()=>E.isReadableStream(new r("").body)),d={stream:c&&(p=>p.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!d[p]&&(d[p]=(v,w)=>{let m=v&&v[p];if(m)return m.call(v);throw new H(`Response type '${p}' is not supported`,H.ERR_NOT_SUPPORT,w)})});const f=async p=>{if(p==null)return 0;if(E.isBlob(p))return p.size;if(E.isSpecCompliantForm(p))return(await new n(Ie.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(E.isArrayBufferView(p)||E.isArrayBuffer(p))return p.byteLength;if(E.isURLSearchParams(p)&&(p=p+""),E.isString(p))return(await l(p)).byteLength},g=async(p,v)=>{const w=E.toFiniteNumber(p.getContentLength());return w??f(v)};return async p=>{let{url:v,method:w,data:m,signal:y,cancelToken:x,timeout:k,onDownloadProgress:C,onUploadProgress:b,responseType:T,headers:P,withCredentials:L="same-origin",fetchOptions:R}=a0(p),B=t||fetch;T=T?(T+"").toLowerCase():"text";let A=cP([y,x&&x.toAbortSignal()],k),M=null;const _=A&&A.unsubscribe&&(()=>{A.unsubscribe()});let U;try{if(b&&u&&w!=="get"&&w!=="head"&&(U=await g(P,m))!==0){let V=new n(v,{method:"POST",body:m,duplex:"half"}),G;if(E.isFormData(m)&&(G=V.headers.get("content-type"))&&P.setContentType(G),V.body){const[Pe,Re]=hp(U,sa(pp(b)));m=gp(V.body,yp,Pe,Re)}}E.isString(L)||(L=L?"include":"omit");const z=i&&"credentials"in n.prototype,Z={...R,signal:A,method:w.toUpperCase(),headers:P.normalize().toJSON(),body:m,duplex:"half",credentials:z?L:void 0};M=i&&new n(v,Z);let N=await(i?B(M,R):B(v,Z));const D=c&&(T==="stream"||T==="response");if(c&&(C||D&&_)){const V={};["status","statusText","headers"].forEach(at=>{V[at]=N[at]});const G=E.toFiniteNumber(N.headers.get("content-length")),[Pe,Re]=C&&hp(G,sa(pp(C),!0))||[];N=new r(gp(N.body,yp,Pe,()=>{Re&&Re(),_&&_()}),V)}T=T||"text";let $=await d[E.findKey(d,T)||"text"](N,p);return!D&&_&&_(),await new Promise((V,G)=>{i0(V,G,{data:$,headers:Je.from(N.headers),status:N.status,statusText:N.statusText,config:p,request:M})})}catch(z){throw _&&_(),z&&z.name==="TypeError"&&/Load failed|fetch/i.test(z.message)?Object.assign(new H("Network Error",H.ERR_NETWORK,p,M,z&&z.response),{cause:z.cause||z}):H.from(z,z&&z.code,p,M,z&&z.response)}}},gP=new Map,l0=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,i=[r,s,n];let o=i.length,a=o,l,u,c=gP;for(;a--;)l=i[a],u=c.get(l),u===void 0&&c.set(l,u=a?new Map:mP(t)),c=u;return u};l0();const zd={http:OT,xhr:uP,fetch:{get:l0}};E.forEach(zd,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Sp=e=>`- ${e}`,yP=e=>E.isFunction(e)||e===null||e===!1;function vP(e,t){e=E.isArray(e)?e:[e];const{length:n}=e;let r,s;const i={};for(let o=0;o<n;o++){r=e[o];let a;if(s=r,!yP(r)&&(s=zd[(a=String(r)).toLowerCase()],s===void 0))throw new H(`Unknown adapter '${a}'`);if(s&&(E.isFunction(s)||(s=s.get(t))))break;i[a||"#"+o]=s}if(!s){const o=Object.entries(i).map(([l,u])=>`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=n?o.length>1?`since :
207
207
  `+o.map(Sp).join(`
208
- `):" "+Sp(o[0]):"as no adapter specified";throw new H("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return s}const u0={getAdapter:xP,adapters:zd};function _l(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ci(null,e)}function kp(e){return _l(e),e.headers=Je.from(e.headers),e.data=Il.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),u0.getAdapter(e.adapter||ki.adapter,e)(e).then(function(r){return _l(e),r.data=Il.call(e,e.transformResponse,r),r.headers=Je.from(r.headers),r},function(r){return s0(r)||(_l(e),r&&r.response&&(r.response.data=Il.call(e,e.transformResponse,r.response),r.response.headers=Je.from(r.response.headers))),Promise.reject(r)})}const c0="1.14.0",Ha={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ha[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Cp={};Ha.transitional=function(t,n,r){function s(i,o){return"[Axios v"+c0+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,a)=>{if(t===!1)throw new H(s(o," has been removed"+(n?" in "+n:"")),H.ERR_DEPRECATED);return n&&!Cp[o]&&(Cp[o]=!0,console.warn(s(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,a):!0}};Ha.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function wP(e,t,n){if(typeof e!="object")throw new H("options must be an object",H.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const i=r[s],o=t[i];if(o){const a=e[i],l=a===void 0||o(a,i,e);if(l!==!0)throw new H("option "+i+" must be "+l,H.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new H("Unknown option "+i,H.ERR_BAD_OPTION)}}const xo={assertOptions:wP,validators:Ha},at=xo.validators;let Qn=class{constructor(t){this.defaults=t||{},this.interceptors={request:new dp,response:new dp}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
209
- `+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ar(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&xo.assertOptions(r,{silentJSONParsing:at.transitional(at.boolean),forcedJSONParsing:at.transitional(at.boolean),clarifyTimeoutError:at.transitional(at.boolean),legacyInterceptorReqResOrdering:at.transitional(at.boolean)},!1),s!=null&&(E.isFunction(s)?n.paramsSerializer={serialize:s}:xo.assertOptions(s,{encode:at.function,serialize:at.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),xo.assertOptions(n,{baseUrl:at.spelling("baseURL"),withXsrfToken:at.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&E.merge(i.common,i[n.method]);i&&E.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),n.headers=Je.concat(o,i);const a=[];let l=!0;this.interceptors.request.forEach(function(v){if(typeof v.runWhen=="function"&&v.runWhen(n)===!1)return;l=l&&v.synchronous;const w=n.transitional||_d;w&&w.legacyInterceptorReqResOrdering?a.unshift(v.fulfilled,v.rejected):a.push(v.fulfilled,v.rejected)});const u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let c,d=0,f;if(!l){const p=[kp.bind(this),void 0];for(p.unshift(...a),p.push(...u),f=p.length,c=Promise.resolve(n);d<f;)c=c.then(p[d++],p[d++]);return c}f=a.length;let g=n;for(;d<f;){const p=a[d++],v=a[d++];try{g=p(g)}catch(w){v.call(this,w);break}}try{c=kp.call(this,g)}catch(p){return Promise.reject(p)}for(d=0,f=u.length;d<f;)c=c.then(u[d++],u[d++]);return c}getUri(t){t=ar(this.defaults,t);const n=o0(t.baseURL,t.url,t.allowAbsoluteUrls);return n0(n,t.params,t.paramsSerializer)}};E.forEach(["delete","get","head","options"],function(t){Qn.prototype[t]=function(n,r){return this.request(ar(r||{},{method:t,url:n,data:(r||{}).data}))}});E.forEach(["post","put","patch"],function(t){function n(r){return function(i,o,a){return this.request(ar(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}Qn.prototype[t]=n(),Qn.prototype[t+"Form"]=n(!0)});let SP=class d0{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(s=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(a=>{r.subscribe(a),i=a}).then(s);return o.cancel=function(){r.unsubscribe(i)},o},t(function(i,o,a){r.reason||(r.reason=new Ci(i,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new d0(function(s){t=s}),cancel:t}}};function kP(e){return function(n){return e.apply(null,n)}}function CP(e){return E.isObject(e)&&e.isAxiosError===!0}const oc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(oc).forEach(([e,t])=>{oc[t]=e});function f0(e){const t=new Qn(e),n=Wv(Qn.prototype.request,t);return E.extend(n,Qn.prototype,t,{allOwnKeys:!0}),E.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return f0(ar(e,s))},n}const ve=f0(ki);ve.Axios=Qn;ve.CanceledError=Ci;ve.CancelToken=SP;ve.isCancel=s0;ve.VERSION=c0;ve.toFormData=Ua;ve.AxiosError=H;ve.Cancel=ve.CanceledError;ve.all=function(t){return Promise.all(t)};ve.spread=kP;ve.isAxiosError=CP;ve.mergeConfig=ar;ve.AxiosHeaders=Je;ve.formToJSON=e=>r0(E.isHTMLForm(e)?new FormData(e):e);ve.getAdapter=u0.getAdapter;ve.HttpStatusCode=oc;ve.default=ve;const{Axios:zL,AxiosError:$L,CanceledError:BL,isCancel:UL,CancelToken:HL,VERSION:WL,all:KL,Cancel:GL,isAxiosError:qL,spread:YL,toFormData:XL,AxiosHeaders:QL,HttpStatusCode:JL,formToJSON:ZL,getAdapter:eA,mergeConfig:tA}=ve,Vl="caribbean_auth_token",ts={getToken(){return typeof window>"u"?null:localStorage.getItem(Vl)},setToken(e){typeof window>"u"||localStorage.setItem(Vl,e)},removeToken(){typeof window>"u"||localStorage.removeItem(Vl)},isAuthenticated(){return!!this.getToken()}},EP="/api",xt=ve.create({baseURL:EP,headers:{"Content-Type":"application/json"}});xt.interceptors.request.use(e=>{const t=ts.getToken();return t&&e.url!=="/login"&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e));xt.interceptors.response.use(e=>e,e=>{var t;return((t=e.response)==null?void 0:t.status)===401&&(e._isAuthError=!0,ts.removeToken()),Promise.reject(e)});async function bP(){return(await xt.get("/auth/status")).data}async function TP(e,t){return(await xt.post("/login",{username:e,password:t})).data}async function Ep(){return(await xt.get("/nodes/database")).data.nodes||[]}async function PP(e,t){await xt.patch(`/nodes/${e}/name`,{name:t})}async function RP(e){await xt.delete(`/nodes/${e}`)}async function NP(){return(await xt.get("/stats")).data}async function $d(e,t,n={}){return(await xt.post(`/nodes/${e}/command`,{action:t,params:n})).data}async function h0(e){return(await xt.get(`/commands/${e}/result`)).data}async function jP(e){var s;const t=await $d(e,"read_config",{}),n=10,r=500;for(let i=0;i<n;i++){await new Promise(o=>setTimeout(o,r));try{const o=await h0(t.commandId);if(o.success&&o.data)return o.data.config;if(!o.success)throw new Error(o.error||"Failed to get config")}catch(o){if(((s=o.response)==null?void 0:s.status)===404)continue;throw o}}throw new Error("Timeout waiting for command result")}async function LP(e){var s;const t=await $d(e,"read_logs",{}),n=10,r=500;for(let i=0;i<n;i++){await new Promise(o=>setTimeout(o,r));try{const o=await h0(t.commandId);if(o.success&&o.data)return o.data.logs;if(!o.success)throw new Error(o.error||"Failed to get logs")}catch(o){if(((s=o.response)==null?void 0:s.status)===404)continue;throw o}}throw new Error("Timeout waiting for command result")}async function AP(){return(await xt.get("/settings")).data}async function OP(e){return(await xt.post("/settings/auth",e)).data}const Bd=S.createContext({});function Ud(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const DP=typeof window<"u",p0=DP?S.useLayoutEffect:S.useEffect,Wa=S.createContext(null);function Hd(e,t){e.indexOf(t)===-1&&e.push(t)}function ia(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Bt=(e,t,n)=>n>t?t:n<e?e:n;let Wd=()=>{};const jn={},m0=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function g0(e){return typeof e=="object"&&e!==null}const y0=e=>/^0[^.\s]+$/u.test(e);function v0(e){let t;return()=>(t===void 0&&(t=e()),t)}const mt=e=>e,MP=(e,t)=>n=>t(e(n)),Ei=(...e)=>e.reduce(MP),oi=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Kd{constructor(){this.subscriptions=[]}add(t){return Hd(this.subscriptions,t),()=>ia(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let i=0;i<s;i++){const o=this.subscriptions[i];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const nt=e=>e*1e3,ht=e=>e/1e3;function x0(e,t){return t?e*(1e3/t):0}const w0=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,FP=1e-7,IP=12;function _P(e,t,n,r,s){let i,o,a=0;do o=t+(n-t)/2,i=w0(o,r,s)-e,i>0?n=o:t=o;while(Math.abs(i)>FP&&++a<IP);return o}function bi(e,t,n,r){if(e===t&&n===r)return mt;const s=i=>_P(i,0,1,e,n);return i=>i===0||i===1?i:w0(s(i),t,r)}const S0=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,k0=e=>t=>1-e(1-t),C0=bi(.33,1.53,.69,.99),Gd=k0(C0),E0=S0(Gd),b0=e=>e>=1?1:(e*=2)<1?.5*Gd(e):.5*(2-Math.pow(2,-10*(e-1))),qd=e=>1-Math.sin(Math.acos(e)),T0=k0(qd),P0=S0(qd),VP=bi(.42,0,1,1),zP=bi(0,0,.58,1),R0=bi(.42,0,.58,1),$P=e=>Array.isArray(e)&&typeof e[0]!="number",N0=e=>Array.isArray(e)&&typeof e[0]=="number",BP={linear:mt,easeIn:VP,easeInOut:R0,easeOut:zP,circIn:qd,circInOut:P0,circOut:T0,backIn:Gd,backInOut:E0,backOut:C0,anticipate:b0},UP=e=>typeof e=="string",bp=e=>{if(N0(e)){Wd(e.length===4);const[t,n,r,s]=e;return bi(t,n,r,s)}else if(UP(e))return BP[e];return e},Xi=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function HP(e,t){let n=new Set,r=new Set,s=!1,i=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){o.has(c)&&(u.schedule(c),e()),c(a)}const u={schedule:(c,d=!1,f=!1)=>{const p=f&&s?n:r;return d&&o.add(c),p.add(c),c},cancel:c=>{r.delete(c),o.delete(c)},process:c=>{if(a=c,s){i=!0;return}s=!0;const d=n;n=r,r=d,n.forEach(l),n.clear(),s=!1,i&&(i=!1,u.process(c))}};return u}const WP=40;function j0(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=Xi.reduce((x,k)=>(x[k]=HP(i),x),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:f,render:g,postRender:p}=o,v=()=>{const x=jn.useManualTiming,k=x?s.timestamp:performance.now();n=!1,x||(s.delta=r?1e3/60:Math.max(Math.min(k-s.timestamp,WP),1)),s.timestamp=k,s.isProcessing=!0,a.process(s),l.process(s),u.process(s),c.process(s),d.process(s),f.process(s),g.process(s),p.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(v))},w=()=>{n=!0,r=!0,s.isProcessing||e(v)};return{schedule:Xi.reduce((x,k)=>{const C=o[k];return x[k]=(b,T=!1,P=!1)=>(n||w(),C.schedule(b,T,P)),x},{}),cancel:x=>{for(let k=0;k<Xi.length;k++)o[Xi[k]].cancel(x)},state:s,steps:o}}const{schedule:ne,cancel:Ln,state:je,steps:zl}=j0(typeof requestAnimationFrame<"u"?requestAnimationFrame:mt,!0);let wo;function KP(){wo=void 0}const ze={now:()=>(wo===void 0&&ze.set(je.isProcessing||jn.useManualTiming?je.timestamp:performance.now()),wo),set:e=>{wo=e,queueMicrotask(KP)}},L0=e=>t=>typeof t=="string"&&t.startsWith(e),A0=L0("--"),GP=L0("var(--"),Yd=e=>GP(e)?qP.test(e.split("/*")[0].trim()):!1,qP=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Tp(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const ns={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ai={...ns,transform:e=>Bt(0,1,e)},Qi={...ns,default:1},Ms=e=>Math.round(e*1e5)/1e5,Xd=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function YP(e){return e==null}const XP=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Qd=(e,t)=>n=>!!(typeof n=="string"&&XP.test(n)&&n.startsWith(e)||t&&!YP(n)&&Object.prototype.hasOwnProperty.call(n,t)),O0=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,i,o,a]=r.match(Xd);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},QP=e=>Bt(0,255,e),$l={...ns,transform:e=>Math.round(QP(e))},Gn={test:Qd("rgb","red"),parse:O0("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+$l.transform(e)+", "+$l.transform(t)+", "+$l.transform(n)+", "+Ms(ai.transform(r))+")"};function JP(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const ac={test:Qd("#"),parse:JP,transform:Gn.transform},Ti=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),dn=Ti("deg"),zt=Ti("%"),I=Ti("px"),ZP=Ti("vh"),eR=Ti("vw"),Pp={...zt,parse:e=>zt.parse(e)/100,transform:e=>zt.transform(e*100)},Tr={test:Qd("hsl","hue"),parse:O0("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+zt.transform(Ms(t))+", "+zt.transform(Ms(n))+", "+Ms(ai.transform(r))+")"},we={test:e=>Gn.test(e)||ac.test(e)||Tr.test(e),parse:e=>Gn.test(e)?Gn.parse(e):Tr.test(e)?Tr.parse(e):ac.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Gn.transform(e):Tr.transform(e),getAnimatableNone:e=>{const t=we.parse(e);return t.alpha=0,we.transform(t)}},tR=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function nR(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Xd))==null?void 0:t.length)||0)+(((n=e.match(tR))==null?void 0:n.length)||0)>0}const D0="number",M0="color",rR="var",sR="var(",Rp="${}",iR=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Kr(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const a=t.replace(iR,l=>(we.test(l)?(r.color.push(i),s.push(M0),n.push(we.parse(l))):l.startsWith(sR)?(r.var.push(i),s.push(rR),n.push(l)):(r.number.push(i),s.push(D0),n.push(parseFloat(l))),++i,Rp)).split(Rp);return{values:n,split:a,indexes:r,types:s}}function oR(e){return Kr(e).values}function F0({split:e,types:t}){const n=e.length;return r=>{let s="";for(let i=0;i<n;i++)if(s+=e[i],r[i]!==void 0){const o=t[i];o===D0?s+=Ms(r[i]):o===M0?s+=we.transform(r[i]):s+=r[i]}return s}}function aR(e){return F0(Kr(e))}const lR=e=>typeof e=="number"?0:we.test(e)?we.getAnimatableNone(e):e,uR=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:lR(e);function cR(e){const t=Kr(e);return F0(t)(t.values.map((r,s)=>uR(r,t.split[s])))}const Rt={test:nR,parse:oR,createTransformer:aR,getAnimatableNone:cR};function Bl(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function dR({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,i=0,o=0;if(!t)s=i=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;s=Bl(l,a,e+1/3),i=Bl(l,a,e),o=Bl(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function oa(e,t){return n=>n>0?t:e}const ae=(e,t,n)=>e+(t-e)*n,Ul=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},fR=[ac,Gn,Tr],hR=e=>fR.find(t=>t.test(e));function Np(e){const t=hR(e);if(!t)return!1;let n=t.parse(e);return t===Tr&&(n=dR(n)),n}const jp=(e,t)=>{const n=Np(e),r=Np(t);if(!n||!r)return oa(e,t);const s={...n};return i=>(s.red=Ul(n.red,r.red,i),s.green=Ul(n.green,r.green,i),s.blue=Ul(n.blue,r.blue,i),s.alpha=ae(n.alpha,r.alpha,i),Gn.transform(s))},lc=new Set(["none","hidden"]);function pR(e,t){return lc.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function mR(e,t){return n=>ae(e,t,n)}function Jd(e){return typeof e=="number"?mR:typeof e=="string"?Yd(e)?oa:we.test(e)?jp:vR:Array.isArray(e)?I0:typeof e=="object"?we.test(e)?jp:gR:oa}function I0(e,t){const n=[...e],r=n.length,s=e.map((i,o)=>Jd(i)(i,t[o]));return i=>{for(let o=0;o<r;o++)n[o]=s[o](i);return n}}function gR(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=Jd(e[s])(e[s],t[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}}function yR(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],o=e.indexes[i][r[i]],a=e.values[o]??0;n[s]=a,r[i]++}return n}const vR=(e,t)=>{const n=Rt.createTransformer(t),r=Kr(e),s=Kr(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?lc.has(e)&&!s.values.length||lc.has(t)&&!r.values.length?pR(e,t):Ei(I0(yR(r,s),s.values),n):oa(e,t)};function _0(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ae(e,t,n):Jd(e)(e,t)}const xR=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ne.update(t,n),stop:()=>Ln(t),now:()=>je.isProcessing?je.timestamp:ze.now()}},V0=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let i=0;i<s;i++)r+=Math.round(e(i/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},aa=2e4;function Zd(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<aa;)t+=n,r=e.next(t);return t>=aa?1/0:t}function wR(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min(Zd(r),aa);return{type:"keyframes",ease:i=>r.next(s*i).value/t,duration:ht(s)}}const me={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function uc(e,t){return e*Math.sqrt(1-t*t)}const SR=12;function kR(e,t,n){let r=n;for(let s=1;s<SR;s++)r=r-e(r)/t(r);return r}const Hl=.001;function CR({duration:e=me.duration,bounce:t=me.bounce,velocity:n=me.velocity,mass:r=me.mass}){let s,i,o=1-t;o=Bt(me.minDamping,me.maxDamping,o),e=Bt(me.minDuration,me.maxDuration,ht(e)),o<1?(s=u=>{const c=u*o,d=c*e,f=c-n,g=uc(u,o),p=Math.exp(-d);return Hl-f/g*p},i=u=>{const d=u*o*e,f=d*n+n,g=Math.pow(o,2)*Math.pow(u,2)*e,p=Math.exp(-d),v=uc(Math.pow(u,2),o);return(-s(u)+Hl>0?-1:1)*((f-g)*p)/v}):(s=u=>{const c=Math.exp(-u*e),d=(u-n)*e+1;return-Hl+c*d},i=u=>{const c=Math.exp(-u*e),d=(n-u)*(e*e);return c*d});const a=5/e,l=kR(s,i,a);if(e=nt(e),isNaN(l))return{stiffness:me.stiffness,damping:me.damping,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const ER=["duration","bounce"],bR=["stiffness","damping","mass"];function Lp(e,t){return t.some(n=>e[n]!==void 0)}function TR(e){let t={velocity:me.velocity,stiffness:me.stiffness,damping:me.damping,mass:me.mass,isResolvedFromDuration:!1,...e};if(!Lp(e,bR)&&Lp(e,ER))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*Bt(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:me.mass,stiffness:s,damping:i}}else{const n=CR({...e,velocity:0});t={...t,...n,mass:me.mass},t.isResolvedFromDuration=!0}return t}function la(e=me.visualDuration,t=me.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:l,damping:u,mass:c,duration:d,velocity:f,isResolvedFromDuration:g}=TR({...n,velocity:-ht(n.velocity||0)}),p=f||0,v=u/(2*Math.sqrt(l*c)),w=o-i,m=ht(Math.sqrt(l/c)),y=Math.abs(w)<5;r||(r=y?me.restSpeed.granular:me.restSpeed.default),s||(s=y?me.restDelta.granular:me.restDelta.default);let x,k,C,b,T,P;if(v<1)C=uc(m,v),b=(p+v*m*w)/C,x=R=>{const B=Math.exp(-v*m*R);return o-B*(b*Math.sin(C*R)+w*Math.cos(C*R))},T=v*m*b+w*C,P=v*m*w-b*C,k=R=>Math.exp(-v*m*R)*(T*Math.sin(C*R)+P*Math.cos(C*R));else if(v===1){x=B=>o-Math.exp(-m*B)*(w+(p+m*w)*B);const R=p+m*w;k=B=>Math.exp(-m*B)*(m*R*B-p)}else{const R=m*Math.sqrt(v*v-1);x=_=>{const U=Math.exp(-v*m*_),z=Math.min(R*_,300);return o-U*((p+v*m*w)*Math.sinh(z)+R*w*Math.cosh(z))/R};const B=(p+v*m*w)/R,A=v*m*B-w*R,M=v*m*w-B*R;k=_=>{const U=Math.exp(-v*m*_),z=Math.min(R*_,300);return U*(A*Math.sinh(z)+M*Math.cosh(z))}}const L={calculatedDuration:g&&d||null,velocity:R=>nt(k(R)),next:R=>{if(!g&&v<1){const A=Math.exp(-v*m*R),M=Math.sin(C*R),_=Math.cos(C*R),U=o-A*(b*M+w*_),z=nt(A*(T*M+P*_));return a.done=Math.abs(z)<=r&&Math.abs(o-U)<=s,a.value=a.done?o:U,a}const B=x(R);if(g)a.done=R>=d;else{const A=nt(k(R));a.done=Math.abs(A)<=r&&Math.abs(o-B)<=s}return a.value=a.done?o:B,a},toString:()=>{const R=Math.min(Zd(L),aa),B=V0(A=>L.next(R*A).value,R,30);return R+"ms "+B},toTransition:()=>{}};return L}la.applyToOptions=e=>{const t=wR(e,100,la);return e.ease=t.ease,e.duration=nt(t.duration),e.type="keyframes",e};const PR=5;function z0(e,t,n){const r=Math.max(t-PR,0);return x0(n-e(r),t-r)}function cc({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},g=P=>a!==void 0&&P<a||l!==void 0&&P>l,p=P=>a===void 0?l:l===void 0||Math.abs(a-P)<Math.abs(l-P)?a:l;let v=n*t;const w=d+v,m=o===void 0?w:o(w);m!==w&&(v=m-d);const y=P=>-v*Math.exp(-P/r),x=P=>m+y(P),k=P=>{const L=y(P),R=x(P);f.done=Math.abs(L)<=u,f.value=f.done?m:R};let C,b;const T=P=>{g(f.value)&&(C=P,b=la({keyframes:[f.value,p(f.value)],velocity:z0(x,P,f.value),damping:s,stiffness:i,restDelta:u,restSpeed:c}))};return T(0),{calculatedDuration:null,next:P=>{let L=!1;return!b&&C===void 0&&(L=!0,k(P),T(P)),C!==void 0&&P>=C?b.next(P-C):(!L&&k(P),f)}}}function RR(e,t,n){const r=[],s=n||jn.mix||_0,i=e.length-1;for(let o=0;o<i;o++){let a=s(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||mt:t;a=Ei(l,a)}r.push(a)}return r}function NR(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const i=e.length;if(Wd(i===t.length),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=RR(t,r,s),l=a.length,u=c=>{if(o&&c<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(c<e[d+1]);d++);const f=oi(e[d],e[d+1],c);return a[d](f)};return n?c=>u(Bt(e[0],e[i-1],c)):u}function jR(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=oi(0,t,r);e.push(ae(n,1,s))}}function LR(e){const t=[0];return jR(t,e.length-1),t}function AR(e,t){return e.map(n=>n*t)}function OR(e,t){return e.map(()=>t||R0).splice(0,e.length-1)}function Fs({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=$P(r)?r.map(bp):bp(r),i={done:!1,value:t[0]},o=AR(n&&n.length===t.length?n:LR(t),e),a=NR(o,t,{ease:Array.isArray(s)?s:OR(t,s)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const DR=e=>e!==null;function Ka(e,{repeat:t,repeatType:n="loop"},r,s=1){const i=e.filter(DR),a=s<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const MR={decay:cc,inertia:cc,tween:Fs,keyframes:Fs,spring:la};function $0(e){typeof e.type=="string"&&(e.type=MR[e.type])}class ef{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const FR=e=>e/100;class ua extends ef{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var r,s;const{motionValue:n}=this.options;n&&n.updatedAt!==ze.now()&&this.tick(ze.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(r=this.options).onStop)==null||s.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;$0(t);const{type:n=Fs,repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=t;let{keyframes:a}=t;const l=n||Fs;l!==Fs&&typeof a[0]!="number"&&(this.mixKeyframes=Ei(FR,_0(a[0],a[1])),a=[0,100]);const u=l({...t,keyframes:a});i==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=Zd(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:s,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:c,repeat:d,repeatType:f,repeatDelay:g,type:p,onUpdate:v,finalKeyframe:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const m=this.currentTime-u*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?m<0:m>s;this.currentTime=Math.max(m,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let x=this.currentTime,k=r;if(d){const P=Math.min(this.currentTime,s)/a;let L=Math.floor(P),R=P%1;!R&&P>=1&&(R=1),R===1&&L--,L=Math.min(L,d+1),!!(L%2)&&(f==="reverse"?(R=1-R,g&&(R-=g/a)):f==="mirror"&&(k=o)),x=Bt(0,1,R)*a}let C;y?(this.delayState.value=c[0],C=this.delayState):C=k.next(x),i&&!y&&(C.value=i(C.value));let{done:b}=C;!y&&l!==null&&(b=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const T=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&b);return T&&p!==cc&&(C.value=Ka(c,this.options,w,this.speed)),v&&v(C.value),T&&this.finish(),C}then(t,n){return this.finished.then(t,n)}get duration(){return ht(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ht(t)}get time(){return ht(this.currentTime)}set time(t){t=nt(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return z0(r=>this.generator.next(r).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(ze.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=ht(this.currentTime))}play(){var s,i;if(this.isStopped)return;const{driver:t=xR,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(i=(s=this.options).onPlay)==null||i.call(s);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ze.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function IR(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const qn=e=>e*180/Math.PI,dc=e=>{const t=qn(Math.atan2(e[1],e[0]));return fc(t)},_R={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:dc,rotateZ:dc,skewX:e=>qn(Math.atan(e[1])),skewY:e=>qn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},fc=e=>(e=e%360,e<0&&(e+=360),e),Ap=dc,Op=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Dp=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),VR={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Op,scaleY:Dp,scale:e=>(Op(e)+Dp(e))/2,rotateX:e=>fc(qn(Math.atan2(e[6],e[5]))),rotateY:e=>fc(qn(Math.atan2(-e[2],e[0]))),rotateZ:Ap,rotate:Ap,skewX:e=>qn(Math.atan(e[4])),skewY:e=>qn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function hc(e){return e.includes("scale")?1:0}function pc(e,t){if(!e||e==="none")return hc(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=VR,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=_R,s=a}if(!s)return hc(t);const i=r[t],o=s[1].split(",").map($R);return typeof i=="function"?i(o):o[i]}const zR=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return pc(n,t)};function $R(e){return parseFloat(e.trim())}const rs=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ss=new Set(rs),Mp=e=>e===ns||e===I,BR=new Set(["x","y","z"]),UR=rs.filter(e=>!BR.has(e));function HR(e){const t=[];return UR.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const xn={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{const s=e.max-e.min;return r==="border-box"?s:s-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{const s=e.max-e.min;return r==="border-box"?s:s-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>pc(t,"x"),y:(e,{transform:t})=>pc(t,"y")};xn.translateX=xn.x;xn.translateY=xn.y;const Jn=new Set;let mc=!1,gc=!1,yc=!1;function B0(){if(gc){const e=Array.from(Jn).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=HR(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([i,o])=>{var a;(a=r.getValue(i))==null||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}gc=!1,mc=!1,Jn.forEach(e=>e.complete(yc)),Jn.clear()}function U0(){Jn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(gc=!0)})}function WR(){yc=!0,U0(),B0(),yc=!1}class tf{constructor(t,n,r,s,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Jn.add(this),mc||(mc=!0,ne.read(U0),ne.resolveKeyframes(B0))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;if(t[0]===null){const i=s==null?void 0:s.get(),o=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const a=r.readValue(n,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),s&&i===void 0&&s.set(t[0])}IR(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Jn.delete(this)}cancel(){this.state==="scheduled"&&(Jn.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const KR=e=>e.startsWith("--");function H0(e,t,n){KR(t)?e.style.setProperty(t,n):e.style[t]=n}const GR={};function W0(e,t){const n=v0(e);return()=>GR[t]??n()}const qR=W0(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),K0=W0(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Cs=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Fp={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Cs([0,.65,.55,1]),circOut:Cs([.55,0,1,.45]),backIn:Cs([.31,.01,.66,-.59]),backOut:Cs([.33,1.53,.69,.99])};function G0(e,t){if(e)return typeof e=="function"?K0()?V0(e,t):"ease-out":N0(e)?Cs(e):Array.isArray(e)?e.map(n=>G0(n,t)||Fp.easeOut):Fp[e]}function YR(e,t,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[t]:n};l&&(c.offset=l);const d=G0(a,s);Array.isArray(d)&&(c.easing=d);const f={delay:r,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),e.animate(c,f)}function q0(e){return typeof e=="function"&&"applyToOptions"in e}function XR({type:e,...t}){return q0(e)&&K0()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Y0 extends ef{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:s,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=t,Wd(typeof t.type!="string");const u=XR(t);this.animation=YR(n,r,s,u,i),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const c=Ka(s,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(c),H0(n,r,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,r,s;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((s=(r=this.animation).commitStyles)==null||s.call(r))}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return ht(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ht(t)}get time(){return ht(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=nt(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:r,observe:s}){var i;return this.allowFlatten&&((i=this.animation.effect)==null||i.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&qR()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),mt):s(this)}}const X0={anticipate:b0,backInOut:E0,circInOut:P0};function QR(e){return e in X0}function JR(e){typeof e.ease=="string"&&QR(e.ease)&&(e.ease=X0[e.ease])}const Wl=10;class ZR extends Y0{constructor(t){JR(t),$0(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:s,element:i,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new ua({...o,autoplay:!1}),l=Math.max(Wl,ze.now()-this.startTime),u=Bt(0,Wl,l-Wl),c=a.sample(l).value,{name:d}=this.options;i&&d&&H0(i,d,c),n.setWithVelocity(a.sample(Math.max(0,l-u)).value,c,u),a.stop()}}const Ip=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Rt.test(e)||e==="0")&&!e.startsWith("url("));function e2(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function t2(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],o=Ip(s,t),a=Ip(i,t);return!o||!a?!1:e2(e)||(n==="spring"||q0(n))&&r}function vc(e){e.duration=0,e.type="keyframes"}const Q0=new Set(["opacity","clipPath","filter","transform"]),n2=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function r2(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&n2.test(e[t]))return!0;return!1}const s2=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),i2=v0(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function o2(e){var d;const{motionValue:t,name:n,repeatDelay:r,repeatType:s,damping:i,type:o,keyframes:a}=e;if(!(((d=t==null?void 0:t.owner)==null?void 0:d.current)instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:c}=t.owner.getProps();return i2()&&n&&(Q0.has(n)||s2.has(n)&&r2(a))&&(n!=="transform"||!c)&&!u&&!r&&s!=="mirror"&&i!==0&&o!=="inertia"}const a2=40;class l2 extends ef{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o="loop",keyframes:a,name:l,motionValue:u,element:c,...d}){var p;super(),this.stop=()=>{var v,w;this._animation&&(this._animation.stop(),(v=this.stopTimeline)==null||v.call(this)),(w=this.keyframeResolver)==null||w.cancel()},this.createdAt=ze.now();const f={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:o,name:l,motionValue:u,element:c,...d},g=(c==null?void 0:c.KeyframeResolver)||tf;this.keyframeResolver=new g(a,(v,w,m)=>this.onKeyframesResolved(v,w,f,!m),l,u,c),(p=this.keyframeResolver)==null||p.scheduleResolve()}onKeyframesResolved(t,n,r,s){var m,y;this.keyframeResolver=void 0;const{name:i,type:o,velocity:a,delay:l,isHandoff:u,onUpdate:c}=r;this.resolvedAt=ze.now();let d=!0;t2(t,i,o,a)||(d=!1,(jn.instantAnimations||!l)&&(c==null||c(Ka(t,r,n))),t[0]=t[t.length-1],vc(r),r.repeat=0);const g={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>a2?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},p=d&&!u&&o2(g),v=(y=(m=g.motionValue)==null?void 0:m.owner)==null?void 0:y.current;let w;if(p)try{w=new ZR({...g,element:v})}catch{w=new ua(g)}else w=new ua(g);w.finished.then(()=>{this.notifyFinished()}).catch(mt),this.pendingTimeline&&(this.stopTimeline=w.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=w}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),WR()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function J0(e,t,n,r=0,s=1){const i=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),o=e.size,a=(o-1)*r;return typeof n=="function"?n(i,o):s===1?i*r:a-i*r}const u2=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function c2(e){const t=u2.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}function Z0(e,t,n=1){const[r,s]=c2(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const o=i.trim();return m0(o)?parseFloat(o):o}return Yd(s)?Z0(s,t,n+1):s}const d2={type:"spring",stiffness:500,damping:25,restSpeed:10},f2=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),h2={type:"keyframes",duration:.8},p2={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},m2=(e,{keyframes:t})=>t.length>2?h2:ss.has(e)?e.startsWith("scale")?f2(t[1]):d2:p2;function ex(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function nf(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?ex(n,e):n}const g2=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function y2(e){for(const t in e)if(!g2.has(t))return!0;return!1}const rf=(e,t,n,r={},s,i)=>o=>{const a=nf(r,e)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-nt(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:s};y2(a)||Object.assign(c,m2(e,c)),c.duration&&(c.duration=nt(c.duration)),c.repeatDelay&&(c.repeatDelay=nt(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(vc(c),c.delay===0&&(d=!0)),(jn.instantAnimations||jn.skipAnimations||s!=null&&s.shouldSkipAnimations)&&(d=!0,vc(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,d&&!i&&t.get()!==void 0){const f=Ka(c.keyframes,a);if(f!==void 0){ne.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new ua(c):new l2(c)};function _p(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function sf(e,t,n,r){if(typeof t=="function"){const[s,i]=_p(r);t=t(n!==void 0?n:e.custom,s,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,i]=_p(r);t=t(n!==void 0?n:e.custom,s,i)}return t}function Zn(e,t,n){const r=e.getProps();return sf(r,t,n!==void 0?n:r.custom,e)}const tx=new Set(["width","height","top","left","right","bottom",...rs]),Vp=30,v2=e=>!isNaN(parseFloat(e));class x2{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var i;const s=ze.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=ze.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=v2(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Kd);const r=this.events[t].add(n);return t==="change"?()=>{r(),ne.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=ze.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Vp)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Vp);return x0(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Gr(e,t){return new x2(e,t)}const xc=e=>Array.isArray(e);function w2(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Gr(n))}function S2(e){return xc(e)?e[e.length-1]||0:e}function k2(e,t){const n=Zn(e,t);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const o in i){const a=S2(i[o]);w2(e,o,a)}}const Le=e=>!!(e&&e.getVelocity);function C2(e){return!!(Le(e)&&e.add)}function wc(e,t){const n=e.getValue("willChange");if(C2(n))return n.add(t);if(!n&&jn.WillChange){const r=new jn.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function of(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const E2="framerAppearId",nx="data-"+of(E2);function rx(e){return e.props[nx]}function b2({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function sx(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:i,transitionEnd:o,...a}=t;const l=e.getDefaultTransition();i=i?ex(i,l):l;const u=i==null?void 0:i.reduceMotion;r&&(i=r);const c=[],d=s&&e.animationState&&e.animationState.getState()[s];for(const f in a){const g=e.getValue(f,e.latestValues[f]??null),p=a[f];if(p===void 0||d&&b2(d,f))continue;const v={delay:n,...nf(i||{},f)},w=g.get();if(w!==void 0&&!g.isAnimating()&&!Array.isArray(p)&&p===w&&!v.velocity){ne.update(()=>g.set(p));continue}let m=!1;if(window.MotionHandoffAnimation){const k=rx(e);if(k){const C=window.MotionHandoffAnimation(k,f,ne);C!==null&&(v.startTime=C,m=!0)}}wc(e,f);const y=u??e.shouldReduceMotion;g.start(rf(f,g,p,y&&tx.has(f)?{type:!1}:v,e,m));const x=g.animation;x&&c.push(x)}if(o){const f=()=>ne.update(()=>{o&&k2(e,o)});c.length?Promise.all(c).then(f):f()}return c}function Sc(e,t,n={}){var l;const r=Zn(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const i=r?()=>Promise.all(sx(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=s;return T2(e,t,u,c,d,f,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[u,c]=a==="beforeChildren"?[i,o]:[o,i];return u().then(()=>c())}else return Promise.all([i(),o(n.delay)])}function T2(e,t,n=0,r=0,s=0,i=1,o){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(Sc(l,t,{...o,delay:n+(typeof r=="function"?0:r)+J0(e.variantChildren,l,r,s,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function P2(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(i=>Sc(e,i,n));r=Promise.all(s)}else if(typeof t=="string")r=Sc(e,t,n);else{const s=typeof t=="function"?Zn(e,t,n.custom):t;r=Promise.all(sx(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const R2={test:e=>e==="auto",parse:e=>e},ix=e=>t=>t.test(e),ox=[ns,I,zt,dn,eR,ZP,R2],zp=e=>ox.find(ix(e));function N2(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||y0(e):!0}const j2=new Set(["brightness","contrast","saturate","opacity"]);function L2(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Xd)||[];if(!r)return e;const s=n.replace(r,"");let i=j2.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+s+")"}const A2=/\b([a-z-]*)\(.*?\)/gu,kc={...Rt,getAnimatableNone:e=>{const t=e.match(A2);return t?t.map(L2).join(" "):e}},Cc={...Rt,getAnimatableNone:e=>{const t=Rt.parse(e);return Rt.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},$p={...ns,transform:Math.round},O2={rotate:dn,rotateX:dn,rotateY:dn,rotateZ:dn,scale:Qi,scaleX:Qi,scaleY:Qi,scaleZ:Qi,skew:dn,skewX:dn,skewY:dn,distance:I,translateX:I,translateY:I,translateZ:I,x:I,y:I,z:I,perspective:I,transformPerspective:I,opacity:ai,originX:Pp,originY:Pp,originZ:I},af={borderWidth:I,borderTopWidth:I,borderRightWidth:I,borderBottomWidth:I,borderLeftWidth:I,borderRadius:I,borderTopLeftRadius:I,borderTopRightRadius:I,borderBottomRightRadius:I,borderBottomLeftRadius:I,width:I,maxWidth:I,height:I,maxHeight:I,top:I,right:I,bottom:I,left:I,inset:I,insetBlock:I,insetBlockStart:I,insetBlockEnd:I,insetInline:I,insetInlineStart:I,insetInlineEnd:I,padding:I,paddingTop:I,paddingRight:I,paddingBottom:I,paddingLeft:I,paddingBlock:I,paddingBlockStart:I,paddingBlockEnd:I,paddingInline:I,paddingInlineStart:I,paddingInlineEnd:I,margin:I,marginTop:I,marginRight:I,marginBottom:I,marginLeft:I,marginBlock:I,marginBlockStart:I,marginBlockEnd:I,marginInline:I,marginInlineStart:I,marginInlineEnd:I,fontSize:I,backgroundPositionX:I,backgroundPositionY:I,...O2,zIndex:$p,fillOpacity:ai,strokeOpacity:ai,numOctaves:$p},D2={...af,color:we,backgroundColor:we,outlineColor:we,fill:we,stroke:we,borderColor:we,borderTopColor:we,borderRightColor:we,borderBottomColor:we,borderLeftColor:we,filter:kc,WebkitFilter:kc,mask:Cc,WebkitMask:Cc},ax=e=>D2[e],M2=new Set([kc,Cc]);function lx(e,t){let n=ax(e);return M2.has(n)||(n=Rt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const F2=new Set(["auto","none","0"]);function I2(e,t,n){let r=0,s;for(;r<e.length&&!s;){const i=e[r];typeof i=="string"&&!F2.has(i)&&Kr(i).values.length&&(s=e[r]),r++}if(s&&n)for(const i of t)e[i]=lx(n,s)}class _2 extends tf{constructor(t,n,r,s,i){super(t,n,r,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let d=t[c];if(typeof d=="string"&&(d=d.trim(),Yd(d))){const f=Z0(d,n.current);f!==void 0&&(t[c]=f),c===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!tx.has(r)||t.length!==2)return;const[s,i]=t,o=zp(s),a=zp(i),l=Tp(s),u=Tp(i);if(l!==u&&xn[r]){this.needsMeasurement=!0;return}if(o!==a)if(Mp(o)&&Mp(a))for(let c=0;c<t.length;c++){const d=t[c];typeof d=="string"&&(t[c]=parseFloat(d))}else xn[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)(t[s]===null||N2(t[s]))&&r.push(s);r.length&&I2(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=xn[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const i=r.length-1,o=r[i];r[i]=xn[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,u])=>{t.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function ux(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const s=(n==null?void 0:n[e])??r.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(r=>r!=null)}const cx=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function So(e){return g0(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:lf}=j0(queueMicrotask,!1),kt={x:!1,y:!1};function dx(){return kt.x||kt.y}function V2(e){return e==="x"||e==="y"?kt[e]?null:(kt[e]=!0,()=>{kt[e]=!1}):kt.x||kt.y?null:(kt.x=kt.y=!0,()=>{kt.x=kt.y=!1})}function fx(e,t){const n=ux(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function z2(e){return!(e.pointerType==="touch"||dx())}function $2(e,t,n={}){const[r,s,i]=fx(e,n);return r.forEach(o=>{let a=!1,l=!1,u;const c=()=>{o.removeEventListener("pointerleave",p)},d=w=>{u&&(u(w),u=void 0),c()},f=w=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,d(w))},g=()=>{a=!0,window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",f,s)},p=w=>{if(w.pointerType!=="touch"){if(a){l=!0;return}d(w)}},v=w=>{if(!z2(w))return;l=!1;const m=t(o,w);typeof m=="function"&&(u=m,o.addEventListener("pointerleave",p,s))};o.addEventListener("pointerenter",v,s),o.addEventListener("pointerdown",g,s)}),i}const hx=(e,t)=>t?e===t?!0:hx(e,t.parentElement):!1,uf=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,B2=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function U2(e){return B2.has(e.tagName)||e.isContentEditable===!0}const H2=new Set(["INPUT","SELECT","TEXTAREA"]);function W2(e){return H2.has(e.tagName)||e.isContentEditable===!0}const ko=new WeakSet;function Bp(e){return t=>{t.key==="Enter"&&e(t)}}function Kl(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const K2=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Bp(()=>{if(ko.has(n))return;Kl(n,"down");const s=Bp(()=>{Kl(n,"up")}),i=()=>Kl(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Up(e){return uf(e)&&!dx()}const Hp=new WeakSet;function G2(e,t,n={}){const[r,s,i]=fx(e,n),o=a=>{const l=a.currentTarget;if(!Up(a)||Hp.has(a))return;ko.add(l),n.stopPropagation&&Hp.add(a);const u=t(l,a),c=(g,p)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),ko.has(l)&&ko.delete(l),Up(g)&&typeof u=="function"&&u(g,{success:p})},d=g=>{c(g,l===window||l===document||n.useGlobalTarget||hx(l,g.target))},f=g=>{c(g,!1)};window.addEventListener("pointerup",d,s),window.addEventListener("pointercancel",f,s)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),So(a)&&(a.addEventListener("focus",u=>K2(u,s)),!U2(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),i}function cf(e){return g0(e)&&"ownerSVGElement"in e}const Co=new WeakMap;let fn;const px=(e,t,n)=>(r,s)=>s&&s[0]?s[0][e+"Size"]:cf(r)&&"getBBox"in r?r.getBBox()[t]:r[n],q2=px("inline","width","offsetWidth"),Y2=px("block","height","offsetHeight");function X2({target:e,borderBoxSize:t}){var n;(n=Co.get(e))==null||n.forEach(r=>{r(e,{get width(){return q2(e,t)},get height(){return Y2(e,t)}})})}function Q2(e){e.forEach(X2)}function J2(){typeof ResizeObserver>"u"||(fn=new ResizeObserver(Q2))}function Z2(e,t){fn||J2();const n=ux(e);return n.forEach(r=>{let s=Co.get(r);s||(s=new Set,Co.set(r,s)),s.add(t),fn==null||fn.observe(r)}),()=>{n.forEach(r=>{const s=Co.get(r);s==null||s.delete(t),s!=null&&s.size||fn==null||fn.unobserve(r)})}}const Eo=new Set;let Pr;function eN(){Pr=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Eo.forEach(t=>t(e))},window.addEventListener("resize",Pr)}function tN(e){return Eo.add(e),Pr||eN(),()=>{Eo.delete(e),!Eo.size&&typeof Pr=="function"&&(window.removeEventListener("resize",Pr),Pr=void 0)}}function Wp(e,t){return typeof e=="function"?tN(e):Z2(e,t)}function nN(e){return cf(e)&&e.tagName==="svg"}const rN=[...ox,we,Rt],sN=e=>rN.find(ix(e)),Kp=()=>({translate:0,scale:1,origin:0,originPoint:0}),Rr=()=>({x:Kp(),y:Kp()}),Gp=()=>({min:0,max:0}),ke=()=>({x:Gp(),y:Gp()}),iN=new WeakMap;function Ga(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function li(e){return typeof e=="string"||Array.isArray(e)}const df=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ff=["initial",...df];function qa(e){return Ga(e.animate)||ff.some(t=>li(e[t]))}function mx(e){return!!(qa(e)||e.variants)}function oN(e,t,n){for(const r in t){const s=t[r],i=n[r];if(Le(s))e.addValue(r,s);else if(Le(i))e.addValue(r,Gr(s,{owner:e}));else if(i!==s)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=e.getStaticValue(r);e.addValue(r,Gr(o!==void 0?o:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Ec={current:null},gx={current:!1},aN=typeof window<"u";function lN(){if(gx.current=!0,!!aN)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ec.current=e.matches;e.addEventListener("change",t),t()}else Ec.current=!1}const qp=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let ca={};function yx(e){ca=e}function uN(){return ca}class cN{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,skipAnimations:i,blockInitialAnimation:o,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=tf,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const g=ze.now();this.renderScheduledAt<g&&(this.renderScheduledAt=g,ne.render(this.render,!1,!0))};const{latestValues:u,renderState:c}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=i,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=qa(n),this.isVariantNode=mx(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const g in f){const p=f[g];u[g]!==void 0&&Le(p)&&p.set(u[g])}}mount(t){var n,r;if(this.hasBeenMounted)for(const s in this.initialValues)(n=this.values.get(s))==null||n.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=t,iN.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,i)=>this.bindToMotionValue(i,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(gx.current||lN(),this.shouldReduceMotion=Ec.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),Ln(this.notifyUpdate),Ln(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&Q0.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:l,ease:u,duration:c}=n.accelerate,d=new Y0({element:this.current,name:t,keyframes:a,times:l,ease:u,duration:nt(c)}),f=o(d);this.valueSubscriptions.set(t,()=>{f(),d.cancel()});return}const r=ss.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&ne.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in ca){const n=ca[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ke()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<qp.length;r++){const s=qp[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,o=t[i];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=oN(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Gr(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(m0(r)||y0(r))?r=parseFloat(r):!sN(r)&&Rt.test(n)&&(r=lx(t,n)),this.setBaseTarget(t,Le(r)?r.get():r)),Le(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var i;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=sf(this.props,n,(i=this.presenceContext)==null?void 0:i.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!Le(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Kd),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){lf.render(this.render)}}class vx extends cN{constructor(){super(...arguments),this.KeyframeResolver=_2}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Le(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Mn{constructor(t){this.isMounted=!1,this.node=t}update(){}}function xx({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function dN({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function fN(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Gl(e){return e===void 0||e===1}function bc({scale:e,scaleX:t,scaleY:n}){return!Gl(e)||!Gl(t)||!Gl(n)}function Bn(e){return bc(e)||wx(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function wx(e){return Yp(e.x)||Yp(e.y)}function Yp(e){return e&&e!=="0%"}function da(e,t,n){const r=e-n,s=t*r;return n+s}function Xp(e,t,n,r,s){return s!==void 0&&(e=da(e,s,r)),da(e,n,r)+t}function Tc(e,t=0,n=1,r,s){e.min=Xp(e.min,t,n,r,s),e.max=Xp(e.max,t,n,r,s)}function Sx(e,{x:t,y:n}){Tc(e.x,t.translate,t.scale,t.originPoint),Tc(e.y,n.translate,n.scale,n.originPoint)}const Qp=.999999999999,Jp=1.0000000000001;function hN(e,t,n,r=!1){var a;const s=n.length;if(!s)return;t.x=t.y=1;let i,o;for(let l=0;l<s;l++){i=n[l],o=i.projectionDelta;const{visualElement:u}=i.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&(Dt(e.x,-i.scroll.offset.x),Dt(e.y,-i.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Sx(e,o)),r&&Bn(i.latestValues)&&bo(e,i.latestValues,(a=i.layout)==null?void 0:a.layoutBox))}t.x<Jp&&t.x>Qp&&(t.x=1),t.y<Jp&&t.y>Qp&&(t.y=1)}function Dt(e,t){e.min+=t,e.max+=t}function Zp(e,t,n,r,s=.5){const i=ae(e.min,e.max,s);Tc(e,t,n,i,r)}function em(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function bo(e,t,n){const r=n??e;Zp(e.x,em(t.x,r.x),t.scaleX,t.scale,t.originX),Zp(e.y,em(t.y,r.y),t.scaleY,t.scale,t.originY)}function kx(e,t){return xx(fN(e.getBoundingClientRect(),t))}function pN(e,t,n){const r=kx(e,n),{scroll:s}=t;return s&&(Dt(r.x,s.offset.x),Dt(r.y,s.offset.y)),r}const mN={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},gN=rs.length;function yN(e,t,n){let r="",s=!0;for(let i=0;i<gN;i++){const o=rs[i],a=e[o];if(a===void 0)continue;let l=!0;if(typeof a=="number")l=a===(o.startsWith("scale")?1:0);else{const u=parseFloat(a);l=o.startsWith("scale")?u===1:u===0}if(!l||n){const u=cx(a,af[o]);if(!l){s=!1;const c=mN[o]||o;r+=`${c}(${u}) `}n&&(t[o]=u)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function hf(e,t,n){const{style:r,vars:s,transformOrigin:i}=e;let o=!1,a=!1;for(const l in t){const u=t[l];if(ss.has(l)){o=!0;continue}else if(A0(l)){s[l]=u;continue}else{const c=cx(u,af[l]);l.startsWith("origin")?(a=!0,i[l]=c):r[l]=c}}if(t.transform||(o||n?r.transform=yN(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=i;r.transformOrigin=`${l} ${u} ${c}`}}function Cx(e,{style:t,vars:n},r,s){const i=e.style;let o;for(o in t)i[o]=t[o];s==null||s.applyProjectionStyles(i,r);for(o in n)i.setProperty(o,n[o])}function tm(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const vs={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(I.test(e))e=parseFloat(e);else return e;const n=tm(e,t.target.x),r=tm(e,t.target.y);return`${n}% ${r}%`}},vN={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=Rt.parse(e);if(s.length>5)return r;const i=Rt.createTransformer(e),o=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;s[0+o]/=a,s[1+o]/=l;const u=ae(a,l,.5);return typeof s[2+o]=="number"&&(s[2+o]/=u),typeof s[3+o]=="number"&&(s[3+o]/=u),i(s)}},Pc={borderRadius:{...vs,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:vs,borderTopRightRadius:vs,borderBottomLeftRadius:vs,borderBottomRightRadius:vs,boxShadow:vN};function Ex(e,{layout:t,layoutId:n}){return ss.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Pc[e]||e==="opacity")}function pf(e,t,n){var o;const r=e.style,s=t==null?void 0:t.style,i={};if(!r)return i;for(const a in r)(Le(r[a])||s&&Le(s[a])||Ex(a,e)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(i[a]=r[a]);return i}function xN(e){return window.getComputedStyle(e)}class wN extends vx{constructor(){super(...arguments),this.type="html",this.renderInstance=Cx}readValueFromInstance(t,n){var r;if(ss.has(n))return(r=this.projection)!=null&&r.isProjecting?hc(n):zR(t,n);{const s=xN(t),i=(A0(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return kx(t,n)}build(t,n,r){hf(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return pf(t,n,r)}}const SN={offset:"stroke-dashoffset",array:"stroke-dasharray"},kN={offset:"strokeDashoffset",array:"strokeDasharray"};function CN(e,t,n=1,r=0,s=!0){e.pathLength=1;const i=s?SN:kN;e[i.offset]=`${-r}`,e[i.array]=`${t} ${n}`}const EN=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function bx(e,{attrX:t,attrY:n,attrScale:r,pathLength:s,pathSpacing:i=1,pathOffset:o=0,...a},l,u,c){if(hf(e,a,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete d.transformBox);for(const g of EN)d[g]!==void 0&&(f[g]=d[g],delete d[g]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),s!==void 0&&CN(d,s,i,o,!1)}const Tx=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Px=e=>typeof e=="string"&&e.toLowerCase()==="svg";function bN(e,t,n,r){Cx(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(Tx.has(s)?s:of(s),t.attrs[s])}function Rx(e,t,n){const r=pf(e,t,n);for(const s in e)if(Le(e[s])||Le(t[s])){const i=rs.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=e[s]}return r}class TN extends vx{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ke}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ss.has(n)){const r=ax(n);return r&&r.default||0}return n=Tx.has(n)?n:of(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Rx(t,n,r)}build(t,n,r){bx(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,s){bN(t,n,r,s)}mount(t){this.isSVGTag=Px(t.tagName),super.mount(t)}}const PN=ff.length;function Nx(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Nx(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<PN;n++){const r=ff[n],s=e.props[r];(li(s)||s===!1)&&(t[r]=s)}return t}function jx(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const RN=[...df].reverse(),NN=df.length;function jN(e){return t=>Promise.all(t.map(({animation:n,options:r})=>P2(e,n,r)))}function LN(e){let t=jN(e),n=nm(),r=!0,s=!1;const i=u=>(c,d)=>{var g;const f=Zn(e,d,u==="exit"?(g=e.presenceContext)==null?void 0:g.custom:void 0);if(f){const{transition:p,transitionEnd:v,...w}=f;c={...c,...w,...v}}return c};function o(u){t=u(e)}function a(u){const{props:c}=e,d=Nx(e.parent)||{},f=[],g=new Set;let p={},v=1/0;for(let m=0;m<NN;m++){const y=RN[m],x=n[y],k=c[y]!==void 0?c[y]:d[y],C=li(k),b=y===u?x.isActive:null;b===!1&&(v=m);let T=k===d[y]&&k!==c[y]&&C;if(T&&(r||s)&&e.manuallyAnimateOnMount&&(T=!1),x.protectedKeys={...p},!x.isActive&&b===null||!k&&!x.prevProp||Ga(k)||typeof k=="boolean")continue;if(y==="exit"&&x.isActive&&b!==!0){x.prevResolvedValues&&(p={...p,...x.prevResolvedValues});continue}const P=AN(x.prevProp,k);let L=P||y===u&&x.isActive&&!T&&C||m>v&&C,R=!1;const B=Array.isArray(k)?k:[k];let A=B.reduce(i(y),{});b===!1&&(A={});const{prevResolvedValues:M={}}=x,_={...M,...A},U=N=>{L=!0,g.has(N)&&(R=!0,g.delete(N)),x.needsAnimating[N]=!0;const D=e.getValue(N);D&&(D.liveStyle=!1)};for(const N in _){const D=A[N],$=M[N];if(p.hasOwnProperty(N))continue;let V=!1;xc(D)&&xc($)?V=!jx(D,$):V=D!==$,V?D!=null?U(N):g.add(N):D!==void 0&&g.has(N)?U(N):x.protectedKeys[N]=!0}x.prevProp=k,x.prevResolvedValues=A,x.isActive&&(p={...p,...A}),(r||s)&&e.blockInitialAnimation&&(L=!1);const z=T&&P;L&&(!z||R)&&f.push(...B.map(N=>{const D={type:y};if(typeof N=="string"&&(r||s)&&!z&&e.manuallyAnimateOnMount&&e.parent){const{parent:$}=e,V=Zn($,N);if($.enteringChildren&&V){const{delayChildren:G}=V.transition||{};D.delay=J0($.enteringChildren,e,G)}}return{animation:N,options:D}}))}if(g.size){const m={};if(typeof c.initial!="boolean"){const y=Zn(e,Array.isArray(c.initial)?c.initial[0]:c.initial);y&&y.transition&&(m.transition=y.transition)}g.forEach(y=>{const x=e.getBaseTarget(y),k=e.getValue(y);k&&(k.liveStyle=!0),m[y]=x??null}),f.push({animation:m})}let w=!!f.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(w=!1),r=!1,s=!1,w?t(f):Promise.resolve()}function l(u,c){var f;if(n[u].isActive===c)return Promise.resolve();(f=e.variantChildren)==null||f.forEach(g=>{var p;return(p=g.animationState)==null?void 0:p.setActive(u,c)}),n[u].isActive=c;const d=a(u);for(const g in n)n[g].protectedKeys={};return d}return{animateChanges:a,setActive:l,setAnimateFunction:o,getState:()=>n,reset:()=>{n=nm(),s=!0}}}function AN(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!jx(t,e):!1}function Vn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function nm(){return{animate:Vn(!0),whileInView:Vn(),whileHover:Vn(),whileTap:Vn(),whileDrag:Vn(),whileFocus:Vn(),exit:Vn()}}function Rc(e,t){e.min=t.min,e.max=t.max}function St(e,t){Rc(e.x,t.x),Rc(e.y,t.y)}function rm(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const Lx=1e-4,ON=1-Lx,DN=1+Lx,Ax=.01,MN=0-Ax,FN=0+Ax;function $e(e){return e.max-e.min}function IN(e,t,n){return Math.abs(e-t)<=n}function sm(e,t,n,r=.5){e.origin=r,e.originPoint=ae(t.min,t.max,e.origin),e.scale=$e(n)/$e(t),e.translate=ae(n.min,n.max,e.origin)-e.originPoint,(e.scale>=ON&&e.scale<=DN||isNaN(e.scale))&&(e.scale=1),(e.translate>=MN&&e.translate<=FN||isNaN(e.translate))&&(e.translate=0)}function Is(e,t,n,r){sm(e.x,t.x,n.x,r?r.originX:void 0),sm(e.y,t.y,n.y,r?r.originY:void 0)}function im(e,t,n,r=0){const s=r?ae(n.min,n.max,r):n.min;e.min=s+t.min,e.max=e.min+$e(t)}function _N(e,t,n,r){im(e.x,t.x,n.x,r==null?void 0:r.x),im(e.y,t.y,n.y,r==null?void 0:r.y)}function om(e,t,n,r=0){const s=r?ae(n.min,n.max,r):n.min;e.min=t.min-s,e.max=e.min+$e(t)}function fa(e,t,n,r){om(e.x,t.x,n.x,r==null?void 0:r.x),om(e.y,t.y,n.y,r==null?void 0:r.y)}function am(e,t,n,r,s){return e-=t,e=da(e,1/n,r),s!==void 0&&(e=da(e,1/s,r)),e}function VN(e,t=0,n=1,r=.5,s,i=e,o=e){if(zt.test(t)&&(t=parseFloat(t),t=ae(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=ae(i.min,i.max,r);e===i&&(a-=t),e.min=am(e.min,t,n,a,s),e.max=am(e.max,t,n,a,s)}function lm(e,t,[n,r,s],i,o){VN(e,t[n],t[r],t[s],t.scale,i,o)}const zN=["x","scaleX","originX"],$N=["y","scaleY","originY"];function um(e,t,n,r){lm(e.x,t,zN,n?n.x:void 0,r?r.x:void 0),lm(e.y,t,$N,n?n.y:void 0,r?r.y:void 0)}function cm(e){return e.translate===0&&e.scale===1}function Ox(e){return cm(e.x)&&cm(e.y)}function dm(e,t){return e.min===t.min&&e.max===t.max}function BN(e,t){return dm(e.x,t.x)&&dm(e.y,t.y)}function fm(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Dx(e,t){return fm(e.x,t.x)&&fm(e.y,t.y)}function hm(e){return $e(e.x)/$e(e.y)}function pm(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Ot(e){return[e("x"),e("y")]}function UN(e,t,n){let r="";const s=e.x.translate/t.x,i=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((s||i||o)&&(r=`translate3d(${s}px, ${i}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:d,rotateY:f,skewX:g,skewY:p}=n;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),g&&(r+=`skewX(${g}deg) `),p&&(r+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const Mx=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],HN=Mx.length,mm=e=>typeof e=="string"?parseFloat(e):e,gm=e=>typeof e=="number"||I.test(e);function WN(e,t,n,r,s,i){s?(e.opacity=ae(0,n.opacity??1,KN(r)),e.opacityExit=ae(t.opacity??1,0,GN(r))):i&&(e.opacity=ae(t.opacity??1,n.opacity??1,r));for(let o=0;o<HN;o++){const a=Mx[o];let l=ym(t,a),u=ym(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||gm(l)===gm(u)?(e[a]=Math.max(ae(mm(l),mm(u),r),0),(zt.test(u)||zt.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=ae(t.rotate||0,n.rotate||0,r))}function ym(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const KN=Fx(0,.5,T0),GN=Fx(.5,.95,mt);function Fx(e,t,n){return r=>r<e?0:r>t?1:n(oi(e,t,r))}function qN(e,t,n){const r=Le(e)?e:Gr(e);return r.start(rf("",r,t,n)),r.animation}function ui(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const YN=(e,t)=>e.depth-t.depth;class XN{constructor(){this.children=[],this.isDirty=!1}add(t){Hd(this.children,t),this.isDirty=!0}remove(t){ia(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(YN),this.isDirty=!1,this.children.forEach(t)}}function QN(e,t){const n=ze.now(),r=({timestamp:s})=>{const i=s-n;i>=t&&(Ln(r),e(i-t))};return ne.setup(r,!0),()=>Ln(r)}function To(e){return Le(e)?e.get():e}class JN{constructor(){this.members=[]}add(t){Hd(this.members,t);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===t||r===this.lead||r===this.prevLead)continue;const s=r.instance;(!s||s.isConnected===!1)&&!r.snapshot&&(ia(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(ia(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){var n;for(let r=this.members.indexOf(t)-1;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1&&((n=s.instance)==null?void 0:n.isConnected)!==!1)return this.promote(s),!0}return!1}promote(t,n){var s;const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.updateSnapshot(),t.scheduleRender();const{layoutDependency:i}=r.options,{layoutDependency:o}=t.options;(i===void 0||i!==o)&&(t.resumeFrom=r,n&&(r.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),(s=t.root)!=null&&s.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,s,i,o;(r=(n=t.options).onExitComplete)==null||r.call(n),(o=(s=t.resumingFrom)==null?void 0:(i=s.options).onExitComplete)==null||o.call(i)})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){var t;(t=this.lead)!=null&&t.snapshot&&(this.lead.snapshot=void 0)}}const Po={hasAnimatedSinceResize:!0,hasEverUpdated:!1},ql=["","X","Y","Z"],ZN=1e3;let ej=0;function Yl(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Ix(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=rx(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ne,!(s||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Ix(r)}function _x({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(o={},a=t==null?void 0:t()){this.id=ej++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(rj),this.nodes.forEach(uj),this.nodes.forEach(cj),this.nodes.forEach(sj)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new XN)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Kd),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=cf(o)&&!nN(o),this.instance=o;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let c,d=0;const f=()=>this.root.updateBlockedByResize=!1;ne.read(()=>{d=window.innerWidth}),e(o,()=>{const g=window.innerWidth;g!==d&&(d=g,this.root.updateBlockedByResize=!0,c&&c(),c=QN(f,250),Po.hasAnimatedSinceResize&&(Po.hasAnimatedSinceResize=!1,this.nodes.forEach(wm)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||u.getDefaultTransition()||mj,{onLayoutAnimationStart:v,onLayoutAnimationComplete:w}=u.getProps(),m=!this.targetLayout||!Dx(this.targetLayout,g),y=!d&&f;if(this.options.layoutRoot||this.resumeFrom||y||d&&(m||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...nf(p,"layout"),onPlay:v,onComplete:w};(u.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(c,y)}else d||wm(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ln(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(dj),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ix(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const d=this.path[c];d.shouldResetTransform=!0,(typeof d.latestValues.x=="string"||typeof d.latestValues.y=="string")&&(d.isLayoutDirty=!0),d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const l=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),l&&this.nodes.forEach(oj),this.nodes.forEach(vm);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(xm);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(aj),this.nodes.forEach(lj),this.nodes.forEach(tj),this.nodes.forEach(nj)):this.nodes.forEach(xm),this.clearAllSnapshots();const a=ze.now();je.delta=Bt(0,1e3/60,a-je.timestamp),je.timestamp=a,je.isProcessing=!0,zl.update.process(je),zl.preRender.process(je),zl.render.process(je),je.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,lf.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ij),this.sharedNodes.forEach(fj)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ne.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ne.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!$e(this.snapshot.measuredBox.x)&&!$e(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=ke()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Ox(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&this.instance&&(a||Bn(this.latestValues)||c)&&(s(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),gj(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return ke();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(yj))){const{scroll:c}=this.root;c&&(Dt(a.x,c.offset.x),Dt(a.y,c.offset.y))}return a}removeElementScroll(o){var l;const a=ke();if(St(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:d,options:f}=c;c!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&St(a,o),Dt(a.x,d.offset.x),Dt(a.y,d.offset.y))}return a}applyTransform(o,a=!1,l){var c,d;const u=l||ke();St(u,o);for(let f=0;f<this.path.length;f++){const g=this.path[f];!a&&g.options.layoutScroll&&g.scroll&&g!==g.root&&(Dt(u.x,-g.scroll.offset.x),Dt(u.y,-g.scroll.offset.y)),Bn(g.latestValues)&&bo(u,g.latestValues,(c=g.layout)==null?void 0:c.layoutBox)}return Bn(this.latestValues)&&bo(u,this.latestValues,(d=this.layout)==null?void 0:d.layoutBox),u}removeTransform(o){var l;const a=ke();St(a,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];if(!Bn(c.latestValues))continue;let d;c.instance&&(bc(c.latestValues)&&c.updateSnapshot(),d=ke(),St(d,c.measurePageBox())),um(a,c.latestValues,(l=c.snapshot)==null?void 0:l.layoutBox,d)}return Bn(this.latestValues)&&um(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==je.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var g;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(g=this.parent)!=null&&g.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:d}=this.options;if(!this.layout||!(c||d))return;this.resolvedRelativeTargetAt=je.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=ke(),this.targetWithTransforms=ke()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),_N(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):St(this.target,this.layout.layoutBox),Sx(this.target,this.targetDelta)):St(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||bc(this.parent.latestValues)||wx(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,l){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ke(),this.relativeTargetOrigin=ke(),fa(this.relativeTargetOrigin,a,l,this.options.layoutAnchor||void 0),St(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var p;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===je.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;St(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;hN(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=ke());const{target:g}=o;if(!g){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(rm(this.prevProjectionDelta.x,this.projectionDelta.x),rm(this.prevProjectionDelta.y,this.projectionDelta.y)),Is(this.projectionDelta,this.layoutCorrected,g,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!pm(this.projectionDelta.x,this.prevProjectionDelta.x)||!pm(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",g))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Rr(),this.projectionDelta=Rr(),this.projectionDeltaWithTransform=Rr()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=Rr();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=ke(),g=l?l.source:void 0,p=this.layout?this.layout.source:void 0,v=g!==p,w=this.getStack(),m=!w||w.members.length<=1,y=!!(v&&!m&&this.options.crossfade===!0&&!this.path.some(pj));this.animationProgress=0;let x;this.mixTargetDelta=k=>{const C=k/1e3;Sm(d.x,o.x,C),Sm(d.y,o.y,C),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(fa(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),hj(this.relativeTarget,this.relativeTargetOrigin,f,C),x&&BN(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=ke()),St(x,this.relativeTarget)),v&&(this.animationValues=c,WN(c,u,this.latestValues,C,y,m)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(Ln(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ne.update(()=>{Po.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Gr(0)),this.motionValue.jump(0,!1),this.currentAnimation=qN(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),o.onUpdate&&o.onUpdate(c)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(ZN),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&Vx(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||ke();const d=$e(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const f=$e(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}St(a,l),bo(a,c),Is(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new JN),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Yl("z",o,u,this.animationValues);for(let c=0;c<ql.length;c++)Yl(`rotate${ql[c]}`,o,u,this.animationValues),Yl(`skew${ql[c]}`,o,u,this.animationValues);o.render();for(const c in u)o.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=To(a==null?void 0:a.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=To(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Bn(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=UN(this.projectionDeltaWithTransform,this.treeScale,c);l&&(d=l(c,d)),o.transform=d;const{x:f,y:g}=this.projectionDelta;o.transformOrigin=`${f.origin*100}% ${g.origin*100}% 0`,u.animationValues?o.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:o.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const p in Pc){if(c[p]===void 0)continue;const{correct:v,applyTo:w,isCSSVariable:m}=Pc[p],y=d==="none"?c[p]:v(c[p],u);if(w){const x=w.length;for(let k=0;k<x;k++)o[w[k]]=y}else m?this.options.visualElement.renderState.vars[p]=y:o[p]=y}this.options.layoutId&&(o.pointerEvents=u===this?To(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(vm),this.root.sharedNodes.clear()}}}function tj(e){e.updateLayout()}function nj(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;if(i==="size")Ot(d=>{const f=o?t.measuredBox[d]:t.layoutBox[d],g=$e(f);f.min=r[d].min,f.max=f.min+g});else if(i==="x"||i==="y"){const d=i==="x"?"y":"x";Rc(o?t.measuredBox[d]:t.layoutBox[d],r[d])}else Vx(i,t.layoutBox,r)&&Ot(d=>{const f=o?t.measuredBox[d]:t.layoutBox[d],g=$e(r[d]);f.max=f.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+g)});const a=Rr();Is(a,r,t.layoutBox);const l=Rr();o?Is(l,e.applyTransform(s,!0),t.measuredBox):Is(l,r,t.layoutBox);const u=!Ox(a);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:g}=d;if(f&&g){const p=e.options.layoutAnchor||void 0,v=ke();fa(v,t.layoutBox,f.layoutBox,p);const w=ke();fa(w,r,g.layoutBox,p),Dx(v,w)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=w,e.relativeTargetOrigin=v,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function rj(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function sj(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function ij(e){e.clearSnapshot()}function vm(e){e.clearMeasurements()}function oj(e){e.isLayoutDirty=!0,e.updateLayout()}function xm(e){e.isLayoutDirty=!1}function aj(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function lj(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function wm(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function uj(e){e.resolveTargetDelta()}function cj(e){e.calcProjection()}function dj(e){e.resetSkewAndRotation()}function fj(e){e.removeLeadSnapshot()}function Sm(e,t,n){e.translate=ae(t.translate,0,n),e.scale=ae(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function km(e,t,n,r){e.min=ae(t.min,n.min,r),e.max=ae(t.max,n.max,r)}function hj(e,t,n,r){km(e.x,t.x,n.x,r),km(e.y,t.y,n.y,r)}function pj(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const mj={duration:.45,ease:[.4,0,.1,1]},Cm=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Em=Cm("applewebkit/")&&!Cm("chrome/")?Math.round:mt;function bm(e){e.min=Em(e.min),e.max=Em(e.max)}function gj(e){bm(e.x),bm(e.y)}function Vx(e,t,n){return e==="position"||e==="preserve-aspect"&&!IN(hm(t),hm(n),.2)}function yj(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const vj=_x({attachResizeListener:(e,t)=>ui(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),Xl={current:void 0},zx=_x({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Xl.current){const e=new vj({});e.mount(window),e.setOptions({layoutScroll:!0}),Xl.current=e}return Xl.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),mf=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Tm(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function xj(...e){return t=>{let n=!1;const r=e.map(s=>{const i=Tm(s,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<r.length;s++){const i=r[s];typeof i=="function"?i():Tm(e[s],null)}}}}function wj(...e){return S.useCallback(xj(...e),e)}class Sj extends S.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(So(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,s=So(r)&&r.offsetWidth||0,i=So(r)&&r.offsetHeight||0,o=getComputedStyle(n),a=this.props.sizeRef.current;a.height=parseFloat(o.height),a.width=parseFloat(o.width),a.top=n.offsetTop,a.left=n.offsetLeft,a.right=s-a.width-a.left,a.bottom=i-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}}function kj({children:e,isPresent:t,anchorX:n,anchorY:r,root:s,pop:i}){var f;const o=S.useId(),a=S.useRef(null),l=S.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:u}=S.useContext(mf),c=((f=e.props)==null?void 0:f.ref)??(e==null?void 0:e.ref),d=wj(a,c);return S.useInsertionEffect(()=>{const{width:g,height:p,top:v,left:w,right:m,bottom:y}=l.current;if(t||i===!1||!a.current||!g||!p)return;const x=n==="left"?`left: ${w}`:`right: ${m}`,k=r==="bottom"?`bottom: ${y}`:`top: ${v}`;a.current.dataset.motionPopId=o;const C=document.createElement("style");u&&(C.nonce=u);const b=s??document.head;return b.appendChild(C),C.sheet&&C.sheet.insertRule(`
208
+ `):" "+Sp(o[0]):"as no adapter specified";throw new H("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return s}const u0={getAdapter:vP,adapters:zd};function _l(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ci(null,e)}function kp(e){return _l(e),e.headers=Je.from(e.headers),e.data=Il.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),u0.getAdapter(e.adapter||ki.adapter,e)(e).then(function(r){return _l(e),r.data=Il.call(e,e.transformResponse,r),r.headers=Je.from(r.headers),r},function(r){return s0(r)||(_l(e),r&&r.response&&(r.response.data=Il.call(e,e.transformResponse,r.response),r.response.headers=Je.from(r.response.headers))),Promise.reject(r)})}const c0="1.14.0",Ha={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ha[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Cp={};Ha.transitional=function(t,n,r){function s(i,o){return"[Axios v"+c0+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,a)=>{if(t===!1)throw new H(s(o," has been removed"+(n?" in "+n:"")),H.ERR_DEPRECATED);return n&&!Cp[o]&&(Cp[o]=!0,console.warn(s(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,a):!0}};Ha.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function xP(e,t,n){if(typeof e!="object")throw new H("options must be an object",H.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const i=r[s],o=t[i];if(o){const a=e[i],l=a===void 0||o(a,i,e);if(l!==!0)throw new H("option "+i+" must be "+l,H.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new H("Unknown option "+i,H.ERR_BAD_OPTION)}}const xo={assertOptions:xP,validators:Ha},lt=xo.validators;let Qn=class{constructor(t){this.defaults=t||{},this.interceptors={request:new dp,response:new dp}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
209
+ `+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ar(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&xo.assertOptions(r,{silentJSONParsing:lt.transitional(lt.boolean),forcedJSONParsing:lt.transitional(lt.boolean),clarifyTimeoutError:lt.transitional(lt.boolean),legacyInterceptorReqResOrdering:lt.transitional(lt.boolean)},!1),s!=null&&(E.isFunction(s)?n.paramsSerializer={serialize:s}:xo.assertOptions(s,{encode:lt.function,serialize:lt.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),xo.assertOptions(n,{baseUrl:lt.spelling("baseURL"),withXsrfToken:lt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&E.merge(i.common,i[n.method]);i&&E.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),n.headers=Je.concat(o,i);const a=[];let l=!0;this.interceptors.request.forEach(function(v){if(typeof v.runWhen=="function"&&v.runWhen(n)===!1)return;l=l&&v.synchronous;const w=n.transitional||_d;w&&w.legacyInterceptorReqResOrdering?a.unshift(v.fulfilled,v.rejected):a.push(v.fulfilled,v.rejected)});const u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let c,d=0,f;if(!l){const p=[kp.bind(this),void 0];for(p.unshift(...a),p.push(...u),f=p.length,c=Promise.resolve(n);d<f;)c=c.then(p[d++],p[d++]);return c}f=a.length;let g=n;for(;d<f;){const p=a[d++],v=a[d++];try{g=p(g)}catch(w){v.call(this,w);break}}try{c=kp.call(this,g)}catch(p){return Promise.reject(p)}for(d=0,f=u.length;d<f;)c=c.then(u[d++],u[d++]);return c}getUri(t){t=ar(this.defaults,t);const n=o0(t.baseURL,t.url,t.allowAbsoluteUrls);return n0(n,t.params,t.paramsSerializer)}};E.forEach(["delete","get","head","options"],function(t){Qn.prototype[t]=function(n,r){return this.request(ar(r||{},{method:t,url:n,data:(r||{}).data}))}});E.forEach(["post","put","patch"],function(t){function n(r){return function(i,o,a){return this.request(ar(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}Qn.prototype[t]=n(),Qn.prototype[t+"Form"]=n(!0)});let wP=class d0{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(s=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(a=>{r.subscribe(a),i=a}).then(s);return o.cancel=function(){r.unsubscribe(i)},o},t(function(i,o,a){r.reason||(r.reason=new Ci(i,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new d0(function(s){t=s}),cancel:t}}};function SP(e){return function(n){return e.apply(null,n)}}function kP(e){return E.isObject(e)&&e.isAxiosError===!0}const oc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(oc).forEach(([e,t])=>{oc[t]=e});function f0(e){const t=new Qn(e),n=Wv(Qn.prototype.request,t);return E.extend(n,Qn.prototype,t,{allOwnKeys:!0}),E.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return f0(ar(e,s))},n}const ve=f0(ki);ve.Axios=Qn;ve.CanceledError=Ci;ve.CancelToken=wP;ve.isCancel=s0;ve.VERSION=c0;ve.toFormData=Ua;ve.AxiosError=H;ve.Cancel=ve.CanceledError;ve.all=function(t){return Promise.all(t)};ve.spread=SP;ve.isAxiosError=kP;ve.mergeConfig=ar;ve.AxiosHeaders=Je;ve.formToJSON=e=>r0(E.isHTMLForm(e)?new FormData(e):e);ve.getAdapter=u0.getAdapter;ve.HttpStatusCode=oc;ve.default=ve;const{Axios:$L,AxiosError:BL,CanceledError:UL,isCancel:HL,CancelToken:WL,VERSION:KL,all:GL,Cancel:qL,isAxiosError:YL,spread:XL,toFormData:QL,AxiosHeaders:JL,HttpStatusCode:ZL,formToJSON:eA,getAdapter:tA,mergeConfig:nA}=ve,Vl="caribbean_auth_token",ts={getToken(){return typeof window>"u"?null:localStorage.getItem(Vl)},setToken(e){typeof window>"u"||localStorage.setItem(Vl,e)},removeToken(){typeof window>"u"||localStorage.removeItem(Vl)},isAuthenticated(){return!!this.getToken()}},CP="/api",ot=ve.create({baseURL:CP,headers:{"Content-Type":"application/json"}});ot.interceptors.request.use(e=>{const t=ts.getToken();return t&&e.url!=="/login"&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e));ot.interceptors.response.use(e=>e,e=>{var t;return((t=e.response)==null?void 0:t.status)===401&&(e._isAuthError=!0,ts.removeToken()),Promise.reject(e)});async function EP(){return(await ot.get("/auth/status")).data}async function bP(e,t){return(await ot.post("/login",{username:e,password:t})).data}async function Ep(){return(await ot.get("/nodes/database")).data.nodes||[]}async function TP(e,t){await ot.patch(`/nodes/${e}/name`,{name:t})}async function PP(e){await ot.delete(`/nodes/${e}`)}async function RP(){return(await ot.get("/stats")).data}async function $d(e,t,n={}){return(await ot.post(`/nodes/${e}/command`,{action:t,params:n})).data}async function h0(e){return(await ot.get(`/commands/${e}/result`)).data}async function NP(e){var s;const t=await $d(e,"read_config",{}),n=10,r=500;for(let i=0;i<n;i++){await new Promise(o=>setTimeout(o,r));try{const o=await h0(t.commandId);if(o.success&&o.data)return o.data.config;if(!o.success)throw new Error(o.error||"Failed to get config")}catch(o){if(((s=o.response)==null?void 0:s.status)===404)continue;throw o}}throw new Error("Timeout waiting for command result")}async function jP(e){var s;const t=await $d(e,"read_logs",{}),n=10,r=500;for(let i=0;i<n;i++){await new Promise(o=>setTimeout(o,r));try{const o=await h0(t.commandId);if(o.success&&o.data)return o.data.logs;if(!o.success)throw new Error(o.error||"Failed to get logs")}catch(o){if(((s=o.response)==null?void 0:s.status)===404)continue;throw o}}throw new Error("Timeout waiting for command result")}async function LP(){return(await ot.get("/settings")).data}async function AP(e){return(await ot.post("/settings/auth",e)).data}async function OP(){return(await ot.get("/version")).data}function DP({isOpen:e,onClose:t}){const[n,r]=S.useState("");return S.useEffect(()=>{e&&OP().then(s=>r(s.version)).catch(()=>{})},[e]),h.jsx(Md,{open:e,onOpenChange:t,children:h.jsxs(Ia,{className:"max-w-md",children:[h.jsx(_a,{children:h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx(Va,{children:"Caribbean"}),h.jsx(re,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:t,children:h.jsx(Ma,{className:"h-4 w-4"})})]})}),h.jsxs("div",{className:"flex flex-col items-center justify-center py-8",children:[h.jsx("img",{src:"/img/caribbean-logo.png",alt:"Caribbean",className:"w-48 h-auto"}),h.jsxs("p",{className:"mt-4 text-muted-foreground",children:["Openclaw Caribbean Dashboard",n?` v${n}`:""]})]})]})})}const Bd=S.createContext({});function Ud(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const MP=typeof window<"u",p0=MP?S.useLayoutEffect:S.useEffect,Wa=S.createContext(null);function Hd(e,t){e.indexOf(t)===-1&&e.push(t)}function ia(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Bt=(e,t,n)=>n>t?t:n<e?e:n;let Wd=()=>{};const jn={},m0=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function g0(e){return typeof e=="object"&&e!==null}const y0=e=>/^0[^.\s]+$/u.test(e);function v0(e){let t;return()=>(t===void 0&&(t=e()),t)}const gt=e=>e,FP=(e,t)=>n=>t(e(n)),Ei=(...e)=>e.reduce(FP),oi=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Kd{constructor(){this.subscriptions=[]}add(t){return Hd(this.subscriptions,t),()=>ia(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let i=0;i<s;i++){const o=this.subscriptions[i];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const nt=e=>e*1e3,pt=e=>e/1e3;function x0(e,t){return t?e*(1e3/t):0}const w0=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,IP=1e-7,_P=12;function VP(e,t,n,r,s){let i,o,a=0;do o=t+(n-t)/2,i=w0(o,r,s)-e,i>0?n=o:t=o;while(Math.abs(i)>IP&&++a<_P);return o}function bi(e,t,n,r){if(e===t&&n===r)return gt;const s=i=>VP(i,0,1,e,n);return i=>i===0||i===1?i:w0(s(i),t,r)}const S0=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,k0=e=>t=>1-e(1-t),C0=bi(.33,1.53,.69,.99),Gd=k0(C0),E0=S0(Gd),b0=e=>e>=1?1:(e*=2)<1?.5*Gd(e):.5*(2-Math.pow(2,-10*(e-1))),qd=e=>1-Math.sin(Math.acos(e)),T0=k0(qd),P0=S0(qd),zP=bi(.42,0,1,1),$P=bi(0,0,.58,1),R0=bi(.42,0,.58,1),BP=e=>Array.isArray(e)&&typeof e[0]!="number",N0=e=>Array.isArray(e)&&typeof e[0]=="number",UP={linear:gt,easeIn:zP,easeInOut:R0,easeOut:$P,circIn:qd,circInOut:P0,circOut:T0,backIn:Gd,backInOut:E0,backOut:C0,anticipate:b0},HP=e=>typeof e=="string",bp=e=>{if(N0(e)){Wd(e.length===4);const[t,n,r,s]=e;return bi(t,n,r,s)}else if(HP(e))return UP[e];return e},Xi=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function WP(e,t){let n=new Set,r=new Set,s=!1,i=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){o.has(c)&&(u.schedule(c),e()),c(a)}const u={schedule:(c,d=!1,f=!1)=>{const p=f&&s?n:r;return d&&o.add(c),p.add(c),c},cancel:c=>{r.delete(c),o.delete(c)},process:c=>{if(a=c,s){i=!0;return}s=!0;const d=n;n=r,r=d,n.forEach(l),n.clear(),s=!1,i&&(i=!1,u.process(c))}};return u}const KP=40;function j0(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=Xi.reduce((x,k)=>(x[k]=WP(i),x),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:f,render:g,postRender:p}=o,v=()=>{const x=jn.useManualTiming,k=x?s.timestamp:performance.now();n=!1,x||(s.delta=r?1e3/60:Math.max(Math.min(k-s.timestamp,KP),1)),s.timestamp=k,s.isProcessing=!0,a.process(s),l.process(s),u.process(s),c.process(s),d.process(s),f.process(s),g.process(s),p.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(v))},w=()=>{n=!0,r=!0,s.isProcessing||e(v)};return{schedule:Xi.reduce((x,k)=>{const C=o[k];return x[k]=(b,T=!1,P=!1)=>(n||w(),C.schedule(b,T,P)),x},{}),cancel:x=>{for(let k=0;k<Xi.length;k++)o[Xi[k]].cancel(x)},state:s,steps:o}}const{schedule:ne,cancel:Ln,state:je,steps:zl}=j0(typeof requestAnimationFrame<"u"?requestAnimationFrame:gt,!0);let wo;function GP(){wo=void 0}const ze={now:()=>(wo===void 0&&ze.set(je.isProcessing||jn.useManualTiming?je.timestamp:performance.now()),wo),set:e=>{wo=e,queueMicrotask(GP)}},L0=e=>t=>typeof t=="string"&&t.startsWith(e),A0=L0("--"),qP=L0("var(--"),Yd=e=>qP(e)?YP.test(e.split("/*")[0].trim()):!1,YP=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Tp(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const ns={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ai={...ns,transform:e=>Bt(0,1,e)},Qi={...ns,default:1},Ms=e=>Math.round(e*1e5)/1e5,Xd=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function XP(e){return e==null}const QP=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Qd=(e,t)=>n=>!!(typeof n=="string"&&QP.test(n)&&n.startsWith(e)||t&&!XP(n)&&Object.prototype.hasOwnProperty.call(n,t)),O0=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,i,o,a]=r.match(Xd);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},JP=e=>Bt(0,255,e),$l={...ns,transform:e=>Math.round(JP(e))},Gn={test:Qd("rgb","red"),parse:O0("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+$l.transform(e)+", "+$l.transform(t)+", "+$l.transform(n)+", "+Ms(ai.transform(r))+")"};function ZP(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const ac={test:Qd("#"),parse:ZP,transform:Gn.transform},Ti=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),dn=Ti("deg"),zt=Ti("%"),I=Ti("px"),eR=Ti("vh"),tR=Ti("vw"),Pp={...zt,parse:e=>zt.parse(e)/100,transform:e=>zt.transform(e*100)},Tr={test:Qd("hsl","hue"),parse:O0("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+zt.transform(Ms(t))+", "+zt.transform(Ms(n))+", "+Ms(ai.transform(r))+")"},we={test:e=>Gn.test(e)||ac.test(e)||Tr.test(e),parse:e=>Gn.test(e)?Gn.parse(e):Tr.test(e)?Tr.parse(e):ac.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Gn.transform(e):Tr.transform(e),getAnimatableNone:e=>{const t=we.parse(e);return t.alpha=0,we.transform(t)}},nR=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function rR(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Xd))==null?void 0:t.length)||0)+(((n=e.match(nR))==null?void 0:n.length)||0)>0}const D0="number",M0="color",sR="var",iR="var(",Rp="${}",oR=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Kr(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const a=t.replace(oR,l=>(we.test(l)?(r.color.push(i),s.push(M0),n.push(we.parse(l))):l.startsWith(iR)?(r.var.push(i),s.push(sR),n.push(l)):(r.number.push(i),s.push(D0),n.push(parseFloat(l))),++i,Rp)).split(Rp);return{values:n,split:a,indexes:r,types:s}}function aR(e){return Kr(e).values}function F0({split:e,types:t}){const n=e.length;return r=>{let s="";for(let i=0;i<n;i++)if(s+=e[i],r[i]!==void 0){const o=t[i];o===D0?s+=Ms(r[i]):o===M0?s+=we.transform(r[i]):s+=r[i]}return s}}function lR(e){return F0(Kr(e))}const uR=e=>typeof e=="number"?0:we.test(e)?we.getAnimatableNone(e):e,cR=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:uR(e);function dR(e){const t=Kr(e);return F0(t)(t.values.map((r,s)=>cR(r,t.split[s])))}const Rt={test:rR,parse:aR,createTransformer:lR,getAnimatableNone:dR};function Bl(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function fR({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,i=0,o=0;if(!t)s=i=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;s=Bl(l,a,e+1/3),i=Bl(l,a,e),o=Bl(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function oa(e,t){return n=>n>0?t:e}const ae=(e,t,n)=>e+(t-e)*n,Ul=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},hR=[ac,Gn,Tr],pR=e=>hR.find(t=>t.test(e));function Np(e){const t=pR(e);if(!t)return!1;let n=t.parse(e);return t===Tr&&(n=fR(n)),n}const jp=(e,t)=>{const n=Np(e),r=Np(t);if(!n||!r)return oa(e,t);const s={...n};return i=>(s.red=Ul(n.red,r.red,i),s.green=Ul(n.green,r.green,i),s.blue=Ul(n.blue,r.blue,i),s.alpha=ae(n.alpha,r.alpha,i),Gn.transform(s))},lc=new Set(["none","hidden"]);function mR(e,t){return lc.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function gR(e,t){return n=>ae(e,t,n)}function Jd(e){return typeof e=="number"?gR:typeof e=="string"?Yd(e)?oa:we.test(e)?jp:xR:Array.isArray(e)?I0:typeof e=="object"?we.test(e)?jp:yR:oa}function I0(e,t){const n=[...e],r=n.length,s=e.map((i,o)=>Jd(i)(i,t[o]));return i=>{for(let o=0;o<r;o++)n[o]=s[o](i);return n}}function yR(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=Jd(e[s])(e[s],t[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}}function vR(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],o=e.indexes[i][r[i]],a=e.values[o]??0;n[s]=a,r[i]++}return n}const xR=(e,t)=>{const n=Rt.createTransformer(t),r=Kr(e),s=Kr(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?lc.has(e)&&!s.values.length||lc.has(t)&&!r.values.length?mR(e,t):Ei(I0(vR(r,s),s.values),n):oa(e,t)};function _0(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ae(e,t,n):Jd(e)(e,t)}const wR=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ne.update(t,n),stop:()=>Ln(t),now:()=>je.isProcessing?je.timestamp:ze.now()}},V0=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let i=0;i<s;i++)r+=Math.round(e(i/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},aa=2e4;function Zd(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<aa;)t+=n,r=e.next(t);return t>=aa?1/0:t}function SR(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min(Zd(r),aa);return{type:"keyframes",ease:i=>r.next(s*i).value/t,duration:pt(s)}}const me={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function uc(e,t){return e*Math.sqrt(1-t*t)}const kR=12;function CR(e,t,n){let r=n;for(let s=1;s<kR;s++)r=r-e(r)/t(r);return r}const Hl=.001;function ER({duration:e=me.duration,bounce:t=me.bounce,velocity:n=me.velocity,mass:r=me.mass}){let s,i,o=1-t;o=Bt(me.minDamping,me.maxDamping,o),e=Bt(me.minDuration,me.maxDuration,pt(e)),o<1?(s=u=>{const c=u*o,d=c*e,f=c-n,g=uc(u,o),p=Math.exp(-d);return Hl-f/g*p},i=u=>{const d=u*o*e,f=d*n+n,g=Math.pow(o,2)*Math.pow(u,2)*e,p=Math.exp(-d),v=uc(Math.pow(u,2),o);return(-s(u)+Hl>0?-1:1)*((f-g)*p)/v}):(s=u=>{const c=Math.exp(-u*e),d=(u-n)*e+1;return-Hl+c*d},i=u=>{const c=Math.exp(-u*e),d=(n-u)*(e*e);return c*d});const a=5/e,l=CR(s,i,a);if(e=nt(e),isNaN(l))return{stiffness:me.stiffness,damping:me.damping,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const bR=["duration","bounce"],TR=["stiffness","damping","mass"];function Lp(e,t){return t.some(n=>e[n]!==void 0)}function PR(e){let t={velocity:me.velocity,stiffness:me.stiffness,damping:me.damping,mass:me.mass,isResolvedFromDuration:!1,...e};if(!Lp(e,TR)&&Lp(e,bR))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*Bt(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:me.mass,stiffness:s,damping:i}}else{const n=ER({...e,velocity:0});t={...t,...n,mass:me.mass},t.isResolvedFromDuration=!0}return t}function la(e=me.visualDuration,t=me.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:l,damping:u,mass:c,duration:d,velocity:f,isResolvedFromDuration:g}=PR({...n,velocity:-pt(n.velocity||0)}),p=f||0,v=u/(2*Math.sqrt(l*c)),w=o-i,m=pt(Math.sqrt(l/c)),y=Math.abs(w)<5;r||(r=y?me.restSpeed.granular:me.restSpeed.default),s||(s=y?me.restDelta.granular:me.restDelta.default);let x,k,C,b,T,P;if(v<1)C=uc(m,v),b=(p+v*m*w)/C,x=R=>{const B=Math.exp(-v*m*R);return o-B*(b*Math.sin(C*R)+w*Math.cos(C*R))},T=v*m*b+w*C,P=v*m*w-b*C,k=R=>Math.exp(-v*m*R)*(T*Math.sin(C*R)+P*Math.cos(C*R));else if(v===1){x=B=>o-Math.exp(-m*B)*(w+(p+m*w)*B);const R=p+m*w;k=B=>Math.exp(-m*B)*(m*R*B-p)}else{const R=m*Math.sqrt(v*v-1);x=_=>{const U=Math.exp(-v*m*_),z=Math.min(R*_,300);return o-U*((p+v*m*w)*Math.sinh(z)+R*w*Math.cosh(z))/R};const B=(p+v*m*w)/R,A=v*m*B-w*R,M=v*m*w-B*R;k=_=>{const U=Math.exp(-v*m*_),z=Math.min(R*_,300);return U*(A*Math.sinh(z)+M*Math.cosh(z))}}const L={calculatedDuration:g&&d||null,velocity:R=>nt(k(R)),next:R=>{if(!g&&v<1){const A=Math.exp(-v*m*R),M=Math.sin(C*R),_=Math.cos(C*R),U=o-A*(b*M+w*_),z=nt(A*(T*M+P*_));return a.done=Math.abs(z)<=r&&Math.abs(o-U)<=s,a.value=a.done?o:U,a}const B=x(R);if(g)a.done=R>=d;else{const A=nt(k(R));a.done=Math.abs(A)<=r&&Math.abs(o-B)<=s}return a.value=a.done?o:B,a},toString:()=>{const R=Math.min(Zd(L),aa),B=V0(A=>L.next(R*A).value,R,30);return R+"ms "+B},toTransition:()=>{}};return L}la.applyToOptions=e=>{const t=SR(e,100,la);return e.ease=t.ease,e.duration=nt(t.duration),e.type="keyframes",e};const RR=5;function z0(e,t,n){const r=Math.max(t-RR,0);return x0(n-e(r),t-r)}function cc({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},g=P=>a!==void 0&&P<a||l!==void 0&&P>l,p=P=>a===void 0?l:l===void 0||Math.abs(a-P)<Math.abs(l-P)?a:l;let v=n*t;const w=d+v,m=o===void 0?w:o(w);m!==w&&(v=m-d);const y=P=>-v*Math.exp(-P/r),x=P=>m+y(P),k=P=>{const L=y(P),R=x(P);f.done=Math.abs(L)<=u,f.value=f.done?m:R};let C,b;const T=P=>{g(f.value)&&(C=P,b=la({keyframes:[f.value,p(f.value)],velocity:z0(x,P,f.value),damping:s,stiffness:i,restDelta:u,restSpeed:c}))};return T(0),{calculatedDuration:null,next:P=>{let L=!1;return!b&&C===void 0&&(L=!0,k(P),T(P)),C!==void 0&&P>=C?b.next(P-C):(!L&&k(P),f)}}}function NR(e,t,n){const r=[],s=n||jn.mix||_0,i=e.length-1;for(let o=0;o<i;o++){let a=s(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||gt:t;a=Ei(l,a)}r.push(a)}return r}function jR(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const i=e.length;if(Wd(i===t.length),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=NR(t,r,s),l=a.length,u=c=>{if(o&&c<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(c<e[d+1]);d++);const f=oi(e[d],e[d+1],c);return a[d](f)};return n?c=>u(Bt(e[0],e[i-1],c)):u}function LR(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=oi(0,t,r);e.push(ae(n,1,s))}}function AR(e){const t=[0];return LR(t,e.length-1),t}function OR(e,t){return e.map(n=>n*t)}function DR(e,t){return e.map(()=>t||R0).splice(0,e.length-1)}function Fs({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=BP(r)?r.map(bp):bp(r),i={done:!1,value:t[0]},o=OR(n&&n.length===t.length?n:AR(t),e),a=jR(o,t,{ease:Array.isArray(s)?s:DR(t,s)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const MR=e=>e!==null;function Ka(e,{repeat:t,repeatType:n="loop"},r,s=1){const i=e.filter(MR),a=s<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const FR={decay:cc,inertia:cc,tween:Fs,keyframes:Fs,spring:la};function $0(e){typeof e.type=="string"&&(e.type=FR[e.type])}class ef{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const IR=e=>e/100;class ua extends ef{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var r,s;const{motionValue:n}=this.options;n&&n.updatedAt!==ze.now()&&this.tick(ze.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(r=this.options).onStop)==null||s.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;$0(t);const{type:n=Fs,repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=t;let{keyframes:a}=t;const l=n||Fs;l!==Fs&&typeof a[0]!="number"&&(this.mixKeyframes=Ei(IR,_0(a[0],a[1])),a=[0,100]);const u=l({...t,keyframes:a});i==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=Zd(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:s,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:c,repeat:d,repeatType:f,repeatDelay:g,type:p,onUpdate:v,finalKeyframe:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const m=this.currentTime-u*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?m<0:m>s;this.currentTime=Math.max(m,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let x=this.currentTime,k=r;if(d){const P=Math.min(this.currentTime,s)/a;let L=Math.floor(P),R=P%1;!R&&P>=1&&(R=1),R===1&&L--,L=Math.min(L,d+1),!!(L%2)&&(f==="reverse"?(R=1-R,g&&(R-=g/a)):f==="mirror"&&(k=o)),x=Bt(0,1,R)*a}let C;y?(this.delayState.value=c[0],C=this.delayState):C=k.next(x),i&&!y&&(C.value=i(C.value));let{done:b}=C;!y&&l!==null&&(b=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const T=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&b);return T&&p!==cc&&(C.value=Ka(c,this.options,w,this.speed)),v&&v(C.value),T&&this.finish(),C}then(t,n){return this.finished.then(t,n)}get duration(){return pt(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+pt(t)}get time(){return pt(this.currentTime)}set time(t){t=nt(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return z0(r=>this.generator.next(r).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(ze.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=pt(this.currentTime))}play(){var s,i;if(this.isStopped)return;const{driver:t=wR,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(i=(s=this.options).onPlay)==null||i.call(s);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ze.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function _R(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const qn=e=>e*180/Math.PI,dc=e=>{const t=qn(Math.atan2(e[1],e[0]));return fc(t)},VR={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:dc,rotateZ:dc,skewX:e=>qn(Math.atan(e[1])),skewY:e=>qn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},fc=e=>(e=e%360,e<0&&(e+=360),e),Ap=dc,Op=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Dp=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),zR={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Op,scaleY:Dp,scale:e=>(Op(e)+Dp(e))/2,rotateX:e=>fc(qn(Math.atan2(e[6],e[5]))),rotateY:e=>fc(qn(Math.atan2(-e[2],e[0]))),rotateZ:Ap,rotate:Ap,skewX:e=>qn(Math.atan(e[4])),skewY:e=>qn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function hc(e){return e.includes("scale")?1:0}function pc(e,t){if(!e||e==="none")return hc(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=zR,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=VR,s=a}if(!s)return hc(t);const i=r[t],o=s[1].split(",").map(BR);return typeof i=="function"?i(o):o[i]}const $R=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return pc(n,t)};function BR(e){return parseFloat(e.trim())}const rs=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ss=new Set(rs),Mp=e=>e===ns||e===I,UR=new Set(["x","y","z"]),HR=rs.filter(e=>!UR.has(e));function WR(e){const t=[];return HR.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const xn={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{const s=e.max-e.min;return r==="border-box"?s:s-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{const s=e.max-e.min;return r==="border-box"?s:s-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>pc(t,"x"),y:(e,{transform:t})=>pc(t,"y")};xn.translateX=xn.x;xn.translateY=xn.y;const Jn=new Set;let mc=!1,gc=!1,yc=!1;function B0(){if(gc){const e=Array.from(Jn).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=WR(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([i,o])=>{var a;(a=r.getValue(i))==null||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}gc=!1,mc=!1,Jn.forEach(e=>e.complete(yc)),Jn.clear()}function U0(){Jn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(gc=!0)})}function KR(){yc=!0,U0(),B0(),yc=!1}class tf{constructor(t,n,r,s,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Jn.add(this),mc||(mc=!0,ne.read(U0),ne.resolveKeyframes(B0))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;if(t[0]===null){const i=s==null?void 0:s.get(),o=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const a=r.readValue(n,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),s&&i===void 0&&s.set(t[0])}_R(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Jn.delete(this)}cancel(){this.state==="scheduled"&&(Jn.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const GR=e=>e.startsWith("--");function H0(e,t,n){GR(t)?e.style.setProperty(t,n):e.style[t]=n}const qR={};function W0(e,t){const n=v0(e);return()=>qR[t]??n()}const YR=W0(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),K0=W0(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Cs=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Fp={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Cs([0,.65,.55,1]),circOut:Cs([.55,0,1,.45]),backIn:Cs([.31,.01,.66,-.59]),backOut:Cs([.33,1.53,.69,.99])};function G0(e,t){if(e)return typeof e=="function"?K0()?V0(e,t):"ease-out":N0(e)?Cs(e):Array.isArray(e)?e.map(n=>G0(n,t)||Fp.easeOut):Fp[e]}function XR(e,t,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[t]:n};l&&(c.offset=l);const d=G0(a,s);Array.isArray(d)&&(c.easing=d);const f={delay:r,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),e.animate(c,f)}function q0(e){return typeof e=="function"&&"applyToOptions"in e}function QR({type:e,...t}){return q0(e)&&K0()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Y0 extends ef{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:s,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=t,Wd(typeof t.type!="string");const u=QR(t);this.animation=XR(n,r,s,u,i),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const c=Ka(s,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(c),H0(n,r,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,r,s;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((s=(r=this.animation).commitStyles)==null||s.call(r))}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return pt(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+pt(t)}get time(){return pt(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=nt(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:r,observe:s}){var i;return this.allowFlatten&&((i=this.animation.effect)==null||i.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&YR()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),gt):s(this)}}const X0={anticipate:b0,backInOut:E0,circInOut:P0};function JR(e){return e in X0}function ZR(e){typeof e.ease=="string"&&JR(e.ease)&&(e.ease=X0[e.ease])}const Wl=10;class e2 extends Y0{constructor(t){ZR(t),$0(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:s,element:i,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new ua({...o,autoplay:!1}),l=Math.max(Wl,ze.now()-this.startTime),u=Bt(0,Wl,l-Wl),c=a.sample(l).value,{name:d}=this.options;i&&d&&H0(i,d,c),n.setWithVelocity(a.sample(Math.max(0,l-u)).value,c,u),a.stop()}}const Ip=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Rt.test(e)||e==="0")&&!e.startsWith("url("));function t2(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function n2(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],o=Ip(s,t),a=Ip(i,t);return!o||!a?!1:t2(e)||(n==="spring"||q0(n))&&r}function vc(e){e.duration=0,e.type="keyframes"}const Q0=new Set(["opacity","clipPath","filter","transform"]),r2=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function s2(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&r2.test(e[t]))return!0;return!1}const i2=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),o2=v0(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function a2(e){var d;const{motionValue:t,name:n,repeatDelay:r,repeatType:s,damping:i,type:o,keyframes:a}=e;if(!(((d=t==null?void 0:t.owner)==null?void 0:d.current)instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:c}=t.owner.getProps();return o2()&&n&&(Q0.has(n)||i2.has(n)&&s2(a))&&(n!=="transform"||!c)&&!u&&!r&&s!=="mirror"&&i!==0&&o!=="inertia"}const l2=40;class u2 extends ef{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o="loop",keyframes:a,name:l,motionValue:u,element:c,...d}){var p;super(),this.stop=()=>{var v,w;this._animation&&(this._animation.stop(),(v=this.stopTimeline)==null||v.call(this)),(w=this.keyframeResolver)==null||w.cancel()},this.createdAt=ze.now();const f={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:o,name:l,motionValue:u,element:c,...d},g=(c==null?void 0:c.KeyframeResolver)||tf;this.keyframeResolver=new g(a,(v,w,m)=>this.onKeyframesResolved(v,w,f,!m),l,u,c),(p=this.keyframeResolver)==null||p.scheduleResolve()}onKeyframesResolved(t,n,r,s){var m,y;this.keyframeResolver=void 0;const{name:i,type:o,velocity:a,delay:l,isHandoff:u,onUpdate:c}=r;this.resolvedAt=ze.now();let d=!0;n2(t,i,o,a)||(d=!1,(jn.instantAnimations||!l)&&(c==null||c(Ka(t,r,n))),t[0]=t[t.length-1],vc(r),r.repeat=0);const g={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>l2?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},p=d&&!u&&a2(g),v=(y=(m=g.motionValue)==null?void 0:m.owner)==null?void 0:y.current;let w;if(p)try{w=new e2({...g,element:v})}catch{w=new ua(g)}else w=new ua(g);w.finished.then(()=>{this.notifyFinished()}).catch(gt),this.pendingTimeline&&(this.stopTimeline=w.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=w}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),KR()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function J0(e,t,n,r=0,s=1){const i=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),o=e.size,a=(o-1)*r;return typeof n=="function"?n(i,o):s===1?i*r:a-i*r}const c2=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function d2(e){const t=c2.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}function Z0(e,t,n=1){const[r,s]=d2(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const o=i.trim();return m0(o)?parseFloat(o):o}return Yd(s)?Z0(s,t,n+1):s}const f2={type:"spring",stiffness:500,damping:25,restSpeed:10},h2=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),p2={type:"keyframes",duration:.8},m2={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},g2=(e,{keyframes:t})=>t.length>2?p2:ss.has(e)?e.startsWith("scale")?h2(t[1]):f2:m2;function ex(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function nf(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?ex(n,e):n}const y2=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function v2(e){for(const t in e)if(!y2.has(t))return!0;return!1}const rf=(e,t,n,r={},s,i)=>o=>{const a=nf(r,e)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-nt(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:s};v2(a)||Object.assign(c,g2(e,c)),c.duration&&(c.duration=nt(c.duration)),c.repeatDelay&&(c.repeatDelay=nt(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(vc(c),c.delay===0&&(d=!0)),(jn.instantAnimations||jn.skipAnimations||s!=null&&s.shouldSkipAnimations)&&(d=!0,vc(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,d&&!i&&t.get()!==void 0){const f=Ka(c.keyframes,a);if(f!==void 0){ne.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new ua(c):new u2(c)};function _p(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function sf(e,t,n,r){if(typeof t=="function"){const[s,i]=_p(r);t=t(n!==void 0?n:e.custom,s,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,i]=_p(r);t=t(n!==void 0?n:e.custom,s,i)}return t}function Zn(e,t,n){const r=e.getProps();return sf(r,t,n!==void 0?n:r.custom,e)}const tx=new Set(["width","height","top","left","right","bottom",...rs]),Vp=30,x2=e=>!isNaN(parseFloat(e));class w2{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var i;const s=ze.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=ze.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=x2(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Kd);const r=this.events[t].add(n);return t==="change"?()=>{r(),ne.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=ze.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Vp)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Vp);return x0(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Gr(e,t){return new w2(e,t)}const xc=e=>Array.isArray(e);function S2(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Gr(n))}function k2(e){return xc(e)?e[e.length-1]||0:e}function C2(e,t){const n=Zn(e,t);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const o in i){const a=k2(i[o]);S2(e,o,a)}}const Le=e=>!!(e&&e.getVelocity);function E2(e){return!!(Le(e)&&e.add)}function wc(e,t){const n=e.getValue("willChange");if(E2(n))return n.add(t);if(!n&&jn.WillChange){const r=new jn.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function of(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const b2="framerAppearId",nx="data-"+of(b2);function rx(e){return e.props[nx]}function T2({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function sx(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:i,transitionEnd:o,...a}=t;const l=e.getDefaultTransition();i=i?ex(i,l):l;const u=i==null?void 0:i.reduceMotion;r&&(i=r);const c=[],d=s&&e.animationState&&e.animationState.getState()[s];for(const f in a){const g=e.getValue(f,e.latestValues[f]??null),p=a[f];if(p===void 0||d&&T2(d,f))continue;const v={delay:n,...nf(i||{},f)},w=g.get();if(w!==void 0&&!g.isAnimating()&&!Array.isArray(p)&&p===w&&!v.velocity){ne.update(()=>g.set(p));continue}let m=!1;if(window.MotionHandoffAnimation){const k=rx(e);if(k){const C=window.MotionHandoffAnimation(k,f,ne);C!==null&&(v.startTime=C,m=!0)}}wc(e,f);const y=u??e.shouldReduceMotion;g.start(rf(f,g,p,y&&tx.has(f)?{type:!1}:v,e,m));const x=g.animation;x&&c.push(x)}if(o){const f=()=>ne.update(()=>{o&&C2(e,o)});c.length?Promise.all(c).then(f):f()}return c}function Sc(e,t,n={}){var l;const r=Zn(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const i=r?()=>Promise.all(sx(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=s;return P2(e,t,u,c,d,f,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[u,c]=a==="beforeChildren"?[i,o]:[o,i];return u().then(()=>c())}else return Promise.all([i(),o(n.delay)])}function P2(e,t,n=0,r=0,s=0,i=1,o){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(Sc(l,t,{...o,delay:n+(typeof r=="function"?0:r)+J0(e.variantChildren,l,r,s,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function R2(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(i=>Sc(e,i,n));r=Promise.all(s)}else if(typeof t=="string")r=Sc(e,t,n);else{const s=typeof t=="function"?Zn(e,t,n.custom):t;r=Promise.all(sx(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const N2={test:e=>e==="auto",parse:e=>e},ix=e=>t=>t.test(e),ox=[ns,I,zt,dn,tR,eR,N2],zp=e=>ox.find(ix(e));function j2(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||y0(e):!0}const L2=new Set(["brightness","contrast","saturate","opacity"]);function A2(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Xd)||[];if(!r)return e;const s=n.replace(r,"");let i=L2.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+s+")"}const O2=/\b([a-z-]*)\(.*?\)/gu,kc={...Rt,getAnimatableNone:e=>{const t=e.match(O2);return t?t.map(A2).join(" "):e}},Cc={...Rt,getAnimatableNone:e=>{const t=Rt.parse(e);return Rt.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},$p={...ns,transform:Math.round},D2={rotate:dn,rotateX:dn,rotateY:dn,rotateZ:dn,scale:Qi,scaleX:Qi,scaleY:Qi,scaleZ:Qi,skew:dn,skewX:dn,skewY:dn,distance:I,translateX:I,translateY:I,translateZ:I,x:I,y:I,z:I,perspective:I,transformPerspective:I,opacity:ai,originX:Pp,originY:Pp,originZ:I},af={borderWidth:I,borderTopWidth:I,borderRightWidth:I,borderBottomWidth:I,borderLeftWidth:I,borderRadius:I,borderTopLeftRadius:I,borderTopRightRadius:I,borderBottomRightRadius:I,borderBottomLeftRadius:I,width:I,maxWidth:I,height:I,maxHeight:I,top:I,right:I,bottom:I,left:I,inset:I,insetBlock:I,insetBlockStart:I,insetBlockEnd:I,insetInline:I,insetInlineStart:I,insetInlineEnd:I,padding:I,paddingTop:I,paddingRight:I,paddingBottom:I,paddingLeft:I,paddingBlock:I,paddingBlockStart:I,paddingBlockEnd:I,paddingInline:I,paddingInlineStart:I,paddingInlineEnd:I,margin:I,marginTop:I,marginRight:I,marginBottom:I,marginLeft:I,marginBlock:I,marginBlockStart:I,marginBlockEnd:I,marginInline:I,marginInlineStart:I,marginInlineEnd:I,fontSize:I,backgroundPositionX:I,backgroundPositionY:I,...D2,zIndex:$p,fillOpacity:ai,strokeOpacity:ai,numOctaves:$p},M2={...af,color:we,backgroundColor:we,outlineColor:we,fill:we,stroke:we,borderColor:we,borderTopColor:we,borderRightColor:we,borderBottomColor:we,borderLeftColor:we,filter:kc,WebkitFilter:kc,mask:Cc,WebkitMask:Cc},ax=e=>M2[e],F2=new Set([kc,Cc]);function lx(e,t){let n=ax(e);return F2.has(n)||(n=Rt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const I2=new Set(["auto","none","0"]);function _2(e,t,n){let r=0,s;for(;r<e.length&&!s;){const i=e[r];typeof i=="string"&&!I2.has(i)&&Kr(i).values.length&&(s=e[r]),r++}if(s&&n)for(const i of t)e[i]=lx(n,s)}class V2 extends tf{constructor(t,n,r,s,i){super(t,n,r,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let d=t[c];if(typeof d=="string"&&(d=d.trim(),Yd(d))){const f=Z0(d,n.current);f!==void 0&&(t[c]=f),c===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!tx.has(r)||t.length!==2)return;const[s,i]=t,o=zp(s),a=zp(i),l=Tp(s),u=Tp(i);if(l!==u&&xn[r]){this.needsMeasurement=!0;return}if(o!==a)if(Mp(o)&&Mp(a))for(let c=0;c<t.length;c++){const d=t[c];typeof d=="string"&&(t[c]=parseFloat(d))}else xn[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)(t[s]===null||j2(t[s]))&&r.push(s);r.length&&_2(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=xn[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const i=r.length-1,o=r[i];r[i]=xn[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,u])=>{t.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function ux(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const s=(n==null?void 0:n[e])??r.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(r=>r!=null)}const cx=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function So(e){return g0(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:lf}=j0(queueMicrotask,!1),kt={x:!1,y:!1};function dx(){return kt.x||kt.y}function z2(e){return e==="x"||e==="y"?kt[e]?null:(kt[e]=!0,()=>{kt[e]=!1}):kt.x||kt.y?null:(kt.x=kt.y=!0,()=>{kt.x=kt.y=!1})}function fx(e,t){const n=ux(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function $2(e){return!(e.pointerType==="touch"||dx())}function B2(e,t,n={}){const[r,s,i]=fx(e,n);return r.forEach(o=>{let a=!1,l=!1,u;const c=()=>{o.removeEventListener("pointerleave",p)},d=w=>{u&&(u(w),u=void 0),c()},f=w=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,d(w))},g=()=>{a=!0,window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",f,s)},p=w=>{if(w.pointerType!=="touch"){if(a){l=!0;return}d(w)}},v=w=>{if(!$2(w))return;l=!1;const m=t(o,w);typeof m=="function"&&(u=m,o.addEventListener("pointerleave",p,s))};o.addEventListener("pointerenter",v,s),o.addEventListener("pointerdown",g,s)}),i}const hx=(e,t)=>t?e===t?!0:hx(e,t.parentElement):!1,uf=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,U2=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function H2(e){return U2.has(e.tagName)||e.isContentEditable===!0}const W2=new Set(["INPUT","SELECT","TEXTAREA"]);function K2(e){return W2.has(e.tagName)||e.isContentEditable===!0}const ko=new WeakSet;function Bp(e){return t=>{t.key==="Enter"&&e(t)}}function Kl(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const G2=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Bp(()=>{if(ko.has(n))return;Kl(n,"down");const s=Bp(()=>{Kl(n,"up")}),i=()=>Kl(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Up(e){return uf(e)&&!dx()}const Hp=new WeakSet;function q2(e,t,n={}){const[r,s,i]=fx(e,n),o=a=>{const l=a.currentTarget;if(!Up(a)||Hp.has(a))return;ko.add(l),n.stopPropagation&&Hp.add(a);const u=t(l,a),c=(g,p)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),ko.has(l)&&ko.delete(l),Up(g)&&typeof u=="function"&&u(g,{success:p})},d=g=>{c(g,l===window||l===document||n.useGlobalTarget||hx(l,g.target))},f=g=>{c(g,!1)};window.addEventListener("pointerup",d,s),window.addEventListener("pointercancel",f,s)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),So(a)&&(a.addEventListener("focus",u=>G2(u,s)),!H2(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),i}function cf(e){return g0(e)&&"ownerSVGElement"in e}const Co=new WeakMap;let fn;const px=(e,t,n)=>(r,s)=>s&&s[0]?s[0][e+"Size"]:cf(r)&&"getBBox"in r?r.getBBox()[t]:r[n],Y2=px("inline","width","offsetWidth"),X2=px("block","height","offsetHeight");function Q2({target:e,borderBoxSize:t}){var n;(n=Co.get(e))==null||n.forEach(r=>{r(e,{get width(){return Y2(e,t)},get height(){return X2(e,t)}})})}function J2(e){e.forEach(Q2)}function Z2(){typeof ResizeObserver>"u"||(fn=new ResizeObserver(J2))}function eN(e,t){fn||Z2();const n=ux(e);return n.forEach(r=>{let s=Co.get(r);s||(s=new Set,Co.set(r,s)),s.add(t),fn==null||fn.observe(r)}),()=>{n.forEach(r=>{const s=Co.get(r);s==null||s.delete(t),s!=null&&s.size||fn==null||fn.unobserve(r)})}}const Eo=new Set;let Pr;function tN(){Pr=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Eo.forEach(t=>t(e))},window.addEventListener("resize",Pr)}function nN(e){return Eo.add(e),Pr||tN(),()=>{Eo.delete(e),!Eo.size&&typeof Pr=="function"&&(window.removeEventListener("resize",Pr),Pr=void 0)}}function Wp(e,t){return typeof e=="function"?nN(e):eN(e,t)}function rN(e){return cf(e)&&e.tagName==="svg"}const sN=[...ox,we,Rt],iN=e=>sN.find(ix(e)),Kp=()=>({translate:0,scale:1,origin:0,originPoint:0}),Rr=()=>({x:Kp(),y:Kp()}),Gp=()=>({min:0,max:0}),ke=()=>({x:Gp(),y:Gp()}),oN=new WeakMap;function Ga(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function li(e){return typeof e=="string"||Array.isArray(e)}const df=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ff=["initial",...df];function qa(e){return Ga(e.animate)||ff.some(t=>li(e[t]))}function mx(e){return!!(qa(e)||e.variants)}function aN(e,t,n){for(const r in t){const s=t[r],i=n[r];if(Le(s))e.addValue(r,s);else if(Le(i))e.addValue(r,Gr(s,{owner:e}));else if(i!==s)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=e.getStaticValue(r);e.addValue(r,Gr(o!==void 0?o:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Ec={current:null},gx={current:!1},lN=typeof window<"u";function uN(){if(gx.current=!0,!!lN)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ec.current=e.matches;e.addEventListener("change",t),t()}else Ec.current=!1}const qp=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let ca={};function yx(e){ca=e}function cN(){return ca}class dN{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,skipAnimations:i,blockInitialAnimation:o,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=tf,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const g=ze.now();this.renderScheduledAt<g&&(this.renderScheduledAt=g,ne.render(this.render,!1,!0))};const{latestValues:u,renderState:c}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=i,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=qa(n),this.isVariantNode=mx(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const g in f){const p=f[g];u[g]!==void 0&&Le(p)&&p.set(u[g])}}mount(t){var n,r;if(this.hasBeenMounted)for(const s in this.initialValues)(n=this.values.get(s))==null||n.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=t,oN.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,i)=>this.bindToMotionValue(i,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(gx.current||uN(),this.shouldReduceMotion=Ec.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),Ln(this.notifyUpdate),Ln(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&Q0.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:l,ease:u,duration:c}=n.accelerate,d=new Y0({element:this.current,name:t,keyframes:a,times:l,ease:u,duration:nt(c)}),f=o(d);this.valueSubscriptions.set(t,()=>{f(),d.cancel()});return}const r=ss.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&ne.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in ca){const n=ca[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ke()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<qp.length;r++){const s=qp[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,o=t[i];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=aN(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Gr(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(m0(r)||y0(r))?r=parseFloat(r):!iN(r)&&Rt.test(n)&&(r=lx(t,n)),this.setBaseTarget(t,Le(r)?r.get():r)),Le(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var i;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=sf(this.props,n,(i=this.presenceContext)==null?void 0:i.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!Le(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Kd),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){lf.render(this.render)}}class vx extends dN{constructor(){super(...arguments),this.KeyframeResolver=V2}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Le(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Mn{constructor(t){this.isMounted=!1,this.node=t}update(){}}function xx({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function fN({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function hN(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Gl(e){return e===void 0||e===1}function bc({scale:e,scaleX:t,scaleY:n}){return!Gl(e)||!Gl(t)||!Gl(n)}function Bn(e){return bc(e)||wx(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function wx(e){return Yp(e.x)||Yp(e.y)}function Yp(e){return e&&e!=="0%"}function da(e,t,n){const r=e-n,s=t*r;return n+s}function Xp(e,t,n,r,s){return s!==void 0&&(e=da(e,s,r)),da(e,n,r)+t}function Tc(e,t=0,n=1,r,s){e.min=Xp(e.min,t,n,r,s),e.max=Xp(e.max,t,n,r,s)}function Sx(e,{x:t,y:n}){Tc(e.x,t.translate,t.scale,t.originPoint),Tc(e.y,n.translate,n.scale,n.originPoint)}const Qp=.999999999999,Jp=1.0000000000001;function pN(e,t,n,r=!1){var a;const s=n.length;if(!s)return;t.x=t.y=1;let i,o;for(let l=0;l<s;l++){i=n[l],o=i.projectionDelta;const{visualElement:u}=i.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&(Dt(e.x,-i.scroll.offset.x),Dt(e.y,-i.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Sx(e,o)),r&&Bn(i.latestValues)&&bo(e,i.latestValues,(a=i.layout)==null?void 0:a.layoutBox))}t.x<Jp&&t.x>Qp&&(t.x=1),t.y<Jp&&t.y>Qp&&(t.y=1)}function Dt(e,t){e.min+=t,e.max+=t}function Zp(e,t,n,r,s=.5){const i=ae(e.min,e.max,s);Tc(e,t,n,i,r)}function em(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function bo(e,t,n){const r=n??e;Zp(e.x,em(t.x,r.x),t.scaleX,t.scale,t.originX),Zp(e.y,em(t.y,r.y),t.scaleY,t.scale,t.originY)}function kx(e,t){return xx(hN(e.getBoundingClientRect(),t))}function mN(e,t,n){const r=kx(e,n),{scroll:s}=t;return s&&(Dt(r.x,s.offset.x),Dt(r.y,s.offset.y)),r}const gN={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},yN=rs.length;function vN(e,t,n){let r="",s=!0;for(let i=0;i<yN;i++){const o=rs[i],a=e[o];if(a===void 0)continue;let l=!0;if(typeof a=="number")l=a===(o.startsWith("scale")?1:0);else{const u=parseFloat(a);l=o.startsWith("scale")?u===1:u===0}if(!l||n){const u=cx(a,af[o]);if(!l){s=!1;const c=gN[o]||o;r+=`${c}(${u}) `}n&&(t[o]=u)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function hf(e,t,n){const{style:r,vars:s,transformOrigin:i}=e;let o=!1,a=!1;for(const l in t){const u=t[l];if(ss.has(l)){o=!0;continue}else if(A0(l)){s[l]=u;continue}else{const c=cx(u,af[l]);l.startsWith("origin")?(a=!0,i[l]=c):r[l]=c}}if(t.transform||(o||n?r.transform=vN(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=i;r.transformOrigin=`${l} ${u} ${c}`}}function Cx(e,{style:t,vars:n},r,s){const i=e.style;let o;for(o in t)i[o]=t[o];s==null||s.applyProjectionStyles(i,r);for(o in n)i.setProperty(o,n[o])}function tm(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const vs={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(I.test(e))e=parseFloat(e);else return e;const n=tm(e,t.target.x),r=tm(e,t.target.y);return`${n}% ${r}%`}},xN={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=Rt.parse(e);if(s.length>5)return r;const i=Rt.createTransformer(e),o=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;s[0+o]/=a,s[1+o]/=l;const u=ae(a,l,.5);return typeof s[2+o]=="number"&&(s[2+o]/=u),typeof s[3+o]=="number"&&(s[3+o]/=u),i(s)}},Pc={borderRadius:{...vs,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:vs,borderTopRightRadius:vs,borderBottomLeftRadius:vs,borderBottomRightRadius:vs,boxShadow:xN};function Ex(e,{layout:t,layoutId:n}){return ss.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Pc[e]||e==="opacity")}function pf(e,t,n){var o;const r=e.style,s=t==null?void 0:t.style,i={};if(!r)return i;for(const a in r)(Le(r[a])||s&&Le(s[a])||Ex(a,e)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(i[a]=r[a]);return i}function wN(e){return window.getComputedStyle(e)}class SN extends vx{constructor(){super(...arguments),this.type="html",this.renderInstance=Cx}readValueFromInstance(t,n){var r;if(ss.has(n))return(r=this.projection)!=null&&r.isProjecting?hc(n):$R(t,n);{const s=wN(t),i=(A0(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return kx(t,n)}build(t,n,r){hf(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return pf(t,n,r)}}const kN={offset:"stroke-dashoffset",array:"stroke-dasharray"},CN={offset:"strokeDashoffset",array:"strokeDasharray"};function EN(e,t,n=1,r=0,s=!0){e.pathLength=1;const i=s?kN:CN;e[i.offset]=`${-r}`,e[i.array]=`${t} ${n}`}const bN=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function bx(e,{attrX:t,attrY:n,attrScale:r,pathLength:s,pathSpacing:i=1,pathOffset:o=0,...a},l,u,c){if(hf(e,a,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete d.transformBox);for(const g of bN)d[g]!==void 0&&(f[g]=d[g],delete d[g]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),s!==void 0&&EN(d,s,i,o,!1)}const Tx=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Px=e=>typeof e=="string"&&e.toLowerCase()==="svg";function TN(e,t,n,r){Cx(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(Tx.has(s)?s:of(s),t.attrs[s])}function Rx(e,t,n){const r=pf(e,t,n);for(const s in e)if(Le(e[s])||Le(t[s])){const i=rs.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=e[s]}return r}class PN extends vx{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ke}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ss.has(n)){const r=ax(n);return r&&r.default||0}return n=Tx.has(n)?n:of(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Rx(t,n,r)}build(t,n,r){bx(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,s){TN(t,n,r,s)}mount(t){this.isSVGTag=Px(t.tagName),super.mount(t)}}const RN=ff.length;function Nx(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Nx(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<RN;n++){const r=ff[n],s=e.props[r];(li(s)||s===!1)&&(t[r]=s)}return t}function jx(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const NN=[...df].reverse(),jN=df.length;function LN(e){return t=>Promise.all(t.map(({animation:n,options:r})=>R2(e,n,r)))}function AN(e){let t=LN(e),n=nm(),r=!0,s=!1;const i=u=>(c,d)=>{var g;const f=Zn(e,d,u==="exit"?(g=e.presenceContext)==null?void 0:g.custom:void 0);if(f){const{transition:p,transitionEnd:v,...w}=f;c={...c,...w,...v}}return c};function o(u){t=u(e)}function a(u){const{props:c}=e,d=Nx(e.parent)||{},f=[],g=new Set;let p={},v=1/0;for(let m=0;m<jN;m++){const y=NN[m],x=n[y],k=c[y]!==void 0?c[y]:d[y],C=li(k),b=y===u?x.isActive:null;b===!1&&(v=m);let T=k===d[y]&&k!==c[y]&&C;if(T&&(r||s)&&e.manuallyAnimateOnMount&&(T=!1),x.protectedKeys={...p},!x.isActive&&b===null||!k&&!x.prevProp||Ga(k)||typeof k=="boolean")continue;if(y==="exit"&&x.isActive&&b!==!0){x.prevResolvedValues&&(p={...p,...x.prevResolvedValues});continue}const P=ON(x.prevProp,k);let L=P||y===u&&x.isActive&&!T&&C||m>v&&C,R=!1;const B=Array.isArray(k)?k:[k];let A=B.reduce(i(y),{});b===!1&&(A={});const{prevResolvedValues:M={}}=x,_={...M,...A},U=N=>{L=!0,g.has(N)&&(R=!0,g.delete(N)),x.needsAnimating[N]=!0;const D=e.getValue(N);D&&(D.liveStyle=!1)};for(const N in _){const D=A[N],$=M[N];if(p.hasOwnProperty(N))continue;let V=!1;xc(D)&&xc($)?V=!jx(D,$):V=D!==$,V?D!=null?U(N):g.add(N):D!==void 0&&g.has(N)?U(N):x.protectedKeys[N]=!0}x.prevProp=k,x.prevResolvedValues=A,x.isActive&&(p={...p,...A}),(r||s)&&e.blockInitialAnimation&&(L=!1);const z=T&&P;L&&(!z||R)&&f.push(...B.map(N=>{const D={type:y};if(typeof N=="string"&&(r||s)&&!z&&e.manuallyAnimateOnMount&&e.parent){const{parent:$}=e,V=Zn($,N);if($.enteringChildren&&V){const{delayChildren:G}=V.transition||{};D.delay=J0($.enteringChildren,e,G)}}return{animation:N,options:D}}))}if(g.size){const m={};if(typeof c.initial!="boolean"){const y=Zn(e,Array.isArray(c.initial)?c.initial[0]:c.initial);y&&y.transition&&(m.transition=y.transition)}g.forEach(y=>{const x=e.getBaseTarget(y),k=e.getValue(y);k&&(k.liveStyle=!0),m[y]=x??null}),f.push({animation:m})}let w=!!f.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(w=!1),r=!1,s=!1,w?t(f):Promise.resolve()}function l(u,c){var f;if(n[u].isActive===c)return Promise.resolve();(f=e.variantChildren)==null||f.forEach(g=>{var p;return(p=g.animationState)==null?void 0:p.setActive(u,c)}),n[u].isActive=c;const d=a(u);for(const g in n)n[g].protectedKeys={};return d}return{animateChanges:a,setActive:l,setAnimateFunction:o,getState:()=>n,reset:()=>{n=nm(),s=!0}}}function ON(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!jx(t,e):!1}function Vn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function nm(){return{animate:Vn(!0),whileInView:Vn(),whileHover:Vn(),whileTap:Vn(),whileDrag:Vn(),whileFocus:Vn(),exit:Vn()}}function Rc(e,t){e.min=t.min,e.max=t.max}function St(e,t){Rc(e.x,t.x),Rc(e.y,t.y)}function rm(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const Lx=1e-4,DN=1-Lx,MN=1+Lx,Ax=.01,FN=0-Ax,IN=0+Ax;function $e(e){return e.max-e.min}function _N(e,t,n){return Math.abs(e-t)<=n}function sm(e,t,n,r=.5){e.origin=r,e.originPoint=ae(t.min,t.max,e.origin),e.scale=$e(n)/$e(t),e.translate=ae(n.min,n.max,e.origin)-e.originPoint,(e.scale>=DN&&e.scale<=MN||isNaN(e.scale))&&(e.scale=1),(e.translate>=FN&&e.translate<=IN||isNaN(e.translate))&&(e.translate=0)}function Is(e,t,n,r){sm(e.x,t.x,n.x,r?r.originX:void 0),sm(e.y,t.y,n.y,r?r.originY:void 0)}function im(e,t,n,r=0){const s=r?ae(n.min,n.max,r):n.min;e.min=s+t.min,e.max=e.min+$e(t)}function VN(e,t,n,r){im(e.x,t.x,n.x,r==null?void 0:r.x),im(e.y,t.y,n.y,r==null?void 0:r.y)}function om(e,t,n,r=0){const s=r?ae(n.min,n.max,r):n.min;e.min=t.min-s,e.max=e.min+$e(t)}function fa(e,t,n,r){om(e.x,t.x,n.x,r==null?void 0:r.x),om(e.y,t.y,n.y,r==null?void 0:r.y)}function am(e,t,n,r,s){return e-=t,e=da(e,1/n,r),s!==void 0&&(e=da(e,1/s,r)),e}function zN(e,t=0,n=1,r=.5,s,i=e,o=e){if(zt.test(t)&&(t=parseFloat(t),t=ae(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=ae(i.min,i.max,r);e===i&&(a-=t),e.min=am(e.min,t,n,a,s),e.max=am(e.max,t,n,a,s)}function lm(e,t,[n,r,s],i,o){zN(e,t[n],t[r],t[s],t.scale,i,o)}const $N=["x","scaleX","originX"],BN=["y","scaleY","originY"];function um(e,t,n,r){lm(e.x,t,$N,n?n.x:void 0,r?r.x:void 0),lm(e.y,t,BN,n?n.y:void 0,r?r.y:void 0)}function cm(e){return e.translate===0&&e.scale===1}function Ox(e){return cm(e.x)&&cm(e.y)}function dm(e,t){return e.min===t.min&&e.max===t.max}function UN(e,t){return dm(e.x,t.x)&&dm(e.y,t.y)}function fm(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Dx(e,t){return fm(e.x,t.x)&&fm(e.y,t.y)}function hm(e){return $e(e.x)/$e(e.y)}function pm(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Ot(e){return[e("x"),e("y")]}function HN(e,t,n){let r="";const s=e.x.translate/t.x,i=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((s||i||o)&&(r=`translate3d(${s}px, ${i}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:d,rotateY:f,skewX:g,skewY:p}=n;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),g&&(r+=`skewX(${g}deg) `),p&&(r+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const Mx=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],WN=Mx.length,mm=e=>typeof e=="string"?parseFloat(e):e,gm=e=>typeof e=="number"||I.test(e);function KN(e,t,n,r,s,i){s?(e.opacity=ae(0,n.opacity??1,GN(r)),e.opacityExit=ae(t.opacity??1,0,qN(r))):i&&(e.opacity=ae(t.opacity??1,n.opacity??1,r));for(let o=0;o<WN;o++){const a=Mx[o];let l=ym(t,a),u=ym(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||gm(l)===gm(u)?(e[a]=Math.max(ae(mm(l),mm(u),r),0),(zt.test(u)||zt.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=ae(t.rotate||0,n.rotate||0,r))}function ym(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const GN=Fx(0,.5,T0),qN=Fx(.5,.95,gt);function Fx(e,t,n){return r=>r<e?0:r>t?1:n(oi(e,t,r))}function YN(e,t,n){const r=Le(e)?e:Gr(e);return r.start(rf("",r,t,n)),r.animation}function ui(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const XN=(e,t)=>e.depth-t.depth;class QN{constructor(){this.children=[],this.isDirty=!1}add(t){Hd(this.children,t),this.isDirty=!0}remove(t){ia(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(XN),this.isDirty=!1,this.children.forEach(t)}}function JN(e,t){const n=ze.now(),r=({timestamp:s})=>{const i=s-n;i>=t&&(Ln(r),e(i-t))};return ne.setup(r,!0),()=>Ln(r)}function To(e){return Le(e)?e.get():e}class ZN{constructor(){this.members=[]}add(t){Hd(this.members,t);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===t||r===this.lead||r===this.prevLead)continue;const s=r.instance;(!s||s.isConnected===!1)&&!r.snapshot&&(ia(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(ia(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){var n;for(let r=this.members.indexOf(t)-1;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1&&((n=s.instance)==null?void 0:n.isConnected)!==!1)return this.promote(s),!0}return!1}promote(t,n){var s;const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.updateSnapshot(),t.scheduleRender();const{layoutDependency:i}=r.options,{layoutDependency:o}=t.options;(i===void 0||i!==o)&&(t.resumeFrom=r,n&&(r.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),(s=t.root)!=null&&s.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,s,i,o;(r=(n=t.options).onExitComplete)==null||r.call(n),(o=(s=t.resumingFrom)==null?void 0:(i=s.options).onExitComplete)==null||o.call(i)})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){var t;(t=this.lead)!=null&&t.snapshot&&(this.lead.snapshot=void 0)}}const Po={hasAnimatedSinceResize:!0,hasEverUpdated:!1},ql=["","X","Y","Z"],ej=1e3;let tj=0;function Yl(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Ix(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=rx(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ne,!(s||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Ix(r)}function _x({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(o={},a=t==null?void 0:t()){this.id=tj++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(sj),this.nodes.forEach(cj),this.nodes.forEach(dj),this.nodes.forEach(ij)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new QN)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Kd),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=cf(o)&&!rN(o),this.instance=o;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let c,d=0;const f=()=>this.root.updateBlockedByResize=!1;ne.read(()=>{d=window.innerWidth}),e(o,()=>{const g=window.innerWidth;g!==d&&(d=g,this.root.updateBlockedByResize=!0,c&&c(),c=JN(f,250),Po.hasAnimatedSinceResize&&(Po.hasAnimatedSinceResize=!1,this.nodes.forEach(wm)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||u.getDefaultTransition()||gj,{onLayoutAnimationStart:v,onLayoutAnimationComplete:w}=u.getProps(),m=!this.targetLayout||!Dx(this.targetLayout,g),y=!d&&f;if(this.options.layoutRoot||this.resumeFrom||y||d&&(m||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...nf(p,"layout"),onPlay:v,onComplete:w};(u.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(c,y)}else d||wm(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ln(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(fj),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ix(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const d=this.path[c];d.shouldResetTransform=!0,(typeof d.latestValues.x=="string"||typeof d.latestValues.y=="string")&&(d.isLayoutDirty=!0),d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const l=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),l&&this.nodes.forEach(aj),this.nodes.forEach(vm);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(xm);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(lj),this.nodes.forEach(uj),this.nodes.forEach(nj),this.nodes.forEach(rj)):this.nodes.forEach(xm),this.clearAllSnapshots();const a=ze.now();je.delta=Bt(0,1e3/60,a-je.timestamp),je.timestamp=a,je.isProcessing=!0,zl.update.process(je),zl.preRender.process(je),zl.render.process(je),je.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,lf.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(oj),this.sharedNodes.forEach(hj)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ne.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ne.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!$e(this.snapshot.measuredBox.x)&&!$e(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=ke()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Ox(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&this.instance&&(a||Bn(this.latestValues)||c)&&(s(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),yj(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return ke();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(vj))){const{scroll:c}=this.root;c&&(Dt(a.x,c.offset.x),Dt(a.y,c.offset.y))}return a}removeElementScroll(o){var l;const a=ke();if(St(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:d,options:f}=c;c!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&St(a,o),Dt(a.x,d.offset.x),Dt(a.y,d.offset.y))}return a}applyTransform(o,a=!1,l){var c,d;const u=l||ke();St(u,o);for(let f=0;f<this.path.length;f++){const g=this.path[f];!a&&g.options.layoutScroll&&g.scroll&&g!==g.root&&(Dt(u.x,-g.scroll.offset.x),Dt(u.y,-g.scroll.offset.y)),Bn(g.latestValues)&&bo(u,g.latestValues,(c=g.layout)==null?void 0:c.layoutBox)}return Bn(this.latestValues)&&bo(u,this.latestValues,(d=this.layout)==null?void 0:d.layoutBox),u}removeTransform(o){var l;const a=ke();St(a,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];if(!Bn(c.latestValues))continue;let d;c.instance&&(bc(c.latestValues)&&c.updateSnapshot(),d=ke(),St(d,c.measurePageBox())),um(a,c.latestValues,(l=c.snapshot)==null?void 0:l.layoutBox,d)}return Bn(this.latestValues)&&um(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==je.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var g;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(g=this.parent)!=null&&g.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:d}=this.options;if(!this.layout||!(c||d))return;this.resolvedRelativeTargetAt=je.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=ke(),this.targetWithTransforms=ke()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),VN(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):St(this.target,this.layout.layoutBox),Sx(this.target,this.targetDelta)):St(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||bc(this.parent.latestValues)||wx(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,l){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ke(),this.relativeTargetOrigin=ke(),fa(this.relativeTargetOrigin,a,l,this.options.layoutAnchor||void 0),St(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var p;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===je.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;St(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;pN(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=ke());const{target:g}=o;if(!g){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(rm(this.prevProjectionDelta.x,this.projectionDelta.x),rm(this.prevProjectionDelta.y,this.projectionDelta.y)),Is(this.projectionDelta,this.layoutCorrected,g,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!pm(this.projectionDelta.x,this.prevProjectionDelta.x)||!pm(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",g))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Rr(),this.projectionDelta=Rr(),this.projectionDeltaWithTransform=Rr()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=Rr();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=ke(),g=l?l.source:void 0,p=this.layout?this.layout.source:void 0,v=g!==p,w=this.getStack(),m=!w||w.members.length<=1,y=!!(v&&!m&&this.options.crossfade===!0&&!this.path.some(mj));this.animationProgress=0;let x;this.mixTargetDelta=k=>{const C=k/1e3;Sm(d.x,o.x,C),Sm(d.y,o.y,C),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(fa(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),pj(this.relativeTarget,this.relativeTargetOrigin,f,C),x&&UN(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=ke()),St(x,this.relativeTarget)),v&&(this.animationValues=c,KN(c,u,this.latestValues,C,y,m)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(Ln(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ne.update(()=>{Po.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Gr(0)),this.motionValue.jump(0,!1),this.currentAnimation=YN(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),o.onUpdate&&o.onUpdate(c)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(ej),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&Vx(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||ke();const d=$e(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const f=$e(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}St(a,l),bo(a,c),Is(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new ZN),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Yl("z",o,u,this.animationValues);for(let c=0;c<ql.length;c++)Yl(`rotate${ql[c]}`,o,u,this.animationValues),Yl(`skew${ql[c]}`,o,u,this.animationValues);o.render();for(const c in u)o.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=To(a==null?void 0:a.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=To(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Bn(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=HN(this.projectionDeltaWithTransform,this.treeScale,c);l&&(d=l(c,d)),o.transform=d;const{x:f,y:g}=this.projectionDelta;o.transformOrigin=`${f.origin*100}% ${g.origin*100}% 0`,u.animationValues?o.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:o.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const p in Pc){if(c[p]===void 0)continue;const{correct:v,applyTo:w,isCSSVariable:m}=Pc[p],y=d==="none"?c[p]:v(c[p],u);if(w){const x=w.length;for(let k=0;k<x;k++)o[w[k]]=y}else m?this.options.visualElement.renderState.vars[p]=y:o[p]=y}this.options.layoutId&&(o.pointerEvents=u===this?To(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(vm),this.root.sharedNodes.clear()}}}function nj(e){e.updateLayout()}function rj(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;if(i==="size")Ot(d=>{const f=o?t.measuredBox[d]:t.layoutBox[d],g=$e(f);f.min=r[d].min,f.max=f.min+g});else if(i==="x"||i==="y"){const d=i==="x"?"y":"x";Rc(o?t.measuredBox[d]:t.layoutBox[d],r[d])}else Vx(i,t.layoutBox,r)&&Ot(d=>{const f=o?t.measuredBox[d]:t.layoutBox[d],g=$e(r[d]);f.max=f.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+g)});const a=Rr();Is(a,r,t.layoutBox);const l=Rr();o?Is(l,e.applyTransform(s,!0),t.measuredBox):Is(l,r,t.layoutBox);const u=!Ox(a);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:g}=d;if(f&&g){const p=e.options.layoutAnchor||void 0,v=ke();fa(v,t.layoutBox,f.layoutBox,p);const w=ke();fa(w,r,g.layoutBox,p),Dx(v,w)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=w,e.relativeTargetOrigin=v,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function sj(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function ij(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function oj(e){e.clearSnapshot()}function vm(e){e.clearMeasurements()}function aj(e){e.isLayoutDirty=!0,e.updateLayout()}function xm(e){e.isLayoutDirty=!1}function lj(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function uj(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function wm(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function cj(e){e.resolveTargetDelta()}function dj(e){e.calcProjection()}function fj(e){e.resetSkewAndRotation()}function hj(e){e.removeLeadSnapshot()}function Sm(e,t,n){e.translate=ae(t.translate,0,n),e.scale=ae(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function km(e,t,n,r){e.min=ae(t.min,n.min,r),e.max=ae(t.max,n.max,r)}function pj(e,t,n,r){km(e.x,t.x,n.x,r),km(e.y,t.y,n.y,r)}function mj(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const gj={duration:.45,ease:[.4,0,.1,1]},Cm=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Em=Cm("applewebkit/")&&!Cm("chrome/")?Math.round:gt;function bm(e){e.min=Em(e.min),e.max=Em(e.max)}function yj(e){bm(e.x),bm(e.y)}function Vx(e,t,n){return e==="position"||e==="preserve-aspect"&&!_N(hm(t),hm(n),.2)}function vj(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const xj=_x({attachResizeListener:(e,t)=>ui(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),Xl={current:void 0},zx=_x({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Xl.current){const e=new xj({});e.mount(window),e.setOptions({layoutScroll:!0}),Xl.current=e}return Xl.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),mf=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Tm(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function wj(...e){return t=>{let n=!1;const r=e.map(s=>{const i=Tm(s,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<r.length;s++){const i=r[s];typeof i=="function"?i():Tm(e[s],null)}}}}function Sj(...e){return S.useCallback(wj(...e),e)}class kj extends S.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(So(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,s=So(r)&&r.offsetWidth||0,i=So(r)&&r.offsetHeight||0,o=getComputedStyle(n),a=this.props.sizeRef.current;a.height=parseFloat(o.height),a.width=parseFloat(o.width),a.top=n.offsetTop,a.left=n.offsetLeft,a.right=s-a.width-a.left,a.bottom=i-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}}function Cj({children:e,isPresent:t,anchorX:n,anchorY:r,root:s,pop:i}){var f;const o=S.useId(),a=S.useRef(null),l=S.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:u}=S.useContext(mf),c=((f=e.props)==null?void 0:f.ref)??(e==null?void 0:e.ref),d=Sj(a,c);return S.useInsertionEffect(()=>{const{width:g,height:p,top:v,left:w,right:m,bottom:y}=l.current;if(t||i===!1||!a.current||!g||!p)return;const x=n==="left"?`left: ${w}`:`right: ${m}`,k=r==="bottom"?`bottom: ${y}`:`top: ${v}`;a.current.dataset.motionPopId=o;const C=document.createElement("style");u&&(C.nonce=u);const b=s??document.head;return b.appendChild(C),C.sheet&&C.sheet.insertRule(`
210
210
  [data-motion-pop-id="${o}"] {
211
211
  position: absolute !important;
212
212
  width: ${g}px !important;
@@ -214,4 +214,4 @@ Please change the parent <Route path="${m}"> to <Route path="${m==="/"?"*":`${m}
214
214
  ${x}px !important;
215
215
  ${k}px !important;
216
216
  }
217
- `),()=>{var T;(T=a.current)==null||T.removeAttribute("data-motion-pop-id"),b.contains(C)&&b.removeChild(C)}},[t]),h.jsx(Sj,{isPresent:t,childRef:a,sizeRef:l,pop:i,children:i===!1?e:S.cloneElement(e,{ref:d})})}const Cj=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:i,mode:o,anchorX:a,anchorY:l,root:u})=>{const c=Ud(Ej),d=S.useId();let f=!0,g=S.useMemo(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:s,onExitComplete:p=>{c.set(p,!0);for(const v of c.values())if(!v)return;r&&r()},register:p=>(c.set(p,!1),()=>c.delete(p))}),[n,c,r]);return i&&f&&(g={...g}),S.useMemo(()=>{c.forEach((p,v)=>c.set(v,!1))},[n]),S.useEffect(()=>{!n&&!c.size&&r&&r()},[n]),e=h.jsx(kj,{pop:o==="popLayout",isPresent:n,anchorX:a,anchorY:l,root:u,children:e}),h.jsx(Wa.Provider,{value:g,children:e})};function Ej(){return new Map}function $x(e=!0){const t=S.useContext(Wa);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,i=S.useId();S.useEffect(()=>{if(e)return s(i)},[e]);const o=S.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,o]:[!0]}const Ji=e=>e.key||"";function Pm(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const Rm=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:i="sync",propagate:o=!1,anchorX:a="left",anchorY:l="top",root:u})=>{const[c,d]=$x(o),f=S.useMemo(()=>Pm(e),[e]),g=o&&!c?[]:f.map(Ji),p=S.useRef(!0),v=S.useRef(f),w=Ud(()=>new Map),m=S.useRef(new Set),[y,x]=S.useState(f),[k,C]=S.useState(f);p0(()=>{p.current=!1,v.current=f;for(let P=0;P<k.length;P++){const L=Ji(k[P]);g.includes(L)?(w.delete(L),m.current.delete(L)):w.get(L)!==!0&&w.set(L,!1)}},[k,g.length,g.join("-")]);const b=[];if(f!==y){let P=[...f];for(let L=0;L<k.length;L++){const R=k[L],B=Ji(R);g.includes(B)||(P.splice(L,0,R),b.push(R))}return i==="wait"&&b.length&&(P=b),C(Pm(P)),x(f),null}const{forceRender:T}=S.useContext(Bd);return h.jsx(h.Fragment,{children:k.map(P=>{const L=Ji(P),R=o&&!c?!1:f===k||g.includes(L),B=()=>{if(m.current.has(L))return;if(w.has(L))m.current.add(L),w.set(L,!0);else return;let A=!0;w.forEach(M=>{M||(A=!1)}),A&&(T==null||T(),C(v.current),o&&(d==null||d()),r&&r())};return h.jsx(Cj,{isPresent:R,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:i,root:u,onExitComplete:R?void 0:B,anchorX:a,anchorY:l,children:P},L)})})},Bx=S.createContext({strict:!1}),Nm={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let jm=!1;function bj(){if(jm)return;const e={};for(const t in Nm)e[t]={isEnabled:n=>Nm[t].some(r=>!!n[r])};yx(e),jm=!0}function Ux(){return bj(),uN()}function Tj(e){const t=Ux();for(const n in e)t[n]={...t[n],...e[n]};yx(t)}const Pj=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function ha(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Pj.has(e)}let Hx=e=>!ha(e);function Rj(e){typeof e=="function"&&(Hx=t=>t.startsWith("on")?!ha(t):e(t))}try{Rj(require("@emotion/is-prop-valid").default)}catch{}function Nj(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||Le(e[s])||(Hx(s)||n===!0&&ha(s)||!t&&!ha(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}const Ya=S.createContext({});function jj(e,t){if(qa(e)){const{initial:n,animate:r}=e;return{initial:n===!1||li(n)?n:void 0,animate:li(r)?r:void 0}}return e.inherit!==!1?t:{}}function Lj(e){const{initial:t,animate:n}=jj(e,S.useContext(Ya));return S.useMemo(()=>({initial:t,animate:n}),[Lm(t),Lm(n)])}function Lm(e){return Array.isArray(e)?e.join(" "):e}const gf=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Wx(e,t,n){for(const r in t)!Le(t[r])&&!Ex(r,n)&&(e[r]=t[r])}function Aj({transformTemplate:e},t){return S.useMemo(()=>{const n=gf();return hf(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Oj(e,t){const n=e.style||{},r={};return Wx(r,n,e),Object.assign(r,Aj(e,t)),r}function Dj(e,t){const n={},r=Oj(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const Kx=()=>({...gf(),attrs:{}});function Mj(e,t,n,r){const s=S.useMemo(()=>{const i=Kx();return bx(i,t,Px(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Wx(i,e.style,e),s.style={...i,...s.style}}return s}const Fj=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function yf(e){return typeof e!="string"||e.includes("-")?!1:!!(Fj.indexOf(e)>-1||/[A-Z]/u.test(e))}function Ij(e,t,n,{latestValues:r},s,i=!1,o){const l=(o??yf(e)?Mj:Dj)(t,r,s,e),u=Nj(t,typeof e=="string",i),c=e!==S.Fragment?{...u,...l,ref:n}:{},{children:d}=t,f=S.useMemo(()=>Le(d)?d.get():d,[d]);return S.createElement(e,{...c,children:f})}function _j({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:Vj(n,r,s,e),renderState:t()}}function Vj(e,t,n,r){const s={},i=r(e,{});for(const f in i)s[f]=To(i[f]);let{initial:o,animate:a}=e;const l=qa(e),u=mx(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const d=c?a:o;if(d&&typeof d!="boolean"&&!Ga(d)){const f=Array.isArray(d)?d:[d];for(let g=0;g<f.length;g++){const p=sf(e,f[g]);if(p){const{transitionEnd:v,transition:w,...m}=p;for(const y in m){let x=m[y];if(Array.isArray(x)){const k=c?x.length-1:0;x=x[k]}x!==null&&(s[y]=x)}for(const y in v)s[y]=v[y]}}}return s}const Gx=e=>(t,n)=>{const r=S.useContext(Ya),s=S.useContext(Wa),i=()=>_j(e,t,r,s);return n?i():Ud(i)},zj=Gx({scrapeMotionValuesFromProps:pf,createRenderState:gf}),$j=Gx({scrapeMotionValuesFromProps:Rx,createRenderState:Kx}),Bj=Symbol.for("motionComponentSymbol");function Uj(e,t,n){const r=S.useRef(n);S.useInsertionEffect(()=>{r.current=n});const s=S.useRef(null);return S.useCallback(i=>{var a;i&&((a=e.onMount)==null||a.call(e,i));const o=r.current;if(typeof o=="function")if(i){const l=o(i);typeof l=="function"&&(s.current=l)}else s.current?(s.current(),s.current=null):o(i);else o&&(o.current=i);t&&(i?t.mount(i):t.unmount())},[t])}const qx=S.createContext({});function hr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Hj(e,t,n,r,s,i){var x,k;const{visualElement:o}=S.useContext(Ya),a=S.useContext(Bx),l=S.useContext(Wa),u=S.useContext(mf),c=u.reducedMotion,d=u.skipAnimations,f=S.useRef(null),g=S.useRef(!1);r=r||a.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,skipAnimations:d,isSVG:i}),g.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const p=f.current,v=S.useContext(qx);p&&!p.projection&&s&&(p.type==="html"||p.type==="svg")&&Wj(f.current,n,s,v);const w=S.useRef(!1);S.useInsertionEffect(()=>{p&&w.current&&p.update(n,l)});const m=n[nx],y=S.useRef(!!m&&typeof window<"u"&&!((x=window.MotionHandoffIsComplete)!=null&&x.call(window,m))&&((k=window.MotionHasOptimisedAnimation)==null?void 0:k.call(window,m)));return p0(()=>{g.current=!0,p&&(w.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),y.current&&p.animationState&&p.animationState.animateChanges())}),S.useEffect(()=>{p&&(!y.current&&p.animationState&&p.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var C;(C=window.MotionHandoffMarkAsComplete)==null||C.call(window,m)}),y.current=!1),p.enteringChildren=void 0)}),p}function Wj(e,t,n,r){const{layoutId:s,layout:i,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutAnchor:c,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Yx(e.parent)),e.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!o||a&&hr(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:u,layoutAnchor:c})}function Yx(e){if(e)return e.options.allowProjection!==!1?e.projection:Yx(e.parent)}function Ql(e,{forwardMotionProps:t=!1,type:n}={},r,s){r&&Tj(r);const i=n?n==="svg":yf(e),o=i?$j:zj;function a(u,c){let d;const f={...S.useContext(mf),...u,layoutId:Kj(u)},{isStatic:g}=f,p=Lj(u),v=o(u,g);if(!g&&typeof window<"u"){Gj();const w=qj(f);d=w.MeasureLayout,p.visualElement=Hj(e,v,f,s,w.ProjectionNode,i)}return h.jsxs(Ya.Provider,{value:p,children:[d&&p.visualElement?h.jsx(d,{visualElement:p.visualElement,...f}):null,Ij(e,u,Uj(v,p.visualElement,c),v,g,t,i)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=S.forwardRef(a);return l[Bj]=e,l}function Kj({layoutId:e}){const t=S.useContext(Bd).id;return t&&e!==void 0?t+"-"+e:e}function Gj(e,t){S.useContext(Bx).strict}function qj(e){const t=Ux(),{drag:n,layout:r}=t;if(!n&&!r)return{};const s={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function Yj(e,t){if(typeof Proxy>"u")return Ql;const n=new Map,r=(i,o)=>Ql(i,o,e,t),s=(i,o)=>r(i,o);return new Proxy(s,{get:(i,o)=>o==="create"?r:(n.has(o)||n.set(o,Ql(o,void 0,e,t)),n.get(o))})}const Xj=(e,t)=>t.isSVG??yf(e)?new TN(t):new wN(t,{allowProjection:e!==S.Fragment});class Qj extends Mn{constructor(t){super(t),t.animationState||(t.animationState=LN(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ga(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let Jj=0;class Zj extends Mn{constructor(){super(...arguments),this.id=Jj++,this.isExitComplete=!1}update(){var i;if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;if(t&&r===!1){if(this.isExitComplete){const{initial:o,custom:a}=this.node.getProps();if(typeof o=="string"){const l=Zn(this.node,o,a);if(l){const{transition:u,transitionEnd:c,...d}=l;for(const f in d)(i=this.node.getValue(f))==null||i.jump(d[f])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const eL={animation:{Feature:Qj},exit:{Feature:Zj}};function Pi(e){return{point:{x:e.pageX,y:e.pageY}}}const tL=e=>t=>uf(t)&&e(t,Pi(t));function _s(e,t,n,r){return ui(e,t,tL(n),r)}const Xx=({current:e})=>e?e.ownerDocument.defaultView:null,Am=(e,t)=>Math.abs(e-t);function nL(e,t){const n=Am(e.x,t.x),r=Am(e.y,t.y);return Math.sqrt(n**2+r**2)}const Om=new Set(["auto","scroll"]);class Qx{constructor(t,n,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=g=>{this.handleScroll(g.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Zi(this.lastRawMoveEventInfo,this.transformPagePoint));const g=Jl(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,v=nL(g.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!v)return;const{point:w}=g,{timestamp:m}=je;this.history.push({...w,timestamp:m});const{onStart:y,onMove:x}=this.handlers;p||(y&&y(this.lastMoveEvent,g),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,g)},this.handlePointerMove=(g,p)=>{this.lastMoveEvent=g,this.lastRawMoveEventInfo=p,this.lastMoveEventInfo=Zi(p,this.transformPagePoint),ne.update(this.updatePoint,!0)},this.handlePointerUp=(g,p)=>{this.end();const{onEnd:v,onSessionEnd:w,resumeAnimation:m}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=Jl(g.type==="pointercancel"?this.lastMoveEventInfo:Zi(p,this.transformPagePoint),this.history);this.startEvent&&v&&v(g,y),w&&w(g,y)},!uf(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=s||window;const l=Pi(t),u=Zi(l,this.transformPagePoint),{point:c}=u,{timestamp:d}=je;this.history=[{...c,timestamp:d}];const{onSessionStart:f}=n;f&&f(t,Jl(u,this.history)),this.removeListeners=Ei(_s(this.contextWindow,"pointermove",this.handlePointerMove),_s(this.contextWindow,"pointerup",this.handlePointerUp),_s(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(Om.has(r.overflowX)||Om.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,s=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:s.x-n.x,y:s.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,s),ne.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ln(this.updatePoint)}}function Zi(e,t){return t?{point:t(e.point)}:e}function Dm(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Jl({point:e},t){return{point:e,delta:Dm(e,Jx(t)),offset:Dm(e,rL(t)),velocity:sL(t,.1)}}function rL(e){return e[0]}function Jx(e){return e[e.length-1]}function sL(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=Jx(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>nt(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&s.timestamp-r.timestamp>nt(t)*2&&(r=e[1]);const i=ht(s.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const o={x:(s.x-r.x)/i,y:(s.y-r.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function iL(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ae(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ae(n,e,r.max):Math.min(e,n)),e}function Mm(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function oL(e,{top:t,left:n,bottom:r,right:s}){return{x:Mm(e.x,n,s),y:Mm(e.y,t,r)}}function Fm(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function aL(e,t){return{x:Fm(e.x,t.x),y:Fm(e.y,t.y)}}function lL(e,t){let n=.5;const r=$e(e),s=$e(t);return s>r?n=oi(t.min,t.max-r,e.min):r>s&&(n=oi(e.min,e.max-s,t.min)),Bt(0,1,n)}function uL(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Nc=.35;function cL(e=Nc){return e===!1?e=0:e===!0&&(e=Nc),{x:Im(e,"left","right"),y:Im(e,"top","bottom")}}function Im(e,t,n){return{min:_m(e,t),max:_m(e,n)}}function _m(e,t){return typeof e=="number"?e:e[t]||0}const dL=new WeakMap;class fL{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ke(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=d=>{n&&this.snapToCursor(Pi(d).point),this.stopAnimation()},o=(d,f)=>{const{drag:g,dragPropagation:p,onDragStart:v}=this.getProps();if(g&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=V2(g),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ot(m=>{let y=this.getAxisMotionValue(m).get()||0;if(zt.test(y)){const{projection:x}=this.visualElement;if(x&&x.layout){const k=x.layout.layoutBox[m];k&&(y=$e(k)*(parseFloat(y)/100))}}this.originPoint[m]=y}),v&&ne.update(()=>v(d,f),!1,!0),wc(this.visualElement,"transform");const{animationState:w}=this.visualElement;w&&w.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:g,dragDirectionLock:p,onDirectionLock:v,onDrag:w}=this.getProps();if(!g&&!this.openDragLock)return;const{offset:m}=f;if(p&&this.currentDirection===null){this.currentDirection=pL(m),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",f.point,m),this.updateAxis("y",f.point,m),this.visualElement.render(),w&&ne.update(()=>w(d,f),!1,!0)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:d}=this.getProps();(d||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:c}=this.getProps();this.panSession=new Qx(t,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:Xx(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,s=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!s||!r)return;const{velocity:o}=s;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&ne.postRender(()=>a(r,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!eo(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=iL(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var i;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)==null?void 0:i.layout,s=this.constraints;t&&hr(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=oL(r.layoutBox,t):this.constraints=!1,this.elastic=cL(n),s!==this.constraints&&!hr(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Ot(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=uL(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!hr(t))return!1;const r=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=pN(r,s.root,this.visualElement.getTransformPagePoint());let o=aL(s.layout.layoutBox,i);if(n){const a=n(dN(o));this.hasMutatedConstraints=!!a,a&&(o=xx(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Ot(c=>{if(!eo(c,n,this.currentDirection))return;let d=l&&l[c]||{};(o===!0||o===c)&&(d={min:0,max:0});const f=s?200:1e6,g=s?40:1e7,p={type:"inertia",velocity:r?t[c]:0,bounceStiffness:f,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(c,p)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return wc(this.visualElement,t),r.start(rf(t,r,0,n,this.visualElement,!1))}stopAnimation(){Ot(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ot(n=>{const{drag:r}=this.getProps();if(!eo(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[n],l=i.get()||0;i.set(t[n]-ae(o,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!hr(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Ot(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();s[o]=lL({min:l,max:l},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),Ot(o=>{if(!eo(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(ae(l,u,s[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;dL.set(this.visualElement,this);const t=this.visualElement.current,n=_s(t,"pointerdown",u=>{const{drag:c,dragListener:d=!0}=this.getProps(),f=u.target,g=f!==t&&W2(f);c&&d&&!g&&this.start(u)});let r;const s=()=>{const{dragConstraints:u}=this.getProps();hr(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),r||(r=hL(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ne.read(s);const a=ui(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",({delta:u,hasLayoutChanged:c})=>{this.isDragging&&c&&(Ot(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=u[d].translate,f.set(f.get()+u[d].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),l&&l(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=Nc,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function Vm(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function hL(e,t,n){const r=Wp(e,Vm(n)),s=Wp(t,Vm(n));return()=>{r(),s()}}function eo(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function pL(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class mL extends Mn{constructor(t){super(t),this.removeGroupControls=mt,this.removeListeners=mt,this.controls=new fL(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||mt}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Zl=e=>(t,n)=>{e&&ne.update(()=>e(t,n),!1,!0)};class gL extends Mn{constructor(){super(...arguments),this.removePointerDownListener=mt}onPointerDown(t){this.session=new Qx(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Xx(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:Zl(t),onStart:Zl(n),onMove:Zl(r),onEnd:(i,o)=>{delete this.session,s&&ne.postRender(()=>s(i,o))}}}mount(){this.removePointerDownListener=_s(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let eu=!1;class yL extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&s&&r.register(i),eu&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Po.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:i}=this.props,{projection:o}=r;return o&&(o.isPresent=i,t.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),eu=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==i?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||ne.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),lf.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;eu=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Zx(e){const[t,n]=$x(),r=S.useContext(Bd);return h.jsx(yL,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(qx),isPresent:t,safeToRemove:n})}const vL={pan:{Feature:gL},drag:{Feature:mL,ProjectionNode:zx,MeasureLayout:Zx}};function zm(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,i=r[s];i&&ne.postRender(()=>i(t,Pi(t)))}class xL extends Mn{mount(){const{current:t}=this.node;t&&(this.unmount=$2(t,(n,r)=>(zm(this.node,r,"Start"),s=>zm(this.node,s,"End"))))}unmount(){}}class wL extends Mn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ei(ui(this.node.current,"focus",()=>this.onFocus()),ui(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function $m(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),i=r[s];i&&ne.postRender(()=>i(t,Pi(t)))}class SL extends Mn{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=G2(t,(s,i)=>($m(this.node,i,"Start"),(o,{success:a})=>$m(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const jc=new WeakMap,tu=new WeakMap,kL=e=>{const t=jc.get(e.target);t&&t(e)},CL=e=>{e.forEach(kL)};function EL({root:e,...t}){const n=e||document;tu.has(n)||tu.set(n,{});const r=tu.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(CL,{root:e,...t})),r[s]}function bL(e,t,n){const r=EL(t);return jc.set(e,n),r.observe(e),()=>{jc.delete(e),r.unobserve(e)}}const TL={some:0,all:1};class PL extends Mn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var l;(l=this.stopObserver)==null||l.call(this);const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:i}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:TL[s]},a=u=>{const{isIntersecting:c}=u;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),g=c?d:f;g&&g(u)};this.stopObserver=bL(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(RL(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function RL({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const NL={inView:{Feature:PL},tap:{Feature:SL},focus:{Feature:wL},hover:{Feature:xL}},jL={layout:{ProjectionNode:zx,MeasureLayout:Zx}},LL={...eL,...NL,...vL,...jL},xe=Yj(LL,Xj);function AL(){const{t:e}=La(),t=yi(),[n,r]=S.useState(!0),[s,i]=S.useState(!1),[o,a]=S.useState(null),[l,u]=S.useState({auth:{enabled:!1,username:"",password:"",confirmPassword:"",agentToken:""}}),[c,d]=S.useState({auth:{enabled:!1,username:"",agentTokenSet:!1}}),[f,g]=S.useState(!1),[p,v]=S.useState(!1),[w,m]=S.useState(!1);S.useEffect(()=>{y()},[]);const y=async()=>{try{r(!0);const C=await AP();d(C),u({auth:{enabled:C.auth.enabled,username:C.auth.username||"",password:"",confirmPassword:"",agentToken:""}})}catch(C){console.error("Failed to load settings:",C),a({type:"error",text:e("settings.loadError")})}finally{r(!1)}},x=async()=>{var C,b;if(l.auth.enabled){if(!l.auth.username||l.auth.username.trim()===""){a({type:"error",text:e("settings.usernameRequired")});return}if(!l.auth.password||l.auth.password.trim()===""){a({type:"error",text:e("settings.passwordRequired")});return}if(l.auth.password!==l.auth.confirmPassword){a({type:"error",text:e("settings.passwordMismatch")});return}}try{i(!0),a(null);const T=await OP({enabled:l.auth.enabled,username:l.auth.enabled?l.auth.username:void 0,password:l.auth.enabled?l.auth.password:void 0,agentToken:l.auth.agentToken||void 0});T.token&&ts.setToken(T.token),a({type:"success",text:e("settings.saveSuccess")}),d({auth:{enabled:l.auth.enabled,username:l.auth.username,agentTokenSet:!!(l.auth.agentToken&&l.auth.agentToken.trim()!=="")}}),u(P=>({auth:{...P.auth,password:"",confirmPassword:""}})),setTimeout(()=>{a(null)},3e3)}catch(T){console.error("Failed to save settings:",T),a({type:"error",text:((b=(C=T.response)==null?void 0:C.data)==null?void 0:b.error)||e("settings.saveError")})}finally{i(!1)}},k=()=>{t("/")};return n?h.jsxs("div",{className:"min-h-screen bg-background",children:[h.jsx("header",{className:"border-b bg-card shadow-sm",children:h.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4",children:h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsxs(re,{variant:"ghost",size:"sm",onClick:k,children:[h.jsx(op,{className:"h-4 w-4 mr-2"}),e("settings.back")]}),h.jsx(na,{className:"h-5 w-5"}),h.jsx("h1",{className:"text-xl font-semibold",children:e("settings.title")})]}),h.jsx(nc,{})]})})}),h.jsx("main",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-12",children:h.jsx("div",{className:"text-center text-muted-foreground",children:e("settings.loading")})})]}):h.jsxs("div",{className:"min-h-screen bg-background",children:[h.jsx("header",{className:"border-b bg-card shadow-sm",children:h.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4",children:h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsxs(re,{variant:"ghost",size:"sm",onClick:k,children:[h.jsx(op,{className:"h-4 w-4 mr-2"}),e("settings.back")]}),h.jsx(na,{className:"h-5 w-5"}),h.jsx("h1",{className:"text-xl font-semibold",children:e("settings.title")})]}),h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx(nc,{}),h.jsxs(re,{onClick:x,disabled:s,children:[h.jsx(Ob,{className:"h-4 w-4 mr-2"}),e(s?"settings.saving":"settings.save")]})]})]})})}),h.jsx("main",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-12",children:h.jsxs(xe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},children:[o&&h.jsx(xe.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:te("mb-6 p-4 rounded-lg",o.type==="success"?"bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800":"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800"),children:h.jsxs("div",{className:te("flex items-center gap-2",o.type==="success"?"text-green-800 dark:text-green-200":"text-red-800 dark:text-red-200"),children:[o.type==="success"&&h.jsx(Da,{className:"h-4 w-4"}),h.jsx("span",{children:o.text})]})}),h.jsxs(Qt,{children:[h.jsx(si,{children:h.jsx(ii,{children:e("settings.authSection")})}),h.jsxs(Jt,{className:"space-y-6",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{children:[h.jsx("h3",{className:"font-medium",children:e("settings.webAuthEnabled")}),h.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:e("settings.webAuthDescription")})]}),h.jsx("button",{onClick:()=>u(C=>({...C,auth:{...C.auth,enabled:!C.auth.enabled}})),className:te("relative inline-flex h-6 w-11 items-center rounded-full transition-colors",l.auth.enabled?"bg-primary":"bg-muted"),children:h.jsx("span",{className:te("inline-block h-4 w-4 transform rounded-full bg-white transition-transform",l.auth.enabled?"translate-x-6":"translate-x-1")})})]}),l.auth.enabled&&h.jsxs(xe.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"space-y-4 pt-4 border-t",children:[h.jsxs("div",{children:[h.jsx("label",{className:"block text-sm font-medium mb-2",children:e("settings.username")}),h.jsx("input",{type:"text",value:l.auth.username,onChange:C=>u(b=>({...b,auth:{...b.auth,username:C.target.value}})),className:"w-full px-3 py-2 border rounded-md bg-background",placeholder:e("settings.usernamePlaceholder")})]}),h.jsxs("div",{children:[h.jsx("label",{className:"block text-sm font-medium mb-2",children:e("settings.password")}),h.jsxs("div",{className:"relative",children:[h.jsx("input",{type:f?"text":"password",value:l.auth.password,onChange:C=>u(b=>({...b,auth:{...b.auth,password:C.target.value}})),className:"w-full px-3 py-2 border rounded-md bg-background pr-10",placeholder:e("settings.passwordPlaceholder")}),h.jsx("button",{type:"button",onClick:()=>g(!f),className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:f?h.jsx(Al,{className:"h-4 w-4"}):h.jsx(Ol,{className:"h-4 w-4"})})]})]}),h.jsxs("div",{children:[h.jsx("label",{className:"block text-sm font-medium mb-2",children:e("settings.confirmPassword")}),h.jsxs("div",{className:"relative",children:[h.jsx("input",{type:p?"text":"password",value:l.auth.confirmPassword,onChange:C=>u(b=>({...b,auth:{...b.auth,confirmPassword:C.target.value}})),className:"w-full px-3 py-2 border rounded-md bg-background pr-10",placeholder:e("settings.confirmPasswordPlaceholder")}),h.jsx("button",{type:"button",onClick:()=>v(!p),className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:p?h.jsx(Al,{className:"h-4 w-4"}):h.jsx(Ol,{className:"h-4 w-4"})})]})]})]})]})]}),h.jsxs(Qt,{className:"mt-6",children:[h.jsx(si,{children:h.jsx(ii,{children:e("settings.agentAuthSection")})}),h.jsx(Jt,{className:"space-y-4",children:h.jsxs("div",{children:[h.jsx("label",{className:"block text-sm font-medium mb-2",children:e("settings.agentToken")}),h.jsxs("div",{className:"relative",children:[h.jsx("input",{type:w?"text":"password",value:l.auth.agentToken,onChange:C=>u(b=>({...b,auth:{...b.auth,agentToken:C.target.value}})),className:"w-full px-3 py-2 border rounded-md bg-background pr-10",placeholder:c.auth.agentTokenSet?e("settings.tokenAlreadySet"):e("settings.agentTokenPlaceholder")}),h.jsx("button",{type:"button",onClick:()=>m(!w),className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:w?h.jsx(Al,{className:"h-4 w-4"}):h.jsx(Ol,{className:"h-4 w-4"})})]}),h.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:e("settings.agentTokenDescription")})]})})]})]})})]})}function OL(){const[e,t]=S.useState(""),[n,r]=S.useState(""),[s,i]=S.useState(""),[o,a]=S.useState(!1),l=yi(),u=async c=>{var d,f;c.preventDefault(),i(""),a(!0);try{const g=await TP(e,n);g.success?(ts.setToken(g.token),l("/")):i("Login failed")}catch(g){i(((f=(d=g.response)==null?void 0:d.data)==null?void 0:f.error)||"Login failed. Please check your credentials.")}finally{a(!1)}};return h.jsx("div",{className:"min-h-screen bg-background flex items-start justify-center p-4 pt-[20vh]",children:h.jsx(xe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"w-full max-w-md",children:h.jsxs(Qt,{children:[h.jsx(si,{children:h.jsx(ii,{className:"text-2xl font-bold text-center",children:"Login"})}),h.jsx(Jt,{children:h.jsxs("form",{onSubmit:u,className:"space-y-4",children:[h.jsxs("div",{children:[h.jsx("label",{className:"block text-sm font-medium mb-2",children:"Username"}),h.jsxs("div",{className:"relative",children:[h.jsx(Fb,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground"}),h.jsx("input",{type:"text",value:e,onChange:c=>t(c.target.value),className:"w-full pl-10 pr-4 py-2 border border-input rounded-md focus:outline-none focus:ring-2 focus:ring-primary",placeholder:"Enter username",required:!0})]})]}),h.jsxs("div",{children:[h.jsx("label",{className:"block text-sm font-medium mb-2",children:"Password"}),h.jsxs("div",{className:"relative",children:[h.jsx(Nb,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground"}),h.jsx("input",{type:"password",value:n,onChange:c=>r(c.target.value),className:"w-full pl-10 pr-4 py-2 border border-input rounded-md focus:outline-none focus:ring-2 focus:ring-primary",placeholder:"Enter password",required:!0})]})]}),s&&h.jsx(xe.div,{initial:{opacity:0},animate:{opacity:1},className:"text-destructive text-sm text-center",children:s}),h.jsx(re,{type:"submit",className:"w-full",disabled:o,children:o?"Logging in...":"Login"})]})})]})})})}function DL({status:e}){return typeof e=="string"?h.jsx(or,{variant:e==="running"?"blue":"destructive",className:"whitespace-nowrap",children:e}):h.jsx(or,{variant:e.status==="running"?"blue":"destructive",className:"whitespace-nowrap",children:e.status})}function Bm({children:e,authEnabled:t}){const n=ts.isAuthenticated(),r=yi(),s=Ut();return S.useEffect(()=>{t&&!n&&r("/login",{state:{from:s}})},[t,n,r,s]),t&&!n?null:h.jsx(h.Fragment,{children:e})}function ML({authEnabled:e}){const{t}=La(),n=yi(),[r,s]=S.useState([]),[,i]=S.useState(null),[o,a]=S.useState(!0),[l,u]=S.useState(null),[c,d]=S.useState(!1),[f,g]=S.useState(null),[p,v]=S.useState(!1),[w,m]=S.useState(new Set),[y,x]=S.useState(!1),[k,C]=S.useState(!1),[b,T]=S.useState("list"),[P,L]=S.useState(!1),[R,B]=S.useState(null),[A,M]=S.useState(null),[_,U]=S.useState(!1),[z,Z]=S.useState(null),[N,D]=S.useState(!1),[$,V]=S.useState(null),[G,Pe]=S.useState(""),[Re,ot]=S.useState(!1),[Ht,Fn]=S.useState(null),[ew,vf]=S.useState(!1),Ri=S.useCallback(O=>{var ee;if(!O.connected||!((ee=O.status)!=null&&ee.openclawGateway))return"unknown";const Y=O.status.openclawGateway;return typeof Y=="string"?Y:Y.status},[]),xf=S.useCallback(O=>{m(Y=>{const ee=new Set(Y);return ee.has(O)?ee.delete(O):ee.add(O),ee})},[]),tw=S.useCallback(()=>{w.size===r.length?m(new Set):m(new Set(r.map(O=>O.id)))},[w.size,r]),Ni=r.filter(O=>w.has(O.id)).map(O=>Ri(O)),nw=Ni.length>0&&Ni.every(O=>O==="stopped"),rw=Ni.length>0&&Ni.every(O=>O==="running"),sw=()=>{ts.removeToken(),n("/login")},iw=()=>{v(!1),n("/login")},In=S.useCallback(async()=>{var O,Y,ee;try{a(!0),u(null);try{const Q=await Ep();s(Q)}catch(Q){if(console.error("Failed to fetch nodes from database:",Q),((O=Q.response)==null?void 0:O.status)===401){v(!0);return}c||u("无法连接到服务器")}try{const Q=await NP();i(Q)}catch(Q){if(console.error("Failed to fetch stats:",Q),((Y=Q.response)==null?void 0:Y.status)===401){v(!0);return}}d(!0)}catch(Q){if(console.error("Error loading data:",Q),((ee=Q.response)==null?void 0:ee.status)===401){v(!0);return}c||u(Q instanceof Error?Q.message:"Failed to load data")}finally{a(!1)}},[c]),wf=S.useCallback(async O=>{const Y=r.filter(Q=>{if(!Q.connected)return!1;const an=Ri(Q);return O==="openclaw_gateway_start"?an!=="running":an==="running"}).filter(Q=>w.has(Q.id));if(Y.length===0)return;x(!0);let ee=0;await Promise.allSettled(Y.map(async Q=>{try{await $d(Q.id,O),ee++}catch{}})),x(!1),m(new Set),setTimeout(()=>In(),2e3)},[r,w,Ri,In]),ow=(O,Y)=>{g({id:O,name:Y})},aw=async(O,Y)=>{try{await PP(O,Y);const ee=await Ep();s(ee)}catch(ee){throw console.error("Failed to update node name:",ee),ee}},lw=async()=>{if(w.size===0)return;x(!0);let O=0;await Promise.allSettled(Array.from(w).map(async Y=>{try{await RP(Y),O++}catch{}})),x(!1),m(new Set),C(!1),setTimeout(()=>In(),500)},uw=async O=>{B(O),L(!0),U(!0),Z(null),M(null);try{const Y=await jP(O.id);M(Y)}catch(Y){Z(Y instanceof Error?Y.message:"Failed to load config")}finally{U(!1)}},cw=async O=>{V(O),D(!0),ot(!0),Fn(null),Pe("");try{const Y=await LP(O.id);Pe(Y)}catch(Y){Fn(Y instanceof Error?Y.message:"Failed to load logs")}finally{ot(!1)}};S.useEffect(()=>{In();const O=setInterval(In,1e4);return()=>clearInterval(O)},[]);const Sf=O=>{const Y=Math.floor(O/3600),ee=Math.floor(Y/24),Q=Y%24;return ee>0?`${ee}d ${Q}h`:`${Y}h`},kf=O=>{const ee=new Date().getTime()-(O instanceof Date?O.getTime():new Date(O).getTime()),Q=Math.floor(ee/6e4),an=Math.floor(ee/36e5),dw=Math.floor(ee/864e5);return Q<1?t("nodes.justNow"):Q<60?`${Q} ${t("nodes.minutesAgo")}`:an<24?`${an} ${t("nodes.hoursAgo")}`:`${dw} ${t("nodes.daysAgo")}`};return l&&!c?h.jsx("div",{className:"min-h-screen bg-background p-8",children:h.jsx("div",{className:"max-w-7xl mx-auto",children:h.jsxs("div",{className:"text-center py-12",children:[h.jsx("h1",{className:"text-2xl font-bold text-destructive mb-4",children:t("errors.title")}),h.jsx("p",{className:"text-muted-foreground mb-4",children:l}),h.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:t("errors.retryMessage")}),h.jsx(re,{onClick:In,children:t("errors.retry")})]})})}):h.jsxs("div",{className:"min-h-screen bg-background",children:[h.jsx("header",{className:"border-b bg-card shadow-sm",children:h.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4",children:h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx("img",{src:"/img/caribbean-logo.png",alt:"Caribbean",className:"h-10 w-auto cursor-pointer hover:opacity-80 transition-opacity",onClick:()=>vf(!0)}),h.jsx("h1",{className:"text-2xl font-bold",children:t("header.title")})]}),h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx(nc,{}),h.jsx(xe.div,{whileHover:{scale:1.05},whileTap:{scale:.95},children:h.jsxs(re,{onClick:In,variant:"outline",size:"sm",children:[h.jsx(Dd,{className:`h-4 w-4 mr-2 ${o?"animate-spin":""}`}),t("header.refresh")]})}),h.jsx(xe.div,{whileHover:{scale:1.05},whileTap:{scale:.95},children:h.jsx(re,{onClick:()=>n("/settings"),variant:"outline",size:"sm",children:h.jsx(na,{className:"h-4 w-4"})})}),e&&h.jsx(xe.div,{whileHover:{scale:1.05},whileTap:{scale:.95},children:h.jsxs(re,{onClick:sw,variant:"outline",size:"sm",children:[h.jsx(jb,{className:"h-4 w-4 mr-2"}),"Logout"]})})]})]})})}),h.jsxs("main",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12",children:[l&&c&&h.jsx(xe.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"mb-4 p-4 bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg",children:h.jsx("div",{className:"flex items-center gap-2 text-yellow-800 dark:text-yellow-200",children:h.jsxs("span",{className:"text-sm",children:["⚠️ ",l," - ",t("errors.dataError")]})})}),h.jsxs("div",{children:[h.jsxs("div",{className:"flex items-center justify-between mb-8",children:[h.jsx("h2",{className:"text-xl font-semibold",children:t("nodes.title")}),h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsxs("div",{className:"flex items-center gap-1 bg-muted rounded-md p-1",children:[h.jsx(re,{variant:b==="list"?"default":"ghost",size:"sm",className:"h-7 px-2",onClick:()=>T("list"),children:h.jsx(Rb,{className:"h-4 w-4"})}),h.jsx(re,{variant:b==="card"?"default":"ghost",size:"sm",className:"h-7 px-2",onClick:()=>T("card"),children:h.jsx(Pb,{className:"h-4 w-4"})})]}),w.size>0&&h.jsx("span",{className:"text-sm text-muted-foreground",children:t("batchActions.selected",{count:w.size})}),h.jsxs(Ib,{children:[h.jsxs(_b,{className:te("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium","h-9 px-4 py-2 bg-primary text-primary-foreground hover:bg-primary/90","disabled:pointer-events-none disabled:opacity-50",y&&"opacity-50 pointer-events-none"),children:[t(y?"batchActions.executing":"batchActions.executeAction"),!y&&h.jsx(Cb,{className:"h-4 w-4"})]}),h.jsxs(Vb,{children:[h.jsxs(Dl,{disabled:!nw,onSelect:()=>wf("openclaw_gateway_start"),children:[h.jsx(Ab,{className:"h-4 w-4 mr-2 text-green-500"}),t("batchActions.start")]}),h.jsxs(Dl,{disabled:!rw,onSelect:()=>wf("openclaw_gateway_stop"),children:[h.jsx(Mb,{className:"h-4 w-4 mr-2 text-red-500"}),t("batchActions.stop")]}),h.jsxs(Dl,{disabled:w.size===0,onSelect:()=>C(!0),children:[h.jsx(Ll,{className:"h-4 w-4 mr-2 text-destructive"}),t("batchActions.delete")]})]})]})]})]}),o&&!c&&h.jsx(xe.div,{className:"text-center py-8 text-muted-foreground",animate:{opacity:.5},transition:{duration:1,repeat:1/0,ease:"easeInOut"},children:t("nodes.loading")})]}),r.length===0&&!o&&!c?h.jsx(xe.div,{className:"rounded-lg overflow-hidden",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},children:h.jsx(Qt,{className:"rounded-none",children:h.jsx(Jt,{className:"py-12",children:h.jsxs("div",{className:"text-center",children:[h.jsx(xe.div,{initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},transition:{type:"spring",stiffness:200,damping:10},className:"mb-4",children:h.jsx(Db,{className:"h-16 w-16 text-muted-foreground mx-auto"})}),h.jsx("p",{className:"text-muted-foreground mb-4",children:t("nodes.noInstances")}),h.jsx("p",{className:"text-sm text-muted-foreground",children:t("nodes.startAgent")})]})})})}):r.length===0?h.jsx(xe.div,{className:"rounded-lg overflow-hidden",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},children:h.jsx(Qt,{className:"rounded-none",children:h.jsx(Jt,{className:"py-12",children:h.jsxs("div",{className:"text-center",children:[h.jsx("p",{className:"text-muted-foreground mb-2",children:t("nodes.noInstancesDb")}),h.jsx("p",{className:"text-sm text-muted-foreground",children:t("nodes.noInstancesServer")})]})})})}):h.jsxs(h.Fragment,{children:[r.filter(O=>O.connected).length===0&&c&&h.jsx(xe.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"mb-4 p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg",children:h.jsx("div",{className:"flex items-center gap-2 text-red-800 dark:text-red-200",children:h.jsxs("span",{children:["⚠️ ",t("nodes.allOffline")]})})}),h.jsx(xe.div,{className:"rounded-lg overflow-hidden",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},children:b==="list"?h.jsx(Qt,{className:"rounded-none",children:h.jsx(Jt,{className:"p-0",children:h.jsxs(_v,{children:[h.jsx(Vv,{children:h.jsxs(tc,{children:[h.jsx(lt,{className:"w-10",children:h.jsx(ra,{checked:r.length>0&&w.size===r.length,onCheckedChange:tw})}),h.jsx(lt,{className:"w-16",children:t("nodes.status")}),h.jsx(lt,{children:t("nodes.instanceName")}),h.jsx(lt,{children:t("nodes.id")}),h.jsx(lt,{children:t("nodes.clientIp")}),h.jsx(lt,{children:t("nodes.connectionStatus")}),h.jsx(lt,{children:"Gateway"}),h.jsx(lt,{children:t("nodes.lastSeen")}),h.jsx(lt,{children:t("nodes.cpu")}),h.jsx(lt,{children:t("nodes.memory")}),h.jsx(lt,{children:t("nodes.uptime")})]})}),h.jsx(zv,{children:r.map(O=>{var Y,ee,Q,an;return h.jsxs(tc,{className:te(O.connected?"":"bg-muted/30",w.has(O.id)&&"bg-blue-50/50 dark:bg-blue-900/10"),children:[h.jsx(ut,{children:h.jsx(ra,{checked:w.has(O.id),onCheckedChange:()=>xf(O.id)})}),h.jsx(ut,{children:h.jsx("div",{className:"flex items-center justify-center",children:O.connected?h.jsx(xe.div,{animate:{scale:[1,1.1,1],rotate:[0,10,-10,0]},transition:{duration:2,repeat:1/0,ease:"easeInOut"},children:h.jsx("img",{src:"/img/openclaw-logo.svg",alt:"OpenClaw Logo",className:"h-4 w-4"})}):h.jsx("img",{src:"/img/openclaw-logo.svg",alt:"OpenClaw Logo",className:"h-4 w-4 opacity-50",style:{filter:"grayscale(100%)"}})})}),h.jsx(ut,{children:h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("span",{className:"font-medium",children:O.name||"unknown"}),h.jsx(re,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0 hover:bg-muted/50",onClick:()=>ow(O.id,O.name||"unknown"),children:h.jsx(Lb,{className:"h-3 w-3"})})]})}),h.jsx(ut,{className:"text-muted-foreground text-sm",children:O.id}),h.jsx(ut,{className:"text-muted-foreground text-sm",children:O.clientIp||"-"}),h.jsx(ut,{children:h.jsx(or,{variant:O.connected?"success":"destructive",className:"whitespace-nowrap",children:O.connected?t("nodes.connected"):t("nodes.disconnected")})}),h.jsx(ut,{children:O.connected?(Y=O.status)!=null&&Y.openclawGateway?h.jsx(DL,{status:O.status.openclawGateway}):h.jsx("span",{className:"text-muted-foreground text-sm",children:"-"}):h.jsx(or,{variant:"secondary",className:"whitespace-nowrap",children:"unknown"})}),h.jsx(ut,{className:"text-muted-foreground text-sm",children:kf(O.lastSeen)}),h.jsx(ut,{children:O.connected&&((ee=O.status)!=null&&ee.cpu)?h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(Uv,{className:"h-4 w-4 text-muted-foreground"}),h.jsxs("span",{children:[O.status.cpu.percent,"%"]})]}):h.jsx("span",{className:"text-muted-foreground",children:"-"})}),h.jsx(ut,{children:O.connected&&((Q=O.status)!=null&&Q.memory)?h.jsxs("div",{className:"flex items-center gap-2",title:`${O.status.memory.used}GB / ${O.status.memory.total}GB`,children:[h.jsx(Hv,{className:"h-4 w-4 text-muted-foreground"}),h.jsxs("span",{children:[O.status.memory.percent,"%"]})]}):h.jsx("span",{className:"text-muted-foreground",children:"-"})}),h.jsx(ut,{children:O.connected&&((an=O.status)!=null&&an.uptime)?h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(Bv,{className:"h-4 w-4 text-muted-foreground"}),h.jsx("span",{children:Sf(O.status.uptime)})]}):h.jsx("span",{className:"text-muted-foreground",children:"-"})})]},O.id)})})]})})}):h.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:r.map(O=>h.jsx(Bb,{node:O,selected:w.has(O.id),onToggle:xf,onViewConfig:uw,onViewLogs:cw,getGatewayStatus:Ri,formatUptime:Sf,formatLastSeen:kf},O.id))})})]}),h.jsx(zb,{isOpen:f!==null,onClose:()=>g(null),nodeId:(f==null?void 0:f.id)||"",currentName:(f==null?void 0:f.name)||"",onSave:aw}),h.jsx(Ub,{isOpen:P,onClose:()=>L(!1),node:R,config:A,loading:_,error:z}),h.jsx(Hb,{isOpen:N,onClose:()=>D(!1),node:$,logs:G,loading:Re,error:Ht}),h.jsx(Wb,{isOpen:ew,onClose:()=>vf(!1)}),h.jsx(Rm,{children:k&&h.jsx(xe.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:()=>C(!1),children:h.jsxs(xe.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},onClick:O=>O.stopPropagation(),className:"bg-card rounded-lg shadow-xl p-6 max-w-md w-full mx-4",children:[h.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[h.jsx(Ll,{className:"h-6 w-6 text-destructive"}),h.jsx("h3",{className:"text-lg font-semibold",children:t("batchActions.deleteConfirmTitle")})]}),h.jsx("p",{className:"text-muted-foreground mb-6",children:t("batchActions.deleteConfirmMessage",{count:w.size})}),h.jsxs("div",{className:"flex gap-3 justify-end",children:[h.jsx(re,{variant:"outline",onClick:()=>C(!1),children:t("batchActions.cancel")}),h.jsx(re,{variant:"destructive",onClick:lw,disabled:y,children:t(y?"batchActions.executing":"batchActions.delete")})]})]})})}),h.jsx(Rm,{children:p&&h.jsx(xe.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:()=>v(!1),children:h.jsxs(xe.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},onClick:O=>O.stopPropagation(),className:"bg-card rounded-lg shadow-xl p-6 max-w-md w-full mx-4",children:[h.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[h.jsx(Ll,{className:"h-6 w-6 text-destructive"}),h.jsx("h3",{className:"text-lg font-semibold",children:"需要登录"})]}),h.jsx("p",{className:"text-muted-foreground mb-6",children:"您的会话已过期,请重新登录以继续访问。"}),h.jsxs("div",{className:"flex gap-3 justify-end",children:[h.jsx(re,{variant:"outline",onClick:()=>v(!1),children:"取消"}),h.jsx(re,{onClick:iw,children:"前往登录"})]})]})})})]})]})}function FL(){const[e,t]=S.useState(!0),[n,r]=S.useState(!1);return S.useEffect(()=>{bP().then(s=>t(s.enabled)).catch(()=>t(!0)).finally(()=>r(!0))},[]),n?h.jsx(NE,{children:h.jsxs(iE,{children:[e&&h.jsx(po,{path:"/login",element:h.jsx(OL,{})}),h.jsx(po,{path:"/*",element:h.jsx(Bm,{authEnabled:e,children:h.jsx(ML,{authEnabled:e})})}),h.jsx(po,{path:"/settings",element:h.jsx(Bm,{authEnabled:e,children:h.jsx(AL,{})})})]})}):null}tv(document.getElementById("root")).render(h.jsx(S.StrictMode,{children:h.jsx(FL,{})}));
217
+ `),()=>{var T;(T=a.current)==null||T.removeAttribute("data-motion-pop-id"),b.contains(C)&&b.removeChild(C)}},[t]),h.jsx(kj,{isPresent:t,childRef:a,sizeRef:l,pop:i,children:i===!1?e:S.cloneElement(e,{ref:d})})}const Ej=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:i,mode:o,anchorX:a,anchorY:l,root:u})=>{const c=Ud(bj),d=S.useId();let f=!0,g=S.useMemo(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:s,onExitComplete:p=>{c.set(p,!0);for(const v of c.values())if(!v)return;r&&r()},register:p=>(c.set(p,!1),()=>c.delete(p))}),[n,c,r]);return i&&f&&(g={...g}),S.useMemo(()=>{c.forEach((p,v)=>c.set(v,!1))},[n]),S.useEffect(()=>{!n&&!c.size&&r&&r()},[n]),e=h.jsx(Cj,{pop:o==="popLayout",isPresent:n,anchorX:a,anchorY:l,root:u,children:e}),h.jsx(Wa.Provider,{value:g,children:e})};function bj(){return new Map}function $x(e=!0){const t=S.useContext(Wa);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,i=S.useId();S.useEffect(()=>{if(e)return s(i)},[e]);const o=S.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,o]:[!0]}const Ji=e=>e.key||"";function Pm(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const Rm=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:i="sync",propagate:o=!1,anchorX:a="left",anchorY:l="top",root:u})=>{const[c,d]=$x(o),f=S.useMemo(()=>Pm(e),[e]),g=o&&!c?[]:f.map(Ji),p=S.useRef(!0),v=S.useRef(f),w=Ud(()=>new Map),m=S.useRef(new Set),[y,x]=S.useState(f),[k,C]=S.useState(f);p0(()=>{p.current=!1,v.current=f;for(let P=0;P<k.length;P++){const L=Ji(k[P]);g.includes(L)?(w.delete(L),m.current.delete(L)):w.get(L)!==!0&&w.set(L,!1)}},[k,g.length,g.join("-")]);const b=[];if(f!==y){let P=[...f];for(let L=0;L<k.length;L++){const R=k[L],B=Ji(R);g.includes(B)||(P.splice(L,0,R),b.push(R))}return i==="wait"&&b.length&&(P=b),C(Pm(P)),x(f),null}const{forceRender:T}=S.useContext(Bd);return h.jsx(h.Fragment,{children:k.map(P=>{const L=Ji(P),R=o&&!c?!1:f===k||g.includes(L),B=()=>{if(m.current.has(L))return;if(w.has(L))m.current.add(L),w.set(L,!0);else return;let A=!0;w.forEach(M=>{M||(A=!1)}),A&&(T==null||T(),C(v.current),o&&(d==null||d()),r&&r())};return h.jsx(Ej,{isPresent:R,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:i,root:u,onExitComplete:R?void 0:B,anchorX:a,anchorY:l,children:P},L)})})},Bx=S.createContext({strict:!1}),Nm={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let jm=!1;function Tj(){if(jm)return;const e={};for(const t in Nm)e[t]={isEnabled:n=>Nm[t].some(r=>!!n[r])};yx(e),jm=!0}function Ux(){return Tj(),cN()}function Pj(e){const t=Ux();for(const n in e)t[n]={...t[n],...e[n]};yx(t)}const Rj=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function ha(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Rj.has(e)}let Hx=e=>!ha(e);function Nj(e){typeof e=="function"&&(Hx=t=>t.startsWith("on")?!ha(t):e(t))}try{Nj(require("@emotion/is-prop-valid").default)}catch{}function jj(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||Le(e[s])||(Hx(s)||n===!0&&ha(s)||!t&&!ha(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}const Ya=S.createContext({});function Lj(e,t){if(qa(e)){const{initial:n,animate:r}=e;return{initial:n===!1||li(n)?n:void 0,animate:li(r)?r:void 0}}return e.inherit!==!1?t:{}}function Aj(e){const{initial:t,animate:n}=Lj(e,S.useContext(Ya));return S.useMemo(()=>({initial:t,animate:n}),[Lm(t),Lm(n)])}function Lm(e){return Array.isArray(e)?e.join(" "):e}const gf=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Wx(e,t,n){for(const r in t)!Le(t[r])&&!Ex(r,n)&&(e[r]=t[r])}function Oj({transformTemplate:e},t){return S.useMemo(()=>{const n=gf();return hf(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Dj(e,t){const n=e.style||{},r={};return Wx(r,n,e),Object.assign(r,Oj(e,t)),r}function Mj(e,t){const n={},r=Dj(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const Kx=()=>({...gf(),attrs:{}});function Fj(e,t,n,r){const s=S.useMemo(()=>{const i=Kx();return bx(i,t,Px(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Wx(i,e.style,e),s.style={...i,...s.style}}return s}const Ij=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function yf(e){return typeof e!="string"||e.includes("-")?!1:!!(Ij.indexOf(e)>-1||/[A-Z]/u.test(e))}function _j(e,t,n,{latestValues:r},s,i=!1,o){const l=(o??yf(e)?Fj:Mj)(t,r,s,e),u=jj(t,typeof e=="string",i),c=e!==S.Fragment?{...u,...l,ref:n}:{},{children:d}=t,f=S.useMemo(()=>Le(d)?d.get():d,[d]);return S.createElement(e,{...c,children:f})}function Vj({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:zj(n,r,s,e),renderState:t()}}function zj(e,t,n,r){const s={},i=r(e,{});for(const f in i)s[f]=To(i[f]);let{initial:o,animate:a}=e;const l=qa(e),u=mx(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const d=c?a:o;if(d&&typeof d!="boolean"&&!Ga(d)){const f=Array.isArray(d)?d:[d];for(let g=0;g<f.length;g++){const p=sf(e,f[g]);if(p){const{transitionEnd:v,transition:w,...m}=p;for(const y in m){let x=m[y];if(Array.isArray(x)){const k=c?x.length-1:0;x=x[k]}x!==null&&(s[y]=x)}for(const y in v)s[y]=v[y]}}}return s}const Gx=e=>(t,n)=>{const r=S.useContext(Ya),s=S.useContext(Wa),i=()=>Vj(e,t,r,s);return n?i():Ud(i)},$j=Gx({scrapeMotionValuesFromProps:pf,createRenderState:gf}),Bj=Gx({scrapeMotionValuesFromProps:Rx,createRenderState:Kx}),Uj=Symbol.for("motionComponentSymbol");function Hj(e,t,n){const r=S.useRef(n);S.useInsertionEffect(()=>{r.current=n});const s=S.useRef(null);return S.useCallback(i=>{var a;i&&((a=e.onMount)==null||a.call(e,i));const o=r.current;if(typeof o=="function")if(i){const l=o(i);typeof l=="function"&&(s.current=l)}else s.current?(s.current(),s.current=null):o(i);else o&&(o.current=i);t&&(i?t.mount(i):t.unmount())},[t])}const qx=S.createContext({});function hr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Wj(e,t,n,r,s,i){var x,k;const{visualElement:o}=S.useContext(Ya),a=S.useContext(Bx),l=S.useContext(Wa),u=S.useContext(mf),c=u.reducedMotion,d=u.skipAnimations,f=S.useRef(null),g=S.useRef(!1);r=r||a.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,skipAnimations:d,isSVG:i}),g.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const p=f.current,v=S.useContext(qx);p&&!p.projection&&s&&(p.type==="html"||p.type==="svg")&&Kj(f.current,n,s,v);const w=S.useRef(!1);S.useInsertionEffect(()=>{p&&w.current&&p.update(n,l)});const m=n[nx],y=S.useRef(!!m&&typeof window<"u"&&!((x=window.MotionHandoffIsComplete)!=null&&x.call(window,m))&&((k=window.MotionHasOptimisedAnimation)==null?void 0:k.call(window,m)));return p0(()=>{g.current=!0,p&&(w.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),y.current&&p.animationState&&p.animationState.animateChanges())}),S.useEffect(()=>{p&&(!y.current&&p.animationState&&p.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var C;(C=window.MotionHandoffMarkAsComplete)==null||C.call(window,m)}),y.current=!1),p.enteringChildren=void 0)}),p}function Kj(e,t,n,r){const{layoutId:s,layout:i,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutAnchor:c,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Yx(e.parent)),e.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!o||a&&hr(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:u,layoutAnchor:c})}function Yx(e){if(e)return e.options.allowProjection!==!1?e.projection:Yx(e.parent)}function Ql(e,{forwardMotionProps:t=!1,type:n}={},r,s){r&&Pj(r);const i=n?n==="svg":yf(e),o=i?Bj:$j;function a(u,c){let d;const f={...S.useContext(mf),...u,layoutId:Gj(u)},{isStatic:g}=f,p=Aj(u),v=o(u,g);if(!g&&typeof window<"u"){qj();const w=Yj(f);d=w.MeasureLayout,p.visualElement=Wj(e,v,f,s,w.ProjectionNode,i)}return h.jsxs(Ya.Provider,{value:p,children:[d&&p.visualElement?h.jsx(d,{visualElement:p.visualElement,...f}):null,_j(e,u,Hj(v,p.visualElement,c),v,g,t,i)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=S.forwardRef(a);return l[Uj]=e,l}function Gj({layoutId:e}){const t=S.useContext(Bd).id;return t&&e!==void 0?t+"-"+e:e}function qj(e,t){S.useContext(Bx).strict}function Yj(e){const t=Ux(),{drag:n,layout:r}=t;if(!n&&!r)return{};const s={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function Xj(e,t){if(typeof Proxy>"u")return Ql;const n=new Map,r=(i,o)=>Ql(i,o,e,t),s=(i,o)=>r(i,o);return new Proxy(s,{get:(i,o)=>o==="create"?r:(n.has(o)||n.set(o,Ql(o,void 0,e,t)),n.get(o))})}const Qj=(e,t)=>t.isSVG??yf(e)?new PN(t):new SN(t,{allowProjection:e!==S.Fragment});class Jj extends Mn{constructor(t){super(t),t.animationState||(t.animationState=AN(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ga(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let Zj=0;class eL extends Mn{constructor(){super(...arguments),this.id=Zj++,this.isExitComplete=!1}update(){var i;if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;if(t&&r===!1){if(this.isExitComplete){const{initial:o,custom:a}=this.node.getProps();if(typeof o=="string"){const l=Zn(this.node,o,a);if(l){const{transition:u,transitionEnd:c,...d}=l;for(const f in d)(i=this.node.getValue(f))==null||i.jump(d[f])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const tL={animation:{Feature:Jj},exit:{Feature:eL}};function Pi(e){return{point:{x:e.pageX,y:e.pageY}}}const nL=e=>t=>uf(t)&&e(t,Pi(t));function _s(e,t,n,r){return ui(e,t,nL(n),r)}const Xx=({current:e})=>e?e.ownerDocument.defaultView:null,Am=(e,t)=>Math.abs(e-t);function rL(e,t){const n=Am(e.x,t.x),r=Am(e.y,t.y);return Math.sqrt(n**2+r**2)}const Om=new Set(["auto","scroll"]);class Qx{constructor(t,n,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=g=>{this.handleScroll(g.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Zi(this.lastRawMoveEventInfo,this.transformPagePoint));const g=Jl(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,v=rL(g.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!v)return;const{point:w}=g,{timestamp:m}=je;this.history.push({...w,timestamp:m});const{onStart:y,onMove:x}=this.handlers;p||(y&&y(this.lastMoveEvent,g),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,g)},this.handlePointerMove=(g,p)=>{this.lastMoveEvent=g,this.lastRawMoveEventInfo=p,this.lastMoveEventInfo=Zi(p,this.transformPagePoint),ne.update(this.updatePoint,!0)},this.handlePointerUp=(g,p)=>{this.end();const{onEnd:v,onSessionEnd:w,resumeAnimation:m}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=Jl(g.type==="pointercancel"?this.lastMoveEventInfo:Zi(p,this.transformPagePoint),this.history);this.startEvent&&v&&v(g,y),w&&w(g,y)},!uf(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=s||window;const l=Pi(t),u=Zi(l,this.transformPagePoint),{point:c}=u,{timestamp:d}=je;this.history=[{...c,timestamp:d}];const{onSessionStart:f}=n;f&&f(t,Jl(u,this.history)),this.removeListeners=Ei(_s(this.contextWindow,"pointermove",this.handlePointerMove),_s(this.contextWindow,"pointerup",this.handlePointerUp),_s(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(Om.has(r.overflowX)||Om.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,s=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:s.x-n.x,y:s.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,s),ne.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ln(this.updatePoint)}}function Zi(e,t){return t?{point:t(e.point)}:e}function Dm(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Jl({point:e},t){return{point:e,delta:Dm(e,Jx(t)),offset:Dm(e,sL(t)),velocity:iL(t,.1)}}function sL(e){return e[0]}function Jx(e){return e[e.length-1]}function iL(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=Jx(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>nt(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&s.timestamp-r.timestamp>nt(t)*2&&(r=e[1]);const i=pt(s.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const o={x:(s.x-r.x)/i,y:(s.y-r.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function oL(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ae(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ae(n,e,r.max):Math.min(e,n)),e}function Mm(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function aL(e,{top:t,left:n,bottom:r,right:s}){return{x:Mm(e.x,n,s),y:Mm(e.y,t,r)}}function Fm(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function lL(e,t){return{x:Fm(e.x,t.x),y:Fm(e.y,t.y)}}function uL(e,t){let n=.5;const r=$e(e),s=$e(t);return s>r?n=oi(t.min,t.max-r,e.min):r>s&&(n=oi(e.min,e.max-s,t.min)),Bt(0,1,n)}function cL(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Nc=.35;function dL(e=Nc){return e===!1?e=0:e===!0&&(e=Nc),{x:Im(e,"left","right"),y:Im(e,"top","bottom")}}function Im(e,t,n){return{min:_m(e,t),max:_m(e,n)}}function _m(e,t){return typeof e=="number"?e:e[t]||0}const fL=new WeakMap;class hL{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ke(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=d=>{n&&this.snapToCursor(Pi(d).point),this.stopAnimation()},o=(d,f)=>{const{drag:g,dragPropagation:p,onDragStart:v}=this.getProps();if(g&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=z2(g),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ot(m=>{let y=this.getAxisMotionValue(m).get()||0;if(zt.test(y)){const{projection:x}=this.visualElement;if(x&&x.layout){const k=x.layout.layoutBox[m];k&&(y=$e(k)*(parseFloat(y)/100))}}this.originPoint[m]=y}),v&&ne.update(()=>v(d,f),!1,!0),wc(this.visualElement,"transform");const{animationState:w}=this.visualElement;w&&w.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:g,dragDirectionLock:p,onDirectionLock:v,onDrag:w}=this.getProps();if(!g&&!this.openDragLock)return;const{offset:m}=f;if(p&&this.currentDirection===null){this.currentDirection=mL(m),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",f.point,m),this.updateAxis("y",f.point,m),this.visualElement.render(),w&&ne.update(()=>w(d,f),!1,!0)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:d}=this.getProps();(d||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:c}=this.getProps();this.panSession=new Qx(t,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:Xx(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,s=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!s||!r)return;const{velocity:o}=s;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&ne.postRender(()=>a(r,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!eo(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=oL(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var i;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)==null?void 0:i.layout,s=this.constraints;t&&hr(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=aL(r.layoutBox,t):this.constraints=!1,this.elastic=dL(n),s!==this.constraints&&!hr(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Ot(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=cL(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!hr(t))return!1;const r=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=mN(r,s.root,this.visualElement.getTransformPagePoint());let o=lL(s.layout.layoutBox,i);if(n){const a=n(fN(o));this.hasMutatedConstraints=!!a,a&&(o=xx(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Ot(c=>{if(!eo(c,n,this.currentDirection))return;let d=l&&l[c]||{};(o===!0||o===c)&&(d={min:0,max:0});const f=s?200:1e6,g=s?40:1e7,p={type:"inertia",velocity:r?t[c]:0,bounceStiffness:f,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(c,p)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return wc(this.visualElement,t),r.start(rf(t,r,0,n,this.visualElement,!1))}stopAnimation(){Ot(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ot(n=>{const{drag:r}=this.getProps();if(!eo(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[n],l=i.get()||0;i.set(t[n]-ae(o,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!hr(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Ot(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();s[o]=uL({min:l,max:l},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),Ot(o=>{if(!eo(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(ae(l,u,s[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;fL.set(this.visualElement,this);const t=this.visualElement.current,n=_s(t,"pointerdown",u=>{const{drag:c,dragListener:d=!0}=this.getProps(),f=u.target,g=f!==t&&K2(f);c&&d&&!g&&this.start(u)});let r;const s=()=>{const{dragConstraints:u}=this.getProps();hr(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),r||(r=pL(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ne.read(s);const a=ui(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",({delta:u,hasLayoutChanged:c})=>{this.isDragging&&c&&(Ot(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=u[d].translate,f.set(f.get()+u[d].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),l&&l(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=Nc,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function Vm(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function pL(e,t,n){const r=Wp(e,Vm(n)),s=Wp(t,Vm(n));return()=>{r(),s()}}function eo(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function mL(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class gL extends Mn{constructor(t){super(t),this.removeGroupControls=gt,this.removeListeners=gt,this.controls=new hL(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||gt}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Zl=e=>(t,n)=>{e&&ne.update(()=>e(t,n),!1,!0)};class yL extends Mn{constructor(){super(...arguments),this.removePointerDownListener=gt}onPointerDown(t){this.session=new Qx(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Xx(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:Zl(t),onStart:Zl(n),onMove:Zl(r),onEnd:(i,o)=>{delete this.session,s&&ne.postRender(()=>s(i,o))}}}mount(){this.removePointerDownListener=_s(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let eu=!1;class vL extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&s&&r.register(i),eu&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Po.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:i}=this.props,{projection:o}=r;return o&&(o.isPresent=i,t.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),eu=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==i?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||ne.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),lf.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;eu=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Zx(e){const[t,n]=$x(),r=S.useContext(Bd);return h.jsx(vL,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(qx),isPresent:t,safeToRemove:n})}const xL={pan:{Feature:yL},drag:{Feature:gL,ProjectionNode:zx,MeasureLayout:Zx}};function zm(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,i=r[s];i&&ne.postRender(()=>i(t,Pi(t)))}class wL extends Mn{mount(){const{current:t}=this.node;t&&(this.unmount=B2(t,(n,r)=>(zm(this.node,r,"Start"),s=>zm(this.node,s,"End"))))}unmount(){}}class SL extends Mn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ei(ui(this.node.current,"focus",()=>this.onFocus()),ui(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function $m(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),i=r[s];i&&ne.postRender(()=>i(t,Pi(t)))}class kL extends Mn{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=q2(t,(s,i)=>($m(this.node,i,"Start"),(o,{success:a})=>$m(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const jc=new WeakMap,tu=new WeakMap,CL=e=>{const t=jc.get(e.target);t&&t(e)},EL=e=>{e.forEach(CL)};function bL({root:e,...t}){const n=e||document;tu.has(n)||tu.set(n,{});const r=tu.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(EL,{root:e,...t})),r[s]}function TL(e,t,n){const r=bL(t);return jc.set(e,n),r.observe(e),()=>{jc.delete(e),r.unobserve(e)}}const PL={some:0,all:1};class RL extends Mn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var l;(l=this.stopObserver)==null||l.call(this);const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:i}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:PL[s]},a=u=>{const{isIntersecting:c}=u;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),g=c?d:f;g&&g(u)};this.stopObserver=TL(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(NL(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function NL({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const jL={inView:{Feature:RL},tap:{Feature:kL},focus:{Feature:SL},hover:{Feature:wL}},LL={layout:{ProjectionNode:zx,MeasureLayout:Zx}},AL={...tL,...jL,...xL,...LL},xe=Xj(AL,Qj);function OL(){const{t:e}=La(),t=yi(),[n,r]=S.useState(!0),[s,i]=S.useState(!1),[o,a]=S.useState(null),[l,u]=S.useState({auth:{enabled:!1,username:"",password:"",confirmPassword:"",agentToken:""}}),[c,d]=S.useState({auth:{enabled:!1,username:"",agentTokenSet:!1}}),[f,g]=S.useState(!1),[p,v]=S.useState(!1),[w,m]=S.useState(!1);S.useEffect(()=>{y()},[]);const y=async()=>{try{r(!0);const C=await LP();d(C),u({auth:{enabled:C.auth.enabled,username:C.auth.username||"",password:"",confirmPassword:"",agentToken:""}})}catch(C){console.error("Failed to load settings:",C),a({type:"error",text:e("settings.loadError")})}finally{r(!1)}},x=async()=>{var C,b;if(l.auth.enabled){if(!l.auth.username||l.auth.username.trim()===""){a({type:"error",text:e("settings.usernameRequired")});return}if(!l.auth.password||l.auth.password.trim()===""){a({type:"error",text:e("settings.passwordRequired")});return}if(l.auth.password!==l.auth.confirmPassword){a({type:"error",text:e("settings.passwordMismatch")});return}}try{i(!0),a(null);const T=await AP({enabled:l.auth.enabled,username:l.auth.enabled?l.auth.username:void 0,password:l.auth.enabled?l.auth.password:void 0,agentToken:l.auth.agentToken||void 0});T.token&&ts.setToken(T.token),a({type:"success",text:e("settings.saveSuccess")}),d({auth:{enabled:l.auth.enabled,username:l.auth.username,agentTokenSet:!!(l.auth.agentToken&&l.auth.agentToken.trim()!=="")}}),u(P=>({auth:{...P.auth,password:"",confirmPassword:""}})),setTimeout(()=>{a(null)},3e3)}catch(T){console.error("Failed to save settings:",T),a({type:"error",text:((b=(C=T.response)==null?void 0:C.data)==null?void 0:b.error)||e("settings.saveError")})}finally{i(!1)}},k=()=>{t("/")};return n?h.jsxs("div",{className:"min-h-screen bg-background",children:[h.jsx("header",{className:"border-b bg-card shadow-sm",children:h.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4",children:h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsxs(re,{variant:"ghost",size:"sm",onClick:k,children:[h.jsx(op,{className:"h-4 w-4 mr-2"}),e("settings.back")]}),h.jsx(na,{className:"h-5 w-5"}),h.jsx("h1",{className:"text-xl font-semibold",children:e("settings.title")})]}),h.jsx(nc,{})]})})}),h.jsx("main",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-12",children:h.jsx("div",{className:"text-center text-muted-foreground",children:e("settings.loading")})})]}):h.jsxs("div",{className:"min-h-screen bg-background",children:[h.jsx("header",{className:"border-b bg-card shadow-sm",children:h.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4",children:h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsxs(re,{variant:"ghost",size:"sm",onClick:k,children:[h.jsx(op,{className:"h-4 w-4 mr-2"}),e("settings.back")]}),h.jsx(na,{className:"h-5 w-5"}),h.jsx("h1",{className:"text-xl font-semibold",children:e("settings.title")})]}),h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx(nc,{}),h.jsxs(re,{onClick:x,disabled:s,children:[h.jsx(Ob,{className:"h-4 w-4 mr-2"}),e(s?"settings.saving":"settings.save")]})]})]})})}),h.jsx("main",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-12",children:h.jsxs(xe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},children:[o&&h.jsx(xe.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:te("mb-6 p-4 rounded-lg",o.type==="success"?"bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800":"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800"),children:h.jsxs("div",{className:te("flex items-center gap-2",o.type==="success"?"text-green-800 dark:text-green-200":"text-red-800 dark:text-red-200"),children:[o.type==="success"&&h.jsx(Da,{className:"h-4 w-4"}),h.jsx("span",{children:o.text})]})}),h.jsxs(Qt,{children:[h.jsx(si,{children:h.jsx(ii,{children:e("settings.authSection")})}),h.jsxs(Jt,{className:"space-y-6",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{children:[h.jsx("h3",{className:"font-medium",children:e("settings.webAuthEnabled")}),h.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:e("settings.webAuthDescription")})]}),h.jsx("button",{onClick:()=>u(C=>({...C,auth:{...C.auth,enabled:!C.auth.enabled}})),className:te("relative inline-flex h-6 w-11 items-center rounded-full transition-colors",l.auth.enabled?"bg-primary":"bg-muted"),children:h.jsx("span",{className:te("inline-block h-4 w-4 transform rounded-full bg-white transition-transform",l.auth.enabled?"translate-x-6":"translate-x-1")})})]}),l.auth.enabled&&h.jsxs(xe.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"space-y-4 pt-4 border-t",children:[h.jsxs("div",{children:[h.jsx("label",{className:"block text-sm font-medium mb-2",children:e("settings.username")}),h.jsx("input",{type:"text",value:l.auth.username,onChange:C=>u(b=>({...b,auth:{...b.auth,username:C.target.value}})),className:"w-full px-3 py-2 border rounded-md bg-background",placeholder:e("settings.usernamePlaceholder")})]}),h.jsxs("div",{children:[h.jsx("label",{className:"block text-sm font-medium mb-2",children:e("settings.password")}),h.jsxs("div",{className:"relative",children:[h.jsx("input",{type:f?"text":"password",value:l.auth.password,onChange:C=>u(b=>({...b,auth:{...b.auth,password:C.target.value}})),className:"w-full px-3 py-2 border rounded-md bg-background pr-10",placeholder:e("settings.passwordPlaceholder")}),h.jsx("button",{type:"button",onClick:()=>g(!f),className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:f?h.jsx(Al,{className:"h-4 w-4"}):h.jsx(Ol,{className:"h-4 w-4"})})]})]}),h.jsxs("div",{children:[h.jsx("label",{className:"block text-sm font-medium mb-2",children:e("settings.confirmPassword")}),h.jsxs("div",{className:"relative",children:[h.jsx("input",{type:p?"text":"password",value:l.auth.confirmPassword,onChange:C=>u(b=>({...b,auth:{...b.auth,confirmPassword:C.target.value}})),className:"w-full px-3 py-2 border rounded-md bg-background pr-10",placeholder:e("settings.confirmPasswordPlaceholder")}),h.jsx("button",{type:"button",onClick:()=>v(!p),className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:p?h.jsx(Al,{className:"h-4 w-4"}):h.jsx(Ol,{className:"h-4 w-4"})})]})]})]})]})]}),h.jsxs(Qt,{className:"mt-6",children:[h.jsx(si,{children:h.jsx(ii,{children:e("settings.agentAuthSection")})}),h.jsx(Jt,{className:"space-y-4",children:h.jsxs("div",{children:[h.jsx("label",{className:"block text-sm font-medium mb-2",children:e("settings.agentToken")}),h.jsxs("div",{className:"relative",children:[h.jsx("input",{type:w?"text":"password",value:l.auth.agentToken,onChange:C=>u(b=>({...b,auth:{...b.auth,agentToken:C.target.value}})),className:"w-full px-3 py-2 border rounded-md bg-background pr-10",placeholder:c.auth.agentTokenSet?e("settings.tokenAlreadySet"):e("settings.agentTokenPlaceholder")}),h.jsx("button",{type:"button",onClick:()=>m(!w),className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:w?h.jsx(Al,{className:"h-4 w-4"}):h.jsx(Ol,{className:"h-4 w-4"})})]}),h.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:e("settings.agentTokenDescription")})]})})]})]})})]})}function DL(){const[e,t]=S.useState(""),[n,r]=S.useState(""),[s,i]=S.useState(""),[o,a]=S.useState(!1),l=yi(),u=async c=>{var d,f;c.preventDefault(),i(""),a(!0);try{const g=await bP(e,n);g.success?(ts.setToken(g.token),l("/")):i("Login failed")}catch(g){i(((f=(d=g.response)==null?void 0:d.data)==null?void 0:f.error)||"Login failed. Please check your credentials.")}finally{a(!1)}};return h.jsx("div",{className:"min-h-screen bg-background flex items-start justify-center p-4 pt-[20vh]",children:h.jsx(xe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"w-full max-w-md",children:h.jsxs(Qt,{children:[h.jsx(si,{children:h.jsx(ii,{className:"text-2xl font-bold text-center",children:"Login"})}),h.jsx(Jt,{children:h.jsxs("form",{onSubmit:u,className:"space-y-4",children:[h.jsxs("div",{children:[h.jsx("label",{className:"block text-sm font-medium mb-2",children:"Username"}),h.jsxs("div",{className:"relative",children:[h.jsx(Fb,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground"}),h.jsx("input",{type:"text",value:e,onChange:c=>t(c.target.value),className:"w-full pl-10 pr-4 py-2 border border-input rounded-md focus:outline-none focus:ring-2 focus:ring-primary",placeholder:"Enter username",required:!0})]})]}),h.jsxs("div",{children:[h.jsx("label",{className:"block text-sm font-medium mb-2",children:"Password"}),h.jsxs("div",{className:"relative",children:[h.jsx(Nb,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground"}),h.jsx("input",{type:"password",value:n,onChange:c=>r(c.target.value),className:"w-full pl-10 pr-4 py-2 border border-input rounded-md focus:outline-none focus:ring-2 focus:ring-primary",placeholder:"Enter password",required:!0})]})]}),s&&h.jsx(xe.div,{initial:{opacity:0},animate:{opacity:1},className:"text-destructive text-sm text-center",children:s}),h.jsx(re,{type:"submit",className:"w-full",disabled:o,children:o?"Logging in...":"Login"})]})})]})})})}function ML({status:e}){return typeof e=="string"?h.jsx(or,{variant:e==="running"?"blue":"destructive",className:"whitespace-nowrap",children:e}):h.jsx(or,{variant:e.status==="running"?"blue":"destructive",className:"whitespace-nowrap",children:e.status})}function Bm({children:e,authEnabled:t}){const n=ts.isAuthenticated(),r=yi(),s=Ut();return S.useEffect(()=>{t&&!n&&r("/login",{state:{from:s}})},[t,n,r,s]),t&&!n?null:h.jsx(h.Fragment,{children:e})}function FL({authEnabled:e}){const{t}=La(),n=yi(),[r,s]=S.useState([]),[,i]=S.useState(null),[o,a]=S.useState(!0),[l,u]=S.useState(null),[c,d]=S.useState(!1),[f,g]=S.useState(null),[p,v]=S.useState(!1),[w,m]=S.useState(new Set),[y,x]=S.useState(!1),[k,C]=S.useState(!1),[b,T]=S.useState("list"),[P,L]=S.useState(!1),[R,B]=S.useState(null),[A,M]=S.useState(null),[_,U]=S.useState(!1),[z,Z]=S.useState(null),[N,D]=S.useState(!1),[$,V]=S.useState(null),[G,Pe]=S.useState(""),[Re,at]=S.useState(!1),[Ht,Fn]=S.useState(null),[ew,vf]=S.useState(!1),Ri=S.useCallback(O=>{var ee;if(!O.connected||!((ee=O.status)!=null&&ee.openclawGateway))return"unknown";const Y=O.status.openclawGateway;return typeof Y=="string"?Y:Y.status},[]),xf=S.useCallback(O=>{m(Y=>{const ee=new Set(Y);return ee.has(O)?ee.delete(O):ee.add(O),ee})},[]),tw=S.useCallback(()=>{w.size===r.length?m(new Set):m(new Set(r.map(O=>O.id)))},[w.size,r]),Ni=r.filter(O=>w.has(O.id)).map(O=>Ri(O)),nw=Ni.length>0&&Ni.every(O=>O==="stopped"),rw=Ni.length>0&&Ni.every(O=>O==="running"),sw=()=>{ts.removeToken(),n("/login")},iw=()=>{v(!1),n("/login")},In=S.useCallback(async()=>{var O,Y,ee;try{a(!0),u(null);try{const Q=await Ep();s(Q)}catch(Q){if(console.error("Failed to fetch nodes from database:",Q),((O=Q.response)==null?void 0:O.status)===401){v(!0);return}c||u("无法连接到服务器")}try{const Q=await RP();i(Q)}catch(Q){if(console.error("Failed to fetch stats:",Q),((Y=Q.response)==null?void 0:Y.status)===401){v(!0);return}}d(!0)}catch(Q){if(console.error("Error loading data:",Q),((ee=Q.response)==null?void 0:ee.status)===401){v(!0);return}c||u(Q instanceof Error?Q.message:"Failed to load data")}finally{a(!1)}},[c]),wf=S.useCallback(async O=>{const Y=r.filter(Q=>{if(!Q.connected)return!1;const an=Ri(Q);return O==="openclaw_gateway_start"?an!=="running":an==="running"}).filter(Q=>w.has(Q.id));if(Y.length===0)return;x(!0);let ee=0;await Promise.allSettled(Y.map(async Q=>{try{await $d(Q.id,O),ee++}catch{}})),x(!1),m(new Set),setTimeout(()=>In(),2e3)},[r,w,Ri,In]),ow=(O,Y)=>{g({id:O,name:Y})},aw=async(O,Y)=>{try{await TP(O,Y);const ee=await Ep();s(ee)}catch(ee){throw console.error("Failed to update node name:",ee),ee}},lw=async()=>{if(w.size===0)return;x(!0);let O=0;await Promise.allSettled(Array.from(w).map(async Y=>{try{await PP(Y),O++}catch{}})),x(!1),m(new Set),C(!1),setTimeout(()=>In(),500)},uw=async O=>{B(O),L(!0),U(!0),Z(null),M(null);try{const Y=await NP(O.id);M(Y)}catch(Y){Z(Y instanceof Error?Y.message:"Failed to load config")}finally{U(!1)}},cw=async O=>{V(O),D(!0),at(!0),Fn(null),Pe("");try{const Y=await jP(O.id);Pe(Y)}catch(Y){Fn(Y instanceof Error?Y.message:"Failed to load logs")}finally{at(!1)}};S.useEffect(()=>{In();const O=setInterval(In,1e4);return()=>clearInterval(O)},[]);const Sf=O=>{const Y=Math.floor(O/3600),ee=Math.floor(Y/24),Q=Y%24;return ee>0?`${ee}d ${Q}h`:`${Y}h`},kf=O=>{const ee=new Date().getTime()-(O instanceof Date?O.getTime():new Date(O).getTime()),Q=Math.floor(ee/6e4),an=Math.floor(ee/36e5),dw=Math.floor(ee/864e5);return Q<1?t("nodes.justNow"):Q<60?`${Q} ${t("nodes.minutesAgo")}`:an<24?`${an} ${t("nodes.hoursAgo")}`:`${dw} ${t("nodes.daysAgo")}`};return l&&!c?h.jsx("div",{className:"min-h-screen bg-background p-8",children:h.jsx("div",{className:"max-w-7xl mx-auto",children:h.jsxs("div",{className:"text-center py-12",children:[h.jsx("h1",{className:"text-2xl font-bold text-destructive mb-4",children:t("errors.title")}),h.jsx("p",{className:"text-muted-foreground mb-4",children:l}),h.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:t("errors.retryMessage")}),h.jsx(re,{onClick:In,children:t("errors.retry")})]})})}):h.jsxs("div",{className:"min-h-screen bg-background",children:[h.jsx("header",{className:"border-b bg-card shadow-sm",children:h.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4",children:h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx("img",{src:"/img/caribbean-logo.png",alt:"Caribbean",className:"h-10 w-auto cursor-pointer hover:opacity-80 transition-opacity",onClick:()=>vf(!0)}),h.jsx("h1",{className:"text-2xl font-bold",children:t("header.title")})]}),h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx(nc,{}),h.jsx(xe.div,{whileHover:{scale:1.05},whileTap:{scale:.95},children:h.jsxs(re,{onClick:In,variant:"outline",size:"sm",children:[h.jsx(Dd,{className:`h-4 w-4 mr-2 ${o?"animate-spin":""}`}),t("header.refresh")]})}),h.jsx(xe.div,{whileHover:{scale:1.05},whileTap:{scale:.95},children:h.jsx(re,{onClick:()=>n("/settings"),variant:"outline",size:"sm",children:h.jsx(na,{className:"h-4 w-4"})})}),e&&h.jsx(xe.div,{whileHover:{scale:1.05},whileTap:{scale:.95},children:h.jsxs(re,{onClick:sw,variant:"outline",size:"sm",children:[h.jsx(jb,{className:"h-4 w-4 mr-2"}),"Logout"]})})]})]})})}),h.jsxs("main",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12",children:[l&&c&&h.jsx(xe.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"mb-4 p-4 bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg",children:h.jsx("div",{className:"flex items-center gap-2 text-yellow-800 dark:text-yellow-200",children:h.jsxs("span",{className:"text-sm",children:["⚠️ ",l," - ",t("errors.dataError")]})})}),h.jsxs("div",{children:[h.jsxs("div",{className:"flex items-center justify-between mb-8",children:[h.jsx("h2",{className:"text-xl font-semibold",children:t("nodes.title")}),h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsxs("div",{className:"flex items-center gap-1 bg-muted rounded-md p-1",children:[h.jsx(re,{variant:b==="list"?"default":"ghost",size:"sm",className:"h-7 px-2",onClick:()=>T("list"),children:h.jsx(Rb,{className:"h-4 w-4"})}),h.jsx(re,{variant:b==="card"?"default":"ghost",size:"sm",className:"h-7 px-2",onClick:()=>T("card"),children:h.jsx(Pb,{className:"h-4 w-4"})})]}),w.size>0&&h.jsx("span",{className:"text-sm text-muted-foreground",children:t("batchActions.selected",{count:w.size})}),h.jsxs(Ib,{children:[h.jsxs(_b,{className:te("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium","h-9 px-4 py-2 bg-primary text-primary-foreground hover:bg-primary/90","disabled:pointer-events-none disabled:opacity-50",y&&"opacity-50 pointer-events-none"),children:[t(y?"batchActions.executing":"batchActions.executeAction"),!y&&h.jsx(Cb,{className:"h-4 w-4"})]}),h.jsxs(Vb,{children:[h.jsxs(Dl,{disabled:!nw,onSelect:()=>wf("openclaw_gateway_start"),children:[h.jsx(Ab,{className:"h-4 w-4 mr-2 text-green-500"}),t("batchActions.start")]}),h.jsxs(Dl,{disabled:!rw,onSelect:()=>wf("openclaw_gateway_stop"),children:[h.jsx(Mb,{className:"h-4 w-4 mr-2 text-red-500"}),t("batchActions.stop")]}),h.jsxs(Dl,{disabled:w.size===0,onSelect:()=>C(!0),children:[h.jsx(Ll,{className:"h-4 w-4 mr-2 text-destructive"}),t("batchActions.delete")]})]})]})]})]}),o&&!c&&h.jsx(xe.div,{className:"text-center py-8 text-muted-foreground",animate:{opacity:.5},transition:{duration:1,repeat:1/0,ease:"easeInOut"},children:t("nodes.loading")})]}),r.length===0&&!o&&!c?h.jsx(xe.div,{className:"rounded-lg overflow-hidden",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},children:h.jsx(Qt,{className:"rounded-none",children:h.jsx(Jt,{className:"py-12",children:h.jsxs("div",{className:"text-center",children:[h.jsx(xe.div,{initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},transition:{type:"spring",stiffness:200,damping:10},className:"mb-4",children:h.jsx(Db,{className:"h-16 w-16 text-muted-foreground mx-auto"})}),h.jsx("p",{className:"text-muted-foreground mb-4",children:t("nodes.noInstances")}),h.jsx("p",{className:"text-sm text-muted-foreground",children:t("nodes.startAgent")})]})})})}):r.length===0?h.jsx(xe.div,{className:"rounded-lg overflow-hidden",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},children:h.jsx(Qt,{className:"rounded-none",children:h.jsx(Jt,{className:"py-12",children:h.jsxs("div",{className:"text-center",children:[h.jsx("p",{className:"text-muted-foreground mb-2",children:t("nodes.noInstancesDb")}),h.jsx("p",{className:"text-sm text-muted-foreground",children:t("nodes.noInstancesServer")})]})})})}):h.jsxs(h.Fragment,{children:[r.filter(O=>O.connected).length===0&&c&&h.jsx(xe.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"mb-4 p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg",children:h.jsx("div",{className:"flex items-center gap-2 text-red-800 dark:text-red-200",children:h.jsxs("span",{children:["⚠️ ",t("nodes.allOffline")]})})}),h.jsx(xe.div,{className:"rounded-lg overflow-hidden",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},children:b==="list"?h.jsx(Qt,{className:"rounded-none",children:h.jsx(Jt,{className:"p-0",children:h.jsxs(_v,{children:[h.jsx(Vv,{children:h.jsxs(tc,{children:[h.jsx(ut,{className:"w-10",children:h.jsx(ra,{checked:r.length>0&&w.size===r.length,onCheckedChange:tw})}),h.jsx(ut,{className:"w-16",children:t("nodes.status")}),h.jsx(ut,{children:t("nodes.instanceName")}),h.jsx(ut,{children:t("nodes.id")}),h.jsx(ut,{children:t("nodes.clientIp")}),h.jsx(ut,{children:t("nodes.connectionStatus")}),h.jsx(ut,{children:"Gateway"}),h.jsx(ut,{children:t("nodes.lastSeen")}),h.jsx(ut,{children:t("nodes.cpu")}),h.jsx(ut,{children:t("nodes.memory")}),h.jsx(ut,{children:t("nodes.uptime")})]})}),h.jsx(zv,{children:r.map(O=>{var Y,ee,Q,an;return h.jsxs(tc,{className:te(O.connected?"":"bg-muted/30",w.has(O.id)&&"bg-blue-50/50 dark:bg-blue-900/10"),children:[h.jsx(ct,{children:h.jsx(ra,{checked:w.has(O.id),onCheckedChange:()=>xf(O.id)})}),h.jsx(ct,{children:h.jsx("div",{className:"flex items-center justify-center",children:O.connected?h.jsx(xe.div,{animate:{scale:[1,1.1,1],rotate:[0,10,-10,0]},transition:{duration:2,repeat:1/0,ease:"easeInOut"},children:h.jsx("img",{src:"/img/openclaw-logo.svg",alt:"OpenClaw Logo",className:"h-4 w-4"})}):h.jsx("img",{src:"/img/openclaw-logo.svg",alt:"OpenClaw Logo",className:"h-4 w-4 opacity-50",style:{filter:"grayscale(100%)"}})})}),h.jsx(ct,{children:h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("span",{className:"font-medium",children:O.name||"unknown"}),h.jsx(re,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0 hover:bg-muted/50",onClick:()=>ow(O.id,O.name||"unknown"),children:h.jsx(Lb,{className:"h-3 w-3"})})]})}),h.jsx(ct,{className:"text-muted-foreground text-sm",children:O.id}),h.jsx(ct,{className:"text-muted-foreground text-sm",children:O.clientIp||"-"}),h.jsx(ct,{children:h.jsx(or,{variant:O.connected?"success":"destructive",className:"whitespace-nowrap",children:O.connected?t("nodes.connected"):t("nodes.disconnected")})}),h.jsx(ct,{children:O.connected?(Y=O.status)!=null&&Y.openclawGateway?h.jsx(ML,{status:O.status.openclawGateway}):h.jsx("span",{className:"text-muted-foreground text-sm",children:"-"}):h.jsx(or,{variant:"secondary",className:"whitespace-nowrap",children:"unknown"})}),h.jsx(ct,{className:"text-muted-foreground text-sm",children:kf(O.lastSeen)}),h.jsx(ct,{children:O.connected&&((ee=O.status)!=null&&ee.cpu)?h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(Uv,{className:"h-4 w-4 text-muted-foreground"}),h.jsxs("span",{children:[O.status.cpu.percent,"%"]})]}):h.jsx("span",{className:"text-muted-foreground",children:"-"})}),h.jsx(ct,{children:O.connected&&((Q=O.status)!=null&&Q.memory)?h.jsxs("div",{className:"flex items-center gap-2",title:`${O.status.memory.used}GB / ${O.status.memory.total}GB`,children:[h.jsx(Hv,{className:"h-4 w-4 text-muted-foreground"}),h.jsxs("span",{children:[O.status.memory.percent,"%"]})]}):h.jsx("span",{className:"text-muted-foreground",children:"-"})}),h.jsx(ct,{children:O.connected&&((an=O.status)!=null&&an.uptime)?h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(Bv,{className:"h-4 w-4 text-muted-foreground"}),h.jsx("span",{children:Sf(O.status.uptime)})]}):h.jsx("span",{className:"text-muted-foreground",children:"-"})})]},O.id)})})]})})}):h.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:r.map(O=>h.jsx(Bb,{node:O,selected:w.has(O.id),onToggle:xf,onViewConfig:uw,onViewLogs:cw,getGatewayStatus:Ri,formatUptime:Sf,formatLastSeen:kf},O.id))})})]}),h.jsx(zb,{isOpen:f!==null,onClose:()=>g(null),nodeId:(f==null?void 0:f.id)||"",currentName:(f==null?void 0:f.name)||"",onSave:aw}),h.jsx(Ub,{isOpen:P,onClose:()=>L(!1),node:R,config:A,loading:_,error:z}),h.jsx(Hb,{isOpen:N,onClose:()=>D(!1),node:$,logs:G,loading:Re,error:Ht}),h.jsx(DP,{isOpen:ew,onClose:()=>vf(!1)}),h.jsx(Rm,{children:k&&h.jsx(xe.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:()=>C(!1),children:h.jsxs(xe.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},onClick:O=>O.stopPropagation(),className:"bg-card rounded-lg shadow-xl p-6 max-w-md w-full mx-4",children:[h.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[h.jsx(Ll,{className:"h-6 w-6 text-destructive"}),h.jsx("h3",{className:"text-lg font-semibold",children:t("batchActions.deleteConfirmTitle")})]}),h.jsx("p",{className:"text-muted-foreground mb-6",children:t("batchActions.deleteConfirmMessage",{count:w.size})}),h.jsxs("div",{className:"flex gap-3 justify-end",children:[h.jsx(re,{variant:"outline",onClick:()=>C(!1),children:t("batchActions.cancel")}),h.jsx(re,{variant:"destructive",onClick:lw,disabled:y,children:t(y?"batchActions.executing":"batchActions.delete")})]})]})})}),h.jsx(Rm,{children:p&&h.jsx(xe.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:()=>v(!1),children:h.jsxs(xe.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},onClick:O=>O.stopPropagation(),className:"bg-card rounded-lg shadow-xl p-6 max-w-md w-full mx-4",children:[h.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[h.jsx(Ll,{className:"h-6 w-6 text-destructive"}),h.jsx("h3",{className:"text-lg font-semibold",children:"需要登录"})]}),h.jsx("p",{className:"text-muted-foreground mb-6",children:"您的会话已过期,请重新登录以继续访问。"}),h.jsxs("div",{className:"flex gap-3 justify-end",children:[h.jsx(re,{variant:"outline",onClick:()=>v(!1),children:"取消"}),h.jsx(re,{onClick:iw,children:"前往登录"})]})]})})})]})]})}function IL(){const[e,t]=S.useState(!0),[n,r]=S.useState(!1);return S.useEffect(()=>{EP().then(s=>t(s.enabled)).catch(()=>t(!0)).finally(()=>r(!0))},[]),n?h.jsx(NE,{children:h.jsxs(iE,{children:[e&&h.jsx(po,{path:"/login",element:h.jsx(DL,{})}),h.jsx(po,{path:"/*",element:h.jsx(Bm,{authEnabled:e,children:h.jsx(FL,{authEnabled:e})})}),h.jsx(po,{path:"/settings",element:h.jsx(Bm,{authEnabled:e,children:h.jsx(OL,{})})})]})}):null}tv(document.getElementById("root")).render(h.jsx(S.StrictMode,{children:h.jsx(IL,{})}));