From 627b45f4bf992ccfae093f383a6a9bb9023cea43 Mon Sep 17 00:00:00 2001 From: "dayo.ogundipe" Date: Sat, 16 Mar 2024 09:07:36 -0700 Subject: [PATCH] build new changes --- API/wwwroot/assets/index-d4b579cb.js | 120 +++++++++++++++++++++++++++ API/wwwroot/index.html | 2 +- 2 files changed, 121 insertions(+), 1 deletion(-) create mode 100644 API/wwwroot/assets/index-d4b579cb.js diff --git a/API/wwwroot/assets/index-d4b579cb.js b/API/wwwroot/assets/index-d4b579cb.js new file mode 100644 index 0000000..672c04b --- /dev/null +++ b/API/wwwroot/assets/index-d4b579cb.js @@ -0,0 +1,120 @@ +var _j=Object.defineProperty;var Sj=(e,t,n)=>t in e?_j(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ej=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var te=(e,t,n)=>(Sj(e,typeof t!="symbol"?t+"":t,n),n);var lce=Ej((jr,Ur)=>{function xj(e,t){for(var n=0;nr[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(a){if(a.ep)return;a.ep=!0;const i=n(a);fetch(a.href,i)}})();var am=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Nr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var OP={exports:{}},qg={},kP={exports:{}},Qe={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var bp=Symbol.for("react.element"),Cj=Symbol.for("react.portal"),Tj=Symbol.for("react.fragment"),Dj=Symbol.for("react.strict_mode"),Oj=Symbol.for("react.profiler"),kj=Symbol.for("react.provider"),Pj=Symbol.for("react.context"),Nj=Symbol.for("react.forward_ref"),Aj=Symbol.for("react.suspense"),Mj=Symbol.for("react.memo"),Rj=Symbol.for("react.lazy"),Yx=Symbol.iterator;function Ij(e){return e===null||typeof e!="object"?null:(e=Yx&&e[Yx]||e["@@iterator"],typeof e=="function"?e:null)}var PP={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},NP=Object.assign,AP={};function Gd(e,t,n){this.props=e,this.context=t,this.refs=AP,this.updater=n||PP}Gd.prototype.isReactComponent={};Gd.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Gd.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function MP(){}MP.prototype=Gd.prototype;function G_(e,t,n){this.props=e,this.context=t,this.refs=AP,this.updater=n||PP}var K_=G_.prototype=new MP;K_.constructor=G_;NP(K_,Gd.prototype);K_.isPureReactComponent=!0;var Gx=Array.isArray,RP=Object.prototype.hasOwnProperty,q_={current:null},IP={key:!0,ref:!0,__self:!0,__source:!0};function $P(e,t,n){var r,a={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)RP.call(t,r)&&!IP.hasOwnProperty(r)&&(a[r]=t[r]);var s=arguments.length-2;if(s===1)a.children=n;else if(1>>1,Ee=U[de];if(0>>1;dea(me,ae))_ea(Ce,me)?(U[de]=Ce,U[_e]=ae,de=_e):(U[de]=me,U[ee]=ae,de=ee);else if(_ea(Ce,ae))U[de]=Ce,U[_e]=ae,de=_e;else break e}}return z}function a(U,z){var ae=U.sortIndex-z.sortIndex;return ae!==0?ae:U.id-z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var l=[],u=[],c=1,d=null,f=3,h=!1,p=!1,v=!1,y=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(U){for(var z=n(u);z!==null;){if(z.callback===null)r(u);else if(z.startTime<=U)r(u),z.sortIndex=z.expirationTime,t(l,z);else break;z=n(u)}}function b(U){if(v=!1,_(U),!p)if(n(l)!==null)p=!0,Y(C);else{var z=n(u);z!==null&&oe(b,z.startTime-U)}}function C(U,z){p=!1,v&&(v=!1,g(P),P=-1),h=!0;var ae=f;try{for(_(z),d=n(l);d!==null&&(!(d.expirationTime>z)||U&&!j());){var de=d.callback;if(typeof de=="function"){d.callback=null,f=d.priorityLevel;var Ee=de(d.expirationTime<=z);z=e.unstable_now(),typeof Ee=="function"?d.callback=Ee:d===n(l)&&r(l),_(z)}else r(l);d=n(l)}if(d!==null)var De=!0;else{var ee=n(u);ee!==null&&oe(b,ee.startTime-z),De=!1}return De}finally{d=null,f=ae,h=!1}}var E=!1,T=null,P=-1,A=5,M=-1;function j(){return!(e.unstable_now()-MU||125de?(U.sortIndex=ae,t(u,U),n(l)===null&&U===n(u)&&(v?(g(P),P=-1):v=!0,oe(b,ae-de))):(U.sortIndex=Ee,t(l,U),p||h||(p=!0,Y(C))),U},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(U){var z=f;return function(){var ae=f;f=z;try{return U.apply(this,arguments)}finally{f=ae}}}})(UP);jP.exports=UP;var Gj=jP.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var zP=x,Br=Gj;function re(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),wb=Object.prototype.hasOwnProperty,Kj=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,qx={},Qx={};function qj(e){return wb.call(Qx,e)?!0:wb.call(qx,e)?!1:Kj.test(e)?Qx[e]=!0:(qx[e]=!0,!1)}function Qj(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Xj(e,t,n,r){if(t===null||typeof t>"u"||Qj(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function fr(e,t,n,r,a,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=a,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var Vn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Vn[e]=new fr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Vn[t]=new fr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Vn[e]=new fr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Vn[e]=new fr(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Vn[e]=new fr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Vn[e]=new fr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Vn[e]=new fr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Vn[e]=new fr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Vn[e]=new fr(e,5,!1,e.toLowerCase(),null,!1,!1)});var X_=/[\-:]([a-z])/g;function Z_(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(X_,Z_);Vn[t]=new fr(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(X_,Z_);Vn[t]=new fr(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(X_,Z_);Vn[t]=new fr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Vn[e]=new fr(e,1,!1,e.toLowerCase(),null,!1,!1)});Vn.xlinkHref=new fr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Vn[e]=new fr(e,1,!1,e.toLowerCase(),null,!0,!0)});function J_(e,t,n,r){var a=Vn.hasOwnProperty(t)?Vn[t]:null;(a!==null?a.type!==0:r||!(2s||a[o]!==i[s]){var l=` +`+a[o].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=o&&0<=s);break}}}finally{W0=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Wf(e):""}function Zj(e){switch(e.tag){case 5:return Wf(e.type);case 16:return Wf("Lazy");case 13:return Wf("Suspense");case 19:return Wf("SuspenseList");case 0:case 2:case 15:return e=Y0(e.type,!1),e;case 11:return e=Y0(e.type.render,!1),e;case 1:return e=Y0(e.type,!0),e;default:return""}}function Eb(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 Lu:return"Fragment";case $u:return"Portal";case bb:return"Profiler";case eS:return"StrictMode";case _b:return"Suspense";case Sb:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case VP:return(e.displayName||"Context")+".Consumer";case BP:return(e._context.displayName||"Context")+".Provider";case tS:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case nS:return t=e.displayName||null,t!==null?t:Eb(e.type)||"Memo";case $o:t=e._payload,e=e._init;try{return Eb(e(t))}catch{}}return null}function Jj(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 Eb(t);case 8:return t===eS?"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 us(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function YP(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function eU(e){var t=YP(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 a=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.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 sm(e){e._valueTracker||(e._valueTracker=eU(e))}function GP(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=YP(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Nv(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 xb(e,t){var n=t.checked;return Zt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Zx(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=us(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 KP(e,t){t=t.checked,t!=null&&J_(e,"checked",t,!1)}function Cb(e,t){KP(e,t);var n=us(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")?Tb(e,t.type,n):t.hasOwnProperty("defaultValue")&&Tb(e,t.type,us(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Jx(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 Tb(e,t,n){(t!=="number"||Nv(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Yf=Array.isArray;function sc(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a"+t.valueOf().toString()+"",t=lm.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Th(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var th={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},tU=["Webkit","ms","Moz","O"];Object.keys(th).forEach(function(e){tU.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),th[t]=th[e]})});function ZP(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||th.hasOwnProperty(e)&&th[e]?(""+t).trim():t+"px"}function JP(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,a=ZP(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,a):e[n]=a}}var nU=Zt({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 kb(e,t){if(t){if(nU[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(re(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(re(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(re(61))}if(t.style!=null&&typeof t.style!="object")throw Error(re(62))}}function Pb(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 Nb=null;function rS(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ab=null,lc=null,uc=null;function nC(e){if(e=Ep(e)){if(typeof Ab!="function")throw Error(re(280));var t=e.stateNode;t&&(t=ey(t),Ab(e.stateNode,e.type,t))}}function eN(e){lc?uc?uc.push(e):uc=[e]:lc=e}function tN(){if(lc){var e=lc,t=uc;if(uc=lc=null,nC(e),t)for(e=0;e>>=0,e===0?32:31-(hU(e)/pU|0)|0}var um=64,cm=4194304;function Gf(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 Iv(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,a=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var s=o&~a;s!==0?r=Gf(s):(i&=o,i!==0&&(r=Gf(i)))}else o=n&~a,o!==0?r=Gf(o):i!==0&&(r=Gf(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&a)&&(a=r&-r,i=t&-t,a>=i||a===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function _p(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ba(t),e[t]=n}function yU(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=rh),dC=String.fromCharCode(32),fC=!1;function _N(e,t){switch(e){case"keyup":return YU.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function SN(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Fu=!1;function KU(e,t){switch(e){case"compositionend":return SN(t);case"keypress":return t.which!==32?null:(fC=!0,dC);case"textInput":return e=t.data,e===dC&&fC?null:e;default:return null}}function qU(e,t){if(Fu)return e==="compositionend"||!dS&&_N(e,t)?(e=wN(),rv=lS=Vo=null,Fu=!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)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=vC(n)}}function TN(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?TN(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function DN(){for(var e=window,t=Nv();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Nv(e.document)}return t}function fS(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 a3(e){var t=DN(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&TN(n.ownerDocument.documentElement,n)){if(r!==null&&fS(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 a=n.textContent.length,i=Math.min(r.start,a);r=r.end===void 0?i:Math.min(r.end,a),!e.extend&&i>r&&(a=r,r=i,i=a),a=gC(n,i);var o=gC(n,r);a&&o&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(a.node,a.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=document.documentMode,ju=null,Fb=null,ih=null,jb=!1;function yC(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;jb||ju==null||ju!==Nv(r)||(r=ju,"selectionStart"in r&&fS(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}),ih&&Ah(ih,r)||(ih=r,r=Fv(Fb,"onSelect"),0Hu||(e.current=Wb[Hu],Wb[Hu]=null,Hu--)}function Ot(e,t){Hu++,Wb[Hu]=e.current,e.current=t}var cs={},Zn=zs(cs),Er=zs(!1),Nl=cs;function Sc(e,t){var n=e.type.contextTypes;if(!n)return cs;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var a={},i;for(i in n)a[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function xr(e){return e=e.childContextTypes,e!=null}function Uv(){Lt(Er),Lt(Zn)}function CC(e,t,n){if(Zn.current!==cs)throw Error(re(168));Ot(Zn,t),Ot(Er,n)}function $N(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var a in r)if(!(a in t))throw Error(re(108,Jj(e)||"Unknown",a));return Zt({},n,r)}function zv(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||cs,Nl=Zn.current,Ot(Zn,e),Ot(Er,Er.current),!0}function TC(e,t,n){var r=e.stateNode;if(!r)throw Error(re(169));n?(e=$N(e,t,Nl),r.__reactInternalMemoizedMergedChildContext=e,Lt(Er),Lt(Zn),Ot(Zn,e)):Lt(Er),Ot(Er,n)}var Vi=null,ty=!1,ow=!1;function LN(e){Vi===null?Vi=[e]:Vi.push(e)}function v3(e){ty=!0,LN(e)}function Hs(){if(!ow&&Vi!==null){ow=!0;var e=0,t=gt;try{var n=Vi;for(gt=1;e>=o,a-=o,Ki=1<<32-Ba(t)+a|n<P?(A=T,T=null):A=T.sibling;var M=f(g,T,_[P],b);if(M===null){T===null&&(T=A);break}e&&T&&M.alternate===null&&t(g,T),w=i(M,w,P),E===null?C=M:E.sibling=M,E=M,T=A}if(P===_.length)return n(g,T),Bt&&il(g,P),C;if(T===null){for(;P<_.length;P++)T=d(g,_[P],b),T!==null&&(w=i(T,w,P),E===null?C=T:E.sibling=T,E=T);return Bt&&il(g,P),C}for(T=r(g,T);P<_.length;P++)A=h(T,g,P,_[P],b),A!==null&&(e&&A.alternate!==null&&T.delete(A.key===null?P:A.key),w=i(A,w,P),E===null?C=A:E.sibling=A,E=A);return e&&T.forEach(function(j){return t(g,j)}),Bt&&il(g,P),C}function v(g,w,_,b){var C=wf(_);if(typeof C!="function")throw Error(re(150));if(_=C.call(_),_==null)throw Error(re(151));for(var E=C=null,T=w,P=w=0,A=null,M=_.next();T!==null&&!M.done;P++,M=_.next()){T.index>P?(A=T,T=null):A=T.sibling;var j=f(g,T,M.value,b);if(j===null){T===null&&(T=A);break}e&&T&&j.alternate===null&&t(g,T),w=i(j,w,P),E===null?C=j:E.sibling=j,E=j,T=A}if(M.done)return n(g,T),Bt&&il(g,P),C;if(T===null){for(;!M.done;P++,M=_.next())M=d(g,M.value,b),M!==null&&(w=i(M,w,P),E===null?C=M:E.sibling=M,E=M);return Bt&&il(g,P),C}for(T=r(g,T);!M.done;P++,M=_.next())M=h(T,g,P,M.value,b),M!==null&&(e&&M.alternate!==null&&T.delete(M.key===null?P:M.key),w=i(M,w,P),E===null?C=M:E.sibling=M,E=M);return e&&T.forEach(function(H){return t(g,H)}),Bt&&il(g,P),C}function y(g,w,_,b){if(typeof _=="object"&&_!==null&&_.type===Lu&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case om:e:{for(var C=_.key,E=w;E!==null;){if(E.key===C){if(C=_.type,C===Lu){if(E.tag===7){n(g,E.sibling),w=a(E,_.props.children),w.return=g,g=w;break e}}else if(E.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===$o&&MC(C)===E.type){n(g,E.sibling),w=a(E,_.props),w.ref=xf(g,E,_),w.return=g,g=w;break e}n(g,E);break}else t(g,E);E=E.sibling}_.type===Lu?(w=_l(_.props.children,g.mode,b,_.key),w.return=g,g=w):(b=dv(_.type,_.key,_.props,null,g.mode,b),b.ref=xf(g,w,_),b.return=g,g=b)}return o(g);case $u:e:{for(E=_.key;w!==null;){if(w.key===E)if(w.tag===4&&w.stateNode.containerInfo===_.containerInfo&&w.stateNode.implementation===_.implementation){n(g,w.sibling),w=a(w,_.children||[]),w.return=g,g=w;break e}else{n(g,w);break}else t(g,w);w=w.sibling}w=pw(_,g.mode,b),w.return=g,g=w}return o(g);case $o:return E=_._init,y(g,w,E(_._payload),b)}if(Yf(_))return p(g,w,_,b);if(wf(_))return v(g,w,_,b);gm(g,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,w!==null&&w.tag===6?(n(g,w.sibling),w=a(w,_),w.return=g,g=w):(n(g,w),w=hw(_,g.mode,b),w.return=g,g=w),o(g)):n(g,w)}return y}var xc=WN(!0),YN=WN(!1),xp={},wi=zs(xp),$h=zs(xp),Lh=zs(xp);function pl(e){if(e===xp)throw Error(re(174));return e}function _S(e,t){switch(Ot(Lh,t),Ot($h,e),Ot(wi,xp),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ob(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ob(t,e)}Lt(wi),Ot(wi,t)}function Cc(){Lt(wi),Lt($h),Lt(Lh)}function GN(e){pl(Lh.current);var t=pl(wi.current),n=Ob(t,e.type);t!==n&&(Ot($h,e),Ot(wi,n))}function SS(e){$h.current===e&&(Lt(wi),Lt($h))}var qt=zs(0);function Gv(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 sw=[];function ES(){for(var e=0;en?n:4,e(!0);var r=lw.transition;lw.transition={};try{e(!1),t()}finally{gt=n,lw.transition=r}}function uA(){return ma().memoizedState}function b3(e,t,n){var r=as(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},cA(e))dA(t,n);else if(n=zN(e,t,n,r),n!==null){var a=lr();Va(n,e,r,a),fA(n,t,r)}}function _3(e,t,n){var r=as(e),a={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(cA(e))dA(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,s=i(o,n);if(a.hasEagerState=!0,a.eagerState=s,Ga(s,o)){var l=t.interleaved;l===null?(a.next=a,wS(t)):(a.next=l.next,l.next=a),t.interleaved=a;return}}catch{}finally{}n=zN(e,t,a,r),n!==null&&(a=lr(),Va(n,e,r,a),fA(n,t,r))}}function cA(e){var t=e.alternate;return e===Xt||t!==null&&t===Xt}function dA(e,t){oh=Kv=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function fA(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,iS(e,n)}}var qv={readContext:pa,useCallback:Wn,useContext:Wn,useEffect:Wn,useImperativeHandle:Wn,useInsertionEffect:Wn,useLayoutEffect:Wn,useMemo:Wn,useReducer:Wn,useRef:Wn,useState:Wn,useDebugValue:Wn,useDeferredValue:Wn,useTransition:Wn,useMutableSource:Wn,useSyncExternalStore:Wn,useId:Wn,unstable_isNewReconciler:!1},S3={readContext:pa,useCallback:function(e,t){return ci().memoizedState=[e,t===void 0?null:t],e},useContext:pa,useEffect:IC,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,sv(4194308,4,aA.bind(null,t,e),n)},useLayoutEffect:function(e,t){return sv(4194308,4,e,t)},useInsertionEffect:function(e,t){return sv(4,2,e,t)},useMemo:function(e,t){var n=ci();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ci();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=b3.bind(null,Xt,e),[r.memoizedState,e]},useRef:function(e){var t=ci();return e={current:e},t.memoizedState=e},useState:RC,useDebugValue:OS,useDeferredValue:function(e){return ci().memoizedState=e},useTransition:function(){var e=RC(!1),t=e[0];return e=w3.bind(null,e[1]),ci().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Xt,a=ci();if(Bt){if(n===void 0)throw Error(re(407));n=n()}else{if(n=t(),Nn===null)throw Error(re(349));Ml&30||QN(r,t,n)}a.memoizedState=n;var i={value:n,getSnapshot:t};return a.queue=i,IC(ZN.bind(null,r,i,e),[e]),r.flags|=2048,Uh(9,XN.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=ci(),t=Nn.identifierPrefix;if(Bt){var n=qi,r=Ki;n=(r&~(1<<32-Ba(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Fh++,0<\/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[fi]=t,e[Ih]=r,_A(e,t,!1,!1),t.stateNode=e;e:{switch(o=Pb(n,r),n){case"dialog":Mt("cancel",e),Mt("close",e),a=r;break;case"iframe":case"object":case"embed":Mt("load",e),a=r;break;case"video":case"audio":for(a=0;aDc&&(t.flags|=128,r=!0,Cf(i,!1),t.lanes=4194304)}else{if(!r)if(e=Gv(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Cf(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!Bt)return Yn(t),null}else 2*un()-i.renderingStartTime>Dc&&n!==1073741824&&(t.flags|=128,r=!0,Cf(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=un(),t.sibling=null,n=qt.current,Ot(qt,r?n&1|2:n&1),t):(Yn(t),null);case 22:case 23:return RS(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ir&1073741824&&(Yn(t),t.subtreeFlags&6&&(t.flags|=8192)):Yn(t),null;case 24:return null;case 25:return null}throw Error(re(156,t.tag))}function P3(e,t){switch(pS(t),t.tag){case 1:return xr(t.type)&&Uv(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Cc(),Lt(Er),Lt(Zn),ES(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return SS(t),null;case 13:if(Lt(qt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(re(340));Ec()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Lt(qt),null;case 4:return Cc(),null;case 10:return yS(t.type._context),null;case 22:case 23:return RS(),null;case 24:return null;default:return null}}var wm=!1,Gn=!1,N3=typeof WeakSet=="function"?WeakSet:Set,Se=null;function Yu(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){nn(e,t,r)}else n.current=null}function r1(e,t,n){try{n()}catch(r){nn(e,t,r)}}var VC=!1;function A3(e,t){if(Ub=$v,e=DN(),fS(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 a=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,s=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var h;d!==n||a!==0&&d.nodeType!==3||(s=o+a),d!==i||r!==0&&d.nodeType!==3||(l=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===e)break t;if(f===n&&++u===a&&(s=o),f===i&&++c===r&&(l=o),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(zb={focusedElem:e,selectionRange:n},$v=!1,Se=t;Se!==null;)if(t=Se,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Se=e;else for(;Se!==null;){t=Se;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,y=p.memoizedState,g=t.stateNode,w=g.getSnapshotBeforeUpdate(t.elementType===t.type?v:Pa(t.type,v),y);g.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var _=t.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(re(163))}}catch(b){nn(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,Se=e;break}Se=t.return}return p=VC,VC=!1,p}function sh(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var a=r=r.next;do{if((a.tag&e)===e){var i=a.destroy;a.destroy=void 0,i!==void 0&&r1(t,n,i)}a=a.next}while(a!==r)}}function ay(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 a1(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 xA(e){var t=e.alternate;t!==null&&(e.alternate=null,xA(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[fi],delete t[Ih],delete t[Vb],delete t[p3],delete t[m3])),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 CA(e){return e.tag===5||e.tag===3||e.tag===4}function WC(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||CA(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 i1(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=jv));else if(r!==4&&(e=e.child,e!==null))for(i1(e,t,n),e=e.sibling;e!==null;)i1(e,t,n),e=e.sibling}function o1(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(o1(e,t,n),e=e.sibling;e!==null;)o1(e,t,n),e=e.sibling}var Un=null,Na=!1;function Po(e,t,n){for(n=n.child;n!==null;)TA(e,t,n),n=n.sibling}function TA(e,t,n){if(yi&&typeof yi.onCommitFiberUnmount=="function")try{yi.onCommitFiberUnmount(Qg,n)}catch{}switch(n.tag){case 5:Gn||Yu(n,t);case 6:var r=Un,a=Na;Un=null,Po(e,t,n),Un=r,Na=a,Un!==null&&(Na?(e=Un,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Un.removeChild(n.stateNode));break;case 18:Un!==null&&(Na?(e=Un,n=n.stateNode,e.nodeType===8?iw(e.parentNode,n):e.nodeType===1&&iw(e,n),Ph(e)):iw(Un,n.stateNode));break;case 4:r=Un,a=Na,Un=n.stateNode.containerInfo,Na=!0,Po(e,t,n),Un=r,Na=a;break;case 0:case 11:case 14:case 15:if(!Gn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){a=r=r.next;do{var i=a,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&r1(n,t,o),a=a.next}while(a!==r)}Po(e,t,n);break;case 1:if(!Gn&&(Yu(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){nn(n,t,s)}Po(e,t,n);break;case 21:Po(e,t,n);break;case 22:n.mode&1?(Gn=(r=Gn)||n.memoizedState!==null,Po(e,t,n),Gn=r):Po(e,t,n);break;default:Po(e,t,n)}}function YC(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new N3),t.forEach(function(r){var a=z3.bind(null,e,r);n.has(r)||(n.add(r),r.then(a,a))})}}function Ca(e,t){var n=t.deletions;if(n!==null)for(var r=0;ra&&(a=o),r&=~i}if(r=a,r=un()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*R3(r/1960))-r,10e?16:e,Wo===null)var r=!1;else{if(e=Wo,Wo=null,Zv=0,nt&6)throw Error(re(331));var a=nt;for(nt|=4,Se=e.current;Se!==null;){var i=Se,o=i.child;if(Se.flags&16){var s=i.deletions;if(s!==null){for(var l=0;lun()-AS?bl(e,0):NS|=n),Cr(e,t)}function RA(e,t){t===0&&(e.mode&1?(t=cm,cm<<=1,!(cm&130023424)&&(cm=4194304)):t=1);var n=lr();e=ao(e,t),e!==null&&(_p(e,t,n),Cr(e,n))}function U3(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),RA(e,n)}function z3(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(re(314))}r!==null&&r.delete(t),RA(e,n)}var IA;IA=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Er.current)_r=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return _r=!1,O3(e,t,n);_r=!!(e.flags&131072)}else _r=!1,Bt&&t.flags&1048576&&FN(t,Bv,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;lv(e,t),e=t.pendingProps;var a=Sc(t,Zn.current);dc(t,n),a=CS(null,t,r,e,a,n);var i=TS();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,xr(r)?(i=!0,zv(t)):i=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,bS(t),a.updater=ny,t.stateNode=a,a._reactInternals=t,Qb(t,r,e,n),t=Jb(null,t,r,!0,i,n)):(t.tag=0,Bt&&i&&hS(t),tr(null,t,a,n),t=t.child),t;case 16:r=t.elementType;e:{switch(lv(e,t),e=t.pendingProps,a=r._init,r=a(r._payload),t.type=r,a=t.tag=B3(r),e=Pa(r,e),a){case 0:t=Zb(null,t,r,e,n);break e;case 1:t=zC(null,t,r,e,n);break e;case 11:t=jC(null,t,r,e,n);break e;case 14:t=UC(null,t,r,Pa(r.type,e),n);break e}throw Error(re(306,r,""))}return t;case 0:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:Pa(r,a),Zb(e,t,r,a,n);case 1:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:Pa(r,a),zC(e,t,r,a,n);case 3:e:{if(yA(t),e===null)throw Error(re(387));r=t.pendingProps,i=t.memoizedState,a=i.element,HN(e,t),Yv(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){a=Tc(Error(re(423)),t),t=HC(e,t,r,n,a);break e}else if(r!==a){a=Tc(Error(re(424)),t),t=HC(e,t,r,n,a);break e}else for(Lr=ts(t.stateNode.containerInfo.firstChild),zr=t,Bt=!0,Ma=null,n=YN(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ec(),r===a){t=io(e,t,n);break e}tr(e,t,r,n)}t=t.child}return t;case 5:return GN(t),e===null&&Gb(t),r=t.type,a=t.pendingProps,i=e!==null?e.memoizedProps:null,o=a.children,Hb(r,a)?o=null:i!==null&&Hb(r,i)&&(t.flags|=32),gA(e,t),tr(e,t,o,n),t.child;case 6:return e===null&&Gb(t),null;case 13:return wA(e,t,n);case 4:return _S(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=xc(t,null,r,n):tr(e,t,r,n),t.child;case 11:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:Pa(r,a),jC(e,t,r,a,n);case 7:return tr(e,t,t.pendingProps,n),t.child;case 8:return tr(e,t,t.pendingProps.children,n),t.child;case 12:return tr(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,a=t.pendingProps,i=t.memoizedProps,o=a.value,Ot(Vv,r._currentValue),r._currentValue=o,i!==null)if(Ga(i.value,o)){if(i.children===a.children&&!Er.current){t=io(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){o=i.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=Xi(-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),Kb(i.return,n,t),s.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(re(341));o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),Kb(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}tr(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,r=t.pendingProps.children,dc(t,n),a=pa(a),r=r(a),t.flags|=1,tr(e,t,r,n),t.child;case 14:return r=t.type,a=Pa(r,t.pendingProps),a=Pa(r.type,a),UC(e,t,r,a,n);case 15:return mA(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:Pa(r,a),lv(e,t),t.tag=1,xr(r)?(e=!0,zv(t)):e=!1,dc(t,n),VN(t,r,a),Qb(t,r,a,n),Jb(null,t,r,!0,e,n);case 19:return bA(e,t,n);case 22:return vA(e,t,n)}throw Error(re(156,t.tag))};function $A(e,t){return lN(e,t)}function H3(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 oa(e,t,n,r){return new H3(e,t,n,r)}function $S(e){return e=e.prototype,!(!e||!e.isReactComponent)}function B3(e){if(typeof e=="function")return $S(e)?1:0;if(e!=null){if(e=e.$$typeof,e===tS)return 11;if(e===nS)return 14}return 2}function is(e,t){var n=e.alternate;return n===null?(n=oa(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 dv(e,t,n,r,a,i){var o=2;if(r=e,typeof e=="function")$S(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Lu:return _l(n.children,a,i,t);case eS:o=8,a|=8;break;case bb:return e=oa(12,n,t,a|2),e.elementType=bb,e.lanes=i,e;case _b:return e=oa(13,n,t,a),e.elementType=_b,e.lanes=i,e;case Sb:return e=oa(19,n,t,a),e.elementType=Sb,e.lanes=i,e;case WP:return oy(n,a,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case BP:o=10;break e;case VP:o=9;break e;case tS:o=11;break e;case nS:o=14;break e;case $o:o=16,r=null;break e}throw Error(re(130,e==null?e:typeof e,""))}return t=oa(o,n,t,a),t.elementType=e,t.type=r,t.lanes=i,t}function _l(e,t,n,r){return e=oa(7,e,r,t),e.lanes=n,e}function oy(e,t,n,r){return e=oa(22,e,r,t),e.elementType=WP,e.lanes=n,e.stateNode={isHidden:!1},e}function hw(e,t,n){return e=oa(6,e,null,t),e.lanes=n,e}function pw(e,t,n){return t=oa(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function V3(e,t,n,r,a){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=K0(0),this.expirationTimes=K0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=K0(0),this.identifierPrefix=r,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function LS(e,t,n,r,a,i,o,s,l){return e=new V3(e,t,n,s,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=oa(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},bS(i),e}function W3(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(UA)}catch(e){console.error(e)}}UA(),FP.exports=Gr;var Qd=FP.exports;const Q3=Nr(Qd);var eT=Qd;yb.createRoot=eT.createRoot,yb.hydrateRoot=eT.hydrateRoot;function lt(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;re.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function r4(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function a4(e){var t=r4(e,"string");return typeof t=="symbol"?t:String(t)}var mi=Symbol("mobx-stored-annotations");function _i(e){function t(n,r){Dp(n,r,e)}return Object.assign(t,e)}function Dp(e,t,n){Zi(e,mi)||Cp(e,mi,kc({},e[mi])),h4(n)||(e[mi][t]=n)}function i4(e){return Zi(e,mi)||Cp(e,mi,kc({},e[mi])),e[mi]}var Ie=Symbol("mobx administration"),Op=function(){function e(n){n===void 0&&(n="Atom"),this.name_=void 0,this.isPendingUnobservation_=!1,this.isBeingObserved_=!1,this.observers_=new Set,this.batchId_=void 0,this.diffValue_=0,this.lastAccessedBy_=0,this.lowestObserverState_=it.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=n,this.batchId_=ie.inBatch?ie.batchId:NaN}var t=e.prototype;return t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(r){return r()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(r){return r()})},t.reportObserved=function(){return mM(this)},t.reportChanged=function(){(!ie.inBatch||this.batchId_!==ie.batchId)&&(ie.stateVersion=ie.stateVersionr&&(r=s.dependenciesState_)}for(n.length=a,e.newObserving_=null,i=t.length;i--;){var l=t[i];l.diffValue_===0&&hM(l,e),l.diffValue_=0}for(;a--;){var u=n[a];u.diffValue_===1&&(u.diffValue_=0,q4(u,e))}r!==it.UP_TO_DATE_&&(e.dependenciesState_=r,e.onBecomeStale_())}function p1(e){var t=e.observing_;e.observing_=[];for(var n=t.length;n--;)hM(t[n],e);e.dependenciesState_=it.NOT_TRACKING_}function cM(e){var t=cu();try{return e()}finally{Ji(t)}}function cu(){var e=ie.trackingDerivation;return ie.trackingDerivation=null,e}function Ji(e){ie.trackingDerivation=e}function YS(e){var t=ie.allowStateReads;return ie.allowStateReads=e,t}function ch(e){ie.allowStateReads=e}function dM(e){if(e.dependenciesState_!==it.UP_TO_DATE_){e.dependenciesState_=it.UP_TO_DATE_;for(var t=e.observing_,n=t.length;n--;)t[n].lowestObserverState_=it.UP_TO_DATE_}}var hv=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.batchId=Number.MIN_SAFE_INTEGER,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0,this.stateVersion=Number.MIN_SAFE_INTEGER},pv=!0,fM=!1,ie=function(){var e=zS();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(pv=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==new hv().version&&(pv=!1),pv?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new hv):(setTimeout(function(){fM||lt(35)},1),new hv)}();function K4(){if((ie.pendingReactions.length||ie.inBatch||ie.isRunningReactions)&<(36),fM=!0,pv){var e=zS();--e.__mobxInstanceCount===0&&(e.__mobxGlobals=void 0),ie=new hv}}function q4(e,t){e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function hM(e,t){e.observers_.delete(t),e.observers_.size===0&&pM(e)}function pM(e){e.isPendingUnobservation_===!1&&(e.isPendingUnobservation_=!0,ie.pendingUnobservations.push(e))}function sa(){ie.inBatch===0&&(ie.batchId=ie.batchId0&&pM(e),!1)}function vM(e){e.lowestObserverState_!==it.STALE_&&(e.lowestObserverState_=it.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===it.UP_TO_DATE_&&t.onBecomeStale_(),t.dependenciesState_=it.STALE_}))}function Q4(e){e.lowestObserverState_!==it.STALE_&&(e.lowestObserverState_=it.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===it.POSSIBLY_STALE_?t.dependenciesState_=it.STALE_:t.dependenciesState_===it.UP_TO_DATE_&&(e.lowestObserverState_=it.UP_TO_DATE_)}))}function X4(e){e.lowestObserverState_===it.UP_TO_DATE_&&(e.lowestObserverState_=it.POSSIBLY_STALE_,e.observers_.forEach(function(t){t.dependenciesState_===it.UP_TO_DATE_&&(t.dependenciesState_=it.POSSIBLY_STALE_,t.onBecomeStale_())}))}var Bh=function(){function e(n,r,a,i){n===void 0&&(n="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=it.NOT_TRACKING_,this.diffValue_=0,this.runId_=0,this.unboundDepsCount_=0,this.isDisposed_=!1,this.isScheduled_=!1,this.isTrackPending_=!1,this.isRunning_=!1,this.isTracing_=rg.NONE,this.name_=n,this.onInvalidate_=r,this.errorHandler_=a,this.requiresObservable_=i}var t=e.prototype;return t.onBecomeStale_=function(){this.schedule_()},t.schedule_=function(){this.isScheduled_||(this.isScheduled_=!0,ie.pendingReactions.push(this),gM())},t.isScheduled=function(){return this.isScheduled_},t.runReaction_=function(){if(!this.isDisposed_){sa(),this.isScheduled_=!1;var r=ie.trackingContext;if(ie.trackingContext=this,h1(this)){this.isTrackPending_=!0;try{this.onInvalidate_()}catch(a){this.reportExceptionInDerivation_(a)}}ie.trackingContext=r,la()}},t.track=function(r){if(!this.isDisposed_){sa(),this.isRunning_=!0;var a=ie.trackingContext;ie.trackingContext=this;var i=uM(this,r,void 0);ie.trackingContext=a,this.isRunning_=!1,this.isTrackPending_=!1,this.isDisposed_&&p1(this),fv(i)&&this.reportExceptionInDerivation_(i.cause),la()}},t.reportExceptionInDerivation_=function(r){var a=this;if(this.errorHandler_){this.errorHandler_(r,this);return}if(ie.disableErrorBoundaries)throw r;var i="[mobx] uncaught error in '"+this+"'";ie.suppressReactionErrors||console.error(i,r),ie.globalReactionErrorHandlers.forEach(function(o){return o(r,a)})},t.dispose=function(){this.isDisposed_||(this.isDisposed_=!0,this.isRunning_||(sa(),p1(this),la()))},t.getDisposer_=function(r){var a=this,i=function o(){a.dispose(),r==null||r.removeEventListener==null||r.removeEventListener("abort",o)};return r==null||r.addEventListener==null||r.addEventListener("abort",i),i[Ie]=this,i},t.toString=function(){return"Reaction["+this.name_+"]"},t.trace=function(r){},e}(),Z4=100,m1=function(t){return t()};function gM(){ie.inBatch>0||ie.isRunningReactions||m1(J4)}function J4(){ie.isRunningReactions=!0;for(var e=ie.pendingReactions,t=0;e.length>0;){++t===Z4&&(console.error("[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var n=e.splice(0),r=0,a=n.length;r0&&(t.dependencies=vz(e.observing_).map(OM)),t}function vz(e){return Array.from(new Set(e))}var gz=0;function kM(){this.message="FLOW_CANCELLED"}kM.prototype=Object.create(Error.prototype);var oT=XA("flow"),yz=XA("flow.bound",{bound:!0}),Wh=Object.assign(function(t,n){if($l(n))return Dp(t,n,oT);var r=t,a=r.name||"",i=function(){var s=this,l=arguments,u=++gz,c=ml(a+" - runid: "+u+" - init",r).apply(s,l),d,f=void 0,h=new Promise(function(p,v){var y=0;d=v;function g(b){f=void 0;var C;try{C=ml(a+" - runid: "+u+" - yield "+y++,c.next).call(c,b)}catch(E){return v(E)}_(C)}function w(b){f=void 0;var C;try{C=ml(a+" - runid: "+u+" - yield "+y++,c.throw).call(c,b)}catch(E){return v(E)}_(C)}function _(b){if(Ka(b==null?void 0:b.then)){b.then(_,v);return}return b.done?p(b.value):(f=Promise.resolve(b.value),f.then(g,w))}g(void 0)});return h.cancel=ml(a+" - runid: "+u+" - cancel",function(){try{f&&sT(f);var p=c.return(void 0),v=Promise.resolve(p.value);v.then(Ku,Ku),sT(v),d(new kM)}catch(y){d(y)}}),h};return i.isMobXFlow=!0,i},oT);Wh.bound=_i(yz);function sT(e){Ka(e.cancel)&&e.cancel()}function og(e){return(e==null?void 0:e.isMobXFlow)===!0}function wz(e,t){return e?t!==void 0?Yh(e)?e[Ie].values_.has(t):!1:Yh(e)||!!e[Ie]||VS(e)||ig(e)||yy(e):!1}function PM(e){return wz(e)}function Yi(e,t){t===void 0&&(t=void 0),sa();try{return e.apply(t)}finally{la()}}function Tu(e){return e[Ie]}var bz={has:function(t,n){return Tu(t).has_(n)},get:function(t,n){return Tu(t).get_(n)},set:function(t,n,r){var a;return $l(n)?(a=Tu(t).set_(n,r,!0))!=null?a:!0:!1},deleteProperty:function(t,n){var r;return $l(n)?(r=Tu(t).delete_(n,!0))!=null?r:!0:!1},defineProperty:function(t,n,r){var a;return(a=Tu(t).defineProperty_(n,r))!=null?a:!0},ownKeys:function(t){return Tu(t).ownKeys_()},preventExtensions:function(t){lt(13)}};function _z(e,t){var n,r;return HA(),e=Ap(e,t),(r=(n=e[Ie]).proxy_)!=null?r:n.proxy_=new Proxy(e,bz)}function aa(e){return e.interceptors_!==void 0&&e.interceptors_.length>0}function Pp(e,t){var n=e.interceptors_||(e.interceptors_=[]);return n.push(t),BA(function(){var r=n.indexOf(t);r!==-1&&n.splice(r,1)})}function ia(e,t){var n=cu();try{for(var r=[].concat(e.interceptors_||[]),a=0,i=r.length;a0}function Np(e,t){var n=e.changeListeners_||(e.changeListeners_=[]);return n.push(t),BA(function(){var r=n.indexOf(t);r!==-1&&n.splice(r,1)})}function Ya(e,t){var n=cu(),r=e.changeListeners_;if(r){r=r.slice();for(var a=0,i=r.length;a0?r.map(this.dehancer):r},t.intercept_=function(r){return Pp(this,r)},t.observe_=function(r,a){return a===void 0&&(a=!1),a&&r({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),Np(this,r)},t.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},t.setArrayLength_=function(r){(typeof r!="number"||isNaN(r)||r<0)&<("Out of range: "+r);var a=this.values_.length;if(r!==a)if(r>a){for(var i=new Array(r-a),o=0;o0&&zM(r+a+1)},t.spliceWithArray_=function(r,a,i){var o=this;this.atom_;var s=this.values_.length;if(r===void 0?r=0:r>s?r=s:r<0&&(r=Math.max(0,s+r)),arguments.length===1?a=s-r:a==null?a=0:a=Math.max(0,Math.min(a,s-r)),i===void 0&&(i=d1),aa(this)){var l=ia(this,{object:this.proxy_,type:lT,index:r,removedCount:a,added:i});if(!l)return d1;a=l.removedCount,i=l.added}if(i=i.length===0?i:i.map(function(d){return o.enhancer_(d,void 0)}),this.legacyMode_){var u=i.length-a;this.updateArrayLength_(s,u)}var c=this.spliceItemsIntoValues_(r,a,i);return(a!==0||i.length!==0)&&this.notifyArraySplice_(r,i,c),this.dehanceValues_(c)},t.spliceItemsIntoValues_=function(r,a,i){if(i.length=this.values_.length){console.warn("[mobx] Out of bounds read: "+r);return}return this.atom_.reportObserved(),this.dehanceValue_(this.values_[r])},t.set_=function(r,a){var i=this.values_;if(this.legacyMode_&&r>i.length&<(17,r,i.length),r2?r-2:0),i=2;i-1?(this.splice(r,1),!0):!1}};En("concat",wo);En("flat",wo);En("includes",wo);En("indexOf",wo);En("join",wo);En("lastIndexOf",wo);En("slice",wo);En("toString",wo);En("toLocaleString",wo);En("every",Bs);En("filter",Bs);En("find",Bs);En("findIndex",Bs);En("flatMap",Bs);En("forEach",Bs);En("map",Bs);En("some",Bs);En("reduce",NM);En("reduceRight",NM);function En(e,t){typeof Array.prototype[e]=="function"&&(sg[e]=t(e))}function wo(e){return function(){var t=this[Ie];t.atom_.reportObserved();var n=t.dehanceValues_(t.values_);return n[e].apply(n,arguments)}}function Bs(e){return function(t,n){var r=this,a=this[Ie];a.atom_.reportObserved();var i=a.dehanceValues_(a.values_);return i[e](function(o,s){return t.call(n,o,s,r)})}}function NM(e){return function(){var t=this,n=this[Ie];n.atom_.reportObserved();var r=n.dehanceValues_(n.values_),a=arguments[0];return arguments[0]=function(i,o,s){return a(i,o,s,t)},r[e].apply(r,arguments)}}var Tz=uu("ObservableArrayAdministration",qS);function wy(e){return fy(e)&&Tz(e[Ie])}var AM,MM,Dz={},Yo="add",lg="delete";AM=Symbol.iterator;MM=Symbol.toStringTag;var RM=function(){function e(n,r,a){var i=this;r===void 0&&(r=Nc),a===void 0&&(a="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[Ie]=Dz,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=r,this.name_=a,Ka(Map)||lt(18),Vs(function(){i.keysAtom_=qA("ObservableMap.keys()"),i.data_=new Map,i.hasMap_=new Map,n&&i.merge(n)})}var t=e.prototype;return t.has_=function(r){return this.data_.has(r)},t.has=function(r){var a=this;if(!ie.trackingDerivation)return this.has_(r);var i=this.hasMap_.get(r);if(!i){var o=i=new hc(this.has_(r),hy,"ObservableMap.key?",!1);this.hasMap_.set(r,o),CM(o,function(){return a.hasMap_.delete(r)})}return i.get()},t.set=function(r,a){var i=this.has_(r);if(aa(this)){var o=ia(this,{type:i?Si:Yo,object:this,newValue:a,name:r});if(!o)return this;a=o.newValue}return i?this.updateValue_(r,a):this.addValue_(r,a),this},t.delete=function(r){var a=this;if(this.keysAtom_,aa(this)){var i=ia(this,{type:lg,object:this,name:r});if(!i)return!1}if(this.has_(r)){var o=dh(),s=Wa(this),l=s||o?{observableKind:"map",debugObjectName:this.name_,type:lg,object:this,oldValue:this.data_.get(r).value_,name:r}:null;return Yi(function(){var u;a.keysAtom_.reportChanged(),(u=a.hasMap_.get(r))==null||u.setNewValue_(!1);var c=a.data_.get(r);c.setNewValue_(void 0),a.data_.delete(r)}),s&&Ya(this,l),!0}return!1},t.updateValue_=function(r,a){var i=this.data_.get(r);if(a=i.prepareNewValue_(a),a!==ie.UNCHANGED){var o=dh(),s=Wa(this),l=s||o?{observableKind:"map",debugObjectName:this.name_,type:Si,object:this,oldValue:i.value_,name:r,newValue:a}:null;i.setNewValue_(a),s&&Ya(this,l)}},t.addValue_=function(r,a){var i=this;this.keysAtom_,Yi(function(){var u,c=new hc(a,i.enhancer_,"ObservableMap.key",!1);i.data_.set(r,c),a=c.value_,(u=i.hasMap_.get(r))==null||u.setNewValue_(!0),i.keysAtom_.reportChanged()});var o=dh(),s=Wa(this),l=s||o?{observableKind:"map",debugObjectName:this.name_,type:Yo,object:this,name:r,newValue:a}:null;s&&Ya(this,l)},t.get=function(r){return this.has(r)?this.dehanceValue_(this.data_.get(r).get()):this.dehanceValue_(void 0)},t.dehanceValue_=function(r){return this.dehancer!==void 0?this.dehancer(r):r},t.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},t.values=function(){var r=this,a=this.keys();return Gh({next:function(){var o=a.next(),s=o.done,l=o.value;return{done:s,value:s?void 0:r.get(l)}}})},t.entries=function(){var r=this,a=this.keys();return Gh({next:function(){var o=a.next(),s=o.done,l=o.value;return{done:s,value:s?void 0:[l,r.get(l)]}}})},t[AM]=function(){return this.entries()},t.forEach=function(r,a){for(var i=qu(this),o;!(o=i()).done;){var s=o.value,l=s[0],u=s[1];r.call(a,u,l,this)}},t.merge=function(r){var a=this;return du(r)&&(r=new Map(r)),Yi(function(){oo(r)?e4(r).forEach(function(i){return a.set(i,r[i])}):Array.isArray(r)?r.forEach(function(i){var o=i[0],s=i[1];return a.set(o,s)}):Xd(r)?(r.constructor!==Map&<(19,r),r.forEach(function(i,o){return a.set(o,i)})):r!=null&<(20,r)}),this},t.clear=function(){var r=this;Yi(function(){cM(function(){for(var a=qu(r.keys()),i;!(i=a()).done;){var o=i.value;r.delete(o)}})})},t.replace=function(r){var a=this;return Yi(function(){for(var i=Oz(r),o=new Map,s=!1,l=qu(a.data_.keys()),u;!(u=l()).done;){var c=u.value;if(!i.has(c)){var d=a.delete(c);if(d)s=!0;else{var f=a.data_.get(c);o.set(c,f)}}}for(var h=qu(i.entries()),p;!(p=h()).done;){var v=p.value,y=v[0],g=v[1],w=a.data_.has(y);if(a.set(y,g),a.data_.has(y)){var _=a.data_.get(y);o.set(y,_),w||(s=!0)}}if(!s)if(a.data_.size!==o.size)a.keysAtom_.reportChanged();else for(var b=a.data_.keys(),C=o.keys(),E=b.next(),T=C.next();!E.done;){if(E.value!==T.value){a.keysAtom_.reportChanged();break}E=b.next(),T=C.next()}a.data_=o}),this},t.toString=function(){return"[object ObservableMap]"},t.toJSON=function(){return Array.from(this)},t.observe_=function(r,a){return Np(this,r)},t.intercept_=function(r){return Pp(this,r)},BS(e,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:MM,get:function(){return"Map"}}]),e}(),du=uu("ObservableMap",RM);function Oz(e){if(Xd(e)||du(e))return e;if(Array.isArray(e))return new Map(e);if(oo(e)){var t=new Map;for(var n in e)t.set(n,e[n]);return t}else return lt(21,e)}var IM,$M,kz={};IM=Symbol.iterator;$M=Symbol.toStringTag;var LM=function(){function e(n,r,a){var i=this;r===void 0&&(r=Nc),a===void 0&&(a="ObservableSet"),this.name_=void 0,this[Ie]=kz,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=a,Ka(Set)||lt(22),this.enhancer_=function(o,s){return r(o,s,a)},Vs(function(){i.atom_=qA(i.name_),n&&i.replace(n)})}var t=e.prototype;return t.dehanceValue_=function(r){return this.dehancer!==void 0?this.dehancer(r):r},t.clear=function(){var r=this;Yi(function(){cM(function(){for(var a=qu(r.data_.values()),i;!(i=a()).done;){var o=i.value;r.delete(o)}})})},t.forEach=function(r,a){for(var i=qu(this),o;!(o=i()).done;){var s=o.value;r.call(a,s,s,this)}},t.add=function(r){var a=this;if(this.atom_,aa(this)){var i=ia(this,{type:Yo,object:this,newValue:r});if(!i)return this}if(!this.has(r)){Yi(function(){a.data_.add(a.enhancer_(r,void 0)),a.atom_.reportChanged()});var o=!1,s=Wa(this),l=s||o?{observableKind:"set",debugObjectName:this.name_,type:Yo,object:this,newValue:r}:null;s&&Ya(this,l)}return this},t.delete=function(r){var a=this;if(aa(this)){var i=ia(this,{type:lg,object:this,oldValue:r});if(!i)return!1}if(this.has(r)){var o=!1,s=Wa(this),l=s||o?{observableKind:"set",debugObjectName:this.name_,type:lg,object:this,oldValue:r}:null;return Yi(function(){a.atom_.reportChanged(),a.data_.delete(r)}),s&&Ya(this,l),!0}return!1},t.has=function(r){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(r))},t.entries=function(){var r=0,a=Array.from(this.keys()),i=Array.from(this.values());return Gh({next:function(){var s=r;return r+=1,sgw){for(var t=gw;t=0&&n++;break}e=pT(e),t=pT(t);var s=o==="[object Array]";if(!s){if(typeof e!="object"||typeof t!="object")return!1;var l=e.constructor,u=t.constructor;if(l!==u&&!(Ka(l)&&l instanceof l&&Ka(u)&&u instanceof u)&&"constructor"in e&&"constructor"in t)return!1}if(n===0)return!1;n<0&&(n=-1),r=r||[],a=a||[];for(var c=r.length;c--;)if(r[c]===e)return a[c]===t;if(r.push(e),a.push(t),s){if(c=e.length,c!==t.length)return!1;for(;c--;)if(!g1(e[c],t[c],n-1,r,a))return!1}else{var d=Object.keys(e),f;if(c=d.length,Object.keys(t).length!==c)return!1;for(;c--;)if(f=d[c],!(Zi(t,f)&&g1(e[f],t[f],n-1,r,a)))return!1}return r.pop(),a.pop(),!0}function pT(e){return wy(e)?e.slice():Xd(e)||du(e)||Tp(e)||Jd(e)?Array.from(e.entries()):e}function Gh(e){return e[Symbol.iterator]=$z,e}function $z(){return this}["Symbol","Map","Set"].forEach(function(e){var t=zS();typeof t[e]>"u"&<("MobX requires global '"+e+"' to be available or polyfilled")});typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:tz,extras:{getDebugName:v1},$mobx:Ie});class Lz{constructor(t){te(this,"id","");te(this,"title","");te(this,"description","");te(this,"category","");te(this,"date",null);te(this,"city","");te(this,"venue","");te(this,"hostUsername","");te(this,"isCancelled",!1);te(this,"attendees",[]);te(this,"isGoing",!1);te(this,"isHost",!1);te(this,"host");t&&(this.id=t.id,this.title=t.title,this.date=t.date,this.description=t==null?void 0:t.description,this.category=t==null?void 0:t.category,this.venue=t==null?void 0:t.venue,this.city=t.city)}}class mT{constructor(t){te(this,"id");te(this,"title","");te(this,"category","");te(this,"description","");te(this,"date",null);te(this,"city","");te(this,"venue","");t&&(this.id=t.id,this.title=t.title,this.category=t.category,this.description=t.description,this.date=t.date,this.venue=t.venue,this.city=t.city)}}function BM(e,t){return function(){return e.apply(t,arguments)}}const{toString:Fz}=Object.prototype,{getPrototypeOf:ZS}=Object,by=(e=>t=>{const n=Fz.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),$i=e=>(e=e.toLowerCase(),t=>by(t)===e),_y=e=>t=>typeof t===e,{isArray:ef}=Array,Kh=_y("undefined");function jz(e){return e!==null&&!Kh(e)&&e.constructor!==null&&!Kh(e.constructor)&&fa(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const VM=$i("ArrayBuffer");function Uz(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&VM(e.buffer),t}const zz=_y("string"),fa=_y("function"),WM=_y("number"),Sy=e=>e!==null&&typeof e=="object",Hz=e=>e===!0||e===!1,mv=e=>{if(by(e)!=="object")return!1;const t=ZS(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Bz=$i("Date"),Vz=$i("File"),Wz=$i("Blob"),Yz=$i("FileList"),Gz=e=>Sy(e)&&fa(e.pipe),Kz=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||fa(e.append)&&((t=by(e))==="formdata"||t==="object"&&fa(e.toString)&&e.toString()==="[object FormData]"))},qz=$i("URLSearchParams"),Qz=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Mp(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,a;if(typeof e!="object"&&(e=[e]),ef(e))for(r=0,a=e.length;r0;)if(a=n[r],t===a.toLowerCase())return a;return null}const GM=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),KM=e=>!Kh(e)&&e!==GM;function y1(){const{caseless:e}=KM(this)&&this||{},t={},n=(r,a)=>{const i=e&&YM(t,a)||a;mv(t[i])&&mv(r)?t[i]=y1(t[i],r):mv(r)?t[i]=y1({},r):ef(r)?t[i]=r.slice():t[i]=r};for(let r=0,a=arguments.length;r(Mp(t,(a,i)=>{n&&fa(a)?e[i]=BM(a,n):e[i]=a},{allOwnKeys:r}),e),Zz=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Jz=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},eH=(e,t,n,r)=>{let a,i,o;const s={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),i=a.length;i-- >0;)o=a[i],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&ZS(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},tH=(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},nH=e=>{if(!e)return null;if(ef(e))return e;let t=e.length;if(!WM(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},rH=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ZS(Uint8Array)),aH=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let a;for(;(a=r.next())&&!a.done;){const i=a.value;t.call(e,i[0],i[1])}},iH=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},oH=$i("HTMLFormElement"),sH=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,a){return r.toUpperCase()+a}),vT=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),lH=$i("RegExp"),qM=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Mp(n,(a,i)=>{let o;(o=t(a,i,e))!==!1&&(r[i]=o||a)}),Object.defineProperties(e,r)},uH=e=>{qM(e,(t,n)=>{if(fa(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(fa(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+"'")})}})},cH=(e,t)=>{const n={},r=a=>{a.forEach(i=>{n[i]=!0})};return ef(e)?r(e):r(String(e).split(t)),n},dH=()=>{},fH=(e,t)=>(e=+e,Number.isFinite(e)?e:t),yw="abcdefghijklmnopqrstuvwxyz",gT="0123456789",QM={DIGIT:gT,ALPHA:yw,ALPHA_DIGIT:yw+yw.toUpperCase()+gT},hH=(e=16,t=QM.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function pH(e){return!!(e&&fa(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const mH=e=>{const t=new Array(10),n=(r,a)=>{if(Sy(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[a]=r;const i=ef(r)?[]:{};return Mp(r,(o,s)=>{const l=n(o,a+1);!Kh(l)&&(i[s]=l)}),t[a]=void 0,i}}return r};return n(e,0)},vH=$i("AsyncFunction"),gH=e=>e&&(Sy(e)||fa(e))&&fa(e.then)&&fa(e.catch),W={isArray:ef,isArrayBuffer:VM,isBuffer:jz,isFormData:Kz,isArrayBufferView:Uz,isString:zz,isNumber:WM,isBoolean:Hz,isObject:Sy,isPlainObject:mv,isUndefined:Kh,isDate:Bz,isFile:Vz,isBlob:Wz,isRegExp:lH,isFunction:fa,isStream:Gz,isURLSearchParams:qz,isTypedArray:rH,isFileList:Yz,forEach:Mp,merge:y1,extend:Xz,trim:Qz,stripBOM:Zz,inherits:Jz,toFlatObject:eH,kindOf:by,kindOfTest:$i,endsWith:tH,toArray:nH,forEachEntry:aH,matchAll:iH,isHTMLForm:oH,hasOwnProperty:vT,hasOwnProp:vT,reduceDescriptors:qM,freezeMethods:uH,toObjectSet:cH,toCamelCase:sH,noop:dH,toFiniteNumber:fH,findKey:YM,global:GM,isContextDefined:KM,ALPHABET:QM,generateString:hH,isSpecCompliantForm:pH,toJSONObject:mH,isAsyncFn:vH,isThenable:gH};function tt(e,t,n,r,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),a&&(this.response=a)}W.inherits(tt,Error,{toJSON:function(){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:W.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const XM=tt.prototype,ZM={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{ZM[e]={value:e}});Object.defineProperties(tt,ZM);Object.defineProperty(XM,"isAxiosError",{value:!0});tt.from=(e,t,n,r,a,i)=>{const o=Object.create(XM);return W.toFlatObject(e,o,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),tt.call(o,e.message,t,n,r,a),o.cause=e,o.name=e.name,i&&Object.assign(o,i),o};const yH=null;function w1(e){return W.isPlainObject(e)||W.isArray(e)}function JM(e){return W.endsWith(e,"[]")?e.slice(0,-2):e}function yT(e,t,n){return e?e.concat(t).map(function(a,i){return a=JM(a),!n&&i?"["+a+"]":a}).join(n?".":""):t}function wH(e){return W.isArray(e)&&!e.some(w1)}const bH=W.toFlatObject(W,{},null,function(t){return/^is[A-Z]/.test(t)});function Ey(e,t,n){if(!W.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=W.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,y){return!W.isUndefined(y[v])});const r=n.metaTokens,a=n.visitor||c,i=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&W.isSpecCompliantForm(t);if(!W.isFunction(a))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(W.isDate(p))return p.toISOString();if(!l&&W.isBlob(p))throw new tt("Blob is not supported. Use a Buffer instead.");return W.isArrayBuffer(p)||W.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function c(p,v,y){let g=p;if(p&&!y&&typeof p=="object"){if(W.endsWith(v,"{}"))v=r?v:v.slice(0,-2),p=JSON.stringify(p);else if(W.isArray(p)&&wH(p)||(W.isFileList(p)||W.endsWith(v,"[]"))&&(g=W.toArray(p)))return v=JM(v),g.forEach(function(_,b){!(W.isUndefined(_)||_===null)&&t.append(o===!0?yT([v],b,i):o===null?v:v+"[]",u(_))}),!1}return w1(p)?!0:(t.append(yT(y,v,i),u(p)),!1)}const d=[],f=Object.assign(bH,{defaultVisitor:c,convertValue:u,isVisitable:w1});function h(p,v){if(!W.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+v.join("."));d.push(p),W.forEach(p,function(g,w){(!(W.isUndefined(g)||g===null)&&a.call(t,g,W.isString(w)?w.trim():w,v,f))===!0&&h(g,v?v.concat(w):[w])}),d.pop()}}if(!W.isObject(e))throw new TypeError("data must be an object");return h(e),t}function wT(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function JS(e,t){this._pairs=[],e&&Ey(e,this,t)}const eR=JS.prototype;eR.append=function(t,n){this._pairs.push([t,n])};eR.toString=function(t){const n=t?function(r){return t.call(this,r,wT)}:wT;return this._pairs.map(function(a){return n(a[0])+"="+n(a[1])},"").join("&")};function _H(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function tR(e,t,n){if(!t)return e;const r=n&&n.encode||_H,a=n&&n.serialize;let i;if(a?i=a(t,n):i=W.isURLSearchParams(t)?t.toString():new JS(t,n).toString(r),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class SH{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){W.forEach(this.handlers,function(r){r!==null&&t(r)})}}const bT=SH,nR={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},EH=typeof URLSearchParams<"u"?URLSearchParams:JS,xH=typeof FormData<"u"?FormData:null,CH=typeof Blob<"u"?Blob:null,TH=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),DH=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),La={isBrowser:!0,classes:{URLSearchParams:EH,FormData:xH,Blob:CH},isStandardBrowserEnv:TH,isStandardBrowserWebWorkerEnv:DH,protocols:["http","https","file","blob","url","data"]};function OH(e,t){return Ey(e,new La.classes.URLSearchParams,Object.assign({visitor:function(n,r,a,i){return La.isNode&&W.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function kH(e){return W.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function PH(e){const t={},n=Object.keys(e);let r;const a=n.length;let i;for(r=0;r=n.length;return o=!o&&W.isArray(a)?a.length:o,l?(W.hasOwnProp(a,o)?a[o]=[a[o],r]:a[o]=r,!s):((!a[o]||!W.isObject(a[o]))&&(a[o]=[]),t(n,r,a[o],i)&&W.isArray(a[o])&&(a[o]=PH(a[o])),!s)}if(W.isFormData(e)&&W.isFunction(e.entries)){const n={};return W.forEachEntry(e,(r,a)=>{t(kH(r),a,n,0)}),n}return null}function NH(e,t,n){if(W.isString(e))try{return(t||JSON.parse)(e),W.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const eE={transitional:nR,adapter:La.isNode?"http":"xhr",transformRequest:[function(t,n){const r=n.getContentType()||"",a=r.indexOf("application/json")>-1,i=W.isObject(t);if(i&&W.isHTMLForm(t)&&(t=new FormData(t)),W.isFormData(t))return a&&a?JSON.stringify(rR(t)):t;if(W.isArrayBuffer(t)||W.isBuffer(t)||W.isStream(t)||W.isFile(t)||W.isBlob(t))return t;if(W.isArrayBufferView(t))return t.buffer;if(W.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return OH(t,this.formSerializer).toString();if((s=W.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Ey(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||a?(n.setContentType("application/json",!1),NH(t)):t}],transformResponse:[function(t){const n=this.transitional||eE.transitional,r=n&&n.forcedJSONParsing,a=this.responseType==="json";if(t&&W.isString(t)&&(r&&!this.responseType||a)){const o=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t)}catch(s){if(o)throw s.name==="SyntaxError"?tt.from(s,tt.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:La.classes.FormData,Blob:La.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};W.forEach(["delete","get","head","post","put","patch"],e=>{eE.headers[e]={}});const tE=eE,AH=W.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"]),MH=e=>{const t={};let n,r,a;return e&&e.split(` +`).forEach(function(o){a=o.indexOf(":"),n=o.substring(0,a).trim().toLowerCase(),r=o.substring(a+1).trim(),!(!n||t[n]&&AH[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},_T=Symbol("internals");function Df(e){return e&&String(e).trim().toLowerCase()}function vv(e){return e===!1||e==null?e:W.isArray(e)?e.map(vv):String(e)}function RH(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 IH=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ww(e,t,n,r,a){if(W.isFunction(r))return r.call(this,t,n);if(a&&(t=n),!!W.isString(t)){if(W.isString(r))return t.indexOf(r)!==-1;if(W.isRegExp(r))return r.test(t)}}function $H(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function LH(e,t){const n=W.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(a,i,o){return this[r].call(this,t,a,i,o)},configurable:!0})})}class xy{constructor(t){t&&this.set(t)}set(t,n,r){const a=this;function i(s,l,u){const c=Df(l);if(!c)throw new Error("header name must be a non-empty string");const d=W.findKey(a,c);(!d||a[d]===void 0||u===!0||u===void 0&&a[d]!==!1)&&(a[d||l]=vv(s))}const o=(s,l)=>W.forEach(s,(u,c)=>i(u,c,l));return W.isPlainObject(t)||t instanceof this.constructor?o(t,n):W.isString(t)&&(t=t.trim())&&!IH(t)?o(MH(t),n):t!=null&&i(n,t,r),this}get(t,n){if(t=Df(t),t){const r=W.findKey(this,t);if(r){const a=this[r];if(!n)return a;if(n===!0)return RH(a);if(W.isFunction(n))return n.call(this,a,r);if(W.isRegExp(n))return n.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Df(t),t){const r=W.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ww(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let a=!1;function i(o){if(o=Df(o),o){const s=W.findKey(r,o);s&&(!n||ww(r,r[s],s,n))&&(delete r[s],a=!0)}}return W.isArray(t)?t.forEach(i):i(t),a}clear(t){const n=Object.keys(this);let r=n.length,a=!1;for(;r--;){const i=n[r];(!t||ww(this,this[i],i,t,!0))&&(delete this[i],a=!0)}return a}normalize(t){const n=this,r={};return W.forEach(this,(a,i)=>{const o=W.findKey(r,i);if(o){n[o]=vv(a),delete n[i];return}const s=t?$H(i):String(i).trim();s!==i&&delete n[i],n[s]=vv(a),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return W.forEach(this,(r,a)=>{r!=null&&r!==!1&&(n[a]=t&&W.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(` +`)}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(a=>r.set(a)),r}static accessor(t){const r=(this[_T]=this[_T]={accessors:{}}).accessors,a=this.prototype;function i(o){const s=Df(o);r[s]||(LH(a,o),r[s]=!0)}return W.isArray(t)?t.forEach(i):i(t),this}}xy.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);W.reduceDescriptors(xy.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});W.freezeMethods(xy);const eo=xy;function bw(e,t){const n=this||tE,r=t||n,a=eo.from(r.headers);let i=r.data;return W.forEach(e,function(s){i=s.call(n,i,a.normalize(),t?t.status:void 0)}),a.normalize(),i}function aR(e){return!!(e&&e.__CANCEL__)}function Rp(e,t,n){tt.call(this,e??"canceled",tt.ERR_CANCELED,t,n),this.name="CanceledError"}W.inherits(Rp,tt,{__CANCEL__:!0});function FH(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new tt("Request failed with status code "+n.status,[tt.ERR_BAD_REQUEST,tt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const jH=La.isStandardBrowserEnv?function(){return{write:function(n,r,a,i,o,s){const l=[];l.push(n+"="+encodeURIComponent(r)),W.isNumber(a)&&l.push("expires="+new Date(a).toGMTString()),W.isString(i)&&l.push("path="+i),W.isString(o)&&l.push("domain="+o),s===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function UH(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function zH(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function iR(e,t){return e&&!UH(t)?zH(e,t):t}const HH=La.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function a(i){let o=i;return t&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=a(window.location.href),function(o){const s=W.isString(o)?a(o):o;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}();function BH(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function VH(e,t){e=e||10;const n=new Array(e),r=new Array(e);let a=0,i=0,o;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=r[i];o||(o=u),n[a]=l,r[a]=u;let d=i,f=0;for(;d!==a;)f+=n[d++],d=d%e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),u-o{const i=a.loaded,o=a.lengthComputable?a.total:void 0,s=i-n,l=r(s),u=i<=o;n=i;const c={loaded:i,total:o,progress:o?i/o:void 0,bytes:s,rate:l||void 0,estimated:l&&o&&u?(o-i)/l:void 0,event:a};c[t?"download":"upload"]=!0,e(c)}}const WH=typeof XMLHttpRequest<"u",YH=WH&&function(e){return new Promise(function(n,r){let a=e.data;const i=eo.from(e.headers).normalize(),o=e.responseType;let s;function l(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}W.isFormData(a)&&(La.isStandardBrowserEnv||La.isStandardBrowserWebWorkerEnv?i.setContentType(!1):i.setContentType("multipart/form-data;",!1));let u=new XMLHttpRequest;if(e.auth){const h=e.auth.username||"",p=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(h+":"+p))}const c=iR(e.baseURL,e.url);u.open(e.method.toUpperCase(),tR(c,e.params,e.paramsSerializer),!0),u.timeout=e.timeout;function d(){if(!u)return;const h=eo.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),v={data:!o||o==="text"||o==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:h,config:e,request:u};FH(function(g){n(g),l()},function(g){r(g),l()},v),u=null}if("onloadend"in u?u.onloadend=d:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(d)},u.onabort=function(){u&&(r(new tt("Request aborted",tt.ECONNABORTED,e,u)),u=null)},u.onerror=function(){r(new tt("Network Error",tt.ERR_NETWORK,e,u)),u=null},u.ontimeout=function(){let p=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const v=e.transitional||nR;e.timeoutErrorMessage&&(p=e.timeoutErrorMessage),r(new tt(p,v.clarifyTimeoutError?tt.ETIMEDOUT:tt.ECONNABORTED,e,u)),u=null},La.isStandardBrowserEnv){const h=(e.withCredentials||HH(c))&&e.xsrfCookieName&&jH.read(e.xsrfCookieName);h&&i.set(e.xsrfHeaderName,h)}a===void 0&&i.setContentType(null),"setRequestHeader"in u&&W.forEach(i.toJSON(),function(p,v){u.setRequestHeader(v,p)}),W.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),o&&o!=="json"&&(u.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&u.addEventListener("progress",ST(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",ST(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=h=>{u&&(r(!h||h.type?new Rp(null,e,u):h),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const f=BH(c);if(f&&La.protocols.indexOf(f)===-1){r(new tt("Unsupported protocol "+f+":",tt.ERR_BAD_REQUEST,e));return}u.send(a||null)})},gv={http:yH,xhr:YH};W.forEach(gv,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const oR={getAdapter:e=>{e=W.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let a=0;ae instanceof eo?e.toJSON():e;function Rc(e,t){t=t||{};const n={};function r(u,c,d){return W.isPlainObject(u)&&W.isPlainObject(c)?W.merge.call({caseless:d},u,c):W.isPlainObject(c)?W.merge({},c):W.isArray(c)?c.slice():c}function a(u,c,d){if(W.isUndefined(c)){if(!W.isUndefined(u))return r(void 0,u,d)}else return r(u,c,d)}function i(u,c){if(!W.isUndefined(c))return r(void 0,c)}function o(u,c){if(W.isUndefined(c)){if(!W.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function s(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,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:s,headers:(u,c)=>a(xT(u),xT(c),!0)};return W.forEach(Object.keys(Object.assign({},e,t)),function(c){const d=l[c]||a,f=d(e[c],t[c],c);W.isUndefined(f)&&d!==s||(n[c]=f)}),n}const sR="1.5.0",nE={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{nE[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const CT={};nE.transitional=function(t,n,r){function a(i,o){return"[Axios v"+sR+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,s)=>{if(t===!1)throw new tt(a(o," has been removed"+(n?" in "+n:"")),tt.ERR_DEPRECATED);return n&&!CT[o]&&(CT[o]=!0,console.warn(a(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,s):!0}};function GH(e,t,n){if(typeof e!="object")throw new tt("options must be an object",tt.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let a=r.length;for(;a-- >0;){const i=r[a],o=t[i];if(o){const s=e[i],l=s===void 0||o(s,i,e);if(l!==!0)throw new tt("option "+i+" must be "+l,tt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new tt("Unknown option "+i,tt.ERR_BAD_OPTION)}}const b1={assertOptions:GH,validators:nE},No=b1.validators;class ug{constructor(t){this.defaults=t,this.interceptors={request:new bT,response:new bT}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Rc(this.defaults,n);const{transitional:r,paramsSerializer:a,headers:i}=n;r!==void 0&&b1.assertOptions(r,{silentJSONParsing:No.transitional(No.boolean),forcedJSONParsing:No.transitional(No.boolean),clarifyTimeoutError:No.transitional(No.boolean)},!1),a!=null&&(W.isFunction(a)?n.paramsSerializer={serialize:a}:b1.assertOptions(a,{encode:No.function,serialize:No.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&W.merge(i.common,i[n.method]);i&&W.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),n.headers=eo.concat(o,i);const s=[];let l=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(l=l&&v.synchronous,s.unshift(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=[ET.bind(this),void 0];for(p.unshift.apply(p,s),p.push.apply(p,u),f=p.length,c=Promise.resolve(n);d{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](a);r._listeners=null}),this.promise.then=a=>{let i;const o=new Promise(s=>{r.subscribe(s),i=s}).then(a);return o.cancel=function(){r.unsubscribe(i)},o},t(function(i,o,s){r.reason||(r.reason=new Rp(i,o,s),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)}static source(){let t;return{token:new rE(function(a){t=a}),cancel:t}}}const KH=rE;function qH(e){return function(n){return e.apply(null,n)}}function QH(e){return W.isObject(e)&&e.isAxiosError===!0}const _1={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};Object.entries(_1).forEach(([e,t])=>{_1[t]=e});const XH=_1;function lR(e){const t=new yv(e),n=BM(yv.prototype.request,t);return W.extend(n,yv.prototype,t,{allOwnKeys:!0}),W.extend(n,t,null,{allOwnKeys:!0}),n.create=function(a){return lR(Rc(e,a))},n}const wn=lR(tE);wn.Axios=yv;wn.CanceledError=Rp;wn.CancelToken=KH;wn.isCancel=aR;wn.VERSION=sR;wn.toFormData=Ey;wn.AxiosError=tt;wn.Cancel=wn.CanceledError;wn.all=function(t){return Promise.all(t)};wn.spread=qH;wn.isAxiosError=QH;wn.mergeConfig=Rc;wn.AxiosHeaders=eo;wn.formToJSON=e=>rR(W.isHTMLForm(e)?new FormData(e):e);wn.getAdapter=oR.getAdapter;wn.HttpStatusCode=XH;wn.default=wn;const ar=wn;function uR(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ttypeof e=="number"&&!isNaN(e),Ll=e=>typeof e=="string",Sr=e=>typeof e=="function",wv=e=>Ll(e)||Sr(e)?e:null,Sw=e=>x.isValidElement(e)||Ll(e)||Sr(e)||fh(e);function ZH(e,t,n){n===void 0&&(n=300);const{scrollHeight:r,style:a}=e;requestAnimationFrame(()=>{a.minHeight="initial",a.height=r+"px",a.transition=`all ${n}ms`,requestAnimationFrame(()=>{a.height="0",a.padding="0",a.margin="0",setTimeout(t,n)})})}function Cy(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:a=!0,collapseDuration:i=300}=e;return function(o){let{children:s,position:l,preventExitTransition:u,done:c,nodeRef:d,isIn:f}=o;const h=r?`${t}--${l}`:t,p=r?`${n}--${l}`:n,v=x.useRef(0);return x.useLayoutEffect(()=>{const y=d.current,g=h.split(" "),w=_=>{_.target===d.current&&(y.dispatchEvent(new Event("d")),y.removeEventListener("animationend",w),y.removeEventListener("animationcancel",w),v.current===0&&_.type!=="animationcancel"&&y.classList.remove(...g))};y.classList.add(...g),y.addEventListener("animationend",w),y.addEventListener("animationcancel",w)},[]),x.useEffect(()=>{const y=d.current,g=()=>{y.removeEventListener("animationend",g),a?ZH(y,c,i):c()};f||(u?g():(v.current=1,y.className+=` ${p}`,y.addEventListener("animationend",g)))},[f]),m.createElement(m.Fragment,null,s)}}function TT(e,t){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const ea={list:new Map,emitQueue:new Map,on(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off(e,t){if(t){const n=this.list.get(e).filter(r=>r!==t);return this.list.set(e,n),this}return this.list.delete(e),this},cancelEmit(e){const t=this.emitQueue.get(e);return t&&(t.forEach(clearTimeout),this.emitQueue.delete(e)),this},emit(e){this.list.has(e)&&this.list.get(e).forEach(t=>{const n=setTimeout(()=>{t(...[].slice.call(arguments,1))},0);this.emitQueue.has(e)||this.emitQueue.set(e,[]),this.emitQueue.get(e).push(n)})}},Cm=e=>{let{theme:t,type:n,...r}=e;return m.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...r})},Ew={info:function(e){return m.createElement(Cm,{...e},m.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return m.createElement(Cm,{...e},m.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return m.createElement(Cm,{...e},m.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return m.createElement(Cm,{...e},m.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return m.createElement("div",{className:"Toastify__spinner"})}};function JH(e){const[,t]=x.useReducer(h=>h+1,0),[n,r]=x.useState([]),a=x.useRef(null),i=x.useRef(new Map).current,o=h=>n.indexOf(h)!==-1,s=x.useRef({toastKey:1,displayedToast:0,count:0,queue:[],props:e,containerId:null,isToastActive:o,getToast:h=>i.get(h)}).current;function l(h){let{containerId:p}=h;const{limit:v}=s.props;!v||p&&s.containerId!==p||(s.count-=s.queue.length,s.queue=[])}function u(h){r(p=>h==null?[]:p.filter(v=>v!==h))}function c(){const{toastContent:h,toastProps:p,staleId:v}=s.queue.shift();f(h,p,v)}function d(h,p){let{delay:v,staleId:y,...g}=p;if(!Sw(h)||function(H){return!a.current||s.props.enableMultiContainer&&H.containerId!==s.props.containerId||i.has(H.toastId)&&H.updateId==null}(g))return;const{toastId:w,updateId:_,data:b}=g,{props:C}=s,E=()=>u(w),T=_==null;T&&s.count++;const P={...C,style:C.toastStyle,key:s.toastKey++,...Object.fromEntries(Object.entries(g).filter(H=>{let[q,Q]=H;return Q!=null})),toastId:w,updateId:_,data:b,closeToast:E,isIn:!1,className:wv(g.className||C.toastClassName),bodyClassName:wv(g.bodyClassName||C.bodyClassName),progressClassName:wv(g.progressClassName||C.progressClassName),autoClose:!g.isLoading&&(A=g.autoClose,M=C.autoClose,A===!1||fh(A)&&A>0?A:M),deleteToast(){const H=TT(i.get(w),"removed");i.delete(w),ea.emit(4,H);const q=s.queue.length;if(s.count=w==null?s.count-s.displayedToast:s.count-1,s.count<0&&(s.count=0),q>0){const Q=w==null?s.props.limit:1;if(q===1||Q===1)s.displayedToast++,c();else{const X=Q>q?q:Q;s.displayedToast=X;for(let Y=0;Yz in Ew)(Q)&&(oe=Ew[Q](U))),oe}(P),Sr(g.onOpen)&&(P.onOpen=g.onOpen),Sr(g.onClose)&&(P.onClose=g.onClose),P.closeButton=C.closeButton,g.closeButton===!1||Sw(g.closeButton)?P.closeButton=g.closeButton:g.closeButton===!0&&(P.closeButton=!Sw(C.closeButton)||C.closeButton);let j=h;x.isValidElement(h)&&!Ll(h.type)?j=x.cloneElement(h,{closeToast:E,toastProps:P,data:b}):Sr(h)&&(j=h({closeToast:E,toastProps:P,data:b})),C.limit&&C.limit>0&&s.count>C.limit&&T?s.queue.push({toastContent:j,toastProps:P,staleId:y}):fh(v)?setTimeout(()=>{f(j,P,y)},v):f(j,P,y)}function f(h,p,v){const{toastId:y}=p;v&&i.delete(v);const g={content:h,props:p};i.set(y,g),r(w=>[...w,y].filter(_=>_!==v)),ea.emit(4,TT(g,g.props.updateId==null?"added":"updated"))}return x.useEffect(()=>(s.containerId=e.containerId,ea.cancelEmit(3).on(0,d).on(1,h=>a.current&&u(h)).on(5,l).emit(2,s),()=>{i.clear(),ea.emit(3,s)}),[]),x.useEffect(()=>{s.props=e,s.isToastActive=o,s.displayedToast=n.length}),{getToastToRender:function(h){const p=new Map,v=Array.from(i.values());return e.newestOnTop&&v.reverse(),v.forEach(y=>{const{position:g}=y.props;p.has(g)||p.set(g,[]),p.get(g).push(y)}),Array.from(p,y=>h(y[0],y[1]))},containerRef:a,isToastActive:o}}function DT(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function OT(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function eB(e){const[t,n]=x.useState(!1),[r,a]=x.useState(!1),i=x.useRef(null),o=x.useRef({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,s=x.useRef(e),{autoClose:l,pauseOnHover:u,closeToast:c,onClick:d,closeOnClick:f}=e;function h(b){if(e.draggable){b.nativeEvent.type==="touchstart"&&b.nativeEvent.preventDefault(),o.didMove=!1,document.addEventListener("mousemove",g),document.addEventListener("mouseup",w),document.addEventListener("touchmove",g),document.addEventListener("touchend",w);const C=i.current;o.canCloseOnClick=!0,o.canDrag=!0,o.boundingRect=C.getBoundingClientRect(),C.style.transition="",o.x=DT(b.nativeEvent),o.y=OT(b.nativeEvent),e.draggableDirection==="x"?(o.start=o.x,o.removalDistance=C.offsetWidth*(e.draggablePercent/100)):(o.start=o.y,o.removalDistance=C.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent/100))}}function p(b){if(o.boundingRect){const{top:C,bottom:E,left:T,right:P}=o.boundingRect;b.nativeEvent.type!=="touchend"&&e.pauseOnHover&&o.x>=T&&o.x<=P&&o.y>=C&&o.y<=E?y():v()}}function v(){n(!0)}function y(){n(!1)}function g(b){const C=i.current;o.canDrag&&C&&(o.didMove=!0,t&&y(),o.x=DT(b),o.y=OT(b),o.delta=e.draggableDirection==="x"?o.x-o.start:o.y-o.start,o.start!==o.x&&(o.canCloseOnClick=!1),C.style.transform=`translate${e.draggableDirection}(${o.delta}px)`,C.style.opacity=""+(1-Math.abs(o.delta/o.removalDistance)))}function w(){document.removeEventListener("mousemove",g),document.removeEventListener("mouseup",w),document.removeEventListener("touchmove",g),document.removeEventListener("touchend",w);const b=i.current;if(o.canDrag&&o.didMove&&b){if(o.canDrag=!1,Math.abs(o.delta)>o.removalDistance)return a(!0),void e.closeToast();b.style.transition="transform 0.2s, opacity 0.2s",b.style.transform=`translate${e.draggableDirection}(0)`,b.style.opacity="1"}}x.useEffect(()=>{s.current=e}),x.useEffect(()=>(i.current&&i.current.addEventListener("d",v,{once:!0}),Sr(e.onOpen)&&e.onOpen(x.isValidElement(e.children)&&e.children.props),()=>{const b=s.current;Sr(b.onClose)&&b.onClose(x.isValidElement(b.children)&&b.children.props)}),[]),x.useEffect(()=>(e.pauseOnFocusLoss&&(document.hasFocus()||y(),window.addEventListener("focus",v),window.addEventListener("blur",y)),()=>{e.pauseOnFocusLoss&&(window.removeEventListener("focus",v),window.removeEventListener("blur",y))}),[e.pauseOnFocusLoss]);const _={onMouseDown:h,onTouchStart:h,onMouseUp:p,onTouchEnd:p};return l&&u&&(_.onMouseEnter=y,_.onMouseLeave=v),f&&(_.onClick=b=>{d&&d(b),o.canCloseOnClick&&c()}),{playToast:v,pauseToast:y,isRunning:t,preventExitTransition:r,toastRef:i,eventHandlers:_}}function cR(e){let{closeToast:t,theme:n,ariaLabel:r="close"}=e;return m.createElement("button",{className:`Toastify__close-button Toastify__close-button--${n}`,type:"button",onClick:a=>{a.stopPropagation(),t(a)},"aria-label":r},m.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},m.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function tB(e){let{delay:t,isRunning:n,closeToast:r,type:a="default",hide:i,className:o,style:s,controlledProgress:l,progress:u,rtl:c,isIn:d,theme:f}=e;const h=i||l&&u===0,p={...s,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused",opacity:h?0:1};l&&(p.transform=`scaleX(${u})`);const v=V("Toastify__progress-bar",l?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${f}`,`Toastify__progress-bar--${a}`,{"Toastify__progress-bar--rtl":c}),y=Sr(o)?o({rtl:c,type:a,defaultClassName:v}):V(v,o);return m.createElement("div",{role:"progressbar","aria-hidden":h?"true":"false","aria-label":"notification timer",className:y,style:p,[l&&u>=1?"onTransitionEnd":"onAnimationEnd"]:l&&u<1?null:()=>{d&&r()}})}const nB=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:a}=eB(e),{closeButton:i,children:o,autoClose:s,onClick:l,type:u,hideProgressBar:c,closeToast:d,transition:f,position:h,className:p,style:v,bodyClassName:y,bodyStyle:g,progressClassName:w,progressStyle:_,updateId:b,role:C,progress:E,rtl:T,toastId:P,deleteToast:A,isIn:M,isLoading:j,iconOut:H,closeOnClick:q,theme:Q}=e,X=V("Toastify__toast",`Toastify__toast-theme--${Q}`,`Toastify__toast--${u}`,{"Toastify__toast--rtl":T},{"Toastify__toast--close-on-click":q}),Y=Sr(p)?p({rtl:T,position:h,type:u,defaultClassName:X}):V(X,p),oe=!!E||!s,U={closeToast:d,type:u,theme:Q};let z=null;return i===!1||(z=Sr(i)?i(U):x.isValidElement(i)?x.cloneElement(i,U):cR(U)),m.createElement(f,{isIn:M,done:A,position:h,preventExitTransition:n,nodeRef:r},m.createElement("div",{id:P,onClick:l,className:Y,...a,style:v,ref:r},m.createElement("div",{...M&&{role:C},className:Sr(y)?y({type:u}):V("Toastify__toast-body",y),style:g},H!=null&&m.createElement("div",{className:V("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!j})},H),m.createElement("div",null,o)),z,m.createElement(tB,{...b&&!oe?{key:`pb-${b}`}:{},rtl:T,theme:Q,delay:s,isRunning:t,isIn:M,closeToast:d,hide:c,type:u,style:_,className:w,controlledProgress:oe,progress:E||0})))},Ty=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},rB=Cy(Ty("bounce",!0));Cy(Ty("slide",!0));Cy(Ty("zoom"));Cy(Ty("flip"));const S1=x.forwardRef((e,t)=>{const{getToastToRender:n,containerRef:r,isToastActive:a}=JH(e),{className:i,style:o,rtl:s,containerId:l}=e;function u(c){const d=V("Toastify__toast-container",`Toastify__toast-container--${c}`,{"Toastify__toast-container--rtl":s});return Sr(i)?i({position:c,rtl:s,defaultClassName:d}):V(d,wv(i))}return x.useEffect(()=>{t&&(t.current=r.current)},[]),m.createElement("div",{ref:r,className:"Toastify",id:l},n((c,d)=>{const f=d.length?{...o}:{...o,pointerEvents:"none"};return m.createElement("div",{className:u(c),style:f,key:`container-${c}`},d.map((h,p)=>{let{content:v,props:y}=h;return m.createElement(nB,{...y,isIn:a(y.toastId),style:{...y.style,"--nth":p+1,"--len":d.length},key:`toast-${y.key}`},v)}))}))});S1.displayName="ToastContainer",S1.defaultProps={position:"top-right",transition:rB,autoClose:5e3,closeButton:cR,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};let xw,sl=new Map,qf=[],aB=1;function dR(){return""+aB++}function iB(e){return e&&(Ll(e.toastId)||fh(e.toastId))?e.toastId:dR()}function hh(e,t){return sl.size>0?ea.emit(0,e,t):qf.push({content:e,options:t}),t.toastId}function cg(e,t){return{...t,type:t&&t.type||e,toastId:iB(t)}}function Tm(e){return(t,n)=>hh(t,cg(e,n))}function xt(e,t){return hh(e,cg("default",t))}xt.loading=(e,t)=>hh(e,cg("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),xt.promise=function(e,t,n){let r,{pending:a,error:i,success:o}=t;a&&(r=Ll(a)?xt.loading(a,n):xt.loading(a.render,{...n,...a}));const s={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},l=(c,d,f)=>{if(d==null)return void xt.dismiss(r);const h={type:c,...s,...n,data:f},p=Ll(d)?{render:d}:d;return r?xt.update(r,{...h,...p}):xt(p.render,{...h,...p}),f},u=Sr(e)?e():e;return u.then(c=>l("success",o,c)).catch(c=>l("error",i,c)),u},xt.success=Tm("success"),xt.info=Tm("info"),xt.error=Tm("error"),xt.warning=Tm("warning"),xt.warn=xt.warning,xt.dark=(e,t)=>hh(e,cg("default",{theme:"dark",...t})),xt.dismiss=e=>{sl.size>0?ea.emit(1,e):qf=qf.filter(t=>e!=null&&t.options.toastId!==e)},xt.clearWaitingQueue=function(e){return e===void 0&&(e={}),ea.emit(5,e)},xt.isActive=e=>{let t=!1;return sl.forEach(n=>{n.isToastActive&&n.isToastActive(e)&&(t=!0)}),t},xt.update=function(e,t){t===void 0&&(t={}),setTimeout(()=>{const n=function(r,a){let{containerId:i}=a;const o=sl.get(i||xw);return o&&o.getToast(r)}(e,t);if(n){const{props:r,content:a}=n,i={delay:100,...r,...t,toastId:t.toastId||e,updateId:dR()};i.toastId!==e&&(i.staleId=e);const o=i.render||a;delete i.render,hh(o,i)}},0)},xt.done=e=>{xt.update(e,{progress:1})},xt.onChange=e=>(ea.on(4,e),()=>{ea.off(4,e)}),xt.POSITION={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},xt.TYPE={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"},ea.on(2,e=>{xw=e.containerId||e,sl.set(xw,e),qf.forEach(t=>{ea.emit(0,t.content,t.options)}),qf=[]}).on(3,e=>{sl.delete(e.containerId||e),sl.size===0&&ea.off(0).off(1).off(5)});/** + * @remix-run/router v1.9.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Kt(){return Kt=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Ic(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function sB(){return Math.random().toString(36).substr(2,8)}function PT(e,t){return{usr:e.state,key:e.key,idx:t}}function qh(e,t,n,r){return n===void 0&&(n=null),Kt({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?bo(t):t,{state:n,key:t&&t.key||r||sB()})}function Fl(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function bo(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function lB(e,t,n,r){r===void 0&&(r={});let{window:a=document.defaultView,v5Compat:i=!1}=r,o=a.history,s=hn.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(Kt({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function d(){s=hn.Pop;let y=c(),g=y==null?null:y-u;u=y,l&&l({action:s,location:v.location,delta:g})}function f(y,g){s=hn.Push;let w=qh(v.location,y,g);n&&n(w,y),u=c()+1;let _=PT(w,u),b=v.createHref(w);try{o.pushState(_,"",b)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;a.location.assign(b)}i&&l&&l({action:s,location:v.location,delta:1})}function h(y,g){s=hn.Replace;let w=qh(v.location,y,g);n&&n(w,y),u=c();let _=PT(w,u),b=v.createHref(w);o.replaceState(_,"",b),i&&l&&l({action:s,location:v.location,delta:0})}function p(y){let g=a.location.origin!=="null"?a.location.origin:a.location.href,w=typeof y=="string"?y:Fl(y);return ze(g,"No window.location.(origin|href) available to create URL for href: "+w),new URL(w,g)}let v={get action(){return s},get location(){return e(a,o)},listen(y){if(l)throw new Error("A history only accepts one active listener");return a.addEventListener(kT,d),l=y,()=>{a.removeEventListener(kT,d),l=null}},createHref(y){return t(a,y)},createURL:p,encodeLocation(y){let g=p(y);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:f,replace:h,go(y){return o.go(y)}};return v}var ln;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(ln||(ln={}));const uB=new Set(["lazy","caseSensitive","path","id","index","children"]);function cB(e){return e.index===!0}function E1(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((a,i)=>{let o=[...n,i],s=typeof a.id=="string"?a.id:o.join("-");if(ze(a.index!==!0||!a.children,"Cannot specify children on an index route"),ze(!r[s],'Found a route id collision on id "'+s+`". Route id's must be globally unique within Data Router usages`),cB(a)){let l=Kt({},a,t(a),{id:s});return r[s]=l,l}else{let l=Kt({},a,t(a),{id:s,children:void 0});return r[s]=l,a.children&&(l.children=E1(a.children,t,o,r)),l}})}function Qu(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?bo(t):t,a=fu(r.pathname||"/",n);if(a==null)return null;let i=hR(e);dB(i);let o=null;for(let s=0;o==null&&s{let l={relativePath:s===void 0?i.path||"":s,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(ze(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=to([r,l.relativePath]),c=n.concat(l);i.children&&i.children.length>0&&(ze(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),hR(i.children,t,c,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:yB(u,i.index),routesMeta:c})};return e.forEach((i,o)=>{var s;if(i.path===""||!((s=i.path)!=null&&s.includes("?")))a(i,o);else for(let l of pR(i.path))a(i,o,l)}),t}function pR(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return a?[i,""]:[i];let o=pR(r.join("/")),s=[];return s.push(...o.map(l=>l===""?i:[i,l].join("/"))),a&&s.push(...o),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function dB(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:wB(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const fB=/^:\w+$/,hB=3,pB=2,mB=1,vB=10,gB=-2,NT=e=>e==="*";function yB(e,t){let n=e.split("/"),r=n.length;return n.some(NT)&&(r+=gB),t&&(r+=pB),n.filter(a=>!NT(a)).reduce((a,i)=>a+(fB.test(i)?hB:i===""?mB:vB),r)}function wB(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function bB(e,t){let{routesMeta:n}=e,r={},a="/",i=[];for(let o=0;o{if(c==="*"){let f=s[d]||"";o=i.slice(0,i.length-f.length).replace(/(.)\/+$/,"$1")}return u[c]=xB(s[d]||"",c),u},{}),pathname:i,pathnameBase:o,pattern:e}}function SB(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Ic(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=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(o,s)=>(r.push(s),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function EB(e){try{return decodeURI(e)}catch(t){return Ic(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function xB(e,t){try{return decodeURIComponent(e)}catch(n){return Ic(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function fu(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)||"/"}function CB(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?bo(e):e;return{pathname:n?n.startsWith("/")?n:TB(n,t):t,search:OB(r),hash:kB(a)}}function TB(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function Cw(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 and the router will parse it for you.'}function Ip(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Dy(e,t,n,r){r===void 0&&(r=!1);let a;typeof e=="string"?a=bo(e):(a=Kt({},e),ze(!a.pathname||!a.pathname.includes("?"),Cw("?","pathname","search",a)),ze(!a.pathname||!a.pathname.includes("#"),Cw("#","pathname","hash",a)),ze(!a.search||!a.search.includes("#"),Cw("#","search","hash",a)));let i=e===""||a.pathname==="",o=i?"/":a.pathname,s;if(r||o==null)s=n;else{let d=t.length-1;if(o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),d-=1;a.pathname=f.join("/")}s=d>=0?t[d]:"/"}let l=CB(a,s),u=o&&o!=="/"&&o.endsWith("/"),c=(i||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const to=e=>e.join("/").replace(/\/\/+/g,"/"),DB=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),OB=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,kB=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class aE{constructor(t,n,r,a){a===void 0&&(a=!1),this.status=t,this.statusText=n||"",this.internal=a,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function mR(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const vR=["post","put","patch","delete"],PB=new Set(vR),NB=["get",...vR],AB=new Set(NB),MB=new Set([301,302,303,307,308]),RB=new Set([307,308]),Tw={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},IB={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Of={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},gR=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,$B=e=>({hasErrorBoundary:!!e.hasErrorBoundary});function LB(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;ze(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a;if(e.mapRouteProperties)a=e.mapRouteProperties;else if(e.detectErrorBoundary){let R=e.detectErrorBoundary;a=L=>({hasErrorBoundary:R(L)})}else a=$B;let i={},o=E1(e.routes,a,void 0,i),s,l=e.basename||"/",u=Kt({v7_normalizeFormMethod:!1,v7_prependBasename:!1},e.future),c=null,d=new Set,f=null,h=null,p=null,v=e.hydrationData!=null,y=Qu(o,e.history.location,l),g=null;if(y==null){let R=Jr(404,{pathname:e.history.location.pathname}),{matches:L,route:Z}=jT(o);y=L,g={[Z.id]:R}}let w=!y.some(R=>R.route.lazy)&&(!y.some(R=>R.route.loader)||e.hydrationData!=null),_,b={historyAction:e.history.action,location:e.history.location,matches:y,initialized:w,navigation:Tw,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||g,fetchers:new Map,blockers:new Map},C=hn.Pop,E=!1,T,P=!1,A=!1,M=[],j=[],H=new Map,q=0,Q=-1,X=new Map,Y=new Set,oe=new Map,U=new Map,z=new Map,ae=!1;function de(){return c=e.history.listen(R=>{let{action:L,location:Z,delta:ve}=R;if(ae){ae=!1;return}Ic(z.size===0||ve!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let Pe=Oe({currentLocation:b.location,nextLocation:Z,historyAction:L});if(Pe&&ve!=null){ae=!0,e.history.go(ve*-1),ye(Pe,{state:"blocked",location:Z,proceed(){ye(Pe,{state:"proceeding",proceed:void 0,reset:void 0,location:Z}),e.history.go(ve)},reset(){let Ne=new Map(b.blockers);Ne.set(Pe,Of),ee({blockers:Ne})}});return}return Te(L,Z)}),b.initialized||Te(hn.Pop,b.location),_}function Ee(){c&&c(),d.clear(),T&&T.abort(),b.fetchers.forEach((R,L)=>bn(L)),b.blockers.forEach((R,L)=>K(L))}function De(R){return d.add(R),()=>d.delete(R)}function ee(R){b=Kt({},b,R),d.forEach(L=>L(b))}function me(R,L){var Z,ve;let Pe=b.actionData!=null&&b.navigation.formMethod!=null&&Aa(b.navigation.formMethod)&&b.navigation.state==="loading"&&((Z=R.state)==null?void 0:Z._isRedirect)!==!0,Ne;L.actionData?Object.keys(L.actionData).length>0?Ne=L.actionData:Ne=null:Pe?Ne=b.actionData:Ne=null;let Me=L.loaderData?FT(b.loaderData,L.loaderData,L.matches||[],L.errors):b.loaderData,xe=b.blockers;xe.size>0&&(xe=new Map(xe),xe.forEach((bt,je)=>xe.set(je,Of)));let we=E===!0||b.navigation.formMethod!=null&&Aa(b.navigation.formMethod)&&((ve=R.state)==null?void 0:ve._isRedirect)!==!0;s&&(o=s,s=void 0),P||C===hn.Pop||(C===hn.Push?e.history.push(R,R.state):C===hn.Replace&&e.history.replace(R,R.state)),ee(Kt({},L,{actionData:Ne,loaderData:Me,historyAction:C,location:R,initialized:!0,navigation:Tw,revalidation:"idle",restoreScrollPosition:xa(R,L.matches||b.matches),preventScrollReset:we,blockers:xe})),C=hn.Pop,E=!1,P=!1,A=!1,M=[],j=[]}async function _e(R,L){if(typeof R=="number"){e.history.go(R);return}let Z=x1(b.location,b.matches,l,u.v7_prependBasename,R,L==null?void 0:L.fromRouteId,L==null?void 0:L.relative),{path:ve,submission:Pe,error:Ne}=AT(u.v7_normalizeFormMethod,!1,Z,L),Me=b.location,xe=qh(b.location,ve,L&&L.state);xe=Kt({},xe,e.history.encodeLocation(xe));let we=L&&L.replace!=null?L.replace:void 0,bt=hn.Push;we===!0?bt=hn.Replace:we===!1||Pe!=null&&Aa(Pe.formMethod)&&Pe.formAction===b.location.pathname+b.location.search&&(bt=hn.Replace);let je=L&&"preventScrollReset"in L?L.preventScrollReset===!0:void 0,Le=Oe({currentLocation:Me,nextLocation:xe,historyAction:bt});if(Le){ye(Le,{state:"blocked",location:xe,proceed(){ye(Le,{state:"proceeding",proceed:void 0,reset:void 0,location:xe}),_e(R,L)},reset(){let pt=new Map(b.blockers);pt.set(Le,Of),ee({blockers:pt})}});return}return await Te(bt,xe,{submission:Pe,pendingError:Ne,preventScrollReset:je,replace:L&&L.replace})}function Ce(){if(jt(),ee({revalidation:"loading"}),b.navigation.state!=="submitting"){if(b.navigation.state==="idle"){Te(b.historyAction,b.location,{startUninterruptedRevalidation:!0});return}Te(C||b.historyAction,b.navigation.location,{overrideNavigation:b.navigation})}}async function Te(R,L,Z){T&&T.abort(),T=null,C=R,P=(Z&&Z.startUninterruptedRevalidation)===!0,mr(b.location,b.matches),E=(Z&&Z.preventScrollReset)===!0;let ve=s||o,Pe=Z&&Z.overrideNavigation,Ne=Qu(ve,L,l);if(!Ne){let pt=Jr(404,{pathname:L.pathname}),{matches:At,route:ri}=jT(ve);Fe(),me(L,{matches:At,loaderData:{},errors:{[ri.id]:pt}});return}if(b.initialized&&!A&&HB(b.location,L)&&!(Z&&Z.submission&&Aa(Z.submission.formMethod))){me(L,{matches:Ne});return}T=new AbortController;let Me=Pf(e.history,L,T.signal,Z&&Z.submission),xe,we;if(Z&&Z.pendingError)we={[Xu(Ne).route.id]:Z.pendingError};else if(Z&&Z.submission&&Aa(Z.submission.formMethod)){let pt=await le(Me,L,Z.submission,Ne,{replace:Z.replace});if(pt.shortCircuited)return;xe=pt.pendingActionData,we=pt.pendingActionError,Pe=Dw(L,Z.submission),Me=new Request(Me.url,{signal:Me.signal})}let{shortCircuited:bt,loaderData:je,errors:Le}=await ke(Me,L,Ne,Pe,Z&&Z.submission,Z&&Z.fetcherSubmission,Z&&Z.replace,xe,we);bt||(T=null,me(L,Kt({matches:Ne},xe?{actionData:xe}:{},{loaderData:je,errors:Le})))}async function le(R,L,Z,ve,Pe){Pe===void 0&&(Pe={}),jt();let Ne=YB(L,Z);ee({navigation:Ne});let Me,xe=T1(ve,L);if(!xe.route.action&&!xe.route.lazy)Me={type:ln.error,error:Jr(405,{method:R.method,pathname:L.pathname,routeId:xe.route.id})};else if(Me=await kf("action",R,xe,ve,i,a,l),R.signal.aborted)return{shortCircuited:!0};if(pc(Me)){let we;return Pe&&Pe.replace!=null?we=Pe.replace:we=Me.location===b.location.pathname+b.location.search,await Pt(b,Me,{submission:Z,replace:we}),{shortCircuited:!0}}if(ph(Me)){let we=Xu(ve,xe.route.id);return(Pe&&Pe.replace)!==!0&&(C=hn.Push),{pendingActionData:{},pendingActionError:{[we.route.id]:Me.error}}}if(vl(Me))throw Jr(400,{type:"defer-action"});return{pendingActionData:{[xe.route.id]:Me.data}}}async function ke(R,L,Z,ve,Pe,Ne,Me,xe,we){let bt=ve||Dw(L,Pe),je=Pe||Ne||HT(bt),Le=s||o,[pt,At]=MT(e.history,b,Z,je,L,A,M,j,oe,Y,Le,l,xe,we);if(Fe(ft=>!(Z&&Z.some(Rr=>Rr.route.id===ft))||pt&&pt.some(Rr=>Rr.route.id===ft)),Q=++q,pt.length===0&&At.length===0){let ft=$();return me(L,Kt({matches:Z,loaderData:{},errors:we||null},xe?{actionData:xe}:{},ft?{fetchers:new Map(b.fetchers)}:{})),{shortCircuited:!0}}if(!P){At.forEach(Rr=>{let Re=b.fetchers.get(Rr.key),Et=Nf(void 0,Re?Re.data:void 0);b.fetchers.set(Rr.key,Et)});let ft=xe||b.actionData;ee(Kt({navigation:bt},ft?Object.keys(ft).length===0?{actionData:null}:{actionData:ft}:{},At.length>0?{fetchers:new Map(b.fetchers)}:{}))}At.forEach(ft=>{H.has(ft.key)&&Nt(ft.key),ft.controller&&H.set(ft.key,ft.controller)});let ri=()=>At.forEach(ft=>Nt(ft.key));T&&T.signal.addEventListener("abort",ri);let{results:ai,loaderResults:zi,fetcherResults:Oo}=await ht(b.matches,Z,pt,At,R);if(R.signal.aborted)return{shortCircuited:!0};T&&T.signal.removeEventListener("abort",ri),At.forEach(ft=>H.delete(ft.key));let Ar=UT(ai);if(Ar){if(Ar.idx>=pt.length){let ft=At[Ar.idx-pt.length].key;Y.add(ft)}return await Pt(b,Ar.result,{replace:Me}),{shortCircuited:!0}}let{loaderData:Mr,errors:ko}=LT(b,Z,pt,zi,we,At,Oo,U);U.forEach((ft,Rr)=>{ft.subscribe(Re=>{(Re||ft.done)&&U.delete(Rr)})});let gf=$(),Zs=he(Q),xu=gf||Zs||At.length>0;return Kt({loaderData:Mr,errors:ko},xu?{fetchers:new Map(b.fetchers)}:{})}function Be(R){return b.fetchers.get(R)||IB}function dt(R,L,Z,ve){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");H.has(R)&&Nt(R);let Pe=s||o,Ne=x1(b.location,b.matches,l,u.v7_prependBasename,Z,L,ve==null?void 0:ve.relative),Me=Qu(Pe,Ne,l);if(!Me){en(R,L,Jr(404,{pathname:Ne}));return}let{path:xe,submission:we,error:bt}=AT(u.v7_normalizeFormMethod,!0,Ne,ve);if(bt){en(R,L,bt);return}let je=T1(Me,xe);if(E=(ve&&ve.preventScrollReset)===!0,we&&Aa(we.formMethod)){sn(R,L,xe,je,Me,we);return}oe.set(R,{routeId:L,path:xe}),Ge(R,L,xe,je,Me,we)}async function sn(R,L,Z,ve,Pe,Ne){if(jt(),oe.delete(R),!ve.route.action&&!ve.route.lazy){let Ue=Jr(405,{method:Ne.formMethod,pathname:Z,routeId:L});en(R,L,Ue);return}let Me=b.fetchers.get(R),xe=GB(Ne,Me);b.fetchers.set(R,xe),ee({fetchers:new Map(b.fetchers)});let we=new AbortController,bt=Pf(e.history,Z,we.signal,Ne);H.set(R,we);let je=q,Le=await kf("action",bt,ve,Pe,i,a,l);if(bt.signal.aborted){H.get(R)===we&&H.delete(R);return}if(pc(Le))if(H.delete(R),Q>je){let Ue=Ru(void 0);b.fetchers.set(R,Ue),ee({fetchers:new Map(b.fetchers)});return}else{Y.add(R);let Ue=Nf(Ne);return b.fetchers.set(R,Ue),ee({fetchers:new Map(b.fetchers)}),Pt(b,Le,{fetcherSubmission:Ne})}if(ph(Le)){en(R,L,Le.error);return}if(vl(Le))throw Jr(400,{type:"defer-action"});let pt=b.navigation.location||b.location,At=Pf(e.history,pt,we.signal),ri=s||o,ai=b.navigation.state!=="idle"?Qu(ri,b.navigation.location,l):b.matches;ze(ai,"Didn't find any matches after fetcher action");let zi=++q;X.set(R,zi);let Oo=Nf(Ne,Le.data);b.fetchers.set(R,Oo);let[Ar,Mr]=MT(e.history,b,ai,Ne,pt,A,M,j,oe,Y,ri,l,{[ve.route.id]:Le.data},void 0);Mr.filter(Ue=>Ue.key!==R).forEach(Ue=>{let Fn=Ue.key,vr=b.fetchers.get(Fn),yf=Nf(void 0,vr?vr.data:void 0);b.fetchers.set(Fn,yf),H.has(Fn)&&Nt(Fn),Ue.controller&&H.set(Fn,Ue.controller)}),ee({fetchers:new Map(b.fetchers)});let ko=()=>Mr.forEach(Ue=>Nt(Ue.key));we.signal.addEventListener("abort",ko);let{results:gf,loaderResults:Zs,fetcherResults:xu}=await ht(b.matches,ai,Ar,Mr,At);if(we.signal.aborted)return;we.signal.removeEventListener("abort",ko),X.delete(R),H.delete(R),Mr.forEach(Ue=>H.delete(Ue.key));let ft=UT(gf);if(ft){if(ft.idx>=Ar.length){let Ue=Mr[ft.idx-Ar.length].key;Y.add(Ue)}return Pt(b,ft.result)}let{loaderData:Rr,errors:Re}=LT(b,b.matches,Ar,Zs,void 0,Mr,xu,U);if(b.fetchers.has(R)){let Ue=Ru(Le.data);b.fetchers.set(R,Ue)}let Et=he(zi);b.navigation.state==="loading"&&zi>Q?(ze(C,"Expected pending action"),T&&T.abort(),me(b.navigation.location,{matches:ai,loaderData:Rr,errors:Re,fetchers:new Map(b.fetchers)})):(ee(Kt({errors:Re,loaderData:FT(b.loaderData,Rr,ai,Re)},Et||Mr.length>0?{fetchers:new Map(b.fetchers)}:{})),A=!1)}async function Ge(R,L,Z,ve,Pe,Ne){let Me=b.fetchers.get(R),xe=Nf(Ne,Me?Me.data:void 0);b.fetchers.set(R,xe),ee({fetchers:new Map(b.fetchers)});let we=new AbortController,bt=Pf(e.history,Z,we.signal);H.set(R,we);let je=q,Le=await kf("loader",bt,ve,Pe,i,a,l);if(vl(Le)&&(Le=await bR(Le,bt.signal,!0)||Le),H.get(R)===we&&H.delete(R),bt.signal.aborted)return;if(pc(Le))if(Q>je){let At=Ru(void 0);b.fetchers.set(R,At),ee({fetchers:new Map(b.fetchers)});return}else{Y.add(R),await Pt(b,Le);return}if(ph(Le)){let At=Xu(b.matches,L);b.fetchers.delete(R),ee({fetchers:new Map(b.fetchers),errors:{[At.route.id]:Le.error}});return}ze(!vl(Le),"Unhandled fetcher deferred data");let pt=Ru(Le.data);b.fetchers.set(R,pt),ee({fetchers:new Map(b.fetchers)})}async function Pt(R,L,Z){let{submission:ve,fetcherSubmission:Pe,replace:Ne}=Z===void 0?{}:Z;L.revalidate&&(A=!0);let Me=qh(R.location,L.location,{_isRedirect:!0});if(ze(Me,"Expected a location on the redirect navigation"),n){let pt=!1;if(L.reloadDocument)pt=!0;else if(gR.test(L.location)){const At=e.history.createURL(L.location);pt=At.origin!==t.location.origin||fu(At.pathname,l)==null}if(pt){Ne?t.location.replace(L.location):t.location.assign(L.location);return}}T=null;let xe=Ne===!0?hn.Replace:hn.Push,{formMethod:we,formAction:bt,formEncType:je}=R.navigation;!ve&&!Pe&&we&&bt&&je&&(ve=HT(R.navigation));let Le=ve||Pe;if(RB.has(L.status)&&Le&&Aa(Le.formMethod))await Te(xe,Me,{submission:Kt({},Le,{formAction:L.location}),preventScrollReset:E});else{let pt=Dw(Me,ve);await Te(xe,Me,{overrideNavigation:pt,fetcherSubmission:Pe,preventScrollReset:E})}}async function ht(R,L,Z,ve,Pe){let Ne=await Promise.all([...Z.map(we=>kf("loader",Pe,we,L,i,a,l)),...ve.map(we=>we.matches&&we.match&&we.controller?kf("loader",Pf(e.history,we.path,we.controller.signal),we.match,we.matches,i,a,l):{type:ln.error,error:Jr(404,{pathname:we.path})})]),Me=Ne.slice(0,Z.length),xe=Ne.slice(Z.length);return await Promise.all([zT(R,Z,Me,Me.map(()=>Pe.signal),!1,b.loaderData),zT(R,ve.map(we=>we.match),xe,ve.map(we=>we.controller?we.controller.signal:null),!0)]),{results:Ne,loaderResults:Me,fetcherResults:xe}}function jt(){A=!0,M.push(...Fe()),oe.forEach((R,L)=>{H.has(L)&&(j.push(L),Nt(L))})}function en(R,L,Z){let ve=Xu(b.matches,L);bn(R),ee({errors:{[ve.route.id]:Z},fetchers:new Map(b.fetchers)})}function bn(R){let L=b.fetchers.get(R);H.has(R)&&!(L&&L.state==="loading"&&X.has(R))&&Nt(R),oe.delete(R),X.delete(R),Y.delete(R),b.fetchers.delete(R)}function Nt(R){let L=H.get(R);ze(L,"Expected fetch controller: "+R),L.abort(),H.delete(R)}function pr(R){for(let L of R){let Z=Be(L),ve=Ru(Z.data);b.fetchers.set(L,ve)}}function $(){let R=[],L=!1;for(let Z of Y){let ve=b.fetchers.get(Z);ze(ve,"Expected fetcher: "+Z),ve.state==="loading"&&(Y.delete(Z),R.push(Z),L=!0)}return pr(R),L}function he(R){let L=[];for(let[Z,ve]of X)if(ve0}function F(R,L){let Z=b.blockers.get(R)||Of;return z.get(R)!==L&&z.set(R,L),Z}function K(R){b.blockers.delete(R),z.delete(R)}function ye(R,L){let Z=b.blockers.get(R)||Of;ze(Z.state==="unblocked"&&L.state==="blocked"||Z.state==="blocked"&&L.state==="blocked"||Z.state==="blocked"&&L.state==="proceeding"||Z.state==="blocked"&&L.state==="unblocked"||Z.state==="proceeding"&&L.state==="unblocked","Invalid blocker state transition: "+Z.state+" -> "+L.state);let ve=new Map(b.blockers);ve.set(R,L),ee({blockers:ve})}function Oe(R){let{currentLocation:L,nextLocation:Z,historyAction:ve}=R;if(z.size===0)return;z.size>1&&Ic(!1,"A router only supports one blocker at a time");let Pe=Array.from(z.entries()),[Ne,Me]=Pe[Pe.length-1],xe=b.blockers.get(Ne);if(!(xe&&xe.state==="proceeding")&&Me({currentLocation:L,nextLocation:Z,historyAction:ve}))return Ne}function Fe(R){let L=[];return U.forEach((Z,ve)=>{(!R||R(ve))&&(Z.cancel(),L.push(ve),U.delete(ve))}),L}function fn(R,L,Z){if(f=R,p=L,h=Z||null,!v&&b.navigation===Tw){v=!0;let ve=xa(b.location,b.matches);ve!=null&&ee({restoreScrollPosition:ve})}return()=>{f=null,p=null,h=null}}function er(R,L){return h&&h(R,L.map(ve=>fR(ve,b.loaderData)))||R.key}function mr(R,L){if(f&&p){let Z=er(R,L);f[Z]=p()}}function xa(R,L){if(f){let Z=er(R,L),ve=f[Z];if(typeof ve=="number")return ve}return null}function Do(R){i={},s=E1(R,a,void 0,i)}return _={get basename(){return l},get state(){return b},get routes(){return o},initialize:de,subscribe:De,enableScrollRestoration:fn,navigate:_e,fetch:dt,revalidate:Ce,createHref:R=>e.history.createHref(R),encodeLocation:R=>e.history.encodeLocation(R),getFetcher:Be,deleteFetcher:bn,dispose:Ee,getBlocker:F,deleteBlocker:K,_internalFetchControllers:H,_internalActiveDeferreds:U,_internalSetRoutes:Do},_}function FB(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function x1(e,t,n,r,a,i,o){let s,l;if(i!=null&&o!=="path"){s=[];for(let c of t)if(s.push(c),c.route.id===i){l=c;break}}else s=t,l=t[t.length-1];let u=Dy(a||".",Ip(s).map(c=>c.pathnameBase),fu(e.pathname,n)||e.pathname,o==="path");return a==null&&(u.search=e.search,u.hash=e.hash),(a==null||a===""||a===".")&&l&&l.route.index&&!iE(u.search)&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(u.pathname=u.pathname==="/"?n:to([n,u.pathname])),Fl(u)}function AT(e,t,n,r){if(!r||!FB(r))return{path:n};if(r.formMethod&&!WB(r.formMethod))return{path:n,error:Jr(405,{method:r.formMethod})};let a=()=>({path:n,error:Jr(400,{type:"invalid-body"})}),i=r.formMethod||"get",o=e?i.toUpperCase():i.toLowerCase(),s=wR(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Aa(o))return a();let f=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((h,p)=>{let[v,y]=p;return""+h+v+"="+y+` +`},""):String(r.body);return{path:n,submission:{formMethod:o,formAction:s,formEncType:r.formEncType,formData:void 0,json:void 0,text:f}}}else if(r.formEncType==="application/json"){if(!Aa(o))return a();try{let f=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:o,formAction:s,formEncType:r.formEncType,formData:void 0,json:f,text:void 0}}}catch{return a()}}}ze(typeof FormData=="function","FormData is not available in this environment");let l,u;if(r.formData)l=C1(r.formData),u=r.formData;else if(r.body instanceof FormData)l=C1(r.body),u=r.body;else if(r.body instanceof URLSearchParams)l=r.body,u=$T(l);else if(r.body==null)l=new URLSearchParams,u=new FormData;else try{l=new URLSearchParams(r.body),u=$T(l)}catch{return a()}let c={formMethod:o,formAction:s,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(Aa(c.formMethod))return{path:n,submission:c};let d=bo(n);return t&&d.search&&iE(d.search)&&l.append("index",""),d.search="?"+l,{path:Fl(d),submission:c}}function jB(e,t){let n=e;if(t){let r=e.findIndex(a=>a.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function MT(e,t,n,r,a,i,o,s,l,u,c,d,f,h){let p=h?Object.values(h)[0]:f?Object.values(f)[0]:void 0,v=e.createURL(t.location),y=e.createURL(a),g=h?Object.keys(h)[0]:void 0,_=jB(n,g).filter((C,E)=>{if(C.route.lazy)return!0;if(C.route.loader==null)return!1;if(UB(t.loaderData,t.matches[E],C)||o.some(A=>A===C.route.id))return!0;let T=t.matches[E],P=C;return RT(C,Kt({currentUrl:v,currentParams:T.params,nextUrl:y,nextParams:P.params},r,{actionResult:p,defaultShouldRevalidate:i||v.pathname+v.search===y.pathname+y.search||v.search!==y.search||yR(T,P)}))}),b=[];return l.forEach((C,E)=>{if(!n.some(j=>j.route.id===C.routeId))return;let T=Qu(c,C.path,d);if(!T){b.push({key:E,routeId:C.routeId,path:C.path,matches:null,match:null,controller:null});return}let P=t.fetchers.get(E),A=T1(T,C.path),M=!1;u.has(E)?M=!1:s.includes(E)?M=!0:P&&P.state!=="idle"&&P.data===void 0?M=i:M=RT(A,Kt({currentUrl:v,currentParams:t.matches[t.matches.length-1].params,nextUrl:y,nextParams:n[n.length-1].params},r,{actionResult:p,defaultShouldRevalidate:i})),M&&b.push({key:E,routeId:C.routeId,path:C.path,matches:T,match:A,controller:new AbortController})}),[_,b]}function UB(e,t,n){let r=!t||n.route.id!==t.route.id,a=e[n.route.id]===void 0;return r||a}function yR(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function RT(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function IT(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let a=n[e.id];ze(a,"No route found in manifest");let i={};for(let o in r){let l=a[o]!==void 0&&o!=="hasErrorBoundary";Ic(!l,'Route "'+a.id+'" has a static property "'+o+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+o+'" will be ignored.')),!l&&!uB.has(o)&&(i[o]=r[o])}Object.assign(a,i),Object.assign(a,Kt({},t(a),{lazy:void 0}))}async function kf(e,t,n,r,a,i,o,s){s===void 0&&(s={});let l,u,c,d=p=>{let v,y=new Promise((g,w)=>v=w);return c=()=>v(),t.signal.addEventListener("abort",c),Promise.race([p({request:t,params:n.params,context:s.requestContext}),y])};try{let p=n.route[e];if(n.route.lazy)if(p){let v,y=await Promise.all([d(p).catch(g=>{v=g}),IT(n.route,i,a)]);if(v)throw v;u=y[0]}else if(await IT(n.route,i,a),p=n.route[e],p)u=await d(p);else if(e==="action"){let v=new URL(t.url),y=v.pathname+v.search;throw Jr(405,{method:t.method,pathname:y,routeId:n.route.id})}else return{type:ln.data,data:void 0};else if(p)u=await d(p);else{let v=new URL(t.url),y=v.pathname+v.search;throw Jr(404,{pathname:y})}ze(u!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(p){l=ln.error,u=p}finally{c&&t.signal.removeEventListener("abort",c)}if(VB(u)){let p=u.status;if(MB.has(p)){let g=u.headers.get("Location");if(ze(g,"Redirects returned/thrown from loaders/actions must have a Location header"),!gR.test(g))g=x1(new URL(t.url),r.slice(0,r.indexOf(n)+1),o,!0,g);else if(!s.isStaticRequest){let w=new URL(t.url),_=g.startsWith("//")?new URL(w.protocol+g):new URL(g),b=fu(_.pathname,o)!=null;_.origin===w.origin&&b&&(g=_.pathname+_.search+_.hash)}if(s.isStaticRequest)throw u.headers.set("Location",g),u;return{type:ln.redirect,status:p,location:g,revalidate:u.headers.get("X-Remix-Revalidate")!==null,reloadDocument:u.headers.get("X-Remix-Reload-Document")!==null}}if(s.isRouteRequest)throw{type:l===ln.error?ln.error:ln.data,response:u};let v,y=u.headers.get("Content-Type");return y&&/\bapplication\/json\b/.test(y)?v=await u.json():v=await u.text(),l===ln.error?{type:l,error:new aE(p,u.statusText,v),headers:u.headers}:{type:ln.data,data:v,statusCode:u.status,headers:u.headers}}if(l===ln.error)return{type:l,error:u};if(BB(u)){var f,h;return{type:ln.deferred,deferredData:u,statusCode:(f=u.init)==null?void 0:f.status,headers:((h=u.init)==null?void 0:h.headers)&&new Headers(u.init.headers)}}return{type:ln.data,data:u}}function Pf(e,t,n,r){let a=e.createURL(wR(t)).toString(),i={signal:n};if(r&&Aa(r.formMethod)){let{formMethod:o,formEncType:s}=r;i.method=o.toUpperCase(),s==="application/json"?(i.headers=new Headers({"Content-Type":s}),i.body=JSON.stringify(r.json)):s==="text/plain"?i.body=r.text:s==="application/x-www-form-urlencoded"&&r.formData?i.body=C1(r.formData):i.body=r.formData}return new Request(a,i)}function C1(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function $T(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function zB(e,t,n,r,a){let i={},o=null,s,l=!1,u={};return n.forEach((c,d)=>{let f=t[d].route.id;if(ze(!pc(c),"Cannot handle redirect results in processLoaderData"),ph(c)){let h=Xu(e,f),p=c.error;r&&(p=Object.values(r)[0],r=void 0),o=o||{},o[h.route.id]==null&&(o[h.route.id]=p),i[f]=void 0,l||(l=!0,s=mR(c.error)?c.error.status:500),c.headers&&(u[f]=c.headers)}else vl(c)?(a.set(f,c.deferredData),i[f]=c.deferredData.data):i[f]=c.data,c.statusCode!=null&&c.statusCode!==200&&!l&&(s=c.statusCode),c.headers&&(u[f]=c.headers)}),r&&(o=r,i[Object.keys(r)[0]]=void 0),{loaderData:i,errors:o,statusCode:s||200,loaderHeaders:u}}function LT(e,t,n,r,a,i,o,s){let{loaderData:l,errors:u}=zB(t,n,r,a,s);for(let c=0;cr.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function jT(e){let t=e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Jr(e,t){let{pathname:n,routeId:r,method:a,type:i}=t===void 0?{}:t,o="Unknown Server Error",s="Unknown @remix-run/router error";return e===400?(o="Bad Request",a&&n&&r?s="You made a "+a+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":i==="defer-action"?s="defer() is not supported in actions":i==="invalid-body"&&(s="Unable to encode submission body")):e===403?(o="Forbidden",s='Route "'+r+'" does not match URL "'+n+'"'):e===404?(o="Not Found",s='No route matches URL "'+n+'"'):e===405&&(o="Method Not Allowed",a&&n&&r?s="You made a "+a.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":a&&(s='Invalid request method "'+a.toUpperCase()+'"')),new aE(e||500,o,new Error(s),!0)}function UT(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(pc(n))return{result:n,idx:t}}}function wR(e){let t=typeof e=="string"?bo(e):e;return Fl(Kt({},t,{hash:""}))}function HB(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function vl(e){return e.type===ln.deferred}function ph(e){return e.type===ln.error}function pc(e){return(e&&e.type)===ln.redirect}function BB(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function VB(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function WB(e){return AB.has(e.toLowerCase())}function Aa(e){return PB.has(e.toLowerCase())}async function zT(e,t,n,r,a,i){for(let o=0;od.route.id===l.route.id),c=u!=null&&!yR(u,l)&&(i&&i[l.route.id])!==void 0;if(vl(s)&&(a||c)){let d=r[o];ze(d,"Expected an AbortSignal for revalidating fetcher deferred result"),await bR(s,d,a).then(f=>{f&&(n[o]=f||n[o])})}}}async function bR(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:ln.data,data:e.deferredData.unwrappedData}}catch(a){return{type:ln.error,error:a}}return{type:ln.data,data:e.deferredData.data}}}function iE(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function T1(e,t){let n=typeof t=="string"?bo(t).search:t.search;if(e[e.length-1].route.index&&iE(n||""))return e[e.length-1];let r=Ip(e);return r[r.length-1]}function HT(e){let{formMethod:t,formAction:n,formEncType:r,text:a,formData:i,json:o}=e;if(!(!t||!n||!r)){if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:a};if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:i,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function Dw(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function YB(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Nf(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function GB(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Ru(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}/** + * React Router v6.16.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function dg(){return dg=Object.assign?Object.assign.bind():function(e){for(var t=1;tl.pathnameBase)),o=x.useRef(!1);return SR(()=>{o.current=!0}),x.useCallback(function(l,u){if(u===void 0&&(u={}),!o.current)return;if(typeof l=="number"){n.go(l);return}let c=Dy(l,JSON.parse(i),a,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:to([t,c.pathname])),(u.replace?n.replace:n.push)(c,u.state,u)},[t,n,i,a,e])}const QB=x.createContext(null);function XB(e){let t=x.useContext(Li).outlet;return t&&x.createElement(QB.Provider,{value:e},t)}function sE(){let{matches:e}=x.useContext(Li),t=e[e.length-1];return t?t.params:{}}function lE(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=x.useContext(Li),{pathname:a}=_o(),i=JSON.stringify(Ip(r).map(o=>o.pathnameBase));return x.useMemo(()=>Dy(e,JSON.parse(i),a,n==="path"),[e,i,a,n])}function ZB(e,t,n){tf()||ze(!1);let{navigator:r}=x.useContext(Ws),{matches:a}=x.useContext(Li),i=a[a.length-1],o=i?i.params:{};i&&i.pathname;let s=i?i.pathnameBase:"/";i&&i.route;let l=_o(),u;if(t){var c;let v=typeof t=="string"?bo(t):t;s==="/"||(c=v.pathname)!=null&&c.startsWith(s)||ze(!1),u=v}else u=l;let d=u.pathname||"/",f=s==="/"?d:d.slice(s.length)||"/",h=Qu(e,{pathname:f}),p=r6(h&&h.map(v=>Object.assign({},v,{params:Object.assign({},o,v.params),pathname:to([s,r.encodeLocation?r.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?s:to([s,r.encodeLocation?r.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),a,n);return t&&p?x.createElement(ky.Provider,{value:{location:dg({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:hn.Pop}},p):p}function JB(){let e=l6(),t=mR(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},i=null;return x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),n?x.createElement("pre",{style:a},n):null,i)}const e6=x.createElement(JB,null);class t6 extends x.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?x.createElement(Li.Provider,{value:this.props.routeContext},x.createElement(_R.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function n6(e){let{routeContext:t,match:n,children:r}=e,a=x.useContext($p);return a&&a.static&&a.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=n.route.id),x.createElement(Li.Provider,{value:t},r)}function r6(e,t,n){var r;if(t===void 0&&(t=[]),n===void 0&&(n=null),e==null){var a;if((a=n)!=null&&a.errors)e=n.matches;else return null}let i=e,o=(r=n)==null?void 0:r.errors;if(o!=null){let s=i.findIndex(l=>l.route.id&&(o==null?void 0:o[l.route.id]));s>=0||ze(!1),i=i.slice(0,Math.min(i.length,s+1))}return i.reduceRight((s,l,u)=>{let c=l.route.id?o==null?void 0:o[l.route.id]:null,d=null;n&&(d=l.route.errorElement||e6);let f=t.concat(i.slice(0,u+1)),h=()=>{let p;return c?p=d:l.route.Component?p=x.createElement(l.route.Component,null):l.route.element?p=l.route.element:p=s,x.createElement(n6,{match:l,routeContext:{outlet:s,matches:f,isDataRoute:n!=null},children:p})};return n&&(l.route.ErrorBoundary||l.route.errorElement||u===0)?x.createElement(t6,{location:n.location,revalidation:n.revalidation,component:d,error:c,children:h(),routeContext:{outlet:null,matches:f,isDataRoute:!0}}):h()},null)}var ER=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(ER||{}),$c=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}($c||{});function a6(e){let t=x.useContext($p);return t||ze(!1),t}function uE(e){let t=x.useContext(Oy);return t||ze(!1),t}function i6(e){let t=x.useContext(Li);return t||ze(!1),t}function xR(e){let t=i6(),n=t.matches[t.matches.length-1];return n.route.id||ze(!1),n.route.id}function o6(){return uE($c.UseNavigation).navigation}function s6(){let{matches:e,loaderData:t}=uE($c.UseMatches);return x.useMemo(()=>e.map(n=>fR(n,t)),[e,t])}function l6(){var e;let t=x.useContext(_R),n=uE($c.UseRouteError),r=xR($c.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function u6(){let{router:e}=a6(ER.UseNavigateStable),t=xR($c.UseNavigateStable),n=x.useRef(!1);return SR(()=>{n.current=!0}),x.useCallback(function(a,i){i===void 0&&(i={}),n.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,dg({fromRouteId:t},i)))},[e,t])}const c6="startTransition",BT=Uj[c6];function d6(e){let{fallbackElement:t,router:n,future:r}=e,[a,i]=x.useState(n.state),{v7_startTransition:o}=r||{},s=x.useCallback(d=>{o&&BT?BT(()=>i(d)):i(d)},[i,o]);x.useLayoutEffect(()=>n.subscribe(s),[n,s]);let l=x.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:d=>n.navigate(d),push:(d,f,h)=>n.navigate(d,{state:f,preventScrollReset:h==null?void 0:h.preventScrollReset}),replace:(d,f,h)=>n.navigate(d,{replace:!0,state:f,preventScrollReset:h==null?void 0:h.preventScrollReset})}),[n]),u=n.basename||"/",c=x.useMemo(()=>({router:n,navigator:l,static:!1,basename:u}),[n,l,u]);return x.createElement(x.Fragment,null,x.createElement($p.Provider,{value:c},x.createElement(Oy.Provider,{value:a},x.createElement(h6,{basename:u,location:a.location,navigationType:a.historyAction,navigator:l},a.initialized?x.createElement(f6,{routes:n.routes,state:a}):t))),null)}function f6(e){let{routes:t,state:n}=e;return ZB(t,void 0,n)}function CR(e){let{to:t,replace:n,state:r,relative:a}=e;tf()||ze(!1);let{matches:i}=x.useContext(Li),{pathname:o}=_o(),s=oE(),l=Dy(t,Ip(i).map(c=>c.pathnameBase),o,a==="path"),u=JSON.stringify(l);return x.useEffect(()=>s(JSON.parse(u),{replace:n,state:r,relative:a}),[s,u,a,n,r]),null}function TR(e){return XB(e.context)}function h6(e){let{basename:t="/",children:n=null,location:r,navigationType:a=hn.Pop,navigator:i,static:o=!1}=e;tf()&&ze(!1);let s=t.replace(/^\/*/,"/"),l=x.useMemo(()=>({basename:s,navigator:i,static:o}),[s,i,o]);typeof r=="string"&&(r=bo(r));let{pathname:u="/",search:c="",hash:d="",state:f=null,key:h="default"}=r,p=x.useMemo(()=>{let v=fu(u,s);return v==null?null:{location:{pathname:v,search:c,hash:d,state:f,key:h},navigationType:a}},[s,u,c,d,f,h,a]);return p==null?null:x.createElement(Ws.Provider,{value:l},x.createElement(ky.Provider,{children:n,value:p}))}new Promise(()=>{});function p6(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:x.createElement(e.Component),Component:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:x.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** + * React Router DOM v6.16.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function jl(){return jl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[a]=e[a]);return n}function m6(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function v6(e,t){return e.button===0&&(!t||t==="_self")&&!m6(e)}const g6=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],y6=["aria-current","caseSensitive","className","end","style","to","children"];function w6(e,t){return LB({basename:t==null?void 0:t.basename,future:jl({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:oB({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||b6(),routes:e,mapRouteProperties:p6}).initialize()}function b6(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=jl({},t,{errors:_6(t.errors)})),t}function _6(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,a]of t)if(a&&a.__type==="RouteErrorResponse")n[r]=new aE(a.status,a.statusText,a.data,a.internal===!0);else if(a&&a.__type==="Error"){if(a.__subType){let i=window[a.__subType];if(typeof i=="function")try{let o=new i(a.message);o.stack="",n[r]=o}catch{}}if(n[r]==null){let i=new Error(a.message);i.stack="",n[r]=i}}else n[r]=a;return n}const S6=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",E6=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ur=x.forwardRef(function(t,n){let{onClick:r,relative:a,reloadDocument:i,replace:o,state:s,target:l,to:u,preventScrollReset:c}=t,d=DR(t,g6),{basename:f}=x.useContext(Ws),h,p=!1;if(typeof u=="string"&&E6.test(u)&&(h=u,S6))try{let w=new URL(window.location.href),_=u.startsWith("//")?new URL(w.protocol+u):new URL(u),b=fu(_.pathname,f);_.origin===w.origin&&b!=null?u=b+_.search+_.hash:p=!0}catch{}let v=KB(u,{relative:a}),y=D6(u,{replace:o,state:s,target:l,preventScrollReset:c,relative:a});function g(w){r&&r(w),w.defaultPrevented||y(w)}return x.createElement("a",jl({},d,{href:h||v,onClick:p||i?r:g,ref:n,target:l}))}),Dm=x.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:a=!1,className:i="",end:o=!1,style:s,to:l,children:u}=t,c=DR(t,y6),d=lE(l,{relative:c.relative}),f=_o(),h=x.useContext(Oy),{navigator:p}=x.useContext(Ws),v=p.encodeLocation?p.encodeLocation(d).pathname:d.pathname,y=f.pathname,g=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;a||(y=y.toLowerCase(),g=g?g.toLowerCase():null,v=v.toLowerCase());let w=y===v||!o&&y.startsWith(v)&&y.charAt(v.length)==="/",_=g!=null&&(g===v||!o&&g.startsWith(v)&&g.charAt(v.length)==="/"),b=w?r:void 0,C;typeof i=="function"?C=i({isActive:w,isPending:_}):C=[i,w?"active":null,_?"pending":null].filter(Boolean).join(" ");let E=typeof s=="function"?s({isActive:w,isPending:_}):s;return x.createElement(ur,jl({},c,{"aria-current":b,className:C,ref:n,style:E,to:l}),typeof u=="function"?u({isActive:w,isPending:_}):u)});function x6(e){let{getKey:t,storageKey:n}=e;return O6({getKey:t,storageKey:n}),null}var D1;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(D1||(D1={}));var O1;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(O1||(O1={}));function C6(e){let t=x.useContext($p);return t||ze(!1),t}function T6(e){let t=x.useContext(Oy);return t||ze(!1),t}function D6(e,t){let{target:n,replace:r,state:a,preventScrollReset:i,relative:o}=t===void 0?{}:t,s=oE(),l=_o(),u=lE(e,{relative:o});return x.useCallback(c=>{if(v6(c,n)){c.preventDefault();let d=r!==void 0?r:Fl(l)===Fl(u);s(e,{replace:d,state:a,preventScrollReset:i,relative:o})}},[l,s,u,r,a,n,e,i,o])}const VT="react-router-scroll-positions";let Om={};function O6(e){let{getKey:t,storageKey:n}=e===void 0?{}:e,{router:r}=C6(D1.UseScrollRestoration),{restoreScrollPosition:a,preventScrollReset:i}=T6(O1.UseScrollRestoration),{basename:o}=x.useContext(Ws),s=_o(),l=s6(),u=o6();x.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),k6(x.useCallback(()=>{if(u.state==="idle"){let c=(t?t(s,l):null)||s.key;Om[c]=window.scrollY}sessionStorage.setItem(n||VT,JSON.stringify(Om)),window.history.scrollRestoration="auto"},[n,t,u.state,s,l])),typeof document<"u"&&(x.useLayoutEffect(()=>{try{let c=sessionStorage.getItem(n||VT);c&&(Om=JSON.parse(c))}catch{}},[n]),x.useLayoutEffect(()=>{let c=t&&o!=="/"?(f,h)=>t(jl({},f,{pathname:fu(f.pathname,o)||f.pathname}),h):t,d=r==null?void 0:r.enableScrollRestoration(Om,()=>window.scrollY,c);return()=>d&&d()},[r,o,t]),x.useLayoutEffect(()=>{if(a!==!1){if(typeof a=="number"){window.scrollTo(0,a);return}if(s.hash){let c=document.getElementById(decodeURIComponent(s.hash.slice(1)));if(c){c.scrollIntoView();return}}i!==!0&&window.scrollTo(0,0)}},[s,a,i]))}function k6(e,t){let{capture:n}=t||{};x.useEffect(()=>{let r=n!=null?{capture:n}:void 0;return window.addEventListener("pagehide",e,r),()=>{window.removeEventListener("pagehide",e,r)}},[e,n])}function N(){return N=Object.assign?Object.assign.bind():function(e){for(var t=1;t-1}function DV(e,t){var n=this.__data__,r=Ny(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function So(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=KV}var qV=1/0;function mu(e){if(typeof e=="string"||Lp(e))return e;var t=e+"";return t=="0"&&1/e==-qV?"-0":t}function QV(e,t,n){t=jp(t,e);for(var r=-1,a=t.length,i=!1;++ra?0:a+t),n=n>a?a:n,n<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(a);++r0){if(++t>=rW)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var sW=oW(nW);const $R=sW;function Ly(e,t){return $R(RR(e,t,Up),e+"")}var lW=Ly(JV);const ue=lW;var LR={exports:{}},uW="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",cW=uW,dW=cW;function FR(){}function jR(){}jR.resetWarningCache=FR;var fW=function(){function e(r,a,i,o,s,l){if(l!==dW){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:jR,resetWarningCache:FR};return n.PropTypes=n,n};LR.exports=fW();var hW=LR.exports;const I=Nr(hW);function be(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hg(e,t){return hg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},hg(e,t)}function UR(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,hg(e,t)}function Fy(e){return e===void 0}var pW=/\s/;function mW(e){for(var t=e.length;t--&&pW.test(e.charAt(t)););return t}var vW=/^\s+/;function gW(e){return e&&e.slice(0,mW(e)+1).replace(vW,"")}var XT=0/0,yW=/^[-+]0x[0-9a-f]+$/i,wW=/^0b[01]+$/i,bW=/^0o[0-7]+$/i,_W=parseInt;function zR(e){if(typeof e=="number")return e;if(Lp(e))return XT;if(qa(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=qa(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=gW(e);var n=wW.test(e);return n||bW.test(e)?_W(e.slice(2),n?2:8):yW.test(e)?XT:+e}var ZT=1/0,SW=17976931348623157e292;function k1(e){if(!e)return e===0?e:0;if(e=zR(e),e===ZT||e===-ZT){var t=e<0?-1:1;return t*SW}return e===e?e:0}function hE(e){var t=k1(e),n=t%1;return t===t?n?t-n:t:0}function HR(e,t){for(var n=-1,r=e==null?0:e.length,a=0,i=[];++ns))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var d=-1,f=!0,h=n&CY?new jc:void 0;for(i.set(e,t),i.set(t,e);++d-1}function iI(e,t,n){for(var r=-1,a=e==null?0:e.length;++r-1?a[i?t[o]:o]:void 0}}var N8=Math.max;function R1(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var a=n==null?0:hE(n);return a<0&&(a=N8(r+a,0)),nI(e,vu(t),a)}var A8=P8(R1);const sI=A8;function M8(e,t){var n;return rf(e,function(r,a,i){return n=t(r,a,i),!n}),!!n}function lI(e,t,n){if(!qa(n))return!1;var r=typeof t;return(r=="number"?Ui(n)&&Iy(t,n.length):r=="string"&&t in n)?Py(n[t],e):!1}function vh(e,t,n){var r=an(e)?KR:M8;return n&&lI(e,t,n)&&(t=void 0),r(e,vu(t))}var R8=function(t,n){return vh(x.Children.toArray(t),{type:n})},ne=function(t){return t==null||Array.isArray(t)&&t.length===0},I8={1:"one",2:"two",3:"three",4:"four",5:"five",6:"six",7:"seven",8:"eight",9:"nine",10:"ten",11:"eleven",12:"twelve",13:"thirteen",14:"fourteen",15:"fifteen",16:"sixteen"};function hD(e){var t=typeof e;return t==="string"||t==="number"?I8[e]||e:""}var D=function(t,n){return t&&n},An=function(t,n){return t&&t!==!0&&t+" "+n},kt=function(t,n){return t&&(t===!0?n:t+" "+n)},vg=function(t,n){return!t||t===!0?null:t.replace("large screen","large-screen").replace(/ vertically/g,"-vertically").split(" ").map(function(r){return r.replace("-"," ")+" "+n}).join(" ")},ni=function(t){return t==="justified"?"justified":An(t,"aligned")},xo=function(t){return An(t,"aligned")},ir=function(t,n,r){if(n===void 0&&(n=""),r===void 0&&(r=!1),r&&t==="equal")return"equal width";var a=typeof t;return(a==="string"||a==="number")&&n?hD(t)+" "+n:hD(t)},$8=200;function uI(e,t,n,r){var a=-1,i=aI,o=!0,s=e.length,l=[],u=t.length;if(!s)return l;n&&(t=Fp(t,jy(n))),r?(i=iI,o=!1):t.length>=$8&&(i=vE,o=!1,t=new jc(t));e:for(;++a0&&n(s)?t>1?Hy(s,t-1,n,r,a):yE(a,s):r||(a[a.length]=s)}return a}var F8=Ly(function(e,t){return mg(e)?uI(e,Hy(t,1,mg,!0)):[]});const mD=F8;function j8(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:fE(e,t,n)}function U8(e){return e.split("")}var z8="\\ud800-\\udfff",H8="\\u0300-\\u036f",B8="\\ufe20-\\ufe2f",V8="\\u20d0-\\u20ff",W8=H8+B8+V8,Y8="\\ufe0e\\ufe0f",G8="\\u200d",K8=RegExp("["+G8+z8+W8+Y8+"]");function bE(e){return K8.test(e)}var cI="\\ud800-\\udfff",q8="\\u0300-\\u036f",Q8="\\ufe20-\\ufe2f",X8="\\u20d0-\\u20ff",Z8=q8+Q8+X8,J8="\\ufe0e\\ufe0f",e5="["+cI+"]",I1="["+Z8+"]",$1="\\ud83c[\\udffb-\\udfff]",t5="(?:"+I1+"|"+$1+")",dI="[^"+cI+"]",fI="(?:\\ud83c[\\udde6-\\uddff]){2}",hI="[\\ud800-\\udbff][\\udc00-\\udfff]",n5="\\u200d",pI=t5+"?",mI="["+J8+"]?",r5="(?:"+n5+"(?:"+[dI,fI,hI].join("|")+")"+mI+pI+")*",a5=mI+pI+r5,i5="(?:"+[dI+I1+"?",I1,fI,hI,e5].join("|")+")",o5=RegExp($1+"(?="+$1+")|"+i5+a5,"g");function s5(e){return e.match(o5)||[]}function l5(e){return bE(e)?s5(e):U8(e)}function vI(e,t,n){t=="__proto__"&&fg?fg(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var u5=Object.prototype,c5=u5.hasOwnProperty;function _E(e,t,n){var r=e[t];(!(c5.call(e,t)&&Py(r,n))||n===void 0&&!(t in e))&&vI(e,t,n)}function d5(e,t,n,r){if(!qa(e))return e;t=jp(t,e);for(var a=-1,i=t.length,o=i-1,s=e;s!=null&&++a=0;a-=1)this.handlers[a].called||(this.handlers[a].called=!0,this.handlers[a](t));for(var i=r;i>=0;i-=1)this.handlers[i].called=!1}else(0,this.handlers[r])(t)}},{key:"hasHandlers",value:function(){return this.handlers.length>0}},{key:"removeHandlers",value:function(t){for(var n=[],r=this.handlers.length,a=0;a0;var n=this.handlerSets.get(t);return!!n&&n.hasHandlers()}},{key:"removeHandlers",value:function(t,n){var r=yD(this.handlerSets);if(!r.has(t))return new e(this.poolName,r);var a=r.get(t).removeHandlers(n);return a.hasHandlers()?r.set(t,a):r.delete(t),new e(this.poolName,r)}}]),e}();ua(L1,"createByType",function(e,t,n){var r=new Map;return r.set(t,new SI(n)),new L1(e,r)});var P5=function(){function e(t){var n=this;zp(this,e),ua(this,"handlers",new Map),ua(this,"pools",new Map),ua(this,"target",void 0),ua(this,"createEmitter",function(r){return function(a){n.pools.forEach(function(i){i.dispatchEvent(r,a)})}}),this.target=t}return Hp(e,[{key:"addHandlers",value:function(t,n,r){if(this.pools.has(t)){var a=this.pools.get(t);this.pools.set(t,a.addHandlers(n,r))}else this.pools.set(t,L1.createByType(t,n,r));this.handlers.has(n)||this.addTargetHandler(n)}},{key:"hasHandlers",value:function(){return this.handlers.size>0}},{key:"removeHandlers",value:function(t,n,r){if(this.pools.has(t)){var a=this.pools.get(t).removeHandlers(n,r);a.hasHandlers()?this.pools.set(t,a):this.pools.delete(t);var i=!1;this.pools.forEach(function(o){return i=i||o.hasHandlers(n)}),i||this.removeTargetHandler(n)}}},{key:"addTargetHandler",value:function(t){var n=this.createEmitter(t);this.handlers.set(t,n),this.target.addEventListener(t,n,!0)}},{key:"removeTargetHandler",value:function(t){this.handlers.has(t)&&(this.target.removeEventListener(t,this.handlers.get(t),!0),this.handlers.delete(t))}}]),e}(),N5=function(){function e(){var t=this;zp(this,e),ua(this,"targets",new Map),ua(this,"getTarget",function(n){var r=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],a=bD(n);if(t.targets.has(a))return t.targets.get(a);if(!r)return null;var i=new P5(a);return t.targets.set(a,i),i}),ua(this,"removeTarget",function(n){t.targets.delete(bD(n))})}return Hp(e,[{key:"sub",value:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(vD.canUseDOM){var a=r.target,i=a===void 0?document:a,o=r.pool,s=o===void 0?"default":o;this.getTarget(i).addHandlers(s,t,wD(n))}}},{key:"unsub",value:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(vD.canUseDOM){var a=r.target,i=a===void 0?document:a,o=r.pool,s=o===void 0?"default":o,l=this.getTarget(i,!1);l&&(l.removeHandlers(s,t,wD(n)),l.hasHandlers()||this.removeTarget(i))}}}]),e}(),F1=new N5,Nw=function(e){function t(){return zp(this,t),O5(this,bI(t).apply(this,arguments))}return T5(t,C5.PureComponent),Hp(t,[{key:"componentDidMount",value:function(){this.subscribe(this.props)}},{key:"componentDidUpdate",value:function(n){this.unsubscribe(n),this.subscribe(this.props)}},{key:"componentWillUnmount",value:function(){this.unsubscribe(this.props)}},{key:"subscribe",value:function(n){var r=n.name,a=n.on,i=n.pool,o=n.target;F1.sub(r,a,{pool:i,target:o})}},{key:"unsubscribe",value:function(n){var r=n.name,a=n.on,i=n.pool,o=n.target;F1.unsub(r,a,{pool:i,target:o})}},{key:"render",value:function(){return null}}]),t}();ua(Nw,"defaultProps",{pool:"default",target:"document"}),Nw.propTypes={},gg.instance=F1,gg.default=Nw;var CE;CE=gg;xE.exports=CE.default;var Nm=xE.exports.instance=CE.instance,A5=xE.exports;const Gi=Nr(A5);function EI(){}var M5=1/0,R5=mc&&1/gE(new mc([,-0]))[1]==M5?function(e){return new mc(e)}:EI;const I5=R5;var $5=200;function xI(e,t,n){var r=-1,a=aI,i=e.length,o=!0,s=[],l=s;if(n)o=!1,a=iI;else if(i>=$5){var u=t?null:I5(e);if(u)return gE(u);o=!1,a=vE,l=new jc}else l=t?[]:s;e:for(;++r-1:!!a&&rI(e,t,n)>-1}var DI=["selected","defaultValue","defaultChecked","accept","autoCapitalize","autoComplete","autoCorrect","autoFocus","checked","disabled","enterKeyHint","form","id","inputMode","lang","list","max","maxLength","min","minLength","multiple","name","pattern","placeholder","readOnly","required","step","title","type","value"],e7=["onKeyDown","onKeyPress","onKeyUp","onFocus","onBlur","onChange","onInput","onClick","onContextMenu","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart"],t7=[].concat(DI,e7),OI=["alt","height","src","srcSet","width","loading"],Jy=function(t,n){n===void 0&&(n={});var r=n,a=r.htmlProps,i=a===void 0?t7:a,o=r.includeAria,s=o===void 0?!0:o,l={},u={};return T8(t,function(c,d){var f=s&&(/^aria-.*$/.test(d)||d==="role"),h=xi(i,d)||f?l:u;h[d]=c}),[l,u]},n7=typeof document=="object"&&document!==null,r7=typeof window=="object"&&window!==null&&window.self===window,a7=function e(){return qe(e.override)?n7&&r7:e.override};const Sl=a7;var i7=Math.max,o7=Math.min;function s7(e,t,n){return e>=o7(t,n)&&e"u"?e.initialState:e.defaultState,n=x.useState(t),r=n[0],a=n[1],i=typeof e.state>"u"?r:e.state,o=x.useRef(i);x.useEffect(function(){o.current=i},[i]);var s=x.useCallback(function(l){typeof l=="function"?o.current=l(o.current):o.current=l,a(o.current)},[]);return[i,s]}var h7=Sl()?m.useLayoutEffect:m.useEffect;const Hc=h7;var p7=/\s+/;function m7(e){var t=[];return e?(e.forEach(function(n){if(typeof n.current=="string"){var r=n.current.split(p7);r.forEach(function(a){t.push(a)})}}),t.filter(function(n,r,a){return n.length>0&&a.indexOf(n)===r})):[]}function v7(e,t){return[t.filter(function(n){return e.indexOf(n)===-1}),e.filter(function(n){return t.indexOf(n)===-1})]}var ED=new Map,Aw=function(t,n){var r=m7(n),a=v7(ED.get(t)||[],r),i=a[0],o=a[1];t&&(i.forEach(function(s){return t.classList.add(s)}),o.forEach(function(s){return t.classList.remove(s)})),ED.set(t,r)},g7=function(){var t=this;this.add=function(n,r){if(t.nodes.has(n)){var a=t.nodes.get(n);a.add(r);return}var i=new Set;i.add(r),t.nodes.set(n,i)},this.del=function(n,r){if(t.nodes.has(n)){var a=t.nodes.get(n);if(a.size===1){t.nodes.delete(n);return}a.delete(r)}},this.emit=function(n,r){r(n,t.nodes.get(n))},this.nodes=new Map},Mf=new g7;function y7(e,t){var n=m.useRef(),r=m.useRef(!1);Hc(function(){if(n.current=t,r.current){var a=U1(e)?e.current:e;Mf.emit(a,Aw)}r.current=!0},[t]),Hc(function(){var a=U1(e)?e.current:e;return Mf.add(a,n),Mf.emit(a,Aw),function(){Mf.del(a,n),Mf.emit(a,Aw)}},[e])}function ds(e){var t=x.useRef(function(){});return Hc(function(){t.current=e},[e]),x.useCallback(function(){var n=t.current;return n.apply(void 0,arguments)},[t])}function Jh(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function Co(e,t){var n=x.useCallback(function(r){n.current=r,Jh(e,r),Jh(t,r)},[e,t]);return n}function w7(e){var t=x.useRef();return x.useEffect(function(){t.current=e}),t.current}var b7=Ly(function(e,t){return mg(e)?uI(e,t):[]});const _7=b7;var Hl=m.forwardRef(function(e,t){var n=e.children,r=e.className,a=e.content,i=e.size,o=V(i,"icons",r),s=G(Hl,e),l=J(Hl,e);return m.createElement(l,N({},s,{className:o,ref:t}),ne(n)?a:n)});Hl.handledProps=["as","children","className","content","size"];Hl.displayName="IconGroup";Hl.propTypes={};Hl.defaultProps={as:"i"};const S7=Hl;function E7(e){var t={},n=e["aria-label"],r=e["aria-hidden"];return qe(n)?t["aria-hidden"]="true":t["aria-label"]=n,qe(r)||(t["aria-hidden"]=r),t}var Bc=m.forwardRef(function(e,t){var n=e.bordered,r=e.circular,a=e.className,i=e.color,o=e.corner,s=e.disabled,l=e.fitted,u=e.flipped,c=e.inverted,d=e.link,f=e.loading,h=e.name,p=e.rotated,v=e.size,y=V(i,h,v,D(n,"bordered"),D(r,"circular"),D(s,"disabled"),D(l,"fitted"),D(c,"inverted"),D(d,"link"),D(f,"loading"),kt(o,"corner"),An(u,"flipped"),An(p,"rotated"),"icon",a),g=G(Bc,e),w=J(Bc,e),_=E7(e),b=ds(function(C){if(s){C.preventDefault();return}ue(e,"onClick",C,e)});return m.createElement(w,N({},g,_,{className:y,onClick:b,ref:t}))});Bc.handledProps=["aria-hidden","aria-label","as","bordered","circular","className","color","corner","disabled","fitted","flipped","inverted","link","loading","name","rotated","size"];Bc.displayName="Icon";Bc.propTypes={};var ep=m.memo(Bc);ep.Group=S7;ep.create=$e(ep,function(e){return{name:e}});ep.defaultProps={as:"i"};const rn=ep;var xD=function(t){return t!==null&&!Array.isArray(t)&&typeof t=="object"},yg={3:"Cancel",6:"Help",8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",28:"Convert",29:"NonConvert",30:"Accept",31:"ModeChange",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",41:"Select",42:"Print",43:"Execute",44:"PrintScreen",45:"Insert",46:"Delete",48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],91:"OS",93:"ContextMenu",144:"NumLock",145:"ScrollLock",181:"VolumeMute",182:"VolumeDown",183:"VolumeUp",186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"'],224:"Meta",225:"AltGraph",246:"Attn",247:"CrSel",248:"ExSel",249:"EraseEof",250:"Play",251:"ZoomOut"};for(var Am=0;Am<24;Am+=1)yg[112+Am]="F"+(Am+1);for(var Mw=0;Mw<26;Mw+=1){var Rw=Mw+65;yg[Rw]=[String.fromCharCode(Rw+32),String.fromCharCode(Rw)]}var se={codes:yg,getCode:function(t){return xD(t)?t.keyCode||t.which||this[t.key]:this[t]},getKey:function(t){var n=xD(t);if(n&&t.key)return t.key;var r=yg[n?t.keyCode||t.which:t];return Array.isArray(r)&&(n?r=r[t.shiftKey?1:0]:r=r[0]),r},Cancel:3,Help:6,Backspace:8,Tab:9,Clear:12,Enter:13,Shift:16,Control:17,Alt:18,Pause:19,CapsLock:20,Escape:27,Convert:28,NonConvert:29,Accept:30,ModeChange:31," ":32,PageUp:33,PageDown:34,End:35,Home:36,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Select:41,Print:42,Execute:43,PrintScreen:44,Insert:45,Delete:46,0:48,")":48,1:49,"!":49,2:50,"@":50,3:51,"#":51,4:52,$:52,5:53,"%":53,6:54,"^":54,7:55,"&":55,8:56,"*":56,9:57,"(":57,a:65,A:65,b:66,B:66,c:67,C:67,d:68,D:68,e:69,E:69,f:70,F:70,g:71,G:71,h:72,H:72,i:73,I:73,j:74,J:74,k:75,K:75,l:76,L:76,m:77,M:77,n:78,N:78,o:79,O:79,p:80,P:80,q:81,Q:81,r:82,R:82,s:83,S:83,t:84,T:84,u:85,U:85,v:86,V:86,w:87,W:87,x:88,X:88,y:89,Y:89,z:90,Z:90,OS:91,ContextMenu:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,F16:127,F17:128,F18:129,F19:130,F20:131,F21:132,F22:133,F23:134,F24:135,NumLock:144,ScrollLock:145,VolumeMute:181,VolumeDown:182,VolumeUp:183,";":186,":":186,"=":187,"+":187,",":188,"<":188,"-":189,_:189,".":190,">":190,"/":191,"?":191,"`":192,"~":192,"[":219,"{":219,"\\":220,"|":220,"]":221,"}":221,"'":222,'"':222,Meta:224,AltGraph:225,Attn:246,CrSel:247,ExSel:248,EraseEof:249,Play:250,ZoomOut:251};se.Spacebar=se[" "];se.Digit0=se[0];se.Digit1=se[1];se.Digit2=se[2];se.Digit3=se[3];se.Digit4=se[4];se.Digit5=se[5];se.Digit6=se[6];se.Digit7=se[7];se.Digit8=se[8];se.Digit9=se[9];se.Tilde=se["~"];se.GraveAccent=se["`"];se.ExclamationPoint=se["!"];se.AtSign=se["@"];se.PoundSign=se["#"];se.PercentSign=se["%"];se.Caret=se["^"];se.Ampersand=se["&"];se.PlusSign=se["+"];se.MinusSign=se["-"];se.EqualsSign=se["="];se.DivisionSign=se["/"];se.MultiplicationSign=se["*"];se.Comma=se[","];se.Decimal=se["."];se.Colon=se[":"];se.Semicolon=se[";"];se.Pipe=se["|"];se.BackSlash=se["\\"];se.QuestionMark=se["?"];se.SingleQuote=se["'"];se.DoubleQuote=se['"'];se.LeftCurlyBrace=se["{"];se.RightCurlyBrace=se["}"];se.LeftParenthesis=se["("];se.RightParenthesis=se[")"];se.LeftAngleBracket=se["<"];se.RightAngleBracket=se[">"];se.LeftSquareBracket=se["["];se.RightSquareBracket=se["]"];var x7=se;const xn=Nr(x7);function C7(e,t){var n=Co(e==null?void 0:e.ref,t);return e?[n,m.cloneElement(e,{ref:n})]:[n,null]}function kI(e,t){var n=Co(e.ref,t);if(m.isValidElement(e)){if(W5.isForwardRef(e))return m.cloneElement(e,{ref:n});if(typeof e.type=="string")return m.cloneElement(e,{ref:n})}return m.createElement("div",{"data-suir-portal":"true",ref:n},e)}kI.handledProps=[];var e0=m.forwardRef(function(e,t){var n=ds(function(){return ue(e,"onMount",null,e)}),r=ds(function(){return ue(e,"onUnmount",null,e)}),a=kI(e.children,t);return m.useEffect(function(){return n(),function(){r()}},[]),Sl()?Qd.createPortal(a,e.mountNode||document.body):null});e0.handledProps=["children","mountNode","onMount","onUnmount"];e0.displayName="PortalInner";e0.propTypes={children:I.node.isRequired,mountNode:I.any,onMount:I.func,onUnmount:I.func};const PI=e0;function Qa(e){var t=e.children,n=e.closeOnDocumentClick,r=e.closeOnEscape,a=e.closeOnPortalMouseLeave,i=e.closeOnTriggerBlur,o=e.closeOnTriggerClick,s=e.closeOnTriggerMouseLeave,l=e.eventPool,u=e.mountNode,c=e.mouseEnterDelay,d=e.mouseLeaveDelay,f=e.openOnTriggerClick,h=e.openOnTriggerFocus,p=e.openOnTriggerMouseEnter,v=zc({state:e.open,defaultState:e.defaultOpen,initialState:!1}),y=v[0],g=v[1],w=m.useRef(),_=C7(e.trigger,e.triggerRef),b=_[0],C=_[1],E=m.useRef(),T=m.useRef(),P=m.useRef(),A=function(ee){g(!0),ue(e,"onOpen",ee,N({},e,{open:!0}))},M=function(ee,me){var _e=N({},ee);return setTimeout(function(){return A(_e)},me||0)},j=function(ee){g(!1),ue(e,"onClose",ee,N({},e,{open:!1}))},H=function(ee,me){var _e=N({},ee);return setTimeout(function(){return j(_e)},me||0)};m.useEffect(function(){clearTimeout(E.current),clearTimeout(T.current)},[]);var q=function(ee){P.current=ee},Q=function(ee){var me,_e=P.current;P.current=null;var Ce=El(b.current,ee),Te=_e&&El(w.current,_e),le=El(w.current,ee);!((me=w.current)!=null&&me.contains)||Ce||Te||le||n&&j(ee)},X=function(ee){r&&xn.getCode(ee)===xn.Escape&&j(ee)},Y=function(ee){a&&ee.target===w.current&&(T.current=H(ee,d))},oe=function(){a&&clearTimeout(T.current)},U=function(ee){for(var me=arguments.length,_e=new Array(me>1?me-1:0),Ce=1;Ce1?me-1:0),Ce=1;Ce1?me-1:0),Ce=1;Ce1?me-1:0),Ce=1;Ce1?me-1:0),Ce=1;Ce=u}),u>=d.length-1&&(h=f[f.length-1]);else{var v=R1(d,["value",c]);h=xi(f,v)?v:void 0}return(!h||h<0)&&(h=f[0]),h}var RD=function(t,n){return qe(t)?n:t},ID=function(t){return t&&t.map(function(n){return SE(n,["key","value"])})};function f2(e){var t=e.flag,n=e.image,r=e.text;return Lc(r)?r:{content:m.createElement(m.Fragment,null,i2.create(t),hr.create(n),r)}}var Vr=m.forwardRef(function(e,t){return m.createElement(AE,N({},e,{innerRef:t}))});Vr.handledProps=["additionLabel","additionPosition","allowAdditions","as","basic","button","children","className","clearable","closeOnBlur","closeOnChange","closeOnEscape","compact","deburr","defaultOpen","defaultSearchQuery","defaultSelectedLabel","defaultUpward","defaultValue","direction","disabled","error","floating","fluid","header","icon","inline","item","labeled","lazyLoad","loading","minCharacters","multiple","noResultsMessage","onAddItem","onBlur","onChange","onClick","onClose","onFocus","onLabelClick","onMouseDown","onOpen","onSearchChange","open","openOnFocus","options","placeholder","pointing","renderLabel","scrolling","search","searchInput","searchQuery","selectOnBlur","selectOnNavigation","selectedLabel","selection","simple","tabIndex","text","trigger","upward","value","wrapSelection"];var AE=function(e){UR(t,e);function t(){for(var r,a=arguments.length,i=new Array(a),o=0;o=u||u===1){r.open(s);return}ue(r.searchRef.current,"focus")},r.handleIconClick=function(s){var l=r.props.clearable,u=r.hasValue();ue(r.props,"onClick",s,r.props),s.stopPropagation(),l&&u?r.clearValue(s):r.toggle(s)},r.handleItemClick=function(s,l){var u=r.props,c=u.multiple,d=u.search,f=r.state.value,h=l.value;if(s.stopPropagation(),(c||l.disabled)&&s.nativeEvent.stopImmediatePropagation(),!l.disabled){var p=l["data-additional"],v=c?AD(r.state.value,[h]):h,y=c?!!mD(v,f).length:v!==f;y&&(r.setState({value:v}),r.handleChange(s,v)),r.clearSearchQuery(),ue(d?r.searchRef.current:r.ref.current,"focus"),r.closeOnChange(s),p&&ue(r.props,"onAddItem",s,N({},r.props,{value:h}))}},r.handleFocus=function(s){var l=r.state.focus;l||(ue(r.props,"onFocus",s,r.props),r.setState({focus:!0}))},r.handleBlur=function(s){var l=Fa(s,"currentTarget");if(!(l&&l.contains(document.activeElement))){var u=r.props,c=u.closeOnBlur,d=u.multiple,f=u.selectOnBlur;r.isMouseDown||(ue(r.props,"onBlur",s,r.props),f&&!d&&(r.makeSelectedItemActive(s,r.state.selectedIndex),c&&r.close()),r.setState({focus:!1}),r.clearSearchQuery())}},r.handleSearchChange=function(s,l){var u=l.value;s.stopPropagation();var c=r.props.minCharacters,d=r.state.open,f=u;if(ue(r.props,"onSearchChange",s,N({},r.props,{searchQuery:f})),r.setState({searchQuery:f,selectedIndex:0}),!d&&f.length>=c){r.open();return}d&&c!==1&&f.lengthc||f<0)?f=l:f>c?f=0:f<0&&(f=c),u[f].disabled?r.getSelectedIndexAfterMove(s,f):f}},r.handleIconOverrides=function(s){var l=r.props.clearable,u=V(l&&r.hasValue()&&"clear",s.className);return{className:u,onClick:function(d){ue(s,"onClick",d,s),r.handleIconClick(d)}}},r.clearValue=function(s){var l=r.props.multiple,u=l?[]:"";r.setState({value:u}),r.handleChange(s,u)},r.computeSearchInputTabIndex=function(){var s=r.props,l=s.disabled,u=s.tabIndex;return qe(u)?l?-1:0:u},r.computeSearchInputWidth=function(){var s=r.state.searchQuery;if(r.sizerRef.current&&s){r.sizerRef.current.style.display="inline",r.sizerRef.current.textContent=s;var l=Math.ceil(r.sizerRef.current.getBoundingClientRect().width);return r.sizerRef.current.style.removeProperty("display"),l}},r.computeTabIndex=function(){var s=r.props,l=s.disabled,u=s.search,c=s.tabIndex;if(!u)return l?-1:qe(c)?0:c},r.handleSearchInputOverrides=function(s){return{onChange:function(u,c){ue(s,"onChange",u,c),r.handleSearchChange(u,c)},ref:r.searchRef}},r.hasValue=function(){var s=r.props.multiple,l=r.state.value;return s?!Pm(l):!qe(l)&&l!==""},r.scrollSelectedItemIntoView=function(){if(r.ref.current){var s=r.ref.current.querySelector(".menu.visible");if(s){var l=s.querySelector(".item.selected");if(l){var u=l.offsetTops.scrollTop+s.clientHeight;u?s.scrollTop=l.offsetTop:c&&(s.scrollTop=l.offsetTop+l.clientHeight-s.clientHeight)}}}},r.setOpenDirection=function(){if(r.ref.current){var s=r.ref.current.querySelector(".menu.visible");if(s){var l=r.ref.current.getBoundingClientRect(),u=s.clientHeight,c=document.documentElement.clientHeight-l.top-l.height-u,d=l.top-u,f=c<0&&d>c;!f!=!r.state.upward&&r.setState({upward:f})}}},r.open=function(s,l){s===void 0&&(s=null),l===void 0&&(l=!0);var u=r.props,c=u.disabled,d=u.search;c||(d&&ue(r.searchRef.current,"focus"),ue(r.props,"onOpen",s,r.props),l&&r.setState({open:!0}),r.scrollSelectedItemIntoView())},r.close=function(s,l){l===void 0&&(l=r.handleClose),r.state.open&&(ue(r.props,"onClose",s,r.props),r.setState({open:!1},l))},r.handleClose=function(){var s=document.activeElement===r.searchRef.current;!s&&r.ref.current&&r.ref.current.blur();var l=document.activeElement===r.ref.current,u=s||l;r.setState({focus:u})},r.toggle=function(s){return r.state.open?r.close(s):r.open(s)},r.renderText=function(){var s=r.props,l=s.multiple,u=s.placeholder,c=s.search,d=s.text,f=r.state,h=f.searchQuery,p=f.selectedIndex,v=f.value,y=f.open,g=r.hasValue(),w=V(u&&!g&&"default","text",c&&h&&"filtered"),_=u,b;return d?_=d:y&&!l?b=r.getSelectedItem(p):g&&(b=r.getItemByValue(v)),c2.create(b?f2(b):_,{defaultProps:{className:w}})},r.renderSearchInput=function(){var s=r.props,l=s.search,u=s.searchInput,c=r.state.searchQuery;return l&&u2.create(u,{defaultProps:{style:{width:r.computeSearchInputWidth()},tabIndex:r.computeSearchInputTabIndex(),value:c},overrideProps:r.handleSearchInputOverrides})},r.renderSearchSizer=function(){var s=r.props,l=s.search,u=s.multiple;return l&&u&&m.createElement("span",{className:"sizer",ref:r.sizerRef})},r.renderLabels=function(){var s=r.props,l=s.multiple,u=s.renderLabel,c=r.state,d=c.selectedLabel,f=c.value;if(!(!l||Pm(f))){var h=Tr(f,r.getItemByValue);return Tr(L9(h),function(p,v){var y={active:p.value===d,as:"a",key:RD(p.key,p.value),onClick:r.handleLabelClick,onRemove:r.handleLabelRemove,value:p.value};return Xn.create(u(p,v,y),{defaultProps:y})})}},r.renderOptions=function(){var s=r.props,l=s.lazyLoad,u=s.multiple,c=s.search,d=s.noResultsMessage,f=r.state,h=f.open,p=f.selectedIndex,v=f.value;if(l&&!h)return null;var y=Zu({value:r.state.value,options:r.props.options,searchQuery:r.state.searchQuery,additionLabel:r.props.additionLabel,additionPosition:r.props.additionPosition,allowAdditions:r.props.allowAdditions,deburr:r.props.deburr,multiple:r.props.multiple,search:r.props.search});if(d!==null&&c&&Pm(y))return m.createElement("div",{className:"message"},d);var g=u?function(w){return xi(v,w)}:function(w){return w===v};return Tr(y,function(w,_){return o2.create(N({active:g(w.value),selected:p===_},w,{key:RD(w.key,w.value),style:N({},w.style,{pointerEvents:"all"})}),{generateKey:!1,overrideProps:function(C){return{onClick:function(T,P){C.onClick==null||C.onClick(T,P),r.handleItemClick(T,P)}}}})})},r.renderMenu=function(){var s=r.props,l=s.children,u=s.direction,c=s.header,d=r.state.open,f=r.getDropdownMenuAriaOptions();if(!ne(l)){var h=x.Children.only(l),p=V(u,D(d,"visible"),h.props.className);return x.cloneElement(h,N({className:p},f))}return m.createElement(l2,N({},f,{direction:u,open:d}),s2.create(c,{autoGenerateKey:!1}),r.renderOptions())},r}var n=t.prototype;return n.getInitialAutoControlledState=function(){return{focus:!1,searchQuery:""}},t.getAutoControlledStateFromProps=function(a,i,o){var s={__options:a.options,__value:i.value},l=!gh(o.__value,i.value)||!c7(ID(a.options),ID(o.__options));return l&&(s.selectedIndex=MD({additionLabel:a.additionLabel,additionPosition:a.additionPosition,allowAdditions:a.allowAdditions,deburr:a.deburr,multiple:a.multiple,search:a.search,selectedIndex:i.selectedIndex,value:i.value,options:a.options,searchQuery:i.searchQuery})),s},n.componentDidMount=function(){var a=this.state.open;a&&this.open(null,!1)},n.shouldComponentUpdate=function(a,i){return!gh(a,this.props)||!gh(i,this.state)},n.componentDidUpdate=function(a,i){var o=this.props,s=o.closeOnBlur,l=o.minCharacters,u=o.openOnFocus,c=o.search;if(!i.focus&&this.state.focus){if(!this.isMouseDown){var d=!c||c&&l===1&&!this.state.open;u&&d&&this.open()}}else i.focus&&!this.state.focus&&!this.isMouseDown&&s&&this.close();!i.open&&this.state.open?(this.setOpenDirection(),this.scrollSelectedItemIntoView()):i.open&&this.state.open,i.selectedIndex!==this.state.selectedIndex&&this.scrollSelectedItemIntoView()},n.getDropdownMenuAriaOptions=function(){var a=this.props,i=a.search,o=a.multiple,s={};return i&&(s["aria-multiselectable"]=o,s.role="listbox"),s},n.render=function(){var a=this.props,i=a.basic,o=a.button,s=a.className,l=a.compact,u=a.disabled,c=a.error,d=a.fluid,f=a.floating,h=a.icon,p=a.inline,v=a.item,y=a.labeled,g=a.loading,w=a.multiple,_=a.pointing,b=a.search,C=a.selection,E=a.scrolling,T=a.simple,P=a.trigger,A=this.state,M=A.focus,j=A.open,H=A.upward,q=V("ui",D(j,"active visible"),D(u,"disabled"),D(c,"error"),D(g,"loading"),D(i,"basic"),D(o,"button"),D(l,"compact"),D(d,"fluid"),D(f,"floating"),D(p,"inline"),D(y,"labeled"),D(v,"item"),D(w,"multiple"),D(b,"search"),D(C,"selection"),D(T,"simple"),D(E,"scrolling"),D(H,"upward"),kt(_,"pointing"),"dropdown",s),Q=G(Vr,this.props),X=J(Vr,this.props),Y=this.getDropdownAriaOptions(X,this.props);return m.createElement(X,N({},Q,Y,{className:q,onBlur:this.handleBlur,onClick:this.handleClick,onKeyDown:this.handleKeyDown,onMouseDown:this.handleMouseDown,onFocus:this.handleFocus,onChange:this.handleChange,tabIndex:this.computeTabIndex(),ref:this.handleRef}),this.renderLabels(),this.renderSearchInput(),this.renderSearchSizer(),P||this.renderText(),rn.create(h,{overrideProps:this.handleIconOverrides,autoGenerateKey:!1}),this.renderMenu(),j&&m.createElement(Gi,{name:"keydown",on:this.closeOnEscape}),j&&m.createElement(Gi,{name:"click",on:this.closeOnDocumentClick}),M&&m.createElement(Gi,{name:"keydown",on:this.removeItemOnBackspace}))},t}(k8);AE.handledProps=[];Vr.propTypes={};Vr.displayName="Dropdown";Vr.defaultProps={additionLabel:"Add ",additionPosition:"top",closeOnBlur:!0,closeOnEscape:!0,deburr:!1,icon:"dropdown",minCharacters:1,noResultsMessage:"No results found.",openOnFocus:!0,renderLabel:f2,searchInput:"text",selectOnBlur:!0,selectOnNavigation:!0,wrapSelection:!0};AE.autoControlledProps=["open","searchQuery","selectedLabel","value","upward"];Vr.Divider=sG;Vr.Header=s2;Vr.Item=o2;Vr.Menu=l2;Vr.SearchInput=u2;Vr.Text=c2;const vi=Vr;var Gs=m.forwardRef(function(e,t){return m.createElement(vi,N({},e,{selection:!0,ref:t}))});Gs.handledProps=["options"];Gs.displayName="Select";Gs.propTypes={};Gs.Divider=vi.Divider;Gs.Header=vi.Header;Gs.Item=vi.Item;Gs.Menu=vi.Menu;const h2=Gs;var Vl=m.forwardRef(function(e,t){var n=e.rows,r=e.value,a=Co(t,m.useRef()),i=function(c){var d=Fa(c,"target.value");ue(e,"onChange",c,N({},e,{value:d}))},o=function(c){var d=Fa(c,"target.value");ue(e,"onInput",c,N({},e,{value:d}))},s=G(Vl,e),l=J(Vl,e);return m.createElement(l,N({},s,{onChange:i,onInput:o,ref:a,rows:n,value:r}))});Vl.handledProps=["as","onChange","onInput","rows","value"];Vl.displayName="TextArea";Vl.propTypes={};Vl.defaultProps={as:"textarea",rows:3};const cG=Vl;var rd=m.forwardRef(function(e,t){var n=e.children,r=e.className,a=e.content,i=e.control,o=e.disabled,s=e.error,l=e.inline,u=e.label,c=e.required,d=e.type,f=e.width,h=e.id,p=V(D(o,"disabled"),D(s,"error"),D(l,"inline"),D(c,"required"),ir(f,"wide"),"field",r),v=G(rd,e),y=J(rd,e),g=Fa(s,"pointing","above"),w=Xn.create(s,{autoGenerateKey:!1,defaultProps:{prompt:!0,pointing:g,id:h?h+"-error-message":void 0,role:"alert","aria-atomic":!0}}),_=(g==="below"||g==="right")&&w,b=(g==="above"||g==="left")&&w;if(qe(i))return qe(u)?m.createElement(y,N({},v,{className:p,id:h,ref:t}),ne(n)?a:n):m.createElement(y,N({},v,{className:p,id:h,ref:t}),_,j1(u,{autoGenerateKey:!1}),b);var C=h&&s?h+"-error-message":null,E={"aria-describedby":C,"aria-invalid":s?!0:void 0},T=N({},v,{content:a,children:n,disabled:o,required:c,type:d,id:h,ref:t});return i==="input"&&(d==="checkbox"||d==="radio")?m.createElement(y,{className:p},m.createElement("label",null,_,x.createElement(i,N({},E,T))," ",u,b)):i===NE||i===ZI?m.createElement(y,{className:p},_,x.createElement(i,N({},E,T,{label:u})),b):m.createElement(y,{className:p},j1(u,{defaultProps:{htmlFor:h},autoGenerateKey:!1}),_,x.createElement(i,N({},E,T)),b)});rd.handledProps=["as","children","className","content","control","disabled","error","id","inline","label","required","type","width"];rd.displayName="FormField";rd.propTypes={};const Ks=rd;var Wl=m.forwardRef(function(e,t){var n=e.control,r=G(Wl,e),a=J(Wl,e);return m.createElement(a,N({},r,{control:n,ref:t}))});Wl.handledProps=["as","control"];Wl.displayName="FormButton";Wl.propTypes={};Wl.defaultProps={as:Ks,control:Ye};const dG=Wl;var Yl=m.forwardRef(function(e,t){var n=e.control,r=G(Yl,e),a=J(Yl,e);return m.createElement(a,N({},r,{control:n,ref:t}))});Yl.handledProps=["as","control"];Yl.displayName="FormCheckbox";Yl.propTypes={};Yl.defaultProps={as:Ks,control:NE};const fG=Yl;var Gl=m.forwardRef(function(e,t){var n=e.control,r=G(Gl,e),a=J(Gl,e);return m.createElement(a,N({},r,{control:n,ref:t}))});Gl.handledProps=["as","control"];Gl.displayName="FormDropdown";Gl.propTypes={};Gl.defaultProps={as:Ks,control:vi};const hG=Gl;var ad=m.forwardRef(function(e,t){var n=e.children,r=e.className,a=e.grouped,i=e.inline,o=e.unstackable,s=e.widths,l=V(D(a,"grouped"),D(i,"inline"),D(o,"unstackable"),ir(s,null,!0),"fields",r),u=G(ad,e),c=J(ad,e);return m.createElement(c,N({},u,{className:l,ref:t}),n)});ad.handledProps=["as","children","className","grouped","inline","unstackable","widths"];ad.displayName="FormGroup";ad.propTypes={};const pG=ad;var uo=m.forwardRef(function(e,t){var n=e.action,r=e.actionPosition,a=e.children,i=e.className,o=e.disabled,s=e.error,l=e.fluid,u=e.focus,c=e.icon,d=e.iconPosition,f=e.input,h=e.inverted,p=e.label,v=e.labelPosition,y=e.loading,g=e.size,w=e.tabIndex,_=e.transparent,b=e.type,C=function(){if(!qe(c))return c;if(y)return"spinner"},E=function(){if(!qe(w))return w;if(o)return-1},T=function(U){var z=Fa(U,"target.value");ue(e,"onChange",U,N({},e,{value:z}))},P=function(){var U=G(uo,e),z=Jy(U),ae=z[0],de=z[1];return[N({},ae,{disabled:o,type:b,tabIndex:E(),onChange:T,ref:t}),de]},A=V("ui",g,D(o,"disabled"),D(s,"error"),D(l,"fluid"),D(u,"focus"),D(h,"inverted"),D(y,"loading"),D(_,"transparent"),An(r,"action")||D(n,"action"),An(d,"icon")||D(c||y,"icon"),An(v,"labeled")||D(p,"labeled"),"input",i),M=J(uo,e),j=P(),H=j[0],q=j[1];if(!ne(a)){var Q=Tr(m.Children.toArray(a),function(oe){return oe.type==="input"?m.cloneElement(oe,N({},H,oe.props,{ref:function(z){Jh(oe.ref,z),Jh(t,z)}})):oe});return m.createElement(M,N({},q,{className:A}),Q)}var X=Ye.create(n,{autoGenerateKey:!1}),Y=Xn.create(p,{defaultProps:{className:V("label",xi(v,"corner")&&v)},autoGenerateKey:!1});return m.createElement(M,N({},q,{className:A}),r==="left"&&X,v!=="right"&&Y,K5(f||b,{defaultProps:H,autoGenerateKey:!1}),rn.create(C(),{autoGenerateKey:!1}),r!=="left"&&X,v==="right"&&Y)});uo.handledProps=["action","actionPosition","as","children","className","disabled","error","fluid","focus","icon","iconPosition","input","inverted","label","labelPosition","loading","onChange","size","tabIndex","transparent","type"];uo.displayName="Input";uo.propTypes={};uo.defaultProps={type:"text"};uo.create=$e(uo,function(e){return{type:e}});const mG=uo;var Kl=m.forwardRef(function(e,t){var n=e.control,r=G(Kl,e),a=J(Kl,e);return m.createElement(a,N({},r,{control:n,ref:t}))});Kl.handledProps=["as","control"];Kl.displayName="FormInput";Kl.propTypes={};Kl.defaultProps={as:Ks,control:mG};const vG=Kl;var ql=m.forwardRef(function(e,t){var n=e.control,r=G(ql,e),a=J(ql,e);return m.createElement(a,N({},r,{control:n,ref:t}))});ql.handledProps=["as","control"];ql.displayName="FormRadio";ql.propTypes={};ql.defaultProps={as:Ks,control:ZI};const gG=ql;var Ql=m.forwardRef(function(e,t){var n=e.control,r=e.options,a=G(Ql,e),i=J(Ql,e);return m.createElement(i,N({},a,{control:n,options:r,ref:t}))});Ql.handledProps=["as","control","options"];Ql.displayName="FormSelect";Ql.propTypes={};Ql.defaultProps={as:Ks,control:h2};const yG=Ql;var Xl=m.forwardRef(function(e,t){var n=e.control,r=G(Xl,e),a=J(Xl,e);return m.createElement(a,N({},r,{control:n,ref:t}))});Xl.handledProps=["as","control"];Xl.displayName="FormTextArea";Xl.propTypes={};Xl.defaultProps={as:Ks,control:cG};const wG=Xl;var Jn=m.forwardRef(function(e,t){var n=e.action,r=e.children,a=e.className,i=e.error,o=e.inverted,s=e.loading,l=e.reply,u=e.size,c=e.success,d=e.unstackable,f=e.warning,h=e.widths,p=function(_){typeof n!="string"&&ue(_,"preventDefault");for(var b=arguments.length,C=new Array(b>1?b-1:0),E=1;E1?n-1:0),a=1;a"u")return!1;var t=Wr(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function XG(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},a=t.attributes[n]||{},i=t.elements[n];!ha(i)||!Mi(i)||(Object.assign(i.style,r),Object.keys(a).forEach(function(o){var s=a[o];s===!1?i.removeAttribute(o):i.setAttribute(o,s===!0?"":s)}))})}function ZG(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var a=t.elements[r],i=t.attributes[r]||{},o=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=o.reduce(function(l,u){return l[u]="",l},{});!ha(a)||!Mi(a)||(Object.assign(a.style,s),Object.keys(i).forEach(function(l){a.removeAttribute(l)}))})}}const JG={name:"applyStyles",enabled:!0,phase:"write",fn:XG,effect:ZG,requires:["computeStyles"]};function Ci(e){return e.split("-")[0]}var xl=Math.max,bg=Math.min,bd=Math.round;function K1(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function k2(){return!/^((?!chrome|android).)*safari/i.test(K1())}function _d(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),a=1,i=1;t&&ha(e)&&(a=e.offsetWidth>0&&bd(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&bd(r.height)/e.offsetHeight||1);var o=eu(e)?Wr(e):window,s=o.visualViewport,l=!k2()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/a,c=(r.top+(l&&s?s.offsetTop:0))/i,d=r.width/a,f=r.height/i;return{width:d,height:f,top:c,right:u+d,bottom:c+f,left:u,x:u,y:c}}function jE(e){var t=_d(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function P2(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&FE(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function ho(e){return Wr(e).getComputedStyle(e)}function eK(e){return["table","td","th"].indexOf(Mi(e))>=0}function qs(e){return((eu(e)?e.ownerDocument:e.document)||window.document).documentElement}function r0(e){return Mi(e)==="html"?e:e.assignedSlot||e.parentNode||(FE(e)?e.host:null)||qs(e)}function jD(e){return!ha(e)||ho(e).position==="fixed"?null:e.offsetParent}function tK(e){var t=/firefox/i.test(K1()),n=/Trident/i.test(K1());if(n&&ha(e)){var r=ho(e);if(r.position==="fixed")return null}var a=r0(e);for(FE(a)&&(a=a.host);ha(a)&&["html","body"].indexOf(Mi(a))<0;){var i=ho(a);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return a;a=a.parentNode}return null}function Vp(e){for(var t=Wr(e),n=jD(e);n&&eK(n)&&ho(n).position==="static";)n=jD(n);return n&&(Mi(n)==="html"||Mi(n)==="body"&&ho(n).position==="static")?t:n||tK(e)||t}function UE(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function yh(e,t,n){return xl(e,bg(t,n))}function nK(e,t,n){var r=yh(e,t,n);return r>n?n:r}function N2(){return{top:0,right:0,bottom:0,left:0}}function A2(e){return Object.assign({},N2(),e)}function M2(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var rK=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,A2(typeof t!="number"?t:M2(t,Bp))};function aK(e){var t,n=e.state,r=e.name,a=e.options,i=n.elements.arrow,o=n.modifiersData.popperOffsets,s=Ci(n.placement),l=UE(s),u=[Or,_a].indexOf(s)>=0,c=u?"height":"width";if(!(!i||!o)){var d=rK(a.padding,n),f=jE(i),h=l==="y"?Dr:Or,p=l==="y"?ba:_a,v=n.rects.reference[c]+n.rects.reference[l]-o[l]-n.rects.popper[c],y=o[l]-n.rects.reference[l],g=Vp(i),w=g?l==="y"?g.clientHeight||0:g.clientWidth||0:0,_=v/2-y/2,b=d[h],C=w-f[c]-d[p],E=w/2-f[c]/2+_,T=yh(b,E,C),P=l;n.modifiersData[r]=(t={},t[P]=T,t.centerOffset=T-E,t)}}function iK(e){var t=e.state,n=e.options,r=n.element,a=r===void 0?"[data-popper-arrow]":r;a!=null&&(typeof a=="string"&&(a=t.elements.popper.querySelector(a),!a)||P2(t.elements.popper,a)&&(t.elements.arrow=a))}const oK={name:"arrow",enabled:!0,phase:"main",fn:aK,effect:iK,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Sd(e){return e.split("-")[1]}var sK={top:"auto",right:"auto",bottom:"auto",left:"auto"};function lK(e,t){var n=e.x,r=e.y,a=t.devicePixelRatio||1;return{x:bd(n*a)/a||0,y:bd(r*a)/a||0}}function UD(e){var t,n=e.popper,r=e.popperRect,a=e.placement,i=e.variation,o=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,d=e.isFixed,f=o.x,h=f===void 0?0:f,p=o.y,v=p===void 0?0:p,y=typeof c=="function"?c({x:h,y:v}):{x:h,y:v};h=y.x,v=y.y;var g=o.hasOwnProperty("x"),w=o.hasOwnProperty("y"),_=Or,b=Dr,C=window;if(u){var E=Vp(n),T="clientHeight",P="clientWidth";if(E===Wr(n)&&(E=qs(n),ho(E).position!=="static"&&s==="absolute"&&(T="scrollHeight",P="scrollWidth")),E=E,a===Dr||(a===Or||a===_a)&&i===tp){b=ba;var A=d&&E===C&&C.visualViewport?C.visualViewport.height:E[T];v-=A-r.height,v*=l?1:-1}if(a===Or||(a===Dr||a===ba)&&i===tp){_=_a;var M=d&&E===C&&C.visualViewport?C.visualViewport.width:E[P];h-=M-r.width,h*=l?1:-1}}var j=Object.assign({position:s},u&&sK),H=c===!0?lK({x:h,y:v},Wr(n)):{x:h,y:v};if(h=H.x,v=H.y,l){var q;return Object.assign({},j,(q={},q[b]=w?"0":"",q[_]=g?"0":"",q.transform=(C.devicePixelRatio||1)<=1?"translate("+h+"px, "+v+"px)":"translate3d("+h+"px, "+v+"px, 0)",q))}return Object.assign({},j,(t={},t[b]=w?v+"px":"",t[_]=g?h+"px":"",t.transform="",t))}function uK(e){var t=e.state,n=e.options,r=n.gpuAcceleration,a=r===void 0?!0:r,i=n.adaptive,o=i===void 0?!0:i,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:Ci(t.placement),variation:Sd(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,UD(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,UD(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const cK={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:uK,data:{}};var Mm={passive:!0};function dK(e){var t=e.state,n=e.instance,r=e.options,a=r.scroll,i=a===void 0?!0:a,o=r.resize,s=o===void 0?!0:o,l=Wr(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach(function(c){c.addEventListener("scroll",n.update,Mm)}),s&&l.addEventListener("resize",n.update,Mm),function(){i&&u.forEach(function(c){c.removeEventListener("scroll",n.update,Mm)}),s&&l.removeEventListener("resize",n.update,Mm)}}const fK={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:dK,data:{}};var hK={left:"right",right:"left",bottom:"top",top:"bottom"};function _v(e){return e.replace(/left|right|bottom|top/g,function(t){return hK[t]})}var pK={start:"end",end:"start"};function zD(e){return e.replace(/start|end/g,function(t){return pK[t]})}function zE(e){var t=Wr(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function HE(e){return _d(qs(e)).left+zE(e).scrollLeft}function mK(e,t){var n=Wr(e),r=qs(e),a=n.visualViewport,i=r.clientWidth,o=r.clientHeight,s=0,l=0;if(a){i=a.width,o=a.height;var u=k2();(u||!u&&t==="fixed")&&(s=a.offsetLeft,l=a.offsetTop)}return{width:i,height:o,x:s+HE(e),y:l}}function vK(e){var t,n=qs(e),r=zE(e),a=(t=e.ownerDocument)==null?void 0:t.body,i=xl(n.scrollWidth,n.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),o=xl(n.scrollHeight,n.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),s=-r.scrollLeft+HE(e),l=-r.scrollTop;return ho(a||n).direction==="rtl"&&(s+=xl(n.clientWidth,a?a.clientWidth:0)-i),{width:i,height:o,x:s,y:l}}function BE(e){var t=ho(e),n=t.overflow,r=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+a+r)}function R2(e){return["html","body","#document"].indexOf(Mi(e))>=0?e.ownerDocument.body:ha(e)&&BE(e)?e:R2(r0(e))}function wh(e,t){var n;t===void 0&&(t=[]);var r=R2(e),a=r===((n=e.ownerDocument)==null?void 0:n.body),i=Wr(r),o=a?[i].concat(i.visualViewport||[],BE(r)?r:[]):r,s=t.concat(o);return a?s:s.concat(wh(r0(o)))}function q1(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function gK(e,t){var n=_d(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function HD(e,t,n){return t===D2?q1(mK(e,n)):eu(t)?gK(t,n):q1(vK(qs(e)))}function yK(e){var t=wh(r0(e)),n=["absolute","fixed"].indexOf(ho(e).position)>=0,r=n&&ha(e)?Vp(e):e;return eu(r)?t.filter(function(a){return eu(a)&&P2(a,r)&&Mi(a)!=="body"}):[]}function wK(e,t,n,r){var a=t==="clippingParents"?yK(e):[].concat(t),i=[].concat(a,[n]),o=i[0],s=i.reduce(function(l,u){var c=HD(e,u,r);return l.top=xl(c.top,l.top),l.right=bg(c.right,l.right),l.bottom=bg(c.bottom,l.bottom),l.left=xl(c.left,l.left),l},HD(e,o,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function I2(e){var t=e.reference,n=e.element,r=e.placement,a=r?Ci(r):null,i=r?Sd(r):null,o=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(a){case Dr:l={x:o,y:t.y-n.height};break;case ba:l={x:o,y:t.y+t.height};break;case _a:l={x:t.x+t.width,y:s};break;case Or:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=a?UE(a):null;if(u!=null){var c=u==="y"?"height":"width";switch(i){case wd:l[u]=l[u]-(t[c]/2-n[c]/2);break;case tp:l[u]=l[u]+(t[c]/2-n[c]/2);break}}return l}function np(e,t){t===void 0&&(t={});var n=t,r=n.placement,a=r===void 0?e.placement:r,i=n.strategy,o=i===void 0?e.strategy:i,s=n.boundary,l=s===void 0?jG:s,u=n.rootBoundary,c=u===void 0?D2:u,d=n.elementContext,f=d===void 0?Rf:d,h=n.altBoundary,p=h===void 0?!1:h,v=n.padding,y=v===void 0?0:v,g=A2(typeof y!="number"?y:M2(y,Bp)),w=f===Rf?UG:Rf,_=e.rects.popper,b=e.elements[p?w:f],C=wK(eu(b)?b:b.contextElement||qs(e.elements.popper),l,c,o),E=_d(e.elements.reference),T=I2({reference:E,element:_,strategy:"absolute",placement:a}),P=q1(Object.assign({},_,T)),A=f===Rf?P:E,M={top:C.top-A.top+g.top,bottom:A.bottom-C.bottom+g.bottom,left:C.left-A.left+g.left,right:A.right-C.right+g.right},j=e.modifiersData.offset;if(f===Rf&&j){var H=j[a];Object.keys(M).forEach(function(q){var Q=[_a,ba].indexOf(q)>=0?1:-1,X=[Dr,ba].indexOf(q)>=0?"y":"x";M[q]+=H[X]*Q})}return M}function bK(e,t){t===void 0&&(t={});var n=t,r=n.placement,a=n.boundary,i=n.rootBoundary,o=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?O2:l,c=Sd(r),d=c?s?FD:FD.filter(function(p){return Sd(p)===c}):Bp,f=d.filter(function(p){return u.indexOf(p)>=0});f.length===0&&(f=d);var h=f.reduce(function(p,v){return p[v]=np(e,{placement:v,boundary:a,rootBoundary:i,padding:o})[Ci(v)],p},{});return Object.keys(h).sort(function(p,v){return h[p]-h[v]})}function _K(e){if(Ci(e)===LE)return[];var t=_v(e);return[zD(e),t,zD(t)]}function SK(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var a=n.mainAxis,i=a===void 0?!0:a,o=n.altAxis,s=o===void 0?!0:o,l=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,f=n.altBoundary,h=n.flipVariations,p=h===void 0?!0:h,v=n.allowedAutoPlacements,y=t.options.placement,g=Ci(y),w=g===y,_=l||(w||!p?[_v(y)]:_K(y)),b=[y].concat(_).reduce(function(ee,me){return ee.concat(Ci(me)===LE?bK(t,{placement:me,boundary:c,rootBoundary:d,padding:u,flipVariations:p,allowedAutoPlacements:v}):me)},[]),C=t.rects.reference,E=t.rects.popper,T=new Map,P=!0,A=b[0],M=0;M=0,X=Q?"width":"height",Y=np(t,{placement:j,boundary:c,rootBoundary:d,altBoundary:f,padding:u}),oe=Q?q?_a:Or:q?ba:Dr;C[X]>E[X]&&(oe=_v(oe));var U=_v(oe),z=[];if(i&&z.push(Y[H]<=0),s&&z.push(Y[oe]<=0,Y[U]<=0),z.every(function(ee){return ee})){A=j,P=!1;break}T.set(j,z)}if(P)for(var ae=p?3:1,de=function(me){var _e=b.find(function(Ce){var Te=T.get(Ce);if(Te)return Te.slice(0,me).every(function(le){return le})});if(_e)return A=_e,"break"},Ee=ae;Ee>0;Ee--){var De=de(Ee);if(De==="break")break}t.placement!==A&&(t.modifiersData[r]._skip=!0,t.placement=A,t.reset=!0)}}const EK={name:"flip",enabled:!0,phase:"main",fn:SK,requiresIfExists:["offset"],data:{_skip:!1}};function BD(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function VD(e){return[Dr,_a,ba,Or].some(function(t){return e[t]>=0})}function xK(e){var t=e.state,n=e.name,r=t.rects.reference,a=t.rects.popper,i=t.modifiersData.preventOverflow,o=np(t,{elementContext:"reference"}),s=np(t,{altBoundary:!0}),l=BD(o,r),u=BD(s,a,i),c=VD(l),d=VD(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}const CK={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:xK};function TK(e,t,n){var r=Ci(e),a=[Or,Dr].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,o=i[0],s=i[1];return o=o||0,s=(s||0)*a,[Or,_a].indexOf(r)>=0?{x:s,y:o}:{x:o,y:s}}function DK(e){var t=e.state,n=e.options,r=e.name,a=n.offset,i=a===void 0?[0,0]:a,o=O2.reduce(function(c,d){return c[d]=TK(d,t.rects,i),c},{}),s=o[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=o}const OK={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:DK};function kK(e){var t=e.state,n=e.name;t.modifiersData[n]=I2({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const PK={name:"popperOffsets",enabled:!0,phase:"read",fn:kK,data:{}};function NK(e){return e==="x"?"y":"x"}function AK(e){var t=e.state,n=e.options,r=e.name,a=n.mainAxis,i=a===void 0?!0:a,o=n.altAxis,s=o===void 0?!1:o,l=n.boundary,u=n.rootBoundary,c=n.altBoundary,d=n.padding,f=n.tether,h=f===void 0?!0:f,p=n.tetherOffset,v=p===void 0?0:p,y=np(t,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),g=Ci(t.placement),w=Sd(t.placement),_=!w,b=UE(g),C=NK(b),E=t.modifiersData.popperOffsets,T=t.rects.reference,P=t.rects.popper,A=typeof v=="function"?v(Object.assign({},t.rects,{placement:t.placement})):v,M=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,H={x:0,y:0};if(E){if(i){var q,Q=b==="y"?Dr:Or,X=b==="y"?ba:_a,Y=b==="y"?"height":"width",oe=E[b],U=oe+y[Q],z=oe-y[X],ae=h?-P[Y]/2:0,de=w===wd?T[Y]:P[Y],Ee=w===wd?-P[Y]:-T[Y],De=t.elements.arrow,ee=h&&De?jE(De):{width:0,height:0},me=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:N2(),_e=me[Q],Ce=me[X],Te=yh(0,T[Y],ee[Y]),le=_?T[Y]/2-ae-Te-_e-M.mainAxis:de-Te-_e-M.mainAxis,ke=_?-T[Y]/2+ae+Te+Ce+M.mainAxis:Ee+Te+Ce+M.mainAxis,Be=t.elements.arrow&&Vp(t.elements.arrow),dt=Be?b==="y"?Be.clientTop||0:Be.clientLeft||0:0,sn=(q=j==null?void 0:j[b])!=null?q:0,Ge=oe+le-sn-dt,Pt=oe+ke-sn,ht=yh(h?bg(U,Ge):U,oe,h?xl(z,Pt):z);E[b]=ht,H[b]=ht-oe}if(s){var jt,en=b==="x"?Dr:Or,bn=b==="x"?ba:_a,Nt=E[C],pr=C==="y"?"height":"width",$=Nt+y[en],he=Nt-y[bn],F=[Dr,Or].indexOf(g)!==-1,K=(jt=j==null?void 0:j[C])!=null?jt:0,ye=F?$:Nt-T[pr]-P[pr]-K+M.altAxis,Oe=F?Nt+T[pr]+P[pr]-K-M.altAxis:he,Fe=h&&F?nK(ye,Nt,Oe):yh(h?ye:$,Nt,h?Oe:he);E[C]=Fe,H[C]=Fe-Nt}t.modifiersData[r]=H}}const MK={name:"preventOverflow",enabled:!0,phase:"main",fn:AK,requiresIfExists:["offset"]};function RK(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function IK(e){return e===Wr(e)||!ha(e)?zE(e):RK(e)}function $K(e){var t=e.getBoundingClientRect(),n=bd(t.width)/e.offsetWidth||1,r=bd(t.height)/e.offsetHeight||1;return n!==1||r!==1}function LK(e,t,n){n===void 0&&(n=!1);var r=ha(t),a=ha(t)&&$K(t),i=qs(t),o=_d(e,a,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Mi(t)!=="body"||BE(i))&&(s=IK(t)),ha(t)?(l=_d(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=HE(i))),{x:o.left+s.scrollLeft-l.x,y:o.top+s.scrollTop-l.y,width:o.width,height:o.height}}function FK(e){var t=new Map,n=new Set,r=[];e.forEach(function(i){t.set(i.name,i)});function a(i){n.add(i.name);var o=[].concat(i.requires||[],i.requiresIfExists||[]);o.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&a(l)}}),r.push(i)}return e.forEach(function(i){n.has(i.name)||a(i)}),r}function jK(e){var t=FK(e);return QG.reduce(function(n,r){return n.concat(t.filter(function(a){return a.phase===r}))},[])}function UK(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function zK(e){var t=e.reduce(function(n,r){var a=n[r.name];return n[r.name]=a?Object.assign({},a,r,{options:Object.assign({},a.options,r.options),data:Object.assign({},a.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var WD={placement:"bottom",modifiers:[],strategy:"absolute"};function YD(){for(var e=arguments.length,t=new Array(e),n=0;n=0)&&(n[a]=e[a]);return n}function z2(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n=r&&(n.finalize(i.value),n.registrations.delete(o))}),n.registrations.size>0&&n.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){n.sweep(0)}})}return Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,r){this.registrations.set(r,{value:n,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.registrations.delete(t)}}),Object.defineProperty(e.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.sweepTimeout===void 0&&(this.sweepTimeout=setTimeout(this.sweep,Iq))}}),e}(),Lq=typeof FinalizationRegistry<"u"?FinalizationRegistry:$q,X1=new Lq(function(e){var t;(t=e.reaction)===null||t===void 0||t.dispose(),e.reaction=null}),e$={exports:{}},t$={};/** + * @license React + * use-sync-external-store-shim.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var jd=x;function Fq(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var jq=typeof Object.is=="function"?Object.is:Fq,Uq=jd.useState,zq=jd.useEffect,Hq=jd.useLayoutEffect,Bq=jd.useDebugValue;function Vq(e,t){var n=t(),r=Uq({inst:{value:n,getSnapshot:t}}),a=r[0].inst,i=r[1];return Hq(function(){a.value=n,a.getSnapshot=t,Lw(a)&&i({inst:a})},[e,n,t]),zq(function(){return Lw(a)&&i({inst:a}),e(function(){Lw(a)&&i({inst:a})})},[e]),Bq(n),n}function Lw(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!jq(e,n)}catch{return!0}}function Wq(e,t){return t()}var Yq=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Wq:Vq;t$.useSyncExternalStore=jd.useSyncExternalStore!==void 0?jd.useSyncExternalStore:Yq;e$.exports=t$;var Gq=e$.exports,Kq=function(){};function qD(e){e.reaction=new Bh("observer".concat(e.name),function(){var t;e.stateVersion=Symbol(),(t=e.onStoreChange)===null||t===void 0||t.call(e)})}function qq(e,t){t===void 0&&(t="observed");var n=m.useRef(null);if(!n.current){var r={reaction:null,onStoreChange:null,stateVersion:Symbol(),name:t,subscribe:function(s){return X1.unregister(r),r.onStoreChange=s,r.reaction||(qD(r),r.stateVersion=Symbol()),function(){var l;r.onStoreChange=null,(l=r.reaction)===null||l===void 0||l.dispose(),r.reaction=null}},getSnapshot:function(){return r.stateVersion}};n.current=r}var a=n.current;a.reaction||(qD(a),X1.register(n,a,a)),m.useDebugValue(a.reaction,Mq),Gq.useSyncExternalStore(a.subscribe,a.getSnapshot,Kq);var i,o;if(a.reaction.track(function(){try{i=e()}catch(s){o=s}}),o)throw o;return i}var n$=typeof Symbol=="function"&&Symbol.for,QD=n$?Symbol.for("react.forward_ref"):typeof x.forwardRef=="function"&&x.forwardRef(function(e){return null}).$$typeof,XD=n$?Symbol.for("react.memo"):typeof x.memo=="function"&&x.memo(function(e){return null}).$$typeof;function St(e,t){var n;if(XD&&e.$$typeof===XD)throw new Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");var r=(n=t==null?void 0:t.forwardRef)!==null&&n!==void 0?n:!1,a=e,i=e.displayName||e.name;if(QD&&e.$$typeof===QD&&(r=!0,a=e.render,typeof a!="function"))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var o=function(s,l){return qq(function(){return a(s,l)},i)};return o.displayName=e.displayName,Object.defineProperty(o,"name",{value:e.name,writable:!0,configurable:!0}),e.contextTypes&&(o.contextTypes=e.contextTypes),r&&(o=x.forwardRef(o)),o=x.memo(o),Xq(e,o),o}var Qq={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};function Xq(e,t){Object.keys(e).forEach(function(n){Qq[n]||Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})}globalThis&&globalThis.__read;var Fw;Aq(Qd.unstable_batchedUpdates);Fw=X1.finalizeAllImmediately;const Zq=St(function(){const{userStore:{user:t,logout:n}}=Jt();return S.jsx(Ra,{inverted:!0,fixed:"top",children:S.jsxs(n0,{children:[S.jsxs(Ra.Item,{as:Dm,to:"/",header:!0,children:[S.jsx("img",{src:"/assets/logo.png",alt:"logo",style:{marginRight:10}}),"Reactivities"]}),S.jsx(Ra.Item,{as:Dm,to:"/activities",name:"Activities"}),S.jsx(Ra.Item,{as:Dm,to:"/errors",name:"Errors"}),S.jsx(Ra.Item,{children:S.jsx(Ye,{as:Dm,to:"/createActivity",positive:!0,content:"Create Activity"})}),S.jsxs(Ra.Item,{position:"right",children:[S.jsx(hr,{src:(t==null?void 0:t.image)||"/assets/user.png",avatar:!0,spaced:"right"}),S.jsx(vi,{pointing:"top right",text:t==null?void 0:t.displayName,children:S.jsxs(vi.Menu,{children:[S.jsx(vi.Item,{as:ur,to:`profiles/${t==null?void 0:t.username}`,text:"My Profile",icon:"user"}),S.jsx(vi.Item,{onClick:n,text:"Logout",icon:"power"})]})})]})]})})});var Jq=function(t){return eQ(t)&&!tQ(t)};function eQ(e){return!!e&&typeof e=="object"}function tQ(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||aQ(e)}var nQ=typeof Symbol=="function"&&Symbol.for,rQ=nQ?Symbol.for("react.element"):60103;function aQ(e){return e.$$typeof===rQ}function iQ(e){return Array.isArray(e)?[]:{}}function _g(e,t){return t.clone!==!1&&t.isMergeableObject(e)?rp(iQ(e),e,t):e}function oQ(e,t,n){return e.concat(t).map(function(r){return _g(r,n)})}function sQ(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(a){r[a]=_g(e[a],n)}),Object.keys(t).forEach(function(a){!n.isMergeableObject(t[a])||!e[a]?r[a]=_g(t[a],n):r[a]=rp(e[a],t[a],n)}),r}function rp(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||oQ,n.isMergeableObject=n.isMergeableObject||Jq;var r=Array.isArray(t),a=Array.isArray(e),i=r===a;return i?r?n.arrayMerge(e,t,n):sQ(e,t,n):_g(t,n)}rp.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,a){return rp(r,a,n)},{})};var Z1=rp,ZD=Array.isArray,JD=Object.keys,lQ=Object.prototype.hasOwnProperty,uQ=typeof Element<"u";function J1(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=ZD(e),r=ZD(t),a,i,o;if(n&&r){if(i=e.length,i!=t.length)return!1;for(a=i;a--!==0;)if(!J1(e[a],t[a]))return!1;return!0}if(n!=r)return!1;var s=e instanceof Date,l=t instanceof Date;if(s!=l)return!1;if(s&&l)return e.getTime()==t.getTime();var u=e instanceof RegExp,c=t instanceof RegExp;if(u!=c)return!1;if(u&&c)return e.toString()==t.toString();var d=JD(e);if(i=d.length,i!==JD(t).length)return!1;for(a=i;a--!==0;)if(!lQ.call(t,d[a]))return!1;if(uQ&&e instanceof Element&&t instanceof Element)return e===t;for(a=i;a--!==0;)if(o=d[a],!(o==="_owner"&&e.$$typeof)&&!J1(e[o],t[o]))return!1;return!0}return e!==e&&t!==t}var cQ=function(t,n){try{return J1(t,n)}catch(r){if(r.message&&r.message.match(/stack|recursion/i)||r.number===-2146828260)return console.warn("Warning: react-fast-compare does not handle circular references.",r.name,r.message),!1;throw r}};const Fo=Nr(cQ);var dQ=!0;function a0(e,t){if(!dQ){if(e)return;var n="Warning: "+t;typeof console<"u"&&console.warn(n);try{throw Error(n)}catch{}}}function i0(e,t,n,r){var a=!n;n||(n={});for(var i=-1,o=t.length;++i=0)&&(n[a]=e[a]);return n}function dO(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var v0=x.createContext(void 0);v0.displayName="FormikContext";var YX=v0.Provider,GX=v0.Consumer;function XE(){var e=x.useContext(v0);return e||a0(!1),e}var fO=function(t){return Array.isArray(t)&&t.length===0},zn=function(t){return typeof t=="function"},of=function(t){return t!==null&&typeof t=="object"},KX=function(t){return String(Math.floor(Number(t)))===t},jw=function(t){return Object.prototype.toString.call(t)==="[object String]"},h$=function(t){return x.Children.count(t)===0},Uw=function(t){return of(t)&&zn(t.then)};function zt(e,t,n,r){r===void 0&&(r=0);for(var a=s$(t);e&&r=0?[]:{}}}return(i===0?e:a)[o[i]]===n?e:(n===void 0?delete a[o[i]]:a[o[i]]=n,i===0&&n===void 0&&delete r[o[i]],r)}function p$(e,t,n,r){n===void 0&&(n=new WeakMap),r===void 0&&(r={});for(var a=0,i=Object.keys(e);a0?he.map(function(K){return M(K,zt($,K))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(F).then(function(K){return K.reduce(function(ye,Oe,Fe){return Oe==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||Oe&&(ye=Ti(ye,he[Fe],Oe)),ye},{})})},[M]),H=x.useCallback(function($){return Promise.all([j($),f.validationSchema?A($):{},f.validate?P($):{}]).then(function(he){var F=he[0],K=he[1],ye=he[2],Oe=Z1.all([F,K,ye],{arrayMerge:JX});return Oe})},[f.validate,f.validationSchema,j,P,A]),q=Qr(function($){return $===void 0&&($=E.values),T({type:"SET_ISVALIDATING",payload:!0}),H($).then(function(he){return g.current&&(T({type:"SET_ISVALIDATING",payload:!1}),T({type:"SET_ERRORS",payload:he})),he})});x.useEffect(function(){o&&g.current===!0&&Fo(h.current,f.initialValues)&&q(h.current)},[o,q]);var Q=x.useCallback(function($){var he=$&&$.values?$.values:h.current,F=$&&$.errors?$.errors:p.current?p.current:f.initialErrors||{},K=$&&$.touched?$.touched:v.current?v.current:f.initialTouched||{},ye=$&&$.status?$.status:y.current?y.current:f.initialStatus;h.current=he,p.current=F,v.current=K,y.current=ye;var Oe=function(){T({type:"RESET_FORM",payload:{isSubmitting:!!$&&!!$.isSubmitting,errors:F,touched:K,status:ye,values:he,isValidating:!!$&&!!$.isValidating,submitCount:$&&$.submitCount&&typeof $.submitCount=="number"?$.submitCount:0}})};if(f.onReset){var Fe=f.onReset(E.values,sn);Uw(Fe)?Fe.then(Oe):Oe()}else Oe()},[f.initialErrors,f.initialStatus,f.initialTouched,f.onReset]);x.useEffect(function(){g.current===!0&&!Fo(h.current,f.initialValues)&&u&&(h.current=f.initialValues,Q(),o&&q(h.current))},[u,f.initialValues,Q,o,q]),x.useEffect(function(){u&&g.current===!0&&!Fo(p.current,f.initialErrors)&&(p.current=f.initialErrors||el,T({type:"SET_ERRORS",payload:f.initialErrors||el}))},[u,f.initialErrors]),x.useEffect(function(){u&&g.current===!0&&!Fo(v.current,f.initialTouched)&&(v.current=f.initialTouched||Rm,T({type:"SET_TOUCHED",payload:f.initialTouched||Rm}))},[u,f.initialTouched]),x.useEffect(function(){u&&g.current===!0&&!Fo(y.current,f.initialStatus)&&(y.current=f.initialStatus,T({type:"SET_STATUS",payload:f.initialStatus}))},[u,f.initialStatus,f.initialTouched]);var X=Qr(function($){if(w.current[$]&&zn(w.current[$].validate)){var he=zt(E.values,$),F=w.current[$].validate(he);return Uw(F)?(T({type:"SET_ISVALIDATING",payload:!0}),F.then(function(K){return K}).then(function(K){T({type:"SET_FIELD_ERROR",payload:{field:$,value:K}}),T({type:"SET_ISVALIDATING",payload:!1})})):(T({type:"SET_FIELD_ERROR",payload:{field:$,value:F}}),Promise.resolve(F))}else if(f.validationSchema)return T({type:"SET_ISVALIDATING",payload:!0}),A(E.values,$).then(function(K){return K}).then(function(K){T({type:"SET_FIELD_ERROR",payload:{field:$,value:zt(K,$)}}),T({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),Y=x.useCallback(function($,he){var F=he.validate;w.current[$]={validate:F}},[]),oe=x.useCallback(function($){delete w.current[$]},[]),U=Qr(function($,he){T({type:"SET_TOUCHED",payload:$});var F=he===void 0?a:he;return F?q(E.values):Promise.resolve()}),z=x.useCallback(function($){T({type:"SET_ERRORS",payload:$})},[]),ae=Qr(function($,he){var F=zn($)?$(E.values):$;T({type:"SET_VALUES",payload:F});var K=he===void 0?n:he;return K?q(F):Promise.resolve()}),de=x.useCallback(function($,he){T({type:"SET_FIELD_ERROR",payload:{field:$,value:he}})},[]),Ee=Qr(function($,he,F){T({type:"SET_FIELD_VALUE",payload:{field:$,value:he}});var K=F===void 0?n:F;return K?q(Ti(E.values,$,he)):Promise.resolve()}),De=x.useCallback(function($,he){var F=he,K=$,ye;if(!jw($)){$.persist&&$.persist();var Oe=$.target?$.target:$.currentTarget,Fe=Oe.type,fn=Oe.name,er=Oe.id,mr=Oe.value,xa=Oe.checked,Do=Oe.outerHTML,R=Oe.options,L=Oe.multiple;F=he||fn||er,K=/number|range/.test(Fe)?(ye=parseFloat(mr),isNaN(ye)?"":ye):/checkbox/.test(Fe)?tZ(zt(E.values,F),xa,mr):R&&L?eZ(R):mr}F&&Ee(F,K)},[Ee,E.values]),ee=Qr(function($){if(jw($))return function(he){return De(he,$)};De($)}),me=Qr(function($,he,F){he===void 0&&(he=!0),T({type:"SET_FIELD_TOUCHED",payload:{field:$,value:he}});var K=F===void 0?a:F;return K?q(E.values):Promise.resolve()}),_e=x.useCallback(function($,he){$.persist&&$.persist();var F=$.target,K=F.name,ye=F.id,Oe=F.outerHTML,Fe=he||K||ye;me(Fe,!0)},[me]),Ce=Qr(function($){if(jw($))return function(he){return _e(he,$)};_e($)}),Te=x.useCallback(function($){zn($)?T({type:"SET_FORMIK_STATE",payload:$}):T({type:"SET_FORMIK_STATE",payload:function(){return $}})},[]),le=x.useCallback(function($){T({type:"SET_STATUS",payload:$})},[]),ke=x.useCallback(function($){T({type:"SET_ISSUBMITTING",payload:$})},[]),Be=Qr(function(){return T({type:"SUBMIT_ATTEMPT"}),q().then(function($){var he=$ instanceof Error,F=!he&&Object.keys($).length===0;if(F){var K;try{if(K=Ge(),K===void 0)return}catch(ye){throw ye}return Promise.resolve(K).then(function(ye){return g.current&&T({type:"SUBMIT_SUCCESS"}),ye}).catch(function(ye){if(g.current)throw T({type:"SUBMIT_FAILURE"}),ye})}else if(g.current&&(T({type:"SUBMIT_FAILURE"}),he))throw $})}),dt=Qr(function($){$&&$.preventDefault&&zn($.preventDefault)&&$.preventDefault(),$&&$.stopPropagation&&zn($.stopPropagation)&&$.stopPropagation(),Be().catch(function(he){console.warn("Warning: An unhandled error was caught from submitForm()",he)})}),sn={resetForm:Q,validateForm:q,validateField:X,setErrors:z,setFieldError:de,setFieldTouched:me,setFieldValue:Ee,setStatus:le,setSubmitting:ke,setTouched:U,setValues:ae,setFormikState:Te,submitForm:Be},Ge=Qr(function(){return c(E.values,sn)}),Pt=Qr(function($){$&&$.preventDefault&&zn($.preventDefault)&&$.preventDefault(),$&&$.stopPropagation&&zn($.stopPropagation)&&$.stopPropagation(),Q()}),ht=x.useCallback(function($){return{value:zt(E.values,$),error:zt(E.errors,$),touched:!!zt(E.touched,$),initialValue:zt(h.current,$),initialTouched:!!zt(v.current,$),initialError:zt(p.current,$)}},[E.errors,E.touched,E.values]),jt=x.useCallback(function($){return{setValue:function(F,K){return Ee($,F,K)},setTouched:function(F,K){return me($,F,K)},setError:function(F){return de($,F)}}},[Ee,me,de]),en=x.useCallback(function($){var he=of($),F=he?$.name:$,K=zt(E.values,F),ye={name:F,value:K,onChange:ee,onBlur:Ce};if(he){var Oe=$.type,Fe=$.value,fn=$.as,er=$.multiple;Oe==="checkbox"?Fe===void 0?ye.checked=!!K:(ye.checked=!!(Array.isArray(K)&&~K.indexOf(Fe)),ye.value=Fe):Oe==="radio"?(ye.checked=K===Fe,ye.value=Fe):fn==="select"&&er&&(ye.value=ye.value||[],ye.multiple=!0)}return ye},[Ce,ee,E.values]),bn=x.useMemo(function(){return!Fo(h.current,E.values)},[h.current,E.values]),Nt=x.useMemo(function(){return typeof s<"u"?bn?E.errors&&Object.keys(E.errors).length===0:s!==!1&&zn(s)?s(f):s:E.errors&&Object.keys(E.errors).length===0},[s,bn,E.errors,f]),pr=vt({},E,{initialValues:h.current,initialErrors:p.current,initialTouched:v.current,initialStatus:y.current,handleBlur:Ce,handleChange:ee,handleReset:Pt,handleSubmit:dt,resetForm:Q,setErrors:z,setFormikState:Te,setFieldTouched:me,setFieldValue:Ee,setFieldError:de,setStatus:le,setSubmitting:ke,setTouched:U,setValues:ae,submitForm:Be,validateForm:q,validateField:X,isValid:Nt,dirty:bn,unregisterField:oe,registerField:Y,getFieldProps:en,getFieldMeta:ht,getFieldHelpers:jt,validateOnBlur:a,validateOnChange:n,validateOnMount:o});return pr}function Wp(e){var t=QX(e),n=e.component,r=e.children,a=e.render,i=e.innerRef;return x.useImperativeHandle(i,function(){return t}),x.createElement(YX,{value:t},n?x.createElement(n,t):a?a(t):r?zn(r)?r(t):h$(r)?null:x.Children.only(r):null)}function XX(e){var t={};if(e.inner){if(e.inner.length===0)return Ti(t,e.path,e.message);for(var a=e.inner,n=Array.isArray(a),r=0,a=n?a:a[Symbol.iterator]();;){var i;if(n){if(r>=a.length)break;i=a[r++]}else{if(r=a.next(),r.done)break;i=r.value}var o=i;zt(t,o.path)||(t=Ti(t,o.path,o.message))}}return t}function ZX(e,t,n,r){n===void 0&&(n=!1);var a=e_(e);return t[n?"validateSync":"validate"](a,{abortEarly:!1,context:r||a})}function e_(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=String(n);Array.isArray(e[r])===!0?t[r]=e[r].map(function(a){return Array.isArray(a)===!0||Uc(a)?e_(a):a!==""?a:void 0}):Uc(e[r])?t[r]=e_(e[r]):t[r]=e[r]!==""?e[r]:void 0}return t}function JX(e,t,n){var r=e.slice();return t.forEach(function(i,o){if(typeof r[o]>"u"){var s=n.clone!==!1,l=s&&n.isMergeableObject(i);r[o]=l?Z1(Array.isArray(i)?[]:{},i,n):i}else n.isMergeableObject(i)?r[o]=Z1(e[o],i,n):e.indexOf(i)===-1&&r.push(i)}),r}function eZ(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function tZ(e,t,n){if(typeof e=="boolean")return!!t;var r=[],a=!1,i=-1;if(Array.isArray(e))r=e,i=e.indexOf(n),a=i>=0;else if(!n||n=="true"||n=="false")return!!t;return t&&n&&!a?r.concat(n):a?r.slice(0,i).concat(r.slice(i+1)):r}var nZ=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?x.useLayoutEffect:x.useEffect;function Qr(e){var t=x.useRef(e);return nZ(function(){t.current=e}),x.useCallback(function(){for(var n=arguments.length,r=new Array(n),a=0;ar?a:r},0);return Array.from(vt({},t,{length:n+1}))}else return[]},hO=function(t,n){var r=typeof t=="function"?t:n;return function(a){if(Array.isArray(a)||of(a)){var i=ru(a);return r(i)}return a}},lZ=function(e){f$(t,e);function t(r){var a;return a=e.call(this,r)||this,a.updateArrayField=function(i,o,s){var l=a.props,u=l.name,c=l.formik.setFormikState;c(function(d){var f=hO(s,i),h=hO(o,i),p=Ti(d.values,u,i(zt(d.values,u))),v=s?f(zt(d.errors,u)):void 0,y=o?h(zt(d.touched,u)):void 0;return fO(v)&&(v=void 0),fO(y)&&(y=void 0),vt({},d,{values:p,errors:s?Ti(d.errors,u,v):d.errors,touched:o?Ti(d.touched,u,y):d.touched})})},a.push=function(i){return a.updateArrayField(function(o){return[].concat(ru(o),[WX(i)])},!1,!1)},a.handlePush=function(i){return function(){return a.push(i)}},a.swap=function(i,o){return a.updateArrayField(function(s){return oZ(s,i,o)},!0,!0)},a.handleSwap=function(i,o){return function(){return a.swap(i,o)}},a.move=function(i,o){return a.updateArrayField(function(s){return iZ(s,i,o)},!0,!0)},a.handleMove=function(i,o){return function(){return a.move(i,o)}},a.insert=function(i,o){return a.updateArrayField(function(s){return zw(s,i,o)},function(s){return zw(s,i,null)},function(s){return zw(s,i,null)})},a.handleInsert=function(i,o){return function(){return a.insert(i,o)}},a.replace=function(i,o){return a.updateArrayField(function(s){return sZ(s,i,o)},!1,!1)},a.handleReplace=function(i,o){return function(){return a.replace(i,o)}},a.unshift=function(i){var o=-1;return a.updateArrayField(function(s){var l=s?[i].concat(s):[i];return o=l.length,l},function(s){return s?[null].concat(s):[null]},function(s){return s?[null].concat(s):[null]}),o},a.handleUnshift=function(i){return function(){return a.unshift(i)}},a.handleRemove=function(i){return function(){return a.remove(i)}},a.handlePop=function(){return function(){return a.pop()}},a.remove=a.remove.bind(dO(a)),a.pop=a.pop.bind(dO(a)),a}var n=t.prototype;return n.componentDidUpdate=function(a){this.props.validateOnChange&&this.props.formik.validateOnChange&&!Fo(zt(a.formik.values,a.name),zt(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},n.remove=function(a){var i;return this.updateArrayField(function(o){var s=o?ru(o):[];return i||(i=s[a]),zn(s.splice)&&s.splice(a,1),zn(s.every)&&s.every(function(l){return l===void 0})?[]:s},!0,!0),i},n.pop=function(){var a;return this.updateArrayField(function(i){var o=i.slice();return a||(a=o&&o.pop&&o.pop()),o},!0,!0),a},n.render=function(){var a={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},i=this.props,o=i.component,s=i.render,l=i.children,u=i.name,c=i.formik,d=Go(c,["validate","validationSchema"]),f=vt({},a,{form:d,name:u});return o?x.createElement(o,f):s?s(f):l?typeof l=="function"?l(f):h$(l)?null:x.Children.only(l):null},t}(x.Component);lZ.defaultProps={validateOnChange:!0};var uZ=function(e){f$(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;return n.shouldComponentUpdate=function(a){return zt(this.props.formik.errors,this.props.name)!==zt(a.formik.errors,this.props.name)||zt(this.props.formik.touched,this.props.name)!==zt(a.formik.touched,this.props.name)||Object.keys(this.props).length!==Object.keys(a).length},n.render=function(){var a=this.props,i=a.component,o=a.formik,s=a.render,l=a.children,u=a.name,c=Go(a,["component","formik","render","children","name"]),d=zt(o.touched,u),f=zt(o.errors,u);return d&&f?s?zn(s)?s(f):null:l?zn(l)?l(f):null:i?x.createElement(i,c,f):f:null},t}(x.Component),m$=aZ(uZ);function gi(e){const[t,n]=g0(e.name);return S.jsxs(t0.Field,{error:n.touched&&!!n.error,children:[S.jsx("label",{children:e.label}),S.jsx("input",{...t,...e}),n.touched&&n.error?S.jsx(Xn,{basic:!0,color:"red",children:n.error}):null]})}const cZ=St(function(){const{userStore:t}=Jt();return S.jsx(Wp,{initialValues:{email:"",password:"",error:null},onSubmit:(n,{setErrors:r})=>t.login(n).catch(()=>r({error:"Invaild Email or Passowrd"})),children:({handleSubmit:n,isSubmitting:r,errors:a})=>S.jsxs(sf,{className:"ui form",onSubmit:n,autoComplete:"off",children:[S.jsx(Ft,{as:"h2",content:"Login to Reactivities",color:"teal",textAlign:"center"}),S.jsx(gi,{placeholder:"Email",name:"email"}),S.jsx(gi,{placeholder:"Password",name:"password",type:"password"}),S.jsx(m$,{name:"error",render:()=>S.jsx(Xn,{style:{marginBottom:10},basic:!0,color:"red",content:a.error})}),S.jsx(Ye,{loading:r,positive:!0,content:"Login",type:"submit",fluid:!0})]})})});function gu(e){this._maxSize=e,this.clear()}gu.prototype.clear=function(){this._size=0,this._values=Object.create(null)};gu.prototype.get=function(e){return this._values[e]};gu.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var dZ=/[^.^\]^[]+|(?=\[\]|\.\.)/g,v$=/^\d+$/,fZ=/^\d/,hZ=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,pZ=/^\s*(['"]?)(.*?)(\1)\s*$/,ZE=512,pO=new gu(ZE),mO=new gu(ZE),vO=new gu(ZE),Cl={Cache:gu,split:t_,normalizePath:Hw,setter:function(e){var t=Hw(e);return mO.get(e)||mO.set(e,function(r,a){for(var i=0,o=t.length,s=r;ie.match(wZ)||[],w0=e=>e[0].toUpperCase()+e.slice(1),ex=(e,t)=>y0(e).join(t).toLowerCase(),g$=e=>y0(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,""),bZ=e=>w0(g$(e)),_Z=e=>ex(e,"_"),SZ=e=>ex(e,"-"),EZ=e=>w0(ex(e," ")),xZ=e=>y0(e).map(w0).join(" ");var Bw={words:y0,upperFirst:w0,camelCase:g$,pascalCase:bZ,snakeCase:_Z,kebabCase:SZ,sentenceCase:EZ,titleCase:xZ},tx={exports:{}};tx.exports=function(e){return y$(CZ(e),e)};tx.exports.array=y$;function y$(e,t){var n=e.length,r=new Array(n),a={},i=n,o=TZ(t),s=DZ(e);for(t.forEach(function(u){if(!s.has(u[0])||!s.has(u[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});i--;)a[i]||l(e[i],i,new Set);return r;function l(u,c,d){if(d.has(u)){var f;try{f=", node was:"+JSON.stringify(u)}catch{f=""}throw new Error("Cyclic dependency"+f)}if(!s.has(u))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(u));if(!a[c]){a[c]=!0;var h=o.get(u)||new Set;if(h=Array.from(h),c=h.length){d.add(u);do{var p=h[--c];l(p,s.get(p),d)}while(c);d.delete(u)}r[--n]=u}}}function CZ(e){for(var t=new Set,n=0,r=e.length;n"",RZ=/^Symbol\((.*)\)(.*)$/;function IZ(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function gO(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return IZ(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return MZ.call(e).replace(RZ,"Symbol($1)");const r=PZ.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+NZ.call(e)+"]":r==="RegExp"?AZ.call(e):null}function os(e,t){let n=gO(e,t);return n!==null?n:JSON.stringify(e,function(r,a){let i=gO(this[r],t);return i!==null?i:a},2)}function w$(e){return e==null?[]:[].concat(e)}let b$,$Z=/\$\{\s*(\w+)\s*\}/g;b$=Symbol.toStringTag;let Ia=class n_ extends Error{static formatError(t,n){const r=n.label||n.path||"this";return r!==n.path&&(n=Object.assign({},n,{path:r})),typeof t=="string"?t.replace($Z,(a,i)=>os(n[i])):typeof t=="function"?t(n):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,n,r,a,i){super(),this.value=void 0,this.path=void 0,this.type=void 0,this.errors=void 0,this.params=void 0,this.inner=void 0,this[b$]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=a,this.errors=[],this.inner=[],w$(t).forEach(o=>{if(n_.isError(o)){this.errors.push(...o.errors);const s=o.inner.length?o.inner:[o];this.inner.push(...s)}else this.errors.push(o)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0],!i&&Error.captureStackTrace&&Error.captureStackTrace(this,n_)}},di={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const a=r!=null&&r!==n?` (cast from the value \`${os(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${os(n,!0)}\``+a:`${e} must match the configured type. The validated value was: \`${os(n,!0)}\``+a}},ka={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},LZ={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},r_={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},FZ={isValue:"${path} field must be ${value}"},a_={noUnknown:"${path} field has unspecified keys: ${unknown}"},jZ={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},UZ={notType:e=>{const{path:t,value:n,spec:r}=e,a=r.types.length;if(Array.isArray(n)){if(n.lengtha)return`${t} tuple value has too many items, expected a length of ${a} but got ${n.length} for value: \`${os(n,!0)}\``}return Ia.formatError(di.notType,e)}};Object.assign(Object.create(null),{mixed:di,string:ka,number:LZ,date:r_,object:a_,array:jZ,boolean:FZ,tuple:UZ});const nx=e=>e&&e.__isYupSchema__;class Sg{static fromOptions(t,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:a,otherwise:i}=n,o=typeof r=="function"?r:(...s)=>s.every(l=>l===r);return new Sg(t,(s,l)=>{var u;let c=o(...s)?a:i;return(u=c==null?void 0:c(l))!=null?u:l})}constructor(t,n){this.fn=void 0,this.refs=t,this.refs=t,this.fn=n}resolve(t,n){let r=this.refs.map(i=>i.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),a=this.fn(r,t,n);if(a===void 0||a===t)return t;if(!nx(a))throw new TypeError("conditions must return a schema object");return a.resolve(n)}}const Im={context:"$",value:"."};class yu{constructor(t,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Im.context,this.isValue=this.key[0]===Im.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?Im.context:this.isValue?Im.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&Cl.getter(this.path,!0),this.map=n.map}getValue(t,n,r){let a=this.isContext?r:this.isValue?t:n;return this.getter&&(a=this.getter(a||{})),this.map&&(a=this.map(a)),a}cast(t,n){return this.getValue(t,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}yu.prototype.__isYupRef=!0;const gl=e=>e==null;function Du(e){function t({value:n,path:r="",options:a,originalValue:i,schema:o},s,l){const{name:u,test:c,params:d,message:f,skipAbsent:h}=e;let{parent:p,context:v,abortEarly:y=o.spec.abortEarly,disableStackTrace:g=o.spec.disableStackTrace}=a;function w(j){return yu.isRef(j)?j.getValue(n,p,v):j}function _(j={}){var H;const q=Object.assign({value:n,originalValue:i,label:o.spec.label,path:j.path||r,spec:o.spec},d,j.params);for(const X of Object.keys(q))q[X]=w(q[X]);const Q=new Ia(Ia.formatError(j.message||f,q),n,q.path,j.type||u,(H=j.disableStackTrace)!=null?H:g);return Q.params=q,Q}const b=y?s:l;let C={path:r,parent:p,type:u,from:a.from,createError:_,resolve:w,options:a,originalValue:i,schema:o};const E=j=>{Ia.isError(j)?b(j):j?l(null):b(_())},T=j=>{Ia.isError(j)?b(j):s(j)};if(h&&gl(n))return E(!0);let A;try{var M;if(A=c.call(C,n,C),typeof((M=A)==null?void 0:M.then)=="function"){if(a.sync)throw new Error(`Validation test of type: "${C.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(A).then(E,T)}}catch(j){T(j);return}E(A)}return t.OPTIONS=e,t}function zZ(e,t,n,r=n){let a,i,o;return t?(Cl.forEach(t,(s,l,u)=>{let c=l?s.slice(1,s.length-1):s;e=e.resolve({context:r,parent:a,value:n});let d=e.type==="tuple",f=u?parseInt(c,10):0;if(e.innerType||d){if(d&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(n&&f>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${s}, in the path: ${t}. because there is no value at that index. `);a=n,n=n&&n[f],e=d?e.spec.types[f]:e.innerType}if(!u){if(!e.fields||!e.fields[c])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e.type}")`);a=n,n=n&&n[c],e=e.fields[c]}i=c,o=l?"["+s+"]":"."+s}),{schema:e,parent:a,parentPath:i}):{parent:a,parentPath:t,schema:e}}class Eg extends Set{describe(){const t=[];for(const n of this.values())t.push(yu.isRef(n)?n.describe():n);return t}resolveAll(t){let n=[];for(const r of this.values())n.push(t(r));return n}clone(){return new Eg(this.values())}merge(t,n){const r=this.clone();return t.forEach(a=>r.add(a)),n.forEach(a=>r.delete(a)),r}}function Ju(e,t=new Map){if(nx(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r{this.typeError(di.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(n=>{n.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=Ju(Object.assign({},this.spec,t)),n}label(t){let n=this.clone();return n.spec.label=t,n}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}withMutation(t){let n=this._mutate;this._mutate=!0;let r=t(this);return this._mutate=n,r}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let n=this,r=t.clone();const a=Object.assign({},n.spec,r.spec);return r.spec=a,r.internalTests=Object.assign({},n.internalTests,r.internalTests),r._whitelist=n._whitelist.merge(t._whitelist,t._blacklist),r._blacklist=n._blacklist.merge(t._blacklist,t._whitelist),r.tests=n.tests,r.exclusiveTests=n.exclusiveTests,r.withMutation(i=>{t.tests.forEach(o=>{i.test(o.OPTIONS)})}),r.transforms=[...n.transforms,...r.transforms],r}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let n=this;if(n.conditions.length){let r=n.conditions;n=n.clone(),n.conditions=[],n=r.reduce((a,i)=>i.resolve(a,t),n),n=n.resolve(t)}return n}resolveOptions(t){var n,r,a,i;return Object.assign({},t,{from:t.from||[],strict:(n=t.strict)!=null?n:this.spec.strict,abortEarly:(r=t.abortEarly)!=null?r:this.spec.abortEarly,recursive:(a=t.recursive)!=null?a:this.spec.recursive,disableStackTrace:(i=t.disableStackTrace)!=null?i:this.spec.disableStackTrace})}cast(t,n={}){let r=this.resolve(Object.assign({value:t},n)),a=n.assert==="ignore-optionality",i=r._cast(t,n);if(n.assert!==!1&&!r.isType(i)){if(a&&gl(i))return i;let o=os(t),s=os(i);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}". + +attempted value: ${o} +`+(s!==o?`result of cast: ${s}`:""))}return i}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((a,i)=>i.call(this,a,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,a){let{path:i,originalValue:o=t,strict:s=this.spec.strict}=n,l=t;s||(l=this._cast(l,Object.assign({assert:!1},n)));let u=[];for(let c of Object.values(this.internalTests))c&&u.push(c);this.runTests({path:i,value:l,originalValue:o,options:n,tests:u},r,c=>{if(c.length)return a(c,l);this.runTests({path:i,value:l,originalValue:o,options:n,tests:this.tests},r,a)})}runTests(t,n,r){let a=!1,{tests:i,value:o,originalValue:s,path:l,options:u}=t,c=v=>{a||(a=!0,n(v,o))},d=v=>{a||(a=!0,r(v,o))},f=i.length,h=[];if(!f)return d([]);let p={value:o,originalValue:s,path:l,options:u,schema:this};for(let v=0;vthis.resolve(c)._validate(u,c,f,h)}validate(t,n){var r;let a=this.resolve(Object.assign({},n,{value:t})),i=(r=n==null?void 0:n.disableStackTrace)!=null?r:a.spec.disableStackTrace;return new Promise((o,s)=>a._validate(t,n,(l,u)=>{Ia.isError(l)&&(l.value=u),s(l)},(l,u)=>{l.length?s(new Ia(l,u,void 0,void 0,i)):o(u)}))}validateSync(t,n){var r;let a=this.resolve(Object.assign({},n,{value:t})),i,o=(r=n==null?void 0:n.disableStackTrace)!=null?r:a.spec.disableStackTrace;return a._validate(t,Object.assign({},n,{sync:!0}),(s,l)=>{throw Ia.isError(s)&&(s.value=l),s},(s,l)=>{if(s.length)throw new Ia(s,t,void 0,void 0,o);i=l}),i}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(Ia.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(Ia.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):Ju(n)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,n){const r=this.clone({nullable:t});return r.internalTests.nullable=Du({message:n,name:"nullable",test(a){return a===null?this.schema.spec.nullable:!0}}),r}optionality(t,n){const r=this.clone({optional:t});return r.internalTests.optionality=Du({message:n,name:"optionality",test(a){return a===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=di.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=di.notNull){return this.nullability(!1,t)}required(t=di.required){return this.clone().withMutation(n=>n.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=di.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),a=Du(n),i=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(o=>!(o.OPTIONS.name===n.name&&(i||o.OPTIONS.test===a.OPTIONS.test))),r.tests.push(a),r}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let r=this.clone(),a=w$(t).map(i=>new yu(i));return a.forEach(i=>{i.isSibling&&r.deps.push(i.key)}),r.conditions.push(typeof n=="function"?new Sg(a,n):Sg.fromOptions(a,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=Du({message:t,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=di.oneOf){let r=this.clone();return t.forEach(a=>{r._whitelist.add(a),r._blacklist.delete(a)}),r.internalTests.whiteList=Du({message:n,name:"oneOf",skipAbsent:!0,test(a){let i=this.schema._whitelist,o=i.resolveAll(this.resolve);return o.includes(a)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:o}})}}),r}notOneOf(t,n=di.notOneOf){let r=this.clone();return t.forEach(a=>{r._blacklist.add(a),r._whitelist.delete(a)}),r.internalTests.blacklist=Du({message:n,name:"notOneOf",test(a){let i=this.schema._blacklist,o=i.resolveAll(this.resolve);return o.includes(a)?this.createError({params:{values:Array.from(i).join(", "),resolved:o}}):!0}}),r}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:r,meta:a,optional:i,nullable:o}=n.spec;return{meta:a,label:r,optional:i,nullable:o,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,u,c)=>c.findIndex(d=>d.name===l.name)===u)}}}Ri.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Ri.prototype[`${e}At`]=function(t,n,r={}){const{parent:a,parentPath:i,schema:o}=zZ(this,t,n,r.context);return o[e](a&&a[i],Object.assign({},r,{parent:a,path:t}))};for(const e of["equals","is"])Ri.prototype[e]=Ri.prototype.oneOf;for(const e of["not","nope"])Ri.prototype[e]=Ri.prototype.notOneOf;let HZ=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,BZ=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,VZ=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,WZ=e=>gl(e)||e===e.trim(),YZ={}.toString();function $r(){return new _$}class _$ extends Ri{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce||r.isType(t)||Array.isArray(t))return t;const a=t!=null&&t.toString?t.toString():t;return a===YZ?t:a})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||di.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t))}length(t,n=ka.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n=ka.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n=ka.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}matches(t,n){let r=!1,a,i;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:a,name:i}=n:a=n),this.test({name:i||"matches",message:a||ka.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&r||o.search(t)!==-1})}email(t=ka.email){return this.matches(HZ,{name:"email",message:t,excludeEmptyString:!0})}url(t=ka.url){return this.matches(BZ,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=ka.uuid){return this.matches(VZ,{name:"uuid",message:t,excludeEmptyString:!1})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=ka.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:WZ})}lowercase(t=ka.lowercase){return this.transform(n=>gl(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>gl(n)||n===n.toLowerCase()})}uppercase(t=ka.uppercase){return this.transform(n=>gl(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>gl(n)||n===n.toUpperCase()})}}$r.prototype=_$.prototype;const GZ=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Hi(e,t=0){return Number(e)||t}function KZ(e){const t=GZ.exec(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;const n={year:Hi(t[1]),month:Hi(t[2],1)-1,day:Hi(t[3],1),hour:Hi(t[4]),minute:Hi(t[5]),second:Hi(t[6]),millisecond:t[7]?Hi(t[7].substring(0,3)):0,z:t[8]||void 0,plusMinus:t[9]||void 0,hourOffset:Hi(t[10]),minuteOffset:Hi(t[11])};if(n.z===void 0&&n.plusMinus===void 0)return new Date(n.year,n.month,n.day,n.hour,n.minute,n.second,n.millisecond).valueOf();let r=0;return n.z!=="Z"&&n.plusMinus!==void 0&&(r=n.hourOffset*60+n.minuteOffset,n.plusMinus==="+"&&(r=0-r)),Date.UTC(n.year,n.month,n.day,n.hour,n.minute+r,n.second,n.millisecond)}let qZ=new Date(""),QZ=e=>Object.prototype.toString.call(e)==="[object Date]";class b0 extends Ri{constructor(){super({type:"date",check(t){return QZ(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=KZ(t),isNaN(t)?b0.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(yu.isRef(t))r=t;else{let a=this.cast(t);if(!this._typeCheck(a))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=a}return r}min(t,n=r_.min){let r=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(a){return a>=this.resolve(r)}})}max(t,n=r_.max){let r=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(a){return a<=this.resolve(r)}})}}b0.INVALID_DATE=qZ;b0.prototype;function XZ(e,t=[]){let n=[],r=new Set,a=new Set(t.map(([o,s])=>`${o}-${s}`));function i(o,s){let l=Cl.split(o)[0];r.add(l),a.has(`${s}-${l}`)||n.push([s,l])}for(const o of Object.keys(e)){let s=e[o];r.add(o),yu.isRef(s)&&s.isSibling?i(s.path,o):nx(s)&&"deps"in s&&s.deps.forEach(l=>i(l,o))}return kZ.array(Array.from(r),n).reverse()}function yO(e,t){let n=1/0;return e.some((r,a)=>{var i;if((i=t.path)!=null&&i.includes(r))return n=a,!0}),n}function S$(e){return(t,n)=>yO(e,t)-yO(e,n)}const ZZ=(e,t,n)=>{if(typeof e!="string")return e;let r=e;try{r=JSON.parse(e)}catch{}return n.isType(r)?r:e};function xv(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=xv(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=xv(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(xv)}):"optional"in e?e.optional():e}const JZ=(e,t)=>{const n=[...Cl.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),a=Cl.getter(Cl.join(n),!0)(e);return!!(a&&r in a)};let wO=e=>Object.prototype.toString.call(e)==="[object Object]";function eJ(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const tJ=S$([]);function Yp(e){return new E$(e)}class E$ extends Ri{constructor(t){super({type:"object",check(n){return wO(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=tJ,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var r;let a=super._cast(t,n);if(a===void 0)return this.getDefault(n);if(!this._typeCheck(a))return a;let i=this.fields,o=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,s=[].concat(this._nodes,Object.keys(a).filter(d=>!this._nodes.includes(d))),l={},u=Object.assign({},n,{parent:l,__validating:n.__validating||!1}),c=!1;for(const d of s){let f=i[d],h=d in a;if(f){let p,v=a[d];u.path=(n.path?`${n.path}.`:"")+d,f=f.resolve({value:v,context:n.context,parent:l});let y=f instanceof Ri?f.spec:void 0,g=y==null?void 0:y.strict;if(y!=null&&y.strip){c=c||d in a;continue}p=!n.__validating||!g?f.cast(a[d],u):a[d],p!==void 0&&(l[d]=p)}else h&&!o&&(l[d]=a[d]);(h!==d in l||l[d]!==a[d])&&(c=!0)}return c?l:a}_validate(t,n={},r,a){let{from:i=[],originalValue:o=t,recursive:s=this.spec.recursive}=n;n.from=[{schema:this,value:o},...i],n.__validating=!0,n.originalValue=o,super._validate(t,n,r,(l,u)=>{if(!s||!wO(u)){a(l,u);return}o=o||u;let c=[];for(let d of this._nodes){let f=this.fields[d];!f||yu.isRef(f)||c.push(f.asNestedTest({options:n,key:d,parent:u,parentPath:n.path,originalParent:o}))}this.runTests({tests:c,value:u,originalValue:o,options:n},r,d=>{a(d.sort(this._sortErrors).concat(l),u)})})}clone(t){const n=super.clone(t);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),r=n.fields;for(let[a,i]of Object.entries(this.fields)){const o=r[a];r[a]=o===void 0?i:o}return n.withMutation(a=>a.setFields(r,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var a;const i=this.fields[r];let o=t;(a=o)!=null&&a.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[r]})),n[r]=i&&"getDefault"in i?i.getDefault(o):void 0}),n}setFields(t,n){let r=this.clone();return r.fields=t,r._nodes=XZ(t,n),r._sortErrors=S$(Object.keys(t)),n&&(r._excludedEdges=n),r}shape(t,n=[]){return this.clone().withMutation(r=>{let a=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),a=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,t),a)})}partial(){const t={};for(const[n,r]of Object.entries(this.fields))t[n]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(t)}deepPartial(){return xv(this)}pick(t){const n={};for(const r of t)this.fields[r]&&(n[r]=this.fields[r]);return this.setFields(n,this._excludedEdges.filter(([r,a])=>t.includes(r)&&t.includes(a)))}omit(t){const n=[];for(const r of Object.keys(this.fields))t.includes(r)||n.push(r);return this.pick(n)}from(t,n,r){let a=Cl.getter(t,!0);return this.transform(i=>{if(!i)return i;let o=i;return JZ(i,t)&&(o=Object.assign({},i),r||delete o[t],o[n]=a(i)),o})}json(){return this.transform(ZZ)}noUnknown(t=!0,n=a_.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(a){if(a==null)return!0;const i=eJ(this.schema,a);return!t||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=a_.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const r={};for(const a of Object.keys(n))r[t(a)]=n[a];return r})}camelCase(){return this.transformKeys(Bw.camelCase)}snakeCase(){return this.transformKeys(Bw.snakeCase)}constantCase(){return this.transformKeys(t=>Bw.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[i,o]of Object.entries(n.fields)){var a;let s=t;(a=s)!=null&&a.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[i]})),r.fields[i]=o.describe(s)}return r}}Yp.prototype=E$.prototype;function x$({errors:e}){return S.jsx(Iw,{error:!0,children:Array.isArray(e)&&S.jsx(Iw.List,{children:e.map((t,n)=>S.jsx(Iw.Item,{children:t},n))})})}const nJ=St(function(){const{userStore:t,modalStore:n}=Jt();return S.jsx(Wp,{initialValues:{displayName:"",username:"",email:"",password:"",error:null},onSubmit:(r,{setErrors:a})=>t.register(r).catch(i=>{n.closeModal(),a({error:i})}),validationSchema:Yp({displayName:$r().required(),email:$r().required(),password:$r().required(),username:$r().required()}),children:({handleSubmit:r,isSubmitting:a,errors:i,isValid:o,dirty:s})=>S.jsxs(sf,{className:"ui form error",onSubmit:r,autoComplete:"off",children:[S.jsx(Ft,{as:"h2",content:"Sign up to Reactivities",color:"teal",textAlign:"center"}),S.jsx(gi,{placeholder:"Email",name:"email"}),S.jsx(gi,{placeholder:"DisplayName",name:"displayName"}),S.jsx(gi,{placeholder:"Username",name:"username"}),S.jsx(gi,{placeholder:"Password",name:"password",type:"password"}),S.jsx(m$,{name:"error",render:()=>S.jsx(x$,{errors:i.error})}),S.jsx(Ye,{loading:a,positive:!0,content:"Register",type:"submit",fluid:!0,disabled:!o||!s||a})]})})}),rJ=St(function(){const{userStore:t,modalStore:n}=Jt();return S.jsx(ut,{inverted:!0,textAlign:"center",vertical:!0,className:"masthead",children:S.jsxs(n0,{text:!0,children:[S.jsxs(Ft,{as:"h1",inverted:!0,children:[S.jsx(hr,{size:"massive",src:"/assets/logo.png",alt:"logo",style:{marginBottom:12}}),"Reactivities"]}),t.isLoggedIn?S.jsxs(S.Fragment,{children:[S.jsx(Ft,{as:"h2",inverted:!0,content:"Welcome to Reactivities"}),S.jsx(Ye,{as:ur,to:"/activities",size:"huge",inverted:!0,children:"Go to Activities"})]}):S.jsxs(S.Fragment,{children:[S.jsx(Ye,{onClick:()=>n.openModal(S.jsx(cZ,{})),size:"huge",inverted:!0,children:"Login!"}),S.jsx(Ye,{onClick:()=>n.openModal(S.jsx(nJ,{})),size:"huge",inverted:!0,children:"Register"})]})]})})});function rx({inverted:e=!0,content:t="Loading...."}){return S.jsx(NI,{active:!0,inverted:e,children:S.jsx(IE,{content:t})})}const aJ=St(function(){const{modalStore:t}=Jt();return S.jsx(TD,{open:t.modal.open,onClose:t.closeModal,size:"mini",children:S.jsx(TD.Content,{children:t.modal.body})})});function iJ(){const e=_o(),{commonStore:t,userStore:n}=Jt();return x.useEffect(()=>{t.token?n.getUser().finally(()=>t.setAppLoaded()):t.setAppLoaded()},[t,n]),t.appLoaded?S.jsxs(S.Fragment,{children:[S.jsx(x6,{}),S.jsx(aJ,{}),S.jsx(S1,{position:"bottom-right",hideProgressBar:!0,theme:"colored"}),e.pathname==="/"?S.jsx(rJ,{}):S.jsxs(S.Fragment,{children:[S.jsx(Zq,{}),S.jsx(n0,{style:{marginTop:"7em"},children:S.jsx(TR,{})})]})]}):S.jsx(rx,{content:"Loading App...."})}const oJ=St(iJ),C$=St(function({profile:t}){var s;const{profileStore:n,userStore:r}=Jt(),{updateFollowing:a,loading:i}=n;function o(l,u){l.preventDefault(),t.following?a(u,!1):a(u,!0)}return((s=r.user)==null?void 0:s.username)===t.username?null:S.jsxs($w,{animated:"move",children:[S.jsx($w.Content,{visible:!0,style:{width:"100%"},children:S.jsx(Ye,{fluid:!0,color:"teal",content:t.following?"Following":"Not Following"})}),S.jsx($w.Content,{hidden:!0,style:{width:"100%"},children:S.jsx(Ye,{fluid:!0,basic:!0,color:t.following?"red":"green",content:t.following?"Unfollow":"Follow",loading:i,onClick:l=>o(l,t.username)})})]})}),T$=St(function({profile:t}){function n(r){if(r)return r.length>40?r.substring(0,37)+"...":r}return S.jsxs(br,{as:ur,to:`/profiles/${t.username}`,children:[S.jsx(hr,{src:t.image||"/assets/user.png"}),S.jsxs(br.Content,{children:[S.jsx(br.Header,{children:t.displayName}),S.jsx(br.Description,{children:n(t.bio)})]}),S.jsxs(br.Content,{children:[S.jsx(rn,{name:"user"}),t.followersCount," followers"]}),S.jsx(C$,{profile:t})]})}),sJ=St(function({attendees:t}){const n={borderColor:"orange",borderWidth:4};return S.jsx(Y1,{horizontal:!0,children:t.map(r=>S.jsx(KD,{hoverable:!0,trigger:S.jsx(Y1.Item,{as:ur,to:`/profiles/${r.username}`,children:S.jsx(hr,{size:"mini",circular:!0,src:r.image||"/assets/user.png",bordered:!0,style:r.following?n:null})},r.username),children:S.jsx(KD.Content,{children:S.jsx(T$,{profile:r})})},r.username))})});class wu extends Error{}class lJ extends wu{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class uJ extends wu{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class cJ extends wu{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class Qf extends wu{}class D$ extends wu{constructor(t){super(`Invalid unit ${t}`)}}class ra extends wu{}class Ao extends wu{constructor(){super("Zone is an abstract class")}}const pe="numeric",ei="short",Hr="long",xg={year:pe,month:pe,day:pe},O$={year:pe,month:ei,day:pe},dJ={year:pe,month:ei,day:pe,weekday:ei},k$={year:pe,month:Hr,day:pe},P$={year:pe,month:Hr,day:pe,weekday:Hr},N$={hour:pe,minute:pe},A$={hour:pe,minute:pe,second:pe},M$={hour:pe,minute:pe,second:pe,timeZoneName:ei},R$={hour:pe,minute:pe,second:pe,timeZoneName:Hr},I$={hour:pe,minute:pe,hourCycle:"h23"},$$={hour:pe,minute:pe,second:pe,hourCycle:"h23"},L$={hour:pe,minute:pe,second:pe,hourCycle:"h23",timeZoneName:ei},F$={hour:pe,minute:pe,second:pe,hourCycle:"h23",timeZoneName:Hr},j$={year:pe,month:pe,day:pe,hour:pe,minute:pe},U$={year:pe,month:pe,day:pe,hour:pe,minute:pe,second:pe},z$={year:pe,month:ei,day:pe,hour:pe,minute:pe},H$={year:pe,month:ei,day:pe,hour:pe,minute:pe,second:pe},fJ={year:pe,month:ei,day:pe,weekday:ei,hour:pe,minute:pe},B$={year:pe,month:Hr,day:pe,hour:pe,minute:pe,timeZoneName:ei},V$={year:pe,month:Hr,day:pe,hour:pe,minute:pe,second:pe,timeZoneName:ei},W$={year:pe,month:Hr,day:pe,weekday:Hr,hour:pe,minute:pe,timeZoneName:Hr},Y$={year:pe,month:Hr,day:pe,weekday:Hr,hour:pe,minute:pe,second:pe,timeZoneName:Hr};class Gp{get type(){throw new Ao}get name(){throw new Ao}get ianaName(){return this.name}get isUniversal(){throw new Ao}offsetName(t,n){throw new Ao}formatOffset(t,n){throw new Ao}offset(t){throw new Ao}equals(t){throw new Ao}get isValid(){throw new Ao}}let Vw=null;class _0 extends Gp{static get instance(){return Vw===null&&(Vw=new _0),Vw}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:n,locale:r}){return K$(t,n,r)}formatOffset(t,n){return Sh(this.offset(t),n)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}let Cv={};function hJ(e){return Cv[e]||(Cv[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),Cv[e]}const pJ={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function mJ(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,a,i,o,s,l,u,c]=r;return[o,a,i,s,l,u,c]}function vJ(e,t){const n=e.formatToParts(t),r=[];for(let a=0;a=0?p:1e3+p,(f-h)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let bO={};function gJ(e,t={}){const n=JSON.stringify([e,t]);let r=bO[n];return r||(r=new Intl.ListFormat(e,t),bO[n]=r),r}let i_={};function o_(e,t={}){const n=JSON.stringify([e,t]);let r=i_[n];return r||(r=new Intl.DateTimeFormat(e,t),i_[n]=r),r}let s_={};function yJ(e,t={}){const n=JSON.stringify([e,t]);let r=s_[n];return r||(r=new Intl.NumberFormat(e,t),s_[n]=r),r}let l_={};function wJ(e,t={}){const{base:n,...r}=t,a=JSON.stringify([e,r]);let i=l_[a];return i||(i=new Intl.RelativeTimeFormat(e,t),l_[a]=i),i}let Xf=null;function bJ(){return Xf||(Xf=new Intl.DateTimeFormat().resolvedOptions().locale,Xf)}function _J(e){const t=e.indexOf("-x-");t!==-1&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(n===-1)return[e];{let r,a;try{r=o_(e).resolvedOptions(),a=e}catch{const l=e.substring(0,n);r=o_(l).resolvedOptions(),a=l}const{numberingSystem:i,calendar:o}=r;return[a,i,o]}}function SJ(e,t,n){return(n||t)&&(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}function EJ(e){const t=[];for(let n=1;n<=12;n++){const r=Ae.utc(2009,n,1);t.push(e(r))}return t}function xJ(e){const t=[];for(let n=1;n<=7;n++){const r=Ae.utc(2016,11,13+n);t.push(e(r))}return t}function Lm(e,t,n,r){const a=e.listingMode();return a==="error"?null:a==="en"?n(t):r(t)}function CJ(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem==="latn"}class TJ{constructor(t,n,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:a,floor:i,...o}=r;if(!n||Object.keys(o).length>0){const s={useGrouping:!1,...r};r.padTo>0&&(s.minimumIntegerDigits=r.padTo),this.inf=yJ(t,s)}}format(t){if(this.inf){const n=this.floor?Math.floor(t):t;return this.inf.format(n)}else{const n=this.floor?Math.floor(t):ix(t,3);return mn(n,this.padTo)}}}class DJ{constructor(t,n,r){this.opts=r,this.originalZone=void 0;let a;if(this.opts.timeZone)this.dt=t;else if(t.zone.type==="fixed"){const o=-1*(t.offset/60),s=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;t.offset!==0&&go.create(s).valid?(a=s,this.dt=t):(a="UTC",this.dt=t.offset===0?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else t.zone.type==="system"?this.dt=t:t.zone.type==="iana"?(this.dt=t,a=t.zone.name):(a="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const i={...this.opts};i.timeZone=i.timeZone||a,this.dtf=o_(n,i)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(n=>{if(n.type==="timeZoneName"){const r=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:r}}else return n}):t}resolvedOptions(){return this.dtf.resolvedOptions()}}class OJ{constructor(t,n,r){this.opts={style:"long",...r},!n&&G$()&&(this.rtf=wJ(t,r))}format(t,n){return this.rtf?this.rtf.format(t,n):WJ(n,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,n){return this.rtf?this.rtf.formatToParts(t,n):[]}}class It{static fromOpts(t){return It.create(t.locale,t.numberingSystem,t.outputCalendar,t.defaultToEN)}static create(t,n,r,a=!1){const i=t||pn.defaultLocale,o=i||(a?"en-US":bJ()),s=n||pn.defaultNumberingSystem,l=r||pn.defaultOutputCalendar;return new It(o,s,l,i)}static resetCache(){Xf=null,i_={},s_={},l_={}}static fromObject({locale:t,numberingSystem:n,outputCalendar:r}={}){return It.create(t,n,r)}constructor(t,n,r,a){const[i,o,s]=_J(t);this.locale=i,this.numberingSystem=n||o||null,this.outputCalendar=r||s||null,this.intl=SJ(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=a,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=CJ(this)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&n?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:It.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,n=!1){return Lm(this,t,X$,()=>{const r=n?{month:t,day:"numeric"}:{month:t},a=n?"format":"standalone";return this.monthsCache[a][t]||(this.monthsCache[a][t]=EJ(i=>this.extract(i,r,"month"))),this.monthsCache[a][t]})}weekdays(t,n=!1){return Lm(this,t,eL,()=>{const r=n?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},a=n?"format":"standalone";return this.weekdaysCache[a][t]||(this.weekdaysCache[a][t]=xJ(i=>this.extract(i,r,"weekday"))),this.weekdaysCache[a][t]})}meridiems(){return Lm(this,void 0,()=>tL,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Ae.utc(2016,11,13,9),Ae.utc(2016,11,13,19)].map(n=>this.extract(n,t,"dayperiod"))}return this.meridiemCache})}eras(t){return Lm(this,t,nL,()=>{const n={era:t};return this.eraCache[t]||(this.eraCache[t]=[Ae.utc(-40,1,1),Ae.utc(2017,1,1)].map(r=>this.extract(r,n,"era"))),this.eraCache[t]})}extract(t,n,r){const a=this.dtFormatter(t,n),i=a.formatToParts(),o=i.find(s=>s.type.toLowerCase()===r);return o?o.value:null}numberFormatter(t={}){return new TJ(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,n={}){return new DJ(t,this.intl,n)}relFormatter(t={}){return new OJ(this.intl,this.isEnglish(),t)}listFormatter(t={}){return gJ(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}}let Ww=null;class sr extends Gp{static get utcInstance(){return Ww===null&&(Ww=new sr(0)),Ww}static instance(t){return t===0?sr.utcInstance:new sr(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new sr(x0(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Sh(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Sh(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return Sh(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}class kJ extends Gp{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Bo(e,t){if(Ze(e)||e===null)return t;if(e instanceof Gp)return e;if(PJ(e)){const n=e.toLowerCase();return n==="default"?t:n==="local"||n==="system"?_0.instance:n==="utc"||n==="gmt"?sr.utcInstance:sr.parseSpecifier(n)||go.create(e)}else return Tl(e)?sr.instance(e):typeof e=="object"&&"offset"in e&&typeof e.offset=="function"?e:new kJ(e)}let _O=()=>Date.now(),SO="system",EO=null,xO=null,CO=null,TO=60,DO;class pn{static get now(){return _O}static set now(t){_O=t}static set defaultZone(t){SO=t}static get defaultZone(){return Bo(SO,_0.instance)}static get defaultLocale(){return EO}static set defaultLocale(t){EO=t}static get defaultNumberingSystem(){return xO}static set defaultNumberingSystem(t){xO=t}static get defaultOutputCalendar(){return CO}static set defaultOutputCalendar(t){CO=t}static get twoDigitCutoffYear(){return TO}static set twoDigitCutoffYear(t){TO=t%100}static get throwOnInvalid(){return DO}static set throwOnInvalid(t){DO=t}static resetCaches(){It.resetCache(),go.resetCache()}}function Ze(e){return typeof e>"u"}function Tl(e){return typeof e=="number"}function S0(e){return typeof e=="number"&&e%1===0}function PJ(e){return typeof e=="string"}function NJ(e){return Object.prototype.toString.call(e)==="[object Date]"}function G$(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function AJ(e){return Array.isArray(e)?e:[e]}function OO(e,t,n){if(e.length!==0)return e.reduce((r,a)=>{const i=[t(a),a];return r&&n(r[0],i[0])===r[0]?r:i},null)[1]}function MJ(e,t){return t.reduce((n,r)=>(n[r]=e[r],n),{})}function Ud(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Qi(e,t,n){return S0(e)&&e>=t&&e<=n}function RJ(e,t){return e-t*Math.floor(e/t)}function mn(e,t=2){const n=e<0;let r;return n?r="-"+(""+-e).padStart(t,"0"):r=(""+e).padStart(t,"0"),r}function jo(e){if(!(Ze(e)||e===null||e===""))return parseInt(e,10)}function tl(e){if(!(Ze(e)||e===null||e===""))return parseFloat(e)}function ax(e){if(!(Ze(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function ix(e,t,n=!1){const r=10**t;return(n?Math.trunc:Math.round)(e*r)/r}function Kp(e){return e%4===0&&(e%100!==0||e%400===0)}function _h(e){return Kp(e)?366:365}function Cg(e,t){const n=RJ(t-1,12)+1,r=e+(t-n)/12;return n===2?Kp(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function E0(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function Tg(e){const t=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,n=e-1,r=(n+Math.floor(n/4)-Math.floor(n/100)+Math.floor(n/400))%7;return t===4||r===3?53:52}function u_(e){return e>99?e:e>pn.twoDigitCutoffYear?1900+e:2e3+e}function K$(e,t,n,r=null){const a=new Date(e),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(i.timeZone=r);const o={timeZoneName:t,...i},s=new Intl.DateTimeFormat(n,o).formatToParts(a).find(l=>l.type.toLowerCase()==="timezonename");return s?s.value:null}function x0(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const r=parseInt(t,10)||0,a=n<0||Object.is(n,-0)?-r:r;return n*60+a}function q$(e){const t=Number(e);if(typeof e=="boolean"||e===""||Number.isNaN(t))throw new ra(`Invalid unit value ${e}`);return t}function Dg(e,t){const n={};for(const r in e)if(Ud(e,r)){const a=e[r];if(a==null)continue;n[t(r)]=q$(a)}return n}function Sh(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),a=e>=0?"+":"-";switch(t){case"short":return`${a}${mn(n,2)}:${mn(r,2)}`;case"narrow":return`${a}${n}${r>0?`:${r}`:""}`;case"techie":return`${a}${mn(n,2)}${mn(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function C0(e){return MJ(e,["hour","minute","second","millisecond"])}const IJ=["January","February","March","April","May","June","July","August","September","October","November","December"],Q$=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],$J=["J","F","M","A","M","J","J","A","S","O","N","D"];function X$(e){switch(e){case"narrow":return[...$J];case"short":return[...Q$];case"long":return[...IJ];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const Z$=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],J$=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],LJ=["M","T","W","T","F","S","S"];function eL(e){switch(e){case"narrow":return[...LJ];case"short":return[...J$];case"long":return[...Z$];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const tL=["AM","PM"],FJ=["Before Christ","Anno Domini"],jJ=["BC","AD"],UJ=["B","A"];function nL(e){switch(e){case"narrow":return[...UJ];case"short":return[...jJ];case"long":return[...FJ];default:return null}}function zJ(e){return tL[e.hour<12?0:1]}function HJ(e,t){return eL(t)[e.weekday-1]}function BJ(e,t){return X$(t)[e.month-1]}function VJ(e,t){return nL(t)[e.year<0?0:1]}function WJ(e,t,n="always",r=!1){const a={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=["hours","minutes","seconds"].indexOf(e)===-1;if(n==="auto"&&i){const d=e==="days";switch(t){case 1:return d?"tomorrow":`next ${a[e][0]}`;case-1:return d?"yesterday":`last ${a[e][0]}`;case 0:return d?"today":`this ${a[e][0]}`}}const o=Object.is(t,-0)||t<0,s=Math.abs(t),l=s===1,u=a[e],c=r?l?u[1]:u[2]||u[1]:l?a[e][0]:e;return o?`${s} ${c} ago`:`in ${s} ${c}`}function kO(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const YJ={D:xg,DD:O$,DDD:k$,DDDD:P$,t:N$,tt:A$,ttt:M$,tttt:R$,T:I$,TT:$$,TTT:L$,TTTT:F$,f:j$,ff:z$,fff:B$,ffff:W$,F:U$,FF:H$,FFF:V$,FFFF:Y$};class qn{static create(t,n={}){return new qn(t,n)}static parseFormat(t){let n=null,r="",a=!1;const i=[];for(let o=0;o0&&i.push({literal:a||/^\s+$/.test(r),val:r}),n=null,r="",a=!a):a||s===n?r+=s:(r.length>0&&i.push({literal:/^\s+$/.test(r),val:r}),r=s,n=s)}return r.length>0&&i.push({literal:a||/^\s+$/.test(r),val:r}),i}static macroTokenToFormatOpts(t){return YJ[t]}constructor(t,n){this.opts=n,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...n}).format()}dtFormatter(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n})}formatDateTime(t,n){return this.dtFormatter(t,n).format()}formatDateTimeParts(t,n){return this.dtFormatter(t,n).formatToParts()}formatInterval(t,n){return this.dtFormatter(t.start,n).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,n){return this.dtFormatter(t,n).resolvedOptions()}num(t,n=0){if(this.opts.forceSimple)return mn(t,n);const r={...this.opts};return n>0&&(r.padTo=n),this.loc.numberFormatter(r).format(t)}formatDateTimeFromString(t,n){const r=this.loc.listingMode()==="en",a=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",i=(h,p)=>this.loc.extract(t,h,p),o=h=>t.isOffsetFixed&&t.offset===0&&h.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,h.format):"",s=()=>r?zJ(t):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(h,p)=>r?BJ(t,h):i(p?{month:h}:{month:h,day:"numeric"},"month"),u=(h,p)=>r?HJ(t,h):i(p?{weekday:h}:{weekday:h,month:"long",day:"numeric"},"weekday"),c=h=>{const p=qn.macroTokenToFormatOpts(h);return p?this.formatWithSystemDefault(t,p):h},d=h=>r?VJ(t,h):i({era:h},"era"),f=h=>{switch(h){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return s();case"d":return a?i({day:"numeric"},"day"):this.num(t.day);case"dd":return a?i({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return u("short",!0);case"cccc":return u("long",!0);case"ccccc":return u("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return u("short",!1);case"EEEE":return u("long",!1);case"EEEEE":return u("narrow",!1);case"L":return a?i({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return a?i({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return a?i({month:"numeric"},"month"):this.num(t.month);case"MM":return a?i({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return a?i({year:"numeric"},"year"):this.num(t.year);case"yy":return a?i({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return a?i({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return a?i({year:"numeric"},"year"):this.num(t.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return c(h)}};return kO(qn.parseFormat(n),f)}formatDurationFromString(t,n){const r=l=>{switch(l[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},a=l=>u=>{const c=r(u);return c?this.num(l.get(c),u.length):u},i=qn.parseFormat(n),o=i.reduce((l,{literal:u,val:c})=>u?l:l.concat(c),[]),s=t.shiftTo(...o.map(r).filter(l=>l));return kO(i,a(s))}}class ja{constructor(t,n){this.reason=t,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const rL=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function lf(...e){const t=e.reduce((n,r)=>n+r.source,"");return RegExp(`^${t}$`)}function uf(...e){return t=>e.reduce(([n,r,a],i)=>{const[o,s,l]=i(t,a);return[{...n,...o},s||r,l]},[{},null,1]).slice(0,2)}function cf(e,...t){if(e==null)return[null,null];for(const[n,r]of t){const a=n.exec(e);if(a)return r(a)}return[null,null]}function aL(...e){return(t,n)=>{const r={};let a;for(a=0;ah!==void 0&&(p||h&&c)?-h:h;return[{years:f(tl(n)),months:f(tl(r)),weeks:f(tl(a)),days:f(tl(i)),hours:f(tl(o)),minutes:f(tl(s)),seconds:f(tl(l),l==="-0"),milliseconds:f(ax(u),d)}]}const iee={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function lx(e,t,n,r,a,i,o){const s={year:t.length===2?u_(jo(t)):jo(t),month:Q$.indexOf(n)+1,day:jo(r),hour:jo(a),minute:jo(i)};return o&&(s.second=jo(o)),e&&(s.weekday=e.length>3?Z$.indexOf(e)+1:J$.indexOf(e)+1),s}const oee=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function see(e){const[,t,n,r,a,i,o,s,l,u,c,d]=e,f=lx(t,a,r,n,i,o,s);let h;return l?h=iee[l]:u?h=0:h=x0(c,d),[f,new sr(h)]}function lee(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const uee=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,cee=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,dee=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function PO(e){const[,t,n,r,a,i,o,s]=e;return[lx(t,a,r,n,i,o,s),sr.utcInstance]}function fee(e){const[,t,n,r,a,i,o,s]=e;return[lx(t,s,n,r,a,i,o),sr.utcInstance]}const hee=lf(KJ,sx),pee=lf(qJ,sx),mee=lf(QJ,sx),vee=lf(oL),lL=uf(tee,df,qp,Qp),gee=uf(XJ,df,qp,Qp),yee=uf(ZJ,df,qp,Qp),wee=uf(df,qp,Qp);function bee(e){return cf(e,[hee,lL],[pee,gee],[mee,yee],[vee,wee])}function _ee(e){return cf(lee(e),[oee,see])}function See(e){return cf(e,[uee,PO],[cee,PO],[dee,fee])}function Eee(e){return cf(e,[ree,aee])}const xee=uf(df);function Cee(e){return cf(e,[nee,xee])}const Tee=lf(JJ,eee),Dee=lf(sL),Oee=uf(df,qp,Qp);function kee(e){return cf(e,[Tee,lL],[Dee,Oee])}const NO="Invalid Duration",uL={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Pee={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...uL},Xr=146097/400,Ou=146097/4800,Nee={years:{quarters:4,months:12,weeks:Xr/7,days:Xr,hours:Xr*24,minutes:Xr*24*60,seconds:Xr*24*60*60,milliseconds:Xr*24*60*60*1e3},quarters:{months:3,weeks:Xr/28,days:Xr/4,hours:Xr*24/4,minutes:Xr*24*60/4,seconds:Xr*24*60*60/4,milliseconds:Xr*24*60*60*1e3/4},months:{weeks:Ou/7,days:Ou,hours:Ou*24,minutes:Ou*24*60,seconds:Ou*24*60*60,milliseconds:Ou*24*60*60*1e3},...uL},yl=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Aee=yl.slice(0).reverse();function Mo(e,t,n=!1){const r={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new et(r)}function cL(e,t){let n=t.milliseconds??0;for(const r of Aee.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function AO(e,t){const n=cL(e,t)<0?-1:1;yl.reduceRight((r,a)=>{if(Ze(t[a]))return r;if(r){const i=t[r]*n,o=e[a][r],s=Math.floor(i/o);t[a]+=s*n,t[r]-=s*o*n}return a},null),yl.reduce((r,a)=>{if(Ze(t[a]))return r;if(r){const i=t[r]%1;t[r]-=i,t[a]+=i*e[r][a]}return a},null)}function Mee(e){const t={};for(const[n,r]of Object.entries(e))r!==0&&(t[n]=r);return t}class et{constructor(t){const n=t.conversionAccuracy==="longterm"||!1;let r=n?Nee:Pee;t.matrix&&(r=t.matrix),this.values=t.values,this.loc=t.loc||It.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(t,n){return et.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(t==null||typeof t!="object")throw new ra(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new et({values:Dg(t,et.normalizeUnit),loc:It.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(Tl(t))return et.fromMillis(t);if(et.isDuration(t))return t;if(typeof t=="object")return et.fromObject(t);throw new ra(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){const[r]=Eee(t);return r?et.fromObject(r,n):et.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){const[r]=Cee(t);return r?et.fromObject(r,n):et.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new ra("need to specify a reason the Duration is invalid");const r=t instanceof ja?t:new ja(t,n);if(pn.throwOnInvalid)throw new cJ(r);return new et({invalid:r})}static normalizeUnit(t){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!n)throw new D$(t);return n}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,n={}){const r={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?qn.create(this.loc,r).formatDurationFromString(this,t):NO}toHuman(t={}){if(!this.isValid)return NO;const n=yl.map(r=>{const a=this.values[r];return Ze(a)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:r.slice(0,-1)}).format(a)}).filter(r=>r);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=ix(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1},Ae.fromMillis(n,{zone:"UTC"}).toISOTime(t))}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.isValid?cL(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const n=et.fromDurationLike(t),r={};for(const a of yl)(Ud(n.values,a)||Ud(this.values,a))&&(r[a]=n.get(a)+this.get(a));return Mo(this,{values:r},!0)}minus(t){if(!this.isValid)return this;const n=et.fromDurationLike(t);return this.plus(n.negate())}mapUnits(t){if(!this.isValid)return this;const n={};for(const r of Object.keys(this.values))n[r]=q$(t(this.values[r],r));return Mo(this,{values:n},!0)}get(t){return this[et.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const n={...this.values,...Dg(t,et.normalizeUnit)};return Mo(this,{values:n})}reconfigure({locale:t,numberingSystem:n,conversionAccuracy:r,matrix:a}={}){const o={loc:this.loc.clone({locale:t,numberingSystem:n}),matrix:a,conversionAccuracy:r};return Mo(this,o)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return AO(this.matrix,t),Mo(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=Mee(this.normalize().shiftToAll().toObject());return Mo(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(o=>et.normalizeUnit(o));const n={},r={},a=this.toObject();let i;for(const o of yl)if(t.indexOf(o)>=0){i=o;let s=0;for(const u in r)s+=this.matrix[u][o]*r[u],r[u]=0;Tl(a[o])&&(s+=a[o]);const l=Math.trunc(s);n[o]=l,r[o]=(s*1e3-l*1e3)/1e3}else Tl(a[o])&&(r[o]=a[o]);for(const o in r)r[o]!==0&&(n[i]+=o===i?r[o]:r[o]/this.matrix[i][o]);return AO(this.matrix,n),Mo(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=this.values[n]===0?0:-this.values[n];return Mo(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function n(r,a){return r===void 0||r===0?a===void 0||a===0:r===a}for(const r of yl)if(!n(this.values[r],t.values[r]))return!1;return!0}}const ku="Invalid Interval";function Ree(e,t){return!e||!e.isValid?tn.invalid("missing or invalid start"):!t||!t.isValid?tn.invalid("missing or invalid end"):tt:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:n}={}){return this.isValid?tn.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];const n=t.map($f).filter(o=>this.contains(o)).sort(),r=[];let{s:a}=this,i=0;for(;a+this.e?this.e:o;r.push(tn.fromDateTimes(a,s)),a=s,i+=1}return r}splitBy(t){const n=et.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:r}=this,a=1,i;const o=[];for(;rl*a));i=+s>+this.e?this.e:s,o.push(tn.fromDateTimes(r,i)),r=i,a+=1}return o}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;const n=this.s>t.s?this.s:t.s,r=this.e=r?null:tn.fromDateTimes(n,r)}union(t){if(!this.isValid)return this;const n=this.st.e?this.e:t.e;return tn.fromDateTimes(n,r)}static merge(t){const[n,r]=t.sort((a,i)=>a.s-i.s).reduce(([a,i],o)=>i?i.overlaps(o)||i.abutsStart(o)?[a,i.union(o)]:[a.concat([i]),o]:[a,o],[[],null]);return r&&n.push(r),n}static xor(t){let n=null,r=0;const a=[],i=t.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),o=Array.prototype.concat(...i),s=o.sort((l,u)=>l.time-u.time);for(const l of s)r+=l.type==="s"?1:-1,r===1?n=l.time:(n&&+n!=+l.time&&a.push(tn.fromDateTimes(n,l.time)),n=null);return tn.merge(a)}difference(...t){return tn.xor([this].concat(t)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:ku}toLocaleString(t=xg,n={}){return this.isValid?qn.create(this.s.loc.clone(n),t).formatInterval(this):ku}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:ku}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:ku}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:ku}toFormat(t,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${n}${this.e.toFormat(t)}`:ku}toDuration(t,n){return this.isValid?this.e.diff(this.s,t,n):et.invalid(this.invalidReason)}mapEndpoints(t){return tn.fromDateTimes(t(this.s),t(this.e))}}class Fm{static hasDST(t=pn.defaultZone){const n=Ae.now().setZone(t).set({month:12});return!t.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(t){return go.isValidZone(t)}static normalizeZone(t){return Bo(t,pn.defaultZone)}static months(t="long",{locale:n=null,numberingSystem:r=null,locObj:a=null,outputCalendar:i="gregory"}={}){return(a||It.create(n,r,i)).months(t)}static monthsFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:a=null,outputCalendar:i="gregory"}={}){return(a||It.create(n,r,i)).months(t,!0)}static weekdays(t="long",{locale:n=null,numberingSystem:r=null,locObj:a=null}={}){return(a||It.create(n,r,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:a=null}={}){return(a||It.create(n,r,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return It.create(t).meridiems()}static eras(t="short",{locale:n=null}={}){return It.create(n,null,"gregory").eras(t)}static features(){return{relative:G$()}}}function MO(e,t){const n=a=>a.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(et.fromMillis(r).as("days"))}function Iee(e,t,n){const r=[["years",(l,u)=>u.year-l.year],["quarters",(l,u)=>u.quarter-l.quarter+(u.year-l.year)*4],["months",(l,u)=>u.month-l.month+(u.year-l.year)*12],["weeks",(l,u)=>{const c=MO(l,u);return(c-c%7)/7}],["days",MO]],a={},i=e;let o,s;for(const[l,u]of r)n.indexOf(l)>=0&&(o=l,a[l]=u(e,t),s=i.plus(a),s>t?(a[l]--,e=i.plus(a),e>t&&(s=e,a[l]--,e=i.plus(a))):e=s);return[e,a,s,o]}function $ee(e,t,n,r){let[a,i,o,s]=Iee(e,t,n);const l=t-a,u=n.filter(d=>["hours","minutes","seconds","milliseconds"].indexOf(d)>=0);u.length===0&&(o0?et.fromMillis(l,r).shiftTo(...u).plus(c):c}const ux={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},RO={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Lee=ux.hanidec.replace(/[\[|\]]/g,"").split("");function Fee(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n=i&&r<=o&&(t+=r-i)}}return parseInt(t,10)}else return t}function Ta({numberingSystem:e},t=""){return new RegExp(`${ux[e||"latn"]}${t}`)}const jee="missing Intl.DateTimeFormat.formatToParts support";function ot(e,t=n=>n){return{regex:e,deser:([n])=>t(Fee(n))}}const Uee=String.fromCharCode(160),dL=`[ ${Uee}]`,fL=new RegExp(dL,"g");function zee(e){return e.replace(/\./g,"\\.?").replace(fL,dL)}function IO(e){return e.replace(/\./g,"").replace(fL," ").toLowerCase()}function Da(e,t){return e===null?null:{regex:RegExp(e.map(zee).join("|")),deser:([n])=>e.findIndex(r=>IO(n)===IO(r))+t}}function $O(e,t){return{regex:e,deser:([,n,r])=>x0(n,r),groups:t}}function jm(e){return{regex:e,deser:([t])=>t}}function Hee(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Bee(e,t){const n=Ta(t),r=Ta(t,"{2}"),a=Ta(t,"{3}"),i=Ta(t,"{4}"),o=Ta(t,"{6}"),s=Ta(t,"{1,2}"),l=Ta(t,"{1,3}"),u=Ta(t,"{1,6}"),c=Ta(t,"{1,9}"),d=Ta(t,"{2,4}"),f=Ta(t,"{4,6}"),h=y=>({regex:RegExp(Hee(y.val)),deser:([g])=>g,literal:!0}),v=(y=>{if(e.literal)return h(y);switch(y.val){case"G":return Da(t.eras("short"),0);case"GG":return Da(t.eras("long"),0);case"y":return ot(u);case"yy":return ot(d,u_);case"yyyy":return ot(i);case"yyyyy":return ot(f);case"yyyyyy":return ot(o);case"M":return ot(s);case"MM":return ot(r);case"MMM":return Da(t.months("short",!0),1);case"MMMM":return Da(t.months("long",!0),1);case"L":return ot(s);case"LL":return ot(r);case"LLL":return Da(t.months("short",!1),1);case"LLLL":return Da(t.months("long",!1),1);case"d":return ot(s);case"dd":return ot(r);case"o":return ot(l);case"ooo":return ot(a);case"HH":return ot(r);case"H":return ot(s);case"hh":return ot(r);case"h":return ot(s);case"mm":return ot(r);case"m":return ot(s);case"q":return ot(s);case"qq":return ot(r);case"s":return ot(s);case"ss":return ot(r);case"S":return ot(l);case"SSS":return ot(a);case"u":return jm(c);case"uu":return jm(s);case"uuu":return ot(n);case"a":return Da(t.meridiems(),0);case"kkkk":return ot(i);case"kk":return ot(d,u_);case"W":return ot(s);case"WW":return ot(r);case"E":case"c":return ot(n);case"EEE":return Da(t.weekdays("short",!1),1);case"EEEE":return Da(t.weekdays("long",!1),1);case"ccc":return Da(t.weekdays("short",!0),1);case"cccc":return Da(t.weekdays("long",!0),1);case"Z":case"ZZ":return $O(new RegExp(`([+-]${s.source})(?::(${r.source}))?`),2);case"ZZZ":return $O(new RegExp(`([+-]${s.source})(${r.source})?`),2);case"z":return jm(/[a-z_+-/]{1,256}?/i);case" ":return jm(/[^\S\n\r]/);default:return h(y)}})(e)||{invalidReason:jee};return v.token=e,v}const Vee={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function Wee(e,t,n){const{type:r,value:a}=e;if(r==="literal"){const l=/^\s+$/.test(a);return{literal:!l,val:l?" ":a}}const i=t[r];let o=r;r==="hour"&&(t.hour12!=null?o=t.hour12?"hour12":"hour24":t.hourCycle!=null?t.hourCycle==="h11"||t.hourCycle==="h12"?o="hour12":o="hour24":o=n.hour12?"hour12":"hour24");let s=Vee[o];if(typeof s=="object"&&(s=s[i]),s)return{literal:!1,val:s}}function Yee(e){return[`^${e.map(n=>n.regex).reduce((n,r)=>`${n}(${r.source})`,"")}$`,e]}function Gee(e,t,n){const r=e.match(t);if(r){const a={};let i=1;for(const o in n)if(Ud(n,o)){const s=n[o],l=s.groups?s.groups+1:1;!s.literal&&s.token&&(a[s.token.val[0]]=s.deser(r.slice(i,i+l))),i+=l}return[r,a]}else return[r,{}]}function Kee(e){const t=i=>{switch(i){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,r;return Ze(e.z)||(n=go.create(e.z)),Ze(e.Z)||(n||(n=new sr(e.Z)),r=e.Z),Ze(e.q)||(e.M=(e.q-1)*3+1),Ze(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),Ze(e.u)||(e.S=ax(e.u)),[Object.keys(e).reduce((i,o)=>{const s=t(o);return s&&(i[s]=e[o]),i},{}),n,r]}let Yw=null;function qee(){return Yw||(Yw=Ae.fromMillis(1555555555555)),Yw}function Qee(e,t){if(e.literal)return e;const n=qn.macroTokenToFormatOpts(e.val),r=mL(n,t);return r==null||r.includes(void 0)?e:r}function hL(e,t){return Array.prototype.concat(...e.map(n=>Qee(n,t)))}function pL(e,t,n){const r=hL(qn.parseFormat(n),e),a=r.map(o=>Bee(o,e)),i=a.find(o=>o.invalidReason);if(i)return{input:t,tokens:r,invalidReason:i.invalidReason};{const[o,s]=Yee(a),l=RegExp(o,"i"),[u,c]=Gee(t,l,s),[d,f,h]=c?Kee(c):[null,null,void 0];if(Ud(c,"a")&&Ud(c,"H"))throw new Qf("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:r,regex:l,rawMatches:u,matches:c,result:d,zone:f,specificOffset:h}}}function Xee(e,t,n){const{result:r,zone:a,specificOffset:i,invalidReason:o}=pL(e,t,n);return[r,a,i,o]}function mL(e,t){if(!e)return null;const r=qn.create(t,e).dtFormatter(qee()),a=r.formatToParts(),i=r.resolvedOptions();return a.map(o=>Wee(o,e,i))}const vL=[0,31,59,90,120,151,181,212,243,273,304,334],gL=[0,31,60,91,121,152,182,213,244,274,305,335];function ca(e,t){return new ja("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function yL(e,t,n){const r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const a=r.getUTCDay();return a===0?7:a}function wL(e,t,n){return n+(Kp(e)?gL:vL)[t-1]}function bL(e,t){const n=Kp(e)?gL:vL,r=n.findIndex(i=>iTg(t)?(s=t+1,o=1):s=t,{weekYear:s,weekNumber:o,weekday:i,...C0(e)}}function LO(e){const{weekYear:t,weekNumber:n,weekday:r}=e,a=yL(t,1,4),i=_h(t);let o=n*7+r-a-3,s;o<1?(s=t-1,o+=_h(s)):o>i?(s=t+1,o-=_h(t)):s=t;const{month:l,day:u}=bL(s,o);return{year:s,month:l,day:u,...C0(e)}}function Gw(e){const{year:t,month:n,day:r}=e,a=wL(t,n,r);return{year:t,ordinal:a,...C0(e)}}function FO(e){const{year:t,ordinal:n}=e,{month:r,day:a}=bL(t,n);return{year:t,month:r,day:a,...C0(e)}}function Zee(e){const t=S0(e.weekYear),n=Qi(e.weekNumber,1,Tg(e.weekYear)),r=Qi(e.weekday,1,7);return t?n?r?!1:ca("weekday",e.weekday):ca("week",e.week):ca("weekYear",e.weekYear)}function Jee(e){const t=S0(e.year),n=Qi(e.ordinal,1,_h(e.year));return t?n?!1:ca("ordinal",e.ordinal):ca("year",e.year)}function _L(e){const t=S0(e.year),n=Qi(e.month,1,12),r=Qi(e.day,1,Cg(e.year,e.month));return t?n?r?!1:ca("day",e.day):ca("month",e.month):ca("year",e.year)}function SL(e){const{hour:t,minute:n,second:r,millisecond:a}=e,i=Qi(t,0,23)||t===24&&n===0&&r===0&&a===0,o=Qi(n,0,59),s=Qi(r,0,59),l=Qi(a,0,999);return i?o?s?l?!1:ca("millisecond",a):ca("second",r):ca("minute",n):ca("hour",t)}const Kw="Invalid DateTime",jO=864e13;function Um(e){return new ja("unsupported zone",`the zone "${e.name}" is not supported`)}function qw(e){return e.weekData===null&&(e.weekData=c_(e.c)),e.weekData}function nl(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new Ae({...n,...t,old:n})}function EL(e,t,n){let r=e-t*60*1e3;const a=n.offset(r);if(t===a)return[r,t];r-=(a-t)*60*1e3;const i=n.offset(r);return a===i?[r,a]:[e-Math.min(a,i)*60*1e3,Math.max(a,i)]}function zm(e,t){e+=t*60*1e3;const n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Tv(e,t,n){return EL(E0(e),t,n)}function UO(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),a=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,i={...e.c,year:r,month:a,day:Math.min(e.c.day,Cg(r,a))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},o=et.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),s=E0(i);let[l,u]=EL(s,n,e.zone);return o!==0&&(l+=o,u=e.zone.offset(l)),{ts:l,o:u}}function If(e,t,n,r,a,i){const{setZone:o,zone:s}=n;if(e&&Object.keys(e).length!==0||t){const l=t||s,u=Ae.fromObject(e,{...n,zone:l,specificOffset:i});return o?u:u.setZone(s)}else return Ae.invalid(new ja("unparsable",`the input "${a}" can't be parsed as ${r}`))}function Hm(e,t,n=!0){return e.isValid?qn.create(It.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function Qw(e,t){const n=e.c.year>9999||e.c.year<0;let r="";return n&&e.c.year>=0&&(r+="+"),r+=mn(e.c.year,n?6:4),t?(r+="-",r+=mn(e.c.month),r+="-",r+=mn(e.c.day)):(r+=mn(e.c.month),r+=mn(e.c.day)),r}function zO(e,t,n,r,a,i){let o=mn(e.c.hour);return t?(o+=":",o+=mn(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(o+=":")):o+=mn(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(o+=mn(e.c.second),(e.c.millisecond!==0||!r)&&(o+=".",o+=mn(e.c.millisecond,3))),a&&(e.isOffsetFixed&&e.offset===0&&!i?o+="Z":e.o<0?(o+="-",o+=mn(Math.trunc(-e.o/60)),o+=":",o+=mn(Math.trunc(-e.o%60))):(o+="+",o+=mn(Math.trunc(e.o/60)),o+=":",o+=mn(Math.trunc(e.o%60)))),i&&(o+="["+e.zone.ianaName+"]"),o}const xL={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},ete={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},tte={ordinal:1,hour:0,minute:0,second:0,millisecond:0},CL=["year","month","day","hour","minute","second","millisecond"],nte=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],rte=["year","ordinal","hour","minute","second","millisecond"];function HO(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new D$(e);return t}function BO(e,t){const n=Bo(t.zone,pn.defaultZone),r=It.fromObject(t),a=pn.now();let i,o;if(Ze(e.year))i=a;else{for(const u of CL)Ze(e[u])&&(e[u]=xL[u]);const s=_L(e)||SL(e);if(s)return Ae.invalid(s);const l=n.offset(a);[i,o]=Tv(e,l,n)}return new Ae({ts:i,zone:n,loc:r,o})}function VO(e,t,n){const r=Ze(n.round)?!0:n.round,a=(o,s)=>(o=ix(o,r||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(o,s)),i=o=>n.calendary?t.hasSame(e,o)?0:t.startOf(o).diff(e.startOf(o),o).get(o):t.diff(e,o).get(o);if(n.unit)return a(i(n.unit),n.unit);for(const o of n.units){const s=i(o);if(Math.abs(s)>=1)return a(s,o)}return a(e>t?-0:0,n.units[n.units.length-1])}function WO(e){let t={},n;return e.length>0&&typeof e[e.length-1]=="object"?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}class Ae{constructor(t){const n=t.zone||pn.defaultZone;let r=t.invalid||(Number.isNaN(t.ts)?new ja("invalid input"):null)||(n.isValid?null:Um(n));this.ts=Ze(t.ts)?pn.now():t.ts;let a=null,i=null;if(!r)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(n))[a,i]=[t.old.c,t.old.o];else{const s=n.offset(this.ts);a=zm(this.ts,s),r=Number.isNaN(a.year)?new ja("invalid input"):null,a=r?null:a,i=r?null:s}this._zone=n,this.loc=t.loc||It.create(),this.invalid=r,this.weekData=null,this.c=a,this.o=i,this.isLuxonDateTime=!0}static now(){return new Ae({})}static local(){const[t,n]=WO(arguments),[r,a,i,o,s,l,u]=n;return BO({year:r,month:a,day:i,hour:o,minute:s,second:l,millisecond:u},t)}static utc(){const[t,n]=WO(arguments),[r,a,i,o,s,l,u]=n;return t.zone=sr.utcInstance,BO({year:r,month:a,day:i,hour:o,minute:s,second:l,millisecond:u},t)}static fromJSDate(t,n={}){const r=NJ(t)?t.valueOf():NaN;if(Number.isNaN(r))return Ae.invalid("invalid input");const a=Bo(n.zone,pn.defaultZone);return a.isValid?new Ae({ts:r,zone:a,loc:It.fromObject(n)}):Ae.invalid(Um(a))}static fromMillis(t,n={}){if(Tl(t))return t<-jO||t>jO?Ae.invalid("Timestamp out of range"):new Ae({ts:t,zone:Bo(n.zone,pn.defaultZone),loc:It.fromObject(n)});throw new ra(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,n={}){if(Tl(t))return new Ae({ts:t*1e3,zone:Bo(n.zone,pn.defaultZone),loc:It.fromObject(n)});throw new ra("fromSeconds requires a numerical input")}static fromObject(t,n={}){t=t||{};const r=Bo(n.zone,pn.defaultZone);if(!r.isValid)return Ae.invalid(Um(r));const a=pn.now(),i=Ze(n.specificOffset)?r.offset(a):n.specificOffset,o=Dg(t,HO),s=!Ze(o.ordinal),l=!Ze(o.year),u=!Ze(o.month)||!Ze(o.day),c=l||u,d=o.weekYear||o.weekNumber,f=It.fromObject(n);if((c||s)&&d)throw new Qf("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&s)throw new Qf("Can't mix ordinal dates with month/day");const h=d||o.weekday&&!c;let p,v,y=zm(a,i);h?(p=nte,v=ete,y=c_(y)):s?(p=rte,v=tte,y=Gw(y)):(p=CL,v=xL);let g=!1;for(const P of p){const A=o[P];Ze(A)?g?o[P]=v[P]:o[P]=y[P]:g=!0}const w=h?Zee(o):s?Jee(o):_L(o),_=w||SL(o);if(_)return Ae.invalid(_);const b=h?LO(o):s?FO(o):o,[C,E]=Tv(b,i,r),T=new Ae({ts:C,zone:r,o:E,loc:f});return o.weekday&&c&&t.weekday!==T.weekday?Ae.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${T.toISO()}`):T}static fromISO(t,n={}){const[r,a]=bee(t);return If(r,a,n,"ISO 8601",t)}static fromRFC2822(t,n={}){const[r,a]=_ee(t);return If(r,a,n,"RFC 2822",t)}static fromHTTP(t,n={}){const[r,a]=See(t);return If(r,a,n,"HTTP",n)}static fromFormat(t,n,r={}){if(Ze(t)||Ze(n))throw new ra("fromFormat requires an input string and a format");const{locale:a=null,numberingSystem:i=null}=r,o=It.fromOpts({locale:a,numberingSystem:i,defaultToEN:!0}),[s,l,u,c]=Xee(o,t,n);return c?Ae.invalid(c):If(s,l,r,`format ${n}`,t,u)}static fromString(t,n,r={}){return Ae.fromFormat(t,n,r)}static fromSQL(t,n={}){const[r,a]=kee(t);return If(r,a,n,"SQL",t)}static invalid(t,n=null){if(!t)throw new ra("need to specify a reason the DateTime is invalid");const r=t instanceof ja?t:new ja(t,n);if(pn.throwOnInvalid)throw new lJ(r);return new Ae({invalid:r})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,n={}){const r=mL(t,It.fromObject(n));return r?r.map(a=>a?a.val:null).join(""):null}static expandFormat(t,n={}){return hL(qn.parseFormat(t),It.fromObject(n)).map(a=>a.val).join("")}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?qw(this).weekYear:NaN}get weekNumber(){return this.isValid?qw(this).weekNumber:NaN}get weekday(){return this.isValid?qw(this).weekday:NaN}get ordinal(){return this.isValid?Gw(this.c).ordinal:NaN}get monthShort(){return this.isValid?Fm.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Fm.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Fm.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Fm.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const t=864e5,n=6e4,r=E0(this.c),a=this.zone.offset(r-t),i=this.zone.offset(r+t),o=this.zone.offset(r-a*n),s=this.zone.offset(r-i*n);if(o===s)return[this];const l=r-o*n,u=r-s*n,c=zm(l,o),d=zm(u,s);return c.hour===d.hour&&c.minute===d.minute&&c.second===d.second&&c.millisecond===d.millisecond?[nl(this,{ts:l}),nl(this,{ts:u})]:[this]}get isInLeapYear(){return Kp(this.year)}get daysInMonth(){return Cg(this.year,this.month)}get daysInYear(){return this.isValid?_h(this.year):NaN}get weeksInWeekYear(){return this.isValid?Tg(this.weekYear):NaN}resolvedLocaleOptions(t={}){const{locale:n,numberingSystem:r,calendar:a}=qn.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:n,numberingSystem:r,outputCalendar:a}}toUTC(t=0,n={}){return this.setZone(sr.instance(t),n)}toLocal(){return this.setZone(pn.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(t=Bo(t,pn.defaultZone),t.equals(this.zone))return this;if(t.isValid){let a=this.ts;if(n||r){const i=t.offset(this.ts),o=this.toObject();[a]=Tv(o,i,t)}return nl(this,{ts:a,zone:t})}else return Ae.invalid(Um(t))}reconfigure({locale:t,numberingSystem:n,outputCalendar:r}={}){const a=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:r});return nl(this,{loc:a})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const n=Dg(t,HO),r=!Ze(n.weekYear)||!Ze(n.weekNumber)||!Ze(n.weekday),a=!Ze(n.ordinal),i=!Ze(n.year),o=!Ze(n.month)||!Ze(n.day),s=i||o,l=n.weekYear||n.weekNumber;if((s||a)&&l)throw new Qf("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&a)throw new Qf("Can't mix ordinal dates with month/day");let u;r?u=LO({...c_(this.c),...n}):Ze(n.ordinal)?(u={...this.toObject(),...n},Ze(n.day)&&(u.day=Math.min(Cg(u.year,u.month),u.day))):u=FO({...Gw(this.c),...n});const[c,d]=Tv(u,this.o,this.zone);return nl(this,{ts:c,o:d})}plus(t){if(!this.isValid)return this;const n=et.fromDurationLike(t);return nl(this,UO(this,n))}minus(t){if(!this.isValid)return this;const n=et.fromDurationLike(t).negate();return nl(this,UO(this,n))}startOf(t){if(!this.isValid)return this;const n={},r=et.normalizeUnit(t);switch(r){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0;break}if(r==="weeks"&&(n.weekday=1),r==="quarters"){const a=Math.ceil(this.month/3);n.month=(a-1)*3+1}return this.set(n)}endOf(t){return this.isValid?this.plus({[t]:1}).startOf(t).minus(1):this}toFormat(t,n={}){return this.isValid?qn.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,t):Kw}toLocaleString(t=xg,n={}){return this.isValid?qn.create(this.loc.clone(n),t).formatDateTime(this):Kw}toLocaleParts(t={}){return this.isValid?qn.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:n=!1,suppressMilliseconds:r=!1,includeOffset:a=!0,extendedZone:i=!1}={}){if(!this.isValid)return null;const o=t==="extended";let s=Qw(this,o);return s+="T",s+=zO(this,o,n,r,a,i),s}toISODate({format:t="extended"}={}){return this.isValid?Qw(this,t==="extended"):null}toISOWeekDate(){return Hm(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:n=!1,includeOffset:r=!0,includePrefix:a=!1,extendedZone:i=!1,format:o="extended"}={}){return this.isValid?(a?"T":"")+zO(this,o==="extended",n,t,r,i):null}toRFC2822(){return Hm(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Hm(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Qw(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:n=!1,includeOffsetSpace:r=!0}={}){let a="HH:mm:ss.SSS";return(n||t)&&(r&&(a+=" "),n?a+="z":t&&(a+="ZZ")),Hm(this,a,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():Kw}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(t={}){if(!this.isValid)return{};const n={...this.c};return t.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,n="milliseconds",r={}){if(!this.isValid||!t.isValid)return et.invalid("created by diffing an invalid DateTime");const a={locale:this.locale,numberingSystem:this.numberingSystem,...r},i=AJ(n).map(et.normalizeUnit),o=t.valueOf()>this.valueOf(),s=o?this:t,l=o?t:this,u=$ee(s,l,i,a);return o?u.negate():u}diffNow(t="milliseconds",n={}){return this.diff(Ae.now(),t,n)}until(t){return this.isValid?tn.fromDateTimes(this,t):this}hasSame(t,n){if(!this.isValid)return!1;const r=t.valueOf(),a=this.setZone(t.zone,{keepLocalTime:!0});return a.startOf(n)<=r&&r<=a.endOf(n)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const n=t.base||Ae.fromObject({},{zone:this.zone}),r=t.padding?thisn.valueOf(),Math.min)}static max(...t){if(!t.every(Ae.isDateTime))throw new ra("max requires all arguments be DateTimes");return OO(t,n=>n.valueOf(),Math.max)}static fromFormatExplain(t,n,r={}){const{locale:a=null,numberingSystem:i=null}=r,o=It.fromOpts({locale:a,numberingSystem:i,defaultToEN:!0});return pL(o,t,n)}static fromStringExplain(t,n,r={}){return Ae.fromFormatExplain(t,n,r)}static get DATE_SHORT(){return xg}static get DATE_MED(){return O$}static get DATE_MED_WITH_WEEKDAY(){return dJ}static get DATE_FULL(){return k$}static get DATE_HUGE(){return P$}static get TIME_SIMPLE(){return N$}static get TIME_WITH_SECONDS(){return A$}static get TIME_WITH_SHORT_OFFSET(){return M$}static get TIME_WITH_LONG_OFFSET(){return R$}static get TIME_24_SIMPLE(){return I$}static get TIME_24_WITH_SECONDS(){return $$}static get TIME_24_WITH_SHORT_OFFSET(){return L$}static get TIME_24_WITH_LONG_OFFSET(){return F$}static get DATETIME_SHORT(){return j$}static get DATETIME_SHORT_WITH_SECONDS(){return U$}static get DATETIME_MED(){return z$}static get DATETIME_MED_WITH_SECONDS(){return H$}static get DATETIME_MED_WITH_WEEKDAY(){return fJ}static get DATETIME_FULL(){return B$}static get DATETIME_FULL_WITH_SECONDS(){return V$}static get DATETIME_HUGE(){return W$}static get DATETIME_HUGE_WITH_SECONDS(){return Y$}}function $f(e){if(Ae.isDateTime(e))return e;if(e&&e.valueOf&&Tl(e.valueOf()))return Ae.fromJSDate(e);if(e&&typeof e=="object")return Ae.fromObject(e);throw new ra(`Unknown datetime argument: ${e}, of type ${typeof e}`)}function ate({activity:e}){var t,n,r;return S.jsxs(ut.Group,{children:[S.jsxs(ut,{children:[e.isCancelled&&S.jsx(Xn,{attached:"top",color:"red",content:"Cancelled",style:{textAlign:"center"}}),S.jsx(vn.Group,{children:S.jsxs(vn,{children:[S.jsx(vn.Image,{style:{marginBottom:3},size:"tiny",circular:!0,src:((t=e.host)==null?void 0:t.image)||"/assets/user.png"}),S.jsxs(vn.Content,{children:[S.jsx(vn.Header,{as:ur,to:`/activities/${e.id}`,children:e.title}),S.jsxs(vn.Description,{children:["Hosted By"," ",S.jsxs(ur,{to:`/profiles/${e.hostUsername}`,children:[" ",(n=e.host)==null?void 0:n.displayName]})]}),e.isHost&&S.jsx(vn.Description,{children:S.jsx(Xn,{basic:!0,color:"orange",children:"You are hosting this activty"})}),e.isGoing&&!e.isHost&&S.jsx(vn.Description,{children:S.jsx(Xn,{basic:!0,color:"green",children:"You are going to this activty"})})]})]})})]}),S.jsx(ut,{children:S.jsxs("span",{children:[S.jsx(rn,{name:"clock"})," ",Ae.fromISO((r=e.date)==null?void 0:r.toISOString()).toFormat("L'/'dd'/'yyyy h':'mma "),S.jsx(rn,{name:"marker"}),e.venue]})}),S.jsx(ut,{children:S.jsx(sJ,{attendees:e.attendees})}),S.jsxs(ut,{clearing:!0,children:[S.jsx("span",{children:e.description}),S.jsx(Ye,{as:ur,to:`/activities/${e.id}`,color:"teal",content:"View",floated:"right"})]})]})}const ite=St(function(){const{activityStore:t}=Jt(),{groupedActivities:n}=t;return S.jsx(S.Fragment,{children:n.map(([r,a])=>S.jsxs(x.Fragment,{children:[S.jsx(Ft,{sub:!0,color:"teal",children:r}),a.map(i=>S.jsx(ate,{activity:i},i.id))]},r))})});function TL(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t-1}function Pte(e,t){var n=this.__data__,r=D0(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}ff.prototype.clear=Tte;ff.prototype.delete=Dte;ff.prototype.get=Ote;ff.prototype.has=kte;ff.prototype.set=Pte;function bu(e){var t=-1,n=e?e.length:0;for(this.clear();++t0,z=Y!=="century",ae=Sne(Y,t),de=z?Ene(Y,t):void 0,Ee=GL(Y,t),De=z?xne(Y,t):void 0,ee=function(){if(ae.getFullYear()<0)return!0;var Ge=Cne(Y,t);return u&&u>=Ge}(),me=z&&function(){if(de.getFullYear()<0)return!0;var Ge=Tne(Y,t);return u&&u>=Ge}(),_e=l&&le?t:n&&n=e}function Mne(e,t){return e[0]<=t[0]&&e[1]>=t[1]}function ZL(e,t){return op(e[0],t)||op(e[1],t)}function XO(e,t,n){var r=ZL(t,e),a=[];if(r){a.push(n);var i=op(e[0],t),o=op(e[1],t);i&&a.push("".concat(n,"Start")),o&&a.push("".concat(n,"End")),i&&o&&a.push("".concat(n,"BothEnds"))}return a}function Rne(e){return Array.isArray(e)?e[0]!==null&&e[1]!==null:e!==null}function Ine(e){if(!e)throw new Error("args is required");var t=e.value,n=e.date,r=e.hover,a="react-calendar__tile",i=[a];if(!n)return i;var o=new Date,s=function(){if(Array.isArray(n))return n;var h=e.dateType;if(!h)throw new Error("dateType is required when date is not an array of two dates");return qO(h,n)}();if(op(o,s)&&i.push("".concat(a,"--now")),!t||!Rne(t))return i;var l=function(){if(Array.isArray(t))return t;var h=e.valueType;if(!h)throw new Error("valueType is required when value is not an array of two dates");return qO(h,t)}();Mne(l,s)?i.push("".concat(a,"--active")):ZL(l,s)&&i.push("".concat(a,"--hasActive"));var u=XO(l,s,"".concat(a,"--range"));i.push.apply(i,u);var c=Array.isArray(t)?t:[t];if(r&&c.length===1){var d=r>l[0]?[l[0],r]:[r,l[0]],f=XO(d,s,"".concat(a,"--hover"));i.push.apply(i,f)}return i}var $ne=(Pu={},Pu[ec.ARABIC]=$t.ISLAMIC,Pu[ec.HEBREW]=$t.HEBREW,Pu[ec.ISO_8601]=$t.ISO_8601,Pu[ec.US]=$t.GREGORY,Pu);function Lne(e){return e!==void 0&&e in ec}var ZO=!1;function M0(e){if(Lne(e)){var t=$ne[e];return a0(ZO,'Specifying calendarType="'.concat(e,'" is deprecated. Use calendarType="').concat(t,'" instead.')),ZO=!0,t}return e}function R0(e){for(var t=e.className,n=e.count,r=n===void 0?3:n,a=e.dateTransform,i=e.dateType,o=e.end,s=e.hover,l=e.offset,u=e.renderTile,c=e.start,d=e.step,f=d===void 0?1:d,h=e.value,p=e.valueType,v=[],y=c;y<=o;y+=f){var g=a(y);v.push(u({classes:Ine({date:g,dateType:i,hover:s,value:h,valueType:p}),date:g}))}return m.createElement(wx,{className:t,count:r,offset:l,wrap:!0},v)}function I0(e){var t=e.activeStartDate,n=e.children,r=e.classes,a=e.date,i=e.formatAbbr,o=e.locale,s=e.maxDate,l=e.maxDateTransform,u=e.minDate,c=e.minDateTransform,d=e.onClick,f=e.onMouseOver,h=e.style,p=e.tileClassName,v=e.tileContent,y=e.tileDisabled,g=e.view,w=x.useMemo(function(){var b={activeStartDate:t,date:a,view:g};return typeof p=="function"?p(b):p},[t,a,p,g]),_=x.useMemo(function(){var b={activeStartDate:t,date:a,view:g};return typeof v=="function"?v(b):v},[t,a,v,g]);return m.createElement("button",{className:T0(r,w),disabled:u&&c(u)>a||s&&l(s)s?new Error("Invalid prop `".concat(n,"` of type `").concat(typeof o,"` supplied to `").concat(r,"`, minDate cannot be larger than maxDate.")):null},_x=function(t,n,r){var a=t,i=n,o=a[i];if(!o)return null;if(!(o instanceof Date))return new Error("Invalid prop `".concat(n,"` of type `").concat(typeof o,"` supplied to `").concat(r,"`, expected instance of `Date`."));var s=t.minDate;return s&&o0,ai=x.useCallback(function(Re){var Et=function(){switch(Pt){case"start":return xx;case"end":return lF;case"range":return yre;default:throw new Error("Invalid returnValue.")}}();return Et({maxDate:E,maxDetail:P,minDate:M,value:Re})},[E,P,M,Pt]),zi=x.useCallback(function(Re,Et){mr(Re);var Ue={action:Et,activeStartDate:Re,value:we,view:je};ae&&!Wm(xe,Re)&&ae(Ue)},[xe,ae,we,je]),Oo=x.useCallback(function(Re,Et){var Ue=function(){switch(je){case"century":return De;case"decade":return _e;case"year":return ee;case"month":return Ee;default:throw new Error("Invalid view: ".concat(je,"."))}}();Ue&&Ue(Re,Et)},[Ee,De,ee,_e,je]),Ar=x.useCallback(function(Re,Et){if(At){Oo(Re,Et);var Ue=Le[Le.indexOf(je)+1];if(!Ue)throw new Error("Attempted to drill down from the lowest view.");mr(Re),Me(Ue);var Fn={action:"drillDown",activeStartDate:Re,value:we,view:Ue};ae&&!Wm(xe,Re)&&ae(Fn),le&&je!==Ue&&le(Fn),Ce&&Ce(Fn)}},[xe,At,ae,Oo,Ce,le,we,je,Le]),Mr=x.useCallback(function(){if(ri){var Re=Le[Le.indexOf(je)-1];if(!Re)throw new Error("Attempted to drill up from the highest view.");var Et=Dl(Re,xe);mr(Et),Me(Re);var Ue={action:"drillUp",activeStartDate:Et,value:we,view:Re};ae&&!Wm(xe,Et)&&ae(Ue),le&&je!==Re&&le(Ue),Te&&Te(Ue)}},[xe,ri,ae,Te,le,we,je,Le]),ko=x.useCallback(function(Re,Et){var Ue=we;Oo(Re,Et);var Fn=ht&&!eb(Ue),vr;if(ht)if(Fn)vr=Dl(bt,Re);else{if(!Ue)throw new Error("previousValue is required");if(Array.isArray(Ue))throw new Error("previousValue must not be an array");vr=Dne(bt,Ue,Re)}else vr=ai(Re);var yf=!ht||Fn||w?uF({maxDate:E,maxDetail:P,minDate:M,minDetail:H,value:vr,view:je}):null;Et.persist(),mr(yf),ve(vr);var wj={action:"onChange",activeStartDate:yf,value:vr,view:je};if(ae&&!Wm(xe,yf)&&ae(wj),de)if(ht){var bj=eb(vr);if(!bj)de(vr||null,Et);else if(a){if(Array.isArray(vr))throw new Error("value must not be an array");de([vr||null,null],Et)}}else de(vr||null,Et)},[xe,a,ai,w,E,P,M,H,ae,de,Oo,ht,we,bt,je]);function gf(Re){R(Re)}function Zs(){R(null)}x.useImperativeHandle(n,function(){return{activeStartDate:xe,drillDown:Ar,drillUp:Mr,onChange:ko,setActiveStartDate:zi,value:we,view:je}},[xe,Ar,Mr,ko,zi,we,je]);function xu(Re){var Et=Re?GL(je,xe):Dl(je,xe),Ue=At?Ar:ko,Fn={activeStartDate:Et,hover:pt,locale:b,maxDate:E,minDate:M,onClick:Ue,onMouseOver:ht?gf:void 0,tileClassName:F,tileContent:K,tileDisabled:ye,value:we,valueType:bt};switch(je){case"century":return m.createElement(Kne,nc({formatYear:y},Fn));case"decade":return m.createElement(Jne,nc({formatYear:y},Fn));case"year":return m.createElement(are,nc({formatMonth:f,formatMonthYear:h},Fn));case"month":return m.createElement(hre,nc({calendarType:i,formatDay:c,formatLongDate:d,formatShortWeekday:p,formatWeekday:v,onClickWeekNumber:me,onMouseLeave:ht?Zs:void 0,showFixedNumberOfWeeks:typeof en<"u"?en:jt,showNeighboringMonth:$,showWeekNumbers:he},Fn));default:throw new Error("Invalid view: ".concat(je,"."))}}function ft(){return Nt?m.createElement(Pne,{activeStartDate:xe,drillUp:Mr,formatMonthYear:h,formatYear:y,locale:b,maxDate:E,minDate:M,navigationAriaLabel:q,navigationAriaLive:Q,navigationLabel:X,next2AriaLabel:Y,next2Label:oe,nextAriaLabel:U,nextLabel:z,prev2AriaLabel:ke,prev2Label:Be,prevAriaLabel:dt,prevLabel:sn,setActiveStartDate:zi,showDoubleView:jt,view:je,views:Le}):null}var Rr=Array.isArray(we)?we:[we];return m.createElement("div",{className:T0(Vm,ht&&Rr.length===1&&"".concat(Vm,"--selectRange"),jt&&"".concat(Vm,"--doubleView"),o),ref:_},ft(),m.createElement("div",{className:"".concat(Vm,"__viewContainer"),onBlur:ht?Zs:void 0,onMouseLeave:ht?Zs:void 0},xu(),jt?xu(!0):null))}),uk=I.instanceOf(Date),ck=I.oneOfType([I.string,I.instanceOf(Date)]),dk=I.oneOfType([ck,Gne(ck)]);cF.propTypes={activeStartDate:uk,allowPartialRange:I.bool,calendarType:JL,className:Og,defaultActiveStartDate:uk,defaultValue:dk,defaultView:kg,formatDay:I.func,formatLongDate:I.func,formatMonth:I.func,formatMonthYear:I.func,formatShortWeekday:I.func,formatWeekday:I.func,formatYear:I.func,goToRangeStartOnSelect:I.bool,inputRef:Vne,locale:I.string,maxDate:_x,maxDetail:I.oneOf(yc),minDate:bx,minDetail:I.oneOf(yc),navigationAriaLabel:I.string,navigationAriaLive:I.oneOf(["off","polite","assertive"]),navigationLabel:I.func,next2AriaLabel:I.string,next2Label:I.node,nextAriaLabel:I.string,nextLabel:I.node,onActiveStartDateChange:I.func,onChange:I.func,onClickDay:I.func,onClickDecade:I.func,onClickMonth:I.func,onClickWeekNumber:I.func,onClickYear:I.func,onDrillDown:I.func,onDrillUp:I.func,onViewChange:I.func,prev2AriaLabel:I.string,prev2Label:I.node,prevAriaLabel:I.string,prevLabel:I.node,returnValue:I.oneOf(["start","end","range"]),selectRange:I.bool,showDoubleView:I.bool,showFixedNumberOfWeeks:I.bool,showNavigation:I.bool,showNeighboringMonth:I.bool,showWeekNumbers:I.bool,tileClassName:I.oneOfType([I.func,Og]),tileContent:I.oneOfType([I.func,I.node]),tileDisabled:I.func,value:dk,view:kg};const bre=cF,_re=St(function(){const{activityStore:t}=Jt(),{predicate:n,setPredicate:r}=t;return S.jsxs(S.Fragment,{children:[S.jsxs(Ra,{vertical:!0,size:"large",style:{width:"100%",marginTop:25},children:[S.jsx(Ft,{icon:"filter",attached:!0,color:"teal",content:"Filters"}),S.jsx(Ra.Item,{content:"All Activities",active:n.has("all"),onClick:()=>r("all","true")}),S.jsx(Ra.Item,{content:"I'm going",active:n.has("isGoing"),onClick:()=>r("isGoing","true")}),S.jsx(Ra.Item,{content:"I'm hosting",active:n.has("isHost"),onClick:()=>r("isHost","true")})]}),S.jsx(Ft,{}),S.jsx(bre,{onChange:a=>r("startDate",a),value:n.get("startDate")||new Date})]})});class Sre{constructor(t,n){te(this,"data");te(this,"pagination");this.data=t,this.pagination=n}}class S_{constructor(t=1,n=2){te(this,"pageNumber");te(this,"pageSize");this.pageNumber=t,this.pageSize=n}}class E_ extends x.Component{constructor(t){super(t),this.scrollListener=this.scrollListener.bind(this),this.eventListenerOptions=this.eventListenerOptions.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this)}componentDidMount(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}componentDidUpdate(){if(this.props.isReverse&&this.loadMore){const t=this.getParentElement(this.scrollComponent);t.scrollTop=t.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}componentWillUnmount(){this.detachScrollListener(),this.detachMousewheelListener()}isPassiveSupported(){let t=!1;const n={get passive(){t=!0}};try{document.addEventListener("test",null,n),document.removeEventListener("test",null,n)}catch{}return t}eventListenerOptions(){let t=this.props.useCapture;return this.isPassiveSupported()?t={useCapture:this.props.useCapture,passive:!0}:t={passive:!1},t}setDefaultLoader(t){this.defaultLoader=t}detachMousewheelListener(){let t=window;this.props.useWindow===!1&&(t=this.scrollComponent.parentNode),t.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}detachScrollListener(){let t=window;this.props.useWindow===!1&&(t=this.getParentElement(this.scrollComponent)),t.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),t.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}getParentElement(t){const n=this.props.getScrollParent&&this.props.getScrollParent();return n??(t&&t.parentNode)}filterProps(t){return t}attachScrollListener(){const t=this.getParentElement(this.scrollComponent);if(!this.props.hasMore||!t)return;let n=window;this.props.useWindow===!1&&(n=t),n.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),n.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),n.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}mousewheelListener(t){t.deltaY===1&&!this.isPassiveSupported()&&t.preventDefault()}scrollListener(){const t=this.scrollComponent,n=window,r=this.getParentElement(t);let a;if(this.props.useWindow){const i=document.documentElement||document.body.parentNode||document.body,o=n.pageYOffset!==void 0?n.pageYOffset:i.scrollTop;this.props.isReverse?a=o:a=this.calculateOffset(t,o)}else this.props.isReverse?a=r.scrollTop:a=t.scrollHeight-r.scrollTop-r.clientHeight;a{this.scrollComponent=g,c&&c(g)};const y=[n];return a&&(s?o?y.unshift(s):y.push(s):this.defaultLoader&&(o?y.unshift(this.defaultLoader):y.push(this.defaultLoader))),m.createElement(r,v,y)}}te(E_,"propTypes",{children:I.node.isRequired,element:I.node,hasMore:I.bool,initialLoad:I.bool,isReverse:I.bool,loader:I.node,loadMore:I.func.isRequired,pageStart:I.number,ref:I.func,getScrollParent:I.func,threshold:I.number,useCapture:I.bool,useWindow:I.bool}),te(E_,"defaultProps",{element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null});function fk(){return S.jsx(x.Fragment,{children:S.jsx(oi,{fluid:!0,style:{marginTop:25},children:S.jsxs(ut.Group,{children:[S.jsx(ut,{style:{minHeight:110},children:S.jsxs(oi,{children:[S.jsxs(oi.Header,{image:!0,children:[S.jsx(oi.Line,{}),S.jsx(oi.Line,{})]}),S.jsx(oi.Paragraph,{children:S.jsx(oi.Line,{})})]})}),S.jsx(ut,{children:S.jsxs(oi,{children:[S.jsx(oi.Line,{}),S.jsx(oi.Line,{})]})}),S.jsx(ut,{secondary:!0,style:{minHeight:70}}),S.jsx(ut,{clearing:!0,children:S.jsx(Ye,{disabled:!0,color:"blue",floated:"right",content:"View"})})]})})})}const Ere=St(function(){const{activityStore:t}=Jt(),{loadActivities:n,activityRegistry:r,setPagingParams:a,pagination:i}=t,[o,s]=x.useState(!1);function l(){a(new S_(i.currentPage+1)),s(!0),n().then(()=>s(!1))}return x.useEffect(()=>{r.size<=1&&n()},[n,r]),S.jsxs(He,{children:[S.jsx(He.Column,{width:"10",children:t.loadingInitial&&!o&&r.size===0?S.jsxs(S.Fragment,{children:[S.jsx(fk,{}),S.jsx(fk,{})]}):S.jsx(E_,{pageStart:0,loadMore:l,hasMore:!o&&!!i&&i.currentPager.setValue(i.value),onBlur:()=>r.setTouched(!0),placeholder:e.placeholder}),n.touched&&n.error?S.jsx(Xn,{basic:!0,color:"red",children:n.error}):null]})}const Pre=[{text:"Culture",value:"culture"},{text:"Drinks",value:"drinks"},{text:"Film",value:"film"},{text:"Food",value:"food"},{text:"Music",value:"music"},{text:"Travel",value:"travel"}];var fF={exports:{}};/*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],a=0;a1?"s":"")+" required, but only "+t.length+" present")}function L0(e){return ce(1,arguments),e instanceof Date||Sa(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function fe(e){ce(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||Sa(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function lp(e){if(ce(1,arguments),!L0(e)&&typeof e!="number")return!1;var t=fe(e);return!isNaN(Number(t))}function Ve(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Cx(e,t){ce(2,arguments);var n=fe(e).getTime(),r=Ve(t);return new Date(n+r)}function hF(e,t){ce(2,arguments);var n=Ve(t);return Cx(e,-n)}var Are=864e5;function Mre(e){ce(1,arguments);var t=fe(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=t.getTime(),a=n-r;return Math.floor(a/Are)+1}function zd(e){ce(1,arguments);var t=1,n=fe(e),r=n.getUTCDay(),a=(r=a.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}function Rre(e){ce(1,arguments);var t=pF(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=zd(n);return r}var Ire=6048e5;function mF(e){ce(1,arguments);var t=fe(e),n=zd(t).getTime()-Rre(t).getTime();return Math.round(n/Ire)+1}var $re={};function Xs(){return $re}function iu(e,t){var n,r,a,i,o,s,l,u;ce(1,arguments);var c=Xs(),d=Ve((n=(r=(a=(i=t==null?void 0:t.weekStartsOn)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&a!==void 0?a:c.weekStartsOn)!==null&&r!==void 0?r:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&n!==void 0?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=fe(e),h=f.getUTCDay(),p=(h=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(d+1,0,h),p.setUTCHours(0,0,0,0);var v=iu(p,t),y=new Date(0);y.setUTCFullYear(d,0,h),y.setUTCHours(0,0,0,0);var g=iu(y,t);return c.getTime()>=v.getTime()?d+1:c.getTime()>=g.getTime()?d:d-1}function Lre(e,t){var n,r,a,i,o,s,l,u;ce(1,arguments);var c=Xs(),d=Ve((n=(r=(a=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:c.firstWeekContainsDate)!==null&&r!==void 0?r:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&n!==void 0?n:1),f=Tx(e,t),h=new Date(0);h.setUTCFullYear(f,0,d),h.setUTCHours(0,0,0,0);var p=iu(h,t);return p}var Fre=6048e5;function vF(e,t){ce(1,arguments);var n=fe(e),r=iu(n,t).getTime()-Lre(n,t).getTime();return Math.round(r/Fre)+1}function mt(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length0?r:1-r;return mt(n==="yy"?a%100:a,n.length)},M:function(t,n){var r=t.getUTCMonth();return n==="M"?String(r+1):mt(r+1,2)},d:function(t,n){return mt(t.getUTCDate(),n.length)},a:function(t,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function(t,n){return mt(t.getUTCHours()%12||12,n.length)},H:function(t,n){return mt(t.getUTCHours(),n.length)},m:function(t,n){return mt(t.getUTCMinutes(),n.length)},s:function(t,n){return mt(t.getUTCSeconds(),n.length)},S:function(t,n){var r=n.length,a=t.getUTCMilliseconds(),i=Math.floor(a*Math.pow(10,r-3));return mt(i,n.length)}};const Ro=jre;var Nu={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ure={G:function(t,n,r){var a=t.getUTCFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return r.era(a,{width:"abbreviated"});case"GGGGG":return r.era(a,{width:"narrow"});case"GGGG":default:return r.era(a,{width:"wide"})}},y:function(t,n,r){if(n==="yo"){var a=t.getUTCFullYear(),i=a>0?a:1-a;return r.ordinalNumber(i,{unit:"year"})}return Ro.y(t,n)},Y:function(t,n,r,a){var i=Tx(t,a),o=i>0?i:1-i;if(n==="YY"){var s=o%100;return mt(s,2)}return n==="Yo"?r.ordinalNumber(o,{unit:"year"}):mt(o,n.length)},R:function(t,n){var r=pF(t);return mt(r,n.length)},u:function(t,n){var r=t.getUTCFullYear();return mt(r,n.length)},Q:function(t,n,r){var a=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"Q":return String(a);case"QQ":return mt(a,2);case"Qo":return r.ordinalNumber(a,{unit:"quarter"});case"QQQ":return r.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(a,{width:"wide",context:"formatting"})}},q:function(t,n,r){var a=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"q":return String(a);case"qq":return mt(a,2);case"qo":return r.ordinalNumber(a,{unit:"quarter"});case"qqq":return r.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(a,{width:"wide",context:"standalone"})}},M:function(t,n,r){var a=t.getUTCMonth();switch(n){case"M":case"MM":return Ro.M(t,n);case"Mo":return r.ordinalNumber(a+1,{unit:"month"});case"MMM":return r.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(a,{width:"wide",context:"formatting"})}},L:function(t,n,r){var a=t.getUTCMonth();switch(n){case"L":return String(a+1);case"LL":return mt(a+1,2);case"Lo":return r.ordinalNumber(a+1,{unit:"month"});case"LLL":return r.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(a,{width:"wide",context:"standalone"})}},w:function(t,n,r,a){var i=vF(t,a);return n==="wo"?r.ordinalNumber(i,{unit:"week"}):mt(i,n.length)},I:function(t,n,r){var a=mF(t);return n==="Io"?r.ordinalNumber(a,{unit:"week"}):mt(a,n.length)},d:function(t,n,r){return n==="do"?r.ordinalNumber(t.getUTCDate(),{unit:"date"}):Ro.d(t,n)},D:function(t,n,r){var a=Mre(t);return n==="Do"?r.ordinalNumber(a,{unit:"dayOfYear"}):mt(a,n.length)},E:function(t,n,r){var a=t.getUTCDay();switch(n){case"E":case"EE":case"EEE":return r.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(a,{width:"short",context:"formatting"});case"EEEE":default:return r.day(a,{width:"wide",context:"formatting"})}},e:function(t,n,r,a){var i=t.getUTCDay(),o=(i-a.weekStartsOn+8)%7||7;switch(n){case"e":return String(o);case"ee":return mt(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"});case"eeee":default:return r.day(i,{width:"wide",context:"formatting"})}},c:function(t,n,r,a){var i=t.getUTCDay(),o=(i-a.weekStartsOn+8)%7||7;switch(n){case"c":return String(o);case"cc":return mt(o,n.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"});case"cccc":default:return r.day(i,{width:"wide",context:"standalone"})}},i:function(t,n,r){var a=t.getUTCDay(),i=a===0?7:a;switch(n){case"i":return String(i);case"ii":return mt(i,n.length);case"io":return r.ordinalNumber(i,{unit:"day"});case"iii":return r.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(a,{width:"short",context:"formatting"});case"iiii":default:return r.day(a,{width:"wide",context:"formatting"})}},a:function(t,n,r){var a=t.getUTCHours(),i=a/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(t,n,r){var a=t.getUTCHours(),i;switch(a===12?i=Nu.noon:a===0?i=Nu.midnight:i=a/12>=1?"pm":"am",n){case"b":case"bb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,n,r){var a=t.getUTCHours(),i;switch(a>=17?i=Nu.evening:a>=12?i=Nu.afternoon:a>=4?i=Nu.morning:i=Nu.night,n){case"B":case"BB":case"BBB":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,n,r){if(n==="ho"){var a=t.getUTCHours()%12;return a===0&&(a=12),r.ordinalNumber(a,{unit:"hour"})}return Ro.h(t,n)},H:function(t,n,r){return n==="Ho"?r.ordinalNumber(t.getUTCHours(),{unit:"hour"}):Ro.H(t,n)},K:function(t,n,r){var a=t.getUTCHours()%12;return n==="Ko"?r.ordinalNumber(a,{unit:"hour"}):mt(a,n.length)},k:function(t,n,r){var a=t.getUTCHours();return a===0&&(a=24),n==="ko"?r.ordinalNumber(a,{unit:"hour"}):mt(a,n.length)},m:function(t,n,r){return n==="mo"?r.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):Ro.m(t,n)},s:function(t,n,r){return n==="so"?r.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Ro.s(t,n)},S:function(t,n){return Ro.S(t,n)},X:function(t,n,r,a){var i=a._originalDate||t,o=i.getTimezoneOffset();if(o===0)return"Z";switch(n){case"X":return mk(o);case"XXXX":case"XX":return ul(o);case"XXXXX":case"XXX":default:return ul(o,":")}},x:function(t,n,r,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(n){case"x":return mk(o);case"xxxx":case"xx":return ul(o);case"xxxxx":case"xxx":default:return ul(o,":")}},O:function(t,n,r,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+pk(o,":");case"OOOO":default:return"GMT"+ul(o,":")}},z:function(t,n,r,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+pk(o,":");case"zzzz":default:return"GMT"+ul(o,":")}},t:function(t,n,r,a){var i=a._originalDate||t,o=Math.floor(i.getTime()/1e3);return mt(o,n.length)},T:function(t,n,r,a){var i=a._originalDate||t,o=i.getTime();return mt(o,n.length)}};function pk(e,t){var n=e>0?"-":"+",r=Math.abs(e),a=Math.floor(r/60),i=r%60;if(i===0)return n+String(a);var o=t||"";return n+String(a)+o+mt(i,2)}function mk(e,t){if(e%60===0){var n=e>0?"-":"+";return n+mt(Math.abs(e)/60,2)}return ul(e,t)}function ul(e,t){var n=t||"",r=e>0?"-":"+",a=Math.abs(e),i=mt(Math.floor(a/60),2),o=mt(a%60,2);return r+i+n+o}const zre=Ure;var vk=function(t,n){switch(t){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},gF=function(t,n){switch(t){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},Hre=function(t,n){var r=t.match(/(P+)(p+)?/)||[],a=r[1],i=r[2];if(!i)return vk(t,n);var o;switch(a){case"P":o=n.dateTime({width:"short"});break;case"PP":o=n.dateTime({width:"medium"});break;case"PPP":o=n.dateTime({width:"long"});break;case"PPPP":default:o=n.dateTime({width:"full"});break}return o.replace("{{date}}",vk(a,n)).replace("{{time}}",gF(i,n))},Bre={p:gF,P:Hre};const x_=Bre;function Hd(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}var Vre=["D","DD"],Wre=["YY","YYYY"];function yF(e){return Vre.indexOf(e)!==-1}function wF(e){return Wre.indexOf(e)!==-1}function Rg(e,t,n){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Yre={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Gre=function(t,n,r){var a,i=Yre[t];return typeof i=="string"?a=i:n===1?a=i.one:a=i.other.replace("{{count}}",n.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+a:a+" ago":a};const Kre=Gre;function tb(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}var qre={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Qre={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Xre={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Zre={date:tb({formats:qre,defaultWidth:"full"}),time:tb({formats:Qre,defaultWidth:"full"}),dateTime:tb({formats:Xre,defaultWidth:"full"})};const Jre=Zre;var eae={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},tae=function(t,n,r,a){return eae[t]};const nae=tae;function Ff(e){return function(t,n){var r=n!=null&&n.context?String(n.context):"standalone",a;if(r==="formatting"&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,o=n!=null&&n.width?String(n.width):i;a=e.formattingValues[o]||e.formattingValues[i]}else{var s=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;a=e.values[l]||e.values[s]}var u=e.argumentCallback?e.argumentCallback(t):t;return a[u]}}var rae={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},aae={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},iae={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},oae={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},sae={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},lae={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},uae=function(t,n){var r=Number(t),a=r%100;if(a>20||a<10)switch(a%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},cae={ordinalNumber:uae,era:Ff({values:rae,defaultWidth:"wide"}),quarter:Ff({values:aae,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Ff({values:iae,defaultWidth:"wide"}),day:Ff({values:oae,defaultWidth:"wide"}),dayPeriod:Ff({values:sae,defaultWidth:"wide",formattingValues:lae,defaultFormattingWidth:"wide"})};const dae=cae;function jf(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.width,a=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(a);if(!i)return null;var o=i[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?hae(s,function(d){return d.test(o)}):fae(s,function(d){return d.test(o)}),u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;var c=t.slice(o.length);return{value:u,rest:c}}}function fae(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function hae(e,t){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{},r=t.match(e.matchPattern);if(!r)return null;var a=r[0],i=t.match(e.parsePattern);if(!i)return null;var o=e.valueCallback?e.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;var s=t.slice(a.length);return{value:o,rest:s}}}var mae=/^(\d+)(th|st|nd|rd)?/i,vae=/\d+/i,gae={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},yae={any:[/^b/i,/^(a|c)/i]},wae={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},bae={any:[/1/i,/2/i,/3/i,/4/i]},_ae={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Sae={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Eae={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},xae={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Cae={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Tae={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Dae={ordinalNumber:pae({matchPattern:mae,parsePattern:vae,valueCallback:function(t){return parseInt(t,10)}}),era:jf({matchPatterns:gae,defaultMatchWidth:"wide",parsePatterns:yae,defaultParseWidth:"any"}),quarter:jf({matchPatterns:wae,defaultMatchWidth:"wide",parsePatterns:bae,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:jf({matchPatterns:_ae,defaultMatchWidth:"wide",parsePatterns:Sae,defaultParseWidth:"any"}),day:jf({matchPatterns:Eae,defaultMatchWidth:"wide",parsePatterns:xae,defaultParseWidth:"any"}),dayPeriod:jf({matchPatterns:Cae,defaultMatchWidth:"any",parsePatterns:Tae,defaultParseWidth:"any"})};const Oae=Dae;var kae={code:"en-US",formatDistance:Kre,formatLong:Jre,formatRelative:nae,localize:dae,match:Oae,options:{weekStartsOn:0,firstWeekContainsDate:1}};const Dx=kae;var Pae=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Nae=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Aae=/^'([^]*?)'?$/,Mae=/''/g,Rae=/[a-zA-Z]/;function up(e,t,n){var r,a,i,o,s,l,u,c,d,f,h,p,v,y,g,w,_,b;ce(2,arguments);var C=String(t),E=Xs(),T=(r=(a=n==null?void 0:n.locale)!==null&&a!==void 0?a:E.locale)!==null&&r!==void 0?r:Dx,P=Ve((i=(o=(s=(l=n==null?void 0:n.firstWeekContainsDate)!==null&&l!==void 0?l:n==null||(u=n.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&s!==void 0?s:E.firstWeekContainsDate)!==null&&o!==void 0?o:(d=E.locale)===null||d===void 0||(f=d.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(P>=1&&P<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var A=Ve((h=(p=(v=(y=n==null?void 0:n.weekStartsOn)!==null&&y!==void 0?y:n==null||(g=n.locale)===null||g===void 0||(w=g.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&v!==void 0?v:E.weekStartsOn)!==null&&p!==void 0?p:(_=E.locale)===null||_===void 0||(b=_.options)===null||b===void 0?void 0:b.weekStartsOn)!==null&&h!==void 0?h:0);if(!(A>=0&&A<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!T.localize)throw new RangeError("locale must contain localize property");if(!T.formatLong)throw new RangeError("locale must contain formatLong property");var M=fe(e);if(!lp(M))throw new RangeError("Invalid time value");var j=Hd(M),H=hF(M,j),q={firstWeekContainsDate:P,weekStartsOn:A,locale:T,_originalDate:M},Q=C.match(Nae).map(function(X){var Y=X[0];if(Y==="p"||Y==="P"){var oe=x_[Y];return oe(X,T.formatLong)}return X}).join("").match(Pae).map(function(X){if(X==="''")return"'";var Y=X[0];if(Y==="'")return Iae(X);var oe=zre[Y];if(oe)return!(n!=null&&n.useAdditionalWeekYearTokens)&&wF(X)&&Rg(X,t,String(e)),!(n!=null&&n.useAdditionalDayOfYearTokens)&&yF(X)&&Rg(X,t,String(e)),oe(H,X,T.localize,q);if(Y.match(Rae))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Y+"`");return X}).join("");return Q}function Iae(e){var t=e.match(Aae);return t?t[1].replace(Mae,"'"):e}var $ae=6e4;function C_(e,t){ce(2,arguments);var n=Ve(t);return Cx(e,n*$ae)}var Lae=36e5;function Fae(e,t){ce(2,arguments);var n=Ve(t);return Cx(e,n*Lae)}function pf(e,t){ce(2,arguments);var n=fe(e),r=Ve(t);return isNaN(r)?new Date(NaN):(r&&n.setDate(n.getDate()+r),n)}function Ox(e,t){ce(2,arguments);var n=Ve(t),r=n*7;return pf(e,r)}function ti(e,t){ce(2,arguments);var n=fe(e),r=Ve(t);if(isNaN(r))return new Date(NaN);if(!r)return n;var a=n.getDate(),i=new Date(n.getTime());i.setMonth(n.getMonth()+r+1,0);var o=i.getDate();return a>=o?i:(n.setFullYear(i.getFullYear(),i.getMonth(),a),n)}function bF(e,t){ce(2,arguments);var n=Ve(t),r=n*3;return ti(e,r)}function Bd(e,t){ce(2,arguments);var n=Ve(t);return ti(e,n*12)}function jae(e,t){ce(2,arguments);var n=Ve(t);return pf(e,-n)}function Uae(e,t){ce(2,arguments);var n=Ve(t);return Ox(e,-n)}function Vd(e,t){ce(2,arguments);var n=Ve(t);return ti(e,-n)}function zae(e,t){ce(2,arguments);var n=Ve(t);return bF(e,-n)}function cp(e,t){ce(2,arguments);var n=Ve(t);return Bd(e,-n)}function nb(e){ce(1,arguments);var t=fe(e),n=t.getSeconds();return n}function Ua(e){ce(1,arguments);var t=fe(e),n=t.getMinutes();return n}function za(e){ce(1,arguments);var t=fe(e),n=t.getHours();return n}function Hae(e){ce(1,arguments);var t=fe(e),n=t.getDay();return n}function gk(e){ce(1,arguments);var t=fe(e),n=t.getDate();return n}function _F(e,t){var n,r,a,i,o,s,l,u;ce(1,arguments);var c=Xs(),d=Ve((n=(r=(a=(i=t==null?void 0:t.weekStartsOn)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&a!==void 0?a:c.weekStartsOn)!==null&&r!==void 0?r:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&n!==void 0?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=fe(e),h=f.getDay(),p=(h=a.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}function Vae(e){ce(1,arguments);var t=Bae(e),n=new Date(0);n.setFullYear(t,0,4),n.setHours(0,0,0,0);var r=Ig(n);return r}var Wae=6048e5;function Yae(e){ce(1,arguments);var t=fe(e),n=Ig(t).getTime()-Vae(t).getTime();return Math.round(n/Wae)+1}function Qn(e){ce(1,arguments);var t=fe(e),n=t.getMonth();return n}function rc(e){ce(1,arguments);var t=fe(e),n=Math.floor(t.getMonth()/3)+1;return n}function We(e){return ce(1,arguments),fe(e).getFullYear()}function T_(e){ce(1,arguments);var t=fe(e),n=t.getTime();return n}function Gae(e,t){ce(2,arguments);var n=fe(e),r=Ve(t);return n.setSeconds(r),n}function Dv(e,t){ce(2,arguments);var n=fe(e),r=Ve(t);return n.setMinutes(r),n}function Ov(e,t){ce(2,arguments);var n=fe(e),r=Ve(t);return n.setHours(r),n}function Kae(e){ce(1,arguments);var t=fe(e),n=t.getFullYear(),r=t.getMonth(),a=new Date(0);return a.setFullYear(n,r+1,0),a.setHours(0,0,0,0),a.getDate()}function nr(e,t){ce(2,arguments);var n=fe(e),r=Ve(t),a=n.getFullYear(),i=n.getDate(),o=new Date(0);o.setFullYear(a,r,15),o.setHours(0,0,0,0);var s=Kae(o);return n.setMonth(r,Math.min(i,s)),n}function Au(e,t){ce(2,arguments);var n=fe(e),r=Ve(t),a=Math.floor(n.getMonth()/3)+1,i=r-a;return nr(n,n.getMonth()+i*3)}function Wi(e,t){ce(2,arguments);var n=fe(e),r=Ve(t);return isNaN(n.getTime())?new Date(NaN):(n.setFullYear(r),n)}function yk(e){ce(1,arguments);var t;if(e&&typeof e.forEach=="function")t=e;else if(Sa(e)==="object"&&e!==null)t=Array.prototype.slice.call(e);else return new Date(NaN);var n;return t.forEach(function(r){var a=fe(r);(n===void 0||n>a||isNaN(a.getDate()))&&(n=a)}),n||new Date(NaN)}function wk(e){ce(1,arguments);var t;if(e&&typeof e.forEach=="function")t=e;else if(Sa(e)==="object"&&e!==null)t=Array.prototype.slice.call(e);else return new Date(NaN);var n;return t.forEach(function(r){var a=fe(r);(n===void 0||nr.getTime()}function Ko(e,t){ce(2,arguments);var n=fe(e),r=fe(t);return n.getTime()=r&&n<=a}function bk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(u){throw u},f:a}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,o=!1,s;return{s:function(){n=n.call(e)},n:function(){var u=n.next();return i=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}}}function kx(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function rt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hg(e,t)}function jg(e){return jg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},jg(e)}function rie(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function aie(e,t){if(t&&(Sa(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return be(e)}function at(e){var t=rie();return function(){var r=jg(e),a;if(t){var i=jg(this).constructor;a=Reflect.construct(r,arguments,i)}else a=r.apply(this,arguments);return aie(this,a)}}function Je(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ge(e,t,n){return t=L2(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var iie=10,CF=function(){function e(){Je(this,e),ge(this,"priority",void 0),ge(this,"subPriority",0)}return Xe(e,[{key:"validate",value:function(n,r){return!0}}]),e}(),oie=function(e){rt(n,e);var t=at(n);function n(r,a,i,o,s){var l;return Je(this,n),l=t.call(this),l.value=r,l.validateValue=a,l.setValue=i,l.priority=o,s&&(l.subPriority=s),l}return Xe(n,[{key:"validate",value:function(a,i){return this.validateValue(a,this.value,i)}},{key:"set",value:function(a,i,o){return this.setValue(a,i,this.value,o)}}]),n}(CF),sie=function(e){rt(n,e);var t=at(n);function n(){var r;Je(this,n);for(var a=arguments.length,i=new Array(a),o=0;o0,r=n?t:1-t,a;if(r<=50)a=e||100;else{var i=r+50,o=Math.floor(i/100)*100,s=e>=i%100;a=e+o-(s?100:0)}return n?a:1-a}function OF(e){return e%400===0||e%4===0&&e%100!==0}var cie=function(e){rt(n,e);var t=at(n);function n(){var r;Je(this,n);for(var a=arguments.length,i=new Array(a),o=0;o0}},{key:"set",value:function(a,i,o){var s=a.getUTCFullYear();if(o.isTwoDigitYear){var l=DF(o.year,s);return a.setUTCFullYear(l,0,1),a.setUTCHours(0,0,0,0),a}var u=!("era"in i)||i.era===1?o.year:1-o.year;return a.setUTCFullYear(u,0,1),a.setUTCHours(0,0,0,0),a}}]),n}(ct),die=function(e){rt(n,e);var t=at(n);function n(){var r;Je(this,n);for(var a=arguments.length,i=new Array(a),o=0;o0}},{key:"set",value:function(a,i,o,s){var l=Tx(a,s);if(o.isTwoDigitYear){var u=DF(o.year,l);return a.setUTCFullYear(u,0,s.firstWeekContainsDate),a.setUTCHours(0,0,0,0),iu(a,s)}var c=!("era"in i)||i.era===1?o.year:1-o.year;return a.setUTCFullYear(c,0,s.firstWeekContainsDate),a.setUTCHours(0,0,0,0),iu(a,s)}}]),n}(ct),fie=function(e){rt(n,e);var t=at(n);function n(){var r;Je(this,n);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=4}},{key:"set",value:function(a,i,o){return a.setUTCMonth((o-1)*3,1),a.setUTCHours(0,0,0,0),a}}]),n}(ct),mie=function(e){rt(n,e);var t=at(n);function n(){var r;Je(this,n);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=4}},{key:"set",value:function(a,i,o){return a.setUTCMonth((o-1)*3,1),a.setUTCHours(0,0,0,0),a}}]),n}(ct),vie=function(e){rt(n,e);var t=at(n);function n(){var r;Je(this,n);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=11}},{key:"set",value:function(a,i,o){return a.setUTCMonth(o,1),a.setUTCHours(0,0,0,0),a}}]),n}(ct),gie=function(e){rt(n,e);var t=at(n);function n(){var r;Je(this,n);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=11}},{key:"set",value:function(a,i,o){return a.setUTCMonth(o,1),a.setUTCHours(0,0,0,0),a}}]),n}(ct);function yie(e,t,n){ce(2,arguments);var r=fe(e),a=Ve(t),i=vF(r,n)-a;return r.setUTCDate(r.getUTCDate()-i*7),r}var wie=function(e){rt(n,e);var t=at(n);function n(){var r;Je(this,n);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=53}},{key:"set",value:function(a,i,o,s){return iu(yie(a,o,s),s)}}]),n}(ct);function bie(e,t){ce(2,arguments);var n=fe(e),r=Ve(t),a=mF(n)-r;return n.setUTCDate(n.getUTCDate()-a*7),n}var _ie=function(e){rt(n,e);var t=at(n);function n(){var r;Je(this,n);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=53}},{key:"set",value:function(a,i,o){return zd(bie(a,o))}}]),n}(ct),Sie=[31,28,31,30,31,30,31,31,30,31,30,31],Eie=[31,29,31,30,31,30,31,31,30,31,30,31],xie=function(e){rt(n,e);var t=at(n);function n(){var r;Je(this,n);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=Eie[l]:i>=1&&i<=Sie[l]}},{key:"set",value:function(a,i,o){return a.setUTCDate(o),a.setUTCHours(0,0,0,0),a}}]),n}(ct),Cie=function(e){rt(n,e);var t=at(n);function n(){var r;Je(this,n);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=366:i>=1&&i<=365}},{key:"set",value:function(a,i,o){return a.setUTCMonth(0,o),a.setUTCHours(0,0,0,0),a}}]),n}(ct);function Mx(e,t,n){var r,a,i,o,s,l,u,c;ce(2,arguments);var d=Xs(),f=Ve((r=(a=(i=(o=n==null?void 0:n.weekStartsOn)!==null&&o!==void 0?o:n==null||(s=n.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&i!==void 0?i:d.weekStartsOn)!==null&&a!==void 0?a:(u=d.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=fe(e),p=Ve(t),v=h.getUTCDay(),y=p%7,g=(y+7)%7,w=(g=0&&i<=6}},{key:"set",value:function(a,i,o,s){return a=Mx(a,o,s),a.setUTCHours(0,0,0,0),a}}]),n}(ct),Die=function(e){rt(n,e);var t=at(n);function n(){var r;Je(this,n);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=6}},{key:"set",value:function(a,i,o,s){return a=Mx(a,o,s),a.setUTCHours(0,0,0,0),a}}]),n}(ct),Oie=function(e){rt(n,e);var t=at(n);function n(){var r;Je(this,n);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=6}},{key:"set",value:function(a,i,o,s){return a=Mx(a,o,s),a.setUTCHours(0,0,0,0),a}}]),n}(ct);function kie(e,t){ce(2,arguments);var n=Ve(t);n%7===0&&(n=n-7);var r=1,a=fe(e),i=a.getUTCDay(),o=n%7,s=(o+7)%7,l=(s=1&&i<=7}},{key:"set",value:function(a,i,o){return a=kie(a,o),a.setUTCHours(0,0,0,0),a}}]),n}(ct),Nie=function(e){rt(n,e);var t=at(n);function n(){var r;Je(this,n);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=12}},{key:"set",value:function(a,i,o){var s=a.getUTCHours()>=12;return s&&o<12?a.setUTCHours(o+12,0,0,0):!s&&o===12?a.setUTCHours(0,0,0,0):a.setUTCHours(o,0,0,0),a}}]),n}(ct),Iie=function(e){rt(n,e);var t=at(n);function n(){var r;Je(this,n);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=23}},{key:"set",value:function(a,i,o){return a.setUTCHours(o,0,0,0),a}}]),n}(ct),$ie=function(e){rt(n,e);var t=at(n);function n(){var r;Je(this,n);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=11}},{key:"set",value:function(a,i,o){var s=a.getUTCHours()>=12;return s&&o<12?a.setUTCHours(o+12,0,0,0):a.setUTCHours(o,0,0,0),a}}]),n}(ct),Lie=function(e){rt(n,e);var t=at(n);function n(){var r;Je(this,n);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=24}},{key:"set",value:function(a,i,o){var s=o<=24?o%24:o;return a.setUTCHours(s,0,0,0),a}}]),n}(ct),Fie=function(e){rt(n,e);var t=at(n);function n(){var r;Je(this,n);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=59}},{key:"set",value:function(a,i,o){return a.setUTCMinutes(o,0,0),a}}]),n}(ct),jie=function(e){rt(n,e);var t=at(n);function n(){var r;Je(this,n);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=59}},{key:"set",value:function(a,i,o){return a.setUTCSeconds(o,0),a}}]),n}(ct),Uie=function(e){rt(n,e);var t=at(n);function n(){var r;Je(this,n);for(var a=arguments.length,i=new Array(a),o=0;o=1&&M<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var j=Ve((p=(v=(y=(g=r==null?void 0:r.weekStartsOn)!==null&&g!==void 0?g:r==null||(w=r.locale)===null||w===void 0||(_=w.options)===null||_===void 0?void 0:_.weekStartsOn)!==null&&y!==void 0?y:P.weekStartsOn)!==null&&v!==void 0?v:(b=P.locale)===null||b===void 0||(C=b.options)===null||C===void 0?void 0:C.weekStartsOn)!==null&&p!==void 0?p:0);if(!(j>=0&&j<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(T==="")return E===""?fe(n):new Date(NaN);var H={firstWeekContainsDate:M,weekStartsOn:j,locale:A},q=[new sie],Q=T.match(Gie).map(function(Te){var le=Te[0];if(le in x_){var ke=x_[le];return ke(Te,A.formatLong)}return Te}).join("").match(Yie),X=[],Y=_k(Q),oe;try{var U=function(){var le=oe.value;!(r!=null&&r.useAdditionalWeekYearTokens)&&wF(le)&&Rg(le,T,e),!(r!=null&&r.useAdditionalDayOfYearTokens)&&yF(le)&&Rg(le,T,e);var ke=le[0],Be=Wie[ke];if(Be){var dt=Be.incompatibleTokens;if(Array.isArray(dt)){var sn=X.find(function(Pt){return dt.includes(Pt.token)||Pt.token===ke});if(sn)throw new RangeError("The format string mustn't contain `".concat(sn.fullToken,"` and `").concat(le,"` at the same time"))}else if(Be.incompatibleTokens==="*"&&X.length>0)throw new RangeError("The format string mustn't contain `".concat(le,"` and any other token at the same time"));X.push({token:ke,fullToken:le});var Ge=Be.run(E,le,A.match,H);if(!Ge)return{v:new Date(NaN)};q.push(Ge.setter),E=Ge.rest}else{if(ke.match(Xie))throw new RangeError("Format string contains an unescaped latin alphabet character `"+ke+"`");if(le==="''"?le="'":ke==="'"&&(le=Zie(le)),E.indexOf(le)===0)E=E.slice(le.length);else return{v:new Date(NaN)}}};for(Y.s();!(oe=Y.n()).done;){var z=U();if(Sa(z)==="object")return z.v}}catch(Te){Y.e(Te)}finally{Y.f()}if(E.length>0&&Qie.test(E))return new Date(NaN);var ae=q.map(function(Te){return Te.priority}).sort(function(Te,le){return le-Te}).filter(function(Te,le,ke){return ke.indexOf(Te)===le}).map(function(Te){return q.filter(function(le){return le.priority===Te}).sort(function(le,ke){return ke.subPriority-le.subPriority})}).map(function(Te){return Te[0]}),de=fe(n);if(isNaN(de.getTime()))return new Date(NaN);var Ee=hF(de,Hd(de)),De={},ee=_k(ae),me;try{for(ee.s();!(me=ee.n()).done;){var _e=me.value;if(!_e.validate(Ee,H))return new Date(NaN);var Ce=_e.set(Ee,De,H);Array.isArray(Ce)?(Ee=Ce[0],kx(De,Ce[1])):Ee=Ce}}catch(Te){ee.e(Te)}finally{ee.f()}return Ee}function Zie(e){return e.match(Kie)[1].replace(qie,"'")}function Jie(e,t){var n;ce(1,arguments);var r=Ve((n=t==null?void 0:t.additionalDigits)!==null&&n!==void 0?n:2);if(r!==2&&r!==1&&r!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof e=="string"||Object.prototype.toString.call(e)==="[object String]"))return new Date(NaN);var a=roe(e),i;if(a.date){var o=aoe(a.date,r);i=ioe(o.restDateString,o.year)}if(!i||isNaN(i.getTime()))return new Date(NaN);var s=i.getTime(),l=0,u;if(a.time&&(l=ooe(a.time),isNaN(l)))return new Date(NaN);if(a.timezone){if(u=soe(a.timezone),isNaN(u))return new Date(NaN)}else{var c=new Date(s+l),d=new Date(0);return d.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),d.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),d}return new Date(s+l+u)}var Gm={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},eoe=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,toe=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,noe=/^([+-])(\d{2})(?::?(\d{2}))?$/;function roe(e){var t={},n=e.split(Gm.dateTimeDelimiter),r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],Gm.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Gm.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){var a=Gm.timezone.exec(r);a?(t.time=r.replace(a[1],""),t.timezone=a[1]):t.time=r}return t}function aoe(e,t){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};var a=r[1]?parseInt(r[1]):null,i=r[2]?parseInt(r[2]):null;return{year:i===null?a:i*100,restDateString:e.slice((r[1]||r[2]).length)}}function ioe(e,t){if(t===null)return new Date(NaN);var n=e.match(eoe);if(!n)return new Date(NaN);var r=!!n[4],a=Uf(n[1]),i=Uf(n[2])-1,o=Uf(n[3]),s=Uf(n[4]),l=Uf(n[5])-1;if(r)return foe(t,s,l)?loe(t,s,l):new Date(NaN);var u=new Date(0);return!coe(t,i,o)||!doe(t,a)?new Date(NaN):(u.setUTCFullYear(t,i,Math.max(a,o)),u)}function Uf(e){return e?parseInt(e):1}function ooe(e){var t=e.match(toe);if(!t)return NaN;var n=ab(t[1]),r=ab(t[2]),a=ab(t[3]);return hoe(n,r,a)?n*Nx+r*Px+a*1e3:NaN}function ab(e){return e&&parseFloat(e.replace(",","."))||0}function soe(e){if(e==="Z")return 0;var t=e.match(noe);if(!t)return 0;var n=t[1]==="+"?-1:1,r=parseInt(t[2]),a=t[3]&&parseInt(t[3])||0;return poe(r,a)?n*(r*Nx+a*Px):NaN}function loe(e,t,n){var r=new Date(0);r.setUTCFullYear(e,0,4);var a=r.getUTCDay()||7,i=(t-1)*7+n+1-a;return r.setUTCDate(r.getUTCDate()+i),r}var uoe=[31,null,31,30,31,30,31,31,30,31,30,31];function kF(e){return e%400===0||e%4===0&&e%100!==0}function coe(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(uoe[t]||(kF(e)?29:28))}function doe(e,t){return t>=1&&t<=(kF(e)?366:365)}function foe(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function hoe(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function poe(e,t){return t>=0&&t<=59}function moe(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,O_(e,t)}function O_(e,t){return O_=Object.setPrototypeOf||function(r,a){return r.__proto__=a,r},O_(e,t)}function voe(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i=0)&&(n[a]=e[a]);return n}function Sk(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function goe(e,t,n){return e===t?!0:e.correspondingElement?e.correspondingElement.classList.contains(n):e.classList.contains(n)}function yoe(e,t,n){if(e===t)return!0;for(;e.parentNode||e.host;){if(e.parentNode&&goe(e,t,n))return!0;e=e.parentNode||e.host}return e}function woe(e){return document.documentElement.clientWidth<=e.clientX||document.documentElement.clientHeight<=e.clientY}var boe=function(){if(!(typeof window>"u"||typeof window.addEventListener!="function")){var t=!1,n=Object.defineProperty({},"passive",{get:function(){t=!0}}),r=function(){};return window.addEventListener("testPassiveEventSupport",r,n),window.removeEventListener("testPassiveEventSupport",r,n),t}};function _oe(e){return e===void 0&&(e=0),function(){return++e}}var Soe=_oe(),k_,Km={},ib={},Eoe=["touchstart","touchmove"],xoe="ignore-react-onclickoutside";function Ek(e,t){var n={},r=Eoe.indexOf(t)!==-1;return r&&k_&&(n.passive=!e.props.preventDefault),n}function F0(e,t){var n,r,a=e.displayName||e.name||"Component";return r=n=function(i){moe(o,i);function o(l){var u;return u=i.call(this,l)||this,u.__outsideClickHandler=function(c){if(typeof u.__clickOutsideHandlerProp=="function"){u.__clickOutsideHandlerProp(c);return}var d=u.getInstance();if(typeof d.props.handleClickOutside=="function"){d.props.handleClickOutside(c);return}if(typeof d.handleClickOutside=="function"){d.handleClickOutside(c);return}throw new Error("WrappedComponent: "+a+" lacks a handleClickOutside(event) function for processing outside click events.")},u.__getComponentNode=function(){var c=u.getInstance();return t&&typeof t.setClickOutsideRef=="function"?t.setClickOutsideRef()(c):typeof c.setClickOutsideRef=="function"?c.setClickOutsideRef():Qd.findDOMNode(c)},u.enableOnClickOutside=function(){if(!(typeof document>"u"||ib[u._uid])){typeof k_>"u"&&(k_=boe()),ib[u._uid]=!0;var c=u.props.eventTypes;c.forEach||(c=[c]),Km[u._uid]=function(d){if(u.componentNode!==null&&(u.props.preventDefault&&d.preventDefault(),u.props.stopPropagation&&d.stopPropagation(),!(u.props.excludeScrollbar&&woe(d)))){var f=d.composed&&d.composedPath&&d.composedPath().shift()||d.target;yoe(f,u.componentNode,u.props.outsideClickIgnoreClass)===document&&u.__outsideClickHandler(d)}},c.forEach(function(d){document.addEventListener(d,Km[u._uid],Ek(Sk(u),d))})}},u.disableOnClickOutside=function(){delete ib[u._uid];var c=Km[u._uid];if(c&&typeof document<"u"){var d=u.props.eventTypes;d.forEach||(d=[d]),d.forEach(function(f){return document.removeEventListener(f,c,Ek(Sk(u),f))}),delete Km[u._uid]}},u.getRef=function(c){return u.instanceRef=c},u._uid=Soe(),u}var s=o.prototype;return s.getInstance=function(){if(e.prototype&&!e.prototype.isReactComponent)return this;var u=this.instanceRef;return u.getInstance?u.getInstance():u},s.componentDidMount=function(){if(!(typeof document>"u"||!document.createElement)){var u=this.getInstance();if(t&&typeof t.handleClickOutside=="function"&&(this.__clickOutsideHandlerProp=t.handleClickOutside(u),typeof this.__clickOutsideHandlerProp!="function"))throw new Error("WrappedComponent: "+a+" lacks a function for processing outside click events specified by the handleClickOutside config option.");this.componentNode=this.__getComponentNode(),!this.props.disableOnClickOutside&&this.enableOnClickOutside()}},s.componentDidUpdate=function(){this.componentNode=this.__getComponentNode()},s.componentWillUnmount=function(){this.disableOnClickOutside()},s.render=function(){var u=this.props;u.excludeScrollbar;var c=voe(u,["excludeScrollbar"]);return e.prototype&&e.prototype.isReactComponent?c.ref=this.getRef:c.wrappedRef=this.getRef,c.disableOnClickOutside=this.disableOnClickOutside,c.enableOnClickOutside=this.enableOnClickOutside,x.createElement(e,c)},o}(x.Component),n.displayName="OnClickOutside("+a+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:xoe,preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},r}function Coe(e,t){if(ce(2,arguments),Sa(t)!=="object"||t===null)throw new RangeError("values parameter must be an object");var n=fe(e);return isNaN(n.getTime())?new Date(NaN):(t.year!=null&&n.setFullYear(t.year),t.month!=null&&(n=nr(n,t.month)),t.date!=null&&n.setDate(Ve(t.date)),t.hours!=null&&n.setHours(Ve(t.hours)),t.minutes!=null&&n.setMinutes(Ve(t.minutes)),t.seconds!=null&&n.setSeconds(Ve(t.seconds)),t.milliseconds!=null&&n.setMilliseconds(Ve(t.milliseconds)),n)}function xk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function zg(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Hg(e);if(t){var a=Hg(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return function(i,o){if(o&&(typeof o=="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return k(i)}(this,n)}}function pp(e){return function(t){if(Array.isArray(t))return ob(t)}(e)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||function(t,n){if(t){if(typeof t=="string")return ob(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ob(t,n)}}(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ob(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,a=t.excludeDates,i=t.excludeDateIntervals,o=t.includeDates,s=t.includeDateIntervals,l=t.filterDate;return U0(e,{minDate:n,maxDate:r})||a&&a.some(function(u){return or(e,u)})||i&&i.some(function(u){var c=u.start,d=u.end;return fp(e,{start:c,end:d})})||o&&!o.some(function(u){return or(e,u)})||s&&!s.some(function(u){var c=u.start,d=u.end;return fp(e,{start:c,end:d})})||l&&!l(_t(e))||!1}function $x(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.excludeDates,r=t.excludeDateIntervals;return r&&r.length>0?r.some(function(a){var i=a.start,o=a.end;return fp(e,{start:i,end:o})}):n&&n.some(function(a){return or(e,a)})||!1}function AF(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,a=t.excludeDates,i=t.includeDates,o=t.filterDate;return U0(e,{minDate:SF(n),maxDate:xF(r)})||a&&a.some(function(s){return $a(e,s)})||i&&!i.some(function(s){return $a(e,s)})||o&&!o(_t(e))||!1}function sb(e,t,n,r){var a=We(e),i=Qn(e),o=We(t),s=Qn(t),l=We(r);return a===o&&a===l?i<=n&&n<=s:a=n||la:void 0}function Ooe(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,a=t.excludeDates,i=t.includeDates,o=t.filterDate;return U0(e,{minDate:n,maxDate:r})||a&&a.some(function(s){return Bg(e,s)})||i&&!i.some(function(s){return Bg(e,s)})||o&&!o(_t(e))||!1}function lb(e,t,n){if(!lp(t)||!lp(n))return!1;var r=We(t),a=We(n);return r<=e&&a>=e}function MF(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,a=t.excludeDates,i=t.includeDates,o=t.filterDate,s=new Date(e,0,1);return U0(s,{minDate:EF(n),maxDate:Qae(r)})||a&&a.some(function(l){return qo(s,l)})||i&&!i.some(function(l){return qo(s,l)})||o&&!o(_t(s))||!1}function ub(e,t,n,r){var a=We(e),i=rc(e),o=We(t),s=rc(t),l=We(r);return a===o&&a===l?i<=n&&n<=s:a=n||la:void 0}function U0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate;return n&&$g(e,n)<0||r&&$g(e,r)>0}function Nk(e,t){return t.some(function(n){return za(n)===za(e)&&Ua(n)===Ua(e)})}function Ak(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.excludeTimes,r=t.includeTimes,a=t.filterTime;return n&&Nk(e,n)||r&&!Nk(e,r)||a&&!a(e)||!1}function Mk(e,t){var n=t.minTime,r=t.maxTime;if(!n||!r)throw new Error("Both minTime and maxTime props required");var a,i=_t(),o=Ov(Dv(i,Ua(e)),za(e)),s=Ov(Dv(i,Ua(n)),za(n)),l=Ov(Dv(i,Ua(r)),za(r));try{a=!fp(o,{start:s,end:l})}catch{a=!1}return a}function Rk(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.includeDates,a=Vd(e,1);return n&&dp(n,a)>0||r&&r.every(function(i){return dp(i,a)>0})||!1}function Ik(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.maxDate,r=t.includeDates,a=ti(e,1);return n&&dp(a,n)>0||r&&r.every(function(i){return dp(a,i)>0})||!1}function $k(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.includeDates,a=cp(e,1);return n&&Lg(n,a)>0||r&&r.every(function(i){return Lg(i,a)>0})||!1}function Lk(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.maxDate,r=t.includeDates,a=Bd(e,1);return n&&Lg(a,n)>0||r&&r.every(function(i){return Lg(a,i)>0})||!1}function RF(e){var t=e.minDate,n=e.includeDates;if(n&&t){var r=n.filter(function(a){return $g(a,t)>=0});return yk(r)}return n?yk(n):t}function IF(e){var t=e.maxDate,n=e.includeDates;if(n&&t){var r=n.filter(function(a){return $g(a,t)<=0});return wk(r)}return n?wk(n):t}function Fk(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"react-datepicker__day--highlighted",n=new Map,r=0,a=e.length;r0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"react-datepicker__day--holidays",n=new Map;return e.forEach(function(r){var a=r.date,i=r.holidayName;if(L0(a)){var o=Vt(a,"MM.dd.yyyy"),s=n.get(o)||{};if(!("className"in s)||s.className!==t||(l=s.holidayNames,u=[i],l.length!==u.length||!l.every(function(d,f){return d===u[f]}))){var l,u;s.className=t;var c=s.holidayNames;s.holidayNames=c?[].concat(pp(c),[i]):[i],n.set(o,s)}}}),n}function Poe(e,t,n,r,a){for(var i=a.length,o=[],s=0;s1&&arguments[1]!==void 0?arguments[1]:Eh,n=Math.ceil(We(e)/t)*t;return{startPeriod:n-(t-1),endPeriod:n}}function Uk(e){var t=e.getSeconds(),n=e.getMilliseconds();return fe(e.getTime()-1e3*t-n)}function Noe(e,t,n,r){for(var a=[],i=0;i<2*t+1;i++){var o=e+t-i,s=!0;n&&(s=We(n)<=o),r&&s&&(s=We(r)>=o),s&&a.push(o)}return a}var Aoe=F0(function(e){$n(n,m.Component);var t=Ln(n);function n(r){var a;Rn(this,n),O(k(a=t.call(this,r)),"renderOptions",function(){var l=a.props.year,u=a.state.yearsList.map(function(f){return m.createElement("div",{className:l===f?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:f,onClick:a.onChange.bind(k(a),f),"aria-selected":l===f?"true":void 0},l===f?m.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",f)}),c=a.props.minDate?We(a.props.minDate):null,d=a.props.maxDate?We(a.props.maxDate):null;return d&&a.state.yearsList.find(function(f){return f===d})||u.unshift(m.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:a.incrementYears},m.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),c&&a.state.yearsList.find(function(f){return f===c})||u.push(m.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:a.decrementYears},m.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),u}),O(k(a),"onChange",function(l){a.props.onChange(l)}),O(k(a),"handleClickOutside",function(){a.props.onCancel()}),O(k(a),"shiftYears",function(l){var u=a.state.yearsList.map(function(c){return c+l});a.setState({yearsList:u})}),O(k(a),"incrementYears",function(){return a.shiftYears(1)}),O(k(a),"decrementYears",function(){return a.shiftYears(-1)});var i=r.yearDropdownItemNumber,o=r.scrollableYearDropdown,s=i||(o?10:5);return a.state={yearsList:Noe(a.props.year,s,a.props.minDate,a.props.maxDate)},a.dropdownRef=x.createRef(),a}return In(n,[{key:"componentDidMount",value:function(){var r=this.dropdownRef.current;if(r){var a=r.children?Array.from(r.children):null,i=a?a.find(function(o){return o.ariaSelected}):null;r.scrollTop=i?i.offsetTop+(i.clientHeight-r.clientHeight)/2:(r.scrollHeight-r.clientHeight)/2}}},{key:"render",value:function(){var r=cr({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return m.createElement("div",{className:r,ref:this.dropdownRef},this.renderOptions())}}]),n}()),Moe=function(e){$n(n,m.Component);var t=Ln(n);function n(){var r;Rn(this,n);for(var a=arguments.length,i=new Array(a),o=0;o0?c.get(d).holidayNames.join(", "):""}),O(k(r),"getTabIndex",function(s,l){var u=s||r.props.selected,c=l||r.props.preSelection;return r.isKeyboardSelected()||r.isSameDay(u)&&or(c,u)?0:-1}),O(k(r),"handleFocusDay",function(){var s,l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},u=!1;r.getTabIndex()===0&&!l.isInputFocused&&r.isSameDay(r.props.preSelection)&&(document.activeElement&&document.activeElement!==document.body||(u=!0),r.props.inline&&!r.props.shouldFocusDayInline&&(u=!1),r.props.containerRef&&r.props.containerRef.current&&r.props.containerRef.current.contains(document.activeElement)&&document.activeElement.classList.contains("react-datepicker__day")&&(u=!0),r.props.monthShowsDuplicateDaysEnd&&r.isAfterMonth()&&(u=!1),r.props.monthShowsDuplicateDaysStart&&r.isBeforeMonth()&&(u=!1)),u&&((s=r.dayEl.current)===null||s===void 0||s.focus({preventScroll:!0}))}),O(k(r),"renderDayContents",function(){return r.props.monthShowsDuplicateDaysEnd&&r.isAfterMonth()||r.props.monthShowsDuplicateDaysStart&&r.isBeforeMonth()?null:r.props.renderDayContents?r.props.renderDayContents(gk(r.props.day),r.props.day):gk(r.props.day)}),O(k(r),"render",function(){return m.createElement("div",{ref:r.dayEl,className:r.getClassNames(r.props.day),onKeyDown:r.handleOnKeyDown,onClick:r.handleClick,onMouseEnter:r.handleMouseEnter,tabIndex:r.getTabIndex(),"aria-label":r.getAriaLabel(),role:"option",title:r.getTitle(),"aria-disabled":r.isDisabled(),"aria-current":r.isCurrentDay()?"date":void 0,"aria-selected":r.isSelected()||r.isInRange()},r.renderDayContents(),r.getTitle()!==""&&m.createElement("span",{className:"holiday-overlay"},r.getTitle()))}),r}return In(n,[{key:"componentDidMount",value:function(){this.handleFocusDay()}},{key:"componentDidUpdate",value:function(r){this.handleFocusDay(r)}}]),n}(),Uoe=function(e){$n(n,m.Component);var t=Ln(n);function n(){var r;Rn(this,n);for(var a=arguments.length,i=new Array(a),o=0;o=6,h=!l&&!r.isWeekInMonth(d);if(f||h){if(!r.props.peekNextMonth)break;c=!0}}return s}),O(k(r),"onMonthClick",function(s,l){r.handleDayClick(ss(nr(r.props.day,l)),s)}),O(k(r),"onMonthMouseEnter",function(s){r.handleDayMouseEnter(ss(nr(r.props.day,s)))}),O(k(r),"handleMonthNavigation",function(s,l){r.isDisabled(l)||r.isExcluded(l)||(r.props.setPreSelection(l),r.MONTH_REFS[s].current&&r.MONTH_REFS[s].current.focus())}),O(k(r),"onMonthKeyDown",function(s,l){var u=r.props,c=u.selected,d=u.preSelection,f=u.disabledKeyboardNavigation,h=u.showTwoColumnMonthYearPicker,p=u.showFourColumnMonthYearPicker,v=u.setPreSelection,y=s.key;if(y!=="Tab"&&s.preventDefault(),!f){var g=zk(p,h),w=cb[g].verticalNavigationOffset,_=cb[g].grid;switch(y){case"Enter":r.onMonthClick(s,l),v(c);break;case"ArrowRight":r.handleMonthNavigation(l===11?0:l+1,ti(d,1));break;case"ArrowLeft":r.handleMonthNavigation(l===0?11:l-1,Vd(d,1));break;case"ArrowUp":r.handleMonthNavigation(_[0].includes(l)?l+12-w:l-w,Vd(d,w));break;case"ArrowDown":r.handleMonthNavigation(_[_.length-1].includes(l)?l-12+w:l+w,ti(d,w))}}}),O(k(r),"onQuarterClick",function(s,l){r.handleDayClick(kk(Au(r.props.day,l)),s)}),O(k(r),"onQuarterMouseEnter",function(s){r.handleDayMouseEnter(kk(Au(r.props.day,s)))}),O(k(r),"handleQuarterNavigation",function(s,l){r.isDisabled(l)||r.isExcluded(l)||(r.props.setPreSelection(l),r.QUARTER_REFS[s-1].current&&r.QUARTER_REFS[s-1].current.focus())}),O(k(r),"onQuarterKeyDown",function(s,l){var u=s.key;if(!r.props.disabledKeyboardNavigation)switch(u){case"Enter":r.onQuarterClick(s,l),r.props.setPreSelection(r.props.selected);break;case"ArrowRight":r.handleQuarterNavigation(l===4?1:l+1,bF(r.props.preSelection,1));break;case"ArrowLeft":r.handleQuarterNavigation(l===1?4:l-1,zae(r.props.preSelection,1))}}),O(k(r),"getMonthClassNames",function(s){var l=r.props,u=l.day,c=l.startDate,d=l.endDate,f=l.selected,h=l.minDate,p=l.maxDate,v=l.preSelection,y=l.monthClassName,g=l.excludeDates,w=l.includeDates,_=y?y(nr(u,s)):void 0,b=nr(u,s);return cr("react-datepicker__month-text","react-datepicker__month-".concat(s),_,{"react-datepicker__month-text--disabled":(h||p||g||w)&&AF(b,r.props),"react-datepicker__month-text--selected":r.isSelectedMonth(u,s,f),"react-datepicker__month-text--keyboard-selected":!r.props.disabledKeyboardNavigation&&Qn(v)===s,"react-datepicker__month-text--in-selecting-range":r.isInSelectingRangeMonth(s),"react-datepicker__month-text--in-range":sb(c,d,s,u),"react-datepicker__month-text--range-start":r.isRangeStartMonth(s),"react-datepicker__month-text--range-end":r.isRangeEndMonth(s),"react-datepicker__month-text--selecting-range-start":r.isSelectingMonthRangeStart(s),"react-datepicker__month-text--selecting-range-end":r.isSelectingMonthRangeEnd(s),"react-datepicker__month-text--today":r.isCurrentMonth(u,s)})}),O(k(r),"getTabIndex",function(s){var l=Qn(r.props.preSelection);return r.props.disabledKeyboardNavigation||s!==l?"-1":"0"}),O(k(r),"getQuarterTabIndex",function(s){var l=rc(r.props.preSelection);return r.props.disabledKeyboardNavigation||s!==l?"-1":"0"}),O(k(r),"getAriaLabel",function(s){var l=r.props,u=l.chooseDayAriaLabelPrefix,c=u===void 0?"Choose":u,d=l.disabledDayAriaLabelPrefix,f=d===void 0?"Not available":d,h=l.day,p=nr(h,s),v=r.isDisabled(p)||r.isExcluded(p)?f:c;return"".concat(v," ").concat(Vt(p,"MMMM yyyy"))}),O(k(r),"getQuarterClassNames",function(s){var l=r.props,u=l.day,c=l.startDate,d=l.endDate,f=l.selected,h=l.minDate,p=l.maxDate,v=l.preSelection;return cr("react-datepicker__quarter-text","react-datepicker__quarter-".concat(s),{"react-datepicker__quarter-text--disabled":(h||p)&&Ooe(Au(u,s),r.props),"react-datepicker__quarter-text--selected":r.isSelectedQuarter(u,s,f),"react-datepicker__quarter-text--keyboard-selected":rc(v)===s,"react-datepicker__quarter-text--in-selecting-range":r.isInSelectingRangeQuarter(s),"react-datepicker__quarter-text--in-range":ub(c,d,s,u),"react-datepicker__quarter-text--range-start":r.isRangeStartQuarter(s),"react-datepicker__quarter-text--range-end":r.isRangeEndQuarter(s)})}),O(k(r),"getMonthContent",function(s){var l=r.props,u=l.showFullMonthYearPicker,c=l.renderMonthContent,d=l.locale,f=NF(s,d),h=Ix(s,d);return c?c(s,f,h):u?h:f}),O(k(r),"getQuarterContent",function(s){var l=r.props,u=l.renderQuarterContent,c=function(d,f){return Vt(Au(_t(),d),"QQQ",f)}(s,l.locale);return u?u(s,c):c}),O(k(r),"renderMonths",function(){var s=r.props,l=s.showTwoColumnMonthYearPicker,u=s.showFourColumnMonthYearPicker,c=s.day,d=s.selected;return cb[zk(u,l)].grid.map(function(f,h){return m.createElement("div",{className:"react-datepicker__month-wrapper",key:h},f.map(function(p,v){return m.createElement("div",{ref:r.MONTH_REFS[p],key:v,onClick:function(y){r.onMonthClick(y,p)},onKeyDown:function(y){r.onMonthKeyDown(y,p)},onMouseEnter:function(){return r.onMonthMouseEnter(p)},tabIndex:r.getTabIndex(p),className:r.getMonthClassNames(p),role:"option","aria-label":r.getAriaLabel(p),"aria-current":r.isCurrentMonth(c,p)?"date":void 0,"aria-selected":r.isSelectedMonth(c,p,d)},r.getMonthContent(p))}))})}),O(k(r),"renderQuarters",function(){var s=r.props,l=s.day,u=s.selected;return m.createElement("div",{className:"react-datepicker__quarter-wrapper"},[1,2,3,4].map(function(c,d){return m.createElement("div",{key:d,ref:r.QUARTER_REFS[d],role:"option",onClick:function(f){r.onQuarterClick(f,c)},onKeyDown:function(f){r.onQuarterKeyDown(f,c)},onMouseEnter:function(){return r.onQuarterMouseEnter(c)},className:r.getQuarterClassNames(c),"aria-selected":r.isSelectedQuarter(l,c,u),tabIndex:r.getQuarterTabIndex(c),"aria-current":r.isCurrentQuarter(l,c)?"date":void 0},r.getQuarterContent(c))}))}),O(k(r),"getClassNames",function(){var s=r.props,l=s.selectingDate,u=s.selectsStart,c=s.selectsEnd,d=s.showMonthYearPicker,f=s.showQuarterYearPicker;return cr("react-datepicker__month",{"react-datepicker__month--selecting-range":l&&(u||c)},{"react-datepicker__monthPicker":d},{"react-datepicker__quarterPicker":f})}),r}return In(n,[{key:"render",value:function(){var r=this.props,a=r.showMonthYearPicker,i=r.showQuarterYearPicker,o=r.day,s=r.ariaLabelPrefix,l=s===void 0?"month ":s;return m.createElement("div",{className:this.getClassNames(),onMouseLeave:this.handleMouseLeave,"aria-label":"".concat(l," ").concat(Vt(o,"yyyy-MM")),role:"listbox"},a?this.renderMonths():i?this.renderQuarters():this.renderWeeks())}}]),n}(),jF=function(e){$n(n,m.Component);var t=Ln(n);function n(){var r;Rn(this,n);for(var a=arguments.length,i=new Array(a),o=0;o0&&arguments[0]!==void 0?arguments[0]:{}).className||"").split(/\s+/);return Yoe.some(function(s){return o.indexOf(s)>=0})})(i.target)&&a.props.onDropdownFocus()}),O(k(a),"getDateInView",function(){var i=a.props,o=i.preSelection,s=i.selected,l=i.openToDate,u=RF(a.props),c=IF(a.props),d=_t(),f=l||s||o;return f||(u&&Ko(d,u)?u:c&&js(d,c)?c:d)}),O(k(a),"increaseMonth",function(){a.setState(function(i){var o=i.date;return{date:ti(o,1)}},function(){return a.handleMonthChange(a.state.date)})}),O(k(a),"decreaseMonth",function(){a.setState(function(i){var o=i.date;return{date:Vd(o,1)}},function(){return a.handleMonthChange(a.state.date)})}),O(k(a),"handleDayClick",function(i,o,s){a.props.onSelect(i,o,s),a.props.setPreSelection&&a.props.setPreSelection(i)}),O(k(a),"handleDayMouseEnter",function(i){a.setState({selectingDate:i}),a.props.onDayMouseEnter&&a.props.onDayMouseEnter(i)}),O(k(a),"handleMonthMouseLeave",function(){a.setState({selectingDate:null}),a.props.onMonthMouseLeave&&a.props.onMonthMouseLeave()}),O(k(a),"handleYearMouseEnter",function(i,o){a.setState({selectingDate:Wi(_t(),o)}),a.props.onYearMouseEnter&&a.props.onYearMouseEnter(i,o)}),O(k(a),"handleYearMouseLeave",function(i,o){a.props.onYearMouseLeave&&a.props.onYearMouseLeave(i,o)}),O(k(a),"handleYearChange",function(i){a.props.onYearChange&&(a.props.onYearChange(i),a.setState({isRenderAriaLiveMessage:!0})),a.props.adjustDateOnChange&&(a.props.onSelect&&a.props.onSelect(i),a.props.setOpen&&a.props.setOpen(!0)),a.props.setPreSelection&&a.props.setPreSelection(i)}),O(k(a),"handleMonthChange",function(i){a.handleCustomMonthChange(i),a.props.adjustDateOnChange&&(a.props.onSelect&&a.props.onSelect(i),a.props.setOpen&&a.props.setOpen(!0)),a.props.setPreSelection&&a.props.setPreSelection(i)}),O(k(a),"handleCustomMonthChange",function(i){a.props.onMonthChange&&(a.props.onMonthChange(i),a.setState({isRenderAriaLiveMessage:!0}))}),O(k(a),"handleMonthYearChange",function(i){a.handleYearChange(i),a.handleMonthChange(i)}),O(k(a),"changeYear",function(i){a.setState(function(o){var s=o.date;return{date:Wi(s,i)}},function(){return a.handleYearChange(a.state.date)})}),O(k(a),"changeMonth",function(i){a.setState(function(o){var s=o.date;return{date:nr(s,i)}},function(){return a.handleMonthChange(a.state.date)})}),O(k(a),"changeMonthYear",function(i){a.setState(function(o){var s=o.date;return{date:Wi(nr(s,Qn(i)),We(i))}},function(){return a.handleMonthYearChange(a.state.date)})}),O(k(a),"header",function(){var i=Rx(arguments.length>0&&arguments[0]!==void 0?arguments[0]:a.state.date,a.props.locale,a.props.calendarStartDay),o=[];return a.props.showWeekNumbers&&o.push(m.createElement("div",{key:"W",className:"react-datepicker__day-name"},a.props.weekLabel||"#")),o.concat([0,1,2,3,4,5,6].map(function(s){var l=pf(i,s),u=a.formatWeekday(l,a.props.locale),c=a.props.weekDayClassName?a.props.weekDayClassName(l):void 0;return m.createElement("div",{key:s,className:cr("react-datepicker__day-name",c)},u)}))}),O(k(a),"formatWeekday",function(i,o){return a.props.formatWeekDay?function(s,l,u){return l(Vt(s,"EEEE",u))}(i,a.props.formatWeekDay,o):a.props.useWeekdaysShort?function(s,l){return Vt(s,"EEE",l)}(i,o):function(s,l){return Vt(s,"EEEEEE",l)}(i,o)}),O(k(a),"decreaseYear",function(){a.setState(function(i){var o=i.date;return{date:cp(o,a.props.showYearPicker?a.props.yearItemNumber:1)}},function(){return a.handleYearChange(a.state.date)})}),O(k(a),"clearSelectingDate",function(){a.setState({selectingDate:null})}),O(k(a),"renderPreviousButton",function(){if(!a.props.renderCustomHeader){var i;switch(!0){case a.props.showMonthYearPicker:i=$k(a.state.date,a.props);break;case a.props.showYearPicker:i=function(g){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_=w.minDate,b=w.yearItemNumber,C=b===void 0?Eh:b,E=ac(Jf(cp(g,C)),C).endPeriod,T=_&&We(_);return T&&T>E||!1}(a.state.date,a.props);break;default:i=Rk(a.state.date,a.props)}if((a.props.forceShowMonthNavigation||a.props.showDisabledMonthNavigation||!i)&&!a.props.showTimeSelectOnly){var o=["react-datepicker__navigation","react-datepicker__navigation--previous"],s=a.decreaseMonth;(a.props.showMonthYearPicker||a.props.showQuarterYearPicker||a.props.showYearPicker)&&(s=a.decreaseYear),i&&a.props.showDisabledMonthNavigation&&(o.push("react-datepicker__navigation--previous--disabled"),s=null);var l=a.props.showMonthYearPicker||a.props.showQuarterYearPicker||a.props.showYearPicker,u=a.props,c=u.previousMonthButtonLabel,d=u.previousYearButtonLabel,f=a.props,h=f.previousMonthAriaLabel,p=h===void 0?typeof c=="string"?c:"Previous Month":h,v=f.previousYearAriaLabel,y=v===void 0?typeof d=="string"?d:"Previous Year":v;return m.createElement("button",{type:"button",className:o.join(" "),onClick:s,onKeyDown:a.props.handleOnKeyDown,"aria-label":l?y:p},m.createElement("span",{className:["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"].join(" ")},l?a.props.previousYearButtonLabel:a.props.previousMonthButtonLabel))}}}),O(k(a),"increaseYear",function(){a.setState(function(i){var o=i.date;return{date:Bd(o,a.props.showYearPicker?a.props.yearItemNumber:1)}},function(){return a.handleYearChange(a.state.date)})}),O(k(a),"renderNextButton",function(){if(!a.props.renderCustomHeader){var i;switch(!0){case a.props.showMonthYearPicker:i=Lk(a.state.date,a.props);break;case a.props.showYearPicker:i=function(g){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_=w.maxDate,b=w.yearItemNumber,C=b===void 0?Eh:b,E=ac(Bd(g,C),C).startPeriod,T=_&&We(_);return T&&T0&&arguments[0]!==void 0?arguments[0]:a.state.date,o=["react-datepicker__current-month"];return a.props.showYearDropdown&&o.push("react-datepicker__current-month--hasYearDropdown"),a.props.showMonthDropdown&&o.push("react-datepicker__current-month--hasMonthDropdown"),a.props.showMonthYearDropdown&&o.push("react-datepicker__current-month--hasMonthYearDropdown"),m.createElement("div",{className:o.join(" ")},Vt(i,a.props.dateFormat,a.props.locale))}),O(k(a),"renderYearDropdown",function(){var i=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(a.props.showYearDropdown&&!i)return m.createElement(Moe,{adjustDateOnChange:a.props.adjustDateOnChange,date:a.state.date,onSelect:a.props.onSelect,setOpen:a.props.setOpen,dropdownMode:a.props.dropdownMode,onChange:a.changeYear,minDate:a.props.minDate,maxDate:a.props.maxDate,year:We(a.state.date),scrollableYearDropdown:a.props.scrollableYearDropdown,yearDropdownItemNumber:a.props.yearDropdownItemNumber})}),O(k(a),"renderMonthDropdown",function(){var i=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(a.props.showMonthDropdown&&!i)return m.createElement(Ioe,{dropdownMode:a.props.dropdownMode,locale:a.props.locale,onChange:a.changeMonth,month:Qn(a.state.date),useShortMonthInDropdown:a.props.useShortMonthInDropdown})}),O(k(a),"renderMonthYearDropdown",function(){var i=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(a.props.showMonthYearDropdown&&!i)return m.createElement(Foe,{dropdownMode:a.props.dropdownMode,locale:a.props.locale,dateFormat:a.props.dateFormat,onChange:a.changeMonthYear,minDate:a.props.minDate,maxDate:a.props.maxDate,date:a.state.date,scrollableMonthYearDropdown:a.props.scrollableMonthYearDropdown})}),O(k(a),"handleTodayButtonClick",function(i){a.props.onSelect(Pk(),i),a.props.setPreSelection&&a.props.setPreSelection(Pk())}),O(k(a),"renderTodayButton",function(){if(a.props.todayButton&&!a.props.showTimeSelectOnly)return m.createElement("div",{className:"react-datepicker__today-button",onClick:function(i){return a.handleTodayButtonClick(i)}},a.props.todayButton)}),O(k(a),"renderDefaultHeader",function(i){var o=i.monthDate,s=i.i;return m.createElement("div",{className:"react-datepicker__header ".concat(a.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},a.renderCurrentMonth(o),m.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(a.props.dropdownMode),onFocus:a.handleDropdownFocus},a.renderMonthDropdown(s!==0),a.renderMonthYearDropdown(s!==0),a.renderYearDropdown(s!==0)),m.createElement("div",{className:"react-datepicker__day-names"},a.header(o)))}),O(k(a),"renderCustomHeader",function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=i.monthDate,s=i.i;if(a.props.showTimeSelect&&!a.state.monthContainer||a.props.showTimeSelectOnly)return null;var l=Rk(a.state.date,a.props),u=Ik(a.state.date,a.props),c=$k(a.state.date,a.props),d=Lk(a.state.date,a.props),f=!a.props.showMonthYearPicker&&!a.props.showQuarterYearPicker&&!a.props.showYearPicker;return m.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:a.props.onDropdownFocus},a.props.renderCustomHeader(zg(zg({},a.state),{},{customHeaderCount:s,monthDate:o,changeMonth:a.changeMonth,changeYear:a.changeYear,decreaseMonth:a.decreaseMonth,increaseMonth:a.increaseMonth,decreaseYear:a.decreaseYear,increaseYear:a.increaseYear,prevMonthButtonDisabled:l,nextMonthButtonDisabled:u,prevYearButtonDisabled:c,nextYearButtonDisabled:d})),f&&m.createElement("div",{className:"react-datepicker__day-names"},a.header(o)))}),O(k(a),"renderYearHeader",function(){var i=a.state.date,o=a.props,s=o.showYearPicker,l=ac(i,o.yearItemNumber),u=l.startPeriod,c=l.endPeriod;return m.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},s?"".concat(u," - ").concat(c):We(i))}),O(k(a),"renderHeader",function(i){switch(!0){case a.props.renderCustomHeader!==void 0:return a.renderCustomHeader(i);case(a.props.showMonthYearPicker||a.props.showQuarterYearPicker||a.props.showYearPicker):return a.renderYearHeader(i);default:return a.renderDefaultHeader(i)}}),O(k(a),"renderMonths",function(){var i;if(!a.props.showTimeSelectOnly&&!a.props.showYearPicker){for(var o=[],s=a.props.showPreviousMonths?a.props.monthsShown-1:0,l=Vd(a.state.date,s),u=(i=a.props.monthSelectedIn)!==null&&i!==void 0?i:s,c=0;c0;o.push(m.createElement("div",{key:f,ref:function(v){a.monthContainer=v},className:"react-datepicker__month-container"},a.renderHeader({monthDate:d,i:c}),m.createElement(Hoe,{chooseDayAriaLabelPrefix:a.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:a.props.disabledDayAriaLabelPrefix,weekAriaLabelPrefix:a.props.weekAriaLabelPrefix,ariaLabelPrefix:a.props.monthAriaLabelPrefix,onChange:a.changeMonthYear,day:d,dayClassName:a.props.dayClassName,calendarStartDay:a.props.calendarStartDay,monthClassName:a.props.monthClassName,onDayClick:a.handleDayClick,handleOnKeyDown:a.props.handleOnDayKeyDown,onDayMouseEnter:a.handleDayMouseEnter,onMouseLeave:a.handleMonthMouseLeave,onWeekSelect:a.props.onWeekSelect,orderInDisplay:c,formatWeekNumber:a.props.formatWeekNumber,locale:a.props.locale,minDate:a.props.minDate,maxDate:a.props.maxDate,excludeDates:a.props.excludeDates,excludeDateIntervals:a.props.excludeDateIntervals,highlightDates:a.props.highlightDates,holidays:a.props.holidays,selectingDate:a.state.selectingDate,includeDates:a.props.includeDates,includeDateIntervals:a.props.includeDateIntervals,inline:a.props.inline,shouldFocusDayInline:a.props.shouldFocusDayInline,fixedHeight:a.props.fixedHeight,filterDate:a.props.filterDate,preSelection:a.props.preSelection,setPreSelection:a.props.setPreSelection,selected:a.props.selected,selectsStart:a.props.selectsStart,selectsEnd:a.props.selectsEnd,selectsRange:a.props.selectsRange,selectsDisabledDaysInRange:a.props.selectsDisabledDaysInRange,showWeekNumbers:a.props.showWeekNumbers,startDate:a.props.startDate,endDate:a.props.endDate,peekNextMonth:a.props.peekNextMonth,setOpen:a.props.setOpen,shouldCloseOnSelect:a.props.shouldCloseOnSelect,renderDayContents:a.props.renderDayContents,renderMonthContent:a.props.renderMonthContent,renderQuarterContent:a.props.renderQuarterContent,renderYearContent:a.props.renderYearContent,disabledKeyboardNavigation:a.props.disabledKeyboardNavigation,showMonthYearPicker:a.props.showMonthYearPicker,showFullMonthYearPicker:a.props.showFullMonthYearPicker,showTwoColumnMonthYearPicker:a.props.showTwoColumnMonthYearPicker,showFourColumnMonthYearPicker:a.props.showFourColumnMonthYearPicker,showYearPicker:a.props.showYearPicker,showQuarterYearPicker:a.props.showQuarterYearPicker,isInputFocused:a.props.isInputFocused,containerRef:a.containerRef,monthShowsDuplicateDaysEnd:h,monthShowsDuplicateDaysStart:p})))}return o}}),O(k(a),"renderYears",function(){if(!a.props.showTimeSelectOnly)return a.props.showYearPicker?m.createElement("div",{className:"react-datepicker__year--container"},a.renderHeader(),m.createElement(Boe,hp({onDayClick:a.handleDayClick,selectingDate:a.state.selectingDate,clearSelectingDate:a.clearSelectingDate,date:a.state.date},a.props,{onYearMouseEnter:a.handleYearMouseEnter,onYearMouseLeave:a.handleYearMouseLeave}))):void 0}),O(k(a),"renderTimeSection",function(){if(a.props.showTimeSelect&&(a.state.monthContainer||a.props.showTimeSelectOnly))return m.createElement(jF,{selected:a.props.selected,openToDate:a.props.openToDate,onChange:a.props.onTimeChange,timeClassName:a.props.timeClassName,format:a.props.timeFormat,includeTimes:a.props.includeTimes,intervals:a.props.timeIntervals,minTime:a.props.minTime,maxTime:a.props.maxTime,excludeTimes:a.props.excludeTimes,filterTime:a.props.filterTime,timeCaption:a.props.timeCaption,todayButton:a.props.todayButton,showMonthDropdown:a.props.showMonthDropdown,showMonthYearDropdown:a.props.showMonthYearDropdown,showYearDropdown:a.props.showYearDropdown,withPortal:a.props.withPortal,monthRef:a.state.monthContainer,injectTimes:a.props.injectTimes,locale:a.props.locale,handleOnKeyDown:a.props.handleOnKeyDown,showTimeSelectOnly:a.props.showTimeSelectOnly})}),O(k(a),"renderInputTimeSection",function(){var i=new Date(a.props.selected),o=Uo(i)&&a.props.selected?"".concat(jk(i.getHours()),":").concat(jk(i.getMinutes())):"";if(a.props.showTimeInput)return m.createElement(Voe,{date:i,timeString:o,timeInputLabel:a.props.timeInputLabel,onChange:a.props.onTimeChange,customTimeInput:a.props.customTimeInput})}),O(k(a),"renderAriaLiveRegion",function(){var i,o=ac(a.state.date,a.props.yearItemNumber),s=o.startPeriod,l=o.endPeriod;return i=a.props.showYearPicker?"".concat(s," - ").concat(l):a.props.showMonthYearPicker||a.props.showQuarterYearPicker?We(a.state.date):"".concat(Ix(Qn(a.state.date),a.props.locale)," ").concat(We(a.state.date)),m.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},a.state.isRenderAriaLiveMessage&&i)}),O(k(a),"renderChildren",function(){if(a.props.children)return m.createElement("div",{className:"react-datepicker__children-container"},a.props.children)}),a.containerRef=m.createRef(),a.state={date:a.getDateInView(),selectingDate:null,monthContainer:null,isRenderAriaLiveMessage:!1},a}return In(n,[{key:"componentDidMount",value:function(){var r=this;this.props.showTimeSelect&&(this.assignMonthContainer=void r.setState({monthContainer:r.monthContainer}))}},{key:"componentDidUpdate",value:function(r){var a=this;if(!this.props.preSelection||or(this.props.preSelection,r.preSelection)&&this.props.monthSelectedIn===r.monthSelectedIn)this.props.openToDate&&!or(this.props.openToDate,r.openToDate)&&this.setState({date:this.props.openToDate});else{var i=!$a(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return i&&a.handleCustomMonthChange(a.state.date)})}}},{key:"render",value:function(){var r=this.props.container||Woe;return m.createElement("div",{ref:this.containerRef},m.createElement(r,{className:cr("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showPopperArrow:this.props.showPopperArrow,arrowProps:this.props.arrowProps},this.renderAriaLiveRegion(),this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.renderChildren()))}}],[{key:"defaultProps",get:function(){return{onDropdownFocus:function(){},monthsShown:1,forceShowMonthNavigation:!1,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",customTimeInput:null,yearItemNumber:Eh}}}]),n}(),UF=function(e){var t=e.icon,n=e.className,r="react-datepicker__calendar-icon";return m.isValidElement(t)?m.cloneElement(t,{className:"".concat(t.props.className||""," ").concat(r," ").concat(n)}):typeof t=="string"?m.createElement("i",{className:"".concat(r," ").concat(t," ").concat(n),"aria-hidden":"true"}):m.createElement("svg",{className:"react-datepicker__calendar-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},m.createElement("path",{d:"M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z"}))};UF.defaultProps={className:""};var Koe=UF,zF=function(e){$n(n,m.Component);var t=Ln(n);function n(r){var a;return Rn(this,n),(a=t.call(this,r)).el=document.createElement("div"),a}return In(n,[{key:"componentDidMount",value:function(){this.portalRoot=(this.props.portalHost||document).getElementById(this.props.portalId),this.portalRoot||(this.portalRoot=document.createElement("div"),this.portalRoot.setAttribute("id",this.props.portalId),(this.props.portalHost||document.body).appendChild(this.portalRoot)),this.portalRoot.appendChild(this.el)}},{key:"componentWillUnmount",value:function(){this.portalRoot.removeChild(this.el)}},{key:"render",value:function(){return Q3.createPortal(this.props.children,this.el)}}]),n}(),qoe=function(e){return!e.disabled&&e.tabIndex!==-1},HF=function(e){$n(n,m.Component);var t=Ln(n);function n(r){var a;return Rn(this,n),O(k(a=t.call(this,r)),"getTabChildren",function(){return Array.prototype.slice.call(a.tabLoopRef.current.querySelectorAll("[tabindex], a, button, input, select, textarea"),1,-1).filter(qoe)}),O(k(a),"handleFocusStart",function(){var i=a.getTabChildren();i&&i.length>1&&i[i.length-1].focus()}),O(k(a),"handleFocusEnd",function(){var i=a.getTabChildren();i&&i.length>1&&i[0].focus()}),a.tabLoopRef=m.createRef(),a}return In(n,[{key:"render",value:function(){return this.props.enableTabLoop?m.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},m.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:"0",onFocus:this.handleFocusStart}),this.props.children,m.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:"0",onFocus:this.handleFocusEnd})):this.props.children}}],[{key:"defaultProps",get:function(){return{enableTabLoop:!0}}}]),n}(),Qoe=function(e){$n(n,m.Component);var t=Ln(n);function n(){return Rn(this,n),t.apply(this,arguments)}return In(n,[{key:"render",value:function(){var r,a=this.props,i=a.className,o=a.wrapperClassName,s=a.hidePopper,l=a.popperComponent,u=a.popperModifiers,c=a.popperPlacement,d=a.popperProps,f=a.targetComponent,h=a.enableTabLoop,p=a.popperOnKeyDown,v=a.portalId,y=a.portalHost;if(!s){var g=cr("react-datepicker-popper",i);r=m.createElement($2,hp({modifiers:u,placement:c},d),function(_){var b=_.ref,C=_.style,E=_.placement,T=_.arrowProps;return m.createElement(HF,{enableTabLoop:h},m.createElement("div",{ref:b,style:C,className:g,"data-placement":E,onKeyDown:p},m.cloneElement(l,{arrowProps:T})))})}this.props.popperContainer&&(r=m.createElement(this.props.popperContainer,{},r)),v&&!s&&(r=m.createElement(zF,{portalId:v,portalHost:y},r));var w=cr("react-datepicker-wrapper",o);return m.createElement(FG,{className:"react-datepicker-manager"},m.createElement(iq,null,function(_){var b=_.ref;return m.createElement("div",{ref:b,className:w},f)}),r)}}],[{key:"defaultProps",get:function(){return{hidePopper:!0,popperModifiers:[],popperProps:{},popperPlacement:"bottom-start"}}}]),n}(),Hk="react-datepicker-ignore-onclickoutside",Xoe=F0(Goe),db="Date input not valid.",Zoe=function(e){$n(n,m.Component);var t=Ln(n);function n(r){var a;return Rn(this,n),O(k(a=t.call(this,r)),"getPreSelection",function(){return a.props.openToDate?a.props.openToDate:a.props.selectsEnd&&a.props.startDate?a.props.startDate:a.props.selectsStart&&a.props.endDate?a.props.endDate:_t()}),O(k(a),"calcInitialState",function(){var i,o,s=(i=a.props.holidays)===null||i===void 0?void 0:i.reduce(function(f,h){var p=new Date(h.date);return lp(p)?[].concat(pp(f),[zg(zg({},h),{},{date:p})]):f},[]),l=a.getPreSelection(),u=RF(a.props),c=IF(a.props),d=u&&Ko(l,Di(u))?u:c&&js(l,Fg(c))?c:l;return{open:a.props.startOpen||!1,preventFocus:!1,preSelection:(o=a.props.selectsRange?a.props.startDate:a.props.selected)!==null&&o!==void 0?o:d,highlightDates:Fk(a.props.highlightDates),holidays:koe(s),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1}}),O(k(a),"clearPreventFocusTimeout",function(){a.preventFocusTimeout&&clearTimeout(a.preventFocusTimeout)}),O(k(a),"setFocus",function(){a.input&&a.input.focus&&a.input.focus({preventScroll:!0})}),O(k(a),"setBlur",function(){a.input&&a.input.blur&&a.input.blur(),a.cancelFocusInput()}),O(k(a),"setOpen",function(i){var o=arguments.length>1&&arguments[1]!==void 0&&arguments[1];a.setState({open:i,preSelection:i&&a.state.open?a.state.preSelection:a.calcInitialState().preSelection,lastPreSelectChange:fb},function(){i||a.setState(function(s){return{focused:!!o&&s.focused}},function(){!o&&a.setBlur(),a.setState({inputValue:null})})})}),O(k(a),"inputOk",function(){return L0(a.state.preSelection)}),O(k(a),"isCalendarOpen",function(){return a.props.open===void 0?a.state.open&&!a.props.disabled&&!a.props.readOnly:a.props.open}),O(k(a),"handleFocus",function(i){a.state.preventFocus||(a.props.onFocus(i),a.props.preventOpenOnFocus||a.props.readOnly||a.setOpen(!0)),a.setState({focused:!0})}),O(k(a),"sendFocusBackToInput",function(){a.preventFocusTimeout&&a.clearPreventFocusTimeout(),a.setState({preventFocus:!0},function(){a.preventFocusTimeout=setTimeout(function(){a.setFocus(),a.setState({preventFocus:!1})})})}),O(k(a),"cancelFocusInput",function(){clearTimeout(a.inputFocusTimeout),a.inputFocusTimeout=null}),O(k(a),"deferFocusInput",function(){a.cancelFocusInput(),a.inputFocusTimeout=setTimeout(function(){return a.setFocus()},1)}),O(k(a),"handleDropdownFocus",function(){a.cancelFocusInput()}),O(k(a),"handleBlur",function(i){(!a.state.open||a.props.withPortal||a.props.showTimeInput)&&a.props.onBlur(i),a.setState({focused:!1})}),O(k(a),"handleCalendarClickOutside",function(i){a.props.inline||a.setOpen(!1),a.props.onClickOutside(i),a.props.withPortal&&i.preventDefault()}),O(k(a),"handleChange",function(){for(var i=arguments.length,o=new Array(i),s=0;s0&&(p=rb(u,c.slice(0,u.length),new Date)),Uo(p)||(p=new Date(u))),Uo(p)&&y?p:null));a.props.showTimeSelectOnly&&a.props.selected&&!or(g,a.props.selected)&&(g=Coe(a.props.selected,g==null?{hours:za(a.props.selected),minutes:Ua(a.props.selected),seconds:nb(a.props.selected)}:{hours:za(g),minutes:Ua(g),seconds:nb(g)})),!g&&l.target.value||a.setSelected(g,l,!0)}}),O(k(a),"handleSelect",function(i,o,s){if(a.props.shouldCloseOnSelect&&!a.props.showTimeSelect&&a.sendFocusBackToInput(),a.props.onChangeRaw&&a.props.onChangeRaw(o),a.setSelected(i,o,!1,s),a.props.showDateSelect&&a.setState({isRenderAriaLiveMessage:!0}),!a.props.shouldCloseOnSelect||a.props.showTimeSelect)a.setPreSelection(i);else if(!a.props.inline){a.props.selectsRange||a.setOpen(!1);var l=a.props,u=l.startDate,c=l.endDate;!u||c||Ko(i,u)||a.setOpen(!1)}}),O(k(a),"setSelected",function(i,o,s,l){var u=i;if(a.props.showYearPicker){if(u!==null&&MF(We(u),a.props))return}else if(a.props.showMonthYearPicker){if(u!==null&&AF(u,a.props))return}else if(u!==null&&j0(u,a.props))return;var c=a.props,d=c.onChange,f=c.selectsRange,h=c.startDate,p=c.endDate;if(!wl(a.props.selected,u)||a.props.allowSameDay||f)if(u!==null&&(!a.props.selected||s&&(a.props.showTimeSelect||a.props.showTimeSelectOnly||a.props.showTimeInput)||(u=Ok(u,{hour:za(a.props.selected),minute:Ua(a.props.selected),second:nb(a.props.selected)})),a.props.inline||a.setState({preSelection:u}),a.props.focusSelectedMonth||a.setState({monthSelectedIn:l})),f){var v=h&&!p,y=h&&p;!h&&!p?d([u,null],o):v&&(Ko(u,h)?d([u,null],o):d([h,u],o)),y&&d([u,null],o)}else d(u,o);s||(a.props.onSelect(u,o),a.setState({inputValue:null}))}),O(k(a),"setPreSelection",function(i){var o=a.props.minDate!==void 0,s=a.props.maxDate!==void 0,l=!0;if(i){var u=Di(i);if(o&&s)l=kv(i,a.props.minDate,a.props.maxDate);else if(o){var c=Di(a.props.minDate);l=js(i,c)||wl(u,c)}else if(s){var d=Fg(a.props.maxDate);l=Ko(i,d)||wl(u,d)}}l&&a.setState({preSelection:i})}),O(k(a),"handleTimeChange",function(i){var o=a.props.selected?a.props.selected:a.getPreSelection(),s=a.props.selected?i:Ok(o,{hour:za(i),minute:Ua(i)});a.setState({preSelection:s}),a.props.onChange(s),a.props.shouldCloseOnSelect&&(a.sendFocusBackToInput(),a.setOpen(!1)),a.props.showTimeInput&&a.setOpen(!0),(a.props.showTimeSelectOnly||a.props.showTimeSelect)&&a.setState({isRenderAriaLiveMessage:!0}),a.setState({inputValue:null})}),O(k(a),"onInputClick",function(){a.props.disabled||a.props.readOnly||a.setOpen(!0),a.props.onInputClick()}),O(k(a),"onInputKeyDown",function(i){a.props.onKeyDown(i);var o=i.key;if(a.state.open||a.props.inline||a.props.preventOpenOnFocus){if(a.state.open){if(o==="ArrowDown"||o==="ArrowUp"){i.preventDefault();var s=a.calendar.componentNode&&a.calendar.componentNode.querySelector('.react-datepicker__day[tabindex="0"]');return void(s&&s.focus({preventScroll:!0}))}var l=_t(a.state.preSelection);o==="Enter"?(i.preventDefault(),a.inputOk()&&a.state.lastPreSelectChange===fb?(a.handleSelect(l,i),!a.props.shouldCloseOnSelect&&a.setPreSelection(l)):a.setOpen(!1)):o==="Escape"?(i.preventDefault(),a.sendFocusBackToInput(),a.setOpen(!1)):o==="Tab"&&a.setOpen(!1),a.inputOk()||a.props.onInputError({code:1,msg:db})}}else o!=="ArrowDown"&&o!=="ArrowUp"&&o!=="Enter"||a.onInputClick()}),O(k(a),"onPortalKeyDown",function(i){i.key==="Escape"&&(i.preventDefault(),a.setState({preventFocus:!0},function(){a.setOpen(!1),setTimeout(function(){a.setFocus(),a.setState({preventFocus:!1})})}))}),O(k(a),"onDayKeyDown",function(i){a.props.onKeyDown(i);var o=i.key,s=_t(a.state.preSelection);if(o==="Enter")i.preventDefault(),a.handleSelect(s,i),!a.props.shouldCloseOnSelect&&a.setPreSelection(s);else if(o==="Escape")i.preventDefault(),a.setOpen(!1),a.inputOk()||a.props.onInputError({code:1,msg:db});else if(!a.props.disabledKeyboardNavigation){var l;switch(o){case"ArrowLeft":l=jae(s,1);break;case"ArrowRight":l=pf(s,1);break;case"ArrowUp":l=Uae(s,1);break;case"ArrowDown":l=Ox(s,1);break;case"PageUp":l=Vd(s,1);break;case"PageDown":l=ti(s,1);break;case"Home":l=cp(s,1);break;case"End":l=Bd(s,1)}if(!l)return void(a.props.onInputError&&a.props.onInputError({code:1,msg:db}));if(i.preventDefault(),a.setState({lastPreSelectChange:fb}),a.props.adjustDateOnChange&&a.setSelected(l),a.setPreSelection(l),a.props.inline){var u=Qn(s),c=Qn(l),d=We(s),f=We(l);u!==c||d!==f?a.setState({shouldFocusDayInline:!0}):a.setState({shouldFocusDayInline:!1})}}}),O(k(a),"onPopperKeyDown",function(i){i.key==="Escape"&&(i.preventDefault(),a.sendFocusBackToInput())}),O(k(a),"onClearClick",function(i){i&&i.preventDefault&&i.preventDefault(),a.sendFocusBackToInput(),a.props.selectsRange?a.props.onChange([null,null],i):a.props.onChange(null,i),a.setState({inputValue:null})}),O(k(a),"clear",function(){a.onClearClick()}),O(k(a),"onScroll",function(i){typeof a.props.closeOnScroll=="boolean"&&a.props.closeOnScroll?i.target!==document&&i.target!==document.documentElement&&i.target!==document.body||a.setOpen(!1):typeof a.props.closeOnScroll=="function"&&a.props.closeOnScroll(i)&&a.setOpen(!1)}),O(k(a),"renderCalendar",function(){return a.props.inline||a.isCalendarOpen()?m.createElement(Xoe,{ref:function(i){a.calendar=i},locale:a.props.locale,calendarStartDay:a.props.calendarStartDay,chooseDayAriaLabelPrefix:a.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:a.props.disabledDayAriaLabelPrefix,weekAriaLabelPrefix:a.props.weekAriaLabelPrefix,monthAriaLabelPrefix:a.props.monthAriaLabelPrefix,adjustDateOnChange:a.props.adjustDateOnChange,setOpen:a.setOpen,shouldCloseOnSelect:a.props.shouldCloseOnSelect,dateFormat:a.props.dateFormatCalendar,useWeekdaysShort:a.props.useWeekdaysShort,formatWeekDay:a.props.formatWeekDay,dropdownMode:a.props.dropdownMode,selected:a.props.selected,preSelection:a.state.preSelection,onSelect:a.handleSelect,onWeekSelect:a.props.onWeekSelect,openToDate:a.props.openToDate,minDate:a.props.minDate,maxDate:a.props.maxDate,selectsStart:a.props.selectsStart,selectsEnd:a.props.selectsEnd,selectsRange:a.props.selectsRange,startDate:a.props.startDate,endDate:a.props.endDate,excludeDates:a.props.excludeDates,excludeDateIntervals:a.props.excludeDateIntervals,filterDate:a.props.filterDate,onClickOutside:a.handleCalendarClickOutside,formatWeekNumber:a.props.formatWeekNumber,highlightDates:a.state.highlightDates,holidays:a.state.holidays,includeDates:a.props.includeDates,includeDateIntervals:a.props.includeDateIntervals,includeTimes:a.props.includeTimes,injectTimes:a.props.injectTimes,inline:a.props.inline,shouldFocusDayInline:a.state.shouldFocusDayInline,peekNextMonth:a.props.peekNextMonth,showMonthDropdown:a.props.showMonthDropdown,showPreviousMonths:a.props.showPreviousMonths,useShortMonthInDropdown:a.props.useShortMonthInDropdown,showMonthYearDropdown:a.props.showMonthYearDropdown,showWeekNumbers:a.props.showWeekNumbers,showYearDropdown:a.props.showYearDropdown,withPortal:a.props.withPortal,forceShowMonthNavigation:a.props.forceShowMonthNavigation,showDisabledMonthNavigation:a.props.showDisabledMonthNavigation,scrollableYearDropdown:a.props.scrollableYearDropdown,scrollableMonthYearDropdown:a.props.scrollableMonthYearDropdown,todayButton:a.props.todayButton,weekLabel:a.props.weekLabel,outsideClickIgnoreClass:Hk,fixedHeight:a.props.fixedHeight,monthsShown:a.props.monthsShown,monthSelectedIn:a.state.monthSelectedIn,onDropdownFocus:a.handleDropdownFocus,onMonthChange:a.props.onMonthChange,onYearChange:a.props.onYearChange,dayClassName:a.props.dayClassName,weekDayClassName:a.props.weekDayClassName,monthClassName:a.props.monthClassName,timeClassName:a.props.timeClassName,showDateSelect:a.props.showDateSelect,showTimeSelect:a.props.showTimeSelect,showTimeSelectOnly:a.props.showTimeSelectOnly,onTimeChange:a.handleTimeChange,timeFormat:a.props.timeFormat,timeIntervals:a.props.timeIntervals,minTime:a.props.minTime,maxTime:a.props.maxTime,excludeTimes:a.props.excludeTimes,filterTime:a.props.filterTime,timeCaption:a.props.timeCaption,className:a.props.calendarClassName,container:a.props.calendarContainer,yearItemNumber:a.props.yearItemNumber,yearDropdownItemNumber:a.props.yearDropdownItemNumber,previousMonthAriaLabel:a.props.previousMonthAriaLabel,previousMonthButtonLabel:a.props.previousMonthButtonLabel,nextMonthAriaLabel:a.props.nextMonthAriaLabel,nextMonthButtonLabel:a.props.nextMonthButtonLabel,previousYearAriaLabel:a.props.previousYearAriaLabel,previousYearButtonLabel:a.props.previousYearButtonLabel,nextYearAriaLabel:a.props.nextYearAriaLabel,nextYearButtonLabel:a.props.nextYearButtonLabel,timeInputLabel:a.props.timeInputLabel,disabledKeyboardNavigation:a.props.disabledKeyboardNavigation,renderCustomHeader:a.props.renderCustomHeader,popperProps:a.props.popperProps,renderDayContents:a.props.renderDayContents,renderMonthContent:a.props.renderMonthContent,renderQuarterContent:a.props.renderQuarterContent,renderYearContent:a.props.renderYearContent,onDayMouseEnter:a.props.onDayMouseEnter,onMonthMouseLeave:a.props.onMonthMouseLeave,onYearMouseEnter:a.props.onYearMouseEnter,onYearMouseLeave:a.props.onYearMouseLeave,selectsDisabledDaysInRange:a.props.selectsDisabledDaysInRange,showTimeInput:a.props.showTimeInput,showMonthYearPicker:a.props.showMonthYearPicker,showFullMonthYearPicker:a.props.showFullMonthYearPicker,showTwoColumnMonthYearPicker:a.props.showTwoColumnMonthYearPicker,showFourColumnMonthYearPicker:a.props.showFourColumnMonthYearPicker,showYearPicker:a.props.showYearPicker,showQuarterYearPicker:a.props.showQuarterYearPicker,showPopperArrow:a.props.showPopperArrow,excludeScrollbar:a.props.excludeScrollbar,handleOnKeyDown:a.props.onKeyDown,handleOnDayKeyDown:a.onDayKeyDown,isInputFocused:a.state.focused,customTimeInput:a.props.customTimeInput,setPreSelection:a.setPreSelection},a.props.children):null}),O(k(a),"renderAriaLiveRegion",function(){var i,o=a.props,s=o.dateFormat,l=o.locale,u=a.props.showTimeInput||a.props.showTimeSelect?"PPPPp":"PPPP";return i=a.props.selectsRange?"Selected start date: ".concat(li(a.props.startDate,{dateFormat:u,locale:l}),". ").concat(a.props.endDate?"End date: "+li(a.props.endDate,{dateFormat:u,locale:l}):""):a.props.showTimeSelectOnly?"Selected time: ".concat(li(a.props.selected,{dateFormat:s,locale:l})):a.props.showYearPicker?"Selected year: ".concat(li(a.props.selected,{dateFormat:"yyyy",locale:l})):a.props.showMonthYearPicker?"Selected month: ".concat(li(a.props.selected,{dateFormat:"MMMM yyyy",locale:l})):a.props.showQuarterYearPicker?"Selected quarter: ".concat(li(a.props.selected,{dateFormat:"yyyy, QQQ",locale:l})):"Selected date: ".concat(li(a.props.selected,{dateFormat:u,locale:l})),m.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},i)}),O(k(a),"renderDateInput",function(){var i,o=cr(a.props.className,O({},Hk,a.state.open)),s=a.props.customInput||m.createElement("input",{type:"text"}),l=a.props.customInputRef||"ref",u=typeof a.props.value=="string"?a.props.value:typeof a.state.inputValue=="string"?a.state.inputValue:a.props.selectsRange?function(c,d,f){if(!c)return"";var h=li(c,f),p=d?li(d,f):"";return"".concat(h," - ").concat(p)}(a.props.startDate,a.props.endDate,a.props):li(a.props.selected,a.props);return m.cloneElement(s,(O(i={},l,function(c){a.input=c}),O(i,"value",u),O(i,"onBlur",a.handleBlur),O(i,"onChange",a.handleChange),O(i,"onClick",a.onInputClick),O(i,"onFocus",a.handleFocus),O(i,"onKeyDown",a.onInputKeyDown),O(i,"id",a.props.id),O(i,"name",a.props.name),O(i,"form",a.props.form),O(i,"autoFocus",a.props.autoFocus),O(i,"placeholder",a.props.placeholderText),O(i,"disabled",a.props.disabled),O(i,"autoComplete",a.props.autoComplete),O(i,"className",cr(s.props.className,o)),O(i,"title",a.props.title),O(i,"readOnly",a.props.readOnly),O(i,"required",a.props.required),O(i,"tabIndex",a.props.tabIndex),O(i,"aria-describedby",a.props.ariaDescribedBy),O(i,"aria-invalid",a.props.ariaInvalid),O(i,"aria-labelledby",a.props.ariaLabelledBy),O(i,"aria-required",a.props.ariaRequired),i))}),O(k(a),"renderClearButton",function(){var i=a.props,o=i.isClearable,s=i.selected,l=i.startDate,u=i.endDate,c=i.clearButtonTitle,d=i.clearButtonClassName,f=d===void 0?"":d,h=i.ariaLabelClose,p=h===void 0?"Close":h;return!o||s==null&&l==null&&u==null?null:m.createElement("button",{type:"button",className:"react-datepicker__close-icon ".concat(f).trim(),"aria-label":p,onClick:a.onClearClick,title:c,tabIndex:-1})}),a.state=a.calcInitialState(),a.preventFocusTimeout=null,a}return In(n,[{key:"componentDidMount",value:function(){window.addEventListener("scroll",this.onScroll,!0)}},{key:"componentDidUpdate",value:function(r,a){var i,o;r.inline&&(i=r.selected,o=this.props.selected,i&&o?Qn(i)!==Qn(o)||We(i)!==We(o):i!==o)&&this.setPreSelection(this.props.selected),this.state.monthSelectedIn!==void 0&&r.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),r.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:Fk(this.props.highlightDates)}),a.focused||wl(r.selected,this.props.selected)||this.setState({inputValue:null}),a.open!==this.state.open&&(a.open===!1&&this.state.open===!0&&this.props.onCalendarOpen(),a.open===!0&&this.state.open===!1&&this.props.onCalendarClose())}},{key:"componentWillUnmount",value:function(){this.clearPreventFocusTimeout(),window.removeEventListener("scroll",this.onScroll,!0)}},{key:"renderInputContainer",value:function(){var r=this.props,a=r.showIcon,i=r.icon,o=r.calendarIconClassname;return m.createElement("div",{className:"react-datepicker__input-container".concat(a?" react-datepicker__view-calendar-icon":"")},a&&m.createElement(Koe,{icon:i,className:o}),this.state.isRenderAriaLiveMessage&&this.renderAriaLiveRegion(),this.renderDateInput(),this.renderClearButton())}},{key:"render",value:function(){var r=this.renderCalendar();if(this.props.inline)return r;if(this.props.withPortal){var a=this.state.open?m.createElement(HF,{enableTabLoop:this.props.enableTabLoop},m.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},r)):null;return this.state.open&&this.props.portalId&&(a=m.createElement(zF,{portalId:this.props.portalId,portalHost:this.props.portalHost},a)),m.createElement("div",null,this.renderInputContainer(),a)}return m.createElement(Qoe,{className:this.props.popperClassName,wrapperClassName:this.props.wrapperClassName,hidePopper:!this.isCalendarOpen(),portalId:this.props.portalId,portalHost:this.props.portalHost,popperModifiers:this.props.popperModifiers,targetComponent:this.renderInputContainer(),popperContainer:this.props.popperContainer,popperComponent:r,popperPlacement:this.props.popperPlacement,popperProps:this.props.popperProps,popperOnKeyDown:this.onPopperKeyDown,enableTabLoop:this.props.enableTabLoop})}}],[{key:"defaultProps",get:function(){return{allowSameDay:!1,dateFormat:"MM/dd/yyyy",dateFormatCalendar:"LLLL yyyy",onChange:function(){},disabled:!1,disabledKeyboardNavigation:!1,dropdownMode:"scroll",onFocus:function(){},onBlur:function(){},onKeyDown:function(){},onInputClick:function(){},onSelect:function(){},onClickOutside:function(){},onMonthChange:function(){},onCalendarOpen:function(){},onCalendarClose:function(){},preventOpenOnFocus:!1,onYearChange:function(){},onInputError:function(){},monthsShown:1,readOnly:!1,withPortal:!1,selectsDisabledDaysInRange:!1,shouldCloseOnSelect:!0,showTimeSelect:!1,showTimeInput:!1,showPreviousMonths:!1,showMonthYearPicker:!1,showFullMonthYearPicker:!1,showTwoColumnMonthYearPicker:!1,showFourColumnMonthYearPicker:!1,showYearPicker:!1,showQuarterYearPicker:!1,strictParsing:!1,timeIntervals:30,timeCaption:"Time",previousMonthAriaLabel:"Previous Month",previousMonthButtonLabel:"Previous Month",nextMonthAriaLabel:"Next Month",nextMonthButtonLabel:"Next Month",previousYearAriaLabel:"Previous Year",previousYearButtonLabel:"Previous Year",nextYearAriaLabel:"Next Year",nextYearButtonLabel:"Next Year",timeInputLabel:"Time",enableTabLoop:!0,yearItemNumber:Eh,focusSelectedMonth:!1,showPopperArrow:!0,excludeScrollbar:!0,customTimeInput:null,calendarStartDay:void 0}}}]),n}(),Joe="input",fb="navigate";function ese(e){const[t,n,r]=g0(e.name);return S.jsxs(t0.Field,{error:n.touched&&!!n.error,children:[S.jsx(Zoe,{...t,...e,selected:t.value&&new Date(t.value)||null,onChange:a=>r.setValue(a)}),n.touched&&n.error?S.jsx(Xn,{basic:!0,color:"red",children:n.error}):null]})}const Bk=St(function(){const{activityStore:t}=Jt(),{createActivity:n,updateActivity:r,loading:a,loadActivity:i,loadingInitial:o}=t,{id:s}=sE(),l=oE(),[u,c]=x.useState(new mT),d=Yp({title:$r().required("The Activity Title is Required"),description:$r().required("The Activity Description is Required"),category:$r().required("The Activity Category is Required"),venue:$r().required("The Activity Venue is Required"),city:$r().required("The Activity City is Required"),date:$r().required("The Activity Date is Required").nullable()});x.useEffect(()=>{s&&i(s).then(h=>c(new mT(h)))},[s,i]);const f=h=>{if(h.id)r(h).then(()=>l(`/activities/${h.id}`));else{const p={...h,id:Ore()};n(p).then(()=>l(`/activities/${p.id}`))}};return o?S.jsx(rx,{content:"Loading Activity..;."}):S.jsxs(ut,{clearing:!0,children:[S.jsx(Ft,{content:"Activity Details",sub:!0,color:"teal"}),S.jsx(Wp,{validationSchema:d,enableReinitialize:!0,initialValues:u,onSubmit:h=>f(h),children:({handleSubmit:h,isValid:p,isSubmitting:v,dirty:y})=>S.jsxs(sf,{className:"ui form",onSubmit:h,autoComplete:"off",children:[S.jsx(gi,{name:"title",placeholder:"Title"}),S.jsx(dF,{rows:3,placeholder:"Description",name:"description"}),S.jsx(kre,{options:Pre,placeholder:"Category",name:"category"}),S.jsx(ese,{placeholderText:"Date",name:"date",showTimeSelect:!0,timeCaption:"time",dateFormat:"MMMM d, yyyy h:mm aa"}),S.jsx(Ft,{content:"Location Details",sub:!0,color:"teal"}),S.jsx(gi,{placeholder:"City",name:"city"}),S.jsx(gi,{placeholder:"Venue",name:"venue"}),S.jsx(Ye,{loading:a,floated:"right",positive:!0,type:"submit",content:"Submit",disabled:v||!y||!p}),S.jsx(Ye,{as:ur,to:"/activities",floated:"right",type:"button",content:"Cancel"})]})})]})}),tse={filter:"brightness(30%)"},nse={position:"absolute",bottom:"5%",left:"5%",width:"100%",height:"auto",color:"white"},rse=St(function({activity:t}){var i,o;const{activityStore:{updateAttendence:n,loading:r,cancelActivityToggle:a}}=Jt();return S.jsxs(ut.Group,{children:[S.jsxs(ut,{basic:!0,attached:"top",style:{padding:"0"},children:[t.isCancelled&&S.jsx(Xn,{style:{position:"absolute",zIndex:1e3,left:-14,top:20},ribbon:!0,color:"red",content:"Cancel"}),S.jsx(hr,{src:`/assets/categoryImages/${t.category}.jpg`,fluid:!0,style:tse}),S.jsx(ut,{style:nse,basic:!0,children:S.jsx(vn.Group,{children:S.jsx(vn,{children:S.jsxs(vn.Content,{children:[S.jsx(Ft,{size:"huge",content:t.title,style:{color:"white"}}),t.date&&S.jsx("p",{children:Ae.fromISO(new Date(t.date).toISOString()).toLocaleString(Ae.DATE_HUGE)}),S.jsxs("p",{children:["Hosted by"," ",S.jsx("strong",{children:S.jsx(ur,{to:`/profiles/${(i=t.host)==null?void 0:i.username}`,children:(o=t.host)==null?void 0:o.displayName})})]})]})})})})]}),S.jsx(ut,{clearing:!0,attached:"bottom",children:t.isHost?S.jsxs(S.Fragment,{children:[S.jsx(Ye,{color:t.isCancelled?"green":"red",floated:"left",basic:!0,content:t.isCancelled?"Reactivate Activity":"Cancel Activity",onClick:a}),S.jsx(Ye,{as:ur,disabled:t.isCancelled,to:`/manage/${t.id}`,color:"orange",floated:"right",children:"Manage Event"})]}):t.isGoing?S.jsx(Ye,{loading:r,onClick:n,children:"Cancel attendance"}):S.jsx(Ye,{disabled:t.isCancelled,loading:r,color:"teal",onClick:n,children:"Join Activity"})})]})}),ase=St(function({activity:t}){return S.jsxs(ut.Group,{children:[S.jsx(ut,{attached:"top",children:S.jsxs(He,{children:[S.jsx(He.Column,{width:1,children:S.jsx(rn,{size:"large",color:"teal",name:"info"})}),S.jsx(He.Column,{width:15,children:S.jsx("p",{children:t.description})})]})}),S.jsx(ut,{attached:!0,children:S.jsxs(He,{verticalAlign:"middle",children:[S.jsx(He.Column,{width:1,children:S.jsx(rn,{name:"calendar",size:"large",color:"teal"})}),S.jsx(He.Column,{width:15,children:S.jsx("span",{children:Ae.fromISO(new Date(t.date).toISOString()).toLocaleString(Ae.DATE_HUGE)})})]})}),S.jsx(ut,{attached:!0,children:S.jsxs(He,{verticalAlign:"middle",children:[S.jsx(He.Column,{width:1,children:S.jsx(rn,{name:"marker",size:"large",color:"teal"})}),S.jsx(He.Column,{width:11,children:S.jsxs("span",{children:[t.venue,", ",t.city]})})]})})]})});function Pv(e,t){ce(2,arguments);var n=fe(e),r=fe(t),a=n.getTime()-r.getTime();return a<0?-1:a>0?1:a}function ise(e,t){return ce(2,arguments),fe(e).getTime()-fe(t).getTime()}var Vk={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},ose="trunc";function sse(e){return e?Vk[e]:Vk[ose]}function lse(e){ce(1,arguments);var t=fe(e);return Fg(t).getTime()===xF(t).getTime()}function use(e,t){ce(2,arguments);var n=fe(e),r=fe(t),a=Pv(n,r),i=Math.abs(dp(n,r)),o;if(i<1)o=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-a*i);var s=Pv(n,r)===-a;lse(fe(e))&&i===1&&Pv(e,r)===1&&(s=!1),o=a*(i-Number(s))}return o===0?0:o}function cse(e,t,n){ce(2,arguments);var r=ise(e,t)/1e3;return sse(n==null?void 0:n.roundingMethod)(r)}function dse(e){return kx({},e)}var Wk=1440,fse=2520,hb=43200,hse=86400;function pse(e,t,n){var r,a;ce(2,arguments);var i=Xs(),o=(r=(a=n==null?void 0:n.locale)!==null&&a!==void 0?a:i.locale)!==null&&r!==void 0?r:Dx;if(!o.formatDistance)throw new RangeError("locale must contain formatDistance property");var s=Pv(e,t);if(isNaN(s))throw new RangeError("Invalid time value");var l=kx(dse(n),{addSuffix:!!(n!=null&&n.addSuffix),comparison:s}),u,c;s>0?(u=fe(t),c=fe(e)):(u=fe(e),c=fe(t));var d=cse(c,u),f=(Hd(c)-Hd(u))/1e3,h=Math.round((d-f)/60),p;if(h<2)return n!=null&&n.includeSeconds?d<5?o.formatDistance("lessThanXSeconds",5,l):d<10?o.formatDistance("lessThanXSeconds",10,l):d<20?o.formatDistance("lessThanXSeconds",20,l):d<40?o.formatDistance("halfAMinute",0,l):d<60?o.formatDistance("lessThanXMinutes",1,l):o.formatDistance("xMinutes",1,l):h===0?o.formatDistance("lessThanXMinutes",1,l):o.formatDistance("xMinutes",h,l);if(h<45)return o.formatDistance("xMinutes",h,l);if(h<90)return o.formatDistance("aboutXHours",1,l);if(h(t&&n.createHubConnection(t),()=>{n.clearComments()}),[n,t]),S.jsxs(S.Fragment,{children:[S.jsx(ut,{textAlign:"center",attached:"top",inverted:!0,color:"teal",style:{border:"none"},children:S.jsx(Ft,{children:"Chat about this event"})}),S.jsxs(ut,{attached:!0,clearing:!0,children:[S.jsx(Wp,{onSubmit:(r,{resetForm:a})=>n.addComment(r).then(()=>a()),validationSchema:Yp({body:$r().required()}),initialValues:{body:""},children:({isSubmitting:r,isValid:a,handleSubmit:i})=>S.jsx(sf,{className:"ui form",children:S.jsx(rZ,{name:"body",children:o=>S.jsxs("div",{style:{position:"relative"},children:[S.jsx(IE,{active:r}),S.jsx("textarea",{placeholder:"Enter your comments (Enter to submit Shift+Enter for a new line)",rows:2,...o.field,onKeyDown:s=>{s.key==="Enter"&&s.shiftKey||s.key==="Enter"&&!s.shiftKey&&(s.preventDefault(),a&&i())}})]})})})}),S.jsx(Js.Group,{children:n.comments.map(r=>S.jsxs(Js,{children:[S.jsx(Js.Avatar,{src:r.image||"/assets/user.png"}),S.jsxs(Js.Content,{children:[S.jsx(Js.Author,{as:ur,to:`/profiles/${r.image}`,children:r.displayName}),S.jsx(Js.Metadata,{children:S.jsxs("div",{children:[mse(r.createdAt)," ago"]})}),S.jsx(Js.Text,{style:{whiteSpace:"pre-wrap"},children:r.body})]})]},r.id))})]})]})}),gse=St(function({activity:t}){return t.attendees?S.jsxs(S.Fragment,{children:[S.jsxs(ut,{textAlign:"center",style:{border:"none"},attached:"top",secondary:!0,inverted:!0,color:"teal",children:[t.attendees.length," ",t.attendees.length===1?"Person":"People"," Going"]}),S.jsx(ut,{attached:!0,children:S.jsx(Y1,{relaxed:!0,divided:!0,children:t.attendees.map(n=>S.jsxs(vn,{style:{position:"relative"},children:[(n==null?void 0:n.username)===t.hostUsername&&S.jsx(Xn,{style:{position:"absolute"},color:"orange",ribbon:"right",children:"Host"}),S.jsx(hr,{size:"tiny",src:n.image||"/assets/user.png"}),S.jsxs(vn.Content,{verticalAlign:"middle",children:[S.jsx(vn.Header,{as:"h3",children:S.jsx(ur,{to:`/profiles/${n.username}`,children:n.displayName})}),n.following&&S.jsx(vn.Extra,{style:{color:"orange"},children:"Following"})]})]},n.username))})})]}):null}),yse=St(function(){const{activityStore:t}=Jt(),{selectedActivity:n,loadActivity:r,loadingInitial:a,clearSelectedActivity:i}=t,{id:o}=sE();if(x.useEffect(()=>(o&&r(o),()=>i()),[o,r,i]),!(a||!n))return S.jsxs(He,{children:[S.jsxs(He.Column,{width:10,children:[S.jsx(rse,{activity:n}),S.jsx(ase,{activity:n}),S.jsx(vse,{activityId:n.id})]}),S.jsx(He.Column,{width:6,children:S.jsx(gse,{activity:n})})]})});function wse(){const[e,t]=x.useState(null);function n(){ar.get("/buggy/not-found").catch(l=>console.log(l.response))}function r(){ar.get("/buggy/bad-request").catch(l=>console.log(l.response))}function a(){ar.get("/buggy/server-error").catch(l=>console.log(l.response))}function i(){ar.get("/buggy/unauthorised").catch(l=>console.log(l.response))}function o(){ar.get("/activities/notaguid").catch(l=>console.log(l.response))}function s(){ar.post("/activities",{}).catch(l=>t(l))}return S.jsxs(S.Fragment,{children:[S.jsx(Ft,{as:"h1",content:"Test Error component"}),S.jsx(ut,{children:S.jsxs(Ye.Group,{widths:"7",children:[S.jsx(Ye,{onClick:n,content:"Not Found",basic:!0,primary:!0}),S.jsx(Ye,{onClick:r,content:"Bad Request",basic:!0,primary:!0}),S.jsx(Ye,{onClick:s,content:"Validation Error",basic:!0,primary:!0}),S.jsx(Ye,{onClick:a,content:"Server Error",basic:!0,primary:!0}),S.jsx(Ye,{onClick:i,content:"Unauthorised",basic:!0,primary:!0}),S.jsx(Ye,{onClick:o,content:"Bad Guid",basic:!0,primary:!0})]})}),e&&S.jsx(x$,{errors:e})]})}function bse(){return S.jsxs(ut,{placeholder:!0,children:[S.jsxs(Ft,{icon:!0,children:[S.jsx(rn,{name:"search"}),"Opps - we've looked everwhere but could not find what you are looking for!"]}),S.jsx(ut.Inline,{children:S.jsx(Ye,{as:ur,to:"/activities",children:"Return to Activities Page"})})]})}const _se=St(function(){var n,r;const{commonStore:t}=Jt();return S.jsxs(n0,{children:[S.jsx(Ft,{as:"h1",content:"Server Error"}),S.jsx(Ft,{sub:!0,as:"h5",color:"red",content:(n=t.error)==null?void 0:n.message}),((r=t.error)==null?void 0:r.details)&&S.jsxs(ut,{children:[S.jsx(Ft,{as:"h4",content:"Stack trace",color:"teal"}),S.jsx("code",{style:{marginTop:"10px"},children:t.error.details})]})]})}),Sse=St(function({profile:t}){return S.jsx(ut,{children:S.jsxs(He,{children:[S.jsx(He.Column,{width:12,children:S.jsx(vn.Group,{children:S.jsxs(vn,{children:[S.jsx(vn.Image,{avatar:!0,size:"small",src:t.image||"/assets/user.png"}),S.jsx(vn.Content,{verticalAlign:"middle",children:S.jsx(Ft,{as:"h1",content:t.displayName})})]})})}),S.jsxs(He.Column,{width:4,children:[S.jsxs(Ev.Group,{widths:2,children:[S.jsx(Ev,{label:"Followers",value:t.followersCount}),S.jsx(Ev,{label:"Following",value:t.followingCount})]}),S.jsx(_G,{}),S.jsx(C$,{profile:t})]})]})})});function mf(e,t,n,r){function a(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function s(c){try{u(r.next(c))}catch(d){o(d)}}function l(c){try{u(r.throw(c))}catch(d){o(d)}}function u(c){c.done?i(c.value):a(c.value).then(s,l)}u((r=r.apply(e,t||[])).next())})}function vf(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,a,i,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(u){return function(c){return l([u,c])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(n=0)),n;)try{if(r=1,a&&(i=u[0]&2?a.return:u[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,u[1])).done)return i;switch(a=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,a=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i}function Gk(e,t,n){if(n||arguments.length===2)for(var r=0,a=t.length,i;r0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function xse(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),a=Ese.get(r);a&&Object.defineProperty(e,"type",{value:a,writable:!1,configurable:!1,enumerable:!0})}return e}var Cse=[".DS_Store","Thumbs.db"];function Tse(e){return mf(this,void 0,void 0,function(){return vf(this,function(t){return Vg(e)&&Dse(e.dataTransfer)?[2,Nse(e.dataTransfer,e.type)]:Ose(e)?[2,kse(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,Pse(e)]:[2,[]]})})}function Dse(e){return Vg(e)}function Ose(e){return Vg(e)&&Vg(e.target)}function Vg(e){return typeof e=="object"&&e!==null}function kse(e){return A_(e.target.files).map(function(t){return nm(t)})}function Pse(e){return mf(this,void 0,void 0,function(){var t;return vf(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return nm(r)})]}})})}function Nse(e,t){return mf(this,void 0,void 0,function(){var n,r;return vf(this,function(a){switch(a.label){case 0:return e.items?(n=A_(e.items).filter(function(i){return i.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(Ase))]):[3,2];case 1:return r=a.sent(),[2,Kk(BF(r))];case 2:return[2,Kk(A_(e.files).map(function(i){return nm(i)}))]}})})}function Kk(e){return e.filter(function(t){return Cse.indexOf(t.name)===-1})}function A_(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,Jk(n)];if(e.sizen)return[!1,Jk(n)]}return[!0,null]}function cl(e){return e!=null}function Kse(e){var t=e.files,n=e.accept,r=e.minSize,a=e.maxSize,i=e.multiple,o=e.maxFiles,s=e.validator;return!i&&t.length>1||i&&o>=1&&t.length>o?!1:t.every(function(l){var u=GF(l,n),c=mp(u,1),d=c[0],f=KF(l,r,a),h=mp(f,1),p=h[0],v=s?s(l):null;return d&&p&&!v})}function Wg(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Qm(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function tP(e){e.preventDefault()}function qse(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Qse(e){return e.indexOf("Edge/")!==-1}function Xse(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return qse(e)||Qse(e)}function ui(){for(var e=arguments.length,t=new Array(e),n=0;n1?a-1:0),o=1;oe.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ple(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i=0)&&(n[a]=e[a]);return n}var Lx=x.forwardRef(function(e,t){var n=e.children,r=Yg(e,rle),a=JF(r),i=a.open,o=Yg(a,ale);return x.useImperativeHandle(t,function(){return{open:i}},[i]),m.createElement(x.Fragment,null,n(Gt(Gt({},o),{},{open:i})))});Lx.displayName="Dropzone";var ZF={disabled:!1,getFilesFromEvent:Tse,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};Lx.defaultProps=ZF;Lx.propTypes={children:I.func,accept:I.objectOf(I.arrayOf(I.string)),multiple:I.bool,preventDropOnDocument:I.bool,noClick:I.bool,noKeyboard:I.bool,noDrag:I.bool,noDragEventsBubbling:I.bool,minSize:I.number,maxSize:I.number,maxFiles:I.number,disabled:I.bool,getFilesFromEvent:I.func,onFileDialogCancel:I.func,onFileDialogOpen:I.func,useFsAccessApi:I.bool,autoFocus:I.bool,onDragEnter:I.func,onDragLeave:I.func,onDragOver:I.func,onDrop:I.func,onDropAccepted:I.func,onDropRejected:I.func,onError:I.func,validator:I.func};var $_={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function JF(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Gt(Gt({},ZF),e),n=t.accept,r=t.disabled,a=t.getFilesFromEvent,i=t.maxSize,o=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,c=t.onDragLeave,d=t.onDragOver,f=t.onDrop,h=t.onDropAccepted,p=t.onDropRejected,v=t.onFileDialogCancel,y=t.onFileDialogOpen,g=t.useFsAccessApi,w=t.autoFocus,_=t.preventDropOnDocument,b=t.noClick,C=t.noKeyboard,E=t.noDrag,T=t.noDragEventsBubbling,P=t.onError,A=t.validator,M=x.useMemo(function(){return ele(n)},[n]),j=x.useMemo(function(){return Jse(n)},[n]),H=x.useMemo(function(){return typeof y=="function"?y:rP},[y]),q=x.useMemo(function(){return typeof v=="function"?v:rP},[v]),Q=x.useRef(null),X=x.useRef(null),Y=x.useReducer(mle,$_),oe=pb(Y,2),U=oe[0],z=oe[1],ae=U.isFocused,de=U.isFileDialogActive,Ee=x.useRef(typeof window<"u"&&window.isSecureContext&&g&&Zse()),De=function(){!Ee.current&&de&&setTimeout(function(){if(X.current){var K=X.current.files;K.length||(z({type:"closeDialog"}),q())}},300)};x.useEffect(function(){return window.addEventListener("focus",De,!1),function(){window.removeEventListener("focus",De,!1)}},[X,de,q,Ee]);var ee=x.useRef([]),me=function(K){Q.current&&Q.current.contains(K.target)||(K.preventDefault(),ee.current=[])};x.useEffect(function(){return _&&(document.addEventListener("dragover",tP,!1),document.addEventListener("drop",me,!1)),function(){_&&(document.removeEventListener("dragover",tP),document.removeEventListener("drop",me))}},[Q,_]),x.useEffect(function(){return!r&&w&&Q.current&&Q.current.focus(),function(){}},[Q,w,r]);var _e=x.useCallback(function(F){P?P(F):console.error(F)},[P]),Ce=x.useCallback(function(F){F.preventDefault(),F.persist(),Nt(F),ee.current=[].concat(sle(ee.current),[F.target]),Qm(F)&&Promise.resolve(a(F)).then(function(K){if(!(Wg(F)&&!T)){var ye=K.length,Oe=ye>0&&Kse({files:K,accept:M,minSize:o,maxSize:i,multiple:s,maxFiles:l,validator:A}),Fe=ye>0&&!Oe;z({isDragAccept:Oe,isDragReject:Fe,isDragActive:!0,type:"setDraggedFiles"}),u&&u(F)}}).catch(function(K){return _e(K)})},[a,u,_e,T,M,o,i,s,l,A]),Te=x.useCallback(function(F){F.preventDefault(),F.persist(),Nt(F);var K=Qm(F);if(K&&F.dataTransfer)try{F.dataTransfer.dropEffect="copy"}catch{}return K&&d&&d(F),!1},[d,T]),le=x.useCallback(function(F){F.preventDefault(),F.persist(),Nt(F);var K=ee.current.filter(function(Oe){return Q.current&&Q.current.contains(Oe)}),ye=K.indexOf(F.target);ye!==-1&&K.splice(ye,1),ee.current=K,!(K.length>0)&&(z({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Qm(F)&&c&&c(F))},[Q,c,T]),ke=x.useCallback(function(F,K){var ye=[],Oe=[];F.forEach(function(Fe){var fn=GF(Fe,M),er=pb(fn,2),mr=er[0],xa=er[1],Do=KF(Fe,o,i),R=pb(Do,2),L=R[0],Z=R[1],ve=A?A(Fe):null;if(mr&&L&&!ve)ye.push(Fe);else{var Pe=[xa,Z];ve&&(Pe=Pe.concat(ve)),Oe.push({file:Fe,errors:Pe.filter(function(Ne){return Ne})})}}),(!s&&ye.length>1||s&&l>=1&&ye.length>l)&&(ye.forEach(function(Fe){Oe.push({file:Fe,errors:[Gse]})}),ye.splice(0)),z({acceptedFiles:ye,fileRejections:Oe,type:"setFiles"}),f&&f(ye,Oe,K),Oe.length>0&&p&&p(Oe,K),ye.length>0&&h&&h(ye,K)},[z,s,M,o,i,l,f,h,p,A]),Be=x.useCallback(function(F){F.preventDefault(),F.persist(),Nt(F),ee.current=[],Qm(F)&&Promise.resolve(a(F)).then(function(K){Wg(F)&&!T||ke(K,F)}).catch(function(K){return _e(K)}),z({type:"reset"})},[a,ke,_e,T]),dt=x.useCallback(function(){if(Ee.current){z({type:"openDialog"}),H();var F={multiple:s,types:j};window.showOpenFilePicker(F).then(function(K){return a(K)}).then(function(K){ke(K,null),z({type:"closeDialog"})}).catch(function(K){tle(K)?(q(K),z({type:"closeDialog"})):nle(K)?(Ee.current=!1,X.current?(X.current.value=null,X.current.click()):_e(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):_e(K)});return}X.current&&(z({type:"openDialog"}),H(),X.current.value=null,X.current.click())},[z,H,q,g,ke,_e,j,s]),sn=x.useCallback(function(F){!Q.current||!Q.current.isEqualNode(F.target)||(F.key===" "||F.key==="Enter"||F.keyCode===32||F.keyCode===13)&&(F.preventDefault(),dt())},[Q,dt]),Ge=x.useCallback(function(){z({type:"focus"})},[]),Pt=x.useCallback(function(){z({type:"blur"})},[]),ht=x.useCallback(function(){b||(Xse()?setTimeout(dt,0):dt())},[b,dt]),jt=function(K){return r?null:K},en=function(K){return C?null:jt(K)},bn=function(K){return E?null:jt(K)},Nt=function(K){T&&K.stopPropagation()},pr=x.useMemo(function(){return function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},K=F.refKey,ye=K===void 0?"ref":K,Oe=F.role,Fe=F.onKeyDown,fn=F.onFocus,er=F.onBlur,mr=F.onClick,xa=F.onDragEnter,Do=F.onDragOver,R=F.onDragLeave,L=F.onDrop,Z=Yg(F,ile);return Gt(Gt(I_({onKeyDown:en(ui(Fe,sn)),onFocus:en(ui(fn,Ge)),onBlur:en(ui(er,Pt)),onClick:jt(ui(mr,ht)),onDragEnter:bn(ui(xa,Ce)),onDragOver:bn(ui(Do,Te)),onDragLeave:bn(ui(R,le)),onDrop:bn(ui(L,Be)),role:typeof Oe=="string"&&Oe!==""?Oe:"presentation"},ye,Q),!r&&!C?{tabIndex:0}:{}),Z)}},[Q,sn,Ge,Pt,ht,Ce,Te,le,Be,C,E,r]),$=x.useCallback(function(F){F.stopPropagation()},[]),he=x.useMemo(function(){return function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},K=F.refKey,ye=K===void 0?"ref":K,Oe=F.onChange,Fe=F.onClick,fn=Yg(F,ole),er=I_({accept:M,multiple:s,type:"file",style:{display:"none"},onChange:jt(ui(Oe,Be)),onClick:jt(ui(Fe,$)),tabIndex:-1},ye,X);return Gt(Gt({},er),fn)}},[X,n,s,Be,r]);return Gt(Gt({},U),{},{isFocused:ae&&!r,getRootProps:pr,getInputProps:he,rootRef:Q,inputRef:X,open:jt(dt)})}function mle(e,t){switch(t.type){case"focus":return Gt(Gt({},e),{},{isFocused:!0});case"blur":return Gt(Gt({},e),{},{isFocused:!1});case"openDialog":return Gt(Gt({},$_),{},{isFileDialogActive:!0});case"closeDialog":return Gt(Gt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Gt(Gt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Gt(Gt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Gt({},$_);default:return e}}function rP(){}function vle({setFiles:e}){const t={border:"dashed 3px #eee",borderColor:"#eee",borderRadius:"5px",paddingTop:"30px",textAlign:"center",height:200},n={borderColor:"green"},r=x.useCallback(s=>{e(s.map(l=>Object.assign(l,{preview:URL.createObjectURL(l)})))},[e]),{getRootProps:a,getInputProps:i,isDragActive:o}=JF({onDrop:r});return S.jsxs("div",{...a(),style:o?{...t,...n}:{...t},children:[S.jsx("input",{...i()}),S.jsx(rn,{name:"upload",size:"huge"}),S.jsx(Ft,{content:"Drop Photo Here"})]})}/*! + * Cropper.js v1.6.1 + * https://fengyuanchen.github.io/cropperjs + * + * Copyright 2015-present Chen Fengyuan + * Released under the MIT license + * + * Date: 2023-09-17T03:44:19.860Z + */function aP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ej(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n
',Rle=Number.isNaN||Ii.isNaN;function Ke(e){return typeof e=="number"&&!Rle(e)}var gP=function(t){return t>0&&t<1/0};function mb(e){return typeof e>"u"}function ou(e){return L_(e)==="object"&&e!==null}var Ile=Object.prototype.hasOwnProperty;function ic(e){if(!ou(e))return!1;try{var t=e.constructor,n=t.prototype;return t&&n&&Ile.call(n,"isPrototypeOf")}catch{return!1}}function gr(e){return typeof e=="function"}var $le=Array.prototype.slice;function cj(e){return Array.from?Array.from(e):$le.call(e)}function yn(e,t){return e&&gr(t)&&(Array.isArray(e)||Ke(e.length)?cj(e).forEach(function(n,r){t.call(e,n,r,e)}):ou(e)&&Object.keys(e).forEach(function(n){t.call(e,e[n],n,e)})),e}var Ht=Object.assign||function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a0&&r.forEach(function(i){ou(i)&&Object.keys(i).forEach(function(o){t[o]=i[o]})}),t},Lle=/\.\d*(?:0|9){12}\d*$/;function wc(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return Lle.test(e)?Math.round(e*t)/t:e}var Fle=/^width|height|left|top|marginLeft|marginTop$/;function Qo(e,t){var n=e.style;yn(t,function(r,a){Fle.test(a)&&Ke(r)&&(r="".concat(r,"px")),n[a]=r})}function jle(e,t){return e.classList?e.classList.contains(t):e.className.indexOf(t)>-1}function Tn(e,t){if(t){if(Ke(e.length)){yn(e,function(r){Tn(r,t)});return}if(e.classList){e.classList.add(t);return}var n=e.className.trim();n?n.indexOf(t)<0&&(e.className="".concat(n," ").concat(t)):e.className=t}}function Oi(e,t){if(t){if(Ke(e.length)){yn(e,function(n){Oi(n,t)});return}if(e.classList){e.classList.remove(t);return}e.className.indexOf(t)>=0&&(e.className=e.className.replace(t,""))}}function oc(e,t,n){if(t){if(Ke(e.length)){yn(e,function(r){oc(r,t,n)});return}n?Tn(e,t):Oi(e,t)}}var Ule=/([a-z\d])([A-Z])/g;function Hx(e){return e.replace(Ule,"$1-$2").toLowerCase()}function Y_(e,t){return ou(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(Hx(t)))}function gp(e,t,n){ou(n)?e[t]=n:e.dataset?e.dataset[t]=n:e.setAttribute("data-".concat(Hx(t)),n)}function zle(e,t){if(ou(e[t]))try{delete e[t]}catch{e[t]=void 0}else if(e.dataset)try{delete e.dataset[t]}catch{e.dataset[t]=void 0}else e.removeAttribute("data-".concat(Hx(t)))}var dj=/\s\s*/,fj=function(){var e=!1;if(z0){var t=!1,n=function(){},r=Object.defineProperty({},"once",{get:function(){return e=!0,t},set:function(i){t=i}});Ii.addEventListener("test",n,r),Ii.removeEventListener("test",n,r)}return e}();function Oa(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},a=n;t.trim().split(dj).forEach(function(i){if(!fj){var o=e.listeners;o&&o[i]&&o[i][n]&&(a=o[i][n],delete o[i][n],Object.keys(o[i]).length===0&&delete o[i],Object.keys(o).length===0&&delete e.listeners)}e.removeEventListener(i,a,r)})}function Zr(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},a=n;t.trim().split(dj).forEach(function(i){if(r.once&&!fj){var o=e.listeners,s=o===void 0?{}:o;a=function(){delete s[i][n],e.removeEventListener(i,a,r);for(var u=arguments.length,c=new Array(u),d=0;dMath.abs(n)&&(n=f)})}),n}function Zm(e,t){var n=e.pageX,r=e.pageY,a={endX:n,endY:r};return t?a:ej({startX:n,startY:r},a)}function Vle(e){var t=0,n=0,r=0;return yn(e,function(a){var i=a.startX,o=a.startY;t+=i,n+=o,r+=1}),t/=r,n/=r,{pageX:t,pageY:n}}function Xo(e){var t=e.aspectRatio,n=e.height,r=e.width,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",i=gP(r),o=gP(n);if(i&&o){var s=n*t;a==="contain"&&s>r||a==="cover"&&s90?{width:l,height:s}:{width:s,height:l}}function Yle(e,t,n,r){var a=t.aspectRatio,i=t.naturalWidth,o=t.naturalHeight,s=t.rotate,l=s===void 0?0:s,u=t.scaleX,c=u===void 0?1:u,d=t.scaleY,f=d===void 0?1:d,h=n.aspectRatio,p=n.naturalWidth,v=n.naturalHeight,y=r.fillColor,g=y===void 0?"transparent":y,w=r.imageSmoothingEnabled,_=w===void 0?!0:w,b=r.imageSmoothingQuality,C=b===void 0?"low":b,E=r.maxWidth,T=E===void 0?1/0:E,P=r.maxHeight,A=P===void 0?1/0:P,M=r.minWidth,j=M===void 0?0:M,H=r.minHeight,q=H===void 0?0:H,Q=document.createElement("canvas"),X=Q.getContext("2d"),Y=Xo({aspectRatio:h,width:T,height:A}),oe=Xo({aspectRatio:h,width:j,height:q},"cover"),U=Math.min(Y.width,Math.max(oe.width,p)),z=Math.min(Y.height,Math.max(oe.height,v)),ae=Xo({aspectRatio:a,width:T,height:A}),de=Xo({aspectRatio:a,width:j,height:q},"cover"),Ee=Math.min(ae.width,Math.max(de.width,i)),De=Math.min(ae.height,Math.max(de.height,o)),ee=[-Ee/2,-De/2,Ee,De];return Q.width=wc(U),Q.height=wc(z),X.fillStyle=g,X.fillRect(0,0,U,z),X.save(),X.translate(U/2,z/2),X.rotate(l*Math.PI/180),X.scale(c,f),X.imageSmoothingEnabled=_,X.imageSmoothingQuality=C,X.drawImage.apply(X,[e].concat(tj(ee.map(function(me){return Math.floor(wc(me))})))),X.restore(),Q}var pj=String.fromCharCode;function Gle(e,t,n){var r="";n+=t;for(var a=t;a0;)n.push(pj.apply(null,cj(a.subarray(0,r)))),a=a.subarray(r);return"data:".concat(t,";base64,").concat(btoa(n.join("")))}function Xle(e){var t=new DataView(e),n;try{var r,a,i;if(t.getUint8(0)===255&&t.getUint8(1)===216)for(var o=t.byteLength,s=2;s+1=8&&(i=u+d)}}}if(i){var f=t.getUint16(i,r),h,p;for(p=0;p=0?i:lj),height:Math.max(r.offsetHeight,o>=0?o:uj)};this.containerData=s,Qo(a,{width:s.width,height:s.height}),Tn(t,yr),Oi(a,yr)},initCanvas:function(){var t=this.containerData,n=this.imageData,r=this.options.viewMode,a=Math.abs(n.rotate)%180===90,i=a?n.naturalHeight:n.naturalWidth,o=a?n.naturalWidth:n.naturalHeight,s=i/o,l=t.width,u=t.height;t.height*s>t.width?r===3?l=t.height*s:u=t.width/s:r===3?u=t.width/s:l=t.height*s;var c={aspectRatio:s,naturalWidth:i,naturalHeight:o,width:l,height:u};this.canvasData=c,this.limited=r===1||r===2,this.limitCanvas(!0,!0),c.width=Math.min(Math.max(c.width,c.minWidth),c.maxWidth),c.height=Math.min(Math.max(c.height,c.minHeight),c.maxHeight),c.left=(t.width-c.width)/2,c.top=(t.height-c.height)/2,c.oldLeft=c.left,c.oldTop=c.top,this.initialCanvasData=Ht({},c)},limitCanvas:function(t,n){var r=this.options,a=this.containerData,i=this.canvasData,o=this.cropBoxData,s=r.viewMode,l=i.aspectRatio,u=this.cropped&&o;if(t){var c=Number(r.minCanvasWidth)||0,d=Number(r.minCanvasHeight)||0;s>1?(c=Math.max(c,a.width),d=Math.max(d,a.height),s===3&&(d*l>c?c=d*l:d=c/l)):s>0&&(c?c=Math.max(c,u?o.width:0):d?d=Math.max(d,u?o.height:0):u&&(c=o.width,d=o.height,d*l>c?c=d*l:d=c/l));var f=Xo({aspectRatio:l,width:c,height:d});c=f.width,d=f.height,i.minWidth=c,i.minHeight=d,i.maxWidth=1/0,i.maxHeight=1/0}if(n)if(s>(u?0:1)){var h=a.width-i.width,p=a.height-i.height;i.minLeft=Math.min(0,h),i.minTop=Math.min(0,p),i.maxLeft=Math.max(0,h),i.maxTop=Math.max(0,p),u&&this.limited&&(i.minLeft=Math.min(o.left,o.left+(o.width-i.width)),i.minTop=Math.min(o.top,o.top+(o.height-i.height)),i.maxLeft=o.left,i.maxTop=o.top,s===2&&(i.width>=a.width&&(i.minLeft=Math.min(0,h),i.maxLeft=Math.max(0,h)),i.height>=a.height&&(i.minTop=Math.min(0,p),i.maxTop=Math.max(0,p))))}else i.minLeft=-i.width,i.minTop=-i.height,i.maxLeft=a.width,i.maxTop=a.height},renderCanvas:function(t,n){var r=this.canvasData,a=this.imageData;if(n){var i=Wle({width:a.naturalWidth*Math.abs(a.scaleX||1),height:a.naturalHeight*Math.abs(a.scaleY||1),degree:a.rotate||0}),o=i.width,s=i.height,l=r.width*(o/r.naturalWidth),u=r.height*(s/r.naturalHeight);r.left-=(l-r.width)/2,r.top-=(u-r.height)/2,r.width=l,r.height=u,r.aspectRatio=o/s,r.naturalWidth=o,r.naturalHeight=s,this.limitCanvas(!0,!1)}(r.width>r.maxWidth||r.widthr.maxHeight||r.heightn.width?i.height=i.width/r:i.width=i.height*r),this.cropBoxData=i,this.limitCropBox(!0,!0),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),i.width=Math.max(i.minWidth,i.width*a),i.height=Math.max(i.minHeight,i.height*a),i.left=n.left+(n.width-i.width)/2,i.top=n.top+(n.height-i.height)/2,i.oldLeft=i.left,i.oldTop=i.top,this.initialCropBoxData=Ht({},i)},limitCropBox:function(t,n){var r=this.options,a=this.containerData,i=this.canvasData,o=this.cropBoxData,s=this.limited,l=r.aspectRatio;if(t){var u=Number(r.minCropBoxWidth)||0,c=Number(r.minCropBoxHeight)||0,d=s?Math.min(a.width,i.width,i.width+i.left,a.width-i.left):a.width,f=s?Math.min(a.height,i.height,i.height+i.top,a.height-i.top):a.height;u=Math.min(u,a.width),c=Math.min(c,a.height),l&&(u&&c?c*l>u?c=u/l:u=c*l:u?c=u/l:c&&(u=c*l),f*l>d?f=d/l:d=f*l),o.minWidth=Math.min(u,d),o.minHeight=Math.min(c,f),o.maxWidth=d,o.maxHeight=f}n&&(s?(o.minLeft=Math.max(0,i.left),o.minTop=Math.max(0,i.top),o.maxLeft=Math.min(a.width,i.left+i.width)-o.width,o.maxTop=Math.min(a.height,i.top+i.height)-o.height):(o.minLeft=0,o.minTop=0,o.maxLeft=a.width-o.width,o.maxTop=a.height-o.height))},renderCropBox:function(){var t=this.options,n=this.containerData,r=this.cropBoxData;(r.width>r.maxWidth||r.widthr.maxHeight||r.height=n.width&&r.height>=n.height?aj:Ux),Qo(this.cropBox,Ht({width:r.width,height:r.height},xh({translateX:r.left,translateY:r.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),bc(this.element,z_,this.getData())}},eue={initPreview:function(){var t=this.element,n=this.crossOrigin,r=this.options.preview,a=n?this.crossOriginUrl:this.url,i=t.alt||"The image to preview",o=document.createElement("img");if(n&&(o.crossOrigin=n),o.src=a,o.alt=i,this.viewBox.appendChild(o),this.viewBoxImage=o,!!r){var s=r;typeof r=="string"?s=t.ownerDocument.querySelectorAll(r):r.querySelector&&(s=[r]),this.previews=s,yn(s,function(l){var u=document.createElement("img");gp(l,Xm,{width:l.offsetWidth,height:l.offsetHeight,html:l.innerHTML}),n&&(u.crossOrigin=n),u.src=a,u.alt=i,u.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',l.innerHTML="",l.appendChild(u)})}},resetPreview:function(){yn(this.previews,function(t){var n=Y_(t,Xm);Qo(t,{width:n.width,height:n.height}),t.innerHTML=n.html,zle(t,Xm)})},preview:function(){var t=this.imageData,n=this.canvasData,r=this.cropBoxData,a=r.width,i=r.height,o=t.width,s=t.height,l=r.left-n.left-t.left,u=r.top-n.top-t.top;!this.cropped||this.disabled||(Qo(this.viewBoxImage,Ht({width:o,height:s},xh(Ht({translateX:-l,translateY:-u},t)))),yn(this.previews,function(c){var d=Y_(c,Xm),f=d.width,h=d.height,p=f,v=h,y=1;a&&(y=f/a,v=i*y),i&&v>h&&(y=h/i,p=a*y,v=h),Qo(c,{width:p,height:v}),Qo(c.getElementsByTagName("img")[0],Ht({width:o*y,height:s*y},xh(Ht({translateX:-l*y,translateY:-u*y},t))))}))}},tue={bind:function(){var t=this.element,n=this.options,r=this.cropper;gr(n.cropstart)&&Zr(t,V_,n.cropstart),gr(n.cropmove)&&Zr(t,B_,n.cropmove),gr(n.cropend)&&Zr(t,H_,n.cropend),gr(n.crop)&&Zr(t,z_,n.crop),gr(n.zoom)&&Zr(t,W_,n.zoom),Zr(r,uP,this.onCropStart=this.cropStart.bind(this)),n.zoomable&&n.zoomOnWheel&&Zr(r,pP,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),n.toggleDragModeOnDblclick&&Zr(r,lP,this.onDblclick=this.dblclick.bind(this)),Zr(t.ownerDocument,cP,this.onCropMove=this.cropMove.bind(this)),Zr(t.ownerDocument,dP,this.onCropEnd=this.cropEnd.bind(this)),n.responsive&&Zr(window,hP,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,n=this.options,r=this.cropper;gr(n.cropstart)&&Oa(t,V_,n.cropstart),gr(n.cropmove)&&Oa(t,B_,n.cropmove),gr(n.cropend)&&Oa(t,H_,n.cropend),gr(n.crop)&&Oa(t,z_,n.crop),gr(n.zoom)&&Oa(t,W_,n.zoom),Oa(r,uP,this.onCropStart),n.zoomable&&n.zoomOnWheel&&Oa(r,pP,this.onWheel,{passive:!1,capture:!0}),n.toggleDragModeOnDblclick&&Oa(r,lP,this.onDblclick),Oa(t.ownerDocument,cP,this.onCropMove),Oa(t.ownerDocument,dP,this.onCropEnd),n.responsive&&Oa(window,hP,this.onResize)}},nue={resize:function(){if(!this.disabled){var t=this.options,n=this.container,r=this.containerData,a=n.offsetWidth/r.width,i=n.offsetHeight/r.height,o=Math.abs(a-1)>Math.abs(i-1)?a:i;if(o!==1){var s,l;t.restore&&(s=this.getCanvasData(),l=this.getCropBoxData()),this.render(),t.restore&&(this.setCanvasData(yn(s,function(u,c){s[c]=u*o})),this.setCropBoxData(yn(l,function(u,c){l[c]=u*o})))}}},dblclick:function(){this.disabled||this.options.dragMode===sj||this.setDragMode(jle(this.dragBox,j_)?oj:zx)},wheel:function(t){var n=this,r=Number(this.options.wheelZoomRatio)||.1,a=1;this.disabled||(t.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){n.wheeling=!1},50),t.deltaY?a=t.deltaY>0?1:-1:t.wheelDelta?a=-t.wheelDelta/120:t.detail&&(a=t.detail>0?1:-1),this.zoom(-a*r,t)))},cropStart:function(t){var n=t.buttons,r=t.button;if(!(this.disabled||(t.type==="mousedown"||t.type==="pointerdown"&&t.pointerType==="mouse")&&(Ke(n)&&n!==1||Ke(r)&&r!==0||t.ctrlKey))){var a=this.options,i=this.pointers,o;t.changedTouches?yn(t.changedTouches,function(s){i[s.identifier]=Zm(s)}):i[t.pointerId||0]=Zm(t),Object.keys(i).length>1&&a.zoomable&&a.zoomOnTouch?o=ij:o=Y_(t.target,vp),kle.test(o)&&bc(this.element,V_,{originalEvent:t,action:o})!==!1&&(t.preventDefault(),this.action=o,this.cropping=!1,o===rj&&(this.cropping=!0,Tn(this.dragBox,Gg)))}},cropMove:function(t){var n=this.action;if(!(this.disabled||!n)){var r=this.pointers;t.preventDefault(),bc(this.element,B_,{originalEvent:t,action:n})!==!1&&(t.changedTouches?yn(t.changedTouches,function(a){Ht(r[a.identifier]||{},Zm(a,!0))}):Ht(r[t.pointerId||0]||{},Zm(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var n=this.action,r=this.pointers;t.changedTouches?yn(t.changedTouches,function(a){delete r[a.identifier]}):delete r[t.pointerId||0],n&&(t.preventDefault(),Object.keys(r).length||(this.action=""),this.cropping&&(this.cropping=!1,oc(this.dragBox,Gg,this.cropped&&this.options.modal)),bc(this.element,H_,{originalEvent:t,action:n}))}}},rue={change:function(t){var n=this.options,r=this.canvasData,a=this.containerData,i=this.cropBoxData,o=this.pointers,s=this.action,l=n.aspectRatio,u=i.left,c=i.top,d=i.width,f=i.height,h=u+d,p=c+f,v=0,y=0,g=a.width,w=a.height,_=!0,b;!l&&t.shiftKey&&(l=d&&f?d/f:1),this.limited&&(v=i.minLeft,y=i.minTop,g=v+Math.min(a.width,r.width,r.left+r.width),w=y+Math.min(a.height,r.height,r.top+r.height));var C=o[Object.keys(o)[0]],E={x:C.endX-C.startX,y:C.endY-C.startY},T=function(A){switch(A){case rl:h+E.x>g&&(E.x=g-h);break;case al:u+E.xw&&(E.y=w-p);break}};switch(s){case Ux:u+=E.x,c+=E.y;break;case rl:if(E.x>=0&&(h>=g||l&&(c<=y||p>=w))){_=!1;break}T(rl),d+=E.x,d<0&&(s=al,d=-d,u-=d),l&&(f=d/l,c+=(i.height-f)/2);break;case Io:if(E.y<=0&&(c<=y||l&&(u<=v||h>=g))){_=!1;break}T(Io),f-=E.y,c+=E.y,f<0&&(s=Mu,f=-f,c-=f),l&&(d=f*l,u+=(i.width-d)/2);break;case al:if(E.x<=0&&(u<=v||l&&(c<=y||p>=w))){_=!1;break}T(al),d-=E.x,u+=E.x,d<0&&(s=rl,d=-d,u-=d),l&&(f=d/l,c+=(i.height-f)/2);break;case Mu:if(E.y>=0&&(p>=w||l&&(u<=v||h>=g))){_=!1;break}T(Mu),f+=E.y,f<0&&(s=Io,f=-f,c-=f),l&&(d=f*l,u+=(i.width-d)/2);break;case zf:if(l){if(E.y<=0&&(c<=y||h>=g)){_=!1;break}T(Io),f-=E.y,c+=E.y,d=f*l}else T(Io),T(rl),E.x>=0?hy&&(f-=E.y,c+=E.y):(f-=E.y,c+=E.y);d<0&&f<0?(s=Vf,f=-f,d=-d,c-=f,u-=d):d<0?(s=Hf,d=-d,u-=d):f<0&&(s=Bf,f=-f,c-=f);break;case Hf:if(l){if(E.y<=0&&(c<=y||u<=v)){_=!1;break}T(Io),f-=E.y,c+=E.y,d=f*l,u+=i.width-d}else T(Io),T(al),E.x<=0?u>v?(d-=E.x,u+=E.x):E.y<=0&&c<=y&&(_=!1):(d-=E.x,u+=E.x),E.y<=0?c>y&&(f-=E.y,c+=E.y):(f-=E.y,c+=E.y);d<0&&f<0?(s=Bf,f=-f,d=-d,c-=f,u-=d):d<0?(s=zf,d=-d,u-=d):f<0&&(s=Vf,f=-f,c-=f);break;case Vf:if(l){if(E.x<=0&&(u<=v||p>=w)){_=!1;break}T(al),d-=E.x,u+=E.x,f=d/l}else T(Mu),T(al),E.x<=0?u>v?(d-=E.x,u+=E.x):E.y>=0&&p>=w&&(_=!1):(d-=E.x,u+=E.x),E.y>=0?p=0&&(h>=g||p>=w)){_=!1;break}T(rl),d+=E.x,f=d/l}else T(Mu),T(rl),E.x>=0?h=0&&p>=w&&(_=!1):d+=E.x,E.y>=0?p0?s=E.y>0?Bf:zf:E.x<0&&(u-=d,s=E.y>0?Vf:Hf),E.y<0&&(c-=f),this.cropped||(Oi(this.cropBox,yr),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}_&&(i.width=d,i.height=f,i.left=u,i.top=c,this.action=s,this.renderCropBox()),yn(o,function(P){P.startX=P.endX,P.startY=P.endY})}},aue={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&Tn(this.dragBox,Gg),Oi(this.cropBox,yr),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=Ht({},this.initialImageData),this.canvasData=Ht({},this.initialCanvasData),this.cropBoxData=Ht({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(Ht(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),Oi(this.dragBox,Gg),Tn(this.cropBox,yr)),this},replace:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&t&&(this.isImg&&(this.element.src=t),n?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,yn(this.previews,function(r){r.getElementsByTagName("img")[0].src=t}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,Oi(this.cropper,oP)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,Tn(this.cropper,oP)),this},destroy:function(){var t=this.element;return t[Ut]?(t[Ut]=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,r=this.canvasData,a=r.left,i=r.top;return this.moveTo(mb(t)?t:a+Number(t),mb(n)?n:i+Number(n))},moveTo:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,r=this.canvasData,a=!1;return t=Number(t),n=Number(n),this.ready&&!this.disabled&&this.options.movable&&(Ke(t)&&(r.left=t,a=!0),Ke(n)&&(r.top=n,a=!0),a&&this.renderCanvas(!0)),this},zoom:function(t,n){var r=this.canvasData;return t=Number(t),t<0?t=1/(1-t):t=1+t,this.zoomTo(r.width*t/r.naturalWidth,null,n)},zoomTo:function(t,n,r){var a=this.options,i=this.canvasData,o=i.width,s=i.height,l=i.naturalWidth,u=i.naturalHeight;if(t=Number(t),t>=0&&this.ready&&!this.disabled&&a.zoomable){var c=l*t,d=u*t;if(bc(this.element,W_,{ratio:t,oldRatio:o/l,originalEvent:r})===!1)return this;if(r){var f=this.pointers,h=hj(this.cropper),p=f&&Object.keys(f).length?Vle(f):{pageX:r.pageX,pageY:r.pageY};i.left-=(c-o)*((p.pageX-h.left-i.left)/o),i.top-=(d-s)*((p.pageY-h.top-i.top)/s)}else ic(n)&&Ke(n.x)&&Ke(n.y)?(i.left-=(c-o)*((n.x-i.left)/o),i.top-=(d-s)*((n.y-i.top)/s)):(i.left-=(c-o)/2,i.top-=(d-s)/2);i.width=c,i.height=d,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return t=Number(t),Ke(t)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var n=this.imageData.scaleY;return this.scale(t,Ke(n)?n:1)},scaleY:function(t){var n=this.imageData.scaleX;return this.scale(Ke(n)?n:1,t)},scale:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,r=this.imageData,a=!1;return t=Number(t),n=Number(n),this.ready&&!this.disabled&&this.options.scalable&&(Ke(t)&&(r.scaleX=t,a=!0),Ke(n)&&(r.scaleY=n,a=!0),a&&this.renderCanvas(!0,!0)),this},getData:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,n=this.options,r=this.imageData,a=this.canvasData,i=this.cropBoxData,o;if(this.ready&&this.cropped){o={x:i.left-a.left,y:i.top-a.top,width:i.width,height:i.height};var s=r.width/r.naturalWidth;if(yn(o,function(c,d){o[d]=c/s}),t){var l=Math.round(o.y+o.height),u=Math.round(o.x+o.width);o.x=Math.round(o.x),o.y=Math.round(o.y),o.width=u-o.x,o.height=l-o.y}}else o={x:0,y:0,width:0,height:0};return n.rotatable&&(o.rotate=r.rotate||0),n.scalable&&(o.scaleX=r.scaleX||1,o.scaleY=r.scaleY||1),o},setData:function(t){var n=this.options,r=this.imageData,a=this.canvasData,i={};if(this.ready&&!this.disabled&&ic(t)){var o=!1;n.rotatable&&Ke(t.rotate)&&t.rotate!==r.rotate&&(r.rotate=t.rotate,o=!0),n.scalable&&(Ke(t.scaleX)&&t.scaleX!==r.scaleX&&(r.scaleX=t.scaleX,o=!0),Ke(t.scaleY)&&t.scaleY!==r.scaleY&&(r.scaleY=t.scaleY,o=!0)),o&&this.renderCanvas(!0,!0);var s=r.width/r.naturalWidth;Ke(t.x)&&(i.left=t.x*s+a.left),Ke(t.y)&&(i.top=t.y*s+a.top),Ke(t.width)&&(i.width=t.width*s),Ke(t.height)&&(i.height=t.height*s),this.setCropBoxData(i)}return this},getContainerData:function(){return this.ready?Ht({},this.containerData):{}},getImageData:function(){return this.sized?Ht({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,n={};return this.ready&&yn(["left","top","width","height","naturalWidth","naturalHeight"],function(r){n[r]=t[r]}),n},setCanvasData:function(t){var n=this.canvasData,r=n.aspectRatio;return this.ready&&!this.disabled&&ic(t)&&(Ke(t.left)&&(n.left=t.left),Ke(t.top)&&(n.top=t.top),Ke(t.width)?(n.width=t.width,n.height=t.width/r):Ke(t.height)&&(n.height=t.height,n.width=t.height*r),this.renderCanvas(!0)),this},getCropBoxData:function(){var t=this.cropBoxData,n;return this.ready&&this.cropped&&(n={left:t.left,top:t.top,width:t.width,height:t.height}),n||{}},setCropBoxData:function(t){var n=this.cropBoxData,r=this.options.aspectRatio,a,i;return this.ready&&this.cropped&&!this.disabled&&ic(t)&&(Ke(t.left)&&(n.left=t.left),Ke(t.top)&&(n.top=t.top),Ke(t.width)&&t.width!==n.width&&(a=!0,n.width=t.width),Ke(t.height)&&t.height!==n.height&&(i=!0,n.height=t.height),r&&(a?n.height=n.width/r:i&&(n.width=n.height*r)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var n=this.canvasData,r=Yle(this.image,this.imageData,n,t);if(!this.cropped)return r;var a=this.getData(t.rounded),i=a.x,o=a.y,s=a.width,l=a.height,u=r.width/Math.floor(n.naturalWidth);u!==1&&(i*=u,o*=u,s*=u,l*=u);var c=s/l,d=Xo({aspectRatio:c,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),f=Xo({aspectRatio:c,width:t.minWidth||0,height:t.minHeight||0},"cover"),h=Xo({aspectRatio:c,width:t.width||(u!==1?r.width:s),height:t.height||(u!==1?r.height:l)}),p=h.width,v=h.height;p=Math.min(d.width,Math.max(f.width,p)),v=Math.min(d.height,Math.max(f.height,v));var y=document.createElement("canvas"),g=y.getContext("2d");y.width=wc(p),y.height=wc(v),g.fillStyle=t.fillColor||"transparent",g.fillRect(0,0,p,v);var w=t.imageSmoothingEnabled,_=w===void 0?!0:w,b=t.imageSmoothingQuality;g.imageSmoothingEnabled=_,b&&(g.imageSmoothingQuality=b);var C=r.width,E=r.height,T=i,P=o,A,M,j,H,q,Q;T<=-s||T>C?(T=0,A=0,j=0,q=0):T<=0?(j=-T,T=0,A=Math.min(C,s+T),q=A):T<=C&&(j=0,A=Math.min(s,C-T),q=A),A<=0||P<=-l||P>E?(P=0,M=0,H=0,Q=0):P<=0?(H=-P,P=0,M=Math.min(E,l+P),Q=M):P<=E&&(H=0,M=Math.min(l,E-P),Q=M);var X=[T,P,A,M];if(q>0&&Q>0){var Y=p/s;X.push(j*Y,H*Y,q*Y,Q*Y)}return g.drawImage.apply(g,[r].concat(tj(X.map(function(oe){return Math.floor(wc(oe))})))),y},setAspectRatio:function(t){var n=this.options;return!this.disabled&&!mb(t)&&(n.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var n=this.options,r=this.dragBox,a=this.face;if(this.ready&&!this.disabled){var i=t===zx,o=n.movable&&t===oj;t=i||o?t:sj,n.dragMode=t,gp(r,vp,t),oc(r,j_,i),oc(r,U_,o),n.cropBoxMovable||(gp(a,vp,t),oc(a,j_,i),oc(a,U_,o))}return this}},iue=Ii.Cropper,mj=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(gle(this,e),!t||!Ale.test(t.tagName))throw new Error("The first argument is required and must be an or element.");this.element=t,this.options=Ht({},vP,ic(n)&&n),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return yle(e,[{key:"init",value:function(){var n=this.element,r=n.tagName.toLowerCase(),a;if(!n[Ut]){if(n[Ut]=this,r==="img"){if(this.isImg=!0,a=n.getAttribute("src")||"",this.originalUrl=a,!a)return;a=n.src}else r==="canvas"&&window.HTMLCanvasElement&&(a=n.toDataURL());this.load(a)}}},{key:"load",value:function(n){var r=this;if(n){this.url=n,this.imageData={};var a=this.element,i=this.options;if(!i.rotatable&&!i.scalable&&(i.checkOrientation=!1),!i.checkOrientation||!window.ArrayBuffer){this.clone();return}if(Ple.test(n)){Nle.test(n)?this.read(qle(n)):this.clone();return}var o=new XMLHttpRequest,s=this.clone.bind(this);this.reloading=!0,this.xhr=o,o.onabort=s,o.onerror=s,o.ontimeout=s,o.onprogress=function(){o.getResponseHeader("content-type")!==mP&&o.abort()},o.onload=function(){r.read(o.response)},o.onloadend=function(){r.reloading=!1,r.xhr=null},i.checkCrossOrigin&&yP(n)&&a.crossOrigin&&(n=wP(n)),o.open("GET",n,!0),o.responseType="arraybuffer",o.withCredentials=a.crossOrigin==="use-credentials",o.send()}}},{key:"read",value:function(n){var r=this.options,a=this.imageData,i=Xle(n),o=0,s=1,l=1;if(i>1){this.url=Qle(n,mP);var u=Zle(i);o=u.rotate,s=u.scaleX,l=u.scaleY}r.rotatable&&(a.rotate=o),r.scalable&&(a.scaleX=s,a.scaleY=l),this.clone()}},{key:"clone",value:function(){var n=this.element,r=this.url,a=n.crossOrigin,i=r;this.options.checkCrossOrigin&&yP(r)&&(a||(a="anonymous"),i=wP(r)),this.crossOrigin=a,this.crossOriginUrl=i;var o=document.createElement("img");a&&(o.crossOrigin=a),o.src=i||r,o.alt=n.alt||"The image to crop",this.image=o,o.onload=this.start.bind(this),o.onerror=this.stop.bind(this),Tn(o,sP),n.parentNode.insertBefore(o,n.nextSibling)}},{key:"start",value:function(){var n=this,r=this.image;r.onload=null,r.onerror=null,this.sizing=!0;var a=Ii.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(Ii.navigator.userAgent),i=function(u,c){Ht(n.imageData,{naturalWidth:u,naturalHeight:c,aspectRatio:u/c}),n.initialImageData=Ht({},n.imageData),n.sizing=!1,n.sized=!0,n.build()};if(r.naturalWidth&&!a){i(r.naturalWidth,r.naturalHeight);return}var o=document.createElement("img"),s=document.body||document.documentElement;this.sizingImage=o,o.onload=function(){i(o.width,o.height),a||s.removeChild(o)},o.src=r.src,a||(o.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",s.appendChild(o))}},{key:"stop",value:function(){var n=this.image;n.onload=null,n.onerror=null,n.parentNode.removeChild(n),this.image=null}},{key:"build",value:function(){if(!(!this.sized||this.ready)){var n=this.element,r=this.options,a=this.image,i=n.parentNode,o=document.createElement("div");o.innerHTML=Mle;var s=o.querySelector(".".concat(Ut,"-container")),l=s.querySelector(".".concat(Ut,"-canvas")),u=s.querySelector(".".concat(Ut,"-drag-box")),c=s.querySelector(".".concat(Ut,"-crop-box")),d=c.querySelector(".".concat(Ut,"-face"));this.container=i,this.cropper=s,this.canvas=l,this.dragBox=u,this.cropBox=c,this.viewBox=s.querySelector(".".concat(Ut,"-view-box")),this.face=d,l.appendChild(a),Tn(n,yr),i.insertBefore(s,n.nextSibling),Oi(a,sP),this.initPreview(),this.bind(),r.initialAspectRatio=Math.max(0,r.initialAspectRatio)||NaN,r.aspectRatio=Math.max(0,r.aspectRatio)||NaN,r.viewMode=Math.max(0,Math.min(3,Math.round(r.viewMode)))||0,Tn(c,yr),r.guides||Tn(c.getElementsByClassName("".concat(Ut,"-dashed")),yr),r.center||Tn(c.getElementsByClassName("".concat(Ut,"-center")),yr),r.background&&Tn(s,"".concat(Ut,"-bg")),r.highlight||Tn(d,Cle),r.cropBoxMovable&&(Tn(d,U_),gp(d,vp,Ux)),r.cropBoxResizable||(Tn(c.getElementsByClassName("".concat(Ut,"-line")),yr),Tn(c.getElementsByClassName("".concat(Ut,"-point")),yr)),this.render(),this.ready=!0,this.setDragMode(r.dragMode),r.autoCrop&&this.crop(),this.setData(r.data),gr(r.ready)&&Zr(n,fP,r.ready,{once:!0}),bc(n,fP)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var n=this.cropper.parentNode;n&&n.removeChild(this.cropper),Oi(this.element,yr)}}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],[{key:"noConflict",value:function(){return window.Cropper=iue,e}},{key:"setDefaults",value:function(n){Ht(vP,ic(n)&&n)}}]),e}();Ht(mj.prototype,Jle,eue,tue,nue,rue,aue);var dl=function(){return dl=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&P.zoomTo(oe)}(T.currentTarget.cropper,_),y&&y(T)}}));g&&g(E)}return function(){var T,P;(P=(T=b.current)===null||T===void 0?void 0:T.cropper)===null||P===void 0||P.destroy()}},[b]);var C=function(E){return oue.reduce(function(T,P){var A=T,M=P;return A[M],gb(A,[typeof M=="symbol"?M:M+""])},E)}(dl(dl({},w),{crossOrigin:l,src:i,alt:v}));return m.createElement("div",{style:o,className:s},m.createElement("img",dl({},C,{style:sue,ref:b})))});function uue({imagePreview:e,setCropper:t}){return S.jsx(lue,{src:e,style:{height:200,width:"100%"},initialAspectRatio:1,aspectRatio:1,preview:".img-preview",guides:!1,viewMode:1,autoCropArea:1,background:!1,onInitialized:n=>t(n)})}function cue({loading:e,uploadPhoto:t}){const[n,r]=x.useState([]),[a,i]=x.useState();function o(){a&&a.getCroppedCanvas().toBlob(s=>t(s))}return x.useEffect(()=>()=>{n.forEach(s=>URL.revokeObjectURL(s.preview))},[n]),S.jsxs(He,{children:[S.jsxs(He.Column,{width:4,children:[S.jsx(Ft,{sub:!0,color:"teal",content:"Step 1 - Add Photo"}),S.jsx(vle,{setFiles:r})]}),S.jsx(He.Column,{width:1}),S.jsxs(He.Column,{width:4,children:[S.jsx(Ft,{sub:!0,color:"teal",content:"Step 2 - Resize image"}),n&&n.length>0&&S.jsx(uue,{setCropper:i,imagePreview:n[0].preview})]}),S.jsx(He.Column,{width:1}),S.jsxs(He.Column,{width:4,children:[S.jsx(Ft,{sub:!0,color:"teal",content:"Step 3 - Preview and Upload"}),n&&n.length>0&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"img-preview",style:{minHeight:200,overflow:"hidden"}}),S.jsxs(Ye.Group,{widths:2,children:[S.jsx(Ye,{onClick:o,loading:e,positive:!0,icon:"check"}),S.jsx(Ye,{disabled:e,onClick:()=>r([]),icon:"close"})]})]})]})]})}const due=St(function({profile:t}){var v;const{profileStore:{isCurrentUser:n,uploadPhoto:r,uploading:a,loading:i,setMainPhoto:o,deletePhoto:s}}=Jt(),[l,u]=x.useState(!1),[c,d]=x.useState("");function f(y){r(y).then(()=>u(!1))}function h(y,g){d("main"+g.currentTarget.name),o(y)}function p(y,g){d(g.currentTarget.name),s(y)}return S.jsx(Ed.Pane,{children:S.jsxs(He,{children:[S.jsxs(He.Column,{width:16,children:[S.jsx(Ft,{icon:"image",content:"Photos",floated:"left"}),n&&S.jsx(Ye,{floated:"right",basic:!0,content:l?"Cancel":"Add Photo",onClick:()=>u(!l)})]}),S.jsx(He.Column,{width:16,children:l?S.jsx(cue,{uploadPhoto:f,loading:a}):S.jsx(br.Group,{itemsPerRow:5,children:(v=t.photos)==null?void 0:v.map(y=>S.jsxs(br,{children:[S.jsx(hr,{src:y.url}),n&&S.jsxs(Ye.Group,{fluid:!0,widths:2,children:[S.jsx(Ye,{basic:!0,color:"green",content:"Main",name:"main"+y.id,disabled:y.isMain,loading:c==="main"+y.id&&i,onClick:g=>h(y,g)}),S.jsx(Ye,{basic:!0,color:"red",icon:"trash",loading:c===y.id&&i,onClick:g=>p(y,g),disabled:y.isMain,name:y.id})]})]},y.id))})})]})})}),fue=St(function({setEditMode:t}){const{profileStore:{profile:n,updateProfile:r}}=Jt();return S.jsx(Wp,{initialValues:{displayName:n==null?void 0:n.displayName,bio:n==null?void 0:n.bio},onSubmit:a=>{r(a).then(()=>{t(!1)})},validationSchema:Yp({displayName:$r().required()}),children:({isSubmitting:a,isValid:i,dirty:o})=>S.jsxs(sf,{className:"ui form",children:[S.jsx(gi,{placeholder:"Display Name",name:"displayName"}),S.jsx(dF,{rows:3,name:"bio",placeholder:"Add your bio"}),S.jsx(Ye,{positive:!0,type:"submit",loading:a,content:"Update profile",floated:"right",disabled:!i||!o})," "]})})}),hue=St(function(){const{profileStore:t}=Jt(),{isCurrentUser:n,profile:r}=t,[a,i]=x.useState(!1);return S.jsx(Ed.Pane,{children:S.jsxs(He,{children:[S.jsxs(He.Column,{width:"16",children:[S.jsx(Ft,{floated:"left",icon:"user",content:`About ${r==null?void 0:r.displayName}`}),n&&S.jsx(Ye,{floated:"right",basic:!0,content:a?"Cancel":"Edit Profile",onClick:()=>i(!a)})]}),S.jsx(He.Column,{width:"16",children:a?S.jsx(fue,{setEditMode:i}):S.jsx("span",{style:{whiteSpace:"pre-wrap"},children:r==null?void 0:r.bio})})]})})}),bP=St(function(){const{profileStore:t}=Jt(),{profile:n,followings:r,loadingFollowing:a,activeTab:i}=t;return S.jsx(Ed.Pane,{loading:a,children:S.jsxs(He,{children:[S.jsx(He.Column,{width:16,children:S.jsx(Ft,{floated:"left",icon:"user",content:i===3?`People following ${n==null?void 0:n.displayName}`:`People ${n==null?void 0:n.displayName} is following`})}),S.jsx(He.Column,{width:16,children:S.jsx(br.Group,{itemsPerRow:4,children:r.map(o=>S.jsx(T$,{profile:o},o.username))})})]})})}),_P=[{menuItem:"Future Events",pane:{key:"future"}},{menuItem:"Past Events",pane:{key:"past"}},{menuItem:"Hosting",pane:{key:"hosting"}}],pue=St(function(){const{profileStore:t}=Jt(),{loadUserActivities:n,profile:r,loadingActivities:a,userActivities:i}=t;x.useEffect(()=>{n(r.username)},[n,r]);const o=s=>{n(r.username,_P[s.activeIndex].pane.key)};return S.jsx(Ed.Pane,{loading:a,children:S.jsxs(He,{children:[S.jsx(He.Column,{width:16,children:S.jsx(Ft,{floated:"left",icon:"calendar",content:"Activities"})}),S.jsxs(He.Column,{width:16,children:[S.jsx(Ed,{panes:_P,menu:{secondary:!0,pointing:!0},onTabChange:(s,l)=>o(l)}),S.jsx("br",{}),S.jsx(br.Group,{itemsPerRow:4,children:i.map(s=>S.jsxs(br,{as:ur,to:`/activities/${s.id}`,children:[S.jsx(hr,{src:`/assets/categoryImages/${s.category}.jpg`,style:{minHeight:100,objectFit:"cover"}}),S.jsxs(br.Content,{children:[S.jsx(br.Header,{textAlign:"center",children:s.title}),S.jsxs(br.Meta,{textAlign:"center",children:[S.jsx("div",{children:up(new Date(s.date),"do LLL")}),S.jsx("div",{children:up(new Date(s.date),"h:mm a")})]})]})]},s.id))})]})]})})}),mue=St(function({profile:t}){const{profileStore:n}=Jt(),r=[{menuItem:"About",render:()=>S.jsx(hue,{})},{menuItem:"Photos",render:()=>S.jsx(due,{profile:t})},{menuItem:"Events",render:()=>S.jsx(pue,{})},{menuItem:"Followers",render:()=>S.jsx(bP,{})},{menuItem:"Following",render:()=>S.jsx(bP,{})}];return S.jsx(Ed,{menu:{fluid:!0,vertical:!0},menuPosition:"right",panes:r,onTabChange:(a,i)=>n.setActiveTab(i.activeIndex)})}),vue=St(function(){const{username:t}=sE(),{profileStore:n}=Jt(),{loadingProfile:r,loadProfile:a,profile:i,setActiveTab:o}=n;return x.useEffect(()=>(t&&a(t),()=>{o(0)}),[t,a,o]),r?S.jsx(rx,{content:"Loading Profile ...."}):S.jsx(He,{children:S.jsx(He.Column,{width:16,children:i&&S.jsxs(S.Fragment,{children:[S.jsx(Sse,{profile:i}),S.jsx(mue,{profile:i})]})})})});function gue(){const{userStore:{isLoggedIn:e}}=Jt(),t=_o();return e?S.jsx(TR,{}):S.jsx(CR,{to:"/",state:{from:t}})}const yue=[{path:"/",element:S.jsx(oJ,{}),children:[{element:S.jsx(gue,{}),children:[{path:"activities",element:S.jsx(Ere,{})},{path:"activities/:id",element:S.jsx(yse,{})},{path:"createActivity",element:S.jsx(Bk,{},"create")},{path:"manage/:id",element:S.jsx(Bk,{},"manage")},{path:"profiles/:username",element:S.jsx(vue,{})},{path:"errors",element:S.jsx(wse,{})}]},{path:"not-found",element:S.jsx(bse,{})},{path:"server-error",element:S.jsx(_se,{})},{path:"*",element:S.jsx(CR,{replace:!0,to:"/not-found"})}]}],kl=w6(yue);ar.defaults.baseURL="/api";ar.interceptors.response.use(async e=>{const t=e.headers.pagination;return t&&(e.data=new Sre(e.data,JSON.parse(t))),e},e=>{const{data:t,status:n,config:r}=e.response;switch(n){case 400:if(r.method==="get"&&Object.prototype.hasOwnProperty.call(t.errors,"id")&&kl.navigate("/not-found"),t.errors){const a=[];for(const i in t.errors)t.errors[i]&&a.push(t.errors[i]);throw a.flat()}else xt.error(t);break;case 401:xt.error("Unauthorized");break;case 403:xt.error("Forbidden");break;case 404:kl.navigate("/not-found");break;case 500:Dt.commonStore.setServerError(t),kl.navigate("/server-error");break}return Promise.reject(e)});const eh=e=>e.data;ar.interceptors.request.use(e=>{const t=Dt.commonStore.token;return t&&e.headers&&(e.headers.Authorization=`Bearer ${t}`),e});const rr={get:e=>ar.get(e).then(eh),post:(e,t={})=>ar.post(e,t).then(eh),put:(e,t={})=>ar.put(e,t).then(eh),del:e=>ar.delete(e).then(eh)},wue={list:e=>ar.get("/activities",{params:e}).then(eh),details:e=>rr.get(`/activities/${e}`),create:e=>rr.post("/activities",e),update:e=>rr.put(`activities/${e.id}`,e),delete:e=>rr.del(`/activities/${e}`),attend:e=>rr.post(`/activities/${e}/attend`,{})},bue={current:()=>rr.get("/account"),login:e=>rr.post("/account/login",e),register:e=>rr.post("/account/register",e)},_ue={get:e=>rr.get(`/profiles/${e}`),uploadPhoto:e=>{const t=new FormData;return t.append("File",e),ar.post("photos",t,{headers:{"Content-Type":"multipart/form-data"}})},setMainPhoto:e=>rr.post(`/photos/${e}/SetMain`,{}),deletePhoto:e=>rr.del(`/photos/${e}`),updateProfile:e=>rr.put("/profiles",e),updateFollowing:e=>rr.post(`/follow/${e}`,{}),listFollowing:(e,t)=>rr.get(`/follow/${e}?predicate=${t}`),listActivities:async(e,t)=>rr.get(`/profiles/${e}/activities?predicate=${t}`)},On={Activities:wue,Account:bue,Profiles:_ue};class SP{constructor(t){te(this,"username");te(this,"displayName");te(this,"image");te(this,"bio");te(this,"photos");te(this,"followersCount",0);te(this,"followingCount",0);te(this,"following",!1);this.username=t.username,this.displayName=t.displayName,this.image=t.image}}class Sue{constructor(){te(this,"activityRegistry",new Map);te(this,"selectedActivity");te(this,"editMode",!1);te(this,"loading",!1);te(this,"loadingInitial",!1);te(this,"pagination",null);te(this,"pagingParams",new S_);te(this,"predicate",new Map().set("all",!0));te(this,"setPagingParams",t=>{this.pagingParams=t});te(this,"setPredicate",(t,n)=>{const r=()=>{this.predicate.forEach((a,i)=>{i!=="startDate"&&this.predicate.delete(i)})};switch(t){case"all":r(),this.predicate.set("all",!0);break;case"isGoing":r(),this.predicate.set("isGoing",!0);break;case"isHost":r(),this.predicate.set("isHost",!0);break;case"startDate":this.predicate.delete("startDate"),this.predicate.set("startDate",n)}});te(this,"loadActivities",async()=>{this.setLoadingInitial(!0);try{const t=await On.Activities.list(this.axiosParams);t.data.forEach(n=>{this.setActivity(n)}),this.setPagination(t.pagination),this.setLoadingInitial(!1)}catch(t){console.log(t),this.setLoadingInitial(!1)}});te(this,"setPagination",t=>{this.pagination=t});te(this,"getActivity",t=>this.activityRegistry.get(t));te(this,"setActivity",t=>{var r;const n=Dt.userStore.user;n&&(t.isGoing=t.attendees.some(a=>a.username===n.username),t.isHost=t.hostUsername===n.username,t.host=(r=t.attendees)==null?void 0:r.find(a=>a.username===t.hostUsername)),t.date=new Date(t.date),this.activityRegistry.set(t.id,t)});te(this,"loadActivity",async t=>{var r;let n=this.getActivity(t);if(n)return this.selectedActivity=n,n;this.setLoadingInitial(!0);try{n=await On.Activities.details(t);const a=Dt.userStore.user;return a&&(n.isGoing=n.attendees.some(i=>i.username===a.username),n.isHost=n.hostUsername===a.username,n.host=(r=n.attendees)==null?void 0:r.find(i=>i.username===n.hostUsername)),st(()=>{this.selectedActivity=n}),this.setActivity(n),this.setLoadingInitial(!1),n}catch(a){console.log(a),this.setLoadingInitial(!1)}});te(this,"setLoadingInitial",t=>{this.loadingInitial=t});te(this,"createActivity",async t=>{const n=Dt.userStore.user,r=new SP(n);try{const a=new Lz(t);a.hostUsername=n.username,a.attendees=[r],await On.Activities.create(a),this.setActivity(a),st(()=>this.selectedActivity=a)}catch(a){console.log(a),st(()=>this.loading=!1)}});te(this,"updateActivity",async t=>{try{await On.Activities.update(t),st(()=>{if(t.id){let n={...this.getActivity(t.id),...t};this.activityRegistry.set(t.id,n),this.selectedActivity=n}this.editMode=!1})}catch(n){console.log(n)}});te(this,"deleteActivity",async t=>{this.loading=!0;try{await On.Activities.delete(t),st(()=>{this.activityRegistry.delete(t),this.loading=!1})}catch(n){console.log(n),st(()=>{this.loading=!1})}});te(this,"updateAttendence",async()=>{const t=Dt.userStore.user;this.loading=!0;try{await On.Activities.attend(this.selectedActivity.id),st(()=>{var n,r,a,i;if((n=this.selectedActivity)!=null&&n.isGoing)this.selectedActivity.attendees=(r=this.selectedActivity.attendees)==null?void 0:r.filter(o=>o.username!==(t==null?void 0:t.username)),this.selectedActivity.isGoing=!1;else{const o=new SP(t);(i=(a=this.selectedActivity)==null?void 0:a.attendees)==null||i.push(o),this.selectedActivity.isGoing=!0}this.activityRegistry.set(this.selectedActivity.id,this.selectedActivity)})}catch(n){console.log(n)}finally{st(()=>this.loading=!1)}});te(this,"cancelActivityToggle",async()=>{this.loading=!0;try{await On.Activities.attend(this.selectedActivity.id),st(()=>{var t;this.selectedActivity.isCancelled=!((t=this.selectedActivity)!=null&&t.isCancelled),this.activityRegistry.set(this.selectedActivity.id,this.selectedActivity)})}catch(t){console.log(t)}finally{st(()=>this.loading=!1)}});te(this,"clearSelectedActivity",()=>{this.selectedActivity=void 0});te(this,"updateAttendeeFollowing",t=>{this.activityRegistry.forEach(n=>n.attendees.forEach(r=>{r.username===t&&(r.following?r.followersCount--:r.followersCount++,r.following=!r.following)}))});Zd(this),KS(()=>this.predicate.keys(),()=>{this.pagingParams=new S_,this.activityRegistry.clear(),this.loadActivities()})}get axiosParams(){const t=new URLSearchParams;return t.append("pageNumber",this.pagingParams.pageNumber.toString()),t.append("pageSize",this.pagingParams.pageSize.toString()),this.predicate.forEach((n,r)=>{r==="startDate"?t.append(r,n.toISOString()):t.append(r,n)}),t}get activititesByDate(){return Array.from(this.activityRegistry.values()).sort((t,n)=>t.date.getTime()-n.date.getTime())}get groupedActivities(){return Object.entries(this.activititesByDate.reduce((t,n)=>{const r=up(n.date,"dd MMM yyyy ");return t[r]=t[r]?[...t[r],n]:[n],t},{}))}}class Eue{constructor(){te(this,"error",null);te(this,"token",localStorage.getItem("jwt"));te(this,"appLoaded",!1);te(this,"setToken",t=>{this.token=t});te(this,"setAppLoaded",()=>{this.appLoaded=!0});Zd(this),KS(()=>this.token,t=>{t?localStorage.setItem("jwt",t):localStorage.removeItem("jwt")})}setServerError(t){this.error=t}}class xue{constructor(){te(this,"user",null);te(this,"login",async t=>{const n=await On.Account.login(t);Dt.commonStore.setToken(n.token),st(()=>this.user=n),kl.navigate("/activities"),Dt.modalStore.closeModal()});te(this,"register",async t=>{const n=await On.Account.register(t);Dt.commonStore.setToken(n.token),st(()=>this.user=n),kl.navigate("/activities"),Dt.modalStore.closeModal()});te(this,"logout",()=>{Dt.commonStore.setToken(null),this.user=null,kl.navigate("/")});te(this,"getUser",async()=>{try{const t=await On.Account.current();st(()=>this.user=t)}catch(t){console.log(t)}});te(this,"setImgae",t=>{this.user&&(this.user.image=t)});te(this,"setDisplayName",t=>{this.user&&(this.user.displayName=t)});Zd(this)}get isLoggedIn(){return!!this.user}}class Cue{constructor(){te(this,"modal",{open:!1,body:null});te(this,"openModal",t=>{this.modal.open=!0,this.modal.body=t});te(this,"closeModal",()=>{this.modal.open=!1,this.modal.body=null});Zd(this)}}class Tue{constructor(){te(this,"profile",null);te(this,"loadingProfile",!1);te(this,"uploading",!1);te(this,"loading",!1);te(this,"followings",[]);te(this,"loadingFollowing",!1);te(this,"activeTab",0);te(this,"loadingActivities",!1);te(this,"userActivities",[]);te(this,"setActiveTab",t=>{this.activeTab=t});te(this,"loadProfile",async t=>{this.loadingProfile=!0;try{const n=await On.Profiles.get(t);st(()=>{this.profile=n,this.loadingProfile=!1})}catch(n){console.log(n),st(()=>this.loadingProfile=!1)}});te(this,"uploadPhoto",async t=>{this.uploading=!0;try{const r=(await On.Profiles.uploadPhoto(t)).data;st(()=>{var a;this.profile&&((a=this.profile.photos)==null||a.push(r),r.isMain&&Dt.userStore.user&&(Dt.userStore.setImgae(r.url),this.profile.image=r.url)),this.uploading=!1})}catch(n){console.log(n),st(()=>this.uploading=!1)}});te(this,"setMainPhoto",async t=>{this.loading=!0;try{await On.Profiles.setMainPhoto(t.id),Dt.userStore.setImgae(t.url),st(()=>{this.profile&&this.profile.photos&&(this.profile.photos.find(n=>n.isMain).isMain=!1,this.profile.photos.find(n=>n.id===t.id).isMain=!0,this.profile.image=t.url,this.loading=!1)})}catch(n){console.log(n),st(()=>this.loading=!1)}});te(this,"deletePhoto",async t=>{this.loading=!0;try{await On.Profiles.deletePhoto(t.id),st(()=>{var n;this.profile&&(this.profile.photos=(n=this.profile.photos)==null?void 0:n.filter(r=>r.id!==t.id),this.loading=!1)})}catch(n){console.log(n),st(()=>this.loading=!1)}});te(this,"updateProfile",async t=>{this.loading=!0;try{await On.Profiles.updateProfile(t),st(()=>{var n;t.displayName&&t.displayName!==((n=Dt.userStore.user)==null?void 0:n.displayName)&&Dt.userStore.setDisplayName(t.displayName),this.profile={...this.profile,...t},this.loading=!1})}catch(n){console.log(n),st(()=>this.loading=!1)}});te(this,"updateFollowing",async(t,n)=>{this.loading=!0;try{await On.Profiles.updateFollowing(t),Dt.activityStore.updateAttendeeFollowing(t),st(()=>{var r,a,i;this.profile&&this.profile.username!==((r=Dt.userStore.user)==null?void 0:r.username)&&this.profile.username===t&&(n?this.profile.followersCount++:this.profile.followersCount--,this.profile.following=!this.profile.following),this.profile&&((a=this.profile)==null?void 0:a.username)===((i=Dt.userStore.user)==null?void 0:i.username)&&(n?this.profile.followingCount++:this.profile.followingCount--),this.followings.forEach(o=>{o.username===t&&(o.following?o.followersCount--:o.followersCount++,o.following=!o.following)}),this.loading=!1})}catch(r){console.log(r),st(()=>this.loading=!1)}});te(this,"loadFollowings",async t=>{this.loadingFollowing=!0;try{const n=await On.Profiles.listFollowing(this.profile.username,t);st(()=>{this.followings=n,this.loadingFollowing=!1})}catch(n){console.log(n),st(()=>this.loadingFollowing=!1)}});te(this,"loadUserActivities",async(t,n)=>{this.loadingActivities=!0;try{const r=await On.Profiles.listActivities(t,n);st(()=>{this.userActivities=r,this.loadingActivities=!1})}catch(r){console.log(r),st(()=>{this.loadingActivities=!1})}});Zd(this),KS(()=>this.activeTab,t=>{if(t===3||t===4){const n=t===3?"followers":"following";this.loadFollowings(n)}else this.followings=[]})}get isCurrentUser(){return Dt.userStore.user&&this.profile?Dt.userStore.user.username===this.profile.username:!1}}class Wd extends Error{constructor(t,n){const r=new.target.prototype;super(`${t}: Status code '${n}'`),this.statusCode=n,this.__proto__=r}}class Bx extends Error{constructor(t="A timeout occurred."){const n=new.target.prototype;super(t),this.__proto__=n}}class Ha extends Error{constructor(t="An abort occurred."){const n=new.target.prototype;super(t),this.__proto__=n}}class Due extends Error{constructor(t,n){const r=new.target.prototype;super(t),this.transport=n,this.errorType="UnsupportedTransportError",this.__proto__=r}}class Oue extends Error{constructor(t,n){const r=new.target.prototype;super(t),this.transport=n,this.errorType="DisabledTransportError",this.__proto__=r}}class kue extends Error{constructor(t,n){const r=new.target.prototype;super(t),this.transport=n,this.errorType="FailedToStartTransportError",this.__proto__=r}}class Pue extends Error{constructor(t){const n=new.target.prototype;super(t),this.errorType="FailedToNegotiateWithServerError",this.__proto__=n}}class Nue extends Error{constructor(t,n){const r=new.target.prototype;super(t),this.innerErrors=n,this.__proto__=r}}class vj{constructor(t,n,r){this.statusCode=t,this.statusText=n,this.content=r}}class H0{get(t,n){return this.send({...n,method:"GET",url:t})}post(t,n){return this.send({...n,method:"POST",url:t})}delete(t,n){return this.send({...n,method:"DELETE",url:t})}getCookieString(t){return""}}var B;(function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Information=2]="Information",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.None=6]="None"})(B||(B={}));class yp{constructor(){}log(t,n){}}yp.instance=new yp;const Aue="7.0.12";class Pn{static isRequired(t,n){if(t==null)throw new Error(`The '${n}' argument is required.`)}static isNotEmpty(t,n){if(!t||t.match(/^\s*$/))throw new Error(`The '${n}' argument should not be empty.`)}static isIn(t,n,r){if(!(t in n))throw new Error(`Unknown ${r} value: ${t}.`)}}class kn{static get isBrowser(){return typeof window=="object"&&typeof window.document=="object"}static get isWebWorker(){return typeof self=="object"&&"importScripts"in self}static get isReactNative(){return typeof window=="object"&&typeof window.document>"u"}static get isNode(){return!this.isBrowser&&!this.isWebWorker&&!this.isReactNative}}function wp(e,t){let n="";return rm(e)?(n=`Binary data of length ${e.byteLength}`,t&&(n+=`. Content: '${Mue(e)}'`)):typeof e=="string"&&(n=`String data of length ${e.length}`,t&&(n+=`. Content: '${e}'`)),n}function Mue(e){const t=new Uint8Array(e);let n="";return t.forEach(r=>{const a=r<16?"0":"";n+=`0x${a}${r.toString(16)} `}),n.substr(0,n.length-1)}function rm(e){return e&&typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||e.constructor&&e.constructor.name==="ArrayBuffer")}async function gj(e,t,n,r,a,i){const o={},[s,l]=Yd();o[s]=l,e.log(B.Trace,`(${t} transport) sending data. ${wp(a,i.logMessageContent)}.`);const u=rm(a)?"arraybuffer":"text",c=await n.post(r,{content:a,headers:{...o,...i.headers},responseType:u,timeout:i.timeout,withCredentials:i.withCredentials});e.log(B.Trace,`(${t} transport) request complete. Response status: ${c.statusCode}.`)}function Rue(e){return e===void 0?new Kg(B.Information):e===null?yp.instance:e.log!==void 0?e:new Kg(e)}class Iue{constructor(t,n){this._subject=t,this._observer=n}dispose(){const t=this._subject.observers.indexOf(this._observer);t>-1&&this._subject.observers.splice(t,1),this._subject.observers.length===0&&this._subject.cancelCallback&&this._subject.cancelCallback().catch(n=>{})}}class Kg{constructor(t){this._minLevel=t,this.out=console}log(t,n){if(t>=this._minLevel){const r=`[${new Date().toISOString()}] ${B[t]}: ${n}`;switch(t){case B.Critical:case B.Error:this.out.error(r);break;case B.Warning:this.out.warn(r);break;case B.Information:this.out.info(r);break;default:this.out.log(r);break}}}}function Yd(){let e="X-SignalR-User-Agent";return kn.isNode&&(e="User-Agent"),[e,$ue(Aue,Lue(),jue(),Fue())]}function $ue(e,t,n,r){let a="Microsoft SignalR/";const i=e.split(".");return a+=`${i[0]}.${i[1]}`,a+=` (${e}; `,t&&t!==""?a+=`${t}; `:a+="Unknown OS; ",a+=`${n}`,r?a+=`; ${r}`:a+="; Unknown Runtime Version",a+=")",a}function Lue(){if(kn.isNode)switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}else return""}function Fue(){if(kn.isNode)return process.versions.node}function jue(){return kn.isNode?"NodeJS":"Browser"}function EP(e){return e.stack?e.stack:e.message?e.message:`${e}`}function Uue(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("could not find global")}class zue extends H0{constructor(t){if(super(),this._logger=t,typeof fetch>"u"){const n=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._jar=new(n("tough-cookie")).CookieJar,this._fetchType=n("node-fetch"),this._fetchType=n("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(Uue());if(typeof AbortController>"u"){const n=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._abortControllerType=n("abort-controller")}else this._abortControllerType=AbortController}async send(t){if(t.abortSignal&&t.abortSignal.aborted)throw new Ha;if(!t.method)throw new Error("No method defined.");if(!t.url)throw new Error("No url defined.");const n=new this._abortControllerType;let r;t.abortSignal&&(t.abortSignal.onabort=()=>{n.abort(),r=new Ha});let a=null;if(t.timeout){const l=t.timeout;a=setTimeout(()=>{n.abort(),this._logger.log(B.Warning,"Timeout from HTTP request."),r=new Bx},l)}t.content===""&&(t.content=void 0),t.content&&(t.headers=t.headers||{},rm(t.content)?t.headers["Content-Type"]="application/octet-stream":t.headers["Content-Type"]="text/plain;charset=UTF-8");let i;try{i=await this._fetchType(t.url,{body:t.content,cache:"no-cache",credentials:t.withCredentials===!0?"include":"same-origin",headers:{"X-Requested-With":"XMLHttpRequest",...t.headers},method:t.method,mode:"cors",redirect:"follow",signal:n.signal})}catch(l){throw r||(this._logger.log(B.Warning,`Error from HTTP request. ${l}.`),l)}finally{a&&clearTimeout(a),t.abortSignal&&(t.abortSignal.onabort=null)}if(!i.ok){const l=await xP(i,"text");throw new Wd(l||i.statusText,i.status)}const s=await xP(i,t.responseType);return new vj(i.status,i.statusText,s)}getCookieString(t){let n="";return kn.isNode&&this._jar&&this._jar.getCookies(t,(r,a)=>n=a.join("; ")),n}}function xP(e,t){let n;switch(t){case"arraybuffer":n=e.arrayBuffer();break;case"text":n=e.text();break;case"blob":case"document":case"json":throw new Error(`${t} is not supported.`);default:n=e.text();break}return n}class Hue extends H0{constructor(t){super(),this._logger=t}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new Ha):t.method?t.url?new Promise((n,r)=>{const a=new XMLHttpRequest;a.open(t.method,t.url,!0),a.withCredentials=t.withCredentials===void 0?!0:t.withCredentials,a.setRequestHeader("X-Requested-With","XMLHttpRequest"),t.content===""&&(t.content=void 0),t.content&&(rm(t.content)?a.setRequestHeader("Content-Type","application/octet-stream"):a.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));const i=t.headers;i&&Object.keys(i).forEach(o=>{a.setRequestHeader(o,i[o])}),t.responseType&&(a.responseType=t.responseType),t.abortSignal&&(t.abortSignal.onabort=()=>{a.abort(),r(new Ha)}),t.timeout&&(a.timeout=t.timeout),a.onload=()=>{t.abortSignal&&(t.abortSignal.onabort=null),a.status>=200&&a.status<300?n(new vj(a.status,a.statusText,a.response||a.responseText)):r(new Wd(a.response||a.responseText||a.statusText,a.status))},a.onerror=()=>{this._logger.log(B.Warning,`Error from HTTP request. ${a.status}: ${a.statusText}.`),r(new Wd(a.statusText,a.status))},a.ontimeout=()=>{this._logger.log(B.Warning,"Timeout from HTTP request."),r(new Bx)},a.send(t.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class Bue extends H0{constructor(t){if(super(),typeof fetch<"u"||kn.isNode)this._httpClient=new zue(t);else if(typeof XMLHttpRequest<"u")this._httpClient=new Hue(t);else throw new Error("No usable HttpClient found.")}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new Ha):t.method?t.url?this._httpClient.send(t):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(t){return this._httpClient.getCookieString(t)}}class Fr{static write(t){return`${t}${Fr.RecordSeparator}`}static parse(t){if(t[t.length-1]!==Fr.RecordSeparator)throw new Error("Message is incomplete.");const n=t.split(Fr.RecordSeparator);return n.pop(),n}}Fr.RecordSeparatorCode=30;Fr.RecordSeparator=String.fromCharCode(Fr.RecordSeparatorCode);class Vue{writeHandshakeRequest(t){return Fr.write(JSON.stringify(t))}parseHandshakeResponse(t){let n,r;if(rm(t)){const s=new Uint8Array(t),l=s.indexOf(Fr.RecordSeparatorCode);if(l===-1)throw new Error("Message is incomplete.");const u=l+1;n=String.fromCharCode.apply(null,Array.prototype.slice.call(s.slice(0,u))),r=s.byteLength>u?s.slice(u).buffer:null}else{const s=t,l=s.indexOf(Fr.RecordSeparator);if(l===-1)throw new Error("Message is incomplete.");const u=l+1;n=s.substring(0,u),r=s.length>u?s.substring(u):null}const a=Fr.parse(n),i=JSON.parse(a[0]);if(i.type)throw new Error("Expected a handshake response from the server.");return[r,i]}}var Tt;(function(e){e[e.Invocation=1]="Invocation",e[e.StreamItem=2]="StreamItem",e[e.Completion=3]="Completion",e[e.StreamInvocation=4]="StreamInvocation",e[e.CancelInvocation=5]="CancelInvocation",e[e.Ping=6]="Ping",e[e.Close=7]="Close"})(Tt||(Tt={}));class Wue{constructor(){this.observers=[]}next(t){for(const n of this.observers)n.next(t)}error(t){for(const n of this.observers)n.error&&n.error(t)}complete(){for(const t of this.observers)t.complete&&t.complete()}subscribe(t){return this.observers.push(t),new Iue(this,t)}}const Yue=30*1e3,Gue=15*1e3;var Yt;(function(e){e.Disconnected="Disconnected",e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Reconnecting="Reconnecting"})(Yt||(Yt={}));class Vx{constructor(t,n,r,a){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(B.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://docs.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},Pn.isRequired(t,"connection"),Pn.isRequired(n,"logger"),Pn.isRequired(r,"protocol"),this.serverTimeoutInMilliseconds=Yue,this.keepAliveIntervalInMilliseconds=Gue,this._logger=n,this._protocol=r,this.connection=t,this._reconnectPolicy=a,this._handshakeProtocol=new Vue,this.connection.onreceive=i=>this._processIncomingData(i),this.connection.onclose=i=>this._connectionClosed(i),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=Yt.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:Tt.Ping})}static create(t,n,r,a){return new Vx(t,n,r,a)}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(t){if(this._connectionState!==Yt.Disconnected&&this._connectionState!==Yt.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!t)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=t}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}async _startWithStateTransitions(){if(this._connectionState!==Yt.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=Yt.Connecting,this._logger.log(B.Debug,"Starting HubConnection.");try{await this._startInternal(),kn.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=Yt.Connected,this._connectionStarted=!0,this._logger.log(B.Debug,"HubConnection connected successfully.")}catch(t){return this._connectionState=Yt.Disconnected,this._logger.log(B.Debug,`HubConnection failed to start successfully because of error '${t}'.`),Promise.reject(t)}}async _startInternal(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;const t=new Promise((n,r)=>{this._handshakeResolver=n,this._handshakeRejecter=r});await this.connection.start(this._protocol.transferFormat);try{const n={protocol:this._protocol.name,version:this._protocol.version};if(this._logger.log(B.Debug,"Sending handshake request."),await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(n)),this._logger.log(B.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),await t,this._stopDuringStartError)throw this._stopDuringStartError;this.connection.features.inherentKeepAlive||await this._sendMessage(this._cachedPingMessage)}catch(n){throw this._logger.log(B.Debug,`Hub handshake failed with error '${n}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),await this.connection.stop(n),n}}async stop(){const t=this._startPromise;this._stopPromise=this._stopInternal(),await this._stopPromise;try{await t}catch{}}_stopInternal(t){return this._connectionState===Yt.Disconnected?(this._logger.log(B.Debug,`Call to HubConnection.stop(${t}) ignored because it is already in the disconnected state.`),Promise.resolve()):this._connectionState===Yt.Disconnecting?(this._logger.log(B.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnecting state.`),this._stopPromise):(this._connectionState=Yt.Disconnecting,this._logger.log(B.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(B.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=t||new Ha("The connection was stopped before the hub handshake could complete."),this.connection.stop(t)))}stream(t,...n){const[r,a]=this._replaceStreamingParams(n),i=this._createStreamInvocation(t,n,a);let o;const s=new Wue;return s.cancelCallback=()=>{const l=this._createCancelInvocation(i.invocationId);return delete this._callbacks[i.invocationId],o.then(()=>this._sendWithProtocol(l))},this._callbacks[i.invocationId]=(l,u)=>{if(u){s.error(u);return}else l&&(l.type===Tt.Completion?l.error?s.error(new Error(l.error)):s.complete():s.next(l.item))},o=this._sendWithProtocol(i).catch(l=>{s.error(l),delete this._callbacks[i.invocationId]}),this._launchStreams(r,o),s}_sendMessage(t){return this._resetKeepAliveInterval(),this.connection.send(t)}_sendWithProtocol(t){return this._sendMessage(this._protocol.writeMessage(t))}send(t,...n){const[r,a]=this._replaceStreamingParams(n),i=this._sendWithProtocol(this._createInvocation(t,n,!0,a));return this._launchStreams(r,i),i}invoke(t,...n){const[r,a]=this._replaceStreamingParams(n),i=this._createInvocation(t,n,!1,a);return new Promise((s,l)=>{this._callbacks[i.invocationId]=(c,d)=>{if(d){l(d);return}else c&&(c.type===Tt.Completion?c.error?l(new Error(c.error)):s(c.result):l(new Error(`Unexpected message type: ${c.type}`)))};const u=this._sendWithProtocol(i).catch(c=>{l(c),delete this._callbacks[i.invocationId]});this._launchStreams(r,u)})}on(t,n){!t||!n||(t=t.toLowerCase(),this._methods[t]||(this._methods[t]=[]),this._methods[t].indexOf(n)===-1&&this._methods[t].push(n))}off(t,n){if(!t)return;t=t.toLowerCase();const r=this._methods[t];if(r)if(n){const a=r.indexOf(n);a!==-1&&(r.splice(a,1),r.length===0&&delete this._methods[t])}else delete this._methods[t]}onclose(t){t&&this._closedCallbacks.push(t)}onreconnecting(t){t&&this._reconnectingCallbacks.push(t)}onreconnected(t){t&&this._reconnectedCallbacks.push(t)}_processIncomingData(t){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(t=this._processHandshakeResponse(t),this._receivedHandshakeResponse=!0),t){const n=this._protocol.parseMessages(t,this._logger);for(const r of n)switch(r.type){case Tt.Invocation:this._invokeClientMethod(r);break;case Tt.StreamItem:case Tt.Completion:{const a=this._callbacks[r.invocationId];if(a){r.type===Tt.Completion&&delete this._callbacks[r.invocationId];try{a(r)}catch(i){this._logger.log(B.Error,`Stream callback threw error: ${EP(i)}`)}}break}case Tt.Ping:break;case Tt.Close:{this._logger.log(B.Information,"Close message received from server.");const a=r.error?new Error("Server returned an error on close: "+r.error):void 0;r.allowReconnect===!0?this.connection.stop(a):this._stopPromise=this._stopInternal(a);break}default:this._logger.log(B.Warning,`Invalid message type: ${r.type}.`);break}}this._resetTimeoutPeriod()}_processHandshakeResponse(t){let n,r;try{[r,n]=this._handshakeProtocol.parseHandshakeResponse(t)}catch(a){const i="Error parsing handshake response: "+a;this._logger.log(B.Error,i);const o=new Error(i);throw this._handshakeRejecter(o),o}if(n.error){const a="Server returned handshake error: "+n.error;this._logger.log(B.Error,a);const i=new Error(a);throw this._handshakeRejecter(i),i}else this._logger.log(B.Debug,"Server handshake complete.");return this._handshakeResolver(),r}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=new Date().getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){if((!this.connection.features||!this.connection.features.inherentKeepAlive)&&(this._timeoutHandle=setTimeout(()=>this.serverTimeout(),this.serverTimeoutInMilliseconds),this._pingServerHandle===void 0)){let t=this._nextKeepAlive-new Date().getTime();t<0&&(t=0),this._pingServerHandle=setTimeout(async()=>{if(this._connectionState===Yt.Connected)try{await this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}},t)}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}async _invokeClientMethod(t){const n=t.target.toLowerCase(),r=this._methods[n];if(!r){this._logger.log(B.Warning,`No client method with the name '${n}' found.`),t.invocationId&&(this._logger.log(B.Warning,`No result given for '${n}' method and invocation ID '${t.invocationId}'.`),await this._sendWithProtocol(this._createCompletionMessage(t.invocationId,"Client didn't provide a result.",null)));return}const a=r.slice(),i=!!t.invocationId;let o,s,l;for(const u of a)try{const c=o;o=await u.apply(this,t.arguments),i&&o&&c&&(this._logger.log(B.Error,`Multiple results provided for '${n}'. Sending error to server.`),l=this._createCompletionMessage(t.invocationId,"Client provided multiple results.",null)),s=void 0}catch(c){s=c,this._logger.log(B.Error,`A callback for the method '${n}' threw error '${c}'.`)}l?await this._sendWithProtocol(l):i?(s?l=this._createCompletionMessage(t.invocationId,`${s}`,null):o!==void 0?l=this._createCompletionMessage(t.invocationId,null,o):(this._logger.log(B.Warning,`No result given for '${n}' method and invocation ID '${t.invocationId}'.`),l=this._createCompletionMessage(t.invocationId,"Client didn't provide a result.",null)),await this._sendWithProtocol(l)):o&&this._logger.log(B.Error,`Result given for '${n}' method but server is not expecting a result.`)}_connectionClosed(t){this._logger.log(B.Debug,`HubConnection.connectionClosed(${t}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||t||new Ha("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(t||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===Yt.Disconnecting?this._completeClose(t):this._connectionState===Yt.Connected&&this._reconnectPolicy?this._reconnect(t):this._connectionState===Yt.Connected&&this._completeClose(t)}_completeClose(t){if(this._connectionStarted){this._connectionState=Yt.Disconnected,this._connectionStarted=!1,kn.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(n=>n.apply(this,[t]))}catch(n){this._logger.log(B.Error,`An onclose callback called with error '${t}' threw error '${n}'.`)}}}async _reconnect(t){const n=Date.now();let r=0,a=t!==void 0?t:new Error("Attempting to reconnect due to a unknown error."),i=this._getNextRetryDelay(r++,0,a);if(i===null){this._logger.log(B.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),this._completeClose(t);return}if(this._connectionState=Yt.Reconnecting,t?this._logger.log(B.Information,`Connection reconnecting because of error '${t}'.`):this._logger.log(B.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0){try{this._reconnectingCallbacks.forEach(o=>o.apply(this,[t]))}catch(o){this._logger.log(B.Error,`An onreconnecting callback called with error '${t}' threw error '${o}'.`)}if(this._connectionState!==Yt.Reconnecting){this._logger.log(B.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.");return}}for(;i!==null;){if(this._logger.log(B.Information,`Reconnect attempt number ${r} will start in ${i} ms.`),await new Promise(o=>{this._reconnectDelayHandle=setTimeout(o,i)}),this._reconnectDelayHandle=void 0,this._connectionState!==Yt.Reconnecting){this._logger.log(B.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");return}try{if(await this._startInternal(),this._connectionState=Yt.Connected,this._logger.log(B.Information,"HubConnection reconnected successfully."),this._reconnectedCallbacks.length!==0)try{this._reconnectedCallbacks.forEach(o=>o.apply(this,[this.connection.connectionId]))}catch(o){this._logger.log(B.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${o}'.`)}return}catch(o){if(this._logger.log(B.Information,`Reconnect attempt failed because of error '${o}'.`),this._connectionState!==Yt.Reconnecting){this._logger.log(B.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),this._connectionState===Yt.Disconnecting&&this._completeClose();return}a=o instanceof Error?o:new Error(o.toString()),i=this._getNextRetryDelay(r++,Date.now()-n,a)}}this._logger.log(B.Information,`Reconnect retries have been exhausted after ${Date.now()-n} ms and ${r} failed attempts. Connection disconnecting.`),this._completeClose()}_getNextRetryDelay(t,n,r){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:n,previousRetryCount:t,retryReason:r})}catch(a){return this._logger.log(B.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${t}, ${n}) threw error '${a}'.`),null}}_cancelCallbacksWithError(t){const n=this._callbacks;this._callbacks={},Object.keys(n).forEach(r=>{const a=n[r];try{a(null,t)}catch(i){this._logger.log(B.Error,`Stream 'error' callback called with '${t}' threw error: ${EP(i)}`)}})}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(t,n,r,a){if(r)return a.length!==0?{arguments:n,streamIds:a,target:t,type:Tt.Invocation}:{arguments:n,target:t,type:Tt.Invocation};{const i=this._invocationId;return this._invocationId++,a.length!==0?{arguments:n,invocationId:i.toString(),streamIds:a,target:t,type:Tt.Invocation}:{arguments:n,invocationId:i.toString(),target:t,type:Tt.Invocation}}}_launchStreams(t,n){if(t.length!==0){n||(n=Promise.resolve());for(const r in t)t[r].subscribe({complete:()=>{n=n.then(()=>this._sendWithProtocol(this._createCompletionMessage(r)))},error:a=>{let i;a instanceof Error?i=a.message:a&&a.toString?i=a.toString():i="Unknown error",n=n.then(()=>this._sendWithProtocol(this._createCompletionMessage(r,i)))},next:a=>{n=n.then(()=>this._sendWithProtocol(this._createStreamItemMessage(r,a)))}})}}_replaceStreamingParams(t){const n=[],r=[];for(let a=0;a0)&&(n=!1,this._accessToken=await this._accessTokenFactory()),this._setAuthorizationHeader(t);const r=await this._innerClient.send(t);return n&&r.statusCode===401&&this._accessTokenFactory?(this._accessToken=await this._accessTokenFactory(),this._setAuthorizationHeader(t),await this._innerClient.send(t)):r}_setAuthorizationHeader(t){t.headers||(t.headers={}),this._accessToken?t.headers[Pl.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&t.headers[Pl.Authorization]&&delete t.headers[Pl.Authorization]}getCookieString(t){return this._innerClient.getCookieString(t)}}var Cn;(function(e){e[e.None=0]="None",e[e.WebSockets=1]="WebSockets",e[e.ServerSentEvents=2]="ServerSentEvents",e[e.LongPolling=4]="LongPolling"})(Cn||(Cn={}));var Kn;(function(e){e[e.Text=1]="Text",e[e.Binary=2]="Binary"})(Kn||(Kn={}));let Que=class{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}};class TP{constructor(t,n,r){this._httpClient=t,this._logger=n,this._pollAbort=new Que,this._options=r,this._running=!1,this.onreceive=null,this.onclose=null}get pollAborted(){return this._pollAbort.aborted}async connect(t,n){if(Pn.isRequired(t,"url"),Pn.isRequired(n,"transferFormat"),Pn.isIn(n,Kn,"transferFormat"),this._url=t,this._logger.log(B.Trace,"(LongPolling transport) Connecting."),n===Kn.Binary&&typeof XMLHttpRequest<"u"&&typeof new XMLHttpRequest().responseType!="string")throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");const[r,a]=Yd(),i={[r]:a,...this._options.headers},o={abortSignal:this._pollAbort.signal,headers:i,timeout:1e5,withCredentials:this._options.withCredentials};n===Kn.Binary&&(o.responseType="arraybuffer");const s=`${t}&_=${Date.now()}`;this._logger.log(B.Trace,`(LongPolling transport) polling: ${s}.`);const l=await this._httpClient.get(s,o);l.statusCode!==200?(this._logger.log(B.Error,`(LongPolling transport) Unexpected response code: ${l.statusCode}.`),this._closeError=new Wd(l.statusText||"",l.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,o)}async _poll(t,n){try{for(;this._running;)try{const r=`${t}&_=${Date.now()}`;this._logger.log(B.Trace,`(LongPolling transport) polling: ${r}.`);const a=await this._httpClient.get(r,n);a.statusCode===204?(this._logger.log(B.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):a.statusCode!==200?(this._logger.log(B.Error,`(LongPolling transport) Unexpected response code: ${a.statusCode}.`),this._closeError=new Wd(a.statusText||"",a.statusCode),this._running=!1):a.content?(this._logger.log(B.Trace,`(LongPolling transport) data received. ${wp(a.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(a.content)):this._logger.log(B.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(r){this._running?r instanceof Bx?this._logger.log(B.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=r,this._running=!1):this._logger.log(B.Trace,`(LongPolling transport) Poll errored after shutdown: ${r.message}`)}}finally{this._logger.log(B.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}}async send(t){return this._running?gj(this._logger,"LongPolling",this._httpClient,this._url,t,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}async stop(){this._logger.log(B.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{await this._receiving,this._logger.log(B.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);const t={},[n,r]=Yd();t[n]=r;const a={headers:{...t,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials};await this._httpClient.delete(this._url,a),this._logger.log(B.Trace,"(LongPolling transport) DELETE request sent.")}finally{this._logger.log(B.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}}_raiseOnClose(){if(this.onclose){let t="(LongPolling transport) Firing onclose event.";this._closeError&&(t+=" Error: "+this._closeError),this._logger.log(B.Trace,t),this.onclose(this._closeError)}}}class Xue{constructor(t,n,r,a){this._httpClient=t,this._accessToken=n,this._logger=r,this._options=a,this.onreceive=null,this.onclose=null}async connect(t,n){return Pn.isRequired(t,"url"),Pn.isRequired(n,"transferFormat"),Pn.isIn(n,Kn,"transferFormat"),this._logger.log(B.Trace,"(SSE transport) Connecting."),this._url=t,this._accessToken&&(t+=(t.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise((r,a)=>{let i=!1;if(n!==Kn.Text){a(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"));return}let o;if(kn.isBrowser||kn.isWebWorker)o=new this._options.EventSource(t,{withCredentials:this._options.withCredentials});else{const s=this._httpClient.getCookieString(t),l={};l.Cookie=s;const[u,c]=Yd();l[u]=c,o=new this._options.EventSource(t,{withCredentials:this._options.withCredentials,headers:{...l,...this._options.headers}})}try{o.onmessage=s=>{if(this.onreceive)try{this._logger.log(B.Trace,`(SSE transport) data received. ${wp(s.data,this._options.logMessageContent)}.`),this.onreceive(s.data)}catch(l){this._close(l);return}},o.onerror=s=>{i?this._close():a(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},o.onopen=()=>{this._logger.log(B.Information,`SSE connected to ${this._url}`),this._eventSource=o,i=!0,r()}}catch(s){a(s);return}})}async send(t){return this._eventSource?gj(this._logger,"SSE",this._httpClient,this._url,t,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}stop(){return this._close(),Promise.resolve()}_close(t){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(t))}}class Zue{constructor(t,n,r,a,i,o){this._logger=r,this._accessTokenFactory=n,this._logMessageContent=a,this._webSocketConstructor=i,this._httpClient=t,this.onreceive=null,this.onclose=null,this._headers=o}async connect(t,n){Pn.isRequired(t,"url"),Pn.isRequired(n,"transferFormat"),Pn.isIn(n,Kn,"transferFormat"),this._logger.log(B.Trace,"(WebSockets transport) Connecting.");let r;return this._accessTokenFactory&&(r=await this._accessTokenFactory()),new Promise((a,i)=>{t=t.replace(/^http/,"ws");let o;const s=this._httpClient.getCookieString(t);let l=!1;if(kn.isNode||kn.isReactNative){const u={},[c,d]=Yd();u[c]=d,r&&(u[Pl.Authorization]=`Bearer ${r}`),s&&(u[Pl.Cookie]=s),o=new this._webSocketConstructor(t,void 0,{headers:{...u,...this._headers}})}else r&&(t+=(t.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(r)}`);o||(o=new this._webSocketConstructor(t)),n===Kn.Binary&&(o.binaryType="arraybuffer"),o.onopen=u=>{this._logger.log(B.Information,`WebSocket connected to ${t}.`),this._webSocket=o,l=!0,a()},o.onerror=u=>{let c=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?c=u.error:c="There was an error with the transport",this._logger.log(B.Information,`(WebSockets transport) ${c}.`)},o.onmessage=u=>{if(this._logger.log(B.Trace,`(WebSockets transport) data received. ${wp(u.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(u.data)}catch(c){this._close(c);return}},o.onclose=u=>{if(l)this._close(u);else{let c=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?c=u.error:c="WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",i(new Error(c))}}})}send(t){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(B.Trace,`(WebSockets transport) sending data. ${wp(t,this._logMessageContent)}.`),this._webSocket.send(t),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(t){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(B.Trace,"(WebSockets transport) socket closed."),this.onclose&&(this._isCloseEvent(t)&&(t.wasClean===!1||t.code!==1e3)?this.onclose(new Error(`WebSocket closed with status code: ${t.code} (${t.reason||"no reason given"}).`)):t instanceof Error?this.onclose(t):this.onclose())}_isCloseEvent(t){return t&&typeof t.wasClean=="boolean"&&typeof t.code=="number"}}const DP=100;class Jue{constructor(t,n={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,Pn.isRequired(t,"url"),this._logger=Rue(n.logger),this.baseUrl=this._resolveUrl(t),n=n||{},n.logMessageContent=n.logMessageContent===void 0?!1:n.logMessageContent,typeof n.withCredentials=="boolean"||n.withCredentials===void 0)n.withCredentials=n.withCredentials===void 0?!0:n.withCredentials;else throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");n.timeout=n.timeout===void 0?100*1e3:n.timeout;let r=null,a=null;if(kn.isNode&&typeof require<"u"){const i=typeof __webpack_require__=="function"?__non_webpack_require__:require;r=i("ws"),a=i("eventsource")}!kn.isNode&&typeof WebSocket<"u"&&!n.WebSocket?n.WebSocket=WebSocket:kn.isNode&&!n.WebSocket&&r&&(n.WebSocket=r),!kn.isNode&&typeof EventSource<"u"&&!n.EventSource?n.EventSource=EventSource:kn.isNode&&!n.EventSource&&typeof a<"u"&&(n.EventSource=a),this._httpClient=new que(n.httpClient||new Bue(this._logger),n.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=n,this.onreceive=null,this.onclose=null}async start(t){if(t=t||Kn.Binary,Pn.isIn(t,Kn,"transferFormat"),this._logger.log(B.Debug,`Starting connection with transfer format '${Kn[t]}'.`),this._connectionState!=="Disconnected")return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(t),await this._startInternalPromise,this._connectionState==="Disconnecting"){const n="Failed to start the HttpConnection before stop() was called.";return this._logger.log(B.Error,n),await this._stopPromise,Promise.reject(new Ha(n))}else if(this._connectionState!=="Connected"){const n="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(B.Error,n),Promise.reject(new Ha(n))}this._connectionStarted=!0}send(t){return this._connectionState!=="Connected"?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new Wx(this.transport)),this._sendQueue.send(t))}async stop(t){if(this._connectionState==="Disconnected")return this._logger.log(B.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnected state.`),Promise.resolve();if(this._connectionState==="Disconnecting")return this._logger.log(B.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;this._connectionState="Disconnecting",this._stopPromise=new Promise(n=>{this._stopPromiseResolver=n}),await this._stopInternal(t),await this._stopPromise}async _stopInternal(t){this._stopError=t;try{await this._startInternalPromise}catch{}if(this.transport){try{await this.transport.stop()}catch(n){this._logger.log(B.Error,`HttpConnection.transport.stop() threw error '${n}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(B.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")}async _startInternal(t){let n=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation)if(this._options.transport===Cn.WebSockets)this.transport=this._constructTransport(Cn.WebSockets),await this._startTransport(n,t);else throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");else{let r=null,a=0;do{if(r=await this._getNegotiationResponse(n),this._connectionState==="Disconnecting"||this._connectionState==="Disconnected")throw new Ha("The connection was stopped during negotiation.");if(r.error)throw new Error(r.error);if(r.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(r.url&&(n=r.url),r.accessToken){const i=r.accessToken;this._accessTokenFactory=()=>i,this._httpClient._accessToken=i,this._httpClient._accessTokenFactory=void 0}a++}while(r.url&&a0?Promise.reject(new Nue(`Unable to connect to the server with any of the available transports. ${o.join(" ")}`,o)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))}_constructTransport(t){switch(t){case Cn.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new Zue(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case Cn.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new Xue(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case Cn.LongPolling:return new TP(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${t}.`)}}_startTransport(t,n){return this.transport.onreceive=this.onreceive,this.transport.onclose=r=>this._stopConnection(r),this.transport.connect(t,n)}_resolveTransportOrError(t,n,r){const a=Cn[t.transport];if(a==null)return this._logger.log(B.Debug,`Skipping transport '${t.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${t.transport}' because it is not supported by this client.`);if(ece(n,a))if(t.transferFormats.map(o=>Kn[o]).indexOf(r)>=0){if(a===Cn.WebSockets&&!this._options.WebSocket||a===Cn.ServerSentEvents&&!this._options.EventSource)return this._logger.log(B.Debug,`Skipping transport '${Cn[a]}' because it is not supported in your environment.'`),new Due(`'${Cn[a]}' is not supported in your environment.`,a);this._logger.log(B.Debug,`Selecting transport '${Cn[a]}'.`);try{return this._constructTransport(a)}catch(o){return o}}else return this._logger.log(B.Debug,`Skipping transport '${Cn[a]}' because it does not support the requested transfer format '${Kn[r]}'.`),new Error(`'${Cn[a]}' does not support ${Kn[r]}.`);else return this._logger.log(B.Debug,`Skipping transport '${Cn[a]}' because it was disabled by the client.`),new Oue(`'${Cn[a]}' is disabled by the client.`,a)}_isITransport(t){return t&&typeof t=="object"&&"connect"in t}_stopConnection(t){if(this._logger.log(B.Debug,`HttpConnection.stopConnection(${t}) called while in state ${this._connectionState}.`),this.transport=void 0,t=this._stopError||t,this._stopError=void 0,this._connectionState==="Disconnected"){this._logger.log(B.Debug,`Call to HttpConnection.stopConnection(${t}) was ignored because the connection is already in the disconnected state.`);return}if(this._connectionState==="Connecting")throw this._logger.log(B.Warning,`Call to HttpConnection.stopConnection(${t}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${t}) was called while the connection is still in the connecting state.`);if(this._connectionState==="Disconnecting"&&this._stopPromiseResolver(),t?this._logger.log(B.Error,`Connection disconnected with error '${t}'.`):this._logger.log(B.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(n=>{this._logger.log(B.Error,`TransportSendQueue.stop() threw error '${n}'.`)}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(t)}catch(n){this._logger.log(B.Error,`HttpConnection.onclose(${t}) threw error '${n}'.`)}}}_resolveUrl(t){if(t.lastIndexOf("https://",0)===0||t.lastIndexOf("http://",0)===0)return t;if(!kn.isBrowser)throw new Error(`Cannot resolve '${t}'.`);const n=window.document.createElement("a");return n.href=t,this._logger.log(B.Information,`Normalizing '${t}' to '${n.href}'.`),n.href}_resolveNegotiateUrl(t){const n=t.indexOf("?");let r=t.substring(0,n===-1?t.length:n);return r[r.length-1]!=="/"&&(r+="/"),r+="negotiate",r+=n===-1?"":t.substring(n),r.indexOf("negotiateVersion")===-1&&(r+=n===-1?"?":"&",r+="negotiateVersion="+this._negotiateVersion),r}}function ece(e,t){return!e||(t&e)!==0}class Wx{constructor(t){this._transport=t,this._buffer=[],this._executing=!0,this._sendBufferedData=new Jm,this._transportResult=new Jm,this._sendLoopPromise=this._sendLoop()}send(t){return this._bufferData(t),this._transportResult||(this._transportResult=new Jm),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(t){if(this._buffer.length&&typeof this._buffer[0]!=typeof t)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof t}`);this._buffer.push(t),this._sendBufferedData.resolve()}async _sendLoop(){for(;;){if(await this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new Jm;const t=this._transportResult;this._transportResult=void 0;const n=typeof this._buffer[0]=="string"?this._buffer.join(""):Wx._concatBuffers(this._buffer);this._buffer.length=0;try{await this._transport.send(n),t.resolve()}catch(r){t.reject(r)}}}static _concatBuffers(t){const n=t.map(i=>i.byteLength).reduce((i,o)=>i+o),r=new Uint8Array(n);let a=0;for(const i of t)r.set(new Uint8Array(i),a),a+=i.byteLength;return r.buffer}}class Jm{constructor(){this.promise=new Promise((t,n)=>[this._resolver,this._rejecter]=[t,n])}resolve(){this._resolver()}reject(t){this._rejecter(t)}}const tce="json";class nce{constructor(){this.name=tce,this.version=1,this.transferFormat=Kn.Text}parseMessages(t,n){if(typeof t!="string")throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!t)return[];n===null&&(n=yp.instance);const r=Fr.parse(t),a=[];for(const i of r){const o=JSON.parse(i);if(typeof o.type!="number")throw new Error("Invalid payload.");switch(o.type){case Tt.Invocation:this._isInvocationMessage(o);break;case Tt.StreamItem:this._isStreamItemMessage(o);break;case Tt.Completion:this._isCompletionMessage(o);break;case Tt.Ping:break;case Tt.Close:break;default:n.log(B.Information,"Unknown message type '"+o.type+"' ignored.");continue}a.push(o)}return a}writeMessage(t){return Fr.write(JSON.stringify(t))}_isInvocationMessage(t){this._assertNotEmptyString(t.target,"Invalid payload for Invocation message."),t.invocationId!==void 0&&this._assertNotEmptyString(t.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(t){if(this._assertNotEmptyString(t.invocationId,"Invalid payload for StreamItem message."),t.item===void 0)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(t){if(t.result&&t.error)throw new Error("Invalid payload for Completion message.");!t.result&&t.error&&this._assertNotEmptyString(t.error,"Invalid payload for Completion message."),this._assertNotEmptyString(t.invocationId,"Invalid payload for Completion message.")}_assertNotEmptyString(t,n){if(typeof t!="string"||t==="")throw new Error(n)}}const rce={trace:B.Trace,debug:B.Debug,info:B.Information,information:B.Information,warn:B.Warning,warning:B.Warning,error:B.Error,critical:B.Critical,none:B.None};function ace(e){const t=rce[e.toLowerCase()];if(typeof t<"u")return t;throw new Error(`Unknown log level: ${e}`)}class ice{configureLogging(t){if(Pn.isRequired(t,"logging"),oce(t))this.logger=t;else if(typeof t=="string"){const n=ace(t);this.logger=new Kg(n)}else this.logger=new Kg(t);return this}withUrl(t,n){return Pn.isRequired(t,"url"),Pn.isNotEmpty(t,"url"),this.url=t,typeof n=="object"?this.httpConnectionOptions={...this.httpConnectionOptions,...n}:this.httpConnectionOptions={...this.httpConnectionOptions,transport:n},this}withHubProtocol(t){return Pn.isRequired(t,"protocol"),this.protocol=t,this}withAutomaticReconnect(t){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return t?Array.isArray(t)?this.reconnectPolicy=new CP(t):this.reconnectPolicy=t:this.reconnectPolicy=new CP,this}build(){const t=this.httpConnectionOptions||{};if(t.logger===void 0&&(t.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");const n=new Jue(this.url,t);return Vx.create(n,this.logger||yp.instance,this.protocol||new nce,this.reconnectPolicy)}}function oce(e){return e.log!==void 0}class sce{constructor(){te(this,"comments",[]);te(this,"hubConnection",null);te(this,"createHubConnection",t=>{Dt.activityStore.selectedActivity&&(this.hubConnection=new ice().withUrl("/chat?activityId="+t,{accessTokenFactory:()=>{var n;return(n=Dt.userStore.user)==null?void 0:n.token}}).withAutomaticReconnect().configureLogging(B.Information).build(),this.hubConnection.start().catch(n=>console.log("Error establishing connection",n)),this.hubConnection.on("LoadComments",n=>{st(()=>{n.forEach(r=>{r.createdAt=new Date(r.createdAt)}),this.comments=n})}),this.hubConnection.on("ReceiveComment",n=>{st(()=>{n.createdAt=new Date(n.createdAt),this.comments.unshift(n)})}))});te(this,"stopHubConnention",()=>{var t;(t=this.hubConnection)==null||t.stop().catch(n=>console.log("Error stopping connections: ",n))});te(this,"clearComments",()=>{this.comments=[],this.stopHubConnention()});te(this,"addComment",async t=>{var n,r;t.activityId=(n=Dt.activityStore.selectedActivity)==null?void 0:n.id;try{await((r=this.hubConnection)==null?void 0:r.invoke("SendComment",t))}catch(a){console.log(a)}});Zd(this)}}const Dt={activityStore:new Sue,commonStore:new Eue,userStore:new xue,modalStore:new Cue,profileStore:new Tue,commentStore:new sce},yj=x.createContext(Dt);function Jt(){return x.useContext(yj)}yb.createRoot(document.getElementById("root")).render(S.jsx(m.StrictMode,{children:S.jsx(yj.Provider,{value:Dt,children:S.jsx(d6,{router:kl})})}))});export default lce(); diff --git a/API/wwwroot/index.html b/API/wwwroot/index.html index 3c46b9f..3745e15 100644 --- a/API/wwwroot/index.html +++ b/API/wwwroot/index.html @@ -5,7 +5,7 @@ Reactivities - +