function NS(t,e){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function _p(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Ri(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var MS={exports:{}},xp={},DS={exports:{}},Ue={};/** * @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 rd=Symbol.for("react.element"),GM=Symbol.for("react.portal"),qM=Symbol.for("react.fragment"),KM=Symbol.for("react.strict_mode"),YM=Symbol.for("react.profiler"),QM=Symbol.for("react.provider"),XM=Symbol.for("react.context"),JM=Symbol.for("react.forward_ref"),ZM=Symbol.for("react.suspense"),e4=Symbol.for("react.memo"),t4=Symbol.for("react.lazy"),i_=Symbol.iterator;function n4(t){return t===null||typeof t!="object"?null:(t=i_&&t[i_]||t["@@iterator"],typeof t=="function"?t:null)}var OS={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},LS=Object.assign,VS={};function Fl(t,e,n){this.props=t,this.context=e,this.refs=VS,this.updater=n||OS}Fl.prototype.isReactComponent={};Fl.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};Fl.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function FS(){}FS.prototype=Fl.prototype;function C0(t,e,n){this.props=t,this.context=e,this.refs=VS,this.updater=n||OS}var I0=C0.prototype=new FS;I0.constructor=C0;LS(I0,Fl.prototype);I0.isPureReactComponent=!0;var o_=Array.isArray,$S=Object.prototype.hasOwnProperty,P0={current:null},BS={key:!0,ref:!0,__self:!0,__source:!0};function US(t,e,n){var r,i={},o=null,s=null;if(e!=null)for(r in e.ref!==void 0&&(s=e.ref),e.key!==void 0&&(o=""+e.key),e)$S.call(e,r)&&!BS.hasOwnProperty(r)&&(i[r]=e[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1>>1,te=V[J];if(0>>1;Ji(ke,Y))Tei(Oe,ke)?(V[J]=Oe,V[Te]=Y,J=Te):(V[J]=ke,V[ae]=Y,J=ae);else if(Tei(Oe,Y))V[J]=Oe,V[Te]=Y,J=Te;else break e}}return W}function i(V,W){var Y=V.sortIndex-W.sortIndex;return Y!==0?Y:V.id-W.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();t.unstable_now=function(){return s.now()-a}}var l=[],c=[],h=1,f=null,p=3,g=!1,w=!1,b=!1,C=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(V){for(var W=n(c);W!==null;){if(W.callback===null)r(c);else if(W.startTime<=V)r(c),W.sortIndex=W.expirationTime,e(l,W);else break;W=n(c)}}function S(V){if(b=!1,_(V),!w)if(n(l)!==null)w=!0,z(N);else{var W=n(c);W!==null&&j(S,W.startTime-V)}}function N(V,W){w=!1,b&&(b=!1,T(E),E=-1),g=!0;var Y=p;try{for(_(W),f=n(l);f!==null&&(!(f.expirationTime>W)||V&&!L());){var J=f.callback;if(typeof J=="function"){f.callback=null,p=f.priorityLevel;var te=J(f.expirationTime<=W);W=t.unstable_now(),typeof te=="function"?f.callback=te:f===n(l)&&r(l),_(W)}else r(l);f=n(l)}if(f!==null)var se=!0;else{var ae=n(c);ae!==null&&j(S,ae.startTime-W),se=!1}return se}finally{f=null,p=Y,g=!1}}var D=!1,v=null,E=-1,I=5,P=-1;function L(){return!(t.unstable_now()-PV||125J?(V.sortIndex=Y,e(c,V),n(l)===null&&V===n(c)&&(b?(T(E),E=-1):b=!0,j(S,Y-J))):(V.sortIndex=te,e(l,V),w||g||(w=!0,z(N))),V},t.unstable_shouldYield=L,t.unstable_wrapCallback=function(V){var W=p;return function(){var Y=p;p=W;try{return V.apply(this,arguments)}finally{p=Y}}}})(GS);HS.exports=GS;var p4=HS.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 m4=x,_r=p4;function ee(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ry=Object.prototype.hasOwnProperty,g4=/^[: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]*$/,a_={},l_={};function y4(t){return Ry.call(l_,t)?!0:Ry.call(a_,t)?!1:g4.test(t)?l_[t]=!0:(a_[t]=!0,!1)}function v4(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function w4(t,e,n,r){if(e===null||typeof e>"u"||v4(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Gn(t,e,n,r,i,o,s){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=o,this.removeEmptyString=s}var kn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){kn[t]=new Gn(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];kn[e]=new Gn(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){kn[t]=new Gn(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){kn[t]=new Gn(t,2,!1,t,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(t){kn[t]=new Gn(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){kn[t]=new Gn(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){kn[t]=new Gn(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){kn[t]=new Gn(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){kn[t]=new Gn(t,5,!1,t.toLowerCase(),null,!1,!1)});var N0=/[\-:]([a-z])/g;function M0(t){return t[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(t){var e=t.replace(N0,M0);kn[e]=new Gn(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(N0,M0);kn[e]=new Gn(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(N0,M0);kn[e]=new Gn(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){kn[t]=new Gn(t,1,!1,t.toLowerCase(),null,!1,!1)});kn.xlinkHref=new Gn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){kn[t]=new Gn(t,1,!1,t.toLowerCase(),null,!0,!0)});function D0(t,e,n,r){var i=kn.hasOwnProperty(e)?kn[e]:null;(i!==null?i.type!==0:r||!(2a||i[s]!==o[a]){var l=` `+i[s].replace(" at new "," at ");return t.displayName&&l.includes("")&&(l=l.replace("",t.displayName)),l}while(1<=s&&0<=a);break}}}finally{gg=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?Oc(t):""}function b4(t){switch(t.tag){case 5:return Oc(t.type);case 16:return Oc("Lazy");case 13:return Oc("Suspense");case 19:return Oc("SuspenseList");case 0:case 2:case 15:return t=yg(t.type,!1),t;case 11:return t=yg(t.type.render,!1),t;case 1:return t=yg(t.type,!0),t;default:return""}}function Dy(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Fa:return"Fragment";case Va:return"Portal";case Ay:return"Profiler";case O0:return"StrictMode";case Ny:return"Suspense";case My:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case YS:return(t.displayName||"Context")+".Consumer";case KS:return(t._context.displayName||"Context")+".Provider";case L0:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case V0:return e=t.displayName||null,e!==null?e:Dy(t.type)||"Memo";case Ro:e=t._payload,t=t._init;try{return Dy(t(e))}catch{}}return null}function _4(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Dy(e);case 8:return e===O0?"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 e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function os(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function XS(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function x4(t){var e=XS(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Xd(t){t._valueTracker||(t._valueTracker=x4(t))}function JS(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=XS(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function cf(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Oy(t,e){var n=e.checked;return Dt({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function u_(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=os(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function ZS(t,e){e=e.checked,e!=null&&D0(t,"checked",e,!1)}function Ly(t,e){ZS(t,e);var n=os(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?Vy(t,e.type,n):e.hasOwnProperty("defaultValue")&&Vy(t,e.type,os(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function d_(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function Vy(t,e,n){(e!=="number"||cf(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Lc=Array.isArray;function el(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=Jd.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function wu(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var Kc={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},k4=["Webkit","ms","Moz","O"];Object.keys(Kc).forEach(function(t){k4.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Kc[e]=Kc[t]})});function rC(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||Kc.hasOwnProperty(t)&&Kc[t]?(""+e).trim():e+"px"}function iC(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=rC(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var T4=Dt({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 By(t,e){if(e){if(T4[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(ee(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(ee(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(ee(61))}if(e.style!=null&&typeof e.style!="object")throw Error(ee(62))}}function Uy(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 zy=null;function F0(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var jy=null,tl=null,nl=null;function p_(t){if(t=sd(t)){if(typeof jy!="function")throw Error(ee(280));var e=t.stateNode;e&&(e=Cp(e),jy(t.stateNode,t.type,e))}}function oC(t){tl?nl?nl.push(t):nl=[t]:tl=t}function sC(){if(tl){var t=tl,e=nl;if(nl=tl=null,p_(t),e)for(t=0;t>>=0,t===0?32:31-(O4(t)/L4|0)|0}var Zd=64,eh=4194304;function Vc(t){switch(t&-t){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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function ff(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,o=t.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=Vc(a):(o&=s,o!==0&&(r=Vc(o)))}else s=n&~i,s!==0?r=Vc(s):o!==0&&(r=Vc(o));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,o=e&-e,i>=o||i===16&&(o&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0n;n++)e.push(t);return e}function id(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-ni(e),t[e]=n}function B4(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0=Qc),k_=String.fromCharCode(32),T_=!1;function SC(t,e){switch(t){case"keyup":return pD.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function CC(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var $a=!1;function gD(t,e){switch(t){case"compositionend":return CC(e);case"keypress":return e.which!==32?null:(T_=!0,k_);case"textInput":return t=e.data,t===k_&&T_?null:t;default:return null}}function yD(t,e){if($a)return t==="compositionend"||!G0&&SC(t,e)?(t=TC(),Ah=j0=$o=null,$a=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=I_(n)}}function AC(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?AC(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function NC(){for(var t=window,e=cf();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=cf(t.document)}return e}function q0(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function SD(t){var e=NC(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&AC(n.ownerDocument.documentElement,n)){if(r!==null&&q0(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!t.extend&&o>r&&(i=r,r=o,o=i),i=P_(n,o);var s=P_(n,r);i&&s&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==s.node||t.focusOffset!==s.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),o>r?(t.addRange(e),t.extend(s.node,s.offset)):(e.setEnd(s.node,s.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Ba=null,Yy=null,Jc=null,Qy=!1;function R_(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Qy||Ba==null||Ba!==cf(r)||(r=Ba,"selectionStart"in r&&q0(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}),Jc&&Eu(Jc,r)||(Jc=r,r=gf(Yy,"onSelect"),0ja||(t.current=nv[ja],nv[ja]=null,ja--)}function bt(t,e){ja++,nv[ja]=t.current,t.current=e}var ss={},On=ms(ss),er=ms(!1),Xs=ss;function ml(t,e){var n=t.type.contextTypes;if(!n)return ss;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=e[o];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function tr(t){return t=t.childContextTypes,t!=null}function vf(){Tt(er),Tt(On)}function V_(t,e,n){if(On.current!==ss)throw Error(ee(168));bt(On,e),bt(er,n)}function UC(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(ee(108,_4(t)||"Unknown",i));return Dt({},n,r)}function wf(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||ss,Xs=On.current,bt(On,t),bt(er,er.current),!0}function F_(t,e,n){var r=t.stateNode;if(!r)throw Error(ee(169));n?(t=UC(t,e,Xs),r.__reactInternalMemoizedMergedChildContext=t,Tt(er),Tt(On),bt(On,t)):Tt(er),bt(er,n)}var Bi=null,Ip=!1,Ag=!1;function zC(t){Bi===null?Bi=[t]:Bi.push(t)}function FD(t){Ip=!0,zC(t)}function gs(){if(!Ag&&Bi!==null){Ag=!0;var t=0,e=dt;try{var n=Bi;for(dt=1;t>=s,i-=s,zi=1<<32-ni(e)+i|n<E?(I=v,v=null):I=v.sibling;var P=p(T,v,_[E],S);if(P===null){v===null&&(v=I);break}t&&v&&P.alternate===null&&e(T,v),y=o(P,y,E),D===null?N=P:D.sibling=P,D=P,v=I}if(E===_.length)return n(T,v),It&&Is(T,E),N;if(v===null){for(;E<_.length;E++)v=f(T,_[E],S),v!==null&&(y=o(v,y,E),D===null?N=v:D.sibling=v,D=v);return It&&Is(T,E),N}for(v=r(T,v);E<_.length;E++)I=g(v,T,E,_[E],S),I!==null&&(t&&I.alternate!==null&&v.delete(I.key===null?E:I.key),y=o(I,y,E),D===null?N=I:D.sibling=I,D=I);return t&&v.forEach(function(L){return e(T,L)}),It&&Is(T,E),N}function b(T,y,_,S){var N=fc(_);if(typeof N!="function")throw Error(ee(150));if(_=N.call(_),_==null)throw Error(ee(151));for(var D=N=null,v=y,E=y=0,I=null,P=_.next();v!==null&&!P.done;E++,P=_.next()){v.index>E?(I=v,v=null):I=v.sibling;var L=p(T,v,P.value,S);if(L===null){v===null&&(v=I);break}t&&v&&L.alternate===null&&e(T,v),y=o(L,y,E),D===null?N=L:D.sibling=L,D=L,v=I}if(P.done)return n(T,v),It&&Is(T,E),N;if(v===null){for(;!P.done;E++,P=_.next())P=f(T,P.value,S),P!==null&&(y=o(P,y,E),D===null?N=P:D.sibling=P,D=P);return It&&Is(T,E),N}for(v=r(T,v);!P.done;E++,P=_.next())P=g(v,T,E,P.value,S),P!==null&&(t&&P.alternate!==null&&v.delete(P.key===null?E:P.key),y=o(P,y,E),D===null?N=P:D.sibling=P,D=P);return t&&v.forEach(function(O){return e(T,O)}),It&&Is(T,E),N}function C(T,y,_,S){if(typeof _=="object"&&_!==null&&_.type===Fa&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case Qd:e:{for(var N=_.key,D=y;D!==null;){if(D.key===N){if(N=_.type,N===Fa){if(D.tag===7){n(T,D.sibling),y=i(D,_.props.children),y.return=T,T=y;break e}}else if(D.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===Ro&&U_(N)===D.type){n(T,D.sibling),y=i(D,_.props),y.ref=vc(T,D,_),y.return=T,T=y;break e}n(T,D);break}else e(T,D);D=D.sibling}_.type===Fa?(y=Ks(_.props.children,T.mode,S,_.key),y.return=T,T=y):(S=$h(_.type,_.key,_.props,null,T.mode,S),S.ref=vc(T,y,_),S.return=T,T=S)}return s(T);case Va:e:{for(D=_.key;y!==null;){if(y.key===D)if(y.tag===4&&y.stateNode.containerInfo===_.containerInfo&&y.stateNode.implementation===_.implementation){n(T,y.sibling),y=i(y,_.children||[]),y.return=T,T=y;break e}else{n(T,y);break}else e(T,y);y=y.sibling}y=$g(_,T.mode,S),y.return=T,T=y}return s(T);case Ro:return D=_._init,C(T,y,D(_._payload),S)}if(Lc(_))return w(T,y,_,S);if(fc(_))return b(T,y,_,S);ah(T,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,y!==null&&y.tag===6?(n(T,y.sibling),y=i(y,_),y.return=T,T=y):(n(T,y),y=Fg(_,T.mode,S),y.return=T,T=y),s(T)):n(T,y)}return C}var yl=GC(!0),qC=GC(!1),xf=ms(null),kf=null,Ga=null,X0=null;function J0(){X0=Ga=kf=null}function Z0(t){var e=xf.current;Tt(xf),t._currentValue=e}function ov(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function il(t,e){kf=t,X0=Ga=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(Jn=!0),t.firstContext=null)}function zr(t){var e=t._currentValue;if(X0!==t)if(t={context:t,memoizedValue:e,next:null},Ga===null){if(kf===null)throw Error(ee(308));Ga=t,kf.dependencies={lanes:0,firstContext:t}}else Ga=Ga.next=t;return e}var Us=null;function e1(t){Us===null?Us=[t]:Us.push(t)}function KC(t,e,n,r){var i=e.interleaved;return i===null?(n.next=n,e1(e)):(n.next=i.next,i.next=n),e.interleaved=n,ro(t,r)}function ro(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var Ao=!1;function t1(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function YC(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Yi(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Ko(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,Qe&2){var i=r.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),r.pending=e,ro(t,n)}return i=r.interleaved,i===null?(e.next=e,e1(r)):(e.next=i.next,i.next=e),r.interleaved=e,ro(t,n)}function Mh(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,B0(t,n)}}function z_(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=e:o=o.next=e}else i=o=e;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function Tf(t,e,n,r){var i=t.updateQueue;Ao=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,c=l.next;l.next=null,s===null?o=c:s.next=c,s=l;var h=t.alternate;h!==null&&(h=h.updateQueue,a=h.lastBaseUpdate,a!==s&&(a===null?h.firstBaseUpdate=c:a.next=c,h.lastBaseUpdate=l))}if(o!==null){var f=i.baseState;s=0,h=c=l=null,a=o;do{var p=a.lane,g=a.eventTime;if((r&p)===p){h!==null&&(h=h.next={eventTime:g,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var w=t,b=a;switch(p=e,g=n,b.tag){case 1:if(w=b.payload,typeof w=="function"){f=w.call(g,f,p);break e}f=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=b.payload,p=typeof w=="function"?w.call(g,f,p):w,p==null)break e;f=Dt({},f,p);break e;case 2:Ao=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,p=i.effects,p===null?i.effects=[a]:p.push(a))}else g={eventTime:g,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},h===null?(c=h=g,l=f):h=h.next=g,s|=p;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;p=a,a=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);if(h===null&&(l=f),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=h,e=i.shared.interleaved,e!==null){i=e;do s|=i.lane,i=i.next;while(i!==e)}else o===null&&(i.shared.lanes=0);ea|=s,t.lanes=s,t.memoizedState=f}}function j_(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;en?n:4,t(!0);var r=Mg.transition;Mg.transition={};try{t(!1),e()}finally{dt=n,Mg.transition=r}}function hI(){return jr().memoizedState}function zD(t,e,n){var r=Qo(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},fI(t))pI(e,n);else if(n=KC(t,e,n,r),n!==null){var i=zn();ri(n,t,r,i),mI(n,e,r)}}function jD(t,e,n){var r=Qo(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(fI(t))pI(e,i);else{var o=t.alternate;if(t.lanes===0&&(o===null||o.lanes===0)&&(o=e.lastRenderedReducer,o!==null))try{var s=e.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,si(a,s)){var l=e.interleaved;l===null?(i.next=i,e1(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}n=KC(t,e,i,r),n!==null&&(i=zn(),ri(n,t,r,i),mI(n,e,r))}}function fI(t){var e=t.alternate;return t===Mt||e!==null&&e===Mt}function pI(t,e){Zc=Sf=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function mI(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,B0(t,n)}}var Cf={readContext:zr,useCallback:In,useContext:In,useEffect:In,useImperativeHandle:In,useInsertionEffect:In,useLayoutEffect:In,useMemo:In,useReducer:In,useRef:In,useState:In,useDebugValue:In,useDeferredValue:In,useTransition:In,useMutableSource:In,useSyncExternalStore:In,useId:In,unstable_isNewReconciler:!1},WD={readContext:zr,useCallback:function(t,e){return mi().memoizedState=[t,e===void 0?null:e],t},useContext:zr,useEffect:H_,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,Oh(4194308,4,aI.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Oh(4194308,4,t,e)},useInsertionEffect:function(t,e){return Oh(4,2,t,e)},useMemo:function(t,e){var n=mi();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=mi();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=zD.bind(null,Mt,t),[r.memoizedState,t]},useRef:function(t){var e=mi();return t={current:t},e.memoizedState=t},useState:W_,useDebugValue:c1,useDeferredValue:function(t){return mi().memoizedState=t},useTransition:function(){var t=W_(!1),e=t[0];return t=UD.bind(null,t[1]),mi().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=Mt,i=mi();if(It){if(n===void 0)throw Error(ee(407));n=n()}else{if(n=e(),un===null)throw Error(ee(349));Zs&30||ZC(r,e,n)}i.memoizedState=n;var o={value:n,getSnapshot:e};return i.queue=o,H_(tI.bind(null,r,o,t),[t]),r.flags|=2048,Mu(9,eI.bind(null,r,o,n,e),void 0,null),n},useId:function(){var t=mi(),e=un.identifierPrefix;if(It){var n=ji,r=zi;n=(r&~(1<<32-ni(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=Au++,0<\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=s.createElement(n,{is:r.is}):(t=s.createElement(n),n==="select"&&(s=t,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):t=s.createElementNS(t,n),t[vi]=e,t[Iu]=r,EI(t,e,!1,!1),e.stateNode=t;e:{switch(s=Uy(n,r),n){case"dialog":xt("cancel",t),xt("close",t),i=r;break;case"iframe":case"object":case"embed":xt("load",t),i=r;break;case"video":case"audio":for(i=0;ibl&&(e.flags|=128,r=!0,wc(o,!1),e.lanes=4194304)}else{if(!r)if(t=Ef(s),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),wc(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!It)return Pn(e),null}else 2*jt()-o.renderingStartTime>bl&&n!==1073741824&&(e.flags|=128,r=!0,wc(o,!1),e.lanes=4194304);o.isBackwards?(s.sibling=e.child,e.child=s):(n=o.last,n!==null?n.sibling=s:e.child=s,o.last=s)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=jt(),e.sibling=null,n=At.current,bt(At,r?n&1|2:n&1),e):(Pn(e),null);case 22:case 23:return m1(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?fr&1073741824&&(Pn(e),e.subtreeFlags&6&&(e.flags|=8192)):Pn(e),null;case 24:return null;case 25:return null}throw Error(ee(156,e.tag))}function JD(t,e){switch(Y0(e),e.tag){case 1:return tr(e.type)&&vf(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return vl(),Tt(er),Tt(On),i1(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return r1(e),null;case 13:if(Tt(At),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ee(340));gl()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Tt(At),null;case 4:return vl(),null;case 10:return Z0(e.type._context),null;case 22:case 23:return m1(),null;case 24:return null;default:return null}}var ch=!1,Mn=!1,ZD=typeof WeakSet=="function"?WeakSet:Set,de=null;function qa(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){$t(t,e,r)}else n.current=null}function pv(t,e,n){try{n()}catch(r){$t(t,e,r)}}var nx=!1;function eO(t,e){if(Xy=pf,t=NC(),q0(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,c=0,h=0,f=t,p=null;t:for(;;){for(var g;f!==n||i!==0&&f.nodeType!==3||(a=s+i),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(g=f.firstChild)!==null;)p=f,f=g;for(;;){if(f===t)break t;if(p===n&&++c===i&&(a=s),p===o&&++h===r&&(l=s),(g=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=g}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Jy={focusedElem:t,selectionRange:n},pf=!1,de=e;de!==null;)if(e=de,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,de=t;else for(;de!==null;){e=de;try{var w=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var b=w.memoizedProps,C=w.memoizedState,T=e.stateNode,y=T.getSnapshotBeforeUpdate(e.elementType===e.type?b:Qr(e.type,b),C);T.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var _=e.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ee(163))}}catch(S){$t(e,e.return,S)}if(t=e.sibling,t!==null){t.return=e.return,de=t;break}de=e.return}return w=nx,nx=!1,w}function eu(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var o=i.destroy;i.destroy=void 0,o!==void 0&&pv(e,n,o)}i=i.next}while(i!==r)}}function Ap(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function mv(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function II(t){var e=t.alternate;e!==null&&(t.alternate=null,II(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[vi],delete e[Iu],delete e[tv],delete e[LD],delete e[VD])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function PI(t){return t.tag===5||t.tag===3||t.tag===4}function rx(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||PI(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function gv(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=yf));else if(r!==4&&(t=t.child,t!==null))for(gv(t,e,n),t=t.sibling;t!==null;)gv(t,e,n),t=t.sibling}function yv(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(yv(t,e,n),t=t.sibling;t!==null;)yv(t,e,n),t=t.sibling}var gn=null,Xr=!1;function ko(t,e,n){for(n=n.child;n!==null;)RI(t,e,n),n=n.sibling}function RI(t,e,n){if(wi&&typeof wi.onCommitFiberUnmount=="function")try{wi.onCommitFiberUnmount(kp,n)}catch{}switch(n.tag){case 5:Mn||qa(n,e);case 6:var r=gn,i=Xr;gn=null,ko(t,e,n),gn=r,Xr=i,gn!==null&&(Xr?(t=gn,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):gn.removeChild(n.stateNode));break;case 18:gn!==null&&(Xr?(t=gn,n=n.stateNode,t.nodeType===8?Rg(t.parentNode,n):t.nodeType===1&&Rg(t,n),ku(t)):Rg(gn,n.stateNode));break;case 4:r=gn,i=Xr,gn=n.stateNode.containerInfo,Xr=!0,ko(t,e,n),gn=r,Xr=i;break;case 0:case 11:case 14:case 15:if(!Mn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&pv(n,e,s),i=i.next}while(i!==r)}ko(t,e,n);break;case 1:if(!Mn&&(qa(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){$t(n,e,a)}ko(t,e,n);break;case 21:ko(t,e,n);break;case 22:n.mode&1?(Mn=(r=Mn)||n.memoizedState!==null,ko(t,e,n),Mn=r):ko(t,e,n);break;default:ko(t,e,n)}}function ix(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new ZD),e.forEach(function(r){var i=cO.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Yr(t,e){var n=e.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=jt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*nO(r/1960))-r,10t?16:t,Bo===null)var r=!1;else{if(t=Bo,Bo=null,Rf=0,Qe&6)throw Error(ee(331));var i=Qe;for(Qe|=4,de=t.current;de!==null;){var o=de,s=o.child;if(de.flags&16){var a=o.deletions;if(a!==null){for(var l=0;ljt()-f1?qs(t,0):h1|=n),nr(t,e)}function FI(t,e){e===0&&(t.mode&1?(e=eh,eh<<=1,!(eh&130023424)&&(eh=4194304)):e=1);var n=zn();t=ro(t,e),t!==null&&(id(t,e,n),nr(t,n))}function lO(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),FI(t,n)}function cO(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(ee(314))}r!==null&&r.delete(e),FI(t,n)}var $I;$I=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||er.current)Jn=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return Jn=!1,QD(t,e,n);Jn=!!(t.flags&131072)}else Jn=!1,It&&e.flags&1048576&&jC(e,_f,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;Lh(t,e),t=e.pendingProps;var i=ml(e,On.current);il(e,n),i=s1(null,e,r,t,i,n);var o=a1();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,tr(r)?(o=!0,wf(e)):o=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,t1(e),i.updater=Rp,e.stateNode=i,i._reactInternals=e,av(e,r,t,n),e=uv(null,e,r,!0,o,n)):(e.tag=0,It&&o&&K0(e),Un(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(Lh(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=dO(r),t=Qr(r,t),i){case 0:e=cv(null,e,r,t,n);break e;case 1:e=Z_(null,e,r,t,n);break e;case 11:e=X_(null,e,r,t,n);break e;case 14:e=J_(null,e,r,Qr(r.type,t),n);break e}throw Error(ee(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Qr(r,i),cv(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Qr(r,i),Z_(t,e,r,i,n);case 3:e:{if(xI(e),t===null)throw Error(ee(387));r=e.pendingProps,o=e.memoizedState,i=o.element,YC(t,e),Tf(e,r,null,n);var s=e.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},e.updateQueue.baseState=o,e.memoizedState=o,e.flags&256){i=wl(Error(ee(423)),e),e=ex(t,e,r,n,i);break e}else if(r!==i){i=wl(Error(ee(424)),e),e=ex(t,e,r,n,i);break e}else for(vr=qo(e.stateNode.containerInfo.firstChild),wr=e,It=!0,Zr=null,n=qC(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(gl(),r===i){e=io(t,e,n);break e}Un(t,e,r,n)}e=e.child}return e;case 5:return QC(e),t===null&&iv(e),r=e.type,i=e.pendingProps,o=t!==null?t.memoizedProps:null,s=i.children,Zy(r,i)?s=null:o!==null&&Zy(r,o)&&(e.flags|=32),_I(t,e),Un(t,e,s,n),e.child;case 6:return t===null&&iv(e),null;case 13:return kI(t,e,n);case 4:return n1(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=yl(e,null,r,n):Un(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Qr(r,i),X_(t,e,r,i,n);case 7:return Un(t,e,e.pendingProps,n),e.child;case 8:return Un(t,e,e.pendingProps.children,n),e.child;case 12:return Un(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,o=e.memoizedProps,s=i.value,bt(xf,r._currentValue),r._currentValue=s,o!==null)if(si(o.value,s)){if(o.children===i.children&&!er.current){e=io(t,e,n);break e}}else for(o=e.child,o!==null&&(o.return=e);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=Yi(-1,n&-n),l.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var h=c.pending;h===null?l.next=l:(l.next=h.next,h.next=l),c.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),ov(o.return,n,e),a.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===e.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(ee(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),ov(s,n,e),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===e){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Un(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,il(e,n),i=zr(i),r=r(i),e.flags|=1,Un(t,e,r,n),e.child;case 14:return r=e.type,i=Qr(r,e.pendingProps),i=Qr(r.type,i),J_(t,e,r,i,n);case 15:return wI(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Qr(r,i),Lh(t,e),e.tag=1,tr(r)?(t=!0,wf(e)):t=!1,il(e,n),gI(e,r,i),av(e,r,i,n),uv(null,e,r,!0,t,n);case 19:return TI(t,e,n);case 22:return bI(t,e,n)}throw Error(ee(156,e.tag))};function BI(t,e){return fC(t,e)}function uO(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,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 $r(t,e,n,r){return new uO(t,e,n,r)}function y1(t){return t=t.prototype,!(!t||!t.isReactComponent)}function dO(t){if(typeof t=="function")return y1(t)?1:0;if(t!=null){if(t=t.$$typeof,t===L0)return 11;if(t===V0)return 14}return 2}function Xo(t,e){var n=t.alternate;return n===null?(n=$r(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function $h(t,e,n,r,i,o){var s=2;if(r=t,typeof t=="function")y1(t)&&(s=1);else if(typeof t=="string")s=5;else e:switch(t){case Fa:return Ks(n.children,i,o,e);case O0:s=8,i|=8;break;case Ay:return t=$r(12,n,e,i|2),t.elementType=Ay,t.lanes=o,t;case Ny:return t=$r(13,n,e,i),t.elementType=Ny,t.lanes=o,t;case My:return t=$r(19,n,e,i),t.elementType=My,t.lanes=o,t;case QS:return Mp(n,i,o,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case KS:s=10;break e;case YS:s=9;break e;case L0:s=11;break e;case V0:s=14;break e;case Ro:s=16,r=null;break e}throw Error(ee(130,t==null?t:typeof t,""))}return e=$r(s,n,e,i),e.elementType=t,e.type=r,e.lanes=o,e}function Ks(t,e,n,r){return t=$r(7,t,r,e),t.lanes=n,t}function Mp(t,e,n,r){return t=$r(22,t,r,e),t.elementType=QS,t.lanes=n,t.stateNode={isHidden:!1},t}function Fg(t,e,n){return t=$r(6,t,null,e),t.lanes=n,t}function $g(t,e,n){return e=$r(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function hO(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=wg(0),this.expirationTimes=wg(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wg(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function v1(t,e,n,r,i,o,s,a,l){return t=new hO(t,e,n,a,l),e===1?(e=1,o===!0&&(e|=8)):e=0,o=$r(3,null,null,e),t.current=o,o.stateNode=t,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},t1(o),t}function fO(t,e,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(WI)}catch(t){console.error(t)}}WI(),WS.exports=kr;var Fp=WS.exports;const $c=_p(Fp),vO=NS({__proto__:null,default:$c},[Fp]);var hx=Fp;Py.createRoot=hx.createRoot,Py.hydrateRoot=hx.hydrateRoot;/** * @remix-run/router v1.23.0 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Ct(){return Ct=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function _l(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function bO(){return Math.random().toString(36).substr(2,8)}function px(t,e){return{usr:t.state,key:t.key,idx:e}}function Ou(t,e,n,r){return n===void 0&&(n=null),Ct({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?ho(e):e,{state:n,key:e&&e.key||r||bO()})}function na(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function ho(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function _O(t,e,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=Ut.Pop,l=null,c=h();c==null&&(c=0,s.replaceState(Ct({},s.state,{idx:c}),""));function h(){return(s.state||{idx:null}).idx}function f(){a=Ut.Pop;let C=h(),T=C==null?null:C-c;c=C,l&&l({action:a,location:b.location,delta:T})}function p(C,T){a=Ut.Push;let y=Ou(b.location,C,T);n&&n(y,C),c=h()+1;let _=px(y,c),S=b.createHref(y);try{s.pushState(_,"",S)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;i.location.assign(S)}o&&l&&l({action:a,location:b.location,delta:1})}function g(C,T){a=Ut.Replace;let y=Ou(b.location,C,T);n&&n(y,C),c=h();let _=px(y,c),S=b.createHref(y);s.replaceState(_,"",S),o&&l&&l({action:a,location:b.location,delta:0})}function w(C){let T=i.location.origin!=="null"?i.location.origin:i.location.href,y=typeof C=="string"?C:na(C);return y=y.replace(/ $/,"%20"),Le(T,"No window.location.(origin|href) available to create URL for href: "+y),new URL(y,T)}let b={get action(){return a},get location(){return t(i,s)},listen(C){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(fx,f),l=C,()=>{i.removeEventListener(fx,f),l=null}},createHref(C){return e(i,C)},createURL:w,encodeLocation(C){let T=w(C);return{pathname:T.pathname,search:T.search,hash:T.hash}},push:p,replace:g,go(C){return s.go(C)}};return b}var ut;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(ut||(ut={}));const xO=new Set(["lazy","caseSensitive","path","id","index","children"]);function kO(t){return t.index===!0}function Mf(t,e,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),t.map((i,o)=>{let s=[...n,String(o)],a=typeof i.id=="string"?i.id:s.join("-");if(Le(i.index!==!0||!i.children,"Cannot specify children on an index route"),Le(!r[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),kO(i)){let l=Ct({},i,e(i),{id:a});return r[a]=l,l}else{let l=Ct({},i,e(i),{id:a,children:void 0});return r[a]=l,i.children&&(l.children=Mf(i.children,e,s,r)),l}})}function Vs(t,e,n){return n===void 0&&(n="/"),Bh(t,e,n,!1)}function Bh(t,e,n,r){let i=typeof e=="string"?ho(e):e,o=Ul(i.pathname||"/",n);if(o==null)return null;let s=HI(t);EO(s);let a=null;for(let l=0;a==null&&l{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};l.relativePath.startsWith("/")&&(Le(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 c=Qi([r,l.relativePath]),h=n.concat(l);o.children&&o.children.length>0&&(Le(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),HI(o.children,e,h,c)),!(o.path==null&&!o.index)&&e.push({path:c,score:NO(c,o.index),routesMeta:h})};return t.forEach((o,s)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))i(o,s);else for(let l of GI(o.path))i(o,s,l)}),e}function GI(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=GI(r.join("/")),a=[];return a.push(...s.map(l=>l===""?o:[o,l].join("/"))),i&&a.push(...s),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function EO(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:MO(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const SO=/^:[\w-]+$/,CO=3,IO=2,PO=1,RO=10,AO=-2,mx=t=>t==="*";function NO(t,e){let n=t.split("/"),r=n.length;return n.some(mx)&&(r+=AO),e&&(r+=IO),n.filter(i=>!mx(i)).reduce((i,o)=>i+(SO.test(o)?CO:o===""?PO:RO),r)}function MO(t,e){return t.length===e.length&&t.slice(0,-1).every((r,i)=>r===e[i])?t[t.length-1]-e[e.length-1]:0}function DO(t,e,n){n===void 0&&(n=!1);let{routesMeta:r}=t,i={},o="/",s=[];for(let a=0;a{let{paramName:p,isOptional:g}=h;if(p==="*"){let b=a[f]||"";s=o.slice(0,o.length-b.length).replace(/(.)\/+$/,"$1")}const w=a[f];return g&&!w?c[p]=void 0:c[p]=(w||"").replace(/%2F/g,"/"),c},{}),pathname:o,pathnameBase:s,pattern:t}}function OO(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),_l(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let r=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(r.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),r]}function LO(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return _l(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function Ul(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}function VO(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:i=""}=typeof t=="string"?ho(t):t;return{pathname:n?n.startsWith("/")?n:FO(n,e):e,search:BO(r),hash:UO(i)}}function FO(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Bg(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` 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 qI(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function $p(t,e){let n=qI(t);return e?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Bp(t,e,n,r){r===void 0&&(r=!1);let i;typeof t=="string"?i=ho(t):(i=Ct({},t),Le(!i.pathname||!i.pathname.includes("?"),Bg("?","pathname","search",i)),Le(!i.pathname||!i.pathname.includes("#"),Bg("#","pathname","hash",i)),Le(!i.search||!i.search.includes("#"),Bg("#","search","hash",i)));let o=t===""||i.pathname==="",s=o?"/":i.pathname,a;if(s==null)a=n;else{let f=e.length-1;if(!r&&s.startsWith("..")){let p=s.split("/");for(;p[0]==="..";)p.shift(),f-=1;i.pathname=p.join("/")}a=f>=0?e[f]:"/"}let l=VO(i,a),c=s&&s!=="/"&&s.endsWith("/"),h=(o||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||h)&&(l.pathname+="/"),l}const Qi=t=>t.join("/").replace(/\/\/+/g,"/"),$O=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),BO=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,UO=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;class Df{constructor(e,n,r,i){i===void 0&&(i=!1),this.status=e,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Lu(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const KI=["post","put","patch","delete"],zO=new Set(KI),jO=["get",...KI],WO=new Set(jO),HO=new Set([301,302,303,307,308]),GO=new Set([307,308]),Ug={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},qO={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},_c={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},x1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,KO=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),YI="remix-router-transitions";function YO(t){const e=t.window?t.window:typeof window<"u"?window:void 0,n=typeof e<"u"&&typeof e.document<"u"&&typeof e.document.createElement<"u",r=!n;Le(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(t.mapRouteProperties)i=t.mapRouteProperties;else if(t.detectErrorBoundary){let B=t.detectErrorBoundary;i=H=>({hasErrorBoundary:B(H)})}else i=KO;let o={},s=Mf(t.routes,i,void 0,o),a,l=t.basename||"/",c=t.dataStrategy||ZO,h=t.patchRoutesOnNavigation,f=Ct({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},t.future),p=null,g=new Set,w=null,b=null,C=null,T=t.hydrationData!=null,y=Vs(s,t.history.location,l),_=!1,S=null;if(y==null&&!h){let B=Yn(404,{pathname:t.history.location.pathname}),{matches:H,route:q}=Cx(s);y=H,S={[q.id]:B}}y&&!t.hydrationData&&Oi(y,s,t.history.location.pathname).active&&(y=null);let N;if(y)if(y.some(B=>B.route.lazy))N=!1;else if(!y.some(B=>B.route.loader))N=!0;else if(f.v7_partialHydration){let B=t.hydrationData?t.hydrationData.loaderData:null,H=t.hydrationData?t.hydrationData.errors:null;if(H){let q=y.findIndex(X=>H[X.route.id]!==void 0);N=y.slice(0,q+1).every(X=>!kv(X.route,B,H))}else N=y.every(q=>!kv(q.route,B,H))}else N=t.hydrationData!=null;else if(N=!1,y=[],f.v7_partialHydration){let B=Oi(null,s,t.history.location.pathname);B.active&&B.matches&&(_=!0,y=B.matches)}let D,v={historyAction:t.history.action,location:t.history.location,matches:y,initialized:N,navigation:Ug,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||S,fetchers:new Map,blockers:new Map},E=Ut.Pop,I=!1,P,L=!1,O=new Map,R=null,U=!1,$=!1,z=[],j=new Set,V=new Map,W=0,Y=-1,J=new Map,te=new Set,se=new Map,ae=new Map,ke=new Set,Te=new Map,Oe=new Map,pt;function at(){if(p=t.history.listen(B=>{let{action:H,location:q,delta:X}=B;if(pt){pt(),pt=void 0;return}_l(Oe.size===0||X!=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 re=rc({currentLocation:v.location,nextLocation:q,historyAction:H});if(re&&X!=null){let ve=new Promise(xe=>{pt=xe});t.history.go(X*-1),go(re,{state:"blocked",location:q,proceed(){go(re,{state:"proceeding",proceed:void 0,reset:void 0,location:q}),ve.then(()=>t.history.go(X))},reset(){let xe=new Map(v.blockers);xe.set(re,_c),Ne({blockers:xe})}});return}return tn(H,q)}),n){fL(e,O);let B=()=>pL(e,O);e.addEventListener("pagehide",B),R=()=>e.removeEventListener("pagehide",B)}return v.initialized||tn(Ut.Pop,v.location,{initialHydration:!0}),D}function yt(){p&&p(),R&&R(),g.clear(),P&&P.abort(),v.fetchers.forEach((B,H)=>cr(H)),v.blockers.forEach((B,H)=>Od(H))}function Re(B){return g.add(B),()=>g.delete(B)}function Ne(B,H){H===void 0&&(H={}),v=Ct({},v,B);let q=[],X=[];f.v7_fetcherPersist&&v.fetchers.forEach((re,ve)=>{re.state==="idle"&&(ke.has(ve)?X.push(ve):q.push(ve))}),ke.forEach(re=>{!v.fetchers.has(re)&&!V.has(re)&&X.push(re)}),[...g].forEach(re=>re(v,{deletedFetchers:X,viewTransitionOpts:H.viewTransitionOpts,flushSync:H.flushSync===!0})),f.v7_fetcherPersist?(q.forEach(re=>v.fetchers.delete(re)),X.forEach(re=>cr(re))):X.forEach(re=>ke.delete(re))}function Ce(B,H,q){var X,re;let{flushSync:ve}=q===void 0?{}:q,xe=v.actionData!=null&&v.navigation.formMethod!=null&&Jr(v.navigation.formMethod)&&v.navigation.state==="loading"&&((X=B.state)==null?void 0:X._isRedirect)!==!0,fe;H.actionData?Object.keys(H.actionData).length>0?fe=H.actionData:fe=null:xe?fe=v.actionData:fe=null;let me=H.loaderData?Ex(v.loaderData,H.loaderData,H.matches||[],H.errors):v.loaderData,ce=v.blockers;ce.size>0&&(ce=new Map(ce),ce.forEach((Fe,vt)=>ce.set(vt,_c)));let ye=I===!0||v.navigation.formMethod!=null&&Jr(v.navigation.formMethod)&&((re=B.state)==null?void 0:re._isRedirect)!==!0;a&&(s=a,a=void 0),U||E===Ut.Pop||(E===Ut.Push?t.history.push(B,B.state):E===Ut.Replace&&t.history.replace(B,B.state));let Ae;if(E===Ut.Pop){let Fe=O.get(v.location.pathname);Fe&&Fe.has(B.pathname)?Ae={currentLocation:v.location,nextLocation:B}:O.has(B.pathname)&&(Ae={currentLocation:B,nextLocation:v.location})}else if(L){let Fe=O.get(v.location.pathname);Fe?Fe.add(B.pathname):(Fe=new Set([B.pathname]),O.set(v.location.pathname,Fe)),Ae={currentLocation:v.location,nextLocation:B}}Ne(Ct({},H,{actionData:fe,loaderData:me,historyAction:E,location:B,initialized:!0,navigation:Ug,revalidation:"idle",restoreScrollPosition:oc(B,H.matches||v.matches),preventScrollReset:ye,blockers:ce}),{viewTransitionOpts:Ae,flushSync:ve===!0}),E=Ut.Pop,I=!1,L=!1,U=!1,$=!1,z=[]}async function Ge(B,H){if(typeof B=="number"){t.history.go(B);return}let q=xv(v.location,v.matches,l,f.v7_prependBasename,B,f.v7_relativeSplatPath,H==null?void 0:H.fromRouteId,H==null?void 0:H.relative),{path:X,submission:re,error:ve}=yx(f.v7_normalizeFormMethod,!1,q,H),xe=v.location,fe=Ou(v.location,X,H&&H.state);fe=Ct({},fe,t.history.encodeLocation(fe));let me=H&&H.replace!=null?H.replace:void 0,ce=Ut.Push;me===!0?ce=Ut.Replace:me===!1||re!=null&&Jr(re.formMethod)&&re.formAction===v.location.pathname+v.location.search&&(ce=Ut.Replace);let ye=H&&"preventScrollReset"in H?H.preventScrollReset===!0:void 0,Ae=(H&&H.flushSync)===!0,Fe=rc({currentLocation:xe,nextLocation:fe,historyAction:ce});if(Fe){go(Fe,{state:"blocked",location:fe,proceed(){go(Fe,{state:"proceeding",proceed:void 0,reset:void 0,location:fe}),Ge(B,H)},reset(){let vt=new Map(v.blockers);vt.set(Fe,_c),Ne({blockers:vt})}});return}return await tn(ce,fe,{submission:re,pendingError:ve,preventScrollReset:ye,replace:H&&H.replace,enableViewTransition:H&&H.viewTransition,flushSync:Ae})}function ot(){if(st(),Ne({revalidation:"loading"}),v.navigation.state!=="submitting"){if(v.navigation.state==="idle"){tn(v.historyAction,v.location,{startUninterruptedRevalidation:!0});return}tn(E||v.historyAction,v.navigation.location,{overrideNavigation:v.navigation,enableViewTransition:L===!0})}}async function tn(B,H,q){P&&P.abort(),P=null,E=B,U=(q&&q.startUninterruptedRevalidation)===!0,Di(v.location,v.matches),I=(q&&q.preventScrollReset)===!0,L=(q&&q.enableViewTransition)===!0;let X=a||s,re=q&&q.overrideNavigation,ve=q!=null&&q.initialHydration&&v.matches&&v.matches.length>0&&!_?v.matches:Vs(X,H,l),xe=(q&&q.flushSync)===!0;if(ve&&v.initialized&&!$&&oL(v.location,H)&&!(q&&q.submission&&Jr(q.submission.formMethod))){Ce(H,{matches:ve},{flushSync:xe});return}let fe=Oi(ve,X,H.pathname);if(fe.active&&fe.matches&&(ve=fe.matches),!ve){let{error:ct,notFoundMatches:Ke,route:wt}=wa(H.pathname);Ce(H,{matches:Ke,loaderData:{},errors:{[wt.id]:ct}},{flushSync:xe});return}P=new AbortController;let me=Sa(t.history,H,P.signal,q&&q.submission),ce;if(q&&q.pendingError)ce=[Fs(ve).route.id,{type:ut.error,error:q.pendingError}];else if(q&&q.submission&&Jr(q.submission.formMethod)){let ct=await hn(me,H,q.submission,ve,fe.active,{replace:q.replace,flushSync:xe});if(ct.shortCircuited)return;if(ct.pendingActionResult){let[Ke,wt]=ct.pendingActionResult;if(pr(wt)&&Lu(wt.error)&&wt.error.status===404){P=null,Ce(H,{matches:ct.matches,loaderData:{},errors:{[Ke]:wt.error}});return}}ve=ct.matches||ve,ce=ct.pendingActionResult,re=zg(H,q.submission),xe=!1,fe.active=!1,me=Sa(t.history,me.url,me.signal)}let{shortCircuited:ye,matches:Ae,loaderData:Fe,errors:vt}=await En(me,H,ve,fe.active,re,q&&q.submission,q&&q.fetcherSubmission,q&&q.replace,q&&q.initialHydration===!0,xe,ce);ye||(P=null,Ce(H,Ct({matches:Ae||ve},Sx(ce),{loaderData:Fe,errors:vt})))}async function hn(B,H,q,X,re,ve){ve===void 0&&(ve={}),st();let xe=dL(H,q);if(Ne({navigation:xe},{flushSync:ve.flushSync===!0}),re){let ce=await _s(X,H.pathname,B.signal);if(ce.type==="aborted")return{shortCircuited:!0};if(ce.type==="error"){let ye=Fs(ce.partialMatches).route.id;return{matches:ce.partialMatches,pendingActionResult:[ye,{type:ut.error,error:ce.error}]}}else if(ce.matches)X=ce.matches;else{let{notFoundMatches:ye,error:Ae,route:Fe}=wa(H.pathname);return{matches:ye,pendingActionResult:[Fe.id,{type:ut.error,error:Ae}]}}}let fe,me=Bc(X,H);if(!me.route.action&&!me.route.lazy)fe={type:ut.error,error:Yn(405,{method:B.method,pathname:H.pathname,routeId:me.route.id})};else if(fe=(await Gt("action",v,B,[me],X,null))[me.route.id],B.signal.aborted)return{shortCircuited:!0};if(js(fe)){let ce;return ve&&ve.replace!=null?ce=ve.replace:ce=xx(fe.response.headers.get("Location"),new URL(B.url),l)===v.location.pathname+v.location.search,await je(B,fe,!0,{submission:q,replace:ce}),{shortCircuited:!0}}if(Uo(fe))throw Yn(400,{type:"defer-action"});if(pr(fe)){let ce=Fs(X,me.route.id);return(ve&&ve.replace)!==!0&&(E=Ut.Push),{matches:X,pendingActionResult:[ce.route.id,fe]}}return{matches:X,pendingActionResult:[me.route.id,fe]}}async function En(B,H,q,X,re,ve,xe,fe,me,ce,ye){let Ae=re||zg(H,ve),Fe=ve||xe||Px(Ae),vt=!U&&(!f.v7_partialHydration||!me);if(X){if(vt){let Et=fn(ye);Ne(Ct({navigation:Ae},Et!==void 0?{actionData:Et}:{}),{flushSync:ce})}let We=await _s(q,H.pathname,B.signal);if(We.type==="aborted")return{shortCircuited:!0};if(We.type==="error"){let Et=Fs(We.partialMatches).route.id;return{matches:We.partialMatches,loaderData:{},errors:{[Et]:We.error}}}else if(We.matches)q=We.matches;else{let{error:Et,notFoundMatches:Li,route:bo}=wa(H.pathname);return{matches:Li,loaderData:{},errors:{[bo.id]:Et}}}}let ct=a||s,[Ke,wt]=wx(t.history,v,q,Fe,H,f.v7_partialHydration&&me===!0,f.v7_skipActionErrorRevalidation,$,z,j,ke,se,te,ct,l,ye);if(Mi(We=>!(q&&q.some(Et=>Et.route.id===We))||Ke&&Ke.some(Et=>Et.route.id===We)),Y=++W,Ke.length===0&&wt.length===0){let We=Pt();return Ce(H,Ct({matches:q,loaderData:{},errors:ye&&pr(ye[1])?{[ye[0]]:ye[1].error}:null},Sx(ye),We?{fetchers:new Map(v.fetchers)}:{}),{flushSync:ce}),{shortCircuited:!0}}if(vt){let We={};if(!X){We.navigation=Ae;let Et=fn(ye);Et!==void 0&&(We.actionData=Et)}wt.length>0&&(We.fetchers=pn(wt)),Ne(We,{flushSync:ce})}wt.forEach(We=>{he(We.key),We.controller&&V.set(We.key,We.controller)});let di=()=>wt.forEach(We=>he(We.key));P&&P.signal.addEventListener("abort",di);let{loaderResults:yo,fetcherResults:Cr}=await Fn(v,q,Ke,wt,B);if(B.signal.aborted)return{shortCircuited:!0};P&&P.signal.removeEventListener("abort",di),wt.forEach(We=>V.delete(We.key));let Ir=hh(yo);if(Ir)return await je(B,Ir.result,!0,{replace:fe}),{shortCircuited:!0};if(Ir=hh(Cr),Ir)return te.add(Ir.key),await je(B,Ir.result,!0,{replace:fe}),{shortCircuited:!0};let{loaderData:vo,errors:wo}=Tx(v,q,yo,ye,wt,Cr,Te);Te.forEach((We,Et)=>{We.subscribe(Li=>{(Li||We.done)&&Te.delete(Et)})}),f.v7_partialHydration&&me&&v.errors&&(wo=Ct({},v.errors,wo));let qr=Pt(),hi=ur(Y),Pr=qr||hi||wt.length>0;return Ct({matches:q,loaderData:vo,errors:wo},Pr?{fetchers:new Map(v.fetchers)}:{})}function fn(B){if(B&&!pr(B[1]))return{[B[0]]:B[1].data};if(v.actionData)return Object.keys(v.actionData).length===0?null:v.actionData}function pn(B){return B.forEach(H=>{let q=v.fetchers.get(H.key),X=xc(void 0,q?q.data:void 0);v.fetchers.set(H.key,X)}),new Map(v.fetchers)}function lt(B,H,q,X){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.");he(B);let re=(X&&X.flushSync)===!0,ve=a||s,xe=xv(v.location,v.matches,l,f.v7_prependBasename,q,f.v7_relativeSplatPath,H,X==null?void 0:X.relative),fe=Vs(ve,xe,l),me=Oi(fe,ve,xe);if(me.active&&me.matches&&(fe=me.matches),!fe){pe(B,H,Yn(404,{pathname:xe}),{flushSync:re});return}let{path:ce,submission:ye,error:Ae}=yx(f.v7_normalizeFormMethod,!0,xe,X);if(Ae){pe(B,H,Ae,{flushSync:re});return}let Fe=Bc(fe,ce),vt=(X&&X.preventScrollReset)===!0;if(ye&&Jr(ye.formMethod)){qn(B,H,ce,Fe,fe,me.active,re,vt,ye);return}se.set(B,{routeId:H,path:ce}),an(B,H,ce,Fe,fe,me.active,re,vt,ye)}async function qn(B,H,q,X,re,ve,xe,fe,me){st(),se.delete(B);function ce(Rt){if(!Rt.route.action&&!Rt.route.lazy){let fi=Yn(405,{method:me.formMethod,pathname:q,routeId:H});return pe(B,H,fi,{flushSync:xe}),!0}return!1}if(!ve&&ce(X))return;let ye=v.fetchers.get(B);Ee(B,hL(me,ye),{flushSync:xe});let Ae=new AbortController,Fe=Sa(t.history,q,Ae.signal,me);if(ve){let Rt=await _s(re,new URL(Fe.url).pathname,Fe.signal,B);if(Rt.type==="aborted")return;if(Rt.type==="error"){pe(B,H,Rt.error,{flushSync:xe});return}else if(Rt.matches){if(re=Rt.matches,X=Bc(re,q),ce(X))return}else{pe(B,H,Yn(404,{pathname:q}),{flushSync:xe});return}}V.set(B,Ae);let vt=W,Ke=(await Gt("action",v,Fe,[X],re,B))[X.route.id];if(Fe.signal.aborted){V.get(B)===Ae&&V.delete(B);return}if(f.v7_fetcherPersist&&ke.has(B)){if(js(Ke)||pr(Ke)){Ee(B,Co(void 0));return}}else{if(js(Ke))if(V.delete(B),Y>vt){Ee(B,Co(void 0));return}else return te.add(B),Ee(B,xc(me)),je(Fe,Ke,!1,{fetcherSubmission:me,preventScrollReset:fe});if(pr(Ke)){pe(B,H,Ke.error);return}}if(Uo(Ke))throw Yn(400,{type:"defer-action"});let wt=v.navigation.location||v.location,di=Sa(t.history,wt,Ae.signal),yo=a||s,Cr=v.navigation.state!=="idle"?Vs(yo,v.navigation.location,l):v.matches;Le(Cr,"Didn't find any matches after fetcher action");let Ir=++W;J.set(B,Ir);let vo=xc(me,Ke.data);v.fetchers.set(B,vo);let[wo,qr]=wx(t.history,v,Cr,me,wt,!1,f.v7_skipActionErrorRevalidation,$,z,j,ke,se,te,yo,l,[X.route.id,Ke]);qr.filter(Rt=>Rt.key!==B).forEach(Rt=>{let fi=Rt.key,_a=v.fetchers.get(fi),Vd=xc(void 0,_a?_a.data:void 0);v.fetchers.set(fi,Vd),he(fi),Rt.controller&&V.set(fi,Rt.controller)}),Ne({fetchers:new Map(v.fetchers)});let hi=()=>qr.forEach(Rt=>he(Rt.key));Ae.signal.addEventListener("abort",hi);let{loaderResults:Pr,fetcherResults:We}=await Fn(v,Cr,wo,qr,di);if(Ae.signal.aborted)return;Ae.signal.removeEventListener("abort",hi),J.delete(B),V.delete(B),qr.forEach(Rt=>V.delete(Rt.key));let Et=hh(Pr);if(Et)return je(di,Et.result,!1,{preventScrollReset:fe});if(Et=hh(We),Et)return te.add(Et.key),je(di,Et.result,!1,{preventScrollReset:fe});let{loaderData:Li,errors:bo}=Tx(v,Cr,Pr,void 0,qr,We,Te);if(v.fetchers.has(B)){let Rt=Co(Ke.data);v.fetchers.set(B,Rt)}ur(Ir),v.navigation.state==="loading"&&Ir>Y?(Le(E,"Expected pending action"),P&&P.abort(),Ce(v.navigation.location,{matches:Cr,loaderData:Li,errors:bo,fetchers:new Map(v.fetchers)})):(Ne({errors:bo,loaderData:Ex(v.loaderData,Li,Cr,bo),fetchers:new Map(v.fetchers)}),$=!1)}async function an(B,H,q,X,re,ve,xe,fe,me){let ce=v.fetchers.get(B);Ee(B,xc(me,ce?ce.data:void 0),{flushSync:xe});let ye=new AbortController,Ae=Sa(t.history,q,ye.signal);if(ve){let Ke=await _s(re,new URL(Ae.url).pathname,Ae.signal,B);if(Ke.type==="aborted")return;if(Ke.type==="error"){pe(B,H,Ke.error,{flushSync:xe});return}else if(Ke.matches)re=Ke.matches,X=Bc(re,q);else{pe(B,H,Yn(404,{pathname:q}),{flushSync:xe});return}}V.set(B,ye);let Fe=W,ct=(await Gt("loader",v,Ae,[X],re,B))[X.route.id];if(Uo(ct)&&(ct=await k1(ct,Ae.signal,!0)||ct),V.get(B)===ye&&V.delete(B),!Ae.signal.aborted){if(ke.has(B)){Ee(B,Co(void 0));return}if(js(ct))if(Y>Fe){Ee(B,Co(void 0));return}else{te.add(B),await je(Ae,ct,!1,{preventScrollReset:fe});return}if(pr(ct)){pe(B,H,ct.error);return}Le(!Uo(ct),"Unhandled fetcher deferred data"),Ee(B,Co(ct.data))}}async function je(B,H,q,X){let{submission:re,fetcherSubmission:ve,preventScrollReset:xe,replace:fe}=X===void 0?{}:X;H.response.headers.has("X-Remix-Revalidate")&&($=!0);let me=H.response.headers.get("Location");Le(me,"Expected a Location header on the redirect Response"),me=xx(me,new URL(B.url),l);let ce=Ou(v.location,me,{_isRedirect:!0});if(n){let Ke=!1;if(H.response.headers.has("X-Remix-Reload-Document"))Ke=!0;else if(x1.test(me)){const wt=t.history.createURL(me);Ke=wt.origin!==e.location.origin||Ul(wt.pathname,l)==null}if(Ke){fe?e.location.replace(me):e.location.assign(me);return}}P=null;let ye=fe===!0||H.response.headers.has("X-Remix-Replace")?Ut.Replace:Ut.Push,{formMethod:Ae,formAction:Fe,formEncType:vt}=v.navigation;!re&&!ve&&Ae&&Fe&&vt&&(re=Px(v.navigation));let ct=re||ve;if(GO.has(H.response.status)&&ct&&Jr(ct.formMethod))await tn(ye,ce,{submission:Ct({},ct,{formAction:me}),preventScrollReset:xe||I,enableViewTransition:q?L:void 0});else{let Ke=zg(ce,re);await tn(ye,ce,{overrideNavigation:Ke,fetcherSubmission:ve,preventScrollReset:xe||I,enableViewTransition:q?L:void 0})}}async function Gt(B,H,q,X,re,ve){let xe,fe={};try{xe=await eL(c,B,H,q,X,re,ve,o,i)}catch(me){return X.forEach(ce=>{fe[ce.route.id]={type:ut.error,error:me}}),fe}for(let[me,ce]of Object.entries(xe))if(sL(ce)){let ye=ce.result;fe[me]={type:ut.redirect,response:rL(ye,q,me,re,l,f.v7_relativeSplatPath)}}else fe[me]=await nL(ce);return fe}async function Fn(B,H,q,X,re){let ve=B.matches,xe=Gt("loader",B,re,q,H,null),fe=Promise.all(X.map(async ye=>{if(ye.matches&&ye.match&&ye.controller){let Fe=(await Gt("loader",B,Sa(t.history,ye.path,ye.controller.signal),[ye.match],ye.matches,ye.key))[ye.match.route.id];return{[ye.key]:Fe}}else return Promise.resolve({[ye.key]:{type:ut.error,error:Yn(404,{pathname:ye.path})}})})),me=await xe,ce=(await fe).reduce((ye,Ae)=>Object.assign(ye,Ae),{});return await Promise.all([cL(H,me,re.signal,ve,B.loaderData),uL(H,ce,X)]),{loaderResults:me,fetcherResults:ce}}function st(){$=!0,z.push(...Mi()),se.forEach((B,H)=>{V.has(H)&&j.add(H),he(H)})}function Ee(B,H,q){q===void 0&&(q={}),v.fetchers.set(B,H),Ne({fetchers:new Map(v.fetchers)},{flushSync:(q&&q.flushSync)===!0})}function pe(B,H,q,X){X===void 0&&(X={});let re=Fs(v.matches,H);cr(B),Ne({errors:{[re.route.id]:q},fetchers:new Map(v.fetchers)},{flushSync:(X&&X.flushSync)===!0})}function $n(B){return ae.set(B,(ae.get(B)||0)+1),ke.has(B)&&ke.delete(B),v.fetchers.get(B)||qO}function cr(B){let H=v.fetchers.get(B);V.has(B)&&!(H&&H.state==="loading"&&J.has(B))&&he(B),se.delete(B),J.delete(B),te.delete(B),f.v7_fetcherPersist&&ke.delete(B),j.delete(B),v.fetchers.delete(B)}function Ni(B){let H=(ae.get(B)||0)-1;H<=0?(ae.delete(B),ke.add(B),f.v7_fetcherPersist||cr(B)):ae.set(B,H),Ne({fetchers:new Map(v.fetchers)})}function he(B){let H=V.get(B);H&&(H.abort(),V.delete(B))}function Ze(B){for(let H of B){let q=$n(H),X=Co(q.data);v.fetchers.set(H,X)}}function Pt(){let B=[],H=!1;for(let q of te){let X=v.fetchers.get(q);Le(X,"Expected fetcher: "+q),X.state==="loading"&&(te.delete(q),B.push(q),H=!0)}return Ze(B),H}function ur(B){let H=[];for(let[q,X]of J)if(X0}function va(B,H){let q=v.blockers.get(B)||_c;return Oe.get(B)!==H&&Oe.set(B,H),q}function Od(B){v.blockers.delete(B),Oe.delete(B)}function go(B,H){let q=v.blockers.get(B)||_c;Le(q.state==="unblocked"&&H.state==="blocked"||q.state==="blocked"&&H.state==="blocked"||q.state==="blocked"&&H.state==="proceeding"||q.state==="blocked"&&H.state==="unblocked"||q.state==="proceeding"&&H.state==="unblocked","Invalid blocker state transition: "+q.state+" -> "+H.state);let X=new Map(v.blockers);X.set(B,H),Ne({blockers:X})}function rc(B){let{currentLocation:H,nextLocation:q,historyAction:X}=B;if(Oe.size===0)return;Oe.size>1&&_l(!1,"A router only supports one blocker at a time");let re=Array.from(Oe.entries()),[ve,xe]=re[re.length-1],fe=v.blockers.get(ve);if(!(fe&&fe.state==="proceeding")&&xe({currentLocation:H,nextLocation:q,historyAction:X}))return ve}function wa(B){let H=Yn(404,{pathname:B}),q=a||s,{matches:X,route:re}=Cx(q);return Mi(),{notFoundMatches:X,route:re,error:H}}function Mi(B){let H=[];return Te.forEach((q,X)=>{(!B||B(X))&&(q.cancel(),H.push(X),Te.delete(X))}),H}function ic(B,H,q){if(w=B,C=H,b=q||null,!T&&v.navigation===Ug){T=!0;let X=oc(v.location,v.matches);X!=null&&Ne({restoreScrollPosition:X})}return()=>{w=null,C=null,b=null}}function ba(B,H){return b&&b(B,H.map(X=>TO(X,v.loaderData)))||B.key}function Di(B,H){if(w&&C){let q=ba(B,H);w[q]=C()}}function oc(B,H){if(w){let q=ba(B,H),X=w[q];if(typeof X=="number")return X}return null}function Oi(B,H,q){if(h)if(B){if(Object.keys(B[0].params).length>0)return{active:!0,matches:Bh(H,q,l,!0)}}else return{active:!0,matches:Bh(H,q,l,!0)||[]};return{active:!1,matches:null}}async function _s(B,H,q,X){if(!h)return{type:"success",matches:B};let re=B;for(;;){let ve=a==null,xe=a||s,fe=o;try{await h({signal:q,path:H,matches:re,fetcherKey:X,patch:(ye,Ae)=>{q.aborted||_x(ye,Ae,xe,fe,i)}})}catch(ye){return{type:"error",error:ye,partialMatches:re}}finally{ve&&!q.aborted&&(s=[...s])}if(q.aborted)return{type:"aborted"};let me=Vs(xe,H,l);if(me)return{type:"success",matches:me};let ce=Bh(xe,H,l,!0);if(!ce||re.length===ce.length&&re.every((ye,Ae)=>ye.route.id===ce[Ae].route.id))return{type:"success",matches:null};re=ce}}function xs(B){o={},a=Mf(B,i,void 0,o)}function Ld(B,H){let q=a==null;_x(B,H,a||s,o,i),q&&(s=[...s],Ne({}))}return D={get basename(){return l},get future(){return f},get state(){return v},get routes(){return s},get window(){return e},initialize:at,subscribe:Re,enableScrollRestoration:ic,navigate:Ge,fetch:lt,revalidate:ot,createHref:B=>t.history.createHref(B),encodeLocation:B=>t.history.encodeLocation(B),getFetcher:$n,deleteFetcher:Ni,dispose:yt,getBlocker:va,deleteBlocker:Od,patchRoutes:Ld,_internalFetchControllers:V,_internalActiveDeferreds:Te,_internalSetRoutes:xs},D}function QO(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function xv(t,e,n,r,i,o,s,a){let l,c;if(s){l=[];for(let f of e)if(l.push(f),f.route.id===s){c=f;break}}else l=e,c=e[e.length-1];let h=Bp(i||".",$p(l,o),Ul(t.pathname,n)||t.pathname,a==="path");if(i==null&&(h.search=t.search,h.hash=t.hash),(i==null||i===""||i===".")&&c){let f=T1(h.search);if(c.route.index&&!f)h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index";else if(!c.route.index&&f){let p=new URLSearchParams(h.search),g=p.getAll("index");p.delete("index"),g.filter(b=>b).forEach(b=>p.append("index",b));let w=p.toString();h.search=w?"?"+w:""}}return r&&n!=="/"&&(h.pathname=h.pathname==="/"?n:Qi([n,h.pathname])),na(h)}function yx(t,e,n,r){if(!r||!QO(r))return{path:n};if(r.formMethod&&!lL(r.formMethod))return{path:n,error:Yn(405,{method:r.formMethod})};let i=()=>({path:n,error:Yn(400,{type:"invalid-body"})}),o=r.formMethod||"get",s=t?o.toUpperCase():o.toLowerCase(),a=JI(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Jr(s))return i();let p=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((g,w)=>{let[b,C]=w;return""+g+b+"="+C+` `},""):String(r.body);return{path:n,submission:{formMethod:s,formAction:a,formEncType:r.formEncType,formData:void 0,json:void 0,text:p}}}else if(r.formEncType==="application/json"){if(!Jr(s))return i();try{let p=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:s,formAction:a,formEncType:r.formEncType,formData:void 0,json:p,text:void 0}}}catch{return i()}}}Le(typeof FormData=="function","FormData is not available in this environment");let l,c;if(r.formData)l=Tv(r.formData),c=r.formData;else if(r.body instanceof FormData)l=Tv(r.body),c=r.body;else if(r.body instanceof URLSearchParams)l=r.body,c=kx(l);else if(r.body==null)l=new URLSearchParams,c=new FormData;else try{l=new URLSearchParams(r.body),c=kx(l)}catch{return i()}let h={formMethod:s,formAction:a,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:c,json:void 0,text:void 0};if(Jr(h.formMethod))return{path:n,submission:h};let f=ho(n);return e&&f.search&&T1(f.search)&&l.append("index",""),f.search="?"+l,{path:na(f),submission:h}}function vx(t,e,n){n===void 0&&(n=!1);let r=t.findIndex(i=>i.route.id===e);return r>=0?t.slice(0,n?r+1:r):t}function wx(t,e,n,r,i,o,s,a,l,c,h,f,p,g,w,b){let C=b?pr(b[1])?b[1].error:b[1].data:void 0,T=t.createURL(e.location),y=t.createURL(i),_=n;o&&e.errors?_=vx(n,Object.keys(e.errors)[0],!0):b&&pr(b[1])&&(_=vx(n,b[0]));let S=b?b[1].statusCode:void 0,N=s&&S&&S>=400,D=_.filter((E,I)=>{let{route:P}=E;if(P.lazy)return!0;if(P.loader==null)return!1;if(o)return kv(P,e.loaderData,e.errors);if(XO(e.loaderData,e.matches[I],E)||l.some(R=>R===E.route.id))return!0;let L=e.matches[I],O=E;return bx(E,Ct({currentUrl:T,currentParams:L.params,nextUrl:y,nextParams:O.params},r,{actionResult:C,actionStatus:S,defaultShouldRevalidate:N?!1:a||T.pathname+T.search===y.pathname+y.search||T.search!==y.search||QI(L,O)}))}),v=[];return f.forEach((E,I)=>{if(o||!n.some(U=>U.route.id===E.routeId)||h.has(I))return;let P=Vs(g,E.path,w);if(!P){v.push({key:I,routeId:E.routeId,path:E.path,matches:null,match:null,controller:null});return}let L=e.fetchers.get(I),O=Bc(P,E.path),R=!1;p.has(I)?R=!1:c.has(I)?(c.delete(I),R=!0):L&&L.state!=="idle"&&L.data===void 0?R=a:R=bx(O,Ct({currentUrl:T,currentParams:e.matches[e.matches.length-1].params,nextUrl:y,nextParams:n[n.length-1].params},r,{actionResult:C,actionStatus:S,defaultShouldRevalidate:N?!1:a})),R&&v.push({key:I,routeId:E.routeId,path:E.path,matches:P,match:O,controller:new AbortController})}),[D,v]}function kv(t,e,n){if(t.lazy)return!0;if(!t.loader)return!1;let r=e!=null&&e[t.id]!==void 0,i=n!=null&&n[t.id]!==void 0;return!r&&i?!1:typeof t.loader=="function"&&t.loader.hydrate===!0?!0:!r&&!i}function XO(t,e,n){let r=!e||n.route.id!==e.route.id,i=t[n.route.id]===void 0;return r||i}function QI(t,e){let n=t.route.path;return t.pathname!==e.pathname||n!=null&&n.endsWith("*")&&t.params["*"]!==e.params["*"]}function bx(t,e){if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate(e);if(typeof n=="boolean")return n}return e.defaultShouldRevalidate}function _x(t,e,n,r,i){var o;let s;if(t){let c=r[t];Le(c,"No route found to patch children into: routeId = "+t),c.children||(c.children=[]),s=c.children}else s=n;let a=e.filter(c=>!s.some(h=>XI(c,h))),l=Mf(a,i,[t||"_","patch",String(((o=s)==null?void 0:o.length)||"0")],r);s.push(...l)}function XI(t,e){return"id"in t&&"id"in e&&t.id===e.id?!0:t.index===e.index&&t.path===e.path&&t.caseSensitive===e.caseSensitive?(!t.children||t.children.length===0)&&(!e.children||e.children.length===0)?!0:t.children.every((n,r)=>{var i;return(i=e.children)==null?void 0:i.some(o=>XI(n,o))}):!1}async function JO(t,e,n){if(!t.lazy)return;let r=await t.lazy();if(!t.lazy)return;let i=n[t.id];Le(i,"No route found in manifest");let o={};for(let s in r){let l=i[s]!==void 0&&s!=="hasErrorBoundary";_l(!l,'Route "'+i.id+'" has a static property "'+s+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+s+'" will be ignored.')),!l&&!xO.has(s)&&(o[s]=r[s])}Object.assign(i,o),Object.assign(i,Ct({},e(i),{lazy:void 0}))}async function ZO(t){let{matches:e}=t,n=e.filter(i=>i.shouldLoad);return(await Promise.all(n.map(i=>i.resolve()))).reduce((i,o,s)=>Object.assign(i,{[n[s].route.id]:o}),{})}async function eL(t,e,n,r,i,o,s,a,l,c){let h=o.map(g=>g.route.lazy?JO(g.route,l,a):void 0),f=o.map((g,w)=>{let b=h[w],C=i.some(y=>y.route.id===g.route.id);return Ct({},g,{shouldLoad:C,resolve:async y=>(y&&r.method==="GET"&&(g.route.lazy||g.route.loader)&&(C=!0),C?tL(e,r,g,b,y,c):Promise.resolve({type:ut.data,result:void 0}))})}),p=await t({matches:f,request:r,params:o[0].params,fetcherKey:s,context:c});try{await Promise.all(h)}catch{}return p}async function tL(t,e,n,r,i,o){let s,a,l=c=>{let h,f=new Promise((w,b)=>h=b);a=()=>h(),e.signal.addEventListener("abort",a);let p=w=>typeof c!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+t+'" [routeId: '+n.route.id+"]"))):c({request:e,params:n.params,context:o},...w!==void 0?[w]:[]),g=(async()=>{try{return{type:"data",result:await(i?i(b=>p(b)):p())}}catch(w){return{type:"error",result:w}}})();return Promise.race([g,f])};try{let c=n.route[t];if(r)if(c){let h,[f]=await Promise.all([l(c).catch(p=>{h=p}),r]);if(h!==void 0)throw h;s=f}else if(await r,c=n.route[t],c)s=await l(c);else if(t==="action"){let h=new URL(e.url),f=h.pathname+h.search;throw Yn(405,{method:e.method,pathname:f,routeId:n.route.id})}else return{type:ut.data,result:void 0};else if(c)s=await l(c);else{let h=new URL(e.url),f=h.pathname+h.search;throw Yn(404,{pathname:f})}Le(s.result!==void 0,"You defined "+(t==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+t+"` ")+"function. Please return a value or `null`.")}catch(c){return{type:ut.error,result:c}}finally{a&&e.signal.removeEventListener("abort",a)}return s}async function nL(t){let{result:e,type:n}=t;if(ZI(e)){let f;try{let p=e.headers.get("Content-Type");p&&/\bapplication\/json\b/.test(p)?e.body==null?f=null:f=await e.json():f=await e.text()}catch(p){return{type:ut.error,error:p}}return n===ut.error?{type:ut.error,error:new Df(e.status,e.statusText,f),statusCode:e.status,headers:e.headers}:{type:ut.data,data:f,statusCode:e.status,headers:e.headers}}if(n===ut.error){if(Ix(e)){var r,i;if(e.data instanceof Error){var o,s;return{type:ut.error,error:e.data,statusCode:(o=e.init)==null?void 0:o.status,headers:(s=e.init)!=null&&s.headers?new Headers(e.init.headers):void 0}}return{type:ut.error,error:new Df(((r=e.init)==null?void 0:r.status)||500,void 0,e.data),statusCode:Lu(e)?e.status:void 0,headers:(i=e.init)!=null&&i.headers?new Headers(e.init.headers):void 0}}return{type:ut.error,error:e,statusCode:Lu(e)?e.status:void 0}}if(aL(e)){var a,l;return{type:ut.deferred,deferredData:e,statusCode:(a=e.init)==null?void 0:a.status,headers:((l=e.init)==null?void 0:l.headers)&&new Headers(e.init.headers)}}if(Ix(e)){var c,h;return{type:ut.data,data:e.data,statusCode:(c=e.init)==null?void 0:c.status,headers:(h=e.init)!=null&&h.headers?new Headers(e.init.headers):void 0}}return{type:ut.data,data:e}}function rL(t,e,n,r,i,o){let s=t.headers.get("Location");if(Le(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!x1.test(s)){let a=r.slice(0,r.findIndex(l=>l.route.id===n)+1);s=xv(new URL(e.url),a,i,!0,s,o),t.headers.set("Location",s)}return t}function xx(t,e,n){if(x1.test(t)){let r=t,i=r.startsWith("//")?new URL(e.protocol+r):new URL(r),o=Ul(i.pathname,n)!=null;if(i.origin===e.origin&&o)return i.pathname+i.search+i.hash}return t}function Sa(t,e,n,r){let i=t.createURL(JI(e)).toString(),o={signal:n};if(r&&Jr(r.formMethod)){let{formMethod:s,formEncType:a}=r;o.method=s.toUpperCase(),a==="application/json"?(o.headers=new Headers({"Content-Type":a}),o.body=JSON.stringify(r.json)):a==="text/plain"?o.body=r.text:a==="application/x-www-form-urlencoded"&&r.formData?o.body=Tv(r.formData):o.body=r.formData}return new Request(i,o)}function Tv(t){let e=new URLSearchParams;for(let[n,r]of t.entries())e.append(n,typeof r=="string"?r:r.name);return e}function kx(t){let e=new FormData;for(let[n,r]of t.entries())e.append(n,r);return e}function iL(t,e,n,r,i){let o={},s=null,a,l=!1,c={},h=n&&pr(n[1])?n[1].error:void 0;return t.forEach(f=>{if(!(f.route.id in e))return;let p=f.route.id,g=e[p];if(Le(!js(g),"Cannot handle redirect results in processLoaderData"),pr(g)){let w=g.error;if(h!==void 0&&(w=h,h=void 0),s=s||{},i)s[p]=w;else{let b=Fs(t,p);s[b.route.id]==null&&(s[b.route.id]=w)}o[p]=void 0,l||(l=!0,a=Lu(g.error)?g.error.status:500),g.headers&&(c[p]=g.headers)}else Uo(g)?(r.set(p,g.deferredData),o[p]=g.deferredData.data,g.statusCode!=null&&g.statusCode!==200&&!l&&(a=g.statusCode),g.headers&&(c[p]=g.headers)):(o[p]=g.data,g.statusCode&&g.statusCode!==200&&!l&&(a=g.statusCode),g.headers&&(c[p]=g.headers))}),h!==void 0&&n&&(s={[n[0]]:h},o[n[0]]=void 0),{loaderData:o,errors:s,statusCode:a||200,loaderHeaders:c}}function Tx(t,e,n,r,i,o,s){let{loaderData:a,errors:l}=iL(e,n,r,s,!1);return i.forEach(c=>{let{key:h,match:f,controller:p}=c,g=o[h];if(Le(g,"Did not find corresponding fetcher result"),!(p&&p.signal.aborted))if(pr(g)){let w=Fs(t.matches,f==null?void 0:f.route.id);l&&l[w.route.id]||(l=Ct({},l,{[w.route.id]:g.error})),t.fetchers.delete(h)}else if(js(g))Le(!1,"Unhandled fetcher revalidation redirect");else if(Uo(g))Le(!1,"Unhandled fetcher deferred data");else{let w=Co(g.data);t.fetchers.set(h,w)}}),{loaderData:a,errors:l}}function Ex(t,e,n,r){let i=Ct({},e);for(let o of n){let s=o.route.id;if(e.hasOwnProperty(s)?e[s]!==void 0&&(i[s]=e[s]):t[s]!==void 0&&o.route.loader&&(i[s]=t[s]),r&&r.hasOwnProperty(s))break}return i}function Sx(t){return t?pr(t[1])?{actionData:{}}:{actionData:{[t[0]]:t[1].data}}:{}}function Fs(t,e){return(e?t.slice(0,t.findIndex(r=>r.route.id===e)+1):[...t]).reverse().find(r=>r.route.hasErrorBoundary===!0)||t[0]}function Cx(t){let e=t.length===1?t[0]:t.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function Yn(t,e){let{pathname:n,routeId:r,method:i,type:o,message:s}=e===void 0?{}:e,a="Unknown Server Error",l="Unknown @remix-run/router error";return t===400?(a="Bad Request",i&&n&&r?l="You made a "+i+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":o==="defer-action"?l="defer() is not supported in actions":o==="invalid-body"&&(l="Unable to encode submission body")):t===403?(a="Forbidden",l='Route "'+r+'" does not match URL "'+n+'"'):t===404?(a="Not Found",l='No route matches URL "'+n+'"'):t===405&&(a="Method Not Allowed",i&&n&&r?l="You made a "+i.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":i&&(l='Invalid request method "'+i.toUpperCase()+'"')),new Df(t||500,a,new Error(l),!0)}function hh(t){let e=Object.entries(t);for(let n=e.length-1;n>=0;n--){let[r,i]=e[n];if(js(i))return{key:r,result:i}}}function JI(t){let e=typeof t=="string"?ho(t):t;return na(Ct({},e,{hash:""}))}function oL(t,e){return t.pathname!==e.pathname||t.search!==e.search?!1:t.hash===""?e.hash!=="":t.hash===e.hash?!0:e.hash!==""}function sL(t){return ZI(t.result)&&HO.has(t.result.status)}function Uo(t){return t.type===ut.deferred}function pr(t){return t.type===ut.error}function js(t){return(t&&t.type)===ut.redirect}function Ix(t){return typeof t=="object"&&t!=null&&"type"in t&&"data"in t&&"init"in t&&t.type==="DataWithResponseInit"}function aL(t){let e=t;return e&&typeof e=="object"&&typeof e.data=="object"&&typeof e.subscribe=="function"&&typeof e.cancel=="function"&&typeof e.resolveData=="function"}function ZI(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function lL(t){return WO.has(t.toLowerCase())}function Jr(t){return zO.has(t.toLowerCase())}async function cL(t,e,n,r,i){let o=Object.entries(e);for(let s=0;s(p==null?void 0:p.route.id)===a);if(!c)continue;let h=r.find(p=>p.route.id===c.route.id),f=h!=null&&!QI(h,c)&&(i&&i[c.route.id])!==void 0;Uo(l)&&f&&await k1(l,n,!1).then(p=>{p&&(e[a]=p)})}}async function uL(t,e,n){for(let r=0;r(c==null?void 0:c.route.id)===o)&&Uo(a)&&(Le(s,"Expected an AbortController for revalidating fetcher deferred result"),await k1(a,s.signal,!0).then(c=>{c&&(e[i]=c)}))}}async function k1(t,e,n){if(n===void 0&&(n=!1),!await t.deferredData.resolveData(e)){if(n)try{return{type:ut.data,data:t.deferredData.unwrappedData}}catch(i){return{type:ut.error,error:i}}return{type:ut.data,data:t.deferredData.data}}}function T1(t){return new URLSearchParams(t).getAll("index").some(e=>e==="")}function Bc(t,e){let n=typeof e=="string"?ho(e).search:e.search;if(t[t.length-1].route.index&&T1(n||""))return t[t.length-1];let r=qI(t);return r[r.length-1]}function Px(t){let{formMethod:e,formAction:n,formEncType:r,text:i,formData:o,json:s}=t;if(!(!e||!n||!r)){if(i!=null)return{formMethod:e,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(o!=null)return{formMethod:e,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0};if(s!==void 0)return{formMethod:e,formAction:n,formEncType:r,formData:void 0,json:s,text:void 0}}}function zg(t,e){return e?{state:"loading",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function dL(t,e){return{state:"submitting",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function xc(t,e){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function hL(t,e){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e?e.data:void 0}}function Co(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function fL(t,e){try{let n=t.sessionStorage.getItem(YI);if(n){let r=JSON.parse(n);for(let[i,o]of Object.entries(r||{}))o&&Array.isArray(o)&&e.set(i,new Set(o||[]))}}catch{}}function pL(t,e){if(e.size>0){let n={};for(let[r,i]of e)n[r]=[...i];try{t.sessionStorage.setItem(YI,JSON.stringify(n))}catch(r){_l(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** * React Router v6.30.1 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Vu(){return Vu=Object.assign?Object.assign.bind():function(t){for(var e=1;e{a.current=!0}),x.useCallback(function(c,h){if(h===void 0&&(h={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let f=Bp(c,JSON.parse(s),o,h.relative==="path");t==null&&e!=="/"&&(f.pathname=f.pathname==="/"?e:Qi([e,f.pathname])),(h.replace?r.replace:r.push)(f,h.state,h)},[e,r,s,o,t])}const yL=x.createContext(null);function vL(t){let e=x.useContext(fo).outlet;return e&&x.createElement(yL.Provider,{value:t},e)}function rP(t,e){let{relative:n}=e===void 0?{}:e,{future:r}=x.useContext(ys),{matches:i}=x.useContext(fo),{pathname:o}=po(),s=JSON.stringify($p(i,r.v7_relativeSplatPath));return x.useMemo(()=>Bp(t,JSON.parse(s),o,n==="path"),[t,s,o,n])}function wL(t,e,n,r){zl()||Le(!1);let{navigator:i}=x.useContext(ys),{matches:o}=x.useContext(fo),s=o[o.length-1],a=s?s.params:{};s&&s.pathname;let l=s?s.pathnameBase:"/";s&&s.route;let c=po(),h;if(e){var f;let C=typeof e=="string"?ho(e):e;l==="/"||(f=C.pathname)!=null&&f.startsWith(l)||Le(!1),h=C}else h=c;let p=h.pathname||"/",g=p;if(l!=="/"){let C=l.replace(/^\//,"").split("/");g="/"+p.replace(/^\//,"").split("/").slice(C.length).join("/")}let w=Vs(t,{pathname:g}),b=TL(w&&w.map(C=>Object.assign({},C,{params:Object.assign({},a,C.params),pathname:Qi([l,i.encodeLocation?i.encodeLocation(C.pathname).pathname:C.pathname]),pathnameBase:C.pathnameBase==="/"?l:Qi([l,i.encodeLocation?i.encodeLocation(C.pathnameBase).pathname:C.pathnameBase])})),o,n,r);return e&&b?x.createElement(zp.Provider,{value:{location:Vu({pathname:"/",search:"",hash:"",state:null,key:"default"},h),navigationType:Ut.Pop}},b):b}function bL(){let t=IL(),e=Lu(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},o=null;return x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},e),n?x.createElement("pre",{style:i},n):null,o)}const _L=x.createElement(bL,null);class xL extends x.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?x.createElement(fo.Provider,{value:this.props.routeContext},x.createElement(tP.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function kL(t){let{routeContext:e,match:n,children:r}=t,i=x.useContext(Up);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),x.createElement(fo.Provider,{value:e},r)}function TL(t,e,n,r){var i;if(e===void 0&&(e=[]),n===void 0&&(n=null),r===void 0&&(r=null),t==null){var o;if(!n)return null;if(n.errors)t=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let s=t,a=(i=n)==null?void 0:i.errors;if(a!=null){let h=s.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);h>=0||Le(!1),s=s.slice(0,Math.min(s.length,h+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let h=0;h=0?s=s.slice(0,c+1):s=[s[0]];break}}}return s.reduceRight((h,f,p)=>{let g,w=!1,b=null,C=null;n&&(g=a&&f.route.id?a[f.route.id]:void 0,b=f.route.errorElement||_L,l&&(c<0&&p===0?(RL("route-fallback",!1),w=!0,C=null):c===p&&(w=!0,C=f.route.hydrateFallbackElement||null)));let T=e.concat(s.slice(0,p+1)),y=()=>{let _;return g?_=b:w?_=C:f.route.Component?_=x.createElement(f.route.Component,null):f.route.element?_=f.route.element:_=h,x.createElement(kL,{match:f,routeContext:{outlet:h,matches:T,isDataRoute:n!=null},children:_})};return n&&(f.route.ErrorBoundary||f.route.errorElement||p===0)?x.createElement(xL,{location:n.location,revalidation:n.revalidation,component:b,error:g,children:y(),routeContext:{outlet:null,matches:T,isDataRoute:!0}}):y()},null)}var iP=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(iP||{}),Of=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(Of||{});function EL(t){let e=x.useContext(Up);return e||Le(!1),e}function SL(t){let e=x.useContext(eP);return e||Le(!1),e}function CL(t){let e=x.useContext(fo);return e||Le(!1),e}function oP(t){let e=CL(),n=e.matches[e.matches.length-1];return n.route.id||Le(!1),n.route.id}function IL(){var t;let e=x.useContext(tP),n=SL(Of.UseRouteError),r=oP(Of.UseRouteError);return e!==void 0?e:(t=n.errors)==null?void 0:t[r]}function PL(){let{router:t}=EL(iP.UseNavigateStable),e=oP(Of.UseNavigateStable),n=x.useRef(!1);return nP(()=>{n.current=!0}),x.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,Vu({fromRouteId:e},o)))},[t,e])}const Rx={};function RL(t,e,n){!e&&!Rx[t]&&(Rx[t]=!0)}function AL(t,e){t==null||t.v7_startTransition,(t==null?void 0:t.v7_relativeSplatPath)===void 0&&(!e||e.v7_relativeSplatPath),e&&(e.v7_fetcherPersist,e.v7_normalizeFormMethod,e.v7_partialHydration,e.v7_skipActionErrorRevalidation)}function Ax(t){let{to:e,replace:n,state:r,relative:i}=t;zl()||Le(!1);let{future:o,static:s}=x.useContext(ys),{matches:a}=x.useContext(fo),{pathname:l}=po(),c=jl(),h=Bp(e,$p(a,o.v7_relativeSplatPath),l,i==="path"),f=JSON.stringify(h);return x.useEffect(()=>c(JSON.parse(f),{replace:n,state:r,relative:i}),[c,f,i,n,r]),null}function NL(t){return vL(t.context)}function et(t){Le(!1)}function ML(t){let{basename:e="/",children:n=null,location:r,navigationType:i=Ut.Pop,navigator:o,static:s=!1,future:a}=t;zl()&&Le(!1);let l=e.replace(/^\/*/,"/"),c=x.useMemo(()=>({basename:l,navigator:o,static:s,future:Vu({v7_relativeSplatPath:!1},a)}),[l,a,o,s]);typeof r=="string"&&(r=ho(r));let{pathname:h="/",search:f="",hash:p="",state:g=null,key:w="default"}=r,b=x.useMemo(()=>{let C=Ul(h,l);return C==null?null:{location:{pathname:C,search:f,hash:p,state:g,key:w},navigationType:i}},[l,h,f,p,g,w,i]);return b==null?null:x.createElement(ys.Provider,{value:c},x.createElement(zp.Provider,{children:n,value:b}))}new Promise(()=>{});function Ev(t,e){e===void 0&&(e=[]);let n=[];return x.Children.forEach(t,(r,i)=>{if(!x.isValidElement(r))return;let o=[...e,i];if(r.type===x.Fragment){n.push.apply(n,Ev(r.props.children,o));return}r.type!==et&&Le(!1),!r.props.index||!r.props.children||Le(!1);let s={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=Ev(r.props.children,o)),n.push(s)}),n}function DL(t){let e={hasErrorBoundary:t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&Object.assign(e,{element:x.createElement(t.Component),Component:void 0}),t.HydrateFallback&&Object.assign(e,{hydrateFallbackElement:x.createElement(t.HydrateFallback),HydrateFallback:void 0}),t.ErrorBoundary&&Object.assign(e,{errorElement:x.createElement(t.ErrorBoundary),ErrorBoundary:void 0}),e}/** * React Router DOM v6.30.1 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Fu(){return Fu=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function LL(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function VL(t,e){return t.button===0&&(!e||e==="_self")&&!LL(t)}const FL=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],$L="6";try{window.__reactRouterVersion=$L}catch{}function BL(t,e){return YO({basename:e==null?void 0:e.basename,future:Fu({},e==null?void 0:e.future,{v7_prependBasename:!0}),history:wO({window:e==null?void 0:e.window}),hydrationData:(e==null?void 0:e.hydrationData)||UL(),routes:t,mapRouteProperties:DL,dataStrategy:e==null?void 0:e.dataStrategy,patchRoutesOnNavigation:e==null?void 0:e.patchRoutesOnNavigation,window:e==null?void 0:e.window}).initialize()}function UL(){var t;let e=(t=window)==null?void 0:t.__staticRouterHydrationData;return e&&e.errors&&(e=Fu({},e,{errors:zL(e.errors)})),e}function zL(t){if(!t)return null;let e=Object.entries(t),n={};for(let[r,i]of e)if(i&&i.__type==="RouteErrorResponse")n[r]=new Df(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let o=window[i.__subType];if(typeof o=="function")try{let s=new o(i.message);s.stack="",n[r]=s}catch{}}if(n[r]==null){let o=new Error(i.message);o.stack="",n[r]=o}}else n[r]=i;return n}const jL=x.createContext({isTransitioning:!1}),WL=x.createContext(new Map),HL="startTransition",Nx=lf[HL],GL="flushSync",Mx=vO[GL];function qL(t){Nx?Nx(t):t()}function kc(t){Mx?Mx(t):t()}let KL=class{constructor(){this.status="pending",this.promise=new Promise((e,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",e(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}};function YL(t){let{fallbackElement:e,router:n,future:r}=t,[i,o]=x.useState(n.state),[s,a]=x.useState(),[l,c]=x.useState({isTransitioning:!1}),[h,f]=x.useState(),[p,g]=x.useState(),[w,b]=x.useState(),C=x.useRef(new Map),{v7_startTransition:T}=r||{},y=x.useCallback(E=>{T?qL(E):E()},[T]),_=x.useCallback((E,I)=>{let{deletedFetchers:P,flushSync:L,viewTransitionOpts:O}=I;E.fetchers.forEach((U,$)=>{U.data!==void 0&&C.current.set($,U.data)}),P.forEach(U=>C.current.delete(U));let R=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!O||R){L?kc(()=>o(E)):y(()=>o(E));return}if(L){kc(()=>{p&&(h&&h.resolve(),p.skipTransition()),c({isTransitioning:!0,flushSync:!0,currentLocation:O.currentLocation,nextLocation:O.nextLocation})});let U=n.window.document.startViewTransition(()=>{kc(()=>o(E))});U.finished.finally(()=>{kc(()=>{f(void 0),g(void 0),a(void 0),c({isTransitioning:!1})})}),kc(()=>g(U));return}p?(h&&h.resolve(),p.skipTransition(),b({state:E,currentLocation:O.currentLocation,nextLocation:O.nextLocation})):(a(E),c({isTransitioning:!0,flushSync:!1,currentLocation:O.currentLocation,nextLocation:O.nextLocation}))},[n.window,p,h,C,y]);x.useLayoutEffect(()=>n.subscribe(_),[n,_]),x.useEffect(()=>{l.isTransitioning&&!l.flushSync&&f(new KL)},[l]),x.useEffect(()=>{if(h&&s&&n.window){let E=s,I=h.promise,P=n.window.document.startViewTransition(async()=>{y(()=>o(E)),await I});P.finished.finally(()=>{f(void 0),g(void 0),a(void 0),c({isTransitioning:!1})}),g(P)}},[y,s,h,n.window]),x.useEffect(()=>{h&&s&&i.location.key===s.location.key&&h.resolve()},[h,p,i.location,s]),x.useEffect(()=>{!l.isTransitioning&&w&&(a(w.state),c({isTransitioning:!0,flushSync:!1,currentLocation:w.currentLocation,nextLocation:w.nextLocation}),b(void 0))},[l.isTransitioning,w]),x.useEffect(()=>{},[]);let S=x.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:E=>n.navigate(E),push:(E,I,P)=>n.navigate(E,{state:I,preventScrollReset:P==null?void 0:P.preventScrollReset}),replace:(E,I,P)=>n.navigate(E,{replace:!0,state:I,preventScrollReset:P==null?void 0:P.preventScrollReset})}),[n]),N=n.basename||"/",D=x.useMemo(()=>({router:n,navigator:S,static:!1,basename:N}),[n,S,N]),v=x.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return x.useEffect(()=>AL(r,n.future),[r,n.future]),x.createElement(x.Fragment,null,x.createElement(Up.Provider,{value:D},x.createElement(eP.Provider,{value:i},x.createElement(WL.Provider,{value:C.current},x.createElement(jL.Provider,{value:l},x.createElement(ML,{basename:N,location:i.location,navigationType:i.historyAction,navigator:S,future:v},i.initialized||n.future.v7_partialHydration?x.createElement(QL,{routes:n.routes,future:n.future,state:i}):e))))),null)}const QL=x.memo(XL);function XL(t){let{routes:e,future:n,state:r}=t;return wL(e,void 0,r,n)}const JL=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ZL=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,$s=x.forwardRef(function(e,n){let{onClick:r,relative:i,reloadDocument:o,replace:s,state:a,target:l,to:c,preventScrollReset:h,viewTransition:f}=e,p=OL(e,FL),{basename:g}=x.useContext(ys),w,b=!1;if(typeof c=="string"&&ZL.test(c)&&(w=c,JL))try{let _=new URL(window.location.href),S=c.startsWith("//")?new URL(_.protocol+c):new URL(c),N=Ul(S.pathname,g);S.origin===_.origin&&N!=null?c=N+S.search+S.hash:b=!0}catch{}let C=mL(c,{relative:i}),T=eV(c,{replace:s,state:a,target:l,preventScrollReset:h,relative:i,viewTransition:f});function y(_){r&&r(_),_.defaultPrevented||T(_)}return x.createElement("a",Fu({},p,{href:w||C,onClick:b||o?r:y,ref:n,target:l}))});var Dx;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(Dx||(Dx={}));var Ox;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(Ox||(Ox={}));function eV(t,e){let{target:n,replace:r,state:i,preventScrollReset:o,relative:s,viewTransition:a}=e===void 0?{}:e,l=jl(),c=po(),h=rP(t,{relative:s});return x.useCallback(f=>{if(VL(f,n)){f.preventDefault();let p=r!==void 0?r:na(c)===na(h);l(t,{replace:p,state:i,preventScrollReset:o,relative:s,viewTransition:a})}},[c,l,h,r,i,n,t,o,s,a])}var sP={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Lx=Jt.createContext&&Jt.createContext(sP),tV=["attr","size","title"];function nV(t,e){if(t==null)return{};var n=rV(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function rV(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function Lf(){return Lf=Object.assign?Object.assign.bind():function(t){for(var e=1;eJt.createElement(e.tag,Vf({key:n},e.attr),aP(e.child)))}function Er(t){return e=>Jt.createElement(aV,Lf({attr:Vf({},t.attr)},e),aP(t.child))}function aV(t){var e=n=>{var{attr:r,size:i,title:o}=t,s=nV(t,tV),a=i||n.size||"1em",l;return n.className&&(l=n.className),t.className&&(l=(l?l+" ":"")+t.className),Jt.createElement("svg",Lf({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,s,{className:l,style:Vf(Vf({color:t.color||n.color},n.style),t.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),o&&Jt.createElement("title",null,o),t.children)};return Lx!==void 0?Jt.createElement(Lx.Consumer,null,n=>e(n)):e(sP)}function lP(t){return Er({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"},child:[]}]})(t)}function E1(t){return Er({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M504 256C504 119 393 8 256 8S8 119 8 256c0 123.78 90.69 226.38 209.25 245V327.69h-63V256h63v-54.64c0-62.15 37-96.48 93.67-96.48 27.14 0 55.52 4.84 55.52 4.84v61h-31.28c-30.8 0-40.41 19.12-40.41 38.73V256h68.78l-11 71.69h-57.78V501C413.31 482.38 504 379.78 504 256z"},child:[]}]})(t)}function S1(t){return Er({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"},child:[]}]})(t)}function C1(t){return Er({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3zM135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5 0 21.3-17.2 38.5-38.5 38.5zm282.1 243h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9V416z"},child:[]}]})(t)}function lV(t){return Er({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448,209.91a210.06,210.06,0,0,1-122.77-39.25V349.38A162.55,162.55,0,1,1,185,188.31V278.2a74.62,74.62,0,1,0,52.23,71.18V0l88,0a121.18,121.18,0,0,0,1.86,22.17h0A122.18,122.18,0,0,0,381,102.39a121.43,121.43,0,0,0,67,20.14Z"},child:[]}]})(t)}function cP(t){return Er({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"},child:[]}]})(t)}function cV(t){return Er({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M549.655 124.083c-6.281-23.65-24.787-42.276-48.284-48.597C458.781 64 288 64 288 64S117.22 64 74.629 75.486c-23.497 6.322-42.003 24.947-48.284 48.597-11.412 42.867-11.412 132.305-11.412 132.305s0 89.438 11.412 132.305c6.281 23.65 24.787 41.5 48.284 47.821C117.22 448 288 448 288 448s170.78 0 213.371-11.486c23.497-6.321 42.003-24.171 48.284-47.821 11.412-42.867 11.412-132.305 11.412-132.305s0-89.438-11.412-132.305zm-317.51 213.508V175.185l142.739 81.205-142.739 81.201z"},child:[]}]})(t)}function uP(t){return Er({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M502.3 190.8c3.9-3.1 9.7-.2 9.7 4.7V400c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V195.6c0-5 5.7-7.8 9.7-4.7 22.4 17.4 52.1 39.5 154.1 113.6 21.1 15.4 56.7 47.8 92.2 47.6 35.7.3 72-32.8 92.3-47.6 102-74.1 131.6-96.3 154-113.7zM256 320c23.2.4 56.6-29.2 73.4-41.4 132.7-96.3 142.8-104.7 173.4-128.7 5.8-4.5 9.2-11.5 9.2-18.9v-19c0-26.5-21.5-48-48-48H48C21.5 64 0 85.5 0 112v19c0 7.4 3.4 14.3 9.2 18.9 30.6 23.9 40.7 32.4 173.4 128.7 16.8 12.2 50.2 41.8 73.4 41.4z"},child:[]}]})(t)}function uV(t){return Er({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M349.565 98.783C295.978 98.783 251.721 64 184.348 64c-24.955 0-47.309 4.384-68.045 12.013a55.947 55.947 0 0 0 3.586-23.562C118.117 24.015 94.806 1.206 66.338.048 34.345-1.254 8 24.296 8 56c0 19.026 9.497 35.825 24 45.945V488c0 13.255 10.745 24 24 24h16c13.255 0 24-10.745 24-24v-94.4c28.311-12.064 63.582-22.122 114.435-22.122 53.588 0 97.844 34.783 165.217 34.783 48.169 0 86.667-16.294 122.505-40.858C506.84 359.452 512 349.571 512 339.045v-243.1c0-23.393-24.269-38.87-45.485-29.016-34.338 15.948-76.454 31.854-116.95 31.854z"},child:[]}]})(t)}function dV(t){return Er({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M480.07 96H160a160 160 0 1 0 114.24 272h91.52A160 160 0 1 0 480.07 96zM248 268a12 12 0 0 1-12 12h-52v52a12 12 0 0 1-12 12h-24a12 12 0 0 1-12-12v-52H84a12 12 0 0 1-12-12v-24a12 12 0 0 1 12-12h52v-52a12 12 0 0 1 12-12h24a12 12 0 0 1 12 12v52h52a12 12 0 0 1 12 12zm216 76a40 40 0 1 1 40-40 40 40 0 0 1-40 40zm64-96a40 40 0 1 1 40-40 40 40 0 0 1-40 40z"},child:[]}]})(t)}function hV(t){return Er({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M336.5 160C322 70.7 287.8 8 248 8s-74 62.7-88.5 152h177zM152 256c0 22.2 1.2 43.5 3.3 64h185.3c2.1-20.5 3.3-41.8 3.3-64s-1.2-43.5-3.3-64H155.3c-2.1 20.5-3.3 41.8-3.3 64zm324.7-96c-28.6-67.9-86.5-120.4-158-141.6 24.4 33.8 41.2 84.7 50 141.6h108zM177.2 18.4C105.8 39.6 47.8 92.1 19.3 160h108c8.7-56.9 25.5-107.8 49.9-141.6zM487.4 192H372.7c2.1 21 3.3 42.5 3.3 64s-1.2 43-3.3 64h114.6c5.5-20.5 8.6-41.8 8.6-64s-3.1-43.5-8.5-64zM120 256c0-21.5 1.2-43 3.3-64H8.6C3.2 212.5 0 233.8 0 256s3.2 43.5 8.6 64h114.6c-2-21-3.2-42.5-3.2-64zm39.5 96c14.5 89.3 48.7 152 88.5 152s74-62.7 88.5-152h-177zm159.3 141.6c71.4-21.2 129.4-73.7 158-141.6h-108c-8.8 56.9-25.6 107.8-50 141.6zM19.3 352c28.6 67.9 86.5 120.4 158 141.6-24.4-33.8-41.2-84.7-50-141.6h-108z"},child:[]}]})(t)}function fV(t){return Er({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M552 64H448V24c0-13.3-10.7-24-24-24H152c-13.3 0-24 10.7-24 24v40H24C10.7 64 0 74.7 0 88v56c0 35.7 22.5 72.4 61.9 100.7 31.5 22.7 69.8 37.1 110 41.7C203.3 338.5 240 360 240 360v72h-48c-35.3 0-64 20.7-64 56v12c0 6.6 5.4 12 12 12h296c6.6 0 12-5.4 12-12v-12c0-35.3-28.7-56-64-56h-48v-72s36.7-21.5 68.1-73.6c40.3-4.6 78.6-19 110-41.7 39.3-28.3 61.9-65 61.9-100.7V88c0-13.3-10.7-24-24-24zM99.3 192.8C74.9 175.2 64 155.6 64 144v-16h64.2c1 32.6 5.8 61.2 12.8 86.2-15.1-5.2-29.2-12.4-41.7-21.4zM512 144c0 16.1-17.7 36.1-35.3 48.8-12.5 9-26.7 16.2-41.8 21.4 7-25 11.8-53.6 12.8-86.2H512v16z"},child:[]}]})(t)}function pV(t){return Er({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"},child:[]}]})(t)}const mV="secretary@hack.melbourne",gV="https://discord.gg/tEQ5m6ayTV",yV="https://www.facebook.com/hack.melbourne/",vV="https://www.linkedin.com/company/hackmelbourne/",wV="https://www.instagram.com/hack.melbourne",I1="https://umsu.unimelb.edu.au/buddy-up/clubs/clubs-listing/join/hackmelbourne/",bV="https://github.com/HackMelbourne/HackMelbourne.github.io",P1=x.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),jp=x.createContext({}),Wp=x.createContext(null),Hp=typeof document<"u",ld=Hp?x.useLayoutEffect:x.useEffect,dP=x.createContext({strict:!1}),R1=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),_V="framerAppearId",hP="data-"+R1(_V);function xV(t,e,n,r){const{visualElement:i}=x.useContext(jp),o=x.useContext(dP),s=x.useContext(Wp),a=x.useContext(P1).reducedMotion,l=x.useRef();r=r||o.renderer,!l.current&&r&&(l.current=r(t,{visualState:e,parent:i,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:a}));const c=l.current;x.useInsertionEffect(()=>{c&&c.update(n,s)});const h=x.useRef(!!(n[hP]&&!window.HandoffComplete));return ld(()=>{c&&(c.render(),h.current&&c.animationState&&c.animationState.animateChanges())}),x.useEffect(()=>{c&&(c.updateFeatures(),!h.current&&c.animationState&&c.animationState.animateChanges(),h.current&&(h.current=!1,window.HandoffComplete=!0))}),c}function Ya(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function kV(t,e,n){return x.useCallback(r=>{r&&t.mount&&t.mount(r),e&&(r?e.mount(r):e.unmount()),n&&(typeof n=="function"?n(r):Ya(n)&&(n.current=r))},[e])}function $u(t){return typeof t=="string"||Array.isArray(t)}function Gp(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const A1=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],N1=["initial",...A1];function qp(t){return Gp(t.animate)||N1.some(e=>$u(t[e]))}function fP(t){return!!(qp(t)||t.variants)}function TV(t,e){if(qp(t)){const{initial:n,animate:r}=t;return{initial:n===!1||$u(n)?n:void 0,animate:$u(r)?r:void 0}}return t.inherit!==!1?e:{}}function EV(t){const{initial:e,animate:n}=TV(t,x.useContext(jp));return x.useMemo(()=>({initial:e,animate:n}),[Fx(e),Fx(n)])}function Fx(t){return Array.isArray(t)?t.join(" "):t}const $x={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Bu={};for(const t in $x)Bu[t]={isEnabled:e=>$x[t].some(n=>!!e[n])};function SV(t){for(const e in t)Bu[e]={...Bu[e],...t[e]}}const M1=x.createContext({}),pP=x.createContext({}),CV=Symbol.for("motionComponentSymbol");function IV({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:r,Component:i}){t&&SV(t);function o(a,l){let c;const h={...x.useContext(P1),...a,layoutId:PV(a)},{isStatic:f}=h,p=EV(a),g=r(a,f);if(!f&&Hp){p.visualElement=xV(i,g,h,e);const w=x.useContext(pP),b=x.useContext(dP).strict;p.visualElement&&(c=p.visualElement.loadFeatures(h,b,t,w))}return x.createElement(jp.Provider,{value:p},c&&p.visualElement?x.createElement(c,{visualElement:p.visualElement,...h}):null,n(i,a,kV(g,p.visualElement,l),g,f,p.visualElement))}const s=x.forwardRef(o);return s[CV]=i,s}function PV({layoutId:t}){const e=x.useContext(M1).id;return e&&t!==void 0?e+"-"+t:t}function RV(t){function e(r,i={}){return IV(t(r,i))}if(typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(r,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}const AV=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function D1(t){return typeof t!="string"||t.includes("-")?!1:!!(AV.indexOf(t)>-1||/[A-Z]/.test(t))}const Ff={};function NV(t){Object.assign(Ff,t)}const cd=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],fa=new Set(cd);function mP(t,{layout:e,layoutId:n}){return fa.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Ff[t]||t==="opacity")}const or=t=>!!(t&&t.getVelocity),MV={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},DV=cd.length;function OV(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},r,i){let o="";for(let s=0;se=>typeof e=="string"&&e.startsWith(t),yP=gP("--"),Sv=gP("var(--"),LV=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,VV=(t,e)=>e&&typeof t=="number"?e.transform(t):t,as=(t,e,n)=>Math.min(Math.max(n,t),e),pa={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},ru={...pa,transform:t=>as(0,1,t)},fh={...pa,default:1},iu=t=>Math.round(t*1e5)/1e5,Kp=/(-)?([\d]*\.?[\d])+/g,vP=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,FV=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function ud(t){return typeof t=="string"}const dd=t=>({test:e=>ud(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Io=dd("deg"),_i=dd("%"),Se=dd("px"),$V=dd("vh"),BV=dd("vw"),Bx={..._i,parse:t=>_i.parse(t)/100,transform:t=>_i.transform(t*100)},Ux={...pa,transform:Math.round},wP={borderWidth:Se,borderTopWidth:Se,borderRightWidth:Se,borderBottomWidth:Se,borderLeftWidth:Se,borderRadius:Se,radius:Se,borderTopLeftRadius:Se,borderTopRightRadius:Se,borderBottomRightRadius:Se,borderBottomLeftRadius:Se,width:Se,maxWidth:Se,height:Se,maxHeight:Se,size:Se,top:Se,right:Se,bottom:Se,left:Se,padding:Se,paddingTop:Se,paddingRight:Se,paddingBottom:Se,paddingLeft:Se,margin:Se,marginTop:Se,marginRight:Se,marginBottom:Se,marginLeft:Se,rotate:Io,rotateX:Io,rotateY:Io,rotateZ:Io,scale:fh,scaleX:fh,scaleY:fh,scaleZ:fh,skew:Io,skewX:Io,skewY:Io,distance:Se,translateX:Se,translateY:Se,translateZ:Se,x:Se,y:Se,z:Se,perspective:Se,transformPerspective:Se,opacity:ru,originX:Bx,originY:Bx,originZ:Se,zIndex:Ux,fillOpacity:ru,strokeOpacity:ru,numOctaves:Ux};function O1(t,e,n,r){const{style:i,vars:o,transform:s,transformOrigin:a}=t;let l=!1,c=!1,h=!0;for(const f in e){const p=e[f];if(yP(f)){o[f]=p;continue}const g=wP[f],w=VV(p,g);if(fa.has(f)){if(l=!0,s[f]=w,!h)continue;p!==(g.default||0)&&(h=!1)}else f.startsWith("origin")?(c=!0,a[f]=w):i[f]=w}if(e.transform||(l||r?i.transform=OV(t.transform,n,h,r):i.transform&&(i.transform="none")),c){const{originX:f="50%",originY:p="50%",originZ:g=0}=a;i.transformOrigin=`${f} ${p} ${g}`}}const L1=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function bP(t,e,n){for(const r in e)!or(e[r])&&!mP(r,n)&&(t[r]=e[r])}function UV({transformTemplate:t},e,n){return x.useMemo(()=>{const r=L1();return O1(r,e,{enableHardwareAcceleration:!n},t),Object.assign({},r.vars,r.style)},[e])}function zV(t,e,n){const r=t.style||{},i={};return bP(i,r,t),Object.assign(i,UV(t,e,n)),t.transformValues?t.transformValues(i):i}function jV(t,e,n){const r={},i=zV(t,e,n);return t.drag&&t.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(r.tabIndex=0),r.style=i,r}const WV=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function $f(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||WV.has(t)}let _P=t=>!$f(t);function HV(t){t&&(_P=e=>e.startsWith("on")?!$f(e):t(e))}try{HV(require("@emotion/is-prop-valid").default)}catch{}function GV(t,e,n){const r={};for(const i in t)i==="values"&&typeof t.values=="object"||(_P(i)||n===!0&&$f(i)||!e&&!$f(i)||t.draggable&&i.startsWith("onDrag"))&&(r[i]=t[i]);return r}function zx(t,e,n){return typeof t=="string"?t:Se.transform(e+n*t)}function qV(t,e,n){const r=zx(e,t.x,t.width),i=zx(n,t.y,t.height);return`${r} ${i}`}const KV={offset:"stroke-dashoffset",array:"stroke-dasharray"},YV={offset:"strokeDashoffset",array:"strokeDasharray"};function QV(t,e,n=1,r=0,i=!0){t.pathLength=1;const o=i?KV:YV;t[o.offset]=Se.transform(-r);const s=Se.transform(e),a=Se.transform(n);t[o.array]=`${s} ${a}`}function V1(t,{attrX:e,attrY:n,attrScale:r,originX:i,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...c},h,f,p){if(O1(t,c,h,p),f){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:g,style:w,dimensions:b}=t;g.transform&&(b&&(w.transform=g.transform),delete g.transform),b&&(i!==void 0||o!==void 0||w.transform)&&(w.transformOrigin=qV(b,i!==void 0?i:.5,o!==void 0?o:.5)),e!==void 0&&(g.x=e),n!==void 0&&(g.y=n),r!==void 0&&(g.scale=r),s!==void 0&&QV(g,s,a,l,!1)}const xP=()=>({...L1(),attrs:{}}),F1=t=>typeof t=="string"&&t.toLowerCase()==="svg";function XV(t,e,n,r){const i=x.useMemo(()=>{const o=xP();return V1(o,e,{enableHardwareAcceleration:!1},F1(r),t.transformTemplate),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};bP(o,t.style,t),i.style={...o,...i.style}}return i}function JV(t=!1){return(n,r,i,{latestValues:o},s)=>{const l=(D1(n)?XV:jV)(r,o,s,n),h={...GV(r,typeof n=="string",t),...l,ref:i},{children:f}=r,p=x.useMemo(()=>or(f)?f.get():f,[f]);return x.createElement(n,{...h,children:p})}}function kP(t,{style:e,vars:n},r,i){Object.assign(t.style,e,i&&i.getProjectionStyles(r));for(const o in n)t.style.setProperty(o,n[o])}const TP=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function EP(t,e,n,r){kP(t,e,void 0,r);for(const i in e.attrs)t.setAttribute(TP.has(i)?i:R1(i),e.attrs[i])}function $1(t,e){const{style:n}=t,r={};for(const i in n)(or(n[i])||e.style&&or(e.style[i])||mP(i,t))&&(r[i]=n[i]);return r}function SP(t,e){const n=$1(t,e);for(const r in t)if(or(t[r])||or(e[r])){const i=cd.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[i]=t[r]}return n}function B1(t,e,n,r={},i={}){return typeof e=="function"&&(e=e(n!==void 0?n:t.custom,r,i)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(n!==void 0?n:t.custom,r,i)),e}function hd(t){const e=x.useRef(null);return e.current===null&&(e.current=t()),e.current}const Bf=t=>Array.isArray(t),ZV=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),e5=t=>Bf(t)?t[t.length-1]||0:t;function Uh(t){const e=or(t)?t.get():t;return ZV(e)?e.toValue():e}function t5({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},r,i,o){const s={latestValues:n5(r,i,o,t),renderState:e()};return n&&(s.mount=a=>n(r,a,s)),s}const CP=t=>(e,n)=>{const r=x.useContext(jp),i=x.useContext(Wp),o=()=>t5(t,e,r,i);return n?o():hd(o)};function n5(t,e,n,r){const i={},o=r(t,{});for(const p in o)i[p]=Uh(o[p]);let{initial:s,animate:a}=t;const l=qp(t),c=fP(t);e&&c&&!l&&t.inherit!==!1&&(s===void 0&&(s=e.initial),a===void 0&&(a=e.animate));let h=n?n.initial===!1:!1;h=h||s===!1;const f=h?a:s;return f&&typeof f!="boolean"&&!Gp(f)&&(Array.isArray(f)?f:[f]).forEach(g=>{const w=B1(t,g);if(!w)return;const{transitionEnd:b,transition:C,...T}=w;for(const y in T){let _=T[y];if(Array.isArray(_)){const S=h?_.length-1:0;_=_[S]}_!==null&&(i[y]=_)}for(const y in b)i[y]=b[y]}),i}const Bt=t=>t;class jx{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const n=this.order.indexOf(e);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}function r5(t){let e=new jx,n=new jx,r=0,i=!1,o=!1;const s=new WeakSet,a={schedule:(l,c=!1,h=!1)=>{const f=h&&i,p=f?e:n;return c&&s.add(l),p.add(l)&&f&&i&&(r=e.order.length),l},cancel:l=>{n.remove(l),s.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[e,n]=[n,e],n.clear(),r=e.order.length,r)for(let c=0;c(f[p]=r5(()=>n=!0),f),{}),s=f=>o[f].process(i),a=()=>{const f=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(f-i.timestamp,i5),1),i.timestamp=f,i.isProcessing=!0,ph.forEach(s),i.isProcessing=!1,n&&e&&(r=!1,t(a))},l=()=>{n=!0,r=!0,i.isProcessing||t(a)};return{schedule:ph.reduce((f,p)=>{const g=o[p];return f[p]=(w,b=!1,C=!1)=>(n||l(),g.schedule(w,b,C)),f},{}),cancel:f=>ph.forEach(p=>o[p].cancel(f)),state:i,steps:o}}const{schedule:it,cancel:ai,state:yn,steps:jg}=o5(typeof requestAnimationFrame<"u"?requestAnimationFrame:Bt,!0),s5={useVisualState:CP({scrapeMotionValuesFromProps:SP,createRenderState:xP,onMount:(t,e,{renderState:n,latestValues:r})=>{it.read(()=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),it.render(()=>{V1(n,r,{enableHardwareAcceleration:!1},F1(e.tagName),t.transformTemplate),EP(e,n)})}})},a5={useVisualState:CP({scrapeMotionValuesFromProps:$1,createRenderState:L1})};function l5(t,{forwardMotionProps:e=!1},n,r){return{...D1(t)?s5:a5,preloadedFeatures:n,useRender:JV(e),createVisualElement:r,Component:t}}function Wi(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}const IP=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function Yp(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const c5=t=>e=>IP(e)&&t(e,Yp(e));function Xi(t,e,n,r){return Wi(t,e,c5(n),r)}const u5=(t,e)=>n=>e(t(n)),Jo=(...t)=>t.reduce(u5);function PP(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const Wx=PP("dragHorizontal"),Hx=PP("dragVertical");function RP(t){let e=!1;if(t==="y")e=Hx();else if(t==="x")e=Wx();else{const n=Wx(),r=Hx();n&&r?e=()=>{n(),r()}:(n&&n(),r&&r())}return e}function AP(){const t=RP(!0);return t?(t(),!1):!0}class vs{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Gx(t,e){const n="pointer"+(e?"enter":"leave"),r="onHover"+(e?"Start":"End"),i=(o,s)=>{if(o.pointerType==="touch"||AP())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e),a[r]&&it.update(()=>a[r](o,s))};return Xi(t.current,n,i,{passive:!t.getProps()[r]})}class d5 extends vs{mount(){this.unmount=Jo(Gx(this.node,!0),Gx(this.node,!1))}unmount(){}}class h5 extends vs{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Jo(Wi(this.node.current,"focus",()=>this.onFocus()),Wi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const NP=(t,e)=>e?t===e?!0:NP(t,e.parentElement):!1;function Wg(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,Yp(n))}class f5 extends vs{constructor(){super(...arguments),this.removeStartListeners=Bt,this.removeEndListeners=Bt,this.removeAccessibleListeners=Bt,this.startPointerPress=(e,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),o=Xi(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:h,globalTapTarget:f}=this.node.getProps();it.update(()=>{!f&&!NP(this.node.current,a.target)?h&&h(a,l):c&&c(a,l)})},{passive:!(r.onTap||r.onPointerUp)}),s=Xi(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Jo(o,s),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=o=>{if(o.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||Wg("up",(l,c)=>{const{onTap:h}=this.node.getProps();h&&it.update(()=>h(l,c))})};this.removeEndListeners(),this.removeEndListeners=Wi(this.node.current,"keyup",s),Wg("down",(a,l)=>{this.startPress(a,l)})},n=Wi(this.node.current,"keydown",e),r=()=>{this.isPressing&&Wg("cancel",(o,s)=>this.cancelPress(o,s))},i=Wi(this.node.current,"blur",r);this.removeAccessibleListeners=Jo(n,i)}}startPress(e,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&it.update(()=>r(e,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!AP()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&it.update(()=>r(e,n))}mount(){const e=this.node.getProps(),n=Xi(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),r=Wi(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Jo(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Cv=new WeakMap,Hg=new WeakMap,p5=t=>{const e=Cv.get(t.target);e&&e(t)},m5=t=>{t.forEach(p5)};function g5({root:t,...e}){const n=t||document;Hg.has(n)||Hg.set(n,{});const r=Hg.get(n),i=JSON.stringify(e);return r[i]||(r[i]=new IntersectionObserver(m5,{root:t,...e})),r[i]}function y5(t,e,n){const r=g5(e);return Cv.set(t,n),r.observe(t),()=>{Cv.delete(t),r.unobserve(t)}}const v5={some:0,all:1};class w5 extends vs{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=e,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:v5[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,o&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:h,onViewportLeave:f}=this.node.getProps(),p=c?h:f;p&&p(l)};return y5(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(b5(e,n))&&this.startObserver()}unmount(){}}function b5({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const _5={inView:{Feature:w5},tap:{Feature:f5},focus:{Feature:h5},hover:{Feature:d5}};function MP(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;re[r]=n.get()),e}function k5(t){const e={};return t.values.forEach((n,r)=>e[r]=n.getVelocity()),e}function Qp(t,e,n){const r=t.getProps();return B1(r,e,n!==void 0?n:r.custom,x5(t),k5(t))}let DP=Bt,Xp=Bt;const Zo=t=>t*1e3,Ji=t=>t/1e3,T5={current:!1},OP=t=>Array.isArray(t)&&typeof t[0]=="number";function LP(t){return!!(!t||typeof t=="string"&&VP[t]||OP(t)||Array.isArray(t)&&t.every(LP))}const Uc=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,VP={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Uc([0,.65,.55,1]),circOut:Uc([.55,0,1,.45]),backIn:Uc([.31,.01,.66,-.59]),backOut:Uc([.33,1.53,.69,.99])};function FP(t){if(t)return OP(t)?Uc(t):Array.isArray(t)?t.map(FP):VP[t]}function E5(t,e,n,{delay:r=0,duration:i,repeat:o=0,repeatType:s="loop",ease:a,times:l}={}){const c={[e]:n};l&&(c.offset=l);const h=FP(a);return Array.isArray(h)&&(c.easing=h),t.animate(c,{delay:r,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"})}function S5(t,{repeat:e,repeatType:n="loop"}){const r=e&&n!=="loop"&&e%2===1?0:t.length-1;return t[r]}const $P=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,C5=1e-7,I5=12;function P5(t,e,n,r,i){let o,s,a=0;do s=e+(n-e)/2,o=$P(s,r,i)-t,o>0?n=s:e=s;while(Math.abs(o)>C5&&++aP5(o,0,1,t,n);return o=>o===0||o===1?o:$P(i(o),e,r)}const R5=fd(.42,0,1,1),A5=fd(0,0,.58,1),BP=fd(.42,0,.58,1),N5=t=>Array.isArray(t)&&typeof t[0]!="number",UP=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,zP=t=>e=>1-t(1-e),U1=t=>1-Math.sin(Math.acos(t)),jP=zP(U1),M5=UP(U1),WP=fd(.33,1.53,.69,.99),z1=zP(WP),D5=UP(z1),O5=t=>(t*=2)<1?.5*z1(t):.5*(2-Math.pow(2,-10*(t-1))),L5={linear:Bt,easeIn:R5,easeInOut:BP,easeOut:A5,circIn:U1,circInOut:M5,circOut:jP,backIn:z1,backInOut:D5,backOut:WP,anticipate:O5},qx=t=>{if(Array.isArray(t)){Xp(t.length===4);const[e,n,r,i]=t;return fd(e,n,r,i)}else if(typeof t=="string")return L5[t];return t},j1=(t,e)=>n=>!!(ud(n)&&FV.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),HP=(t,e,n)=>r=>{if(!ud(r))return r;const[i,o,s,a]=r.match(Kp);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},V5=t=>as(0,255,t),Gg={...pa,transform:t=>Math.round(V5(t))},Ws={test:j1("rgb","red"),parse:HP("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+Gg.transform(t)+", "+Gg.transform(e)+", "+Gg.transform(n)+", "+iu(ru.transform(r))+")"};function F5(t){let e="",n="",r="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,r+=r,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Iv={test:j1("#"),parse:F5,transform:Ws.transform},Qa={test:j1("hsl","hue"),parse:HP("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+_i.transform(iu(e))+", "+_i.transform(iu(n))+", "+iu(ru.transform(r))+")"},Bn={test:t=>Ws.test(t)||Iv.test(t)||Qa.test(t),parse:t=>Ws.test(t)?Ws.parse(t):Qa.test(t)?Qa.parse(t):Iv.parse(t),transform:t=>ud(t)?t:t.hasOwnProperty("red")?Ws.transform(t):Qa.transform(t)},Nt=(t,e,n)=>-n*t+n*e+t;function qg(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function $5({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let i=0,o=0,s=0;if(!e)i=o=s=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=qg(l,a,t+1/3),o=qg(l,a,t),s=qg(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}const Kg=(t,e,n)=>{const r=t*t;return Math.sqrt(Math.max(0,n*(e*e-r)+r))},B5=[Iv,Ws,Qa],U5=t=>B5.find(e=>e.test(t));function Kx(t){const e=U5(t);let n=e.parse(t);return e===Qa&&(n=$5(n)),n}const GP=(t,e)=>{const n=Kx(t),r=Kx(e),i={...n};return o=>(i.red=Kg(n.red,r.red,o),i.green=Kg(n.green,r.green,o),i.blue=Kg(n.blue,r.blue,o),i.alpha=Nt(n.alpha,r.alpha,o),Ws.transform(i))};function z5(t){var e,n;return isNaN(t)&&ud(t)&&(((e=t.match(Kp))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(vP))===null||n===void 0?void 0:n.length)||0)>0}const qP={regex:LV,countKey:"Vars",token:"${v}",parse:Bt},KP={regex:vP,countKey:"Colors",token:"${c}",parse:Bn.parse},YP={regex:Kp,countKey:"Numbers",token:"${n}",parse:pa.parse};function Yg(t,{regex:e,countKey:n,token:r,parse:i}){const o=t.tokenised.match(e);o&&(t["num"+n]=o.length,t.tokenised=t.tokenised.replace(e,r),t.values.push(...o.map(i)))}function Uf(t){const e=t.toString(),n={value:e,tokenised:e,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&Yg(n,qP),Yg(n,KP),Yg(n,YP),n}function QP(t){return Uf(t).values}function XP(t){const{values:e,numColors:n,numVars:r,tokenised:i}=Uf(t),o=e.length;return s=>{let a=i;for(let l=0;ltypeof t=="number"?0:t;function W5(t){const e=QP(t);return XP(t)(e.map(j5))}const ls={test:z5,parse:QP,createTransformer:XP,getAnimatableNone:W5},JP=(t,e)=>n=>`${n>0?e:t}`;function ZP(t,e){return typeof t=="number"?n=>Nt(t,e,n):Bn.test(t)?GP(t,e):t.startsWith("var(")?JP(t,e):t2(t,e)}const e2=(t,e)=>{const n=[...t],r=n.length,i=t.map((o,s)=>ZP(o,e[s]));return o=>{for(let s=0;s{const n={...t,...e},r={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(r[i]=ZP(t[i],e[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}},t2=(t,e)=>{const n=ls.createTransformer(e),r=Uf(t),i=Uf(e);return r.numVars===i.numVars&&r.numColors===i.numColors&&r.numNumbers>=i.numNumbers?Jo(e2(r.values,i.values),n):JP(t,e)},xl=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r},Yx=(t,e)=>n=>Nt(t,e,n);function G5(t){return typeof t=="number"?Yx:typeof t=="string"?Bn.test(t)?GP:t2:Array.isArray(t)?e2:typeof t=="object"?H5:Yx}function q5(t,e,n){const r=[],i=n||G5(t[0]),o=t.length-1;for(let s=0;se[0];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const s=q5(e,r,i),a=s.length,l=c=>{let h=0;if(a>1)for(;hl(as(t[0],t[o-1],c)):l}function K5(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const i=xl(0,e,r);t.push(Nt(n,1,i))}}function n2(t){const e=[0];return K5(e,t.length-1),e}function Y5(t,e){return t.map(n=>n*e)}function Q5(t,e){return t.map(()=>e||BP).splice(0,t.length-1)}function zf({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const i=N5(r)?r.map(qx):qx(r),o={done:!1,value:e[0]},s=Y5(n&&n.length===e.length?n:n2(e),t),a=Jp(s,e,{ease:Array.isArray(i)?i:Q5(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}function W1(t,e){return e?t*(1e3/e):0}const X5=5;function r2(t,e,n){const r=Math.max(e-X5,0);return W1(n-t(r),e-r)}const Qg=.001,J5=.01,Qx=10,Z5=.05,e3=1;function t3({duration:t=800,bounce:e=.25,velocity:n=0,mass:r=1}){let i,o;DP(t<=Zo(Qx));let s=1-e;s=as(Z5,e3,s),t=as(J5,Qx,Ji(t)),s<1?(i=c=>{const h=c*s,f=h*t,p=h-n,g=Pv(c,s),w=Math.exp(-f);return Qg-p/g*w},o=c=>{const f=c*s*t,p=f*n+n,g=Math.pow(s,2)*Math.pow(c,2)*t,w=Math.exp(-f),b=Pv(Math.pow(c,2),s);return(-i(c)+Qg>0?-1:1)*((p-g)*w)/b}):(i=c=>{const h=Math.exp(-c*t),f=(c-n)*t+1;return-Qg+h*f},o=c=>{const h=Math.exp(-c*t),f=(n-c)*(t*t);return h*f});const a=5/t,l=r3(i,o,a);if(t=Zo(t),isNaN(l))return{stiffness:100,damping:10,duration:t};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:s*2*Math.sqrt(r*c),duration:t}}}const n3=12;function r3(t,e,n){let r=n;for(let i=1;it[n]!==void 0)}function s3(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!Xx(t,o3)&&Xx(t,i3)){const n=t3(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}function i2({keyframes:t,restDelta:e,restSpeed:n,...r}){const i=t[0],o=t[t.length-1],s={done:!1,value:i},{stiffness:a,damping:l,mass:c,duration:h,velocity:f,isResolvedFromDuration:p}=s3({...r,velocity:-Ji(r.velocity||0)}),g=f||0,w=l/(2*Math.sqrt(a*c)),b=o-i,C=Ji(Math.sqrt(a/c)),T=Math.abs(b)<5;n||(n=T?.01:2),e||(e=T?.005:.5);let y;if(w<1){const _=Pv(C,w);y=S=>{const N=Math.exp(-w*C*S);return o-N*((g+w*C*b)/_*Math.sin(_*S)+b*Math.cos(_*S))}}else if(w===1)y=_=>o-Math.exp(-C*_)*(b+(g+C*b)*_);else{const _=C*Math.sqrt(w*w-1);y=S=>{const N=Math.exp(-w*C*S),D=Math.min(_*S,300);return o-N*((g+w*C*b)*Math.sinh(D)+_*b*Math.cosh(D))/_}}return{calculatedDuration:p&&h||null,next:_=>{const S=y(_);if(p)s.done=_>=h;else{let N=g;_!==0&&(w<1?N=r2(y,_,S):N=0);const D=Math.abs(N)<=n,v=Math.abs(o-S)<=e;s.done=D&&v}return s.value=s.done?o:S,s}}}function Jx({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:h}){const f=t[0],p={done:!1,value:f},g=E=>a!==void 0&&El,w=E=>a===void 0?l:l===void 0||Math.abs(a-E)-b*Math.exp(-E/r),_=E=>T+y(E),S=E=>{const I=y(E),P=_(E);p.done=Math.abs(I)<=c,p.value=p.done?T:P};let N,D;const v=E=>{g(p.value)&&(N=E,D=i2({keyframes:[p.value,w(p.value)],velocity:r2(_,E,p.value),damping:i,stiffness:o,restDelta:c,restSpeed:h}))};return v(0),{calculatedDuration:null,next:E=>{let I=!1;return!D&&N===void 0&&(I=!0,S(E),v(E)),N!==void 0&&E>N?D.next(E-N):(!I&&S(E),p)}}}const a3=t=>{const e=({timestamp:n})=>t(n);return{start:()=>it.update(e,!0),stop:()=>ai(e),now:()=>yn.isProcessing?yn.timestamp:performance.now()}},Zx=2e4;function ek(t){let e=0;const n=50;let r=t.next(e);for(;!r.done&&e=Zx?1/0:e}const l3={decay:Jx,inertia:Jx,tween:zf,keyframes:zf,spring:i2};function jf({autoplay:t=!0,delay:e=0,driver:n=a3,keyframes:r,type:i="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:a="loop",onPlay:l,onStop:c,onComplete:h,onUpdate:f,...p}){let g=1,w=!1,b,C;const T=()=>{C=new Promise(J=>{b=J})};T();let y;const _=l3[i]||zf;let S;_!==zf&&typeof r[0]!="number"&&(S=Jp([0,100],r,{clamp:!1}),r=[0,100]);const N=_({...p,keyframes:r});let D;a==="mirror"&&(D=_({...p,keyframes:[...r].reverse(),velocity:-(p.velocity||0)}));let v="idle",E=null,I=null,P=null;N.calculatedDuration===null&&o&&(N.calculatedDuration=ek(N));const{calculatedDuration:L}=N;let O=1/0,R=1/0;L!==null&&(O=L+s,R=O*(o+1)-s);let U=0;const $=J=>{if(I===null)return;g>0&&(I=Math.min(I,J)),g<0&&(I=Math.min(J-R/g,I)),E!==null?U=E:U=Math.round(J-I)*g;const te=U-e*(g>=0?1:-1),se=g>=0?te<0:te>R;U=Math.max(te,0),v==="finished"&&E===null&&(U=R);let ae=U,ke=N;if(o){const at=Math.min(U,R)/O;let yt=Math.floor(at),Re=at%1;!Re&&at>=1&&(Re=1),Re===1&&yt--,yt=Math.min(yt,o+1),!!(yt%2)&&(a==="reverse"?(Re=1-Re,s&&(Re-=s/O)):a==="mirror"&&(ke=D)),ae=as(0,1,Re)*O}const Te=se?{done:!1,value:r[0]}:ke.next(ae);S&&(Te.value=S(Te.value));let{done:Oe}=Te;!se&&L!==null&&(Oe=g>=0?U>=R:U<=0);const pt=E===null&&(v==="finished"||v==="running"&&Oe);return f&&f(Te.value),pt&&V(),Te},z=()=>{y&&y.stop(),y=void 0},j=()=>{v="idle",z(),b(),T(),I=P=null},V=()=>{v="finished",h&&h(),z(),b()},W=()=>{if(w)return;y||(y=n($));const J=y.now();l&&l(),E!==null?I=J-E:(!I||v==="finished")&&(I=J),v==="finished"&&T(),P=I,E=null,v="running",y.start()};t&&W();const Y={then(J,te){return C.then(J,te)},get time(){return Ji(U)},set time(J){J=Zo(J),U=J,E!==null||!y||g===0?E=J:I=y.now()-J/g},get duration(){const J=N.calculatedDuration===null?ek(N):N.calculatedDuration;return Ji(J)},get speed(){return g},set speed(J){J===g||!y||(g=J,Y.time=Ji(U))},get state(){return v},play:W,pause:()=>{v="paused",E=U},stop:()=>{w=!0,v!=="idle"&&(v="idle",c&&c(),j())},cancel:()=>{P!==null&&$(P),j()},complete:()=>{v="finished"},sample:J=>(I=0,$(J))};return Y}function c3(t){let e;return()=>(e===void 0&&(e=t()),e)}const u3=c3(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),d3=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),mh=10,h3=2e4,f3=(t,e)=>e.type==="spring"||t==="backgroundColor"||!LP(e.ease);function p3(t,e,{onUpdate:n,onComplete:r,...i}){if(!(u3()&&d3.has(e)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let s=!1,a,l,c=!1;const h=()=>{l=new Promise(_=>{a=_})};h();let{keyframes:f,duration:p=300,ease:g,times:w}=i;if(f3(e,i)){const _=jf({...i,repeat:0,delay:0});let S={done:!1,value:f[0]};const N=[];let D=0;for(;!S.done&&D{c=!1,b.cancel()},T=()=>{c=!0,it.update(C),a(),h()};return b.onfinish=()=>{c||(t.set(S5(f,i)),r&&r(),T())},{then(_,S){return l.then(_,S)},attachTimeline(_){return b.timeline=_,b.onfinish=null,Bt},get time(){return Ji(b.currentTime||0)},set time(_){b.currentTime=Zo(_)},get speed(){return b.playbackRate},set speed(_){b.playbackRate=_},get duration(){return Ji(p)},play:()=>{s||(b.play(),ai(C))},pause:()=>b.pause(),stop:()=>{if(s=!0,b.playState==="idle")return;const{currentTime:_}=b;if(_){const S=jf({...i,autoplay:!1});t.setWithVelocity(S.sample(_-mh).value,S.sample(_).value,mh)}T()},complete:()=>{c||b.finish()},cancel:T}}function m3({keyframes:t,delay:e,onUpdate:n,onComplete:r}){const i=()=>(n&&n(t[t.length-1]),r&&r(),{time:0,speed:1,duration:0,play:Bt,pause:Bt,stop:Bt,then:o=>(o(),Promise.resolve()),cancel:Bt,complete:Bt});return e?jf({keyframes:[0,1],duration:0,delay:e,onComplete:i}):i()}const g3={type:"spring",stiffness:500,damping:25,restSpeed:10},y3=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),v3={type:"keyframes",duration:.8},w3={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},b3=(t,{keyframes:e})=>e.length>2?v3:fa.has(t)?t.startsWith("scale")?y3(e[1]):g3:w3,Rv=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ls.test(e)||e==="0")&&!e.startsWith("url(")),_3=new Set(["brightness","contrast","saturate","opacity"]);function x3(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(Kp)||[];if(!r)return t;const i=n.replace(r,"");let o=_3.has(e)?1:0;return r!==n&&(o*=100),e+"("+o+i+")"}const k3=/([a-z-]*)\(.*?\)/g,Av={...ls,getAnimatableNone:t=>{const e=t.match(k3);return e?e.map(x3).join(" "):t}},T3={...wP,color:Bn,backgroundColor:Bn,outlineColor:Bn,fill:Bn,stroke:Bn,borderColor:Bn,borderTopColor:Bn,borderRightColor:Bn,borderBottomColor:Bn,borderLeftColor:Bn,filter:Av,WebkitFilter:Av},H1=t=>T3[t];function o2(t,e){let n=H1(t);return n!==Av&&(n=ls),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const s2=t=>/^0[^.\s]+$/.test(t);function E3(t){if(typeof t=="number")return t===0;if(t!==null)return t==="none"||t==="0"||s2(t)}function S3(t,e,n,r){const i=Rv(e,n);let o;Array.isArray(n)?o=[...n]:o=[null,n];const s=r.from!==void 0?r.from:t.get();let a;const l=[];for(let c=0;ci=>{const o=G1(r,t)||{},s=o.delay||r.delay||0;let{elapsed:a=0}=r;a=a-Zo(s);const l=S3(e,t,n,o),c=l[0],h=l[l.length-1],f=Rv(t,c),p=Rv(t,h);let g={keyframes:l,velocity:e.getVelocity(),ease:"easeOut",...o,delay:-a,onUpdate:w=>{e.set(w),o.onUpdate&&o.onUpdate(w)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(C3(o)||(g={...g,...b3(t,g)}),g.duration&&(g.duration=Zo(g.duration)),g.repeatDelay&&(g.repeatDelay=Zo(g.repeatDelay)),!f||!p||T5.current||o.type===!1||I3.skipAnimations)return m3(g);if(!r.isHandoff&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const w=p3(e,t,g);if(w)return w}return jf(g)};function Wf(t){return!!(or(t)&&t.add)}const a2=t=>/^\-?\d*\.?\d+$/.test(t);function K1(t,e){t.indexOf(e)===-1&&t.push(e)}function Y1(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class Q1{constructor(){this.subscriptions=[]}add(e){return K1(this.subscriptions,e),()=>Y1(this.subscriptions,e)}notify(e,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,r);else for(let o=0;o!isNaN(parseFloat(t)),ou={current:void 0};class R3{constructor(e,n={}){this.version="10.18.0",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,i=!0)=>{this.prev=this.current,this.current=r;const{delta:o,timestamp:s}=yn;this.lastUpdated!==s&&(this.timeDelta=o,this.lastUpdated=s,it.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>it.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=P3(this.current),this.owner=n.owner}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Q1);const r=this.events[e].add(n);return e==="change"?()=>{r(),it.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,r){this.set(n),this.prev=e,this.timeDelta=r}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return ou.current&&ou.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?W1(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ei(t,e){return new R3(t,e)}const l2=t=>e=>e.test(t),A3={test:t=>t==="auto",parse:t=>t},c2=[pa,Se,_i,Io,BV,$V,A3],Tc=t=>c2.find(l2(t)),N3=[...c2,Bn,ls],M3=t=>N3.find(l2(t));function D3(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,ei(n))}function O3(t,e){const n=Qp(t,e);let{transitionEnd:r={},transition:i={},...o}=n?t.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const s in o){const a=e5(o[s]);D3(t,s,a)}}function L3(t,e,n){var r,i;const o=Object.keys(e).filter(a=>!t.hasValue(a)),s=o.length;if(s)for(let a=0;al.remove(f))),c.push(C)}return s&&Promise.all(c).then(()=>{s&&O3(t,s)}),c}function Nv(t,e,n={}){const r=Qp(t,e,n.custom);let{transition:i=t.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(u2(t,r,n)):()=>Promise.resolve(),s=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:h,staggerDirection:f}=i;return U3(t,e,c+l,h,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,c]=a==="beforeChildren"?[o,s]:[s,o];return l().then(()=>c())}else return Promise.all([o(),s(n.delay)])}function U3(t,e,n=0,r=0,i=1,o){const s=[],a=(t.variantChildren.size-1)*r,l=i===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(t.variantChildren).sort(z3).forEach((c,h)=>{c.notify("AnimationStart",e),s.push(Nv(c,e,{...o,delay:n+l(h)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(s)}function z3(t,e){return t.sortNodePosition(e)}function j3(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const i=e.map(o=>Nv(t,o,n));r=Promise.all(i)}else if(typeof e=="string")r=Nv(t,e,n);else{const i=typeof e=="function"?Qp(t,e,n.custom):e;r=Promise.all(u2(t,i,n))}return r.then(()=>t.notify("AnimationComplete",e))}const W3=[...A1].reverse(),H3=A1.length;function G3(t){return e=>Promise.all(e.map(({animation:n,options:r})=>j3(t,n,r)))}function q3(t){let e=G3(t);const n=Y3();let r=!0;const i=(l,c)=>{const h=Qp(t,c);if(h){const{transition:f,transitionEnd:p,...g}=h;l={...l,...g,...p}}return l};function o(l){e=l(t)}function s(l,c){const h=t.getProps(),f=t.getVariantContext(!0)||{},p=[],g=new Set;let w={},b=1/0;for(let T=0;Tb&&N,P=!1;const L=Array.isArray(S)?S:[S];let O=L.reduce(i,{});D===!1&&(O={});const{prevResolvedValues:R={}}=_,U={...R,...O},$=z=>{I=!0,g.has(z)&&(P=!0,g.delete(z)),_.needsAnimating[z]=!0};for(const z in U){const j=O[z],V=R[z];if(w.hasOwnProperty(z))continue;let W=!1;Bf(j)&&Bf(V)?W=!MP(j,V):W=j!==V,W?j!==void 0?$(z):g.add(z):j!==void 0&&g.has(z)?$(z):_.protectedKeys[z]=!0}_.prevProp=S,_.prevResolvedValues=O,_.isActive&&(w={...w,...O}),r&&t.blockInitialAnimation&&(I=!1),I&&(!v||P)&&p.push(...L.map(z=>({animation:z,options:{type:y,...l}})))}if(g.size){const T={};g.forEach(y=>{const _=t.getBaseTarget(y);_!==void 0&&(T[y]=_)}),p.push({animation:T})}let C=!!p.length;return r&&(h.initial===!1||h.initial===h.animate)&&!t.manuallyAnimateOnMount&&(C=!1),r=!1,C?e(p):Promise.resolve()}function a(l,c,h){var f;if(n[l].isActive===c)return Promise.resolve();(f=t.variantChildren)===null||f===void 0||f.forEach(g=>{var w;return(w=g.animationState)===null||w===void 0?void 0:w.setActive(l,c)}),n[l].isActive=c;const p=s(h,l);for(const g in n)n[g].protectedKeys={};return p}return{animateChanges:s,setActive:a,setAnimateFunction:o,getState:()=>n}}function K3(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!MP(e,t):!1}function Es(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Y3(){return{animate:Es(!0),whileInView:Es(),whileHover:Es(),whileTap:Es(),whileDrag:Es(),whileFocus:Es(),exit:Es()}}class Q3 extends vs{constructor(e){super(e),e.animationState||(e.animationState=q3(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),Gp(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let X3=0;class J3 extends vs{constructor(){super(...arguments),this.id=X3++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===i)return;const o=this.node.animationState.setActive("exit",!e,{custom:r??this.node.getProps().custom});n&&!e&&o.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const Z3={animation:{Feature:Q3},exit:{Feature:J3}},tk=(t,e)=>Math.abs(t-e);function eF(t,e){const n=tk(t.x,e.x),r=tk(t.y,e.y);return Math.sqrt(n**2+r**2)}class d2{constructor(e,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=Jg(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,g=eF(f.offset,{x:0,y:0})>=3;if(!p&&!g)return;const{point:w}=f,{timestamp:b}=yn;this.history.push({...w,timestamp:b});const{onStart:C,onMove:T}=this.handlers;p||(C&&C(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),T&&T(this.lastMoveEvent,f)},this.handlePointerMove=(f,p)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Xg(p,this.transformPagePoint),it.update(this.updatePoint,!0)},this.handlePointerUp=(f,p)=>{this.end();const{onEnd:g,onSessionEnd:w,resumeAnimation:b}=this.handlers;if(this.dragSnapToOrigin&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const C=Jg(f.type==="pointercancel"?this.lastMoveEventInfo:Xg(p,this.transformPagePoint),this.history);this.startEvent&&g&&g(f,C),w&&w(f,C)},!IP(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const s=Yp(e),a=Xg(s,this.transformPagePoint),{point:l}=a,{timestamp:c}=yn;this.history=[{...l,timestamp:c}];const{onSessionStart:h}=n;h&&h(e,Jg(a,this.history)),this.removeListeners=Jo(Xi(this.contextWindow,"pointermove",this.handlePointerMove),Xi(this.contextWindow,"pointerup",this.handlePointerUp),Xi(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),ai(this.updatePoint)}}function Xg(t,e){return e?{point:e(t.point)}:t}function nk(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Jg({point:t},e){return{point:t,delta:nk(t,h2(e)),offset:nk(t,tF(e)),velocity:nF(e,.1)}}function tF(t){return t[0]}function h2(t){return t[t.length-1]}function nF(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const i=h2(t);for(;n>=0&&(r=t[n],!(i.timestamp-r.timestamp>Zo(e)));)n--;if(!r)return{x:0,y:0};const o=Ji(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function xr(t){return t.max-t.min}function Mv(t,e=0,n=.01){return Math.abs(t-e)<=n}function rk(t,e,n,r=.5){t.origin=r,t.originPoint=Nt(e.min,e.max,t.origin),t.scale=xr(n)/xr(e),(Mv(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=Nt(n.min,n.max,t.origin)-t.originPoint,(Mv(t.translate)||isNaN(t.translate))&&(t.translate=0)}function su(t,e,n,r){rk(t.x,e.x,n.x,r?r.originX:void 0),rk(t.y,e.y,n.y,r?r.originY:void 0)}function ik(t,e,n){t.min=n.min+e.min,t.max=t.min+xr(e)}function rF(t,e,n){ik(t.x,e.x,n.x),ik(t.y,e.y,n.y)}function ok(t,e,n){t.min=e.min-n.min,t.max=t.min+xr(e)}function au(t,e,n){ok(t.x,e.x,n.x),ok(t.y,e.y,n.y)}function iF(t,{min:e,max:n},r){return e!==void 0&&tn&&(t=r?Nt(n,t,r.max):Math.min(t,n)),t}function sk(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function oF(t,{top:e,left:n,bottom:r,right:i}){return{x:sk(t.x,n,i),y:sk(t.y,e,r)}}function ak(t,e){let n=e.min-t.min,r=e.max-t.max;return e.max-e.minr?n=xl(e.min,e.max-r,t.min):r>i&&(n=xl(t.min,t.max-i,e.min)),as(0,1,n)}function lF(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Dv=.35;function cF(t=Dv){return t===!1?t=0:t===!0&&(t=Dv),{x:lk(t,"left","right"),y:lk(t,"top","bottom")}}function lk(t,e,n){return{min:ck(t,e),max:ck(t,n)}}function ck(t,e){return typeof t=="number"?t:t[e]||0}const uk=()=>({translate:0,scale:1,origin:0,originPoint:0}),Xa=()=>({x:uk(),y:uk()}),dk=()=>({min:0,max:0}),Kt=()=>({x:dk(),y:dk()});function Ar(t){return[t("x"),t("y")]}function f2({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function uF({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function dF(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Zg(t){return t===void 0||t===1}function Ov({scale:t,scaleX:e,scaleY:n}){return!Zg(t)||!Zg(e)||!Zg(n)}function Rs(t){return Ov(t)||p2(t)||t.z||t.rotate||t.rotateX||t.rotateY}function p2(t){return hk(t.x)||hk(t.y)}function hk(t){return t&&t!=="0%"}function Hf(t,e,n){const r=t-n,i=e*r;return n+i}function fk(t,e,n,r,i){return i!==void 0&&(t=Hf(t,i,r)),Hf(t,n,r)+e}function Lv(t,e=0,n=1,r,i){t.min=fk(t.min,e,n,r,i),t.max=fk(t.max,e,n,r,i)}function m2(t,{x:e,y:n}){Lv(t.x,e.translate,e.scale,e.originPoint),Lv(t.y,n.translate,n.scale,n.originPoint)}function hF(t,e,n,r=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,s;for(let a=0;a1.0000000000001||t<.999999999999?t:1}function No(t,e){t.min=t.min+e,t.max=t.max+e}function mk(t,e,[n,r,i]){const o=e[i]!==void 0?e[i]:.5,s=Nt(t.min,t.max,o);Lv(t,e[n],e[r],s,e.scale)}const fF=["x","scaleX","originX"],pF=["y","scaleY","originY"];function Ja(t,e){mk(t.x,e,fF),mk(t.y,e,pF)}function g2(t,e){return f2(dF(t.getBoundingClientRect(),e))}function mF(t,e,n){const r=g2(t,n),{scroll:i}=e;return i&&(No(r.x,i.offset.x),No(r.y,i.offset.y)),r}const y2=({current:t})=>t?t.ownerDocument.defaultView:null,gF=new WeakMap;class yF{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Kt(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=h=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Yp(h,"page").point)},o=(h,f)=>{const{drag:p,dragPropagation:g,onDragStart:w}=this.getProps();if(p&&!g&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=RP(p),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ar(C=>{let T=this.getAxisMotionValue(C).get()||0;if(_i.test(T)){const{projection:y}=this.visualElement;if(y&&y.layout){const _=y.layout.layoutBox[C];_&&(T=xr(_)*(parseFloat(T)/100))}}this.originPoint[C]=T}),w&&it.update(()=>w(h,f),!1,!0);const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},s=(h,f)=>{const{dragPropagation:p,dragDirectionLock:g,onDirectionLock:w,onDrag:b}=this.getProps();if(!p&&!this.openGlobalLock)return;const{offset:C}=f;if(g&&this.currentDirection===null){this.currentDirection=vF(C),this.currentDirection!==null&&w&&w(this.currentDirection);return}this.updateAxis("x",f.point,C),this.updateAxis("y",f.point,C),this.visualElement.render(),b&&b(h,f)},a=(h,f)=>this.stop(h,f),l=()=>Ar(h=>{var f;return this.getAnimationState(h)==="paused"&&((f=this.getAxisMotionValue(h).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new d2(e,{onSessionStart:i,onStart:o,onMove:s,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:y2(this.visualElement)})}stop(e,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&it.update(()=>o(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,r){const{drag:i}=this.getProps();if(!r||!gh(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let s=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(s=iF(s,this.constraints[e],this.elastic[e])),o.set(s)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,o=this.constraints;n&&Ya(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=oF(i.layoutBox,n):this.constraints=!1,this.elastic=cF(r),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Ar(s=>{this.getAxisMotionValue(s)&&(this.constraints[s]=lF(i.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Ya(e))return!1;const r=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=mF(r,i.root,this.visualElement.getTransformPagePoint());let s=sF(i.layout.layoutBox,o);if(n){const a=n(uF(s));this.hasMutatedConstraints=!!a,a&&(s=f2(a))}return s}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Ar(h=>{if(!gh(h,n,this.currentDirection))return;let f=l&&l[h]||{};s&&(f={min:0,max:0});const p=i?200:1e6,g=i?40:1e7,w={type:"inertia",velocity:r?e[h]:0,bounceStiffness:p,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(h,w)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return r.start(q1(e,r,0,n))}stopAnimation(){Ar(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){Ar(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n="_drag"+e.toUpperCase(),r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){Ar(n=>{const{drag:r}=this.getProps();if(!gh(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:a}=i.layout.layoutBox[n];o.set(e[n]-Nt(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Ya(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Ar(s=>{const a=this.getAxisMotionValue(s);if(a){const l=a.get();i[s]=aF({min:l,max:l},this.constraints[s])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ar(s=>{if(!gh(s,e,null))return;const a=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];a.set(Nt(l,c,i[s]))})}addListeners(){if(!this.visualElement.current)return;gF.set(this.visualElement,this);const e=this.visualElement.current,n=Xi(e,"pointerdown",l=>{const{drag:c,dragListener:h=!0}=this.getProps();c&&h&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Ya(l)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),r();const s=Wi(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Ar(h=>{const f=this.getAxisMotionValue(h);f&&(this.originPoint[h]+=l[h].translate,f.set(f.get()+l[h].translate))}),this.visualElement.render())});return()=>{s(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:s=Dv,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:a}}}function gh(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function vF(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class wF extends vs{constructor(e){super(e),this.removeGroupControls=Bt,this.removeListeners=Bt,this.controls=new yF(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Bt}unmount(){this.removeGroupControls(),this.removeListeners()}}const gk=t=>(e,n)=>{t&&it.update(()=>t(e,n))};class bF extends vs{constructor(){super(...arguments),this.removePointerDownListener=Bt}onPointerDown(e){this.session=new d2(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:y2(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:gk(e),onStart:gk(n),onMove:r,onEnd:(o,s)=>{delete this.session,i&&it.update(()=>i(o,s))}}}mount(){this.removePointerDownListener=Xi(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function _F(){const t=x.useContext(Wp);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:r}=t,i=x.useId();return x.useEffect(()=>r(i),[]),!e&&n?[!1,()=>n&&n(i)]:[!0]}const zh={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function yk(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Ec={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(Se.test(t))t=parseFloat(t);else return t;const n=yk(t,e.target.x),r=yk(t,e.target.y);return`${n}% ${r}%`}},xF={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,i=ls.parse(t);if(i.length>5)return r;const o=ls.createTransformer(t),s=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+s]/=a,i[1+s]/=l;const c=Nt(a,l,.5);return typeof i[2+s]=="number"&&(i[2+s]/=c),typeof i[3+s]=="number"&&(i[3+s]/=c),o(i)}};class kF extends Jt.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=e;NV(TF),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),zh.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,s=r.projection;return s&&(s.isPresent=o,i||e.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?s.promote():s.relegate()||it.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),queueMicrotask(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function v2(t){const[e,n]=_F(),r=x.useContext(M1);return Jt.createElement(kF,{...t,layoutGroup:r,switchLayoutGroup:x.useContext(pP),isPresent:e,safeToRemove:n})}const TF={borderRadius:{...Ec,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ec,borderTopRightRadius:Ec,borderBottomLeftRadius:Ec,borderBottomRightRadius:Ec,boxShadow:xF},w2=["TopLeft","TopRight","BottomLeft","BottomRight"],EF=w2.length,vk=t=>typeof t=="string"?parseFloat(t):t,wk=t=>typeof t=="number"||Se.test(t);function SF(t,e,n,r,i,o){i?(t.opacity=Nt(0,n.opacity!==void 0?n.opacity:1,CF(r)),t.opacityExit=Nt(e.opacity!==void 0?e.opacity:1,0,IF(r))):o&&(t.opacity=Nt(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;sre?1:n(xl(t,e,r))}function _k(t,e){t.min=e.min,t.max=e.max}function Rr(t,e){_k(t.x,e.x),_k(t.y,e.y)}function xk(t,e,n,r,i){return t-=e,t=Hf(t,1/n,r),i!==void 0&&(t=Hf(t,1/i,r)),t}function PF(t,e=0,n=1,r=.5,i,o=t,s=t){if(_i.test(e)&&(e=parseFloat(e),e=Nt(s.min,s.max,e/100)-s.min),typeof e!="number")return;let a=Nt(o.min,o.max,r);t===o&&(a-=e),t.min=xk(t.min,e,n,a,i),t.max=xk(t.max,e,n,a,i)}function kk(t,e,[n,r,i],o,s){PF(t,e[n],e[r],e[i],e.scale,o,s)}const RF=["x","scaleX","originX"],AF=["y","scaleY","originY"];function Tk(t,e,n,r){kk(t.x,e,RF,n?n.x:void 0,r?r.x:void 0),kk(t.y,e,AF,n?n.y:void 0,r?r.y:void 0)}function Ek(t){return t.translate===0&&t.scale===1}function _2(t){return Ek(t.x)&&Ek(t.y)}function NF(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function x2(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function Sk(t){return xr(t.x)/xr(t.y)}class MF{constructor(){this.members=[]}add(e){K1(this.members,e),e.scheduleRender()}remove(e){if(Y1(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(e,n){const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,n&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:r}=e;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Ck(t,e,n){let r="";const i=t.x.translate/e.x,o=t.y.translate/e.y;if((i||o)&&(r=`translate3d(${i}px, ${o}px, 0) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{rotate:l,rotateX:c,rotateY:h}=n;l&&(r+=`rotate(${l}deg) `),c&&(r+=`rotateX(${c}deg) `),h&&(r+=`rotateY(${h}deg) `)}const s=t.x.scale*e.x,a=t.y.scale*e.y;return(s!==1||a!==1)&&(r+=`scale(${s}, ${a})`),r||"none"}const DF=(t,e)=>t.depth-e.depth;class OF{constructor(){this.children=[],this.isDirty=!1}add(e){K1(this.children,e),this.isDirty=!0}remove(e){Y1(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(DF),this.isDirty=!1,this.children.forEach(e)}}function LF(t,e){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=e&&(ai(r),t(o-e))};return it.read(r,!0),()=>ai(r)}function VF(t){window.MotionDebug&&window.MotionDebug.record(t)}function FF(t){return t instanceof SVGElement&&t.tagName!=="svg"}function $F(t,e,n){const r=or(t)?t:ei(t);return r.start(q1("",r,e,n)),r.animation}const Ik=["","X","Y","Z"],BF={visibility:"hidden"},Pk=1e3;let UF=0;const As={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function k2({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},a=e==null?void 0:e()){this.id=UF++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,As.totalNodes=As.resolvedTargetDeltas=As.recalculatedProjection=0,this.nodes.forEach(WF),this.nodes.forEach(YF),this.nodes.forEach(QF),this.nodes.forEach(HF),VF(As)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;t(s,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=LF(p,250),zh.hasAnimatedSinceResize&&(zh.hasAnimatedSinceResize=!1,this.nodes.forEach(Ak))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&h&&(l||c)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:p,hasRelativeTargetChanged:g,layout:w})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||h.getDefaultTransition()||t$,{onLayoutAnimationStart:C,onLayoutAnimationComplete:T}=h.getProps(),y=!this.targetLayout||!x2(this.targetLayout,w)||g,_=!p&&g;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||_||p&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,_);const S={...G1(b,"layout"),onPlay:C,onComplete:T};(h.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else p||Ak(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=w})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,ai(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(XF),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;hthis.update()))}clearAllSnapshots(){this.nodes.forEach(GF),this.sharedNodes.forEach(JF)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,it.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){it.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const N=S/1e3;Nk(f.x,s.x,N),Nk(f.y,s.y,N),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(au(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ZF(this.relativeTarget,this.relativeTargetOrigin,p,N),_&&NF(this.relativeTarget,_)&&(this.isProjectionDirty=!1),_||(_=Kt()),Rr(_,this.relativeTarget)),b&&(this.animationValues=h,SF(h,c,this.latestValues,N,y,T)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=N},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(ai(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=it.update(()=>{zh.hasAnimatedSinceResize=!0,this.currentAnimation=$F(0,Pk,{...s,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Pk),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:h}=s;if(!(!a||!l||!c)){if(this!==s&&this.layout&&c&&T2(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Kt();const f=xr(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+f;const p=xr(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+p}Rr(a,l),Ja(a,h),su(this.projectionDeltaWithTransform,this.layoutCorrected,a,h)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new MF),this.sharedNodes.get(s).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:a}=this.options;return a?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:a}=this.options;return a?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(a=!0),!a)return;const c={};for(let h=0;h{var a;return(a=s.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Rk),this.root.sharedNodes.clear()}}}function zF(t){t.updateLayout()}function jF(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=t.layout,{animationType:o}=t.options,s=n.source!==t.layout.source;o==="size"?Ar(f=>{const p=s?n.measuredBox[f]:n.layoutBox[f],g=xr(p);p.min=r[f].min,p.max=p.min+g}):T2(o,n.layoutBox,r)&&Ar(f=>{const p=s?n.measuredBox[f]:n.layoutBox[f],g=xr(r[f]);p.max=p.min+g,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[f].max=t.relativeTarget[f].min+g)});const a=Xa();su(a,r,n.layoutBox);const l=Xa();s?su(l,t.applyTransform(i,!0),n.measuredBox):su(l,r,n.layoutBox);const c=!_2(a);let h=!1;if(!t.resumeFrom){const f=t.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:p,layout:g}=f;if(p&&g){const w=Kt();au(w,n.layoutBox,p.layoutBox);const b=Kt();au(b,r,g.layoutBox),x2(w,b)||(h=!0),f.options.layoutRoot&&(t.relativeTarget=b,t.relativeTargetOrigin=w,t.relativeParent=f)}}}t.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:h})}else if(t.isLead()){const{onExitComplete:r}=t.options;r&&r()}t.options.transition=void 0}function WF(t){As.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function HF(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function GF(t){t.clearSnapshot()}function Rk(t){t.clearMeasurements()}function qF(t){t.isLayoutDirty=!1}function KF(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Ak(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function YF(t){t.resolveTargetDelta()}function QF(t){t.calcProjection()}function XF(t){t.resetRotation()}function JF(t){t.removeLeadSnapshot()}function Nk(t,e,n){t.translate=Nt(e.translate,0,n),t.scale=Nt(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Mk(t,e,n,r){t.min=Nt(e.min,n.min,r),t.max=Nt(e.max,n.max,r)}function ZF(t,e,n,r){Mk(t.x,e.x,n.x,r),Mk(t.y,e.y,n.y,r)}function e$(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const t$={duration:.45,ease:[.4,0,.1,1]},Dk=t=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(t),Ok=Dk("applewebkit/")&&!Dk("chrome/")?Math.round:Bt;function Lk(t){t.min=Ok(t.min),t.max=Ok(t.max)}function n$(t){Lk(t.x),Lk(t.y)}function T2(t,e,n){return t==="position"||t==="preserve-aspect"&&!Mv(Sk(e),Sk(n),.2)}const r$=k2({attachResizeListener:(t,e)=>Wi(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ey={current:void 0},E2=k2({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ey.current){const t=new r$({});t.mount(window),t.setOptions({layoutScroll:!0}),ey.current=t}return ey.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),i$={pan:{Feature:bF},drag:{Feature:wF,ProjectionNode:E2,MeasureLayout:v2}},o$=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function s$(t){const e=o$.exec(t);if(!e)return[,];const[,n,r]=e;return[n,r]}function Vv(t,e,n=1){const[r,i]=s$(t);if(!r)return;const o=window.getComputedStyle(e).getPropertyValue(r);if(o){const s=o.trim();return a2(s)?parseFloat(s):s}else return Sv(i)?Vv(i,e,n+1):i}function a$(t,{...e},n){const r=t.current;if(!(r instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach(i=>{const o=i.get();if(!Sv(o))return;const s=Vv(o,r);s&&i.set(s)});for(const i in e){const o=e[i];if(!Sv(o))continue;const s=Vv(o,r);s&&(e[i]=s,n||(n={}),n[i]===void 0&&(n[i]=o))}return{target:e,transitionEnd:n}}const l$=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),S2=t=>l$.has(t),c$=t=>Object.keys(t).some(S2),Vk=t=>t===pa||t===Se,Fk=(t,e)=>parseFloat(t.split(", ")[e]),$k=(t,e)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return Fk(i[1],e);{const o=r.match(/^matrix\((.+)\)$/);return o?Fk(o[1],t):0}},u$=new Set(["x","y","z"]),d$=cd.filter(t=>!u$.has(t));function h$(t){const e=[];return d$.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}const kl={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:$k(4,13),y:$k(5,14)};kl.translateX=kl.x;kl.translateY=kl.y;const f$=(t,e,n)=>{const r=e.measureViewportBox(),i=e.current,o=getComputedStyle(i),{display:s}=o,a={};s==="none"&&e.setStaticValue("display",t.display||"block"),n.forEach(c=>{a[c]=kl[c](r,o)}),e.render();const l=e.measureViewportBox();return n.forEach(c=>{const h=e.getValue(c);h&&h.jump(a[c]),t[c]=kl[c](l,o)}),t},p$=(t,e,n={},r={})=>{e={...e},r={...r};const i=Object.keys(e).filter(S2);let o=[],s=!1;const a=[];if(i.forEach(l=>{const c=t.getValue(l);if(!t.hasValue(l))return;let h=n[l],f=Tc(h);const p=e[l];let g;if(Bf(p)){const w=p.length,b=p[0]===null?1:0;h=p[b],f=Tc(h);for(let C=b;C=0?window.pageYOffset:null,c=f$(e,t,a);return o.length&&o.forEach(([h,f])=>{t.getValue(h).set(f)}),t.render(),Hp&&l!==null&&window.scrollTo({top:l}),{target:c,transitionEnd:r}}else return{target:e,transitionEnd:r}};function m$(t,e,n,r){return c$(e)?p$(t,e,n,r):{target:e,transitionEnd:r}}const g$=(t,e,n,r)=>{const i=a$(t,e,r);return e=i.target,r=i.transitionEnd,m$(t,e,n,r)},Fv={current:null},C2={current:!1};function y$(){if(C2.current=!0,!!Hp)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Fv.current=t.matches;t.addListener(e),e()}else Fv.current=!1}function v$(t,e,n){const{willChange:r}=e;for(const i in e){const o=e[i],s=n[i];if(or(o))t.addValue(i,o),Wf(r)&&r.add(i);else if(or(s))t.addValue(i,ei(o,{owner:t})),Wf(r)&&r.remove(i);else if(s!==o)if(t.hasValue(i)){const a=t.getValue(i);!a.hasAnimated&&a.set(o)}else{const a=t.getStaticValue(i);t.addValue(i,ei(a!==void 0?a:o,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const Bk=new WeakMap,I2=Object.keys(Bu),w$=I2.length,Uk=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],b$=N1.length;class _${constructor({parent:e,props:n,presenceContext:r,reducedMotionConfig:i,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>it.render(this.render,!1,!0);const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=l,this.parent=e,this.props=n,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.isControllingVariants=qp(n),this.isVariantNode=fP(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(n,{});for(const f in h){const p=h[f];a[f]!==void 0&&or(p)&&(p.set(a[f],!1),Wf(c)&&c.add(f))}}scrapeMotionValuesFromProps(e,n){return{}}mount(e){this.current=e,Bk.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),C2.current||y$(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Fv.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Bk.delete(this.current),this.projection&&this.projection.unmount(),ai(this.notifyUpdate),ai(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features)this.features[e].unmount();this.current=null}bindToMotionValue(e,n){const r=fa.has(e),i=n.on("change",s=>{this.latestValues[e]=s,this.props.onUpdate&&it.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{i(),o()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...n},r,i,o){let s,a;for(let l=0;lthis.scheduleRender(),animationType:typeof c=="string"?c:"both",initialPromotionConfig:o,layoutScroll:p,layoutRoot:g})}return a}updateFeatures(){for(const e in this.features){const n=this.features[e];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Kt()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}makeTargetAnimatable(e,n=!0){return this.makeTargetAnimatableFromInstance(e,this.props,n)}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(e)}addValue(e,n){n!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,n)),this.values.set(e,n),this.latestValues[e]=n.get()}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return r===void 0&&n!==void 0&&(r=ei(n,{owner:this}),this.addValue(e,r)),r}readValue(e){var n;return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(n=this.getBaseTargetFromProps(this.props,e))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,e,this.options)}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=B1(this.props,r))===null||n===void 0?void 0:n[e]:void 0;if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,e);return o!==void 0&&!or(o)?o:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Q1),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class P2 extends _${sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:r}){delete n[e],delete r[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:n,...r},{transformValues:i},o){let s=F3(r,e||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),s&&(s=i(s))),o){L3(this,r,s);const a=g$(this,r,s,n);n=a.transitionEnd,r=a.target}return{transition:e,transitionEnd:n,...r}}}function x$(t){return window.getComputedStyle(t)}class k$ extends P2{constructor(){super(...arguments),this.type="html"}readValueFromInstance(e,n){if(fa.has(n)){const r=H1(n);return r&&r.default||0}else{const r=x$(e),i=(yP(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return g2(e,n)}build(e,n,r,i){O1(e,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(e,n){return $1(e,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;or(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(e,n,r,i){kP(e,n,r,i)}}class T$ extends P2{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(fa.has(n)){const r=H1(n);return r&&r.default||0}return n=TP.has(n)?n:R1(n),e.getAttribute(n)}measureInstanceViewportBox(){return Kt()}scrapeMotionValuesFromProps(e,n){return SP(e,n)}build(e,n,r,i){V1(e,n,r,this.isSVGTag,i.transformTemplate)}renderInstance(e,n,r,i){EP(e,n,r,i)}mount(e){this.isSVGTag=F1(e.tagName),super.mount(e)}}const E$=(t,e)=>D1(t)?new T$(e,{enableHardwareAcceleration:!1}):new k$(e,{enableHardwareAcceleration:!0}),S$={layout:{ProjectionNode:E2,MeasureLayout:v2}},C$={...Z3,..._5,...i$,...S$},rt=RV((t,e)=>l5(t,e,C$,E$));function R2(){const t=x.useRef(!1);return ld(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function I$(){const t=R2(),[e,n]=x.useState(0),r=x.useCallback(()=>{t.current&&n(e+1)},[e]);return[x.useCallback(()=>it.postRender(r),[r]),e]}class P$ extends x.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function R$({children:t,isPresent:e}){const n=x.useId(),r=x.useRef(null),i=x.useRef({width:0,height:0,top:0,left:0});return x.useInsertionEffect(()=>{const{width:o,height:s,top:a,left:l}=i.current;if(e||!r.current||!o||!s)return;r.current.dataset.motionPopId=n;const c=document.createElement("style");return document.head.appendChild(c),c.sheet&&c.sheet.insertRule(` [data-motion-pop-id="${n}"] { position: absolute !important; width: ${o}px !important; height: ${s}px !important; top: ${a}px !important; left: ${l}px !important; } `),()=>{document.head.removeChild(c)}},[e]),x.createElement(P$,{isPresent:e,childRef:r,sizeRef:i},x.cloneElement(t,{ref:r}))}const ty=({children:t,initial:e,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s})=>{const a=hd(A$),l=x.useId(),c=x.useMemo(()=>({id:l,initial:e,isPresent:n,custom:i,onExitComplete:h=>{a.set(h,!0);for(const f of a.values())if(!f)return;r&&r()},register:h=>(a.set(h,!1),()=>a.delete(h))}),o?void 0:[n]);return x.useMemo(()=>{a.forEach((h,f)=>a.set(f,!1))},[n]),x.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),s==="popLayout"&&(t=x.createElement(R$,{isPresent:n},t)),x.createElement(Wp.Provider,{value:c},t)};function A$(){return new Map}function N$(t){return x.useEffect(()=>()=>t(),[])}const Ns=t=>t.key||"";function M$(t,e){t.forEach(n=>{const r=Ns(n);e.set(r,n)})}function D$(t){const e=[];return x.Children.forEach(t,n=>{x.isValidElement(n)&&e.push(n)}),e}const O$=({children:t,custom:e,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:s="sync"})=>{const a=x.useContext(M1).forceRender||I$()[0],l=R2(),c=D$(t);let h=c;const f=x.useRef(new Map).current,p=x.useRef(h),g=x.useRef(new Map).current,w=x.useRef(!0);if(ld(()=>{w.current=!1,M$(c,g),p.current=h}),N$(()=>{w.current=!0,g.clear(),f.clear()}),w.current)return x.createElement(x.Fragment,null,h.map(y=>x.createElement(ty,{key:Ns(y),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:s},y)));h=[...h];const b=p.current.map(Ns),C=c.map(Ns),T=b.length;for(let y=0;y{if(C.indexOf(_)!==-1)return;const S=g.get(_);if(!S)return;const N=b.indexOf(_);let D=y;if(!D){const v=()=>{f.delete(_);const E=Array.from(g.keys()).filter(I=>!C.includes(I));if(E.forEach(I=>g.delete(I)),p.current=c.filter(I=>{const P=Ns(I);return P===_||E.includes(P)}),!f.size){if(l.current===!1)return;a(),r&&r()}};D=x.createElement(ty,{key:Ns(S),isPresent:!1,onExitComplete:v,custom:e,presenceAffectsLayout:o,mode:s},S),f.set(_,D)}h.splice(N,0,D)}),h=h.map(y=>{const _=y.key;return f.has(_)?y:x.createElement(ty,{key:Ns(y),isPresent:!0,presenceAffectsLayout:o,mode:s},y)}),x.createElement(x.Fragment,null,f.size?h:h.map(y=>x.cloneElement(y)))};function L$(t){const e=hd(()=>ei(t)),{isStatic:n}=x.useContext(P1);if(n){const[,r]=x.useState(t);x.useEffect(()=>e.on("change",r),[])}return e}const V$=t=>t&&typeof t=="object"&&t.mix,F$=t=>V$(t)?t.mix:void 0;function $$(...t){const e=!Array.isArray(t[0]),n=e?0:-1,r=t[0+n],i=t[1+n],o=t[2+n],s=t[3+n],a=Jp(i,o,{mixer:F$(o[0]),...s});return e?a(r):a}function A2(t,e){const n=L$(e()),r=()=>n.set(e());return r(),ld(()=>{const i=()=>it.update(r,!1,!0),o=t.map(s=>s.on("change",i));return()=>{o.forEach(s=>s()),ai(r)}}),n}function B$(t){ou.current=[],t();const e=A2(ou.current,t);return ou.current=void 0,e}function Ur(t,e,n,r){if(typeof t=="function")return B$(t);const i=typeof e=="function"?e:$$(e,n,r);return Array.isArray(t)?zk(t,i):zk([t],([o])=>i(o))}function zk(t,e){const n=hd(()=>[]);return A2(t,()=>{n.length=0;const r=t.length;for(let i=0;i{i({target:t,contentSize:e,get size(){return z$(t,n)}})})}function W$(t){t.forEach(j$)}function H$(){typeof ResizeObserver>"u"||(Po=new ResizeObserver(W$))}function G$(t,e){Po||H$();const n=U$(t);return n.forEach(r=>{let i=jh.get(r);i||(i=new Set,jh.set(r,i)),i.add(e),Po==null||Po.observe(r)}),()=>{n.forEach(r=>{const i=jh.get(r);i==null||i.delete(e),i!=null&&i.size||Po==null||Po.unobserve(r)})}}const Wh=new Set;let lu;function q$(){lu=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};Wh.forEach(n=>n(e))},window.addEventListener("resize",lu)}function K$(t){return Wh.add(t),lu||q$(),()=>{Wh.delete(t),!Wh.size&&lu&&(lu=void 0)}}function Y$(t,e){return typeof t=="function"?K$(t):G$(t,e)}const Q$=50,jk=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),X$=()=>({time:0,x:jk(),y:jk()}),J$={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Wk(t,e,n,r){const i=n[e],{length:o,position:s}=J$[e],a=i.current,l=n.time;i.current=t["scroll"+s],i.scrollLength=t["scroll"+o]-t["client"+o],i.offset.length=0,i.offset[0]=0,i.offset[1]=i.scrollLength,i.progress=xl(0,i.scrollLength,i.current);const c=r-l;i.velocity=c>Q$?0:W1(i.current-a,c)}function Z$(t,e,n){Wk(t,"x",e,n),Wk(t,"y",e,n),e.time=n}function e6(t,e){const n={x:0,y:0};let r=t;for(;r&&r!==e;)if(r instanceof HTMLElement)n.x+=r.offsetLeft,n.y+=r.offsetTop,r=r.offsetParent;else if(r.tagName==="svg"){const i=r.getBoundingClientRect();r=r.parentElement;const o=r.getBoundingClientRect();n.x+=i.left-o.left,n.y+=i.top-o.top}else if(r instanceof SVGGraphicsElement){const{x:i,y:o}=r.getBBox();n.x+=i,n.y+=o;let s=null,a=r.parentNode;for(;!s;)a.tagName==="svg"&&(s=a),a=r.parentNode;r=s}else break;return n}const t6={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},$v={start:0,center:.5,end:1};function Hk(t,e,n=0){let r=0;if($v[t]!==void 0&&(t=$v[t]),typeof t=="string"){const i=parseFloat(t);t.endsWith("px")?r=i:t.endsWith("%")?t=i/100:t.endsWith("vw")?r=i/100*document.documentElement.clientWidth:t.endsWith("vh")?r=i/100*document.documentElement.clientHeight:t=i}return typeof t=="number"&&(r=e*t),n+r}const n6=[0,0];function r6(t,e,n,r){let i=Array.isArray(t)?t:n6,o=0,s=0;return typeof t=="number"?i=[t,t]:typeof t=="string"&&(t=t.trim(),t.includes(" ")?i=t.split(" "):i=[t,$v[t]?t:"0"]),o=Hk(i[0],n,r),s=Hk(i[1],e),o-s}const i6={x:0,y:0};function o6(t){return"getBBox"in t&&t.tagName!=="svg"?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}function s6(t,e,n){let{offset:r=t6.All}=n;const{target:i=t,axis:o="y"}=n,s=o==="y"?"height":"width",a=i!==t?e6(i,t):i6,l=i===t?{width:t.scrollWidth,height:t.scrollHeight}:o6(i),c={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let h=!e[o].interpolate;const f=r.length;for(let p=0;pa6(t,r.target,n),update:i=>{Z$(t,n,i),(r.offset||r.target)&&s6(t,n,r)},notify:()=>e(n)}}const Sc=new WeakMap,Gk=new WeakMap,ny=new WeakMap,qk=t=>t===document.documentElement?window:t;function c6(t,{container:e=document.documentElement,...n}={}){let r=ny.get(e);r||(r=new Set,ny.set(e,r));const i=X$(),o=l6(e,t,i,n);if(r.add(o),!Sc.has(e)){const a=()=>{for(const p of r)p.measure()},l=()=>{for(const p of r)p.update(yn.timestamp)},c=()=>{for(const p of r)p.notify()},h=()=>{it.read(a,!1,!0),it.read(l,!1,!0),it.update(c,!1,!0)};Sc.set(e,h);const f=qk(e);window.addEventListener("resize",h,{passive:!0}),e!==document.documentElement&&Gk.set(e,Y$(e,h)),f.addEventListener("scroll",h,{passive:!0})}const s=Sc.get(e);return it.read(s,!1,!0),()=>{var a;ai(s);const l=ny.get(e);if(!l||(l.delete(o),l.size))return;const c=Sc.get(e);Sc.delete(e),c&&(qk(e).removeEventListener("scroll",c),(a=Gk.get(e))===null||a===void 0||a(),window.removeEventListener("resize",c))}}function Kk(t,e){DP(!!(!e||e.current))}const u6=()=>({scrollX:ei(0),scrollY:ei(0),scrollXProgress:ei(0),scrollYProgress:ei(0)});function Zp({container:t,target:e,layoutEffect:n=!0,...r}={}){const i=hd(u6);return(n?ld:x.useEffect)(()=>(Kk("target",e),Kk("container",t),c6(({x:s,y:a})=>{i.scrollX.set(s.current),i.scrollXProgress.set(s.progress),i.scrollY.set(a.current),i.scrollYProgress.set(a.progress)},{...r,container:(t==null?void 0:t.current)||void 0,target:(e==null?void 0:e.current)||void 0})),[t,e,JSON.stringify(r.offset)]),i}var X1={},N2={exports:{}};(function(t){function e(n){return n&&n.__esModule?n:{default:n}}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(N2);var em=N2.exports,ry={};function M(){return M=Object.assign?Object.assign.bind():function(t){for(var e=1;e{e[n]=M2(t[n])}),e}function jn(t,e,n={clone:!0}){const r=n.clone?M({},t):t;return Ui(t)&&Ui(e)&&Object.keys(e).forEach(i=>{x.isValidElement(e[i])?r[i]=e[i]:Ui(e[i])&&Object.prototype.hasOwnProperty.call(t,i)&&Ui(t[i])?r[i]=jn(t[i],e[i],n):n.clone?r[i]=Ui(e[i])?M2(e[i]):e[i]:r[i]=e[i]}),r}const d6=Object.freeze(Object.defineProperty({__proto__:null,default:jn,isPlainObject:Ui},Symbol.toStringTag,{value:"Module"}));function ra(t){let e="https://mui.com/production-error/?code="+t;for(let n=1;nn==null?e:function(...i){e.apply(this,i),n.apply(this,i)},()=>{})}function dm(t,e=166){let n;function r(...i){const o=()=>{t.apply(this,i)};clearTimeout(n),n=setTimeout(o,e)}return r.clear=()=>{clearTimeout(n)},r}function w6(t,e){return()=>null}function cu(t,e){var n,r;return x.isValidElement(t)&&e.indexOf((n=t.type.muiName)!=null?n:(r=t.type)==null||(r=r._payload)==null||(r=r.value)==null?void 0:r.muiName)!==-1}function rr(t){return t&&t.ownerDocument||document}function Ii(t){return rr(t).defaultView||window}function b6(t,e){return()=>null}function Gf(t,e){typeof t=="function"?t(e):t&&(t.current=e)}const _6=typeof window<"u"?x.useLayoutEffect:x.useEffect,li=_6;let Xk=0;function x6(t){const[e,n]=x.useState(t),r=t||e;return x.useEffect(()=>{e==null&&(Xk+=1,n(`mui-${Xk}`))},[e]),r}const Jk=lf["useId".toString()];function hm(t){if(Jk!==void 0){const e=Jk();return t??e}return x6(t)}function k6(t,e,n,r,i){return null}function qf({controlled:t,default:e,name:n,state:r="value"}){const{current:i}=x.useRef(t!==void 0),[o,s]=x.useState(e),a=i?t:o,l=x.useCallback(c=>{i||s(c)},[]);return[a,l]}function zo(t){const e=x.useRef(t);return li(()=>{e.current=t}),x.useRef((...n)=>(0,e.current)(...n)).current}function en(...t){return x.useMemo(()=>t.every(e=>e==null)?null:e=>{t.forEach(n=>{Gf(n,e)})},t)}const Zk={};function T6(t,e){const n=x.useRef(Zk);return n.current===Zk&&(n.current=t(e)),n}const E6=[];function S6(t){x.useEffect(t,E6)}class fm{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new fm}start(e,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},e)}}function V2(){const t=T6(fm.create).current;return S6(t.disposeEffect),t}let pm=!0,Uv=!1;const C6=new fm,I6={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function P6(t){const{type:e,tagName:n}=t;return!!(n==="INPUT"&&I6[e]&&!t.readOnly||n==="TEXTAREA"&&!t.readOnly||t.isContentEditable)}function R6(t){t.metaKey||t.altKey||t.ctrlKey||(pm=!0)}function iy(){pm=!1}function A6(){this.visibilityState==="hidden"&&Uv&&(pm=!0)}function N6(t){t.addEventListener("keydown",R6,!0),t.addEventListener("mousedown",iy,!0),t.addEventListener("pointerdown",iy,!0),t.addEventListener("touchstart",iy,!0),t.addEventListener("visibilitychange",A6,!0)}function M6(t){const{target:e}=t;try{return e.matches(":focus-visible")}catch{}return pm||P6(e)}function ew(){const t=x.useCallback(i=>{i!=null&&N6(i.ownerDocument)},[]),e=x.useRef(!1);function n(){return e.current?(Uv=!0,C6.start(100,()=>{Uv=!1}),e.current=!1,!0):!1}function r(i){return M6(i)?(e.current=!0,!0):!1}return{isFocusVisibleRef:e,onFocus:r,onBlur:n,ref:t}}function F2(t){const e=t.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}function Uu(t,e){const n=M({},e);return Object.keys(t).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=M({},t[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const i=t[r]||{},o=e[r];n[r]={},!o||!Object.keys(o)?n[r]=i:!i||!Object.keys(i)?n[r]=o:(n[r]=M({},o),Object.keys(i).forEach(s=>{n[r][s]=Uu(i[s],o[s])}))}else n[r]===void 0&&(n[r]=t[r])}),n}function Be(t,e,n=void 0){const r={};return Object.keys(t).forEach(i=>{r[i]=t[i].reduce((o,s)=>{if(s){const a=e(s);a!==""&&o.push(a),n&&n[s]&&o.push(n[s])}return o},[]).join(" ")}),r}const eT=t=>t,D6=()=>{let t=eT;return{configure(e){t=e},generate(e){return t(e)},reset(){t=eT}}},O6=D6(),tw=O6,L6={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function $e(t,e,n="Mui"){const r=L6[e];return r?`${n}-${r}`:`${tw.generate(t)}-${e}`}function Ve(t,e,n="Mui"){const r={};return e.forEach(i=>{r[i]=$e(t,i,n)}),r}function V6(t,e=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(t,n))}const F6=Object.freeze(Object.defineProperty({__proto__:null,default:V6},Symbol.toStringTag,{value:"Module"}));function le(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function Tl(t){return typeof t=="string"}function $2(t,e,n){return t===void 0||Tl(t)?e:M({},e,{ownerState:M({},e.ownerState,n)})}function B2(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;er.match(/^on[A-Z]/)&&typeof t[r]=="function"&&!e.includes(r)).forEach(r=>{n[r]=t[r]}),n}function tT(t){if(t===void 0)return{};const e={};return Object.keys(t).filter(n=>!(n.match(/^on[A-Z]/)&&typeof t[n]=="function")).forEach(n=>{e[n]=t[n]}),e}function z2(t){const{getSlotProps:e,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=t;if(!e){const g=we(n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),w=M({},n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),b=M({},n,i,r);return g.length>0&&(b.className=g),Object.keys(w).length>0&&(b.style=w),{props:b,internalRef:void 0}}const s=U2(M({},i,r)),a=tT(r),l=tT(i),c=e(s),h=we(c==null?void 0:c.className,n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),f=M({},c==null?void 0:c.style,n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),p=M({},c,n,l,a);return h.length>0&&(p.className=h),Object.keys(f).length>0&&(p.style=f),{props:p,internalRef:c.ref}}function j2(t,e,n){return typeof t=="function"?t(e,n):t}const $6=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function El(t){var e;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:o=!1}=t,s=le(t,$6),a=o?{}:j2(r,i),{props:l,internalRef:c}=z2(M({},s,{externalSlotProps:a})),h=en(c,a==null?void 0:a.ref,(e=t.additionalProps)==null?void 0:e.ref);return $2(n,M({},l,{ref:h}),i)}function Wl(t){if(parseInt(x.version,10)>=19){var e;return(t==null||(e=t.props)==null?void 0:e.ref)||null}return(t==null?void 0:t.ref)||null}const W2=x.createContext(void 0);function B6({value:t,children:e}){return u(W2.Provider,{value:t,children:e})}function U6(t){const{theme:e,name:n,props:r}=t;if(!e||!e.components||!e.components[n])return r;const i=e.components[n];return i.defaultProps?Uu(i.defaultProps,r):!i.styleOverrides&&!i.variants?Uu(i,r):r}function z6({props:t,name:e}){const n=x.useContext(W2);return U6({props:t,name:e,theme:{components:n}})}function ze(t){return z6(t)}var pd={},oy={exports:{}},nT;function H2(){return nT||(nT=1,function(t){function e(){return t.exports=e=Object.assign?Object.assign.bind():function(n){for(var r=1;r0?wn(Hl,--sr):0,Sl--,Yt===10&&(Sl=1,gm--),Yt}function br(){return Yt=sr2||ju(Yt)>3?"":" "}function i9(t,e){for(;--e&&br()&&!(Yt<48||Yt>102||Yt>57&&Yt<65||Yt>70&&Yt<97););return md(t,Hh()+(e<6&&xi()==32&&br()==32))}function jv(t){for(;br();)switch(Yt){case t:return sr;case 34:case 39:t!==34&&t!==39&&jv(Yt);break;case 40:t===41&&jv(t);break;case 92:br();break}return sr}function o9(t,e){for(;br()&&t+Yt!==47+10;)if(t+Yt===42+42&&xi()===47)break;return"/*"+md(e,sr-1)+"*"+mm(t===47?t:br())}function s9(t){for(;!ju(xi());)br();return md(t,sr)}function a9(t){return X2(qh("",null,null,null,[""],t=Q2(t),0,[0],t))}function qh(t,e,n,r,i,o,s,a,l){for(var c=0,h=0,f=s,p=0,g=0,w=0,b=1,C=1,T=1,y=0,_="",S=i,N=o,D=r,v=_;C;)switch(w=y,y=br()){case 40:if(w!=108&&wn(v,f-1)==58){zv(v+=nt(Gh(y),"&","&\f"),"&\f")!=-1&&(T=-1);break}case 34:case 39:case 91:v+=Gh(y);break;case 9:case 10:case 13:case 32:v+=r9(w);break;case 92:v+=i9(Hh()-1,7);continue;case 47:switch(xi()){case 42:case 47:yh(l9(o9(br(),Hh()),e,n),l);break;default:v+="/"}break;case 123*b:a[c++]=gi(v)*T;case 125*b:case 59:case 0:switch(y){case 0:case 125:C=0;case 59+h:T==-1&&(v=nt(v,/\f/g,"")),g>0&&gi(v)-f&&yh(g>32?oT(v+";",r,n,f-1):oT(nt(v," ","")+";",r,n,f-2),l);break;case 59:v+=";";default:if(yh(D=iT(v,e,n,c,h,i,a,_,S=[],N=[],f),o),y===123)if(h===0)qh(v,e,D,D,S,o,f,a,N);else switch(p===99&&wn(v,3)===110?100:p){case 100:case 108:case 109:case 115:qh(t,D,D,r&&yh(iT(t,D,D,0,0,i,a,_,i,S=[],f),N),i,N,f,a,r?S:N);break;default:qh(v,D,D,D,[""],N,0,a,N)}}c=h=g=0,b=T=1,_=v="",f=s;break;case 58:f=1+gi(v),g=w;default:if(b<1){if(y==123)--b;else if(y==125&&b++==0&&n9()==125)continue}switch(v+=mm(y),y*b){case 38:T=h>0?1:(v+="\f",-1);break;case 44:a[c++]=(gi(v)-1)*T,T=1;break;case 64:xi()===45&&(v+=Gh(br())),p=xi(),h=f=gi(_=v+=s9(Hh())),y++;break;case 45:w===45&&gi(v)==2&&(b=0)}}return o}function iT(t,e,n,r,i,o,s,a,l,c,h){for(var f=i-1,p=i===0?o:[""],g=iw(p),w=0,b=0,C=0;w0?p[T]+" "+y:nt(y,/&\f/g,p[T])))&&(l[C++]=_);return ym(t,e,n,i===0?nw:a,l,c,h)}function l9(t,e,n){return ym(t,e,n,G2,mm(t9()),zu(t,2,-2),0)}function oT(t,e,n,r){return ym(t,e,n,rw,zu(t,0,r),zu(t,r+1,-1),r)}function sl(t,e){for(var n="",r=iw(t),i=0;i6)switch(wn(t,e+1)){case 109:if(wn(t,e+4)!==45)break;case 102:return nt(t,/(.+:)(.+)-([^]+)/,"$1"+tt+"$2-$3$1"+Kf+(wn(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~zv(t,"stretch")?Z2(nt(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(wn(t,e+1)!==115)break;case 6444:switch(wn(t,gi(t)-3-(~zv(t,"!important")&&10))){case 107:return nt(t,":",":"+tt)+t;case 101:return nt(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+tt+(wn(t,14)===45?"inline-":"")+"box$3$1"+tt+"$2$3$1"+An+"$2box$3")+t}break;case 5936:switch(wn(t,e+11)){case 114:return tt+t+An+nt(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return tt+t+An+nt(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return tt+t+An+nt(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return tt+t+An+t+t}return t}var y9=function(e,n,r,i){if(e.length>-1&&!e.return)switch(e.type){case rw:e.return=Z2(e.value,e.length);break;case q2:return sl([Cc(e,{value:nt(e.value,"@","@"+tt)})],i);case nw:if(e.length)return e9(e.props,function(o){switch(Z6(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return sl([Cc(e,{props:[nt(o,/:(read-\w+)/,":"+Kf+"$1")]})],i);case"::placeholder":return sl([Cc(e,{props:[nt(o,/:(plac\w+)/,":"+tt+"input-$1")]}),Cc(e,{props:[nt(o,/:(plac\w+)/,":"+Kf+"$1")]}),Cc(e,{props:[nt(o,/:(plac\w+)/,An+"input-$1")]})],i)}return""})}},v9=[y9],eR=function(e){var n=e.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(b){var C=b.getAttribute("data-emotion");C.indexOf(" ")!==-1&&(document.head.appendChild(b),b.setAttribute("data-s",""))})}var i=e.stylisPlugins||v9,o={},s,a=[];s=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(b){for(var C=b.getAttribute("data-emotion").split(" "),T=1;T=4;++r,i-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var P9={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},R9=!1,A9=/[A-Z]|^ms/g,N9=/_EMO_([^_]+?)_([^]*?)_EMO_/g,sR=function(e){return e.charCodeAt(1)===45},aT=function(e){return e!=null&&typeof e!="boolean"},ay=J2(function(t){return sR(t)?t:t.replace(A9,"-$&").toLowerCase()}),lT=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(N9,function(r,i,o){return yi={name:i,styles:o,next:yi},i})}return P9[e]!==1&&!sR(e)&&typeof n=="number"&&n!==0?n+"px":n},M9="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Wu(t,e,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return yi={name:i.name,styles:i.styles,next:yi},i.name;var o=n;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)yi={name:s.name,styles:s.styles,next:yi},s=s.next;var a=o.styles+";";return a}return D9(t,e,n)}case"function":{if(t!==void 0){var l=yi,c=n(t);return yi=l,Wu(t,e,c)}break}}var h=n;if(e==null)return h;var f=e[h];return f!==void 0?f:h}function D9(t,e,n){var r="";if(Array.isArray(n))for(var i=0;i96?G9:q9},fT=function(e,n,r){var i;if(n){var o=n.shouldForwardProp;i=e.__emotion_forwardProp&&o?function(s){return e.__emotion_forwardProp(s)&&o(s)}:o}return typeof i!="function"&&r&&(i=e.__emotion_forwardProp),i},K9=function(e){var n=e.cache,r=e.serialized,i=e.isStringTag;return lw(n,r,i),lR(function(){return cw(n,r,i)}),null},Y9=function t(e,n){var r=e.__emotion_real===e,i=r&&e.__emotion_base||e,o,s;n!==void 0&&(o=n.label,s=n.target);var a=fT(e,n,r),l=a||hT(i),c=!l("as");return function(){var h=arguments,f=r&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(o!==void 0&&f.push("label:"+o+";"),h[0]==null||h[0].raw===void 0)f.push.apply(f,h);else{var p=h[0];f.push(p[0]);for(var g=h.length,w=1;w(i[1].styles.match(/^@layer\s+[^{]*$/)||(i[1].styles=`@layer mui {${i[1].styles}}`),r(...i))}return n}const ly=new Map;function J9(t){const{injectFirst:e,enableCssLayer:n,children:r}=t,i=x.useMemo(()=>{const o=`${e}-${n}`;if(typeof document=="object"&&ly.has(o))return ly.get(o);const s=X9(e,n);return ly.set(o,s),s},[e,n]);return e||n?u(V9,{value:i,children:r}):r}function Z9(t){return t==null||Object.keys(t).length===0}function uR(t){const{styles:e,defaultTheme:n={}}=t;return u(z9,{styles:typeof e=="function"?i=>e(Z9(i)?n:i):e})}/** * @mui/styled-engine v5.18.0 * * @license MIT * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */function hw(t,e){return Hv(t,e)}const dR=(t,e)=>{Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))},pT=[];function Yf(t){return pT[0]=t,gd(pT)}const eB=Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:uR,StyledEngineProvider:J9,ThemeContext:Gl,css:Im,default:hw,internal_processStyles:dR,internal_serializeStyles:Yf,keyframes:ql},Symbol.toStringTag,{value:"Module"})),tB=Ri(eB),nB=Ri(d6),rB=Ri(v6),iB=Ri(y6),oB=["values","unit","step"],sB=t=>{const e=Object.keys(t).map(n=>({key:n,val:t[n]}))||[];return e.sort((n,r)=>n.val-r.val),e.reduce((n,r)=>M({},n,{[r.key]:r.val}),{})};function hR(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=t,i=le(t,oB),o=sB(e),s=Object.keys(o);function a(p){return`@media (min-width:${typeof e[p]=="number"?e[p]:p}${n})`}function l(p){return`@media (max-width:${(typeof e[p]=="number"?e[p]:p)-r/100}${n})`}function c(p,g){const w=s.indexOf(g);return`@media (min-width:${typeof e[p]=="number"?e[p]:p}${n}) and (max-width:${(w!==-1&&typeof e[s[w]]=="number"?e[s[w]]:g)-r/100}${n})`}function h(p){return s.indexOf(p)+1`@media (min-width:${fw[t]}px)`};function ar(t,e,n){const r=t.theme||{};if(Array.isArray(e)){const o=r.breakpoints||mT;return e.reduce((s,a,l)=>(s[o.up(o.keys[l])]=n(e[l]),s),{})}if(typeof e=="object"){const o=r.breakpoints||mT;return Object.keys(e).reduce((s,a)=>{if(Object.keys(o.values||fw).indexOf(a)!==-1){const l=o.up(a);s[l]=n(e[a],a)}else{const l=a;s[l]=e[l]}return s},{})}return n(e)}function fR(t={}){var e;return((e=t.keys)==null?void 0:e.reduce((r,i)=>{const o=t.up(i);return r[o]={},r},{}))||{}}function Gv(t,e){return t.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},e)}function cB(t,...e){const n=fR(t),r=[n,...e].reduce((i,o)=>jn(i,o),{});return Gv(Object.keys(n),r)}function uB(t,e){if(typeof t!="object")return{};const n={},r=Object.keys(e);return Array.isArray(t)?r.forEach((i,o)=>{o{t[i]!=null&&(n[i]=!0)}),n}function Ys({values:t,breakpoints:e,base:n}){const r=n||uB(t,e),i=Object.keys(r);if(i.length===0)return t;let o;return i.reduce((s,a,l)=>(Array.isArray(t)?(s[a]=t[l]!=null?t[l]:t[o],o=l):typeof t=="object"?(s[a]=t[a]!=null?t[a]:t[o],o=a):s[a]=t,s),{})}function Cl(t,e,n=!0){if(!e||typeof e!="string")return null;if(t&&t.vars&&n){const r=`vars.${e}`.split(".").reduce((i,o)=>i&&i[o]?i[o]:null,t);if(r!=null)return r}return e.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,t)}function Qf(t,e,n,r=n){let i;return typeof t=="function"?i=t(n):Array.isArray(t)?i=t[n]||r:i=Cl(t,n)||r,e&&(i=e(i,r,t)),i}function Wt(t){const{prop:e,cssProperty:n=t.prop,themeKey:r,transform:i}=t,o=s=>{if(s[e]==null)return null;const a=s[e],l=s.theme,c=Cl(l,r)||{};return ar(s,a,f=>{let p=Qf(c,i,f);return f===p&&typeof f=="string"&&(p=Qf(c,i,`${e}${f==="default"?"":be(f)}`,f)),n===!1?p:{[n]:p}})};return o.propTypes={},o.filterProps=[e],o}function dB(t){const e={};return n=>(e[n]===void 0&&(e[n]=t(n)),e[n])}const hB={m:"margin",p:"padding"},fB={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},gT={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},pB=dB(t=>{if(t.length>2)if(gT[t])t=gT[t];else return[t];const[e,n]=t.split(""),r=hB[e],i=fB[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),pw=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],mw=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...pw,...mw];function yd(t,e,n,r){var i;const o=(i=Cl(t,e,!1))!=null?i:n;return typeof o=="number"?s=>typeof s=="string"?s:o*s:Array.isArray(o)?s=>typeof s=="string"?s:o[s]:typeof o=="function"?o:()=>{}}function gw(t){return yd(t,"spacing",8)}function ia(t,e){if(typeof e=="string"||e==null)return e;const n=Math.abs(e),r=t(n);return e>=0?r:typeof r=="number"?-r:`-${r}`}function mB(t,e){return n=>t.reduce((r,i)=>(r[i]=ia(e,n),r),{})}function gB(t,e,n,r){if(e.indexOf(n)===-1)return null;const i=pB(n),o=mB(i,r),s=t[n];return ar(t,s,o)}function pR(t,e){const n=gw(t.theme);return Object.keys(t).map(r=>gB(t,e,r,n)).reduce(uu,{})}function Vt(t){return pR(t,pw)}Vt.propTypes={};Vt.filterProps=pw;function Ft(t){return pR(t,mw)}Ft.propTypes={};Ft.filterProps=mw;function yB(t=8){if(t.mui)return t;const e=gw({spacing:t}),n=(...r)=>(r.length===0?[1]:r).map(o=>{const s=e(o);return typeof s=="number"?`${s}px`:s}).join(" ");return n.mui=!0,n}function Pm(...t){const e=t.reduce((r,i)=>(i.filterProps.forEach(o=>{r[o]=i}),r),{}),n=r=>Object.keys(r).reduce((i,o)=>e[o]?uu(i,e[o](r)):i,{});return n.propTypes={},n.filterProps=t.reduce((r,i)=>r.concat(i.filterProps),[]),n}function Lr(t){return typeof t!="number"?t:`${t}px solid`}function Gr(t,e){return Wt({prop:t,themeKey:"borders",transform:e})}const vB=Gr("border",Lr),wB=Gr("borderTop",Lr),bB=Gr("borderRight",Lr),_B=Gr("borderBottom",Lr),xB=Gr("borderLeft",Lr),kB=Gr("borderColor"),TB=Gr("borderTopColor"),EB=Gr("borderRightColor"),SB=Gr("borderBottomColor"),CB=Gr("borderLeftColor"),IB=Gr("outline",Lr),PB=Gr("outlineColor"),Rm=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){const e=yd(t.theme,"shape.borderRadius",4),n=r=>({borderRadius:ia(e,r)});return ar(t,t.borderRadius,n)}return null};Rm.propTypes={};Rm.filterProps=["borderRadius"];Pm(vB,wB,bB,_B,xB,kB,TB,EB,SB,CB,Rm,IB,PB);const Am=t=>{if(t.gap!==void 0&&t.gap!==null){const e=yd(t.theme,"spacing",8),n=r=>({gap:ia(e,r)});return ar(t,t.gap,n)}return null};Am.propTypes={};Am.filterProps=["gap"];const Nm=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){const e=yd(t.theme,"spacing",8),n=r=>({columnGap:ia(e,r)});return ar(t,t.columnGap,n)}return null};Nm.propTypes={};Nm.filterProps=["columnGap"];const Mm=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){const e=yd(t.theme,"spacing",8),n=r=>({rowGap:ia(e,r)});return ar(t,t.rowGap,n)}return null};Mm.propTypes={};Mm.filterProps=["rowGap"];const RB=Wt({prop:"gridColumn"}),AB=Wt({prop:"gridRow"}),NB=Wt({prop:"gridAutoFlow"}),MB=Wt({prop:"gridAutoColumns"}),DB=Wt({prop:"gridAutoRows"}),OB=Wt({prop:"gridTemplateColumns"}),LB=Wt({prop:"gridTemplateRows"}),VB=Wt({prop:"gridTemplateAreas"}),FB=Wt({prop:"gridArea"});Pm(Am,Nm,Mm,RB,AB,NB,MB,DB,OB,LB,VB,FB);function al(t,e){return e==="grey"?e:t}const $B=Wt({prop:"color",themeKey:"palette",transform:al}),BB=Wt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:al}),UB=Wt({prop:"backgroundColor",themeKey:"palette",transform:al});Pm($B,BB,UB);function gr(t){return t<=1&&t!==0?`${t*100}%`:t}const zB=Wt({prop:"width",transform:gr}),yw=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){const e=n=>{var r,i;const o=((r=t.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||fw[n];return o?((i=t.theme)==null||(i=i.breakpoints)==null?void 0:i.unit)!=="px"?{maxWidth:`${o}${t.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:gr(n)}};return ar(t,t.maxWidth,e)}return null};yw.filterProps=["maxWidth"];const jB=Wt({prop:"minWidth",transform:gr}),WB=Wt({prop:"height",transform:gr}),HB=Wt({prop:"maxHeight",transform:gr}),GB=Wt({prop:"minHeight",transform:gr});Wt({prop:"size",cssProperty:"width",transform:gr});Wt({prop:"size",cssProperty:"height",transform:gr});const qB=Wt({prop:"boxSizing"});Pm(zB,yw,jB,WB,HB,GB,qB);const KB={border:{themeKey:"borders",transform:Lr},borderTop:{themeKey:"borders",transform:Lr},borderRight:{themeKey:"borders",transform:Lr},borderBottom:{themeKey:"borders",transform:Lr},borderLeft:{themeKey:"borders",transform:Lr},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Lr},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Rm},color:{themeKey:"palette",transform:al},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:al},backgroundColor:{themeKey:"palette",transform:al},p:{style:Ft},pt:{style:Ft},pr:{style:Ft},pb:{style:Ft},pl:{style:Ft},px:{style:Ft},py:{style:Ft},padding:{style:Ft},paddingTop:{style:Ft},paddingRight:{style:Ft},paddingBottom:{style:Ft},paddingLeft:{style:Ft},paddingX:{style:Ft},paddingY:{style:Ft},paddingInline:{style:Ft},paddingInlineStart:{style:Ft},paddingInlineEnd:{style:Ft},paddingBlock:{style:Ft},paddingBlockStart:{style:Ft},paddingBlockEnd:{style:Ft},m:{style:Vt},mt:{style:Vt},mr:{style:Vt},mb:{style:Vt},ml:{style:Vt},mx:{style:Vt},my:{style:Vt},margin:{style:Vt},marginTop:{style:Vt},marginRight:{style:Vt},marginBottom:{style:Vt},marginLeft:{style:Vt},marginX:{style:Vt},marginY:{style:Vt},marginInline:{style:Vt},marginInlineStart:{style:Vt},marginInlineEnd:{style:Vt},marginBlock:{style:Vt},marginBlockStart:{style:Vt},marginBlockEnd:{style:Vt},displayPrint:{cssProperty:!1,transform:t=>({"@media print":{display:t}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Am},rowGap:{style:Mm},columnGap:{style:Nm},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:gr},maxWidth:{style:yw},minWidth:{transform:gr},height:{transform:gr},maxHeight:{transform:gr},minHeight:{transform:gr},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},vd=KB;function YB(...t){const e=t.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(e);return t.every(r=>n.size===Object.keys(r).length)}function QB(t,e){return typeof t=="function"?t(e):t}function mR(){function t(n,r,i,o){const s={[n]:r,theme:i},a=o[n];if(!a)return{[n]:r};const{cssProperty:l=n,themeKey:c,transform:h,style:f}=a;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const p=Cl(i,c)||{};return f?f(s):ar(s,r,w=>{let b=Qf(p,h,w);return w===b&&typeof w=="string"&&(b=Qf(p,h,`${n}${w==="default"?"":be(w)}`,w)),l===!1?b:{[l]:b}})}function e(n){var r;const{sx:i,theme:o={},nested:s}=n||{};if(!i)return null;const a=(r=o.unstable_sxConfig)!=null?r:vd;function l(c){let h=c;if(typeof c=="function")h=c(o);else if(typeof c!="object")return c;if(!h)return null;const f=fR(o.breakpoints),p=Object.keys(f);let g=f;return Object.keys(h).forEach(w=>{const b=QB(h[w],o);if(b!=null)if(typeof b=="object")if(a[w])g=uu(g,t(w,b,o,a));else{const C=ar({theme:o},b,T=>({[w]:T}));YB(C,b)?g[w]=e({sx:b,theme:o,nested:!0}):g=uu(g,C)}else g=uu(g,t(w,b,o,a))}),!s&&o.modularCssLayers?{"@layer sx":Gv(p,g)}:Gv(p,g)}return Array.isArray(i)?i.map(l):l(i)}return e}const gR=mR();gR.filterProps=["sx"];const wd=gR;function yR(t,e){const n=this;return n.vars&&typeof n.getColorSchemeSelector=="function"?{[n.getColorSchemeSelector(t).replace(/(\[[^\]]+\])/,"*:where($1)")]:e}:n.palette.mode===t?e:{}}const XB=["breakpoints","palette","spacing","shape"];function bd(t={},...e){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=t,s=le(t,XB),a=hR(n),l=yB(i);let c=jn({breakpoints:a,direction:"ltr",components:{},palette:M({mode:"light"},r),spacing:l,shape:M({},lB,o)},s);return c.applyStyles=yR,c=e.reduce((h,f)=>jn(h,f),c),c.unstable_sxConfig=M({},vd,s==null?void 0:s.unstable_sxConfig),c.unstable_sx=function(f){return wd({sx:f,theme:this})},c}const JB=Object.freeze(Object.defineProperty({__proto__:null,default:bd,private_createBreakpoints:hR,unstable_applyStyles:yR},Symbol.toStringTag,{value:"Module"})),ZB=Ri(JB),eU=["sx"],tU=t=>{var e,n;const r={systemProps:{},otherProps:{}},i=(e=t==null||(n=t.theme)==null?void 0:n.unstable_sxConfig)!=null?e:vd;return Object.keys(t).forEach(o=>{i[o]?r.systemProps[o]=t[o]:r.otherProps[o]=t[o]}),r};function _d(t){const{sx:e}=t,n=le(t,eU),{systemProps:r,otherProps:i}=tU(n);let o;return Array.isArray(e)?o=[r,...e]:typeof e=="function"?o=(...s)=>{const a=e(...s);return Ui(a)?M({},r,a):r}:o=M({},r,e),M({},i,{sx:o})}const nU=Object.freeze(Object.defineProperty({__proto__:null,default:wd,extendSxProp:_d,unstable_createStyleFunctionSx:mR,unstable_defaultSxConfig:vd},Symbol.toStringTag,{value:"Module"})),rU=Ri(nU);var Kl=em;Object.defineProperty(pd,"__esModule",{value:!0});var iU=pd.default=yU;pd.shouldForwardProp=Kh;pd.systemDefaultTheme=void 0;var Nr=Kl(H2()),qv=Kl(j6()),Xf=dU(tB),oU=nB;Kl(rB);Kl(iB);var sU=Kl(ZB),aU=Kl(rU);const lU=["ownerState"],cU=["variants"],uU=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function vR(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(vR=function(r){return r?n:e})(t)}function dU(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var n=vR(e);if(n&&n.has(t))return n.get(t);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(o!=="default"&&Object.prototype.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=t[o]}return r.default=t,n&&n.set(t,r),r}function hU(t){return Object.keys(t).length===0}function fU(t){return typeof t=="string"&&t.charCodeAt(0)>96}function Kh(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}function yT(t,e){return e&&t&&typeof t=="object"&&t.styles&&!t.styles.startsWith("@layer")&&(t.styles=`@layer ${e}{${String(t.styles)}}`),t}const pU=pd.systemDefaultTheme=(0,sU.default)(),mU=t=>t&&t.charAt(0).toLowerCase()+t.slice(1);function vh({defaultTheme:t,theme:e,themeId:n}){return hU(e)?t:e[n]||e}function gU(t){return t?(e,n)=>n[t]:null}function Yh(t,e,n){let{ownerState:r}=e,i=(0,qv.default)(e,lU);const o=typeof t=="function"?t((0,Nr.default)({ownerState:r},i)):t;if(Array.isArray(o))return o.flatMap(s=>Yh(s,(0,Nr.default)({ownerState:r},i),n));if(o&&typeof o=="object"&&Array.isArray(o.variants)){const{variants:s=[]}=o;let l=(0,qv.default)(o,cU);return s.forEach(c=>{let h=!0;if(typeof c.props=="function"?h=c.props((0,Nr.default)({ownerState:r},i,r)):Object.keys(c.props).forEach(f=>{(r==null?void 0:r[f])!==c.props[f]&&i[f]!==c.props[f]&&(h=!1)}),h){Array.isArray(l)||(l=[l]);const f=typeof c.style=="function"?c.style((0,Nr.default)({ownerState:r},i,r)):c.style;l.push(n?yT((0,Xf.internal_serializeStyles)(f),n):f)}}),l}return n?yT((0,Xf.internal_serializeStyles)(o),n):o}function yU(t={}){const{themeId:e,defaultTheme:n=pU,rootShouldForwardProp:r=Kh,slotShouldForwardProp:i=Kh}=t,o=s=>(0,aU.default)((0,Nr.default)({},s,{theme:vh((0,Nr.default)({},s,{defaultTheme:n,themeId:e}))}));return o.__mui_systemSx=!0,(s,a={})=>{(0,Xf.internal_processStyles)(s,D=>D.filter(v=>!(v!=null&&v.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:h,skipSx:f,overridesResolver:p=gU(mU(c))}=a,g=(0,qv.default)(a,uU),w=l&&l.startsWith("Mui")||c?"components":"custom",b=h!==void 0?h:c&&c!=="Root"&&c!=="root"||!1,C=f||!1;let T,y=Kh;c==="Root"||c==="root"?y=r:c?y=i:fU(s)&&(y=void 0);const _=(0,Xf.default)(s,(0,Nr.default)({shouldForwardProp:y,label:T},g)),S=D=>typeof D=="function"&&D.__emotion_real!==D||(0,oU.isPlainObject)(D)?v=>{const E=vh({theme:v.theme,defaultTheme:n,themeId:e});return Yh(D,(0,Nr.default)({},v,{theme:E}),E.modularCssLayers?w:void 0)}:D,N=(D,...v)=>{let E=S(D);const I=v?v.map(S):[];l&&p&&I.push(O=>{const R=vh((0,Nr.default)({},O,{defaultTheme:n,themeId:e}));if(!R.components||!R.components[l]||!R.components[l].styleOverrides)return null;const U=R.components[l].styleOverrides,$={};return Object.entries(U).forEach(([z,j])=>{$[z]=Yh(j,(0,Nr.default)({},O,{theme:R}),R.modularCssLayers?"theme":void 0)}),p(O,$)}),l&&!b&&I.push(O=>{var R;const U=vh((0,Nr.default)({},O,{defaultTheme:n,themeId:e})),$=U==null||(R=U.components)==null||(R=R[l])==null?void 0:R.variants;return Yh({variants:$},(0,Nr.default)({},O,{theme:U}),U.modularCssLayers?"theme":void 0)}),C||I.push(o);const P=I.length-v.length;if(Array.isArray(D)&&P>0){const O=new Array(P).fill("");E=[...D,...O],E.raw=[...D.raw,...O]}const L=_(E,...I);return s.muiName&&(L.muiName=s.muiName),L};return _.withConfig&&(N.withConfig=_.withConfig),N}}function vU(t,e){return M({toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}}},e)}var Ht={};const wU=Ri(h6),bU=Ri(F6);var wR=em;Object.defineProperty(Ht,"__esModule",{value:!0});var on=Ht.alpha=kR;Ht.blend=AU;Ht.colorChannel=void 0;var Kv=Ht.darken=ww;Ht.decomposeColor=Wr;Ht.emphasize=TR;var _U=Ht.getContrastRatio=SU;Ht.getLuminance=Jf;Ht.hexToRgb=bR;Ht.hslToRgb=xR;var Yv=Ht.lighten=bw;Ht.private_safeAlpha=CU;Ht.private_safeColorChannel=void 0;Ht.private_safeDarken=IU;Ht.private_safeEmphasize=RU;Ht.private_safeLighten=PU;Ht.recomposeColor=Yl;Ht.rgbToHex=EU;var vT=wR(wU),xU=wR(bU);function vw(t,e=0,n=1){return(0,xU.default)(t,e,n)}function bR(t){t=t.slice(1);const e=new RegExp(`.{1,${t.length>=6?2:1}}`,"g");let n=t.match(e);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function kU(t){const e=t.toString(16);return e.length===1?`0${e}`:e}function Wr(t){if(t.type)return t;if(t.charAt(0)==="#")return Wr(bR(t));const e=t.indexOf("("),n=t.substring(0,e);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error((0,vT.default)(9,t));let r=t.substring(e+1,t.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i)===-1)throw new Error((0,vT.default)(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}const _R=t=>{const e=Wr(t);return e.values.slice(0,3).map((n,r)=>e.type.indexOf("hsl")!==-1&&r!==0?`${n}%`:n).join(" ")};Ht.colorChannel=_R;const TU=(t,e)=>{try{return _R(t)}catch{return t}};Ht.private_safeColorChannel=TU;function Yl(t){const{type:e,colorSpace:n}=t;let{values:r}=t;return e.indexOf("rgb")!==-1?r=r.map((i,o)=>o<3?parseInt(i,10):i):e.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),e.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${e}(${r})`}function EU(t){if(t.indexOf("#")===0)return t;const{values:e}=Wr(t);return`#${e.map((n,r)=>kU(r===3?Math.round(255*n):n)).join("")}`}function xR(t){t=Wr(t);const{values:e}=t,n=e[0],r=e[1]/100,i=e[2]/100,o=r*Math.min(i,1-i),s=(c,h=(c+n/30)%12)=>i-o*Math.max(Math.min(h-3,9-h,1),-1);let a="rgb";const l=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return t.type==="hsla"&&(a+="a",l.push(e[3])),Yl({type:a,values:l})}function Jf(t){t=Wr(t);let e=t.type==="hsl"||t.type==="hsla"?Wr(xR(t)).values:t.values;return e=e.map(n=>(t.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function SU(t,e){const n=Jf(t),r=Jf(e);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function kR(t,e){return t=Wr(t),e=vw(e),(t.type==="rgb"||t.type==="hsl")&&(t.type+="a"),t.type==="color"?t.values[3]=`/${e}`:t.values[3]=e,Yl(t)}function CU(t,e,n){try{return kR(t,e)}catch{return t}}function ww(t,e){if(t=Wr(t),e=vw(e),t.type.indexOf("hsl")!==-1)t.values[2]*=1-e;else if(t.type.indexOf("rgb")!==-1||t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]*=1-e;return Yl(t)}function IU(t,e,n){try{return ww(t,e)}catch{return t}}function bw(t,e){if(t=Wr(t),e=vw(e),t.type.indexOf("hsl")!==-1)t.values[2]+=(100-t.values[2])*e;else if(t.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(255-t.values[n])*e;else if(t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(1-t.values[n])*e;return Yl(t)}function PU(t,e,n){try{return bw(t,e)}catch{return t}}function TR(t,e=.15){return Jf(t)>.5?ww(t,e):bw(t,e)}function RU(t,e,n){try{return TR(t,e)}catch{return t}}function AU(t,e,n,r=1){const i=(l,c)=>Math.round((l**(1/r)*(1-n)+c**(1/r)*n)**r),o=Wr(t),s=Wr(e),a=[i(o.values[0],s.values[0]),i(o.values[1],s.values[1]),i(o.values[2],s.values[2])];return Yl({type:"rgb",values:a})}const NU={black:"#000",white:"#fff"},Hu=NU,MU={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},DU=MU,OU={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Ca=OU,LU={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Ia=LU,VU={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Ic=VU,FU={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Ms=FU,$U={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},Pa=$U,BU={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Ra=BU,UU=["mode","contrastThreshold","tonalOffset"],wT={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Hu.white,default:Hu.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},cy={text:{primary:Hu.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Hu.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function bT(t,e,n,r){const i=r.light||r,o=r.dark||r*1.5;t[e]||(t.hasOwnProperty(n)?t[e]=t[n]:e==="light"?t.light=Yv(t.main,i):e==="dark"&&(t.dark=Kv(t.main,o)))}function zU(t="light"){return t==="dark"?{main:Ms[200],light:Ms[50],dark:Ms[400]}:{main:Ms[700],light:Ms[400],dark:Ms[800]}}function jU(t="light"){return t==="dark"?{main:Ca[200],light:Ca[50],dark:Ca[400]}:{main:Ca[500],light:Ca[300],dark:Ca[700]}}function WU(t="light"){return t==="dark"?{main:Ia[500],light:Ia[300],dark:Ia[700]}:{main:Ia[700],light:Ia[400],dark:Ia[800]}}function HU(t="light"){return t==="dark"?{main:Pa[400],light:Pa[300],dark:Pa[700]}:{main:Pa[700],light:Pa[500],dark:Pa[900]}}function GU(t="light"){return t==="dark"?{main:Ra[400],light:Ra[300],dark:Ra[700]}:{main:Ra[800],light:Ra[500],dark:Ra[900]}}function qU(t="light"){return t==="dark"?{main:Ic[400],light:Ic[300],dark:Ic[700]}:{main:"#ed6c02",light:Ic[500],dark:Ic[900]}}function KU(t){const{mode:e="light",contrastThreshold:n=3,tonalOffset:r=.2}=t,i=le(t,UU),o=t.primary||zU(e),s=t.secondary||jU(e),a=t.error||WU(e),l=t.info||HU(e),c=t.success||GU(e),h=t.warning||qU(e);function f(b){return _U(b,cy.text.primary)>=n?cy.text.primary:wT.text.primary}const p=({color:b,name:C,mainShade:T=500,lightShade:y=300,darkShade:_=700})=>{if(b=M({},b),!b.main&&b[T]&&(b.main=b[T]),!b.hasOwnProperty("main"))throw new Error(ra(11,C?` (${C})`:"",T));if(typeof b.main!="string")throw new Error(ra(12,C?` (${C})`:"",JSON.stringify(b.main)));return bT(b,"light",y,r),bT(b,"dark",_,r),b.contrastText||(b.contrastText=f(b.main)),b},g={dark:cy,light:wT};return jn(M({common:M({},Hu),mode:e,primary:p({color:o,name:"primary"}),secondary:p({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:a,name:"error"}),warning:p({color:h,name:"warning"}),info:p({color:l,name:"info"}),success:p({color:c,name:"success"}),grey:DU,contrastThreshold:n,getContrastText:f,augmentColor:p,tonalOffset:r},g[e]),i)}const YU=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function QU(t){return Math.round(t*1e5)/1e5}const _T={textTransform:"uppercase"},xT='"Roboto", "Helvetica", "Arial", sans-serif';function XU(t,e){const n=typeof e=="function"?e(t):e,{fontFamily:r=xT,fontSize:i=14,fontWeightLight:o=300,fontWeightRegular:s=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:h,pxToRem:f}=n,p=le(n,YU),g=i/14,w=f||(T=>`${T/c*g}rem`),b=(T,y,_,S,N)=>M({fontFamily:r,fontWeight:T,fontSize:w(y),lineHeight:_},r===xT?{letterSpacing:`${QU(S/y)}em`}:{},N,h),C={h1:b(o,96,1.167,-1.5),h2:b(o,60,1.2,-.5),h3:b(s,48,1.167,0),h4:b(s,34,1.235,.25),h5:b(s,24,1.334,0),h6:b(a,20,1.6,.15),subtitle1:b(s,16,1.75,.15),subtitle2:b(a,14,1.57,.1),body1:b(s,16,1.5,.15),body2:b(s,14,1.43,.15),button:b(a,14,1.75,.4,_T),caption:b(s,12,1.66,.4),overline:b(s,12,2.66,1,_T),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return jn(M({htmlFontSize:c,pxToRem:w,fontFamily:r,fontSize:i,fontWeightLight:o,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:l},C),p,{clone:!1})}const JU=.2,ZU=.14,ez=.12;function St(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,${JU})`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,${ZU})`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,${ez})`].join(",")}const tz=["none",St(0,2,1,-1,0,1,1,0,0,1,3,0),St(0,3,1,-2,0,2,2,0,0,1,5,0),St(0,3,3,-2,0,3,4,0,0,1,8,0),St(0,2,4,-1,0,4,5,0,0,1,10,0),St(0,3,5,-1,0,5,8,0,0,1,14,0),St(0,3,5,-1,0,6,10,0,0,1,18,0),St(0,4,5,-2,0,7,10,1,0,2,16,1),St(0,5,5,-3,0,8,10,1,0,3,14,2),St(0,5,6,-3,0,9,12,1,0,3,16,2),St(0,6,6,-3,0,10,14,1,0,4,18,3),St(0,6,7,-4,0,11,15,1,0,4,20,3),St(0,7,8,-4,0,12,17,2,0,5,22,4),St(0,7,8,-4,0,13,19,2,0,5,24,4),St(0,7,9,-4,0,14,21,2,0,5,26,4),St(0,8,9,-5,0,15,22,2,0,6,28,5),St(0,8,10,-5,0,16,24,2,0,6,30,5),St(0,8,11,-5,0,17,26,2,0,6,32,5),St(0,9,11,-5,0,18,28,2,0,7,34,6),St(0,9,12,-6,0,19,29,2,0,7,36,6),St(0,10,13,-6,0,20,31,3,0,8,38,7),St(0,10,13,-6,0,21,33,3,0,8,40,7),St(0,10,14,-6,0,22,35,3,0,8,42,7),St(0,11,14,-7,0,23,36,3,0,9,44,8),St(0,11,15,-7,0,24,38,3,0,9,46,8)],nz=tz,rz=["duration","easing","delay"],iz={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},oz={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function kT(t){return`${Math.round(t)}ms`}function sz(t){if(!t)return 0;const e=t/36;return Math.round((4+15*e**.25+e/5)*10)}function az(t){const e=M({},iz,t.easing),n=M({},oz,t.duration);return M({getAutoHeightDuration:sz,create:(i=["all"],o={})=>{const{duration:s=n.standard,easing:a=e.easeInOut,delay:l=0}=o;return le(o,rz),(Array.isArray(i)?i:[i]).map(c=>`${c} ${typeof s=="string"?s:kT(s)} ${a} ${typeof l=="string"?l:kT(l)}`).join(",")}},t,{easing:e,duration:n})}const lz={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},cz=lz,uz=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function xd(t={},...e){const{mixins:n={},palette:r={},transitions:i={},typography:o={}}=t,s=le(t,uz);if(t.vars&&t.generateCssVars===void 0)throw new Error(ra(18));const a=KU(r),l=bd(t);let c=jn(l,{mixins:vU(l.breakpoints,n),palette:a,shadows:nz.slice(),typography:XU(a,o),transitions:az(i),zIndex:M({},cz)});return c=jn(c,s),c=e.reduce((h,f)=>jn(h,f),c),c.unstable_sxConfig=M({},vd,s==null?void 0:s.unstable_sxConfig),c.unstable_sx=function(f){return wd({sx:f,theme:this})},c}const dz=xd(),_w=dz,Il="$$material";function ER(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const hz=t=>ER(t)&&t!=="classes",lr=hz,fz=iU({themeId:Il,defaultTheme:_w,rootShouldForwardProp:lr}),oe=fz;function pz(t){return $e("MuiSvgIcon",t)}Ve("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const mz=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],gz=t=>{const{color:e,fontSize:n,classes:r}=t,i={root:["root",e!=="inherit"&&`color${be(e)}`,`fontSize${be(n)}`]};return Be(i,pz,r)},yz=oe("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color!=="inherit"&&e[`color${be(n.color)}`],e[`fontSize${be(n.fontSize)}`]]}})(({theme:t,ownerState:e})=>{var n,r,i,o,s,a,l,c,h,f,p,g,w;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:e.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(n=t.transitions)==null||(r=n.create)==null?void 0:r.call(n,"fill",{duration:(i=t.transitions)==null||(i=i.duration)==null?void 0:i.shorter}),fontSize:{inherit:"inherit",small:((o=t.typography)==null||(s=o.pxToRem)==null?void 0:s.call(o,20))||"1.25rem",medium:((a=t.typography)==null||(l=a.pxToRem)==null?void 0:l.call(a,24))||"1.5rem",large:((c=t.typography)==null||(h=c.pxToRem)==null?void 0:h.call(c,35))||"2.1875rem"}[e.fontSize],color:(f=(p=(t.vars||t).palette)==null||(p=p[e.color])==null?void 0:p.main)!=null?f:{action:(g=(t.vars||t).palette)==null||(g=g.action)==null?void 0:g.active,disabled:(w=(t.vars||t).palette)==null||(w=w.action)==null?void 0:w.disabled,inherit:void 0}[e.color]}}),SR=x.forwardRef(function(e,n){const r=ze({props:e,name:"MuiSvgIcon"}),{children:i,className:o,color:s="inherit",component:a="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:h=!1,titleAccess:f,viewBox:p="0 0 24 24"}=r,g=le(r,mz),w=x.isValidElement(i)&&i.type==="svg",b=M({},r,{color:s,component:a,fontSize:l,instanceFontSize:e.fontSize,inheritViewBox:h,viewBox:p,hasSvgAsChild:w}),C={};h||(C.viewBox=p);const T=gz(b);return F(yz,M({as:a,className:we(T.root,o),focusable:"false",color:c,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:n},C,g,w&&i.props,{ownerState:b,children:[w?i.props.children:i,f?u("title",{children:f}):null]}))});SR.muiName="SvgIcon";const TT=SR;function Vn(t,e){function n(r,i){return u(TT,M({"data-testid":`${e}Icon`,ref:i},r,{children:t}))}return n.muiName=TT.muiName,x.memo(x.forwardRef(n))}const vz={configure:t=>{tw.configure(t)}},wz=Object.freeze(Object.defineProperty({__proto__:null,capitalize:be,createChainedFunction:Bv,createSvgIcon:Vn,debounce:dm,deprecatedPropType:w6,isMuiElement:cu,ownerDocument:rr,ownerWindow:Ii,requirePropFactory:b6,setRef:Gf,unstable_ClassNameGenerator:vz,unstable_useEnhancedEffect:li,unstable_useId:hm,unsupportedProp:k6,useControlled:qf,useEventCallback:zo,useForkRef:en,useIsFocusVisible:ew},Symbol.toStringTag,{value:"Module"})),bz=Ri(wz);var ET;function CR(){return ET||(ET=1,function(t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return e.createSvgIcon}});var e=bz}(ry)),ry}const IR=Ri(f4);var _z=em;Object.defineProperty(X1,"__esModule",{value:!0});var PR=X1.default=void 0,xz=_z(CR()),kz=IR;PR=X1.default=(0,xz.default)((0,kz.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu");var xw={},Tz=em;Object.defineProperty(xw,"__esModule",{value:!0});var Qv=xw.default=void 0,Ez=Tz(CR()),Sz=IR;Qv=xw.default=(0,Ez.default)((0,Sz.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");const Cz=Vn(u("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown"),Iz=Vn(u("path",{d:"m7 14 5-5 5 5z"}),"ArrowDropUp"),Pz=Vn(u("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info"),Rz=Vn(u("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreHoriz"),Az=Vn(u("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"}),"Refresh"),Nz=Vn(u("path",{d:"M11 6H9V4h2zm4-2h-2v2h2zM9 14h2v-2H9zm10-4V8h-2v2zm0 4v-2h-2v2zm-6 0h2v-2h-2zm6-10h-2v2h2zm-6 4V6h-2v2zm-6 2V8h2V6H7V4H5v16h2v-8h2v-2zm8 2h2v-2h-2zm-4-2v2h2v-2zM9 8v2h2V8zm4 2h2V8h-2zm2-4v2h2V6z"}),"SportsScore");function Xv(t,e){return Xv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Xv(t,e)}function RR(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Xv(t,e)}const ST={disabled:!1},Zf=Jt.createContext(null);var Mz=function(e){return e.scrollTop},zc="unmounted",Ds="exited",Os="entering",Na="entered",Jv="exiting",mo=function(t){RR(e,t);function e(r,i){var o;o=t.call(this,r,i)||this;var s=i,a=s&&!s.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?a?(l=Ds,o.appearStatus=Os):l=Na:r.unmountOnExit||r.mountOnEnter?l=zc:l=Ds,o.state={status:l},o.nextCallback=null,o}e.getDerivedStateFromProps=function(i,o){var s=i.in;return s&&o.status===zc?{status:Ds}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==Os&&s!==Na&&(o=Os):(s===Os||s===Na)&&(o=Jv)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,s,a;return o=s=a=i,i!=null&&typeof i!="number"&&(o=i.exit,s=i.enter,a=i.appear!==void 0?i.appear:s),{exit:o,enter:s,appear:a}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===Os){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:$c.findDOMNode(this);s&&Mz(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ds&&this.setState({status:zc})},n.performEnter=function(i){var o=this,s=this.props.enter,a=this.context?this.context.isMounting:i,l=this.props.nodeRef?[a]:[$c.findDOMNode(this),a],c=l[0],h=l[1],f=this.getTimeouts(),p=a?f.appear:f.enter;if(!i&&!s||ST.disabled){this.safeSetState({status:Na},function(){o.props.onEntered(c)});return}this.props.onEnter(c,h),this.safeSetState({status:Os},function(){o.props.onEntering(c,h),o.onTransitionEnd(p,function(){o.safeSetState({status:Na},function(){o.props.onEntered(c,h)})})})},n.performExit=function(){var i=this,o=this.props.exit,s=this.getTimeouts(),a=this.props.nodeRef?void 0:$c.findDOMNode(this);if(!o||ST.disabled){this.safeSetState({status:Ds},function(){i.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:Jv},function(){i.props.onExiting(a),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:Ds},function(){i.props.onExited(a)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,s=!0;return this.nextCallback=function(a){s&&(s=!1,o.nextCallback=null,i(a))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var s=this.props.nodeRef?this.props.nodeRef.current:$c.findDOMNode(this),a=i==null&&!this.props.addEndListener;if(!s||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],c=l[0],h=l[1];this.props.addEndListener(c,h)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===zc)return null;var o=this.props,s=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var a=le(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Jt.createElement(Zf.Provider,{value:null},typeof s=="function"?s(i,a):Jt.cloneElement(Jt.Children.only(s),a))},e}(Jt.Component);mo.contextType=Zf;mo.propTypes={};function Aa(){}mo.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Aa,onEntering:Aa,onEntered:Aa,onExit:Aa,onExiting:Aa,onExited:Aa};mo.UNMOUNTED=zc;mo.EXITED=Ds;mo.ENTERING=Os;mo.ENTERED=Na;mo.EXITING=Jv;const kw=mo;function Dz(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Tw(t,e){var n=function(o){return e&&x.isValidElement(o)?e(o):o},r=Object.create(null);return t&&x.Children.map(t,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function Oz(t,e){t=t||{},e=e||{};function n(h){return h in e?e[h]:t[h]}var r=Object.create(null),i=[];for(var o in t)o in e?i.length&&(r[o]=i,i=[]):i.push(o);var s,a={};for(var l in e){if(r[l])for(s=0;suy(typeof s=="function"?s(i):s)):o=uy(o)),u(uR,{styles:o})}const jz=["className","component"];function Wz(t={}){const{themeId:e,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:i}=t,o=hw("div",{shouldForwardProp:a=>a!=="theme"&&a!=="sx"&&a!=="as"})(wd);return x.forwardRef(function(l,c){const h=Dm(n),f=_d(l),{className:p,component:g="div"}=f,w=le(f,jz);return u(o,M({as:g,ref:c,className:we(p,i?i(r):r),theme:e&&h[e]||h},w))})}const Hz=["ownerState"],Gz=["variants"],qz=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function Kz(t){return Object.keys(t).length===0}function Yz(t){return typeof t=="string"&&t.charCodeAt(0)>96}function dy(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}function CT(t,e){return e&&t&&typeof t=="object"&&t.styles&&!t.styles.startsWith("@layer")&&(t.styles=`@layer ${e}{${String(t.styles)}}`),t}const Qz=bd(),Xz=t=>t&&t.charAt(0).toLowerCase()+t.slice(1);function wh({defaultTheme:t,theme:e,themeId:n}){return Kz(e)?t:e[n]||e}function Jz(t){return t?(e,n)=>n[t]:null}function Qh(t,e,n){let{ownerState:r}=e,i=le(e,Hz);const o=typeof t=="function"?t(M({ownerState:r},i)):t;if(Array.isArray(o))return o.flatMap(s=>Qh(s,M({ownerState:r},i),n));if(o&&typeof o=="object"&&Array.isArray(o.variants)){const{variants:s=[]}=o;let l=le(o,Gz);return s.forEach(c=>{let h=!0;if(typeof c.props=="function"?h=c.props(M({ownerState:r},i,r)):Object.keys(c.props).forEach(f=>{(r==null?void 0:r[f])!==c.props[f]&&i[f]!==c.props[f]&&(h=!1)}),h){Array.isArray(l)||(l=[l]);const f=typeof c.style=="function"?c.style(M({ownerState:r},i,r)):c.style;l.push(n?CT(Yf(f),n):f)}}),l}return n?CT(Yf(o),n):o}function Zz(t={}){const{themeId:e,defaultTheme:n=Qz,rootShouldForwardProp:r=dy,slotShouldForwardProp:i=dy}=t,o=s=>wd(M({},s,{theme:wh(M({},s,{defaultTheme:n,themeId:e}))}));return o.__mui_systemSx=!0,(s,a={})=>{dR(s,D=>D.filter(v=>!(v!=null&&v.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:h,skipSx:f,overridesResolver:p=Jz(Xz(c))}=a,g=le(a,qz),w=l&&l.startsWith("Mui")||c?"components":"custom",b=h!==void 0?h:c&&c!=="Root"&&c!=="root"||!1,C=f||!1;let T,y=dy;c==="Root"||c==="root"?y=r:c?y=i:Yz(s)&&(y=void 0);const _=hw(s,M({shouldForwardProp:y,label:T},g)),S=D=>typeof D=="function"&&D.__emotion_real!==D||Ui(D)?v=>{const E=wh({theme:v.theme,defaultTheme:n,themeId:e});return Qh(D,M({},v,{theme:E}),E.modularCssLayers?w:void 0)}:D,N=(D,...v)=>{let E=S(D);const I=v?v.map(S):[];l&&p&&I.push(O=>{const R=wh(M({},O,{defaultTheme:n,themeId:e}));if(!R.components||!R.components[l]||!R.components[l].styleOverrides)return null;const U=R.components[l].styleOverrides,$={};return Object.entries(U).forEach(([z,j])=>{$[z]=Qh(j,M({},O,{theme:R}),R.modularCssLayers?"theme":void 0)}),p(O,$)}),l&&!b&&I.push(O=>{var R;const U=wh(M({},O,{defaultTheme:n,themeId:e})),$=U==null||(R=U.components)==null||(R=R[l])==null?void 0:R.variants;return Qh({variants:$},M({},O,{theme:U}),U.modularCssLayers?"theme":void 0)}),C||I.push(o);const P=I.length-v.length;if(Array.isArray(D)&&P>0){const O=new Array(P).fill("");E=[...D,...O],E.raw=[...D.raw,...O]}const L=_(E,...I);return s.muiName&&(L.muiName=s.muiName),L};return _.withConfig&&(N.withConfig=_.withConfig),N}}const e8=Zz(),t8=e8;function n8(t){const{theme:e,name:n,props:r}=t;return!e||!e.components||!e.components[n]||!e.components[n].defaultProps?r:Uu(e.components[n].defaultProps,r)}function r8({props:t,name:e,defaultTheme:n,themeId:r}){let i=Dm(n);return r&&(i=i[r]||i),n8({theme:i,name:e,props:t})}const i8=x.createContext(null),NR=i8;function MR(){return x.useContext(NR)}const o8=typeof Symbol=="function"&&Symbol.for,s8=o8?Symbol.for("mui.nested"):"__THEME_NESTED__";function a8(t,e){return typeof e=="function"?e(t):M({},t,e)}function l8(t){const{children:e,theme:n}=t,r=MR(),i=x.useMemo(()=>{const o=r===null?n:a8(r,n);return o!=null&&(o[s8]=r!==null),o},[n,r]);return u(NR.Provider,{value:i,children:e})}const c8=["value"],DR=x.createContext();function u8(t){let{value:e}=t,n=le(t,c8);return u(DR.Provider,M({value:e??!0},n))}const d8=()=>{const t=x.useContext(DR);return t??!1};function h8(t){const e=Sw(),n=hm()||"",{modularCssLayers:r}=t;let i="mui.global, mui.components, mui.theme, mui.custom, mui.sx";return!r||e!==null?i="":typeof r=="string"?i=r.replace(/mui(?!\.)/g,i):i=`@layer ${i};`,li(()=>{const o=document.querySelector("head");if(!o)return;const s=o.firstChild;if(i){var a;if(s&&(a=s.hasAttribute)!=null&&a.call(s,"data-mui-layer-order")&&s.getAttribute("data-mui-layer-order")===n)return;const c=document.createElement("style");c.setAttribute("data-mui-layer-order",n),c.textContent=i,o.prepend(c)}else{var l;(l=o.querySelector(`style[data-mui-layer-order="${n}"]`))==null||l.remove()}},[i,n]),i?u(AR,{styles:i}):null}const IT={};function PT(t,e,n,r=!1){return x.useMemo(()=>{const i=t&&e[t]||e;if(typeof n=="function"){const o=n(i),s=t?M({},e,{[t]:o}):o;return r?()=>s:s}return t?M({},e,{[t]:n}):M({},e,n)},[t,e,n,r])}function f8(t){const{children:e,theme:n,themeId:r}=t,i=Sw(IT),o=MR()||IT,s=PT(r,i,n),a=PT(r,o,n,!0),l=s.direction==="rtl",c=h8(s);return u(l8,{theme:a,children:u(Gl.Provider,{value:s,children:u(u8,{value:l,children:F(B6,{value:s==null?void 0:s.components,children:[c,e]})})})})}const p8=["component","direction","spacing","divider","children","className","useFlexGap"],m8=bd(),g8=t8("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root});function y8(t){return r8({props:t,name:"MuiStack",defaultTheme:m8})}function v8(t,e){const n=x.Children.toArray(t).filter(Boolean);return n.reduce((r,i,o)=>(r.push(i),o({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[t],b8=({ownerState:t,theme:e})=>{let n=M({display:"flex",flexDirection:"column"},ar({theme:e},Ys({values:t.direction,breakpoints:e.breakpoints.values}),r=>({flexDirection:r})));if(t.spacing){const r=gw(e),i=Object.keys(e.breakpoints.values).reduce((l,c)=>((typeof t.spacing=="object"&&t.spacing[c]!=null||typeof t.direction=="object"&&t.direction[c]!=null)&&(l[c]=!0),l),{}),o=Ys({values:t.direction,base:i}),s=Ys({values:t.spacing,base:i});typeof o=="object"&&Object.keys(o).forEach((l,c,h)=>{if(!o[l]){const p=c>0?o[h[c-1]]:"column";o[l]=p}}),n=jn(n,ar({theme:e},s,(l,c)=>t.useFlexGap?{gap:ia(r,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${w8(c?o[c]:t.direction)}`]:ia(r,l)}}))}return n=cB(e.breakpoints,n),n};function _8(t={}){const{createStyledComponent:e=g8,useThemeProps:n=y8,componentName:r="MuiStack"}=t,i=()=>Be({root:["root"]},l=>$e(r,l),{}),o=e(b8);return x.forwardRef(function(l,c){const h=n(l),f=_d(h),{component:p="div",direction:g="column",spacing:w=0,divider:b,children:C,className:T,useFlexGap:y=!1}=f,_=le(f,p8),S={direction:g,spacing:w,useFlexGap:y},N=i();return u(o,M({as:p,ownerState:S,ref:c,className:we(N.root,T)},_,{children:b?v8(C,b):C}))})}function Om(){const t=Dm(_w);return t[Il]||t}const Cw=t=>t.scrollTop;function Pl(t,e){var n,r;const{timeout:i,easing:o,style:s={}}=t;return{duration:(n=s.transitionDuration)!=null?n:typeof i=="number"?i:i[e.mode]||0,easing:(r=s.transitionTimingFunction)!=null?r:typeof o=="object"?o[e.mode]:o,delay:s.transitionDelay}}const x8=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function k8(t,e,n){const r=e.getBoundingClientRect(),i=n&&n.getBoundingClientRect(),o=Ii(e);let s;if(e.fakeTransform)s=e.fakeTransform;else{const c=o.getComputedStyle(e);s=c.getPropertyValue("-webkit-transform")||c.getPropertyValue("transform")}let a=0,l=0;if(s&&s!=="none"&&typeof s=="string"){const c=s.split("(")[1].split(")")[0].split(",");a=parseInt(c[4],10),l=parseInt(c[5],10)}return t==="left"?i?`translateX(${i.right+a-r.left}px)`:`translateX(${o.innerWidth+a-r.left}px)`:t==="right"?i?`translateX(-${r.right-i.left-a}px)`:`translateX(-${r.left+r.width-a}px)`:t==="up"?i?`translateY(${i.bottom+l-r.top}px)`:`translateY(${o.innerHeight+l-r.top}px)`:i?`translateY(-${r.top-i.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}function T8(t){return typeof t=="function"?t():t}function bh(t,e,n){const r=T8(n),i=k8(t,e,r);i&&(e.style.webkitTransform=i,e.style.transform=i)}const E8=x.forwardRef(function(e,n){const r=Om(),i={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:s,appear:a=!0,children:l,container:c,direction:h="down",easing:f=i,in:p,onEnter:g,onEntered:w,onEntering:b,onExit:C,onExited:T,onExiting:y,style:_,timeout:S=o,TransitionComponent:N=kw}=e,D=le(e,x8),v=x.useRef(null),E=en(Wl(l),v,n),I=V=>W=>{V&&(W===void 0?V(v.current):V(v.current,W))},P=I((V,W)=>{bh(h,V,c),Cw(V),g&&g(V,W)}),L=I((V,W)=>{const Y=Pl({timeout:S,style:_,easing:f},{mode:"enter"});V.style.webkitTransition=r.transitions.create("-webkit-transform",M({},Y)),V.style.transition=r.transitions.create("transform",M({},Y)),V.style.webkitTransform="none",V.style.transform="none",b&&b(V,W)}),O=I(w),R=I(y),U=I(V=>{const W=Pl({timeout:S,style:_,easing:f},{mode:"exit"});V.style.webkitTransition=r.transitions.create("-webkit-transform",W),V.style.transition=r.transitions.create("transform",W),bh(h,V,c),C&&C(V)}),$=I(V=>{V.style.webkitTransition="",V.style.transition="",T&&T(V)}),z=V=>{s&&s(v.current,V)},j=x.useCallback(()=>{v.current&&bh(h,v.current,c)},[h,c]);return x.useEffect(()=>{if(p||h==="down"||h==="right")return;const V=dm(()=>{v.current&&bh(h,v.current,c)}),W=Ii(v.current);return W.addEventListener("resize",V),()=>{V.clear(),W.removeEventListener("resize",V)}},[h,p,c]),x.useEffect(()=>{p||j()},[p,j]),u(N,M({nodeRef:v,onEnter:P,onEntered:O,onEntering:L,onExit:U,onExited:$,onExiting:R,addEndListener:z,appear:a,in:p,timeout:S},D,{children:(V,W)=>x.cloneElement(l,M({ref:E,style:M({visibility:V==="exited"&&!p?"hidden":void 0},_,l.props.style)},W))}))}),S8=E8,C8=["theme"];function Iw(t){let{theme:e}=t,n=le(t,C8);const r=e[Il];let i=r||e;return typeof e!="function"&&(r&&!r.vars?i=M({},r,{vars:null}):e&&!e.vars&&(i=M({},e,{vars:null}))),u(f8,M({},n,{themeId:r?Il:void 0,theme:i}))}const I8=t=>{let e;return t<1?e=5.11916*t**2:e=4.5*Math.log(t+1)+2,(e/100).toFixed(2)},RT=I8;function P8(t){return $e("MuiPaper",t)}Ve("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const R8=["className","component","elevation","square","variant"],A8=t=>{const{square:e,elevation:n,variant:r,classes:i}=t,o={root:["root",r,!e&&"rounded",r==="elevation"&&`elevation${n}`]};return Be(o,P8,i)},N8=oe("div",{name:"MuiPaper",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],!n.square&&e.rounded,n.variant==="elevation"&&e[`elevation${n.elevation}`]]}})(({theme:t,ownerState:e})=>{var n;return M({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow")},!e.square&&{borderRadius:t.shape.borderRadius},e.variant==="outlined"&&{border:`1px solid ${(t.vars||t).palette.divider}`},e.variant==="elevation"&&M({boxShadow:(t.vars||t).shadows[e.elevation]},!t.vars&&t.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${on("#fff",RT(e.elevation))}, ${on("#fff",RT(e.elevation))})`},t.vars&&{backgroundImage:(n=t.vars.overlays)==null?void 0:n[e.elevation]}))}),M8=x.forwardRef(function(e,n){const r=ze({props:e,name:"MuiPaper"}),{className:i,component:o="div",elevation:s=1,square:a=!1,variant:l="elevation"}=r,c=le(r,R8),h=M({},r,{component:o,elevation:s,square:a,variant:l}),f=A8(h);return u(N8,M({as:o,ownerState:h,className:we(f.root,i),ref:n},c))}),mr=M8,D8=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],O8=["component","slots","slotProps"],L8=["component"];function AT(t,e){const{className:n,elementType:r,ownerState:i,externalForwardedProps:o,getSlotOwnerState:s,internalForwardedProps:a}=e,l=le(e,D8),{component:c,slots:h={[t]:void 0},slotProps:f={[t]:void 0}}=o,p=le(o,O8),g=h[t]||r,w=j2(f[t],i),b=z2(M({className:n},l,{externalForwardedProps:t==="root"?p:void 0,externalSlotProps:w})),{props:{component:C},internalRef:T}=b,y=le(b.props,L8),_=en(T,w==null?void 0:w.ref,e.ref),S=s?s(y):{},N=M({},i,S),D=t==="root"?C||c:C,v=$2(g,M({},t==="root"&&!c&&!h[t]&&a,t!=="root"&&!h[t]&&a,y,D&&{as:D},{ref:_}),N);return Object.keys(S).forEach(E=>{delete v[E]}),[g,v]}function V8(t){const{className:e,classes:n,pulsate:r=!1,rippleX:i,rippleY:o,rippleSize:s,in:a,onExited:l,timeout:c}=t,[h,f]=x.useState(!1),p=we(e,n.ripple,n.rippleVisible,r&&n.ripplePulsate),g={width:s,height:s,top:-(s/2)+o,left:-(s/2)+i},w=we(n.child,h&&n.childLeaving,r&&n.childPulsate);return!a&&!h&&f(!0),x.useEffect(()=>{if(!a&&l!=null){const b=setTimeout(l,c);return()=>{clearTimeout(b)}}},[l,a,c]),u("span",{className:p,style:g,children:u("span",{className:w})})}const F8=Ve("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Mr=F8,$8=["center","classes","className"];let Lm=t=>t,NT,MT,DT,OT;const Zv=550,B8=80,U8=ql(NT||(NT=Lm` 0% { transform: scale(0); opacity: 0.1; } 100% { transform: scale(1); opacity: 0.3; } `)),z8=ql(MT||(MT=Lm` 0% { opacity: 1; } 100% { opacity: 0; } `)),j8=ql(DT||(DT=Lm` 0% { transform: scale(1); } 50% { transform: scale(0.92); } 100% { transform: scale(1); } `)),W8=oe("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),H8=oe(V8,{name:"MuiTouchRipple",slot:"Ripple"})(OT||(OT=Lm` opacity: 0; position: absolute; &.${0} { opacity: 0.3; transform: scale(1); animation-name: ${0}; animation-duration: ${0}ms; animation-timing-function: ${0}; } &.${0} { animation-duration: ${0}ms; } & .${0} { opacity: 1; display: block; width: 100%; height: 100%; border-radius: 50%; background-color: currentColor; } & .${0} { opacity: 0; animation-name: ${0}; animation-duration: ${0}ms; animation-timing-function: ${0}; } & .${0} { position: absolute; /* @noflip */ left: 0px; top: 0; animation-name: ${0}; animation-duration: 2500ms; animation-timing-function: ${0}; animation-iteration-count: infinite; animation-delay: 200ms; } `),Mr.rippleVisible,U8,Zv,({theme:t})=>t.transitions.easing.easeInOut,Mr.ripplePulsate,({theme:t})=>t.transitions.duration.shorter,Mr.child,Mr.childLeaving,z8,Zv,({theme:t})=>t.transitions.easing.easeInOut,Mr.childPulsate,j8,({theme:t})=>t.transitions.easing.easeInOut),G8=x.forwardRef(function(e,n){const r=ze({props:e,name:"MuiTouchRipple"}),{center:i=!1,classes:o={},className:s}=r,a=le(r,$8),[l,c]=x.useState([]),h=x.useRef(0),f=x.useRef(null);x.useEffect(()=>{f.current&&(f.current(),f.current=null)},[l]);const p=x.useRef(!1),g=V2(),w=x.useRef(null),b=x.useRef(null),C=x.useCallback(S=>{const{pulsate:N,rippleX:D,rippleY:v,rippleSize:E,cb:I}=S;c(P=>[...P,u(H8,{classes:{ripple:we(o.ripple,Mr.ripple),rippleVisible:we(o.rippleVisible,Mr.rippleVisible),ripplePulsate:we(o.ripplePulsate,Mr.ripplePulsate),child:we(o.child,Mr.child),childLeaving:we(o.childLeaving,Mr.childLeaving),childPulsate:we(o.childPulsate,Mr.childPulsate)},timeout:Zv,pulsate:N,rippleX:D,rippleY:v,rippleSize:E},h.current)]),h.current+=1,f.current=I},[o]),T=x.useCallback((S={},N={},D=()=>{})=>{const{pulsate:v=!1,center:E=i||N.pulsate,fakeElement:I=!1}=N;if((S==null?void 0:S.type)==="mousedown"&&p.current){p.current=!1;return}(S==null?void 0:S.type)==="touchstart"&&(p.current=!0);const P=I?null:b.current,L=P?P.getBoundingClientRect():{width:0,height:0,left:0,top:0};let O,R,U;if(E||S===void 0||S.clientX===0&&S.clientY===0||!S.clientX&&!S.touches)O=Math.round(L.width/2),R=Math.round(L.height/2);else{const{clientX:$,clientY:z}=S.touches&&S.touches.length>0?S.touches[0]:S;O=Math.round($-L.left),R=Math.round(z-L.top)}if(E)U=Math.sqrt((2*L.width**2+L.height**2)/3),U%2===0&&(U+=1);else{const $=Math.max(Math.abs((P?P.clientWidth:0)-O),O)*2+2,z=Math.max(Math.abs((P?P.clientHeight:0)-R),R)*2+2;U=Math.sqrt($**2+z**2)}S!=null&&S.touches?w.current===null&&(w.current=()=>{C({pulsate:v,rippleX:O,rippleY:R,rippleSize:U,cb:D})},g.start(B8,()=>{w.current&&(w.current(),w.current=null)})):C({pulsate:v,rippleX:O,rippleY:R,rippleSize:U,cb:D})},[i,C,g]),y=x.useCallback(()=>{T({},{pulsate:!0})},[T]),_=x.useCallback((S,N)=>{if(g.clear(),(S==null?void 0:S.type)==="touchend"&&w.current){w.current(),w.current=null,g.start(0,()=>{_(S,N)});return}w.current=null,c(D=>D.length>0?D.slice(1):D),f.current=N},[g]);return x.useImperativeHandle(n,()=>({pulsate:y,start:T,stop:_}),[y,T,_]),u(W8,M({className:we(Mr.root,o.root,s),ref:b},a,{children:u(Bz,{component:null,exit:!0,children:l})}))}),q8=G8;function K8(t){return $e("MuiButtonBase",t)}const Y8=Ve("MuiButtonBase",["root","disabled","focusVisible"]),Q8=Y8,X8=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],J8=t=>{const{disabled:e,focusVisible:n,focusVisibleClassName:r,classes:i}=t,s=Be({root:["root",e&&"disabled",n&&"focusVisible"]},K8,i);return n&&r&&(s.root+=` ${r}`),s},Z8=oe("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Q8.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),ej=x.forwardRef(function(e,n){const r=ze({props:e,name:"MuiButtonBase"}),{action:i,centerRipple:o=!1,children:s,className:a,component:l="button",disabled:c=!1,disableRipple:h=!1,disableTouchRipple:f=!1,focusRipple:p=!1,LinkComponent:g="a",onBlur:w,onClick:b,onContextMenu:C,onDragLeave:T,onFocus:y,onFocusVisible:_,onKeyDown:S,onKeyUp:N,onMouseDown:D,onMouseLeave:v,onMouseUp:E,onTouchEnd:I,onTouchMove:P,onTouchStart:L,tabIndex:O=0,TouchRippleProps:R,touchRippleRef:U,type:$}=r,z=le(r,X8),j=x.useRef(null),V=x.useRef(null),W=en(V,U),{isFocusVisibleRef:Y,onFocus:J,onBlur:te,ref:se}=ew(),[ae,ke]=x.useState(!1);c&&ae&&ke(!1),x.useImperativeHandle(i,()=>({focusVisible:()=>{ke(!0),j.current.focus()}}),[]);const[Te,Oe]=x.useState(!1);x.useEffect(()=>{Oe(!0)},[]);const pt=Te&&!h&&!c;x.useEffect(()=>{ae&&p&&!h&&Te&&V.current.pulsate()},[h,p,ae,Te]);function at(pe,$n,cr=f){return zo(Ni=>($n&&$n(Ni),!cr&&V.current&&V.current[pe](Ni),!0))}const yt=at("start",D),Re=at("stop",C),Ne=at("stop",T),Ce=at("stop",E),Ge=at("stop",pe=>{ae&&pe.preventDefault(),v&&v(pe)}),ot=at("start",L),tn=at("stop",I),hn=at("stop",P),En=at("stop",pe=>{te(pe),Y.current===!1&&ke(!1),w&&w(pe)},!1),fn=zo(pe=>{j.current||(j.current=pe.currentTarget),J(pe),Y.current===!0&&(ke(!0),_&&_(pe)),y&&y(pe)}),pn=()=>{const pe=j.current;return l&&l!=="button"&&!(pe.tagName==="A"&&pe.href)},lt=x.useRef(!1),qn=zo(pe=>{p&&!lt.current&&ae&&V.current&&pe.key===" "&&(lt.current=!0,V.current.stop(pe,()=>{V.current.start(pe)})),pe.target===pe.currentTarget&&pn()&&pe.key===" "&&pe.preventDefault(),S&&S(pe),pe.target===pe.currentTarget&&pn()&&pe.key==="Enter"&&!c&&(pe.preventDefault(),b&&b(pe))}),an=zo(pe=>{p&&pe.key===" "&&V.current&&ae&&!pe.defaultPrevented&&(lt.current=!1,V.current.stop(pe,()=>{V.current.pulsate(pe)})),N&&N(pe),b&&pe.target===pe.currentTarget&&pn()&&pe.key===" "&&!pe.defaultPrevented&&b(pe)});let je=l;je==="button"&&(z.href||z.to)&&(je=g);const Gt={};je==="button"?(Gt.type=$===void 0?"button":$,Gt.disabled=c):(!z.href&&!z.to&&(Gt.role="button"),c&&(Gt["aria-disabled"]=c));const Fn=en(n,se,j),st=M({},r,{centerRipple:o,component:l,disabled:c,disableRipple:h,disableTouchRipple:f,focusRipple:p,tabIndex:O,focusVisible:ae}),Ee=J8(st);return F(Z8,M({as:je,className:we(Ee.root,a),ownerState:st,onBlur:En,onClick:b,onContextMenu:Re,onFocus:fn,onKeyDown:qn,onKeyUp:an,onMouseDown:yt,onMouseLeave:Ge,onMouseUp:Ce,onDragLeave:Ne,onTouchEnd:tn,onTouchMove:hn,onTouchStart:ot,ref:Fn,tabIndex:c?-1:O,type:$},Gt,z,{children:[s,pt?u(q8,M({ref:W,center:o},R)):null]}))}),kd=ej;function tj(t){return $e("MuiAlert",t)}const nj=Ve("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),LT=nj;function rj(t){return $e("MuiIconButton",t)}const ij=Ve("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),oj=ij,sj=["edge","children","className","color","disabled","disableFocusRipple","size"],aj=t=>{const{classes:e,disabled:n,color:r,edge:i,size:o}=t,s={root:["root",n&&"disabled",r!=="default"&&`color${be(r)}`,i&&`edge${be(i)}`,`size${be(o)}`]};return Be(s,rj,e)},lj=oe(kd,{name:"MuiIconButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color!=="default"&&e[`color${be(n.color)}`],n.edge&&e[`edge${be(n.edge)}`],e[`size${be(n.size)}`]]}})(({theme:t,ownerState:e})=>M({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(t.vars||t).palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest})},!e.disableRipple&&{"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:on(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12}),({theme:t,ownerState:e})=>{var n;const r=(n=(t.vars||t).palette)==null?void 0:n[e.color];return M({},e.color==="inherit"&&{color:"inherit"},e.color!=="inherit"&&e.color!=="default"&&M({color:r==null?void 0:r.main},!e.disableRipple&&{"&:hover":M({},r&&{backgroundColor:t.vars?`rgba(${r.mainChannel} / ${t.vars.palette.action.hoverOpacity})`:on(r.main,t.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),e.size==="small"&&{padding:5,fontSize:t.typography.pxToRem(18)},e.size==="large"&&{padding:12,fontSize:t.typography.pxToRem(28)},{[`&.${oj.disabled}`]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled}})}),cj=x.forwardRef(function(e,n){const r=ze({props:e,name:"MuiIconButton"}),{edge:i=!1,children:o,className:s,color:a="default",disabled:l=!1,disableFocusRipple:c=!1,size:h="medium"}=r,f=le(r,sj),p=M({},r,{edge:i,color:a,disabled:l,disableFocusRipple:c,size:h}),g=aj(p);return u(lj,M({className:we(g.root,s),centerRipple:!0,focusRipple:!c,disabled:l,ref:n},f,{ownerState:p,children:o}))}),uj=cj,dj=Vn(u("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),hj=Vn(u("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),fj=Vn(u("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),pj=Vn(u("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),mj=Vn(u("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),gj=["action","children","className","closeText","color","components","componentsProps","icon","iconMapping","onClose","role","severity","slotProps","slots","variant"],yj=t=>{const{variant:e,color:n,severity:r,classes:i}=t,o={root:["root",`color${be(n||r)}`,`${e}${be(n||r)}`,`${e}`],icon:["icon"],message:["message"],action:["action"]};return Be(o,tj,i)},vj=oe(mr,{name:"MuiAlert",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`${n.variant}${be(n.color||n.severity)}`]]}})(({theme:t})=>{const e=t.palette.mode==="light"?Kv:Yv,n=t.palette.mode==="light"?Yv:Kv;return M({},t.typography.body2,{backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(t.palette).filter(([,r])=>r.main&&r.light).map(([r])=>({props:{colorSeverity:r,variant:"standard"},style:{color:t.vars?t.vars.palette.Alert[`${r}Color`]:e(t.palette[r].light,.6),backgroundColor:t.vars?t.vars.palette.Alert[`${r}StandardBg`]:n(t.palette[r].light,.9),[`& .${LT.icon}`]:t.vars?{color:t.vars.palette.Alert[`${r}IconColor`]}:{color:t.palette[r].main}}})),...Object.entries(t.palette).filter(([,r])=>r.main&&r.light).map(([r])=>({props:{colorSeverity:r,variant:"outlined"},style:{color:t.vars?t.vars.palette.Alert[`${r}Color`]:e(t.palette[r].light,.6),border:`1px solid ${(t.vars||t).palette[r].light}`,[`& .${LT.icon}`]:t.vars?{color:t.vars.palette.Alert[`${r}IconColor`]}:{color:t.palette[r].main}}})),...Object.entries(t.palette).filter(([,r])=>r.main&&r.dark).map(([r])=>({props:{colorSeverity:r,variant:"filled"},style:M({fontWeight:t.typography.fontWeightMedium},t.vars?{color:t.vars.palette.Alert[`${r}FilledColor`],backgroundColor:t.vars.palette.Alert[`${r}FilledBg`]}:{backgroundColor:t.palette.mode==="dark"?t.palette[r].dark:t.palette[r].main,color:t.palette.getContrastText(t.palette[r].main)})}))]})}),wj=oe("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(t,e)=>e.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),bj=oe("div",{name:"MuiAlert",slot:"Message",overridesResolver:(t,e)=>e.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),VT=oe("div",{name:"MuiAlert",slot:"Action",overridesResolver:(t,e)=>e.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),FT={success:u(dj,{fontSize:"inherit"}),warning:u(hj,{fontSize:"inherit"}),error:u(fj,{fontSize:"inherit"}),info:u(pj,{fontSize:"inherit"})},_j=x.forwardRef(function(e,n){const r=ze({props:e,name:"MuiAlert"}),{action:i,children:o,className:s,closeText:a="Close",color:l,components:c={},componentsProps:h={},icon:f,iconMapping:p=FT,onClose:g,role:w="alert",severity:b="success",slotProps:C={},slots:T={},variant:y="standard"}=r,_=le(r,gj),S=M({},r,{color:l,severity:b,variant:y,colorSeverity:l||b}),N=yj(S),D={slots:M({closeButton:c.CloseButton,closeIcon:c.CloseIcon},T),slotProps:M({},h,C)},[v,E]=AT("closeButton",{elementType:uj,externalForwardedProps:D,ownerState:S}),[I,P]=AT("closeIcon",{elementType:mj,externalForwardedProps:D,ownerState:S});return F(vj,M({role:w,elevation:0,ownerState:S,className:we(N.root,s),ref:n},_,{children:[f!==!1?u(wj,{ownerState:S,className:N.icon,children:f||p[b]||FT[b]}):null,u(bj,{ownerState:S,className:N.message,children:o}),i!=null?u(VT,{ownerState:S,className:N.action,children:i}):null,i==null&&g?u(VT,{ownerState:S,className:N.action,children:u(v,M({size:"small","aria-label":a,title:a,color:"inherit",onClick:g},E,{children:u(I,M({fontSize:"small"},P))}))}):null]}))}),xj=_j;function kj(t){return $e("MuiTypography",t)}Ve("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Tj=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],Ej=t=>{const{align:e,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:s}=t,a={root:["root",o,t.align!=="inherit"&&`align${be(e)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return Be(a,kj,s)},Sj=oe("span",{name:"MuiTypography",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.variant&&e[n.variant],n.align!=="inherit"&&e[`align${be(n.align)}`],n.noWrap&&e.noWrap,n.gutterBottom&&e.gutterBottom,n.paragraph&&e.paragraph]}})(({theme:t,ownerState:e})=>M({margin:0},e.variant==="inherit"&&{font:"inherit"},e.variant!=="inherit"&&t.typography[e.variant],e.align!=="inherit"&&{textAlign:e.align},e.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},e.gutterBottom&&{marginBottom:"0.35em"},e.paragraph&&{marginBottom:16})),$T={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Cj={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},Ij=t=>Cj[t]||t,Pj=x.forwardRef(function(e,n){const r=ze({props:e,name:"MuiTypography"}),i=Ij(r.color),o=_d(M({},r,{color:i})),{align:s="inherit",className:a,component:l,gutterBottom:c=!1,noWrap:h=!1,paragraph:f=!1,variant:p="body1",variantMapping:g=$T}=o,w=le(o,Tj),b=M({},o,{align:s,color:i,className:a,component:l,gutterBottom:c,noWrap:h,paragraph:f,variant:p,variantMapping:g}),C=l||(f?"p":g[p]||$T[p])||"span",T=Ej(b);return u(Sj,M({as:C,ref:n,ownerState:b,className:we(T.root,a)},w))}),ie=Pj;function Rj(t){return typeof t=="function"?t():t}const Aj=x.forwardRef(function(e,n){const{children:r,container:i,disablePortal:o=!1}=e,[s,a]=x.useState(null),l=en(x.isValidElement(r)?Wl(r):null,n);if(li(()=>{o||a(Rj(i)||document.body)},[i,o]),li(()=>{if(s&&!o)return Gf(n,s),()=>{Gf(n,null)}},[n,s,o]),o){if(x.isValidElement(r)){const c={ref:l};return x.cloneElement(r,c)}return u(x.Fragment,{children:r})}return u(x.Fragment,{children:s&&Fp.createPortal(r,s)})}),Nj=Aj,Mj=["onChange","maxRows","minRows","style","value"];function _h(t){return parseInt(t,10)||0}const Dj={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function Oj(t){for(const e in t)return!1;return!0}function BT(t){return Oj(t)||t.outerHeightStyle===0&&!t.overflowing}const Lj=x.forwardRef(function(e,n){const{onChange:r,maxRows:i,minRows:o=1,style:s,value:a}=e,l=le(e,Mj),{current:c}=x.useRef(a!=null),h=x.useRef(null),f=en(n,h),p=x.useRef(null),g=x.useRef(null),w=x.useCallback(()=>{const _=h.current,S=g.current;if(!_||!S)return;const D=Ii(_).getComputedStyle(_);if(D.width==="0px")return{outerHeightStyle:0,overflowing:!1};S.style.width=D.width,S.value=_.value||e.placeholder||"x",S.value.slice(-1)===` `&&(S.value+=" ");const v=D.boxSizing,E=_h(D.paddingBottom)+_h(D.paddingTop),I=_h(D.borderBottomWidth)+_h(D.borderTopWidth),P=S.scrollHeight;S.value="x";const L=S.scrollHeight;let O=P;o&&(O=Math.max(Number(o)*L,O)),i&&(O=Math.min(Number(i)*L,O)),O=Math.max(O,L);const R=O+(v==="border-box"?E+I:0),U=Math.abs(O-P)<=1;return{outerHeightStyle:R,overflowing:U}},[i,o,e.placeholder]),b=zo(()=>{const _=h.current,S=w();if(!_||!S||BT(S))return!1;const N=S.outerHeightStyle;return p.current!=null&&p.current!==N}),C=x.useCallback(()=>{const _=h.current,S=w();if(!_||!S||BT(S))return;const N=S.outerHeightStyle;p.current!==N&&(p.current=N,_.style.height=`${N}px`),_.style.overflow=S.overflowing?"hidden":""},[w]),T=x.useRef(-1);li(()=>{const _=dm(C),S=h==null?void 0:h.current;if(!S)return;const N=Ii(S);N.addEventListener("resize",_);let D;return typeof ResizeObserver<"u"&&(D=new ResizeObserver(()=>{b()&&(D.unobserve(S),cancelAnimationFrame(T.current),C(),T.current=requestAnimationFrame(()=>{D.observe(S)}))}),D.observe(S)),()=>{_.clear(),cancelAnimationFrame(T.current),N.removeEventListener("resize",_),D&&D.disconnect()}},[w,C,b]),li(()=>{C()});const y=_=>{c||C(),r&&r(_)};return F(x.Fragment,{children:[u("textarea",M({value:a,onChange:y,ref:f,rows:o,style:s},l)),u("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:g,tabIndex:-1,style:M({},Dj.shadow,s,{paddingTop:0,paddingBottom:0})})]})}),Vj=Lj;function ma({props:t,states:e,muiFormControl:n}){return e.reduce((r,i)=>(r[i]=t[i],n&&typeof t[i]>"u"&&(r[i]=n[i]),r),{})}const Fj=x.createContext(void 0),Pw=Fj;function ws(){return x.useContext(Pw)}function $j(t){return u(AR,M({},t,{defaultTheme:_w,themeId:Il}))}function UT(t){return t!=null&&!(Array.isArray(t)&&t.length===0)}function ep(t,e=!1){return t&&(UT(t.value)&&t.value!==""||e&&UT(t.defaultValue)&&t.defaultValue!=="")}function Bj(t){return t.startAdornment}function Uj(t){return $e("MuiInputBase",t)}const zj=Ve("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),Rl=zj,jj=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],Vm=(t,e)=>{const{ownerState:n}=t;return[e.root,n.formControl&&e.formControl,n.startAdornment&&e.adornedStart,n.endAdornment&&e.adornedEnd,n.error&&e.error,n.size==="small"&&e.sizeSmall,n.multiline&&e.multiline,n.color&&e[`color${be(n.color)}`],n.fullWidth&&e.fullWidth,n.hiddenLabel&&e.hiddenLabel]},Fm=(t,e)=>{const{ownerState:n}=t;return[e.input,n.size==="small"&&e.inputSizeSmall,n.multiline&&e.inputMultiline,n.type==="search"&&e.inputTypeSearch,n.startAdornment&&e.inputAdornedStart,n.endAdornment&&e.inputAdornedEnd,n.hiddenLabel&&e.inputHiddenLabel]},Wj=t=>{const{classes:e,color:n,disabled:r,error:i,endAdornment:o,focused:s,formControl:a,fullWidth:l,hiddenLabel:c,multiline:h,readOnly:f,size:p,startAdornment:g,type:w}=t,b={root:["root",`color${be(n)}`,r&&"disabled",i&&"error",l&&"fullWidth",s&&"focused",a&&"formControl",p&&p!=="medium"&&`size${be(p)}`,h&&"multiline",g&&"adornedStart",o&&"adornedEnd",c&&"hiddenLabel",f&&"readOnly"],input:["input",r&&"disabled",w==="search"&&"inputTypeSearch",h&&"inputMultiline",p==="small"&&"inputSizeSmall",c&&"inputHiddenLabel",g&&"inputAdornedStart",o&&"inputAdornedEnd",f&&"readOnly"]};return Be(b,Uj,e)},$m=oe("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Vm})(({theme:t,ownerState:e})=>M({},t.typography.body1,{color:(t.vars||t).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${Rl.disabled}`]:{color:(t.vars||t).palette.text.disabled,cursor:"default"}},e.multiline&&M({padding:"4px 0 5px"},e.size==="small"&&{paddingTop:1}),e.fullWidth&&{width:"100%"})),Bm=oe("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Fm})(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light",r=M({color:"currentColor"},t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5},{transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})}),i={opacity:"0 !important"},o=t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5};return M({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Rl.formControl} &`]:{"&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus:-ms-input-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${Rl.disabled}`]:{opacity:1,WebkitTextFillColor:(t.vars||t).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},e.size==="small"&&{paddingTop:1},e.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},e.type==="search"&&{MozAppearance:"textfield"})}),Hj=u($j,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),Gj=x.forwardRef(function(e,n){var r;const i=ze({props:e,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:s,autoFocus:a,className:l,components:c={},componentsProps:h={},defaultValue:f,disabled:p,disableInjectingGlobalStyles:g,endAdornment:w,fullWidth:b=!1,id:C,inputComponent:T="input",inputProps:y={},inputRef:_,maxRows:S,minRows:N,multiline:D=!1,name:v,onBlur:E,onChange:I,onClick:P,onFocus:L,onKeyDown:O,onKeyUp:R,placeholder:U,readOnly:$,renderSuffix:z,rows:j,slotProps:V={},slots:W={},startAdornment:Y,type:J="text",value:te}=i,se=le(i,jj),ae=y.value!=null?y.value:te,{current:ke}=x.useRef(ae!=null),Te=x.useRef(),Oe=x.useCallback(Ee=>{},[]),pt=en(Te,_,y.ref,Oe),[at,yt]=x.useState(!1),Re=ws(),Ne=ma({props:i,muiFormControl:Re,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Ne.focused=Re?Re.focused:at,x.useEffect(()=>{!Re&&p&&at&&(yt(!1),E&&E())},[Re,p,at,E]);const Ce=Re&&Re.onFilled,Ge=Re&&Re.onEmpty,ot=x.useCallback(Ee=>{ep(Ee)?Ce&&Ce():Ge&&Ge()},[Ce,Ge]);li(()=>{ke&&ot({value:ae})},[ae,ot,ke]);const tn=Ee=>{if(Ne.disabled){Ee.stopPropagation();return}L&&L(Ee),y.onFocus&&y.onFocus(Ee),Re&&Re.onFocus?Re.onFocus(Ee):yt(!0)},hn=Ee=>{E&&E(Ee),y.onBlur&&y.onBlur(Ee),Re&&Re.onBlur?Re.onBlur(Ee):yt(!1)},En=(Ee,...pe)=>{if(!ke){const $n=Ee.target||Te.current;if($n==null)throw new Error(ra(1));ot({value:$n.value})}y.onChange&&y.onChange(Ee,...pe),I&&I(Ee,...pe)};x.useEffect(()=>{ot(Te.current)},[]);const fn=Ee=>{Te.current&&Ee.currentTarget===Ee.target&&Te.current.focus(),P&&P(Ee)};let pn=T,lt=y;D&&pn==="input"&&(j?lt=M({type:void 0,minRows:j,maxRows:j},lt):lt=M({type:void 0,maxRows:S,minRows:N},lt),pn=Vj);const qn=Ee=>{ot(Ee.animationName==="mui-auto-fill-cancel"?Te.current:{value:"x"})};x.useEffect(()=>{Re&&Re.setAdornedStart(!!Y)},[Re,Y]);const an=M({},i,{color:Ne.color||"primary",disabled:Ne.disabled,endAdornment:w,error:Ne.error,focused:Ne.focused,formControl:Re,fullWidth:b,hiddenLabel:Ne.hiddenLabel,multiline:D,size:Ne.size,startAdornment:Y,type:J}),je=Wj(an),Gt=W.root||c.Root||$m,Fn=V.root||h.root||{},st=W.input||c.Input||Bm;return lt=M({},lt,(r=V.input)!=null?r:h.input),F(x.Fragment,{children:[!g&&Hj,F(Gt,M({},Fn,!Tl(Gt)&&{ownerState:M({},an,Fn.ownerState)},{ref:n,onClick:fn},se,{className:we(je.root,Fn.className,l,$&&"MuiInputBase-readOnly"),children:[Y,u(Pw.Provider,{value:null,children:u(st,M({ownerState:an,"aria-invalid":Ne.error,"aria-describedby":o,autoComplete:s,autoFocus:a,defaultValue:f,disabled:Ne.disabled,id:C,onAnimationStart:qn,name:v,placeholder:U,readOnly:$,required:Ne.required,rows:j,value:ae,onKeyDown:O,onKeyUp:R,type:J},lt,!Tl(st)&&{as:pn,ownerState:M({},an,lt.ownerState)},{ref:pt,className:we(je.input,lt.className,$&&"MuiInputBase-readOnly"),onBlur:hn,onChange:En,onFocus:tn}))}),w,z?z(M({},Ne,{startAdornment:Y})):null]}))]})}),Rw=Gj;function qj(t){return $e("MuiInput",t)}const Kj=M({},Rl,Ve("MuiInput",["root","underline","input"])),Pc=Kj;function Yj(t){return $e("MuiOutlinedInput",t)}const Qj=M({},Rl,Ve("MuiOutlinedInput",["root","notchedOutline","input"])),To=Qj;function Xj(t){return $e("MuiFilledInput",t)}const Jj=M({},Rl,Ve("MuiFilledInput",["root","underline","input"])),Ss=Jj,Zj=Vn(u("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),e7=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],t7={entering:{opacity:1},entered:{opacity:1}},n7=x.forwardRef(function(e,n){const r=Om(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:s=!0,children:a,easing:l,in:c,onEnter:h,onEntered:f,onEntering:p,onExit:g,onExited:w,onExiting:b,style:C,timeout:T=i,TransitionComponent:y=kw}=e,_=le(e,e7),S=x.useRef(null),N=en(S,Wl(a),n),D=U=>$=>{if(U){const z=S.current;$===void 0?U(z):U(z,$)}},v=D(p),E=D((U,$)=>{Cw(U);const z=Pl({style:C,timeout:T,easing:l},{mode:"enter"});U.style.webkitTransition=r.transitions.create("opacity",z),U.style.transition=r.transitions.create("opacity",z),h&&h(U,$)}),I=D(f),P=D(b),L=D(U=>{const $=Pl({style:C,timeout:T,easing:l},{mode:"exit"});U.style.webkitTransition=r.transitions.create("opacity",$),U.style.transition=r.transitions.create("opacity",$),g&&g(U)}),O=D(w);return u(y,M({appear:s,in:c,nodeRef:S,onEnter:E,onEntered:I,onEntering:v,onExit:L,onExited:O,onExiting:P,addEndListener:U=>{o&&o(S.current,U)},timeout:T},_,{children:(U,$)=>x.cloneElement(a,M({style:M({opacity:0,visibility:U==="exited"&&!c?"hidden":void 0},t7[U],C,a.props.style),ref:N},$))}))}),r7=n7;function i7(t){return $e("MuiBackdrop",t)}Ve("MuiBackdrop",["root","invisible"]);const o7=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],s7=t=>{const{classes:e,invisible:n}=t;return Be({root:["root",n&&"invisible"]},i7,e)},a7=oe("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.invisible&&e.invisible]}})(({ownerState:t})=>M({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},t.invisible&&{backgroundColor:"transparent"})),l7=x.forwardRef(function(e,n){var r,i,o;const s=ze({props:e,name:"MuiBackdrop"}),{children:a,className:l,component:c="div",components:h={},componentsProps:f={},invisible:p=!1,open:g,slotProps:w={},slots:b={},TransitionComponent:C=r7,transitionDuration:T}=s,y=le(s,o7),_=M({},s,{component:c,invisible:p}),S=s7(_),N=(r=w.root)!=null?r:f.root;return u(C,M({in:g,timeout:T},y,{children:u(a7,M({"aria-hidden":!0},N,{as:(i=(o=b.root)!=null?o:h.Root)!=null?i:c,className:we(S.root,l,N==null?void 0:N.className),ownerState:M({},_,N==null?void 0:N.ownerState),classes:S,ref:n,children:a}))}))}),c7=l7,u7=Ve("MuiBox",["root"]),d7=u7,h7=xd(),f7=Wz({themeId:Il,defaultTheme:h7,defaultClassName:d7.root,generateClassName:tw.generate}),tp=f7;function p7(t){return $e("MuiButton",t)}const m7=Ve("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),xh=m7,g7=x.createContext({}),y7=g7,v7=x.createContext(void 0),w7=v7,b7=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],_7=t=>{const{color:e,disableElevation:n,fullWidth:r,size:i,variant:o,classes:s}=t,a={root:["root",o,`${o}${be(e)}`,`size${be(i)}`,`${o}Size${be(i)}`,`color${be(e)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${be(i)}`],endIcon:["icon","endIcon",`iconSize${be(i)}`]},l=Be(a,p7,s);return M({},s,l)},OR=t=>M({},t.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},t.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},t.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),x7=oe(kd,{shouldForwardProp:t=>lr(t)||t==="classes",name:"MuiButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`${n.variant}${be(n.color)}`],e[`size${be(n.size)}`],e[`${n.variant}Size${be(n.size)}`],n.color==="inherit"&&e.colorInherit,n.disableElevation&&e.disableElevation,n.fullWidth&&e.fullWidth]}})(({theme:t,ownerState:e})=>{var n,r;const i=t.palette.mode==="light"?t.palette.grey[300]:t.palette.grey[800],o=t.palette.mode==="light"?t.palette.grey.A100:t.palette.grey[700];return M({},t.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create(["background-color","box-shadow","border-color","color"],{duration:t.transitions.duration.short}),"&:hover":M({textDecoration:"none",backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:on(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},e.variant==="text"&&e.color!=="inherit"&&{backgroundColor:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:on(t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},e.variant==="outlined"&&e.color!=="inherit"&&{border:`1px solid ${(t.vars||t).palette[e.color].main}`,backgroundColor:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:on(t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},e.variant==="contained"&&{backgroundColor:t.vars?t.vars.palette.Button.inheritContainedHoverBg:o,boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2],backgroundColor:(t.vars||t).palette.grey[300]}},e.variant==="contained"&&e.color!=="inherit"&&{backgroundColor:(t.vars||t).palette[e.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[e.color].main}}),"&:active":M({},e.variant==="contained"&&{boxShadow:(t.vars||t).shadows[8]}),[`&.${xh.focusVisible}`]:M({},e.variant==="contained"&&{boxShadow:(t.vars||t).shadows[6]}),[`&.${xh.disabled}`]:M({color:(t.vars||t).palette.action.disabled},e.variant==="outlined"&&{border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`},e.variant==="contained"&&{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground})},e.variant==="text"&&{padding:"6px 8px"},e.variant==="text"&&e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].main},e.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},e.variant==="outlined"&&e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].main,border:t.vars?`1px solid rgba(${t.vars.palette[e.color].mainChannel} / 0.5)`:`1px solid ${on(t.palette[e.color].main,.5)}`},e.variant==="contained"&&{color:t.vars?t.vars.palette.text.primary:(n=(r=t.palette).getContrastText)==null?void 0:n.call(r,t.palette.grey[300]),backgroundColor:t.vars?t.vars.palette.Button.inheritContainedBg:i,boxShadow:(t.vars||t).shadows[2]},e.variant==="contained"&&e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].contrastText,backgroundColor:(t.vars||t).palette[e.color].main},e.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},e.size==="small"&&e.variant==="text"&&{padding:"4px 5px",fontSize:t.typography.pxToRem(13)},e.size==="large"&&e.variant==="text"&&{padding:"8px 11px",fontSize:t.typography.pxToRem(15)},e.size==="small"&&e.variant==="outlined"&&{padding:"3px 9px",fontSize:t.typography.pxToRem(13)},e.size==="large"&&e.variant==="outlined"&&{padding:"7px 21px",fontSize:t.typography.pxToRem(15)},e.size==="small"&&e.variant==="contained"&&{padding:"4px 10px",fontSize:t.typography.pxToRem(13)},e.size==="large"&&e.variant==="contained"&&{padding:"8px 22px",fontSize:t.typography.pxToRem(15)},e.fullWidth&&{width:"100%"})},({ownerState:t})=>t.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${xh.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${xh.disabled}`]:{boxShadow:"none"}}),k7=oe("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.startIcon,e[`iconSize${be(n.size)}`]]}})(({ownerState:t})=>M({display:"inherit",marginRight:8,marginLeft:-4},t.size==="small"&&{marginLeft:-2},OR(t))),T7=oe("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.endIcon,e[`iconSize${be(n.size)}`]]}})(({ownerState:t})=>M({display:"inherit",marginRight:-4,marginLeft:8},t.size==="small"&&{marginRight:-2},OR(t))),E7=x.forwardRef(function(e,n){const r=x.useContext(y7),i=x.useContext(w7),o=Uu(r,e),s=ze({props:o,name:"MuiButton"}),{children:a,color:l="primary",component:c="button",className:h,disabled:f=!1,disableElevation:p=!1,disableFocusRipple:g=!1,endIcon:w,focusVisibleClassName:b,fullWidth:C=!1,size:T="medium",startIcon:y,type:_,variant:S="text"}=s,N=le(s,b7),D=M({},s,{color:l,component:c,disabled:f,disableElevation:p,disableFocusRipple:g,fullWidth:C,size:T,type:_,variant:S}),v=_7(D),E=y&&u(k7,{className:v.startIcon,ownerState:D,children:y}),I=w&&u(T7,{className:v.endIcon,ownerState:D,children:w}),P=i||"";return F(x7,M({ownerState:D,className:we(r.className,v.root,h,P),component:c,disabled:f,focusRipple:!g,focusVisibleClassName:we(v.focusVisible,b),ref:n,type:_},N,{classes:v,children:[E,a,I]}))}),e0=E7;function S7(t){return $e("MuiCard",t)}Ve("MuiCard",["root"]);const C7=["className","raised"],I7=t=>{const{classes:e}=t;return Be({root:["root"]},S7,e)},P7=oe(mr,{name:"MuiCard",slot:"Root",overridesResolver:(t,e)=>e.root})(()=>({overflow:"hidden"})),R7=x.forwardRef(function(e,n){const r=ze({props:e,name:"MuiCard"}),{className:i,raised:o=!1}=r,s=le(r,C7),a=M({},r,{raised:o}),l=I7(a);return u(P7,M({className:we(l.root,i),elevation:o?8:void 0,ref:n,ownerState:a},s))}),A7=R7;function N7(t){return $e("MuiCardContent",t)}Ve("MuiCardContent",["root"]);const M7=["className","component"],D7=t=>{const{classes:e}=t;return Be({root:["root"]},N7,e)},O7=oe("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(t,e)=>e.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}})),L7=x.forwardRef(function(e,n){const r=ze({props:e,name:"MuiCardContent"}),{className:i,component:o="div"}=r,s=le(r,M7),a=M({},r,{component:o}),l=D7(a);return u(O7,M({as:o,className:we(l.root,i),ownerState:a,ref:n},s))}),V7=L7;function F7(t){return $e("MuiCardHeader",t)}const $7=Ve("MuiCardHeader",["root","avatar","action","content","title","subheader"]),zT=$7,B7=["action","avatar","className","component","disableTypography","subheader","subheaderTypographyProps","title","titleTypographyProps"],U7=t=>{const{classes:e}=t;return Be({root:["root"],avatar:["avatar"],action:["action"],content:["content"],title:["title"],subheader:["subheader"]},F7,e)},z7=oe("div",{name:"MuiCardHeader",slot:"Root",overridesResolver:(t,e)=>M({[`& .${zT.title}`]:e.title,[`& .${zT.subheader}`]:e.subheader},e.root)})({display:"flex",alignItems:"center",padding:16}),j7=oe("div",{name:"MuiCardHeader",slot:"Avatar",overridesResolver:(t,e)=>e.avatar})({display:"flex",flex:"0 0 auto",marginRight:16}),W7=oe("div",{name:"MuiCardHeader",slot:"Action",overridesResolver:(t,e)=>e.action})({flex:"0 0 auto",alignSelf:"flex-start",marginTop:-4,marginRight:-8,marginBottom:-4}),H7=oe("div",{name:"MuiCardHeader",slot:"Content",overridesResolver:(t,e)=>e.content})({flex:"1 1 auto"}),G7=x.forwardRef(function(e,n){const r=ze({props:e,name:"MuiCardHeader"}),{action:i,avatar:o,className:s,component:a="div",disableTypography:l=!1,subheader:c,subheaderTypographyProps:h,title:f,titleTypographyProps:p}=r,g=le(r,B7),w=M({},r,{component:a,disableTypography:l}),b=U7(w);let C=f;C!=null&&C.type!==ie&&!l&&(C=u(ie,M({variant:o?"body2":"h5",className:b.title,component:"span",display:"block"},p,{children:C})));let T=c;return T!=null&&T.type!==ie&&!l&&(T=u(ie,M({variant:o?"body2":"body1",className:b.subheader,color:"text.secondary",component:"span",display:"block"},h,{children:T}))),F(z7,M({className:we(b.root,s),as:a,ref:n,ownerState:w},g,{children:[o&&u(j7,{className:b.avatar,ownerState:w,children:o}),F(H7,{className:b.content,ownerState:w,children:[C,T]}),i&&u(W7,{className:b.action,ownerState:w,children:i})]}))}),q7=G7;function K7(t){return $e("PrivateSwitchBase",t)}Ve("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const Y7=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],Q7=t=>{const{classes:e,checked:n,disabled:r,edge:i}=t,o={root:["root",n&&"checked",r&&"disabled",i&&`edge${be(i)}`],input:["input"]};return Be(o,K7,e)},X7=oe(kd,{name:"MuiSwitchBase"})(({ownerState:t})=>M({padding:9,borderRadius:"50%"},t.edge==="start"&&{marginLeft:t.size==="small"?-3:-12},t.edge==="end"&&{marginRight:t.size==="small"?-3:-12})),J7=oe("input",{name:"MuiSwitchBase",shouldForwardProp:lr})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),Z7=x.forwardRef(function(e,n){const{autoFocus:r,checked:i,checkedIcon:o,className:s,defaultChecked:a,disabled:l,disableFocusRipple:c=!1,edge:h=!1,icon:f,id:p,inputProps:g,inputRef:w,name:b,onBlur:C,onChange:T,onFocus:y,readOnly:_,required:S=!1,tabIndex:N,type:D,value:v}=e,E=le(e,Y7),[I,P]=qf({controlled:i,default:!!a,name:"SwitchBase",state:"checked"}),L=ws(),O=W=>{y&&y(W),L&&L.onFocus&&L.onFocus(W)},R=W=>{C&&C(W),L&&L.onBlur&&L.onBlur(W)},U=W=>{if(W.nativeEvent.defaultPrevented)return;const Y=W.target.checked;P(Y),T&&T(W,Y)};let $=l;L&&typeof $>"u"&&($=L.disabled);const z=D==="checkbox"||D==="radio",j=M({},e,{checked:I,disabled:$,disableFocusRipple:c,edge:h}),V=Q7(j);return F(X7,M({component:"span",className:we(V.root,s),centerRipple:!0,focusRipple:!c,disabled:$,tabIndex:null,role:void 0,onFocus:O,onBlur:R,ownerState:j,ref:n},E,{children:[u(J7,M({autoFocus:r,checked:i,defaultChecked:a,className:V.input,disabled:$,id:z?p:void 0,name:b,onChange:U,readOnly:_,ref:w,required:S,ownerState:j,tabIndex:N,type:D},D==="checkbox"&&v===void 0?{}:{value:v},g)),I?o:f]}))}),eW=Z7,tW=Vn(u("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),nW=Vn(u("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),rW=Vn(u("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function iW(t){return $e("MuiCheckbox",t)}const oW=Ve("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),hy=oW,sW=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],aW=t=>{const{classes:e,indeterminate:n,color:r,size:i}=t,o={root:["root",n&&"indeterminate",`color${be(r)}`,`size${be(i)}`]},s=Be(o,iW,e);return M({},e,s)},lW=oe(eW,{shouldForwardProp:t=>lr(t)||t==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.indeterminate&&e.indeterminate,e[`size${be(n.size)}`],n.color!=="default"&&e[`color${be(n.color)}`]]}})(({theme:t,ownerState:e})=>M({color:(t.vars||t).palette.text.secondary},!e.disableRipple&&{"&:hover":{backgroundColor:t.vars?`rgba(${e.color==="default"?t.vars.palette.action.activeChannel:t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:on(e.color==="default"?t.palette.action.active:t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},e.color!=="default"&&{[`&.${hy.checked}, &.${hy.indeterminate}`]:{color:(t.vars||t).palette[e.color].main},[`&.${hy.disabled}`]:{color:(t.vars||t).palette.action.disabled}})),cW=u(nW,{}),uW=u(tW,{}),dW=u(rW,{}),hW=x.forwardRef(function(e,n){var r,i;const o=ze({props:e,name:"MuiCheckbox"}),{checkedIcon:s=cW,color:a="primary",icon:l=uW,indeterminate:c=!1,indeterminateIcon:h=dW,inputProps:f,size:p="medium",className:g}=o,w=le(o,sW),b=c?h:l,C=c?h:s,T=M({},o,{color:a,indeterminate:c,size:p}),y=aW(T);return u(lW,M({type:"checkbox",inputProps:M({"data-indeterminate":c},f),icon:x.cloneElement(b,{fontSize:(r=b.props.fontSize)!=null?r:p}),checkedIcon:x.cloneElement(C,{fontSize:(i=C.props.fontSize)!=null?i:p}),ownerState:T,ref:n,className:we(y.root,g)},w,{classes:y}))}),fW=hW;function pW(t){return $e("MuiCircularProgress",t)}Ve("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const mW=["className","color","disableShrink","size","style","thickness","value","variant"];let Um=t=>t,jT,WT,HT,GT;const Eo=44,gW=ql(jT||(jT=Um` 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } `)),yW=ql(WT||(WT=Um` 0% { stroke-dasharray: 1px, 200px; stroke-dashoffset: 0; } 50% { stroke-dasharray: 100px, 200px; stroke-dashoffset: -15px; } 100% { stroke-dasharray: 100px, 200px; stroke-dashoffset: -125px; } `)),vW=t=>{const{classes:e,variant:n,color:r,disableShrink:i}=t,o={root:["root",n,`color${be(r)}`],svg:["svg"],circle:["circle",`circle${be(n)}`,i&&"circleDisableShrink"]};return Be(o,pW,e)},wW=oe("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`color${be(n.color)}`]]}})(({ownerState:t,theme:e})=>M({display:"inline-block"},t.variant==="determinate"&&{transition:e.transitions.create("transform")},t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main}),({ownerState:t})=>t.variant==="indeterminate"&&Im(HT||(HT=Um` animation: ${0} 1.4s linear infinite; `),gW)),bW=oe("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(t,e)=>e.svg})({display:"block"}),_W=oe("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.circle,e[`circle${be(n.variant)}`],n.disableShrink&&e.circleDisableShrink]}})(({ownerState:t,theme:e})=>M({stroke:"currentColor"},t.variant==="determinate"&&{transition:e.transitions.create("stroke-dashoffset")},t.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink&&Im(GT||(GT=Um` animation: ${0} 1.4s ease-in-out infinite; `),yW)),xW=x.forwardRef(function(e,n){const r=ze({props:e,name:"MuiCircularProgress"}),{className:i,color:o="primary",disableShrink:s=!1,size:a=40,style:l,thickness:c=3.6,value:h=0,variant:f="indeterminate"}=r,p=le(r,mW),g=M({},r,{color:o,disableShrink:s,size:a,thickness:c,value:h,variant:f}),w=vW(g),b={},C={},T={};if(f==="determinate"){const y=2*Math.PI*((Eo-c)/2);b.strokeDasharray=y.toFixed(3),T["aria-valuenow"]=Math.round(h),b.strokeDashoffset=`${((100-h)/100*y).toFixed(3)}px`,C.transform="rotate(-90deg)"}return u(wW,M({className:we(w.root,i),style:M({width:a,height:a},C,l),ownerState:g,ref:n,role:"progressbar"},T,p,{children:u(bW,{className:w.svg,ownerState:g,viewBox:`${Eo/2} ${Eo/2} ${Eo} ${Eo}`,children:u(_W,{className:w.circle,style:b,ownerState:g,cx:Eo,cy:Eo,r:(Eo-c)/2,fill:"none",strokeWidth:c})})}))}),zm=xW;function kW(t){const e=rr(t);return e.body===t?Ii(t).innerWidth>e.documentElement.clientWidth:t.scrollHeight>t.clientHeight}function du(t,e){e?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden")}function qT(t){return parseInt(Ii(t).getComputedStyle(t).paddingRight,10)||0}function TW(t){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(t.tagName)!==-1,r=t.tagName==="INPUT"&&t.getAttribute("type")==="hidden";return n||r}function KT(t,e,n,r,i){const o=[e,n,...r];[].forEach.call(t.children,s=>{const a=o.indexOf(s)===-1,l=!TW(s);a&&l&&du(s,i)})}function fy(t,e){let n=-1;return t.some((r,i)=>e(r)?(n=i,!0):!1),n}function EW(t,e){const n=[],r=t.container;if(!e.disableScrollLock){if(kW(r)){const s=F2(rr(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${qT(r)+s}px`;const a=rr(r).querySelectorAll(".mui-fixed");[].forEach.call(a,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${qT(l)+s}px`})}let o;if(r.parentNode instanceof DocumentFragment)o=rr(r).body;else{const s=r.parentElement,a=Ii(r);o=(s==null?void 0:s.nodeName)==="HTML"&&a.getComputedStyle(s).overflowY==="scroll"?s:r}n.push({value:o.style.overflow,property:"overflow",el:o},{value:o.style.overflowX,property:"overflow-x",el:o},{value:o.style.overflowY,property:"overflow-y",el:o}),o.style.overflow="hidden"}return()=>{n.forEach(({value:o,el:s,property:a})=>{o?s.style.setProperty(a,o):s.style.removeProperty(a)})}}function SW(t){const e=[];return[].forEach.call(t.children,n=>{n.getAttribute("aria-hidden")==="true"&&e.push(n)}),e}class CW{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,n){let r=this.modals.indexOf(e);if(r!==-1)return r;r=this.modals.length,this.modals.push(e),e.modalRef&&du(e.modalRef,!1);const i=SW(n);KT(n,e.mount,e.modalRef,i,!0);const o=fy(this.containers,s=>s.container===n);return o!==-1?(this.containers[o].modals.push(e),r):(this.containers.push({modals:[e],container:n,restore:null,hiddenSiblings:i}),r)}mount(e,n){const r=fy(this.containers,o=>o.modals.indexOf(e)!==-1),i=this.containers[r];i.restore||(i.restore=EW(i,n))}remove(e,n=!0){const r=this.modals.indexOf(e);if(r===-1)return r;const i=fy(this.containers,s=>s.modals.indexOf(e)!==-1),o=this.containers[i];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(r,1),o.modals.length===0)o.restore&&o.restore(),e.modalRef&&du(e.modalRef,n),KT(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(i,1);else{const s=o.modals[o.modals.length-1];s.modalRef&&du(s.modalRef,!1)}return r}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}const IW=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function PW(t){const e=parseInt(t.getAttribute("tabindex")||"",10);return Number.isNaN(e)?t.contentEditable==="true"||(t.nodeName==="AUDIO"||t.nodeName==="VIDEO"||t.nodeName==="DETAILS")&&t.getAttribute("tabindex")===null?0:t.tabIndex:e}function RW(t){if(t.tagName!=="INPUT"||t.type!=="radio"||!t.name)return!1;const e=r=>t.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=e(`[name="${t.name}"]:checked`);return n||(n=e(`[name="${t.name}"]`)),n!==t}function AW(t){return!(t.disabled||t.tagName==="INPUT"&&t.type==="hidden"||RW(t))}function NW(t){const e=[],n=[];return Array.from(t.querySelectorAll(IW)).forEach((r,i)=>{const o=PW(r);o===-1||!AW(r)||(o===0?e.push(r):n.push({documentOrder:i,tabIndex:o,node:r}))}),n.sort((r,i)=>r.tabIndex===i.tabIndex?r.documentOrder-i.documentOrder:r.tabIndex-i.tabIndex).map(r=>r.node).concat(e)}function MW(){return!0}function DW(t){const{children:e,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=NW,isEnabled:s=MW,open:a}=t,l=x.useRef(!1),c=x.useRef(null),h=x.useRef(null),f=x.useRef(null),p=x.useRef(null),g=x.useRef(!1),w=x.useRef(null),b=en(Wl(e),w),C=x.useRef(null);x.useEffect(()=>{!a||!w.current||(g.current=!n)},[n,a]),x.useEffect(()=>{if(!a||!w.current)return;const _=rr(w.current);return w.current.contains(_.activeElement)||(w.current.hasAttribute("tabIndex")||w.current.setAttribute("tabIndex","-1"),g.current&&w.current.focus()),()=>{i||(f.current&&f.current.focus&&(l.current=!0,f.current.focus()),f.current=null)}},[a]),x.useEffect(()=>{if(!a||!w.current)return;const _=rr(w.current),S=v=>{C.current=v,!(r||!s()||v.key!=="Tab")&&_.activeElement===w.current&&v.shiftKey&&(l.current=!0,h.current&&h.current.focus())},N=()=>{const v=w.current;if(v===null)return;if(!_.hasFocus()||!s()||l.current){l.current=!1;return}if(v.contains(_.activeElement)||r&&_.activeElement!==c.current&&_.activeElement!==h.current)return;if(_.activeElement!==p.current)p.current=null;else if(p.current!==null)return;if(!g.current)return;let E=[];if((_.activeElement===c.current||_.activeElement===h.current)&&(E=o(w.current)),E.length>0){var I,P;const L=!!((I=C.current)!=null&&I.shiftKey&&((P=C.current)==null?void 0:P.key)==="Tab"),O=E[0],R=E[E.length-1];typeof O!="string"&&typeof R!="string"&&(L?R.focus():O.focus())}else v.focus()};_.addEventListener("focusin",N),_.addEventListener("keydown",S,!0);const D=setInterval(()=>{_.activeElement&&_.activeElement.tagName==="BODY"&&N()},50);return()=>{clearInterval(D),_.removeEventListener("focusin",N),_.removeEventListener("keydown",S,!0)}},[n,r,i,s,a,o]);const T=_=>{f.current===null&&(f.current=_.relatedTarget),g.current=!0,p.current=_.target;const S=e.props.onFocus;S&&S(_)},y=_=>{f.current===null&&(f.current=_.relatedTarget),g.current=!0};return F(x.Fragment,{children:[u("div",{tabIndex:a?0:-1,onFocus:y,ref:c,"data-testid":"sentinelStart"}),x.cloneElement(e,{ref:b,onFocus:T}),u("div",{tabIndex:a?0:-1,onFocus:y,ref:h,"data-testid":"sentinelEnd"})]})}function OW(t){return typeof t=="function"?t():t}function LW(t){return t?t.props.hasOwnProperty("in"):!1}const VW=new CW;function FW(t){const{container:e,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=VW,closeAfterTransition:o=!1,onTransitionEnter:s,onTransitionExited:a,children:l,onClose:c,open:h,rootRef:f}=t,p=x.useRef({}),g=x.useRef(null),w=x.useRef(null),b=en(w,f),[C,T]=x.useState(!h),y=LW(l);let _=!0;(t["aria-hidden"]==="false"||t["aria-hidden"]===!1)&&(_=!1);const S=()=>rr(g.current),N=()=>(p.current.modalRef=w.current,p.current.mount=g.current,p.current),D=()=>{i.mount(N(),{disableScrollLock:r}),w.current&&(w.current.scrollTop=0)},v=zo(()=>{const z=OW(e)||S().body;i.add(N(),z),w.current&&D()}),E=x.useCallback(()=>i.isTopModal(N()),[i]),I=zo(z=>{g.current=z,z&&(h&&E()?D():w.current&&du(w.current,_))}),P=x.useCallback(()=>{i.remove(N(),_)},[_,i]);x.useEffect(()=>()=>{P()},[P]),x.useEffect(()=>{h?v():(!y||!o)&&P()},[h,P,y,o,v]);const L=z=>j=>{var V;(V=z.onKeyDown)==null||V.call(z,j),!(j.key!=="Escape"||j.which===229||!E())&&(n||(j.stopPropagation(),c&&c(j,"escapeKeyDown")))},O=z=>j=>{var V;(V=z.onClick)==null||V.call(z,j),j.target===j.currentTarget&&c&&c(j,"backdropClick")};return{getRootProps:(z={})=>{const j=U2(t);delete j.onTransitionEnter,delete j.onTransitionExited;const V=M({},j,z);return M({role:"presentation"},V,{onKeyDown:L(V),ref:b})},getBackdropProps:(z={})=>{const j=z;return M({"aria-hidden":!0},j,{onClick:O(j),open:h})},getTransitionProps:()=>{const z=()=>{T(!1),s&&s()},j=()=>{T(!0),a&&a(),o&&P()};return{onEnter:Bv(z,l==null?void 0:l.props.onEnter),onExited:Bv(j,l==null?void 0:l.props.onExited)}},rootRef:b,portalRef:I,isTopModal:E,exited:C,hasTransition:y}}function $W(t){return $e("MuiModal",t)}Ve("MuiModal",["root","hidden","backdrop"]);const BW=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],UW=t=>{const{open:e,exited:n,classes:r}=t;return Be({root:["root",!e&&n&&"hidden"],backdrop:["backdrop"]},$W,r)},zW=oe("div",{name:"MuiModal",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.open&&n.exited&&e.hidden]}})(({theme:t,ownerState:e})=>M({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0},!e.open&&e.exited&&{visibility:"hidden"})),jW=oe(c7,{name:"MuiModal",slot:"Backdrop",overridesResolver:(t,e)=>e.backdrop})({zIndex:-1}),WW=x.forwardRef(function(e,n){var r,i,o,s,a,l;const c=ze({name:"MuiModal",props:e}),{BackdropComponent:h=jW,BackdropProps:f,className:p,closeAfterTransition:g=!1,children:w,container:b,component:C,components:T={},componentsProps:y={},disableAutoFocus:_=!1,disableEnforceFocus:S=!1,disableEscapeKeyDown:N=!1,disablePortal:D=!1,disableRestoreFocus:v=!1,disableScrollLock:E=!1,hideBackdrop:I=!1,keepMounted:P=!1,onBackdropClick:L,open:O,slotProps:R,slots:U}=c,$=le(c,BW),z=M({},c,{closeAfterTransition:g,disableAutoFocus:_,disableEnforceFocus:S,disableEscapeKeyDown:N,disablePortal:D,disableRestoreFocus:v,disableScrollLock:E,hideBackdrop:I,keepMounted:P}),{getRootProps:j,getBackdropProps:V,getTransitionProps:W,portalRef:Y,isTopModal:J,exited:te,hasTransition:se}=FW(M({},z,{rootRef:n})),ae=M({},z,{exited:te}),ke=UW(ae),Te={};if(w.props.tabIndex===void 0&&(Te.tabIndex="-1"),se){const{onEnter:Ce,onExited:Ge}=W();Te.onEnter=Ce,Te.onExited=Ge}const Oe=(r=(i=U==null?void 0:U.root)!=null?i:T.Root)!=null?r:zW,pt=(o=(s=U==null?void 0:U.backdrop)!=null?s:T.Backdrop)!=null?o:h,at=(a=R==null?void 0:R.root)!=null?a:y.root,yt=(l=R==null?void 0:R.backdrop)!=null?l:y.backdrop,Re=El({elementType:Oe,externalSlotProps:at,externalForwardedProps:$,getSlotProps:j,additionalProps:{ref:n,as:C},ownerState:ae,className:we(p,at==null?void 0:at.className,ke==null?void 0:ke.root,!ae.open&&ae.exited&&(ke==null?void 0:ke.hidden))}),Ne=El({elementType:pt,externalSlotProps:yt,additionalProps:f,getSlotProps:Ce=>V(M({},Ce,{onClick:Ge=>{L&&L(Ge),Ce!=null&&Ce.onClick&&Ce.onClick(Ge)}})),className:we(yt==null?void 0:yt.className,f==null?void 0:f.className,ke==null?void 0:ke.backdrop),ownerState:ae});return!P&&!O&&(!se||te)?null:u(Nj,{ref:Y,container:b,disablePortal:D,children:F(Oe,M({},Re,{children:[!I&&h?u(pt,M({},Ne)):null,u(DW,{disableEnforceFocus:S,disableAutoFocus:_,disableRestoreFocus:v,isEnabled:J,open:O,children:x.cloneElement(w,Te)})]}))})}),HW=WW;function GW(t){return $e("MuiDivider",t)}const qW=Ve("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),YT=qW,KW=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],YW=t=>{const{absolute:e,children:n,classes:r,flexItem:i,light:o,orientation:s,textAlign:a,variant:l}=t;return Be({root:["root",e&&"absolute",l,o&&"light",s==="vertical"&&"vertical",i&&"flexItem",n&&"withChildren",n&&s==="vertical"&&"withChildrenVertical",a==="right"&&s!=="vertical"&&"textAlignRight",a==="left"&&s!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",s==="vertical"&&"wrapperVertical"]},GW,r)},QW=oe("div",{name:"MuiDivider",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.absolute&&e.absolute,e[n.variant],n.light&&e.light,n.orientation==="vertical"&&e.vertical,n.flexItem&&e.flexItem,n.children&&e.withChildren,n.children&&n.orientation==="vertical"&&e.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&e.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&e.textAlignLeft]}})(({theme:t,ownerState:e})=>M({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin"},e.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},e.light&&{borderColor:t.vars?`rgba(${t.vars.palette.dividerChannel} / 0.08)`:on(t.palette.divider,.08)},e.variant==="inset"&&{marginLeft:72},e.variant==="middle"&&e.orientation==="horizontal"&&{marginLeft:t.spacing(2),marginRight:t.spacing(2)},e.variant==="middle"&&e.orientation==="vertical"&&{marginTop:t.spacing(1),marginBottom:t.spacing(1)},e.orientation==="vertical"&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},e.flexItem&&{alignSelf:"stretch",height:"auto"}),({ownerState:t})=>M({},t.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:t,ownerState:e})=>M({},e.children&&e.orientation!=="vertical"&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(t.vars||t).palette.divider}`,borderTopStyle:"inherit"}}),({theme:t,ownerState:e})=>M({},e.children&&e.orientation==="vertical"&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(t.vars||t).palette.divider}`,borderLeftStyle:"inherit"}}),({ownerState:t})=>M({},t.textAlign==="right"&&t.orientation!=="vertical"&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},t.textAlign==="left"&&t.orientation!=="vertical"&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),XW=oe("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.wrapper,n.orientation==="vertical"&&e.wrapperVertical]}})(({theme:t,ownerState:e})=>M({display:"inline-block",paddingLeft:`calc(${t.spacing(1)} * 1.2)`,paddingRight:`calc(${t.spacing(1)} * 1.2)`},e.orientation==="vertical"&&{paddingTop:`calc(${t.spacing(1)} * 1.2)`,paddingBottom:`calc(${t.spacing(1)} * 1.2)`})),LR=x.forwardRef(function(e,n){const r=ze({props:e,name:"MuiDivider"}),{absolute:i=!1,children:o,className:s,component:a=o?"div":"hr",flexItem:l=!1,light:c=!1,orientation:h="horizontal",role:f=a!=="hr"?"separator":void 0,textAlign:p="center",variant:g="fullWidth"}=r,w=le(r,KW),b=M({},r,{absolute:i,component:a,flexItem:l,light:c,orientation:h,role:f,textAlign:p,variant:g}),C=YW(b);return u(QW,M({as:a,className:we(C.root,s),role:f,ref:n,ownerState:b},w,{children:o?u(XW,{className:C.wrapper,ownerState:b,children:o}):null}))});LR.muiSkipListHighlight=!0;const JW=LR,ZW=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],eH=t=>{const{classes:e,disableUnderline:n}=t,i=Be({root:["root",!n&&"underline"],input:["input"]},Xj,e);return M({},e,i)},tH=oe($m,{shouldForwardProp:t=>lr(t)||t==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...Vm(t,e),!n.disableUnderline&&e.underline]}})(({theme:t,ownerState:e})=>{var n;const r=t.palette.mode==="light",i=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",o=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",s=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",a=r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return M({position:"relative",backgroundColor:t.vars?t.vars.palette.FilledInput.bg:o,borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),"&:hover":{backgroundColor:t.vars?t.vars.palette.FilledInput.hoverBg:s,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:o}},[`&.${Ss.focused}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:o},[`&.${Ss.disabled}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.disabledBg:a}},!e.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(n=(t.vars||t).palette[e.color||"primary"])==null?void 0:n.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Ss.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Ss.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`:i}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Ss.disabled}, .${Ss.error}):before`]:{borderBottom:`1px solid ${(t.vars||t).palette.text.primary}`},[`&.${Ss.disabled}:before`]:{borderBottomStyle:"dotted"}},e.startAdornment&&{paddingLeft:12},e.endAdornment&&{paddingRight:12},e.multiline&&M({padding:"25px 12px 8px"},e.size==="small"&&{paddingTop:21,paddingBottom:4},e.hiddenLabel&&{paddingTop:16,paddingBottom:17},e.hiddenLabel&&e.size==="small"&&{paddingTop:8,paddingBottom:9}))}),nH=oe(Bm,{name:"MuiFilledInput",slot:"Input",overridesResolver:Fm})(({theme:t,ownerState:e})=>M({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:t.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.mode==="light"?null:"#fff",caretColor:t.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},e.size==="small"&&{paddingTop:21,paddingBottom:4},e.hiddenLabel&&{paddingTop:16,paddingBottom:17},e.startAdornment&&{paddingLeft:0},e.endAdornment&&{paddingRight:0},e.hiddenLabel&&e.size==="small"&&{paddingTop:8,paddingBottom:9},e.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})),VR=x.forwardRef(function(e,n){var r,i,o,s;const a=ze({props:e,name:"MuiFilledInput"}),{components:l={},componentsProps:c,fullWidth:h=!1,inputComponent:f="input",multiline:p=!1,slotProps:g,slots:w={},type:b="text"}=a,C=le(a,ZW),T=M({},a,{fullWidth:h,inputComponent:f,multiline:p,type:b}),y=eH(a),_={root:{ownerState:T},input:{ownerState:T}},S=g??c?jn(_,g??c):_,N=(r=(i=w.root)!=null?i:l.Root)!=null?r:tH,D=(o=(s=w.input)!=null?s:l.Input)!=null?o:nH;return u(Rw,M({slots:{root:N,input:D},componentsProps:S,fullWidth:h,inputComponent:f,multiline:p,ref:n,type:b},C,{classes:y}))});VR.muiName="Input";const FR=VR;function rH(t){return $e("MuiFormControl",t)}Ve("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const iH=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],oH=t=>{const{classes:e,margin:n,fullWidth:r}=t,i={root:["root",n!=="none"&&`margin${be(n)}`,r&&"fullWidth"]};return Be(i,rH,e)},sH=oe("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:t},e)=>M({},e.root,e[`margin${be(t.margin)}`],t.fullWidth&&e.fullWidth)})(({ownerState:t})=>M({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},t.margin==="normal"&&{marginTop:16,marginBottom:8},t.margin==="dense"&&{marginTop:8,marginBottom:4},t.fullWidth&&{width:"100%"})),aH=x.forwardRef(function(e,n){const r=ze({props:e,name:"MuiFormControl"}),{children:i,className:o,color:s="primary",component:a="div",disabled:l=!1,error:c=!1,focused:h,fullWidth:f=!1,hiddenLabel:p=!1,margin:g="none",required:w=!1,size:b="medium",variant:C="outlined"}=r,T=le(r,iH),y=M({},r,{color:s,component:a,disabled:l,error:c,fullWidth:f,hiddenLabel:p,margin:g,required:w,size:b,variant:C}),_=oH(y),[S,N]=x.useState(()=>{let R=!1;return i&&x.Children.forEach(i,U=>{if(!cu(U,["Input","Select"]))return;const $=cu(U,["Select"])?U.props.input:U;$&&Bj($.props)&&(R=!0)}),R}),[D,v]=x.useState(()=>{let R=!1;return i&&x.Children.forEach(i,U=>{cu(U,["Input","Select"])&&(ep(U.props,!0)||ep(U.props.inputProps,!0))&&(R=!0)}),R}),[E,I]=x.useState(!1);l&&E&&I(!1);const P=h!==void 0&&!l?h:E;let L;const O=x.useMemo(()=>({adornedStart:S,setAdornedStart:N,color:s,disabled:l,error:c,filled:D,focused:P,fullWidth:f,hiddenLabel:p,size:b,onBlur:()=>{I(!1)},onEmpty:()=>{v(!1)},onFilled:()=>{v(!0)},onFocus:()=>{I(!0)},registerEffect:L,required:w,variant:C}),[S,s,l,c,D,P,f,p,L,w,b,C]);return u(Pw.Provider,{value:O,children:u(sH,M({as:a,ownerState:y,className:we(_.root,o),ref:n},T,{children:i}))})}),yr=aH,lH=_8({createStyledComponent:oe("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root}),useThemeProps:t=>ze({props:t,name:"MuiStack"})}),$R=lH;function cH(t){return $e("MuiFormControlLabel",t)}const uH=Ve("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),jc=uH,dH=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],hH=t=>{const{classes:e,disabled:n,labelPlacement:r,error:i,required:o}=t,s={root:["root",n&&"disabled",`labelPlacement${be(r)}`,i&&"error",o&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",i&&"error"]};return Be(s,cH,e)},fH=oe("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${jc.label}`]:e.label},e.root,e[`labelPlacement${be(n.labelPlacement)}`]]}})(({theme:t,ownerState:e})=>M({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${jc.disabled}`]:{cursor:"default"}},e.labelPlacement==="start"&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},e.labelPlacement==="top"&&{flexDirection:"column-reverse",marginLeft:16},e.labelPlacement==="bottom"&&{flexDirection:"column",marginLeft:16},{[`& .${jc.label}`]:{[`&.${jc.disabled}`]:{color:(t.vars||t).palette.text.disabled}}})),pH=oe("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(t,e)=>e.asterisk})(({theme:t})=>({[`&.${jc.error}`]:{color:(t.vars||t).palette.error.main}})),mH=x.forwardRef(function(e,n){var r,i;const o=ze({props:e,name:"MuiFormControlLabel"}),{className:s,componentsProps:a={},control:l,disabled:c,disableTypography:h,label:f,labelPlacement:p="end",required:g,slotProps:w={}}=o,b=le(o,dH),C=ws(),T=(r=c??l.props.disabled)!=null?r:C==null?void 0:C.disabled,y=g??l.props.required,_={disabled:T,required:y};["checked","name","onChange","value","inputRef"].forEach(I=>{typeof l.props[I]>"u"&&typeof o[I]<"u"&&(_[I]=o[I])});const S=ma({props:o,muiFormControl:C,states:["error"]}),N=M({},o,{disabled:T,labelPlacement:p,required:y,error:S.error}),D=hH(N),v=(i=w.typography)!=null?i:a.typography;let E=f;return E!=null&&E.type!==ie&&!h&&(E=u(ie,M({component:"span"},v,{className:we(D.label,v==null?void 0:v.className),children:E}))),F(fH,M({className:we(D.root,s),ownerState:N,ref:n},b,{children:[x.cloneElement(l,_),y?F($R,{display:"block",children:[E,F(pH,{ownerState:N,"aria-hidden":!0,className:D.asterisk,children:[" ","*"]})]}):E]}))}),gH=mH;function yH(t){return $e("MuiFormHelperText",t)}const vH=Ve("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),QT=vH;var XT;const wH=["children","className","component","disabled","error","filled","focused","margin","required","variant"],bH=t=>{const{classes:e,contained:n,size:r,disabled:i,error:o,filled:s,focused:a,required:l}=t,c={root:["root",i&&"disabled",o&&"error",r&&`size${be(r)}`,n&&"contained",a&&"focused",s&&"filled",l&&"required"]};return Be(c,yH,e)},_H=oe("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.size&&e[`size${be(n.size)}`],n.contained&&e.contained,n.filled&&e.filled]}})(({theme:t,ownerState:e})=>M({color:(t.vars||t).palette.text.secondary},t.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${QT.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${QT.error}`]:{color:(t.vars||t).palette.error.main}},e.size==="small"&&{marginTop:4},e.contained&&{marginLeft:14,marginRight:14})),xH=x.forwardRef(function(e,n){const r=ze({props:e,name:"MuiFormHelperText"}),{children:i,className:o,component:s="p"}=r,a=le(r,wH),l=ws(),c=ma({props:r,muiFormControl:l,states:["variant","size","disabled","error","filled","focused","required"]}),h=M({},r,{component:s,contained:c.variant==="filled"||c.variant==="outlined",variant:c.variant,size:c.size,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),f=bH(h);return u(_H,M({as:s,ownerState:h,className:we(f.root,o),ref:n},a,{children:i===" "?XT||(XT=u("span",{className:"notranslate",children:"​"})):i}))}),kH=xH;function TH(t){return $e("MuiFormLabel",t)}const EH=Ve("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),hu=EH,SH=["children","className","color","component","disabled","error","filled","focused","required"],CH=t=>{const{classes:e,color:n,focused:r,disabled:i,error:o,filled:s,required:a}=t,l={root:["root",`color${be(n)}`,i&&"disabled",o&&"error",s&&"filled",r&&"focused",a&&"required"],asterisk:["asterisk",o&&"error"]};return Be(l,TH,e)},IH=oe("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:t},e)=>M({},e.root,t.color==="secondary"&&e.colorSecondary,t.filled&&e.filled)})(({theme:t,ownerState:e})=>M({color:(t.vars||t).palette.text.secondary},t.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${hu.focused}`]:{color:(t.vars||t).palette[e.color].main},[`&.${hu.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${hu.error}`]:{color:(t.vars||t).palette.error.main}})),PH=oe("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(t,e)=>e.asterisk})(({theme:t})=>({[`&.${hu.error}`]:{color:(t.vars||t).palette.error.main}})),RH=x.forwardRef(function(e,n){const r=ze({props:e,name:"MuiFormLabel"}),{children:i,className:o,component:s="label"}=r,a=le(r,SH),l=ws(),c=ma({props:r,muiFormControl:l,states:["color","required","focused","disabled","error","filled"]}),h=M({},r,{color:c.color||"primary",component:s,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),f=CH(h);return F(IH,M({as:s,ownerState:h,className:we(f.root,o),ref:n},a,{children:[i,c.required&&F(PH,{ownerState:h,"aria-hidden":!0,className:f.asterisk,children:[" ","*"]})]}))}),Vr=RH,AH=x.createContext(),JT=AH;function NH(t){return $e("MuiGrid",t)}const MH=[0,1,2,3,4,5,6,7,8,9,10],DH=["column-reverse","column","row-reverse","row"],OH=["nowrap","wrap-reverse","wrap"],Rc=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],LH=Ve("MuiGrid",["root","container","item","zeroMinWidth",...MH.map(t=>`spacing-xs-${t}`),...DH.map(t=>`direction-xs-${t}`),...OH.map(t=>`wrap-xs-${t}`),...Rc.map(t=>`grid-xs-${t}`),...Rc.map(t=>`grid-sm-${t}`),...Rc.map(t=>`grid-md-${t}`),...Rc.map(t=>`grid-lg-${t}`),...Rc.map(t=>`grid-xl-${t}`)]),Gu=LH,VH=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function ll(t){const e=parseFloat(t);return`${e}${String(t).replace(String(e),"")||"px"}`}function FH({theme:t,ownerState:e}){let n;return t.breakpoints.keys.reduce((r,i)=>{let o={};if(e[i]&&(n=e[i]),!n)return r;if(n===!0)o={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if(n==="auto")o={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const s=Ys({values:e.columns,breakpoints:t.breakpoints.values}),a=typeof s=="object"?s[i]:s;if(a==null)return r;const l=`${Math.round(n/a*1e8)/1e6}%`;let c={};if(e.container&&e.item&&e.columnSpacing!==0){const h=t.spacing(e.columnSpacing);if(h!=="0px"){const f=`calc(${l} + ${ll(h)})`;c={flexBasis:f,maxWidth:f}}}o=M({flexBasis:l,flexGrow:0,maxWidth:l},c)}return t.breakpoints.values[i]===0?Object.assign(r,o):r[t.breakpoints.up(i)]=o,r},{})}function $H({theme:t,ownerState:e}){const n=Ys({values:e.direction,breakpoints:t.breakpoints.values});return ar({theme:t},n,r=>{const i={flexDirection:r};return r.indexOf("column")===0&&(i[`& > .${Gu.item}`]={maxWidth:"none"}),i})}function BR({breakpoints:t,values:e}){let n="";Object.keys(e).forEach(i=>{n===""&&e[i]!==0&&(n=i)});const r=Object.keys(t).sort((i,o)=>t[i]-t[o]);return r.slice(0,r.indexOf(n))}function BH({theme:t,ownerState:e}){const{container:n,rowSpacing:r}=e;let i={};if(n&&r!==0){const o=Ys({values:r,breakpoints:t.breakpoints.values});let s;typeof o=="object"&&(s=BR({breakpoints:t.breakpoints.values,values:o})),i=ar({theme:t},o,(a,l)=>{var c;const h=t.spacing(a);return h!=="0px"?{marginTop:`-${ll(h)}`,[`& > .${Gu.item}`]:{paddingTop:ll(h)}}:(c=s)!=null&&c.includes(l)?{}:{marginTop:0,[`& > .${Gu.item}`]:{paddingTop:0}}})}return i}function UH({theme:t,ownerState:e}){const{container:n,columnSpacing:r}=e;let i={};if(n&&r!==0){const o=Ys({values:r,breakpoints:t.breakpoints.values});let s;typeof o=="object"&&(s=BR({breakpoints:t.breakpoints.values,values:o})),i=ar({theme:t},o,(a,l)=>{var c;const h=t.spacing(a);return h!=="0px"?{width:`calc(100% + ${ll(h)})`,marginLeft:`-${ll(h)}`,[`& > .${Gu.item}`]:{paddingLeft:ll(h)}}:(c=s)!=null&&c.includes(l)?{}:{width:"100%",marginLeft:0,[`& > .${Gu.item}`]:{paddingLeft:0}}})}return i}function zH(t,e,n={}){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[n[`spacing-xs-${String(t)}`]];const r=[];return e.forEach(i=>{const o=t[i];Number(o)>0&&r.push(n[`spacing-${i}-${String(o)}`])}),r}const jH=oe("div",{name:"MuiGrid",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t,{container:r,direction:i,item:o,spacing:s,wrap:a,zeroMinWidth:l,breakpoints:c}=n;let h=[];r&&(h=zH(s,c,e));const f=[];return c.forEach(p=>{const g=n[p];g&&f.push(e[`grid-${p}-${String(g)}`])}),[e.root,r&&e.container,o&&e.item,l&&e.zeroMinWidth,...h,i!=="row"&&e[`direction-xs-${String(i)}`],a!=="wrap"&&e[`wrap-xs-${String(a)}`],...f]}})(({ownerState:t})=>M({boxSizing:"border-box"},t.container&&{display:"flex",flexWrap:"wrap",width:"100%"},t.item&&{margin:0},t.zeroMinWidth&&{minWidth:0},t.wrap!=="wrap"&&{flexWrap:t.wrap}),$H,BH,UH,FH);function WH(t,e){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[`spacing-xs-${String(t)}`];const n=[];return e.forEach(r=>{const i=t[r];if(Number(i)>0){const o=`spacing-${r}-${String(i)}`;n.push(o)}}),n}const HH=t=>{const{classes:e,container:n,direction:r,item:i,spacing:o,wrap:s,zeroMinWidth:a,breakpoints:l}=t;let c=[];n&&(c=WH(o,l));const h=[];l.forEach(p=>{const g=t[p];g&&h.push(`grid-${p}-${String(g)}`)});const f={root:["root",n&&"container",i&&"item",a&&"zeroMinWidth",...c,r!=="row"&&`direction-xs-${String(r)}`,s!=="wrap"&&`wrap-xs-${String(s)}`,...h]};return Be(f,NH,e)},GH=x.forwardRef(function(e,n){const r=ze({props:e,name:"MuiGrid"}),{breakpoints:i}=Om(),o=_d(r),{className:s,columns:a,columnSpacing:l,component:c="div",container:h=!1,direction:f="row",item:p=!1,rowSpacing:g,spacing:w=0,wrap:b="wrap",zeroMinWidth:C=!1}=o,T=le(o,VH),y=g||w,_=l||w,S=x.useContext(JT),N=h?a||12:S,D={},v=M({},T);i.keys.forEach(P=>{T[P]!=null&&(D[P]=T[P],delete v[P])});const E=M({},o,{columns:N,container:h,direction:f,item:p,rowSpacing:y,columnSpacing:_,wrap:b,zeroMinWidth:C,spacing:w},D,{breakpoints:i.keys}),I=HH(E);return u(JT.Provider,{value:N,children:u(jH,M({ownerState:E,className:we(I.root,s),as:c,ref:n},v))})}),Qn=GH,qH=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function t0(t){return`scale(${t}, ${t**2})`}const KH={entering:{opacity:1,transform:t0(1)},entered:{opacity:1,transform:"none"}},py=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),UR=x.forwardRef(function(e,n){const{addEndListener:r,appear:i=!0,children:o,easing:s,in:a,onEnter:l,onEntered:c,onEntering:h,onExit:f,onExited:p,onExiting:g,style:w,timeout:b="auto",TransitionComponent:C=kw}=e,T=le(e,qH),y=V2(),_=x.useRef(),S=Om(),N=x.useRef(null),D=en(N,Wl(o),n),v=$=>z=>{if($){const j=N.current;z===void 0?$(j):$(j,z)}},E=v(h),I=v(($,z)=>{Cw($);const{duration:j,delay:V,easing:W}=Pl({style:w,timeout:b,easing:s},{mode:"enter"});let Y;b==="auto"?(Y=S.transitions.getAutoHeightDuration($.clientHeight),_.current=Y):Y=j,$.style.transition=[S.transitions.create("opacity",{duration:Y,delay:V}),S.transitions.create("transform",{duration:py?Y:Y*.666,delay:V,easing:W})].join(","),l&&l($,z)}),P=v(c),L=v(g),O=v($=>{const{duration:z,delay:j,easing:V}=Pl({style:w,timeout:b,easing:s},{mode:"exit"});let W;b==="auto"?(W=S.transitions.getAutoHeightDuration($.clientHeight),_.current=W):W=z,$.style.transition=[S.transitions.create("opacity",{duration:W,delay:j}),S.transitions.create("transform",{duration:py?W:W*.666,delay:py?j:j||W*.333,easing:V})].join(","),$.style.opacity=0,$.style.transform=t0(.75),f&&f($)}),R=v(p);return u(C,M({appear:i,in:a,nodeRef:N,onEnter:I,onEntered:P,onEntering:E,onExit:O,onExited:R,onExiting:L,addEndListener:$=>{b==="auto"&&y.start(_.current||0,$),r&&r(N.current,$)},timeout:b==="auto"?null:b},T,{children:($,z)=>x.cloneElement(o,M({style:M({opacity:0,transform:t0(.75),visibility:$==="exited"&&!a?"hidden":void 0},KH[$],w,o.props.style),ref:D},z))}))});UR.muiSupportAuto=!0;const YH=UR,QH=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],XH=t=>{const{classes:e,disableUnderline:n}=t,i=Be({root:["root",!n&&"underline"],input:["input"]},qj,e);return M({},e,i)},JH=oe($m,{shouldForwardProp:t=>lr(t)||t==="classes",name:"MuiInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...Vm(t,e),!n.disableUnderline&&e.underline]}})(({theme:t,ownerState:e})=>{let r=t.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(r=`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`),M({position:"relative"},e.formControl&&{"label + &":{marginTop:16}},!e.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(t.vars||t).palette[e.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Pc.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Pc.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Pc.disabled}, .${Pc.error}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${Pc.disabled}:before`]:{borderBottomStyle:"dotted"}})}),ZH=oe(Bm,{name:"MuiInput",slot:"Input",overridesResolver:Fm})({}),zR=x.forwardRef(function(e,n){var r,i,o,s;const a=ze({props:e,name:"MuiInput"}),{disableUnderline:l,components:c={},componentsProps:h,fullWidth:f=!1,inputComponent:p="input",multiline:g=!1,slotProps:w,slots:b={},type:C="text"}=a,T=le(a,QH),y=XH(a),S={root:{ownerState:{disableUnderline:l}}},N=w??h?jn(w??h,S):S,D=(r=(i=b.root)!=null?i:c.Root)!=null?r:JH,v=(o=(s=b.input)!=null?s:c.Input)!=null?o:ZH;return u(Rw,M({slots:{root:D,input:v},slotProps:N,fullWidth:f,inputComponent:p,multiline:g,ref:n,type:C},T,{classes:y}))});zR.muiName="Input";const jR=zR;function eG(t){return $e("MuiInputLabel",t)}Ve("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const tG=["disableAnimation","margin","shrink","variant","className"],nG=t=>{const{classes:e,formControl:n,size:r,shrink:i,disableAnimation:o,variant:s,required:a}=t,l={root:["root",n&&"formControl",!o&&"animated",i&&"shrink",r&&r!=="normal"&&`size${be(r)}`,s],asterisk:[a&&"asterisk"]},c=Be(l,eG,e);return M({},e,c)},rG=oe(Vr,{shouldForwardProp:t=>lr(t)||t==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${hu.asterisk}`]:e.asterisk},e.root,n.formControl&&e.formControl,n.size==="small"&&e.sizeSmall,n.shrink&&e.shrink,!n.disableAnimation&&e.animated,n.focused&&e.focused,e[n.variant]]}})(({theme:t,ownerState:e})=>M({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},e.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},e.size==="small"&&{transform:"translate(0, 17px) scale(1)"},e.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!e.disableAnimation&&{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})},e.variant==="filled"&&M({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},e.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},e.shrink&&M({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},e.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),e.variant==="outlined"&&M({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},e.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},e.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))),iG=x.forwardRef(function(e,n){const r=ze({name:"MuiInputLabel",props:e}),{disableAnimation:i=!1,shrink:o,className:s}=r,a=le(r,tG),l=ws();let c=o;typeof c>"u"&&l&&(c=l.filled||l.focused||l.adornedStart);const h=ma({props:r,muiFormControl:l,states:["size","variant","required","focused"]}),f=M({},r,{disableAnimation:i,formControl:l,shrink:c,size:h.size,variant:h.variant,required:h.required,focused:h.focused}),p=nG(f);return u(rG,M({"data-shrink":c,ownerState:f,ref:n,className:we(p.root,s)},a,{classes:p}))}),oG=iG;function sG(t){return $e("MuiLink",t)}const aG=Ve("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),lG=aG,WR={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},cG=t=>WR[t]||t,uG=({theme:t,ownerState:e})=>{const n=cG(e.color),r=Cl(t,`palette.${n}`,!1)||e.color,i=Cl(t,`palette.${n}Channel`);return"vars"in t&&i?`rgba(${i} / 0.4)`:on(r,.4)},dG=uG,hG=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],fG=t=>{const{classes:e,component:n,focusVisible:r,underline:i}=t,o={root:["root",`underline${be(i)}`,n==="button"&&"button",r&&"focusVisible"]};return Be(o,sG,e)},pG=oe(ie,{name:"MuiLink",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`underline${be(n.underline)}`],n.component==="button"&&e.button]}})(({theme:t,ownerState:e})=>M({},e.underline==="none"&&{textDecoration:"none"},e.underline==="hover"&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},e.underline==="always"&&M({textDecoration:"underline"},e.color!=="inherit"&&{textDecorationColor:dG({theme:t,ownerState:e})},{"&:hover":{textDecorationColor:"inherit"}}),e.component==="button"&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${lG.focusVisible}`]:{outline:"auto"}})),mG=x.forwardRef(function(e,n){const r=ze({props:e,name:"MuiLink"}),{className:i,color:o="primary",component:s="a",onBlur:a,onFocus:l,TypographyClasses:c,underline:h="always",variant:f="inherit",sx:p}=r,g=le(r,hG),{isFocusVisibleRef:w,onBlur:b,onFocus:C,ref:T}=ew(),[y,_]=x.useState(!1),S=en(n,T),N=I=>{b(I),w.current===!1&&_(!1),a&&a(I)},D=I=>{C(I),w.current===!0&&_(!0),l&&l(I)},v=M({},r,{color:o,component:s,focusVisible:y,underline:h,variant:f}),E=fG(v);return u(pG,M({color:o,className:we(E.root,i),classes:c,component:s,onBlur:N,onFocus:D,ref:S,ownerState:v,variant:f,sx:[...Object.keys(WR).includes(o)?[]:[{color:o}],...Array.isArray(p)?p:[p]]},g))}),HR=mG,gG=x.createContext({}),es=gG;function yG(t){return $e("MuiList",t)}Ve("MuiList",["root","padding","dense","subheader"]);const vG=["children","className","component","dense","disablePadding","subheader"],wG=t=>{const{classes:e,disablePadding:n,dense:r,subheader:i}=t;return Be({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},yG,e)},bG=oe("ul",{name:"MuiList",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disablePadding&&e.padding,n.dense&&e.dense,n.subheader&&e.subheader]}})(({ownerState:t})=>M({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})),_G=x.forwardRef(function(e,n){const r=ze({props:e,name:"MuiList"}),{children:i,className:o,component:s="ul",dense:a=!1,disablePadding:l=!1,subheader:c}=r,h=le(r,vG),f=x.useMemo(()=>({dense:a}),[a]),p=M({},r,{component:s,dense:a,disablePadding:l}),g=wG(p);return u(es.Provider,{value:f,children:F(bG,M({as:s,className:we(g.root,o),ref:n,ownerState:p},h,{children:[c,i]}))})}),qu=_G;function xG(t){return $e("MuiListItem",t)}const kG=Ve("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]),Ma=kG,TG=Ve("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),EG=TG;function SG(t){return $e("MuiListItemSecondaryAction",t)}Ve("MuiListItemSecondaryAction",["root","disableGutters"]);const CG=["className"],IG=t=>{const{disableGutters:e,classes:n}=t;return Be({root:["root",e&&"disableGutters"]},SG,n)},PG=oe("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.disableGutters&&e.disableGutters]}})(({ownerState:t})=>M({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},t.disableGutters&&{right:0})),GR=x.forwardRef(function(e,n){const r=ze({props:e,name:"MuiListItemSecondaryAction"}),{className:i}=r,o=le(r,CG),s=x.useContext(es),a=M({},r,{disableGutters:s.disableGutters}),l=IG(a);return u(PG,M({className:we(l.root,i),ownerState:a,ref:n},o))});GR.muiName="ListItemSecondaryAction";const RG=GR,AG=["className"],NG=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],MG=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.alignItems==="flex-start"&&e.alignItemsFlexStart,n.divider&&e.divider,!n.disableGutters&&e.gutters,!n.disablePadding&&e.padding,n.button&&e.button,n.hasSecondaryAction&&e.secondaryAction]},DG=t=>{const{alignItems:e,button:n,classes:r,dense:i,disabled:o,disableGutters:s,disablePadding:a,divider:l,hasSecondaryAction:c,selected:h}=t;return Be({root:["root",i&&"dense",!s&&"gutters",!a&&"padding",l&&"divider",o&&"disabled",n&&"button",e==="flex-start"&&"alignItemsFlexStart",c&&"secondaryAction",h&&"selected"],container:["container"]},xG,r)},OG=oe("div",{name:"MuiListItem",slot:"Root",overridesResolver:MG})(({theme:t,ownerState:e})=>M({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!e.disablePadding&&M({paddingTop:8,paddingBottom:8},e.dense&&{paddingTop:4,paddingBottom:4},!e.disableGutters&&{paddingLeft:16,paddingRight:16},!!e.secondaryAction&&{paddingRight:48}),!!e.secondaryAction&&{[`& > .${EG.root}`]:{paddingRight:48}},{[`&.${Ma.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${Ma.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:on(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${Ma.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:on(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${Ma.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.alignItems==="flex-start"&&{alignItems:"flex-start"},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},e.button&&{transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Ma.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:on(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:on(t.palette.primary.main,t.palette.action.selectedOpacity)}}},e.hasSecondaryAction&&{paddingRight:48})),LG=oe("li",{name:"MuiListItem",slot:"Container",overridesResolver:(t,e)=>e.container})({position:"relative"}),VG=x.forwardRef(function(e,n){const r=ze({props:e,name:"MuiListItem"}),{alignItems:i="center",autoFocus:o=!1,button:s=!1,children:a,className:l,component:c,components:h={},componentsProps:f={},ContainerComponent:p="li",ContainerProps:{className:g}={},dense:w=!1,disabled:b=!1,disableGutters:C=!1,disablePadding:T=!1,divider:y=!1,focusVisibleClassName:_,secondaryAction:S,selected:N=!1,slotProps:D={},slots:v={}}=r,E=le(r.ContainerProps,AG),I=le(r,NG),P=x.useContext(es),L=x.useMemo(()=>({dense:w||P.dense||!1,alignItems:i,disableGutters:C}),[i,P.dense,w,C]),O=x.useRef(null);li(()=>{o&&O.current&&O.current.focus()},[o]);const R=x.Children.toArray(a),U=R.length&&cu(R[R.length-1],["ListItemSecondaryAction"]),$=M({},r,{alignItems:i,autoFocus:o,button:s,dense:L.dense,disabled:b,disableGutters:C,disablePadding:T,divider:y,hasSecondaryAction:U,selected:N}),z=DG($),j=en(O,n),V=v.root||h.Root||OG,W=D.root||f.root||{},Y=M({className:we(z.root,W.className,l),disabled:b},I);let J=c||"li";return s&&(Y.component=c||"div",Y.focusVisibleClassName=we(Ma.focusVisible,_),J=kd),U?(J=!Y.component&&!c?"div":J,p==="li"&&(J==="li"?J="div":Y.component==="li"&&(Y.component="div")),u(es.Provider,{value:L,children:F(LG,M({as:p,className:we(z.container,g),ref:j,ownerState:$},E,{children:[u(V,M({},W,!Tl(V)&&{as:J,ownerState:M({},$,W.ownerState)},Y,{children:R})),R.pop()]}))})):u(es.Provider,{value:L,children:F(V,M({},W,{as:J,ref:j},!Tl(V)&&{ownerState:M({},$,W.ownerState)},Y,{children:[R,S&&u(RG,{children:S})]}))})}),Xh=VG,FG=Ve("MuiListItemIcon",["root","alignItemsFlexStart"]),ZT=FG;function $G(t){return $e("MuiListItemText",t)}const BG=Ve("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),np=BG,UG=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],zG=t=>{const{classes:e,inset:n,primary:r,secondary:i,dense:o}=t;return Be({root:["root",n&&"inset",o&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},$G,e)},jG=oe("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${np.primary}`]:e.primary},{[`& .${np.secondary}`]:e.secondary},e.root,n.inset&&e.inset,n.primary&&n.secondary&&e.multiline,n.dense&&e.dense]}})(({ownerState:t})=>M({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},t.primary&&t.secondary&&{marginTop:6,marginBottom:6},t.inset&&{paddingLeft:56})),WG=x.forwardRef(function(e,n){const r=ze({props:e,name:"MuiListItemText"}),{children:i,className:o,disableTypography:s=!1,inset:a=!1,primary:l,primaryTypographyProps:c,secondary:h,secondaryTypographyProps:f}=r,p=le(r,UG),{dense:g}=x.useContext(es);let w=l??i,b=h;const C=M({},r,{disableTypography:s,inset:a,primary:!!w,secondary:!!b,dense:g}),T=zG(C);return w!=null&&w.type!==ie&&!s&&(w=u(ie,M({variant:g?"body2":"body1",className:T.primary,component:c!=null&&c.variant?void 0:"span",display:"block"},c,{children:w}))),b!=null&&b.type!==ie&&!s&&(b=u(ie,M({variant:"body2",className:T.secondary,color:"text.secondary",display:"block"},f,{children:b}))),F(jG,M({className:we(T.root,o),ownerState:C,ref:n},p,{children:[w,b]}))}),HG=WG,GG=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function my(t,e,n){return t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:n?null:t.firstChild}function eE(t,e,n){return t===e?n?t.firstChild:t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:n?null:t.lastChild}function qR(t,e){if(e===void 0)return!0;let n=t.innerText;return n===void 0&&(n=t.textContent),n=n.trim().toLowerCase(),n.length===0?!1:e.repeating?n[0]===e.keys[0]:n.indexOf(e.keys.join(""))===0}function Ac(t,e,n,r,i,o){let s=!1,a=i(t,e,e?n:!1);for(;a;){if(a===t.firstChild){if(s)return!1;s=!0}const l=r?!1:a.disabled||a.getAttribute("aria-disabled")==="true";if(!a.hasAttribute("tabindex")||!qR(a,o)||l)a=i(t,a,n);else return a.focus(),!0}return!1}const qG=x.forwardRef(function(e,n){const{actions:r,autoFocus:i=!1,autoFocusItem:o=!1,children:s,className:a,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:h,variant:f="selectedMenu"}=e,p=le(e,GG),g=x.useRef(null),w=x.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});li(()=>{i&&g.current.focus()},[i]),x.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(_,{direction:S})=>{const N=!g.current.style.width;if(_.clientHeight{const S=g.current,N=_.key,D=rr(S).activeElement;if(N==="ArrowDown")_.preventDefault(),Ac(S,D,c,l,my);else if(N==="ArrowUp")_.preventDefault(),Ac(S,D,c,l,eE);else if(N==="Home")_.preventDefault(),Ac(S,null,c,l,my);else if(N==="End")_.preventDefault(),Ac(S,null,c,l,eE);else if(N.length===1){const v=w.current,E=N.toLowerCase(),I=performance.now();v.keys.length>0&&(I-v.lastTime>500?(v.keys=[],v.repeating=!0,v.previousKeyMatched=!0):v.repeating&&E!==v.keys[0]&&(v.repeating=!1)),v.lastTime=I,v.keys.push(E);const P=D&&!v.repeating&&qR(D,v);v.previousKeyMatched&&(P||Ac(S,D,!1,l,my,v))?_.preventDefault():v.previousKeyMatched=!1}h&&h(_)},C=en(g,n);let T=-1;x.Children.forEach(s,(_,S)=>{if(!x.isValidElement(_)){T===S&&(T+=1,T>=s.length&&(T=-1));return}_.props.disabled||(f==="selectedMenu"&&_.props.selected||T===-1)&&(T=S),T===S&&(_.props.disabled||_.props.muiSkipListHighlight||_.type.muiSkipListHighlight)&&(T+=1,T>=s.length&&(T=-1))});const y=x.Children.map(s,(_,S)=>{if(S===T){const N={};return o&&(N.autoFocus=!0),_.props.tabIndex===void 0&&f==="selectedMenu"&&(N.tabIndex=0),x.cloneElement(_,N)}return _});return u(qu,M({role:"menu",ref:C,className:a,onKeyDown:b,tabIndex:i?0:-1},p,{children:y}))}),KG=qG;function YG(t){return $e("MuiPopover",t)}Ve("MuiPopover",["root","paper"]);const QG=["onEntering"],XG=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],JG=["slotProps"];function tE(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.height/2:e==="bottom"&&(n=t.height),n}function nE(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.width/2:e==="right"&&(n=t.width),n}function rE(t){return[t.horizontal,t.vertical].map(e=>typeof e=="number"?`${e}px`:e).join(" ")}function gy(t){return typeof t=="function"?t():t}const ZG=t=>{const{classes:e}=t;return Be({root:["root"],paper:["paper"]},YG,e)},eq=oe(HW,{name:"MuiPopover",slot:"Root",overridesResolver:(t,e)=>e.root})({}),KR=oe(mr,{name:"MuiPopover",slot:"Paper",overridesResolver:(t,e)=>e.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),tq=x.forwardRef(function(e,n){var r,i,o;const s=ze({props:e,name:"MuiPopover"}),{action:a,anchorEl:l,anchorOrigin:c={vertical:"top",horizontal:"left"},anchorPosition:h,anchorReference:f="anchorEl",children:p,className:g,container:w,elevation:b=8,marginThreshold:C=16,open:T,PaperProps:y={},slots:_,slotProps:S,transformOrigin:N={vertical:"top",horizontal:"left"},TransitionComponent:D=YH,transitionDuration:v="auto",TransitionProps:{onEntering:E}={},disableScrollLock:I=!1}=s,P=le(s.TransitionProps,QG),L=le(s,XG),O=(r=S==null?void 0:S.paper)!=null?r:y,R=x.useRef(),U=en(R,O.ref),$=M({},s,{anchorOrigin:c,anchorReference:f,elevation:b,marginThreshold:C,externalPaperSlotProps:O,transformOrigin:N,TransitionComponent:D,transitionDuration:v,TransitionProps:P}),z=ZG($),j=x.useCallback(()=>{if(f==="anchorPosition")return h;const Ce=gy(l),ot=(Ce&&Ce.nodeType===1?Ce:rr(R.current).body).getBoundingClientRect();return{top:ot.top+tE(ot,c.vertical),left:ot.left+nE(ot,c.horizontal)}},[l,c.horizontal,c.vertical,h,f]),V=x.useCallback(Ce=>({vertical:tE(Ce,N.vertical),horizontal:nE(Ce,N.horizontal)}),[N.horizontal,N.vertical]),W=x.useCallback(Ce=>{const Ge={width:Ce.offsetWidth,height:Ce.offsetHeight},ot=V(Ge);if(f==="none")return{top:null,left:null,transformOrigin:rE(ot)};const tn=j();let hn=tn.top-ot.vertical,En=tn.left-ot.horizontal;const fn=hn+Ge.height,pn=En+Ge.width,lt=Ii(gy(l)),qn=lt.innerHeight-C,an=lt.innerWidth-C;if(C!==null&&hnqn){const je=fn-qn;hn-=je,ot.vertical+=je}if(C!==null&&Enan){const je=pn-an;En-=je,ot.horizontal+=je}return{top:`${Math.round(hn)}px`,left:`${Math.round(En)}px`,transformOrigin:rE(ot)}},[l,f,j,V,C]),[Y,J]=x.useState(T),te=x.useCallback(()=>{const Ce=R.current;if(!Ce)return;const Ge=W(Ce);Ge.top!==null&&(Ce.style.top=Ge.top),Ge.left!==null&&(Ce.style.left=Ge.left),Ce.style.transformOrigin=Ge.transformOrigin,J(!0)},[W]);x.useEffect(()=>(I&&window.addEventListener("scroll",te),()=>window.removeEventListener("scroll",te)),[l,I,te]);const se=(Ce,Ge)=>{E&&E(Ce,Ge),te()},ae=()=>{J(!1)};x.useEffect(()=>{T&&te()}),x.useImperativeHandle(a,()=>T?{updatePosition:()=>{te()}}:null,[T,te]),x.useEffect(()=>{if(!T)return;const Ce=dm(()=>{te()}),Ge=Ii(l);return Ge.addEventListener("resize",Ce),()=>{Ce.clear(),Ge.removeEventListener("resize",Ce)}},[l,T,te]);let ke=v;v==="auto"&&!D.muiSupportAuto&&(ke=void 0);const Te=w||(l?rr(gy(l)).body:void 0),Oe=(i=_==null?void 0:_.root)!=null?i:eq,pt=(o=_==null?void 0:_.paper)!=null?o:KR,at=El({elementType:pt,externalSlotProps:M({},O,{style:Y?O.style:M({},O.style,{opacity:0})}),additionalProps:{elevation:b,ref:U},ownerState:$,className:we(z.paper,O==null?void 0:O.className)}),yt=El({elementType:Oe,externalSlotProps:(S==null?void 0:S.root)||{},externalForwardedProps:L,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:Te,open:T},ownerState:$,className:we(z.root,g)}),{slotProps:Re}=yt,Ne=le(yt,JG);return u(Oe,M({},Ne,!Tl(Oe)&&{slotProps:Re,disableScrollLock:I},{children:u(D,M({appear:!0,in:T,onEntering:se,onExited:ae,timeout:ke},P,{children:u(pt,M({},at,{children:p}))}))}))}),nq=tq;function rq(t){return $e("MuiMenu",t)}Ve("MuiMenu",["root","paper","list"]);const iq=["onEntering"],oq=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],sq={vertical:"top",horizontal:"right"},aq={vertical:"top",horizontal:"left"},lq=t=>{const{classes:e}=t;return Be({root:["root"],paper:["paper"],list:["list"]},rq,e)},cq=oe(nq,{shouldForwardProp:t=>lr(t)||t==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(t,e)=>e.root})({}),uq=oe(KR,{name:"MuiMenu",slot:"Paper",overridesResolver:(t,e)=>e.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),dq=oe(KG,{name:"MuiMenu",slot:"List",overridesResolver:(t,e)=>e.list})({outline:0}),hq=x.forwardRef(function(e,n){var r,i;const o=ze({props:e,name:"MuiMenu"}),{autoFocus:s=!0,children:a,className:l,disableAutoFocusItem:c=!1,MenuListProps:h={},onClose:f,open:p,PaperProps:g={},PopoverClasses:w,transitionDuration:b="auto",TransitionProps:{onEntering:C}={},variant:T="selectedMenu",slots:y={},slotProps:_={}}=o,S=le(o.TransitionProps,iq),N=le(o,oq),D=d8(),v=M({},o,{autoFocus:s,disableAutoFocusItem:c,MenuListProps:h,onEntering:C,PaperProps:g,transitionDuration:b,TransitionProps:S,variant:T}),E=lq(v),I=s&&!c&&p,P=x.useRef(null),L=(V,W)=>{P.current&&P.current.adjustStyleForScrollbar(V,{direction:D?"rtl":"ltr"}),C&&C(V,W)},O=V=>{V.key==="Tab"&&(V.preventDefault(),f&&f(V,"tabKeyDown"))};let R=-1;x.Children.map(a,(V,W)=>{x.isValidElement(V)&&(V.props.disabled||(T==="selectedMenu"&&V.props.selected||R===-1)&&(R=W))});const U=(r=y.paper)!=null?r:uq,$=(i=_.paper)!=null?i:g,z=El({elementType:y.root,externalSlotProps:_.root,ownerState:v,className:[E.root,l]}),j=El({elementType:U,externalSlotProps:$,ownerState:v,className:E.paper});return u(cq,M({onClose:f,anchorOrigin:{vertical:"bottom",horizontal:D?"right":"left"},transformOrigin:D?sq:aq,slots:{paper:U,root:y.root},slotProps:{root:z,paper:j},open:p,ref:n,transitionDuration:b,TransitionProps:M({onEntering:L},S),ownerState:v},N,{classes:w,children:u(dq,M({onKeyDown:O,actions:P,autoFocus:s&&(R===-1||c),autoFocusItem:I,variant:T},h,{className:we(E.list,h.className),children:a}))}))}),fq=hq;function pq(t){return $e("MuiMenuItem",t)}const mq=Ve("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),Nc=mq,gq=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],yq=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.divider&&e.divider,!n.disableGutters&&e.gutters]},vq=t=>{const{disabled:e,dense:n,divider:r,disableGutters:i,selected:o,classes:s}=t,l=Be({root:["root",n&&"dense",e&&"disabled",!i&&"gutters",r&&"divider",o&&"selected"]},pq,s);return M({},s,l)},wq=oe(kd,{shouldForwardProp:t=>lr(t)||t==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:yq})(({theme:t,ownerState:e})=>M({},t.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!e.disableGutters&&{paddingLeft:16,paddingRight:16},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Nc.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:on(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${Nc.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:on(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${Nc.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:on(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:on(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${Nc.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${Nc.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`& + .${YT.root}`]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},[`& + .${YT.inset}`]:{marginLeft:52},[`& .${np.root}`]:{marginTop:0,marginBottom:0},[`& .${np.inset}`]:{paddingLeft:36},[`& .${ZT.root}`]:{minWidth:36}},!e.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},e.dense&&M({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{[`& .${ZT.root} svg`]:{fontSize:"1.25rem"}}))),bq=x.forwardRef(function(e,n){const r=ze({props:e,name:"MuiMenuItem"}),{autoFocus:i=!1,component:o="li",dense:s=!1,divider:a=!1,disableGutters:l=!1,focusVisibleClassName:c,role:h="menuitem",tabIndex:f,className:p}=r,g=le(r,gq),w=x.useContext(es),b=x.useMemo(()=>({dense:s||w.dense||!1,disableGutters:l}),[w.dense,s,l]),C=x.useRef(null);li(()=>{i&&C.current&&C.current.focus()},[i]);const T=M({},r,{dense:b.dense,divider:a,disableGutters:l}),y=vq(r),_=en(C,n);let S;return r.disabled||(S=f!==void 0?f:-1),u(es.Provider,{value:b,children:u(wq,M({ref:_,role:h,tabIndex:S,component:o,focusVisibleClassName:we(y.focusVisible,c),className:we(y.root,p)},g,{ownerState:T,classes:y}))})}),yy=bq;function _q(t){return $e("MuiNativeSelect",t)}const xq=Ve("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),Aw=xq,kq=["className","disabled","error","IconComponent","inputRef","variant"],Tq=t=>{const{classes:e,variant:n,disabled:r,multiple:i,open:o,error:s}=t,a={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${be(n)}`,o&&"iconOpen",r&&"disabled"]};return Be(a,_q,e)},YR=({ownerState:t,theme:e})=>M({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":M({},e.vars?{backgroundColor:`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:e.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${Aw.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},t.variant==="filled"&&{"&&&":{paddingRight:32}},t.variant==="outlined"&&{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}),Eq=oe("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:lr,overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.select,e[n.variant],n.error&&e.error,{[`&.${Aw.multiple}`]:e.multiple}]}})(YR),QR=({ownerState:t,theme:e})=>M({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${Aw.disabled}`]:{color:(e.vars||e).palette.action.disabled}},t.open&&{transform:"rotate(180deg)"},t.variant==="filled"&&{right:7},t.variant==="outlined"&&{right:7}),Sq=oe("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.icon,n.variant&&e[`icon${be(n.variant)}`],n.open&&e.iconOpen]}})(QR),Cq=x.forwardRef(function(e,n){const{className:r,disabled:i,error:o,IconComponent:s,inputRef:a,variant:l="standard"}=e,c=le(e,kq),h=M({},e,{disabled:i,variant:l,error:o}),f=Tq(h);return F(x.Fragment,{children:[u(Eq,M({ownerState:h,className:we(f.select,r),disabled:i,ref:a||n},c)),e.multiple?null:u(Sq,{as:s,ownerState:h,className:f.icon})]})}),Iq=Cq;var iE;const Pq=["children","classes","className","label","notched"],Rq=oe("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:lr})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),Aq=oe("legend",{name:"MuiNotchedOutlined",shouldForwardProp:lr})(({ownerState:t,theme:e})=>M({float:"unset",width:"auto",overflow:"hidden"},!t.withLabel&&{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})},t.withLabel&&M({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},t.notched&&{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})})));function Nq(t){const{className:e,label:n,notched:r}=t,i=le(t,Pq),o=n!=null&&n!=="",s=M({},t,{notched:r,withLabel:o});return u(Rq,M({"aria-hidden":!0,className:e,ownerState:s},i,{children:u(Aq,{ownerState:s,children:o?u("span",{children:n}):iE||(iE=u("span",{className:"notranslate",children:"​"}))})}))}const Mq=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],Dq=t=>{const{classes:e}=t,r=Be({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Yj,e);return M({},e,r)},Oq=oe($m,{shouldForwardProp:t=>lr(t)||t==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:Vm})(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return M({position:"relative",borderRadius:(t.vars||t).shape.borderRadius,[`&:hover .${To.notchedOutline}`]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{[`&:hover .${To.notchedOutline}`]:{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${To.focused} .${To.notchedOutline}`]:{borderColor:(t.vars||t).palette[e.color].main,borderWidth:2},[`&.${To.error} .${To.notchedOutline}`]:{borderColor:(t.vars||t).palette.error.main},[`&.${To.disabled} .${To.notchedOutline}`]:{borderColor:(t.vars||t).palette.action.disabled}},e.startAdornment&&{paddingLeft:14},e.endAdornment&&{paddingRight:14},e.multiline&&M({padding:"16.5px 14px"},e.size==="small"&&{padding:"8.5px 14px"}))}),Lq=oe(Nq,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(t,e)=>e.notchedOutline})(({theme:t})=>{const e=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:e}}),Vq=oe(Bm,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:Fm})(({theme:t,ownerState:e})=>M({padding:"16.5px 14px"},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:t.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.mode==="light"?null:"#fff",caretColor:t.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},e.size==="small"&&{padding:"8.5px 14px"},e.multiline&&{padding:0},e.startAdornment&&{paddingLeft:0},e.endAdornment&&{paddingRight:0})),XR=x.forwardRef(function(e,n){var r,i,o,s,a;const l=ze({props:e,name:"MuiOutlinedInput"}),{components:c={},fullWidth:h=!1,inputComponent:f="input",label:p,multiline:g=!1,notched:w,slots:b={},type:C="text"}=l,T=le(l,Mq),y=Dq(l),_=ws(),S=ma({props:l,muiFormControl:_,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),N=M({},l,{color:S.color||"primary",disabled:S.disabled,error:S.error,focused:S.focused,formControl:_,fullWidth:h,hiddenLabel:S.hiddenLabel,multiline:g,size:S.size,type:C}),D=(r=(i=b.root)!=null?i:c.Root)!=null?r:Oq,v=(o=(s=b.input)!=null?s:c.Input)!=null?o:Vq;return u(Rw,M({slots:{root:D,input:v},renderSuffix:E=>u(Lq,{ownerState:N,className:y.notchedOutline,label:p!=null&&p!==""&&S.required?a||(a=F(x.Fragment,{children:[p," ","*"]})):p,notched:typeof w<"u"?w:!!(E.startAdornment||E.filled||E.focused)}),fullWidth:h,inputComponent:f,multiline:g,ref:n,type:C},T,{classes:M({},y,{notchedOutline:null})}))});XR.muiName="Input";const JR=XR;function Fq(t){return $e("MuiSelect",t)}const $q=Ve("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),Mc=$q;var oE;const Bq=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],Uq=oe("div",{name:"MuiSelect",slot:"Select",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`&.${Mc.select}`]:e.select},{[`&.${Mc.select}`]:e[n.variant]},{[`&.${Mc.error}`]:e.error},{[`&.${Mc.multiple}`]:e.multiple}]}})(YR,{[`&.${Mc.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),zq=oe("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.icon,n.variant&&e[`icon${be(n.variant)}`],n.open&&e.iconOpen]}})(QR),jq=oe("input",{shouldForwardProp:t=>ER(t)&&t!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(t,e)=>e.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function sE(t,e){return typeof e=="object"&&e!==null?t===e:String(t)===String(e)}function Wq(t){return t==null||typeof t=="string"&&!t.trim()}const Hq=t=>{const{classes:e,variant:n,disabled:r,multiple:i,open:o,error:s}=t,a={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${be(n)}`,o&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return Be(a,Fq,e)},Gq=x.forwardRef(function(e,n){var r;const{"aria-describedby":i,"aria-label":o,autoFocus:s,autoWidth:a,children:l,className:c,defaultOpen:h,defaultValue:f,disabled:p,displayEmpty:g,error:w=!1,IconComponent:b,inputRef:C,labelId:T,MenuProps:y={},multiple:_,name:S,onBlur:N,onChange:D,onClose:v,onFocus:E,onOpen:I,open:P,readOnly:L,renderValue:O,SelectDisplayProps:R={},tabIndex:U,value:$,variant:z="standard"}=e,j=le(e,Bq),[V,W]=qf({controlled:$,default:f,name:"Select"}),[Y,J]=qf({controlled:P,default:h,name:"Select"}),te=x.useRef(null),se=x.useRef(null),[ae,ke]=x.useState(null),{current:Te}=x.useRef(P!=null),[Oe,pt]=x.useState(),at=en(n,C),yt=x.useCallback(he=>{se.current=he,he&&ke(he)},[]),Re=ae==null?void 0:ae.parentNode;x.useImperativeHandle(at,()=>({focus:()=>{se.current.focus()},node:te.current,value:V}),[V]),x.useEffect(()=>{h&&Y&&ae&&!Te&&(pt(a?null:Re.clientWidth),se.current.focus())},[ae,a]),x.useEffect(()=>{s&&se.current.focus()},[s]),x.useEffect(()=>{if(!T)return;const he=rr(se.current).getElementById(T);if(he){const Ze=()=>{getSelection().isCollapsed&&se.current.focus()};return he.addEventListener("click",Ze),()=>{he.removeEventListener("click",Ze)}}},[T]);const Ne=(he,Ze)=>{he?I&&I(Ze):v&&v(Ze),Te||(pt(a?null:Re.clientWidth),J(he))},Ce=he=>{he.button===0&&(he.preventDefault(),se.current.focus(),Ne(!0,he))},Ge=he=>{Ne(!1,he)},ot=x.Children.toArray(l),tn=he=>{const Ze=ot.find(Pt=>Pt.props.value===he.target.value);Ze!==void 0&&(W(Ze.props.value),D&&D(he,Ze))},hn=he=>Ze=>{let Pt;if(Ze.currentTarget.hasAttribute("tabindex")){if(_){Pt=Array.isArray(V)?V.slice():[];const ur=V.indexOf(he.props.value);ur===-1?Pt.push(he.props.value):Pt.splice(ur,1)}else Pt=he.props.value;if(he.props.onClick&&he.props.onClick(Ze),V!==Pt&&(W(Pt),D)){const ur=Ze.nativeEvent||Ze,va=new ur.constructor(ur.type,ur);Object.defineProperty(va,"target",{writable:!0,value:{value:Pt,name:S}}),D(va,he)}_||Ne(!1,Ze)}},En=he=>{L||[" ","ArrowUp","ArrowDown","Enter"].indexOf(he.key)!==-1&&(he.preventDefault(),Ne(!0,he))},fn=ae!==null&&Y,pn=he=>{!fn&&N&&(Object.defineProperty(he,"target",{writable:!0,value:{value:V,name:S}}),N(he))};delete j["aria-invalid"];let lt,qn;const an=[];let je=!1;(ep({value:V})||g)&&(O?lt=O(V):je=!0);const Gt=ot.map(he=>{if(!x.isValidElement(he))return null;let Ze;if(_){if(!Array.isArray(V))throw new Error(ra(2));Ze=V.some(Pt=>sE(Pt,he.props.value)),Ze&&je&&an.push(he.props.children)}else Ze=sE(V,he.props.value),Ze&&je&&(qn=he.props.children);return x.cloneElement(he,{"aria-selected":Ze?"true":"false",onClick:hn(he),onKeyUp:Pt=>{Pt.key===" "&&Pt.preventDefault(),he.props.onKeyUp&&he.props.onKeyUp(Pt)},role:"option",selected:Ze,value:void 0,"data-value":he.props.value})});je&&(_?an.length===0?lt=null:lt=an.reduce((he,Ze,Pt)=>(he.push(Ze),Pt{const{classes:e}=t;return e},Nw={name:"MuiSelect",overridesResolver:(t,e)=>e.root,shouldForwardProp:t=>lr(t)&&t!=="variant",slot:"Root"},Xq=oe(jR,Nw)(""),Jq=oe(JR,Nw)(""),Zq=oe(FR,Nw)(""),ZR=x.forwardRef(function(e,n){const r=ze({name:"MuiSelect",props:e}),{autoWidth:i=!1,children:o,classes:s={},className:a,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:h=Zj,id:f,input:p,inputProps:g,label:w,labelId:b,MenuProps:C,multiple:T=!1,native:y=!1,onClose:_,onOpen:S,open:N,renderValue:D,SelectDisplayProps:v,variant:E="outlined"}=r,I=le(r,Kq),P=y?Iq:qq,L=ws(),O=ma({props:r,muiFormControl:L,states:["variant","error"]}),R=O.variant||E,U=M({},r,{variant:R,classes:s}),$=Qq(U),z=le($,Yq),j=p||{standard:u(Xq,{ownerState:U}),outlined:u(Jq,{label:w,ownerState:U}),filled:u(Zq,{ownerState:U})}[R],V=en(n,Wl(j));return u(x.Fragment,{children:x.cloneElement(j,M({inputComponent:P,inputProps:M({children:o,error:O.error,IconComponent:h,variant:R,type:void 0,multiple:T},y?{id:f}:{autoWidth:i,defaultOpen:l,displayEmpty:c,labelId:b,MenuProps:C,onClose:_,onOpen:S,open:N,renderValue:D,SelectDisplayProps:M({id:f},v)},g,{classes:g?jn(z,g.classes):z},p?p.props.inputProps:{})},(T&&y||c)&&R==="outlined"?{notched:!0}:{},{ref:V,className:we(j.props.className,a,$.root)},!p&&{variant:R},I))})});ZR.muiName="Select";const eA=ZR;function eK(t){return $e("MuiTextField",t)}Ve("MuiTextField",["root"]);const tK=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],nK={standard:jR,filled:FR,outlined:JR},rK=t=>{const{classes:e}=t;return Be({root:["root"]},eK,e)},iK=oe(yr,{name:"MuiTextField",slot:"Root",overridesResolver:(t,e)=>e.root})({}),oK=x.forwardRef(function(e,n){const r=ze({props:e,name:"MuiTextField"}),{autoComplete:i,autoFocus:o=!1,children:s,className:a,color:l="primary",defaultValue:c,disabled:h=!1,error:f=!1,FormHelperTextProps:p,fullWidth:g=!1,helperText:w,id:b,InputLabelProps:C,inputProps:T,InputProps:y,inputRef:_,label:S,maxRows:N,minRows:D,multiline:v=!1,name:E,onBlur:I,onChange:P,onFocus:L,placeholder:O,required:R=!1,rows:U,select:$=!1,SelectProps:z,type:j,value:V,variant:W="outlined"}=r,Y=le(r,tK),J=M({},r,{autoFocus:o,color:l,disabled:h,error:f,fullWidth:g,multiline:v,required:R,select:$,variant:W}),te=rK(J),se={};W==="outlined"&&(C&&typeof C.shrink<"u"&&(se.notched=C.shrink),se.label=S),$&&((!z||!z.native)&&(se.id=void 0),se["aria-describedby"]=void 0);const ae=hm(b),ke=w&&ae?`${ae}-helper-text`:void 0,Te=S&&ae?`${ae}-label`:void 0,Oe=nK[W],pt=u(Oe,M({"aria-describedby":ke,autoComplete:i,autoFocus:o,defaultValue:c,fullWidth:g,multiline:v,name:E,rows:U,maxRows:N,minRows:D,type:j,value:V,id:ae,inputRef:_,onBlur:I,onChange:P,onFocus:L,placeholder:O,inputProps:T},se,y));return F(iK,M({className:we(te.root,a),disabled:h,error:f,fullWidth:g,ref:n,required:R,color:l,variant:W,ownerState:J},Y,{children:[S!=null&&S!==""&&u(oG,M({htmlFor:ae,id:Te},C,{children:S})),$?u(eA,M({"aria-describedby":ke,id:ae,labelId:Te,value:V,input:pt},z,{children:s})):pt,w&&u(kH,M({id:ke},p,{children:w}))]}))}),Zn=oK,aE=({title:t,desc:e,Icon:n,image:r,link:i})=>u($s,{to:i,children:F("div",{className:"relative w-full flex gap-4 items-center justify-center px-3 py-4 mt-2 rounded-md border bg-center bg-cover bg-yellow-700/40 ",children:[u("div",{className:"absolute inset-0 bg-black opacity-50 z-0"}),u(n,{className:"relative w-8 h-8 z-10"}),F("div",{className:"relative flex flex-col gap-1 z-10",children:[u("h3",{className:"font-semibold text-md",children:t}),u("p",{className:"text-sm",children:e})]})]})}),sK=({clubname:t,logo:e,pages:n,links:r,pills:i})=>{const[o,s]=x.useState(!0),[a,l]=x.useState(!1);x.useState(!0);const[c,h]=x.useState(null),[f,p]=x.useState(new Array(n.length).fill(!1)),g=x.useRef(null),w={initial:{scaleY:0},animate:{scaleY:1,transition:{duration:.3}},exit:{scaleY:0,transition:{duration:.1}}},b=()=>{l(!a),s(a)},C=()=>{l(!1),s(!0),window.scrollTo({top:0,left:0,behavior:"smooth"})},T=S=>{p(N=>{const D=[...N];return D[S]=!D[S],D})},y=(S,N)=>{if(c!=null)return u("div",{className:"absolute top-0 left-1/2 transform -translate-x-1/2 -translate-y-1/2 mt-16 w-fit h-fit",children:u("div",{className:"absolute -top-6 transform -translate-x-1/2 h-max w-max py-4",children:F("div",{className:"w-80 border px-8 pb-6 pt-4 rounded-md bg-black/80 backdrop-blur-md flex-col gap-1",children:[F("div",{className:"flex items-center",children:[u("h2",{className:"font-semibold",children:N}),u("div",{className:"ml-3 flex-grow border-primary border-t-4 rounded-md"})]}),S.map(D=>u(aE,{...D}))]})})})},_=S=>{g.current&&!g.current.contains(S.target)&&b()};return x.useEffect(()=>{a?document.addEventListener("mousedown",_):document.removeEventListener("mousedown",_)},[a]),F("div",{className:"flex justify-center",onMouseLeave:()=>h(null),children:[o&&u("nav",{className:"w-screen max-w-[800px] fixed pt-8 z-40 px-8",children:F("div",{className:"max-w-[800px] grow rounded-md bg-black/20 backdrop-blur-md border flex justify-between items-center px-5 py-3",children:[u($s,{to:"/",className:"flex items-center justify-start gap-2 font-bold",onClick:C,children:u("img",{src:e,className:"h-8 w-8"})}),u("button",{className:"md:hidden",onClick:b,children:a?u(Qv,{}):u(PR,{})}),u("div",{className:"hidden md:flex justify-end gap-6 items-center",children:n.map((S,N)=>F("div",{onMouseEnter:()=>h(N),className:"relative",children:[F($s,{to:r[N],onClick:()=>h(N),className:"",children:[S,u("span",{className:`${c==N?"visible":"hidden"} absolute left-0 -bottom-2 w-full h-1 bg-primary scale-x-100`})]},N),i[N].length>0&&c===N&&y(i[N],S)]}))})]})}),u(S8,{in:a,children:u("div",{className:"w-full pt-8 p-3 fixed z-40",children:u("nav",{ref:g,className:"w-full flex flex-col items p-3 z-50 rounded-xl border-2 border-white backdrop-blur",children:F(qu,{style:{maxHeight:"66vh",overflow:"auto"},children:[F("div",{className:"flex w-full justify-between items-center pt-1 px-2",children:[u($s,{to:r[0],onClick:C,className:"font-semibold",children:t}),u("button",{onClick:b,children:u(Qv,{fontSize:"medium"})})]}),u("div",{className:"w-full h-full justify-center items-center pt-3",children:u("div",{className:"flex flex-col justify-center px-8 py-6 gap-7",children:n.map((S,N)=>u(Zt,{children:i[N].length<=0?u("div",{className:"text-lg font-bold cursor-pointer",children:u($s,{to:r[N],onClick:C,children:S})},N):F("div",{className:"text-lg font-bold cursor-pointer",onClick:()=>T(N),children:[S,f[N]?u(Iz,{}):u(Cz,{}),u(O$,{children:f[N]&&u(rt.div,{variants:w,initial:"initial",animate:"animate",exit:"exit",className:"origin-top",children:i[N].map(D=>u($s,{to:D.link,onClick:C,children:u(aE,{...D})}))},N)})]},N)}))})})]})})})})]})},tA="/img/HM_White_Transparent.png",aK="/assets/UMSU-White-1af6bd79.png",ii=({link:t,className:e,children:n})=>t.slice(0,4)=="http"?u("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:e,children:n}):u($s,{to:t,onClick:()=>window.scrollTo({top:0,behavior:"smooth"}),className:e,children:n}),lK=({links:t,icons:e})=>u("div",{className:"flex justify-center",children:F("footer",{className:"w-screen max-w-[1100px] p-3 px-8 my-20 flex flex-col items-center",children:[u("div",{className:" mb-12",children:u(ii,{link:"#",children:u("img",{title:"HackMelbourne Logo",src:tA,className:"w-28"})})}),u("div",{className:"flex grow flex-row md:w-1/3 w-100 mb-4 md:mb-8 justify-between",children:e.map(n=>u(ii,{className:"p-3",link:n.link,children:u(n.icon,{className:"h-7 w-7 md:h-10"})},n.name))}),F("div",{className:"flex justify-between flex-col md:flex-row md:gap-8",children:[u("div",{className:"p-4 justify-center grid md:justify-start",children:u("img",{title:"UMSU Affiliated",src:aK,className:" max-h-20"})}),t.map(n=>F("div",{className:"flex flex-col mb-8 p-2 text-center md:text-left md:w-1/3",children:[u("h3",{className:"font-bold mb-3",children:n.title}),u("ul",{children:n.links.map(r=>u("li",{className:" mb-1",children:u(ii,{className:"hover:underline",link:r.link,children:r.name},r.name)},r.name))})]},n.title))]})]})});const cK=["/example"],uK=["/example"],dK=()=>{const t=po(),[e,n]=x.useState(!0),[r,i]=x.useState(!0);x.useEffect(()=>{console.log("useEffect!");const f=window.location.pathname;console.log(f);const p=cK.some(w=>f.includes(w)),g=uK.some(w=>f.includes(w));n(!p),i(!g)},[t]);const c={clubname:"HackMelbourne",logo:"/img/HM_White_Transparent.png",pages:["About","Blog","Calendar","Links"],links:["/about/meettheteam","/blogs","/upcoming/calendar","upcoming/links"],pills:[[{title:"Events",desc:"Our flagship Events!",Icon:uV,image:"/img/temp-bg.jpg",link:"/about/events"},{title:"About Us",desc:"Learn more about us!",Icon:pV,image:"/img/temp-bg.jpg",link:"/about/meettheteam"}],[],[],[]]},h={links:[{title:"Organisation",links:[{name:"UMSU",link:I1},{name:"Contact Us",link:"mailto:${SECRETARY_EMAIL}"}]},{title:"Legal",links:[{name:"Privacy Policy",link:"/privacy"},{name:"Terms and Conditions",link:"/terms"}]},{title:"Resources",links:[{name:"GitHub",link:bV},{name:"Major Events",link:"about/events"}]}],icons:[{name:"Facebook",icon:E1,link:yV},{name:"Instagram",icon:S1,link:wV},{name:"Discord",icon:lP,link:gV},{name:"LinkedIn",icon:C1,link:vV},{name:"Email",icon:uP,link:`mailto:${mV}`}]};return F(Zt,{children:[e?u(sK,{clubname:c.clubname,logo:c.logo,pages:c.pages,links:c.links,pills:c.pills}):null,F("div",{className:"pt-[100px] w-screen max-w-full overflow-x-clip",children:[u(NL,{}),r?u(lK,{links:h.links,icons:h.icons}):null,F("ul",{className:"w-screen max-w-full bg-circles -z-10 overflow-x-clip",children:[u("li",{className:"w-[600px] h-[600px] md:w-[800px] md:h-[800px]"}),u("li",{className:"md:w-[700px] md:h-[700px] hidden md:block"}),u("li",{className:"w-[700px] h-[700px] md:w-[900px] md:h-[900px]"})]})]}),u("div",{className:"w-screen max-w-full h-screen fixed top-0 bg-neutral-950 -z-20"})]})};const oi=({text:t,color:e,style:n,span:r,link:i})=>{n==null&&(n="border"),i==""&&(n="disabled");const o={filled:{primary:["bg-yellow-500"],secondary:["bg-blue-500"],alert:["bg-red-500 "],success:["bg-green-500"],neutral:["bg-neutral-500"]},border:{primary:["bg-yellow-600/20 border-yellow-500 border"],secondary:["bg-blue-600/20 border-blue-500 border"],alert:["bg-red-600/20 border-red-500 border"],success:["bg-green-600/20 border-green-500 border"],neutral:["bg-neutral-400/30 border-neutral-300 border"]},underline:{primary:["text-yellow-500 underline"],secondary:["text-blue-500 underline"],alert:["text-red-500 underline"],success:["text-green-500 underline"],neutral:["text-neutral-300 underline"]}};return n=="disabled"?u("div",{className:`flex justify-center px-6 py-3 rounded-md bg-neutral-400/30 border-neutral-400 border text-neutral-400 ${r?"w-full":"w-fit"} font-medium`,children:t}):u(ii,{link:i,children:u(rt.div,{whileHover:{scale:1.05},whileTap:{scale:.95},className:`flex justify-center px-6 py-3 rounded-md ${o[n][e]} ${r?"w-full":"w-fit"} font-medium`,children:t})})},hK=({clubname:t,year:e,buttons:n})=>F("div",{className:"max-w-[1100px] grid grid-cols-1 m-auto items-center",children:[F("div",{className:"z-10 col-start-1 row-start-1 flex flex-col items-center",children:[F(rt.div,{initial:{opacity:0,letterSpacing:"20rem",textIndent:"20rem"},whileInView:{opacity:1,letterSpacing:"0px",textIndent:"0px"},transition:{delay:.4,duration:.8,ease:"anticipate",type:"tween"},viewport:{once:!0},className:"text-center font-black text-7xl md:text-9xl",children:[u("div",{children:t[0]}),u("div",{children:t[1]}),u("div",{children:e})]}),u(rt.div,{initial:{opacity:0,y:40},animate:{opacity:1,y:0},transition:{delay:1},className:"flex pt-4 gap-4 md:gap-8 z-50",children:n.map((r,i)=>u(oi,{text:r.name,color:i==0?"primary":"neutral",style:"border",link:r.link},i))})]}),F(rt.div,{initial:{opacity:0,letterSpacing:"20rem",textIndent:"20rem"},whileInView:{opacity:1,letterSpacing:"0px",textIndent:"0px"},transition:{duration:1.2,ease:"anticipate",type:"tween"},viewport:{once:!0},className:"col-start-1 row-start-1 text-center font-black text-9xl md:text-[15rem] text-outline text-transparent select-none truncate",children:[u("div",{children:t[0]}),u("div",{children:t[1]}),u("div",{children:e})]})]});function fK({events:t}){const e={hidden:{},show:{transition:{staggerChildren:.2}}},n={hidden:r=>({opacity:0,x:r*30}),show:{opacity:1,x:-0,transition:{duration:.4}}};return t.length!==3?(console.error("DescriptionBoxes component expects exactly three events."),null):F("div",{className:"mt-8 flex flex-col gap-3 lg:gap-0 h-[175vh] lg:min-h-[100vh] lg:h-[100vh] max-w-[1100px] lg:justify-between w-[80%] m-auto",children:[F("div",{className:"flex flex-col h-[30%] justify-center lg:flex-row lg:justify-between lg:self-start lg:gap-16",children:[u("img",{src:t[0].image,alt:t[0].altImage,className:"object-cover border border-gray-200 h-1/3 lg:w-1/2 lg:h-full rounded-sm"}),F(rt.div,{className:"min-h-1/4 lg:h-full lg:w-1/2 flex flex-col lg:gap-4 lg:justify-center justify-between align-center",variants:e,viewport:{amount:"all",once:!0},initial:"hidden",whileInView:"show",children:[u(rt.div,{className:"text-xl lg:text-3xl font-bold text-yellow-600",variants:n,custom:-1,children:F("span",{className:"",children:[" ",t[0].title]})}),u(rt.div,{className:"text-sm",variants:n,custom:-1,children:t[0].description})]})]}),F("div",{className:"flex flex-col h-[30%] justify-center lg:h-[20%] lg:flex-row lg:justify-between lg:w-4/5 lg:self-end lg:gap-16",children:[F(rt.div,{className:"order-2 lg:order-1 min-h-3/4 lg:h-full lg:w-1/2 flex flex-col lg:gap-4 lg:justify-center justify-between align-center",variants:e,viewport:{amount:"all",once:!0},initial:"hidden",whileInView:"show",children:[u(rt.div,{className:"text-xl lg:text-3xl font-bold text-yellow-600",variants:n,custom:1,children:u("span",{className:"",children:t[1].title})}),u(rt.div,{className:"text-sm",variants:n,custom:1,children:t[1].description})]}),u("img",{src:t[1].image,alt:t[1].altImage,className:"object-cover order-1 lg:order-2 border h-1/3 lg:w-1/2 lg:h-full rounded-sm"})]}),F("div",{className:"flex flex-col h-[30%] justify-center lg:flex-row lg:justify-between lg:w-4/5 lg:self-start lg:gap-16",children:[u("img",{src:t[2].image,alt:t[2].altImage,className:"object-cover border h-1/3 lg:w-1/2 lg:h-full rounded-sm"}),F(rt.div,{className:"min-h-3/4 lg:h-full lg:w-3/4 flex flex-col lg:gap-4 lg:justify-center justify-between align-center",variants:e,viewport:{amount:"all",once:!0},initial:"hidden",whileInView:"show",children:[u(rt.div,{className:"text-xl lg:text-3xl font-bold text-yellow-600",variants:n,custom:-1,children:F("span",{className:"",children:[" ",t[2].title]})}),u(rt.div,{className:"text-sm",variants:n,custom:-1,children:t[2].description})]})]})]})}const nA=({title:t,desc:e,button:n,link:r})=>{const i={hidden:{},show:{transition:{staggerChildren:.2}}},o={hidden:{opacity:0,y:30},show:{opacity:1,y:0,transition:{duration:.4}}};return F(rt.div,{className:"join-team-gradient-border md:border-[1px] md:border-transparent flex flex-col min-h-[40vh] rounded-[20px] md:min-h-[60vh] max-w-[1100px] w-[100%] md:w-[80%] m-auto mt-40 items-center justify-center gap-3 md:gap-6",variants:i,viewport:{amount:.8,once:!0},initial:"hidden",whileInView:"show",children:[F(rt.div,{className:"text-center text-2xl md:text-5xl font-bold text-white max-w-2xl px-2",variants:o,children:[t[0]," ",u("span",{className:"text-yellow-600",children:t[1]}),t[2]]}),F(rt.div,{className:"text-sm text-center px-2",variants:o,children:[e[0],u("br",{}),e[1]]}),u(rt.div,{variants:o,children:u(oi,{text:n,color:"primary",style:"border",link:r})})]})},rA="/assets/DecodED-bb6ec868.jpg",iA="/assets/Hackiethon2-b615fc17.jpg",oA="/assets/MelbourneHack-37d09368.jpg";function pK(){const t={clubname:["HACK","MELB"],year:"2026",button:[{name:"Become a member",link:I1}]},e=[{title:"DecodED",description:"A workshop style education program tailored towards those with limited experience in software development. Aswell as Hackiethon taking place right after the conclusion of DecodED to allow attendees to apply their new knowledge!",image:rA,altImage:"Students learning at DecodED hosted by HackMelbourne"},{title:"Hackiethon",description:`Our rookie hackathon is tailor-made for inexperienced but eager individuals! Unlike our main hackathon, it comes with valuable insights into the experience of competing and finding success in such events.`,image:iA,altImage:"Students competing at Hackiethon by HackMelbourne."},{title:"Melbourne Hack",description:"Our main competition, brings together students from across the state for a weekend of intense hacking. Scheduled for Semester 2, this annual event provides the opportunity to collaborate with talented peers, connect with industry-leading companies, develop strong technical skills, and win amazing prizes!",image:oA,altImage:"Students competing at DecodED hosted by HackMelbourne"}],n={title:["Join the ","Hack","Melbourne team for 2026"],desc:["We make an impact on our future and learn some","more skills along the way!"],button:"Applications open until March 27th!",link:"https://docs.google.com/forms/d/e/1FAIpQLSfdjr-baFQDqfq7meThWdZ2PKPj1g58u8ai55twIBCcDmKCLg/viewform"};return F("div",{className:"w-screen max-w-full pt-28",children:[u(hK,{clubname:t.clubname,year:t.year,buttons:t.button}),u(fK,{events:e}),u(nA,{title:n.title,desc:n.desc,button:n.button,link:n.link})]})}const ci=({pageTitle:t,pageDescription:e})=>(x.useRef(null),F("div",{className:"hero-container",children:[F("div",{className:"hero-bigtext",children:[u(rt.div,{className:"hero-background",initial:{opacity:0},whileInView:{opacity:1},transition:{delay:.4,duration:.8,ease:"anticipate",type:"tween"},viewport:{once:!0},children:t}),u(rt.div,{className:"hero-title",initial:{opacity:0,letterSpacing:"20rem",textIndent:"20rem"},whileInView:{opacity:1,letterSpacing:"0px",textIndent:"0px"},transition:{duration:1.2,ease:"anticipate",type:"tween"},viewport:{once:!0},children:u("h1",{children:t})})]}),u(rt.div,{className:"hero-description",initial:{opacity:0,y:-40},animate:{opacity:1,y:0},transition:{delay:1},children:u("p",{children:e})})]})),mK=()=>u(Zt,{children:u(ci,{pageTitle:"Our Mission",pageDescription:"Page coming soon!"})});const gK=({name:t,date:e,brief:n,description:r,bgImage:i,frontImage:o,link:s,altBgImage:a,altFrontImage:l})=>{let c;return s?c="Sign up":c="Upcoming!",F("div",{className:"rounded-[10px] mx-auto w-4/5 max-w-[800px] my-20 min-h-[200px]",children:[u("h2",{className:"text-4xl font-bold mb-2 md:hidden block text-center",children:t}),u("div",{role:"img","aria-label":a,className:"md:ml-0 ml-6 h-[30vw] bg-cover bg-center rounded-[10px]",style:{backgroundImage:`url(${i})`}}),F("div",{className:"flex",children:[u("div",{className:"w-[60%] md:w-[40%] md:p-4",children:u("img",{className:"h-[120%] relative -top-[20%] rounded-[10px] object-cover w-full",src:o,alt:l})}),F(rt.div,{className:"md:p-4 p-2 pr-0 flex flex-col justify-between w-[40%] md:w-[60%] ",viewport:{amount:"all",once:!0},initial:{opacity:0,x:20},whileInView:{opacity:1,x:0},children:[F("div",{children:[u("h2",{className:"text-4xl font-bold mb-2 hidden md:block",children:t}),F("div",{className:"flex flex-col md:flex-row gap-2 mb-2 md:text-xs sm:text-xl text-base",children:[u("p",{className:"font-bold",children:e}),u("p",{className:"text-neutral-400",children:n})]}),u("p",{className:"text-sm overflow-y-hidden min-h-[40%] mb-2 hidden md:block",children:r})]}),u("div",{className:"hidden md:block",children:u(oi,{text:c,color:"primary",link:s})})]})]}),F(rt.div,{className:"p-4 flex flex-col items-center justify-between w-[100%]",viewport:{amount:"all",once:!0},initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},children:[u("p",{className:"md:hidden block text-sm overflow-y-hidden min-h-[40%] mb-2",children:r}),u("div",{className:" md:hidden",children:u(oi,{text:c,color:"primary",link:s})})]})]})},yK="/assets/DecodED2-fee6cdd1.jpg",vK="/assets/Hackiethon-202af0b7.jpg",wK="/assets/MelbourneHack2-81667834.jpg",bK=()=>{const t={title:"Events",description:`Throughout the year, HackMelbourne offers many opportunities for both complete beginners and seasoned veterans to display their teamwork, coding and leadership skills.`},e=[{name:"DecodED",date:"21/03",brief:"Free entry, educational",description:"We’re passionate about providing accessible tech education to students from all backgrounds and experiences. Our workshop style education program is tailored towards those with limited experience in software development and includes content that complements traditional Computer Science education taught at universities. With Hackiethon taking place right after the conclusion of the program, attendees will have the chance to put their new-found skills to the test! ",bgImage:rA,frontImage:yK,altBgImage:"Students in a classroom taking part of the DecodED workshop.",altFrontImage:"Classroom with supplies table in front with several students attending DecodED workshop in the background.",link:"https://events.humanitix.com/decoded-2026"},{name:"Hackiethon",date:"27/03 - 02/04",brief:"Free entry, beginner friendly",description:"Our rookie hackathon is tailor-made for inexperienced but eager individuals! Unlike our main hackathon, it comes with valuable insights into the experience of competing and finding success in such events.",bgImage:iA,frontImage:vK,altBgImage:"HackMelbourne committee members in a lecture hall setting up hackathon competition.",altFrontImage:"Students in a lecture hall viewing hackathon competition being presented.",link:"https://events.humanitix.com/hackiethon-2026"},{name:"Melbourne Hack",date:"TBA",brief:"Free entry, great competition",description:"Melbourne Hack is a hackathon where participants use their entrepreneurial skills to build a product in 3 days. Given certain themes, participants will have to build something that solves a problem or meets a need. Then they will be able to pitch their product to a panel of judges!",bgImage:oA,frontImage:wK,altBgImage:"Students sitting in a lecture hall discussing amongst themselves.",altFrontImage:"Classroom with a teacher in the middle and several students coding.",link:""}],n=x.useRef(null),{scrollYProgress:r}=Zp({target:n,offset:["start start","end start"]}),i=Ur(r,[0,1],["0%","80%"]),o=Ur(r,[0,.8],["100%","0%"]),s=Ur(r,[0,.8],["1","0.9"]);return F("div",{className:"w-screen max-w-full",children:[u(rt.section,{ref:n,style:{y:i,opacity:o,scale:s},children:u(ci,{pageTitle:t.title,pageDescription:t.description})}),u("section",{className:"z-10 relative",children:e.map((a,l)=>u(gK,{...a},l))})]})},_K="/assets/profile-d7f256f8.jpg",xK=({teamName:t,description:e,bgColor:n,borderColor:r,members:i})=>{const[o,s]=x.useState(!1);return F("div",{className:"mx-auto max-w-[800px] w-[80%] my-20 min-h-[200px] align-center justify-center m-20",children:[F("h2",{className:"text-4xl font-bold mb-2 text-center",children:["Meet the ",t]}),u("p",{className:"text-center mb-4 max-w-md mx-auto",children:e}),u("div",{className:"grid grid-cols-1 md:grid-cols-2 md:flex flex-wrap justify-center gap-4",children:i.map((a,l)=>F("div",{className:"flex flex-col items-center p-4 border rounded-lg text-center min-h-[350px]",style:{backgroundColor:n,borderColor:r,flex:"0 0 calc(30% - 20px)"},children:[u("img",{className:"top-0 left-0 w-32 h-32 rounded-[100rem] m-4 object-cover",src:o?a.imageUrl:_K,onLoad:()=>s(!0),alt:`Profile image of ${a.name}`}),u("p",{className:"text-sm",children:a.role}),u("h3",{className:"text-xl-lg md:text-sm font-semibold m-1",children:a.name}),u("p",{className:"text-sm mb-auto m-2",children:a.about}),u("div",{className:"flex space-x-2 mt-2",children:a.links.map((c,h)=>u("a",{href:c.url,target:"_blank",rel:"noopener noreferrer",className:"icon p-3 text-neutral-100 hover:underline",children:u(c.icon,{className:"h-8 w-8"})},h))})]},l))})]})};/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *//** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const sA=function(t){const e=[];let n=0;for(let r=0;r>6|192,e[n++]=i&63|128):(i&64512)===55296&&r+1>18|240,e[n++]=i>>12&63|128,e[n++]=i>>6&63|128,e[n++]=i&63|128):(e[n++]=i>>12|224,e[n++]=i>>6&63|128,e[n++]=i&63|128)}return e},kK=function(t){const e=[];let n=0,r=0;for(;n191&&i<224){const o=t[n++];e[r++]=String.fromCharCode((i&31)<<6|o&63)}else if(i>239&&i<365){const o=t[n++],s=t[n++],a=t[n++],l=((i&7)<<18|(o&63)<<12|(s&63)<<6|a&63)-65536;e[r++]=String.fromCharCode(55296+(l>>10)),e[r++]=String.fromCharCode(56320+(l&1023))}else{const o=t[n++],s=t[n++];e[r++]=String.fromCharCode((i&15)<<12|(o&63)<<6|s&63)}}return e.join("")},aA={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let i=0;i>2,f=(o&3)<<4|a>>4;let p=(a&15)<<2|c>>6,g=c&63;l||(g=64,s||(p=64)),r.push(n[h],n[f],n[p],n[g])}return r.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(sA(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):kK(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();const n=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let i=0;i>4;if(r.push(p),c!==64){const g=a<<4&240|c>>2;if(r.push(g),f!==64){const w=c<<6&192|f;r.push(w)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let t=0;t=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}};class TK extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const EK=function(t){const e=sA(t);return aA.encodeByteArray(e,!0)},rp=function(t){return EK(t).replace(/\./g,"")},lA=function(t){try{return aA.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};/** * @license * Copyright 2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function SK(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}/** * @license * Copyright 2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const CK=()=>SK().__FIREBASE_DEFAULTS__,IK=()=>{if(typeof process>"u"||typeof process.env>"u")return;const t={}.__FIREBASE_DEFAULTS__;if(t)return JSON.parse(t)},PK=()=>{if(typeof document>"u")return;let t;try{t=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const e=t&&lA(t[1]);return e&&JSON.parse(e)},jm=()=>{try{return CK()||IK()||PK()}catch(t){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${t}`);return}},cA=t=>{var e,n;return(n=(e=jm())===null||e===void 0?void 0:e.emulatorHosts)===null||n===void 0?void 0:n[t]},uA=t=>{const e=cA(t);if(!e)return;const n=e.lastIndexOf(":");if(n<=0||n+1===e.length)throw new Error(`Invalid host ${e} with no separate hostname and port!`);const r=parseInt(e.substring(n+1),10);return e[0]==="["?[e.substring(1,n-1),r]:[e.substring(0,n),r]},dA=()=>{var t;return(t=jm())===null||t===void 0?void 0:t.config},hA=t=>{var e;return(e=jm())===null||e===void 0?void 0:e[`_${t}`]};/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class RK{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,n)=>{this.resolve=e,this.reject=n})}wrapCallback(e){return(n,r)=>{n?this.reject(n):this.resolve(r),typeof e=="function"&&(this.promise.catch(()=>{}),e.length===1?e(n):e(n,r))}}}/** * @license * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function AK(t,e){if(t.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const n={alg:"none",type:"JWT"},r=e||"demo-project",i=t.iat||0,o=t.sub||t.user_id;if(!o)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const s=Object.assign({iss:`https://securetoken.google.com/${r}`,aud:r,iat:i,exp:i+3600,auth_time:i,sub:o,user_id:o,firebase:{sign_in_provider:"custom",identities:{}}},t),a="";return[rp(JSON.stringify(n)),rp(JSON.stringify(s)),a].join(".")}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function Ln(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function NK(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(Ln())}function MK(){var t;const e=(t=jm())===null||t===void 0?void 0:t.forceEnvironment;if(e==="node")return!0;if(e==="browser")return!1;try{return Object.prototype.toString.call(global.process)==="[object process]"}catch{return!1}}function DK(){return typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers"}function OK(){const t=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof t=="object"&&t.id!==void 0}function LK(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function VK(){const t=Ln();return t.indexOf("MSIE ")>=0||t.indexOf("Trident/")>=0}function FK(){return!MK()&&!!navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function $K(){try{return typeof indexedDB=="object"}catch{return!1}}function BK(){return new Promise((t,e)=>{try{let n=!0;const r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),n||self.indexedDB.deleteDatabase(r),t(!0)},i.onupgradeneeded=()=>{n=!1},i.onerror=()=>{var o;e(((o=i.error)===null||o===void 0?void 0:o.message)||"")}}catch(n){e(n)}})}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const UK="FirebaseError";class Ai extends Error{constructor(e,n,r){super(n),this.code=e,this.customData=r,this.name=UK,Object.setPrototypeOf(this,Ai.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,Td.prototype.create)}}class Td{constructor(e,n,r){this.service=e,this.serviceName=n,this.errors=r}create(e,...n){const r=n[0]||{},i=`${this.service}/${e}`,o=this.errors[e],s=o?zK(o,r):"Error",a=`${this.serviceName}: ${s} (${i}).`;return new Ai(i,a,r)}}function zK(t,e){return t.replace(jK,(n,r)=>{const i=e[r];return i!=null?String(i):`<${r}?>`})}const jK=/\{\$([^}]+)}/g;function WK(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}function ip(t,e){if(t===e)return!0;const n=Object.keys(t),r=Object.keys(e);for(const i of n){if(!r.includes(i))return!1;const o=t[i],s=e[i];if(lE(o)&&lE(s)){if(!ip(o,s))return!1}else if(o!==s)return!1}for(const i of r)if(!n.includes(i))return!1;return!0}function lE(t){return t!==null&&typeof t=="object"}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function Ed(t){const e=[];for(const[n,r]of Object.entries(t))Array.isArray(r)?r.forEach(i=>{e.push(encodeURIComponent(n)+"="+encodeURIComponent(i))}):e.push(encodeURIComponent(n)+"="+encodeURIComponent(r));return e.length?"&"+e.join("&"):""}function HK(t,e){const n=new GK(t,e);return n.subscribe.bind(n)}class GK{constructor(e,n){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=n,this.task.then(()=>{e(this)}).catch(r=>{this.error(r)})}next(e){this.forEachObserver(n=>{n.next(e)})}error(e){this.forEachObserver(n=>{n.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,n,r){let i;if(e===void 0&&n===void 0&&r===void 0)throw new Error("Missing Observer.");qK(e,["next","error","complete"])?i=e:i={next:e,error:n,complete:r},i.next===void 0&&(i.next=vy),i.error===void 0&&(i.error=vy),i.complete===void 0&&(i.complete=vy);const o=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?i.error(this.finalError):i.complete()}catch{}}),this.observers.push(i),o}unsubscribeOne(e){this.observers===void 0||this.observers[e]===void 0||(delete this.observers[e],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let n=0;n{if(this.observers!==void 0&&this.observers[e]!==void 0)try{n(this.observers[e])}catch(r){typeof console<"u"&&console.error&&console.error(r)}})}close(e){this.finalized||(this.finalized=!0,e!==void 0&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function qK(t,e){if(typeof t!="object"||t===null)return!1;for(const n of e)if(n in t&&typeof t[n]=="function")return!0;return!1}function vy(){}/** * @license * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function Wn(t){return t&&t._delegate?t._delegate:t}class cs{constructor(e,n,r){this.name=e,this.instanceFactory=n,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const Ls="[DEFAULT]";/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class KK{constructor(e,n){this.name=e,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const n=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(n)){const r=new RK;if(this.instancesDeferred.set(n,r),this.isInitialized(n)||this.shouldAutoInitialize())try{const i=this.getOrInitializeService({instanceIdentifier:n});i&&r.resolve(i)}catch{}}return this.instancesDeferred.get(n).promise}getImmediate(e){var n;const r=this.normalizeInstanceIdentifier(e==null?void 0:e.identifier),i=(n=e==null?void 0:e.optional)!==null&&n!==void 0?n:!1;if(this.isInitialized(r)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:r})}catch(o){if(i)return null;throw o}else{if(i)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,!!this.shouldAutoInitialize()){if(QK(e))try{this.getOrInitializeService({instanceIdentifier:Ls})}catch{}for(const[n,r]of this.instancesDeferred.entries()){const i=this.normalizeInstanceIdentifier(n);try{const o=this.getOrInitializeService({instanceIdentifier:i});r.resolve(o)}catch{}}}}clearInstance(e=Ls){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter(n=>"INTERNAL"in n).map(n=>n.INTERNAL.delete()),...e.filter(n=>"_delete"in n).map(n=>n._delete())])}isComponentSet(){return this.component!=null}isInitialized(e=Ls){return this.instances.has(e)}getOptions(e=Ls){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:n={}}=e,r=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const i=this.getOrInitializeService({instanceIdentifier:r,options:n});for(const[o,s]of this.instancesDeferred.entries()){const a=this.normalizeInstanceIdentifier(o);r===a&&s.resolve(i)}return i}onInit(e,n){var r;const i=this.normalizeInstanceIdentifier(n),o=(r=this.onInitCallbacks.get(i))!==null&&r!==void 0?r:new Set;o.add(e),this.onInitCallbacks.set(i,o);const s=this.instances.get(i);return s&&e(s,i),()=>{o.delete(e)}}invokeOnInitCallbacks(e,n){const r=this.onInitCallbacks.get(n);if(r)for(const i of r)try{i(e,n)}catch{}}getOrInitializeService({instanceIdentifier:e,options:n={}}){let r=this.instances.get(e);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:YK(e),options:n}),this.instances.set(e,r),this.instancesOptions.set(e,n),this.invokeOnInitCallbacks(r,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,r)}catch{}return r||null}normalizeInstanceIdentifier(e=Ls){return this.component?this.component.multipleInstances?e:Ls:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function YK(t){return t===Ls?void 0:t}function QK(t){return t.instantiationMode==="EAGER"}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class XK{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const n=this.getProvider(e.name);if(n.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);n.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const n=new KK(e,this);return this.providers.set(e,n),n}getProviders(){return Array.from(this.providers.values())}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */var qe;(function(t){t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT"})(qe||(qe={}));const JK={debug:qe.DEBUG,verbose:qe.VERBOSE,info:qe.INFO,warn:qe.WARN,error:qe.ERROR,silent:qe.SILENT},ZK=qe.INFO,eY={[qe.DEBUG]:"log",[qe.VERBOSE]:"log",[qe.INFO]:"info",[qe.WARN]:"warn",[qe.ERROR]:"error"},tY=(t,e,...n)=>{if(ee.some(n=>t instanceof n);let cE,uE;function rY(){return cE||(cE=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function iY(){return uE||(uE=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const fA=new WeakMap,n0=new WeakMap,pA=new WeakMap,wy=new WeakMap,Dw=new WeakMap;function oY(t){const e=new Promise((n,r)=>{const i=()=>{t.removeEventListener("success",o),t.removeEventListener("error",s)},o=()=>{n(ts(t.result)),i()},s=()=>{r(t.error),i()};t.addEventListener("success",o),t.addEventListener("error",s)});return e.then(n=>{n instanceof IDBCursor&&fA.set(n,t)}).catch(()=>{}),Dw.set(e,t),e}function sY(t){if(n0.has(t))return;const e=new Promise((n,r)=>{const i=()=>{t.removeEventListener("complete",o),t.removeEventListener("error",s),t.removeEventListener("abort",s)},o=()=>{n(),i()},s=()=>{r(t.error||new DOMException("AbortError","AbortError")),i()};t.addEventListener("complete",o),t.addEventListener("error",s),t.addEventListener("abort",s)});n0.set(t,e)}let r0={get(t,e,n){if(t instanceof IDBTransaction){if(e==="done")return n0.get(t);if(e==="objectStoreNames")return t.objectStoreNames||pA.get(t);if(e==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return ts(t[e])},set(t,e,n){return t[e]=n,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function aY(t){r0=t(r0)}function lY(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...n){const r=t.call(by(this),e,...n);return pA.set(r,e.sort?e.sort():[e]),ts(r)}:iY().includes(t)?function(...e){return t.apply(by(this),e),ts(fA.get(this))}:function(...e){return ts(t.apply(by(this),e))}}function cY(t){return typeof t=="function"?lY(t):(t instanceof IDBTransaction&&sY(t),nY(t,rY())?new Proxy(t,r0):t)}function ts(t){if(t instanceof IDBRequest)return oY(t);if(wy.has(t))return wy.get(t);const e=cY(t);return e!==t&&(wy.set(t,e),Dw.set(e,t)),e}const by=t=>Dw.get(t);function uY(t,e,{blocked:n,upgrade:r,blocking:i,terminated:o}={}){const s=indexedDB.open(t,e),a=ts(s);return r&&s.addEventListener("upgradeneeded",l=>{r(ts(s.result),l.oldVersion,l.newVersion,ts(s.transaction),l)}),n&&s.addEventListener("blocked",l=>n(l.oldVersion,l.newVersion,l)),a.then(l=>{o&&l.addEventListener("close",()=>o()),i&&l.addEventListener("versionchange",c=>i(c.oldVersion,c.newVersion,c))}).catch(()=>{}),a}const dY=["get","getKey","getAll","getAllKeys","count"],hY=["put","add","delete","clear"],_y=new Map;function dE(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(_y.get(e))return _y.get(e);const n=e.replace(/FromIndex$/,""),r=e!==n,i=hY.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||dY.includes(n)))return;const o=async function(s,...a){const l=this.transaction(s,i?"readwrite":"readonly");let c=l.store;return r&&(c=c.index(a.shift())),(await Promise.all([c[n](...a),i&&l.done]))[0]};return _y.set(e,o),o}aY(t=>({...t,get:(e,n,r)=>dE(e,n)||t.get(e,n,r),has:(e,n)=>!!dE(e,n)||t.has(e,n)}));/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class fY{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(n=>{if(pY(n)){const r=n.getImmediate();return`${r.library}/${r.version}`}else return null}).filter(n=>n).join(" ")}}function pY(t){const e=t.getComponent();return(e==null?void 0:e.type)==="VERSION"}const i0="@firebase/app",hE="0.10.13";/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const oo=new Mw("@firebase/app"),mY="@firebase/app-compat",gY="@firebase/analytics-compat",yY="@firebase/analytics",vY="@firebase/app-check-compat",wY="@firebase/app-check",bY="@firebase/auth",_Y="@firebase/auth-compat",xY="@firebase/database",kY="@firebase/data-connect",TY="@firebase/database-compat",EY="@firebase/functions",SY="@firebase/functions-compat",CY="@firebase/installations",IY="@firebase/installations-compat",PY="@firebase/messaging",RY="@firebase/messaging-compat",AY="@firebase/performance",NY="@firebase/performance-compat",MY="@firebase/remote-config",DY="@firebase/remote-config-compat",OY="@firebase/storage",LY="@firebase/storage-compat",VY="@firebase/firestore",FY="@firebase/vertexai-preview",$Y="@firebase/firestore-compat",BY="firebase",UY="10.14.1";/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const o0="[DEFAULT]",zY={[i0]:"fire-core",[mY]:"fire-core-compat",[yY]:"fire-analytics",[gY]:"fire-analytics-compat",[wY]:"fire-app-check",[vY]:"fire-app-check-compat",[bY]:"fire-auth",[_Y]:"fire-auth-compat",[xY]:"fire-rtdb",[kY]:"fire-data-connect",[TY]:"fire-rtdb-compat",[EY]:"fire-fn",[SY]:"fire-fn-compat",[CY]:"fire-iid",[IY]:"fire-iid-compat",[PY]:"fire-fcm",[RY]:"fire-fcm-compat",[AY]:"fire-perf",[NY]:"fire-perf-compat",[MY]:"fire-rc",[DY]:"fire-rc-compat",[OY]:"fire-gcs",[LY]:"fire-gcs-compat",[VY]:"fire-fst",[$Y]:"fire-fst-compat",[FY]:"fire-vertex","fire-js":"fire-js",[BY]:"fire-js-all"};/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const op=new Map,jY=new Map,s0=new Map;function fE(t,e){try{t.container.addComponent(e)}catch(n){oo.debug(`Component ${e.name} failed to register with FirebaseApp ${t.name}`,n)}}function oa(t){const e=t.name;if(s0.has(e))return oo.debug(`There were multiple attempts to register component ${e}.`),!1;s0.set(e,t);for(const n of op.values())fE(n,t);for(const n of jY.values())fE(n,t);return!0}function Wm(t,e){const n=t.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),t.container.getProvider(e)}function Hi(t){return t.settings!==void 0}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const WY={"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."},ns=new Td("app","Firebase",WY);/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class HY{constructor(e,n,r){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},n),this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new cs("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw ns.create("app-deleted",{appName:this._name})}}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const Ql=UY;function mA(t,e={}){let n=t;typeof e!="object"&&(e={name:e});const r=Object.assign({name:o0,automaticDataCollectionEnabled:!1},e),i=r.name;if(typeof i!="string"||!i)throw ns.create("bad-app-name",{appName:String(i)});if(n||(n=dA()),!n)throw ns.create("no-options");const o=op.get(i);if(o){if(ip(n,o.options)&&ip(r,o.config))return o;throw ns.create("duplicate-app",{appName:i})}const s=new XK(i);for(const l of s0.values())s.addComponent(l);const a=new HY(n,r,s);return op.set(i,a),a}function Ow(t=o0){const e=op.get(t);if(!e&&t===o0&&dA())return mA();if(!e)throw ns.create("no-app",{appName:t});return e}function ki(t,e,n){var r;let i=(r=zY[t])!==null&&r!==void 0?r:t;n&&(i+=`-${n}`);const o=i.match(/\s|\//),s=e.match(/\s|\//);if(o||s){const a=[`Unable to register library "${i}" with version "${e}":`];o&&a.push(`library name "${i}" contains illegal characters (whitespace or "/")`),o&&s&&a.push("and"),s&&a.push(`version name "${e}" contains illegal characters (whitespace or "/")`),oo.warn(a.join(" "));return}oa(new cs(`${i}-version`,()=>({library:i,version:e}),"VERSION"))}/** * @license * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const GY="firebase-heartbeat-database",qY=1,Ku="firebase-heartbeat-store";let xy=null;function gA(){return xy||(xy=uY(GY,qY,{upgrade:(t,e)=>{switch(e){case 0:try{t.createObjectStore(Ku)}catch(n){console.warn(n)}}}}).catch(t=>{throw ns.create("idb-open",{originalErrorMessage:t.message})})),xy}async function KY(t){try{const n=(await gA()).transaction(Ku),r=await n.objectStore(Ku).get(yA(t));return await n.done,r}catch(e){if(e instanceof Ai)oo.warn(e.message);else{const n=ns.create("idb-get",{originalErrorMessage:e==null?void 0:e.message});oo.warn(n.message)}}}async function pE(t,e){try{const r=(await gA()).transaction(Ku,"readwrite");await r.objectStore(Ku).put(e,yA(t)),await r.done}catch(n){if(n instanceof Ai)oo.warn(n.message);else{const r=ns.create("idb-set",{originalErrorMessage:n==null?void 0:n.message});oo.warn(r.message)}}}function yA(t){return`${t.name}!${t.options.appId}`}/** * @license * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const YY=1024,QY=30*24*60*60*1e3;class XY{constructor(e){this.container=e,this._heartbeatsCache=null;const n=this.container.getProvider("app").getImmediate();this._storage=new ZY(n),this._heartbeatsCachePromise=this._storage.read().then(r=>(this._heartbeatsCache=r,r))}async triggerHeartbeat(){var e,n;try{const i=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),o=mE();return((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,((n=this._heartbeatsCache)===null||n===void 0?void 0:n.heartbeats)==null)||this._heartbeatsCache.lastSentHeartbeatDate===o||this._heartbeatsCache.heartbeats.some(s=>s.date===o)?void 0:(this._heartbeatsCache.heartbeats.push({date:o,agent:i}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(s=>{const a=new Date(s.date).valueOf();return Date.now()-a<=QY}),this._storage.overwrite(this._heartbeatsCache))}catch(r){oo.warn(r)}}async getHeartbeatsHeader(){var e;try{if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";const n=mE(),{heartbeatsToSend:r,unsentEntries:i}=JY(this._heartbeatsCache.heartbeats),o=rp(JSON.stringify({version:2,heartbeats:r}));return this._heartbeatsCache.lastSentHeartbeatDate=n,i.length>0?(this._heartbeatsCache.heartbeats=i,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),o}catch(n){return oo.warn(n),""}}}function mE(){return new Date().toISOString().substring(0,10)}function JY(t,e=YY){const n=[];let r=t.slice();for(const i of t){const o=n.find(s=>s.agent===i.agent);if(o){if(o.dates.push(i.date),gE(n)>e){o.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),gE(n)>e){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}class ZY{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return $K()?BK().then(()=>!0).catch(()=>!1):!1}async read(){if(await this._canUseIndexedDBPromise){const n=await KY(this.app);return n!=null&&n.heartbeats?n:{heartbeats:[]}}else return{heartbeats:[]}}async overwrite(e){var n;if(await this._canUseIndexedDBPromise){const i=await this.read();return pE(this.app,{lastSentHeartbeatDate:(n=e.lastSentHeartbeatDate)!==null&&n!==void 0?n:i.lastSentHeartbeatDate,heartbeats:e.heartbeats})}else return}async add(e){var n;if(await this._canUseIndexedDBPromise){const i=await this.read();return pE(this.app,{lastSentHeartbeatDate:(n=e.lastSentHeartbeatDate)!==null&&n!==void 0?n:i.lastSentHeartbeatDate,heartbeats:[...i.heartbeats,...e.heartbeats]})}else return}}function gE(t){return rp(JSON.stringify({version:2,heartbeats:t})).length}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function eQ(t){oa(new cs("platform-logger",e=>new fY(e),"PRIVATE")),oa(new cs("heartbeat",e=>new XY(e),"PRIVATE")),ki(i0,hE,t),ki(i0,hE,"esm2017"),ki("fire-js","")}eQ("");var tQ="firebase",nQ="10.14.1";/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ki(tQ,nQ,"app");function Lw(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i"u")return null;const t=navigator;return t.languages&&t.languages[0]||t.language||null}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Sd{constructor(e,n){this.shortDelay=e,this.longDelay=n,ao(n>e,"Short delay should be less than long delay!"),this.isMobile=NK()||LK()}get(){return sQ()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function Fw(t,e){ao(t.emulator,"Emulator should always be set here");const{url:n}=t.emulator;return e?`${n}${e.startsWith("/")?e.slice(1):e}`:n}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class _A{static initialize(e,n,r){this.fetchImpl=e,n&&(this.headersImpl=n),r&&(this.responseImpl=r)}static fetch(){if(this.fetchImpl)return this.fetchImpl;if(typeof self<"u"&&"fetch"in self)return self.fetch;if(typeof globalThis<"u"&&globalThis.fetch)return globalThis.fetch;if(typeof fetch<"u")return fetch;Gi("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){if(this.headersImpl)return this.headersImpl;if(typeof self<"u"&&"Headers"in self)return self.Headers;if(typeof globalThis<"u"&&globalThis.Headers)return globalThis.Headers;if(typeof Headers<"u")return Headers;Gi("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){if(this.responseImpl)return this.responseImpl;if(typeof self<"u"&&"Response"in self)return self.Response;if(typeof globalThis<"u"&&globalThis.Response)return globalThis.Response;if(typeof Response<"u")return Response;Gi("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const lQ={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",INVALID_LOGIN_CREDENTIALS:"invalid-credential",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-recaptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"};/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const cQ=new Sd(3e4,6e4);function Hm(t,e){return t.tenantId&&!e.tenantId?Object.assign(Object.assign({},e),{tenantId:t.tenantId}):e}async function Xl(t,e,n,r,i={}){return xA(t,i,async()=>{let o={},s={};r&&(e==="GET"?s=r:o={body:JSON.stringify(r)});const a=Ed(Object.assign({key:t.config.apiKey},s)).slice(1),l=await t._getAdditionalHeaders();l["Content-Type"]="application/json",t.languageCode&&(l["X-Firebase-Locale"]=t.languageCode);const c=Object.assign({method:e,headers:l},o);return DK()||(c.referrerPolicy="no-referrer"),_A.fetch()(TA(t,t.config.apiHost,n,a),c)})}async function xA(t,e,n){t._canInitEmulator=!1;const r=Object.assign(Object.assign({},lQ),e);try{const i=new uQ(t),o=await Promise.race([n(),i.promise]);i.clearNetworkTimeout();const s=await o.json();if("needConfirmation"in s)throw kh(t,"account-exists-with-different-credential",s);if(o.ok&&!("errorMessage"in s))return s;{const a=o.ok?s.errorMessage:s.error.message,[l,c]=a.split(" : ");if(l==="FEDERATED_USER_ID_ALREADY_LINKED")throw kh(t,"credential-already-in-use",s);if(l==="EMAIL_EXISTS")throw kh(t,"email-already-in-use",s);if(l==="USER_DISABLED")throw kh(t,"user-disabled",s);const h=r[l]||l.toLowerCase().replace(/[_\s]+/g,"-");if(c)throw bA(t,h,c);so(t,h)}}catch(i){if(i instanceof Ai)throw i;so(t,"network-request-failed",{message:String(i)})}}async function kA(t,e,n,r,i={}){const o=await Xl(t,e,n,r,i);return"mfaPendingCredential"in o&&so(t,"multi-factor-auth-required",{_serverResponse:o}),o}function TA(t,e,n,r){const i=`${e}${n}?${r}`;return t.config.emulator?Fw(t.config,i):`${t.config.apiScheme}://${i}`}class uQ{constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((n,r)=>{this.timer=setTimeout(()=>r(Ti(this.auth,"network-request-failed")),cQ.get())})}clearNetworkTimeout(){clearTimeout(this.timer)}}function kh(t,e,n){const r={appName:t.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);const i=Ti(t,e,r);return i.customData._tokenResponse=n,i}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */async function dQ(t,e){return Xl(t,"POST","/v1/accounts:delete",e)}async function EA(t,e){return Xl(t,"POST","/v1/accounts:lookup",e)}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function fu(t){if(t)try{const e=new Date(Number(t));if(!isNaN(e.getTime()))return e.toUTCString()}catch{}}async function hQ(t,e=!1){const n=Wn(t),r=await n.getIdToken(e),i=$w(r);Ie(i&&i.exp&&i.auth_time&&i.iat,n.auth,"internal-error");const o=typeof i.firebase=="object"?i.firebase:void 0,s=o==null?void 0:o.sign_in_provider;return{claims:i,token:r,authTime:fu(ky(i.auth_time)),issuedAtTime:fu(ky(i.iat)),expirationTime:fu(ky(i.exp)),signInProvider:s||null,signInSecondFactor:(o==null?void 0:o.sign_in_second_factor)||null}}function ky(t){return Number(t)*1e3}function $w(t){const[e,n,r]=t.split(".");if(e===void 0||n===void 0||r===void 0)return Jh("JWT malformed, contained fewer than 3 sections"),null;try{const i=lA(n);return i?JSON.parse(i):(Jh("Failed to decode base64 JWT payload"),null)}catch(i){return Jh("Caught error parsing JWT payload as JSON",i==null?void 0:i.toString()),null}}function vE(t){const e=$w(t);return Ie(e,"internal-error"),Ie(typeof e.exp<"u","internal-error"),Ie(typeof e.iat<"u","internal-error"),Number(e.exp)-Number(e.iat)}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */async function Yu(t,e,n=!1){if(n)return e;try{return await e}catch(r){throw r instanceof Ai&&fQ(r)&&t.auth.currentUser===t&&await t.auth.signOut(),r}}function fQ({code:t}){return t==="auth/user-disabled"||t==="auth/user-token-expired"}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class pQ{constructor(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,this.timerId!==null&&clearTimeout(this.timerId))}getInterval(e){var n;if(e){const r=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),r}else{this.errorBackoff=3e4;const i=((n=this.user.stsTokenManager.expirationTime)!==null&&n!==void 0?n:0)-Date.now()-3e5;return Math.max(0,i)}}schedule(e=!1){if(!this.isRunning)return;const n=this.getInterval(e);this.timerId=setTimeout(async()=>{await this.iteration()},n)}async iteration(){try{await this.user.getIdToken(!0)}catch(e){(e==null?void 0:e.code)==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class l0{constructor(e,n){this.createdAt=e,this.lastLoginAt=n,this._initializeTime()}_initializeTime(){this.lastSignInTime=fu(this.lastLoginAt),this.creationTime=fu(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */async function ap(t){var e;const n=t.auth,r=await t.getIdToken(),i=await Yu(t,EA(n,{idToken:r}));Ie(i==null?void 0:i.users.length,n,"internal-error");const o=i.users[0];t._notifyReloadListener(o);const s=!((e=o.providerUserInfo)===null||e===void 0)&&e.length?SA(o.providerUserInfo):[],a=gQ(t.providerData,s),l=t.isAnonymous,c=!(t.email&&o.passwordHash)&&!(a!=null&&a.length),h=l?c:!1,f={uid:o.localId,displayName:o.displayName||null,photoURL:o.photoUrl||null,email:o.email||null,emailVerified:o.emailVerified||!1,phoneNumber:o.phoneNumber||null,tenantId:o.tenantId||null,providerData:a,metadata:new l0(o.createdAt,o.lastLoginAt),isAnonymous:h};Object.assign(t,f)}async function mQ(t){const e=Wn(t);await ap(e),await e.auth._persistUserIfCurrent(e),e.auth._notifyListenersIfCurrent(e)}function gQ(t,e){return[...t.filter(r=>!e.some(i=>i.providerId===r.providerId)),...e]}function SA(t){return t.map(e=>{var{providerId:n}=e,r=Lw(e,["providerId"]);return{providerId:n,uid:r.rawId||"",displayName:r.displayName||null,email:r.email||null,phoneNumber:r.phoneNumber||null,photoURL:r.photoUrl||null}})}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */async function yQ(t,e){const n=await xA(t,{},async()=>{const r=Ed({grant_type:"refresh_token",refresh_token:e}).slice(1),{tokenApiHost:i,apiKey:o}=t.config,s=TA(t,i,"/v1/token",`key=${o}`),a=await t._getAdditionalHeaders();return a["Content-Type"]="application/x-www-form-urlencoded",_A.fetch()(s,{method:"POST",headers:a,body:r})});return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}}async function vQ(t,e){return Xl(t,"POST","/v2/accounts:revokeToken",Hm(t,e))}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class cl{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){Ie(e.idToken,"internal-error"),Ie(typeof e.idToken<"u","internal-error"),Ie(typeof e.refreshToken<"u","internal-error");const n="expiresIn"in e&&typeof e.expiresIn<"u"?Number(e.expiresIn):vE(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,n)}updateFromIdToken(e){Ie(e.length!==0,"internal-error");const n=vE(e);this.updateTokensAndExpiration(e,null,n)}async getToken(e,n=!1){return!n&&this.accessToken&&!this.isExpired?this.accessToken:(Ie(this.refreshToken,e,"user-token-expired"),this.refreshToken?(await this.refresh(e,this.refreshToken),this.accessToken):null)}clearRefreshToken(){this.refreshToken=null}async refresh(e,n){const{accessToken:r,refreshToken:i,expiresIn:o}=await yQ(e,n);this.updateTokensAndExpiration(r,i,Number(o))}updateTokensAndExpiration(e,n,r){this.refreshToken=n||null,this.accessToken=e||null,this.expirationTime=Date.now()+r*1e3}static fromJSON(e,n){const{refreshToken:r,accessToken:i,expirationTime:o}=n,s=new cl;return r&&(Ie(typeof r=="string","internal-error",{appName:e}),s.refreshToken=r),i&&(Ie(typeof i=="string","internal-error",{appName:e}),s.accessToken=i),o&&(Ie(typeof o=="number","internal-error",{appName:e}),s.expirationTime=o),s}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new cl,this.toJSON())}_performRefresh(){return Gi("not implemented")}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function So(t,e){Ie(typeof t=="string"||typeof t>"u","internal-error",{appName:e})}class qi{constructor(e){var{uid:n,auth:r,stsTokenManager:i}=e,o=Lw(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new pQ(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=n,this.auth=r,this.stsTokenManager=i,this.accessToken=i.accessToken,this.displayName=o.displayName||null,this.email=o.email||null,this.emailVerified=o.emailVerified||!1,this.phoneNumber=o.phoneNumber||null,this.photoURL=o.photoURL||null,this.isAnonymous=o.isAnonymous||!1,this.tenantId=o.tenantId||null,this.providerData=o.providerData?[...o.providerData]:[],this.metadata=new l0(o.createdAt||void 0,o.lastLoginAt||void 0)}async getIdToken(e){const n=await Yu(this,this.stsTokenManager.getToken(this.auth,e));return Ie(n,this.auth,"internal-error"),this.accessToken!==n&&(this.accessToken=n,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),n}getIdTokenResult(e){return hQ(this,e)}reload(){return mQ(this)}_assign(e){this!==e&&(Ie(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map(n=>Object.assign({},n)),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){const n=new qi(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}));return n.metadata._copy(this.metadata),n}_onReload(e){Ie(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(e,n=!1){let r=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),r=!0),n&&await ap(this),await this.auth._persistUserIfCurrent(this),r&&this.auth._notifyListenersIfCurrent(this)}async delete(){if(Hi(this.auth.app))return Promise.reject(rs(this.auth));const e=await this.getIdToken();return await Yu(this,dQ(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return Object.assign(Object.assign({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(e=>Object.assign({},e)),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(e,n){var r,i,o,s,a,l,c,h;const f=(r=n.displayName)!==null&&r!==void 0?r:void 0,p=(i=n.email)!==null&&i!==void 0?i:void 0,g=(o=n.phoneNumber)!==null&&o!==void 0?o:void 0,w=(s=n.photoURL)!==null&&s!==void 0?s:void 0,b=(a=n.tenantId)!==null&&a!==void 0?a:void 0,C=(l=n._redirectEventId)!==null&&l!==void 0?l:void 0,T=(c=n.createdAt)!==null&&c!==void 0?c:void 0,y=(h=n.lastLoginAt)!==null&&h!==void 0?h:void 0,{uid:_,emailVerified:S,isAnonymous:N,providerData:D,stsTokenManager:v}=n;Ie(_&&v,e,"internal-error");const E=cl.fromJSON(this.name,v);Ie(typeof _=="string",e,"internal-error"),So(f,e.name),So(p,e.name),Ie(typeof S=="boolean",e,"internal-error"),Ie(typeof N=="boolean",e,"internal-error"),So(g,e.name),So(w,e.name),So(b,e.name),So(C,e.name),So(T,e.name),So(y,e.name);const I=new qi({uid:_,auth:e,email:p,emailVerified:S,displayName:f,isAnonymous:N,photoURL:w,phoneNumber:g,tenantId:b,stsTokenManager:E,createdAt:T,lastLoginAt:y});return D&&Array.isArray(D)&&(I.providerData=D.map(P=>Object.assign({},P))),C&&(I._redirectEventId=C),I}static async _fromIdTokenResponse(e,n,r=!1){const i=new cl;i.updateFromServerResponse(n);const o=new qi({uid:n.localId,auth:e,stsTokenManager:i,isAnonymous:r});return await ap(o),o}static async _fromGetAccountInfoResponse(e,n,r){const i=n.users[0];Ie(i.localId!==void 0,"internal-error");const o=i.providerUserInfo!==void 0?SA(i.providerUserInfo):[],s=!(i.email&&i.passwordHash)&&!(o!=null&&o.length),a=new cl;a.updateFromIdToken(r);const l=new qi({uid:i.localId,auth:e,stsTokenManager:a,isAnonymous:s}),c={uid:i.localId,displayName:i.displayName||null,photoURL:i.photoUrl||null,email:i.email||null,emailVerified:i.emailVerified||!1,phoneNumber:i.phoneNumber||null,tenantId:i.tenantId||null,providerData:o,metadata:new l0(i.createdAt,i.lastLoginAt),isAnonymous:!(i.email&&i.passwordHash)&&!(o!=null&&o.length)};return Object.assign(l,c),l}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const wE=new Map;function Ki(t){ao(t instanceof Function,"Expected a class definition");let e=wE.get(t);return e?(ao(e instanceof t,"Instance stored in cache mismatched with class"),e):(e=new t,wE.set(t,e),e)}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class CA{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(e,n){this.storage[e]=n}async _get(e){const n=this.storage[e];return n===void 0?null:n}async _remove(e){delete this.storage[e]}_addListener(e,n){}_removeListener(e,n){}}CA.type="NONE";const bE=CA;/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function Zh(t,e,n){return`firebase:${t}:${e}:${n}`}class ul{constructor(e,n,r){this.persistence=e,this.auth=n,this.userKey=r;const{config:i,name:o}=this.auth;this.fullUserKey=Zh(this.userKey,i.apiKey,o),this.fullPersistenceKey=Zh("persistence",i.apiKey,o),this.boundEventHandler=n._onStorageEvent.bind(n),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}async getCurrentUser(){const e=await this.persistence._get(this.fullUserKey);return e?qi._fromJSON(this.auth,e):null}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(e){if(this.persistence===e)return;const n=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=e,n)return this.setCurrentUser(n)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(e,n,r="authUser"){if(!n.length)return new ul(Ki(bE),e,r);const i=(await Promise.all(n.map(async c=>{if(await c._isAvailable())return c}))).filter(c=>c);let o=i[0]||Ki(bE);const s=Zh(r,e.config.apiKey,e.name);let a=null;for(const c of n)try{const h=await c._get(s);if(h){const f=qi._fromJSON(e,h);c!==o&&(a=f),o=c;break}}catch{}const l=i.filter(c=>c._shouldAllowMigration);return!o._shouldAllowMigration||!l.length?new ul(o,e,r):(o=l[0],a&&await o._set(s,a.toJSON()),await Promise.all(n.map(async c=>{if(c!==o)try{await c._remove(s)}catch{}})),new ul(o,e,r))}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function _E(t){const e=t.toLowerCase();if(e.includes("opera/")||e.includes("opr/")||e.includes("opios/"))return"Opera";if(AA(e))return"IEMobile";if(e.includes("msie")||e.includes("trident/"))return"IE";if(e.includes("edge/"))return"Edge";if(IA(e))return"Firefox";if(e.includes("silk/"))return"Silk";if(MA(e))return"Blackberry";if(DA(e))return"Webos";if(PA(e))return"Safari";if((e.includes("chrome/")||RA(e))&&!e.includes("edge/"))return"Chrome";if(NA(e))return"Android";{const n=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,r=t.match(n);if((r==null?void 0:r.length)===2)return r[1]}return"Other"}function IA(t=Ln()){return/firefox\//i.test(t)}function PA(t=Ln()){const e=t.toLowerCase();return e.includes("safari/")&&!e.includes("chrome/")&&!e.includes("crios/")&&!e.includes("android")}function RA(t=Ln()){return/crios\//i.test(t)}function AA(t=Ln()){return/iemobile/i.test(t)}function NA(t=Ln()){return/android/i.test(t)}function MA(t=Ln()){return/blackberry/i.test(t)}function DA(t=Ln()){return/webos/i.test(t)}function Bw(t=Ln()){return/iphone|ipad|ipod/i.test(t)||/macintosh/i.test(t)&&/mobile/i.test(t)}function wQ(t=Ln()){var e;return Bw(t)&&!!(!((e=window.navigator)===null||e===void 0)&&e.standalone)}function bQ(){return VK()&&document.documentMode===10}function OA(t=Ln()){return Bw(t)||NA(t)||DA(t)||MA(t)||/windows phone/i.test(t)||AA(t)}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function LA(t,e=[]){let n;switch(t){case"Browser":n=_E(Ln());break;case"Worker":n=`${_E(Ln())}-${t}`;break;default:n=t}const r=e.length?e.join(","):"FirebaseCore-web";return`${n}/JsCore/${Ql}/${r}`}/** * @license * Copyright 2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class _Q{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,n){const r=o=>new Promise((s,a)=>{try{const l=e(o);s(l)}catch(l){a(l)}});r.onAbort=n,this.queue.push(r);const i=this.queue.length-1;return()=>{this.queue[i]=()=>Promise.resolve()}}async runMiddleware(e){if(this.auth.currentUser===e)return;const n=[];try{for(const r of this.queue)await r(e),r.onAbort&&n.push(r.onAbort)}catch(r){n.reverse();for(const i of n)try{i()}catch{}throw this.auth._errorFactory.create("login-blocked",{originalMessage:r==null?void 0:r.message})}}}/** * @license * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */async function xQ(t,e={}){return Xl(t,"GET","/v2/passwordPolicy",Hm(t,e))}/** * @license * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const kQ=6;class TQ{constructor(e){var n,r,i,o;const s=e.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=(n=s.minPasswordLength)!==null&&n!==void 0?n:kQ,s.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=s.maxPasswordLength),s.containsLowercaseCharacter!==void 0&&(this.customStrengthOptions.containsLowercaseLetter=s.containsLowercaseCharacter),s.containsUppercaseCharacter!==void 0&&(this.customStrengthOptions.containsUppercaseLetter=s.containsUppercaseCharacter),s.containsNumericCharacter!==void 0&&(this.customStrengthOptions.containsNumericCharacter=s.containsNumericCharacter),s.containsNonAlphanumericCharacter!==void 0&&(this.customStrengthOptions.containsNonAlphanumericCharacter=s.containsNonAlphanumericCharacter),this.enforcementState=e.enforcementState,this.enforcementState==="ENFORCEMENT_STATE_UNSPECIFIED"&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=(i=(r=e.allowedNonAlphanumericCharacters)===null||r===void 0?void 0:r.join(""))!==null&&i!==void 0?i:"",this.forceUpgradeOnSignin=(o=e.forceUpgradeOnSignin)!==null&&o!==void 0?o:!1,this.schemaVersion=e.schemaVersion}validatePassword(e){var n,r,i,o,s,a;const l={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(e,l),this.validatePasswordCharacterOptions(e,l),l.isValid&&(l.isValid=(n=l.meetsMinPasswordLength)!==null&&n!==void 0?n:!0),l.isValid&&(l.isValid=(r=l.meetsMaxPasswordLength)!==null&&r!==void 0?r:!0),l.isValid&&(l.isValid=(i=l.containsLowercaseLetter)!==null&&i!==void 0?i:!0),l.isValid&&(l.isValid=(o=l.containsUppercaseLetter)!==null&&o!==void 0?o:!0),l.isValid&&(l.isValid=(s=l.containsNumericCharacter)!==null&&s!==void 0?s:!0),l.isValid&&(l.isValid=(a=l.containsNonAlphanumericCharacter)!==null&&a!==void 0?a:!0),l}validatePasswordLengthOptions(e,n){const r=this.customStrengthOptions.minPasswordLength,i=this.customStrengthOptions.maxPasswordLength;r&&(n.meetsMinPasswordLength=e.length>=r),i&&(n.meetsMaxPasswordLength=e.length<=i)}validatePasswordCharacterOptions(e,n){this.updatePasswordCharacterOptionsStatuses(n,!1,!1,!1,!1);let r;for(let i=0;i="a"&&r<="z",r>="A"&&r<="Z",r>="0"&&r<="9",this.allowedNonAlphanumericCharacters.includes(r))}updatePasswordCharacterOptionsStatuses(e,n,r,i,o){this.customStrengthOptions.containsLowercaseLetter&&(e.containsLowercaseLetter||(e.containsLowercaseLetter=n)),this.customStrengthOptions.containsUppercaseLetter&&(e.containsUppercaseLetter||(e.containsUppercaseLetter=r)),this.customStrengthOptions.containsNumericCharacter&&(e.containsNumericCharacter||(e.containsNumericCharacter=i)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(e.containsNonAlphanumericCharacter||(e.containsNonAlphanumericCharacter=o))}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class EQ{constructor(e,n,r,i){this.app=e,this.heartbeatServiceProvider=n,this.appCheckServiceProvider=r,this.config=i,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new xE(this),this.idTokenSubscription=new xE(this),this.beforeStateQueue=new _Q(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=wA,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=i.sdkClientVersion}_initializeWithPersistence(e,n){return n&&(this._popupRedirectResolver=Ki(n)),this._initializationPromise=this.queue(async()=>{var r,i;if(!this._deleted&&(this.persistenceManager=await ul.create(this,e),!this._deleted)){if(!((r=this._popupRedirectResolver)===null||r===void 0)&&r._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch{}await this.initializeCurrentUser(n),this.lastNotifiedUid=((i=this.currentUser)===null||i===void 0?void 0:i.uid)||null,!this._deleted&&(this._isInitialized=!0)}}),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;const e=await this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!e)){if(this.currentUser&&e&&this.currentUser.uid===e.uid){this._currentUser._assign(e),await this.currentUser.getIdToken();return}await this._updateCurrentUser(e,!0)}}async initializeCurrentUserFromIdToken(e){try{const n=await EA(this,{idToken:e}),r=await qi._fromGetAccountInfoResponse(this,n,e);await this.directlySetCurrentUser(r)}catch(n){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",n),await this.directlySetCurrentUser(null)}}async initializeCurrentUser(e){var n;if(Hi(this.app)){const s=this.app.settings.authIdToken;return s?new Promise(a=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(s).then(a,a))}):this.directlySetCurrentUser(null)}const r=await this.assertedPersistence.getCurrentUser();let i=r,o=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const s=(n=this.redirectUser)===null||n===void 0?void 0:n._redirectEventId,a=i==null?void 0:i._redirectEventId,l=await this.tryRedirectSignIn(e);(!s||s===a)&&(l!=null&&l.user)&&(i=l.user,o=!0)}if(!i)return this.directlySetCurrentUser(null);if(!i._redirectEventId){if(o)try{await this.beforeStateQueue.runMiddleware(i)}catch(s){i=r,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(s))}return i?this.reloadAndSetCurrentUserOrClear(i):this.directlySetCurrentUser(null)}return Ie(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===i._redirectEventId?this.directlySetCurrentUser(i):this.reloadAndSetCurrentUserOrClear(i)}async tryRedirectSignIn(e){let n=null;try{n=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch{await this._setRedirectUser(null)}return n}async reloadAndSetCurrentUserOrClear(e){try{await ap(e)}catch(n){if((n==null?void 0:n.code)!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=aQ()}async _delete(){this._deleted=!0}async updateCurrentUser(e){if(Hi(this.app))return Promise.reject(rs(this));const n=e?Wn(e):null;return n&&Ie(n.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(n&&n._clone(this))}async _updateCurrentUser(e,n=!1){if(!this._deleted)return e&&Ie(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),n||await this.beforeStateQueue.runMiddleware(e),this.queue(async()=>{await this.directlySetCurrentUser(e),this.notifyAuthListeners()})}async signOut(){return Hi(this.app)?Promise.reject(rs(this)):(await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0))}setPersistence(e){return Hi(this.app)?Promise.reject(rs(this)):this.queue(async()=>{await this.assertedPersistence.setPersistence(Ki(e))})}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword(e){this._getPasswordPolicyInternal()||await this._updatePasswordPolicy();const n=this._getPasswordPolicyInternal();return n.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):n.validatePassword(e)}_getPasswordPolicyInternal(){return this.tenantId===null?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}async _updatePasswordPolicy(){const e=await xQ(this),n=new TQ(e);this.tenantId===null?this._projectPasswordPolicy=n:this._tenantPasswordPolicies[this.tenantId]=n}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(e){this._errorFactory=new Td("auth","Firebase",e())}onAuthStateChanged(e,n,r){return this.registerStateListener(this.authStateSubscription,e,n,r)}beforeAuthStateChanged(e,n){return this.beforeStateQueue.pushCallback(e,n)}onIdTokenChanged(e,n,r){return this.registerStateListener(this.idTokenSubscription,e,n,r)}authStateReady(){return new Promise((e,n)=>{if(this.currentUser)e();else{const r=this.onAuthStateChanged(()=>{r(),e()},n)}})}async revokeAccessToken(e){if(this.currentUser){const n=await this.currentUser.getIdToken(),r={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:e,idToken:n};this.tenantId!=null&&(r.tenantId=this.tenantId),await vQ(this,r)}}toJSON(){var e;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:(e=this._currentUser)===null||e===void 0?void 0:e.toJSON()}}async _setRedirectUser(e,n){const r=await this.getOrInitRedirectPersistenceManager(n);return e===null?r.removeCurrentUser():r.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){const n=e&&Ki(e)||this._popupRedirectResolver;Ie(n,this,"argument-error"),this.redirectPersistenceManager=await ul.create(this,[Ki(n._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){var n,r;return this._isInitialized&&await this.queue(async()=>{}),((n=this._currentUser)===null||n===void 0?void 0:n._redirectEventId)===e?this._currentUser:((r=this.redirectUser)===null||r===void 0?void 0:r._redirectEventId)===e?this.redirectUser:null}async _persistUserIfCurrent(e){if(e===this.currentUser)return this.queue(async()=>this.directlySetCurrentUser(e))}_notifyListenersIfCurrent(e){e===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var e,n;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const r=(n=(e=this.currentUser)===null||e===void 0?void 0:e.uid)!==null&&n!==void 0?n:null;this.lastNotifiedUid!==r&&(this.lastNotifiedUid=r,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,n,r,i){if(this._deleted)return()=>{};const o=typeof n=="function"?n:n.next.bind(n);let s=!1;const a=this._isInitialized?Promise.resolve():this._initializationPromise;if(Ie(a,this,"internal-error"),a.then(()=>{s||o(this.currentUser)}),typeof n=="function"){const l=e.addObserver(n,r,i);return()=>{s=!0,l()}}else{const l=e.addObserver(n);return()=>{s=!0,l()}}}async directlySetCurrentUser(e){this.currentUser&&this.currentUser!==e&&this._currentUser._stopProactiveRefresh(),e&&this.isProactiveRefreshEnabled&&e._startProactiveRefresh(),this.currentUser=e,e?await this.assertedPersistence.setCurrentUser(e):await this.assertedPersistence.removeCurrentUser()}queue(e){return this.operations=this.operations.then(e,e),this.operations}get assertedPersistence(){return Ie(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){!e||this.frameworks.includes(e)||(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=LA(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){var e;const n={"X-Client-Version":this.clientVersion};this.app.options.appId&&(n["X-Firebase-gmpid"]=this.app.options.appId);const r=await((e=this.heartbeatServiceProvider.getImmediate({optional:!0}))===null||e===void 0?void 0:e.getHeartbeatsHeader());r&&(n["X-Firebase-Client"]=r);const i=await this._getAppCheckToken();return i&&(n["X-Firebase-AppCheck"]=i),n}async _getAppCheckToken(){var e;const n=await((e=this.appCheckServiceProvider.getImmediate({optional:!0}))===null||e===void 0?void 0:e.getToken());return n!=null&&n.error&&iQ(`Error while retrieving App Check token: ${n.error}`),n==null?void 0:n.token}}function Gm(t){return Wn(t)}class xE{constructor(e){this.auth=e,this.observer=null,this.addObserver=HK(n=>this.observer=n)}get next(){return Ie(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */let Uw={async loadJS(){throw new Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function SQ(t){Uw=t}function CQ(t){return Uw.loadJS(t)}function IQ(){return Uw.gapiScript}function PQ(t){return`__${t}${Math.floor(Math.random()*1e6)}`}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function RQ(t,e){const n=Wm(t,"auth");if(n.isInitialized()){const i=n.getImmediate(),o=n.getOptions();if(ip(o,e??{}))return i;so(i,"already-initialized")}return n.initialize({options:e})}function AQ(t,e){const n=(e==null?void 0:e.persistence)||[],r=(Array.isArray(n)?n:[n]).map(Ki);e!=null&&e.errorMap&&t._updateErrorMap(e.errorMap),t._initializeWithPersistence(r,e==null?void 0:e.popupRedirectResolver)}function NQ(t,e,n){const r=Gm(t);Ie(r._canInitEmulator,r,"emulator-config-failed"),Ie(/^https?:\/\//.test(e),r,"invalid-emulator-scheme");const i=!!(n!=null&&n.disableWarnings),o=VA(e),{host:s,port:a}=MQ(e),l=a===null?"":`:${a}`;r.config.emulator={url:`${o}//${s}${l}/`},r.settings.appVerificationDisabledForTesting=!0,r.emulatorConfig=Object.freeze({host:s,port:a,protocol:o.replace(":",""),options:Object.freeze({disableWarnings:i})}),i||DQ()}function VA(t){const e=t.indexOf(":");return e<0?"":t.substr(0,e+1)}function MQ(t){const e=VA(t),n=/(\/\/)?([^?#/]+)/.exec(t.substr(e.length));if(!n)return{host:"",port:null};const r=n[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(r);if(i){const o=i[1];return{host:o,port:kE(r.substr(o.length+1))}}else{const[o,s]=r.split(":");return{host:o,port:kE(s)}}}function kE(t){if(!t)return null;const e=Number(t);return isNaN(e)?null:e}function DQ(){function t(){const e=document.createElement("p"),n=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",n.position="fixed",n.width="100%",n.backgroundColor="#ffffff",n.border=".1em solid #000000",n.color="#b50000",n.bottom="0px",n.left="0px",n.margin="0px",n.zIndex="10000",n.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}typeof console<"u"&&typeof console.info=="function"&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials."),typeof window<"u"&&typeof document<"u"&&(document.readyState==="loading"?window.addEventListener("DOMContentLoaded",t):t())}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class FA{constructor(e,n){this.providerId=e,this.signInMethod=n}toJSON(){return Gi("not implemented")}_getIdTokenResponse(e){return Gi("not implemented")}_linkToIdToken(e,n){return Gi("not implemented")}_getReauthenticationResolver(e){return Gi("not implemented")}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */async function dl(t,e){return kA(t,"POST","/v1/accounts:signInWithIdp",Hm(t,e))}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const OQ="http://localhost";class sa extends FA{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){const n=new sa(e.providerId,e.signInMethod);return e.idToken||e.accessToken?(e.idToken&&(n.idToken=e.idToken),e.accessToken&&(n.accessToken=e.accessToken),e.nonce&&!e.pendingToken&&(n.nonce=e.nonce),e.pendingToken&&(n.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(n.accessToken=e.oauthToken,n.secret=e.oauthTokenSecret):so("argument-error"),n}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,nonce:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){const n=typeof e=="string"?JSON.parse(e):e,{providerId:r,signInMethod:i}=n,o=Lw(n,["providerId","signInMethod"]);if(!r||!i)return null;const s=new sa(r,i);return s.idToken=o.idToken||void 0,s.accessToken=o.accessToken||void 0,s.secret=o.secret,s.nonce=o.nonce,s.pendingToken=o.pendingToken||null,s}_getIdTokenResponse(e){const n=this.buildRequest();return dl(e,n)}_linkToIdToken(e,n){const r=this.buildRequest();return r.idToken=n,dl(e,r)}_getReauthenticationResolver(e){const n=this.buildRequest();return n.autoCreate=!1,dl(e,n)}buildRequest(){const e={requestUri:OQ,returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{const n={};this.idToken&&(n.id_token=this.idToken),this.accessToken&&(n.access_token=this.accessToken),this.secret&&(n.oauth_token_secret=this.secret),n.providerId=this.providerId,this.nonce&&!this.pendingToken&&(n.nonce=this.nonce),e.postBody=Ed(n)}return e}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class $A{constructor(e){this.providerId=e,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(e){this.defaultLanguageCode=e}setCustomParameters(e){return this.customParameters=e,this}getCustomParameters(){return this.customParameters}}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Cd extends $A{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Oo extends Cd{constructor(){super("facebook.com")}static credential(e){return sa._fromParams({providerId:Oo.PROVIDER_ID,signInMethod:Oo.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return Oo.credentialFromTaggedObject(e)}static credentialFromError(e){return Oo.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return Oo.credential(e.oauthAccessToken)}catch{return null}}}Oo.FACEBOOK_SIGN_IN_METHOD="facebook.com";Oo.PROVIDER_ID="facebook.com";/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Lo extends Cd{constructor(){super("google.com"),this.addScope("profile")}static credential(e,n){return sa._fromParams({providerId:Lo.PROVIDER_ID,signInMethod:Lo.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:n})}static credentialFromResult(e){return Lo.credentialFromTaggedObject(e)}static credentialFromError(e){return Lo.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthIdToken:n,oauthAccessToken:r}=e;if(!n&&!r)return null;try{return Lo.credential(n,r)}catch{return null}}}Lo.GOOGLE_SIGN_IN_METHOD="google.com";Lo.PROVIDER_ID="google.com";/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Vo extends Cd{constructor(){super("github.com")}static credential(e){return sa._fromParams({providerId:Vo.PROVIDER_ID,signInMethod:Vo.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return Vo.credentialFromTaggedObject(e)}static credentialFromError(e){return Vo.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return Vo.credential(e.oauthAccessToken)}catch{return null}}}Vo.GITHUB_SIGN_IN_METHOD="github.com";Vo.PROVIDER_ID="github.com";/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Fo extends Cd{constructor(){super("twitter.com")}static credential(e,n){return sa._fromParams({providerId:Fo.PROVIDER_ID,signInMethod:Fo.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:n})}static credentialFromResult(e){return Fo.credentialFromTaggedObject(e)}static credentialFromError(e){return Fo.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthAccessToken:n,oauthTokenSecret:r}=e;if(!n||!r)return null;try{return Fo.credential(n,r)}catch{return null}}}Fo.TWITTER_SIGN_IN_METHOD="twitter.com";Fo.PROVIDER_ID="twitter.com";/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */async function LQ(t,e){return kA(t,"POST","/v1/accounts:signUp",Hm(t,e))}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class us{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,n,r,i=!1){const o=await qi._fromIdTokenResponse(e,r,i),s=TE(r);return new us({user:o,providerId:s,_tokenResponse:r,operationType:n})}static async _forOperation(e,n,r){await e._updateTokensIfNecessary(r,!0);const i=TE(r);return new us({user:e,providerId:i,_tokenResponse:r,operationType:n})}}function TE(t){return t.providerId?t.providerId:"phoneNumber"in t?"phone":null}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */async function VQ(t){var e;if(Hi(t.app))return Promise.reject(rs(t));const n=Gm(t);if(await n._initializationPromise,!((e=n.currentUser)===null||e===void 0)&&e.isAnonymous)return new us({user:n.currentUser,providerId:null,operationType:"signIn"});const r=await LQ(n,{returnSecureToken:!0}),i=await us._fromIdTokenResponse(n,"signIn",r,!0);return await n._updateCurrentUser(i.user),i}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class lp extends Ai{constructor(e,n,r,i){var o;super(n.code,n.message),this.operationType=r,this.user=i,Object.setPrototypeOf(this,lp.prototype),this.customData={appName:e.name,tenantId:(o=e.tenantId)!==null&&o!==void 0?o:void 0,_serverResponse:n.customData._serverResponse,operationType:r}}static _fromErrorAndOperation(e,n,r,i){return new lp(e,n,r,i)}}function BA(t,e,n,r){return(e==="reauthenticate"?n._getReauthenticationResolver(t):n._getIdTokenResponse(t)).catch(o=>{throw o.code==="auth/multi-factor-auth-required"?lp._fromErrorAndOperation(t,o,e,r):o})}async function FQ(t,e,n=!1){const r=await Yu(t,e._linkToIdToken(t.auth,await t.getIdToken()),n);return us._forOperation(t,"link",r)}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */async function $Q(t,e,n=!1){const{auth:r}=t;if(Hi(r.app))return Promise.reject(rs(r));const i="reauthenticate";try{const o=await Yu(t,BA(r,i,e,t),n);Ie(o.idToken,r,"internal-error");const s=$w(o.idToken);Ie(s,r,"internal-error");const{sub:a}=s;return Ie(t.uid===a,r,"user-mismatch"),us._forOperation(t,i,o)}catch(o){throw(o==null?void 0:o.code)==="auth/user-not-found"&&so(r,"user-mismatch"),o}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */async function BQ(t,e,n=!1){if(Hi(t.app))return Promise.reject(rs(t));const r="signIn",i=await BA(t,r,e),o=await us._fromIdTokenResponse(t,r,i);return n||await t._updateCurrentUser(o.user),o}function UQ(t,e,n,r){return Wn(t).onIdTokenChanged(e,n,r)}function zQ(t,e,n){return Wn(t).beforeAuthStateChanged(e,n)}const cp="__sak";/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class UA{constructor(e,n){this.storageRetriever=e,this.type=n}_isAvailable(){try{return this.storage?(this.storage.setItem(cp,"1"),this.storage.removeItem(cp),Promise.resolve(!0)):Promise.resolve(!1)}catch{return Promise.resolve(!1)}}_set(e,n){return this.storage.setItem(e,JSON.stringify(n)),Promise.resolve()}_get(e){const n=this.storage.getItem(e);return Promise.resolve(n?JSON.parse(n):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const jQ=1e3,WQ=10;class zA extends UA{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(e,n)=>this.onStorageEvent(e,n),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=OA(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(const n of Object.keys(this.listeners)){const r=this.storage.getItem(n),i=this.localCache[n];r!==i&&e(n,i,r)}}onStorageEvent(e,n=!1){if(!e.key){this.forAllChangedKeys((s,a,l)=>{this.notifyListeners(s,l)});return}const r=e.key;n?this.detachListener():this.stopPolling();const i=()=>{const s=this.storage.getItem(r);!n&&this.localCache[r]===s||this.notifyListeners(r,s)},o=this.storage.getItem(r);bQ()&&o!==e.newValue&&e.newValue!==e.oldValue?setTimeout(i,WQ):i()}notifyListeners(e,n){this.localCache[e]=n;const r=this.listeners[e];if(r)for(const i of Array.from(r))i(n&&JSON.parse(n))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((e,n,r)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:n,newValue:r}),!0)})},jQ)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,n){Object.keys(this.listeners).length===0&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(n)}_removeListener(e,n){this.listeners[e]&&(this.listeners[e].delete(n),this.listeners[e].size===0&&delete this.listeners[e]),Object.keys(this.listeners).length===0&&(this.detachListener(),this.stopPolling())}async _set(e,n){await super._set(e,n),this.localCache[e]=JSON.stringify(n)}async _get(e){const n=await super._get(e);return this.localCache[e]=JSON.stringify(n),n}async _remove(e){await super._remove(e),delete this.localCache[e]}}zA.type="LOCAL";const HQ=zA;/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class jA extends UA{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,n){}_removeListener(e,n){}}jA.type="SESSION";const WA=jA;/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function GQ(t){return Promise.all(t.map(async e=>{try{return{fulfilled:!0,value:await e}}catch(n){return{fulfilled:!1,reason:n}}}))}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class qm{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){const n=this.receivers.find(i=>i.isListeningto(e));if(n)return n;const r=new qm(e);return this.receivers.push(r),r}isListeningto(e){return this.eventTarget===e}async handleEvent(e){const n=e,{eventId:r,eventType:i,data:o}=n.data,s=this.handlersMap[i];if(!(s!=null&&s.size))return;n.ports[0].postMessage({status:"ack",eventId:r,eventType:i});const a=Array.from(s).map(async c=>c(n.origin,o)),l=await GQ(a);n.ports[0].postMessage({status:"done",eventId:r,eventType:i,response:l})}_subscribe(e,n){Object.keys(this.handlersMap).length===0&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(n)}_unsubscribe(e,n){this.handlersMap[e]&&n&&this.handlersMap[e].delete(n),(!n||this.handlersMap[e].size===0)&&delete this.handlersMap[e],Object.keys(this.handlersMap).length===0&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}qm.receivers=[];/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function zw(t="",e=10){let n="";for(let r=0;r{const c=zw("",20);i.port1.start();const h=setTimeout(()=>{l(new Error("unsupported_event"))},r);s={messageChannel:i,onMessage(f){const p=f;if(p.data.eventId===c)switch(p.data.status){case"ack":clearTimeout(h),o=setTimeout(()=>{l(new Error("timeout"))},3e3);break;case"done":clearTimeout(o),a(p.data.response);break;default:clearTimeout(h),clearTimeout(o),l(new Error("invalid_response"));break}}},this.handlers.add(s),i.port1.addEventListener("message",s.onMessage),this.target.postMessage({eventType:e,eventId:c,data:n},[i.port2])}).finally(()=>{s&&this.removeMessageHandler(s)})}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function Ei(){return window}function KQ(t){Ei().location.href=t}/** * @license * Copyright 2020 Google LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function HA(){return typeof Ei().WorkerGlobalScope<"u"&&typeof Ei().importScripts=="function"}async function YQ(){if(!(navigator!=null&&navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch{return null}}function QQ(){var t;return((t=navigator==null?void 0:navigator.serviceWorker)===null||t===void 0?void 0:t.controller)||null}function XQ(){return HA()?self:null}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const GA="firebaseLocalStorageDb",JQ=1,up="firebaseLocalStorage",qA="fbase_key";class Id{constructor(e){this.request=e}toPromise(){return new Promise((e,n)=>{this.request.addEventListener("success",()=>{e(this.request.result)}),this.request.addEventListener("error",()=>{n(this.request.error)})})}}function Km(t,e){return t.transaction([up],e?"readwrite":"readonly").objectStore(up)}function ZQ(){const t=indexedDB.deleteDatabase(GA);return new Id(t).toPromise()}function c0(){const t=indexedDB.open(GA,JQ);return new Promise((e,n)=>{t.addEventListener("error",()=>{n(t.error)}),t.addEventListener("upgradeneeded",()=>{const r=t.result;try{r.createObjectStore(up,{keyPath:qA})}catch(i){n(i)}}),t.addEventListener("success",async()=>{const r=t.result;r.objectStoreNames.contains(up)?e(r):(r.close(),await ZQ(),e(await c0()))})})}async function EE(t,e,n){const r=Km(t,!0).put({[qA]:e,value:n});return new Id(r).toPromise()}async function eX(t,e){const n=Km(t,!1).get(e),r=await new Id(n).toPromise();return r===void 0?null:r.value}function SE(t,e){const n=Km(t,!0).delete(e);return new Id(n).toPromise()}const tX=800,nX=3;class KA{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}async _openDb(){return this.db?this.db:(this.db=await c0(),this.db)}async _withRetries(e){let n=0;for(;;)try{const r=await this._openDb();return await e(r)}catch(r){if(n++>nX)throw r;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return HA()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=qm._getInstance(XQ()),this.receiver._subscribe("keyChanged",async(e,n)=>({keyProcessed:(await this._poll()).includes(n.key)})),this.receiver._subscribe("ping",async(e,n)=>["keyChanged"])}async initializeSender(){var e,n;if(this.activeServiceWorker=await YQ(),!this.activeServiceWorker)return;this.sender=new qQ(this.activeServiceWorker);const r=await this.sender._send("ping",{},800);r&&!((e=r[0])===null||e===void 0)&&e.fulfilled&&!((n=r[0])===null||n===void 0)&&n.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){if(!(!this.sender||!this.activeServiceWorker||QQ()!==this.activeServiceWorker))try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch{}}async _isAvailable(){try{if(!indexedDB)return!1;const e=await c0();return await EE(e,cp,"1"),await SE(e,cp),!0}catch{}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,n){return this._withPendingWrite(async()=>(await this._withRetries(r=>EE(r,e,n)),this.localCache[e]=n,this.notifyServiceWorker(e)))}async _get(e){const n=await this._withRetries(r=>eX(r,e));return this.localCache[e]=n,n}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(n=>SE(n,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){const e=await this._withRetries(i=>{const o=Km(i,!1).getAll();return new Id(o).toPromise()});if(!e)return[];if(this.pendingWrites!==0)return[];const n=[],r=new Set;if(e.length!==0)for(const{fbase_key:i,value:o}of e)r.add(i),JSON.stringify(this.localCache[i])!==JSON.stringify(o)&&(this.notifyListeners(i,o),n.push(i));for(const i of Object.keys(this.localCache))this.localCache[i]&&!r.has(i)&&(this.notifyListeners(i,null),n.push(i));return n}notifyListeners(e,n){this.localCache[e]=n;const r=this.listeners[e];if(r)for(const i of Array.from(r))i(n)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),tX)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,n){Object.keys(this.listeners).length===0&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(n)}_removeListener(e,n){this.listeners[e]&&(this.listeners[e].delete(n),this.listeners[e].size===0&&delete this.listeners[e]),Object.keys(this.listeners).length===0&&this.stopPolling()}}KA.type="LOCAL";const rX=KA;new Sd(3e4,6e4);/** * @license * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function iX(t,e){return e?Ki(e):(Ie(t._popupRedirectResolver,t,"argument-error"),t._popupRedirectResolver)}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class jw extends FA{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return dl(e,this._buildIdpRequest())}_linkToIdToken(e,n){return dl(e,this._buildIdpRequest(n))}_getReauthenticationResolver(e){return dl(e,this._buildIdpRequest())}_buildIdpRequest(e){const n={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return e&&(n.idToken=e),n}}function oX(t){return BQ(t.auth,new jw(t),t.bypassAuthState)}function sX(t){const{auth:e,user:n}=t;return Ie(n,e,"internal-error"),$Q(n,new jw(t),t.bypassAuthState)}async function aX(t){const{auth:e,user:n}=t;return Ie(n,e,"internal-error"),FQ(n,new jw(t),t.bypassAuthState)}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class YA{constructor(e,n,r,i,o=!1){this.auth=e,this.resolver=r,this.user=i,this.bypassAuthState=o,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(n)?n:[n]}execute(){return new Promise(async(e,n)=>{this.pendingPromise={resolve:e,reject:n};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(r){this.reject(r)}})}async onAuthEvent(e){const{urlResponse:n,sessionId:r,postBody:i,tenantId:o,error:s,type:a}=e;if(s){this.reject(s);return}const l={auth:this.auth,requestUri:n,sessionId:r,tenantId:o||void 0,postBody:i||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(a)(l))}catch(c){this.reject(c)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return oX;case"linkViaPopup":case"linkViaRedirect":return aX;case"reauthViaPopup":case"reauthViaRedirect":return sX;default:so(this.auth,"internal-error")}}resolve(e){ao(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){ao(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const lX=new Sd(2e3,1e4);class Za extends YA{constructor(e,n,r,i,o){super(e,n,i,o),this.provider=r,this.authWindow=null,this.pollId=null,Za.currentPopupAction&&Za.currentPopupAction.cancel(),Za.currentPopupAction=this}async executeNotNull(){const e=await this.execute();return Ie(e,this.auth,"internal-error"),e}async onExecution(){ao(this.filter.length===1,"Popup operations only handle one event");const e=zw();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],e),this.authWindow.associatedEvent=e,this.resolver._originValidation(this.auth).catch(n=>{this.reject(n)}),this.resolver._isIframeWebStorageSupported(this.auth,n=>{n||this.reject(Ti(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){var e;return((e=this.authWindow)===null||e===void 0?void 0:e.associatedEvent)||null}cancel(){this.reject(Ti(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,Za.currentPopupAction=null}pollUserCancellation(){const e=()=>{var n,r;if(!((r=(n=this.authWindow)===null||n===void 0?void 0:n.window)===null||r===void 0)&&r.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(Ti(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(e,lX.get())};e()}}Za.currentPopupAction=null;/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const cX="pendingRedirect",ef=new Map;class uX extends YA{constructor(e,n,r=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],n,void 0,r),this.eventId=null}async execute(){let e=ef.get(this.auth._key());if(!e){try{const r=await dX(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(r)}catch(n){e=()=>Promise.reject(n)}ef.set(this.auth._key(),e)}return this.bypassAuthState||ef.set(this.auth._key(),()=>Promise.resolve(null)),e()}async onAuthEvent(e){if(e.type==="signInViaRedirect")return super.onAuthEvent(e);if(e.type==="unknown"){this.resolve(null);return}if(e.eventId){const n=await this.auth._redirectUserForId(e.eventId);if(n)return this.user=n,super.onAuthEvent(e);this.resolve(null)}}async onExecution(){}cleanUp(){}}async function dX(t,e){const n=pX(e),r=fX(t);if(!await r._isAvailable())return!1;const i=await r._get(n)==="true";return await r._remove(n),i}function hX(t,e){ef.set(t._key(),e)}function fX(t){return Ki(t._redirectPersistence)}function pX(t){return Zh(cX,t.config.apiKey,t.name)}async function mX(t,e,n=!1){if(Hi(t.app))return Promise.reject(rs(t));const r=Gm(t),i=iX(r,e),s=await new uX(r,i,n).execute();return s&&!n&&(delete s.user._redirectEventId,await r._persistUserIfCurrent(s.user),await r._setRedirectUser(null,e)),s}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const gX=10*60*1e3;class yX{constructor(e){this.auth=e,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(e){this.consumers.delete(e)}onEvent(e){if(this.hasEventBeenHandled(e))return!1;let n=!1;return this.consumers.forEach(r=>{this.isEventForConsumer(e,r)&&(n=!0,this.sendToConsumer(e,r),this.saveEventToCache(e))}),this.hasHandledPotentialRedirect||!vX(e)||(this.hasHandledPotentialRedirect=!0,n||(this.queuedRedirectEvent=e,n=!0)),n}sendToConsumer(e,n){var r;if(e.error&&!QA(e)){const i=((r=e.error.code)===null||r===void 0?void 0:r.split("auth/")[1])||"internal-error";n.onError(Ti(this.auth,i))}else n.onAuthEvent(e)}isEventForConsumer(e,n){const r=n.eventId===null||!!e.eventId&&e.eventId===n.eventId;return n.filter.includes(e.type)&&r}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=gX&&this.cachedEventUids.clear(),this.cachedEventUids.has(CE(e))}saveEventToCache(e){this.cachedEventUids.add(CE(e)),this.lastProcessedEventTime=Date.now()}}function CE(t){return[t.type,t.eventId,t.sessionId,t.tenantId].filter(e=>e).join("-")}function QA({type:t,error:e}){return t==="unknown"&&(e==null?void 0:e.code)==="auth/no-auth-event"}function vX(t){switch(t.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return QA(t);default:return!1}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */async function wX(t,e={}){return Xl(t,"GET","/v1/projects",e)}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const bX=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,_X=/^https?/;async function xX(t){if(t.config.emulator)return;const{authorizedDomains:e}=await wX(t);for(const n of e)try{if(kX(n))return}catch{}so(t,"unauthorized-domain")}function kX(t){const e=a0(),{protocol:n,hostname:r}=new URL(e);if(t.startsWith("chrome-extension://")){const s=new URL(t);return s.hostname===""&&r===""?n==="chrome-extension:"&&t.replace("chrome-extension://","")===e.replace("chrome-extension://",""):n==="chrome-extension:"&&s.hostname===r}if(!_X.test(n))return!1;if(bX.test(t))return r===t;const i=t.replace(/\./g,"\\.");return new RegExp("^(.+\\."+i+"|"+i+")$","i").test(r)}/** * @license * Copyright 2020 Google LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const TX=new Sd(3e4,6e4);function IE(){const t=Ei().___jsl;if(t!=null&&t.H){for(const e of Object.keys(t.H))if(t.H[e].r=t.H[e].r||[],t.H[e].L=t.H[e].L||[],t.H[e].r=[...t.H[e].L],t.CP)for(let n=0;n{var r,i,o;function s(){IE(),gapi.load("gapi.iframes",{callback:()=>{e(gapi.iframes.getContext())},ontimeout:()=>{IE(),n(Ti(t,"network-request-failed"))},timeout:TX.get()})}if(!((i=(r=Ei().gapi)===null||r===void 0?void 0:r.iframes)===null||i===void 0)&&i.Iframe)e(gapi.iframes.getContext());else if(!((o=Ei().gapi)===null||o===void 0)&&o.load)s();else{const a=PQ("iframefcb");return Ei()[a]=()=>{gapi.load?s():n(Ti(t,"network-request-failed"))},CQ(`${IQ()}?onload=${a}`).catch(l=>n(l))}}).catch(e=>{throw tf=null,e})}let tf=null;function SX(t){return tf=tf||EX(t),tf}/** * @license * Copyright 2020 Google LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const CX=new Sd(5e3,15e3),IX="__/auth/iframe",PX="emulator/auth/iframe",RX={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},AX=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function NX(t){const e=t.config;Ie(e.authDomain,t,"auth-domain-config-required");const n=e.emulator?Fw(e,PX):`https://${t.config.authDomain}/${IX}`,r={apiKey:e.apiKey,appName:t.name,v:Ql},i=AX.get(t.config.apiHost);i&&(r.eid=i);const o=t._getFrameworks();return o.length&&(r.fw=o.join(",")),`${n}?${Ed(r).slice(1)}`}async function MX(t){const e=await SX(t),n=Ei().gapi;return Ie(n,t,"internal-error"),e.open({where:document.body,url:NX(t),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:RX,dontclear:!0},r=>new Promise(async(i,o)=>{await r.restyle({setHideOnLeave:!1});const s=Ti(t,"network-request-failed"),a=Ei().setTimeout(()=>{o(s)},CX.get());function l(){Ei().clearTimeout(a),i(r)}r.ping(l).then(l,()=>{o(s)})}))}/** * @license * Copyright 2020 Google LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const DX={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},OX=500,LX=600,VX="_blank",FX="http://localhost";class PE{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}}function $X(t,e,n,r=OX,i=LX){const o=Math.max((window.screen.availHeight-i)/2,0).toString(),s=Math.max((window.screen.availWidth-r)/2,0).toString();let a="";const l=Object.assign(Object.assign({},DX),{width:r.toString(),height:i.toString(),top:o,left:s}),c=Ln().toLowerCase();n&&(a=RA(c)?VX:n),IA(c)&&(e=e||FX,l.scrollbars="yes");const h=Object.entries(l).reduce((p,[g,w])=>`${p}${g}=${w},`,"");if(wQ(c)&&a!=="_self")return BX(e||"",a),new PE(null);const f=window.open(e||"",a,h);Ie(f,t,"popup-blocked");try{f.focus()}catch{}return new PE(f)}function BX(t,e){const n=document.createElement("a");n.href=t,n.target=e;const r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}/** * @license * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const UX="__/auth/handler",zX="emulator/auth/handler",jX=encodeURIComponent("fac");async function RE(t,e,n,r,i,o){Ie(t.config.authDomain,t,"auth-domain-config-required"),Ie(t.config.apiKey,t,"invalid-api-key");const s={apiKey:t.config.apiKey,appName:t.name,authType:n,redirectUrl:r,v:Ql,eventId:i};if(e instanceof $A){e.setDefaultLanguage(t.languageCode),s.providerId=e.providerId||"",WK(e.getCustomParameters())||(s.customParameters=JSON.stringify(e.getCustomParameters()));for(const[h,f]of Object.entries(o||{}))s[h]=f}if(e instanceof Cd){const h=e.getScopes().filter(f=>f!=="");h.length>0&&(s.scopes=h.join(","))}t.tenantId&&(s.tid=t.tenantId);const a=s;for(const h of Object.keys(a))a[h]===void 0&&delete a[h];const l=await t._getAppCheckToken(),c=l?`#${jX}=${encodeURIComponent(l)}`:"";return`${WX(t)}?${Ed(a).slice(1)}${c}`}function WX({config:t}){return t.emulator?Fw(t,zX):`https://${t.authDomain}/${UX}`}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const Ty="webStorageSupport";class HX{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=WA,this._completeRedirectFn=mX,this._overrideRedirectResult=hX}async _openPopup(e,n,r,i){var o;ao((o=this.eventManagers[e._key()])===null||o===void 0?void 0:o.manager,"_initialize() not called before _openPopup()");const s=await RE(e,n,r,a0(),i);return $X(e,s,zw())}async _openRedirect(e,n,r,i){await this._originValidation(e);const o=await RE(e,n,r,a0(),i);return KQ(o),new Promise(()=>{})}_initialize(e){const n=e._key();if(this.eventManagers[n]){const{manager:i,promise:o}=this.eventManagers[n];return i?Promise.resolve(i):(ao(o,"If manager is not set, promise should be"),o)}const r=this.initAndGetManager(e);return this.eventManagers[n]={promise:r},r.catch(()=>{delete this.eventManagers[n]}),r}async initAndGetManager(e){const n=await MX(e),r=new yX(e);return n.register("authEvent",i=>(Ie(i==null?void 0:i.authEvent,e,"invalid-auth-event"),{status:r.onEvent(i.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:r},this.iframes[e._key()]=n,r}_isIframeWebStorageSupported(e,n){this.iframes[e._key()].send(Ty,{type:Ty},i=>{var o;const s=(o=i==null?void 0:i[0])===null||o===void 0?void 0:o[Ty];s!==void 0&&n(!!s),so(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){const n=e._key();return this.originValidationPromises[n]||(this.originValidationPromises[n]=xX(e)),this.originValidationPromises[n]}get _shouldInitProactively(){return OA()||PA()||Bw()}}const GX=HX;var AE="@firebase/auth",NE="1.7.9";/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class qX{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),((e=this.auth.currentUser)===null||e===void 0?void 0:e.uid)||null}async getToken(e){return this.assertAuthConfigured(),await this.auth._initializationPromise,this.auth.currentUser?{accessToken:await this.auth.currentUser.getIdToken(e)}:null}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;const n=this.auth.onIdTokenChanged(r=>{e((r==null?void 0:r.stsTokenManager.accessToken)||null)});this.internalListeners.set(e,n),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();const n=this.internalListeners.get(e);n&&(this.internalListeners.delete(e),n(),this.updateProactiveRefresh())}assertAuthConfigured(){Ie(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function KX(t){switch(t){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}function YX(t){oa(new cs("auth",(e,{options:n})=>{const r=e.getProvider("app").getImmediate(),i=e.getProvider("heartbeat"),o=e.getProvider("app-check-internal"),{apiKey:s,authDomain:a}=r.options;Ie(s&&!s.includes(":"),"invalid-api-key",{appName:r.name});const l={apiKey:s,authDomain:a,clientPlatform:t,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:LA(t)},c=new EQ(r,i,o,l);return AQ(c,n),c},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,n,r)=>{e.getProvider("auth-internal").initialize()})),oa(new cs("auth-internal",e=>{const n=Gm(e.getProvider("auth").getImmediate());return(r=>new qX(r))(n)},"PRIVATE").setInstantiationMode("EXPLICIT")),ki(AE,NE,KX(t)),ki(AE,NE,"esm2017")}/** * @license * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const QX=5*60,XX=hA("authIdTokenMaxAge")||QX;let ME=null;const JX=t=>async e=>{const n=e&&await e.getIdTokenResult(),r=n&&(new Date().getTime()-Date.parse(n.issuedAtTime))/1e3;if(r&&r>XX)return;const i=n==null?void 0:n.token;ME!==i&&(ME=i,await fetch(t,{method:i?"POST":"DELETE",headers:i?{Authorization:`Bearer ${i}`}:{}}))};function ZX(t=Ow()){const e=Wm(t,"auth");if(e.isInitialized())return e.getImmediate();const n=RQ(t,{popupRedirectResolver:GX,persistence:[rX,HQ,WA]}),r=hA("authTokenSyncURL");if(r&&typeof isSecureContext=="boolean"&&isSecureContext){const o=new URL(r,location.origin);if(location.origin===o.origin){const s=JX(o.toString());zQ(n,s,()=>s(n.currentUser)),UQ(n,a=>s(a))}}const i=cA("auth");return i&&NQ(n,`http://${i}`),n}function eJ(){var t,e;return(e=(t=document.getElementsByTagName("head"))===null||t===void 0?void 0:t[0])!==null&&e!==void 0?e:document}SQ({loadJS(t){return new Promise((e,n)=>{const r=document.createElement("script");r.setAttribute("src",t),r.onload=e,r.onerror=i=>{const o=Ti("internal-error");o.customData=i,n(o)},r.type="text/javascript",r.charset="UTF-8",eJ().appendChild(r)})},gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="});YX("Browser");var DE=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/** @license Copyright The Closure Library Authors. SPDX-License-Identifier: Apache-2.0 */var Qs,XA;(function(){var t;/** @license Copyright The Closure Library Authors. SPDX-License-Identifier: Apache-2.0 */function e(v,E){function I(){}I.prototype=E.prototype,v.D=E.prototype,v.prototype=new I,v.prototype.constructor=v,v.C=function(P,L,O){for(var R=Array(arguments.length-2),U=2;UL;++L)P[L]=E.charCodeAt(I++)|E.charCodeAt(I++)<<8|E.charCodeAt(I++)<<16|E.charCodeAt(I++)<<24;else for(L=0;16>L;++L)P[L]=E[I++]|E[I++]<<8|E[I++]<<16|E[I++]<<24;E=v.g[0],I=v.g[1],L=v.g[2];var O=v.g[3],R=E+(O^I&(L^O))+P[0]+3614090360&4294967295;E=I+(R<<7&4294967295|R>>>25),R=O+(L^E&(I^L))+P[1]+3905402710&4294967295,O=E+(R<<12&4294967295|R>>>20),R=L+(I^O&(E^I))+P[2]+606105819&4294967295,L=O+(R<<17&4294967295|R>>>15),R=I+(E^L&(O^E))+P[3]+3250441966&4294967295,I=L+(R<<22&4294967295|R>>>10),R=E+(O^I&(L^O))+P[4]+4118548399&4294967295,E=I+(R<<7&4294967295|R>>>25),R=O+(L^E&(I^L))+P[5]+1200080426&4294967295,O=E+(R<<12&4294967295|R>>>20),R=L+(I^O&(E^I))+P[6]+2821735955&4294967295,L=O+(R<<17&4294967295|R>>>15),R=I+(E^L&(O^E))+P[7]+4249261313&4294967295,I=L+(R<<22&4294967295|R>>>10),R=E+(O^I&(L^O))+P[8]+1770035416&4294967295,E=I+(R<<7&4294967295|R>>>25),R=O+(L^E&(I^L))+P[9]+2336552879&4294967295,O=E+(R<<12&4294967295|R>>>20),R=L+(I^O&(E^I))+P[10]+4294925233&4294967295,L=O+(R<<17&4294967295|R>>>15),R=I+(E^L&(O^E))+P[11]+2304563134&4294967295,I=L+(R<<22&4294967295|R>>>10),R=E+(O^I&(L^O))+P[12]+1804603682&4294967295,E=I+(R<<7&4294967295|R>>>25),R=O+(L^E&(I^L))+P[13]+4254626195&4294967295,O=E+(R<<12&4294967295|R>>>20),R=L+(I^O&(E^I))+P[14]+2792965006&4294967295,L=O+(R<<17&4294967295|R>>>15),R=I+(E^L&(O^E))+P[15]+1236535329&4294967295,I=L+(R<<22&4294967295|R>>>10),R=E+(L^O&(I^L))+P[1]+4129170786&4294967295,E=I+(R<<5&4294967295|R>>>27),R=O+(I^L&(E^I))+P[6]+3225465664&4294967295,O=E+(R<<9&4294967295|R>>>23),R=L+(E^I&(O^E))+P[11]+643717713&4294967295,L=O+(R<<14&4294967295|R>>>18),R=I+(O^E&(L^O))+P[0]+3921069994&4294967295,I=L+(R<<20&4294967295|R>>>12),R=E+(L^O&(I^L))+P[5]+3593408605&4294967295,E=I+(R<<5&4294967295|R>>>27),R=O+(I^L&(E^I))+P[10]+38016083&4294967295,O=E+(R<<9&4294967295|R>>>23),R=L+(E^I&(O^E))+P[15]+3634488961&4294967295,L=O+(R<<14&4294967295|R>>>18),R=I+(O^E&(L^O))+P[4]+3889429448&4294967295,I=L+(R<<20&4294967295|R>>>12),R=E+(L^O&(I^L))+P[9]+568446438&4294967295,E=I+(R<<5&4294967295|R>>>27),R=O+(I^L&(E^I))+P[14]+3275163606&4294967295,O=E+(R<<9&4294967295|R>>>23),R=L+(E^I&(O^E))+P[3]+4107603335&4294967295,L=O+(R<<14&4294967295|R>>>18),R=I+(O^E&(L^O))+P[8]+1163531501&4294967295,I=L+(R<<20&4294967295|R>>>12),R=E+(L^O&(I^L))+P[13]+2850285829&4294967295,E=I+(R<<5&4294967295|R>>>27),R=O+(I^L&(E^I))+P[2]+4243563512&4294967295,O=E+(R<<9&4294967295|R>>>23),R=L+(E^I&(O^E))+P[7]+1735328473&4294967295,L=O+(R<<14&4294967295|R>>>18),R=I+(O^E&(L^O))+P[12]+2368359562&4294967295,I=L+(R<<20&4294967295|R>>>12),R=E+(I^L^O)+P[5]+4294588738&4294967295,E=I+(R<<4&4294967295|R>>>28),R=O+(E^I^L)+P[8]+2272392833&4294967295,O=E+(R<<11&4294967295|R>>>21),R=L+(O^E^I)+P[11]+1839030562&4294967295,L=O+(R<<16&4294967295|R>>>16),R=I+(L^O^E)+P[14]+4259657740&4294967295,I=L+(R<<23&4294967295|R>>>9),R=E+(I^L^O)+P[1]+2763975236&4294967295,E=I+(R<<4&4294967295|R>>>28),R=O+(E^I^L)+P[4]+1272893353&4294967295,O=E+(R<<11&4294967295|R>>>21),R=L+(O^E^I)+P[7]+4139469664&4294967295,L=O+(R<<16&4294967295|R>>>16),R=I+(L^O^E)+P[10]+3200236656&4294967295,I=L+(R<<23&4294967295|R>>>9),R=E+(I^L^O)+P[13]+681279174&4294967295,E=I+(R<<4&4294967295|R>>>28),R=O+(E^I^L)+P[0]+3936430074&4294967295,O=E+(R<<11&4294967295|R>>>21),R=L+(O^E^I)+P[3]+3572445317&4294967295,L=O+(R<<16&4294967295|R>>>16),R=I+(L^O^E)+P[6]+76029189&4294967295,I=L+(R<<23&4294967295|R>>>9),R=E+(I^L^O)+P[9]+3654602809&4294967295,E=I+(R<<4&4294967295|R>>>28),R=O+(E^I^L)+P[12]+3873151461&4294967295,O=E+(R<<11&4294967295|R>>>21),R=L+(O^E^I)+P[15]+530742520&4294967295,L=O+(R<<16&4294967295|R>>>16),R=I+(L^O^E)+P[2]+3299628645&4294967295,I=L+(R<<23&4294967295|R>>>9),R=E+(L^(I|~O))+P[0]+4096336452&4294967295,E=I+(R<<6&4294967295|R>>>26),R=O+(I^(E|~L))+P[7]+1126891415&4294967295,O=E+(R<<10&4294967295|R>>>22),R=L+(E^(O|~I))+P[14]+2878612391&4294967295,L=O+(R<<15&4294967295|R>>>17),R=I+(O^(L|~E))+P[5]+4237533241&4294967295,I=L+(R<<21&4294967295|R>>>11),R=E+(L^(I|~O))+P[12]+1700485571&4294967295,E=I+(R<<6&4294967295|R>>>26),R=O+(I^(E|~L))+P[3]+2399980690&4294967295,O=E+(R<<10&4294967295|R>>>22),R=L+(E^(O|~I))+P[10]+4293915773&4294967295,L=O+(R<<15&4294967295|R>>>17),R=I+(O^(L|~E))+P[1]+2240044497&4294967295,I=L+(R<<21&4294967295|R>>>11),R=E+(L^(I|~O))+P[8]+1873313359&4294967295,E=I+(R<<6&4294967295|R>>>26),R=O+(I^(E|~L))+P[15]+4264355552&4294967295,O=E+(R<<10&4294967295|R>>>22),R=L+(E^(O|~I))+P[6]+2734768916&4294967295,L=O+(R<<15&4294967295|R>>>17),R=I+(O^(L|~E))+P[13]+1309151649&4294967295,I=L+(R<<21&4294967295|R>>>11),R=E+(L^(I|~O))+P[4]+4149444226&4294967295,E=I+(R<<6&4294967295|R>>>26),R=O+(I^(E|~L))+P[11]+3174756917&4294967295,O=E+(R<<10&4294967295|R>>>22),R=L+(E^(O|~I))+P[2]+718787259&4294967295,L=O+(R<<15&4294967295|R>>>17),R=I+(O^(L|~E))+P[9]+3951481745&4294967295,v.g[0]=v.g[0]+E&4294967295,v.g[1]=v.g[1]+(L+(R<<21&4294967295|R>>>11))&4294967295,v.g[2]=v.g[2]+L&4294967295,v.g[3]=v.g[3]+O&4294967295}r.prototype.u=function(v,E){E===void 0&&(E=v.length);for(var I=E-this.blockSize,P=this.B,L=this.h,O=0;Othis.h?this.blockSize:2*this.blockSize)-this.h);v[0]=128;for(var E=1;EE;++E)for(var P=0;32>P;P+=8)v[I++]=this.g[E]>>>P&255;return v};function o(v,E){var I=a;return Object.prototype.hasOwnProperty.call(I,v)?I[v]:I[v]=E(v)}function s(v,E){this.h=E;for(var I=[],P=!0,L=v.length-1;0<=L;L--){var O=v[L]|0;P&&O==E||(I[L]=O,P=!1)}this.g=I}var a={};function l(v){return-128<=v&&128>v?o(v,function(E){return new s([E|0],0>E?-1:0)}):new s([v|0],0>v?-1:0)}function c(v){if(isNaN(v)||!isFinite(v))return f;if(0>v)return C(c(-v));for(var E=[],I=1,P=0;v>=I;P++)E[P]=v/I|0,I*=4294967296;return new s(E,0)}function h(v,E){if(v.length==0)throw Error("number format error: empty string");if(E=E||10,2>E||36O?(O=c(Math.pow(E,O)),P=P.j(O).add(c(R))):(P=P.j(I),P=P.add(c(R)))}return P}var f=l(0),p=l(1),g=l(16777216);t=s.prototype,t.m=function(){if(b(this))return-C(this).m();for(var v=0,E=1,I=0;Iv||36>>0).toString(v);if(I=L,w(I))return O+P;for(;6>O.length;)O="0"+O;P=O+P}},t.i=function(v){return 0>v?0:v>>16)+(this.i(L)>>>16)+(v.i(L)>>>16);P=R>>>16,O&=65535,R&=65535,I[L]=R<<16|O}return new s(I,I[I.length-1]&-2147483648?-1:0)};function T(v,E){return v.add(C(E))}t.j=function(v){if(w(this)||w(v))return f;if(b(this))return b(v)?C(this).j(C(v)):C(C(this).j(v));if(b(v))return C(this.j(C(v)));if(0>this.l(g)&&0>v.l(g))return c(this.m()*v.m());for(var E=this.g.length+v.g.length,I=[],P=0;P<2*E;P++)I[P]=0;for(P=0;P>>16,R=this.i(P)&65535,U=v.i(L)>>>16,$=v.i(L)&65535;I[2*P+2*L]+=R*$,y(I,2*P+2*L),I[2*P+2*L+1]+=O*$,y(I,2*P+2*L+1),I[2*P+2*L+1]+=R*U,y(I,2*P+2*L+1),I[2*P+2*L+2]+=O*U,y(I,2*P+2*L+2)}for(P=0;P>>16,v[E]&=65535,E++}function _(v,E){this.g=v,this.h=E}function S(v,E){if(w(E))throw Error("division by zero");if(w(v))return new _(f,f);if(b(v))return E=S(C(v),E),new _(C(E.g),C(E.h));if(b(E))return E=S(v,C(E)),new _(C(E.g),E.h);if(30=P.l(v);)I=N(I),P=N(P);var L=D(I,1),O=D(P,1);for(P=D(P,2),I=D(I,2);!w(P);){var R=O.add(P);0>=R.l(v)&&(L=L.add(I),O=R),P=D(P,1),I=D(I,1)}return E=T(v,L.j(E)),new _(L,E)}for(L=f;0<=v.l(E);){for(I=Math.max(1,Math.floor(v.m()/E.m())),P=Math.ceil(Math.log(I)/Math.LN2),P=48>=P?1:Math.pow(2,P-48),O=c(I),R=O.j(E);b(R)||0>>31;return new s(I,v.h)}function D(v,E){var I=E>>5;E%=32;for(var P=v.g.length-I,L=[],O=0;O>>E|v.i(O+I+1)<<32-E:v.i(O+I);return new s(L,v.h)}r.prototype.digest=r.prototype.v,r.prototype.reset=r.prototype.s,r.prototype.update=r.prototype.u,XA=r,s.prototype.add=s.prototype.add,s.prototype.multiply=s.prototype.j,s.prototype.modulo=s.prototype.A,s.prototype.compare=s.prototype.l,s.prototype.toNumber=s.prototype.m,s.prototype.toString=s.prototype.toString,s.prototype.getBits=s.prototype.i,s.fromNumber=c,s.fromString=h,Qs=s}).apply(typeof DE<"u"?DE:typeof self<"u"?self:typeof window<"u"?window:{});var Th=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/** @license Copyright The Closure Library Authors. SPDX-License-Identifier: Apache-2.0 */var JA,Wc,ZA,nf,u0,eN,tN,nN;(function(){var t,e=typeof Object.defineProperties=="function"?Object.defineProperty:function(d,m,k){return d==Array.prototype||d==Object.prototype||(d[m]=k.value),d};function n(d){d=[typeof globalThis=="object"&&globalThis,d,typeof window=="object"&&window,typeof self=="object"&&self,typeof Th=="object"&&Th];for(var m=0;m{throw d},0)}function R(){var d=W;let m=null;return d.g&&(m=d.g,d.g=d.g.next,d.g||(d.h=null),m.next=null),m}class U{constructor(){this.h=this.g=null}add(m,k){const A=$.get();A.set(m,k),this.h?this.h.next=A:this.g=A,this.h=A}}var $=new T(()=>new z,d=>d.reset());class z{constructor(){this.next=this.g=this.h=null}set(m,k){this.h=m,this.g=k,this.next=null}reset(){this.next=this.g=this.h=null}}let j,V=!1,W=new U,Y=()=>{const d=a.Promise.resolve(void 0);j=()=>{d.then(J)}};var J=()=>{for(var d;d=R();){try{d.h.call(d.g)}catch(k){O(k)}var m=$;m.j(d),100>m.h&&(m.h++,d.next=m.g,m.g=d)}V=!1};function te(){this.s=this.s,this.C=this.C}te.prototype.s=!1,te.prototype.ma=function(){this.s||(this.s=!0,this.N())},te.prototype.N=function(){if(this.C)for(;this.C.length;)this.C.shift()()};function se(d,m){this.type=d,this.g=this.target=m,this.defaultPrevented=!1}se.prototype.h=function(){this.defaultPrevented=!0};var ae=function(){if(!a.addEventListener||!Object.defineProperty)return!1;var d=!1,m=Object.defineProperty({},"passive",{get:function(){d=!0}});try{const k=()=>{};a.addEventListener("test",k,m),a.removeEventListener("test",k,m)}catch{}return d}();function ke(d,m){if(se.call(this,d?d.type:""),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.pointerId=0,this.pointerType="",this.i=null,d){var k=this.type=d.type,A=d.changedTouches&&d.changedTouches.length?d.changedTouches[0]:null;if(this.target=d.target||d.srcElement,this.g=m,m=d.relatedTarget){if(N){e:{try{S(m.nodeName);var G=!0;break e}catch{}G=!1}G||(m=null)}}else k=="mouseover"?m=d.fromElement:k=="mouseout"&&(m=d.toElement);this.relatedTarget=m,A?(this.clientX=A.clientX!==void 0?A.clientX:A.pageX,this.clientY=A.clientY!==void 0?A.clientY:A.pageY,this.screenX=A.screenX||0,this.screenY=A.screenY||0):(this.clientX=d.clientX!==void 0?d.clientX:d.pageX,this.clientY=d.clientY!==void 0?d.clientY:d.pageY,this.screenX=d.screenX||0,this.screenY=d.screenY||0),this.button=d.button,this.key=d.key||"",this.ctrlKey=d.ctrlKey,this.altKey=d.altKey,this.shiftKey=d.shiftKey,this.metaKey=d.metaKey,this.pointerId=d.pointerId||0,this.pointerType=typeof d.pointerType=="string"?d.pointerType:Te[d.pointerType]||"",this.state=d.state,this.i=d,d.defaultPrevented&&ke.aa.h.call(this)}}w(ke,se);var Te={2:"touch",3:"pen",4:"mouse"};ke.prototype.h=function(){ke.aa.h.call(this);var d=this.i;d.preventDefault?d.preventDefault():d.returnValue=!1};var Oe="closure_listenable_"+(1e6*Math.random()|0),pt=0;function at(d,m,k,A,G){this.listener=d,this.proxy=null,this.src=m,this.type=k,this.capture=!!A,this.ha=G,this.key=++pt,this.da=this.fa=!1}function yt(d){d.da=!0,d.listener=null,d.proxy=null,d.src=null,d.ha=null}function Re(d){this.src=d,this.g={},this.h=0}Re.prototype.add=function(d,m,k,A,G){var K=d.toString();d=this.g[K],d||(d=this.g[K]=[],this.h++);var ne=Ce(d,m,A,G);return-1>>0);function Fn(d){return typeof d=="function"?d:(d[Gt]||(d[Gt]=function(m){return d.handleEvent(m)}),d[Gt])}function st(){te.call(this),this.i=new Re(this),this.M=this,this.F=null}w(st,te),st.prototype[Oe]=!0,st.prototype.removeEventListener=function(d,m,k,A){pn(this,d,m,k,A)};function Ee(d,m){var k,A=d.F;if(A)for(k=[];A;A=A.F)k.push(A);if(d=d.M,A=m.type||m,typeof m=="string")m=new se(m,d);else if(m instanceof se)m.target=m.target||d;else{var G=m;m=new se(A,d),P(m,G)}if(G=!0,k)for(var K=k.length-1;0<=K;K--){var ne=m.g=k[K];G=pe(ne,A,!0,m)&&G}if(ne=m.g=d,G=pe(ne,A,!0,m)&&G,G=pe(ne,A,!1,m)&&G,k)for(K=0;K{d.g=null,d.i&&(d.i=!1,cr(d))},d.l);const m=d.h;d.h=null,d.m.apply(null,m)}class Ni extends te{constructor(m,k){super(),this.m=m,this.l=k,this.h=null,this.i=!1,this.g=null}j(m){this.h=arguments,this.g?this.i=!0:cr(this)}N(){super.N(),this.g&&(a.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function he(d){te.call(this),this.h=d,this.g={}}w(he,te);var Ze=[];function Pt(d){D(d.g,function(m,k){this.g.hasOwnProperty(k)&<(m)},d),d.g={}}he.prototype.N=function(){he.aa.N.call(this),Pt(this)},he.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")};var ur=a.JSON.stringify,va=a.JSON.parse,Od=class{stringify(d){return a.JSON.stringify(d,void 0)}parse(d){return a.JSON.parse(d,void 0)}};function go(){}go.prototype.h=null;function rc(d){return d.h||(d.h=d.i())}function wa(){}var Mi={OPEN:"a",kb:"b",Ja:"c",wb:"d"};function ic(){se.call(this,"d")}w(ic,se);function ba(){se.call(this,"c")}w(ba,se);var Di={},oc=null;function Oi(){return oc=oc||new st}Di.La="serverreachability";function _s(d){se.call(this,Di.La,d)}w(_s,se);function xs(d){const m=Oi();Ee(m,new _s(m))}Di.STAT_EVENT="statevent";function Ld(d,m){se.call(this,Di.STAT_EVENT,d),this.stat=m}w(Ld,se);function B(d){const m=Oi();Ee(m,new Ld(m,d))}Di.Ma="timingevent";function H(d,m){se.call(this,Di.Ma,d),this.size=m}w(H,se);function q(d,m){if(typeof d!="function")throw Error("Fn must not be null and must be a function");return a.setTimeout(function(){d()},m)}function X(){this.g=!0}X.prototype.xa=function(){this.g=!1};function re(d,m,k,A,G,K){d.info(function(){if(d.g)if(K)for(var ne="",mt=K.split("&"),mn=0;mnA.length)){var G=A[1];if(Array.isArray(G)&&!(1>G.length)){var K=G[0];if(K!="noop"&&K!="stop"&&K!="close")for(var ne=1;neCn)&&(Cn!=3||this.g&&(this.h.h||this.g.oa()||jb(this.g)))){this.J||Cn!=4||m==7||(m==8||0>=Ta?xs(3):xs(2)),qr(this);var k=this.g.Z();this.X=k;t:if(Cr(this)){var A=jb(this.g);d="";var G=A.length,K=Fi(this.g)==4;if(!this.h.i){if(typeof TextDecoder>"u"){Pr(this),hi(this);var ne="";break t}this.h.i=new a.TextDecoder}for(m=0;mm.length?wt:(m=m.slice(A,A+k),d.C=A+k,m)))}vt.prototype.cancel=function(){this.J=!0,Pr(this)};function vo(d){d.S=Date.now()+d.I,wo(d,d.I)}function wo(d,m){if(d.B!=null)throw Error("WatchDog timer not null");d.B=q(p(d.ba,d),m)}function qr(d){d.B&&(a.clearTimeout(d.B),d.B=null)}vt.prototype.ba=function(){this.B=null;const d=Date.now();0<=d-this.S?(fe(this.i,this.A),this.L!=2&&(xs(),B(17)),Pr(this),this.s=2,hi(this)):wo(this,this.S-d)};function hi(d){d.j.G==0||d.J||Qb(d.j,d)}function Pr(d){qr(d);var m=d.M;m&&typeof m.ma=="function"&&m.ma(),d.M=null,Pt(d.U),d.g&&(m=d.g,d.g=null,m.abort(),m.ma())}function We(d,m){try{var k=d.j;if(k.G!=0&&(k.g==d||fi(k.h,d))){if(!d.K&&fi(k.h,d)&&k.G==3){try{var A=k.Da.g.parse(m)}catch{A=null}if(Array.isArray(A)&&A.length==3){var G=A;if(G[0]==0){e:if(!k.u){if(k.g)if(k.g.F+3e3G[2]&&k.F&&k.v==0&&!k.C&&(k.C=q(p(k.Za,k),6e3));if(1>=Rt(k.h)&&k.ca){try{k.ca()}catch{}k.ca=void 0}}else Ts(k,11)}else if((d.K||k.g==d)&&Gd(k),!y(m))for(G=k.Da.g.parse(m),m=0;m=d.j:!1}function Rt(d){return d.h?1:d.g?d.g.size:0}function fi(d,m){return d.h?d.h==m:d.g?d.g.has(m):!1}function _a(d,m){d.g?d.g.add(m):d.h=m}function Vd(d,m){d.h&&d.h==m?d.h=null:d.g&&d.g.has(m)&&d.g.delete(m)}Li.prototype.cancel=function(){if(this.i=Pb(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&this.g.size!==0){for(const d of this.g.values())d.cancel();this.g.clear()}};function Pb(d){if(d.h!=null)return d.i.concat(d.h.D);if(d.g!=null&&d.g.size!==0){let m=d.i;for(const k of d.g.values())m=m.concat(k.D);return m}return b(d.i)}function PM(d){if(d.V&&typeof d.V=="function")return d.V();if(typeof Map<"u"&&d instanceof Map||typeof Set<"u"&&d instanceof Set)return Array.from(d.values());if(typeof d=="string")return d.split("");if(l(d)){for(var m=[],k=d.length,A=0;Am)throw Error("Bad port number "+m);d.s=m}else d.s=null}function Nb(d,m,k){m instanceof lc?(d.i=m,VM(d.i,d.h)):(k||(m=ac(m,OM)),d.i=new lc(m,d.h))}function _t(d,m,k){d.i.set(m,k)}function Bd(d){return _t(d,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),d}function sc(d,m){return d?m?decodeURI(d.replace(/%25/g,"%2525")):decodeURIComponent(d):""}function ac(d,m,k){return typeof d=="string"?(d=encodeURI(d).replace(m,NM),k&&(d=d.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),d):null}function NM(d){return d=d.charCodeAt(0),"%"+(d>>4&15).toString(16)+(d&15).toString(16)}var Mb=/[#\/\?@]/g,MM=/[#\?:]/g,DM=/[#\?]/g,OM=/[#\?@]/g,LM=/#/g;function lc(d,m){this.h=this.g=null,this.i=d||null,this.j=!!m}function _o(d){d.g||(d.g=new Map,d.h=0,d.i&&AM(d.i,function(m,k){d.add(decodeURIComponent(m.replace(/\+/g," ")),k)}))}t=lc.prototype,t.add=function(d,m){_o(this),this.i=null,d=xa(this,d);var k=this.g.get(d);return k||this.g.set(d,k=[]),k.push(m),this.h+=1,this};function Db(d,m){_o(d),m=xa(d,m),d.g.has(m)&&(d.i=null,d.h-=d.g.get(m).length,d.g.delete(m))}function Ob(d,m){return _o(d),m=xa(d,m),d.g.has(m)}t.forEach=function(d,m){_o(this),this.g.forEach(function(k,A){k.forEach(function(G){d.call(m,G,A,this)},this)},this)},t.na=function(){_o(this);const d=Array.from(this.g.values()),m=Array.from(this.g.keys()),k=[];for(let A=0;A{A.abort(),xo(k,"TestPingServer: timeout",!1,m)},1e4);fetch(d,{signal:A.signal}).then(K=>{clearTimeout(G),K.ok?xo(k,"TestPingServer: ok",!0,m):xo(k,"TestPingServer: server error",!1,m)}).catch(()=>{clearTimeout(G),xo(k,"TestPingServer: error",!1,m)})}function xo(d,m,k,A,G){try{G&&(G.onload=null,G.onerror=null,G.onabort=null,G.ontimeout=null),A(k)}catch{}}function BM(){this.g=new Od}function UM(d,m,k){const A=k||"";try{Rb(d,function(G,K){let ne=G;c(G)&&(ne=ur(G)),m.push(A+K+"="+encodeURIComponent(ne))})}catch(G){throw m.push(A+"type="+encodeURIComponent("_badmap")),G}}function Ud(d){this.l=d.Ub||null,this.j=d.eb||!1}w(Ud,go),Ud.prototype.g=function(){return new zd(this.l,this.j)},Ud.prototype.i=function(d){return function(){return d}}({});function zd(d,m){st.call(this),this.D=d,this.o=m,this.m=void 0,this.status=this.readyState=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.u=new Headers,this.h=null,this.B="GET",this.A="",this.g=!1,this.v=this.j=this.l=null}w(zd,st),t=zd.prototype,t.open=function(d,m){if(this.readyState!=0)throw this.abort(),Error("Error reopening a connection");this.B=d,this.A=m,this.readyState=1,uc(this)},t.send=function(d){if(this.readyState!=1)throw this.abort(),Error("need to call open() first. ");this.g=!0;const m={headers:this.u,method:this.B,credentials:this.m,cache:void 0};d&&(m.body=d),(this.D||a).fetch(new Request(this.A,m)).then(this.Sa.bind(this),this.ga.bind(this))},t.abort=function(){this.response=this.responseText="",this.u=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted.").catch(()=>{}),1<=this.readyState&&this.g&&this.readyState!=4&&(this.g=!1,cc(this)),this.readyState=0},t.Sa=function(d){if(this.g&&(this.l=d,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=d.headers,this.readyState=2,uc(this)),this.g&&(this.readyState=3,uc(this),this.g)))if(this.responseType==="arraybuffer")d.arrayBuffer().then(this.Qa.bind(this),this.ga.bind(this));else if(typeof a.ReadableStream<"u"&&"body"in d){if(this.j=d.body.getReader(),this.o){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.v=new TextDecoder;Vb(this)}else d.text().then(this.Ra.bind(this),this.ga.bind(this))};function Vb(d){d.j.read().then(d.Pa.bind(d)).catch(d.ga.bind(d))}t.Pa=function(d){if(this.g){if(this.o&&d.value)this.response.push(d.value);else if(!this.o){var m=d.value?d.value:new Uint8Array(0);(m=this.v.decode(m,{stream:!d.done}))&&(this.response=this.responseText+=m)}d.done?cc(this):uc(this),this.readyState==3&&Vb(this)}},t.Ra=function(d){this.g&&(this.response=this.responseText=d,cc(this))},t.Qa=function(d){this.g&&(this.response=d,cc(this))},t.ga=function(){this.g&&cc(this)};function cc(d){d.readyState=4,d.l=null,d.j=null,d.v=null,uc(d)}t.setRequestHeader=function(d,m){this.u.append(d,m)},t.getResponseHeader=function(d){return this.h&&this.h.get(d.toLowerCase())||""},t.getAllResponseHeaders=function(){if(!this.h)return"";const d=[],m=this.h.entries();for(var k=m.next();!k.done;)k=k.value,d.push(k[0]+": "+k[1]),k=m.next();return d.join(`\r `)};function uc(d){d.onreadystatechange&&d.onreadystatechange.call(d)}Object.defineProperty(zd.prototype,"withCredentials",{get:function(){return this.m==="include"},set:function(d){this.m=d?"include":"same-origin"}});function Fb(d){let m="";return D(d,function(k,A){m+=A,m+=":",m+=k,m+=`\r `}),m}function cg(d,m,k){e:{for(A in k){var A=!1;break e}A=!0}A||(k=Fb(k),typeof d=="string"?k!=null&&encodeURIComponent(String(k)):_t(d,m,k))}function Lt(d){st.call(this),this.headers=new Map,this.o=d||null,this.h=!1,this.v=this.g=null,this.D="",this.m=0,this.l="",this.j=this.B=this.u=this.A=!1,this.I=null,this.H="",this.J=!1}w(Lt,st);var zM=/^https?$/i,jM=["POST","PUT"];t=Lt.prototype,t.Ha=function(d){this.J=d},t.ea=function(d,m,k,A){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.D+"; newUri="+d);m=m?m.toUpperCase():"GET",this.D=d,this.l="",this.m=0,this.A=!1,this.h=!0,this.g=this.o?this.o.g():Ae.g(),this.v=this.o?rc(this.o):rc(Ae),this.g.onreadystatechange=p(this.Ea,this);try{this.B=!0,this.g.open(m,String(d),!0),this.B=!1}catch(K){$b(this,K);return}if(d=k||"",k=new Map(this.headers),A)if(Object.getPrototypeOf(A)===Object.prototype)for(var G in A)k.set(G,A[G]);else if(typeof A.keys=="function"&&typeof A.get=="function")for(const K of A.keys())k.set(K,A.get(K));else throw Error("Unknown input type for opt_headers: "+String(A));A=Array.from(k.keys()).find(K=>K.toLowerCase()=="content-type"),G=a.FormData&&d instanceof a.FormData,!(0<=Array.prototype.indexOf.call(jM,m,void 0))||A||G||k.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const[K,ne]of k)this.g.setRequestHeader(K,ne);this.H&&(this.g.responseType=this.H),"withCredentials"in this.g&&this.g.withCredentials!==this.J&&(this.g.withCredentials=this.J);try{zb(this),this.u=!0,this.g.send(d),this.u=!1}catch(K){$b(this,K)}};function $b(d,m){d.h=!1,d.g&&(d.j=!0,d.g.abort(),d.j=!1),d.l=m,d.m=5,Bb(d),jd(d)}function Bb(d){d.A||(d.A=!0,Ee(d,"complete"),Ee(d,"error"))}t.abort=function(d){this.g&&this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1,this.m=d||7,Ee(this,"complete"),Ee(this,"abort"),jd(this))},t.N=function(){this.g&&(this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1),jd(this,!0)),Lt.aa.N.call(this)},t.Ea=function(){this.s||(this.B||this.u||this.j?Ub(this):this.bb())},t.bb=function(){Ub(this)};function Ub(d){if(d.h&&typeof s<"u"&&(!d.v[1]||Fi(d)!=4||d.Z()!=2)){if(d.u&&Fi(d)==4)$n(d.Ea,0,d);else if(Ee(d,"readystatechange"),Fi(d)==4){d.h=!1;try{const ne=d.Z();e:switch(ne){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var m=!0;break e;default:m=!1}var k;if(!(k=m)){var A;if(A=ne===0){var G=String(d.D).match(Ab)[1]||null;!G&&a.self&&a.self.location&&(G=a.self.location.protocol.slice(0,-1)),A=!zM.test(G?G.toLowerCase():"")}k=A}if(k)Ee(d,"complete"),Ee(d,"success");else{d.m=6;try{var K=2{}:null;d.g=null,d.v=null,m||Ee(d,"ready");try{k.onreadystatechange=A}catch{}}}function zb(d){d.I&&(a.clearTimeout(d.I),d.I=null)}t.isActive=function(){return!!this.g};function Fi(d){return d.g?d.g.readyState:0}t.Z=function(){try{return 2=d.h.j-(d.s?1:0)?!1:d.s?(d.i=m.D.concat(d.i),!0):d.G==1||d.G==2||d.B>=(d.Va?0:d.Wa)?!1:(d.s=q(p(d.Ga,d,m),Xb(d,d.B)),d.B++,!0)}t.Ga=function(d){if(this.s)if(this.s=null,this.G==1){if(!d){this.U=Math.floor(1e5*Math.random()),d=this.U++;const G=new vt(this,this.j,d);let K=this.o;if(this.S&&(K?(K=E(K),P(K,this.S)):K=this.S),this.m!==null||this.O||(G.H=K,K=null),this.P)e:{for(var m=0,k=0;kXe)K=Math.max(0,G[mn].g-100),mt=!1;else try{UM(Sn,ne,"req"+Xe+"_")}catch{A&&A(Sn)}}if(mt){A=ne.join("&");break e}}}return d=d.i.splice(0,k),m.D=d,A}function Kb(d){if(!d.g&&!d.u){d.Y=1;var m=d.Fa;j||Y(),V||(j(),V=!0),W.add(m,d),d.v=0}}function dg(d){return d.g||d.u||3<=d.v?!1:(d.Y++,d.u=q(p(d.Fa,d),Xb(d,d.v)),d.v++,!0)}t.Fa=function(){if(this.u=null,Yb(this),this.ba&&!(this.M||this.g==null||0>=this.R)){var d=2*this.R;this.j.info("BP detection timer enabled: "+d),this.A=q(p(this.ab,this),d)}},t.ab=function(){this.A&&(this.A=null,this.j.info("BP detection timeout reached."),this.j.info("Buffering proxy detected and switch to long-polling!"),this.F=!1,this.M=!0,B(10),Wd(this),Yb(this))};function hg(d){d.A!=null&&(a.clearTimeout(d.A),d.A=null)}function Yb(d){d.g=new vt(d,d.j,"rpc",d.Y),d.m===null&&(d.g.H=d.o),d.g.O=0;var m=Vi(d.qa);_t(m,"RID","rpc"),_t(m,"SID",d.K),_t(m,"AID",d.T),_t(m,"CI",d.F?"0":"1"),!d.F&&d.ja&&_t(m,"TO",d.ja),_t(m,"TYPE","xmlhttp"),hc(d,m),d.m&&d.o&&cg(m,d.m,d.o),d.L&&(d.g.I=d.L);var k=d.g;d=d.ia,k.L=1,k.v=Bd(Vi(m)),k.m=null,k.P=!0,yo(k,d)}t.Za=function(){this.C!=null&&(this.C=null,Wd(this),dg(this),B(19))};function Gd(d){d.C!=null&&(a.clearTimeout(d.C),d.C=null)}function Qb(d,m){var k=null;if(d.g==m){Gd(d),hg(d),d.g=null;var A=2}else if(fi(d.h,m))k=m.D,Vd(d.h,m),A=1;else return;if(d.G!=0){if(m.o)if(A==1){k=m.m?m.m.length:0,m=Date.now()-m.F;var G=d.B;A=Oi(),Ee(A,new H(A,k)),Hd(d)}else Kb(d);else if(G=m.s,G==3||G==0&&0`${this.name}: [code=${this.code}]: ${this.message}`}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Zi{constructor(){this.promise=new Promise((e,n)=>{this.resolve=e,this.reject=n})}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class rN{constructor(e,n){this.user=n,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${e}`)}}class tJ{getToken(){return Promise.resolve(null)}invalidateToken(){}start(e,n){e.enqueueRetryable(()=>n(Nn.UNAUTHENTICATED))}shutdown(){}}class nJ{constructor(e){this.token=e,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(e,n){this.changeListener=n,e.enqueueRetryable(()=>n(this.token.user))}shutdown(){this.changeListener=null}}class rJ{constructor(e){this.t=e,this.currentUser=Nn.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(e,n){ht(this.o===void 0);let r=this.i;const i=l=>this.i!==r?(r=this.i,n(l)):Promise.resolve();let o=new Zi;this.o=()=>{this.i++,this.currentUser=this.u(),o.resolve(),o=new Zi,e.enqueueRetryable(()=>i(this.currentUser))};const s=()=>{const l=o;e.enqueueRetryable(async()=>{await l.promise,await i(this.currentUser)})},a=l=>{ge("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=l,this.o&&(this.auth.addAuthTokenListener(this.o),s())};this.t.onInit(l=>a(l)),setTimeout(()=>{if(!this.auth){const l=this.t.getImmediate({optional:!0});l?a(l):(ge("FirebaseAuthCredentialsProvider","Auth not yet detected"),o.resolve(),o=new Zi)}},0),s()}getToken(){const e=this.i,n=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(n).then(r=>this.i!==e?(ge("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):r?(ht(typeof r.accessToken=="string"),new rN(r.accessToken,this.currentUser)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.o&&this.auth.removeAuthTokenListener(this.o),this.o=void 0}u(){const e=this.auth&&this.auth.getUid();return ht(e===null||typeof e=="string"),new Nn(e)}}class iJ{constructor(e,n,r){this.l=e,this.h=n,this.P=r,this.type="FirstParty",this.user=Nn.FIRST_PARTY,this.I=new Map}T(){return this.P?this.P():null}get headers(){this.I.set("X-Goog-AuthUser",this.l);const e=this.T();return e&&this.I.set("Authorization",e),this.h&&this.I.set("X-Goog-Iam-Authorization-Token",this.h),this.I}}class oJ{constructor(e,n,r){this.l=e,this.h=n,this.P=r}getToken(){return Promise.resolve(new iJ(this.l,this.h,this.P))}start(e,n){e.enqueueRetryable(()=>n(Nn.FIRST_PARTY))}shutdown(){}invalidateToken(){}}class sJ{constructor(e){this.value=e,this.type="AppCheck",this.headers=new Map,e&&e.length>0&&this.headers.set("x-firebase-appcheck",this.value)}}class aJ{constructor(e){this.A=e,this.forceRefresh=!1,this.appCheck=null,this.R=null}start(e,n){ht(this.o===void 0);const r=o=>{o.error!=null&&ge("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${o.error.message}`);const s=o.token!==this.R;return this.R=o.token,ge("FirebaseAppCheckTokenProvider",`Received ${s?"new":"existing"} token.`),s?n(o.token):Promise.resolve()};this.o=o=>{e.enqueueRetryable(()=>r(o))};const i=o=>{ge("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=o,this.o&&this.appCheck.addTokenListener(this.o)};this.A.onInit(o=>i(o)),setTimeout(()=>{if(!this.appCheck){const o=this.A.getImmediate({optional:!0});o?i(o):ge("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}},0)}getToken(){const e=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(e).then(n=>n?(ht(typeof n.token=="string"),this.R=n.token,new sJ(n.token)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.o&&this.appCheck.removeTokenListener(this.o),this.o=void 0}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function lJ(t){const e=typeof self<"u"&&(self.crypto||self.msCrypto),n=new Uint8Array(t);if(e&&typeof e.getRandomValues=="function")e.getRandomValues(n);else for(let r=0;re?1:0}function Nl(t,e,n){return t.length===e.length&&t.every((r,i)=>n(r,e[i]))}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class sn{constructor(e,n){if(this.seconds=e,this.nanoseconds=n,n<0)throw new ue(Q.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(n>=1e9)throw new ue(Q.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(e<-62135596800)throw new ue(Q.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e);if(e>=253402300800)throw new ue(Q.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}static now(){return sn.fromMillis(Date.now())}static fromDate(e){return sn.fromMillis(e.getTime())}static fromMillis(e){const n=Math.floor(e/1e3),r=Math.floor(1e6*(e-1e3*n));return new sn(n,r)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo(e){return this.seconds===e.seconds?Je(this.nanoseconds,e.nanoseconds):Je(this.seconds,e.seconds)}isEqual(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}}valueOf(){const e=this.seconds- -62135596800;return String(e).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Me{constructor(e){this.timestamp=e}static fromTimestamp(e){return new Me(e)}static min(){return new Me(new sn(0,0))}static max(){return new Me(new sn(253402300799,999999999))}compareTo(e){return this.timestamp._compareTo(e.timestamp)}isEqual(e){return this.timestamp.isEqual(e.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Qu{constructor(e,n,r){n===void 0?n=0:n>e.length&&Pe(),r===void 0?r=e.length-n:r>e.length-n&&Pe(),this.segments=e,this.offset=n,this.len=r}get length(){return this.len}isEqual(e){return Qu.comparator(this,e)===0}child(e){const n=this.segments.slice(this.offset,this.limit());return e instanceof Qu?e.forEach(r=>{n.push(r)}):n.push(e),this.construct(n)}limit(){return this.offset+this.length}popFirst(e){return e=e===void 0?1:e,this.construct(this.segments,this.offset+e,this.length-e)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(e){return this.segments[this.offset+e]}isEmpty(){return this.length===0}isPrefixOf(e){if(e.lengths)return 1}return e.lengthn.length?1:0}}class kt extends Qu{construct(e,n,r){return new kt(e,n,r)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}toUriEncodedString(){return this.toArray().map(encodeURIComponent).join("/")}static fromString(...e){const n=[];for(const r of e){if(r.indexOf("//")>=0)throw new ue(Q.INVALID_ARGUMENT,`Invalid segment (${r}). Paths must not contain // in them.`);n.push(...r.split("/").filter(i=>i.length>0))}return new kt(n)}static emptyPath(){return new kt([])}}const cJ=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class bn extends Qu{construct(e,n,r){return new bn(e,n,r)}static isValidIdentifier(e){return cJ.test(e)}canonicalString(){return this.toArray().map(e=>(e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),bn.isValidIdentifier(e)||(e="`"+e+"`"),e)).join(".")}toString(){return this.canonicalString()}isKeyField(){return this.length===1&&this.get(0)==="__name__"}static keyField(){return new bn(["__name__"])}static fromServerFormat(e){const n=[];let r="",i=0;const o=()=>{if(r.length===0)throw new ue(Q.INVALID_ARGUMENT,`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);n.push(r),r=""};let s=!1;for(;i=2&&this.path.get(this.path.length-2)===e}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(e){return e!==null&&kt.comparator(this.path,e.path)===0}toString(){return this.path.toString()}static comparator(e,n){return kt.comparator(e.path,n.path)}static isDocumentKey(e){return e.length%2==0}static fromSegments(e){return new _e(new kt(e.slice()))}}function uJ(t,e){const n=t.toTimestamp().seconds,r=t.toTimestamp().nanoseconds+1,i=Me.fromTimestamp(r===1e9?new sn(n+1,0):new sn(n,r));return new ds(i,_e.empty(),e)}function dJ(t){return new ds(t.readTime,t.key,-1)}class ds{constructor(e,n,r){this.readTime=e,this.documentKey=n,this.largestBatchId=r}static min(){return new ds(Me.min(),_e.empty(),-1)}static max(){return new ds(Me.max(),_e.empty(),-1)}}function hJ(t,e){let n=t.readTime.compareTo(e.readTime);return n!==0?n:(n=_e.comparator(t.documentKey,e.documentKey),n!==0?n:Je(t.largestBatchId,e.largestBatchId))}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const fJ="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.";class pJ{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(e){this.onCommittedListeners.push(e)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach(e=>e())}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */async function Pd(t){if(t.code!==Q.FAILED_PRECONDITION||t.message!==fJ)throw t;ge("LocalStore","Unexpectedly lost primary lease")}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Z{constructor(e){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,e(n=>{this.isDone=!0,this.result=n,this.nextCallback&&this.nextCallback(n)},n=>{this.isDone=!0,this.error=n,this.catchCallback&&this.catchCallback(n)})}catch(e){return this.next(void 0,e)}next(e,n){return this.callbackAttached&&Pe(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(n,this.error):this.wrapSuccess(e,this.result):new Z((r,i)=>{this.nextCallback=o=>{this.wrapSuccess(e,o).next(r,i)},this.catchCallback=o=>{this.wrapFailure(n,o).next(r,i)}})}toPromise(){return new Promise((e,n)=>{this.next(e,n)})}wrapUserFunction(e){try{const n=e();return n instanceof Z?n:Z.resolve(n)}catch(n){return Z.reject(n)}}wrapSuccess(e,n){return e?this.wrapUserFunction(()=>e(n)):Z.resolve(n)}wrapFailure(e,n){return e?this.wrapUserFunction(()=>e(n)):Z.reject(n)}static resolve(e){return new Z((n,r)=>{n(e)})}static reject(e){return new Z((n,r)=>{r(e)})}static waitFor(e){return new Z((n,r)=>{let i=0,o=0,s=!1;e.forEach(a=>{++i,a.next(()=>{++o,s&&o===i&&n()},l=>r(l))}),s=!0,o===i&&n()})}static or(e){let n=Z.resolve(!1);for(const r of e)n=n.next(i=>i?Z.resolve(i):r());return n}static forEach(e,n){const r=[];return e.forEach((i,o)=>{r.push(n.call(this,i,o))}),this.waitFor(r)}static mapArray(e,n){return new Z((r,i)=>{const o=e.length,s=new Array(o);let a=0;for(let l=0;l{s[c]=h,++a,a===o&&r(s)},h=>i(h))}})}static doWhile(e,n){return new Z((r,i)=>{const o=()=>{e()===!0?n().next(()=>{o()},i):r()};o()})}}function mJ(t){const e=t.match(/Android ([\d.]+)/i),n=e?e[1].split(".").slice(0,2).join("."):"-1";return Number(n)}function Rd(t){return t.name==="IndexedDbTransactionError"}/** * @license * Copyright 2018 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Hw{constructor(e,n){this.previousValue=e,n&&(n.sequenceNumberHandler=r=>this.ie(r),this.se=r=>n.writeSequenceNumber(r))}ie(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}next(){const e=++this.previousValue;return this.se&&this.se(e),e}}Hw.oe=-1;function Ym(t){return t==null}function dp(t){return t===0&&1/t==-1/0}function gJ(t){return typeof t=="number"&&Number.isInteger(t)&&!dp(t)&&t<=Number.MAX_SAFE_INTEGER&&t>=Number.MIN_SAFE_INTEGER}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function LE(t){let e=0;for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&e++;return e}function Zl(t,e){for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(n,t[n])}function oN(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Ot{constructor(e,n){this.comparator=e,this.root=n||vn.EMPTY}insert(e,n){return new Ot(this.comparator,this.root.insert(e,n,this.comparator).copy(null,null,vn.BLACK,null,null))}remove(e){return new Ot(this.comparator,this.root.remove(e,this.comparator).copy(null,null,vn.BLACK,null,null))}get(e){let n=this.root;for(;!n.isEmpty();){const r=this.comparator(e,n.key);if(r===0)return n.value;r<0?n=n.left:r>0&&(n=n.right)}return null}indexOf(e){let n=0,r=this.root;for(;!r.isEmpty();){const i=this.comparator(e,r.key);if(i===0)return n+r.left.size;i<0?r=r.left:(n+=r.left.size+1,r=r.right)}return-1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(e){return this.root.inorderTraversal(e)}forEach(e){this.inorderTraversal((n,r)=>(e(n,r),!1))}toString(){const e=[];return this.inorderTraversal((n,r)=>(e.push(`${n}:${r}`),!1)),`{${e.join(", ")}}`}reverseTraversal(e){return this.root.reverseTraversal(e)}getIterator(){return new Eh(this.root,null,this.comparator,!1)}getIteratorFrom(e){return new Eh(this.root,e,this.comparator,!1)}getReverseIterator(){return new Eh(this.root,null,this.comparator,!0)}getReverseIteratorFrom(e){return new Eh(this.root,e,this.comparator,!0)}}class Eh{constructor(e,n,r,i){this.isReverse=i,this.nodeStack=[];let o=1;for(;!e.isEmpty();)if(o=n?r(e.key,n):1,n&&i&&(o*=-1),o<0)e=this.isReverse?e.left:e.right;else{if(o===0){this.nodeStack.push(e);break}this.nodeStack.push(e),e=this.isReverse?e.right:e.left}}getNext(){let e=this.nodeStack.pop();const n={key:e.key,value:e.value};if(this.isReverse)for(e=e.left;!e.isEmpty();)this.nodeStack.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack.push(e),e=e.left;return n}hasNext(){return this.nodeStack.length>0}peek(){if(this.nodeStack.length===0)return null;const e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}}}class vn{constructor(e,n,r,i,o){this.key=e,this.value=n,this.color=r??vn.RED,this.left=i??vn.EMPTY,this.right=o??vn.EMPTY,this.size=this.left.size+1+this.right.size}copy(e,n,r,i,o){return new vn(e??this.key,n??this.value,r??this.color,i??this.left,o??this.right)}isEmpty(){return!1}inorderTraversal(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)}reverseTraversal(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}min(){return this.left.isEmpty()?this:this.left.min()}minKey(){return this.min().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(e,n,r){let i=this;const o=r(e,i.key);return i=o<0?i.copy(null,null,null,i.left.insert(e,n,r),null):o===0?i.copy(null,n,null,null,null):i.copy(null,null,null,null,i.right.insert(e,n,r)),i.fixUp()}removeMin(){if(this.left.isEmpty())return vn.EMPTY;let e=this;return e.left.isRed()||e.left.left.isRed()||(e=e.moveRedLeft()),e=e.copy(null,null,null,e.left.removeMin(),null),e.fixUp()}remove(e,n){let r,i=this;if(n(e,i.key)<0)i.left.isEmpty()||i.left.isRed()||i.left.left.isRed()||(i=i.moveRedLeft()),i=i.copy(null,null,null,i.left.remove(e,n),null);else{if(i.left.isRed()&&(i=i.rotateRight()),i.right.isEmpty()||i.right.isRed()||i.right.left.isRed()||(i=i.moveRedRight()),n(e,i.key)===0){if(i.right.isEmpty())return vn.EMPTY;r=i.right.min(),i=i.copy(r.key,r.value,null,null,i.right.removeMin())}i=i.copy(null,null,null,null,i.right.remove(e,n))}return i.fixUp()}isRed(){return this.color}fixUp(){let e=this;return e.right.isRed()&&!e.left.isRed()&&(e=e.rotateLeft()),e.left.isRed()&&e.left.left.isRed()&&(e=e.rotateRight()),e.left.isRed()&&e.right.isRed()&&(e=e.colorFlip()),e}moveRedLeft(){let e=this.colorFlip();return e.right.left.isRed()&&(e=e.copy(null,null,null,null,e.right.rotateRight()),e=e.rotateLeft(),e=e.colorFlip()),e}moveRedRight(){let e=this.colorFlip();return e.left.left.isRed()&&(e=e.rotateRight(),e=e.colorFlip()),e}rotateLeft(){const e=this.copy(null,null,vn.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight(){const e=this.copy(null,null,vn.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)}colorFlip(){const e=this.left.copy(null,null,!this.left.color,null,null),n=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,n)}checkMaxDepth(){const e=this.check();return Math.pow(2,e)<=this.size+1}check(){if(this.isRed()&&this.left.isRed()||this.right.isRed())throw Pe();const e=this.left.check();if(e!==this.right.check())throw Pe();return e+(this.isRed()?0:1)}}vn.EMPTY=null,vn.RED=!0,vn.BLACK=!1;vn.EMPTY=new class{constructor(){this.size=0}get key(){throw Pe()}get value(){throw Pe()}get color(){throw Pe()}get left(){throw Pe()}get right(){throw Pe()}copy(e,n,r,i,o){return this}insert(e,n,r){return new vn(e,n)}remove(e,n){return this}isEmpty(){return!0}inorderTraversal(e){return!1}reverseTraversal(e){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class xn{constructor(e){this.comparator=e,this.data=new Ot(this.comparator)}has(e){return this.data.get(e)!==null}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(e){return this.data.indexOf(e)}forEach(e){this.data.inorderTraversal((n,r)=>(e(n),!1))}forEachInRange(e,n){const r=this.data.getIteratorFrom(e[0]);for(;r.hasNext();){const i=r.getNext();if(this.comparator(i.key,e[1])>=0)return;n(i.key)}}forEachWhile(e,n){let r;for(r=n!==void 0?this.data.getIteratorFrom(n):this.data.getIterator();r.hasNext();)if(!e(r.getNext().key))return}firstAfterOrEqual(e){const n=this.data.getIteratorFrom(e);return n.hasNext()?n.getNext().key:null}getIterator(){return new VE(this.data.getIterator())}getIteratorFrom(e){return new VE(this.data.getIteratorFrom(e))}add(e){return this.copy(this.data.remove(e).insert(e,!0))}delete(e){return this.has(e)?this.copy(this.data.remove(e)):this}isEmpty(){return this.data.isEmpty()}unionWith(e){let n=this;return n.size{n=n.add(r)}),n}isEqual(e){if(!(e instanceof xn)||this.size!==e.size)return!1;const n=this.data.getIterator(),r=e.data.getIterator();for(;n.hasNext();){const i=n.getNext().key,o=r.getNext().key;if(this.comparator(i,o)!==0)return!1}return!0}toArray(){const e=[];return this.forEach(n=>{e.push(n)}),e}toString(){const e=[];return this.forEach(n=>e.push(n)),"SortedSet("+e.toString()+")"}copy(e){const n=new xn(this.comparator);return n.data=e,n}}class VE{constructor(e){this.iter=e}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class ti{constructor(e){this.fields=e,e.sort(bn.comparator)}static empty(){return new ti([])}unionWith(e){let n=new xn(bn.comparator);for(const r of this.fields)n=n.add(r);for(const r of e)n=n.add(r);return new ti(n.toArray())}covers(e){for(const n of this.fields)if(n.isPrefixOf(e))return!0;return!1}isEqual(e){return Nl(this.fields,e.fields,(n,r)=>n.isEqual(r))}}/** * @license * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class sN extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Tn{constructor(e){this.binaryString=e}static fromBase64String(e){const n=function(i){try{return atob(i)}catch(o){throw typeof DOMException<"u"&&o instanceof DOMException?new sN("Invalid base64 string: "+o):o}}(e);return new Tn(n)}static fromUint8Array(e){const n=function(i){let o="";for(let s=0;sePi(n,e))!==void 0}function Ml(t,e){if(t===e)return 0;const n=ca(t),r=ca(e);if(n!==r)return Je(n,r);switch(n){case 0:case 9007199254740991:return 0;case 1:return Je(t.booleanValue,e.booleanValue);case 2:return function(o,s){const a=zt(o.integerValue||o.doubleValue),l=zt(s.integerValue||s.doubleValue);return al?1:a===l?0:isNaN(a)?isNaN(l)?0:-1:1}(t,e);case 3:return FE(t.timestampValue,e.timestampValue);case 4:return FE(Xu(t),Xu(e));case 5:return Je(t.stringValue,e.stringValue);case 6:return function(o,s){const a=la(o),l=la(s);return a.compareTo(l)}(t.bytesValue,e.bytesValue);case 7:return function(o,s){const a=o.split("/"),l=s.split("/");for(let c=0;ce.mapValue.fields[n]=pu(r)),e}if(t.arrayValue){const e={arrayValue:{values:[]}};for(let n=0;n<(t.arrayValue.values||[]).length;++n)e.arrayValue.values[n]=pu(t.arrayValue.values[n]);return e}return Object.assign({},t)}function bJ(t){return(((t.mapValue||{}).fields||{}).__type__||{}).stringValue==="__max__"}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Fr{constructor(e){this.value=e}static empty(){return new Fr({mapValue:{}})}field(e){if(e.isEmpty())return this.value;{let n=this.value;for(let r=0;r{if(!n.isImmediateParentOf(a)){const l=this.getFieldsMap(n);this.applyChanges(l,r,i),r={},i=[],n=a.popLast()}s?r[a.lastSegment()]=pu(s):i.push(a.lastSegment())});const o=this.getFieldsMap(n);this.applyChanges(o,r,i)}delete(e){const n=this.field(e.popLast());rf(n)&&n.mapValue.fields&&delete n.mapValue.fields[e.lastSegment()]}isEqual(e){return Pi(this.value,e.value)}getFieldsMap(e){let n=this.value;n.mapValue.fields||(n.mapValue={fields:{}});for(let r=0;re[i]=o);for(const i of r)delete e[i]}clone(){return new Fr(pu(this.value))}}function aN(t){const e=[];return Zl(t.fields,(n,r)=>{const i=new bn([n]);if(rf(r)){const o=aN(r.mapValue).fields;if(o.length===0)e.push(i);else for(const s of o)e.push(i.child(s))}else e.push(i)}),new ti(e)}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Dn{constructor(e,n,r,i,o,s,a){this.key=e,this.documentType=n,this.version=r,this.readTime=i,this.createTime=o,this.data=s,this.documentState=a}static newInvalidDocument(e){return new Dn(e,0,Me.min(),Me.min(),Me.min(),Fr.empty(),0)}static newFoundDocument(e,n,r,i){return new Dn(e,1,n,Me.min(),r,i,0)}static newNoDocument(e,n){return new Dn(e,2,n,Me.min(),Me.min(),Fr.empty(),0)}static newUnknownDocument(e,n){return new Dn(e,3,n,Me.min(),Me.min(),Fr.empty(),2)}convertToFoundDocument(e,n){return!this.createTime.isEqual(Me.min())||this.documentType!==2&&this.documentType!==0||(this.createTime=e),this.version=e,this.documentType=1,this.data=n,this.documentState=0,this}convertToNoDocument(e){return this.version=e,this.documentType=2,this.data=Fr.empty(),this.documentState=0,this}convertToUnknownDocument(e){return this.version=e,this.documentType=3,this.data=Fr.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=Me.min(),this}setReadTime(e){return this.readTime=e,this}get hasLocalMutations(){return this.documentState===1}get hasCommittedMutations(){return this.documentState===2}get hasPendingWrites(){return this.hasLocalMutations||this.hasCommittedMutations}isValidDocument(){return this.documentType!==0}isFoundDocument(){return this.documentType===1}isNoDocument(){return this.documentType===2}isUnknownDocument(){return this.documentType===3}isEqual(e){return e instanceof Dn&&this.key.isEqual(e.key)&&this.version.isEqual(e.version)&&this.documentType===e.documentType&&this.documentState===e.documentState&&this.data.isEqual(e.data)}mutableCopy(){return new Dn(this.key,this.documentType,this.version,this.readTime,this.createTime,this.data.clone(),this.documentState)}toString(){return`Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {createTime: ${this.createTime}}), {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`}}/** * @license * Copyright 2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class hp{constructor(e,n){this.position=e,this.inclusive=n}}function jE(t,e,n){let r=0;for(let i=0;i":return e>0;case">=":return e>=0;default:return Pe()}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}}class ui extends lN{constructor(e,n){super(),this.filters=e,this.op=n,this.ae=null}static create(e,n){return new ui(e,n)}matches(e){return cN(this)?this.filters.find(n=>!n.matches(e))===void 0:this.filters.find(n=>n.matches(e))!==void 0}getFlattenedFilters(){return this.ae!==null||(this.ae=this.filters.reduce((e,n)=>e.concat(n.getFlattenedFilters()),[])),this.ae}getFilters(){return Object.assign([],this.filters)}}function cN(t){return t.op==="and"}function uN(t){return xJ(t)&&cN(t)}function xJ(t){for(const e of t.filters)if(e instanceof ui)return!1;return!0}function f0(t){if(t instanceof Xt)return t.field.canonicalString()+t.op.toString()+Dl(t.value);if(uN(t))return t.filters.map(e=>f0(e)).join(",");{const e=t.filters.map(n=>f0(n)).join(",");return`${t.op}(${e})`}}function dN(t,e){return t instanceof Xt?function(r,i){return i instanceof Xt&&r.op===i.op&&r.field.isEqual(i.field)&&Pi(r.value,i.value)}(t,e):t instanceof ui?function(r,i){return i instanceof ui&&r.op===i.op&&r.filters.length===i.filters.length?r.filters.reduce((o,s,a)=>o&&dN(s,i.filters[a]),!0):!1}(t,e):void Pe()}function hN(t){return t instanceof Xt?function(n){return`${n.field.canonicalString()} ${n.op} ${Dl(n.value)}`}(t):t instanceof ui?function(n){return n.op.toString()+" {"+n.getFilters().map(hN).join(" ,")+"}"}(t):"Filter"}class kJ extends Xt{constructor(e,n,r){super(e,n,r),this.key=_e.fromName(r.referenceValue)}matches(e){const n=_e.comparator(e.key,this.key);return this.matchesComparison(n)}}class TJ extends Xt{constructor(e,n){super(e,"in",n),this.keys=fN("in",n)}matches(e){return this.keys.some(n=>n.isEqual(e.key))}}class EJ extends Xt{constructor(e,n){super(e,"not-in",n),this.keys=fN("not-in",n)}matches(e){return!this.keys.some(n=>n.isEqual(e.key))}}function fN(t,e){var n;return(((n=e.arrayValue)===null||n===void 0?void 0:n.values)||[]).map(r=>_e.fromName(r.referenceValue))}class SJ extends Xt{constructor(e,n){super(e,"array-contains",n)}matches(e){const n=e.data.field(this.field);return Kw(n)&&Zu(n.arrayValue,this.value)}}class CJ extends Xt{constructor(e,n){super(e,"in",n)}matches(e){const n=e.data.field(this.field);return n!==null&&Zu(this.value.arrayValue,n)}}class IJ extends Xt{constructor(e,n){super(e,"not-in",n)}matches(e){if(Zu(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;const n=e.data.field(this.field);return n!==null&&!Zu(this.value.arrayValue,n)}}class PJ extends Xt{constructor(e,n){super(e,"array-contains-any",n)}matches(e){const n=e.data.field(this.field);return!(!Kw(n)||!n.arrayValue.values)&&n.arrayValue.values.some(r=>Zu(this.value.arrayValue,r))}}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class RJ{constructor(e,n=null,r=[],i=[],o=null,s=null,a=null){this.path=e,this.collectionGroup=n,this.orderBy=r,this.filters=i,this.limit=o,this.startAt=s,this.endAt=a,this.ue=null}}function HE(t,e=null,n=[],r=[],i=null,o=null,s=null){return new RJ(t,e,n,r,i,o,s)}function Yw(t){const e=De(t);if(e.ue===null){let n=e.path.canonicalString();e.collectionGroup!==null&&(n+="|cg:"+e.collectionGroup),n+="|f:",n+=e.filters.map(r=>f0(r)).join(","),n+="|ob:",n+=e.orderBy.map(r=>function(o){return o.field.canonicalString()+o.dir}(r)).join(","),Ym(e.limit)||(n+="|l:",n+=e.limit),e.startAt&&(n+="|lb:",n+=e.startAt.inclusive?"b:":"a:",n+=e.startAt.position.map(r=>Dl(r)).join(",")),e.endAt&&(n+="|ub:",n+=e.endAt.inclusive?"a:":"b:",n+=e.endAt.position.map(r=>Dl(r)).join(",")),e.ue=n}return e.ue}function Qw(t,e){if(t.limit!==e.limit||t.orderBy.length!==e.orderBy.length)return!1;for(let n=0;n0?e.explicitOrderBy[e.explicitOrderBy.length-1].dir:"asc";(function(s){let a=new xn(bn.comparator);return s.filters.forEach(l=>{l.getFlattenedFilters().forEach(c=>{c.isInequality()&&(a=a.add(c.field))})}),a})(e).forEach(o=>{n.has(o.canonicalString())||o.isKeyField()||e.ce.push(new ed(o,r))}),n.has(bn.keyField().canonicalString())||e.ce.push(new ed(bn.keyField(),r))}return e.ce}function Si(t){const e=De(t);return e.le||(e.le=NJ(e,mu(t))),e.le}function NJ(t,e){if(t.limitType==="F")return HE(t.path,t.collectionGroup,e,t.filters,t.limit,t.startAt,t.endAt);{e=e.map(i=>{const o=i.dir==="desc"?"asc":"desc";return new ed(i.field,o)});const n=t.endAt?new hp(t.endAt.position,t.endAt.inclusive):null,r=t.startAt?new hp(t.startAt.position,t.startAt.inclusive):null;return HE(t.path,t.collectionGroup,e,t.filters,t.limit,n,r)}}function m0(t,e){const n=t.filters.concat([e]);return new ec(t.path,t.collectionGroup,t.explicitOrderBy.slice(),n,t.limit,t.limitType,t.startAt,t.endAt)}function fp(t,e,n){return new ec(t.path,t.collectionGroup,t.explicitOrderBy.slice(),t.filters.slice(),e,n,t.startAt,t.endAt)}function Qm(t,e){return Qw(Si(t),Si(e))&&t.limitType===e.limitType}function mN(t){return`${Yw(Si(t))}|lt:${t.limitType}`}function Da(t){return`Query(target=${function(n){let r=n.path.canonicalString();return n.collectionGroup!==null&&(r+=" collectionGroup="+n.collectionGroup),n.filters.length>0&&(r+=`, filters: [${n.filters.map(i=>hN(i)).join(", ")}]`),Ym(n.limit)||(r+=", limit: "+n.limit),n.orderBy.length>0&&(r+=`, orderBy: [${n.orderBy.map(i=>function(s){return`${s.field.canonicalString()} (${s.dir})`}(i)).join(", ")}]`),n.startAt&&(r+=", startAt: ",r+=n.startAt.inclusive?"b:":"a:",r+=n.startAt.position.map(i=>Dl(i)).join(",")),n.endAt&&(r+=", endAt: ",r+=n.endAt.inclusive?"a:":"b:",r+=n.endAt.position.map(i=>Dl(i)).join(",")),`Target(${r})`}(Si(t))}; limitType=${t.limitType})`}function Xm(t,e){return e.isFoundDocument()&&function(r,i){const o=i.key.path;return r.collectionGroup!==null?i.key.hasCollectionId(r.collectionGroup)&&r.path.isPrefixOf(o):_e.isDocumentKey(r.path)?r.path.isEqual(o):r.path.isImmediateParentOf(o)}(t,e)&&function(r,i){for(const o of mu(r))if(!o.field.isKeyField()&&i.data.field(o.field)===null)return!1;return!0}(t,e)&&function(r,i){for(const o of r.filters)if(!o.matches(i))return!1;return!0}(t,e)&&function(r,i){return!(r.startAt&&!function(s,a,l){const c=jE(s,a,l);return s.inclusive?c<=0:c<0}(r.startAt,mu(r),i)||r.endAt&&!function(s,a,l){const c=jE(s,a,l);return s.inclusive?c>=0:c>0}(r.endAt,mu(r),i))}(t,e)}function MJ(t){return t.collectionGroup||(t.path.length%2==1?t.path.lastSegment():t.path.get(t.path.length-2))}function gN(t){return(e,n)=>{let r=!1;for(const i of mu(t)){const o=DJ(i,e,n);if(o!==0)return o;r=r||i.field.isKeyField()}return 0}}function DJ(t,e,n){const r=t.field.isKeyField()?_e.comparator(e.key,n.key):function(o,s,a){const l=s.data.field(o),c=a.data.field(o);return l!==null&&c!==null?Ml(l,c):Pe()}(t.field,e,n);switch(t.dir){case"asc":return r;case"desc":return-1*r;default:return Pe()}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class tc{constructor(e,n){this.mapKeyFn=e,this.equalsFn=n,this.inner={},this.innerSize=0}get(e){const n=this.mapKeyFn(e),r=this.inner[n];if(r!==void 0){for(const[i,o]of r)if(this.equalsFn(i,e))return o}}has(e){return this.get(e)!==void 0}set(e,n){const r=this.mapKeyFn(e),i=this.inner[r];if(i===void 0)return this.inner[r]=[[e,n]],void this.innerSize++;for(let o=0;o{for(const[i,o]of r)e(i,o)})}isEmpty(){return oN(this.inner)}size(){return this.innerSize}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const OJ=new Ot(_e.comparator);function co(){return OJ}const yN=new Ot(_e.comparator);function Hc(...t){let e=yN;for(const n of t)e=e.insert(n.key,n);return e}function vN(t){let e=yN;return t.forEach((n,r)=>e=e.insert(n,r.overlayedDocument)),e}function Gs(){return gu()}function wN(){return gu()}function gu(){return new tc(t=>t.toString(),(t,e)=>t.isEqual(e))}const LJ=new Ot(_e.comparator),VJ=new xn(_e.comparator);function He(...t){let e=VJ;for(const n of t)e=e.add(n);return e}const FJ=new xn(Je);function $J(){return FJ}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function Jw(t,e){if(t.useProto3Json){if(isNaN(e))return{doubleValue:"NaN"};if(e===1/0)return{doubleValue:"Infinity"};if(e===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:dp(e)?"-0":e}}function bN(t){return{integerValue:""+t}}function BJ(t,e){return gJ(e)?bN(e):Jw(t,e)}/** * @license * Copyright 2018 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Jm{constructor(){this._=void 0}}function UJ(t,e,n){return t instanceof pp?function(i,o){const s={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:i.seconds,nanos:i.nanoseconds}}}};return o&&Gw(o)&&(o=qw(o)),o&&(s.fields.__previous_value__=o),{mapValue:s}}(n,e):t instanceof td?xN(t,e):t instanceof nd?kN(t,e):function(i,o){const s=_N(i,o),a=qE(s)+qE(i.Pe);return h0(s)&&h0(i.Pe)?bN(a):Jw(i.serializer,a)}(t,e)}function zJ(t,e,n){return t instanceof td?xN(t,e):t instanceof nd?kN(t,e):n}function _N(t,e){return t instanceof mp?function(r){return h0(r)||function(o){return!!o&&"doubleValue"in o}(r)}(e)?e:{integerValue:0}:null}class pp extends Jm{}class td extends Jm{constructor(e){super(),this.elements=e}}function xN(t,e){const n=TN(e);for(const r of t.elements)n.some(i=>Pi(i,r))||n.push(r);return{arrayValue:{values:n}}}class nd extends Jm{constructor(e){super(),this.elements=e}}function kN(t,e){let n=TN(e);for(const r of t.elements)n=n.filter(i=>!Pi(i,r));return{arrayValue:{values:n}}}class mp extends Jm{constructor(e,n){super(),this.serializer=e,this.Pe=n}}function qE(t){return zt(t.integerValue||t.doubleValue)}function TN(t){return Kw(t)&&t.arrayValue.values?t.arrayValue.values.slice():[]}function jJ(t,e){return t.field.isEqual(e.field)&&function(r,i){return r instanceof td&&i instanceof td||r instanceof nd&&i instanceof nd?Nl(r.elements,i.elements,Pi):r instanceof mp&&i instanceof mp?Pi(r.Pe,i.Pe):r instanceof pp&&i instanceof pp}(t.transform,e.transform)}class WJ{constructor(e,n){this.version=e,this.transformResults=n}}class eo{constructor(e,n){this.updateTime=e,this.exists=n}static none(){return new eo}static exists(e){return new eo(void 0,e)}static updateTime(e){return new eo(e)}get isNone(){return this.updateTime===void 0&&this.exists===void 0}isEqual(e){return this.exists===e.exists&&(this.updateTime?!!e.updateTime&&this.updateTime.isEqual(e.updateTime):!e.updateTime)}}function of(t,e){return t.updateTime!==void 0?e.isFoundDocument()&&e.version.isEqual(t.updateTime):t.exists===void 0||t.exists===e.isFoundDocument()}class Zm{}function EN(t,e){if(!t.hasLocalMutations||e&&e.fields.length===0)return null;if(e===null)return t.isNoDocument()?new CN(t.key,eo.none()):new Ad(t.key,t.data,eo.none());{const n=t.data,r=Fr.empty();let i=new xn(bn.comparator);for(let o of e.fields)if(!i.has(o)){let s=n.field(o);s===null&&o.length>1&&(o=o.popLast(),s=n.field(o)),s===null?r.delete(o):r.set(o,s),i=i.add(o)}return new ga(t.key,r,new ti(i.toArray()),eo.none())}}function HJ(t,e,n){t instanceof Ad?function(i,o,s){const a=i.value.clone(),l=YE(i.fieldTransforms,o,s.transformResults);a.setAll(l),o.convertToFoundDocument(s.version,a).setHasCommittedMutations()}(t,e,n):t instanceof ga?function(i,o,s){if(!of(i.precondition,o))return void o.convertToUnknownDocument(s.version);const a=YE(i.fieldTransforms,o,s.transformResults),l=o.data;l.setAll(SN(i)),l.setAll(a),o.convertToFoundDocument(s.version,l).setHasCommittedMutations()}(t,e,n):function(i,o,s){o.convertToNoDocument(s.version).setHasCommittedMutations()}(0,e,n)}function yu(t,e,n,r){return t instanceof Ad?function(o,s,a,l){if(!of(o.precondition,s))return a;const c=o.value.clone(),h=QE(o.fieldTransforms,l,s);return c.setAll(h),s.convertToFoundDocument(s.version,c).setHasLocalMutations(),null}(t,e,n,r):t instanceof ga?function(o,s,a,l){if(!of(o.precondition,s))return a;const c=QE(o.fieldTransforms,l,s),h=s.data;return h.setAll(SN(o)),h.setAll(c),s.convertToFoundDocument(s.version,h).setHasLocalMutations(),a===null?null:a.unionWith(o.fieldMask.fields).unionWith(o.fieldTransforms.map(f=>f.field))}(t,e,n,r):function(o,s,a){return of(o.precondition,s)?(s.convertToNoDocument(s.version).setHasLocalMutations(),null):a}(t,e,n)}function GJ(t,e){let n=null;for(const r of t.fieldTransforms){const i=e.data.field(r.field),o=_N(r.transform,i||null);o!=null&&(n===null&&(n=Fr.empty()),n.set(r.field,o))}return n||null}function KE(t,e){return t.type===e.type&&!!t.key.isEqual(e.key)&&!!t.precondition.isEqual(e.precondition)&&!!function(r,i){return r===void 0&&i===void 0||!(!r||!i)&&Nl(r,i,(o,s)=>jJ(o,s))}(t.fieldTransforms,e.fieldTransforms)&&(t.type===0?t.value.isEqual(e.value):t.type!==1||t.data.isEqual(e.data)&&t.fieldMask.isEqual(e.fieldMask))}class Ad extends Zm{constructor(e,n,r,i=[]){super(),this.key=e,this.value=n,this.precondition=r,this.fieldTransforms=i,this.type=0}getFieldMask(){return null}}class ga extends Zm{constructor(e,n,r,i,o=[]){super(),this.key=e,this.data=n,this.fieldMask=r,this.precondition=i,this.fieldTransforms=o,this.type=1}getFieldMask(){return this.fieldMask}}function SN(t){const e=new Map;return t.fieldMask.fields.forEach(n=>{if(!n.isEmpty()){const r=t.data.field(n);e.set(n,r)}}),e}function YE(t,e,n){const r=new Map;ht(t.length===n.length);for(let i=0;i{const o=e.get(i.key),s=o.overlayedDocument;let a=this.applyToLocalView(s,o.mutatedFields);a=n.has(i.key)?null:a;const l=EN(s,a);l!==null&&r.set(i.key,l),s.isValidDocument()||s.convertToNoDocument(Me.min())}),r}keys(){return this.mutations.reduce((e,n)=>e.add(n.key),He())}isEqual(e){return this.batchId===e.batchId&&Nl(this.mutations,e.mutations,(n,r)=>KE(n,r))&&Nl(this.baseMutations,e.baseMutations,(n,r)=>KE(n,r))}}class Zw{constructor(e,n,r,i){this.batch=e,this.commitVersion=n,this.mutationResults=r,this.docVersions=i}static from(e,n,r){ht(e.mutations.length===r.length);let i=function(){return LJ}();const o=e.mutations;for(let s=0;s=8)throw new Gc(`Invalid padding: ${n}`);if(r<0)throw new Gc(`Invalid hash count: ${r}`);if(e.length>0&&this.hashCount===0)throw new Gc(`Invalid hash count: ${r}`);if(e.length===0&&n!==0)throw new Gc(`Invalid padding when bitmap length is 0: ${n}`);this.Ie=8*e.length-n,this.Te=Qs.fromNumber(this.Ie)}Ee(e,n,r){let i=e.add(n.multiply(Qs.fromNumber(r)));return i.compare(ZJ)===1&&(i=new Qs([i.getBits(0),i.getBits(1)],0)),i.modulo(this.Te).toNumber()}de(e){return(this.bitmap[Math.floor(e/8)]&1<s.insert(a)),s}insert(e){if(this.Ie===0)return;const n=XE(e),[r,i]=JE(n);for(let o=0;o0&&(this.we=!0,this.pe=e)}ve(){let e=He(),n=He(),r=He();return this.ge.forEach((i,o)=>{switch(o){case 0:e=e.add(i);break;case 2:n=n.add(i);break;case 1:r=r.add(i);break;default:Pe()}}),new Nd(this.pe,this.ye,e,n,r)}Ce(){this.we=!1,this.ge=tS()}Fe(e,n){this.we=!0,this.ge=this.ge.insert(e,n)}Me(e){this.we=!0,this.ge=this.ge.remove(e)}xe(){this.fe+=1}Oe(){this.fe-=1,ht(this.fe>=0)}Ne(){this.we=!0,this.ye=!0}}class eZ{constructor(e){this.Le=e,this.Be=new Map,this.ke=co(),this.qe=eS(),this.Qe=new Ot(Je)}Ke(e){for(const n of e.Re)e.Ve&&e.Ve.isFoundDocument()?this.$e(n,e.Ve):this.Ue(n,e.key,e.Ve);for(const n of e.removedTargetIds)this.Ue(n,e.key,e.Ve)}We(e){this.forEachTarget(e,n=>{const r=this.Ge(n);switch(e.state){case 0:this.ze(n)&&r.De(e.resumeToken);break;case 1:r.Oe(),r.Se||r.Ce(),r.De(e.resumeToken);break;case 2:r.Oe(),r.Se||this.removeTarget(n);break;case 3:this.ze(n)&&(r.Ne(),r.De(e.resumeToken));break;case 4:this.ze(n)&&(this.je(n),r.De(e.resumeToken));break;default:Pe()}})}forEachTarget(e,n){e.targetIds.length>0?e.targetIds.forEach(n):this.Be.forEach((r,i)=>{this.ze(i)&&n(i)})}He(e){const n=e.targetId,r=e.me.count,i=this.Je(n);if(i){const o=i.target;if(p0(o))if(r===0){const s=new _e(o.path);this.Ue(n,s,Dn.newNoDocument(s,Me.min()))}else ht(r===1);else{const s=this.Ye(n);if(s!==r){const a=this.Ze(e),l=a?this.Xe(a,e,s):1;if(l!==0){this.je(n);const c=l===2?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch";this.Qe=this.Qe.insert(n,c)}}}}}Ze(e){const n=e.me.unchangedNames;if(!n||!n.bits)return null;const{bits:{bitmap:r="",padding:i=0},hashCount:o=0}=n;let s,a;try{s=la(r).toUint8Array()}catch(l){if(l instanceof sN)return Al("Decoding the base64 bloom filter in existence filter failed ("+l.message+"); ignoring the bloom filter and falling back to full re-query."),null;throw l}try{a=new eb(s,i,o)}catch(l){return Al(l instanceof Gc?"BloomFilter error: ":"Applying bloom filter failed: ",l),null}return a.Ie===0?null:a}Xe(e,n,r){return n.me.count===r-this.nt(e,n.targetId)?0:2}nt(e,n){const r=this.Le.getRemoteKeysForTarget(n);let i=0;return r.forEach(o=>{const s=this.Le.tt(),a=`projects/${s.projectId}/databases/${s.database}/documents/${o.path.canonicalString()}`;e.mightContain(a)||(this.Ue(n,o,null),i++)}),i}rt(e){const n=new Map;this.Be.forEach((o,s)=>{const a=this.Je(s);if(a){if(o.current&&p0(a.target)){const l=new _e(a.target.path);this.ke.get(l)!==null||this.it(s,l)||this.Ue(s,l,Dn.newNoDocument(l,e))}o.be&&(n.set(s,o.ve()),o.Ce())}});let r=He();this.qe.forEach((o,s)=>{let a=!0;s.forEachWhile(l=>{const c=this.Je(l);return!c||c.purpose==="TargetPurposeLimboResolution"||(a=!1,!1)}),a&&(r=r.add(o))}),this.ke.forEach((o,s)=>s.setReadTime(e));const i=new eg(e,n,this.Qe,this.ke,r);return this.ke=co(),this.qe=eS(),this.Qe=new Ot(Je),i}$e(e,n){if(!this.ze(e))return;const r=this.it(e,n.key)?2:0;this.Ge(e).Fe(n.key,r),this.ke=this.ke.insert(n.key,n),this.qe=this.qe.insert(n.key,this.st(n.key).add(e))}Ue(e,n,r){if(!this.ze(e))return;const i=this.Ge(e);this.it(e,n)?i.Fe(n,1):i.Me(n),this.qe=this.qe.insert(n,this.st(n).delete(e)),r&&(this.ke=this.ke.insert(n,r))}removeTarget(e){this.Be.delete(e)}Ye(e){const n=this.Ge(e).ve();return this.Le.getRemoteKeysForTarget(e).size+n.addedDocuments.size-n.removedDocuments.size}xe(e){this.Ge(e).xe()}Ge(e){let n=this.Be.get(e);return n||(n=new ZE,this.Be.set(e,n)),n}st(e){let n=this.qe.get(e);return n||(n=new xn(Je),this.qe=this.qe.insert(e,n)),n}ze(e){const n=this.Je(e)!==null;return n||ge("WatchChangeAggregator","Detected inactive target",e),n}Je(e){const n=this.Be.get(e);return n&&n.Se?null:this.Le.ot(e)}je(e){this.Be.set(e,new ZE),this.Le.getRemoteKeysForTarget(e).forEach(n=>{this.Ue(e,n,null)})}it(e,n){return this.Le.getRemoteKeysForTarget(e).has(n)}}function eS(){return new Ot(_e.comparator)}function tS(){return new Ot(_e.comparator)}const tZ=(()=>({asc:"ASCENDING",desc:"DESCENDING"}))(),nZ=(()=>({"<":"LESS_THAN","<=":"LESS_THAN_OR_EQUAL",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","!=":"NOT_EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","not-in":"NOT_IN","array-contains-any":"ARRAY_CONTAINS_ANY"}))(),rZ=(()=>({and:"AND",or:"OR"}))();class iZ{constructor(e,n){this.databaseId=e,this.useProto3Json=n}}function g0(t,e){return t.useProto3Json||Ym(e)?e:{value:e}}function gp(t,e){return t.useProto3Json?`${new Date(1e3*e.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+e.nanoseconds).slice(-9)}Z`:{seconds:""+e.seconds,nanos:e.nanoseconds}}function AN(t,e){return t.useProto3Json?e.toBase64():e.toUint8Array()}function oZ(t,e){return gp(t,e.toTimestamp())}function Ci(t){return ht(!!t),Me.fromTimestamp(function(n){const r=hs(n);return new sn(r.seconds,r.nanos)}(t))}function tb(t,e){return y0(t,e).canonicalString()}function y0(t,e){const n=function(i){return new kt(["projects",i.projectId,"databases",i.database])}(t).child("documents");return e===void 0?n:n.child(e)}function NN(t){const e=kt.fromString(t);return ht(VN(e)),e}function v0(t,e){return tb(t.databaseId,e.path)}function Ey(t,e){const n=NN(e);if(n.get(1)!==t.databaseId.projectId)throw new ue(Q.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+n.get(1)+" vs "+t.databaseId.projectId);if(n.get(3)!==t.databaseId.database)throw new ue(Q.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+t.databaseId.database);return new _e(DN(n))}function MN(t,e){return tb(t.databaseId,e)}function sZ(t){const e=NN(t);return e.length===4?kt.emptyPath():DN(e)}function w0(t){return new kt(["projects",t.databaseId.projectId,"databases",t.databaseId.database]).canonicalString()}function DN(t){return ht(t.length>4&&t.get(4)==="documents"),t.popFirst(5)}function nS(t,e,n){return{name:v0(t,e),fields:n.value.mapValue.fields}}function aZ(t,e){let n;if("targetChange"in e){e.targetChange;const r=function(c){return c==="NO_CHANGE"?0:c==="ADD"?1:c==="REMOVE"?2:c==="CURRENT"?3:c==="RESET"?4:Pe()}(e.targetChange.targetChangeType||"NO_CHANGE"),i=e.targetChange.targetIds||[],o=function(c,h){return c.useProto3Json?(ht(h===void 0||typeof h=="string"),Tn.fromBase64String(h||"")):(ht(h===void 0||h instanceof Buffer||h instanceof Uint8Array),Tn.fromUint8Array(h||new Uint8Array))}(t,e.targetChange.resumeToken),s=e.targetChange.cause,a=s&&function(c){const h=c.code===void 0?Q.UNKNOWN:IN(c.code);return new ue(h,c.message||"")}(s);n=new RN(r,i,o,a||null)}else if("documentChange"in e){e.documentChange;const r=e.documentChange;r.document,r.document.name,r.document.updateTime;const i=Ey(t,r.document.name),o=Ci(r.document.updateTime),s=r.document.createTime?Ci(r.document.createTime):Me.min(),a=new Fr({mapValue:{fields:r.document.fields}}),l=Dn.newFoundDocument(i,o,s,a),c=r.targetIds||[],h=r.removedTargetIds||[];n=new sf(c,h,l.key,l)}else if("documentDelete"in e){e.documentDelete;const r=e.documentDelete;r.document;const i=Ey(t,r.document),o=r.readTime?Ci(r.readTime):Me.min(),s=Dn.newNoDocument(i,o),a=r.removedTargetIds||[];n=new sf([],a,s.key,s)}else if("documentRemove"in e){e.documentRemove;const r=e.documentRemove;r.document;const i=Ey(t,r.document),o=r.removedTargetIds||[];n=new sf([],o,i,null)}else{if(!("filter"in e))return Pe();{e.filter;const r=e.filter;r.targetId;const{count:i=0,unchangedNames:o}=r,s=new QJ(i,o),a=r.targetId;n=new PN(a,s)}}return n}function lZ(t,e){let n;if(e instanceof Ad)n={update:nS(t,e.key,e.value)};else if(e instanceof CN)n={delete:v0(t,e.key)};else if(e instanceof ga)n={update:nS(t,e.key,e.data),updateMask:yZ(e.fieldMask)};else{if(!(e instanceof qJ))return Pe();n={verify:v0(t,e.key)}}return e.fieldTransforms.length>0&&(n.updateTransforms=e.fieldTransforms.map(r=>function(o,s){const a=s.transform;if(a instanceof pp)return{fieldPath:s.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(a instanceof td)return{fieldPath:s.field.canonicalString(),appendMissingElements:{values:a.elements}};if(a instanceof nd)return{fieldPath:s.field.canonicalString(),removeAllFromArray:{values:a.elements}};if(a instanceof mp)return{fieldPath:s.field.canonicalString(),increment:a.Pe};throw Pe()}(0,r))),e.precondition.isNone||(n.currentDocument=function(i,o){return o.updateTime!==void 0?{updateTime:oZ(i,o.updateTime)}:o.exists!==void 0?{exists:o.exists}:Pe()}(t,e.precondition)),n}function cZ(t,e){return t&&t.length>0?(ht(e!==void 0),t.map(n=>function(i,o){let s=i.updateTime?Ci(i.updateTime):Ci(o);return s.isEqual(Me.min())&&(s=Ci(o)),new WJ(s,i.transformResults||[])}(n,e))):[]}function uZ(t,e){return{documents:[MN(t,e.path)]}}function dZ(t,e){const n={structuredQuery:{}},r=e.path;let i;e.collectionGroup!==null?(i=r,n.structuredQuery.from=[{collectionId:e.collectionGroup,allDescendants:!0}]):(i=r.popLast(),n.structuredQuery.from=[{collectionId:r.lastSegment()}]),n.parent=MN(t,i);const o=function(c){if(c.length!==0)return LN(ui.create(c,"and"))}(e.filters);o&&(n.structuredQuery.where=o);const s=function(c){if(c.length!==0)return c.map(h=>function(p){return{field:Oa(p.field),direction:pZ(p.dir)}}(h))}(e.orderBy);s&&(n.structuredQuery.orderBy=s);const a=g0(t,e.limit);return a!==null&&(n.structuredQuery.limit=a),e.startAt&&(n.structuredQuery.startAt=function(c){return{before:c.inclusive,values:c.position}}(e.startAt)),e.endAt&&(n.structuredQuery.endAt=function(c){return{before:!c.inclusive,values:c.position}}(e.endAt)),{_t:n,parent:i}}function hZ(t){let e=sZ(t.parent);const n=t.structuredQuery,r=n.from?n.from.length:0;let i=null;if(r>0){ht(r===1);const h=n.from[0];h.allDescendants?i=h.collectionId:e=e.child(h.collectionId)}let o=[];n.where&&(o=function(f){const p=ON(f);return p instanceof ui&&uN(p)?p.getFilters():[p]}(n.where));let s=[];n.orderBy&&(s=function(f){return f.map(p=>function(w){return new ed(La(w.field),function(C){switch(C){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(w.direction))}(p))}(n.orderBy));let a=null;n.limit&&(a=function(f){let p;return p=typeof f=="object"?f.value:f,Ym(p)?null:p}(n.limit));let l=null;n.startAt&&(l=function(f){const p=!!f.before,g=f.values||[];return new hp(g,p)}(n.startAt));let c=null;return n.endAt&&(c=function(f){const p=!f.before,g=f.values||[];return new hp(g,p)}(n.endAt)),AJ(e,i,s,o,a,"F",l,c)}function fZ(t,e){const n=function(i){switch(i){case"TargetPurposeListen":return null;case"TargetPurposeExistenceFilterMismatch":return"existence-filter-mismatch";case"TargetPurposeExistenceFilterMismatchBloom":return"existence-filter-mismatch-bloom";case"TargetPurposeLimboResolution":return"limbo-document";default:return Pe()}}(e.purpose);return n==null?null:{"goog-listen-tags":n}}function ON(t){return t.unaryFilter!==void 0?function(n){switch(n.unaryFilter.op){case"IS_NAN":const r=La(n.unaryFilter.field);return Xt.create(r,"==",{doubleValue:NaN});case"IS_NULL":const i=La(n.unaryFilter.field);return Xt.create(i,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":const o=La(n.unaryFilter.field);return Xt.create(o,"!=",{doubleValue:NaN});case"IS_NOT_NULL":const s=La(n.unaryFilter.field);return Xt.create(s,"!=",{nullValue:"NULL_VALUE"});default:return Pe()}}(t):t.fieldFilter!==void 0?function(n){return Xt.create(La(n.fieldFilter.field),function(i){switch(i){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";default:return Pe()}}(n.fieldFilter.op),n.fieldFilter.value)}(t):t.compositeFilter!==void 0?function(n){return ui.create(n.compositeFilter.filters.map(r=>ON(r)),function(i){switch(i){case"AND":return"and";case"OR":return"or";default:return Pe()}}(n.compositeFilter.op))}(t):Pe()}function pZ(t){return tZ[t]}function mZ(t){return nZ[t]}function gZ(t){return rZ[t]}function Oa(t){return{fieldPath:t.canonicalString()}}function La(t){return bn.fromServerFormat(t.fieldPath)}function LN(t){return t instanceof Xt?function(n){if(n.op==="=="){if(zE(n.value))return{unaryFilter:{field:Oa(n.field),op:"IS_NAN"}};if(UE(n.value))return{unaryFilter:{field:Oa(n.field),op:"IS_NULL"}}}else if(n.op==="!="){if(zE(n.value))return{unaryFilter:{field:Oa(n.field),op:"IS_NOT_NAN"}};if(UE(n.value))return{unaryFilter:{field:Oa(n.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:Oa(n.field),op:mZ(n.op),value:n.value}}}(t):t instanceof ui?function(n){const r=n.getFilters().map(i=>LN(i));return r.length===1?r[0]:{compositeFilter:{op:gZ(n.op),filters:r}}}(t):Pe()}function yZ(t){const e=[];return t.fields.forEach(n=>e.push(n.canonicalString())),{fieldPaths:e}}function VN(t){return t.length>=4&&t.get(0)==="projects"&&t.get(2)==="databases"}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class jo{constructor(e,n,r,i,o=Me.min(),s=Me.min(),a=Tn.EMPTY_BYTE_STRING,l=null){this.target=e,this.targetId=n,this.purpose=r,this.sequenceNumber=i,this.snapshotVersion=o,this.lastLimboFreeSnapshotVersion=s,this.resumeToken=a,this.expectedCount=l}withSequenceNumber(e){return new jo(this.target,this.targetId,this.purpose,e,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}withResumeToken(e,n){return new jo(this.target,this.targetId,this.purpose,this.sequenceNumber,n,this.lastLimboFreeSnapshotVersion,e,null)}withExpectedCount(e){return new jo(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,e)}withLastLimboFreeSnapshotVersion(e){return new jo(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,e,this.resumeToken,this.expectedCount)}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class vZ{constructor(e){this.ct=e}}function wZ(t){const e=hZ({parent:t.parent,structuredQuery:t.structuredQuery});return t.limitType==="LAST"?fp(e,e.limit,"L"):e}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class bZ{constructor(){this.un=new _Z}addToCollectionParentIndex(e,n){return this.un.add(n),Z.resolve()}getCollectionParents(e,n){return Z.resolve(this.un.getEntries(n))}addFieldIndex(e,n){return Z.resolve()}deleteFieldIndex(e,n){return Z.resolve()}deleteAllFieldIndexes(e){return Z.resolve()}createTargetIndexes(e,n){return Z.resolve()}getDocumentsMatchingTarget(e,n){return Z.resolve(null)}getIndexType(e,n){return Z.resolve(0)}getFieldIndexes(e,n){return Z.resolve([])}getNextCollectionGroupToUpdate(e){return Z.resolve(null)}getMinOffset(e,n){return Z.resolve(ds.min())}getMinOffsetFromCollectionGroup(e,n){return Z.resolve(ds.min())}updateCollectionGroup(e,n,r){return Z.resolve()}updateIndexEntries(e,n){return Z.resolve()}}class _Z{constructor(){this.index={}}add(e){const n=e.lastSegment(),r=e.popLast(),i=this.index[n]||new xn(kt.comparator),o=!i.has(r);return this.index[n]=i.add(r),o}has(e){const n=e.lastSegment(),r=e.popLast(),i=this.index[n];return i&&i.has(r)}getEntries(e){return(this.index[e]||new xn(kt.comparator)).toArray()}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Ol{constructor(e){this.Ln=e}next(){return this.Ln+=2,this.Ln}static Bn(){return new Ol(0)}static kn(){return new Ol(-1)}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class xZ{constructor(){this.changes=new tc(e=>e.toString(),(e,n)=>e.isEqual(n)),this.changesApplied=!1}addEntry(e){this.assertNotApplied(),this.changes.set(e.key,e)}removeEntry(e,n){this.assertNotApplied(),this.changes.set(e,Dn.newInvalidDocument(e).setReadTime(n))}getEntry(e,n){this.assertNotApplied();const r=this.changes.get(n);return r!==void 0?Z.resolve(r):this.getFromCache(e,n)}getEntries(e,n){return this.getAllFromCache(e,n)}apply(e){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(e)}assertNotApplied(){}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *//** * @license * Copyright 2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class kZ{constructor(e,n){this.overlayedDocument=e,this.mutatedFields=n}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class TZ{constructor(e,n,r,i){this.remoteDocumentCache=e,this.mutationQueue=n,this.documentOverlayCache=r,this.indexManager=i}getDocument(e,n){let r=null;return this.documentOverlayCache.getOverlay(e,n).next(i=>(r=i,this.remoteDocumentCache.getEntry(e,n))).next(i=>(r!==null&&yu(r.mutation,i,ti.empty(),sn.now()),i))}getDocuments(e,n){return this.remoteDocumentCache.getEntries(e,n).next(r=>this.getLocalViewOfDocuments(e,r,He()).next(()=>r))}getLocalViewOfDocuments(e,n,r=He()){const i=Gs();return this.populateOverlays(e,i,n).next(()=>this.computeViews(e,n,i,r).next(o=>{let s=Hc();return o.forEach((a,l)=>{s=s.insert(a,l.overlayedDocument)}),s}))}getOverlayedDocuments(e,n){const r=Gs();return this.populateOverlays(e,r,n).next(()=>this.computeViews(e,n,r,He()))}populateOverlays(e,n,r){const i=[];return r.forEach(o=>{n.has(o)||i.push(o)}),this.documentOverlayCache.getOverlays(e,i).next(o=>{o.forEach((s,a)=>{n.set(s,a)})})}computeViews(e,n,r,i){let o=co();const s=gu(),a=function(){return gu()}();return n.forEach((l,c)=>{const h=r.get(c.key);i.has(c.key)&&(h===void 0||h.mutation instanceof ga)?o=o.insert(c.key,c):h!==void 0?(s.set(c.key,h.mutation.getFieldMask()),yu(h.mutation,c,h.mutation.getFieldMask(),sn.now())):s.set(c.key,ti.empty())}),this.recalculateAndSaveOverlays(e,o).next(l=>(l.forEach((c,h)=>s.set(c,h)),n.forEach((c,h)=>{var f;return a.set(c,new kZ(h,(f=s.get(c))!==null&&f!==void 0?f:null))}),a))}recalculateAndSaveOverlays(e,n){const r=gu();let i=new Ot((s,a)=>s-a),o=He();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,n).next(s=>{for(const a of s)a.keys().forEach(l=>{const c=n.get(l);if(c===null)return;let h=r.get(l)||ti.empty();h=a.applyToLocalView(c,h),r.set(l,h);const f=(i.get(a.batchId)||He()).add(l);i=i.insert(a.batchId,f)})}).next(()=>{const s=[],a=i.getReverseIterator();for(;a.hasNext();){const l=a.getNext(),c=l.key,h=l.value,f=wN();h.forEach(p=>{if(!o.has(p)){const g=EN(n.get(p),r.get(p));g!==null&&f.set(p,g),o=o.add(p)}}),s.push(this.documentOverlayCache.saveOverlays(e,c,f))}return Z.waitFor(s)}).next(()=>r)}recalculateAndSaveOverlaysForDocumentKeys(e,n){return this.remoteDocumentCache.getEntries(e,n).next(r=>this.recalculateAndSaveOverlays(e,r))}getDocumentsMatchingQuery(e,n,r,i){return function(s){return _e.isDocumentKey(s.path)&&s.collectionGroup===null&&s.filters.length===0}(n)?this.getDocumentsMatchingDocumentQuery(e,n.path):pN(n)?this.getDocumentsMatchingCollectionGroupQuery(e,n,r,i):this.getDocumentsMatchingCollectionQuery(e,n,r,i)}getNextDocuments(e,n,r,i){return this.remoteDocumentCache.getAllFromCollectionGroup(e,n,r,i).next(o=>{const s=i-o.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(e,n,r.largestBatchId,i-o.size):Z.resolve(Gs());let a=-1,l=o;return s.next(c=>Z.forEach(c,(h,f)=>(a{l=l.insert(h,p)}))).next(()=>this.populateOverlays(e,c,o)).next(()=>this.computeViews(e,l,c,He())).next(h=>({batchId:a,changes:vN(h)})))})}getDocumentsMatchingDocumentQuery(e,n){return this.getDocument(e,new _e(n)).next(r=>{let i=Hc();return r.isFoundDocument()&&(i=i.insert(r.key,r)),i})}getDocumentsMatchingCollectionGroupQuery(e,n,r,i){const o=n.collectionGroup;let s=Hc();return this.indexManager.getCollectionParents(e,o).next(a=>Z.forEach(a,l=>{const c=function(f,p){return new ec(p,null,f.explicitOrderBy.slice(),f.filters.slice(),f.limit,f.limitType,f.startAt,f.endAt)}(n,l.child(o));return this.getDocumentsMatchingCollectionQuery(e,c,r,i).next(h=>{h.forEach((f,p)=>{s=s.insert(f,p)})})}).next(()=>s))}getDocumentsMatchingCollectionQuery(e,n,r,i){let o;return this.documentOverlayCache.getOverlaysForCollection(e,n.path,r.largestBatchId).next(s=>(o=s,this.remoteDocumentCache.getDocumentsMatchingQuery(e,n,r,o,i))).next(s=>{o.forEach((l,c)=>{const h=c.getKey();s.get(h)===null&&(s=s.insert(h,Dn.newInvalidDocument(h)))});let a=Hc();return s.forEach((l,c)=>{const h=o.get(l);h!==void 0&&yu(h.mutation,c,ti.empty(),sn.now()),Xm(n,c)&&(a=a.insert(l,c))}),a})}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class EZ{constructor(e){this.serializer=e,this.hr=new Map,this.Pr=new Map}getBundleMetadata(e,n){return Z.resolve(this.hr.get(n))}saveBundleMetadata(e,n){return this.hr.set(n.id,function(i){return{id:i.id,version:i.version,createTime:Ci(i.createTime)}}(n)),Z.resolve()}getNamedQuery(e,n){return Z.resolve(this.Pr.get(n))}saveNamedQuery(e,n){return this.Pr.set(n.name,function(i){return{name:i.name,query:wZ(i.bundledQuery),readTime:Ci(i.readTime)}}(n)),Z.resolve()}}/** * @license * Copyright 2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class SZ{constructor(){this.overlays=new Ot(_e.comparator),this.Ir=new Map}getOverlay(e,n){return Z.resolve(this.overlays.get(n))}getOverlays(e,n){const r=Gs();return Z.forEach(n,i=>this.getOverlay(e,i).next(o=>{o!==null&&r.set(i,o)})).next(()=>r)}saveOverlays(e,n,r){return r.forEach((i,o)=>{this.ht(e,n,o)}),Z.resolve()}removeOverlaysForBatchId(e,n,r){const i=this.Ir.get(r);return i!==void 0&&(i.forEach(o=>this.overlays=this.overlays.remove(o)),this.Ir.delete(r)),Z.resolve()}getOverlaysForCollection(e,n,r){const i=Gs(),o=n.length+1,s=new _e(n.child("")),a=this.overlays.getIteratorFrom(s);for(;a.hasNext();){const l=a.getNext().value,c=l.getKey();if(!n.isPrefixOf(c.path))break;c.path.length===o&&l.largestBatchId>r&&i.set(l.getKey(),l)}return Z.resolve(i)}getOverlaysForCollectionGroup(e,n,r,i){let o=new Ot((c,h)=>c-h);const s=this.overlays.getIterator();for(;s.hasNext();){const c=s.getNext().value;if(c.getKey().getCollectionGroup()===n&&c.largestBatchId>r){let h=o.get(c.largestBatchId);h===null&&(h=Gs(),o=o.insert(c.largestBatchId,h)),h.set(c.getKey(),c)}}const a=Gs(),l=o.getIterator();for(;l.hasNext()&&(l.getNext().value.forEach((c,h)=>a.set(c,h)),!(a.size()>=i)););return Z.resolve(a)}ht(e,n,r){const i=this.overlays.get(r.key);if(i!==null){const s=this.Ir.get(i.largestBatchId).delete(r.key);this.Ir.set(i.largestBatchId,s)}this.overlays=this.overlays.insert(r.key,new YJ(n,r));let o=this.Ir.get(n);o===void 0&&(o=He(),this.Ir.set(n,o)),this.Ir.set(n,o.add(r.key))}}/** * @license * Copyright 2024 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class CZ{constructor(){this.sessionToken=Tn.EMPTY_BYTE_STRING}getSessionToken(e){return Z.resolve(this.sessionToken)}setSessionToken(e,n){return this.sessionToken=n,Z.resolve()}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class nb{constructor(){this.Tr=new xn(ln.Er),this.dr=new xn(ln.Ar)}isEmpty(){return this.Tr.isEmpty()}addReference(e,n){const r=new ln(e,n);this.Tr=this.Tr.add(r),this.dr=this.dr.add(r)}Rr(e,n){e.forEach(r=>this.addReference(r,n))}removeReference(e,n){this.Vr(new ln(e,n))}mr(e,n){e.forEach(r=>this.removeReference(r,n))}gr(e){const n=new _e(new kt([])),r=new ln(n,e),i=new ln(n,e+1),o=[];return this.dr.forEachInRange([r,i],s=>{this.Vr(s),o.push(s.key)}),o}pr(){this.Tr.forEach(e=>this.Vr(e))}Vr(e){this.Tr=this.Tr.delete(e),this.dr=this.dr.delete(e)}yr(e){const n=new _e(new kt([])),r=new ln(n,e),i=new ln(n,e+1);let o=He();return this.dr.forEachInRange([r,i],s=>{o=o.add(s.key)}),o}containsKey(e){const n=new ln(e,0),r=this.Tr.firstAfterOrEqual(n);return r!==null&&e.isEqual(r.key)}}class ln{constructor(e,n){this.key=e,this.wr=n}static Er(e,n){return _e.comparator(e.key,n.key)||Je(e.wr,n.wr)}static Ar(e,n){return Je(e.wr,n.wr)||_e.comparator(e.key,n.key)}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class IZ{constructor(e,n){this.indexManager=e,this.referenceDelegate=n,this.mutationQueue=[],this.Sr=1,this.br=new xn(ln.Er)}checkEmpty(e){return Z.resolve(this.mutationQueue.length===0)}addMutationBatch(e,n,r,i){const o=this.Sr;this.Sr++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];const s=new KJ(o,n,r,i);this.mutationQueue.push(s);for(const a of i)this.br=this.br.add(new ln(a.key,o)),this.indexManager.addToCollectionParentIndex(e,a.key.path.popLast());return Z.resolve(s)}lookupMutationBatch(e,n){return Z.resolve(this.Dr(n))}getNextMutationBatchAfterBatchId(e,n){const r=n+1,i=this.vr(r),o=i<0?0:i;return Z.resolve(this.mutationQueue.length>o?this.mutationQueue[o]:null)}getHighestUnacknowledgedBatchId(){return Z.resolve(this.mutationQueue.length===0?-1:this.Sr-1)}getAllMutationBatches(e){return Z.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(e,n){const r=new ln(n,0),i=new ln(n,Number.POSITIVE_INFINITY),o=[];return this.br.forEachInRange([r,i],s=>{const a=this.Dr(s.wr);o.push(a)}),Z.resolve(o)}getAllMutationBatchesAffectingDocumentKeys(e,n){let r=new xn(Je);return n.forEach(i=>{const o=new ln(i,0),s=new ln(i,Number.POSITIVE_INFINITY);this.br.forEachInRange([o,s],a=>{r=r.add(a.wr)})}),Z.resolve(this.Cr(r))}getAllMutationBatchesAffectingQuery(e,n){const r=n.path,i=r.length+1;let o=r;_e.isDocumentKey(o)||(o=o.child(""));const s=new ln(new _e(o),0);let a=new xn(Je);return this.br.forEachWhile(l=>{const c=l.key.path;return!!r.isPrefixOf(c)&&(c.length===i&&(a=a.add(l.wr)),!0)},s),Z.resolve(this.Cr(a))}Cr(e){const n=[];return e.forEach(r=>{const i=this.Dr(r);i!==null&&n.push(i)}),n}removeMutationBatch(e,n){ht(this.Fr(n.batchId,"removed")===0),this.mutationQueue.shift();let r=this.br;return Z.forEach(n.mutations,i=>{const o=new ln(i.key,n.batchId);return r=r.delete(o),this.referenceDelegate.markPotentiallyOrphaned(e,i.key)}).next(()=>{this.br=r})}On(e){}containsKey(e,n){const r=new ln(n,0),i=this.br.firstAfterOrEqual(r);return Z.resolve(n.isEqual(i&&i.key))}performConsistencyCheck(e){return this.mutationQueue.length,Z.resolve()}Fr(e,n){return this.vr(e)}vr(e){return this.mutationQueue.length===0?0:e-this.mutationQueue[0].batchId}Dr(e){const n=this.vr(e);return n<0||n>=this.mutationQueue.length?null:this.mutationQueue[n]}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class PZ{constructor(e){this.Mr=e,this.docs=function(){return new Ot(_e.comparator)}(),this.size=0}setIndexManager(e){this.indexManager=e}addEntry(e,n){const r=n.key,i=this.docs.get(r),o=i?i.size:0,s=this.Mr(n);return this.docs=this.docs.insert(r,{document:n.mutableCopy(),size:s}),this.size+=s-o,this.indexManager.addToCollectionParentIndex(e,r.path.popLast())}removeEntry(e){const n=this.docs.get(e);n&&(this.docs=this.docs.remove(e),this.size-=n.size)}getEntry(e,n){const r=this.docs.get(n);return Z.resolve(r?r.document.mutableCopy():Dn.newInvalidDocument(n))}getEntries(e,n){let r=co();return n.forEach(i=>{const o=this.docs.get(i);r=r.insert(i,o?o.document.mutableCopy():Dn.newInvalidDocument(i))}),Z.resolve(r)}getDocumentsMatchingQuery(e,n,r,i){let o=co();const s=n.path,a=new _e(s.child("")),l=this.docs.getIteratorFrom(a);for(;l.hasNext();){const{key:c,value:{document:h}}=l.getNext();if(!s.isPrefixOf(c.path))break;c.path.length>s.length+1||hJ(dJ(h),r)<=0||(i.has(h.key)||Xm(n,h))&&(o=o.insert(h.key,h.mutableCopy()))}return Z.resolve(o)}getAllFromCollectionGroup(e,n,r,i){Pe()}Or(e,n){return Z.forEach(this.docs,r=>n(r))}newChangeBuffer(e){return new RZ(this)}getSize(e){return Z.resolve(this.size)}}class RZ extends xZ{constructor(e){super(),this.cr=e}applyChanges(e){const n=[];return this.changes.forEach((r,i)=>{i.isValidDocument()?n.push(this.cr.addEntry(e,i)):this.cr.removeEntry(r)}),Z.waitFor(n)}getFromCache(e,n){return this.cr.getEntry(e,n)}getAllFromCache(e,n){return this.cr.getEntries(e,n)}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class AZ{constructor(e){this.persistence=e,this.Nr=new tc(n=>Yw(n),Qw),this.lastRemoteSnapshotVersion=Me.min(),this.highestTargetId=0,this.Lr=0,this.Br=new nb,this.targetCount=0,this.kr=Ol.Bn()}forEachTarget(e,n){return this.Nr.forEach((r,i)=>n(i)),Z.resolve()}getLastRemoteSnapshotVersion(e){return Z.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(e){return Z.resolve(this.Lr)}allocateTargetId(e){return this.highestTargetId=this.kr.next(),Z.resolve(this.highestTargetId)}setTargetsMetadata(e,n,r){return r&&(this.lastRemoteSnapshotVersion=r),n>this.Lr&&(this.Lr=n),Z.resolve()}Kn(e){this.Nr.set(e.target,e);const n=e.targetId;n>this.highestTargetId&&(this.kr=new Ol(n),this.highestTargetId=n),e.sequenceNumber>this.Lr&&(this.Lr=e.sequenceNumber)}addTargetData(e,n){return this.Kn(n),this.targetCount+=1,Z.resolve()}updateTargetData(e,n){return this.Kn(n),Z.resolve()}removeTargetData(e,n){return this.Nr.delete(n.target),this.Br.gr(n.targetId),this.targetCount-=1,Z.resolve()}removeTargets(e,n,r){let i=0;const o=[];return this.Nr.forEach((s,a)=>{a.sequenceNumber<=n&&r.get(a.targetId)===null&&(this.Nr.delete(s),o.push(this.removeMatchingKeysForTargetId(e,a.targetId)),i++)}),Z.waitFor(o).next(()=>i)}getTargetCount(e){return Z.resolve(this.targetCount)}getTargetData(e,n){const r=this.Nr.get(n)||null;return Z.resolve(r)}addMatchingKeys(e,n,r){return this.Br.Rr(n,r),Z.resolve()}removeMatchingKeys(e,n,r){this.Br.mr(n,r);const i=this.persistence.referenceDelegate,o=[];return i&&n.forEach(s=>{o.push(i.markPotentiallyOrphaned(e,s))}),Z.waitFor(o)}removeMatchingKeysForTargetId(e,n){return this.Br.gr(n),Z.resolve()}getMatchingKeysForTargetId(e,n){const r=this.Br.yr(n);return Z.resolve(r)}containsKey(e,n){return Z.resolve(this.Br.containsKey(n))}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class NZ{constructor(e,n){this.qr={},this.overlays={},this.Qr=new Hw(0),this.Kr=!1,this.Kr=!0,this.$r=new CZ,this.referenceDelegate=e(this),this.Ur=new AZ(this),this.indexManager=new bZ,this.remoteDocumentCache=function(i){return new PZ(i)}(r=>this.referenceDelegate.Wr(r)),this.serializer=new vZ(n),this.Gr=new EZ(this.serializer)}start(){return Promise.resolve()}shutdown(){return this.Kr=!1,Promise.resolve()}get started(){return this.Kr}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(e){return this.indexManager}getDocumentOverlayCache(e){let n=this.overlays[e.toKey()];return n||(n=new SZ,this.overlays[e.toKey()]=n),n}getMutationQueue(e,n){let r=this.qr[e.toKey()];return r||(r=new IZ(n,this.referenceDelegate),this.qr[e.toKey()]=r),r}getGlobalsCache(){return this.$r}getTargetCache(){return this.Ur}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.Gr}runTransaction(e,n,r){ge("MemoryPersistence","Starting transaction:",e);const i=new MZ(this.Qr.next());return this.referenceDelegate.zr(),r(i).next(o=>this.referenceDelegate.jr(i).next(()=>o)).toPromise().then(o=>(i.raiseOnCommittedEvent(),o))}Hr(e,n){return Z.or(Object.values(this.qr).map(r=>()=>r.containsKey(e,n)))}}class MZ extends pJ{constructor(e){super(),this.currentSequenceNumber=e}}class rb{constructor(e){this.persistence=e,this.Jr=new nb,this.Yr=null}static Zr(e){return new rb(e)}get Xr(){if(this.Yr)return this.Yr;throw Pe()}addReference(e,n,r){return this.Jr.addReference(r,n),this.Xr.delete(r.toString()),Z.resolve()}removeReference(e,n,r){return this.Jr.removeReference(r,n),this.Xr.add(r.toString()),Z.resolve()}markPotentiallyOrphaned(e,n){return this.Xr.add(n.toString()),Z.resolve()}removeTarget(e,n){this.Jr.gr(n.targetId).forEach(i=>this.Xr.add(i.toString()));const r=this.persistence.getTargetCache();return r.getMatchingKeysForTargetId(e,n.targetId).next(i=>{i.forEach(o=>this.Xr.add(o.toString()))}).next(()=>r.removeTargetData(e,n))}zr(){this.Yr=new Set}jr(e){const n=this.persistence.getRemoteDocumentCache().newChangeBuffer();return Z.forEach(this.Xr,r=>{const i=_e.fromPath(r);return this.ei(e,i).next(o=>{o||n.removeEntry(i,Me.min())})}).next(()=>(this.Yr=null,n.apply(e)))}updateLimboDocument(e,n){return this.ei(e,n).next(r=>{r?this.Xr.delete(n.toString()):this.Xr.add(n.toString())})}Wr(e){return 0}ei(e,n){return Z.or([()=>Z.resolve(this.Jr.containsKey(n)),()=>this.persistence.getTargetCache().containsKey(e,n),()=>this.persistence.Hr(e,n)])}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class ib{constructor(e,n,r,i){this.targetId=e,this.fromCache=n,this.$i=r,this.Ui=i}static Wi(e,n){let r=He(),i=He();for(const o of n.docChanges)switch(o.type){case 0:r=r.add(o.doc.key);break;case 1:i=i.add(o.doc.key)}return new ib(e,n.fromCache,r,i)}}/** * @license * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class DZ{constructor(){this._documentReadCount=0}get documentReadCount(){return this._documentReadCount}incrementDocumentReadCount(e){this._documentReadCount+=e}}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class OZ{constructor(){this.Gi=!1,this.zi=!1,this.ji=100,this.Hi=function(){return FK()?8:mJ(Ln())>0?6:4}()}initialize(e,n){this.Ji=e,this.indexManager=n,this.Gi=!0}getDocumentsMatchingQuery(e,n,r,i){const o={result:null};return this.Yi(e,n).next(s=>{o.result=s}).next(()=>{if(!o.result)return this.Zi(e,n,i,r).next(s=>{o.result=s})}).next(()=>{if(o.result)return;const s=new DZ;return this.Xi(e,n,s).next(a=>{if(o.result=a,this.zi)return this.es(e,n,s,a.size)})}).next(()=>o.result)}es(e,n,r,i){return r.documentReadCountthis.Hi*i?(Dc()<=qe.DEBUG&&ge("QueryEngine","The SDK decides to create cache indexes for query:",Da(n),"as using cache indexes may help improve performance."),this.indexManager.createTargetIndexes(e,Si(n))):Z.resolve())}Yi(e,n){if(GE(n))return Z.resolve(null);let r=Si(n);return this.indexManager.getIndexType(e,r).next(i=>i===0?null:(n.limit!==null&&i===1&&(n=fp(n,null,"F"),r=Si(n)),this.indexManager.getDocumentsMatchingTarget(e,r).next(o=>{const s=He(...o);return this.Ji.getDocuments(e,s).next(a=>this.indexManager.getMinOffset(e,r).next(l=>{const c=this.ts(n,a);return this.ns(n,c,s,l.readTime)?this.Yi(e,fp(n,null,"F")):this.rs(e,c,n,l)}))})))}Zi(e,n,r,i){return GE(n)||i.isEqual(Me.min())?Z.resolve(null):this.Ji.getDocuments(e,r).next(o=>{const s=this.ts(n,o);return this.ns(n,s,r,i)?Z.resolve(null):(Dc()<=qe.DEBUG&&ge("QueryEngine","Re-using previous result from %s to execute query: %s",i.toString(),Da(n)),this.rs(e,s,n,uJ(i,-1)).next(a=>a))})}ts(e,n){let r=new xn(gN(e));return n.forEach((i,o)=>{Xm(e,o)&&(r=r.add(o))}),r}ns(e,n,r,i){if(e.limit===null)return!1;if(r.size!==n.size)return!0;const o=e.limitType==="F"?n.last():n.first();return!!o&&(o.hasPendingWrites||o.version.compareTo(i)>0)}Xi(e,n,r){return Dc()<=qe.DEBUG&&ge("QueryEngine","Using full collection scan to execute query:",Da(n)),this.Ji.getDocumentsMatchingQuery(e,n,ds.min(),r)}rs(e,n,r,i){return this.Ji.getDocumentsMatchingQuery(e,r,i).next(o=>(n.forEach(s=>{o=o.insert(s.key,s)}),o))}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class LZ{constructor(e,n,r,i){this.persistence=e,this.ss=n,this.serializer=i,this.os=new Ot(Je),this._s=new tc(o=>Yw(o),Qw),this.us=new Map,this.cs=e.getRemoteDocumentCache(),this.Ur=e.getTargetCache(),this.Gr=e.getBundleCache(),this.ls(r)}ls(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutationQueue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new TZ(this.cs,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.cs.setIndexManager(this.indexManager),this.ss.initialize(this.localDocuments,this.indexManager)}collectGarbage(e){return this.persistence.runTransaction("Collect garbage","readwrite-primary",n=>e.collect(n,this.os))}}function VZ(t,e,n,r){return new LZ(t,e,n,r)}async function FN(t,e){const n=De(t);return await n.persistence.runTransaction("Handle user change","readonly",r=>{let i;return n.mutationQueue.getAllMutationBatches(r).next(o=>(i=o,n.ls(e),n.mutationQueue.getAllMutationBatches(r))).next(o=>{const s=[],a=[];let l=He();for(const c of i){s.push(c.batchId);for(const h of c.mutations)l=l.add(h.key)}for(const c of o){a.push(c.batchId);for(const h of c.mutations)l=l.add(h.key)}return n.localDocuments.getDocuments(r,l).next(c=>({hs:c,removedBatchIds:s,addedBatchIds:a}))})})}function FZ(t,e){const n=De(t);return n.persistence.runTransaction("Acknowledge batch","readwrite-primary",r=>{const i=e.batch.keys(),o=n.cs.newChangeBuffer({trackRemovals:!0});return function(a,l,c,h){const f=c.batch,p=f.keys();let g=Z.resolve();return p.forEach(w=>{g=g.next(()=>h.getEntry(l,w)).next(b=>{const C=c.docVersions.get(w);ht(C!==null),b.version.compareTo(C)<0&&(f.applyToRemoteDocument(b,c),b.isValidDocument()&&(b.setReadTime(c.commitVersion),h.addEntry(b)))})}),g.next(()=>a.mutationQueue.removeMutationBatch(l,f))}(n,r,e,o).next(()=>o.apply(r)).next(()=>n.mutationQueue.performConsistencyCheck(r)).next(()=>n.documentOverlayCache.removeOverlaysForBatchId(r,i,e.batch.batchId)).next(()=>n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(r,function(a){let l=He();for(let c=0;c0&&(l=l.add(a.batch.mutations[c].key));return l}(e))).next(()=>n.localDocuments.getDocuments(r,i))})}function $N(t){const e=De(t);return e.persistence.runTransaction("Get last remote snapshot version","readonly",n=>e.Ur.getLastRemoteSnapshotVersion(n))}function $Z(t,e){const n=De(t),r=e.snapshotVersion;let i=n.os;return n.persistence.runTransaction("Apply remote event","readwrite-primary",o=>{const s=n.cs.newChangeBuffer({trackRemovals:!0});i=n.os;const a=[];e.targetChanges.forEach((h,f)=>{const p=i.get(f);if(!p)return;a.push(n.Ur.removeMatchingKeys(o,h.removedDocuments,f).next(()=>n.Ur.addMatchingKeys(o,h.addedDocuments,f)));let g=p.withSequenceNumber(o.currentSequenceNumber);e.targetMismatches.get(f)!==null?g=g.withResumeToken(Tn.EMPTY_BYTE_STRING,Me.min()).withLastLimboFreeSnapshotVersion(Me.min()):h.resumeToken.approximateByteSize()>0&&(g=g.withResumeToken(h.resumeToken,r)),i=i.insert(f,g),function(b,C,T){return b.resumeToken.approximateByteSize()===0||C.snapshotVersion.toMicroseconds()-b.snapshotVersion.toMicroseconds()>=3e8?!0:T.addedDocuments.size+T.modifiedDocuments.size+T.removedDocuments.size>0}(p,g,h)&&a.push(n.Ur.updateTargetData(o,g))});let l=co(),c=He();if(e.documentUpdates.forEach(h=>{e.resolvedLimboDocuments.has(h)&&a.push(n.persistence.referenceDelegate.updateLimboDocument(o,h))}),a.push(BZ(o,s,e.documentUpdates).next(h=>{l=h.Ps,c=h.Is})),!r.isEqual(Me.min())){const h=n.Ur.getLastRemoteSnapshotVersion(o).next(f=>n.Ur.setTargetsMetadata(o,o.currentSequenceNumber,r));a.push(h)}return Z.waitFor(a).next(()=>s.apply(o)).next(()=>n.localDocuments.getLocalViewOfDocuments(o,l,c)).next(()=>l)}).then(o=>(n.os=i,o))}function BZ(t,e,n){let r=He(),i=He();return n.forEach(o=>r=r.add(o)),e.getEntries(t,r).next(o=>{let s=co();return n.forEach((a,l)=>{const c=o.get(a);l.isFoundDocument()!==c.isFoundDocument()&&(i=i.add(a)),l.isNoDocument()&&l.version.isEqual(Me.min())?(e.removeEntry(a,l.readTime),s=s.insert(a,l)):!c.isValidDocument()||l.version.compareTo(c.version)>0||l.version.compareTo(c.version)===0&&c.hasPendingWrites?(e.addEntry(l),s=s.insert(a,l)):ge("LocalStore","Ignoring outdated watch update for ",a,". Current version:",c.version," Watch version:",l.version)}),{Ps:s,Is:i}})}function UZ(t,e){const n=De(t);return n.persistence.runTransaction("Get next mutation batch","readonly",r=>(e===void 0&&(e=-1),n.mutationQueue.getNextMutationBatchAfterBatchId(r,e)))}function zZ(t,e){const n=De(t);return n.persistence.runTransaction("Allocate target","readwrite",r=>{let i;return n.Ur.getTargetData(r,e).next(o=>o?(i=o,Z.resolve(i)):n.Ur.allocateTargetId(r).next(s=>(i=new jo(e,s,"TargetPurposeListen",r.currentSequenceNumber),n.Ur.addTargetData(r,i).next(()=>i))))}).then(r=>{const i=n.os.get(r.targetId);return(i===null||r.snapshotVersion.compareTo(i.snapshotVersion)>0)&&(n.os=n.os.insert(r.targetId,r),n._s.set(e,r.targetId)),r})}async function b0(t,e,n){const r=De(t),i=r.os.get(e),o=n?"readwrite":"readwrite-primary";try{n||await r.persistence.runTransaction("Release target",o,s=>r.persistence.referenceDelegate.removeTarget(s,i))}catch(s){if(!Rd(s))throw s;ge("LocalStore",`Failed to update sequence numbers for target ${e}: ${s}`)}r.os=r.os.remove(e),r._s.delete(i.target)}function rS(t,e,n){const r=De(t);let i=Me.min(),o=He();return r.persistence.runTransaction("Execute query","readwrite",s=>function(l,c,h){const f=De(l),p=f._s.get(h);return p!==void 0?Z.resolve(f.os.get(p)):f.Ur.getTargetData(c,h)}(r,s,Si(e)).next(a=>{if(a)return i=a.lastLimboFreeSnapshotVersion,r.Ur.getMatchingKeysForTargetId(s,a.targetId).next(l=>{o=l})}).next(()=>r.ss.getDocumentsMatchingQuery(s,e,n?i:Me.min(),n?o:He())).next(a=>(jZ(r,MJ(e),a),{documents:a,Ts:o})))}function jZ(t,e,n){let r=t.us.get(e)||Me.min();n.forEach((i,o)=>{o.readTime.compareTo(r)>0&&(r=o.readTime)}),t.us.set(e,r)}class iS{constructor(){this.activeTargetIds=$J()}fs(e){this.activeTargetIds=this.activeTargetIds.add(e)}gs(e){this.activeTargetIds=this.activeTargetIds.delete(e)}Vs(){const e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)}}class WZ{constructor(){this.so=new iS,this.oo={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(e){}updateMutationState(e,n,r){}addLocalQueryTarget(e,n=!0){return n&&this.so.fs(e),this.oo[e]||"not-current"}updateQueryState(e,n,r){this.oo[e]=n}removeLocalQueryTarget(e){this.so.gs(e)}isLocalQueryTarget(e){return this.so.activeTargetIds.has(e)}clearQueryState(e){delete this.oo[e]}getAllActiveQueryTargets(){return this.so.activeTargetIds}isActiveQueryTarget(e){return this.so.activeTargetIds.has(e)}start(){return this.so=new iS,Promise.resolve()}handleUserChange(e,n,r){}setOnlineState(e){}shutdown(){}writeSequenceNumber(e){}notifyBundleLoaded(e){}}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class HZ{_o(e){}shutdown(){}}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class oS{constructor(){this.ao=()=>this.uo(),this.co=()=>this.lo(),this.ho=[],this.Po()}_o(e){this.ho.push(e)}shutdown(){window.removeEventListener("online",this.ao),window.removeEventListener("offline",this.co)}Po(){window.addEventListener("online",this.ao),window.addEventListener("offline",this.co)}uo(){ge("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(const e of this.ho)e(0)}lo(){ge("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(const e of this.ho)e(1)}static D(){return typeof window<"u"&&window.addEventListener!==void 0&&window.removeEventListener!==void 0}}/** * @license * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */let Ch=null;function Sy(){return Ch===null?Ch=function(){return 268435456+Math.round(2147483648*Math.random())}():Ch++,"0x"+Ch.toString(16)}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const GZ={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"};/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class qZ{constructor(e){this.Io=e.Io,this.To=e.To}Eo(e){this.Ao=e}Ro(e){this.Vo=e}mo(e){this.fo=e}onMessage(e){this.po=e}close(){this.To()}send(e){this.Io(e)}yo(){this.Ao()}wo(){this.Vo()}So(e){this.fo(e)}bo(e){this.po(e)}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const Rn="WebChannelConnection";class KZ extends class{constructor(n){this.databaseInfo=n,this.databaseId=n.databaseId;const r=n.ssl?"https":"http",i=encodeURIComponent(this.databaseId.projectId),o=encodeURIComponent(this.databaseId.database);this.Do=r+"://"+n.host,this.vo=`projects/${i}/databases/${o}`,this.Co=this.databaseId.database==="(default)"?`project_id=${i}`:`project_id=${i}&database_id=${o}`}get Fo(){return!1}Mo(n,r,i,o,s){const a=Sy(),l=this.xo(n,r.toUriEncodedString());ge("RestConnection",`Sending RPC '${n}' ${a}:`,l,i);const c={"google-cloud-resource-prefix":this.vo,"x-goog-request-params":this.Co};return this.Oo(c,o,s),this.No(n,l,c,i).then(h=>(ge("RestConnection",`Received RPC '${n}' ${a}: `,h),h),h=>{throw Al("RestConnection",`RPC '${n}' ${a} failed with error: `,h,"url: ",l,"request:",i),h})}Lo(n,r,i,o,s,a){return this.Mo(n,r,i,o,s)}Oo(n,r,i){n["X-Goog-Api-Client"]=function(){return"gl-js/ fire/"+Jl}(),n["Content-Type"]="text/plain",this.databaseInfo.appId&&(n["X-Firebase-GMPID"]=this.databaseInfo.appId),r&&r.headers.forEach((o,s)=>n[s]=o),i&&i.headers.forEach((o,s)=>n[s]=o)}xo(n,r){const i=GZ[n];return`${this.Do}/v1/${r}:${i}`}terminate(){}}{constructor(e){super(e),this.forceLongPolling=e.forceLongPolling,this.autoDetectLongPolling=e.autoDetectLongPolling,this.useFetchStreams=e.useFetchStreams,this.longPollingOptions=e.longPollingOptions}No(e,n,r,i){const o=Sy();return new Promise((s,a)=>{const l=new JA;l.setWithCredentials(!0),l.listenOnce(ZA.COMPLETE,()=>{try{switch(l.getLastErrorCode()){case nf.NO_ERROR:const h=l.getResponseJson();ge(Rn,`XHR for RPC '${e}' ${o} received:`,JSON.stringify(h)),s(h);break;case nf.TIMEOUT:ge(Rn,`RPC '${e}' ${o} timed out`),a(new ue(Q.DEADLINE_EXCEEDED,"Request time out"));break;case nf.HTTP_ERROR:const f=l.getStatus();if(ge(Rn,`RPC '${e}' ${o} failed with status:`,f,"response text:",l.getResponseText()),f>0){let p=l.getResponseJson();Array.isArray(p)&&(p=p[0]);const g=p==null?void 0:p.error;if(g&&g.status&&g.message){const w=function(C){const T=C.toLowerCase().replace(/_/g,"-");return Object.values(Q).indexOf(T)>=0?T:Q.UNKNOWN}(g.status);a(new ue(w,g.message))}else a(new ue(Q.UNKNOWN,"Server responded with status "+l.getStatus()))}else a(new ue(Q.UNAVAILABLE,"Connection failed."));break;default:Pe()}}finally{ge(Rn,`RPC '${e}' ${o} completed.`)}});const c=JSON.stringify(i);ge(Rn,`RPC '${e}' ${o} sending request:`,i),l.send(n,"POST",c,r,15)})}Bo(e,n,r){const i=Sy(),o=[this.Do,"/","google.firestore.v1.Firestore","/",e,"/channel"],s=nN(),a=tN(),l={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:`projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling},c=this.longPollingOptions.timeoutSeconds;c!==void 0&&(l.longPollingTimeout=Math.round(1e3*c)),this.useFetchStreams&&(l.useFetchStreams=!0),this.Oo(l.initMessageHeaders,n,r),l.encodeInitMessageHeaders=!0;const h=o.join("");ge(Rn,`Creating RPC '${e}' stream ${i}: ${h}`,l);const f=s.createWebChannel(h,l);let p=!1,g=!1;const w=new qZ({Io:C=>{g?ge(Rn,`Not sending because RPC '${e}' stream ${i} is closed:`,C):(p||(ge(Rn,`Opening RPC '${e}' stream ${i} transport.`),f.open(),p=!0),ge(Rn,`RPC '${e}' stream ${i} sending:`,C),f.send(C))},To:()=>f.close()}),b=(C,T,y)=>{C.listen(T,_=>{try{y(_)}catch(S){setTimeout(()=>{throw S},0)}})};return b(f,Wc.EventType.OPEN,()=>{g||(ge(Rn,`RPC '${e}' stream ${i} transport opened.`),w.yo())}),b(f,Wc.EventType.CLOSE,()=>{g||(g=!0,ge(Rn,`RPC '${e}' stream ${i} transport closed`),w.So())}),b(f,Wc.EventType.ERROR,C=>{g||(g=!0,Al(Rn,`RPC '${e}' stream ${i} transport errored:`,C),w.So(new ue(Q.UNAVAILABLE,"The operation could not be completed")))}),b(f,Wc.EventType.MESSAGE,C=>{var T;if(!g){const y=C.data[0];ht(!!y);const _=y,S=_.error||((T=_[0])===null||T===void 0?void 0:T.error);if(S){ge(Rn,`RPC '${e}' stream ${i} received error:`,S);const N=S.status;let D=function(I){const P=qt[I];if(P!==void 0)return IN(P)}(N),v=S.message;D===void 0&&(D=Q.INTERNAL,v="Unknown error status: "+N+" with message "+S.message),g=!0,w.So(new ue(D,v)),f.close()}else ge(Rn,`RPC '${e}' stream ${i} received:`,y),w.bo(y)}}),b(a,eN.STAT_EVENT,C=>{C.stat===u0.PROXY?ge(Rn,`RPC '${e}' stream ${i} detected buffering proxy`):C.stat===u0.NOPROXY&&ge(Rn,`RPC '${e}' stream ${i} detected no buffering proxy`)}),setTimeout(()=>{w.wo()},0),w}}function Cy(){return typeof document<"u"?document:null}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function tg(t){return new iZ(t,!0)}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class BN{constructor(e,n,r=1e3,i=1.5,o=6e4){this.ui=e,this.timerId=n,this.ko=r,this.qo=i,this.Qo=o,this.Ko=0,this.$o=null,this.Uo=Date.now(),this.reset()}reset(){this.Ko=0}Wo(){this.Ko=this.Qo}Go(e){this.cancel();const n=Math.floor(this.Ko+this.zo()),r=Math.max(0,Date.now()-this.Uo),i=Math.max(0,n-r);i>0&&ge("ExponentialBackoff",`Backing off for ${i} ms (base delay: ${this.Ko} ms, delay with jitter: ${n} ms, last attempt: ${r} ms ago)`),this.$o=this.ui.enqueueAfterDelay(this.timerId,i,()=>(this.Uo=Date.now(),e())),this.Ko*=this.qo,this.Kothis.Qo&&(this.Ko=this.Qo)}jo(){this.$o!==null&&(this.$o.skipDelay(),this.$o=null)}cancel(){this.$o!==null&&(this.$o.cancel(),this.$o=null)}zo(){return(Math.random()-.5)*this.Ko}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class UN{constructor(e,n,r,i,o,s,a,l){this.ui=e,this.Ho=r,this.Jo=i,this.connection=o,this.authCredentialsProvider=s,this.appCheckCredentialsProvider=a,this.listener=l,this.state=0,this.Yo=0,this.Zo=null,this.Xo=null,this.stream=null,this.e_=0,this.t_=new BN(e,n)}n_(){return this.state===1||this.state===5||this.r_()}r_(){return this.state===2||this.state===3}start(){this.e_=0,this.state!==4?this.auth():this.i_()}async stop(){this.n_()&&await this.close(0)}s_(){this.state=0,this.t_.reset()}o_(){this.r_()&&this.Zo===null&&(this.Zo=this.ui.enqueueAfterDelay(this.Ho,6e4,()=>this.__()))}a_(e){this.u_(),this.stream.send(e)}async __(){if(this.r_())return this.close(0)}u_(){this.Zo&&(this.Zo.cancel(),this.Zo=null)}c_(){this.Xo&&(this.Xo.cancel(),this.Xo=null)}async close(e,n){this.u_(),this.c_(),this.t_.cancel(),this.Yo++,e!==4?this.t_.reset():n&&n.code===Q.RESOURCE_EXHAUSTED?(lo(n.toString()),lo("Using maximum backoff delay to prevent overloading the backend."),this.t_.Wo()):n&&n.code===Q.UNAUTHENTICATED&&this.state!==3&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),this.stream!==null&&(this.l_(),this.stream.close(),this.stream=null),this.state=e,await this.listener.mo(n)}l_(){}auth(){this.state=1;const e=this.h_(this.Yo),n=this.Yo;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then(([r,i])=>{this.Yo===n&&this.P_(r,i)},r=>{e(()=>{const i=new ue(Q.UNKNOWN,"Fetching auth token failed: "+r.message);return this.I_(i)})})}P_(e,n){const r=this.h_(this.Yo);this.stream=this.T_(e,n),this.stream.Eo(()=>{r(()=>this.listener.Eo())}),this.stream.Ro(()=>{r(()=>(this.state=2,this.Xo=this.ui.enqueueAfterDelay(this.Jo,1e4,()=>(this.r_()&&(this.state=3),Promise.resolve())),this.listener.Ro()))}),this.stream.mo(i=>{r(()=>this.I_(i))}),this.stream.onMessage(i=>{r(()=>++this.e_==1?this.E_(i):this.onNext(i))})}i_(){this.state=5,this.t_.Go(async()=>{this.state=0,this.start()})}I_(e){return ge("PersistentStream",`close with error: ${e}`),this.stream=null,this.close(4,e)}h_(e){return n=>{this.ui.enqueueAndForget(()=>this.Yo===e?n():(ge("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve()))}}}class YZ extends UN{constructor(e,n,r,i,o,s){super(e,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",n,r,i,s),this.serializer=o}T_(e,n){return this.connection.Bo("Listen",e,n)}E_(e){return this.onNext(e)}onNext(e){this.t_.reset();const n=aZ(this.serializer,e),r=function(o){if(!("targetChange"in o))return Me.min();const s=o.targetChange;return s.targetIds&&s.targetIds.length?Me.min():s.readTime?Ci(s.readTime):Me.min()}(e);return this.listener.d_(n,r)}A_(e){const n={};n.database=w0(this.serializer),n.addTarget=function(o,s){let a;const l=s.target;if(a=p0(l)?{documents:uZ(o,l)}:{query:dZ(o,l)._t},a.targetId=s.targetId,s.resumeToken.approximateByteSize()>0){a.resumeToken=AN(o,s.resumeToken);const c=g0(o,s.expectedCount);c!==null&&(a.expectedCount=c)}else if(s.snapshotVersion.compareTo(Me.min())>0){a.readTime=gp(o,s.snapshotVersion.toTimestamp());const c=g0(o,s.expectedCount);c!==null&&(a.expectedCount=c)}return a}(this.serializer,e);const r=fZ(this.serializer,e);r&&(n.labels=r),this.a_(n)}R_(e){const n={};n.database=w0(this.serializer),n.removeTarget=e,this.a_(n)}}class QZ extends UN{constructor(e,n,r,i,o,s){super(e,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",n,r,i,s),this.serializer=o}get V_(){return this.e_>0}start(){this.lastStreamToken=void 0,super.start()}l_(){this.V_&&this.m_([])}T_(e,n){return this.connection.Bo("Write",e,n)}E_(e){return ht(!!e.streamToken),this.lastStreamToken=e.streamToken,ht(!e.writeResults||e.writeResults.length===0),this.listener.f_()}onNext(e){ht(!!e.streamToken),this.lastStreamToken=e.streamToken,this.t_.reset();const n=cZ(e.writeResults,e.commitTime),r=Ci(e.commitTime);return this.listener.g_(r,n)}p_(){const e={};e.database=w0(this.serializer),this.a_(e)}m_(e){const n={streamToken:this.lastStreamToken,writes:e.map(r=>lZ(this.serializer,r))};this.a_(n)}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class XZ extends class{}{constructor(e,n,r,i){super(),this.authCredentials=e,this.appCheckCredentials=n,this.connection=r,this.serializer=i,this.y_=!1}w_(){if(this.y_)throw new ue(Q.FAILED_PRECONDITION,"The client has already been terminated.")}Mo(e,n,r,i){return this.w_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([o,s])=>this.connection.Mo(e,y0(n,r),i,o,s)).catch(o=>{throw o.name==="FirebaseError"?(o.code===Q.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),o):new ue(Q.UNKNOWN,o.toString())})}Lo(e,n,r,i,o){return this.w_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([s,a])=>this.connection.Lo(e,y0(n,r),i,s,a,o)).catch(s=>{throw s.name==="FirebaseError"?(s.code===Q.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),s):new ue(Q.UNKNOWN,s.toString())})}terminate(){this.y_=!0,this.connection.terminate()}}class JZ{constructor(e,n){this.asyncQueue=e,this.onlineStateHandler=n,this.state="Unknown",this.S_=0,this.b_=null,this.D_=!0}v_(){this.S_===0&&(this.C_("Unknown"),this.b_=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,()=>(this.b_=null,this.F_("Backend didn't respond within 10 seconds."),this.C_("Offline"),Promise.resolve())))}M_(e){this.state==="Online"?this.C_("Unknown"):(this.S_++,this.S_>=1&&(this.x_(),this.F_(`Connection failed 1 times. Most recent error: ${e.toString()}`),this.C_("Offline")))}set(e){this.x_(),this.S_=0,e==="Online"&&(this.D_=!1),this.C_(e)}C_(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}F_(e){const n=`Could not reach Cloud Firestore backend. ${e} This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.`;this.D_?(lo(n),this.D_=!1):ge("OnlineStateTracker",n)}x_(){this.b_!==null&&(this.b_.cancel(),this.b_=null)}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class ZZ{constructor(e,n,r,i,o){this.localStore=e,this.datastore=n,this.asyncQueue=r,this.remoteSyncer={},this.O_=[],this.N_=new Map,this.L_=new Set,this.B_=[],this.k_=o,this.k_._o(s=>{r.enqueueAndForget(async()=>{ya(this)&&(ge("RemoteStore","Restarting streams for network reachability change."),await async function(l){const c=De(l);c.L_.add(4),await Md(c),c.q_.set("Unknown"),c.L_.delete(4),await ng(c)}(this))})}),this.q_=new JZ(r,i)}}async function ng(t){if(ya(t))for(const e of t.B_)await e(!0)}async function Md(t){for(const e of t.B_)await e(!1)}function zN(t,e){const n=De(t);n.N_.has(e.targetId)||(n.N_.set(e.targetId,e),lb(n)?ab(n):nc(n).r_()&&sb(n,e))}function ob(t,e){const n=De(t),r=nc(n);n.N_.delete(e),r.r_()&&jN(n,e),n.N_.size===0&&(r.r_()?r.o_():ya(n)&&n.q_.set("Unknown"))}function sb(t,e){if(t.Q_.xe(e.targetId),e.resumeToken.approximateByteSize()>0||e.snapshotVersion.compareTo(Me.min())>0){const n=t.remoteSyncer.getRemoteKeysForTarget(e.targetId).size;e=e.withExpectedCount(n)}nc(t).A_(e)}function jN(t,e){t.Q_.xe(e),nc(t).R_(e)}function ab(t){t.Q_=new eZ({getRemoteKeysForTarget:e=>t.remoteSyncer.getRemoteKeysForTarget(e),ot:e=>t.N_.get(e)||null,tt:()=>t.datastore.serializer.databaseId}),nc(t).start(),t.q_.v_()}function lb(t){return ya(t)&&!nc(t).n_()&&t.N_.size>0}function ya(t){return De(t).L_.size===0}function WN(t){t.Q_=void 0}async function eee(t){t.q_.set("Online")}async function tee(t){t.N_.forEach((e,n)=>{sb(t,e)})}async function nee(t,e){WN(t),lb(t)?(t.q_.M_(e),ab(t)):t.q_.set("Unknown")}async function ree(t,e,n){if(t.q_.set("Online"),e instanceof RN&&e.state===2&&e.cause)try{await async function(i,o){const s=o.cause;for(const a of o.targetIds)i.N_.has(a)&&(await i.remoteSyncer.rejectListen(a,s),i.N_.delete(a),i.Q_.removeTarget(a))}(t,e)}catch(r){ge("RemoteStore","Failed to remove targets %s: %s ",e.targetIds.join(","),r),await yp(t,r)}else if(e instanceof sf?t.Q_.Ke(e):e instanceof PN?t.Q_.He(e):t.Q_.We(e),!n.isEqual(Me.min()))try{const r=await $N(t.localStore);n.compareTo(r)>=0&&await function(o,s){const a=o.Q_.rt(s);return a.targetChanges.forEach((l,c)=>{if(l.resumeToken.approximateByteSize()>0){const h=o.N_.get(c);h&&o.N_.set(c,h.withResumeToken(l.resumeToken,s))}}),a.targetMismatches.forEach((l,c)=>{const h=o.N_.get(l);if(!h)return;o.N_.set(l,h.withResumeToken(Tn.EMPTY_BYTE_STRING,h.snapshotVersion)),jN(o,l);const f=new jo(h.target,l,c,h.sequenceNumber);sb(o,f)}),o.remoteSyncer.applyRemoteEvent(a)}(t,n)}catch(r){ge("RemoteStore","Failed to raise snapshot:",r),await yp(t,r)}}async function yp(t,e,n){if(!Rd(e))throw e;t.L_.add(1),await Md(t),t.q_.set("Offline"),n||(n=()=>$N(t.localStore)),t.asyncQueue.enqueueRetryable(async()=>{ge("RemoteStore","Retrying IndexedDB access"),await n(),t.L_.delete(1),await ng(t)})}function HN(t,e){return e().catch(n=>yp(t,n,e))}async function rg(t){const e=De(t),n=fs(e);let r=e.O_.length>0?e.O_[e.O_.length-1].batchId:-1;for(;iee(e);)try{const i=await UZ(e.localStore,r);if(i===null){e.O_.length===0&&n.o_();break}r=i.batchId,oee(e,i)}catch(i){await yp(e,i)}GN(e)&&qN(e)}function iee(t){return ya(t)&&t.O_.length<10}function oee(t,e){t.O_.push(e);const n=fs(t);n.r_()&&n.V_&&n.m_(e.mutations)}function GN(t){return ya(t)&&!fs(t).n_()&&t.O_.length>0}function qN(t){fs(t).start()}async function see(t){fs(t).p_()}async function aee(t){const e=fs(t);for(const n of t.O_)e.m_(n.mutations)}async function lee(t,e,n){const r=t.O_.shift(),i=Zw.from(r,e,n);await HN(t,()=>t.remoteSyncer.applySuccessfulWrite(i)),await rg(t)}async function cee(t,e){e&&fs(t).V_&&await async function(r,i){if(function(s){return XJ(s)&&s!==Q.ABORTED}(i.code)){const o=r.O_.shift();fs(r).s_(),await HN(r,()=>r.remoteSyncer.rejectFailedWrite(o.batchId,i)),await rg(r)}}(t,e),GN(t)&&qN(t)}async function sS(t,e){const n=De(t);n.asyncQueue.verifyOperationInProgress(),ge("RemoteStore","RemoteStore received new credentials");const r=ya(n);n.L_.add(3),await Md(n),r&&n.q_.set("Unknown"),await n.remoteSyncer.handleCredentialChange(e),n.L_.delete(3),await ng(n)}async function uee(t,e){const n=De(t);e?(n.L_.delete(2),await ng(n)):e||(n.L_.add(2),await Md(n),n.q_.set("Unknown"))}function nc(t){return t.K_||(t.K_=function(n,r,i){const o=De(n);return o.w_(),new YZ(r,o.connection,o.authCredentials,o.appCheckCredentials,o.serializer,i)}(t.datastore,t.asyncQueue,{Eo:eee.bind(null,t),Ro:tee.bind(null,t),mo:nee.bind(null,t),d_:ree.bind(null,t)}),t.B_.push(async e=>{e?(t.K_.s_(),lb(t)?ab(t):t.q_.set("Unknown")):(await t.K_.stop(),WN(t))})),t.K_}function fs(t){return t.U_||(t.U_=function(n,r,i){const o=De(n);return o.w_(),new QZ(r,o.connection,o.authCredentials,o.appCheckCredentials,o.serializer,i)}(t.datastore,t.asyncQueue,{Eo:()=>Promise.resolve(),Ro:see.bind(null,t),mo:cee.bind(null,t),f_:aee.bind(null,t),g_:lee.bind(null,t)}),t.B_.push(async e=>{e?(t.U_.s_(),await rg(t)):(await t.U_.stop(),t.O_.length>0&&(ge("RemoteStore",`Stopping write stream with ${t.O_.length} pending writes`),t.O_=[]))})),t.U_}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class cb{constructor(e,n,r,i,o){this.asyncQueue=e,this.timerId=n,this.targetTimeMs=r,this.op=i,this.removalCallback=o,this.deferred=new Zi,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(s=>{})}get promise(){return this.deferred.promise}static createAndSchedule(e,n,r,i,o){const s=Date.now()+r,a=new cb(e,n,s,i,o);return a.start(r),a}start(e){this.timerHandle=setTimeout(()=>this.handleDelayElapsed(),e)}skipDelay(){return this.handleDelayElapsed()}cancel(e){this.timerHandle!==null&&(this.clearTimeout(),this.deferred.reject(new ue(Q.CANCELLED,"Operation cancelled"+(e?": "+e:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget(()=>this.timerHandle!==null?(this.clearTimeout(),this.op().then(e=>this.deferred.resolve(e))):Promise.resolve())}clearTimeout(){this.timerHandle!==null&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}function ub(t,e){if(lo("AsyncQueue",`${e}: ${t}`),Rd(t))return new ue(Q.UNAVAILABLE,`${e}: ${t}`);throw t}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class hl{constructor(e){this.comparator=e?(n,r)=>e(n,r)||_e.comparator(n.key,r.key):(n,r)=>_e.comparator(n.key,r.key),this.keyedMap=Hc(),this.sortedSet=new Ot(this.comparator)}static emptySet(e){return new hl(e.comparator)}has(e){return this.keyedMap.get(e)!=null}get(e){return this.keyedMap.get(e)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(e){const n=this.keyedMap.get(e);return n?this.sortedSet.indexOf(n):-1}get size(){return this.sortedSet.size}forEach(e){this.sortedSet.inorderTraversal((n,r)=>(e(n),!1))}add(e){const n=this.delete(e.key);return n.copy(n.keyedMap.insert(e.key,e),n.sortedSet.insert(e,null))}delete(e){const n=this.get(e);return n?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(n)):this}isEqual(e){if(!(e instanceof hl)||this.size!==e.size)return!1;const n=this.sortedSet.getIterator(),r=e.sortedSet.getIterator();for(;n.hasNext();){const i=n.getNext().key,o=r.getNext().key;if(!i.isEqual(o))return!1}return!0}toString(){const e=[];return this.forEach(n=>{e.push(n.toString())}),e.length===0?"DocumentSet ()":`DocumentSet ( `+e.join(` `)+` )`}copy(e,n){const r=new hl;return r.comparator=this.comparator,r.keyedMap=e,r.sortedSet=n,r}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class aS{constructor(){this.W_=new Ot(_e.comparator)}track(e){const n=e.doc.key,r=this.W_.get(n);r?e.type!==0&&r.type===3?this.W_=this.W_.insert(n,e):e.type===3&&r.type!==1?this.W_=this.W_.insert(n,{type:r.type,doc:e.doc}):e.type===2&&r.type===2?this.W_=this.W_.insert(n,{type:2,doc:e.doc}):e.type===2&&r.type===0?this.W_=this.W_.insert(n,{type:0,doc:e.doc}):e.type===1&&r.type===0?this.W_=this.W_.remove(n):e.type===1&&r.type===2?this.W_=this.W_.insert(n,{type:1,doc:r.doc}):e.type===0&&r.type===1?this.W_=this.W_.insert(n,{type:2,doc:e.doc}):Pe():this.W_=this.W_.insert(n,e)}G_(){const e=[];return this.W_.inorderTraversal((n,r)=>{e.push(r)}),e}}class Ll{constructor(e,n,r,i,o,s,a,l,c){this.query=e,this.docs=n,this.oldDocs=r,this.docChanges=i,this.mutatedKeys=o,this.fromCache=s,this.syncStateChanged=a,this.excludesMetadataChanges=l,this.hasCachedResults=c}static fromInitialDocuments(e,n,r,i,o){const s=[];return n.forEach(a=>{s.push({type:0,doc:a})}),new Ll(e,n,hl.emptySet(n),s,r,i,!0,!1,o)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(e){if(!(this.fromCache===e.fromCache&&this.hasCachedResults===e.hasCachedResults&&this.syncStateChanged===e.syncStateChanged&&this.mutatedKeys.isEqual(e.mutatedKeys)&&Qm(this.query,e.query)&&this.docs.isEqual(e.docs)&&this.oldDocs.isEqual(e.oldDocs)))return!1;const n=this.docChanges,r=e.docChanges;if(n.length!==r.length)return!1;for(let i=0;ie.J_())}}class hee{constructor(){this.queries=lS(),this.onlineState="Unknown",this.Y_=new Set}terminate(){(function(n,r){const i=De(n),o=i.queries;i.queries=lS(),o.forEach((s,a)=>{for(const l of a.j_)l.onError(r)})})(this,new ue(Q.ABORTED,"Firestore shutting down"))}}function lS(){return new tc(t=>mN(t),Qm)}async function KN(t,e){const n=De(t);let r=3;const i=e.query;let o=n.queries.get(i);o?!o.H_()&&e.J_()&&(r=2):(o=new dee,r=e.J_()?0:1);try{switch(r){case 0:o.z_=await n.onListen(i,!0);break;case 1:o.z_=await n.onListen(i,!1);break;case 2:await n.onFirstRemoteStoreListen(i)}}catch(s){const a=ub(s,`Initialization of query '${Da(e.query)}' failed`);return void e.onError(a)}n.queries.set(i,o),o.j_.push(e),e.Z_(n.onlineState),o.z_&&e.X_(o.z_)&&db(n)}async function YN(t,e){const n=De(t),r=e.query;let i=3;const o=n.queries.get(r);if(o){const s=o.j_.indexOf(e);s>=0&&(o.j_.splice(s,1),o.j_.length===0?i=e.J_()?0:1:!o.H_()&&e.J_()&&(i=2))}switch(i){case 0:return n.queries.delete(r),n.onUnlisten(r,!0);case 1:return n.queries.delete(r),n.onUnlisten(r,!1);case 2:return n.onLastRemoteStoreUnlisten(r);default:return}}function fee(t,e){const n=De(t);let r=!1;for(const i of e){const o=i.query,s=n.queries.get(o);if(s){for(const a of s.j_)a.X_(i)&&(r=!0);s.z_=i}}r&&db(n)}function pee(t,e,n){const r=De(t),i=r.queries.get(e);if(i)for(const o of i.j_)o.onError(n);r.queries.delete(e)}function db(t){t.Y_.forEach(e=>{e.next()})}var _0,cS;(cS=_0||(_0={})).ea="default",cS.Cache="cache";class QN{constructor(e,n,r){this.query=e,this.ta=n,this.na=!1,this.ra=null,this.onlineState="Unknown",this.options=r||{}}X_(e){if(!this.options.includeMetadataChanges){const r=[];for(const i of e.docChanges)i.type!==3&&r.push(i);e=new Ll(e.query,e.docs,e.oldDocs,r,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0,e.hasCachedResults)}let n=!1;return this.na?this.ia(e)&&(this.ta.next(e),n=!0):this.sa(e,this.onlineState)&&(this.oa(e),n=!0),this.ra=e,n}onError(e){this.ta.error(e)}Z_(e){this.onlineState=e;let n=!1;return this.ra&&!this.na&&this.sa(this.ra,e)&&(this.oa(this.ra),n=!0),n}sa(e,n){if(!e.fromCache||!this.J_())return!0;const r=n!=="Offline";return(!this.options._a||!r)&&(!e.docs.isEmpty()||e.hasCachedResults||n==="Offline")}ia(e){if(e.docChanges.length>0)return!0;const n=this.ra&&this.ra.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!n)&&this.options.includeMetadataChanges===!0}oa(e){e=Ll.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache,e.hasCachedResults),this.na=!0,this.ta.next(e)}J_(){return this.options.source!==_0.Cache}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class XN{constructor(e){this.key=e}}class JN{constructor(e){this.key=e}}class mee{constructor(e,n){this.query=e,this.Ta=n,this.Ea=null,this.hasCachedResults=!1,this.current=!1,this.da=He(),this.mutatedKeys=He(),this.Aa=gN(e),this.Ra=new hl(this.Aa)}get Va(){return this.Ta}ma(e,n){const r=n?n.fa:new aS,i=n?n.Ra:this.Ra;let o=n?n.mutatedKeys:this.mutatedKeys,s=i,a=!1;const l=this.query.limitType==="F"&&i.size===this.query.limit?i.last():null,c=this.query.limitType==="L"&&i.size===this.query.limit?i.first():null;if(e.inorderTraversal((h,f)=>{const p=i.get(h),g=Xm(this.query,f)?f:null,w=!!p&&this.mutatedKeys.has(p.key),b=!!g&&(g.hasLocalMutations||this.mutatedKeys.has(g.key)&&g.hasCommittedMutations);let C=!1;p&&g?p.data.isEqual(g.data)?w!==b&&(r.track({type:3,doc:g}),C=!0):this.ga(p,g)||(r.track({type:2,doc:g}),C=!0,(l&&this.Aa(g,l)>0||c&&this.Aa(g,c)<0)&&(a=!0)):!p&&g?(r.track({type:0,doc:g}),C=!0):p&&!g&&(r.track({type:1,doc:p}),C=!0,(l||c)&&(a=!0)),C&&(g?(s=s.add(g),o=b?o.add(h):o.delete(h)):(s=s.delete(h),o=o.delete(h)))}),this.query.limit!==null)for(;s.size>this.query.limit;){const h=this.query.limitType==="F"?s.last():s.first();s=s.delete(h.key),o=o.delete(h.key),r.track({type:1,doc:h})}return{Ra:s,fa:r,ns:a,mutatedKeys:o}}ga(e,n){return e.hasLocalMutations&&n.hasCommittedMutations&&!n.hasLocalMutations}applyChanges(e,n,r,i){const o=this.Ra;this.Ra=e.Ra,this.mutatedKeys=e.mutatedKeys;const s=e.fa.G_();s.sort((h,f)=>function(g,w){const b=C=>{switch(C){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return Pe()}};return b(g)-b(w)}(h.type,f.type)||this.Aa(h.doc,f.doc)),this.pa(r),i=i!=null&&i;const a=n&&!i?this.ya():[],l=this.da.size===0&&this.current&&!i?1:0,c=l!==this.Ea;return this.Ea=l,s.length!==0||c?{snapshot:new Ll(this.query,e.Ra,o,s,e.mutatedKeys,l===0,c,!1,!!r&&r.resumeToken.approximateByteSize()>0),wa:a}:{wa:a}}Z_(e){return this.current&&e==="Offline"?(this.current=!1,this.applyChanges({Ra:this.Ra,fa:new aS,mutatedKeys:this.mutatedKeys,ns:!1},!1)):{wa:[]}}Sa(e){return!this.Ta.has(e)&&!!this.Ra.has(e)&&!this.Ra.get(e).hasLocalMutations}pa(e){e&&(e.addedDocuments.forEach(n=>this.Ta=this.Ta.add(n)),e.modifiedDocuments.forEach(n=>{}),e.removedDocuments.forEach(n=>this.Ta=this.Ta.delete(n)),this.current=e.current)}ya(){if(!this.current)return[];const e=this.da;this.da=He(),this.Ra.forEach(r=>{this.Sa(r.key)&&(this.da=this.da.add(r.key))});const n=[];return e.forEach(r=>{this.da.has(r)||n.push(new JN(r))}),this.da.forEach(r=>{e.has(r)||n.push(new XN(r))}),n}ba(e){this.Ta=e.Ts,this.da=He();const n=this.ma(e.documents);return this.applyChanges(n,!0)}Da(){return Ll.fromInitialDocuments(this.query,this.Ra,this.mutatedKeys,this.Ea===0,this.hasCachedResults)}}class gee{constructor(e,n,r){this.query=e,this.targetId=n,this.view=r}}class yee{constructor(e){this.key=e,this.va=!1}}class vee{constructor(e,n,r,i,o,s){this.localStore=e,this.remoteStore=n,this.eventManager=r,this.sharedClientState=i,this.currentUser=o,this.maxConcurrentLimboResolutions=s,this.Ca={},this.Fa=new tc(a=>mN(a),Qm),this.Ma=new Map,this.xa=new Set,this.Oa=new Ot(_e.comparator),this.Na=new Map,this.La=new nb,this.Ba={},this.ka=new Map,this.qa=Ol.kn(),this.onlineState="Unknown",this.Qa=void 0}get isPrimaryClient(){return this.Qa===!0}}async function wee(t,e,n=!0){const r=iM(t);let i;const o=r.Fa.get(e);return o?(r.sharedClientState.addLocalQueryTarget(o.targetId),i=o.view.Da()):i=await ZN(r,e,n,!0),i}async function bee(t,e){const n=iM(t);await ZN(n,e,!0,!1)}async function ZN(t,e,n,r){const i=await zZ(t.localStore,Si(e)),o=i.targetId,s=t.sharedClientState.addLocalQueryTarget(o,n);let a;return r&&(a=await _ee(t,e,o,s==="current",i.resumeToken)),t.isPrimaryClient&&n&&zN(t.remoteStore,i),a}async function _ee(t,e,n,r,i){t.Ka=(f,p,g)=>async function(b,C,T,y){let _=C.view.ma(T);_.ns&&(_=await rS(b.localStore,C.query,!1).then(({documents:v})=>C.view.ma(v,_)));const S=y&&y.targetChanges.get(C.targetId),N=y&&y.targetMismatches.get(C.targetId)!=null,D=C.view.applyChanges(_,b.isPrimaryClient,S,N);return dS(b,C.targetId,D.wa),D.snapshot}(t,f,p,g);const o=await rS(t.localStore,e,!0),s=new mee(e,o.Ts),a=s.ma(o.documents),l=Nd.createSynthesizedTargetChangeForCurrentChange(n,r&&t.onlineState!=="Offline",i),c=s.applyChanges(a,t.isPrimaryClient,l);dS(t,n,c.wa);const h=new gee(e,n,s);return t.Fa.set(e,h),t.Ma.has(n)?t.Ma.get(n).push(e):t.Ma.set(n,[e]),c.snapshot}async function xee(t,e,n){const r=De(t),i=r.Fa.get(e),o=r.Ma.get(i.targetId);if(o.length>1)return r.Ma.set(i.targetId,o.filter(s=>!Qm(s,e))),void r.Fa.delete(e);r.isPrimaryClient?(r.sharedClientState.removeLocalQueryTarget(i.targetId),r.sharedClientState.isActiveQueryTarget(i.targetId)||await b0(r.localStore,i.targetId,!1).then(()=>{r.sharedClientState.clearQueryState(i.targetId),n&&ob(r.remoteStore,i.targetId),x0(r,i.targetId)}).catch(Pd)):(x0(r,i.targetId),await b0(r.localStore,i.targetId,!0))}async function kee(t,e){const n=De(t),r=n.Fa.get(e),i=n.Ma.get(r.targetId);n.isPrimaryClient&&i.length===1&&(n.sharedClientState.removeLocalQueryTarget(r.targetId),ob(n.remoteStore,r.targetId))}async function Tee(t,e,n){const r=Aee(t);try{const i=await function(s,a){const l=De(s),c=sn.now(),h=a.reduce((g,w)=>g.add(w.key),He());let f,p;return l.persistence.runTransaction("Locally write mutations","readwrite",g=>{let w=co(),b=He();return l.cs.getEntries(g,h).next(C=>{w=C,w.forEach((T,y)=>{y.isValidDocument()||(b=b.add(T))})}).next(()=>l.localDocuments.getOverlayedDocuments(g,w)).next(C=>{f=C;const T=[];for(const y of a){const _=GJ(y,f.get(y.key).overlayedDocument);_!=null&&T.push(new ga(y.key,_,aN(_.value.mapValue),eo.exists(!0)))}return l.mutationQueue.addMutationBatch(g,c,T,a)}).next(C=>{p=C;const T=C.applyToLocalDocumentSet(f,b);return l.documentOverlayCache.saveOverlays(g,C.batchId,T)})}).then(()=>({batchId:p.batchId,changes:vN(f)}))}(r.localStore,e);r.sharedClientState.addPendingMutation(i.batchId),function(s,a,l){let c=s.Ba[s.currentUser.toKey()];c||(c=new Ot(Je)),c=c.insert(a,l),s.Ba[s.currentUser.toKey()]=c}(r,i.batchId,n),await Dd(r,i.changes),await rg(r.remoteStore)}catch(i){const o=ub(i,"Failed to persist write");n.reject(o)}}async function eM(t,e){const n=De(t);try{const r=await $Z(n.localStore,e);e.targetChanges.forEach((i,o)=>{const s=n.Na.get(o);s&&(ht(i.addedDocuments.size+i.modifiedDocuments.size+i.removedDocuments.size<=1),i.addedDocuments.size>0?s.va=!0:i.modifiedDocuments.size>0?ht(s.va):i.removedDocuments.size>0&&(ht(s.va),s.va=!1))}),await Dd(n,r,e)}catch(r){await Pd(r)}}function uS(t,e,n){const r=De(t);if(r.isPrimaryClient&&n===0||!r.isPrimaryClient&&n===1){const i=[];r.Fa.forEach((o,s)=>{const a=s.view.Z_(e);a.snapshot&&i.push(a.snapshot)}),function(s,a){const l=De(s);l.onlineState=a;let c=!1;l.queries.forEach((h,f)=>{for(const p of f.j_)p.Z_(a)&&(c=!0)}),c&&db(l)}(r.eventManager,e),i.length&&r.Ca.d_(i),r.onlineState=e,r.isPrimaryClient&&r.sharedClientState.setOnlineState(e)}}async function Eee(t,e,n){const r=De(t);r.sharedClientState.updateQueryState(e,"rejected",n);const i=r.Na.get(e),o=i&&i.key;if(o){let s=new Ot(_e.comparator);s=s.insert(o,Dn.newNoDocument(o,Me.min()));const a=He().add(o),l=new eg(Me.min(),new Map,new Ot(Je),s,a);await eM(r,l),r.Oa=r.Oa.remove(o),r.Na.delete(e),hb(r)}else await b0(r.localStore,e,!1).then(()=>x0(r,e,n)).catch(Pd)}async function See(t,e){const n=De(t),r=e.batch.batchId;try{const i=await FZ(n.localStore,e);nM(n,r,null),tM(n,r),n.sharedClientState.updateMutationState(r,"acknowledged"),await Dd(n,i)}catch(i){await Pd(i)}}async function Cee(t,e,n){const r=De(t);try{const i=await function(s,a){const l=De(s);return l.persistence.runTransaction("Reject batch","readwrite-primary",c=>{let h;return l.mutationQueue.lookupMutationBatch(c,a).next(f=>(ht(f!==null),h=f.keys(),l.mutationQueue.removeMutationBatch(c,f))).next(()=>l.mutationQueue.performConsistencyCheck(c)).next(()=>l.documentOverlayCache.removeOverlaysForBatchId(c,h,a)).next(()=>l.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(c,h)).next(()=>l.localDocuments.getDocuments(c,h))})}(r.localStore,e);nM(r,e,n),tM(r,e),r.sharedClientState.updateMutationState(e,"rejected",n),await Dd(r,i)}catch(i){await Pd(i)}}function tM(t,e){(t.ka.get(e)||[]).forEach(n=>{n.resolve()}),t.ka.delete(e)}function nM(t,e,n){const r=De(t);let i=r.Ba[r.currentUser.toKey()];if(i){const o=i.get(e);o&&(n?o.reject(n):o.resolve(),i=i.remove(e)),r.Ba[r.currentUser.toKey()]=i}}function x0(t,e,n=null){t.sharedClientState.removeLocalQueryTarget(e);for(const r of t.Ma.get(e))t.Fa.delete(r),n&&t.Ca.$a(r,n);t.Ma.delete(e),t.isPrimaryClient&&t.La.gr(e).forEach(r=>{t.La.containsKey(r)||rM(t,r)})}function rM(t,e){t.xa.delete(e.path.canonicalString());const n=t.Oa.get(e);n!==null&&(ob(t.remoteStore,n),t.Oa=t.Oa.remove(e),t.Na.delete(n),hb(t))}function dS(t,e,n){for(const r of n)r instanceof XN?(t.La.addReference(r.key,e),Iee(t,r)):r instanceof JN?(ge("SyncEngine","Document no longer in limbo: "+r.key),t.La.removeReference(r.key,e),t.La.containsKey(r.key)||rM(t,r.key)):Pe()}function Iee(t,e){const n=e.key,r=n.path.canonicalString();t.Oa.get(n)||t.xa.has(r)||(ge("SyncEngine","New document in limbo: "+n),t.xa.add(r),hb(t))}function hb(t){for(;t.xa.size>0&&t.Oa.size{s.push(r.Ka(l,e,n).then(c=>{var h;if((c||n)&&r.isPrimaryClient){const f=c?!c.fromCache:(h=n==null?void 0:n.targetChanges.get(l.targetId))===null||h===void 0?void 0:h.current;r.sharedClientState.updateQueryState(l.targetId,f?"current":"not-current")}if(c){i.push(c);const f=ib.Wi(l.targetId,c);o.push(f)}}))}),await Promise.all(s),r.Ca.d_(i),await async function(l,c){const h=De(l);try{await h.persistence.runTransaction("notifyLocalViewChanges","readwrite",f=>Z.forEach(c,p=>Z.forEach(p.$i,g=>h.persistence.referenceDelegate.addReference(f,p.targetId,g)).next(()=>Z.forEach(p.Ui,g=>h.persistence.referenceDelegate.removeReference(f,p.targetId,g)))))}catch(f){if(!Rd(f))throw f;ge("LocalStore","Failed to update sequence numbers: "+f)}for(const f of c){const p=f.targetId;if(!f.fromCache){const g=h.os.get(p),w=g.snapshotVersion,b=g.withLastLimboFreeSnapshotVersion(w);h.os=h.os.insert(p,b)}}}(r.localStore,o))}async function Pee(t,e){const n=De(t);if(!n.currentUser.isEqual(e)){ge("SyncEngine","User change. New user:",e.toKey());const r=await FN(n.localStore,e);n.currentUser=e,function(o,s){o.ka.forEach(a=>{a.forEach(l=>{l.reject(new ue(Q.CANCELLED,s))})}),o.ka.clear()}(n,"'waitForPendingWrites' promise is rejected due to a user change."),n.sharedClientState.handleUserChange(e,r.removedBatchIds,r.addedBatchIds),await Dd(n,r.hs)}}function Ree(t,e){const n=De(t),r=n.Na.get(e);if(r&&r.va)return He().add(r.key);{let i=He();const o=n.Ma.get(e);if(!o)return i;for(const s of o){const a=n.Fa.get(s);i=i.unionWith(a.view.Va)}return i}}function iM(t){const e=De(t);return e.remoteStore.remoteSyncer.applyRemoteEvent=eM.bind(null,e),e.remoteStore.remoteSyncer.getRemoteKeysForTarget=Ree.bind(null,e),e.remoteStore.remoteSyncer.rejectListen=Eee.bind(null,e),e.Ca.d_=fee.bind(null,e.eventManager),e.Ca.$a=pee.bind(null,e.eventManager),e}function Aee(t){const e=De(t);return e.remoteStore.remoteSyncer.applySuccessfulWrite=See.bind(null,e),e.remoteStore.remoteSyncer.rejectFailedWrite=Cee.bind(null,e),e}class vp{constructor(){this.kind="memory",this.synchronizeTabs=!1}async initialize(e){this.serializer=tg(e.databaseInfo.databaseId),this.sharedClientState=this.Wa(e),this.persistence=this.Ga(e),await this.persistence.start(),this.localStore=this.za(e),this.gcScheduler=this.ja(e,this.localStore),this.indexBackfillerScheduler=this.Ha(e,this.localStore)}ja(e,n){return null}Ha(e,n){return null}za(e){return VZ(this.persistence,new OZ,e.initialUser,this.serializer)}Ga(e){return new NZ(rb.Zr,this.serializer)}Wa(e){return new WZ}async terminate(){var e,n;(e=this.gcScheduler)===null||e===void 0||e.stop(),(n=this.indexBackfillerScheduler)===null||n===void 0||n.stop(),this.sharedClientState.shutdown(),await this.persistence.shutdown()}}vp.provider={build:()=>new vp};class k0{async initialize(e,n){this.localStore||(this.localStore=e.localStore,this.sharedClientState=e.sharedClientState,this.datastore=this.createDatastore(n),this.remoteStore=this.createRemoteStore(n),this.eventManager=this.createEventManager(n),this.syncEngine=this.createSyncEngine(n,!e.synchronizeTabs),this.sharedClientState.onlineStateHandler=r=>uS(this.syncEngine,r,1),this.remoteStore.remoteSyncer.handleCredentialChange=Pee.bind(null,this.syncEngine),await uee(this.remoteStore,this.syncEngine.isPrimaryClient))}createEventManager(e){return function(){return new hee}()}createDatastore(e){const n=tg(e.databaseInfo.databaseId),r=function(o){return new KZ(o)}(e.databaseInfo);return function(o,s,a,l){return new XZ(o,s,a,l)}(e.authCredentials,e.appCheckCredentials,r,n)}createRemoteStore(e){return function(r,i,o,s,a){return new ZZ(r,i,o,s,a)}(this.localStore,this.datastore,e.asyncQueue,n=>uS(this.syncEngine,n,0),function(){return oS.D()?new oS:new HZ}())}createSyncEngine(e,n){return function(i,o,s,a,l,c,h){const f=new vee(i,o,s,a,l,c);return h&&(f.Qa=!0),f}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,e.initialUser,e.maxConcurrentLimboResolutions,n)}async terminate(){var e,n;await async function(i){const o=De(i);ge("RemoteStore","RemoteStore shutting down."),o.L_.add(5),await Md(o),o.k_.shutdown(),o.q_.set("Unknown")}(this.remoteStore),(e=this.datastore)===null||e===void 0||e.terminate(),(n=this.eventManager)===null||n===void 0||n.terminate()}}k0.provider={build:()=>new k0};/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *//** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class oM{constructor(e){this.observer=e,this.muted=!1}next(e){this.muted||this.observer.next&&this.Ya(this.observer.next,e)}error(e){this.muted||(this.observer.error?this.Ya(this.observer.error,e):lo("Uncaught Error in snapshot listener:",e.toString()))}Za(){this.muted=!0}Ya(e,n){setTimeout(()=>{this.muted||e(n)},0)}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Nee{constructor(e,n,r,i,o){this.authCredentials=e,this.appCheckCredentials=n,this.asyncQueue=r,this.databaseInfo=i,this.user=Nn.UNAUTHENTICATED,this.clientId=iN.newId(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this._uninitializedComponentsProvider=o,this.authCredentials.start(r,async s=>{ge("FirestoreClient","Received user=",s.uid),await this.authCredentialListener(s),this.user=s}),this.appCheckCredentials.start(r,s=>(ge("FirestoreClient","Received new app check token=",s),this.appCheckCredentialListener(s,this.user)))}get configuration(){return{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(e){this.authCredentialListener=e}setAppCheckTokenChangeListener(e){this.appCheckCredentialListener=e}terminate(){this.asyncQueue.enterRestrictedMode();const e=new Zi;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(async()=>{try{this._onlineComponents&&await this._onlineComponents.terminate(),this._offlineComponents&&await this._offlineComponents.terminate(),this.authCredentials.shutdown(),this.appCheckCredentials.shutdown(),e.resolve()}catch(n){const r=ub(n,"Failed to shutdown persistence");e.reject(r)}}),e.promise}}async function Iy(t,e){t.asyncQueue.verifyOperationInProgress(),ge("FirestoreClient","Initializing OfflineComponentProvider");const n=t.configuration;await e.initialize(n);let r=n.initialUser;t.setCredentialChangeListener(async i=>{r.isEqual(i)||(await FN(e.localStore,i),r=i)}),e.persistence.setDatabaseDeletedListener(()=>t.terminate()),t._offlineComponents=e}async function hS(t,e){t.asyncQueue.verifyOperationInProgress();const n=await Mee(t);ge("FirestoreClient","Initializing OnlineComponentProvider"),await e.initialize(n,t.configuration),t.setCredentialChangeListener(r=>sS(e.remoteStore,r)),t.setAppCheckTokenChangeListener((r,i)=>sS(e.remoteStore,i)),t._onlineComponents=e}async function Mee(t){if(!t._offlineComponents)if(t._uninitializedComponentsProvider){ge("FirestoreClient","Using user provided OfflineComponentProvider");try{await Iy(t,t._uninitializedComponentsProvider._offline)}catch(e){const n=e;if(!function(i){return i.name==="FirebaseError"?i.code===Q.FAILED_PRECONDITION||i.code===Q.UNIMPLEMENTED:!(typeof DOMException<"u"&&i instanceof DOMException)||i.code===22||i.code===20||i.code===11}(n))throw n;Al("Error using user provided cache. Falling back to memory cache: "+n),await Iy(t,new vp)}}else ge("FirestoreClient","Using default OfflineComponentProvider"),await Iy(t,new vp);return t._offlineComponents}async function sM(t){return t._onlineComponents||(t._uninitializedComponentsProvider?(ge("FirestoreClient","Using user provided OnlineComponentProvider"),await hS(t,t._uninitializedComponentsProvider._online)):(ge("FirestoreClient","Using default OnlineComponentProvider"),await hS(t,new k0))),t._onlineComponents}function Dee(t){return sM(t).then(e=>e.syncEngine)}async function aM(t){const e=await sM(t),n=e.eventManager;return n.onListen=wee.bind(null,e.syncEngine),n.onUnlisten=xee.bind(null,e.syncEngine),n.onFirstRemoteStoreListen=bee.bind(null,e.syncEngine),n.onLastRemoteStoreUnlisten=kee.bind(null,e.syncEngine),n}function Oee(t,e,n={}){const r=new Zi;return t.asyncQueue.enqueueAndForget(async()=>function(o,s,a,l,c){const h=new oM({next:p=>{h.Za(),s.enqueueAndForget(()=>YN(o,f));const g=p.docs.has(a);!g&&p.fromCache?c.reject(new ue(Q.UNAVAILABLE,"Failed to get document because the client is offline.")):g&&p.fromCache&&l&&l.source==="server"?c.reject(new ue(Q.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):c.resolve(p)},error:p=>c.reject(p)}),f=new QN(Xw(a.path),h,{includeMetadataChanges:!0,_a:!0});return KN(o,f)}(await aM(t),t.asyncQueue,e,n,r)),r.promise}function Lee(t,e,n={}){const r=new Zi;return t.asyncQueue.enqueueAndForget(async()=>function(o,s,a,l,c){const h=new oM({next:p=>{h.Za(),s.enqueueAndForget(()=>YN(o,f)),p.fromCache&&l.source==="server"?c.reject(new ue(Q.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):c.resolve(p)},error:p=>c.reject(p)}),f=new QN(a,h,{includeMetadataChanges:!0,_a:!0});return KN(o,f)}(await aM(t),t.asyncQueue,e,n,r)),r.promise}/** * @license * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function lM(t){const e={};return t.timeoutSeconds!==void 0&&(e.timeoutSeconds=t.timeoutSeconds),e}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const fS=new Map;/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function cM(t,e,n){if(!n)throw new ue(Q.INVALID_ARGUMENT,`Function ${t}() cannot be called with an empty ${e}.`)}function Vee(t,e,n,r){if(e===!0&&r===!0)throw new ue(Q.INVALID_ARGUMENT,`${t} and ${n} cannot be used together.`)}function pS(t){if(!_e.isDocumentKey(t))throw new ue(Q.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${t} has ${t.length}.`)}function mS(t){if(_e.isDocumentKey(t))throw new ue(Q.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${t} has ${t.length}.`)}function ig(t){if(t===void 0)return"undefined";if(t===null)return"null";if(typeof t=="string")return t.length>20&&(t=`${t.substring(0,20)}...`),JSON.stringify(t);if(typeof t=="number"||typeof t=="boolean")return""+t;if(typeof t=="object"){if(t instanceof Array)return"an array";{const e=function(r){return r.constructor?r.constructor.name:null}(t);return e?`a custom ${e} object`:"an object"}}return typeof t=="function"?"a function":Pe()}function ua(t,e){if("_delegate"in t&&(t=t._delegate),!(t instanceof e)){if(e.name===t.constructor.name)throw new ue(Q.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{const n=ig(t);throw new ue(Q.INVALID_ARGUMENT,`Expected type '${e.name}', but it was: ${n}`)}}return t}function Fee(t,e){if(e<=0)throw new ue(Q.INVALID_ARGUMENT,`Function ${t}() requires a positive number, but it was: ${e}.`)}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class gS{constructor(e){var n,r;if(e.host===void 0){if(e.ssl!==void 0)throw new ue(Q.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=e.host,this.ssl=(n=e.ssl)===null||n===void 0||n;if(this.credentials=e.credentials,this.ignoreUndefinedProperties=!!e.ignoreUndefinedProperties,this.localCache=e.localCache,e.cacheSizeBytes===void 0)this.cacheSizeBytes=41943040;else{if(e.cacheSizeBytes!==-1&&e.cacheSizeBytes<1048576)throw new ue(Q.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}Vee("experimentalForceLongPolling",e.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",e.experimentalAutoDetectLongPolling),this.experimentalForceLongPolling=!!e.experimentalForceLongPolling,this.experimentalForceLongPolling?this.experimentalAutoDetectLongPolling=!1:e.experimentalAutoDetectLongPolling===void 0?this.experimentalAutoDetectLongPolling=!0:this.experimentalAutoDetectLongPolling=!!e.experimentalAutoDetectLongPolling,this.experimentalLongPollingOptions=lM((r=e.experimentalLongPollingOptions)!==null&&r!==void 0?r:{}),function(o){if(o.timeoutSeconds!==void 0){if(isNaN(o.timeoutSeconds))throw new ue(Q.INVALID_ARGUMENT,`invalid long polling timeout: ${o.timeoutSeconds} (must not be NaN)`);if(o.timeoutSeconds<5)throw new ue(Q.INVALID_ARGUMENT,`invalid long polling timeout: ${o.timeoutSeconds} (minimum allowed value is 5)`);if(o.timeoutSeconds>30)throw new ue(Q.INVALID_ARGUMENT,`invalid long polling timeout: ${o.timeoutSeconds} (maximum allowed value is 30)`)}}(this.experimentalLongPollingOptions),this.useFetchStreams=!!e.useFetchStreams}isEqual(e){return this.host===e.host&&this.ssl===e.ssl&&this.credentials===e.credentials&&this.cacheSizeBytes===e.cacheSizeBytes&&this.experimentalForceLongPolling===e.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===e.experimentalAutoDetectLongPolling&&function(r,i){return r.timeoutSeconds===i.timeoutSeconds}(this.experimentalLongPollingOptions,e.experimentalLongPollingOptions)&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}}class og{constructor(e,n,r,i){this._authCredentials=e,this._appCheckCredentials=n,this._databaseId=r,this._app=i,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new gS({}),this._settingsFrozen=!1,this._terminateTask="notTerminated"}get app(){if(!this._app)throw new ue(Q.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return this._terminateTask!=="notTerminated"}_setSettings(e){if(this._settingsFrozen)throw new ue(Q.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this._settings=new gS(e),e.credentials!==void 0&&(this._authCredentials=function(r){if(!r)return new tJ;switch(r.type){case"firstParty":return new oJ(r.sessionIndex||"0",r.iamToken||null,r.authTokenFactory||null);case"provider":return r.client;default:throw new ue(Q.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}}(e.credentials))}_getSettings(){return this._settings}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return this._terminateTask==="notTerminated"&&(this._terminateTask=this._terminate()),this._terminateTask}async _restart(){this._terminateTask==="notTerminated"?await this._terminate():this._terminateTask="notTerminated"}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return function(n){const r=fS.get(n);r&&(ge("ComponentProvider","Removing Datastore"),fS.delete(n),r.terminate())}(this),Promise.resolve()}}function $ee(t,e,n,r={}){var i;const o=(t=ua(t,og))._getSettings(),s=`${e}:${n}`;if(o.host!=="firestore.googleapis.com"&&o.host!==s&&Al("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used."),t._setSettings(Object.assign(Object.assign({},o),{host:s,ssl:!1})),r.mockUserToken){let a,l;if(typeof r.mockUserToken=="string")a=r.mockUserToken,l=Nn.MOCK_USER;else{a=AK(r.mockUserToken,(i=t._app)===null||i===void 0?void 0:i.options.projectId);const c=r.mockUserToken.sub||r.mockUserToken.user_id;if(!c)throw new ue(Q.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");l=new Nn(c)}t._authCredentials=new nJ(new rN(a,l))}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class bs{constructor(e,n,r){this.converter=n,this._query=r,this.type="query",this.firestore=e}withConverter(e){return new bs(this.firestore,e,this._query)}}class ir{constructor(e,n,r){this.converter=n,this._key=r,this.type="document",this.firestore=e}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new is(this.firestore,this.converter,this._key.path.popLast())}withConverter(e){return new ir(this.firestore,e,this._key)}}class is extends bs{constructor(e,n,r){super(e,n,Xw(r)),this._path=r,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){const e=this._path.popLast();return e.isEmpty()?null:new ir(this.firestore,null,new _e(e))}withConverter(e){return new is(this.firestore,e,this._path)}}function Bee(t,e,...n){if(t=Wn(t),cM("collection","path",e),t instanceof og){const r=kt.fromString(e,...n);return mS(r),new is(t,null,r)}{if(!(t instanceof ir||t instanceof is))throw new ue(Q.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const r=t._path.child(kt.fromString(e,...n));return mS(r),new is(t.firestore,null,r)}}function uM(t,e,...n){if(t=Wn(t),arguments.length===1&&(e=iN.newId()),cM("doc","path",e),t instanceof og){const r=kt.fromString(e,...n);return pS(r),new ir(t,null,new _e(r))}{if(!(t instanceof ir||t instanceof is))throw new ue(Q.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const r=t._path.child(kt.fromString(e,...n));return pS(r),new ir(t.firestore,t instanceof is?t.converter:null,new _e(r))}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class yS{constructor(e=Promise.resolve()){this.Pu=[],this.Iu=!1,this.Tu=[],this.Eu=null,this.du=!1,this.Au=!1,this.Ru=[],this.t_=new BN(this,"async_queue_retry"),this.Vu=()=>{const r=Cy();r&&ge("AsyncQueue","Visibility state changed to "+r.visibilityState),this.t_.jo()},this.mu=e;const n=Cy();n&&typeof n.addEventListener=="function"&&n.addEventListener("visibilitychange",this.Vu)}get isShuttingDown(){return this.Iu}enqueueAndForget(e){this.enqueue(e)}enqueueAndForgetEvenWhileRestricted(e){this.fu(),this.gu(e)}enterRestrictedMode(e){if(!this.Iu){this.Iu=!0,this.Au=e||!1;const n=Cy();n&&typeof n.removeEventListener=="function"&&n.removeEventListener("visibilitychange",this.Vu)}}enqueue(e){if(this.fu(),this.Iu)return new Promise(()=>{});const n=new Zi;return this.gu(()=>this.Iu&&this.Au?Promise.resolve():(e().then(n.resolve,n.reject),n.promise)).then(()=>n.promise)}enqueueRetryable(e){this.enqueueAndForget(()=>(this.Pu.push(e),this.pu()))}async pu(){if(this.Pu.length!==0){try{await this.Pu[0](),this.Pu.shift(),this.t_.reset()}catch(e){if(!Rd(e))throw e;ge("AsyncQueue","Operation failed with retryable error: "+e)}this.Pu.length>0&&this.t_.Go(()=>this.pu())}}gu(e){const n=this.mu.then(()=>(this.du=!0,e().catch(r=>{this.Eu=r,this.du=!1;const i=function(s){let a=s.message||"";return s.stack&&(a=s.stack.includes(s.message)?s.stack:s.message+` `+s.stack),a}(r);throw lo("INTERNAL UNHANDLED ERROR: ",i),r}).then(r=>(this.du=!1,r))));return this.mu=n,n}enqueueAfterDelay(e,n,r){this.fu(),this.Ru.indexOf(e)>-1&&(n=0);const i=cb.createAndSchedule(this,e,n,r,o=>this.yu(o));return this.Tu.push(i),i}fu(){this.Eu&&Pe()}verifyOperationInProgress(){}async wu(){let e;do e=this.mu,await e;while(e!==this.mu)}Su(e){for(const n of this.Tu)if(n.timerId===e)return!0;return!1}bu(e){return this.wu().then(()=>{this.Tu.sort((n,r)=>n.targetTimeMs-r.targetTimeMs);for(const n of this.Tu)if(n.skipDelay(),e!=="all"&&n.timerId===e)break;return this.wu()})}Du(e){this.Ru.push(e)}yu(e){const n=this.Tu.indexOf(e);this.Tu.splice(n,1)}}class sg extends og{constructor(e,n,r,i){super(e,n,r,i),this.type="firestore",this._queue=new yS,this._persistenceKey=(i==null?void 0:i.name)||"[DEFAULT]"}async _terminate(){if(this._firestoreClient){const e=this._firestoreClient.terminate();this._queue=new yS(e),this._firestoreClient=void 0,await e}}}function Uee(t,e){const n=typeof t=="object"?t:Ow(),r=typeof t=="string"?t:e||"(default)",i=Wm(n,"firestore").getImmediate({identifier:r});if(!i._initialized){const o=uA("firestore");o&&$ee(i,...o)}return i}function fb(t){if(t._terminated)throw new ue(Q.FAILED_PRECONDITION,"The client has already been terminated.");return t._firestoreClient||zee(t),t._firestoreClient}function zee(t){var e,n,r;const i=t._freezeSettings(),o=function(a,l,c,h){return new vJ(a,l,c,h.host,h.ssl,h.experimentalForceLongPolling,h.experimentalAutoDetectLongPolling,lM(h.experimentalLongPollingOptions),h.useFetchStreams)}(t._databaseId,((e=t._app)===null||e===void 0?void 0:e.options.appId)||"",t._persistenceKey,i);t._componentsProvider||!((n=i.localCache)===null||n===void 0)&&n._offlineComponentProvider&&(!((r=i.localCache)===null||r===void 0)&&r._onlineComponentProvider)&&(t._componentsProvider={_offline:i.localCache._offlineComponentProvider,_online:i.localCache._onlineComponentProvider}),t._firestoreClient=new Nee(t._authCredentials,t._appCheckCredentials,t._queue,o,t._componentsProvider&&function(a){const l=a==null?void 0:a._online.build();return{_offline:a==null?void 0:a._offline.build(l),_online:l}}(t._componentsProvider))}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Vl{constructor(e){this._byteString=e}static fromBase64String(e){try{return new Vl(Tn.fromBase64String(e))}catch(n){throw new ue(Q.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+n)}}static fromUint8Array(e){return new Vl(Tn.fromUint8Array(e))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(e){return this._byteString.isEqual(e._byteString)}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class pb{constructor(...e){for(let n=0;n90)throw new ue(Q.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(n)||n<-180||n>180)throw new ue(Q.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+n);this._lat=e,this._long=n}get latitude(){return this._lat}get longitude(){return this._long}isEqual(e){return this._lat===e._lat&&this._long===e._long}toJSON(){return{latitude:this._lat,longitude:this._long}}_compareTo(e){return Je(this._lat,e._lat)||Je(this._long,e._long)}}/** * @license * Copyright 2024 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class gb{constructor(e){this._values=(e||[]).map(n=>n)}toArray(){return this._values.map(e=>e)}isEqual(e){return function(r,i){if(r.length!==i.length)return!1;for(let o=0;oe.isPrefixOf(n))!==void 0||this.fieldTransforms.find(n=>e.isPrefixOf(n.field))!==void 0}vu(){if(this.path)for(let e=0;el.covers(f.field))}else l=null,c=s.fieldTransforms;return new Wee(new Fr(a),l,c)}function qee(t,e,n,r=!1){return vb(n,t.Qu(r?4:3,e))}function vb(t,e){if(mM(t=Wn(t)))return gM("Unsupported field value:",e,t),pM(t,e);if(t instanceof dM)return function(r,i){if(!hM(i.Cu))throw i.Bu(`${r._methodName}() can only be used with update() and set()`);if(!i.path)throw i.Bu(`${r._methodName}() is not currently supported inside arrays`);const o=r._toFieldTransform(i);o&&i.fieldTransforms.push(o)}(t,e),null;if(t===void 0&&e.ignoreUndefinedProperties)return null;if(e.path&&e.fieldMask.push(e.path),t instanceof Array){if(e.settings.xu&&e.Cu!==4)throw e.Bu("Nested arrays are not supported");return function(r,i){const o=[];let s=0;for(const a of r){let l=vb(a,i.Lu(s));l==null&&(l={nullValue:"NULL_VALUE"}),o.push(l),s++}return{arrayValue:{values:o}}}(t,e)}return function(r,i){if((r=Wn(r))===null)return{nullValue:"NULL_VALUE"};if(typeof r=="number")return BJ(i.serializer,r);if(typeof r=="boolean")return{booleanValue:r};if(typeof r=="string")return{stringValue:r};if(r instanceof Date){const o=sn.fromDate(r);return{timestampValue:gp(i.serializer,o)}}if(r instanceof sn){const o=new sn(r.seconds,1e3*Math.floor(r.nanoseconds/1e3));return{timestampValue:gp(i.serializer,o)}}if(r instanceof mb)return{geoPointValue:{latitude:r.latitude,longitude:r.longitude}};if(r instanceof Vl)return{bytesValue:AN(i.serializer,r._byteString)};if(r instanceof ir){const o=i.databaseId,s=r.firestore._databaseId;if(!s.isEqual(o))throw i.Bu(`Document reference is for database ${s.projectId}/${s.database} but should be for database ${o.projectId}/${o.database}`);return{referenceValue:tb(r.firestore._databaseId||i.databaseId,r._key.path)}}if(r instanceof gb)return function(s,a){return{mapValue:{fields:{__type__:{stringValue:"__vector__"},value:{arrayValue:{values:s.toArray().map(l=>{if(typeof l!="number")throw a.Bu("VectorValues must only contain numeric values.");return Jw(a.serializer,l)})}}}}}}(r,i);throw i.Bu(`Unsupported field value: ${ig(r)}`)}(t,e)}function pM(t,e){const n={};return oN(t)?e.path&&e.path.length>0&&e.fieldMask.push(e.path):Zl(t,(r,i)=>{const o=vb(i,e.Mu(r));o!=null&&(n[r]=o)}),{mapValue:{fields:n}}}function mM(t){return!(typeof t!="object"||t===null||t instanceof Array||t instanceof Date||t instanceof sn||t instanceof mb||t instanceof Vl||t instanceof ir||t instanceof dM||t instanceof gb)}function gM(t,e,n){if(!mM(n)||!function(i){return typeof i=="object"&&i!==null&&(Object.getPrototypeOf(i)===Object.prototype||Object.getPrototypeOf(i)===null)}(n)){const r=ig(n);throw r==="an object"?e.Bu(t+" a custom object"):e.Bu(t+" "+r)}}function Kee(t,e,n){if((e=Wn(e))instanceof pb)return e._internalPath;if(typeof e=="string")return yM(t,e);throw wp("Field path arguments must be of type string or ",t,!1,void 0,n)}const Yee=new RegExp("[~\\*/\\[\\]]");function yM(t,e,n){if(e.search(Yee)>=0)throw wp(`Invalid field path (${e}). Paths must not contain '~', '*', '/', '[', or ']'`,t,!1,void 0,n);try{return new pb(...e.split("."))._internalPath}catch{throw wp(`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,t,!1,void 0,n)}}function wp(t,e,n,r,i){const o=r&&!r.isEmpty(),s=i!==void 0;let a=`Function ${e}() called with invalid data`;n&&(a+=" (via `toFirestore()`)"),a+=". ";let l="";return(o||s)&&(l+=" (found",o&&(l+=` in field ${r}`),s&&(l+=` in document ${i}`),l+=")"),new ue(Q.INVALID_ARGUMENT,a+t+l)}function Qee(t,e){return t.some(n=>n.isEqual(e))}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class vM{constructor(e,n,r,i,o){this._firestore=e,this._userDataWriter=n,this._key=r,this._document=i,this._converter=o}get id(){return this._key.path.lastSegment()}get ref(){return new ir(this._firestore,this._converter,this._key)}exists(){return this._document!==null}data(){if(this._document){if(this._converter){const e=new Xee(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}}get(e){if(this._document){const n=this._document.data.field(wb("DocumentSnapshot.get",e));if(n!==null)return this._userDataWriter.convertValue(n)}}}class Xee extends vM{data(){return super.data()}}function wb(t,e){return typeof e=="string"?yM(t,e):e instanceof pb?e._internalPath:e._delegate._internalPath}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function Jee(t){if(t.limitType==="L"&&t.explicitOrderBy.length===0)throw new ue(Q.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}class bb{}class _b extends bb{}function Zee(t,e,...n){let r=[];e instanceof bb&&r.push(e),r=r.concat(n),function(o){const s=o.filter(l=>l instanceof kb).length,a=o.filter(l=>l instanceof xb).length;if(s>1||s>0&&a>0)throw new ue(Q.INVALID_ARGUMENT,"InvalidQuery. When using composite filters, you cannot use more than one filter at the top level. Consider nesting the multiple filters within an `and(...)` statement. For example: change `query(query, where(...), or(...))` to `query(query, and(where(...), or(...)))`.")}(r);for(const i of r)t=i._apply(t);return t}class xb extends _b{constructor(e,n,r){super(),this._field=e,this._op=n,this._value=r,this.type="where"}static _create(e,n,r){return new xb(e,n,r)}_apply(e){const n=this._parse(e);return wM(e._query,n),new bs(e.firestore,e.converter,m0(e._query,n))}_parse(e){const n=fM(e.firestore);return function(o,s,a,l,c,h,f){let p;if(c.isKeyField()){if(h==="array-contains"||h==="array-contains-any")throw new ue(Q.INVALID_ARGUMENT,`Invalid Query. You can't perform '${h}' queries on documentId().`);if(h==="in"||h==="not-in"){bS(f,h);const g=[];for(const w of f)g.push(wS(l,o,w));p={arrayValue:{values:g}}}else p=wS(l,o,f)}else h!=="in"&&h!=="not-in"&&h!=="array-contains-any"||bS(f,h),p=qee(a,s,f,h==="in"||h==="not-in");return Xt.create(c,h,p)}(e._query,"where",n,e.firestore._databaseId,this._field,this._op,this._value)}}class kb extends bb{constructor(e,n){super(),this.type=e,this._queryConstraints=n}static _create(e,n){return new kb(e,n)}_parse(e){const n=this._queryConstraints.map(r=>r._parse(e)).filter(r=>r.getFilters().length>0);return n.length===1?n[0]:ui.create(n,this._getOperator())}_apply(e){const n=this._parse(e);return n.getFilters().length===0?e:(function(i,o){let s=i;const a=o.getFlattenedFilters();for(const l of a)wM(s,l),s=m0(s,l)}(e._query,n),new bs(e.firestore,e.converter,m0(e._query,n)))}_getQueryConstraints(){return this._queryConstraints}_getOperator(){return this.type==="and"?"and":"or"}}class Tb extends _b{constructor(e,n){super(),this._field=e,this._direction=n,this.type="orderBy"}static _create(e,n){return new Tb(e,n)}_apply(e){const n=function(i,o,s){if(i.startAt!==null)throw new ue(Q.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(i.endAt!==null)throw new ue(Q.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");return new ed(o,s)}(e._query,this._field,this._direction);return new bs(e.firestore,e.converter,function(i,o){const s=i.explicitOrderBy.concat([o]);return new ec(i.path,i.collectionGroup,s,i.filters.slice(),i.limit,i.limitType,i.startAt,i.endAt)}(e._query,n))}}function vS(t,e="asc"){const n=e,r=wb("orderBy",t);return Tb._create(r,n)}class Eb extends _b{constructor(e,n,r){super(),this.type=e,this._limit=n,this._limitType=r}static _create(e,n,r){return new Eb(e,n,r)}_apply(e){return new bs(e.firestore,e.converter,fp(e._query,this._limit,this._limitType))}}function ete(t){return Fee("limit",t),Eb._create("limit",t,"F")}function wS(t,e,n){if(typeof(n=Wn(n))=="string"){if(n==="")throw new ue(Q.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");if(!pN(e)&&n.indexOf("/")!==-1)throw new ue(Q.INVALID_ARGUMENT,`Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '${n}' contains a '/' character.`);const r=e.path.child(kt.fromString(n));if(!_e.isDocumentKey(r))throw new ue(Q.INVALID_ARGUMENT,`Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '${r}' is not because it has an odd number of segments (${r.length}).`);return BE(t,new _e(r))}if(n instanceof ir)return BE(t,n._key);throw new ue(Q.INVALID_ARGUMENT,`Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${ig(n)}.`)}function bS(t,e){if(!Array.isArray(t)||t.length===0)throw new ue(Q.INVALID_ARGUMENT,`Invalid Query. A non-empty array is required for '${e.toString()}' filters.`)}function wM(t,e){const n=function(i,o){for(const s of i)for(const a of s.getFlattenedFilters())if(o.indexOf(a.op)>=0)return a.op;return null}(t.filters,function(i){switch(i){case"!=":return["!=","not-in"];case"array-contains-any":case"in":return["not-in"];case"not-in":return["array-contains-any","in","not-in","!="];default:return[]}}(e.op));if(n!==null)throw n===e.op?new ue(Q.INVALID_ARGUMENT,`Invalid query. You cannot use more than one '${e.op.toString()}' filter.`):new ue(Q.INVALID_ARGUMENT,`Invalid query. You cannot use '${e.op.toString()}' filters with '${n.toString()}' filters.`)}class tte{convertValue(e,n="none"){switch(ca(e)){case 0:return null;case 1:return e.booleanValue;case 2:return zt(e.integerValue||e.doubleValue);case 3:return this.convertTimestamp(e.timestampValue);case 4:return this.convertServerTimestamp(e,n);case 5:return e.stringValue;case 6:return this.convertBytes(la(e.bytesValue));case 7:return this.convertReference(e.referenceValue);case 8:return this.convertGeoPoint(e.geoPointValue);case 9:return this.convertArray(e.arrayValue,n);case 11:return this.convertObject(e.mapValue,n);case 10:return this.convertVectorValue(e.mapValue);default:throw Pe()}}convertObject(e,n){return this.convertObjectMap(e.fields,n)}convertObjectMap(e,n="none"){const r={};return Zl(e,(i,o)=>{r[i]=this.convertValue(o,n)}),r}convertVectorValue(e){var n,r,i;const o=(i=(r=(n=e.fields)===null||n===void 0?void 0:n.value.arrayValue)===null||r===void 0?void 0:r.values)===null||i===void 0?void 0:i.map(s=>zt(s.doubleValue));return new gb(o)}convertGeoPoint(e){return new mb(zt(e.latitude),zt(e.longitude))}convertArray(e,n){return(e.values||[]).map(r=>this.convertValue(r,n))}convertServerTimestamp(e,n){switch(n){case"previous":const r=qw(e);return r==null?null:this.convertValue(r,n);case"estimate":return this.convertTimestamp(Xu(e));default:return null}}convertTimestamp(e){const n=hs(e);return new sn(n.seconds,n.nanos)}convertDocumentKey(e,n){const r=kt.fromString(e);ht(VN(r));const i=new Ju(r.get(1),r.get(3)),o=new _e(r.popFirst(5));return i.isEqual(n)||lo(`Document ${o} contains a document reference within a different database (${i.projectId}/${i.database}) which is not supported. It will be treated as a reference in the current database (${n.projectId}/${n.database}) instead.`),o}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function nte(t,e,n){let r;return r=t?n&&(n.merge||n.mergeFields)?t.toFirestore(e,n):t.toFirestore(e):e,r}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class qc{constructor(e,n){this.hasPendingWrites=e,this.fromCache=n}isEqual(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}class bM extends vM{constructor(e,n,r,i,o,s){super(e,n,r,i,s),this._firestore=e,this._firestoreImpl=e,this.metadata=o}exists(){return super.exists()}data(e={}){if(this._document){if(this._converter){const n=new af(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(n,e)}return this._userDataWriter.convertValue(this._document.data.value,e.serverTimestamps)}}get(e,n={}){if(this._document){const r=this._document.data.field(wb("DocumentSnapshot.get",e));if(r!==null)return this._userDataWriter.convertValue(r,n.serverTimestamps)}}}class af extends bM{data(e={}){return super.data(e)}}class rte{constructor(e,n,r,i){this._firestore=e,this._userDataWriter=n,this._snapshot=i,this.metadata=new qc(i.hasPendingWrites,i.fromCache),this.query=r}get docs(){const e=[];return this.forEach(n=>e.push(n)),e}get size(){return this._snapshot.docs.size}get empty(){return this.size===0}forEach(e,n){this._snapshot.docs.forEach(r=>{e.call(n,new af(this._firestore,this._userDataWriter,r.key,r,new qc(this._snapshot.mutatedKeys.has(r.key),this._snapshot.fromCache),this.query.converter))})}docChanges(e={}){const n=!!e.includeMetadataChanges;if(n&&this._snapshot.excludesMetadataChanges)throw new ue(Q.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===n||(this._cachedChanges=function(i,o){if(i._snapshot.oldDocs.isEmpty()){let s=0;return i._snapshot.docChanges.map(a=>{const l=new af(i._firestore,i._userDataWriter,a.doc.key,a.doc,new qc(i._snapshot.mutatedKeys.has(a.doc.key),i._snapshot.fromCache),i.query.converter);return a.doc,{type:"added",doc:l,oldIndex:-1,newIndex:s++}})}{let s=i._snapshot.oldDocs;return i._snapshot.docChanges.filter(a=>o||a.type!==3).map(a=>{const l=new af(i._firestore,i._userDataWriter,a.doc.key,a.doc,new qc(i._snapshot.mutatedKeys.has(a.doc.key),i._snapshot.fromCache),i.query.converter);let c=-1,h=-1;return a.type!==0&&(c=s.indexOf(a.doc.key),s=s.delete(a.doc.key)),a.type!==1&&(s=s.add(a.doc),h=s.indexOf(a.doc.key)),{type:ite(a.type),doc:l,oldIndex:c,newIndex:h}})}}(this,n),this._cachedChangesIncludeMetadataChanges=n),this._cachedChanges}}function ite(t){switch(t){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return Pe()}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function ote(t){t=ua(t,ir);const e=ua(t.firestore,sg);return Oee(fb(e),t._key).then(n=>cte(e,t,n))}class _M extends tte{constructor(e){super(),this.firestore=e}convertBytes(e){return new Vl(e)}convertReference(e){const n=this.convertDocumentKey(e,this.firestore._databaseId);return new ir(this.firestore,null,n)}}function ste(t){t=ua(t,bs);const e=ua(t.firestore,sg),n=fb(e),r=new _M(e);return Jee(t._query),Lee(n,t._query).then(i=>new rte(e,r,t,i))}function ate(t,e,n){t=ua(t,ir);const r=ua(t.firestore,sg),i=nte(t.converter,e,n);return lte(r,[Gee(fM(r),"setDoc",t._key,i,t.converter!==null,n).toMutation(t._key,eo.none())])}function lte(t,e){return function(r,i){const o=new Zi;return r.asyncQueue.enqueueAndForget(async()=>Tee(await Dee(r),i,o)),o.promise}(fb(t),e)}function cte(t,e,n){const r=n.docs.get(e._key),i=new _M(t);return new bM(t,i,e._key,r,new qc(n.hasPendingWrites,n.fromCache),e.converter)}(function(e,n=!0){(function(i){Jl=i})(Ql),oa(new cs("firestore",(r,{instanceIdentifier:i,options:o})=>{const s=r.getProvider("app").getImmediate(),a=new sg(new rJ(r.getProvider("auth-internal")),new aJ(r.getProvider("app-check-internal")),function(c,h){if(!Object.prototype.hasOwnProperty.apply(c.options,["projectId"]))throw new ue(Q.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new Ju(c.options.projectId,h)}(s,i),s);return o=Object.assign({useFetchStreams:n},o),a._setSettings(o),a},"PUBLIC").setMultipleInstances(!0)),ki(OE,"4.7.3",e),ki(OE,"4.7.3","esm2017")})();/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const ute="type.googleapis.com/google.protobuf.Int64Value",dte="type.googleapis.com/google.protobuf.UInt64Value";function xM(t,e){const n={};for(const r in t)t.hasOwnProperty(r)&&(n[r]=e(t[r]));return n}function T0(t){if(t==null)return null;if(t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&isFinite(t)||t===!0||t===!1||Object.prototype.toString.call(t)==="[object String]")return t;if(t instanceof Date)return t.toISOString();if(Array.isArray(t))return t.map(e=>T0(e));if(typeof t=="function"||typeof t=="object")return xM(t,e=>T0(e));throw new Error("Data cannot be encoded in JSON: "+t)}function bp(t){if(t==null)return t;if(t["@type"])switch(t["@type"]){case ute:case dte:{const e=Number(t.value);if(isNaN(e))throw new Error("Data cannot be decoded from JSON: "+t);return e}default:throw new Error("Data cannot be decoded from JSON: "+t)}return Array.isArray(t)?t.map(e=>bp(e)):typeof t=="function"||typeof t=="object"?xM(t,e=>bp(e)):t}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const Sb="functions";/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const _S={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"};class fl extends Ai{constructor(e,n,r){super(`${Sb}/${e}`,n||""),this.details=r}}function hte(t){if(t>=200&&t<300)return"ok";switch(t){case 0:return"internal";case 400:return"invalid-argument";case 401:return"unauthenticated";case 403:return"permission-denied";case 404:return"not-found";case 409:return"aborted";case 429:return"resource-exhausted";case 499:return"cancelled";case 500:return"internal";case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline-exceeded"}return"unknown"}function fte(t,e){let n=hte(t),r=n,i;try{const o=e&&e.error;if(o){const s=o.status;if(typeof s=="string"){if(!_S[s])return new fl("internal","internal");n=_S[s],r=s}const a=o.message;typeof a=="string"&&(r=a),i=o.details,i!==void 0&&(i=bp(i))}}catch{}return n==="ok"?null:new fl(n,r,i)}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class pte{constructor(e,n,r){this.auth=null,this.messaging=null,this.appCheck=null,this.auth=e.getImmediate({optional:!0}),this.messaging=n.getImmediate({optional:!0}),this.auth||e.get().then(i=>this.auth=i,()=>{}),this.messaging||n.get().then(i=>this.messaging=i,()=>{}),this.appCheck||r.get().then(i=>this.appCheck=i,()=>{})}async getAuthToken(){if(this.auth)try{const e=await this.auth.getToken();return e==null?void 0:e.accessToken}catch{return}}async getMessagingToken(){if(!(!this.messaging||!("Notification"in self)||Notification.permission!=="granted"))try{return await this.messaging.getToken()}catch{return}}async getAppCheckToken(e){if(this.appCheck){const n=e?await this.appCheck.getLimitedUseToken():await this.appCheck.getToken();return n.error?null:n.token}return null}async getContext(e){const n=await this.getAuthToken(),r=await this.getMessagingToken(),i=await this.getAppCheckToken(e);return{authToken:n,messagingToken:r,appCheckToken:i}}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const E0="us-central1";function mte(t){let e=null;return{promise:new Promise((n,r)=>{e=setTimeout(()=>{r(new fl("deadline-exceeded","deadline-exceeded"))},t)}),cancel:()=>{e&&clearTimeout(e)}}}class gte{constructor(e,n,r,i,o=E0,s){this.app=e,this.fetchImpl=s,this.emulatorOrigin=null,this.contextProvider=new pte(n,r,i),this.cancelAllRequests=new Promise(a=>{this.deleteService=()=>Promise.resolve(a())});try{const a=new URL(o);this.customDomain=a.origin+(a.pathname==="/"?"":a.pathname),this.region=E0}catch{this.customDomain=null,this.region=o}}_delete(){return this.deleteService()}_url(e){const n=this.app.options.projectId;return this.emulatorOrigin!==null?`${this.emulatorOrigin}/${n}/${this.region}/${e}`:this.customDomain!==null?`${this.customDomain}/${e}`:`https://${this.region}-${n}.cloudfunctions.net/${e}`}}function yte(t,e,n){t.emulatorOrigin=`http://${e}:${n}`}function vte(t,e,n){return r=>bte(t,e,r,n||{})}async function wte(t,e,n,r){n["Content-Type"]="application/json";let i;try{i=await r(t,{method:"POST",body:JSON.stringify(e),headers:n})}catch{return{status:0,json:null}}let o=null;try{o=await i.json()}catch{}return{status:i.status,json:o}}function bte(t,e,n,r){const i=t._url(e);return _te(t,i,n,r)}async function _te(t,e,n,r){n=T0(n);const i={data:n},o={},s=await t.contextProvider.getContext(r.limitedUseAppCheckTokens);s.authToken&&(o.Authorization="Bearer "+s.authToken),s.messagingToken&&(o["Firebase-Instance-ID-Token"]=s.messagingToken),s.appCheckToken!==null&&(o["X-Firebase-AppCheck"]=s.appCheckToken);const a=r.timeout||7e4,l=mte(a),c=await Promise.race([wte(e,i,o,t.fetchImpl),l.promise,t.cancelAllRequests]);if(l.cancel(),!c)throw new fl("cancelled","Firebase Functions instance was deleted.");const h=fte(c.status,c.json);if(h)throw h;if(!c.json)throw new fl("internal","Response is not valid JSON object.");let f=c.json.data;if(typeof f>"u"&&(f=c.json.result),typeof f>"u")throw new fl("internal","Response is missing data field.");return{data:bp(f)}}const xS="@firebase/functions",kS="0.11.8";/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const xte="auth-internal",kte="app-check-internal",Tte="messaging-internal";function Ete(t,e){const n=(r,{instanceIdentifier:i})=>{const o=r.getProvider("app").getImmediate(),s=r.getProvider(xte),a=r.getProvider(Tte),l=r.getProvider(kte);return new gte(o,s,a,l,i,t)};oa(new cs(Sb,n,"PUBLIC").setMultipleInstances(!0)),ki(xS,kS,e),ki(xS,kS,"esm2017")}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function Ste(t=Ow(),e=E0){const r=Wm(Wn(t),Sb).getImmediate({identifier:e}),i=uA("functions");return i&&Cte(r,...i),r}function Cte(t,e,n){yte(Wn(t),e,n)}function ag(t,e,n){return vte(Wn(t),e,n)}Ete(fetch.bind(self));const Ite={apiKey:"AIzaSyBACzGXaFHn1-D8w6mS7oLSTgrggCYa5cQ",authDomain:"hmwebsite-b89d5.firebaseapp.com",projectId:"hmwebsite-b89d5",storageBucket:"hmwebsite-b89d5.appspot.com",messagingSenderId:"441279518479",appId:"1:441279518479:web:9c31320326c4908a69907a"},Cb=mA(Ite),Ib=Uee(Cb),lg=Ste(Cb,"australia-southeast1"),Pte=ZX(Cb);async function Rte(){try{return(await ag(lg,"getMeetTheTeam")()).data}catch(t){return console.log(t),[]}}const Ate=()=>{const t={title:"About Us",description:"HackMelbourne is a student club based in Melbourne, dedicated to bringing technology education to everyone! We run a variety of events throughout the year, including hackathons, workshops, and social events. Our goal is to create a welcoming and inclusive environment for all students, regardless of their background or experience level."},e=[{teamName:"Executive Team",description:"These guys are the big bosses and pull all the strings behind the scenes organising stuff",bgColor:"rgba(231,52,41,0.05)",borderColor:"rgba(231,52,41,.5)",members:[]},{teamName:"Website Team",description:"Like we made this entire website and isn't that cool?",bgColor:"rgba(42,122,243,0.05)",borderColor:"rgba(42,122,243,50%)",members:[]},{teamName:"Education Team",description:"These guys are making sure you know whats happening during our big events and hackathons",bgColor:"rgba(64,243,42,0.05)",borderColor:"rgba(64,243,42,50%)",members:[]},{teamName:"Marketing Team",description:"If you're here, the marketing team is doing a great job",bgColor:"rgba(231,52,41,0.05)",borderColor:"rgba(231,52,41,.5)",members:[]},{teamName:"Logistics Team",description:"These guys make the hackathons and make sure everything goes well.",bgColor:"rgba(42,122,243,0.05)",borderColor:"rgba(42,122,243,50%)",members:[]},{teamName:"Student Engagement Team",description:"These people manage the social events and are also in charge of the recruitment process so be nice to them :)",bgColor:"rgba(64,243,42,0.05)",borderColor:"rgba(64,243,42,50%)",members:[]},{teamName:"Sponsorships Team",description:"These people get us funding so that everything else is possible",bgColor:"rgba(231,52,41,0.05)",borderColor:"rgba(231,52,41,.5)",members:[]}],[n,r]=x.useState(e),[i,o]=x.useState(!1);x.useEffect(()=>{o(!0),Rte().then(f=>{r(n.map(p=>{const w=f.filter(b=>b.teamName===p.teamName).map(b=>{const C=b.socialLinks.map(T=>({url:T,icon:Nte(T)}));return{...b,links:C}}).sort((b,C)=>b.role=="Director"&&C.role!=="Director"||b.role=="President"?-1:b.role!=="Director"&&C.role=="Director"?1:0);return{...p,members:w}})),o(!1)})},[]);const s=x.useRef(null),{scrollYProgress:a}=Zp({target:s,offset:["start start","end start"]}),l=Ur(a,[0,1],["0%","80%"]),c=Ur(a,[0,.7],["100%","0%"]),h=Ur(a,[0,.8],["1","0.9"]);return F("div",{children:[u(rt.section,{ref:s,style:{y:l,opacity:c,scale:h},children:u(ci,{pageTitle:t.title,pageDescription:t.description})}),u("section",{className:"z-10 relative md:pt-12",children:i?u("div",{className:"w-full flex justify-center mt-6",children:u(zm,{color:"inherit"})}):u(Zt,{children:n.map((f,p)=>u(xK,{...f},p))})})]})};function Nte(t){return t.includes("facebook.com")?E1:t.includes("instagram.com")?S1:t.includes("linkedin.com")?C1:t.includes("twitter.com")?cP:t.includes("whosthefaker.ericlang.online")?dV:t.includes("mailto:")?uP:hV}function Mte(t,e){const n=parseInt(t.slice(0,2),16),r=parseInt(t.slice(2,4),16),i=parseInt(t.slice(4,6),16);return`rgba(${n}, ${r}, ${i}, ${e})`}const Dte="/assets/H_Logo-abfa0b09.png";var Ote=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,Lte=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,Vte=/[^-+\dA-Z]/g;function Fte(t,e,n,r){if(arguments.length===1&&typeof t=="string"&&!/\d/.test(t)&&(e=t,t=void 0),t=t||t===0?t:new Date,t instanceof Date||(t=new Date(t)),isNaN(t))throw TypeError("Invalid date");e=String(TS[e]||e||TS.default);var i=e.slice(0,4);(i==="UTC:"||i==="GMT:")&&(e=e.slice(4),n=!0,i==="GMT:"&&(r=!0));var o=function(){return n?"getUTC":"get"},s=function(){return t[o()+"Date"]()},a=function(){return t[o()+"Day"]()},l=function(){return t[o()+"Month"]()},c=function(){return t[o()+"FullYear"]()},h=function(){return t[o()+"Hours"]()},f=function(){return t[o()+"Minutes"]()},p=function(){return t[o()+"Seconds"]()},g=function(){return t[o()+"Milliseconds"]()},w=function(){return n?0:t.getTimezoneOffset()},b=function(){return $te(t)},C=function(){return Bte(t)},T={d:function(){return s()},dd:function(){return hr(s())},ddd:function(){return Kn.dayNames[a()]},DDD:function(){return ES({y:c(),m:l(),d:s(),_:o(),dayName:Kn.dayNames[a()],short:!0})},dddd:function(){return Kn.dayNames[a()+7]},DDDD:function(){return ES({y:c(),m:l(),d:s(),_:o(),dayName:Kn.dayNames[a()+7]})},m:function(){return l()+1},mm:function(){return hr(l()+1)},mmm:function(){return Kn.monthNames[l()]},mmmm:function(){return Kn.monthNames[l()+12]},yy:function(){return String(c()).slice(2)},yyyy:function(){return hr(c(),4)},h:function(){return h()%12||12},hh:function(){return hr(h()%12||12)},H:function(){return h()},HH:function(){return hr(h())},M:function(){return f()},MM:function(){return hr(f())},s:function(){return p()},ss:function(){return hr(p())},l:function(){return hr(g(),3)},L:function(){return hr(Math.floor(g()/10))},t:function(){return h()<12?Kn.timeNames[0]:Kn.timeNames[1]},tt:function(){return h()<12?Kn.timeNames[2]:Kn.timeNames[3]},T:function(){return h()<12?Kn.timeNames[4]:Kn.timeNames[5]},TT:function(){return h()<12?Kn.timeNames[6]:Kn.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":Ute(t)},o:function(){return(w()>0?"-":"+")+hr(Math.floor(Math.abs(w())/60)*100+Math.abs(w())%60,4)},p:function(){return(w()>0?"-":"+")+hr(Math.floor(Math.abs(w())/60),2)+":"+hr(Math.floor(Math.abs(w())%60),2)},S:function(){return["th","st","nd","rd"][s()%10>3?0:(s()%100-s()%10!=10)*s()%10]},W:function(){return b()},WW:function(){return hr(b())},N:function(){return C()}};return e.replace(Ote,function(y){return y in T?T[y]():y.slice(1,y.length-1)})}var TS={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},Kn={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},hr=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(e).padStart(n,"0")},ES=function(e){var n=e.y,r=e.m,i=e.d,o=e._,s=e.dayName,a=e.short,l=a===void 0?!1:a,c=new Date,h=new Date;h.setDate(h[o+"Date"]()-1);var f=new Date;f.setDate(f[o+"Date"]()+1);var p=function(){return c[o+"Date"]()},g=function(){return c[o+"Month"]()},w=function(){return c[o+"FullYear"]()},b=function(){return h[o+"Date"]()},C=function(){return h[o+"Month"]()},T=function(){return h[o+"FullYear"]()},y=function(){return f[o+"Date"]()},_=function(){return f[o+"Month"]()},S=function(){return f[o+"FullYear"]()};return w()===n&&g()===r&&p()===i?l?"Tdy":"Today":T()===n&&C()===r&&b()===i?l?"Ysd":"Yesterday":S()===n&&_()===r&&y()===i?l?"Tmw":"Tomorrow":s},$te=function(e){var n=new Date(e.getFullYear(),e.getMonth(),e.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var o=(n-r)/(864e5*7);return 1+Math.floor(o)},Bte=function(e){var n=e.getDay();return n===0&&(n=7),n},Ute=function(e){return(String(e).match(Lte)||[""]).pop().replace(Vte,"").replace(/GMT\+0000/g,"UTC")};const zte=({index:t,title:e,image:n,link:r,description:i,date:o,color:s,venue:a})=>{const l=x.useRef(null),[c,h]=x.useState(!1);return x.useEffect(()=>{l.current!=null&&(l.current.style.backgroundColor=Mte(s,"0.1"),l.current.style.borderColor=`#${s}`)},[]),u("div",{className:"flex justify-center h-full items-start w-full",children:F("div",{className:"flex w-full h-full flex-col items-center",children:[u("img",{className:"rounded border border-white w-full aspect-square object-cover",src:c?n:Dte,onClick:()=>window.open(r,"_blank","noreferrer"),onLoad:()=>h(!0)}),F("div",{ref:l,className:"h-fill flex-grow w-11/12 border rounded-t-none rounded border-t-0 p-6 flex flex-col gap-4",children:[F("div",{className:"flex flex-col gap-1",children:[u("p",{className:"text-xs",children:Fte(o,"dddd, mmmm dS, h:MM TT")}),u("h4",{className:"text-2xl font-bold",children:e}),u("p",{className:"",children:i})]}),F("div",{className:"flex flex-col mb-4",children:[u("p",{className:"text-sm text-neutral-300",children:"Location:"}),u("p",{children:a})]}),u(ii,{link:r,className:"mt-auto",children:u(rt.div,{whileHover:{scale:1.05},whileTap:{scale:.95},className:"flex justify-center px-6 py-4 rounded-md w-fit bg-yellow-600/20 border-yellow-500 border font-semibold",children:"Learn More"})})]})]},t)})};async function jte(){try{return(await ag(lg,"getEventCalendar")()).data}catch(t){return console.log(t),[]}}const Wte=()=>{const[t,e]=x.useState([]),[n,r]=x.useState(!0);return x.useEffect(()=>{jte().then(i=>{e(i),r(!1)})},[]),F(Zt,{children:[u(ci,{pageTitle:"Calendar",pageDescription:"See our upcoming list of events!"}),n?u("div",{className:"col-span-1 mt-8 flex justify-center items-center",children:u(zm,{color:"inherit"})}):u("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 max-w-screen-xl mx-auto gap-16 md:gap-8 mt-16 px-8",children:t.map((i,o)=>u(zte,{title:i.title,description:i.description,image:i.image,link:i.link,date:i.date,index:o,color:i.color,venue:i.venue},o))})]})},Hte=({tier:t,image:e,sponsor:n,desc:r,button:i,website:o})=>{switch(t){case"Gold":return F("div",{className:"flex flex-col w-full max-w-4xl items-start md:items-center gap-5 md:px-12 p-12 bg-neutral-900 border border-white rounded-xl box-border",children:[u("img",{src:e,className:"object-contain max-h-52 rounded-md"}),u("h3",{className:"text-5xl font-extrabold text-center",children:n}),u("p",{className:"text-left text-base",children:r}),u(oi,{text:i,color:"secondary",style:"border",link:o})]});case"Silver":return F("div",{className:"flex flex-col max-w-md items-start md:items-center gap-3 px-8 py-8 bg-neutral-900 border border-white rounded-xl box-border",children:[u("img",{src:e,className:"object-contain max-h-48 rounded-md"}),u("h3",{className:"text-4xl font-extrabold text-center",children:n}),u("p",{className:"text-left text-base",children:r}),u("a",{href:o,className:"text-neutral-300 underline py-2 pr-2 hover:text-yellow-500",target:"_blank",rel:"noopener",children:i})]});case"Bronze":return F("div",{className:"flex flex-col",children:[u("div",{className:"w-[350px] h-[0.2px] bg-white"}),F("div",{className:"flex",children:[u("div",{className:"w-[0.2px] bg-white"}),F("div",{className:"flex flex-col items-start md:items-center gap-6 w-[350px] m-auto px-7 py-8 bg-neutral-900 box-border",children:[u("img",{src:e,className:"w-[300px] h-[100px] rounded-xl"}),u("p",{className:"max-w-[340px] text-center text-base",children:r})]}),u("div",{className:"w-[0.2px] bg-white"})]}),u("div",{className:"w-[350px] h-[0.2px] bg-white"})]})}},Gte=({tier:t,button:e,link:n})=>F("div",{className:"flex flex-col items-center mx-auto max-w-sm text-center gap-6",children:[F("p",{children:["It looks like we don’t have any ",t," supporters right now :( Be the first ",t," supporter today!"]}),u(oi,{text:e,color:"primary",link:n})]}),qte=()=>{const t=["Gold Supporters","Silver Supporters","Bronze Supporters"],e={title:"Sponsorships",body:"These are the amazing companies that help us make HackMelbourne happen. We are always looking for new sponsors to support us, so if you are interested, please get in touch!"},n=[],r={title:["Be a","Hack","Melbourne sponsor for 2026"],desc:["Help us run our events and make a difference in the community!"],button:"Learn More",link:"mailto:sponsorship@hack.melbourne"},i=x.useRef(null),{scrollYProgress:o}=Zp({target:i,offset:["start start","end start"]}),s=Ur(o,[0,1],["0%","80%"]),a=Ur(o,[0,.7],["100%","0%"]),l=Ur(o,[0,.8],["1","0.9"]);return F("div",{className:"w-screen max-w-full",children:[u(rt.section,{ref:i,style:{y:s,opacity:a,scale:l},children:u(ci,{pageTitle:e.title,pageDescription:e.body})}),F("section",{children:[u("h2",{className:"text-4xl text-center font-extrabold mt-28 mb-9",children:t[0]}),n.length>0?u("div",{className:"grid grid-rows-1 grid-cols-1 justify-items-center gap-5 px-8 md:max-w-screen-md m-auto",children:n.map(c=>u(Hte,{...c}))}):u(Gte,{tier:"gold",button:"Learn more",link:r.link})]}),u(nA,{title:r.title,desc:r.desc,button:r.button,link:r.link})]})},Kte=()=>u(Zt,{children:u(ci,{pageTitle:"Hall of Fame",pageDescription:"Page coming soon!"})}),Yte=()=>F("div",{className:"mt-40 w-screen max-w-[80%] md:max-w-[50%] m-auto flex flex-col gap-5",children:[u("h1",{className:"text-4xl md:text-6xl font-bold",children:"Privacy Policy"}),u("p",{children:"Last updated: January 12, 2024"}),u("p",{children:"This Privacy Policy describes Our policies and procedures on the collection, use and disclosure of Your information when You use the Service and tells You about Your privacy rights and how the law protects You."}),F("p",{children:["We use Your Personal data to provide and improve the Service. By using the Service, You agree to the collection and use of information in accordance with this Privacy Policy. This Privacy Policy has been created with the help of the"," ",u("a",{href:"https://www.freeprivacypolicy.com/free-privacy-policy-generator/",target:"_blank",children:"Free Privacy Policy Generator"}),"."]}),u("h2",{className:"text-2xl md:text-4xl font-bold",children:"Interpretation and Definitions"}),u("h3",{className:"text-xl md:text-2xl font-bold",children:"Interpretation"}),u("p",{children:"The words of which the initial letter is capitalized have meanings defined under the following conditions. The following definitions shall have the same meaning regardless of whether they appear in singular or in plural."}),u("h3",{className:"text-xl md:text-2xl font-bold",children:"Definitions"}),u("p",{children:"For the purposes of this Privacy Policy:"}),F("ul",{children:[u("li",{className:"mt-2",children:F("p",{children:[u("strong",{children:"Account"})," means a unique account created for You to access our Service or parts of our Service."]})}),u("li",{className:"mt-2",children:F("p",{children:[u("strong",{children:"Affiliate"}),' means an entity that controls, is controlled by or is under common control with a party, where "control" means ownership of 50% or more of the shares, equity interest or other securities entitled to vote for election of directors or other managing authority.']})}),u("li",{className:"mt-2",children:F("p",{children:[u("strong",{children:"Company"}),' (referred to as either "the Company", "We", "Us" or "Our" in this Agreement) refers to HackMelbourne, Parkville VIC 3052.']})}),u("li",{className:"mt-2",children:F("p",{children:[u("strong",{children:"Cookies"})," are small files that are placed on Your computer, mobile device or any other device by a website, containing the details of Your browsing history on that website among its many uses."]})}),u("li",{className:"mt-2",children:F("p",{children:[u("strong",{children:"Country"})," refers to: Victoria, Australia"]})}),u("li",{className:"mt-2",children:F("p",{children:[u("strong",{children:"Device"})," means any device that can access the Service such as a computer, a cellphone or a digital tablet."]})}),u("li",{className:"mt-2",children:F("p",{children:[u("strong",{children:"Personal Data"})," is any information that relates to an identified or identifiable individual."]})}),u("li",{className:"mt-2",children:F("p",{children:[u("strong",{children:"Service"})," refers to the Website."]})}),u("li",{className:"mt-2",children:F("p",{children:[u("strong",{children:"Service Provider"})," means any natural or legal person who processes the data on behalf of the Company. It refers to third-party companies or individuals employed by the Company to facilitate the Service, to provide the Service on behalf of the Company, to perform services related to the Service or to assist the Company in analyzing how the Service is used."]})}),u("li",{className:"mt-2",children:F("p",{children:[u("strong",{children:"Usage Data"})," refers to data collected automatically, either generated by the use of the Service or from the Service infrastructure itself (for example, the duration of a page visit)."]})}),u("li",{className:"mt-2",children:F("p",{children:[u("strong",{children:"Website"})," refers to HackMelbourne, accessible from"," ",u("a",{href:"hack.melbourne",rel:"external nofollow noopener",target:"_blank",children:"hack.melbourne"})]})}),u("li",{className:"mt-2",children:F("p",{children:[u("strong",{children:"You"})," means the individual accessing or using the Service, or the company, or other legal entity on behalf of which such individual is accessing or using the Service, as applicable."]})})]}),u("h2",{className:"text-2xl md:text-4xl font-bold",children:"Collecting and Using Your Personal Data"}),u("h3",{className:"text-xl md:text-2xl font-bold",children:"Types of Data Collected"}),u("h4",{className:"text-lg md:text-xl font-bold",children:"Personal Data"}),u("p",{children:"While using Our Service, We may ask You to provide Us with certain personally identifiable information that can be used to contact or identify You. Personally identifiable information may include, but is not limited to:"}),F("ul",{children:[u("li",{className:"mt-2",children:u("p",{children:"Email address"})}),u("li",{className:"mt-2",children:u("p",{children:"First name and last name"})}),u("li",{className:"mt-2",children:u("p",{children:"Usage Data"})})]}),u("h4",{className:"text-lg md:text-xl font-bold",children:"Usage Data"}),u("p",{children:"Usage Data is collected automatically when using the Service."}),u("p",{children:"Usage Data may include information such as Your Device's Internet Protocol address (e.g. IP address), browser type, browser version, the pages of our Service that You visit, the time and date of Your visit, the time spent on those pages, unique device identifiers and other diagnostic data."}),u("p",{children:"When You access the Service by or through a mobile device, We may collect certain information automatically, including, but not limited to, the type of mobile device You use, Your mobile device unique ID, the IP address of Your mobile device, Your mobile operating system, the type of mobile Internet browser You use, unique device identifiers and other diagnostic data."}),u("p",{children:"We may also collect information that Your browser sends whenever You visit our Service or when You access the Service by or through a mobile device."}),u("h4",{className:"text-lg md:text-xl font-bold",children:"Tracking Technologies and Cookies"}),u("p",{children:"We use Cookies and similar tracking technologies to track the activity on Our Service and store certain information. Tracking technologies used are beacons, tags, and scripts to collect and track information and to improve and analyze Our Service. The technologies We use may include:"}),F("ul",{children:[F("li",{className:"mt-2",children:[u("strong",{children:"Cookies or Browser Cookies."})," A cookie is a small file placed on Your Device. You can instruct Your browser to refuse all Cookies or to indicate when a Cookie is being sent. However, if You do not accept Cookies, You may not be able to use some parts of our Service. Unless you have adjusted Your browser setting so that it will refuse Cookies, our Service may use Cookies."]}),F("li",{className:"mt-2",children:[u("strong",{children:"Web Beacons."})," Certain sections of our Service and our emails may contain small electronic files known as web beacons (also referred to as clear gifs, pixel tags, and single-pixel gifs) that permit the Company, for example, to count users who have visited those pages or opened an email and for other related website statistics (for example, recording the popularity of a certain section and verifying system and server integrity)."]})]}),F("p",{children:['Cookies can be "Persistent" or "Session" Cookies. Persistent Cookies remain on Your personal computer or mobile device when You go offline, while Session Cookies are deleted as soon as You close Your web browser. Learn more about cookies on the'," ",u("a",{href:"https://www.freeprivacypolicy.com/blog/sample-privacy-policy-template/#Use_Of_Cookies_And_Tracking",target:"_blank",children:"Free Privacy Policy website"})," ","article."]}),u("p",{children:"We use both Session and Persistent Cookies for the purposes set out below:"}),F("ul",{children:[F("li",{className:"mt-2",children:[u("p",{children:u("strong",{children:"Necessary / Essential Cookies"})}),u("p",{children:"Type: Session Cookies"}),u("p",{children:"Administered by: Us"}),u("p",{children:"Purpose: These Cookies are essential to provide You with services available through the Website and to enable You to use some of its features. They help to authenticate users and prevent fraudulent use of user accounts. Without these Cookies, the services that You have asked for cannot be provided, and We only use these Cookies to provide You with those services."})]}),F("li",{className:"mt-2",children:[u("p",{children:u("strong",{children:"Cookies Policy / Notice Acceptance Cookies"})}),u("p",{children:"Type: Persistent Cookies"}),u("p",{children:"Administered by: Us"}),u("p",{children:"Purpose: These Cookies identify if users have accepted the use of cookies on the Website."})]}),F("li",{className:"mt-2",children:[u("p",{children:u("strong",{children:"Functionality Cookies"})}),u("p",{children:"Type: Persistent Cookies"}),u("p",{children:"Administered by: Us"}),u("p",{children:"Purpose: These Cookies allow us to remember choices You make when You use the Website, such as remembering your login details or language preference. The purpose of these Cookies is to provide You with a more personal experience and to avoid You having to re-enter your preferences every time You use the Website."})]})]}),u("p",{children:"For more information about the cookies we use and your choices regarding cookies, please visit our Cookies Policy or the Cookies section of our Privacy Policy."}),u("h3",{className:"text-xl md:text-2xl font-bold",children:"Use of Your Personal Data"}),u("p",{children:"The Company may use Personal Data for the following purposes:"}),F("ul",{children:[u("li",{className:"mt-2",children:F("p",{children:[u("strong",{children:"To provide and maintain our Service"}),", including to monitor the usage of our Service."]})}),u("li",{className:"mt-2",children:F("p",{children:[u("strong",{children:"To manage Your Account:"})," to manage Your registration as a user of the Service. The Personal Data You provide can give You access to different functionalities of the Service that are available to You as a registered user."]})}),u("li",{className:"mt-2",children:F("p",{children:[u("strong",{children:"For the performance of a contract:"})," the development, compliance and undertaking of the purchase contract for the products, items or services You have purchased or of any other contract with Us through the Service."]})}),u("li",{className:"mt-2",children:F("p",{children:[u("strong",{children:"To contact You:"})," To contact You by email, telephone calls, SMS, or other equivalent forms of electronic communication, such as a mobile application's push notifications regarding updates or informative communications related to the functionalities, products or contracted services, including the security updates, when necessary or reasonable for their implementation."]})}),u("li",{className:"mt-2",children:F("p",{children:[u("strong",{children:"To provide You"})," with news, special offers and general information about other goods, services and events which we offer that are similar to those that you have already purchased or enquired about unless You have opted not to receive such information."]})}),u("li",{className:"mt-2",children:F("p",{children:[u("strong",{children:"To manage Your requests:"})," To attend and manage Your requests to Us."]})}),u("li",{className:"mt-2",children:F("p",{children:[u("strong",{children:"For business transfers:"})," We may use Your information to evaluate or conduct a merger, divestiture, restructuring, reorganization, dissolution, or other sale or transfer of some or all of Our assets, whether as a going concern or as part of bankruptcy, liquidation, or similar proceeding, in which Personal Data held by Us about our Service users is among the assets transferred."]})}),u("li",{className:"mt-2",children:F("p",{children:[u("strong",{children:"For other purposes"}),": We may use Your information for other purposes, such as data analysis, identifying usage trends, determining the effectiveness of our promotional campaigns and to evaluate and improve our Service, products, services, marketing and your experience."]})})]}),u("p",{children:"We may share Your personal information in the following situations:"}),F("ul",{children:[F("li",{className:"mt-2",children:[u("strong",{children:"With Service Providers:"})," We may share Your personal information with Service Providers to monitor and analyze the use of our Service, to contact You."]}),F("li",{className:"mt-2",children:[u("strong",{children:"For business transfers:"})," We may share or transfer Your personal information in connection with, or during negotiations of, any merger, sale of Company assets, financing, or acquisition of all or a portion of Our business to another company."]}),F("li",{className:"mt-2",children:[u("strong",{children:"With Affiliates:"})," We may share Your information with Our affiliates, in which case we will require those affiliates to honor this Privacy Policy. Affiliates include Our parent company and any other subsidiaries, joint venture partners or other companies that We control or that are under common control with Us."]}),F("li",{className:"mt-2",children:[u("strong",{children:"With business partners:"})," We may share Your information with Our business partners to offer You certain products, services or promotions."]}),F("li",{className:"mt-2",children:[u("strong",{children:"With other users:"})," when You share personal information or otherwise interact in the public areas with other users, such information may be viewed by all users and may be publicly distributed outside."]}),F("li",{className:"mt-2",children:[u("strong",{children:"With Your consent"}),": We may disclose Your personal information for any other purpose with Your consent."]})]}),u("h3",{className:"text-xl md:text-2xl font-bold",children:"Retention of Your Personal Data"}),u("p",{children:"The Company will retain Your Personal Data only for as long as is necessary for the purposes set out in this Privacy Policy. We will retain and use Your Personal Data to the extent necessary to comply with our legal obligations (for example, if we are required to retain your data to comply with applicable laws), resolve disputes, and enforce our legal agreements and policies."}),u("p",{children:"The Company will also retain Usage Data for internal analysis purposes. Usage Data is generally retained for a shorter period of time, except when this data is used to strengthen the security or to improve the functionality of Our Service, or We are legally obligated to retain this data for longer time periods."}),u("h3",{className:"text-xl md:text-2xl font-bold",children:"Transfer of Your Personal Data"}),u("p",{children:"Your information, including Personal Data, is processed at the Company's operating offices and in any other places where the parties involved in the processing are located. It means that this information may be transferred to — and maintained on — computers located outside of Your state, province, country or other governmental jurisdiction where the data protection laws may differ than those from Your jurisdiction."}),u("p",{children:"Your consent to this Privacy Policy followed by Your submission of such information represents Your agreement to that transfer."}),u("p",{children:"The Company will take all steps reasonably necessary to ensure that Your data is treated securely and in accordance with this Privacy Policy and no transfer of Your Personal Data will take place to an organization or a country unless there are adequate controls in place including the security of Your data and other personal information."}),u("h3",{className:"text-xl md:text-2xl font-bold",children:"Delete Your Personal Data"}),u("p",{children:"You have the right to delete or request that We assist in deleting the Personal Data that We have collected about You."}),u("p",{children:"Our Service may give You the ability to delete certain information about You from within the Service."}),u("p",{children:"You may update, amend, or delete Your information at any time by signing in to Your Account, if you have one, and visiting the account settings section that allows you to manage Your personal information. You may also contact Us to request access to, correct, or delete any personal information that You have provided to Us."}),u("p",{children:"Please note, however, that We may need to retain certain information when we have a legal obligation or lawful basis to do so."}),u("h3",{className:"text-xl md:text-2xl font-bold",children:"Disclosure of Your Personal Data"}),u("h4",{className:"text-lg md:text-xl font-bold",children:"Business Transactions"}),u("p",{children:"If the Company is involved in a merger, acquisition or asset sale, Your Personal Data may be transferred. We will provide notice before Your Personal Data is transferred and becomes subject to a different Privacy Policy."}),u("h4",{className:"text-lg md:text-xl font-bold",children:"Law enforcement"}),u("p",{children:"Under certain circumstances, the Company may be required to disclose Your Personal Data if required to do so by law or in response to valid requests by public authorities (e.g. a court or a government agency)."}),u("h4",{className:"text-lg md:text-xl font-bold",children:"Other legal requirements"}),u("p",{children:"The Company may disclose Your Personal Data in the good faith belief that such action is necessary to:"}),F("ul",{children:[u("li",{className:"mt-2",children:"Comply with a legal obligation"}),u("li",{className:"mt-2",children:"Protect and defend the rights or property of the Company"}),u("li",{className:"mt-2",children:"Prevent or investigate possible wrongdoing in connection with the Service"}),u("li",{className:"mt-2",children:"Protect the personal safety of Users of the Service or the public"}),u("li",{className:"mt-2",children:"Protect against legal liability"})]}),u("h3",{className:"text-xl md:text-2xl font-bold",children:"Security of Your Personal Data"}),u("p",{children:"The security of Your Personal Data is important to Us, but remember that no method of transmission over the Internet, or method of electronic storage is 100% secure. While We strive to use commercially acceptable means to protect Your Personal Data, We cannot guarantee its absolute security."}),u("h2",{className:"text-2xl md:text-4xl font-bold",children:"Children's Privacy"}),u("p",{children:"Our Service does not address anyone under the age of 13. We do not knowingly collect personally identifiable information from anyone under the age of 13. If You are a parent or guardian and You are aware that Your child has provided Us with Personal Data, please contact Us. If We become aware that We have collected Personal Data from anyone under the age of 13 without verification of parental consent, We take steps to remove that information from Our servers."}),u("p",{children:"If We need to rely on consent as a legal basis for processing Your information and Your country requires consent from a parent, We may require Your parent's consent before We collect and use that information."}),u("h2",{className:"text-2xl md:text-4xl font-bold",children:"Links to Other Websites"}),u("p",{children:"Our Service may contain links to other websites that are not operated by Us. If You click on a third party link, You will be directed to that third party's site. We strongly advise You to review the Privacy Policy of every site You visit."}),u("p",{children:"We have no control over and assume no responsibility for the content, privacy policies or practices of any third party sites or services."}),u("h2",{className:"text-2xl md:text-4xl font-bold",children:"Changes to this Privacy Policy"}),u("p",{children:"We may update Our Privacy Policy from time to time. We will notify You of any changes by posting the new Privacy Policy on this page."}),u("p",{children:'We will let You know via email and/or a prominent notice on Our Service, prior to the change becoming effective and update the "Last updated" date at the top of this Privacy Policy.'}),u("p",{children:"You are advised to review this Privacy Policy periodically for any changes. Changes to this Privacy Policy are effective when they are posted on this page."}),u("h2",{className:"text-2xl md:text-4xl font-bold",children:"Contact Us"}),u("p",{children:"If you have any questions about this Privacy Policy, You can contact us:"}),u("ul",{children:u("li",{className:"mt-2",children:"By email: student_engagement@hack.melbourne"})})]}),Qte=()=>F("div",{className:"mt-40 w-screen max-w-[80%] md:max-w-[50%] m-auto flex flex-col gap-5",children:[u("h1",{className:"text-4xl md:text-6xl font-bold",children:"Terms and Conditions"}),u("p",{children:"Last updated: January 12, 2024"}),u("p",{children:"Please read these terms and conditions carefully before using Our Service."}),u("h2",{className:"text-2xl md:text-4xl font-bold",children:"Interpretation and Definitions"}),u("h3",{className:"text-xl md:text-2xl font-bold",children:"Interpretation"}),u("p",{children:"The words of which the initial letter is capitalized have meanings defined under the following conditions. The following definitions shall have the same meaning regardless of whether they appear in singular or in plural."}),u("h3",{className:"text-xl md:text-2xl font-bold",children:"Definitions"}),u("p",{children:"For the purposes of these Terms and Conditions:"}),F("ul",{children:[u("li",{className:"mt-2",children:F("p",{children:[u("strong",{children:"Affiliate"}),' means an entity that controls, is controlled by or is under common control with a party, where "control" means ownership of 50% or more of the shares, equity interest or other securities entitled to vote for election of directors or other managing authority.']})}),u("li",{className:"mt-2",children:F("p",{children:[u("strong",{children:"Country"})," refers to: Victoria, Australia"]})}),u("li",{className:"mt-2",children:F("p",{children:[u("strong",{children:"Company"}),' (referred to as either "the Company", "We", "Us" or "Our" in this Agreement) refers to HackMelbourne, Parkville VIC 3052.']})}),u("li",{className:"mt-2",children:F("p",{children:[u("strong",{children:"Device"})," means any device that can access the Service such as a computer, a cellphone or a digital tablet."]})}),u("li",{className:"mt-2",children:F("p",{children:[u("strong",{children:"Service"})," refers to the Website."]})}),u("li",{className:"mt-2",children:F("p",{children:[u("strong",{children:"Terms and Conditions"}),' (also referred as "Terms") mean these Terms and Conditions that form the entire agreement between You and the Company regarding the use of the Service. This Terms and Conditions agreement has been created with the help of the'," ",u("a",{href:"https://www.termsfeed.com/terms-conditions-generator/",target:"_blank",children:"Terms and Conditions Generator"}),"."]})}),u("li",{className:"mt-2",children:F("p",{children:[u("strong",{children:"Third-party Social Media Service"})," means any services or content (including data, information, products or services) provided by a third-party that may be displayed, included or made available by the Service."]})}),u("li",{className:"mt-2",children:F("p",{children:[u("strong",{children:"Website"})," refers to HackMelbourne, accessible from"," ",u("a",{href:"https://hack.melbourne/",rel:"external nofollow noopener",target:"_blank",children:"https://hack.melbourne/"})]})}),u("li",{className:"mt-2",children:F("p",{children:[u("strong",{children:"You"})," means the individual accessing or using the Service, or the company, or other legal entity on behalf of which such individual is accessing or using the Service, as applicable."]})})]}),u("h2",{className:"text-2xl md:text-4xl font-bold",children:"Acknowledgment"}),u("p",{children:"These are the Terms and Conditions governing the use of this Service and the agreement that operates between You and the Company. These Terms and Conditions set out the rights and obligations of all users regarding the use of the Service."}),u("p",{children:"Your access to and use of the Service is conditioned on Your acceptance of and compliance with these Terms and Conditions. These Terms and Conditions apply to all visitors, users and others who access or use the Service."}),u("p",{children:"By accessing or using the Service You agree to be bound by these Terms and Conditions. If You disagree with any part of these Terms and Conditions then You may not access the Service."}),u("p",{children:"You represent that you are over the age of 18. The Company does not permit those under 18 to use the Service."}),u("p",{children:"Your access to and use of the Service is also conditioned on Your acceptance of and compliance with the Privacy Policy of the Company. Our Privacy Policy describes Our policies and procedures on the collection, use and disclosure of Your personal information when You use the Application or the Website and tells You about Your privacy rights and how the law protects You. Please read Our Privacy Policy carefully before using Our Service."}),u("h2",{className:"text-2xl md:text-4xl font-bold",children:"Links to Other Websites"}),u("p",{children:"Our Service may contain links to third-party web sites or services that are not owned or controlled by the Company."}),u("p",{children:"The Company has no control over, and assumes no responsibility for, the content, privacy policies, or practices of any third party web sites or services. You further acknowledge and agree that the Company shall not be responsible or liable, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection with the use of or reliance on any such content, goods or services available on or through any such web sites or services."}),u("p",{children:"We strongly advise You to read the terms and conditions and privacy policies of any third-party web sites or services that You visit."}),u("h2",{className:"text-2xl md:text-4xl font-bold",children:"Termination"}),u("p",{children:"We may terminate or suspend Your access immediately, without prior notice or liability, for any reason whatsoever, including without limitation if You breach these Terms and Conditions."}),u("p",{children:"Upon termination, Your right to use the Service will cease immediately."}),u("h2",{className:"text-2xl md:text-4xl font-bold",children:"Limitation of Liability"}),u("p",{children:"Notwithstanding any damages that You might incur, the entire liability of the Company and any of its suppliers under any provision of this Terms and Your exclusive remedy for all of the foregoing shall be limited to the amount actually paid by You through the Service or 100 USD if You haven't purchased anything through the Service."}),u("p",{children:"To the maximum extent permitted by applicable law, in no event shall the Company or its suppliers be liable for any special, incidental, indirect, or consequential damages whatsoever (including, but not limited to, damages for loss of profits, loss of data or other information, for business interruption, for personal injury, loss of privacy arising out of or in any way related to the use of or inability to use the Service, third-party software and/or third-party hardware used with the Service, or otherwise in connection with any provision of this Terms), even if the Company or any supplier has been advised of the possibility of such damages and even if the remedy fails of its essential purpose."}),u("p",{children:"Some states do not allow the exclusion of implied warranties or limitation of liability for incidental or consequential damages, which means that some of the above limitations may not apply. In these states, each party's liability will be limited to the greatest extent permitted by law."}),u("h2",{className:"text-2xl md:text-4xl font-bold",children:'"AS IS" and "AS AVAILABLE" Disclaimer'}),u("p",{children:'The Service is provided to You "AS IS" and "AS AVAILABLE" and with all faults and defects without warranty of any kind. To the maximum extent permitted under applicable law, the Company, on its own behalf and on behalf of its Affiliates and its and their respective licensors and service providers, expressly disclaims all warranties, whether express, implied, statutory or otherwise, with respect to the Service, including all implied warranties of merchantability, fitness for a particular purpose, title and non-infringement, and warranties that may arise out of course of dealing, course of performance, usage or trade practice. Without limitation to the foregoing, the Company provides no warranty or undertaking, and makes no representation of any kind that the Service will meet Your requirements, achieve any intended results, be compatible or work with any other software, applications, systems or services, operate without interruption, meet any performance or reliability standards or be error free or that any errors or defects can or will be corrected.'}),u("p",{children:"Without limiting the foregoing, neither the Company nor any of the company's provider makes any representation or warranty of any kind, express or implied: (i) as to the operation or availability of the Service, or the information, content, and materials or products included thereon; (ii) that the Service will be uninterrupted or error-free; (iii) as to the accuracy, reliability, or currency of any information or content provided through the Service; or (iv) that the Service, its servers, the content, or e-mails sent from or on behalf of the Company are free of viruses, scripts, trojan horses, worms, malware, timebombs or other harmful components."}),u("p",{children:"Some jurisdictions do not allow the exclusion of certain types of warranties or limitations on applicable statutory rights of a consumer, so some or all of the above exclusions and limitations may not apply to You. But in such a case the exclusions and limitations set forth in this section shall be applied to the greatest extent enforceable under applicable law."}),u("h2",{className:"text-2xl md:text-4xl font-bold",children:"Governing Law"}),u("p",{children:"The laws of the Country, excluding its conflicts of law rules, shall govern this Terms and Your use of the Service. Your use of the Application may also be subject to other local, state, national, or international laws."}),u("h2",{className:"text-2xl md:text-4xl font-bold",children:"Disputes Resolution"}),u("p",{children:"If You have any concern or dispute about the Service, You agree to first try to resolve the dispute informally by contacting the Company."}),u("h2",{className:"text-2xl md:text-4xl font-bold",children:"For European Union (EU) Users"}),u("p",{children:"If You are a European Union consumer, you will benefit from any mandatory provisions of the law of the country in which You are resident."}),u("h2",{className:"text-2xl md:text-4xl font-bold",children:"United States Legal Compliance"}),u("p",{children:'You represent and warrant that (i) You are not located in a country that is subject to the United States government embargo, or that has been designated by the United States government as a "terrorist supporting" country, and (ii) You are not listed on any United States government list of prohibited or restricted parties.'}),u("h2",{className:"text-2xl md:text-4xl font-bold",children:"Severability and Waiver"}),u("h3",{className:"text-xl md:text-2xl font-bold",children:"Severability"}),u("p",{children:"If any provision of these Terms is held to be unenforceable or invalid, such provision will be changed and interpreted to accomplish the objectives of such provision to the greatest extent possible under applicable law and the remaining provisions will continue in full force and effect."}),u("h3",{className:"text-xl md:text-2xl font-bold",children:"Waiver"}),u("p",{children:"Except as provided herein, the failure to exercise a right or to require performance of an obligation under these Terms shall not affect a party's ability to exercise such right or require such performance at any time thereafter nor shall the waiver of a breach constitute a waiver of any subsequent breach."}),u("h2",{className:"text-2xl md:text-4xl font-bold",children:"Translation Interpretation"}),u("p",{children:"These Terms and Conditions may have been translated if We have made them available to You on our Service. You agree that the original English text shall prevail in the case of a dispute."}),u("h2",{className:"text-2xl md:text-4xl font-bold",children:"Changes to These Terms and Conditions"}),u("p",{children:"We reserve the right, at Our sole discretion, to modify or replace these Terms at any time. If a revision is material We will make reasonable efforts to provide at least 30 days' notice prior to any new terms taking effect. What constitutes a material change will be determined at Our sole discretion."}),u("p",{children:"By continuing to access or use Our Service after those revisions become effective, You agree to be bound by the revised terms. If You do not agree to the new terms, in whole or in part, please stop using the website and the Service."}),u("h2",{className:"text-2xl md:text-4xl font-bold",children:"Contact Us"}),u("p",{children:"If you have any questions about these Terms and Conditions, You can contact us:"}),u("ul",{children:u("li",{className:"mt-2",children:"By email: student_engagement@hack.melbourne"})})]}),Xte=({formData:t,handleChange:e})=>F(Zt,{children:[F(yr,{fullWidth:!0,children:[u(Vr,{children:"Describe any prior experience you have creating or designing websites."}),u(Zn,{name:"website.experience",value:t.experience,onChange:e,multiline:!0,rows:5})]}),F(yr,{fullWidth:!0,children:[u(Vr,{children:"What do you think makes a good website?"}),u(Zn,{name:"website.goodweb",value:t.goodweb,onChange:e,multiline:!0,rows:5})]}),F(yr,{fullWidth:!0,children:[u(Vr,{children:"Tell us about any ideas you have for the website!"}),u(Zn,{name:"website.ideas",value:t.ideas,onChange:e})]})]}),Jte=({formData:t,handleChange:e})=>F(Zt,{children:[F(yr,{fullWidth:!0,children:[u(Vr,{children:"Describe how you approach cross-team collaboration."}),u(Zn,{name:"sponsorships.collab",value:t.collab,onChange:e,multiline:!0,rows:5})]}),F(yr,{fullWidth:!0,children:[u(Vr,{children:"How would you attract students who have never participated in hackathons or tech events before?"}),u(Zn,{name:"sponsorships.attract",value:t.attract,onChange:e,multiline:!0,rows:5})]}),F(yr,{fullWidth:!0,children:[u(Vr,{children:"Have you ever managed a social media account or created content that significantly increased engagement?"}),u(Zn,{name:"sponsorships.engagement",value:t.engagement,onChange:e,multiline:!0,rows:3})]})]});const Zte=xd({palette:{mode:"dark",primary:Ms},typography:{fontFamily:"'Poppins', sans-serif",h1:{fontWeight:"800"},h2:{fontWeight:"600"},h3:{fontWeight:"500"},h4:{fontWeight:"400"},body1:{fontFamily:"'Poppins', sans-serif",margin:"0"}},components:{MuiTextField:{defaultProps:{margin:"dense",fullWidth:!0}},MuiSelect:{defaultProps:{margin:"dense",fullWidth:!0}},MuiInputBase:{styleOverrides:{input:{"&:focus":{color:"primary.main"}}}}}});function ene(){const[t,e]=x.useState({common:{name:"",email:"",gradYear:"",major:"",availability:"",confirm:!1,role:""},website:{experience:"",ideas:"",goodweb:""},sponsorships:{collab:"",attract:"",engagement:""}}),n={title:"Apply",description:"Apply for HackMelbourne's officer intake for Semester 2, 2025!"},r=i=>{const[o,s]=i.target.name.split(".");if("type"in i.target&&i.target.type==="checkbox")i.target;else{const a=i.target;e(l=>({...l,[o]:{...l[o],[s]:a.value}}))}console.log(t)};return F(Zt,{children:[u(ci,{pageTitle:n.title,pageDescription:n.description}),F(Iw,{theme:Zte,children:[F("div",{className:"apply-banner",children:[u("div",{className:"apply-banner-bg"}),F("div",{className:"apply-banner-content",children:[F(ie,{className:"apply-banner-title",variant:"h2",children:["Join",u("br",{}),"HackMelbourne"]}),F("div",{className:"apply-banner-grid",children:[F("div",{className:"apply-banner-col",children:[F("div",{className:"apply-banner-card",children:[u(ie,{variant:"h4",children:"Inclusive Community"}),u(ie,{variant:"body1",children:"Our mission is to make tech and hackathons accessible to everyone, regardless of background, experience level, or university."})]}),F("div",{className:"apply-banner-card",children:[u(ie,{variant:"h4",children:"Learning-Focused"}),u(ie,{variant:"body1",children:"We help design and run educational workshops, panels, and resources that teach everything from software engineering fundamentals to advanced web, mobile, and AI development."})]})]}),F("div",{className:"apply-banner-col",children:[F("div",{className:"apply-banner-card",children:[u(ie,{variant:"h4",children:"Culture of Collaboration"}),u(ie,{variant:"body1",children:"HackMelbourne is dedicated to creating a space where students can connect, share ideas, and grow together. It doesn't matter if you're a first-time coders or seasoned hackers!"})]}),F("div",{className:"apply-banner-card",children:[u(ie,{variant:"h4",children:"Represent and Compete"}),u(ie,{variant:"body1",children:"Passionate about hackathons yourself? Officers also have opportunities to compete in national and international hackathons representing HackMelbourne!"})]})]})]})]})]}),u(tp,{sx:{maxWidth:600,mx:"auto",p:3},children:F($R,{spacing:3,children:[F(yr,{fullWidth:!0,children:[u(Vr,{required:!0,children:"Full Name"}),u(Zn,{placeholder:"Elliot Guo",name:"common.name",value:t.common.name,onChange:r})]}),F(yr,{fullWidth:!0,children:[u(Vr,{required:!0,children:"Student email"}),u(Zn,{placeholder:"elliotguo@student.unimelb.edu.au",name:"common.email",value:t.common.email,onChange:r})]}),F(tp,{sx:{display:"flex",gap:2,mb:3},children:[F(yr,{fullWidth:!0,children:[u(Vr,{required:!0,children:"Graduation Year"}),u(Zn,{placeholder:"2027",name:"common.gradYear",value:t.common.gradYear,onChange:r})]}),F(yr,{fullWidth:!0,children:[u(Vr,{required:!0,children:"Major"}),u(Zn,{placeholder:"BSci",name:"common.major",value:t.common.major,onChange:r})]})]}),F(yr,{fullWidth:!0,sx:{mt:2},children:[u(Vr,{required:!0,sx:{mb:1,"&.Mui-focused":{color:"text.secondary"}},children:"Which role are you applying for?"}),F(eA,{displayEmpty:!0,name:"common.role",value:t.common.role,onChange:r,sx:()=>({color:t.common.role?"text.primary":"text.secondary"}),children:[u(yy,{value:"",children:u("em",{children:"Select a role"})}),u(yy,{value:"Website Officer",children:"Website Officer"}),u(yy,{value:"Sponsorships Officer",children:"Sponsorships Officer"})]})]}),(()=>{switch(t.common.role){case"Website Officer":return u(Xte,{formData:t.website,handleChange:r});case"Sponsorships Officer":return u(Jte,{formData:t.sponsorships,handleChange:r});default:return null}})()]})})]})]})}const tne=["ahole","anus","ash0le","ash0les","asholes","ass","Ass Monkey","Assface","assh0le","assh0lez","asshole","assholes","assholz","asswipe","azzhole","bassterds","bastard","bastards","bastardz","basterds","basterdz","Biatch","bitch","bitches","Blow Job","boffing","butthole","buttwipe","c0ck","c0cks","c0k","Carpet Muncher","cawk","cawks","Clit","cnts","cntz","cock","cockhead","cock-head","cocks","CockSucker","cock-sucker","crap","cum","cunt","cunts","cuntz","dick","dild0","dild0s","dildo","dildos","dilld0","dilld0s","dominatricks","dominatrics","dominatrix","dyke","enema","f u c k","f u c k e r","fag","fag1t","faget","fagg1t","faggit","faggot","fagg0t","fagit","fags","fagz","faig","faigs","fart","flipping the bird","fuck","fucker","fuckin","fucking","fucks","Fudge Packer","fuk","Fukah","Fuken","fuker","Fukin","Fukk","Fukkah","Fukken","Fukker","Fukkin","g00k","God-damned","h00r","h0ar","h0re","hells","hoar","hoor","hoore","jackoff","jap","japs","jerk-off","jisim","jiss","jizm","jizz","knob","knobs","knobz","kunt","kunts","kuntz","Lezzian","Lipshits","Lipshitz","masochist","masokist","massterbait","masstrbait","masstrbate","masterbaiter","masterbate","masterbates","Motha Fucker","Motha Fuker","Motha Fukkah","Motha Fukker","Mother Fucker","Mother Fukah","Mother Fuker","Mother Fukkah","Mother Fukker","mother-fucker","Mutha Fucker","Mutha Fukah","Mutha Fuker","Mutha Fukkah","Mutha Fukker","n1gr","nastt","nigger;","nigur;","niiger;","niigr;","orafis","orgasim;","orgasm","orgasum","oriface","orifice","orifiss","packi","packie","packy","paki","pakie","paky","pecker","peeenus","peeenusss","peenus","peinus","pen1s","penas","penis","penis-breath","penus","penuus","Phuc","Phuck","Phuk","Phuker","Phukker","polac","polack","polak","Poonani","pr1c","pr1ck","pr1k","pusse","pussee","pussy","puuke","puuker","qweir","recktum","rectum","retard","sadist","scank","schlong","screwing","semen","sex","sexy","Sh!t","sh1t","sh1ter","sh1ts","sh1tter","sh1tz","shit","shits","shitter","Shitty","Shity","shitz","Shyt","Shyte","Shytty","Shyty","skanck","skank","skankee","skankey","skanks","Skanky","slag","slut","sluts","Slutty","slutz","son-of-a-bitch","tit","turd","va1jina","vag1na","vagiina","vagina","vaj1na","vajina","vullva","vulva","w0p","wh00r","wh0re","whore","xrated","xxx","b!+ch","bitch","blowjob","clit","arschloch","fuck","shit","ass","asshole","b!tch","b17ch","b1tch","bastard","bi+ch","boiolas","buceta","c0ck","cawk","chink","cipa","clits","cock","cum","cunt","dildo","dirsa","ejakulate","fatass","fcuk","fuk","fux0r","hoer","hore","jism","kawk","l3itch","l3i+ch","masturbate","masterbat*","masterbat3","motherfucker","s.o.b.","mofo","nazi","nigga","nigger","nutsack","phuck","pimpis","pusse","pussy","scrotum","sh!t","shemale","shi+","sh!+","slut","smut","teets","tits","boobs","b00bs","teez","testical","testicle","titt","w00se","jackoff","wank","whoar","whore","*damn","*dyke","*fuck*","*shit*","@$$","amcik","andskota","arse*","assrammer","ayir","bi7ch","bitch*","bollock*","breasts","butt-pirate","cabron","cazzo","chraa","chuj","Cock*","cunt*","d4mn","daygo","dego","dick*","dike*","dupa","dziwka","ejackulate","Ekrem*","Ekto","enculer","faen","fag*","fanculo","fanny","feces","feg","Felcher","ficken","fitt*","Flikker","foreskin","Fotze","Fu(*","fuk*","futkretzn","gook","guiena","h0r","h4x0r","hell","helvete","hoer*","honkey","Huevon","hui","injun","jizz","kanker*","kike","klootzak","kraut","knulle","kuk","kuksuger","Kurac","kurwa","kusi*","kyrpa*","lesbo","mamhoon","masturbat*","merd*","mibun","monkleigh","mouliewop","muie","mulkku","muschi","nazis","nepesaurio","nigger*","orospu","paska*","perse","picka","pierdol*","pillu*","pimmel","piss*","pizda","poontsee","poop","porn","p0rn","pr0n","preteen","pula","pule","puta","puto","qahbeh","queef*","rautenberg","schaffer","scheiss*","schlampe","schmuck","screw","sh!t*","sharmuta","sharmute","shipal","shiz","skribz","skurwysyn","sphencter","spic","spierdalaj","splooge","suka","b00b*","testicle*","titt*","twat","vittu","wank*","wetback*","wichser","wop*","yed","zabourah"],nne={words:tne};var rne={"4r5e":1,"5h1t":1,"5hit":1,a55:1,anal:1,anus:1,ar5e:1,arrse:1,arse:1,ass:1,"ass-fucker":1,asses:1,assfucker:1,assfukka:1,asshole:1,assholes:1,asswhole:1,a_s_s:1,"b!tch":1,b00bs:1,b17ch:1,b1tch:1,ballbag:1,balls:1,ballsack:1,bastard:1,beastial:1,beastiality:1,bellend:1,bestial:1,bestiality:1,"bi+ch":1,biatch:1,bitch:1,bitcher:1,bitchers:1,bitches:1,bitchin:1,bitching:1,bloody:1,"blow job":1,blowjob:1,blowjobs:1,boiolas:1,bollock:1,bollok:1,boner:1,boob:1,boobs:1,booobs:1,boooobs:1,booooobs:1,booooooobs:1,breasts:1,buceta:1,bugger:1,bum:1,"bunny fucker":1,butt:1,butthole:1,buttmuch:1,buttplug:1,c0ck:1,c0cksucker:1,"carpet muncher":1,cawk:1,chink:1,cipa:1,cl1t:1,clit:1,clitoris:1,clits:1,cnut:1,cock:1,"cock-sucker":1,cockface:1,cockhead:1,cockmunch:1,cockmuncher:1,cocks:1,cocksuck:1,cocksucked:1,cocksucker:1,cocksucking:1,cocksucks:1,cocksuka:1,cocksukka:1,cok:1,cokmuncher:1,coksucka:1,coon:1,cox:1,crap:1,cum:1,cummer:1,cumming:1,cums:1,cumshot:1,cunilingus:1,cunillingus:1,cunnilingus:1,cunt:1,cuntlick:1,cuntlicker:1,cuntlicking:1,cunts:1,cyalis:1,cyberfuc:1,cyberfuck:1,cyberfucked:1,cyberfucker:1,cyberfuckers:1,cyberfucking:1,d1ck:1,damn:1,dick:1,dickhead:1,dildo:1,dildos:1,dink:1,dinks:1,dirsa:1,dlck:1,"dog-fucker":1,doggin:1,dogging:1,donkeyribber:1,doosh:1,duche:1,dyke:1,ejaculate:1,ejaculated:1,ejaculates:1,ejaculating:1,ejaculatings:1,ejaculation:1,ejakulate:1,"f u c k":1,"f u c k e r":1,f4nny:1,fag:1,fagging:1,faggitt:1,faggot:1,faggs:1,fagot:1,fagots:1,fags:1,fanny:1,fannyflaps:1,fannyfucker:1,fanyy:1,fatass:1,fcuk:1,fcuker:1,fcuking:1,feck:1,fecker:1,felching:1,fellate:1,fellatio:1,fingerfuck:1,fingerfucked:1,fingerfucker:1,fingerfuckers:1,fingerfucking:1,fingerfucks:1,fistfuck:1,fistfucked:1,fistfucker:1,fistfuckers:1,fistfucking:1,fistfuckings:1,fistfucks:1,flange:1,fook:1,fooker:1,fuck:1,fucka:1,fucked:1,fucker:1,fuckers:1,fuckhead:1,fuckheads:1,fuckin:1,fucking:1,fuckings:1,fuckingshitmotherfucker:1,fuckme:1,fucks:1,fuckwhit:1,fuckwit:1,"fudge packer":1,fudgepacker:1,fuk:1,fuker:1,fukker:1,fukkin:1,fuks:1,fukwhit:1,fukwit:1,fux:1,fux0r:1,f_u_c_k:1,gangbang:1,gangbanged:1,gangbangs:1,gaylord:1,gaysex:1,goatse:1,God:1,"god-dam":1,"god-damned":1,goddamn:1,goddamned:1,hardcoresex:1,hell:1,heshe:1,hoar:1,hoare:1,hoer:1,homo:1,hore:1,horniest:1,horny:1,hotsex:1,"jack-off":1,jackoff:1,jap:1,"jerk-off":1,jism:1,jiz:1,jizm:1,jizz:1,kawk:1,knob:1,knobead:1,knobed:1,knobend:1,knobhead:1,knobjocky:1,knobjokey:1,kock:1,kondum:1,kondums:1,kum:1,kummer:1,kumming:1,kums:1,kunilingus:1,"l3i+ch":1,l3itch:1,labia:1,lust:1,lusting:1,m0f0:1,m0fo:1,m45terbate:1,ma5terb8:1,ma5terbate:1,masochist:1,"master-bate":1,masterb8:1,"masterbat*":1,masterbat3:1,masterbate:1,masterbation:1,masterbations:1,masturbate:1,"mo-fo":1,mof0:1,mofo:1,mothafuck:1,mothafucka:1,mothafuckas:1,mothafuckaz:1,mothafucked:1,mothafucker:1,mothafuckers:1,mothafuckin:1,mothafucking:1,mothafuckings:1,mothafucks:1,"mother fucker":1,motherfuck:1,motherfucked:1,motherfucker:1,motherfuckers:1,motherfuckin:1,motherfucking:1,motherfuckings:1,motherfuckka:1,motherfucks:1,muff:1,mutha:1,muthafecker:1,muthafuckker:1,muther:1,mutherfucker:1,n1gga:1,n1gger:1,nazi:1,nigg3r:1,nigg4h:1,nigga:1,niggah:1,niggas:1,niggaz:1,nigger:1,niggers:1,nob:1,"nob jokey":1,nobhead:1,nobjocky:1,nobjokey:1,numbnuts:1,nutsack:1,orgasim:1,orgasims:1,orgasm:1,orgasms:1,p0rn:1,pawn:1,pecker:1,penis:1,penisfucker:1,phonesex:1,phuck:1,phuk:1,phuked:1,phuking:1,phukked:1,phukking:1,phuks:1,phuq:1,pigfucker:1,pimpis:1,piss:1,pissed:1,pisser:1,pissers:1,pisses:1,pissflaps:1,pissin:1,pissing:1,pissoff:1,poop:1,porn:1,porno:1,pornography:1,pornos:1,prick:1,pricks:1,pron:1,pube:1,pusse:1,pussi:1,pussies:1,pussy:1,pussys:1,rectum:1,retard:1,rimjaw:1,rimming:1,"s hit":1,"s.o.b.":1,sadist:1,schlong:1,screwing:1,scroat:1,scrote:1,scrotum:1,semen:1,sex:1,"sh!+":1,"sh!t":1,sh1t:1,shag:1,shagger:1,shaggin:1,shagging:1,shemale:1,"shi+":1,shit:1,shitdick:1,shite:1,shited:1,shitey:1,shitfuck:1,shitfull:1,shithead:1,shiting:1,shitings:1,shits:1,shitted:1,shitter:1,shitters:1,shitting:1,shittings:1,shitty:1,skank:1,slut:1,sluts:1,smegma:1,smut:1,snatch:1,"son-of-a-bitch":1,spac:1,spunk:1,s_h_i_t:1,t1tt1e5:1,t1tties:1,teets:1,teez:1,testical:1,testicle:1,tit:1,titfuck:1,tits:1,titt:1,tittie5:1,tittiefucker:1,titties:1,tittyfuck:1,tittywank:1,titwank:1,tosser:1,turd:1,tw4t:1,twat:1,twathead:1,twatty:1,twunt:1,twunter:1,v14gra:1,v1gra:1,vagina:1,viagra:1,vulva:1,w00se:1,wang:1,wank:1,wanker:1,wanky:1,whoar:1,whore:1,willies:1,willy:1,xrated:1,xxx:1},ine=["4r5e","5h1t","5hit","a55","anal","anus","ar5e","arrse","arse","ass","ass-fucker","asses","assfucker","assfukka","asshole","assholes","asswhole","a_s_s","b!tch","b00bs","b17ch","b1tch","ballbag","balls","ballsack","bastard","beastial","beastiality","bellend","bestial","bestiality","bi+ch","biatch","bitch","bitcher","bitchers","bitches","bitchin","bitching","bloody","blow job","blowjob","blowjobs","boiolas","bollock","bollok","boner","boob","boobs","booobs","boooobs","booooobs","booooooobs","breasts","buceta","bugger","bum","bunny fucker","butt","butthole","buttmuch","buttplug","c0ck","c0cksucker","carpet muncher","cawk","chink","cipa","cl1t","clit","clitoris","clits","cnut","cock","cock-sucker","cockface","cockhead","cockmunch","cockmuncher","cocks","cocksuck","cocksucked","cocksucker","cocksucking","cocksucks","cocksuka","cocksukka","cok","cokmuncher","coksucka","coon","cox","crap","cum","cummer","cumming","cums","cumshot","cunilingus","cunillingus","cunnilingus","cunt","cuntlick","cuntlicker","cuntlicking","cunts","cyalis","cyberfuc","cyberfuck","cyberfucked","cyberfucker","cyberfuckers","cyberfucking","d1ck","damn","dick","dickhead","dildo","dildos","dink","dinks","dirsa","dlck","dog-fucker","doggin","dogging","donkeyribber","doosh","duche","dyke","ejaculate","ejaculated","ejaculates","ejaculating","ejaculatings","ejaculation","ejakulate","f u c k","f u c k e r","f4nny","fag","fagging","faggitt","faggot","faggs","fagot","fagots","fags","fanny","fannyflaps","fannyfucker","fanyy","fatass","fcuk","fcuker","fcuking","feck","fecker","felching","fellate","fellatio","fingerfuck","fingerfucked","fingerfucker","fingerfuckers","fingerfucking","fingerfucks","fistfuck","fistfucked","fistfucker","fistfuckers","fistfucking","fistfuckings","fistfucks","flange","fook","fooker","fuck","fucka","fucked","fucker","fuckers","fuckhead","fuckheads","fuckin","fucking","fuckings","fuckingshitmotherfucker","fuckme","fucks","fuckwhit","fuckwit","fudge packer","fudgepacker","fuk","fuker","fukker","fukkin","fuks","fukwhit","fukwit","fux","fux0r","f_u_c_k","gangbang","gangbanged","gangbangs","gaylord","gaysex","goatse","God","god-dam","god-damned","goddamn","goddamned","hardcoresex","hell","heshe","hoar","hoare","hoer","homo","hore","horniest","horny","hotsex","jack-off","jackoff","jap","jerk-off","jism","jiz","jizm","jizz","kawk","knob","knobead","knobed","knobend","knobhead","knobjocky","knobjokey","kock","kondum","kondums","kum","kummer","kumming","kums","kunilingus","l3i+ch","l3itch","labia","lust","lusting","m0f0","m0fo","m45terbate","ma5terb8","ma5terbate","masochist","master-bate","masterb8","masterbat*","masterbat3","masterbate","masterbation","masterbations","masturbate","mo-fo","mof0","mofo","mothafuck","mothafucka","mothafuckas","mothafuckaz","mothafucked","mothafucker","mothafuckers","mothafuckin","mothafucking","mothafuckings","mothafucks","mother fucker","motherfuck","motherfucked","motherfucker","motherfuckers","motherfuckin","motherfucking","motherfuckings","motherfuckka","motherfucks","muff","mutha","muthafecker","muthafuckker","muther","mutherfucker","n1gga","n1gger","nazi","nigg3r","nigg4h","nigga","niggah","niggas","niggaz","nigger","niggers","nob","nob jokey","nobhead","nobjocky","nobjokey","numbnuts","nutsack","orgasim","orgasims","orgasm","orgasms","p0rn","pawn","pecker","penis","penisfucker","phonesex","phuck","phuk","phuked","phuking","phukked","phukking","phuks","phuq","pigfucker","pimpis","piss","pissed","pisser","pissers","pisses","pissflaps","pissin","pissing","pissoff","poop","porn","porno","pornography","pornos","prick","pricks","pron","pube","pusse","pussi","pussies","pussy","pussys","rectum","retard","rimjaw","rimming","s hit","s.o.b.","sadist","schlong","screwing","scroat","scrote","scrotum","semen","sex","sh!+","sh!t","sh1t","shag","shagger","shaggin","shagging","shemale","shi+","shit","shitdick","shite","shited","shitey","shitfuck","shitfull","shithead","shiting","shitings","shits","shitted","shitter","shitters","shitting","shittings","shitty","skank","slut","sluts","smegma","smut","snatch","son-of-a-bitch","spac","spunk","s_h_i_t","t1tt1e5","t1tties","teets","teez","testical","testicle","tit","titfuck","tits","titt","tittie5","tittiefucker","titties","tittyfuck","tittywank","titwank","tosser","turd","tw4t","twat","twathead","twatty","twunt","twunter","v14gra","v1gra","vagina","viagra","vulva","w00se","wang","wank","wanker","wanky","whoar","whore","willies","willy","xrated","xxx"],one=/\b(4r5e|5h1t|5hit|a55|anal|anus|ar5e|arrse|arse|ass|ass-fucker|asses|assfucker|assfukka|asshole|assholes|asswhole|a_s_s|b!tch|b00bs|b17ch|b1tch|ballbag|balls|ballsack|bastard|beastial|beastiality|bellend|bestial|bestiality|bi\+ch|biatch|bitch|bitcher|bitchers|bitches|bitchin|bitching|bloody|blow job|blowjob|blowjobs|boiolas|bollock|bollok|boner|boob|boobs|booobs|boooobs|booooobs|booooooobs|breasts|buceta|bugger|bum|bunny fucker|butt|butthole|buttmuch|buttplug|c0ck|c0cksucker|carpet muncher|cawk|chink|cipa|cl1t|clit|clitoris|clits|cnut|cock|cock-sucker|cockface|cockhead|cockmunch|cockmuncher|cocks|cocksuck|cocksucked|cocksucker|cocksucking|cocksucks|cocksuka|cocksukka|cok|cokmuncher|coksucka|coon|cox|crap|cum|cummer|cumming|cums|cumshot|cunilingus|cunillingus|cunnilingus|cunt|cuntlick|cuntlicker|cuntlicking|cunts|cyalis|cyberfuc|cyberfuck|cyberfucked|cyberfucker|cyberfuckers|cyberfucking|d1ck|damn|dick|dickhead|dildo|dildos|dink|dinks|dirsa|dlck|dog-fucker|doggin|dogging|donkeyribber|doosh|duche|dyke|ejaculate|ejaculated|ejaculates|ejaculating|ejaculatings|ejaculation|ejakulate|f u c k|f u c k e r|f4nny|fag|fagging|faggitt|faggot|faggs|fagot|fagots|fags|fanny|fannyflaps|fannyfucker|fanyy|fatass|fcuk|fcuker|fcuking|feck|fecker|felching|fellate|fellatio|fingerfuck|fingerfucked|fingerfucker|fingerfuckers|fingerfucking|fingerfucks|fistfuck|fistfucked|fistfucker|fistfuckers|fistfucking|fistfuckings|fistfucks|flange|fook|fooker|fuck|fucka|fucked|fucker|fuckers|fuckhead|fuckheads|fuckin|fucking|fuckings|fuckingshitmotherfucker|fuckme|fucks|fuckwhit|fuckwit|fudge packer|fudgepacker|fuk|fuker|fukker|fukkin|fuks|fukwhit|fukwit|fux|fux0r|f_u_c_k|gangbang|gangbanged|gangbangs|gaylord|gaysex|goatse|God|god-dam|god-damned|goddamn|goddamned|hardcoresex|hell|heshe|hoar|hoare|hoer|homo|hore|horniest|horny|hotsex|jack-off|jackoff|jap|jerk-off|jism|jiz|jizm|jizz|kawk|knob|knobead|knobed|knobend|knobhead|knobjocky|knobjokey|kock|kondum|kondums|kum|kummer|kumming|kums|kunilingus|l3i\+ch|l3itch|labia|lust|lusting|m0f0|m0fo|m45terbate|ma5terb8|ma5terbate|masochist|master-bate|masterb8|masterbat*|masterbat3|masterbate|masterbation|masterbations|masturbate|mo-fo|mof0|mofo|mothafuck|mothafucka|mothafuckas|mothafuckaz|mothafucked|mothafucker|mothafuckers|mothafuckin|mothafucking|mothafuckings|mothafucks|mother fucker|motherfuck|motherfucked|motherfucker|motherfuckers|motherfuckin|motherfucking|motherfuckings|motherfuckka|motherfucks|muff|mutha|muthafecker|muthafuckker|muther|mutherfucker|n1gga|n1gger|nazi|nigg3r|nigg4h|nigga|niggah|niggas|niggaz|nigger|niggers|nob|nob jokey|nobhead|nobjocky|nobjokey|numbnuts|nutsack|orgasim|orgasims|orgasm|orgasms|p0rn|pawn|pecker|penis|penisfucker|phonesex|phuck|phuk|phuked|phuking|phukked|phukking|phuks|phuq|pigfucker|pimpis|piss|pissed|pisser|pissers|pisses|pissflaps|pissin|pissing|pissoff|poop|porn|porno|pornography|pornos|prick|pricks|pron|pube|pusse|pussi|pussies|pussy|pussys|rectum|retard|rimjaw|rimming|s hit|s.o.b.|sadist|schlong|screwing|scroat|scrote|scrotum|semen|sex|sh!\+|sh!t|sh1t|shag|shagger|shaggin|shagging|shemale|shi\+|shit|shitdick|shite|shited|shitey|shitfuck|shitfull|shithead|shiting|shitings|shits|shitted|shitter|shitters|shitting|shittings|shitty|skank|slut|sluts|smegma|smut|snatch|son-of-a-bitch|spac|spunk|s_h_i_t|t1tt1e5|t1tties|teets|teez|testical|testicle|tit|titfuck|tits|titt|tittie5|tittiefucker|titties|tittyfuck|tittywank|titwank|tosser|turd|tw4t|twat|twathead|twatty|twunt|twunter|v14gra|v1gra|vagina|viagra|vulva|w00se|wang|wank|wanker|wanky|whoar|whore|willies|willy|xrated|xxx)\b/gi,sne={object:rne,array:ine,regex:one};const ane=nne.words,lne=sne.array;class cne{constructor(e={}){Object.assign(this,{list:e.emptyList&&[]||Array.prototype.concat.apply(ane,[lne,e.list||[]]),exclude:e.exclude||[],splitRegex:e.splitRegex||/\b/,placeHolder:e.placeHolder||"*",regex:e.regex||/[^a-zA-Z0-9|\$|\@]|\^/g,replaceRegex:e.replaceRegex||/\w/g})}isProfane(e){return this.list.filter(n=>{const r=new RegExp(`\\b${n.replace(/(\W)/g,"\\$1")}\\b`,"gi");return!this.exclude.includes(n.toLowerCase())&&r.test(e)}).length>0||!1}replaceWord(e){return e.replace(this.regex,"").replace(this.replaceRegex,this.placeHolder)}clean(e){return e.split(this.splitRegex).map(n=>this.isProfane(n)?this.replaceWord(n):n).join(this.splitRegex.exec(e)[0])}addWords(){let e=Array.from(arguments);this.list.push(...e),e.map(n=>n.toLowerCase()).forEach(n=>{this.exclude.includes(n)&&this.exclude.splice(this.exclude.indexOf(n),1)})}removeWords(){this.exclude.push(...Array.from(arguments).map(e=>e.toLowerCase()))}}var une=cne;const dne=_p(une),hne=({rank:t,name:e,score:n})=>F("div",{className:"flex w-80 h-20 gap-6 items-center justify-center px-7 m-auto rounded-xl border-[1.5px] border-primary",children:[F("p",{className:"text-3xl font-bold",children:["#",t]}),u("p",{className:"text-xl",children:e}),u("p",{className:"text-xl ml-auto",children:n})]});async function fne(t){await VQ(Pte);try{const e=Math.max(...t.gameData),n=e<=2024?e:0,r={...t,highestScore:n,submissionTime:new Date};return await kM(t.email),await ate(uM(Ib,"riserData",t.email),r),{score:n}}catch(e){throw console.error("Error adding document: ",e),new Error("Failed to set Riser game data")}}async function kM(t){const e=uM(Ib,"riserData",`${t}`);if((await ote(e)).exists())throw new Error("Email is has already been used");return!0}async function pne(){const t=Bee(Ib,"riserData"),e=[];try{const n=Zee(t,vS("highestScore","desc"),vS("submissionTime"),ete(20)),r=await ste(n);return r.empty!=!0&&(console.log(r),r.forEach(i=>{e.push({name:i.data().name,score:i.data().highestScore,id:i.id})})),console.log(e),e}catch(n){return console.log(n),[]}}const TM=()=>{const[t,e]=x.useState([]);return x.useEffect(()=>{pne().then(n=>{e(n)}),console.log(t)},[]),F("section",{children:[u("h2",{className:"text-4xl text-center font-bold mb-10",children:"Leaderboard"}),u("div",{className:"flex flex-col gap-6",children:t.length>0&&t.map((n,r)=>{const{name:i,score:o,id:s}=n;return u(hne,{rank:r+1,name:i,score:o},r)})})]})};function mne(t){const e=/\.(?=.*@)|\+.*(?=@)/g;return t.replace(e,"")}const gne=xd({palette:{primary:{main:"#F3B52A"},secondary:{main:"#5899F5"}}}),yne=oe(e0)({boxShadow:"none",color:"white",fontWeight:"bold",textTransform:"none",padding:"6px 12px",border:"2px solid",lineHeight:1.5,borderColor:"#5899F5",backgroundColor:"rgba(9, 31, 62, 0.5)","&:hover":{padding:"6px 12px",border:"2px solid",lineHeight:1.5,borderColor:"#5899F5",backgroundColor:"rgba(9, 31, 62, 0.5)"},"&:active":{padding:"6px 12px",border:"2px solid",lineHeight:1.5,borderColor:"#5899F5",backgroundColor:"rgba(9, 31, 62, 0.5)"},"&:focus":{padding:"6px 12px",border:"2px solid",lineHeight:1.5,borderColor:"#5899F5",backgroundColor:"rgba(9, 31, 62, 0.5)"}});function vne(){const t=jl(),e={title:"O-Week Riser",description:"Test your skill and luck at our riser game where you just need to hit the button at the right time. Win big prizes"},n=x.useRef(null),{scrollYProgress:r}=Zp({target:n,offset:["start start","end start"]}),i=Ur(r,[0,1],["0%","80%"]),o=Ur(r,[0,.6],["100%","0%"]),s=Ur(r,[0,.9],["1","0.9"]),[a,l]=x.useState(""),[c,h]=x.useState(""),[f,p]=x.useState(""),[g,w]=x.useState(""),[b,C]=x.useState(!1),T=y=>{y.preventDefault();const _={firstName:a,lastName:c,email:f},S=a+" "+c,N=new dne;if(Object.values(_).filter(D=>D.length>0).length<3)alert("Please fill in all required details");else if(N.isProfane(S)||N.isProfane(f))alert("Profanity detected, please delete any inappropriate text.");else if(!f.match(/\S+@\S+\.\S+/))alert("Invalid email, please enter a valid email.");else if(!g.match(/^\d{7}$/)&&g.length>0)alert("Invalid student ID, please recheck you have entered it correctly. If you don't have a studentID leave it blank");else{const D=mne(f),v={name:S,email:D,studentID:g===""?"0000000":g,HMMember:b};kM(v.email).then(()=>{t("/O-Week/playGame",{state:{...v}})}).catch(E=>{console.log(E),t("/O-Week"),alert("Error: Student ID is already been used. If this is a mistake please contact our staff")})}};return F("div",{className:"flex flex-col items-center justify-center gap-20 w-screen max-w-full",children:[u(rt.section,{ref:n,style:{y:i,opacity:o,scale:s},className:"",children:u(ci,{pageTitle:e.title,pageDescription:e.description})}),F("section",{className:"flex flex-col items-center px-16 gap-6",children:[u("h2",{className:"font-bold text-2xl text-yellow-500",children:"How to play"}),u(Nz,{fontSize:"large"}),u("p",{children:"The goal of the game is to get as close to 2024 without going over"}),u(Rz,{fontSize:"large"}),u("p",{children:"You will get 3 tries and your best score out of those three is submitted"}),u(Az,{fontSize:"large"}),u("p",{children:"Press the button to start and press it again to stop"}),u(Pz,{fontSize:"large"}),u("p",{children:"Note: The event prizes are over, but feel free to play our minigame :)"})]}),F("section",{className:"flex flex-col items-center px-16 gap-6",children:[u(fV,{size:"3em"}),u("h2",{className:"font-bold text-2xl text-yellow-500",children:"Rewards"}),u("s",{children:"First place : $20"}),u("s",{children:"Second place : $15"}),u("s",{children:"Third place : $15"}),u("s",{children:"Additional placements : Mystery Merch "})]}),F("form",{onSubmit:T,children:[u("h1",{className:"font-bold text-3xl flex justify-center mb-8",children:"Enter your details"}),u(yr,{children:u("div",{className:"border border-[#5899F5] bg-[#5899F5] bg-opacity-5 p-12 flex flex-col justify-center gap-10 rounded-md",children:F(Iw,{theme:gne,children:[u(Zn,{type:"text",value:a,onChange:y=>l(y.target.value),variant:"standard",color:"primary",label:"First Name*",InputLabelProps:{sx:{color:"white","&.Mui-focused":{color:"white"}}},sx:{input:{color:"white"}},focused:!0}),u(Zn,{type:"text",value:c,onChange:y=>h(y.target.value),variant:"standard",color:"primary",label:"Last Name*",InputLabelProps:{sx:{color:"white","&.Mui-focused":{color:"white"}}},sx:{input:{color:"white"}},focused:!0}),u(Zn,{type:"email",value:f,onChange:y=>p(y.target.value),variant:"standard",color:"primary",label:"Email*",InputLabelProps:{sx:{color:"white","&.Mui-focused":{color:"white"}}},sx:{input:{color:"white"}},focused:!0}),u(Zn,{type:"text",value:g,onChange:y=>w(y.target.value),variant:"standard",color:"primary",label:"Student ID",InputLabelProps:{sx:{color:"white","&.Mui-focused":{color:"white"}}},sx:{input:{color:"white"}},focused:!0}),u(gH,{control:u(fW,{checked:b,onChange:y=>C(y.target.checked),sx:{color:"white"}}),label:"HackMelbourne Member"}),u(yne,{type:"submit",variant:"outlined",color:"secondary",sx:{marginTop:"2em"},children:"Submit"})]})})})]}),u(TM,{})]})}const wne=()=>{const t=jl(),e=po().state;x.useEffect(()=>{window.scrollTo(0,0),e==null&&t("/O-Week")},[]);const n=3,r=2024,[i,o]=x.useState([]),s={name:e.name,email:e.email,studentID:e.studentID,HMMember:e.HMMember,gameData:i},[a,l]=x.useState(!1),[c,h]=x.useState(0),[f,p]=x.useState(0),[g,w]=x.useState("Start");x.useEffect(()=>{let S;return a===!0?S=setInterval(()=>{h(N=>N+1)},1):clearInterval(S),()=>{clearInterval(S)}},[a]);const b=()=>{h(0),l(!0),w("Stop")},C=()=>{if(l(!1),p(f+1),w("Start"),c>r)alert("Oops! You went over 2024! Your score is disqualified"),i.push(0);else{const S=i;S.push(c),o(S),console.log(i)}f==n-1&&(s.gameData=i,console.log(s),fne(s).then(S=>{console.log("posted",S);const N={...S};t("/O-Week/complete",{state:{...N}})}),w("Sending..."))},T=()=>{fS<=f?" bg-yellow-500":"bg-transparent",_=[];for(let S=1;S<=n;S++)_.push(u("div",{className:`border-4 border-yellow-500 rounded-full h-6 w-6 ${y(S)}`}));return F("div",{className:"mx-auto flex flex-col gap-8 items-center mt-32",children:[u("div",{className:"",children:"Get to 2024 without going over"}),u("div",{className:"font-bold text-8xl",children:c}),u("button",{onClick:T,className:"bg-yellow-500/10 border border-yellow-500 rounded-full w-48 h-48 flex content-center justify-center flex-wrap",children:u("div",{className:" font-bold text-4xl",children:g})}),F("div",{className:"flex flex-col gap-2 items-center",children:[u("div",{className:"flex flex-row gap-4",children:_}),u("p",{children:"Attempts"})]})]})},bne=()=>{const t=po().state,e=jl(),[n,r]=x.useState(0);return x.useEffect(()=>{console.log(t),t==null&&e("/O-Week"),r(t.score)},[]),F("div",{className:"w-screen flex flex-col items-center max-w-2xl pt-32 mx-auto px-8 gap-8",children:[F("div",{className:"flex flex-col text-center gap-2",children:[u("h1",{className:"text-8xl font-bold text-center",children:n}),u("p",{className:"text-xl font-semibold",children:"Your Highscore"})]}),F("div",{className:"flex flex-col items-center p-8 px-8 bg-blue-600/10 border border-blue-600 rounded-md max-w-sm gap-4",children:[u("h3",{className:"text-xl font-semibold text-center",children:"Submitted!"}),u("p",{className:"text-center",children:"Thanks for playing our game! If you are interested in HM and what we do, you can join our club for free with the link below!"}),u(oi,{link:I1,text:"Join HM",color:"primary",span:!0}),u(oi,{link:"/O-Week",text:"Back to start",color:"neutral",style:"underline"})]}),u(TM,{})]})},_ne=({title:t,selections:e,sendValueChange:n})=>{const[r,i]=x.useState([!1,!1]),o=(s,a,l)=>{const c=[];c[l]=!c[l],i(c),n(s,a)};return F("div",{className:"flex flex-col mx-auto",children:[u("p",{className:"text-xl font-bold text-center",children:t}),e.map((s,a)=>u("div",{className:"mx-auto",children:u(rt.button,{onClick:()=>o({value1:s.value1Weight,value2:s.value2Weight,value3:s.value3Weight},s.question,a),style:{backgroundColor:r[a]?"#a0cde0":"#de0f0d",color:"#ffffff"},whileHover:{scale:1.1},whileTap:{scale:.9},children:s.title})}))]})},xne=()=>{const t=jl(),[e,n]=x.useState(!1),[r,i]=x.useState({}),[o,s]=x.useState({value1:0,value2:0,value3:0}),a=()=>{n(!0)},l=(p,g)=>{i({...r,[g]:p})},c=()=>{if(Object.keys(r).length==f*3){let p=0,g=0,w=0;Object.values(r).forEach(({value1:C,value2:T,value3:y})=>{p+=C,g+=T,w+=y});const b={value1:p,value2:g,value3:w};s(b),t("/Hackiethon/quiz/results",{state:{context:b,numCategory:f}})}else alert("Please answer all the questions!")},h=[{title:"How do you react when you disagree with someone?",selections:[{title:"Tell them your opinion",value1Weight:1,value2Weight:0,value3Weight:0,question:1},{title:"Keep it to yourself",value1Weight:-1,value2Weight:0,value3Weight:0,question:1}]},{title:"How do you like to tackle hard problems?",selections:[{title:"Jump into it and figure it out as you go",value1Weight:0,value2Weight:0,value3Weight:1,question:2},{title:"Consider all possibilities before starting",value1Weight:0,value2Weight:0,value3Weight:-1,question:2}]},{title:"What kind of learner are you?",selections:[{title:"Pick things up easily",value1Weight:0,value2Weight:1,value3Weight:0,question:3},{title:"Takes you a while to get started",value1Weight:0,value2Weight:-1,value3Weight:0,question:3}]},{title:"How do you react when you disagree with someone?",selections:[{title:"Tell them your opinion",value1Weight:1,value2Weight:0,value3Weight:0,question:4},{title:"Keep it to yourself",value1Weight:-1,value2Weight:0,value3Weight:0,question:4}]},{title:"How do you like to tackle hard problems?",selections:[{title:"Jump into it and figure it out as you go",value1Weight:0,value2Weight:0,value3Weight:1,question:5},{title:"Consider all possibilities before starting",value1Weight:0,value2Weight:0,value3Weight:-1,question:5}]},{title:"What kind of learner are you?",selections:[{title:"Pick things up easily",value1Weight:0,value2Weight:1,value3Weight:0,question:6},{title:"Takes you a while to get started",value1Weight:0,value2Weight:-1,value3Weight:0,question:6}]},{title:"How do you react when you disagree with someone?",selections:[{title:"Tell them your opinion",value1Weight:1,value2Weight:0,value3Weight:0,question:7},{title:"Keep it to yourself",value1Weight:-1,value2Weight:0,value3Weight:0,question:7}]},{title:"How do you like to tackle hard problems?",selections:[{title:"Jump into it and figure it out as you go",value1Weight:0,value2Weight:0,value3Weight:1,question:8},{title:"Consider all possibilities before starting",value1Weight:0,value2Weight:0,value3Weight:-1,question:8}]},{title:"What kind of learner are you?",selections:[{title:"Pick things up easily",value1Weight:0,value2Weight:1,value3Weight:0,question:9},{title:"Takes you a while to get started",value1Weight:0,value2Weight:-1,value3Weight:0,question:9}]}],f=h.length/3;return u("div",{className:"w-screen max-w-full mx-auto mt-28",children:e?F("div",{className:"flex flex-col gap-4 items-center justify-center mt-6",children:[u("h2",{className:"text-3xl font-bold text-center",children:"Questions"}),h.map(p=>u(_ne,{...p,sendValueChange:l})),u("button",{onClick:c,children:u(ii,{link:"#",children:"Get results"})})]}):F(Zt,{children:[u("h1",{className:"text-4xl font-bold text-center w-11/12 mx-auto",children:"Cat Fighter Quiz"}),u("p",{className:"mt-4 text-lg font-medium text-center w-10/12 mx-auto",children:"Ever wondered what action hero you'd be if you were in a video game? Find out your fighter profile (cat version... because it's fun) through this quiz!"}),u("img",{src:"https://rufusandcoco.com.au/cdn/shop/articles/shutterstock_1942906447_4225x.jpg?v=1635211494"}),u("div",{className:"flex justify-center mt-4",children:u("button",{onClick:a,children:u(ii,{link:"#",children:"Play"})})})]})})},kne=()=>{const t=po(),{context:e,numCategory:n}=t.state||{},r={ATR:{name:"RPG Shooter",desc:"Some description about the type of fighter they are and their personality it's definitely not some pseudosciency result",img:"",alt:"a cat"},AHR:{name:"Machine Gunner",desc:"dec",img:"",alt:"a cat"},ATM:{name:"Rapier Asuna",desc:"dec",img:"",alt:"a cat"},AHM:{name:"Brawler",desc:"dec",img:"",alt:"a cat"},PTR:{name:"Sniper",desc:"dec",img:"",alt:"a cat"},PTM:{name:"Assassin",desc:"dec",img:"",alt:"a cat"},PHM:{name:"Shielder",desc:"dec",img:"",alt:"a cat"},PHR:{name:"Necromancer",desc:"dec",img:"",alt:"a cat"}};let i="",o=0,s=0,a=0,l=0,c=0,h=0;e.value1>0?(i+="A",o=e.value1/n,s=1-o):e.value1<0&&(i+="P",s=Math.abs(e.value1)/n,o=1-s),e.value2>0?(i+="T",a=e.value2/n,l=1-a):e.value2<0&&(i+="H",l=Math.abs(e.value2)/n,a=1-l),e.value3>0?(i+="M",c=e.value3/n,h=1-c):e.value3<0&&(i+="R",h=Math.abs(e.value3)/n,c=1-h),console.log(e.value1),console.log(e.value2),console.log(e.value3),console.log(n);const f=r[i];if(!f)return F("div",{className:"flex flex-col items-center justify-center mt-28",children:[u("p",{className:"text-center",children:"Not enough info. Take the quiz again!"}),u(oi,{text:"Take quiz again",color:"primary",link:"/Hackiethon/quiz"})]});const p=[{trait:"Aggressive vs Passive",left_width:(o*100).toFixed(0),right_width:(s*100).toFixed(0)},{trait:"Talented vs Hard-working",left_width:(a*100).toFixed(0),right_width:(l*100).toFixed(0)},{trait:"Melee vs Range",left_width:(c*100).toFixed(0),right_width:(h*100).toFixed(0)}],g=(w,b)=>{if(w=="100")return"10px";if(b=="left")return"10px 0 0 10px";if(b=="right")return"0 10px 10px 0"};return F("div",{className:"flex flex-col items-center justify-center gap-4 mt-28",children:[u("p",{className:"text-xl font-medium text-center w-11/12 mx-auto",children:"You are a..."}),u("h1",{className:"text-4xl font-bold text-center w-11/12 mx-auto",children:f.name}),u("img",{src:f.img,alt:f.alt,className:"h-20"}),u("p",{className:"text-center",children:f.desc}),u("h2",{className:"text-2xl font-bold text-center",children:"Statistics"}),p.map(w=>F(Zt,{children:[u("h3",{className:"text-lg font-medium text-center",children:"hi"}),F("div",{className:"flex",children:[F("p",{children:[w.left_width,"%"]}),F("div",{className:"relative w-28 h-6 border border-white rounded-xl ",children:[u("div",{className:"h-full bg-red-300 absolute top-0 left-0 ",style:{width:`${w.left_width}%`,borderRadius:g(w.left_width,"left")}}),u("div",{className:"h-full bg-blue-300 absolute top-0 right-0 ",style:{width:`${w.right_width}%`,borderRadius:g(w.right_width,"right")}})]}),F("p",{children:[w.right_width,"%"]})]})]})),F("div",{className:"flex gap-2",children:[u(ii,{link:"#",children:u(oi,{text:"Take quiz again",color:"primary",link:"/Hackiethon/quiz"})}),u(oi,{text:"Back to home",color:"primary",link:"/"})]})]})},Tne="/assets/python-18f44ed6.png",Ene="/assets/git_tutorial_cover-a8c70fd5.png",Sne="/assets/git_arc-875e8be9.png";function SS(t){const e={a:"a",br:"br",code:"code",em:"em",h5:"h5",h6:"h6",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...t.components};return F(Zt,{children:[u(e.p,{children:u(e.em,{children:"Please note that this assumes you have python and a code editor (Eg. vscode downloaded), and a github account."})}),` `,u(e.h5,{children:u(e.strong,{children:"What are Version Control Systems?"})}),` `,u(e.p,{children:"Before we talk about Git, we need to talk about Version Control Systems (VCS)."}),` `,u(e.p,{children:"They enable developers to work on the same project, experiment with new ideas, and easily revert to previous versions."}),` `,u(e.p,{children:"They are much more efficient than just sending code back and forth between developers."}),` `,u(e.h5,{children:u(e.strong,{children:"Centralized vs Distributed"})}),` `,F(e.p,{children:["There are two main types of VCS, centralized and distributed. ",u("br",{}),u("br",{})]}),` `,F(Qn,{container:!0,spacing:2,className:"mt-4",children:[u(Qn,{item:!0,xs:12,sm:6,children:F(mr,{className:"p-4",style:{backgroundColor:"#000",color:"#fff"},children:[u(ie,{variant:"h6",children:"Centralized VCS"}),u(ie,{children:"1. There's a single, central server that stores all versions of files."}),u(ie,{children:"2. Developers must continuously sync their work with this central server."}),u(ie,{children:"3. If the central server goes down, then no one will be able to work on the project."})]})}),u(Qn,{item:!0,xs:12,sm:6,children:F(mr,{className:"p-4",style:{backgroundColor:"#000",color:"#fff"},children:[u(ie,{variant:"h6",children:"Distributed VCS"}),u(ie,{children:"1. Each developer has their own local repository, containing the complete project history."}),u(ie,{children:"2. Developers can work independently and commit changes locally without affecting the main repository."}),u(ie,{children:"3. They can then sync their changes manually with other repositories as needed."})]})})]}),` `,u("br",{}),` `,F(e.h5,{children:[u(e.strong,{children:"Why is Git important?"})," ",u("br",{})]}),` `,u(e.p,{children:"Git is a distributed VCS, and its a massively popular tool for managing projects among individuals and teams."}),` `,u(e.p,{children:"Knowing how to use Git is an extremely important skill for any developer - and it will look great on your resume!"}),` `,u(e.h5,{children:u(e.strong,{children:"Downloading Git"})}),` `,F(e.p,{children:["First you will need to download Git onto your computer... You can do so through this ",u(e.a,{href:"https://git-scm.com/downloads",children:"Git Download Link"})]}),` `,u(e.p,{children:"After installing it, start your terminal and type the following command to verify that Git is installed on your computer."}),` `,u(e.pre,{children:u(e.code,{className:"language-bash",children:`git --version `})}),` `,u(e.p,{children:"If everything went well, it should return the Git version that is installed on your computer."}),` `,u(e.h5,{children:u(e.strong,{children:"Configuring Git"})}),` `,u(e.p,{children:"After installing Git onto your computer, you will need to configure it with your name and email address"}),` `,u(e.pre,{children:u(e.code,{className:"language-bash",children:`git config --global user.name "Your Name" git config --global user.email "your_email@example.com" `})}),` `,u(e.p,{children:"This information is included in the commit metadata and helps identify who made a particular change in your project."}),` `,u(e.p,{children:"(Note this is done globally, so it will apply to all your repositories)"}),` `,u(e.p,{children:"If you want to change your name within a repository (so they wont affect any other ones),"}),` `,u(e.p,{children:"You can use the following commands to set them, unset it, and also reconfigure them:"}),` `,u(e.pre,{children:u(e.code,{className:"language-bash",children:`git config git config --unset git config --unset-all `})}),` `,u(e.p,{children:F(e.em,{children:["Where key is ",u(e.strong,{children:"user.name"})," or ",u(e.strong,{children:"user.email"}),"."]})}),` `,u(e.p,{children:"Note that --unset all is an option if you have multiple configurations."}),` `,u(e.p,{children:"If you want to unset your global configurations, you can use the following:"}),` `,u(e.pre,{children:u(e.code,{className:"language-bash",children:`git config --global --unset `})}),` `,u(e.h5,{children:u(e.strong,{children:"Initializing a Git Repository"})}),` `,u(e.p,{children:"To start version controlling your project, navigate to your project's working directory (folder) using the terminal and run:"}),` `,u(e.pre,{children:u(e.code,{className:"language-bash",children:`git init `})}),` `,u(e.p,{children:"This creates a new Git repository in your project directory."}),` `,u(e.p,{children:"Make sure you are in the directory (folder) that you are planning to work in for the whole project."}),` `,u(e.h5,{children:u(e.strong,{children:"Adding files to your Repository"})}),` `,u(e.p,{children:"To add files to the staging area (the area where changes to files are prepared before they are committed), you can use:"}),` `,u(e.pre,{children:u(e.code,{className:"language-bash",children:`git add filename `})}),` `,u(e.p,{children:"Or if you want to add all of them at once, you can use:"}),` `,u(e.pre,{children:u(e.code,{className:"language-bash",children:`git add . `})}),` `,u(e.h5,{children:u(e.strong,{children:"Committing a change to the repository"})}),` `,u(e.p,{children:`Once you have added the files, you need to commit them to "save them',`}),` `,u(e.pre,{children:u(e.code,{className:"language-bash",children:`git commit -m "Your commit message here" `})}),` `,u(e.p,{children:"Your message should be a brief description of the changes you have made to the project since the last commit."}),` `,u(e.h5,{children:u(e.strong,{children:"Differences between Adding files and Committing changes"})}),` `,u(e.p,{children:"When you are working on projects, there are three main areas that changes go through."}),` `,F(e.p,{children:["There is the ",u(e.strong,{children:"Working Directory"})," (where you are actually coding),"]}),` `,F(e.p,{children:["The ",u(e.strong,{children:"Staging Area"})," (where you prepare your changes in the next commit),"]}),` `,F(e.p,{children:["And the ",u(e.strong,{children:"Git Repository"})," (where you save your changes locally)."]}),` `,u(e.h6,{children:u(e.strong,{children:"Working Directory to Staging Area:"})}),` `,F(e.p,{children:["Use ",u(e.strong,{children:u(e.code,{children:"git add"})})," to move changes from your working directory to the staging area."]}),` `,u(e.p,{children:u(e.em,{children:"(Where you prepare what you want to include in the next commit)"})}),` `,u(e.h6,{children:u(e.strong,{children:"Staging Area to Git Repository:"})}),` `,u(e.p,{children:"Once you've finalized your changes in the staging area,"}),` `,F(e.p,{children:["Use ",u(e.strong,{children:u(e.code,{children:"git commit"})})," to save those changes as a commit in the Git repository."]}),` `,u(e.p,{children:"This will create a snapshot of your work in the Git log which you can go back to if you ever want to."}),` `,u(e.p,{children:"Please see the diagram below:"}),` `,u("img",{src:Sne,alt:"Git Tutorial Cover",style:{width:"100%",height:"auto"}}),` `,u(e.h5,{children:u(e.strong,{children:"Branches"})}),` `,u(e.p,{children:"Branches in Git allow you to work on different features or bug fixes without affecting the main code-base."}),` `,u(e.p,{children:"To create a new branch, you can use:"}),` `,u(e.pre,{children:u(e.code,{className:"language-bash",children:`git branch new_branchname `})}),` `,u(e.p,{children:u(e.em,{children:"Great, you have created a new branch,"})}),` `,u(e.p,{children:u(e.em,{children:"However you need to switch to that branch before you make any changes... to do so, use:"})}),` `,u(e.pre,{children:u(e.code,{className:"language-bash",children:`git checkout new_branchname `})}),` `,u(e.p,{children:"Now you can start experimenting with your code without affecting your main code-base :"}),` `,u(e.h5,{children:u(e.strong,{children:"Cloning a repository"})}),` `,u(e.p,{children:"Cloning creates a local copy of a remote repository on your machine."}),` `,u(e.p,{children:"This allows you to work on the project, make changes (without affecting the remote repository)."}),` `,u(e.p,{children:"Before you get started, ensure that you are in the working directory that you want to clone the online repository to."}),` `,u(e.p,{children:"To get the repository_url:"}),` `,F(e.p,{children:["1. Navigate to the repository you want to clone",u("br",{}),u("br",{}),` 2. Click the code button...`,u("br",{}),u("br",{}),` 3. Copy the URL for the repository.`]}),` `,u(e.p,{children:"And then you have it, now to clone a repository you can use:"}),` `,u(e.pre,{children:u(e.code,{className:"language-bash",children:`git clone repository_url `})}),` `,u(e.h5,{children:u(e.strong,{children:"Forking a Repository"})}),` `,u(e.p,{children:"Forking involves creating a copy of a repository on your GitHub account."}),` `,u(e.p,{children:"Note this is different to cloning as the copy is on your GitHub account rather than your local repository."}),` `,u(e.p,{children:"This allows you to freely experiment with changes without affecting the original repository."}),` `,u(e.p,{children:"Here's how you can fork a repository:"}),` `,F(e.ol,{children:[` `,F(e.li,{children:[` `,F(e.p,{children:[u(e.strong,{children:"Visit the Repository:"}),u(e.br,{}),` `,"Go to the repository you want to fork on GitHub."]}),` `]}),` `,F(e.li,{children:[` `,F(e.p,{children:[u(e.strong,{children:"Fork:"}),u(e.br,{}),` `,'Click on the "Fork" button at the top right corner of the repository page.']}),` `,u(e.p,{children:u(e.em,{children:"Great! You have forked the repository (made a copy) onto your account. Now you need to clone it so you can make changes locally. To do so:"})}),` `,F(e.ol,{children:[` `,F(e.li,{children:[` `,F(e.p,{children:[u(e.strong,{children:"Navigate to the Forked Repository:"}),u(e.br,{}),` `,"Go to the forked repository on your GitHub account."]}),` `]}),` `,F(e.li,{children:[` `,F(e.p,{children:[u(e.strong,{children:'Click the "Code" Button:'}),u(e.br,{}),` `,'Click the green "Code" button located above the list of files.']}),` `]}),` `,F(e.li,{children:[` `,F(e.p,{children:[u(e.strong,{children:"Copy the Repository URL:"}),u(e.br,{}),` `,`In the dropdown, ensure you're on the "HTTPS" tab and click the clipboard icon to copy the URL.`]}),` `]}),` `,F(e.li,{children:[` `,F(e.p,{children:[u(e.strong,{children:"Clone the Repository Locally:"}),u(e.br,{}),` `,"Open your terminal and type ",u(e.code,{children:"git clone"}),", then paste the URL you copied earlier. It will look like this, with your GitHub username instead of ",u(e.code,{children:"YOUR-USERNAME"})]}),` `]}),` `]}),` `]}),` `]}),` `,u(e.pre,{children:u(e.code,{className:"language-bash",children:`git clone https://github.com/YOUR-USERNAME/repository_name `})}),` `,u(e.h5,{children:u(e.strong,{children:"Pushing changes to a Remote repository"})}),` `,u(e.p,{children:"So far you have been working locally and haven't made your changes accessible to others."}),` `,u(e.p,{children:"To make your changes available, you need to push them to a remote repository."}),` `,u(e.p,{children:"Note you will have to get the link of the repository you want to push the changes to before you do this."}),` `,u(e.p,{children:"To push your changes, use:"}),` `,u(e.pre,{children:u(e.code,{className:"language-bash",children:`git remote add origin remote_repository_url `})}),` `,u(e.p,{children:"And then, do:"}),` `,u(e.pre,{children:u(e.code,{className:"language-bash",children:`git push -u origin branchname `})}),` `,u(e.p,{children:"Where branchname is the branch you want to push to and origin is the name of remote repository name."}),` `,u(e.h5,{children:u(e.strong,{children:"Checking Status / logs in Git"})}),` `,u(e.p,{children:"Git has a command to check the status of your files, you can do so with the following:"}),` `,u(e.pre,{children:u(e.code,{className:"language-bash",children:`git status `})}),` `,F(e.p,{children:["This will show you which files are modified, which files are staged for commit, and which files are untracked.",u("br",{}),u("br",{})]}),` `,u(e.p,{children:"If you want to check the a list of the commits that have been used, you can use:"}),` `,u(e.pre,{children:u(e.code,{className:"language-bash",children:`git log `})}),` `,F(e.p,{children:[`For additional resources, please head to the Github (docs) website. `,u(e.a,{href:"https://docs.github.com/en",children:"Github docs link"})]}),` `,F(e.p,{children:["References: Github (docs) website ",u(e.a,{href:"https://docs.github.com/en",children:"Github docs link"})]})]})}function Cne(t={}){const{wrapper:e}=t.components||{};return e?u(e,{...t,children:u(SS,{...t})}):SS(t)}function CS(t){const e={a:"a",blockquote:"blockquote",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...t.components};return F(Zt,{children:[u(e.h1,{children:"Overview"}),` `,u(e.p,{children:"This template demonstrates how to use Material-UI (MUI) components with Tailwind CSS in an MDX file. It covers various elements including headers, text styling, links, images, lists, blockquotes, code blocks, and tables. Additionally, it showcases how to incorporate MUI components like alerts, buttons, cards, and more, all styled with Tailwind CSS classes for additional customization."}),` `,u(e.h2,{children:"Markdown Components"}),` `,F(e.ul,{children:[` `,F(e.li,{children:[u(e.strong,{children:"Headers"})," (e.g., ",u(e.code,{children:"# Header 1"}),", ",u(e.code,{children:"## Header 2"}),")"]}),` `,F(e.li,{children:[u(e.strong,{children:"Text Styling"})," (e.g., ",u(e.strong,{children:"bold"}),", ",u(e.em,{children:"italic"}),", ",u("s",{children:"strikethrough"}),")"]}),` `,F(e.li,{children:[u(e.strong,{children:"Links"})," (e.g., ",u(e.a,{href:"https://example.com",children:"example"}),")"]}),` `,F(e.li,{children:[u(e.strong,{children:"Images"})," (e.g., ",u(e.code,{children:"![alt text](image-url)"}),")"]}),` `,F(e.li,{children:[u(e.strong,{children:"Lists"})," (ordered and unordered)"]}),` `,F(e.li,{children:[u(e.strong,{children:"Blockquotes"})," (e.g., ",u(e.code,{children:"> Quote"}),")"]}),` `,F(e.li,{children:[u(e.strong,{children:"Code Blocks"})," (e.g., ",u(e.code,{children:"code"}),")"]}),` `,F(e.li,{children:[u(e.strong,{children:"Tables"})," (e.g., ",u(e.code,{children:"| Header 1 | Header 2 |"}),")"]}),` `]}),` `,u(e.h2,{children:"Usage Examples with MUI Components"}),` `,u(e.h3,{children:"Headers"}),` `,u(e.h1,{children:"Welcome to My MDX Page"}),` `,u(e.h2,{children:"Text Styling"}),` `,F(e.p,{children:["This is an example of ",u(e.strong,{children:"bold"})," text, ",u(e.em,{children:"italic"})," text, and ",u("s",{children:"strikethrough"}),"."]}),` `,u(e.h3,{children:"Links"}),` `,u(e.p,{children:u(e.a,{href:"https://example.com",children:"Visit Example"})}),` `,u(e.h3,{children:"Images"}),` `,u(e.p,{children:u(e.img,{src:"https://via.placeholder.com/150",alt:"Example Image"})}),` `,u(e.h3,{children:"Lists"}),` `,u(e.h4,{children:"Unordered List"}),` `,F(e.ul,{children:[` `,u(e.li,{children:"Item 1"}),` `,u(e.li,{children:"Item 2"}),` `,u(e.li,{children:"Item 3"}),` `]}),` `,u(e.h4,{children:"Ordered List"}),` `,F(e.ol,{children:[` `,u(e.li,{children:"First item"}),` `,u(e.li,{children:"Second item"}),` `,u(e.li,{children:"Third item"}),` `]}),` `,u(e.h3,{children:"Blockquotes"}),` `,F(e.blockquote,{children:[` `,u(e.p,{children:"This is a blockquote example."}),` `]}),` `,u(e.h2,{children:"Code Blocks"}),` `,u(e.h3,{children:"Inline Code"}),` `,F(e.p,{children:["Use the ",u(e.code,{children:"