mirror of
https://github.com/reiyua/RaysBookClub.git
synced 2026-01-20 15:37:47 +00:00
3 lines
No EOL
690 KiB
JavaScript
3 lines
No EOL
690 KiB
JavaScript
/*! For license information please see main.e1e22189.js.LICENSE.txt */
|
|
!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 s in n)r.call(n,s)&&n[s]&&e.push(s)}}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)}()},176:function(e){"use strict";e.exports=function(e,t,n,r,i,a,o,s){if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,a,o,s],l=0;(u=new Error(t.replace(/%s/g,(function(){return c[l++]})))).name="Invariant Violation"}throw u.framesToPop=1,u}}},573:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,a.default)((function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=null;return t.forEach((function(e){if(null==i){var t=e.apply(void 0,n);null!=t&&(i=t)}})),i}))};var r,i=n(54),a=(r=i)&&r.__esModule?r:{default:r};e.exports=t.default},54:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){function t(t,n,r,i,a,o){var s=i||"<<anonymous>>",u=o||r;if(null==n[r])return t?new Error("Required "+a+" `"+u+"` was not specified in `"+s+"`."):null;for(var c=arguments.length,l=Array(c>6?c-6:0),f=6;f<c;f++)l[f-6]=arguments[f];return e.apply(void 0,[n,r,s,a,u].concat(l))}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n},e.exports=t.default},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 s=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 s.name="Invariant Violation",s}}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};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,s={};function u(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(s[e]=t,e=0;e<t.length;e++)o.add(t[e])}var l=!("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 m={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){m[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];m[t]=new v(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){m[e]=new v(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){m[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){m[e]=new v(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){m[e]=new v(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){m[e]=new v(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){m[e]=new v(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){m[e]=new v(e,5,!1,e.toLowerCase(),null,!1,!1)}));var g=/[\-:]([a-z])/g;function y(e){return e[1].toUpperCase()}function k(e,t,n,r){var i=m.hasOwnProperty(t)?m[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!f.call(p,e)||!f.call(d,e)&&(h.test(e)?p[e]=!0:(d[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(g,y);m[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(g,y);m[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(g,y);m[t]=new v(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){m[e]=new v(e,1,!1,e.toLowerCase(),null,!1,!1)})),m.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){m[e]=new v(e,1,!1,e.toLowerCase(),null,!0,!0)}));var b=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for("react.element"),x=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),S=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"),O=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),P=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var A=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var D=Symbol.iterator;function L(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=D&&e[D]||e["@@iterator"])?e:null}var M,j=Object.assign;function F(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(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&"string"===typeof c.stack){for(var i=c.stack.split("\n"),a=r.stack.split("\n"),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(1!==o||1!==s)do{if(o--,0>--s||i[o]!==a[s]){var u="\n"+i[o].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}}while(1<=o&&0<=s);break}}}finally{U=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?F(e):""}function z(e){switch(e.tag){case 5:return F(e.type);case 16:return F("Lazy");case 13:return F("Suspense");case 19:return F("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 B(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case E:return"Fragment";case x:return"Portal";case S:return"Profiler";case _:return"StrictMode";case N:return"Suspense";case O: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 R:return null!==(t=e.displayName||null)?t:B(e.type)||"Memo";case P:t=e._payload,e=e._init;try{return B(e(t))}catch(n){}}return null}function H(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return B(t);case 8:return t===_?"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 K(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function q(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function W(e){e._valueTracker||(e._valueTracker=function(e){var t=q(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function G(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=q(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Q(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 j({},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=K(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)&&k(e,"checked",t,!1)}function J(e,t){X(e,t);var n=K(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,K(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&&Q(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=""+K(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 j({},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:K(n)}}function ae(e,t){var n=K(t.value),r=K(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 se(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 ue(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?se(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ce,le,fe=(le=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ce=ce||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ce.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 le(e,t)}))}:le);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 me(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 ge=j({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 ye(e,t){if(t){if(ge[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(a(62))}}function ke(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var be=null;function we(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var xe=null,Ee=null,_e=null;function Se(e){if(e=ki(e)){if("function"!==typeof xe)throw Error(a(280));var t=e.stateNode;t&&(t=wi(t),xe(e.stateNode,e.type,t))}}function Ce(e){Ee?_e?_e.push(e):_e=[e]:Ee=e}function Te(){if(Ee){var e=Ee,t=_e;if(_e=Ee=null,Se(e),t)for(e=0;e<t.length;e++)Se(t[e])}}function Ie(e,t){return e(t)}function Ne(){}var Oe=!1;function Re(e,t,n){if(Oe)return e(t,n);Oe=!0;try{return Ie(e,t,n)}finally{Oe=!1,(null!==Ee||null!==_e)&&(Ne(),Te())}}function Pe(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 Ae=!1;if(l)try{var De={};Object.defineProperty(De,"passive",{get:function(){Ae=!0}}),window.addEventListener("test",De,De),window.removeEventListener("test",De,De)}catch(le){Ae=!1}function Le(e,t,n,r,i,a,o,s,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(l){this.onError(l)}}var Me=!1,je=null,Fe=!1,Ue=null,Ve={onError:function(e){Me=!0,je=e}};function ze(e,t,n,r,i,a,o,s,u){Me=!1,je=null,Le.apply(Ve,arguments)}function Be(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function He(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 Ke(e){if(Be(e)!==e)throw Error(a(188))}function qe(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Be(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return Ke(i),e;if(o===r)return Ke(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,u=i.child;u;){if(u===n){s=!0,n=i,r=o;break}if(u===r){s=!0,r=i,n=o;break}u=u.sibling}if(!s){for(u=o.child;u;){if(u===n){s=!0,n=o,r=i;break}if(u===r){s=!0,r=o,n=i;break}u=u.sibling}if(!s)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))?We(e):null}function We(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=We(e);if(null!==t)return t;e=e.sibling}return null}var Ge=i.unstable_scheduleCallback,Qe=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-(st(e)/ut|0)|0},st=Math.log,ut=Math.LN2;var ct=64,lt=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 s=o&~i;0!==s?r=ft(s):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=ct;return 0===(4194240&(ct<<=1))&&(ct=64),e}function mt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function gt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-ot(t)]=n}function yt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ot(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var kt=0;function bt(e){return 1<(e&=-e)?4<e?0!==(268435455&e)?16:536870912:4:1}var wt,xt,Et,_t,St,Ct=!1,Tt=[],It=null,Nt=null,Ot=null,Rt=new Map,Pt=new Map,At=[],Dt="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 Lt(e,t){switch(e){case"focusin":case"focusout":It=null;break;case"dragenter":case"dragleave":Nt=null;break;case"mouseover":case"mouseout":Ot=null;break;case"pointerover":case"pointerout":Rt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pt.delete(t.pointerId)}}function Mt(e,t,n,r,i,a){return null===e||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},null!==t&&(null!==(t=ki(t))&&xt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function jt(e){var t=yi(e.target);if(null!==t){var n=Be(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=He(n)))return e.blockedOn=t,void St(e.priority,(function(){Et(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 Ft(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=$t(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=ki(n))&&xt(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);be=r,n.target.dispatchEvent(r),be=null,t.shift()}return!0}function Ut(e,t,n){Ft(e)&&n.delete(t)}function Vt(){Ct=!1,null!==It&&Ft(It)&&(It=null),null!==Nt&&Ft(Nt)&&(Nt=null),null!==Ot&&Ft(Ot)&&(Ot=null),Rt.forEach(Ut),Pt.forEach(Ut)}function zt(e,t){e.blockedOn===t&&(e.blockedOn=null,Ct||(Ct=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Vt)))}function Bt(e){function t(t){return zt(t,e)}if(0<Tt.length){zt(Tt[0],e);for(var n=1;n<Tt.length;n++){var r=Tt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==It&&zt(It,e),null!==Nt&&zt(Nt,e),null!==Ot&&zt(Ot,e),Rt.forEach(t),Pt.forEach(t),n=0;n<At.length;n++)(r=At[n]).blockedOn===e&&(r.blockedOn=null);for(;0<At.length&&null===(n=At[0]).blockedOn;)jt(n),null===n.blockedOn&&At.shift()}var Ht=b.ReactCurrentBatchConfig,Kt=!0;function qt(e,t,n,r){var i=kt,a=Ht.transition;Ht.transition=null;try{kt=1,Gt(e,t,n,r)}finally{kt=i,Ht.transition=a}}function Wt(e,t,n,r){var i=kt,a=Ht.transition;Ht.transition=null;try{kt=4,Gt(e,t,n,r)}finally{kt=i,Ht.transition=a}}function Gt(e,t,n,r){if(Kt){var i=$t(e,t,n,r);if(null===i)Kr(e,t,r,Qt,n),Lt(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 Ot=Mt(Ot,e,t,n,r,i),!0;case"pointerover":var a=i.pointerId;return Rt.set(a,Mt(Rt.get(a)||null,e,t,n,r,i)),!0;case"gotpointercapture":return a=i.pointerId,Pt.set(a,Mt(Pt.get(a)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(Lt(e,r),4&t&&-1<Dt.indexOf(e)){for(;null!==i;){var a=ki(i);if(null!==a&&wt(a),null===(a=$t(e,t,n,r))&&Kr(e,t,r,Qt,n),a===i)break;i=a}null!==i&&r.stopPropagation()}else Kr(e,t,r,null,n)}}var Qt=null;function $t(e,t,n,r){if(Qt=null,null!==(e=yi(e=we(r))))if(null===(t=Be(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=He(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 Qt=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 j(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,sn,un,cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ln=an(cn),fn=j({},cn,{view:0,detail:0}),hn=an(fn),dn=j({},fn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Sn,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!==un&&(un&&"mousemove"===e.type?(on=e.screenX-un.screenX,sn=e.screenY-un.screenY):sn=on=0,un=e),on)},movementY:function(e){return"movementY"in e?e.movementY:sn}}),pn=an(dn),vn=an(j({},dn,{dataTransfer:0})),mn=an(j({},fn,{relatedTarget:0})),gn=an(j({},cn,{animationName:0,elapsedTime:0,pseudoElement:0})),yn=j({},cn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),kn=an(yn),bn=an(j({},cn,{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"},xn={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"},En={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function _n(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=En[e])&&!!t[e]}function Sn(){return _n}var Cn=j({},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?xn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Sn,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(j({},dn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Nn=an(j({},fn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Sn})),On=an(j({},cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Rn=j({},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}),Pn=an(Rn),An=[9,13,27,32],Dn=l&&"CompositionEvent"in window,Ln=null;l&&"documentMode"in document&&(Ln=document.documentMode);var Mn=l&&"TextEvent"in window&&!Ln,jn=l&&(!Dn||Ln&&8<Ln&&11>=Ln),Fn=String.fromCharCode(32),Un=!1;function Vn(e,t){switch(e){case"keyup":return-1!==An.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Bn=!1;var Hn={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 Kn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Hn[e.type]:"textarea"===t}function qn(e,t,n,r){Ce(r),0<(t=Wr(t,"onChange")).length&&(n=new ln("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Wn=null,Gn=null;function Qn(e){Fr(e,0)}function $n(e){if(G(bi(e)))return e}function Yn(e,t){if("change"===e)return t}var Xn=!1;if(l){var Jn;if(l){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(){Wn&&(Wn.detachEvent("onpropertychange",nr),Gn=Wn=null)}function nr(e){if("value"===e.propertyName&&$n(Gn)){var t=[];qn(t,Gn,e,we(e)),Re(Qn,t)}}function rr(e,t,n){"focusin"===e?(tr(),Gn=n,(Wn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function ir(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return $n(Gn)}function ar(e,t){if("click"===e)return $n(t)}function or(e,t){if("input"===e||"change"===e)return $n(t)}var sr="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t};function ur(e,t){if(sr(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)||!sr(e[i],t[i]))return!1}return!0}function cr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function lr(e,t){var n,r=cr(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=cr(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=Q();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=Q((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=lr(n,a);var o=lr(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=l&&"documentMode"in document&&11>=document.documentMode,mr=null,gr=null,yr=null,kr=!1;function br(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;kr||null==mr||mr!==Q(r)||("selectionStart"in(r=mr)&&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},yr&&ur(yr,r)||(yr=r,0<(r=Wr(gr,"onSelect")).length&&(t=new ln("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=mr)))}function wr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var xr={animationend:wr("Animation","AnimationEnd"),animationiteration:wr("Animation","AnimationIteration"),animationstart:wr("Animation","AnimationStart"),transitionend:wr("Transition","TransitionEnd")},Er={},_r={};function Sr(e){if(Er[e])return Er[e];if(!xr[e])return e;var t,n=xr[e];for(t in n)if(n.hasOwnProperty(t)&&t in _r)return Er[e]=n[t];return e}l&&(_r=document.createElement("div").style,"AnimationEvent"in window||(delete xr.animationend.animation,delete xr.animationiteration.animation,delete xr.animationstart.animation),"TransitionEvent"in window||delete xr.transitionend.transition);var Cr=Sr("animationend"),Tr=Sr("animationiteration"),Ir=Sr("animationstart"),Nr=Sr("transitionend"),Or=new Map,Rr="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 Pr(e,t){Or.set(e,t),u(t,[e])}for(var Ar=0;Ar<Rr.length;Ar++){var Dr=Rr[Ar];Pr(Dr.toLowerCase(),"on"+(Dr[0].toUpperCase()+Dr.slice(1)))}Pr(Cr,"onAnimationEnd"),Pr(Tr,"onAnimationIteration"),Pr(Ir,"onAnimationStart"),Pr("dblclick","onDoubleClick"),Pr("focusin","onFocus"),Pr("focusout","onBlur"),Pr(Nr,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),u("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),u("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),u("onBeforeInput",["compositionend","keypress","textInput","paste"]),u("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Lr="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(Lr));function jr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,o,s,u,c){if(ze.apply(this,arguments),Me){if(!Me)throw Error(a(198));var l=je;Me=!1,je=null,Fe||(Fe=!0,Ue=l)}}(r,t,void 0,e),e.currentTarget=null}function Fr(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 s=r[o],u=s.instance,c=s.currentTarget;if(s=s.listener,u!==a&&i.isPropagationStopped())break e;jr(i,s,c),a=u}else for(o=0;o<r.length;o++){if(u=(s=r[o]).instance,c=s.currentTarget,s=s.listener,u!==a&&i.isPropagationStopped())break e;jr(i,s,c),a=u}}}if(Fe)throw e=Ue,Fe=!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)||(Hr(t,e,2,!1),n.add(r))}function Vr(e,t,n){var r=0;t&&(r|=4),Hr(n,e,r,t)}var zr="_reactListening"+Math.random().toString(36).slice(2);function Br(e){if(!e[zr]){e[zr]=!0,o.forEach((function(t){"selectionchange"!==t&&(Mr.has(t)||Vr(t,!1,e),Vr(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[zr]||(t[zr]=!0,Vr("selectionchange",!1,t))}}function Hr(e,t,n,r){switch(Yt(t)){case 1:var i=qt;break;case 4:i=Wt;break;default:i=Gt}n=i.bind(null,t,n,e),i=void 0,!Ae||"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 Kr(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 s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===o)for(o=r.return;null!==o;){var u=o.tag;if((3===u||4===u)&&((u=o.stateNode.containerInfo)===i||8===u.nodeType&&u.parentNode===i))return;o=o.return}for(;null!==s;){if(null===(o=yi(s)))return;if(5===(u=o.tag)||6===u){r=a=o;continue e}s=s.parentNode}}r=r.return}Re((function(){var r=a,i=we(n),o=[];e:{var s=Or.get(e);if(void 0!==s){var u=ln,c=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":u=Tn;break;case"focusin":c="focus",u=mn;break;case"focusout":c="blur",u=mn;break;case"beforeblur":case"afterblur":u=mn;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":u=pn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":u=vn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":u=Nn;break;case Cr:case Tr:case Ir:u=gn;break;case Nr:u=On;break;case"scroll":u=hn;break;case"wheel":u=Pn;break;case"copy":case"cut":case"paste":u=kn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":u=In}var l=0!==(4&t),f=!l&&"scroll"===e,h=l?null!==s?s+"Capture":null:s;l=[];for(var d,p=r;null!==p;){var v=(d=p).stateNode;if(5===d.tag&&null!==v&&(d=v,null!==h&&(null!=(v=Pe(p,h))&&l.push(qr(p,v,d)))),f)break;p=p.return}0<l.length&&(s=new u(s,c,null,n,i),o.push({event:s,listeners:l}))}}if(0===(7&t)){if(u="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===be||!(c=n.relatedTarget||n.fromElement)||!yi(c)&&!c[pi])&&(u||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,u?(u=r,null!==(c=(c=n.relatedTarget||n.toElement)?yi(c):null)&&(c!==(f=Be(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(u=null,c=r),u!==c)){if(l=pn,v="onMouseLeave",h="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(l=In,v="onPointerLeave",h="onPointerEnter",p="pointer"),f=null==u?s:bi(u),d=null==c?s:bi(c),(s=new l(v,p+"leave",u,n,i)).target=f,s.relatedTarget=d,v=null,yi(i)===r&&((l=new l(h,p+"enter",c,n,i)).target=d,l.relatedTarget=f,v=l),f=v,u&&c)e:{for(h=c,p=0,d=l=u;d;d=Gr(d))p++;for(d=0,v=h;v;v=Gr(v))d++;for(;0<p-d;)l=Gr(l),p--;for(;0<d-p;)h=Gr(h),d--;for(;p--;){if(l===h||null!==h&&l===h.alternate)break e;l=Gr(l),h=Gr(h)}l=null}else l=null;null!==u&&Qr(o,s,u,l,!1),null!==c&&null!==f&&Qr(o,f,c,l,!0)}if("select"===(u=(s=r?bi(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===u&&"file"===s.type)var m=Yn;else if(Kn(s))if(Xn)m=or;else{m=ir;var g=rr}else(u=s.nodeName)&&"input"===u.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(m=ar);switch(m&&(m=m(e,r))?qn(o,m,n,i):(g&&g(e,s,r),"focusout"===e&&(g=s._wrapperState)&&g.controlled&&"number"===s.type&&ee(s,"number",s.value)),g=r?bi(r):window,e){case"focusin":(Kn(g)||"true"===g.contentEditable)&&(mr=g,gr=r,yr=null);break;case"focusout":yr=gr=mr=null;break;case"mousedown":kr=!0;break;case"contextmenu":case"mouseup":case"dragend":kr=!1,br(o,n,i);break;case"selectionchange":if(vr)break;case"keydown":case"keyup":br(o,n,i)}var y;if(Dn)e:{switch(e){case"compositionstart":var k="onCompositionStart";break e;case"compositionend":k="onCompositionEnd";break e;case"compositionupdate":k="onCompositionUpdate";break e}k=void 0}else Bn?Vn(e,n)&&(k="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(k="onCompositionStart");k&&(jn&&"ko"!==n.locale&&(Bn||"onCompositionStart"!==k?"onCompositionEnd"===k&&Bn&&(y=en()):(Jt="value"in(Xt=i)?Xt.value:Xt.textContent,Bn=!0)),0<(g=Wr(r,k)).length&&(k=new bn(k,e,null,n,i),o.push({event:k,listeners:g}),y?k.data=y:null!==(y=zn(n))&&(k.data=y))),(y=Mn?function(e,t){switch(e){case"compositionend":return zn(t);case"keypress":return 32!==t.which?null:(Un=!0,Fn);case"textInput":return(e=t.data)===Fn&&Un?null:e;default:return null}}(e,n):function(e,t){if(Bn)return"compositionend"===e||!Dn&&Vn(e,t)?(e=en(),Zt=Jt=Xt=null,Bn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return jn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Wr(r,"onBeforeInput")).length&&(i=new bn("onBeforeInput","beforeinput",null,n,i),o.push({event:i,listeners:r}),i.data=y))}Fr(o,t)}))}function qr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Wr(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=Pe(e,n))&&r.unshift(qr(e,a,i)),null!=(a=Pe(e,t))&&r.push(qr(e,a,i))),e=e.return}return r}function Gr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Qr(e,t,n,r,i){for(var a=t._reactName,o=[];null!==n&&n!==r;){var s=n,u=s.alternate,c=s.stateNode;if(null!==u&&u===r)break;5===s.tag&&null!==c&&(s=c,i?null!=(u=Pe(n,a))&&o.unshift(qr(n,u,s)):i||null!=(u=Pe(n,a))&&o.push(qr(n,u,s))),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(si)}:ri;function si(e){setTimeout((function(){throw e}))}function ui(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void Bt(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);Bt(t)}function ci(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 li(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,mi="__reactListeners$"+fi,gi="__reactHandles$"+fi;function yi(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=li(e);null!==e;){if(n=e[hi])return n;e=li(e)}return t}n=(e=n).parentNode}return null}function ki(e){return!(e=e[hi]||e[pi])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function bi(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function wi(e){return e[di]||null}var xi=[],Ei=-1;function _i(e){return{current:e}}function Si(e){0>Ei||(e.current=xi[Ei],xi[Ei]=null,Ei--)}function Ci(e,t){Ei++,xi[Ei]=e.current,e.current=t}var Ti={},Ii=_i(Ti),Ni=_i(!1),Oi=Ti;function Ri(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 Pi(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Ai(){Si(Ni),Si(Ii)}function Di(e,t,n){if(Ii.current!==Ti)throw Error(a(168));Ci(Ii,t),Ci(Ni,n)}function Li(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,H(e)||"Unknown",i));return j({},n,r)}function Mi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ti,Oi=Ii.current,Ci(Ii,e),Ci(Ni,Ni.current),!0}function ji(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=Li(e,t,Oi),r.__reactInternalMemoizedMergedChildContext=e,Si(Ni),Si(Ii),Ci(Ii,e)):Si(Ni),Ci(Ni,n)}var Fi=null,Ui=!1,Vi=!1;function zi(e){null===Fi?Fi=[e]:Fi.push(e)}function Bi(){if(!Vi&&null!==Fi){Vi=!0;var e=0,t=kt;try{var n=Fi;for(kt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Fi=null,Ui=!1}catch(i){throw null!==Fi&&(Fi=Fi.slice(e+1)),Ge(Ze,Bi),i}finally{kt=t,Vi=!1}}return null}var Hi=[],Ki=0,qi=null,Wi=0,Gi=[],Qi=0,$i=null,Yi=1,Xi="";function Ji(e,t){Hi[Ki++]=Wi,Hi[Ki++]=qi,qi=e,Wi=t}function Zi(e,t,n){Gi[Qi++]=Yi,Gi[Qi++]=Xi,Gi[Qi++]=$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===qi;)qi=Hi[--Ki],Hi[Ki]=null,Wi=Hi[--Ki],Hi[Ki]=null;for(;e===$i;)$i=Gi[--Qi],Gi[Qi]=null,Xi=Gi[--Qi],Gi[Qi]=null,Yi=Gi[--Qi],Gi[Qi]=null}var na=null,ra=null,ia=!1,aa=null;function oa(e,t){var n=Pc(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 sa(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=ci(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=Pc(18,null,null,0)).stateNode=t,n.return=e,e.child=n,na=e,ra=null,!0);default:return!1}}function ua(e){return 0!==(1&e.mode)&&0===(128&e.flags)}function ca(e){if(ia){var t=ra;if(t){var n=t;if(!sa(e,t)){if(ua(e))throw Error(a(418));t=ci(n.nextSibling);var r=na;t&&sa(e,t)?oa(r,n):(e.flags=-4097&e.flags|2,ia=!1,na=e)}}else{if(ua(e))throw Error(a(418));e.flags=-4097&e.flags|2,ia=!1,na=e}}}function la(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 la(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(ua(e))throw ha(),Error(a(418));for(;t;)oa(e,t),t=ci(t.nextSibling)}if(la(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=ci(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}ra=null}}else ra=na?ci(e.stateNode.nextSibling):null;return!0}function ha(){for(var e=ra;e;)e=ci(e.nextSibling)}function da(){ra=na=null,ia=!1}function pa(e){null===aa?aa=[e]:aa.push(e)}var va=b.ReactCurrentBatchConfig;function ma(e,t){if(e&&e.defaultProps){for(var n in t=j({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var ga=_i(null),ya=null,ka=null,ba=null;function wa(){ba=ka=ya=null}function xa(e){var t=ga.current;Si(ga),e._currentValue=t}function Ea(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 _a(e,t){ya=e,ba=ka=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(bs=!0),e.firstContext=null)}function Sa(e){var t=e._currentValue;if(ba!==e)if(e={context:e,memoizedValue:t,next:null},null===ka){if(null===ya)throw Error(a(308));ka=e,ya.dependencies={lanes:0,firstContext:e}}else ka=ka.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 Oa=!1;function Ra(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Pa(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 Aa(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Da(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!==(2&Nu)){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 La(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,yt(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 ja(e,t,n,r){var i=e.updateQueue;Oa=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var u=s,c=u.next;u.next=null,null===o?a=c:o.next=c,o=u;var l=e.alternate;null!==l&&((s=(l=l.updateQueue).lastBaseUpdate)!==o&&(null===s?l.firstBaseUpdate=c:s.next=c,l.lastBaseUpdate=u))}if(null!==a){var f=i.baseState;for(o=0,l=c=u=null,s=a;;){var h=s.lane,d=s.eventTime;if((r&h)===h){null!==l&&(l=l.next={eventTime:d,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=e,v=s;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=j({},f,h);break e;case 2:Oa=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(h=i.effects)?i.effects=[s]:h.push(s))}else d={eventTime:d,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===l?(c=l=d,u=f):l=l.next=d,o|=h;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(h=s).next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}if(null===l&&(u=f),i.baseState=u,i.firstBaseUpdate=c,i.lastBaseUpdate=l,null!==(t=i.shared.interleaved)){i=t;do{o|=i.lane,i=i.next}while(i!==t)}else null===a&&(i.shared.lanes=0);ju|=o,e.lanes=o,e.memoizedState=f}}function Fa(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:j({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var za={isMounted:function(e){return!!(e=e._reactInternals)&&Be(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=tc(),i=nc(e),a=Aa(r,i);a.payload=t,void 0!==n&&null!==n&&(a.callback=n),null!==(t=Da(e,a,i))&&(rc(t,e,i,r),La(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=tc(),i=nc(e),a=Aa(r,i);a.tag=1,a.payload=t,void 0!==n&&null!==n&&(a.callback=n),null!==(t=Da(e,a,i))&&(rc(t,e,i,r),La(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=tc(),r=nc(e),i=Aa(n,r);i.tag=2,void 0!==t&&null!==t&&(i.callback=t),null!==(t=Da(e,i,r))&&(rc(t,e,r,n),La(t,e,r))}};function Ba(e,t,n,r,i,a,o){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,o):!t.prototype||!t.prototype.isPureReactComponent||(!ur(n,r)||!ur(i,a))}function Ha(e,t,n){var r=!1,i=Ti,a=t.contextType;return"object"===typeof a&&null!==a?a=Sa(a):(i=Pi(t)?Oi:Ii.current,a=(r=null!==(r=t.contextTypes)&&void 0!==r)?Ri(e,i):Ti),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=za,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function Ka(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&za.enqueueReplaceState(t,t.state,null)}function qa(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=Ua,Ra(e);var a=t.contextType;"object"===typeof a&&null!==a?i.context=Sa(a):(a=Pi(t)?Oi:Ii.current,i.context=Ri(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&&za.enqueueReplaceState(i,i.state,null),ja(e,n,i,r),i.state=e.memoizedState),"function"===typeof i.componentDidMount&&(e.flags|=4194308)}function Wa(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 Ga(e,t){throw e=Object.prototype.toString.call(t),Error(a(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Qa(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=Dc(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 s(t){return e&&null===t.alternate&&(t.flags|=2),t}function u(e,t,n,r){return null===t||6!==t.tag?((t=Fc(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function c(e,t,n,r){var a=n.type;return a===E?f(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===a||"object"===typeof a&&null!==a&&a.$$typeof===P&&Qa(a)===t.type)?((r=i(t,n.props)).ref=Wa(e,t,n),r.return=e,r):((r=Lc(n.type,n.key,n.props,null,e.mode,r)).ref=Wa(e,t,n),r.return=e,r)}function l(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Uc(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=Mc(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=Fc(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case w:return(n=Lc(t.type,t.key,t.props,null,e.mode,n)).ref=Wa(e,null,t),n.return=e,n;case x:return(t=Uc(t,e.mode,n)).return=e,t;case P:return h(e,(0,t._init)(t._payload),n)}if(te(t)||L(t))return(t=Mc(t,e.mode,n,null)).return=e,t;Ga(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:u(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case w:return n.key===i?c(e,t,n,r):null;case x:return n.key===i?l(e,t,n,r):null;case P:return d(e,t,(i=n._init)(n._payload),r)}if(te(n)||L(n))return null!==i?null:f(e,t,n,r,null);Ga(e,n)}return null}function p(e,t,n,r,i){if("string"===typeof r&&""!==r||"number"===typeof r)return u(t,e=e.get(n)||null,""+r,i);if("object"===typeof r&&null!==r){switch(r.$$typeof){case w:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case x:return l(t,e=e.get(null===r.key?n:r.key)||null,r,i);case P:return p(e,t,n,(0,r._init)(r._payload),i)}if(te(r)||L(r))return f(t,e=e.get(n)||null,r,i,null);Ga(t,r)}return null}function v(i,a,s,u){for(var c=null,l=null,f=a,v=a=0,m=null;null!==f&&v<s.length;v++){f.index>v?(m=f,f=null):m=f.sibling;var g=d(i,f,s[v],u);if(null===g){null===f&&(f=m);break}e&&f&&null===g.alternate&&t(i,f),a=o(g,a,v),null===l?c=g:l.sibling=g,l=g,f=m}if(v===s.length)return n(i,f),ia&&Ji(i,v),c;if(null===f){for(;v<s.length;v++)null!==(f=h(i,s[v],u))&&(a=o(f,a,v),null===l?c=f:l.sibling=f,l=f);return ia&&Ji(i,v),c}for(f=r(i,f);v<s.length;v++)null!==(m=p(f,i,v,s[v],u))&&(e&&null!==m.alternate&&f.delete(null===m.key?v:m.key),a=o(m,a,v),null===l?c=m:l.sibling=m,l=m);return e&&f.forEach((function(e){return t(i,e)})),ia&&Ji(i,v),c}function m(i,s,u,c){var l=L(u);if("function"!==typeof l)throw Error(a(150));if(null==(u=l.call(u)))throw Error(a(151));for(var f=l=null,v=s,m=s=0,g=null,y=u.next();null!==v&&!y.done;m++,y=u.next()){v.index>m?(g=v,v=null):g=v.sibling;var k=d(i,v,y.value,c);if(null===k){null===v&&(v=g);break}e&&v&&null===k.alternate&&t(i,v),s=o(k,s,m),null===f?l=k:f.sibling=k,f=k,v=g}if(y.done)return n(i,v),ia&&Ji(i,m),l;if(null===v){for(;!y.done;m++,y=u.next())null!==(y=h(i,y.value,c))&&(s=o(y,s,m),null===f?l=y:f.sibling=y,f=y);return ia&&Ji(i,m),l}for(v=r(i,v);!y.done;m++,y=u.next())null!==(y=p(v,i,m,y.value,c))&&(e&&null!==y.alternate&&v.delete(null===y.key?m:y.key),s=o(y,s,m),null===f?l=y:f.sibling=y,f=y);return e&&v.forEach((function(e){return t(i,e)})),ia&&Ji(i,m),l}return function e(r,a,o,u){if("object"===typeof o&&null!==o&&o.type===E&&null===o.key&&(o=o.props.children),"object"===typeof o&&null!==o){switch(o.$$typeof){case w:e:{for(var c=o.key,l=a;null!==l;){if(l.key===c){if((c=o.type)===E){if(7===l.tag){n(r,l.sibling),(a=i(l,o.props.children)).return=r,r=a;break e}}else if(l.elementType===c||"object"===typeof c&&null!==c&&c.$$typeof===P&&Qa(c)===l.type){n(r,l.sibling),(a=i(l,o.props)).ref=Wa(r,l,o),a.return=r,r=a;break e}n(r,l);break}t(r,l),l=l.sibling}o.type===E?((a=Mc(o.props.children,r.mode,u,o.key)).return=r,r=a):((u=Lc(o.type,o.key,o.props,null,r.mode,u)).ref=Wa(r,a,o),u.return=r,r=u)}return s(r);case x:e:{for(l=o.key;null!==a;){if(a.key===l){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=Uc(o,r.mode,u)).return=r,r=a}return s(r);case P:return e(r,a,(l=o._init)(o._payload),u)}if(te(o))return v(r,a,o,u);if(L(o))return m(r,a,o,u);Ga(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=Fc(o,r.mode,u)).return=r,r=a),s(r)):n(r,a)}}var Ya=$a(!0),Xa=$a(!1),Ja={},Za=_i(Ja),eo=_i(Ja),to=_i(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:ue(null,"");break;default:t=ue(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Si(Za),Ci(Za,t)}function io(){Si(Za),Si(eo),Si(to)}function ao(e){no(to.current);var t=no(Za.current),n=ue(t,e.type);t!==n&&(Ci(eo,e),Ci(Za,n))}function oo(e){eo.current===e&&(Si(Za),Si(eo))}var so=_i(0);function uo(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 co=[];function lo(){for(var e=0;e<co.length;e++)co[e]._workInProgressVersionPrimary=null;co.length=0}var fo=b.ReactCurrentDispatcher,ho=b.ReactCurrentBatchConfig,po=0,vo=null,mo=null,go=null,yo=!1,ko=!1,bo=0,wo=0;function xo(){throw Error(a(321))}function Eo(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!sr(e[n],t[n]))return!1;return!0}function _o(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?ss:us,e=n(r,i),ko){o=0;do{if(ko=!1,bo=0,25<=o)throw Error(a(301));o+=1,go=mo=null,t.updateQueue=null,fo.current=cs,e=n(r,i)}while(ko)}if(fo.current=os,t=null!==mo&&null!==mo.next,po=0,go=mo=vo=null,yo=!1,t)throw Error(a(300));return e}function So(){var e=0!==bo;return bo=0,e}function Co(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===go?vo.memoizedState=go=e:go=go.next=e,go}function To(){if(null===mo){var e=vo.alternate;e=null!==e?e.memoizedState:null}else e=mo.next;var t=null===go?vo.memoizedState:go.next;if(null!==t)go=t,mo=e;else{if(null===e)throw Error(a(310));e={memoizedState:(mo=e).memoizedState,baseState:mo.baseState,baseQueue:mo.baseQueue,queue:mo.queue,next:null},null===go?vo.memoizedState=go=e:go=go.next=e}return go}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=mo,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(null!==i){o=i.next,r=r.baseState;var u=s=null,c=null,l=o;do{var f=l.lane;if((po&f)===f)null!==c&&(c=c.next={lane:0,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null}),r=l.hasEagerState?l.eagerState:e(r,l.action);else{var h={lane:f,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null};null===c?(u=c=h,s=r):c=c.next=h,vo.lanes|=f,ju|=f}l=l.next}while(null!==l&&l!==o);null===c?s=r:c.next=u,sr(r,t.memoizedState)||(bs=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=c,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{o=i.lane,vo.lanes|=o,ju|=o,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Oo(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 s=i=i.next;do{o=e(o,s.action),s=s.next}while(s!==i);sr(o,t.memoizedState)||(bs=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Ro(){}function Po(e,t){var n=vo,r=To(),i=t(),o=!sr(r.memoizedState,i);if(o&&(r.memoizedState=i,bs=!0),r=r.queue,Ko(Lo.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||null!==go&&1&go.memoizedState.tag){if(n.flags|=2048,Uo(9,Do.bind(null,n,r,i,t),void 0,null),null===Ou)throw Error(a(349));0!==(30&po)||Ao(n,t,i)}return i}function Ao(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 Do(e,t,n,r){t.value=n,t.getSnapshot=r,Mo(t)&&jo(e)}function Lo(e,t,n){return n((function(){Mo(t)&&jo(e)}))}function Mo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!sr(e,n)}catch(r){return!0}}function jo(e){var t=Na(e,1);null!==t&&rc(t,e,1,-1)}function Fo(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=ns.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 zo(e,t,n,r){var i=Co();vo.flags|=e,i.memoizedState=Uo(1|t,n,void 0,void 0===r?null:r)}function Bo(e,t,n,r){var i=To();r=void 0===r?null:r;var a=void 0;if(null!==mo){var o=mo.memoizedState;if(a=o.destroy,null!==r&&Eo(r,o.deps))return void(i.memoizedState=Uo(t,n,a,r))}vo.flags|=e,i.memoizedState=Uo(1|t,n,a,r)}function Ho(e,t){return zo(8390656,8,e,t)}function Ko(e,t){return Bo(2048,8,e,t)}function qo(e,t){return Bo(4,2,e,t)}function Wo(e,t){return Bo(4,4,e,t)}function Go(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 Qo(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Bo(4,4,Go.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&&Eo(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&&Eo(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,bs=!0),e.memoizedState=n):(sr(n,t)||(n=vt(),vo.lanes|=n,ju|=n,e.baseState=!0),t)}function Zo(e,t){var n=kt;kt=0!==n&&4>n?n:4,e(!0);var r=ho.transition;ho.transition={};try{e(!1),t()}finally{kt=n,ho.transition=r}}function es(){return To().memoizedState}function ts(e,t,n){var r=nc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},rs(e))is(t,n);else if(null!==(n=Ia(e,t,n,r))){rc(n,e,r,tc()),as(n,t,r)}}function ns(e,t,n){var r=nc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(rs(e))is(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,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,sr(s,o)){var u=t.interleaved;return null===u?(i.next=i,Ta(t)):(i.next=u.next,u.next=i),void(t.interleaved=i)}}catch(c){}null!==(n=Ia(e,t,i,r))&&(rc(n,e,r,i=tc()),as(n,t,r))}}function rs(e){var t=e.alternate;return e===vo||null!==t&&t===vo}function is(e,t){ko=yo=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function as(e,t,n){if(0!==(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}var os={readContext:Sa,useCallback:xo,useContext:xo,useEffect:xo,useImperativeHandle:xo,useInsertionEffect:xo,useLayoutEffect:xo,useMemo:xo,useReducer:xo,useRef:xo,useState:xo,useDebugValue:xo,useDeferredValue:xo,useTransition:xo,useMutableSource:xo,useSyncExternalStore:xo,useId:xo,unstable_isNewReconciler:!1},ss={readContext:Sa,useCallback:function(e,t){return Co().memoizedState=[e,void 0===t?null:t],e},useContext:Sa,useEffect:Ho,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,zo(4194308,4,Go.bind(null,t,e),n)},useLayoutEffect:function(e,t){return zo(4194308,4,e,t)},useInsertionEffect:function(e,t){return zo(4,2,e,t)},useMemo:function(e,t){var n=Co();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Co();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=ts.bind(null,vo,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Co().memoizedState=e},useState:Fo,useDebugValue:$o,useDeferredValue:function(e){return Co().memoizedState=e},useTransition:function(){var e=Fo(!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===Ou)throw Error(a(349));0!==(30&po)||Ao(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Ho(Lo.bind(null,r,o,e),[e]),r.flags|=2048,Uo(9,Do.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Co(),t=Ou.identifierPrefix;if(ia){var n=Xi;t=":"+t+"R"+(n=(Yi&~(1<<32-ot(Yi)-1)).toString(32)+n),0<(n=bo++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=wo++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},us={readContext:Sa,useCallback:Yo,useContext:Sa,useEffect:Ko,useImperativeHandle:Qo,useInsertionEffect:qo,useLayoutEffect:Wo,useMemo:Xo,useReducer:No,useRef:Vo,useState:function(){return No(Io)},useDebugValue:$o,useDeferredValue:function(e){return Jo(To(),mo.memoizedState,e)},useTransition:function(){return[No(Io)[0],To().memoizedState]},useMutableSource:Ro,useSyncExternalStore:Po,useId:es,unstable_isNewReconciler:!1},cs={readContext:Sa,useCallback:Yo,useContext:Sa,useEffect:Ko,useImperativeHandle:Qo,useInsertionEffect:qo,useLayoutEffect:Wo,useMemo:Xo,useReducer:Oo,useRef:Vo,useState:function(){return Oo(Io)},useDebugValue:$o,useDeferredValue:function(e){var t=To();return null===mo?t.memoizedState=e:Jo(t,mo.memoizedState,e)},useTransition:function(){return[Oo(Io)[0],To().memoizedState]},useMutableSource:Ro,useSyncExternalStore:Po,useId:es,unstable_isNewReconciler:!1};function ls(e,t){try{var n="",r=t;do{n+=z(r),r=r.return}while(r);var i=n}catch(a){i="\nError generating stack: "+a.message+"\n"+a.stack}return{value:e,source:t,stack:i,digest:null}}function fs(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function hs(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}var ds="function"===typeof WeakMap?WeakMap:Map;function ps(e,t,n){(n=Aa(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){qu||(qu=!0,Wu=r),hs(0,t)},n}function vs(e,t,n){(n=Aa(-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(){hs(0,t)}}var a=e.stateNode;return null!==a&&"function"===typeof a.componentDidCatch&&(n.callback=function(){hs(0,t),"function"!==typeof r&&(null===Gu?Gu=new Set([this]):Gu.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function ms(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new ds;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=Cc.bind(null,e,t,n),t.then(e,e))}function gs(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 ys(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=Aa(-1,1)).tag=2,Da(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var ks=b.ReactCurrentOwner,bs=!1;function ws(e,t,n,r){t.child=null===e?Xa(t,null,n,r):Ya(t,e.child,n,r)}function xs(e,t,n,r,i){n=n.render;var a=t.ref;return _a(t,i),r=_o(e,t,n,r,a,i),n=So(),null===e||bs?(ia&&n&&ea(t),t.flags|=1,ws(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,qs(e,t,i))}function Es(e,t,n,r,i){if(null===e){var a=n.type;return"function"!==typeof a||Ac(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Lc(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,_s(e,t,a,r,i))}if(a=e.child,0===(e.lanes&i)){var o=a.memoizedProps;if((n=null!==(n=n.compare)?n:ur)(o,r)&&e.ref===t.ref)return qs(e,t,i)}return t.flags|=1,(e=Dc(a,r)).ref=t.ref,e.return=t,t.child=e}function _s(e,t,n,r,i){if(null!==e){var a=e.memoizedProps;if(ur(a,r)&&e.ref===t.ref){if(bs=!1,t.pendingProps=r=a,0===(e.lanes&i))return t.lanes=e.lanes,qs(e,t,i);0!==(131072&e.flags)&&(bs=!0)}}return Ts(e,t,n,r,i)}function Ss(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(Du,Au),Au|=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(Du,Au),Au|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==a?a.baseLanes:n,Ci(Du,Au),Au|=r}else null!==a?(r=a.baseLanes|n,t.memoizedState=null):r=n,Ci(Du,Au),Au|=r;return ws(e,t,i,n),t.child}function Cs(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ts(e,t,n,r,i){var a=Pi(n)?Oi:Ii.current;return a=Ri(t,a),_a(t,i),n=_o(e,t,n,r,a,i),r=So(),null===e||bs?(ia&&r&&ea(t),t.flags|=1,ws(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,qs(e,t,i))}function Is(e,t,n,r,i){if(Pi(n)){var a=!0;Mi(t)}else a=!1;if(_a(t,i),null===t.stateNode)Ks(e,t),Ha(t,n,r),qa(t,n,r,i),r=!0;else if(null===e){var o=t.stateNode,s=t.memoizedProps;o.props=s;var u=o.context,c=n.contextType;"object"===typeof c&&null!==c?c=Sa(c):c=Ri(t,c=Pi(n)?Oi:Ii.current);var l=n.getDerivedStateFromProps,f="function"===typeof l||"function"===typeof o.getSnapshotBeforeUpdate;f||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(s!==r||u!==c)&&Ka(t,o,r,c),Oa=!1;var h=t.memoizedState;o.state=h,ja(t,r,o,i),u=t.memoizedState,s!==r||h!==u||Ni.current||Oa?("function"===typeof l&&(Va(t,n,l,r),u=t.memoizedState),(s=Oa||Ba(t,n,s,r,h,u,c))?(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=u),o.props=r,o.state=u,o.context=c,r=s):("function"===typeof o.componentDidMount&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Pa(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:ma(t.type,s),o.props=c,f=t.pendingProps,h=o.context,"object"===typeof(u=n.contextType)&&null!==u?u=Sa(u):u=Ri(t,u=Pi(n)?Oi:Ii.current);var d=n.getDerivedStateFromProps;(l="function"===typeof d||"function"===typeof o.getSnapshotBeforeUpdate)||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(s!==f||h!==u)&&Ka(t,o,r,u),Oa=!1,h=t.memoizedState,o.state=h,ja(t,r,o,i);var p=t.memoizedState;s!==f||h!==p||Ni.current||Oa?("function"===typeof d&&(Va(t,n,d,r),p=t.memoizedState),(c=Oa||Ba(t,n,c,r,h,p,u)||!1)?(l||"function"!==typeof o.UNSAFE_componentWillUpdate&&"function"!==typeof o.componentWillUpdate||("function"===typeof o.componentWillUpdate&&o.componentWillUpdate(r,p,u),"function"===typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,p,u)),"function"===typeof o.componentDidUpdate&&(t.flags|=4),"function"===typeof o.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof o.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),o.props=r,o.state=p,o.context=u,r=c):("function"!==typeof o.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Ns(e,t,n,r,a,i)}function Ns(e,t,n,r,i,a){Cs(e,t);var o=0!==(128&t.flags);if(!r&&!o)return i&&ji(t,n,!1),qs(e,t,a);r=t.stateNode,ks.current=t;var s=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,s,a)):ws(e,t,s,a),t.memoizedState=r.state,i&&ji(t,n,!0),t.child}function Os(e){var t=e.stateNode;t.pendingContext?Di(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Di(0,t.context,!1),ro(e,t.containerInfo)}function Rs(e,t,n,r,i){return da(),pa(i),t.flags|=256,ws(e,t,n,r),t.child}var Ps,As,Ds,Ls,Ms={dehydrated:null,treeContext:null,retryLane:0};function js(e){return{baseLanes:e,cachePool:null,transitions:null}}function Fs(e,t,n){var r,i=t.pendingProps,o=so.current,s=!1,u=0!==(128&t.flags);if((r=u)||(r=(null===e||null!==e.memoizedState)&&0!==(2&o)),r?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(o|=1),Ci(so,1&o),null===e)return ca(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):(u=i.children,e=i.fallback,s?(i=t.mode,s=t.child,u={mode:"hidden",children:u},0===(1&i)&&null!==s?(s.childLanes=0,s.pendingProps=u):s=jc(u,i,0,null),e=Mc(e,i,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=js(n),t.memoizedState=Ms,e):Us(t,u));if(null!==(o=e.memoizedState)&&null!==(r=o.dehydrated))return function(e,t,n,r,i,o,s){if(n)return 256&t.flags?(t.flags&=-257,Vs(e,t,s,r=fs(Error(a(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=jc({mode:"visible",children:r.children},i,0,null),(o=Mc(o,i,s,null)).flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,0!==(1&t.mode)&&Ya(t,e.child,null,s),t.child.memoizedState=js(s),t.memoizedState=Ms,o);if(0===(1&t.mode))return Vs(e,t,s,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var u=r.dgst;return r=u,Vs(e,t,s,r=fs(o=Error(a(419)),r,void 0))}if(u=0!==(s&e.childLanes),bs||u){if(null!==(r=Ou)){switch(s&-s){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|s))?0:i)&&i!==o.retryLane&&(o.retryLane=i,Na(e,i),rc(r,e,i,-1))}return mc(),Vs(e,t,s,r=fs(Error(a(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Ic.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,ra=ci(i.nextSibling),na=t,ia=!0,aa=null,null!==e&&(Gi[Qi++]=Yi,Gi[Qi++]=Xi,Gi[Qi++]=$i,Yi=e.id,Xi=e.overflow,$i=t),t=Us(t,r.children),t.flags|=4096,t)}(e,t,u,i,r,o,n);if(s){s=i.fallback,u=t.mode,r=(o=e.child).sibling;var c={mode:"hidden",children:i.children};return 0===(1&u)&&t.child!==o?((i=t.child).childLanes=0,i.pendingProps=c,t.deletions=null):(i=Dc(o,c)).subtreeFlags=14680064&o.subtreeFlags,null!==r?s=Dc(r,s):(s=Mc(s,u,n,null)).flags|=2,s.return=t,i.return=t,i.sibling=s,t.child=i,i=s,s=t.child,u=null===(u=e.child.memoizedState)?js(n):{baseLanes:u.baseLanes|n,cachePool:null,transitions:u.transitions},s.memoizedState=u,s.childLanes=e.childLanes&~n,t.memoizedState=Ms,i}return e=(s=e.child).sibling,i=Dc(s,{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 Us(e,t){return(t=jc({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Vs(e,t,n,r){return null!==r&&pa(r),Ya(t,e.child,null,n),(e=Us(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function zs(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Ea(e.return,t,n)}function Bs(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 Hs(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(ws(e,t,r.children,n),0!==(2&(r=so.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&&zs(e,n,t);else if(19===e.tag)zs(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(so,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===uo(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Bs(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===uo(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Bs(t,!0,n,null,a);break;case"together":Bs(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ks(e,t){0===(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function qs(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),ju|=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=Dc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Dc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Ws(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 Gs(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 Qs(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 Gs(t),null;case 1:case 17:return Pi(t.type)&&Ai(),Gs(t),null;case 3:return r=t.stateNode,io(),Si(Ni),Si(Ii),lo(),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&&(sc(aa),aa=null))),As(e,t),Gs(t),null;case 5:oo(t);var i=no(to.current);if(n=t.type,null!==e&&null!=t.stateNode)Ds(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(a(166));return Gs(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<Lr.length;i++)Ur(Lr[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 u in ye(n,o),i=null,o)if(o.hasOwnProperty(u)){var c=o[u];"children"===u?"string"===typeof c?r.textContent!==c&&(!0!==o.suppressHydrationWarning&&Jr(r.textContent,c,e),i=["children",c]):"number"===typeof c&&r.textContent!==""+c&&(!0!==o.suppressHydrationWarning&&Jr(r.textContent,c,e),i=["children",""+c]):s.hasOwnProperty(u)&&null!=c&&"onScroll"===u&&Ur("scroll",r)}switch(n){case"input":W(r),Z(r,o,!0);break;case"textarea":W(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{u=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=se(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=u.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=u.createElement(n,{is:r.is}):(e=u.createElement(n),"select"===n&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,n),e[hi]=t,e[di]=r,Ps(e,t,!1,!1),t.stateNode=e;e:{switch(u=ke(n,r),n){case"dialog":Ur("cancel",e),Ur("close",e),i=r;break;case"iframe":case"object":case"embed":Ur("load",e),i=r;break;case"video":case"audio":for(i=0;i<Lr.length;i++)Ur(Lr[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=j({},r,{value:void 0}),Ur("invalid",e);break;case"textarea":ie(e,r),i=re(e,r),Ur("invalid",e)}for(o in ye(n,i),c=i)if(c.hasOwnProperty(o)){var l=c[o];"style"===o?me(e,l):"dangerouslySetInnerHTML"===o?null!=(l=l?l.__html:void 0)&&fe(e,l):"children"===o?"string"===typeof l?("textarea"!==n||""!==l)&&he(e,l):"number"===typeof l&&he(e,""+l):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(s.hasOwnProperty(o)?null!=l&&"onScroll"===o&&Ur("scroll",e):null!=l&&k(e,o,l,u))}switch(n){case"input":W(e),Z(e,r,!1);break;case"textarea":W(e),oe(e);break;case"option":null!=r.value&&e.setAttribute("value",""+K(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 Gs(t),null;case 6:if(e&&null!=t.stateNode)Ls(e,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 Gs(t),null;case 13:if(Si(so),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;Gs(t),o=!1}else null!==aa&&(sc(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&so.current)?0===Lu&&(Lu=3):mc())),null!==t.updateQueue&&(t.flags|=4),Gs(t),null);case 4:return io(),As(e,t),null===e&&Br(t.stateNode.containerInfo),Gs(t),null;case 10:return xa(t.type._context),Gs(t),null;case 19:if(Si(so),null===(o=t.memoizedState))return Gs(t),null;if(r=0!==(128&t.flags),null===(u=o.rendering))if(r)Ws(o,!1);else{if(0!==Lu||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(u=uo(e))){for(t.flags|=128,Ws(o,!1),null!==(r=u.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(o=n).flags&=14680066,null===(u=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=u.childLanes,o.lanes=u.lanes,o.child=u.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=u.memoizedProps,o.memoizedState=u.memoizedState,o.updateQueue=u.updateQueue,o.type=u.type,e=u.dependencies,o.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ci(so,1&so.current|2),t.child}e=e.sibling}null!==o.tail&&Xe()>Hu&&(t.flags|=128,r=!0,Ws(o,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=uo(u))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Ws(o,!0),null===o.tail&&"hidden"===o.tailMode&&!u.alternate&&!ia)return Gs(t),null}else 2*Xe()-o.renderingStartTime>Hu&&1073741824!==n&&(t.flags|=128,r=!0,Ws(o,!1),t.lanes=4194304);o.isBackwards?(u.sibling=t.child,t.child=u):(null!==(n=o.last)?n.sibling=u:t.child=u,o.last=u)}return null!==o.tail?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Xe(),t.sibling=null,n=so.current,Ci(so,r?1&n|2:1&n),t):(Gs(t),null);case 22:case 23:return hc(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!==(1&t.mode)?0!==(1073741824&Au)&&(Gs(t),6&t.subtreeFlags&&(t.flags|=8192)):Gs(t),null;case 24:case 25:return null}throw Error(a(156,t.tag))}function $s(e,t){switch(ta(t),t.tag){case 1:return Pi(t.type)&&Ai(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return io(),Si(Ni),Si(Ii),lo(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 5:return oo(t),null;case 13:if(Si(so),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 Si(so),null;case 4:return io(),null;case 10:return xa(t.type._context),null;case 22:case 23:return hc(),null;default:return null}}Ps=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}},As=function(){},Ds=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=j({},i,{value:void 0}),r=j({},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(l in ye(n,r),n=null,i)if(!r.hasOwnProperty(l)&&i.hasOwnProperty(l)&&null!=i[l])if("style"===l){var u=i[l];for(a in u)u.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==l&&"children"!==l&&"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(s.hasOwnProperty(l)?o||(o=[]):(o=o||[]).push(l,null));for(l in r){var c=r[l];if(u=null!=i?i[l]:void 0,r.hasOwnProperty(l)&&c!==u&&(null!=c||null!=u))if("style"===l)if(u){for(a in u)!u.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in c)c.hasOwnProperty(a)&&u[a]!==c[a]&&(n||(n={}),n[a]=c[a])}else n||(o||(o=[]),o.push(l,n)),n=c;else"dangerouslySetInnerHTML"===l?(c=c?c.__html:void 0,u=u?u.__html:void 0,null!=c&&u!==c&&(o=o||[]).push(l,c)):"children"===l?"string"!==typeof c&&"number"!==typeof c||(o=o||[]).push(l,""+c):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&(s.hasOwnProperty(l)?(null!=c&&"onScroll"===l&&Ur("scroll",e),o||u===c||(o=[])):(o=o||[]).push(l,c))}n&&(o=o||[]).push("style",n);var l=o;(t.updateQueue=l)&&(t.flags|=4)}},Ls=function(e,t,n,r){n!==r&&(t.flags|=4)};var Ys=!1,Xs=!1,Js="function"===typeof WeakSet?WeakSet:Set,Zs=null;function eu(e,t){var n=e.ref;if(null!==n)if("function"===typeof n)try{n(null)}catch(r){Sc(e,t,r)}else n.current=null}function tu(e,t,n){try{n()}catch(r){Sc(e,t,r)}}var nu=!1;function ru(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&&tu(t,n,a)}i=i.next}while(i!==r)}}function iu(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 au(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 ou(e){var t=e.alternate;null!==t&&(e.alternate=null,ou(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[mi],delete t[gi])),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 su(e){return 5===e.tag||3===e.tag||4===e.tag}function uu(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||su(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 cu(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(cu(e,t,n),e=e.sibling;null!==e;)cu(e,t,n),e=e.sibling}function lu(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(lu(e,t,n),e=e.sibling;null!==e;)lu(e,t,n),e=e.sibling}var fu=null,hu=!1;function du(e,t,n){for(n=n.child;null!==n;)pu(e,t,n),n=n.sibling}function pu(e,t,n){if(at&&"function"===typeof at.onCommitFiberUnmount)try{at.onCommitFiberUnmount(it,n)}catch(s){}switch(n.tag){case 5:Xs||eu(n,t);case 6:var r=fu,i=hu;fu=null,du(e,t,n),hu=i,null!==(fu=r)&&(hu?(e=fu,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):fu.removeChild(n.stateNode));break;case 18:null!==fu&&(hu?(e=fu,n=n.stateNode,8===e.nodeType?ui(e.parentNode,n):1===e.nodeType&&ui(e,n),Bt(e)):ui(fu,n.stateNode));break;case 4:r=fu,i=hu,fu=n.stateNode.containerInfo,hu=!0,du(e,t,n),fu=r,hu=i;break;case 0:case 11:case 14:case 15:if(!Xs&&(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))&&tu(n,t,o),i=i.next}while(i!==r)}du(e,t,n);break;case 1:if(!Xs&&(eu(n,t),"function"===typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Sc(n,t,s)}du(e,t,n);break;case 21:du(e,t,n);break;case 22:1&n.mode?(Xs=(r=Xs)||null!==n.memoizedState,du(e,t,n),Xs=r):du(e,t,n);break;default:du(e,t,n)}}function vu(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Js),t.forEach((function(t){var r=Nc.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function mu(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,s=t,u=s;e:for(;null!==u;){switch(u.tag){case 5:fu=u.stateNode,hu=!1;break e;case 3:case 4:fu=u.stateNode.containerInfo,hu=!0;break e}u=u.return}if(null===fu)throw Error(a(160));pu(o,s,i),fu=null,hu=!1;var c=i.alternate;null!==c&&(c.return=null),i.return=null}catch(l){Sc(i,t,l)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)gu(t,e),t=t.sibling}function gu(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(mu(t,e),yu(e),4&r){try{ru(3,e,e.return),iu(3,e)}catch(m){Sc(e,e.return,m)}try{ru(5,e,e.return)}catch(m){Sc(e,e.return,m)}}break;case 1:mu(t,e),yu(e),512&r&&null!==n&&eu(n,n.return);break;case 5:if(mu(t,e),yu(e),512&r&&null!==n&&eu(n,n.return),32&e.flags){var i=e.stateNode;try{he(i,"")}catch(m){Sc(e,e.return,m)}}if(4&r&&null!=(i=e.stateNode)){var o=e.memoizedProps,s=null!==n?n.memoizedProps:o,u=e.type,c=e.updateQueue;if(e.updateQueue=null,null!==c)try{"input"===u&&"radio"===o.type&&null!=o.name&&X(i,o),ke(u,s);var l=ke(u,o);for(s=0;s<c.length;s+=2){var f=c[s],h=c[s+1];"style"===f?me(i,h):"dangerouslySetInnerHTML"===f?fe(i,h):"children"===f?he(i,h):k(i,f,h,l)}switch(u){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(m){Sc(e,e.return,m)}}break;case 6:if(mu(t,e),yu(e),4&r){if(null===e.stateNode)throw Error(a(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(m){Sc(e,e.return,m)}}break;case 3:if(mu(t,e),yu(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Bt(t.containerInfo)}catch(m){Sc(e,e.return,m)}break;case 4:default:mu(t,e),yu(e);break;case 13:mu(t,e),yu(e),8192&(i=e.child).flags&&(o=null!==i.memoizedState,i.stateNode.isHidden=o,!o||null!==i.alternate&&null!==i.alternate.memoizedState||(Bu=Xe())),4&r&&vu(e);break;case 22:if(f=null!==n&&null!==n.memoizedState,1&e.mode?(Xs=(l=Xs)||f,mu(t,e),Xs=l):mu(t,e),yu(e),8192&r){if(l=null!==e.memoizedState,(e.stateNode.isHidden=l)&&!f&&0!==(1&e.mode))for(Zs=e,f=e.child;null!==f;){for(h=Zs=f;null!==Zs;){switch(p=(d=Zs).child,d.tag){case 0:case 11:case 14:case 15:ru(4,d,d.return);break;case 1:eu(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(m){Sc(r,n,m)}}break;case 5:eu(d,d.return);break;case 22:if(null!==d.memoizedState){xu(h);continue}}null!==p?(p.return=d,Zs=p):xu(h)}f=f.sibling}e:for(f=null,h=e;;){if(5===h.tag){if(null===f){f=h;try{i=h.stateNode,l?"function"===typeof(o=i.style).setProperty?o.setProperty("display","none","important"):o.display="none":(u=h.stateNode,s=void 0!==(c=h.memoizedProps.style)&&null!==c&&c.hasOwnProperty("display")?c.display:null,u.style.display=ve("display",s))}catch(m){Sc(e,e.return,m)}}}else if(6===h.tag){if(null===f)try{h.stateNode.nodeValue=l?"":h.memoizedProps}catch(m){Sc(e,e.return,m)}}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:mu(t,e),yu(e),4&r&&vu(e);case 21:}}function yu(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(su(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),lu(e,uu(e),i);break;case 3:case 4:var o=r.stateNode.containerInfo;cu(e,uu(e),o);break;default:throw Error(a(161))}}catch(s){Sc(e,e.return,s)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function ku(e,t,n){Zs=e,bu(e,t,n)}function bu(e,t,n){for(var r=0!==(1&e.mode);null!==Zs;){var i=Zs,a=i.child;if(22===i.tag&&r){var o=null!==i.memoizedState||Ys;if(!o){var s=i.alternate,u=null!==s&&null!==s.memoizedState||Xs;s=Ys;var c=Xs;if(Ys=o,(Xs=u)&&!c)for(Zs=i;null!==Zs;)u=(o=Zs).child,22===o.tag&&null!==o.memoizedState?Eu(i):null!==u?(u.return=o,Zs=u):Eu(i);for(;null!==a;)Zs=a,bu(a,t,n),a=a.sibling;Zs=i,Ys=s,Xs=c}wu(e)}else 0!==(8772&i.subtreeFlags)&&null!==a?(a.return=i,Zs=a):wu(e)}}function wu(e){for(;null!==Zs;){var t=Zs;if(0!==(8772&t.flags)){var n=t.alternate;try{if(0!==(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Xs||iu(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Xs)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:ma(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;null!==o&&Fa(t,o,r);break;case 3:var s=t.updateQueue;if(null!==s){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Fa(t,s,n)}break;case 5:var u=t.stateNode;if(null===n&&4&t.flags){n=u;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.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 l=t.alternate;if(null!==l){var f=l.memoizedState;if(null!==f){var h=f.dehydrated;null!==h&&Bt(h)}}}break;default:throw Error(a(163))}Xs||512&t.flags&&au(t)}catch(d){Sc(t,t.return,d)}}if(t===e){Zs=null;break}if(null!==(n=t.sibling)){n.return=t.return,Zs=n;break}Zs=t.return}}function xu(e){for(;null!==Zs;){var t=Zs;if(t===e){Zs=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Zs=n;break}Zs=t.return}}function Eu(e){for(;null!==Zs;){var t=Zs;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{iu(4,t)}catch(u){Sc(t,n,u)}break;case 1:var r=t.stateNode;if("function"===typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(u){Sc(t,i,u)}}var a=t.return;try{au(t)}catch(u){Sc(t,a,u)}break;case 5:var o=t.return;try{au(t)}catch(u){Sc(t,o,u)}}}catch(u){Sc(t,t.return,u)}if(t===e){Zs=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Zs=s;break}Zs=t.return}}var _u,Su=Math.ceil,Cu=b.ReactCurrentDispatcher,Tu=b.ReactCurrentOwner,Iu=b.ReactCurrentBatchConfig,Nu=0,Ou=null,Ru=null,Pu=0,Au=0,Du=_i(0),Lu=0,Mu=null,ju=0,Fu=0,Uu=0,Vu=null,zu=null,Bu=0,Hu=1/0,Ku=null,qu=!1,Wu=null,Gu=null,Qu=!1,$u=null,Yu=0,Xu=0,Ju=null,Zu=-1,ec=0;function tc(){return 0!==(6&Nu)?Xe():-1!==Zu?Zu:Zu=Xe()}function nc(e){return 0===(1&e.mode)?1:0!==(2&Nu)&&0!==Pu?Pu&-Pu:null!==va.transition?(0===ec&&(ec=vt()),ec):0!==(e=kt)?e:e=void 0===(e=window.event)?16:Yt(e.type)}function rc(e,t,n,r){if(50<Xu)throw Xu=0,Ju=null,Error(a(185));gt(e,n,r),0!==(2&Nu)&&e===Ou||(e===Ou&&(0===(2&Nu)&&(Fu|=n),4===Lu&&uc(e,Pu)),ic(e,r),1===n&&0===Nu&&0===(1&t.mode)&&(Hu=Xe()+500,Ui&&Bi()))}function ic(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),s=1<<o,u=i[o];-1===u?0!==(s&n)&&0===(s&r)||(i[o]=dt(s,t)):u<=t&&(e.expiredLanes|=s),a&=~s}}(e,t);var r=ht(e,e===Ou?Pu:0);if(0===r)null!==n&&Qe(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Qe(n),1===t)0===e.tag?function(e){Ui=!0,zi(e)}(cc.bind(null,e)):zi(cc.bind(null,e)),oi((function(){0===(6&Nu)&&Bi()})),n=null;else{switch(bt(r)){case 1:n=Ze;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=Oc(n,ac.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ac(e,t){if(Zu=-1,ec=0,0!==(6&Nu))throw Error(a(327));var n=e.callbackNode;if(Ec()&&e.callbackNode!==n)return null;var r=ht(e,e===Ou?Pu:0);if(0===r)return null;if(0!==(30&r)||0!==(r&e.expiredLanes)||t)t=gc(e,r);else{t=r;var i=Nu;Nu|=2;var o=vc();for(Ou===e&&Pu===t||(Ku=null,Hu=Xe()+500,dc(e,t));;)try{kc();break}catch(u){pc(e,u)}wa(),Cu.current=o,Nu=i,null!==Ru?t=0:(Ou=null,Pu=0,t=Lu)}if(0!==t){if(2===t&&(0!==(i=pt(e))&&(r=i,t=oc(e,i))),1===t)throw n=Mu,dc(e,0),uc(e,r),ic(e,Xe()),n;if(6===t)uc(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(!sr(a(),i))return!1}catch(s){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=gc(e,r))&&(0!==(o=pt(e))&&(r=o,t=oc(e,o))),1===t))throw n=Mu,dc(e,0),uc(e,r),ic(e,Xe()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(a(345));case 2:case 5:xc(e,zu,Ku);break;case 3:if(uc(e,r),(130023424&r)===r&&10<(t=Bu+500-Xe())){if(0!==ht(e,0))break;if(((i=e.suspendedLanes)&r)!==r){tc(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ri(xc.bind(null,e,zu,Ku),t);break}xc(e,zu,Ku);break;case 4:if(uc(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-ot(r);o=1<<s,(s=t[s])>i&&(i=s),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*Su(r/1960))-r)){e.timeoutHandle=ri(xc.bind(null,e,zu,Ku),r);break}xc(e,zu,Ku);break;default:throw Error(a(329))}}}return ic(e,Xe()),e.callbackNode===n?ac.bind(null,e):null}function oc(e,t){var n=Vu;return e.current.memoizedState.isDehydrated&&(dc(e,t).flags|=256),2!==(e=gc(e,t))&&(t=zu,zu=n,null!==t&&sc(t)),e}function sc(e){null===zu?zu=e:zu.push.apply(zu,e)}function uc(e,t){for(t&=~Uu,t&=~Fu,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 cc(e){if(0!==(6&Nu))throw Error(a(327));Ec();var t=ht(e,0);if(0===(1&t))return ic(e,Xe()),null;var n=gc(e,t);if(0!==e.tag&&2===n){var r=pt(e);0!==r&&(t=r,n=oc(e,r))}if(1===n)throw n=Mu,dc(e,0),uc(e,t),ic(e,Xe()),n;if(6===n)throw Error(a(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,xc(e,zu,Ku),ic(e,Xe()),null}function lc(e,t){var n=Nu;Nu|=1;try{return e(t)}finally{0===(Nu=n)&&(Hu=Xe()+500,Ui&&Bi())}}function fc(e){null!==$u&&0===$u.tag&&0===(6&Nu)&&Ec();var t=Nu;Nu|=1;var n=Iu.transition,r=kt;try{if(Iu.transition=null,kt=1,e)return e()}finally{kt=r,Iu.transition=n,0===(6&(Nu=t))&&Bi()}}function hc(){Au=Du.current,Si(Du)}function dc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ii(n)),null!==Ru)for(n=Ru.return;null!==n;){var r=n;switch(ta(r),r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&Ai();break;case 3:io(),Si(Ni),Si(Ii),lo();break;case 5:oo(r);break;case 4:io();break;case 13:case 19:Si(so);break;case 10:xa(r.type._context);break;case 22:case 23:hc()}n=n.return}if(Ou=e,Ru=e=Dc(e.current,null),Pu=Au=t,Lu=0,Mu=null,Uu=Fu=ju=0,zu=Vu=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 pc(e,t){for(;;){var n=Ru;try{if(wa(),fo.current=os,yo){for(var r=vo.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}yo=!1}if(po=0,go=mo=vo=null,ko=!1,bo=0,Tu.current=null,null===n||null===n.return){Lu=1,Mu=t,Ru=null;break}e:{var o=e,s=n.return,u=n,c=t;if(t=Pu,u.flags|=32768,null!==c&&"object"===typeof c&&"function"===typeof c.then){var l=c,f=u,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=gs(s);if(null!==p){p.flags&=-257,ys(p,s,u,0,t),1&p.mode&&ms(o,l,t),c=l;var v=(t=p).updateQueue;if(null===v){var m=new Set;m.add(c),t.updateQueue=m}else v.add(c);break e}if(0===(1&t)){ms(o,l,t),mc();break e}c=Error(a(426))}else if(ia&&1&u.mode){var g=gs(s);if(null!==g){0===(65536&g.flags)&&(g.flags|=256),ys(g,s,u,0,t),pa(ls(c,u));break e}}o=c=ls(c,u),4!==Lu&&(Lu=2),null===Vu?Vu=[o]:Vu.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t,Ma(o,ps(0,c,t));break e;case 1:u=c;var y=o.type,k=o.stateNode;if(0===(128&o.flags)&&("function"===typeof y.getDerivedStateFromError||null!==k&&"function"===typeof k.componentDidCatch&&(null===Gu||!Gu.has(k)))){o.flags|=65536,t&=-t,o.lanes|=t,Ma(o,vs(o,u,t));break e}}o=o.return}while(null!==o)}wc(n)}catch(b){t=b,Ru===n&&null!==n&&(Ru=n=n.return);continue}break}}function vc(){var e=Cu.current;return Cu.current=os,null===e?os:e}function mc(){0!==Lu&&3!==Lu&&2!==Lu||(Lu=4),null===Ou||0===(268435455&ju)&&0===(268435455&Fu)||uc(Ou,Pu)}function gc(e,t){var n=Nu;Nu|=2;var r=vc();for(Ou===e&&Pu===t||(Ku=null,dc(e,t));;)try{yc();break}catch(i){pc(e,i)}if(wa(),Nu=n,Cu.current=r,null!==Ru)throw Error(a(261));return Ou=null,Pu=0,Lu}function yc(){for(;null!==Ru;)bc(Ru)}function kc(){for(;null!==Ru&&!$e();)bc(Ru)}function bc(e){var t=_u(e.alternate,e,Au);e.memoizedProps=e.pendingProps,null===t?wc(e):Ru=t,Tu.current=null}function wc(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(32768&t.flags)){if(null!==(n=Qs(n,t,Au)))return void(Ru=n)}else{if(null!==(n=$s(n,t)))return n.flags&=32767,void(Ru=n);if(null===e)return Lu=6,void(Ru=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Ru=t);Ru=t=e}while(null!==t);0===Lu&&(Lu=5)}function xc(e,t,n){var r=kt,i=Iu.transition;try{Iu.transition=null,kt=1,function(e,t,n,r){do{Ec()}while(null!==$u);if(0!==(6&Nu))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===Ou&&(Ru=Ou=null,Pu=0),0===(2064&n.subtreeFlags)&&0===(2064&n.flags)||Qu||(Qu=!0,Oc(tt,(function(){return Ec(),null}))),o=0!==(15990&n.flags),0!==(15990&n.subtreeFlags)||o){o=Iu.transition,Iu.transition=null;var s=kt;kt=1;var u=Nu;Nu|=4,Tu.current=null,function(e,t){if(ei=Kt,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 s=0,u=-1,c=-1,l=0,f=0,h=e,d=null;t:for(;;){for(var p;h!==n||0!==i&&3!==h.nodeType||(u=s+i),h!==o||0!==r&&3!==h.nodeType||(c=s+r),3===h.nodeType&&(s+=h.nodeValue.length),null!==(p=h.firstChild);)d=h,h=p;for(;;){if(h===e)break t;if(d===n&&++l===i&&(u=s),d===o&&++f===r&&(c=s),null!==(p=h.nextSibling))break;d=(h=d).parentNode}h=p}n=-1===u||-1===c?null:{start:u,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(ti={focusedElem:e,selectionRange:n},Kt=!1,Zs=t;null!==Zs;)if(e=(t=Zs).child,0!==(1028&t.subtreeFlags)&&null!==e)e.return=t,Zs=e;else for(;null!==Zs;){t=Zs;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 m=v.memoizedProps,g=v.memoizedState,y=t.stateNode,k=y.getSnapshotBeforeUpdate(t.elementType===t.type?m:ma(t.type,m),g);y.__reactInternalSnapshotBeforeUpdate=k}break;case 3:var b=t.stateNode.containerInfo;1===b.nodeType?b.textContent="":9===b.nodeType&&b.documentElement&&b.removeChild(b.documentElement);break;default:throw Error(a(163))}}catch(w){Sc(t,t.return,w)}if(null!==(e=t.sibling)){e.return=t.return,Zs=e;break}Zs=t.return}v=nu,nu=!1}(e,n),gu(n,e),pr(ti),Kt=!!ei,ti=ei=null,e.current=n,ku(n,e,i),Ye(),Nu=u,kt=s,Iu.transition=o}else e.current=n;if(Qu&&(Qu=!1,$u=e,Yu=i),o=e.pendingLanes,0===o&&(Gu=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),ic(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(qu)throw qu=!1,e=Wu,Wu=null,e;0!==(1&Yu)&&0!==e.tag&&Ec(),o=e.pendingLanes,0!==(1&o)?e===Ju?Xu++:(Xu=0,Ju=e):Xu=0,Bi()}(e,t,n,r)}finally{Iu.transition=i,kt=r}return null}function Ec(){if(null!==$u){var e=bt(Yu),t=Iu.transition,n=kt;try{if(Iu.transition=null,kt=16>e?16:e,null===$u)var r=!1;else{if(e=$u,$u=null,Yu=0,0!==(6&Nu))throw Error(a(331));var i=Nu;for(Nu|=4,Zs=e.current;null!==Zs;){var o=Zs,s=o.child;if(0!==(16&Zs.flags)){var u=o.deletions;if(null!==u){for(var c=0;c<u.length;c++){var l=u[c];for(Zs=l;null!==Zs;){var f=Zs;switch(f.tag){case 0:case 11:case 15:ru(8,f,o)}var h=f.child;if(null!==h)h.return=f,Zs=h;else for(;null!==Zs;){var d=(f=Zs).sibling,p=f.return;if(ou(f),f===l){Zs=null;break}if(null!==d){d.return=p,Zs=d;break}Zs=p}}}var v=o.alternate;if(null!==v){var m=v.child;if(null!==m){v.child=null;do{var g=m.sibling;m.sibling=null,m=g}while(null!==m)}}Zs=o}}if(0!==(2064&o.subtreeFlags)&&null!==s)s.return=o,Zs=s;else e:for(;null!==Zs;){if(0!==(2048&(o=Zs).flags))switch(o.tag){case 0:case 11:case 15:ru(9,o,o.return)}var y=o.sibling;if(null!==y){y.return=o.return,Zs=y;break e}Zs=o.return}}var k=e.current;for(Zs=k;null!==Zs;){var b=(s=Zs).child;if(0!==(2064&s.subtreeFlags)&&null!==b)b.return=s,Zs=b;else e:for(s=k;null!==Zs;){if(0!==(2048&(u=Zs).flags))try{switch(u.tag){case 0:case 11:case 15:iu(9,u)}}catch(x){Sc(u,u.return,x)}if(u===s){Zs=null;break e}var w=u.sibling;if(null!==w){w.return=u.return,Zs=w;break e}Zs=u.return}}if(Nu=i,Bi(),at&&"function"===typeof at.onPostCommitFiberRoot)try{at.onPostCommitFiberRoot(it,e)}catch(x){}r=!0}return r}finally{kt=n,Iu.transition=t}}return!1}function _c(e,t,n){e=Da(e,t=ps(0,t=ls(n,t),1),1),t=tc(),null!==e&&(gt(e,1,t),ic(e,t))}function Sc(e,t,n){if(3===e.tag)_c(e,e,n);else for(;null!==t;){if(3===t.tag){_c(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Gu||!Gu.has(r))){t=Da(t,e=vs(t,e=ls(n,e),1),1),e=tc(),null!==t&&(gt(t,1,e),ic(t,e));break}}t=t.return}}function Cc(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=tc(),e.pingedLanes|=e.suspendedLanes&n,Ou===e&&(Pu&n)===n&&(4===Lu||3===Lu&&(130023424&Pu)===Pu&&500>Xe()-Bu?dc(e,0):Uu|=n),ic(e,t)}function Tc(e,t){0===t&&(0===(1&e.mode)?t=1:(t=lt,0===(130023424&(lt<<=1))&&(lt=4194304)));var n=tc();null!==(e=Na(e,t))&&(gt(e,t,n),ic(e,n))}function Ic(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Tc(e,n)}function Nc(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),Tc(e,n)}function Oc(e,t){return Ge(e,t)}function Rc(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 Pc(e,t,n,r){return new Rc(e,t,n,r)}function Ac(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Dc(e,t){var n=e.alternate;return null===n?((n=Pc(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 Lc(e,t,n,r,i,o){var s=2;if(r=e,"function"===typeof e)Ac(e)&&(s=1);else if("string"===typeof e)s=5;else e:switch(e){case E:return Mc(n.children,i,o,t);case _:s=8,i|=8;break;case S:return(e=Pc(12,n,t,2|i)).elementType=S,e.lanes=o,e;case N:return(e=Pc(13,n,t,i)).elementType=N,e.lanes=o,e;case O:return(e=Pc(19,n,t,i)).elementType=O,e.lanes=o,e;case A:return jc(n,i,o,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case C:s=10;break e;case T:s=9;break e;case I:s=11;break e;case R:s=14;break e;case P:s=16,r=null;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Pc(s,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function Mc(e,t,n,r){return(e=Pc(7,e,r,t)).lanes=n,e}function jc(e,t,n,r){return(e=Pc(22,e,r,t)).elementType=A,e.lanes=n,e.stateNode={isHidden:!1},e}function Fc(e,t,n){return(e=Pc(6,e,null,t)).lanes=n,e}function Uc(e,t,n){return(t=Pc(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Vc(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=mt(0),this.expirationTimes=mt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function zc(e,t,n,r,i,a,o,s,u){return e=new Vc(e,t,n,s,u),1===t?(t=1,!0===a&&(t|=8)):t=0,a=Pc(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ra(a),e}function Bc(e){if(!e)return Ti;e:{if(Be(e=e._reactInternals)!==e||1!==e.tag)throw Error(a(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Pi(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(Pi(n))return Li(e,n,t)}return t}function Hc(e,t,n,r,i,a,o,s,u){return(e=zc(n,r,!0,e,0,a,0,s,u)).context=Bc(null),n=e.current,(a=Aa(r=tc(),i=nc(n))).callback=void 0!==t&&null!==t?t:null,Da(n,a,i),e.current.lanes=i,gt(e,i,r),ic(e,r),e}function Kc(e,t,n,r){var i=t.current,a=tc(),o=nc(i);return n=Bc(n),null===t.context?t.context=n:t.pendingContext=n,(t=Aa(a,o)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Da(i,t,o))&&(rc(e,i,o,a),La(e,i,o)),o}function qc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Wc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Gc(e,t){Wc(e,t),(e=e.alternate)&&Wc(e,t)}_u=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Ni.current)bs=!0;else{if(0===(e.lanes&n)&&0===(128&t.flags))return bs=!1,function(e,t,n){switch(t.tag){case 3:Os(t),da();break;case 5:ao(t);break;case 1:Pi(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(ga,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Ci(so,1&so.current),t.flags|=128,null):0!==(n&t.child.childLanes)?Fs(e,t,n):(Ci(so,1&so.current),null!==(e=qs(e,t,n))?e.sibling:null);Ci(so,1&so.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(128&e.flags)){if(r)return Hs(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ci(so,so.current),r)break;return null;case 22:case 23:return t.lanes=0,Ss(e,t,n)}return qs(e,t,n)}(e,t,n);bs=0!==(131072&e.flags)}else bs=!1,ia&&0!==(1048576&t.flags)&&Zi(t,Wi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ks(e,t),e=t.pendingProps;var i=Ri(t,Ii.current);_a(t,n),i=_o(null,t,r,e,i,n);var o=So();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,Pi(r)?(o=!0,Mi(t)):o=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,Ra(t),i.updater=za,t.stateNode=i,i._reactInternals=t,qa(t,r,e,n),t=Ns(null,t,r,!0,o,n)):(t.tag=0,ia&&o&&ea(t),ws(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ks(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"===typeof e)return Ac(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===I)return 11;if(e===R)return 14}return 2}(r),e=ma(r,e),i){case 0:t=Ts(null,t,r,e,n);break e;case 1:t=Is(null,t,r,e,n);break e;case 11:t=xs(null,t,r,e,n);break e;case 14:t=Es(null,t,r,ma(r.type,e),n);break e}throw Error(a(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,Ts(e,t,r,i=t.elementType===r?i:ma(r,i),n);case 1:return r=t.type,i=t.pendingProps,Is(e,t,r,i=t.elementType===r?i:ma(r,i),n);case 3:e:{if(Os(t),null===e)throw Error(a(387));r=t.pendingProps,i=(o=t.memoizedState).element,Pa(e,t),ja(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,256&t.flags){t=Rs(e,t,r,n,i=ls(Error(a(423)),t));break e}if(r!==i){t=Rs(e,t,r,n,i=ls(Error(a(424)),t));break e}for(ra=ci(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=qs(e,t,n);break e}ws(e,t,r,n)}t=t.child}return t;case 5:return ao(t),null===e&&ca(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,s=i.children,ni(r,i)?s=null:null!==o&&ni(r,o)&&(t.flags|=32),Cs(e,t),ws(e,t,s,n),t.child;case 6:return null===e&&ca(t),null;case 13:return Fs(e,t,n);case 4:return ro(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Ya(t,null,r,n):ws(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,xs(e,t,r,i=t.elementType===r?i:ma(r,i),n);case 7:return ws(e,t,t.pendingProps,n),t.child;case 8:case 12:return ws(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,Ci(ga,r._currentValue),r._currentValue=s,null!==o)if(sr(o.value,s)){if(o.children===i.children&&!Ni.current){t=qs(e,t,n);break e}}else for(null!==(o=t.child)&&(o.return=t);null!==o;){var u=o.dependencies;if(null!==u){s=o.child;for(var c=u.firstContext;null!==c;){if(c.context===r){if(1===o.tag){(c=Aa(-1,n&-n)).tag=2;var l=o.updateQueue;if(null!==l){var f=(l=l.shared).pending;null===f?c.next=c:(c.next=f.next,f.next=c),l.pending=c}}o.lanes|=n,null!==(c=o.alternate)&&(c.lanes|=n),Ea(o.return,n,t),u.lanes|=n;break}c=c.next}}else if(10===o.tag)s=o.type===t.type?null:o.child;else if(18===o.tag){if(null===(s=o.return))throw Error(a(341));s.lanes|=n,null!==(u=s.alternate)&&(u.lanes|=n),Ea(s,n,t),s=o.sibling}else s=o.child;if(null!==s)s.return=o;else for(s=o;null!==s;){if(s===t){s=null;break}if(null!==(o=s.sibling)){o.return=s.return,s=o;break}s=s.return}o=s}ws(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,_a(t,n),r=r(i=Sa(i)),t.flags|=1,ws(e,t,r,n),t.child;case 14:return i=ma(r=t.type,t.pendingProps),Es(e,t,r,i=ma(r.type,i),n);case 15:return _s(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ma(r,i),Ks(e,t),t.tag=1,Pi(r)?(e=!0,Mi(t)):e=!1,_a(t,n),Ha(t,r,i),qa(t,r,i,n),Ns(null,t,r,!0,e,n);case 19:return Hs(e,t,n);case 22:return Ss(e,t,n)}throw Error(a(156,t.tag))};var Qc="function"===typeof reportError?reportError:function(e){console.error(e)};function $c(e){this._internalRoot=e}function Yc(e){this._internalRoot=e}function Xc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Jc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Zc(){}function el(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if("function"===typeof i){var s=i;i=function(){var e=qc(o);s.call(e)}}Kc(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=qc(o);a.call(e)}}var o=Hc(t,r,e,0,null,!1,0,"",Zc);return e._reactRootContainer=o,e[pi]=o.current,Br(8===e.nodeType?e.parentNode:e),fc(),o}for(;i=e.lastChild;)e.removeChild(i);if("function"===typeof r){var s=r;r=function(){var e=qc(u);s.call(e)}}var u=zc(e,0,!1,null,0,!1,0,"",Zc);return e._reactRootContainer=u,e[pi]=u.current,Br(8===e.nodeType?e.parentNode:e),fc((function(){Kc(t,u,n,r)})),u}(n,t,e,i,r);return qc(o)}Yc.prototype.render=$c.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(a(409));Kc(e,t,null,null)},Yc.prototype.unmount=$c.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;fc((function(){Kc(null,e,null,null)})),t[pi]=null}},Yc.prototype.unstable_scheduleHydration=function(e){if(e){var t=_t();e={blockedOn:null,target:e,priority:t};for(var n=0;n<At.length&&0!==t&&t<At[n].priority;n++);At.splice(n,0,e),0===n&&jt(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&&(yt(t,1|n),ic(t,Xe()),0===(6&Nu)&&(Hu=Xe()+500,Bi()))}break;case 13:fc((function(){var t=Na(e,1);if(null!==t){var n=tc();rc(t,e,1,n)}})),Gc(e,1)}},xt=function(e){if(13===e.tag){var t=Na(e,134217728);if(null!==t)rc(t,e,134217728,tc());Gc(e,134217728)}},Et=function(e){if(13===e.tag){var t=nc(e),n=Na(e,t);if(null!==n)rc(n,e,t,tc());Gc(e,t)}},_t=function(){return kt},St=function(e,t){var n=kt;try{return kt=e,t()}finally{kt=n}},xe=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));G(r),J(r,i)}}}break;case"textarea":ae(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Ie=lc,Ne=fc;var tl={usingClientEntryPoint:!1,Events:[ki,bi,wi,Ce,Te,lc]},nl={findFiberByHostInstance:yi,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},rl={bundleType:nl.bundleType,version:nl.version,rendererPackageName:nl.rendererPackageName,rendererConfig:nl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:b.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=qe(e))?null:e.stateNode},findFiberByHostInstance:nl.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 il=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!il.isDisabled&&il.supportsFiber)try{it=il.inject(rl),at=il}catch(le){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tl,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Xc(t))throw Error(a(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:x,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Xc(e))throw Error(a(299));var n=!1,r="",i=Qc;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=zc(e,1,!1,null,0,n,0,r,i),e[pi]=t.current,Br(8===e.nodeType?e.parentNode:e),new $c(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=qe(t))?null:e.stateNode},t.flushSync=function(e){return fc(e)},t.hydrate=function(e,t,n){if(!Jc(t))throw Error(a(200));return el(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Xc(e))throw Error(a(405));var r=null!=n&&n.hydratedSources||null,i=!1,o="",s=Qc;if(null!==n&&void 0!==n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(o=n.identifierPrefix),void 0!==n.onRecoverableError&&(s=n.onRecoverableError)),t=Hc(t,null,e,1,null!=n?n:null,i,0,o,s),e[pi]=t.current,Br(e),r)for(e=0;e<r.length;e++)i=(i=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Yc(t)},t.render=function(e,t,n){if(!Jc(t))throw Error(a(200));return el(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Jc(e))throw Error(a(40));return!!e._reactRootContainer&&(fc((function(){el(null,null,e,!1,(function(){e._reactRootContainer=null,e[pi]=null}))})),!0)},t.unstable_batchedUpdates=lc,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Jc(n))throw Error(a(200));if(null==e||void 0===e._reactInternals)throw Error(a(38));return el(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,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,a={},c=null,l=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(l=t.ref),t)o.call(t,r)&&!u.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:c,ref:l,props:a,_owner:s.current}}t.Fragment=a,t.jsx=c,t.jsxs=c},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"),s=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=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,m={};function g(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||p}function y(){}function k(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||p}g.prototype.isReactComponent={},g.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")},g.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=g.prototype;var b=k.prototype=new y;b.constructor=k,v(b,g.prototype),b.isPureReactComponent=!0;var w=Array.isArray,x=Object.prototype.hasOwnProperty,E={current:null},_={key:!0,ref:!0,__self:!0,__source:!0};function S(e,t,r){var i,a={},o=null,s=null;if(null!=t)for(i in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(o=""+t.key),t)x.call(t,i)&&!_.hasOwnProperty(i)&&(a[i]=t[i]);var u=arguments.length-2;if(1===u)a.children=r;else if(1<u){for(var c=Array(u),l=0;l<u;l++)c[l]=arguments[l+2];a.children=c}if(e&&e.defaultProps)for(i in u=e.defaultProps)void 0===a[i]&&(a[i]=u[i]);return{$$typeof:n,type:e,key:o,ref:s,props:a,_owner:E.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 s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var u=!1;if(null===e)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case n:case r:u=!0}}if(u)return o=o(u=e),e=""===a?"."+I(u,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||u&&u.key===o.key?"":(""+o.key).replace(T,"$&/")+"/")+e)),t.push(o)),1;if(u=0,a=""===a?".":a+":",w(e))for(var c=0;c<e.length;c++){var l=a+I(s=e[c],c);u+=N(s,t,i,l,o)}else if(l=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=d&&e[d]||e["@@iterator"])?e:null}(e),"function"===typeof l)for(e=l.call(e),c=0;!(s=e.next()).done;)u+=N(s=s.value,t,i,l=a+I(s,c++),o);else if("object"===s)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 u}function O(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 R(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 P={current:null},A={transition:null},D={ReactCurrentDispatcher:P,ReactCurrentBatchConfig:A,ReactCurrentOwner:E};t.Children={map:O,forEach:function(e,t,n){O(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return O(e,(function(){t++})),t},toArray:function(e){return O(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=g,t.Fragment=i,t.Profiler=o,t.PureComponent=k,t.StrictMode=a,t.Suspense=l,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=D,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,s=e._owner;if(null!=t){if(void 0!==t.ref&&(o=t.ref,s=E.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(c in t)x.call(t,c)&&!_.hasOwnProperty(c)&&(i[c]=void 0===t[c]&&void 0!==u?u[c]:t[c])}var c=arguments.length-2;if(1===c)i.children=r;else if(1<c){u=Array(c);for(var l=0;l<c;l++)u[l]=arguments[l+2];i.children=u}return{$$typeof:n,type:e.type,key:a,ref:o,props:i,_owner:s}},t.createContext=function(e){return(e={$$typeof:u,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},t.createElement=S,t.createFactory=function(e){var t=S.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=C,t.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:R}},t.memo=function(e,t){return{$$typeof:f,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=A.transition;A.transition={};try{e()}finally{A.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return P.current.useCallback(e,t)},t.useContext=function(e){return P.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return P.current.useDeferredValue(e)},t.useEffect=function(e,t){return P.current.useEffect(e,t)},t.useId=function(){return P.current.useId()},t.useImperativeHandle=function(e,t,n){return P.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return P.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return P.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return P.current.useMemo(e,t)},t.useReducer=function(e,t,n){return P.current.useReducer(e,t,n)},t.useRef=function(e){return P.current.useRef(e)},t.useState=function(e){return P.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return P.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return P.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 s=2*(r+1)-1,u=e[s],c=s+1,l=e[c];if(0>a(u,n))c<i&&0>a(l,u)?(e[r]=l,e[c]=n,r=c):(e[r]=u,e[s]=n,r=s);else{if(!(c<i&&0>a(l,n)))break e;e[r]=l,e[c]=n,r=c}}}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 s=Date,u=s.now();t.unstable_now=function(){return s.now()-u}}var c=[],l=[],f=1,h=null,d=3,p=!1,v=!1,m=!1,g="function"===typeof setTimeout?setTimeout:null,y="function"===typeof clearTimeout?clearTimeout:null,k="undefined"!==typeof setImmediate?setImmediate:null;function b(e){for(var t=r(l);null!==t;){if(null===t.callback)i(l);else{if(!(t.startTime<=e))break;i(l),t.sortIndex=t.expirationTime,n(c,t)}t=r(l)}}function w(e){if(m=!1,b(e),!v)if(null!==r(c))v=!0,A(x);else{var t=r(l);null!==t&&D(w,t.startTime-e)}}function x(e,n){v=!1,m&&(m=!1,y(C),C=-1),p=!0;var a=d;try{for(b(n),h=r(c);null!==h&&(!(h.expirationTime>n)||e&&!N());){var o=h.callback;if("function"===typeof o){h.callback=null,d=h.priorityLevel;var s=o(h.expirationTime<=n);n=t.unstable_now(),"function"===typeof s?h.callback=s:h===r(c)&&i(c),b(n)}else i(c);h=r(c)}if(null!==h)var u=!0;else{var f=r(l);null!==f&&D(w,f.startTime-n),u=!1}return u}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 E,_=!1,S=null,C=-1,T=5,I=-1;function N(){return!(t.unstable_now()-I<T)}function O(){if(null!==S){var e=t.unstable_now();I=e;var n=!0;try{n=S(!0,e)}finally{n?E():(_=!1,S=null)}}else _=!1}if("function"===typeof k)E=function(){k(O)};else if("undefined"!==typeof MessageChannel){var R=new MessageChannel,P=R.port2;R.port1.onmessage=O,E=function(){P.postMessage(null)}}else E=function(){g(O,0)};function A(e){S=e,_||(_=!0,E())}function D(e,n){C=g((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,A(x))},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(c)},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 s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:f++,callback:i,priorityLevel:e,startTime:a,expirationTime:s=a+s,sortIndex:-1},a>o?(e.sortIndex=a,n(l,e),null===r(c)&&e===r(l)&&(m?(y(C),C=-1):m=!0,D(w,a-o))):(e.sortIndex=s,n(c,e),v||p||(v=!0,A(x))),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)},391:function(e){"use strict";var t=function(){};e.exports=t}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}n.m=e,n.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 s=2&i&&r;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).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.f={},n.e=function(e){return Promise.all(Object.keys(n.f).reduce((function(t,r){return n.f[r](e,t),t}),[]))},n.u=function(e){return"static/js/"+e+".fe1675bb.chunk.js"},n.miniCssF=function(e){},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={},t="hello:";n.l=function(r,i,a,o){if(e[r])e[r].push(i);else{var s,u;if(void 0!==a)for(var c=document.getElementsByTagName("script"),l=0;l<c.length;l++){var f=c[l];if(f.getAttribute("src")==r||f.getAttribute("data-webpack")==t+a){s=f;break}}s||(u=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,n.nc&&s.setAttribute("nonce",n.nc),s.setAttribute("data-webpack",t+a),s.src=r),e[r]=[i];var h=function(t,n){s.onerror=s.onload=null,clearTimeout(d);var i=e[r];if(delete e[r],s.parentNode&&s.parentNode.removeChild(s),i&&i.forEach((function(e){return e(n)})),t)return t(n)},d=setTimeout(h.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=h.bind(null,s.onerror),s.onload=h.bind(null,s.onload),u&&document.head.appendChild(s)}}}(),n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="/RaysBookClub/",function(){var e={179:0};n.f.j=function(t,r){var i=n.o(e,t)?e[t]:void 0;if(0!==i)if(i)r.push(i[2]);else{var a=new Promise((function(n,r){i=e[t]=[n,r]}));r.push(i[2]=a);var o=n.p+n.u(t),s=new Error;n.l(o,(function(r){if(n.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var a=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+a+": "+o+")",s.name="ChunkLoadError",s.type=a,s.request=o,i[1](s)}}),"chunk-"+t,t)}};var t=function(t,r){var i,a,o=r[0],s=r[1],u=r[2],c=0;if(o.some((function(t){return 0!==e[t]}))){for(i in s)n.o(s,i)&&(n.m[i]=s[i]);if(u)u(n)}for(t&&t(r);c<o.length;c++)a=o[c],n.o(e,a)&&e[a]&&e[a][0](),e[a]=0},r=self.webpackChunkhello=self.webpackChunkhello||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}(),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(){a=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function f(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,n){return e[t]=n}}function h(e,t,n,r){var i=t&&t.prototype instanceof k?t:k,a=Object.create(i.prototype),s=new P(r||[]);return o(a,"_invoke",{value:I(e,n,s)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=h;var p="suspendedStart",v="suspendedYield",m="executing",g="completed",y={};function k(){}function b(){}function w(){}var x={};f(x,u,(function(){return this}));var E=Object.getPrototypeOf,_=E&&E(E(A([])));_&&_!==n&&r.call(_,u)&&(x=_);var S=w.prototype=k.prototype=Object.create(x);function C(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function T(e,t){function n(a,o,s,u){var c=d(e[a],e,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==i(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,s,u)}),(function(e){n("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return n("throw",e,s,u)}))}u(c.arg)}var a;o(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return a=a?a.then(i,i):i()}})}function I(t,n,r){var i=p;return function(a,o){if(i===m)throw new Error("Generator is already running");if(i===g){if("throw"===a)throw o;return{value:e,done:!0}}for(r.method=a,r.arg=o;;){var s=r.delegate;if(s){var u=N(s,r);if(u){if(u===y)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=m;var c=d(t,n,r);if("normal"===c.type){if(i=r.done?g:v,c.arg===y)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=g,r.method="throw",r.arg=c.arg)}}}function N(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,N(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var a=d(i,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,y;var o=a.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function O(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 R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function A(t){if(t||""===t){var n=t[u];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function n(){for(;++a<t.length;)if(r.call(t,a))return n.value=t[a],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(i(t)+" is not iterable")}return b.prototype=w,o(S,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:b,configurable:!0}),b.displayName=f(w,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,f(e,l,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},C(T.prototype),f(T.prototype,c,(function(){return this})),t.AsyncIterator=T,t.async=function(e,n,r,i,a){void 0===a&&(a=Promise);var o=new T(h(e,n,r,i),a);return t.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},C(S),f(S,l,"Generator"),f(S,u,(function(){return this})),f(S,"toString",(function(){return"[object Generator]"})),t.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}},t.values=A,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(R),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=r.call(o,"catchLoc"),c=r.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.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,y):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),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),R(n),y}},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;R(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:A(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}function o(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){return void n(c)}s.done?t(u):Promise.resolve(u).then(r,i)}function s(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function s(e){o(a,r,i,s,u,"next",e)}function u(e){o(a,r,i,s,u,"throw",e)}s(void 0)}))}}function u(e){if(Array.isArray(e))return e}function c(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 l(e,t){if(e){if("string"===typeof e)return c(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)?c(e,t):void 0}}function f(){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 h(e,t){return u(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,s=[],u=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(e,t)||l(e,t)||f()}var d={apiKey:"AIzaSyAL9_SCfMisIz7-kwV9ZBZzlG7y4lsGKdc",authDomain:"rayyan-h-tafe-nsw.firebaseapp.com",projectId:"rayyan-h-tafe-nsw",storageBucket:"rayyan-h-tafe-nsw.appspot.com",messagingSenderId:"579661195251",appId:"1:579661195251:web:107f8e4fcd7879c1c45486"};function p(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function v(e){return function(e){if(Array.isArray(e))return c(e)}(e)||p(e)||l(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 m(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=l(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,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function g(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 y(e,t,n){return(t=g(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b(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,g(r.key),r)}}function w(e,t,n){return t&&b(e.prototype,t),n&&b(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function x(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function E(e,t){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},E(e,t)}function _(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&&E(e,t)}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}function C(){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 T(e){var t=C();return function(){var n,r=S(e);if(t){var a=S(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return function(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 x(e)}(this,n)}}function I(e,t,n){return I=C()?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&&E(i,n.prototype),i},I.apply(null,arguments)}function N(e){var t="function"===typeof Map?new Map:void 0;return N=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;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,r)}function r(){return I(e,arguments,S(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),E(r,e)},N(e)}var O=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},R={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,s=o?e[i+1]:0,u=i+2<e.length,c=u?e[i+2]:0,l=a>>2,f=(3&a)<<4|s>>4,h=(15&s)<<2|c>>6,d=63&c;u||(d=64,o||(h=64)),r.push(n[l],n[f],n[h],n[d])}return r.join("")},encodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(O(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 s=e[n++],u=e[n++];t[r++]=String.fromCharCode((15&i)<<12|(63&s)<<6|63&u)}}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,s=++i<e.length?n[e.charAt(i)]:64,u=++i<e.length?n[e.charAt(i)]:64;if(++i,null==a||null==o||null==s||null==u)throw new P;var c=a<<2|o>>4;if(r.push(c),64!==s){var l=o<<4&240|s>>2;if(r.push(l),64!==u){var f=s<<6&192|u;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)}}},P=function(e){_(n,e);var t=T(n);function n(){var e;return k(this,n),(e=t.apply(this,arguments)).name="DecodeBase64StringError",e}return w(n)}(N(Error)),A=function(e){return function(e){var t=O(e);return R.encodeByteArray(t,!0)}(e).replace(/\./g,"")},D=function(e){try{return R.decodeString(e,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};var L=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__},M=function(){try{return L()||function(){if("undefined"!==typeof process){var e={NODE_ENV:"production",PUBLIC_URL:"/RaysBookClub",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.__FIREBASE_DEFAULTS__;return e?JSON.parse(e):void 0}}()||function(){if("undefined"!==typeof document){var e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(n){return}var t=e&&D(e[1]);return t&&JSON.parse(t)}}()}catch(e){return void console.info("Unable to get __FIREBASE_DEFAULTS__ due to: ".concat(e))}},j=function(e){var t,n;return null===(n=null===(t=M())||void 0===t?void 0:t.emulatorHosts)||void 0===n?void 0:n[e]},F=function(e){var t=j(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]}},U=function(){var e;return null===(e=M())||void 0===e?void 0:e.config},V=function(e){var t;return null===(t=M())||void 0===t?void 0:t["_".concat(e)]},z=function(){function e(){var t=this;k(this,e),this.reject=function(){},this.resolve=function(){},this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))}return w(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 B(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[A(JSON.stringify({alg:"none",type:"JWT"})),A(JSON.stringify(a)),""].join(".")}function H(){return"undefined"!==typeof navigator&&"string"===typeof navigator.userAgent?navigator.userAgent:""}function K(){try{return"object"===typeof indexedDB}catch(e){return!1}}var q=function(e){_(n,e);var t=T(n);function n(e,r,i){var a;return k(this,n),(a=t.call(this,r)).code=e,a.customData=i,a.name="FirebaseError",Object.setPrototypeOf(x(a),n.prototype),Error.captureStackTrace&&Error.captureStackTrace(x(a),W.prototype.create),a}return w(n)}(N(Error)),W=function(){function e(t,n,r){k(this,e),this.service=t,this.serviceName=n,this.errors=r}return w(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?function(e,t){return e.replace(G,(function(e,n){var r=t[n];return null!=r?String(r):"<".concat(n,"?>")}))}(r,t):"Error",a="".concat(this.serviceName,": ").concat(i," (").concat(n,").");return new q(n,a,t)}}]),e}();var G=/\{\$([^}]+)}/g;function Q(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function $(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 s=e[o],u=t[o];if(Y(s)&&Y(u)){if(!$(s,u))return!1}else if(s!==u)return!1}for(var c=0,l=r;c<l.length;c++){var f=l[c];if(!n.includes(f))return!1}return!0}function Y(e){return null!==e&&"object"===typeof e}function X(e){for(var t=[],n=function(){var e=h(i[r],2),n=e[0],a=e[1];Array.isArray(a)?a.forEach((function(e){t.push(encodeURIComponent(n)+"="+encodeURIComponent(e))})):t.push(encodeURIComponent(n)+"="+encodeURIComponent(a))},r=0,i=Object.entries(e);r<i.length;r++)n();return t.length?"&"+t.join("&"):""}function J(e){var t={};return e.replace(/^\?/,"").split("&").forEach((function(e){if(e){var n=h(e.split("="),2),r=n[0],i=n[1];t[decodeURIComponent(r)]=decodeURIComponent(i)}})),t}function Z(e){var t=e.indexOf("?");if(!t)return"";var n=e.indexOf("#",t);return e.substring(t,n>0?n:void 0)}var ee=function(){function e(t,n){var r=this;k(this,e),this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=n,this.task.then((function(){t(r)})).catch((function(e){r.error(e)}))}return w(e,[{key:"next",value:function(e){this.forEachObserver((function(t){t.next(e)}))}},{key:"error",value:function(e){this.forEachObserver((function(t){t.error(e)})),this.close(e)}},{key:"complete",value:function(){this.forEachObserver((function(e){e.complete()})),this.close()}},{key:"subscribe",value:function(e,t,n){var r,i=this;if(void 0===e&&void 0===t&&void 0===n)throw new Error("Missing Observer.");void 0===(r=function(e,t){if("object"!==typeof e||null===e)return!1;var n,r=m(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i in e&&"function"===typeof e[i])return!0}}catch(a){r.e(a)}finally{r.f()}return!1}(e,["next","error","complete"])?e:{next:e,error:t,complete:n}).next&&(r.next=te),void 0===r.error&&(r.error=te),void 0===r.complete&&(r.complete=te);var a=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then((function(){try{i.finalError?r.error(i.finalError):r.complete()}catch(e){}})),this.observers.push(r),a}},{key:"unsubscribeOne",value:function(e){void 0!==this.observers&&void 0!==this.observers[e]&&(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))}},{key:"forEachObserver",value:function(e){if(!this.finalized)for(var t=0;t<this.observers.length;t++)this.sendOne(t,e)}},{key:"sendOne",value:function(e,t){var n=this;this.task.then((function(){if(void 0!==n.observers&&void 0!==n.observers[e])try{t(n.observers[e])}catch(r){"undefined"!==typeof console&&console.error&&console.error(r)}}))}},{key:"close",value:function(e){var t=this;this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then((function(){t.observers=void 0,t.onNoObservers=void 0})))}}]),e}();function te(){}function ne(e){return e&&e._delegate?e._delegate:e}var re=function(){function e(t,n,r){k(this,e),this.name=t,this.instanceFactory=n,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}return w(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}(),ie="[DEFAULT]",ae=function(){function e(t,n){k(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 w(e,[{key:"get",value:function(e){var t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){var n=new z;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:ie})}catch(u){}var t,n=m(this.instancesDeferred.entries());try{for(n.s();!(t=n.n()).done;){var r=h(t.value,2),i=r[0],a=r[1],o=this.normalizeInstanceIdentifier(i);try{var s=this.getOrInitializeService({instanceIdentifier:o});a.resolve(s)}catch(u){}}}catch(c){n.e(c)}finally{n.f()}}}},{key:"clearInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ie;this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}},{key:"delete",value:function(){var e=s(a().mark((function e(){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Array.from(this.instances.values()),e.next=3,Promise.all([].concat(v(t.filter((function(e){return"INTERNAL"in e})).map((function(e){return e.INTERNAL.delete()}))),v(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]:ie;return this.instances.has(e)}},{key:"getOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ie;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=m(this.instancesDeferred.entries());try{for(o.s();!(i=o.n()).done;){var s=h(i.value,2),u=s[0],c=s[1];r===this.normalizeInstanceIdentifier(u)&&c.resolve(a)}}catch(l){o.e(l)}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=m(n);try{for(i.s();!(r=i.n()).done;){var a=r.value;try{a(e,t)}catch(o){}}}catch(s){i.e(s)}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===ie?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(o){}return a||null}},{key:"normalizeInstanceIdentifier",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ie;return this.component?this.component.multipleInstances?e:ie:e}},{key:"shouldAutoInitialize",value:function(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}]),e}();var oe,se,ue=function(){function e(t){k(this,e),this.name=t,this.providers=new Map}return w(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 ae(e,this);return this.providers.set(e,t),t}},{key:"getProviders",value:function(){return Array.from(this.providers.values())}}]),e}(),ce=[];!function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"}(se||(se={}));var le={debug:se.DEBUG,verbose:se.VERBOSE,info:se.INFO,warn:se.WARN,error:se.ERROR,silent:se.SILENT},fe=se.INFO,he=(y(oe={},se.DEBUG,"log"),y(oe,se.VERBOSE,"log"),y(oe,se.INFO,"info"),y(oe,se.WARN,"warn"),y(oe,se.ERROR,"error"),oe),de=function(e,t){if(!(t<e.logLevel)){var n=(new Date).toISOString(),r=he[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),s=2;s<a;s++)o[s-2]=arguments[s];(i=console)[r].apply(i,["[".concat(n,"] ").concat(e.name,":")].concat(o))}},pe=function(){function e(t){k(this,e),this.name=t,this._logLevel=fe,this._logHandler=de,this._userLogHandler=null,ce.push(this)}return w(e,[{key:"logLevel",get:function(){return this._logLevel},set:function(e){if(!(e in se))throw new TypeError('Invalid value "'.concat(e,'" assigned to `logLevel`'));this._logLevel=e}},{key:"setLogLevel",value:function(e){this._logLevel="string"===typeof e?le[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,se.DEBUG].concat(t)),this._logHandler.apply(this,[this,se.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,se.VERBOSE].concat(t)),this._logHandler.apply(this,[this,se.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,se.INFO].concat(t)),this._logHandler.apply(this,[this,se.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,se.WARN].concat(t)),this._logHandler.apply(this,[this,se.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,se.ERROR].concat(t)),this._logHandler.apply(this,[this,se.ERROR].concat(t))}}]),e}();function ve(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 me(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ve(Object(n),!0).forEach((function(t){y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ve(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ge,ye,ke=function(e,t){return t.some((function(t){return e instanceof t}))};var be=new WeakMap,we=new WeakMap,xe=new WeakMap,Ee=new WeakMap,_e=new WeakMap;var Se={get:function(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return we.get(e);if("objectStoreNames"===t)return e.objectStoreNames||xe.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Ie(e[t])},set:function(e,t,n){return e[t]=n,!0},has:function(e,t){return e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e}};function Ce(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(ye||(ye=[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(Ne(this),n),Ie(be.get(this))}:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ie(e.apply(Ne(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,[Ne(this),t].concat(r));return xe.set(a,t.sort?t.sort():[t]),Ie(a)}}function Te(e){return"function"===typeof e?Ce(e):(e instanceof IDBTransaction&&function(e){if(!we.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)}));we.set(e,t)}}(e),ke(e,ge||(ge=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,Se):e)}function Ie(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(Ie(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&&be.set(t,e)})).catch((function(){})),_e.set(t,e),t}(e);if(Ee.has(e))return Ee.get(e);var t=Te(e);return t!==e&&(Ee.set(e,t),_e.set(t,e)),t}var Ne=function(e){return _e.get(e)};var Oe,Re,Pe=["get","getKey","getAll","getAllKeys","count"],Ae=["put","add","delete","clear"],De=new Map;function Le(e,t){if(e instanceof IDBDatabase&&!(t in e)&&"string"===typeof t){if(De.get(t))return De.get(t);var n=t.replace(/FromIndex$/,""),r=t!==n,i=Ae.includes(n);if(n in(r?IDBIndex:IDBObjectStore).prototype&&(i||Pe.includes(n))){var o=function(){var e=s(a().mark((function e(t){var o,s,u,c,l,f,h=arguments;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(s=this.transaction(t,i?"readwrite":"readonly"),u=s.store,c=h.length,l=new Array(c>1?c-1:0),f=1;f<c;f++)l[f-1]=h[f];return r&&(u=u.index(l.shift())),e.next=6,Promise.all([(o=u)[n].apply(o,l),i&&s.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 De.set(t,o),o}}}Se=function(e){return me(me({},e),{},{get:function(t,n,r){return Le(t,n)||e.get(t,n,r)},has:function(t,n){return!!Le(t,n)||e.has(t,n)}})}(Se);var Me=function(){function e(t){k(this,e),this.container=t}return w(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 je="@firebase/app",Fe="0.9.19",Ue=new pe("@firebase/app"),Ve="[DEFAULT]",ze=(y(Oe={},je,"fire-core"),y(Oe,"@firebase/app-compat","fire-core-compat"),y(Oe,"@firebase/analytics","fire-analytics"),y(Oe,"@firebase/analytics-compat","fire-analytics-compat"),y(Oe,"@firebase/app-check","fire-app-check"),y(Oe,"@firebase/app-check-compat","fire-app-check-compat"),y(Oe,"@firebase/auth","fire-auth"),y(Oe,"@firebase/auth-compat","fire-auth-compat"),y(Oe,"@firebase/database","fire-rtdb"),y(Oe,"@firebase/database-compat","fire-rtdb-compat"),y(Oe,"@firebase/functions","fire-fn"),y(Oe,"@firebase/functions-compat","fire-fn-compat"),y(Oe,"@firebase/installations","fire-iid"),y(Oe,"@firebase/installations-compat","fire-iid-compat"),y(Oe,"@firebase/messaging","fire-fcm"),y(Oe,"@firebase/messaging-compat","fire-fcm-compat"),y(Oe,"@firebase/performance","fire-perf"),y(Oe,"@firebase/performance-compat","fire-perf-compat"),y(Oe,"@firebase/remote-config","fire-rc"),y(Oe,"@firebase/remote-config-compat","fire-rc-compat"),y(Oe,"@firebase/storage","fire-gcs"),y(Oe,"@firebase/storage-compat","fire-gcs-compat"),y(Oe,"@firebase/firestore","fire-fst"),y(Oe,"@firebase/firestore-compat","fire-fst-compat"),y(Oe,"fire-js","fire-js"),y(Oe,"firebase","fire-js-all"),Oe),Be=new Map,He=new Map;function Ke(e,t){try{e.container.addComponent(t)}catch(n){Ue.debug("Component ".concat(t.name," failed to register with FirebaseApp ").concat(e.name),n)}}function qe(e){var t=e.name;if(He.has(t))return Ue.debug("There were multiple attempts to register component ".concat(t,".")),!1;He.set(t,e);var n,r=m(Be.values());try{for(r.s();!(n=r.n()).done;){Ke(n.value,e)}}catch(i){r.e(i)}finally{r.f()}return!0}function We(e,t){var n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}var Ge=(y(Re={},"no-app","No Firebase App '{$appName}' has been created - call initializeApp() first"),y(Re,"bad-app-name","Illegal App name: '{$appName}"),y(Re,"duplicate-app","Firebase App named '{$appName}' already exists with different options or config"),y(Re,"app-deleted","Firebase App named '{$appName}' already deleted"),y(Re,"no-options","Need to provide options, when not being deployed to hosting via source."),y(Re,"invalid-app-argument","firebase.{$appName}() takes either no argument or a Firebase App instance."),y(Re,"invalid-log-argument","First argument to `onLog` must be null or a function."),y(Re,"idb-open","Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}."),y(Re,"idb-get","Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}."),y(Re,"idb-set","Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}."),y(Re,"idb-delete","Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."),Re),Qe=new W("app","Firebase",Ge),$e=function(){function e(t,n,r){var i=this;k(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 re("app",(function(){return i}),"PUBLIC"))}return w(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}(),Ye="10.4.0";function Xe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e;"object"!==typeof t&&(t={name:t});var r=Object.assign({name:Ve,automaticDataCollectionEnabled:!1},t),i=r.name;if("string"!==typeof i||!i)throw Qe.create("bad-app-name",{appName:String(i)});if(n||(n=U()),!n)throw Qe.create("no-options");var a=Be.get(i);if(a){if($(n,a.options)&&$(r,a.config))return a;throw Qe.create("duplicate-app",{appName:i})}var o,s=new ue(i),u=m(He.values());try{for(u.s();!(o=u.n()).done;){var c=o.value;s.addComponent(c)}}catch(f){u.e(f)}finally{u.f()}var l=new $e(n,r,s);return Be.set(i,l),l}function Je(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ve,t=Be.get(e);if(!t&&e===Ve&&U())return Xe();if(!t)throw Qe.create("no-app",{appName:e});return t}function Ze(e,t,n){var r,i=null!==(r=ze[e])&&void 0!==r?r:e;n&&(i+="-".concat(n));var a=i.match(/\s|\//),o=t.match(/\s|\//);if(a||o){var s=['Unable to register library "'.concat(i,'" with version "').concat(t,'":')];return a&&s.push('library name "'.concat(i,'" contains illegal characters (whitespace or "/")')),a&&o&&s.push("and"),o&&s.push('version name "'.concat(t,'" contains illegal characters (whitespace or "/")')),void Ue.warn(s.join(" "))}qe(new re("".concat(i,"-version"),(function(){return{library:i,version:t}}),"VERSION"))}var et="firebase-heartbeat-database",tt=1,nt="firebase-heartbeat-store",rt=null;function it(){return rt||(rt=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,s=indexedDB.open(e,t),u=Ie(s);return i&&s.addEventListener("upgradeneeded",(function(e){i(Ie(s.result),e.oldVersion,e.newVersion,Ie(s.transaction),e)})),r&&s.addEventListener("blocked",(function(e){return r(e.oldVersion,e.newVersion,e)})),u.then((function(e){o&&e.addEventListener("close",(function(){return o()})),a&&e.addEventListener("versionchange",(function(e){return a(e.oldVersion,e.newVersion,e)}))})).catch((function(){})),u}(et,tt,{upgrade:function(e,t){if(0===t)e.createObjectStore(nt)}}).catch((function(e){throw Qe.create("idb-open",{originalErrorMessage:e.message})}))),rt}function at(e){return ot.apply(this,arguments)}function ot(){return ot=s(a().mark((function e(t){var n,r,i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,it();case 3:return n=e.sent,e.next=6,n.transaction(nt).objectStore(nt).get(ct(t));case 6:return r=e.sent,e.abrupt("return",r);case 10:e.prev=10,e.t0=e.catch(0),e.t0 instanceof q?Ue.warn(e.t0.message):(i=Qe.create("idb-get",{originalErrorMessage:null===e.t0||void 0===e.t0?void 0:e.t0.message}),Ue.warn(i.message));case 13:case"end":return e.stop()}}),e,null,[[0,10]])}))),ot.apply(this,arguments)}function st(e,t){return ut.apply(this,arguments)}function ut(){return ut=s(a().mark((function e(t,n){var r,i,o,s;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,it();case 3:return r=e.sent,i=r.transaction(nt,"readwrite"),o=i.objectStore(nt),e.next=8,o.put(n,ct(t));case 8:return e.next=10,i.done;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(0),e.t0 instanceof q?Ue.warn(e.t0.message):(s=Qe.create("idb-set",{originalErrorMessage:null===e.t0||void 0===e.t0?void 0:e.t0.message}),Ue.warn(s.message));case 15:case"end":return e.stop()}}),e,null,[[0,12]])}))),ut.apply(this,arguments)}function ct(e){return"".concat(e.name,"!").concat(e.options.appId)}var lt=function(){function e(t){var n=this;k(this,e),this.container=t,this._heartbeatsCache=null;var r=this.container.getProvider("app").getImmediate();this._storage=new pt(r),this._heartbeatsCachePromise=this._storage.read().then((function(e){return n._heartbeatsCache=e,e}))}return w(e,[{key:"triggerHeartbeat",value:function(){var e=s(a().mark((function e(){var t,n,r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.container.getProvider("platform-logger").getImmediate(),n=t.getPlatformInfoString(),r=ft(),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=s(a().mark((function e(){var t,n,r,i,o;return a().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=ft(),n=ht(this._heartbeatsCache.heartbeats),r=n.heartbeatsToSend,i=n.unsentEntries,o=A(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",o);case 18:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}();function ft(){return(new Date).toISOString().substring(0,10)}function ht(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1024,r=[],i=e.slice(),a=m(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),vt(r)>n)return a.dates.pop(),0}else if(r.push({agent:e.agent,dates:[e.date]}),vt(r)>n)return r.pop(),0;i=i.slice(1)};for(a.s();!(t=a.n()).done&&0!==o(););}catch(s){a.e(s)}finally{a.f()}return{heartbeatsToSend:r,unsentEntries:i}}var dt,pt=function(){function e(t){k(this,e),this.app=t,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}return w(e,[{key:"runIndexedDBEnvironmentCheck",value:function(){var e=s(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(K()){e.next=4;break}return e.abrupt("return",!1);case 4:return e.abrupt("return",new Promise((function(e,t){try{var n=!0,r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=function(){i.result.close(),n||self.indexedDB.deleteDatabase(r),e(!0)},i.onupgradeneeded=function(){n=!1},i.onerror=function(){var e;t((null===(e=i.error)||void 0===e?void 0:e.message)||"")}}catch(a){t(a)}})).then((function(){return!0})).catch((function(){return!1})));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"read",value:function(){var e=s(a().mark((function e(){var t;return a().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,at(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=s(a().mark((function e(t){var n,r;return a().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",st(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=s(a().mark((function e(t){var n,r;return a().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",st(this.app,{lastSentHeartbeatDate:null!==(n=t.lastSentHeartbeatDate)&&void 0!==n?n:r.lastSentHeartbeatDate,heartbeats:[].concat(v(r.heartbeats),v(t.heartbeats))}));case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}();function vt(e){return A(JSON.stringify({version:2,heartbeats:e})).length}dt="",qe(new re("platform-logger",(function(e){return new Me(e)}),"PRIVATE")),qe(new re("heartbeat",(function(e){return new lt(e)}),"PRIVATE")),Ze(je,Fe,dt),Ze(je,Fe,"esm2017"),Ze("fire-js","");var mt;function gt(){return gt=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},gt.apply(this,arguments)}Ze("firebase","10.4.0","app"),function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(mt||(mt={}));var yt,kt="popstate";function bt(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}function wt(e,t){if(!e){"undefined"!==typeof console&&console.warn(t);try{throw new Error(t)}catch(n){}}}function xt(e,t){return{usr:e.state,key:e.key,idx:t}}function Et(e,t,n,r){return void 0===n&&(n=null),gt({pathname:"string"===typeof e?e:e.pathname,search:"",hash:""},"string"===typeof t?St(t):t,{state:n,key:t&&t.key||r||Math.random().toString(36).substr(2,8)})}function _t(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 St(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 Ct(e,t,n,r){void 0===r&&(r={});var i=r,a=i.window,o=void 0===a?document.defaultView:a,s=i.v5Compat,u=void 0!==s&&s,c=o.history,l=mt.Pop,f=null,h=d();function d(){return(c.state||{idx:null}).idx}function p(){l=mt.Pop;var e=d(),t=null==e?null:e-h;h=e,f&&f({action:l,location:m.location,delta:t})}function v(e){var t="null"!==o.location.origin?o.location.origin:o.location.href,n="string"===typeof e?e:_t(e);return bt(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==h&&(h=0,c.replaceState(gt({},c.state,{idx:h}),""));var m={get action(){return l},get location(){return e(o,c)},listen:function(e){if(f)throw new Error("A history only accepts one active listener");return o.addEventListener(kt,p),f=e,function(){o.removeEventListener(kt,p),f=null}},createHref:function(e){return t(o,e)},createURL:v,encodeLocation:function(e){var t=v(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){l=mt.Push;var r=Et(m.location,e,t);n&&n(r,e);var i=xt(r,h=d()+1),a=m.createHref(r);try{c.pushState(i,"",a)}catch(s){if(s instanceof DOMException&&"DataCloneError"===s.name)throw s;o.location.assign(a)}u&&f&&f({action:l,location:m.location,delta:1})},replace:function(e,t){l=mt.Replace;var r=Et(m.location,e,t);n&&n(r,e);var i=xt(r,h=d()),a=m.createHref(r);c.replaceState(i,"",a),u&&f&&f({action:l,location:m.location,delta:0})},go:function(e){return c.go(e)}};return m}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(yt||(yt={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function Tt(e,t,n){void 0===n&&(n="/");var r=zt(("string"===typeof t?St(t):t).pathname||"/",n);if(null==r)return null;var i=It(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=Ft(i[o],Vt(r));return a}function It(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("/")&&(bt(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 s=qt([r,o.relativePath]),u=n.concat(o);e.children&&e.children.length>0&&(bt(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+s+'".'),It(e.children,t,u,s)),(null!=e.path||e.index)&&t.push({path:s,score:jt(s,e.index),routesMeta:u})};return e.forEach((function(e,t){var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?")){var r,a=m(Nt(e.path));try{for(a.s();!(r=a.n()).done;){var o=r.value;i(e,t,o)}}catch(s){a.e(s)}finally{a.f()}}else i(e,t)})),t}function Nt(e){var t=e.split("/");if(0===t.length)return[];var n,r=u(n=t)||p(n)||l(n)||f(),i=r[0],a=r.slice(1),o=i.endsWith("?"),s=i.replace(/\?$/,"");if(0===a.length)return o?[s,""]:[s];var c=Nt(a.join("/")),h=[];return h.push.apply(h,v(c.map((function(e){return""===e?s:[s,e].join("/")})))),o&&h.push.apply(h,v(c)),h.map((function(t){return e.startsWith("/")&&""===t?"/":t}))}var Ot=/^:\w+$/,Rt=3,Pt=2,At=1,Dt=10,Lt=-2,Mt=function(e){return"*"===e};function jt(e,t){var n=e.split("/"),r=n.length;return n.some(Mt)&&(r+=Lt),t&&(r+=Pt),n.filter((function(e){return!Mt(e)})).reduce((function(e,t){return e+(Ot.test(t)?Rt:""===t?At:Dt)}),r)}function Ft(e,t){for(var n=e.routesMeta,r={},i="/",a=[],o=0;o<n.length;++o){var s=n[o],u=o===n.length-1,c="/"===i?t:t.slice(i.length)||"/",l=Ut({path:s.relativePath,caseSensitive:s.caseSensitive,end:u},c);if(!l)return null;Object.assign(r,l.params);var f=s.route;a.push({params:r,pathname:qt([i,l.pathname]),pathnameBase:Wt(qt([i,l.pathnameBase])),route:f}),"/"!==l.pathnameBase&&(i=qt([i,l.pathnameBase]))}return a}function Ut(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);wt("*"===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=h(n,2),i=r[0],a=r[1],o=t.match(i);if(!o)return null;var s=o[0],u=s.replace(/(.)\/+$/,"$1"),c=o.slice(1);return{params:a.reduce((function(e,t,n){if("*"===t){var r=c[n]||"";u=s.slice(0,s.length-r.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(n){return wt(!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}}(c[n]||"",t),e}),{}),pathname:s,pathnameBase:u,pattern:e}}function Vt(e){try{return decodeURI(e)}catch(t){return wt(!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 zt(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 Bt(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function Ht(e){return e.filter((function(e,t){return 0===t||e.route.path&&e.route.path.length>0}))}function Kt(e,t,n,r){var i;void 0===r&&(r=!1),"string"===typeof e?i=St(e):(bt(!(i=gt({},e)).pathname||!i.pathname.includes("?"),Bt("?","pathname","search",i)),bt(!i.pathname||!i.pathname.includes("#"),Bt("#","pathname","hash",i)),bt(!i.search||!i.search.includes("#"),Bt("#","search","hash",i)));var a,o=""===e||""===i.pathname,s=o?"/":i.pathname;if(r||null==s)a=n;else{var u=t.length-1;if(s.startsWith("..")){for(var c=s.split("/");".."===c[0];)c.shift(),u-=1;i.pathname=c.join("/")}a=u>=0?t[u]:"/"}var l=function(e,t){void 0===t&&(t="/");var n="string"===typeof e?St(e):e,r=n.pathname,i=n.search,a=void 0===i?"":i,o=n.hash,s=void 0===o?"":o,u=r?r.startsWith("/")?r:function(e,t){var n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((function(e){".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(r,t):t;return{pathname:u,search:Gt(a),hash:Qt(s)}}(i,a),f=s&&"/"!==s&&s.endsWith("/"),h=(o||"."===s)&&n.endsWith("/");return l.pathname.endsWith("/")||!f&&!h||(l.pathname+="/"),l}var qt=function(e){return e.join("/").replace(/\/\/+/g,"/")},Wt=function(e){return e.replace(/\/+$/,"").replace(/^\/*/,"/")},Gt=function(e){return e&&"?"!==e?e.startsWith("?")?e:"?"+e:""},Qt=function(e){return e&&"#"!==e?e.startsWith("#")?e:"#"+e:""},$t=function(e){_(n,e);var t=T(n);function n(){return k(this,n),t.apply(this,arguments)}return w(n)}(N(Error));function Yt(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}var Xt=["post","put","patch","delete"],Jt=(new Set(Xt),["get"].concat(Xt));new Set(Jt),new Set([301,302,303,307,308]),new Set([307,308]);Symbol("deferred");function Zt(){return Zt=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},Zt.apply(this,arguments)}var en=e.createContext(null);var tn=e.createContext(null);var nn=e.createContext(null);var rn=e.createContext(null);var an=e.createContext(null);var on=e.createContext({outlet:null,matches:[],isDataRoute:!1});var sn=e.createContext(null);function un(){return null!=e.useContext(an)}function cn(){return un()||bt(!1),e.useContext(an).location}function ln(t){e.useContext(rn).static||e.useLayoutEffect(t)}function fn(){return e.useContext(on).isDataRoute?function(){var t=bn(yn.UseNavigateStable).router,n=xn(kn.UseNavigateStable),r=e.useRef(!1);ln((function(){r.current=!0}));var i=e.useCallback((function(e,i){void 0===i&&(i={}),r.current&&("number"===typeof e?t.navigate(e):t.navigate(e,Zt({fromRouteId:n},i)))}),[t,n]);return i}():function(){un()||bt(!1);var t=e.useContext(en),n=e.useContext(rn),r=n.basename,i=n.navigator,a=e.useContext(on).matches,o=cn().pathname,s=JSON.stringify(Ht(a).map((function(e){return e.pathnameBase}))),u=e.useRef(!1);ln((function(){u.current=!0}));var c=e.useCallback((function(e,n){if(void 0===n&&(n={}),u.current)if("number"!==typeof e){var a=Kt(e,JSON.parse(s),o,"path"===n.relative);null==t&&"/"!==r&&(a.pathname="/"===a.pathname?r:qt([r,a.pathname])),(n.replace?i.replace:i.push)(a,n.state,n)}else i.go(e)}),[r,i,s,o,t]);return c}()}function hn(t,n,r){un()||bt(!1);var i,a=e.useContext(rn).navigator,o=e.useContext(on).matches,s=o[o.length-1],u=s?s.params:{},c=(s&&s.pathname,s?s.pathnameBase:"/"),l=(s&&s.route,cn());if(n){var f,h="string"===typeof n?St(n):n;"/"===c||(null==(f=h.pathname)?void 0:f.startsWith(c))||bt(!1),i=h}else i=l;var d=i.pathname||"/",p=Tt(t,{pathname:"/"===c?d:d.slice(c.length)||"/"});var v=gn(p&&p.map((function(e){return Object.assign({},e,{params:Object.assign({},u,e.params),pathname:qt([c,a.encodeLocation?a.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?c:qt([c,a.encodeLocation?a.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})})),o,r);return n&&v?e.createElement(an.Provider,{value:{location:Zt({pathname:"/",search:"",hash:"",state:null,key:"default"},i),navigationType:mt.Pop}},v):v}function dn(){var t=function(){var t,n=e.useContext(sn),r=wn(kn.UseRouteError),i=xn(kn.UseRouteError);if(n)return n;return null==(t=r.errors)?void 0:t[i]}(),n=Yt(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};return e.createElement(e.Fragment,null,e.createElement("h2",null,"Unexpected Application Error!"),e.createElement("h3",{style:{fontStyle:"italic"}},n),r?e.createElement("pre",{style:a},r):null,null)}var pn=e.createElement(dn,null),vn=function(t){_(r,t);var n=T(r);function r(e){var t;return k(this,r),(t=n.call(this,e)).state={location:e.location,revalidation:e.revalidation,error:e.error},t}return w(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(on.Provider,{value:this.props.routeContext},e.createElement(sn.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||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error||t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}}]),r}(e.Component);function mn(t){var n=t.routeContext,r=t.match,i=t.children,a=e.useContext(en);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),e.createElement(on.Provider,{value:n},i)}function gn(t,n,r){var i;if(void 0===n&&(n=[]),void 0===r&&(r=null),null==t){var a;if(null==(a=r)||!a.errors)return null;t=r.matches}var o=t,s=null==(i=r)?void 0:i.errors;if(null!=s){var u=o.findIndex((function(e){return e.route.id&&(null==s?void 0:s[e.route.id])}));u>=0||bt(!1),o=o.slice(0,Math.min(o.length,u+1))}return o.reduceRight((function(t,i,a){var u=i.route.id?null==s?void 0:s[i.route.id]:null,c=null;r&&(c=i.route.errorElement||pn);var l=n.concat(o.slice(0,a+1)),f=function(){var n;return n=u?c:i.route.Component?e.createElement(i.route.Component,null):i.route.element?i.route.element:t,e.createElement(mn,{match:i,routeContext:{outlet:t,matches:l,isDataRoute:null!=r},children:n})};return r&&(i.route.ErrorBoundary||i.route.errorElement||0===a)?e.createElement(vn,{location:r.location,revalidation:r.revalidation,component:c,error:u,children:f(),routeContext:{outlet:null,matches:l,isDataRoute:!0}}):f()}),null)}var yn=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(yn||{}),kn=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(kn||{});function bn(t){var n=e.useContext(en);return n||bt(!1),n}function wn(t){var n=e.useContext(tn);return n||bt(!1),n}function xn(t){var n=function(t){var n=e.useContext(on);return n||bt(!1),n}(),r=n.matches[n.matches.length-1];return r.route.id||bt(!1),r.route.id}t.startTransition;function En(e){bt(!1)}function _n(t){var n=t.basename,r=void 0===n?"/":n,i=t.children,a=void 0===i?null:i,o=t.location,s=t.navigationType,u=void 0===s?mt.Pop:s,c=t.navigator,l=t.static,f=void 0!==l&&l;un()&&bt(!1);var h=r.replace(/^\/*/,"/"),d=e.useMemo((function(){return{basename:h,navigator:c,static:f}}),[h,c,f]);"string"===typeof o&&(o=St(o));var p=o,v=p.pathname,m=void 0===v?"/":v,g=p.search,y=void 0===g?"":g,k=p.hash,b=void 0===k?"":k,w=p.state,x=void 0===w?null:w,E=p.key,_=void 0===E?"default":E,S=e.useMemo((function(){var e=zt(m,h);return null==e?null:{location:{pathname:e,search:y,hash:b,state:x,key:_},navigationType:u}}),[h,m,y,b,x,_,u]);return null==S?null:e.createElement(rn.Provider,{value:d},e.createElement(an.Provider,{children:a,value:S}))}function Sn(e){var t=e.children,n=e.location;return hn(In(t),n)}var Cn=function(e){return e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error",e}(Cn||{}),Tn=new Promise((function(){}));e.Component;function In(t,n){void 0===n&&(n=[]);var r=[];return e.Children.forEach(t,(function(t,i){if(e.isValidElement(t)){var a=[].concat(v(n),[i]);if(t.type!==e.Fragment){t.type!==En&&bt(!1),t.props.index&&t.props.children&&bt(!1);var o={id:t.props.id||a.join("-"),caseSensitive:t.props.caseSensitive,element:t.props.element,Component:t.props.Component,index:t.props.index,path:t.props.path,loader:t.props.loader,action:t.props.action,errorElement:t.props.errorElement,ErrorBoundary:t.props.ErrorBoundary,hasErrorBoundary:null!=t.props.ErrorBoundary||null!=t.props.errorElement,shouldRevalidate:t.props.shouldRevalidate,handle:t.props.handle,lazy:t.props.lazy};t.props.children&&(o.children=In(t.props.children,a)),r.push(o)}else r.push.apply(r,In(t.props.children,a))}})),r}function Nn(){return Nn="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=S(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Nn.apply(this,arguments)}function On(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}Object.create;Object.create;"function"===typeof SuppressedError&&SuppressedError;var Rn;function Pn(e){return void 0!==e&&void 0!==e.enterprise}var An=w((function e(t){if(k(this,e),this.siteKey="",this.emailPasswordEnabled=!1,void 0===t.recaptchaKey)throw new Error("recaptchaKey undefined");this.siteKey=t.recaptchaKey.split("/")[3],this.emailPasswordEnabled=t.recaptchaEnforcementState.some((function(e){return"EMAIL_PASSWORD_PROVIDER"===e.provider&&"OFF"!==e.enforcementState}))}));function Dn(){return y({},"dependent-sdk-initialized-before-auth","Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK.")}var Ln=Dn,Mn=new W("auth","Firebase",Dn()),jn=new pe("@firebase/auth");function Fn(e){if(jn.logLevel<=se.WARN){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];jn.warn.apply(jn,["Auth (".concat(Ye,"): ").concat(e)].concat(n))}}function Un(e){if(jn.logLevel<=se.ERROR){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];jn.error.apply(jn,["Auth (".concat(Ye,"): ").concat(e)].concat(n))}}function Vn(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Hn.apply(void 0,[e].concat(n))}function zn(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Hn.apply(void 0,[e].concat(n))}function Bn(e,t,n){var r=Object.assign(Object.assign({},Ln()),y({},t,n));return new W("auth","Firebase",r).create(t,{appName:e.name})}function Hn(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if("string"!==typeof e){var i,a=n[0],o=v(n.slice(1));return o[0]&&(o[0].appName=e.name),(i=e._errorFactory).create.apply(i,[a].concat(v(o)))}return Mn.create.apply(Mn,[e].concat(n))}function Kn(e,t){if(!e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];throw Hn.apply(void 0,[t].concat(r))}}function qn(e){var t="INTERNAL ASSERTION FAILED: "+e;throw Un(t),new Error(t)}function Wn(e,t){e||qn(t)}function Gn(){var e;return"undefined"!==typeof self&&(null===(e=self.location)||void 0===e?void 0:e.href)||""}function Qn(){return"http:"===$n()||"https:"===$n()}function $n(){var e;return"undefined"!==typeof self&&(null===(e=self.location)||void 0===e?void 0:e.protocol)||null}function Yn(){return!("undefined"!==typeof navigator&&navigator&&"onLine"in navigator&&"boolean"===typeof navigator.onLine&&(Qn()||function(){var e="object"===typeof chrome?chrome.runtime:"object"===typeof browser?browser.runtime:void 0;return"object"===typeof e&&void 0!==e.id}()||"connection"in navigator))||navigator.onLine}var Xn=function(){function e(t,n){k(this,e),this.shortDelay=t,this.longDelay=n,Wn(n>t,"Short delay should be less than long delay!"),this.isMobile="undefined"!==typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(H())||"object"===typeof navigator&&"ReactNative"===navigator.product}return w(e,[{key:"get",value:function(){return Yn()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}]),e}();function Jn(e,t){Wn(e.emulator,"Emulator should always be set here");var n=e.emulator.url;return t?"".concat(n).concat(t.startsWith("/")?t.slice(1):t):n}var Zn=function(){function e(){k(this,e)}return w(e,null,[{key:"initialize",value:function(e,t,n){this.fetchImpl=e,t&&(this.headersImpl=t),n&&(this.responseImpl=n)}},{key:"fetch",value:function(){return this.fetchImpl?this.fetchImpl:"undefined"!==typeof self&&"fetch"in self?self.fetch:void qn("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}},{key:"headers",value:function(){return this.headersImpl?this.headersImpl:"undefined"!==typeof self&&"Headers"in self?self.Headers:void qn("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}},{key:"response",value:function(){return this.responseImpl?this.responseImpl:"undefined"!==typeof self&&"Response"in self?self.Response:void qn("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}]),e}(),er=(y(Rn={},"CREDENTIAL_MISMATCH","custom-token-mismatch"),y(Rn,"MISSING_CUSTOM_TOKEN","internal-error"),y(Rn,"INVALID_IDENTIFIER","invalid-email"),y(Rn,"MISSING_CONTINUE_URI","internal-error"),y(Rn,"INVALID_PASSWORD","wrong-password"),y(Rn,"MISSING_PASSWORD","missing-password"),y(Rn,"EMAIL_EXISTS","email-already-in-use"),y(Rn,"PASSWORD_LOGIN_DISABLED","operation-not-allowed"),y(Rn,"INVALID_IDP_RESPONSE","invalid-credential"),y(Rn,"INVALID_PENDING_TOKEN","invalid-credential"),y(Rn,"FEDERATED_USER_ID_ALREADY_LINKED","credential-already-in-use"),y(Rn,"MISSING_REQ_TYPE","internal-error"),y(Rn,"EMAIL_NOT_FOUND","user-not-found"),y(Rn,"RESET_PASSWORD_EXCEED_LIMIT","too-many-requests"),y(Rn,"EXPIRED_OOB_CODE","expired-action-code"),y(Rn,"INVALID_OOB_CODE","invalid-action-code"),y(Rn,"MISSING_OOB_CODE","internal-error"),y(Rn,"CREDENTIAL_TOO_OLD_LOGIN_AGAIN","requires-recent-login"),y(Rn,"INVALID_ID_TOKEN","invalid-user-token"),y(Rn,"TOKEN_EXPIRED","user-token-expired"),y(Rn,"USER_NOT_FOUND","user-token-expired"),y(Rn,"TOO_MANY_ATTEMPTS_TRY_LATER","too-many-requests"),y(Rn,"PASSWORD_DOES_NOT_MEET_REQUIREMENTS","password-does-not-meet-requirements"),y(Rn,"INVALID_CODE","invalid-verification-code"),y(Rn,"INVALID_SESSION_INFO","invalid-verification-id"),y(Rn,"INVALID_TEMPORARY_PROOF","invalid-credential"),y(Rn,"MISSING_SESSION_INFO","missing-verification-id"),y(Rn,"SESSION_EXPIRED","code-expired"),y(Rn,"MISSING_ANDROID_PACKAGE_NAME","missing-android-pkg-name"),y(Rn,"UNAUTHORIZED_DOMAIN","unauthorized-continue-uri"),y(Rn,"INVALID_OAUTH_CLIENT_ID","invalid-oauth-client-id"),y(Rn,"ADMIN_ONLY_OPERATION","admin-restricted-operation"),y(Rn,"INVALID_MFA_PENDING_CREDENTIAL","invalid-multi-factor-session"),y(Rn,"MFA_ENROLLMENT_NOT_FOUND","multi-factor-info-not-found"),y(Rn,"MISSING_MFA_ENROLLMENT_ID","missing-multi-factor-info"),y(Rn,"MISSING_MFA_PENDING_CREDENTIAL","missing-multi-factor-session"),y(Rn,"SECOND_FACTOR_EXISTS","second-factor-already-in-use"),y(Rn,"SECOND_FACTOR_LIMIT_EXCEEDED","maximum-second-factor-count-exceeded"),y(Rn,"BLOCKING_FUNCTION_ERROR_RESPONSE","internal-error"),y(Rn,"RECAPTCHA_NOT_ENABLED","recaptcha-not-enabled"),y(Rn,"MISSING_RECAPTCHA_TOKEN","missing-recaptcha-token"),y(Rn,"INVALID_RECAPTCHA_TOKEN","invalid-recaptcha-token"),y(Rn,"INVALID_RECAPTCHA_ACTION","invalid-recaptcha-action"),y(Rn,"MISSING_CLIENT_TYPE","missing-client-type"),y(Rn,"MISSING_RECAPTCHA_VERSION","missing-recaptcha-version"),y(Rn,"INVALID_RECAPTCHA_VERSION","invalid-recaptcha-version"),y(Rn,"INVALID_REQ_TYPE","invalid-req-type"),Rn),tr=new Xn(3e4,6e4);function nr(e,t){return e.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:e.tenantId}):t}function rr(e,t,n,r){return ir.apply(this,arguments)}function ir(){return ir=s(a().mark((function e(t,n,r,i){var o,u=arguments;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=u.length>4&&void 0!==u[4]?u[4]:{},e.abrupt("return",ar(t,o,s(a().mark((function e(){var o,s,u,c;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o={},s={},i&&("GET"===n?s=i:o={body:JSON.stringify(i)}),u=X(Object.assign({key:t.config.apiKey},s)).slice(1),e.next=6,t._getAdditionalHeaders();case 6:return(c=e.sent)["Content-Type"]="application/json",t.languageCode&&(c["X-Firebase-Locale"]=t.languageCode),e.abrupt("return",Zn.fetch()(cr(t,t.config.apiHost,r,u),Object.assign({method:n,headers:c,referrerPolicy:"no-referrer"},o)));case 10:case"end":return e.stop()}}),e)})))));case 2:case"end":return e.stop()}}),e)}))),ir.apply(this,arguments)}function ar(e,t,n){return or.apply(this,arguments)}function or(){return or=s(a().mark((function e(t,n,r){var i,o,s,u,c,l,f,d,p,v;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t._canInitEmulator=!1,i=Object.assign(Object.assign({},er),n),e.prev=2,o=new lr(t),e.next=6,Promise.race([r(),o.promise]);case 6:return s=e.sent,o.clearNetworkTimeout(),e.next=10,s.json();case 10:if(!("needConfirmation"in(u=e.sent))){e.next=13;break}throw fr(t,"account-exists-with-different-credential",u);case 13:if(!s.ok||"errorMessage"in u){e.next=17;break}return e.abrupt("return",u);case 17:if(c=s.ok?u.errorMessage:u.error.message,l=c.split(" : "),f=h(l,2),d=f[0],p=f[1],"FEDERATED_USER_ID_ALREADY_LINKED"!==d){e.next=23;break}throw fr(t,"credential-already-in-use",u);case 23:if("EMAIL_EXISTS"!==d){e.next=27;break}throw fr(t,"email-already-in-use",u);case 27:if("USER_DISABLED"!==d){e.next=29;break}throw fr(t,"user-disabled",u);case 29:if(v=i[d]||d.toLowerCase().replace(/[_\s]+/g,"-"),!p){e.next=34;break}throw Bn(t,v,p);case 34:Vn(t,v);case 35:e.next=42;break;case 37:if(e.prev=37,e.t0=e.catch(2),!(e.t0 instanceof q)){e.next=41;break}throw e.t0;case 41:Vn(t,"network-request-failed",{message:String(e.t0)});case 42:case"end":return e.stop()}}),e,null,[[2,37]])}))),or.apply(this,arguments)}function sr(e,t,n,r){return ur.apply(this,arguments)}function ur(){return ur=s(a().mark((function e(t,n,r,i){var o,s,u=arguments;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=u.length>4&&void 0!==u[4]?u[4]:{},e.next=3,rr(t,n,r,i,o);case 3:return"mfaPendingCredential"in(s=e.sent)&&Vn(t,"multi-factor-auth-required",{_serverResponse:s}),e.abrupt("return",s);case 6:case"end":return e.stop()}}),e)}))),ur.apply(this,arguments)}function cr(e,t,n,r){var i="".concat(t).concat(n,"?").concat(r);return e.config.emulator?Jn(e.config,i):"".concat(e.config.apiScheme,"://").concat(i)}var lr=function(){function e(t){var n=this;k(this,e),this.auth=t,this.timer=null,this.promise=new Promise((function(e,t){n.timer=setTimeout((function(){return t(zn(n.auth,"network-request-failed"))}),tr.get())}))}return w(e,[{key:"clearNetworkTimeout",value:function(){clearTimeout(this.timer)}}]),e}();function fr(e,t,n){var r={appName:e.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);var i=zn(e,t,r);return i.customData._tokenResponse=n,i}function hr(e,t){return dr.apply(this,arguments)}function dr(){return(dr=s(a().mark((function e(t,n){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",rr(t,"GET","/v2/recaptchaConfig",nr(t,n)));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function pr(e,t){return vr.apply(this,arguments)}function vr(){return(vr=s(a().mark((function e(t,n){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",rr(t,"POST","/v1/accounts:delete",n));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function mr(e,t){return gr.apply(this,arguments)}function gr(){return(gr=s(a().mark((function e(t,n){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",rr(t,"POST","/v1/accounts:lookup",n));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function yr(e){if(e)try{var t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(n){}}function kr(){return kr=s(a().mark((function e(t){var n,r,i,o,s,u,c=arguments;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=c.length>1&&void 0!==c[1]&&c[1],r=ne(t),e.next=4,r.getIdToken(n);case 4:return i=e.sent,Kn((o=wr(i))&&o.exp&&o.auth_time&&o.iat,r.auth,"internal-error"),s="object"===typeof o.firebase?o.firebase:void 0,u=null===s||void 0===s?void 0:s.sign_in_provider,e.abrupt("return",{claims:o,token:i,authTime:yr(br(o.auth_time)),issuedAtTime:yr(br(o.iat)),expirationTime:yr(br(o.exp)),signInProvider:u||null,signInSecondFactor:(null===s||void 0===s?void 0:s.sign_in_second_factor)||null});case 10:case"end":return e.stop()}}),e)}))),kr.apply(this,arguments)}function br(e){return 1e3*Number(e)}function wr(e){var t=h(e.split("."),3),n=t[0],r=t[1],i=t[2];if(void 0===n||void 0===r||void 0===i)return Un("JWT malformed, contained fewer than 3 sections"),null;try{var a=D(r);return a?JSON.parse(a):(Un("Failed to decode base64 JWT payload"),null)}catch(o){return Un("Caught error parsing JWT payload as JSON",null===o||void 0===o?void 0:o.toString()),null}}function xr(e,t){return Er.apply(this,arguments)}function Er(){return Er=s(a().mark((function e(t,n){var r=arguments;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r.length>2&&void 0!==r[2]&&r[2])){e.next=3;break}return e.abrupt("return",n);case 3:return e.prev=3,e.next=6,n;case 6:return e.abrupt("return",e.sent);case 9:if(e.prev=9,e.t0=e.catch(3),!(e.t0 instanceof q&&_r(e.t0))){e.next=15;break}if(t.auth.currentUser!==t){e.next=15;break}return e.next=15,t.auth.signOut();case 15:throw e.t0;case 16:case"end":return e.stop()}}),e,null,[[3,9]])}))),Er.apply(this,arguments)}function _r(e){var t=e.code;return t==="auth/".concat("user-disabled")||t==="auth/".concat("user-token-expired")}var Sr=function(){function e(t){k(this,e),this.user=t,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}return w(e,[{key:"_start",value:function(){this.isRunning||(this.isRunning=!0,this.schedule())}},{key:"_stop",value:function(){this.isRunning&&(this.isRunning=!1,null!==this.timerId&&clearTimeout(this.timerId))}},{key:"getInterval",value:function(e){var t;if(e){var n=this.errorBackoff;return this.errorBackoff=Math.min(2*this.errorBackoff,96e4),n}this.errorBackoff=3e4;var r=(null!==(t=this.user.stsTokenManager.expirationTime)&&void 0!==t?t:0)-Date.now()-3e5;return Math.max(0,r)}},{key:"schedule",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.isRunning){var n=this.getInterval(t);this.timerId=setTimeout(s(a().mark((function t(){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.iteration();case 2:case"end":return t.stop()}}),t)}))),n)}}},{key:"iteration",value:function(){var e=s(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.user.getIdToken(!0);case 3:e.next=9;break;case 5:return e.prev=5,e.t0=e.catch(0),(null===e.t0||void 0===e.t0?void 0:e.t0.code)==="auth/".concat("network-request-failed")&&this.schedule(!0),e.abrupt("return");case 9:this.schedule();case 10:case"end":return e.stop()}}),e,this,[[0,5]])})));return function(){return e.apply(this,arguments)}}()}]),e}(),Cr=function(){function e(t,n){k(this,e),this.createdAt=t,this.lastLoginAt=n,this._initializeTime()}return w(e,[{key:"_initializeTime",value:function(){this.lastSignInTime=yr(this.lastLoginAt),this.creationTime=yr(this.createdAt)}},{key:"_copy",value:function(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}},{key:"toJSON",value:function(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}]),e}();function Tr(e){return Ir.apply(this,arguments)}function Ir(){return(Ir=s(a().mark((function e(t){var n,r,i,o,s,u,c,l,f,h,d;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.auth,e.next=3,t.getIdToken();case 3:return i=e.sent,e.next=6,xr(t,mr(r,{idToken:i}));case 6:Kn(null===(o=e.sent)||void 0===o?void 0:o.users.length,r,"internal-error"),s=o.users[0],t._notifyReloadListener(s),u=(null===(n=s.providerUserInfo)||void 0===n?void 0:n.length)?s.providerUserInfo.map((function(e){var t=e.providerId,n=On(e,["providerId"]);return{providerId:t,uid:n.rawId||"",displayName:n.displayName||null,email:n.email||null,phoneNumber:n.phoneNumber||null,photoURL:n.photoUrl||null}})):[],c=Or(t.providerData,u),l=t.isAnonymous,f=!(t.email&&s.passwordHash)&&!(null===c||void 0===c?void 0:c.length),h=!!l&&f,d={uid:s.localId,displayName:s.displayName||null,photoURL:s.photoUrl||null,email:s.email||null,emailVerified:s.emailVerified||!1,phoneNumber:s.phoneNumber||null,tenantId:s.tenantId||null,providerData:c,metadata:new Cr(s.createdAt,s.lastLoginAt),isAnonymous:h},Object.assign(t,d);case 17:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Nr(){return(Nr=s(a().mark((function e(t){var n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=ne(t),e.next=3,Tr(n);case 3:return e.next=5,n.auth._persistUserIfCurrent(n);case 5:n.auth._notifyListenersIfCurrent(n);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Or(e,t){var n=e.filter((function(e){return!t.some((function(t){return t.providerId===e.providerId}))}));return[].concat(v(n),v(t))}function Rr(e,t){return Pr.apply(this,arguments)}function Pr(){return(Pr=s(a().mark((function e(t,n){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ar(t,{},s(a().mark((function e(){var r,i,o,s,u,c;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=X({grant_type:"refresh_token",refresh_token:n}).slice(1),i=t.config,o=i.tokenApiHost,s=i.apiKey,u=cr(t,o,"/v1/token","key=".concat(s)),e.next=5,t._getAdditionalHeaders();case 5:return(c=e.sent)["Content-Type"]="application/x-www-form-urlencoded",e.abrupt("return",Zn.fetch()(u,{method:"POST",headers:c,body:r}));case 8:case"end":return e.stop()}}),e)}))));case 2:return r=e.sent,e.abrupt("return",{accessToken:r.access_token,expiresIn:r.expires_in,refreshToken:r.refresh_token});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Ar=function(){function e(){k(this,e),this.refreshToken=null,this.accessToken=null,this.expirationTime=null}return w(e,[{key:"isExpired",get:function(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}},{key:"updateFromServerResponse",value:function(e){Kn(e.idToken,"internal-error"),Kn("undefined"!==typeof e.idToken,"internal-error"),Kn("undefined"!==typeof e.refreshToken,"internal-error");var t="expiresIn"in e&&"undefined"!==typeof e.expiresIn?Number(e.expiresIn):function(e){var t=wr(e);return Kn(t,"internal-error"),Kn("undefined"!==typeof t.exp,"internal-error"),Kn("undefined"!==typeof t.iat,"internal-error"),Number(t.exp)-Number(t.iat)}(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,t)}},{key:"getToken",value:function(){var e=s(a().mark((function e(t){var n,r=arguments;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.length>1&&void 0!==r[1]&&r[1],Kn(!this.accessToken||this.refreshToken,t,"user-token-expired"),n||!this.accessToken||this.isExpired){e.next=4;break}return e.abrupt("return",this.accessToken);case 4:if(!this.refreshToken){e.next=8;break}return e.next=7,this.refresh(t,this.refreshToken);case 7:return e.abrupt("return",this.accessToken);case 8:return e.abrupt("return",null);case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"clearRefreshToken",value:function(){this.refreshToken=null}},{key:"refresh",value:function(){var e=s(a().mark((function e(t,n){var r,i,o,s;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Rr(t,n);case 2:r=e.sent,i=r.accessToken,o=r.refreshToken,s=r.expiresIn,this.updateTokensAndExpiration(i,o,Number(s));case 7:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"updateTokensAndExpiration",value:function(e,t,n){this.refreshToken=t||null,this.accessToken=e||null,this.expirationTime=Date.now()+1e3*n}},{key:"toJSON",value:function(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}},{key:"_assign",value:function(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}},{key:"_clone",value:function(){return Object.assign(new e,this.toJSON())}},{key:"_performRefresh",value:function(){return qn("not implemented")}}],[{key:"fromJSON",value:function(t,n){var r=n.refreshToken,i=n.accessToken,a=n.expirationTime,o=new e;return r&&(Kn("string"===typeof r,"internal-error",{appName:t}),o.refreshToken=r),i&&(Kn("string"===typeof i,"internal-error",{appName:t}),o.accessToken=i),a&&(Kn("number"===typeof a,"internal-error",{appName:t}),o.expirationTime=a),o}}]),e}();function Dr(e,t){Kn("string"===typeof e||"undefined"===typeof e,"internal-error",{appName:t})}var Lr=function(){function e(t){k(this,e);var n=t.uid,r=t.auth,i=t.stsTokenManager,a=On(t,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new Sr(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=n,this.auth=r,this.stsTokenManager=i,this.accessToken=i.accessToken,this.displayName=a.displayName||null,this.email=a.email||null,this.emailVerified=a.emailVerified||!1,this.phoneNumber=a.phoneNumber||null,this.photoURL=a.photoURL||null,this.isAnonymous=a.isAnonymous||!1,this.tenantId=a.tenantId||null,this.providerData=a.providerData?v(a.providerData):[],this.metadata=new Cr(a.createdAt||void 0,a.lastLoginAt||void 0)}return w(e,[{key:"getIdToken",value:function(){var e=s(a().mark((function e(t){var n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,xr(this,this.stsTokenManager.getToken(this.auth,t));case 2:if(Kn(n=e.sent,this.auth,"internal-error"),this.accessToken===n){e.next=9;break}return this.accessToken=n,e.next=8,this.auth._persistUserIfCurrent(this);case 8:this.auth._notifyListenersIfCurrent(this);case 9:return e.abrupt("return",n);case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getIdTokenResult",value:function(e){return function(e){return kr.apply(this,arguments)}(this,e)}},{key:"reload",value:function(){return function(e){return Nr.apply(this,arguments)}(this)}},{key:"_assign",value:function(e){this!==e&&(Kn(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map((function(e){return Object.assign({},e)})),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}},{key:"_clone",value:function(t){var n=new e(Object.assign(Object.assign({},this),{auth:t,stsTokenManager:this.stsTokenManager._clone()}));return n.metadata._copy(this.metadata),n}},{key:"_onReload",value:function(e){Kn(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}},{key:"_notifyReloadListener",value:function(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}},{key:"_startProactiveRefresh",value:function(){this.proactiveRefresh._start()}},{key:"_stopProactiveRefresh",value:function(){this.proactiveRefresh._stop()}},{key:"_updateTokensIfNecessary",value:function(){var e=s(a().mark((function e(t){var n,r,i=arguments;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=i.length>1&&void 0!==i[1]&&i[1],r=!1,t.idToken&&t.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(t),r=!0),!n){e.next=6;break}return e.next=6,Tr(this);case 6:return e.next=8,this.auth._persistUserIfCurrent(this);case 8:r&&this.auth._notifyListenersIfCurrent(this);case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"delete",value:function(){var e=s(a().mark((function e(){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getIdToken();case 2:return t=e.sent,e.next=5,xr(this,pr(this.auth,{idToken:t}));case 5:return this.stsTokenManager.clearRefreshToken(),e.abrupt("return",this.auth.signOut());case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"toJSON",value:function(){return Object.assign(Object.assign({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map((function(e){return Object.assign({},e)})),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}},{key:"refreshToken",get:function(){return this.stsTokenManager.refreshToken||""}}],[{key:"_fromJSON",value:function(t,n){var r,i,a,o,s,u,c,l,f=null!==(r=n.displayName)&&void 0!==r?r:void 0,h=null!==(i=n.email)&&void 0!==i?i:void 0,d=null!==(a=n.phoneNumber)&&void 0!==a?a:void 0,p=null!==(o=n.photoURL)&&void 0!==o?o:void 0,v=null!==(s=n.tenantId)&&void 0!==s?s:void 0,m=null!==(u=n._redirectEventId)&&void 0!==u?u:void 0,g=null!==(c=n.createdAt)&&void 0!==c?c:void 0,y=null!==(l=n.lastLoginAt)&&void 0!==l?l:void 0,k=n.uid,b=n.emailVerified,w=n.isAnonymous,x=n.providerData,E=n.stsTokenManager;Kn(k&&E,t,"internal-error");var _=Ar.fromJSON(this.name,E);Kn("string"===typeof k,t,"internal-error"),Dr(f,t.name),Dr(h,t.name),Kn("boolean"===typeof b,t,"internal-error"),Kn("boolean"===typeof w,t,"internal-error"),Dr(d,t.name),Dr(p,t.name),Dr(v,t.name),Dr(m,t.name),Dr(g,t.name),Dr(y,t.name);var S=new e({uid:k,auth:t,email:h,emailVerified:b,displayName:f,isAnonymous:w,photoURL:p,phoneNumber:d,tenantId:v,stsTokenManager:_,createdAt:g,lastLoginAt:y});return x&&Array.isArray(x)&&(S.providerData=x.map((function(e){return Object.assign({},e)}))),m&&(S._redirectEventId=m),S}},{key:"_fromIdTokenResponse",value:function(){var t=s(a().mark((function t(n,r){var i,o,s,u=arguments;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=u.length>2&&void 0!==u[2]&&u[2],(o=new Ar).updateFromServerResponse(r),s=new e({uid:r.localId,auth:n,stsTokenManager:o,isAnonymous:i}),t.next=6,Tr(s);case 6:return t.abrupt("return",s);case 7:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()}]),e}(),Mr=new Map;function jr(e){Wn(e instanceof Function,"Expected a class definition");var t=Mr.get(e);return t?(Wn(t instanceof e,"Instance stored in cache mismatched with class"),t):(t=new e,Mr.set(e,t),t)}var Fr=function(){function e(){k(this,e),this.type="NONE",this.storage={}}return w(e,[{key:"_isAvailable",value:function(){var e=s(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",!0);case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"_set",value:function(){var e=s(a().mark((function e(t,n){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.storage[t]=n;case 1:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_get",value:function(){var e=s(a().mark((function e(t){var n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.storage[t],e.abrupt("return",void 0===n?null:n);case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_remove",value:function(){var e=s(a().mark((function e(t){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:delete this.storage[t];case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_addListener",value:function(e,t){}},{key:"_removeListener",value:function(e,t){}}]),e}();Fr.type="NONE";var Ur=Fr;function Vr(e,t,n){return"firebase".concat(":",e,":").concat(t,":").concat(n)}var zr=function(){function e(t,n,r){k(this,e),this.persistence=t,this.auth=n,this.userKey=r;var i=this.auth,a=i.config,o=i.name;this.fullUserKey=Vr(this.userKey,a.apiKey,o),this.fullPersistenceKey=Vr("persistence",a.apiKey,o),this.boundEventHandler=n._onStorageEvent.bind(n),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}return w(e,[{key:"setCurrentUser",value:function(e){return this.persistence._set(this.fullUserKey,e.toJSON())}},{key:"getCurrentUser",value:function(){var e=s(a().mark((function e(){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.persistence._get(this.fullUserKey);case 2:return t=e.sent,e.abrupt("return",t?Lr._fromJSON(this.auth,t):null);case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"removeCurrentUser",value:function(){return this.persistence._remove(this.fullUserKey)}},{key:"savePersistenceForRedirect",value:function(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}},{key:"setPersistence",value:function(){var e=s(a().mark((function e(t){var n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.persistence!==t){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.getCurrentUser();case 4:return n=e.sent,e.next=7,this.removeCurrentUser();case 7:if(this.persistence=t,!n){e.next=10;break}return e.abrupt("return",this.setCurrentUser(n));case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"delete",value:function(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}}],[{key:"create",value:function(){var t=s(a().mark((function t(n,r){var i,o,u,c,l,f,h,d,p,v,g,y=arguments;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=y.length>2&&void 0!==y[2]?y[2]:"authUser",r.length){t.next=3;break}return t.abrupt("return",new e(jr(Ur),n,i));case 3:return t.next=5,Promise.all(r.map(function(){var e=s(a().mark((function e(t){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t._isAvailable();case 2:if(!e.sent){e.next=4;break}return e.abrupt("return",t);case 4:return e.abrupt("return",void 0);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 5:o=t.sent.filter((function(e){return e})),u=o[0]||jr(Ur),c=Vr(i,n.config.apiKey,n.name),l=null,f=m(r),t.prev=10,f.s();case 12:if((h=f.n()).done){t.next=29;break}return d=h.value,t.prev=14,t.next=17,d._get(c);case 17:if(!(p=t.sent)){t.next=23;break}return v=Lr._fromJSON(n,p),d!==u&&(l=v),u=d,t.abrupt("break",29);case 23:t.next=27;break;case 25:t.prev=25,t.t0=t.catch(14);case 27:t.next=12;break;case 29:t.next=34;break;case 31:t.prev=31,t.t1=t.catch(10),f.e(t.t1);case 34:return t.prev=34,f.f(),t.finish(34);case 37:if(g=o.filter((function(e){return e._shouldAllowMigration})),u._shouldAllowMigration&&g.length){t.next=40;break}return t.abrupt("return",new e(u,n,i));case 40:if(u=g[0],!l){t.next=44;break}return t.next=44,u._set(c,l.toJSON());case 44:return t.next=46,Promise.all(r.map(function(){var e=s(a().mark((function e(t){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t===u){e.next=8;break}return e.prev=1,e.next=4,t._remove(c);case 4:e.next=8;break;case 6:e.prev=6,e.t0=e.catch(1);case 8:case"end":return e.stop()}}),e,null,[[1,6]])})));return function(t){return e.apply(this,arguments)}}()));case 46:return t.abrupt("return",new e(u,n,i));case 47:case"end":return t.stop()}}),t,null,[[10,31,34,37],[14,25]])})));return function(e,n){return t.apply(this,arguments)}}()}]),e}();function Br(e){var t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(Wr(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(Hr(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(Qr(t))return"Blackberry";if($r(t))return"Webos";if(Kr(t))return"Safari";if((t.includes("chrome/")||qr(t))&&!t.includes("edge/"))return"Chrome";if(Gr(t))return"Android";var n=e.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/);return 2===(null===n||void 0===n?void 0:n.length)?n[1]:"Other"}function Hr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:H();return/firefox\//i.test(e)}function Kr(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:H()).toLowerCase();return e.includes("safari/")&&!e.includes("chrome/")&&!e.includes("crios/")&&!e.includes("android")}function qr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:H();return/crios\//i.test(e)}function Wr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:H();return/iemobile/i.test(e)}function Gr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:H();return/android/i.test(e)}function Qr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:H();return/blackberry/i.test(e)}function $r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:H();return/webos/i.test(e)}function Yr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:H();return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function Xr(){return function(){var e=H();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}()&&10===document.documentMode}function Jr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:H();return Yr(e)||Gr(e)||$r(e)||Qr(e)||/windows phone/i.test(e)||Wr(e)}function Zr(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];switch(e){case"Browser":t=Br(H());break;case"Worker":t="".concat(Br(H()),"-").concat(e);break;default:t=e}var r=n.length?n.join(","):"FirebaseCore-web";return"".concat(t,"/","JsCore","/").concat(Ye,"/").concat(r)}var ei=function(){function e(t){k(this,e),this.auth=t,this.queue=[]}return w(e,[{key:"pushCallback",value:function(e,t){var n=this,r=function(t){return new Promise((function(n,r){try{n(e(t))}catch(i){r(i)}}))};r.onAbort=t,this.queue.push(r);var i=this.queue.length-1;return function(){n.queue[i]=function(){return Promise.resolve()}}}},{key:"runMiddleware",value:function(){var e=s(a().mark((function e(t){var n,r,i,o,s,u,c;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.auth.currentUser!==t){e.next=2;break}return e.abrupt("return");case 2:n=[],e.prev=3,r=m(this.queue),e.prev=5,r.s();case 7:if((i=r.n()).done){e.next=14;break}return o=i.value,e.next=11,o(t);case 11:o.onAbort&&n.push(o.onAbort);case 12:e.next=7;break;case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(5),r.e(e.t0);case 19:return e.prev=19,r.f(),e.finish(19);case 22:e.next=30;break;case 24:e.prev=24,e.t1=e.catch(3),n.reverse(),s=m(n);try{for(s.s();!(u=s.n()).done;){c=u.value;try{c()}catch(a){}}}catch(l){s.e(l)}finally{s.f()}throw this.auth._errorFactory.create("login-blocked",{originalMessage:null===e.t1||void 0===e.t1?void 0:e.t1.message});case 30:case"end":return e.stop()}}),e,this,[[3,24],[5,16,19,22]])})));return function(t){return e.apply(this,arguments)}}()}]),e}();function ti(e){return ni.apply(this,arguments)}function ni(){return ni=s(a().mark((function e(t){var n,r=arguments;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:{},e.abrupt("return",rr(t,"GET","/v2/passwordPolicy",nr(t,n)));case 2:case"end":return e.stop()}}),e)}))),ni.apply(this,arguments)}var ri=function(){function e(t){var n,r,i,a;k(this,e);var o=t.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=null!==(n=o.minPasswordLength)&&void 0!==n?n:6,o.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=o.maxPasswordLength),void 0!==o.containsLowercaseCharacter&&(this.customStrengthOptions.containsLowercaseLetter=o.containsLowercaseCharacter),void 0!==o.containsUppercaseCharacter&&(this.customStrengthOptions.containsUppercaseLetter=o.containsUppercaseCharacter),void 0!==o.containsNumericCharacter&&(this.customStrengthOptions.containsNumericCharacter=o.containsNumericCharacter),void 0!==o.containsNonAlphanumericCharacter&&(this.customStrengthOptions.containsNonAlphanumericCharacter=o.containsNonAlphanumericCharacter),this.enforcementState=t.enforcementState,"ENFORCEMENT_STATE_UNSPECIFIED"===this.enforcementState&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=null!==(i=null===(r=t.allowedNonAlphanumericCharacters)||void 0===r?void 0:r.join(""))&&void 0!==i?i:"",this.forceUpgradeOnSignin=null!==(a=t.forceUpgradeOnSignin)&&void 0!==a&&a,this.schemaVersion=t.schemaVersion}return w(e,[{key:"validatePassword",value:function(e){var t,n,r,i,a,o,s={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(e,s),this.validatePasswordCharacterOptions(e,s),s.isValid&&(s.isValid=null===(t=s.meetsMinPasswordLength)||void 0===t||t),s.isValid&&(s.isValid=null===(n=s.meetsMaxPasswordLength)||void 0===n||n),s.isValid&&(s.isValid=null===(r=s.containsLowercaseLetter)||void 0===r||r),s.isValid&&(s.isValid=null===(i=s.containsUppercaseLetter)||void 0===i||i),s.isValid&&(s.isValid=null===(a=s.containsNumericCharacter)||void 0===a||a),s.isValid&&(s.isValid=null===(o=s.containsNonAlphanumericCharacter)||void 0===o||o),s}},{key:"validatePasswordLengthOptions",value:function(e,t){var n=this.customStrengthOptions.minPasswordLength,r=this.customStrengthOptions.maxPasswordLength;n&&(t.meetsMinPasswordLength=e.length>=n),r&&(t.meetsMaxPasswordLength=e.length<=r)}},{key:"validatePasswordCharacterOptions",value:function(e,t){var n;this.updatePasswordCharacterOptionsStatuses(t,!1,!1,!1,!1);for(var r=0;r<e.length;r++)n=e.charAt(r),this.updatePasswordCharacterOptionsStatuses(t,n>="a"&&n<="z",n>="A"&&n<="Z",n>="0"&&n<="9",this.allowedNonAlphanumericCharacters.includes(n))}},{key:"updatePasswordCharacterOptionsStatuses",value:function(e,t,n,r,i){this.customStrengthOptions.containsLowercaseLetter&&(e.containsLowercaseLetter||(e.containsLowercaseLetter=t)),this.customStrengthOptions.containsUppercaseLetter&&(e.containsUppercaseLetter||(e.containsUppercaseLetter=n)),this.customStrengthOptions.containsNumericCharacter&&(e.containsNumericCharacter||(e.containsNumericCharacter=r)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(e.containsNonAlphanumericCharacter||(e.containsNonAlphanumericCharacter=i))}}]),e}(),ii=function(){function e(t,n,r,i){k(this,e),this.app=t,this.heartbeatServiceProvider=n,this.appCheckServiceProvider=r,this.config=i,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new oi(this),this.idTokenSubscription=new oi(this),this.beforeStateQueue=new ei(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=Mn,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=t.name,this.clientVersion=i.sdkClientVersion}return w(e,[{key:"_initializeWithPersistence",value:function(e,t){var n=this;return t&&(this._popupRedirectResolver=jr(t)),this._initializationPromise=this.queue(s(a().mark((function r(){var i,o;return a().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!n._deleted){r.next=2;break}return r.abrupt("return");case 2:return r.next=4,zr.create(n,e);case 4:if(n.persistenceManager=r.sent,!n._deleted){r.next=7;break}return r.abrupt("return");case 7:if(!(null===(i=n._popupRedirectResolver)||void 0===i?void 0:i._shouldInitProactively)){r.next=15;break}return r.prev=8,r.next=11,n._popupRedirectResolver._initialize(n);case 11:r.next=15;break;case 13:r.prev=13,r.t0=r.catch(8);case 15:return r.next=17,n.initializeCurrentUser(t);case 17:if(n.lastNotifiedUid=(null===(o=n.currentUser)||void 0===o?void 0:o.uid)||null,!n._deleted){r.next=20;break}return r.abrupt("return");case 20:n._isInitialized=!0;case 21:case"end":return r.stop()}}),r,null,[[8,13]])})))),this._initializationPromise}},{key:"_onStorageEvent",value:function(){var e=s(a().mark((function e(){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._deleted){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.assertedPersistence.getCurrentUser();case 4:if(t=e.sent,this.currentUser||t){e.next=7;break}return e.abrupt("return");case 7:if(!this.currentUser||!t||this.currentUser.uid!==t.uid){e.next=12;break}return this._currentUser._assign(t),e.next=11,this.currentUser.getIdToken();case 11:return e.abrupt("return");case 12:return e.next=14,this._updateCurrentUser(t,!0);case 14:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"initializeCurrentUser",value:function(){var e=s(a().mark((function e(t){var n,r,i,o,s,u,c;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.assertedPersistence.getCurrentUser();case 2:if(r=e.sent,i=r,o=!1,!t||!this.config.authDomain){e.next=14;break}return e.next=8,this.getOrInitRedirectPersistenceManager();case 8:return s=null===(n=this.redirectUser)||void 0===n?void 0:n._redirectEventId,u=null===i||void 0===i?void 0:i._redirectEventId,e.next=12,this.tryRedirectSignIn(t);case 12:c=e.sent,s&&s!==u||!(null===c||void 0===c?void 0:c.user)||(i=c.user,o=!0);case 14:if(i){e.next=16;break}return e.abrupt("return",this.directlySetCurrentUser(null));case 16:if(i._redirectEventId){e.next=32;break}if(!o){e.next=27;break}return e.prev=18,e.next=21,this.beforeStateQueue.runMiddleware(i);case 21:e.next=27;break;case 23:e.prev=23,e.t0=e.catch(18),i=r,this._popupRedirectResolver._overrideRedirectResult(this,(function(){return Promise.reject(e.t0)}));case 27:if(!i){e.next=31;break}return e.abrupt("return",this.reloadAndSetCurrentUserOrClear(i));case 31:return e.abrupt("return",this.directlySetCurrentUser(null));case 32:return Kn(this._popupRedirectResolver,this,"argument-error"),e.next=35,this.getOrInitRedirectPersistenceManager();case 35:if(!this.redirectUser||this.redirectUser._redirectEventId!==i._redirectEventId){e.next=37;break}return e.abrupt("return",this.directlySetCurrentUser(i));case 37:return e.abrupt("return",this.reloadAndSetCurrentUserOrClear(i));case 38:case"end":return e.stop()}}),e,this,[[18,23]])})));return function(t){return e.apply(this,arguments)}}()},{key:"tryRedirectSignIn",value:function(){var e=s(a().mark((function e(t){var n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=null,e.prev=1,e.next=4,this._popupRedirectResolver._completeRedirectFn(this,t,!0);case 4:n=e.sent,e.next=11;break;case 7:return e.prev=7,e.t0=e.catch(1),e.next=11,this._setRedirectUser(null);case 11:return e.abrupt("return",n);case 12:case"end":return e.stop()}}),e,this,[[1,7]])})));return function(t){return e.apply(this,arguments)}}()},{key:"reloadAndSetCurrentUserOrClear",value:function(){var e=s(a().mark((function e(t){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Tr(t);case 3:e.next=9;break;case 5:if(e.prev=5,e.t0=e.catch(0),(null===e.t0||void 0===e.t0?void 0:e.t0.code)==="auth/".concat("network-request-failed")){e.next=9;break}return e.abrupt("return",this.directlySetCurrentUser(null));case 9:return e.abrupt("return",this.directlySetCurrentUser(t));case 10:case"end":return e.stop()}}),e,this,[[0,5]])})));return function(t){return e.apply(this,arguments)}}()},{key:"useDeviceLanguage",value:function(){this.languageCode=function(){if("undefined"===typeof navigator)return null;var e=navigator;return e.languages&&e.languages[0]||e.language||null}()}},{key:"_delete",value:function(){var e=s(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this._deleted=!0;case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"updateCurrentUser",value:function(){var e=s(a().mark((function e(t){var n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=t?ne(t):null)&&Kn(n.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),e.abrupt("return",this._updateCurrentUser(n&&n._clone(this)));case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_updateCurrentUser",value:function(){var e=s(a().mark((function e(t){var n,r=this,i=arguments;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=i.length>1&&void 0!==i[1]&&i[1],!this._deleted){e.next=3;break}return e.abrupt("return");case 3:if(t&&Kn(this.tenantId===t.tenantId,this,"tenant-id-mismatch"),n){e.next=7;break}return e.next=7,this.beforeStateQueue.runMiddleware(t);case 7:return e.abrupt("return",this.queue(s(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.directlySetCurrentUser(t);case 2:r.notifyAuthListeners();case 3:case"end":return e.stop()}}),e)})))));case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"signOut",value:function(){var e=s(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.beforeStateQueue.runMiddleware(null);case 2:if(!this.redirectPersistenceManager&&!this._popupRedirectResolver){e.next=5;break}return e.next=5,this._setRedirectUser(null);case 5:return e.abrupt("return",this._updateCurrentUser(null,!0));case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"setPersistence",value:function(e){var t=this;return this.queue(s(a().mark((function n(){return a().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t.assertedPersistence.setPersistence(jr(e));case 2:case"end":return n.stop()}}),n)}))))}},{key:"_getRecaptchaConfig",value:function(){return null==this.tenantId?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}},{key:"validatePassword",value:function(){var e=s(a().mark((function e(t){var n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._getPasswordPolicyInternal()){e.next=3;break}return e.next=3,this._updatePasswordPolicy();case 3:if((n=this._getPasswordPolicyInternal()).schemaVersion===this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION){e.next=6;break}return e.abrupt("return",Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})));case 6:return e.abrupt("return",n.validatePassword(t));case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_getPasswordPolicyInternal",value:function(){return null===this.tenantId?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}},{key:"_updatePasswordPolicy",value:function(){var e=s(a().mark((function e(){var t,n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ti(this);case 2:t=e.sent,n=new ri(t),null===this.tenantId?this._projectPasswordPolicy=n:this._tenantPasswordPolicies[this.tenantId]=n;case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_getPersistence",value:function(){return this.assertedPersistence.persistence.type}},{key:"_updateErrorMap",value:function(e){this._errorFactory=new W("auth","Firebase",e())}},{key:"onAuthStateChanged",value:function(e,t,n){return this.registerStateListener(this.authStateSubscription,e,t,n)}},{key:"beforeAuthStateChanged",value:function(e,t){return this.beforeStateQueue.pushCallback(e,t)}},{key:"onIdTokenChanged",value:function(e,t,n){return this.registerStateListener(this.idTokenSubscription,e,t,n)}},{key:"authStateReady",value:function(){var e=this;return new Promise((function(t,n){if(e.currentUser)t();else var r=e.onAuthStateChanged((function(){r(),t()}),n)}))}},{key:"toJSON",value:function(){var e;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:null===(e=this._currentUser)||void 0===e?void 0:e.toJSON()}}},{key:"_setRedirectUser",value:function(){var e=s(a().mark((function e(t,n){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getOrInitRedirectPersistenceManager(n);case 2:return r=e.sent,e.abrupt("return",null===t?r.removeCurrentUser():r.setCurrentUser(t));case 4:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getOrInitRedirectPersistenceManager",value:function(){var e=s(a().mark((function e(t){var n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.redirectPersistenceManager){e.next=9;break}return Kn(n=t&&jr(t)||this._popupRedirectResolver,this,"argument-error"),e.next=5,zr.create(this,[jr(n._redirectPersistence)],"redirectUser");case 5:return this.redirectPersistenceManager=e.sent,e.next=8,this.redirectPersistenceManager.getCurrentUser();case 8:this.redirectUser=e.sent;case 9:return e.abrupt("return",this.redirectPersistenceManager);case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_redirectUserForId",value:function(){var e=s(a().mark((function e(t){var n,r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._isInitialized){e.next=3;break}return e.next=3,this.queue(s(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))));case 3:if((null===(n=this._currentUser)||void 0===n?void 0:n._redirectEventId)!==t){e.next=5;break}return e.abrupt("return",this._currentUser);case 5:if((null===(r=this.redirectUser)||void 0===r?void 0:r._redirectEventId)!==t){e.next=7;break}return e.abrupt("return",this.redirectUser);case 7:return e.abrupt("return",null);case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_persistUserIfCurrent",value:function(){var e=s(a().mark((function e(t){var n=this;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t!==this.currentUser){e.next=2;break}return e.abrupt("return",this.queue(s(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n.directlySetCurrentUser(t));case 1:case"end":return e.stop()}}),e)})))));case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_notifyListenersIfCurrent",value:function(e){e===this.currentUser&&this.notifyAuthListeners()}},{key:"_key",value:function(){return"".concat(this.config.authDomain,":").concat(this.config.apiKey,":").concat(this.name)}},{key:"_startProactiveRefresh",value:function(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}},{key:"_stopProactiveRefresh",value:function(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}},{key:"_currentUser",get:function(){return this.currentUser}},{key:"notifyAuthListeners",value:function(){var e,t;if(this._isInitialized){this.idTokenSubscription.next(this.currentUser);var n=null!==(t=null===(e=this.currentUser)||void 0===e?void 0:e.uid)&&void 0!==t?t:null;this.lastNotifiedUid!==n&&(this.lastNotifiedUid=n,this.authStateSubscription.next(this.currentUser))}}},{key:"registerStateListener",value:function(e,t,n,r){var i=this;if(this._deleted)return function(){};var a="function"===typeof t?t:t.next.bind(t),o=!1,s=this._isInitialized?Promise.resolve():this._initializationPromise;if(Kn(s,this,"internal-error"),s.then((function(){o||a(i.currentUser)})),"function"===typeof t){var u=e.addObserver(t,n,r);return function(){o=!0,u()}}var c=e.addObserver(t);return function(){o=!0,c()}}},{key:"directlySetCurrentUser",value:function(){var e=s(a().mark((function e(t){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.currentUser&&this.currentUser!==t&&this._currentUser._stopProactiveRefresh(),t&&this.isProactiveRefreshEnabled&&t._startProactiveRefresh(),this.currentUser=t,!t){e.next=8;break}return e.next=6,this.assertedPersistence.setCurrentUser(t);case 6:e.next=10;break;case 8:return e.next=10,this.assertedPersistence.removeCurrentUser();case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"queue",value:function(e){return this.operations=this.operations.then(e,e),this.operations}},{key:"assertedPersistence",get:function(){return Kn(this.persistenceManager,this,"internal-error"),this.persistenceManager}},{key:"_logFramework",value:function(e){e&&!this.frameworks.includes(e)&&(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=Zr(this.config.clientPlatform,this._getFrameworks()))}},{key:"_getFrameworks",value:function(){return this.frameworks}},{key:"_getAdditionalHeaders",value:function(){var e=s(a().mark((function e(){var t,n,r,i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=y({},"X-Client-Version",this.clientVersion),this.app.options.appId&&(n["X-Firebase-gmpid"]=this.app.options.appId),e.next=4,null===(t=this.heartbeatServiceProvider.getImmediate({optional:!0}))||void 0===t?void 0:t.getHeartbeatsHeader();case 4:return(r=e.sent)&&(n["X-Firebase-Client"]=r),e.next=8,this._getAppCheckToken();case 8:return(i=e.sent)&&(n["X-Firebase-AppCheck"]=i),e.abrupt("return",n);case 11:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_getAppCheckToken",value:function(){var e=s(a().mark((function e(){var t,n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null===(t=this.appCheckServiceProvider.getImmediate({optional:!0}))||void 0===t?void 0:t.getToken();case 2:return(null===(n=e.sent)||void 0===n?void 0:n.error)&&Fn("Error while retrieving App Check token: ".concat(n.error)),e.abrupt("return",null===n||void 0===n?void 0:n.token);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}();function ai(e){return ne(e)}var oi=function(){function e(t){var n=this;k(this,e),this.auth=t,this.observer=null,this.addObserver=function(e,t){var n=new ee(e,t);return n.subscribe.bind(n)}((function(e){return n.observer=e}))}return w(e,[{key:"next",get:function(){return Kn(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}]),e}();function si(e){return new Promise((function(t,n){var r=document.createElement("script");r.setAttribute("src",e),r.onload=t,r.onerror=function(e){var t=zn("internal-error");t.customData=e,n(t)},r.type="text/javascript",r.charset="UTF-8",function(){var e,t;return null!==(t=null===(e=document.getElementsByTagName("head"))||void 0===e?void 0:e[0])&&void 0!==t?t:document}().appendChild(r)}))}function ui(e){return"__".concat(e).concat(Math.floor(1e6*Math.random()))}var ci=function(){function e(t){k(this,e),this.type="recaptcha-enterprise",this.auth=ai(t)}return w(e,[{key:"verify",value:function(){var e=s(a().mark((function e(){var t,n,r,i,o,u=this,c=arguments;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=function(e,n,r){var i=window.grecaptcha;Pn(i)?i.enterprise.ready((function(){i.enterprise.execute(e,{action:t}).then((function(e){n(e)})).catch((function(){n("NO_RECAPTCHA")}))})):r(Error("No reCAPTCHA enterprise script loaded."))},i=function(){return i=s(a().mark((function e(t){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=5;break}if(null!=t.tenantId||null==t._agentRecaptchaConfig){e.next=3;break}return e.abrupt("return",t._agentRecaptchaConfig.siteKey);case 3:if(null==t.tenantId||void 0===t._tenantRecaptchaConfigs[t.tenantId]){e.next=5;break}return e.abrupt("return",t._tenantRecaptchaConfigs[t.tenantId].siteKey);case 5:return e.abrupt("return",new Promise(function(){var e=s(a().mark((function e(n,r){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:hr(t,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then((function(e){if(void 0!==e.recaptchaKey){var i=new An(e);return null==t.tenantId?t._agentRecaptchaConfig=i:t._tenantRecaptchaConfigs[t.tenantId]=i,n(i.siteKey)}r(new Error("recaptcha Enterprise site key undefined"))})).catch((function(e){r(e)}));case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()));case 6:case"end":return e.stop()}}),e)}))),i.apply(this,arguments)},r=function(e){return i.apply(this,arguments)},t=c.length>0&&void 0!==c[0]?c[0]:"verify",n=c.length>1&&void 0!==c[1]&&c[1],e.abrupt("return",new Promise((function(e,t){r(u.auth).then((function(r){if(!n&&Pn(window.grecaptcha))o(r,e,t);else{if("undefined"===typeof window)return void t(new Error("RecaptchaVerifier is only supported in browser"));si("https://www.google.com/recaptcha/enterprise.js?render="+r).then((function(){o(r,e,t)})).catch((function(e){t(e)}))}})).catch((function(e){t(e)}))})));case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}]),e}();function li(e,t,n){return fi.apply(this,arguments)}function fi(){return fi=s(a().mark((function e(t,n,r){var i,o,s,u,c=arguments;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=c.length>3&&void 0!==c[3]&&c[3],o=new ci(t),e.prev=2,e.next=5,o.verify(r);case 5:s=e.sent,e.next=13;break;case 8:return e.prev=8,e.t0=e.catch(2),e.next=12,o.verify(r,!0);case 12:s=e.sent;case 13:return u=Object.assign({},n),i?Object.assign(u,{captchaResp:s}):Object.assign(u,{captchaResponse:s}),Object.assign(u,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(u,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),e.abrupt("return",u);case 18:case"end":return e.stop()}}),e,null,[[2,8]])}))),fi.apply(this,arguments)}function hi(e,t,n){var r=ai(e);Kn(r._canInitEmulator,r,"emulator-config-failed"),Kn(/^https?:\/\//.test(t),r,"invalid-emulator-scheme");var i=!!(null===n||void 0===n?void 0:n.disableWarnings),a=di(t),o=function(e){var t=di(e),n=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!n)return{host:"",port:null};var r=n[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(r);if(i){var a=i[1];return{host:a,port:pi(r.substr(a.length+1))}}var o=h(r.split(":"),2);return{host:o[0],port:pi(o[1])}}(t),s=o.host,u=o.port,c=null===u?"":":".concat(u);r.config.emulator={url:"".concat(a,"//").concat(s).concat(c,"/")},r.settings.appVerificationDisabledForTesting=!0,r.emulatorConfig=Object.freeze({host:s,port:u,protocol:a.replace(":",""),options:Object.freeze({disableWarnings:i})}),i||function(){function e(){var e=document.createElement("p"),t=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",t.position="fixed",t.width="100%",t.backgroundColor="#ffffff",t.border=".1em solid #000000",t.color="#b50000",t.bottom="0px",t.left="0px",t.margin="0px",t.zIndex="10000",t.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}"undefined"!==typeof console&&"function"===typeof console.info&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials.");"undefined"!==typeof window&&"undefined"!==typeof document&&("loading"===document.readyState?window.addEventListener("DOMContentLoaded",e):e())}()}function di(e){var t=e.indexOf(":");return t<0?"":e.substr(0,t+1)}function pi(e){if(!e)return null;var t=Number(e);return isNaN(t)?null:t}var vi=function(){function e(t,n){k(this,e),this.providerId=t,this.signInMethod=n}return w(e,[{key:"toJSON",value:function(){return qn("not implemented")}},{key:"_getIdTokenResponse",value:function(e){return qn("not implemented")}},{key:"_linkToIdToken",value:function(e,t){return qn("not implemented")}},{key:"_getReauthenticationResolver",value:function(e){return qn("not implemented")}}]),e}();function mi(e,t){return gi.apply(this,arguments)}function gi(){return(gi=s(a().mark((function e(t,n){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",rr(t,"POST","/v1/accounts:update",n));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function yi(e,t){return ki.apply(this,arguments)}function ki(){return(ki=s(a().mark((function e(t,n){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",sr(t,"POST","/v1/accounts:signInWithPassword",nr(t,n)));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function bi(e,t){return wi.apply(this,arguments)}function wi(){return(wi=s(a().mark((function e(t,n){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",sr(t,"POST","/v1/accounts:signInWithEmailLink",nr(t,n)));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function xi(e,t){return Ei.apply(this,arguments)}function Ei(){return(Ei=s(a().mark((function e(t,n){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",sr(t,"POST","/v1/accounts:signInWithEmailLink",nr(t,n)));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var _i=function(e){_(n,e);var t=T(n);function n(e,r,i){var a,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return k(this,n),(a=t.call(this,"password",i))._email=e,a._password=r,a._tenantId=o,a}return w(n,[{key:"toJSON",value:function(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}},{key:"_getIdTokenResponse",value:function(){var e=s(a().mark((function e(t){var n,r,i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=this.signInMethod,e.next="password"===e.t0?3:"emailLink"===e.t0?12:13;break;case 3:if(r={returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"},!(null===(n=t._getRecaptchaConfig())||void 0===n?void 0:n.emailPasswordEnabled)){e.next=11;break}return e.next=7,li(t,r,"signInWithPassword");case 7:return i=e.sent,e.abrupt("return",yi(t,i));case 11:return e.abrupt("return",yi(t,r).catch(function(){var e=s(a().mark((function e(n){var i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.code!=="auth/".concat("missing-recaptcha-token")){e.next=8;break}return console.log("Sign-in with email address and password is protected by reCAPTCHA for this project. Automatically triggering the reCAPTCHA flow and restarting the sign-in flow."),e.next=4,li(t,r,"signInWithPassword");case 4:return i=e.sent,e.abrupt("return",yi(t,i));case 8:return e.abrupt("return",Promise.reject(n));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 12:return e.abrupt("return",bi(t,{email:this._email,oobCode:this._password}));case 13:Vn(t,"internal-error");case 14:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_linkToIdToken",value:function(){var e=s(a().mark((function e(t,n){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=this.signInMethod,e.next="password"===e.t0?3:"emailLink"===e.t0?4:5;break;case 3:return e.abrupt("return",mi(t,{idToken:n,returnSecureToken:!0,email:this._email,password:this._password}));case 4:return e.abrupt("return",xi(t,{idToken:n,email:this._email,oobCode:this._password}));case 5:Vn(t,"internal-error");case 6:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_getReauthenticationResolver",value:function(e){return this._getIdTokenResponse(e)}}],[{key:"_fromEmailAndPassword",value:function(e,t){return new n(e,t,"password")}},{key:"_fromEmailAndCode",value:function(e,t){return new n(e,t,"emailLink",arguments.length>2&&void 0!==arguments[2]?arguments[2]:null)}},{key:"fromJSON",value:function(e){var t="string"===typeof e?JSON.parse(e):e;if((null===t||void 0===t?void 0:t.email)&&(null===t||void 0===t?void 0:t.password)){if("password"===t.signInMethod)return this._fromEmailAndPassword(t.email,t.password);if("emailLink"===t.signInMethod)return this._fromEmailAndCode(t.email,t.password,t.tenantId)}return null}}]),n}(vi);function Si(e,t){return Ci.apply(this,arguments)}function Ci(){return(Ci=s(a().mark((function e(t,n){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",sr(t,"POST","/v1/accounts:signInWithIdp",nr(t,n)));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Ti=function(e){_(n,e);var t=T(n);function n(){var e;return k(this,n),(e=t.apply(this,arguments)).pendingToken=null,e}return w(n,[{key:"toJSON",value:function(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,nonce:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}},{key:"_getIdTokenResponse",value:function(e){return Si(e,this.buildRequest())}},{key:"_linkToIdToken",value:function(e,t){var n=this.buildRequest();return n.idToken=t,Si(e,n)}},{key:"_getReauthenticationResolver",value:function(e){var t=this.buildRequest();return t.autoCreate=!1,Si(e,t)}},{key:"buildRequest",value:function(){var e={requestUri:"http://localhost",returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{var t={};this.idToken&&(t.id_token=this.idToken),this.accessToken&&(t.access_token=this.accessToken),this.secret&&(t.oauth_token_secret=this.secret),t.providerId=this.providerId,this.nonce&&!this.pendingToken&&(t.nonce=this.nonce),e.postBody=X(t)}return e}}],[{key:"_fromParams",value:function(e){var t=new n(e.providerId,e.signInMethod);return e.idToken||e.accessToken?(e.idToken&&(t.idToken=e.idToken),e.accessToken&&(t.accessToken=e.accessToken),e.nonce&&!e.pendingToken&&(t.nonce=e.nonce),e.pendingToken&&(t.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(t.accessToken=e.oauthToken,t.secret=e.oauthTokenSecret):Vn("argument-error"),t}},{key:"fromJSON",value:function(e){var t="string"===typeof e?JSON.parse(e):e,r=t.providerId,i=t.signInMethod,a=On(t,["providerId","signInMethod"]);if(!r||!i)return null;var o=new n(r,i);return o.idToken=a.idToken||void 0,o.accessToken=a.accessToken||void 0,o.secret=a.secret,o.nonce=a.nonce,o.pendingToken=a.pendingToken||null,o}}]),n}(vi);function Ii(e,t){return Ni.apply(this,arguments)}function Ni(){return(Ni=s(a().mark((function e(t,n){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",rr(t,"POST","/v1/accounts:sendVerificationCode",nr(t,n)));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Oi(){return(Oi=s(a().mark((function e(t,n){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",sr(t,"POST","/v1/accounts:signInWithPhoneNumber",nr(t,n)));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ri(){return(Ri=s(a().mark((function e(t,n){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,sr(t,"POST","/v1/accounts:signInWithPhoneNumber",nr(t,n));case 2:if(!(r=e.sent).temporaryProof){e.next=5;break}throw fr(t,"account-exists-with-different-credential",r);case 5:return e.abrupt("return",r);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Pi=y({},"USER_NOT_FOUND","user-not-found");function Ai(){return(Ai=s(a().mark((function e(t,n){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object.assign(Object.assign({},n),{operation:"REAUTH"}),e.abrupt("return",sr(t,"POST","/v1/accounts:signInWithPhoneNumber",nr(t,r),Pi));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Di=function(e){_(n,e);var t=T(n);function n(e){var r;return k(this,n),(r=t.call(this,"phone","phone")).params=e,r}return w(n,[{key:"_getIdTokenResponse",value:function(e){return function(e,t){return Oi.apply(this,arguments)}(e,this._makeVerificationRequest())}},{key:"_linkToIdToken",value:function(e,t){return function(e,t){return Ri.apply(this,arguments)}(e,Object.assign({idToken:t},this._makeVerificationRequest()))}},{key:"_getReauthenticationResolver",value:function(e){return function(e,t){return Ai.apply(this,arguments)}(e,this._makeVerificationRequest())}},{key:"_makeVerificationRequest",value:function(){var e=this.params,t=e.temporaryProof,n=e.phoneNumber,r=e.verificationId,i=e.verificationCode;return t&&n?{temporaryProof:t,phoneNumber:n}:{sessionInfo:r,code:i}}},{key:"toJSON",value:function(){var e={providerId:this.providerId};return this.params.phoneNumber&&(e.phoneNumber=this.params.phoneNumber),this.params.temporaryProof&&(e.temporaryProof=this.params.temporaryProof),this.params.verificationCode&&(e.verificationCode=this.params.verificationCode),this.params.verificationId&&(e.verificationId=this.params.verificationId),e}}],[{key:"_fromVerification",value:function(e,t){return new n({verificationId:e,verificationCode:t})}},{key:"_fromTokenResponse",value:function(e,t){return new n({phoneNumber:e,temporaryProof:t})}},{key:"fromJSON",value:function(e){"string"===typeof e&&(e=JSON.parse(e));var t=e,r=t.verificationId,i=t.verificationCode,a=t.phoneNumber,o=t.temporaryProof;return i||r||a||o?new n({verificationId:r,verificationCode:i,phoneNumber:a,temporaryProof:o}):null}}]),n}(vi);var Li=function(){function e(t){var n,r,i,a,o,s;k(this,e);var u=J(Z(t)),c=null!==(n=u.apiKey)&&void 0!==n?n:null,l=null!==(r=u.oobCode)&&void 0!==r?r:null,f=function(e){switch(e){case"recoverEmail":return"RECOVER_EMAIL";case"resetPassword":return"PASSWORD_RESET";case"signIn":return"EMAIL_SIGNIN";case"verifyEmail":return"VERIFY_EMAIL";case"verifyAndChangeEmail":return"VERIFY_AND_CHANGE_EMAIL";case"revertSecondFactorAddition":return"REVERT_SECOND_FACTOR_ADDITION";default:return null}}(null!==(i=u.mode)&&void 0!==i?i:null);Kn(c&&l&&f,"argument-error"),this.apiKey=c,this.operation=f,this.code=l,this.continueUrl=null!==(a=u.continueUrl)&&void 0!==a?a:null,this.languageCode=null!==(o=u.languageCode)&&void 0!==o?o:null,this.tenantId=null!==(s=u.tenantId)&&void 0!==s?s:null}return w(e,null,[{key:"parseLink",value:function(t){var n=function(e){var t=J(Z(e)).link,n=t?J(Z(t)).deep_link_id:null,r=J(Z(e)).deep_link_id;return(r?J(Z(r)).link:null)||r||n||t||e}(t);try{return new e(n)}catch(r){return null}}}]),e}();var Mi=function(){function e(){k(this,e),this.providerId=e.PROVIDER_ID}return w(e,null,[{key:"credential",value:function(e,t){return _i._fromEmailAndPassword(e,t)}},{key:"credentialWithLink",value:function(e,t){var n=Li.parseLink(t);return Kn(n,"argument-error"),_i._fromEmailAndCode(e,n.code,n.tenantId)}}]),e}();Mi.PROVIDER_ID="password",Mi.EMAIL_PASSWORD_SIGN_IN_METHOD="password",Mi.EMAIL_LINK_SIGN_IN_METHOD="emailLink";var ji=function(){function e(t){k(this,e),this.providerId=t,this.defaultLanguageCode=null,this.customParameters={}}return w(e,[{key:"setDefaultLanguage",value:function(e){this.defaultLanguageCode=e}},{key:"setCustomParameters",value:function(e){return this.customParameters=e,this}},{key:"getCustomParameters",value:function(){return this.customParameters}}]),e}(),Fi=function(e){_(n,e);var t=T(n);function n(){var e;return k(this,n),(e=t.apply(this,arguments)).scopes=[],e}return w(n,[{key:"addScope",value:function(e){return this.scopes.includes(e)||this.scopes.push(e),this}},{key:"getScopes",value:function(){return v(this.scopes)}}]),n}(ji),Ui=function(e){_(n,e);var t=T(n);function n(){return k(this,n),t.call(this,"facebook.com")}return w(n,null,[{key:"credential",value:function(e){return Ti._fromParams({providerId:n.PROVIDER_ID,signInMethod:n.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}},{key:"credentialFromResult",value:function(e){return n.credentialFromTaggedObject(e)}},{key:"credentialFromError",value:function(e){return n.credentialFromTaggedObject(e.customData||{})}},{key:"credentialFromTaggedObject",value:function(e){var t=e._tokenResponse;if(!t||!("oauthAccessToken"in t))return null;if(!t.oauthAccessToken)return null;try{return n.credential(t.oauthAccessToken)}catch(r){return null}}}]),n}(Fi);Ui.FACEBOOK_SIGN_IN_METHOD="facebook.com",Ui.PROVIDER_ID="facebook.com";var Vi=function(e){_(n,e);var t=T(n);function n(){var e;return k(this,n),(e=t.call(this,"google.com")).addScope("profile"),e}return w(n,null,[{key:"credential",value:function(e,t){return Ti._fromParams({providerId:n.PROVIDER_ID,signInMethod:n.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:t})}},{key:"credentialFromResult",value:function(e){return n.credentialFromTaggedObject(e)}},{key:"credentialFromError",value:function(e){return n.credentialFromTaggedObject(e.customData||{})}},{key:"credentialFromTaggedObject",value:function(e){var t=e._tokenResponse;if(!t)return null;var r=t.oauthIdToken,i=t.oauthAccessToken;if(!r&&!i)return null;try{return n.credential(r,i)}catch(a){return null}}}]),n}(Fi);Vi.GOOGLE_SIGN_IN_METHOD="google.com",Vi.PROVIDER_ID="google.com";var zi=function(e){_(n,e);var t=T(n);function n(){return k(this,n),t.call(this,"github.com")}return w(n,null,[{key:"credential",value:function(e){return Ti._fromParams({providerId:n.PROVIDER_ID,signInMethod:n.GITHUB_SIGN_IN_METHOD,accessToken:e})}},{key:"credentialFromResult",value:function(e){return n.credentialFromTaggedObject(e)}},{key:"credentialFromError",value:function(e){return n.credentialFromTaggedObject(e.customData||{})}},{key:"credentialFromTaggedObject",value:function(e){var t=e._tokenResponse;if(!t||!("oauthAccessToken"in t))return null;if(!t.oauthAccessToken)return null;try{return n.credential(t.oauthAccessToken)}catch(r){return null}}}]),n}(Fi);zi.GITHUB_SIGN_IN_METHOD="github.com",zi.PROVIDER_ID="github.com";var Bi=function(e){_(n,e);var t=T(n);function n(){return k(this,n),t.call(this,"twitter.com")}return w(n,null,[{key:"credential",value:function(e,t){return Ti._fromParams({providerId:n.PROVIDER_ID,signInMethod:n.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:t})}},{key:"credentialFromResult",value:function(e){return n.credentialFromTaggedObject(e)}},{key:"credentialFromError",value:function(e){return n.credentialFromTaggedObject(e.customData||{})}},{key:"credentialFromTaggedObject",value:function(e){var t=e._tokenResponse;if(!t)return null;var r=t.oauthAccessToken,i=t.oauthTokenSecret;if(!r||!i)return null;try{return n.credential(r,i)}catch(a){return null}}}]),n}(Fi);function Hi(e,t){return Ki.apply(this,arguments)}function Ki(){return(Ki=s(a().mark((function e(t,n){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",sr(t,"POST","/v1/accounts:signUp",nr(t,n)));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}Bi.TWITTER_SIGN_IN_METHOD="twitter.com",Bi.PROVIDER_ID="twitter.com";var qi=function(){function e(t){k(this,e),this.user=t.user,this.providerId=t.providerId,this._tokenResponse=t._tokenResponse,this.operationType=t.operationType}return w(e,null,[{key:"_fromIdTokenResponse",value:function(){var t=s(a().mark((function t(n,r,i){var o,s,u,c,l=arguments;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=l.length>3&&void 0!==l[3]&&l[3],t.next=3,Lr._fromIdTokenResponse(n,i,o);case 3:return s=t.sent,u=Wi(i),c=new e({user:s,providerId:u,_tokenResponse:i,operationType:r}),t.abrupt("return",c);case 7:case"end":return t.stop()}}),t)})));return function(e,n,r){return t.apply(this,arguments)}}()},{key:"_forOperation",value:function(){var t=s(a().mark((function t(n,r,i){var o;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n._updateTokensIfNecessary(i,!0);case 2:return o=Wi(i),t.abrupt("return",new e({user:n,providerId:o,_tokenResponse:i,operationType:r}));case 4:case"end":return t.stop()}}),t)})));return function(e,n,r){return t.apply(this,arguments)}}()}]),e}();function Wi(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}var Gi=function(e){_(n,e);var t=T(n);function n(e,r,i,a){var o,s;return k(this,n),(o=t.call(this,r.code,r.message)).operationType=i,o.user=a,Object.setPrototypeOf(x(o),n.prototype),o.customData={appName:e.name,tenantId:null!==(s=e.tenantId)&&void 0!==s?s:void 0,_serverResponse:r.customData._serverResponse,operationType:i},o}return w(n,null,[{key:"_fromErrorAndOperation",value:function(e,t,r,i){return new n(e,t,r,i)}}]),n}(q);function Qi(e,t,n,r){return("reauthenticate"===t?n._getReauthenticationResolver(e):n._getIdTokenResponse(e)).catch((function(n){if(n.code==="auth/".concat("multi-factor-auth-required"))throw Gi._fromErrorAndOperation(e,n,t,r);throw n}))}function $i(e,t){return Yi.apply(this,arguments)}function Yi(){return Yi=s(a().mark((function e(t,n){var r,i,o=arguments;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.length>2&&void 0!==o[2]&&o[2],e.t0=xr,e.t1=t,e.t2=n,e.t3=t.auth,e.next=7,t.getIdToken();case 7:return e.t4=e.sent,e.t5=e.t2._linkToIdToken.call(e.t2,e.t3,e.t4),e.t6=r,e.next=12,(0,e.t0)(e.t1,e.t5,e.t6);case 12:return i=e.sent,e.abrupt("return",qi._forOperation(t,"link",i));case 14:case"end":return e.stop()}}),e)}))),Yi.apply(this,arguments)}function Xi(e,t){return Ji.apply(this,arguments)}function Ji(){return Ji=s(a().mark((function e(t,n){var r,i,o,s,u,c,l=arguments;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=l.length>2&&void 0!==l[2]&&l[2],i=t.auth,o="reauthenticate",e.prev=3,e.next=6,xr(t,Qi(i,o,n,t),r);case 6:return Kn((s=e.sent).idToken,i,"internal-error"),Kn(u=wr(s.idToken),i,"internal-error"),c=u.sub,Kn(t.uid===c,i,"user-mismatch"),e.abrupt("return",qi._forOperation(t,o,s));case 15:throw e.prev=15,e.t0=e.catch(3),(null===e.t0||void 0===e.t0?void 0:e.t0.code)==="auth/".concat("user-not-found")&&Vn(i,"user-mismatch"),e.t0;case 19:case"end":return e.stop()}}),e,null,[[3,15]])}))),Ji.apply(this,arguments)}function Zi(e,t){return ea.apply(this,arguments)}function ea(){return ea=s(a().mark((function e(t,n){var r,i,o,s,u=arguments;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=u.length>2&&void 0!==u[2]&&u[2],i="signIn",e.next=4,Qi(t,i,n);case 4:return o=e.sent,e.next=7,qi._fromIdTokenResponse(t,i,o);case 7:if(s=e.sent,r){e.next=11;break}return e.next=11,t._updateCurrentUser(s.user);case 11:return e.abrupt("return",s);case 12:case"end":return e.stop()}}),e)}))),ea.apply(this,arguments)}function ta(e,t){return na.apply(this,arguments)}function na(){return(na=s(a().mark((function e(t,n){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Zi(ai(t),n));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ra(e){return ia.apply(this,arguments)}function ia(){return(ia=s(a().mark((function e(t){var n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=ai(t))._getPasswordPolicyInternal()){e.next=4;break}return e.next=4,n._updatePasswordPolicy();case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function aa(){return aa=s(a().mark((function e(t,n,r){var i,o,u,c,l,f,h;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=ai(t),u={returnSecureToken:!0,email:n,password:r,clientType:"CLIENT_TYPE_WEB"},!(null===(i=o._getRecaptchaConfig())||void 0===i?void 0:i.emailPasswordEnabled)){e.next=9;break}return e.next=5,li(o,u,"signUpPassword");case 5:l=e.sent,c=Hi(o,l),e.next=10;break;case 9:c=Hi(o,u).catch(function(){var e=s(a().mark((function e(t){var n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.code!=="auth/".concat("missing-recaptcha-token")){e.next=6;break}return console.log("Sign-up is protected by reCAPTCHA for this project. Automatically triggering the reCAPTCHA flow and restarting the sign-up flow."),e.next=4,li(o,u,"signUpPassword");case 4:return n=e.sent,e.abrupt("return",Hi(o,n));case 6:throw t;case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 10:return e.next=12,c.catch((function(e){throw e.code==="auth/".concat("password-does-not-meet-requirements")&&ra(t),e}));case 12:return f=e.sent,e.next=15,qi._fromIdTokenResponse(o,"signIn",f);case 15:return h=e.sent,e.next=18,o._updateCurrentUser(h.user);case 18:return e.abrupt("return",h);case 19:case"end":return e.stop()}}),e)}))),aa.apply(this,arguments)}function oa(e,t){return rr(e,"POST","/v2/accounts/mfaEnrollment:start",nr(e,t))}function sa(e,t){return rr(e,"POST","/v2/accounts/mfaEnrollment:finalize",nr(e,t))}new WeakMap;var ua="__sak",ca=function(){function e(t,n){k(this,e),this.storageRetriever=t,this.type=n}return w(e,[{key:"_isAvailable",value:function(){try{return this.storage?(this.storage.setItem(ua,"1"),this.storage.removeItem(ua),Promise.resolve(!0)):Promise.resolve(!1)}catch(e){return Promise.resolve(!1)}}},{key:"_set",value:function(e,t){return this.storage.setItem(e,JSON.stringify(t)),Promise.resolve()}},{key:"_get",value:function(e){var t=this.storage.getItem(e);return Promise.resolve(t?JSON.parse(t):null)}},{key:"_remove",value:function(e){return this.storage.removeItem(e),Promise.resolve()}},{key:"storage",get:function(){return this.storageRetriever()}}]),e}();var la=function(e){_(n,e);var t=T(n);function n(){var e;return k(this,n),(e=t.call(this,(function(){return window.localStorage}),"LOCAL")).boundEventHandler=function(t,n){return e.onStorageEvent(t,n)},e.listeners={},e.localCache={},e.pollTimer=null,e.safariLocalStorageNotSynced=function(){var e=H();return Kr(e)||Yr(e)}()&&function(){try{return!(!window||window===window.top)}catch(e){return!1}}(),e.fallbackToPolling=Jr(),e._shouldAllowMigration=!0,e}return w(n,[{key:"forAllChangedKeys",value:function(e){for(var t=0,n=Object.keys(this.listeners);t<n.length;t++){var r=n[t],i=this.storage.getItem(r),a=this.localCache[r];i!==a&&e(r,a,i)}}},{key:"onStorageEvent",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e.key){var r=e.key;if(n?this.detachListener():this.stopPolling(),this.safariLocalStorageNotSynced){var i=this.storage.getItem(r);if(e.newValue!==i)null!==e.newValue?this.storage.setItem(r,e.newValue):this.storage.removeItem(r);else if(this.localCache[r]===e.newValue&&!n)return}var a=function(){var e=t.storage.getItem(r);(n||t.localCache[r]!==e)&&t.notifyListeners(r,e)},o=this.storage.getItem(r);Xr()&&o!==e.newValue&&e.newValue!==e.oldValue?setTimeout(a,10):a()}else this.forAllChangedKeys((function(e,n,r){t.notifyListeners(e,r)}))}},{key:"notifyListeners",value:function(e,t){this.localCache[e]=t;var n=this.listeners[e];if(n)for(var r=0,i=Array.from(n);r<i.length;r++){(0,i[r])(t?JSON.parse(t):t)}}},{key:"startPolling",value:function(){var e=this;this.stopPolling(),this.pollTimer=setInterval((function(){e.forAllChangedKeys((function(t,n,r){e.onStorageEvent(new StorageEvent("storage",{key:t,oldValue:n,newValue:r}),!0)}))}),1e3)}},{key:"stopPolling",value:function(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}},{key:"attachListener",value:function(){window.addEventListener("storage",this.boundEventHandler)}},{key:"detachListener",value:function(){window.removeEventListener("storage",this.boundEventHandler)}},{key:"_addListener",value:function(e,t){0===Object.keys(this.listeners).length&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(t)}},{key:"_removeListener",value:function(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&(this.detachListener(),this.stopPolling())}},{key:"_set",value:function(){var e=s(a().mark((function e(t,r){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Nn(S(n.prototype),"_set",this).call(this,t,r);case 2:this.localCache[t]=JSON.stringify(r);case 3:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_get",value:function(){var e=s(a().mark((function e(t){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Nn(S(n.prototype),"_get",this).call(this,t);case 2:return r=e.sent,this.localCache[t]=JSON.stringify(r),e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_remove",value:function(){var e=s(a().mark((function e(t){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Nn(S(n.prototype),"_remove",this).call(this,t);case 2:delete this.localCache[t];case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),n}(ca);la.type="LOCAL";var fa=la,ha=function(e){_(n,e);var t=T(n);function n(){return k(this,n),t.call(this,(function(){return window.sessionStorage}),"SESSION")}return w(n,[{key:"_addListener",value:function(e,t){}},{key:"_removeListener",value:function(e,t){}}]),n}(ca);ha.type="SESSION";var da=ha;function pa(e){return Promise.all(e.map(function(){var e=s(a().mark((function e(t){var n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t;case 3:return n=e.sent,e.abrupt("return",{fulfilled:!0,value:n});case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",{fulfilled:!1,reason:e.t0});case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}()))}var va=function(){function e(t){k(this,e),this.eventTarget=t,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}return w(e,[{key:"isListeningto",value:function(e){return this.eventTarget===e}},{key:"handleEvent",value:function(){var e=s(a().mark((function e(t){var n,r,i,o,u,c,l,f;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(n=t).data,i=r.eventId,o=r.eventType,u=r.data,null===(c=this.handlersMap[o])||void 0===c?void 0:c.size){e.next=5;break}return e.abrupt("return");case 5:return n.ports[0].postMessage({status:"ack",eventId:i,eventType:o}),l=Array.from(c).map(function(){var e=s(a().mark((function e(t){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t(n.origin,u));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.next=9,pa(l);case 9:f=e.sent,n.ports[0].postMessage({status:"done",eventId:i,eventType:o,response:f});case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_subscribe",value:function(e,t){0===Object.keys(this.handlersMap).length&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(t)}},{key:"_unsubscribe",value:function(e,t){this.handlersMap[e]&&t&&this.handlersMap[e].delete(t),t&&0!==this.handlersMap[e].size||delete this.handlersMap[e],0===Object.keys(this.handlersMap).length&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}],[{key:"_getInstance",value:function(t){var n=this.receivers.find((function(e){return e.isListeningto(t)}));if(n)return n;var r=new e(t);return this.receivers.push(r),r}}]),e}();function ma(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n="",r=0;r<t;r++)n+=Math.floor(10*Math.random());return e+n}va.receivers=[];var ga=function(){function e(t){k(this,e),this.target=t,this.handlers=new Set}return w(e,[{key:"removeMessageHandler",value:function(e){e.messageChannel&&(e.messageChannel.port1.removeEventListener("message",e.onMessage),e.messageChannel.port1.close()),this.handlers.delete(e)}},{key:"_send",value:function(){var e=s(a().mark((function e(t,n){var r,i,o,s,u=this,c=arguments;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=c.length>2&&void 0!==c[2]?c[2]:50,i="undefined"!==typeof MessageChannel?new MessageChannel:null){e.next=4;break}throw new Error("connection_unavailable");case 4:return e.abrupt("return",new Promise((function(e,a){var c=ma("",20);i.port1.start();var l=setTimeout((function(){a(new Error("unsupported_event"))}),r);s={messageChannel:i,onMessage:function(t){var n=t;if(n.data.eventId===c)switch(n.data.status){case"ack":clearTimeout(l),o=setTimeout((function(){a(new Error("timeout"))}),3e3);break;case"done":clearTimeout(o),e(n.data.response);break;default:clearTimeout(l),clearTimeout(o),a(new Error("invalid_response"))}}},u.handlers.add(s),i.port1.addEventListener("message",s.onMessage),u.target.postMessage({eventType:t,eventId:c,data:n},[i.port2])})).finally((function(){s&&u.removeMessageHandler(s)})));case 5:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()}]),e}();function ya(){return window}function ka(e){ya().location.href=e}function ba(){return"undefined"!==typeof ya().WorkerGlobalScope&&"function"===typeof ya().importScripts}function wa(){return xa.apply(this,arguments)}function xa(){return(xa=s(a().mark((function e(){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===navigator||void 0===navigator?void 0:navigator.serviceWorker){e.next=2;break}return e.abrupt("return",null);case 2:return e.prev=2,e.next=5,navigator.serviceWorker.ready;case 5:return t=e.sent,e.abrupt("return",t.active);case 9:return e.prev=9,e.t0=e.catch(2),e.abrupt("return",null);case 12:case"end":return e.stop()}}),e,null,[[2,9]])})))).apply(this,arguments)}function Ea(){var e;return(null===(e=null===navigator||void 0===navigator?void 0:navigator.serviceWorker)||void 0===e?void 0:e.controller)||null}var _a="firebaseLocalStorageDb",Sa="firebaseLocalStorage",Ca="fbase_key",Ta=function(){function e(t){k(this,e),this.request=t}return w(e,[{key:"toPromise",value:function(){var e=this;return new Promise((function(t,n){e.request.addEventListener("success",(function(){t(e.request.result)})),e.request.addEventListener("error",(function(){n(e.request.error)}))}))}}]),e}();function Ia(e,t){return e.transaction([Sa],t?"readwrite":"readonly").objectStore(Sa)}function Na(){var e=indexedDB.deleteDatabase(_a);return new Ta(e).toPromise()}function Oa(){var e=indexedDB.open(_a,1);return new Promise((function(t,n){e.addEventListener("error",(function(){n(e.error)})),e.addEventListener("upgradeneeded",(function(){var t=e.result;try{t.createObjectStore(Sa,{keyPath:Ca})}catch(r){n(r)}})),e.addEventListener("success",s(a().mark((function n(){var r;return a().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if((r=e.result).objectStoreNames.contains(Sa)){n.next=12;break}return r.close(),n.next=5,Na();case 5:return n.t0=t,n.next=8,Oa();case 8:n.t1=n.sent,(0,n.t0)(n.t1),n.next=13;break;case 12:t(r);case 13:case"end":return n.stop()}}),n)}))))}))}function Ra(e,t,n){return Pa.apply(this,arguments)}function Pa(){return Pa=s(a().mark((function e(t,n,r){var i,o;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=Ia(t,!0).put((y(i={},Ca,n),y(i,"value",r),i)),e.abrupt("return",new Ta(o).toPromise());case 2:case"end":return e.stop()}}),e)}))),Pa.apply(this,arguments)}function Aa(e,t){return Da.apply(this,arguments)}function Da(){return Da=s(a().mark((function e(t,n){var r,i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Ia(t,!1).get(n),e.next=3,new Ta(r).toPromise();case 3:return i=e.sent,e.abrupt("return",void 0===i?null:i.value);case 5:case"end":return e.stop()}}),e)}))),Da.apply(this,arguments)}function La(e,t){var n=Ia(e,!0).delete(t);return new Ta(n).toPromise()}var Ma=function(){function e(){k(this,e),this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then((function(){}),(function(){}))}return w(e,[{key:"_openDb",value:function(){var e=s(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.db){e.next=2;break}return e.abrupt("return",this.db);case 2:return e.next=4,Oa();case 4:return this.db=e.sent,e.abrupt("return",this.db);case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_withRetries",value:function(){var e=s(a().mark((function e(t){var n,r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=0;case 1:return e.prev=2,e.next=5,this._openDb();case 5:return r=e.sent,e.next=8,t(r);case 8:return e.abrupt("return",e.sent);case 11:if(e.prev=11,e.t0=e.catch(2),!(n++>3)){e.next=15;break}throw e.t0;case 15:this.db&&(this.db.close(),this.db=void 0);case 16:e.next=1;break;case 18:case"end":return e.stop()}}),e,this,[[2,11]])})));return function(t){return e.apply(this,arguments)}}()},{key:"initializeServiceWorkerMessaging",value:function(){var e=s(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",ba()?this.initializeReceiver():this.initializeSender());case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"initializeReceiver",value:function(){var e=s(a().mark((function e(){var t=this;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.receiver=va._getInstance(ba()?self:null),this.receiver._subscribe("keyChanged",function(){var e=s(a().mark((function e(n,r){var i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t._poll();case 2:return i=e.sent,e.abrupt("return",{keyProcessed:i.includes(r.key)});case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()),this.receiver._subscribe("ping",function(){var e=s(a().mark((function e(t,n){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",["keyChanged"]);case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}());case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"initializeSender",value:function(){var e=s(a().mark((function e(){var t,n,r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,wa();case 2:if(this.activeServiceWorker=e.sent,this.activeServiceWorker){e.next=5;break}return e.abrupt("return");case 5:return this.sender=new ga(this.activeServiceWorker),e.next=8,this.sender._send("ping",{},800);case 8:if(r=e.sent){e.next=11;break}return e.abrupt("return");case 11:(null===(t=r[0])||void 0===t?void 0:t.fulfilled)&&(null===(n=r[0])||void 0===n?void 0:n.value.includes("keyChanged"))&&(this.serviceWorkerReceiverAvailable=!0);case 12:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"notifyServiceWorker",value:function(){var e=s(a().mark((function e(t){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.sender&&this.activeServiceWorker&&Ea()===this.activeServiceWorker){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.next=5,this.sender._send("keyChanged",{key:t},this.serviceWorkerReceiverAvailable?800:50);case 5:e.next=9;break;case 7:e.prev=7,e.t0=e.catch(2);case 9:case"end":return e.stop()}}),e,this,[[2,7]])})));return function(t){return e.apply(this,arguments)}}()},{key:"_isAvailable",value:function(){var e=s(a().mark((function e(){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,indexedDB){e.next=3;break}return e.abrupt("return",!1);case 3:return e.next=5,Oa();case 5:return t=e.sent,e.next=8,Ra(t,ua,"1");case 8:return e.next=10,La(t,ua);case 10:return e.abrupt("return",!0);case 13:e.prev=13,e.t0=e.catch(0);case 15:return e.abrupt("return",!1);case 16:case"end":return e.stop()}}),e,null,[[0,13]])})));return function(){return e.apply(this,arguments)}}()},{key:"_withPendingWrite",value:function(){var e=s(a().mark((function e(t){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.pendingWrites++,e.prev=1,e.next=4,t();case 4:return e.prev=4,this.pendingWrites--,e.finish(4);case 7:case"end":return e.stop()}}),e,this,[[1,,4,7]])})));return function(t){return e.apply(this,arguments)}}()},{key:"_set",value:function(){var e=s(a().mark((function e(t,n){var r=this;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._withPendingWrite(s(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r._withRetries((function(e){return Ra(e,t,n)}));case 2:return r.localCache[t]=n,e.abrupt("return",r.notifyServiceWorker(t));case 4:case"end":return e.stop()}}),e)})))));case 1:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_get",value:function(){var e=s(a().mark((function e(t){var n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._withRetries((function(e){return Aa(e,t)}));case 2:return n=e.sent,this.localCache[t]=n,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_remove",value:function(){var e=s(a().mark((function e(t){var n=this;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._withPendingWrite(s(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n._withRetries((function(e){return La(e,t)}));case 2:return delete n.localCache[t],e.abrupt("return",n.notifyServiceWorker(t));case 4:case"end":return e.stop()}}),e)})))));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_poll",value:function(){var e=s(a().mark((function e(){var t,n,r,i,o,s,u,c,l,f,h;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._withRetries((function(e){var t=Ia(e,!1).getAll();return new Ta(t).toPromise()}));case 2:if(t=e.sent){e.next=5;break}return e.abrupt("return",[]);case 5:if(0===this.pendingWrites){e.next=7;break}return e.abrupt("return",[]);case 7:n=[],r=new Set,i=m(t);try{for(i.s();!(o=i.n()).done;)s=o.value,u=s.fbase_key,c=s.value,r.add(u),JSON.stringify(this.localCache[u])!==JSON.stringify(c)&&(this.notifyListeners(u,c),n.push(u))}catch(a){i.e(a)}finally{i.f()}for(l=0,f=Object.keys(this.localCache);l<f.length;l++)h=f[l],this.localCache[h]&&!r.has(h)&&(this.notifyListeners(h,null),n.push(h));return e.abrupt("return",n);case 13:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"notifyListeners",value:function(e,t){this.localCache[e]=t;var n=this.listeners[e];if(n)for(var r=0,i=Array.from(n);r<i.length;r++){(0,i[r])(t)}}},{key:"startPolling",value:function(){var e=this;this.stopPolling(),this.pollTimer=setInterval(s(a().mark((function t(){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e._poll());case 1:case"end":return t.stop()}}),t)}))),800)}},{key:"stopPolling",value:function(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}},{key:"_addListener",value:function(e,t){0===Object.keys(this.listeners).length&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(t)}},{key:"_removeListener",value:function(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&this.stopPolling()}}]),e}();Ma.type="LOCAL";var ja=Ma;function Fa(e,t){return rr(e,"POST","/v2/accounts/mfaSignIn:start",nr(e,t))}function Ua(e,t){return rr(e,"POST","/v2/accounts/mfaSignIn:finalize",nr(e,t))}ui("rcb"),new Xn(3e4,6e4);var Va="recaptcha";function za(e,t,n){return Ba.apply(this,arguments)}function Ba(){return Ba=s(a().mark((function e(t,n,r){var i,o,s,u,c,l,f,h,d;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.verify();case 2:if(o=e.sent,e.prev=3,Kn("string"===typeof o,t,"argument-error"),Kn(r.type===Va,t,"argument-error"),!("session"in(s="string"===typeof n?{phoneNumber:n}:n))){e.next=26;break}if(u=s.session,!("phoneNumber"in s)){e.next=17;break}return Kn("enroll"===u.type,t,"internal-error"),e.next=13,oa(t,{idToken:u.credential,phoneEnrollmentInfo:{phoneNumber:s.phoneNumber,recaptchaToken:o}});case 13:return c=e.sent,e.abrupt("return",c.phoneSessionInfo.sessionInfo);case 17:return Kn("signin"===u.type,t,"internal-error"),Kn(l=(null===(i=s.multiFactorHint)||void 0===i?void 0:i.uid)||s.multiFactorUid,t,"missing-multi-factor-info"),e.next=22,Fa(t,{mfaPendingCredential:u.credential,mfaEnrollmentId:l,phoneSignInInfo:{recaptchaToken:o}});case 22:return f=e.sent,e.abrupt("return",f.phoneResponseInfo.sessionInfo);case 24:e.next=31;break;case 26:return e.next=28,Ii(t,{phoneNumber:s.phoneNumber,recaptchaToken:o});case 28:return h=e.sent,d=h.sessionInfo,e.abrupt("return",d);case 31:return e.prev=31,r._reset(),e.finish(31);case 34:case"end":return e.stop()}}),e,null,[[3,,31,34]])}))),Ba.apply(this,arguments)}var Ha=function(){function e(t){k(this,e),this.providerId=e.PROVIDER_ID,this.auth=ai(t)}return w(e,[{key:"verifyPhoneNumber",value:function(e,t){return za(this.auth,e,ne(t))}}],[{key:"credential",value:function(e,t){return Di._fromVerification(e,t)}},{key:"credentialFromResult",value:function(t){var n=t;return e.credentialFromTaggedObject(n)}},{key:"credentialFromError",value:function(t){return e.credentialFromTaggedObject(t.customData||{})}},{key:"credentialFromTaggedObject",value:function(e){var t=e._tokenResponse;if(!t)return null;var n=t.phoneNumber,r=t.temporaryProof;return n&&r?Di._fromTokenResponse(n,r):null}}]),e}();function Ka(e,t){return t?jr(t):(Kn(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}Ha.PROVIDER_ID="phone",Ha.PHONE_SIGN_IN_METHOD="phone";var qa=function(e){_(n,e);var t=T(n);function n(e){var r;return k(this,n),(r=t.call(this,"custom","custom")).params=e,r}return w(n,[{key:"_getIdTokenResponse",value:function(e){return Si(e,this._buildIdpRequest())}},{key:"_linkToIdToken",value:function(e,t){return Si(e,this._buildIdpRequest(t))}},{key:"_getReauthenticationResolver",value:function(e){return Si(e,this._buildIdpRequest())}},{key:"_buildIdpRequest",value:function(e){var t={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return e&&(t.idToken=e),t}}]),n}(vi);function Wa(e){return Zi(e.auth,new qa(e),e.bypassAuthState)}function Ga(e){var t=e.auth,n=e.user;return Kn(n,t,"internal-error"),Xi(n,new qa(e),e.bypassAuthState)}function Qa(e){return $a.apply(this,arguments)}function $a(){return($a=s(a().mark((function e(t){var n,r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.auth,Kn(r=t.user,n,"internal-error"),e.abrupt("return",$i(r,new qa(t),t.bypassAuthState));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Ya=function(){function e(t,n,r,i){var a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];k(this,e),this.auth=t,this.resolver=r,this.user=i,this.bypassAuthState=a,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(n)?n:[n]}return w(e,[{key:"execute",value:function(){var e=this;return new Promise(function(){var t=s(a().mark((function t(n,r){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.pendingPromise={resolve:n,reject:r},t.prev=1,t.next=4,e.resolver._initialize(e.auth);case 4:return e.eventManager=t.sent,t.next=7,e.onExecution();case 7:e.eventManager.registerConsumer(e),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(1),e.reject(t.t0);case 13:case"end":return t.stop()}}),t,null,[[1,10]])})));return function(e,n){return t.apply(this,arguments)}}())}},{key:"onAuthEvent",value:function(){var e=s(a().mark((function e(t){var n,r,i,o,s,u,c;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.urlResponse,r=t.sessionId,i=t.postBody,o=t.tenantId,s=t.error,u=t.type,!s){e.next=4;break}return this.reject(s),e.abrupt("return");case 4:return c={auth:this.auth,requestUri:n,sessionId:r,tenantId:o||void 0,postBody:i||void 0,user:this.user,bypassAuthState:this.bypassAuthState},e.prev=5,e.t0=this,e.next=9,this.getIdpTask(u)(c);case 9:e.t1=e.sent,e.t0.resolve.call(e.t0,e.t1),e.next=16;break;case 13:e.prev=13,e.t2=e.catch(5),this.reject(e.t2);case 16:case"end":return e.stop()}}),e,this,[[5,13]])})));return function(t){return e.apply(this,arguments)}}()},{key:"onError",value:function(e){this.reject(e)}},{key:"getIdpTask",value:function(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return Wa;case"linkViaPopup":case"linkViaRedirect":return Qa;case"reauthViaPopup":case"reauthViaRedirect":return Ga;default:Vn(this.auth,"internal-error")}}},{key:"resolve",value:function(e){Wn(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}},{key:"reject",value:function(e){Wn(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}},{key:"unregisterAndCleanUp",value:function(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}]),e}(),Xa=new Xn(2e3,1e4);var Ja=function(e){_(n,e);var t=T(n);function n(e,r,i,a,o){var s;return k(this,n),(s=t.call(this,e,r,a,o)).provider=i,s.authWindow=null,s.pollId=null,n.currentPopupAction&&n.currentPopupAction.cancel(),n.currentPopupAction=x(s),s}return w(n,[{key:"executeNotNull",value:function(){var e=s(a().mark((function e(){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.execute();case 2:return Kn(t=e.sent,this.auth,"internal-error"),e.abrupt("return",t);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"onExecution",value:function(){var e=s(a().mark((function e(){var t,n=this;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Wn(1===this.filter.length,"Popup operations only handle one event"),t=ma(),e.next=4,this.resolver._openPopup(this.auth,this.provider,this.filter[0],t);case 4:this.authWindow=e.sent,this.authWindow.associatedEvent=t,this.resolver._originValidation(this.auth).catch((function(e){n.reject(e)})),this.resolver._isIframeWebStorageSupported(this.auth,(function(e){e||n.reject(zn(n.auth,"web-storage-unsupported"))})),this.pollUserCancellation();case 9:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"eventId",get:function(){var e;return(null===(e=this.authWindow)||void 0===e?void 0:e.associatedEvent)||null}},{key:"cancel",value:function(){this.reject(zn(this.auth,"cancelled-popup-request"))}},{key:"cleanUp",value:function(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,n.currentPopupAction=null}},{key:"pollUserCancellation",value:function(){var e=this;!function t(){var n,r;(null===(r=null===(n=e.authWindow)||void 0===n?void 0:n.window)||void 0===r?void 0:r.closed)?e.pollId=window.setTimeout((function(){e.pollId=null,e.reject(zn(e.auth,"popup-closed-by-user"))}),8e3):e.pollId=window.setTimeout(t,Xa.get())}()}}]),n}(Ya);Ja.currentPopupAction=null;var Za="pendingRedirect",eo=new Map,to=function(e){_(n,e);var t=T(n);function n(e,r){var i,a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return k(this,n),(i=t.call(this,e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],r,void 0,a)).eventId=null,i}return w(n,[{key:"execute",value:function(){var e=s(a().mark((function e(){var t,r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=eo.get(this.auth._key())){e.next=21;break}return e.prev=2,e.next=5,no(this.resolver,this.auth);case 5:if(!e.sent){e.next=12;break}return e.next=9,Nn(S(n.prototype),"execute",this).call(this);case 9:e.t0=e.sent,e.next=13;break;case 12:e.t0=null;case 13:r=e.t0,t=function(){return Promise.resolve(r)},e.next=20;break;case 17:e.prev=17,e.t1=e.catch(2),t=function(){return Promise.reject(e.t1)};case 20:eo.set(this.auth._key(),t);case 21:return this.bypassAuthState||eo.set(this.auth._key(),(function(){return Promise.resolve(null)})),e.abrupt("return",t());case 23:case"end":return e.stop()}}),e,this,[[2,17]])})));return function(){return e.apply(this,arguments)}}()},{key:"onAuthEvent",value:function(){var e=s(a().mark((function e(t){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("signInViaRedirect"!==t.type){e.next=4;break}return e.abrupt("return",Nn(S(n.prototype),"onAuthEvent",this).call(this,t));case 4:if("unknown"!==t.type){e.next=7;break}return this.resolve(null),e.abrupt("return");case 7:if(!t.eventId){e.next=17;break}return e.next=10,this.auth._redirectUserForId(t.eventId);case 10:if(!(r=e.sent)){e.next=16;break}return this.user=r,e.abrupt("return",Nn(S(n.prototype),"onAuthEvent",this).call(this,t));case 16:this.resolve(null);case 17:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"onExecution",value:function(){var e=s(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"cleanUp",value:function(){}}]),n}(Ya);function no(e,t){return ro.apply(this,arguments)}function ro(){return(ro=s(a().mark((function e(t,n){var r,i,o;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=oo(n),i=ao(t),e.next=4,i._isAvailable();case 4:if(e.sent){e.next=6;break}return e.abrupt("return",!1);case 6:return e.next=8,i._get(r);case 8:return e.t0=e.sent,o="true"===e.t0,e.next=12,i._remove(r);case 12:return e.abrupt("return",o);case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function io(e,t){eo.set(e._key(),t)}function ao(e){return jr(e._redirectPersistence)}function oo(e){return Vr(Za,e.config.apiKey,e.name)}function so(e,t){return uo.apply(this,arguments)}function uo(){return uo=s(a().mark((function e(t,n){var r,i,o,s,u,c=arguments;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=c.length>2&&void 0!==c[2]&&c[2],i=ai(t),o=Ka(i,n),s=new to(i,o,r),e.next=6,s.execute();case 6:if(!(u=e.sent)||r){e.next=13;break}return delete u.user._redirectEventId,e.next=11,i._persistUserIfCurrent(u.user);case 11:return e.next=13,i._setRedirectUser(null,n);case 13:return e.abrupt("return",u);case 14:case"end":return e.stop()}}),e)}))),uo.apply(this,arguments)}var co=function(){function e(t){k(this,e),this.auth=t,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}return w(e,[{key:"registerConsumer",value:function(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}},{key:"unregisterConsumer",value:function(e){this.consumers.delete(e)}},{key:"onEvent",value:function(e){var t=this;if(this.hasEventBeenHandled(e))return!1;var n=!1;return this.consumers.forEach((function(r){t.isEventForConsumer(e,r)&&(n=!0,t.sendToConsumer(e,r),t.saveEventToCache(e))})),this.hasHandledPotentialRedirect||!function(e){switch(e.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return fo(e);default:return!1}}(e)||(this.hasHandledPotentialRedirect=!0,n||(this.queuedRedirectEvent=e,n=!0)),n}},{key:"sendToConsumer",value:function(e,t){var n;if(e.error&&!fo(e)){var r=(null===(n=e.error.code)||void 0===n?void 0:n.split("auth/")[1])||"internal-error";t.onError(zn(this.auth,r))}else t.onAuthEvent(e)}},{key:"isEventForConsumer",value:function(e,t){var n=null===t.eventId||!!e.eventId&&e.eventId===t.eventId;return t.filter.includes(e.type)&&n}},{key:"hasEventBeenHandled",value:function(e){return Date.now()-this.lastProcessedEventTime>=6e5&&this.cachedEventUids.clear(),this.cachedEventUids.has(lo(e))}},{key:"saveEventToCache",value:function(e){this.cachedEventUids.add(lo(e)),this.lastProcessedEventTime=Date.now()}}]),e}();function lo(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter((function(e){return e})).join("-")}function fo(e){var t=e.type,n=e.error;return"unknown"===t&&(null===n||void 0===n?void 0:n.code)==="auth/".concat("no-auth-event")}function ho(e){return po.apply(this,arguments)}function po(){return po=s(a().mark((function e(t){var n,r=arguments;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:{},e.abrupt("return",rr(t,"GET","/v1/projects",n));case 2:case"end":return e.stop()}}),e)}))),po.apply(this,arguments)}var vo=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,mo=/^https?/;function go(){return(go=s(a().mark((function e(t){var n,r,i,o,s;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.config.emulator){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,ho(t);case 4:n=e.sent,r=n.authorizedDomains,i=m(r),e.prev=7,i.s();case 9:if((o=i.n()).done){e.next=20;break}if(s=o.value,e.prev=11,!yo(s)){e.next=14;break}return e.abrupt("return");case 14:e.next=18;break;case 16:e.prev=16,e.t0=e.catch(11);case 18:e.next=9;break;case 20:e.next=25;break;case 22:e.prev=22,e.t1=e.catch(7),i.e(e.t1);case 25:return e.prev=25,i.f(),e.finish(25);case 28:Vn(t,"unauthorized-domain");case 29:case"end":return e.stop()}}),e,null,[[7,22,25,28],[11,16]])})))).apply(this,arguments)}function yo(e){var t=Gn(),n=new URL(t),r=n.protocol,i=n.hostname;if(e.startsWith("chrome-extension://")){var a=new URL(e);return""===a.hostname&&""===i?"chrome-extension:"===r&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):"chrome-extension:"===r&&a.hostname===i}if(!mo.test(r))return!1;if(vo.test(e))return i===e;var o=e.replace(/\./g,"\\.");return new RegExp("^(.+\\."+o+"|"+o+")$","i").test(i)}var ko=new Xn(3e4,6e4);function bo(){var e=ya().___jsl;if(null===e||void 0===e?void 0:e.H)for(var t=0,n=Object.keys(e.H);t<n.length;t++){var r=n[t];if(e.H[r].r=e.H[r].r||[],e.H[r].L=e.H[r].L||[],e.H[r].r=v(e.H[r].L),e.CP)for(var i=0;i<e.CP.length;i++)e.CP[i]=null}}var wo=null;function xo(e){return wo=wo||function(e){return new Promise((function(t,n){var r,i,a;function o(){bo(),gapi.load("gapi.iframes",{callback:function(){t(gapi.iframes.getContext())},ontimeout:function(){bo(),n(zn(e,"network-request-failed"))},timeout:ko.get()})}if(null===(i=null===(r=ya().gapi)||void 0===r?void 0:r.iframes)||void 0===i?void 0:i.Iframe)t(gapi.iframes.getContext());else{if(!(null===(a=ya().gapi)||void 0===a?void 0:a.load)){var s=ui("iframefcb");return ya()[s]=function(){gapi.load?o():n(zn(e,"network-request-failed"))},si("https://apis.google.com/js/api.js?onload=".concat(s)).catch((function(e){return n(e)}))}o()}})).catch((function(e){throw wo=null,e}))}(e),wo}var Eo=new Xn(5e3,15e3),_o="__/auth/iframe",So="emulator/auth/iframe",Co={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},To=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function Io(e){var t=e.config;Kn(t.authDomain,e,"auth-domain-config-required");var n=t.emulator?Jn(t,So):"https://".concat(e.config.authDomain,"/").concat(_o),r={apiKey:t.apiKey,appName:e.name,v:Ye},i=To.get(e.config.apiHost);i&&(r.eid=i);var a=e._getFrameworks();return a.length&&(r.fw=a.join(",")),"".concat(n,"?").concat(X(r).slice(1))}function No(e){return Oo.apply(this,arguments)}function Oo(){return Oo=s(a().mark((function e(t){var n,r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,xo(t);case 2:return n=e.sent,Kn(r=ya().gapi,t,"internal-error"),e.abrupt("return",n.open({where:document.body,url:Io(t),messageHandlersFilter:r.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:Co,dontclear:!0},(function(e){return new Promise(function(){var n=s(a().mark((function n(r,i){var o,s,u;return a().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return u=function(){ya().clearTimeout(s),r(e)},n.next=3,e.restyle({setHideOnLeave:!1});case 3:o=zn(t,"network-request-failed"),s=ya().setTimeout((function(){i(o)}),Eo.get()),e.ping(u).then(u,(function(){i(o)}));case 6:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}())})));case 6:case"end":return e.stop()}}),e)}))),Oo.apply(this,arguments)}var Ro={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},Po=function(){function e(t){k(this,e),this.window=t,this.associatedEvent=null}return w(e,[{key:"close",value:function(){if(this.window)try{this.window.close()}catch(e){}}}]),e}();function Ao(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:500,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:600,a=Math.max((window.screen.availHeight-i)/2,0).toString(),o=Math.max((window.screen.availWidth-r)/2,0).toString(),s="",u=Object.assign(Object.assign({},Ro),{width:r.toString(),height:i.toString(),top:a,left:o}),c=H().toLowerCase();n&&(s=qr(c)?"_blank":n),Hr(c)&&(t=t||"http://localhost",u.scrollbars="yes");var l=Object.entries(u).reduce((function(e,t){var n=h(t,2),r=n[0],i=n[1];return"".concat(e).concat(r,"=").concat(i,",")}),"");if(function(){var e;return Yr(arguments.length>0&&void 0!==arguments[0]?arguments[0]:H())&&!!(null===(e=window.navigator)||void 0===e?void 0:e.standalone)}(c)&&"_self"!==s)return function(e,t){var n=document.createElement("a");n.href=e,n.target=t;var r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}(t||"",s),new Po(null);var f=window.open(t||"",s,l);Kn(f,e,"popup-blocked");try{f.focus()}catch(d){}return new Po(f)}var Do="__/auth/handler",Lo="emulator/auth/handler",Mo=encodeURIComponent("fac");function jo(e,t,n,r,i,a){return Fo.apply(this,arguments)}function Fo(){return(Fo=s(a().mark((function e(t,n,r,i,o,s){var u,c,l,f,d,p,v,m,g,y,k,b,w;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Kn(t.config.authDomain,t,"auth-domain-config-required"),Kn(t.config.apiKey,t,"invalid-api-key"),u={apiKey:t.config.apiKey,appName:t.name,authType:r,redirectUrl:i,v:Ye,eventId:o},n instanceof ji)for(n.setDefaultLanguage(t.languageCode),u.providerId=n.providerId||"",Q(n.getCustomParameters())||(u.customParameters=JSON.stringify(n.getCustomParameters())),c=0,l=Object.entries(s||{});c<l.length;c++)f=h(l[c],2),d=f[0],p=f[1],u[d]=p;for(n instanceof Fi&&(v=n.getScopes().filter((function(e){return""!==e}))).length>0&&(u.scopes=v.join(",")),t.tenantId&&(u.tid=t.tenantId),m=u,g=0,y=Object.keys(m);g<y.length;g++)k=y[g],void 0===m[k]&&delete m[k];return e.next=10,t._getAppCheckToken();case 10:return b=e.sent,w=b?"#".concat(Mo,"=").concat(encodeURIComponent(b)):"",e.abrupt("return","".concat(Uo(t),"?").concat(X(m).slice(1)).concat(w));case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Uo(e){var t=e.config;return t.emulator?Jn(t,Lo):"https://".concat(t.authDomain,"/").concat(Do)}var Vo="webStorageSupport",zo=function(){function e(){k(this,e),this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=da,this._completeRedirectFn=so,this._overrideRedirectResult=io}return w(e,[{key:"_openPopup",value:function(){var e=s(a().mark((function e(t,n,r,i){var o,s;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Wn(null===(o=this.eventManagers[t._key()])||void 0===o?void 0:o.manager,"_initialize() not called before _openPopup()"),e.next=3,jo(t,n,r,Gn(),i);case 3:return s=e.sent,e.abrupt("return",Ao(t,s,ma()));case 5:case"end":return e.stop()}}),e,this)})));return function(t,n,r,i){return e.apply(this,arguments)}}()},{key:"_openRedirect",value:function(){var e=s(a().mark((function e(t,n,r,i){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._originValidation(t);case 2:return e.next=4,jo(t,n,r,Gn(),i);case 4:return ka(e.sent),e.abrupt("return",new Promise((function(){})));case 7:case"end":return e.stop()}}),e,this)})));return function(t,n,r,i){return e.apply(this,arguments)}}()},{key:"_initialize",value:function(e){var t=this,n=e._key();if(this.eventManagers[n]){var r=this.eventManagers[n],i=r.manager,a=r.promise;return i?Promise.resolve(i):(Wn(a,"If manager is not set, promise should be"),a)}var o=this.initAndGetManager(e);return this.eventManagers[n]={promise:o},o.catch((function(){delete t.eventManagers[n]})),o}},{key:"initAndGetManager",value:function(){var e=s(a().mark((function e(t){var n,r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,No(t);case 2:return n=e.sent,r=new co(t),n.register("authEvent",(function(e){return Kn(null===e||void 0===e?void 0:e.authEvent,t,"invalid-auth-event"),{status:r.onEvent(e.authEvent)?"ACK":"ERROR"}}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[t._key()]={manager:r},this.iframes[t._key()]=n,e.abrupt("return",r);case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_isIframeWebStorageSupported",value:function(e,t){this.iframes[e._key()].send(Vo,{type:Vo},(function(n){var r,i=null===(r=null===n||void 0===n?void 0:n[0])||void 0===r?void 0:r[Vo];void 0!==i&&t(!!i),Vn(e,"internal-error")}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}},{key:"_originValidation",value:function(e){var t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=function(e){return go.apply(this,arguments)}(e)),this.originValidationPromises[t]}},{key:"_shouldInitProactively",get:function(){return Jr()||Kr()||Yr()}}]),e}(),Bo=zo,Ho=function(){function e(t){k(this,e),this.factorId=t}return w(e,[{key:"_process",value:function(e,t,n){switch(t.type){case"enroll":return this._finalizeEnroll(e,t.credential,n);case"signin":return this._finalizeSignIn(e,t.credential);default:return qn("unexpected MultiFactorSessionType")}}}]),e}(),Ko=function(e){_(n,e);var t=T(n);function n(e){var r;return k(this,n),(r=t.call(this,"phone")).credential=e,r}return w(n,[{key:"_finalizeEnroll",value:function(e,t,n){return function(e,t){return rr(e,"POST","/v2/accounts/mfaEnrollment:finalize",nr(e,t))}(e,{idToken:t,displayName:n,phoneVerificationInfo:this.credential._makeVerificationRequest()})}},{key:"_finalizeSignIn",value:function(e,t){return function(e,t){return rr(e,"POST","/v2/accounts/mfaSignIn:finalize",nr(e,t))}(e,{mfaPendingCredential:t,phoneVerificationInfo:this.credential._makeVerificationRequest()})}}],[{key:"_fromCredential",value:function(e){return new n(e)}}]),n}(Ho);(function(){function e(){k(this,e)}return w(e,null,[{key:"assertion",value:function(e){return Ko._fromCredential(e)}}]),e}()).FACTOR_ID="phone";var qo=function(){function e(){k(this,e)}return w(e,null,[{key:"assertionForEnrollment",value:function(e,t){return Wo._fromSecret(e,t)}},{key:"assertionForSignIn",value:function(e,t){return Wo._fromEnrollmentId(e,t)}},{key:"generateSecret",value:function(){var e=s(a().mark((function e(t){var n,r,i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Kn("undefined"!==typeof(null===(n=(r=t).user)||void 0===n?void 0:n.auth),"internal-error"),e.next=4,a=r.user.auth,o={idToken:r.credential,totpEnrollmentInfo:{}},rr(a,"POST","/v2/accounts/mfaEnrollment:start",nr(a,o));case 4:return i=e.sent,e.abrupt("return",Go._fromStartTotpMfaEnrollmentResponse(i,r.user.auth));case 6:case"end":return e.stop()}var a,o}),e)})));return function(t){return e.apply(this,arguments)}}()}]),e}();qo.FACTOR_ID="totp";var Wo=function(e){_(n,e);var t=T(n);function n(e,r,i){var a;return k(this,n),(a=t.call(this,"totp")).otp=e,a.enrollmentId=r,a.secret=i,a}return w(n,[{key:"_finalizeEnroll",value:function(){var e=s(a().mark((function e(t,n,r){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Kn("undefined"!==typeof this.secret,t,"argument-error"),e.abrupt("return",sa(t,{idToken:n,displayName:r,totpVerificationInfo:this.secret._makeTotpVerificationInfo(this.otp)}));case 2:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"_finalizeSignIn",value:function(){var e=s(a().mark((function e(t,n){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Kn(void 0!==this.enrollmentId&&void 0!==this.otp,t,"argument-error"),r={verificationCode:this.otp},e.abrupt("return",Ua(t,{mfaPendingCredential:n,mfaEnrollmentId:this.enrollmentId,totpVerificationInfo:r}));case 3:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()}],[{key:"_fromSecret",value:function(e,t){return new n(t,void 0,e)}},{key:"_fromEnrollmentId",value:function(e,t){return new n(t,e)}}]),n}(Ho),Go=function(){function e(t,n,r,i,a,o,s){k(this,e),this.sessionInfo=o,this.auth=s,this.secretKey=t,this.hashingAlgorithm=n,this.codeLength=r,this.codeIntervalSeconds=i,this.enrollmentCompletionDeadline=a}return w(e,[{key:"_makeTotpVerificationInfo",value:function(e){return{sessionInfo:this.sessionInfo,verificationCode:e}}},{key:"generateQrCodeUrl",value:function(e,t){var n,r=!1;return(Qo(e)||Qo(t))&&(r=!0),r&&(Qo(e)&&(e=(null===(n=this.auth.currentUser)||void 0===n?void 0:n.email)||"unknownuser"),Qo(t)&&(t=this.auth.name)),"otpauth://totp/".concat(t,":").concat(e,"?secret=").concat(this.secretKey,"&issuer=").concat(t,"&algorithm=").concat(this.hashingAlgorithm,"&digits=").concat(this.codeLength)}}],[{key:"_fromStartTotpMfaEnrollmentResponse",value:function(t,n){return new e(t.totpSessionInfo.sharedSecretKey,t.totpSessionInfo.hashingAlgorithm,t.totpSessionInfo.verificationCodeLength,t.totpSessionInfo.periodSec,new Date(t.totpSessionInfo.finalizeEnrollmentTime).toUTCString(),t.totpSessionInfo.sessionInfo,n)}}]),e}();function Qo(e){return"undefined"===typeof e||0===(null===e||void 0===e?void 0:e.length)}var $o="@firebase/auth",Yo="1.3.0",Xo=function(){function e(t){k(this,e),this.auth=t,this.internalListeners=new Map}return w(e,[{key:"getUid",value:function(){var e;return this.assertAuthConfigured(),(null===(e=this.auth.currentUser)||void 0===e?void 0:e.uid)||null}},{key:"getToken",value:function(){var e=s(a().mark((function e(t){var n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.assertAuthConfigured(),e.next=3,this.auth._initializationPromise;case 3:if(this.auth.currentUser){e.next=5;break}return e.abrupt("return",null);case 5:return e.next=7,this.auth.currentUser.getIdToken(t);case 7:return n=e.sent,e.abrupt("return",{accessToken:n});case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"addAuthTokenListener",value:function(e){if(this.assertAuthConfigured(),!this.internalListeners.has(e)){var t=this.auth.onIdTokenChanged((function(t){e((null===t||void 0===t?void 0:t.stsTokenManager.accessToken)||null)}));this.internalListeners.set(e,t),this.updateProactiveRefresh()}}},{key:"removeAuthTokenListener",value:function(e){this.assertAuthConfigured();var t=this.internalListeners.get(e);t&&(this.internalListeners.delete(e),t(),this.updateProactiveRefresh())}},{key:"assertAuthConfigured",value:function(){Kn(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}},{key:"updateProactiveRefresh",value:function(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}]),e}();var Jo,Zo=V("authIdTokenMaxAge")||300,es=null,ts=function(e){return function(){var t=s(a().mark((function t(n){var r,i,o;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.t0=n,!t.t0){t.next=5;break}return t.next=4,n.getIdTokenResult();case 4:t.t0=t.sent;case 5:if(r=t.t0,!((i=r&&((new Date).getTime()-Date.parse(r.issuedAtTime))/1e3)&&i>Zo)){t.next=9;break}return t.abrupt("return");case 9:if(o=null===r||void 0===r?void 0:r.token,es!==o){t.next=12;break}return t.abrupt("return");case 12:return es=o,t.next=15,fetch(e,{method:o?"POST":"DELETE",headers:o?{Authorization:"Bearer ".concat(o)}:{}});case 15:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()};function ns(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Je(),t=We(e,"auth");if(t.isInitialized())return t.getImmediate();var n=function(e,t){var n=We(e,"auth");if(n.isInitialized()){var r=n.getImmediate();if($(n.getOptions(),null!==t&&void 0!==t?t:{}))return r;Vn(r,"already-initialized")}return n.initialize({options:t})}(e,{popupRedirectResolver:Bo,persistence:[ja,fa,da]}),r=V("authTokenSyncURL");if(r){var i=ts(r);!function(e,t,n){ne(e).beforeAuthStateChanged(t,n)}(n,i,(function(){return i(n.currentUser)})),function(e,t,n,r){ne(e).onIdTokenChanged(t,n,r)}(n,(function(e){return i(e)}))}var a=j("auth");return a&&hi(n,"http://".concat(a)),n}Jo="Browser",qe(new re("auth",(function(e,t){var n=t.options,r=e.getProvider("app").getImmediate(),i=e.getProvider("heartbeat"),a=e.getProvider("app-check-internal"),o=r.options,s=o.apiKey,u=o.authDomain;Kn(s&&!s.includes(":"),"invalid-api-key",{appName:r.name});var c={apiKey:s,authDomain:u,clientPlatform:Jo,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:Zr(Jo)},l=new ii(r,i,a,c);return function(e,t){var n=(null===t||void 0===t?void 0:t.persistence)||[],r=(Array.isArray(n)?n:[n]).map(jr);(null===t||void 0===t?void 0:t.errorMap)&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(r,null===t||void 0===t?void 0:t.popupRedirectResolver)}(l,n),l}),"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((function(e,t,n){e.getProvider("auth-internal").initialize()}))),qe(new re("auth-internal",(function(e){return function(e){return new Xo(e)}(ai(e.getProvider("auth").getImmediate()))}),"PRIVATE").setInstantiationMode("EXPLICIT")),Ze($o,Yo,function(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";default:return}}(Jo)),Ze($o,Yo,"esm2017");var rs,is="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{},as={},os=os||{},ss=is||self;function us(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 cs(e){var t=typeof e;return"object"==t&&null!=e||"function"==t}var ls="closure_uid_"+(1e9*Math.random()>>>0),fs=0;function hs(e,t,n){return e.call.apply(e.bind,arguments)}function ds(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 ps(e,t,n){return(ps=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?hs:ds).apply(null,arguments)}function vs(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 ms(e,t){function n(){}n.prototype=t.prototype,e.$=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.ac=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 gs(){this.s=this.s,this.o=this.o}gs.prototype.s=!1,gs.prototype.sa=function(){var e;!this.s&&(this.s=!0,this.N(),0)&&(e=this,Object.prototype.hasOwnProperty.call(e,ls)&&e[ls]||(e[ls]=++fs))},gs.prototype.N=function(){if(this.o)for(;this.o.length;)this.o.shift()()};var ys=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 ks(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 bs(e,t){for(var n=1;n<arguments.length;n++){var r=arguments[n];if(us(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 ws(e,t){this.type=e,this.g=this.target=t,this.defaultPrevented=!1}ws.prototype.h=function(){this.defaultPrevented=!0};var xs=function(){if(!ss.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});try{ss.addEventListener("test",(function(){}),t),ss.removeEventListener("test",(function(){}),t)}catch(n){}return e}();function Es(e){return/^[\s\xa0]*$/.test(e)}function _s(){var e=ss.navigator;return e&&(e=e.userAgent)?e:""}function Ss(e){return-1!=_s().indexOf(e)}function Cs(e){return Cs[" "](e),e}Cs[" "]=function(){};var Ts,Is,Ns=Ss("Opera"),Os=Ss("Trident")||Ss("MSIE"),Rs=Ss("Edge"),Ps=Rs||Os,As=Ss("Gecko")&&!(-1!=_s().toLowerCase().indexOf("webkit")&&!Ss("Edge"))&&!(Ss("Trident")||Ss("MSIE"))&&!Ss("Edge"),Ds=-1!=_s().toLowerCase().indexOf("webkit")&&!Ss("Edge");function Ls(){var e=ss.document;return e?e.documentMode:void 0}e:{var Ms="",js=function(){var e=_s();return As?/rv:([^\);]+)(\)|;)/.exec(e):Rs?/Edge\/([\d\.]+)/.exec(e):Os?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(e):Ds?/WebKit\/(\S+)/.exec(e):Ns?/(?:Version)[ \/]?(\S+)/.exec(e):void 0}();if(js&&(Ms=js?js[1]:""),Os){var Fs=Ls();if(null!=Fs&&Fs>parseFloat(Ms)){Ts=String(Fs);break e}}Ts=Ms}if(ss.document&&Os){var Us=Ls();Is=Us||(parseInt(Ts,10)||void 0)}else Is=void 0;var Vs=Is;function zs(e,t){if(ws.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(As){e:{try{Cs(t.nodeName);var i=!0;break e}catch(a){}i=!1}i||(t=null)}}else"mouseover"==n?t=e.fromElement:"mouseout"==n&&(t=e.toElement);this.relatedTarget=t,r?(this.clientX=void 0!==r.clientX?r.clientX:r.pageX,this.clientY=void 0!==r.clientY?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0):(this.clientX=void 0!==e.clientX?e.clientX:e.pageX,this.clientY=void 0!==e.clientY?e.clientY:e.pageY,this.screenX=e.screenX||0,this.screenY=e.screenY||0),this.button=e.button,this.key=e.key||"",this.ctrlKey=e.ctrlKey,this.altKey=e.altKey,this.shiftKey=e.shiftKey,this.metaKey=e.metaKey,this.pointerId=e.pointerId||0,this.pointerType="string"===typeof e.pointerType?e.pointerType:Bs[e.pointerType]||"",this.state=e.state,this.i=e,e.defaultPrevented&&zs.$.h.call(this)}}ms(zs,ws);var Bs={2:"touch",3:"pen",4:"mouse"};zs.prototype.h=function(){zs.$.h.call(this);var e=this.i;e.preventDefault?e.preventDefault():e.returnValue=!1};var Hs="closure_listenable_"+(1e6*Math.random()|0),Ks=0;function qs(e,t,n,r,i){this.listener=e,this.proxy=null,this.src=t,this.type=n,this.capture=!!r,this.la=i,this.key=++Ks,this.fa=this.ia=!1}function Ws(e){e.fa=!0,e.listener=null,e.proxy=null,e.src=null,e.la=null}function Gs(e,t,n){for(var r in e)t.call(n,e[r],r,e)}function Qs(e){var t={};for(var n in e)t[n]=e[n];return t}var $s="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function Ys(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<$s.length;a++)n=$s[a],Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}}function Xs(e){this.src=e,this.g={},this.h=0}function Js(e,t){var n=t.type;if(n in e.g){var r,i=e.g[n],a=ys(i,t);(r=0<=a)&&Array.prototype.splice.call(i,a,1),r&&(Ws(t),0==e.g[n].length&&(delete e.g[n],e.h--))}}function Zs(e,t,n,r){for(var i=0;i<e.length;++i){var a=e[i];if(!a.fa&&a.listener==t&&a.capture==!!n&&a.la==r)return i}return-1}Xs.prototype.add=function(e,t,n,r,i){var a=e.toString();(e=this.g[a])||(e=this.g[a]=[],this.h++);var o=Zs(e,t,r,i);return-1<o?(t=e[o],n||(t.ia=!1)):((t=new qs(t,this.src,a,!!r,i)).ia=n,e.push(t)),t};var eu="closure_lm_"+(1e6*Math.random()|0),tu={};function nu(e,t,n,r,i){if(r&&r.once)return iu(e,t,n,r,i);if(Array.isArray(t)){for(var a=0;a<t.length;a++)nu(e,t[a],n,r,i);return null}return n=fu(n),e&&e[Hs]?e.O(t,n,cs(r)?!!r.capture:!!r,i):ru(e,t,n,!1,r,i)}function ru(e,t,n,r,i,a){if(!t)throw Error("Invalid event type");var o=cs(i)?!!i.capture:!!i,s=cu(e);if(s||(e[eu]=s=new Xs(e)),(n=s.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=uu;return e}(),n.proxy=r,r.src=e,r.listener=n,e.addEventListener)xs||(i=o),void 0===i&&(i=!1),e.addEventListener(t.toString(),r,i);else if(e.attachEvent)e.attachEvent(su(t.toString()),r);else{if(!e.addListener||!e.removeListener)throw Error("addEventListener and attachEvent are unavailable.");e.addListener(r)}return n}function iu(e,t,n,r,i){if(Array.isArray(t)){for(var a=0;a<t.length;a++)iu(e,t[a],n,r,i);return null}return n=fu(n),e&&e[Hs]?e.P(t,n,cs(r)?!!r.capture:!!r,i):ru(e,t,n,!0,r,i)}function au(e,t,n,r,i){if(Array.isArray(t))for(var a=0;a<t.length;a++)au(e,t[a],n,r,i);else r=cs(r)?!!r.capture:!!r,n=fu(n),e&&e[Hs]?(e=e.i,(t=String(t).toString())in e.g&&(-1<(n=Zs(a=e.g[t],n,r,i))&&(Ws(a[n]),Array.prototype.splice.call(a,n,1),0==a.length&&(delete e.g[t],e.h--)))):e&&(e=cu(e))&&(t=e.g[t.toString()],e=-1,t&&(e=Zs(t,n,r,i)),(n=-1<e?t[e]:null)&&ou(n))}function ou(e){if("number"!==typeof e&&e&&!e.fa){var t=e.src;if(t&&t[Hs])Js(t.i,e);else{var n=e.type,r=e.proxy;t.removeEventListener?t.removeEventListener(n,r,e.capture):t.detachEvent?t.detachEvent(su(n),r):t.addListener&&t.removeListener&&t.removeListener(r),(n=cu(t))?(Js(n,e),0==n.h&&(n.src=null,t[eu]=null)):Ws(e)}}}function su(e){return e in tu?tu[e]:tu[e]="on"+e}function uu(e,t){if(e.fa)e=!0;else{t=new zs(t,this);var n=e.listener,r=e.la||e.src;e.ia&&ou(e),e=n.call(r,t)}return e}function cu(e){return(e=e[eu])instanceof Xs?e:null}var lu="__closure_events_fn_"+(1e9*Math.random()>>>0);function fu(e){return"function"===typeof e?e:(e[lu]||(e[lu]=function(t){return e.handleEvent(t)}),e[lu])}function hu(){gs.call(this),this.i=new Xs(this),this.S=this,this.J=null}function du(e,t){var n,r=e.J;if(r)for(n=[];r;r=r.J)n.push(r);if(e=e.S,r=t.type||t,"string"===typeof t)t=new ws(t,e);else if(t instanceof ws)t.target=t.target||e;else{var i=t;Ys(t=new ws(r,e),i)}if(i=!0,n)for(var a=n.length-1;0<=a;a--){var o=t.g=n[a];i=pu(o,r,!0,t)&&i}if(i=pu(o=t.g=e,r,!0,t)&&i,i=pu(o,r,!1,t)&&i,n)for(a=0;a<n.length;a++)i=pu(o=t.g=n[a],r,!1,t)&&i}function pu(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.fa&&o.capture==n){var s=o.listener,u=o.la||o.src;o.ia&&Js(e.i,o),i=!1!==s.call(u,r)&&i}}return i&&!r.defaultPrevented}ms(hu,gs),hu.prototype[Hs]=!0,hu.prototype.removeEventListener=function(e,t,n,r){au(this,e,t,n,r)},hu.prototype.N=function(){if(hu.$.N.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++)Ws(n[r]);delete t.g[e],t.h--}}this.J=null},hu.prototype.O=function(e,t,n,r){return this.i.add(String(e),t,!1,n,r)},hu.prototype.P=function(e,t,n,r){return this.i.add(String(e),t,!0,n,r)};var vu=ss.JSON.stringify,mu=function(){function e(t,n){k(this,e),this.i=t,this.j=n,this.h=0,this.g=null}return w(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 gu(){var e=Su,t=null;return e.g&&(t=e.g,e.g=e.g.next,e.g||(e.h=null),t.next=null),t}var yu=function(){function e(){k(this,e),this.h=this.g=null}return w(e,[{key:"add",value:function(e,t){var n=ku.get();n.set(e,t),this.h?this.h.next=n:this.g=n,this.h=n}}]),e}(),ku=new mu((function(){return new bu}),(function(e){return e.reset()})),bu=function(){function e(){k(this,e),this.next=this.g=this.h=null}return w(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 wu(e){var t=1;e=e.split(":");for(var n=[];0<t&&e.length;)n.push(e.shift()),t--;return e.length&&n.push(e.join(":")),n}function xu(e){ss.setTimeout((function(){throw e}),0)}var Eu,_u=!1,Su=new yu,Cu=function(){var e=ss.Promise.resolve(void 0);Eu=function(){e.then(Tu)}},Tu=function(){for(var e;e=gu();){try{e.h.call(e.g)}catch(n){xu(n)}var t=ku;t.j(e),100>t.h&&(t.h++,e.next=t.g,t.g=e)}_u=!1};function Iu(e,t){hu.call(this),this.h=e||1,this.g=t||ss,this.j=ps(this.qb,this),this.l=Date.now()}function Nu(e){e.ga=!1,e.T&&(e.g.clearTimeout(e.T),e.T=null)}function Ou(e,t,n){if("function"===typeof e)n&&(e=ps(e,n));else{if(!e||"function"!=typeof e.handleEvent)throw Error("Invalid listener argument");e=ps(e.handleEvent,e)}return 2147483647<Number(t)?-1:ss.setTimeout(e,t||0)}function Ru(e){e.g=Ou((function(){e.g=null,e.i&&(e.i=!1,Ru(e))}),e.j);var t=e.h;e.h=null,e.m.apply(null,t)}ms(Iu,hu),(rs=Iu.prototype).ga=!1,rs.T=null,rs.qb=function(){if(this.ga){var e=Date.now()-this.l;0<e&&e<.8*this.h?this.T=this.g.setTimeout(this.j,this.h-e):(this.T&&(this.g.clearTimeout(this.T),this.T=null),du(this,"tick"),this.ga&&(Nu(this),this.start()))}},rs.start=function(){this.ga=!0,this.T||(this.T=this.g.setTimeout(this.j,this.h),this.l=Date.now())},rs.N=function(){Iu.$.N.call(this),Nu(this),delete this.g};var Pu=function(e){_(n,e);var t=T(n);function n(e,r){var i;return k(this,n),(i=t.call(this)).m=e,i.j=r,i.h=null,i.i=!1,i.g=null,i}return w(n,[{key:"l",value:function(e){this.h=arguments,this.g?this.i=!0:Ru(this)}},{key:"N",value:function(){Nn(S(n.prototype),"N",this).call(this),this.g&&(ss.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}]),n}(gs);function Au(e){gs.call(this),this.h=e,this.g={}}ms(Au,gs);var Du=[];function Lu(e,t,n,r){Array.isArray(n)||(n&&(Du[0]=n.toString()),n=Du);for(var i=0;i<n.length;i++){var a=nu(t,n[i],r||e.handleEvent,!1,e.h||e);if(!a)break;e.g[a.key]=a}}function Mu(e){Gs(e.g,(function(e,t){this.g.hasOwnProperty(t)&&ou(e)}),e),e.g={}}function ju(){this.g=!0}function Fu(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 vu(n)}catch(s){return t}}(e,n)+(r?" "+r:"")}))}Au.prototype.N=function(){Au.$.N.call(this),Mu(this)},Au.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")},ju.prototype.Ea=function(){this.g=!1},ju.prototype.info=function(){};var Uu={},Vu=null;function zu(){return Vu=Vu||new hu}function Bu(e){ws.call(this,Uu.Ta,e)}function Hu(e){var t=zu();du(t,new Bu(t))}function Ku(e,t){ws.call(this,Uu.STAT_EVENT,e),this.stat=t}function qu(e){var t=zu();du(t,new Ku(t,e))}function Wu(e,t){ws.call(this,Uu.Ua,e),this.size=t}function Gu(e,t){if("function"!==typeof e)throw Error("Fn must not be null and must be a function");return ss.setTimeout((function(){e()}),t)}Uu.Ta="serverreachability",ms(Bu,ws),Uu.STAT_EVENT="statevent",ms(Ku,ws),Uu.Ua="timingevent",ms(Wu,ws);var Qu={NO_ERROR:0,rb:1,Eb:2,Db:3,yb:4,Cb:5,Fb:6,Qa:7,TIMEOUT:8,Ib:9},$u={wb:"complete",Sb:"success",Ra:"error",Qa:"abort",Kb:"ready",Lb:"readystatechange",TIMEOUT:"timeout",Gb:"incrementaldata",Jb:"progress",zb:"downloadprogress",$b:"uploadprogress"};function Yu(){}function Xu(e){return e.h||(e.h=e.i())}function Ju(){}Yu.prototype.h=null;var Zu,ec={OPEN:"a",vb:"b",Ra:"c",Hb:"d"};function tc(){ws.call(this,"d")}function nc(){ws.call(this,"c")}function rc(){}function ic(e,t,n,r){this.l=e,this.j=t,this.m=n,this.W=r||1,this.U=new Au(this),this.P=oc,e=Ps?125:void 0,this.V=new Iu(e),this.I=null,this.i=!1,this.s=this.A=this.v=this.L=this.G=this.Y=this.B=null,this.F=[],this.g=null,this.C=0,this.o=this.u=null,this.ca=-1,this.J=!1,this.O=0,this.M=null,this.ba=this.K=this.aa=this.S=!1,this.h=new ac}function ac(){this.i=null,this.g="",this.h=!1}ms(tc,ws),ms(nc,ws),ms(rc,Yu),rc.prototype.g=function(){return new XMLHttpRequest},rc.prototype.i=function(){return{}},Zu=new rc;var oc=45e3,sc={},uc={};function cc(e,t,n){e.L=1,e.v=Ic(Ec(t)),e.s=n,e.S=!0,lc(e,null)}function lc(e,t){e.G=Date.now(),pc(e),e.A=Ec(e.v);var n=e.A,r=e.W;Array.isArray(r)||(r=[String(r)]),zc(n.i,"t",r),e.C=0,n=e.l.J,e.h=new ac,e.g=Bl(e.l,n?t:null,!e.s),0<e.O&&(e.M=new Pu(ps(e.Pa,e,e.g),e.O)),Lu(e.U,e.g,"readystatechange",e.nb),t=e.I?Qs(e.I):{},e.s?(e.u||(e.u="POST"),t["Content-Type"]="application/x-www-form-urlencoded",e.g.ha(e.A,e.u,e.s,t)):(e.u="GET",e.g.ha(e.A,e.u,null,t)),Hu(),function(e,t,n,r,i,a){e.info((function(){if(e.g)if(a)for(var o="",s=a.split("&"),u=0;u<s.length;u++){var c=s[u].split("=");if(1<c.length){var l=c[0];c=c[1];var f=l.split("_");o=2<=f.length&&"type"==f[1]?o+(l+"=")+c+"&":o+(l+"=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.W,e.s)}function fc(e){return!!e.g&&("GET"==e.u&&2!=e.L&&e.l.Ha)}function hc(e,t,n){for(var r,i=!0;!e.J&&e.C<n.length;){if((r=dc(e,n))==uc){4==t&&(e.o=4,qu(14),i=!1),Fu(e.j,e.m,null,"[Incomplete Response]");break}if(r==sc){e.o=4,qu(15),Fu(e.j,e.m,n,"[Invalid Chunk]"),i=!1;break}Fu(e.j,e.m,r,null),kc(e,r)}fc(e)&&r!=uc&&r!=sc&&(e.h.g="",e.C=0),4!=t||0!=n.length||e.h.h||(e.o=1,qu(16),i=!1),e.i=e.i&&i,i?0<n.length&&!e.ba&&(e.ba=!0,(t=e.l).g==e&&t.ca&&!t.M&&(t.l.info("Great, no buffering proxy detected. Bytes received: "+n.length),Dl(t),t.M=!0,qu(11))):(Fu(e.j,e.m,n,"[Invalid Chunked Response]"),yc(e),gc(e))}function dc(e,t){var n=e.C,r=t.indexOf("\n",n);return-1==r?uc:(n=Number(t.substring(n,r)),isNaN(n)?sc:(r+=1)+n>t.length?uc:(t=t.slice(r,r+n),e.C=r+n,t))}function pc(e){e.Y=Date.now()+e.P,vc(e,e.P)}function vc(e,t){if(null!=e.B)throw Error("WatchDog timer not null");e.B=Gu(ps(e.lb,e),t)}function mc(e){e.B&&(ss.clearTimeout(e.B),e.B=null)}function gc(e){0==e.l.H||e.J||jl(e.l,e)}function yc(e){mc(e);var t=e.M;t&&"function"==typeof t.sa&&t.sa(),e.M=null,Nu(e.V),Mu(e.U),e.g&&(t=e.g,e.g=null,t.abort(),t.sa())}function kc(e,t){try{var n=e.l;if(0!=n.H&&(n.g==e||Qc(n.i,e)))if(!e.K&&Qc(n.i,e)&&3==n.H){try{var r=n.Ja.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.G+3e3<e.G))break e;Ml(n),Cl(n)}Al(n),qu(18)}}else n.Fa=i[1],0<n.Fa-n.V&&37500>i[2]&&n.G&&0==n.A&&!n.v&&(n.v=Gu(ps(n.ib,n),6e3));if(1>=Gc(n.i)&&n.oa){try{n.oa()}catch(a){}n.oa=void 0}}else Ul(n,11)}else if((e.K||n.g==e)&&Ml(n),!Es(t))for(i=n.Ja.g.parse(t),t=0;t<i.length;t++){var a=i[t];if(n.V=a[0],a=a[1],2==n.H)if("c"==a[0]){n.K=a[1],n.pa=a[2];var o=a[3];null!=o&&(n.ra=o,n.l.info("VER="+n.ra));var s=a[4];null!=s&&(n.Ga=s,n.l.info("SVER="+n.Ga));var u=a[5];null!=u&&"number"===typeof u&&0<u&&(r=1.5*u,n.L=r,n.l.info("backChannelRequestTimeoutMs_="+r)),r=n;var c=e.g;if(c){var l=c.g?c.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(l){var f=r.i;f.g||-1==l.indexOf("spdy")&&-1==l.indexOf("quic")&&-1==l.indexOf("h2")||(f.j=f.l,f.g=new Set,f.h&&($c(f,f.h),f.h=null))}if(r.F){var h=c.g?c.g.getResponseHeader("X-HTTP-Session-Id"):null;h&&(r.Da=h,Tc(r.I,r.F,h))}}n.H=3,n.h&&n.h.Ba(),n.ca&&(n.S=Date.now()-e.G,n.l.info("Handshake RTT: "+n.S+"ms"));var d=e;if((r=n).wa=zl(r,r.J?r.pa:null,r.Y),d.K){Yc(r.i,d);var p=d,v=r.L;v&&p.setTimeout(v),p.B&&(mc(p),pc(p)),r.g=d}else Pl(r);0<n.j.length&&Il(n)}else"stop"!=a[0]&&"close"!=a[0]||Ul(n,7);else 3==n.H&&("stop"==a[0]||"close"==a[0]?"stop"==a[0]?Ul(n,7):Sl(n):"noop"!=a[0]&&n.h&&n.h.Aa(a),n.A=0)}Hu()}catch(a){}}function bc(e,t){if(e.forEach&&"function"==typeof e.forEach)e.forEach(t,void 0);else if(us(e)||"string"===typeof e)Array.prototype.forEach.call(e,t,void 0);else for(var n=function(e){if(e.ta&&"function"==typeof e.ta)return e.ta();if(!e.Z||"function"!=typeof e.Z){if("undefined"!==typeof Map&&e instanceof Map)return Array.from(e.keys());if(!("undefined"!==typeof Set&&e instanceof Set)){if(us(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.Z&&"function"==typeof e.Z)return e.Z();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(us(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)}(rs=ic.prototype).setTimeout=function(e){this.P=e},rs.nb=function(e){e=e.target;var t=this.M;t&&3==kl(e)?t.l():this.Pa(e)},rs.Pa=function(e){try{if(e==this.g)e:{var t=kl(this.g),n=this.g.Ia();this.g.da();if(!(3>t)&&(3!=t||Ps||this.g&&(this.h.h||this.g.ja()||bl(this.g)))){this.J||4!=t||7==n||Hu(),mc(this);var r=this.g.da();this.ca=r;t:if(fc(this)){var i=bl(this.g);e="";var a=i.length,o=4==kl(this.g);if(!this.h.i){if("undefined"===typeof TextDecoder){yc(this),gc(this);var s="";break t}this.h.i=new ss.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,s=this.h.g}else s=this.g.ja();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.W,t,r),this.i){if(this.aa&&!this.K){t:{if(this.g){var u,c=this.g;if((u=c.g?c.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!Es(u)){var l=u;break t}}l=null}if(!(r=l)){this.i=!1,this.o=3,qu(12),yc(this),gc(this);break e}Fu(this.j,this.m,r,"Initial handshake response via X-HTTP-Initial-Response"),this.K=!0,kc(this,r)}this.S?(hc(this,t,s),Ps&&this.i&&3==t&&(Lu(this.U,this.V,"tick",this.mb),this.V.start())):(Fu(this.j,this.m,s,null),kc(this,s)),4==t&&yc(this),this.i&&!this.J&&(4==t?jl(this.l,this):(this.i=!1,pc(this)))}else(function(e){var t={};e=(e.g&&2<=kl(e)&&e.g.getAllResponseHeaders()||"").split("\r\n");for(var n=0;n<e.length;n++)if(!Es(e[n])){var r=wu(e[n]),i=r[0];if("string"===typeof(r=r[1])){r=r.trim();var a=t[i]||[];t[i]=a,a.push(r)}}!function(e,t){for(var n in e)t.call(void 0,e[n],n,e)}(t,(function(e){return e.join(", ")}))})(this.g),400==r&&0<s.indexOf("Unknown SID")?(this.o=3,qu(12)):(this.o=0,qu(13)),yc(this),gc(this)}}}catch(t){}},rs.mb=function(){if(this.g){var e=kl(this.g),t=this.g.ja();this.C<t.length&&(mc(this),hc(this,e,t),this.i&&4!=e&&pc(this))}},rs.cancel=function(){this.J=!0,yc(this)},rs.lb=function(){this.B=null;var e=Date.now();0<=e-this.Y?(function(e,t){e.info((function(){return"TIMEOUT: "+t}))}(this.j,this.A),2!=this.L&&(Hu(),qu(17)),yc(this),this.o=2,gc(this)):vc(this,this.Y-e)};var wc=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function xc(e){if(this.g=this.s=this.j="",this.m=null,this.o=this.l="",this.h=!1,e instanceof xc){this.h=e.h,_c(this,e.j),this.s=e.s,this.g=e.g,Sc(this,e.m),this.l=e.l;var t=e.i,n=new jc;n.i=t.i,t.g&&(n.g=new Map(t.g),n.h=t.h),Cc(this,n),this.o=e.o}else e&&(t=String(e).match(wc))?(this.h=!1,_c(this,t[1]||"",!0),this.s=Nc(t[2]||""),this.g=Nc(t[3]||"",!0),Sc(this,t[4]),this.l=Nc(t[5]||"",!0),Cc(this,t[6]||"",!0),this.o=Nc(t[7]||"")):(this.h=!1,this.i=new jc(null,this.h))}function Ec(e){return new xc(e)}function _c(e,t,n){e.j=n?Nc(t,!0):t,e.j&&(e.j=e.j.replace(/:$/,""))}function Sc(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 Cc(e,t,n){t instanceof jc?(e.i=t,function(e,t){t&&!e.j&&(Fc(e),e.i=null,e.g.forEach((function(e,t){var n=t.toLowerCase();t!=n&&(Uc(this,t),zc(this,n,e))}),e)),e.j=t}(e.i,e.h)):(n||(t=Oc(t,Lc)),e.i=new jc(t,e.h))}function Tc(e,t,n){e.i.set(t,n)}function Ic(e){return Tc(e,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),e}function Nc(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function Oc(e,t,n){return"string"===typeof e?(e=encodeURI(e).replace(t,Rc),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function Rc(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}xc.prototype.toString=function(){var e=[],t=this.j;t&&e.push(Oc(t,Pc,!0),":");var n=this.g;return(n||"file"==t)&&(e.push("//"),(t=this.s)&&e.push(Oc(t,Pc,!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(Oc(n,"/"==n.charAt(0)?Dc:Ac,!0))),(n=this.i.toString())&&e.push("?",n),(n=this.o)&&e.push("#",Oc(n,Mc)),e.join("")};var Pc=/[#\/\?@]/g,Ac=/[#\?:]/g,Dc=/[#\?]/g,Lc=/[#\?@]/g,Mc=/#/g;function jc(e,t){this.h=this.g=null,this.i=e||null,this.j=!!t}function Fc(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 Uc(e,t){Fc(e),t=Bc(e,t),e.g.has(t)&&(e.i=null,e.h-=e.g.get(t).length,e.g.delete(t))}function Vc(e,t){return Fc(e),t=Bc(e,t),e.g.has(t)}function zc(e,t,n){Uc(e,t),0<n.length&&(e.i=null,e.g.set(Bc(e,t),ks(n)),e.h+=n.length)}function Bc(e,t){return t=String(t),e.j&&(t=t.toLowerCase()),t}(rs=jc.prototype).add=function(e,t){Fc(this),this.i=null,e=Bc(this,e);var n=this.g.get(e);return n||this.g.set(e,n=[]),n.push(t),this.h+=1,this},rs.forEach=function(e,t){Fc(this),this.g.forEach((function(n,r){n.forEach((function(n){e.call(t,n,r,this)}),this)}),this)},rs.ta=function(){Fc(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},rs.Z=function(e){Fc(this);var t=[];if("string"===typeof e)Vc(this,e)&&(t=t.concat(this.g.get(Bc(this,e))));else{e=Array.from(this.g.values());for(var n=0;n<e.length;n++)t=t.concat(e[n])}return t},rs.set=function(e,t){return Fc(this),this.i=null,Vc(this,e=Bc(this,e))&&(this.h-=this.g.get(e).length),this.g.set(e,[t]),this.h+=1,this},rs.get=function(e,t){return e&&0<(e=this.Z(e)).length?String(e[0]):t},rs.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.Z(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 Hc=w((function e(t,n){k(this,e),this.g=t,this.map=n}));function Kc(e){this.l=e||qc,ss.PerformanceNavigationTiming?e=0<(e=ss.performance.getEntriesByType("navigation")).length&&("hq"==e[0].nextHopProtocol||"h2"==e[0].nextHopProtocol):e=!!(ss.g&&ss.g.Ka&&ss.g.Ka()&&ss.g.Ka().dc),this.j=e?this.l:1,this.g=null,1<this.j&&(this.g=new Set),this.h=null,this.i=[]}var qc=10;function Wc(e){return!!e.h||!!e.g&&e.g.size>=e.j}function Gc(e){return e.h?1:e.g?e.g.size:0}function Qc(e,t){return e.h?e.h==t:!!e.g&&e.g.has(t)}function $c(e,t){e.g?e.g.add(t):e.h=t}function Yc(e,t){e.h&&e.h==t?e.h=null:e.g&&e.g.has(t)&&e.g.delete(t)}function Xc(e){if(null!=e.h)return e.i.concat(e.h.F);if(null!=e.g&&0!==e.g.size){var t,n=e.i,r=m(e.g.values());try{for(r.s();!(t=r.n()).done;){var i=t.value;n=n.concat(i.F)}}catch(a){r.e(a)}finally{r.f()}return n}return ks(e.i)}Kc.prototype.cancel=function(){if(this.i=Xc(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&0!==this.g.size){var e,t=m(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()}};var Jc,Zc=function(){function e(){k(this,e)}return w(e,[{key:"stringify",value:function(e){return ss.JSON.stringify(e,void 0)}},{key:"parse",value:function(e){return ss.JSON.parse(e,void 0)}}]),e}();function el(){this.g=new Zc}function tl(e,t,n){var r=n||"";try{bc(e,(function(e,n){var i=e;cs(e)&&(i=vu(e)),t.push(r+n+"="+encodeURIComponent(i))}))}catch(i){throw t.push(r+"type="+encodeURIComponent("_badmap")),i}}function nl(e,t,n,r,i){try{t.onload=null,t.onerror=null,t.onabort=null,t.ontimeout=null,i(r)}catch(a){}}function rl(e){this.l=e.ec||null,this.j=e.ob||!1}function il(e,t){hu.call(this),this.F=e,this.u=t,this.m=void 0,this.readyState=al,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}ms(rl,Yu),rl.prototype.g=function(){return new il(this.l,this.j)},rl.prototype.i=(Jc={},function(){return Jc}),ms(il,hu);var al=0;function ol(e){e.j.read().then(e.Xa.bind(e)).catch(e.ka.bind(e))}function sl(e){e.readyState=4,e.l=null,e.j=null,e.A=null,ul(e)}function ul(e){e.onreadystatechange&&e.onreadystatechange.call(e)}(rs=il.prototype).open=function(e,t){if(this.readyState!=al)throw this.abort(),Error("Error reopening a connection");this.C=e,this.B=t,this.readyState=1,ul(this)},rs.send=function(e){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.g=!0;var t={headers:this.v,method:this.C,credentials:this.m,cache:void 0};e&&(t.body=e),(this.F||ss).fetch(new Request(this.B,t)).then(this.$a.bind(this),this.ka.bind(this))},rs.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,sl(this)),this.readyState=al},rs.$a=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,ul(this)),this.g&&(this.readyState=3,ul(this),this.g)))if("arraybuffer"===this.responseType)e.arrayBuffer().then(this.Ya.bind(this),this.ka.bind(this));else if("undefined"!==typeof ss.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;ol(this)}else e.text().then(this.Za.bind(this),this.ka.bind(this))},rs.Xa=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?sl(this):ul(this),3==this.readyState&&ol(this)}},rs.Za=function(e){this.g&&(this.response=this.responseText=e,sl(this))},rs.Ya=function(e){this.g&&(this.response=e,sl(this))},rs.ka=function(){this.g&&sl(this)},rs.setRequestHeader=function(e,t){this.v.append(e,t)},rs.getResponseHeader=function(e){return this.h&&this.h.get(e.toLowerCase())||""},rs.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(il.prototype,"withCredentials",{get:function(){return"include"===this.m},set:function(e){this.m=e?"include":"same-origin"}});var cl=ss.JSON.parse;function ll(e){hu.call(this),this.headers=new Map,this.u=e||null,this.h=!1,this.C=this.g=null,this.I="",this.m=0,this.j="",this.l=this.G=this.v=this.F=!1,this.B=0,this.A=null,this.K=fl,this.L=this.M=!1}ms(ll,hu);var fl="",hl=/^https?$/i,dl=["POST","PUT"];function pl(e,t){e.h=!1,e.g&&(e.l=!0,e.g.abort(),e.l=!1),e.j=t,e.m=5,vl(e),gl(e)}function vl(e){e.F||(e.F=!0,du(e,"complete"),du(e,"error"))}function ml(e){if(e.h&&"undefined"!=typeof os&&(!e.C[1]||4!=kl(e)||2!=e.da()))if(e.v&&4==kl(e))Ou(e.La,0,e);else if(du(e,"readystatechange"),4==kl(e)){e.h=!1;try{var t,n=e.da();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.I).match(wc)[1]||null;!a&&ss.self&&ss.self.location&&(a=ss.self.location.protocol.slice(0,-1)),i=!hl.test(a?a.toLowerCase():"")}t=i}if(t)du(e,"complete"),du(e,"success");else{e.m=6;try{var o=2<kl(e)?e.g.statusText:""}catch(s){o=""}e.j=o+" ["+e.da()+"]",vl(e)}}finally{gl(e)}}}function gl(e,t){if(e.g){yl(e);var n=e.g,r=e.C[0]?function(){}:null;e.g=null,e.C=null,t||du(e,"ready");try{n.onreadystatechange=r}catch(i){}}}function yl(e){e.g&&e.L&&(e.g.ontimeout=null),e.A&&(ss.clearTimeout(e.A),e.A=null)}function kl(e){return e.g?e.g.readyState:0}function bl(e){try{if(!e.g)return null;if("response"in e.g)return e.g.response;switch(e.K){case fl:case"text":return e.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in e.g)return e.g.mozResponseArrayBuffer}return null}catch(If){return null}}function wl(e){var t="";return Gs(e,(function(e,n){t+=n,t+=":",t+=e,t+="\r\n"})),t}function xl(e,t,n){e:{for(r in n){var r=!1;break e}r=!0}r||(n=wl(n),"string"===typeof e?null!=n&&encodeURIComponent(String(n)):Tc(e,t,n))}function El(e,t,n){return n&&n.internalChannelParams&&n.internalChannelParams[e]||t}function _l(e){this.Ga=0,this.j=[],this.l=new ju,this.pa=this.wa=this.I=this.Y=this.g=this.Da=this.F=this.na=this.o=this.U=this.s=null,this.fb=this.W=0,this.cb=El("failFast",!1,e),this.G=this.v=this.u=this.m=this.h=null,this.aa=!0,this.Fa=this.V=-1,this.ba=this.A=this.C=0,this.ab=El("baseRetryDelayMs",5e3,e),this.hb=El("retryDelaySeedMs",1e4,e),this.eb=El("forwardChannelMaxRetries",2,e),this.xa=El("forwardChannelRequestTimeoutMs",2e4,e),this.va=e&&e.xmlHttpFactory||void 0,this.Ha=e&&e.useFetchStreams||!1,this.L=void 0,this.J=e&&e.supportsCrossDomainXhr||!1,this.K="",this.i=new Kc(e&&e.concurrentRequestLimit),this.Ja=new el,this.P=e&&e.fastHandshake||!1,this.O=e&&e.encodeInitMessageHeaders||!1,this.P&&this.O&&(this.O=!1),this.bb=e&&e.bc||!1,e&&e.Ea&&this.l.Ea(),e&&e.forceLongPolling&&(this.aa=!1),this.ca=!this.P&&this.aa&&e&&e.detectBufferingProxy||!1,this.qa=void 0,e&&e.longPollingTimeout&&0<e.longPollingTimeout&&(this.qa=e.longPollingTimeout),this.oa=void 0,this.S=0,this.M=!1,this.ma=this.B=null}function Sl(e){if(Tl(e),3==e.H){var t=e.W++,n=Ec(e.I);if(Tc(n,"SID",e.K),Tc(n,"RID",t),Tc(n,"TYPE","terminate"),Ol(e,n),(t=new ic(e,e.l,t)).L=2,t.v=Ic(Ec(n)),n=!1,ss.navigator&&ss.navigator.sendBeacon)try{n=ss.navigator.sendBeacon(t.v.toString(),"")}catch(r){}!n&&ss.Image&&((new Image).src=t.v,n=!0),n||(t.g=Bl(t.l,null),t.g.ha(t.v)),t.G=Date.now(),pc(t)}Vl(e)}function Cl(e){e.g&&(Dl(e),e.g.cancel(),e.g=null)}function Tl(e){Cl(e),e.u&&(ss.clearTimeout(e.u),e.u=null),Ml(e),e.i.cancel(),e.m&&("number"===typeof e.m&&ss.clearTimeout(e.m),e.m=null)}function Il(e){if(!Wc(e.i)&&!e.m){e.m=!0;var t=e.Na;Eu||Cu(),_u||(Eu(),_u=!0),Su.add(t,e),e.C=0}}function Nl(e,t){var n;n=t?t.m:e.W++;var r=Ec(e.I);Tc(r,"SID",e.K),Tc(r,"RID",n),Tc(r,"AID",e.V),Ol(e,r),e.o&&e.s&&xl(r,e.o,e.s),n=new ic(e,e.l,n,e.C+1),null===e.o&&(n.I=e.s),t&&(e.j=t.F.concat(e.j)),t=Rl(e,n,1e3),n.setTimeout(Math.round(.5*e.xa)+Math.round(.5*e.xa*Math.random())),$c(e.i,n),cc(n,r,t)}function Ol(e,t){e.na&&Gs(e.na,(function(e,n){Tc(t,n,e)})),e.h&&bc({},(function(e,n){Tc(t,n,e)}))}function Rl(e,t,n){n=Math.min(e.j.length,n);var r=e.h?ps(e.h.Va,e.h,e):null;e:for(var i=e.j,a=-1;;){var o=["count="+n];-1==a?0<n?(a=i[0].g,o.push("ofs="+a)):a=0:o.push("ofs="+a);for(var s=!0,u=0;u<n;u++){var c=i[u].g,l=i[u].map;if(0>(c-=a))a=Math.max(0,i[u].g-100),s=!1;else try{tl(l,o,"req"+c+"_")}catch(f){r&&r(l)}}if(s){r=o.join("&");break e}}return e=e.j.splice(0,n),t.F=e,r}function Pl(e){if(!e.g&&!e.u){e.ba=1;var t=e.Ma;Eu||Cu(),_u||(Eu(),_u=!0),Su.add(t,e),e.A=0}}function Al(e){return!(e.g||e.u||3<=e.A)&&(e.ba++,e.u=Gu(ps(e.Ma,e),Fl(e,e.A)),e.A++,!0)}function Dl(e){null!=e.B&&(ss.clearTimeout(e.B),e.B=null)}function Ll(e){e.g=new ic(e,e.l,"rpc",e.ba),null===e.o&&(e.g.I=e.s),e.g.O=0;var t=Ec(e.wa);Tc(t,"RID","rpc"),Tc(t,"SID",e.K),Tc(t,"AID",e.V),Tc(t,"CI",e.G?"0":"1"),!e.G&&e.qa&&Tc(t,"TO",e.qa),Tc(t,"TYPE","xmlhttp"),Ol(e,t),e.o&&e.s&&xl(t,e.o,e.s),e.L&&e.g.setTimeout(e.L);var n=e.g;e=e.pa,n.L=1,n.v=Ic(Ec(t)),n.s=null,n.S=!0,lc(n,e)}function Ml(e){null!=e.v&&(ss.clearTimeout(e.v),e.v=null)}function jl(e,t){var n=null;if(e.g==t){Ml(e),Dl(e),e.g=null;var r=2}else{if(!Qc(e.i,t))return;n=t.F,Yc(e.i,t),r=1}if(0!=e.H)if(t.i)if(1==r){n=t.s?t.s.length:0,t=Date.now()-t.G;var i=e.C;du(r=zu(),new Wu(r,n)),Il(e)}else Pl(e);else if(3==(i=t.o)||0==i&&0<t.ca||!(1==r&&function(e,t){return!(Gc(e.i)>=e.i.j-(e.m?1:0))&&(e.m?(e.j=t.F.concat(e.j),!0):!(1==e.H||2==e.H||e.C>=(e.cb?0:e.eb))&&(e.m=Gu(ps(e.Na,e,t),Fl(e,e.C)),e.C++,!0))}(e,t)||2==r&&Al(e)))switch(n&&0<n.length&&(t=e.i,t.i=t.i.concat(n)),i){case 1:Ul(e,5);break;case 4:Ul(e,10);break;case 3:Ul(e,6);break;default:Ul(e,2)}}function Fl(e,t){var n=e.ab+Math.floor(Math.random()*e.hb);return e.isActive()||(n*=2),n*t}function Ul(e,t){if(e.l.info("Error code "+t),2==t){var n=null;e.h&&(n=null);var r=ps(e.pb,e);n||(n=new xc("//www.google.com/images/cleardot.gif"),ss.location&&"http"==ss.location.protocol||_c(n,"https"),Ic(n)),function(e,t){var n=new ju;if(ss.Image){var r=new Image;r.onload=vs(nl,n,r,"TestLoadImage: loaded",!0,t),r.onerror=vs(nl,n,r,"TestLoadImage: error",!1,t),r.onabort=vs(nl,n,r,"TestLoadImage: abort",!1,t),r.ontimeout=vs(nl,n,r,"TestLoadImage: timeout",!1,t),ss.setTimeout((function(){r.ontimeout&&r.ontimeout()}),1e4),r.src=e}else t(!1)}(n.toString(),r)}else qu(2);e.H=0,e.h&&e.h.za(t),Vl(e),Tl(e)}function Vl(e){if(e.H=0,e.ma=[],e.h){var t=Xc(e.i);0==t.length&&0==e.j.length||(bs(e.ma,t),bs(e.ma,e.j),e.i.i.length=0,ks(e.j),e.j.length=0),e.h.ya()}}function zl(e,t,n){var r=n instanceof xc?Ec(n):new xc(n);if(""!=r.g)t&&(r.g=t+"."+r.g),Sc(r,r.m);else{var i=ss.location;r=i.protocol,t=t?t+"."+i.hostname:i.hostname,i=+i.port;var a=new xc(null);r&&_c(a,r),t&&(a.g=t),i&&Sc(a,i),n&&(a.l=n),r=a}return n=e.F,t=e.Da,n&&t&&Tc(r,n,t),Tc(r,"VER",e.ra),Ol(e,r),r}function Bl(e,t,n){if(t&&!e.J)throw Error("Can't create secondary domain capable XhrIo object.");return(t=n&&e.Ha&&!e.va?new ll(new rl({ob:!0})):new ll(e.va)).Oa(e.J),t}function Hl(){}function Kl(){if(Os&&!(10<=Number(Vs)))throw Error("Environmental error: no available transport.")}function ql(e,t){hu.call(this),this.g=new _l(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.Ca&&(e?e["X-WebChannel-Client-Profile"]=t.Ca:e={"X-WebChannel-Client-Profile":t.Ca}),this.g.U=e,(e=t&&t.cc)&&!Es(e)&&(this.g.o=e),this.A=t&&t.supportsCrossDomainXhr||!1,this.v=t&&t.sendRawJson||!1,(t=t&&t.httpSessionIdParam)&&!Es(t)&&(this.g.F=t,null!==(e=this.h)&&t in e&&(t in(e=this.h)&&delete e[t])),this.j=new Ql(this)}function Wl(e){tc.call(this),e.__headers__&&(this.headers=e.__headers__,this.statusCode=e.__status__,delete e.__headers__,delete e.__status__);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 Gl(){nc.call(this),this.status=1}function Ql(e){this.g=e}function $l(){this.blockSize=-1,this.blockSize=64,this.g=Array(4),this.m=Array(this.blockSize),this.i=this.h=0,this.reset()}function Yl(e,t,n){n||(n=0);var r=Array(16);if("string"===typeof t)for(var i=0;16>i;++i)r[i]=t.charCodeAt(n++)|t.charCodeAt(n++)<<8|t.charCodeAt(n++)<<16|t.charCodeAt(n++)<<24;else for(i=0;16>i;++i)r[i]=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24;t=e.g[0],n=e.g[1],i=e.g[2];var a=e.g[3],o=t+(a^n&(i^a))+r[0]+3614090360&4294967295;o=(n=(i=(a=(t=(n=(i=(a=(t=(n=(i=(a=(t=(n=(i=(a=(t=(n=(i=(a=(t=(n=(i=(a=(t=(n=(i=(a=(t=(n=(i=(a=(t=(n=(i=(a=(t=(n=(i=(a=(t=(n=(i=(a=(t=(n=(i=(a=(t=(n=(i=(a=(t=(n=(i=(a=(t=(n=(i=(a=(t=n+(o<<7&4294967295|o>>>25))+((o=a+(i^t&(n^i))+r[1]+3905402710&4294967295)<<12&4294967295|o>>>20))+((o=i+(n^a&(t^n))+r[2]+606105819&4294967295)<<17&4294967295|o>>>15))+((o=n+(t^i&(a^t))+r[3]+3250441966&4294967295)<<22&4294967295|o>>>10))+((o=t+(a^n&(i^a))+r[4]+4118548399&4294967295)<<7&4294967295|o>>>25))+((o=a+(i^t&(n^i))+r[5]+1200080426&4294967295)<<12&4294967295|o>>>20))+((o=i+(n^a&(t^n))+r[6]+2821735955&4294967295)<<17&4294967295|o>>>15))+((o=n+(t^i&(a^t))+r[7]+4249261313&4294967295)<<22&4294967295|o>>>10))+((o=t+(a^n&(i^a))+r[8]+1770035416&4294967295)<<7&4294967295|o>>>25))+((o=a+(i^t&(n^i))+r[9]+2336552879&4294967295)<<12&4294967295|o>>>20))+((o=i+(n^a&(t^n))+r[10]+4294925233&4294967295)<<17&4294967295|o>>>15))+((o=n+(t^i&(a^t))+r[11]+2304563134&4294967295)<<22&4294967295|o>>>10))+((o=t+(a^n&(i^a))+r[12]+1804603682&4294967295)<<7&4294967295|o>>>25))+((o=a+(i^t&(n^i))+r[13]+4254626195&4294967295)<<12&4294967295|o>>>20))+((o=i+(n^a&(t^n))+r[14]+2792965006&4294967295)<<17&4294967295|o>>>15))+((o=n+(t^i&(a^t))+r[15]+1236535329&4294967295)<<22&4294967295|o>>>10))+((o=t+(i^a&(n^i))+r[1]+4129170786&4294967295)<<5&4294967295|o>>>27))+((o=a+(n^i&(t^n))+r[6]+3225465664&4294967295)<<9&4294967295|o>>>23))+((o=i+(t^n&(a^t))+r[11]+643717713&4294967295)<<14&4294967295|o>>>18))+((o=n+(a^t&(i^a))+r[0]+3921069994&4294967295)<<20&4294967295|o>>>12))+((o=t+(i^a&(n^i))+r[5]+3593408605&4294967295)<<5&4294967295|o>>>27))+((o=a+(n^i&(t^n))+r[10]+38016083&4294967295)<<9&4294967295|o>>>23))+((o=i+(t^n&(a^t))+r[15]+3634488961&4294967295)<<14&4294967295|o>>>18))+((o=n+(a^t&(i^a))+r[4]+3889429448&4294967295)<<20&4294967295|o>>>12))+((o=t+(i^a&(n^i))+r[9]+568446438&4294967295)<<5&4294967295|o>>>27))+((o=a+(n^i&(t^n))+r[14]+3275163606&4294967295)<<9&4294967295|o>>>23))+((o=i+(t^n&(a^t))+r[3]+4107603335&4294967295)<<14&4294967295|o>>>18))+((o=n+(a^t&(i^a))+r[8]+1163531501&4294967295)<<20&4294967295|o>>>12))+((o=t+(i^a&(n^i))+r[13]+2850285829&4294967295)<<5&4294967295|o>>>27))+((o=a+(n^i&(t^n))+r[2]+4243563512&4294967295)<<9&4294967295|o>>>23))+((o=i+(t^n&(a^t))+r[7]+1735328473&4294967295)<<14&4294967295|o>>>18))+((o=n+(a^t&(i^a))+r[12]+2368359562&4294967295)<<20&4294967295|o>>>12))+((o=t+(n^i^a)+r[5]+4294588738&4294967295)<<4&4294967295|o>>>28))+((o=a+(t^n^i)+r[8]+2272392833&4294967295)<<11&4294967295|o>>>21))+((o=i+(a^t^n)+r[11]+1839030562&4294967295)<<16&4294967295|o>>>16))+((o=n+(i^a^t)+r[14]+4259657740&4294967295)<<23&4294967295|o>>>9))+((o=t+(n^i^a)+r[1]+2763975236&4294967295)<<4&4294967295|o>>>28))+((o=a+(t^n^i)+r[4]+1272893353&4294967295)<<11&4294967295|o>>>21))+((o=i+(a^t^n)+r[7]+4139469664&4294967295)<<16&4294967295|o>>>16))+((o=n+(i^a^t)+r[10]+3200236656&4294967295)<<23&4294967295|o>>>9))+((o=t+(n^i^a)+r[13]+681279174&4294967295)<<4&4294967295|o>>>28))+((o=a+(t^n^i)+r[0]+3936430074&4294967295)<<11&4294967295|o>>>21))+((o=i+(a^t^n)+r[3]+3572445317&4294967295)<<16&4294967295|o>>>16))+((o=n+(i^a^t)+r[6]+76029189&4294967295)<<23&4294967295|o>>>9))+((o=t+(n^i^a)+r[9]+3654602809&4294967295)<<4&4294967295|o>>>28))+((o=a+(t^n^i)+r[12]+3873151461&4294967295)<<11&4294967295|o>>>21))+((o=i+(a^t^n)+r[15]+530742520&4294967295)<<16&4294967295|o>>>16))+((o=n+(i^a^t)+r[2]+3299628645&4294967295)<<23&4294967295|o>>>9))+((o=t+(i^(n|~a))+r[0]+4096336452&4294967295)<<6&4294967295|o>>>26))+((o=a+(n^(t|~i))+r[7]+1126891415&4294967295)<<10&4294967295|o>>>22))+((o=i+(t^(a|~n))+r[14]+2878612391&4294967295)<<15&4294967295|o>>>17))+((o=n+(a^(i|~t))+r[5]+4237533241&4294967295)<<21&4294967295|o>>>11))+((o=t+(i^(n|~a))+r[12]+1700485571&4294967295)<<6&4294967295|o>>>26))+((o=a+(n^(t|~i))+r[3]+2399980690&4294967295)<<10&4294967295|o>>>22))+((o=i+(t^(a|~n))+r[10]+4293915773&4294967295)<<15&4294967295|o>>>17))+((o=n+(a^(i|~t))+r[1]+2240044497&4294967295)<<21&4294967295|o>>>11))+((o=t+(i^(n|~a))+r[8]+1873313359&4294967295)<<6&4294967295|o>>>26))+((o=a+(n^(t|~i))+r[15]+4264355552&4294967295)<<10&4294967295|o>>>22))+((o=i+(t^(a|~n))+r[6]+2734768916&4294967295)<<15&4294967295|o>>>17))+((o=n+(a^(i|~t))+r[13]+1309151649&4294967295)<<21&4294967295|o>>>11))+((a=(t=n+((o=t+(i^(n|~a))+r[4]+4149444226&4294967295)<<6&4294967295|o>>>26))+((o=a+(n^(t|~i))+r[11]+3174756917&4294967295)<<10&4294967295|o>>>22))^((i=a+((o=i+(t^(a|~n))+r[2]+718787259&4294967295)<<15&4294967295|o>>>17))|~t))+r[9]+3951481745&4294967295,e.g[0]=e.g[0]+t&4294967295,e.g[1]=e.g[1]+(i+(o<<21&4294967295|o>>>11))&4294967295,e.g[2]=e.g[2]+i&4294967295,e.g[3]=e.g[3]+a&4294967295}function Xl(e,t){this.h=t;for(var n=[],r=!0,i=e.length-1;0<=i;i--){var a=0|e[i];r&&a==t||(n[i]=a,r=!1)}this.g=n}(rs=ll.prototype).Oa=function(e){this.M=e},rs.ha=function(e,t,n,r){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.I+"; newUri="+e);t=t?t.toUpperCase():"GET",this.I=e,this.j="",this.m=0,this.F=!1,this.h=!0,this.g=this.u?this.u.g():Zu.g(),this.C=this.u?Xu(this.u):Xu(Zu),this.g.onreadystatechange=ps(this.La,this);try{this.G=!0,this.g.open(t,String(e),!0),this.G=!1}catch(s){return void pl(this,s)}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=m(r.keys());try{for(o.s();!(a=o.n()).done;){var s=a.value;n.set(s,r.get(s))}}catch(p){o.e(p)}finally{o.f()}}r=Array.from(n.keys()).find((function(e){return"content-type"==e.toLowerCase()})),i=ss.FormData&&e instanceof ss.FormData,!(0<=ys(dl,t))||r||i||n.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");var u,c=m(n);try{for(c.s();!(u=c.n()).done;){var l=h(u.value,2),f=l[0],d=l[1];this.g.setRequestHeader(f,d)}}catch(p){c.e(p)}finally{c.f()}this.K&&(this.g.responseType=this.K),"withCredentials"in this.g&&this.g.withCredentials!==this.M&&(this.g.withCredentials=this.M);try{yl(this),0<this.B&&((this.L=function(e){return Os&&"number"===typeof e.timeout&&void 0!==e.ontimeout}(this.g))?(this.g.timeout=this.B,this.g.ontimeout=ps(this.ua,this)):this.A=Ou(this.ua,this.B,this)),this.v=!0,this.g.send(e),this.v=!1}catch(s){pl(this,s)}},rs.ua=function(){"undefined"!=typeof os&&this.g&&(this.j="Timed out after "+this.B+"ms, aborting",this.m=8,du(this,"timeout"),this.abort(8))},rs.abort=function(e){this.g&&this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1,this.m=e||7,du(this,"complete"),du(this,"abort"),gl(this))},rs.N=function(){this.g&&(this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1),gl(this,!0)),ll.$.N.call(this)},rs.La=function(){this.s||(this.G||this.v||this.l?ml(this):this.kb())},rs.kb=function(){ml(this)},rs.isActive=function(){return!!this.g},rs.da=function(){try{return 2<kl(this)?this.g.status:-1}catch(Jc){return-1}},rs.ja=function(){try{return this.g?this.g.responseText:""}catch(Jc){return""}},rs.Wa=function(e){if(this.g){var t=this.g.responseText;return e&&0==t.indexOf(e)&&(t=t.substring(e.length)),cl(t)}},rs.Ia=function(){return this.m},rs.Sa=function(){return"string"===typeof this.j?this.j:String(this.j)},(rs=_l.prototype).ra=8,rs.H=1,rs.Na=function(e){if(this.m)if(this.m=null,1==this.H){if(!e){this.W=Math.floor(1e5*Math.random()),e=this.W++;var t=new ic(this,this.l,e),n=this.s;if(this.U&&(n?Ys(n=Qs(n),this.U):n=this.U),null!==this.o||this.O||(t.I=n,n=null),this.P)e:{for(var r=0,i=0;i<this.j.length;i++){var a=this.j[i];if(void 0===(a="__data__"in a.map&&"string"===typeof(a=a.map.__data__)?a.length:void 0))break;if(4096<(r+=a)){r=i;break e}if(4096===r||i===this.j.length-1){r=i+1;break e}}r=1e3}else r=1e3;r=Rl(this,t,r),Tc(i=Ec(this.I),"RID",e),Tc(i,"CVER",22),this.F&&Tc(i,"X-HTTP-Session-Id",this.F),Ol(this,i),n&&(this.O?r="headers="+encodeURIComponent(String(wl(n)))+"&"+r:this.o&&xl(i,this.o,n)),$c(this.i,t),this.bb&&Tc(i,"TYPE","init"),this.P?(Tc(i,"$req",r),Tc(i,"SID","null"),t.aa=!0,cc(t,i,null)):cc(t,i,r),this.H=2}}else 3==this.H&&(e?Nl(this,e):0==this.j.length||Wc(this.i)||Nl(this))},rs.Ma=function(){if(this.u=null,Ll(this),this.ca&&!(this.M||null==this.g||0>=this.S)){var e=2*this.S;this.l.info("BP detection timer enabled: "+e),this.B=Gu(ps(this.jb,this),e)}},rs.jb=function(){this.B&&(this.B=null,this.l.info("BP detection timeout reached."),this.l.info("Buffering proxy detected and switch to long-polling!"),this.G=!1,this.M=!0,qu(10),Cl(this),Ll(this))},rs.ib=function(){null!=this.v&&(this.v=null,Cl(this),Al(this),qu(19))},rs.pb=function(e){e?(this.l.info("Successfully pinged google.com"),qu(2)):(this.l.info("Failed to ping google.com"),qu(1))},rs.isActive=function(){return!!this.h&&this.h.isActive(this)},(rs=Hl.prototype).Ba=function(){},rs.Aa=function(){},rs.za=function(){},rs.ya=function(){},rs.isActive=function(){return!0},rs.Va=function(){},Kl.prototype.g=function(e,t){return new ql(e,t)},ms(ql,hu),ql.prototype.m=function(){this.g.h=this.j,this.A&&(this.g.J=!0);var e=this.g,t=this.l,n=this.h||void 0;qu(0),e.Y=t,e.na=n||{},e.G=e.aa,e.I=zl(e,null,e.Y),Il(e)},ql.prototype.close=function(){Sl(this.g)},ql.prototype.u=function(e){var t=this.g;if("string"===typeof e){var n={};n.__data__=e,e=n}else this.v&&((n={}).__data__=vu(e),e=n);t.j.push(new Hc(t.fb++,e)),3==t.H&&Il(t)},ql.prototype.N=function(){this.g.h=null,delete this.j,Sl(this.g),delete this.g,ql.$.N.call(this)},ms(Wl,tc),ms(Gl,nc),ms(Ql,Hl),Ql.prototype.Ba=function(){du(this.g,"a")},Ql.prototype.Aa=function(e){du(this.g,new Wl(e))},Ql.prototype.za=function(e){du(this.g,new Gl)},Ql.prototype.ya=function(){du(this.g,"b")},ms($l,(function(){this.blockSize=-1})),$l.prototype.reset=function(){this.g[0]=1732584193,this.g[1]=4023233417,this.g[2]=2562383102,this.g[3]=271733878,this.i=this.h=0},$l.prototype.j=function(e,t){void 0===t&&(t=e.length);for(var n=t-this.blockSize,r=this.m,i=this.h,a=0;a<t;){if(0==i)for(;a<=n;)Yl(this,e,a),a+=this.blockSize;if("string"===typeof e){for(;a<t;)if(r[i++]=e.charCodeAt(a++),i==this.blockSize){Yl(this,r),i=0;break}}else for(;a<t;)if(r[i++]=e[a++],i==this.blockSize){Yl(this,r),i=0;break}}this.h=i,this.i+=t},$l.prototype.l=function(){var e=Array((56>this.h?this.blockSize:2*this.blockSize)-this.h);e[0]=128;for(var t=1;t<e.length-8;++t)e[t]=0;var n=8*this.i;for(t=e.length-8;t<e.length;++t)e[t]=255&n,n/=256;for(this.j(e),e=Array(16),t=n=0;4>t;++t)for(var r=0;32>r;r+=8)e[n++]=this.g[t]>>>r&255;return e};var Jl={};function Zl(e){return-128<=e&&128>e?function(e,t){var n=Jl;return Object.prototype.hasOwnProperty.call(n,e)?n[e]:n[e]=t(e)}(e,(function(e){return new Xl([0|e],0>e?-1:0)})):new Xl([0|e],0>e?-1:0)}function ef(e){if(isNaN(e)||!isFinite(e))return nf;if(0>e)return uf(ef(-e));for(var t=[],n=1,r=0;e>=n;r++)t[r]=e/n|0,n*=tf;return new Xl(t,0)}var tf=4294967296,nf=Zl(0),rf=Zl(1),af=Zl(16777216);function of(e){if(0!=e.h)return!1;for(var t=0;t<e.g.length;t++)if(0!=e.g[t])return!1;return!0}function sf(e){return-1==e.h}function uf(e){for(var t=e.g.length,n=[],r=0;r<t;r++)n[r]=~e.g[r];return new Xl(n,~e.h).add(rf)}function cf(e,t){return e.add(uf(t))}function lf(e,t){for(;(65535&e[t])!=e[t];)e[t+1]+=e[t]>>>16,e[t]&=65535,t++}function ff(e,t){this.g=e,this.h=t}function hf(e,t){if(of(t))throw Error("division by zero");if(of(e))return new ff(nf,nf);if(sf(e))return t=hf(uf(e),t),new ff(uf(t.g),uf(t.h));if(sf(t))return t=hf(e,uf(t)),new ff(uf(t.g),t.h);if(30<e.g.length){if(sf(e)||sf(t))throw Error("slowDivide_ only works with positive integers.");for(var n=rf,r=t;0>=r.X(e);)n=df(n),r=df(r);var i=pf(n,1),a=pf(r,1);for(r=pf(r,2),n=pf(n,2);!of(r);){var o=a.add(r);0>=o.X(e)&&(i=i.add(n),a=o),r=pf(r,1),n=pf(n,1)}return t=cf(e,i.R(t)),new ff(i,t)}for(i=nf;0<=e.X(t);){for(n=Math.max(1,Math.floor(e.ea()/t.ea())),r=48>=(r=Math.ceil(Math.log(n)/Math.LN2))?1:Math.pow(2,r-48),o=(a=ef(n)).R(t);sf(o)||0<o.X(e);)o=(a=ef(n-=r)).R(t);of(a)&&(a=rf),i=i.add(a),e=cf(e,o)}return new ff(i,e)}function df(e){for(var t=e.g.length+1,n=[],r=0;r<t;r++)n[r]=e.D(r)<<1|e.D(r-1)>>>31;return new Xl(n,e.h)}function pf(e,t){var n=t>>5;t%=32;for(var r=e.g.length-n,i=[],a=0;a<r;a++)i[a]=0<t?e.D(a+n)>>>t|e.D(a+n+1)<<32-t:e.D(a+n);return new Xl(i,e.h)}(rs=Xl.prototype).ea=function(){if(sf(this))return-uf(this).ea();for(var e=0,t=1,n=0;n<this.g.length;n++){var r=this.D(n);e+=(0<=r?r:tf+r)*t,t*=tf}return e},rs.toString=function(e){if(2>(e=e||10)||36<e)throw Error("radix out of range: "+e);if(of(this))return"0";if(sf(this))return"-"+uf(this).toString(e);for(var t=ef(Math.pow(e,6)),n=this,r="";;){var i=hf(n,t).g,a=((0<(n=cf(n,i.R(t))).g.length?n.g[0]:n.h)>>>0).toString(e);if(of(n=i))return a+r;for(;6>a.length;)a="0"+a;r=a+r}},rs.D=function(e){return 0>e?0:e<this.g.length?this.g[e]:this.h},rs.X=function(e){return sf(e=cf(this,e))?-1:of(e)?0:1},rs.abs=function(){return sf(this)?uf(this):this},rs.add=function(e){for(var t=Math.max(this.g.length,e.g.length),n=[],r=0,i=0;i<=t;i++){var a=r+(65535&this.D(i))+(65535&e.D(i)),o=(a>>>16)+(this.D(i)>>>16)+(e.D(i)>>>16);r=o>>>16,a&=65535,o&=65535,n[i]=o<<16|a}return new Xl(n,-2147483648&n[n.length-1]?-1:0)},rs.R=function(e){if(of(this)||of(e))return nf;if(sf(this))return sf(e)?uf(this).R(uf(e)):uf(uf(this).R(e));if(sf(e))return uf(this.R(uf(e)));if(0>this.X(af)&&0>e.X(af))return ef(this.ea()*e.ea());for(var t=this.g.length+e.g.length,n=[],r=0;r<2*t;r++)n[r]=0;for(r=0;r<this.g.length;r++)for(var i=0;i<e.g.length;i++){var a=this.D(r)>>>16,o=65535&this.D(r),s=e.D(i)>>>16,u=65535&e.D(i);n[2*r+2*i]+=o*u,lf(n,2*r+2*i),n[2*r+2*i+1]+=a*u,lf(n,2*r+2*i+1),n[2*r+2*i+1]+=o*s,lf(n,2*r+2*i+1),n[2*r+2*i+2]+=a*s,lf(n,2*r+2*i+2)}for(r=0;r<t;r++)n[r]=n[2*r+1]<<16|n[2*r];for(r=t;r<2*t;r++)n[r]=0;return new Xl(n,0)},rs.gb=function(e){return hf(this,e).h},rs.and=function(e){for(var t=Math.max(this.g.length,e.g.length),n=[],r=0;r<t;r++)n[r]=this.D(r)&e.D(r);return new Xl(n,this.h&e.h)},rs.or=function(e){for(var t=Math.max(this.g.length,e.g.length),n=[],r=0;r<t;r++)n[r]=this.D(r)|e.D(r);return new Xl(n,this.h|e.h)},rs.xor=function(e){for(var t=Math.max(this.g.length,e.g.length),n=[],r=0;r<t;r++)n[r]=this.D(r)^e.D(r);return new Xl(n,this.h^e.h)},Kl.prototype.createWebChannel=Kl.prototype.g,ql.prototype.send=ql.prototype.u,ql.prototype.open=ql.prototype.m,ql.prototype.close=ql.prototype.close,Qu.NO_ERROR=0,Qu.TIMEOUT=8,Qu.HTTP_ERROR=6,$u.COMPLETE="complete",Ju.EventType=ec,ec.OPEN="a",ec.CLOSE="b",ec.ERROR="c",ec.MESSAGE="d",hu.prototype.listen=hu.prototype.O,ll.prototype.listenOnce=ll.prototype.P,ll.prototype.getLastError=ll.prototype.Sa,ll.prototype.getLastErrorCode=ll.prototype.Ia,ll.prototype.getStatus=ll.prototype.da,ll.prototype.getResponseJson=ll.prototype.Wa,ll.prototype.getResponseText=ll.prototype.ja,ll.prototype.send=ll.prototype.ha,ll.prototype.setWithCredentials=ll.prototype.Oa,$l.prototype.digest=$l.prototype.l,$l.prototype.reset=$l.prototype.reset,$l.prototype.update=$l.prototype.j,Xl.prototype.add=Xl.prototype.add,Xl.prototype.multiply=Xl.prototype.R,Xl.prototype.modulo=Xl.prototype.gb,Xl.prototype.compare=Xl.prototype.X,Xl.prototype.toNumber=Xl.prototype.ea,Xl.prototype.toString=Xl.prototype.toString,Xl.prototype.getBits=Xl.prototype.D,Xl.fromNumber=ef,Xl.fromString=function e(t,n){if(0==t.length)throw Error("number format error: empty string");if(2>(n=n||10)||36<n)throw Error("radix out of range: "+n);if("-"==t.charAt(0))return uf(e(t.substring(1),n));if(0<=t.indexOf("-"))throw Error('number format error: interior "-" character');for(var r=ef(Math.pow(n,8)),i=nf,a=0;a<t.length;a+=8){var o=Math.min(8,t.length-a),s=parseInt(t.substring(a,a+o),n);8>o?(o=ef(Math.pow(n,o)),i=i.R(o).add(ef(s))):i=(i=i.R(r)).add(ef(s))}return i};var vf=as.createWebChannelTransport=function(){return new Kl},mf=as.getStatEventTarget=function(){return zu()},gf=as.ErrorCode=Qu,yf=as.EventType=$u,kf=as.Event=Uu,bf=as.Stat={xb:0,Ab:1,Bb:2,Ub:3,Zb:4,Wb:5,Xb:6,Vb:7,Tb:8,Yb:9,PROXY:10,NOPROXY:11,Rb:12,Nb:13,Ob:14,Mb:15,Pb:16,Qb:17,tb:18,sb:19,ub:20},wf=(as.FetchXmlHttpFactory=rl,as.WebChannel=Ju),xf=as.XhrIo=ll,Ef=as.Md5=$l,_f=as.Integer=Xl,Sf="@firebase/firestore",Cf=function(){function e(t){k(this,e),this.uid=t}return w(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}();Cf.UNAUTHENTICATED=new Cf(null),Cf.GOOGLE_CREDENTIALS=new Cf("google-credentials-uid"),Cf.FIRST_PARTY=new Cf("first-party-uid"),Cf.MOCK_USER=new Cf("mock-user");var Tf="10.4.0",If=new pe("@firebase/firestore");function Nf(){return If.logLevel}function Of(e){if(If.logLevel<=se.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(Af);If.debug.apply(If,["Firestore (".concat(Tf,"): ").concat(e)].concat(v(i)))}}function Rf(e){if(If.logLevel<=se.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(Af);If.error.apply(If,["Firestore (".concat(Tf,"): ").concat(e)].concat(v(i)))}}function Pf(e){if(If.logLevel<=se.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(Af);If.warn.apply(If,["Firestore (".concat(Tf,"): ").concat(e)].concat(v(i)))}}function Af(e){if("string"==typeof e)return e;try{return function(e){return JSON.stringify(e)}(e)}catch(t){return e}}function Df(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Unexpected state",t="FIRESTORE (".concat(Tf,") INTERNAL ASSERTION FAILED: ")+e;throw Rf(t),new Error(t)}function Lf(e,t){e||Df()}function Mf(e,t){return e}var jf={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"},Ff=function(e){_(n,e);var t=T(n);function n(e,r){var i;return k(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 w(n)}(q),Uf=w((function e(){var t=this;k(this,e),this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))})),Vf=w((function e(t,n){k(this,e),this.user=n,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization","Bearer ".concat(t))})),zf=function(){function e(){k(this,e)}return w(e,[{key:"getToken",value:function(){return Promise.resolve(null)}},{key:"invalidateToken",value:function(){}},{key:"start",value:function(e,t){e.enqueueRetryable((function(){return t(Cf.UNAUTHENTICATED)}))}},{key:"shutdown",value:function(){}}]),e}(),Bf=function(){function e(t){k(this,e),this.token=t,this.changeListener=null}return w(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}(),Hf=function(){function e(t){k(this,e),this.t=t,this.currentUser=Cf.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}return w(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()},o=new Uf;this.o=function(){n.i++,n.currentUser=n.u(),o.resolve(),o=new Uf,e.enqueueRetryable((function(){return i(n.currentUser)}))};var u=function(){var t=o;e.enqueueRetryable(s(a().mark((function e(){return a().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)}))))},c=function(e){Of("FirebaseAuthCredentialsProvider","Auth detected"),n.auth=e,n.auth.addAuthTokenListener(n.o),u()};this.t.onInit((function(e){return c(e)})),setTimeout((function(){if(!n.auth){var e=n.t.getImmediate({optional:!0});e?c(e):(Of("FirebaseAuthCredentialsProvider","Auth not yet detected"),o.resolve(),o=new Uf)}}),0),u()}},{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?(Of("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),e.getToken()):n?(Lf("string"==typeof n.accessToken),new Vf(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 Lf(null===e||"string"==typeof e),new Cf(e)}}]),e}(),Kf=function(){function e(t,n,r){k(this,e),this.l=t,this.h=n,this.P=r,this.type="FirstParty",this.user=Cf.FIRST_PARTY,this.I=new Map}return w(e,[{key:"T",value:function(){return this.P?this.P():null}},{key:"headers",get:function(){this.I.set("X-Goog-AuthUser",this.l);var e=this.T();return e&&this.I.set("Authorization",e),this.h&&this.I.set("X-Goog-Iam-Authorization-Token",this.h),this.I}}]),e}(),qf=function(){function e(t,n,r){k(this,e),this.l=t,this.h=n,this.P=r}return w(e,[{key:"getToken",value:function(){return Promise.resolve(new Kf(this.l,this.h,this.P))}},{key:"start",value:function(e,t){e.enqueueRetryable((function(){return t(Cf.FIRST_PARTY)}))}},{key:"shutdown",value:function(){}},{key:"invalidateToken",value:function(){}}]),e}(),Wf=w((function e(t){k(this,e),this.value=t,this.type="AppCheck",this.headers=new Map,t&&t.length>0&&this.headers.set("x-firebase-appcheck",this.value)})),Gf=function(){function e(t){k(this,e),this.A=t,this.forceRefresh=!1,this.appCheck=null,this.R=null}return w(e,[{key:"start",value:function(e,t){var n=this,r=function(e){null!=e.error&&Of("FirebaseAppCheckTokenProvider","Error getting App Check token; using placeholder token instead. Error: ".concat(e.error.message));var r=e.token!==n.R;return n.R=e.token,Of("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){Of("FirebaseAppCheckTokenProvider","AppCheck detected"),n.appCheck=e,n.appCheck.addTokenListener(n.o)};this.A.onInit((function(e){return i(e)})),setTimeout((function(){if(!n.appCheck){var e=n.A.getImmediate({optional:!0});e?i(e):Of("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?(Lf("string"==typeof t.token),e.R=t.token,new Wf(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 Qf(e){var t="undefined"!=typeof self&&(self.crypto||self.msCrypto),n=new Uint8Array(e);if(t&&"function"==typeof t.getRandomValues)t.getRandomValues(n);else for(var r=0;r<e;r++)n[r]=Math.floor(256*Math.random());return n}var $f=function(){function e(){k(this,e)}return w(e,null,[{key:"V",value:function(){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t=62*Math.floor(256/62),n="";n.length<20;)for(var r=Qf(40),i=0;i<r.length;++i)n.length<20&&r[i]<t&&(n+=e.charAt(r[i]%62));return n}}]),e}();function Yf(e,t){return e<t?-1:e>t?1:0}function Xf(e,t,n){return e.length===t.length&&e.every((function(e,r){return n(e,t[r])}))}var Jf=function(){function e(t,n){if(k(this,e),this.seconds=t,this.nanoseconds=n,n<0)throw new Ff(jf.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(n>=1e9)throw new Ff(jf.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(t<-62135596800)throw new Ff(jf.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t);if(t>=253402300800)throw new Ff(jf.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t)}return w(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?Yf(this.nanoseconds,e.nanoseconds):Yf(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}(),Zf=function(){function e(t){k(this,e),this.timestamp=t}return w(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 Jf(0,0))}},{key:"max",value:function(){return new e(new Jf(253402300799,999999999))}}]),e}(),eh=function(){function e(t,n,r){k(this,e),void 0===n?n=0:n>t.length&&Df(),void 0===r?r=t.length-n:r>t.length-n&&Df(),this.segments=t,this.offset=n,this.len=r}return w(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}(),th=function(e){_(n,e);var t=T(n);function n(){return k(this,n),t.apply(this,arguments)}return w(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 s=o[a];if(s.indexOf("//")>=0)throw new Ff(jf.INVALID_ARGUMENT,"Invalid segment (".concat(s,"). Paths must not contain // in them."));e.push.apply(e,v(s.split("/").filter((function(e){return e.length>0}))))}return new n(e)}},{key:"emptyPath",value:function(){return new n([])}}]),n}(eh),nh=/^[_a-zA-Z][_a-zA-Z0-9]*$/,rh=function(e){_(n,e);var t=T(n);function n(){return k(this,n),t.apply(this,arguments)}return w(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 nh.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 Ff(jf.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 s=e[i];if("\\"===s){if(i+1===e.length)throw new Ff(jf.INVALID_ARGUMENT,"Path has trailing escape character: "+e);var u=e[i+1];if("\\"!==u&&"."!==u&&"`"!==u)throw new Ff(jf.INVALID_ARGUMENT,"Path has invalid escape sequence: "+e);r+=u,i+=2}else"`"===s?(o=!o,i++):"."!==s||o?(r+=s,i++):(a(),i++)}if(a(),o)throw new Ff(jf.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new n(t)}},{key:"emptyPath",value:function(){return new n([])}}]),n}(eh),ih=function(){function e(t){k(this,e),this.path=t}return w(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===th.comparator(this.path,e.path)}},{key:"toString",value:function(){return this.path.toString()}}],[{key:"fromPath",value:function(t){return new e(th.fromString(t))}},{key:"fromName",value:function(t){return new e(th.fromString(t).popFirst(5))}},{key:"empty",value:function(){return new e(th.emptyPath())}},{key:"comparator",value:function(e,t){return th.comparator(e.path,t.path)}},{key:"isDocumentKey",value:function(e){return e.length%2==0}},{key:"fromSegments",value:function(t){return new e(new th(t.slice()))}}]),e}(),ah=w((function e(t,n,r,i){k(this,e),this.indexId=t,this.collectionGroup=n,this.fields=r,this.indexState=i}));ah.UNKNOWN_ID=-1;function oh(e,t){var n=e.toTimestamp().seconds,r=e.toTimestamp().nanoseconds+1,i=Zf.fromTimestamp(1e9===r?new Jf(n+1,0):new Jf(n,r));return new uh(i,ih.empty(),t)}function sh(e){return new uh(e.readTime,e.key,-1)}var uh=function(){function e(t,n,r){k(this,e),this.readTime=t,this.documentKey=n,this.largestBatchId=r}return w(e,null,[{key:"min",value:function(){return new e(Zf.min(),ih.empty(),-1)}},{key:"max",value:function(){return new e(Zf.max(),ih.empty(),-1)}}]),e}();function ch(e,t){var n=e.readTime.compareTo(t.readTime);return 0!==n?n:0!==(n=ih.comparator(e.documentKey,t.documentKey))?n:Yf(e.largestBatchId,t.largestBatchId)}var lh="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.",fh=function(){function e(){k(this,e),this.onCommittedListeners=[]}return w(e,[{key:"addOnCommittedListener",value:function(e){this.onCommittedListeners.push(e)}},{key:"raiseOnCommittedEvent",value:function(){this.onCommittedListeners.forEach((function(e){return e()}))}}]),e}();function hh(e){return dh.apply(this,arguments)}function dh(){return(dh=s(a().mark((function e(t){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.code===jf.FAILED_PRECONDITION&&t.message===lh){e.next=2;break}throw t;case 2:Of("LocalStore","Unexpectedly lost primary lease");case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ph=function(){function e(t){var n=this;k(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 w(e,[{key:"catch",value:function(e){return this.next(void 0,e)}},{key:"next",value:function(t,n){var r=this;return this.callbackAttached&&Df(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(n,this.error):this.wrapSuccess(t,this.result):new e((function(e,i){r.nextCallback=function(n){r.wrapSuccess(t,n).next(e,i)},r.catchCallback=function(t){r.wrapFailure(n,t).next(e,i)}}))}},{key:"toPromise",value:function(){var e=this;return new Promise((function(t,n){e.next(t,n)}))}},{key:"wrapUserFunction",value:function(t){try{var n=t();return n instanceof e?n:e.resolve(n)}catch(t){return e.reject(t)}}},{key:"wrapSuccess",value:function(t,n){return t?this.wrapUserFunction((function(){return t(n)})):e.resolve(n)}},{key:"wrapFailure",value:function(t,n){return t?this.wrapUserFunction((function(){return t(n)})):e.reject(n)}}],[{key:"resolve",value:function(t){return new e((function(e,n){e(t)}))}},{key:"reject",value:function(t){return new e((function(e,n){n(t)}))}},{key:"waitFor",value:function(t){return new e((function(e,n){var r=0,i=0,a=!1;t.forEach((function(t){++r,t.next((function(){++i,a&&i===r&&e()}),(function(e){return n(e)}))})),a=!0,i===r&&e()}))}},{key:"or",value:function(t){var n,r=e.resolve(!1),i=m(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,s=function(){var s=u;n(t[s]).next((function(t){a[s]=t,++o===i&&e(a)}),(function(e){return r(e)}))},u=0;u<i;u++)s()}))}},{key:"doWhile",value:function(t,n){return new e((function(e,r){!function i(){!0===t()?n().next((function(){i()}),r):e()}()}))}}]),e}();function vh(e){return"IndexedDbTransactionError"===e.name}var mh=function(){function e(t,n){var r=this;k(this,e),this.previousValue=t,n&&(n.sequenceNumberHandler=function(e){return r.oe(e)},this._e=function(e){return n.writeSequenceNumber(e)})}return w(e,[{key:"oe",value:function(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}},{key:"next",value:function(){var e=++this.previousValue;return this._e&&this._e(e),e}}]),e}();function gh(e){return null==e}function yh(e){return 0===e&&1/e==-1/0}mh.ae=-1;var kh=["mutationQueues","mutations","documentMutations","remoteDocuments","targets","owner","targetGlobal","targetDocuments"].concat(["clientMetadata"]).concat(["remoteDocumentGlobal"]).concat(["collectionParents"]).concat(["bundles","namedQueries"]),bh=([].concat(v(kh),["documentOverlays"]),["mutationQueues","mutations","documentMutations","remoteDocumentsV14","targets","owner","targetGlobal","targetDocuments","clientMetadata","remoteDocumentGlobal","collectionParents","bundles","namedQueries","documentOverlays"]),wh=bh;[].concat(wh,["indexConfiguration","indexState","indexEntries"]);function xh(e){var t=0;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function Eh(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(n,e[n])}function _h(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}var Sh=function(){function e(t,n){k(this,e),this.comparator=t,this.root=n||Th.EMPTY}return w(e,[{key:"insert",value:function(t,n){return new e(this.comparator,this.root.insert(t,n,this.comparator).copy(null,null,Th.BLACK,null,null))}},{key:"remove",value:function(t){return new e(this.comparator,this.root.remove(t,this.comparator).copy(null,null,Th.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 Ch(this.root,null,this.comparator,!1)}},{key:"getIteratorFrom",value:function(e){return new Ch(this.root,e,this.comparator,!1)}},{key:"getReverseIterator",value:function(){return new Ch(this.root,null,this.comparator,!0)}},{key:"getReverseIteratorFrom",value:function(e){return new Ch(this.root,e,this.comparator,!0)}}]),e}(),Ch=function(){function e(t,n,r,i){k(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 w(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}(),Th=function(){function e(t,n,r,i,a){k(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 w(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 Df();if(this.right.isRed())throw Df();var e=this.left.check();if(e!==this.right.check())throw Df();return e+(this.isRed()?0:1)}}]),e}();Th.EMPTY=null,Th.RED=!0,Th.BLACK=!1,Th.EMPTY=new(function(){function e(){k(this,e),this.size=0}return w(e,[{key:"key",get:function(){throw Df()}},{key:"value",get:function(){throw Df()}},{key:"color",get:function(){throw Df()}},{key:"left",get:function(){throw Df()}},{key:"right",get:function(){throw Df()}},{key:"copy",value:function(e,t,n,r,i){return this}},{key:"insert",value:function(e,t,n){return new Th(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 Ih=function(){function e(t){k(this,e),this.comparator=t,this.data=new Sh(this.comparator)}return w(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 Nh(this.data.getIterator())}},{key:"getIteratorFrom",value:function(e){return new Nh(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}(),Nh=function(){function e(t){k(this,e),this.iter=t}return w(e,[{key:"getNext",value:function(){return this.iter.getNext().key}},{key:"hasNext",value:function(){return this.iter.hasNext()}}]),e}();var Oh=function(){function e(t){k(this,e),this.fields=t,t.sort(rh.comparator)}return w(e,[{key:"unionWith",value:function(t){var n,r=new Ih(rh.comparator),i=m(this.fields);try{for(i.s();!(n=i.n()).done;){var a=n.value;r=r.add(a)}}catch(c){i.e(c)}finally{i.f()}var o,s=m(t);try{for(s.s();!(o=s.n()).done;){var u=o.value;r=r.add(u)}}catch(c){s.e(c)}finally{s.f()}return new e(r.toArray())}},{key:"covers",value:function(e){var t,n=m(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 Xf(this.fields,e.fields,(function(e,t){return e.isEqual(t)}))}}],[{key:"empty",value:function(){return new e([])}}]),e}(),Rh=function(e){_(n,e);var t=T(n);function n(){var e;return k(this,n),(e=t.apply(this,arguments)).name="Base64DecodeError",e}return w(n)}(N(Error));var Ph=function(e){function t(e){k(this,t),this.binaryString=e}return w(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 Yf(this.binaryString,e.binaryString)}},{key:"isEqual",value:function(e){return this.binaryString===e.binaryString}}],[{key:"fromBase64String",value:function(e){var n=function(e){try{return atob(e)}catch(e){throw"undefined"!=typeof DOMException&&e instanceof DOMException?new Rh("Invalid base64 string: "+e):e}}(e);return new t(n)}},{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}();Ph.EMPTY_BYTE_STRING=new Ph("");var Ah=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function Dh(e){if(Lf(!!e),"string"==typeof e){var t=0,n=Ah.exec(e);if(Lf(!!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:Lh(e.seconds),nanos:Lh(e.nanos)}}function Lh(e){return"number"==typeof e?e:"string"==typeof e?Number(e):0}function Mh(e){return"string"==typeof e?Ph.fromBase64String(e):Ph.fromUint8Array(e)}function jh(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 Fh(e){var t=e.mapValue.fields.__previous_value__;return jh(t)?Fh(t):t}function Uh(e){var t=Dh(e.mapValue.fields.__local_write_time__.timestampValue);return new Jf(t.seconds,t.nanos)}var Vh=w((function e(t,n,r,i,a,o,s,u,c){k(this,e),this.databaseId=t,this.appId=n,this.persistenceKey=r,this.host=i,this.ssl=a,this.forceLongPolling=o,this.autoDetectLongPolling=s,this.longPollingOptions=u,this.useFetchStreams=c})),zh=function(){function e(t,n){k(this,e),this.projectId=t,this.database=n||"(default)"}return w(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}(),Bh={mapValue:{fields:{__type__:{stringValue:"__max__"}}}};function Hh(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?jh(e)?4:nd(e)?9007199254740991:10:Df()}function Kh(e,t){if(e===t)return!0;var n=Hh(e);if(n!==Hh(t))return!1;switch(n){case 0:case 9007199254740991:return!0;case 1:return e.booleanValue===t.booleanValue;case 4:return Uh(e).isEqual(Uh(t));case 3:return function(e,t){if("string"==typeof e.timestampValue&&"string"==typeof t.timestampValue&&e.timestampValue.length===t.timestampValue.length)return e.timestampValue===t.timestampValue;var n=Dh(e.timestampValue),r=Dh(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 Mh(e.bytesValue).isEqual(Mh(t.bytesValue))}(e,t);case 7:return e.referenceValue===t.referenceValue;case 8:return function(e,t){return Lh(e.geoPointValue.latitude)===Lh(t.geoPointValue.latitude)&&Lh(e.geoPointValue.longitude)===Lh(t.geoPointValue.longitude)}(e,t);case 2:return function(e,t){if("integerValue"in e&&"integerValue"in t)return Lh(e.integerValue)===Lh(t.integerValue);if("doubleValue"in e&&"doubleValue"in t){var n=Lh(e.doubleValue),r=Lh(t.doubleValue);return n===r?yh(n)===yh(r):isNaN(n)&&isNaN(r)}return!1}(e,t);case 9:return Xf(e.arrayValue.values||[],t.arrayValue.values||[],Kh);case 10:return function(e,t){var n=e.mapValue.fields||{},r=t.mapValue.fields||{};if(xh(n)!==xh(r))return!1;for(var i in n)if(n.hasOwnProperty(i)&&(void 0===r[i]||!Kh(n[i],r[i])))return!1;return!0}(e,t);default:return Df()}}function qh(e,t){return void 0!==(e.values||[]).find((function(e){return Kh(e,t)}))}function Wh(e,t){if(e===t)return 0;var n=Hh(e),r=Hh(t);if(n!==r)return Yf(n,r);switch(n){case 0:case 9007199254740991:return 0;case 1:return Yf(e.booleanValue,t.booleanValue);case 2:return function(e,t){var n=Lh(e.integerValue||e.doubleValue),r=Lh(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 Gh(e.timestampValue,t.timestampValue);case 4:return Gh(Uh(e),Uh(t));case 5:return Yf(e.stringValue,t.stringValue);case 6:return function(e,t){var n=Mh(e),r=Mh(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=Yf(n[i],r[i]);if(0!==a)return a}return Yf(n.length,r.length)}(e.referenceValue,t.referenceValue);case 8:return function(e,t){var n=Yf(Lh(e.latitude),Lh(t.latitude));return 0!==n?n:Yf(Lh(e.longitude),Lh(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=Wh(n[i],r[i]);if(a)return a}return Yf(n.length,r.length)}(e.arrayValue,t.arrayValue);case 10:return function(e,t){if(e===Bh.mapValue&&t===Bh.mapValue)return 0;if(e===Bh.mapValue)return 1;if(t===Bh.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 s=Yf(r[o],a[o]);if(0!==s)return s;var u=Wh(n[r[o]],i[a[o]]);if(0!==u)return u}return Yf(r.length,a.length)}(e.mapValue,t.mapValue);default:throw Df()}}function Gh(e,t){if("string"==typeof e&&"string"==typeof t&&e.length===t.length)return Yf(e,t);var n=Dh(e),r=Dh(t),i=Yf(n.seconds,r.seconds);return 0!==i?i:Yf(n.nanos,r.nanos)}function Qh(e){return $h(e)}function $h(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=Dh(e);return"time(".concat(t.seconds,",").concat(t.nanos,")")}(e.timestampValue):"stringValue"in e?e.stringValue:"bytesValue"in e?function(e){return Mh(e).toBase64()}(e.bytesValue):"referenceValue"in e?function(e){return ih.fromName(e).toString()}(e.referenceValue):"geoPointValue"in e?function(e){return"geo(".concat(e.latitude,",").concat(e.longitude,")")}(e.geoPointValue):"arrayValue"in e?function(e){var t,n="[",r=!0,i=m(e.values||[]);try{for(i.s();!(t=i.n()).done;){var a=t.value;r?r=!1:n+=",",n+=$h(a)}}catch(o){i.e(o)}finally{i.f()}return n+"]"}(e.arrayValue):"mapValue"in e?function(e){var t,n="{",r=!0,i=m(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($h(e.fields[a]))}}catch(o){i.e(o)}finally{i.f()}return n+"}"}(e.mapValue):Df()}function Yh(e){return!!e&&"integerValue"in e}function Xh(e){return!!e&&"arrayValue"in e}function Jh(e){return!!e&&"nullValue"in e}function Zh(e){return!!e&&"doubleValue"in e&&isNaN(Number(e.doubleValue))}function ed(e){return!!e&&"mapValue"in e}function td(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 Eh(e.mapValue.fields,(function(e,n){return t.mapValue.fields[e]=td(n)})),t}if(e.arrayValue){for(var n={arrayValue:{values:[]}},r=0;r<(e.arrayValue.values||[]).length;++r)n.arrayValue.values[r]=td(e.arrayValue.values[r]);return n}return Object.assign({},e)}function nd(e){return"__max__"===(((e.mapValue||{}).fields||{}).__type__||{}).stringValue}var rd=function(){function e(t){k(this,e),this.value=t}return w(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(!ed(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()]=td(t)}},{key:"setAll",value:function(e){var t=this,n=rh.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()]=td(e):i.push(a.lastSegment())}));var a=this.getFieldsMap(n);this.applyChanges(a,r,i)}},{key:"delete",value:function(e){var t=this.field(e.popLast());ed(t)&&t.mapValue.fields&&delete t.mapValue.fields[e.lastSegment()]}},{key:"isEqual",value:function(e){return Kh(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)];ed(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){Eh(t,(function(t,n){return e[t]=n}));var r,i=m(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(td(this.value))}}],[{key:"empty",value:function(){return new e({mapValue:{}})}}]),e}();var id=function(){function e(t,n,r,i,a,o,s){k(this,e),this.key=t,this.documentType=n,this.version=r,this.readTime=i,this.createTime=a,this.data=o,this.documentState=s}return w(e,[{key:"convertToFoundDocument",value:function(e,t){return!this.createTime.isEqual(Zf.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=rd.empty(),this.documentState=0,this}},{key:"convertToUnknownDocument",value:function(e){return this.version=e,this.documentType=3,this.data=rd.empty(),this.documentState=2,this}},{key:"setHasCommittedMutations",value:function(){return this.documentState=2,this}},{key:"setHasLocalMutations",value:function(){return this.documentState=1,this.version=Zf.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,Zf.min(),Zf.min(),Zf.min(),rd.empty(),0)}},{key:"newFoundDocument",value:function(t,n,r,i){return new e(t,1,n,Zf.min(),r,i,0)}},{key:"newNoDocument",value:function(t,n){return new e(t,2,n,Zf.min(),Zf.min(),rd.empty(),0)}},{key:"newUnknownDocument",value:function(t,n){return new e(t,3,n,Zf.min(),Zf.min(),rd.empty(),2)}}]),e}(),ad=w((function e(t,n){k(this,e),this.position=t,this.inclusive=n}));function od(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()?ih.comparator(ih.fromName(o.referenceValue),n.key):Wh(o,n.data.field(a.field)),"desc"===a.dir&&(r*=-1),0!==r)break}return r}function sd(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(!Kh(e.position[n],t.position[n]))return!1;return!0}var ud=w((function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"asc";k(this,e),this.field=t,this.dir=n}));function cd(e,t){return e.dir===t.dir&&e.field.isEqual(t.field)}var ld=w((function e(){k(this,e)})),fd=function(e){_(n,e);var t=T(n);function n(e,r,i){var a;return k(this,n),(a=t.call(this)).field=e,a.op=r,a.value=i,a}return w(n,[{key:"matches",value:function(e){var t=e.data.field(this.field);return"!="===this.op?null!==t&&this.matchesComparison(Wh(t,this.value)):null!==t&&Hh(this.value)===Hh(t)&&this.matchesComparison(Wh(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 Df()}}},{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 kd(e,t,r):"array-contains"===t?new Ed(e,r):"in"===t?new _d(e,r):"not-in"===t?new Sd(e,r):"array-contains-any"===t?new Cd(e,r):new n(e,t,r)}},{key:"createKeyFieldInFilter",value:function(e,t,n){return"in"===t?new bd(e,n):new wd(e,n)}}]),n}(ld),hd=function(e){_(n,e);var t=T(n);function n(e,r){var i;return k(this,n),(i=t.call(this)).filters=e,i.op=r,i.ce=null,i}return w(n,[{key:"matches",value:function(e){return dd(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.ce||(this.ce=this.filters.reduce((function(e,t){return e.concat(t.getFlattenedFilters())}),[])),this.ce}},{key:"getFilters",value:function(){return Object.assign([],this.filters)}},{key:"getFirstInequalityField",value:function(){var e=this.le((function(e){return e.isInequality()}));return null!==e?e.field:null}},{key:"le",value:function(e){var t,n=m(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}(ld);function dd(e){return"and"===e.op}function pd(e){return vd(e)&&dd(e)}function vd(e){var t,n=m(e.filters);try{for(n.s();!(t=n.n()).done;){if(t.value instanceof hd)return!1}}catch(r){n.e(r)}finally{n.f()}return!0}function md(e){if(e instanceof fd)return e.field.canonicalString()+e.op.toString()+Qh(e.value);if(pd(e))return e.filters.map((function(e){return md(e)})).join(",");var t=e.filters.map((function(e){return md(e)})).join(",");return"".concat(e.op,"(").concat(t,")")}function gd(e,t){return e instanceof fd?function(e,t){return t instanceof fd&&e.op===t.op&&e.field.isEqual(t.field)&&Kh(e.value,t.value)}(e,t):e instanceof hd?function(e,t){return t instanceof hd&&e.op===t.op&&e.filters.length===t.filters.length&&e.filters.reduce((function(e,n,r){return e&&gd(n,t.filters[r])}),!0)}(e,t):void Df()}function yd(e){return e instanceof fd?function(e){return"".concat(e.field.canonicalString()," ").concat(e.op," ").concat(Qh(e.value))}(e):e instanceof hd?function(e){return e.op.toString()+" {"+e.getFilters().map(yd).join(" ,")+"}"}(e):"Filter"}var kd=function(e){_(n,e);var t=T(n);function n(e,r,i){var a;return k(this,n),(a=t.call(this,e,r,i)).key=ih.fromName(i.referenceValue),a}return w(n,[{key:"matches",value:function(e){var t=ih.comparator(e.key,this.key);return this.matchesComparison(t)}}]),n}(fd),bd=function(e){_(n,e);var t=T(n);function n(e,r){var i;return k(this,n),(i=t.call(this,e,"in",r)).keys=xd("in",r),i}return w(n,[{key:"matches",value:function(e){return this.keys.some((function(t){return t.isEqual(e.key)}))}}]),n}(fd),wd=function(e){_(n,e);var t=T(n);function n(e,r){var i;return k(this,n),(i=t.call(this,e,"not-in",r)).keys=xd("not-in",r),i}return w(n,[{key:"matches",value:function(e){return!this.keys.some((function(t){return t.isEqual(e.key)}))}}]),n}(fd);function xd(e,t){var n;return((null===(n=t.arrayValue)||void 0===n?void 0:n.values)||[]).map((function(e){return ih.fromName(e.referenceValue)}))}var Ed=function(e){_(n,e);var t=T(n);function n(e,r){return k(this,n),t.call(this,e,"array-contains",r)}return w(n,[{key:"matches",value:function(e){var t=e.data.field(this.field);return Xh(t)&&qh(t.arrayValue,this.value)}}]),n}(fd),_d=function(e){_(n,e);var t=T(n);function n(e,r){return k(this,n),t.call(this,e,"in",r)}return w(n,[{key:"matches",value:function(e){var t=e.data.field(this.field);return null!==t&&qh(this.value.arrayValue,t)}}]),n}(fd),Sd=function(e){_(n,e);var t=T(n);function n(e,r){return k(this,n),t.call(this,e,"not-in",r)}return w(n,[{key:"matches",value:function(e){if(qh(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;var t=e.data.field(this.field);return null!==t&&!qh(this.value.arrayValue,t)}}]),n}(fd),Cd=function(e){_(n,e);var t=T(n);function n(e,r){return k(this,n),t.call(this,e,"array-contains-any",r)}return w(n,[{key:"matches",value:function(e){var t=this,n=e.data.field(this.field);return!(!Xh(n)||!n.arrayValue.values)&&n.arrayValue.values.some((function(e){return qh(t.value.arrayValue,e)}))}}]),n}(fd),Td=w((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,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;k(this,e),this.path=t,this.collectionGroup=n,this.orderBy=r,this.filters=i,this.limit=a,this.startAt=o,this.endAt=s,this.he=null}));function Id(e){return new Td(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,arguments.length>6&&void 0!==arguments[6]?arguments[6]:null)}function Nd(e){var t=Mf(e);if(null===t.he){var n=t.path.canonicalString();null!==t.collectionGroup&&(n+="|cg:"+t.collectionGroup),n+="|f:",n+=t.filters.map((function(e){return md(e)})).join(","),n+="|ob:",n+=t.orderBy.map((function(e){return function(e){return e.field.canonicalString()+e.dir}(e)})).join(","),gh(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 Qh(e)})).join(",")),t.endAt&&(n+="|ub:",n+=t.endAt.inclusive?"a:":"b:",n+=t.endAt.position.map((function(e){return Qh(e)})).join(",")),t.he=n}return t.he}function Od(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(!cd(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(!gd(e.filters[r],t.filters[r]))return!1;return e.collectionGroup===t.collectionGroup&&!!e.path.isEqual(t.path)&&!!sd(e.startAt,t.startAt)&&sd(e.endAt,t.endAt)}function Rd(e){return ih.isDocumentKey(e.path)&&null===e.collectionGroup&&0===e.filters.length}var Pd=w((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",s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null;k(this,e),this.path=t,this.collectionGroup=n,this.explicitOrderBy=r,this.filters=i,this.limit=a,this.limitType=o,this.startAt=s,this.endAt=u,this.Pe=null,this.Ie=null,this.de=null,this.startAt,this.endAt}));function Ad(e,t,n,r,i,a,o,s){return new Pd(e,t,n,r,i,a,o,s)}function Dd(e){return new Pd(e)}function Ld(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 Md(e){return e.explicitOrderBy.length>0?e.explicitOrderBy[0].field:null}function jd(e){var t,n=m(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 Fd(e){return null!==e.collectionGroup}function Ud(e){var t=Mf(e);if(null===t.Pe){t.Pe=[];var n=jd(t),r=Md(t);if(null!==n&&null===r)n.isKeyField()||t.Pe.push(new ud(n)),t.Pe.push(new ud(rh.keyField(),"asc"));else{var i,a=!1,o=m(t.explicitOrderBy);try{for(o.s();!(i=o.n()).done;){var s=i.value;t.Pe.push(s),s.field.isKeyField()&&(a=!0)}}catch(c){o.e(c)}finally{o.f()}if(!a){var u=t.explicitOrderBy.length>0?t.explicitOrderBy[t.explicitOrderBy.length-1].dir:"asc";t.Pe.push(new ud(rh.keyField(),u))}}}return t.Pe}function Vd(e){var t=Mf(e);return t.Ie||(t.Ie=zd(t,Ud(e))),t.Ie}function zd(e,t){if("F"===e.limitType)return Id(e.path,e.collectionGroup,t,e.filters,e.limit,e.startAt,e.endAt);t=t.map((function(e){var t="desc"===e.dir?"asc":"desc";return new ud(e.field,t)}));var n=e.endAt?new ad(e.endAt.position,e.endAt.inclusive):null,r=e.startAt?new ad(e.startAt.position,e.startAt.inclusive):null;return Id(e.path,e.collectionGroup,t,e.filters,e.limit,n,r)}function Bd(e,t,n){return new Pd(e.path,e.collectionGroup,e.explicitOrderBy.slice(),e.filters.slice(),t,n,e.startAt,e.endAt)}function Hd(e,t){return Od(Vd(e),Vd(t))&&e.limitType===t.limitType}function Kd(e){return"".concat(Nd(Vd(e)),"|lt:").concat(e.limitType)}function qd(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 yd(e)})).join(", "),"]")),gh(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 Qh(e)})).join(",")),e.endAt&&(t+=", endAt: ",t+=e.endAt.inclusive?"a:":"b:",t+=e.endAt.position.map((function(e){return Qh(e)})).join(",")),"Target(".concat(t,")")}(Vd(e)),"; limitType=").concat(e.limitType,")")}function Wd(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):ih.isDocumentKey(e.path)?e.path.isEqual(n):e.path.isImmediateParentOf(n)}(e,t)&&function(e,t){var n,r=m(Ud(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=m(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=od(e,t,n);return e.inclusive?r<=0:r<0}(e.startAt,Ud(e),t))&&!(e.endAt&&!function(e,t,n){var r=od(e,t,n);return e.inclusive?r>=0:r>0}(e.endAt,Ud(e),t))}(e,t)}function Gd(e){return e.collectionGroup||(e.path.length%2==1?e.path.lastSegment():e.path.get(e.path.length-2))}function Qd(e){return function(t,n){var r,i=!1,a=m(Ud(e));try{for(a.s();!(r=a.n()).done;){var o=r.value,s=$d(o,t,n);if(0!==s)return s;i=i||o.field.isKeyField()}}catch(u){a.e(u)}finally{a.f()}return 0}}function $d(e,t,n){var r=e.field.isKeyField()?ih.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?Wh(r,i):Df()}(e.field,t,n);switch(e.dir){case"asc":return r;case"desc":return-1*r;default:return Df()}}var Yd=function(){function e(t,n){k(this,e),this.mapKeyFn=t,this.equalsFn=n,this.inner={},this.innerSize=0}return w(e,[{key:"get",value:function(e){var t=this.mapKeyFn(e),n=this.inner[t];if(void 0!==n){var r,i=m(n);try{for(i.s();!(r=i.n()).done;){var a=h(r.value,2),o=a[0],s=a[1];if(this.equalsFn(o,e))return s}}catch(u){i.e(u)}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){Eh(this.inner,(function(t,n){var r,i=m(n);try{for(i.s();!(r=i.n()).done;){var a=h(r.value,2),o=a[0],s=a[1];e(o,s)}}catch(u){i.e(u)}finally{i.f()}}))}},{key:"isEmpty",value:function(){return _h(this.inner)}},{key:"size",value:function(){return this.innerSize}}]),e}(),Xd=new Sh(ih.comparator);function Jd(){return Xd}var Zd=new Sh(ih.comparator);function ep(){for(var e=Zd,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 tp(e){var t=Zd;return e.forEach((function(e,n){return t=t.insert(e,n.overlayedDocument)})),t}function np(){return ip()}function rp(){return ip()}function ip(){return new Yd((function(e){return e.toString()}),(function(e,t){return e.isEqual(t)}))}new Sh(ih.comparator);var ap=new Ih(ih.comparator);function op(){for(var e=ap,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 sp=new Ih(Yf);function up(){return sp}function cp(e,t){if(e.useProto3Json){if(isNaN(t))return{doubleValue:"NaN"};if(t===1/0)return{doubleValue:"Infinity"};if(t===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:yh(t)?"-0":t}}function lp(e){return{integerValue:""+e}}var fp=w((function e(){k(this,e),this._=void 0}));function hp(e,t,n){return e instanceof vp?function(e,t){var n={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:e.seconds,nanos:e.nanoseconds}}}};return t&&jh(t)&&(t=Fh(t)),t&&(n.fields.__previous_value__=t),{mapValue:n}}(n,t):e instanceof mp?gp(e,t):e instanceof yp?kp(e,t):function(e,t){var n=pp(e,t),r=wp(n)+wp(e.Te);return Yh(n)&&Yh(e.Te)?lp(r):cp(e.serializer,r)}(e,t)}function dp(e,t,n){return e instanceof mp?gp(e,t):e instanceof yp?kp(e,t):n}function pp(e,t){return e instanceof bp?function(e){return Yh(e)||function(e){return!!e&&"doubleValue"in e}(e)}(t)?t:{integerValue:0}:null}var vp=function(e){_(n,e);var t=T(n);function n(){return k(this,n),t.apply(this,arguments)}return w(n)}(fp),mp=function(e){_(n,e);var t=T(n);function n(e){var r;return k(this,n),(r=t.call(this)).elements=e,r}return w(n)}(fp);function gp(e,t){var n,r=xp(t),i=m(e.elements);try{var a=function(){var e=n.value;r.some((function(t){return Kh(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 yp=function(e){_(n,e);var t=T(n);function n(e){var r;return k(this,n),(r=t.call(this)).elements=e,r}return w(n)}(fp);function kp(e,t){var n,r=xp(t),i=m(e.elements);try{var a=function(){var e=n.value;r=r.filter((function(t){return!Kh(t,e)}))};for(i.s();!(n=i.n()).done;)a()}catch(o){i.e(o)}finally{i.f()}return{arrayValue:{values:r}}}var bp=function(e){_(n,e);var t=T(n);function n(e,r){var i;return k(this,n),(i=t.call(this)).serializer=e,i.Te=r,i}return w(n)}(fp);function wp(e){return Lh(e.integerValue||e.doubleValue)}function xp(e){return Xh(e)&&e.arrayValue.values?e.arrayValue.values.slice():[]}var Ep=function(){function e(t,n){k(this,e),this.updateTime=t,this.exists=n}return w(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 _p(e,t){return void 0!==e.updateTime?t.isFoundDocument()&&t.version.isEqual(e.updateTime):void 0===e.exists||e.exists===t.isFoundDocument()}var Sp=w((function e(){k(this,e)}));function Cp(e,t){if(!e.hasLocalMutations||t&&0===t.fields.length)return null;if(null===t)return e.isNoDocument()?new jp(e.key,Ep.none()):new Op(e.key,e.data,Ep.none());var n,r=e.data,i=rd.empty(),a=new Ih(rh.comparator),o=m(t.fields);try{for(o.s();!(n=o.n()).done;){var s=n.value;if(!a.has(s)){var u=r.field(s);null===u&&s.length>1&&(s=s.popLast(),u=r.field(s)),null===u?i.delete(s):i.set(s,u),a=a.add(s)}}}catch(c){o.e(c)}finally{o.f()}return new Rp(e.key,i,new Oh(a.toArray()),Ep.none())}function Tp(e,t,n){e instanceof Op?function(e,t,n){var r=e.value.clone(),i=Ap(e.fieldTransforms,t,n.transformResults);r.setAll(i),t.convertToFoundDocument(n.version,r).setHasCommittedMutations()}(e,t,n):e instanceof Rp?function(e,t,n){if(_p(e.precondition,t)){var r=Ap(e.fieldTransforms,t,n.transformResults),i=t.data;i.setAll(Pp(e)),i.setAll(r),t.convertToFoundDocument(n.version,i).setHasCommittedMutations()}else t.convertToUnknownDocument(n.version)}(e,t,n):function(e,t,n){t.convertToNoDocument(n.version).setHasCommittedMutations()}(0,t,n)}function Ip(e,t,n,r){return e instanceof Op?function(e,t,n,r){if(!_p(e.precondition,t))return n;var i=e.value.clone(),a=Dp(e.fieldTransforms,r,t);return i.setAll(a),t.convertToFoundDocument(t.version,i).setHasLocalMutations(),null}(e,t,n,r):e instanceof Rp?function(e,t,n,r){if(!_p(e.precondition,t))return n;var i=Dp(e.fieldTransforms,r,t),a=t.data;return a.setAll(Pp(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 _p(e.precondition,t)?(t.convertToNoDocument(t.version).setHasLocalMutations(),null):n}(e,t,n)}function Np(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)&&Xf(e,t,(function(e,t){return function(e,t){return e.field.isEqual(t.field)&&function(e,t){return e instanceof mp&&t instanceof mp||e instanceof yp&&t instanceof yp?Xf(e.elements,t.elements,Kh):e instanceof bp&&t instanceof bp?Kh(e.Te,t.Te):e instanceof vp&&t instanceof vp}(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 Op=function(e){_(n,e);var t=T(n);function n(e,r,i){var a,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return k(this,n),(a=t.call(this)).key=e,a.value=r,a.precondition=i,a.fieldTransforms=o,a.type=0,a}return w(n,[{key:"getFieldMask",value:function(){return null}}]),n}(Sp),Rp=function(e){_(n,e);var t=T(n);function n(e,r,i,a){var o,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];return k(this,n),(o=t.call(this)).key=e,o.data=r,o.fieldMask=i,o.precondition=a,o.fieldTransforms=s,o.type=1,o}return w(n,[{key:"getFieldMask",value:function(){return this.fieldMask}}]),n}(Sp);function Pp(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 Ap(e,t,n){var r=new Map;Lf(e.length===n.length);for(var i=0;i<n.length;i++){var a=e[i],o=a.transform,s=t.data.field(a.field);r.set(a.field,dp(o,s,n[i]))}return r}function Dp(e,t,n){var r,i=new Map,a=m(e);try{for(a.s();!(r=a.n()).done;){var o=r.value,s=o.transform,u=n.data.field(o.field);i.set(o.field,hp(s,u,t))}}catch(c){a.e(c)}finally{a.f()}return i}var Lp,Mp,jp=function(e){_(n,e);var t=T(n);function n(e,r){var i;return k(this,n),(i=t.call(this)).key=e,i.precondition=r,i.type=2,i.fieldTransforms=[],i}return w(n,[{key:"getFieldMask",value:function(){return null}}]),n}(Sp),Fp=function(){function e(t,n,r,i){k(this,e),this.batchId=t,this.localWriteTime=n,this.baseMutations=r,this.mutations=i}return w(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)&&Tp(i,e,n[r])}}},{key:"applyToLocalView",value:function(e,t){var n,r=m(this.baseMutations);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.key.isEqual(e.key)&&(t=Ip(i,e,t,this.localWriteTime))}}catch(u){r.e(u)}finally{r.f()}var a,o=m(this.mutations);try{for(o.s();!(a=o.n()).done;){var s=a.value;s.key.isEqual(e.key)&&(t=Ip(s,e,t,this.localWriteTime))}}catch(u){o.e(u)}finally{o.f()}return t}},{key:"applyToLocalDocumentSet",value:function(e,t){var n=this,r=rp();return this.mutations.forEach((function(i){var a=e.get(i.key),o=a.overlayedDocument,s=n.applyToLocalView(o,a.mutatedFields),u=Cp(o,s=t.has(i.key)?null:s);null!==u&&r.set(i.key,u),o.isValidDocument()||o.convertToNoDocument(Zf.min())})),r}},{key:"keys",value:function(){return this.mutations.reduce((function(e,t){return e.add(t.key)}),op())}},{key:"isEqual",value:function(e){return this.batchId===e.batchId&&Xf(this.mutations,e.mutations,(function(e,t){return Np(e,t)}))&&Xf(this.baseMutations,e.baseMutations,(function(e,t){return Np(e,t)}))}}]),e}(),Up=function(){function e(t,n){k(this,e),this.largestBatchId=t,this.mutation=n}return w(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}(),Vp=w((function e(t,n){k(this,e),this.count=t,this.unchangedNames=n}));function zp(e){if(void 0===e)return Rf("GRPC error has no .code"),jf.UNKNOWN;switch(e){case Lp.OK:return jf.OK;case Lp.CANCELLED:return jf.CANCELLED;case Lp.UNKNOWN:return jf.UNKNOWN;case Lp.DEADLINE_EXCEEDED:return jf.DEADLINE_EXCEEDED;case Lp.RESOURCE_EXHAUSTED:return jf.RESOURCE_EXHAUSTED;case Lp.INTERNAL:return jf.INTERNAL;case Lp.UNAVAILABLE:return jf.UNAVAILABLE;case Lp.UNAUTHENTICATED:return jf.UNAUTHENTICATED;case Lp.INVALID_ARGUMENT:return jf.INVALID_ARGUMENT;case Lp.NOT_FOUND:return jf.NOT_FOUND;case Lp.ALREADY_EXISTS:return jf.ALREADY_EXISTS;case Lp.PERMISSION_DENIED:return jf.PERMISSION_DENIED;case Lp.FAILED_PRECONDITION:return jf.FAILED_PRECONDITION;case Lp.ABORTED:return jf.ABORTED;case Lp.OUT_OF_RANGE:return jf.OUT_OF_RANGE;case Lp.UNIMPLEMENTED:return jf.UNIMPLEMENTED;case Lp.DATA_LOSS:return jf.DATA_LOSS;default:return Df()}}(Mp=Lp||(Lp={}))[Mp.OK=0]="OK",Mp[Mp.CANCELLED=1]="CANCELLED",Mp[Mp.UNKNOWN=2]="UNKNOWN",Mp[Mp.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",Mp[Mp.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",Mp[Mp.NOT_FOUND=5]="NOT_FOUND",Mp[Mp.ALREADY_EXISTS=6]="ALREADY_EXISTS",Mp[Mp.PERMISSION_DENIED=7]="PERMISSION_DENIED",Mp[Mp.UNAUTHENTICATED=16]="UNAUTHENTICATED",Mp[Mp.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",Mp[Mp.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",Mp[Mp.ABORTED=10]="ABORTED",Mp[Mp.OUT_OF_RANGE=11]="OUT_OF_RANGE",Mp[Mp.UNIMPLEMENTED=12]="UNIMPLEMENTED",Mp[Mp.INTERNAL=13]="INTERNAL",Mp[Mp.UNAVAILABLE=14]="UNAVAILABLE",Mp[Mp.DATA_LOSS=15]="DATA_LOSS";var Bp=null;function Hp(){return new TextEncoder}var Kp=new _f([4294967295,4294967295],0);function qp(e){var t=Hp().encode(e),n=new Ef;return n.update(t),new Uint8Array(n.digest())}function Wp(e){var t=new DataView(e.buffer),n=t.getUint32(0,!0),r=t.getUint32(4,!0),i=t.getUint32(8,!0),a=t.getUint32(12,!0);return[new _f([n,r],0),new _f([i,a],0)]}var Gp=function(){function e(t,n,r){if(k(this,e),this.bitmap=t,this.padding=n,this.hashCount=r,n<0||n>=8)throw new Qp("Invalid padding: ".concat(n));if(r<0)throw new Qp("Invalid hash count: ".concat(r));if(t.length>0&&0===this.hashCount)throw new Qp("Invalid hash count: ".concat(r));if(0===t.length&&0!==n)throw new Qp("Invalid padding when bitmap length is 0: ".concat(n));this.Ae=8*t.length-n,this.Re=_f.fromNumber(this.Ae)}return w(e,[{key:"Ve",value:function(e,t,n){var r=e.add(t.multiply(_f.fromNumber(n)));return 1===r.compare(Kp)&&(r=new _f([r.getBits(0),r.getBits(1)],0)),r.modulo(this.Re).toNumber()}},{key:"me",value:function(e){return 0!=(this.bitmap[Math.floor(e/8)]&1<<e%8)}},{key:"mightContain",value:function(e){if(0===this.Ae)return!1;for(var t=h(Wp(qp(e)),2),n=t[0],r=t[1],i=0;i<this.hashCount;i++){var a=this.Ve(n,r,i);if(!this.me(a))return!1}return!0}},{key:"insert",value:function(e){if(0!==this.Ae)for(var t=h(Wp(qp(e)),2),n=t[0],r=t[1],i=0;i<this.hashCount;i++){var a=this.Ve(n,r,i);this.fe(a)}}},{key:"fe",value:function(e){var t=Math.floor(e/8),n=e%8;this.bitmap[t]|=1<<n}}],[{key:"create",value:function(t,n,r){var i=t%8==0?0:8-t%8,a=new e(new Uint8Array(Math.ceil(t/8)),i,n);return r.forEach((function(e){return a.insert(e)})),a}}]),e}(),Qp=function(e){_(n,e);var t=T(n);function n(){var e;return k(this,n),(e=t.apply(this,arguments)).name="BloomFilterError",e}return w(n)}(N(Error)),$p=function(){function e(t,n,r,i,a){k(this,e),this.snapshotVersion=t,this.targetChanges=n,this.targetMismatches=r,this.documentUpdates=i,this.resolvedLimboDocuments=a}return w(e,null,[{key:"createSynthesizedRemoteEventForCurrentChange",value:function(t,n,r){var i=new Map;return i.set(t,Yp.createSynthesizedTargetChangeForCurrentChange(t,n,r)),new e(Zf.min(),i,new Sh(Yf),Jd(),op())}}]),e}(),Yp=function(){function e(t,n,r,i,a){k(this,e),this.resumeToken=t,this.current=n,this.addedDocuments=r,this.modifiedDocuments=i,this.removedDocuments=a}return w(e,null,[{key:"createSynthesizedTargetChangeForCurrentChange",value:function(t,n,r){return new e(r,n,op(),op(),op())}}]),e}(),Xp=w((function e(t,n,r,i){k(this,e),this.ge=t,this.removedTargetIds=n,this.key=r,this.pe=i})),Jp=w((function e(t,n){k(this,e),this.targetId=t,this.ye=n})),Zp=w((function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ph.EMPTY_BYTE_STRING,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;k(this,e),this.state=t,this.targetIds=n,this.resumeToken=r,this.cause=i})),ev=function(){function e(){k(this,e),this.we=0,this.Se=rv(),this.be=Ph.EMPTY_BYTE_STRING,this.De=!1,this.Ce=!0}return w(e,[{key:"current",get:function(){return this.De}},{key:"resumeToken",get:function(){return this.be}},{key:"ve",get:function(){return 0!==this.we}},{key:"Fe",get:function(){return this.Ce}},{key:"Me",value:function(e){e.approximateByteSize()>0&&(this.Ce=!0,this.be=e)}},{key:"xe",value:function(){var e=op(),t=op(),n=op();return this.Se.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:Df()}})),new Yp(this.be,this.De,e,t,n)}},{key:"Oe",value:function(){this.Ce=!1,this.Se=rv()}},{key:"Ne",value:function(e,t){this.Ce=!0,this.Se=this.Se.insert(e,t)}},{key:"Be",value:function(e){this.Ce=!0,this.Se=this.Se.remove(e)}},{key:"Le",value:function(){this.we+=1}},{key:"ke",value:function(){this.we-=1}},{key:"qe",value:function(){this.Ce=!0,this.De=!0}}]),e}(),tv=function(){function e(t){k(this,e),this.Qe=t,this.Ke=new Map,this.$e=Jd(),this.Ue=nv(),this.We=new Sh(Yf)}return w(e,[{key:"Ge",value:function(e){var t,n=m(e.ge);try{for(n.s();!(t=n.n()).done;){var r=t.value;e.pe&&e.pe.isFoundDocument()?this.ze(r,e.pe):this.je(r,e.key,e.pe)}}catch(s){n.e(s)}finally{n.f()}var i,a=m(e.removedTargetIds);try{for(a.s();!(i=a.n()).done;){var o=i.value;this.je(o,e.key,e.pe)}}catch(s){a.e(s)}finally{a.f()}}},{key:"He",value:function(e){var t=this;this.forEachTarget(e,(function(n){var r=t.Je(n);switch(e.state){case 0:t.Ye(n)&&r.Me(e.resumeToken);break;case 1:r.ke(),r.ve||r.Oe(),r.Me(e.resumeToken);break;case 2:r.ke(),r.ve||t.removeTarget(n);break;case 3:t.Ye(n)&&(r.qe(),r.Me(e.resumeToken));break;case 4:t.Ye(n)&&(t.Ze(n),r.Me(e.resumeToken));break;default:Df()}}))}},{key:"forEachTarget",value:function(e,t){var n=this;e.targetIds.length>0?e.targetIds.forEach(t):this.Ke.forEach((function(e,r){n.Ye(r)&&t(r)}))}},{key:"Xe",value:function(e){var t=e.targetId,n=e.ye.count,r=this.et(t);if(r){var i=r.target;if(Rd(i))if(0===n){var a=new ih(i.path);this.je(t,a,id.newNoDocument(a,Zf.min()))}else Lf(1===n);else{var o=this.tt(t);if(o!==n){var s=this.nt(e),u=s?this.rt(s,e,o):1;if(0!==u){this.Ze(t);var c=2===u?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch";this.We=this.We.insert(t,c)}null==Bp||Bp.it(function(e,t,n,r,i){var a,o,s,u,c,l,f={localCacheCount:e,existenceFilterCount:t.count,databaseId:n.database,projectId:n.projectId},h=t.unchangedNames;return h&&(f.bloomFilter={applied:0===i,hashCount:null!==(a=null==h?void 0:h.hashCount)&&void 0!==a?a:0,bitmapLength:null!==(u=null===(s=null===(o=null==h?void 0:h.bits)||void 0===o?void 0:o.bitmap)||void 0===s?void 0:s.length)&&void 0!==u?u:0,padding:null!==(l=null===(c=null==h?void 0:h.bits)||void 0===c?void 0:c.padding)&&void 0!==l?l:0,mightContain:function(e){var t;return null!==(t=null==r?void 0:r.mightContain(e))&&void 0!==t&&t}}),f}(o,e.ye,this.Qe.st(),s,u))}}}}},{key:"nt",value:function(e){var t=e.ye.unchangedNames;if(!t||!t.bits)return null;var n,r,i=t.bits,a=i.bitmap,o=void 0===a?"":a,s=i.padding,u=void 0===s?0:s,c=t.hashCount,l=void 0===c?0:c;try{n=Mh(o).toUint8Array()}catch(e){if(e instanceof Rh)return Pf("Decoding the base64 bloom filter in existence filter failed ("+e.message+"); ignoring the bloom filter and falling back to full re-query."),null;throw e}try{r=new Gp(n,u,l)}catch(e){return Pf(e instanceof Qp?"BloomFilter error: ":"Applying bloom filter failed: ",e),null}return 0===r.Ae?null:r}},{key:"rt",value:function(e,t,n){return t.ye.count===n-this.ot(e,t.targetId)?0:2}},{key:"ot",value:function(e,t){var n=this,r=this.Qe.getRemoteKeysForTarget(t),i=0;return r.forEach((function(r){var a=n.Qe.st(),o="projects/".concat(a.projectId,"/databases/").concat(a.database,"/documents/").concat(r.path.canonicalString());e.mightContain(o)||(n.je(t,r,null),i++)})),i}},{key:"_t",value:function(e){var t=this,n=new Map;this.Ke.forEach((function(r,i){var a=t.et(i);if(a){if(r.current&&Rd(a.target)){var o=new ih(a.target.path);null!==t.$e.get(o)||t.ut(i,o)||t.je(i,o,id.newNoDocument(o,e))}r.Fe&&(n.set(i,r.xe()),r.Oe())}}));var r=op();this.Ue.forEach((function(e,n){var i=!0;n.forEachWhile((function(e){var n=t.et(e);return!n||"TargetPurposeLimboResolution"===n.purpose||(i=!1,!1)})),i&&(r=r.add(e))})),this.$e.forEach((function(t,n){return n.setReadTime(e)}));var i=new $p(e,n,this.We,this.$e,r);return this.$e=Jd(),this.Ue=nv(),this.We=new Sh(Yf),i}},{key:"ze",value:function(e,t){if(this.Ye(e)){var n=this.ut(e,t.key)?2:0;this.Je(e).Ne(t.key,n),this.$e=this.$e.insert(t.key,t),this.Ue=this.Ue.insert(t.key,this.ct(t.key).add(e))}}},{key:"je",value:function(e,t,n){if(this.Ye(e)){var r=this.Je(e);this.ut(e,t)?r.Ne(t,1):r.Be(t),this.Ue=this.Ue.insert(t,this.ct(t).delete(e)),n&&(this.$e=this.$e.insert(t,n))}}},{key:"removeTarget",value:function(e){this.Ke.delete(e)}},{key:"tt",value:function(e){var t=this.Je(e).xe();return this.Qe.getRemoteKeysForTarget(e).size+t.addedDocuments.size-t.removedDocuments.size}},{key:"Le",value:function(e){this.Je(e).Le()}},{key:"Je",value:function(e){var t=this.Ke.get(e);return t||(t=new ev,this.Ke.set(e,t)),t}},{key:"ct",value:function(e){var t=this.Ue.get(e);return t||(t=new Ih(Yf),this.Ue=this.Ue.insert(e,t)),t}},{key:"Ye",value:function(e){var t=null!==this.et(e);return t||Of("WatchChangeAggregator","Detected inactive target",e),t}},{key:"et",value:function(e){var t=this.Ke.get(e);return t&&t.ve?null:this.Qe.lt(e)}},{key:"Ze",value:function(e){var t=this;this.Ke.set(e,new ev),this.Qe.getRemoteKeysForTarget(e).forEach((function(n){t.je(e,n,null)}))}},{key:"ut",value:function(e,t){return this.Qe.getRemoteKeysForTarget(e).has(t)}}]),e}();function nv(){return new Sh(ih.comparator)}function rv(){return new Sh(ih.comparator)}var iv={asc:"ASCENDING",desc:"DESCENDING"},av={"<":"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"},ov={and:"AND",or:"OR"},sv=w((function e(t,n){k(this,e),this.databaseId=t,this.useProto3Json=n}));function uv(e,t){return e.useProto3Json||gh(t)?t:{value:t}}function cv(e,t){return e.useProto3Json?"".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 lv(e,t){return e.useProto3Json?t.toBase64():t.toUint8Array()}function fv(e){return Lf(!!e),Zf.fromTimestamp(function(e){var t=Dh(e);return new Jf(t.seconds,t.nanos)}(e))}function hv(e,t){return function(e){return new th(["projects",e.projectId,"databases",e.database])}(e).child("documents").child(t).canonicalString()}function dv(e){var t=th.fromString(e);return Lf(Nv(t)),t}function pv(e,t){var n=dv(t);if(n.get(1)!==e.databaseId.projectId)throw new Ff(jf.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 Ff(jf.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+e.databaseId.database);return new ih(yv(n))}function vv(e,t){return hv(e.databaseId,t)}function mv(e){var t=dv(e);return 4===t.length?th.emptyPath():yv(t)}function gv(e){return new th(["projects",e.databaseId.projectId,"databases",e.databaseId.database]).canonicalString()}function yv(e){return Lf(e.length>4&&"documents"===e.get(4)),e.popFirst(5)}function kv(e,t){return{documents:[vv(e,t.path)]}}function bv(e,t){var n={structuredQuery:{}},r=t.path;null!==t.collectionGroup?(n.parent=vv(e,r),n.structuredQuery.from=[{collectionId:t.collectionGroup,allDescendants:!0}]):(n.parent=vv(e,r.popLast()),n.structuredQuery.from=[{collectionId:r.lastSegment()}]);var i=function(e){if(0!==e.length)return Iv(hd.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:Cv(e.field),direction:Ev(e.dir)}}(e)}))}(t.orderBy);a&&(n.structuredQuery.orderBy=a);var o=uv(e,t.limit);return null!==o&&(n.structuredQuery.limit=o),t.startAt&&(n.structuredQuery.startAt=function(e){return{before:e.inclusive,values:e.position}}(t.startAt)),t.endAt&&(n.structuredQuery.endAt=function(e){return{before:!e.inclusive,values:e.position}}(t.endAt)),n}function wv(e){var t=mv(e.parent),n=e.structuredQuery,r=n.from?n.from.length:0,i=null;if(r>0){Lf(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=xv(e);return t instanceof hd&&pd(t)?t.getFilters():[t]}(n.where));var s=[];n.orderBy&&(s=function(e){return e.map((function(e){return function(e){return new ud(Tv(e.field),function(e){switch(e){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(e.direction))}(e)}))}(n.orderBy));var u=null;n.limit&&(u=function(e){var t;return gh(t="object"==typeof e?e.value:e)?null:t}(n.limit));var c=null;n.startAt&&(c=function(e){var t=!!e.before,n=e.values||[];return new ad(n,t)}(n.startAt));var l=null;return n.endAt&&(l=function(e){var t=!e.before,n=e.values||[];return new ad(n,t)}(n.endAt)),Ad(t,i,s,o,u,"F",c,l)}function xv(e){return void 0!==e.unaryFilter?function(e){switch(e.unaryFilter.op){case"IS_NAN":var t=Tv(e.unaryFilter.field);return fd.create(t,"==",{doubleValue:NaN});case"IS_NULL":var n=Tv(e.unaryFilter.field);return fd.create(n,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":var r=Tv(e.unaryFilter.field);return fd.create(r,"!=",{doubleValue:NaN});case"IS_NOT_NULL":var i=Tv(e.unaryFilter.field);return fd.create(i,"!=",{nullValue:"NULL_VALUE"});default:return Df()}}(e):void 0!==e.fieldFilter?function(e){return fd.create(Tv(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 Df()}}(e.fieldFilter.op),e.fieldFilter.value)}(e):void 0!==e.compositeFilter?function(e){return hd.create(e.compositeFilter.filters.map((function(e){return xv(e)})),function(e){switch(e){case"AND":return"and";case"OR":return"or";default:return Df()}}(e.compositeFilter.op))}(e):Df()}function Ev(e){return iv[e]}function _v(e){return av[e]}function Sv(e){return ov[e]}function Cv(e){return{fieldPath:e.canonicalString()}}function Tv(e){return rh.fromServerFormat(e.fieldPath)}function Iv(e){return e instanceof fd?function(e){if("=="===e.op){if(Zh(e.value))return{unaryFilter:{field:Cv(e.field),op:"IS_NAN"}};if(Jh(e.value))return{unaryFilter:{field:Cv(e.field),op:"IS_NULL"}}}else if("!="===e.op){if(Zh(e.value))return{unaryFilter:{field:Cv(e.field),op:"IS_NOT_NAN"}};if(Jh(e.value))return{unaryFilter:{field:Cv(e.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:Cv(e.field),op:_v(e.op),value:e.value}}}(e):e instanceof hd?function(e){var t=e.getFilters().map((function(e){return Iv(e)}));return 1===t.length?t[0]:{compositeFilter:{op:Sv(e.op),filters:t}}}(e):Df()}function Nv(e){return e.length>=4&&"projects"===e.get(0)&&"databases"===e.get(2)}var Ov=function(){function e(t,n,r,i){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Zf.min(),o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:Zf.min(),s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:Ph.EMPTY_BYTE_STRING,u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null;k(this,e),this.target=t,this.targetId=n,this.purpose=r,this.sequenceNumber=i,this.snapshotVersion=a,this.lastLimboFreeSnapshotVersion=o,this.resumeToken=s,this.expectedCount=u}return w(e,[{key:"withSequenceNumber",value:function(t){return new e(this.target,this.targetId,this.purpose,t,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}},{key:"withResumeToken",value:function(t,n){return new e(this.target,this.targetId,this.purpose,this.sequenceNumber,n,this.lastLimboFreeSnapshotVersion,t,null)}},{key:"withExpectedCount",value:function(t){return new e(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,t)}},{key:"withLastLimboFreeSnapshotVersion",value:function(t){return new e(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,t,this.resumeToken,this.expectedCount)}}]),e}(),Rv=w((function e(t){k(this,e),this.ht=t}));function Pv(e){var t=wv({parent:e.parent,structuredQuery:e.structuredQuery});return"LAST"===e.limitType?Bd(t,t.limit,"L"):t}var Av=function(){function e(){k(this,e)}return w(e,[{key:"dt",value:function(e,t){this.Tt(e,t),t.Et()}},{key:"Tt",value:function(e,t){if("nullValue"in e)this.At(t,5);else if("booleanValue"in e)this.At(t,10),t.Rt(e.booleanValue?1:0);else if("integerValue"in e)this.At(t,15),t.Rt(Lh(e.integerValue));else if("doubleValue"in e){var n=Lh(e.doubleValue);isNaN(n)?this.At(t,13):(this.At(t,15),yh(n)?t.Rt(0):t.Rt(n))}else if("timestampValue"in e){var r=e.timestampValue;this.At(t,20),"string"==typeof r?t.Vt(r):(t.Vt("".concat(r.seconds||"")),t.Rt(r.nanos||0))}else if("stringValue"in e)this.ft(e.stringValue,t),this.gt(t);else if("bytesValue"in e)this.At(t,30),t.yt(Mh(e.bytesValue)),this.gt(t);else if("referenceValue"in e)this.wt(e.referenceValue,t);else if("geoPointValue"in e){var i=e.geoPointValue;this.At(t,45),t.Rt(i.latitude||0),t.Rt(i.longitude||0)}else"mapValue"in e?nd(e)?this.At(t,Number.MAX_SAFE_INTEGER):(this.St(e.mapValue,t),this.gt(t)):"arrayValue"in e?(this.bt(e.arrayValue,t),this.gt(t)):Df()}},{key:"ft",value:function(e,t){this.At(t,25),this.Dt(e,t)}},{key:"Dt",value:function(e,t){t.Vt(e)}},{key:"St",value:function(e,t){var n=e.fields||{};this.At(t,55);for(var r=0,i=Object.keys(n);r<i.length;r++){var a=i[r];this.ft(a,t),this.Tt(n[a],t)}}},{key:"bt",value:function(e,t){var n=e.values||[];this.At(t,50);var r,i=m(n);try{for(i.s();!(r=i.n()).done;){var a=r.value;this.Tt(a,t)}}catch(o){i.e(o)}finally{i.f()}}},{key:"wt",value:function(e,t){var n=this;this.At(t,37),ih.fromName(e).path.forEach((function(e){n.At(t,60),n.Dt(e,t)}))}},{key:"At",value:function(e,t){e.Rt(t)}},{key:"gt",value:function(e){e.Rt(2)}}]),e}();Av.Ct=new Av;var Dv=function(){function e(){k(this,e),this.an=new Lv}return w(e,[{key:"addToCollectionParentIndex",value:function(e,t){return this.an.add(t),ph.resolve()}},{key:"getCollectionParents",value:function(e,t){return ph.resolve(this.an.getEntries(t))}},{key:"addFieldIndex",value:function(e,t){return ph.resolve()}},{key:"deleteFieldIndex",value:function(e,t){return ph.resolve()}},{key:"deleteAllFieldIndexes",value:function(e){return ph.resolve()}},{key:"createTargetIndexes",value:function(e,t){return ph.resolve()}},{key:"getDocumentsMatchingTarget",value:function(e,t){return ph.resolve(null)}},{key:"getIndexType",value:function(e,t){return ph.resolve(0)}},{key:"getFieldIndexes",value:function(e,t){return ph.resolve([])}},{key:"getNextCollectionGroupToUpdate",value:function(e){return ph.resolve(null)}},{key:"getMinOffset",value:function(e,t){return ph.resolve(uh.min())}},{key:"getMinOffsetFromCollectionGroup",value:function(e,t){return ph.resolve(uh.min())}},{key:"updateCollectionGroup",value:function(e,t,n){return ph.resolve()}},{key:"updateIndexEntries",value:function(e,t){return ph.resolve()}}]),e}(),Lv=function(){function e(){k(this,e),this.index={}}return w(e,[{key:"add",value:function(e){var t=e.lastSegment(),n=e.popLast(),r=this.index[t]||new Ih(th.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 Ih(th.comparator)).toArray()}}]),e}();new Uint8Array(0);var Mv=function(){function e(t,n,r){k(this,e),this.cacheSizeCollectionThreshold=t,this.percentileToCollect=n,this.maximumSequenceNumbersToCollect=r}return w(e,null,[{key:"withCacheSize",value:function(t){return new e(t,e.DEFAULT_COLLECTION_PERCENTILE,e.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}}]),e}();Mv.DEFAULT_COLLECTION_PERCENTILE=10,Mv.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,Mv.DEFAULT=new Mv(41943040,Mv.DEFAULT_COLLECTION_PERCENTILE,Mv.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),Mv.DISABLED=new Mv(-1,0,0);var jv=function(){function e(t){k(this,e),this.Nn=t}return w(e,[{key:"next",value:function(){return this.Nn+=2,this.Nn}}],[{key:"Bn",value:function(){return new e(0)}},{key:"Ln",value:function(){return new e(-1)}}]),e}();var Fv=function(){function e(){k(this,e),this.changes=new Yd((function(e){return e.toString()}),(function(e,t){return e.isEqual(t)})),this.changesApplied=!1}return w(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,id.newInvalidDocument(e).setReadTime(t))}},{key:"getEntry",value:function(e,t){this.assertNotApplied();var n=this.changes.get(t);return void 0!==n?ph.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 Uv=w((function e(t,n){k(this,e),this.overlayedDocument=t,this.mutatedFields=n})),Vv=function(){function e(t,n,r,i){k(this,e),this.remoteDocumentCache=t,this.mutationQueue=n,this.documentOverlayCache=r,this.indexManager=i}return w(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&&Ip(r.mutation,e,Oh.empty(),Jf.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,op()).next((function(){return t}))}))}},{key:"getLocalViewOfDocuments",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:op(),i=np();return this.populateOverlays(e,i,t).next((function(){return n.computeViews(e,t,i,r).next((function(e){var t=ep();return e.forEach((function(e,n){t=t.insert(e,n.overlayedDocument)})),t}))}))}},{key:"getOverlayedDocuments",value:function(e,t){var n=this,r=np();return this.populateOverlays(e,r,t).next((function(){return n.computeViews(e,t,r,op())}))}},{key:"populateOverlays",value:function(e,t,n){var r=[];return n.forEach((function(e){t.has(e)||r.push(e)})),this.documentOverlayCache.getOverlays(e,r).next((function(e){e.forEach((function(e,n){t.set(e,n)}))}))}},{key:"computeViews",value:function(e,t,n,r){var i=Jd(),a=ip(),o=ip();return t.forEach((function(e,t){var o=n.get(t.key);r.has(t.key)&&(void 0===o||o.mutation instanceof Rp)?i=i.insert(t.key,t):void 0!==o?(a.set(t.key,o.mutation.getFieldMask()),Ip(o.mutation,t,o.mutation.getFieldMask(),Jf.now())):a.set(t.key,Oh.empty())})),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 Uv(t,null!==(n=a.get(e))&&void 0!==n?n:null))})),o}))}},{key:"recalculateAndSaveOverlays",value:function(e,t){var n=this,r=ip(),i=new Sh((function(e,t){return e-t})),a=op();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,t).next((function(e){var n,a=m(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)||Oh.empty();o=e.applyToLocalView(a,o),r.set(n,o);var s=(i.get(e.batchId)||op()).add(n);i=i.insert(e.batchId,s)}}))};for(a.s();!(n=a.n()).done;)o()}catch(s){a.e(s)}finally{a.f()}})).next((function(){for(var o=[],s=i.getReverseIterator(),u=function(){var i=s.getNext(),u=i.key,c=i.value,l=rp();c.forEach((function(e){if(!a.has(e)){var n=Cp(t.get(e),r.get(e));null!==n&&l.set(e,n),a=a.add(e)}})),o.push(n.documentOverlayCache.saveOverlays(e,u,l))};s.hasNext();)u();return ph.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,r){return function(e){return ih.isDocumentKey(e.path)&&null===e.collectionGroup&&0===e.filters.length}(t)?this.getDocumentsMatchingDocumentQuery(e,t.path):Fd(t)?this.getDocumentsMatchingCollectionGroupQuery(e,t,n,r):this.getDocumentsMatchingCollectionQuery(e,t,n,r)}},{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):ph.resolve(np()),s=-1,u=a;return o.next((function(t){return ph.forEach(t,(function(t,n){return s<n.largestBatchId&&(s=n.largestBatchId),a.get(t)?ph.resolve():i.remoteDocumentCache.getEntry(e,t).next((function(e){u=u.insert(t,e)}))})).next((function(){return i.populateOverlays(e,t,a)})).next((function(){return i.computeViews(e,u,t,op())})).next((function(e){return{batchId:s,changes:tp(e)}}))}))}))}},{key:"getDocumentsMatchingDocumentQuery",value:function(e,t){return this.getDocument(e,new ih(t)).next((function(e){var t=ep();return e.isFoundDocument()&&(t=t.insert(e.key,e)),t}))}},{key:"getDocumentsMatchingCollectionGroupQuery",value:function(e,t,n,r){var i=this,a=t.collectionGroup,o=ep();return this.indexManager.getCollectionParents(e,a).next((function(s){return ph.forEach(s,(function(s){var u=function(e,t){return new Pd(t,null,e.explicitOrderBy.slice(),e.filters.slice(),e.limit,e.limitType,e.startAt,e.endAt)}(t,s.child(a));return i.getDocumentsMatchingCollectionQuery(e,u,n,r).next((function(e){e.forEach((function(e,t){o=o.insert(e,t)}))}))})).next((function(){return o}))}))}},{key:"getDocumentsMatchingCollectionQuery",value:function(e,t,n,r){var i,a=this;return this.documentOverlayCache.getOverlaysForCollection(e,t.path,n.largestBatchId).next((function(o){return i=o,a.remoteDocumentCache.getDocumentsMatchingQuery(e,t,n,i,r)})).next((function(e){i.forEach((function(t,n){var r=n.getKey();null===e.get(r)&&(e=e.insert(r,id.newInvalidDocument(r)))}));var n=ep();return e.forEach((function(e,r){var a=i.get(e);void 0!==a&&Ip(a.mutation,r,Oh.empty(),Jf.now()),Wd(t,r)&&(n=n.insert(e,r))})),n}))}}]),e}(),zv=function(){function e(t){k(this,e),this.serializer=t,this.lr=new Map,this.hr=new Map}return w(e,[{key:"getBundleMetadata",value:function(e,t){return ph.resolve(this.lr.get(t))}},{key:"saveBundleMetadata",value:function(e,t){return this.lr.set(t.id,function(e){return{id:e.id,version:e.version,createTime:fv(e.createTime)}}(t)),ph.resolve()}},{key:"getNamedQuery",value:function(e,t){return ph.resolve(this.hr.get(t))}},{key:"saveNamedQuery",value:function(e,t){return this.hr.set(t.name,function(e){return{name:e.name,query:Pv(e.bundledQuery),readTime:fv(e.readTime)}}(t)),ph.resolve()}}]),e}(),Bv=function(){function e(){k(this,e),this.overlays=new Sh(ih.comparator),this.Pr=new Map}return w(e,[{key:"getOverlay",value:function(e,t){return ph.resolve(this.overlays.get(t))}},{key:"getOverlays",value:function(e,t){var n=this,r=np();return ph.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.It(e,t,i)})),ph.resolve()}},{key:"removeOverlaysForBatchId",value:function(e,t,n){var r=this,i=this.Pr.get(n);return void 0!==i&&(i.forEach((function(e){return r.overlays=r.overlays.remove(e)})),this.Pr.delete(n)),ph.resolve()}},{key:"getOverlaysForCollection",value:function(e,t,n){for(var r=np(),i=t.length+1,a=new ih(t.child("")),o=this.overlays.getIteratorFrom(a);o.hasNext();){var s=o.getNext().value,u=s.getKey();if(!t.isPrefixOf(u.path))break;u.path.length===i&&s.largestBatchId>n&&r.set(s.getKey(),s)}return ph.resolve(r)}},{key:"getOverlaysForCollectionGroup",value:function(e,t,n,r){for(var i=new Sh((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 s=i.get(o.largestBatchId);null===s&&(s=np(),i=i.insert(o.largestBatchId,s)),s.set(o.getKey(),o)}}for(var u=np(),c=i.getIterator();c.hasNext()&&(c.getNext().value.forEach((function(e,t){return u.set(e,t)})),!(u.size()>=r)););return ph.resolve(u)}},{key:"It",value:function(e,t,n){var r=this.overlays.get(n.key);if(null!==r){var i=this.Pr.get(r.largestBatchId).delete(n.key);this.Pr.set(r.largestBatchId,i)}this.overlays=this.overlays.insert(n.key,new Up(t,n));var a=this.Pr.get(t);void 0===a&&(a=op(),this.Pr.set(t,a)),this.Pr.set(t,a.add(n.key))}}]),e}(),Hv=function(){function e(){k(this,e),this.Ir=new Ih(Kv.dr),this.Tr=new Ih(Kv.Er)}return w(e,[{key:"isEmpty",value:function(){return this.Ir.isEmpty()}},{key:"addReference",value:function(e,t){var n=new Kv(e,t);this.Ir=this.Ir.add(n),this.Tr=this.Tr.add(n)}},{key:"Ar",value:function(e,t){var n=this;e.forEach((function(e){return n.addReference(e,t)}))}},{key:"removeReference",value:function(e,t){this.Rr(new Kv(e,t))}},{key:"Vr",value:function(e,t){var n=this;e.forEach((function(e){return n.removeReference(e,t)}))}},{key:"mr",value:function(e){var t=this,n=new ih(new th([])),r=new Kv(n,e),i=new Kv(n,e+1),a=[];return this.Tr.forEachInRange([r,i],(function(e){t.Rr(e),a.push(e.key)})),a}},{key:"gr",value:function(){var e=this;this.Ir.forEach((function(t){return e.Rr(t)}))}},{key:"Rr",value:function(e){this.Ir=this.Ir.delete(e),this.Tr=this.Tr.delete(e)}},{key:"pr",value:function(e){var t=new ih(new th([])),n=new Kv(t,e),r=new Kv(t,e+1),i=op();return this.Tr.forEachInRange([n,r],(function(e){i=i.add(e.key)})),i}},{key:"containsKey",value:function(e){var t=new Kv(e,0),n=this.Ir.firstAfterOrEqual(t);return null!==n&&e.isEqual(n.key)}}]),e}(),Kv=function(){function e(t,n){k(this,e),this.key=t,this.yr=n}return w(e,null,[{key:"dr",value:function(e,t){return ih.comparator(e.key,t.key)||Yf(e.yr,t.yr)}},{key:"Er",value:function(e,t){return Yf(e.yr,t.yr)||ih.comparator(e.key,t.key)}}]),e}(),qv=function(){function e(t,n){k(this,e),this.indexManager=t,this.referenceDelegate=n,this.mutationQueue=[],this.wr=1,this.Sr=new Ih(Kv.dr)}return w(e,[{key:"checkEmpty",value:function(e){return ph.resolve(0===this.mutationQueue.length)}},{key:"addMutationBatch",value:function(e,t,n,r){var i=this.wr;this.wr++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];var a=new Fp(i,t,n,r);this.mutationQueue.push(a);var o,s=m(r);try{for(s.s();!(o=s.n()).done;){var u=o.value;this.Sr=this.Sr.add(new Kv(u.key,i)),this.indexManager.addToCollectionParentIndex(e,u.key.path.popLast())}}catch(c){s.e(c)}finally{s.f()}return ph.resolve(a)}},{key:"lookupMutationBatch",value:function(e,t){return ph.resolve(this.br(t))}},{key:"getNextMutationBatchAfterBatchId",value:function(e,t){var n=t+1,r=this.Dr(n),i=r<0?0:r;return ph.resolve(this.mutationQueue.length>i?this.mutationQueue[i]:null)}},{key:"getHighestUnacknowledgedBatchId",value:function(){return ph.resolve(0===this.mutationQueue.length?-1:this.wr-1)}},{key:"getAllMutationBatches",value:function(e){return ph.resolve(this.mutationQueue.slice())}},{key:"getAllMutationBatchesAffectingDocumentKey",value:function(e,t){var n=this,r=new Kv(t,0),i=new Kv(t,Number.POSITIVE_INFINITY),a=[];return this.Sr.forEachInRange([r,i],(function(e){var t=n.br(e.yr);a.push(t)})),ph.resolve(a)}},{key:"getAllMutationBatchesAffectingDocumentKeys",value:function(e,t){var n=this,r=new Ih(Yf);return t.forEach((function(e){var t=new Kv(e,0),i=new Kv(e,Number.POSITIVE_INFINITY);n.Sr.forEachInRange([t,i],(function(e){r=r.add(e.yr)}))})),ph.resolve(this.Cr(r))}},{key:"getAllMutationBatchesAffectingQuery",value:function(e,t){var n=t.path,r=n.length+1,i=n;ih.isDocumentKey(i)||(i=i.child(""));var a=new Kv(new ih(i),0),o=new Ih(Yf);return this.Sr.forEachWhile((function(e){var t=e.key.path;return!!n.isPrefixOf(t)&&(t.length===r&&(o=o.add(e.yr)),!0)}),a),ph.resolve(this.Cr(o))}},{key:"Cr",value:function(e){var t=this,n=[];return e.forEach((function(e){var r=t.br(e);null!==r&&n.push(r)})),n}},{key:"removeMutationBatch",value:function(e,t){var n=this;Lf(0===this.vr(t.batchId,"removed")),this.mutationQueue.shift();var r=this.Sr;return ph.forEach(t.mutations,(function(i){var a=new Kv(i.key,t.batchId);return r=r.delete(a),n.referenceDelegate.markPotentiallyOrphaned(e,i.key)})).next((function(){n.Sr=r}))}},{key:"xn",value:function(e){}},{key:"containsKey",value:function(e,t){var n=new Kv(t,0),r=this.Sr.firstAfterOrEqual(n);return ph.resolve(t.isEqual(r&&r.key))}},{key:"performConsistencyCheck",value:function(e){return this.mutationQueue.length,ph.resolve()}},{key:"vr",value:function(e,t){return this.Dr(e)}},{key:"Dr",value:function(e){return 0===this.mutationQueue.length?0:e-this.mutationQueue[0].batchId}},{key:"br",value:function(e){var t=this.Dr(e);return t<0||t>=this.mutationQueue.length?null:this.mutationQueue[t]}}]),e}(),Wv=function(){function e(t){k(this,e),this.Fr=t,this.docs=new Sh(ih.comparator),this.size=0}return w(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.Fr(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 ph.resolve(n?n.document.mutableCopy():id.newInvalidDocument(t))}},{key:"getEntries",value:function(e,t){var n=this,r=Jd();return t.forEach((function(e){var t=n.docs.get(e);r=r.insert(e,t?t.document.mutableCopy():id.newInvalidDocument(e))})),ph.resolve(r)}},{key:"getDocumentsMatchingQuery",value:function(e,t,n,r){for(var i=Jd(),a=t.path,o=new ih(a.child("")),s=this.docs.getIteratorFrom(o);s.hasNext();){var u=s.getNext(),c=u.key,l=u.value.document;if(!a.isPrefixOf(c.path))break;c.path.length>a.length+1||ch(sh(l),n)<=0||(r.has(l.key)||Wd(t,l))&&(i=i.insert(l.key,l.mutableCopy()))}return ph.resolve(i)}},{key:"getAllFromCollectionGroup",value:function(e,t,n,r){Df()}},{key:"Mr",value:function(e,t){return ph.forEach(this.docs,(function(e){return t(e)}))}},{key:"newChangeBuffer",value:function(e){return new Gv(this)}},{key:"getSize",value:function(e){return ph.resolve(this.size)}}]),e}(),Gv=function(e){_(n,e);var t=T(n);function n(e){var r;return k(this,n),(r=t.call(this)).ur=e,r}return w(n,[{key:"applyChanges",value:function(e){var t=this,n=[];return this.changes.forEach((function(r,i){i.isValidDocument()?n.push(t.ur.addEntry(e,i)):t.ur.removeEntry(r)})),ph.waitFor(n)}},{key:"getFromCache",value:function(e,t){return this.ur.getEntry(e,t)}},{key:"getAllFromCache",value:function(e,t){return this.ur.getEntries(e,t)}}]),n}(Fv),Qv=function(){function e(t){k(this,e),this.persistence=t,this.Or=new Yd((function(e){return Nd(e)}),Od),this.lastRemoteSnapshotVersion=Zf.min(),this.highestTargetId=0,this.Nr=0,this.Br=new Hv,this.targetCount=0,this.Lr=jv.Bn()}return w(e,[{key:"forEachTarget",value:function(e,t){return this.Or.forEach((function(e,n){return t(n)})),ph.resolve()}},{key:"getLastRemoteSnapshotVersion",value:function(e){return ph.resolve(this.lastRemoteSnapshotVersion)}},{key:"getHighestSequenceNumber",value:function(e){return ph.resolve(this.Nr)}},{key:"allocateTargetId",value:function(e){return this.highestTargetId=this.Lr.next(),ph.resolve(this.highestTargetId)}},{key:"setTargetsMetadata",value:function(e,t,n){return n&&(this.lastRemoteSnapshotVersion=n),t>this.Nr&&(this.Nr=t),ph.resolve()}},{key:"Qn",value:function(e){this.Or.set(e.target,e);var t=e.targetId;t>this.highestTargetId&&(this.Lr=new jv(t),this.highestTargetId=t),e.sequenceNumber>this.Nr&&(this.Nr=e.sequenceNumber)}},{key:"addTargetData",value:function(e,t){return this.Qn(t),this.targetCount+=1,ph.resolve()}},{key:"updateTargetData",value:function(e,t){return this.Qn(t),ph.resolve()}},{key:"removeTargetData",value:function(e,t){return this.Or.delete(t.target),this.Br.mr(t.targetId),this.targetCount-=1,ph.resolve()}},{key:"removeTargets",value:function(e,t,n){var r=this,i=0,a=[];return this.Or.forEach((function(o,s){s.sequenceNumber<=t&&null===n.get(s.targetId)&&(r.Or.delete(o),a.push(r.removeMatchingKeysForTargetId(e,s.targetId)),i++)})),ph.waitFor(a).next((function(){return i}))}},{key:"getTargetCount",value:function(e){return ph.resolve(this.targetCount)}},{key:"getTargetData",value:function(e,t){var n=this.Or.get(t)||null;return ph.resolve(n)}},{key:"addMatchingKeys",value:function(e,t,n){return this.Br.Ar(t,n),ph.resolve()}},{key:"removeMatchingKeys",value:function(e,t,n){this.Br.Vr(t,n);var r=this.persistence.referenceDelegate,i=[];return r&&t.forEach((function(t){i.push(r.markPotentiallyOrphaned(e,t))})),ph.waitFor(i)}},{key:"removeMatchingKeysForTargetId",value:function(e,t){return this.Br.mr(t),ph.resolve()}},{key:"getMatchingKeysForTargetId",value:function(e,t){var n=this.Br.pr(t);return ph.resolve(n)}},{key:"containsKey",value:function(e,t){return ph.resolve(this.Br.containsKey(t))}}]),e}(),$v=function(){function e(t,n){var r=this;k(this,e),this.kr={},this.overlays={},this.qr=new mh(0),this.Qr=!1,this.Qr=!0,this.referenceDelegate=t(this),this.Kr=new Qv(this),this.indexManager=new Dv,this.remoteDocumentCache=function(e){return new Wv(e)}((function(e){return r.referenceDelegate.$r(e)})),this.serializer=new Rv(n),this.Ur=new zv(this.serializer)}return w(e,[{key:"start",value:function(){return Promise.resolve()}},{key:"shutdown",value:function(){return this.Qr=!1,Promise.resolve()}},{key:"started",get:function(){return this.Qr}},{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 Bv,this.overlays[e.toKey()]=t),t}},{key:"getMutationQueue",value:function(e,t){var n=this.kr[e.toKey()];return n||(n=new qv(t,this.referenceDelegate),this.kr[e.toKey()]=n),n}},{key:"getTargetCache",value:function(){return this.Kr}},{key:"getRemoteDocumentCache",value:function(){return this.remoteDocumentCache}},{key:"getBundleCache",value:function(){return this.Ur}},{key:"runTransaction",value:function(e,t,n){var r=this;Of("MemoryPersistence","Starting transaction:",e);var i=new Yv(this.qr.next());return this.referenceDelegate.Wr(),n(i).next((function(e){return r.referenceDelegate.Gr(i).next((function(){return e}))})).toPromise().then((function(e){return i.raiseOnCommittedEvent(),e}))}},{key:"zr",value:function(e,t){return ph.or(Object.values(this.kr).map((function(n){return function(){return n.containsKey(e,t)}})))}}]),e}(),Yv=function(e){_(n,e);var t=T(n);function n(e){var r;return k(this,n),(r=t.call(this)).currentSequenceNumber=e,r}return w(n)}(fh),Xv=function(){function e(t){k(this,e),this.persistence=t,this.jr=new Hv,this.Hr=null}return w(e,[{key:"Yr",get:function(){if(this.Hr)return this.Hr;throw Df()}},{key:"addReference",value:function(e,t,n){return this.jr.addReference(n,t),this.Yr.delete(n.toString()),ph.resolve()}},{key:"removeReference",value:function(e,t,n){return this.jr.removeReference(n,t),this.Yr.add(n.toString()),ph.resolve()}},{key:"markPotentiallyOrphaned",value:function(e,t){return this.Yr.add(t.toString()),ph.resolve()}},{key:"removeTarget",value:function(e,t){var n=this;this.jr.mr(t.targetId).forEach((function(e){return n.Yr.add(e.toString())}));var r=this.persistence.getTargetCache();return r.getMatchingKeysForTargetId(e,t.targetId).next((function(e){e.forEach((function(e){return n.Yr.add(e.toString())}))})).next((function(){return r.removeTargetData(e,t)}))}},{key:"Wr",value:function(){this.Hr=new Set}},{key:"Gr",value:function(e){var t=this,n=this.persistence.getRemoteDocumentCache().newChangeBuffer();return ph.forEach(this.Yr,(function(r){var i=ih.fromPath(r);return t.Zr(e,i).next((function(e){e||n.removeEntry(i,Zf.min())}))})).next((function(){return t.Hr=null,n.apply(e)}))}},{key:"updateLimboDocument",value:function(e,t){var n=this;return this.Zr(e,t).next((function(e){e?n.Yr.delete(t.toString()):n.Yr.add(t.toString())}))}},{key:"$r",value:function(e){return 0}},{key:"Zr",value:function(e,t){var n=this;return ph.or([function(){return ph.resolve(n.jr.containsKey(t))},function(){return n.persistence.getTargetCache().containsKey(e,t)},function(){return n.persistence.zr(e,t)}])}}],[{key:"Jr",value:function(t){return new e(t)}}]),e}();var Jv=function(){function e(t,n,r,i){k(this,e),this.targetId=t,this.fromCache=n,this.Qi=r,this.Ki=i}return w(e,null,[{key:"$i",value:function(t,n){var r,i=op(),a=op(),o=m(n.docChanges);try{for(o.s();!(r=o.n()).done;){var s=r.value;switch(s.type){case 0:i=i.add(s.doc.key);break;case 1:a=a.add(s.doc.key)}}}catch(u){o.e(u)}finally{o.f()}return new e(t,n.fromCache,i,a)}}]),e}(),Zv=function(){function e(){k(this,e),this._documentReadCount=0}return w(e,[{key:"documentReadCount",get:function(){return this._documentReadCount}},{key:"incrementDocumentReadCount",value:function(e){this._documentReadCount+=e}}]),e}(),em=function(){function e(){k(this,e),this.Ui=!1,this.Wi=!1,this.Gi=100,this.zi=8}return w(e,[{key:"initialize",value:function(e,t){this.ji=e,this.indexManager=t,this.Ui=!0}},{key:"getDocumentsMatchingQuery",value:function(e,t,n,r){var i=this,a={result:null};return this.Hi(e,t).next((function(e){a.result=e})).next((function(){if(!a.result)return i.Ji(e,t,r,n).next((function(e){a.result=e}))})).next((function(){if(!a.result){var n=new Zv;return i.Yi(e,t,n).next((function(r){if(a.result=r,i.Wi)return i.Zi(e,t,n,r.size)}))}})).next((function(){return a.result}))}},{key:"Zi",value:function(e,t,n,r){return n.documentReadCount<this.Gi?(Nf()<=se.DEBUG&&Of("QueryEngine","SDK will not create cache indexes for query:",qd(t),"since it only creates cache indexes for collection contains","more than or equal to",this.Gi,"documents"),ph.resolve()):(Nf()<=se.DEBUG&&Of("QueryEngine","Query:",qd(t),"scans",n.documentReadCount,"local documents and returns",r,"documents as results."),n.documentReadCount>this.zi*r?(Nf()<=se.DEBUG&&Of("QueryEngine","The SDK decides to create cache indexes for query:",qd(t),"as using cache indexes may help improve performance."),this.indexManager.createTargetIndexes(e,Vd(t))):ph.resolve())}},{key:"Hi",value:function(e,t){var n=this;if(Ld(t))return ph.resolve(null);var r=Vd(t);return this.indexManager.getIndexType(e,r).next((function(i){return 0===i?null:(null!==t.limit&&1===i&&(t=Bd(t,null,"F"),r=Vd(t)),n.indexManager.getDocumentsMatchingTarget(e,r).next((function(i){var a=op.apply(void 0,v(i));return n.ji.getDocuments(e,a).next((function(i){return n.indexManager.getMinOffset(e,r).next((function(r){var o=n.Xi(t,i);return n.es(t,o,a,r.readTime)?n.Hi(e,Bd(t,null,"F")):n.ts(e,o,t,r)}))}))})))}))}},{key:"Ji",value:function(e,t,n,r){var i=this;return Ld(t)||r.isEqual(Zf.min())?ph.resolve(null):this.ji.getDocuments(e,n).next((function(a){var o=i.Xi(t,a);return i.es(t,o,n,r)?ph.resolve(null):(Nf()<=se.DEBUG&&Of("QueryEngine","Re-using previous result from %s to execute query: %s",r.toString(),qd(t)),i.ts(e,o,t,oh(r,-1)).next((function(e){return e})))}))}},{key:"Xi",value:function(e,t){var n=new Ih(Qd(e));return t.forEach((function(t,r){Wd(e,r)&&(n=n.add(r))})),n}},{key:"es",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:"Yi",value:function(e,t,n){return Nf()<=se.DEBUG&&Of("QueryEngine","Using full collection scan to execute query:",qd(t)),this.ji.getDocumentsMatchingQuery(e,t,uh.min(),n)}},{key:"ts",value:function(e,t,n,r){return this.ji.getDocumentsMatchingQuery(e,n,r).next((function(e){return t.forEach((function(t){e=e.insert(t.key,t)})),e}))}}]),e}(),tm=function(){function e(t,n,r,i){k(this,e),this.persistence=t,this.ns=n,this.serializer=i,this.rs=new Sh(Yf),this.ss=new Yd((function(e){return Nd(e)}),Od),this.os=new Map,this._s=t.getRemoteDocumentCache(),this.Kr=t.getTargetCache(),this.Ur=t.getBundleCache(),this.us(r)}return w(e,[{key:"us",value:function(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutationQueue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new Vv(this._s,this.mutationQueue,this.documentOverlayCache,this.indexManager),this._s.setIndexManager(this.indexManager),this.ns.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.rs)}))}}]),e}();function nm(e,t,n,r){return new tm(e,t,n,r)}function rm(e,t){return im.apply(this,arguments)}function im(){return im=s(a().mark((function e(t,n){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Mf(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.us(n),r.mutationQueue.getAllMutationBatches(e)})).next((function(n){var i,a=[],o=[],s=op(),u=m(t);try{for(u.s();!(i=u.n()).done;){var c=i.value;a.push(c.batchId);var l,f=m(c.mutations);try{for(f.s();!(l=f.n()).done;){var h=l.value;s=s.add(h.key)}}catch(b){f.e(b)}finally{f.f()}}}catch(b){u.e(b)}finally{u.f()}var d,p=m(n);try{for(p.s();!(d=p.n()).done;){var v=d.value;o.push(v.batchId);var g,y=m(v.mutations);try{for(y.s();!(g=y.n()).done;){var k=g.value;s=s.add(k.key)}}catch(b){y.e(b)}finally{y.f()}}}catch(b){p.e(b)}finally{p.f()}return r.localDocuments.getDocuments(e,s).next((function(e){return{cs:e,removedBatchIds:a,addedBatchIds:o}}))}))}));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)}))),im.apply(this,arguments)}function am(e){var t=Mf(e);return t.persistence.runTransaction("Get last remote snapshot version","readonly",(function(e){return t.Kr.getLastRemoteSnapshotVersion(e)}))}function om(e,t){var n=Mf(e),r=t.snapshotVersion,i=n.rs;return n.persistence.runTransaction("Apply remote event","readwrite-primary",(function(e){var a=n._s.newChangeBuffer({trackRemovals:!0});i=n.rs;var o=[];t.targetChanges.forEach((function(a,s){var u=i.get(s);if(u){o.push(n.Kr.removeMatchingKeys(e,a.removedDocuments,s).next((function(){return n.Kr.addMatchingKeys(e,a.addedDocuments,s)})));var c=u.withSequenceNumber(e.currentSequenceNumber);null!==t.targetMismatches.get(s)?c=c.withResumeToken(Ph.EMPTY_BYTE_STRING,Zf.min()).withLastLimboFreeSnapshotVersion(Zf.min()):a.resumeToken.approximateByteSize()>0&&(c=c.withResumeToken(a.resumeToken,r)),i=i.insert(s,c),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)}(u,c,a)&&o.push(n.Kr.updateTargetData(e,c))}}));var s=Jd(),u=op();if(t.documentUpdates.forEach((function(r){t.resolvedLimboDocuments.has(r)&&o.push(n.persistence.referenceDelegate.updateLimboDocument(e,r))})),o.push(sm(e,a,t.documentUpdates).next((function(e){s=e.ls,u=e.hs}))),!r.isEqual(Zf.min())){var c=n.Kr.getLastRemoteSnapshotVersion(e).next((function(t){return n.Kr.setTargetsMetadata(e,e.currentSequenceNumber,r)}));o.push(c)}return ph.waitFor(o).next((function(){return a.apply(e)})).next((function(){return n.localDocuments.getLocalViewOfDocuments(e,s,u)})).next((function(){return s}))})).then((function(e){return n.rs=i,e}))}function sm(e,t,n){var r=op(),i=op();return n.forEach((function(e){return r=r.add(e)})),t.getEntries(e,r).next((function(e){var r=Jd();return n.forEach((function(n,a){var o=e.get(n);a.isFoundDocument()!==o.isFoundDocument()&&(i=i.add(n)),a.isNoDocument()&&a.version.isEqual(Zf.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)):Of("LocalStore","Ignoring outdated watch update for ",n,". Current version:",o.version," Watch version:",a.version)})),{ls:r,hs:i}}))}function um(e,t){var n=Mf(e);return n.persistence.runTransaction("Allocate target","readwrite",(function(e){var r;return n.Kr.getTargetData(e,t).next((function(i){return i?(r=i,ph.resolve(r)):n.Kr.allocateTargetId(e).next((function(i){return r=new Ov(t,i,"TargetPurposeListen",e.currentSequenceNumber),n.Kr.addTargetData(e,r).next((function(){return r}))}))}))})).then((function(e){var r=n.rs.get(e.targetId);return(null===r||e.snapshotVersion.compareTo(r.snapshotVersion)>0)&&(n.rs=n.rs.insert(e.targetId,e),n.ss.set(t,e.targetId)),e}))}function cm(e,t,n){return lm.apply(this,arguments)}function lm(){return lm=s(a().mark((function e(t,n,r){var i,o,s;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=Mf(t),o=i.rs.get(n),s=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",s,(function(e){return i.persistence.referenceDelegate.removeTarget(e,o)}));case 6:e.next=13;break;case 8:if(e.prev=8,e.t1=e.catch(1),vh(e.t1)){e.next=12;break}throw e.t1;case 12:Of("LocalStore","Failed to update sequence numbers for target ".concat(n,": ").concat(e.t1));case 13:i.rs=i.rs.remove(n),i.ss.delete(o.target);case 14:case"end":return e.stop()}}),e,null,[[1,8]])}))),lm.apply(this,arguments)}function fm(e,t,n){var r=Mf(e),i=Zf.min(),a=op();return r.persistence.runTransaction("Execute query","readwrite",(function(e){return function(e,t,n){var r=Mf(e),i=r.ss.get(n);return void 0!==i?ph.resolve(r.rs.get(i)):r.Kr.getTargetData(t,n)}(r,e,Vd(t)).next((function(t){if(t)return i=t.lastLimboFreeSnapshotVersion,r.Kr.getMatchingKeysForTargetId(e,t.targetId).next((function(e){a=e}))})).next((function(){return r.ns.getDocumentsMatchingQuery(e,t,n?i:Zf.min(),n?a:op())})).next((function(e){return hm(r,Gd(t),e),{documents:e,Ps:a}}))}))}function hm(e,t,n){var r=e.os.get(t)||Zf.min();n.forEach((function(e,t){t.readTime.compareTo(r)>0&&(r=t.readTime)})),e.os.set(t,r)}var dm=function(){function e(){k(this,e),this.activeTargetIds=up()}return w(e,[{key:"Rs",value:function(e){this.activeTargetIds=this.activeTargetIds.add(e)}},{key:"Vs",value:function(e){this.activeTargetIds=this.activeTargetIds.delete(e)}},{key:"As",value:function(){var e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)}}]),e}(),pm=function(){function e(){k(this,e),this.ro=new dm,this.io={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}return w(e,[{key:"addPendingMutation",value:function(e){}},{key:"updateMutationState",value:function(e,t,n){}},{key:"addLocalQueryTarget",value:function(e){return this.ro.Rs(e),this.io[e]||"not-current"}},{key:"updateQueryState",value:function(e,t,n){this.io[e]=t}},{key:"removeLocalQueryTarget",value:function(e){this.ro.Vs(e)}},{key:"isLocalQueryTarget",value:function(e){return this.ro.activeTargetIds.has(e)}},{key:"clearQueryState",value:function(e){delete this.io[e]}},{key:"getAllActiveQueryTargets",value:function(){return this.ro.activeTargetIds}},{key:"isActiveQueryTarget",value:function(e){return this.ro.activeTargetIds.has(e)}},{key:"start",value:function(){return this.ro=new dm,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}(),vm=function(){function e(){k(this,e)}return w(e,[{key:"so",value:function(e){}},{key:"shutdown",value:function(){}}]),e}(),mm=function(){function e(){var t=this;k(this,e),this.oo=function(){return t._o()},this.ao=function(){return t.uo()},this.co=[],this.lo()}return w(e,[{key:"so",value:function(e){this.co.push(e)}},{key:"shutdown",value:function(){window.removeEventListener("online",this.oo),window.removeEventListener("offline",this.ao)}},{key:"lo",value:function(){window.addEventListener("online",this.oo),window.addEventListener("offline",this.ao)}},{key:"_o",value:function(){Of("ConnectivityMonitor","Network connectivity changed: AVAILABLE");var e,t=m(this.co);try{for(t.s();!(e=t.n()).done;){(0,e.value)(0)}}catch(n){t.e(n)}finally{t.f()}}},{key:"uo",value:function(){Of("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");var e,t=m(this.co);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}(),gm=null;function ym(){return null===gm?gm=268435456+Math.round(2147483648*Math.random()):gm++,"0x"+gm.toString(16)}var km={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"},bm=function(){function e(t){k(this,e),this.ho=t.ho,this.Po=t.Po}return w(e,[{key:"Io",value:function(e){this.To=e}},{key:"Eo",value:function(e){this.Ao=e}},{key:"onMessage",value:function(e){this.Ro=e}},{key:"close",value:function(){this.Po()}},{key:"send",value:function(e){this.ho(e)}},{key:"Vo",value:function(){this.To()}},{key:"mo",value:function(e){this.Ao(e)}},{key:"fo",value:function(e){this.Ro(e)}}]),e}(),wm="WebChannelConnection",xm=function(e){_(n,e);var t=T(n);function n(e){var r;return k(this,n),(r=t.call(this,e)).forceLongPolling=e.forceLongPolling,r.autoDetectLongPolling=e.autoDetectLongPolling,r.useFetchStreams=e.useFetchStreams,r.longPollingOptions=e.longPollingOptions,r}return w(n,[{key:"vo",value:function(e,t,n,r){var i=ym();return new Promise((function(a,o){var s=new xf;s.setWithCredentials(!0),s.listenOnce(yf.COMPLETE,(function(){try{switch(s.getLastErrorCode()){case gf.NO_ERROR:var t=s.getResponseJson();Of(wm,"XHR for RPC '".concat(e,"' ").concat(i," received:"),JSON.stringify(t)),a(t);break;case gf.TIMEOUT:Of(wm,"RPC '".concat(e,"' ").concat(i," timed out")),o(new Ff(jf.DEADLINE_EXCEEDED,"Request time out"));break;case gf.HTTP_ERROR:var n=s.getStatus();if(Of(wm,"RPC '".concat(e,"' ").concat(i," failed with status:"),n,"response text:",s.getResponseText()),n>0){var r=s.getResponseJson();Array.isArray(r)&&(r=r[0]);var u=null==r?void 0:r.error;if(u&&u.status&&u.message){var c=function(e){var t=e.toLowerCase().replace(/_/g,"-");return Object.values(jf).indexOf(t)>=0?t:jf.UNKNOWN}(u.status);o(new Ff(c,u.message))}else o(new Ff(jf.UNKNOWN,"Server responded with status "+s.getStatus()))}else o(new Ff(jf.UNAVAILABLE,"Connection failed."));break;default:Df()}}finally{Of(wm,"RPC '".concat(e,"' ").concat(i," completed."))}}));var u=JSON.stringify(r);Of(wm,"RPC '".concat(e,"' ").concat(i," sending request:"),r),s.send(t,"POST",u,n,15)}))}},{key:"Mo",value:function(e,t,n){var r=ym(),i=[this.po,"/","google.firestore.v1.Firestore","/",e,"/channel"],a=vf(),o=mf(),s={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},u=this.longPollingOptions.timeoutSeconds;void 0!==u&&(s.longPollingTimeout=Math.round(1e3*u)),this.useFetchStreams&&(s.useFetchStreams=!0),this.Co(s.initMessageHeaders,t,n),s.encodeInitMessageHeaders=!0;var c=i.join("");Of(wm,"Creating RPC '".concat(e,"' stream ").concat(r,": ").concat(c),s);var l=a.createWebChannel(c,s),f=!1,h=!1,d=new bm({ho:function(t){h?Of(wm,"Not sending because RPC '".concat(e,"' stream ").concat(r," is closed:"),t):(f||(Of(wm,"Opening RPC '".concat(e,"' stream ").concat(r," transport.")),l.open(),f=!0),Of(wm,"RPC '".concat(e,"' stream ").concat(r," sending:"),t),l.send(t))},Po:function(){return l.close()}}),p=function(e,t,n){e.listen(t,(function(e){try{n(e)}catch(e){setTimeout((function(){throw e}),0)}}))};return p(l,wf.EventType.OPEN,(function(){h||Of(wm,"RPC '".concat(e,"' stream ").concat(r," transport opened."))})),p(l,wf.EventType.CLOSE,(function(){h||(h=!0,Of(wm,"RPC '".concat(e,"' stream ").concat(r," transport closed")),d.mo())})),p(l,wf.EventType.ERROR,(function(t){h||(h=!0,Pf(wm,"RPC '".concat(e,"' stream ").concat(r," transport errored:"),t),d.mo(new Ff(jf.UNAVAILABLE,"The operation could not be completed")))})),p(l,wf.EventType.MESSAGE,(function(t){var n;if(!h){var i=t.data[0];Lf(!!i);var a=i,o=a.error||(null===(n=a[0])||void 0===n?void 0:n.error);if(o){Of(wm,"RPC '".concat(e,"' stream ").concat(r," received error:"),o);var s=o.status,u=function(e){var t=Lp[e];if(void 0!==t)return zp(t)}(s),c=o.message;void 0===u&&(u=jf.INTERNAL,c="Unknown error status: "+s+" with message "+o.message),h=!0,d.mo(new Ff(u,c)),l.close()}else Of(wm,"RPC '".concat(e,"' stream ").concat(r," received:"),i),d.fo(i)}})),p(o,kf.STAT_EVENT,(function(t){t.stat===bf.PROXY?Of(wm,"RPC '".concat(e,"' stream ").concat(r," detected buffering proxy")):t.stat===bf.NOPROXY&&Of(wm,"RPC '".concat(e,"' stream ").concat(r," detected no buffering proxy"))})),setTimeout((function(){d.Vo()}),0),d}}]),n}(function(){function e(t){k(this,e),this.databaseInfo=t,this.databaseId=t.databaseId;var n=t.ssl?"https":"http",r=encodeURIComponent(this.databaseId.projectId),i=encodeURIComponent(this.databaseId.database);this.po=n+"://"+t.host,this.yo="projects/".concat(r,"/databases/").concat(i),this.wo="(default)"===this.databaseId.database?"project_id=".concat(r):"project_id=".concat(r,"&database_id=").concat(i)}return w(e,[{key:"So",get:function(){return!1}},{key:"bo",value:function(e,t,n,r,i){var a=ym(),o=this.Do(e,t);Of("RestConnection","Sending RPC '".concat(e,"' ").concat(a,":"),o,n);var s={"google-cloud-resource-prefix":this.yo,"x-goog-request-params":this.wo};return this.Co(s,r,i),this.vo(e,o,s,n).then((function(t){return Of("RestConnection","Received RPC '".concat(e,"' ").concat(a,": "),t),t}),(function(t){throw Pf("RestConnection","RPC '".concat(e,"' ").concat(a," failed with error: "),t,"url: ",o,"request:",n),t}))}},{key:"Fo",value:function(e,t,n,r,i,a){return this.bo(e,t,n,r,i)}},{key:"Co",value:function(e,t,n){e["X-Goog-Api-Client"]="gl-js/ fire/"+Tf,e["Content-Type"]="text/plain",this.databaseInfo.appId&&(e["X-Firebase-GMPID"]=this.databaseInfo.appId),t&&t.headers.forEach((function(t,n){return e[n]=t})),n&&n.headers.forEach((function(t,n){return e[n]=t}))}},{key:"Do",value:function(e,t){var n=km[e];return"".concat(this.po,"/v1/").concat(t,":").concat(n)}}]),e}());function Em(){return"undefined"!=typeof document?document:null}function _m(e){return new sv(e,!0)}var Sm=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;k(this,e),this._i=t,this.timerId=n,this.xo=r,this.Oo=i,this.No=a,this.Bo=0,this.Lo=null,this.ko=Date.now(),this.reset()}return w(e,[{key:"reset",value:function(){this.Bo=0}},{key:"qo",value:function(){this.Bo=this.No}},{key:"Qo",value:function(e){var t=this;this.cancel();var n=Math.floor(this.Bo+this.Ko()),r=Math.max(0,Date.now()-this.ko),i=Math.max(0,n-r);i>0&&Of("ExponentialBackoff","Backing off for ".concat(i," ms (base delay: ").concat(this.Bo," ms, delay with jitter: ").concat(n," ms, last attempt: ").concat(r," ms ago)")),this.Lo=this._i.enqueueAfterDelay(this.timerId,i,(function(){return t.ko=Date.now(),e()})),this.Bo*=this.Oo,this.Bo<this.xo&&(this.Bo=this.xo),this.Bo>this.No&&(this.Bo=this.No)}},{key:"$o",value:function(){null!==this.Lo&&(this.Lo.skipDelay(),this.Lo=null)}},{key:"cancel",value:function(){null!==this.Lo&&(this.Lo.cancel(),this.Lo=null)}},{key:"Ko",value:function(){return(Math.random()-.5)*this.Bo}}]),e}(),Cm=function(){function e(t,n,r,i,a,o,s,u){k(this,e),this._i=t,this.Uo=r,this.Wo=i,this.connection=a,this.authCredentialsProvider=o,this.appCheckCredentialsProvider=s,this.listener=u,this.state=0,this.Go=0,this.zo=null,this.jo=null,this.stream=null,this.Ho=new Sm(t,n)}return w(e,[{key:"Jo",value:function(){return 1===this.state||5===this.state||this.Yo()}},{key:"Yo",value:function(){return 2===this.state||3===this.state}},{key:"start",value:function(){4!==this.state?this.auth():this.Zo()}},{key:"stop",value:function(){var e=s(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=this.Jo(),!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:"Xo",value:function(){this.state=0,this.Ho.reset()}},{key:"e_",value:function(){var e=this;this.Yo()&&null===this.zo&&(this.zo=this._i.enqueueAfterDelay(this.Uo,6e4,(function(){return e.t_()})))}},{key:"n_",value:function(e){this.r_(),this.stream.send(e)}},{key:"t_",value:function(){var e=s(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.Yo()){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:"r_",value:function(){this.zo&&(this.zo.cancel(),this.zo=null)}},{key:"i_",value:function(){this.jo&&(this.jo.cancel(),this.jo=null)}},{key:"close",value:function(){var e=s(a().mark((function e(t,n){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.r_(),this.i_(),this.Ho.cancel(),this.Go++,4!==t?this.Ho.reset():n&&n.code===jf.RESOURCE_EXHAUSTED?(Rf(n.toString()),Rf("Using maximum backoff delay to prevent overloading the backend."),this.Ho.qo()):n&&n.code===jf.UNAUTHENTICATED&&3!==this.state&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),null!==this.stream&&(this.s_(),this.stream.close(),this.stream=null),this.state=t,e.next=9,this.listener.Eo(n);case 9:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"s_",value:function(){}},{key:"auth",value:function(){var e=this;this.state=1;var t=this.o_(this.Go),n=this.Go;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then((function(t){var r=h(t,2),i=r[0],a=r[1];e.Go===n&&e.__(i,a)}),(function(n){t((function(){var t=new Ff(jf.UNKNOWN,"Fetching auth token failed: "+n.message);return e.a_(t)}))}))}},{key:"__",value:function(e,t){var n=this,r=this.o_(this.Go);this.stream=this.u_(e,t),this.stream.Io((function(){r((function(){return n.state=2,n.jo=n._i.enqueueAfterDelay(n.Wo,1e4,(function(){return n.Yo()&&(n.state=3),Promise.resolve()})),n.listener.Io()}))})),this.stream.Eo((function(e){r((function(){return n.a_(e)}))})),this.stream.onMessage((function(e){r((function(){return n.onMessage(e)}))}))}},{key:"Zo",value:function(){var e=this;this.state=5,this.Ho.Qo(s(a().mark((function t(){return a().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:"a_",value:function(e){return Of("PersistentStream","close with error: ".concat(e)),this.stream=null,this.close(4,e)}},{key:"o_",value:function(e){var t=this;return function(n){t._i.enqueueAndForget((function(){return t.Go===e?n():(Of("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve())}))}}}]),e}(),Tm=function(e){_(n,e);var t=T(n);function n(e,r,i,a,o,s){var u;return k(this,n),(u=t.call(this,e,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",r,i,a,s)).serializer=o,u}return w(n,[{key:"u_",value:function(e,t){return this.connection.Mo("Listen",e,t)}},{key:"onMessage",value:function(e){this.Ho.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:Df()}(t.targetChange.targetChangeType||"NO_CHANGE"),i=t.targetChange.targetIds||[],a=function(e,t){return e.useProto3Json?(Lf(void 0===t||"string"==typeof t),Ph.fromBase64String(t||"")):(Lf(void 0===t||t instanceof Uint8Array),Ph.fromUint8Array(t||new Uint8Array))}(e,t.targetChange.resumeToken),o=t.targetChange.cause,s=o&&function(e){var t=void 0===e.code?jf.UNKNOWN:zp(e.code);return new Ff(t,e.message||"")}(o);n=new Zp(r,i,a,s||null)}else if("documentChange"in t){t.documentChange;var u=t.documentChange;u.document,u.document.name,u.document.updateTime;var c=pv(e,u.document.name),l=fv(u.document.updateTime),f=u.document.createTime?fv(u.document.createTime):Zf.min(),h=new rd({mapValue:{fields:u.document.fields}}),d=id.newFoundDocument(c,l,f,h),p=u.targetIds||[],v=u.removedTargetIds||[];n=new Xp(p,v,d.key,d)}else if("documentDelete"in t){t.documentDelete;var m=t.documentDelete;m.document;var g=pv(e,m.document),y=m.readTime?fv(m.readTime):Zf.min(),k=id.newNoDocument(g,y),b=m.removedTargetIds||[];n=new Xp([],b,k.key,k)}else if("documentRemove"in t){t.documentRemove;var w=t.documentRemove;w.document;var x=pv(e,w.document),E=w.removedTargetIds||[];n=new Xp([],E,x,null)}else{if(!("filter"in t))return Df();t.filter;var _=t.filter;_.targetId;var S=_.count,C=void 0===S?0:S,T=_.unchangedNames,I=new Vp(C,T),N=_.targetId;n=new Jp(N,I)}return n}(this.serializer,e),n=function(e){if(!("targetChange"in e))return Zf.min();var t=e.targetChange;return t.targetIds&&t.targetIds.length?Zf.min():t.readTime?fv(t.readTime):Zf.min()}(e);return this.listener.c_(t,n)}},{key:"l_",value:function(e){var t={};t.database=gv(this.serializer),t.addTarget=function(e,t){var n,r=t.target;if((n=Rd(r)?{documents:kv(e,r)}:{query:bv(e,r)}).targetId=t.targetId,t.resumeToken.approximateByteSize()>0){n.resumeToken=lv(e,t.resumeToken);var i=uv(e,t.expectedCount);null!==i&&(n.expectedCount=i)}else if(t.snapshotVersion.compareTo(Zf.min())>0){n.readTime=cv(e,t.snapshotVersion.toTimestamp());var a=uv(e,t.expectedCount);null!==a&&(n.expectedCount=a)}return n}(this.serializer,e);var n=function(e,t){var n=function(e){switch(e){case"TargetPurposeListen":return null;case"TargetPurposeExistenceFilterMismatch":return"existence-filter-mismatch";case"TargetPurposeExistenceFilterMismatchBloom":return"existence-filter-mismatch-bloom";case"TargetPurposeLimboResolution":return"limbo-document";default:return Df()}}(t.purpose);return null==n?null:{"goog-listen-tags":n}}(this.serializer,e);n&&(t.labels=n),this.n_(t)}},{key:"h_",value:function(e){var t={};t.database=gv(this.serializer),t.removeTarget=e,this.n_(t)}}]),n}(Cm),Im=function(e){_(n,e);var t=T(n);function n(e,r,i,a){var o;return k(this,n),(o=t.call(this)).authCredentials=e,o.appCheckCredentials=r,o.connection=i,o.serializer=a,o.R_=!1,o}return w(n,[{key:"V_",value:function(){if(this.R_)throw new Ff(jf.FAILED_PRECONDITION,"The client has already been terminated.")}},{key:"bo",value:function(e,t,n){var r=this;return this.V_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then((function(i){var a=h(i,2),o=a[0],s=a[1];return r.connection.bo(e,t,n,o,s)})).catch((function(e){throw"FirebaseError"===e.name?(e.code===jf.UNAUTHENTICATED&&(r.authCredentials.invalidateToken(),r.appCheckCredentials.invalidateToken()),e):new Ff(jf.UNKNOWN,e.toString())}))}},{key:"Fo",value:function(e,t,n,r){var i=this;return this.V_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then((function(a){var o=h(a,2),s=o[0],u=o[1];return i.connection.Fo(e,t,n,s,u,r)})).catch((function(e){throw"FirebaseError"===e.name?(e.code===jf.UNAUTHENTICATED&&(i.authCredentials.invalidateToken(),i.appCheckCredentials.invalidateToken()),e):new Ff(jf.UNKNOWN,e.toString())}))}},{key:"terminate",value:function(){this.R_=!0}}]),n}(w((function e(){k(this,e)})));var Nm=function(){function e(t,n){k(this,e),this.asyncQueue=t,this.onlineStateHandler=n,this.state="Unknown",this.f_=0,this.g_=null,this.p_=!0}return w(e,[{key:"y_",value:function(){var e=this;0===this.f_&&(this.w_("Unknown"),this.g_=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,(function(){return e.g_=null,e.S_("Backend didn't respond within 10 seconds."),e.w_("Offline"),Promise.resolve()})))}},{key:"b_",value:function(e){"Online"===this.state?this.w_("Unknown"):(this.f_++,this.f_>=1&&(this.D_(),this.S_("Connection failed 1 times. Most recent error: ".concat(e.toString())),this.w_("Offline")))}},{key:"set",value:function(e){this.D_(),this.f_=0,"Online"===e&&(this.p_=!1),this.w_(e)}},{key:"w_",value:function(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}},{key:"S_",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.p_?(Rf(t),this.p_=!1):Of("OnlineStateTracker",t)}},{key:"D_",value:function(){null!==this.g_&&(this.g_.cancel(),this.g_=null)}}]),e}(),Om=w((function e(t,n,r,i,o){var u=this;k(this,e),this.localStore=t,this.datastore=n,this.asyncQueue=r,this.remoteSyncer={},this.C_=[],this.v_=new Map,this.F_=new Set,this.M_=[],this.x_=o,this.x_.so((function(e){r.enqueueAndForget(s(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=zm(u),!e.t0){e.next=5;break}return Of("RemoteStore","Restarting streams for network reachability change."),e.next=5,function(){var e=s(a().mark((function e(t){var n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=Mf(t)).F_.add(4),e.next=4,Am(n);case 4:return n.O_.set("Unknown"),n.F_.delete(4),e.next=8,Rm(n);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()(u);case 5:case"end":return e.stop()}}),e)}))))})),this.O_=new Nm(r,i)}));function Rm(e){return Pm.apply(this,arguments)}function Pm(){return(Pm=s(a().mark((function e(t){var n,r,i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!zm(t)){e.next=18;break}n=m(t.M_),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]])})))).apply(this,arguments)}function Am(e){return Dm.apply(this,arguments)}function Dm(){return(Dm=s(a().mark((function e(t){var n,r,i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=m(t.M_),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]])})))).apply(this,arguments)}function Lm(e,t){var n=Mf(e);n.v_.has(t.targetId)||(n.v_.set(t.targetId,t),Vm(n)?Um(n):tg(n).Yo()&&jm(n,t))}function Mm(e,t){var n=Mf(e),r=tg(n);n.v_.delete(t),r.Yo()&&Fm(n,t),0===n.v_.size&&(r.Yo()?r.e_():zm(n)&&n.O_.set("Unknown"))}function jm(e,t){if(e.N_.Le(t.targetId),t.resumeToken.approximateByteSize()>0||t.snapshotVersion.compareTo(Zf.min())>0){var n=e.remoteSyncer.getRemoteKeysForTarget(t.targetId).size;t=t.withExpectedCount(n)}tg(e).l_(t)}function Fm(e,t){e.N_.Le(t),tg(e).h_(t)}function Um(e){e.N_=new tv({getRemoteKeysForTarget:function(t){return e.remoteSyncer.getRemoteKeysForTarget(t)},lt:function(t){return e.v_.get(t)||null},st:function(){return e.datastore.serializer.databaseId}}),tg(e).start(),e.O_.y_()}function Vm(e){return zm(e)&&!tg(e).Jo()&&e.v_.size>0}function zm(e){return 0===Mf(e).F_.size}function Bm(e){e.N_=void 0}function Hm(e){return Km.apply(this,arguments)}function Km(){return(Km=s(a().mark((function e(t){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.v_.forEach((function(e,n){jm(t,e)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function qm(e,t){return Wm.apply(this,arguments)}function Wm(){return(Wm=s(a().mark((function e(t,n){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Bm(t),Vm(t)?(t.O_.b_(n),Um(t)):t.O_.set("Unknown");case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Gm(e,t,n){return Qm.apply(this,arguments)}function Qm(){return Qm=s(a().mark((function e(t,n,r){var i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.O_.set("Online"),!(n instanceof Zp&&2===n.state&&n.cause)){e.next=13;break}return e.prev=1,e.next=4,function(){var e=s(a().mark((function e(t,n){var r,i,o,s;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=n.cause,i=m(n.targetIds),e.prev=2,i.s();case 4:if((o=i.n()).done){e.next=14;break}if(s=o.value,e.t0=t.v_.has(s),!e.t0){e.next=12;break}return e.next=10,t.remoteSyncer.rejectListen(s,r);case 10:t.v_.delete(s),t.N_.removeTarget(s);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),Of("RemoteStore","Failed to remove targets %s: %s ",n.targetIds.join(","),e.t0),e.next=11,$m(t,e.t0);case 11:case 22:e.next=29;break;case 13:if(n instanceof Xp?t.N_.Ge(n):n instanceof Jp?t.N_.Xe(n):t.N_.He(n),r.isEqual(Zf.min())){e.next=29;break}return e.prev=14,e.next=17,am(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.N_._t(t);return n.targetChanges.forEach((function(n,r){if(n.resumeToken.approximateByteSize()>0){var i=e.v_.get(r);i&&e.v_.set(r,i.withResumeToken(n.resumeToken,t))}})),n.targetMismatches.forEach((function(t,n){var r=e.v_.get(t);if(r){e.v_.set(t,r.withResumeToken(Ph.EMPTY_BYTE_STRING,r.snapshotVersion)),Fm(e,t);var i=new Ov(r.target,t,n,r.sequenceNumber);jm(e,i)}})),e.remoteSyncer.applyRemoteEvent(n)}(t,r);case 24:return e.prev=24,e.t2=e.catch(14),Of("RemoteStore","Failed to raise snapshot:",e.t2),e.next=29,$m(t,e.t2);case 29:case"end":return e.stop()}}),e,null,[[1,6],[14,24]])}))),Qm.apply(this,arguments)}function $m(e,t,n){return Ym.apply(this,arguments)}function Ym(){return(Ym=s(a().mark((function e(t,n,r){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(vh(n)){e.next=2;break}throw n;case 2:return t.F_.add(1),e.next=5,Am(t);case 5:t.O_.set("Offline"),r||(r=function(){return am(t.localStore)}),t.asyncQueue.enqueueRetryable(s(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Of("RemoteStore","Retrying IndexedDB access"),e.next=3,r();case 3:return t.F_.delete(1),e.next=6,Rm(t);case 6:case"end":return e.stop()}}),e)}))));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Xm(e,t){return Jm.apply(this,arguments)}function Jm(){return Jm=s(a().mark((function e(t,n){var r,i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=Mf(t)).asyncQueue.verifyOperationInProgress(),Of("RemoteStore","RemoteStore received new credentials"),i=zm(r),r.F_.add(3),e.next=6,Am(r);case 6:return i&&r.O_.set("Unknown"),e.next=9,r.remoteSyncer.handleCredentialChange(n);case 9:return r.F_.delete(3),e.next=12,Rm(r);case 12:case"end":return e.stop()}}),e)}))),Jm.apply(this,arguments)}function Zm(e,t){return eg.apply(this,arguments)}function eg(){return(eg=s(a().mark((function e(t,n){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=Mf(t),!n){e.next=7;break}return r.F_.delete(2),e.next=5,Rm(r);case 5:e.next=13;break;case 7:if(e.t0=n,e.t0){e.next=13;break}return r.F_.add(2),e.next=12,Am(r);case 12:r.O_.set("Unknown");case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function tg(e){return e.B_||(e.B_=function(e,t,n){var r=Mf(e);return r.V_(),new Tm(t,r.connection,r.authCredentials,r.appCheckCredentials,r.serializer,n)}(e.datastore,e.asyncQueue,{Io:Hm.bind(null,e),Eo:qm.bind(null,e),c_:Gm.bind(null,e)}),e.M_.push(function(){var t=s(a().mark((function t(n){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!n){t.next=4;break}e.B_.Xo(),Vm(e)?Um(e):e.O_.set("Unknown"),t.next=7;break;case 4:return t.next=6,e.B_.stop();case 6:Bm(e);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())),e.B_}var ng=function(){function e(t,n,r,i,a){k(this,e),this.asyncQueue=t,this.timerId=n,this.targetTimeMs=r,this.op=i,this.removalCallback=a,this.deferred=new Uf,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch((function(e){}))}return w(e,[{key:"promise",get:function(){return this.deferred.promise}},{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 Ff(jf.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 rg(e,t){if(Rf("AsyncQueue","".concat(t,": ").concat(e)),vh(e))return new Ff(jf.UNAVAILABLE,"".concat(t,": ").concat(e));throw e}var ig=function(){function e(t){k(this,e),this.comparator=t?function(e,n){return t(e,n)||ih.comparator(e.key,n.key)}:function(e,t){return ih.comparator(e.key,t.key)},this.keyedMap=ep(),this.sortedSet=new Sh(this.comparator)}return w(e,[{key:"has",value:function(e){return null!=this.keyedMap.get(e)}},{key:"get",value:function(e){return this.keyedMap.get(e)}},{key:"first",value:function(){return this.sortedSet.minKey()}},{key:"last",value:function(){return this.sortedSet.maxKey()}},{key:"isEmpty",value:function(){return this.sortedSet.isEmpty()}},{key:"indexOf",value:function(e){var t=this.keyedMap.get(e);return t?this.sortedSet.indexOf(t):-1}},{key:"size",get:function(){return this.sortedSet.size}},{key:"forEach",value:function(e){this.sortedSet.inorderTraversal((function(t,n){return e(t),!1}))}},{key:"add",value:function(e){var t=this.delete(e.key);return t.copy(t.keyedMap.insert(e.key,e),t.sortedSet.insert(e,null))}},{key:"delete",value:function(e){var t=this.get(e);return t?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(t)):this}},{key:"isEqual",value:function(t){if(!(t instanceof e))return!1;if(this.size!==t.size)return!1;for(var n=this.sortedSet.getIterator(),r=t.sortedSet.getIterator();n.hasNext();){var i=n.getNext().key,a=r.getNext().key;if(!i.isEqual(a))return!1}return!0}},{key:"toString",value:function(){var e=[];return this.forEach((function(t){e.push(t.toString())})),0===e.length?"DocumentSet ()":"DocumentSet (\n "+e.join(" \n")+"\n)"}},{key:"copy",value:function(t,n){var r=new e;return r.comparator=this.comparator,r.keyedMap=t,r.sortedSet=n,r}}],[{key:"emptySet",value:function(t){return new e(t.comparator)}}]),e}(),ag=function(){function e(){k(this,e),this.k_=new Sh(ih.comparator)}return w(e,[{key:"track",value:function(e){var t=e.doc.key,n=this.k_.get(t);n?0!==e.type&&3===n.type?this.k_=this.k_.insert(t,e):3===e.type&&1!==n.type?this.k_=this.k_.insert(t,{type:n.type,doc:e.doc}):2===e.type&&2===n.type?this.k_=this.k_.insert(t,{type:2,doc:e.doc}):2===e.type&&0===n.type?this.k_=this.k_.insert(t,{type:0,doc:e.doc}):1===e.type&&0===n.type?this.k_=this.k_.remove(t):1===e.type&&2===n.type?this.k_=this.k_.insert(t,{type:1,doc:n.doc}):0===e.type&&1===n.type?this.k_=this.k_.insert(t,{type:2,doc:e.doc}):Df():this.k_=this.k_.insert(t,e)}},{key:"q_",value:function(){var e=[];return this.k_.inorderTraversal((function(t,n){e.push(n)})),e}}]),e}(),og=function(){function e(t,n,r,i,a,o,s,u,c){k(this,e),this.query=t,this.docs=n,this.oldDocs=r,this.docChanges=i,this.mutatedKeys=a,this.fromCache=o,this.syncStateChanged=s,this.excludesMetadataChanges=u,this.hasCachedResults=c}return w(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)&&Hd(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,ig.emptySet(n),o,r,i,!0,!1,a)}}]),e}(),sg=w((function e(){k(this,e),this.Q_=void 0,this.listeners=[]})),ug=w((function e(){k(this,e),this.queries=new Yd((function(e){return Kd(e)}),Hd),this.onlineState="Unknown",this.K_=new Set}));function cg(e,t){return lg.apply(this,arguments)}function lg(){return lg=s(a().mark((function e(t,n){var r,i,o,s,u;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=Mf(t),i=n.query,o=!1,(s=r.queries.get(i))||(o=!0,s=new sg),!o){e.next=13;break}return e.prev=3,e.next=6,r.onListen(i);case 6:s.Q_=e.sent,e.next=13;break;case 9:return e.prev=9,e.t0=e.catch(3),u=rg(e.t0,"Initialization of query '".concat(qd(n.query),"' failed")),e.abrupt("return",void n.onError(u));case 13:r.queries.set(i,s),s.listeners.push(n),n.U_(r.onlineState),s.Q_&&n.W_(s.Q_)&&vg(r);case 14:case"end":return e.stop()}}),e,null,[[3,9]])}))),lg.apply(this,arguments)}function fg(e,t){return hg.apply(this,arguments)}function hg(){return hg=s(a().mark((function e(t,n){var r,i,o,s,u;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=Mf(t),i=n.query,o=!1,(s=r.queries.get(i))&&(u=s.listeners.indexOf(n))>=0&&(s.listeners.splice(u,1),o=0===s.listeners.length),!o){e.next=6;break}return e.abrupt("return",(r.queries.delete(i),r.onUnlisten(i)));case 6:case"end":return e.stop()}}),e)}))),hg.apply(this,arguments)}function dg(e,t){var n,r=Mf(e),i=!1,a=m(t);try{for(a.s();!(n=a.n()).done;){var o=n.value,s=o.query,u=r.queries.get(s);if(u){var c,l=m(u.listeners);try{for(l.s();!(c=l.n()).done;){c.value.W_(o)&&(i=!0)}}catch(f){l.e(f)}finally{l.f()}u.Q_=o}}}catch(f){a.e(f)}finally{a.f()}i&&vg(r)}function pg(e,t,n){var r=Mf(e),i=r.queries.get(t);if(i){var a,o=m(i.listeners);try{for(o.s();!(a=o.n()).done;){a.value.onError(n)}}catch(s){o.e(s)}finally{o.f()}}r.queries.delete(t)}function vg(e){e.K_.forEach((function(e){e.next()}))}var mg=function(){function e(t,n,r){k(this,e),this.query=t,this.G_=n,this.z_=!1,this.j_=null,this.onlineState="Unknown",this.options=r||{}}return w(e,[{key:"W_",value:function(e){if(!this.options.includeMetadataChanges){var t,n=[],r=m(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 og(e.query,e.docs,e.oldDocs,n,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0,e.hasCachedResults)}var a=!1;return this.z_?this.H_(e)&&(this.G_.next(e),a=!0):this.J_(e,this.onlineState)&&(this.Y_(e),a=!0),this.j_=e,a}},{key:"onError",value:function(e){this.G_.error(e)}},{key:"U_",value:function(e){this.onlineState=e;var t=!1;return this.j_&&!this.z_&&this.J_(this.j_,e)&&(this.Y_(this.j_),t=!0),t}},{key:"J_",value:function(e,t){if(!e.fromCache)return!0;var n="Offline"!==t;return(!this.options.Z_||!n)&&(!e.docs.isEmpty()||e.hasCachedResults||"Offline"===t)}},{key:"H_",value:function(e){if(e.docChanges.length>0)return!0;var t=this.j_&&this.j_.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!t)&&!0===this.options.includeMetadataChanges}},{key:"Y_",value:function(e){e=og.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache,e.hasCachedResults),this.z_=!0,this.G_.next(e)}}]),e}();var gg=w((function e(t){k(this,e),this.key=t})),yg=w((function e(t){k(this,e),this.key=t})),kg=function(){function e(t,n){k(this,e),this.query=t,this.oa=n,this._a=null,this.hasCachedResults=!1,this.current=!1,this.aa=op(),this.mutatedKeys=op(),this.ua=Qd(t),this.ca=new ig(this.ua)}return w(e,[{key:"la",get:function(){return this.oa}},{key:"ha",value:function(e,t){var n=this,r=t?t.Pa:new ag,i=t?t.ca:this.ca,a=t?t.mutatedKeys:this.mutatedKeys,o=i,s=!1,u="F"===this.query.limitType&&i.size===this.query.limit?i.last():null,c="L"===this.query.limitType&&i.size===this.query.limit?i.first():null;if(e.inorderTraversal((function(e,t){var l=i.get(e),f=Wd(n.query,t)?t:null,h=!!l&&n.mutatedKeys.has(l.key),d=!!f&&(f.hasLocalMutations||n.mutatedKeys.has(f.key)&&f.hasCommittedMutations),p=!1;l&&f?l.data.isEqual(f.data)?h!==d&&(r.track({type:3,doc:f}),p=!0):n.Ia(l,f)||(r.track({type:2,doc:f}),p=!0,(u&&n.ua(f,u)>0||c&&n.ua(f,c)<0)&&(s=!0)):!l&&f?(r.track({type:0,doc:f}),p=!0):l&&!f&&(r.track({type:1,doc:l}),p=!0,(u||c)&&(s=!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 l="F"===this.query.limitType?o.last():o.first();o=o.delete(l.key),a=a.delete(l.key),r.track({type:1,doc:l})}return{ca:o,Pa:r,es:s,mutatedKeys:a}}},{key:"Ia",value:function(e,t){return e.hasLocalMutations&&t.hasCommittedMutations&&!t.hasLocalMutations}},{key:"applyChanges",value:function(e,t,n){var r=this,i=this.ca;this.ca=e.ca,this.mutatedKeys=e.mutatedKeys;var a=e.Pa.q_();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 Df()}};return n(e)-n(t)}(e.type,t.type)||r.ua(e.doc,t.doc)})),this.da(n);var o=t?this.Ta():[],s=0===this.aa.size&&this.current?1:0,u=s!==this._a;return this._a=s,0!==a.length||u?{snapshot:new og(this.query,e.ca,i,a,e.mutatedKeys,0===s,u,!1,!!n&&n.resumeToken.approximateByteSize()>0),Ea:o}:{Ea:o}}},{key:"U_",value:function(e){return this.current&&"Offline"===e?(this.current=!1,this.applyChanges({ca:this.ca,Pa:new ag,mutatedKeys:this.mutatedKeys,es:!1},!1)):{Ea:[]}}},{key:"Aa",value:function(e){return!this.oa.has(e)&&!!this.ca.has(e)&&!this.ca.get(e).hasLocalMutations}},{key:"da",value:function(e){var t=this;e&&(e.addedDocuments.forEach((function(e){return t.oa=t.oa.add(e)})),e.modifiedDocuments.forEach((function(e){})),e.removedDocuments.forEach((function(e){return t.oa=t.oa.delete(e)})),this.current=e.current)}},{key:"Ta",value:function(){var e=this;if(!this.current)return[];var t=this.aa;this.aa=op(),this.ca.forEach((function(t){e.Aa(t.key)&&(e.aa=e.aa.add(t.key))}));var n=[];return t.forEach((function(t){e.aa.has(t)||n.push(new yg(t))})),this.aa.forEach((function(e){t.has(e)||n.push(new gg(e))})),n}},{key:"Ra",value:function(e){this.oa=e.Ps,this.aa=op();var t=this.ha(e.documents);return this.applyChanges(t,!0)}},{key:"Va",value:function(){return og.fromInitialDocuments(this.query,this.ca,this.mutatedKeys,0===this._a,this.hasCachedResults)}}]),e}(),bg=w((function e(t,n,r){k(this,e),this.query=t,this.targetId=n,this.view=r})),wg=w((function e(t){k(this,e),this.key=t,this.ma=!1})),xg=function(){function e(t,n,r,i,a,o){k(this,e),this.localStore=t,this.remoteStore=n,this.eventManager=r,this.sharedClientState=i,this.currentUser=a,this.maxConcurrentLimboResolutions=o,this.fa={},this.ga=new Yd((function(e){return Kd(e)}),Hd),this.pa=new Map,this.ya=new Set,this.wa=new Sh(ih.comparator),this.Sa=new Map,this.ba=new Hv,this.Da={},this.Ca=new Map,this.va=jv.Ln(),this.onlineState="Unknown",this.Fa=void 0}return w(e,[{key:"isPrimaryClient",get:function(){return!0===this.Fa}}]),e}();function Eg(e,t){return _g.apply(this,arguments)}function _g(){return _g=s(a().mark((function e(t,n){var r,i,o,s,u,c;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=Kg(t),!(s=r.ga.get(n))){e.next=6;break}i=s.targetId,r.sharedClientState.addLocalQueryTarget(i),o=s.view.Va(),e.next=15;break;case 6:return e.next=8,um(r.localStore,Vd(n));case 8:return u=e.sent,c=r.sharedClientState.addLocalQueryTarget(u.targetId),i=u.targetId,e.next=13,Sg(r,n,i,"current"===c,u.resumeToken);case 13:o=e.sent,r.isPrimaryClient&&Lm(r.remoteStore,u);case 15:return e.abrupt("return",o);case 16:case"end":return e.stop()}}),e)}))),_g.apply(this,arguments)}function Sg(e,t,n,r,i){return Cg.apply(this,arguments)}function Cg(){return Cg=s(a().mark((function e(t,n,r,i,o){var u,c,l,f,h,d;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.Ma=function(e,n,r){return function(){var e=s(a().mark((function e(t,n,r,i){var o,s,u;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=n.view.ha(r),e.t0=o.es,!e.t0){e.next=6;break}return e.next=5,fm(t.localStore,n.query,!1).then((function(e){var t=e.documents;return n.view.ha(t,o)}));case 5:o=e.sent;case 6:return s=i&&i.targetChanges.get(n.targetId),u=n.view.applyChanges(o,t.isPrimaryClient,s),e.abrupt("return",(Mg(t,n.targetId,u.Ea),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,fm(t.localStore,n,!0);case 3:return u=e.sent,c=new kg(n,u.Ps),l=c.ha(u.documents),f=Yp.createSynthesizedTargetChangeForCurrentChange(r,i&&"Offline"!==t.onlineState,o),h=c.applyChanges(l,t.isPrimaryClient,f),Mg(t,r,h.Ea),d=new bg(n,r,c),e.abrupt("return",(t.ga.set(n,d),t.pa.has(r)?t.pa.get(r).push(n):t.pa.set(r,[n]),h.snapshot));case 11:case"end":return e.stop()}}),e)}))),Cg.apply(this,arguments)}function Tg(e,t){return Ig.apply(this,arguments)}function Ig(){return Ig=s(a().mark((function e(t,n){var r,i,o;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=Mf(t),i=r.ga.get(n),!((o=r.pa.get(i.targetId)).length>1)){e.next=3;break}return e.abrupt("return",(r.pa.set(i.targetId,o.filter((function(e){return!Hd(e,n)}))),void r.ga.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,cm(r.localStore,i.targetId,!1).then((function(){r.sharedClientState.clearQueryState(i.targetId),Mm(r.remoteStore,i.targetId),Dg(r,i.targetId)})).catch(hh);case 9:e.next=14;break;case 11:return Dg(r,i.targetId),e.next=14,cm(r.localStore,i.targetId,!0);case 14:case"end":return e.stop()}}),e)}))),Ig.apply(this,arguments)}function Ng(e,t){return Og.apply(this,arguments)}function Og(){return Og=s(a().mark((function e(t,n){var r,i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Mf(t),e.prev=1,e.next=4,om(r.localStore,n);case 4:return i=e.sent,n.targetChanges.forEach((function(e,t){var n=r.Sa.get(t);n&&(Lf(e.addedDocuments.size+e.modifiedDocuments.size+e.removedDocuments.size<=1),e.addedDocuments.size>0?n.ma=!0:e.modifiedDocuments.size>0?Lf(n.ma):e.removedDocuments.size>0&&(Lf(n.ma),n.ma=!1))})),e.next=8,Ug(r,i,n);case 8:e.next=14;break;case 10:return e.prev=10,e.t0=e.catch(1),e.next=14,hh(e.t0);case 14:case"end":return e.stop()}}),e,null,[[1,10]])}))),Og.apply(this,arguments)}function Rg(e,t,n){var r=Mf(e);if(r.isPrimaryClient&&0===n||!r.isPrimaryClient&&1===n){var i=[];r.ga.forEach((function(e,n){var r=n.view.U_(t);r.snapshot&&i.push(r.snapshot)})),function(e,t){var n=Mf(e);n.onlineState=t;var r=!1;n.queries.forEach((function(e,n){var i,a=m(n.listeners);try{for(a.s();!(i=a.n()).done;){i.value.U_(t)&&(r=!0)}}catch(o){a.e(o)}finally{a.f()}})),r&&vg(n)}(r.eventManager,t),i.length&&r.fa.c_(i),r.onlineState=t,r.isPrimaryClient&&r.sharedClientState.setOnlineState(t)}}function Pg(e,t,n){return Ag.apply(this,arguments)}function Ag(){return Ag=s(a().mark((function e(t,n,r){var i,o,s,u,c,l;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((i=Mf(t)).sharedClientState.updateQueryState(n,"rejected",r),o=i.Sa.get(n),!(s=o&&o.key)){e.next=14;break}return u=(u=new Sh(ih.comparator)).insert(s,id.newNoDocument(s,Zf.min())),c=op().add(s),l=new $p(Zf.min(),new Map,new Sh(Yf),u,c),e.next=9,Ng(i,l);case 9:i.wa=i.wa.remove(s),i.Sa.delete(n),Fg(i),e.next=16;break;case 14:return e.next=16,cm(i.localStore,n,!1).then((function(){return Dg(i,n,r)})).catch(hh);case 16:case"end":return e.stop()}}),e)}))),Ag.apply(this,arguments)}function Dg(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;e.sharedClientState.removeLocalQueryTarget(t);var r,i=m(e.pa.get(t));try{for(i.s();!(r=i.n()).done;){var a=r.value;e.ga.delete(a),n&&e.fa.xa(a,n)}}catch(o){i.e(o)}finally{i.f()}e.pa.delete(t),e.isPrimaryClient&&e.ba.mr(t).forEach((function(t){e.ba.containsKey(t)||Lg(e,t)}))}function Lg(e,t){e.ya.delete(t.path.canonicalString());var n=e.wa.get(t);null!==n&&(Mm(e.remoteStore,n),e.wa=e.wa.remove(t),e.Sa.delete(n),Fg(e))}function Mg(e,t,n){var r,i=m(n);try{for(i.s();!(r=i.n()).done;){var a=r.value;a instanceof gg?(e.ba.addReference(a.key,t),jg(e,a)):a instanceof yg?(Of("SyncEngine","Document no longer in limbo: "+a.key),e.ba.removeReference(a.key,t),e.ba.containsKey(a.key)||Lg(e,a.key)):Df()}}catch(o){i.e(o)}finally{i.f()}}function jg(e,t){var n=t.key,r=n.path.canonicalString();e.wa.get(n)||e.ya.has(r)||(Of("SyncEngine","New document in limbo: "+n),e.ya.add(r),Fg(e))}function Fg(e){for(;e.ya.size>0&&e.wa.size<e.maxConcurrentLimboResolutions;){var t=e.ya.values().next().value;e.ya.delete(t);var n=new ih(th.fromString(t)),r=e.va.next();e.Sa.set(r,new wg(n)),e.wa=e.wa.insert(n,r),Lm(e.remoteStore,new Ov(Vd(Dd(n.path)),r,"TargetPurposeLimboResolution",mh.ae))}}function Ug(e,t,n){return Vg.apply(this,arguments)}function Vg(){return Vg=s(a().mark((function e(t,n,r){var i,o,u,c;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=Mf(t),o=[],u=[],c=[],e.t0=i.ga.isEmpty(),e.t0){e.next=9;break}return i.ga.forEach((function(e,t){c.push(i.Ma(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){o.push(e);var n=Jv.$i(t.targetId,e);u.push(n)}})))})),e.next=6,Promise.all(c);case 6:return i.fa.c_(o),e.next=9,function(){var e=s(a().mark((function e(t,n){var r,i,o,s,u,c,l,f;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Mf(t),e.prev=1,e.next=4,r.persistence.runTransaction("notifyLocalViewChanges","readwrite",(function(e){return ph.forEach(n,(function(t){return ph.forEach(t.Qi,(function(n){return r.persistence.referenceDelegate.addReference(e,t.targetId,n)})).next((function(){return ph.forEach(t.Ki,(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),vh(e.t0)){e.next=10;break}throw e.t0;case 10:Of("LocalStore","Failed to update sequence numbers: "+e.t0);case 11:i=m(n);try{for(i.s();!(o=i.n()).done;)s=o.value,u=s.targetId,s.fromCache||(c=r.rs.get(u),l=c.snapshotVersion,f=c.withLastLimboFreeSnapshotVersion(l),r.rs=r.rs.insert(u,f))}catch(a){i.e(a)}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,u);case 9:case"end":return e.stop()}}),e)}))),Vg.apply(this,arguments)}function zg(e,t){return Bg.apply(this,arguments)}function Bg(){return(Bg=s(a().mark((function e(t,n){var r,i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((r=Mf(t)).currentUser.isEqual(n)){e.next=11;break}return Of("SyncEngine","User change. New user:",n.toKey()),e.next=5,rm(r.localStore,n);case 5:return i=e.sent,r.currentUser=n,function(e,t){e.Ca.forEach((function(e){e.forEach((function(e){e.reject(new Ff(jf.CANCELLED,t))}))})),e.Ca.clear()}(r,"'waitForPendingWrites' promise is rejected due to a user change."),r.sharedClientState.handleUserChange(n,i.removedBatchIds,i.addedBatchIds),e.next=11,Ug(r,i.cs);case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Hg(e,t){var n=Mf(e),r=n.Sa.get(t);if(r&&r.ma)return op().add(r.key);var i=op(),a=n.pa.get(t);if(!a)return i;var o,s=m(a);try{for(s.s();!(o=s.n()).done;){var u=o.value,c=n.ga.get(u);i=i.unionWith(c.view.la)}}catch(l){s.e(l)}finally{s.f()}return i}function Kg(e){var t=Mf(e);return t.remoteStore.remoteSyncer.applyRemoteEvent=Ng.bind(null,t),t.remoteStore.remoteSyncer.getRemoteKeysForTarget=Hg.bind(null,t),t.remoteStore.remoteSyncer.rejectListen=Pg.bind(null,t),t.fa.c_=dg.bind(null,t.eventManager),t.fa.xa=pg.bind(null,t.eventManager),t}var qg=function(){function e(){k(this,e),this.synchronizeTabs=!1}return w(e,[{key:"initialize",value:function(){var e=s(a().mark((function e(t){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.serializer=_m(t.databaseInfo.databaseId),this.sharedClientState=this.createSharedClientState(t),this.persistence=this.createPersistence(t),e.next=5,this.persistence.start();case 5:this.localStore=this.createLocalStore(t),this.gcScheduler=this.createGarbageCollectionScheduler(t,this.localStore),this.indexBackfillerScheduler=this.createIndexBackfillerScheduler(t,this.localStore);case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"createGarbageCollectionScheduler",value:function(e,t){return null}},{key:"createIndexBackfillerScheduler",value:function(e,t){return null}},{key:"createLocalStore",value:function(e){return nm(this.persistence,new em,e.initialUser,this.serializer)}},{key:"createPersistence",value:function(e){return new $v(Xv.Jr,this.serializer)}},{key:"createSharedClientState",value:function(e){return new pm}},{key:"terminate",value:function(){var e=s(a().mark((function e(){return a().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}(),Wg=function(){function e(){k(this,e)}return w(e,[{key:"initialize",value:function(){var e=s(a().mark((function e(t,n){var r=this;return a().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 Rg(r.syncEngine,e,1)},this.remoteStore.remoteSyncer.handleCredentialChange=zg.bind(null,this.syncEngine),e.next=12,Zm(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 ug}},{key:"createDatastore",value:function(e){var t=_m(e.databaseInfo.databaseId),n=function(e){return new xm(e)}(e.databaseInfo);return function(e,t,n,r){return new Im(e,t,n,r)}(e.authCredentials,e.appCheckCredentials,n,t)}},{key:"createRemoteStore",value:function(e){var t=this;return function(e,t,n,r,i){return new Om(e,t,n,r,i)}(this.localStore,this.datastore,e.asyncQueue,(function(e){return Rg(t.syncEngine,e,0)}),mm.C()?new mm:new vm)}},{key:"createSyncEngine",value:function(e,t){return function(e,t,n,r,i,a,o){var s=new xg(e,t,n,r,i,a);return o&&(s.Fa=!0),s}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,e.initialUser,e.maxConcurrentLimboResolutions,t)}},{key:"terminate",value:function(){return function(){var e=s(a().mark((function e(t){var n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Mf(t),Of("RemoteStore","RemoteStore shutting down."),n.F_.add(5),e.next=5,Am(n);case 5:n.x_.shutdown(),n.O_.set("Unknown");case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()(this.remoteStore)}}]),e}();var Gg=function(){function e(t){k(this,e),this.observer=t,this.muted=!1}return w(e,[{key:"next",value:function(e){this.observer.next&&this.Ba(this.observer.next,e)}},{key:"error",value:function(e){this.observer.error?this.Ba(this.observer.error,e):Rf("Uncaught Error in snapshot listener:",e.toString())}},{key:"La",value:function(){this.muted=!0}},{key:"Ba",value:function(e,t){var n=this;this.muted||setTimeout((function(){n.muted||e(t)}),0)}}]),e}(),Qg=function(){function e(t,n,r,i){var o=this;k(this,e),this.authCredentials=t,this.appCheckCredentials=n,this.asyncQueue=r,this.databaseInfo=i,this.user=Cf.UNAUTHENTICATED,this.clientId=$f.V(),this.authCredentialListener=function(){return Promise.resolve()},this.appCheckCredentialListener=function(){return Promise.resolve()},this.authCredentials.start(r,function(){var e=s(a().mark((function e(t){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Of("FirestoreClient","Received user=",t.uid),e.next=3,o.authCredentialListener(t);case 3:o.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 Of("FirestoreClient","Received new app check token=",e),o.appCheckCredentialListener(e,o.user)}))}return w(e,[{key:"getConfiguration",value:function(){var e=s(a().mark((function e(){return a().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 Ff(jf.FAILED_PRECONDITION,"The client has already been terminated.")}},{key:"terminate",value:function(){var e=this;this.asyncQueue.enterRestrictedMode();var t=new Uf;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(s(a().mark((function n(){var r;return a().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=rg(n.t2,"Failed to shutdown persistence"),t.reject(r);case 18:case"end":return n.stop()}}),n,null,[[0,14]])})))),t.promise}}]),e}();function $g(e,t){return Yg.apply(this,arguments)}function Yg(){return Yg=s(a().mark((function e(t,n){var r,i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.asyncQueue.verifyOperationInProgress(),Of("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=s(a().mark((function e(t){return a().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,rm(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)}))),Yg.apply(this,arguments)}function Xg(e,t){return Jg.apply(this,arguments)}function Jg(){return Jg=s(a().mark((function e(t,n){var r,i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.asyncQueue.verifyOperationInProgress(),e.next=3,ey(t);case 3:return r=e.sent,Of("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 Xm(n.remoteStore,e)})),t.setAppCheckTokenChangeListener((function(e,t){return Xm(n.remoteStore,t)})),t._onlineComponents=n;case 13:case"end":return e.stop()}}),e)}))),Jg.apply(this,arguments)}function Zg(e){return"FirebaseError"===e.name?e.code===jf.FAILED_PRECONDITION||e.code===jf.UNIMPLEMENTED:!("undefined"!=typeof DOMException&&e instanceof DOMException)||22===e.code||20===e.code||11===e.code}function ey(e){return ty.apply(this,arguments)}function ty(){return(ty=s(a().mark((function e(t){var n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t._offlineComponents){e.next=21;break}if(!t._uninitializedComponentsProvider){e.next=18;break}return Of("FirestoreClient","Using user provided OfflineComponentProvider"),e.prev=3,e.next=6,$g(t,t._uninitializedComponentsProvider._offline);case 6:e.next=16;break;case 8:if(e.prev=8,e.t0=e.catch(3),Zg(n=e.t0)){e.next=13;break}throw n;case 13:return Pf("Error using user provided cache. Falling back to memory cache: "+n),e.next=16,$g(t,new qg);case 16:e.next=21;break;case 18:return Of("FirestoreClient","Using default OfflineComponentProvider"),e.next=21,$g(t,new qg);case 21:return e.abrupt("return",t._offlineComponents);case 22:case"end":return e.stop()}}),e,null,[[3,8]])})))).apply(this,arguments)}function ny(e){return ry.apply(this,arguments)}function ry(){return(ry=s(a().mark((function e(t){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=t._onlineComponents,e.t0){e.next=11;break}if(!t._uninitializedComponentsProvider){e.next=8;break}return Of("FirestoreClient","Using user provided OnlineComponentProvider"),e.next=6,Xg(t,t._uninitializedComponentsProvider._online);case 6:e.next=11;break;case 8:return Of("FirestoreClient","Using default OnlineComponentProvider"),e.next=11,Xg(t,new Wg);case 11:return e.abrupt("return",t._onlineComponents);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function iy(e){return ay.apply(this,arguments)}function ay(){return(ay=s(a().mark((function e(t){var n,r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ny(t);case 2:return n=e.sent,r=n.eventManager,e.abrupt("return",(r.onListen=Eg.bind(null,n.syncEngine),r.onUnlisten=Tg.bind(null,n.syncEngine),r));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function oy(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=new Uf;return e.asyncQueue.enqueueAndForget(s(a().mark((function i(){return a().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.t0=function(e,t,n,r,i){var a=new Gg({next:function(a){t.enqueueAndForget((function(){return fg(e,o)}));var s=a.docs.has(n);!s&&a.fromCache?i.reject(new Ff(jf.UNAVAILABLE,"Failed to get document because the client is offline.")):s&&a.fromCache&&r&&"server"===r.source?i.reject(new Ff(jf.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):i.resolve(a)},error:function(e){return i.reject(e)}}),o=new mg(Dd(n.path),a,{includeMetadataChanges:!0,Z_:!0});return cg(e,o)},i.next=3,iy(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}function sy(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=new Uf;return e.asyncQueue.enqueueAndForget(s(a().mark((function i(){return a().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.t0=function(e,t,n,r,i){var a=new Gg({next:function(n){t.enqueueAndForget((function(){return fg(e,o)})),n.fromCache&&"server"===r.source?i.reject(new Ff(jf.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 mg(n,a,{includeMetadataChanges:!0,Z_:!0});return cg(e,o)},i.next=3,iy(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}function uy(e){var t={};return void 0!==e.timeoutSeconds&&(t.timeoutSeconds=e.timeoutSeconds),t}var cy=new Map;function ly(e,t,n){if(!n)throw new Ff(jf.INVALID_ARGUMENT,"Function ".concat(e,"() cannot be called with an empty ").concat(t,"."))}function fy(e){if(!ih.isDocumentKey(e))throw new Ff(jf.INVALID_ARGUMENT,"Invalid document reference. Document references must have an even number of segments, but ".concat(e," has ").concat(e.length,"."))}function hy(e){if(ih.isDocumentKey(e))throw new Ff(jf.INVALID_ARGUMENT,"Invalid collection reference. Collection references must have an odd number of segments, but ".concat(e," has ").concat(e.length,"."))}function dy(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":Df()}function py(e,t){if("_delegate"in e&&(e=e._delegate),!(e instanceof t)){if(t.name===e.constructor.name)throw new Ff(jf.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");var n=dy(e);throw new Ff(jf.INVALID_ARGUMENT,"Expected type '".concat(t.name,"', but it was: ").concat(n))}return e}var vy=function(){function e(t){var n,r;if(k(this,e),void 0===t.host){if(void 0!==t.ssl)throw new Ff(jf.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,this.localCache=t.localCache,void 0===t.cacheSizeBytes)this.cacheSizeBytes=41943040;else{if(-1!==t.cacheSizeBytes&&t.cacheSizeBytes<1048576)throw new Ff(jf.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=t.cacheSizeBytes}(function(e,t,n,r){if(!0===t&&!0===r)throw new Ff(jf.INVALID_ARGUMENT,"".concat(e," and ").concat(n," cannot be used together."))})("experimentalForceLongPolling",t.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",t.experimentalAutoDetectLongPolling),this.experimentalForceLongPolling=!!t.experimentalForceLongPolling,this.experimentalForceLongPolling?this.experimentalAutoDetectLongPolling=!1:void 0===t.experimentalAutoDetectLongPolling?this.experimentalAutoDetectLongPolling=!0:this.experimentalAutoDetectLongPolling=!!t.experimentalAutoDetectLongPolling,this.experimentalLongPollingOptions=uy(null!==(r=t.experimentalLongPollingOptions)&&void 0!==r?r:{}),function(e){if(void 0!==e.timeoutSeconds){if(isNaN(e.timeoutSeconds))throw new Ff(jf.INVALID_ARGUMENT,"invalid long polling timeout: ".concat(e.timeoutSeconds," (must not be NaN)"));if(e.timeoutSeconds<5)throw new Ff(jf.INVALID_ARGUMENT,"invalid long polling timeout: ".concat(e.timeoutSeconds," (minimum allowed value is 5)"));if(e.timeoutSeconds>30)throw new Ff(jf.INVALID_ARGUMENT,"invalid long polling timeout: ".concat(e.timeoutSeconds," (maximum allowed value is 30)"))}}(this.experimentalLongPollingOptions),this.useFetchStreams=!!t.useFetchStreams}return w(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&&function(e,t){return e.timeoutSeconds===t.timeoutSeconds}(this.experimentalLongPollingOptions,e.experimentalLongPollingOptions)&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}}]),e}(),my=function(){function e(t,n,r,i){k(this,e),this._authCredentials=t,this._appCheckCredentials=n,this._databaseId=r,this._app=i,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new vy({}),this._settingsFrozen=!1}return w(e,[{key:"app",get:function(){if(!this._app)throw new Ff(jf.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 Ff(jf.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 vy(e),void 0!==e.credentials&&(this._authCredentials=function(e){if(!e)return new zf;switch(e.type){case"firstParty":return new qf(e.sessionIndex||"0",e.iamToken||null,e.authTokenFactory||null);case"provider":return e.client;default:throw new Ff(jf.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}}(e.credentials))}},{key:"_getSettings",value:function(){return this._settings}},{key:"_freezeSettings",value:function(){return this._settingsFrozen=!0,this._settings}},{key:"_delete",value:function(){return this._terminateTask||(this._terminateTask=this._terminate()),this._terminateTask}},{key:"toJSON",value:function(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}},{key:"_terminate",value:function(){return function(e){var t=cy.get(e);t&&(Of("ComponentProvider","Removing Datastore"),cy.delete(e),t.terminate())}(this),Promise.resolve()}}]),e}();function gy(e,t,n){var r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=(e=py(e,my))._getSettings(),o="".concat(t,":").concat(n);if("firestore.googleapis.com"!==a.host&&a.host!==o&&Pf("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used."),e._setSettings(Object.assign(Object.assign({},a),{host:o,ssl:!1})),i.mockUserToken){var s,u;if("string"==typeof i.mockUserToken)s=i.mockUserToken,u=Cf.MOCK_USER;else{s=B(i.mockUserToken,null===(r=e._app)||void 0===r?void 0:r.options.projectId);var c=i.mockUserToken.sub||i.mockUserToken.user_id;if(!c)throw new Ff(jf.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");u=new Cf(c)}e._authCredentials=new Bf(new Vf(s,u))}}var yy=function(){function e(t,n,r){k(this,e),this.converter=n,this._query=r,this.type="query",this.firestore=t}return w(e,[{key:"withConverter",value:function(t){return new e(this.firestore,t,this._query)}}]),e}(),ky=function(){function e(t,n,r){k(this,e),this.converter=n,this._key=r,this.type="document",this.firestore=t}return w(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 by(this.firestore,this.converter,this._key.path.popLast())}},{key:"withConverter",value:function(t){return new e(this.firestore,t,this._key)}}]),e}(),by=function(e){_(n,e);var t=T(n);function n(e,r,i){var a;return k(this,n),(a=t.call(this,e,r,Dd(i)))._path=i,a.type="collection",a}return w(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 ky(this.firestore,null,new ih(e))}},{key:"withConverter",value:function(e){return new n(this.firestore,e,this._path)}}]),n}(yy);function wy(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=ne(e),ly("collection","path",t),e instanceof my){var a=th.fromString.apply(th,[t].concat(r));return hy(a),new by(e,null,a)}if(!(e instanceof ky||e instanceof by))throw new Ff(jf.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");var o=e._path.child(th.fromString.apply(th,[t].concat(r)));return hy(o),new by(e.firestore,null,o)}function xy(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=ne(e),1===arguments.length&&(t=$f.V()),ly("doc","path",t),e instanceof my){var a=th.fromString.apply(th,[t].concat(r));return fy(a),new ky(e,null,new ih(a))}if(!(e instanceof ky||e instanceof by))throw new Ff(jf.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");var o=e._path.child(th.fromString.apply(th,[t].concat(r)));return fy(o),new ky(e.firestore,e instanceof by?e.converter:null,new ih(o))}var Ey=function(){function e(){var t=this;k(this,e),this.Za=Promise.resolve(),this.Xa=[],this.eu=!1,this.tu=[],this.nu=null,this.ru=!1,this.iu=!1,this.su=[],this.Ho=new Sm(this,"async_queue_retry"),this.ou=function(){var e=Em();e&&Of("AsyncQueue","Visibility state changed to "+e.visibilityState),t.Ho.$o()};var n=Em();n&&"function"==typeof n.addEventListener&&n.addEventListener("visibilitychange",this.ou)}return w(e,[{key:"isShuttingDown",get:function(){return this.eu}},{key:"enqueueAndForget",value:function(e){this.enqueue(e)}},{key:"enqueueAndForgetEvenWhileRestricted",value:function(e){this._u(),this.au(e)}},{key:"enterRestrictedMode",value:function(e){if(!this.eu){this.eu=!0,this.iu=e||!1;var t=Em();t&&"function"==typeof t.removeEventListener&&t.removeEventListener("visibilitychange",this.ou)}}},{key:"enqueue",value:function(e){var t=this;if(this._u(),this.eu)return new Promise((function(){}));var n=new Uf;return this.au((function(){return t.eu&&t.iu?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.Xa.push(e),t.uu()}))}},{key:"uu",value:function(){var e=s(a().mark((function e(){var t=this;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0===this.Xa.length){e.next=14;break}return e.prev=1,e.next=4,this.Xa[0]();case 4:this.Xa.shift(),this.Ho.reset(),e.next=13;break;case 8:if(e.prev=8,e.t0=e.catch(1),vh(e.t0)){e.next=12;break}throw e.t0;case 12:Of("AsyncQueue","Operation failed with retryable error: "+e.t0);case 13:this.Xa.length>0&&this.Ho.Qo((function(){return t.uu()}));case 14:case"end":return e.stop()}}),e,this,[[1,8]])})));return function(){return e.apply(this,arguments)}}()},{key:"au",value:function(e){var t=this,n=this.Za.then((function(){return t.ru=!0,e().catch((function(e){t.nu=e,t.ru=!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 Rf("INTERNAL UNHANDLED ERROR: ",n),e})).then((function(e){return t.ru=!1,e}))}));return this.Za=n,n}},{key:"enqueueAfterDelay",value:function(e,t,n){var r=this;this._u(),this.su.indexOf(e)>-1&&(t=0);var i=ng.createAndSchedule(this,e,t,n,(function(e){return r.cu(e)}));return this.tu.push(i),i}},{key:"_u",value:function(){this.nu&&Df()}},{key:"verifyOperationInProgress",value:function(){}},{key:"lu",value:function(){var e=s(a().mark((function e(){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.Za,e.next=3,t;case 3:if(t!==this.Za){e.next=0;break}case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"hu",value:function(e){var t,n=m(this.tu);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:"Pu",value:function(e){var t=this;return this.lu().then((function(){t.tu.sort((function(e,t){return e.targetTimeMs-t.targetTimeMs}));var n,r=m(t.tu);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.lu()}))}},{key:"Iu",value:function(e){this.su.push(e)}},{key:"cu",value:function(e){var t=this.tu.indexOf(e);this.tu.splice(t,1)}}]),e}();var _y=function(e){_(n,e);var t=T(n);function n(e,r,i,a){var o;return k(this,n),(o=t.call(this,e,r,i,a)).type="firestore",o._queue=new Ey,o._persistenceKey=(null==a?void 0:a.name)||"[DEFAULT]",o}return w(n,[{key:"_terminate",value:function(){return this._firestoreClient||Ty(this),this._firestoreClient.terminate()}}]),n}(my);function Sy(e,t){var n="string"==typeof e?e:t||"(default)",r=We("object"==typeof e?e:Je(),"firestore").getImmediate({identifier:n});if(!r._initialized){var i=F("firestore");i&&gy.apply(void 0,[r].concat(v(i)))}return r}function Cy(e){return e._firestoreClient||Ty(e),e._firestoreClient.verifyNotTerminated(),e._firestoreClient}function Ty(e){var t,n,r,i=e._freezeSettings(),a=function(e,t,n,r){return new Vh(e,t,n,r.host,r.ssl,r.experimentalForceLongPolling,r.experimentalAutoDetectLongPolling,uy(r.experimentalLongPollingOptions),r.useFetchStreams)}(e._databaseId,(null===(t=e._app)||void 0===t?void 0:t.options.appId)||"",e._persistenceKey,i);e._firestoreClient=new Qg(e._authCredentials,e._appCheckCredentials,e._queue,a),(null===(n=i.localCache)||void 0===n?void 0:n._offlineComponentProvider)&&(null===(r=i.localCache)||void 0===r?void 0:r._onlineComponentProvider)&&(e._firestoreClient._uninitializedComponentsProvider={_offlineKind:i.localCache.kind,_offline:i.localCache._offlineComponentProvider,_online:i.localCache._onlineComponentProvider})}var Iy=function(){function e(t){k(this,e),this._byteString=t}return w(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(Ph.fromBase64String(t))}catch(t){throw new Ff(jf.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+t)}}},{key:"fromUint8Array",value:function(t){return new e(Ph.fromUint8Array(t))}}]),e}(),Ny=function(){function e(){k(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 Ff(jf.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new rh(n)}return w(e,[{key:"isEqual",value:function(e){return this._internalPath.isEqual(e._internalPath)}}]),e}();var Oy=function(){function e(t,n){if(k(this,e),!isFinite(t)||t<-90||t>90)throw new Ff(jf.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+t);if(!isFinite(n)||n<-180||n>180)throw new Ff(jf.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+n);this._lat=t,this._long=n}return w(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 Yf(this._lat,e._lat)||Yf(this._long,e._long)}}]),e}();var Ry=new RegExp("[~\\*/\\[\\]]");function Py(e,t,n){if(t.search(Ry)>=0)throw Ay("Invalid field path (".concat(t,"). Paths must not contain '~', '*', '/', '[', or ']'"),e,!1,void 0,n);try{return I(Ny,v(t.split(".")))._internalPath}catch(ms){throw Ay("Invalid field path (".concat(t,"). Paths must not be empty, begin with '.', end with '.', or contain '..'"),e,!1,void 0,n)}}function Ay(e,t,n,r,i){var a=r&&!r.isEmpty(),o=void 0!==i,s="Function ".concat(t,"() called with invalid data");n&&(s+=" (via `toFirestore()`)"),s+=". ";var u="";return(a||o)&&(u+=" (found",a&&(u+=" in field ".concat(r)),o&&(u+=" in document ".concat(i)),u+=")"),new Ff(jf.INVALID_ARGUMENT,s+e+u)}var Dy=function(){function e(t,n,r,i,a){k(this,e),this._firestore=t,this._userDataWriter=n,this._key=r,this._document=i,this._converter=a}return w(e,[{key:"id",get:function(){return this._key.path.lastSegment()}},{key:"ref",get:function(){return new ky(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 Ly(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(My("DocumentSnapshot.get",e));if(null!==t)return this._userDataWriter.convertValue(t)}}}]),e}(),Ly=function(e){_(n,e);var t=T(n);function n(){return k(this,n),t.apply(this,arguments)}return w(n,[{key:"data",value:function(){return Nn(S(n.prototype),"data",this).call(this)}}]),n}(Dy);function My(e,t){return"string"==typeof t?Py(e,t):t instanceof Ny?t._internalPath:t._delegate._internalPath}function jy(e){if("L"===e.limitType&&0===e.explicitOrderBy.length)throw new Ff(jf.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}var Fy=function(){function e(){k(this,e)}return w(e,[{key:"convertValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none";switch(Hh(e)){case 0:return null;case 1:return e.booleanValue;case 2:return Lh(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(Mh(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 Df()}}},{key:"convertObject",value:function(e,t){return this.convertObjectMap(e.fields,t)}},{key:"convertObjectMap",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none",r={};return Eh(e,(function(e,i){r[e]=t.convertValue(i,n)})),r}},{key:"convertGeoPoint",value:function(e){return new Oy(Lh(e.latitude),Lh(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=Fh(e);return null==n?null:this.convertValue(n,t);case"estimate":return this.convertTimestamp(Uh(e));default:return null}}},{key:"convertTimestamp",value:function(e){var t=Dh(e);return new Jf(t.seconds,t.nanos)}},{key:"convertDocumentKey",value:function(e,t){var n=th.fromString(e);Lf(Nv(n));var r=new zh(n.get(1),n.get(3)),i=new ih(n.popFirst(5));return r.isEqual(t)||Rf("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 Uy=function(){function e(t,n){k(this,e),this.hasPendingWrites=t,this.fromCache=n}return w(e,[{key:"isEqual",value:function(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}]),e}(),Vy=function(e){_(n,e);var t=T(n);function n(e,r,i,a,o,s){var u;return k(this,n),(u=t.call(this,e,r,i,a,s))._firestore=e,u._firestoreImpl=e,u.metadata=o,u}return w(n,[{key:"exists",value:function(){return Nn(S(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 zy(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(My("DocumentSnapshot.get",e));if(null!==n)return this._userDataWriter.convertValue(n,t.serverTimestamps)}}}]),n}(Dy),zy=function(e){_(n,e);var t=T(n);function n(){return k(this,n),t.apply(this,arguments)}return w(n,[{key:"data",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Nn(S(n.prototype),"data",this).call(this,e)}}]),n}(Vy),By=function(){function e(t,n,r,i){k(this,e),this._firestore=t,this._userDataWriter=n,this._snapshot=i,this.metadata=new Uy(i.hasPendingWrites,i.fromCache),this.query=r}return w(e,[{key:"docs",get:function(){var e=[];return this.forEach((function(t){return e.push(t)})),e}},{key:"size",get:function(){return this._snapshot.docs.size}},{key:"empty",get:function(){return 0===this.size}},{key:"forEach",value:function(e,t){var n=this;this._snapshot.docs.forEach((function(r){e.call(t,new zy(n._firestore,n._userDataWriter,r.key,r,new Uy(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]:{}).includeMetadataChanges;if(e&&this._snapshot.excludesMetadataChanges)throw new Ff(jf.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===e||(this._cachedChanges=function(e,t){if(e._snapshot.oldDocs.isEmpty()){var n=0;return e._snapshot.docChanges.map((function(t){var r=new zy(e._firestore,e._userDataWriter,t.doc.key,t.doc,new Uy(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 zy(e._firestore,e._userDataWriter,t.doc.key,t.doc,new Uy(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:Hy(t.type),doc:n,oldIndex:i,newIndex:a}}))}(this,e),this._cachedChangesIncludeMetadataChanges=e),this._cachedChanges}}]),e}();function Hy(e){switch(e){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return Df()}}function Ky(e){e=py(e,ky);var t=py(e.firestore,_y);return oy(Cy(t),e._key).then((function(n){return Gy(t,e,n)}))}var qy=function(e){_(n,e);var t=T(n);function n(e){var r;return k(this,n),(r=t.call(this)).firestore=e,r}return w(n,[{key:"convertBytes",value:function(e){return new Iy(e)}},{key:"convertReference",value:function(e){var t=this.convertDocumentKey(e,this.firestore._databaseId);return new ky(this.firestore,null,t)}}]),n}(Fy);function Wy(e){e=py(e,yy);var t=py(e.firestore,_y),n=Cy(t),r=new qy(t);return jy(e._query),sy(n,e._query).then((function(n){return new By(t,r,e,n)}))}function Gy(e,t,n){var r=n.docs.get(t._key),i=new qy(e);return new Vy(e,i,t._key,r,new Uy(n.hasPendingWrites,n.fromCache),t.converter)}new WeakMap;!function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];!function(e){Tf=e}(Ye),qe(new re("firestore",(function(e,n){var r=n.instanceIdentifier,i=n.options,a=e.getProvider("app").getImmediate(),o=new _y(new Hf(e.getProvider("auth-internal")),new Gf(e.getProvider("app-check-internal")),function(e,t){if(!Object.prototype.hasOwnProperty.apply(e.options,["projectId"]))throw new Ff(jf.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new zh(e.options.projectId,t)}(a,r),a);return i=Object.assign({useFetchStreams:t},i),o._setSettings(i),o}),"PUBLIC").setMultipleInstances(!0)),Ze(Sf,"4.2.0",e),Ze(Sf,"4.2.0","esm2017")}();var Qy,$y="firebasestorage.googleapis.com",Yy="storageBucket",Xy=function(e){_(n,e);var t=T(n);function n(e,r){var i,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return k(this,n),(i=t.call(this,Jy(e),"Firebase Storage: ".concat(r," (").concat(Jy(e),")"))).status_=a,i.customData={serverResponse:null},i._baseMessage=i.message,Object.setPrototypeOf(x(i),n.prototype),i}return w(n,[{key:"status",get:function(){return this.status_},set:function(e){this.status_=e}},{key:"_codeEquals",value:function(e){return Jy(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}(q);function Jy(e){return"storage/"+e}function Zy(){return new Xy(Qy.UNKNOWN,"An unknown error occurred, please check the error payload for server response.")}function ek(){return new Xy(Qy.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again.")}function tk(){return new Xy(Qy.CANCELED,"User canceled the upload/download.")}function nk(e){return new Xy(Qy.INVALID_ARGUMENT,e)}function rk(){return new Xy(Qy.APP_DELETED,"The Firebase app was deleted.")}function ik(e){throw new Xy(Qy.INTERNAL_ERROR,"Internal error: "+e)}!function(e){e.UNKNOWN="unknown",e.OBJECT_NOT_FOUND="object-not-found",e.BUCKET_NOT_FOUND="bucket-not-found",e.PROJECT_NOT_FOUND="project-not-found",e.QUOTA_EXCEEDED="quota-exceeded",e.UNAUTHENTICATED="unauthenticated",e.UNAUTHORIZED="unauthorized",e.UNAUTHORIZED_APP="unauthorized-app",e.RETRY_LIMIT_EXCEEDED="retry-limit-exceeded",e.INVALID_CHECKSUM="invalid-checksum",e.CANCELED="canceled",e.INVALID_EVENT_NAME="invalid-event-name",e.INVALID_URL="invalid-url",e.INVALID_DEFAULT_BUCKET="invalid-default-bucket",e.NO_DEFAULT_BUCKET="no-default-bucket",e.CANNOT_SLICE_BLOB="cannot-slice-blob",e.SERVER_FILE_WRONG_SIZE="server-file-wrong-size",e.NO_DOWNLOAD_URL="no-download-url",e.INVALID_ARGUMENT="invalid-argument",e.INVALID_ARGUMENT_COUNT="invalid-argument-count",e.APP_DELETED="app-deleted",e.INVALID_ROOT_OPERATION="invalid-root-operation",e.INVALID_FORMAT="invalid-format",e.INTERNAL_ERROR="internal-error",e.UNSUPPORTED_ENVIRONMENT="unsupported-environment"}(Qy||(Qy={}));var ak,ok=function(){function e(t,n){k(this,e),this.bucket=t,this.path_=n}return w(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,i;try{r=e.makeFromUrl(t,n)}catch(a){return new e(t,"")}if(""===r.path)return r;throw i=t,new Xy(Qy.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+i+"'.")}},{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 s=n.replace(/[.]/g,"\\."),u=[{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(s,"/").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===$y?"(?:storage.googleapis.com|storage.cloud.google.com)":n,"/").concat(i,"/").concat("([^?#]*)"),"i"),indices:{bucket:1,path:2},postModify:o}],c=0;c<u.length;c++){var l=u[c],f=l.regex.exec(t);if(f){var h=f[l.indices.bucket],d=f[l.indices.path];d||(d=""),r=new e(h,d),l.postModify(r);break}}if(null==r)throw function(e){return new Xy(Qy.INVALID_URL,"Invalid URL '"+e+"'.")}(t);return r}}]),e}(),sk=function(){function e(t){k(this,e),this.promise_=Promise.reject(t)}return w(e,[{key:"getPromise",value:function(){return this.promise_}},{key:"cancel",value:function(){}}]),e}();function uk(e){return"string"===typeof e||e instanceof String}function ck(e,t,n,r){if(r<t)throw nk("Invalid value for '".concat(e,"'. Expected ").concat(t," or greater."));if(r>n)throw nk("Invalid value for '".concat(e,"'. Expected ").concat(n," or less."))}function lk(e,t,n){var r=t;return null==n&&(r="https://".concat(t)),"".concat(n,"://").concat(r,"/v0").concat(e)}function fk(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 hk(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"}(ak||(ak={}));var dk=function(){function e(t,n,r,i,a,o,s,u,c,l,f){var h=this,d=!(arguments.length>11&&void 0!==arguments[11])||arguments[11];k(this,e),this.url_=t,this.method_=n,this.headers_=r,this.body_=i,this.successCodes_=a,this.additionalRetryCodes_=o,this.callback_=s,this.errorCallback_=u,this.timeout_=c,this.progressCallback_=l,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_()}))}return w(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(u){i(u)}else if(null!==a){var s=Zy();s.serverResponse=a.getErrorText(),e.errorCallback_?i(e.errorCallback_(a,s)):i(s)}else{if(n.canceled)i(e.appDelete_?rk():tk());else i(ek())}};this.canceled_?t(0,new pk(!1,null,!0)):this.backoffId_=function(e,t,n){var r=1,i=null,a=null,o=!1,s=0;function u(){return 2===s}var c=!1;function l(){if(!c){c=!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,u())}),t)}function h(){a&&clearTimeout(a)}function d(e){if(c)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 l.call.apply(l,[null,e].concat(n));var a;if(u()||o)return h(),void l.call.apply(l,[null,e].concat(n));r<64&&(r*=2),1===s?(s=2,a=0):a=1e3*(r+Math.random()),f(a)}}var p=!1;function v(e){p||(p=!0,h(),c||(null!==i?(e||(s=2),clearTimeout(i),f(0)):e||(s=1)))}return f(0),a=setTimeout((function(){o=!0,v(!0)}),n),v}((function(t,n){if(n)t(!1,new pk(!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()===ak.NO_ERROR,a=r.getStatus();if(!n||hk(a,e.additionalRetryCodes_)&&e.retry){var o=r.getErrorCode()===ak.ABORT;t(!1,new pk(!1,null,o))}else{var s=-1!==e.successCodes_.indexOf(a);t(!0,new pk(s,r))}}))}}),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}(),pk=w((function e(t,n,r){k(this,e),this.wasSuccessCode=t,this.connection=n,this.canceled=!!r}));function vk(e){var t;try{t=JSON.parse(e)}catch(n){return null}return function(e){return"object"===typeof e&&!Array.isArray(e)}(t)?t:null}function mk(e){var t=e.lastIndexOf("/",e.length-2);return-1===t?e:e.slice(t+1)}function gk(e,t){return t}var yk=w((function e(t,n,r,i){k(this,e),this.server=t,this.local=n||t,this.writable=!!r,this.xform=i||gk})),kk=null;function bk(){if(kk)return kk;var e=[];e.push(new yk("bucket")),e.push(new yk("generation")),e.push(new yk("metageneration")),e.push(new yk("name","fullPath",!0));var t=new yk("name");t.xform=function(e,t){return function(e){return!uk(e)||e.length<2?e:mk(e)}(t)},e.push(t);var n=new yk("size");return n.xform=function(e,t){return void 0!==t?Number(t):t},e.push(n),e.push(new yk("timeCreated")),e.push(new yk("updated")),e.push(new yk("md5Hash",null,!0)),e.push(new yk("cacheControl",null,!0)),e.push(new yk("contentDisposition",null,!0)),e.push(new yk("contentEncoding",null,!0)),e.push(new yk("contentLanguage",null,!0)),e.push(new yk("contentType",null,!0)),e.push(new yk("metadata","customMetadata",!0)),kk=e}function wk(e,t,n){for(var r={type:"file"},i=n.length,a=0;a<i;a++){var o=n[a];r[o.local]=o.xform(r,t[o.server])}return function(e,t){Object.defineProperty(e,"ref",{get:function(){var n=e.bucket,r=e.fullPath,i=new ok(n,r);return t._makeStorageReference(i)}})}(r,e),r}function xk(e,t,n){var r=vk(t);return null===r?null:wk(e,r,n)}var Ek=w((function e(t,n,r,i){k(this,e),this.url=t,this.method=n,this.handler=r,this.timeout=i,this.urlParams={},this.headers={},this.body=null,this.errorHandler=null,this.progressCallback=null,this.successCodes=[200],this.additionalRetryCodes=[]}));function _k(e){if(!e)throw Zy()}function Sk(e,t){return function(n,r){var i=xk(e,r,t);return _k(null!==i),function(e,t,n,r){var i=vk(t);if(null===i)return null;if(!uk(i.downloadTokens))return null;var a=i.downloadTokens;if(0===a.length)return null;var o=encodeURIComponent;return a.split(",").map((function(t){var i=e.bucket,a=e.fullPath;return lk("/b/"+o(i)+"/o/"+o(a),n,r)+fk({alt:"media",token:t})}))[0]}(i,r,e.host,e._protocol)}}function Ck(e){return function(t,n){var r,i,a;return 401===t.getStatus()?r=t.getErrorText().includes("Firebase App Check token is invalid")?new Xy(Qy.UNAUTHORIZED_APP,"This app does not have permission to access Firebase Storage on this project."):new Xy(Qy.UNAUTHENTICATED,"User is not authenticated, please authenticate using Firebase Authentication and try again."):402===t.getStatus()?(a=e.bucket,r=new Xy(Qy.QUOTA_EXCEEDED,"Quota for bucket '"+a+"' exceeded, please view quota on https://firebase.google.com/pricing/.")):403===t.getStatus()?(i=e.path,r=new Xy(Qy.UNAUTHORIZED,"User does not have permission to access '"+i+"'.")):r=n,r.status=t.getStatus(),r.serverResponse=n.serverResponse,r}}function Tk(e){var t=Ck(e);return function(n,r){var i,a=t(n,r);return 404===n.getStatus()&&(i=e.path,a=new Xy(Qy.OBJECT_NOT_FOUND,"Object '"+i+"' does not exist.")),a.serverResponse=r.serverResponse,a}}var Ik=null,Nk=function(){function e(){var t=this;k(this,e),this.sent_=!1,this.xhr_=new XMLHttpRequest,this.initXhr(),this.errorCode_=ak.NO_ERROR,this.sendPromise_=new Promise((function(e){t.xhr_.addEventListener("abort",(function(){t.errorCode_=ak.ABORT,e()})),t.xhr_.addEventListener("error",(function(){t.errorCode_=ak.NETWORK_ERROR,e()})),t.xhr_.addEventListener("load",(function(){e()}))}))}return w(e,[{key:"send",value:function(e,t,n,r){if(this.sent_)throw ik("cannot .send() more than once");if(this.sent_=!0,this.xhr_.open(t,e,!0),void 0!==r)for(var i in r)r.hasOwnProperty(i)&&this.xhr_.setRequestHeader(i,r[i].toString());return void 0!==n?this.xhr_.send(n):this.xhr_.send(),this.sendPromise_}},{key:"getErrorCode",value:function(){if(!this.sent_)throw ik("cannot .getErrorCode() before sending");return this.errorCode_}},{key:"getStatus",value:function(){if(!this.sent_)throw ik("cannot .getStatus() before sending");try{return this.xhr_.status}catch(e){return-1}}},{key:"getResponse",value:function(){if(!this.sent_)throw ik("cannot .getResponse() before sending");return this.xhr_.response}},{key:"getErrorText",value:function(){if(!this.sent_)throw ik("cannot .getErrorText() before sending");return this.xhr_.statusText}},{key:"abort",value:function(){this.xhr_.abort()}},{key:"getResponseHeader",value:function(e){return this.xhr_.getResponseHeader(e)}},{key:"addUploadProgressListener",value:function(e){null!=this.xhr_.upload&&this.xhr_.upload.addEventListener("progress",e)}},{key:"removeUploadProgressListener",value:function(e){null!=this.xhr_.upload&&this.xhr_.upload.removeEventListener("progress",e)}}]),e}(),Ok=function(e){_(n,e);var t=T(n);function n(){return k(this,n),t.apply(this,arguments)}return w(n,[{key:"initXhr",value:function(){this.xhr_.responseType="text"}}]),n}(Nk);function Rk(){return Ik?Ik():new Ok}var Pk=function(){function e(t,n){k(this,e),this._service=t,this._location=n instanceof ok?n:ok.makeFromUrl(n,t.host)}return w(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 ok(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 mk(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 ok(this._location.bucket,t);return new e(this._service,n)}},{key:"_throwIfRoot",value:function(e){if(""===this._location.path)throw function(e){return new Xy(Qy.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 Ak(e){e._throwIfRoot("getDownloadURL");var t=function(e,t,n){var r=lk(t.fullServerUrl(),e.host,e._protocol),i=e.maxOperationRetryTime,a=new Ek(r,"GET",Sk(e,n),i);return a.errorHandler=Tk(t),a}(e.storage,e._location,bk());return e.storage.makeRequestWithTokens(t,Rk).then((function(e){if(null===e)throw new Xy(Qy.NO_DOWNLOAD_URL,"The given file does not have any download URLs.");return e}))}function Dk(e,t){var n=function(e,t){var n=t.split("/").filter((function(e){return e.length>0})).join("/");return 0===e.length?n:e+"/"+n}(e._location.path,t),r=new ok(e._location.bucket,n);return new Pk(e.storage,r)}function Lk(e,t){if(e instanceof Fk){var n=e;if(null==n._bucket)throw new Xy(Qy.NO_DEFAULT_BUCKET,"No default bucket found. Did you set the '"+Yy+"' property when initializing the app?");var r=new Pk(n,n._bucket);return null!=t?Lk(r,t):r}return void 0!==t?Dk(e,t):e}function Mk(e,t){if(t&&/^[A-Za-z]+:\/\//.test(t)){if(e instanceof Fk)return new Pk(e,t);throw nk("To use ref(service, url), the first argument must be a Storage instance.")}return Lk(e,t)}function jk(e,t){var n=null===t||void 0===t?void 0:t[Yy];return null==n?null:ok.makeFromBucketSpec(n,e)}var Fk=function(){function e(t,n,r,i,a){k(this,e),this.app=t,this._authProvider=n,this._appCheckProvider=r,this._url=i,this._firebaseVersion=a,this._bucket=null,this._host=$y,this._protocol="https",this._appId=null,this._deleted=!1,this._maxOperationRetryTime=12e4,this._maxUploadRetryTime=6e5,this._requests=new Set,this._bucket=null!=i?ok.makeFromBucketSpec(i,this._host):jk(this._host,this.app.options)}return w(e,[{key:"host",get:function(){return this._host},set:function(e){this._host=e,null!=this._url?this._bucket=ok.makeFromBucketSpec(this._url,e):this._bucket=jk(e,this.app.options)}},{key:"maxUploadRetryTime",get:function(){return this._maxUploadRetryTime},set:function(e){ck("time",0,Number.POSITIVE_INFINITY,e),this._maxUploadRetryTime=e}},{key:"maxOperationRetryTime",get:function(){return this._maxOperationRetryTime},set:function(e){ck("time",0,Number.POSITIVE_INFINITY,e),this._maxOperationRetryTime=e}},{key:"_getAuthToken",value:function(){var e=s(a().mark((function e(){var t,n;return a().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=s(a().mark((function e(){var t,n;return a().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 Pk(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 sk(rk());var o=function(e,t,n,r,i,a){var o=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],s=fk(e.urlParams),u=e.url+s,c=Object.assign({},e.headers);return function(e,t){t&&(e["X-Firebase-GMPID"]=t)}(c,t),function(e,t){null!==t&&t.length>0&&(e.Authorization="Firebase "+t)}(c,n),function(e,t){e["X-Firebase-Storage-Version"]="webjs/"+(null!==t&&void 0!==t?t:"AppManager")}(c,a),function(e,t){null!==t&&(e["X-Firebase-AppCheck"]=t)}(c,r),new dk(u,e.method,c,e.body,e.successCodes,e.additionalRetryCodes,e.handler,e.errorHandler,e.timeout,e.progressCallback,i,o)}(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=s(a().mark((function e(t,n){var r,i,o,s;return a().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=h(r,2),o=i[0],s=i[1],e.abrupt("return",this._makeRequest(t,n,o,s).getPromise());case 7:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()}]),e}(),Uk="@firebase/storage",Vk="0.11.2",zk="storage";function Bk(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Je(),t=arguments.length>1?arguments[1]:void 0,n=We(e=ne(e),zk).getImmediate({identifier:t}),r=F("storage");return r&&Hk.apply(void 0,[n].concat(v(r))),n}function Hk(e,t,n){!function(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;i&&(e._overrideAuthToken="string"===typeof i?i:B(i,e.app.options.projectId))}(e,t,n,arguments.length>3&&void 0!==arguments[3]?arguments[3]:{})}function Kk(e,t){var n=t.instanceIdentifier,r=e.getProvider("app").getImmediate(),i=e.getProvider("auth-internal"),a=e.getProvider("app-check-internal");return new Fk(r,i,a,n,Ye)}function qk(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}function Wk(e,t){if(null==e)return{};var n,r,i=qk(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}qe(new re(zk,Kk,"PUBLIC").setMultipleInstances(!0)),Ze(Uk,Vk,""),Ze(Uk,Vk,"esm2017");var Gk=n(694),Qk=n.n(Gk),$k=n(184),Yk=["xxl","xl","lg","md","sm","xs"],Xk=e.createContext({prefixes:{},breakpoints:Yk,minBreakpoint:"xs"});Xk.Consumer,Xk.Provider;function Jk(t,n){var r=(0,e.useContext)(Xk).prefixes;return t||r[n]||n}function Zk(){return(0,e.useContext)(Xk).breakpoints}function eb(){return(0,e.useContext)(Xk).minBreakpoint}var tb=["bsPrefix","fluid","as","className"],nb=e.forwardRef((function(e,t){var n=e.bsPrefix,r=e.fluid,i=void 0!==r&&r,a=e.as,o=void 0===a?"div":a,s=e.className,u=Wk(e,tb),c=Jk(n,"container"),l="string"===typeof i?"-".concat(i):"-fluid";return(0,$k.jsx)(o,me(me({ref:t},u),{},{className:Qk()(s,i?"".concat(c).concat(l):c)}))}));nb.displayName="Container";var rb=nb,ib=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return null!=e?String(e):t||null},ab=e.createContext(null);function ob(){return ob=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},ob.apply(this,arguments)}n(176);function sb(e){return"default"+e.charAt(0).toUpperCase()+e.substr(1)}function ub(e){var t=function(e,t){if("object"!==typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===typeof t?t:String(t)}function cb(t,n){return Object.keys(n).reduce((function(r,i){var a,o=r,s=o[sb(i)],u=o[i],c=qk(o,[sb(i),i].map(ub)),l=n[i],f=function(t,n,r){var i=(0,e.useRef)(void 0!==t),a=(0,e.useState)(n),o=a[0],s=a[1],u=void 0!==t,c=i.current;return i.current=u,!u&&c&&o!==n&&s(n),[u?t:o,(0,e.useCallback)((function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];r&&r.apply(void 0,[e].concat(n)),s(e)}),[r])]}(u,s,t[l]),h=f[0],d=f[1];return ob({},c,((a={})[i]=h,a[l]=d,a))}),t)}function lb(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!==e&&void 0!==e&&this.setState(e)}function fb(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!==n&&void 0!==n?n:null}.bind(this))}function hb(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}lb.__suppressDeprecationWarning=!0,fb.__suppressDeprecationWarning=!0,hb.__suppressDeprecationWarning=!0;var db=/-(.)/g;var pb=["className","bsPrefix","as"],vb=function(e){return e[0].toUpperCase()+(t=e,t.replace(db,(function(e,t){return t.toUpperCase()}))).slice(1);var t};function mb(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.displayName,i=void 0===r?vb(t):r,a=n.Component,o=n.defaultProps,s=e.forwardRef((function(e,n){var r=e.className,i=e.bsPrefix,s=e.as,u=void 0===s?a||"div":s,c=Wk(e,pb),l=me(me({},o),c),f=Jk(i,t);return(0,$k.jsx)(u,me({ref:n,className:Qk()(r,f)},l))}));return s.displayName=i,s}var gb=["bsPrefix","className","as"],yb=e.forwardRef((function(e,t){var n=e.bsPrefix,r=e.className,i=e.as,a=Wk(e,gb);n=Jk(n,"navbar-brand");var o=i||(a.href?"a":"span");return(0,$k.jsx)(o,me(me({},a),{},{ref:t,className:Qk()(r,n)}))}));yb.displayName="NavbarBrand";var kb=yb;function bb(e){return e&&e.ownerDocument||document}function wb(e,t){return function(e){var t=bb(e);return t&&t.defaultView||window}(e).getComputedStyle(e,t)}var xb=/([A-Z])/g;var Eb=/^ms-/;function _b(e){return function(e){return e.replace(xb,"-$1").toLowerCase()}(e).replace(Eb,"-ms-")}var Sb=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;var Cb=function(e,t){var n="",r="";if("string"===typeof t)return e.style.getPropertyValue(_b(t))||wb(e).getPropertyValue(_b(t));Object.keys(t).forEach((function(i){var a=t[i];a||0===a?!function(e){return!(!e||!Sb.test(e))}(i)?n+=_b(i)+": "+a+";":r+=i+"("+a+") ":e.style.removeProperty(_b(i))})),r&&(n+="transform: "+r+";"),e.style.cssText+=";"+n};var Tb=n(164),Ib=!1,Nb=e.createContext(null),Ob="unmounted",Rb="exited",Pb="entering",Ab="entered",Db="exiting",Lb=function(t){var n,r;function i(e,n){var r;r=t.call(this,e,n)||this;var i,a=n&&!n.isMounting?e.enter:e.appear;return r.appearStatus=null,e.in?a?(i=Rb,r.appearStatus=Pb):i=Ab:i=e.unmountOnExit||e.mountOnEnter?Ob:Rb,r.state={status:i},r.nextCallback=null,r}r=t,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,E(n,r),i.getDerivedStateFromProps=function(e,t){return e.in&&t.status===Ob?{status:Rb}:null};var a=i.prototype;return a.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},a.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==Pb&&n!==Ab&&(t=Pb):n!==Pb&&n!==Ab||(t=Db)}this.updateStatus(!1,t)},a.componentWillUnmount=function(){this.cancelNextCallback()},a.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!==typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},a.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===Pb){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:Tb.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Rb&&this.setState({status:Ob})},a.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[Tb.findDOMNode(this),r],a=i[0],o=i[1],s=this.getTimeouts(),u=r?s.appear:s.enter;!e&&!n||Ib?this.safeSetState({status:Ab},(function(){t.props.onEntered(a)})):(this.props.onEnter(a,o),this.safeSetState({status:Pb},(function(){t.props.onEntering(a,o),t.onTransitionEnd(u,(function(){t.safeSetState({status:Ab},(function(){t.props.onEntered(a,o)}))}))})))},a.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:Tb.findDOMNode(this);t&&!Ib?(this.props.onExit(r),this.safeSetState({status:Db},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:Rb},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:Rb},(function(){e.props.onExited(r)}))},a.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},a.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},a.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},a.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:Tb.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=i[0],o=i[1];this.props.addEndListener(a,o)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},a.render=function(){var t=this.state.status;if(t===Ob)return null;var n=this.props,r=n.children,i=(n.in,n.mountOnEnter,n.unmountOnExit,n.appear,n.enter,n.exit,n.timeout,n.addEndListener,n.onEnter,n.onEntering,n.onEntered,n.onExit,n.onExiting,n.onExited,n.nodeRef,qk(n,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return e.createElement(Nb.Provider,{value:null},"function"===typeof r?r(t,i):e.cloneElement(e.Children.only(r),i))},i}(e.Component);function Mb(){}Lb.contextType=Nb,Lb.propTypes={},Lb.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Mb,onEntering:Mb,onEntered:Mb,onExit:Mb,onExiting:Mb,onExited:Mb},Lb.UNMOUNTED=Ob,Lb.EXITED=Rb,Lb.ENTERING=Pb,Lb.ENTERED=Ab,Lb.EXITING=Db;var jb=Lb,Fb=!("undefined"===typeof window||!window.document||!window.document.createElement),Ub=!1,Vb=!1;try{var zb={get passive(){return Ub=!0},get once(){return Vb=Ub=!0}};Fb&&(window.addEventListener("test",zb,zb),window.removeEventListener("test",zb,!0))}catch(TT){}var Bb=function(e,t,n,r){if(r&&"boolean"!==typeof r&&!Vb){var i=r.once,a=r.capture,o=n;!Vb&&i&&(o=n.__once||function e(r){this.removeEventListener(t,e,a),n.call(this,r)},n.__once=o),e.addEventListener(t,o,Ub?r:a)}e.addEventListener(t,n,r)};var Hb=function(e,t,n,r){var i=r&&"boolean"!==typeof r?r.capture:r;e.removeEventListener(t,n,i),n.__once&&e.removeEventListener(t,n.__once,i)};var Kb=function(e,t,n,r){return Bb(e,t,n,r),function(){Hb(e,t,n,r)}};function qb(e,t,n){void 0===n&&(n=5);var r=!1,i=setTimeout((function(){r||function(e,t,n,r){if(void 0===n&&(n=!1),void 0===r&&(r=!0),e){var i=document.createEvent("HTMLEvents");i.initEvent(t,n,r),e.dispatchEvent(i)}}(e,"transitionend",!0)}),t+n),a=Kb(e,"transitionend",(function(){r=!0}),{once:!0});return function(){clearTimeout(i),a()}}function Wb(e,t,n,r){null==n&&(n=function(e){var t=Cb(e,"transitionDuration")||"",n=-1===t.indexOf("ms")?1e3:1;return parseFloat(t)*n}(e)||0);var i=qb(e,n,r),a=Kb(e,"transitionend",t);return function(){i(),a()}}function Gb(e,t){var n=Cb(e,t)||"",r=-1===n.indexOf("ms")?1e3:1;return parseFloat(n)*r}function Qb(e,t){var n=Gb(e,"transitionDuration"),r=Gb(e,"transitionDelay"),i=Wb(e,(function(n){n.target===e&&(i(),t(n))}),n+r)}var $b=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((function(e){return null!=e})).reduce((function(e,t){if("function"!==typeof t)throw new Error("Invalid Argument Type, must only provide functions, undefined, or null.");return null===e?t:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r),t.apply(this,r)}}),null)};function Yb(e){e.offsetHeight}var Xb=function(e){return e&&"function"!==typeof e?function(t){e.current=t}:e};var Jb=function(t,n){return(0,e.useMemo)((function(){return function(e,t){var n=Xb(e),r=Xb(t);return function(e){n&&n(e),r&&r(e)}}(t,n)}),[t,n])};var Zb,ew=["onEnter","onEntering","onEntered","onExit","onExiting","onExited","addEndListener","children","childRef"],tw=e.forwardRef((function(t,n){var r=t.onEnter,i=t.onEntering,a=t.onEntered,o=t.onExit,s=t.onExiting,u=t.onExited,c=t.addEndListener,l=t.children,f=t.childRef,h=Wk(t,ew),d=(0,e.useRef)(null),p=Jb(d,f),v=function(e){var t;p((t=e)&&"setState"in t?Tb.findDOMNode(t):null!=t?t:null)},m=function(e){return function(t){e&&d.current&&e(d.current,t)}},g=(0,e.useCallback)(m(r),[r]),y=(0,e.useCallback)(m(i),[i]),k=(0,e.useCallback)(m(a),[a]),b=(0,e.useCallback)(m(o),[o]),w=(0,e.useCallback)(m(s),[s]),x=(0,e.useCallback)(m(u),[u]),E=(0,e.useCallback)(m(c),[c]);return(0,$k.jsx)(jb,me(me({ref:n},h),{},{onEnter:g,onEntered:k,onEntering:y,onExit:b,onExited:x,onExiting:w,addEndListener:E,nodeRef:d,children:"function"===typeof l?function(e,t){return l(e,me(me({},t),{},{ref:v}))}:e.cloneElement(l,{ref:v})}))})),nw=tw,rw=["onEnter","onEntering","onEntered","onExit","onExiting","className","children","dimension","in","timeout","mountOnEnter","unmountOnExit","appear","getDimensionValue"],iw={height:["marginTop","marginBottom"],width:["marginLeft","marginRight"]};function aw(e,t){var n=t["offset".concat(e[0].toUpperCase()).concat(e.slice(1))],r=iw[e];return n+parseInt(Cb(t,r[0]),10)+parseInt(Cb(t,r[1]),10)}var ow=(y(Zb={},Rb,"collapse"),y(Zb,Db,"collapsing"),y(Zb,Pb,"collapsing"),y(Zb,Ab,"collapse show"),Zb),sw=e.forwardRef((function(t,n){var r=t.onEnter,i=t.onEntering,a=t.onEntered,o=t.onExit,s=t.onExiting,u=t.className,c=t.children,l=t.dimension,f=void 0===l?"height":l,h=t.in,d=void 0!==h&&h,p=t.timeout,v=void 0===p?300:p,m=t.mountOnEnter,g=void 0!==m&&m,y=t.unmountOnExit,k=void 0!==y&&y,b=t.appear,w=void 0!==b&&b,x=t.getDimensionValue,E=void 0===x?aw:x,_=Wk(t,rw),S="function"===typeof f?f():f,C=(0,e.useMemo)((function(){return $b((function(e){e.style[S]="0"}),r)}),[S,r]),T=(0,e.useMemo)((function(){return $b((function(e){var t="scroll".concat(S[0].toUpperCase()).concat(S.slice(1));e.style[S]="".concat(e[t],"px")}),i)}),[S,i]),I=(0,e.useMemo)((function(){return $b((function(e){e.style[S]=null}),a)}),[S,a]),N=(0,e.useMemo)((function(){return $b((function(e){e.style[S]="".concat(E(S,e),"px"),Yb(e)}),o)}),[o,E,S]),O=(0,e.useMemo)((function(){return $b((function(e){e.style[S]=null}),s)}),[S,s]);return(0,$k.jsx)(nw,me(me({ref:n,addEndListener:Qb},_),{},{"aria-expanded":_.role?d:null,onEnter:C,onEntering:T,onEntered:I,onExit:N,onExiting:O,childRef:c.ref,in:d,timeout:v,mountOnEnter:g,unmountOnExit:k,appear:w,children:function(t,n){return e.cloneElement(c,me(me({},n),{},{className:Qk()(u,c.props.className,ow[t],"width"===S&&"collapse-horizontal")}))}}))})),uw=sw,cw=e.createContext(null);cw.displayName="NavbarContext";var lw=cw,fw=["children","bsPrefix"],hw=e.forwardRef((function(t,n){var r=t.children,i=t.bsPrefix,a=Wk(t,fw);i=Jk(i,"navbar-collapse");var o=(0,e.useContext)(lw);return(0,$k.jsx)(uw,me(me({in:!(!o||!o.expanded)},a),{},{children:(0,$k.jsx)("div",{ref:n,className:i,children:r})}))}));hw.displayName="NavbarCollapse";var dw=hw;var pw=function(t){var n=(0,e.useRef)(t);return(0,e.useEffect)((function(){n.current=t}),[t]),n};function vw(t){var n=pw(t);return(0,e.useCallback)((function(){return n.current&&n.current.apply(n,arguments)}),[n])}var mw=["bsPrefix","className","children","label","as","onClick"],gw=e.forwardRef((function(t,n){var r=t.bsPrefix,i=t.className,a=t.children,o=t.label,s=void 0===o?"Toggle navigation":o,u=t.as,c=void 0===u?"button":u,l=t.onClick,f=Wk(t,mw);r=Jk(r,"navbar-toggler");var h=(0,e.useContext)(lw)||{},d=h.onToggle,p=h.expanded,v=vw((function(e){l&&l(e),d&&d()}));return"button"===c&&(f.type="button"),(0,$k.jsx)(c,me(me({},f),{},{ref:n,onClick:v,"aria-label":s,className:Qk()(i,r,!p&&"collapsed"),children:a||(0,$k.jsx)("span",{className:"".concat(r,"-icon")})}))}));gw.displayName="NavbarToggle";var yw=gw,kw="undefined"!==typeof n.g&&n.g.navigator&&"ReactNative"===n.g.navigator.product,bw="undefined"!==typeof document||kw?e.useLayoutEffect:e.useEffect,ww=new WeakMap,xw=function(e,t){if(e&&t){var n=ww.get(t)||new Map;ww.set(t,n);var r=n.get(e);return r||((r=t.matchMedia(e)).refCount=0,n.set(r.media,r)),r}};function Ew(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"undefined"===typeof window?void 0:window,r=xw(t,n),i=h((0,e.useState)((function(){return!!r&&r.matches})),2),a=i[0],o=i[1];return bw((function(){var e=xw(t,n);if(!e)return o(!1);var r=ww.get(n),i=function(){o(e.matches)};return e.refCount++,e.addListener(i),i(),function(){e.removeListener(i),e.refCount--,e.refCount<=0&&(null==r||r.delete(e.media)),e=void 0}}),[t]),a}var _w=function(t){var n=Object.keys(t);function r(e,t){return e===t?t:e?"".concat(e," and ").concat(t):t}function i(e){var r=function(e){return n[Math.min(n.indexOf(e)+1,n.length-1)]}(e),i=t[r];return i="number"===typeof i?"".concat(i-.2,"px"):"calc(".concat(i," - 0.2px)"),"(max-width: ".concat(i,")")}return function(n,a,o){var s;"object"===typeof n?(s=n,o=a,a=!0):s=y({},n,a=a||!0);var u=(0,e.useMemo)((function(){return Object.entries(s).reduce((function(e,n){var a=h(n,2),o=a[0],s=a[1];return"up"!==s&&!0!==s||(e=r(e,function(e){var n=t[e];return"number"===typeof n&&(n="".concat(n,"px")),"(min-width: ".concat(n,")")}(o))),"down"!==s&&!0!==s||(e=r(e,i(o))),e}),"")}),[JSON.stringify(s)]);return Ew(u,o)}}({xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400}),Sw=_w;function Cw(e){void 0===e&&(e=bb());try{var t=e.activeElement;return t&&t.nodeName?t:null}catch(TT){return e.body}}function Tw(e,t){return e.contains?e.contains(t):e.compareDocumentPosition?e===t||!!(16&e.compareDocumentPosition(t)):void 0}function Iw(){var t=(0,e.useRef)(!0),n=(0,e.useRef)((function(){return t.current}));return(0,e.useEffect)((function(){return t.current=!0,function(){t.current=!1}}),[]),n.current}function Nw(t){var n=function(t){var n=(0,e.useRef)(t);return n.current=t,n}(t);(0,e.useEffect)((function(){return function(){return n.current()}}),[])}function Ow(t){var n=(0,e.useRef)(null);return(0,e.useEffect)((function(){n.current=t})),n.current}var Rw="data-rr-ui-";function Pw(e){return"".concat(Rw).concat(e)}var Aw=Pw("modal-open"),Dw=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.ownerDocument,r=t.handleContainerOverflow,i=void 0===r||r,a=t.isRTL,o=void 0!==a&&a;k(this,e),this.handleContainerOverflow=i,this.isRTL=o,this.modals=[],this.ownerDocument=n}return w(e,[{key:"getScrollbarWidth",value:function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=e.defaultView;return Math.abs(t.innerWidth-e.documentElement.clientWidth)}(this.ownerDocument)}},{key:"getElement",value:function(){return(this.ownerDocument||document).body}},{key:"setModalAttributes",value:function(e){}},{key:"removeModalAttributes",value:function(e){}},{key:"setContainerStyle",value:function(e){var t={overflow:"hidden"},n=this.isRTL?"paddingLeft":"paddingRight",r=this.getElement();e.style=y({overflow:r.style.overflow},n,r.style[n]),e.scrollBarWidth&&(t[n]="".concat(parseInt(Cb(r,n)||"0",10)+e.scrollBarWidth,"px")),r.setAttribute(Aw,""),Cb(r,t)}},{key:"reset",value:function(){var e=this;v(this.modals).forEach((function(t){return e.remove(t)}))}},{key:"removeContainerStyle",value:function(e){var t=this.getElement();t.removeAttribute(Aw),Object.assign(t.style,e.style)}},{key:"add",value:function(e){var t=this.modals.indexOf(e);return-1!==t?t:(t=this.modals.length,this.modals.push(e),this.setModalAttributes(e),0!==t||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),t)}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);-1!==t&&(this.modals.splice(t,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(e))}},{key:"isTopModal",value:function(e){return!!this.modals.length&&this.modals[this.modals.length-1]===e}}]),e}(),Lw=Dw,Mw=(0,e.createContext)(Fb?window:void 0);Mw.Provider;function jw(){return(0,e.useContext)(Mw)}var Fw=function(e,t){return Fb?null==e?(t||bb()).body:("function"===typeof e&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect)?e:null):null};var Uw=function(t){var n=t.children,r=t.in,i=t.onExited,a=t.mountOnEnter,o=t.unmountOnExit,s=(0,e.useRef)(null),u=(0,e.useRef)(r),c=vw(i);(0,e.useEffect)((function(){r?u.current=!0:c(s.current)}),[r,c]);var l=Jb(s,n.ref),f=(0,e.cloneElement)(n,{ref:l});return r?f:o||!u.current&&a?null:f};function Vw(t){var n=t.children,r=t.in,i=t.onExited,a=t.onEntered,o=t.transition,s=h((0,e.useState)(!r),2),u=s[0],c=s[1];r&&u&&c(!1);var l=function(t){var n=t.in,r=t.onTransition,i=(0,e.useRef)(null),a=(0,e.useRef)(!0),o=vw(r);return bw((function(){if(i.current){var e=!1;return o({in:n,element:i.current,initial:a.current,isStale:function(){return e}}),function(){e=!0}}}),[n,o]),bw((function(){return a.current=!1,function(){a.current=!0}}),[]),i}({in:!!r,onTransition:function(e){Promise.resolve(o(e)).then((function(){e.isStale()||(e.in?null==a||a(e.element,e.initial):(c(!0),null==i||i(e.element)))}),(function(t){throw e.in||c(!0),t}))}}),f=Jb(l,n.ref);return u&&!r?null:(0,e.cloneElement)(n,{ref:f})}function zw(e,t,n){return e?(0,$k.jsx)(e,Object.assign({},n)):t?(0,$k.jsx)(Vw,Object.assign({},n,{transition:t})):(0,$k.jsx)(Uw,Object.assign({},n))}var Bw,Hw=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];function Kw(t){var n=jw(),r=t||function(e){return Bw||(Bw=new Lw({ownerDocument:null==e?void 0:e.document})),Bw}(n),i=(0,e.useRef)({dialog:null,backdrop:null});return Object.assign(i.current,{add:function(){return r.add(i.current)},remove:function(){return r.remove(i.current)},isTopModal:function(){return r.isTopModal(i.current)},setDialogRef:(0,e.useCallback)((function(e){i.current.dialog=e}),[]),setBackdropRef:(0,e.useCallback)((function(e){i.current.backdrop=e}),[])})}var qw=(0,e.forwardRef)((function(t,n){var r=t.show,i=void 0!==r&&r,a=t.role,o=void 0===a?"dialog":a,s=t.className,u=t.style,c=t.children,l=t.backdrop,f=void 0===l||l,d=t.keyboard,p=void 0===d||d,v=t.onBackdropClick,m=t.onEscapeKeyDown,g=t.transition,y=t.runTransition,k=t.backdropTransition,b=t.runBackdropTransition,w=t.autoFocus,x=void 0===w||w,E=t.enforceFocus,_=void 0===E||E,S=t.restoreFocus,C=void 0===S||S,T=t.restoreFocusOptions,I=t.renderDialog,N=t.renderBackdrop,O=void 0===N?function(e){return(0,$k.jsx)("div",Object.assign({},e))}:N,R=t.manager,P=t.container,A=t.onShow,D=t.onHide,L=void 0===D?function(){}:D,M=t.onExit,j=t.onExited,F=t.onExiting,U=t.onEnter,V=t.onEntering,z=t.onEntered,B=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}(t,Hw),H=jw(),K=function(t,n){var r=jw(),i=h((0,e.useState)((function(){return Fw(t,null==r?void 0:r.document)})),2),a=i[0],o=i[1];if(!a){var s=Fw(t);s&&o(s)}return(0,e.useEffect)((function(){n&&a&&n(a)}),[n,a]),(0,e.useEffect)((function(){var e=Fw(t);e!==a&&o(e)}),[t,a]),a}(P),q=Kw(R),W=Iw(),G=Ow(i),Q=h((0,e.useState)(!i),2),$=Q[0],Y=Q[1],X=(0,e.useRef)(null);(0,e.useImperativeHandle)(n,(function(){return q}),[q]),Fb&&!G&&i&&(X.current=Cw(null==H?void 0:H.document)),i&&$&&Y(!1);var J=vw((function(){if(q.add(),ie.current=Kb(document,"keydown",ne),re.current=Kb(document,"focus",(function(){return setTimeout(ee)}),!0),A&&A(),x){var e,t,n=Cw(null!=(e=null==(t=q.dialog)?void 0:t.ownerDocument)?e:null==H?void 0:H.document);q.dialog&&n&&!Tw(q.dialog,n)&&(X.current=n,q.dialog.focus())}})),Z=vw((function(){var e;(q.remove(),null==ie.current||ie.current(),null==re.current||re.current(),C)&&(null==(e=X.current)||null==e.focus||e.focus(T),X.current=null)}));(0,e.useEffect)((function(){i&&K&&J()}),[i,K,J]),(0,e.useEffect)((function(){$&&Z()}),[$,Z]),Nw((function(){Z()}));var ee=vw((function(){if(_&&W()&&q.isTopModal()){var e=Cw(null==H?void 0:H.document);q.dialog&&e&&!Tw(q.dialog,e)&&q.dialog.focus()}})),te=vw((function(e){e.target===e.currentTarget&&(null==v||v(e),!0===f&&L())})),ne=vw((function(e){p&&function(e){return"Escape"===e.code||27===e.keyCode}(e)&&q.isTopModal()&&(null==m||m(e),e.defaultPrevented||L())})),re=(0,e.useRef)(),ie=(0,e.useRef)();if(!K)return null;var ae=Object.assign({role:o,ref:q.setDialogRef,"aria-modal":"dialog"===o||void 0},B,{style:u,className:s,tabIndex:-1}),oe=I?I(ae):(0,$k.jsx)("div",Object.assign({},ae,{children:e.cloneElement(c,{role:"document"})}));oe=zw(g,y,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!i,onExit:M,onExiting:F,onExited:function(){Y(!0),null==j||j.apply(void 0,arguments)},onEnter:U,onEntering:V,onEntered:z,children:oe});var se=null;return f&&(se=O({ref:q.setBackdropRef,onClick:te}),se=zw(k,b,{in:!!i,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:se})),(0,$k.jsx)($k.Fragment,{children:Tb.createPortal((0,$k.jsxs)($k.Fragment,{children:[se,oe]}),K)})}));qw.displayName="Modal";var Ww,Gw=Object.assign(qw,{Manager:Lw}),Qw=["className","children","transitionClasses","onEnter"],$w=(y(Ww={},Pb,"show"),y(Ww,Ab,"show"),Ww),Yw=e.forwardRef((function(t,n){var r=t.className,i=t.children,a=t.transitionClasses,o=void 0===a?{}:a,s=t.onEnter,u=me({in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1},Wk(t,Qw)),c=(0,e.useCallback)((function(e,t){Yb(e),null==s||s(e,t)}),[s]);return(0,$k.jsx)(nw,me(me({ref:n,addEndListener:Qb},u),{},{onEnter:c,childRef:i.ref,children:function(t,n){return e.cloneElement(i,me(me({},n),{},{className:Qk()("fade",r,i.props.className,$w[t],o[t])}))}}))}));Yw.displayName="Fade";var Xw,Jw=Yw,Zw=mb("offcanvas-body"),ex=["bsPrefix","className","children","in","mountOnEnter","unmountOnExit","appear"],tx=(y(Xw={},Pb,"show"),y(Xw,Ab,"show"),Xw),nx=e.forwardRef((function(t,n){var r=t.bsPrefix,i=t.className,a=t.children,o=t.in,s=void 0!==o&&o,u=t.mountOnEnter,c=void 0!==u&&u,l=t.unmountOnExit,f=void 0!==l&&l,h=t.appear,d=void 0!==h&&h,p=Wk(t,ex);return r=Jk(r,"offcanvas"),(0,$k.jsx)(nw,me(me({ref:n,addEndListener:Qb,in:s,mountOnEnter:c,unmountOnExit:f,appear:d},p),{},{childRef:a.ref,children:function(t,n){return e.cloneElement(a,me(me({},n),{},{className:Qk()(i,a.props.className,(t===Pb||t===Db)&&"".concat(r,"-toggling"),tx[t])}))}}))}));nx.displayName="OffcanvasToggling";var rx=nx,ix=e.createContext({onHide:function(){}}),ax=n(7),ox=n.n(ax),sx=["className","variant","aria-label"],ux={"aria-label":ox().string,onClick:ox().func,variant:ox().oneOf(["white"])},cx=e.forwardRef((function(e,t){var n=e.className,r=e.variant,i=e["aria-label"],a=void 0===i?"Close":i,o=Wk(e,sx);return(0,$k.jsx)("button",me({ref:t,type:"button",className:Qk()("btn-close",r&&"btn-close-".concat(r),n),"aria-label":a},o))}));cx.displayName="CloseButton",cx.propTypes=ux;var lx=cx,fx=["closeLabel","closeVariant","closeButton","onHide","children"],hx=e.forwardRef((function(t,n){var r=t.closeLabel,i=void 0===r?"Close":r,a=t.closeVariant,o=t.closeButton,s=void 0!==o&&o,u=t.onHide,c=t.children,l=Wk(t,fx),f=(0,e.useContext)(ix),h=vw((function(){null==f||f.onHide(),null==u||u()}));return(0,$k.jsxs)("div",me(me({ref:n},l),{},{children:[c,s&&(0,$k.jsx)(lx,{"aria-label":i,variant:a,onClick:h})]}))})),dx=hx,px=["bsPrefix","className","closeLabel","closeButton"],vx=e.forwardRef((function(e,t){var n=e.bsPrefix,r=e.className,i=e.closeLabel,a=void 0===i?"Close":i,o=e.closeButton,s=void 0!==o&&o,u=Wk(e,px);return n=Jk(n,"offcanvas-header"),(0,$k.jsx)(dx,me(me({ref:t},u),{},{className:Qk()(r,n),closeLabel:a,closeButton:s}))}));vx.displayName="OffcanvasHeader";var mx=vx,gx=function(t){return e.forwardRef((function(e,n){return(0,$k.jsx)("div",me(me({},e),{},{ref:n,className:Qk()(e.className,t)}))}))},yx=mb("offcanvas-title",{Component:gx("h5")});var kx=Function.prototype.bind.call(Function.prototype.call,[].slice);function bx(e,t){return kx(e.querySelectorAll(t))}function wx(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var xx,Ex=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",_x=".sticky-top",Sx=".navbar-toggler",Cx=function(e){_(n,e);var t=T(n);function n(){return k(this,n),t.apply(this,arguments)}return w(n,[{key:"adjustAndStore",value:function(e,t,n){var r=t.style[e];t.dataset[e]=r,Cb(t,y({},e,"".concat(parseFloat(Cb(t,e))+n,"px")))}},{key:"restore",value:function(e,t){var n=t.dataset[e];void 0!==n&&(delete t.dataset[e],Cb(t,y({},e,n)))}},{key:"setContainerStyle",value:function(e){var t=this;Nn(S(n.prototype),"setContainerStyle",this).call(this,e);var r,i,a=this.getElement();if(i="modal-open",(r=a).classList?r.classList.add(i):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(r,i)||("string"===typeof r.className?r.className=r.className+" "+i:r.setAttribute("class",(r.className&&r.className.baseVal||"")+" "+i)),e.scrollBarWidth){var o=this.isRTL?"paddingLeft":"paddingRight",s=this.isRTL?"marginLeft":"marginRight";bx(a,Ex).forEach((function(n){return t.adjustAndStore(o,n,e.scrollBarWidth)})),bx(a,_x).forEach((function(n){return t.adjustAndStore(s,n,-e.scrollBarWidth)})),bx(a,Sx).forEach((function(n){return t.adjustAndStore(s,n,e.scrollBarWidth)}))}}},{key:"removeContainerStyle",value:function(e){var t=this;Nn(S(n.prototype),"removeContainerStyle",this).call(this,e);var r,i,a=this.getElement();i="modal-open",(r=a).classList?r.classList.remove(i):"string"===typeof r.className?r.className=wx(r.className,i):r.setAttribute("class",wx(r.className&&r.className.baseVal||"",i));var o=this.isRTL?"paddingLeft":"paddingRight",s=this.isRTL?"marginLeft":"marginRight";bx(a,Ex).forEach((function(e){return t.restore(o,e)})),bx(a,_x).forEach((function(e){return t.restore(s,e)})),bx(a,Sx).forEach((function(e){return t.restore(s,e)}))}}]),n}(Lw);var Tx=Cx,Ix=["bsPrefix","className","children","aria-labelledby","placement","responsive","show","backdrop","keyboard","scroll","onEscapeKeyDown","onShow","onHide","container","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","onEntered","onExit","onExiting","onEnter","onEntering","onExited","backdropClassName","manager","renderStaticNode"];function Nx(e){return(0,$k.jsx)(rx,me({},e))}function Ox(e){return(0,$k.jsx)(Jw,me({},e))}var Rx=e.forwardRef((function(t,n){var r=t.bsPrefix,i=t.className,a=t.children,o=t["aria-labelledby"],s=t.placement,u=void 0===s?"start":s,c=t.responsive,l=t.show,f=void 0!==l&&l,d=t.backdrop,p=void 0===d||d,v=t.keyboard,m=void 0===v||v,g=t.scroll,y=void 0!==g&&g,k=t.onEscapeKeyDown,b=t.onShow,w=t.onHide,x=t.container,E=t.autoFocus,_=void 0===E||E,S=t.enforceFocus,C=void 0===S||S,T=t.restoreFocus,I=void 0===T||T,N=t.restoreFocusOptions,O=t.onEntered,R=t.onExit,P=t.onExiting,A=t.onEnter,D=t.onEntering,L=t.onExited,M=t.backdropClassName,j=t.manager,F=t.renderStaticNode,U=void 0!==F&&F,V=Wk(t,Ix),z=(0,e.useRef)();r=Jk(r,"offcanvas");var B=((0,e.useContext)(lw)||{}).onToggle,H=h((0,e.useState)(!1),2),K=H[0],q=H[1],W=Sw(c||"xs","up");(0,e.useEffect)((function(){q(c?f&&!W:f)}),[f,c,W]);var G=vw((function(){null==B||B(),null==w||w()})),Q=(0,e.useMemo)((function(){return{onHide:G}}),[G]);var $=(0,e.useCallback)((function(e){return(0,$k.jsx)("div",me(me({},e),{},{className:Qk()("".concat(r,"-backdrop"),M)}))}),[M,r]),Y=function(e){return(0,$k.jsx)("div",me(me(me({},e),V),{},{className:Qk()(i,c?"".concat(r,"-").concat(c):r,"".concat(r,"-").concat(u)),"aria-labelledby":o,children:a}))};return(0,$k.jsxs)($k.Fragment,{children:[!K&&(c||U)&&Y({}),(0,$k.jsx)(ix.Provider,{value:Q,children:(0,$k.jsx)(Gw,{show:K,ref:n,backdrop:p,container:x,keyboard:m,autoFocus:_,enforceFocus:C&&!y,restoreFocus:I,restoreFocusOptions:N,onEscapeKeyDown:k,onShow:b,onHide:G,onEnter:function(e){e&&(e.style.visibility="visible");for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];null==A||A.apply(void 0,[e].concat(n))},onEntering:D,onEntered:O,onExit:R,onExiting:P,onExited:function(e){e&&(e.style.visibility="");for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];null==L||L.apply(void 0,n)},manager:j||(y?(z.current||(z.current=new Tx({handleContainerOverflow:!1})),z.current):function(e){return xx||(xx=new Cx(e)),xx}()),transition:Nx,backdropTransition:Ox,renderBackdrop:$,renderDialog:Y})})]})}));Rx.displayName="Offcanvas";var Px=Object.assign(Rx,{Body:Zw,Header:mx,Title:yx}),Ax=e.forwardRef((function(t,n){var r=(0,e.useContext)(lw);return(0,$k.jsx)(Px,me(me({ref:n,show:!(null==r||!r.expanded)},t),{},{renderStaticNode:!0}))}));Ax.displayName="NavbarOffcanvas";var Dx=Ax,Lx=["bsPrefix","expand","variant","bg","fixed","sticky","className","as","expanded","onToggle","onSelect","collapseOnSelect"],Mx=mb("navbar-text",{Component:"span"}),jx=e.forwardRef((function(t,n){var r=cb(t,{expanded:"onToggle"}),i=r.bsPrefix,a=r.expand,o=void 0===a||a,s=r.variant,u=void 0===s?"light":s,c=r.bg,l=r.fixed,f=r.sticky,h=r.className,d=r.as,p=void 0===d?"nav":d,v=r.expanded,m=r.onToggle,g=r.onSelect,y=r.collapseOnSelect,k=void 0!==y&&y,b=Wk(r,Lx),w=Jk(i,"navbar"),x=(0,e.useCallback)((function(){null==g||g.apply(void 0,arguments),k&&v&&(null==m||m(!1))}),[g,k,v,m]);void 0===b.role&&"nav"!==p&&(b.role="navigation");var E="".concat(w,"-expand");"string"===typeof o&&(E="".concat(E,"-").concat(o));var _=(0,e.useMemo)((function(){return{onToggle:function(){return null==m?void 0:m(!v)},bsPrefix:w,expanded:!!v,expand:o}}),[w,v,o,m]);return(0,$k.jsx)(lw.Provider,{value:_,children:(0,$k.jsx)(ab.Provider,{value:x,children:(0,$k.jsx)(p,me(me({ref:n},b),{},{className:Qk()(h,w,o&&E,u&&"".concat(w,"-").concat(u),c&&"bg-".concat(c),f&&"sticky-".concat(f),l&&"fixed-".concat(l))}))})})}));jx.displayName="Navbar";var Fx=Object.assign(jx,{Brand:kb,Collapse:dw,Offcanvas:Dx,Text:Mx,Toggle:yw});n(573);function Ux(){return h((0,e.useReducer)((function(e){return!e}),!1),2)[1]}var Vx=e.createContext(null);Vx.displayName="NavContext";var zx=Vx,Bx=e.createContext(null),Hx=["as","disabled"];function Kx(e){var t=e.tagName,n=e.disabled,r=e.href,i=e.target,a=e.rel,o=e.role,s=e.onClick,u=e.tabIndex,c=void 0===u?0:u,l=e.type;t||(t=null!=r||null!=i||null!=a?"a":"button");var f={tagName:t};if("button"===t)return[{type:l||"button",disabled:n},f];var h=function(e){(n||"a"===t&&function(e){return!e||"#"===e.trim()}(r))&&e.preventDefault(),n?e.stopPropagation():null==s||s(e)};return"a"===t&&(r||(r="#"),n&&(r=void 0)),[{role:null!=o?o:"button",disabled:void 0,tabIndex:n?void 0:c,href:r,target:"a"===t?i:void 0,"aria-disabled":n||void 0,rel:"a"===t?a:void 0,onClick:h,onKeyDown:function(e){" "===e.key&&(e.preventDefault(),h(e))}},f]}var qx=e.forwardRef((function(e,t){var n=e.as,r=e.disabled,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,Hx),a=h(Kx(Object.assign({tagName:n,disabled:r},i)),2),o=a[0],s=a[1].tagName;return(0,$k.jsx)(s,Object.assign({},i,o,{ref:t}))}));qx.displayName="Button";var Wx=qx,Gx=["as","active","eventKey"];function Qx(t){var n=t.key,r=t.onClick,i=t.active,a=t.id,o=t.role,s=t.disabled,u=(0,e.useContext)(ab),c=(0,e.useContext)(zx),l=(0,e.useContext)(Bx),f=i,h={role:o};if(c){o||"tablist"!==c.role||(h.role="tab");var d=c.getControllerId(null!=n?n:null),p=c.getControlledId(null!=n?n:null);h[Pw("event-key")]=n,h.id=d||a,!(f=null==i&&null!=n?c.activeKey===n:i)&&(null!=l&&l.unmountOnExit||null!=l&&l.mountOnEnter)||(h["aria-controls"]=p)}return"tab"===h.role&&(h["aria-selected"]=f,f||(h.tabIndex=-1),s&&(h.tabIndex=-1,h["aria-disabled"]=!0)),h.onClick=vw((function(e){s||(null==r||r(e),null!=n&&u&&!e.isPropagationStopped()&&u(n,e))})),[h,{isActive:f}]}var $x=e.forwardRef((function(e,t){var n=e.as,r=void 0===n?Wx:n,i=e.active,a=e.eventKey,o=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,Gx),s=h(Qx(Object.assign({key:ib(a,o.href),active:i},o)),2),u=s[0],c=s[1];return u[Pw("active")]=c.isActive,(0,$k.jsx)(r,Object.assign({},o,u,{ref:t}))}));$x.displayName="NavItem";var Yx=$x,Xx=["as","onSelect","activeKey","role","onKeyDown"];var Jx=function(){},Zx=Pw("event-key"),eE=e.forwardRef((function(t,n){var r,i,a=t.as,o=void 0===a?"div":a,s=t.onSelect,u=t.activeKey,c=t.role,l=t.onKeyDown,f=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}(t,Xx),h=Ux(),d=(0,e.useRef)(!1),p=(0,e.useContext)(ab),v=(0,e.useContext)(Bx);v&&(c=c||"tablist",u=v.activeKey,r=v.getControlledId,i=v.getControllerId);var m=(0,e.useRef)(null),g=function(e){var t=m.current;if(!t)return null;var n=bx(t,"[".concat(Zx,"]:not([aria-disabled=true])")),r=t.querySelector("[aria-selected=true]");if(!r||r!==document.activeElement)return null;var i=n.indexOf(r);if(-1===i)return null;var a=i+e;return a>=n.length&&(a=0),a<0&&(a=n.length-1),n[a]},y=function(e,t){null!=e&&(null==s||s(e,t),null==p||p(e,t))};(0,e.useEffect)((function(){if(m.current&&d.current){var e=m.current.querySelector("[".concat(Zx,"][aria-selected=true]"));null==e||e.focus()}d.current=!1}));var k=Jb(n,m);return(0,$k.jsx)(ab.Provider,{value:y,children:(0,$k.jsx)(zx.Provider,{value:{role:c,activeKey:ib(u),getControlledId:r||Jx,getControllerId:i||Jx},children:(0,$k.jsx)(o,Object.assign({},f,{onKeyDown:function(e){if(null==l||l(e),v){var t,n;switch(e.key){case"ArrowLeft":case"ArrowUp":t=g(-1);break;case"ArrowRight":case"ArrowDown":t=g(1);break;default:return}if(t)e.preventDefault(),y(t.dataset[(n="EventKey","".concat("rrUi").concat(n))]||null,e),d.current=!0,h()}},ref:k,role:c}))})})}));eE.displayName="Nav";var tE=Object.assign(eE,{Item:Yx}),nE=e.createContext(null);nE.displayName="CardHeaderContext";var rE=nE,iE=mb("nav-item");new WeakMap;var aE=["onKeyDown"];var oE=e.forwardRef((function(e,t){var n,r=e.onKeyDown,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,aE),a=h(Kx(Object.assign({tagName:"a"},i)),1)[0],o=vw((function(e){a.onKeyDown(e),null==r||r(e)}));return(n=i.href)&&"#"!==n.trim()&&"button"!==i.role?(0,$k.jsx)("a",Object.assign({ref:t},i,{onKeyDown:r})):(0,$k.jsx)("a",Object.assign({ref:t},i,a,{onKeyDown:o}))}));oE.displayName="Anchor";var sE=oE,uE=["bsPrefix","className","as","active","eventKey","disabled"],cE=e.forwardRef((function(e,t){var n=e.bsPrefix,r=e.className,i=e.as,a=void 0===i?sE:i,o=e.active,s=e.eventKey,u=e.disabled,c=void 0!==u&&u,l=Wk(e,uE);n=Jk(n,"nav-link");var f=h(Qx(me({key:ib(s,l.href),active:o,disabled:c},l)),2),d=f[0],p=f[1];return(0,$k.jsx)(a,me(me(me({},l),d),{},{ref:t,disabled:c,className:Qk()(r,n,c&&"disabled",p.isActive&&"active")}))}));cE.displayName="NavLink";var lE=cE,fE=["as","bsPrefix","variant","fill","justify","navbar","navbarScroll","className","activeKey"],hE=e.forwardRef((function(t,n){var r,i,a,o=cb(t,{activeKey:"onSelect"}),s=o.as,u=void 0===s?"div":s,c=o.bsPrefix,l=o.variant,f=o.fill,h=void 0!==f&&f,d=o.justify,p=void 0!==d&&d,v=o.navbar,m=o.navbarScroll,g=o.className,k=o.activeKey,b=Wk(o,fE),w=Jk(c,"nav"),x=!1,E=(0,e.useContext)(lw),_=(0,e.useContext)(rE);return E?(i=E.bsPrefix,x=null==v||v):_&&(a=_.cardHeaderBsPrefix),(0,$k.jsx)(tE,me({as:u,ref:n,activeKey:k,className:Qk()(g,(r={},y(r,w,!x),y(r,"".concat(i,"-nav"),x),y(r,"".concat(i,"-nav-scroll"),x&&m),y(r,"".concat(a,"-").concat(l),!!a),y(r,"".concat(w,"-").concat(l),!!l),y(r,"".concat(w,"-fill"),h),y(r,"".concat(w,"-justified"),p),r))},b))}));hE.displayName="Nav";var dE=Object.assign(hE,{Item:iE,Link:lE});function pE(t,n,r){var i=(0,e.useRef)(void 0!==t),a=h((0,e.useState)(n),2),o=a[0],s=a[1],u=void 0!==t,c=i.current;return i.current=u,!u&&c&&o!==n&&s(n),[u?t:o,(0,e.useCallback)((function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=t[0],a=t.slice(1),o=null==r?void 0:r.apply(void 0,[i].concat(v(a)));return s(i),o}),[r])]}var vE=e.createContext(null),mE=Object.prototype.hasOwnProperty;function gE(e,t,n){var r,i=m(e.keys());try{for(i.s();!(r=i.n()).done;)if(yE(n=r.value,t))return n}catch(a){i.e(a)}finally{i.f()}}function yE(e,t){var n,r,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&yE(e[r],t[r]););return-1===r}if(n===Set){if(e.size!==t.size)return!1;var a,o=m(e);try{for(o.s();!(a=o.n()).done;){if((i=r=a.value)&&"object"===typeof i&&!(i=gE(t,i)))return!1;if(!t.has(i))return!1}}catch(c){o.e(c)}finally{o.f()}return!0}if(n===Map){if(e.size!==t.size)return!1;var s,u=m(e);try{for(u.s();!(s=u.n()).done;){if((i=(r=s.value)[0])&&"object"===typeof i&&!(i=gE(t,i)))return!1;if(!yE(r[1],t.get(i)))return!1}}catch(c){u.e(c)}finally{u.f()}return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return-1===r}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return-1===r}if(!n||"object"===typeof e){for(n in r=0,e){if(mE.call(e,n)&&++r&&!mE.call(t,n))return!1;if(!(n in t)||!yE(e[n],t[n]))return!1}return Object.keys(t).length===r}}return e!==e&&t!==t}var kE=function(t){var n=Iw();return[t[0],(0,e.useCallback)((function(e){if(n())return t[1](e)}),[n,t[1]])]};function bE(e){return e.split("-")[0]}function wE(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function xE(e){return e instanceof wE(e).Element||e instanceof Element}function EE(e){return e instanceof wE(e).HTMLElement||e instanceof HTMLElement}function _E(e){return"undefined"!==typeof ShadowRoot&&(e instanceof wE(e).ShadowRoot||e instanceof ShadowRoot)}var SE=Math.max,CE=Math.min,TE=Math.round;function IE(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function NE(){return!/^((?!chrome|android).)*safari/i.test(IE())}function OE(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&EE(e)&&(i=e.offsetWidth>0&&TE(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&TE(r.height)/e.offsetHeight||1);var o=(xE(e)?wE(e):window).visualViewport,s=!NE()&&n,u=(r.left+(s&&o?o.offsetLeft:0))/i,c=(r.top+(s&&o?o.offsetTop:0))/a,l=r.width/i,f=r.height/a;return{width:l,height:f,top:c,right:u+l,bottom:c+f,left:u,x:u,y:c}}function RE(e){var t=OE(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function PE(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&_E(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function AE(e){return e?(e.nodeName||"").toLowerCase():null}function DE(e){return wE(e).getComputedStyle(e)}function LE(e){return["table","td","th"].indexOf(AE(e))>=0}function ME(e){return((xE(e)?e.ownerDocument:e.document)||window.document).documentElement}function jE(e){return"html"===AE(e)?e:e.assignedSlot||e.parentNode||(_E(e)?e.host:null)||ME(e)}function FE(e){return EE(e)&&"fixed"!==DE(e).position?e.offsetParent:null}function UE(e){for(var t=wE(e),n=FE(e);n&&LE(n)&&"static"===DE(n).position;)n=FE(n);return n&&("html"===AE(n)||"body"===AE(n)&&"static"===DE(n).position)?t:n||function(e){var t=/firefox/i.test(IE());if(/Trident/i.test(IE())&&EE(e)&&"fixed"===DE(e).position)return null;var n=jE(e);for(_E(n)&&(n=n.host);EE(n)&&["html","body"].indexOf(AE(n))<0;){var r=DE(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function VE(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function zE(e,t,n){return SE(e,CE(t,n))}function BE(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function HE(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}var KE="top",qE="bottom",WE="right",GE="left",QE="auto",$E=[KE,qE,WE,GE],YE="start",XE="end",JE="clippingParents",ZE="viewport",e_="popper",t_="reference",n_=$E.reduce((function(e,t){return e.concat([t+"-"+YE,t+"-"+XE])}),[]),r_=[].concat($E,[QE]).reduce((function(e,t){return e.concat([t,t+"-"+YE,t+"-"+XE])}),[]),i_=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];var a_={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,s=bE(n.placement),u=VE(s),c=[GE,WE].indexOf(s)>=0?"height":"width";if(a&&o){var l=function(e,t){return BE("number"!==typeof(e="function"===typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:HE(e,$E))}(i.padding,n),f=RE(a),h="y"===u?KE:GE,d="y"===u?qE:WE,p=n.rects.reference[c]+n.rects.reference[u]-o[u]-n.rects.popper[c],v=o[u]-n.rects.reference[u],m=UE(a),g=m?"y"===u?m.clientHeight||0:m.clientWidth||0:0,y=p/2-v/2,k=l[h],b=g-f[c]-l[d],w=g/2-f[c]/2+y,x=zE(k,w,b),E=u;n.modifiersData[r]=((t={})[E]=x,t.centerOffset=x-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!==typeof r||(r=t.elements.popper.querySelector(r)))&&PE(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function o_(e){return e.split("-")[1]}var s_={top:"auto",right:"auto",bottom:"auto",left:"auto"};function u_(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.variation,o=e.offsets,s=e.position,u=e.gpuAcceleration,c=e.adaptive,l=e.roundOffsets,f=e.isFixed,h=o.x,d=void 0===h?0:h,p=o.y,v=void 0===p?0:p,m="function"===typeof l?l({x:d,y:v}):{x:d,y:v};d=m.x,v=m.y;var g=o.hasOwnProperty("x"),y=o.hasOwnProperty("y"),k=GE,b=KE,w=window;if(c){var x=UE(n),E="clientHeight",_="clientWidth";if(x===wE(n)&&"static"!==DE(x=ME(n)).position&&"absolute"===s&&(E="scrollHeight",_="scrollWidth"),i===KE||(i===GE||i===WE)&&a===XE)b=qE,v-=(f&&x===w&&w.visualViewport?w.visualViewport.height:x[E])-r.height,v*=u?1:-1;if(i===GE||(i===KE||i===qE)&&a===XE)k=WE,d-=(f&&x===w&&w.visualViewport?w.visualViewport.width:x[_])-r.width,d*=u?1:-1}var S,C=Object.assign({position:s},c&&s_),T=!0===l?function(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:TE(n*i)/i||0,y:TE(r*i)/i||0}}({x:d,y:v},wE(n)):{x:d,y:v};return d=T.x,v=T.y,u?Object.assign({},C,((S={})[b]=y?"0":"",S[k]=g?"0":"",S.transform=(w.devicePixelRatio||1)<=1?"translate("+d+"px, "+v+"px)":"translate3d("+d+"px, "+v+"px, 0)",S)):Object.assign({},C,((t={})[b]=y?v+"px":"",t[k]=g?d+"px":"",t.transform="",t))}var c_={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=void 0===r||r,a=n.adaptive,o=void 0===a||a,s=n.roundOffsets,u=void 0===s||s,c={placement:bE(t.placement),variation:o_(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,u_(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:u})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,u_(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},l_={passive:!0};var f_={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=void 0===i||i,o=r.resize,s=void 0===o||o,u=wE(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&c.forEach((function(e){e.addEventListener("scroll",n.update,l_)})),s&&u.addEventListener("resize",n.update,l_),function(){a&&c.forEach((function(e){e.removeEventListener("scroll",n.update,l_)})),s&&u.removeEventListener("resize",n.update,l_)}},data:{}},h_={left:"right",right:"left",bottom:"top",top:"bottom"};function d_(e){return e.replace(/left|right|bottom|top/g,(function(e){return h_[e]}))}var p_={start:"end",end:"start"};function v_(e){return e.replace(/start|end/g,(function(e){return p_[e]}))}function m_(e){var t=wE(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function g_(e){return OE(ME(e)).left+m_(e).scrollLeft}function y_(e){var t=DE(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function k_(e){return["html","body","#document"].indexOf(AE(e))>=0?e.ownerDocument.body:EE(e)&&y_(e)?e:k_(jE(e))}function b_(e,t){var n;void 0===t&&(t=[]);var r=k_(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),a=wE(r),o=i?[a].concat(a.visualViewport||[],y_(r)?r:[]):r,s=t.concat(o);return i?s:s.concat(b_(jE(o)))}function w_(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function x_(e,t,n){return t===ZE?w_(function(e,t){var n=wE(e),r=ME(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,u=0;if(i){a=i.width,o=i.height;var c=NE();(c||!c&&"fixed"===t)&&(s=i.offsetLeft,u=i.offsetTop)}return{width:a,height:o,x:s+g_(e),y:u}}(e,n)):xE(t)?function(e,t){var n=OE(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):w_(function(e){var t,n=ME(e),r=m_(e),i=null==(t=e.ownerDocument)?void 0:t.body,a=SE(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=SE(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+g_(e),u=-r.scrollTop;return"rtl"===DE(i||n).direction&&(s+=SE(n.clientWidth,i?i.clientWidth:0)-a),{width:a,height:o,x:s,y:u}}(ME(e)))}function E_(e,t,n,r){var i="clippingParents"===t?function(e){var t=b_(jE(e)),n=["absolute","fixed"].indexOf(DE(e).position)>=0&&EE(e)?UE(e):e;return xE(n)?t.filter((function(e){return xE(e)&&PE(e,n)&&"body"!==AE(e)})):[]}(e):[].concat(t),a=[].concat(i,[n]),o=a[0],s=a.reduce((function(t,n){var i=x_(e,n,r);return t.top=SE(i.top,t.top),t.right=CE(i.right,t.right),t.bottom=CE(i.bottom,t.bottom),t.left=SE(i.left,t.left),t}),x_(e,o,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function __(e){var t,n=e.reference,r=e.element,i=e.placement,a=i?bE(i):null,o=i?o_(i):null,s=n.x+n.width/2-r.width/2,u=n.y+n.height/2-r.height/2;switch(a){case KE:t={x:s,y:n.y-r.height};break;case qE:t={x:s,y:n.y+n.height};break;case WE:t={x:n.x+n.width,y:u};break;case GE:t={x:n.x-r.width,y:u};break;default:t={x:n.x,y:n.y}}var c=a?VE(a):null;if(null!=c){var l="y"===c?"height":"width";switch(o){case YE:t[c]=t[c]-(n[l]/2-r[l]/2);break;case XE:t[c]=t[c]+(n[l]/2-r[l]/2)}}return t}function S_(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=void 0===r?e.placement:r,a=n.strategy,o=void 0===a?e.strategy:a,s=n.boundary,u=void 0===s?JE:s,c=n.rootBoundary,l=void 0===c?ZE:c,f=n.elementContext,h=void 0===f?e_:f,d=n.altBoundary,p=void 0!==d&&d,v=n.padding,m=void 0===v?0:v,g=BE("number"!==typeof m?m:HE(m,$E)),y=h===e_?t_:e_,k=e.rects.popper,b=e.elements[p?y:h],w=E_(xE(b)?b:b.contextElement||ME(e.elements.popper),u,l,o),x=OE(e.elements.reference),E=__({reference:x,element:k,strategy:"absolute",placement:i}),_=w_(Object.assign({},k,E)),S=h===e_?_:x,C={top:w.top-S.top+g.top,bottom:S.bottom-w.bottom+g.bottom,left:w.left-S.left+g.left,right:S.right-w.right+g.right},T=e.modifiersData.offset;if(h===e_&&T){var I=T[i];Object.keys(C).forEach((function(e){var t=[WE,qE].indexOf(e)>=0?1:-1,n=[KE,qE].indexOf(e)>=0?"y":"x";C[e]+=I[n]*t}))}return C}var C_={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=void 0===i||i,o=n.altAxis,s=void 0===o||o,u=n.fallbackPlacements,c=n.padding,l=n.boundary,f=n.rootBoundary,h=n.altBoundary,d=n.flipVariations,p=void 0===d||d,v=n.allowedAutoPlacements,m=t.options.placement,g=bE(m),y=u||(g===m||!p?[d_(m)]:function(e){if(bE(e)===QE)return[];var t=d_(e);return[v_(e),t,v_(t)]}(m)),k=[m].concat(y).reduce((function(e,n){return e.concat(bE(n)===QE?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,a=n.rootBoundary,o=n.padding,s=n.flipVariations,u=n.allowedAutoPlacements,c=void 0===u?r_:u,l=o_(r),f=l?s?n_:n_.filter((function(e){return o_(e)===l})):$E,h=f.filter((function(e){return c.indexOf(e)>=0}));0===h.length&&(h=f);var d=h.reduce((function(t,n){return t[n]=S_(e,{placement:n,boundary:i,rootBoundary:a,padding:o})[bE(n)],t}),{});return Object.keys(d).sort((function(e,t){return d[e]-d[t]}))}(t,{placement:n,boundary:l,rootBoundary:f,padding:c,flipVariations:p,allowedAutoPlacements:v}):n)}),[]),b=t.rects.reference,w=t.rects.popper,x=new Map,E=!0,_=k[0],S=0;S<k.length;S++){var C=k[S],T=bE(C),I=o_(C)===YE,N=[KE,qE].indexOf(T)>=0,O=N?"width":"height",R=S_(t,{placement:C,boundary:l,rootBoundary:f,altBoundary:h,padding:c}),P=N?I?WE:GE:I?qE:KE;b[O]>w[O]&&(P=d_(P));var A=d_(P),D=[];if(a&&D.push(R[T]<=0),s&&D.push(R[P]<=0,R[A]<=0),D.every((function(e){return e}))){_=C,E=!1;break}x.set(C,D)}if(E)for(var L=function(e){var t=k.find((function(t){var n=x.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return _=t,"break"},M=p?3:1;M>0;M--){if("break"===L(M))break}t.placement!==_&&(t.modifiersData[r]._skip=!0,t.placement=_,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function T_(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function I_(e){return[KE,WE,qE,GE].some((function(t){return e[t]>=0}))}var N_={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=void 0===i?[0,0]:i,o=r_.reduce((function(e,n){return e[n]=function(e,t,n){var r=bE(e),i=[GE,KE].indexOf(r)>=0?-1:1,a="function"===typeof n?n(Object.assign({},t,{placement:e})):n,o=a[0],s=a[1];return o=o||0,s=(s||0)*i,[GE,WE].indexOf(r)>=0?{x:s,y:o}:{x:o,y:s}}(n,t.rects,a),e}),{}),s=o[t.placement],u=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=o}};var O_={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=void 0===i||i,o=n.altAxis,s=void 0!==o&&o,u=n.boundary,c=n.rootBoundary,l=n.altBoundary,f=n.padding,h=n.tether,d=void 0===h||h,p=n.tetherOffset,v=void 0===p?0:p,m=S_(t,{boundary:u,rootBoundary:c,padding:f,altBoundary:l}),g=bE(t.placement),y=o_(t.placement),k=!y,b=VE(g),w="x"===b?"y":"x",x=t.modifiersData.popperOffsets,E=t.rects.reference,_=t.rects.popper,S="function"===typeof v?v(Object.assign({},t.rects,{placement:t.placement})):v,C="number"===typeof S?{mainAxis:S,altAxis:S}:Object.assign({mainAxis:0,altAxis:0},S),T=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,I={x:0,y:0};if(x){if(a){var N,O="y"===b?KE:GE,R="y"===b?qE:WE,P="y"===b?"height":"width",A=x[b],D=A+m[O],L=A-m[R],M=d?-_[P]/2:0,j=y===YE?E[P]:_[P],F=y===YE?-_[P]:-E[P],U=t.elements.arrow,V=d&&U?RE(U):{width:0,height:0},z=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},B=z[O],H=z[R],K=zE(0,E[P],V[P]),q=k?E[P]/2-M-K-B-C.mainAxis:j-K-B-C.mainAxis,W=k?-E[P]/2+M+K+H+C.mainAxis:F+K+H+C.mainAxis,G=t.elements.arrow&&UE(t.elements.arrow),Q=G?"y"===b?G.clientTop||0:G.clientLeft||0:0,$=null!=(N=null==T?void 0:T[b])?N:0,Y=A+W-$,X=zE(d?CE(D,A+q-$-Q):D,A,d?SE(L,Y):L);x[b]=X,I[b]=X-A}if(s){var J,Z="x"===b?KE:GE,ee="x"===b?qE:WE,te=x[w],ne="y"===w?"height":"width",re=te+m[Z],ie=te-m[ee],ae=-1!==[KE,GE].indexOf(g),oe=null!=(J=null==T?void 0:T[w])?J:0,se=ae?re:te-E[ne]-_[ne]-oe+C.altAxis,ue=ae?te+E[ne]+_[ne]-oe-C.altAxis:ie,ce=d&&ae?function(e,t,n){var r=zE(e,t,n);return r>n?n:r}(se,te,ue):zE(d?se:re,te,d?ue:ie);x[w]=ce,I[w]=ce-te}t.modifiersData[r]=I}},requiresIfExists:["offset"]};function R_(e,t,n){void 0===n&&(n=!1);var r=EE(t),i=EE(t)&&function(e){var t=e.getBoundingClientRect(),n=TE(t.width)/e.offsetWidth||1,r=TE(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),a=ME(t),o=OE(e,i,n),s={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&(("body"!==AE(t)||y_(a))&&(s=function(e){return e!==wE(e)&&EE(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:m_(e);var t}(t)),EE(t)?((u=OE(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):a&&(u.x=g_(a))),{x:o.left+s.scrollLeft-u.x,y:o.top+s.scrollTop-u.y,width:o.width,height:o.height}}function P_(e){var t=new Map,n=new Set,r=[];function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||i(e)})),r}function A_(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}var D_={placement:"bottom",modifiers:[],strategy:"absolute"};function L_(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"===typeof e.getBoundingClientRect)}))}function M_(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,i=t.defaultOptions,a=void 0===i?D_:i;return function(e,t,n){void 0===n&&(n=a);var i={placement:"bottom",orderedModifiers:[],options:Object.assign({},D_,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},o=[],s=!1,u={state:i,setOptions:function(n){var s="function"===typeof n?n(i.options):n;c(),i.options=Object.assign({},a,i.options,s),i.scrollParents={reference:xE(e)?b_(e):e.contextElement?b_(e.contextElement):[],popper:b_(t)};var l=function(e){var t=P_(e);return i_.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(r,i.options.modifiers)));return i.orderedModifiers=l.filter((function(e){return e.enabled})),i.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,a=e.effect;if("function"===typeof a){var s=a({state:i,name:t,instance:u,options:r}),c=function(){};o.push(s||c)}})),u.update()},forceUpdate:function(){if(!s){var e=i.elements,t=e.reference,n=e.popper;if(L_(t,n)){i.rects={reference:R_(t,UE(n),"fixed"===i.options.strategy),popper:RE(n)},i.reset=!1,i.placement=i.options.placement,i.orderedModifiers.forEach((function(e){return i.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<i.orderedModifiers.length;r++)if(!0!==i.reset){var a=i.orderedModifiers[r],o=a.fn,c=a.options,l=void 0===c?{}:c,f=a.name;"function"===typeof o&&(i=o({state:i,options:l,name:f,instance:u})||i)}else i.reset=!1,r=-1}}},update:A_((function(){return new Promise((function(e){u.forceUpdate(),e(i)}))})),destroy:function(){c(),s=!0}};if(!L_(e,t))return u;function c(){o.forEach((function(e){return e()})),o=[]}return u.setOptions(n).then((function(e){!s&&n.onFirstUpdate&&n.onFirstUpdate(e)})),u}}var j_=M_({defaultModifiers:[{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=S_(t,{elementContext:"reference"}),s=S_(t,{altBoundary:!0}),u=T_(o,r),c=T_(s,i,a),l=I_(u),f=I_(c);t.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:l,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":f})}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=__({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},c_,f_,N_,C_,O_,a_]}),F_=["enabled","placement","strategy","modifiers"];var U_={name:"applyStyles",enabled:!1,phase:"afterWrite",fn:function(){}},V_={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:function(e){var t=e.state;return function(){var e=t.elements,n=e.reference,r=e.popper;if("removeAttribute"in n){var i=(n.getAttribute("aria-describedby")||"").split(",").filter((function(e){return e.trim()!==r.id}));i.length?n.setAttribute("aria-describedby",i.join(",")):n.removeAttribute("aria-describedby")}}},fn:function(e){var t,n=e.state.elements,r=n.popper,i=n.reference,a=null==(t=r.getAttribute("role"))?void 0:t.toLowerCase();if(r.id&&"tooltip"===a&&"setAttribute"in i){var o=i.getAttribute("aria-describedby");if(o&&-1!==o.split(",").indexOf(r.id))return;i.setAttribute("aria-describedby",o?"".concat(o,",").concat(r.id):r.id)}}},z_=[];var B_=function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.enabled,a=void 0===i||i,o=r.placement,s=void 0===o?"bottom":o,u=r.strategy,c=void 0===u?"absolute":u,l=r.modifiers,f=void 0===l?z_:l,d=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}(r,F_),p=(0,e.useRef)(f),m=(0,e.useRef)(),g=(0,e.useCallback)((function(){var e;null==(e=m.current)||e.update()}),[]),y=(0,e.useCallback)((function(){var e;null==(e=m.current)||e.forceUpdate()}),[]),k=h(kE((0,e.useState)({placement:s,update:g,forceUpdate:y,attributes:{},styles:{popper:{},arrow:{}}})),2),b=k[0],w=k[1],x=(0,e.useMemo)((function(){return{name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:function(e){var t=e.state,n={},r={};Object.keys(t.elements).forEach((function(e){n[e]=t.styles[e],r[e]=t.attributes[e]})),w({state:t,styles:n,attributes:r,update:g,forceUpdate:y,placement:t.placement})}}}),[g,y,w]),E=(0,e.useMemo)((function(){return yE(p.current,f)||(p.current=f),p.current}),[f]);return(0,e.useEffect)((function(){m.current&&a&&m.current.setOptions({placement:s,strategy:c,modifiers:[].concat(v(E),[x,U_])})}),[c,s,x,a,E]),(0,e.useEffect)((function(){if(a&&null!=t&&null!=n)return m.current=j_(t,n,Object.assign({},d,{placement:s,strategy:c,modifiers:[].concat(v(E),[V_,x])})),function(){null!=m.current&&(m.current.destroy(),m.current=void 0,w((function(e){return Object.assign({},e,{attributes:{},styles:{popper:{}}})})))}}),[a,t,n]),b},H_=n(391),K_=n.n(H_),q_=function(){};var W_=function(e){return e&&("current"in e?e.current:e)},G_={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"};var Q_=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:q_,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.disabled,a=r.clickTrigger,o=void 0===a?"click":a,s=(0,e.useRef)(!1),u=(0,e.useRef)(!1),c=(0,e.useCallback)((function(e){var n,r=W_(t);K_()(!!r,"ClickOutside captured a close event but does not have a ref to compare it to. useClickOutside(), should be passed a ref that resolves to a DOM node"),s.current=!r||!!((n=e).metaKey||n.altKey||n.ctrlKey||n.shiftKey)||!function(e){return 0===e.button}(e)||!!Tw(r,e.target)||u.current,u.current=!1}),[t]),l=vw((function(e){var n=W_(t);n&&Tw(n,e.target)&&(u.current=!0)})),f=vw((function(e){s.current||n(e)}));(0,e.useEffect)((function(){var e,n;if(!i&&null!=t){var r=bb(W_(t)),a=r.defaultView||window,s=null!=(e=a.event)?e:null==(n=a.parent)?void 0:n.event,u=null;G_[o]&&(u=Kb(r,G_[o],l,!0));var h=Kb(r,o,c,!0),d=Kb(r,o,(function(e){e!==s?f(e):s=void 0})),p=[];return"ontouchstart"in r.documentElement&&(p=[].slice.call(r.body.children).map((function(e){return Kb(e,"mousemove",q_)}))),function(){null==u||u(),h(),d(),p.forEach((function(e){return e()}))}}}),[t,i,o,c,l,f])};function $_(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Array.isArray(e)?e:Object.keys(e).map((function(t){return e[t].name=t,e[t]}))}function Y_(e){var t,n,r,i,a,o=e.enabled,s=e.enableEvents,u=e.placement,c=e.flip,l=e.offset,f=e.fixed,h=e.containerPadding,d=e.arrowElement,p=e.popperConfig,v=void 0===p?{}:p,m=function(e){var t={};return Array.isArray(e)?(null==e||e.forEach((function(e){t[e.name]=e})),t):e||t}(v.modifiers);return Object.assign({},v,{placement:u,enabled:o,strategy:f?"fixed":v.strategy,modifiers:$_(Object.assign({},m,{eventListeners:{enabled:s,options:null==(t=m.eventListeners)?void 0:t.options},preventOverflow:Object.assign({},m.preventOverflow,{options:h?Object.assign({padding:h},null==(n=m.preventOverflow)?void 0:n.options):null==(r=m.preventOverflow)?void 0:r.options}),offset:{options:Object.assign({offset:l},null==(i=m.offset)?void 0:i.options)},arrow:Object.assign({},m.arrow,{enabled:!!d,options:Object.assign({},null==(a=m.arrow)?void 0:a.options,{element:d})}),flip:Object.assign({enabled:!!c},m.flip)}))})}var X_=["children"];var J_=function(){};function Z_(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=(0,e.useContext)(vE),r=h((0,e.useState)(null),2),i=r[0],a=r[1],o=(0,e.useRef)(!1),s=t.flip,u=t.offset,c=t.rootCloseEvent,l=t.fixed,f=void 0!==l&&l,d=t.placement,p=t.popperConfig,v=void 0===p?{}:p,m=t.enableEventListeners,g=void 0===m||m,y=t.usePopper,k=void 0===y?!!n:y,b=null==(null==n?void 0:n.show)?!!t.show:n.show;b&&!o.current&&(o.current=!0);var w=n||{},x=w.placement,E=w.setMenu,_=w.menuElement,S=w.toggleElement,C=B_(S,_,Y_({placement:d||x||"bottom-start",enabled:k,enableEvents:null==g?b:g,offset:u,flip:s,fixed:f,arrowElement:i,popperConfig:v})),T=Object.assign({ref:E||J_,"aria-labelledby":null==S?void 0:S.id},C.attributes.popper,{style:C.styles.popper}),I={show:b,placement:x,hasShown:o.current,toggle:null==n?void 0:n.toggle,popper:k?C:null,arrowProps:k?Object.assign({ref:a},C.attributes.arrow,{style:C.styles.arrow}):{}};return Q_(_,(function(e){null==n||n.toggle(!1,e)}),{clickTrigger:c,disabled:!b}),[T,I]}function eS(e){var t=e.children,n=h(Z_(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,X_)),2),r=n[0],i=n[1];return(0,$k.jsx)($k.Fragment,{children:t(r,i)})}eS.displayName="DropdownMenu",eS.defaultProps={usePopper:!0};var tS=eS,nS={prefix:String(Math.round(1e10*Math.random())),current:0},rS=e.createContext(nS),iS=e.createContext(!1);var aS=Boolean("undefined"!==typeof window&&window.document&&window.document.createElement),oS=new WeakMap;function sS(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=(0,e.useContext)(rS),r=(0,e.useRef)(null);if(null===r.current&&!t){var i,a,o=null===(i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||void 0===i||null===(a=i.ReactCurrentOwner)||void 0===a?void 0:a.current;if(o){var s=oS.get(o);null==s?oS.set(o,{id:n.current,state:o.memoizedState}):o.memoizedState!==s.state&&(n.current=s.id,oS.delete(o))}r.current=++n.current}return r.current}var uS="function"===typeof e.useId?function(t){var n=e.useId(),r=h((0,e.useState)("function"===typeof e.useSyncExternalStore?e.useSyncExternalStore(fS,cS,lS):(0,e.useContext)(iS)),1)[0]?"react-aria":"react-aria".concat(nS.prefix);return t||"".concat(r,"-").concat(n)}:function(t){var n=(0,e.useContext)(rS);n!==nS||aS||console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");var r=sS(!!t),i="react-aria".concat(n.prefix);return t||"".concat(i,"-").concat(r)};function cS(){return!1}function lS(){return!0}function fS(e){return function(){}}var hS=function(e){var t;return"menu"===(null==(t=e.getAttribute("role"))?void 0:t.toLowerCase())},dS=function(){};function pS(){var t=uS(),n=(0,e.useContext)(vE)||{},r=n.show,i=void 0!==r&&r,a=n.toggle,o=void 0===a?dS:a,s=n.setToggle,u=n.menuElement,c=(0,e.useCallback)((function(e){o(!i,e)}),[i,o]),l={id:t,ref:s||dS,onClick:c,"aria-expanded":!!i};return u&&hS(u)&&(l["aria-haspopup"]=!0),[l,{show:i,toggle:o}]}function vS(e){var t=e.children,n=h(pS(),2),r=n[0],i=n[1];return(0,$k.jsx)($k.Fragment,{children:t(r,i)})}vS.displayName="DropdownToggle";var mS=vS,gS=["eventKey","disabled","onClick","active","as"];function yS(t){var n=t.key,r=t.href,i=t.active,a=t.disabled,o=t.onClick,s=(0,e.useContext)(ab),u=((0,e.useContext)(zx)||{}).activeKey,c=ib(n,r),l=null==i&&null!=n?ib(u)===c:i;return[y({onClick:vw((function(e){a||(null==o||o(e),s&&!e.isPropagationStopped()&&s(c,e))})),"aria-disabled":a||void 0,"aria-selected":l},Pw("dropdown-item"),""),{isActive:l}]}var kS=e.forwardRef((function(e,t){var n=e.eventKey,r=e.disabled,i=e.onClick,a=e.active,o=e.as,s=void 0===o?Wx:o,u=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,gS),c=h(yS({key:n,href:u.href,disabled:r,onClick:i,active:a}),1)[0];return(0,$k.jsx)(s,Object.assign({},u,{ref:t},c))}));kS.displayName="DropdownItem";var bS=kS;function wS(){var t=Ux(),n=(0,e.useRef)(null),r=(0,e.useCallback)((function(e){n.current=e,t()}),[t]);return[n,r]}function xS(t){var n=t.defaultShow,r=t.show,i=t.onSelect,a=t.onToggle,o=t.itemSelector,s=void 0===o?"* [".concat(Pw("dropdown-item"),"]"):o,u=t.focusFirstItemOnShow,c=t.placement,l=void 0===c?"bottom-start":c,f=t.children,d=jw(),p=h(pE(r,n,a),2),v=p[0],m=p[1],g=h(wS(),2),y=g[0],k=g[1],b=y.current,w=h(wS(),2),x=w[0],E=w[1],_=x.current,S=Ow(v),C=(0,e.useRef)(null),T=(0,e.useRef)(!1),I=(0,e.useContext)(ab),N=(0,e.useCallback)((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null==t?void 0:t.type;m(e,{originalEvent:t,source:n})}),[m]),O=vw((function(e,t){null==i||i(e,t),N(!1,t,"select"),t.isPropagationStopped()||null==I||I(e,t)})),R=(0,e.useMemo)((function(){return{toggle:N,placement:l,show:v,menuElement:b,toggleElement:_,setMenu:k,setToggle:E}}),[N,l,v,b,_,k,E]);b&&S&&!v&&(T.current=b.contains(b.ownerDocument.activeElement));var P=vw((function(){_&&_.focus&&_.focus()})),A=vw((function(){var e=C.current,t=u;if(null==t&&(t=!(!y.current||!hS(y.current))&&"keyboard"),!1!==t&&("keyboard"!==t||/^key.+$/.test(e))){var n=bx(y.current,s)[0];n&&n.focus&&n.focus()}}));(0,e.useEffect)((function(){v?A():T.current&&(T.current=!1,P())}),[v,T,P,A]),(0,e.useEffect)((function(){C.current=null}));var D=function(e,t){if(!y.current)return null;var n=bx(y.current,s),r=n.indexOf(e)+t;return n[r=Math.max(0,Math.min(r,n.length))]};return function(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=vw(r);(0,e.useEffect)((function(){var e="function"===typeof t?t():t;return e.addEventListener(n,a,i),function(){return e.removeEventListener(n,a,i)}}),[t])}((0,e.useCallback)((function(){return d.document}),[d]),"keydown",(function(e){var t,n,r=e.key,i=e.target,a=null==(t=y.current)?void 0:t.contains(i),o=null==(n=x.current)?void 0:n.contains(i);if((!/input|textarea/i.test(i.tagName)||!(" "===r||"Escape"!==r&&a||"Escape"===r&&"search"===i.type))&&(a||o)&&("Tab"!==r||y.current&&v)){C.current=e.type;var s={originalEvent:e,source:e.type};switch(r){case"ArrowUp":var u=D(i,-1);return u&&u.focus&&u.focus(),void e.preventDefault();case"ArrowDown":if(e.preventDefault(),v){var c=D(i,1);c&&c.focus&&c.focus()}else m(!0,s);return;case"Tab":Bb(i.ownerDocument,"keyup",(function(e){var t;("Tab"!==e.key||e.target)&&null!=(t=y.current)&&t.contains(e.target)||m(!1,s)}),{once:!0});break;case"Escape":"Escape"===r&&(e.preventDefault(),e.stopPropagation()),m(!1,s)}}})),(0,$k.jsx)(ab.Provider,{value:O,children:(0,$k.jsx)(vE.Provider,{value:R,children:f})})}xS.displayName="Dropdown",xS.Menu=tS,xS.Toggle=mS,xS.Item=bS;var ES=xS,_S=e.createContext({});_S.displayName="DropdownContext";var SS=_S,CS=["bsPrefix","className","eventKey","disabled","onClick","active","as"],TS=e.forwardRef((function(e,t){var n=e.bsPrefix,r=e.className,i=e.eventKey,a=e.disabled,o=void 0!==a&&a,s=e.onClick,u=e.active,c=e.as,l=void 0===c?sE:c,f=Wk(e,CS),d=Jk(n,"dropdown-item"),p=h(yS({key:i,href:f.href,disabled:o,onClick:s,active:u}),2),v=p[0],m=p[1];return(0,$k.jsx)(l,me(me(me({},f),v),{},{ref:t,className:Qk()(r,d,m.isActive&&"active",o&&"disabled")}))}));TS.displayName="DropdownItem";var IS=TS,NS=e.createContext(null);NS.displayName="InputGroupContext";var OS=NS;function RS(e,t){return e}var PS=["bsPrefix","className","align","rootCloseEvent","flip","show","renderOnMount","as","popperConfig","variant"];function AS(e,t,n){var r=e?n?"bottom-start":"bottom-end":n?"bottom-end":"bottom-start";return"up"===t?r=e?n?"top-start":"top-end":n?"top-end":"top-start":"end"===t?r=e?n?"left-end":"right-end":n?"left-start":"right-start":"start"===t?r=e?n?"right-end":"left-end":n?"right-start":"left-start":"down-centered"===t?r="bottom":"up-centered"===t&&(r="top"),r}var DS=e.forwardRef((function(t,n){var r=t.bsPrefix,i=t.className,a=t.align,o=t.rootCloseEvent,s=t.flip,u=void 0===s||s,c=t.show,l=t.renderOnMount,f=t.as,d=void 0===f?"div":f,p=t.popperConfig,v=t.variant,m=Wk(t,PS),g=!1,y=(0,e.useContext)(lw),k=Jk(r,"dropdown-menu"),b=(0,e.useContext)(SS),w=b.align,x=b.drop,E=b.isRTL;a=a||w;var _=(0,e.useContext)(OS),S=[];if(a)if("object"===typeof a){var C=Object.keys(a);if(C.length){var T=C[0],I=a[T];g="start"===I,S.push("".concat(k,"-").concat(T,"-").concat(I))}}else"end"===a&&(g=!0);var N=AS(g,x,E),O=h(Z_({flip:u,rootCloseEvent:o,show:c,usePopper:!y&&0===S.length,offset:[0,2],popperConfig:p,placement:N}),2),R=O[0],P=O[1],A=P.hasShown,D=P.popper,L=P.show,M=P.toggle;if(R.ref=Jb(RS(n),R.ref),bw((function(){L&&(null==D||D.update())}),[L]),!A&&!l&&!_)return null;"string"!==typeof d&&(R.show=L,R.close=function(){return null==M?void 0:M(!1)},R.align=a);var j=m.style;return null!=D&&D.placement&&(j=me(me({},m.style),R.style),m["x-placement"]=D.placement),(0,$k.jsx)(d,me(me(me(me({},m),R),{},{style:j},(S.length||y)&&{"data-bs-popper":"static"}),{},{className:Qk().apply(void 0,[i,k,L&&"show",g&&"".concat(k,"-end"),v&&"".concat(k,"-").concat(v)].concat(S))}))}));DS.displayName="DropdownMenu";var LS=DS,MS=["as","bsPrefix","variant","size","active","disabled","className"],jS=e.forwardRef((function(e,t){var n=e.as,r=e.bsPrefix,i=e.variant,a=void 0===i?"primary":i,o=e.size,s=e.active,u=void 0!==s&&s,c=e.disabled,l=void 0!==c&&c,f=e.className,d=Wk(e,MS),p=Jk(r,"btn"),v=h(Kx(me({tagName:n,disabled:l},d)),2),m=v[0],g=v[1].tagName;return(0,$k.jsx)(g,me(me(me({},m),d),{},{ref:t,disabled:l,className:Qk()(f,p,u&&"active",a&&"".concat(p,"-").concat(a),o&&"".concat(p,"-").concat(o),d.href&&l&&"disabled")}))}));jS.displayName="Button";var FS=jS,US=["bsPrefix","split","className","childBsPrefix","as"],VS=e.forwardRef((function(t,n){var r=t.bsPrefix,i=t.split,a=t.className,o=t.childBsPrefix,s=t.as,u=void 0===s?FS:s,c=Wk(t,US),l=Jk(r,"dropdown-toggle"),f=(0,e.useContext)(vE);void 0!==o&&(c.bsPrefix=o);var d=h(pS(),1)[0];return d.ref=Jb(d.ref,RS(n)),(0,$k.jsx)(u,me(me({className:Qk()(a,l,i&&"".concat(l,"-split"),(null==f?void 0:f.show)&&"show")},d),c))}));VS.displayName="DropdownToggle";var zS=VS,BS=["bsPrefix","drop","show","className","align","onSelect","onToggle","focusFirstItemOnShow","as","navbar","autoClose"],HS=mb("dropdown-header",{defaultProps:{role:"heading"}}),KS=mb("dropdown-divider",{Component:"hr",defaultProps:{role:"separator"}}),qS=mb("dropdown-item-text",{Component:"span"}),WS=e.forwardRef((function(t,n){var r=cb(t,{show:"onToggle"}),i=r.bsPrefix,a=r.drop,o=void 0===a?"down":a,s=r.show,u=r.className,c=r.align,l=void 0===c?"start":c,f=r.onSelect,h=r.onToggle,d=r.focusFirstItemOnShow,p=r.as,v=void 0===p?"div":p,m=(r.navbar,r.autoClose),g=void 0===m||m,y=Wk(r,BS),k=(0,e.useContext)(OS),b=Jk(i,"dropdown"),w="rtl"===(0,e.useContext)(Xk).dir,x=vw((function(e,t){var n;t.originalEvent.currentTarget!==document||"keydown"===t.source&&"Escape"!==t.originalEvent.key||(t.source="rootClose"),n=t.source,(!1===g?"click"===n:"inside"===g?"rootClose"!==n:"outside"!==g||"select"!==n)&&(null==h||h(e,t))})),E=AS("end"===l,o,w),_=(0,e.useMemo)((function(){return{align:l,drop:o,isRTL:w}}),[l,o,w]),S={down:b,"down-centered":"".concat(b,"-center"),up:"dropup","up-centered":"dropup-center dropup",end:"dropend",start:"dropstart"};return(0,$k.jsx)(SS.Provider,{value:_,children:(0,$k.jsx)(ES,{placement:E,show:s,onSelect:f,onToggle:x,focusFirstItemOnShow:d,itemSelector:".".concat(b,"-item:not(.disabled):not(:disabled)"),children:k?y.children:(0,$k.jsx)(v,me(me({},y),{},{ref:n,className:Qk()(u,s&&"show",S[o])}))})})}));WS.displayName="Dropdown";var GS=Object.assign(WS,{Toggle:zS,Menu:LS,Item:IS,ItemText:qS,Divider:KS,Header:HS}),QS=["id","title","children","bsPrefix","className","rootCloseEvent","menuRole","disabled","active","renderMenuOnMount","menuVariant"],$S=e.forwardRef((function(e,t){var n=e.id,r=e.title,i=e.children,a=e.bsPrefix,o=e.className,s=e.rootCloseEvent,u=e.menuRole,c=e.disabled,l=e.active,f=e.renderMenuOnMount,h=e.menuVariant,d=Wk(e,QS),p=Jk(void 0,"nav-item");return(0,$k.jsxs)(GS,me(me({ref:t},d),{},{className:Qk()(o,p),children:[(0,$k.jsx)(GS.Toggle,{id:n,eventKey:null,active:l,disabled:c,childBsPrefix:a,as:lE,children:r}),(0,$k.jsx)(GS.Menu,{role:u,renderOnMount:f,rootCloseEvent:s,variant:h,children:i})]}))}));$S.displayName="NavDropdown";var YS=Object.assign($S,{Item:GS.Item,ItemText:GS.ItemText,Divider:GS.Divider,Header:GS.Header});function XS(e){var t=e.items.map((function(e,t){return(0,$k.jsxs)(dE.Link,{href:e.link,children:[" ",e.label," "]},t)}));return(0,$k.jsx)(Fx,{className:"mb-3",children:(0,$k.jsxs)(rb,{children:[(0,$k.jsx)(Fx.Brand,{children:"Ray's Book Club"}),(0,$k.jsxs)(dE,{children:[t,(0,$k.jsx)(YS,{title:e.user.email,children:(0,$k.jsx)(YS.Item,{href:"/signout",children:"Log out"})})]})]})})}function JS(e){return(0,$k.jsxs)("div",{children:[(0,$k.jsx)("h1",{children:e.greeting}),(0,$k.jsx)("button",{onClick:function(){return e.handler("I've been clicked!")},children:"Click me"})]})}var ZS=["bsPrefix","className","as"],eC=e.forwardRef((function(e,t){var n=e.bsPrefix,r=e.className,i=e.as,a=void 0===i?"div":i,o=Wk(e,ZS),s=Jk(n,"row"),u=Zk(),c=eb(),l="".concat(s,"-cols"),f=[];return u.forEach((function(e){var t,n=o[e];delete o[e],t=null!=n&&"object"===typeof n?n.cols:n;var r=e!==c?"-".concat(e):"";null!=t&&f.push("".concat(l).concat(r,"-").concat(t))})),(0,$k.jsx)(a,me(me({ref:t},o),{},{className:Qk().apply(void 0,[r,s].concat(f))}))}));eC.displayName="Row";var tC=eC,nC=["as","bsPrefix","className"],rC=["className"];var iC=e.forwardRef((function(e,t){var n=function(e){var t=e.as,n=e.bsPrefix,r=e.className,i=Wk(e,nC);n=Jk(n,"col");var a=Zk(),o=eb(),s=[],u=[];return a.forEach((function(e){var t,r,a,c=i[e];delete i[e],"object"===typeof c&&null!=c?(t=c.span,r=c.offset,a=c.order):t=c;var l=e!==o?"-".concat(e):"";t&&s.push(!0===t?"".concat(n).concat(l):"".concat(n).concat(l,"-").concat(t)),null!=a&&u.push("order".concat(l,"-").concat(a)),null!=r&&u.push("offset".concat(l,"-").concat(r))})),[me(me({},i),{},{className:Qk().apply(void 0,[r].concat(s,u))}),{as:t,bsPrefix:n,spans:s}]}(e),r=h(n,2),i=r[0],a=i.className,o=Wk(i,rC),s=r[1],u=s.as,c=void 0===u?"div":u,l=s.bsPrefix,f=s.spans;return(0,$k.jsx)(c,me(me({},o),{},{ref:t,className:Qk()(a,!f.length&&l)}))}));iC.displayName="Col";var aC=iC,oC=["bsPrefix","className","variant","as"],sC=e.forwardRef((function(e,t){var n=e.bsPrefix,r=e.className,i=e.variant,a=e.as,o=void 0===a?"img":a,s=Wk(e,oC),u=Jk(n,"card-img");return(0,$k.jsx)(o,me({ref:t,className:Qk()(i?"".concat(u,"-").concat(i):u,r)},s))}));sC.displayName="CardImg";var uC=sC,cC=["bsPrefix","className","as"],lC=e.forwardRef((function(t,n){var r=t.bsPrefix,i=t.className,a=t.as,o=void 0===a?"div":a,s=Wk(t,cC),u=Jk(r,"card-header"),c=(0,e.useMemo)((function(){return{cardHeaderBsPrefix:u}}),[u]);return(0,$k.jsx)(rE.Provider,{value:c,children:(0,$k.jsx)(o,me(me({ref:n},s),{},{className:Qk()(i,u)}))})}));lC.displayName="CardHeader";var fC=lC,hC=["bsPrefix","className","bg","text","border","body","children","as"],dC=gx("h5"),pC=gx("h6"),vC=mb("card-body"),mC=mb("card-title",{Component:dC}),gC=mb("card-subtitle",{Component:pC}),yC=mb("card-link",{Component:"a"}),kC=mb("card-text",{Component:"p"}),bC=mb("card-footer"),wC=mb("card-img-overlay"),xC=e.forwardRef((function(e,t){var n=e.bsPrefix,r=e.className,i=e.bg,a=e.text,o=e.border,s=e.body,u=void 0!==s&&s,c=e.children,l=e.as,f=void 0===l?"div":l,h=Wk(e,hC),d=Jk(n,"card");return(0,$k.jsx)(f,me(me({ref:t},h),{},{className:Qk()(r,d,i&&"bg-".concat(i),a&&"text-".concat(a),o&&"border-".concat(o)),children:u?(0,$k.jsx)(vC,{children:c}):c}))}));xC.displayName="Card";var EC=Object.assign(xC,{Img:uC,Title:mC,Subtitle:gC,Body:vC,Link:yC,Text:kC,Header:fC,Footer:bC,ImgOverlay:wC}),_C=(0,e.createContext)();function SC(t){var n=h((0,e.useState)(),2),r=n[0],i=n[1],a=(0,e.useContext)(_C);if((0,e.useEffect)((function(){var e,n;t.source&&function(e){return Ak(e=ne(e))}((e=a,n="book_covers/".concat(t.source),Mk(e=ne(e),n))).then((function(e){return i(e)})).catch((function(e){return console.log(e)}))}),[t.source]),r)return(0,$k.jsx)(EC.Img,{style:{aspectRatio:"3/4"},variant:"top",src:r});return(0,$k.jsx)("div",{style:{backgroundColor:"#cccccc",aspectRatio:"4/3"}})}function CC(t){var n=h((0,e.useState)([]),2),r=n[0],i=n[1];(0,e.useEffect)((function(){console.log(t.items),i(t.items)}),[t.items]);var a=r.map((function(e,t){var n="/detail/".concat(e.id);return(0,$k.jsx)(aC,{md:4,className:"mb-4",children:(0,$k.jsxs)(EC,{className:"position-relative",children:[(0,$k.jsx)("a",{href:n,className:"position-absolute",style:{top:0,left:0,right:0,bottom:0}}),(0,$k.jsx)(SC,{source:e.cover_image}),(0,$k.jsxs)(EC.Body,{children:[(0,$k.jsx)(EC.Title,{children:e.book_title}),(0,$k.jsxs)(EC.Text,{children:["By ",e.author]})]})]},t)},t)}));return(0,$k.jsx)(rb,{children:(0,$k.jsx)(tC,{children:a})})}function TC(e){return(0,$k.jsxs)("h1",{children:[e.greeting," "]})}var IC=["as","className","type","tooltip"],NC={type:ox().string,tooltip:ox().bool,as:ox().elementType},OC=e.forwardRef((function(e,t){var n=e.as,r=void 0===n?"div":n,i=e.className,a=e.type,o=void 0===a?"valid":a,s=e.tooltip,u=void 0!==s&&s,c=Wk(e,IC);return(0,$k.jsx)(r,me(me({},c),{},{ref:t,className:Qk()(i,"".concat(o,"-").concat(u?"tooltip":"feedback"))}))}));OC.displayName="Feedback",OC.propTypes=NC;var RC=OC,PC=e.createContext({}),AC=["id","bsPrefix","className","type","isValid","isInvalid","as"],DC=e.forwardRef((function(t,n){var r=t.id,i=t.bsPrefix,a=t.className,o=t.type,s=void 0===o?"checkbox":o,u=t.isValid,c=void 0!==u&&u,l=t.isInvalid,f=void 0!==l&&l,h=t.as,d=void 0===h?"input":h,p=Wk(t,AC),v=(0,e.useContext)(PC).controlId;return i=Jk(i,"form-check-input"),(0,$k.jsx)(d,me(me({},p),{},{ref:n,type:s,id:r||v,className:Qk()(a,i,c&&"is-valid",f&&"is-invalid")}))}));DC.displayName="FormCheckInput";var LC=DC,MC=["bsPrefix","className","htmlFor"],jC=e.forwardRef((function(t,n){var r=t.bsPrefix,i=t.className,a=t.htmlFor,o=Wk(t,MC),s=(0,e.useContext)(PC).controlId;return r=Jk(r,"form-check-label"),(0,$k.jsx)("label",me(me({},o),{},{ref:n,htmlFor:a||s,className:Qk()(i,r)}))}));jC.displayName="FormCheckLabel";var FC=jC;var UC=["id","bsPrefix","bsSwitchPrefix","inline","reverse","disabled","isValid","isInvalid","feedbackTooltip","feedback","feedbackType","className","style","title","type","label","children","as"],VC=e.forwardRef((function(t,n){var r=t.id,i=t.bsPrefix,a=t.bsSwitchPrefix,o=t.inline,s=void 0!==o&&o,u=t.reverse,c=void 0!==u&&u,l=t.disabled,f=void 0!==l&&l,h=t.isValid,d=void 0!==h&&h,p=t.isInvalid,v=void 0!==p&&p,m=t.feedbackTooltip,g=void 0!==m&&m,y=t.feedback,k=t.feedbackType,b=t.className,w=t.style,x=t.title,E=void 0===x?"":x,_=t.type,S=void 0===_?"checkbox":_,C=t.label,T=t.children,I=t.as,N=void 0===I?"input":I,O=Wk(t,UC);i=Jk(i,"form-check"),a=Jk(a,"form-switch");var R=(0,e.useContext)(PC).controlId,P=(0,e.useMemo)((function(){return{controlId:r||R}}),[R,r]),A=!T&&null!=C&&!1!==C||function(t,n){return e.Children.toArray(t).some((function(t){return e.isValidElement(t)&&t.type===n}))}(T,FC),D=(0,$k.jsx)(LC,me(me({},O),{},{type:"switch"===S?"checkbox":S,ref:n,isValid:d,isInvalid:v,disabled:f,as:N}));return(0,$k.jsx)(PC.Provider,{value:P,children:(0,$k.jsx)("div",{style:w,className:Qk()(b,A&&i,s&&"".concat(i,"-inline"),c&&"".concat(i,"-reverse"),"switch"===S&&a),children:T||(0,$k.jsxs)($k.Fragment,{children:[D,A&&(0,$k.jsx)(FC,{title:E,children:C}),y&&(0,$k.jsx)(RC,{type:k,tooltip:g,children:y})]})})})}));VC.displayName="FormCheck";var zC=Object.assign(VC,{Input:LC,Label:FC}),BC=["bsPrefix","type","size","htmlSize","id","className","isValid","isInvalid","plaintext","readOnly","as"],HC=e.forwardRef((function(t,n){var r,i,a=t.bsPrefix,o=t.type,s=t.size,u=t.htmlSize,c=t.id,l=t.className,f=t.isValid,h=void 0!==f&&f,d=t.isInvalid,p=void 0!==d&&d,v=t.plaintext,m=t.readOnly,g=t.as,k=void 0===g?"input":g,b=Wk(t,BC),w=(0,e.useContext)(PC).controlId;(a=Jk(a,"form-control"),v)?r=y({},"".concat(a,"-plaintext"),!0):(y(i={},a,!0),y(i,"".concat(a,"-").concat(s),s),r=i);return(0,$k.jsx)(k,me(me({},b),{},{type:o,size:u,ref:n,readOnly:m,id:c||w,className:Qk()(l,r,h&&"is-valid",p&&"is-invalid","color"===o&&"".concat(a,"-color"))}))}));HC.displayName="FormControl";var KC=Object.assign(HC,{Feedback:RC}),qC=mb("form-floating"),WC=["controlId","as"],GC=e.forwardRef((function(t,n){var r=t.controlId,i=t.as,a=void 0===i?"div":i,o=Wk(t,WC),s=(0,e.useMemo)((function(){return{controlId:r}}),[r]);return(0,$k.jsx)(PC.Provider,{value:s,children:(0,$k.jsx)(a,me(me({},o),{},{ref:n}))})}));GC.displayName="FormGroup";var QC=GC,$C=["as","bsPrefix","column","visuallyHidden","className","htmlFor"],YC=e.forwardRef((function(t,n){var r=t.as,i=void 0===r?"label":r,a=t.bsPrefix,o=t.column,s=void 0!==o&&o,u=t.visuallyHidden,c=void 0!==u&&u,l=t.className,f=t.htmlFor,h=Wk(t,$C),d=(0,e.useContext)(PC).controlId;a=Jk(a,"form-label");var p="col-form-label";"string"===typeof s&&(p="".concat(p," ").concat(p,"-").concat(s));var v=Qk()(l,a,c&&"visually-hidden",s&&p);return f=f||d,s?(0,$k.jsx)(aC,me({ref:n,as:"label",className:v,htmlFor:f},h)):(0,$k.jsx)(i,me({ref:n,className:v,htmlFor:f},h))}));YC.displayName="FormLabel";var XC=YC,JC=["bsPrefix","className","id"],ZC=e.forwardRef((function(t,n){var r=t.bsPrefix,i=t.className,a=t.id,o=Wk(t,JC),s=(0,e.useContext)(PC).controlId;return r=Jk(r,"form-range"),(0,$k.jsx)("input",me(me({},o),{},{type:"range",ref:n,className:Qk()(i,r),id:a||s}))}));ZC.displayName="FormRange";var eT=ZC,tT=["bsPrefix","size","htmlSize","className","isValid","isInvalid","id"],nT=e.forwardRef((function(t,n){var r=t.bsPrefix,i=t.size,a=t.htmlSize,o=t.className,s=t.isValid,u=void 0!==s&&s,c=t.isInvalid,l=void 0!==c&&c,f=t.id,h=Wk(t,tT),d=(0,e.useContext)(PC).controlId;return r=Jk(r,"form-select"),(0,$k.jsx)("select",me(me({},h),{},{size:a,ref:n,className:Qk()(o,r,i&&"".concat(r,"-").concat(i),u&&"is-valid",l&&"is-invalid"),id:f||d}))}));nT.displayName="FormSelect";var rT=nT,iT=["bsPrefix","className","as","muted"],aT=e.forwardRef((function(e,t){var n=e.bsPrefix,r=e.className,i=e.as,a=void 0===i?"small":i,o=e.muted,s=Wk(e,iT);return n=Jk(n,"form-text"),(0,$k.jsx)(a,me(me({},s),{},{ref:t,className:Qk()(r,n,o&&"text-muted")}))}));aT.displayName="FormText";var oT=aT,sT=e.forwardRef((function(e,t){return(0,$k.jsx)(zC,me(me({},e),{},{ref:t,type:"switch"}))}));sT.displayName="Switch";var uT=Object.assign(sT,{Input:zC.Input,Label:zC.Label}),cT=["bsPrefix","className","children","controlId","label"],lT=e.forwardRef((function(e,t){var n=e.bsPrefix,r=e.className,i=e.children,a=e.controlId,o=e.label,s=Wk(e,cT);return n=Jk(n,"form-floating"),(0,$k.jsxs)(QC,me(me({ref:t,className:Qk()(r,n),controlId:a},s),{},{children:[i,(0,$k.jsx)("label",{htmlFor:a,children:o})]}))}));lT.displayName="FloatingLabel";var fT=lT,hT=["className","validated","as"],dT={_ref:ox().any,validated:ox().bool,as:ox().elementType},pT=e.forwardRef((function(e,t){var n=e.className,r=e.validated,i=e.as,a=void 0===i?"form":i,o=Wk(e,hT);return(0,$k.jsx)(a,me(me({},o),{},{ref:t,className:Qk()(n,r&&"was-validated")}))}));pT.displayName="Form",pT.propTypes=dT;var vT=Object.assign(pT,{Group:QC,Control:KC,Floating:qC,Check:zC,Switch:uT,Label:XC,Text:oT,Range:eT,Select:rT,FloatingLabel:fT}),mT=(0,e.createContext)();function gT(t){var n=h((0,e.useState)(""),2),r=n[0],i=n[1],a=h((0,e.useState)(!1),2),o=a[0],s=a[1],u=h((0,e.useState)(""),2),c=u[0],l=u[1],f=h((0,e.useState)(!1),2),d=f[0],p=f[1],v=h((0,e.useState)(""),2),m=v[0],g=v[1],y=h((0,e.useState)(!1),2),k=y[0],b=y[1],w=(0,e.useContext)(mT),x=fn();return(0,e.useEffect)((function(){w&&(console.log(w),x("/"))}),[w]),(0,e.useEffect)((function(){r.length>=4?s(!0):s(!1)}),[r]),(0,e.useEffect)((function(){c.indexOf("@")>0?p(!0):p(!1)}),[c]),(0,e.useEffect)((function(){m.length>=8?b(!0):b(!1)}),[m]),(0,$k.jsx)(rb,{children:(0,$k.jsx)(tC,{children:(0,$k.jsx)(aC,{md:{span:4,offset:4},children:(0,$k.jsxs)(vT,{onSubmit:function(e){e.preventDefault(),t.handler(c,m)},children:[(0,$k.jsxs)(vT.Group,{children:[(0,$k.jsx)(vT.Label,{children:"Username"}),(0,$k.jsx)(vT.Control,{type:"text",name:"username",placeholder:"username",onChange:function(e){return i(e.target.value)}})]}),(0,$k.jsxs)(vT.Group,{children:[(0,$k.jsx)(vT.Label,{children:"Email"}),(0,$k.jsx)(vT.Control,{type:"email",name:"email",placeholder:"you@example.com",onChange:function(e){return l(e.target.value)}})]}),(0,$k.jsxs)(vT.Group,{children:[(0,$k.jsx)(vT.Label,{children:"Password"}),(0,$k.jsx)(vT.Control,{type:"password",name:"password",placeholder:"password",onChange:function(e){return g(e.target.value)}})]}),(0,$k.jsx)(FS,{variant:"primary",className:"mt-3 w-100",type:"submit",disabled:!(d&&k&&o),children:"Sign up"})]})})})})}function yT(t){var n=fn();return(0,e.useEffect)((function(){t.handler(),n("/")})),(0,$k.jsx)(rb,{children:(0,$k.jsx)(tC,{children:(0,$k.jsx)(aC,{})})})}function kT(t){var n=h((0,e.useState)(""),2),r=n[0],i=n[1],a=h((0,e.useState)(!1),2),o=a[0],s=a[1],u=h((0,e.useState)(""),2),c=u[0],l=u[1],f=h((0,e.useState)(!1),2),d=f[0],p=f[1],v=h((0,e.useState)(),2),m=v[0],g=v[1],y=fn();(0,e.useEffect)((function(){r.indexOf("@")>0?s(!0):s(!1)}),[r]),(0,e.useEffect)((function(){c.length>=8?p(!0):p(!1)}),[c]),(0,e.useEffect)((function(){t.authstate&&y("/")}),[t.authstate]);return(0,$k.jsx)(rb,{children:(0,$k.jsx)(tC,{children:(0,$k.jsx)(aC,{md:{span:4,offset:4},children:(0,$k.jsxs)(vT,{onSubmit:function(e){e.preventDefault(),t.handler(r,c).then((function(e){})).catch((function(e){switch(e){case"auth/invalid-email":g("The email address is invalid");break;case"auth/invalid-login-credentials":case"auth/user-not-found":g("Credentials supplied is not in our system")}}))},children:[(0,$k.jsxs)(vT.Group,{children:[(0,$k.jsx)(vT.Label,{children:"Email"}),(0,$k.jsx)(vT.Control,{type:"email",name:"email",placeholder:"you@example.com",value:r,onChange:function(e){return i(e.target.value)}})]}),(0,$k.jsxs)(vT.Group,{children:[(0,$k.jsx)(vT.Label,{children:"Password"}),(0,$k.jsx)(vT.Control,{type:"password",name:"password",placeholder:"your password",value:c,onChange:function(e){return l(e.target.value)}})]}),(0,$k.jsx)(FS,{variant:"primary",className:"mt-3 w-100",type:"submit",disabled:!o||!d,children:"Sign in"}),(0,$k.jsx)(vT.Text,{children:m})]})})})})}function bT(t){var n=h((0,e.useState)(),2),r=n[0],i=n[1],a=function(){var t=e.useContext(on).matches,n=t[t.length-1];return n?n.params:{}}().id;return(0,e.useEffect)((function(){r||t.handler(a).then((function(e){return i(e)}))}),[a]),r?(0,$k.jsxs)(rb,{children:[(0,$k.jsx)(tC,{children:(0,$k.jsx)(aC,{children:(0,$k.jsx)("h1",{className:"my-4",children:r.book_title})})}),(0,$k.jsxs)(tC,{children:[(0,$k.jsx)(aC,{md:6,children:(0,$k.jsx)(SC,{source:r.cover_image})}),(0,$k.jsxs)(aC,{md:6,children:[(0,$k.jsx)("h2",{children:"More information"}),(0,$k.jsx)("h3",{children:"Summary"}),(0,$k.jsx)("p",{children:r.summary}),(0,$k.jsx)("h3",{children:"Author"}),(0,$k.jsx)("p",{children:r.author}),(0,$k.jsx)("h3",{children:"ISBN"}),(0,$k.jsxs)("p",{children:["ISBN10: ",r.isbn10]}),(0,$k.jsxs)("p",{children:["ISBN13: ",r.isbn13]}),(0,$k.jsxs)(vT,{children:[(0,$k.jsx)("h3",{children:"Review this book"}),(0,$k.jsxs)(vT.Group,{children:[(0,$k.jsx)(vT.Label,{children:"Star"}),(0,$k.jsxs)(vT.Select,{children:[(0,$k.jsx)("option",{value:"1",children:"1"}),(0,$k.jsx)("option",{value:"2",children:"2"}),(0,$k.jsx)("option",{value:"3",children:"3"}),(0,$k.jsx)("option",{value:"4",children:"4"}),(0,$k.jsx)("option",{value:"5",children:"5"})]})]}),(0,$k.jsxs)(vT.Group,{children:[(0,$k.jsx)(vT.Label,{children:"Title"}),(0,$k.jsx)(vT.Control,{type:"text",placeholder:"I love this book"})]}),(0,$k.jsxs)(vT.Group,{children:[(0,$k.jsx)(vT.Label,{children:"Review"}),(0,$k.jsx)(vT.Control,{as:"textarea",rows:3,cols:30,placeholder:"I could not put this down!"})]}),(0,$k.jsx)(FS,{type:"submit",variant:"primary",children:"Submit"}),(0,$k.jsxs)(vT.Group,{children:[(0,$k.jsx)("h3",{children:"Existing reviews of this book"}),(0,$k.jsx)("p",{children:"To be added"})]})]})]})]}),(0,$k.jsx)(tC,{children:(0,$k.jsx)(aC,{})})]}):null}var wT=function(){var t=Xe(d),n=ns(t),r=Sy(t),i=Bk(t),o=[{label:"Home",link:"/"},{label:"About",link:"/about"},{label:"Contact",link:"/contact"},{label:"Create Account",link:"/signup"},{label:"Log in",link:"/signin"}],u=[{label:"Home",link:"/"},{label:"About",link:"/about"},{label:"Contact",link:"/contact"}],c=h((0,e.useState)(o),2),l=c[0],f=c[1],p=h((0,e.useState)(!1),2),v=p[0],m=p[1],g=h((0,e.useState)([]),2),y=g[0],k=g[1],b=h((0,e.useState)(!1),2),w=b[0],x=b[1];(0,e.useEffect)((function(){0===y.length&&!1===w&&(E(),x(!0))}),[y]),function(e,t,n,r){ne(e).onAuthStateChanged(t,n,r)}(n,(function(e){e?(m(e),f(u)):(m(!1),f(o))}));var E=function(){var e=s(a().mark((function e(){var t,n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Wy(wy(r,"books"));case 2:t=e.sent,n=[],t.forEach((function(e){var t=e.data();t.id=e.id,n.push(t)})),k(n);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),_=function(){var e=s(a().mark((function e(t){var n,i,o;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=xy(r,"books",t),e.next=3,Ky(n);case 3:return i=e.sent,(o=i.data()).id=t,e.abrupt("return",o);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return(0,$k.jsxs)("div",{className:"App",children:[(0,$k.jsx)(XS,{items:l,user:v}),(0,$k.jsx)(mT.Provider,{value:v,children:(0,$k.jsx)(_C.Provider,{value:i,children:(0,$k.jsxs)(Sn,{children:[(0,$k.jsx)(En,{path:"/",element:(0,$k.jsx)(CC,{items:y})}),(0,$k.jsx)(En,{path:"/about",element:(0,$k.jsx)(JS,{greeting:"Hey you, this is about page!",handler:function(e){alert(e)}})}),(0,$k.jsx)(En,{path:"/contact",element:(0,$k.jsx)(TC,{greeting:"Hey you, this is contact page!"})}),(0,$k.jsx)(En,{path:"/signup",element:(0,$k.jsx)(gT,{handler:function(e,t){(function(e,t,n){return aa.apply(this,arguments)})(n,e,t).then((function(e){})).catch((function(e){return console.log(e.message)}))}})}),(0,$k.jsx)(En,{path:"/signout",element:(0,$k.jsx)(yT,{handler:function(){(function(e){return ne(e).signOut()})(n).then((function(){}))}})}),(0,$k.jsx)(En,{path:"/signin",element:(0,$k.jsx)(kT,{handler:function(e,t){return new Promise((function(r,i){(function(e,t,n){return ta(ne(e),Mi.credential(t,n)).catch(function(){var t=s(a().mark((function t(n){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:throw n.code==="auth/".concat("password-does-not-meet-requirements")&&ra(e),n;case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())})(n,e,t).then((function(){r(!0)})).catch((function(e){console.log(e),i(e.code)}))}))},authstate:v})}),(0,$k.jsx)(En,{path:"/detail/:id",element:(0,$k.jsx)(bT,{handler:_})})]})})})]})},xT=function(e){e&&e instanceof Function&&n.e(787).then(n.bind(n,787)).then((function(t){var n=t.getCLS,r=t.getFID,i=t.getFCP,a=t.getLCP,o=t.getTTFB;n(e),r(e),i(e),a(e),o(e)}))};new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);var ET=t.startTransition;function _T(t){var n=t.basename,r=t.children,i=t.future,a=t.window,o=e.useRef();null==o.current&&(o.current=function(e){return void 0===e&&(e={}),Ct((function(e,t){var n=e.location;return Et("",{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:_t(t)}),null,e)}({window:a,v5Compat:!0}));var s=o.current,u=h(e.useState({action:s.action,location:s.location}),2),c=u[0],l=u[1],f=(i||{}).v7_startTransition,d=e.useCallback((function(e){f&&ET?ET((function(){return l(e)})):l(e)}),[l,f]);return e.useLayoutEffect((function(){return s.listen(d)}),[s,d]),e.createElement(_n,{basename:n,children:r,location:c.location,navigationType:c.action,navigator:s})}"undefined"!==typeof window&&"undefined"!==typeof window.document&&window.document.createElement;var ST,CT;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(ST||(ST={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(CT||(CT={}));r.createRoot(document.getElementById("root")).render((0,$k.jsx)(e.StrictMode,{children:(0,$k.jsx)(_T,{children:(0,$k.jsx)(wT,{})})})),xT()}()}();
|
|
//# sourceMappingURL=main.e1e22189.js.map
|