1/*! For license information please see main.93494299.js.LICENSE.txt */ 2!function(){var e={694:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var a=typeof n;if("string"===a||"number"===a)e.push(n);else if(Array.isArray(n)){if(n.length){var o=i.apply(null,n);o&&e.push(o)}}else if("object"===a){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var u in n)r.call(n,u)&&n[u]&&e.push(u)}}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)}()},888:function(e,t,n){"use strict";var r=n(47);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,o){if(o!==r){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i}
vendor: 4,623 bytes, line 2
2;return n.PropTypes=n,n}},7:function(e,t,n){e.exports=n(888)()},47:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},463:function(e,t,n){"use strict";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 b(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
2-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 k=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for("react.element"),E=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),T=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),D=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 j(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 V(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:"")?j(e):""}function B(e){switch(e.tag){case 5:return j(e.type);case 16:return j("Lazy");case 13:return j("Suspense");case 19:return j("SuspenseList");case 0:case 2:case 15:return e=V(e.type,!1);case 11:return e=V(e.type.render,!1);case 1:return e=V(e.type,!0);default:return""}}function z(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 x:return"Fragment";case E:return"Portal";case _:return"Profiler";case S:return"StrictMode";case N:return"Suspense";case A:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case T: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 D:return null!==(t=e.displayName||null)?t:z(e.type)||"Memo";case L:t=e._payload,e=e._init;try{return z(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 z(t);case 8:return t===S?"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 W(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function K(e){e._valueTracker||(e._valueTracker=function(e){var t=W(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)}
vendor: 26,468 bytes, line 2
2,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 Q(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=W(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 Y(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 X(e,t){null!=(t=t.checked)&&b(e,"checked",t,!1)}function J(e,t){X(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 be(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 ke=null;function we(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ee=null,xe=null,Se=null;function _e(e){if(e=bi(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){xe?Se?Se.push(e):Se=[e]:xe=e}function Te(){if(xe){var e=xe,t=Se;if(Se=xe=null,_e(e),t)for(e=0;e<t.length;e++)_e(t[e])}}function Ie(e,t){return e(t)}function Ne(){}var Ae=!1;function De(e,t,n){if(Ae)return e(t,n);Ae=!0;try{return Ie(e,t,n)}finally{Ae=!1,(null!==xe||null!==Se)&&(Ne(),Te())}}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,je=!1,Ue=null,Ve={onError:function(e){Me=!0,Fe=e}};function Be(e,t,n,r,i,a,o,u,s){Me=!1,Fe=null,Pe.apply(Ve,arguments)}function ze(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(ze(e)!==e)throw Error(a(188))}function We(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=ze(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))?Ke(e):null}function Ke(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Ke(e);if(null!==t)return t;e=e.sibling}return null}var Qe=i.unstable_scheduleCallback,Ge=i.unstable_cancelCallback,$e=i.unstable_shouldYield,Ye=i.unstable_requestPaint,Xe=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 e>>>=0,0===e?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 bt=0;function kt(e){return 1<(e&=-e)?4<e?0!==(268435455&e)?16:536870912:4:1}var wt,Et,xt,St,_t,Ct=!1,Tt=[],It=null,Nt=null,At=null,Dt=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":At=null;break;case"pointerover":case"pointerout":Dt.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=bi(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=ze(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=qe(n)))return e.blockedOn=t,void _t(e.priority,(function(){xt(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 jt(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=bi(n))&&Et(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);ke=r,n.target.dispatchEvent(r),ke=null,t.shift()}return!0}function Ut(e,t,n){jt(e)&&n.delete(t)}function Vt(){Ct=!1,null!==It&&jt(It)&&(It=null),null!==Nt&&jt(Nt)&&(Nt=null),null!==At&&jt(At)&&(At=null),Dt.forEach(Ut),Lt.forEach(Ut)}function Bt(e,t){e.blockedOn===t&&(e.blockedOn=null,Ct||(Ct=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Vt)))}function zt(e){function t(t){return Bt(t,e)}if(0<Tt.length){Bt(Tt[0],e);for(var n=1;n<Tt.length;n++){var r=Tt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==It&&Bt(It,e),null!==Nt&&Bt(Nt,e),null!==At&&Bt(At,e),Dt.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=k.ReactCurrentBatchConfig,Ht=!0;function Wt(e,t,n,r){var i=bt,a=qt.transition;qt.transition=null;try{bt=1,Qt(e,t,n,r)}finally{bt=i,qt.transition=a}}function Kt(e,t,n,r){var i=bt,a=qt.transition;qt.transition=null;try{bt=4,Qt(e,t,n,r)}finally{bt=i,qt.transition=a}}function Qt(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 At=Mt(At,e,t,n,r,i),!0;case"pointerover":var a=i.pointerId;return Dt.set(a,Mt(Dt.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=bi(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=ze(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 Yt(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 Xt=null,Jt=null,Zt=null;function en(){if(Zt)return Zt;var e,t,n=Jt,r=n.length,i="value"in Xt?Xt.value:Xt.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:_n,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}}),bn=an(gn),kn=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"},xn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Sn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=xn[e])&&!!t[e]}function _n(){return Sn}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:_n,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}}),Tn=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:_n})),An=an(F({},ln,{propertyName:0,elapsedTime:0,pseudoElement:0})),Dn=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(Dn),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),jn=String.fromCharCode(32),Un=!1;function Vn(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 Bn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var zn=!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 Wn(e,t,n,r){Ce(r),0<(t=Kr(t,"onChange")).length&&(n=new cn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Kn=null,Qn=null;function Gn(e){jr(e,0)}function $n(e){if(Q(ki(e)))return e}function Yn(e,t){if("change"===e)return t}var Xn=!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;Xn=Jn&&(!document.documentMode||9<document.documentMode)}function tr(){Kn&&(Kn.detachEvent("onpropertychange",nr),Qn=Kn=null)}function nr(e){if("value"===e.propertyName&&$n(Qn)){var t=[];Wn(t,Qn,e,we(e)),De(Gn,t)}}function rr(e,t,n){"focusin"===e?(tr(),Qn=n,(Kn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function ir(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return $n(Qn)}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,br=!1;function kr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;br||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=Kr(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")},xr={},Sr={};function _r(e){if(xr[e])return xr[e];if(!Er[e])return e;var t,n=Er[e];for(t in n)if(n.hasOwnProperty(t)&&t in Sr)return xr[e]=n[t];return e}c&&(Sr=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=_r("animationend"),Tr=_r("animationiteration"),Ir=_r("animationstart"),Nr=_r("transitionend"),Ar=new Map,Dr="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){Ar.set(e,t),s(t,[e])}for(var Or=0;Or<Dr.length;Or++){var Rr=Dr[Or];Lr(Rr.toLowerCase(),"on"+(Rr[0].toUpperCase()+Rr.slice(1)))}Lr(Cr,"onAnimationEnd"),Lr(Tr,"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 focu
2sin 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(Be.apply(this,arguments),Me){if(!Me)throw Error(a(198));var c=Fe;Me=!1,Fe=null,je||(je=!0,Ue=c)}}(r,t,void 0,e),e.currentTarget=null}function jr(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(je)throw e=Ue,je=!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 Vr(e,t,n){var r=0;t&&(r|=4),qr(n,e,r,t)}var Br="_reactListening"+Math.random().toString(36).slice(2);function zr(e){if(!e[Br]){e[Br]=!0,o.forEach((function(t){"selectionchange"!==t&&(Mr.has(t)||Vr(t,!1,e),Vr(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Br]||(t[Br]=!0,Vr("selectionchange",!1,t))}}function qr(e,t,n,r){switch(Yt(t)){case 1:var i=Wt;break;case 4:i=Kt;break;default:i=Qt}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}De((function(){var r=a,i=we(n),o=[];e:{var u=Ar.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=Tn;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 Tr:case Ir:s=mn;break;case Nr:s=An;break;case"scroll":s=hn;break;case"wheel":s=Ln;break;case"copy":case"cut":case"paste":s=bn;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(Wr(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===ke||!(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=ze(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:ki(s),d=null==l?u:ki(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=Qr(d))p++;for(d=0,v=h;v;v=Qr(v))d++;for(;0<p-d;)c=Qr(c),p--;for(;0<d-p;)h=Qr(h),d--;for(;p--;){if(c===h||null!==h&&c===h.alternate)break e;c=Qr(c),h=Qr(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?ki(r):window).nodeName&&u.nodeName.toLowerCase())||"input"===s&&"file"===u.type)var y=Yn;else if(Hn(u))if(Xn)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))?Wn(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?ki(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":br=!0;break;case"contextmenu":case"mouseup":case"dragend":br=!1,kr(o,n,i);break;case"selectionchange":if(vr)break;case"keydown":case"keyup":kr(o,n,i)}var g;if(Rn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else zn?Vn(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Fn&&"ko"!==n.locale&&(zn||"onCompositionStart"!==b?"onCompositionEnd"===b&&zn&&(g=en()):(Jt="value"in(Xt=i)?Xt.value:Xt.textContent,zn=!0)),0<(m=Kr(r,b)).length&&(b=new kn(b,e,null,n,i),o.push({event:b,listeners:m}),g?b.data=g:null!==(g=Bn(n))&&(b.data=g))),(g=Mn?function(e,t){switch(e){case"compositionend":return Bn(t);case"keypress":return 32!==t.which?null:(Un=!0,jn);case"textInput":return(e=t.data)===jn&&Un?null:e;default:return null}}(e,n):function(e,t){if(zn)return"compositionend"===e||!Rn&&Vn(e,t)?(e=en(),Zt=Jt=Xt=null,zn=!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;
vendor: 97,998 bytes, line 2
2case"compositionend":return Fn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Kr(r,"onBeforeInput")).length&&(i=new kn("onBeforeInput","beforeinput",null,n,i),o.push({event:i,listeners:r}),i.data=g))}jr(o,t)}))}function Wr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Kr(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(Wr(e,a,i)),null!=(a=Le(e,t))&&r.push(Wr(e,a,i))),e=e.return}return r}function Qr(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(Wr(n,s,u)):i||null!=(s=Le(n,a))&&o.push(Wr(n,s,u))),n=n.return}0!==o.length&&e.push({event:t,listeners:o})}var $r=/\r\n?/g,Yr=/\u0000|\uFFFD/g;function Xr(e){return("string"===typeof e?e:""+e).replace($r,"\n").replace(Yr,"")}function Jr(e,t,n){if(t=Xr(t),Xr(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 zt(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);zt(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 bi(e){return!(e=e[hi]||e[pi])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function ki(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function wi(e){return e[di]||null}var Ei=[],xi=-1;function Si(e){return{current:e}}function _i(e){0>xi||(e.current=Ei[xi],Ei[xi]=null,xi--)}function Ci(e,t){xi++,Ei[xi]=e.current,e.current=t}var Ti={},Ii=Si(Ti),Ni=Si(!1),Ai=Ti;function Di(e,t){var n=e.type.contextTypes;if(!n)return Ti;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(){_i(Ni),_i(Ii)}function Ri(e,t,n){if(Ii.current!==Ti)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||Ti,Ai=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,Ai),r.__reactInternalMemoizedMergedChildContext=e,_i(Ni),_i(Ii),Ci(Ii,e)):_i(Ni),Ci(Ni,n)}var ji=null,Ui=!1,Vi=!1;function Bi(e){null===ji?ji=[e]:ji.push(e)}function zi(){if(!Vi&&null!==ji){Vi=!0;var e=0,t=bt;try{var n=ji;for(bt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}ji=null,Ui=!1}catch(i){throw null!==ji&&(ji=ji.slice(e+1)),Qe(Ze,zi),i}finally{bt=t,Vi=!1}}return null}var qi=[],Hi=0,Wi=null,Ki=0,Qi=[],Gi=0,$i=null,Yi=1,Xi="";function Ji(e,t){qi[Hi++]=Ki,qi[Hi++]=Wi,Wi=e,Ki=t}function Zi(e,t,n){Qi[Gi++]=Yi,Qi[Gi++]=Xi,Qi[Gi++]=$i,$i=e;var r=Yi;e=Xi;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,Yi=1<<32-ot(t)+i|n<<i|r,Xi=a+e}else Yi=1<<a|n<<i|r,Xi=e}function ea(e){null!==e.return&&(Ji(e,1),Zi(e,1,0))}function ta(e){for(;e===Wi;)Wi=qi[--Hi],qi[Hi]=null,Ki=qi[--Hi],qi[Hi]=null;for(;e===$i;)$i=Qi[--Gi],Qi[Gi]=null,Xi=Qi[--Gi],Qi[Gi]=null,Yi=Qi[--Gi],Qi[Gi]=null}var na=null,ra=null,ia=!1,aa=null;function oa(e,t){var n=Dl(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:Yi,overflow:Xi}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Dl(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=k.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=Si(null),ga=null,ba=null,ka=null;function wa(){ka=ba=ga=null}function Ea(e){var t=ma.current;_i(ma),e._currentValue=t}function xa(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 Sa(e,t){ga=e,ka=ba=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(ku=!0),e.firstContext=null)}function _a(e){var t=e._currentValue;if(ka!==e)if(e={context:e,memoizedValue:t,next:null},null===ba){if(null===ga)throw Error(a(308));ba=e,ga.dependencies={lanes:0,firstContext:e}}else ba=ba.next=e;return t}var Ca=null;function Ta(e){null===Ca?Ca=[e]:Ca.push(e)}function Ia(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Ta(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 Aa=!1;function Da(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,Ta(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;Aa=!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:Aa=!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 ja(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 Va(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 Ba={isMounted:function(e){return!!(e=e._reactInternals)&&ze(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 za(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=Ti,a=t.contextType;return"object"===typeof a&&null!==a?a=_a(a):(i=Li(t)?Ai:Ii.current,a=(r=null!==(r=t.contextTypes)&&void 0!==r)?Di(e,i):Ti),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Ba,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&&Ba.enqueueReplaceState(t,t.state,null)}function Wa(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=Ua,Da(e);var a=t.contextType;"object"===typeof a&&null!==a?i.context=_a(a):(a=Li(t)?Ai:Ii.current,i.context=Di(e,a)),i.state=e.memoizedState,"function"===typeof(a=t.getDerivedStateFromProps)&&(Va(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&&Ba.enqueueReplaceState(i,i.state,null),Fa(e,n,i,r),i.state=e.memoizedState),"function"===typeof i.componentDidMount&&(e.flags|=4194308)}function Ka(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 Qa(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===x?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=Ka(e,t,n),r.return=e,r):((r=Rl(n.type,n.key,n.props,null,e.mode,r)).ref=Ka(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=jl(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=Ka(e,null,t),n.return=e,n;case E:return(t=jl(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;Qa(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);Qa(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);Qa(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 b=d(i,v,g.value,l);if(null===b){null===v&&(v=m);break}e&&v&&null===b.alternate&&t(i,v),u=o(b,u,y),null===f?c=b:f.sibling=b,f=b,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===x&&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)===x){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=Ka(r,c,o),a.return=r,r=a;break e}n(r,c);break}t(r,c),c=c.sibling}o.type===x?((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=Ka(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=jl(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);Qa(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 Ya=$a(!0),Xa=$a(!1),Ja={},Za=Si(Ja),eo=Si(Ja),to=Si(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)}_i(Za),Ci(Za,t)}function io(){_i(Za),_i(eo),_i(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&&(_i(Za),_i(eo))}var uo=Si(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=k.ReactCurrentDispatcher,ho=k.ReactCurrentBatchConfig,po=0,vo=null,yo=null,mo=null,go=!1,bo=!1,ko=0,wo=0;function Eo(){throw Error(a(321))}function xo(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 So(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),bo){o=0;do{if(bo=!1,ko=0,25<=o)throw Error(a(301));o+=1,mo=yo=null,t.updateQueue=null,fo.current=lu,e=n(r,i)}while(bo)}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 _o(){var e=0!==ko;return ko=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 To(){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=To(),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)||(ku=!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 Ao(e){var t=To(),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)||(ku=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Do(){}function Lo(e,t){var n=vo,r=To(),i=t(),o=!ur(r.memoizedState,i);if(o&&(r.memoizedState=i,ku=!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 jo(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 Vo(){return To().memoizedState}function Bo(e,t,n,r){var i=Co();vo.flags|=e,i.memoizedState=Uo(1|t,n,void 0,void 0===r?null:r)}function zo(e,t,n,r){var i=To();r=void 0===r?null:r;var a=void 0;if(null!==yo){var o=yo.memoizedState;if(a=o.destroy,null!==r&&xo(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 Bo(8390656,8,e,t)}function Ho(e,t){return zo(2048,8,e,t)}function Wo(e,t){return zo(4,2,e,t)}function Ko(e,t){return zo(4,4,e,t)}function Qo(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,zo(4,4,Qo.bind(null,t,e),n)}function $o(){}function Yo(e,t){var n=To();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&xo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Xo(e,t){var n=To();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&xo(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,ku=!0),e.memoizedState=n):(ur(n,t)||(n=vt(),vo.lanes|=n,Ms|=n,e.baseState=!0),t)}function Zo(e,t){var n=bt;bt=0!==n&&4>n?n:4,e(!0);var r=ho.transition;ho.transition={};try{e(!1),t()}finally{bt=n,ho.transition=r}}function eu(){return To().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,Ta(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){bo=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:_a,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:_a,useCallback:function(e,t){return Co().memoizedState=[e,void 0===t?null:t],e},useContext:_a,useEffect:qo,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Bo(4194308,4,Qo.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Bo(4194308,4,e,t)},useInsertionEffect:function(e,t){return Bo(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:jo,useDebugValue:$o,useDeferredValue:function(e){return Co().memoizedState=e},useTransition:function(){var e=jo(!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=Xi;t=":"+t+"R"+(n=(Yi&~(1<<32-ot(Yi)-1)).toString(32)+n),0<(n=ko++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=wo++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},su={readContext:_a,useCallback:Yo,useContext:_a,useEffect:Ho,useImperativeHandle:Go,useInsertionEffect:Wo,useLayoutEffect:Ko,useMemo:Xo,useReducer:No,useRef:Vo,useState:function(){return No(Io)},useDebugValue:$o,useDeferredValue:function(e){return Jo(To(),yo.memoizedState,e)},useTransition:function(){return[No(Io)[0],To().memoizedState]},useMutableSource:Do,useSyncExternalStore:Lo,useId:eu,unstable_isNewReconciler:!1},lu={readContext:_a,useCallback:Yo,useContext:_a,useEffect:Ho,useImperativeHandle:Go,useInsertionEffect:Wo,useLayoutEffect:Ko,useMemo:Xo,useReducer:Ao,useRef:Vo,useState:function(){return Ao(Io)},useDebugValue:$o,useDeferredValue:function(e){var t=To();return null===yo?t.memoizedState=e:Jo(t,yo.memoizedState,e)},useTransition:function(){return[Ao(Io)[0],To().memoizedState]},useMutableSource:Do,useSyncExternalStore:Lo,useId:eu,unstable_isNewReconciler:!1};function cu(e,t){try{var n="",r=t;do{n+=B(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,Ws=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===Ks?Ks=new Set([this]):Ks.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=_l.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 bu=k.ReactCurrentOwner,ku=!1;function wu(e,t,n,r){t.child=null===e?Xa(t,null,n,r):Ya(t,e.child,n,r)}function Eu(e,t,n,r,i){n=n.render;var a=t.ref;return Sa(t,i),r=So(e,t,n,r,a,i),n=_o(),null===e||ku?(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 xu(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,Su(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 Su(e,t,n,r,i){if(null!==e){var a=e.memoizedProps;if(sr(a,r)&&e.ref===t.ref){if(ku=!1,t.pendingProps=r=a,0===(e.lanes&i))return t.lanes=e.lanes,Hu(e,t,i);0!==(131072&e.flags)&&(ku=!0)}}return Tu(e,t,n,r,i)}function _u(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 Tu(e,t,n,r,i){var a=Li(n)?Ai:Ii.current;return a=Di(t,a),Sa(t,i),n=So(e,t,n,r,a,i),r=_o(),null===e||ku?(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(Sa(t,i),null===t.stateNode)qu(e,t),qa(t,n,r),Wa(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=_a(l):l=Di(t,l=Li(n)?Ai: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),Aa=!1;var h=t.memoizedState;o.state=h,Fa(t,r,o,i),s=t.memoizedState,u!==r||h!==s||Ni.current||Aa?("function"===typeof c&&(Va(t,n,c,r),s=t.memoizedState),(u=Aa||za(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=_a(s):s=Di(t,s=Li(n)?Ai: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),Aa=!1,h=t.memoizedState,o.state=h,Fa(t,r,o,i);var p=t.memoizedState;u!==f||h!==p||Ni.current||Aa?("function"===typeof d&&(Va(t,n,d,r),p=t.memoizedState),(l=Aa||za(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,bu.current=t;var u=o&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&o?(t.child=Ya(t,e.child,null,a),t.child=Ya(t,null,u,a)):wu(e,t,u,a),t.memoizedState=r.state,i&&Fi(t,n,!0),t.child}function Au(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 Du(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):ju(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)&&Ya(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),ku||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=Tl.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,ra=li(i.nextSibling),na=t,ia=!0,aa=null,null!==e&&(Qi[Gi++]=Yi,Qi[Gi++]=Xi,Qi[Gi++]=$i,Yi=e.id,Xi=e.overflow,$i=t),t=ju(t,r.children),t.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 ju(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),Ya(t,e.child,null,n),(e=ju(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Vu(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),xa(e.return,t,n)}function Bu(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 zu(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&&Vu(e,n,t);else if(19===e.tag)Vu(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),Bu(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}Bu(t,!0,n,null,a);break;case"together":Bu(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 Wu(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 Ku(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 Qu(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 Ku(t),null;case 1:case 17:return Li(t.type)&&Oi(),Ku(t),null;case 3:return r=t.stateNode,io(),_i(Ni),_i(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))),Ku(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 Ku(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":Y(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":K(r),Z(r,o,!0);break;case"textarea":K(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=be(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":Y(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&&b(e,o,c,s))}switch(n){case"input":K(e),Z(e,r,!1);break;case"textarea":K(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 Ku(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 Ku(t),null;case 13:if(_i(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;Ku(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),Ku(t),null);case 4:return io(),null===e&&zr(t.stateNode.containerInfo),Ku(t),null;case 10:return Ea(t.type._context),Ku(t),null;case 19:if(_i(uo),null===(o=t.memoizedState))return Ku(t),null;if(r=0!==(128&t.flags),null===(s=o.rendering))if(r)Wu(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,Wu(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&&Xe()>zs&&(t.flags|=128,r=!0,Wu(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),Wu(o,!0),null===o.tail&&"hidden"===o.tailMode&&!s.alternate&&!ia)return Ku(t),null}else 2*Xe()-o.renderingStartTime>zs&&1073741824!==n&&(t.flags|=128,r=!0,Wu(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=Xe(),t.sibling=null,n=uo.current,Ci(uo,r?1&n|2:1&n),t):(Ku(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)&&(Ku(t),6&t.subtreeFlags&&(t.flags|=8192)):Ku(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(),_i(Ni),_i(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(_i(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 _i(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,Yu=!1,Xu="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){Sl(e,t,r)}else n.current=null}function es(e,t,n){try{n()}catch(r){Sl(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:Yu||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),zt(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(!Yu&&(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(!Yu&&(Zu(n,t),"function"===typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){Sl(n,t,u)}hs(e,t,n);break;case 21:hs(e,t,n);break;case 22:1&n.mode?(Yu=(r=Yu)||null!==n.memoizedState,hs(e,t,n),Yu=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 Xu),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){Sl(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){Sl(e,e.return,y)}try{ns(5,e,e.return)}catch(y){Sl(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){Sl(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&&X(i,o),be(s,u);var c=be(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):b(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){Sl(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){Sl(e,e.return,y)}}break;case 3:if(vs(t,e),ms(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{zt(t.containerInfo)}catch(y){Sl(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||(Bs=Xe())),4&r&&ps(e);break;case 22:if(f=null!==n&&null!==n.memoizedState,1&e.mode?(Yu=(c=Yu)||f,vs(t,e),Yu=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){Sl(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){Sl(e,e.return,y)}}}else if(6===h.tag){if(null===f)try{h.stateNode.nodeValue=c?"":h.memoizedProps}catch(y){Sl(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){Sl(e,e.return,u)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function gs(e,t,n){Ju=e,bs(e,t,n)}function bs(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||Yu;u=$u;var l=Yu;if($u=o,(Yu=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,bs(a,t,n),a=a.sibling;Ju=i,$u=u,Yu=l}ks(e)}else 0!==(8772&i.subtreeFlags)&&null!==a?(a.return=i,Ju=a):ks(e)}}function ks(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:Yu||rs(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Yu)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&&ja(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}ja(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&&zt(h)}}}break;default:throw Error(a(163))}Yu||512&t.flags&&is(t)}catch(d){Sl(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){Sl(t,n,s)}break;case 1:var r=t.stateNode;if("function"===typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(s){Sl(t,i,s)}}var a=t.return;try{is(t)}catch(s){Sl(t,a,s)}break;case 5:var o=t.return;try{is(t)}catch(s){Sl(t,o,s)}}}catch(s){Sl(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 xs,Ss=Math.ceil,_s=k.ReactCurrentDispatcher,Cs=k.ReactCurrentOwner,Ts=k.ReactCurrentBatchConfig,Is=0,Ns=null,As=null,Ds=0,Ls=0,Os=Si(0),Rs=0,Ps=null,Ms=0,Fs=0,js=0,Us=null,Vs=null,Bs=0,zs=1/0,qs=null,Hs=!1,Ws=null,Ks=null,Qs=!1,Gs=null,$s=0,Ys=0,Xs=null,Js=-1,Zs=0;function el(){return 0!==(6&Is)?Xe():-1!==Js?Js:Js=Xe()}function tl(e){return 0===(1&e.mode)?1:0!==(2&Is)&&0!==Ds?Ds&-Ds:null!==va.transition?(0===Zs&&(Zs=vt()),Zs):0!==(e=bt)?e:e=void 0===(e=window.event)?16:Yt(e.type)}function nl(e,t,n,r){if(50<Ys)throw Ys=0,Xs=null,Error(a(185));mt(e,n,r),0!==(2&Is)&&e===Ns||(e===Ns&&(0===(2&Is)&&(Fs|=n),4===Rs&&ul(e,Ds)),rl(e,r),1===n&&0===Is&&0===(1&t.mode)&&(zs=Xe()+500,Ui&&zi()))}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?Ds: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,Bi(e)}(sl.bind(null,e)):Bi(sl.bind(null,e)),oi((function(){0===(6&Is)&&zi()})),n=null;else{switch(kt(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?Ds: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&&Ds===t||(qs=null,zs=Xe()+500,hl(e,t));;)try{gl();break}catch(s){dl(e,s)}wa(),_s.current=o,Is=i,null!==As?t=0:(Ns=null,Ds=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,Xe()),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,Xe()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(a(345));case 2:case 5:wl(e,Vs,qs);break;case 3:if(ul(e,r),(130023424&r)===r&&10<(t=Bs+500-Xe())){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,Vs,qs),t);break}wl(e,Vs,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=Xe()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Ss(r/1960))-r)){e.timeoutHandle=ri(wl.bind(null,e,Vs,qs),r);break}wl(e,Vs,qs);break;default:throw Error(a(329))}}}return rl(e,Xe()),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=Vs,Vs=n,null!==t&&ol(t)),e}function ol(e){null===Vs?Vs=e:Vs.push.apply(Vs,e)}function ul(e,t){for(t&=~js,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,Xe()),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,Xe()),n;if(6===n)throw Error(a(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,wl(e,Vs,qs),rl(e,Xe()),null}function ll(e,t){var n=Is;Is|=1;try{return e(t)}finally{0===(Is=n)&&(zs=Xe()+500,Ui&&zi())}}function cl(e){null!==Gs&&0===Gs.tag&&0===(6&Is)&&El();var t=Is;Is|=1;var n=Ts.transition,r=bt;try{if(Ts.transition=null,bt=1,e)return e()}finally{bt=r,Ts.transition=n,0===(6&(Is=t))&&zi()}}function fl(){Ls=Os.current,_i(Os)}function hl(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ii(n)),null!==As)for(n=As.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(),_i(Ni),_i(Ii),co();break;case 5:oo(r);break;case 4:io();break;case 13:case 19:_i(uo);break;case 10:Ea(r.type._context);break;case 22:case 23:fl()}n=n.return}if(Ns=e,As=e=Ol(e.current,null),Ds=Ls=t,Rs=0,Ps=null,js=Fs=Ms=0,Vs=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=As;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,bo=!1,ko=0,Cs.current=null,null===n||null===n.return){Rs=1,Ps=t,As=null;break}e:{var o=e,u=n.return,s=n,l=t;if(t=Ds,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,b=o.stateNode;if(0===(128&o.flags)&&("function"===typeof g.getDerivedStateFromError||null!==b&&"function"===typeof b.componentDidCatch&&(null===Ks||!Ks.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t,Ma(o,vu(o,s,t));break e}}o=o.return}while(null!==o)}kl(n)}catch(k){t=k,As===n&&null!==n&&(As=n=n.return);continue}break}}function pl(){var e=_s.current;return _s.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,Ds)}function yl(e,t){var n=Is;Is|=2;var r=pl();for(Ns===e&&Ds===t||(qs=null,hl(e,t));;)try{ml();break}catch(i){dl(e,i)}if(wa(),Is=n,_s.current=r,null!==As)throw Error(a(261));return Ns=null,Ds=0,Rs}function ml(){for(;null!==As;)bl(As)}function gl(){for(;null!==As&&!$e();)bl(As)}function bl(e){var t=xs(e.alternate,e,Ls);e.memoizedProps=e.pendingProps,null===t?kl(e):As=t,Cs.current=null}function kl(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(32768&t.flags)){if(null!==(n=Qu(n,t,Ls)))return void(As=n)}else{if(null!==(n=Gu(n,t)))return n.flags&=32767,void(As=n);if(null===e)return Rs=6,void(As=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(As=t);As=t=e}while(null!==t);0===Rs&&(Rs=5)}function wl(e,t,n){var r=bt,i=Ts.transition;try{Ts.transition=null,bt=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&&(As=Ns=null,Ds=0),0===(2064&n.subtreeFlags)&&0===(2064&n.flags)||Qs||(Qs=!0,Nl(tt,(function(){return El(),null}))),o=0!==(15990&n.flags),0!==(15990&n.subtreeFlags)||o){o=Ts.transition,Ts.transition=null;var u=bt;bt=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,b=g.getSnapshotBeforeUpdate(t.elementType===t.type?y:ya(t.type,y),m);g.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var k=t.stateNode.containerInfo;1===k.nodeType?k.textContent="":9===k.nodeType&&k.documentElement&&k.removeChild(k.documentElement);break;default:throw Error(a(163))}}catch(w){Sl(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),Ye(),Is=s,bt=u,Ts.transition=o}else e.current=n;if(Qs&&(Qs=!1,Gs=e,$s=i),o=e.pendingLanes,0===o&&(Ks=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,Xe()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Hs)throw Hs=!1,e=Ws,Ws=null,e;0!==(1&$s)&&0!==e.tag&&El(),o=e.pendingLanes,0!==(1&o)?e===Xs?Ys++:(Ys=0,Xs=e):Ys=0,zi()}(e,t,n,r)}finally{Ts.transition=i,bt=r}return null}function El(){if(null!==Gs){var e=kt($s),t=Ts.transition,n=bt;try{if(Ts.transition=null,bt=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 b=e.current;for(Ju=b;null!==Ju;){var k=(u=Ju).child;if(0!==(2064&u.subtreeFlags)&&null!==k)k.return=u,Ju=k;else e:for(u=b;null!==Ju;){if(0!==(2048&(s=Ju).flags))try{switch(s.tag){case 0:case 11:case 15:rs(9,s)}}catch(E){Sl(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,zi(),at&&"function"===typeof at.onPostCommitFiberRoot)try{at.onPostCommitFiberRoot(it,e)}catch(E){}r=!0}return r}finally{bt=n,Ts.transition=t}}return!1}function xl(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 Sl(e,t,n){if(3===e.tag)xl(e,e,n);else for(;null!==t;){if(3===t.tag){xl(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Ks||!Ks.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 _l(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=el(),e.pingedLanes|=e.suspendedLanes&n,Ns===e&&(Ds&n)===n&&(4===Rs||3===Rs&&(130023424&Ds)===Ds&&500>Xe()-Bs?hl(e,0):js|=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 Tl(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 Qe(e,t)}function Al(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 Dl(e,t,n,r){return new Al(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=Dl(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 x:return Pl(n.children,i,o,t);case S:u=8,i|=8;break;case _:return(e=Dl(12,n,t,2|i)).elementType=_,e.lanes=o,e;case N:return(e=Dl(13,n,t,i)).elementType=N,e.lanes=o,e;case A:return(e=Dl(19,n,t,i)).elementType=A,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 T:u=9;break e;case I:u=11;break e;case D:u=14;break e;case L:u=16,r=null;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Dl(u,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function Pl(e,t,n,r){return(e=Dl(7,e,r,t)).lanes=n,e}function Ml(e,t,n,r){return(e=Dl(22,e,r,t)).elementType=O,e.lanes=n,e.stateNode={isHidden:!1},e}function Fl(e,t,n){return(e=Dl(6,e,null,t)).lanes=n,e}function jl(e,t,n){return(t=Dl(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 Vl(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=Dl(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Da(a),e}function Bl(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 zl(e){if(!e)return Ti;e:{if(ze(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=Vl(n,r,!0,e,0,a,0,u,s)).context=zl(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=zl(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 Wl(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Kl(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Ql(e,t){Kl(e,t),(e=e.alternate)&&Kl(e,t)}xs=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Ni.current)ku=!0;else{if(0===(e.lanes&n)&&0===(128&t.flags))return ku=!1,function(e,t,n){switch(t.tag){case 3:Au(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 zu(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,_u(e,t,n)}return Hu(e,t,n)}(e,t,n);ku=0!==(131072&e.flags)}else ku=!1,ia&&0!==(1048576&t.flags)&&Zi(t,Ki,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;qu(e,t),e=t.pendingProps;var i=Di(t,Ii.current);Sa(t,n),i=So(null,t,r,e,i,n);var o=_o();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,Da(t),i.updater=Ba,t.stateNode=i,i._reactInternals=t,Wa(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===D)return 14}return 2}(r),e=ya(r,e),i){case 0:t=Tu(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=xu(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,Tu(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(Au(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=Du(e,t,r,n,i=cu(Error(a(423)),t));break e}if(r!==i){t=Du(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=Xa(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=Ya(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),xa(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),xa(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,Sa(t,n),r=r(i=_a(i)),t.flags|=1,wu(e,t,r,n),t.child;case 14:return i=ya(r=t.type,t.pendingProps),xu(e,t,r,i=ya(r.type,i),n);case 15:return Su(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,Sa(t,n),qa(t,r,i),Wa(t,r,i,n),Nu(null,t,r,!0,e,n);case 19:return zu(e,t,n);case 22:return _u(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 Yl(e){this._internalRoot=e}function Xl(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=Wl(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=Wl(o);a.call(e)}}var o=ql(t,r,e,0,null,!1,0,"",Zl);return e._reactRootContainer=o,e[pi]=o.current,zr(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=Wl(s);u.call(e)}}var s=Vl(e,0,!1,null,0,!1,0,"",Zl);return e._reactRootContainer=s,e[pi]=s.current,zr(8===e.nodeType?e.parentNode:e),cl((function(){Hl(t,s,n,r)})),s}(n,t,e,i,r);return Wl(o)}Yl.prototype.render=$l.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(a(409));Hl(e,t,null,null)},Yl.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}},Yl.prototype.unstable_scheduleHydration=function(e){if(e){var t=St();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,Xe()),0===(6&Is)&&(zs=Xe()+500,zi()))}break;case 13:cl((function(){var t=Na(e,1);if(null!==t){var n=el();nl(t,e,1,n)}})),Ql(e,1)}},Et=function(e){if(13===e.tag){var t=Na(e,134217728);if(null!==t)nl(t,e,134217728,el());Ql(e,134217728)}},xt=function(e){if(13===e.tag){var t=tl(e),n=Na(e,t);if(null!==n)nl(n,e,t,el());Ql(e,t)}},St=function(){return bt},_t=function(e,t){var n=bt;try{return bt=e,t()}finally{bt=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));Q(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:[bi,ki,wi,Ce,Te,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:k.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=We(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(!Xl(t))throw Error(a(200));return Bl(e,t,null,n)},t.createRoot=function(e,t){if(!Xl(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=Vl(e,1,!1,null,0,n,0,r,i),e[pi]=t.current,zr(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=We(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(!Xl(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,zr(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 Yl(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){"use strict";var r=n(164);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},164:function(e,t,n){"use strict";!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){"use strict";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){"use strict";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 b(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 k=b.prototype=new g;k.constructor=b,v(k,m.prototype),k.isPureReactComponent=!0;var w=Array.isArray,E=Object.prototype.hasOwnProperty,x={current:null},S={key:!0,ref:!0,__self:!0,__source:!0};function _(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)&&!S.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:x.current}}function C(e){return"object"===typeof e&&null!==e&&e.$$typeof===n}var T=/\/+/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(T,"$&/")+"/"),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(T,"$&/")+"/")+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 A(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 D(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:x};t.Children={map:A,forEach:function(e,t,n){A(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return A(e,(function(){t++})),t},toArray:function(e){return A(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=b,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=x.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)&&!S.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.createFactory=function(e){var 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:D}},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){"use strict";e.exports=n(117)},184:function(e,t,n){"use strict";e.exports=n(374)},813:function(e,t){"use strict";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,b="undefined"!==typeof setImmediate?setImmediate:null;function k(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,k(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(k(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),k(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 x,S=!1,_=null,C=-1,T=5,I=-1;function N(){return!(t.unstable_now()-I<T)}function A(){if(null!==_){var e=t.unstable_now();I=e;var n=!0;try{n=_(!0,e)}finally{n?x():(S=!1,_=null)}}else S=!1}if("function"===typeof b)x=function(){b(A)};else if("undefined"!==typeof MessageChannel){var D=new MessageChannel,L=D.port2;D.port1.onmessage=A,x=function(){L.postMessage(null)}}else x=function(){m(A,0)};function O(e){_=e,S||(S=!0,x())}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"):T=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=
2a+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){"use strict";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.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},function(){var e,t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__};n.t=function(r,i){if(1&i&&(r=this(r)),8&i)return r;if("object"===typeof r&&r){if(4&i&&r.__esModule)return r;if(16&i&&"function"===typeof r.then)return r}var a=Object.create(null);n.r(a);var o={};e=e||[null,t({}),t([]),t(t)];for(var u=2&i&&r;"object"==typeof u&&!~e.indexOf(u);u=t(u))Object.getOwnPropertyNames(u).forEach((function(e){o[e]=function(){return r[e]}}));return o.default=function(){return r},n.d(a,o),a}}(),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.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)},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){"use strict";var e=n(791),t=n.t(e,2),r=n(250);function i(e){return i="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},i(e)}function a(e){var t=function(e,t){if("object"!==i(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===i(t)?t:String(t)}function o(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(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 s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(){l=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.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(A){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 T(i||[]);return r(o,"_invoke",{value:x(e,n,u)}),o}function h(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(A){return{type:"throw",arg:A}}}e.wrap=f;var d={};function p(){}function v(){}function y(){}var m={};c(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(I([])));b&&b!==t&&n.call(b,o)&&(m=b);var k=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 a(r,o,u,s){var l=h(e[r],e,o);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"==i(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){a("next",e,u,s)}),(function(e){a("throw",e,u,s)})):t.resolve(f).then((function(e){c.value=e,u(c)}),(function(e){return a("throw",e,u,s)}))}s(l.arg)}var o;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){a(e,n,t,r)}))}return o=o?o.then(r,r):r()}})}function x(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()}
vendor: 4,501 bytes, line 2
2for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var u=S(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 S(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=h(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,d;var a=i.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function _(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 T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(e){if(e){var t=e[o];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(k,"constructor",{value:y,configurable:!0}),r(y,"constructor",{value:v,configurable:!0}),v.displayName=c(y,s,"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,s,"GeneratorFunction")),e.prototype=Object.create(k),e},e.awrap=function(e){return{__await:e}},w(E.prototype),c(E.prototype,u,(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(k),c(k,s,"Generator"),c(k,o,(function(){return this})),c(k,"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,T.prototype={constructor:T,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];
2if(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 c(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 f(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){c(a,r,i,o,u,"next",e)}function u(e){c(a,r,i,o,u,"throw",e)}o(void 0)}))}}function h(e){if(Array.isArray(e))return e}function d(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 p(e,t){if(e){if("string"===typeof e)return d(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)?d(e,t):void 0}}function v(){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 y(e,t){return h(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,u=[],s=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(u.push(r.value),u.length!==t);s=!0);}catch(c){l=!0,i=c}finally{try{if(!s&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return u}}(e,t)||p(e,t)||v()}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}function g(){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 b(e,t,n){return b=g()?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&&m(i,n.prototype),i},b.apply(null,arguments)}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}function w(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=k(e)););return e}function E(){return E="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=w(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},E.apply(this,arguments)}function x(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=p(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,o=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){u=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(u)throw a}}}}function S(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&&m(e,t)}function _(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function C(e,t){if(t&&("object"===i(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _(e)}function T(e){var t=g();return function(){var n,r=k(e);if(t){var i=k(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return C(this,n)}}function I(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function N(e){return function(e){if(Array.isArray(e))return d(e)}(e)||I(e)||p(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 A(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function D(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,a(r.key),r)}}function L(e,t,n){return t&&D(e.prototype,t),n&&D(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function O(e){var t="function"===typeof Map?new Map:void 0;return O=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 b(e,arguments,k(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),m(n,e)},O(e)}var R=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},P={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>>
26,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(R(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)}}},M=function(e){return function(e){var t=R(e);return P.encodeByteArray(t,!0)}(e).replace(/\./g,"")},F=function(e){try{return P.decodeString(e,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};function j(){try{return"object"===typeof indexedDB}catch(e){return!1}}function U(){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)}}))}var V=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__},B=function(){try{return V()||function(){if("undefined"!==typeof process){var e={NODE_ENV:"production",PUBLIC_URL:"",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&&F(e[1]);return t&&JSON.parse(t)}}()}catch(e){return void console.info("Unable to get __FIREBASE_DEFAULTS__ due to: ".concat(e))}},z=function(e){var t=function(e){var t,n;return null===(n=null===(t=B())||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]}},q=function(){var e;return null===(e=B())||void 0===e?void 0:e.config},H=function(){function e(){var t=this;A(this,e),this.reject=function(){},this.resolve=function(){},this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))}return L(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 W(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[M(JSON.stringify({alg:"none",type:"JWT"})),M(JSON.stringify(a)),""].join(".")}
2var K=function(e){S(n,e);var t=T(n);function n(e,r,i){var a;return A(this,n),(a=t.call(this,r)).code=e,a.customData=i,a.name="FirebaseError",Object.setPrototypeOf(_(a),n.prototype),Error.captureStackTrace&&Error.captureStackTrace(_(a),Q.prototype.create),a}return L(n)}(O(Error)),Q=function(){function e(t,n,r){A(this,e),this.service=t,this.serviceName=n,this.errors=r}return L(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?G(r,t):"Error",a="".concat(this.serviceName,": ").concat(i," (").concat(n,")."),o=new K(n,a,t);return o}}]),e}();function G(e,t){return e.replace($,(function(e,n){var r=t[n];return null!=r?String(r):"<".concat(n,"?>")}))}var $=/\{\$([^}]+)}/g;function Y(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(X(u)&&X(s)){if(!Y(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 X(e){return null!==e&&"object"===typeof e}var J=144e5;function Z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2,r=t*Math.pow(n,e),i=Math.round(.5*r*(Math.random()-.5)*2);return Math.min(J,r+i)}function ee(e){return e&&e._delegate?e._delegate:e}var te=function(){function e(t,n,r){A(this,e),this.name=t,this.instanceFactory=n,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}return L(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}(),ne="[DEFAULT]",re=function(){function e(t,n){A(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 L(e,[{key:"get",value:function(e){var t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){var n=new H;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:ne})}catch(s){}var t,n=x(this.instancesDeferred.entries());try{for(n.s();!(t=n.n()).done;){var r=y(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]:ne;this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}},{key:"delete",value:function(){var e=f(l().mark((function e(){var t;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Array.from(this.instances.values()),e.next=3,Promise.all([].concat(N(t.filter((function(e){return"INTERNAL"in e})).map((function(e){return e.INTERNAL.delete()}))),N(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]:ne;return this.instances.has(e)}},{key:"getOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ne;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=x(this.instancesDeferred.entries());try{for(o.s();!(i=o.n()).done;){var u=y(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=x(n);try{for(i.s();!(r=i.n()).done;){var a=r.value;try{a(e,t)}catch(Of){}}}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===ne?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(Of){}return a||null}},{key:"normalizeInstanceIdentifier",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ne;return this.component?this.component.multipleInstances?e:ne:e}},{key:"shouldAutoInitialize",value:function(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}]),e}();var ie,ae,oe=function(){function e(t){A(this,e),this.name=t,this.providers=new Map}return L(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 re(e,this);return this.providers.set(e,t),t}},{key:"getProviders",value:function(){return Array.from(this.providers.values())}}]),e}(),ue=[];!function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.E
2RROR=4]="ERROR",e[e.SILENT=5]="SILENT"}(ae||(ae={}));var se={debug:ae.DEBUG,verbose:ae.VERBOSE,info:ae.INFO,warn:ae.WARN,error:ae.ERROR,silent:ae.SILENT},le=ae.INFO,ce=(o(ie={},ae.DEBUG,"log"),o(ie,ae.VERBOSE,"log"),o(ie,ae.INFO,"info"),o(ie,ae.WARN,"warn"),o(ie,ae.ERROR,"error"),ie),fe=function(e,t){if(!(t<e.logLevel)){var n=(new Date).toISOString(),r=ce[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))}},he=function(){function e(t){A(this,e),this.name=t,this._logLevel=le,this._logHandler=fe,this._userLogHandler=null,ue.push(this)}return L(e,[{key:"logLevel",get:function(){return this._logLevel},set:function(e){if(!(e in ae))throw new TypeError('Invalid value "'.concat(e,'" assigned to `logLevel`'));this._logLevel=e}},{key:"setLogLevel",value:function(e){this._logLevel="string"===typeof e?se[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,ae.DEBUG].concat(t)),this._logHandler.apply(this,[this,ae.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,ae.VERBOSE].concat(t)),this._logHandler.apply(this,[this,ae.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,ae.INFO].concat(t)),this._logHandler.apply(this,[this,ae.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,ae.WARN].concat(t)),this._logHandler.apply(this,[this,ae.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,ae.ERROR].concat(t)),this._logHandler.apply(this,[this,ae.ERROR].concat(t))}}]),e}();var de,pe;var ve=new WeakMap,ye=new WeakMap,me=new WeakMap,ge=new WeakMap,be=new WeakMap;var ke={get:function(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return ye.get(e);if("objectStoreNames"===t)return e.objectStoreNames||me.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return xe(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 we(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(pe||(pe=[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(Se(this),n),xe(ve.get(this))}:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return xe(e.apply(Se(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,[Se(this),t].concat(r));return me.set(a,t.sort?t.sort():[t]),xe(a)}}function Ee(e){return"function"===typeof e?we(e):(e instanceof IDBTransaction&&function(e){if(!ye.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)}));ye.set(e,t)}}(e),t=e,(de||(de=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some((function(e){return t instanceof e}))?new Proxy(e,ke):e);var t}function xe(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(xe(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&&ve.set(t,e)}
2)).catch((function(){})),be.set(t,e),t}(e);if(ge.has(e))return ge.get(e);var t=Ee(e);return t!==e&&(ge.set(e,t),be.set(t,e)),t}var Se=function(e){return be.get(e)};var _e,Ce,Te=["get","getKey","getAll","getAllKeys","count"],Ie=["put","add","delete","clear"],Ne=new Map;function Ae(e,t){if(e instanceof IDBDatabase&&!(t in e)&&"string"===typeof t){if(Ne.get(t))return Ne.get(t);var n=t.replace(/FromIndex$/,""),r=t!==n,i=Ie.includes(n);if(n in(r?IDBIndex:IDBObjectStore).prototype&&(i||Te.includes(n))){var a=function(){var e=f(l().mark((function e(t){var a,o,u,s,c,f,h=arguments;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(o=this.transaction(t,i?"readwrite":"readonly"),u=o.store,s=h.length,c=new Array(s>1?s-1:0),f=1;f<s;f++)c[f-1]=h[f];return r&&(u=u.index(c.shift())),e.next=6,Promise.all([(a=u)[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 Ne.set(t,a),a}}}ke=function(e){return s(s({},e),{},{get:function(t,n,r){return Ae(t,n)||e.get(t,n,r)},has:function(t,n){return!!Ae(t,n)||e.has(t,n)}})}(ke);var De=function(){function e(t){A(this,e),this.container=t}return L(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 Le="@firebase/app",Oe="0.9.0",Re=new he("@firebase/app"),Pe="[DEFAULT]",Me=(o(_e={},Le,"fire-core"),o(_e,"@firebase/app-compat","fire-core-compat"),o(_e,"@firebase/analytics","fire-analytics"),o(_e,"@firebase/analytics-compat","fire-analytics-compat"),o(_e,"@firebase/app-check","fire-app-check"),o(_e,"@firebase/app-check-compat","fire-app-check-compat"),o(_e,"@firebase/auth","fire-auth"),o(_e,"@firebase/auth-compat","fire-auth-compat"),o(_e,"@firebase/database","fire-rtdb"),o(_e,"@firebase/database-compat","fire-rtdb-compat"),o(_e,"@firebase/functions","fire-fn"),o(_e,"@firebase/functions-compat","fire-fn-compat"),o(_e,"@firebase/installations","fire-iid"),o(_e,"@firebase/installations-compat","fire-iid-compat"),o(_e,"@firebase/messaging","fire-fcm"),o(_e,"@firebase/messaging-compat","fire-fcm-compat"),o(_e,"@firebase/performance","fire-perf"),o(_e,"@firebase/performance-compat","fire-perf-compat"),o(_e,"@firebase/remote-config","fire-rc"),o(_e,"@firebase/remote-config-compat","fire-rc-compat"),o(_e,"@firebase/storage","fire-gcs"),o(_e,"@firebase/storage-compat","fire-gcs-compat"),o(_e,"@firebase/firestore","fire-fst"),o(_e,"@firebase/firestore-compat","fire-fst-compat"),o(_e,"fire-js","fire-js"),o(_e,"firebase","fire-js-all"),_e),Fe=new Map,je=new Map;function Ue(e,t){try{e.container.addComponent(t)}catch(n){Re.debug("Component ".concat(t.name," failed to register with FirebaseApp ").concat(e.name),n)}}function Ve(e){var t=e.name;if(je.has(t))return Re.debug("There were multiple attempts to register component ".concat(t,".")),!1;je.set(t,e);var n,r=x(Fe.values());try{for(r.s();!(n=r.n()).done;){Ue(n.value,e)}}catch(i){r.e(i)}finally{r.f()}return!0}function Be(e,t){var n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}var ze=(o(Ce={},"no-app","No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()"),o(Ce,"bad-app-name","Illegal App name: '{$appName}"),o(Ce,"duplicate-app","Firebase App named '{$appName}' already exists with different options or config"),o(Ce,"app-deleted","Firebase App named '{$appName}' already deleted"),o(Ce,"no-options","Need to provide options, when not being deployed to hosting via source."),o(Ce,"invali
2d-app-argument","firebase.{$appName}() takes either no argument or a Firebase App instance."),o(Ce,"invalid-log-argument","First argument to `onLog` must be null or a function."),o(Ce,"idb-open","Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}."),o(Ce,"idb-get","Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}."),o(Ce,"idb-set","Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}."),o(Ce,"idb-delete","Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."),Ce),qe=new Q("app","Firebase",ze),He=function(){function e(t,n,r){var i=this;A(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 te("app",(function(){return i}),"PUBLIC"))}return L(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 qe.create("app-deleted",{appName:this._name})}}]),e}(),We="9.15.0";function Ke(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:Pe,automaticDataCollectionEnabled:!1},t),a=i.name;if("string"!==typeof a||!a)throw qe.create("bad-app-name",{appName:String(a)});if(n||(n=q()),!n)throw qe.create("no-options");var o=Fe.get(a);if(o){if(Y(n,o.options)&&Y(i,o.config))return o;throw qe.create("duplicate-app",{appName:a})}var u,s=new oe(a),l=x(je.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 He(n,i,s);return Fe.set(a,f),f}function Qe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Pe,t=Fe.get(e);if(!t&&e===Pe)return Ke();if(!t)throw qe.create("no-app",{appName:e});return t}function Ge(e,t,n){var r,i=null!==(r=Me[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 Re.warn(u.join(" "))}Ve(new te("".concat(i,"-version"),(function(){return{library:i,version:t}}),"VERSION"))}var $e="firebase-heartbeat-store",Ye=null;function Xe(){return Ye||(Ye=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=xe(u);return i&&u.addEventListener("upgradeneeded",(function(e){i(xe(u.result),e.oldVersion,e.newVersion,xe(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($e)}}).catch((function(e){throw qe.create("idb-open",{originalErrorMessage:e.message})}))),Ye}function Je(e){return Ze.apply(this,arguments)}function Ze(){return Ze=f(l().mark((function e(t){var n,r;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Xe();case 3:return n=e.sent,e.abrupt("return",n.transaction($e).objectStore($e).get(nt(t)));case 7:e.prev=7,e.t0=e.catch(0),e.t0 instanceof K?Re.warn(e.t0.message):(r=qe.create("idb-get",{originalErrorMessage:null===e.t0||void 0===e.t0?void 0:e.t0.message}),Re.warn(r.message));case 10:case"end":return e.stop()}}),e,null,[[0,7]])}))),Ze.apply(this,arguments)}function et(e,t){return tt.apply(this,arguments)}function tt(){return tt=f(l().mark((function e(t,n){var r,i,a,o;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Xe();case 3:return r=e.sent,i=r.transaction($e,"readwrite"),a=i.objectStore($e),e.next=8,a.put(n,nt(t));case 8:return e.abrupt("return",i.done);case 11:e.prev=11,e.t0=e.catch(0),e.t0 instanceof K?Re.warn(e.t0.message):(o=qe.create("idb-set",{originalErrorMessage:null===e.t0||void 0===e.t0?void 0:e.t0.message}),Re.warn(o.message));case 14:case"end":return e.stop()}}),e,null,[[0,11]])}))),tt.apply(this,arguments)}function nt(e){return"".concat(e.name,"!").concat(e.options.appId)}var rt=function(){function e(t){var n=this;A(this,e),this.container=t,this._heartbeatsCache=null;var r=this.container.getProvider("app").getImmediate();this._storage=new ut(r),this._heartbeatsCachePromise=this._storage.read().then((function(e){return n._heartbeatsCache=e,e}))}return L(e,[{key:"triggerHeartbeat",value:function(){var e=f(l().mark((function e(){var t,n,r;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.container.getProvider("platform-logger").getImmediate(),n=t.getPlatformInfoString(),r=it(),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=f(l().mark((function e(){var t,n,r,i,a;return l().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=it(),n=at(this._heartbeatsCache.heartbeats),r=n.heartbeatsToSend,i=n.unsentEntries,a=M(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 it(){return(new Date).toISOString().substring(0,10)}function at(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1024,r=[],i=e.slice(),a=x(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),st(r)>n)return a.dates.pop(),"break"}else if(r.push({agent:e.agent,dates:[e.date]}),st(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 ot,ut=function(){function e(t){A(this,e),this.app=t,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}return L(e,[{key:"runIndexedDBEnvironmentCheck",value:function(){var e=f(l().mark((function e(){return l().wrap((function(e){for(;;
2)switch(e.prev=e.next){case 0:if(j()){e.next=4;break}return e.abrupt("return",!1);case 4:return e.abrupt("return",U().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=f(l().mark((function e(){var t;return l().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,Je(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=f(l().mark((function e(t){var n,r;return l().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",et(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=f(l().mark((function e(t){var n,r;return l().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",et(this.app,{lastSentHeartbeatDate:null!==(n=t.lastSentHeartbeatDate)&&void 0!==n?n:r.lastSentHeartbeatDate,heartbeats:[].concat(N(r.heartbeats),N(t.heartbeats))}));case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}();function st(e){return M(JSON.stringify({version:2,heartbeats:e})).length}ot="",Ve(new te("platform-logger",(function(e){return new De(e)}),"PRIVATE")),Ve(new te("heartbeat",(function(e){return new rt(e)}),"PRIVATE")),Ge(Le,Oe,ot),Ge(Le,Oe,"esm2017"),Ge("fire-js","");var lt,ct="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof n.g?n.g:"undefined"!==typeof self?self:{},ft={},ht=ht||{},dt=ct||self;function pt(){}function vt(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 yt(e){var t=typeof e;return"object"==t&&null!=e||"function"==t}var mt="closure_uid_"+(1e9*Math.random()>>>0),gt=0;function bt(e,t,n){return e.call.apply(e.bind,arguments)}function kt(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 wt(e,t,n){return(wt=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?bt:kt).apply(null,arguments)}function Et(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 xt(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 St(){this.s=this.s,this.o=this.o}St.prototype.s=!1,St.prototype.na=function(){var e;!this.s&&(this.s=!0,this.M(),0)&&(e=this,Object.prototype.hasOwnProperty.call(e,mt)&&e[mt]||(e[mt]=++gt))},St.prototype.M=function(){if(this.o)for(;this.o.length;)this.o.shift()()};var _t=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 Ct(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 Tt(e,t){for(var n=1;n<arguments.length;n++){var r=arguments[n];if(vt(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 It(e,t){this.type=e,this.g=this.target=t,this.defaultPrevented=!1}It.prototype.h=function(){this.defaultPrevented=!0};var Nt=function(){if(!dt.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});try{dt.addEventListener("test",pt,t),dt.removeEventListener("test",pt,t)}catch(n){}return e}();function At(e){return/^[\s\xa0]*$/.test(e)}var Dt=String.prototype.trim?function(e){return e.trim()}:function(e){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(e)[1]};function Lt(e,t){return e<t?-1:e>t?1:0}function Ot(){var e=dt.navigator;return e&&(e=e.userAgent)?e:""}function Rt(e){return-1!=Ot().indexOf(e)}function Pt(e){return Pt[" "](e),e}Pt[" "]=pt;var Mt,Ft=Rt("Opera"),jt=Rt("Trident")||Rt("MSIE"),Ut=Rt("Edge"),Vt=Ut||jt,Bt=Rt("Gecko")&&!(-1!=Ot().toLowerCase().indexOf("webkit")&&!Rt("Edge"))&&!(Rt("Trident")||Rt("MSIE"))&&!Rt("Edge"),zt=-1!=Ot().toLowerCase().indexOf("webkit")&&!Rt("Edge");function qt(){var e=dt.document;return e?e.documentMode:void 0}e:{var Ht="",Wt=function(){var e=Ot();return Bt?/rv:([^\);]+)(\)|;)/.exec(e):Ut?/Edge\/([\d\.]+)/.exec(e):jt?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(e):zt?/WebKit\/(\S+)/.exec(e):Ft?/(?:Version)[ \/]?(\S+)/.exec(e):void 0}();if(Wt&&(Ht=Wt?Wt[1]:""),jt){var Kt=qt();if(null!=Kt&&Kt>parseFloat(Ht)){Mt=String(Kt);break e}}Mt=Ht}var Qt,Gt={};function $t(){return function(e){var t=Gt;return Object.prototype.hasOwnProperty.call(t,9)?t[9]:t[9]=e(9)}((function(){for(var e=0,t=Dt(String(Mt)).split("."),n=Dt("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=Lt(0==a[1].length?0:parseInt(a[1],10),0==o[1].length?0:parseInt(o[1],10))||Lt(0==a[2].length,0==o[2].length)||Lt(a[2],o[2]),a=a[3],o=o[3]}while(0==e)}return 0<=e}))}if(dt.document&&jt){var Yt=qt();Qt=Yt||(parseInt(Mt,10)||void 0)}else Qt=void 0;var Xt=Qt;function Jt(e,t){if(It.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(Bt){e:{try{Pt(t.nodeName);var i=!0;break e}catch(a){}i=!1}i||(t=null)}}
vendor: 12,560 bytes, line 2
2else"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:Zt[e.pointerType]||"",this.state=e.state,this.i=e,e.defaultPrevented&&Jt.X.h.call(this)}}xt(Jt,It);var Zt={2:"touch",3:"pen",4:"mouse"};Jt.prototype.h=function(){Jt.X.h.call(this);var e=this.i;e.preventDefault?e.preventDefault():e.returnValue=!1};var en="closure_listenable_"+(1e6*Math.random()|0),tn=0;function nn(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=++tn,this.ba=this.ea=!1}function rn(e){e.ba=!0,e.listener=null,e.proxy=null,e.src=null,e.ha=null}function an(e,t,n){for(var r in e)t.call(n,e[r],r,e)}function on(e){var t={};for(var n in e)t[n]=e[n];return t}var un="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function sn(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<un.length;a++)n=un[a],Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}}function ln(e){this.src=e,this.g={},this.h=0}function cn(e,t){var n=t.type;if(n in e.g){var r,i=e.g[n],a=_t(i,t);(r=0<=a)&&Array.prototype.splice.call(i,a,1),r&&(rn(t),0==e.g[n].length&&(delete e.g[n],e.h--))}}function fn(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}ln.prototype.add=function(e,t,n,r,i){var a=e.toString();(e=this.g[a])||(e=this.g[a]=[],this.h++);var o=fn(e,t,r,i);return-1<o?(t=e[o],n||(t.ea=!1)):((t=new nn(t,this.src,a,!!r,i)).ea=n,e.push(t)),t};var hn="closure_lm_"+(1e6*Math.random()|0),dn={};function pn(e,t,n,r,i){if(r&&r.once)return yn(e,t,n,r,i);if(Array.isArray(t)){for(var a=0;a<t.length;a++)pn(e,t[a],n,r,i);return null}return n=xn(n),e&&e[en]?e.N(t,n,yt(r)?!!r.capture:!!r,i):vn(e,t,n,!1,r,i)}function vn(e,t,n,r,i,a){if(!t)throw Error("Invalid event type");var o=yt(i)?!!i.capture:!!i,u=wn(e);if(u||(e[hn]=u=new ln(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=kn;return e}(),n.proxy=r,r.src=e,r.listener=n,e.addEventListener)Nt||(i=o),void 0===i&&(i=!1),e.addEventListener(t.toString(),r,i);else if(e.attachEvent)e.attachEvent(bn(t.toString()),r);else{if(!e.addListener||!e.removeListener)throw Error("addEventListener and attachEvent are unavailable.");e.addListener(r)}return n}function yn(e,t,n,r,i){if(Array.isArray(t)){for(var a=0;a<t.length;a++)yn(e,t[a],n,r,i);return null}return n=xn(n),e&&e[en]?e.O(t,n,yt(r)?!!r.capture:!!r,i):vn(e,t,n,!0,r,i)}function mn(e,t,n,r,i){if(Array.isArray(t))for(var a=0;a<t.length;a++)mn(e,t[a],n,r,i);else r=yt(r)?!!r.capture:!!r,n=xn(n),e&&e[en]?(e=e.i,(t=String(t).toString())in e.g&&(-1<(n=fn(a=e.g[t],n,r,i))&&(rn(a[n]),Array.prototype.splice.call(a,n,1),0==a.length&&(delete e.g[t],e.h--)))):e&&(e=wn(e))&&(t=e.g[t.toString()],e=-1,t&&(e=fn(t,n,r,i)),(n=-1<e?t[e]:null)&&gn(n))}function gn(e){if("number"!==typeof e&&e&&!e.ba){var t=e.src;if(t&&t[en])cn(t.i,e);else{var n=e.type,r=e.proxy;t.removeEventListener?t.removeEventListener(n,r,e.capture):t.detachEvent?t.detachEvent(bn(n),r):t.addListener&&t.removeListener&&t.removeListener(r),(n=wn(t))?(cn(n,e),0==n.h&&(n.src=null,t[hn]=null)):rn(e)}}}function bn(e){return e in dn?dn[e]:dn[e]="on"+e}function kn(e,t){if(e.ba)e=!0;else{t=new Jt(t,this);var n=e.listener,r=e.ha||e.src;e.ea&&gn(e),e=n.call(r,t)}return e}function wn(e){return(e=e[hn])instanceof ln?e:null}var En="__closure_events_fn_"+(1e9*Math.random()>>>0);function xn(e){return"function"===typeof e?e:(e[En]||(e[En]=function(t){return e.handleEvent(t)}),e[En])}function Sn(){St.call(this),this.i=new ln(this),this.P=this,this.I=null}function _n(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 It(t,e);else if(t instanceof It)t.target=t.target||e;else{var i=t;sn(t=new It(r,e),i)}if(i=!0,n)for(var a=n.length-1;0<=a;a--){var o=t.g=n[a];i=Cn(o,r,!0,t)&&i}if(i=Cn(o=t.g=e,r,!0,t)&&i,i=Cn(o,r,!1,t)&&i,n)for(a=0;a<n.length;a++)i=Cn(o=t.g=n[a],r,!1,t)&&i}function Cn(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&&cn(e.i,o),i=!1!==u.call(s,r)&&i}}return i&&!r.defaultPrevented}xt(Sn,St),Sn.prototype[en]=!0,Sn.prototype.removeEventListener=function(e,t,n,r){mn(this,e,t,n,r)},Sn.prototype.M=function(){if(Sn.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++)rn(n[r]);delete t.g[e],t.h--}}this.I=null},Sn.prototype.N=function(e,t,n,r){return this.i.add(String(e),t,!1,n,r)},Sn.prototype.O=function(e,t,n,r){return this.i.add(String(e),t,!0,n,r)};var Tn=dt.JSON.stringify;function In(){var e=Mn,t=null;return e.g&&(t=e.g,e.g=e.g.next,e.g||(e.h=null),t.next=null),t}var Nn,An=function(){function e(){A(this,e),this.h=this.g=null}return L(e,[{key:"add",value:function(e,t){var n=Dn.get();n.set(e,t),this.h?this.h.next=n:this.g=n,this.h=n}}]),e}(),Dn=new(function(){function e(t,n){A(this,e),this.i=t,this.j=n,this.h=0,this.g=null}return L(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 Ln}),(function(e){return e.reset()})),Ln=function(){function e(){A(this,e),this.next=this.g=this.h=null}return L(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 On(e){dt.setTimeout((function(){throw e}),0)}function Rn(e,t){Nn||function(){var e=dt.Promise.resolve(void 0);Nn=function(){e.then(Fn)}}(),Pn||(Nn(),Pn=!0),Mn.add(e,t)}var Pn=!1,Mn=new An;function Fn(){for(var e;e=In();){try{e.h.call(e.g)}catch(n){On(n)}var t=Dn;t.j(e),100>t.h&&(t.h++,e.next=t.g,t.g=e)}Pn=!1}function jn(e,t){Sn.call(this),this.h=e||1,this.g=t||dt,this.j=wt(this.lb,this),this.l=Date.now()}function Un(e){e.ca=!1,e.R&&(e.g.clearTimeout(e.R),e.R=null)}function Vn(e,t,n){if("function"===typeof e)n&&(e=wt(e,n));else{if(!e||"function"!=typeof e.handleEvent)throw Error("Invalid listener argument");e=wt(e.handleEvent,e)}return 2147483647<Number(t)?-1:dt.setTimeout(e,t||0)}function Bn(e){e.g=Vn((function(){e.g=null,e.i&&(e.i=!1,Bn(e))}),e.j);var t=e.h;e.h=null,e.m.apply(null,t)}xt(jn,Sn),(lt=jn.prototype).ca=!1,lt.R=null,lt.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),_n(this,"tick"),this.ca&&(Un(this),this.start()))}},lt.start=function(){this.ca=!0,this.R||(this.R=this.g.setTimeout(this.j,this.h),this.l=Date.now())},lt.M=function(){jn.X.M.call(this),Un(this),delete this.g};var zn=function(e){S(n,e);var t=T(n);function n(e,r){var i;return A(this,n),(i=t.call(this)).m=e,i.j=r,i.h=null,i.i=!1,i.g=null,i}return L(n,[{key:"l",value:function(e){this.h=arguments,this.g?this.i=!0:Bn(this)}},{key:"M",value:function(){E(k(n.prototype),"M",this).call(this),this.g&&(dt.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}]),n}(St);function qn(e){St.call(this),this.h=e,this.g={}}xt(qn,St);var Hn=[];function Wn(e,t,n,r){Array.isArray(n)||(n&&(Hn[0]=n.toString()),n=Hn);for(var i=0;i<n.length;i++){var a=pn(t,n[i],r||e.handleEvent,!1,e.h||e);if(!a)break;e.g[a.key]=a}}function Kn(e){an(e.g,(function(e,t){this.g.hasOwnProperty(t)&&gn(e)}),e),e.g={}}function Qn(){this.g=!0}function Gn(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 Tn(n)}catch(u){return t}}(e,n)+(r?" "+r:"")}))}qn.prototype.M=function(){qn.X.M.call(this),Kn(this)},qn.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")},Qn.prototype.Aa=function(){this.g=!1},Qn.prototype.info=function(){};var $n={},Yn=null;function Xn(){return Yn=Yn||new Sn}function Jn(e){It.call(this,$n.Pa,e)}function Zn(e){var t=Xn();_n(t,new Jn(t))}function er(e,t){It.call(this,$n.STAT_EVENT,e),this.stat=t}function tr(e){var t=Xn();_n(t,new er(t,e))}function nr(e,t){It.call(this,$n.Qa,e),this.size=t}function rr(e,t){if("function"!==typeof e)throw Error("Fn must not be null and must be a function");return dt.setTimeout((function(){e()}),t)}$n.Pa="serverreachability",xt(Jn,It),$n.STAT_EVENT="statevent",xt(er,It),$n.Qa="timingevent",xt(nr,It);var ir={NO_ERROR:0,mb:1,zb:2,yb:3,tb:4,xb:5,Ab:6,Ma:7,TIMEOUT:8,Db:9},ar={rb:"complete",Nb:"success",Na:"error",Ma:"abort",Fb:"ready",Gb:"readystatechange",TIMEOUT:"timeout",Bb:"incrementaldata",Eb:"progress",ub:"downloadprogress",Vb:"uploadprogress"};function or(){}function ur(e){return e.h||(e.h=e.i())}function sr(){}or.prototype.h=null;var lr,cr={OPEN:"a",qb:"b",Na:"c",Cb:"d"};function fr(){It.call(this,"d")}function hr(){It.call(this,"c")}function dr(){}function pr(e,t,n,r){this.l=e,this.j=t,this.m=n,this.U=r||1,this.S=new qn(this),this.O=yr,e=Vt?125:void 0,this.T=new jn(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 vr}function vr(){this.i=null,this.g="",this.h=!1}xt(fr,It),xt(hr,It),xt(dr,or),dr.prototype.g=function(){return new XMLHttpRequest},dr.prototype.i=function(){return{}},lr=new dr;var yr=45e3,mr={},gr={};function br(e,t,n){e.K=1,e.v=jr(Or(t)),e.s=n,e.P=!0,kr(e,null)}function kr(e,t){e.F=Date.now(),Sr(e),e.A=Or(e.v);var n=e.A,r=e.U;Array.isArray(r)||(r=[String(r)]),Xr(n.i,"t",r),e.C=0,n=e.l.H,e.h=new vr,e.g=Ji(e.l,n?t:null,!e.s),0<e.N&&(e.L=new zn(wt(e.La,e,e.g),e.N)),Wn(e.S,e.g,"readystatechange",e.ib),t=e.H?on(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)),Zn(),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 wr(e){return!!e.g&&("GET"==e.u&&2!=e.K&&e.l.Da)}function Er(e,t,n){for(var r,i=!0;!e.I&&e.C<n.length;){if((r=xr(e,n))==gr){4==t&&(e.o=4,tr(14),i=!1),Gn(e.j,e.m,null,"[Incomplete Response]");break}if(r==mr){e.o=4,tr(15),Gn(e.j,e.m,n,"[Invalid Chunk]"),i=!1;break}Gn(e.j,e.m,r,null),Nr(e,r)}wr(e)&&r!=gr&&r!=mr&&(e.h.g="",e.C=0),4!=t||0!=n.length||e.h.h||(e.o=1,tr(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),Hi(t),t.K=!0,tr(11))):(Gn(e.j,e.m,n,"[Invalid Chunked Response]"),Ir(e),Tr(e))}function xr(e,t){var n=e.C,r=t.indexOf("\n",n);return-1==r?gr:(n=Number(t.substring(n,r)),isNaN(n)?mr:(r+=1)+n>t.length?gr:(t=t.substr(r,n),e.C=r+n,t))}function Sr(e){e.V=Date.now()+e.O,_r(e,e.O)}function _r(e,t){if(null!=e.B)throw Error("WatchDog timer not null");e.B=rr(wt(e.gb,e),t)}function Cr(e){e.B&&(dt.clearTimeout(e.B),e.B=null)}function Tr(e){0==e.l.G||e.I||Qi(e.l,e)}function Ir(e){Cr(e);var t=e.L;t&&"function"==typeof t.na&&t.na(),e.L=null,Un(e.T),Kn(e.S),e.g&&(t=e.g,e.g=null,t.abort(),t.na())}function Nr(e,t){try{var n=e.l;if(0!=n.G&&(n.g==e||ai(n.h,e)))if(!e.J&&ai(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;Ki(n),Mi(n)}qi(n),tr(18)}}else n.Ba=i[1],0<n.Ba-n.T&&37500>i[2]&&n.L&&0==n.A&&!n.v&&(n.v=rr(wt(n.cb,n),6e3));if(1>=ii(n.h)&&n.ja){try{n.ja()}catch(a){}n.ja=void 0}}else $i(n,11)}else if((e.J||n.g==e)&&Ki(n),!At(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];
2null!=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&&(oi(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,Fr(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=Xi(r,r.H?r.ka:null,r.V),d.J){ui(r.h,d);var p=d,v=r.J;v&&p.setTimeout(v),p.B&&(Cr(p),Sr(p)),r.g=d}else zi(r);0<n.i.length&&ji(n)}else"stop"!=a[0]&&"close"!=a[0]||$i(n,7);else 3==n.G&&("stop"==a[0]||"close"==a[0]?"stop"==a[0]?$i(n,7):Pi(n):"noop"!=a[0]&&n.l&&n.l.wa(a),n.A=0)}Zn()}catch(a){}}function Ar(e,t){if(e.forEach&&"function"==typeof e.forEach)e.forEach(t,void 0);else if(vt(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(vt(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(vt(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)}(lt=pr.prototype).setTimeout=function(e){this.O=e},lt.ib=function(e){e=e.target;var t=this.L;t&&3==Ni(e)?t.l():this.La(e)},lt.La=function(e){try{if(e==this.g)e:{var t=Ni(this.g),n=this.g.Ea();this.g.aa();if(!(3>t)&&(3!=t||Vt||this.g&&(this.h.h||this.g.fa()||Ai(this.g)))){this.I||4!=t||7==n||Zn(),Cr(this);var r=this.g.aa();this.Y=r;t:if(wr(this)){var i=Ai(this.g);e="";var a=i.length,o=4==Ni(this.g);if(!this.h.i){if("undefined"===typeof TextDecoder){Ir(this),Tr(this);var u="";break t}this.h.i=new dt.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)&&!At(s)){var c=s;break t}}c=null}if(!(r=c)){this.i=!1,this.o=3,tr(12),Ir(this),Tr(this);break e}Gn(this.j,this.m,r,"Initial handshake response via X-HTTP-Initial-Response"),this.J=!0,Nr(this,r)}this.P?(Er(this,t,u),Vt&&this.i&&3==t&&(Wn(this.S,this.T,"tick",this.hb),this.T.start())):(Gn(this.j,this.m,u,null),Nr(this,u)),4==t&&Ir(this),this.i&&!this.I&&(4==t?Qi(this.l,this):(this.i=!1,Sr(this)))}else 400==r&&0<u.indexOf("Unknown SID")?(this.o=3,tr(12)):(this.o=0,tr(13)),Ir(this),Tr(this)}}}catch(t){}},lt.hb=function(){if(this.g){var e=Ni(this.g),t=this.g.fa();this.C<t.length&&(Cr(this),Er(this,e,t),this.i&&4!=e&&Sr(this))}},lt.cancel=function(){this.I=!0,Ir(this)},lt.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&&(Zn(),tr(17)),Ir(this),this.o=2,Tr(this)):_r(this,this.V-e)};var Dr=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function Lr(e,t){if(this.g=this.s=this.j="",this.m=null,this.o=this.l="",this.h=!1,e instanceof Lr){this.h=void 0!==t?t:e.h,Rr(this,e.j),this.s=e.s,this.g=e.g,Pr(this,e.m),this.l=e.l,t=e.i;var n=new Qr;n.i=t.i,t.g&&(n.g=new Map(t.g),n.h=t.h),Mr(this,n),this.o=e.o}else e&&(n=String(e).match(Dr))?(this.h=!!t,Rr(this,n[1]||"",!0),this.s=Ur(n[2]||""),this.g=Ur(n[3]||"",!0),Pr(this,n[4]),this.l=Ur(n[5]||"",!0),Mr(this,n[6]||"",!0),this.o=Ur
2(n[7]||"")):(this.h=!!t,this.i=new Qr(null,this.h))}function Or(e){return new Lr(e)}function Rr(e,t,n){e.j=n?Ur(t,!0):t,e.j&&(e.j=e.j.replace(/:$/,""))}function Pr(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 Mr(e,t,n){t instanceof Qr?(e.i=t,function(e,t){t&&!e.j&&(Gr(e),e.i=null,e.g.forEach((function(e,t){var n=t.toLowerCase();t!=n&&($r(this,t),Xr(this,n,e))}),e)),e.j=t}(e.i,e.h)):(n||(t=Vr(t,Wr)),e.i=new Qr(t,e.h))}function Fr(e,t,n){e.i.set(t,n)}function jr(e){return Fr(e,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),e}function Ur(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function Vr(e,t,n){return"string"===typeof e?(e=encodeURI(e).replace(t,Br),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function Br(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}Lr.prototype.toString=function(){var e=[],t=this.j;t&&e.push(Vr(t,zr,!0),":");var n=this.g;return(n||"file"==t)&&(e.push("//"),(t=this.s)&&e.push(Vr(t,zr,!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(Vr(n,"/"==n.charAt(0)?Hr:qr,!0))),(n=this.i.toString())&&e.push("?",n),(n=this.o)&&e.push("#",Vr(n,Kr)),e.join("")};var zr=/[#\/\?@]/g,qr=/[#\?:]/g,Hr=/[#\?]/g,Wr=/[#\?@]/g,Kr=/#/g;function Qr(e,t){this.h=this.g=null,this.i=e||null,this.j=!!t}function Gr(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 $r(e,t){Gr(e),t=Jr(e,t),e.g.has(t)&&(e.i=null,e.h-=e.g.get(t).length,e.g.delete(t))}function Yr(e,t){return Gr(e),t=Jr(e,t),e.g.has(t)}function Xr(e,t,n){$r(e,t),0<n.length&&(e.i=null,e.g.set(Jr(e,t),Ct(n)),e.h+=n.length)}function Jr(e,t){return t=String(t),e.j&&(t=t.toLowerCase()),t}(lt=Qr.prototype).add=function(e,t){Gr(this),this.i=null,e=Jr(this,e);var n=this.g.get(e);return n||this.g.set(e,n=[]),n.push(t),this.h+=1,this},lt.forEach=function(e,t){Gr(this),this.g.forEach((function(n,r){n.forEach((function(n){e.call(t,n,r,this)}),this)}),this)},lt.oa=function(){Gr(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},lt.W=function(e){Gr(this);var t=[];if("string"===typeof e)Yr(this,e)&&(t=t.concat(this.g.get(Jr(this,e))));else{e=Array.from(this.g.values());for(var n=0;n<e.length;n++)t=t.concat(e[n])}return t},lt.set=function(e,t){return Gr(this),this.i=null,Yr(this,e=Jr(this,e))&&(this.h-=this.g.get(e).length),this.g.set(e,[t]),this.h+=1,this},lt.get=function(e,t){return e&&0<(e=this.W(e)).length?String(e[0]):t},lt.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 Zr=L((function e(t,n){A(this,e),this.h=t,this.g=n}));function ei(e){this.l=e||ni,dt.PerformanceNavigationTiming?e=0<(e=dt.performance.getEntriesByType("navigation")).length&&("hq"==e[0].nextHopProtocol||"h2"==e[0].nextHopProtocol):e=!!(dt.g&&dt.g.Ga&&dt.g.Ga()&&dt.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 ti,ni=10;function ri(e){return!!e.h||!!e.g&&e.g.size>=e.j}function ii(e){return e.h?1:e.g?e.g.size:0}function ai(e,t){return e.h?e.h==t:!!e.g&&e.g.has(t)}function oi(e,t){e.g?e.g.add(t):e.h=t}function ui(e,t){e.h&&e.h==t?e.h=null:e.g&&e.g.has(t)&&e.g.delete(t)}function si(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=x(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 Ct(e.i)}function li(){}function ci(){this.g=new li}function fi(e,t,n){var r=n||"";try{Ar(e,(function(e,n){var i=e;yt(e)&&(i=Tn(e)),t.push(r+n+"="+encodeURIComponent(i))}))}catch(i){throw t.push(r+"type="+encodeURIComponent("_badmap")),i}}function hi(e,t,n,r,i){try{t.onload=null,t.onerror=null,t.onabort=null,t.ontimeout=null,i(r)}catch(a){}}function di(e){this.l=e.ac||null,this.j=e.jb||!1}function pi(e,t){Sn.call(this),this.D=e,this.u=t,this.m=void 0,this.readyState=vi,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}ei.prototype.cancel=function(){if(this.i=si(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&0!==this.g.size){var e,t=x(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()}},li.prototype.stringify=function(e){return dt.JSON.stringify(e,void 0)},li.prototype.parse=function(e){return dt.JSON.parse(e,void 0)},xt(di,or),di.prototype.g=function(){return new pi(this.l,this.j)},di.prototype.i=(ti={},function(){return ti}),xt(pi,Sn);var vi=0;function yi(e){e.j.read().then(e.Ta.bind(e)).catch(e.ga.bind(e))}function mi(e){e.readyState=4,e.l=null,e.j=null,e.A=null,gi(e)}function gi(e){e.onreadystatechange&&e.onreadystatechange.call(e)}(lt=pi.prototype).open=function(e,t){if(this.readyState!=vi)throw this.abort(),Error("Error reopening a connection");this.C=e,this.B=t,this.readyState=1,gi(this)},lt.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};
vendor: 5,460 bytes, line 2
2e&&(t.body=e),(this.D||dt).fetch(new Request(this.B,t)).then(this.Wa.bind(this),this.ga.bind(this))},lt.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,mi(this)),this.readyState=vi},lt.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,gi(this)),this.g&&(this.readyState=3,gi(this),this.g)))if("arraybuffer"===this.responseType)e.arrayBuffer().then(this.Ua.bind(this),this.ga.bind(this));else if("undefined"!==typeof dt.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;yi(this)}else e.text().then(this.Va.bind(this),this.ga.bind(this))},lt.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?mi(this):gi(this),3==this.readyState&&yi(this)}},lt.Va=function(e){this.g&&(this.response=this.responseText=e,mi(this))},lt.Ua=function(e){this.g&&(this.response=e,mi(this))},lt.ga=function(){this.g&&mi(this)},lt.setRequestHeader=function(e,t){this.v.append(e,t)},lt.getResponseHeader=function(e){return this.h&&this.h.get(e.toLowerCase())||""},lt.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(pi.prototype,"withCredentials",{get:function(){return"include"===this.m},set:function(e){this.m=e?"include":"same-origin"}});var bi=dt.JSON.parse;function ki(e){Sn.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=wi,this.K=this.L=!1}xt(ki,Sn);var wi="",Ei=/^https?$/i,xi=["POST","PUT"];function Si(e,t){e.h=!1,e.g&&(e.l=!0,e.g.abort(),e.l=!1),e.j=t,e.m=5,_i(e),Ti(e)}function _i(e){e.D||(e.D=!0,_n(e,"complete"),_n(e,"error"))}function Ci(e){if(e.h&&"undefined"!=typeof ht&&(!e.C[1]||4!=Ni(e)||2!=e.aa()))if(e.v&&4==Ni(e))Vn(e.Ha,0,e);else if(_n(e,"readystatechange"),4==Ni(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(Dr)[1]||null;if(!a&&dt.self&&dt.self.location){var o=dt.self.location.protocol;a=o.substr(0,o.length-1)}i=!Ei.test(a?a.toLowerCase():"")}t=i}if(t)_n(e,"complete"),_n(e,"success");else{e.m=6;try{var u=2<Ni(e)?e.g.statusText:""}catch(s){u=""}e.j=u+" ["+e.aa()+"]",_i(e)}}finally{Ti(e)}}}function Ti(e,t){if(e.g){Ii(e);var n=e.g,r=e.C[0]?pt:null;e.g=null,e.C=null,t||_n(e,"ready");try{n.onreadystatechange=r}catch(i){}}}function Ii(e){e.g&&e.K&&(e.g.ontimeout=null),e.A&&(dt.clearTimeout(e.A),e.A=null)}function Ni(e){return e.g?e.g.readyState:0}function Ai(e){try{if(!e.g)return null;if("response"in e.g)return e.g.response;switch(e.J){case wi:case"text":return e.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in e.g)return e.g.mozResponseArrayBuffer}return null}catch(pa){return null}}function Di(e){var t="";return an(e,(function(e,n){t+=n,t+=":",t+=e,t+="\r\n"})),t}function Li(e,t,n){e:{for(r in n){var r=!1;break e}r=!0}r||(n=Di(n),"string"===typeof e?null!=n&&encodeURIComponent(String(n)):Fr(e,t,n))}function Oi(e,t,n){return n&&n.internalChannelParams&&n.internalChannelParams[e]||t}function Ri(e){this.Ca=0,this.i=[],this.j=new Qn,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=Oi("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=Oi("baseRetryDelayMs",5e3,e),this.bb=Oi("retryDelaySeedMs",1e4,e),this.$a=Oi("forwardChannelMaxRetries",2,e),this.ta=Oi("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 ei(e&&e.concurrentRequestLimit),this.Fa=new ci,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 Pi(e){if(Fi(e),3==e.G){var t=e.U++,n=Or(e.F);Fr(n,"SID",e.I),Fr(n,"RID",t),Fr(n,"TYPE","terminate"),Vi(e,n),(t=new pr(e,e.j,t,void 0)).K=2,t.v=jr(Or(n)),n=!1,dt.navigator&&dt.navigator.sendBeacon&&(n=dt.navigator.sendBeacon(t.v.toString(),"")),!n&&dt.Image&&((new Image).src=t.v,n=!0),n||(t.g=Ji(t.l,null),t.g.da(t.v)),t.F=Date.now(),Sr(t)}Yi(e)}function Mi(e){e.g&&(Hi(e),e.g.cancel(),e.g=null)}function Fi(e){Mi(e),e.u&&(dt.clearTimeout(e.u),e.u=null),Ki(e),e.h.cancel(),e.m&&("number"===typeof e.m&&dt.clearTimeout(e.m),e.m=null)}function ji(e){ri(e.h)||e.m||(e.m=!0,Rn(e.Ja,e),e.C=0)}function Ui(e,t){var n;n=t?t.m:e.U++;var r=Or(e.F);Fr(r,"SID",e.I),Fr(r,"RID",n),Fr(r,"AID",e.T),Vi(e,r),e.o&&e.s&&Li(r,e.o,e.s),n=new pr(e,e.j,n,e.C+1),null===e.o&&(n.H=e.s),t&&(e.i=t.D.concat(e.i)),t=Bi(e,n,1e3),n.setTimeout(
2Math.round(.5*e.ta)+Math.round(.5*e.ta*Math.random())),oi(e.h,n),br(n,r,t)}function Vi(e,t){e.ia&&an(e.ia,(function(e,n){Fr(t,n,e)})),e.l&&Ar({},(function(e,n){Fr(t,n,e)}))}function Bi(e,t,n){n=Math.min(e.i.length,n);var r=e.l?wt(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{fi(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 zi(e){e.g||e.u||(e.Z=1,Rn(e.Ia,e),e.A=0)}function qi(e){return!(e.g||e.u||3<=e.A)&&(e.Z++,e.u=rr(wt(e.Ia,e),Gi(e,e.A)),e.A++,!0)}function Hi(e){null!=e.B&&(dt.clearTimeout(e.B),e.B=null)}function Wi(e){e.g=new pr(e,e.j,"rpc",e.Z),null===e.o&&(e.g.H=e.s),e.g.N=0;var t=Or(e.sa);Fr(t,"RID","rpc"),Fr(t,"SID",e.I),Fr(t,"CI",e.L?"0":"1"),Fr(t,"AID",e.T),Fr(t,"TYPE","xmlhttp"),Vi(e,t),e.o&&e.s&&Li(t,e.o,e.s),e.J&&e.g.setTimeout(e.J);var n=e.g;e=e.ka,n.K=1,n.v=jr(Or(t)),n.s=null,n.P=!0,kr(n,e)}function Ki(e){null!=e.v&&(dt.clearTimeout(e.v),e.v=null)}function Qi(e,t){var n=null;if(e.g==t){Ki(e),Hi(e),e.g=null;var r=2}else{if(!ai(e.h,t))return;n=t.D,ui(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;_n(r=Xn(),new nr(r,n)),ji(e)}else zi(e);else if(3==(i=t.o)||0==i&&0<e.pa||!(1==r&&function(e,t){return!(ii(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=rr(wt(e.Ja,e,t),Gi(e,e.C)),e.C++,!0))}(e,t)||2==r&&qi(e)))switch(n&&0<n.length&&(t=e.h,t.i=t.i.concat(n)),i){case 1:$i(e,5);break;case 4:$i(e,10);break;case 3:$i(e,6);break;default:$i(e,2)}}function Gi(e,t){var n=e.Xa+Math.floor(Math.random()*e.bb);return e.l||(n*=2),n*t}function $i(e,t){if(e.j.info("Error code "+t),2==t){var n=null;e.l&&(n=null);var r=wt(e.kb,e);n||(n=new Lr("//www.google.com/images/cleardot.gif"),dt.location&&"http"==dt.location.protocol||Rr(n,"https"),jr(n)),function(e,t){var n=new Qn;if(dt.Image){var r=new Image;r.onload=Et(hi,n,r,"TestLoadImage: loaded",!0,t),r.onerror=Et(hi,n,r,"TestLoadImage: error",!1,t),r.onabort=Et(hi,n,r,"TestLoadImage: abort",!1,t),r.ontimeout=Et(hi,n,r,"TestLoadImage: timeout",!1,t),dt.setTimeout((function(){r.ontimeout&&r.ontimeout()}),1e4),r.src=e}else t(!1)}(n.toString(),r)}else tr(2);e.G=0,e.l&&e.l.va(t),Yi(e),Fi(e)}function Yi(e){if(e.G=0,e.la=[],e.l){var t=si(e.h);0==t.length&&0==e.i.length||(Tt(e.la,t),Tt(e.la,e.i),e.h.i.length=0,Ct(e.i),e.i.length=0),e.l.ua()}}function Xi(e,t,n){var r=n instanceof Lr?Or(n):new Lr(n,void 0);if(""!=r.g)t&&(r.g=t+"."+r.g),Pr(r,r.m);else{var i=dt.location;r=i.protocol,t=t?t+"."+i.hostname:i.hostname,i=+i.port;var a=new Lr(null,void 0);r&&Rr(a,r),t&&(a.g=t),i&&Pr(a,i),n&&(a.l=n),r=a}return n=e.D,t=e.za,n&&t&&Fr(r,n,t),Fr(r,"VER",e.ma),Vi(e,r),r}function Ji(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 ki(new di({jb:!0})):new ki(e.ra)).Ka(e.H),t}function Zi(){}function ea(){if(jt&&!(10<=Number(Xt)))throw Error("Environmental error: no available transport.")}function ta(e,t){Sn.call(this),this.g=new Ri(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)&&!At(e)&&(this.g.o=e),this.A=t&&t.supportsCrossDomainXhr||!1,this.v=t&&t.sendRawJson||!1,(t=t&&t.httpSessionIdParam)&&!At(t)&&(this.g.D=t,null!==(e=this.h)&&t in e&&(t in(e=this.h)&&delete e[t])),this.j=new ia(this)}function na(e){fr.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 ra(){hr.call(this),this.status=1}function ia(e){this.g=e}(lt=ki.prototype).Ka=function(e){this.L=e},lt.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():lr.g(),this.C=this.u?ur(this.u):ur(lr),this.g.onreadystatechange=wt(this.Ha,this);try{this.F=!0,this.g.open(t,String(e),!0),this.F=!1}catch(u){return void Si(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=x(r.keys());try{for(o.s();!(a=o.n()).done;){var u=a.value;n.set(u,r.get(u))}}catch(d){o.e(d)}finally{o.f()}}r=Array.from(n.keys()).find((function(e){return"content-type"==e.toLowerCase()})),i=dt.FormData&&e instanceof dt.FormData,!(0<=_t(xi,t))||r||i||n.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");var s,l=x(n);try{for(l.s();!(s=l.n()).done;){var c=y(s.value,2),f=c[0],h=c[1];this.g.setRequestHeader(f,h)}}
2catch(d){l.e(d)}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{Ii(this),0<this.B&&((this.K=function(e){return jt&&$t()&&"number"===typeof e.timeout&&void 0!==e.ontimeout}(this.g))?(this.g.timeout=this.B,this.g.ontimeout=wt(this.qa,this)):this.A=Vn(this.qa,this.B,this)),this.v=!0,this.g.send(e),this.v=!1}catch(u){Si(this,u)}},lt.qa=function(){"undefined"!=typeof ht&&this.g&&(this.j="Timed out after "+this.B+"ms, aborting",this.m=8,_n(this,"timeout"),this.abort(8))},lt.abort=function(e){this.g&&this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1,this.m=e||7,_n(this,"complete"),_n(this,"abort"),Ti(this))},lt.M=function(){this.g&&(this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1),Ti(this,!0)),ki.X.M.call(this)},lt.Ha=function(){this.s||(this.F||this.v||this.l?Ci(this):this.fb())},lt.fb=function(){Ci(this)},lt.aa=function(){try{return 2<Ni(this)?this.g.status:-1}catch(ti){return-1}},lt.fa=function(){try{return this.g?this.g.responseText:""}catch(ti){return""}},lt.Sa=function(e){if(this.g){var t=this.g.responseText;return e&&0==t.indexOf(e)&&(t=t.substring(e.length)),bi(t)}},lt.Ea=function(){return this.m},lt.Oa=function(){return"string"===typeof this.j?this.j:String(this.j)},(lt=Ri.prototype).ma=8,lt.G=1,lt.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 pr(this,this.j,e,void 0),n=this.s;if(this.S&&(n?sn(n=on(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=Bi(this,t,r),Fr(i=Or(this.F),"RID",e),Fr(i,"CVER",22),this.D&&Fr(i,"X-HTTP-Session-Id",this.D),Vi(this,i),n&&(this.N?r="headers="+encodeURIComponent(String(Di(n)))+"&"+r:this.o&&Li(i,this.o,n)),oi(this.h,t),this.Ya&&Fr(i,"TYPE","init"),this.O?(Fr(i,"$req",r),Fr(i,"SID","null"),t.Z=!0,br(t,i,null)):br(t,i,r),this.G=2}}else 3==this.G&&(e?Ui(this,e):0==this.i.length||ri(this.h)||Ui(this))},lt.Ia=function(){if(this.u=null,Wi(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=rr(wt(this.eb,this),e)}},lt.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,tr(10),Mi(this),Wi(this))},lt.cb=function(){null!=this.v&&(this.v=null,Mi(this),qi(this),tr(19))},lt.kb=function(e){e?(this.j.info("Successfully pinged google.com"),tr(2)):(this.j.info("Failed to ping google.com"),tr(1))},(lt=Zi.prototype).xa=function(){},lt.wa=function(){},lt.va=function(){},lt.ua=function(){},lt.Ra=function(){},ea.prototype.g=function(e,t){return new ta(e,t)},xt(ta,Sn),ta.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;tr(0),e.V=t,e.ia=n||{},e.L=e.Y,e.F=Xi(e,null,e.V),ji(e)},ta.prototype.close=function(){Pi(this.g)},ta.prototype.u=function(e){var t=this.g;if("string"===typeof e){var n={};n.__data__=e,e=n}else this.v&&((n={}).__data__=Tn(e),e=n);t.i.push(new Zr(t.ab++,e)),3==t.G&&ji(t)},ta.prototype.M=function(){this.g.l=null,delete this.j,Pi(this.g),delete this.g,ta.X.M.call(this)},xt(na,fr),xt(ra,hr),xt(ia,Zi),ia.prototype.xa=function(){_n(this.g,"a")},ia.prototype.wa=function(e){_n(this.g,new na(e))},ia.prototype.va=function(e){_n(this.g,new ra)},ia.prototype.ua=function(){_n(this.g,"b")},ea.prototype.createWebChannel=ea.prototype.g,ta.prototype.send=ta.prototype.u,ta.prototype.open=ta.prototype.m,ta.prototype.close=ta.prototype.close,ir.NO_ERROR=0,ir.TIMEOUT=8,ir.HTTP_ERROR=6,ar.COMPLETE="complete",sr.EventType=cr,cr.OPEN="a",cr.CLOSE="b",cr.ERROR="c",cr.MESSAGE="d",Sn.prototype.listen=Sn.prototype.N,ki.prototype.listenOnce=ki.prototype.O,ki.prototype.getLastError=ki.prototype.Oa,ki.prototype.getLastErrorCode=ki.prototype.Ea,ki.prototype.getStatus=ki.prototype.aa,ki.prototype.getResponseJson=ki.prototype.Sa,ki.prototype.getResponseText=ki.prototype.fa,ki.prototype.send=ki.prototype.da,ki.prototype.setWithCredentials=ki.prototype.Ka;var aa=ft.createWebChannelTransport=function(){return new ea},oa=ft.getStatEventTarget=function(){return Xn()},ua=ft.ErrorCode=ir,sa=ft.EventType=ar,la=ft.Event=$n,ca=ft.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},fa=ft.FetchXmlHttpFactory=di,ha=ft.WebChannel=sr,da=ft.XhrIo=ki,pa="@firebase/firestore",va=function(){function e(t){A(this,e),this.uid=t}return L(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}();
2va.UNAUTHENTICATED=new va(null),va.GOOGLE_CREDENTIALS=new va("google-credentials-uid"),va.FIRST_PARTY=new va("first-party-uid"),va.MOCK_USER=new va("mock-user");var ya="9.15.0",ma=new he("@firebase/firestore");function ga(){return ma.logLevel}function ba(e){if(ma.logLevel<=ae.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(Ea);ma.debug.apply(ma,["Firestore (".concat(ya,"): ").concat(e)].concat(N(i)))}}function ka(e){if(ma.logLevel<=ae.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(Ea);ma.error.apply(ma,["Firestore (".concat(ya,"): ").concat(e)].concat(N(i)))}}function wa(e){if(ma.logLevel<=ae.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(Ea);ma.warn.apply(ma,["Firestore (".concat(ya,"): ").concat(e)].concat(N(i)))}}function Ea(e){if("string"==typeof e)return e;try{return t=e,JSON.stringify(t)}catch(t){return e}var t}function xa(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Unexpected state",t="FIRESTORE (".concat(ya,") INTERNAL ASSERTION FAILED: ")+e;throw ka(t),new Error(t)}function Sa(e,t){e||xa()}function _a(e,t){return e}var Ca={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"},Ta=function(e){S(n,e);var t=T(n);function n(e,r){var i;return A(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 L(n)}(K),Ia=L((function e(){var t=this;A(this,e),this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))})),Na=L((function e(t,n){A(this,e),this.user=n,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization","Bearer ".concat(t))})),Aa=function(){function e(){A(this,e)}return L(e,[{key:"getToken",value:function(){return Promise.resolve(null)}},{key:"invalidateToken",value:function(){}},{key:"start",value:function(e,t){e.enqueueRetryable((function(){return t(va.UNAUTHENTICATED)}))}},{key:"shutdown",value:function(){}}]),e}(),Da=function(){function e(t){A(this,e),this.token=t,this.changeListener=null}return L(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}(),La=function(){function e(t){A(this,e),this.t=t,this.currentUser=va.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}return L(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 Ia;this.o=function(){n.i++,n.currentUser=n.u(),a.resolve(),a=new Ia,e.enqueueRetryable((function(){return i(n.currentUser)}))};var o=function(){var t=a;e.enqueueRetryable(f(l().mark((function e(){return l().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)}))))},u=function(e){ba("FirebaseAuthCredentialsProvider","Auth detected"),n.auth=e,n.auth.addAuthTokenListener(n.o),o()};this.t.onInit((function(e){return u(e)})),setTimeout((function(){if(!n.auth){var e=n.t.getImmediate({optional:!0});e?u(e):(ba("FirebaseAuthCredentialsProvider","Auth not yet detected"),a.resolve(),a=new Ia)}}),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?(ba("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),e.getToken()):n?(Sa("string"==typeof n.accessToken),new Na(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 Sa(null===e||"string"==typeof e),new va(e)}}]),e}(),Oa=function(){function e(t,n,r,i){A(this,e),this.h=t,this.l=n,this.m=r,this.g=i,this.type="FirstParty",this.user=va.FIRST_PARTY,this.p=new Map}return L(e,[{key:"I",value:function(){return this.g?this.g():(Sa(!("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}(),Ra=function(){function e(t,n,r,i){A(this,e),this.h=t,this.l=n,this.m=r,this.g=i}return L(e,[{key:"getToken",value:function(){return Promise.resolve(new Oa(this.h,this.l,this.m,this.g))}},{key:"start",value:function(e,t){e.enqueueRetryable((function(){return t(va.FIRST_PARTY)}))}},{key:"shutdown",value:function(){}},{key:"invalidateToken",value:function(){}}]),e}(),Pa=L((function e(t){A(this,e),this.value=t,this.type="AppCheck",this.headers=new Map,t&&t.length>0&&this.headers.set("x-firebase-appcheck",this.value)})),Ma=function(){function e(t){A(this,e),this.T=t,this.forceRefresh=!1,this.appCheck=null,this.A=null}return L(e,[{key:"start",value:function(e,t){var n=this,r=function(e){null!=e.error&&ba("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,ba("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){ba("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):ba("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?(Sa("string"==typeof t.token),e.A=t.token,new Pa(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 Fa(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;
2r++)n[r]=Math.floor(256*Math.random());return n}var ja=function(){function e(){A(this,e)}return L(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=Fa(40),i=0;i<r.length;++i)n.length<20&&r[i]<t&&(n+=e.charAt(r[i]%e.length));return n}}]),e}();function Ua(e,t){return e<t?-1:e>t?1:0}function Va(e,t,n){return e.length===t.length&&e.every((function(e,r){return n(e,t[r])}))}var Ba=function(){function e(t,n){if(A(this,e),this.seconds=t,this.nanoseconds=n,n<0)throw new Ta(Ca.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(n>=1e9)throw new Ta(Ca.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(t<-62135596800)throw new Ta(Ca.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t);if(t>=253402300800)throw new Ta(Ca.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t)}return L(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?Ua(this.nanoseconds,e.nanoseconds):Ua(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}(),za=function(){function e(t){A(this,e),this.timestamp=t}return L(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 Ba(0,0))}},{key:"max",value:function(){return new e(new Ba(253402300799,999999999))}}]),e}(),qa=function(){function e(t,n,r){A(this,e),void 0===n?n=0:n>t.length&&xa(),void 0===r?r=t.length-n:r>t.length-n&&xa(),this.segments=t,this.offset=n,this.len=r}return L(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}
2(),Ha=function(e){S(n,e);var t=T(n);function n(){return A(this,n),t.apply(this,arguments)}return L(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 a=0,o=r;a<o.length;a++){var u=o[a];if(u.indexOf("//")>=0)throw new Ta(Ca.INVALID_ARGUMENT,"Invalid segment (".concat(u,"). Paths must not contain // in them."));e.push.apply(e,N(u.split("/").filter((function(e){return e.length>0}))))}return new n(e)}},{key:"emptyPath",value:function(){return new n([])}}]),n}(qa),Wa=/^[_a-zA-Z][_a-zA-Z0-9]*$/,Ka=function(e){S(n,e);var t=T(n);function n(){return A(this,n),t.apply(this,arguments)}return L(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 Wa.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 Ta(Ca.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 Ta(Ca.INVALID_ARGUMENT,"Path has trailing escape character: "+e);var s=e[i+1];if("\\"!==s&&"."!==s&&"`"!==s)throw new Ta(Ca.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 Ta(Ca.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new n(t)}},{key:"emptyPath",value:function(){return new n([])}}]),n}(qa),Qa=function(){function e(t){A(this,e),this.path=t}return L(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===Ha.comparator(this.path,e.path)}},{key:"toString",value:function(){return this.path.toString()}}],[{key:"fromPath",value:function(t){return new e(Ha.fromString(t))}},{key:"fromName",value:function(t){return new e(Ha.fromString(t).popFirst(5))}},{key:"empty",value:function(){return new e(Ha.emptyPath())}},{key:"comparator",value:function(e,t){return Ha.comparator(e.path,t.path)}},{key:"isDocumentKey",value:function(e){return e.length%2==0}},{key:"fromSegments",value:function(t){return new e(new Ha(t.slice()))}}]),e}(),Ga=L((function e(t,n,r,i){A(this,e),this.indexId=t,this.collectionGroup=n,this.fields=r,this.indexState=i}));Ga.UNKNOWN_ID=-1;function $a(e,t){var n=e.toTimestamp().seconds,r=e.toTimestamp().nanoseconds+1,i=za.fromTimestamp(1e9===r?new Ba(n+1,0):new Ba(n,r));return new Xa(i,Qa.empty(),t)}function Ya(e){return new Xa(e.readTime,e.key,-1)}var Xa=function(){function e(t,n,r){A(this,e),this.readTime=t,this.documentKey=n,this.largestBatchId=r}return L(e,null,[{key:"min",value:function(){return new e(za.min(),Qa.empty(),-1)}},{key:"max",value:function(){return new e(za.max(),Qa.empty(),-1)}}]),e}();function Ja(e,t){var n=e.readTime.compareTo(t.readTime);return 0!==n?n:0!==(n=Qa.comparator(e.documentKey,t.documentKey))?n:Ua(e.largestBatchId,t.largestBatchId)}var Za="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.",eo=function(){function e(){A(this,e),this.onCommittedListeners=[]}return L(e,[{key:"addOnCommittedListener",value:function(e){this.onCommittedListeners.push(e)}},{key:"raiseOnCommittedEvent",value:function(){this.onCommittedListeners.forEac
2h((function(e){return e()}))}}]),e}();function to(e){return no.apply(this,arguments)}function no(){return no=f(l().mark((function e(t){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.code===Ca.FAILED_PRECONDITION&&t.message===Za){e.next=2;break}throw t;case 2:ba("LocalStore","Unexpectedly lost primary lease");case 3:case"end":return e.stop()}}),e)}))),no.apply(this,arguments)}var ro=function(){function e(t){var n=this;A(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 L(e,[{key:"catch",value:function(e){return this.next(void 0,e)}},{key:"next",value:function(t,n){var r=this;return this.callbackAttached&&xa(),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)}))}}
2,{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=x(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(){var u=s;n(t[u]).next((function(t){a[u]=t,++o===i&&e(a)}),(function(e){return r(e)}))},s=0;s<i;s++)u()}))}},{key:"doWhile",value:function(t,n){return new e((function(e,r){!function i(){!0===t()?n().next((function(){i()}),r):e()}()}))}}]),e}();function io(e){return"IndexedDbTransactionError"===e.name}var ao=function(){function e(t,n){var r=this;A(this,e),this.previousValue=t,n&&(n.sequenceNumberHandler=function(e){return r.ut(e)},this.ct=function(e){return n.writeSequenceNumber(e)})}return L(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}();ao.at=-1;var oo=L((function e(t,n,r,i,a,o,u,s){A(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})),uo=function(){function e(t,n){A(this,e),this.projectId=t,this.database=n||"(default)"}return L(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 so(e){var t=0;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function lo(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(n,e[n])}function co(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function fo(e){return null==e}function ho(e){return 0===e&&1/e==-1/0}function po(e){return"number"==typeof e&&Number.isInteger(e)&&!ho(e)&&e<=Number.MAX_SAFE_INTEGER&&e>=Number.MIN_SAFE_INTEGER}var vo=function(e){function t(e){A(this,t),this.binaryString=e}return L(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 Ua(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}();vo.EMPTY_BYTE_STRING=new vo("");var yo=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function mo(e){if(Sa(!!e),"string"==typeof e){var t=0,n=yo.exec(e);if(Sa(!!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:go(e.seconds),nanos:go(e.nanos)}}function go(e){return"number"==typeof e?e:"string"==typeof e?Number(e):0}function bo(e){return"string"==typeof e?vo.fromBase64String(e):vo.fromUint8Array(e)}function ko(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 wo(e){var t=e.mapValue.fields.__previous_value__;return ko(t)?wo(t):t}function Eo(e){var t=mo(e.mapValue.fields.__local_write_time__.timestampValue);return new Ba(t.seconds,t.nanos)}var xo={mapValue:{fields:{__type__:{stringValue:"__max__"}}}};function So(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?ko(e)?4:jo(e)?9007199254740991:10:xa()}function _o(e,t){if(e===t)return!0;var n=So(e);if(n!==So(t))return!1;switch(n){case 0:case 9007199254740991:return!0;case 1:return e.booleanValue===t.booleanValue;case 4:return Eo(e).isEqual(Eo(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;
2var n=mo(e.timestampValue),r=mo(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 bo(e.bytesValue).isEqual(bo(t.bytesValue))}(e,t);case 7:return e.referenceValue===t.referenceValue;case 8:return function(e,t){return go(e.geoPointValue.latitude)===go(t.geoPointValue.latitude)&&go(e.geoPointValue.longitude)===go(t.geoPointValue.longitude)}(e,t);case 2:return function(e,t){if("integerValue"in e&&"integerValue"in t)return go(e.integerValue)===go(t.integerValue);if("doubleValue"in e&&"doubleValue"in t){var n=go(e.doubleValue),r=go(t.doubleValue);return n===r?ho(n)===ho(r):isNaN(n)&&isNaN(r)}return!1}(e,t);case 9:return Va(e.arrayValue.values||[],t.arrayValue.values||[],_o);case 10:return function(e,t){var n=e.mapValue.fields||{},r=t.mapValue.fields||{};if(so(n)!==so(r))return!1;for(var i in n)if(n.hasOwnProperty(i)&&(void 0===r[i]||!_o(n[i],r[i])))return!1;return!0}(e,t);default:return xa()}}function Co(e,t){return void 0!==(e.values||[]).find((function(e){return _o(e,t)}))}function To(e,t){if(e===t)return 0;var n=So(e),r=So(t);if(n!==r)return Ua(n,r);switch(n){case 0:case 9007199254740991:return 0;case 1:return Ua(e.booleanValue,t.booleanValue);case 2:return function(e,t){var n=go(e.integerValue||e.doubleValue),r=go(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 Io(e.timestampValue,t.timestampValue);case 4:return Io(Eo(e),Eo(t));case 5:return Ua(e.stringValue,t.stringValue);case 6:return function(e,t){var n=bo(e),r=bo(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=Ua(n[i],r[i]);if(0!==a)return a}return Ua(n.length,r.length)}(e.referenceValue,t.referenceValue);case 8:return function(e,t){var n=Ua(go(e.latitude),go(t.latitude));return 0!==n?n:Ua(go(e.longitude),go(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=To(n[i],r[i]);if(a)return a}return Ua(n.length,r.length)}(e.arrayValue,t.arrayValue);case 10:return function(e,t){if(e===xo.mapValue&&t===xo.mapValue)return 0;if(e===xo.mapValue)return 1;if(t===xo.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=Ua(r[o],a[o]);if(0!==u)return u;var s=To(n[r[o]],i[a[o]]);if(0!==s)return s}return Ua(r.length,a.length)}(e.mapValue,t.mapValue);default:throw xa()}}function Io(e,t){if("string"==typeof e&&"string"==typeof t&&e.length===t.length)return Ua(e,t);var n=mo(e),r=mo(t),i=Ua(n.seconds,r.seconds);return 0!==i?i:Ua(n.nanos,r.nanos)}function No(e){return Ao(e)}function Ao(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=mo(e);return"time(".concat(t.seconds,",").concat(t.nanos,")")}(e.timestampValue):"stringValue"in e?e.stringValue:"bytesValue"in e?bo(e.bytesValue).toBase64():"referenceValue"in e?(n=e.referenceValue,Qa.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=x(e.values||[]);try{for(i.s();!(t=i.n()).done;){var a=t.value;r?r=!1:n+=",",n+=Ao(a)}}catch(o){i.e(o)}finally{i.f()}return n+"]"}(e.arrayValue):"mapValue"in e?function(e){var t,n="{",r=!0,i=x(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(Ao(e.fields[a]))}}catch(o){i.e(o)}finally{i.f()}return n+"}"}(e.mapValue):xa();var t,n}function Do(e,t){return{referenceValue:"projects/".concat(e.projectId,"/databases/").concat(e.database,"/documents/").concat(t.path.canonicalString())}}function Lo(e){return!!e&&"integerValue"in e}function Oo(e){return!!e&&"arrayValue"in e}function Ro(e){return!!e&&"nullValue"in e}function Po(e){return!!e&&"doubleValue"in e&&isNaN(Number(e.doubleValue))}function Mo(e){return!!e&&"mapValue"in e}function Fo(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 lo(e.mapValue.fields,(function(e,n){return t.mapValue.fields[e]=Fo(n)})),t}if(e.arrayValue){for(var n={arrayValue:{values:[]}},r=0;r<(e.arrayValue.values||[]).length;++r)n.arrayValue.values[r]=Fo(e.arrayValue.values[r]);return n}return Object.assign({},e)}function jo(e){return"__max__"===(((e.mapValue||{}).fields||{}).__type__||{}).stringValue}var Uo=L((function e(t,n){A(this,e),this.position=t,this.inclusive=n}));function Vo(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()?Qa.comparator(Qa.fromName(o.referenceValue),n.key):To(o,n.data.field(a.field)),"desc"===a.dir&&(r*=-1),0!==r)break}return r}function Bo(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(!_o(e.position[n],t.position[n]))return!1;return!0}var zo=L((function e(){A(this,e)}
2)),qo=function(e){S(n,e);var t=T(n);function n(e,r,i){var a;return A(this,n),(a=t.call(this)).field=e,a.op=r,a.value=i,a}return L(n,[{key:"matches",value:function(e){var t=e.data.field(this.field);return"!="===this.op?null!==t&&this.matchesComparison(To(t,this.value)):null!==t&&So(this.value)===So(t)&&this.matchesComparison(To(t,this.value))}},{key:"matchesComparison",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 xa()}}},{key:"isInequality",value:function(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}},{key:"getFlattenedFilters",value:function(){return[this]}},{key:"getFilters",value:function(){return[this]}},{key:"getFirstInequalityField",value:function(){return this.isInequality()?this.field:null}}],[{key:"create",value:function(e,t,r){return e.isKeyField()?"in"===t||"not-in"===t?this.createKeyFieldInFilter(e,t,r):new Xo(e,t,r):"array-contains"===t?new tu(e,r):"in"===t?new nu(e,r):"not-in"===t?new ru(e,r):"array-contains-any"===t?new iu(e,r):new n(e,t,r)}},{key:"createKeyFieldInFilter",value:function(e,t,n){return"in"===t?new Jo(e,n):new Zo(e,n)}}]),n}(zo),Ho=function(e){S(n,e);var t=T(n);function n(e,r){var i;return A(this,n),(i=t.call(this)).filters=e,i.op=r,i.ht=null,i}return L(n,[{key:"matches",value:function(e){return Wo(this)?void 0===this.filters.find((function(t){return!t.matches(e)})):void 0!==this.filters.find((function(t){return t.matches(e)}))}},{key:"getFlattenedFilters",value:function(){return null!==this.ht||(this.ht=this.filters.reduce((function(e,t){return e.concat(t.getFlattenedFilters())}),[])),this.ht}},{key:"getFilters",value:function(){return Object.assign([],this.filters)}},{key:"getFirstInequalityField",value:function(){var e=this.lt((function(e){return e.isInequality()}));return null!==e?e.field:null}},{key:"lt",value:function(e){var t,n=x(this.getFlattenedFilters());try{for(n.s();!(t=n.n()).done;){var r=t.value;if(e(r))return r}}catch(i){n.e(i)}finally{n.f()}return null}}],[{key:"create",value:function(e,t){return new n(e,t)}}]),n}(zo);function Wo(e){return"and"===e.op}function Ko(e){return Qo(e)&&Wo(e)}function Qo(e){var t,n=x(e.filters);try{for(n.s();!(t=n.n()).done;){if(t.value instanceof Ho)return!1}}catch(r){n.e(r)}finally{n.f()}return!0}function Go(e){if(e instanceof qo)return e.field.canonicalString()+e.op.toString()+No(e.value);var t=e.filters.map((function(e){return Go(e)})).join(",");return"".concat(e.op,"(").concat(t,")")}function $o(e,t){return e instanceof qo?function(e,t){return t instanceof qo&&e.op===t.op&&e.field.isEqual(t.field)&&_o(e.value,t.value)}(e,t):e instanceof Ho?function(e,t){return t instanceof Ho&&e.op===t.op&&e.filters.length===t.filters.length&&e.filters.reduce((function(e,n,r){return e&&$o(n,t.filters[r])}),!0)}(e,t):void xa()}function Yo(e){return e instanceof qo?function(e){return"".concat(e.field.canonicalString()," ").concat(e.op," ").concat(No(e.value))}(e):e instanceof Ho?function(e){return e.op.toString()+" {"+e.getFilters().map(Yo).join(" ,")+"}"}(e):"Filter"}var Xo=function(e){S(n,e);var t=T(n);function n(e,r,i){var a;return A(this,n),(a=t.call(this,e,r,i)).key=Qa.fromName(i.referenceValue),a}return L(n,[{key:"matches",value:function(e){var t=Qa.comparator(e.key,this.key);return this.matchesComparison(t)}}]),n}(qo),Jo=function(e){S(n,e);var t=T(n);function n(e,r){var i;return A(this,n),(i=t.call(this,e,"in",r)).keys=eu("in",r),i}return L(n,[{key:"matches",value:function(e){return this.keys.some((function(t){return t.isEqual(e.key)}))}}]),n}(qo),Zo=function(e){S(n,e);var t=T(n);function n(e,r){var i;return A(this,n),(i=t.call(this,e,"not-in",r)).keys=eu("not-in",r),i}return L(n,[{key:"matches",value:function(e){return!this.keys.some((function(t){return t.isEqual(e.key)}))}}]),n}(qo);function eu(e,t){var n;return((null===(n=t.arrayValue)||void 0===n?void 0:n.values)||[]).map((function(e){return Qa.fromName(e.referenceValue)}))}var tu=function(e){S(n,e);var t=T(n);function n(e,r){return A(this,n),t.call(this,e,"array-contains",r)}return L(n,[{key:"matches",value:function(e){var t=e.data.field(this.field);return Oo(t)&&Co(t.arrayValue,this.value)}}]),n}
2(qo),nu=function(e){S(n,e);var t=T(n);function n(e,r){return A(this,n),t.call(this,e,"in",r)}return L(n,[{key:"matches",value:function(e){var t=e.data.field(this.field);return null!==t&&Co(this.value.arrayValue,t)}}]),n}(qo),ru=function(e){S(n,e);var t=T(n);function n(e,r){return A(this,n),t.call(this,e,"not-in",r)}return L(n,[{key:"matches",value:function(e){if(Co(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;var t=e.data.field(this.field);return null!==t&&!Co(this.value.arrayValue,t)}}]),n}(qo),iu=function(e){S(n,e);var t=T(n);function n(e,r){return A(this,n),t.call(this,e,"array-contains-any",r)}return L(n,[{key:"matches",value:function(e){var t=this,n=e.data.field(this.field);return!(!Oo(n)||!n.arrayValue.values)&&n.arrayValue.values.some((function(e){return Co(t.value.arrayValue,e)}))}}]),n}(qo),au=L((function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"asc";A(this,e),this.field=t,this.dir=n}));function ou(e,t){return e.dir===t.dir&&e.field.isEqual(t.field)}var uu=function(){function e(t,n){A(this,e),this.comparator=t,this.root=n||lu.EMPTY}return L(e,[{key:"insert",value:function(t,n){return new e(this.comparator,this.root.insert(t,n,this.comparator).copy(null,null,lu.BLACK,null,null))}},{key:"remove",value:function(t){return new e(this.comparator,this.root.remove(t,this.comparator).copy(null,null,lu.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 su(this.root,null,this.comparator,!1)}},{key:"getIteratorFrom",value:function(e){return new su(this.root,e,this.comparator,!1)}},{key:"getReverseIterator",value:function(){return new su(this.root,null,this.comparator,!0)}},{key:"getReverseIteratorFrom",value:function(e){return new su(this.root,e,this.comparator,!0)}}]),e}(),su=function(){function e(t,n,r,i){A(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 L(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}(),lu=function(){function e(t,n,r,i,a){A(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 L(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 xa();if(this.right.isRed())throw xa();var e=this.left.check();if(e!==this.right.check())throw xa();return e+(this.isRed()?0:1)}}]),e}();
2lu.EMPTY=null,lu.RED=!0,lu.BLACK=!1,lu.EMPTY=new(function(){function e(){A(this,e),this.size=0}return L(e,[{key:"key",get:function(){throw xa()}},{key:"value",get:function(){throw xa()}},{key:"color",get:function(){throw xa()}},{key:"left",get:function(){throw xa()}},{key:"right",get:function(){throw xa()}},{key:"copy",value:function(e,t,n,r,i){return this}},{key:"insert",value:function(e,t,n){return new lu(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 cu=function(){function e(t){A(this,e),this.comparator=t,this.data=new uu(this.comparator)}return L(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 fu(this.data.getIterator())}},{key:"getIteratorFrom",value:function(e){return new fu(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}(),fu=function(){function e(t){A(this,e),this.iter=t}return L(e,[{key:"getNext",value:function(){return this.iter.getNext().key}},{key:"hasNext",value:function(){return this.iter.hasNext()}}]),e}();var hu=function(){function e(t){A(this,e),this.fields=t,t.sort(Ka.comparator)}return L(e,[{key:"unionWith",value:function(t){var n,r=new cu(Ka.comparator),i=x(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=x(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=x(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 Va(this.fields,e.fields,(function(e,t){return e.isEqual(t)}))}}],[{key:"empty",value:function(){return new e([])}}]),e}(),du=function(){function e(t){A(this,e),this.value=t}return L(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(!Mo(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()]=Fo(t)}},{key:"setAll",value:function(e){var t=this,n=Ka.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()]=Fo(e):i.push(a.lastSegment())}
2));var a=this.getFieldsMap(n);this.applyChanges(a,r,i)}},{key:"delete",value:function(e){var t=this.field(e.popLast());Mo(t)&&t.mapValue.fields&&delete t.mapValue.fields[e.lastSegment()]}},{key:"isEqual",value:function(e){return _o(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)];Mo(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){lo(t,(function(t,n){return e[t]=n}));var r,i=x(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(Fo(this.value))}}],[{key:"empty",value:function(){return new e({mapValue:{}})}}]),e}();var pu=function(){function e(t,n,r,i,a,o,u){A(this,e),this.key=t,this.documentType=n,this.version=r,this.readTime=i,this.createTime=a,this.data=o,this.documentState=u}return L(e,[{key:"convertToFoundDocument",value:function(e,t){return!this.createTime.isEqual(za.min())||2!==this.documentType&&0!==this.documentType||(this.createTime=e),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=du.empty(),this.documentState=0,this}},{key:"convertToUnknownDocument",value:function(e){return this.version=e,this.documentType=3,this.data=du.empty(),this.documentState=2,this}},{key:"setHasCommittedMutations",value:function(){return this.documentState=2,this}},{key:"setHasLocalMutations",value:function(){return this.documentState=1,this.version=za.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.createTime,this.data.clone(),this.documentState)}},{key:"toString",value:function(){return"Document(".concat(this.key,", ").concat(this.version,", ").concat(JSON.stringify(this.data.value),", {createTime: ").concat(this.createTime,"}), {documentType: ").concat(this.documentType,"}), {documentState: ").concat(this.documentState,"})")}}],[{key:"newInvalidDocument",value:function(t){return new e(t,0,za.min(),za.min(),za.min(),du.empty(),0)}},{key:"newFoundDocument",value:function(t,n,r,i){return new e(t,1,n,za.min(),r,i,0)}},{key:"newNoDocument",value:function(t,n){return new e(t,2,n,za.min(),za.min(),du.empty(),0)}},{key:"newUnknownDocument",value:function(t,n){return new e(t,3,n,za.min(),za.min(),du.empty(),2)}}]),e}(),vu=L((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;A(this,e),this.path=t,this.collectionGroup=n,this.orderBy=r,this.filters=i,this.limit=a,this.startAt=o,this.endAt=u,this.ft=null}));function yu(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 vu(e,t,n,r,i,a,o)}function mu(e){var t=_a(e);if(null===t.ft){var n=t.path.canonicalString();null!==t.collectionGroup&&(n+="|cg:"+t.collectionGroup),n+="|f:",n+=t.filters.map((function(e){return Go(e)})).join(","),n+="|ob:",n+=t.orderBy.map((function(e){return function(e){return e.field.canonicalString()+e.dir}(e)})).join(","),fo(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 No(e)})).join(",")),t.endAt&&(n+="|ub:",n+=t.endAt.inclusive?"a:":"b:",n+=t.endAt.position.map((function(e){return No(e)})).join(",")),t.ft=n}return t.ft}function gu(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(!ou(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(!$o(e.filters[r],t.filters[r]))return!1;return e.collectionGroup===t.collectionGroup&&!!e.path.isEqual(t.path)&&!!Bo(e.startAt,t.startAt)&&Bo(e.endAt,t.endAt)}function bu(e){return Qa.isDocumentKey(e.path)&&null===e.collectionGroup&&0===e.filters.length}var ku=L((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;A(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.dt=null,this._t=null,this.startAt,this.endAt}));function wu(e,t,n,r,i,a,o,u){return new ku(e,t,n,r,i,a,o,u)}function Eu(e){return new ku(e)}function xu(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 Su(e){return e.explicitOrderBy.length>0?e.explicitOrderBy[0].field:null}function _u(e){var t,n=x(e.filters);try{for(n.s();!(t=n.n()).done;){var r=t.value.getFirstInequalityField();if(null!==r)return r}}catch(i){n.e(i)}finally{n.f()}return null}function Cu(e){return null!==e.collectionGroup}function Tu(e){var t=_a(e);if(null===t.dt){t.dt=[];var n=_u(t),r=Su(t);if(null!==n&&null===r)n.isKeyField()||t.dt.push(new au(n)),t.dt.push(new au(Ka.keyField(),"asc"));else{var i,a=!1,o=x(t.explicitOrderBy);try{for(o.s();!(i=o.n()).done;){var u=i.value;t.dt.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.dt.push(new au(Ka.keyField(),s))}}}return t.dt}function Iu(e){var t=_a(e);if(!t._t)if("F"===t.limitType)t._t=yu(t.path,t.collectionGroup,Tu(t),t.filters,t.limit,t.startAt,t.endAt);else{var n,r=[],i=x(Tu(t));try{for(i.s();!(n=i.n()).done;){var a=n.value,o="desc"===a.dir?"asc":"desc";r.push(new au(a.field,o))}}catch(l){i.e(l)}finally{i.f()}var u=t.endAt?new Uo(t.endAt.position,t.endAt.inclusive):null,s=t.startAt?new Uo(t.startAt.position,t.startAt.inclusive):null;t._t=yu(t.path,t.collectionGroup,r,t.filters,t.limit,u,s)}return t._t}function Nu(e,t){t.getFirstInequalityField(),_u(e);var n=e.filters.concat([t]);return new ku(e.path,e.collectionGroup,e.explicitOrderBy.slice(),n,e.limit,e.limitType,e.startAt,e.endAt)}function Au(e,t,n){return new ku(e.path,e.collectionGroup,e.explicitOrderBy.slice(),e.filters.slice(),t,n,e.startAt,e.endAt)}function Du(e,t){return gu(Iu(e),Iu(t))&&e.limitType===t.limitType}function Lu(e){return"".concat(mu(Iu(e)),"|lt:").concat(e.limitType)}function Ou(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 Yo(e)})).join(", "),"]")),fo(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 No(e)})).join(",")),e.endAt&&(t+=", endAt: ",t+=e.endAt.inclusive?"a:":"b:",t+=e.endAt.position.map((function(e){return No(e)})).join(",")),"Target(".concat(t,")")}(Iu(e)),"; limitType=").concat(e.limitType,")")}function Ru(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):Qa.isDocumentKey(e.path)?e.path.isEqual(n):e.path.isImmediateParentOf(n)}(e,t)&&function(e,t){var n,r=x(Tu(e));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=x(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=Vo(e,t,n
2);return e.inclusive?r<=0:r<0}(e.startAt,Tu(e),t))&&!(e.endAt&&!function(e,t,n){var r=Vo(e,t,n);return e.inclusive?r>=0:r>0}(e.endAt,Tu(e),t))}(e,t)}function Pu(e){return e.collectionGroup||(e.path.length%2==1?e.path.lastSegment():e.path.get(e.path.length-2))}function Mu(e){return function(t,n){var r,i=!1,a=x(Tu(e));try{for(a.s();!(r=a.n()).done;){var o=r.value,u=Fu(o,t,n);if(0!==u)return u;i=i||o.field.isKeyField()}}catch(s){a.e(s)}finally{a.f()}return 0}}function Fu(e,t,n){var r=e.field.isKeyField()?Qa.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?To(r,i):xa()}(e.field,t,n);switch(e.dir){case"asc":return r;case"desc":return-1*r;default:return xa()}}function ju(e,t){if(e.wt){if(isNaN(t))return{doubleValue:"NaN"};if(t===1/0)return{doubleValue:"Infinity"};if(t===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:ho(t)?"-0":t}}function Uu(e){return{integerValue:""+e}}function Vu(e,t){return po(t)?Uu(t):ju(e,t)}var Bu=L((function e(){A(this,e),this._=void 0}));function zu(e,t,n){return e instanceof Wu?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 Ku?Qu(e,t):e instanceof Gu?$u(e,t):function(e,t){var n=Hu(e,t),r=Xu(n)+Xu(e.gt);return Lo(n)&&Lo(e.gt)?Uu(r):ju(e.yt,r)}(e,t)}function qu(e,t,n){return e instanceof Ku?Qu(e,t):e instanceof Gu?$u(e,t):n}function Hu(e,t){return e instanceof Yu?Lo(n=t)||function(e){return!!e&&"doubleValue"in e}(n)?t:{integerValue:0}:null;var n}var Wu=function(e){S(n,e);var t=T(n);function n(){return A(this,n),t.apply(this,arguments)}return L(n)}(Bu),Ku=function(e){S(n,e);var t=T(n);function n(e){var r;return A(this,n),(r=t.call(this)).elements=e,r}return L(n)}(Bu);function Qu(e,t){var n,r=Ju(t),i=x(e.elements);try{var a=function(){var e=n.value;r.some((function(t){return _o(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 Gu=function(e){S(n,e);var t=T(n);function n(e){var r;return A(this,n),(r=t.call(this)).elements=e,r}return L(n)}(Bu);function $u(e,t){var n,r=Ju(t),i=x(e.elements);try{var a=function(){var e=n.value;r=r.filter((function(t){return!_o(t,e)}))};for(i.s();!(n=i.n()).done;)a()}catch(o){i.e(o)}finally{i.f()}return{arrayValue:{values:r}}}var Yu=function(e){S(n,e);var t=T(n);function n(e,r){var i;return A(this,n),(i=t.call(this)).yt=e,i.gt=r,i}return L(n)}(Bu);function Xu(e){return go(e.integerValue||e.doubleValue)}function Ju(e){return Oo(e)&&e.arrayValue.values?e.arrayValue.values.slice():[]}var Zu=function(){function e(t,n){A(this,e),this.updateTime=t,this.exists=n}return L(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 es(e,t){return void 0!==e.updateTime?t.isFoundDocument()&&t.version.isEqual(e.updateTime):void 0===e.exists||e.exists===t.isFoundDocument()}var ts=L((function e(){A(this,e)}));function ns(e,t){if(!e.hasLocalMutations||t&&0===t.fields.length)return null;if(null===t)return e.isNoDocument()?new ds(e.key,Zu.none()):new os(e.key,e.data,Zu.none());var n,r=e.data,i=du.empty(),a=new cu(Ka.comparator),o=x(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 us(e.key,i,new hu(a.toArray()),Zu.none())}function rs(e,t,n){e instanceof os?function(e,t,n){var r=e.value.clone(),i=ls(e.fieldTransforms,t,n.transformResults);r.setAll(i),t.convertToFoundDocument(n.version,r).setHasCommittedMutations()}(e,t,n):e instanceof us?function(e,t,n){if(es(e.precondition,t)){var r=ls(e.fieldTransforms,t,n.transformResults),i=t.data;i.setAll(ss(e)),i.setAll(r),t.convertToFoundDocument(n.version,i).setHasCommittedMutations()}else t.convertToUnknownDocument(n.version)}
2(e,t,n):function(e,t,n){t.convertToNoDocument(n.version).setHasCommittedMutations()}(0,t,n)}function is(e,t,n,r){return e instanceof os?function(e,t,n,r){if(!es(e.precondition,t))return n;var i=e.value.clone(),a=cs(e.fieldTransforms,r,t);return i.setAll(a),t.convertToFoundDocument(t.version,i).setHasLocalMutations(),null}(e,t,n,r):e instanceof us?function(e,t,n,r){if(!es(e.precondition,t))return n;var i=cs(e.fieldTransforms,r,t),a=t.data;return a.setAll(ss(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 es(e.precondition,t)?(t.convertToNoDocument(t.version).setHasLocalMutations(),null):n}(e,t,n)}function as(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)&&Va(e,t,(function(e,t){return function(e,t){return e.field.isEqual(t.field)&&function(e,t){return e instanceof Ku&&t instanceof Ku||e instanceof Gu&&t instanceof Gu?Va(e.elements,t.elements,_o):e instanceof Yu&&t instanceof Yu?_o(e.gt,t.gt):e instanceof Wu&&t instanceof Wu}(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 os=function(e){S(n,e);var t=T(n);function n(e,r,i){var a,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];
2return A(this,n),(a=t.call(this)).key=e,a.value=r,a.precondition=i,a.fieldTransforms=o,a.type=0,a}return L(n,[{key:"getFieldMask",value:function(){return null}}]),n}(ts),us=function(e){S(n,e);var t=T(n);function n(e,r,i,a){var o,u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];return A(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 L(n,[{key:"getFieldMask",value:function(){return this.fieldMask}}]),n}(ts);function ss(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 ls(e,t,n){var r=new Map;Sa(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,qu(o,u,n[i]))}return r}function cs(e,t,n){var r,i=new Map,a=x(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,zu(u,s,t))}}catch(l){a.e(l)}finally{a.f()}return i}var fs,hs,ds=function(e){S(n,e);var t=T(n);function n(e,r){var i;return A(this,n),(i=t.call(this)).key=e,i.precondition=r,i.type=2,i.fieldTransforms=[],i}return L(n,[{key:"getFieldMask",value:function(){return null}}]),n}(ts),ps=L((function e(t){A(this,e),this.count=t}));function vs(e){if(void 0===e)return ka("GRPC error has no .code"),Ca.UNKNOWN;switch(e){case fs.OK:return Ca.OK;case fs.CANCELLED:return Ca.CANCELLED;case fs.UNKNOWN:return Ca.UNKNOWN;case fs.DEADLINE_EXCEEDED:return Ca.DEADLINE_EXCEEDED;case fs.RESOURCE_EXHAUSTED:return Ca.RESOURCE_EXHAUSTED;case fs.INTERNAL:return Ca.INTERNAL;case fs.UNAVAILABLE:return Ca.UNAVAILABLE;case fs.UNAUTHENTICATED:return Ca.UNAUTHENTICATED;case fs.INVALID_ARGUMENT:return Ca.INVALID_ARGUMENT;case fs.NOT_FOUND:return Ca.NOT_FOUND;case fs.ALREADY_EXISTS:return Ca.ALREADY_EXISTS;case fs.PERMISSION_DENIED:return Ca.PERMISSION_DENIED;case fs.FAILED_PRECONDITION:return Ca.FAILED_PRECONDITION;case fs.ABORTED:return Ca.ABORTED;case fs.OUT_OF_RANGE:return Ca.OUT_OF_RANGE;case fs.UNIMPLEMENTED:return Ca.UNIMPLEMENTED;case fs.DATA_LOSS:return Ca.DATA_LOSS;default:return xa()}}(hs=fs||(fs={}))[hs.OK=0]="OK",hs[hs.CANCELLED=1]="CANCELLED",hs[hs.UNKNOWN=2]="UNKNOWN",hs[hs.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",hs[hs.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",hs[hs.NOT_FOUND=5]="NOT_FOUND",hs[hs.ALREADY_EXISTS=6]="ALREADY_EXISTS",hs[hs.PERMISSION_DENIED=7]="PERMISSION_DENIED",hs[hs.UNAUTHENTICATED=16]="UNAUTHENTICATED",hs[hs.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",hs[hs.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",hs[hs.ABORTED=10]="ABORTED",hs[hs.OUT_OF_RANGE=11]="OUT_OF_RANGE",hs[hs.UNIMPLEMENTED=12]="UNIMPLEMENTED",hs[hs.INTERNAL=13]="INTERNAL",hs[hs.UNAVAILABLE=14]="UNAVAILABLE",hs[hs.DATA_LOSS=15]="DATA_LOSS";var ys=function(){function e(t,n){A(this,e),this.mapKeyFn=t,this.equalsFn=n,this.inner={},this.innerSize=0}return L(e,[{key:"get",value:function(e){var t=this.mapKeyFn(e),n=this.inner[t];if(void 0!==n){var r,i=x(n);try{for(i.s();!(r=i.n()).done;){var a=y(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){lo(this.inner,(function(t,n){var r,i=x(n);try{for(i.s();!(r=i.n()).done;){var a=y(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 co(this.inner)}},{key:"size",value:function(){return this.innerSize}}]),e}(),ms=new uu(Qa.comparator);function gs(){return ms}var bs=new uu(Qa.comparator);function ks(){for(var e=bs,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 ws(e){var t=bs;return e.forEach((function(e,n){return t=t.insert(e,n.overlayedDocument)})),t}function Es(){return Ss()}function xs(){return Ss()}function Ss(){return new ys((function(e){return e.toString()}),(function(e,t){return e.isEqual(t)}))}new uu(Qa.comparator);var _s=new cu(Qa.comparator);function Cs(){for(var e=_s,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 Ts=new cu(Ua);function Is(){return Ts}var Ns=function(){function e(t,n,r,i,a){A(this,e),this.snapshotVersion=t,this.targetChanges=n,this.targetMismatches=r,this.documentUpdates=i,this.resolvedLimboDocuments=a}return L(e,null,[{key:"createSynthesizedRemoteEventForCurrentChange",value:function(t,n,r){var i=new Map;return i.set(t,As.createSynthesizedTargetChangeForCurrentChange(t,n,r)),new e(za.min(),i,Is(),gs(),Cs())}}]),e}(),As=function(){function e(t,n,r,i,a){A(this,e),this.resumeToken=t,this.current=n,this.addedDocuments=r,this.modifiedDocuments=i,this.removedDocuments=a}return L(e,null,[{key:"createSynthesizedTargetChangeForCurrentChange",value:function(t,n,r){return new e(r,n,Cs(),Cs(),Cs())}}]),e}(),Ds=L((function e(t,n,r,i){A(this,e),this.It=t,this.removedTargetIds=n,this.key=r,this.Tt=i})),Ls=L((function e(t,n){A(this,e),this.targetId=t,this.Et=n})),Os=L((function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:vo.EMPTY_BYTE_STRING,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;A(this,e),this.state=t,this.targetIds=n,this.resumeToken=r,this.cause=i})),Rs=function(){function e(){A(this,e),this.At=0,this.Rt=Fs(),this.bt=vo.EMPTY_BYTE_STRING,this.Pt=!1,this.vt=!0}return L(e,[{key:"current",get:function(){return this.Pt}},{key:"resumeToken",get:function(){return this.bt}},{key:"Vt",get:function(){return 0!==this.At}},{key:"St",get:function(){return this.vt}},{key:"Dt",value:function(e){e.approximateByteSize()>0&&(this.vt=!0,this.bt=e)}},{key:"Ct",value:function(){var e=Cs(),t=Cs(),n=Cs();return this.Rt.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:xa()}})),new As(this.bt,this.Pt,e,t,n)}},{key:"xt",value:function(){this.vt=!1,this.Rt=Fs()}},{key:"Nt",value:function(e,t){this.vt=!0,this.Rt=this.Rt.insert(e,t)}},{key:"kt",value:function(e){this.vt=!0,this.Rt=this.Rt.remove(e)}},{key:"Ot",value:function(){this.At+=1}},{key:"Mt",value:function(){this.At-=1}},{key:"Ft",value:function(){this.vt=!0,this.Pt=!0}}]),e}(),Ps=function(){function e(t){A(this,e),this.$t=t,this.Bt=new Map,this.Lt=gs(),this.qt=Ms(),this.Ut=new cu(Ua)}return L(e,[{key:"Kt",value:function(e){var t,n=x(e.It);try{for(n.s();!(t=n.n()).done;){var r=t.value;e.Tt&&e.Tt.isFoundDocument()?this.Gt(r,e.Tt):this.Qt(r,e.key,e.Tt)}}catch(u){n.e(u)}finally{n.f()}var i,a=x(e.removedTargetIds);try{for(a.s();!(i=a.n()).done;){var o=i.value;this.Qt(o,e.key,e.Tt)}}catch(u){a.e(u)}finally{a.f()}}},{key:"jt",value:function(e){var t=this;this.forEachTarget(e,(function(n){var r=t.Wt(n);switch(e.state){case 0:t.zt(n)&&r.Dt(e.resumeToken);break;case 1:r.Mt(),r.Vt||r.xt(),r.Dt(e.resumeToken);break;case 2:r.Mt(),r.Vt||t.removeTarget(n);break;case 3:t.zt(n)&&(r.Ft(),r.Dt(e.resumeToken));break;case 4:t.zt(n)&&(t.Ht(n),r.Dt(e.resumeToken));break;default:xa()}}))}}
2,{key:"forEachTarget",value:function(e,t){var n=this;e.targetIds.length>0?e.targetIds.forEach(t):this.Bt.forEach((function(e,r){n.zt(r)&&t(r)}))}},{key:"Jt",value:function(e){var t=e.targetId,n=e.Et.count,r=this.Yt(t);if(r){var i=r.target;if(bu(i))if(0===n){var a=new Qa(i.path);this.Qt(t,a,pu.newNoDocument(a,za.min()))}else Sa(1===n);else this.Xt(t)!==n&&(this.Ht(t),this.Ut=this.Ut.add(t))}}},{key:"Zt",value:function(e){var t=this,n=new Map;this.Bt.forEach((function(r,i){var a=t.Yt(i);if(a){if(r.current&&bu(a.target)){var o=new Qa(a.target.path);null!==t.Lt.get(o)||t.te(i,o)||t.Qt(i,o,pu.newNoDocument(o,e))}r.St&&(n.set(i,r.Ct()),r.xt())}}));var r=Cs();this.qt.forEach((function(e,n){var i=!0;n.forEachWhile((function(e){var n=t.Yt(e);return!n||2===n.purpose||(i=!1,!1)})),i&&(r=r.add(e))})),this.Lt.forEach((function(t,n){return n.setReadTime(e)}));var i=new Ns(e,n,this.Ut,this.Lt,r);return this.Lt=gs(),this.qt=Ms(),this.Ut=new cu(Ua),i}},{key:"Gt",value:function(e,t){if(this.zt(e)){var n=this.te(e,t.key)?2:0;this.Wt(e).Nt(t.key,n),this.Lt=this.Lt.insert(t.key,t),this.qt=this.qt.insert(t.key,this.ee(t.key).add(e))}}},{key:"Qt",value:function(e,t,n){if(this.zt(e)){var r=this.Wt(e);this.te(e,t)?r.Nt(t,1):r.kt(t),this.qt=this.qt.insert(t,this.ee(t).delete(e)),n&&(this.Lt=this.Lt.insert(t,n))}}},{key:"removeTarget",value:function(e){this.Bt.delete(e)}},{key:"Xt",value:function(e){var t=this.Wt(e).Ct();return this.$t.getRemoteKeysForTarget(e).size+t.addedDocuments.size-t.removedDocuments.size}},{key:"Ot",value:function(e){this.Wt(e).Ot()}},{key:"Wt",value:function(e){var t=this.Bt.get(e);return t||(t=new Rs,this.Bt.set(e,t)),t}},{key:"ee",value:function(e){var t=this.qt.get(e);return t||(t=new cu(Ua),this.qt=this.qt.insert(e,t)),t}},{key:"zt",value:function(e){var t=null!==this.Yt(e);return t||ba("WatchChangeAggregator","Detected inactive target",e),t}},{key:"Yt",value:function(e){var t=this.Bt.get(e);return t&&t.Vt?null:this.$t.ne(e)}},{key:"Ht",value:function(e){var t=this;this.Bt.set(e,new Rs),this.$t.getRemoteKeysForTarget(e).forEach((function(n){t.Qt(e,n,null)}))}},{key:"te",value:function(e,t){return this.$t.getRemoteKeysForTarget(e).has(t)}}]),e}();function Ms(){return new uu(Qa.comparator)}function Fs(){return new uu(Qa.comparator)}var js={asc:"ASCENDING",desc:"DESCENDING"},Us={"<":"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"},Vs={and:"AND",or:"OR"},Bs=L((function e(t,n){A(this,e),this.databaseId=t,this.wt=n}));function zs(e,t){return e.wt?"".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 qs(e,t){return e.wt?t.toBase64():t.toUint8Array()}function Hs(e){return Sa(!!e),za.fromTimestamp(function(e){var t=mo(e);return new Ba(t.seconds,t.nanos)}(e))}function Ws(e,t){return function(e){return new Ha(["projects",e.projectId,"databases",e.database])}(e).child("documents").child(t).canonicalString()}function Ks(e){var t=Ha.fromString(e);return Sa(sl(t)),t}function Qs(e,t){var n=Ks(t);if(n.get(1)!==e.databaseId.projectId)throw new Ta(Ca.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 Ta(Ca.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+e.databaseId.database);return new Qa(Xs(n))}function Gs(e,t){return Ws(e.databaseId,t)}function $s(e){var t=Ks(e);return 4===t.length?Ha.emptyPath():Xs(t)}function Ys(e){return new Ha(["projects",e.databaseId.projectId,"databases",e.databaseId.database]).canonicalString()}function Xs(e){return Sa(e.length>4&&"documents"===e.get(4)),e.popFirst(5)}function Js(e,t){return{documents:[Gs(e,t.path)]}}function Zs(e,t){var n={structuredQuery:{}},r=t.path;null!==t.collectionGroup?(n.parent=Gs(e,r),n.structuredQuery.from=[{collectionId:t.collectionGroup,allDescendants:!0}]):(n.parent=Gs(e,r.popLast()),n.structuredQuery.from=[{collectionId:r.lastSegment()}]);var i=function(e){if(0!==e.length)return ul(Ho.create(e,"and"))}(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:al(e.field),direction:nl(e.dir)}}(e)}))}(t.orderBy);a&&(n.structuredQuery.orderBy=a);var o,u=function(e,t){return e.wt||fo(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}
2function el(e){var t=$s(e.parent),n=e.structuredQuery,r=n.from?n.from.length:0,i=null;if(r>0){Sa(1===r);var a=n.from[0];a.allDescendants?i=a.collectionId:t=t.child(a.collectionId)}var o=[];n.where&&(o=function(e){var t=tl(e);return t instanceof Ho&&Ko(t)?t.getFilters():[t]}(n.where));var u=[];n.orderBy&&(u=n.orderBy.map((function(e){return function(e){return new au(ol(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 fo(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 Uo(n,t)}(n.startAt));var c=null;return n.endAt&&(c=function(e){var t=!e.before,n=e.values||[];return new Uo(n,t)}(n.endAt)),wu(t,i,u,o,s,"F",l,c)}function tl(e){return void 0!==e.unaryFilter?function(e){switch(e.unaryFilter.op){case"IS_NAN":var t=ol(e.unaryFilter.field);return qo.create(t,"==",{doubleValue:NaN});case"IS_NULL":var n=ol(e.unaryFilter.field);return qo.create(n,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":var r=ol(e.unaryFilter.field);return qo.create(r,"!=",{doubleValue:NaN});case"IS_NOT_NULL":var i=ol(e.unaryFilter.field);return qo.create(i,"!=",{nullValue:"NULL_VALUE"});default:return xa()}}(e):void 0!==e.fieldFilter?function(e){return qo.create(ol(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 xa()}}(e.fieldFilter.op),e.fieldFilter.value)}(e):void 0!==e.compositeFilter?function(e){return Ho.create(e.compositeFilter.filters.map((function(e){return tl(e)})),function(e){switch(e){case"AND":return"and";case"OR":return"or";default:return xa()}}(e.compositeFilter.op))}(e):xa()}function nl(e){return js[e]}function rl(e){return Us[e]}function il(e){return Vs[e]}function al(e){return{fieldPath:e.canonicalString()}}function ol(e){return Ka.fromServerFormat(e.fieldPath)}function ul(e){return e instanceof qo?function(e){if("=="===e.op){if(Po(e.value))return{unaryFilter:{field:al(e.field),op:"IS_NAN"}};if(Ro(e.value))return{unaryFilter:{field:al(e.field),op:"IS_NULL"}}}else if("!="===e.op){if(Po(e.value))return{unaryFilter:{field:al(e.field),op:"IS_NOT_NAN"}};if(Ro(e.value))return{unaryFilter:{field:al(e.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:al(e.field),op:rl(e.op),value:e.value}}}(e):e instanceof Ho?function(e){var t=e.getFilters().map((function(e){return ul(e)}));return 1===t.length?t[0]:{compositeFilter:{op:il(e.op),filters:t}}}(e):xa()}function sl(e){return e.length>=4&&"projects"===e.get(0)&&"databases"===e.get(2)}var ll=["mutationQueues","mutations","documentMutations","remoteDocuments","targets","owner","targetGlobal","targetDocuments"].concat(["clientMetadata"]).concat(["remoteDocumentGlobal"]).concat(["collectionParents"]).concat(["bundles","namedQueries"]),cl=([].concat(N(ll),["documentOverlays"]),["mutationQueues","mutations","documentMutations","remoteDocumentsV14","targets","owner","targetGlobal","targetDocuments","clientMetadata","remoteDocumentGlobal","collectionParents","bundles","namedQueries","documentOverlays"]),fl=cl;[].concat(fl,["indexConfiguration","indexState","indexEntries"]);var hl=function(){function e(t,n,r,i){A(this,e),this.batchId=t,this.localWriteTime=n,this.baseMutations=r,this.mutations=i}return L(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)&&rs(i,e,n[r])}}},{key:"applyToLocalView",value:function(e,t){var n,r=x(this.baseMutations);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.key.isEqual(e.key)&&(t=is(i,e,t,this.localWriteTime))}}catch(s){r.e(s)}finally{r.f()}var a,o=x(this.mutations);try{for(o.s();!(a=o.n()).done;){var u=a.value;u.key.isEqual(e.key)&&(t=is(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=xs();return this.mutations.forEach((function(i){var a=e.get(i.key),o=a.overlayedDocument,u=n.applyToLocalView(o,a.mutatedFields),s=ns(o,u=t.has(i.key)?null:u);null!==s&&r.set(i.key,s),o.isValidDocument()||o.convertToNoDocument(za.min())})),r}},{key:"keys",value:function(){return this.mutations.reduce((function(e,t){return e.add(t.key)}),Cs())}},{key:"isEqual",value:function(e){return this.batchId===e.batchId&&Va(this.mutations,e.mutations,(function(e,t){return as(e,t)}))&&Va(this.baseMutations,e.baseMutations,(function(e,t){return as(e,t)}))}}]),e}(),dl=function(){function e(t,n){A(this,e),this.largestBatchId=t,this.mutation=n}return L(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}(),pl=function(){function e(t,n,r,i){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:za.min(),o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:za.min(),u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:vo.EMPTY_BYTE_STRING;A(this,e),this.target=t,this.targetId=n,this.purpose=r,this.sequenceNumber=i,this.snapshotVersion=a,this.lastLimboFreeSnapshotVersion=o,this.resumeToken=u}return L(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}(),vl=L((function e(t){A(this,e),this.ie=t}));function yl(e){var t=el({parent:e.parent,structuredQuery:e.structuredQuery});return"LAST"===e.limitType?Au(t,t.limit,"L"):t}var ml=function(){function e(){A(this,e)}return L(e,[{key:"ue",value:function(e,t){this.ce(e,t),t.ae()}},{key:"ce",value:function(e,t){if("nullValue"in e)this.he(t,5);else if("booleanValue"in e)this.he(t,10),t.le(e.booleanValue?1:0);else if("integerValue"in e)this.he(t,15),t.le(go(e.integerValue));else if("doubleValue"in e){var n=go(e.doubleValue);isNaN(n)?this.he(t,13):(this.he(t,15),ho(n)?t.le(0):t.le(n))}else if("timestampValue"in e){var r=e.timestampValue;this.he(t,20),"string"==typeof r?t.fe(r):(t.fe("".concat(r.seconds||"")),t.le(r.nanos||0))}else if("stringValue"in e)this.de(e.stringValue,t),this._e(t);else if("bytesValue"in e)this.he(t,30),t.we(bo(e.bytesValue)),this._e(t);else if("referenceValue"in e)this.me(e.referenceValue,t);else if("geoPointValue"in e){var i=e.geoPointValue;this.he(t,45),t.le(i.latitude||0),t.le(i.longitude||0)}else"mapValue"in e?jo(e)?this.he(t,Number.MAX_SAFE_INTEGER):(this.ge(e.mapValue,t),this._e(t)):"arrayValue"in e?(this.ye(e.arrayValue,t),this._e(t)):xa()}},{key:"de",value:function(e,t){this.he(t,25),this.pe(e,t)}},{key:"pe",value:function(e,t){t.fe(e)}},{key:"ge",value:function(e,t){var n=e.fields||{};
2this.he(t,55);for(var r=0,i=Object.keys(n);r<i.length;r++){var a=i[r];this.de(a,t),this.ce(n[a],t)}}},{key:"ye",value:function(e,t){var n=e.values||[];this.he(t,50);var r,i=x(n);try{for(i.s();!(r=i.n()).done;){var a=r.value;this.ce(a,t)}}catch(o){i.e(o)}finally{i.f()}}},{key:"me",value:function(e,t){var n=this;this.he(t,37),Qa.fromName(e).path.forEach((function(e){n.he(t,60),n.pe(e,t)}))}},{key:"he",value:function(e,t){e.le(t)}},{key:"_e",value:function(e){e.le(2)}}]),e}();ml.Ie=new ml;var gl=function(){function e(){A(this,e),this.Je=new bl}return L(e,[{key:"addToCollectionParentIndex",value:function(e,t){return this.Je.add(t),ro.resolve()}},{key:"getCollectionParents",value:function(e,t){return ro.resolve(this.Je.getEntries(t))}},{key:"addFieldIndex",value:function(e,t){return ro.resolve()}},{key:"deleteFieldIndex",value:function(e,t){return ro.resolve()}},{key:"getDocumentsMatchingTarget",value:function(e,t){return ro.resolve(null)}},{key:"getIndexType",value:function(e,t){return ro.resolve(0)}},{key:"getFieldIndexes",value:function(e,t){return ro.resolve([])}},{key:"getNextCollectionGroupToUpdate",value:function(e){return ro.resolve(null)}},{key:"getMinOffset",value:function(e,t){return ro.resolve(Xa.min())}},{key:"getMinOffsetFromCollectionGroup",value:function(e,t){return ro.resolve(Xa.min())}},{key:"updateCollectionGroup",value:function(e,t,n){return ro.resolve()}},{key:"updateIndexEntries",value:function(e,t){return ro.resolve()}}]),e}(),bl=function(){function e(){A(this,e),this.index={}}return L(e,[{key:"add",value:function(e){var t=e.lastSegment(),n=e.popLast(),r=this.index[t]||new cu(Ha.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 cu(Ha.comparator)).toArray()}}]),e}();new Uint8Array(0);var kl=function(){function e(t,n,r){A(this,e),this.cacheSizeCollectionThreshold=t,this.percentileToCollect=n,this.maximumSequenceNumbersToCollect=r}return L(e,null,[{key:"withCacheSize",value:function(t){return new e(t,e.DEFAULT_COLLECTION_PERCENTILE,e.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}}]),e}();kl.DEFAULT_COLLECTION_PERCENTILE=10,kl.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,kl.DEFAULT=new kl(41943040,kl.DEFAULT_COLLECTION_PERCENTILE,kl.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),kl.DISABLED=new kl(-1,0,0);var wl=function(){function e(t){A(this,e),this.bn=t}return L(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 El=function(){function e(){A(this,e),this.changes=new ys((function(e){return e.toString()}),(function(e,t){return e.isEqual(t)})),this.changesApplied=!1}return L(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,pu.newInvalidDocument(e).setReadTime(t))}},{key:"getEntry",value:function(e,t){this.assertNotApplied();var n=this.changes.get(t);return void 0!==n?ro.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 xl=L((function e(t,n){A(this,e),this.overlayedDocument=t,this.mutatedFields=n})),Sl=function(){function e(t,n,r,i){A(this,e),this.remoteDocumentCache=t,this.mutationQueue=n,this.documentOverlayCache=r,this.indexManager=i}return L(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.remoteDocumentCache.getEntry(e,t)})).next((function(e){return null!==r&&is(r.mutation,e,hu.empty(),Ba.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,Cs()).next((function(){return t}))}))}},{key:"getLocalViewOfDocuments",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Cs(),i=Es();return this.populateOverlays(e,i,t).next((function(){return n.computeViews(e,t,i,r).next((function(e){var t=ks();return e.forEach((function(e,n){t=t.insert(e,n.overlayedDocument)})),t}))}))}},{key:"getOverlayedDocuments",value:function(e,t){var n=this,r=Es();return this.populateOverlays(e,r,t).next((function(){return n.computeViews(e,t,r,Cs())}))}},{key:"populateOverlays",value:function(e,t,n){var r=[];
2return 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=gs(),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 us)?i=i.insert(t.key,t):void 0!==o&&(a.set(t.key,o.mutation.getFieldMask()),is(o.mutation,t,o.mutation.getFieldMask(),Ba.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 xl(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 uu((function(e,t){return e-t})),a=Cs();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,t).next((function(e){var n,a=x(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)||hu.empty();o=e.applyToLocalView(a,o),r.set(n,o);var u=(i.get(e.batchId)||Cs()).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=xs();l.forEach((function(e){if(!a.has(e)){var n=ns(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 ro.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 Qa.isDocumentKey(e.path)&&null===e.collectionGroup&&0===e.filters.length}(t)?this.getDocumentsMatchingDocumentQuery(e,t.path):Cu(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):ro.resolve(Es()),u=-1,s=a;return o.next((function(t){return ro.forEach(t,(function(t,n){return u<n.largestBatchId&&(u=n.largestBatchId),a.get(t)?ro.resolve():i.remoteDocumentCache.getEntry(e,t).next((function(e){s=s.insert(t,e)}))})).next((function(){return i.populateOverlays(e,t,a)})).next((function(){return i.computeViews(e,s,t,Cs())})).next((function(e){return{batchId:u,changes:ws(e)}}))}))}))}},{key:"getDocumentsMatchingDocumentQuery",value:function(e,t){return this.getDocument(e,new Qa(t)).next((function(e){var t=ks();return e.isFoundDocument()&&(t=t.insert(e.key,e)),t}))}},{key:"getDocumentsMatchingCollectionGroupQuery",value:function(e,t,n){var r=this,i=t.collectionGroup,a=ks();return this.indexManager.getCollectionParents(e,i).next((function(o){return ro.forEach(o,(function(o){var u=function(e,t){return new ku(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,pu.newInvalidDocument(n)))}));var n=ks();return r.forEach((function(r,i){var a=e.get(r);void 0!==a&&is(a.mutation,i,hu.empty(),Ba.now()),Ru(t,i)&&(n=n.insert(r,i))})),n}))}}]),e}(),_l=function(){function e(t){A(this,e),this.yt=t,this.Zn=new Map,this.ts=new Map}return L(e,[{key:"getBundleMetadata",value:function(e,t){return ro.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:Hs(n.createTime)}),ro.resolve()}}
2,{key:"getNamedQuery",value:function(e,t){return ro.resolve(this.ts.get(t))}},{key:"saveNamedQuery",value:function(e,t){return this.ts.set(t.name,function(e){return{name:e.name,query:yl(e.bundledQuery),readTime:Hs(e.readTime)}}(t)),ro.resolve()}}]),e}(),Cl=function(){function e(){A(this,e),this.overlays=new uu(Qa.comparator),this.es=new Map}return L(e,[{key:"getOverlay",value:function(e,t){return ro.resolve(this.overlays.get(t))}},{key:"getOverlays",value:function(e,t){var n=this,r=Es();return ro.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.oe(e,t,i)})),ro.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)),ro.resolve()}},{key:"getOverlaysForCollection",value:function(e,t,n){for(var r=Es(),i=t.length+1,a=new Qa(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 ro.resolve(r)}},{key:"getOverlaysForCollectionGroup",value:function(e,t,n,r){for(var i=new uu((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=Es(),i=i.insert(o.largestBatchId,u)),u.set(o.getKey(),o)}}for(var s=Es(),l=i.getIterator();l.hasNext()&&(l.getNext().value.forEach((function(e,t){return s.set(e,t)})),!(s.size()>=r)););return ro.resolve(s)}},{key:"oe",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 dl(t,n));var a=this.es.get(t);void 0===a&&(a=Cs(),this.es.set(t,a)),this.es.set(t,a.add(n.key))}}]),e}(),Tl=function(){function e(){A(this,e),this.ns=new cu(Il.ss),this.rs=new cu(Il.os)}return L(e,[{key:"isEmpty",value:function(){return this.ns.isEmpty()}},{key:"addReference",value:function(e,t){var n=new Il(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 Il(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 Qa(new Ha([])),r=new Il(n,e),i=new Il(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 Qa(new Ha([])),n=new Il(t,e),r=new Il(t,e+1),i=Cs();return this.rs.forEachInRange([n,r],(function(e){i=i.add(e.key)})),i}},{key:"containsKey",value:function(e){var t=new Il(e,0),n=this.ns.firstAfterOrEqual(t);return null!==n&&e.isEqual(n.key)}}]),e}(),Il=function(){function e(t,n){A(this,e),this.key=t,this._s=n}return L(e,null,[{key:"ss",value:function(e,t){return Qa.comparator(e.key,t.key)||Ua(e._s,t._s)}},{key:"os",value:function(e,t){return Ua(e._s,t._s)||Qa.comparator(e.key,t.key)}}]),e}(),Nl=function(){function e(t,n){A(this,e),this.indexManager=t,this.referenceDelegate=n,this.mutationQueue=[],this.ws=1,this.gs=new cu(Il.ss)}return L(e,[{key:"checkEmpty",value:function(e){return ro.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 hl(i,t,n,r);this.mutationQueue.push(a);var o,u=x(r);try{for(u.s();!(o=u.n()).done;){var s=o.value;this.gs=this.gs.add(new Il(s.key,i)),this.indexManager.addToCollectionParentIndex(e,s.key.path.popLast())}}catch(l){u.e(l)}finally{u.f()}return ro.resolve(a)}},{key:"lookupMutationBatch",value:function(e,t){return ro.resolve(this.ys(t))}},{key:"getNextMutationBatchAfterBatchId",value:function(e,t){var n=t+1,r=this.ps(n),i=r
2<0?0:r;return ro.resolve(this.mutationQueue.length>i?this.mutationQueue[i]:null)}},{key:"getHighestUnacknowledgedBatchId",value:function(){return ro.resolve(0===this.mutationQueue.length?-1:this.ws-1)}},{key:"getAllMutationBatches",value:function(e){return ro.resolve(this.mutationQueue.slice())}},{key:"getAllMutationBatchesAffectingDocumentKey",value:function(e,t){var n=this,r=new Il(t,0),i=new Il(t,Number.POSITIVE_INFINITY),a=[];return this.gs.forEachInRange([r,i],(function(e){var t=n.ys(e._s);a.push(t)})),ro.resolve(a)}},{key:"getAllMutationBatchesAffectingDocumentKeys",value:function(e,t){var n=this,r=new cu(Ua);return t.forEach((function(e){var t=new Il(e,0),i=new Il(e,Number.POSITIVE_INFINITY);n.gs.forEachInRange([t,i],(function(e){r=r.add(e._s)}))})),ro.resolve(this.Is(r))}},{key:"getAllMutationBatchesAffectingQuery",value:function(e,t){var n=t.path,r=n.length+1,i=n;Qa.isDocumentKey(i)||(i=i.child(""));var a=new Il(new Qa(i),0),o=new cu(Ua);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),ro.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;Sa(0===this.Ts(t.batchId,"removed")),this.mutationQueue.shift();var r=this.gs;return ro.forEach(t.mutations,(function(i){var a=new Il(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 Il(t,0),r=this.gs.firstAfterOrEqual(n);return ro.resolve(t.isEqual(r&&r.key))}},{key:"performConsistencyCheck",value:function(e){return this.mutationQueue.length,ro.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}(),Al=function(){function e(t){A(this,e),this.Es=t,this.docs=new uu(Qa.comparator),this.size=0}return L(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 ro.resolve(n?n.document.mutableCopy():pu.newInvalidDocument(t))}},{key:"getEntries",value:function(e,t){var n=this,r=gs();return t.forEach((function(e){var t=n.docs.get(e);r=r.insert(e,t?t.document.mutableCopy():pu.newInvalidDocument(e))})),ro.resolve(r)}},{key:"getAllFromCollection",value:function(e,t,n){for(var r=gs(),i=new Qa(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||Ja(Ya(s),n)<=0||(r=r.insert(s.key,s.mutableCopy()))}return ro.resolve(r)}},{key:"getAllFromCollectionGroup",value:function(e,t,n,r){xa()}},{key:"As",value:function(e,t){return ro.forEach(this.docs,(function(e){return t(e)}))}},{key:"newChangeBuffer",value:function(e){return new Dl(this)}},{key:"getSize",value:function(e){return ro.resolve(this.size)}}]),e}(),Dl=function(e){S(n,e);var t=T(n);function n(e){var r;return A(this,n),(r=t.call(this)).Yn=e,r}return L(n,[{key:"applyChanges",value:function(e){var t=this,n=[];
2return this.changes.forEach((function(r,i){i.isValidDocument()?n.push(t.Yn.addEntry(e,i)):t.Yn.removeEntry(r)})),ro.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}(El),Ll=function(){function e(t){A(this,e),this.persistence=t,this.Rs=new ys((function(e){return mu(e)}),gu),this.lastRemoteSnapshotVersion=za.min(),this.highestTargetId=0,this.bs=0,this.Ps=new Tl,this.targetCount=0,this.vs=wl.Pn()}return L(e,[{key:"forEachTarget",value:function(e,t){return this.Rs.forEach((function(e,n){return t(n)})),ro.resolve()}},{key:"getLastRemoteSnapshotVersion",value:function(e){return ro.resolve(this.lastRemoteSnapshotVersion)}},{key:"getHighestSequenceNumber",value:function(e){return ro.resolve(this.bs)}},{key:"allocateTargetId",value:function(e){return this.highestTargetId=this.vs.next(),ro.resolve(this.highestTargetId)}},{key:"setTargetsMetadata",value:function(e,t,n){return n&&(this.lastRemoteSnapshotVersion=n),t>this.bs&&(this.bs=t),ro.resolve()}},{key:"Dn",value:function(e){this.Rs.set(e.target,e);var t=e.targetId;t>this.highestTargetId&&(this.vs=new wl(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,ro.resolve()}},{key:"updateTargetData",value:function(e,t){return this.Dn(t),ro.resolve()}},{key:"removeTargetData",value:function(e,t){return this.Rs.delete(t.target),this.Ps.ls(t.targetId),this.targetCount-=1,ro.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++)})),ro.waitFor(a).next((function(){return i}))}},{key:"getTargetCount",value:function(e){return ro.resolve(this.targetCount)}},{key:"getTargetData",value:function(e,t){var n=this.Rs.get(t)||null;return ro.resolve(n)}},{key:"addMatchingKeys",value:function(e,t,n){return this.Ps.us(t,n),ro.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))})),ro.waitFor(i)}},{key:"removeMatchingKeysForTargetId",value:function(e,t){return this.Ps.ls(t),ro.resolve()}},{key:"getMatchingKeysForTargetId",value:function(e,t){var n=this.Ps.ds(t);return ro.resolve(n)}},{key:"containsKey",value:function(e,t){return ro.resolve(this.Ps.containsKey(t))}}]),e}(),Ol=function(){function e(t,n){var r=this;A(this,e),this.Vs={},this.overlays={},this.Ss=new ao(0),this.Ds=!1,this.Ds=!0,this.referenceDelegate=t(this),this.Cs=new Ll(this),this.indexManager=new gl,this.remoteDocumentCache=new Al((function(e){return r.referenceDelegate.xs(e)})),this.yt=new vl(n),this.Ns=new _l(this.yt)}return L(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 Cl,this.overlays[e.toKey()]=t),t}},{key:"getMutationQueue",value:function(e,t){var n=this.Vs[e.toKey()];return n||(n=new Nl(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;ba("MemoryPersistence","Starting transaction:",e);var i=new Rl(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 ro.or(Object.values(this.Vs).map((function(n){return function(){return n.containsKey(e,t)}})))}}]),e}
2(),Rl=function(e){S(n,e);var t=T(n);function n(e){var r;return A(this,n),(r=t.call(this)).currentSequenceNumber=e,r}return L(n)}(eo),Pl=function(){function e(t){A(this,e),this.persistence=t,this.Fs=new Tl,this.$s=null}return L(e,[{key:"Ls",get:function(){if(this.$s)return this.$s;throw xa()}},{key:"addReference",value:function(e,t,n){return this.Fs.addReference(n,t),this.Ls.delete(n.toString()),ro.resolve()}},{key:"removeReference",value:function(e,t,n){return this.Fs.removeReference(n,t),this.Ls.add(n.toString()),ro.resolve()}},{key:"markPotentiallyOrphaned",value:function(e,t){return this.Ls.add(t.toString()),ro.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 ro.forEach(this.Ls,(function(r){var i=Qa.fromPath(r);return t.qs(e,i).next((function(e){e||n.removeEntry(i,za.min())}))})).next((function(){return t.$s=null,n.apply(e)}))}},{key:"updateLimboDocument",value:function(e,t){var n=this;return this.qs(e,t).next((function(e){e?n.Ls.delete(t.toString()):n.Ls.add(t.toString())}))}},{key:"xs",value:function(e){return 0}},{key:"qs",value:function(e,t){var n=this;return ro.or([function(){return ro.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 Ml=function(){function e(t,n,r,i){A(this,e),this.targetId=t,this.fromCache=n,this.Si=r,this.Di=i}return L(e,null,[{key:"Ci",value:function(t,n){var r,i=Cs(),a=Cs(),o=x(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}(),Fl=function(){function e(){A(this,e),this.xi=!1}return L(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(xu(t))return ro.resolve(null);var r=Iu(t);return this.indexManager.getIndexType(e,r).next((function(i){return 0===i?null:(null!==t.limit&&1===i&&(t=Au(t,null,"F"),r=Iu(t)),n.indexManager.getDocumentsMatchingTarget(e,r).next((function(i){var a=Cs.apply(void 0,N(i));return n.Ni.getDocuments(e,a).next((function(i){return n.indexManager.getMinOffset(e,r).next((function(r){var o=n.Fi(t,i);return n.$i(t,o,a,r.readTime)?n.ki(e,Au(t,null,"F")):n.Bi(e,o,t,r)}))}))})))}))}},{key:"Oi",value:function(e,t,n,r){var i=this;return xu(t)||r.isEqual(za.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):(ga()<=ae.DEBUG&&ba("QueryEngine","Re-using previous result from %s to execute query: %s",r.toString(),Ou(t)),i.Bi(e,o,t,$a(r,-1)))}))}},{key:"Fi",value:function(e,t){var n=new cu(Mu(e));return t.forEach((function(t,r){Ru(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 ga()<=ae.DEBUG&&ba("QueryEngine","Using full collection scan to execute query:",Ou(t)),this.Ni.getDocumentsMatchingQuery(e,t,Xa.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}(),jl=function(){function e(t,n,r,i){A(this,e),this.persistence=t,this.Li=n,this.yt=i,this.qi=new uu(Ua),this.Ui=new ys((function(e){return mu(e)}),gu),this.Ki=new Map,this.Gi=t.getRemoteDocumentCache(),this.Cs=t.getTargetCache(),this.Ns=t.getBundleCache(),this.Qi(r)}return L(e,[{key:"Qi",value:function(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutation
2Queue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new Sl(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.qi)}))}}]),e}();function Ul(e,t,n,r){return new jl(e,t,n,r)}function Vl(e,t){return Bl.apply(this,arguments)}function Bl(){return Bl=f(l().mark((function e(t,n){var r;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=_a(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=Cs(),s=x(t);try{for(s.s();!(i=s.n()).done;){var l=i.value;a.push(l.batchId);var c,f=x(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,p=x(n);try{for(p.s();!(d=p.n()).done;){var v=d.value;o.push(v.batchId);var y,m=x(v.mutations);try{for(m.s();!(y=m.n()).done;){var g=y.value;u=u.add(g.key)}}catch(b){m.e(b)}finally{m.f()}}}catch(b){p.e(b)}finally{p.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)}))),Bl.apply(this,arguments)}function zl(e){var t=_a(e);return t.persistence.runTransaction("Get last remote snapshot version","readonly",(function(e){return t.Cs.getLastRemoteSnapshotVersion(e)}))}function ql(e,t){var n=_a(e),r=t.snapshotVersion,i=n.qi;return n.persistence.runTransaction("Apply remote event","readwrite-primary",(function(e){var a=n.Gi.newChangeBuffer({trackRemovals:!0});i=n.qi;var o=[];
2t.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(vo.EMPTY_BYTE_STRING,za.min()).withLastLimboFreeSnapshotVersion(za.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=gs(),s=Cs();if(t.documentUpdates.forEach((function(r){t.resolvedLimboDocuments.has(r)&&o.push(n.persistence.referenceDelegate.updateLimboDocument(e,r))})),o.push(Hl(e,a,t.documentUpdates).next((function(e){u=e.Wi,s=e.zi}))),!r.isEqual(za.min())){var l=n.Cs.getLastRemoteSnapshotVersion(e).next((function(t){return n.Cs.setTargetsMetadata(e,e.currentSequenceNumber,r)}));o.push(l)}return ro.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.qi=i,e}))}function Hl(e,t,n){var r=Cs(),i=Cs();return n.forEach((function(e){return r=r.add(e)})),t.getEntries(e,r).next((function(e){var r=gs();return n.forEach((function(n,a){var o=e.get(n);a.isFoundDocument()!==o.isFoundDocument()&&(i=i.add(n)),a.isNoDocument()&&a.version.isEqual(za.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)):ba("LocalStore","Ignoring outdated watch update for ",n,". Current version:",o.version," Watch version:",a.version)})),{Wi:r,zi:i}}))}function Wl(e,t){var n=_a(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,ro.resolve(r)):n.Cs.allocateTargetId(e).next((function(i){return r=new pl(t,i,0,e.currentSequenceNumber),n.Cs.addTargetData(e,r).next((function(){return r}))}))}))})).then((function(e){var r=n.qi.get(e.targetId);return(null===r||e.snapshotVersion.compareTo(r.snapshotVersion)>0)&&(n.qi=n.qi.insert(e.targetId,e),n.Ui.set(t,e.targetId)),e}))}function Kl(e,t,n){return Ql.apply(this,arguments)}function Ql(){return Ql=f(l().mark((function e(t,n,r){var i,a,o;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=_a(t),a=i.qi.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),io(e.t1)){e.next=12;break}throw e.t1;case 12:ba("LocalStore","Failed to update sequence numbers for target ".concat(n,": ").concat(e.t1));case 13:i.qi=i.qi.remove(n),i.Ui.delete(a.target);case 14:case"end":return e.stop()}}),e,null,[[1,8]])}))),Ql.apply(this,arguments)}function Gl(e,t,n){var r=_a(e),i=za.min(),a=Cs();return r.persistence.runTransaction("Execute query","readonly",(function(e){return function(e,t,n){var r=_a(e),i=r.Ui.get(n);return void 0!==i?ro.resolve(r.qi.get(i)):r.Cs.getTargetData(t,n)}(r,e,Iu(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:za.min(),n?a:Cs())})).next((function(e){return $l(r,Pu(t),e),{documents:e,Hi:a}}))}))}function $l(e,t,n){var r=e.Ki.get(t)||za.min();n.forEach((function(e,t){t.readTime.compareTo(r)>0&&(r=t.readTime)})),e.Ki.set(t,r)}var Yl=function(){function e(){A(this,e),this.activeTargetIds=Is()}return L(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}(),Xl=function(){function e(){A(this,e),this.Lr=new Yl,this.qr={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}return L(e,[{key:"addPendingMutation",value:function(e){}},{key:"updateMutationState",value:function(e,t,n){}},{key:"addLocalQueryTarget",value:function(e){return this.Lr.er(e),this.qr[e]||"not-current"}},{key:"updateQueryState",value:function(e,t,n){this.qr[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.qr[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 Yl,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}(),Jl=function(){function e(){A(this,e)}return L(e,[{key:"Ur",value:function(e){}},{key:"shutdown",value:function(){}}]),e}(),Zl=function(){function e(){var t=this;A(this,e),this.Kr=function(){return t.Gr()},this.Qr=function(){return t.jr()},this.Wr=[],this.zr()}return L(e,[{key:"Ur",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(){ba("ConnectivityMonitor","Network connectivity changed: AVAILABLE");var e,t=x(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(){ba("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");var e,t=x(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}(),ec={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregation
2Query:"runAggregationQuery"},tc=function(){function e(t){A(this,e),this.Hr=t.Hr,this.Jr=t.Jr}return L(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}(),nc=function(e){S(n,e);var t=T(n);function n(e){var r;return A(this,n),(r=t.call(this,e)).forceLongPolling=e.forceLongPolling,r.autoDetectLongPolling=e.autoDetectLongPolling,r.useFetchStreams=e.useFetchStreams,r}return L(n,[{key:"fo",value:function(e,t,n,r){return new Promise((function(i,a){var o=new da;o.setWithCredentials(!0),o.listenOnce(sa.COMPLETE,(function(){try{switch(o.getLastErrorCode()){case ua.NO_ERROR:var t=o.getResponseJson();ba("Connection","XHR received:",JSON.stringify(t)),i(t);break;case ua.TIMEOUT:ba("Connection",'RPC "'+e+'" timed out'),a(new Ta(Ca.DEADLINE_EXCEEDED,"Request time out"));break;case ua.HTTP_ERROR:var n=o.getStatus();if(ba("Connection",'RPC "'+e+'" failed with status:',n,"response text:",o.getResponseText()),n>0){var r=o.getResponseJson();Array.isArray(r)&&(r=r[0]);var u=null==r?void 0:r.error;if(u&&u.status&&u.message){var s=function(e){var t=e.toLowerCase().replace(/_/g,"-");return Object.values(Ca).indexOf(t)>=0?t:Ca.UNKNOWN}(u.status);a(new Ta(s,u.message))}else a(new Ta(Ca.UNKNOWN,"Server responded with status "+o.getStatus()))}else a(new Ta(Ca.UNAVAILABLE,"Connection failed."));break;default:xa()}}finally{ba("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=aa(),a=oa(),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 fa({})),this.lo(o.initMessageHeaders,t,n),o.encodeInitMessageHeaders=!0;var u=r.join("");ba("Connection","Creating WebChannel: "+u,o);var s=i.createWebChannel(u,o),l=!1,c=!1,f=new tc({Hr:function(e){c?ba("Connection","Not sending because WebChannel is closed:",e):(l||(ba("Connection","Opening WebChannel transport."),s.open(),l=!0),ba("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,ha.EventType.OPEN,(function(){c||ba("Connection","WebChannel transport opened.")})),h(s,ha.EventType.CLOSE,(function(){c||(c=!0,ba("Connection","WebChannel transport closed"),f.io())})),h(s,ha.EventType.ERROR,(function(e){c||(c=!0,wa("Connection","WebChannel transport errored:",e),f.io(new Ta(Ca.UNAVAILABLE,"The operation could not be completed")))})),h(s,ha.EventType.MESSAGE,(function(e){var t;if(!c){var n=e.data[0];Sa(!!n);var r=n,i=r.error||(null===(t=r[0])||void 0===t?void 0:t.error);if(i){ba("Connection","WebChannel received error:",i);var a=i.status,o=function(e){var t=fs[e];if(void 0!==t)return vs(t)}(a),u=i.message;void 0===o&&(o=Ca.INTERNAL,u="Unknown error status: "+a+" with message "+i.message),c=!0,f.io(new Ta(o,u)),s.close()}else ba("Connection","WebChannel received:",n),f.ro(n)}})),h(a,la.STAT_EVENT,(function(e){e.stat===ca.PROXY?ba("Connection","Detected buffering proxy"):e.stat===ca.NOPROXY&&ba("Connection","Detected no buffering proxy")})),setTimeout((function(){f.so()}),0),f}}]),n}(function(){function e(t){A(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 L(e,[{key:"co",get:function(){return!1}},{key:"ao",value:function(e,t,n,r,i){var a=this.ho(e,t);ba("RestConnection","Sending: ",a,n);var o={};return this.lo(o,r,i),this.fo(e,a,o,n).then((function(e){return ba("RestConnection","Received: ",e),e}),(function(t){throw wa("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/"+ya,e["Content-Type"]="text/plain",this.databaseInfo.appId&&(e["X-Firebase-GMPID"]=this.databaseInfo.appId),t&&t.headers.forEac
2h((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=ec[e];return"".concat(this.oo,"/v1/").concat(t,":").concat(n)}}]),e}());function rc(){return"undefined"!=typeof document?document:null}function ic(e){return new Bs(e,!0)}var ac=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;A(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 L(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&&ba("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}(),oc=function(){function e(t,n,r,i,a,o,u,s){A(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 ac(t,n)}return L(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=f(l().mark((function e(){return l().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=f(l().mark((function e(){return l().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:"qo",value:function(){this.Co&&(this.Co.cancel(),this.Co=null)}},{key:"close",value:function(){var e=f(l().mark((function e(t,n){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.Lo(),this.qo(),this.xo.cancel(),this.So++,4!==t?this.xo.reset():n&&n.code===Ca.RESOURCE_EXHAUSTED?(ka(n.toString()),ka("Using maximum backoff delay to prevent overloading the backend."),this.xo.Ao()):n&&n.code===Ca.UNAUTHENTICATED&&3!==this.state&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),null!==this.stream&&(this.Uo(),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:"Uo",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=y(t,2),i=r[0],a=r[1];e.So===n&&e.Go(i,a)}),(function(n){t((function(){var t=new Ta(Ca.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(f(l().mark((function t(){return l().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 ba("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():(ba("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve())}))}}}]),e}
2(),uc=function(e){S(n,e);var t=T(n);function n(e,r,i,a,o,u){var s;return A(this,n),(s=t.call(this,e,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",r,i,a,u)).yt=o,s}return L(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:xa()}(t.targetChange.targetChangeType||"NO_CHANGE"),i=t.targetChange.targetIds||[],a=function(e,t){return e.wt?(Sa(void 0===t||"string"==typeof t),vo.fromBase64String(t||"")):(Sa(void 0===t||t instanceof Uint8Array),vo.fromUint8Array(t||new Uint8Array))}(e,t.targetChange.resumeToken),o=t.targetChange.cause,u=o&&function(e){var t=void 0===e.code?Ca.UNKNOWN:vs(e.code);return new Ta(t,e.message||"")}(o);n=new Os(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=Qs(e,s.document.name),c=Hs(s.document.updateTime),f=s.document.createTime?Hs(s.document.createTime):za.min(),h=new du({mapValue:{fields:s.document.fields}}),d=pu.newFoundDocument(l,c,f,h),p=s.targetIds||[],v=s.removedTargetIds||[];n=new Ds(p,v,d.key,d)}else if("documentDelete"in t){t.documentDelete;var y=t.documentDelete;y.document;var m=Qs(e,y.document),g=y.readTime?Hs(y.readTime):za.min(),b=pu.newNoDocument(m,g),k=y.removedTargetIds||[];n=new Ds([],k,b.key,b)}else if("documentRemove"in t){t.documentRemove;var w=t.documentRemove;w.document;var E=Qs(e,w.document),x=w.removedTargetIds||[];n=new Ds([],x,E,null)}else{if(!("filter"in t))return xa();t.filter;var S=t.filter;S.targetId;var _=S.count||0,C=new ps(_),T=S.targetId;n=new Ls(T,C)}return n}(this.yt,e),n=function(e){if(!("targetChange"in e))return za.min();var t=e.targetChange;return t.targetIds&&t.targetIds.length?za.min():t.readTime?Hs(t.readTime):za.min()}(e);return this.listener.Wo(t,n)}},{key:"zo",value:function(e){var t={};t.database=Ys(this.yt),t.addTarget=function(e,t){var n,r=t.target;return(n=bu(r)?{documents:Js(e,r)}:{query:Zs(e,r)}).targetId=t.targetId,t.resumeToken.approximateByteSize()>0?n.resumeToken=qs(e,t.resumeToken):t.snapshotVersion.compareTo(za.min())>0&&(n.readTime=zs(e,t.snapshotVersion.toTimestamp())),n}(this.yt,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 xa()}}(0,t.purpose);return null==n?null:{"goog-listen-tags":n}}(this.yt,e);n&&(t.labels=n),this.Bo(t)}},{key:"Ho",value:function(e){var t={};t.database=Ys(this.yt),t.removeTarget=e,this.Bo(t)}}]),n}(oc),sc=function(e){S(n,e);var t=T(n);function n(e,r,i,a){var o;return A(this,n),(o=t.call(this)).authCredentials=e,o.appCheckCredentials=r,o.connection=i,o.yt=a,o.nu=!1,o}return L(n,[{key:"su",value:function(){if(this.nu)throw new Ta(Ca.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=y(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===Ca.UNAUTHENTICATED&&(r.authCredentials.invalidateToken(),r.appCheckCredentials.invalidateToken()),e):new Ta(Ca.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=y(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===Ca.UNAUTHENTICATED&&(i.authCredentials.invalidateToken(),i.appCheckCredentials.invalidateToken()),e):new Ta(Ca.UNKNOWN,e.toString())}))}},{key:"terminate",value:function(){this.nu=!0}}]),n}(function(){return L((function e(){A(this,e)}))}());var lc=function(){function e(t,n){A(this,e),this.asyncQueue=t,this.onlineStateHandler=n,this.state="Unknown",this.iu=0,this.ru=null,this.ou=!0}return L(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?(ka(t),this.ou=!1):ba("OnlineStateTracker",t)}},{key:"lu",value:function(){null!==this.ru&&(this.ru.cancel(),this.ru=null)}}]),e}(),cc=L((function e(t,n,r,i,a){var o=this;A(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.Ur((function(e){r.enqueueAndForget(f(l().mark((function e(){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=wc(o),!e.t0){e.next=5;break}
2return ba("RemoteStore","Restarting streams for network reachability change."),e.next=5,function(){var e=f(l().mark((function e(t){var n;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=_a(t))._u.add(4),e.next=4,dc(n);case 4:return n.gu.set("Unknown"),n._u.delete(4),e.next=8,fc(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 lc(r,i)}));function fc(e){return hc.apply(this,arguments)}function hc(){return hc=f(l().mark((function e(t){var n,r,i;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!wc(t)){e.next=18;break}n=x(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]])}))),hc.apply(this,arguments)}function dc(e){return pc.apply(this,arguments)}function pc(){return pc=f(l().mark((function e(t){var n,r,i;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=x(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]])}))),pc.apply(this,arguments)}function vc(e,t){var n=_a(e);n.du.has(t.targetId)||(n.du.set(t.targetId,t),kc(n)?bc(n):Pc(n).ko()&&mc(n,t))}function yc(e,t){var n=_a(e),r=Pc(n);n.du.delete(t),r.ko()&&gc(n,t),0===n.du.size&&(r.ko()?r.Fo():wc(n)&&n.gu.set("Unknown"))}function mc(e,t){e.yu.Ot(t.targetId),Pc(e).zo(t)}function gc(e,t){e.yu.Ot(t),Pc(e).Ho(t)}function bc(e){e.yu=new Ps({getRemoteKeysForTarget:function(t){return e.remoteSyncer.getRemoteKeysForTarget(t)},ne:function(t){return e.du.get(t)||null}}),Pc(e).start(),e.gu.uu()}function kc(e){return wc(e)&&!Pc(e).No()&&e.du.size>0}function wc(e){return 0===_a(e)._u.size}function Ec(e){e.yu=void 0}function xc(e){return Sc.apply(this,arguments)}function Sc(){return Sc=f(l().mark((function e(t){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.du.forEach((function(e,n){mc(t,e)}));case 1:case"end":return e.stop()}}),e)}))),Sc.apply(this,arguments)}function _c(e,t){return Cc.apply(this,arguments)}function Cc(){return Cc=f(l().mark((function e(t,n){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Ec(t),kc(t)?(t.gu.hu(n),bc(t)):t.gu.set("Unknown");case 1:case"end":return e.stop()}}),e)}))),Cc.apply(this,arguments)}function Tc(e,t,n){return Ic.apply(this,arguments)}function Ic(){return Ic=f(l().mark((function e(t,n,r){var i;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.gu.set("Online"),!(n instanceof Os&&2===n.state&&n.cause)){e.next=13;break}return e.prev=1,e.next=4,function(){var e=f(l().mark((function e(t,n){var r,i,a,o;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=n.cause,i=x(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),ba("RemoteStore","Failed to remove targets %s: %s ",n.targetIds.join(","),e.t0),e.next=11,Nc(t,e.t0);case 11:case 22:e.next=29;break;case 13:if(n instanceof Ds?t.yu.Kt(n):n instanceof Ls?t.yu.Jt(n):t.yu.jt(n),r.isEqual(za.min())){e.next=29;break}return e.prev=14,e.next=17,zl(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.Zt(t);
2return 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(vo.EMPTY_BYTE_STRING,n.snapshotVersion)),gc(e,t);var r=new pl(n.target,t,1,n.sequenceNumber);mc(e,r)}})),e.remoteSyncer.applyRemoteEvent(n)}(t,r);case 24:return e.prev=24,e.t2=e.catch(14),ba("RemoteStore","Failed to raise snapshot:",e.t2),e.next=29,Nc(t,e.t2);case 29:case"end":return e.stop()}}),e,null,[[1,6],[14,24]])}))),Ic.apply(this,arguments)}function Nc(e,t,n){return Ac.apply(this,arguments)}function Ac(){return Ac=f(l().mark((function e(t,n,r){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(io(n)){e.next=2;break}throw n;case 2:return t._u.add(1),e.next=5,dc(t);case 5:t.gu.set("Offline"),r||(r=function(){return zl(t.localStore)}),t.asyncQueue.enqueueRetryable(f(l().mark((function e(){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return ba("RemoteStore","Retrying IndexedDB access"),e.next=3,r();case 3:return t._u.delete(1),e.next=6,fc(t);case 6:case"end":return e.stop()}}),e)}))));case 8:case"end":return e.stop()}}),e)}))),Ac.apply(this,arguments)}function Dc(e,t){return Lc.apply(this,arguments)}function Lc(){return Lc=f(l().mark((function e(t,n){var r,i;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=_a(t)).asyncQueue.verifyOperationInProgress(),ba("RemoteStore","RemoteStore received new credentials"),i=wc(r),r._u.add(3),e.next=6,dc(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,fc(r);case 12:case"end":return e.stop()}}),e)}))),Lc.apply(this,arguments)}function Oc(e,t){return Rc.apply(this,arguments)}function Rc(){return Rc=f(l().mark((function e(t,n){var r;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=_a(t),!n){e.next=7;break}return r._u.delete(2),e.next=5,fc(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,dc(r);case 12:r.gu.set("Unknown");case 13:case"end":return e.stop()}}),e)}))),Rc.apply(this,arguments)}function Pc(e){return e.pu||(e.pu=function(e,t,n){var r=_a(e);return r.su(),new uc(t,r.connection,r.authCredentials,r.appCheckCredentials,r.yt,n)}(e.datastore,e.asyncQueue,{Yr:xc.bind(null,e),Zr:_c.bind(null,e),Wo:Tc.bind(null,e)}),e.wu.push(function(){var t=f(l().mark((function t(n){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!n){t.next=4;break}e.pu.Mo(),kc(e)?bc(e):e.gu.set("Unknown"),t.next=7;break;case 4:return t.next=6,e.pu.stop();case 6:Ec(e);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())),e.pu}var Mc=function(){function e(t,n,r,i,a){A(this,e),this.asyncQueue=t,this.timerId=n,this.targetTimeMs=r,this.op=i,this.removalCallback=a,this.deferred=new Ia,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch((function(e){}))}return L(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 Ta(Ca.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 Fc(e,t){if(ka("AsyncQueue","".concat(t,": ").concat(e)),io(e))return new Ta(Ca.UNAVAILABLE,"".concat(t,": ").concat(e));throw e}var jc=function(){function e(t){A(this,e),this.comparator=t?function(e,n){return t(e,n)||Qa.comparator(e.key,n.key)}:function(e,t){return Qa.comparator(e.key,t.key)},this.keyedMap=ks(),this.sortedSet=new uu(this.comparator)}return L(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}}
2,{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}(),Uc=function(){function e(){A(this,e),this.Tu=new uu(Qa.comparator)}return L(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}):xa():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}(),Vc=function(){function e(t,n,r,i,a,o,u,s,l){A(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 L(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)&&Du(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,jc.emptySet(n),o,r,i,!0,!1,a)}}]),e}(),Bc=L((function e(){A(this,e),this.Au=void 0,this.listeners=[]})),zc=L((function e(){A(this,e),this.queries=new ys((function(e){return Lu(e)}),Du),this.onlineState="Unknown",this.Ru=new Set}));function qc(e,t){return Hc.apply(this,arguments)}function Hc(){return Hc=f(l().mark((function e(t,n){var r,i,a,o,u;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=_a(t),i=n.query,a=!1,(o=r.queries.get(i))||(a=!0,o=new Bc),!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),u=Fc(e.t0,"Initialization of query '".concat(Ou(n.query),"' failed")),e.abrupt("return",void n.onError(u));case 13:r.queries.set(i,o),o.listeners.push(n),n.bu(r.onlineState),o.Au&&n.Pu(o.Au)&&$c(r);case 14:case"end":return e.stop()}}),e,null,[[3,9]])}))),Hc.apply(this,arguments)}function Wc(e,t){return Kc.apply(this,arguments)}function Kc(){return Kc=f(l().mark((function e(t,n){var r,i,a,o,u;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=_a(t),i=n.query,a=!1,(o=r.queries.get(i))&&(u=o.listeners.indexOf(n))>=0&&(o.listeners.splice(u,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)}))),Kc.apply(this,arguments)}function Qc(e,t){var n,r=_a(e),i=!1,a=x(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=x(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&&$c(r)}
2function Gc(e,t,n){var r=_a(e),i=r.queries.get(t);if(i){var a,o=x(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 $c(e){e.Ru.forEach((function(e){e.next()}))}var Yc=function(){function e(t,n,r){A(this,e),this.query=t,this.vu=n,this.Vu=!1,this.Su=null,this.onlineState="Unknown",this.options=r||{}}return L(e,[{key:"Pu",value:function(e){if(!this.options.includeMetadataChanges){var t,n=[],r=x(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 Vc(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=Vc.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache,e.hasCachedResults),this.Vu=!0,this.vu.next(e)}}]),e}();var Xc=L((function e(t){A(this,e),this.key=t})),Jc=L((function e(t){A(this,e),this.key=t})),Zc=function(){function e(t,n){A(this,e),this.query=t,this.qu=n,this.Uu=null,this.hasCachedResults=!1,this.current=!1,this.Ku=Cs(),this.mutatedKeys=Cs(),this.Gu=Mu(t),this.Qu=new jc(this.Gu)}return L(e,[{key:"ju",get:function(){return this.qu}},{key:"Wu",value:function(e,t){var n=this,r=t?t.zu:new Uc,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=Ru(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 xa()}};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.Uu;return this.Uu=u,0!==a.length||s?{snapshot:new Vc(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 Uc,mutatedKeys:this.mutatedKeys,$i:!1},!1)):{Xu:[]}}},{key:"Zu",value:function(e){return!this.qu.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.qu=t.qu.add(e)})),e.modifiedDocuments.forEach((function(e){})),e.removedDocuments.forEach((function(e){return t.qu=t.qu.delete(e)})),this.current=e.current)}},{key:"Yu",value:function(){var e=this;if(!this.current)return[];var t=this.Ku;this.Ku=Cs(),this.Qu.forEach((function(t){e.Zu(t.key)&&(e.Ku=e.Ku.add(t.key))}
2));var n=[];return t.forEach((function(t){e.Ku.has(t)||n.push(new Jc(t))})),this.Ku.forEach((function(e){t.has(e)||n.push(new Xc(e))})),n}},{key:"tc",value:function(e){this.qu=e.Hi,this.Ku=Cs();var t=this.Wu(e.documents);return this.applyChanges(t,!0)}},{key:"ec",value:function(){return Vc.fromInitialDocuments(this.query,this.Qu,this.mutatedKeys,0===this.Uu,this.hasCachedResults)}}]),e}(),ef=L((function e(t,n,r){A(this,e),this.query=t,this.targetId=n,this.view=r})),tf=L((function e(t){A(this,e),this.key=t,this.nc=!1})),nf=function(){function e(t,n,r,i,a,o){A(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 ys((function(e){return Lu(e)}),Du),this.rc=new Map,this.oc=new Set,this.uc=new uu(Qa.comparator),this.cc=new Map,this.ac=new Tl,this.hc={},this.lc=new Map,this.fc=wl.vn(),this.onlineState="Unknown",this.dc=void 0}return L(e,[{key:"isPrimaryClient",get:function(){return!0===this.dc}}]),e}();function rf(e,t){return af.apply(this,arguments)}function af(){return af=f(l().mark((function e(t,n){var r,i,a,o,u,s;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=_f(t),!(o=r.ic.get(n))){e.next=6;break}
2i=o.targetId,r.sharedClientState.addLocalQueryTarget(i),a=o.view.ec(),e.next=15;break;case 6:return e.next=8,Wl(r.localStore,Iu(n));case 8:return u=e.sent,r.isPrimaryClient&&vc(r.remoteStore,u),s=r.sharedClientState.addLocalQueryTarget(u.targetId),i=u.targetId,e.next=14,of(r,n,i,"current"===s,u.resumeToken);case 14:a=e.sent;case 15:return e.abrupt("return",a);case 16:case"end":return e.stop()}}),e)}))),af.apply(this,arguments)}function of(e,t,n,r,i){return uf.apply(this,arguments)}function uf(){return uf=f(l().mark((function e(t,n,r,i,a){var o,u,s,c,h,d;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t._c=function(e,n,r){return function(){var e=f(l().mark((function e(t,n,r,i){var a,o,u;return l().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,Gl(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),u=n.view.applyChanges(a,t.isPrimaryClient,o),e.abrupt("return",(mf(t,n.targetId,u.Xu),u.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,Gl(t.localStore,n,!0);case 3:return o=e.sent,u=new Zc(n,o.Hi),s=u.Wu(o.documents),c=As.createSynthesizedTargetChangeForCurrentChange(r,i&&"Offline"!==t.onlineState,a),h=u.applyChanges(s,t.isPrimaryClient,c),mf(t,r,h.Xu),d=new ef(n,r,u),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)}))),uf.apply(this,arguments)}function sf(e,t){return lf.apply(this,arguments)}function lf(){return lf=f(l().mark((function e(t,n){var r,i,a;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=_a(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!Du(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,Kl(r.localStore,i.targetId,!1).then((function(){r.sharedClientState.clearQueryState(i.targetId),yc(r.remoteStore,i.targetId),vf(r,i.targetId)})).catch(to);case 9:e.next=14;break;case 11:return vf(r,i.targetId),e.next=14,Kl(r.localStore,i.targetId,!0);case 14:case"end":return e.stop()}}),e)}))),lf.apply(this,arguments)}function cf(e,t){return ff.apply(this,arguments)}function ff(){return ff=f(l().mark((function e(t,n){var r,i;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=_a(t),e.prev=1,e.next=4,ql(r.localStore,n);
2case 4:return i=e.sent,n.targetChanges.forEach((function(e,t){var n=r.cc.get(t);n&&(Sa(e.addedDocuments.size+e.modifiedDocuments.size+e.removedDocuments.size<=1),e.addedDocuments.size>0?n.nc=!0:e.modifiedDocuments.size>0?Sa(n.nc):e.removedDocuments.size>0&&(Sa(n.nc),n.nc=!1))})),e.next=8,kf(r,i,n);case 8:e.next=14;break;case 10:return e.prev=10,e.t0=e.catch(1),e.next=14,to(e.t0);case 14:case"end":return e.stop()}}),e,null,[[1,10]])}))),ff.apply(this,arguments)}function hf(e,t,n){var r=_a(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=_a(e);n.onlineState=t;var r=!1;n.queries.forEach((function(e,n){var i,a=x(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&&$c(n)}(r.eventManager,t),i.length&&r.sc.Wo(i),r.onlineState=t,r.isPrimaryClient&&r.sharedClientState.setOnlineState(t)}}function df(e,t,n){return pf.apply(this,arguments)}function pf(){return pf=f(l().mark((function e(t,n,r){var i,a,o,u,s,c;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((i=_a(t)).sharedClientState.updateQueryState(n,"rejected",r),a=i.cc.get(n),!(o=a&&a.key)){e.next=14;break}return u=(u=new uu(Qa.comparator)).insert(o,pu.newNoDocument(o,za.min())),s=Cs().add(o),c=new Ns(za.min(),new Map,new cu(Ua),u,s),e.next=9,cf(i,c);case 9:i.uc=i.uc.remove(o),i.cc.delete(n),bf(i),e.next=16;break;case 14:return e.next=16,Kl(i.localStore,n,!1).then((function(){return vf(i,n,r)})).catch(to);case 16:case"end":return e.stop()}}),e)}))),pf.apply(this,arguments)}function vf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;e.sharedClientState.removeLocalQueryTarget(t);var r,i=x(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)||yf(e,t)}))}function yf(e,t){e.oc.delete(t.path.canonicalString());var n=e.uc.get(t);null!==n&&(yc(e.remoteStore,n),e.uc=e.uc.remove(t),e.cc.delete(n),bf(e))}function mf(e,t,n){var r,i=x(n);try{for(i.s();!(r=i.n()).done;){var a=r.value;a instanceof Xc?(e.ac.addReference(a.key,t),gf(e,a)):a instanceof Jc?(ba("SyncEngine","Document no longer in limbo: "+a.key),e.ac.removeReference(a.key,t),e.ac.containsKey(a.key)||yf(e,a.key)):xa()}}catch(o){i.e(o)}finally{i.f()}}function gf(e,t){var n=t.key,r=n.path.canonicalString();e.uc.get(n)||e.oc.has(r)||(ba("SyncEngine","New document in limbo: "+n),e.oc.add(r),bf(e))}function bf(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 Qa(Ha.fromString(t)),r=e.fc.next();e.cc.set(r,new tf(n)),e.uc=e.uc.insert(n,r),vc(e.remoteStore,new pl(Iu(Eu(n.path)),r,2,ao.at))}}function kf(e,t,n){return wf.apply(this,arguments)}function wf(){return wf=f(l().mark((function e(t,n,r){var i,a,o,u;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=_a(t),a=[],o=[],u=[],e.t0=i.ic.isEmpty(),e.t0){e.next=9;break}return i.ic.forEach((function(e,t){u.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=Ml.Ci(t.targetId,e);o.push(n)}})))})),e.next=6,Promise.all(u);case 6:return i.sc.Wo(a),e.next=9,function(){var e=f(l().mark((function e(t,n){var r,i,a,o,u,s,c,f;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=_a(t),e.prev=1,e.next=4,r.persistence.runTransaction("notifyLocalViewChanges","readwrite",(function(e){return ro.forEach(n,(function(t){return ro.forEach(t.Si,(function(n){return r.persistence.referenceDelegate.addReference(e,t.targetId,n)})).next((function(){return ro.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),io(e.t0)){e.next=10;break}throw e.t0;case 10:ba("LocalStore","Failed to update sequence numbers: "+e.t0);case 11:i=x(n);try{for(i.s();!(a=i.n()).done;)o=a.value,u=o.targetId,o.fromCache||(s=r.qi.get(u),c=s.snapshotVersion,f=s.withLastLimboFreeSnapshotVersion(c),r.qi=r.qi.insert(u,f))}catch(l){i.e(l)}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)}))),wf.apply(this,arguments)}function Ef(e,t){return xf.apply(this,arguments)}function xf(){return xf=f(l().mark((function e(t,n){var r,i;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((r=_a(t)).currentUser.isEqual(n)){e.next=11;break}
2return ba("SyncEngine","User change. New user:",n.toKey()),e.next=5,Vl(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 Ta(Ca.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,kf(r,i.ji);case 11:case"end":return e.stop()}}),e)}))),xf.apply(this,arguments)}function Sf(e,t){var n=_a(e),r=n.cc.get(t);if(r&&r.nc)return Cs().add(r.key);var i=Cs(),a=n.rc.get(t);if(!a)return i;var o,u=x(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 _f(e){var t=_a(e);return t.remoteStore.remoteSyncer.applyRemoteEvent=cf.bind(null,t),t.remoteStore.remoteSyncer.getRemoteKeysForTarget=Sf.bind(null,t),t.remoteStore.remoteSyncer.rejectListen=df.bind(null,t),t.sc.Wo=Qc.bind(null,t.eventManager),t.sc.wc=Gc.bind(null,t.eventManager),t}var Cf=function(){function e(){A(this,e),this.synchronizeTabs=!1}return L(e,[{key:"initialize",value:function(){var e=f(l().mark((function e(t){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.yt=ic(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 Ul(this.persistence,new Fl,e.initialUser,this.yt)}},{key:"yc",value:function(e){return new Ol(Pl.Bs,this.yt)}},{key:"gc",value:function(e){return new Xl}},{key:"terminate",value:function(){var e=f(l().mark((function e(){return l().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}(),Tf=function(){function e(){A(this,e)}return L(e,[{key:"initialize",value:function(){var e=f(l().mark((function e(t,n){var r=this;return l().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 hf(r.syncEngine,e,1)},this.remoteStore.remoteSyncer.handleCredentialChange=Ef.bind(null,this.syncEngine),e.next=12,Oc(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 zc}},{key:"createDatastore",value:function(e){var t,n=ic(e.databaseInfo.databaseId),r=(t=e.databaseInfo,new nc(t));return function(e,t,n,r){return new sc(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 hf(o.syncEngine,e,0)},a=Zl.C()?new Zl:new Jl,new cc(t,n,r,i,a)}},{key:"createSyncEngine",value:function(e,t){return function(e,t,n,r,i,a,o){var u=new nf(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=f(l().mark((function e(t){var n;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=_a(t),ba("RemoteStore","RemoteStore shutting down."),n._u.add(5),e.next=5,dc(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 If(e,t,n){if(!n)throw new Ta(Ca.INVALID_ARGUMENT,"Function ".concat(e,"() cannot be called with an empty ").concat(t,"."))}function Nf(e){if(Qa.isDocumentKey(e))throw new Ta(Ca.INVALID_ARGUMENT,"Invalid collection reference. Collection references must have an odd number of segments, but ".concat(e," has ").concat(e.length,"."))}function Af(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":xa()}function Df(e,t){if("_delegate"in e&&(e=e._delegate),!(e instanceof t)){if(t.name===e.constructor.name)throw new Ta(Ca.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");var n=Af(e);throw new Ta(Ca.INVALID_ARGUMENT,"Expected type '".concat(t.name,"', but it was: ").concat(n))}return e}function Lf(e,t){if(t<=0)throw new Ta(Ca.INVALID_ARGUMENT,"Function ".concat(e,"() requires a positive number, but it was: ").concat(t,"."))}var Of=new Map,Rf=function(){function e(t){var n;if(A(this,e),void 0===t.host){if(void 0!==t.ssl)throw new Ta(Ca.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 Ta(Ca.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 Ta(Ca.INVALID_ARGUMENT,"".concat(e," and ").concat(n," cannot be used together."))}("experimentalForceLongPolling",t.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",t.experimentalAutoDetectLongPolling)}return L(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}(),Pf=function(){function e(t,n,r,i){A(this,e),this._authCredentials=t,this._appCheckCredentials=n,this._databaseId=r,this._app=i,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new Rf({}),this._settingsFrozen=!1}return L(e,[{key:"app",get:function(){if(!this._app)throw new Ta(Ca.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 Ta(Ca.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 Rf(e),void 0!==e.credentials&&(this._authCredentials=function(e){if(!e)return new Aa;switch(e.type){case"gapi":var t=e.client;return new Ra(t,e.sessionIndex||"0",e.iamToken||null,e.authTokenFactory||null);case"provider":return e.client;default:throw new Ta(Ca.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invali
2d 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=Of.get(e);t&&(ba("ComponentProvider","Removing Datastore"),Of.delete(e),t.terminate())}(this),Promise.resolve()}}]),e}();function Mf(e,t,n){var r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=(e=Df(e,Pf))._getSettings();if("firestore.googleapis.com"!==a.host&&a.host!==t&&wa("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=va.MOCK_USER;else{o=W(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 Ta(Ca.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");u=new va(s)}e._authCredentials=new Da(new Na(o,u))}}var Ff=function(){function e(t,n,r){A(this,e),this.converter=n,this._key=r,this.type="document",this.firestore=t}return L(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 Uf(this.firestore,this.converter,this._key.path.popLast())}},{key:"withConverter",value:function(t){return new e(this.firestore,t,this._key)}}]),e}(),jf=function(){function e(t,n,r){A(this,e),this.converter=n,this._query=r,this.type="query",this.firestore=t}return L(e,[{key:"withConverter",value:function(t){return new e(this.firestore,t,this._query)}}]),e}(),Uf=function(e){S(n,e);var t=T(n);function n(e,r,i){var a;return A(this,n),(a=t.call(this,e,r,Eu(i)))._path=i,a.type="collection",a}return L(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 Ff(this.firestore,null,new Qa(e))}},{key:"withConverter",value:function(e){return new n(this.firestore,e,this._path)}}]),n}(jf);function Vf(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=ee(e),If("collection","path",t),e instanceof Pf){var a=Ha.fromString.apply(Ha,[t].concat(r));return Nf(a),new Uf(e,null,a)}if(!(e instanceof Ff||e instanceof Uf))throw new Ta(Ca.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");var o=e._path.child(Ha.fromString.apply(Ha,[t].concat(r)));return Nf(o),new Uf(e.firestore,null,o)}var Bf=function(){function e(t){A(this,e),this.observer=t,this.muted=!1}return L(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):ka("Uncaught Error in snapshot listener:",e.toString())}},{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}(),zf=function(){function e(t,n,r,i){var a=this;A(this,e),this.authCredentials=t,this.appCheckCredentials=n,this.asyncQueue=r,this.databaseInfo=i,this.user=va.UNAUTHENTICATED,this.clientId=ja.R(),this.authCredentialListener=function(){return Promise.resolve()},this.appCheckCredentialListener=function(){return Promise.resolve()},this.authCredentials.start(r,function(){var e=f(l().mark((function e(t){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return ba("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 ba("FirestoreClient","Received new app check token=",e),a.appCheckCredentialListener(e,a.user)}))}return L(e,[{key:"getConfiguration",value:function(){var e=f(l().mark((function e(){return l().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 Ta(Ca.FAILED_PRECONDITION,"The client has already been terminated.")}},{key:"terminate",value:function(){var e=this;this.asyncQueue.enterRestrictedMode();var t=new Ia;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(f(l().mark((function n(){var r;return l().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=Fc(n.t2,"Failed to shutdown persistence"),t.reject(r);case 18:case"end":return n.stop()}}),n,null,[[0,14]])}
2)))),t.promise}}]),e}();function qf(e,t){return Hf.apply(this,arguments)}function Hf(){return Hf=f(l().mark((function e(t,n){var r,i;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.asyncQueue.verifyOperationInProgress(),ba("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=f(l().mark((function e(t){return l().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,Vl(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)}))),Hf.apply(this,arguments)}function Wf(e,t){return Kf.apply(this,arguments)}function Kf(){return Kf=f(l().mark((function e(t,n){var r,i;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.asyncQueue.verifyOperationInProgress(),e.next=3,Qf(t);case 3:return r=e.sent,ba("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 Dc(n.remoteStore,e)})),t.setAppCheckTokenChangeListener((function(e,t){return Dc(n.remoteStore,t)})),t.onlineComponents=n;case 13:case"end":return e.stop()}}),e)}))),Kf.apply(this,arguments)}function Qf(e){return Gf.apply(this,arguments)}function Gf(){return Gf=f(l().mark((function e(t){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=t.offlineComponents,e.t0){e.next=5;break}return ba("FirestoreClient","Using default OfflineComponentProvider"),e.next=5,qf(t,new Cf);case 5:return e.abrupt("return",t.offlineComponents);case 6:case"end":return e.stop()}}),e)}))),Gf.apply(this,arguments)}function $f(e){return Yf.apply(this,arguments)}function Yf(){return Yf=f(l().mark((function e(t){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=t.onlineComponents,e.t0){e.next=5;break}return ba("FirestoreClient","Using default OnlineComponentProvider"),e.next=5,Wf(t,new Tf);case 5:return e.abrupt("return",t.onlineComponents);case 6:case"end":return e.stop()}}),e)}))),Yf.apply(this,arguments)}function Xf(e){return Jf.apply(this,arguments)}function Jf(){return Jf=f(l().mark((function e(t){var n,r;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$f(t);case 2:return n=e.sent,r=n.eventManager,e.abrupt("return",(r.onListen=rf.bind(null,n.syncEngine),r.onUnlisten=sf.bind(null,n.syncEngine),r));case 5:case"end":return e.stop()}}),e)}))),Jf.apply(this,arguments)}function Zf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=new Ia;return e.asyncQueue.enqueueAndForget(f(l().mark((function i(){return l().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.t0=function(e,t,n,r,i){var a=new Bf({next:function(n){t.enqueueAndForget((function(){return Wc(e,o)})),n.fromCache&&"server"===r.source?i.reject(new Ta(Ca.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):i.resolve(n)},error:function(e){return i.reject(e)}}),o=new Yc(n,a,{includeMetadataChanges:!0,Nu:!0});return qc(e,o)},i.next=3,Xf(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 eh=function(){function e(){var t=this;A(this,e),this.Bc=Promise.resolve(),this.Lc=[],this.qc=!1,this.Uc=[],this.Kc=null,this.Gc=!1,this.Qc=!1,this.jc=[],this.xo=new ac(this,"async_queue_retry"),this.Wc=function(){var e=rc();e&&ba("AsyncQueue","Visibility state changed to "+e.visibilityState),t.xo.Po()};var n=rc();n&&"function"==typeof n.addEventListener&&n.addEventListener("visibilitychange",this.Wc)}return L(e,[{key:"isShuttingDown",get:function(){return this.qc}},{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.qc){this.qc=!0,this.Qc=e||!1;var t=rc();t&&"function"==typeof t.removeEventListener&&t.removeEventListener("visibilitychange",this.Wc)}}},{key:"enqueue",value:function(e){var t=this;if(this.zc(),this.qc)return new Promise((function(){}));var n=new Ia;return this.Hc((function(){return t.qc&&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=f(l().mark((function e(){var t=this;return l().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),io(e.t0)){e.next=12;break}throw e.t0;case 12:ba("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 ka("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=Mc.createAndSchedule(this,e,t,n,(function(e){return r.Yc(e)}));return this.Uc.push(i),i}},{key:"zc",value:function(){this.Kc&&xa()}},{key:"verifyOperationInProgress",value:function(){}},{key:"Xc",value:function(){var e=f(l().mark((function e(){var t;return l().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=x(this.Uc);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.Uc.sort((function(e,t){return e.targetTimeMs-t.targetTimeMs}));var n,r=x(t.Uc);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.Uc.indexOf(e);this.Uc.splice(t,1)}}]),e}();
2var th=function(e){S(n,e);var t=T(n);function n(e,r,i,a){var o;return A(this,n),(o=t.call(this,e,r,i,a)).type="firestore",o._queue=new eh,o._persistenceKey=(null==a?void 0:a.name)||"[DEFAULT]",o}return L(n,[{key:"_terminate",value:function(){return this._firestoreClient||rh(this),this._firestoreClient.terminate()}}]),n}(Pf);function nh(e){return e._firestoreClient||rh(e),e._firestoreClient.verifyNotTerminated(),e._firestoreClient}function rh(e){var t,n=e._freezeSettings(),r=function(e,t,n,r){return new oo(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 zf(e._authCredentials,e._appCheckCredentials,e._queue,r)}var ih=function(){function e(t){A(this,e),this._byteString=t}return L(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(vo.fromBase64String(t))}catch(t){throw new Ta(Ca.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+t)}}},{key:"fromUint8Array",value:function(t){return new e(vo.fromUint8Array(t))}}]),e}(),ah=function(){function e(){A(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 Ta(Ca.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new Ka(n)}return L(e,[{key:"isEqual",value:function(e){return this._internalPath.isEqual(e._internalPath)}}]),e}();var oh=L((function e(t){A(this,e),this._methodName=t})),uh=function(){function e(t,n){if(A(this,e),!isFinite(t)||t<-90||t>90)throw new Ta(Ca.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+t);if(!isFinite(n)||n<-180||n>180)throw new Ta(Ca.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+n);this._lat=t,this._long=n}return L(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 Ua(this._lat,e._lat)||Ua(this._long,e._long)}}]),e}(),sh=/^__.*__$/;function lh(e){switch(e){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw xa()}}var ch=function(){function e(t,n,r,i,a,o){A(this,e),this.settings=t,this.databaseId=n,this.yt=r,this.ignoreUndefinedProperties=i,void 0===a&&this.na(),this.fieldTransforms=a||[],this.fieldMask=o||[]}return L(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.yt,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 kh(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(lh(this.sa)&&sh.test(e))throw this.ha('Document fields cannot begin and end with "__"')}}]),e}(),fh=function(){function e(t,n,r){A(this,e),this.databaseId=t,this.ignoreUndefinedProperties=n,this.yt=r||ic(t)}return L(e,[{key:"da",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return new ch({sa:e,methodName:t,fa:n,path:Ka.emptyPath(),oa:!1,la:r},this.databaseId,this.yt,this.ignoreUndefinedProperties)}}]),e}();function hh(e){var t=e._freezeSettings(),n=ic(e._databaseId);return new fh(e._databaseId,!!t.ignoreUndefinedProperties,n)}function dh(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return ph(n,e.da(r?4:3,t))}function ph(e,t){if(yh(e=ee(e)))return mh("Unsupported field value:",t,e),vh(e,t);if(e instanceof oh)return function(e,t){if(!lh(t.sa))throw t.ha("".concat(e._methodName,"() can only be used with update(
2) 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=x(e);try{for(a.s();!(n=a.n()).done;){var o=ph(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=ee(e)))return{nullValue:"NULL_VALUE"};if("number"==typeof e)return Vu(t.yt,e);if("boolean"==typeof e)return{booleanValue:e};if("string"==typeof e)return{stringValue:e};if(e instanceof Date){var n=Ba.fromDate(e);return{timestampValue:zs(t.yt,n)}}if(e instanceof Ba){var r=new Ba(e.seconds,1e3*Math.floor(e.nanoseconds/1e3));return{timestampValue:zs(t.yt,r)}}if(e instanceof uh)return{geoPointValue:{latitude:e.latitude,longitude:e.longitude}};if(e instanceof ih)return{bytesValue:qs(t.yt,e._byteString)};if(e instanceof Ff){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:Ws(e.firestore._databaseId||t.databaseId,e._key.path)}}throw t.ha("Unsupported field value: ".concat(Af(e)))}(e,t)}function vh(e,t){var n={};return co(e)?t.path&&t.path.length>0&&t.fieldMask.push(t.path):lo(e,(function(e,r){var i=ph(r,t.ra(e));null!=i&&(n[e]=i)})),{mapValue:{fields:n}}}function yh(e){return!("object"!=typeof e||null===e||e instanceof Array||e instanceof Date||e instanceof Ba||e instanceof uh||e instanceof ih||e instanceof Ff||e instanceof oh)}function mh(e,t,n){if(!yh(n)||!function(e){return"object"==typeof e&&null!==e&&(Object.getPrototypeOf(e)===Object.prototype||null===Object.getPrototypeOf(e))}(n)){var r=Af(n);throw"an object"===r?t.ha(e+" a custom object"):t.ha(e+" "+r)}}var gh=new RegExp("[~\\*/\\[\\]]");function bh(e,t,n){if(t.search(gh)>=0)throw kh("Invalid field path (".concat(t,"). Paths must not contain '~', '*', '/', '[', or ']'"),e,!1,void 0,n);try{return b(ah,N(t.split(".")))._internalPath}catch(r){throw kh("Invalid field path (".concat(t,"). Paths must not be empty, begin with '.', end with '.', or contain '..'"),e,!1,void 0,n)}}function kh(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 Ta(Ca.INVALID_ARGUMENT,u+e+s)}var wh=function(){function e(t,n,r,i,a){A(this,e),this._firestore=t,this._userDataWriter=n,this._key=r,this._document=i,this._converter=a}return L(e,[{key:"id",get:function(){return this._key.path.lastSegment()}},{key:"ref",get:function(){return new Ff(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 Eh(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(xh("DocumentSnapshot.get",e));if(null!==t)return this._userDataWriter.convertValue(t)}}}]),e}(),Eh=function(e){S(n,e);var t=T(n);function n(){return A(this,n),t.apply(this,arguments)}return L(n,[{key:"data",value:function(){return E(k(n.prototype),"data",this).call(this)}}]),n}(wh);function xh(e,t){return"string"==typeof t?bh(e,t):t instanceof ah?t._internalPath:t._delegate._internalPath}function Sh(e){if("L"===e.limitType&&0===e.explicitOrderBy.length)throw new Ta(Ca.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}var _h=L((function e(){A(this,e)})),Ch=function(e){S(n,e);var t=T(n);function n(){return A(this,n),t.apply(this,arguments)}return L(n)}(_h);function Th(e,t){for(var n=[],r=arguments.length,i=new Array(r>2?r-2:0),a=2;a<r;a++)i[a-2]=arguments[a];t instanceof _h&&n.push(t),function(e){var t=e.filter((function(e){return e instanceof Ah})).length,n=e.filter((function(e){return e instanceof Ih})).length;if(t>1||t>0&&n>0)throw new Ta(Ca.INVALID_ARGUMENT,"InvalidQuery. When using composite filters, you cannot use more than one filter at the top level. Consider nesting the multiple filters within an `and(...)` statement. For example: change `query(query, where(...), or(...))` to `query(query, and(where(...), or(...)))`.")}(n=n.concat(i));var o,u=x(n);try{for(u.s();!(o=u.n()).done;){var s=o.value;e=s._apply(e)}}catch(l){u.e(l)}finally{u.f()}return e}
2var Ih=function(e){S(n,e);var t=T(n);function n(e,r,i){var a;return A(this,n),(a=t.call(this))._field=e,a._op=r,a._value=i,a.type="where",a}return L(n,[{key:"_apply",value:function(e){var t=this._parse(e);return Fh(e._query,t),new jf(e.firestore,e.converter,Nu(e._query,t))}},{key:"_parse",value:function(e){var t=hh(e.firestore),n=function(e,t,n,r,i,a,o){var u;if(i.isKeyField()){if("array-contains"===a||"array-contains-any"===a)throw new Ta(Ca.INVALID_ARGUMENT,"Invalid Query. You can't perform '".concat(a,"' queries on documentId()."));if("in"===a||"not-in"===a){Mh(o,a);var s,l=[],c=x(o);try{for(c.s();!(s=c.n()).done;){var f=s.value;l.push(Ph(r,e,f))}}catch(h){c.e(h)}finally{c.f()}u={arrayValue:{values:l}}}else u=Ph(r,e,o)}else"in"!==a&&"not-in"!==a&&"array-contains-any"!==a||Mh(o,a),u=dh(n,"where",o,"in"===a||"not-in"===a);return qo.create(i,a,u)}(e._query,0,t,e.firestore._databaseId,this._field,this._op,this._value);return n}}],[{key:"_create",value:function(e,t,r){return new n(e,t,r)}}]),n}(Ch);function Nh(e,t,n){var r=t,i=xh("where",e);return Ih._create(i,r,n)}var Ah=function(e){S(n,e);var t=T(n);function n(e,r){var i;return A(this,n),(i=t.call(this)).type=e,i._queryConstraints=r,i}return L(n,[{key:"_parse",value:function(e){var t=this._queryConstraints.map((function(t){return t._parse(e)})).filter((function(e){return e.getFilters().length>0}));return 1===t.length?t[0]:Ho.create(t,this._getOperator())}},{key:"_apply",value:function(e){var t=this._parse(e);return 0===t.getFilters().length?e:(function(e,t){var n,r=e,i=x(t.getFlattenedFilters());try{for(i.s();!(n=i.n()).done;){var a=n.value;Fh(r,a),r=Nu(r,a)}}catch(o){i.e(o)}finally{i.f()}}(e._query,t),new jf(e.firestore,e.converter,Nu(e._query,t)))}},{key:"_getQueryConstraints",value:function(){return this._queryConstraints}},{key:"_getOperator",value:function(){return"and"===this.type?"and":"or"}}],[{key:"_create",value:function(e,t){return new n(e,t)}}]),n}(_h);var Dh=function(e){S(n,e);var t=T(n);function n(e,r){var i;return A(this,n),(i=t.call(this))._field=e,i._direction=r,i.type="orderBy",i}return L(n,[{key:"_apply",value:function(e){var t=function(e,t,n){if(null!==e.startAt)throw new Ta(Ca.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(null!==e.endAt)throw new Ta(Ca.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");var r=new au(t,n);return function(e,t){if(null===Su(e)){var n=_u(e);null!==n&&jh(e,n,t.field)}}(e,r),r}(e._query,this._field,this._direction);return new jf(e.firestore,e.converter,function(e,t){var n=e.explicitOrderBy.concat([t]);return new ku(e.path,e.collectionGroup,n,e.filters.slice(),e.limit,e.limitType,e.startAt,e.endAt)}(e._query,t))}}],[{key:"_create",value:function(e,t){return new n(e,t)}}]),n}(Ch);function Lh(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"asc",n=t,r=xh("orderBy",e);return Dh._create(r,n)}var Oh=function(e){S(n,e);var t=T(n);function n(e,r,i){var a;return A(this,n),(a=t.call(this)).type=e,a._limit=r,a._limitType=i,a}return L(n,[{key:"_apply",value:function(e){return new jf(e.firestore,e.converter,Au(e._query,this._limit,this._limitType))}}],[{key:"_create",value:function(e,t,r){return new n(e,t,r)}}]),n}(Ch);function Rh(e){return Lf("limit",e),Oh._create("limit",e,"F")}function Ph(e,t,n){if("string"==typeof(n=ee(n))){if(""===n)throw new Ta(Ca.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");if(!Cu(t)&&-1!==n.indexOf("/"))throw new Ta(Ca.INVALID_ARGUMENT,"Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '".concat(n,"' contains a '/' character."));var r=t.path.child(Ha.fromString(n));if(!Qa.isDocumentKey(r))throw new Ta(Ca.INVALID_ARGUMENT,"Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '".concat(r,"' is not because it has an odd number of segments (").concat(r.length,")."));return Do(e,new Qa(r))}if(n instanceof Ff)return Do(e,n._key);throw new Ta(Ca.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ".concat(Af(n),"."))}function Mh(e,t){if(!Array.isArray(e)||0===e.length)throw new Ta(Ca.INVALID_ARGUMENT,"Invalid Query. A non-empty array is required for '".concat(t.toString(),"' filters."));if(e.length>10)throw new Ta(Ca.INVALID_ARGUMENT,"Invalid Query. '".concat(t.toString(),"' filters support a maximum of 10 elements in the value array."))}function Fh(e,t){if(t.isInequality()){var n=_u(e),r=t.field;if(null!==n&&!n.isEqual(r))throw new Ta(Ca.INVALID_ARGUMENT,"Invalid query. All where filters with an inequality (<, <=, !=, not-in, >, or >=) must be on the same field. But you have inequality filters on '".concat(n.toString(),"' and '").concat(r.toString(),"'"));var i=Su(e);null!==i&&jh(e,r,i)}var a=function(e,t){var n,r=x(e);try{for(r.s();!(n=r.n()).done;){var i,a=x(n.value.getFlattenedFilters());try{for(a.s();!(i=a.n()).done;){var o=i.value;if(t.indexOf(o.op)>=0)return o.op}}catch(u){a.e(u)}finally{a.f()}}}catch(u){r.e(u)}finally{r.f()}return null}(e.filters,function(e){switch(e){case"!=":return["!=","not-in"];case"array-contains":return["array-contains","array-contains-any","
2not-in"];case"in":return["array-contains-any","in","not-in"];case"array-contains-any":return["array-contains","array-contains-any","in","not-in"];case"not-in":return["array-contains","array-contains-any","in","not-in","!="];default:return[]}}(t.op));if(null!==a)throw a===t.op?new Ta(Ca.INVALID_ARGUMENT,"Invalid query. You cannot use more than one '".concat(t.op.toString(),"' filter.")):new Ta(Ca.INVALID_ARGUMENT,"Invalid query. You cannot use '".concat(t.op.toString(),"' filters with '").concat(a.toString(),"' filters."))}function jh(e,t,n){if(!n.isEqual(t))throw new Ta(Ca.INVALID_ARGUMENT,"Invalid query. You have a where filter with an inequality (<, <=, !=, not-in, >, or >=) on field '".concat(t.toString(),"' and so you must also use '").concat(t.toString(),"' as your first argument to orderBy(), but your first orderBy() is on field '").concat(n.toString(),"' instead."))}var Uh=function(){function e(){A(this,e)}return L(e,[{key:"convertValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none";switch(So(e)){case 0:return null;case 1:return e.booleanValue;case 2:return go(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(bo(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 xa()}}},{key:"convertObject",value:function(e,t){var n=this,r={};return lo(e.fields,(function(e,i){r[e]=n.convertValue(i,t)})),r}},{key:"convertGeoPoint",value:function(e){return new uh(go(e.latitude),go(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=wo(e);return null==n?null:this.convertValue(n,t);case"estimate":return this.convertTimestamp(Eo(e));default:return null}}},{key:"convertTimestamp",value:function(e){var t=mo(e);return new Ba(t.seconds,t.nanos)}},{key:"convertDocumentKey",value:function(e,t){var n=Ha.fromString(e);Sa(sl(n));var r=new uo(n.get(1),n.get(3)),i=new Qa(n.popFirst(5));return r.isEqual(t)||ka("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}();var Vh=function(){function e(t,n){A(this,e),this.hasPendingWrites=t,this.fromCache=n}return L(e,[{key:"isEqual",value:function(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}]),e}(),Bh=function(e){S(n,e);var t=T(n);function n(e,r,i,a,o,u){var s;return A(this,n),(s=t.call(this,e,r,i,a,u))._firestore=e,s._firestoreImpl=e,s.metadata=o,s}return L(n,[{key:"exists",value:function(){return E(k(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(xh("DocumentSnapshot.get",e));if(null!==n)return this._userDataWriter.convertValue(n,t.serverTimestamps)}}}]),n}(wh),zh=function(e){S(n,e);var t=T(n);function n(){return A(this,n),t.apply(this,arguments)}return L(n,[{key:"data",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return E(k(n.prototype),"data",this).call(this,e)}}]),n}(Bh),qh=function(){function e(t,n,r,i){A(this,e),this._firestore=t,this._userDataWriter=n,this._snapshot=i,this.metadata=new Vh(i.hasPendingWrites,i.fromCache),this.query=r}return L(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}}
2,{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 Vh(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 Ta(Ca.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 Vh(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 Vh(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:Hh(t.type),doc:n,oldIndex:i,newIndex:a}}))}(this,t),this._cachedChangesIncludeMetadataChanges=t),this._cachedChanges}}]),e}();function Hh(e){switch(e){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return xa()}}var Wh=function(e){S(n,e);var t=T(n);function n(e){var r;return A(this,n),(r=t.call(this)).firestore=e,r}return L(n,[{key:"convertBytes",value:function(e){return new ih(e)}},{key:"convertReference",value:function(e){var t=this.convertDocumentKey(e,this.firestore._databaseId);return new Ff(this.firestore,null,t)}}]),n}(Uh);function Kh(e){e=Df(e,jf);var t=Df(e.firestore,th),n=nh(t),r=new Wh(t);return Sh(e._query),Zf(n,e._query).then((function(n){return new qh(t,r,e,n)}))}!function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];!function(e){ya=e}(We),Ve(new te("firestore",(function(e,n){var r=n.instanceIdentifier,i=n.options,a=e.getProvider("app").getImmediate(),o=new th(new La(e.getProvider("auth-internal")),new Ma(e.getProvider("app-check-internal")),function(e,t){if(!Object.prototype.hasOwnProperty.apply(e.options,["projectId"]))throw new Ta(Ca.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new uo(e.options.projectId,t)}(a,r),a);return i=Object.assign({useFetchStreams:t},i),o._setSettings(i),o}),"PUBLIC").setMultipleInstances(!0)),Ge(pa,"3.8.0",e),Ge(pa,"3.8.0","esm2017")}();Ge("firebase","9.15.0","app");var Qh,Gh;var $h=new WeakMap,Yh=new WeakMap,Xh=new WeakMap,Jh=new WeakMap,Zh=new WeakMap;var ed={get:function(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return Yh.get(e);if("objectStoreNames"===t)return e.objectStoreNames||Xh.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return rd(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 td(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(Gh||(Gh=[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(id(this),n),rd($h.get(this))}:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return rd(e.apply(id(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,[id(this),t].concat(r));return Xh.set(a,t.sort?t.sort():[t]),rd(a)}}function nd(e){return"function"===typeof e?td(e):(e instanceof IDBTransaction&&function(e){if(!Yh.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)}));Yh.set(e,t)}}(e),t=e,(Qh||(Qh=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some((function(e){return t instanceof e}))?new Proxy(e,ed):e);var t}function rd(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(rd(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&&$h.set(t,e)}
2)).catch((function(){})),Zh.set(t,e),t}(e);if(Jh.has(e))return Jh.get(e);var t=nd(e);return t!==e&&(Jh.set(e,t),Zh.set(t,e)),t}var id=function(e){return Zh.get(e)};var ad,od=["get","getKey","getAll","getAllKeys","count"],ud=["put","add","delete","clear"],sd=new Map;function ld(e,t){if(e instanceof IDBDatabase&&!(t in e)&&"string"===typeof t){if(sd.get(t))return sd.get(t);var n=t.replace(/FromIndex$/,""),r=t!==n,i=ud.includes(n);if(n in(r?IDBIndex:IDBObjectStore).prototype&&(i||od.includes(n))){var a=function(){var e=f(l().mark((function e(t){var a,o,u,s,c,f,h=arguments;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(o=this.transaction(t,i?"readwrite":"readonly"),u=o.store,s=h.length,c=new Array(s>1?s-1:0),f=1;f<s;f++)c[f-1]=h[f];return r&&(u=u.index(c.shift())),e.next=6,Promise.all([(a=u)[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 sd.set(t,a),a}}}!function(e){ed=e(ed)}((function(e){return s(s({},e),{},{get:function(t,n,r){return ld(t,n)||e.get(t,n,r)},has:function(t,n){return!!ld(t,n)||e.has(t,n)}})}));var cd="@firebase/installations",fd="0.6.0",hd=1e4,dd="w:".concat(fd),pd="FIS_v2",vd=36e5,yd=(o(ad={},"missing-app-config-values",'Missing App configuration value: "{$valueName}"'),o(ad,"not-registered","Firebase Installation is not registered."),o(ad,"installation-not-found","Firebase Installation not found."),o(ad,"request-failed",'{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"'),o(ad,"app-offline","Could not process request. Application offline."),o(ad,"delete-pending-registration","Can't delete installation while there is a pending registration request."),ad),md=new Q("installations","Installations",yd);function gd(e){return e instanceof K&&e.code.includes("request-failed")}function bd(e){var t=e.projectId;return"".concat("https://firebaseinstallations.googleapis.com/v1","/projects/").concat(t,"/installations")}function kd(e){return{token:e.token,requestStatus:2,expiresIn:(t=e.expiresIn,Number(t.replace("s","000"))),creationTime:Date.now()};var t}function wd(e,t){return Ed.apply(this,arguments)}function Ed(){return(Ed=f(l().mark((function e(t,n){var r,i;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.json();case 2:return r=e.sent,i=r.error,e.abrupt("return",md.create("request-failed",{requestName:t,serverCode:i.code,serverMessage:i.message,serverStatus:i.status}));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function xd(e){var t=e.apiKey;return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":t})}function Sd(e,t){var n=t.refreshToken,r=xd(e);return r.append("Authorization",function(e){return"".concat(pd," ").concat(e)}(n)),r}function _d(e){return Cd.apply(this,arguments)}function Cd(){return Cd=f(l().mark((function e(t){var n;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t();case 2:if(!((n=e.sent).status>=500&&n.status<600)){e.next=5;break}return e.abrupt("return",t());case 5:return e.abrupt("return",n);case 6:case"end":return e.stop()}}),e)}))),Cd.apply(this,arguments)}function Td(e,t){return Id.apply(this,arguments)}function Id(){return(Id=f(l().mark((function e(t,n){var r,i,a,o,u,s,c,f,h,d,p,v;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.appConfig,i=t.heartbeatServiceProvider,a=n.fid,o=bd(r),u=xd(r),!(s=i.getImmediate({optional:!0}))){e.next=10;break}return e.next=8,s.getHeartbeatsHeader();case 8:(c=e.sent)&&u.append("x-firebase-client",c);case 10:return f={fid:a,authVersion:pd,appId:r.appId,sdkVersion:dd},h={method:"POST",headers:u,body:JSON.stringify(f)},e.next=14,_d((function(){return fetch(o,h)}));case 14:if(!(d=e.sent).ok){e.next=23;break}return e.next=18,d.json();case 18:return p=e.sent,v={fid:p.fid||a,registrationStatus:2,refreshToken:p.refreshToken,authToken:kd(p.authToken)},e.abrupt("return",v);case 23:return e.next=25,wd("Create Installation",d);case 25:throw e.sent;case 26:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Nd(e){return new Promise((function(t){setTimeout(t,e)}))}var Ad=/^[cdef][\w-]{21}$/;function Dd(){try{var e=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(e),e[0]=112+e[0]%16;var t=function(e){var t=(n=e,btoa(String.fromCharCode.apply(String,N(n))).replace(/\+/g,"-").replace(/\//g,"_"));var n;return t.substr(0,22)}(e);return Ad.test(t)?t:""}catch(Of){return""}}function Ld(e){return"".concat(e.appName,"!").concat(e.appId)}var Od=new Map;function Rd(e,t){var n=Ld(e);Pd(n,t),function(e,t){var n=Fd();n&&n.postMessage({key:e,fid:t});jd()}(n,t)}function Pd(e,t){var n=Od.get(e);if(n){var r,i=x(n);try{for(i.s();!(r=i.n()).done;){(0,r.value)(t)}}catch(a){i.e(a)}finally{i.f()}}}var Md=null;function Fd(){return!Md&&"BroadcastChannel"in self&&((Md=new BroadcastChannel("[Firebase] FID Change")).onmessage=function(e){Pd(e.data.key,e.data.fid)}),Md}
2function jd(){0===Od.size&&Md&&(Md.close(),Md=null)}var Ud="firebase-installations-store",Vd=null;function Bd(){return Vd||(Vd=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=rd(u);return i&&u.addEventListener("upgradeneeded",(function(e){i(rd(u.result),e.oldVersion,e.newVersion,rd(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-installations-database",1,{upgrade:function(e,t){if(0===t)e.createObjectStore(Ud)}})),Vd}function zd(e,t){return qd.apply(this,arguments)}function qd(){return qd=f(l().mark((function e(t,n){var r,i,a,o,u;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Ld(t),e.next=3,Bd();case 3:return i=e.sent,a=i.transaction(Ud,"readwrite"),o=a.objectStore(Ud),e.next=8,o.get(r);case 8:return u=e.sent,e.next=11,o.put(n,r);case 11:return e.next=13,a.done;case 13:return u&&u.fid===n.fid||Rd(t,n.fid),e.abrupt("return",n);case 15:case"end":return e.stop()}}),e)}))),qd.apply(this,arguments)}function Hd(e){return Wd.apply(this,arguments)}function Wd(){return Wd=f(l().mark((function e(t){var n,r,i;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Ld(t),e.next=3,Bd();case 3:return r=e.sent,i=r.transaction(Ud,"readwrite"),e.next=7,i.objectStore(Ud).delete(n);case 7:return e.next=9,i.done;case 9:case"end":return e.stop()}}),e)}))),Wd.apply(this,arguments)}function Kd(e,t){return Qd.apply(this,arguments)}function Qd(){return Qd=f(l().mark((function e(t,n){var r,i,a,o,u,s;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Ld(t),e.next=3,Bd();case 3:return i=e.sent,a=i.transaction(Ud,"readwrite"),o=a.objectStore(Ud),e.next=8,o.get(r);case 8:if(u=e.sent,void 0!==(s=n(u))){e.next=15;break}return e.next=13,o.delete(r);case 13:e.next=17;break;case 15:return e.next=17,o.put(s,r);case 17:return e.next=19,a.done;case 19:return!s||u&&u.fid===s.fid||Rd(t,s.fid),e.abrupt("return",s);case 21:case"end":return e.stop()}}),e)}))),Qd.apply(this,arguments)}function Gd(e){return $d.apply(this,arguments)}function $d(){return($d=f(l().mark((function e(t){var n,r;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Kd(t.appConfig,(function(e){var r=Yd(e),i=Xd(t,r);return n=i.registrationPromise,i.installationEntry}));case 2:if(""!==(r=e.sent).fid){e.next=8;break}return e.next=6,n;case 6:return e.t0=e.sent,e.abrupt("return",{installationEntry:e.t0});case 8:return e.abrupt("return",{installationEntry:r,registrationPromise:n});case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Yd(e){return np(e||{fid:Dd(),registrationStatus:0})}function Xd(e,t){if(0===t.registrationStatus){if(!navigator.onLine)return{installationEntry:t,registrationPromise:Promise.reject(md.create("app-offline"))};var n={fid:t.fid,registrationStatus:1,registrationTime:Date.now()},r=function(e,t){return Jd.apply(this,arguments)}(e,n);return{installationEntry:n,registrationPromise:r}}return 1===t.registrationStatus?{installationEntry:t,registrationPromise:Zd(e)}:{installationEntry:t}}function Jd(){return(Jd=f(l().mark((function e(t,n){var r;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Td(t,n);case 3:return r=e.sent,e.abrupt("return",zd(t.appConfig,r));case 7:if(e.prev=7,e.t0=e.catch(0),!gd(e.t0)||409!==e.t0.customData.serverCode){e.next=14;break}return e.next=12,Hd(t.appConfig);case 12:e.next=16;break;case 14:return e.next=16,zd(t.appConfig,{fid:n.fid,registrationStatus:0});case 16:throw e.t0;case 17:case"end":return e.stop()}}),e,null,[[0,7]])})))).apply(this,arguments)}function Zd(e){return ep.apply(this,arguments)}function ep(){return(ep=f(l().mark((function e(t){var n,r,i,a;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,tp(t.appConfig);case 2:n=e.sent;case 3:if(1!==n.registrationStatus){e.next=11;break}return e.next=6,Nd(100);case 6:return e.next=8,tp(t.appConfig);case 8:n=e.sent,e.next=3;break;case 11:if(0!==n.registrationStatus){e.next=22;break}return e.next=14,Gd(t);case 14:if(r=e.sent,i=r.installationEntry,!(a=r.registrationPromise)){e.next=21;break}return e.abrupt("return",a);case 21:return e.abrupt("return",i);case 22:return e.abrupt("return",n);case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function tp(e){return Kd(e,(function(e){if(!e)throw md.create("installation-not-found");return np(e)}))}function np(e){return 1===(t=e).registrationStatus&&t.registrationTime+hd<Date.now()?{fid:e.fid,registrationStatus:0}:e;var t}function rp(e,t){return ip.apply(this,arguments)}function ip(){return(ip=f(l().mark((function e(t,n){var r,i,a,o,u,s,c,f,h,d,p;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.appConfig,i=t.heartbeatServiceProvider,a=ap(r,n),o=Sd(r,n),!(u=i.getImmediate({optional:!0}))){e.next=9;break}return e.next=7,u.getHeartbeatsHeader();case 7:(s=e.sent)&&o.append("x-firebase-client",s);case 9:return c={installation:{sdkVersion:dd,appId:r.appId}},f={method:"POST",headers:o,body:JSON.stringify(c)},e.next=13,_d((function(){return fetch(a,f)}));case 13:if(!(h=e.sent).ok){e.next=22;break}return e.next=17,h.json();case 17:return d=e.sent,p=kd(d),e.abrupt("return",p);case 22:return e.next=24,wd("Generate Auth Token",h);case 24:throw e.sent;case 25:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ap(e,t){var n=t.fid;return"".concat(bd(e),"/").concat(n,"/authTokens:generate")}function op(e){return up.apply(this,arguments)}function up(){return up=f(l().mark((function e(t){var n,r,i,a,o=arguments;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=o.length>1&&void 0!==o[1]&&o[1],e.next=3,Kd(t.appConfig,(function(e){if(!dp(e))throw md.create("not-registered");var i=e.authToken;if(!n&&pp(i))return e;if(1===i.requestStatus)return r=sp(t,n),e;if(!navigator.onLine)throw md.create("app-offline");var a=vp(e);return r=fp(t,a),a}));case 3:if(i=e.sent,!r){e.next=10;break}return e.next=7,r;case 7:e.t0=e.sent,e.next=11;break;case 10:e.t0=i.authToken;case 11:return a=e.t0,e.abrupt("return",a);case 13:case"end":return e.stop()}}),e)}))),up.apply(this,arguments)}function sp(e,t){return lp.apply(this,arguments)}function lp(){return(lp=f(l().mark((function e(t,n){var r,i;return l().wrap((function(e){for(;;
2)switch(e.prev=e.next){case 0:return e.next=2,cp(t.appConfig);case 2:r=e.sent;case 3:if(1!==r.authToken.requestStatus){e.next=11;break}return e.next=6,Nd(100);case 6:return e.next=8,cp(t.appConfig);case 8:r=e.sent,e.next=3;break;case 11:if(0!==(i=r.authToken).requestStatus){e.next=16;break}return e.abrupt("return",op(t,n));case 16:return e.abrupt("return",i);case 17:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function cp(e){return Kd(e,(function(e){if(!dp(e))throw md.create("not-registered");var t,n=e.authToken;return 1===(t=n).requestStatus&&t.requestTime+hd<Date.now()?Object.assign(Object.assign({},e),{authToken:{requestStatus:0}}):e}))}function fp(e,t){return hp.apply(this,arguments)}function hp(){return(hp=f(l().mark((function e(t,n){var r,i,a;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,rp(t,n);case 3:return r=e.sent,i=Object.assign(Object.assign({},n),{authToken:r}),e.next=7,zd(t.appConfig,i);case 7:return e.abrupt("return",r);case 10:if(e.prev=10,e.t0=e.catch(0),!gd(e.t0)||401!==e.t0.customData.serverCode&&404!==e.t0.customData.serverCode){e.next=17;break}return e.next=15,Hd(t.appConfig);case 15:e.next=20;break;case 17:return a=Object.assign(Object.assign({},n),{authToken:{requestStatus:0}}),e.next=20,zd(t.appConfig,a);case 20:throw e.t0;case 21:case"end":return e.stop()}}),e,null,[[0,10]])})))).apply(this,arguments)}function dp(e){return void 0!==e&&2===e.registrationStatus}function pp(e){return 2===e.requestStatus&&!function(e){var t=Date.now();return t<e.creationTime||e.creationTime+e.expiresIn<t+vd}(e)}function vp(e){var t={requestStatus:1,requestTime:Date.now()};return Object.assign(Object.assign({},e),{authToken:t})}function yp(){return(yp=f(l().mark((function e(t){var n,r,i,a;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t,e.next=3,Gd(n);case 3:return r=e.sent,i=r.installationEntry,(a=r.registrationPromise)?a.catch(console.error):op(n).catch(console.error),e.abrupt("return",i.fid);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function mp(){return mp=f(l().mark((function e(t){var n,r,i,a=arguments;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.length>1&&void 0!==a[1]&&a[1],r=t,e.next=4,gp(r);case 4:return e.next=6,op(r,n);case 6:return i=e.sent,e.abrupt("return",i.token);case 8:case"end":return e.stop()}}),e)}))),mp.apply(this,arguments)}function gp(e){return bp.apply(this,arguments)}function bp(){return(bp=f(l().mark((function e(t){var n,r;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Gd(t);case 2:if(n=e.sent,!(r=n.registrationPromise)){e.next=7;break}return e.next=7,r;case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function kp(e){return md.create("missing-app-config-values",{valueName:e})}var wp,Ep="installations",xp=function(e){var t=e.getProvider("app").getImmediate(),n=function(e){if(!e||!e.options)throw kp("App Configuration");if(!e.name)throw kp("App Name");for(var t=0,n=["projectId","apiKey","appId"];t<n.length;t++){var r=n[t];if(!e.options[r])throw kp(r)}return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}(t);return{app:t,appConfig:n,heartbeatServiceProvider:Be(t,"heartbeat"),_delete:function(){return Promise.resolve()}}},Sp=function(e){var t=Be(e.getProvider("app").getImmediate(),Ep).getImmediate(),n={getId:function(){return function(e){return yp.apply(this,arguments)}(t)},getToken:function(e){return function(e){return mp.apply(this,arguments)}(t,e)}};return n};Ve(new te(Ep,xp,"PUBLIC")),Ve(new te("installations-internal",Sp,"PRIVATE")),Ge(cd,fd),Ge(cd,fd,"esm2017");var _p="analytics",Cp="firebase_id",Tp="origin",Ip=6e4,Np="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig",Ap="https://www.googletagmanager.com/gtag/js",Dp=new he("@firebase/analytics");function Lp(e){return Promise.all(e.map((function(e){return e.catch((function(e){return e}))})))}function Op(e,t){var n=document.createElement("script");n.src="".concat(Ap,"?l=").concat(e,"&id=").concat(t),n.async=!0,document.head.appendChild(n)}function Rp(e,t,n,r,i,a){return Pp.apply(this,arguments)}function Pp(){return Pp=f(l().mark((function e(t,n,r,i,a,o){var u,s,c;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=i[a],e.prev=1,!u){e.next=7;break}return e.next=5,n[u];case 5:e.next=14;break;case 7:return e.next=9,Lp(r);case 9:if(s=e.sent,c=s.find((function(e){return e.measurementId===a})),!c){e.next=14;break}return e.next=14,n[c.appId];case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(1),Dp.error(e.t0);case 19:t("config",a,o);case 20:case"end":return e.stop()}}),e,null,[[1,16]])}))),Pp.apply(this,arguments)}function Mp(e,t,n,r,i){return Fp.apply(this,arguments)}function Fp(){return Fp=f(l().mark((function e(t,n,r,i,a){var o,u,s,c,f,h;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,o=[],!a||!a.send_to){e.next=27;break}return u=a.send_to,Array.isArray(u)||(u=[u]),e.next=7,Lp(r);case 7:s=e.sent,c=x(u),e.prev=9,h=l().mark((function e(){var t,r,i;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=f.value,r=s.find((function(e){return e.measurementId===t})),!(i=r&&n[r.appId])){e.next=7;break}o.push(i),e.next=9;break;case 7:return o=[],e.abrupt("return","break");case 9:case"end":return e.stop()}}),e)})),c.s();case 12:if((f=c.n()).done){e.next=19;break}return e.delegateYield(h(),"t0",14);case 14:if("break"!==e.t0){e.next=17;break}return e.abrupt("break",19);case 17:e.next=12;break;case 19:e.next=24;break;case 21:e.prev=21,e.t1=e.catch(9),c.e(e.t1);case 24:return e.prev=24,c.f(),e.finish(24);case 27:return 0===o.length&&(o=Object.values(n)),e.next=30,Promise.all(o);case 30:t("event",i,a||{}),e.next=36;break;case 33:e.prev=33,e.t2=e.catch(0),Dp.error(e.t2);case 36:case"end":return e.stop()}}),e,null,[[0,33],[9,21,24,27]])}))),Fp.apply(this,arguments)}function jp(e,t,n,r,i){var a=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];window[r].push(arguments)};return window[i]&&"function"===typeof window[i]&&(a=window[i]),window[i]=function(e,t,n,r){function i(){return(i=f(l().mark((function i(a,o,u){return l().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(i.prev=0,"event"!==a){i.next=6;break}return i.next=4,Mp(e,t,n,o,u);case 4:i.next=12;break;case 6:if("config"!==a){i.next=11;break}return i.next=9,Rp(e,t,n,r,o,u);case 9:i.next=12;break;case 11:"consent"===a?e("consent","update",u):e("set",o);case 12:i.next=17;break;case 14:i.prev=14,i.t0=i.catch(0),Dp.error(i.t0);case 17:case"end":return i.stop()}}),i,null,[[0,14]])}
2)))).apply(this,arguments)}return function(e,t,n){return i.apply(this,arguments)}}(a,e,t,n),{gtagCore:a,wrappedGtag:window[i]}}function Up(e){for(var t=window.document.getElementsByTagName("script"),n=0,r=Object.values(t);n<r.length;n++){var i=r[n];if(i.src&&i.src.includes(Ap)&&i.src.includes(e))return i}return null}var Vp=(o(wp={},"already-exists","A Firebase Analytics instance with the appId {$id} already exists. Only one Firebase Analytics instance can be created for each appId."),o(wp,"already-initialized","initializeAnalytics() cannot be called again with different options than those it was initially called with. It can be called again with the same options to return the existing instance, or getAnalytics() can be used to get a reference to the already-intialized instance."),o(wp,"already-initialized-settings","Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect."),o(wp,"interop-component-reg-failed","Firebase Analytics Interop Component failed to instantiate: {$reason}"),o(wp,"invalid-analytics-context","Firebase Analytics is not supported in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}"),o(wp,"indexeddb-unavailable","IndexedDB unavailable or restricted in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}"),o(wp,"fetch-throttle","The config fetch request timed out while in an exponential backoff state. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}."),o(wp,"config-fetch-failed","Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}"),o(wp,"no-api-key",'The "apiKey" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid API key.'),o(wp,"no-app-id",'The "appId" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid app ID.'),wp),Bp=new Q("analytics","Analytics",Vp),zp=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;A(this,e),this.throttleMetadata=t,this.intervalMillis=n}return L(e,[{key:"getThrottleMetadata",value:function(e){return this.throttleMetadata[e]}},{key:"setThrottleMetadata",value:function(e,t){this.throttleMetadata[e]=t}},{key:"deleteThrottleMetadata",value:function(e){delete this.throttleMetadata[e]}}]),e}(),qp=new zp;function Hp(e){return new Headers({Accept:"application/json","x-goog-api-key":e})}function Wp(e){return Kp.apply(this,arguments)}function Kp(){return Kp=f(l().mark((function e(t){var n,r,i,a,o,u,s,c;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.appId,i=t.apiKey,a={method:"GET",headers:Hp(i)},o=Np.replace("{app-id}",r),e.next=5,fetch(o,a);case 5:if(200===(u=e.sent).status||304===u.status){e.next=18;break}return s="",e.prev=8,e.next=11,u.json();case 11:c=e.sent,(null===(n=c.error)||void 0===n?void 0:n.message)&&(s=c.error.message),e.next=17;break;case 15:e.prev=15,e.t0=e.catch(8);case 17:throw Bp.create("config-fetch-failed",{httpStatus:u.status,responseMessage:s});case 18:return e.abrupt("return",u.json());case 19:case"end":return e.stop()}}),e,null,[[8,15]])}))),Kp.apply(this,arguments)}function Qp(e){return Gp.apply(this,arguments)}function Gp(){return Gp=f(l().mark((function e(t){var n,r,i,a,o,u,s,c,h=arguments;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=h.length>1&&void 0!==h[1]?h[1]:qp,r=h.length>2?h[2]:void 0,i=t.options,a=i.appId,o=i.apiKey,u=i.measurementId,a){e.next=5;break}throw Bp.create("no-app-id");case 5:if(o){e.next=9;break}if(!u){e.next=8;break}return e.abrupt("return",{measurementId:u,appId:a});case 8:throw Bp.create("no-api-key");case 9:return s=n.getThrottleMetadata(a)||{backoffCount:0,throttleEndTimeMillis:Date.now()},c=new tv,setTimeout(f(l().mark((function e(){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:c.abort();case 1:case"end":return e.stop()}}),e)}))),void 0!==r?r:Ip),e.abrupt("return",$p({appId:a,apiKey:o,measurementId:u},s,c,n));case 13:case"end":return e.stop()}}),e)}))),Gp.apply(this,arguments)}function $p(e,t,n){return Yp.apply(this,arguments)}function Yp(){return Yp=f(l().mark((function e(t,n,r){var i,a,o,u,s,c,f,h,d,p,v=arguments;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=n.throttleEndTimeMillis,a=n.backoffCount,o=v.length>3&&void 0!==v[3]?v[3]:qp,s=t.appId,c=t.measurementId,e.prev=3,e.next=6,Xp(r,i);case 6:e.next=14;break;case 8:if(e.prev=8,e.t0=e.catch(3),!c){e.next=13;break}return Dp.warn("Timed out fetching this Firebase app's measurement ID from the server."+" Falling back to the measurement ID ".concat(c)+' provided in the "measurementId" field in the local Firebase config. ['.concat(null===e.t0||void 0===e.t0?void 0:e.t0.message,"]")),e.abrupt("return",{appId:s,measurementId:c});case 13:throw e.t0;case 14:return e.prev=14,e.next=17,Wp(t);case 17:return f=e.sent,o.deleteThrottleMetadata(s),e.abrupt("return",f);case 22:if(e.prev=22,e.t1=e.catch(14),Jp(h=e.t1)){e.next=33;break}if(o.deleteThrottleMetadata(s),!c){e.next=32;break}return Dp.warn("Failed to fetch this Firebase app's measurement ID from the server."+" Falling back to the measurement ID ".concat(c)+' provided in the "measurementId" field in the local Firebase config. ['.concat(null===h||void 0===h?void 0:h.message,"]")),e.abrupt("return",{appId:s,measurementId:c});case 32:throw e.t1;case 33:return d=503===Number(null===(u=null===h||void 0===h?void 0:h.customData)||void 0===u?void 0:u.httpStatus)?Z(a,o.intervalMillis,30):Z(a,o.intervalMillis),p={throttleEndTimeMillis:Date.now()+d,backoffCount:a+1},o.setThrottleMetadata(s,p),Dp.debug("Calling attemptFetch again in ".concat(d," millis")),e.abrupt("return",$p(t,p,r,o));case 38:case"end":return e.stop()}}),e,null,[[3,8],[14,22]])}))),Yp.apply(this,arguments)}function Xp(e,t){return new Promise((function(n,r){var i=Math.max(t-Date.now(),0),a=setTimeout(n,i);e.addEventListener((function(){clearTimeout(a),r(Bp.create("fetch-throttle",{throttleEndTimeMillis:t}))}))}))}function Jp(e){if(!(e instanceof K)||!e.customData)return!1;var t=Number(e.customData.httpStatus);return 429===t||500===t||503===t||504===t}var Zp,ev,tv=function(){function e(){A(this,e),this.listeners=[]}return L(e,[{key:"addEventListener",value:function(e){this.listeners.push(e)}}
2,{key:"abort",value:function(){this.listeners.forEach((function(e){return e()}))}}]),e}();function nv(){return(nv=f(l().mark((function e(t,n,r,i,a){var o,u;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!a||!a.global){e.next=5;break}return t("event",r,i),e.abrupt("return");case 5:return e.next=7,n;case 7:o=e.sent,u=Object.assign(Object.assign({},i),{send_to:o}),t("event",r,u);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function rv(e){ev=e}function iv(e){Zp=e}function av(){return ov.apply(this,arguments)}function ov(){return(ov=f(l().mark((function e(){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(j()){e.next=5;break}return Dp.warn(Bp.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),e.abrupt("return",!1);case 5:return e.prev=5,e.next=8,U();case 8:e.next=14;break;case 10:return e.prev=10,e.t0=e.catch(5),Dp.warn(Bp.create("indexeddb-unavailable",{errorInfo:null===e.t0||void 0===e.t0?void 0:e.t0.toString()}).message),e.abrupt("return",!1);case 14:return e.abrupt("return",!0);case 15:case"end":return e.stop()}}),e,null,[[5,10]])})))).apply(this,arguments)}function uv(){return uv=f(l().mark((function e(t,n,r,i,a,o,u){var s,c,f,h,d,p,v,m;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(c=Qp(t)).then((function(e){r[e.measurementId]=e.appId,t.options.measurementId&&e.measurementId!==t.options.measurementId&&Dp.warn("The measurement ID in the local Firebase config (".concat(t.options.measurementId,")")+" does not match the measurement ID fetched from the server (".concat(e.measurementId,").")+" To ensure analytics events are always sent to the correct Analytics property, update the measurement ID field in the local config or remove it from the local config.")})).catch((function(e){return Dp.error(e)})),n.push(c),f=av().then((function(e){return e?i.getId():void 0})),e.next=6,Promise.all([c,f]);case 6:return h=e.sent,d=y(h,2),p=d[0],v=d[1],Up(o)||Op(o,p.measurementId),ev&&(a("consent","default",ev),rv(void 0)),a("js",new Date),(m=null!==(s=null===u||void 0===u?void 0:u.config)&&void 0!==s?s:{})[Tp]="firebase",m.update=!0,null!=v&&(m[Cp]=v),a("config",p.measurementId,m),Zp&&(a("set",Zp),iv(void 0)),e.abrupt("return",p.measurementId);case 20:case"end":return e.stop()}}),e)}))),uv.apply(this,arguments)}var sv,lv,cv=function(){function e(t){A(this,e),this.app=t}return L(e,[{key:"_delete",value:function(){return delete fv[this.app.options.appId],Promise.resolve()}}]),e}(),fv={},hv=[],dv={},pv="dataLayer",vv="gtag",yv=!1;function mv(){var e=[];if(function(){var e="object"===typeof chrome?chrome.runtime:"object"===typeof browser?browser.runtime:void 0;return"object"===typeof e&&void 0!==e.id}()&&e.push("This is a browser extension environment."),"undefined"!==typeof navigator&&navigator.cookieEnabled||e.push("Cookies are not available."),e.length>0){var t=e.map((function(e,t){return"(".concat(t+1,") ").concat(e)})).join(" "),n=Bp.create("invalid-analytics-context",{errorInfo:t});Dp.warn(n.message)}}function gv(e,t,n){mv();var r=e.options.appId;if(!r)throw Bp.create("no-app-id");if(!e.options.apiKey){if(!e.options.measurementId)throw Bp.create("no-api-key");Dp.warn('The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest'+" measurement ID for this Firebase app. Falling back to the measurement ID ".concat(e.options.measurementId)+' provided in the "measurementId" field in the local Firebase config.')}if(null!=fv[r])throw Bp.create("already-exists",{id:r});if(!yv){!function(e){var t=[];Array.isArray(window[e])?t=window[e]:window[e]=t}(pv);var i=jp(fv,hv,dv,pv,vv),a=i.wrappedGtag,o=i.gtagCore;lv=a,sv=o,yv=!0}return fv[r]=function(e,t,n,r,i,a,o){return uv.apply(this,arguments)}(e,hv,dv,t,sv,pv,n),new cv(e)}function bv(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Be(e,_p);if(n.isInitialized()){var r=n.getImmediate();if(Y(t,n.getOptions()))return r;throw Bp.create("already-initialized")}var i=n.initialize({options:t});return i}function kv(e,t,n,r){e=ee(e),function(e,t,n,r,i){return nv.apply(this,arguments)}(lv,fv[e.app.options.appId],t,n,r).catch((function(e){return Dp.error(e)}))}var wv="@firebase/analytics",Ev="0.9.0";Ve(new te(_p,(function(e,t){var n=t.options;return gv(e.getProvider("app").getImmediate(),e.getProvider("installations-internal").getImmediate(),n)}
2),"PUBLIC")),Ve(new te("analytics-internal",(function(e){try{var t=e.getProvider(_p).getImmediate();return{logEvent:function(e,n,r){return kv(t,e,n,r)}}}catch(n){throw Bp.create("interop-component-reg-failed",{reason:n})}}),"PRIVATE")),Ge(wv,Ev),Ge(wv,Ev,"esm2017");var xv="firebasestorage.googleapis.com",Sv="storageBucket",_v=function(e){S(n,e);var t=T(n);function n(e,r){var i,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return A(this,n),(i=t.call(this,Cv(e),"Firebase Storage: ".concat(r," (").concat(Cv(e),")"))).status_=a,i.customData={serverResponse:null},i._baseMessage=i.message,Object.setPrototypeOf(_(i),n.prototype),i}return L(n,[{key:"status",get:function(){return this.status_},set:function(e){this.status_=e}},{key:"_codeEquals",value:function(e){return Cv(e)===this.code}},{key:"serverResponse",get:function(){return this.customData.serverResponse},set:function(e){this.customData.serverResponse=e,this.customData.serverResponse?this.message="".concat(this._baseMessage,"\n").concat(this.customData.serverResponse):this.message=this._baseMessage}}]),n}(K);function Cv(e){return"storage/"+e}function Tv(){return new _v("unknown","An unknown error occurred, please check the error payload for server response.")}function Iv(){return new _v("retry-limit-exceeded","Max retry time for operation exceeded, please try again.")}function Nv(){return new _v("canceled","User canceled the upload/download.")}function Av(e){return new _v("invalid-argument",e)}function Dv(){return new _v("app-deleted","The Firebase app was deleted.")}var Lv,Ov=function(){function e(t,n){A(this,e),this.bucket=t,this.path_=n}return L(e,[{key:"path",get:function(){return this.path_}},{key:"isRoot",get:function(){return 0===this.path.length}},{key:"fullServerUrl",value:function(){var e=encodeURIComponent;return"/b/"+e(this.bucket)+"/o/"+e(this.path)}},{key:"bucketOnlyServerUrl",value:function(){return"/b/"+encodeURIComponent(this.bucket)+"/o"}}],[{key:"makeFromBucketSpec",value:function(t,n){var r;try{r=e.makeFromUrl(t,n)}catch(i){return new e(t,"")}if(""===r.path)return r;throw new _v("invalid-default-bucket","Invalid default bucket '"+t+"'.")}},{key:"makeFromUrl",value:function(t,n){var r=null,i="([A-Za-z0-9.\\-_]+)";var a=new RegExp("^gs://"+i+"(/(.*))?$","i");function o(e){e.path_=decodeURIComponent(e.path)}for(var u=n.replace(/[.]/g,"\\."),s=[{regex:a,indices:{bucket:1,path:3},postModify:function(e){"/"===e.path.charAt(e.path.length-1)&&(e.path_=e.path_.slice(0,-1))}},{regex:new RegExp("^https?://".concat(u,"/").concat("v[A-Za-z0-9_]+","/b/").concat(i,"/o").concat("(/([^?#]*).*)?$"),"i"),indices:{bucket:1,path:3},postModify:o},{regex:new RegExp("^https?://".concat(n===xv?"(?:storage.googleapis.com|storage.cloud.google.com)":n,"/").concat(i,"/").concat("([^?#]*)"),"i"),indices:{bucket:1,path:2},postModify:o}],l=0;l<s.length;l++){var c=s[l],f=c.regex.exec(t);if(f){var h=f[c.indices.bucket],d=f[c.indices.path];d||(d=""),r=new e(h,d),c.postModify(r);break}}if(null==r)throw function(e){return new _v("invalid-url","Invalid URL '"+e+"'.")}(t);return r}}]),e}(),Rv=function(){function e(t){A(this,e),this.promise_=Promise.reject(t)}return L(e,[{key:"getPromise",value:function(){return this.promise_}},{key:"cancel",value:function(){}}]),e}();function Pv(e,t,n,r){if(r<t)throw Av("Invalid value for '".concat(e,"'. Expected ").concat(t," or greater."));if(r>n)throw Av("Invalid value for '".concat(e,"'. Expected ").concat(n," or less."))}function Mv(e){var t=encodeURIComponent,n="?";for(var r in e){if(e.hasOwnProperty(r))n=n+(t(r)+"="+t(e[r]))+"&"}return n=n.slice(0,-1)}function Fv(e,t){var n=e>=500&&e<600,r=-1!==[408,429].indexOf(e),i=-1!==t.indexOf(e);return n||r||i}!function(e){e[e.NO_ERROR=0]="NO_ERROR",e[e.NETWORK_ERROR=1]="NETWORK_ERROR",e[e.ABORT=2]="ABORT"}(Lv||(Lv={}));var jv=function(){function e(t,n,r,i,a,o,u,s,l,c,f){var h=this,d=!(arguments.length>11&&void 0!==arguments[11])||arguments[11];A(this,e),this.url_=t,this.method_=n,this.headers_=r,this.body_=i,this.successCodes_=a,this.additionalRetryCodes_=o,this.callback_=u,this.errorCallback_=s,this.timeout_=l,this.progressCallback_=c,this.connectionFactory_=f,this.retry=d,this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.promise_=new Promise((function(e,t){h.resolve_=e,h.reject_=t,h.start_()}
2))}return L(e,[{key:"start_",value:function(){var e=this,t=function(t,n){var r=e.resolve_,i=e.reject_,a=n.connection;if(n.wasSuccessCode)try{var o=e.callback_(a,a.getResponse());!function(e){return void 0!==e}(o)?r():r(o)}catch(s){i(s)}else if(null!==a){var u=Tv();u.serverResponse=a.getErrorText(),e.errorCallback_?i(e.errorCallback_(a,u)):i(u)}else{if(n.canceled)i(e.appDelete_?Dv():Nv());else i(Iv())}};this.canceled_?t(0,new Uv(!1,null,!0)):this.backoffId_=function(e,t,n){var r=1,i=null,a=null,o=!1,u=0;function s(){return 2===u}var l=!1;function c(){if(!l){l=!0;for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.apply(null,n)}}function f(t){i=setTimeout((function(){i=null,e(d,s())}),t)}function h(){a&&clearTimeout(a)}function d(e){if(l)h();else{for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];if(e)return h(),void c.call.apply(c,[null,e].concat(n));var a;if(s()||o)return h(),void c.call.apply(c,[null,e].concat(n));r<64&&(r*=2),1===u?(u=2,a=0):a=1e3*(r+Math.random()),f(a)}}var p=!1;function v(e){p||(p=!0,h(),l||(null!==i?(e||(u=2),clearTimeout(i),f(0)):e||(u=1)))}return f(0),a=setTimeout((function(){o=!0,v(!0)}),n),v}((function(t,n){if(n)t(!1,new Uv(!1,null,!0));else{var r=e.connectionFactory_();e.pendingConnection_=r;var i=function(t){var n=t.loaded,r=t.lengthComputable?t.total:-1;null!==e.progressCallback_&&e.progressCallback_(n,r)};null!==e.progressCallback_&&r.addUploadProgressListener(i),r.send(e.url_,e.method_,e.body_,e.headers_).then((function(){null!==e.progressCallback_&&r.removeUploadProgressListener(i),e.pendingConnection_=null;var n=r.getErrorCode()===Lv.NO_ERROR,a=r.getStatus();if(n&&!Fv(a,e.additionalRetryCodes_)||!e.retry){var o=-1!==e.successCodes_.indexOf(a);t(!0,new Uv(o,r))}else{var u=r.getErrorCode()===Lv.ABORT;t(!1,new Uv(!1,null,u))}}))}}),t,this.timeout_)}},{key:"getPromise",value:function(){return this.promise_}},{key:"cancel",value:function(e){this.canceled_=!0,this.appDelete_=e||!1,null!==this.backoffId_&&function(e){e(!1)}(this.backoffId_),null!==this.pendingConnection_&&this.pendingConnection_.abort()}}]),e}(),Uv=L((function e(t,n,r){A(this,e),this.wasSuccessCode=t,this.connection=n,this.canceled=!!r}));function Vv(e,t){null!==t&&t.length>0&&(e.Authorization="Firebase "+t)}function Bv(e,t){e["X-Firebase-Storage-Version"]="webjs/"+(null!==t&&void 0!==t?t:"AppManager")}function zv(e,t){t&&(e["X-Firebase-GMPID"]=t)}function qv(e,t){null!==t&&(e["X-Firebase-AppCheck"]=t)}function Hv(e,t,n,r,i,a){var o=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],u=Mv(e.urlParams),s=e.url+u,l=Object.assign({},e.headers);return zv(l,t),Vv(l,n),Bv(l,a),qv(l,r),new jv(s,e.method,l,e.body,e.successCodes,e.additionalRetryCodes,e.handler,e.errorHandler,e.timeout,e.progressCallback,i,o)}function Wv(e){var t=e.lastIndexOf("/",e.length-2);return-1===t?e:e.slice(t+1)}var Kv=function(){function e(t,n){A(this,e),this._service=t,this._location=n instanceof Ov?n:Ov.makeFromUrl(n,t.host)}return L(e,[{key:"toString",value:function(){return"gs://"+this._location.bucket+"/"+this._location.path}},{key:"_newRef",value:function(t,n){return new e(t,n)}},{key:"root",get:function(){var e=new Ov(this._location.bucket,"");return this._newRef(this._service,e)}},{key:"bucket",get:function(){return this._location.bucket}},{key:"fullPath",get:function(){return this._location.path}},{key:"name",get:function(){return Wv(this._location.path)}},{key:"storage",get:function(){return this._service}},{key:"parent",get:function(){var t=function(e){if(0===e.length)return null;var t=e.lastIndexOf("/");return-1===t?"":e.slice(0,t)}(this._location.path);if(null===t)return null;var n=new Ov(this._location.bucket,t);return new e(this._service,n)}},{key:"_throwIfRoot",value:function(e){if(""===this._location.path)throw function(e){return new _v("invalid-root-operation","The operation '"+e+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}(e)}}]),e}();function Qv(e,t){var n=null===t||void 0===t?void 0:t[Sv];return null==n?null:Ov.makeFromBucketSpec(n,e)}function Gv(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};e.host="".concat(t,":").concat(n),e._protocol="http";var i=r.mockUserToken;
2i&&(e._overrideAuthToken="string"===typeof i?i:W(i,e.app.options.projectId))}var $v=function(){function e(t,n,r,i,a){A(this,e),this.app=t,this._authProvider=n,this._appCheckProvider=r,this._url=i,this._firebaseVersion=a,this._bucket=null,this._host=xv,this._protocol="https",this._appId=null,this._deleted=!1,this._maxOperationRetryTime=12e4,this._maxUploadRetryTime=6e5,this._requests=new Set,this._bucket=null!=i?Ov.makeFromBucketSpec(i,this._host):Qv(this._host,this.app.options)}return L(e,[{key:"host",get:function(){return this._host},set:function(e){this._host=e,null!=this._url?this._bucket=Ov.makeFromBucketSpec(this._url,e):this._bucket=Qv(e,this.app.options)}},{key:"maxUploadRetryTime",get:function(){return this._maxUploadRetryTime},set:function(e){Pv("time",0,Number.POSITIVE_INFINITY,e),this._maxUploadRetryTime=e}},{key:"maxOperationRetryTime",get:function(){return this._maxOperationRetryTime},set:function(e){Pv("time",0,Number.POSITIVE_INFINITY,e),this._maxOperationRetryTime=e}},{key:"_getAuthToken",value:function(){var e=f(l().mark((function e(){var t,n;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._overrideAuthToken){e.next=2;break}return e.abrupt("return",this._overrideAuthToken);case 2:if(!(t=this._authProvider.getImmediate({optional:!0}))){e.next=9;break}return e.next=6,t.getToken();case 6:if(null===(n=e.sent)){e.next=9;break}return e.abrupt("return",n.accessToken);case 9:return e.abrupt("return",null);case 10:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_getAppCheckToken",value:function(){var e=f(l().mark((function e(){var t,n;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=this._appCheckProvider.getImmediate({optional:!0}))){e.next=6;break}return e.next=4,t.getToken();case 4:return n=e.sent,e.abrupt("return",n.token);case 6:return e.abrupt("return",null);case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_delete",value:function(){return this._deleted||(this._deleted=!0,this._requests.forEach((function(e){return e.cancel()})),this._requests.clear()),Promise.resolve()}},{key:"_makeStorageReference",value:function(e){return new Kv(this,e)}},{key:"_makeRequest",value:function(e,t,n,r){var i=this,a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(this._deleted)return new Rv(Dv());var o=Hv(e,this._appId,n,r,t,this._firebaseVersion,a);return this._requests.add(o),o.getPromise().then((function(){return i._requests.delete(o)}),(function(){return i._requests.delete(o)})),o}},{key:"makeRequestWithTokens",value:function(){var e=f(l().mark((function e(t,n){var r,i,a,o;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([this._getAuthToken(),this._getAppCheckToken()]);case 2:return r=e.sent,i=y(r,2),a=i[0],o=i[1],e.abrupt("return",this._makeRequest(t,n,a,o).getPromise());case 7:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()}]),e}(),Yv="@firebase/storage",Xv="0.10.0",Jv="storage";function Zv(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Gv(e,t,n,r)}function ey(e,t){var n=t.instanceIdentifier,r=e.getProvider("app").getImmediate(),i=e.getProvider("auth-internal"),a=e.getProvider("app-check-internal");return new $v(r,i,a,n,We)}Ve(new te(Jv,ey,"PUBLIC").setMultipleInstances(!0)),Ge(Yv,Xv,""),Ge(Yv,Xv,"esm2017");var ty=Ke({apiKey:"AIzaSyCNhrCwscMnNeLSPcHYEDzZRKQAfiS1EkY",authDomain:"profithunt-co.firebaseapp.com",projectId:"profithunt-co",storageBucket:"profithunt-co.appspot.com",messagingSenderId:"1013005337639",appId:"1:1013005337639:web:0a91aa1b4642ef7e577a02",measurementId:"G-WY3JWW565M"}),ny=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Qe(),t=Be(e=ee(e),_p);return t.isInitialized()?t.getImmediate():bv(e)}(ty),ry=function(e,t){var n="string"==typeof e?e:t||"(default)",r=Be("object"==typeof e?e:Qe(),"firestore").getImmediate({identifier:n});if(!r._initialized){var i=z("firestore");i&&Mf.apply(void 0,[r].concat(N(i)))}return r}(ty),iy=(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Qe(),t=arguments.length>1?arguments[1]:void 0,n=Be(e=ee(e),Jv),r=n.getImmediate({identifier:t}),i=z("storage");i&&Zv.apply(void 0,[r].concat(N(i)))}(ty),function(e,t){if(e<=0)return 1;if(t<=0)return 1;var n=Math.floor(e/t);return e%t>0&&(n+=1),n}),ay=function(e){return e>=1e6?"".concat(e%1e6===0?e/1e6:(1*e/1e6).toFixed(1),"m"):e>=1e3?"".concat(e%1e3===0?e/1e3:(1*e/1e3).toFixed(1),"k"):e},oy=36e5,uy=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date;if(t-e<oy)return"Just now";if(t-e<864e5){var n=Math.floor((t-e)/oy);return 1===n?"1 hour ago":"".concat(n," hours ago")}return t-e<1728e5?"Yesterday":e.toLocaleDateString()};var sy="functions";var ly=function(){function e(t,n,r){var i=this;A(this,e),this.auth=null,this.messaging=null,this.appCheck=null,this.auth=t.getImmediate({optional:!0}),this.messaging=n.getImmediate({optional:!0}),this.auth||t.get().then((function(e){return i.auth=e}),(function(){})),this.messaging||n.get().then((function(e){return i.messaging=e}),(function(){})),this.appCheck||r.get().then((function(e){return i.appCheck=e}),(function(){}))}return L(e,[{key:"getAuthToken",value:function(){var e=f(l().mark((function e(){var t;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.auth){e.next=2;break}return e.abrupt("return",void 0);case 2:return e.prev=2,e.next=5,this.auth.getToken();case 5:return t=e.sent,e.abrupt("return",null===t||void 0===t?void 0:t.accessToken);case 9:return e.prev=9,e.t0=e.catch(2),e.abrupt("return",void 0);case 12:case"end":return e.stop()}}),e,this,[[2,9]])}
2)));return function(){return e.apply(this,arguments)}}()},{key:"getMessagingToken",value:function(){var e=f(l().mark((function e(){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.messaging&&"Notification"in self&&"granted"===Notification.permission){e.next=2;break}return e.abrupt("return",void 0);case 2:return e.prev=2,e.next=5,this.messaging.getToken();case 5:return e.abrupt("return",e.sent);case 8:return e.prev=8,e.t0=e.catch(2),e.abrupt("return",void 0);case 11:case"end":return e.stop()}}),e,this,[[2,8]])})));return function(){return e.apply(this,arguments)}}()},{key:"getAppCheckToken",value:function(){var e=f(l().mark((function e(){var t;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.appCheck){e.next=7;break}return e.next=3,this.appCheck.getToken();case 3:if(!(t=e.sent).error){e.next=6;break}return e.abrupt("return",null);case 6:return e.abrupt("return",t.token);case 7:return e.abrupt("return",null);case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getContext",value:function(){var e=f(l().mark((function e(){var t,n,r;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getAuthToken();case 2:return t=e.sent,e.next=5,this.getMessagingToken();case 5:return n=e.sent,e.next=8,this.getAppCheckToken();case 8:return r=e.sent,e.abrupt("return",{authToken:t,messagingToken:n,appCheckToken:r});case 10:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}(),cy="us-central1";var fy=function(){function e(t,n,r,i){var a=this,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:cy,u=arguments.length>5?arguments[5]:void 0;A(this,e),this.app=t,this.fetchImpl=u,this.emulatorOrigin=null,this.contextProvider=new ly(n,r,i),this.cancelAllRequests=new Promise((function(e){a.deleteService=function(){return Promise.resolve(e())}}));try{var s=new URL(o);this.customDomain=s.origin,this.region=cy}catch(l){this.customDomain=null,this.region=o}}return L(e,[{key:"_delete",value:function(){return this.deleteService()}},{key:"_url",value:function(e){var t=this.app.options.projectId;if(null!==this.emulatorOrigin){var n=this.emulatorOrigin;return"".concat(n,"/").concat(t,"/").concat(this.region,"/").concat(e)}return null!==this.customDomain?"".concat(this.customDomain,"/").concat(e):"https://".concat(this.region,"-").concat(t,".cloudfunctions.net/").concat(e)}}]),e}();var hy="@firebase/functions",dy="0.9.0";!function(e,t){Ve(new te(sy,(function(t,n){var r=n.instanceIdentifier,i=t.getProvider("app").getImmediate(),a=t.getProvider("auth-internal"),o=t.getProvider("messaging-internal"),u=t.getProvider("app-check-internal");return new fy(i,a,o,u,r,e)}),"PUBLIC").setMultipleInstances(!0)),Ge(hy,dy,t),Ge(hy,dy,"esm2017")}(fetch.bind(self));var py=n(184);var vy=function(e){var t=e.name,n=e.link,r=e.description,i=e.sourceName,a=e.sourceLink,o=e.businessModel,u=e.createdAt,s=e.categoryIds,l=e.categoryIdToName,c=e.setCurrentCategoryId,f=e.mrr,h=e.oneOffRevenue,d=e.revenueText;return(0,py.jsx)("div",{className:"row border-bottom py-3",children:(0,py.jsxs)("div",{className:"col",children:[(0,py.jsxs)("div",{className:"row project_name",children:[(0,py.jsx)("div",{className:"col-6",children:(0,py.jsx)("a",{href:n,target:"_blank",children:t})}),(0,py.jsx)("div",{className:"col-6",children:(0,py.jsx)("p",{className:"text-secondary text-end",children:(0,py.jsx)("small",{children:uy(u.toDate())})})})]}),(0,py.jsx)("div",{className:"row mt-0 mb-2",children:(0,py.jsx)("div",{className:"col",children:r})}),(0,py.jsxs)("div",{className:"row pl-0 order-4",children:[(0,py.jsx)("div",{className:"col-5 col-md-3",children:(0,py.jsx)("span",{className:"text-secondary",children:"Revenue: "})}),(0,py.jsx)("div",{className:"col",children:(0,py.jsx)("span",{children:function(){if(d&&d.length>0)return(0,py.jsx)(py.Fragment,{children:(0,py.jsx)("span",{className:"fw-bold",children:d})});if(f&&f>0){var e="$".concat(ay(f),"/month");return(0,py.jsx)(py.Fragment,{children:(0,py.jsx)("span",{className:"fw-bold",children:e})})}if(h&&h>=0){var t="$".concat(ay(h));return(0,py.jsx)(py.Fragment,{children:(0,py.jsxs)("span",{className:"fw-bold",children:[t," in total"]})})}return(0,py.jsx)(py.Fragment,{children:(0,py.jsx)("span",{className:"fw-bold",children:"Revenue not disclosed"})})}()})})]}),(0,py.jsxs)("div",{className:"row pl-0 order-4",children:[(0,py.jsx)("div",{className:"col-5 col-md-3",children:(0,py.jsx)("span",{className:"text-secondary",children:"Business model: "})}),(0,py.jsx)("div",{className:"col",children:(0,py.jsx)("span",{children:o&&o.length>0?o:"Subscription"})})]}),(0,py.jsxs)("div",{className:"row pl-0 order-5",children:[(0,py.jsx)("div",{className:"col-5 col-md-3",children:(0,py.jsx)("span",{className:"text-secondary",children:"Categories: "})}),(0,py.jsx)("div",{className:"col",children:s&&0!==s.length?(0,py.jsx)(py.Fragment,{children:s.map((function(e){return function(e){var t=l.get(e);return(0,py.jsx)("button",{style:{paddingTop:"0",paddingBottom:"0",paddingLeft:"0.25rem",paddingRight:"0.25rem"},className:"btn btn-secondary btn-sm me-2",onClick:function(t){console.log("onClick"),c(e)},children:t},t)}(e)}))}):(0,py.jsx)(py.Fragment,{})})]}),(0,py.jsxs)("div",{className:"row pl-0 order-5",children:[(0,py.jsx)("div",{className:"col-5 col-md-3",children:(0,py.jsx)("span",{className:"text-secondary",children:"Source: "})}),(0,py.jsx)("div",{className:"col",children:(0,py.jsx)("span",{children:a&&a.length>0?(0,py.jsx)("a",{href:a,target:"_blank",children:i}):(0,py.jsx)(py.Fragment,{children:i})})})]})]})})},yy=n(7),my=n.n(yy);function gy(e){return{type:"active",page:e}}function by(e){return{type:"page",page:e}}function ky(e){return{type:"<",page:e}}function wy(e){return{type:">",page:e}}function Ey(e){return{type:"\u2026".concat(e),page:void 0}}function xy(e){return"\u2026L"===e.type||"\u2026R"===e.type}var Sy=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;
2function u(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(u){a=[6,u],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},_y=function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};var Cy=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(u){a=[6,u],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},Ty=function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Iy=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(u){i={error:u}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},Ny=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};function Ay(e,t,n){var r,i,a,o,u;return Cy(this,(function(s){switch(s.label){case 0:s.trys.push([0,5,6,7]),r=Ty(function(e,t,n){var r,i,a;return Cy(this,(function(o){switch(o.label){case 0:r=t-e+1,i=1,o.label=1;case 1:return i<r?(a=function(e,t,n,r){if(n<3)return;var i=n-2;return"L"===r?Ny([e,"\u2026"],Iy(Dy(t-(i-1),t)),!1):Ny(Ny([],Iy(Dy(e,e+(i-1))),!1),["\u2026",t],!1)}(e,t,i,n),a?[4,a]:[3,3]):[3,4];case 2:o.sent(),o.label=3;case 3:return i++,[3,1];case 4:return[4,Dy(e,t)];case 5:return o.sent(),[2]}}))}(e,t,n)),i=r.next(),s.label=1;case 1:return i.done?[3,4]:[4,i.value.map((function(e){return"\u2026"===e?Ey(n):by(e)}))];case 2:s.sent(),s.label=3;case 3:return i=r.next(),[3,1];case 4:return[3,7];case 5:return a=s.sent(),o={error:a},[3,7];case 6:try{i&&!i.done&&(u=r.return)&&u.call(r)}finally{if(o)throw o.error}return[7];case 7:return[2]}}
2))}function Dy(e,t){return t<e?[]:Array.from(Array(t-e+1).keys(),(function(t){return t+e}))}var Ly=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(u){a=[6,u],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},Oy=function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Ry=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(u){i={error:u}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},Py=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};function My(e){var t,n,r,i,a,o,u,s,l=e.current,c=e.total,f=e.narrowStrategies,h=e.renderNav;return Ly(this,(function(e){switch(e.label){case 0:if(c<1)return[2];t=Math.max(1,Math.min(l,c)),n=function(e,t,n){var r,i,a,o,u,s,l,c,f,h,d,p,v,y;return Ly(this,(function(m){switch(m.label){case 0:r=ky(e>1?e-1:void 0),i=wy(e<t?e+1:void 0),a=gy(e),o=Ay(1,e-1,"L"),u=Ay(e+1,t,"R"),s=function(e,t){var n,r,i,a,o,u,s,l,c,f,h,d,p,v,y;return Ly(this,(function(m){switch(m.label){case 0:return n=function(e,t){var n,r;return Sy(this,(function(i){switch(i.label){case 0:return n=e.next(),r=t.next(),n.done&&r.done?[3,2]:[4,[n.value,r.value]];case 1:return i.sent(),[3,0];case 2:return[2]}}
2))}(e,t),(r=n.next()).done?[2]:(i=Ry(r.value,2),a=i[0],o=void 0===a?[]:a,u=i[1],[4,{leftRange:o,rightRange:s=void 0===u?[]:u}]);case 1:m.sent(),m.label=2;case 2:m.trys.push([2,9,10,11]),l=Oy(n),c=l.next(),m.label=3;case 3:return c.done?[3,8]:(f=Ry(c.value,2),h=f[0],(d=f[1])?[4,{leftRange:o,rightRange:s=d}]:[3,5]);case 4:m.sent(),m.label=5;case 5:return h?[4,{leftRange:o=h,rightRange:s}]:[3,7];case 6:m.sent(),m.label=7;case 7:return c=l.next(),[3,3];case 8:return[3,11];case 9:return p=m.sent(),v={error:p},[3,11];case 10:try{c&&!c.done&&(y=l.return)&&y.call(l)}finally{if(v)throw v.error}return[7];case 11:return[2]}}))}(o,u),m.label=1;case 1:m.trys.push([1,8,9,10]),l=Oy(s),c=l.next(),m.label=2;case 2:return c.done?[3,7]:(f=c.value,h=f.leftRange,d=f.rightRange,n?[4,Py(Py(Py(Py([r],Ry(h),!1),[a],!1),Ry(d),!1),[i],!1)]:[3,4]);case 3:return m.sent(),[3,6];case 4:return[4,Py(Py(Py([],Ry(h),!1),[a],!1),Ry(d),!1)];case 5:m.sent(),m.label=6;case 6:return c=l.next(),[3,2];case 7:return[3,10];case 8:return p=m.sent(),v={error:p},[3,10];case 9:try{c&&!c.done&&(y=l.return)&&y.call(l)}finally{if(v)throw v.error}return[7];case 10:return[2]}}
2))}(t,c,h),e.label=1;case 1:e.trys.push([1,9,10,11]),r=Oy(n),i=r.next(),e.label=2;case 2:return i.done?[3,8]:(a=i.value,f.length>0?[5,Oy(Fy(a,f))]:[3,4]);case 3:e.sent(),e.label=4;case 4:return[4,a];case 5:return e.sent(),[5,Oy(n)];case 6:e.sent(),e.label=7;case 7:return i=r.next(),[3,2];case 8:return[3,11];case 9:return o=e.sent(),u={error:o},[3,11];case 10:try{i&&!i.done&&(s=r.return)&&s.call(r)}finally{if(u)throw u.error}return[7];case 11:return[2]}}))}function Fy(e,t){var n,r,i;return Ly(this,(function(a){switch(a.label){case 0:n=e.some(xy),r=t.filter((function(e){return"dropEllipsis"!==e||n})),i=function(){var t,n;return Ly(this,(function(i){switch(i.label){case 0:return t=r.includes("dropEllipsis"),n=r.includes("dropNav"),[4,e.filter((function(e){return(!t||!xy(e))&&(!n||!function(e){return"<"===e.type||">"===e.type}(e))}))];case 1:return i.sent(),r.pop(),[2]}}))},a.label=1;case 1:return r.length>0?[5,i()]:[3,3];case 2:return a.sent(),[3,1];case 3:return[2]}}))}function jy(e){return"number"===typeof e&&Number.isInteger(e)?e:void 0}function Uy(e){var t=getComputedStyle(e);return zy(t.marginLeft)+By(e)+zy(t.marginRight)}function Vy(e){var t=getComputedStyle(e);return zy(t.marginLeft)+zy(t.borderLeftWidth)+zy(t.paddingLeft)+zy(t.paddingRight)+zy(t.borderRightWidth)+zy(t.marginRight)}function By(e){return e.getBoundingClientRect().width}function zy(e){return e?parseInt(e):0}var qy=function(){if("undefined"!==typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];e.call(t,i[1],i[0])}},t}()}(),Hy="undefined"!==typeof window&&"undefined"!==typeof document&&window.document===document,Wy="undefined"!==typeof n.g&&n.g.Math===Math?n.g:"undefined"!==typeof self&&self.Math===Math?self:"undefined"!==typeof window&&window.Math===Math?window:Function("return this")(),Ky="function"===typeof requestAnimationFrame?requestAnimationFrame.bind(Wy):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)};var Qy=["top","right","bottom","left","width","height","size","weight"],Gy="undefined"!==typeof MutationObserver,$y=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,i=0;function a(){n&&(n=!1,e()),r&&u()}function o(){Ky(a)}function u(){var e=Date.now();if(n){if(e-i<2)return;r=!0}else n=!0,r=!1,setTimeout(o,t);i=e}return u}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){Hy&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Gy?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){Hy&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;Qy.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=ne
vendor: 4,726 bytes, line 2
2w e),this.instance_},e.instance_=null,e}(),Yy=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},Xy=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||Wy},Jy=im(0,0,0,0);function Zy(e){return parseFloat(e)||0}function em(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+Zy(e["border-"+n+"-width"])}),0)}function tm(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return Jy;var r=Xy(e).getComputedStyle(e),i=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var i=r[n],a=e["padding-"+i];t[i]=Zy(a)}return t}(r),a=i.left+i.right,o=i.top+i.bottom,u=Zy(r.width),s=Zy(r.height);if("border-box"===r.boxSizing&&(Math.round(u+a)!==t&&(u-=em(r,"left","right")+a),Math.round(s+o)!==n&&(s-=em(r,"top","bottom")+o)),!function(e){return e===Xy(e).document.documentElement}(e)){var l=Math.round(u+a)-t,c=Math.round(s+o)-n;1!==Math.abs(l)&&(u-=l),1!==Math.abs(c)&&(s-=c)}return im(i.left,i.top,u,s)}var nm="undefined"!==typeof SVGGraphicsElement?function(e){return e instanceof Xy(e).SVGGraphicsElement}:function(e){return e instanceof Xy(e).SVGElement&&"function"===typeof e.getBBox};function rm(e){return Hy?nm(e)?function(e){var t=e.getBBox();return im(0,0,t.width,t.height)}(e):tm(e):Jy}function im(e,t,n,r){return{x:e,y:t,width:n,height:r}}var am=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=im(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=rm(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),om=function(e,t){var n=function(e){var t=e.x,n=e.y,r=e.width,i=e.height,a="undefined"!==typeof DOMRectReadOnly?DOMRectReadOnly:Object,o=Object.create(a.prototype);return Yy(o,{x:t,y:n,width:r,height:i,top:n,right:t+r,bottom:i+n,left:t}),o}(t);Yy(this,{target:e,contentRect:n})},um=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new qy,"function"!==typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!==typeof Element&&Element instanceof Object){if(!(e instanceof Xy(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new am(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!==typeof Element&&Element instanceof Object){if(!(e instanceof Xy(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new om(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),sm="undefined"!==typeof WeakMap?new WeakMap:new qy,lm=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=$y.getInstance(),r=new um(t,n,this);sm.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){lm.prototype[e]=function(){var t;return(t=sm.get(this))[e].apply(t,arguments)}}));var cm="undefined"!==typeof Wy.ResizeObserver?Wy.ResizeObserver:lm;function fm(t,n){var r=(0,e.useRef)(n);(0,e.useLayoutEffect)((function(){r.current=n}),[n]),(0,e.useLayoutEffect)((function(){if(t){var e=new cm(function(e){return function(t,n){var r=t.map((function(e){return e.target})),i=r.map((function(e){return e.getBoundingClientRect()}));e();var a=r.map((function(e){return e.getBoundingClientRect()}));r.filter((function(e,t){return n=i[t],r=a[t],!(n.width===r.width&&n.height===r.height);var n,r}
2)).forEach((function(e){return function(e,t){t.unobserve(e),requestAnimationFrame((function(){t.observe(e)}))}(e,n)}))}}((function(){r.current()})));return e.observe(t),function(){e.disconnect()}}}),[t])}var hm=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(u){i={error:u}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o};function dm(t){var n=hm((0,e.useState)(),2),r=n[0],i=n[1];function a(){var e=t?function(e){var t=getComputedStyle(e);return e.getBoundingClientRect().width-zy(t.borderLeftWidth)-zy(t.paddingLeft)-zy(t.paddingRight)-zy(t.borderRightWidth)}(t):void 0;r!==e&&i(e)}return fm(t,a),(0,e.useLayoutEffect)(a),r}function pm(e){var t=e.getPageWidth,n=e.getNavWidth,r=e.ellipsisWidth;return function(e){var i=e.type,a=e.page;return"page"===i||"active"===i?t(a.toString(),"active"===i):"<"===i||">"===i?n(i,void 0!==a):"\u2026L"===i||"\u2026R"===i?r:i}}function vm(e){return function(t,n){var r=e[t];return n?r.enabled:r.disabled}}function ym(e){var t=e.getActivePageWidth,n=e.getNormalPageWidth;return function(e,r){return r?t(e):n(e)}}function mm(e){return function(t){var n=t.length;return e.singleDigit+(e.doubleDigit-e.singleDigit)*(n-1)}}function gm(e){return e?function(e){var t=e.itemWidths,n=e.outerFrameWidth;return function(e){var t=e.getItemWidth,n=e.outerFrameWidth;return function(e){var r=function(e){return e.reduce((function(e,t){return e+t}),0)}(e.map(t));return n+r}}({getItemWidth:pm({getPageWidth:ym({getNormalPageWidth:mm({singleDigit:t.normalPageSingleDigit,doubleDigit:t.normalPageDoubleDigit}),getActivePageWidth:mm({singleDigit:t.activePageSingleDigit,doubleDigit:t.activePageDoubleDigit})}),getNavWidth:vm({"<":{enabled:t.navPreviousEnabled,disabled:t.navPreviousDisabled},">":{enabled:t.navNextEnabled,disabled:t.navNextDisabled}}),ellipsisWidth:t.ellipsis}),outerFrameWidth:n})}(e):{requiredBaseMetrics:bm}}var bm={normalPageSingleDigit:by(8),normalPageDoubleDigit:by(88),activePageSingleDigit:gy(8),activePageDoubleDigit:gy(88),navPreviousEnabled:ky(0),navPreviousDisabled:ky(void 0),navNextEnabled:wy(0),navNextDisabled:wy(void 0),ellipsis:Ey("L")},km=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(u){i={error:u}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o};function wm(e,t){return function(e,t){var n={};return e.forEach((function(e,r){n[e]=t[r]})),n}(e,t.map(Uy))}var Em=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(u){i={error:u}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o};function xm(){var t=Em((0,e.useState)(null),2),n=t[0],r=t[1],i=(0,e.useCallback)((function(){return r(null)}),[]),a=(0,e.useMemo)((function(){return gm(n)}),[n]);if("requiredBaseMetrics"in a){var o=Em(function(e){var t=Object.entries(e),n=t.map((function(e){var t=km(e,2),n=t[0];return t[1],n})),r=t.map((function(e){var t=km(e,2);return t[0],t[1]}));return[n,r]}(a.requiredBaseMetrics),2),u=o[0];return{renderNeeded:{items:o[1],ref:function(e){e&&r(function(e,t){var n=Array.from(e.children);return{outerFrameWidth:Vy(e),itemWidths:wm(t,n)}}(e,u))}},clearCache:i}}return{calculator:a,clearCache:i}}function Sm(t,n){(0,e.useLayoutEffect)((function(){var e=t();if(e)return function(e,t){var n=function(e){var t=e.map(By);return function(n){var r=e.indexOf(n);return t[r]}}(e),r=function(e){return t=n(e),r=By(e),Math.abs(t-r)>.5;var t,r};return function(e,t){var n=new cm((function(e){var n=e.map(_m);t(n)}));return e.forEach((function(e){return n.observe(e)})),function(){return n.disconnect()}}(e,(function(e){e.some(r)&&t()}))}(e,n)}))}function _m(e){return e.target}function Cm(t,n){var r=xm(),i=(0,e.useRef)(null),a=r.clearCache;return Sm((function(){return(e=i.current)&&Array.from(e.children);var e}),a),"renderNeeded"in r?{items:r.renderNeeded.items,ref:function(e){r.renderNeeded.ref(e),i.current=e},clearCache:a}:{items:Tm(t,r.calculator,n),ref:i,clearCache:a}}function Tm(e,t,n){var r,i,a=e(),o=null!==(r=function(e){var t=e.next();return t.done?void 0:t.value}(a))&&void 0!==r?r:[];return null!==(i=function(e,t){var n,r,i;try{for(var a=_y(e),o=a.next();!o.done;o=a.next()){var u=o.value;if(!t(u))break;i=u}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i}(a,(function(e){return t(e)<n})))&&void 0!==i?i:o}var Im=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(u){i={error:u}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o};function Nm(t,n){var r,i=Im((0,e.useState)(null),2),a=i[0],o=i[1],u=function(e){var t;return dm(null!==(t=null===e||void 0===e?void 0:e.parentElement)&&void 0!==t?t:void 0)}(void 0===n?a:null),s=Cm(t,null!==(r=null!==n&&void 0!==n?n:u)&&void 0!==r?r:0),l=s.items,c=s.ref,f=s.clearCache;return{items:l,ref:(0,e.useCallback)((function(e){!function(e,t){"function"===typeof e?e(t):e&&(e.current=t)}(c,e),o(e)}),[c]),clearCache:f}}var Am={ariaCurrentAttr:!0,a11yActiveLabel:"",srOnlyClassName:""},Dm=(0,e.memo)(Lm);function Lm(t){var n=t.current,r=t.total,i=t.onPageChange,a=t.maxWidth,o=t.narrowStrategy,u=t.className,s=t.extraClassName,l=void 0===s?"justify-content-center":s,c=t.pageItemClassName,f=void 0===c?"page-item":c,h=t.pageLinkClassName,d=void 0===h?"page-link":h,p=t.activeItem
2ClassName,v=void 0===p?"active":p,y=t.disabledItemClassName,m=void 0===y?"disabled":y,g=t.srOnlyClassName,b=void 0===g?"sr-only":g,k=t.previousLabel,w=t.nextLabel,E=t.ariaPreviousLabel,x=t.ariaNextLabel,S=t.renderNav,_=void 0===S||S,C=t.a11yActiveLabel,T=t.ariaCurrentAttr,I=t.linkHref,N=void 0===I?"hash":I,A=function(t,n,r,i){var a=Nm((function(){var e,r,a,o,u;return My({current:null!==(e=jy(t))&&void 0!==e?e:0,total:null!==(r=jy(n))&&void 0!==r?r:0,narrowStrategies:(u=null===i||void 0===i?void 0:i.narrowStrategy,(Array.isArray(u)?u:[u]).filter((function(e){return"dropEllipsis"===e||"dropNav"===e}))),renderNav:null===(o=null===i||void 0===i?void 0:i.renderNav,a="boolean"===typeof o?o:void 0)||void 0===a||a})}),r),o=a.items,u=a.ref,s=a.clearCache;(0,e.useEffect)((function(){return function(){return s()}}),[s,null===i||void 0===i?void 0:i.previousLabel,null===i||void 0===i?void 0:i.nextLabel]);var l=function(e,t){var n,r=null!==(n=null===t||void 0===t?void 0:t.a11yActiveLabel)&&void 0!==n?n:"(current)",i=(null===t||void 0===t?void 0:t.previousLabel)||"\xab",a=(null===t||void 0===t?void 0:t.ariaPreviousLabel)||"Previous",o=(null===t||void 0===t?void 0:t.nextLabel)||"\xbb",u=(null===t||void 0===t?void 0:t.ariaNextLabel)||"Next";return e.map((function(e){var t=e.type,n=e.page;switch(t){case"<":return{type:"previous",key:"previous".concat(void 0===n?"_disabled":""),label:i,a11yLabel:i===a?void 0:{label:a,mode:"replace"},gotoPage:n};case">":return{type:"next",key:"next".concat(void 0===n?"_disabled":""),label:o,a11yLabel:o===u?void 0:{label:u,mode:"replace"},gotoPage:n};case"\u2026L":case"\u2026R":return{type:"ellipsis",key:"ellipsis_".concat("\u2026L"===t?"l":"r"),label:"\u2026",a11yHidden:!0,gotoPage:void 0};default:return{type:"page",key:"".concat(t,"_").concat(n),label:n.toString(),a11yLabel:"active"===t&&r?{label:r,mode:"additional"}:void 0,gotoPage:n,active:"active"===t}}}))}(o,i);return{items:l,ref:u,clearCache:s}}(n,r,a,{narrowStrategy:o,previousLabel:k,nextLabel:w,ariaPreviousLabel:E,ariaNextLabel:x,renderNav:_,a11yActiveLabel:C}),D=A.items,L=A.ref,O=A.clearCache;if((0,e.useEffect)((function(){return function(){return O()}}),[O,u,f,d,v,m,b]),0===D.length)return null;function R(t,n){return e.createElement(e.Fragment,null,n&&"additional"!==n.mode?e.createElement("span",{"aria-hidden":"true"},t):t,n&&b&&e.createElement("span",{className:b},"".concat("additional"===n.mode?" ":"").concat(n.label)))}return e.createElement("ul",{className:void 0!==u?u:l?"pagination ".concat(l):"pagination",ref:L},D.map((function(t){var n,r,a;return void 0!==t.gotoPage?e.createElement("li",{key:t.key,className:"".concat(f).concat(t.active&&v?" "+v:""),"aria-current":t.active&&T?"page":void 0},e.createElement("a",{className:d,href:"hash"===N?"#":void 0,onClick:(a=function(){return i(t.gotoPage)},function(e){e.preventDefault(),a()}),"aria-label":"replace"===(null===(n=t.a11yLabel)||void 0===n?void 0:n.mode)?t.a11yLabel.label:void 0},R(t.label,t.a11yLabel))):e.createElement("li",{key:t.key,className:"".concat(f," ").concat(m),"aria-hidden":t.a11yHidden},e.createElement("span",{className:d,"aria-label":"replace"===(null===(r=t.a11yLabel)||void 0===r?void 0:r.mode)?t.a11yLabel.label:void 0},R(t.label,t.a11yLabel)))})))}Lm.propTypes={current:my().number.isRequired,total:my().number.isRequired,onPageChange:my().func.isRequired,maxWidth:my().number,narrowStrategy:my().oneOfType([my().oneOf(["dropEllipsis","dropNav"]),my().arrayOf(my().oneOf(["dropEllipsis","dropNav"]).isRequired)]),className:my().string,extraClassName:my().string,pageItemClassName:my().string,pageLinkClassName:my().string,activeItem
2ClassName:my().string,disabledItemClassName:my().string,disabledLinkClassName:my().string,srOnlyClassName:my().string,previousLabel:my().string,nextLabel:my().string,ariaPreviousLabel:my().string,ariaNextLabel:my().string,renderNav:my().bool,a11yActiveLabel:my().string,ariaCurrentAttr:my().bool,linkHref:my().oneOf(["hash","omit"])};var Om=function(){return(0,py.jsxs)("div",{className:"px-4 py-0 my-5 text-center",children:[(0,py.jsx)("h2",{className:"fw-bold",children:"Discover ideas that make money \ud83d\udcbb"}),(0,py.jsx)("div",{className:"col-lg-6 mx-auto",children:(0,py.jsx)("p",{className:"lead mb-4",children:"Profit Hunt is a curated list of online projects that generate revenue"})})]})};var Rm=function(e){var t=e.currentSortBy,n=e.setCurrentSortBy,r=e.currentCategoryId,i=e.setCurrentCategoryId,a=e.categoryIdToName;return(0,py.jsxs)("div",{className:"row",children:[(0,py.jsx)("div",{className:"col-9 offset-0 col-md-5 offset-md-2 mb-1",children:(0,py.jsxs)("div",{className:"input-group input-group-sm",children:[(0,py.jsx)("label",{className:"input-group-text",htmlFor:"categorySelect",children:"Category"}),(0,py.jsx)("select",{className:"form-select",id:"categorySelect",value:r,onChange:function(e){var t=parseInt(e.target.value),n=a.get(t);kv(ny,"select_category",{value:n}),i(parseInt(e.target.value))},children:function(){var e=function(e,t,n){return(0,py.jsx)("option",{value:e,children:t},e)},t=[];t.push(e(0,"All"));var n,r=x(a.keys());try{for(r.s();!(n=r.n()).done;){var i=n.value,o=e(i,a.get(i));t.push(o)}}catch(u){r.e(u)}finally{r.f()}return t}()})]})}),(0,py.jsx)("div",{className:"col-9 col-md-5 mb-1",children:(0,py.jsxs)("div",{className:"input-group input-group-sm",children:[(0,py.jsx)("label",{className:"input-group-text",htmlFor:"sortBySelect",children:"Sort by"}),(0,py.jsx)("select",{className:"form-select",id:"sortBySelect",value:t,onChange:function(e){kv(ny,"select_sortby",{value:e.target.value}),n(e.target.value)},children:function(){var e=function(e,t,n){return(0,py.jsx)("option",{value:e,children:t},e)};return[e("createdAt","Newest"),e("mrr","Monthly revenue")]}()})]})})]})};var Pm,Mm=function(){var t=y((0,e.useState)(0),2),n=t[0],r=t[1],i=y((0,e.useState)(0),2),a=i[0],o=i[1],u=y((0,e.useState)([]),2),c=u[0],h=u[1],d=y((0,e.useState)([]),2),p=d[0],v=d[1],m=y((0,e.useState)(new Map),2),g=m[0],b=m[1],k=y((0,e.useState)(-1),2),w=k[0],E=k[1],x=y((0,e.useState)("createdAt"),2),S=x[0],_=x[1],C=function(){var e=f(l().mark((function e(){var t,n,r;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Th(Vf(ry,"categories"),Lh("id")),e.next=3,Kh(t);
2case 3:n=e.sent,r=new Map,n.forEach((function(e){r.set(e.data().id,e.data().name)})),b(r);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),T=function(){var e=f(l().mark((function e(t,n){var r,i,a,u;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=parseInt(n),r=Vf(ry,"projects"),i=Th(r,Lh(t,"desc"),Rh(4e3)),n&&n>0&&(i=Th(r,Nh("categories","array-contains",n),Lh(t,"desc"),Rh(4e3))),e.next=6,Kh(i);case 6:a=e.sent,u=[],a.forEach((function(e){!0!==e.data().pending&&u.push(e)})),h(u),o(iy(u.length,25));case 11:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return(0,e.useEffect)((function(){var e=function(){var e=f(l().mark((function e(){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C();case 2:T(S,w);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}),[]),(0,e.useEffect)((function(){var e=function(){var e=f(l().mark((function e(){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:T(S,w);case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}),[S,w]),(0,e.useEffect)((function(){var e=25*n,t=Math.min(e+25,c.length);v(c.slice(e,t))}),[c,n]),(0,py.jsxs)("div",{children:[(0,py.jsx)(Om,{}),(0,py.jsx)("div",{className:"row",children:(0,py.jsx)("div",{className:"col-12 col-lg-10 offset-lg-1 col-xl-8 offset-xl-2",children:(0,py.jsx)(Rm,{currentSortBy:S,setCurrentSortBy:_,currentCategoryId:w,categoryIdToName:g,setCurrentCategoryId:E})})}),(0,py.jsx)("div",{className:"row",children:(0,py.jsxs)("div",{className:"col-12 col-lg-10 offset-lg-1 col-xl-8 offset-xl-2",children:[p.map((function(e){return(0,py.jsx)(vy,{name:e.data().name,link:e.data().link,description:e.data().description,sourceName:e.data().sourceName,sourceLink:e.data().sourceLink,mrr:e.data().mrr,oneOffRevenue:e.data().oneOffRevenue,revenueText:e.data().revenueText,businessModel:e.data().businessModel,createdAt:e.data().createdAt,categoryIds:e.data().categories,setCurrentCategoryId:E,categoryIdToName:g},e.data().rankId)})),(0,py.jsx)("div",{className:"mt-4",children:(0,py.jsx)(Dm,s(s({},Am),{},{maxWidth:90,current:n+1,total:a,onPageChange:function(e){return kv(ny,"select_page",{value:t=e-1}),void r(t);var t}}))})]})})]})};function Fm(){return Fm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fm.apply(this,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(Pm||(Pm={}));var jm,Um="popstate";function Vm(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}function Bm(e){return{usr:e.state,key:e.key}}function zm(e,t,n,r){return void 0===n&&(n=null),Fm({pathname:"string"===typeof e?e:e.pathname,search:"",hash:""},"string"===typeof t?Hm(t):t,{state:n,key:t&&t.key||r||Math.random().toString(36).substr(2,8)})}function qm(e){var t=e.pathname,n=void 0===t?"/":t,r=e.search,i=void 0===r?"":r,a=e.hash,o=void 0===a?"":a;return i&&"?"!==i&&(n+="?"===i.charAt(0)?i:"?"+i),o&&"#"!==o&&(n+="#"===o.charAt(0)?o:"#"+o),n}function Hm(e){var t={};if(e){var n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Wm(e){var t="undefined"!==typeof window&&"undefined"!==typeof window.location&&"null"!==window.location.origin?window.location.origin:window.location.href,n="string"===typeof e?e:qm(e);return Vm(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}function Km(e,t,n,r){void 0===r&&(r={});var i=r,a=i.window,o=void 0===a?document.defaultView:a,u=i.v5Compat,s=void 0!==u&&u,l=o.history,c=Pm.Pop,f=null;function h(){c=Pm.Pop,f&&f({action:c,location:d.location})}var d={get action(){return c},get location(){return e(o,l)},listen:function(e){if(f)throw new Error("A history only accepts one active listener");return o.addEventListener(Um,h),f=e,function(){o.removeEventListener(Um,h),f=null}},createHref:function(e){return t(o,e)},encodeLocation:function(e){var t=Wm("string"===typeof e?e:qm(e));return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){c=Pm.Push;var r=zm(d.location,e,t);n&&n(r,e);var i=Bm(r),a=d.createHref(r);try{l.pushState(i,"",a)}catch(u){o.location.assign(a)}s&&f&&f({action:c,location:d.location})},replace:function(e,t){c=Pm.Replace;var r=zm(d.location,e,t);n&&n(r,e);var i=Bm(r),a=d.createHref(r);l.replaceState(i,"",a),s&&f&&f({action:c,location:d.location})},go:function(e){return l.go(e)}};return d}function Qm(e,t,n){void 0===n&&(n="/");
2var r=ng(("string"===typeof t?Hm(t):t).pathname||"/",n);if(null==r)return null;var i=Gm(e);!function(e){e.sort((function(e,t){return e.score!==t.score?t.score-e.score:function(e,t){var n=e.length===t.length&&e.slice(0,-1).every((function(e,n){return e===t[n]}));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((function(e){return e.childrenIndex})),t.routesMeta.map((function(e){return e.childrenIndex})))}))}(i);for(var a=null,o=0;null==a&&o<i.length;++o)a=Zm(i[o],tg(r));return a}function Gm(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r="");var i=function(e,i,a){var o={relativePath:void 0===a?e.path||"":a,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};o.relativePath.startsWith("/")&&(Vm(o.relativePath.startsWith(r),'Absolute route path "'+o.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),o.relativePath=o.relativePath.slice(r.length));var u=ig([r,o.relativePath]),s=n.concat(o);e.children&&e.children.length>0&&(Vm(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+u+'".'),Gm(e.children,t,s,u)),(null!=e.path||e.index)&&t.push({path:u,score:Jm(u,e.index),routesMeta:s})};return e.forEach((function(e,t){var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?")){var r,a=x($m(e.path));try{for(a.s();!(r=a.n()).done;){var o=r.value;i(e,t,o)}}catch(u){a.e(u)}finally{a.f()}}else i(e,t)})),t}function $m(e){var t=e.split("/");if(0===t.length)return[];var n,r=h(n=t)||I(n)||p(n)||v(),i=r[0],a=r.slice(1),o=i.endsWith("?"),u=i.replace(/\?$/,"");if(0===a.length)return o?[u,""]:[u];var s=$m(a.join("/")),l=[];return l.push.apply(l,N(s.map((function(e){return""===e?u:[u,e].join("/")})))),o&&l.push.apply(l,N(s)),l.map((function(t){return e.startsWith("/")&&""===t?"/":t}))}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(jm||(jm={}));var Ym=/^:\w+$/,Xm=function(e){return"*"===e};function Jm(e,t){var n=e.split("/"),r=n.length;return n.some(Xm)&&(r+=-2),t&&(r+=2),n.filter((function(e){return!Xm(e)})).reduce((function(e,t){return e+(Ym.test(t)?3:""===t?1:10)}),r)}function Zm(e,t){for(var n=e.routesMeta,r={},i="/",a=[],o=0;o<n.length;++o){var u=n[o],s=o===n.length-1,l="/"===i?t:t.slice(i.length)||"/",c=eg({path:u.relativePath,caseSensitive:u.caseSensitive,end:s},l);if(!c)return null;
2Object.assign(r,c.params);var f=u.route;a.push({params:r,pathname:ig([i,c.pathname]),pathnameBase:ag(ig([i,c.pathnameBase])),route:f}),"/"!==c.pathnameBase&&(i=ig([i,c.pathnameBase]))}return a}function eg(e,t){"string"===typeof e&&(e={path:e,caseSensitive:!1,end:!0});var n=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!0);rg("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');var r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(function(e,t){return r.push(t),"/([^\\/]+)"}));e.endsWith("*")?(r.push("*"),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))");var a=new RegExp(i,t?void 0:"i");return[a,r]}(e.path,e.caseSensitive,e.end),r=y(n,2),i=r[0],a=r[1],o=t.match(i);if(!o)return null;var u=o[0],s=u.replace(/(.)\/+$/,"$1"),l=o.slice(1),c=a.reduce((function(e,t,n){if("*"===t){var r=l[n]||"";s=u.slice(0,u.length-r.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(n){return rg(!1,'The value for the URL param "'+t+'" will not be decoded because the string "'+e+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+n+")."),e}}(l[n]||"",t),e}),{});return{params:c,pathname:u,pathnameBase:s,pattern:e}}function tg(e){try{return decodeURI(e)}catch(t){return rg(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function ng(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;var n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function rg(e,t){if(!e){"undefined"!==typeof console&&console.warn(t);try{throw new Error(t)}catch(n){}}}var ig=function(e){return e.join("/").replace(/\/\/+/g,"/")},ag=function(e){return e.replace(/\/+$/,"").replace(/^\/*/,"/")},og=function(e){S(n,e);var t=T(n);function n(){return A(this,n),t.apply(this,arguments)}return L(n)}(O(Error));var ug=L((function e(t,n,r,i){A(this,e),void 0===i&&(i=!1),this.status=t,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}));function sg(e){return e instanceof ug}var lg=["post","put","patch","delete"],cg=(new Set(lg),["get"].concat(lg));new Set(cg),new Set([301,302,303,307,308]),new Set([307,308]),"undefined"!==typeof window&&"undefined"!==typeof window.document&&window.document.createElement;function fg(){return fg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fg.apply(this,arguments)}var hg="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},dg=e.useState,pg=e.useEffect,vg=e.useLayoutEffect,yg=e.useDebugValue;function mg(e){var t=e.getSnapshot,n=e.value;try{var r=t();return!hg(n,r)}catch(i){return!0}}"undefined"===typeof window||"undefined"===typeof window.document||window.document.createElement,t.useSyncExternalStore;var gg=e.createContext(null);var bg=e.createContext(null);var kg=e.createContext(null);var wg=e.createContext(null);var Eg=e.createContext(null);var xg=e.createContext(null);var Sg=e.createContext({outlet:null,matches:[]});var _g=e.createContext(null);function Cg(){return null!=e.useContext(xg)}function Tg(){return Cg()||Vm(!1),e.useContext(xg).location}function Ig(){var t=function(){var t,n=e.useContext(_g),r=Rg(Ag.UseRouteError),i=Pg(Ag.UseRouteError);if(n)return n;return null==(t=r.errors)?void 0:t[i]}(),n=sg(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,i="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:i},o={padding:"2px 4px",backgroundColor:i};return e.createElement(e.Fragment,null,e.createElement("h2",null,"Unhandled Thrown Error!"),e.createElement("h3",{style:{fontStyle:"italic"}},n),r?e.createElement("pre",{style:a},r):null,e.createElement("p",null,"\ud83d\udcbf Hey developer \ud83d\udc4b"),e.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own\xa0",e.createElement("code",{style:o},"errorElement")," props on\xa0",e.createElement("code",{style:o},"<Route>")))}var Ng,Ag,Dg=function(t){S(r,t);var n=T(r);function r(e){var t;return A(this,r),(t=n.call(this,e)).state={location:e.location,error:e.error},t}
2return L(r,[{key:"componentDidCatch",value:function(e,t){console.error("React Router caught the following error during render",e,t)}},{key:"render",value:function(){return this.state.error?e.createElement(Sg.Provider,{value:this.props.routeContext},e.createElement(_g.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{error:e}}},{key:"getDerivedStateFromProps",value:function(e,t){return t.location!==e.location?{error:e.error,location:e.location}:{error:e.error||t.error,location:t.location}}}]),r}(e.Component);function Lg(t){var n=t.routeContext,r=t.match,i=t.children,a=e.useContext(gg);return a&&r.route.errorElement&&(a._deepestRenderedBoundaryId=r.route.id),e.createElement(Sg.Provider,{value:n},i)}function Og(t,n,r){if(void 0===n&&(n=[]),null==t){if(null==r||!r.errors)return null;t=r.matches}var i=t,a=null==r?void 0:r.errors;if(null!=a){var o=i.findIndex((function(e){return e.route.id&&(null==a?void 0:a[e.route.id])}));o>=0||Vm(!1),i=i.slice(0,Math.min(i.length,o+1))}return i.reduceRight((function(t,o,u){var s=o.route.id?null==a?void 0:a[o.route.id]:null,l=r?o.route.errorElement||e.createElement(Ig,null):null,c=n.concat(i.slice(0,u+1)),f=function(){return e.createElement(Lg,{match:o,routeC
2ontext:{outlet:t,matches:c}},s?l:void 0!==o.route.element?o.route.element:t)};return r&&(o.route.errorElement||0===u)?e.createElement(Dg,{location:r.location,component:l,error:s,children:f(),routeContext:{outlet:null,matches:c}}):f()}),null)}function Rg(t){var n=e.useContext(kg);return n||Vm(!1),n}function Pg(t){var n=function(t){var n=e.useContext(Sg);return n||Vm(!1),n}(),r=n.matches[n.matches.length-1];return r.route.id||Vm(!1),r.route.id}!function(e){e.UseRevalidator="useRevalidator"}(Ng||(Ng={})),function(e){e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"}(Ag||(Ag={}));var Mg;function Fg(e){Vm(!1)}function jg(t){var n=t.basename,r=void 0===n?"/":n,i=t.children,a=void 0===i?null:i,o=t.location,u=t.navigationType,s=void 0===u?Pm.Pop:u,l=t.navigator,c=t.static,f=void 0!==c&&c;Cg()&&Vm(!1);var h=r.replace(/^\/*/,"/"),d=e.useMemo((function(){return{basename:h,navigator:l,static:f}}),[h,l,f]);"string"===typeof o&&(o=Hm(o));var p=o,v=p.pathname,y=void 0===v?"/":v,m=p.search,g=void 0===m?"":m,b=p.hash,k=void 0===b?"":b,w=p.state,E=void 0===w?null:w,x=p.key,S=void 0===x?"default":x,_=e.useMemo((function(){var e=ng(y,h);return null==e?null:{pathname:e,search:g,hash:k,state:E,key:S}}),[h,y,g,k,E,S]);return null==_?null:e.createElement(Eg.Provider,{value:d},e.createElement(xg.Provider,{children:a,value:{location:_,navigationType:s}}))}function Ug(t){var n=t.children,r=t.location,i=e.useContext(bg);return function(t,n){Cg()||Vm(!1);var r,i=e.useContext(Eg).navigator,a=e.useContext(kg),o=e.useContext(Sg).matches,u=o[o.length-1],s=u?u.params:{},l=(u&&u.pathname,u?u.pathnameBase:"/"),c=(u&&u.route,Tg());if(n){var f,h="string"===typeof n?Hm(n):n;"/"===l||(null==(f=h.pathname)?void 0:f.startsWith(l))||Vm(!1),r=h}else r=c;var d=r.pathname||"/",p=Qm(t,{pathname:"/"===l?d:d.slice(l.length)||"/"}),v=Og(p&&p.map((function(e){return Object.assign({},e,{params:Object.assign({},s,e.params),pathname:ig([l,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?l:ig([l,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})})),o,a||void 0);return n&&v?e.createElement(xg.Provider,{value:{location:fg({pathname:"/",search:"",hash:"",state:null,key:"default"},r),navigationType:Pm.Pop}},v):v}(i&&!n?i.router.routes:Bg(n),r)}!function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"}(Mg||(Mg={}));var Vg=new Promise((function(){}));e.Component;function Bg(t,n){void 0===n&&(n=[]);var r=[];return e.Children.forEach(t,(function(t,i){if(e.isValidElement(t))if(t.type!==e.Fragment){t.type!==Fg&&Vm(!1),t.props.index&&t.props.children&&Vm(!1);var a=[].concat(N(n),[i]),o={id:t.props.id||a.join("-"),caseSensitive:t.props.caseSensitive,element:t.props.element,index:t.props.index,path:t.props.path,loader:t.props.loader,action:t.props.action,errorElement:t.props.errorElement,hasErrorBoundary:null!=t.props.errorElement,shouldRevalidate:t.props.shouldRevalidate,handle:t.props.handle};t.props.children&&(o.children=Bg(t.props.children,a)),r.push(o)}else r.push.apply(r,Bg(t.props.children,n))})),r}function zg(t){var n,r=t.basename,i=t.children,a=t.window,o=e.useRef();null==o.current&&(o.current=(void 0===(n={window:a,v5Compat:!0})&&(n={}),Km((function(e,t){var n=e.location;return zm("",{pathname:n.pathname,search:n.search,hash:n.hash},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"===typeof t?t:qm(t)}),null,n)));var u=o.current,s=y(e.useState({action:u.action,location:u.location}),2),l=s[0],c=s[1];return e.useLayoutEffect((function(){return u.listen(c)}),[u]),e.createElement(jg,{basename:r,children:i,location:l.location,navigationType:l.action,navigator:u})}var qg,Hg;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(qg||(qg={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(Hg||(Hg={}));function Wg(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Kg=n(694),Qg=n.n(Kg),Gg=["xxl","xl","lg","md","sm","xs"],$g=e.createContext({prefixes:{},breakpoints:Gg,minBreakpoint:"xs"});$g.Consumer,$g.Provider;function Yg(t,n){var r=(0,e.useContext)($g).prefixes;return t||r[n]||n}var Xg=["bsPrefix","fluid","as","className"],Jg=e.forwardRef((function(e,t){var n=e.bsPrefix,r=e.fluid,i=e.as,a=void 0===i?"div":i,o=e.className,u=Wg(e,Xg),l=Yg(n,"container"),c="string"===typeof r?"-".concat(r):"-fluid";return(0,py.jsx)(a,s(s({ref:t},u),{},{className:Qg()(o,r?"".concat(l).concat(c):l)}))}));Jg.displayName="Container",Jg.defaultProps={fluid:!1};var Zg=Jg;r.createRoot(document.getElementById("root")).render((0,py.jsxs)(zg,{children:[(0,py.jsx)("nav",{className:"navbar navbar-expand-sm navbar-dark bg-dark","aria-label":"Third navbar example",children:(0,py.jsxs)("div",{className:"container-fluid",children:[(0,py.jsx)("a",{className:"navbar-brand",href:"/",children:"Profit Hunt"}),(0,py.jsx)("button",{className:"navbar-toggler",type:"button","data-bs-toggle":"collapse","data-bs-target":"#navbarsExample03","aria-controls":"navbarsExample03","aria-expanded":"false","aria-label":"Toggle navigation",children:(0,py.jsx)("span",{className:"navbar-toggler-icon"})}),(0,py.jsx)("div",{className:"collapse navbar-collapse",id:"navbarsExample03",children:(0,py.jsxs)("ul",{className:"navbar-nav ms-auto mb-2 mb-sm-0",children:[(0,py.jsx)("li",{className:"nav-item",children:(0,py.jsx)("a",{className:"nav-link","aria-current":"page",href:"https://mailchi.mp/ecd95572bc83/profit-hunt-newsletter",target:"_blank",children:"Newsletter"})}),(0,py.jsx)("li",{className:"nav-item",children:(0,py.jsx)("a",{className:"nav-link",href:"https://docs.google.com/forms/d/e/1FAIpQLSdcuIN_dg9Xes5f9kCXb-C_Th3DYJGKWafaBgXgZY7tcJxXMw/viewform?usp=sf_link",target:"_blank",children:"Submit a project"})})]})})]})}),(0,py.jsxs)(Zg,{children:[(0,py.jsxs)(Ug,{children:[(0,py.jsx)(Fg,{path:"/",element:(0,py.jsx)(Mm,{})}),(0,py.jsx)(Fg,{path:"/2",element:(0,py.jsx)(Mm,{})})]}),(0,py.jsxs)("footer",{className:"py-3 my-4",children:[(0,py.jsxs)("ul",{className:"nav justify-content-center",children:[(0,py.jsx)("li",{className:"nav-item",children:(0,py.jsx)("a",{className:"nav-link px-2 text-muted",href:"https://docs.google.com/forms/d/e/1FAIpQLSfN8XDXKvHcBEMoiiT6zmuq66j0BOfaDFPD8F9_MuC2t-qQew/viewform?usp=sf_link",target:"_blank",children:"Send us feedback"})}),(0,py.jsx)("li",{className:"nav-item",children:(0,py.jsx)("a",{className:"nav-link px-2 text-muted",href:"https://www.buymeacoffee.com/profithunt",target:"_blank",children:"Buy me a coffee \u2615"})})]}),(0,py.jsx)("p",{className:"text-center text-muted",children:"\xa9 Profit Hunt 2023"})]})]})]}))}()}(); 3//# sourceMappingURL=main.93494299.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.