3 lines
430 KiB
JavaScript
3 lines
430 KiB
JavaScript
/*! For license information please see main.74991570.js.LICENSE.txt */
|
|
!function(){"use strict";var e={463:function(e,t,n){var r=n(791),i=n(296);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=new Set,u={};function s(e,t){l(e,t),l(e+"Capture",t)}function l(e,t){for(u[e]=t,e=0;e<t.length;e++)o.add(t[e])}var c=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),f=Object.prototype.hasOwnProperty,h=/^[: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]*$/,d={},p={};function v(e,t,n,r,i,a,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var y={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){y[e]=new v(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];y[t]=new v(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){y[e]=new v(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){y[e]=new v(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){y[e]=new v(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){y[e]=new v(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){y[e]=new v(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){y[e]=new v(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){y[e]=new v(e,5,!1,e.toLowerCase(),null,!1,!1)}));var m=/[\-:]([a-z])/g;function g(e){return e[1].toUpperCase()}function k(e,t,n,r){var i=y.hasOwnProperty(t)?y[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!f.call(p,e)||!f.call(d,e)&&(h.test(e)?p[e]=!0:(d[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(m,g);y[t]=new v(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(m,g);y[t]=new v(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(m,g);y[t]=new v(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){y[e]=new v(e,1,!1,e.toLowerCase(),null,!1,!1)})),y.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){y[e]=new v(e,1,!1,e.toLowerCase(),null,!0,!0)}));var b=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for("react.element"),E=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),_=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),L=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var O=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var R=Symbol.iterator;function P(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=R&&e[R]||e["@@iterator"])?e:null}var M,F=Object.assign;function V(e){if(void 0===M)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);M=t&&t[1]||""}return"\n"+M+e}var U=!1;function j(e,t){if(!e||U)return"";U=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(l){var r=l}Reflect.construct(e,[],t)}else{try{t.call()}catch(l){r=l}e.call(t.prototype)}else{try{throw Error()}catch(l){r=l}e()}}catch(l){if(l&&r&&"string"===typeof l.stack){for(var i=l.stack.split("\n"),a=r.stack.split("\n"),o=i.length-1,u=a.length-1;1<=o&&0<=u&&i[o]!==a[u];)u--;for(;1<=o&&0<=u;o--,u--)if(i[o]!==a[u]){if(1!==o||1!==u)do{if(o--,0>--u||i[o]!==a[u]){var s="\n"+i[o].replace(" at new "," at ");return e.displayName&&s.includes("<anonymous>")&&(s=s.replace("<anonymous>",e.displayName)),s}}while(1<=o&&0<=u);break}}}finally{U=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?V(e):""}function z(e){switch(e.tag){case 5:return V(e.type);case 16:return V("Lazy");case 13:return V("Suspense");case 19:return V("SuspenseList");case 0:case 2:case 15:return e=j(e.type,!1);case 11:return e=j(e.type.render,!1);case 1:return e=j(e.type,!0);default:return""}}function B(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case S:return"Fragment";case E:return"Portal";case T:return"Profiler";case x:return"StrictMode";case N:return"Suspense";case D:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case _:return(e.displayName||"Context")+".Consumer";case C:return(e._context.displayName||"Context")+".Provider";case I:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case A:return null!==(t=e.displayName||null)?t:B(e.type)||"Memo";case L:t=e._payload,e=e._init;try{return B(e(t))}catch(n){}}return null}function q(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return B(t);case 8:return t===x?"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("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t}return null}function H(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function K(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Q(e){e._valueTracker||(e._valueTracker=function(e){var t=K(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function W(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=K(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function G(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function $(e,t){var n=t.checked;return F({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function X(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=H(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Y(e,t){null!=(t=t.checked)&&k(e,"checked",t,!1)}function J(e,t){Y(e,t);var n=H(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,H(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Z(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&G(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+H(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return F({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ie(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(te(n)){if(1<n.length)throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:H(n)}}function ae(e,t){var n=H(t.value),r=H(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function oe(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function ue(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function se(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?ue(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var le,ce,fe=(ce=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((le=le||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=le.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ce(e,t)}))}:ce);function he(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var de={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},pe=["Webkit","ms","Moz","O"];function ve(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||de.hasOwnProperty(e)&&de[e]?(""+t).trim():t+"px"}function ye(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=ve(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(de).forEach((function(e){pe.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),de[t]=de[e]}))}));var me=F({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 ge(e,t){if(t){if(me[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(a(62))}}function ke(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var be=null;function we(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ee=null,Se=null,xe=null;function Te(e){if(e=ki(e)){if("function"!==typeof Ee)throw Error(a(280));var t=e.stateNode;t&&(t=wi(t),Ee(e.stateNode,e.type,t))}}function Ce(e){Se?xe?xe.push(e):xe=[e]:Se=e}function _e(){if(Se){var e=Se,t=xe;if(xe=Se=null,Te(e),t)for(e=0;e<t.length;e++)Te(t[e])}}function Ie(e,t){return e(t)}function Ne(){}var De=!1;function Ae(e,t,n){if(De)return e(t,n);De=!0;try{return Ie(e,t,n)}finally{De=!1,(null!==Se||null!==xe)&&(Ne(),_e())}}function Le(e,t){var n=e.stateNode;if(null===n)return null;var r=wi(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(a(231,t,typeof n));return n}var Oe=!1;if(c)try{var Re={};Object.defineProperty(Re,"passive",{get:function(){Oe=!0}}),window.addEventListener("test",Re,Re),window.removeEventListener("test",Re,Re)}catch(ce){Oe=!1}function Pe(e,t,n,r,i,a,o,u,s){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(c){this.onError(c)}}var Me=!1,Fe=null,Ve=!1,Ue=null,je={onError:function(e){Me=!0,Fe=e}};function ze(e,t,n,r,i,a,o,u,s){Me=!1,Fe=null,Pe.apply(je,arguments)}function Be(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function qe(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function He(e){if(Be(e)!==e)throw Error(a(188))}function Ke(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Be(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return He(i),e;if(o===r)return He(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var u=!1,s=i.child;s;){if(s===n){u=!0,n=i,r=o;break}if(s===r){u=!0,r=i,n=o;break}s=s.sibling}if(!u){for(s=o.child;s;){if(s===n){u=!0,n=o,r=i;break}if(s===r){u=!0,r=o,n=i;break}s=s.sibling}if(!u)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e))?Qe(e):null}function Qe(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Qe(e);if(null!==t)return t;e=e.sibling}return null}var We=i.unstable_scheduleCallback,Ge=i.unstable_cancelCallback,$e=i.unstable_shouldYield,Xe=i.unstable_requestPaint,Ye=i.unstable_now,Je=i.unstable_getCurrentPriorityLevel,Ze=i.unstable_ImmediatePriority,et=i.unstable_UserBlockingPriority,tt=i.unstable_NormalPriority,nt=i.unstable_LowPriority,rt=i.unstable_IdlePriority,it=null,at=null;var ot=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(ut(e)/st|0)|0},ut=Math.log,st=Math.LN2;var lt=64,ct=4194304;function ft(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ht(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=268435455&n;if(0!==o){var u=o&~i;0!==u?r=ft(u):0!==(a&=o)&&(r=ft(a))}else 0!==(o=n&~i)?r=ft(o):0!==a&&(r=ft(a));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&i)&&((i=r&-r)>=(a=t&-t)||16===i&&0!==(4194240&a)))return t;if(0!==(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-ot(t)),r|=e[n],t&=~i;return r}function dt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function pt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function vt(){var e=lt;return 0===(4194240&(lt<<=1))&&(lt=64),e}function yt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function mt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-ot(t)]=n}function gt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ot(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var kt=0;function bt(e){return 1<(e&=-e)?4<e?0!==(268435455&e)?16:536870912:4:1}var wt,Et,St,xt,Tt,Ct=!1,_t=[],It=null,Nt=null,Dt=null,At=new Map,Lt=new Map,Ot=[],Rt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Pt(e,t){switch(e){case"focusin":case"focusout":It=null;break;case"dragenter":case"dragleave":Nt=null;break;case"mouseover":case"mouseout":Dt=null;break;case"pointerover":case"pointerout":At.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Lt.delete(t.pointerId)}}function Mt(e,t,n,r,i,a){return null===e||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},null!==t&&(null!==(t=ki(t))&&Et(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function Ft(e){var t=gi(e.target);if(null!==t){var n=Be(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=qe(n)))return e.blockedOn=t,void Tt(e.priority,(function(){St(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Vt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=$t(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=ki(n))&&Et(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);be=r,n.target.dispatchEvent(r),be=null,t.shift()}return!0}function Ut(e,t,n){Vt(e)&&n.delete(t)}function jt(){Ct=!1,null!==It&&Vt(It)&&(It=null),null!==Nt&&Vt(Nt)&&(Nt=null),null!==Dt&&Vt(Dt)&&(Dt=null),At.forEach(Ut),Lt.forEach(Ut)}function zt(e,t){e.blockedOn===t&&(e.blockedOn=null,Ct||(Ct=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,jt)))}function Bt(e){function t(t){return zt(t,e)}if(0<_t.length){zt(_t[0],e);for(var n=1;n<_t.length;n++){var r=_t[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==It&&zt(It,e),null!==Nt&&zt(Nt,e),null!==Dt&&zt(Dt,e),At.forEach(t),Lt.forEach(t),n=0;n<Ot.length;n++)(r=Ot[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Ot.length&&null===(n=Ot[0]).blockedOn;)Ft(n),null===n.blockedOn&&Ot.shift()}var qt=b.ReactCurrentBatchConfig,Ht=!0;function Kt(e,t,n,r){var i=kt,a=qt.transition;qt.transition=null;try{kt=1,Wt(e,t,n,r)}finally{kt=i,qt.transition=a}}function Qt(e,t,n,r){var i=kt,a=qt.transition;qt.transition=null;try{kt=4,Wt(e,t,n,r)}finally{kt=i,qt.transition=a}}function Wt(e,t,n,r){if(Ht){var i=$t(e,t,n,r);if(null===i)Hr(e,t,r,Gt,n),Pt(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return It=Mt(It,e,t,n,r,i),!0;case"dragenter":return Nt=Mt(Nt,e,t,n,r,i),!0;case"mouseover":return Dt=Mt(Dt,e,t,n,r,i),!0;case"pointerover":var a=i.pointerId;return At.set(a,Mt(At.get(a)||null,e,t,n,r,i)),!0;case"gotpointercapture":return a=i.pointerId,Lt.set(a,Mt(Lt.get(a)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(Pt(e,r),4&t&&-1<Rt.indexOf(e)){for(;null!==i;){var a=ki(i);if(null!==a&&wt(a),null===(a=$t(e,t,n,r))&&Hr(e,t,r,Gt,n),a===i)break;i=a}null!==i&&r.stopPropagation()}else Hr(e,t,r,null,n)}}var Gt=null;function $t(e,t,n,r){if(Gt=null,null!==(e=gi(e=we(r))))if(null===(t=Be(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=qe(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Gt=e,null}function Xt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Je()){case Ze:return 1;case et:return 4;case tt:case nt:return 16;case rt:return 536870912;default:return 16}default:return 16}}var Yt=null,Jt=null,Zt=null;function en(){if(Zt)return Zt;var e,t,n=Jt,r=n.length,i="value"in Yt?Yt.value:Yt.textContent,a=i.length;for(e=0;e<r&&n[e]===i[e];e++);var o=r-e;for(t=1;t<=o&&n[r-t]===i[a-t];t++);return Zt=i.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function rn(){return!1}function an(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return F(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var on,un,sn,ln={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cn=an(ln),fn=F({},ln,{view:0,detail:0}),hn=an(fn),dn=F({},fn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Tn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==sn&&(sn&&"mousemove"===e.type?(on=e.screenX-sn.screenX,un=e.screenY-sn.screenY):un=on=0,sn=e),on)},movementY:function(e){return"movementY"in e?e.movementY:un}}),pn=an(dn),vn=an(F({},dn,{dataTransfer:0})),yn=an(F({},fn,{relatedTarget:0})),mn=an(F({},ln,{animationName:0,elapsedTime:0,pseudoElement:0})),gn=F({},ln,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),kn=an(gn),bn=an(F({},ln,{data:0})),wn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},En={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Sn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Sn[e])&&!!t[e]}function Tn(){return xn}var Cn=F({},fn,{key:function(e){if(e.key){var t=wn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?En[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Tn,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),_n=an(Cn),In=an(F({},dn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Nn=an(F({},fn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Tn})),Dn=an(F({},ln,{propertyName:0,elapsedTime:0,pseudoElement:0})),An=F({},dn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Ln=an(An),On=[9,13,27,32],Rn=c&&"CompositionEvent"in window,Pn=null;c&&"documentMode"in document&&(Pn=document.documentMode);var Mn=c&&"TextEvent"in window&&!Pn,Fn=c&&(!Rn||Pn&&8<Pn&&11>=Pn),Vn=String.fromCharCode(32),Un=!1;function jn(e,t){switch(e){case"keyup":return-1!==On.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Bn=!1;var qn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Hn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!qn[e.type]:"textarea"===t}function Kn(e,t,n,r){Ce(r),0<(t=Qr(t,"onChange")).length&&(n=new cn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Qn=null,Wn=null;function Gn(e){Vr(e,0)}function $n(e){if(W(bi(e)))return e}function Xn(e,t){if("change"===e)return t}var Yn=!1;if(c){var Jn;if(c){var Zn="oninput"in document;if(!Zn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Zn="function"===typeof er.oninput}Jn=Zn}else Jn=!1;Yn=Jn&&(!document.documentMode||9<document.documentMode)}function tr(){Qn&&(Qn.detachEvent("onpropertychange",nr),Wn=Qn=null)}function nr(e){if("value"===e.propertyName&&$n(Wn)){var t=[];Kn(t,Wn,e,we(e)),Ae(Gn,t)}}function rr(e,t,n){"focusin"===e?(tr(),Wn=n,(Qn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function ir(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return $n(Wn)}function ar(e,t){if("click"===e)return $n(t)}function or(e,t){if("input"===e||"change"===e)return $n(t)}var ur="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t};function sr(e,t){if(ur(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!f.call(t,i)||!ur(e[i],t[i]))return!1}return!0}function lr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function cr(e,t){var n,r=lr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=lr(r)}}function fr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?fr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function hr(){for(var e=window,t=G();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=G((e=t.contentWindow).document)}return t}function dr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function pr(e){var t=hr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&fr(n.ownerDocument.documentElement,n)){if(null!==r&&dr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=void 0===r.end?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=cr(n,a);var o=cr(n,r);i&&o&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"===typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var vr=c&&"documentMode"in document&&11>=document.documentMode,yr=null,mr=null,gr=null,kr=!1;function br(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;kr||null==yr||yr!==G(r)||("selectionStart"in(r=yr)&&dr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},gr&&sr(gr,r)||(gr=r,0<(r=Qr(mr,"onSelect")).length&&(t=new cn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=yr)))}function wr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Er={animationend:wr("Animation","AnimationEnd"),animationiteration:wr("Animation","AnimationIteration"),animationstart:wr("Animation","AnimationStart"),transitionend:wr("Transition","TransitionEnd")},Sr={},xr={};function Tr(e){if(Sr[e])return Sr[e];if(!Er[e])return e;var t,n=Er[e];for(t in n)if(n.hasOwnProperty(t)&&t in xr)return Sr[e]=n[t];return e}c&&(xr=document.createElement("div").style,"AnimationEvent"in window||(delete Er.animationend.animation,delete Er.animationiteration.animation,delete Er.animationstart.animation),"TransitionEvent"in window||delete Er.transitionend.transition);var Cr=Tr("animationend"),_r=Tr("animationiteration"),Ir=Tr("animationstart"),Nr=Tr("transitionend"),Dr=new Map,Ar="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Lr(e,t){Dr.set(e,t),s(t,[e])}for(var Or=0;Or<Ar.length;Or++){var Rr=Ar[Or];Lr(Rr.toLowerCase(),"on"+(Rr[0].toUpperCase()+Rr.slice(1)))}Lr(Cr,"onAnimationEnd"),Lr(_r,"onAnimationIteration"),Lr(Ir,"onAnimationStart"),Lr("dblclick","onDoubleClick"),Lr("focusin","onFocus"),Lr("focusout","onBlur"),Lr(Nr,"onTransitionEnd"),l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),s("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),s("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),s("onBeforeInput",["compositionend","keypress","textInput","paste"]),s("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Pr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Mr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Pr));function Fr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,o,u,s,l){if(ze.apply(this,arguments),Me){if(!Me)throw Error(a(198));var c=Fe;Me=!1,Fe=null,Ve||(Ve=!0,Ue=c)}}(r,t,void 0,e),e.currentTarget=null}function Vr(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var u=r[o],s=u.instance,l=u.currentTarget;if(u=u.listener,s!==a&&i.isPropagationStopped())break e;Fr(i,u,l),a=s}else for(o=0;o<r.length;o++){if(s=(u=r[o]).instance,l=u.currentTarget,u=u.listener,s!==a&&i.isPropagationStopped())break e;Fr(i,u,l),a=s}}}if(Ve)throw e=Ue,Ve=!1,Ue=null,e}function Ur(e,t){var n=t[vi];void 0===n&&(n=t[vi]=new Set);var r=e+"__bubble";n.has(r)||(qr(t,e,2,!1),n.add(r))}function jr(e,t,n){var r=0;t&&(r|=4),qr(n,e,r,t)}var zr="_reactListening"+Math.random().toString(36).slice(2);function Br(e){if(!e[zr]){e[zr]=!0,o.forEach((function(t){"selectionchange"!==t&&(Mr.has(t)||jr(t,!1,e),jr(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[zr]||(t[zr]=!0,jr("selectionchange",!1,t))}}function qr(e,t,n,r){switch(Xt(t)){case 1:var i=Kt;break;case 4:i=Qt;break;default:i=Wt}n=i.bind(null,t,n,e),i=void 0,!Oe||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Hr(e,t,n,r,i){var a=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var o=r.tag;if(3===o||4===o){var u=r.stateNode.containerInfo;if(u===i||8===u.nodeType&&u.parentNode===i)break;if(4===o)for(o=r.return;null!==o;){var s=o.tag;if((3===s||4===s)&&((s=o.stateNode.containerInfo)===i||8===s.nodeType&&s.parentNode===i))return;o=o.return}for(;null!==u;){if(null===(o=gi(u)))return;if(5===(s=o.tag)||6===s){r=a=o;continue e}u=u.parentNode}}r=r.return}Ae((function(){var r=a,i=we(n),o=[];e:{var u=Dr.get(e);if(void 0!==u){var s=cn,l=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":s=_n;break;case"focusin":l="focus",s=yn;break;case"focusout":l="blur",s=yn;break;case"beforeblur":case"afterblur":s=yn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":s=pn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":s=vn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":s=Nn;break;case Cr:case _r:case Ir:s=mn;break;case Nr:s=Dn;break;case"scroll":s=hn;break;case"wheel":s=Ln;break;case"copy":case"cut":case"paste":s=kn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":s=In}var c=0!==(4&t),f=!c&&"scroll"===e,h=c?null!==u?u+"Capture":null:u;c=[];for(var d,p=r;null!==p;){var v=(d=p).stateNode;if(5===d.tag&&null!==v&&(d=v,null!==h&&(null!=(v=Le(p,h))&&c.push(Kr(p,v,d)))),f)break;p=p.return}0<c.length&&(u=new s(u,l,null,n,i),o.push({event:u,listeners:c}))}}if(0===(7&t)){if(s="mouseout"===e||"pointerout"===e,(!(u="mouseover"===e||"pointerover"===e)||n===be||!(l=n.relatedTarget||n.fromElement)||!gi(l)&&!l[pi])&&(s||u)&&(u=i.window===i?i:(u=i.ownerDocument)?u.defaultView||u.parentWindow:window,s?(s=r,null!==(l=(l=n.relatedTarget||n.toElement)?gi(l):null)&&(l!==(f=Be(l))||5!==l.tag&&6!==l.tag)&&(l=null)):(s=null,l=r),s!==l)){if(c=pn,v="onMouseLeave",h="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(c=In,v="onPointerLeave",h="onPointerEnter",p="pointer"),f=null==s?u:bi(s),d=null==l?u:bi(l),(u=new c(v,p+"leave",s,n,i)).target=f,u.relatedTarget=d,v=null,gi(i)===r&&((c=new c(h,p+"enter",l,n,i)).target=d,c.relatedTarget=f,v=c),f=v,s&&l)e:{for(h=l,p=0,d=c=s;d;d=Wr(d))p++;for(d=0,v=h;v;v=Wr(v))d++;for(;0<p-d;)c=Wr(c),p--;for(;0<d-p;)h=Wr(h),d--;for(;p--;){if(c===h||null!==h&&c===h.alternate)break e;c=Wr(c),h=Wr(h)}c=null}else c=null;null!==s&&Gr(o,u,s,c,!1),null!==l&&null!==f&&Gr(o,f,l,c,!0)}if("select"===(s=(u=r?bi(r):window).nodeName&&u.nodeName.toLowerCase())||"input"===s&&"file"===u.type)var y=Xn;else if(Hn(u))if(Yn)y=or;else{y=ir;var m=rr}else(s=u.nodeName)&&"input"===s.toLowerCase()&&("checkbox"===u.type||"radio"===u.type)&&(y=ar);switch(y&&(y=y(e,r))?Kn(o,y,n,i):(m&&m(e,u,r),"focusout"===e&&(m=u._wrapperState)&&m.controlled&&"number"===u.type&&ee(u,"number",u.value)),m=r?bi(r):window,e){case"focusin":(Hn(m)||"true"===m.contentEditable)&&(yr=m,mr=r,gr=null);break;case"focusout":gr=mr=yr=null;break;case"mousedown":kr=!0;break;case"contextmenu":case"mouseup":case"dragend":kr=!1,br(o,n,i);break;case"selectionchange":if(vr)break;case"keydown":case"keyup":br(o,n,i)}var g;if(Rn)e:{switch(e){case"compositionstart":var k="onCompositionStart";break e;case"compositionend":k="onCompositionEnd";break e;case"compositionupdate":k="onCompositionUpdate";break e}k=void 0}else Bn?jn(e,n)&&(k="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(k="onCompositionStart");k&&(Fn&&"ko"!==n.locale&&(Bn||"onCompositionStart"!==k?"onCompositionEnd"===k&&Bn&&(g=en()):(Jt="value"in(Yt=i)?Yt.value:Yt.textContent,Bn=!0)),0<(m=Qr(r,k)).length&&(k=new bn(k,e,null,n,i),o.push({event:k,listeners:m}),g?k.data=g:null!==(g=zn(n))&&(k.data=g))),(g=Mn?function(e,t){switch(e){case"compositionend":return zn(t);case"keypress":return 32!==t.which?null:(Un=!0,Vn);case"textInput":return(e=t.data)===Vn&&Un?null:e;default:return null}}(e,n):function(e,t){if(Bn)return"compositionend"===e||!Rn&&jn(e,t)?(e=en(),Zt=Jt=Yt=null,Bn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Fn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Qr(r,"onBeforeInput")).length&&(i=new bn("onBeforeInput","beforeinput",null,n,i),o.push({event:i,listeners:r}),i.data=g))}Vr(o,t)}))}function Kr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Qr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,a=i.stateNode;5===i.tag&&null!==a&&(i=a,null!=(a=Le(e,n))&&r.unshift(Kr(e,a,i)),null!=(a=Le(e,t))&&r.push(Kr(e,a,i))),e=e.return}return r}function Wr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Gr(e,t,n,r,i){for(var a=t._reactName,o=[];null!==n&&n!==r;){var u=n,s=u.alternate,l=u.stateNode;if(null!==s&&s===r)break;5===u.tag&&null!==l&&(u=l,i?null!=(s=Le(n,a))&&o.unshift(Kr(n,s,u)):i||null!=(s=Le(n,a))&&o.push(Kr(n,s,u))),n=n.return}0!==o.length&&e.push({event:t,listeners:o})}var $r=/\r\n?/g,Xr=/\u0000|\uFFFD/g;function Yr(e){return("string"===typeof e?e:""+e).replace($r,"\n").replace(Xr,"")}function Jr(e,t,n){if(t=Yr(t),Yr(e)!==t&&n)throw Error(a(425))}function Zr(){}var ei=null,ti=null;function ni(e,t){return"textarea"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ri="function"===typeof setTimeout?setTimeout:void 0,ii="function"===typeof clearTimeout?clearTimeout:void 0,ai="function"===typeof Promise?Promise:void 0,oi="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof ai?function(e){return ai.resolve(null).then(e).catch(ui)}:ri;function ui(e){setTimeout((function(){throw e}))}function si(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void Bt(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);Bt(t)}function li(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function ci(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var fi=Math.random().toString(36).slice(2),hi="__reactFiber$"+fi,di="__reactProps$"+fi,pi="__reactContainer$"+fi,vi="__reactEvents$"+fi,yi="__reactListeners$"+fi,mi="__reactHandles$"+fi;function gi(e){var t=e[hi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[pi]||n[hi]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ci(e);null!==e;){if(n=e[hi])return n;e=ci(e)}return t}n=(e=n).parentNode}return null}function ki(e){return!(e=e[hi]||e[pi])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function bi(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function wi(e){return e[di]||null}var Ei=[],Si=-1;function xi(e){return{current:e}}function Ti(e){0>Si||(e.current=Ei[Si],Ei[Si]=null,Si--)}function Ci(e,t){Si++,Ei[Si]=e.current,e.current=t}var _i={},Ii=xi(_i),Ni=xi(!1),Di=_i;function Ai(e,t){var n=e.type.contextTypes;if(!n)return _i;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,a={};for(i in n)a[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Li(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Oi(){Ti(Ni),Ti(Ii)}function Ri(e,t,n){if(Ii.current!==_i)throw Error(a(168));Ci(Ii,t),Ci(Ni,n)}function Pi(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(a(108,q(e)||"Unknown",i));return F({},n,r)}function Mi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||_i,Di=Ii.current,Ci(Ii,e),Ci(Ni,Ni.current),!0}function Fi(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=Pi(e,t,Di),r.__reactInternalMemoizedMergedChildContext=e,Ti(Ni),Ti(Ii),Ci(Ii,e)):Ti(Ni),Ci(Ni,n)}var Vi=null,Ui=!1,ji=!1;function zi(e){null===Vi?Vi=[e]:Vi.push(e)}function Bi(){if(!ji&&null!==Vi){ji=!0;var e=0,t=kt;try{var n=Vi;for(kt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Vi=null,Ui=!1}catch(i){throw null!==Vi&&(Vi=Vi.slice(e+1)),We(Ze,Bi),i}finally{kt=t,ji=!1}}return null}var qi=[],Hi=0,Ki=null,Qi=0,Wi=[],Gi=0,$i=null,Xi=1,Yi="";function Ji(e,t){qi[Hi++]=Qi,qi[Hi++]=Ki,Ki=e,Qi=t}function Zi(e,t,n){Wi[Gi++]=Xi,Wi[Gi++]=Yi,Wi[Gi++]=$i,$i=e;var r=Xi;e=Yi;var i=32-ot(r)-1;r&=~(1<<i),n+=1;var a=32-ot(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Xi=1<<32-ot(t)+i|n<<i|r,Yi=a+e}else Xi=1<<a|n<<i|r,Yi=e}function ea(e){null!==e.return&&(Ji(e,1),Zi(e,1,0))}function ta(e){for(;e===Ki;)Ki=qi[--Hi],qi[Hi]=null,Qi=qi[--Hi],qi[Hi]=null;for(;e===$i;)$i=Wi[--Gi],Wi[Gi]=null,Yi=Wi[--Gi],Wi[Gi]=null,Xi=Wi[--Gi],Wi[Gi]=null}var na=null,ra=null,ia=!1,aa=null;function oa(e,t){var n=Al(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function ua(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,na=e,ra=li(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,na=e,ra=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==$i?{id:Xi,overflow:Yi}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Al(18,null,null,0)).stateNode=t,n.return=e,e.child=n,na=e,ra=null,!0);default:return!1}}function sa(e){return 0!==(1&e.mode)&&0===(128&e.flags)}function la(e){if(ia){var t=ra;if(t){var n=t;if(!ua(e,t)){if(sa(e))throw Error(a(418));t=li(n.nextSibling);var r=na;t&&ua(e,t)?oa(r,n):(e.flags=-4097&e.flags|2,ia=!1,na=e)}}else{if(sa(e))throw Error(a(418));e.flags=-4097&e.flags|2,ia=!1,na=e}}}function ca(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;na=e}function fa(e){if(e!==na)return!1;if(!ia)return ca(e),ia=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ni(e.type,e.memoizedProps)),t&&(t=ra)){if(sa(e))throw ha(),Error(a(418));for(;t;)oa(e,t),t=li(t.nextSibling)}if(ca(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){ra=li(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}ra=null}}else ra=na?li(e.stateNode.nextSibling):null;return!0}function ha(){for(var e=ra;e;)e=li(e.nextSibling)}function da(){ra=na=null,ia=!1}function pa(e){null===aa?aa=[e]:aa.push(e)}var va=b.ReactCurrentBatchConfig;function ya(e,t){if(e&&e.defaultProps){for(var n in t=F({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var ma=xi(null),ga=null,ka=null,ba=null;function wa(){ba=ka=ga=null}function Ea(e){var t=ma.current;Ti(ma),e._currentValue=t}function Sa(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function xa(e,t){ga=e,ba=ka=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(bu=!0),e.firstContext=null)}function Ta(e){var t=e._currentValue;if(ba!==e)if(e={context:e,memoizedValue:t,next:null},null===ka){if(null===ga)throw Error(a(308));ka=e,ga.dependencies={lanes:0,firstContext:e}}else ka=ka.next=e;return t}var Ca=null;function _a(e){null===Ca?Ca=[e]:Ca.push(e)}function Ia(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,_a(t)):(n.next=i.next,i.next=n),t.interleaved=n,Na(e,r)}function Na(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Da=!1;function Aa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function La(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Oa(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ra(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!==(2&Is)){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Na(e,n)}return null===(i=r.interleaved)?(t.next=t,_a(r)):(t.next=i.next,i.next=t),r.interleaved=t,Na(e,n)}function Pa(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!==(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,gt(e,n)}}function Ma(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===a?i=a=o:a=a.next=o,n=n.next}while(null!==n);null===a?i=a=t:a=a.next=t}else i=a=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Fa(e,t,n,r){var i=e.updateQueue;Da=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,u=i.shared.pending;if(null!==u){i.shared.pending=null;var s=u,l=s.next;s.next=null,null===o?a=l:o.next=l,o=s;var c=e.alternate;null!==c&&((u=(c=c.updateQueue).lastBaseUpdate)!==o&&(null===u?c.firstBaseUpdate=l:u.next=l,c.lastBaseUpdate=s))}if(null!==a){var f=i.baseState;for(o=0,c=l=s=null,u=a;;){var h=u.lane,d=u.eventTime;if((r&h)===h){null!==c&&(c=c.next={eventTime:d,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var p=e,v=u;switch(h=t,d=n,v.tag){case 1:if("function"===typeof(p=v.payload)){f=p.call(d,f,h);break e}f=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null===(h="function"===typeof(p=v.payload)?p.call(d,f,h):p)||void 0===h)break e;f=F({},f,h);break e;case 2:Da=!0}}null!==u.callback&&0!==u.lane&&(e.flags|=64,null===(h=i.effects)?i.effects=[u]:h.push(u))}else d={eventTime:d,lane:h,tag:u.tag,payload:u.payload,callback:u.callback,next:null},null===c?(l=c=d,s=f):c=c.next=d,o|=h;if(null===(u=u.next)){if(null===(u=i.shared.pending))break;u=(h=u).next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}if(null===c&&(s=f),i.baseState=s,i.firstBaseUpdate=l,i.lastBaseUpdate=c,null!==(t=i.shared.interleaved)){i=t;do{o|=i.lane,i=i.next}while(i!==t)}else null===a&&(i.shared.lanes=0);Ms|=o,e.lanes=o,e.memoizedState=f}}function Va(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!==typeof i)throw Error(a(191,i));i.call(r)}}}var Ua=(new r.Component).refs;function ja(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:F({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var za={isMounted:function(e){return!!(e=e._reactInternals)&&Be(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=el(),i=tl(e),a=Oa(r,i);a.payload=t,void 0!==n&&null!==n&&(a.callback=n),null!==(t=Ra(e,a,i))&&(nl(t,e,i,r),Pa(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=el(),i=tl(e),a=Oa(r,i);a.tag=1,a.payload=t,void 0!==n&&null!==n&&(a.callback=n),null!==(t=Ra(e,a,i))&&(nl(t,e,i,r),Pa(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=el(),r=tl(e),i=Oa(n,r);i.tag=2,void 0!==t&&null!==t&&(i.callback=t),null!==(t=Ra(e,i,r))&&(nl(t,e,r,n),Pa(t,e,r))}};function Ba(e,t,n,r,i,a,o){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,o):!t.prototype||!t.prototype.isPureReactComponent||(!sr(n,r)||!sr(i,a))}function qa(e,t,n){var r=!1,i=_i,a=t.contextType;return"object"===typeof a&&null!==a?a=Ta(a):(i=Li(t)?Di:Ii.current,a=(r=null!==(r=t.contextTypes)&&void 0!==r)?Ai(e,i):_i),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=za,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function Ha(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&za.enqueueReplaceState(t,t.state,null)}function Ka(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=Ua,Aa(e);var a=t.contextType;"object"===typeof a&&null!==a?i.context=Ta(a):(a=Li(t)?Di:Ii.current,i.context=Ai(e,a)),i.state=e.memoizedState,"function"===typeof(a=t.getDerivedStateFromProps)&&(ja(e,t,a,n),i.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof i.getSnapshotBeforeUpdate||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||(t=i.state,"function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&za.enqueueReplaceState(i,i.state,null),Fa(e,n,i,r),i.state=e.memoizedState),"function"===typeof i.componentDidMount&&(e.flags|=4194308)}function Qa(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var i=r,o=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=i.refs;t===Ua&&(t=i.refs={}),null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}if("string"!==typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function Wa(e,t){throw e=Object.prototype.toString.call(t),Error(a(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ga(e){return(0,e._init)(e._payload)}function $a(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Ol(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function u(t){return e&&null===t.alternate&&(t.flags|=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=Fl(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function l(e,t,n,r){var a=n.type;return a===S?f(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===a||"object"===typeof a&&null!==a&&a.$$typeof===L&&Ga(a)===t.type)?((r=i(t,n.props)).ref=Qa(e,t,n),r.return=e,r):((r=Rl(n.type,n.key,n.props,null,e.mode,r)).ref=Qa(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Vl(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function f(e,t,n,r,a){return null===t||7!==t.tag?((t=Pl(n,e.mode,r,a)).return=e,t):((t=i(t,n)).return=e,t)}function h(e,t,n){if("string"===typeof t&&""!==t||"number"===typeof t)return(t=Fl(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case w:return(n=Rl(t.type,t.key,t.props,null,e.mode,n)).ref=Qa(e,null,t),n.return=e,n;case E:return(t=Vl(t,e.mode,n)).return=e,t;case L:return h(e,(0,t._init)(t._payload),n)}if(te(t)||P(t))return(t=Pl(t,e.mode,n,null)).return=e,t;Wa(e,t)}return null}function d(e,t,n,r){var i=null!==t?t.key:null;if("string"===typeof n&&""!==n||"number"===typeof n)return null!==i?null:s(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case w:return n.key===i?l(e,t,n,r):null;case E:return n.key===i?c(e,t,n,r):null;case L:return d(e,t,(i=n._init)(n._payload),r)}if(te(n)||P(n))return null!==i?null:f(e,t,n,r,null);Wa(e,n)}return null}function p(e,t,n,r,i){if("string"===typeof r&&""!==r||"number"===typeof r)return s(t,e=e.get(n)||null,""+r,i);if("object"===typeof r&&null!==r){switch(r.$$typeof){case w:return l(t,e=e.get(null===r.key?n:r.key)||null,r,i);case E:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case L:return p(e,t,n,(0,r._init)(r._payload),i)}if(te(r)||P(r))return f(t,e=e.get(n)||null,r,i,null);Wa(t,r)}return null}function v(i,a,u,s){for(var l=null,c=null,f=a,v=a=0,y=null;null!==f&&v<u.length;v++){f.index>v?(y=f,f=null):y=f.sibling;var m=d(i,f,u[v],s);if(null===m){null===f&&(f=y);break}e&&f&&null===m.alternate&&t(i,f),a=o(m,a,v),null===c?l=m:c.sibling=m,c=m,f=y}if(v===u.length)return n(i,f),ia&&Ji(i,v),l;if(null===f){for(;v<u.length;v++)null!==(f=h(i,u[v],s))&&(a=o(f,a,v),null===c?l=f:c.sibling=f,c=f);return ia&&Ji(i,v),l}for(f=r(i,f);v<u.length;v++)null!==(y=p(f,i,v,u[v],s))&&(e&&null!==y.alternate&&f.delete(null===y.key?v:y.key),a=o(y,a,v),null===c?l=y:c.sibling=y,c=y);return e&&f.forEach((function(e){return t(i,e)})),ia&&Ji(i,v),l}function y(i,u,s,l){var c=P(s);if("function"!==typeof c)throw Error(a(150));if(null==(s=c.call(s)))throw Error(a(151));for(var f=c=null,v=u,y=u=0,m=null,g=s.next();null!==v&&!g.done;y++,g=s.next()){v.index>y?(m=v,v=null):m=v.sibling;var k=d(i,v,g.value,l);if(null===k){null===v&&(v=m);break}e&&v&&null===k.alternate&&t(i,v),u=o(k,u,y),null===f?c=k:f.sibling=k,f=k,v=m}if(g.done)return n(i,v),ia&&Ji(i,y),c;if(null===v){for(;!g.done;y++,g=s.next())null!==(g=h(i,g.value,l))&&(u=o(g,u,y),null===f?c=g:f.sibling=g,f=g);return ia&&Ji(i,y),c}for(v=r(i,v);!g.done;y++,g=s.next())null!==(g=p(v,i,y,g.value,l))&&(e&&null!==g.alternate&&v.delete(null===g.key?y:g.key),u=o(g,u,y),null===f?c=g:f.sibling=g,f=g);return e&&v.forEach((function(e){return t(i,e)})),ia&&Ji(i,y),c}return function e(r,a,o,s){if("object"===typeof o&&null!==o&&o.type===S&&null===o.key&&(o=o.props.children),"object"===typeof o&&null!==o){switch(o.$$typeof){case w:e:{for(var l=o.key,c=a;null!==c;){if(c.key===l){if((l=o.type)===S){if(7===c.tag){n(r,c.sibling),(a=i(c,o.props.children)).return=r,r=a;break e}}else if(c.elementType===l||"object"===typeof l&&null!==l&&l.$$typeof===L&&Ga(l)===c.type){n(r,c.sibling),(a=i(c,o.props)).ref=Qa(r,c,o),a.return=r,r=a;break e}n(r,c);break}t(r,c),c=c.sibling}o.type===S?((a=Pl(o.props.children,r.mode,s,o.key)).return=r,r=a):((s=Rl(o.type,o.key,o.props,null,r.mode,s)).ref=Qa(r,a,o),s.return=r,r=s)}return u(r);case E:e:{for(c=o.key;null!==a;){if(a.key===c){if(4===a.tag&&a.stateNode.containerInfo===o.containerInfo&&a.stateNode.implementation===o.implementation){n(r,a.sibling),(a=i(a,o.children||[])).return=r,r=a;break e}n(r,a);break}t(r,a),a=a.sibling}(a=Vl(o,r.mode,s)).return=r,r=a}return u(r);case L:return e(r,a,(c=o._init)(o._payload),s)}if(te(o))return v(r,a,o,s);if(P(o))return y(r,a,o,s);Wa(r,o)}return"string"===typeof o&&""!==o||"number"===typeof o?(o=""+o,null!==a&&6===a.tag?(n(r,a.sibling),(a=i(a,o)).return=r,r=a):(n(r,a),(a=Fl(o,r.mode,s)).return=r,r=a),u(r)):n(r,a)}}var Xa=$a(!0),Ya=$a(!1),Ja={},Za=xi(Ja),eo=xi(Ja),to=xi(Ja);function no(e){if(e===Ja)throw Error(a(174));return e}function ro(e,t){switch(Ci(to,t),Ci(eo,e),Ci(Za,Ja),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:se(null,"");break;default:t=se(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Ti(Za),Ci(Za,t)}function io(){Ti(Za),Ti(eo),Ti(to)}function ao(e){no(to.current);var t=no(Za.current),n=se(t,e.type);t!==n&&(Ci(eo,e),Ci(Za,n))}function oo(e){eo.current===e&&(Ti(Za),Ti(eo))}var uo=xi(0);function so(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var lo=[];function co(){for(var e=0;e<lo.length;e++)lo[e]._workInProgressVersionPrimary=null;lo.length=0}var fo=b.ReactCurrentDispatcher,ho=b.ReactCurrentBatchConfig,po=0,vo=null,yo=null,mo=null,go=!1,ko=!1,bo=0,wo=0;function Eo(){throw Error(a(321))}function So(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ur(e[n],t[n]))return!1;return!0}function xo(e,t,n,r,i,o){if(po=o,vo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,fo.current=null===e||null===e.memoizedState?uu:su,e=n(r,i),ko){o=0;do{if(ko=!1,bo=0,25<=o)throw Error(a(301));o+=1,mo=yo=null,t.updateQueue=null,fo.current=lu,e=n(r,i)}while(ko)}if(fo.current=ou,t=null!==yo&&null!==yo.next,po=0,mo=yo=vo=null,go=!1,t)throw Error(a(300));return e}function To(){var e=0!==bo;return bo=0,e}function Co(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===mo?vo.memoizedState=mo=e:mo=mo.next=e,mo}function _o(){if(null===yo){var e=vo.alternate;e=null!==e?e.memoizedState:null}else e=yo.next;var t=null===mo?vo.memoizedState:mo.next;if(null!==t)mo=t,yo=e;else{if(null===e)throw Error(a(310));e={memoizedState:(yo=e).memoizedState,baseState:yo.baseState,baseQueue:yo.baseQueue,queue:yo.queue,next:null},null===mo?vo.memoizedState=mo=e:mo=mo.next=e}return mo}function Io(e,t){return"function"===typeof t?t(e):t}function No(e){var t=_o(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=yo,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var u=i.next;i.next=o.next,o.next=u}r.baseQueue=i=o,n.pending=null}if(null!==i){o=i.next,r=r.baseState;var s=u=null,l=null,c=o;do{var f=c.lane;if((po&f)===f)null!==l&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var h={lane:f,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===l?(s=l=h,u=r):l=l.next=h,vo.lanes|=f,Ms|=f}c=c.next}while(null!==c&&c!==o);null===l?u=r:l.next=s,ur(r,t.memoizedState)||(bu=!0),t.memoizedState=r,t.baseState=u,t.baseQueue=l,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{o=i.lane,vo.lanes|=o,Ms|=o,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Do(e){var t=_o(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var u=i=i.next;do{o=e(o,u.action),u=u.next}while(u!==i);ur(o,t.memoizedState)||(bu=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Ao(){}function Lo(e,t){var n=vo,r=_o(),i=t(),o=!ur(r.memoizedState,i);if(o&&(r.memoizedState=i,bu=!0),r=r.queue,Ho(Po.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||null!==mo&&1&mo.memoizedState.tag){if(n.flags|=2048,Uo(9,Ro.bind(null,n,r,i,t),void 0,null),null===Ns)throw Error(a(349));0!==(30&po)||Oo(n,t,i)}return i}function Oo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=vo.updateQueue)?(t={lastEffect:null,stores:null},vo.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Ro(e,t,n,r){t.value=n,t.getSnapshot=r,Mo(t)&&Fo(e)}function Po(e,t,n){return n((function(){Mo(t)&&Fo(e)}))}function Mo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ur(e,n)}catch(r){return!0}}function Fo(e){var t=Na(e,1);null!==t&&nl(t,e,1,-1)}function Vo(e){var t=Co();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:e},t.queue=e,e=e.dispatch=nu.bind(null,vo,e),[t.memoizedState,e]}function Uo(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=vo.updateQueue)?(t={lastEffect:null,stores:null},vo.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function jo(){return _o().memoizedState}function zo(e,t,n,r){var i=Co();vo.flags|=e,i.memoizedState=Uo(1|t,n,void 0,void 0===r?null:r)}function Bo(e,t,n,r){var i=_o();r=void 0===r?null:r;var a=void 0;if(null!==yo){var o=yo.memoizedState;if(a=o.destroy,null!==r&&So(r,o.deps))return void(i.memoizedState=Uo(t,n,a,r))}vo.flags|=e,i.memoizedState=Uo(1|t,n,a,r)}function qo(e,t){return zo(8390656,8,e,t)}function Ho(e,t){return Bo(2048,8,e,t)}function Ko(e,t){return Bo(4,2,e,t)}function Qo(e,t){return Bo(4,4,e,t)}function Wo(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Go(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Bo(4,4,Wo.bind(null,t,e),n)}function $o(){}function Xo(e,t){var n=_o();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&So(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Yo(e,t){var n=_o();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&So(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Jo(e,t,n){return 0===(21&po)?(e.baseState&&(e.baseState=!1,bu=!0),e.memoizedState=n):(ur(n,t)||(n=vt(),vo.lanes|=n,Ms|=n,e.baseState=!0),t)}function Zo(e,t){var n=kt;kt=0!==n&&4>n?n:4,e(!0);var r=ho.transition;ho.transition={};try{e(!1),t()}finally{kt=n,ho.transition=r}}function eu(){return _o().memoizedState}function tu(e,t,n){var r=tl(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ru(e))iu(t,n);else if(null!==(n=Ia(e,t,n,r))){nl(n,e,r,el()),au(n,t,r)}}function nu(e,t,n){var r=tl(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ru(e))iu(t,i);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var o=t.lastRenderedState,u=a(o,n);if(i.hasEagerState=!0,i.eagerState=u,ur(u,o)){var s=t.interleaved;return null===s?(i.next=i,_a(t)):(i.next=s.next,s.next=i),void(t.interleaved=i)}}catch(l){}null!==(n=Ia(e,t,i,r))&&(nl(n,e,r,i=el()),au(n,t,r))}}function ru(e){var t=e.alternate;return e===vo||null!==t&&t===vo}function iu(e,t){ko=go=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function au(e,t,n){if(0!==(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,gt(e,n)}}var ou={readContext:Ta,useCallback:Eo,useContext:Eo,useEffect:Eo,useImperativeHandle:Eo,useInsertionEffect:Eo,useLayoutEffect:Eo,useMemo:Eo,useReducer:Eo,useRef:Eo,useState:Eo,useDebugValue:Eo,useDeferredValue:Eo,useTransition:Eo,useMutableSource:Eo,useSyncExternalStore:Eo,useId:Eo,unstable_isNewReconciler:!1},uu={readContext:Ta,useCallback:function(e,t){return Co().memoizedState=[e,void 0===t?null:t],e},useContext:Ta,useEffect:qo,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,zo(4194308,4,Wo.bind(null,t,e),n)},useLayoutEffect:function(e,t){return zo(4194308,4,e,t)},useInsertionEffect:function(e,t){return zo(4,2,e,t)},useMemo:function(e,t){var n=Co();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Co();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=tu.bind(null,vo,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Co().memoizedState=e},useState:Vo,useDebugValue:$o,useDeferredValue:function(e){return Co().memoizedState=e},useTransition:function(){var e=Vo(!1),t=e[0];return e=Zo.bind(null,e[1]),Co().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=vo,i=Co();if(ia){if(void 0===n)throw Error(a(407));n=n()}else{if(n=t(),null===Ns)throw Error(a(349));0!==(30&po)||Oo(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,qo(Po.bind(null,r,o,e),[e]),r.flags|=2048,Uo(9,Ro.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Co(),t=Ns.identifierPrefix;if(ia){var n=Yi;t=":"+t+"R"+(n=(Xi&~(1<<32-ot(Xi)-1)).toString(32)+n),0<(n=bo++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=wo++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},su={readContext:Ta,useCallback:Xo,useContext:Ta,useEffect:Ho,useImperativeHandle:Go,useInsertionEffect:Ko,useLayoutEffect:Qo,useMemo:Yo,useReducer:No,useRef:jo,useState:function(){return No(Io)},useDebugValue:$o,useDeferredValue:function(e){return Jo(_o(),yo.memoizedState,e)},useTransition:function(){return[No(Io)[0],_o().memoizedState]},useMutableSource:Ao,useSyncExternalStore:Lo,useId:eu,unstable_isNewReconciler:!1},lu={readContext:Ta,useCallback:Xo,useContext:Ta,useEffect:Ho,useImperativeHandle:Go,useInsertionEffect:Ko,useLayoutEffect:Qo,useMemo:Yo,useReducer:Do,useRef:jo,useState:function(){return Do(Io)},useDebugValue:$o,useDeferredValue:function(e){var t=_o();return null===yo?t.memoizedState=e:Jo(t,yo.memoizedState,e)},useTransition:function(){return[Do(Io)[0],_o().memoizedState]},useMutableSource:Ao,useSyncExternalStore:Lo,useId:eu,unstable_isNewReconciler:!1};function cu(e,t){try{var n="",r=t;do{n+=z(r),r=r.return}while(r);var i=n}catch(a){i="\nError generating stack: "+a.message+"\n"+a.stack}return{value:e,source:t,stack:i,digest:null}}function fu(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function hu(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}var du="function"===typeof WeakMap?WeakMap:Map;function pu(e,t,n){(n=Oa(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Hs||(Hs=!0,Ks=r),hu(0,t)},n}function vu(e,t,n){(n=Oa(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){hu(0,t)}}var a=e.stateNode;return null!==a&&"function"===typeof a.componentDidCatch&&(n.callback=function(){hu(0,t),"function"!==typeof r&&(null===Qs?Qs=new Set([this]):Qs.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function yu(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new du;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Tl.bind(null,e,t,n),t.then(e,e))}function mu(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function gu(e,t,n,r,i){return 0===(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Oa(-1,1)).tag=2,Ra(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var ku=b.ReactCurrentOwner,bu=!1;function wu(e,t,n,r){t.child=null===e?Ya(t,null,n,r):Xa(t,e.child,n,r)}function Eu(e,t,n,r,i){n=n.render;var a=t.ref;return xa(t,i),r=xo(e,t,n,r,a,i),n=To(),null===e||bu?(ia&&n&&ea(t),t.flags|=1,wu(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Hu(e,t,i))}function Su(e,t,n,r,i){if(null===e){var a=n.type;return"function"!==typeof a||Ll(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Rl(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,xu(e,t,a,r,i))}if(a=e.child,0===(e.lanes&i)){var o=a.memoizedProps;if((n=null!==(n=n.compare)?n:sr)(o,r)&&e.ref===t.ref)return Hu(e,t,i)}return t.flags|=1,(e=Ol(a,r)).ref=t.ref,e.return=t,t.child=e}function xu(e,t,n,r,i){if(null!==e){var a=e.memoizedProps;if(sr(a,r)&&e.ref===t.ref){if(bu=!1,t.pendingProps=r=a,0===(e.lanes&i))return t.lanes=e.lanes,Hu(e,t,i);0!==(131072&e.flags)&&(bu=!0)}}return _u(e,t,n,r,i)}function Tu(e,t,n){var r=t.pendingProps,i=r.children,a=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0===(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ci(Os,Ls),Ls|=n;else{if(0===(1073741824&n))return e=null!==a?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ci(Os,Ls),Ls|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==a?a.baseLanes:n,Ci(Os,Ls),Ls|=r}else null!==a?(r=a.baseLanes|n,t.memoizedState=null):r=n,Ci(Os,Ls),Ls|=r;return wu(e,t,i,n),t.child}function Cu(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function _u(e,t,n,r,i){var a=Li(n)?Di:Ii.current;return a=Ai(t,a),xa(t,i),n=xo(e,t,n,r,a,i),r=To(),null===e||bu?(ia&&r&&ea(t),t.flags|=1,wu(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Hu(e,t,i))}function Iu(e,t,n,r,i){if(Li(n)){var a=!0;Mi(t)}else a=!1;if(xa(t,i),null===t.stateNode)qu(e,t),qa(t,n,r),Ka(t,n,r,i),r=!0;else if(null===e){var o=t.stateNode,u=t.memoizedProps;o.props=u;var s=o.context,l=n.contextType;"object"===typeof l&&null!==l?l=Ta(l):l=Ai(t,l=Li(n)?Di:Ii.current);var c=n.getDerivedStateFromProps,f="function"===typeof c||"function"===typeof o.getSnapshotBeforeUpdate;f||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(u!==r||s!==l)&&Ha(t,o,r,l),Da=!1;var h=t.memoizedState;o.state=h,Fa(t,r,o,i),s=t.memoizedState,u!==r||h!==s||Ni.current||Da?("function"===typeof c&&(ja(t,n,c,r),s=t.memoizedState),(u=Da||Ba(t,n,u,r,h,s,l))?(f||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||("function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"===typeof o.componentDidMount&&(t.flags|=4194308)):("function"===typeof o.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=s),o.props=r,o.state=s,o.context=l,r=u):("function"===typeof o.componentDidMount&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,La(e,t),u=t.memoizedProps,l=t.type===t.elementType?u:ya(t.type,u),o.props=l,f=t.pendingProps,h=o.context,"object"===typeof(s=n.contextType)&&null!==s?s=Ta(s):s=Ai(t,s=Li(n)?Di:Ii.current);var d=n.getDerivedStateFromProps;(c="function"===typeof d||"function"===typeof o.getSnapshotBeforeUpdate)||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(u!==f||h!==s)&&Ha(t,o,r,s),Da=!1,h=t.memoizedState,o.state=h,Fa(t,r,o,i);var p=t.memoizedState;u!==f||h!==p||Ni.current||Da?("function"===typeof d&&(ja(t,n,d,r),p=t.memoizedState),(l=Da||Ba(t,n,l,r,h,p,s)||!1)?(c||"function"!==typeof o.UNSAFE_componentWillUpdate&&"function"!==typeof o.componentWillUpdate||("function"===typeof o.componentWillUpdate&&o.componentWillUpdate(r,p,s),"function"===typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,p,s)),"function"===typeof o.componentDidUpdate&&(t.flags|=4),"function"===typeof o.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof o.componentDidUpdate||u===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof o.getSnapshotBeforeUpdate||u===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),o.props=r,o.state=p,o.context=s,r=l):("function"!==typeof o.componentDidUpdate||u===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof o.getSnapshotBeforeUpdate||u===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Nu(e,t,n,r,a,i)}function Nu(e,t,n,r,i,a){Cu(e,t);var o=0!==(128&t.flags);if(!r&&!o)return i&&Fi(t,n,!1),Hu(e,t,a);r=t.stateNode,ku.current=t;var u=o&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&o?(t.child=Xa(t,e.child,null,a),t.child=Xa(t,null,u,a)):wu(e,t,u,a),t.memoizedState=r.state,i&&Fi(t,n,!0),t.child}function Du(e){var t=e.stateNode;t.pendingContext?Ri(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Ri(0,t.context,!1),ro(e,t.containerInfo)}function Au(e,t,n,r,i){return da(),pa(i),t.flags|=256,wu(e,t,n,r),t.child}var Lu,Ou,Ru,Pu={dehydrated:null,treeContext:null,retryLane:0};function Mu(e){return{baseLanes:e,cachePool:null,transitions:null}}function Fu(e,t,n){var r,i=t.pendingProps,o=uo.current,u=!1,s=0!==(128&t.flags);if((r=s)||(r=(null===e||null!==e.memoizedState)&&0!==(2&o)),r?(u=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(o|=1),Ci(uo,1&o),null===e)return la(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0===(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(s=i.children,e=i.fallback,u?(i=t.mode,u=t.child,s={mode:"hidden",children:s},0===(1&i)&&null!==u?(u.childLanes=0,u.pendingProps=s):u=Ml(s,i,0,null),e=Pl(e,i,n,null),u.return=t,e.return=t,u.sibling=e,t.child=u,t.child.memoizedState=Mu(n),t.memoizedState=Pu,e):Vu(t,s));if(null!==(o=e.memoizedState)&&null!==(r=o.dehydrated))return function(e,t,n,r,i,o,u){if(n)return 256&t.flags?(t.flags&=-257,Uu(e,t,u,r=fu(Error(a(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Ml({mode:"visible",children:r.children},i,0,null),(o=Pl(o,i,u,null)).flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,0!==(1&t.mode)&&Xa(t,e.child,null,u),t.child.memoizedState=Mu(u),t.memoizedState=Pu,o);if(0===(1&t.mode))return Uu(e,t,u,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var s=r.dgst;return r=s,Uu(e,t,u,r=fu(o=Error(a(419)),r,void 0))}if(s=0!==(u&e.childLanes),bu||s){if(null!==(r=Ns)){switch(u&-u){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!==(i&(r.suspendedLanes|u))?0:i)&&i!==o.retryLane&&(o.retryLane=i,Na(e,i),nl(r,e,i,-1))}return vl(),Uu(e,t,u,r=fu(Error(a(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=_l.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,ra=li(i.nextSibling),na=t,ia=!0,aa=null,null!==e&&(Wi[Gi++]=Xi,Wi[Gi++]=Yi,Wi[Gi++]=$i,Xi=e.id,Yi=e.overflow,$i=t),(t=Vu(t,r.children)).flags|=4096,t)}(e,t,s,i,r,o,n);if(u){u=i.fallback,s=t.mode,r=(o=e.child).sibling;var l={mode:"hidden",children:i.children};return 0===(1&s)&&t.child!==o?((i=t.child).childLanes=0,i.pendingProps=l,t.deletions=null):(i=Ol(o,l)).subtreeFlags=14680064&o.subtreeFlags,null!==r?u=Ol(r,u):(u=Pl(u,s,n,null)).flags|=2,u.return=t,i.return=t,i.sibling=u,t.child=i,i=u,u=t.child,s=null===(s=e.child.memoizedState)?Mu(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},u.memoizedState=s,u.childLanes=e.childLanes&~n,t.memoizedState=Pu,i}return e=(u=e.child).sibling,i=Ol(u,{mode:"visible",children:i.children}),0===(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function Vu(e,t){return(t=Ml({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Uu(e,t,n,r){return null!==r&&pa(r),Xa(t,e.child,null,n),(e=Vu(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function ju(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Sa(e.return,t,n)}function zu(e,t,n,r,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function Bu(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(wu(e,t,r.children,n),0!==(2&(r=uo.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!==(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&ju(e,n,t);else if(19===e.tag)ju(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ci(uo,r),0===(1&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===so(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),zu(t,!1,i,n,a);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===so(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}zu(t,!0,n,null,a);break;case"together":zu(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function qu(e,t){0===(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Hu(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Ms|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Ol(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Ol(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Ku(e,t){if(!ia)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Qu(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Wu(e,t,n){var r=t.pendingProps;switch(ta(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Qu(t),null;case 1:case 17:return Li(t.type)&&Oi(),Qu(t),null;case 3:return r=t.stateNode,io(),Ti(Ni),Ti(Ii),co(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(fa(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,null!==aa&&(ol(aa),aa=null))),Qu(t),null;case 5:oo(t);var i=no(to.current);if(n=t.type,null!==e&&null!=t.stateNode)Ou(e,t,n,r),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(a(166));return Qu(t),null}if(e=no(Za.current),fa(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[hi]=t,r[di]=o,e=0!==(1&t.mode),n){case"dialog":Ur("cancel",r),Ur("close",r);break;case"iframe":case"object":case"embed":Ur("load",r);break;case"video":case"audio":for(i=0;i<Pr.length;i++)Ur(Pr[i],r);break;case"source":Ur("error",r);break;case"img":case"image":case"link":Ur("error",r),Ur("load",r);break;case"details":Ur("toggle",r);break;case"input":X(r,o),Ur("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},Ur("invalid",r);break;case"textarea":ie(r,o),Ur("invalid",r)}for(var s in ge(n,o),i=null,o)if(o.hasOwnProperty(s)){var l=o[s];"children"===s?"string"===typeof l?r.textContent!==l&&(!0!==o.suppressHydrationWarning&&Jr(r.textContent,l,e),i=["children",l]):"number"===typeof l&&r.textContent!==""+l&&(!0!==o.suppressHydrationWarning&&Jr(r.textContent,l,e),i=["children",""+l]):u.hasOwnProperty(s)&&null!=l&&"onScroll"===s&&Ur("scroll",r)}switch(n){case"input":Q(r),Z(r,o,!0);break;case"textarea":Q(r),oe(r);break;case"select":case"option":break;default:"function"===typeof o.onClick&&(r.onclick=Zr)}r=i,t.updateQueue=r,null!==r&&(t.flags|=4)}else{s=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=ue(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=s.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),"select"===n&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[hi]=t,e[di]=r,Lu(e,t),t.stateNode=e;e:{switch(s=ke(n,r),n){case"dialog":Ur("cancel",e),Ur("close",e),i=r;break;case"iframe":case"object":case"embed":Ur("load",e),i=r;break;case"video":case"audio":for(i=0;i<Pr.length;i++)Ur(Pr[i],e);i=r;break;case"source":Ur("error",e),i=r;break;case"img":case"image":case"link":Ur("error",e),Ur("load",e),i=r;break;case"details":Ur("toggle",e),i=r;break;case"input":X(e,r),i=$(e,r),Ur("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=F({},r,{value:void 0}),Ur("invalid",e);break;case"textarea":ie(e,r),i=re(e,r),Ur("invalid",e)}for(o in ge(n,i),l=i)if(l.hasOwnProperty(o)){var c=l[o];"style"===o?ye(e,c):"dangerouslySetInnerHTML"===o?null!=(c=c?c.__html:void 0)&&fe(e,c):"children"===o?"string"===typeof c?("textarea"!==n||""!==c)&&he(e,c):"number"===typeof c&&he(e,""+c):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(u.hasOwnProperty(o)?null!=c&&"onScroll"===o&&Ur("scroll",e):null!=c&&k(e,o,c,s))}switch(n){case"input":Q(e),Z(e,r,!1);break;case"textarea":Q(e),oe(e);break;case"option":null!=r.value&&e.setAttribute("value",""+H(r.value));break;case"select":e.multiple=!!r.multiple,null!=(o=r.value)?ne(e,!!r.multiple,o,!1):null!=r.defaultValue&&ne(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof i.onClick&&(e.onclick=Zr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Qu(t),null;case 6:if(e&&null!=t.stateNode)Ru(0,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(a(166));if(n=no(to.current),no(Za.current),fa(t)){if(r=t.stateNode,n=t.memoizedProps,r[hi]=t,(o=r.nodeValue!==n)&&null!==(e=na))switch(e.tag){case 3:Jr(r.nodeValue,n,0!==(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Jr(r.nodeValue,n,0!==(1&e.mode))}o&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[hi]=t,t.stateNode=r}return Qu(t),null;case 13:if(Ti(uo),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(ia&&null!==ra&&0!==(1&t.mode)&&0===(128&t.flags))ha(),da(),t.flags|=98560,o=!1;else if(o=fa(t),null!==r&&null!==r.dehydrated){if(null===e){if(!o)throw Error(a(318));if(!(o=null!==(o=t.memoizedState)?o.dehydrated:null))throw Error(a(317));o[hi]=t}else da(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Qu(t),o=!1}else null!==aa&&(ol(aa),aa=null),o=!0;if(!o)return 65536&t.flags?t:null}return 0!==(128&t.flags)?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!==(1&t.mode)&&(null===e||0!==(1&uo.current)?0===Rs&&(Rs=3):vl())),null!==t.updateQueue&&(t.flags|=4),Qu(t),null);case 4:return io(),null===e&&Br(t.stateNode.containerInfo),Qu(t),null;case 10:return Ea(t.type._context),Qu(t),null;case 19:if(Ti(uo),null===(o=t.memoizedState))return Qu(t),null;if(r=0!==(128&t.flags),null===(s=o.rendering))if(r)Ku(o,!1);else{if(0!==Rs||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(s=so(e))){for(t.flags|=128,Ku(o,!1),null!==(r=s.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(o=n).flags&=14680066,null===(s=o.alternate)?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=s.childLanes,o.lanes=s.lanes,o.child=s.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=s.memoizedProps,o.memoizedState=s.memoizedState,o.updateQueue=s.updateQueue,o.type=s.type,e=s.dependencies,o.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ci(uo,1&uo.current|2),t.child}e=e.sibling}null!==o.tail&&Ye()>Bs&&(t.flags|=128,r=!0,Ku(o,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=so(s))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Ku(o,!0),null===o.tail&&"hidden"===o.tailMode&&!s.alternate&&!ia)return Qu(t),null}else 2*Ye()-o.renderingStartTime>Bs&&1073741824!==n&&(t.flags|=128,r=!0,Ku(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(null!==(n=o.last)?n.sibling=s:t.child=s,o.last=s)}return null!==o.tail?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Ye(),t.sibling=null,n=uo.current,Ci(uo,r?1&n|2:1&n),t):(Qu(t),null);case 22:case 23:return fl(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!==(1&t.mode)?0!==(1073741824&Ls)&&(Qu(t),6&t.subtreeFlags&&(t.flags|=8192)):Qu(t),null;case 24:case 25:return null}throw Error(a(156,t.tag))}function Gu(e,t){switch(ta(t),t.tag){case 1:return Li(t.type)&&Oi(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return io(),Ti(Ni),Ti(Ii),co(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 5:return oo(t),null;case 13:if(Ti(uo),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(a(340));da()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Ti(uo),null;case 4:return io(),null;case 10:return Ea(t.type._context),null;case 22:case 23:return fl(),null;default:return null}}Lu=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ou=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,no(Za.current);var a,o=null;switch(n){case"input":i=$(e,i),r=$(e,r),o=[];break;case"select":i=F({},i,{value:void 0}),r=F({},r,{value:void 0}),o=[];break;case"textarea":i=re(e,i),r=re(e,r),o=[];break;default:"function"!==typeof i.onClick&&"function"===typeof r.onClick&&(e.onclick=Zr)}for(c in ge(n,r),n=null,i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&null!=i[c])if("style"===c){var s=i[c];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(u.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in r){var l=r[c];if(s=null!=i?i[c]:void 0,r.hasOwnProperty(c)&&l!==s&&(null!=l||null!=s))if("style"===c)if(s){for(a in s)!s.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&s[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(o||(o=[]),o.push(c,n)),n=l;else"dangerouslySetInnerHTML"===c?(l=l?l.__html:void 0,s=s?s.__html:void 0,null!=l&&s!==l&&(o=o||[]).push(c,l)):"children"===c?"string"!==typeof l&&"number"!==typeof l||(o=o||[]).push(c,""+l):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(u.hasOwnProperty(c)?(null!=l&&"onScroll"===c&&Ur("scroll",e),o||s===l||(o=[])):(o=o||[]).push(c,l))}n&&(o=o||[]).push("style",n);var c=o;(t.updateQueue=c)&&(t.flags|=4)}},Ru=function(e,t,n,r){n!==r&&(t.flags|=4)};var $u=!1,Xu=!1,Yu="function"===typeof WeakSet?WeakSet:Set,Ju=null;function Zu(e,t){var n=e.ref;if(null!==n)if("function"===typeof n)try{n(null)}catch(r){xl(e,t,r)}else n.current=null}function es(e,t,n){try{n()}catch(r){xl(e,t,r)}}var ts=!1;function ns(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,void 0!==a&&es(t,n,a)}i=i.next}while(i!==r)}}function rs(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function is(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"===typeof t?t(e):t.current=e}}function as(e){var t=e.alternate;null!==t&&(e.alternate=null,as(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[hi],delete t[di],delete t[vi],delete t[yi],delete t[mi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function os(e){return 5===e.tag||3===e.tag||4===e.tag}function us(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||os(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function ss(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Zr));else if(4!==r&&null!==(e=e.child))for(ss(e,t,n),e=e.sibling;null!==e;)ss(e,t,n),e=e.sibling}function ls(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(ls(e,t,n),e=e.sibling;null!==e;)ls(e,t,n),e=e.sibling}var cs=null,fs=!1;function hs(e,t,n){for(n=n.child;null!==n;)ds(e,t,n),n=n.sibling}function ds(e,t,n){if(at&&"function"===typeof at.onCommitFiberUnmount)try{at.onCommitFiberUnmount(it,n)}catch(u){}switch(n.tag){case 5:Xu||Zu(n,t);case 6:var r=cs,i=fs;cs=null,hs(e,t,n),fs=i,null!==(cs=r)&&(fs?(e=cs,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):cs.removeChild(n.stateNode));break;case 18:null!==cs&&(fs?(e=cs,n=n.stateNode,8===e.nodeType?si(e.parentNode,n):1===e.nodeType&&si(e,n),Bt(e)):si(cs,n.stateNode));break;case 4:r=cs,i=fs,cs=n.stateNode.containerInfo,fs=!0,hs(e,t,n),cs=r,fs=i;break;case 0:case 11:case 14:case 15:if(!Xu&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,void 0!==o&&(0!==(2&a)||0!==(4&a))&&es(n,t,o),i=i.next}while(i!==r)}hs(e,t,n);break;case 1:if(!Xu&&(Zu(n,t),"function"===typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){xl(n,t,u)}hs(e,t,n);break;case 21:hs(e,t,n);break;case 22:1&n.mode?(Xu=(r=Xu)||null!==n.memoizedState,hs(e,t,n),Xu=r):hs(e,t,n);break;default:hs(e,t,n)}}function ps(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Yu),t.forEach((function(t){var r=Il.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function vs(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,u=t,s=u;e:for(;null!==s;){switch(s.tag){case 5:cs=s.stateNode,fs=!1;break e;case 3:case 4:cs=s.stateNode.containerInfo,fs=!0;break e}s=s.return}if(null===cs)throw Error(a(160));ds(o,u,i),cs=null,fs=!1;var l=i.alternate;null!==l&&(l.return=null),i.return=null}catch(c){xl(i,t,c)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)ys(t,e),t=t.sibling}function ys(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(vs(t,e),ms(e),4&r){try{ns(3,e,e.return),rs(3,e)}catch(y){xl(e,e.return,y)}try{ns(5,e,e.return)}catch(y){xl(e,e.return,y)}}break;case 1:vs(t,e),ms(e),512&r&&null!==n&&Zu(n,n.return);break;case 5:if(vs(t,e),ms(e),512&r&&null!==n&&Zu(n,n.return),32&e.flags){var i=e.stateNode;try{he(i,"")}catch(y){xl(e,e.return,y)}}if(4&r&&null!=(i=e.stateNode)){var o=e.memoizedProps,u=null!==n?n.memoizedProps:o,s=e.type,l=e.updateQueue;if(e.updateQueue=null,null!==l)try{"input"===s&&"radio"===o.type&&null!=o.name&&Y(i,o),ke(s,u);var c=ke(s,o);for(u=0;u<l.length;u+=2){var f=l[u],h=l[u+1];"style"===f?ye(i,h):"dangerouslySetInnerHTML"===f?fe(i,h):"children"===f?he(i,h):k(i,f,h,c)}switch(s){case"input":J(i,o);break;case"textarea":ae(i,o);break;case"select":var d=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var p=o.value;null!=p?ne(i,!!o.multiple,p,!1):d!==!!o.multiple&&(null!=o.defaultValue?ne(i,!!o.multiple,o.defaultValue,!0):ne(i,!!o.multiple,o.multiple?[]:"",!1))}i[di]=o}catch(y){xl(e,e.return,y)}}break;case 6:if(vs(t,e),ms(e),4&r){if(null===e.stateNode)throw Error(a(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(y){xl(e,e.return,y)}}break;case 3:if(vs(t,e),ms(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Bt(t.containerInfo)}catch(y){xl(e,e.return,y)}break;case 4:default:vs(t,e),ms(e);break;case 13:vs(t,e),ms(e),8192&(i=e.child).flags&&(o=null!==i.memoizedState,i.stateNode.isHidden=o,!o||null!==i.alternate&&null!==i.alternate.memoizedState||(zs=Ye())),4&r&&ps(e);break;case 22:if(f=null!==n&&null!==n.memoizedState,1&e.mode?(Xu=(c=Xu)||f,vs(t,e),Xu=c):vs(t,e),ms(e),8192&r){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!f&&0!==(1&e.mode))for(Ju=e,f=e.child;null!==f;){for(h=Ju=f;null!==Ju;){switch(p=(d=Ju).child,d.tag){case 0:case 11:case 14:case 15:ns(4,d,d.return);break;case 1:Zu(d,d.return);var v=d.stateNode;if("function"===typeof v.componentWillUnmount){r=d,n=d.return;try{t=r,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(y){xl(r,n,y)}}break;case 5:Zu(d,d.return);break;case 22:if(null!==d.memoizedState){ws(h);continue}}null!==p?(p.return=d,Ju=p):ws(h)}f=f.sibling}e:for(f=null,h=e;;){if(5===h.tag){if(null===f){f=h;try{i=h.stateNode,c?"function"===typeof(o=i.style).setProperty?o.setProperty("display","none","important"):o.display="none":(s=h.stateNode,u=void 0!==(l=h.memoizedProps.style)&&null!==l&&l.hasOwnProperty("display")?l.display:null,s.style.display=ve("display",u))}catch(y){xl(e,e.return,y)}}}else if(6===h.tag){if(null===f)try{h.stateNode.nodeValue=c?"":h.memoizedProps}catch(y){xl(e,e.return,y)}}else if((22!==h.tag&&23!==h.tag||null===h.memoizedState||h===e)&&null!==h.child){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;null===h.sibling;){if(null===h.return||h.return===e)break e;f===h&&(f=null),h=h.return}f===h&&(f=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:vs(t,e),ms(e),4&r&&ps(e);case 21:}}function ms(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(os(n)){var r=n;break e}n=n.return}throw Error(a(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(he(i,""),r.flags&=-33),ls(e,us(e),i);break;case 3:case 4:var o=r.stateNode.containerInfo;ss(e,us(e),o);break;default:throw Error(a(161))}}catch(u){xl(e,e.return,u)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function gs(e,t,n){Ju=e,ks(e,t,n)}function ks(e,t,n){for(var r=0!==(1&e.mode);null!==Ju;){var i=Ju,a=i.child;if(22===i.tag&&r){var o=null!==i.memoizedState||$u;if(!o){var u=i.alternate,s=null!==u&&null!==u.memoizedState||Xu;u=$u;var l=Xu;if($u=o,(Xu=s)&&!l)for(Ju=i;null!==Ju;)s=(o=Ju).child,22===o.tag&&null!==o.memoizedState?Es(i):null!==s?(s.return=o,Ju=s):Es(i);for(;null!==a;)Ju=a,ks(a,t,n),a=a.sibling;Ju=i,$u=u,Xu=l}bs(e)}else 0!==(8772&i.subtreeFlags)&&null!==a?(a.return=i,Ju=a):bs(e)}}function bs(e){for(;null!==Ju;){var t=Ju;if(0!==(8772&t.flags)){var n=t.alternate;try{if(0!==(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Xu||rs(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Xu)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:ya(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;null!==o&&Va(t,o,r);break;case 3:var u=t.updateQueue;if(null!==u){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Va(t,u,n)}break;case 5:var s=t.stateNode;if(null===n&&4&t.flags){n=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var c=t.alternate;if(null!==c){var f=c.memoizedState;if(null!==f){var h=f.dehydrated;null!==h&&Bt(h)}}}break;default:throw Error(a(163))}Xu||512&t.flags&&is(t)}catch(d){xl(t,t.return,d)}}if(t===e){Ju=null;break}if(null!==(n=t.sibling)){n.return=t.return,Ju=n;break}Ju=t.return}}function ws(e){for(;null!==Ju;){var t=Ju;if(t===e){Ju=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Ju=n;break}Ju=t.return}}function Es(e){for(;null!==Ju;){var t=Ju;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{rs(4,t)}catch(s){xl(t,n,s)}break;case 1:var r=t.stateNode;if("function"===typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(s){xl(t,i,s)}}var a=t.return;try{is(t)}catch(s){xl(t,a,s)}break;case 5:var o=t.return;try{is(t)}catch(s){xl(t,o,s)}}}catch(s){xl(t,t.return,s)}if(t===e){Ju=null;break}var u=t.sibling;if(null!==u){u.return=t.return,Ju=u;break}Ju=t.return}}var Ss,xs=Math.ceil,Ts=b.ReactCurrentDispatcher,Cs=b.ReactCurrentOwner,_s=b.ReactCurrentBatchConfig,Is=0,Ns=null,Ds=null,As=0,Ls=0,Os=xi(0),Rs=0,Ps=null,Ms=0,Fs=0,Vs=0,Us=null,js=null,zs=0,Bs=1/0,qs=null,Hs=!1,Ks=null,Qs=null,Ws=!1,Gs=null,$s=0,Xs=0,Ys=null,Js=-1,Zs=0;function el(){return 0!==(6&Is)?Ye():-1!==Js?Js:Js=Ye()}function tl(e){return 0===(1&e.mode)?1:0!==(2&Is)&&0!==As?As&-As:null!==va.transition?(0===Zs&&(Zs=vt()),Zs):0!==(e=kt)?e:e=void 0===(e=window.event)?16:Xt(e.type)}function nl(e,t,n,r){if(50<Xs)throw Xs=0,Ys=null,Error(a(185));mt(e,n,r),0!==(2&Is)&&e===Ns||(e===Ns&&(0===(2&Is)&&(Fs|=n),4===Rs&&ul(e,As)),rl(e,r),1===n&&0===Is&&0===(1&t.mode)&&(Bs=Ye()+500,Ui&&Bi()))}function rl(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-ot(a),u=1<<o,s=i[o];-1===s?0!==(u&n)&&0===(u&r)||(i[o]=dt(u,t)):s<=t&&(e.expiredLanes|=u),a&=~u}}(e,t);var r=ht(e,e===Ns?As:0);if(0===r)null!==n&&Ge(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Ge(n),1===t)0===e.tag?function(e){Ui=!0,zi(e)}(sl.bind(null,e)):zi(sl.bind(null,e)),oi((function(){0===(6&Is)&&Bi()})),n=null;else{switch(bt(r)){case 1:n=Ze;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=Nl(n,il.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function il(e,t){if(Js=-1,Zs=0,0!==(6&Is))throw Error(a(327));var n=e.callbackNode;if(El()&&e.callbackNode!==n)return null;var r=ht(e,e===Ns?As:0);if(0===r)return null;if(0!==(30&r)||0!==(r&e.expiredLanes)||t)t=yl(e,r);else{t=r;var i=Is;Is|=2;var o=pl();for(Ns===e&&As===t||(qs=null,Bs=Ye()+500,hl(e,t));;)try{gl();break}catch(s){dl(e,s)}wa(),Ts.current=o,Is=i,null!==Ds?t=0:(Ns=null,As=0,t=Rs)}if(0!==t){if(2===t&&(0!==(i=pt(e))&&(r=i,t=al(e,i))),1===t)throw n=Ps,hl(e,0),ul(e,r),rl(e,Ye()),n;if(6===t)ul(e,r);else{if(i=e.current.alternate,0===(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!ur(a(),i))return!1}catch(u){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)&&(2===(t=yl(e,r))&&(0!==(o=pt(e))&&(r=o,t=al(e,o))),1===t))throw n=Ps,hl(e,0),ul(e,r),rl(e,Ye()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(a(345));case 2:case 5:wl(e,js,qs);break;case 3:if(ul(e,r),(130023424&r)===r&&10<(t=zs+500-Ye())){if(0!==ht(e,0))break;if(((i=e.suspendedLanes)&r)!==r){el(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ri(wl.bind(null,e,js,qs),t);break}wl(e,js,qs);break;case 4:if(ul(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var u=31-ot(r);o=1<<u,(u=t[u])>i&&(i=u),r&=~o}if(r=i,10<(r=(120>(r=Ye()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*xs(r/1960))-r)){e.timeoutHandle=ri(wl.bind(null,e,js,qs),r);break}wl(e,js,qs);break;default:throw Error(a(329))}}}return rl(e,Ye()),e.callbackNode===n?il.bind(null,e):null}function al(e,t){var n=Us;return e.current.memoizedState.isDehydrated&&(hl(e,t).flags|=256),2!==(e=yl(e,t))&&(t=js,js=n,null!==t&&ol(t)),e}function ol(e){null===js?js=e:js.push.apply(js,e)}function ul(e,t){for(t&=~Vs,t&=~Fs,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-ot(t),r=1<<n;e[n]=-1,t&=~r}}function sl(e){if(0!==(6&Is))throw Error(a(327));El();var t=ht(e,0);if(0===(1&t))return rl(e,Ye()),null;var n=yl(e,t);if(0!==e.tag&&2===n){var r=pt(e);0!==r&&(t=r,n=al(e,r))}if(1===n)throw n=Ps,hl(e,0),ul(e,t),rl(e,Ye()),n;if(6===n)throw Error(a(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,wl(e,js,qs),rl(e,Ye()),null}function ll(e,t){var n=Is;Is|=1;try{return e(t)}finally{0===(Is=n)&&(Bs=Ye()+500,Ui&&Bi())}}function cl(e){null!==Gs&&0===Gs.tag&&0===(6&Is)&&El();var t=Is;Is|=1;var n=_s.transition,r=kt;try{if(_s.transition=null,kt=1,e)return e()}finally{kt=r,_s.transition=n,0===(6&(Is=t))&&Bi()}}function fl(){Ls=Os.current,Ti(Os)}function hl(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ii(n)),null!==Ds)for(n=Ds.return;null!==n;){var r=n;switch(ta(r),r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&Oi();break;case 3:io(),Ti(Ni),Ti(Ii),co();break;case 5:oo(r);break;case 4:io();break;case 13:case 19:Ti(uo);break;case 10:Ea(r.type._context);break;case 22:case 23:fl()}n=n.return}if(Ns=e,Ds=e=Ol(e.current,null),As=Ls=t,Rs=0,Ps=null,Vs=Fs=Ms=0,js=Us=null,null!==Ca){for(t=0;t<Ca.length;t++)if(null!==(r=(n=Ca[t]).interleaved)){n.interleaved=null;var i=r.next,a=n.pending;if(null!==a){var o=a.next;a.next=i,r.next=o}n.pending=r}Ca=null}return e}function dl(e,t){for(;;){var n=Ds;try{if(wa(),fo.current=ou,go){for(var r=vo.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}go=!1}if(po=0,mo=yo=vo=null,ko=!1,bo=0,Cs.current=null,null===n||null===n.return){Rs=1,Ps=t,Ds=null;break}e:{var o=e,u=n.return,s=n,l=t;if(t=As,s.flags|=32768,null!==l&&"object"===typeof l&&"function"===typeof l.then){var c=l,f=s,h=f.tag;if(0===(1&f.mode)&&(0===h||11===h||15===h)){var d=f.alternate;d?(f.updateQueue=d.updateQueue,f.memoizedState=d.memoizedState,f.lanes=d.lanes):(f.updateQueue=null,f.memoizedState=null)}var p=mu(u);if(null!==p){p.flags&=-257,gu(p,u,s,0,t),1&p.mode&&yu(o,c,t),l=c;var v=(t=p).updateQueue;if(null===v){var y=new Set;y.add(l),t.updateQueue=y}else v.add(l);break e}if(0===(1&t)){yu(o,c,t),vl();break e}l=Error(a(426))}else if(ia&&1&s.mode){var m=mu(u);if(null!==m){0===(65536&m.flags)&&(m.flags|=256),gu(m,u,s,0,t),pa(cu(l,s));break e}}o=l=cu(l,s),4!==Rs&&(Rs=2),null===Us?Us=[o]:Us.push(o),o=u;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t,Ma(o,pu(0,l,t));break e;case 1:s=l;var g=o.type,k=o.stateNode;if(0===(128&o.flags)&&("function"===typeof g.getDerivedStateFromError||null!==k&&"function"===typeof k.componentDidCatch&&(null===Qs||!Qs.has(k)))){o.flags|=65536,t&=-t,o.lanes|=t,Ma(o,vu(o,s,t));break e}}o=o.return}while(null!==o)}bl(n)}catch(b){t=b,Ds===n&&null!==n&&(Ds=n=n.return);continue}break}}function pl(){var e=Ts.current;return Ts.current=ou,null===e?ou:e}function vl(){0!==Rs&&3!==Rs&&2!==Rs||(Rs=4),null===Ns||0===(268435455&Ms)&&0===(268435455&Fs)||ul(Ns,As)}function yl(e,t){var n=Is;Is|=2;var r=pl();for(Ns===e&&As===t||(qs=null,hl(e,t));;)try{ml();break}catch(i){dl(e,i)}if(wa(),Is=n,Ts.current=r,null!==Ds)throw Error(a(261));return Ns=null,As=0,Rs}function ml(){for(;null!==Ds;)kl(Ds)}function gl(){for(;null!==Ds&&!$e();)kl(Ds)}function kl(e){var t=Ss(e.alternate,e,Ls);e.memoizedProps=e.pendingProps,null===t?bl(e):Ds=t,Cs.current=null}function bl(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(32768&t.flags)){if(null!==(n=Wu(n,t,Ls)))return void(Ds=n)}else{if(null!==(n=Gu(n,t)))return n.flags&=32767,void(Ds=n);if(null===e)return Rs=6,void(Ds=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Ds=t);Ds=t=e}while(null!==t);0===Rs&&(Rs=5)}function wl(e,t,n){var r=kt,i=_s.transition;try{_s.transition=null,kt=1,function(e,t,n,r){do{El()}while(null!==Gs);if(0!==(6&Is))throw Error(a(327));n=e.finishedWork;var i=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-ot(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}(e,o),e===Ns&&(Ds=Ns=null,As=0),0===(2064&n.subtreeFlags)&&0===(2064&n.flags)||Ws||(Ws=!0,Nl(tt,(function(){return El(),null}))),o=0!==(15990&n.flags),0!==(15990&n.subtreeFlags)||o){o=_s.transition,_s.transition=null;var u=kt;kt=1;var s=Is;Is|=4,Cs.current=null,function(e,t){if(ei=Ht,dr(e=hr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch(w){n=null;break e}var u=0,s=-1,l=-1,c=0,f=0,h=e,d=null;t:for(;;){for(var p;h!==n||0!==i&&3!==h.nodeType||(s=u+i),h!==o||0!==r&&3!==h.nodeType||(l=u+r),3===h.nodeType&&(u+=h.nodeValue.length),null!==(p=h.firstChild);)d=h,h=p;for(;;){if(h===e)break t;if(d===n&&++c===i&&(s=u),d===o&&++f===r&&(l=u),null!==(p=h.nextSibling))break;d=(h=d).parentNode}h=p}n=-1===s||-1===l?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(ti={focusedElem:e,selectionRange:n},Ht=!1,Ju=t;null!==Ju;)if(e=(t=Ju).child,0!==(1028&t.subtreeFlags)&&null!==e)e.return=t,Ju=e;else for(;null!==Ju;){t=Ju;try{var v=t.alternate;if(0!==(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==v){var y=v.memoizedProps,m=v.memoizedState,g=t.stateNode,k=g.getSnapshotBeforeUpdate(t.elementType===t.type?y:ya(t.type,y),m);g.__reactInternalSnapshotBeforeUpdate=k}break;case 3:var b=t.stateNode.containerInfo;1===b.nodeType?b.textContent="":9===b.nodeType&&b.documentElement&&b.removeChild(b.documentElement);break;default:throw Error(a(163))}}catch(w){xl(t,t.return,w)}if(null!==(e=t.sibling)){e.return=t.return,Ju=e;break}Ju=t.return}v=ts,ts=!1}(e,n),ys(n,e),pr(ti),Ht=!!ei,ti=ei=null,e.current=n,gs(n,e,i),Xe(),Is=s,kt=u,_s.transition=o}else e.current=n;if(Ws&&(Ws=!1,Gs=e,$s=i),0===(o=e.pendingLanes)&&(Qs=null),function(e){if(at&&"function"===typeof at.onCommitFiberRoot)try{at.onCommitFiberRoot(it,e,void 0,128===(128&e.current.flags))}catch(t){}}(n.stateNode),rl(e,Ye()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)r((i=t[n]).value,{componentStack:i.stack,digest:i.digest});if(Hs)throw Hs=!1,e=Ks,Ks=null,e;0!==(1&$s)&&0!==e.tag&&El(),0!==(1&(o=e.pendingLanes))?e===Ys?Xs++:(Xs=0,Ys=e):Xs=0,Bi()}(e,t,n,r)}finally{_s.transition=i,kt=r}return null}function El(){if(null!==Gs){var e=bt($s),t=_s.transition,n=kt;try{if(_s.transition=null,kt=16>e?16:e,null===Gs)var r=!1;else{if(e=Gs,Gs=null,$s=0,0!==(6&Is))throw Error(a(331));var i=Is;for(Is|=4,Ju=e.current;null!==Ju;){var o=Ju,u=o.child;if(0!==(16&Ju.flags)){var s=o.deletions;if(null!==s){for(var l=0;l<s.length;l++){var c=s[l];for(Ju=c;null!==Ju;){var f=Ju;switch(f.tag){case 0:case 11:case 15:ns(8,f,o)}var h=f.child;if(null!==h)h.return=f,Ju=h;else for(;null!==Ju;){var d=(f=Ju).sibling,p=f.return;if(as(f),f===c){Ju=null;break}if(null!==d){d.return=p,Ju=d;break}Ju=p}}}var v=o.alternate;if(null!==v){var y=v.child;if(null!==y){v.child=null;do{var m=y.sibling;y.sibling=null,y=m}while(null!==y)}}Ju=o}}if(0!==(2064&o.subtreeFlags)&&null!==u)u.return=o,Ju=u;else e:for(;null!==Ju;){if(0!==(2048&(o=Ju).flags))switch(o.tag){case 0:case 11:case 15:ns(9,o,o.return)}var g=o.sibling;if(null!==g){g.return=o.return,Ju=g;break e}Ju=o.return}}var k=e.current;for(Ju=k;null!==Ju;){var b=(u=Ju).child;if(0!==(2064&u.subtreeFlags)&&null!==b)b.return=u,Ju=b;else e:for(u=k;null!==Ju;){if(0!==(2048&(s=Ju).flags))try{switch(s.tag){case 0:case 11:case 15:rs(9,s)}}catch(E){xl(s,s.return,E)}if(s===u){Ju=null;break e}var w=s.sibling;if(null!==w){w.return=s.return,Ju=w;break e}Ju=s.return}}if(Is=i,Bi(),at&&"function"===typeof at.onPostCommitFiberRoot)try{at.onPostCommitFiberRoot(it,e)}catch(E){}r=!0}return r}finally{kt=n,_s.transition=t}}return!1}function Sl(e,t,n){e=Ra(e,t=pu(0,t=cu(n,t),1),1),t=el(),null!==e&&(mt(e,1,t),rl(e,t))}function xl(e,t,n){if(3===e.tag)Sl(e,e,n);else for(;null!==t;){if(3===t.tag){Sl(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Qs||!Qs.has(r))){t=Ra(t,e=vu(t,e=cu(n,e),1),1),e=el(),null!==t&&(mt(t,1,e),rl(t,e));break}}t=t.return}}function Tl(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=el(),e.pingedLanes|=e.suspendedLanes&n,Ns===e&&(As&n)===n&&(4===Rs||3===Rs&&(130023424&As)===As&&500>Ye()-zs?hl(e,0):Vs|=n),rl(e,t)}function Cl(e,t){0===t&&(0===(1&e.mode)?t=1:(t=ct,0===(130023424&(ct<<=1))&&(ct=4194304)));var n=el();null!==(e=Na(e,t))&&(mt(e,t,n),rl(e,n))}function _l(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Cl(e,n)}function Il(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(a(314))}null!==r&&r.delete(t),Cl(e,n)}function Nl(e,t){return We(e,t)}function Dl(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Al(e,t,n,r){return new Dl(e,t,n,r)}function Ll(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Ol(e,t){var n=e.alternate;return null===n?((n=Al(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Rl(e,t,n,r,i,o){var u=2;if(r=e,"function"===typeof e)Ll(e)&&(u=1);else if("string"===typeof e)u=5;else e:switch(e){case S:return Pl(n.children,i,o,t);case x:u=8,i|=8;break;case T:return(e=Al(12,n,t,2|i)).elementType=T,e.lanes=o,e;case N:return(e=Al(13,n,t,i)).elementType=N,e.lanes=o,e;case D:return(e=Al(19,n,t,i)).elementType=D,e.lanes=o,e;case O:return Ml(n,i,o,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case C:u=10;break e;case _:u=9;break e;case I:u=11;break e;case A:u=14;break e;case L:u=16,r=null;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Al(u,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function Pl(e,t,n,r){return(e=Al(7,e,r,t)).lanes=n,e}function Ml(e,t,n,r){return(e=Al(22,e,r,t)).elementType=O,e.lanes=n,e.stateNode={isHidden:!1},e}function Fl(e,t,n){return(e=Al(6,e,null,t)).lanes=n,e}function Vl(e,t,n){return(t=Al(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Ul(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=yt(0),this.expirationTimes=yt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=yt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function jl(e,t,n,r,i,a,o,u,s){return e=new Ul(e,t,n,u,s),1===t?(t=1,!0===a&&(t|=8)):t=0,a=Al(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Aa(a),e}function zl(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:E,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function Bl(e){if(!e)return _i;e:{if(Be(e=e._reactInternals)!==e||1!==e.tag)throw Error(a(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Li(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(a(171))}if(1===e.tag){var n=e.type;if(Li(n))return Pi(e,n,t)}return t}function ql(e,t,n,r,i,a,o,u,s){return(e=jl(n,r,!0,e,0,a,0,u,s)).context=Bl(null),n=e.current,(a=Oa(r=el(),i=tl(n))).callback=void 0!==t&&null!==t?t:null,Ra(n,a,i),e.current.lanes=i,mt(e,i,r),rl(e,r),e}function Hl(e,t,n,r){var i=t.current,a=el(),o=tl(i);return n=Bl(n),null===t.context?t.context=n:t.pendingContext=n,(t=Oa(a,o)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Ra(i,t,o))&&(nl(e,i,o,a),Pa(e,i,o)),o}function Kl(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Ql(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Wl(e,t){Ql(e,t),(e=e.alternate)&&Ql(e,t)}Ss=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Ni.current)bu=!0;else{if(0===(e.lanes&n)&&0===(128&t.flags))return bu=!1,function(e,t,n){switch(t.tag){case 3:Du(t),da();break;case 5:ao(t);break;case 1:Li(t.type)&&Mi(t);break;case 4:ro(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Ci(ma,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Ci(uo,1&uo.current),t.flags|=128,null):0!==(n&t.child.childLanes)?Fu(e,t,n):(Ci(uo,1&uo.current),null!==(e=Hu(e,t,n))?e.sibling:null);Ci(uo,1&uo.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(128&e.flags)){if(r)return Bu(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ci(uo,uo.current),r)break;return null;case 22:case 23:return t.lanes=0,Tu(e,t,n)}return Hu(e,t,n)}(e,t,n);bu=0!==(131072&e.flags)}else bu=!1,ia&&0!==(1048576&t.flags)&&Zi(t,Qi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;qu(e,t),e=t.pendingProps;var i=Ai(t,Ii.current);xa(t,n),i=xo(null,t,r,e,i,n);var o=To();return t.flags|=1,"object"===typeof i&&null!==i&&"function"===typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Li(r)?(o=!0,Mi(t)):o=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,Aa(t),i.updater=za,t.stateNode=i,i._reactInternals=t,Ka(t,r,e,n),t=Nu(null,t,r,!0,o,n)):(t.tag=0,ia&&o&&ea(t),wu(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(qu(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"===typeof e)return Ll(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===I)return 11;if(e===A)return 14}return 2}(r),e=ya(r,e),i){case 0:t=_u(null,t,r,e,n);break e;case 1:t=Iu(null,t,r,e,n);break e;case 11:t=Eu(null,t,r,e,n);break e;case 14:t=Su(null,t,r,ya(r.type,e),n);break e}throw Error(a(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,_u(e,t,r,i=t.elementType===r?i:ya(r,i),n);case 1:return r=t.type,i=t.pendingProps,Iu(e,t,r,i=t.elementType===r?i:ya(r,i),n);case 3:e:{if(Du(t),null===e)throw Error(a(387));r=t.pendingProps,i=(o=t.memoizedState).element,La(e,t),Fa(t,r,null,n);var u=t.memoizedState;if(r=u.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:u.cache,pendingSuspenseBoundaries:u.pendingSuspenseBoundaries,transitions:u.transitions},t.updateQueue.baseState=o,t.memoizedState=o,256&t.flags){t=Au(e,t,r,n,i=cu(Error(a(423)),t));break e}if(r!==i){t=Au(e,t,r,n,i=cu(Error(a(424)),t));break e}for(ra=li(t.stateNode.containerInfo.firstChild),na=t,ia=!0,aa=null,n=Ya(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(da(),r===i){t=Hu(e,t,n);break e}wu(e,t,r,n)}t=t.child}return t;case 5:return ao(t),null===e&&la(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,u=i.children,ni(r,i)?u=null:null!==o&&ni(r,o)&&(t.flags|=32),Cu(e,t),wu(e,t,u,n),t.child;case 6:return null===e&&la(t),null;case 13:return Fu(e,t,n);case 4:return ro(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Xa(t,null,r,n):wu(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,Eu(e,t,r,i=t.elementType===r?i:ya(r,i),n);case 7:return wu(e,t,t.pendingProps,n),t.child;case 8:case 12:return wu(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,u=i.value,Ci(ma,r._currentValue),r._currentValue=u,null!==o)if(ur(o.value,u)){if(o.children===i.children&&!Ni.current){t=Hu(e,t,n);break e}}else for(null!==(o=t.child)&&(o.return=t);null!==o;){var s=o.dependencies;if(null!==s){u=o.child;for(var l=s.firstContext;null!==l;){if(l.context===r){if(1===o.tag){(l=Oa(-1,n&-n)).tag=2;var c=o.updateQueue;if(null!==c){var f=(c=c.shared).pending;null===f?l.next=l:(l.next=f.next,f.next=l),c.pending=l}}o.lanes|=n,null!==(l=o.alternate)&&(l.lanes|=n),Sa(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(10===o.tag)u=o.type===t.type?null:o.child;else if(18===o.tag){if(null===(u=o.return))throw Error(a(341));u.lanes|=n,null!==(s=u.alternate)&&(s.lanes|=n),Sa(u,n,t),u=o.sibling}else u=o.child;if(null!==u)u.return=o;else for(u=o;null!==u;){if(u===t){u=null;break}if(null!==(o=u.sibling)){o.return=u.return,u=o;break}u=u.return}o=u}wu(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,xa(t,n),r=r(i=Ta(i)),t.flags|=1,wu(e,t,r,n),t.child;case 14:return i=ya(r=t.type,t.pendingProps),Su(e,t,r,i=ya(r.type,i),n);case 15:return xu(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ya(r,i),qu(e,t),t.tag=1,Li(r)?(e=!0,Mi(t)):e=!1,xa(t,n),qa(t,r,i),Ka(t,r,i,n),Nu(null,t,r,!0,e,n);case 19:return Bu(e,t,n);case 22:return Tu(e,t,n)}throw Error(a(156,t.tag))};var Gl="function"===typeof reportError?reportError:function(e){console.error(e)};function $l(e){this._internalRoot=e}function Xl(e){this._internalRoot=e}function Yl(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Jl(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Zl(){}function ec(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if("function"===typeof i){var u=i;i=function(){var e=Kl(o);u.call(e)}}Hl(t,o,e,i)}else o=function(e,t,n,r,i){if(i){if("function"===typeof r){var a=r;r=function(){var e=Kl(o);a.call(e)}}var o=ql(t,r,e,0,null,!1,0,"",Zl);return e._reactRootContainer=o,e[pi]=o.current,Br(8===e.nodeType?e.parentNode:e),cl(),o}for(;i=e.lastChild;)e.removeChild(i);if("function"===typeof r){var u=r;r=function(){var e=Kl(s);u.call(e)}}var s=jl(e,0,!1,null,0,!1,0,"",Zl);return e._reactRootContainer=s,e[pi]=s.current,Br(8===e.nodeType?e.parentNode:e),cl((function(){Hl(t,s,n,r)})),s}(n,t,e,i,r);return Kl(o)}Xl.prototype.render=$l.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(a(409));Hl(e,t,null,null)},Xl.prototype.unmount=$l.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;cl((function(){Hl(null,e,null,null)})),t[pi]=null}},Xl.prototype.unstable_scheduleHydration=function(e){if(e){var t=xt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ot.length&&0!==t&&t<Ot[n].priority;n++);Ot.splice(n,0,e),0===n&&Ft(e)}},wt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ft(t.pendingLanes);0!==n&&(gt(t,1|n),rl(t,Ye()),0===(6&Is)&&(Bs=Ye()+500,Bi()))}break;case 13:cl((function(){var t=Na(e,1);if(null!==t){var n=el();nl(t,e,1,n)}})),Wl(e,1)}},Et=function(e){if(13===e.tag){var t=Na(e,134217728);if(null!==t)nl(t,e,134217728,el());Wl(e,134217728)}},St=function(e){if(13===e.tag){var t=tl(e),n=Na(e,t);if(null!==n)nl(n,e,t,el());Wl(e,t)}},xt=function(){return kt},Tt=function(e,t){var n=kt;try{return kt=e,t()}finally{kt=n}},Ee=function(e,t,n){switch(t){case"input":if(J(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=wi(r);if(!i)throw Error(a(90));W(r),J(r,i)}}}break;case"textarea":ae(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Ie=ll,Ne=cl;var tc={usingClientEntryPoint:!1,Events:[ki,bi,wi,Ce,_e,ll]},nc={findFiberByHostInstance:gi,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},rc={bundleType:nc.bundleType,version:nc.version,rendererPackageName:nc.rendererPackageName,rendererConfig:nc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:b.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ke(e))?null:e.stateNode},findFiberByHostInstance:nc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var ic=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ic.isDisabled&&ic.supportsFiber)try{it=ic.inject(rc),at=ic}catch(ce){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tc,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Yl(t))throw Error(a(200));return zl(e,t,null,n)},t.createRoot=function(e,t){if(!Yl(e))throw Error(a(299));var n=!1,r="",i=Gl;return null!==t&&void 0!==t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=jl(e,1,!1,null,0,n,0,r,i),e[pi]=t.current,Br(8===e.nodeType?e.parentNode:e),new $l(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(a(188));throw e=Object.keys(e).join(","),Error(a(268,e))}return e=null===(e=Ke(t))?null:e.stateNode},t.flushSync=function(e){return cl(e)},t.hydrate=function(e,t,n){if(!Jl(t))throw Error(a(200));return ec(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Yl(e))throw Error(a(405));var r=null!=n&&n.hydratedSources||null,i=!1,o="",u=Gl;if(null!==n&&void 0!==n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(o=n.identifierPrefix),void 0!==n.onRecoverableError&&(u=n.onRecoverableError)),t=ql(t,null,e,1,null!=n?n:null,i,0,o,u),e[pi]=t.current,Br(e),r)for(e=0;e<r.length;e++)i=(i=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Xl(t)},t.render=function(e,t,n){if(!Jl(t))throw Error(a(200));return ec(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Jl(e))throw Error(a(40));return!!e._reactRootContainer&&(cl((function(){ec(null,null,e,!1,(function(){e._reactRootContainer=null,e[pi]=null}))})),!0)},t.unstable_batchedUpdates=ll,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Jl(n))throw Error(a(200));if(null==e||void 0===e._reactInternals)throw Error(a(38));return ec(e,t,n,!1,r)},t.version="18.2.0-next-9e3b772b8-20220608"},250:function(e,t,n){var r=n(164);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},164:function(e,t,n){!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(463)},374:function(e,t,n){var r=n(791),i=Symbol.for("react.element"),a=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,u=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,n){var r,a={},l=null,c=null;for(r in void 0!==n&&(l=""+n),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(c=t.ref),t)o.call(t,r)&&!s.hasOwnProperty(r)&&(a[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===a[r]&&(a[r]=t[r]);return{$$typeof:i,type:e,key:l,ref:c,props:a,_owner:u.current}}t.Fragment=a,t.jsx=l,t.jsxs=l},117:function(e,t){var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),d=Symbol.iterator;var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,y={};function m(e,t,n){this.props=e,this.context=t,this.refs=y,this.updater=n||p}function g(){}function k(e,t,n){this.props=e,this.context=t,this.refs=y,this.updater=n||p}m.prototype.isReactComponent={},m.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},m.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},g.prototype=m.prototype;var b=k.prototype=new g;b.constructor=k,v(b,m.prototype),b.isPureReactComponent=!0;var w=Array.isArray,E=Object.prototype.hasOwnProperty,S={current:null},x={key:!0,ref:!0,__self:!0,__source:!0};function T(e,t,r){var i,a={},o=null,u=null;if(null!=t)for(i in void 0!==t.ref&&(u=t.ref),void 0!==t.key&&(o=""+t.key),t)E.call(t,i)&&!x.hasOwnProperty(i)&&(a[i]=t[i]);var s=arguments.length-2;if(1===s)a.children=r;else if(1<s){for(var l=Array(s),c=0;c<s;c++)l[c]=arguments[c+2];a.children=l}if(e&&e.defaultProps)for(i in s=e.defaultProps)void 0===a[i]&&(a[i]=s[i]);return{$$typeof:n,type:e,key:o,ref:u,props:a,_owner:S.current}}function C(e){return"object"===typeof e&&null!==e&&e.$$typeof===n}var _=/\/+/g;function I(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function N(e,t,i,a,o){var u=typeof e;"undefined"!==u&&"boolean"!==u||(e=null);var s=!1;if(null===e)s=!0;else switch(u){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case n:case r:s=!0}}if(s)return o=o(s=e),e=""===a?"."+I(s,0):a,w(o)?(i="",null!=e&&(i=e.replace(_,"$&/")+"/"),N(o,t,i,"",(function(e){return e}))):null!=o&&(C(o)&&(o=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(o,i+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(_,"$&/")+"/")+e)),t.push(o)),1;if(s=0,a=""===a?".":a+":",w(e))for(var l=0;l<e.length;l++){var c=a+I(u=e[l],l);s+=N(u,t,i,c,o)}else if(c=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=d&&e[d]||e["@@iterator"])?e:null}(e),"function"===typeof c)for(e=c.call(e),l=0;!(u=e.next()).done;)s+=N(u=u.value,t,i,c=a+I(u,l++),o);else if("object"===u)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function D(e,t,n){if(null==e)return e;var r=[],i=0;return N(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function A(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var L={current:null},O={transition:null},R={ReactCurrentDispatcher:L,ReactCurrentBatchConfig:O,ReactCurrentOwner:S};t.Children={map:D,forEach:function(e,t,n){D(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return D(e,(function(){t++})),t},toArray:function(e){return D(e,(function(e){return e}))||[]},only:function(e){if(!C(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=m,t.Fragment=i,t.Profiler=o,t.PureComponent=k,t.StrictMode=a,t.Suspense=c,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=R,t.cloneElement=function(e,t,r){if(null===e||void 0===e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=v({},e.props),a=e.key,o=e.ref,u=e._owner;if(null!=t){if(void 0!==t.ref&&(o=t.ref,u=S.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)E.call(t,l)&&!x.hasOwnProperty(l)&&(i[l]=void 0===t[l]&&void 0!==s?s[l]:t[l])}var l=arguments.length-2;if(1===l)i.children=r;else if(1<l){s=Array(l);for(var c=0;c<l;c++)s[c]=arguments[c+2];i.children=s}return{$$typeof:n,type:e.type,key:a,ref:o,props:i,_owner:u}},t.createContext=function(e){return(e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:u,_context:e},e.Consumer=e},t.createElement=T,t.createFactory=function(e){var t=T.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:l,render:e}},t.isValidElement=C,t.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:A}},t.memo=function(e,t){return{$$typeof:f,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=O.transition;O.transition={};try{e()}finally{O.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return L.current.useCallback(e,t)},t.useContext=function(e){return L.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return L.current.useDeferredValue(e)},t.useEffect=function(e,t){return L.current.useEffect(e,t)},t.useId=function(){return L.current.useId()},t.useImperativeHandle=function(e,t,n){return L.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return L.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return L.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return L.current.useMemo(e,t)},t.useReducer=function(e,t,n){return L.current.useReducer(e,t,n)},t.useRef=function(e){return L.current.useRef(e)},t.useState=function(e){return L.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return L.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return L.current.useTransition()},t.version="18.2.0"},791:function(e,t,n){e.exports=n(117)},184:function(e,t,n){e.exports=n(374)},813:function(e,t){function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<a(i,t)))break e;e[r]=t,e[n]=i,n=r}}function r(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,o=i>>>1;r<o;){var u=2*(r+1)-1,s=e[u],l=u+1,c=e[l];if(0>a(s,n))l<i&&0>a(c,s)?(e[r]=c,e[l]=n,r=l):(e[r]=s,e[u]=n,r=u);else{if(!(l<i&&0>a(c,n)))break e;e[r]=c,e[l]=n,r=l}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"===typeof performance&&"function"===typeof performance.now){var o=performance;t.unstable_now=function(){return o.now()}}else{var u=Date,s=u.now();t.unstable_now=function(){return u.now()-s}}var l=[],c=[],f=1,h=null,d=3,p=!1,v=!1,y=!1,m="function"===typeof setTimeout?setTimeout:null,g="function"===typeof clearTimeout?clearTimeout:null,k="undefined"!==typeof setImmediate?setImmediate:null;function b(e){for(var t=r(c);null!==t;){if(null===t.callback)i(c);else{if(!(t.startTime<=e))break;i(c),t.sortIndex=t.expirationTime,n(l,t)}t=r(c)}}function w(e){if(y=!1,b(e),!v)if(null!==r(l))v=!0,O(E);else{var t=r(c);null!==t&&R(w,t.startTime-e)}}function E(e,n){v=!1,y&&(y=!1,g(C),C=-1),p=!0;var a=d;try{for(b(n),h=r(l);null!==h&&(!(h.expirationTime>n)||e&&!N());){var o=h.callback;if("function"===typeof o){h.callback=null,d=h.priorityLevel;var u=o(h.expirationTime<=n);n=t.unstable_now(),"function"===typeof u?h.callback=u:h===r(l)&&i(l),b(n)}else i(l);h=r(l)}if(null!==h)var s=!0;else{var f=r(c);null!==f&&R(w,f.startTime-n),s=!1}return s}finally{h=null,d=a,p=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var S,x=!1,T=null,C=-1,_=5,I=-1;function N(){return!(t.unstable_now()-I<_)}function D(){if(null!==T){var e=t.unstable_now();I=e;var n=!0;try{n=T(!0,e)}finally{n?S():(x=!1,T=null)}}else x=!1}if("function"===typeof k)S=function(){k(D)};else if("undefined"!==typeof MessageChannel){var A=new MessageChannel,L=A.port2;A.port1.onmessage=D,S=function(){L.postMessage(null)}}else S=function(){m(D,0)};function O(e){T=e,x||(x=!0,S())}function R(e,n){C=m((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){v||p||(v=!0,O(E))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):_=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return d},t.unstable_getFirstCallbackNode=function(){return r(l)},t.unstable_next=function(e){switch(d){case 1:case 2:case 3:var t=3;break;default:t=d}var n=d;d=t;try{return e()}finally{d=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=d;d=e;try{return t()}finally{d=n}},t.unstable_scheduleCallback=function(e,i,a){var o=t.unstable_now();switch("object"===typeof a&&null!==a?a="number"===typeof(a=a.delay)&&0<a?o+a:o:a=o,e){case 1:var u=-1;break;case 2:u=250;break;case 5:u=1073741823;break;case 4:u=1e4;break;default:u=5e3}return e={id:f++,callback:i,priorityLevel:e,startTime:a,expirationTime:u=a+u,sortIndex:-1},a>o?(e.sortIndex=a,n(c,e),null===r(l)&&e===r(c)&&(y?(g(C),C=-1):y=!0,R(w,a-o))):(e.sortIndex=u,n(l,e),v||p||(v=!0,O(E))),e},t.unstable_shouldYield=N,t.unstable_wrapCallback=function(e){var t=d;return function(){var n=d;d=t;try{return e.apply(this,arguments)}finally{d=n}}}},296:function(e,t,n){e.exports=n(813)}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}n.m=e,n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=function(e){return Promise.all(Object.keys(n.f).reduce((function(t,r){return n.f[r](e,t),t}),[]))},n.u=function(e){return"static/js/"+e+".111843f1.chunk.js"},n.miniCssF=function(e){},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={},t="hdepot:";n.l=function(r,i,a,o){if(e[r])e[r].push(i);else{var u,s;if(void 0!==a)for(var l=document.getElementsByTagName("script"),c=0;c<l.length;c++){var f=l[c];if(f.getAttribute("src")==r||f.getAttribute("data-webpack")==t+a){u=f;break}}u||(s=!0,(u=document.createElement("script")).charset="utf-8",u.timeout=120,n.nc&&u.setAttribute("nonce",n.nc),u.setAttribute("data-webpack",t+a),u.src=r),e[r]=[i];var h=function(t,n){u.onerror=u.onload=null,clearTimeout(d);var i=e[r];if(delete e[r],u.parentNode&&u.parentNode.removeChild(u),i&&i.forEach((function(e){return e(n)})),t)return t(n)},d=setTimeout(h.bind(null,void 0,{type:"timeout",target:u}),12e4);u.onerror=h.bind(null,u.onerror),u.onload=h.bind(null,u.onload),s&&document.head.appendChild(u)}}}(),n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="/var/www/fne/sf/",function(){var e={179:0};n.f.j=function(t,r){var i=n.o(e,t)?e[t]:void 0;if(0!==i)if(i)r.push(i[2]);else{var a=new Promise((function(n,r){i=e[t]=[n,r]}));r.push(i[2]=a);var o=n.p+n.u(t),u=new Error;n.l(o,(function(r){if(n.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var a=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src;u.message="Loading chunk "+t+" failed.\n("+a+": "+o+")",u.name="ChunkLoadError",u.type=a,u.request=o,i[1](u)}}),"chunk-"+t,t)}};var t=function(t,r){var i,a,o=r[0],u=r[1],s=r[2],l=0;if(o.some((function(t){return 0!==e[t]}))){for(i in u)n.o(u,i)&&(n.m[i]=u[i]);if(s)s(n)}for(t&&t(r);l<o.length;l++)a=o[l],n.o(e,a)&&e[a]&&e[a][0](),e[a]=0},r=self.webpackChunkhdepot=self.webpackChunkhdepot||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}(),function(){var e=n(791),t=n(250);function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function i(e,t){if(e){if("string"===typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}function a(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||i(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function u(){u=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(D){c=function(e,t,n){return e[t]=n}}function f(e,t,n,i){var a=t&&t.prototype instanceof p?t:p,o=Object.create(a.prototype),u=new _(i||[]);return r(o,"_invoke",{value:S(e,n,u)}),o}function h(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(D){return{type:"throw",arg:D}}}e.wrap=f;var d={};function p(){}function v(){}function y(){}var m={};c(m,a,(function(){return this}));var g=Object.getPrototypeOf,k=g&&g(g(I([])));k&&k!==t&&n.call(k,a)&&(m=k);var b=y.prototype=p.prototype=Object.create(m);function w(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function i(r,a,u,s){var l=h(e[r],e,a);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"==o(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,u,s)}),(function(e){i("throw",e,u,s)})):t.resolve(f).then((function(e){c.value=e,u(c)}),(function(e){return i("throw",e,u,s)}))}s(l.arg)}var a;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return a=a?a.then(r,r):r()}})}function S(e,t,n){var r="suspendedStart";return function(i,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw a;return N()}for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var u=x(o,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=h(e,t,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===d)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}function x(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var r=h(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,d;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function I(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:N}}function N(){return{value:void 0,done:!0}}return v.prototype=y,r(b,"constructor",{value:y,configurable:!0}),r(y,"constructor",{value:v,configurable:!0}),v.displayName=c(y,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,c(e,l,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},w(E.prototype),c(E.prototype,s,(function(){return this})),e.AsyncIterator=E,e.async=function(t,n,r,i,a){void 0===a&&(a=Promise);var o=new E(f(t,n,r,i),a);return e.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},w(b),c(b,l,"Generator"),c(b,a,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=I,_.prototype={constructor:_,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(C),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return o.type="throw",o.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,d):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:I(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}function s(e,t,n,r,i,a,o){try{var u=e[a](o),s=u.value}catch(l){return void n(l)}u.done?t(s):Promise.resolve(s).then(r,i)}function l(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){s(a,r,i,o,u,"next",e)}function u(e){s(a,r,i,o,u,"throw",e)}o(void 0)}))}}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,u=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(s){u=!0,i=s}finally{try{o||null==n.return||n.return()}finally{if(u)throw i}}return a}}(e,t)||i(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=i(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return u=e.done,e},e:function(e){s=!0,o=e},f:function(){try{u||null==n.return||n.return()}finally{if(s)throw o}}}}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,t,n){return t&&y(e.prototype,t),n&&y(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function k(e,t){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},k(e,t)}function b(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&k(e,t)}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}function E(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function S(e,t){if(t&&("object"===o(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return g(e)}function x(e){var t=E();return function(){var n,r=w(e);if(t){var i=w(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return S(this,n)}}function T(e,t,n){return T=E()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&k(i,n.prototype),i},T.apply(null,arguments)}function C(e){var t="function"===typeof Map?new Map:void 0;return C=function(e){if(null===e||!function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}(e))return e;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return T(e,arguments,w(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),k(n,e)},C(e)}var _=function(e){for(var t=[],n=0,r=0;r<e.length;r++){var i=e.charCodeAt(r);i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=63&i|128):55296===(64512&i)&&r+1<e.length&&56320===(64512&e.charCodeAt(r+1))?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++r)),t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return t},I={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:"function"===typeof atob,encodeByteArray:function(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();for(var n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[],i=0;i<e.length;i+=3){var a=e[i],o=i+1<e.length,u=o?e[i+1]:0,s=i+2<e.length,l=s?e[i+2]:0,c=a>>2,f=(3&a)<<4|u>>4,h=(15&u)<<2|l>>6,d=63&l;s||(d=64,o||(h=64)),r.push(n[c],n[f],n[h],n[d])}return r.join("")},encodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(_(e),t)},decodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){for(var t=[],n=0,r=0;n<e.length;){var i=e[n++];if(i<128)t[r++]=String.fromCharCode(i);else if(i>191&&i<224){var a=e[n++];t[r++]=String.fromCharCode((31&i)<<6|63&a)}else if(i>239&&i<365){var o=((7&i)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536;t[r++]=String.fromCharCode(55296+(o>>10)),t[r++]=String.fromCharCode(56320+(1023&o))}else{var u=e[n++],s=e[n++];t[r++]=String.fromCharCode((15&i)<<12|(63&u)<<6|63&s)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray:function(e,t){this.init_();for(var n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[],i=0;i<e.length;){var a=n[e.charAt(i++)],o=i<e.length?n[e.charAt(i)]:0,u=++i<e.length?n[e.charAt(i)]:64,s=++i<e.length?n[e.charAt(i)]:64;if(++i,null==a||null==o||null==u||null==s)throw Error();var l=a<<2|o>>4;if(r.push(l),64!==u){var c=o<<4&240|u>>2;if(r.push(c),64!==s){var f=u<<6&192|s;r.push(f)}}}return r},init_:function(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(var e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}},N=function(e){return function(e){var t=_(e);return I.encodeByteArray(t,!0)}(e).replace(/\./g,"")},D=function(e){try{return I.decodeString(e,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};var A=function(){return function(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw new Error("Unable to locate global object.")}().__FIREBASE_DEFAULTS__},L=function(){try{return A()||function(){if("undefined"!==typeof process){var e={NODE_ENV:"production",PUBLIC_URL:"/var/www/fne/sf",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.__FIREBASE_DEFAULTS__;return e?JSON.parse(e):void 0}}()||function(){if("undefined"!==typeof document){var e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(n){return}var t=e&&D(e[1]);return t&&JSON.parse(t)}}()}catch(e){return void console.info("Unable to get __FIREBASE_DEFAULTS__ due to: ".concat(e))}},O=function(e){var t=function(e){var t,n;return null===(n=null===(t=L())||void 0===t?void 0:t.emulatorHosts)||void 0===n?void 0:n[e]}(e);if(t){var n=t.lastIndexOf(":");if(n<=0||n+1===t.length)throw new Error("Invalid host ".concat(t," with no separate hostname and port!"));var r=parseInt(t.substring(n+1),10);return"["===t[0]?[t.substring(1,n-1),r]:[t.substring(0,n),r]}},R=function(){var e;return null===(e=L())||void 0===e?void 0:e.config},P=function(){function e(){var t=this;v(this,e),this.reject=function(){},this.resolve=function(){},this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))}return m(e,[{key:"wrapCallback",value:function(e){var t=this;return function(n,r){n?t.reject(n):t.resolve(r),"function"===typeof e&&(t.promise.catch((function(){})),1===e.length?e(n):e(n,r))}}}]),e}();function M(e,t){if(e.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');var n=t||"demo-project",r=e.iat||0,i=e.sub||e.user_id;if(!i)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");var a=Object.assign({iss:"https://securetoken.google.com/".concat(n),aud:n,iat:r,exp:r+3600,auth_time:r,sub:i,user_id:i,firebase:{sign_in_provider:"custom",identities:{}}},e);return[N(JSON.stringify({alg:"none",type:"JWT"})),N(JSON.stringify(a)),""].join(".")}var F=function(e){b(n,e);var t=x(n);function n(e,r,i){var a;return v(this,n),(a=t.call(this,r)).code=e,a.customData=i,a.name="FirebaseError",Object.setPrototypeOf(g(a),n.prototype),Error.captureStackTrace&&Error.captureStackTrace(g(a),V.prototype.create),a}return m(n)}(C(Error)),V=function(){function e(t,n,r){v(this,e),this.service=t,this.serviceName=n,this.errors=r}return m(e,[{key:"create",value:function(e){var t=(arguments.length<=1?void 0:arguments[1])||{},n="".concat(this.service,"/").concat(e),r=this.errors[e],i=r?U(r,t):"Error",a="".concat(this.serviceName,": ").concat(i," (").concat(n,")."),o=new F(n,a,t);return o}}]),e}();function U(e,t){return e.replace(j,(function(e,n){var r=t[n];return null!=r?String(r):"<".concat(n,"?>")}))}var j=/\{\$([^}]+)}/g;function z(e,t){if(e===t)return!0;for(var n=Object.keys(e),r=Object.keys(t),i=0,a=n;i<a.length;i++){var o=a[i];if(!r.includes(o))return!1;var u=e[o],s=t[o];if(B(u)&&B(s)){if(!z(u,s))return!1}else if(u!==s)return!1}for(var l=0,c=r;l<c.length;l++){var f=c[l];if(!n.includes(f))return!1}return!0}function B(e){return null!==e&&"object"===typeof e}function q(e){return e&&e._delegate?e._delegate:e}var H=function(){function e(t,n,r){v(this,e),this.name=t,this.instanceFactory=n,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}return m(e,[{key:"setInstantiationMode",value:function(e){return this.instantiationMode=e,this}},{key:"setMultipleInstances",value:function(e){return this.multipleInstances=e,this}},{key:"setServiceProps",value:function(e){return this.serviceProps=e,this}},{key:"setInstanceCreatedCallback",value:function(e){return this.onInstanceCreated=e,this}}]),e}(),K="[DEFAULT]",Q=function(){function e(t,n){v(this,e),this.name=t,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}return m(e,[{key:"get",value:function(e){var t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){var n=new P;if(this.instancesDeferred.set(t,n),this.isInitialized(t)||this.shouldAutoInitialize())try{var r=this.getOrInitializeService({instanceIdentifier:t});r&&n.resolve(r)}catch(i){}}return this.instancesDeferred.get(t).promise}},{key:"getImmediate",value:function(e){var t,n=this.normalizeInstanceIdentifier(null===e||void 0===e?void 0:e.identifier),r=null!==(t=null===e||void 0===e?void 0:e.optional)&&void 0!==t&&t;if(!this.isInitialized(n)&&!this.shouldAutoInitialize()){if(r)return null;throw Error("Service ".concat(this.name," is not available"))}try{return this.getOrInitializeService({instanceIdentifier:n})}catch(i){if(r)return null;throw i}}},{key:"getComponent",value:function(){return this.component}},{key:"setComponent",value:function(e){if(e.name!==this.name)throw Error("Mismatching Component ".concat(e.name," for Provider ").concat(this.name,"."));if(this.component)throw Error("Component for ".concat(this.name," has already been provided"));if(this.component=e,this.shouldAutoInitialize()){if(function(e){return"EAGER"===e.instantiationMode}(e))try{this.getOrInitializeService({instanceIdentifier:K})}catch(s){}var t,n=p(this.instancesDeferred.entries());try{for(n.s();!(t=n.n()).done;){var r=d(t.value,2),i=r[0],a=r[1],o=this.normalizeInstanceIdentifier(i);try{var u=this.getOrInitializeService({instanceIdentifier:o});a.resolve(u)}catch(s){}}}catch(l){n.e(l)}finally{n.f()}}}},{key:"clearInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:K;this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}},{key:"delete",value:function(){var e=l(u().mark((function e(){var t;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Array.from(this.instances.values()),e.next=3,Promise.all([].concat(a(t.filter((function(e){return"INTERNAL"in e})).map((function(e){return e.INTERNAL.delete()}))),a(t.filter((function(e){return"_delete"in e})).map((function(e){return e._delete()})))));case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"isComponentSet",value:function(){return null!=this.component}},{key:"isInitialized",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:K;return this.instances.has(e)}},{key:"getOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:K;return this.instancesOptions.get(e)||{}}},{key:"initialize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.options,n=void 0===t?{}:t,r=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(r))throw Error("".concat(this.name,"(").concat(r,") has already been initialized"));if(!this.isComponentSet())throw Error("Component ".concat(this.name," has not been registered yet"));var i,a=this.getOrInitializeService({instanceIdentifier:r,options:n}),o=p(this.instancesDeferred.entries());try{for(o.s();!(i=o.n()).done;){var u=d(i.value,2),s=u[0],l=u[1],c=this.normalizeInstanceIdentifier(s);r===c&&l.resolve(a)}}catch(f){o.e(f)}finally{o.f()}return a}},{key:"onInit",value:function(e,t){var n,r=this.normalizeInstanceIdentifier(t),i=null!==(n=this.onInitCallbacks.get(r))&&void 0!==n?n:new Set;i.add(e),this.onInitCallbacks.set(r,i);var a=this.instances.get(r);return a&&e(a,r),function(){i.delete(e)}}},{key:"invokeOnInitCallbacks",value:function(e,t){var n=this.onInitCallbacks.get(t);if(n){var r,i=p(n);try{for(i.s();!(r=i.n()).done;){var a=r.value;try{a(e,t)}catch(uh){}}}catch(o){i.e(o)}finally{i.f()}}}},{key:"getOrInitializeService",value:function(e){var t,n=e.instanceIdentifier,r=e.options,i=void 0===r?{}:r,a=this.instances.get(n);if(!a&&this.component&&(a=this.component.instanceFactory(this.container,{instanceIdentifier:(t=n,t===K?void 0:t),options:i}),this.instances.set(n,a),this.instancesOptions.set(n,i),this.invokeOnInitCallbacks(a,n),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,n,a)}catch(uh){}return a||null}},{key:"normalizeInstanceIdentifier",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:K;return this.component?this.component.multipleInstances?e:K:e}},{key:"shouldAutoInitialize",value:function(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}]),e}();var W,G,$=function(){function e(t){v(this,e),this.name=t,this.providers=new Map}return m(e,[{key:"addComponent",value:function(e){var t=this.getProvider(e.name);if(t.isComponentSet())throw new Error("Component ".concat(e.name," has already been registered with ").concat(this.name));t.setComponent(e)}},{key:"addOrOverwriteComponent",value:function(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}},{key:"getProvider",value:function(e){if(this.providers.has(e))return this.providers.get(e);var t=new Q(e,this);return this.providers.set(e,t),t}},{key:"getProviders",value:function(){return Array.from(this.providers.values())}}]),e}(),X=[];!function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"}(G||(G={}));var Y={debug:G.DEBUG,verbose:G.VERBOSE,info:G.INFO,warn:G.WARN,error:G.ERROR,silent:G.SILENT},J=G.INFO,Z=(c(W={},G.DEBUG,"log"),c(W,G.VERBOSE,"log"),c(W,G.INFO,"info"),c(W,G.WARN,"warn"),c(W,G.ERROR,"error"),W),ee=function(e,t){if(!(t<e.logLevel)){var n=(new Date).toISOString(),r=Z[t];if(!r)throw new Error("Attempted to log a message with an invalid logType (value: ".concat(t,")"));for(var i,a=arguments.length,o=new Array(a>2?a-2:0),u=2;u<a;u++)o[u-2]=arguments[u];(i=console)[r].apply(i,["[".concat(n,"] ").concat(e.name,":")].concat(o))}},te=function(){function e(t){v(this,e),this.name=t,this._logLevel=J,this._logHandler=ee,this._userLogHandler=null,X.push(this)}return m(e,[{key:"logLevel",get:function(){return this._logLevel},set:function(e){if(!(e in G))throw new TypeError('Invalid value "'.concat(e,'" assigned to `logLevel`'));this._logLevel=e}},{key:"setLogLevel",value:function(e){this._logLevel="string"===typeof e?Y[e]:e}},{key:"logHandler",get:function(){return this._logHandler},set:function(e){if("function"!==typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}},{key:"userLogHandler",get:function(){return this._userLogHandler},set:function(e){this._userLogHandler=e}},{key:"debug",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler.apply(this,[this,G.DEBUG].concat(t)),this._logHandler.apply(this,[this,G.DEBUG].concat(t))}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler.apply(this,[this,G.VERBOSE].concat(t)),this._logHandler.apply(this,[this,G.VERBOSE].concat(t))}},{key:"info",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler.apply(this,[this,G.INFO].concat(t)),this._logHandler.apply(this,[this,G.INFO].concat(t))}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler.apply(this,[this,G.WARN].concat(t)),this._logHandler.apply(this,[this,G.WARN].concat(t))}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler.apply(this,[this,G.ERROR].concat(t)),this._logHandler.apply(this,[this,G.ERROR].concat(t))}}]),e}();var ne,re;var ie=new WeakMap,ae=new WeakMap,oe=new WeakMap,ue=new WeakMap,se=new WeakMap;var le={get:function(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return ae.get(e);if("objectStoreNames"===t)return e.objectStoreNames||oe.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return he(e[t])},set:function(e,t,n){return e[t]=n,!0},has:function(e,t){return e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e}};function ce(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(re||(re=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.apply(de(this),n),he(ie.get(this))}:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return he(e.apply(de(this),n))}:function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var a=e.call.apply(e,[de(this),t].concat(r));return oe.set(a,t.sort?t.sort():[t]),he(a)}}function fe(e){return"function"===typeof e?ce(e):(e instanceof IDBTransaction&&function(e){if(!ae.has(e)){var t=new Promise((function(t,n){var r=function(){e.removeEventListener("complete",i),e.removeEventListener("error",a),e.removeEventListener("abort",a)},i=function(){t(),r()},a=function(){n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",i),e.addEventListener("error",a),e.addEventListener("abort",a)}));ae.set(e,t)}}(e),t=e,(ne||(ne=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some((function(e){return t instanceof e}))?new Proxy(e,le):e);var t}function he(e){if(e instanceof IDBRequest)return function(e){var t=new Promise((function(t,n){var r=function(){e.removeEventListener("success",i),e.removeEventListener("error",a)},i=function(){t(he(e.result)),r()},a=function(){n(e.error),r()};e.addEventListener("success",i),e.addEventListener("error",a)}));return t.then((function(t){t instanceof IDBCursor&&ie.set(t,e)})).catch((function(){})),se.set(t,e),t}(e);if(ue.has(e))return ue.get(e);var t=fe(e);return t!==e&&(ue.set(e,t),se.set(t,e)),t}var de=function(e){return se.get(e)};var pe,ve,ye=["get","getKey","getAll","getAllKeys","count"],me=["put","add","delete","clear"],ge=new Map;function ke(e,t){if(e instanceof IDBDatabase&&!(t in e)&&"string"===typeof t){if(ge.get(t))return ge.get(t);var n=t.replace(/FromIndex$/,""),r=t!==n,i=me.includes(n);if(n in(r?IDBIndex:IDBObjectStore).prototype&&(i||ye.includes(n))){var a=function(){var e=l(u().mark((function e(t){var a,o,s,l,c,f,h=arguments;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(o=this.transaction(t,i?"readwrite":"readonly"),s=o.store,l=h.length,c=new Array(l>1?l-1:0),f=1;f<l;f++)c[f-1]=h[f];return r&&(s=s.index(c.shift())),e.next=6,Promise.all([(a=s)[n].apply(a,c),i&&o.done]);case 6:return e.abrupt("return",e.sent[0]);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}();return ge.set(t,a),a}}}le=function(e){return h(h({},e),{},{get:function(t,n,r){return ke(t,n)||e.get(t,n,r)},has:function(t,n){return!!ke(t,n)||e.has(t,n)}})}(le);var be=function(){function e(t){v(this,e),this.container=t}return m(e,[{key:"getPlatformInfoString",value:function(){return this.container.getProviders().map((function(e){if(function(e){var t=e.getComponent();return"VERSION"===(null===t||void 0===t?void 0:t.type)}(e)){var t=e.getImmediate();return"".concat(t.library,"/").concat(t.version)}return null})).filter((function(e){return e})).join(" ")}}]),e}();var we="@firebase/app",Ee="0.8.3",Se=new te("@firebase/app"),xe="[DEFAULT]",Te=(c(pe={},we,"fire-core"),c(pe,"@firebase/app-compat","fire-core-compat"),c(pe,"@firebase/analytics","fire-analytics"),c(pe,"@firebase/analytics-compat","fire-analytics-compat"),c(pe,"@firebase/app-check","fire-app-check"),c(pe,"@firebase/app-check-compat","fire-app-check-compat"),c(pe,"@firebase/auth","fire-auth"),c(pe,"@firebase/auth-compat","fire-auth-compat"),c(pe,"@firebase/database","fire-rtdb"),c(pe,"@firebase/database-compat","fire-rtdb-compat"),c(pe,"@firebase/functions","fire-fn"),c(pe,"@firebase/functions-compat","fire-fn-compat"),c(pe,"@firebase/installations","fire-iid"),c(pe,"@firebase/installations-compat","fire-iid-compat"),c(pe,"@firebase/messaging","fire-fcm"),c(pe,"@firebase/messaging-compat","fire-fcm-compat"),c(pe,"@firebase/performance","fire-perf"),c(pe,"@firebase/performance-compat","fire-perf-compat"),c(pe,"@firebase/remote-config","fire-rc"),c(pe,"@firebase/remote-config-compat","fire-rc-compat"),c(pe,"@firebase/storage","fire-gcs"),c(pe,"@firebase/storage-compat","fire-gcs-compat"),c(pe,"@firebase/firestore","fire-fst"),c(pe,"@firebase/firestore-compat","fire-fst-compat"),c(pe,"fire-js","fire-js"),c(pe,"firebase","fire-js-all"),pe),Ce=new Map,_e=new Map;function Ie(e,t){try{e.container.addComponent(t)}catch(n){Se.debug("Component ".concat(t.name," failed to register with FirebaseApp ").concat(e.name),n)}}function Ne(e){var t=e.name;if(_e.has(t))return Se.debug("There were multiple attempts to register component ".concat(t,".")),!1;_e.set(t,e);var n,r=p(Ce.values());try{for(r.s();!(n=r.n()).done;){Ie(n.value,e)}}catch(i){r.e(i)}finally{r.f()}return!0}function De(e,t){var n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}var Ae=(c(ve={},"no-app","No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()"),c(ve,"bad-app-name","Illegal App name: '{$appName}"),c(ve,"duplicate-app","Firebase App named '{$appName}' already exists with different options or config"),c(ve,"app-deleted","Firebase App named '{$appName}' already deleted"),c(ve,"no-options","Need to provide options, when not being deployed to hosting via source."),c(ve,"invalid-app-argument","firebase.{$appName}() takes either no argument or a Firebase App instance."),c(ve,"invalid-log-argument","First argument to `onLog` must be null or a function."),c(ve,"idb-open","Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}."),c(ve,"idb-get","Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}."),c(ve,"idb-set","Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}."),c(ve,"idb-delete","Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."),ve),Le=new V("app","Firebase",Ae),Oe=function(){function e(t,n,r){var i=this;v(this,e),this._isDeleted=!1,this._options=Object.assign({},t),this._config=Object.assign({},n),this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new H("app",(function(){return i}),"PUBLIC"))}return m(e,[{key:"automaticDataCollectionEnabled",get:function(){return this.checkDestroyed(),this._automaticDataCollectionEnabled},set:function(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}},{key:"name",get:function(){return this.checkDestroyed(),this._name}},{key:"options",get:function(){return this.checkDestroyed(),this._options}},{key:"config",get:function(){return this.checkDestroyed(),this._config}},{key:"container",get:function(){return this._container}},{key:"isDeleted",get:function(){return this._isDeleted},set:function(e){this._isDeleted=e}},{key:"checkDestroyed",value:function(){if(this.isDeleted)throw Le.create("app-deleted",{appName:this._name})}}]),e}();function Re(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e;if("object"!==typeof t){var r=t;t={name:r}}var i=Object.assign({name:xe,automaticDataCollectionEnabled:!1},t),a=i.name;if("string"!==typeof a||!a)throw Le.create("bad-app-name",{appName:String(a)});if(n||(n=R()),!n)throw Le.create("no-options");var o=Ce.get(a);if(o){if(z(n,o.options)&&z(i,o.config))return o;throw Le.create("duplicate-app",{appName:a})}var u,s=new $(a),l=p(_e.values());try{for(l.s();!(u=l.n()).done;){var c=u.value;s.addComponent(c)}}catch(h){l.e(h)}finally{l.f()}var f=new Oe(n,i,s);return Ce.set(a,f),f}function Pe(e,t,n){var r,i=null!==(r=Te[e])&&void 0!==r?r:e;n&&(i+="-".concat(n));var a=i.match(/\s|\//),o=t.match(/\s|\//);if(a||o){var u=['Unable to register library "'.concat(i,'" with version "').concat(t,'":')];return a&&u.push('library name "'.concat(i,'" contains illegal characters (whitespace or "/")')),a&&o&&u.push("and"),o&&u.push('version name "'.concat(t,'" contains illegal characters (whitespace or "/")')),void Se.warn(u.join(" "))}Ne(new H("".concat(i,"-version"),(function(){return{library:i,version:t}}),"VERSION"))}var Me="firebase-heartbeat-store",Fe=null;function Ve(){return Fe||(Fe=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.blocked,i=n.upgrade,a=n.blocking,o=n.terminated,u=indexedDB.open(e,t),s=he(u);return i&&u.addEventListener("upgradeneeded",(function(e){i(he(u.result),e.oldVersion,e.newVersion,he(u.transaction))})),r&&u.addEventListener("blocked",(function(){return r()})),s.then((function(e){o&&e.addEventListener("close",(function(){return o()})),a&&e.addEventListener("versionchange",(function(){return a()}))})).catch((function(){})),s}("firebase-heartbeat-database",1,{upgrade:function(e,t){if(0===t)e.createObjectStore(Me)}}).catch((function(e){throw Le.create("idb-open",{originalErrorMessage:e.message})}))),Fe}function Ue(e){return je.apply(this,arguments)}function je(){return je=l(u().mark((function e(t){var n,r,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Ve();case 3:return r=e.sent,e.abrupt("return",r.transaction(Me).objectStore(Me).get(qe(t)));case 7:e.prev=7,e.t0=e.catch(0),e.t0 instanceof F?Se.warn(e.t0.message):(i=Le.create("idb-get",{originalErrorMessage:null===(n=e.t0)||void 0===n?void 0:n.message}),Se.warn(i.message));case 10:case"end":return e.stop()}}),e,null,[[0,7]])}))),je.apply(this,arguments)}function ze(e,t){return Be.apply(this,arguments)}function Be(){return Be=l(u().mark((function e(t,n){var r,i,a,o,s;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Ve();case 3:return i=e.sent,a=i.transaction(Me,"readwrite"),o=a.objectStore(Me),e.next=8,o.put(n,qe(t));case 8:return e.abrupt("return",a.done);case 11:e.prev=11,e.t0=e.catch(0),e.t0 instanceof F?Se.warn(e.t0.message):(s=Le.create("idb-set",{originalErrorMessage:null===(r=e.t0)||void 0===r?void 0:r.message}),Se.warn(s.message));case 14:case"end":return e.stop()}}),e,null,[[0,11]])}))),Be.apply(this,arguments)}function qe(e){return"".concat(e.name,"!").concat(e.options.appId)}var He=function(){function e(t){var n=this;v(this,e),this.container=t,this._heartbeatsCache=null;var r=this.container.getProvider("app").getImmediate();this._storage=new Ge(r),this._heartbeatsCachePromise=this._storage.read().then((function(e){return n._heartbeatsCache=e,e}))}return m(e,[{key:"triggerHeartbeat",value:function(){var e=l(u().mark((function e(){var t,n,r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.container.getProvider("platform-logger").getImmediate(),n=t.getPlatformInfoString(),r=Ke(),null!==this._heartbeatsCache){e.next=7;break}return e.next=6,this._heartbeatsCachePromise;case 6:this._heartbeatsCache=e.sent;case 7:if(this._heartbeatsCache.lastSentHeartbeatDate!==r&&!this._heartbeatsCache.heartbeats.some((function(e){return e.date===r}))){e.next=11;break}return e.abrupt("return");case 11:this._heartbeatsCache.heartbeats.push({date:r,agent:n});case 12:return this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter((function(e){var t=new Date(e.date).valueOf();return Date.now()-t<=2592e6})),e.abrupt("return",this._storage.overwrite(this._heartbeatsCache));case 14:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getHeartbeatsHeader",value:function(){var e=l(u().mark((function e(){var t,n,r,i,a;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==this._heartbeatsCache){e.next=3;break}return e.next=3,this._heartbeatsCachePromise;case 3:if(null!==this._heartbeatsCache&&0!==this._heartbeatsCache.heartbeats.length){e.next=5;break}return e.abrupt("return","");case 5:if(t=Ke(),n=Qe(this._heartbeatsCache.heartbeats),r=n.heartbeatsToSend,i=n.unsentEntries,a=N(JSON.stringify({version:2,heartbeats:r})),this._heartbeatsCache.lastSentHeartbeatDate=t,!(i.length>0)){e.next=15;break}return this._heartbeatsCache.heartbeats=i,e.next=13,this._storage.overwrite(this._heartbeatsCache);case 13:e.next=17;break;case 15:this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache);case 17:return e.abrupt("return",a);case 18:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}();function Ke(){return(new Date).toISOString().substring(0,10)}function Qe(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1024,r=[],i=e.slice(),a=p(e);try{var o=function(){var e=t.value,a=r.find((function(t){return t.agent===e.agent}));if(a){if(a.dates.push(e.date),$e(r)>n)return a.dates.pop(),"break"}else if(r.push({agent:e.agent,dates:[e.date]}),$e(r)>n)return r.pop(),"break";i=i.slice(1)};for(a.s();!(t=a.n()).done;){var u=o();if("break"===u)break}}catch(s){a.e(s)}finally{a.f()}return{heartbeatsToSend:r,unsentEntries:i}}var We,Ge=function(){function e(t){v(this,e),this.app=t,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}return m(e,[{key:"runIndexedDBEnvironmentCheck",value:function(){var e=l(u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("object"===typeof indexedDB){e.next=4;break}return e.abrupt("return",!1);case 4:return e.abrupt("return",new Promise((function(e,t){try{var n=!0,r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=function(){i.result.close(),n||self.indexedDB.deleteDatabase(r),e(!0)},i.onupgradeneeded=function(){n=!1},i.onerror=function(){var e;t((null===(e=i.error)||void 0===e?void 0:e.message)||"")}}catch(a){t(a)}})).then((function(){return!0})).catch((function(){return!1})));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"read",value:function(){var e=l(u().mark((function e(){var t;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._canUseIndexedDBPromise;case 2:if(e.sent){e.next=7;break}return e.abrupt("return",{heartbeats:[]});case 7:return e.next=9,Ue(this.app);case 9:return t=e.sent,e.abrupt("return",t||{heartbeats:[]});case 11:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"overwrite",value:function(){var e=l(u().mark((function e(t){var n,r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._canUseIndexedDBPromise;case 2:if(e.sent){e.next=7;break}return e.abrupt("return");case 7:return e.next=9,this.read();case 9:return r=e.sent,e.abrupt("return",ze(this.app,{lastSentHeartbeatDate:null!==(n=t.lastSentHeartbeatDate)&&void 0!==n?n:r.lastSentHeartbeatDate,heartbeats:t.heartbeats}));case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"add",value:function(){var e=l(u().mark((function e(t){var n,r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._canUseIndexedDBPromise;case 2:if(e.sent){e.next=7;break}return e.abrupt("return");case 7:return e.next=9,this.read();case 9:return r=e.sent,e.abrupt("return",ze(this.app,{lastSentHeartbeatDate:null!==(n=t.lastSentHeartbeatDate)&&void 0!==n?n:r.lastSentHeartbeatDate,heartbeats:[].concat(a(r.heartbeats),a(t.heartbeats))}));case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}();function $e(e){return N(JSON.stringify({version:2,heartbeats:e})).length}We="",Ne(new H("platform-logger",(function(e){return new be(e)}),"PRIVATE")),Ne(new H("heartbeat",(function(e){return new He(e)}),"PRIVATE")),Pe(we,Ee,We),Pe(we,Ee,"esm2017"),Pe("fire-js","");function Xe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=w(e)););return e}function Ye(){return Ye="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=Xe(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Ye.apply(this,arguments)}Pe("firebase","9.13.0","app");var Je,Ze="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof n.g?n.g:"undefined"!==typeof self?self:{},et={},tt=tt||{},nt=Ze||self;function rt(){}function it(e){var t=typeof e;return"array"==(t="object"!=t?t:e?Array.isArray(e)?"array":t:"null")||"object"==t&&"number"==typeof e.length}function at(e){var t=typeof e;return"object"==t&&null!=e||"function"==t}var ot="closure_uid_"+(1e9*Math.random()>>>0),ut=0;function st(e,t,n){return e.call.apply(e.bind,arguments)}function lt(e,t,n){if(!e)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),e.apply(t,n)}}return function(){return e.apply(t,arguments)}}function ct(e,t,n){return(ct=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?st:lt).apply(null,arguments)}function ft(e,t){var n=Array.prototype.slice.call(arguments,1);return function(){var t=n.slice();return t.push.apply(t,arguments),e.apply(this,t)}}function ht(e,t){function n(){}n.prototype=t.prototype,e.X=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.Wb=function(e,n,r){for(var i=Array(arguments.length-2),a=2;a<arguments.length;a++)i[a-2]=arguments[a];return t.prototype[n].apply(e,i)}}function dt(){this.s=this.s,this.o=this.o}dt.prototype.s=!1,dt.prototype.na=function(){var e;!this.s&&(this.s=!0,this.M(),0)&&(e=this,Object.prototype.hasOwnProperty.call(e,ot)&&e[ot]||(e[ot]=++ut))},dt.prototype.M=function(){if(this.o)for(;this.o.length;)this.o.shift()()};var pt=Array.prototype.indexOf?function(e,t){return Array.prototype.indexOf.call(e,t,void 0)}:function(e,t){if("string"===typeof e)return"string"!==typeof t||1!=t.length?-1:e.indexOf(t,0);for(var n=0;n<e.length;n++)if(n in e&&e[n]===t)return n;return-1};function vt(e){var t=e.length;if(0<t){for(var n=Array(t),r=0;r<t;r++)n[r]=e[r];return n}return[]}function yt(e,t){for(var n=1;n<arguments.length;n++){var r=arguments[n];if(it(r)){var i=e.length||0,a=r.length||0;e.length=i+a;for(var o=0;o<a;o++)e[i+o]=r[o]}else e.push(r)}}function mt(e,t){this.type=e,this.g=this.target=t,this.defaultPrevented=!1}mt.prototype.h=function(){this.defaultPrevented=!0};var gt=function(){if(!nt.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});try{nt.addEventListener("test",rt,t),nt.removeEventListener("test",rt,t)}catch(n){}return e}();function kt(e){return/^[\s\xa0]*$/.test(e)}var bt=String.prototype.trim?function(e){return e.trim()}:function(e){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(e)[1]};function wt(e,t){return e<t?-1:e>t?1:0}function Et(){var e=nt.navigator;return e&&(e=e.userAgent)?e:""}function St(e){return-1!=Et().indexOf(e)}function xt(e){return xt[" "](e),e}xt[" "]=rt;var Tt,Ct=St("Opera"),_t=St("Trident")||St("MSIE"),It=St("Edge"),Nt=It||_t,Dt=St("Gecko")&&!(-1!=Et().toLowerCase().indexOf("webkit")&&!St("Edge"))&&!(St("Trident")||St("MSIE"))&&!St("Edge"),At=-1!=Et().toLowerCase().indexOf("webkit")&&!St("Edge");function Lt(){var e=nt.document;return e?e.documentMode:void 0}e:{var Ot="",Rt=function(){var e=Et();return Dt?/rv:([^\);]+)(\)|;)/.exec(e):It?/Edge\/([\d\.]+)/.exec(e):_t?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(e):At?/WebKit\/(\S+)/.exec(e):Ct?/(?:Version)[ \/]?(\S+)/.exec(e):void 0}();if(Rt&&(Ot=Rt?Rt[1]:""),_t){var Pt=Lt();if(null!=Pt&&Pt>parseFloat(Ot)){Tt=String(Pt);break e}}Tt=Ot}var Mt,Ft={};function Vt(){return function(e){var t=Ft;return Object.prototype.hasOwnProperty.call(t,9)?t[9]:t[9]=e(9)}((function(){for(var e=0,t=bt(String(Tt)).split("."),n=bt("9").split("."),r=Math.max(t.length,n.length),i=0;0==e&&i<r;i++){var a=t[i]||"",o=n[i]||"";do{if(a=/(\d*)(\D*)(.*)/.exec(a)||["","","",""],o=/(\d*)(\D*)(.*)/.exec(o)||["","","",""],0==a[0].length&&0==o[0].length)break;e=wt(0==a[1].length?0:parseInt(a[1],10),0==o[1].length?0:parseInt(o[1],10))||wt(0==a[2].length,0==o[2].length)||wt(a[2],o[2]),a=a[3],o=o[3]}while(0==e)}return 0<=e}))}if(nt.document&&_t){var Ut=Lt();Mt=Ut||(parseInt(Tt,10)||void 0)}else Mt=void 0;var jt=Mt;function zt(e,t){if(mt.call(this,e?e.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,e){var n=this.type=e.type,r=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:null;if(this.target=e.target||e.srcElement,this.g=t,t=e.relatedTarget){if(Dt){e:{try{xt(t.nodeName);var i=!0;break e}catch(a){}i=!1}i||(t=null)}}else"mouseover"==n?t=e.fromElement:"mouseout"==n&&(t=e.toElement);this.relatedTarget=t,r?(this.clientX=void 0!==r.clientX?r.clientX:r.pageX,this.clientY=void 0!==r.clientY?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0):(this.clientX=void 0!==e.clientX?e.clientX:e.pageX,this.clientY=void 0!==e.clientY?e.clientY:e.pageY,this.screenX=e.screenX||0,this.screenY=e.screenY||0),this.button=e.button,this.key=e.key||"",this.ctrlKey=e.ctrlKey,this.altKey=e.altKey,this.shiftKey=e.shiftKey,this.metaKey=e.metaKey,this.pointerId=e.pointerId||0,this.pointerType="string"===typeof e.pointerType?e.pointerType:Bt[e.pointerType]||"",this.state=e.state,this.i=e,e.defaultPrevented&&zt.X.h.call(this)}}ht(zt,mt);var Bt={2:"touch",3:"pen",4:"mouse"};zt.prototype.h=function(){zt.X.h.call(this);var e=this.i;e.preventDefault?e.preventDefault():e.returnValue=!1};var qt="closure_listenable_"+(1e6*Math.random()|0),Ht=0;function Kt(e,t,n,r,i){this.listener=e,this.proxy=null,this.src=t,this.type=n,this.capture=!!r,this.ha=i,this.key=++Ht,this.ba=this.ea=!1}function Qt(e){e.ba=!0,e.listener=null,e.proxy=null,e.src=null,e.ha=null}function Wt(e,t,n){for(var r in e)t.call(n,e[r],r,e)}function Gt(e){var t={};for(var n in e)t[n]=e[n];return t}var $t="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function Xt(e,t){for(var n,r,i=1;i<arguments.length;i++){for(n in r=arguments[i])e[n]=r[n];for(var a=0;a<$t.length;a++)n=$t[a],Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}}function Yt(e){this.src=e,this.g={},this.h=0}function Jt(e,t){var n=t.type;if(n in e.g){var r,i=e.g[n],a=pt(i,t);(r=0<=a)&&Array.prototype.splice.call(i,a,1),r&&(Qt(t),0==e.g[n].length&&(delete e.g[n],e.h--))}}function Zt(e,t,n,r){for(var i=0;i<e.length;++i){var a=e[i];if(!a.ba&&a.listener==t&&a.capture==!!n&&a.ha==r)return i}return-1}Yt.prototype.add=function(e,t,n,r,i){var a=e.toString();(e=this.g[a])||(e=this.g[a]=[],this.h++);var o=Zt(e,t,r,i);return-1<o?(t=e[o],n||(t.ea=!1)):((t=new Kt(t,this.src,a,!!r,i)).ea=n,e.push(t)),t};var en="closure_lm_"+(1e6*Math.random()|0),tn={};function nn(e,t,n,r,i){if(r&&r.once)return an(e,t,n,r,i);if(Array.isArray(t)){for(var a=0;a<t.length;a++)nn(e,t[a],n,r,i);return null}return n=hn(n),e&&e[qt]?e.N(t,n,at(r)?!!r.capture:!!r,i):rn(e,t,n,!1,r,i)}function rn(e,t,n,r,i,a){if(!t)throw Error("Invalid event type");var o=at(i)?!!i.capture:!!i,u=cn(e);if(u||(e[en]=u=new Yt(e)),(n=u.add(t,n,r,o,a)).proxy)return n;if(r=function(){function e(n){return t.call(e.src,e.listener,n)}var t=ln;return e}(),n.proxy=r,r.src=e,r.listener=n,e.addEventListener)gt||(i=o),void 0===i&&(i=!1),e.addEventListener(t.toString(),r,i);else if(e.attachEvent)e.attachEvent(sn(t.toString()),r);else{if(!e.addListener||!e.removeListener)throw Error("addEventListener and attachEvent are unavailable.");e.addListener(r)}return n}function an(e,t,n,r,i){if(Array.isArray(t)){for(var a=0;a<t.length;a++)an(e,t[a],n,r,i);return null}return n=hn(n),e&&e[qt]?e.O(t,n,at(r)?!!r.capture:!!r,i):rn(e,t,n,!0,r,i)}function on(e,t,n,r,i){if(Array.isArray(t))for(var a=0;a<t.length;a++)on(e,t[a],n,r,i);else r=at(r)?!!r.capture:!!r,n=hn(n),e&&e[qt]?(e=e.i,(t=String(t).toString())in e.g&&(-1<(n=Zt(a=e.g[t],n,r,i))&&(Qt(a[n]),Array.prototype.splice.call(a,n,1),0==a.length&&(delete e.g[t],e.h--)))):e&&(e=cn(e))&&(t=e.g[t.toString()],e=-1,t&&(e=Zt(t,n,r,i)),(n=-1<e?t[e]:null)&&un(n))}function un(e){if("number"!==typeof e&&e&&!e.ba){var t=e.src;if(t&&t[qt])Jt(t.i,e);else{var n=e.type,r=e.proxy;t.removeEventListener?t.removeEventListener(n,r,e.capture):t.detachEvent?t.detachEvent(sn(n),r):t.addListener&&t.removeListener&&t.removeListener(r),(n=cn(t))?(Jt(n,e),0==n.h&&(n.src=null,t[en]=null)):Qt(e)}}}function sn(e){return e in tn?tn[e]:tn[e]="on"+e}function ln(e,t){if(e.ba)e=!0;else{t=new zt(t,this);var n=e.listener,r=e.ha||e.src;e.ea&&un(e),e=n.call(r,t)}return e}function cn(e){return(e=e[en])instanceof Yt?e:null}var fn="__closure_events_fn_"+(1e9*Math.random()>>>0);function hn(e){return"function"===typeof e?e:(e[fn]||(e[fn]=function(t){return e.handleEvent(t)}),e[fn])}function dn(){dt.call(this),this.i=new Yt(this),this.P=this,this.I=null}function pn(e,t){var n,r=e.I;if(r)for(n=[];r;r=r.I)n.push(r);if(e=e.P,r=t.type||t,"string"===typeof t)t=new mt(t,e);else if(t instanceof mt)t.target=t.target||e;else{var i=t;Xt(t=new mt(r,e),i)}if(i=!0,n)for(var a=n.length-1;0<=a;a--){var o=t.g=n[a];i=vn(o,r,!0,t)&&i}if(i=vn(o=t.g=e,r,!0,t)&&i,i=vn(o,r,!1,t)&&i,n)for(a=0;a<n.length;a++)i=vn(o=t.g=n[a],r,!1,t)&&i}function vn(e,t,n,r){if(!(t=e.i.g[String(t)]))return!0;t=t.concat();for(var i=!0,a=0;a<t.length;++a){var o=t[a];if(o&&!o.ba&&o.capture==n){var u=o.listener,s=o.ha||o.src;o.ea&&Jt(e.i,o),i=!1!==u.call(s,r)&&i}}return i&&!r.defaultPrevented}ht(dn,dt),dn.prototype[qt]=!0,dn.prototype.removeEventListener=function(e,t,n,r){on(this,e,t,n,r)},dn.prototype.M=function(){if(dn.X.M.call(this),this.i){var e,t=this.i;for(e in t.g){for(var n=t.g[e],r=0;r<n.length;r++)Qt(n[r]);delete t.g[e],t.h--}}this.I=null},dn.prototype.N=function(e,t,n,r){return this.i.add(String(e),t,!1,n,r)},dn.prototype.O=function(e,t,n,r){return this.i.add(String(e),t,!0,n,r)};var yn=nt.JSON.stringify;function mn(){var e=Tn,t=null;return e.g&&(t=e.g,e.g=e.g.next,e.g||(e.h=null),t.next=null),t}var gn,kn=function(){function e(){v(this,e),this.h=this.g=null}return m(e,[{key:"add",value:function(e,t){var n=bn.get();n.set(e,t),this.h?this.h.next=n:this.g=n,this.h=n}}]),e}(),bn=new(function(){function e(t,n){v(this,e),this.i=t,this.j=n,this.h=0,this.g=null}return m(e,[{key:"get",value:function(){var e;return 0<this.h?(this.h--,e=this.g,this.g=e.next,e.next=null):e=this.i(),e}}]),e}())((function(){return new wn}),(function(e){return e.reset()})),wn=function(){function e(){v(this,e),this.next=this.g=this.h=null}return m(e,[{key:"set",value:function(e,t){this.h=e,this.g=t,this.next=null}},{key:"reset",value:function(){this.next=this.g=this.h=null}}]),e}();function En(e){nt.setTimeout((function(){throw e}),0)}function Sn(e,t){gn||function(){var e=nt.Promise.resolve(void 0);gn=function(){e.then(Cn)}}(),xn||(gn(),xn=!0),Tn.add(e,t)}var xn=!1,Tn=new kn;function Cn(){for(var e;e=mn();){try{e.h.call(e.g)}catch(n){En(n)}var t=bn;t.j(e),100>t.h&&(t.h++,e.next=t.g,t.g=e)}xn=!1}function _n(e,t){dn.call(this),this.h=e||1,this.g=t||nt,this.j=ct(this.lb,this),this.l=Date.now()}function In(e){e.ca=!1,e.R&&(e.g.clearTimeout(e.R),e.R=null)}function Nn(e,t,n){if("function"===typeof e)n&&(e=ct(e,n));else{if(!e||"function"!=typeof e.handleEvent)throw Error("Invalid listener argument");e=ct(e.handleEvent,e)}return 2147483647<Number(t)?-1:nt.setTimeout(e,t||0)}function Dn(e){e.g=Nn((function(){e.g=null,e.i&&(e.i=!1,Dn(e))}),e.j);var t=e.h;e.h=null,e.m.apply(null,t)}ht(_n,dn),(Je=_n.prototype).ca=!1,Je.R=null,Je.lb=function(){if(this.ca){var e=Date.now()-this.l;0<e&&e<.8*this.h?this.R=this.g.setTimeout(this.j,this.h-e):(this.R&&(this.g.clearTimeout(this.R),this.R=null),pn(this,"tick"),this.ca&&(In(this),this.start()))}},Je.start=function(){this.ca=!0,this.R||(this.R=this.g.setTimeout(this.j,this.h),this.l=Date.now())},Je.M=function(){_n.X.M.call(this),In(this),delete this.g};var An=function(e){b(n,e);var t=x(n);function n(e,r){var i;return v(this,n),(i=t.call(this)).m=e,i.j=r,i.h=null,i.i=!1,i.g=null,i}return m(n,[{key:"l",value:function(e){this.h=arguments,this.g?this.i=!0:Dn(this)}},{key:"M",value:function(){Ye(w(n.prototype),"M",this).call(this),this.g&&(nt.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}]),n}(dt);function Ln(e){dt.call(this),this.h=e,this.g={}}ht(Ln,dt);var On=[];function Rn(e,t,n,r){Array.isArray(n)||(n&&(On[0]=n.toString()),n=On);for(var i=0;i<n.length;i++){var a=nn(t,n[i],r||e.handleEvent,!1,e.h||e);if(!a)break;e.g[a.key]=a}}function Pn(e){Wt(e.g,(function(e,t){this.g.hasOwnProperty(t)&&un(e)}),e),e.g={}}function Mn(){this.g=!0}function Fn(e,t,n,r){e.info((function(){return"XMLHTTP TEXT ("+t+"): "+function(e,t){if(!e.g)return t;if(!t)return null;try{var n=JSON.parse(t);if(n)for(e=0;e<n.length;e++)if(Array.isArray(n[e])){var r=n[e];if(!(2>r.length)){var i=r[1];if(Array.isArray(i)&&!(1>i.length)){var a=i[0];if("noop"!=a&&"stop"!=a&&"close"!=a)for(var o=1;o<i.length;o++)i[o]=""}}}return yn(n)}catch(u){return t}}(e,n)+(r?" "+r:"")}))}Ln.prototype.M=function(){Ln.X.M.call(this),Pn(this)},Ln.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")},Mn.prototype.Aa=function(){this.g=!1},Mn.prototype.info=function(){};var Vn={},Un=null;function jn(){return Un=Un||new dn}function zn(e){mt.call(this,Vn.Pa,e)}function Bn(e){var t=jn();pn(t,new zn(t))}function qn(e,t){mt.call(this,Vn.STAT_EVENT,e),this.stat=t}function Hn(e){var t=jn();pn(t,new qn(t,e))}function Kn(e,t){mt.call(this,Vn.Qa,e),this.size=t}function Qn(e,t){if("function"!==typeof e)throw Error("Fn must not be null and must be a function");return nt.setTimeout((function(){e()}),t)}Vn.Pa="serverreachability",ht(zn,mt),Vn.STAT_EVENT="statevent",ht(qn,mt),Vn.Qa="timingevent",ht(Kn,mt);var Wn={NO_ERROR:0,mb:1,zb:2,yb:3,tb:4,xb:5,Ab:6,Ma:7,TIMEOUT:8,Db:9},Gn={rb:"complete",Nb:"success",Na:"error",Ma:"abort",Fb:"ready",Gb:"readystatechange",TIMEOUT:"timeout",Bb:"incrementaldata",Eb:"progress",ub:"downloadprogress",Vb:"uploadprogress"};function $n(){}function Xn(e){return e.h||(e.h=e.i())}function Yn(){}$n.prototype.h=null;var Jn,Zn={OPEN:"a",qb:"b",Na:"c",Cb:"d"};function er(){mt.call(this,"d")}function tr(){mt.call(this,"c")}function nr(){}function rr(e,t,n,r){this.l=e,this.j=t,this.m=n,this.U=r||1,this.S=new Ln(this),this.O=ar,e=Nt?125:void 0,this.T=new _n(e),this.H=null,this.i=!1,this.s=this.A=this.v=this.K=this.F=this.V=this.B=null,this.D=[],this.g=null,this.C=0,this.o=this.u=null,this.Y=-1,this.I=!1,this.N=0,this.L=null,this.$=this.J=this.Z=this.P=!1,this.h=new ir}function ir(){this.i=null,this.g="",this.h=!1}ht(er,mt),ht(tr,mt),ht(nr,$n),nr.prototype.g=function(){return new XMLHttpRequest},nr.prototype.i=function(){return{}},Jn=new nr;var ar=45e3,or={},ur={};function sr(e,t,n){e.K=1,e.v=_r(Er(t)),e.s=n,e.P=!0,lr(e,null)}function lr(e,t){e.F=Date.now(),dr(e),e.A=Er(e.v);var n=e.A,r=e.U;Array.isArray(r)||(r=[String(r)]),jr(n.i,"t",r),e.C=0,n=e.l.H,e.h=new ir,e.g=zi(e.l,n?t:null,!e.s),0<e.N&&(e.L=new An(ct(e.La,e,e.g),e.N)),Rn(e.S,e.g,"readystatechange",e.ib),t=e.H?Gt(e.H):{},e.s?(e.u||(e.u="POST"),t["Content-Type"]="application/x-www-form-urlencoded",e.g.da(e.A,e.u,e.s,t)):(e.u="GET",e.g.da(e.A,e.u,null,t)),Bn(),function(e,t,n,r,i,a){e.info((function(){if(e.g)if(a)for(var o="",u=a.split("&"),s=0;s<u.length;s++){var l=u[s].split("=");if(1<l.length){var c=l[0];l=l[1];var f=c.split("_");o=2<=f.length&&"type"==f[1]?o+(c+"=")+l+"&":o+(c+"=redacted&")}}else o=null;else o=a;return"XMLHTTP REQ ("+r+") [attempt "+i+"]: "+t+"\n"+n+"\n"+o}))}(e.j,e.u,e.A,e.m,e.U,e.s)}function cr(e){return!!e.g&&("GET"==e.u&&2!=e.K&&e.l.Da)}function fr(e,t,n){for(var r,i=!0;!e.I&&e.C<n.length;){if((r=hr(e,n))==ur){4==t&&(e.o=4,Hn(14),i=!1),Fn(e.j,e.m,null,"[Incomplete Response]");break}if(r==or){e.o=4,Hn(15),Fn(e.j,e.m,n,"[Invalid Chunk]"),i=!1;break}Fn(e.j,e.m,r,null),gr(e,r)}cr(e)&&r!=ur&&r!=or&&(e.h.g="",e.C=0),4!=t||0!=n.length||e.h.h||(e.o=1,Hn(16),i=!1),e.i=e.i&&i,i?0<n.length&&!e.$&&(e.$=!0,(t=e.l).g==e&&t.$&&!t.K&&(t.j.info("Great, no buffering proxy detected. Bytes received: "+n.length),Oi(t),t.K=!0,Hn(11))):(Fn(e.j,e.m,n,"[Invalid Chunked Response]"),mr(e),yr(e))}function hr(e,t){var n=e.C,r=t.indexOf("\n",n);return-1==r?ur:(n=Number(t.substring(n,r)),isNaN(n)?or:(r+=1)+n>t.length?ur:(t=t.substr(r,n),e.C=r+n,t))}function dr(e){e.V=Date.now()+e.O,pr(e,e.O)}function pr(e,t){if(null!=e.B)throw Error("WatchDog timer not null");e.B=Qn(ct(e.gb,e),t)}function vr(e){e.B&&(nt.clearTimeout(e.B),e.B=null)}function yr(e){0==e.l.G||e.I||Mi(e.l,e)}function mr(e){vr(e);var t=e.L;t&&"function"==typeof t.na&&t.na(),e.L=null,In(e.T),Pn(e.S),e.g&&(t=e.g,e.g=null,t.abort(),t.na())}function gr(e,t){try{var n=e.l;if(0!=n.G&&(n.g==e||Gr(n.h,e)))if(!e.J&&Gr(n.h,e)&&3==n.G){try{var r=n.Fa.g.parse(t)}catch(a){r=null}if(Array.isArray(r)&&3==r.length){var i=r;if(0==i[0]){e:if(!n.u){if(n.g){if(!(n.g.F+3e3<e.F))break e;Pi(n),Ti(n)}Li(n),Hn(18)}}else n.Ba=i[1],0<n.Ba-n.T&&37500>i[2]&&n.L&&0==n.A&&!n.v&&(n.v=Qn(ct(n.cb,n),6e3));if(1>=Wr(n.h)&&n.ja){try{n.ja()}catch(a){}n.ja=void 0}}else Vi(n,11)}else if((e.J||n.g==e)&&Pi(n),!kt(t))for(i=n.Fa.g.parse(t),t=0;t<i.length;t++){var a=i[t];if(n.T=a[0],a=a[1],2==n.G)if("c"==a[0]){n.I=a[1],n.ka=a[2];var o=a[3];null!=o&&(n.ma=o,n.j.info("VER="+n.ma));var u=a[4];null!=u&&(n.Ca=u,n.j.info("SVER="+n.Ca));var s=a[5];null!=s&&"number"===typeof s&&0<s&&(r=1.5*s,n.J=r,n.j.info("backChannelRequestTimeoutMs_="+r)),r=n;var l=e.g;if(l){var c=l.g?l.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(c){var f=r.h;f.g||-1==c.indexOf("spdy")&&-1==c.indexOf("quic")&&-1==c.indexOf("h2")||(f.j=f.l,f.g=new Set,f.h&&($r(f,f.h),f.h=null))}if(r.D){var h=l.g?l.g.getResponseHeader("X-HTTP-Session-Id"):null;h&&(r.za=h,Cr(r.F,r.D,h))}}n.G=3,n.l&&n.l.xa(),n.$&&(n.P=Date.now()-e.F,n.j.info("Handshake RTT: "+n.P+"ms"));var d=e;if((r=n).sa=ji(r,r.H?r.ka:null,r.V),d.J){Xr(r.h,d);var p=d,v=r.J;v&&p.setTimeout(v),p.B&&(vr(p),dr(p)),r.g=d}else Ai(r);0<n.i.length&&_i(n)}else"stop"!=a[0]&&"close"!=a[0]||Vi(n,7);else 3==n.G&&("stop"==a[0]||"close"==a[0]?"stop"==a[0]?Vi(n,7):xi(n):"noop"!=a[0]&&n.l&&n.l.wa(a),n.A=0)}Bn()}catch(a){}}function kr(e,t){if(e.forEach&&"function"==typeof e.forEach)e.forEach(t,void 0);else if(it(e)||"string"===typeof e)Array.prototype.forEach.call(e,t,void 0);else for(var n=function(e){if(e.oa&&"function"==typeof e.oa)return e.oa();if(!e.W||"function"!=typeof e.W){if("undefined"!==typeof Map&&e instanceof Map)return Array.from(e.keys());if(!("undefined"!==typeof Set&&e instanceof Set)){if(it(e)||"string"===typeof e){var t=[];e=e.length;for(var n=0;n<e;n++)t.push(n);return t}for(var r in t=[],n=0,e)t[n++]=r;return t}}}(e),r=function(e){if(e.W&&"function"==typeof e.W)return e.W();if("undefined"!==typeof Map&&e instanceof Map||"undefined"!==typeof Set&&e instanceof Set)return Array.from(e.values());if("string"===typeof e)return e.split("");if(it(e)){for(var t=[],n=e.length,r=0;r<n;r++)t.push(e[r]);return t}for(r in t=[],n=0,e)t[n++]=e[r];return t}(e),i=r.length,a=0;a<i;a++)t.call(void 0,r[a],n&&n[a],e)}(Je=rr.prototype).setTimeout=function(e){this.O=e},Je.ib=function(e){e=e.target;var t=this.L;t&&3==gi(e)?t.l():this.La(e)},Je.La=function(e){try{if(e==this.g)e:{var t=gi(this.g),n=this.g.Ea();this.g.aa();if(!(3>t)&&(3!=t||Nt||this.g&&(this.h.h||this.g.fa()||ki(this.g)))){this.I||4!=t||7==n||Bn(),vr(this);var r=this.g.aa();this.Y=r;t:if(cr(this)){var i=ki(this.g);e="";var a=i.length,o=4==gi(this.g);if(!this.h.i){if("undefined"===typeof TextDecoder){mr(this),yr(this);var u="";break t}this.h.i=new nt.TextDecoder}for(n=0;n<a;n++)this.h.h=!0,e+=this.h.i.decode(i[n],{stream:o&&n==a-1});i.splice(0,a),this.h.g+=e,this.C=0,u=this.h.g}else u=this.g.fa();if(this.i=200==r,function(e,t,n,r,i,a,o){e.info((function(){return"XMLHTTP RESP ("+r+") [ attempt "+i+"]: "+t+"\n"+n+"\n"+a+" "+o}))}(this.j,this.u,this.A,this.m,this.U,t,r),this.i){if(this.Z&&!this.J){t:{if(this.g){var s,l=this.g;if((s=l.g?l.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!kt(s)){var c=s;break t}}c=null}if(!(r=c)){this.i=!1,this.o=3,Hn(12),mr(this),yr(this);break e}Fn(this.j,this.m,r,"Initial handshake response via X-HTTP-Initial-Response"),this.J=!0,gr(this,r)}this.P?(fr(this,t,u),Nt&&this.i&&3==t&&(Rn(this.S,this.T,"tick",this.hb),this.T.start())):(Fn(this.j,this.m,u,null),gr(this,u)),4==t&&mr(this),this.i&&!this.I&&(4==t?Mi(this.l,this):(this.i=!1,dr(this)))}else 400==r&&0<u.indexOf("Unknown SID")?(this.o=3,Hn(12)):(this.o=0,Hn(13)),mr(this),yr(this)}}}catch(t){}},Je.hb=function(){if(this.g){var e=gi(this.g),t=this.g.fa();this.C<t.length&&(vr(this),fr(this,e,t),this.i&&4!=e&&dr(this))}},Je.cancel=function(){this.I=!0,mr(this)},Je.gb=function(){this.B=null;var e=Date.now();0<=e-this.V?(function(e,t){e.info((function(){return"TIMEOUT: "+t}))}(this.j,this.A),2!=this.K&&(Bn(),Hn(17)),mr(this),this.o=2,yr(this)):pr(this,this.V-e)};var br=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function wr(e,t){if(this.g=this.s=this.j="",this.m=null,this.o=this.l="",this.h=!1,e instanceof wr){this.h=void 0!==t?t:e.h,Sr(this,e.j),this.s=e.s,this.g=e.g,xr(this,e.m),this.l=e.l,t=e.i;var n=new Mr;n.i=t.i,t.g&&(n.g=new Map(t.g),n.h=t.h),Tr(this,n),this.o=e.o}else e&&(n=String(e).match(br))?(this.h=!!t,Sr(this,n[1]||"",!0),this.s=Ir(n[2]||""),this.g=Ir(n[3]||"",!0),xr(this,n[4]),this.l=Ir(n[5]||"",!0),Tr(this,n[6]||"",!0),this.o=Ir(n[7]||"")):(this.h=!!t,this.i=new Mr(null,this.h))}function Er(e){return new wr(e)}function Sr(e,t,n){e.j=n?Ir(t,!0):t,e.j&&(e.j=e.j.replace(/:$/,""))}function xr(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.m=t}else e.m=null}function Tr(e,t,n){t instanceof Mr?(e.i=t,function(e,t){t&&!e.j&&(Fr(e),e.i=null,e.g.forEach((function(e,t){var n=t.toLowerCase();t!=n&&(Vr(this,t),jr(this,n,e))}),e)),e.j=t}(e.i,e.h)):(n||(t=Nr(t,Rr)),e.i=new Mr(t,e.h))}function Cr(e,t,n){e.i.set(t,n)}function _r(e){return Cr(e,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),e}function Ir(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function Nr(e,t,n){return"string"===typeof e?(e=encodeURI(e).replace(t,Dr),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function Dr(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}wr.prototype.toString=function(){var e=[],t=this.j;t&&e.push(Nr(t,Ar,!0),":");var n=this.g;return(n||"file"==t)&&(e.push("//"),(t=this.s)&&e.push(Nr(t,Ar,!0),"@"),e.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.m)&&e.push(":",String(n))),(n=this.l)&&(this.g&&"/"!=n.charAt(0)&&e.push("/"),e.push(Nr(n,"/"==n.charAt(0)?Or:Lr,!0))),(n=this.i.toString())&&e.push("?",n),(n=this.o)&&e.push("#",Nr(n,Pr)),e.join("")};var Ar=/[#\/\?@]/g,Lr=/[#\?:]/g,Or=/[#\?]/g,Rr=/[#\?@]/g,Pr=/#/g;function Mr(e,t){this.h=this.g=null,this.i=e||null,this.j=!!t}function Fr(e){e.g||(e.g=new Map,e.h=0,e.i&&function(e,t){if(e){e=e.split("&");for(var n=0;n<e.length;n++){var r=e[n].indexOf("="),i=null;if(0<=r){var a=e[n].substring(0,r);i=e[n].substring(r+1)}else a=e[n];t(a,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}(e.i,(function(t,n){e.add(decodeURIComponent(t.replace(/\+/g," ")),n)})))}function Vr(e,t){Fr(e),t=zr(e,t),e.g.has(t)&&(e.i=null,e.h-=e.g.get(t).length,e.g.delete(t))}function Ur(e,t){return Fr(e),t=zr(e,t),e.g.has(t)}function jr(e,t,n){Vr(e,t),0<n.length&&(e.i=null,e.g.set(zr(e,t),vt(n)),e.h+=n.length)}function zr(e,t){return t=String(t),e.j&&(t=t.toLowerCase()),t}(Je=Mr.prototype).add=function(e,t){Fr(this),this.i=null,e=zr(this,e);var n=this.g.get(e);return n||this.g.set(e,n=[]),n.push(t),this.h+=1,this},Je.forEach=function(e,t){Fr(this),this.g.forEach((function(n,r){n.forEach((function(n){e.call(t,n,r,this)}),this)}),this)},Je.oa=function(){Fr(this);for(var e=Array.from(this.g.values()),t=Array.from(this.g.keys()),n=[],r=0;r<t.length;r++)for(var i=e[r],a=0;a<i.length;a++)n.push(t[r]);return n},Je.W=function(e){Fr(this);var t=[];if("string"===typeof e)Ur(this,e)&&(t=t.concat(this.g.get(zr(this,e))));else{e=Array.from(this.g.values());for(var n=0;n<e.length;n++)t=t.concat(e[n])}return t},Je.set=function(e,t){return Fr(this),this.i=null,Ur(this,e=zr(this,e))&&(this.h-=this.g.get(e).length),this.g.set(e,[t]),this.h+=1,this},Je.get=function(e,t){return e&&0<(e=this.W(e)).length?String(e[0]):t},Je.toString=function(){if(this.i)return this.i;if(!this.g)return"";for(var e=[],t=Array.from(this.g.keys()),n=0;n<t.length;n++){var r=t[n],i=encodeURIComponent(String(r)),a=this.W(r);for(r=0;r<a.length;r++){var o=i;""!==a[r]&&(o+="="+encodeURIComponent(String(a[r]))),e.push(o)}}return this.i=e.join("&")};var Br=m((function e(t,n){v(this,e),this.h=t,this.g=n}));function qr(e){this.l=e||Kr,nt.PerformanceNavigationTiming?e=0<(e=nt.performance.getEntriesByType("navigation")).length&&("hq"==e[0].nextHopProtocol||"h2"==e[0].nextHopProtocol):e=!!(nt.g&&nt.g.Ga&&nt.g.Ga()&&nt.g.Ga().$b),this.j=e?this.l:1,this.g=null,1<this.j&&(this.g=new Set),this.h=null,this.i=[]}var Hr,Kr=10;function Qr(e){return!!e.h||!!e.g&&e.g.size>=e.j}function Wr(e){return e.h?1:e.g?e.g.size:0}function Gr(e,t){return e.h?e.h==t:!!e.g&&e.g.has(t)}function $r(e,t){e.g?e.g.add(t):e.h=t}function Xr(e,t){e.h&&e.h==t?e.h=null:e.g&&e.g.has(t)&&e.g.delete(t)}function Yr(e){if(null!=e.h)return e.i.concat(e.h.D);if(null!=e.g&&0!==e.g.size){var t,n=e.i,r=p(e.g.values());try{for(r.s();!(t=r.n()).done;){var i=t.value;n=n.concat(i.D)}}catch(a){r.e(a)}finally{r.f()}return n}return vt(e.i)}function Jr(){}function Zr(){this.g=new Jr}function ei(e,t,n){var r=n||"";try{kr(e,(function(e,n){var i=e;at(e)&&(i=yn(e)),t.push(r+n+"="+encodeURIComponent(i))}))}catch(i){throw t.push(r+"type="+encodeURIComponent("_badmap")),i}}function ti(e,t,n,r,i){try{t.onload=null,t.onerror=null,t.onabort=null,t.ontimeout=null,i(r)}catch(a){}}function ni(e){this.l=e.ac||null,this.j=e.jb||!1}function ri(e,t){dn.call(this),this.D=e,this.u=t,this.m=void 0,this.readyState=ii,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.v=new Headers,this.h=null,this.C="GET",this.B="",this.g=!1,this.A=this.j=this.l=null}qr.prototype.cancel=function(){if(this.i=Yr(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&0!==this.g.size){var e,t=p(this.g.values());try{for(t.s();!(e=t.n()).done;){e.value.cancel()}}catch(n){t.e(n)}finally{t.f()}this.g.clear()}},Jr.prototype.stringify=function(e){return nt.JSON.stringify(e,void 0)},Jr.prototype.parse=function(e){return nt.JSON.parse(e,void 0)},ht(ni,$n),ni.prototype.g=function(){return new ri(this.l,this.j)},ni.prototype.i=(Hr={},function(){return Hr}),ht(ri,dn);var ii=0;function ai(e){e.j.read().then(e.Ta.bind(e)).catch(e.ga.bind(e))}function oi(e){e.readyState=4,e.l=null,e.j=null,e.A=null,ui(e)}function ui(e){e.onreadystatechange&&e.onreadystatechange.call(e)}(Je=ri.prototype).open=function(e,t){if(this.readyState!=ii)throw this.abort(),Error("Error reopening a connection");this.C=e,this.B=t,this.readyState=1,ui(this)},Je.send=function(e){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.g=!0;var t={headers:this.v,method:this.C,credentials:this.m,cache:void 0};e&&(t.body=e),(this.D||nt).fetch(new Request(this.B,t)).then(this.Wa.bind(this),this.ga.bind(this))},Je.abort=function(){this.response=this.responseText="",this.v=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted.").catch((function(){})),1<=this.readyState&&this.g&&4!=this.readyState&&(this.g=!1,oi(this)),this.readyState=ii},Je.Wa=function(e){if(this.g&&(this.l=e,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=e.headers,this.readyState=2,ui(this)),this.g&&(this.readyState=3,ui(this),this.g)))if("arraybuffer"===this.responseType)e.arrayBuffer().then(this.Ua.bind(this),this.ga.bind(this));else if("undefined"!==typeof nt.ReadableStream&&"body"in e){if(this.j=e.body.getReader(),this.u){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.A=new TextDecoder;ai(this)}else e.text().then(this.Va.bind(this),this.ga.bind(this))},Je.Ta=function(e){if(this.g){if(this.u&&e.value)this.response.push(e.value);else if(!this.u){var t=e.value?e.value:new Uint8Array(0);(t=this.A.decode(t,{stream:!e.done}))&&(this.response=this.responseText+=t)}e.done?oi(this):ui(this),3==this.readyState&&ai(this)}},Je.Va=function(e){this.g&&(this.response=this.responseText=e,oi(this))},Je.Ua=function(e){this.g&&(this.response=e,oi(this))},Je.ga=function(){this.g&&oi(this)},Je.setRequestHeader=function(e,t){this.v.append(e,t)},Je.getResponseHeader=function(e){return this.h&&this.h.get(e.toLowerCase())||""},Je.getAllResponseHeaders=function(){if(!this.h)return"";for(var e=[],t=this.h.entries(),n=t.next();!n.done;)n=n.value,e.push(n[0]+": "+n[1]),n=t.next();return e.join("\r\n")},Object.defineProperty(ri.prototype,"withCredentials",{get:function(){return"include"===this.m},set:function(e){this.m=e?"include":"same-origin"}});var si=nt.JSON.parse;function li(e){dn.call(this),this.headers=new Map,this.u=e||null,this.h=!1,this.C=this.g=null,this.H="",this.m=0,this.j="",this.l=this.F=this.v=this.D=!1,this.B=0,this.A=null,this.J=ci,this.K=this.L=!1}ht(li,dn);var ci="",fi=/^https?$/i,hi=["POST","PUT"];function di(e,t){e.h=!1,e.g&&(e.l=!0,e.g.abort(),e.l=!1),e.j=t,e.m=5,pi(e),yi(e)}function pi(e){e.D||(e.D=!0,pn(e,"complete"),pn(e,"error"))}function vi(e){if(e.h&&"undefined"!=typeof tt&&(!e.C[1]||4!=gi(e)||2!=e.aa()))if(e.v&&4==gi(e))Nn(e.Ha,0,e);else if(pn(e,"readystatechange"),4==gi(e)){e.h=!1;try{var t,n=e.aa();e:switch(n){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var r=!0;break e;default:r=!1}if(!(t=r)){var i;if(i=0===n){var a=String(e.H).match(br)[1]||null;if(!a&&nt.self&&nt.self.location){var o=nt.self.location.protocol;a=o.substr(0,o.length-1)}i=!fi.test(a?a.toLowerCase():"")}t=i}if(t)pn(e,"complete"),pn(e,"success");else{e.m=6;try{var u=2<gi(e)?e.g.statusText:""}catch(s){u=""}e.j=u+" ["+e.aa()+"]",pi(e)}}finally{yi(e)}}}function yi(e,t){if(e.g){mi(e);var n=e.g,r=e.C[0]?rt:null;e.g=null,e.C=null,t||pn(e,"ready");try{n.onreadystatechange=r}catch(i){}}}function mi(e){e.g&&e.K&&(e.g.ontimeout=null),e.A&&(nt.clearTimeout(e.A),e.A=null)}function gi(e){return e.g?e.g.readyState:0}function ki(e){try{if(!e.g)return null;if("response"in e.g)return e.g.response;switch(e.J){case ci:case"text":return e.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in e.g)return e.g.mozResponseArrayBuffer}return null}catch(ra){return null}}function bi(e){var t="";return Wt(e,(function(e,n){t+=n,t+=":",t+=e,t+="\r\n"})),t}function wi(e,t,n){e:{for(r in n){var r=!1;break e}r=!0}r||(n=bi(n),"string"===typeof e?null!=n&&encodeURIComponent(String(n)):Cr(e,t,n))}function Ei(e,t,n){return n&&n.internalChannelParams&&n.internalChannelParams[e]||t}function Si(e){this.Ca=0,this.i=[],this.j=new Mn,this.ka=this.sa=this.F=this.V=this.g=this.za=this.D=this.ia=this.o=this.S=this.s=null,this.ab=this.U=0,this.Za=Ei("failFast",!1,e),this.L=this.v=this.u=this.m=this.l=null,this.Y=!0,this.pa=this.Ba=this.T=-1,this.Z=this.A=this.C=0,this.Xa=Ei("baseRetryDelayMs",5e3,e),this.bb=Ei("retryDelaySeedMs",1e4,e),this.$a=Ei("forwardChannelMaxRetries",2,e),this.ta=Ei("forwardChannelRequestTimeoutMs",2e4,e),this.ra=e&&e.xmlHttpFactory||void 0,this.Da=e&&e.Zb||!1,this.J=void 0,this.H=e&&e.supportsCrossDomainXhr||!1,this.I="",this.h=new qr(e&&e.concurrentRequestLimit),this.Fa=new Zr,this.O=e&&e.fastHandshake||!1,this.N=e&&e.encodeInitMessageHeaders||!1,this.O&&this.N&&(this.N=!1),this.Ya=e&&e.Xb||!1,e&&e.Aa&&this.j.Aa(),e&&e.forceLongPolling&&(this.Y=!1),this.$=!this.O&&this.Y&&e&&e.detectBufferingProxy||!1,this.ja=void 0,this.P=0,this.K=!1,this.la=this.B=null}function xi(e){if(Ci(e),3==e.G){var t=e.U++,n=Er(e.F);Cr(n,"SID",e.I),Cr(n,"RID",t),Cr(n,"TYPE","terminate"),Ni(e,n),(t=new rr(e,e.j,t,void 0)).K=2,t.v=_r(Er(n)),n=!1,nt.navigator&&nt.navigator.sendBeacon&&(n=nt.navigator.sendBeacon(t.v.toString(),"")),!n&&nt.Image&&((new Image).src=t.v,n=!0),n||(t.g=zi(t.l,null),t.g.da(t.v)),t.F=Date.now(),dr(t)}Ui(e)}function Ti(e){e.g&&(Oi(e),e.g.cancel(),e.g=null)}function Ci(e){Ti(e),e.u&&(nt.clearTimeout(e.u),e.u=null),Pi(e),e.h.cancel(),e.m&&("number"===typeof e.m&&nt.clearTimeout(e.m),e.m=null)}function _i(e){Qr(e.h)||e.m||(e.m=!0,Sn(e.Ja,e),e.C=0)}function Ii(e,t){var n;n=t?t.m:e.U++;var r=Er(e.F);Cr(r,"SID",e.I),Cr(r,"RID",n),Cr(r,"AID",e.T),Ni(e,r),e.o&&e.s&&wi(r,e.o,e.s),n=new rr(e,e.j,n,e.C+1),null===e.o&&(n.H=e.s),t&&(e.i=t.D.concat(e.i)),t=Di(e,n,1e3),n.setTimeout(Math.round(.5*e.ta)+Math.round(.5*e.ta*Math.random())),$r(e.h,n),sr(n,r,t)}function Ni(e,t){e.ia&&Wt(e.ia,(function(e,n){Cr(t,n,e)})),e.l&&kr({},(function(e,n){Cr(t,n,e)}))}function Di(e,t,n){n=Math.min(e.i.length,n);var r=e.l?ct(e.l.Ra,e.l,e):null;e:for(var i=e.i,a=-1;;){var o=["count="+n];-1==a?0<n?(a=i[0].h,o.push("ofs="+a)):a=0:o.push("ofs="+a);for(var u=!0,s=0;s<n;s++){var l=i[s].h,c=i[s].g;if(0>(l-=a))a=Math.max(0,i[s].h-100),u=!1;else try{ei(c,o,"req"+l+"_")}catch(f){r&&r(c)}}if(u){r=o.join("&");break e}}return e=e.i.splice(0,n),t.D=e,r}function Ai(e){e.g||e.u||(e.Z=1,Sn(e.Ia,e),e.A=0)}function Li(e){return!(e.g||e.u||3<=e.A)&&(e.Z++,e.u=Qn(ct(e.Ia,e),Fi(e,e.A)),e.A++,!0)}function Oi(e){null!=e.B&&(nt.clearTimeout(e.B),e.B=null)}function Ri(e){e.g=new rr(e,e.j,"rpc",e.Z),null===e.o&&(e.g.H=e.s),e.g.N=0;var t=Er(e.sa);Cr(t,"RID","rpc"),Cr(t,"SID",e.I),Cr(t,"CI",e.L?"0":"1"),Cr(t,"AID",e.T),Cr(t,"TYPE","xmlhttp"),Ni(e,t),e.o&&e.s&&wi(t,e.o,e.s),e.J&&e.g.setTimeout(e.J);var n=e.g;e=e.ka,n.K=1,n.v=_r(Er(t)),n.s=null,n.P=!0,lr(n,e)}function Pi(e){null!=e.v&&(nt.clearTimeout(e.v),e.v=null)}function Mi(e,t){var n=null;if(e.g==t){Pi(e),Oi(e),e.g=null;var r=2}else{if(!Gr(e.h,t))return;n=t.D,Xr(e.h,t),r=1}if(0!=e.G)if(e.pa=t.Y,t.i)if(1==r){n=t.s?t.s.length:0,t=Date.now()-t.F;var i=e.C;pn(r=jn(),new Kn(r,n)),_i(e)}else Ai(e);else if(3==(i=t.o)||0==i&&0<e.pa||!(1==r&&function(e,t){return!(Wr(e.h)>=e.h.j-(e.m?1:0))&&(e.m?(e.i=t.D.concat(e.i),!0):!(1==e.G||2==e.G||e.C>=(e.Za?0:e.$a))&&(e.m=Qn(ct(e.Ja,e,t),Fi(e,e.C)),e.C++,!0))}(e,t)||2==r&&Li(e)))switch(n&&0<n.length&&(t=e.h,t.i=t.i.concat(n)),i){case 1:Vi(e,5);break;case 4:Vi(e,10);break;case 3:Vi(e,6);break;default:Vi(e,2)}}function Fi(e,t){var n=e.Xa+Math.floor(Math.random()*e.bb);return e.l||(n*=2),n*t}function Vi(e,t){if(e.j.info("Error code "+t),2==t){var n=null;e.l&&(n=null);var r=ct(e.kb,e);n||(n=new wr("//www.google.com/images/cleardot.gif"),nt.location&&"http"==nt.location.protocol||Sr(n,"https"),_r(n)),function(e,t){var n=new Mn;if(nt.Image){var r=new Image;r.onload=ft(ti,n,r,"TestLoadImage: loaded",!0,t),r.onerror=ft(ti,n,r,"TestLoadImage: error",!1,t),r.onabort=ft(ti,n,r,"TestLoadImage: abort",!1,t),r.ontimeout=ft(ti,n,r,"TestLoadImage: timeout",!1,t),nt.setTimeout((function(){r.ontimeout&&r.ontimeout()}),1e4),r.src=e}else t(!1)}(n.toString(),r)}else Hn(2);e.G=0,e.l&&e.l.va(t),Ui(e),Ci(e)}function Ui(e){if(e.G=0,e.la=[],e.l){var t=Yr(e.h);0==t.length&&0==e.i.length||(yt(e.la,t),yt(e.la,e.i),e.h.i.length=0,vt(e.i),e.i.length=0),e.l.ua()}}function ji(e,t,n){var r=n instanceof wr?Er(n):new wr(n,void 0);if(""!=r.g)t&&(r.g=t+"."+r.g),xr(r,r.m);else{var i=nt.location;r=i.protocol,t=t?t+"."+i.hostname:i.hostname,i=+i.port;var a=new wr(null,void 0);r&&Sr(a,r),t&&(a.g=t),i&&xr(a,i),n&&(a.l=n),r=a}return n=e.D,t=e.za,n&&t&&Cr(r,n,t),Cr(r,"VER",e.ma),Ni(e,r),r}function zi(e,t,n){if(t&&!e.H)throw Error("Can't create secondary domain capable XhrIo object.");return(t=n&&e.Da&&!e.ra?new li(new ni({jb:!0})):new li(e.ra)).Ka(e.H),t}function Bi(){}function qi(){if(_t&&!(10<=Number(jt)))throw Error("Environmental error: no available transport.")}function Hi(e,t){dn.call(this),this.g=new Si(t),this.l=e,this.h=t&&t.messageUrlParams||null,e=t&&t.messageHeaders||null,t&&t.clientProtocolHeaderRequired&&(e?e["X-Client-Protocol"]="webchannel":e={"X-Client-Protocol":"webchannel"}),this.g.s=e,e=t&&t.initMessageHeaders||null,t&&t.messageContentType&&(e?e["X-WebChannel-Content-Type"]=t.messageContentType:e={"X-WebChannel-Content-Type":t.messageContentType}),t&&t.ya&&(e?e["X-WebChannel-Client-Profile"]=t.ya:e={"X-WebChannel-Client-Profile":t.ya}),this.g.S=e,(e=t&&t.Yb)&&!kt(e)&&(this.g.o=e),this.A=t&&t.supportsCrossDomainXhr||!1,this.v=t&&t.sendRawJson||!1,(t=t&&t.httpSessionIdParam)&&!kt(t)&&(this.g.D=t,null!==(e=this.h)&&t in e&&(t in(e=this.h)&&delete e[t])),this.j=new Wi(this)}function Ki(e){er.call(this);var t=e.__sm__;if(t){e:{for(var n in t){e=n;break e}e=void 0}(this.i=e)&&(e=this.i,t=null!==t&&e in t?t[e]:void 0),this.data=t}else this.data=e}function Qi(){tr.call(this),this.status=1}function Wi(e){this.g=e}(Je=li.prototype).Ka=function(e){this.L=e},Je.da=function(e,t,n,r){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.H+"; newUri="+e);t=t?t.toUpperCase():"GET",this.H=e,this.j="",this.m=0,this.D=!1,this.h=!0,this.g=this.u?this.u.g():Jn.g(),this.C=this.u?Xn(this.u):Xn(Jn),this.g.onreadystatechange=ct(this.Ha,this);try{this.F=!0,this.g.open(t,String(e),!0),this.F=!1}catch(u){return void di(this,u)}if(e=n||"",n=new Map(this.headers),r)if(Object.getPrototypeOf(r)===Object.prototype)for(var i in r)n.set(i,r[i]);else{if("function"!==typeof r.keys||"function"!==typeof r.get)throw Error("Unknown input type for opt_headers: "+String(r));var a,o=p(r.keys());try{for(o.s();!(a=o.n()).done;){var u=a.value;n.set(u,r.get(u))}}catch(v){o.e(v)}finally{o.f()}}r=Array.from(n.keys()).find((function(e){return"content-type"==e.toLowerCase()})),i=nt.FormData&&e instanceof nt.FormData,!(0<=pt(hi,t))||r||i||n.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");var s,l=p(n);try{for(l.s();!(s=l.n()).done;){var c=d(s.value,2),f=c[0],h=c[1];this.g.setRequestHeader(f,h)}}catch(v){l.e(v)}finally{l.f()}this.J&&(this.g.responseType=this.J),"withCredentials"in this.g&&this.g.withCredentials!==this.L&&(this.g.withCredentials=this.L);try{mi(this),0<this.B&&((this.K=function(e){return _t&&Vt()&&"number"===typeof e.timeout&&void 0!==e.ontimeout}(this.g))?(this.g.timeout=this.B,this.g.ontimeout=ct(this.qa,this)):this.A=Nn(this.qa,this.B,this)),this.v=!0,this.g.send(e),this.v=!1}catch(u){di(this,u)}},Je.qa=function(){"undefined"!=typeof tt&&this.g&&(this.j="Timed out after "+this.B+"ms, aborting",this.m=8,pn(this,"timeout"),this.abort(8))},Je.abort=function(e){this.g&&this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1,this.m=e||7,pn(this,"complete"),pn(this,"abort"),yi(this))},Je.M=function(){this.g&&(this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1),yi(this,!0)),li.X.M.call(this)},Je.Ha=function(){this.s||(this.F||this.v||this.l?vi(this):this.fb())},Je.fb=function(){vi(this)},Je.aa=function(){try{return 2<gi(this)?this.g.status:-1}catch(Hr){return-1}},Je.fa=function(){try{return this.g?this.g.responseText:""}catch(Hr){return""}},Je.Sa=function(e){if(this.g){var t=this.g.responseText;return e&&0==t.indexOf(e)&&(t=t.substring(e.length)),si(t)}},Je.Ea=function(){return this.m},Je.Oa=function(){return"string"===typeof this.j?this.j:String(this.j)},(Je=Si.prototype).ma=8,Je.G=1,Je.Ja=function(e){if(this.m)if(this.m=null,1==this.G){if(!e){this.U=Math.floor(1e5*Math.random()),e=this.U++;var t=new rr(this,this.j,e,void 0),n=this.s;if(this.S&&(n?Xt(n=Gt(n),this.S):n=this.S),null!==this.o||this.N||(t.H=n,n=null),this.O)e:{for(var r=0,i=0;i<this.i.length;i++){var a=this.i[i];if(void 0===(a="__data__"in a.g&&"string"===typeof(a=a.g.__data__)?a.length:void 0))break;if(4096<(r+=a)){r=i;break e}if(4096===r||i===this.i.length-1){r=i+1;break e}}r=1e3}else r=1e3;r=Di(this,t,r),Cr(i=Er(this.F),"RID",e),Cr(i,"CVER",22),this.D&&Cr(i,"X-HTTP-Session-Id",this.D),Ni(this,i),n&&(this.N?r="headers="+encodeURIComponent(String(bi(n)))+"&"+r:this.o&&wi(i,this.o,n)),$r(this.h,t),this.Ya&&Cr(i,"TYPE","init"),this.O?(Cr(i,"$req",r),Cr(i,"SID","null"),t.Z=!0,sr(t,i,null)):sr(t,i,r),this.G=2}}else 3==this.G&&(e?Ii(this,e):0==this.i.length||Qr(this.h)||Ii(this))},Je.Ia=function(){if(this.u=null,Ri(this),this.$&&!(this.K||null==this.g||0>=this.P)){var e=2*this.P;this.j.info("BP detection timer enabled: "+e),this.B=Qn(ct(this.eb,this),e)}},Je.eb=function(){this.B&&(this.B=null,this.j.info("BP detection timeout reached."),this.j.info("Buffering proxy detected and switch to long-polling!"),this.L=!1,this.K=!0,Hn(10),Ti(this),Ri(this))},Je.cb=function(){null!=this.v&&(this.v=null,Ti(this),Li(this),Hn(19))},Je.kb=function(e){e?(this.j.info("Successfully pinged google.com"),Hn(2)):(this.j.info("Failed to ping google.com"),Hn(1))},(Je=Bi.prototype).xa=function(){},Je.wa=function(){},Je.va=function(){},Je.ua=function(){},Je.Ra=function(){},qi.prototype.g=function(e,t){return new Hi(e,t)},ht(Hi,dn),Hi.prototype.m=function(){this.g.l=this.j,this.A&&(this.g.H=!0);var e=this.g,t=this.l,n=this.h||void 0;Hn(0),e.V=t,e.ia=n||{},e.L=e.Y,e.F=ji(e,null,e.V),_i(e)},Hi.prototype.close=function(){xi(this.g)},Hi.prototype.u=function(e){var t=this.g;if("string"===typeof e){var n={};n.__data__=e,e=n}else this.v&&((n={}).__data__=yn(e),e=n);t.i.push(new Br(t.ab++,e)),3==t.G&&_i(t)},Hi.prototype.M=function(){this.g.l=null,delete this.j,xi(this.g),delete this.g,Hi.X.M.call(this)},ht(Ki,er),ht(Qi,tr),ht(Wi,Bi),Wi.prototype.xa=function(){pn(this.g,"a")},Wi.prototype.wa=function(e){pn(this.g,new Ki(e))},Wi.prototype.va=function(e){pn(this.g,new Qi)},Wi.prototype.ua=function(){pn(this.g,"b")},qi.prototype.createWebChannel=qi.prototype.g,Hi.prototype.send=Hi.prototype.u,Hi.prototype.open=Hi.prototype.m,Hi.prototype.close=Hi.prototype.close,Wn.NO_ERROR=0,Wn.TIMEOUT=8,Wn.HTTP_ERROR=6,Gn.COMPLETE="complete",Yn.EventType=Zn,Zn.OPEN="a",Zn.CLOSE="b",Zn.ERROR="c",Zn.MESSAGE="d",dn.prototype.listen=dn.prototype.N,li.prototype.listenOnce=li.prototype.O,li.prototype.getLastError=li.prototype.Oa,li.prototype.getLastErrorCode=li.prototype.Ea,li.prototype.getStatus=li.prototype.aa,li.prototype.getResponseJson=li.prototype.Sa,li.prototype.getResponseText=li.prototype.fa,li.prototype.send=li.prototype.da,li.prototype.setWithCredentials=li.prototype.Ka;var Gi=et.createWebChannelTransport=function(){return new qi},$i=et.getStatEventTarget=function(){return jn()},Xi=et.ErrorCode=Wn,Yi=et.EventType=Gn,Ji=et.Event=Vn,Zi=et.Stat={sb:0,vb:1,wb:2,Pb:3,Ub:4,Rb:5,Sb:6,Qb:7,Ob:8,Tb:9,PROXY:10,NOPROXY:11,Mb:12,Ib:13,Jb:14,Hb:15,Kb:16,Lb:17,ob:18,nb:19,pb:20},ea=et.FetchXmlHttpFactory=ni,ta=et.WebChannel=Yn,na=et.XhrIo=li,ra="@firebase/firestore",ia=function(){function e(t){v(this,e),this.uid=t}return m(e,[{key:"isAuthenticated",value:function(){return null!=this.uid}},{key:"toKey",value:function(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}},{key:"isEqual",value:function(e){return e.uid===this.uid}}]),e}();ia.UNAUTHENTICATED=new ia(null),ia.GOOGLE_CREDENTIALS=new ia("google-credentials-uid"),ia.FIRST_PARTY=new ia("first-party-uid"),ia.MOCK_USER=new ia("mock-user");var aa="9.13.0",oa=new te("@firebase/firestore");function ua(){return oa.logLevel}function sa(e){if(oa.logLevel<=G.DEBUG){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=n.map(fa);oa.debug.apply(oa,["Firestore (".concat(aa,"): ").concat(e)].concat(a(i)))}}function la(e){if(oa.logLevel<=G.ERROR){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=n.map(fa);oa.error.apply(oa,["Firestore (".concat(aa,"): ").concat(e)].concat(a(i)))}}function ca(e){if(oa.logLevel<=G.WARN){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=n.map(fa);oa.warn.apply(oa,["Firestore (".concat(aa,"): ").concat(e)].concat(a(i)))}}function fa(e){if("string"==typeof e)return e;try{return t=e,JSON.stringify(t)}catch(t){return e}var t}function ha(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Unexpected state",t="FIRESTORE (".concat(aa,") INTERNAL ASSERTION FAILED: ")+e;throw la(t),new Error(t)}function da(e,t){e||ha()}function pa(e,t){return e}var va={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"},ya=function(e){b(n,e);var t=x(n);function n(e,r){var i;return v(this,n),(i=t.call(this,e,r)).code=e,i.message=r,i.toString=function(){return"".concat(i.name,": [code=").concat(i.code,"]: ").concat(i.message)},i}return m(n)}(F),ma=m((function e(){var t=this;v(this,e),this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))})),ga=m((function e(t,n){v(this,e),this.user=n,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization","Bearer ".concat(t))})),ka=function(){function e(){v(this,e)}return m(e,[{key:"getToken",value:function(){return Promise.resolve(null)}},{key:"invalidateToken",value:function(){}},{key:"start",value:function(e,t){e.enqueueRetryable((function(){return t(ia.UNAUTHENTICATED)}))}},{key:"shutdown",value:function(){}}]),e}(),ba=function(){function e(t){v(this,e),this.token=t,this.changeListener=null}return m(e,[{key:"getToken",value:function(){return Promise.resolve(this.token)}},{key:"invalidateToken",value:function(){}},{key:"start",value:function(e,t){var n=this;this.changeListener=t,e.enqueueRetryable((function(){return t(n.token.user)}))}},{key:"shutdown",value:function(){this.changeListener=null}}]),e}(),wa=function(){function e(t){v(this,e),this.t=t,this.currentUser=ia.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}return m(e,[{key:"start",value:function(e,t){var n=this,r=this.i,i=function(e){return n.i!==r?(r=n.i,t(e)):Promise.resolve()},a=new ma;this.o=function(){n.i++,n.currentUser=n.u(),a.resolve(),a=new ma,e.enqueueRetryable((function(){return i(n.currentUser)}))};var o=function(){var t=a;e.enqueueRetryable(l(u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.promise;case 2:return e.next=4,i(n.currentUser);case 4:case"end":return e.stop()}}),e)}))))},s=function(e){sa("FirebaseAuthCredentialsProvider","Auth detected"),n.auth=e,n.auth.addAuthTokenListener(n.o),o()};this.t.onInit((function(e){return s(e)})),setTimeout((function(){if(!n.auth){var e=n.t.getImmediate({optional:!0});e?s(e):(sa("FirebaseAuthCredentialsProvider","Auth not yet detected"),a.resolve(),a=new ma)}}),0),o()}},{key:"getToken",value:function(){var e=this,t=this.i,n=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(n).then((function(n){return e.i!==t?(sa("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),e.getToken()):n?(da("string"==typeof n.accessToken),new ga(n.accessToken,e.currentUser)):null})):Promise.resolve(null)}},{key:"invalidateToken",value:function(){this.forceRefresh=!0}},{key:"shutdown",value:function(){this.auth&&this.auth.removeAuthTokenListener(this.o)}},{key:"u",value:function(){var e=this.auth&&this.auth.getUid();return da(null===e||"string"==typeof e),new ia(e)}}]),e}(),Ea=function(){function e(t,n,r,i){v(this,e),this.h=t,this.l=n,this.m=r,this.g=i,this.type="FirstParty",this.user=ia.FIRST_PARTY,this.p=new Map}return m(e,[{key:"I",value:function(){return this.g?this.g():(da(!("object"!=typeof this.h||null===this.h||!this.h.auth||!this.h.auth.getAuthHeaderValueForFirstParty)),this.h.auth.getAuthHeaderValueForFirstParty([]))}},{key:"headers",get:function(){this.p.set("X-Goog-AuthUser",this.l);var e=this.I();return e&&this.p.set("Authorization",e),this.m&&this.p.set("X-Goog-Iam-Authorization-Token",this.m),this.p}}]),e}(),Sa=function(){function e(t,n,r,i){v(this,e),this.h=t,this.l=n,this.m=r,this.g=i}return m(e,[{key:"getToken",value:function(){return Promise.resolve(new Ea(this.h,this.l,this.m,this.g))}},{key:"start",value:function(e,t){e.enqueueRetryable((function(){return t(ia.FIRST_PARTY)}))}},{key:"shutdown",value:function(){}},{key:"invalidateToken",value:function(){}}]),e}(),xa=m((function e(t){v(this,e),this.value=t,this.type="AppCheck",this.headers=new Map,t&&t.length>0&&this.headers.set("x-firebase-appcheck",this.value)})),Ta=function(){function e(t){v(this,e),this.T=t,this.forceRefresh=!1,this.appCheck=null,this.A=null}return m(e,[{key:"start",value:function(e,t){var n=this,r=function(e){null!=e.error&&sa("FirebaseAppCheckTokenProvider","Error getting App Check token; using placeholder token instead. Error: ".concat(e.error.message));var r=e.token!==n.A;return n.A=e.token,sa("FirebaseAppCheckTokenProvider","Received ".concat(r?"new":"existing"," token.")),r?t(e.token):Promise.resolve()};this.o=function(t){e.enqueueRetryable((function(){return r(t)}))};var i=function(e){sa("FirebaseAppCheckTokenProvider","AppCheck detected"),n.appCheck=e,n.appCheck.addTokenListener(n.o)};this.T.onInit((function(e){return i(e)})),setTimeout((function(){if(!n.appCheck){var e=n.T.getImmediate({optional:!0});e?i(e):sa("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}}),0)}},{key:"getToken",value:function(){var e=this,t=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(t).then((function(t){return t?(da("string"==typeof t.token),e.A=t.token,new xa(t.token)):null})):Promise.resolve(null)}},{key:"invalidateToken",value:function(){this.forceRefresh=!0}},{key:"shutdown",value:function(){this.appCheck&&this.appCheck.removeTokenListener(this.o)}}]),e}();function Ca(e){var t="undefined"!=typeof self&&(self.crypto||self.msCrypto),n=new Uint8Array(e);if(t&&"function"==typeof t.getRandomValues)t.getRandomValues(n);else for(var r=0;r<e;r++)n[r]=Math.floor(256*Math.random());return n}var _a=function(){function e(){v(this,e)}return m(e,null,[{key:"R",value:function(){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t=Math.floor(256/e.length)*e.length,n="";n.length<20;)for(var r=Ca(40),i=0;i<r.length;++i)n.length<20&&r[i]<t&&(n+=e.charAt(r[i]%e.length));return n}}]),e}();function Ia(e,t){return e<t?-1:e>t?1:0}function Na(e,t,n){return e.length===t.length&&e.every((function(e,r){return n(e,t[r])}))}var Da=function(){function e(t,n){if(v(this,e),this.seconds=t,this.nanoseconds=n,n<0)throw new ya(va.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(n>=1e9)throw new ya(va.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(t<-62135596800)throw new ya(va.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t);if(t>=253402300800)throw new ya(va.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t)}return m(e,[{key:"toDate",value:function(){return new Date(this.toMillis())}},{key:"toMillis",value:function(){return 1e3*this.seconds+this.nanoseconds/1e6}},{key:"_compareTo",value:function(e){return this.seconds===e.seconds?Ia(this.nanoseconds,e.nanoseconds):Ia(this.seconds,e.seconds)}},{key:"isEqual",value:function(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds}},{key:"toString",value:function(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}},{key:"toJSON",value:function(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}}},{key:"valueOf",value:function(){var e=this.seconds- -62135596800;return String(e).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}],[{key:"now",value:function(){return e.fromMillis(Date.now())}},{key:"fromDate",value:function(t){return e.fromMillis(t.getTime())}},{key:"fromMillis",value:function(t){var n=Math.floor(t/1e3);return new e(n,Math.floor(1e6*(t-1e3*n)))}}]),e}(),Aa=function(){function e(t){v(this,e),this.timestamp=t}return m(e,[{key:"compareTo",value:function(e){return this.timestamp._compareTo(e.timestamp)}},{key:"isEqual",value:function(e){return this.timestamp.isEqual(e.timestamp)}},{key:"toMicroseconds",value:function(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}},{key:"toString",value:function(){return"SnapshotVersion("+this.timestamp.toString()+")"}},{key:"toTimestamp",value:function(){return this.timestamp}}],[{key:"fromTimestamp",value:function(t){return new e(t)}},{key:"min",value:function(){return new e(new Da(0,0))}},{key:"max",value:function(){return new e(new Da(253402300799,999999999))}}]),e}(),La=function(){function e(t,n,r){v(this,e),void 0===n?n=0:n>t.length&&ha(),void 0===r?r=t.length-n:r>t.length-n&&ha(),this.segments=t,this.offset=n,this.len=r}return m(e,[{key:"length",get:function(){return this.len}},{key:"isEqual",value:function(t){return 0===e.comparator(this,t)}},{key:"child",value:function(t){var n=this.segments.slice(this.offset,this.limit());return t instanceof e?t.forEach((function(e){n.push(e)})):n.push(t),this.construct(n)}},{key:"limit",value:function(){return this.offset+this.length}},{key:"popFirst",value:function(e){return e=void 0===e?1:e,this.construct(this.segments,this.offset+e,this.length-e)}},{key:"popLast",value:function(){return this.construct(this.segments,this.offset,this.length-1)}},{key:"firstSegment",value:function(){return this.segments[this.offset]}},{key:"lastSegment",value:function(){return this.get(this.length-1)}},{key:"get",value:function(e){return this.segments[this.offset+e]}},{key:"isEmpty",value:function(){return 0===this.length}},{key:"isPrefixOf",value:function(e){if(e.length<this.length)return!1;for(var t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}},{key:"isImmediateParentOf",value:function(e){if(this.length+1!==e.length)return!1;for(var t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}},{key:"forEach",value:function(e){for(var t=this.offset,n=this.limit();t<n;t++)e(this.segments[t])}},{key:"toArray",value:function(){return this.segments.slice(this.offset,this.limit())}}],[{key:"comparator",value:function(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){var i=e.get(r),a=t.get(r);if(i<a)return-1;if(i>a)return 1}return e.length<t.length?-1:e.length>t.length?1:0}}]),e}(),Oa=function(e){b(n,e);var t=x(n);function n(){return v(this,n),t.apply(this,arguments)}return m(n,[{key:"construct",value:function(e,t,r){return new n(e,t,r)}},{key:"canonicalString",value:function(){return this.toArray().join("/")}},{key:"toString",value:function(){return this.canonicalString()}}],[{key:"fromString",value:function(){for(var e=[],t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];for(var o=0,u=r;o<u.length;o++){var s=u[o];if(s.indexOf("//")>=0)throw new ya(va.INVALID_ARGUMENT,"Invalid segment (".concat(s,"). Paths must not contain // in them."));e.push.apply(e,a(s.split("/").filter((function(e){return e.length>0}))))}return new n(e)}},{key:"emptyPath",value:function(){return new n([])}}]),n}(La),Ra=/^[_a-zA-Z][_a-zA-Z0-9]*$/,Pa=function(e){b(n,e);var t=x(n);function n(){return v(this,n),t.apply(this,arguments)}return m(n,[{key:"construct",value:function(e,t,r){return new n(e,t,r)}},{key:"canonicalString",value:function(){return this.toArray().map((function(e){return e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),n.isValidIdentifier(e)||(e="`"+e+"`"),e})).join(".")}},{key:"toString",value:function(){return this.canonicalString()}},{key:"isKeyField",value:function(){return 1===this.length&&"__name__"===this.get(0)}}],[{key:"isValidIdentifier",value:function(e){return Ra.test(e)}},{key:"keyField",value:function(){return new n(["__name__"])}},{key:"fromServerFormat",value:function(e){for(var t=[],r="",i=0,a=function(){if(0===r.length)throw new ya(va.INVALID_ARGUMENT,"Invalid field path (".concat(e,"). Paths must not be empty, begin with '.', end with '.', or contain '..'"));t.push(r),r=""},o=!1;i<e.length;){var u=e[i];if("\\"===u){if(i+1===e.length)throw new ya(va.INVALID_ARGUMENT,"Path has trailing escape character: "+e);var s=e[i+1];if("\\"!==s&&"."!==s&&"`"!==s)throw new ya(va.INVALID_ARGUMENT,"Path has invalid escape sequence: "+e);r+=s,i+=2}else"`"===u?(o=!o,i++):"."!==u||o?(r+=u,i++):(a(),i++)}if(a(),o)throw new ya(va.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new n(t)}},{key:"emptyPath",value:function(){return new n([])}}]),n}(La),Ma=function(){function e(t){v(this,e),this.path=t}return m(e,[{key:"collectionGroup",get:function(){return this.path.popLast().lastSegment()}},{key:"hasCollectionId",value:function(e){return this.path.length>=2&&this.path.get(this.path.length-2)===e}},{key:"getCollectionGroup",value:function(){return this.path.get(this.path.length-2)}},{key:"getCollectionPath",value:function(){return this.path.popLast()}},{key:"isEqual",value:function(e){return null!==e&&0===Oa.comparator(this.path,e.path)}},{key:"toString",value:function(){return this.path.toString()}}],[{key:"fromPath",value:function(t){return new e(Oa.fromString(t))}},{key:"fromName",value:function(t){return new e(Oa.fromString(t).popFirst(5))}},{key:"empty",value:function(){return new e(Oa.emptyPath())}},{key:"comparator",value:function(e,t){return Oa.comparator(e.path,t.path)}},{key:"isDocumentKey",value:function(e){return e.length%2==0}},{key:"fromSegments",value:function(t){return new e(new Oa(t.slice()))}}]),e}(),Fa=m((function e(t,n,r,i){v(this,e),this.indexId=t,this.collectionGroup=n,this.fields=r,this.indexState=i}));Fa.UNKNOWN_ID=-1;function Va(e,t){var n=e.toTimestamp().seconds,r=e.toTimestamp().nanoseconds+1,i=Aa.fromTimestamp(1e9===r?new Da(n+1,0):new Da(n,r));return new ja(i,Ma.empty(),t)}function Ua(e){return new ja(e.readTime,e.key,-1)}var ja=function(){function e(t,n,r){v(this,e),this.readTime=t,this.documentKey=n,this.largestBatchId=r}return m(e,null,[{key:"min",value:function(){return new e(Aa.min(),Ma.empty(),-1)}},{key:"max",value:function(){return new e(Aa.max(),Ma.empty(),-1)}}]),e}();function za(e,t){var n=e.readTime.compareTo(t.readTime);return 0!==n?n:0!==(n=Ma.comparator(e.documentKey,t.documentKey))?n:Ia(e.largestBatchId,t.largestBatchId)}var Ba="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.",qa=function(){function e(){v(this,e),this.onCommittedListeners=[]}return m(e,[{key:"addOnCommittedListener",value:function(e){this.onCommittedListeners.push(e)}},{key:"raiseOnCommittedEvent",value:function(){this.onCommittedListeners.forEach((function(e){return e()}))}}]),e}();function Ha(e){return Ka.apply(this,arguments)}function Ka(){return Ka=l(u().mark((function e(t){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.code===va.FAILED_PRECONDITION&&t.message===Ba){e.next=2;break}throw t;case 2:sa("LocalStore","Unexpectedly lost primary lease");case 3:case"end":return e.stop()}}),e)}))),Ka.apply(this,arguments)}var Qa=function(){function e(t){var n=this;v(this,e),this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,t((function(e){n.isDone=!0,n.result=e,n.nextCallback&&n.nextCallback(e)}),(function(e){n.isDone=!0,n.error=e,n.catchCallback&&n.catchCallback(e)}))}return m(e,[{key:"catch",value:function(e){return this.next(void 0,e)}},{key:"next",value:function(t,n){var r=this;return this.callbackAttached&&ha(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(n,this.error):this.wrapSuccess(t,this.result):new e((function(e,i){r.nextCallback=function(n){r.wrapSuccess(t,n).next(e,i)},r.catchCallback=function(t){r.wrapFailure(n,t).next(e,i)}}))}},{key:"toPromise",value:function(){var e=this;return new Promise((function(t,n){e.next(t,n)}))}},{key:"wrapUserFunction",value:function(t){try{var n=t();return n instanceof e?n:e.resolve(n)}catch(t){return e.reject(t)}}},{key:"wrapSuccess",value:function(t,n){return t?this.wrapUserFunction((function(){return t(n)})):e.resolve(n)}},{key:"wrapFailure",value:function(t,n){return t?this.wrapUserFunction((function(){return t(n)})):e.reject(n)}}],[{key:"resolve",value:function(t){return new e((function(e,n){e(t)}))}},{key:"reject",value:function(t){return new e((function(e,n){n(t)}))}},{key:"waitFor",value:function(t){return new e((function(e,n){var r=0,i=0,a=!1;t.forEach((function(t){++r,t.next((function(){++i,a&&i===r&&e()}),(function(e){return n(e)}))})),a=!0,i===r&&e()}))}},{key:"or",value:function(t){var n,r=e.resolve(!1),i=p(t);try{var a=function(){var t=n.value;r=r.next((function(n){return n?e.resolve(n):t()}))};for(i.s();!(n=i.n()).done;)a()}catch(o){i.e(o)}finally{i.f()}return r}},{key:"forEach",value:function(e,t){var n=this,r=[];return e.forEach((function(e,i){r.push(t.call(n,e,i))})),this.waitFor(r)}},{key:"mapArray",value:function(t,n){return new e((function(e,r){for(var i=t.length,a=new Array(i),o=0,u=function(u){var s=u;n(t[s]).next((function(t){a[s]=t,++o===i&&e(a)}),(function(e){return r(e)}))},s=0;s<i;s++)u(s)}))}},{key:"doWhile",value:function(t,n){return new e((function(e,r){!function i(){!0===t()?n().next((function(){i()}),r):e()}()}))}}]),e}();function Wa(e){return"IndexedDbTransactionError"===e.name}var Ga=function(){function e(t,n){var r=this;v(this,e),this.previousValue=t,n&&(n.sequenceNumberHandler=function(e){return r.ut(e)},this.ct=function(e){return n.writeSequenceNumber(e)})}return m(e,[{key:"ut",value:function(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}},{key:"next",value:function(){var e=++this.previousValue;return this.ct&&this.ct(e),e}}]),e}();function $a(e){var t=0;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function Xa(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(n,e[n])}function Ya(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}Ga.at=-1;var Ja=function(){function e(t,n){v(this,e),this.comparator=t,this.root=n||eo.EMPTY}return m(e,[{key:"insert",value:function(t,n){return new e(this.comparator,this.root.insert(t,n,this.comparator).copy(null,null,eo.BLACK,null,null))}},{key:"remove",value:function(t){return new e(this.comparator,this.root.remove(t,this.comparator).copy(null,null,eo.BLACK,null,null))}},{key:"get",value:function(e){for(var t=this.root;!t.isEmpty();){var n=this.comparator(e,t.key);if(0===n)return t.value;n<0?t=t.left:n>0&&(t=t.right)}return null}},{key:"indexOf",value:function(e){for(var t=0,n=this.root;!n.isEmpty();){var r=this.comparator(e,n.key);if(0===r)return t+n.left.size;r<0?n=n.left:(t+=n.left.size+1,n=n.right)}return-1}},{key:"isEmpty",value:function(){return this.root.isEmpty()}},{key:"size",get:function(){return this.root.size}},{key:"minKey",value:function(){return this.root.minKey()}},{key:"maxKey",value:function(){return this.root.maxKey()}},{key:"inorderTraversal",value:function(e){return this.root.inorderTraversal(e)}},{key:"forEach",value:function(e){this.inorderTraversal((function(t,n){return e(t,n),!1}))}},{key:"toString",value:function(){var e=[];return this.inorderTraversal((function(t,n){return e.push("".concat(t,":").concat(n)),!1})),"{".concat(e.join(", "),"}")}},{key:"reverseTraversal",value:function(e){return this.root.reverseTraversal(e)}},{key:"getIterator",value:function(){return new Za(this.root,null,this.comparator,!1)}},{key:"getIteratorFrom",value:function(e){return new Za(this.root,e,this.comparator,!1)}},{key:"getReverseIterator",value:function(){return new Za(this.root,null,this.comparator,!0)}},{key:"getReverseIteratorFrom",value:function(e){return new Za(this.root,e,this.comparator,!0)}}]),e}(),Za=function(){function e(t,n,r,i){v(this,e),this.isReverse=i,this.nodeStack=[];for(var a=1;!t.isEmpty();)if(a=n?r(t.key,n):1,n&&i&&(a*=-1),a<0)t=this.isReverse?t.left:t.right;else{if(0===a){this.nodeStack.push(t);break}this.nodeStack.push(t),t=this.isReverse?t.right:t.left}}return m(e,[{key:"getNext",value:function(){var e=this.nodeStack.pop(),t={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 t}},{key:"hasNext",value:function(){return this.nodeStack.length>0}},{key:"peek",value:function(){if(0===this.nodeStack.length)return null;var e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}}}]),e}(),eo=function(){function e(t,n,r,i,a){v(this,e),this.key=t,this.value=n,this.color=null!=r?r:e.RED,this.left=null!=i?i:e.EMPTY,this.right=null!=a?a:e.EMPTY,this.size=this.left.size+1+this.right.size}return m(e,[{key:"copy",value:function(t,n,r,i,a){return new e(null!=t?t:this.key,null!=n?n:this.value,null!=r?r:this.color,null!=i?i:this.left,null!=a?a:this.right)}},{key:"isEmpty",value:function(){return!1}},{key:"inorderTraversal",value:function(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)}},{key:"reverseTraversal",value:function(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}},{key:"min",value:function(){return this.left.isEmpty()?this:this.left.min()}},{key:"minKey",value:function(){return this.min().key}},{key:"maxKey",value:function(){return this.right.isEmpty()?this.key:this.right.maxKey()}},{key:"insert",value:function(e,t,n){var r=this,i=n(e,r.key);return(r=i<0?r.copy(null,null,null,r.left.insert(e,t,n),null):0===i?r.copy(null,t,null,null,null):r.copy(null,null,null,null,r.right.insert(e,t,n))).fixUp()}},{key:"removeMin",value:function(){if(this.left.isEmpty())return e.EMPTY;var t=this;return t.left.isRed()||t.left.left.isRed()||(t=t.moveRedLeft()),(t=t.copy(null,null,null,t.left.removeMin(),null)).fixUp()}},{key:"remove",value:function(t,n){var r,i=this;if(n(t,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(t,n),null);else{if(i.left.isRed()&&(i=i.rotateRight()),i.right.isEmpty()||i.right.isRed()||i.right.left.isRed()||(i=i.moveRedRight()),0===n(t,i.key)){if(i.right.isEmpty())return e.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(t,n))}return i.fixUp()}},{key:"isRed",value:function(){return this.color}},{key:"fixUp",value:function(){var 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}},{key:"moveRedLeft",value:function(){var e=this.colorFlip();return e.right.left.isRed()&&(e=(e=(e=e.copy(null,null,null,null,e.right.rotateRight())).rotateLeft()).colorFlip()),e}},{key:"moveRedRight",value:function(){var e=this.colorFlip();return e.left.left.isRed()&&(e=(e=e.rotateRight()).colorFlip()),e}},{key:"rotateLeft",value:function(){var t=this.copy(null,null,e.RED,null,this.right.left);return this.right.copy(null,null,this.color,t,null)}},{key:"rotateRight",value:function(){var t=this.copy(null,null,e.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,t)}},{key:"colorFlip",value:function(){var e=this.left.copy(null,null,!this.left.color,null,null),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,t)}},{key:"checkMaxDepth",value:function(){var e=this.check();return Math.pow(2,e)<=this.size+1}},{key:"check",value:function(){if(this.isRed()&&this.left.isRed())throw ha();if(this.right.isRed())throw ha();var e=this.left.check();if(e!==this.right.check())throw ha();return e+(this.isRed()?0:1)}}]),e}();eo.EMPTY=null,eo.RED=!0,eo.BLACK=!1,eo.EMPTY=new(function(){function e(){v(this,e),this.size=0}return m(e,[{key:"key",get:function(){throw ha()}},{key:"value",get:function(){throw ha()}},{key:"color",get:function(){throw ha()}},{key:"left",get:function(){throw ha()}},{key:"right",get:function(){throw ha()}},{key:"copy",value:function(e,t,n,r,i){return this}},{key:"insert",value:function(e,t,n){return new eo(e,t)}},{key:"remove",value:function(e,t){return this}},{key:"isEmpty",value:function(){return!0}},{key:"inorderTraversal",value:function(e){return!1}},{key:"reverseTraversal",value:function(e){return!1}},{key:"minKey",value:function(){return null}},{key:"maxKey",value:function(){return null}},{key:"isRed",value:function(){return!1}},{key:"checkMaxDepth",value:function(){return!0}},{key:"check",value:function(){return 0}}]),e}());var to=function(){function e(t){v(this,e),this.comparator=t,this.data=new Ja(this.comparator)}return m(e,[{key:"has",value:function(e){return null!==this.data.get(e)}},{key:"first",value:function(){return this.data.minKey()}},{key:"last",value:function(){return this.data.maxKey()}},{key:"size",get:function(){return this.data.size}},{key:"indexOf",value:function(e){return this.data.indexOf(e)}},{key:"forEach",value:function(e){this.data.inorderTraversal((function(t,n){return e(t),!1}))}},{key:"forEachInRange",value:function(e,t){for(var n=this.data.getIteratorFrom(e[0]);n.hasNext();){var r=n.getNext();if(this.comparator(r.key,e[1])>=0)return;t(r.key)}}},{key:"forEachWhile",value:function(e,t){var n;for(n=void 0!==t?this.data.getIteratorFrom(t):this.data.getIterator();n.hasNext();)if(!e(n.getNext().key))return}},{key:"firstAfterOrEqual",value:function(e){var t=this.data.getIteratorFrom(e);return t.hasNext()?t.getNext().key:null}},{key:"getIterator",value:function(){return new no(this.data.getIterator())}},{key:"getIteratorFrom",value:function(e){return new no(this.data.getIteratorFrom(e))}},{key:"add",value:function(e){return this.copy(this.data.remove(e).insert(e,!0))}},{key:"delete",value:function(e){return this.has(e)?this.copy(this.data.remove(e)):this}},{key:"isEmpty",value:function(){return this.data.isEmpty()}},{key:"unionWith",value:function(e){var t=this;return t.size<e.size&&(t=e,e=this),e.forEach((function(e){t=t.add(e)})),t}},{key:"isEqual",value:function(t){if(!(t instanceof e))return!1;if(this.size!==t.size)return!1;for(var n=this.data.getIterator(),r=t.data.getIterator();n.hasNext();){var i=n.getNext().key,a=r.getNext().key;if(0!==this.comparator(i,a))return!1}return!0}},{key:"toArray",value:function(){var e=[];return this.forEach((function(t){e.push(t)})),e}},{key:"toString",value:function(){var e=[];return this.forEach((function(t){return e.push(t)})),"SortedSet("+e.toString()+")"}},{key:"copy",value:function(t){var n=new e(this.comparator);return n.data=t,n}}]),e}(),no=function(){function e(t){v(this,e),this.iter=t}return m(e,[{key:"getNext",value:function(){return this.iter.getNext().key}},{key:"hasNext",value:function(){return this.iter.hasNext()}}]),e}();var ro=function(){function e(t){v(this,e),this.fields=t,t.sort(Pa.comparator)}return m(e,[{key:"unionWith",value:function(t){var n,r=new to(Pa.comparator),i=p(this.fields);try{for(i.s();!(n=i.n()).done;){var a=n.value;r=r.add(a)}}catch(l){i.e(l)}finally{i.f()}var o,u=p(t);try{for(u.s();!(o=u.n()).done;){var s=o.value;r=r.add(s)}}catch(l){u.e(l)}finally{u.f()}return new e(r.toArray())}},{key:"covers",value:function(e){var t,n=p(this.fields);try{for(n.s();!(t=n.n()).done;){if(t.value.isPrefixOf(e))return!0}}catch(r){n.e(r)}finally{n.f()}return!1}},{key:"isEqual",value:function(e){return Na(this.fields,e.fields,(function(e,t){return e.isEqual(t)}))}}],[{key:"empty",value:function(){return new e([])}}]),e}();var io=function(e){function t(e){v(this,t),this.binaryString=e}return m(t,[{key:Symbol.iterator,value:function(){var e=this,t=0;return{next:function(){return t<e.binaryString.length?{value:e.binaryString.charCodeAt(t++),done:!1}:{value:void 0,done:!0}}}}},{key:"toBase64",value:function(){return e=this.binaryString,btoa(e);var e}},{key:"toUint8Array",value:function(){return function(e){for(var t=new Uint8Array(e.length),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}(this.binaryString)}},{key:"approximateByteSize",value:function(){return 2*this.binaryString.length}},{key:"compareTo",value:function(e){return Ia(this.binaryString,e.binaryString)}},{key:"isEqual",value:function(e){return this.binaryString===e.binaryString}}],[{key:"fromBase64String",value:function(e){return new t(atob(e))}},{key:"fromUint8Array",value:function(e){var n=function(e){for(var t="",n=0;n<e.length;++n)t+=String.fromCharCode(e[n]);return t}(e);return new t(n)}}]),t}();io.EMPTY_BYTE_STRING=new io("");var ao=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function oo(e){if(da(!!e),"string"==typeof e){var t=0,n=ao.exec(e);if(da(!!n),n[1]){var r=n[1];r=(r+"000000000").substr(0,9),t=Number(r)}var i=new Date(e);return{seconds:Math.floor(i.getTime()/1e3),nanos:t}}return{seconds:uo(e.seconds),nanos:uo(e.nanos)}}function uo(e){return"number"==typeof e?e:"string"==typeof e?Number(e):0}function so(e){return"string"==typeof e?io.fromBase64String(e):io.fromUint8Array(e)}function lo(e){var t,n;return"server_timestamp"===(null===(n=((null===(t=null==e?void 0:e.mapValue)||void 0===t?void 0:t.fields)||{}).__type__)||void 0===n?void 0:n.stringValue)}function co(e){var t=e.mapValue.fields.__previous_value__;return lo(t)?co(t):t}function fo(e){var t=oo(e.mapValue.fields.__local_write_time__.timestampValue);return new Da(t.seconds,t.nanos)}var ho=m((function e(t,n,r,i,a,o,u,s){v(this,e),this.databaseId=t,this.appId=n,this.persistenceKey=r,this.host=i,this.ssl=a,this.forceLongPolling=o,this.autoDetectLongPolling=u,this.useFetchStreams=s})),po=function(){function e(t,n){v(this,e),this.projectId=t,this.database=n||"(default)"}return m(e,[{key:"isDefaultDatabase",get:function(){return"(default)"===this.database}},{key:"isEqual",value:function(t){return t instanceof e&&t.projectId===this.projectId&&t.database===this.database}}],[{key:"empty",value:function(){return new e("","")}}]),e}();function vo(e){return null==e}function yo(e){return 0===e&&1/e==-1/0}function mo(e){return"number"==typeof e&&Number.isInteger(e)&&!yo(e)&&e<=Number.MAX_SAFE_INTEGER&&e>=Number.MIN_SAFE_INTEGER}var go={mapValue:{fields:{__type__:{stringValue:"__max__"}}}};function ko(e){return"nullValue"in e?0:"booleanValue"in e?1:"integerValue"in e||"doubleValue"in e?2:"timestampValue"in e?3:"stringValue"in e?5:"bytesValue"in e?6:"referenceValue"in e?7:"geoPointValue"in e?8:"arrayValue"in e?9:"mapValue"in e?lo(e)?4:Lo(e)?9007199254740991:10:ha()}function bo(e,t){if(e===t)return!0;var n=ko(e);if(n!==ko(t))return!1;switch(n){case 0:case 9007199254740991:return!0;case 1:return e.booleanValue===t.booleanValue;case 4:return fo(e).isEqual(fo(t));case 3:return function(e,t){if("string"==typeof e.timestampValue&&"string"==typeof t.timestampValue&&e.timestampValue.length===t.timestampValue.length)return e.timestampValue===t.timestampValue;var n=oo(e.timestampValue),r=oo(t.timestampValue);return n.seconds===r.seconds&&n.nanos===r.nanos}(e,t);case 5:return e.stringValue===t.stringValue;case 6:return function(e,t){return so(e.bytesValue).isEqual(so(t.bytesValue))}(e,t);case 7:return e.referenceValue===t.referenceValue;case 8:return function(e,t){return uo(e.geoPointValue.latitude)===uo(t.geoPointValue.latitude)&&uo(e.geoPointValue.longitude)===uo(t.geoPointValue.longitude)}(e,t);case 2:return function(e,t){if("integerValue"in e&&"integerValue"in t)return uo(e.integerValue)===uo(t.integerValue);if("doubleValue"in e&&"doubleValue"in t){var n=uo(e.doubleValue),r=uo(t.doubleValue);return n===r?yo(n)===yo(r):isNaN(n)&&isNaN(r)}return!1}(e,t);case 9:return Na(e.arrayValue.values||[],t.arrayValue.values||[],bo);case 10:return function(e,t){var n=e.mapValue.fields||{},r=t.mapValue.fields||{};if($a(n)!==$a(r))return!1;for(var i in n)if(n.hasOwnProperty(i)&&(void 0===r[i]||!bo(n[i],r[i])))return!1;return!0}(e,t);default:return ha()}}function wo(e,t){return void 0!==(e.values||[]).find((function(e){return bo(e,t)}))}function Eo(e,t){if(e===t)return 0;var n=ko(e),r=ko(t);if(n!==r)return Ia(n,r);switch(n){case 0:case 9007199254740991:return 0;case 1:return Ia(e.booleanValue,t.booleanValue);case 2:return function(e,t){var n=uo(e.integerValue||e.doubleValue),r=uo(t.integerValue||t.doubleValue);return n<r?-1:n>r?1:n===r?0:isNaN(n)?isNaN(r)?0:-1:1}(e,t);case 3:return So(e.timestampValue,t.timestampValue);case 4:return So(fo(e),fo(t));case 5:return Ia(e.stringValue,t.stringValue);case 6:return function(e,t){var n=so(e),r=so(t);return n.compareTo(r)}(e.bytesValue,t.bytesValue);case 7:return function(e,t){for(var n=e.split("/"),r=t.split("/"),i=0;i<n.length&&i<r.length;i++){var a=Ia(n[i],r[i]);if(0!==a)return a}return Ia(n.length,r.length)}(e.referenceValue,t.referenceValue);case 8:return function(e,t){var n=Ia(uo(e.latitude),uo(t.latitude));return 0!==n?n:Ia(uo(e.longitude),uo(t.longitude))}(e.geoPointValue,t.geoPointValue);case 9:return function(e,t){for(var n=e.values||[],r=t.values||[],i=0;i<n.length&&i<r.length;++i){var a=Eo(n[i],r[i]);if(a)return a}return Ia(n.length,r.length)}(e.arrayValue,t.arrayValue);case 10:return function(e,t){if(e===go.mapValue&&t===go.mapValue)return 0;if(e===go.mapValue)return 1;if(t===go.mapValue)return-1;var n=e.fields||{},r=Object.keys(n),i=t.fields||{},a=Object.keys(i);r.sort(),a.sort();for(var o=0;o<r.length&&o<a.length;++o){var u=Ia(r[o],a[o]);if(0!==u)return u;var s=Eo(n[r[o]],i[a[o]]);if(0!==s)return s}return Ia(r.length,a.length)}(e.mapValue,t.mapValue);default:throw ha()}}function So(e,t){if("string"==typeof e&&"string"==typeof t&&e.length===t.length)return Ia(e,t);var n=oo(e),r=oo(t),i=Ia(n.seconds,r.seconds);return 0!==i?i:Ia(n.nanos,r.nanos)}function xo(e){return To(e)}function To(e){return"nullValue"in e?"null":"booleanValue"in e?""+e.booleanValue:"integerValue"in e?""+e.integerValue:"doubleValue"in e?""+e.doubleValue:"timestampValue"in e?function(e){var t=oo(e);return"time(".concat(t.seconds,",").concat(t.nanos,")")}(e.timestampValue):"stringValue"in e?e.stringValue:"bytesValue"in e?so(e.bytesValue).toBase64():"referenceValue"in e?(n=e.referenceValue,Ma.fromName(n).toString()):"geoPointValue"in e?"geo(".concat((t=e.geoPointValue).latitude,",").concat(t.longitude,")"):"arrayValue"in e?function(e){var t,n="[",r=!0,i=p(e.values||[]);try{for(i.s();!(t=i.n()).done;){var a=t.value;r?r=!1:n+=",",n+=To(a)}}catch(o){i.e(o)}finally{i.f()}return n+"]"}(e.arrayValue):"mapValue"in e?function(e){var t,n="{",r=!0,i=p(Object.keys(e.fields||{}).sort());try{for(i.s();!(t=i.n()).done;){var a=t.value;r?r=!1:n+=",",n+="".concat(a,":").concat(To(e.fields[a]))}}catch(o){i.e(o)}finally{i.f()}return n+"}"}(e.mapValue):ha();var t,n}function Co(e){return!!e&&"integerValue"in e}function _o(e){return!!e&&"arrayValue"in e}function Io(e){return!!e&&"nullValue"in e}function No(e){return!!e&&"doubleValue"in e&&isNaN(Number(e.doubleValue))}function Do(e){return!!e&&"mapValue"in e}function Ao(e){if(e.geoPointValue)return{geoPointValue:Object.assign({},e.geoPointValue)};if(e.timestampValue&&"object"==typeof e.timestampValue)return{timestampValue:Object.assign({},e.timestampValue)};if(e.mapValue){var t={mapValue:{fields:{}}};return Xa(e.mapValue.fields,(function(e,n){return t.mapValue.fields[e]=Ao(n)})),t}if(e.arrayValue){for(var n={arrayValue:{values:[]}},r=0;r<(e.arrayValue.values||[]).length;++r)n.arrayValue.values[r]=Ao(e.arrayValue.values[r]);return n}return Object.assign({},e)}function Lo(e){return"__max__"===(((e.mapValue||{}).fields||{}).__type__||{}).stringValue}var Oo=function(){function e(t){v(this,e),this.value=t}return m(e,[{key:"field",value:function(e){if(e.isEmpty())return this.value;for(var t=this.value,n=0;n<e.length-1;++n)if(!Do(t=(t.mapValue.fields||{})[e.get(n)]))return null;return(t=(t.mapValue.fields||{})[e.lastSegment()])||null}},{key:"set",value:function(e,t){this.getFieldsMap(e.popLast())[e.lastSegment()]=Ao(t)}},{key:"setAll",value:function(e){var t=this,n=Pa.emptyPath(),r={},i=[];e.forEach((function(e,a){if(!n.isImmediateParentOf(a)){var o=t.getFieldsMap(n);t.applyChanges(o,r,i),r={},i=[],n=a.popLast()}e?r[a.lastSegment()]=Ao(e):i.push(a.lastSegment())}));var a=this.getFieldsMap(n);this.applyChanges(a,r,i)}},{key:"delete",value:function(e){var t=this.field(e.popLast());Do(t)&&t.mapValue.fields&&delete t.mapValue.fields[e.lastSegment()]}},{key:"isEqual",value:function(e){return bo(this.value,e.value)}},{key:"getFieldsMap",value:function(e){var t=this.value;t.mapValue.fields||(t.mapValue={fields:{}});for(var n=0;n<e.length;++n){var r=t.mapValue.fields[e.get(n)];Do(r)&&r.mapValue.fields||(r={mapValue:{fields:{}}},t.mapValue.fields[e.get(n)]=r),t=r}return t.mapValue.fields}},{key:"applyChanges",value:function(e,t,n){Xa(t,(function(t,n){return e[t]=n}));var r,i=p(n);try{for(i.s();!(r=i.n()).done;){var a=r.value;delete e[a]}}catch(o){i.e(o)}finally{i.f()}}},{key:"clone",value:function(){return new e(Ao(this.value))}}],[{key:"empty",value:function(){return new e({mapValue:{}})}}]),e}();function Ro(e){var t=[];return Xa(e.fields,(function(e,n){var r=new Pa([e]);if(Do(n)){var i=Ro(n.mapValue).fields;if(0===i.length)t.push(r);else{var a,o=p(i);try{for(o.s();!(a=o.n()).done;){var u=a.value;t.push(r.child(u))}}catch(s){o.e(s)}finally{o.f()}}}else t.push(r)})),new ro(t)}var Po=function(){function e(t,n,r,i,a,o){v(this,e),this.key=t,this.documentType=n,this.version=r,this.readTime=i,this.data=a,this.documentState=o}return m(e,[{key:"convertToFoundDocument",value:function(e,t){return this.version=e,this.documentType=1,this.data=t,this.documentState=0,this}},{key:"convertToNoDocument",value:function(e){return this.version=e,this.documentType=2,this.data=Oo.empty(),this.documentState=0,this}},{key:"convertToUnknownDocument",value:function(e){return this.version=e,this.documentType=3,this.data=Oo.empty(),this.documentState=2,this}},{key:"setHasCommittedMutations",value:function(){return this.documentState=2,this}},{key:"setHasLocalMutations",value:function(){return this.documentState=1,this.version=Aa.min(),this}},{key:"setReadTime",value:function(e){return this.readTime=e,this}},{key:"hasLocalMutations",get:function(){return 1===this.documentState}},{key:"hasCommittedMutations",get:function(){return 2===this.documentState}},{key:"hasPendingWrites",get:function(){return this.hasLocalMutations||this.hasCommittedMutations}},{key:"isValidDocument",value:function(){return 0!==this.documentType}},{key:"isFoundDocument",value:function(){return 1===this.documentType}},{key:"isNoDocument",value:function(){return 2===this.documentType}},{key:"isUnknownDocument",value:function(){return 3===this.documentType}},{key:"isEqual",value:function(t){return t instanceof e&&this.key.isEqual(t.key)&&this.version.isEqual(t.version)&&this.documentType===t.documentType&&this.documentState===t.documentState&&this.data.isEqual(t.data)}},{key:"mutableCopy",value:function(){return new e(this.key,this.documentType,this.version,this.readTime,this.data.clone(),this.documentState)}},{key:"toString",value:function(){return"Document(".concat(this.key,", ").concat(this.version,", ").concat(JSON.stringify(this.data.value),", {documentType: ").concat(this.documentType,"}), {documentState: ").concat(this.documentState,"})")}}],[{key:"newInvalidDocument",value:function(t){return new e(t,0,Aa.min(),Aa.min(),Oo.empty(),0)}},{key:"newFoundDocument",value:function(t,n,r){return new e(t,1,n,Aa.min(),r,0)}},{key:"newNoDocument",value:function(t,n){return new e(t,2,n,Aa.min(),Oo.empty(),0)}},{key:"newUnknownDocument",value:function(t,n){return new e(t,3,n,Aa.min(),Oo.empty(),2)}}]),e}(),Mo=m((function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;v(this,e),this.path=t,this.collectionGroup=n,this.orderBy=r,this.filters=i,this.limit=a,this.startAt=o,this.endAt=u,this.ht=null}));function Fo(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;return new Mo(e,t,n,r,i,a,o)}function Vo(e){var t=pa(e);if(null===t.ht){var n=t.path.canonicalString();null!==t.collectionGroup&&(n+="|cg:"+t.collectionGroup),n+="|f:",n+=t.filters.map((function(e){return(t=e).field.canonicalString()+t.op.toString()+xo(t.value);var t})).join(","),n+="|ob:",n+=t.orderBy.map((function(e){return function(e){return e.field.canonicalString()+e.dir}(e)})).join(","),vo(t.limit)||(n+="|l:",n+=t.limit),t.startAt&&(n+="|lb:",n+=t.startAt.inclusive?"b:":"a:",n+=t.startAt.position.map((function(e){return xo(e)})).join(",")),t.endAt&&(n+="|ub:",n+=t.endAt.inclusive?"a:":"b:",n+=t.endAt.position.map((function(e){return xo(e)})).join(",")),t.ht=n}return t.ht}function Uo(e,t){if(e.limit!==t.limit)return!1;if(e.orderBy.length!==t.orderBy.length)return!1;for(var n=0;n<e.orderBy.length;n++)if(!Jo(e.orderBy[n],t.orderBy[n]))return!1;if(e.filters.length!==t.filters.length)return!1;for(var r=0;r<e.filters.length;r++)if(i=e.filters[r],a=t.filters[r],i.op!==a.op||!i.field.isEqual(a.field)||!bo(i.value,a.value))return!1;var i,a;return e.collectionGroup===t.collectionGroup&&!!e.path.isEqual(t.path)&&!!eu(e.startAt,t.startAt)&&eu(e.endAt,t.endAt)}function jo(e){return Ma.isDocumentKey(e.path)&&null===e.collectionGroup&&0===e.filters.length}var zo=function(e){b(n,e);var t=x(n);function n(e,r,i){var a;return v(this,n),(a=t.call(this)).field=e,a.op=r,a.value=i,a}return m(n,[{key:"matches",value:function(e){var t=e.data.field(this.field);return"!="===this.op?null!==t&&this.ft(Eo(t,this.value)):null!==t&&ko(this.value)===ko(t)&&this.ft(Eo(t,this.value))}},{key:"ft",value:function(e){switch(this.op){case"<":return e<0;case"<=":return e<=0;case"==":return 0===e;case"!=":return 0!==e;case">":return e>0;case">=":return e>=0;default:return ha()}}},{key:"dt",value:function(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}}],[{key:"create",value:function(e,t,r){return e.isKeyField()?"in"===t||"not-in"===t?this.lt(e,t,r):new Bo(e,t,r):"array-contains"===t?new Qo(e,r):"in"===t?new Wo(e,r):"not-in"===t?new Go(e,r):"array-contains-any"===t?new $o(e,r):new n(e,t,r)}},{key:"lt",value:function(e,t,n){return"in"===t?new qo(e,n):new Ho(e,n)}}]),n}(function(){return m((function e(){v(this,e)}))}()),Bo=function(e){b(n,e);var t=x(n);function n(e,r,i){var a;return v(this,n),(a=t.call(this,e,r,i)).key=Ma.fromName(i.referenceValue),a}return m(n,[{key:"matches",value:function(e){var t=Ma.comparator(e.key,this.key);return this.ft(t)}}]),n}(zo),qo=function(e){b(n,e);var t=x(n);function n(e,r){var i;return v(this,n),(i=t.call(this,e,"in",r)).keys=Ko("in",r),i}return m(n,[{key:"matches",value:function(e){return this.keys.some((function(t){return t.isEqual(e.key)}))}}]),n}(zo),Ho=function(e){b(n,e);var t=x(n);function n(e,r){var i;return v(this,n),(i=t.call(this,e,"not-in",r)).keys=Ko("not-in",r),i}return m(n,[{key:"matches",value:function(e){return!this.keys.some((function(t){return t.isEqual(e.key)}))}}]),n}(zo);function Ko(e,t){var n;return((null===(n=t.arrayValue)||void 0===n?void 0:n.values)||[]).map((function(e){return Ma.fromName(e.referenceValue)}))}var Qo=function(e){b(n,e);var t=x(n);function n(e,r){return v(this,n),t.call(this,e,"array-contains",r)}return m(n,[{key:"matches",value:function(e){var t=e.data.field(this.field);return _o(t)&&wo(t.arrayValue,this.value)}}]),n}(zo),Wo=function(e){b(n,e);var t=x(n);function n(e,r){return v(this,n),t.call(this,e,"in",r)}return m(n,[{key:"matches",value:function(e){var t=e.data.field(this.field);return null!==t&&wo(this.value.arrayValue,t)}}]),n}(zo),Go=function(e){b(n,e);var t=x(n);function n(e,r){return v(this,n),t.call(this,e,"not-in",r)}return m(n,[{key:"matches",value:function(e){if(wo(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;var t=e.data.field(this.field);return null!==t&&!wo(this.value.arrayValue,t)}}]),n}(zo),$o=function(e){b(n,e);var t=x(n);function n(e,r){return v(this,n),t.call(this,e,"array-contains-any",r)}return m(n,[{key:"matches",value:function(e){var t=this,n=e.data.field(this.field);return!(!_o(n)||!n.arrayValue.values)&&n.arrayValue.values.some((function(e){return wo(t.value.arrayValue,e)}))}}]),n}(zo),Xo=m((function e(t,n){v(this,e),this.position=t,this.inclusive=n})),Yo=m((function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"asc";v(this,e),this.field=t,this.dir=n}));function Jo(e,t){return e.dir===t.dir&&e.field.isEqual(t.field)}function Zo(e,t,n){for(var r=0,i=0;i<e.position.length;i++){var a=t[i],o=e.position[i];if(r=a.field.isKeyField()?Ma.comparator(Ma.fromName(o.referenceValue),n.key):Eo(o,n.data.field(a.field)),"desc"===a.dir&&(r*=-1),0!==r)break}return r}function eu(e,t){if(null===e)return null===t;if(null===t)return!1;if(e.inclusive!==t.inclusive||e.position.length!==t.position.length)return!1;for(var n=0;n<e.position.length;n++)if(!bo(e.position[n],t.position[n]))return!1;return!0}var tu=m((function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"F",u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null;v(this,e),this.path=t,this.collectionGroup=n,this.explicitOrderBy=r,this.filters=i,this.limit=a,this.limitType=o,this.startAt=u,this.endAt=s,this._t=null,this.wt=null,this.startAt,this.endAt}));function nu(e,t,n,r,i,a,o,u){return new tu(e,t,n,r,i,a,o,u)}function ru(e){return new tu(e)}function iu(e){return 0===e.filters.length&&null===e.limit&&null==e.startAt&&null==e.endAt&&(0===e.explicitOrderBy.length||1===e.explicitOrderBy.length&&e.explicitOrderBy[0].field.isKeyField())}function au(e){return e.explicitOrderBy.length>0?e.explicitOrderBy[0].field:null}function ou(e){var t,n=p(e.filters);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(r.dt())return r.field}}catch(i){n.e(i)}finally{n.f()}return null}function uu(e){return null!==e.collectionGroup}function su(e){var t=pa(e);if(null===t._t){t._t=[];var n=ou(t),r=au(t);if(null!==n&&null===r)n.isKeyField()||t._t.push(new Yo(n)),t._t.push(new Yo(Pa.keyField(),"asc"));else{var i,a=!1,o=p(t.explicitOrderBy);try{for(o.s();!(i=o.n()).done;){var u=i.value;t._t.push(u),u.field.isKeyField()&&(a=!0)}}catch(l){o.e(l)}finally{o.f()}if(!a){var s=t.explicitOrderBy.length>0?t.explicitOrderBy[t.explicitOrderBy.length-1].dir:"asc";t._t.push(new Yo(Pa.keyField(),s))}}}return t._t}function lu(e){var t=pa(e);if(!t.wt)if("F"===t.limitType)t.wt=Fo(t.path,t.collectionGroup,su(t),t.filters,t.limit,t.startAt,t.endAt);else{var n,r=[],i=p(su(t));try{for(i.s();!(n=i.n()).done;){var a=n.value,o="desc"===a.dir?"asc":"desc";r.push(new Yo(a.field,o))}}catch(l){i.e(l)}finally{i.f()}var u=t.endAt?new Xo(t.endAt.position,t.endAt.inclusive):null,s=t.startAt?new Xo(t.startAt.position,t.startAt.inclusive):null;t.wt=Fo(t.path,t.collectionGroup,r,t.filters,t.limit,u,s)}return t.wt}function cu(e,t,n){return new tu(e.path,e.collectionGroup,e.explicitOrderBy.slice(),e.filters.slice(),t,n,e.startAt,e.endAt)}function fu(e,t){return Uo(lu(e),lu(t))&&e.limitType===t.limitType}function hu(e){return"".concat(Vo(lu(e)),"|lt:").concat(e.limitType)}function du(e){return"Query(target=".concat(function(e){var t=e.path.canonicalString();return null!==e.collectionGroup&&(t+=" collectionGroup="+e.collectionGroup),e.filters.length>0&&(t+=", filters: [".concat(e.filters.map((function(e){return"".concat((t=e).field.canonicalString()," ").concat(t.op," ").concat(xo(t.value));var t})).join(", "),"]")),vo(e.limit)||(t+=", limit: "+e.limit),e.orderBy.length>0&&(t+=", orderBy: [".concat(e.orderBy.map((function(e){return function(e){return"".concat(e.field.canonicalString()," (").concat(e.dir,")")}(e)})).join(", "),"]")),e.startAt&&(t+=", startAt: ",t+=e.startAt.inclusive?"b:":"a:",t+=e.startAt.position.map((function(e){return xo(e)})).join(",")),e.endAt&&(t+=", endAt: ",t+=e.endAt.inclusive?"a:":"b:",t+=e.endAt.position.map((function(e){return xo(e)})).join(",")),"Target(".concat(t,")")}(lu(e)),"; limitType=").concat(e.limitType,")")}function pu(e,t){return t.isFoundDocument()&&function(e,t){var n=t.key.path;return null!==e.collectionGroup?t.key.hasCollectionId(e.collectionGroup)&&e.path.isPrefixOf(n):Ma.isDocumentKey(e.path)?e.path.isEqual(n):e.path.isImmediateParentOf(n)}(e,t)&&function(e,t){var n,r=p(e.explicitOrderBy);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(!i.field.isKeyField()&&null===t.data.field(i.field))return!1}}catch(a){r.e(a)}finally{r.f()}return!0}(e,t)&&function(e,t){var n,r=p(e.filters);try{for(r.s();!(n=r.n()).done;){if(!n.value.matches(t))return!1}}catch(i){r.e(i)}finally{r.f()}return!0}(e,t)&&function(e,t){return!(e.startAt&&!function(e,t,n){var r=Zo(e,t,n);return e.inclusive?r<=0:r<0}(e.startAt,su(e),t))&&!(e.endAt&&!function(e,t,n){var r=Zo(e,t,n);return e.inclusive?r>=0:r>0}(e.endAt,su(e),t))}(e,t)}function vu(e){return e.collectionGroup||(e.path.length%2==1?e.path.lastSegment():e.path.get(e.path.length-2))}function yu(e){return function(t,n){var r,i=!1,a=p(su(e));try{for(a.s();!(r=a.n()).done;){var o=r.value,u=mu(o,t,n);if(0!==u)return u;i=i||o.field.isKeyField()}}catch(s){a.e(s)}finally{a.f()}return 0}}function mu(e,t,n){var r=e.field.isKeyField()?Ma.comparator(t.key,n.key):function(e,t,n){var r=t.data.field(e),i=n.data.field(e);return null!==r&&null!==i?Eo(r,i):ha()}(e.field,t,n);switch(e.dir){case"asc":return r;case"desc":return-1*r;default:return ha()}}function gu(e,t){if(e.gt){if(isNaN(t))return{doubleValue:"NaN"};if(t===1/0)return{doubleValue:"Infinity"};if(t===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:yo(t)?"-0":t}}function ku(e){return{integerValue:""+e}}function bu(e,t){return mo(t)?ku(t):gu(e,t)}var wu=m((function e(){v(this,e),this._=void 0}));function Eu(e,t,n){return e instanceof Tu?function(e,t){var n={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:e.seconds,nanos:e.nanoseconds}}}};return t&&(n.fields.__previous_value__=t),{mapValue:n}}(n,t):e instanceof Cu?_u(e,t):e instanceof Iu?Nu(e,t):function(e,t){var n=xu(e,t),r=Au(n)+Au(e.yt);return Co(n)&&Co(e.yt)?ku(r):gu(e.It,r)}(e,t)}function Su(e,t,n){return e instanceof Cu?_u(e,t):e instanceof Iu?Nu(e,t):n}function xu(e,t){return e instanceof Du?Co(n=t)||function(e){return!!e&&"doubleValue"in e}(n)?t:{integerValue:0}:null;var n}var Tu=function(e){b(n,e);var t=x(n);function n(){return v(this,n),t.apply(this,arguments)}return m(n)}(wu),Cu=function(e){b(n,e);var t=x(n);function n(e){var r;return v(this,n),(r=t.call(this)).elements=e,r}return m(n)}(wu);function _u(e,t){var n,r=Lu(t),i=p(e.elements);try{var a=function(){var e=n.value;r.some((function(t){return bo(t,e)}))||r.push(e)};for(i.s();!(n=i.n()).done;)a()}catch(o){i.e(o)}finally{i.f()}return{arrayValue:{values:r}}}var Iu=function(e){b(n,e);var t=x(n);function n(e){var r;return v(this,n),(r=t.call(this)).elements=e,r}return m(n)}(wu);function Nu(e,t){var n,r=Lu(t),i=p(e.elements);try{var a=function(){var e=n.value;r=r.filter((function(t){return!bo(t,e)}))};for(i.s();!(n=i.n()).done;)a()}catch(o){i.e(o)}finally{i.f()}return{arrayValue:{values:r}}}var Du=function(e){b(n,e);var t=x(n);function n(e,r){var i;return v(this,n),(i=t.call(this)).It=e,i.yt=r,i}return m(n)}(wu);function Au(e){return uo(e.integerValue||e.doubleValue)}function Lu(e){return _o(e)&&e.arrayValue.values?e.arrayValue.values.slice():[]}var Ou=m((function e(t,n){v(this,e),this.version=t,this.transformResults=n})),Ru=function(){function e(t,n){v(this,e),this.updateTime=t,this.exists=n}return m(e,[{key:"isNone",get:function(){return void 0===this.updateTime&&void 0===this.exists}},{key:"isEqual",value:function(e){return this.exists===e.exists&&(this.updateTime?!!e.updateTime&&this.updateTime.isEqual(e.updateTime):!e.updateTime)}}],[{key:"none",value:function(){return new e}},{key:"exists",value:function(t){return new e(void 0,t)}},{key:"updateTime",value:function(t){return new e(t)}}]),e}();function Pu(e,t){return void 0!==e.updateTime?t.isFoundDocument()&&t.version.isEqual(e.updateTime):void 0===e.exists||e.exists===t.isFoundDocument()}var Mu=m((function e(){v(this,e)}));function Fu(e,t){if(!e.hasLocalMutations||t&&0===t.fields.length)return null;if(null===t)return e.isNoDocument()?new $u(e.key,Ru.none()):new Bu(e.key,e.data,Ru.none());var n,r=e.data,i=Oo.empty(),a=new to(Pa.comparator),o=p(t.fields);try{for(o.s();!(n=o.n()).done;){var u=n.value;if(!a.has(u)){var s=r.field(u);null===s&&u.length>1&&(u=u.popLast(),s=r.field(u)),null===s?i.delete(u):i.set(u,s),a=a.add(u)}}}catch(l){o.e(l)}finally{o.f()}return new qu(e.key,i,new ro(a.toArray()),Ru.none())}function Vu(e,t,n){e instanceof Bu?function(e,t,n){var r=e.value.clone(),i=Ku(e.fieldTransforms,t,n.transformResults);r.setAll(i),t.convertToFoundDocument(n.version,r).setHasCommittedMutations()}(e,t,n):e instanceof qu?function(e,t,n){if(Pu(e.precondition,t)){var r=Ku(e.fieldTransforms,t,n.transformResults),i=t.data;i.setAll(Hu(e)),i.setAll(r),t.convertToFoundDocument(n.version,i).setHasCommittedMutations()}else t.convertToUnknownDocument(n.version)}(e,t,n):function(e,t,n){t.convertToNoDocument(n.version).setHasCommittedMutations()}(0,t,n)}function Uu(e,t,n,r){return e instanceof Bu?function(e,t,n,r){if(!Pu(e.precondition,t))return n;var i=e.value.clone(),a=Qu(e.fieldTransforms,r,t);return i.setAll(a),t.convertToFoundDocument(t.version,i).setHasLocalMutations(),null}(e,t,n,r):e instanceof qu?function(e,t,n,r){if(!Pu(e.precondition,t))return n;var i=Qu(e.fieldTransforms,r,t),a=t.data;return a.setAll(Hu(e)),a.setAll(i),t.convertToFoundDocument(t.version,a).setHasLocalMutations(),null===n?null:n.unionWith(e.fieldMask.fields).unionWith(e.fieldTransforms.map((function(e){return e.field})))}(e,t,n,r):function(e,t,n){return Pu(e.precondition,t)?(t.convertToNoDocument(t.version).setHasLocalMutations(),null):n}(e,t,n)}function ju(e,t){var n,r=null,i=p(e.fieldTransforms);try{for(i.s();!(n=i.n()).done;){var a=n.value,o=t.data.field(a.field),u=xu(a.transform,o||null);null!=u&&(null===r&&(r=Oo.empty()),r.set(a.field,u))}}catch(s){i.e(s)}finally{i.f()}return r||null}function zu(e,t){return e.type===t.type&&!!e.key.isEqual(t.key)&&!!e.precondition.isEqual(t.precondition)&&!!function(e,t){return void 0===e&&void 0===t||!(!e||!t)&&Na(e,t,(function(e,t){return function(e,t){return e.field.isEqual(t.field)&&function(e,t){return e instanceof Cu&&t instanceof Cu||e instanceof Iu&&t instanceof Iu?Na(e.elements,t.elements,bo):e instanceof Du&&t instanceof Du?bo(e.yt,t.yt):e instanceof Tu&&t instanceof Tu}(e.transform,t.transform)}(e,t)}))}(e.fieldTransforms,t.fieldTransforms)&&(0===e.type?e.value.isEqual(t.value):1!==e.type||e.data.isEqual(t.data)&&e.fieldMask.isEqual(t.fieldMask))}var Bu=function(e){b(n,e);var t=x(n);function n(e,r,i){var a,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return v(this,n),(a=t.call(this)).key=e,a.value=r,a.precondition=i,a.fieldTransforms=o,a.type=0,a}return m(n,[{key:"getFieldMask",value:function(){return null}}]),n}(Mu),qu=function(e){b(n,e);var t=x(n);function n(e,r,i,a){var o,u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];return v(this,n),(o=t.call(this)).key=e,o.data=r,o.fieldMask=i,o.precondition=a,o.fieldTransforms=u,o.type=1,o}return m(n,[{key:"getFieldMask",value:function(){return this.fieldMask}}]),n}(Mu);function Hu(e){var t=new Map;return e.fieldMask.fields.forEach((function(n){if(!n.isEmpty()){var r=e.data.field(n);t.set(n,r)}})),t}function Ku(e,t,n){var r=new Map;da(e.length===n.length);for(var i=0;i<n.length;i++){var a=e[i],o=a.transform,u=t.data.field(a.field);r.set(a.field,Su(o,u,n[i]))}return r}function Qu(e,t,n){var r,i=new Map,a=p(e);try{for(a.s();!(r=a.n()).done;){var o=r.value,u=o.transform,s=n.data.field(o.field);i.set(o.field,Eu(u,s,t))}}catch(l){a.e(l)}finally{a.f()}return i}var Wu,Gu,$u=function(e){b(n,e);var t=x(n);function n(e,r){var i;return v(this,n),(i=t.call(this)).key=e,i.precondition=r,i.type=2,i.fieldTransforms=[],i}return m(n,[{key:"getFieldMask",value:function(){return null}}]),n}(Mu),Xu=function(e){b(n,e);var t=x(n);function n(e,r){var i;return v(this,n),(i=t.call(this)).key=e,i.precondition=r,i.type=3,i.fieldTransforms=[],i}return m(n,[{key:"getFieldMask",value:function(){return null}}]),n}(Mu),Yu=m((function e(t){v(this,e),this.count=t}));function Ju(e){switch(e){default:return ha();case va.CANCELLED:case va.UNKNOWN:case va.DEADLINE_EXCEEDED:case va.RESOURCE_EXHAUSTED:case va.INTERNAL:case va.UNAVAILABLE:case va.UNAUTHENTICATED:return!1;case va.INVALID_ARGUMENT:case va.NOT_FOUND:case va.ALREADY_EXISTS:case va.PERMISSION_DENIED:case va.FAILED_PRECONDITION:case va.ABORTED:case va.OUT_OF_RANGE:case va.UNIMPLEMENTED:case va.DATA_LOSS:return!0}}function Zu(e){if(void 0===e)return la("GRPC error has no .code"),va.UNKNOWN;switch(e){case Wu.OK:return va.OK;case Wu.CANCELLED:return va.CANCELLED;case Wu.UNKNOWN:return va.UNKNOWN;case Wu.DEADLINE_EXCEEDED:return va.DEADLINE_EXCEEDED;case Wu.RESOURCE_EXHAUSTED:return va.RESOURCE_EXHAUSTED;case Wu.INTERNAL:return va.INTERNAL;case Wu.UNAVAILABLE:return va.UNAVAILABLE;case Wu.UNAUTHENTICATED:return va.UNAUTHENTICATED;case Wu.INVALID_ARGUMENT:return va.INVALID_ARGUMENT;case Wu.NOT_FOUND:return va.NOT_FOUND;case Wu.ALREADY_EXISTS:return va.ALREADY_EXISTS;case Wu.PERMISSION_DENIED:return va.PERMISSION_DENIED;case Wu.FAILED_PRECONDITION:return va.FAILED_PRECONDITION;case Wu.ABORTED:return va.ABORTED;case Wu.OUT_OF_RANGE:return va.OUT_OF_RANGE;case Wu.UNIMPLEMENTED:return va.UNIMPLEMENTED;case Wu.DATA_LOSS:return va.DATA_LOSS;default:return ha()}}(Gu=Wu||(Wu={}))[Gu.OK=0]="OK",Gu[Gu.CANCELLED=1]="CANCELLED",Gu[Gu.UNKNOWN=2]="UNKNOWN",Gu[Gu.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",Gu[Gu.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",Gu[Gu.NOT_FOUND=5]="NOT_FOUND",Gu[Gu.ALREADY_EXISTS=6]="ALREADY_EXISTS",Gu[Gu.PERMISSION_DENIED=7]="PERMISSION_DENIED",Gu[Gu.UNAUTHENTICATED=16]="UNAUTHENTICATED",Gu[Gu.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",Gu[Gu.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",Gu[Gu.ABORTED=10]="ABORTED",Gu[Gu.OUT_OF_RANGE=11]="OUT_OF_RANGE",Gu[Gu.UNIMPLEMENTED=12]="UNIMPLEMENTED",Gu[Gu.INTERNAL=13]="INTERNAL",Gu[Gu.UNAVAILABLE=14]="UNAVAILABLE",Gu[Gu.DATA_LOSS=15]="DATA_LOSS";var es=function(){function e(t,n){v(this,e),this.mapKeyFn=t,this.equalsFn=n,this.inner={},this.innerSize=0}return m(e,[{key:"get",value:function(e){var t=this.mapKeyFn(e),n=this.inner[t];if(void 0!==n){var r,i=p(n);try{for(i.s();!(r=i.n()).done;){var a=d(r.value,2),o=a[0],u=a[1];if(this.equalsFn(o,e))return u}}catch(s){i.e(s)}finally{i.f()}}}},{key:"has",value:function(e){return void 0!==this.get(e)}},{key:"set",value:function(e,t){var n=this.mapKeyFn(e),r=this.inner[n];if(void 0===r)return this.inner[n]=[[e,t]],void this.innerSize++;for(var i=0;i<r.length;i++)if(this.equalsFn(r[i][0],e))return void(r[i]=[e,t]);r.push([e,t]),this.innerSize++}},{key:"delete",value:function(e){var t=this.mapKeyFn(e),n=this.inner[t];if(void 0===n)return!1;for(var r=0;r<n.length;r++)if(this.equalsFn(n[r][0],e))return 1===n.length?delete this.inner[t]:n.splice(r,1),this.innerSize--,!0;return!1}},{key:"forEach",value:function(e){Xa(this.inner,(function(t,n){var r,i=p(n);try{for(i.s();!(r=i.n()).done;){var a=d(r.value,2),o=a[0],u=a[1];e(o,u)}}catch(s){i.e(s)}finally{i.f()}}))}},{key:"isEmpty",value:function(){return Ya(this.inner)}},{key:"size",value:function(){return this.innerSize}}]),e}(),ts=new Ja(Ma.comparator);function ns(){return ts}var rs=new Ja(Ma.comparator);function is(){for(var e=rs,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(var i=0,a=n;i<a.length;i++){var o=a[i];e=e.insert(o.key,o)}return e}function as(e){var t=rs;return e.forEach((function(e,n){return t=t.insert(e,n.overlayedDocument)})),t}function os(){return ss()}function us(){return ss()}function ss(){return new es((function(e){return e.toString()}),(function(e,t){return e.isEqual(t)}))}var ls=new Ja(Ma.comparator),cs=new to(Ma.comparator);function fs(){for(var e=cs,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(var i=0,a=n;i<a.length;i++){var o=a[i];e=e.add(o)}return e}var hs=new to(Ia);function ds(){return hs}var ps=function(){function e(t,n,r,i,a){v(this,e),this.snapshotVersion=t,this.targetChanges=n,this.targetMismatches=r,this.documentUpdates=i,this.resolvedLimboDocuments=a}return m(e,null,[{key:"createSynthesizedRemoteEventForCurrentChange",value:function(t,n,r){var i=new Map;return i.set(t,vs.createSynthesizedTargetChangeForCurrentChange(t,n,r)),new e(Aa.min(),i,ds(),ns(),fs())}}]),e}(),vs=function(){function e(t,n,r,i,a){v(this,e),this.resumeToken=t,this.current=n,this.addedDocuments=r,this.modifiedDocuments=i,this.removedDocuments=a}return m(e,null,[{key:"createSynthesizedTargetChangeForCurrentChange",value:function(t,n,r){return new e(r,n,fs(),fs(),fs())}}]),e}(),ys=m((function e(t,n,r,i){v(this,e),this.Tt=t,this.removedTargetIds=n,this.key=r,this.Et=i})),ms=m((function e(t,n){v(this,e),this.targetId=t,this.At=n})),gs=m((function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:io.EMPTY_BYTE_STRING,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;v(this,e),this.state=t,this.targetIds=n,this.resumeToken=r,this.cause=i})),ks=function(){function e(){v(this,e),this.Rt=0,this.bt=Es(),this.Pt=io.EMPTY_BYTE_STRING,this.vt=!1,this.Vt=!0}return m(e,[{key:"current",get:function(){return this.vt}},{key:"resumeToken",get:function(){return this.Pt}},{key:"St",get:function(){return 0!==this.Rt}},{key:"Dt",get:function(){return this.Vt}},{key:"Ct",value:function(e){e.approximateByteSize()>0&&(this.Vt=!0,this.Pt=e)}},{key:"xt",value:function(){var e=fs(),t=fs(),n=fs();return this.bt.forEach((function(r,i){switch(i){case 0:e=e.add(r);break;case 2:t=t.add(r);break;case 1:n=n.add(r);break;default:ha()}})),new vs(this.Pt,this.vt,e,t,n)}},{key:"Nt",value:function(){this.Vt=!1,this.bt=Es()}},{key:"kt",value:function(e,t){this.Vt=!0,this.bt=this.bt.insert(e,t)}},{key:"Ot",value:function(e){this.Vt=!0,this.bt=this.bt.remove(e)}},{key:"Mt",value:function(){this.Rt+=1}},{key:"Ft",value:function(){this.Rt-=1}},{key:"$t",value:function(){this.Vt=!0,this.vt=!0}}]),e}(),bs=function(){function e(t){v(this,e),this.Bt=t,this.Lt=new Map,this.Ut=ns(),this.qt=ws(),this.Kt=new to(Ia)}return m(e,[{key:"Gt",value:function(e){var t,n=p(e.Tt);try{for(n.s();!(t=n.n()).done;){var r=t.value;e.Et&&e.Et.isFoundDocument()?this.Qt(r,e.Et):this.jt(r,e.key,e.Et)}}catch(u){n.e(u)}finally{n.f()}var i,a=p(e.removedTargetIds);try{for(a.s();!(i=a.n()).done;){var o=i.value;this.jt(o,e.key,e.Et)}}catch(u){a.e(u)}finally{a.f()}}},{key:"Wt",value:function(e){var t=this;this.forEachTarget(e,(function(n){var r=t.zt(n);switch(e.state){case 0:t.Ht(n)&&r.Ct(e.resumeToken);break;case 1:r.Ft(),r.St||r.Nt(),r.Ct(e.resumeToken);break;case 2:r.Ft(),r.St||t.removeTarget(n);break;case 3:t.Ht(n)&&(r.$t(),r.Ct(e.resumeToken));break;case 4:t.Ht(n)&&(t.Jt(n),r.Ct(e.resumeToken));break;default:ha()}}))}},{key:"forEachTarget",value:function(e,t){var n=this;e.targetIds.length>0?e.targetIds.forEach(t):this.Lt.forEach((function(e,r){n.Ht(r)&&t(r)}))}},{key:"Yt",value:function(e){var t=e.targetId,n=e.At.count,r=this.Xt(t);if(r){var i=r.target;if(jo(i))if(0===n){var a=new Ma(i.path);this.jt(t,a,Po.newNoDocument(a,Aa.min()))}else da(1===n);else this.Zt(t)!==n&&(this.Jt(t),this.Kt=this.Kt.add(t))}}},{key:"te",value:function(e){var t=this,n=new Map;this.Lt.forEach((function(r,i){var a=t.Xt(i);if(a){if(r.current&&jo(a.target)){var o=new Ma(a.target.path);null!==t.Ut.get(o)||t.ee(i,o)||t.jt(i,o,Po.newNoDocument(o,e))}r.Dt&&(n.set(i,r.xt()),r.Nt())}}));var r=fs();this.qt.forEach((function(e,n){var i=!0;n.forEachWhile((function(e){var n=t.Xt(e);return!n||2===n.purpose||(i=!1,!1)})),i&&(r=r.add(e))})),this.Ut.forEach((function(t,n){return n.setReadTime(e)}));var i=new ps(e,n,this.Kt,this.Ut,r);return this.Ut=ns(),this.qt=ws(),this.Kt=new to(Ia),i}},{key:"Qt",value:function(e,t){if(this.Ht(e)){var n=this.ee(e,t.key)?2:0;this.zt(e).kt(t.key,n),this.Ut=this.Ut.insert(t.key,t),this.qt=this.qt.insert(t.key,this.ne(t.key).add(e))}}},{key:"jt",value:function(e,t,n){if(this.Ht(e)){var r=this.zt(e);this.ee(e,t)?r.kt(t,1):r.Ot(t),this.qt=this.qt.insert(t,this.ne(t).delete(e)),n&&(this.Ut=this.Ut.insert(t,n))}}},{key:"removeTarget",value:function(e){this.Lt.delete(e)}},{key:"Zt",value:function(e){var t=this.zt(e).xt();return this.Bt.getRemoteKeysForTarget(e).size+t.addedDocuments.size-t.removedDocuments.size}},{key:"Mt",value:function(e){this.zt(e).Mt()}},{key:"zt",value:function(e){var t=this.Lt.get(e);return t||(t=new ks,this.Lt.set(e,t)),t}},{key:"ne",value:function(e){var t=this.qt.get(e);return t||(t=new to(Ia),this.qt=this.qt.insert(e,t)),t}},{key:"Ht",value:function(e){var t=null!==this.Xt(e);return t||sa("WatchChangeAggregator","Detected inactive target",e),t}},{key:"Xt",value:function(e){var t=this.Lt.get(e);return t&&t.St?null:this.Bt.se(e)}},{key:"Jt",value:function(e){var t=this;this.Lt.set(e,new ks),this.Bt.getRemoteKeysForTarget(e).forEach((function(n){t.jt(e,n,null)}))}},{key:"ee",value:function(e,t){return this.Bt.getRemoteKeysForTarget(e).has(t)}}]),e}();function ws(){return new Ja(Ma.comparator)}function Es(){return new Ja(Ma.comparator)}var Ss={asc:"ASCENDING",desc:"DESCENDING"},xs={"<":"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"},Ts=m((function e(t,n){v(this,e),this.databaseId=t,this.gt=n}));function Cs(e,t){return e.gt?"".concat(new Date(1e3*t.seconds).toISOString().replace(/\.\d*/,"").replace("Z",""),".").concat(("000000000"+t.nanoseconds).slice(-9),"Z"):{seconds:""+t.seconds,nanos:t.nanoseconds}}function _s(e,t){return e.gt?t.toBase64():t.toUint8Array()}function Is(e,t){return Cs(e,t.toTimestamp())}function Ns(e){return da(!!e),Aa.fromTimestamp(function(e){var t=oo(e);return new Da(t.seconds,t.nanos)}(e))}function Ds(e,t){return function(e){return new Oa(["projects",e.projectId,"databases",e.database])}(e).child("documents").child(t).canonicalString()}function As(e){var t=Oa.fromString(e);return da(Ys(t)),t}function Ls(e,t){return Ds(e.databaseId,t.path)}function Os(e,t){var n=As(t);if(n.get(1)!==e.databaseId.projectId)throw new ya(va.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+n.get(1)+" vs "+e.databaseId.projectId);if(n.get(3)!==e.databaseId.database)throw new ya(va.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+e.databaseId.database);return new Ma(Fs(n))}function Rs(e,t){return Ds(e.databaseId,t)}function Ps(e){var t=As(e);return 4===t.length?Oa.emptyPath():Fs(t)}function Ms(e){return new Oa(["projects",e.databaseId.projectId,"databases",e.databaseId.database]).canonicalString()}function Fs(e){return da(e.length>4&&"documents"===e.get(4)),e.popFirst(5)}function Vs(e,t,n){return{name:Ls(e,t),fields:n.value.mapValue.fields}}function Us(e,t){var n;if(t instanceof Bu)n={update:Vs(e,t.key,t.value)};else if(t instanceof $u)n={delete:Ls(e,t.key)};else if(t instanceof qu)n={update:Vs(e,t.key,t.data),updateMask:Xs(t.fieldMask)};else{if(!(t instanceof Xu))return ha();n={verify:Ls(e,t.key)}}return t.fieldTransforms.length>0&&(n.updateTransforms=t.fieldTransforms.map((function(e){return function(e,t){var n=t.transform;if(n instanceof Tu)return{fieldPath:t.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(n instanceof Cu)return{fieldPath:t.field.canonicalString(),appendMissingElements:{values:n.elements}};if(n instanceof Iu)return{fieldPath:t.field.canonicalString(),removeAllFromArray:{values:n.elements}};if(n instanceof Du)return{fieldPath:t.field.canonicalString(),increment:n.yt};throw ha()}(0,e)}))),t.precondition.isNone||(n.currentDocument=function(e,t){return void 0!==t.updateTime?{updateTime:Is(e,t.updateTime)}:void 0!==t.exists?{exists:t.exists}:ha()}(e,t.precondition)),n}function js(e,t){return{documents:[Rs(e,t.path)]}}function zs(e,t){var n={structuredQuery:{}},r=t.path;null!==t.collectionGroup?(n.parent=Rs(e,r),n.structuredQuery.from=[{collectionId:t.collectionGroup,allDescendants:!0}]):(n.parent=Rs(e,r.popLast()),n.structuredQuery.from=[{collectionId:r.lastSegment()}]);var i=function(e){if(0!==e.length){var t=e.map((function(e){return function(e){if("=="===e.op){if(No(e.value))return{unaryFilter:{field:Qs(e.field),op:"IS_NAN"}};if(Io(e.value))return{unaryFilter:{field:Qs(e.field),op:"IS_NULL"}}}else if("!="===e.op){if(No(e.value))return{unaryFilter:{field:Qs(e.field),op:"IS_NOT_NAN"}};if(Io(e.value))return{unaryFilter:{field:Qs(e.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:Qs(e.field),op:Ks(e.op),value:e.value}}}(e)}));return 1===t.length?t[0]:{compositeFilter:{op:"AND",filters:t}}}}(t.filters);i&&(n.structuredQuery.where=i);var a=function(e){if(0!==e.length)return e.map((function(e){return function(e){return{field:Qs(e.field),direction:Hs(e.dir)}}(e)}))}(t.orderBy);a&&(n.structuredQuery.orderBy=a);var o,u=function(e,t){return e.gt||vo(t)?t:{value:t}}(e,t.limit);return null!==u&&(n.structuredQuery.limit=u),t.startAt&&(n.structuredQuery.startAt={before:(o=t.startAt).inclusive,values:o.position}),t.endAt&&(n.structuredQuery.endAt=function(e){return{before:!e.inclusive,values:e.position}}(t.endAt)),n}function Bs(e){var t=Ps(e.parent),n=e.structuredQuery,r=n.from?n.from.length:0,i=null;if(r>0){da(1===r);var a=n.from[0];a.allDescendants?i=a.collectionId:t=t.child(a.collectionId)}var o=[];n.where&&(o=qs(n.where));var u=[];n.orderBy&&(u=n.orderBy.map((function(e){return function(e){return new Yo(Ws(e.field),function(e){switch(e){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(e.direction))}(e)})));var s=null;n.limit&&(s=function(e){var t;return vo(t="object"==typeof e?e.value:e)?null:t}(n.limit));var l=null;n.startAt&&(l=function(e){var t=!!e.before,n=e.values||[];return new Xo(n,t)}(n.startAt));var c=null;return n.endAt&&(c=function(e){var t=!e.before,n=e.values||[];return new Xo(n,t)}(n.endAt)),nu(t,i,u,o,s,"F",l,c)}function qs(e){return e?void 0!==e.unaryFilter?[$s(e)]:void 0!==e.fieldFilter?[Gs(e)]:void 0!==e.compositeFilter?e.compositeFilter.filters.map((function(e){return qs(e)})).reduce((function(e,t){return e.concat(t)})):ha():[]}function Hs(e){return Ss[e]}function Ks(e){return xs[e]}function Qs(e){return{fieldPath:e.canonicalString()}}function Ws(e){return Pa.fromServerFormat(e.fieldPath)}function Gs(e){return zo.create(Ws(e.fieldFilter.field),function(e){switch(e){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 ha()}}(e.fieldFilter.op),e.fieldFilter.value)}function $s(e){switch(e.unaryFilter.op){case"IS_NAN":var t=Ws(e.unaryFilter.field);return zo.create(t,"==",{doubleValue:NaN});case"IS_NULL":var n=Ws(e.unaryFilter.field);return zo.create(n,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":var r=Ws(e.unaryFilter.field);return zo.create(r,"!=",{doubleValue:NaN});case"IS_NOT_NULL":var i=Ws(e.unaryFilter.field);return zo.create(i,"!=",{nullValue:"NULL_VALUE"});default:return ha()}}function Xs(e){var t=[];return e.fields.forEach((function(e){return t.push(e.canonicalString())})),{fieldPaths:t}}function Ys(e){return e.length>=4&&"projects"===e.get(0)&&"databases"===e.get(2)}var Js=["mutationQueues","mutations","documentMutations","remoteDocuments","targets","owner","targetGlobal","targetDocuments"].concat(["clientMetadata"]).concat(["remoteDocumentGlobal"]).concat(["collectionParents"]).concat(["bundles","namedQueries"]),Zs=([].concat(a(Js),["documentOverlays"]),["mutationQueues","mutations","documentMutations","remoteDocumentsV14","targets","owner","targetGlobal","targetDocuments","clientMetadata","remoteDocumentGlobal","collectionParents","bundles","namedQueries","documentOverlays"]),el=Zs;[].concat(el,["indexConfiguration","indexState","indexEntries"]);var tl=function(){function e(t,n,r,i){v(this,e),this.batchId=t,this.localWriteTime=n,this.baseMutations=r,this.mutations=i}return m(e,[{key:"applyToRemoteDocument",value:function(e,t){for(var n=t.mutationResults,r=0;r<this.mutations.length;r++){var i=this.mutations[r];i.key.isEqual(e.key)&&Vu(i,e,n[r])}}},{key:"applyToLocalView",value:function(e,t){var n,r=p(this.baseMutations);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.key.isEqual(e.key)&&(t=Uu(i,e,t,this.localWriteTime))}}catch(s){r.e(s)}finally{r.f()}var a,o=p(this.mutations);try{for(o.s();!(a=o.n()).done;){var u=a.value;u.key.isEqual(e.key)&&(t=Uu(u,e,t,this.localWriteTime))}}catch(s){o.e(s)}finally{o.f()}return t}},{key:"applyToLocalDocumentSet",value:function(e,t){var n=this,r=us();return this.mutations.forEach((function(i){var a=e.get(i.key),o=a.overlayedDocument,u=n.applyToLocalView(o,a.mutatedFields),s=Fu(o,u=t.has(i.key)?null:u);null!==s&&r.set(i.key,s),o.isValidDocument()||o.convertToNoDocument(Aa.min())})),r}},{key:"keys",value:function(){return this.mutations.reduce((function(e,t){return e.add(t.key)}),fs())}},{key:"isEqual",value:function(e){return this.batchId===e.batchId&&Na(this.mutations,e.mutations,(function(e,t){return zu(e,t)}))&&Na(this.baseMutations,e.baseMutations,(function(e,t){return zu(e,t)}))}}]),e}(),nl=function(){function e(t,n,r,i){v(this,e),this.batch=t,this.commitVersion=n,this.mutationResults=r,this.docVersions=i}return m(e,null,[{key:"from",value:function(t,n,r){da(t.mutations.length===r.length);for(var i=ls,a=t.mutations,o=0;o<a.length;o++)i=i.insert(a[o].key,r[o].version);return new e(t,n,r,i)}}]),e}(),rl=function(){function e(t,n){v(this,e),this.largestBatchId=t,this.mutation=n}return m(e,[{key:"getKey",value:function(){return this.mutation.key}},{key:"isEqual",value:function(e){return null!==e&&this.mutation===e.mutation}},{key:"toString",value:function(){return"Overlay{\n largestBatchId: ".concat(this.largestBatchId,",\n mutation: ").concat(this.mutation.toString(),"\n }")}}]),e}(),il=function(){function e(t,n,r,i){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Aa.min(),o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:Aa.min(),u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:io.EMPTY_BYTE_STRING;v(this,e),this.target=t,this.targetId=n,this.purpose=r,this.sequenceNumber=i,this.snapshotVersion=a,this.lastLimboFreeSnapshotVersion=o,this.resumeToken=u}return m(e,[{key:"withSequenceNumber",value:function(t){return new e(this.target,this.targetId,this.purpose,t,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken)}},{key:"withResumeToken",value:function(t,n){return new e(this.target,this.targetId,this.purpose,this.sequenceNumber,n,this.lastLimboFreeSnapshotVersion,t)}},{key:"withLastLimboFreeSnapshotVersion",value:function(t){return new e(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,t,this.resumeToken)}}]),e}(),al=m((function e(t){v(this,e),this.re=t}));function ol(e){var t=Bs({parent:e.parent,structuredQuery:e.structuredQuery});return"LAST"===e.limitType?cu(t,t.limit,"L"):t}var ul=function(){function e(){v(this,e)}return m(e,[{key:"ce",value:function(e,t){this.ae(e,t),t.he()}},{key:"ae",value:function(e,t){if("nullValue"in e)this.le(t,5);else if("booleanValue"in e)this.le(t,10),t.fe(e.booleanValue?1:0);else if("integerValue"in e)this.le(t,15),t.fe(uo(e.integerValue));else if("doubleValue"in e){var n=uo(e.doubleValue);isNaN(n)?this.le(t,13):(this.le(t,15),yo(n)?t.fe(0):t.fe(n))}else if("timestampValue"in e){var r=e.timestampValue;this.le(t,20),"string"==typeof r?t.de(r):(t.de("".concat(r.seconds||"")),t.fe(r.nanos||0))}else if("stringValue"in e)this._e(e.stringValue,t),this.we(t);else if("bytesValue"in e)this.le(t,30),t.me(so(e.bytesValue)),this.we(t);else if("referenceValue"in e)this.ge(e.referenceValue,t);else if("geoPointValue"in e){var i=e.geoPointValue;this.le(t,45),t.fe(i.latitude||0),t.fe(i.longitude||0)}else"mapValue"in e?Lo(e)?this.le(t,Number.MAX_SAFE_INTEGER):(this.ye(e.mapValue,t),this.we(t)):"arrayValue"in e?(this.pe(e.arrayValue,t),this.we(t)):ha()}},{key:"_e",value:function(e,t){this.le(t,25),this.Ie(e,t)}},{key:"Ie",value:function(e,t){t.de(e)}},{key:"ye",value:function(e,t){var n=e.fields||{};this.le(t,55);for(var r=0,i=Object.keys(n);r<i.length;r++){var a=i[r];this._e(a,t),this.ae(n[a],t)}}},{key:"pe",value:function(e,t){var n=e.values||[];this.le(t,50);var r,i=p(n);try{for(i.s();!(r=i.n()).done;){var a=r.value;this.ae(a,t)}}catch(o){i.e(o)}finally{i.f()}}},{key:"ge",value:function(e,t){var n=this;this.le(t,37),Ma.fromName(e).path.forEach((function(e){n.le(t,60),n.Ie(e,t)}))}},{key:"le",value:function(e,t){e.fe(t)}},{key:"we",value:function(e){e.fe(2)}}]),e}();ul.Te=new ul;var sl=function(){function e(){v(this,e),this.Ye=new ll}return m(e,[{key:"addToCollectionParentIndex",value:function(e,t){return this.Ye.add(t),Qa.resolve()}},{key:"getCollectionParents",value:function(e,t){return Qa.resolve(this.Ye.getEntries(t))}},{key:"addFieldIndex",value:function(e,t){return Qa.resolve()}},{key:"deleteFieldIndex",value:function(e,t){return Qa.resolve()}},{key:"getDocumentsMatchingTarget",value:function(e,t){return Qa.resolve(null)}},{key:"getIndexType",value:function(e,t){return Qa.resolve(0)}},{key:"getFieldIndexes",value:function(e,t){return Qa.resolve([])}},{key:"getNextCollectionGroupToUpdate",value:function(e){return Qa.resolve(null)}},{key:"getMinOffset",value:function(e,t){return Qa.resolve(ja.min())}},{key:"getMinOffsetFromCollectionGroup",value:function(e,t){return Qa.resolve(ja.min())}},{key:"updateCollectionGroup",value:function(e,t,n){return Qa.resolve()}},{key:"updateIndexEntries",value:function(e,t){return Qa.resolve()}}]),e}(),ll=function(){function e(){v(this,e),this.index={}}return m(e,[{key:"add",value:function(e){var t=e.lastSegment(),n=e.popLast(),r=this.index[t]||new to(Oa.comparator),i=!r.has(n);return this.index[t]=r.add(n),i}},{key:"has",value:function(e){var t=e.lastSegment(),n=e.popLast(),r=this.index[t];return r&&r.has(n)}},{key:"getEntries",value:function(e){return(this.index[e]||new to(Oa.comparator)).toArray()}}]),e}();new Uint8Array(0);var cl=function(){function e(t,n,r){v(this,e),this.cacheSizeCollectionThreshold=t,this.percentileToCollect=n,this.maximumSequenceNumbersToCollect=r}return m(e,null,[{key:"withCacheSize",value:function(t){return new e(t,e.DEFAULT_COLLECTION_PERCENTILE,e.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}}]),e}();cl.DEFAULT_COLLECTION_PERCENTILE=10,cl.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,cl.DEFAULT=new cl(41943040,cl.DEFAULT_COLLECTION_PERCENTILE,cl.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),cl.DISABLED=new cl(-1,0,0);var fl=function(){function e(t){v(this,e),this.bn=t}return m(e,[{key:"next",value:function(){return this.bn+=2,this.bn}}],[{key:"Pn",value:function(){return new e(0)}},{key:"vn",value:function(){return new e(-1)}}]),e}();var hl=function(){function e(){v(this,e),this.changes=new es((function(e){return e.toString()}),(function(e,t){return e.isEqual(t)})),this.changesApplied=!1}return m(e,[{key:"addEntry",value:function(e){this.assertNotApplied(),this.changes.set(e.key,e)}},{key:"removeEntry",value:function(e,t){this.assertNotApplied(),this.changes.set(e,Po.newInvalidDocument(e).setReadTime(t))}},{key:"getEntry",value:function(e,t){this.assertNotApplied();var n=this.changes.get(t);return void 0!==n?Qa.resolve(n):this.getFromCache(e,t)}},{key:"getEntries",value:function(e,t){return this.getAllFromCache(e,t)}},{key:"apply",value:function(e){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(e)}},{key:"assertNotApplied",value:function(){}}]),e}();var dl=m((function e(t,n){v(this,e),this.overlayedDocument=t,this.mutatedFields=n})),pl=function(){function e(t,n,r,i){v(this,e),this.remoteDocumentCache=t,this.mutationQueue=n,this.documentOverlayCache=r,this.indexManager=i}return m(e,[{key:"getDocument",value:function(e,t){var n=this,r=null;return this.documentOverlayCache.getOverlay(e,t).next((function(i){return r=i,n.getBaseDocument(e,t,r)})).next((function(e){return null!==r&&Uu(r.mutation,e,ro.empty(),Da.now()),e}))}},{key:"getDocuments",value:function(e,t){var n=this;return this.remoteDocumentCache.getEntries(e,t).next((function(t){return n.getLocalViewOfDocuments(e,t,fs()).next((function(){return t}))}))}},{key:"getLocalViewOfDocuments",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:fs(),i=os();return this.populateOverlays(e,i,t).next((function(){return n.computeViews(e,t,i,r).next((function(e){var t=is();return e.forEach((function(e,n){t=t.insert(e,n.overlayedDocument)})),t}))}))}},{key:"getOverlayedDocuments",value:function(e,t){var n=this,r=os();return this.populateOverlays(e,r,t).next((function(){return n.computeViews(e,t,r,fs())}))}},{key:"populateOverlays",value:function(e,t,n){var r=[];return n.forEach((function(e){t.has(e)||r.push(e)})),this.documentOverlayCache.getOverlays(e,r).next((function(e){e.forEach((function(e,n){t.set(e,n)}))}))}},{key:"computeViews",value:function(e,t,n,r){var i=ns(),a=ss(),o=ss();return t.forEach((function(e,t){var o=n.get(t.key);r.has(t.key)&&(void 0===o||o.mutation instanceof qu)?i=i.insert(t.key,t):void 0!==o&&(a.set(t.key,o.mutation.getFieldMask()),Uu(o.mutation,t,o.mutation.getFieldMask(),Da.now()))})),this.recalculateAndSaveOverlays(e,i).next((function(e){return e.forEach((function(e,t){return a.set(e,t)})),t.forEach((function(e,t){var n;return o.set(e,new dl(t,null!==(n=a.get(e))&&void 0!==n?n:null))})),o}))}},{key:"recalculateAndSaveOverlays",value:function(e,t){var n=this,r=ss(),i=new Ja((function(e,t){return e-t})),a=fs();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,t).next((function(e){var n,a=p(e);try{var o=function(){var e=n.value;e.keys().forEach((function(n){var a=t.get(n);if(null!==a){var o=r.get(n)||ro.empty();o=e.applyToLocalView(a,o),r.set(n,o);var u=(i.get(e.batchId)||fs()).add(n);i=i.insert(e.batchId,u)}}))};for(a.s();!(n=a.n()).done;)o()}catch(u){a.e(u)}finally{a.f()}})).next((function(){for(var o=[],u=i.getReverseIterator(),s=function(){var i=u.getNext(),s=i.key,l=i.value,c=us();l.forEach((function(e){if(!a.has(e)){var n=Fu(t.get(e),r.get(e));null!==n&&c.set(e,n),a=a.add(e)}})),o.push(n.documentOverlayCache.saveOverlays(e,s,c))};u.hasNext();)s();return Qa.waitFor(o)})).next((function(){return r}))}},{key:"recalculateAndSaveOverlaysForDocumentKeys",value:function(e,t){var n=this;return this.remoteDocumentCache.getEntries(e,t).next((function(t){return n.recalculateAndSaveOverlays(e,t)}))}},{key:"getDocumentsMatchingQuery",value:function(e,t,n){return function(e){return Ma.isDocumentKey(e.path)&&null===e.collectionGroup&&0===e.filters.length}(t)?this.getDocumentsMatchingDocumentQuery(e,t.path):uu(t)?this.getDocumentsMatchingCollectionGroupQuery(e,t,n):this.getDocumentsMatchingCollectionQuery(e,t,n)}},{key:"getNextDocuments",value:function(e,t,n,r){var i=this;return this.remoteDocumentCache.getAllFromCollectionGroup(e,t,n,r).next((function(a){var o=r-a.size>0?i.documentOverlayCache.getOverlaysForCollectionGroup(e,t,n.largestBatchId,r-a.size):Qa.resolve(os()),u=-1,s=a;return o.next((function(t){return Qa.forEach(t,(function(t,n){return u<n.largestBatchId&&(u=n.largestBatchId),a.get(t)?Qa.resolve():i.getBaseDocument(e,t,n).next((function(e){s=s.insert(t,e)}))})).next((function(){return i.populateOverlays(e,t,a)})).next((function(){return i.computeViews(e,s,t,fs())})).next((function(e){return{batchId:u,changes:as(e)}}))}))}))}},{key:"getDocumentsMatchingDocumentQuery",value:function(e,t){return this.getDocument(e,new Ma(t)).next((function(e){var t=is();return e.isFoundDocument()&&(t=t.insert(e.key,e)),t}))}},{key:"getDocumentsMatchingCollectionGroupQuery",value:function(e,t,n){var r=this,i=t.collectionGroup,a=is();return this.indexManager.getCollectionParents(e,i).next((function(o){return Qa.forEach(o,(function(o){var u=function(e,t){return new tu(t,null,e.explicitOrderBy.slice(),e.filters.slice(),e.limit,e.limitType,e.startAt,e.endAt)}(t,o.child(i));return r.getDocumentsMatchingCollectionQuery(e,u,n).next((function(e){e.forEach((function(e,t){a=a.insert(e,t)}))}))})).next((function(){return a}))}))}},{key:"getDocumentsMatchingCollectionQuery",value:function(e,t,n){var r,i=this;return this.remoteDocumentCache.getAllFromCollection(e,t.path,n).next((function(a){return r=a,i.documentOverlayCache.getOverlaysForCollection(e,t.path,n.largestBatchId)})).next((function(e){e.forEach((function(e,t){var n=t.getKey();null===r.get(n)&&(r=r.insert(n,Po.newInvalidDocument(n)))}));var n=is();return r.forEach((function(r,i){var a=e.get(r);void 0!==a&&Uu(a.mutation,i,ro.empty(),Da.now()),pu(t,i)&&(n=n.insert(r,i))})),n}))}},{key:"getBaseDocument",value:function(e,t,n){return null===n||1===n.mutation.type?this.remoteDocumentCache.getEntry(e,t):Qa.resolve(Po.newInvalidDocument(t))}}]),e}(),vl=function(){function e(t){v(this,e),this.It=t,this.Zn=new Map,this.ts=new Map}return m(e,[{key:"getBundleMetadata",value:function(e,t){return Qa.resolve(this.Zn.get(t))}},{key:"saveBundleMetadata",value:function(e,t){var n;return this.Zn.set(t.id,{id:(n=t).id,version:n.version,createTime:Ns(n.createTime)}),Qa.resolve()}},{key:"getNamedQuery",value:function(e,t){return Qa.resolve(this.ts.get(t))}},{key:"saveNamedQuery",value:function(e,t){return this.ts.set(t.name,function(e){return{name:e.name,query:ol(e.bundledQuery),readTime:Ns(e.readTime)}}(t)),Qa.resolve()}}]),e}(),yl=function(){function e(){v(this,e),this.overlays=new Ja(Ma.comparator),this.es=new Map}return m(e,[{key:"getOverlay",value:function(e,t){return Qa.resolve(this.overlays.get(t))}},{key:"getOverlays",value:function(e,t){var n=this,r=os();return Qa.forEach(t,(function(t){return n.getOverlay(e,t).next((function(e){null!==e&&r.set(t,e)}))})).next((function(){return r}))}},{key:"saveOverlays",value:function(e,t,n){var r=this;return n.forEach((function(n,i){r.ue(e,t,i)})),Qa.resolve()}},{key:"removeOverlaysForBatchId",value:function(e,t,n){var r=this,i=this.es.get(n);return void 0!==i&&(i.forEach((function(e){return r.overlays=r.overlays.remove(e)})),this.es.delete(n)),Qa.resolve()}},{key:"getOverlaysForCollection",value:function(e,t,n){for(var r=os(),i=t.length+1,a=new Ma(t.child("")),o=this.overlays.getIteratorFrom(a);o.hasNext();){var u=o.getNext().value,s=u.getKey();if(!t.isPrefixOf(s.path))break;s.path.length===i&&u.largestBatchId>n&&r.set(u.getKey(),u)}return Qa.resolve(r)}},{key:"getOverlaysForCollectionGroup",value:function(e,t,n,r){for(var i=new Ja((function(e,t){return e-t})),a=this.overlays.getIterator();a.hasNext();){var o=a.getNext().value;if(o.getKey().getCollectionGroup()===t&&o.largestBatchId>n){var u=i.get(o.largestBatchId);null===u&&(u=os(),i=i.insert(o.largestBatchId,u)),u.set(o.getKey(),o)}}for(var s=os(),l=i.getIterator();l.hasNext()&&(l.getNext().value.forEach((function(e,t){return s.set(e,t)})),!(s.size()>=r)););return Qa.resolve(s)}},{key:"ue",value:function(e,t,n){var r=this.overlays.get(n.key);if(null!==r){var i=this.es.get(r.largestBatchId).delete(n.key);this.es.set(r.largestBatchId,i)}this.overlays=this.overlays.insert(n.key,new rl(t,n));var a=this.es.get(t);void 0===a&&(a=fs(),this.es.set(t,a)),this.es.set(t,a.add(n.key))}}]),e}(),ml=function(){function e(){v(this,e),this.ns=new to(gl.ss),this.rs=new to(gl.os)}return m(e,[{key:"isEmpty",value:function(){return this.ns.isEmpty()}},{key:"addReference",value:function(e,t){var n=new gl(e,t);this.ns=this.ns.add(n),this.rs=this.rs.add(n)}},{key:"us",value:function(e,t){var n=this;e.forEach((function(e){return n.addReference(e,t)}))}},{key:"removeReference",value:function(e,t){this.cs(new gl(e,t))}},{key:"hs",value:function(e,t){var n=this;e.forEach((function(e){return n.removeReference(e,t)}))}},{key:"ls",value:function(e){var t=this,n=new Ma(new Oa([])),r=new gl(n,e),i=new gl(n,e+1),a=[];return this.rs.forEachInRange([r,i],(function(e){t.cs(e),a.push(e.key)})),a}},{key:"fs",value:function(){var e=this;this.ns.forEach((function(t){return e.cs(t)}))}},{key:"cs",value:function(e){this.ns=this.ns.delete(e),this.rs=this.rs.delete(e)}},{key:"ds",value:function(e){var t=new Ma(new Oa([])),n=new gl(t,e),r=new gl(t,e+1),i=fs();return this.rs.forEachInRange([n,r],(function(e){i=i.add(e.key)})),i}},{key:"containsKey",value:function(e){var t=new gl(e,0),n=this.ns.firstAfterOrEqual(t);return null!==n&&e.isEqual(n.key)}}]),e}(),gl=function(){function e(t,n){v(this,e),this.key=t,this._s=n}return m(e,null,[{key:"ss",value:function(e,t){return Ma.comparator(e.key,t.key)||Ia(e._s,t._s)}},{key:"os",value:function(e,t){return Ia(e._s,t._s)||Ma.comparator(e.key,t.key)}}]),e}(),kl=function(){function e(t,n){v(this,e),this.indexManager=t,this.referenceDelegate=n,this.mutationQueue=[],this.ws=1,this.gs=new to(gl.ss)}return m(e,[{key:"checkEmpty",value:function(e){return Qa.resolve(0===this.mutationQueue.length)}},{key:"addMutationBatch",value:function(e,t,n,r){var i=this.ws;this.ws++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];var a=new tl(i,t,n,r);this.mutationQueue.push(a);var o,u=p(r);try{for(u.s();!(o=u.n()).done;){var s=o.value;this.gs=this.gs.add(new gl(s.key,i)),this.indexManager.addToCollectionParentIndex(e,s.key.path.popLast())}}catch(l){u.e(l)}finally{u.f()}return Qa.resolve(a)}},{key:"lookupMutationBatch",value:function(e,t){return Qa.resolve(this.ys(t))}},{key:"getNextMutationBatchAfterBatchId",value:function(e,t){var n=t+1,r=this.ps(n),i=r<0?0:r;return Qa.resolve(this.mutationQueue.length>i?this.mutationQueue[i]:null)}},{key:"getHighestUnacknowledgedBatchId",value:function(){return Qa.resolve(0===this.mutationQueue.length?-1:this.ws-1)}},{key:"getAllMutationBatches",value:function(e){return Qa.resolve(this.mutationQueue.slice())}},{key:"getAllMutationBatchesAffectingDocumentKey",value:function(e,t){var n=this,r=new gl(t,0),i=new gl(t,Number.POSITIVE_INFINITY),a=[];return this.gs.forEachInRange([r,i],(function(e){var t=n.ys(e._s);a.push(t)})),Qa.resolve(a)}},{key:"getAllMutationBatchesAffectingDocumentKeys",value:function(e,t){var n=this,r=new to(Ia);return t.forEach((function(e){var t=new gl(e,0),i=new gl(e,Number.POSITIVE_INFINITY);n.gs.forEachInRange([t,i],(function(e){r=r.add(e._s)}))})),Qa.resolve(this.Is(r))}},{key:"getAllMutationBatchesAffectingQuery",value:function(e,t){var n=t.path,r=n.length+1,i=n;Ma.isDocumentKey(i)||(i=i.child(""));var a=new gl(new Ma(i),0),o=new to(Ia);return this.gs.forEachWhile((function(e){var t=e.key.path;return!!n.isPrefixOf(t)&&(t.length===r&&(o=o.add(e._s)),!0)}),a),Qa.resolve(this.Is(o))}},{key:"Is",value:function(e){var t=this,n=[];return e.forEach((function(e){var r=t.ys(e);null!==r&&n.push(r)})),n}},{key:"removeMutationBatch",value:function(e,t){var n=this;da(0===this.Ts(t.batchId,"removed")),this.mutationQueue.shift();var r=this.gs;return Qa.forEach(t.mutations,(function(i){var a=new gl(i.key,t.batchId);return r=r.delete(a),n.referenceDelegate.markPotentiallyOrphaned(e,i.key)})).next((function(){n.gs=r}))}},{key:"An",value:function(e){}},{key:"containsKey",value:function(e,t){var n=new gl(t,0),r=this.gs.firstAfterOrEqual(n);return Qa.resolve(t.isEqual(r&&r.key))}},{key:"performConsistencyCheck",value:function(e){return this.mutationQueue.length,Qa.resolve()}},{key:"Ts",value:function(e,t){return this.ps(e)}},{key:"ps",value:function(e){return 0===this.mutationQueue.length?0:e-this.mutationQueue[0].batchId}},{key:"ys",value:function(e){var t=this.ps(e);return t<0||t>=this.mutationQueue.length?null:this.mutationQueue[t]}}]),e}(),bl=function(){function e(t){v(this,e),this.Es=t,this.docs=new Ja(Ma.comparator),this.size=0}return m(e,[{key:"setIndexManager",value:function(e){this.indexManager=e}},{key:"addEntry",value:function(e,t){var n=t.key,r=this.docs.get(n),i=r?r.size:0,a=this.Es(t);return this.docs=this.docs.insert(n,{document:t.mutableCopy(),size:a}),this.size+=a-i,this.indexManager.addToCollectionParentIndex(e,n.path.popLast())}},{key:"removeEntry",value:function(e){var t=this.docs.get(e);t&&(this.docs=this.docs.remove(e),this.size-=t.size)}},{key:"getEntry",value:function(e,t){var n=this.docs.get(t);return Qa.resolve(n?n.document.mutableCopy():Po.newInvalidDocument(t))}},{key:"getEntries",value:function(e,t){var n=this,r=ns();return t.forEach((function(e){var t=n.docs.get(e);r=r.insert(e,t?t.document.mutableCopy():Po.newInvalidDocument(e))})),Qa.resolve(r)}},{key:"getAllFromCollection",value:function(e,t,n){for(var r=ns(),i=new Ma(t.child("")),a=this.docs.getIteratorFrom(i);a.hasNext();){var o=a.getNext(),u=o.key,s=o.value.document;if(!t.isPrefixOf(u.path))break;u.path.length>t.length+1||za(Ua(s),n)<=0||(r=r.insert(s.key,s.mutableCopy()))}return Qa.resolve(r)}},{key:"getAllFromCollectionGroup",value:function(e,t,n,r){ha()}},{key:"As",value:function(e,t){return Qa.forEach(this.docs,(function(e){return t(e)}))}},{key:"newChangeBuffer",value:function(e){return new wl(this)}},{key:"getSize",value:function(e){return Qa.resolve(this.size)}}]),e}(),wl=function(e){b(n,e);var t=x(n);function n(e){var r;return v(this,n),(r=t.call(this)).Yn=e,r}return m(n,[{key:"applyChanges",value:function(e){var t=this,n=[];return this.changes.forEach((function(r,i){i.isValidDocument()?n.push(t.Yn.addEntry(e,i)):t.Yn.removeEntry(r)})),Qa.waitFor(n)}},{key:"getFromCache",value:function(e,t){return this.Yn.getEntry(e,t)}},{key:"getAllFromCache",value:function(e,t){return this.Yn.getEntries(e,t)}}]),n}(hl),El=function(){function e(t){v(this,e),this.persistence=t,this.Rs=new es((function(e){return Vo(e)}),Uo),this.lastRemoteSnapshotVersion=Aa.min(),this.highestTargetId=0,this.bs=0,this.Ps=new ml,this.targetCount=0,this.vs=fl.Pn()}return m(e,[{key:"forEachTarget",value:function(e,t){return this.Rs.forEach((function(e,n){return t(n)})),Qa.resolve()}},{key:"getLastRemoteSnapshotVersion",value:function(e){return Qa.resolve(this.lastRemoteSnapshotVersion)}},{key:"getHighestSequenceNumber",value:function(e){return Qa.resolve(this.bs)}},{key:"allocateTargetId",value:function(e){return this.highestTargetId=this.vs.next(),Qa.resolve(this.highestTargetId)}},{key:"setTargetsMetadata",value:function(e,t,n){return n&&(this.lastRemoteSnapshotVersion=n),t>this.bs&&(this.bs=t),Qa.resolve()}},{key:"Dn",value:function(e){this.Rs.set(e.target,e);var t=e.targetId;t>this.highestTargetId&&(this.vs=new fl(t),this.highestTargetId=t),e.sequenceNumber>this.bs&&(this.bs=e.sequenceNumber)}},{key:"addTargetData",value:function(e,t){return this.Dn(t),this.targetCount+=1,Qa.resolve()}},{key:"updateTargetData",value:function(e,t){return this.Dn(t),Qa.resolve()}},{key:"removeTargetData",value:function(e,t){return this.Rs.delete(t.target),this.Ps.ls(t.targetId),this.targetCount-=1,Qa.resolve()}},{key:"removeTargets",value:function(e,t,n){var r=this,i=0,a=[];return this.Rs.forEach((function(o,u){u.sequenceNumber<=t&&null===n.get(u.targetId)&&(r.Rs.delete(o),a.push(r.removeMatchingKeysForTargetId(e,u.targetId)),i++)})),Qa.waitFor(a).next((function(){return i}))}},{key:"getTargetCount",value:function(e){return Qa.resolve(this.targetCount)}},{key:"getTargetData",value:function(e,t){var n=this.Rs.get(t)||null;return Qa.resolve(n)}},{key:"addMatchingKeys",value:function(e,t,n){return this.Ps.us(t,n),Qa.resolve()}},{key:"removeMatchingKeys",value:function(e,t,n){this.Ps.hs(t,n);var r=this.persistence.referenceDelegate,i=[];return r&&t.forEach((function(t){i.push(r.markPotentiallyOrphaned(e,t))})),Qa.waitFor(i)}},{key:"removeMatchingKeysForTargetId",value:function(e,t){return this.Ps.ls(t),Qa.resolve()}},{key:"getMatchingKeysForTargetId",value:function(e,t){var n=this.Ps.ds(t);return Qa.resolve(n)}},{key:"containsKey",value:function(e,t){return Qa.resolve(this.Ps.containsKey(t))}}]),e}(),Sl=function(){function e(t,n){var r=this;v(this,e),this.Vs={},this.overlays={},this.Ss=new Ga(0),this.Ds=!1,this.Ds=!0,this.referenceDelegate=t(this),this.Cs=new El(this),this.indexManager=new sl,this.remoteDocumentCache=new bl((function(e){return r.referenceDelegate.xs(e)})),this.It=new al(n),this.Ns=new vl(this.It)}return m(e,[{key:"start",value:function(){return Promise.resolve()}},{key:"shutdown",value:function(){return this.Ds=!1,Promise.resolve()}},{key:"started",get:function(){return this.Ds}},{key:"setDatabaseDeletedListener",value:function(){}},{key:"setNetworkEnabled",value:function(){}},{key:"getIndexManager",value:function(e){return this.indexManager}},{key:"getDocumentOverlayCache",value:function(e){var t=this.overlays[e.toKey()];return t||(t=new yl,this.overlays[e.toKey()]=t),t}},{key:"getMutationQueue",value:function(e,t){var n=this.Vs[e.toKey()];return n||(n=new kl(t,this.referenceDelegate),this.Vs[e.toKey()]=n),n}},{key:"getTargetCache",value:function(){return this.Cs}},{key:"getRemoteDocumentCache",value:function(){return this.remoteDocumentCache}},{key:"getBundleCache",value:function(){return this.Ns}},{key:"runTransaction",value:function(e,t,n){var r=this;sa("MemoryPersistence","Starting transaction:",e);var i=new xl(this.Ss.next());return this.referenceDelegate.ks(),n(i).next((function(e){return r.referenceDelegate.Os(i).next((function(){return e}))})).toPromise().then((function(e){return i.raiseOnCommittedEvent(),e}))}},{key:"Ms",value:function(e,t){return Qa.or(Object.values(this.Vs).map((function(n){return function(){return n.containsKey(e,t)}})))}}]),e}(),xl=function(e){b(n,e);var t=x(n);function n(e){var r;return v(this,n),(r=t.call(this)).currentSequenceNumber=e,r}return m(n)}(qa),Tl=function(){function e(t){v(this,e),this.persistence=t,this.Fs=new ml,this.$s=null}return m(e,[{key:"Ls",get:function(){if(this.$s)return this.$s;throw ha()}},{key:"addReference",value:function(e,t,n){return this.Fs.addReference(n,t),this.Ls.delete(n.toString()),Qa.resolve()}},{key:"removeReference",value:function(e,t,n){return this.Fs.removeReference(n,t),this.Ls.add(n.toString()),Qa.resolve()}},{key:"markPotentiallyOrphaned",value:function(e,t){return this.Ls.add(t.toString()),Qa.resolve()}},{key:"removeTarget",value:function(e,t){var n=this;this.Fs.ls(t.targetId).forEach((function(e){return n.Ls.add(e.toString())}));var r=this.persistence.getTargetCache();return r.getMatchingKeysForTargetId(e,t.targetId).next((function(e){e.forEach((function(e){return n.Ls.add(e.toString())}))})).next((function(){return r.removeTargetData(e,t)}))}},{key:"ks",value:function(){this.$s=new Set}},{key:"Os",value:function(e){var t=this,n=this.persistence.getRemoteDocumentCache().newChangeBuffer();return Qa.forEach(this.Ls,(function(r){var i=Ma.fromPath(r);return t.Us(e,i).next((function(e){e||n.removeEntry(i,Aa.min())}))})).next((function(){return t.$s=null,n.apply(e)}))}},{key:"updateLimboDocument",value:function(e,t){var n=this;return this.Us(e,t).next((function(e){e?n.Ls.delete(t.toString()):n.Ls.add(t.toString())}))}},{key:"xs",value:function(e){return 0}},{key:"Us",value:function(e,t){var n=this;return Qa.or([function(){return Qa.resolve(n.Fs.containsKey(t))},function(){return n.persistence.getTargetCache().containsKey(e,t)},function(){return n.persistence.Ms(e,t)}])}}],[{key:"Bs",value:function(t){return new e(t)}}]),e}();var Cl=function(){function e(t,n,r,i){v(this,e),this.targetId=t,this.fromCache=n,this.Si=r,this.Di=i}return m(e,null,[{key:"Ci",value:function(t,n){var r,i=fs(),a=fs(),o=p(n.docChanges);try{for(o.s();!(r=o.n()).done;){var u=r.value;switch(u.type){case 0:i=i.add(u.doc.key);break;case 1:a=a.add(u.doc.key)}}}catch(s){o.e(s)}finally{o.f()}return new e(t,n.fromCache,i,a)}}]),e}(),_l=function(){function e(){v(this,e),this.xi=!1}return m(e,[{key:"initialize",value:function(e,t){this.Ni=e,this.indexManager=t,this.xi=!0}},{key:"getDocumentsMatchingQuery",value:function(e,t,n,r){var i=this;return this.ki(e,t).next((function(a){return a||i.Oi(e,t,r,n)})).next((function(n){return n||i.Mi(e,t)}))}},{key:"ki",value:function(e,t){var n=this;if(iu(t))return Qa.resolve(null);var r=lu(t);return this.indexManager.getIndexType(e,r).next((function(i){return 0===i?null:(null!==t.limit&&1===i&&(t=cu(t,null,"F"),r=lu(t)),n.indexManager.getDocumentsMatchingTarget(e,r).next((function(i){var o=fs.apply(void 0,a(i));return n.Ni.getDocuments(e,o).next((function(i){return n.indexManager.getMinOffset(e,r).next((function(r){var a=n.Fi(t,i);return n.$i(t,a,o,r.readTime)?n.ki(e,cu(t,null,"F")):n.Bi(e,a,t,r)}))}))})))}))}},{key:"Oi",value:function(e,t,n,r){var i=this;return iu(t)||r.isEqual(Aa.min())?this.Mi(e,t):this.Ni.getDocuments(e,n).next((function(a){var o=i.Fi(t,a);return i.$i(t,o,n,r)?i.Mi(e,t):(ua()<=G.DEBUG&&sa("QueryEngine","Re-using previous result from %s to execute query: %s",r.toString(),du(t)),i.Bi(e,o,t,Va(r,-1)))}))}},{key:"Fi",value:function(e,t){var n=new to(yu(e));return t.forEach((function(t,r){pu(e,r)&&(n=n.add(r))})),n}},{key:"$i",value:function(e,t,n,r){if(null===e.limit)return!1;if(n.size!==t.size)return!0;var i="F"===e.limitType?t.last():t.first();return!!i&&(i.hasPendingWrites||i.version.compareTo(r)>0)}},{key:"Mi",value:function(e,t){return ua()<=G.DEBUG&&sa("QueryEngine","Using full collection scan to execute query:",du(t)),this.Ni.getDocumentsMatchingQuery(e,t,ja.min())}},{key:"Bi",value:function(e,t,n,r){return this.Ni.getDocumentsMatchingQuery(e,n,r).next((function(e){return t.forEach((function(t){e=e.insert(t.key,t)})),e}))}}]),e}(),Il=function(){function e(t,n,r,i){v(this,e),this.persistence=t,this.Li=n,this.It=i,this.Ui=new Ja(Ia),this.qi=new es((function(e){return Vo(e)}),Uo),this.Ki=new Map,this.Gi=t.getRemoteDocumentCache(),this.Cs=t.getTargetCache(),this.Ns=t.getBundleCache(),this.Qi(r)}return m(e,[{key:"Qi",value:function(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutationQueue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new pl(this.Gi,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.Gi.setIndexManager(this.indexManager),this.Li.initialize(this.localDocuments,this.indexManager)}},{key:"collectGarbage",value:function(e){var t=this;return this.persistence.runTransaction("Collect garbage","readwrite-primary",(function(n){return e.collect(n,t.Ui)}))}}]),e}();function Nl(e,t,n,r){return new Il(e,t,n,r)}function Dl(e,t){return Al.apply(this,arguments)}function Al(){return Al=l(u().mark((function e(t,n){var r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=pa(t),e.next=3,r.persistence.runTransaction("Handle user change","readonly",(function(e){var t;return r.mutationQueue.getAllMutationBatches(e).next((function(i){return t=i,r.Qi(n),r.mutationQueue.getAllMutationBatches(e)})).next((function(n){var i,a=[],o=[],u=fs(),s=p(t);try{for(s.s();!(i=s.n()).done;){var l=i.value;a.push(l.batchId);var c,f=p(l.mutations);try{for(f.s();!(c=f.n()).done;){var h=c.value;u=u.add(h.key)}}catch(b){f.e(b)}finally{f.f()}}}catch(b){s.e(b)}finally{s.f()}var d,v=p(n);try{for(v.s();!(d=v.n()).done;){var y=d.value;o.push(y.batchId);var m,g=p(y.mutations);try{for(g.s();!(m=g.n()).done;){var k=m.value;u=u.add(k.key)}}catch(b){g.e(b)}finally{g.f()}}}catch(b){v.e(b)}finally{v.f()}return r.localDocuments.getDocuments(e,u).next((function(e){return{ji:e,removedBatchIds:a,addedBatchIds:o}}))}))}));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)}))),Al.apply(this,arguments)}function Ll(e,t){var n=pa(e);return n.persistence.runTransaction("Acknowledge batch","readwrite-primary",(function(e){var r=t.batch.keys(),i=n.Gi.newChangeBuffer({trackRemovals:!0});return function(e,t,n,r){var i=n.batch,a=i.keys(),o=Qa.resolve();return a.forEach((function(e){o=o.next((function(){return r.getEntry(t,e)})).next((function(t){var a=n.docVersions.get(e);da(null!==a),t.version.compareTo(a)<0&&(i.applyToRemoteDocument(t,n),t.isValidDocument()&&(t.setReadTime(n.commitVersion),r.addEntry(t)))}))})),o.next((function(){return e.mutationQueue.removeMutationBatch(t,i)}))}(n,e,t,i).next((function(){return i.apply(e)})).next((function(){return n.mutationQueue.performConsistencyCheck(e)})).next((function(){return n.documentOverlayCache.removeOverlaysForBatchId(e,r,t.batch.batchId)})).next((function(){return n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(e,function(e){for(var t=fs(),n=0;n<e.mutationResults.length;++n)e.mutationResults[n].transformResults.length>0&&(t=t.add(e.batch.mutations[n].key));return t}(t))})).next((function(){return n.localDocuments.getDocuments(e,r)}))}))}function Ol(e){var t=pa(e);return t.persistence.runTransaction("Get last remote snapshot version","readonly",(function(e){return t.Cs.getLastRemoteSnapshotVersion(e)}))}function Rl(e,t){var n=pa(e),r=t.snapshotVersion,i=n.Ui;return n.persistence.runTransaction("Apply remote event","readwrite-primary",(function(e){var a=n.Gi.newChangeBuffer({trackRemovals:!0});i=n.Ui;var o=[];t.targetChanges.forEach((function(a,u){var s=i.get(u);if(s){o.push(n.Cs.removeMatchingKeys(e,a.removedDocuments,u).next((function(){return n.Cs.addMatchingKeys(e,a.addedDocuments,u)})));var l=s.withSequenceNumber(e.currentSequenceNumber);t.targetMismatches.has(u)?l=l.withResumeToken(io.EMPTY_BYTE_STRING,Aa.min()).withLastLimboFreeSnapshotVersion(Aa.min()):a.resumeToken.approximateByteSize()>0&&(l=l.withResumeToken(a.resumeToken,r)),i=i.insert(u,l),function(e,t,n){return 0===e.resumeToken.approximateByteSize()||(t.snapshotVersion.toMicroseconds()-e.snapshotVersion.toMicroseconds()>=3e8||n.addedDocuments.size+n.modifiedDocuments.size+n.removedDocuments.size>0)}(s,l,a)&&o.push(n.Cs.updateTargetData(e,l))}}));var u=ns(),s=fs();if(t.documentUpdates.forEach((function(r){t.resolvedLimboDocuments.has(r)&&o.push(n.persistence.referenceDelegate.updateLimboDocument(e,r))})),o.push(Pl(e,a,t.documentUpdates).next((function(e){u=e.Wi,s=e.zi}))),!r.isEqual(Aa.min())){var l=n.Cs.getLastRemoteSnapshotVersion(e).next((function(t){return n.Cs.setTargetsMetadata(e,e.currentSequenceNumber,r)}));o.push(l)}return Qa.waitFor(o).next((function(){return a.apply(e)})).next((function(){return n.localDocuments.getLocalViewOfDocuments(e,u,s)})).next((function(){return u}))})).then((function(e){return n.Ui=i,e}))}function Pl(e,t,n){var r=fs(),i=fs();return n.forEach((function(e){return r=r.add(e)})),t.getEntries(e,r).next((function(e){var r=ns();return n.forEach((function(n,a){var o=e.get(n);a.isFoundDocument()!==o.isFoundDocument()&&(i=i.add(n)),a.isNoDocument()&&a.version.isEqual(Aa.min())?(t.removeEntry(n,a.readTime),r=r.insert(n,a)):!o.isValidDocument()||a.version.compareTo(o.version)>0||0===a.version.compareTo(o.version)&&o.hasPendingWrites?(t.addEntry(a),r=r.insert(n,a)):sa("LocalStore","Ignoring outdated watch update for ",n,". Current version:",o.version," Watch version:",a.version)})),{Wi:r,zi:i}}))}function Ml(e,t){var n=pa(e);return n.persistence.runTransaction("Get next mutation batch","readonly",(function(e){return void 0===t&&(t=-1),n.mutationQueue.getNextMutationBatchAfterBatchId(e,t)}))}function Fl(e,t){var n=pa(e);return n.persistence.runTransaction("Allocate target","readwrite",(function(e){var r;return n.Cs.getTargetData(e,t).next((function(i){return i?(r=i,Qa.resolve(r)):n.Cs.allocateTargetId(e).next((function(i){return r=new il(t,i,0,e.currentSequenceNumber),n.Cs.addTargetData(e,r).next((function(){return r}))}))}))})).then((function(e){var r=n.Ui.get(e.targetId);return(null===r||e.snapshotVersion.compareTo(r.snapshotVersion)>0)&&(n.Ui=n.Ui.insert(e.targetId,e),n.qi.set(t,e.targetId)),e}))}function Vl(e,t,n){return Ul.apply(this,arguments)}function Ul(){return Ul=l(u().mark((function e(t,n,r){var i,a,o;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=pa(t),a=i.Ui.get(n),o=r?"readwrite":"readwrite-primary",e.prev=1,e.t0=r,e.t0){e.next=6;break}return e.next=6,i.persistence.runTransaction("Release target",o,(function(e){return i.persistence.referenceDelegate.removeTarget(e,a)}));case 6:e.next=13;break;case 8:if(e.prev=8,e.t1=e.catch(1),Wa(e.t1)){e.next=12;break}throw e.t1;case 12:sa("LocalStore","Failed to update sequence numbers for target ".concat(n,": ").concat(e.t1));case 13:i.Ui=i.Ui.remove(n),i.qi.delete(a.target);case 14:case"end":return e.stop()}}),e,null,[[1,8]])}))),Ul.apply(this,arguments)}function jl(e,t,n){var r=pa(e),i=Aa.min(),a=fs();return r.persistence.runTransaction("Execute query","readonly",(function(e){return function(e,t,n){var r=pa(e),i=r.qi.get(n);return void 0!==i?Qa.resolve(r.Ui.get(i)):r.Cs.getTargetData(t,n)}(r,e,lu(t)).next((function(t){if(t)return i=t.lastLimboFreeSnapshotVersion,r.Cs.getMatchingKeysForTargetId(e,t.targetId).next((function(e){a=e}))})).next((function(){return r.Li.getDocumentsMatchingQuery(e,t,n?i:Aa.min(),n?a:fs())})).next((function(e){return zl(r,vu(t),e),{documents:e,Hi:a}}))}))}function zl(e,t,n){var r=e.Ki.get(t)||Aa.min();n.forEach((function(e,t){t.readTime.compareTo(r)>0&&(r=t.readTime)})),e.Ki.set(t,r)}var Bl=function(){function e(){v(this,e),this.activeTargetIds=ds()}return m(e,[{key:"er",value:function(e){this.activeTargetIds=this.activeTargetIds.add(e)}},{key:"nr",value:function(e){this.activeTargetIds=this.activeTargetIds.delete(e)}},{key:"tr",value:function(){var e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)}}]),e}(),ql=function(){function e(){v(this,e),this.Lr=new Bl,this.Ur={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}return m(e,[{key:"addPendingMutation",value:function(e){}},{key:"updateMutationState",value:function(e,t,n){}},{key:"addLocalQueryTarget",value:function(e){return this.Lr.er(e),this.Ur[e]||"not-current"}},{key:"updateQueryState",value:function(e,t,n){this.Ur[e]=t}},{key:"removeLocalQueryTarget",value:function(e){this.Lr.nr(e)}},{key:"isLocalQueryTarget",value:function(e){return this.Lr.activeTargetIds.has(e)}},{key:"clearQueryState",value:function(e){delete this.Ur[e]}},{key:"getAllActiveQueryTargets",value:function(){return this.Lr.activeTargetIds}},{key:"isActiveQueryTarget",value:function(e){return this.Lr.activeTargetIds.has(e)}},{key:"start",value:function(){return this.Lr=new Bl,Promise.resolve()}},{key:"handleUserChange",value:function(e,t,n){}},{key:"setOnlineState",value:function(e){}},{key:"shutdown",value:function(){}},{key:"writeSequenceNumber",value:function(e){}},{key:"notifyBundleLoaded",value:function(e){}}]),e}(),Hl=function(){function e(){v(this,e)}return m(e,[{key:"qr",value:function(e){}},{key:"shutdown",value:function(){}}]),e}(),Kl=function(){function e(){var t=this;v(this,e),this.Kr=function(){return t.Gr()},this.Qr=function(){return t.jr()},this.Wr=[],this.zr()}return m(e,[{key:"qr",value:function(e){this.Wr.push(e)}},{key:"shutdown",value:function(){window.removeEventListener("online",this.Kr),window.removeEventListener("offline",this.Qr)}},{key:"zr",value:function(){window.addEventListener("online",this.Kr),window.addEventListener("offline",this.Qr)}},{key:"Gr",value:function(){sa("ConnectivityMonitor","Network connectivity changed: AVAILABLE");var e,t=p(this.Wr);try{for(t.s();!(e=t.n()).done;){(0,e.value)(0)}}catch(n){t.e(n)}finally{t.f()}}},{key:"jr",value:function(){sa("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");var e,t=p(this.Wr);try{for(t.s();!(e=t.n()).done;){(0,e.value)(1)}}catch(n){t.e(n)}finally{t.f()}}}],[{key:"C",value:function(){return"undefined"!=typeof window&&void 0!==window.addEventListener&&void 0!==window.removeEventListener}}]),e}(),Ql={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"},Wl=function(){function e(t){v(this,e),this.Hr=t.Hr,this.Jr=t.Jr}return m(e,[{key:"Yr",value:function(e){this.Xr=e}},{key:"Zr",value:function(e){this.eo=e}},{key:"onMessage",value:function(e){this.no=e}},{key:"close",value:function(){this.Jr()}},{key:"send",value:function(e){this.Hr(e)}},{key:"so",value:function(){this.Xr()}},{key:"io",value:function(e){this.eo(e)}},{key:"ro",value:function(e){this.no(e)}}]),e}(),Gl=function(e){b(n,e);var t=x(n);function n(e){var r;return v(this,n),(r=t.call(this,e)).forceLongPolling=e.forceLongPolling,r.autoDetectLongPolling=e.autoDetectLongPolling,r.useFetchStreams=e.useFetchStreams,r}return m(n,[{key:"fo",value:function(e,t,n,r){return new Promise((function(i,a){var o=new na;o.setWithCredentials(!0),o.listenOnce(Yi.COMPLETE,(function(){try{switch(o.getLastErrorCode()){case Xi.NO_ERROR:var t=o.getResponseJson();sa("Connection","XHR received:",JSON.stringify(t)),i(t);break;case Xi.TIMEOUT:sa("Connection",'RPC "'+e+'" timed out'),a(new ya(va.DEADLINE_EXCEEDED,"Request time out"));break;case Xi.HTTP_ERROR:var n=o.getStatus();if(sa("Connection",'RPC "'+e+'" failed with status:',n,"response text:",o.getResponseText()),n>0){var r=o.getResponseJson().error;if(r&&r.status&&r.message){var u=function(e){var t=e.toLowerCase().replace(/_/g,"-");return Object.values(va).indexOf(t)>=0?t:va.UNKNOWN}(r.status);a(new ya(u,r.message))}else a(new ya(va.UNKNOWN,"Server responded with status "+o.getStatus()))}else a(new ya(va.UNAVAILABLE,"Connection failed."));break;default:ha()}}finally{sa("Connection",'RPC "'+e+'" completed.')}}));var u=JSON.stringify(r);o.send(t,"POST",u,n,15)}))}},{key:"wo",value:function(e,t,n){var r=[this.oo,"/","google.firestore.v1.Firestore","/",e,"/channel"],i=Gi(),a=$i(),o={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:"projects/".concat(this.databaseId.projectId,"/databases/").concat(this.databaseId.database)},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling};this.useFetchStreams&&(o.xmlHttpFactory=new ea({})),this.lo(o.initMessageHeaders,t,n),o.encodeInitMessageHeaders=!0;var u=r.join("");sa("Connection","Creating WebChannel: "+u,o);var s=i.createWebChannel(u,o),l=!1,c=!1,f=new Wl({Hr:function(e){c?sa("Connection","Not sending because WebChannel is closed:",e):(l||(sa("Connection","Opening WebChannel transport."),s.open(),l=!0),sa("Connection","WebChannel sending:",e),s.send(e))},Jr:function(){return s.close()}}),h=function(e,t,n){e.listen(t,(function(e){try{n(e)}catch(e){setTimeout((function(){throw e}),0)}}))};return h(s,ta.EventType.OPEN,(function(){c||sa("Connection","WebChannel transport opened.")})),h(s,ta.EventType.CLOSE,(function(){c||(c=!0,sa("Connection","WebChannel transport closed"),f.io())})),h(s,ta.EventType.ERROR,(function(e){c||(c=!0,ca("Connection","WebChannel transport errored:",e),f.io(new ya(va.UNAVAILABLE,"The operation could not be completed")))})),h(s,ta.EventType.MESSAGE,(function(e){var t;if(!c){var n=e.data[0];da(!!n);var r=n,i=r.error||(null===(t=r[0])||void 0===t?void 0:t.error);if(i){sa("Connection","WebChannel received error:",i);var a=i.status,o=function(e){var t=Wu[e];if(void 0!==t)return Zu(t)}(a),u=i.message;void 0===o&&(o=va.INTERNAL,u="Unknown error status: "+a+" with message "+i.message),c=!0,f.io(new ya(o,u)),s.close()}else sa("Connection","WebChannel received:",n),f.ro(n)}})),h(a,Ji.STAT_EVENT,(function(e){e.stat===Zi.PROXY?sa("Connection","Detected buffering proxy"):e.stat===Zi.NOPROXY&&sa("Connection","Detected no buffering proxy")})),setTimeout((function(){f.so()}),0),f}}]),n}(function(){function e(t){v(this,e),this.databaseInfo=t,this.databaseId=t.databaseId;var n=t.ssl?"https":"http";this.oo=n+"://"+t.host,this.uo="projects/"+this.databaseId.projectId+"/databases/"+this.databaseId.database+"/documents"}return m(e,[{key:"co",get:function(){return!1}},{key:"ao",value:function(e,t,n,r,i){var a=this.ho(e,t);sa("RestConnection","Sending: ",a,n);var o={};return this.lo(o,r,i),this.fo(e,a,o,n).then((function(e){return sa("RestConnection","Received: ",e),e}),(function(t){throw ca("RestConnection","".concat(e," failed with error: "),t,"url: ",a,"request:",n),t}))}},{key:"_o",value:function(e,t,n,r,i,a){return this.ao(e,t,n,r,i)}},{key:"lo",value:function(e,t,n){e["X-Goog-Api-Client"]="gl-js/ fire/"+aa,e["Content-Type"]="text/plain",this.databaseInfo.appId&&(e["X-Firebase-GMPID"]=this.databaseInfo.appId),t&&t.headers.forEach((function(t,n){return e[n]=t})),n&&n.headers.forEach((function(t,n){return e[n]=t}))}},{key:"ho",value:function(e,t){var n=Ql[e];return"".concat(this.oo,"/v1/").concat(t,":").concat(n)}}]),e}());function $l(){return"undefined"!=typeof document?document:null}function Xl(e){return new Ts(e,!0)}var Yl=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1.5,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:6e4;v(this,e),this.Hs=t,this.timerId=n,this.mo=r,this.yo=i,this.po=a,this.Io=0,this.To=null,this.Eo=Date.now(),this.reset()}return m(e,[{key:"reset",value:function(){this.Io=0}},{key:"Ao",value:function(){this.Io=this.po}},{key:"Ro",value:function(e){var t=this;this.cancel();var n=Math.floor(this.Io+this.bo()),r=Math.max(0,Date.now()-this.Eo),i=Math.max(0,n-r);i>0&&sa("ExponentialBackoff","Backing off for ".concat(i," ms (base delay: ").concat(this.Io," ms, delay with jitter: ").concat(n," ms, last attempt: ").concat(r," ms ago)")),this.To=this.Hs.enqueueAfterDelay(this.timerId,i,(function(){return t.Eo=Date.now(),e()})),this.Io*=this.yo,this.Io<this.mo&&(this.Io=this.mo),this.Io>this.po&&(this.Io=this.po)}},{key:"Po",value:function(){null!==this.To&&(this.To.skipDelay(),this.To=null)}},{key:"cancel",value:function(){null!==this.To&&(this.To.cancel(),this.To=null)}},{key:"bo",value:function(){return(Math.random()-.5)*this.Io}}]),e}(),Jl=function(){function e(t,n,r,i,a,o,u,s){v(this,e),this.Hs=t,this.vo=r,this.Vo=i,this.connection=a,this.authCredentialsProvider=o,this.appCheckCredentialsProvider=u,this.listener=s,this.state=0,this.So=0,this.Do=null,this.Co=null,this.stream=null,this.xo=new Yl(t,n)}return m(e,[{key:"No",value:function(){return 1===this.state||5===this.state||this.ko()}},{key:"ko",value:function(){return 2===this.state||3===this.state}},{key:"start",value:function(){4!==this.state?this.auth():this.Oo()}},{key:"stop",value:function(){var e=l(u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=this.No(),!e.t0){e.next=4;break}return e.next=4,this.close(0);case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"Mo",value:function(){this.state=0,this.xo.reset()}},{key:"Fo",value:function(){var e=this;this.ko()&&null===this.Do&&(this.Do=this.Hs.enqueueAfterDelay(this.vo,6e4,(function(){return e.$o()})))}},{key:"Bo",value:function(e){this.Lo(),this.stream.send(e)}},{key:"$o",value:function(){var e=l(u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.ko()){e.next=2;break}return e.abrupt("return",this.close(0));case 2:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"Lo",value:function(){this.Do&&(this.Do.cancel(),this.Do=null)}},{key:"Uo",value:function(){this.Co&&(this.Co.cancel(),this.Co=null)}},{key:"close",value:function(){var e=l(u().mark((function e(t,n){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.Lo(),this.Uo(),this.xo.cancel(),this.So++,4!==t?this.xo.reset():n&&n.code===va.RESOURCE_EXHAUSTED?(la(n.toString()),la("Using maximum backoff delay to prevent overloading the backend."),this.xo.Ao()):n&&n.code===va.UNAUTHENTICATED&&3!==this.state&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),null!==this.stream&&(this.qo(),this.stream.close(),this.stream=null),this.state=t,e.next=9,this.listener.Zr(n);case 9:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"qo",value:function(){}},{key:"auth",value:function(){var e=this;this.state=1;var t=this.Ko(this.So),n=this.So;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then((function(t){var r=d(t,2),i=r[0],a=r[1];e.So===n&&e.Go(i,a)}),(function(n){t((function(){var t=new ya(va.UNKNOWN,"Fetching auth token failed: "+n.message);return e.Qo(t)}))}))}},{key:"Go",value:function(e,t){var n=this,r=this.Ko(this.So);this.stream=this.jo(e,t),this.stream.Yr((function(){r((function(){return n.state=2,n.Co=n.Hs.enqueueAfterDelay(n.Vo,1e4,(function(){return n.ko()&&(n.state=3),Promise.resolve()})),n.listener.Yr()}))})),this.stream.Zr((function(e){r((function(){return n.Qo(e)}))})),this.stream.onMessage((function(e){r((function(){return n.onMessage(e)}))}))}},{key:"Oo",value:function(){var e=this;this.state=5,this.xo.Ro(l(u().mark((function t(){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.state=0,e.start();case 1:case"end":return t.stop()}}),t)}))))}},{key:"Qo",value:function(e){return sa("PersistentStream","close with error: ".concat(e)),this.stream=null,this.close(4,e)}},{key:"Ko",value:function(e){var t=this;return function(n){t.Hs.enqueueAndForget((function(){return t.So===e?n():(sa("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve())}))}}}]),e}(),Zl=function(e){b(n,e);var t=x(n);function n(e,r,i,a,o,u){var s;return v(this,n),(s=t.call(this,e,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",r,i,a,u)).It=o,s}return m(n,[{key:"jo",value:function(e,t){return this.connection.wo("Listen",e,t)}},{key:"onMessage",value:function(e){this.xo.reset();var t=function(e,t){var n;if("targetChange"in t){t.targetChange;var r=function(e){return"NO_CHANGE"===e?0:"ADD"===e?1:"REMOVE"===e?2:"CURRENT"===e?3:"RESET"===e?4:ha()}(t.targetChange.targetChangeType||"NO_CHANGE"),i=t.targetChange.targetIds||[],a=function(e,t){return e.gt?(da(void 0===t||"string"==typeof t),io.fromBase64String(t||"")):(da(void 0===t||t instanceof Uint8Array),io.fromUint8Array(t||new Uint8Array))}(e,t.targetChange.resumeToken),o=t.targetChange.cause,u=o&&function(e){var t=void 0===e.code?va.UNKNOWN:Zu(e.code);return new ya(t,e.message||"")}(o);n=new gs(r,i,a,u||null)}else if("documentChange"in t){t.documentChange;var s=t.documentChange;s.document,s.document.name,s.document.updateTime;var l=Os(e,s.document.name),c=Ns(s.document.updateTime),f=new Oo({mapValue:{fields:s.document.fields}}),h=Po.newFoundDocument(l,c,f),d=s.targetIds||[],p=s.removedTargetIds||[];n=new ys(d,p,h.key,h)}else if("documentDelete"in t){t.documentDelete;var v=t.documentDelete;v.document;var y=Os(e,v.document),m=v.readTime?Ns(v.readTime):Aa.min(),g=Po.newNoDocument(y,m),k=v.removedTargetIds||[];n=new ys([],k,g.key,g)}else if("documentRemove"in t){t.documentRemove;var b=t.documentRemove;b.document;var w=Os(e,b.document),E=b.removedTargetIds||[];n=new ys([],E,w,null)}else{if(!("filter"in t))return ha();t.filter;var S=t.filter;S.targetId;var x=S.count||0,T=new Yu(x),C=S.targetId;n=new ms(C,T)}return n}(this.It,e),n=function(e){if(!("targetChange"in e))return Aa.min();var t=e.targetChange;return t.targetIds&&t.targetIds.length?Aa.min():t.readTime?Ns(t.readTime):Aa.min()}(e);return this.listener.Wo(t,n)}},{key:"zo",value:function(e){var t={};t.database=Ms(this.It),t.addTarget=function(e,t){var n,r=t.target;return(n=jo(r)?{documents:js(e,r)}:{query:zs(e,r)}).targetId=t.targetId,t.resumeToken.approximateByteSize()>0?n.resumeToken=_s(e,t.resumeToken):t.snapshotVersion.compareTo(Aa.min())>0&&(n.readTime=Cs(e,t.snapshotVersion.toTimestamp())),n}(this.It,e);var n=function(e,t){var n=function(e,t){switch(t){case 0:return null;case 1:return"existence-filter-mismatch";case 2:return"limbo-document";default:return ha()}}(0,t.purpose);return null==n?null:{"goog-listen-tags":n}}(this.It,e);n&&(t.labels=n),this.Bo(t)}},{key:"Ho",value:function(e){var t={};t.database=Ms(this.It),t.removeTarget=e,this.Bo(t)}}]),n}(Jl),ec=function(e){b(n,e);var t=x(n);function n(e,r,i,a,o,u){var s;return v(this,n),(s=t.call(this,e,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",r,i,a,u)).It=o,s.Jo=!1,s}return m(n,[{key:"Yo",get:function(){return this.Jo}},{key:"start",value:function(){this.Jo=!1,this.lastStreamToken=void 0,Ye(w(n.prototype),"start",this).call(this)}},{key:"qo",value:function(){this.Jo&&this.Xo([])}},{key:"jo",value:function(e,t){return this.connection.wo("Write",e,t)}},{key:"onMessage",value:function(e){if(da(!!e.streamToken),this.lastStreamToken=e.streamToken,this.Jo){this.xo.reset();var t=function(e,t){return e&&e.length>0?(da(void 0!==t),e.map((function(e){return function(e,t){var n=e.updateTime?Ns(e.updateTime):Ns(t);return n.isEqual(Aa.min())&&(n=Ns(t)),new Ou(n,e.transformResults||[])}(e,t)}))):[]}(e.writeResults,e.commitTime),n=Ns(e.commitTime);return this.listener.Zo(n,t)}return da(!e.writeResults||0===e.writeResults.length),this.Jo=!0,this.listener.tu()}},{key:"eu",value:function(){var e={};e.database=Ms(this.It),this.Bo(e)}},{key:"Xo",value:function(e){var t=this,n={streamToken:this.lastStreamToken,writes:e.map((function(e){return Us(t.It,e)}))};this.Bo(n)}}]),n}(Jl),tc=function(e){b(n,e);var t=x(n);function n(e,r,i,a){var o;return v(this,n),(o=t.call(this)).authCredentials=e,o.appCheckCredentials=r,o.connection=i,o.It=a,o.nu=!1,o}return m(n,[{key:"su",value:function(){if(this.nu)throw new ya(va.FAILED_PRECONDITION,"The client has already been terminated.")}},{key:"ao",value:function(e,t,n){var r=this;return this.su(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then((function(i){var a=d(i,2),o=a[0],u=a[1];return r.connection.ao(e,t,n,o,u)})).catch((function(e){throw"FirebaseError"===e.name?(e.code===va.UNAUTHENTICATED&&(r.authCredentials.invalidateToken(),r.appCheckCredentials.invalidateToken()),e):new ya(va.UNKNOWN,e.toString())}))}},{key:"_o",value:function(e,t,n,r){var i=this;return this.su(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then((function(a){var o=d(a,2),u=o[0],s=o[1];return i.connection._o(e,t,n,u,s,r)})).catch((function(e){throw"FirebaseError"===e.name?(e.code===va.UNAUTHENTICATED&&(i.authCredentials.invalidateToken(),i.appCheckCredentials.invalidateToken()),e):new ya(va.UNKNOWN,e.toString())}))}},{key:"terminate",value:function(){this.nu=!0}}]),n}(function(){return m((function e(){v(this,e)}))}());var nc=function(){function e(t,n){v(this,e),this.asyncQueue=t,this.onlineStateHandler=n,this.state="Unknown",this.iu=0,this.ru=null,this.ou=!0}return m(e,[{key:"uu",value:function(){var e=this;0===this.iu&&(this.cu("Unknown"),this.ru=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,(function(){return e.ru=null,e.au("Backend didn't respond within 10 seconds."),e.cu("Offline"),Promise.resolve()})))}},{key:"hu",value:function(e){"Online"===this.state?this.cu("Unknown"):(this.iu++,this.iu>=1&&(this.lu(),this.au("Connection failed 1 times. Most recent error: ".concat(e.toString())),this.cu("Offline")))}},{key:"set",value:function(e){this.lu(),this.iu=0,"Online"===e&&(this.ou=!1),this.cu(e)}},{key:"cu",value:function(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}},{key:"au",value:function(e){var t="Could not reach Cloud Firestore backend. ".concat(e,"\nThis 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.ou?(la(t),this.ou=!1):sa("OnlineStateTracker",t)}},{key:"lu",value:function(){null!==this.ru&&(this.ru.cancel(),this.ru=null)}}]),e}(),rc=m((function e(t,n,r,i,a){var o=this;v(this,e),this.localStore=t,this.datastore=n,this.asyncQueue=r,this.remoteSyncer={},this.fu=[],this.du=new Map,this._u=new Set,this.wu=[],this.mu=a,this.mu.qr((function(e){r.enqueueAndForget(l(u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=pc(o),!e.t0){e.next=5;break}return sa("RemoteStore","Restarting streams for network reachability change."),e.next=5,function(){var e=l(u().mark((function e(t){var n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=pa(t))._u.add(4),e.next=4,oc(n);case 4:return n.gu.set("Unknown"),n._u.delete(4),e.next=8,ic(n);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()(o);case 5:case"end":return e.stop()}}),e)}))))})),this.gu=new nc(r,i)}));function ic(e){return ac.apply(this,arguments)}function ac(){return ac=l(u().mark((function e(t){var n,r,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!pc(t)){e.next=18;break}n=p(t.wu),e.prev=2,n.s();case 4:if((r=n.n()).done){e.next=10;break}return i=r.value,e.next=8,i(!0);case 8:e.next=4;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(2),n.e(e.t0);case 15:return e.prev=15,n.f(),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[2,12,15,18]])}))),ac.apply(this,arguments)}function oc(e){return uc.apply(this,arguments)}function uc(){return uc=l(u().mark((function e(t){var n,r,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=p(t.wu),e.prev=1,n.s();case 3:if((r=n.n()).done){e.next=9;break}return i=r.value,e.next=7,i(!1);case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),n.e(e.t0);case 14:return e.prev=14,n.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,null,[[1,11,14,17]])}))),uc.apply(this,arguments)}function sc(e,t){var n=pa(e);n.du.has(t.targetId)||(n.du.set(t.targetId,t),dc(n)?hc(n):qc(n).ko()&&cc(n,t))}function lc(e,t){var n=pa(e),r=qc(n);n.du.delete(t),r.ko()&&fc(n,t),0===n.du.size&&(r.ko()?r.Fo():pc(n)&&n.gu.set("Unknown"))}function cc(e,t){e.yu.Mt(t.targetId),qc(e).zo(t)}function fc(e,t){e.yu.Mt(t),qc(e).Ho(t)}function hc(e){e.yu=new bs({getRemoteKeysForTarget:function(t){return e.remoteSyncer.getRemoteKeysForTarget(t)},se:function(t){return e.du.get(t)||null}}),qc(e).start(),e.gu.uu()}function dc(e){return pc(e)&&!qc(e).No()&&e.du.size>0}function pc(e){return 0===pa(e)._u.size}function vc(e){e.yu=void 0}function yc(e){return mc.apply(this,arguments)}function mc(){return mc=l(u().mark((function e(t){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.du.forEach((function(e,n){cc(t,e)}));case 1:case"end":return e.stop()}}),e)}))),mc.apply(this,arguments)}function gc(e,t){return kc.apply(this,arguments)}function kc(){return kc=l(u().mark((function e(t,n){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:vc(t),dc(t)?(t.gu.hu(n),hc(t)):t.gu.set("Unknown");case 1:case"end":return e.stop()}}),e)}))),kc.apply(this,arguments)}function bc(e,t,n){return wc.apply(this,arguments)}function wc(){return wc=l(u().mark((function e(t,n,r){var i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.gu.set("Online"),!(n instanceof gs&&2===n.state&&n.cause)){e.next=13;break}return e.prev=1,e.next=4,function(){var e=l(u().mark((function e(t,n){var r,i,a,o;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=n.cause,i=p(n.targetIds),e.prev=2,i.s();case 4:if((a=i.n()).done){e.next=14;break}if(o=a.value,e.t0=t.du.has(o),!e.t0){e.next=12;break}return e.next=10,t.remoteSyncer.rejectListen(o,r);case 10:t.du.delete(o),t.yu.removeTarget(o);case 12:e.next=4;break;case 14:e.next=19;break;case 16:e.prev=16,e.t1=e.catch(2),i.e(e.t1);case 19:return e.prev=19,i.f(),e.finish(19);case 22:case"end":return e.stop()}}),e,null,[[2,16,19,22]])})));return function(t,n){return e.apply(this,arguments)}}()(t,n);case 4:e.next=11;break;case 6:return e.prev=6,e.t0=e.catch(1),sa("RemoteStore","Failed to remove targets %s: %s ",n.targetIds.join(","),e.t0),e.next=11,Ec(t,e.t0);case 11:case 22:e.next=29;break;case 13:if(n instanceof ys?t.yu.Gt(n):n instanceof ms?t.yu.Yt(n):t.yu.Wt(n),r.isEqual(Aa.min())){e.next=29;break}return e.prev=14,e.next=17,Ol(t.localStore);case 17:if(i=e.sent,e.t1=r.compareTo(i)>=0,!e.t1){e.next=22;break}return e.next=22,function(e,t){var n=e.yu.te(t);return n.targetChanges.forEach((function(n,r){if(n.resumeToken.approximateByteSize()>0){var i=e.du.get(r);i&&e.du.set(r,i.withResumeToken(n.resumeToken,t))}})),n.targetMismatches.forEach((function(t){var n=e.du.get(t);if(n){e.du.set(t,n.withResumeToken(io.EMPTY_BYTE_STRING,n.snapshotVersion)),fc(e,t);var r=new il(n.target,t,1,n.sequenceNumber);cc(e,r)}})),e.remoteSyncer.applyRemoteEvent(n)}(t,r);case 24:return e.prev=24,e.t2=e.catch(14),sa("RemoteStore","Failed to raise snapshot:",e.t2),e.next=29,Ec(t,e.t2);case 29:case"end":return e.stop()}}),e,null,[[1,6],[14,24]])}))),wc.apply(this,arguments)}function Ec(e,t,n){return Sc.apply(this,arguments)}function Sc(){return Sc=l(u().mark((function e(t,n,r){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Wa(n)){e.next=2;break}throw n;case 2:return t._u.add(1),e.next=5,oc(t);case 5:t.gu.set("Offline"),r||(r=function(){return Ol(t.localStore)}),t.asyncQueue.enqueueRetryable(l(u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return sa("RemoteStore","Retrying IndexedDB access"),e.next=3,r();case 3:return t._u.delete(1),e.next=6,ic(t);case 6:case"end":return e.stop()}}),e)}))));case 8:case"end":return e.stop()}}),e)}))),Sc.apply(this,arguments)}function xc(e,t){return t().catch((function(n){return Ec(e,n,t)}))}function Tc(e){return Cc.apply(this,arguments)}function Cc(){return Cc=l(u().mark((function e(t){var n,r,i,a;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=pa(t),r=Hc(n),i=n.fu.length>0?n.fu[n.fu.length-1].batchId:-1;case 2:if(!_c(n)){e.next=19;break}return e.prev=3,e.next=6,Ml(n.localStore,i);case 6:if(null!==(a=e.sent)){e.next=10;break}return 0===n.fu.length&&r.Fo(),e.abrupt("break",19);case 10:i=a.batchId,Ic(n,a),e.next=17;break;case 13:return e.prev=13,e.t0=e.catch(3),e.next=17,Ec(n,e.t0);case 17:e.next=2;break;case 19:Nc(n)&&Dc(n);case 20:case"end":return e.stop()}}),e,null,[[3,13]])}))),Cc.apply(this,arguments)}function _c(e){return pc(e)&&e.fu.length<10}function Ic(e,t){e.fu.push(t);var n=Hc(e);n.ko()&&n.Yo&&n.Xo(t.mutations)}function Nc(e){return pc(e)&&!Hc(e).No()&&e.fu.length>0}function Dc(e){Hc(e).start()}function Ac(e){return Lc.apply(this,arguments)}function Lc(){return Lc=l(u().mark((function e(t){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Hc(t).eu();case 1:case"end":return e.stop()}}),e)}))),Lc.apply(this,arguments)}function Oc(e){return Rc.apply(this,arguments)}function Rc(){return Rc=l(u().mark((function e(t){var n,r,i,a;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=Hc(t),r=p(t.fu);try{for(r.s();!(i=r.n()).done;)a=i.value,n.Xo(a.mutations)}catch(o){r.e(o)}finally{r.f()}case 3:case"end":return e.stop()}}),e)}))),Rc.apply(this,arguments)}function Pc(e,t,n){return Mc.apply(this,arguments)}function Mc(){return Mc=l(u().mark((function e(t,n,r){var i,a;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.fu.shift(),a=nl.from(i,n,r),e.next=3,xc(t,(function(){return t.remoteSyncer.applySuccessfulWrite(a)}));case 3:return e.next=5,Tc(t);case 5:case"end":return e.stop()}}),e)}))),Mc.apply(this,arguments)}function Fc(e,t){return Vc.apply(this,arguments)}function Vc(){return Vc=l(u().mark((function e(t,n){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=n&&Hc(t).Yo,!e.t0){e.next=4;break}return e.next=4,function(){var e=l(u().mark((function e(t,n){var r,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Ju(i=n.code)||i===va.ABORTED){e.next=7;break}return r=t.fu.shift(),Hc(t).Mo(),e.next=5,xc(t,(function(){return t.remoteSyncer.rejectFailedWrite(r.batchId,n)}));case 5:return e.next=7,Tc(t);case 7:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()(t,n);case 4:Nc(t)&&Dc(t);case 5:case"end":return e.stop()}}),e)}))),Vc.apply(this,arguments)}function Uc(e,t){return jc.apply(this,arguments)}function jc(){return jc=l(u().mark((function e(t,n){var r,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=pa(t)).asyncQueue.verifyOperationInProgress(),sa("RemoteStore","RemoteStore received new credentials"),i=pc(r),r._u.add(3),e.next=6,oc(r);case 6:return i&&r.gu.set("Unknown"),e.next=9,r.remoteSyncer.handleCredentialChange(n);case 9:return r._u.delete(3),e.next=12,ic(r);case 12:case"end":return e.stop()}}),e)}))),jc.apply(this,arguments)}function zc(e,t){return Bc.apply(this,arguments)}function Bc(){return Bc=l(u().mark((function e(t,n){var r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=pa(t),!n){e.next=7;break}return r._u.delete(2),e.next=5,ic(r);case 5:e.next=13;break;case 7:if(e.t0=n,e.t0){e.next=13;break}return r._u.add(2),e.next=12,oc(r);case 12:r.gu.set("Unknown");case 13:case"end":return e.stop()}}),e)}))),Bc.apply(this,arguments)}function qc(e){return e.pu||(e.pu=function(e,t,n){var r=pa(e);return r.su(),new Zl(t,r.connection,r.authCredentials,r.appCheckCredentials,r.It,n)}(e.datastore,e.asyncQueue,{Yr:yc.bind(null,e),Zr:gc.bind(null,e),Wo:bc.bind(null,e)}),e.wu.push(function(){var t=l(u().mark((function t(n){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!n){t.next=4;break}e.pu.Mo(),dc(e)?hc(e):e.gu.set("Unknown"),t.next=7;break;case 4:return t.next=6,e.pu.stop();case 6:vc(e);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())),e.pu}function Hc(e){return e.Iu||(e.Iu=function(e,t,n){var r=pa(e);return r.su(),new ec(t,r.connection,r.authCredentials,r.appCheckCredentials,r.It,n)}(e.datastore,e.asyncQueue,{Yr:Ac.bind(null,e),Zr:Fc.bind(null,e),tu:Oc.bind(null,e),Zo:Pc.bind(null,e)}),e.wu.push(function(){var t=l(u().mark((function t(n){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!n){t.next=6;break}return e.Iu.Mo(),t.next=4,Tc(e);case 4:t.next=9;break;case 6:return t.next=8,e.Iu.stop();case 8:e.fu.length>0&&(sa("RemoteStore","Stopping write stream with ".concat(e.fu.length," pending writes")),e.fu=[]);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())),e.Iu}var Kc=function(){function e(t,n,r,i,a){v(this,e),this.asyncQueue=t,this.timerId=n,this.targetTimeMs=r,this.op=i,this.removalCallback=a,this.deferred=new ma,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch((function(e){}))}return m(e,[{key:"start",value:function(e){var t=this;this.timerHandle=setTimeout((function(){return t.handleDelayElapsed()}),e)}},{key:"skipDelay",value:function(){return this.handleDelayElapsed()}},{key:"cancel",value:function(e){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new ya(va.CANCELLED,"Operation cancelled"+(e?": "+e:""))))}},{key:"handleDelayElapsed",value:function(){var e=this;this.asyncQueue.enqueueAndForget((function(){return null!==e.timerHandle?(e.clearTimeout(),e.op().then((function(t){return e.deferred.resolve(t)}))):Promise.resolve()}))}},{key:"clearTimeout",value:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){null!==this.timerHandle&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}))}],[{key:"createAndSchedule",value:function(t,n,r,i,a){var o=new e(t,n,Date.now()+r,i,a);return o.start(r),o}}]),e}();function Qc(e,t){if(la("AsyncQueue","".concat(t,": ").concat(e)),Wa(e))return new ya(va.UNAVAILABLE,"".concat(t,": ").concat(e));throw e}var Wc=function(){function e(t){v(this,e),this.comparator=t?function(e,n){return t(e,n)||Ma.comparator(e.key,n.key)}:function(e,t){return Ma.comparator(e.key,t.key)},this.keyedMap=is(),this.sortedSet=new Ja(this.comparator)}return m(e,[{key:"has",value:function(e){return null!=this.keyedMap.get(e)}},{key:"get",value:function(e){return this.keyedMap.get(e)}},{key:"first",value:function(){return this.sortedSet.minKey()}},{key:"last",value:function(){return this.sortedSet.maxKey()}},{key:"isEmpty",value:function(){return this.sortedSet.isEmpty()}},{key:"indexOf",value:function(e){var t=this.keyedMap.get(e);return t?this.sortedSet.indexOf(t):-1}},{key:"size",get:function(){return this.sortedSet.size}},{key:"forEach",value:function(e){this.sortedSet.inorderTraversal((function(t,n){return e(t),!1}))}},{key:"add",value:function(e){var t=this.delete(e.key);return t.copy(t.keyedMap.insert(e.key,e),t.sortedSet.insert(e,null))}},{key:"delete",value:function(e){var t=this.get(e);return t?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(t)):this}},{key:"isEqual",value:function(t){if(!(t instanceof e))return!1;if(this.size!==t.size)return!1;for(var n=this.sortedSet.getIterator(),r=t.sortedSet.getIterator();n.hasNext();){var i=n.getNext().key,a=r.getNext().key;if(!i.isEqual(a))return!1}return!0}},{key:"toString",value:function(){var e=[];return this.forEach((function(t){e.push(t.toString())})),0===e.length?"DocumentSet ()":"DocumentSet (\n "+e.join(" \n")+"\n)"}},{key:"copy",value:function(t,n){var r=new e;return r.comparator=this.comparator,r.keyedMap=t,r.sortedSet=n,r}}],[{key:"emptySet",value:function(t){return new e(t.comparator)}}]),e}(),Gc=function(){function e(){v(this,e),this.Tu=new Ja(Ma.comparator)}return m(e,[{key:"track",value:function(e){var t=e.doc.key,n=this.Tu.get(t);n?0!==e.type&&3===n.type?this.Tu=this.Tu.insert(t,e):3===e.type&&1!==n.type?this.Tu=this.Tu.insert(t,{type:n.type,doc:e.doc}):2===e.type&&2===n.type?this.Tu=this.Tu.insert(t,{type:2,doc:e.doc}):2===e.type&&0===n.type?this.Tu=this.Tu.insert(t,{type:0,doc:e.doc}):1===e.type&&0===n.type?this.Tu=this.Tu.remove(t):1===e.type&&2===n.type?this.Tu=this.Tu.insert(t,{type:1,doc:n.doc}):0===e.type&&1===n.type?this.Tu=this.Tu.insert(t,{type:2,doc:e.doc}):ha():this.Tu=this.Tu.insert(t,e)}},{key:"Eu",value:function(){var e=[];return this.Tu.inorderTraversal((function(t,n){e.push(n)})),e}}]),e}(),$c=function(){function e(t,n,r,i,a,o,u,s,l){v(this,e),this.query=t,this.docs=n,this.oldDocs=r,this.docChanges=i,this.mutatedKeys=a,this.fromCache=o,this.syncStateChanged=u,this.excludesMetadataChanges=s,this.hasCachedResults=l}return m(e,[{key:"hasPendingWrites",get:function(){return!this.mutatedKeys.isEmpty()}},{key:"isEqual",value:function(e){if(!(this.fromCache===e.fromCache&&this.hasCachedResults===e.hasCachedResults&&this.syncStateChanged===e.syncStateChanged&&this.mutatedKeys.isEqual(e.mutatedKeys)&&fu(this.query,e.query)&&this.docs.isEqual(e.docs)&&this.oldDocs.isEqual(e.oldDocs)))return!1;var t=this.docChanges,n=e.docChanges;if(t.length!==n.length)return!1;for(var r=0;r<t.length;r++)if(t[r].type!==n[r].type||!t[r].doc.isEqual(n[r].doc))return!1;return!0}}],[{key:"fromInitialDocuments",value:function(t,n,r,i,a){var o=[];return n.forEach((function(e){o.push({type:0,doc:e})})),new e(t,n,Wc.emptySet(n),o,r,i,!0,!1,a)}}]),e}(),Xc=m((function e(){v(this,e),this.Au=void 0,this.listeners=[]})),Yc=m((function e(){v(this,e),this.queries=new es((function(e){return hu(e)}),fu),this.onlineState="Unknown",this.Ru=new Set}));function Jc(e,t){return Zc.apply(this,arguments)}function Zc(){return Zc=l(u().mark((function e(t,n){var r,i,a,o,s;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=pa(t),i=n.query,a=!1,(o=r.queries.get(i))||(a=!0,o=new Xc),!a){e.next=13;break}return e.prev=3,e.next=6,r.onListen(i);case 6:o.Au=e.sent,e.next=13;break;case 9:return e.prev=9,e.t0=e.catch(3),s=Qc(e.t0,"Initialization of query '".concat(du(n.query),"' failed")),e.abrupt("return",void n.onError(s));case 13:r.queries.set(i,o),o.listeners.push(n),n.bu(r.onlineState),o.Au&&n.Pu(o.Au)&&af(r);case 14:case"end":return e.stop()}}),e,null,[[3,9]])}))),Zc.apply(this,arguments)}function ef(e,t){return tf.apply(this,arguments)}function tf(){return tf=l(u().mark((function e(t,n){var r,i,a,o,s;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=pa(t),i=n.query,a=!1,(o=r.queries.get(i))&&(s=o.listeners.indexOf(n))>=0&&(o.listeners.splice(s,1),a=0===o.listeners.length),!a){e.next=6;break}return e.abrupt("return",(r.queries.delete(i),r.onUnlisten(i)));case 6:case"end":return e.stop()}}),e)}))),tf.apply(this,arguments)}function nf(e,t){var n,r=pa(e),i=!1,a=p(t);try{for(a.s();!(n=a.n()).done;){var o=n.value,u=o.query,s=r.queries.get(u);if(s){var l,c=p(s.listeners);try{for(c.s();!(l=c.n()).done;){l.value.Pu(o)&&(i=!0)}}catch(f){c.e(f)}finally{c.f()}s.Au=o}}}catch(f){a.e(f)}finally{a.f()}i&&af(r)}function rf(e,t,n){var r=pa(e),i=r.queries.get(t);if(i){var a,o=p(i.listeners);try{for(o.s();!(a=o.n()).done;){a.value.onError(n)}}catch(u){o.e(u)}finally{o.f()}}r.queries.delete(t)}function af(e){e.Ru.forEach((function(e){e.next()}))}var of=function(){function e(t,n,r){v(this,e),this.query=t,this.vu=n,this.Vu=!1,this.Su=null,this.onlineState="Unknown",this.options=r||{}}return m(e,[{key:"Pu",value:function(e){if(!this.options.includeMetadataChanges){var t,n=[],r=p(e.docChanges);try{for(r.s();!(t=r.n()).done;){var i=t.value;3!==i.type&&n.push(i)}}catch(o){r.e(o)}finally{r.f()}e=new $c(e.query,e.docs,e.oldDocs,n,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0,e.hasCachedResults)}var a=!1;return this.Vu?this.Du(e)&&(this.vu.next(e),a=!0):this.Cu(e,this.onlineState)&&(this.xu(e),a=!0),this.Su=e,a}},{key:"onError",value:function(e){this.vu.error(e)}},{key:"bu",value:function(e){this.onlineState=e;var t=!1;return this.Su&&!this.Vu&&this.Cu(this.Su,e)&&(this.xu(this.Su),t=!0),t}},{key:"Cu",value:function(e,t){if(!e.fromCache)return!0;var n="Offline"!==t;return(!this.options.Nu||!n)&&(!e.docs.isEmpty()||e.hasCachedResults||"Offline"===t)}},{key:"Du",value:function(e){if(e.docChanges.length>0)return!0;var t=this.Su&&this.Su.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!t)&&!0===this.options.includeMetadataChanges}},{key:"xu",value:function(e){e=$c.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache,e.hasCachedResults),this.Vu=!0,this.vu.next(e)}}]),e}();var uf=m((function e(t){v(this,e),this.key=t})),sf=m((function e(t){v(this,e),this.key=t})),lf=function(){function e(t,n){v(this,e),this.query=t,this.Uu=n,this.qu=null,this.hasCachedResults=!1,this.current=!1,this.Ku=fs(),this.mutatedKeys=fs(),this.Gu=yu(t),this.Qu=new Wc(this.Gu)}return m(e,[{key:"ju",get:function(){return this.Uu}},{key:"Wu",value:function(e,t){var n=this,r=t?t.zu:new Gc,i=t?t.Qu:this.Qu,a=t?t.mutatedKeys:this.mutatedKeys,o=i,u=!1,s="F"===this.query.limitType&&i.size===this.query.limit?i.last():null,l="L"===this.query.limitType&&i.size===this.query.limit?i.first():null;if(e.inorderTraversal((function(e,t){var c=i.get(e),f=pu(n.query,t)?t:null,h=!!c&&n.mutatedKeys.has(c.key),d=!!f&&(f.hasLocalMutations||n.mutatedKeys.has(f.key)&&f.hasCommittedMutations),p=!1;c&&f?c.data.isEqual(f.data)?h!==d&&(r.track({type:3,doc:f}),p=!0):n.Hu(c,f)||(r.track({type:2,doc:f}),p=!0,(s&&n.Gu(f,s)>0||l&&n.Gu(f,l)<0)&&(u=!0)):!c&&f?(r.track({type:0,doc:f}),p=!0):c&&!f&&(r.track({type:1,doc:c}),p=!0,(s||l)&&(u=!0)),p&&(f?(o=o.add(f),a=d?a.add(e):a.delete(e)):(o=o.delete(e),a=a.delete(e)))})),null!==this.query.limit)for(;o.size>this.query.limit;){var c="F"===this.query.limitType?o.last():o.first();o=o.delete(c.key),a=a.delete(c.key),r.track({type:1,doc:c})}return{Qu:o,zu:r,$i:u,mutatedKeys:a}}},{key:"Hu",value:function(e,t){return e.hasLocalMutations&&t.hasCommittedMutations&&!t.hasLocalMutations}},{key:"applyChanges",value:function(e,t,n){var r=this,i=this.Qu;this.Qu=e.Qu,this.mutatedKeys=e.mutatedKeys;var a=e.zu.Eu();a.sort((function(e,t){return function(e,t){var n=function(e){switch(e){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return ha()}};return n(e)-n(t)}(e.type,t.type)||r.Gu(e.doc,t.doc)})),this.Ju(n);var o=t?this.Yu():[],u=0===this.Ku.size&&this.current?1:0,s=u!==this.qu;return this.qu=u,0!==a.length||s?{snapshot:new $c(this.query,e.Qu,i,a,e.mutatedKeys,0===u,s,!1,!!n&&n.resumeToken.approximateByteSize()>0),Xu:o}:{Xu:o}}},{key:"bu",value:function(e){return this.current&&"Offline"===e?(this.current=!1,this.applyChanges({Qu:this.Qu,zu:new Gc,mutatedKeys:this.mutatedKeys,$i:!1},!1)):{Xu:[]}}},{key:"Zu",value:function(e){return!this.Uu.has(e)&&!!this.Qu.has(e)&&!this.Qu.get(e).hasLocalMutations}},{key:"Ju",value:function(e){var t=this;e&&(e.addedDocuments.forEach((function(e){return t.Uu=t.Uu.add(e)})),e.modifiedDocuments.forEach((function(e){})),e.removedDocuments.forEach((function(e){return t.Uu=t.Uu.delete(e)})),this.current=e.current)}},{key:"Yu",value:function(){var e=this;if(!this.current)return[];var t=this.Ku;this.Ku=fs(),this.Qu.forEach((function(t){e.Zu(t.key)&&(e.Ku=e.Ku.add(t.key))}));var n=[];return t.forEach((function(t){e.Ku.has(t)||n.push(new sf(t))})),this.Ku.forEach((function(e){t.has(e)||n.push(new uf(e))})),n}},{key:"tc",value:function(e){this.Uu=e.Hi,this.Ku=fs();var t=this.Wu(e.documents);return this.applyChanges(t,!0)}},{key:"ec",value:function(){return $c.fromInitialDocuments(this.query,this.Qu,this.mutatedKeys,0===this.qu,this.hasCachedResults)}}]),e}(),cf=m((function e(t,n,r){v(this,e),this.query=t,this.targetId=n,this.view=r})),ff=m((function e(t){v(this,e),this.key=t,this.nc=!1})),hf=function(){function e(t,n,r,i,a,o){v(this,e),this.localStore=t,this.remoteStore=n,this.eventManager=r,this.sharedClientState=i,this.currentUser=a,this.maxConcurrentLimboResolutions=o,this.sc={},this.ic=new es((function(e){return hu(e)}),fu),this.rc=new Map,this.oc=new Set,this.uc=new Ja(Ma.comparator),this.cc=new Map,this.ac=new ml,this.hc={},this.lc=new Map,this.fc=fl.vn(),this.onlineState="Unknown",this.dc=void 0}return m(e,[{key:"isPrimaryClient",get:function(){return!0===this.dc}}]),e}();function df(e,t){return pf.apply(this,arguments)}function pf(){return pf=l(u().mark((function e(t,n){var r,i,a,o,s,l;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=Bf(t),!(o=r.ic.get(n))){e.next=6;break}i=o.targetId,r.sharedClientState.addLocalQueryTarget(i),a=o.view.ec(),e.next=15;break;case 6:return e.next=8,Fl(r.localStore,lu(n));case 8:return s=e.sent,r.isPrimaryClient&&sc(r.remoteStore,s),l=r.sharedClientState.addLocalQueryTarget(s.targetId),i=s.targetId,e.next=14,vf(r,n,i,"current"===l,s.resumeToken);case 14:a=e.sent;case 15:return e.abrupt("return",a);case 16:case"end":return e.stop()}}),e)}))),pf.apply(this,arguments)}function vf(e,t,n,r,i){return yf.apply(this,arguments)}function yf(){return yf=l(u().mark((function e(t,n,r,i,a){var o,s,c,f,h,d;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t._c=function(e,n,r){return function(){var e=l(u().mark((function e(t,n,r,i){var a,o,s;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=n.view.Wu(r),e.t0=a.$i,!e.t0){e.next=6;break}return e.next=5,jl(t.localStore,n.query,!1).then((function(e){var t=e.documents;return n.view.Wu(t,a)}));case 5:a=e.sent;case 6:return o=i&&i.targetChanges.get(n.targetId),s=n.view.applyChanges(a,t.isPrimaryClient,o),e.abrupt("return",(Rf(t,n.targetId,s.Xu),s.snapshot));case 8:case"end":return e.stop()}}),e)})));return function(t,n,r,i){return e.apply(this,arguments)}}()(t,e,n,r)},e.next=3,jl(t.localStore,n,!0);case 3:return o=e.sent,s=new lf(n,o.Hi),c=s.Wu(o.documents),f=vs.createSynthesizedTargetChangeForCurrentChange(r,i&&"Offline"!==t.onlineState,a),h=s.applyChanges(c,t.isPrimaryClient,f),Rf(t,r,h.Xu),d=new cf(n,r,s),e.abrupt("return",(t.ic.set(n,d),t.rc.has(r)?t.rc.get(r).push(n):t.rc.set(r,[n]),h.snapshot));case 11:case"end":return e.stop()}}),e)}))),yf.apply(this,arguments)}function mf(e,t){return gf.apply(this,arguments)}function gf(){return gf=l(u().mark((function e(t,n){var r,i,a;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=pa(t),i=r.ic.get(n),!((a=r.rc.get(i.targetId)).length>1)){e.next=3;break}return e.abrupt("return",(r.rc.set(i.targetId,a.filter((function(e){return!fu(e,n)}))),void r.ic.delete(n)));case 3:if(!r.isPrimaryClient){e.next=11;break}if(r.sharedClientState.removeLocalQueryTarget(i.targetId),e.t0=r.sharedClientState.isActiveQueryTarget(i.targetId),e.t0){e.next=9;break}return e.next=9,Vl(r.localStore,i.targetId,!1).then((function(){r.sharedClientState.clearQueryState(i.targetId),lc(r.remoteStore,i.targetId),Lf(r,i.targetId)})).catch(Ha);case 9:e.next=14;break;case 11:return Lf(r,i.targetId),e.next=14,Vl(r.localStore,i.targetId,!0);case 14:case"end":return e.stop()}}),e)}))),gf.apply(this,arguments)}function kf(e,t,n){return bf.apply(this,arguments)}function bf(){return bf=l(u().mark((function e(t,n,r){var i,a,o;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=qf(t),e.prev=1,e.next=4,function(e,t){var n,r,i=pa(e),a=Da.now(),o=t.reduce((function(e,t){return e.add(t.key)}),fs());return i.persistence.runTransaction("Locally write mutations","readwrite",(function(e){var u=ns(),s=fs();return i.Gi.getEntries(e,o).next((function(e){(u=e).forEach((function(e,t){t.isValidDocument()||(s=s.add(e))}))})).next((function(){return i.localDocuments.getOverlayedDocuments(e,u)})).next((function(r){n=r;var o,u=[],s=p(t);try{for(s.s();!(o=s.n()).done;){var l=o.value,c=ju(l,n.get(l.key).overlayedDocument);null!=c&&u.push(new qu(l.key,c,Ro(c.value.mapValue),Ru.exists(!0)))}}catch(f){s.e(f)}finally{s.f()}return i.mutationQueue.addMutationBatch(e,a,u,t)})).next((function(t){r=t;var a=t.applyToLocalDocumentSet(n,s);return i.documentOverlayCache.saveOverlays(e,t.batchId,a)}))})).then((function(){return{batchId:r.batchId,changes:as(n)}}))}(i.localStore,n);case 4:return a=e.sent,i.sharedClientState.addPendingMutation(a.batchId),function(e,t,n){var r=e.hc[e.currentUser.toKey()];r||(r=new Ja(Ia)),r=r.insert(t,n),e.hc[e.currentUser.toKey()]=r}(i,a.batchId,r),e.next=9,Ff(i,a.changes);case 9:return e.next=11,Tc(i.remoteStore);case 11:e.next=17;break;case 13:e.prev=13,e.t0=e.catch(1),o=Qc(e.t0,"Failed to persist write"),r.reject(o);case 17:case"end":return e.stop()}}),e,null,[[1,13]])}))),bf.apply(this,arguments)}function wf(e,t){return Ef.apply(this,arguments)}function Ef(){return Ef=l(u().mark((function e(t,n){var r,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=pa(t),e.prev=1,e.next=4,Rl(r.localStore,n);case 4:return i=e.sent,n.targetChanges.forEach((function(e,t){var n=r.cc.get(t);n&&(da(e.addedDocuments.size+e.modifiedDocuments.size+e.removedDocuments.size<=1),e.addedDocuments.size>0?n.nc=!0:e.modifiedDocuments.size>0?da(n.nc):e.removedDocuments.size>0&&(da(n.nc),n.nc=!1))})),e.next=8,Ff(r,i,n);case 8:e.next=14;break;case 10:return e.prev=10,e.t0=e.catch(1),e.next=14,Ha(e.t0);case 14:case"end":return e.stop()}}),e,null,[[1,10]])}))),Ef.apply(this,arguments)}function Sf(e,t,n){var r=pa(e);if(r.isPrimaryClient&&0===n||!r.isPrimaryClient&&1===n){var i=[];r.ic.forEach((function(e,n){var r=n.view.bu(t);r.snapshot&&i.push(r.snapshot)})),function(e,t){var n=pa(e);n.onlineState=t;var r=!1;n.queries.forEach((function(e,n){var i,a=p(n.listeners);try{for(a.s();!(i=a.n()).done;){i.value.bu(t)&&(r=!0)}}catch(o){a.e(o)}finally{a.f()}})),r&&af(n)}(r.eventManager,t),i.length&&r.sc.Wo(i),r.onlineState=t,r.isPrimaryClient&&r.sharedClientState.setOnlineState(t)}}function xf(e,t,n){return Tf.apply(this,arguments)}function Tf(){return Tf=l(u().mark((function e(t,n,r){var i,a,o,s,l,c;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((i=pa(t)).sharedClientState.updateQueryState(n,"rejected",r),a=i.cc.get(n),!(o=a&&a.key)){e.next=14;break}return s=(s=new Ja(Ma.comparator)).insert(o,Po.newNoDocument(o,Aa.min())),l=fs().add(o),c=new ps(Aa.min(),new Map,new to(Ia),s,l),e.next=9,wf(i,c);case 9:i.uc=i.uc.remove(o),i.cc.delete(n),Mf(i),e.next=16;break;case 14:return e.next=16,Vl(i.localStore,n,!1).then((function(){return Lf(i,n,r)})).catch(Ha);case 16:case"end":return e.stop()}}),e)}))),Tf.apply(this,arguments)}function Cf(e,t){return _f.apply(this,arguments)}function _f(){return _f=l(u().mark((function e(t,n){var r,i,a;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=pa(t),i=n.batch.batchId,e.prev=1,e.next=4,Ll(r.localStore,n);case 4:return a=e.sent,Af(r,i,null),Df(r,i),r.sharedClientState.updateMutationState(i,"acknowledged"),e.next=10,Ff(r,a);case 10:e.next=16;break;case 12:return e.prev=12,e.t0=e.catch(1),e.next=16,Ha(e.t0);case 16:case"end":return e.stop()}}),e,null,[[1,12]])}))),_f.apply(this,arguments)}function If(e,t,n){return Nf.apply(this,arguments)}function Nf(){return Nf=l(u().mark((function e(t,n,r){var i,a;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=pa(t),e.prev=1,e.next=4,function(e,t){var n=pa(e);return n.persistence.runTransaction("Reject batch","readwrite-primary",(function(e){var r;return n.mutationQueue.lookupMutationBatch(e,t).next((function(t){return da(null!==t),r=t.keys(),n.mutationQueue.removeMutationBatch(e,t)})).next((function(){return n.mutationQueue.performConsistencyCheck(e)})).next((function(){return n.documentOverlayCache.removeOverlaysForBatchId(e,r,t)})).next((function(){return n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(e,r)})).next((function(){return n.localDocuments.getDocuments(e,r)}))}))}(i.localStore,n);case 4:return a=e.sent,Af(i,n,r),Df(i,n),i.sharedClientState.updateMutationState(n,"rejected",r),e.next=10,Ff(i,a);case 10:e.next=16;break;case 12:return e.prev=12,e.t0=e.catch(1),e.next=16,Ha(e.t0);case 16:case"end":return e.stop()}}),e,null,[[1,12]])}))),Nf.apply(this,arguments)}function Df(e,t){(e.lc.get(t)||[]).forEach((function(e){e.resolve()})),e.lc.delete(t)}function Af(e,t,n){var r=pa(e),i=r.hc[r.currentUser.toKey()];if(i){var a=i.get(t);a&&(n?a.reject(n):a.resolve(),i=i.remove(t)),r.hc[r.currentUser.toKey()]=i}}function Lf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;e.sharedClientState.removeLocalQueryTarget(t);var r,i=p(e.rc.get(t));try{for(i.s();!(r=i.n()).done;){var a=r.value;e.ic.delete(a),n&&e.sc.wc(a,n)}}catch(o){i.e(o)}finally{i.f()}e.rc.delete(t),e.isPrimaryClient&&e.ac.ls(t).forEach((function(t){e.ac.containsKey(t)||Of(e,t)}))}function Of(e,t){e.oc.delete(t.path.canonicalString());var n=e.uc.get(t);null!==n&&(lc(e.remoteStore,n),e.uc=e.uc.remove(t),e.cc.delete(n),Mf(e))}function Rf(e,t,n){var r,i=p(n);try{for(i.s();!(r=i.n()).done;){var a=r.value;a instanceof uf?(e.ac.addReference(a.key,t),Pf(e,a)):a instanceof sf?(sa("SyncEngine","Document no longer in limbo: "+a.key),e.ac.removeReference(a.key,t),e.ac.containsKey(a.key)||Of(e,a.key)):ha()}}catch(o){i.e(o)}finally{i.f()}}function Pf(e,t){var n=t.key,r=n.path.canonicalString();e.uc.get(n)||e.oc.has(r)||(sa("SyncEngine","New document in limbo: "+n),e.oc.add(r),Mf(e))}function Mf(e){for(;e.oc.size>0&&e.uc.size<e.maxConcurrentLimboResolutions;){var t=e.oc.values().next().value;e.oc.delete(t);var n=new Ma(Oa.fromString(t)),r=e.fc.next();e.cc.set(r,new ff(n)),e.uc=e.uc.insert(n,r),sc(e.remoteStore,new il(lu(ru(n.path)),r,2,Ga.at))}}function Ff(e,t,n){return Vf.apply(this,arguments)}function Vf(){return Vf=l(u().mark((function e(t,n,r){var i,a,o,s;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=pa(t),a=[],o=[],s=[],e.t0=i.ic.isEmpty(),e.t0){e.next=9;break}return i.ic.forEach((function(e,t){s.push(i._c(t,n,r).then((function(e){if((e||r)&&i.isPrimaryClient&&i.sharedClientState.updateQueryState(t.targetId,(null==e?void 0:e.fromCache)?"not-current":"current"),e){a.push(e);var n=Cl.Ci(t.targetId,e);o.push(n)}})))})),e.next=6,Promise.all(s);case 6:return i.sc.Wo(a),e.next=9,function(){var e=l(u().mark((function e(t,n){var r,i,a,o,s,l,c,f;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=pa(t),e.prev=1,e.next=4,r.persistence.runTransaction("notifyLocalViewChanges","readwrite",(function(e){return Qa.forEach(n,(function(t){return Qa.forEach(t.Si,(function(n){return r.persistence.referenceDelegate.addReference(e,t.targetId,n)})).next((function(){return Qa.forEach(t.Di,(function(n){return r.persistence.referenceDelegate.removeReference(e,t.targetId,n)}))}))}))}));case 4:e.next=11;break;case 6:if(e.prev=6,e.t0=e.catch(1),Wa(e.t0)){e.next=10;break}throw e.t0;case 10:sa("LocalStore","Failed to update sequence numbers: "+e.t0);case 11:i=p(n);try{for(i.s();!(a=i.n()).done;)o=a.value,s=o.targetId,o.fromCache||(l=r.Ui.get(s),c=l.snapshotVersion,f=l.withLastLimboFreeSnapshotVersion(c),r.Ui=r.Ui.insert(s,f))}catch(u){i.e(u)}finally{i.f()}case 13:case"end":return e.stop()}}),e,null,[[1,6]])})));return function(t,n){return e.apply(this,arguments)}}()(i.localStore,o);case 9:case"end":return e.stop()}}),e)}))),Vf.apply(this,arguments)}function Uf(e,t){return jf.apply(this,arguments)}function jf(){return jf=l(u().mark((function e(t,n){var r,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((r=pa(t)).currentUser.isEqual(n)){e.next=11;break}return sa("SyncEngine","User change. New user:",n.toKey()),e.next=5,Dl(r.localStore,n);case 5:return i=e.sent,r.currentUser=n,function(e,t){e.lc.forEach((function(e){e.forEach((function(e){e.reject(new ya(va.CANCELLED,"'waitForPendingWrites' promise is rejected due to a user change."))}))})),e.lc.clear()}(r),r.sharedClientState.handleUserChange(n,i.removedBatchIds,i.addedBatchIds),e.next=11,Ff(r,i.ji);case 11:case"end":return e.stop()}}),e)}))),jf.apply(this,arguments)}function zf(e,t){var n=pa(e),r=n.cc.get(t);if(r&&r.nc)return fs().add(r.key);var i=fs(),a=n.rc.get(t);if(!a)return i;var o,u=p(a);try{for(u.s();!(o=u.n()).done;){var s=o.value,l=n.ic.get(s);i=i.unionWith(l.view.ju)}}catch(c){u.e(c)}finally{u.f()}return i}function Bf(e){var t=pa(e);return t.remoteStore.remoteSyncer.applyRemoteEvent=wf.bind(null,t),t.remoteStore.remoteSyncer.getRemoteKeysForTarget=zf.bind(null,t),t.remoteStore.remoteSyncer.rejectListen=xf.bind(null,t),t.sc.Wo=nf.bind(null,t.eventManager),t.sc.wc=rf.bind(null,t.eventManager),t}function qf(e){var t=pa(e);return t.remoteStore.remoteSyncer.applySuccessfulWrite=Cf.bind(null,t),t.remoteStore.remoteSyncer.rejectFailedWrite=If.bind(null,t),t}var Hf=function(){function e(){v(this,e),this.synchronizeTabs=!1}return m(e,[{key:"initialize",value:function(){var e=l(u().mark((function e(t){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.It=Xl(t.databaseInfo.databaseId),this.sharedClientState=this.gc(t),this.persistence=this.yc(t),e.next=5,this.persistence.start();case 5:this.localStore=this.Ic(t),this.gcScheduler=this.Tc(t,this.localStore),this.indexBackfillerScheduler=this.Ec(t,this.localStore);case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"Tc",value:function(e,t){return null}},{key:"Ec",value:function(e,t){return null}},{key:"Ic",value:function(e){return Nl(this.persistence,new _l,e.initialUser,this.It)}},{key:"yc",value:function(e){return new Sl(Tl.Bs,this.It)}},{key:"gc",value:function(e){return new ql}},{key:"terminate",value:function(){var e=l(u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.gcScheduler&&this.gcScheduler.stop(),e.next=3,this.sharedClientState.shutdown();case 3:return e.next=5,this.persistence.shutdown();case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}(),Kf=function(){function e(){v(this,e)}return m(e,[{key:"initialize",value:function(){var e=l(u().mark((function e(t,n){var r=this;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=this.localStore,e.t0){e.next=12;break}return this.localStore=t.localStore,this.sharedClientState=t.sharedClientState,this.datastore=this.createDatastore(n),this.remoteStore=this.createRemoteStore(n),this.eventManager=this.createEventManager(n),this.syncEngine=this.createSyncEngine(n,!t.synchronizeTabs),this.sharedClientState.onlineStateHandler=function(e){return Sf(r.syncEngine,e,1)},this.remoteStore.remoteSyncer.handleCredentialChange=Uf.bind(null,this.syncEngine),e.next=12,zc(this.remoteStore,this.syncEngine.isPrimaryClient);case 12:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"createEventManager",value:function(e){return new Yc}},{key:"createDatastore",value:function(e){var t,n=Xl(e.databaseInfo.databaseId),r=(t=e.databaseInfo,new Gl(t));return function(e,t,n,r){return new tc(e,t,n,r)}(e.authCredentials,e.appCheckCredentials,r,n)}},{key:"createRemoteStore",value:function(e){var t,n,r,i,a,o=this;return t=this.localStore,n=this.datastore,r=e.asyncQueue,i=function(e){return Sf(o.syncEngine,e,0)},a=Kl.C()?new Kl:new Hl,new rc(t,n,r,i,a)}},{key:"createSyncEngine",value:function(e,t){return function(e,t,n,r,i,a,o){var u=new hf(e,t,n,r,i,a);return o&&(u.dc=!0),u}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,e.initialUser,e.maxConcurrentLimboResolutions,t)}},{key:"terminate",value:function(){return function(){var e=l(u().mark((function e(t){var n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=pa(t),sa("RemoteStore","RemoteStore shutting down."),n._u.add(5),e.next=5,oc(n);case 5:n.mu.shutdown(),n.gu.set("Unknown");case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()(this.remoteStore)}}]),e}();function Qf(e,t,n){if(!n)throw new ya(va.INVALID_ARGUMENT,"Function ".concat(e,"() cannot be called with an empty ").concat(t,"."))}function Wf(e){if(!Ma.isDocumentKey(e))throw new ya(va.INVALID_ARGUMENT,"Invalid document reference. Document references must have an even number of segments, but ".concat(e," has ").concat(e.length,"."))}function Gf(e){if(Ma.isDocumentKey(e))throw new ya(va.INVALID_ARGUMENT,"Invalid collection reference. Collection references must have an odd number of segments, but ".concat(e," has ").concat(e.length,"."))}function $f(e){if(void 0===e)return"undefined";if(null===e)return"null";if("string"==typeof e)return e.length>20&&(e="".concat(e.substring(0,20),"...")),JSON.stringify(e);if("number"==typeof e||"boolean"==typeof e)return""+e;if("object"==typeof e){if(e instanceof Array)return"an array";var t=function(e){return e.constructor?e.constructor.name:null}(e);return t?"a custom ".concat(t," object"):"an object"}return"function"==typeof e?"a function":ha()}function Xf(e,t){if("_delegate"in e&&(e=e._delegate),!(e instanceof t)){if(t.name===e.constructor.name)throw new ya(va.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");var n=$f(e);throw new ya(va.INVALID_ARGUMENT,"Expected type '".concat(t.name,"', but it was: ").concat(n))}return e}var Yf=new Map,Jf=function(){function e(t){var n;if(v(this,e),void 0===t.host){if(void 0!==t.ssl)throw new ya(va.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=t.host,this.ssl=null===(n=t.ssl)||void 0===n||n;if(this.credentials=t.credentials,this.ignoreUndefinedProperties=!!t.ignoreUndefinedProperties,void 0===t.cacheSizeBytes)this.cacheSizeBytes=41943040;else{if(-1!==t.cacheSizeBytes&&t.cacheSizeBytes<1048576)throw new ya(va.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=t.cacheSizeBytes}this.experimentalForceLongPolling=!!t.experimentalForceLongPolling,this.experimentalAutoDetectLongPolling=!!t.experimentalAutoDetectLongPolling,this.useFetchStreams=!!t.useFetchStreams,function(e,t,n,r){if(!0===t&&!0===r)throw new ya(va.INVALID_ARGUMENT,"".concat(e," and ").concat(n," cannot be used together."))}("experimentalForceLongPolling",t.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",t.experimentalAutoDetectLongPolling)}return m(e,[{key:"isEqual",value:function(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&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}}]),e}(),Zf=function(){function e(t,n,r,i){v(this,e),this._authCredentials=t,this._appCheckCredentials=n,this._databaseId=r,this._app=i,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new Jf({}),this._settingsFrozen=!1}return m(e,[{key:"app",get:function(){if(!this._app)throw new ya(va.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}},{key:"_initialized",get:function(){return this._settingsFrozen}},{key:"_terminated",get:function(){return void 0!==this._terminateTask}},{key:"_setSettings",value:function(e){if(this._settingsFrozen)throw new ya(va.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 Jf(e),void 0!==e.credentials&&(this._authCredentials=function(e){if(!e)return new ka;switch(e.type){case"gapi":var t=e.client;return new Sa(t,e.sessionIndex||"0",e.iamToken||null,e.authTokenFactory||null);case"provider":return e.client;default:throw new ya(va.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}}(e.credentials))}},{key:"_getSettings",value:function(){return this._settings}},{key:"_freezeSettings",value:function(){return this._settingsFrozen=!0,this._settings}},{key:"_delete",value:function(){return this._terminateTask||(this._terminateTask=this._terminate()),this._terminateTask}},{key:"toJSON",value:function(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}},{key:"_terminate",value:function(){return function(e){var t=Yf.get(e);t&&(sa("ComponentProvider","Removing Datastore"),Yf.delete(e),t.terminate())}(this),Promise.resolve()}}]),e}();function eh(e,t,n){var r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=(e=Xf(e,Zf))._getSettings();if("firestore.googleapis.com"!==a.host&&a.host!==t&&ca("Host has been set in both settings() and useEmulator(), emulator host will be used"),e._setSettings(Object.assign(Object.assign({},a),{host:"".concat(t,":").concat(n),ssl:!1})),i.mockUserToken){var o,u;if("string"==typeof i.mockUserToken)o=i.mockUserToken,u=ia.MOCK_USER;else{o=M(i.mockUserToken,null===(r=e._app)||void 0===r?void 0:r.options.projectId);var s=i.mockUserToken.sub||i.mockUserToken.user_id;if(!s)throw new ya(va.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");u=new ia(s)}e._authCredentials=new ba(new ga(o,u))}}var th=function(){function e(t,n,r){v(this,e),this.converter=n,this._key=r,this.type="document",this.firestore=t}return m(e,[{key:"_path",get:function(){return this._key.path}},{key:"id",get:function(){return this._key.path.lastSegment()}},{key:"path",get:function(){return this._key.path.canonicalString()}},{key:"parent",get:function(){return new rh(this.firestore,this.converter,this._key.path.popLast())}},{key:"withConverter",value:function(t){return new e(this.firestore,t,this._key)}}]),e}(),nh=function(){function e(t,n,r){v(this,e),this.converter=n,this._query=r,this.type="query",this.firestore=t}return m(e,[{key:"withConverter",value:function(t){return new e(this.firestore,t,this._query)}}]),e}(),rh=function(e){b(n,e);var t=x(n);function n(e,r,i){var a;return v(this,n),(a=t.call(this,e,r,ru(i)))._path=i,a.type="collection",a}return m(n,[{key:"id",get:function(){return this._query.path.lastSegment()}},{key:"path",get:function(){return this._query.path.canonicalString()}},{key:"parent",get:function(){var e=this._path.popLast();return e.isEmpty()?null:new th(this.firestore,null,new Ma(e))}},{key:"withConverter",value:function(e){return new n(this.firestore,e,this._path)}}]),n}(nh);function ih(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if(e=q(e),Qf("collection","path",t),e instanceof Zf){var a=Oa.fromString.apply(Oa,[t].concat(r));return Gf(a),new rh(e,null,a)}if(!(e instanceof th||e instanceof rh))throw new ya(va.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");var o=e._path.child(Oa.fromString.apply(Oa,[t].concat(r)));return Gf(o),new rh(e.firestore,null,o)}function ah(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if(e=q(e),1===arguments.length&&(t=_a.R()),Qf("doc","path",t),e instanceof Zf){var a=Oa.fromString.apply(Oa,[t].concat(r));return Wf(a),new th(e,null,new Ma(a))}if(!(e instanceof th||e instanceof rh))throw new ya(va.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");var o=e._path.child(Oa.fromString.apply(Oa,[t].concat(r)));return Wf(o),new th(e.firestore,e instanceof rh?e.converter:null,new Ma(o))}var oh=function(){function e(t){v(this,e),this.observer=t,this.muted=!1}return m(e,[{key:"next",value:function(e){this.observer.next&&this.Rc(this.observer.next,e)}},{key:"error",value:function(e){this.observer.error?this.Rc(this.observer.error,e):la("Uncaught Error in snapshot listener:",e)}},{key:"bc",value:function(){this.muted=!0}},{key:"Rc",value:function(e,t){var n=this;this.muted||setTimeout((function(){n.muted||e(t)}),0)}}]),e}(),uh=function(){function e(t,n,r,i){var a=this;v(this,e),this.authCredentials=t,this.appCheckCredentials=n,this.asyncQueue=r,this.databaseInfo=i,this.user=ia.UNAUTHENTICATED,this.clientId=_a.R(),this.authCredentialListener=function(){return Promise.resolve()},this.appCheckCredentialListener=function(){return Promise.resolve()},this.authCredentials.start(r,function(){var e=l(u().mark((function e(t){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return sa("FirestoreClient","Received user=",t.uid),e.next=3,a.authCredentialListener(t);case 3:a.user=t;case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),this.appCheckCredentials.start(r,(function(e){return sa("FirestoreClient","Received new app check token=",e),a.appCheckCredentialListener(e,a.user)}))}return m(e,[{key:"getConfiguration",value:function(){var e=l(u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100});case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"setCredentialChangeListener",value:function(e){this.authCredentialListener=e}},{key:"setAppCheckTokenChangeListener",value:function(e){this.appCheckCredentialListener=e}},{key:"verifyNotTerminated",value:function(){if(this.asyncQueue.isShuttingDown)throw new ya(va.FAILED_PRECONDITION,"The client has already been terminated.")}},{key:"terminate",value:function(){var e=this;this.asyncQueue.enterRestrictedMode();var t=new ma;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(l(u().mark((function n(){var r;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(n.prev=0,n.t0=e.onlineComponents,!n.t0){n.next=5;break}return n.next=5,e.onlineComponents.terminate();case 5:if(n.t1=e.offlineComponents,!n.t1){n.next=9;break}return n.next=9,e.offlineComponents.terminate();case 9:e.authCredentials.shutdown(),e.appCheckCredentials.shutdown(),t.resolve(),n.next=18;break;case 14:n.prev=14,n.t2=n.catch(0),r=Qc(n.t2,"Failed to shutdown persistence"),t.reject(r);case 18:case"end":return n.stop()}}),n,null,[[0,14]])})))),t.promise}}]),e}();function sh(e,t){return lh.apply(this,arguments)}function lh(){return lh=l(u().mark((function e(t,n){var r,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.asyncQueue.verifyOperationInProgress(),sa("FirestoreClient","Initializing OfflineComponentProvider"),e.next=3,t.getConfiguration();case 3:return r=e.sent,e.next=6,n.initialize(r);case 6:i=r.initialUser,t.setCredentialChangeListener(function(){var e=l(u().mark((function e(t){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=i.isEqual(t),e.t0){e.next=5;break}return e.next=4,Dl(n.localStore,t);case 4:i=t;case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),n.persistence.setDatabaseDeletedListener((function(){return t.terminate()})),t.offlineComponents=n;case 8:case"end":return e.stop()}}),e)}))),lh.apply(this,arguments)}function ch(e,t){return fh.apply(this,arguments)}function fh(){return fh=l(u().mark((function e(t,n){var r,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.asyncQueue.verifyOperationInProgress(),e.next=3,hh(t);case 3:return r=e.sent,sa("FirestoreClient","Initializing OnlineComponentProvider"),e.next=7,t.getConfiguration();case 7:return i=e.sent,e.next=10,n.initialize(r,i);case 10:t.setCredentialChangeListener((function(e){return Uc(n.remoteStore,e)})),t.setAppCheckTokenChangeListener((function(e,t){return Uc(n.remoteStore,t)})),t.onlineComponents=n;case 13:case"end":return e.stop()}}),e)}))),fh.apply(this,arguments)}function hh(e){return dh.apply(this,arguments)}function dh(){return dh=l(u().mark((function e(t){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=t.offlineComponents,e.t0){e.next=5;break}return sa("FirestoreClient","Using default OfflineComponentProvider"),e.next=5,sh(t,new Hf);case 5:return e.abrupt("return",t.offlineComponents);case 6:case"end":return e.stop()}}),e)}))),dh.apply(this,arguments)}function ph(e){return vh.apply(this,arguments)}function vh(){return vh=l(u().mark((function e(t){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=t.onlineComponents,e.t0){e.next=5;break}return sa("FirestoreClient","Using default OnlineComponentProvider"),e.next=5,ch(t,new Kf);case 5:return e.abrupt("return",t.onlineComponents);case 6:case"end":return e.stop()}}),e)}))),vh.apply(this,arguments)}function yh(e){return ph(e).then((function(e){return e.syncEngine}))}function mh(e){return gh.apply(this,arguments)}function gh(){return gh=l(u().mark((function e(t){var n,r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ph(t);case 2:return n=e.sent,r=n.eventManager,e.abrupt("return",(r.onListen=df.bind(null,n.syncEngine),r.onUnlisten=mf.bind(null,n.syncEngine),r));case 5:case"end":return e.stop()}}),e)}))),gh.apply(this,arguments)}function kh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=new ma;return e.asyncQueue.enqueueAndForget(l(u().mark((function i(){return u().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.t0=function(e,t,n,r,i){var a=new oh({next:function(a){t.enqueueAndForget((function(){return ef(e,o)}));var u=a.docs.has(n);!u&&a.fromCache?i.reject(new ya(va.UNAVAILABLE,"Failed to get document because the client is offline.")):u&&a.fromCache&&r&&"server"===r.source?i.reject(new ya(va.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.)')):i.resolve(a)},error:function(e){return i.reject(e)}}),o=new of(ru(n.path),a,{includeMetadataChanges:!0,Nu:!0});return Jc(e,o)},i.next=3,mh(e);case 3:return i.t1=i.sent,i.t2=e.asyncQueue,i.t3=t,i.t4=n,i.t5=r,i.abrupt("return",(0,i.t0)(i.t1,i.t2,i.t3,i.t4,i.t5));case 9:case"end":return i.stop()}}),i)})))),r.promise}var bh=function(){function e(){var t=this;v(this,e),this.Bc=Promise.resolve(),this.Lc=[],this.Uc=!1,this.qc=[],this.Kc=null,this.Gc=!1,this.Qc=!1,this.jc=[],this.xo=new Yl(this,"async_queue_retry"),this.Wc=function(){var e=$l();e&&sa("AsyncQueue","Visibility state changed to "+e.visibilityState),t.xo.Po()};var n=$l();n&&"function"==typeof n.addEventListener&&n.addEventListener("visibilitychange",this.Wc)}return m(e,[{key:"isShuttingDown",get:function(){return this.Uc}},{key:"enqueueAndForget",value:function(e){this.enqueue(e)}},{key:"enqueueAndForgetEvenWhileRestricted",value:function(e){this.zc(),this.Hc(e)}},{key:"enterRestrictedMode",value:function(e){if(!this.Uc){this.Uc=!0,this.Qc=e||!1;var t=$l();t&&"function"==typeof t.removeEventListener&&t.removeEventListener("visibilitychange",this.Wc)}}},{key:"enqueue",value:function(e){var t=this;if(this.zc(),this.Uc)return new Promise((function(){}));var n=new ma;return this.Hc((function(){return t.Uc&&t.Qc?Promise.resolve():(e().then(n.resolve,n.reject),n.promise)})).then((function(){return n.promise}))}},{key:"enqueueRetryable",value:function(e){var t=this;this.enqueueAndForget((function(){return t.Lc.push(e),t.Jc()}))}},{key:"Jc",value:function(){var e=l(u().mark((function e(){var t=this;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0===this.Lc.length){e.next=14;break}return e.prev=1,e.next=4,this.Lc[0]();case 4:this.Lc.shift(),this.xo.reset(),e.next=13;break;case 8:if(e.prev=8,e.t0=e.catch(1),Wa(e.t0)){e.next=12;break}throw e.t0;case 12:sa("AsyncQueue","Operation failed with retryable error: "+e.t0);case 13:this.Lc.length>0&&this.xo.Ro((function(){return t.Jc()}));case 14:case"end":return e.stop()}}),e,this,[[1,8]])})));return function(){return e.apply(this,arguments)}}()},{key:"Hc",value:function(e){var t=this,n=this.Bc.then((function(){return t.Gc=!0,e().catch((function(e){t.Kc=e,t.Gc=!1;var n=function(e){var t=e.message||"";return e.stack&&(t=e.stack.includes(e.message)?e.stack:e.message+"\n"+e.stack),t}(e);throw la("INTERNAL UNHANDLED ERROR: ",n),e})).then((function(e){return t.Gc=!1,e}))}));return this.Bc=n,n}},{key:"enqueueAfterDelay",value:function(e,t,n){var r=this;this.zc(),this.jc.indexOf(e)>-1&&(t=0);var i=Kc.createAndSchedule(this,e,t,n,(function(e){return r.Yc(e)}));return this.qc.push(i),i}},{key:"zc",value:function(){this.Kc&&ha()}},{key:"verifyOperationInProgress",value:function(){}},{key:"Xc",value:function(){var e=l(u().mark((function e(){var t;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.Bc,e.next=3,t;case 3:if(t!==this.Bc){e.next=0;break}case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"Zc",value:function(e){var t,n=p(this.qc);try{for(n.s();!(t=n.n()).done;){if(t.value.timerId===e)return!0}}catch(r){n.e(r)}finally{n.f()}return!1}},{key:"ta",value:function(e){var t=this;return this.Xc().then((function(){t.qc.sort((function(e,t){return e.targetTimeMs-t.targetTimeMs}));var n,r=p(t.qc);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.skipDelay(),"all"!==e&&i.timerId===e)break}}catch(a){r.e(a)}finally{r.f()}return t.Xc()}))}},{key:"ea",value:function(e){this.jc.push(e)}},{key:"Yc",value:function(e){var t=this.qc.indexOf(e);this.qc.splice(t,1)}}]),e}();function wh(e){return function(e,t){if("object"!=typeof e||null===e)return!1;var n,r=e,i=p(["next","error","complete"]);try{for(i.s();!(n=i.n()).done;){var a=n.value;if(a in r&&"function"==typeof r[a])return!0}}catch(o){i.e(o)}finally{i.f()}return!1}(e)}var Eh=function(e){b(n,e);var t=x(n);function n(e,r,i,a){var o;return v(this,n),(o=t.call(this,e,r,i,a)).type="firestore",o._queue=new bh,o._persistenceKey=(null==a?void 0:a.name)||"[DEFAULT]",o}return m(n,[{key:"_terminate",value:function(){return this._firestoreClient||xh(this),this._firestoreClient.terminate()}}]),n}(Zf);function Sh(e){return e._firestoreClient||xh(e),e._firestoreClient.verifyNotTerminated(),e._firestoreClient}function xh(e){var t,n=e._freezeSettings(),r=function(e,t,n,r){return new ho(e,t,n,r.host,r.ssl,r.experimentalForceLongPolling,r.experimentalAutoDetectLongPolling,r.useFetchStreams)}(e._databaseId,(null===(t=e._app)||void 0===t?void 0:t.options.appId)||"",e._persistenceKey,n);e._firestoreClient=new uh(e._authCredentials,e._appCheckCredentials,e._queue,r)}var Th=function(){function e(t){v(this,e),this._byteString=t}return m(e,[{key:"toBase64",value:function(){return this._byteString.toBase64()}},{key:"toUint8Array",value:function(){return this._byteString.toUint8Array()}},{key:"toString",value:function(){return"Bytes(base64: "+this.toBase64()+")"}},{key:"isEqual",value:function(e){return this._byteString.isEqual(e._byteString)}}],[{key:"fromBase64String",value:function(t){try{return new e(io.fromBase64String(t))}catch(t){throw new ya(va.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+t)}}},{key:"fromUint8Array",value:function(t){return new e(io.fromUint8Array(t))}}]),e}(),Ch=function(){function e(){v(this,e);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(var i=0;i<n.length;++i)if(0===n[i].length)throw new ya(va.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new Pa(n)}return m(e,[{key:"isEqual",value:function(e){return this._internalPath.isEqual(e._internalPath)}}]),e}();var _h=m((function e(t){v(this,e),this._methodName=t})),Ih=function(){function e(t,n){if(v(this,e),!isFinite(t)||t<-90||t>90)throw new ya(va.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+t);if(!isFinite(n)||n<-180||n>180)throw new ya(va.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+n);this._lat=t,this._long=n}return m(e,[{key:"latitude",get:function(){return this._lat}},{key:"longitude",get:function(){return this._long}},{key:"isEqual",value:function(e){return this._lat===e._lat&&this._long===e._long}},{key:"toJSON",value:function(){return{latitude:this._lat,longitude:this._long}}},{key:"_compareTo",value:function(e){return Ia(this._lat,e._lat)||Ia(this._long,e._long)}}]),e}(),Nh=/^__.*__$/,Dh=function(){function e(t,n,r){v(this,e),this.data=t,this.fieldMask=n,this.fieldTransforms=r}return m(e,[{key:"toMutation",value:function(e,t){return null!==this.fieldMask?new qu(e,this.data,this.fieldMask,t,this.fieldTransforms):new Bu(e,this.data,t,this.fieldTransforms)}}]),e}();function Ah(e){switch(e){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw ha()}}var Lh=function(){function e(t,n,r,i,a,o){v(this,e),this.settings=t,this.databaseId=n,this.It=r,this.ignoreUndefinedProperties=i,void 0===a&&this.na(),this.fieldTransforms=a||[],this.fieldMask=o||[]}return m(e,[{key:"path",get:function(){return this.settings.path}},{key:"sa",get:function(){return this.settings.sa}},{key:"ia",value:function(t){return new e(Object.assign(Object.assign({},this.settings),t),this.databaseId,this.It,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}},{key:"ra",value:function(e){var t,n=null===(t=this.path)||void 0===t?void 0:t.child(e),r=this.ia({path:n,oa:!1});return r.ua(e),r}},{key:"ca",value:function(e){var t,n=null===(t=this.path)||void 0===t?void 0:t.child(e),r=this.ia({path:n,oa:!1});return r.na(),r}},{key:"aa",value:function(e){return this.ia({path:void 0,oa:!0})}},{key:"ha",value:function(e){return qh(e,this.settings.methodName,this.settings.la||!1,this.path,this.settings.fa)}},{key:"contains",value:function(e){return void 0!==this.fieldMask.find((function(t){return e.isPrefixOf(t)}))||void 0!==this.fieldTransforms.find((function(t){return e.isPrefixOf(t.field)}))}},{key:"na",value:function(){if(this.path)for(var e=0;e<this.path.length;e++)this.ua(this.path.get(e))}},{key:"ua",value:function(e){if(0===e.length)throw this.ha("Document fields must not be empty");if(Ah(this.sa)&&Nh.test(e))throw this.ha('Document fields cannot begin and end with "__"')}}]),e}(),Oh=function(){function e(t,n,r){v(this,e),this.databaseId=t,this.ignoreUndefinedProperties=n,this.It=r||Xl(t)}return m(e,[{key:"da",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return new Lh({sa:e,methodName:t,fa:n,path:Pa.emptyPath(),oa:!1,la:r},this.databaseId,this.It,this.ignoreUndefinedProperties)}}]),e}();function Rh(e){var t=e._freezeSettings(),n=Xl(e._databaseId);return new Oh(e._databaseId,!!t.ignoreUndefinedProperties,n)}function Ph(e,t,n,r,i){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},o=e.da(a.merge||a.mergeFields?2:0,t,n,i);Uh("Data must be an object, but it was:",o,r);var u,s,l=Fh(r,o);if(a.merge)u=new ro(o.fieldMask),s=o.fieldTransforms;else if(a.mergeFields){var c,f=[],h=p(a.mergeFields);try{for(h.s();!(c=h.n()).done;){var d=c.value,v=jh(t,d,n);if(!o.contains(v))throw new ya(va.INVALID_ARGUMENT,"Field '".concat(v,"' is specified in your field mask but missing from your input data."));Hh(f,v)||f.push(v)}}catch(y){h.e(y)}finally{h.f()}u=new ro(f),s=o.fieldTransforms.filter((function(e){return u.covers(e.field)}))}else u=null,s=o.fieldTransforms;return new Dh(new Oo(l),u,s)}function Mh(e,t){if(Vh(e=q(e)))return Uh("Unsupported field value:",t,e),Fh(e,t);if(e instanceof _h)return function(e,t){if(!Ah(t.sa))throw t.ha("".concat(e._methodName,"() can only be used with update() and set()"));if(!t.path)throw t.ha("".concat(e._methodName,"() is not currently supported inside arrays"));var n=e._toFieldTransform(t);n&&t.fieldTransforms.push(n)}(e,t),null;if(void 0===e&&t.ignoreUndefinedProperties)return null;if(t.path&&t.fieldMask.push(t.path),e instanceof Array){if(t.settings.oa&&4!==t.sa)throw t.ha("Nested arrays are not supported");return function(e,t){var n,r=[],i=0,a=p(e);try{for(a.s();!(n=a.n()).done;){var o=Mh(n.value,t.aa(i));null==o&&(o={nullValue:"NULL_VALUE"}),r.push(o),i++}}catch(u){a.e(u)}finally{a.f()}return{arrayValue:{values:r}}}(e,t)}return function(e,t){if(null===(e=q(e)))return{nullValue:"NULL_VALUE"};if("number"==typeof e)return bu(t.It,e);if("boolean"==typeof e)return{booleanValue:e};if("string"==typeof e)return{stringValue:e};if(e instanceof Date){var n=Da.fromDate(e);return{timestampValue:Cs(t.It,n)}}if(e instanceof Da){var r=new Da(e.seconds,1e3*Math.floor(e.nanoseconds/1e3));return{timestampValue:Cs(t.It,r)}}if(e instanceof Ih)return{geoPointValue:{latitude:e.latitude,longitude:e.longitude}};if(e instanceof Th)return{bytesValue:_s(t.It,e._byteString)};if(e instanceof th){var i=t.databaseId,a=e.firestore._databaseId;if(!a.isEqual(i))throw t.ha("Document reference is for database ".concat(a.projectId,"/").concat(a.database," but should be for database ").concat(i.projectId,"/").concat(i.database));return{referenceValue:Ds(e.firestore._databaseId||t.databaseId,e._key.path)}}throw t.ha("Unsupported field value: ".concat($f(e)))}(e,t)}function Fh(e,t){var n={};return Ya(e)?t.path&&t.path.length>0&&t.fieldMask.push(t.path):Xa(e,(function(e,r){var i=Mh(r,t.ra(e));null!=i&&(n[e]=i)})),{mapValue:{fields:n}}}function Vh(e){return!("object"!=typeof e||null===e||e instanceof Array||e instanceof Date||e instanceof Da||e instanceof Ih||e instanceof Th||e instanceof th||e instanceof _h)}function Uh(e,t,n){if(!Vh(n)||!function(e){return"object"==typeof e&&null!==e&&(Object.getPrototypeOf(e)===Object.prototype||null===Object.getPrototypeOf(e))}(n)){var r=$f(n);throw"an object"===r?t.ha(e+" a custom object"):t.ha(e+" "+r)}}function jh(e,t,n){if((t=q(t))instanceof Ch)return t._internalPath;if("string"==typeof t)return Bh(e,t);throw qh("Field path arguments must be of type string or ",e,!1,void 0,n)}var zh=new RegExp("[~\\*/\\[\\]]");function Bh(e,t,n){if(t.search(zh)>=0)throw qh("Invalid field path (".concat(t,"). Paths must not contain '~', '*', '/', '[', or ']'"),e,!1,void 0,n);try{return T(Ch,a(t.split(".")))._internalPath}catch(r){throw qh("Invalid field path (".concat(t,"). Paths must not be empty, begin with '.', end with '.', or contain '..'"),e,!1,void 0,n)}}function qh(e,t,n,r,i){var a=r&&!r.isEmpty(),o=void 0!==i,u="Function ".concat(t,"() called with invalid data");n&&(u+=" (via `toFirestore()`)"),u+=". ";var s="";return(a||o)&&(s+=" (found",a&&(s+=" in field ".concat(r)),o&&(s+=" in document ".concat(i)),s+=")"),new ya(va.INVALID_ARGUMENT,u+e+s)}function Hh(e,t){return e.some((function(e){return e.isEqual(t)}))}var Kh=function(){function e(t,n,r,i,a){v(this,e),this._firestore=t,this._userDataWriter=n,this._key=r,this._document=i,this._converter=a}return m(e,[{key:"id",get:function(){return this._key.path.lastSegment()}},{key:"ref",get:function(){return new th(this._firestore,this._converter,this._key)}},{key:"exists",value:function(){return null!==this._document}},{key:"data",value:function(){if(this._document){if(this._converter){var e=new Qh(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}}},{key:"get",value:function(e){if(this._document){var t=this._document.data.field(Wh("DocumentSnapshot.get",e));if(null!==t)return this._userDataWriter.convertValue(t)}}}]),e}(),Qh=function(e){b(n,e);var t=x(n);function n(){return v(this,n),t.apply(this,arguments)}return m(n,[{key:"data",value:function(){return Ye(w(n.prototype),"data",this).call(this)}}]),n}(Kh);function Wh(e,t){return"string"==typeof t?Bh(e,t):t instanceof Ch?t._internalPath:t._delegate._internalPath}function Gh(e){if("L"===e.limitType&&0===e.explicitOrderBy.length)throw new ya(va.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}var $h=function(){function e(){v(this,e)}return m(e,[{key:"convertValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none";switch(ko(e)){case 0:return null;case 1:return e.booleanValue;case 2:return uo(e.integerValue||e.doubleValue);case 3:return this.convertTimestamp(e.timestampValue);case 4:return this.convertServerTimestamp(e,t);case 5:return e.stringValue;case 6:return this.convertBytes(so(e.bytesValue));case 7:return this.convertReference(e.referenceValue);case 8:return this.convertGeoPoint(e.geoPointValue);case 9:return this.convertArray(e.arrayValue,t);case 10:return this.convertObject(e.mapValue,t);default:throw ha()}}},{key:"convertObject",value:function(e,t){var n=this,r={};return Xa(e.fields,(function(e,i){r[e]=n.convertValue(i,t)})),r}},{key:"convertGeoPoint",value:function(e){return new Ih(uo(e.latitude),uo(e.longitude))}},{key:"convertArray",value:function(e,t){var n=this;return(e.values||[]).map((function(e){return n.convertValue(e,t)}))}},{key:"convertServerTimestamp",value:function(e,t){switch(t){case"previous":var n=co(e);return null==n?null:this.convertValue(n,t);case"estimate":return this.convertTimestamp(fo(e));default:return null}}},{key:"convertTimestamp",value:function(e){var t=oo(e);return new Da(t.seconds,t.nanos)}},{key:"convertDocumentKey",value:function(e,t){var n=Oa.fromString(e);da(Ys(n));var r=new po(n.get(1),n.get(3)),i=new Ma(n.popFirst(5));return r.isEqual(t)||la("Document ".concat(i," contains a document reference within a different database (").concat(r.projectId,"/").concat(r.database,") which is not supported. It will be treated as a reference in the current database (").concat(t.projectId,"/").concat(t.database,") instead.")),i}}]),e}();function Xh(e,t,n){return e?n&&(n.merge||n.mergeFields)?e.toFirestore(t,n):e.toFirestore(t):t}var Yh=function(){function e(t,n){v(this,e),this.hasPendingWrites=t,this.fromCache=n}return m(e,[{key:"isEqual",value:function(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}]),e}(),Jh=function(e){b(n,e);var t=x(n);function n(e,r,i,a,o,u){var s;return v(this,n),(s=t.call(this,e,r,i,a,u))._firestore=e,s._firestoreImpl=e,s.metadata=o,s}return m(n,[{key:"exists",value:function(){return Ye(w(n.prototype),"exists",this).call(this)}},{key:"data",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._document){if(this._converter){var t=new Zh(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(t,e)}return this._userDataWriter.convertValue(this._document.data.value,e.serverTimestamps)}}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this._document){var n=this._document.data.field(Wh("DocumentSnapshot.get",e));if(null!==n)return this._userDataWriter.convertValue(n,t.serverTimestamps)}}}]),n}(Kh),Zh=function(e){b(n,e);var t=x(n);function n(){return v(this,n),t.apply(this,arguments)}return m(n,[{key:"data",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Ye(w(n.prototype),"data",this).call(this,e)}}]),n}(Jh),ed=function(){function e(t,n,r,i){v(this,e),this._firestore=t,this._userDataWriter=n,this._snapshot=i,this.metadata=new Yh(i.hasPendingWrites,i.fromCache),this.query=r}return m(e,[{key:"docs",get:function(){var e=[];return this.forEach((function(t){return e.push(t)})),e}},{key:"size",get:function(){return this._snapshot.docs.size}},{key:"empty",get:function(){return 0===this.size}},{key:"forEach",value:function(e,t){var n=this;this._snapshot.docs.forEach((function(r){e.call(t,new Zh(n._firestore,n._userDataWriter,r.key,r,new Yh(n._snapshot.mutatedKeys.has(r.key),n._snapshot.fromCache),n.query.converter))}))}},{key:"docChanges",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=!!e.includeMetadataChanges;if(t&&this._snapshot.excludesMetadataChanges)throw new ya(va.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===t||(this._cachedChanges=function(e,t){if(e._snapshot.oldDocs.isEmpty()){var n=0;return e._snapshot.docChanges.map((function(t){var r=new Zh(e._firestore,e._userDataWriter,t.doc.key,t.doc,new Yh(e._snapshot.mutatedKeys.has(t.doc.key),e._snapshot.fromCache),e.query.converter);return t.doc,{type:"added",doc:r,oldIndex:-1,newIndex:n++}}))}var r=e._snapshot.oldDocs;return e._snapshot.docChanges.filter((function(e){return t||3!==e.type})).map((function(t){var n=new Zh(e._firestore,e._userDataWriter,t.doc.key,t.doc,new Yh(e._snapshot.mutatedKeys.has(t.doc.key),e._snapshot.fromCache),e.query.converter),i=-1,a=-1;return 0!==t.type&&(i=r.indexOf(t.doc.key),r=r.delete(t.doc.key)),1!==t.type&&(a=(r=r.add(t.doc)).indexOf(t.doc.key)),{type:td(t.type),doc:n,oldIndex:i,newIndex:a}}))}(this,t),this._cachedChangesIncludeMetadataChanges=t),this._cachedChanges}}]),e}();function td(e){switch(e){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return ha()}}function nd(e){e=Xf(e,th);var t=Xf(e.firestore,Eh);return kh(Sh(t),e._key).then((function(n){return ud(t,e,n)}))}var rd=function(e){b(n,e);var t=x(n);function n(e){var r;return v(this,n),(r=t.call(this)).firestore=e,r}return m(n,[{key:"convertBytes",value:function(e){return new Th(e)}},{key:"convertReference",value:function(e){var t=this.convertDocumentKey(e,this.firestore._databaseId);return new th(this.firestore,null,t)}}]),n}($h);function id(e){return od(Xf(e.firestore,Eh),[new $u(e._key,Ru.none())])}function ad(e,t){var n=Xf(e.firestore,Eh),r=ah(e),i=Xh(e.converter,t);return od(n,[Ph(Rh(e.firestore),"addDoc",r._key,i,null!==e.converter,{}).toMutation(r._key,Ru.exists(!1))]).then((function(){return r}))}function od(e,t){return function(e,t){var n=new ma;return e.asyncQueue.enqueueAndForget(l(u().mark((function r(){return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=kf,r.next=3,yh(e);case 3:return r.t1=r.sent,r.t2=t,r.t3=n,r.abrupt("return",(0,r.t0)(r.t1,r.t2,r.t3));case 7:case"end":return r.stop()}}),r)})))),n.promise}(Sh(e),t)}function ud(e,t,n){var r=n.docs.get(t._key),i=new rd(e);return new Jh(e,i,t._key,r,new Yh(n.hasPendingWrites,n.fromCache),t.converter)}!function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];aa="9.13.0",Ne(new H("firestore",(function(e,n){var r=n.instanceIdentifier,i=n.options,a=e.getProvider("app").getImmediate(),o=new Eh(new wa(e.getProvider("auth-internal")),new Ta(e.getProvider("app-check-internal")),function(e,t){if(!Object.prototype.hasOwnProperty.apply(e.options,["projectId"]))throw new ya(va.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new po(e.options.projectId,t)}(a,r),a);return i=Object.assign({useFetchStreams:t},i),o._setSettings(i),o}),"PUBLIC").setMultipleInstances(!0)),Pe(ra,"3.7.2",e),Pe(ra,"3.7.2","esm2017")}();var sd=function(e,t){var n="object"==typeof e?e:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xe,t=Ce.get(e);if(!t&&e===xe)return Re();if(!t)throw Le.create("no-app",{appName:e});return t}(),r="string"==typeof e?e:t||"(default)",i=De(n,"firestore").getImmediate({identifier:r});if(!i._initialized){var o=O("firestore");o&&eh.apply(void 0,[i].concat(a(o)))}return i}(Re({apiKey:"AIzaSyBN6t_2Rb40t-lN1_vKq17HOLveMyrroMA",authDomain:"hdepot-f7b08.firebaseapp.com",projectId:"hdepot-f7b08",storageBucket:"hdepot-f7b08.appspot.com",messagingSenderId:"795553420584",appId:"1:795553420584:web:0fda5e1aa2e785c6e5ec1d",measurementId:"G-2507CMW9F1"})),ld=function(e){return e?e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,","):""},cd=n(184),fd=function(e){var t=e.className,n=e.variant,r=e.color,i=e.onClick,a=e.labelText;return(0,cd.jsx)("button",{className:t,variant:n,color:r,onClick:i,children:a})},hd=function(e){var t=e.make,n=e.model,r=e.trim,i=e.color,a=e.year,o=e.category,u=e.mileage,s=e.price,l=e.id;return(0,cd.jsxs)("div",{className:"veh-container",children:[(0,cd.jsxs)("div",{className:"vehBox",children:[(0,cd.jsx)("div",{className:"veh-col",children:(0,cd.jsxs)("div",{className:"veh-row",children:[(0,cd.jsxs)("p",{className:"veh-text",children:[(0,cd.jsx)("b",{children:"Make: "}),t]}),(0,cd.jsxs)("p",{className:"veh-text",children:[(0,cd.jsx)("b",{children:"Model: "}),n]}),(0,cd.jsxs)("p",{className:"veh-text",children:[(0,cd.jsx)("b",{children:"Trim: "}),r]}),(0,cd.jsxs)("p",{className:"veh-text",children:[(0,cd.jsx)("b",{children:"Color: "}),i]})]})}),(0,cd.jsx)("div",{className:"veh-col",children:(0,cd.jsxs)("div",{className:"veh-row",children:[(0,cd.jsxs)("p",{className:"veh-text",children:[(0,cd.jsx)("b",{children:"Year: "}),a]}),(0,cd.jsxs)("p",{className:"veh-text",children:[(0,cd.jsx)("b",{children:"Category: "}),o]}),(0,cd.jsxs)("p",{className:"veh-text",children:[(0,cd.jsx)("b",{children:"Mileage: "}),ld(u)]})]})}),(0,cd.jsx)("div",{className:"veh-col",children:(0,cd.jsxs)("div",{className:"veh-row-price",children:[(0,cd.jsxs)("p",{className:"veh-text",children:[(0,cd.jsx)("b",{children:"Price: "}),"$".concat(ld(s/100),".00")]}),(0,cd.jsxs)("p",{className:"veh-text",children:[(0,cd.jsx)("b",{children:"Id: "}),l]})]})})]}),(0,cd.jsx)("div",{className:"deleteButtonBox",children:(0,cd.jsx)(fd,{className:"deleteButton",labelText:"Delete Vehicle",variant:"contained",color:"primary",onClick:function(){return e.onClick(e.id)}})})]})},dd=function(e){var t=e.className,n=e.name,r=e.placeholder,i=e.value,a=e.onChange;return(0,cd.jsx)("input",{className:t,name:n,placeholder:r,value:i,onChange:a})},pd=function(){var t=d((0,e.useState)([]),2),n=t[0],r=t[1],i=d((0,e.useState)({}),2),o=i[0],s=i[1],f=d((0,e.useState)(),2),p=f[0],v=f[1],y=d((0,e.useState)([]),2),m=y[0],g=y[1],k=function(e){s((function(t){return h(h({},t),{},c({},e.target.name,e.target.value))}))},b=function(e){var t=e.target.value,n=(Number(t.replace(/\D/g,""))||"").toLocaleString();s((function(t){return h(h({},t),{},c({},e.target.name,n))}))},w=function(e){e.preventDefault();var t=parseFloat(o.mileage.replace(/,/g,"")),n=parseFloat(100*o.price.replace(/,/g,""));o.mileage=t,o.price=n};function E(){return(E=l(u().mark((function e(){var t,n,r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=ah(sd,"hdepot","".concat(p)),e.prev=1,e.next=4,nd(t);case 4:(n=e.sent).exists()?((r=n.data()).id=n._key.path.segments[1],g([r])):console.log("DB item does not exist"),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),console.log("A system error has occurred: ".concat(e.t0));case 11:v("");case 12:case"end":return e.stop()}}),e,null,[[1,8]])})))).apply(this,arguments)}function S(){return(S=l(u().mark((function e(t){var i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),w(t),r([].concat(a(n),[o])),e.prev=3,e.next=6,ad(ih(sd,"hdepot"),o);case 6:i=e.sent,o.id=i.id,r([].concat(a(n),[o])),s({}),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(3),console.log("Error saving vehicle to db: ".concat(e.t0));case 15:case"end":return e.stop()}}),e,null,[[3,12]])})))).apply(this,arguments)}function x(e){return T.apply(this,arguments)}function T(){return(T=l(u().mark((function e(t){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{id(ah(sd,"hdepot",t)),g("")}catch(n){console.log("Error deleteing vehicle from db: ".concat(n))}case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return(0,e.useEffect)((function(){try{!function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i,a,o;e=q(e);var s={includeMetadataChanges:!1},c=0;"object"!=typeof n[c]||wh(n[c])||(s=n[c],c++);var f,h,d,p={includeMetadataChanges:s.includeMetadataChanges};if(wh(n[c])){var v=n[c];n[c]=null===(i=v.next)||void 0===i?void 0:i.bind(v),n[c+1]=null===(a=v.error)||void 0===a?void 0:a.bind(v),n[c+2]=null===(o=v.complete)||void 0===o?void 0:o.bind(v)}if(e instanceof th)h=Xf(e.firestore,Eh),d=ru(e._key.path),f={next:function(t){n[c]&&n[c](ud(h,e,t))},error:n[c+1],complete:n[c+2]};else{var y=Xf(e,nh);h=Xf(y.firestore,Eh),d=y._query;var m=new rd(h);f={next:function(e){n[c]&&n[c](new ed(h,m,y,e))},error:n[c+1],complete:n[c+2]},Gh(e._query)}(function(e,t,n,r){var i=new oh(r),a=new of(t,i,n);e.asyncQueue.enqueueAndForget(l(u().mark((function t(){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=Jc,t.next=3,mh(e);case 3:return t.t1=t.sent,t.t2=a,t.abrupt("return",(0,t.t0)(t.t1,t.t2));case 6:case"end":return t.stop()}}),t)}))))})(Sh(h),d,p,f)}(ih(sd,"hdepot"),(function(e){var t=e.docs.map((function(e){return e.data()}));if(t){var n=e.docs.map((function(e){return e.id})),i=t.map((function(e,t){return Object.assign(e,{id:n[t]})}));r(i)}else console.log("Error fetching vehicle data from database")}))}catch(e){console.log("A system error has occurred: ".concat(e))}}),[]),(0,cd.jsx)(cd.Fragment,{children:(0,cd.jsxs)("div",{className:"vehicles-container",children:[(0,cd.jsx)("h2",{className:"formHeader",children:"Add A Vehicle to Your Queue"}),(0,cd.jsx)("div",{className:"vehiclesRow",children:(0,cd.jsx)("div",{className:"vehiclesColumn",children:["make","model","trim","color","year","category","mileage","price"].map((function(e,t){return(0,cd.jsx)("div",{className:"inputContainer",children:(0,cd.jsx)(dd,{className:"text-input",name:e,placeholder:e,value:o[e]||"",onChange:"mileage"===e||"price"===e?b:k},"".concat(e).concat(t))})}))})}),(0,cd.jsx)(fd,{className:"auxButton",labelText:"Add Vehicle",variant:"contained",color:"primary",onClick:function(e){return S.apply(this,arguments)}}),(0,cd.jsxs)("div",{children:[n&&(0,cd.jsx)("h2",{className:"formHeader",children:" Your Saved Vehicles"}),n.map((function(e,t){return(0,cd.jsx)(hd,{make:e.make,model:e.model,trim:e.trim,color:e.color,category:e.category,mileage:e.mileage,price:e.price,year:e.year,id:e.id,onClick:x},"".concat(e.model).concat(t))}))]}),(0,cd.jsx)("div",{className:"getHeader",children:(0,cd.jsx)("h2",{className:"formHeader",children:"Get A Vehicle By Id"})}),(0,cd.jsxs)("div",{className:"fetchBox",children:[(0,cd.jsx)("div",{className:"inputContainer",children:(0,cd.jsx)(dd,{className:"text-input",name:"vehId",placeholder:"Vehicle Id",value:p,onChange:function(e){return v(e.target.value)}})}),(0,cd.jsx)(fd,{className:"auxButton",labelText:"Get Vehicle",variant:"contained",color:"primary",onClick:function(){return E.apply(this,arguments)}})]}),(0,cd.jsx)("div",{children:m&&m.map((function(e,t){return(0,cd.jsx)(hd,{make:e.make,model:e.model,trim:e.trim,color:e.color,year:e.year,category:e.category,mileage:e.mileage,price:e.price,id:e.id,onClick:x},"".concat(e.model).concat(t))}))})]})})},vd=function(e){return(0,cd.jsx)("div",{className:"navBarContainer",children:(0,cd.jsxs)("div",{className:"navRow",children:[(0,cd.jsx)("span",{className:"navSpan",children:"Home"}),(0,cd.jsx)("span",{className:"navSpan",children:"Edit Profile"}),(0,cd.jsx)("span",{className:"navSpan",children:"Edit Settings"}),(0,cd.jsx)("span",{className:"navSpan",children:"New Request"})]})})},yd=function(){return(0,cd.jsxs)("div",{className:"app-container",children:[(0,cd.jsx)(vd,{}),(0,cd.jsx)(pd,{})]})},md=function(e){e&&e instanceof Function&&n.e(787).then(n.bind(n,787)).then((function(t){var n=t.getCLS,r=t.getFID,i=t.getFCP,a=t.getLCP,o=t.getTTFB;n(e),r(e),i(e),a(e),o(e)}))};t.createRoot(document.getElementById("root")).render((0,cd.jsx)(e.StrictMode,{children:(0,cd.jsx)(yd,{})})),md()}()}();
|
|
//# sourceMappingURL=main.74991570.js.map
|