vendor: 19,492 bytes, lines 1-26
1function vT(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in t)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerpolicy&&(s.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?s.credentials="include":i.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var we=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Rp(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function xT(t){var e=t.default;if(typeof e=="function"){var n=function(){return e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var O={exports:{}},Ce={};/** 2 * @license React 3 * react.production.min.js 4 * 5 * Copyright (c) Facebook, Inc. and its affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var Ml=Symbol.for("react.element"),_T=Symbol.for("react.portal"),ET=Symbol.for("react.fragment"),wT=Symbol.for("react.strict_mode"),AT=Symbol.for("react.profiler"),CT=Symbol.for("react.provider"),TT=Symbol.for("react.context"),IT=Symbol.for("react.forward_ref"),ST=Symbol.for("react.suspense"),RT=Symbol.for("react.memo"),PT=Symbol.for("react.lazy"),Qg=Symbol.iterator;function kT(t){return t===null||typeof t!="object"?null:(t=Qg&&t[Qg]||t["@@iterator"],typeof t=="function"?t:null)}var b_={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},F_=Object.assign,N_={};function Ko(t,e,n){this.props=t,this.context=e,this.refs=N_,this.updater=n||b_}Ko.prototype.isReactComponent={};Ko.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};Ko.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function B_(){}B_.prototype=Ko.prototype;function Pp(t,e,n){this.props=t,this.context=e,this.refs=N_,this.updater=n||b_}var kp=Pp.prototype=new B_;kp.constructor=Pp;F_(kp,Ko.prototype);kp.isPureReactComponent=!0;var Xg=Array.isArray,O_=Object.prototype.hasOwnProperty,Dp={current:null},L_={key:!0,ref:!0,__self:!0,__source:!0};function M_(t,e,n){var r,i={},s=null,o=null;if(e!=null)for(r in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(s=""+e.key),e)O_.call(e,r)&&!L_.hasOwnProperty(r)&&(i[r]=e[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var u=Array(a),d=0;d<a;d++)u[d]=arguments[d+2];i.children=u}if(t&&t.defaultProps)for(r in a=t.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:Ml,type:t,key:s,ref:o,props:i,_owner:Dp.current}}function DT(t,e){return{$$typeof:Ml,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function bp(t){return typeof t=="object"&&t!==null&&t.$$typeof===Ml}function bT(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var Yg=/\/+/g;function gh(t,e){return typeof t=="object"&&t!==null&&t.key!=null?bT(""+t.key):e.toString(36)}function Zu(t,e,n,r,i){var s=typeof t;(s==="undefined"||s==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case Ml:case _T:o=!0}}if(o)return o=t,i=i(o),t=r===""?"."+gh(o,0):r,Xg(i)?(n="",t!=null&&(n=t.replace(Yg,"$&/")+"/"),Zu(i,e,n,"",function(d){return d})):i!=null&&(bp(i)&&(i=DT(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(Yg,"$&/")+"/")+t)),e.push(i)),1;if(o=0,r=r===""?".":r+":",Xg(t))for(var a=0;a<t.length;a++){s=t[a];var u=r+gh(s,a);o+=Zu(s,e,n,u,i)}else if(u=kT(t),typeof u=="function")for(t=u.call(t),a=0;!(s=t.next()).done;)s=s.value,u=r+gh(s,a++),o+=Zu(s,e,n,u,i);else if(s==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return o}function Tu(t,e,n){if(t==null)return t;var r=[],i=0;return Zu(t,r,"","",function(s){return e.call(n,s,i++)}),r}function FT(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var en={current:null},ec={transition:null},NT={ReactCurrentDispatcher:en,ReactCurrentBatchConfig:ec,ReactCurrentOwner:Dp};Ce.Children={map:Tu,forEach:function(t,e,n){Tu(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return Tu(t,function(){e++}),e},toArray:function(t){return Tu(t,function(e){return e})||[]},only:function(t){if(!bp(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};Ce.Component=Ko;Ce.Fragment=ET;Ce.Profiler=AT;Ce.PureComponent=Pp;Ce.StrictMode=wT;Ce.Suspense=ST;Ce.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=NT;Ce.cloneElement=function(t,e,n){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var r=F_({},t.props),i=t.key,s=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(s=e.ref,o=Dp.current),e.key!==void 0&&(i=""+e.key),t.type&&t.type.defaultProps)var a=t.type.defaultProps;for(u in e)O_.call(e,u)&&!L_.hasOwnProperty(u)&&(r[u]=e[u]===void 0&&a!==void 0?a[u]:e[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){a=Array(u);for(var d=0;d<u;d++)a[d]=arguments[d+2];r.children=a}return{$$typeof:Ml,type:t.type,key:i,ref:s,props:r,_owner:o}};Ce.createContext=function(t){return t={$$typeof:TT,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:CT,_context:t},t.Consumer=t};Ce.createElement=M_;Ce.createFactory=function(t){var e=M_.bind(null,t);return e.type=t,e};Ce.createRef=function(){return{current:null}};Ce.forwardRef=function(t){return{$$typeof:IT,render:t}};Ce.isValidElement=bp;Ce.lazy=function(t){return{$$typeof:PT,_payload:{_status:-1,_result:t},_init:FT}};Ce.memo=function(t,e){return{$$typeof:RT,type:t,compare:e===void 0?null:e}};Ce.startTransition=function(t){var e=ec.transition;ec.transition={};try{t()}finally{ec.transition=e}};Ce.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};Ce.useCallback=function(t,e){return en.current.useCallback(t,e)};Ce.useContext=function(t){return en.current.useContext(t)};Ce.useDebugValue=function(){};Ce.useDeferredValue=function(t){return en.current.useDeferredValue(t)};Ce.useEffect=function(t,e){return en.current.useEffect(t,e)};Ce.useId=function(){return en.current.useId()};Ce.useImperativeHandle=function(t,e,n){return en.current.useImperativeHandle(t,e,n)};Ce.useInsertionEffect=function(t,e){return en.current.useInsertionEffect(t,e)};Ce.useLayoutEffect=function(t,e){return en.current.useLayoutEffect(t,e)};Ce.useMemo=function(t,e){return en.current.useMemo(t,e)};Ce.useReducer=function(t,e,n){return en.current.useReducer(t,e,n)};Ce.useRef=function(t){return en.current.useRef(t)};Ce.useState=function(t){return en.current.useState(t)};Ce.useSyncExternalStore=function(t,e,n){return en.current.useSyncExternalStore(t,e,n)};Ce.useTransition=function(){return en.current.useTransition()};Ce.version="18.2.0";(function(t){t.exports=Ce})(O);const gs=Rp(O.exports),G0=vT({__proto__:null,default:gs},[O.exports]);var Jg={},Fp={exports:{}},Cn={},V_={exports:{}},U_={};/** 10 * @license React 11 * scheduler.production.min.js 12 * 13 * Copyright (c) Facebook, Inc. and its affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */(function(t){function e(L,G){var X=L.length;L.push(G);e:for(;0<X;){var V=X-1>>>1,$=L[V];if(0<i($,G))L[V]=G,L[X]=$,X=V;else break e}}function n(L){return L.length===0?null:L[0]}function r(L){if(L.length===0)return null;var G=L[0],X=L.pop();if(X!==G){L[0]=X;e:for(var V=0,$=L.length,H=$>>>1;V<H;){var K=2*(V+1)-1,ye=L[K],he=K+1,_e=L[he];if(0>i(ye,X))he<$&&0>i(_e,ye)?(L[V]=_e,L[he]=X,V=he):(L[V]=ye,L[K]=X,V=K);else if(he<$&&0>i(_e,X))L[V]=_e,L[he]=X,V=he;else break e}}return G}function i(L,G){var X=L.sortIndex-G.sortIndex;return X!==0?X:L.id-G.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var u=[],d=[],c=1,h=null,p=3,y=!1,v=!1,E=!1,I=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(L){for(var G=n(d);G!==null;){if(G.callback===null)r(d);else if(G.startTime<=L)r(d),G.sortIndex=G.expirationTime,e(u,G);else break;G=n(d)}}function R(L){if(E=!1,x(L),!v)if(n(u)!==null)v=!0,U(F);else{var G=n(d);G!==null&&W(R,G.startTime-L)}}function F(L,G){v=!1,E&&(E=!1,A(_),_=-1),y=!0;var X=p;try{for(x(G),h=n(u);h!==null&&(!(h.expirationTime>G)||L&&!S());){var V=h.callback;if(typeof V=="function"){h.callback=null,p=h.priorityLevel;var $=V(h.expirationTime<=G);G=t.unstable_now(),typeof $=="function"?h.callback=$:h===n(u)&&r(u),x(G)}else r(u);h=n(u)}if(h!==null)var H=!0;else{var K=n(d);K!==null&&W(R,K.startTime-G),H=!1}return H}finally{h=null,p=X,y=!1}}var b=!1,C=null,_=-1,T=5,w=-1;function S(){return!(t.unstable_now()-w<T)}function D(){if(C!==null){var L=t.unstable_now();w=L;var G=!0;try{G=C(!0,L)}finally{G?P():(b=!1,C=null)}}else b=!1}var P;if(typeof m=="function")P=function(){m(D)};else if(typeof MessageChannel<"u"){var N=new MessageChannel,B=N.port2;N.port1.onmessage=D,P=function(){B.postMessage(null)}}else P=function(){I(D,0)};function U(L){C=L,b||(b=!0,P())}function W(L,G){_=I(function(){L(t.unstable_now())},G)}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(L){L.callback=null},t.unstable_continueExecution=function(){v||y||(v=!0,U(F))},t.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<L?Math.floor(1e3/L):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return n(u)},t.unstable_next=function(L){switch(p){case 1:case 2:case 3:var G=3;break;default:G=p}var X=p;p=G;try{return L()}finally{p=X}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(L,G){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var X=p;p=L;try{return G()}finally{p=X}},t.unstable_scheduleCallback=function(L,G,X){var V=t.unstable_now();switch(typeof X=="object"&&X!==null?(X=X.delay,X=typeof X=="number"&&0<X?V+X:V):X=V,L){case 1:var $=-1;break;case 2:$=250;break;case 5:$=1073741823;break;case 4:$=1e4;break;default:$=5e3}return $=X+$,L={id:c++,callback:G,priorityLevel:L,startTime:X,expirationTime:$,sortIndex:-1},X>V?(L.sortIndex=X,e(d,L),n(u)===null&&L===n(d)&&(E?(A(_),_=-1):E=!0,W(R,X-V))):(L.sortIndex=$,e(u,L),v||y||(v=!0,U(F))),L},t.unstable_shouldYield=S,t.unstable_wrapCallback=function(L){var G=p;return function(){var X=p;p=G;try{return L.apply(this,arguments)}finally{p=X}}}})(U_);(function(t){t.exports=U_})(V_);/** 18 * @license React 19 * react-dom.production.min.js 20 * 21 * Copyright (c) Facebook, Inc. and its affiliates. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE file in the root directory of this source tree. 25 */var $_=O.exports,An=V_.exports;function Z(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var z_=new Set,ul={};function bs(t,e){ko(t,e),ko(t+"Capture",e)}function ko(t,e){for(ul[t]=e,t=0;t<e.length;t++)z_.add(e[t])}var Mr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),K0=Object.prototype.hasOwnProperty,BT=/^[: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]*$/,Zg={},ey={};function OT(t){return K0.call(ey,t)?!0:K0.call(Zg,t)?!1:BT.test(t)?ey[t]=!0:(Zg[t]=!0,!1)}function LT(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function MT(t,e,n,r){if(e===null||typeof e>"u"||LT(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function tn(t,e,n,r,i,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var Bt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Bt[t]=new tn(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Bt[e]=new tn(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Bt[t]=new tn(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Bt[t]=new tn(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){Bt[t]=new tn(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Bt[t]=new tn(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Bt[t]=new tn(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Bt[t]=new tn(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Bt[t]=new tn(t,5,!1,t.toLowerCase(),null,!1,!1)});var Np=/[\-:]([a-z])/g;function Bp(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(Np,Bp);Bt[e]=new tn(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(Np,Bp);Bt[e]=new tn(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(Np,Bp);Bt[e]=new tn(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Bt[t]=new tn(t,1,!1,t.toLowerCase(),null,!1,!1)});Bt.xlinkHref=new tn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Bt[t]=new tn(t,1,!1,t.toLowerCase(),null,!0,!0)});function Op(t,e,n,r){var i=Bt.hasOwnProperty(e)?Bt[e]:null;(i!==null?i.type!==0:r||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(MT(e,n,i,r)&&(n=null),r||i===null?OT(e)&&(n===null?t.removeAttribute(e):t.setAttribute(e,""+n)):i.mustUseProperty?t[i.propertyName]=n===null?i.type===3?!1:"":n:(e=i.attributeName,r=i.attributeNamespace,n===null?t.removeAttribute(e):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}var qr=$_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Iu=Symbol.for("react.element"),oo=Symbol.for("react.portal"),ao=Symbol.for("react.fragment"),Lp=Symbol.for("react.strict_mode"),Q0=Symbol.for("react.profiler"),j_=Symbol.for("react.provider"),H_=Symbol.for("react.context"),Mp=Symbol.for("react.forward_ref"),X0=Symbol.for("react.suspense"),Y0=Symbol.for("react.suspense_list"),Vp=Symbol.for("react.memo"),oi=Symbol.for("react.lazy"),q_=Symbol.for("react.offscreen"),ty=Symbol.iterator;function Ta(t){return t===null||typeof t!="object"?null:(t=ty&&t[ty]||t["@@iterator"],typeof t=="function"?t:null)}var Xe=Object.assign,yh;function Ma(t){if(yh===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);yh=e&&e[1]||""}return` 26`+yh+t}var vh=!1;function xh(t,e){if(!t||vh)return"";vh=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(d){var r=d}Reflect.construct(t,[],e)}else{try{e.call()}catch(d){r=d}t.call(e.prototype)}else{try{throw Error()}catch(d){r=d}t()}}
vendor: 7,492 bytes, lines 26-29
26catch(d){if(d&&r&&typeof d.stack=="string"){for(var i=d.stack.split(` 27`),s=r.stack.split(` 28`),o=i.length-1,a=s.length-1;1<=o&&0<=a&&i[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(i[o]!==s[a]){if(o!==1||a!==1)do if(o--,a--,0>a||i[o]!==s[a]){var u=` 29`+i[o].replace(" at new "," at ");return t.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",t.displayName)),u}while(1<=o&&0<=a);break}}}finally{vh=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?Ma(t):""}function VT(t){switch(t.tag){case 5:return Ma(t.type);case 16:return Ma("Lazy");case 13:return Ma("Suspense");case 19:return Ma("SuspenseList");case 0:case 2:case 15:return t=xh(t.type,!1),t;case 11:return t=xh(t.type.render,!1),t;case 1:return t=xh(t.type,!0),t;default:return""}}function J0(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case ao:return"Fragment";case oo:return"Portal";case Q0:return"Profiler";case Lp:return"StrictMode";case X0:return"Suspense";case Y0:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case H_:return(t.displayName||"Context")+".Consumer";case j_:return(t._context.displayName||"Context")+".Provider";case Mp:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Vp:return e=t.displayName||null,e!==null?e:J0(t.type)||"Memo";case oi:e=t._payload,t=t._init;try{return J0(t(e))}catch{}}return null}function UT(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return J0(e);case 8:return e===Lp?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Bi(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function W_(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function $T(t){var e=W_(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Su(t){t._valueTracker||(t._valueTracker=$T(t))}function G_(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=W_(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function Cc(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Z0(t,e){var n=e.checked;return Xe({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n!=null?n:t._wrapperState.initialChecked})}function ny(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=Bi(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function K_(t,e){e=e.checked,e!=null&&Op(t,"checked",e,!1)}function ef(t,e){K_(t,e);var n=Bi(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?tf(t,e.type,n):e.hasOwnProperty("defaultValue")&&tf(t,e.type,Bi(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function ry(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function tf(t,e,n){(e!=="number"||Cc(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Va=Array.isArray;function _o(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i<n.length;i++)e["$"+n[i]]=!0;for(n=0;n<t.length;n++)i=e.hasOwnProperty("$"+t[n].value),t[n].selected!==i&&(t[n].selected=i),i&&r&&(t[n].defaultSelected=!0)}else{for(n=""+Bi(n),e=null,i=0;i<t.length;i++){if(t[i].value===n){t[i].selected=!0,r&&(t[i].defaultSelected=!0);return}e!==null||t[i].disabled||(e=t[i])}e!==null&&(e.selected=!0)}}function nf(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(Z(91));return Xe({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function iy(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(Z(92));if(Va(n)){if(1<n.length)throw Error(Z(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:Bi(n)}}function Q_(t,e){var n=Bi(e.value),r=Bi(e.defaultValue);n!=null&&(n=""+n,n!==t.value&&(t.value=n),e.defaultValue==null&&t.defaultValue!==n&&(t.defaultValue=n)),r!=null&&(t.defaultValue=""+r)}function sy(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function X_(t){switch(t){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 rf(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?X_(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var Ru,Y_=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,n,r,i){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,i)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(Ru=Ru||document.createElement("div"),Ru.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=Ru.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function cl(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var Qa={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},zT=["Webkit","ms","Moz","O"];
vendor: 15,098 bytes, line 29
29Object.keys(Qa).forEach(function(t){zT.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Qa[e]=Qa[t]})});function J_(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||Qa.hasOwnProperty(t)&&Qa[t]?(""+e).trim():e+"px"}function Z_(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=J_(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var jT=Xe({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 sf(t,e){if(e){if(jT[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(Z(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(Z(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(Z(61))}if(e.style!=null&&typeof e.style!="object")throw Error(Z(62))}}function of(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var af=null;function Up(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var lf=null,Eo=null,wo=null;function oy(t){if(t=$l(t)){if(typeof lf!="function")throw Error(Z(280));var e=t.stateNode;e&&(e=yd(e),lf(t.stateNode,t.type,e))}}function e1(t){Eo?wo?wo.push(t):wo=[t]:Eo=t}function t1(){if(Eo){var t=Eo,e=wo;if(wo=Eo=null,oy(t),e)for(t=0;t<e.length;t++)oy(e[t])}}function n1(t,e){return t(e)}function r1(){}var _h=!1;function i1(t,e,n){if(_h)return t(e,n);_h=!0;try{return n1(t,e,n)}finally{_h=!1,(Eo!==null||wo!==null)&&(r1(),t1())}}function dl(t,e){var n=t.stateNode;if(n===null)return null;var r=yd(n);if(r===null)return null;n=r[e];e:switch(e){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)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break e;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(Z(231,e,typeof n));return n}var uf=!1;if(Mr)try{var Ia={};Object.defineProperty(Ia,"passive",{get:function(){uf=!0}}),window.addEventListener("test",Ia,Ia),window.removeEventListener("test",Ia,Ia)}catch{uf=!1}function HT(t,e,n,r,i,s,o,a,u){var d=Array.prototype.slice.call(arguments,3);try{e.apply(n,d)}catch(c){this.onError(c)}}var Xa=!1,Tc=null,Ic=!1,cf=null,qT={onError:function(t){Xa=!0,Tc=t}};function WT(t,e,n,r,i,s,o,a,u){Xa=!1,Tc=null,HT.apply(qT,arguments)}function GT(t,e,n,r,i,s,o,a,u){if(WT.apply(this,arguments),Xa){if(Xa){var d=Tc;Xa=!1,Tc=null}else throw Error(Z(198));Ic||(Ic=!0,cf=d)}}function Fs(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,(e.flags&4098)!==0&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function s1(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function ay(t){if(Fs(t)!==t)throw Error(Z(188))}function KT(t){var e=t.alternate;if(!e){if(e=Fs(t),e===null)throw Error(Z(188));return e!==t?null:t}for(var n=t,r=e;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return ay(i),t;if(s===r)return ay(i),e;s=s.sibling}throw Error(Z(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o)throw Error(Z(189))}}if(n.alternate!==r)throw Error(Z(190))}if(n.tag!==3)throw Error(Z(188));return n.stateNode.current===n?t:e}function o1(t){return t=KT(t),t!==null?a1(t):null}function a1(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=a1(t);if(e!==null)return e;t=t.sibling}return null}var l1=An.unstable_scheduleCallback,ly=An.unstable_cancelCallback,QT=An.unstable_shouldYield,XT=An.unstable_requestPaint,rt=An.unstable_now,YT=An.unstable_getCurrentPriorityLevel,$p=An.unstable_ImmediatePriority,u1=An.unstable_UserBlockingPriority,Sc=An.unstable_NormalPriority,JT=An.unstable_LowPriority,c1=An.unstable_IdlePriority,fd=null,mr=null;function ZT(t){if(mr&&typeof mr.onCommitFiberRoot=="function")try{mr.onCommitFiberRoot(fd,t,void 0,(t.current.flags&128)===128)}catch{}}var Yn=Math.clz32?Math.clz32:nI,eI=Math.log,tI=Math.LN2;function nI(t){return t>>>=0,t===0?32:31-(eI(t)/tI|0)|0}var Pu=64,ku=4194304;function Ua(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Rc(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,s=t.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=Ua(a):(s&=o,s!==0&&(r=Ua(s)))}else o=n&~i,o!==0?r=Ua(o):s!==0&&(r=Ua(s));if(r===0)return 0;if(e!==0&&e!==r&&(e&i)===0&&(i=r&-r,s=e&-e,i>=s||i===16&&(s&4194240)!==0))return e;if((r&4)!==0&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0<e;)n=31-Yn(e),i=1<<n,r|=t[n],e&=~i;return r}function rI(t,e){switch(t){case 1:case 2:case 4:return e+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 e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function iI(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,i=t.expirationTimes,s=t.pendingLanes;0<s;){var o=31-Yn(s),a=1<<o,u=i[o];u===-1?((a&n)===0||(a&r)!==0)&&(i[o]=rI(a,e)):u<=e&&(t.expiredLanes|=a),s&=~a}}function df(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function d1(){var t=Pu;return Pu<<=1,(Pu&4194240)===0&&(Pu=64),t}function Eh(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function Vl(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Yn(e),t[e]=n}function sI(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0<n;){var i=31-Yn(n),s=1<<i;e[i]=0,r[i]=-1,t[i]=-1,n&=~s}}function zp(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-Yn(n),i=1<<r;i&e|t[r]&e&&(t[r]|=e),n&=~i}}var be=0;function h1(t){return t&=-t,1<t?4<t?(t&268435455)!==0?16:536870912:4:1}var f1,jp,p1,m1,g1,hf=!1,Du=[],xi=null,_i=null,Ei=null,hl=new Map,fl=new Map,ui=[],oI="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 uy(t,e){switch(t){case"focusin":case"focusout":xi=null;break;case"dragenter":case"dragleave":_i=null;break;case"mouseover":case"mouseout":Ei=null;break;case"pointerover":case"pointerout":hl.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":fl.delete(e.pointerId)}}function Sa(t,e,n,r,i,s){return t===null||t.nativeEvent!==s?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},e!==null&&(e=$l(e),e!==null&&jp(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),t)}function aI(t,e,n,r,i){switch(e){case"focusin":return xi=Sa(xi,t,e,n,r,i),!0;case"dragenter":return _i=Sa(_i,t,e,n,r,i),!0;case"mouseover":return Ei=Sa(Ei,t,e,n,r,i),!0;case"pointerover":var s=i.pointerId;return hl.set(s,Sa(hl.get(s)||null,t,e,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,fl.set(s,Sa(fl.get(s)||null,t,e,n,r,i)),!0}return!1}function y1(t){var e=cs(t.target);if(e!==null){var n=Fs(e);if(n!==null){if(e=n.tag,e===13){if(e=s1(n),e!==null){t.blockedOn=e,g1(t.priority,function(){p1(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function tc(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=ff(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var r=new n.constructor(n.type,n);af=r,n.target.dispatchEvent(r),af=null}else return e=$l(n),e!==null&&jp(e),t.blockedOn=n,!1;e.shift()}return!0}function cy(t,e,n){tc(t)&&n.delete(e)}function lI(){hf=!1,xi!==null&&tc(xi)&&(xi=null),_i!==null&&tc(_i)&&(_i=null),Ei!==null&&tc(Ei)&&(Ei=null),hl.forEach(cy),fl.forEach(cy)}function Ra(t,e){t.blockedOn===e&&(t.blockedOn=null,hf||(hf=!0,An.unstable_scheduleCallback(An.unstable_NormalPriority,lI)))}function pl(t){function e(i){return Ra(i,t)}if(0<Du.length){Ra(Du[0],t);for(var n=1;n<Du.length;n++){var r=Du[n];r.blockedOn===t&&(r.blockedOn=null)}}for(xi!==null&&Ra(xi,t),_i!==null&&Ra(_i,t),Ei!==null&&Ra(Ei,t),hl.forEach(e),fl.forEach(e),n=0;n<ui.length;n++)r=ui[n],r.blockedOn===t&&(r.blockedOn=null);for(;0<ui.length&&(n=ui[0],n.blockedOn===null);)y1(n),n.blockedOn===null&&ui.shift()}var Ao=qr.ReactCurrentBatchConfig,Pc=!0;function uI(t,e,n,r){var i=be,s=Ao.transition;Ao.transition=null;try{be=1,Hp(t,e,n,r)}finally{be=i,Ao.transition=s}}function cI(t,e,n,r){var i=be,s=Ao.transition;Ao.transition=null;try{be=4,Hp(t,e,n,r)}finally{be=i,Ao.transition=s}}function Hp(t,e,n,r){if(Pc){var i=ff(t,e,n,r);if(i===null)Dh(t,e,r,kc,n),uy(t,r);else if(aI(i,t,e,n,r))r.stopPropagation();else if(uy(t,r),e&4&&-1<oI.indexOf(t)){for(;i!==null;){var s=$l(i);if(s!==null&&f1(s),s=ff(t,e,n,r),s===null&&Dh(t,e,r,kc,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else Dh(t,e,r,null,n)}}var kc=null;function ff(t,e,n,r){if(kc=null,t=Up(r),t=cs(t),t!==null)if(e=Fs(t),e===null)t=null;else if(n=e.tag,n===13){if(t=s1(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return kc=t,null}function v1(t){switch(t){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(YT()){case $p:return 1;case u1:return 4;case Sc:case JT:return 16;case c1:return 536870912;default:return 16}default:return 16}}var mi=null,qp=null,nc=null;function x1(){if(nc)return nc;var t,e=qp,n=e.length,r,i="value"in mi?mi.value:mi.textContent,s=i.length;for(t=0;t<n&&e[t]===i[t];t++);var o=n-t;for(r=1;r<=o&&e[n-r]===i[s-r];r++);return nc=i.slice(t,1<r?1-r:void 0)}function rc(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function bu(){return!0}function dy(){return!1}function Tn(t){function e(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in t)t.hasOwnProperty(a)&&(n=t[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?bu:dy,this.isPropagationStopped=dy,this}return Xe(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=bu)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=bu)},persist:function(){},isPersistent:bu}),e}var Qo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Wp=Tn(Qo),Ul=Xe({},Qo,{view:0,detail:0}),dI=Tn(Ul),wh,Ah,Pa,pd=Xe({},Ul,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Gp,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Pa&&(Pa&&t.type==="mousemove"?(wh=t.screenX-Pa.screenX,Ah=t.screenY-Pa.screenY):Ah=wh=0,Pa=t),wh)},movementY:function(t){return"movementY"in t?t.movementY:Ah}}),hy=Tn(pd),hI=Xe({},pd,{dataTransfer:0}),fI=Tn(hI),pI=Xe({},Ul,{relatedTarget:0}),Ch=Tn(pI),mI=Xe({},Qo,{animationName:0,elapsedTime:0,pseudoElement:0}),gI=Tn(mI),yI=Xe({},Qo,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),vI=Tn(yI),xI=Xe({},Qo,{data:0}),fy=Tn(xI),_I={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},EI={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"},wI={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function AI(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=wI[t])?!!e[t]:!1}function Gp(){return AI}var CI=Xe({},Ul,{key:function(t){if(t.key){var e=_I[t.key]||t.key;if(e!=="Unidentified")return e}
vendor: 6,048 bytes, line 29
29return t.type==="keypress"?(t=rc(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?EI[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Gp,charCode:function(t){return t.type==="keypress"?rc(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?rc(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),TI=Tn(CI),II=Xe({},pd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),py=Tn(II),SI=Xe({},Ul,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Gp}),RI=Tn(SI),PI=Xe({},Qo,{propertyName:0,elapsedTime:0,pseudoElement:0}),kI=Tn(PI),DI=Xe({},pd,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),bI=Tn(DI),FI=[9,13,27,32],Kp=Mr&&"CompositionEvent"in window,Ya=null;Mr&&"documentMode"in document&&(Ya=document.documentMode);var NI=Mr&&"TextEvent"in window&&!Ya,_1=Mr&&(!Kp||Ya&&8<Ya&&11>=Ya),my=String.fromCharCode(32),gy=!1;function E1(t,e){switch(t){case"keyup":return FI.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function w1(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var lo=!1;function BI(t,e){switch(t){case"compositionend":return w1(e);case"keypress":return e.which!==32?null:(gy=!0,my);case"textInput":return t=e.data,t===my&&gy?null:t;default:return null}}function OI(t,e){if(lo)return t==="compositionend"||!Kp&&E1(t,e)?(t=x1(),nc=qp=mi=null,lo=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return _1&&e.locale!=="ko"?null:e.data;default:return null}}var LI={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 yy(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!LI[t.type]:e==="textarea"}function A1(t,e,n,r){e1(r),e=Dc(e,"onChange"),0<e.length&&(n=new Wp("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var Ja=null,ml=null;function MI(t){N1(t,0)}function md(t){var e=ho(t);if(G_(e))return t}function VI(t,e){if(t==="change")return e}var C1=!1;if(Mr){var Th;if(Mr){var Ih="oninput"in document;if(!Ih){var vy=document.createElement("div");vy.setAttribute("oninput","return;"),Ih=typeof vy.oninput=="function"}Th=Ih}else Th=!1;C1=Th&&(!document.documentMode||9<document.documentMode)}function xy(){Ja&&(Ja.detachEvent("onpropertychange",T1),ml=Ja=null)}function T1(t){if(t.propertyName==="value"&&md(ml)){var e=[];A1(e,ml,t,Up(t)),i1(MI,e)}}function UI(t,e,n){t==="focusin"?(xy(),Ja=e,ml=n,Ja.attachEvent("onpropertychange",T1)):t==="focusout"&&xy()}function $I(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return md(ml)}function zI(t,e){if(t==="click")return md(e)}function jI(t,e){if(t==="input"||t==="change")return md(e)}function HI(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var er=typeof Object.is=="function"?Object.is:HI;function gl(t,e){if(er(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!K0.call(e,i)||!er(t[i],e[i]))return!1}return!0}function _y(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Ey(t,e){var n=_y(t);t=0;for(var r;n;){if(n.nodeType===3){if(r=t+n.textContent.length,t<=e&&r>=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=_y(n)}}function I1(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?I1(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function S1(){for(var t=window,e=Cc();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=Cc(t.document)}return e}function Qp(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function qI(t){var e=S1(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&I1(n.ownerDocument.documentElement,n)){if(r!==null&&Qp(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!t.extend&&s>r&&(i=r,r=s,s=i),i=Ey(n,s);var o=Ey(n,r);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),s>r?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<e.length;n++)t=e[n],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var WI=Mr&&"documentMode"in document&&11>=document.documentMode,uo=null,pf=null,Za=null,mf=!1;function wy(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;mf||uo==null||uo!==Cc(r)||(r=uo,"selectionStart"in r&&Qp(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focu
vendor: 4,507 bytes, line 29
29sNode:r.focusNode,focusOffset:r.focusOffset}),Za&&gl(Za,r)||(Za=r,r=Dc(pf,"onSelect"),0<r.length&&(e=new Wp("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=uo)))}function Fu(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var co={animationend:Fu("Animation","AnimationEnd"),animationiteration:Fu("Animation","AnimationIteration"),animationstart:Fu("Animation","AnimationStart"),transitionend:Fu("Transition","TransitionEnd")},Sh={},R1={};Mr&&(R1=document.createElement("div").style,"AnimationEvent"in window||(delete co.animationend.animation,delete co.animationiteration.animation,delete co.animationstart.animation),"TransitionEvent"in window||delete co.transitionend.transition);function gd(t){if(Sh[t])return Sh[t];if(!co[t])return t;var e=co[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in R1)return Sh[t]=e[n];return t}var P1=gd("animationend"),k1=gd("animationiteration"),D1=gd("animationstart"),b1=gd("transitionend"),F1=new Map,Ay="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 Ui(t,e){F1.set(t,e),bs(e,[t])}for(var Rh=0;Rh<Ay.length;Rh++){var Ph=Ay[Rh],GI=Ph.toLowerCase(),KI=Ph[0].toUpperCase()+Ph.slice(1);Ui(GI,"on"+KI)}Ui(P1,"onAnimationEnd");Ui(k1,"onAnimationIteration");Ui(D1,"onAnimationStart");Ui("dblclick","onDoubleClick");Ui("focusin","onFocus");Ui("focusout","onBlur");Ui(b1,"onTransitionEnd");ko("onMouseEnter",["mouseout","mouseover"]);ko("onMouseLeave",["mouseout","mouseover"]);ko("onPointerEnter",["pointerout","pointerover"]);ko("onPointerLeave",["pointerout","pointerover"]);bs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));bs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));bs("onBeforeInput",["compositionend","keypress","textInput","paste"]);bs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));bs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));bs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var $a="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(" "),QI=new Set("cancel close invalid load scroll toggle".split(" ").concat($a));function Cy(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,GT(r,e,void 0,t),t.currentTarget=null}function N1(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var r=t[n],i=r.event;r=r.listeners;e:{var s=void 0;if(e)for(var o=r.length-1;0<=o;o--){var a=r[o],u=a.instance,d=a.currentTarget;if(a=a.listener,u!==s&&i.isPropagationStopped())break e;Cy(i,a,d),s=u}else for(o=0;o<r.length;o++){if(a=r[o],u=a.instance,d=a.currentTarget,a=a.listener,u!==s&&i.isPropagationStopped())break e;Cy(i,a,d),s=u}}}if(Ic)throw t=cf,Ic=!1,cf=null,t}function ze(t,e){var n=e[_f];n===void 0&&(n=e[_f]=new Set);var r=t+"__bubble";n.has(r)||(B1(e,t,2,!1),n.add(r))}function kh(t,e,n){var r=0;e&&(r|=4),B1(n,t,r,e)}var Nu="_reactListening"+Math.random().toString(36).slice(2);function yl(t){if(!t[Nu]){t[Nu]=!0,z_.forEach(function(n){n!=="selectionchange"&&(QI.has(n)||kh(n,!1,t),kh(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Nu]||(e[Nu]=!0,kh("selectionchange",!1,e))}}function B1(t,e,n,r){switch(v1(e)){case 1:var i=uI;break;case 4:i=cI;break;default:i=Hp}n=i.bind(null,e,n,t),i=void 0,!uf||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(i=!0),r?i!==void 0?t.addEventListener(e,n,{capture:!0,passive:i}):t.addEventListener(e,n,!0):i!==void 0?t.addEventListener(e,n,{passive:i}):t.addEventListener(e,n,!1)}function Dh(t,e,n,r,i){var s=r;if((e&1)===0&&(e&2)===0&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;
vendor: 41,125 bytes, lines 29-32
29if(a===i||a.nodeType===8&&a.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var u=o.tag;if((u===3||u===4)&&(u=o.stateNode.containerInfo,u===i||u.nodeType===8&&u.parentNode===i))return;o=o.return}for(;a!==null;){if(o=cs(a),o===null)return;if(u=o.tag,u===5||u===6){r=s=o;continue e}a=a.parentNode}}r=r.return}i1(function(){var d=s,c=Up(n),h=[];e:{var p=F1.get(t);if(p!==void 0){var y=Wp,v=t;switch(t){case"keypress":if(rc(n)===0)break e;case"keydown":case"keyup":y=TI;break;case"focusin":v="focus",y=Ch;break;case"focusout":v="blur",y=Ch;break;case"beforeblur":case"afterblur":y=Ch;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":y=hy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=fI;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=RI;break;case P1:case k1:case D1:y=gI;break;case b1:y=kI;break;case"scroll":y=dI;break;case"wheel":y=bI;break;case"copy":case"cut":case"paste":y=vI;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=py}var E=(e&4)!==0,I=!E&&t==="scroll",A=E?p!==null?p+"Capture":null:p;E=[];for(var m=d,x;m!==null;){x=m;var R=x.stateNode;if(x.tag===5&&R!==null&&(x=R,A!==null&&(R=dl(m,A),R!=null&&E.push(vl(m,R,x)))),I)break;m=m.return}0<E.length&&(p=new y(p,v,null,n,c),h.push({event:p,listeners:E}))}}if((e&7)===0){e:{if(p=t==="mouseover"||t==="pointerover",y=t==="mouseout"||t==="pointerout",p&&n!==af&&(v=n.relatedTarget||n.fromElement)&&(cs(v)||v[Vr]))break e;if((y||p)&&(p=c.window===c?c:(p=c.ownerDocument)?p.defaultView||p.parentWindow:window,y?(v=n.relatedTarget||n.toElement,y=d,v=v?cs(v):null,v!==null&&(I=Fs(v),v!==I||v.tag!==5&&v.tag!==6)&&(v=null)):(y=null,v=d),y!==v)){if(E=hy,R="onMouseLeave",A="onMouseEnter",m="mouse",(t==="pointerout"||t==="pointerover")&&(E=py,R="onPointerLeave",A="onPointerEnter",m="pointer"),I=y==null?p:ho(y),x=v==null?p:ho(v),p=new E(R,m+"leave",y,n,c),p.target=I,p.relatedTarget=x,R=null,cs(c)===d&&(E=new E(A,m+"enter",v,n,c),E.target=x,E.relatedTarget=I,R=E),I=R,y&&v)t:{for(E=y,A=v,m=0,x=E;x;x=Js(x))m++;for(x=0,R=A;R;R=Js(R))x++;for(;0<m-x;)E=Js(E),m--;for(;0<x-m;)A=Js(A),x--;for(;m--;){if(E===A||A!==null&&E===A.alternate)break t;E=Js(E),A=Js(A)}E=null}else E=null;y!==null&&Ty(h,p,y,E,!1),v!==null&&I!==null&&Ty(h,I,v,E,!0)}}e:{if(p=d?ho(d):window,y=p.nodeName&&p.nodeName.toLowerCase(),y==="select"||y==="input"&&p.type==="file")var F=VI;else if(yy(p))if(C1)F=jI;else{F=$I;var b=UI}else(y=p.nodeName)&&y.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(F=zI);if(F&&(F=F(t,d))){A1(h,F,n,c);break e}b&&b(t,p,d),t==="focusout"&&(b=p._wrapperState)&&b.controlled&&p.type==="number"&&tf(p,"number",p.value)}switch(b=d?ho(d):window,t){case"focusin":(yy(b)||b.contentEditable==="true")&&(uo=b,pf=d,Za=null);break;case"focusout":Za=pf=uo=null;break;case"mousedown":mf=!0;break;case"contextmenu":case"mouseup":case"dragend":mf=!1,wy(h,n,c);break;case"selectionchange":if(WI)break;case"keydown":case"keyup":wy(h,n,c)}var C;if(Kp)e:{switch(t){case"compositionstart":var _="onCompositionStart";break e;case"compositionend":_="onCompositionEnd";break e;case"compositionupdate":_="onCompositionUpdate";break e}_=void 0}else lo?E1(t,n)&&(_="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(_="onCompositionStart");_&&(_1&&n.locale!=="ko"&&(lo||_!=="onCompositionStart"?_==="onCompositionEnd"&&lo&&(C=x1()):(mi=c,qp="value"in mi?mi.value:mi.textContent,lo=!0)),b=Dc(d,_),0<b.length&&(_=new fy(_,t,null,n,c),h.push({event:_,listeners:b}),C?_.data=C:(C=w1(n),C!==null&&(_.data=C)))),(C=NI?BI(t,n):OI(t,n))&&(d=Dc(d,"onBeforeInput"),0<d.length&&(c=new fy("onBeforeInput","beforeinput",null,n,c),h.push({event:c,listeners:d}),c.data=C))}N1(h,e)})}function vl(t,e,n){return{instance:t,listener:e,currentTarget:n}}function Dc(t,e){for(var n=e+"Capture",r=[];t!==null;){var i=t,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=dl(t,n),s!=null&&r.unshift(vl(t,s,i)),s=dl(t,e),s!=null&&r.push(vl(t,s,i))),t=t.return}return r}function Js(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function Ty(t,e,n,r,i){for(var s=e._reactName,o=[];n!==null&&n!==r;){var a=n,u=a.alternate,d=a.stateNode;if(u!==null&&u===r)break;a.tag===5&&d!==null&&(a=d,i?(u=dl(n,s),u!=null&&o.unshift(vl(n,u,a))):i||(u=dl(n,s),u!=null&&o.push(vl(n,u,a)))),n=n.return}o.length!==0&&t.push({event:e,listeners:o})}var XI=/\r\n?/g,YI=/\u0000|\uFFFD/g;function Iy(t){return(typeof t=="string"?t:""+t).replace(XI,` 30`).replace(YI,"")}function Bu(t,e,n){if(e=Iy(e),Iy(t)!==e&&n)throw Error(Z(425))}function bc(){}var gf=null,yf=null;function vf(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var xf=typeof setTimeout=="function"?setTimeout:void 0,JI=typeof clearTimeout=="function"?clearTimeout:void 0,Sy=typeof Promise=="function"?Promise:void 0,ZI=typeof queueMicrotask=="function"?queueMicrotask:typeof Sy<"u"?function(t){return Sy.resolve(null).then(t).catch(eS)}:xf;function eS(t){setTimeout(function(){throw t})}function bh(t,e){var n=e,r=0;do{var i=n.nextSibling;if(t.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){t.removeChild(i),pl(e);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);pl(e)}function wi(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function Ry(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"){if(e===0)return t;e--}else n==="/$"&&e++}t=t.previousSibling}return null}var Xo=Math.random().toString(36).slice(2),hr="__reactFiber$"+Xo,xl="__reactProps$"+Xo,Vr="__reactContainer$"+Xo,_f="__reactEvents$"+Xo,tS="__reactListeners$"+Xo,nS="__reactHandles$"+Xo;function cs(t){var e=t[hr];if(e)return e;for(var n=t.parentNode;n;){if(e=n[Vr]||n[hr]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=Ry(t);t!==null;){if(n=t[hr])return n;t=Ry(t)}return e}t=n,n=t.parentNode}return null}function $l(t){return t=t[hr]||t[Vr],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function ho(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(Z(33))}function yd(t){return t[xl]||null}var Ef=[],fo=-1;function $i(t){return{current:t}}function He(t){0>fo||(t.current=Ef[fo],Ef[fo]=null,fo--)}function Me(t,e){fo++,Ef[fo]=t.current,t.current=e}var Oi={},Qt=$i(Oi),dn=$i(!1),Es=Oi;function Do(t,e){var n=t.type.contextTypes;if(!n)return Oi;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=e[s];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function hn(t){return t=t.childContextTypes,t!=null}function Fc(){He(dn),He(Qt)}function Py(t,e,n){if(Qt.current!==Oi)throw Error(Z(168));Me(Qt,e),Me(dn,n)}function O1(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(Z(108,UT(t)||"Unknown",i));return Xe({},n,r)}function Nc(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Oi,Es=Qt.current,Me(Qt,t),Me(dn,dn.current),!0}function ky(t,e,n){var r=t.stateNode;if(!r)throw Error(Z(169));n?(t=O1(t,e,Es),r.__reactInternalMemoizedMergedChildContext=t,He(dn),He(Qt),Me(Qt,t)):He(dn),Me(dn,n)}var Pr=null,vd=!1,Fh=!1;function L1(t){Pr===null?Pr=[t]:Pr.push(t)}function rS(t){vd=!0,L1(t)}function zi(){if(!Fh&&Pr!==null){Fh=!0;var t=0,e=be;try{var n=Pr;for(be=1;t<n.length;t++){var r=n[t];do r=r(!0);while(r!==null)}Pr=null,vd=!1}catch(i){throw Pr!==null&&(Pr=Pr.slice(t+1)),l1($p,zi),i}finally{be=e,Fh=!1}}return null}var po=[],mo=0,Bc=null,Oc=0,kn=[],Dn=0,ws=null,Dr=1,br="";function ss(t,e){po[mo++]=Oc,po[mo++]=Bc,Bc=t,Oc=e}function M1(t,e,n){kn[Dn++]=Dr,kn[Dn++]=br,kn[Dn++]=ws,ws=t;var r=Dr;t=br;var i=32-Yn(r)-1;r&=~(1<<i),n+=1;var s=32-Yn(e)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Dr=1<<32-Yn(e)+i|n<<i|r,br=s+t}else Dr=1<<s|n<<i|r,br=t}function Xp(t){t.return!==null&&(ss(t,1),M1(t,1,0))}function Yp(t){for(;t===Bc;)Bc=po[--mo],po[mo]=null,Oc=po[--mo],po[mo]=null;for(;t===ws;)ws=kn[--Dn],kn[Dn]=null,br=kn[--Dn],kn[Dn]=null,Dr=kn[--Dn],kn[Dn]=null}var En=null,xn=null,We=!1,Xn=null;function V1(t,e){var n=bn(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,e=t.deletions,e===null?(t.deletions=[n],t.flags|=16):e.push(n)}function Dy(t,e){switch(t.tag){case 5:var n=t.type;return e=e.nodeType!==1||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,En=t,xn=wi(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,En=t,xn=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=ws!==null?{id:Dr,overflow:br}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=bn(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,En=t,xn=null,!0):!1;default:return!1}}function wf(t){return(t.mode&1)!==0&&(t.flags&128)===0}function Af(t){if(We){var e=xn;if(e){var n=e;if(!Dy(t,e)){if(wf(t))throw Error(Z(418));e=wi(n.nextSibling);var r=En;e&&Dy(t,e)?V1(r,n):(t.flags=t.flags&-4097|2,We=!1,En=t)}}else{if(wf(t))throw Error(Z(418));t.flags=t.flags&-4097|2,We=!1,En=t}}}function by(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;En=t}function Ou(t){if(t!==En)return!1;if(!We)return by(t),We=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!vf(t.type,t.memoizedProps)),e&&(e=xn)){if(wf(t))throw U1(),Error(Z(418));for(;e;)V1(t,e),e=wi(e.nextSibling)}if(by(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(Z(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){xn=wi(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}xn=null}}else xn=En?wi(t.stateNode.nextSibling):null;return!0}function U1(){for(var t=xn;t;)t=wi(t.nextSibling)}function bo(){xn=En=null,We=!1}function Jp(t){Xn===null?Xn=[t]:Xn.push(t)}var iS=qr.ReactCurrentBatchConfig;function Kn(t,e){if(t&&t.defaultProps){e=Xe({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}var Lc=$i(null),Mc=null,go=null,Zp=null;function em(){Zp=go=Mc=null}function tm(t){var e=Lc.current;He(Lc),t._currentValue=e}function Cf(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function Co(t,e){Mc=t,Zp=go=null,t=t.dependencies,t!==null&&t.firstContext!==null&&((t.lanes&e)!==0&&(cn=!0),t.firstContext=null)}function On(t){var e=t._currentValue;if(Zp!==t)if(t={context:t,memoizedValue:e,next:null},go===null){if(Mc===null)throw Error(Z(308));go=t,Mc.dependencies={lanes:0,firstContext:t}}else go=go.next=t;return e}var ds=null;function nm(t){ds===null?ds=[t]:ds.push(t)}function $1(t,e,n,r){var i=e.interleaved;return i===null?(n.next=n,nm(e)):(n.next=i.next,i.next=n),e.interleaved=n,Ur(t,r)}function Ur(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var ai=!1;function rm(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function z1(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Or(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Ai(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,(Pe&2)!==0){var i=r.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),r.pending=e,Ur(t,n)}return i=r.interleaved,i===null?(e.next=e,nm(r)):(e.next=i.next,i.next=e),r.interleaved=e,Ur(t,n)}function ic(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,zp(t,n)}}function Fy(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=e:s=s.next=e}else i=s=e;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function Vc(t,e,n,r){var i=t.updateQueue;ai=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var u=a,d=u.next;u.next=null,o===null?s=d:o.next=d,o=u;var c=t.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==o&&(a===null?c.firstBaseUpdate=d:a.next=d,c.lastBaseUpdate=u))}if(s!==null){var h=i.baseState;o=0,c=d=u=null,a=s;do{var p=a.lane,y=a.eventTime;if((r&p)===p){c!==null&&(c=c.next={eventTime:y,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var v=t,E=a;switch(p=e,y=n,E.tag){case 1:if(v=E.payload,typeof v=="function"){h=v.call(y,h,p);break e}h=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=E.payload,p=typeof v=="function"?v.call(y,h,p):v,p==null)break e;h=Xe({},h,p);break e;case 2:ai=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,p=i.effects,p===null?i.effects=[a]:p.push(a))}else y={eventTime:y,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(d=c=y,u=h):c=c.next=y,o|=p;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;p=a,a=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);if(c===null&&(u=h),i.baseState=u,i.firstBaseUpdate=d,i.lastBaseUpdate=c,e=i.shared.interleaved,e!==null){i=e;do o|=i.lane,i=i.next;while(i!==e)}else s===null&&(i.shared.lanes=0);Cs|=o,t.lanes=o,t.memoizedState=h}}function Ny(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var r=t[e],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(Z(191,i));i.call(r)}}}var j1=new $_.Component().refs;function Tf(t,e,n,r){e=t.memoizedState,n=n(r,e),n=n==null?e:Xe({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var xd={isMounted:function(t){return(t=t._reactInternals)?Fs(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=Zt(),i=Ti(t),s=Or(r,i);s.payload=e,n!=null&&(s.callback=n),e=Ai(t,s,i),e!==null&&(Jn(e,t,i,r),ic(e,t,i))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=Zt(),i=Ti(t),s=Or(r,i);s.tag=1,s.payload=e,n!=null&&(s.callback=n),e=Ai(t,s,i),e!==null&&(Jn(e,t,i,r),ic(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=Zt(),r=Ti(t),i=Or(n,r);i.tag=2,e!=null&&(i.callback=e),e=Ai(t,i,r),e!==null&&(Jn(e,t,r,n),ic(e,t,r))}};function By(t,e,n,r,i,s,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,s,o):e.prototype&&e.prototype.isPureReactComponent?!gl(n,r)||!gl(i,s):!0}function H1(t,e,n){var r=!1,i=Oi,s=e.contextType;return typeof s=="object"&&s!==null?s=On(s):(i=hn(e)?Es:Qt.current,r=e.contextTypes,s=(r=r!=null)?Do(t,i):Oi),e=new e(n,s),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=xd,t.stateNode=e,e._reactInternals=t,r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=s),e}function Oy(t,e,n,r){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,r),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&xd.enqueueReplaceState(e,e.state,null)}function If(t,e,n,r){var i=t.stateNode;i.props=n,i.state=t.memoizedState,i.refs=j1,rm(t);var s=e.contextType;typeof s=="object"&&s!==null?i.context=On(s):(s=hn(e)?Es:Qt.current,i.context=Do(t,s)),i.state=t.memoizedState,s=e.getDerivedStateFromProps,typeof s=="function"&&(Tf(t,e,s,n),i.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(e=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),e!==i.state&&xd.enqueueReplaceState(i,i.state,null),Vc(t,n,i,r),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308)}function ka(t,e,n){if(t=n.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(Z(309));var r=n.stateNode}if(!r)throw Error(Z(147,t));var i=r,s=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===s?e.ref:(e=function(o){var a=i.refs;a===j1&&(a=i.refs={}),o===null?delete a[s]:a[s]=o},e._stringRef=s,e)}if(typeof t!="string")throw Error(Z(284));if(!n._owner)throw Error(Z(290,t))}return t}function Lu(t,e){throw t=Object.prototype.toString.call(e),Error(Z(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function Ly(t){var e=t._init;return e(t._payload)}function q1(t){function e(A,m){if(t){var x=A.deletions;x===null?(A.deletions=[m],A.flags|=16):x.push(m)}}function n(A,m){if(!t)return null;for(;m!==null;)e(A,m),m=m.sibling;return null}function r(A,m){for(A=new Map;m!==null;)m.key!==null?A.set(m.key,m):A.set(m.index,m),m=m.sibling;return A}function i(A,m){return A=Ii(A,m),A.index=0,A.sibling=null,A}function s(A,m,x){return A.index=x,t?(x=A.alternate,x!==null?(x=x.index,x<m?(A.flags|=2,m):x):(A.flags|=2,m)):(A.flags|=1048576,m)}function o(A){return t&&A.alternate===null&&(A.flags|=2),A}function a(A,m,x,R){return m===null||m.tag!==6?(m=Uh(x,A.mode,R),m.return=A,m):(m=i(m,x),m.return=A,m)}function u(A,m,x,R){var F=x.type;return F===ao?c(A,m,x.props.children,R,x.key):m!==null&&(m.elementType===F||typeof F=="object"&&F!==null&&F.$$typeof===oi&&Ly(F)===m.type)?(R=i(m,x.props),R.ref=ka(A,m,x),R.return=A,R):(R=cc(x.type,x.key,x.props,null,A.mode,R),R.ref=ka(A,m,x),R.return=A,R)}function d(A,m,x,R){return m===null||m.tag!==4||m.stateNode.containerInfo!==x.containerInfo||m.stateNode.implementation!==x.implementation?(m=$h(x,A.mode,R),m.return=A,m):(m=i(m,x.children||[]),m.return=A,m)}function c(A,m,x,R,F){return m===null||m.tag!==7?(m=vs(x,A.mode,R,F),m.return=A,m):(m=i(m,x),m.return=A,m)}function h(A,m,x){if(typeof m=="string"&&m!==""||typeof m=="number")return m=Uh(""+m,A.mode,x),m.return=A,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Iu:return x=cc(m.type,m.key,m.props,null,A.mode,x),x.ref=ka(A,null,m),x.return=A,x;case oo:return m=$h(m,A.mode,x),m.return=A,m;case oi:var R=m._init;return h(A,R(m._payload),x)}if(Va(m)||Ta(m))return m=vs(m,A.mode,x,null),m.return=A,m;Lu(A,m)}return null}function p(A,m,x,R){var F=m!==null?m.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return F!==null?null:a(A,m,""+x,R);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Iu:return x.key===F?u(A,m,x,R):null;case oo:return x.key===F?d(A,m,x,R):null;case oi:return F=x._init,p(A,m,F(x._payload),R)}if(Va(x)||Ta(x))return F!==null?null:c(A,m,x,R,null);Lu(A,x)}return null}function y(A,m,x,R,F){if(typeof R=="string"&&R!==""||typeof R=="number")return A=A.get(x)||null,a(m,A,""+R,F);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case Iu:return A=A.get(R.key===null?x:R.key)||null,u(m,A,R,F);case oo:return A=A.get(R.key===null?x:R.key)||null,d(m,A,R,F);case oi:var b=R._init;return y(A,m,x,b(R._payload),F)}if(Va(R)||Ta(R))return A=A.get(x)||null,c(m,A,R,F,null);Lu(m,R)}return null}function v(A,m,x,R){for(var F=null,b=null,C=m,_=m=0,T=null;C!==null&&_<x.length;_++){C.index>_?(T=C,C=null):T=C.sibling;var w=p(A,C,x[_],R);if(w===null){C===null&&(C=T);break}t&&C&&w.alternate===null&&e(A,C),m=s(w,m,_),b===null?F=w:b.sibling=w,b=w,C=T}if(_===x.length)return n(A,C),We&&ss(A,_),F;if(C===null){for(;_<x.length;_++)C=h(A,x[_],R),C!==null&&(m=s(C,m,_),b===null?F=C:b.sibling=C,b=C);return We&&ss(A,_),F}for(C=r(A,C);_<x.length;_++)T=y(C,A,_,x[_],R),T!==null&&(t&&T.alternate!==null&&C.delete(T.key===null?_:T.key),m=s(T,m,_),b===null?F=T:b.sibling=T,b=T);return t&&C.forEach(function(S){return e(A,S)}),We&&ss(A,_),F}function E(A,m,x,R){var F=Ta(x);if(typeof F!="function")throw Error(Z(150));if(x=F.call(x),x==null)throw Error(Z(151));for(var b=F=null,C=m,_=m=0,T=null,w=x.next();C!==null&&!w.done;_++,w=x.next()){C.index>_?(T=C,C=null):T=C.sibling;var S=p(A,C,w.value,R);if(S===null){C===null&&(C=T);break}t&&C&&S.alternate===null&&e(A,C),m=s(S,m,_),b===null?F=S:b.sibling=S,b=S,C=T}if(w.done)return n(A,C),We&&ss(A,_),F;if(C===null){for(;!w.done;_++,w=x.next())w=h(A,w.value,R),w!==null&&(m=s(w,m,_),b===null?F=w:b.sibling=w,b=w);return We&&ss(A,_),F}for(C=r(A,C);!w.done;_++,w=x.next())w=y(C,A,_,w.value,R),w!==null&&(t&&w.alternate!==null&&C.delete(w.key===null?_:w.key),m=s(w,m,_),b===null?F=w:b.sibling=w,b=w);return t&&C.forEach(function(D){return e(A,D)}),We&&ss(A,_),F}function I(A,m,x,R){if(typeof x=="object"&&x!==null&&x.type===ao&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Iu:e:{for(var F=x.key,b=m;b!==null;){if(b.key===F){if(F=x.type,F===ao){if(b.tag===7){n(A,b.sibling),m=i(b,x.props.children),m.return=A,A=m;break e}}else if(b.elementType===F||typeof F=="object"&&F!==null&&F.$$typeof===oi&&Ly(F)===b.type){n(A,b.sibling),m=i(b,x.props),m.ref=ka(A,b,x),m.return=A,A=m;break e}n(A,b);break}else e(A,b);b=b.sibling}x.type===ao?(m=vs(x.props.children,A.mode,R,x.key),m.return=A,A=m):(R=cc(x.type,x.key,x.props,null,A.mode,R),R.ref=ka(A,m,x),R.return=A,A=R)}return o(A);case oo:e:{for(b=x.key;m!==null;){if(m.key===b)if(m.tag===4&&m.stateNode.containerInfo===x.containerInfo&&m.stateNode.implementation===x.implementation){n(A,m.sibling),m=i(m,x.children||[]),m.return=A,A=m;break e}else{n(A,m);break}else e(A,m);m=m.sibling}m=$h(x,A.mode,R),m.return=A,A=m}return o(A);case oi:return b=x._init,I(A,m,b(x._payload),R)}if(Va(x))return v(A,m,x,R);if(Ta(x))return E(A,m,x,R);Lu(A,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,m!==null&&m.tag===6?(n(A,m.sibling),m=i(m,x),m.return=A,A=m):(n(A,m),m=Uh(x,A.mode,R),m.return=A,A=m),o(A)):n(A,m)}return I}var Fo=q1(!0),W1=q1(!1),zl={},gr=$i(zl),_l=$i(zl),El=$i(zl);function hs(t){if(t===zl)throw Error(Z(174));return t}function im(t,e){switch(Me(El,e),Me(_l,t),Me(gr,zl),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:rf(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=rf(e,t)}He(gr),Me(gr,e)}function No(){He(gr),He(_l),He(El)}function G1(t){hs(El.current);var e=hs(gr.current),n=rf(e,t.type);e!==n&&(Me(_l,t),Me(gr,n))}function sm(t){_l.current===t&&(He(gr),He(_l))}var Ke=$i(0);function Uc(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if((e.flags&128)!==0)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Nh=[];function om(){for(var t=0;t<Nh.length;t++)Nh[t]._workInProgressVersionPrimary=null;Nh.length=0}var sc=qr.ReactCurrentDispatcher,Bh=qr.ReactCurrentBatchConfig,As=0,Qe=null,gt=null,Ct=null,$c=!1,el=!1,wl=0,sS=0;function zt(){throw Error(Z(321))}function am(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!er(t[n],e[n]))return!1;return!0}function lm(t,e,n,r,i,s){if(As=s,Qe=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,sc.current=t===null||t.memoizedState===null?uS:cS,t=n(r,i),el){s=0;do{if(el=!1,wl=0,25<=s)throw Error(Z(301));s+=1,Ct=gt=null,e.updateQueue=null,sc.current=dS,t=n(r,i)}while(el)}if(sc.current=zc,e=gt!==null&>.next!==null,As=0,Ct=gt=Qe=null,$c=!1,e)throw Error(Z(300));return t}function um(){var t=wl!==0;return wl=0,t}function dr(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ct===null?Qe.memoizedState=Ct=t:Ct=Ct.next=t,Ct}function Ln(){if(gt===null){var t=Qe.alternate;t=t!==null?t.memoizedState:null}else t=gt.next;var e=Ct===null?Qe.memoizedState:Ct.next;if(e!==null)Ct=e,gt=t;else{if(t===null)throw Error(Z(310));gt=t,t={memoizedState:gt.memoizedState,baseState:gt.baseState,baseQueue:gt.baseQueue,queue:gt.queue,next:null},Ct===null?Qe.memoizedState=Ct=t:Ct=Ct.next=t}return Ct}function Al(t,e){return typeof e=="function"?e(t):e}function Oh(t){var e=Ln(),n=e.queue;if(n===null)throw Error(Z(311));n.lastRenderedReducer=t;var r=gt,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var a=o=null,u=null,d=s;do{var c=d.lane;if((As&c)===c)u!==null&&(u=u.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),r=d.hasEagerState?d.eagerState:t(r,d.action);else{var h={lane:c,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};u===null?(a=u=h,o=r):u=u.next=h,Qe.lanes|=c,Cs|=c}d=d.next}while(d!==null&&d!==s);u===null?o=r:u.next=a,er(r,e.memoizedState)||(cn=!0),e.memoizedState=r,e.baseState=o,e.baseQueue=u,n.lastRenderedState=r}if(t=n.interleaved,t!==null){i=t;do s=i.lane,Qe.lanes|=s,Cs|=s,i=i.next;while(i!==t)}else i===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function Lh(t){var e=Ln(),n=e.queue;if(n===null)throw Error(Z(311));n.lastRenderedReducer=t;var r=n.dispatch,i=n.pending,s=e.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=t(s,o.action),o=o.next;while(o!==i);er(s,e.memoizedState)||(cn=!0),e.memoizedState=s,e.baseQueue===null&&(e.baseState=s),n.lastRenderedState=s}return[s,r]}function K1(){}function Q1(t,e){var n=Qe,r=Ln(),i=e(),s=!er(r.memoizedState,i);if(s&&(r.memoizedState=i,cn=!0),r=r.queue,cm(J1.bind(null,n,r,t),[t]),r.getSnapshot!==e||s||Ct!==null&&Ct.memoizedState.tag&1){if(n.flags|=2048,Cl(9,Y1.bind(null,n,r,i,e),void 0,null),Tt===null)throw Error(Z(349));(As&30)!==0||X1(n,e,i)}return i}function X1(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=Qe.updateQueue,e===null?(e={lastEffect:null,stores:null},Qe.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function Y1(t,e,n,r){e.value=n,e.getSnapshot=r,Z1(e)&&eE(t)}function J1(t,e,n){return n(function(){Z1(e)&&eE(t)})}function Z1(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!er(t,n)}catch{return!0}}function eE(t){var e=Ur(t,1);e!==null&&Jn(e,t,1,-1)}function My(t){var e=dr();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Al,lastRenderedState:t},e.queue=t,t=t.dispatch=lS.bind(null,Qe,t),[e.memoizedState,t]}function Cl(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},e=Qe.updateQueue,e===null?(e={lastEffect:null,stores:null},Qe.updateQueue=e,e.lastEffect=t.next=t):(n=e.lastEffect,n===null?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t)),t}function tE(){return Ln().memoizedState}function oc(t,e,n,r){var i=dr();Qe.flags|=t,i.memoizedState=Cl(1|e,n,void 0,r===void 0?null:r)}function _d(t,e,n,r){var i=Ln();r=r===void 0?null:r;var s=void 0;if(gt!==null){var o=gt.memoizedState;if(s=o.destroy,r!==null&&am(r,o.deps)){i.memoizedState=Cl(e,n,s,r);return}}Qe.flags|=t,i.memoizedState=Cl(1|e,n,s,r)}function Vy(t,e){return oc(8390656,8,t,e)}function cm(t,e){return _d(2048,8,t,e)}function nE(t,e){return _d(4,2,t,e)}function rE(t,e){return _d(4,4,t,e)}function iE(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function sE(t,e,n){return n=n!=null?n.concat([t]):null,_d(4,4,iE.bind(null,e,t),n)}function dm(){}function oE(t,e){var n=Ln();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&am(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function aE(t,e){var n=Ln();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&am(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function lE(t,e,n){return(As&21)===0?(t.baseState&&(t.baseState=!1,cn=!0),t.memoizedState=n):(er(n,e)||(n=d1(),Qe.lanes|=n,Cs|=n,t.baseState=!0),e)}function oS(t,e){var n=be;be=n!==0&&4>n?n:4,t(!0);var r=Bh.transition;Bh.transition={};try{t(!1),e()}finally{be=n,Bh.transition=r}}function uE(){return Ln().memoizedState}function aS(t,e,n){var r=Ti(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},cE(t))dE(e,n);else if(n=$1(t,e,n,r),n!==null){var i=Zt();Jn(n,t,r,i),hE(n,e,r)}}function lS(t,e,n){var r=Ti(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(cE(t))dE(e,i);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,er(a,o)){var u=e.interleaved;u===null?(i.next=i,nm(e)):(i.next=u.next,u.next=i),e.interleaved=i;return}}catch{}finally{}n=$1(t,e,i,r),n!==null&&(i=Zt(),Jn(n,t,r,i),hE(n,e,r))}}function cE(t){var e=t.alternate;return t===Qe||e!==null&&e===Qe}function dE(t,e){el=$c=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function hE(t,e,n){if((n&4194240)!==0){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,zp(t,n)}}var zc={readContext:On,useCallback:zt,useContext:zt,useEffect:zt,useImperativeHandle:zt,useInsertionEffect:zt,useLayoutEffect:zt,useMemo:zt,useReducer:zt,useRef:zt,useState:zt,useDebugValue:zt,useDeferredValue:zt,useTransition:zt,useMutableSource:zt,useSyncExternalStore:zt,useId:zt,unstable_isNewReconciler:!1},uS={readContext:On,useCallback:function(t,e){return dr().memoizedState=[t,e===void 0?null:e],t},useContext:On,useEffect:Vy,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,oc(4194308,4,iE.bind(null,e,t),n)},useLayoutEffect:function(t,e){return oc(4194308,4,t,e)},useInsertionEffect:function(t,e){return oc(4,2,t,e)},useMemo:function(t,e){var n=dr();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=dr();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=aS.bind(null,Qe,t),[r.memoizedState,t]},useRef:function(t){var e=dr();return t={current:t},e.memoizedState=t},useState:My,useDebugValue:dm,useDeferredValue:function(t){return dr().memoizedState=t},useTransition:function(){var t=My(!1),e=t[0];return t=oS.bind(null,t[1]),dr().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=Qe,i=dr();if(We){if(n===void 0)throw Error(Z(407));n=n()}else{if(n=e(),Tt===null)throw Error(Z(349));(As&30)!==0||X1(r,e,n)}i.memoizedState=n;var s={value:n,getSnapshot:e};return i.queue=s,Vy(J1.bind(null,r,s,t),[t]),r.flags|=2048,Cl(9,Y1.bind(null,r,s,n,e),void 0,null),n},useId:function(){var t=dr(),e=Tt.identifierPrefix;if(We){var n=br,r=Dr;n=(r&~(1<<32-Yn(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=wl++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=sS++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},cS={readContext:On,useCallback:oE,useContext:On,useEffect:cm,useImperativeHandle:sE,useInsertionEffect:nE,useLayoutEffect:rE,useMemo:aE,useReducer:Oh,useRef:tE,useState:function(){return Oh(Al)},useDebugValue:dm,useDeferredValue:function(t){var e=Ln();return lE(e,gt.memoizedState,t)},useTransition:function(){var t=Oh(Al)[0],e=Ln().memoizedState;return[t,e]},useMutableSource:K1,useSyncExternalStore:Q1,useId:uE,unstable_isNewReconciler:!1},dS={readContext:On,useCallback:oE,useContext:On,useEffect:cm,useImperativeHandle:sE,useInsertionEffect:nE,useLayoutEffect:rE,useMemo:aE,useReducer:Lh,useRef:tE,useState:function(){return Lh(Al)},useDebugValue:dm,useDeferredValue:function(t){var e=Ln();return gt===null?e.memoizedState=t:lE(e,gt.memoizedState,t)},useTransition:function(){var t=Lh(Al)[0],e=Ln().memoizedState;return[t,e]},useMutableSource:K1,useSyncExternalStore:Q1,useId:uE,unstable_isNewReconciler:!1};function Bo(t,e){try{var n="",r=e;do n+=VT(r),r=r.return;while(r);var i=n}catch(s){i=` 31Error generating stack: `+s.message+` 32`+s.stack}return{value:t,source:e,stack:i,digest:null}}function Mh(t,e,n){return{value:t,source:null,stack:n!=null?n:null,digest:e!=null?e:null}}function Sf(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var hS=typeof WeakMap=="function"?WeakMap:Map;function fE(t,e,n){n=Or(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){Hc||(Hc=!0,Lf=r),Sf(t,e)},n}function pE(t,e,n){n=Or(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var i=e.value;n.payload=function(){return r(i)},n.callback=function(){Sf(t,e)}}var s=t.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Sf(t,e),typeof r!="function"&&(Ci===null?Ci=new Set([this]):Ci.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),n}function Uy(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new hS;var i=new Set;r.set(e,i)}else i=r.get(e),i===void 0&&(i=new Set,r.set(e,i));i.has(n)||(i.add(n),t=IS.bind(null,t,e,n),e.then(t,t))}function $y(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function zy(t,e,n,r,i){return(t.mode&1)===0?(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=Or(-1,1),e.tag=2,Ai(n,e,1))),n.lanes|=1),t):(t.flags|=65536,t.lanes=i,t)}var fS=qr.ReactCurrentOwner,cn=!1;function Jt(t,e,n,r){e.child=t===null?W1(e,null,n,r):Fo(e,t.child,n,r)}function jy(t,e,n,r,i){n=n.render;var s=e.ref;return Co(e,i),r=lm(t,e,n,r,s,i),n=um(),t!==null&&!cn?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,$r(t,e,i)):(We&&n&&Xp(e),e.flags|=1,Jt(t,e,r,i),e.child)}function Hy(t,e,n,r,i){if(t===null){var s=n.type;return typeof s=="function"&&!xm(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=s,mE(t,e,s,r,i)):(t=cc(n.type,null,r,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(s=t.child,(t.lanes&i)===0){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:gl,n(o,r)&&t.ref===e.ref)return $r(t,e,i)}return e.flags|=1,t=Ii(s,r),t.ref=e.ref,t.return=e,e.child=t}function mE(t,e,n,r,i){if(t!==null){var s=t.memoizedProps;if(gl(s,r)&&t.ref===e.ref)if(cn=!1,e.pendingProps=r=s,(t.lanes&i)!==0)(t.flags&131072)!==0&&(cn=!0);else return e.lanes=t.lanes,$r(t,e,i)}return Rf(t,e,n,r,i)}function gE(t,e,n){var r=e.pendingProps,i=r.children,s=t!==null?t.memoizedState:null;if(r.mode==="hidden")if((e.mode&1)===0)e.memoizedState={baseLanes:0,cachePool:null,transitions:null},Me(vo,vn),vn|=n;else{if((n&1073741824)===0)return t=s!==null?s.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,Me(vo,vn),vn|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,Me(vo,vn),vn|=r}else s!==null?(r=s.baseLanes|n,e.memoizedState=null):r=n,Me(vo,vn),vn|=r;return Jt(t,e,i,n),e.child}function yE(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function Rf(t,e,n,r,i){var s=hn(n)?Es:Qt.current;return s=Do(e,s),Co(e,i),n=lm(t,e,n,r,s,i),r=um(),t!==null&&!cn?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,$r(t,e,i)):(We&&r&&Xp(e),e.flags|=1,Jt(t,e,n,i),e.child)}function qy(t,e,n,r,i){if(hn(n)){var s=!0;Nc(e)}else s=!1;if(Co(e,i),e.stateNode===null)ac(t,e),H1(e,n,r),If(e,n,r,i),r=!0;else if(t===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var u=o.context,d=n.contextType;typeof d=="object"&&d!==null?d=On(d):(d=hn(n)?Es:Qt.current,d=Do(e,d));var c=n.getDerivedStateFromProps,h=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";h||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||u!==d)&&Oy(e,o,r,d),ai=!1;var p=e.memoizedState;o.state=p,Vc(e,r,o,i),u=e.memoizedState,a!==r||p!==u||dn.current||ai?(typeof c=="function"&&(Tf(e,n,c,r),u=e.memoizedState),(a=ai||By(e,n,a,r,p,u,d))?(h||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=u),o.props=r,o.state=u,o.context=d,r=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{o=e.stateNode,z1(t,e),a=e.memoizedProps,d=e.type===e.elementType?a:Kn(e.type,a),o.props=d,h=e.pendingProps,p=o.context,u=n.contextType,typeof u=="object"&&u!==null?u=On(u):(u=hn(n)?Es:Qt.current,u=Do(e,u));var y=n.getDerivedStateFromProps;(c=typeof y=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==h||p!==u)&&Oy(e,o,r,u),ai=!1,p=e.memoizedState,o.state=p,Vc(e,r,o,i);var v=e.memoizedState;a!==h||p!==v||dn.current||ai?(typeof y=="function"&&(Tf(e,n,y,r),v=e.memoizedState),(d=ai||By(e,n,d,r,p,v,u)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,v,u),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,v,u)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&p===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&p===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=v),o.props=r,o.state=v,o.context=u,r=d):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&p===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&p===t.memoizedState||(e.flags|=1024),r=!1)}return Pf(t,e,n,r,s,i)}function Pf(t,e,n,r,i,s){yE(t,e);var o=(e.flags&128)!==0;if(!r&&!o)return i&&ky(e,n,!1),$r(t,e,s);r=e.stateNode,fS.current=e;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&o?(e.child=Fo(e,t.child,null,s),e.child=Fo(e,null,a,s)):Jt(t,e,a,s),e.memoizedState=r.state,i&&ky(e,n,!0),e.child}function vE(t){var e=t.stateNode;e.pendingContext?Py(t,e.pendingContext,e.pendingContext!==e.context):e.context&&Py(t,e.context,!1),im(t,e.containerInfo)}function Wy(t,e,n,r,i){return bo(),Jp(i),e.flags|=256,Jt(t,e,n,r),e.child}var kf={dehydrated:null,treeContext:null,retryLane:0};function Df(t){return{baseLanes:t,cachePool:null,transitions:null}}function xE(t,e,n){var r=e.pendingProps,i=Ke.current,s=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=t!==null&&t.memoizedState===null?!1:(i&2)!==0),a?(s=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),Me(Ke,i&1),t===null)return Af(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?((e.mode&1)===0?e.lanes=1:t.data==="$!"?e.lanes=8:e.lanes=1073741824,null):(o=r.children,t=r.fallback,s?(r=e.mode,s=e.child,o={mode:"hidden",children:o},(r&1)===0&&s!==null?(s.childLanes=0,s.pendingProps=o):s=Ad(o,r,0,null),t=vs(t,r,n,null),s.return=e,t.return=e,s.sibling=t,e.child=s,e.child.memoizedState=Df(n),e.memoizedState=kf,t):hm(e,o));if(i=t.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return pS(t,e,o,r,a,i,n);if(s){s=r.fallback,o=e.mode,i=t.child,a=i.sibling;var u={mode:"hidden",children:r.children};return(o&1)===0&&e.child!==i?(r=e.child,r.childLanes=0,r.pendingProps=u,e.deletions=null):(r=Ii(i,u),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=Ii(a,s):(s=vs(s,o,n,null),s.flags|=2),s.return=e,r.return=e,r.sibling=s,e.child=r,r=s,s=e.child,o=t.child.memoizedState,o=o===null?Df(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=t.childLanes&~n,e.memoizedState=kf,r}return s=t.child,t=s.sibling,r=Ii(s,{mode:"visible",children:r.children}),(e.mode&1)===0&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function hm(t,e){return e=Ad({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Mu(t,e,n,r){return r!==null&&Jp(r),Fo(e,t.child,null,n),t=hm(e,e.pen
vendor: 10,232 bytes, line 32
32dingProps.children),t.flags|=2,e.memoizedState=null,t}function pS(t,e,n,r,i,s,o){if(n)return e.flags&256?(e.flags&=-257,r=Mh(Error(Z(422))),Mu(t,e,o,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(s=r.fallback,i=e.mode,r=Ad({mode:"visible",children:r.children},i,0,null),s=vs(s,i,o,null),s.flags|=2,r.return=e,s.return=e,r.sibling=s,e.child=r,(e.mode&1)!==0&&Fo(e,t.child,null,o),e.child.memoizedState=Df(o),e.memoizedState=kf,s);if((e.mode&1)===0)return Mu(t,e,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(Z(419)),r=Mh(s,r,void 0),Mu(t,e,o,r)}if(a=(o&t.childLanes)!==0,cn||a){if(r=Tt,r!==null){switch(o&-o){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}i=(i&(r.suspendedLanes|o))!==0?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,Ur(t,i),Jn(r,t,i,-1))}return vm(),r=Mh(Error(Z(421))),Mu(t,e,o,r)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=SS.bind(null,t),i._reactRetry=e,null):(t=s.treeContext,xn=wi(i.nextSibling),En=e,We=!0,Xn=null,t!==null&&(kn[Dn++]=Dr,kn[Dn++]=br,kn[Dn++]=ws,Dr=t.id,br=t.overflow,ws=e),e=hm(e,r.children),e.flags|=4096,e)}function Gy(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),Cf(t.return,e,n)}function Vh(t,e,n,r,i){var s=t.memoizedState;s===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function _E(t,e,n){var r=e.pendingProps,i=r.revealOrder,s=r.tail;if(Jt(t,e,r.children,n),r=Ke.current,(r&2)!==0)r=r&1|2,e.flags|=128;else{if(t!==null&&(t.flags&128)!==0)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Gy(t,n,e);else if(t.tag===19)Gy(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(Me(Ke,r),(e.mode&1)===0)e.memoizedState=null;else switch(i){case"forwards":for(n=e.child,i=null;n!==null;)t=n.alternate,t!==null&&Uc(t)===null&&(i=n),n=n.sibling;n=i,n===null?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),Vh(e,!1,i,n,s);break;case"backwards":for(n=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&Uc(t)===null){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}Vh(e,!0,n,null,s);break;case"together":Vh(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function ac(t,e){(e.mode&1)===0&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function $r(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),Cs|=e.lanes,(n&e.childLanes)===0)return null;if(t!==null&&e.child!==t.child)throw Error(Z(153));if(e.child!==null){for(t=e.child,n=Ii(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=Ii(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function mS(t,e,n){switch(e.tag){case 3:vE(e),bo();break;case 5:G1(e);break;case 1:hn(e.type)&&Nc(e);break;case 4:im(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,i=e.memoizedProps.value;Me(Lc,r._currentValue),r._currentValue=i;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(Me(Ke,Ke.current&1),e.flags|=128,null):(n&e.child.childLanes)!==0?xE(t,e,n):(Me(Ke,Ke.current&1),t=$r(t,e,n),t!==null?t.sibling:null);Me(Ke,Ke.current&1);break;case 19:if(r=(n&e.childLanes)!==0,(t.flags&128)!==0){if(r)return _E(t,e,n);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Me(Ke,Ke.current),r)break;return null;case 22:case 23:return e.lanes=0,gE(t,e,n)}return $r(t,e,n)}var EE,bf,wE,AE;EE=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};bf=function(){};wE=function(t,e,n,r){var i=t.memoizedProps;if(i!==r){t=e.stateNode,hs(gr.current);var s=null;switch(n){case"input":i=Z0(t,i),r=Z0(t,r),s=[];break;case"select":i=Xe({},i,{value:void 0}),r=Xe({},r,{value:void 0}),s=[];break;case"textarea":i=nf(t,i),r=nf(t,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=bc)}sf(n,r);var o;n=null;for(d in i)if(!r.hasOwnProperty(d)&&i.hasOwnProperty(d)&&i[d]!=null)if(d==="style"){var a=i[d];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(ul.hasOwnProperty(d)?s||(s=[]):(s=s||[]).push(d,null));for(d in r){var u=r[d];if(a=i!=null?i[d]:void 0,r.hasOwnProperty(d)&&u!==a&&(u!=null||a!=null))if(d==="style")if(a){for(o in a)!a.hasOwnProperty(o)||u&&u.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in u)u.hasOwnProperty(o)&&a[o]!==u[o]&&(n||(n={}),n[o]=u[o])}else n||(s||(s=[]),s.push(d,n)),n=u;else d==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,a=a?a.__html:void 0,u!=null&&a!==u&&(s=s||[]).push(d,u)):d==="children"?typeof u!="string"&&typeof u!="number"||(s=s||[]).push(d,""+u):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(ul.hasOwnProperty(d)?(u!=null&&d==="onScroll"&&ze("scroll",t),s||a===u||(s=[])):(s=s||[]).push(d,u))}n&&(s=s||[]).push("style",n);var d=s;(e.updateQueue=d)&&(e.flags|=4)}};AE=function(t,e,n,r){n!==r&&(e.flags|=4)};function Da(t,e){if(!We)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function jt(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function gS(t,e,n){var r=e.pendingProps;switch(Yp(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return jt(e),null;case 1:return hn(e.type)&&Fc(),jt(e),null;case 3:return r=e.stateNode,No(),He(dn),He(Qt),om(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(Ou(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&(e.flags&256)===0||(e.flags|=1024,Xn!==null&&(Uf(Xn),Xn=null))),bf(t,e),jt(e),null;case 5:sm(e);var i=hs(El.current);if(n=e.type,t!==null&&e.stateNode!=null)wE(t,e,n,r,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(Z(166));return jt(e),null}if(t=hs(gr.current),Ou(e)){r=e.stateNode,n=e.type;var s=e.memoizedProps;switch(r[hr]=e,r[xl]=s,t=(e.mode&1)!==0,n){case"dialog":ze("cancel",r),ze("close",r);break;case"iframe":case"object":case"embed":ze("load",r);break;case"video":case"audio":for(i=0;i<$a.length;i++)ze($a[i],r);break;case"source":ze("error",r);break;case"img":case"image":case"link":ze("error",r),ze("load",r);break;case"details":ze("toggle",r);break;case"input":ny(r,s),ze("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},ze("invalid",r);break;case"textarea":iy(r,s),ze("invalid",r)}sf(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&Bu(r.textContent,a,t),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&Bu(r.textContent,a,t),i=["children",""+a]):ul.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&ze("scroll",r)}switch(n){case"input":Su(r),ry(r,s,!0);break;case"textarea":Su(r),sy(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=bc)}r=i,e.updateQueue=r,r!==null&&(e.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=X_(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=o.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=o.createElement(n,{is:r.is}):(t=o.createElement(n),n==="select"&&(o=t,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):t=o.createElementNS(t,n),t[hr]=e,t[xl]=r,EE(t,e,!1,!1),e.stateNode=t;e:{switch(o=of(n,r),n){case"dialog":ze("cancel",t),ze("close",t),i=r;break;case"iframe":case"object":case"embed":ze("load",t),i=r;break;case"video":case"audio":for(i=0;i<$a.length;i++)ze($a[i],t);i=r;break;case"source":ze("error",t),i=r;break;case"img":case"image":case"link":ze("error",t),ze("load",t),i=r;break;case"details":ze("toggle",t),i=r;break;case"input":ny(t,r),i=Z0(t,r),ze("invalid",t);break;case"option":i=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},i=Xe({},r,{value:void 0}),ze("invalid",t);break;case"textarea":iy(t,r),i=nf(t,r),ze("invalid",t);break;default:i=r}sf(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var u=a[s];s==="style"?Z_(t,u):s==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&Y_(t,u)):s==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&cl(t,u):typeof u=="number"&&cl(t,""+u):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(ul.hasOwnProperty(s)?u!=null&&s==="onScroll"&&ze("scroll",t):u!=null&&Op(t,s,u,o))}switch(n){case"input":Su(t),ry(t,r,!1);break;case"textarea":Su(t),sy(t);break;case"option":r.value!=null&&t.setAttribute("value",""+Bi(r.value));break;case"select":t.multiple=!!r.multiple,s=r.value,s!=null?_o(t,!!r.multiple,s,!1):r.defaultValue!=null&&_o(t,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(t.onclick=bc)}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&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}
vendor: 16,419 bytes, line 32
32return jt(e),null;case 6:if(t&&e.stateNode!=null)AE(t,e,t.memoizedProps,r);else{if(typeof r!="string"&&e.stateNode===null)throw Error(Z(166));if(n=hs(El.current),hs(gr.current),Ou(e)){if(r=e.stateNode,n=e.memoizedProps,r[hr]=e,(s=r.nodeValue!==n)&&(t=En,t!==null))switch(t.tag){case 3:Bu(r.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&Bu(r.nodeValue,n,(t.mode&1)!==0)}s&&(e.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[hr]=e,e.stateNode=r}return jt(e),null;case 13:if(He(Ke),r=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(We&&xn!==null&&(e.mode&1)!==0&&(e.flags&128)===0)U1(),bo(),e.flags|=98560,s=!1;else if(s=Ou(e),r!==null&&r.dehydrated!==null){if(t===null){if(!s)throw Error(Z(318));if(s=e.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(Z(317));s[hr]=e}else bo(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;jt(e),s=!1}else Xn!==null&&(Uf(Xn),Xn=null),s=!0;if(!s)return e.flags&65536?e:null}return(e.flags&128)!==0?(e.lanes=n,e):(r=r!==null,r!==(t!==null&&t.memoizedState!==null)&&r&&(e.child.flags|=8192,(e.mode&1)!==0&&(t===null||(Ke.current&1)!==0?yt===0&&(yt=3):vm())),e.updateQueue!==null&&(e.flags|=4),jt(e),null);case 4:return No(),bf(t,e),t===null&&yl(e.stateNode.containerInfo),jt(e),null;case 10:return tm(e.type._context),jt(e),null;case 17:return hn(e.type)&&Fc(),jt(e),null;case 19:if(He(Ke),s=e.memoizedState,s===null)return jt(e),null;if(r=(e.flags&128)!==0,o=s.rendering,o===null)if(r)Da(s,!1);else{if(yt!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(o=Uc(t),o!==null){for(e.flags|=128,Da(s,!1),r=o.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=n,n=e.child;n!==null;)s=n,t=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=t,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,t=o.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return Me(Ke,Ke.current&1|2),e.child}t=t.sibling}s.tail!==null&&rt()>Oo&&(e.flags|=128,r=!0,Da(s,!1),e.lanes=4194304)}else{if(!r)if(t=Uc(o),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Da(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!We)return jt(e),null}else 2*rt()-s.renderingStartTime>Oo&&n!==1073741824&&(e.flags|=128,r=!0,Da(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(n=s.last,n!==null?n.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=rt(),e.sibling=null,n=Ke.current,Me(Ke,r?n&1|2:n&1),e):(jt(e),null);case 22:case 23:return ym(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&(e.mode&1)!==0?(vn&1073741824)!==0&&(jt(e),e.subtreeFlags&6&&(e.flags|=8192)):jt(e),null;case 24:return null;case 25:return null}throw Error(Z(156,e.tag))}function yS(t,e){switch(Yp(e),e.tag){case 1:return hn(e.type)&&Fc(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return No(),He(dn),He(Qt),om(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 5:return sm(e),null;case 13:if(He(Ke),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(Z(340));bo()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return He(Ke),null;case 4:return No(),null;case 10:return tm(e.type._context),null;case 22:case 23:return ym(),null;case 24:return null;default:return null}}var Vu=!1,Gt=!1,vS=typeof WeakSet=="function"?WeakSet:Set,ie=null;function yo(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){tt(t,e,r)}else n.current=null}function Ff(t,e,n){try{n()}catch(r){tt(t,e,r)}}var Ky=!1;function xS(t,e){if(gf=Pc,t=S1(),Qp(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,u=-1,d=0,c=0,h=t,p=null;t:for(;;){for(var y;h!==n||i!==0&&h.nodeType!==3||(a=o+i),h!==s||r!==0&&h.nodeType!==3||(u=o+r),h.nodeType===3&&(o+=h.nodeValue.length),(y=h.firstChild)!==null;)p=h,h=y;for(;;){if(h===t)break t;if(p===n&&++d===i&&(a=o),p===s&&++c===r&&(u=o),(y=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=y}n=a===-1||u===-1?null:{start:a,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(yf={focusedElem:t,selectionRange:n},Pc=!1,ie=e;ie!==null;)if(e=ie,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,ie=t;else for(;ie!==null;){e=ie;try{var v=e.alternate;if((e.flags&1024)!==0)switch(e.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var E=v.memoizedProps,I=v.memoizedState,A=e.stateNode,m=A.getSnapshotBeforeUpdate(e.elementType===e.type?E:Kn(e.type,E),I);A.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var x=e.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Z(163))}}catch(R){tt(e,e.return,R)}if(t=e.sibling,t!==null){t.return=e.return,ie=t;break}ie=e.return}return v=Ky,Ky=!1,v}function tl(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var s=i.destroy;i.destroy=void 0,s!==void 0&&Ff(e,n,s)}i=i.next}while(i!==r)}}function Ed(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function Nf(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function CE(t){var e=t.alternate;e!==null&&(t.alternate=null,CE(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[hr],delete e[xl],delete e[_f],delete e[tS],delete e[nS])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function TE(t){return t.tag===5||t.tag===3||t.tag===4}function Qy(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||TE(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Bf(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=bc));else if(r!==4&&(t=t.child,t!==null))for(Bf(t,e,n),t=t.sibling;t!==null;)Bf(t,e,n),t=t.sibling}function Of(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(Of(t,e,n),t=t.sibling;t!==null;)Of(t,e,n),t=t.sibling}var Pt=null,Qn=!1;function ri(t,e,n){for(n=n.child;n!==null;)IE(t,e,n),n=n.sibling}function IE(t,e,n){if(mr&&typeof mr.onCommitFiberUnmount=="function")try{mr.onCommitFiberUnmount(fd,n)}catch{}switch(n.tag){case 5:Gt||yo(n,e);case 6:var r=Pt,i=Qn;Pt=null,ri(t,e,n),Pt=r,Qn=i,Pt!==null&&(Qn?(t=Pt,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):Pt.removeChild(n.stateNode));break;case 18:Pt!==null&&(Qn?(t=Pt,n=n.stateNode,t.nodeType===8?bh(t.parentNode,n):t.nodeType===1&&bh(t,n),pl(t)):bh(Pt,n.stateNode));break;case 4:r=Pt,i=Qn,Pt=n.stateNode.containerInfo,Qn=!0,ri(t,e,n),Pt=r,Qn=i;break;case 0:case 11:case 14:case 15:if(!Gt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&((s&2)!==0||(s&4)!==0)&&Ff(n,e,o),i=i.next}while(i!==r)}ri(t,e,n);break;case 1:if(!Gt&&(yo(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){tt(n,e,a)}ri(t,e,n);break;case 21:ri(t,e,n);break;case 22:n.mode&1?(Gt=(r=Gt)||n.memoizedState!==null,ri(t,e,n),Gt=r):ri(t,e,n);break;default:ri(t,e,n)}}function Xy(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new vS),e.forEach(function(r){var i=RS.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Gn(t,e){var n=e.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=t,o=e,a=o;e:for(;a!==null;){switch(a.tag){case 5:Pt=a.stateNode,Qn=!1;break e;case 3:Pt=a.stateNode.containerInfo,Qn=!0;break e;case 4:Pt=a.stateNode.containerInfo,Qn=!0;break e}a=a.return}if(Pt===null)throw Error(Z(160));IE(s,o,i),Pt=null,Qn=!1;var u=i.alternate;u!==null&&(u.return=null),i.return=null}catch(d){tt(i,e,d)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)SE(e,t),e=e.sibling}function SE(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Gn(e,t),cr(t),r&4){try{tl(3,t,t.return),Ed(3,t)}catch(E){tt(t,t.return,E)}try{tl(5,t,t.return)}catch(E){tt(t,t.return,E)}}break;case 1:Gn(e,t),cr(t),r&512&&n!==null&&yo(n,n.return);break;case 5:if(Gn(e,t),cr(t),r&512&&n!==null&&yo(n,n.return),t.flags&32){var i=t.stateNode;try{cl(i,"")}catch(E){tt(t,t.return,E)}}if(r&4&&(i=t.stateNode,i!=null)){var s=t.memoizedProps,o=n!==null?n.memoizedProps:s,a=t.type,u=t.updateQueue;if(t.updateQueue=null,u!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&K_(i,s),of(a,o);var d=of(a,s);for(o=0;o<u.length;o+=2){var c=u[o],h=u[o+1];c==="style"?Z_(i,h):c==="dangerouslySetInnerHTML"?Y_(i,h):c==="children"?cl(i,h):Op(i,c,h,d)}switch(a){case"input":ef(i,s);break;case"textarea":Q_(i,s);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var y=s.value;y!=null?_o(i,!!s.multiple,y,!1):p!==!!s.multiple&&(s.defaultValue!=null?_o(i,!!s.multiple,s.defaultValue,!0):_o(i,!!s.multiple,s.multiple?[]:"",!1))}i[xl]=s}catch(E){tt(t,t.return,E)}}break;case 6:if(Gn(e,t),cr(t),r&4){if(t.stateNode===null)throw Error(Z(162));i=t.stateNode,s=t.memoizedProps;try{i.nodeValue=s}catch(E){tt(t,t.return,E)}}break;case 3:if(Gn(e,t),cr(t),r&4&&n!==null&&n.memoizedState.isDehydrated)try{pl(e.containerInfo)}catch(E){tt(t,t.return,E)}break;case 4:Gn(e,t),cr(t);break;case 13:Gn(e,t),cr(t),i=t.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(mm=rt())),r&4&&Xy(t);break;case 22:if(c=n!==null&&n.memoizedState!==null,t.mode&1?(Gt=(d=Gt)||c,Gn(e,t),Gt=d):Gn(e,t),cr(t),r&8192){if(d=t.memoizedState!==null,(t.stateNode.isHidden=d)&&!c&&(t.mode&1)!==0)for(ie=t,c=t.child;c!==null;){for(h=ie=c;ie!==null;){switch(p=ie,y=p.child,p.tag){case 0:case 11:case 14:case 15:tl(4,p,p.return);break;case 1:yo(p,p.return);var v=p.stateNode;if(typeof v.componentWillUnmount=="function"){r=p,n=p.return;try{e=r,v.props=e.memoizedProps,v.state=e.memoizedState,v.componentWillUnmount()}catch(E){tt(r,n,E)}}break;case 5:yo(p,p.return);break;case 22:if(p.memoizedState!==null){Jy(h);continue}}y!==null?(y.return=p,ie=y):Jy(h)}c=c.sibling}e:for(c=null,h=t;;){if(h.tag===5){if(c===null){c=h;try{i=h.stateNode,d?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=h.stateNode,u=h.memoizedProps.style,o=u!=null&&u.hasOwnProperty("display")?u.display:null,a.style.display=J_("display",o))}catch(E){tt(t,t.return,E)}}}else if(h.tag===6){if(c===null)try{h.stateNode.nodeValue=d?"":h.memoizedProps}catch(E){tt(t,t.return,E)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===t)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===t)break e;for(;h.sibling===null;){if(h.return===null||h.return===t)break e;c===h&&(c=null),h=h.return}c===h&&(c=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:Gn(e,t),cr(t),r&4&&Xy(t);break;case 21:break;default:Gn(e,t),cr(t)}}function cr(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(TE(n)){var r=n;break e}n=n.return}throw Error(Z(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(cl(i,""),r.flags&=-33);var s=Qy(t);Of(t,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Qy(t);Bf(t,a,o);break;default:throw Error(Z(161))}}catch(u){tt(t,t.return,u)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function _S(t,e,n){ie=t,RE(t)}function RE(t,e,n){for(var r=(t.mode&1)!==0;ie!==null;){var i=ie,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Vu;if(!o){var a=i.alternate,u=a!==null&&a.memoizedState!==null||Gt;a=Vu;var d=Gt;if(Vu=o,(Gt=u)&&!d)for(ie=i;ie!==null;)o=ie,u=o.child,o.tag===22&&o.memoizedState!==null?Zy(i):u!==null?(u.return=o,ie=u):Zy(i);for(;s!==null;)ie=s,RE(s),s=s.sibling;ie=i,Vu=a,Gt=d}Yy(t)}else(i.subtreeFlags&8772)!==0&&s!==null?(s.return=i,ie=s):Yy(t)}}function Yy(t){for(;ie!==null;){var e=ie;if((e.flags&8772)!==0){var n=e.alternate;try{if((e.flags&8772)!==0)switch(e.tag){case 0:case 11:case 15:Gt||Ed(5,e);break;case 1:var r=e.stateNode;if(e.flags&4&&!Gt)if(n===null)r.componentDidMount();else{var i=e.elementType===e.type?n.memoizedProps:Kn(e.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=e.updateQueue;s!==null&&Ny(e,s,r);break;case 3:var o=e.updateQueue;if(o!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}Ny(e,o,n)}break;case 5:var a=e.stateNode;if(n===null&&e.flags&4){n=a;var u=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var d=e.alternate;if(d!==null){var c=d.memoizedState;if(c!==null){var h=c.dehydrated;h!==null&&pl(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Z(163))}Gt||e.flags&512&&Nf(e)}catch(p){tt(e,e.return,p)}}if(e===t){ie=null;break}if(n=e.sibling,n!==null){n.return=e.return,ie=n;break}ie=e.return}}function Jy(t){for(;ie!==null;){var e=ie;if(e===t){ie=null;break}var n=e.sibling;if(n!==null){n.return=e.return,ie=n;break}ie=e.return}}function Zy(t){for(;ie!==null;){var e=ie;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{Ed(4,e)}catch(u){tt(e,n,u)}break;case 1:var r=e.stateNode;if(typeof r.componentDidMount=="function"){var i=e.return;try{r.componentDidMount()}catch(u){tt(e,i,u)}}var s=e.return;try{Nf(e)}catch(u){tt(e,s,u)}break;case 5:var o=e.return;try{Nf(e)}catch(u){tt(e,o,u)}}}catch(u){tt(e,e.return,u)}if(e===t){ie=null;break}var a=e.sibling;if(a!==null){a.return=e.return,ie=a;break}ie=e.return}}var ES=Math.ceil,jc=qr.ReactCurrentDispatcher,fm=qr.ReactCurrentOwner,Fn=qr.ReactCurrentBatchConfig,Pe=0,Tt=null,ot=null,Ft=0,vn=0,vo=$i(0),yt=0,Tl=null,Cs=0,wd=0,pm=0,nl=null,ln=null,mm=0,Oo=1/0,Rr=null,Hc=!1,Lf=null,Ci=null,Uu=!1,gi=null,qc=0,rl=0,Mf=null,lc=-1,uc=0;function Zt(){return(Pe&6)!==0?rt():lc!==-1?lc:lc=rt()}function Ti(t){return(t.mode&1)===0?1:(Pe&2)!==0&&Ft!==0?Ft&-Ft:iS.transition!==null?(uc===0&&(uc=d1()),uc):(t=be,t!==0||(t=window.event,t=t===void 0?16:v1(t.type)),t)}function Jn(t,e,n,r){if(50<rl)throw rl=0,Mf=null,Error(Z(185));Vl(t,n,r),((Pe&2)===0||t!==Tt)&&(t===Tt&&((Pe&2)===0&&(wd|=n),yt===4&&ci(t,Ft)),fn(t,r),n===1&&Pe===0&&(e.mode&1)===0&&(Oo=rt()+500,vd&&zi()))}function fn(t,e){var n=t.callbackNode;iI(t,e);var r=Rc(t,t===Tt?Ft:0);if(r===0)n!==null&&ly(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(n!=null&&ly(n),e===1)t.tag===0?rS(ev.bind(null,t)):L1(ev.bind(null,t)),ZI(function(){(Pe&6)===0&&zi()}),n=null;else{switch(h1(r)){case 1:n=$p;break;case 4:n=u1;break;case 16:n=Sc;break;case 536870912:n=c1;break;default:n=Sc}n=OE(n,PE.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function PE(t,e){if(lc=-1,uc=0,(Pe&6)!==0)throw Error(Z(327));var n=t.callbackNode;if(To()&&t.callbackNode!==n)return null;var r=Rc(t,t===Tt?Ft:0);if(r===0)return null;if((r&30)!==0||(r&t.expiredLanes)!==0||e)e=Wc(t,r);else{e=r;var i=Pe;Pe|=2;var s=DE();(Tt!==t||Ft!==e)&&(Rr=null,Oo=rt()+500,ys(t,e));do try{CS();break}catch(a){kE(t,a)}while(1);
vendor: 11,539 bytes, line 32
32em(),jc.current=s,Pe=i,ot!==null?e=0:(Tt=null,Ft=0,e=yt)}if(e!==0){if(e===2&&(i=df(t),i!==0&&(r=i,e=Vf(t,i))),e===1)throw n=Tl,ys(t,0),ci(t,r),fn(t,rt()),n;if(e===6)ci(t,r);else{if(i=t.current.alternate,(r&30)===0&&!wS(i)&&(e=Wc(t,r),e===2&&(s=df(t),s!==0&&(r=s,e=Vf(t,s))),e===1))throw n=Tl,ys(t,0),ci(t,r),fn(t,rt()),n;switch(t.finishedWork=i,t.finishedLanes=r,e){case 0:case 1:throw Error(Z(345));case 2:os(t,ln,Rr);break;case 3:if(ci(t,r),(r&130023424)===r&&(e=mm+500-rt(),10<e)){if(Rc(t,0)!==0)break;if(i=t.suspendedLanes,(i&r)!==r){Zt(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=xf(os.bind(null,t,ln,Rr),e);break}os(t,ln,Rr);break;case 4:if(ci(t,r),(r&4194240)===r)break;for(e=t.eventTimes,i=-1;0<r;){var o=31-Yn(r);s=1<<o,o=e[o],o>i&&(i=o),r&=~s}if(r=i,r=rt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ES(r/1960))-r,10<r){t.timeoutHandle=xf(os.bind(null,t,ln,Rr),r);break}os(t,ln,Rr);break;case 5:os(t,ln,Rr);break;default:throw Error(Z(329))}}}return fn(t,rt()),t.callbackNode===n?PE.bind(null,t):null}function Vf(t,e){var n=nl;return t.current.memoizedState.isDehydrated&&(ys(t,e).flags|=256),t=Wc(t,e),t!==2&&(e=ln,ln=n,e!==null&&Uf(e)),t}function Uf(t){ln===null?ln=t:ln.push.apply(ln,t)}function wS(t){for(var e=t;;){if(e.flags&16384){var n=e.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!er(s(),i))return!1}catch{return!1}}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function ci(t,e){for(e&=~pm,e&=~wd,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-Yn(e),r=1<<n;t[n]=-1,e&=~r}}function ev(t){if((Pe&6)!==0)throw Error(Z(327));To();var e=Rc(t,0);if((e&1)===0)return fn(t,rt()),null;var n=Wc(t,e);if(t.tag!==0&&n===2){var r=df(t);r!==0&&(e=r,n=Vf(t,r))}if(n===1)throw n=Tl,ys(t,0),ci(t,e),fn(t,rt()),n;if(n===6)throw Error(Z(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,os(t,ln,Rr),fn(t,rt()),null}function gm(t,e){var n=Pe;Pe|=1;try{return t(e)}finally{Pe=n,Pe===0&&(Oo=rt()+500,vd&&zi())}}function Ts(t){gi!==null&&gi.tag===0&&(Pe&6)===0&&To();var e=Pe;Pe|=1;var n=Fn.transition,r=be;try{if(Fn.transition=null,be=1,t)return t()}finally{be=r,Fn.transition=n,Pe=e,(Pe&6)===0&&zi()}}function ym(){vn=vo.current,He(vo)}function ys(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,JI(n)),ot!==null)for(n=ot.return;n!==null;){var r=n;switch(Yp(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Fc();break;case 3:No(),He(dn),He(Qt),om();break;case 5:sm(r);break;case 4:No();break;case 13:He(Ke);break;case 19:He(Ke);break;case 10:tm(r.type._context);break;case 22:case 23:ym()}n=n.return}if(Tt=t,ot=t=Ii(t.current,null),Ft=vn=e,yt=0,Tl=null,pm=wd=Cs=0,ln=nl=null,ds!==null){for(e=0;e<ds.length;e++)if(n=ds[e],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}ds=null}return t}function kE(t,e){do{var n=ot;try{if(em(),sc.current=zc,$c){for(var r=Qe.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}$c=!1}if(As=0,Ct=gt=Qe=null,el=!1,wl=0,fm.current=null,n===null||n.return===null){yt=1,Tl=e,ot=null;break}e:{var s=t,o=n.return,a=n,u=e;if(e=Ft,a.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var d=u,c=a,h=c.tag;if((c.mode&1)===0&&(h===0||h===11||h===15)){var p=c.alternate;p?(c.updateQueue=p.updateQueue,c.memoizedState=p.memoizedState,c.lanes=p.lanes):(c.updateQueue=null,c.memoizedState=null)}var y=$y(o);if(y!==null){y.flags&=-257,zy(y,o,a,s,e),y.mode&1&&Uy(s,d,e),e=y,u=d;var v=e.updateQueue;if(v===null){var E=new Set;E.add(u),e.updateQueue=E}else v.add(u);break e}else{if((e&1)===0){Uy(s,d,e),vm();break e}u=Error(Z(426))}}else if(We&&a.mode&1){var I=$y(o);if(I!==null){(I.flags&65536)===0&&(I.flags|=256),zy(I,o,a,s,e),Jp(Bo(u,a));break e}}s=u=Bo(u,a),yt!==4&&(yt=2),nl===null?nl=[s]:nl.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,e&=-e,s.lanes|=e;var A=fE(s,u,e);Fy(s,A);break e;case 1:a=u;var m=s.type,x=s.stateNode;if((s.flags&128)===0&&(typeof m.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(Ci===null||!Ci.has(x)))){s.flags|=65536,e&=-e,s.lanes|=e;var R=pE(s,a,e);Fy(s,R);break e}}s=s.return}while(s!==null)}FE(n)}catch(F){e=F,ot===n&&n!==null&&(ot=n=n.return);continue}break}while(1)}function DE(){var t=jc.current;return jc.current=zc,t===null?zc:t}function vm(){(yt===0||yt===3||yt===2)&&(yt=4),Tt===null||(Cs&268435455)===0&&(wd&268435455)===0||ci(Tt,Ft)}function Wc(t,e){var n=Pe;Pe|=2;var r=DE();(Tt!==t||Ft!==e)&&(Rr=null,ys(t,e));do try{AS();break}catch(i){kE(t,i)}while(1);if(em(),Pe=n,jc.current=r,ot!==null)throw Error(Z(261));return Tt=null,Ft=0,yt}function AS(){for(;ot!==null;)bE(ot)}function CS(){for(;ot!==null&&!QT();)bE(ot)}function bE(t){var e=BE(t.alternate,t,vn);t.memoizedProps=t.pendingProps,e===null?FE(t):ot=e,fm.current=null}function FE(t){var e=t;do{var n=e.alternate;if(t=e.return,(e.flags&32768)===0){if(n=gS(n,e,vn),n!==null){ot=n;return}}else{if(n=yS(n,e),n!==null){n.flags&=32767,ot=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{yt=6,ot=null;return}}if(e=e.sibling,e!==null){ot=e;return}ot=e=t}while(e!==null);yt===0&&(yt=5)}function os(t,e,n){var r=be,i=Fn.transition;try{Fn.transition=null,be=1,TS(t,e,n,r)}finally{Fn.transition=i,be=r}return null}function TS(t,e,n,r){do To();while(gi!==null);if((Pe&6)!==0)throw Error(Z(327));n=t.finishedWork;var i=t.finishedLanes;if(n===null)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(Z(177));t.callbackNode=null,t.callbackPriority=0;var s=n.lanes|n.childLanes;if(sI(t,s),t===Tt&&(ot=Tt=null,Ft=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||Uu||(Uu=!0,OE(Sc,function(){return To(),null})),s=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||s){s=Fn.transition,Fn.transition=null;var o=be;be=1;var a=Pe;Pe|=4,fm.current=null,xS(t,n),SE(n,t),qI(yf),Pc=!!gf,yf=gf=null,t.current=n,_S(n),XT(),Pe=a,be=o,Fn.transition=s}else t.current=n;if(Uu&&(Uu=!1,gi=t,qc=i),s=t.pendingLanes,s===0&&(Ci=null),ZT(n.stateNode),fn(t,rt()),e!==null)for(r=t.onRecoverableError,n=0;n<e.length;n++)i=e[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Hc)throw Hc=!1,t=Lf,Lf=null,t;return(qc&1)!==0&&t.tag!==0&&To(),s=t.pendingLanes,(s&1)!==0?t===Mf?rl++:(rl=0,Mf=t):rl=0,zi(),null}function To(){if(gi!==null){var t=h1(qc),e=Fn.transition,n=be;try{if(Fn.transition=null,be=16>t?16:t,gi===null)var r=!1;else{if(t=gi,gi=null,qc=0,(Pe&6)!==0)throw Error(Z(331));var i=Pe;for(Pe|=4,ie=t.current;ie!==null;){var s=ie,o=s.child;if((ie.flags&16)!==0){var a=s.deletions;if(a!==null){for(var u=0;u<a.length;u++){var d=a[u];for(ie=d;ie!==null;){var c=ie;switch(c.tag){case 0:case 11:case 15:tl(8,c,s)}var h=c.child;if(h!==null)h.return=c,ie=h;else for(;ie!==null;){c=ie;var p=c.sibling,y=c.return;if(CE(c),c===d){ie=null;break}if(p!==null){p.return=y,ie=p;break}ie=y}}}var v=s.alternate;if(v!==null){var E=v.child;if(E!==null){v.child=null;do{var I=E.sibling;E.sibling=null,E=I}while(E!==null)}}ie=s}}if((s.subtreeFlags&2064)!==0&&o!==null)o.return=s,ie=o;else e:for(;ie!==null;){if(s=ie,(s.flags&2048)!==0)switch(s.tag){case 0:case 11:case 15:tl(9,s,s.return)}var A=s.sibling;if(A!==null){A.return=s.return,ie=A;break e}ie=s.return}}var m=t.current;for(ie=m;ie!==null;){o=ie;var x=o.child;if((o.subtreeFlags&2064)!==0&&x!==null)x.return=o,ie=x;else e:for(o=m;ie!==null;){if(a=ie,(a.flags&2048)!==0)try{switch(a.tag){case 0:case 11:case 15:Ed(9,a)}}catch(F){tt(a,a.return,F)}if(a===o){ie=null;break e}var R=a.sibling;if(R!==null){R.return=a.return,ie=R;break e}ie=a.return}}if(Pe=i,zi(),mr&&typeof mr.onPostCommitFiberRoot=="function")try{mr.onPostCommitFiberRoot(fd,t)}catch{}r=!0}return r}finally{be=n,Fn.transition=e}}return!1}function tv(t,e,n){e=Bo(n,e),e=fE(t,e,1),t=Ai(t,e,1),e=Zt(),t!==null&&(Vl(t,1,e),fn(t,e))}function tt(t,e,n){if(t.tag===3)tv(t,t,n);else for(;e!==null;){if(e.tag===3){tv(e,t,n);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Ci===null||!Ci.has(r))){t=Bo(n,t),t=pE(e,t,1),e=Ai(e,t,1),t=Zt(),e!==null&&(Vl(e,1,t),fn(e,t));break}}e=e.return}}function IS(t,e,n){var r=t.pingCache;r!==null&&r.delete(e),e=Zt(),t.pingedLanes|=t.suspendedLanes&n,Tt===t&&(Ft&n)===n&&(yt===4||yt===3&&(Ft&130023424)===Ft&&500>rt()-mm?ys(t,0):pm|=n),fn(t,e)}function NE(t,e){e===0&&((t.mode&1)===0?e=1:(e=ku,ku<<=1,(ku&130023424)===0&&(ku=4194304)));var n=Zt();t=Ur(t,e),t!==null&&(Vl(t,e,n),fn(t,n))}function SS(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),NE(t,n)}function RS(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(Z(314))}r!==null&&r.delete(e),NE(t,n)}var BE;BE=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||dn.current)cn=!0;else{if((t.lanes&n)===0&&(e.flags&128)===0)return cn=!1,mS(t,e,n);cn=(t.flags&131072)!==0}else cn=!1,We&&(e.flags&1048576)!==0&&M1(e,Oc,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;ac(t,e),t=e.pendingProps;var i=Do(e,Qt.current);Co(e,n),i=lm(null,e,r,t,i,n);var s=um();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,hn(r)?(s=!0,Nc(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,rm(e),i.updater=xd,e.stateNode=i,i._reactInternals=e,If(e,r,t,n),e=Pf(null,e,r,!0,s,n)):(e.tag=0,We&&s&&Xp(e),Jt(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(ac(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=kS(r),t=Kn(r,t),i){case 0:e=Rf(null,e,r,t,n);break e;case 1:e=qy(null,e,r,t,n);break e;case 11:e=jy(null,e,r,t,n);break e;case 14:e=Hy(null,e,r,Kn(r.type,t),n);break e}throw Error(Z(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Kn(r,i),Rf(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Kn(r,i),qy(t,e,r,i,n);case 3:e:{if(vE(e),t===null)throw Error(Z(387));r=e.pendingProps,s=e.memoizedState,i=s.element,z1(t,e),Vc(e,r,null,n);var o=e.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){i=Bo(Error(Z(423)),e),e=Wy(t,e,r,n,i);break e}else if(r!==i){i=Bo(Error(Z(424)),e),e=Wy(t,e,r,n,i);break e}else for(xn=wi(e.stateNode.containerInfo.firstChild),En=e,We=!0,Xn=null,n=W1(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(bo(),r===i){e=$r(t,e,n);break e}Jt(t,e,r,n)}e=e.child}return e;case 5:return G1(e),t===null&&Af(e),r=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,o=i.children,vf(r,i)?o=null:s!==null&&vf(r,s)&&(e.flags|=32),yE(t,e),Jt(t,e,o,n),e.child;case 6:return t===null&&Af(e),null;case 13:return xE(t,e,n);case 4:return im(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=Fo(e,null,r,n):Jt(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Kn(r,i),jy(t,e,r,i,n);case 7:return Jt(t,e,e.pendingProps,n),e.child;case 8:return Jt(t,e,e.pendingProps.children,n),e.child;case 12:return Jt(t,e,e.pendingProps.children,n),e.child;
vendor: 9,149 bytes, line 32
32case 10:e:{if(r=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value,Me(Lc,r._currentValue),r._currentValue=o,s!==null)if(er(s.value,o)){if(s.children===i.children&&!dn.current){e=$r(t,e,n);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var u=a.firstContext;u!==null;){if(u.context===r){if(s.tag===1){u=Or(-1,n&-n),u.tag=2;var d=s.updateQueue;if(d!==null){d=d.shared;var c=d.pending;c===null?u.next=u:(u.next=c.next,c.next=u),d.pending=u}}s.lanes|=n,u=s.alternate,u!==null&&(u.lanes|=n),Cf(s.return,n,e),a.lanes|=n;break}u=u.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(Z(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Cf(o,n,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}Jt(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,Co(e,n),i=On(i),r=r(i),e.flags|=1,Jt(t,e,r,n),e.child;case 14:return r=e.type,i=Kn(r,e.pendingProps),i=Kn(r.type,i),Hy(t,e,r,i,n);case 15:return mE(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Kn(r,i),ac(t,e),e.tag=1,hn(r)?(t=!0,Nc(e)):t=!1,Co(e,n),H1(e,r,i),If(e,r,i,n),Pf(null,e,r,!0,t,n);case 19:return _E(t,e,n);case 22:return gE(t,e,n)}throw Error(Z(156,e.tag))};function OE(t,e){return l1(t,e)}function PS(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function bn(t,e,n,r){return new PS(t,e,n,r)}function xm(t){return t=t.prototype,!(!t||!t.isReactComponent)}function kS(t){if(typeof t=="function")return xm(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Mp)return 11;if(t===Vp)return 14}return 2}function Ii(t,e){var n=t.alternate;return n===null?(n=bn(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function cc(t,e,n,r,i,s){var o=2;if(r=t,typeof t=="function")xm(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case ao:return vs(n.children,i,s,e);case Lp:o=8,i|=8;break;case Q0:return t=bn(12,n,e,i|2),t.elementType=Q0,t.lanes=s,t;case X0:return t=bn(13,n,e,i),t.elementType=X0,t.lanes=s,t;case Y0:return t=bn(19,n,e,i),t.elementType=Y0,t.lanes=s,t;case q_:return Ad(n,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case j_:o=10;break e;case H_:o=9;break e;case Mp:o=11;break e;case Vp:o=14;break e;case oi:o=16,r=null;break e}throw Error(Z(130,t==null?t:typeof t,""))}return e=bn(o,n,e,i),e.elementType=t,e.type=r,e.lanes=s,e}function vs(t,e,n,r){return t=bn(7,t,r,e),t.lanes=n,t}function Ad(t,e,n,r){return t=bn(22,t,r,e),t.elementType=q_,t.lanes=n,t.stateNode={isHidden:!1},t}function Uh(t,e,n){return t=bn(6,t,null,e),t.lanes=n,t}function $h(t,e,n){return e=bn(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function DS(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Eh(0),this.expirationTimes=Eh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Eh(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function _m(t,e,n,r,i,s,o,a,u){return t=new DS(t,e,n,a,u),e===1?(e=1,s===!0&&(e|=8)):e=0,s=bn(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},rm(s),t}function bS(t,e,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:oo,key:r==null?null:""+r,children:t,containerInfo:e,implementation:n}}function LE(t){if(!t)return Oi;t=t._reactInternals;e:{if(Fs(t)!==t||t.tag!==1)throw Error(Z(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(hn(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(Z(171))}if(t.tag===1){var n=t.type;if(hn(n))return O1(t,n,e)}return e}function ME(t,e,n,r,i,s,o,a,u){return t=_m(n,r,!0,t,i,s,o,a,u),t.context=LE(null),n=t.current,r=Zt(),i=Ti(n),s=Or(r,i),s.callback=e!=null?e:null,Ai(n,s,i),t.current.lanes=i,Vl(t,i,r),fn(t,r),t}function Cd(t,e,n,r){var i=e.current,s=Zt(),o=Ti(i);return n=LE(n),e.context===null?e.context=n:e.pendingContext=n,e=Or(s,o),e.payload={element:t},r=r===void 0?null:r,r!==null&&(e.callback=r),t=Ai(i,e,o),t!==null&&(Jn(t,i,o,s),ic(t,i,o)),o}function Gc(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function nv(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function Em(t,e){nv(t,e),(t=t.alternate)&&nv(t,e)}function FS(){return null}var VE=typeof reportError=="function"?reportError:function(t){console.error(t)};function wm(t){this._internalRoot=t}Td.prototype.render=wm.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(Z(409));Cd(t,e,null,null)};Td.prototype.unmount=wm.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Ts(function(){Cd(null,t,null,null)}),e[Vr]=null}};function Td(t){this._internalRoot=t}Td.prototype.unstable_scheduleHydration=function(t){if(t){var e=m1();t={blockedOn:null,target:t,priority:e};for(var n=0;n<ui.length&&e!==0&&e<ui[n].priority;n++);ui.splice(n,0,t),n===0&&y1(t)}};function Am(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Id(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function rv(){}function NS(t,e,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var d=Gc(o);s.call(d)}}var o=ME(e,r,t,0,null,!1,!1,"",rv);return t._reactRootContainer=o,t[Vr]=o.current,yl(t.nodeType===8?t.parentNode:t),Ts(),o}for(;i=t.lastChild;)t.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var d=Gc(u);a.call(d)}}var u=_m(t,0,!1,null,null,!1,!1,"",rv);return t._reactRootContainer=u,t[Vr]=u.current,yl(t.nodeType===8?t.parentNode:t),Ts(function(){Cd(e,u,n,r)}),u}function Sd(t,e,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var a=i;i=function(){var u=Gc(o);a.call(u)}}Cd(e,o,t,i)}else o=NS(n,e,t,i,r);return Gc(o)}f1=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=Ua(e.pendingLanes);n!==0&&(zp(e,n|1),fn(e,rt()),(Pe&6)===0&&(Oo=rt()+500,zi()))}break;case 13:Ts(function(){var r=Ur(t,1);if(r!==null){var i=Zt();Jn(r,t,1,i)}}),Em(t,1)}};jp=function(t){if(t.tag===13){var e=Ur(t,134217728);if(e!==null){var n=Zt();Jn(e,t,134217728,n)}Em(t,134217728)}};p1=function(t){if(t.tag===13){var e=Ti(t),n=Ur(t,e);if(n!==null){var r=Zt();Jn(n,t,e,r)}Em(t,e)}};m1=function(){return be};g1=function(t,e){var n=be;try{return be=t,e()}finally{be=n}};lf=function(t,e,n){switch(e){case"input":if(ef(t,n),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var i=yd(r);if(!i)throw Error(Z(90));G_(r),ef(r,i)}}}break;case"textarea":Q_(t,n);break;case"select":e=n.value,e!=null&&_o(t,!!n.multiple,e,!1)}};n1=gm;r1=Ts;var BS={usingClientEntryPoint:!1,Events:[$l,ho,yd,e1,t1,gm]},ba={findFiberByHostInstance:cs,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},OS={bundleType:ba.bundleType,version:ba.version,rendererPackageName:ba.rendererPackageName,rendererConfig:ba.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:qr.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=o1(t),t===null?null:t.stateNode},findFiberByHostInstance:ba.findFiberByHostInstance||FS,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};
32if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var $u=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!$u.isDisabled&&$u.supportsFiber)try{fd=$u.inject(OS),mr=$u}catch{}}Cn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=BS;Cn.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Am(e))throw Error(Z(200));return bS(t,e,null,n)};Cn.createRoot=function(t,e){if(!Am(t))throw Error(Z(299));var n=!1,r="",i=VE;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=_m(t,1,!1,null,null,n,!1,r,i),t[Vr]=e.current,yl(t.nodeType===8?t.parentNode:t),new wm(e)};Cn.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(Z(188)):(t=Object.keys(t).join(","),Error(Z(268,t)));return t=o1(e),t=t===null?null:t.stateNode,t};Cn.flushSync=function(t){return Ts(t)};Cn.hydrate=function(t,e,n){if(!Id(e))throw Error(Z(200));return Sd(null,t,e,!0,n)};Cn.hydrateRoot=function(t,e,n){if(!Am(t))throw Error(Z(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=VE;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),e=ME(e,null,t,1,n!=null?n:null,i,!1,s,o),t[Vr]=e.current,yl(t),r)for(t=0;t<r.length;t++)n=r[t],i=n._getVersion,i=i(n._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[n,i]:e.mutableSourceEagerHydrationData.push(n,i);return new Td(e)};Cn.render=function(t,e,n){if(!Id(e))throw Error(Z(200));return Sd(null,t,e,!1,n)};Cn.unmountComponentAtNode=function(t){if(!Id(t))throw Error(Z(40));return t._reactRootContainer?(Ts(function(){Sd(null,null,t,!1,function(){t._reactRootContainer=null,t[Vr]=null})}),!0):!1};Cn.unstable_batchedUpdates=gm;Cn.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!Id(n))throw Error(Z(200));if(t==null||t._reactInternals===void 0)throw Error(Z(38));return Sd(t,e,n,!1,r)};Cn.version="18.2.0-next-9e3b772b8-20220608";(function(t){function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}e(),t.exports=Cn})(Fp);const xo=Rp(Fp.exports);var iv=Fp.exports;Jg.createRoot=iv.createRoot,Jg.hydrateRoot=iv.hydrateRoot;/** 33 * @remix-run/router v1.0.3 34 * 35 * Copyright (c) Remix Software Inc. 36 * 37 * This source code is licensed under the MIT license found in the 38 * LICENSE.md file in the root directory of this source tree. 39 * 40 * @license MIT 41 */function Il(){return Il=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Il.apply(this,arguments)}var yi;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(yi||(yi={}));const sv="popstate";function LS(t){t===void 0&&(t={});function e(r,i){let{pathname:s,search:o,hash:a}=r.location;return $f("",{pathname:s,search:o,hash:a},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:Sl(i)}return US(e,n,null,t)}function MS(){return Math.random().toString(36).substr(2,8)}function ov(t){return{usr:t.state,key:t.key}}function $f(t,e,n,r){return n===void 0&&(n=null),Il({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Yo(e):e,{state:n,key:e&&e.key||r||MS()})}function Sl(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Yo(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function VS(t){let e=typeof window<"u"&&typeof window.location<"u"&&window.location.origin!=="null"?window.location.origin:"unknown://unknown",n=typeof t=="string"?t:Sl(t);return new URL(n,e)}function US(t,e,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,a=yi.Pop,u=null;function d(){a=yi.Pop,u&&u({action:a,location:p.location})}function c(y,v){a=yi.Push;let E=$f(p.location,y,v);n&&n(E,y);let I=ov(E),A=p.createHref(E);try{o.pushState(I,"",A)}catch{i.location.assign(A)}s&&u&&u({action:a,location:p.location})}function h(y,v){a=yi.Replace;let E=$f(p.location,y,v);n&&n(E,y);let I=ov(E),A=p.createHref(E);o.replaceState(I,"",A),s&&u&&u({action:a,location:p.location})}let p={get action(){return a},get location(){return t(i,o)},listen(y){if(u)throw new Error("A history only accepts one active listener");return i.addEventListener(sv,d),u=y,()=>{i.removeEventListener(sv,d),u=null}},createHref(y){return e(i,y)},encodeLocation(y){let v=VS(Sl(y));return Il({},y,{pathname:v.pathname,search:v.search,hash:v.hash})},push:c,replace:h,go(y){return o.go(y)}};return p}var av;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(av||(av={}));function $S(t,e,n){n===void 0&&(n="/");let r=typeof e=="string"?Yo(e):e,i=$E(r.pathname||"/",n);if(i==null)return null;let s=UE(t);zS(s);let o=null;for(let a=0;o==null&&a<s.length;++a)o=YS(s[a],e2(i));return o}function UE(t,e,n,r){return e===void 0&&(e=[]),n===void 0&&(n=[]),r===void 0&&(r=""),t.forEach((i,s)=>{let o={relativePath:i.path||"",caseSensitive:i.caseSensitive===!0,childrenIndex:s,route:i};o.relativePath.startsWith("/")&&(It(o.relativePath.startsWith(r),'Absolute route path "'+o.relativePath+'" nested under path '+('"'+r+'" is not val
41id. An absolute child route path ')+"must start with the combined path of all its parent routes."),o.relativePath=o.relativePath.slice(r.length));let a=Si([r,o.relativePath]),u=n.concat(o);i.children&&i.children.length>0&&(It(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+a+'".')),UE(i.children,e,u,a)),!(i.path==null&&!i.index)&&e.push({path:a,score:QS(a,i.index),routesMeta:u})}),e}function zS(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:XS(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const jS=/^:\w+$/,HS=3,qS=2,WS=1,GS=10,KS=-2,lv=t=>t==="*";function QS(t,e){let n=t.split("/"),r=n.length;return n.some(lv)&&(r+=KS),e&&(r+=qS),n.filter(i=>!lv(i)).reduce((i,s)=>i+(jS.test(s)?HS:s===""?WS:GS),r)}function XS(t,e){return t.length===e.length&&t.slice(0,-1).every((r,i)=>r===e[i])?t[t.length-1]-e[e.length-1]:0}function YS(t,e){let{routesMeta:n}=t,r={},i="/",s=[];for(let o=0;o<n.length;++o){let a=n[o],u=o===n.length-1,d=i==="/"?e:e.slice(i.length)||"/",c=JS({path:a.relativePath,caseSensitive:a.caseSensitive,end:u},d);if(!c)return null;
vendor: 4,197 bytes, lines 41-49
41Object.assign(r,c.params);let h=a.route;s.push({params:r,pathname:Si([i,c.pathname]),pathnameBase:i2(Si([i,c.pathnameBase])),route:h}),c.pathnameBase!=="/"&&(i=Si([i,c.pathnameBase]))}return s}function JS(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,r]=ZS(t.path,t.caseSensitive,t.end),i=e.match(n);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce((d,c,h)=>{if(c==="*"){let p=a[h]||"";o=s.slice(0,s.length-p.length).replace(/(.)\/+$/,"$1")}return d[c]=t2(a[h]||"",c),d},{}),pathname:s,pathnameBase:o,pattern:t}}function ZS(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),Cm(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let r=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/:(\w+)/g,(o,a)=>(r.push(a),"([^\\/]+)"));return t.endsWith("*")?(r.push("*"),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),r]}function e2(t){try{return decodeURI(t)}catch(e){return Cm(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function t2(t,e){try{return decodeURIComponent(t)}catch(n){return Cm(!1,'The value for the URL param "'+e+'" will not be decoded because'+(' the string "'+t+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),t}}function $E(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}function It(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function Cm(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function n2(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:i=""}=typeof t=="string"?Yo(t):t;return{pathname:n?n.startsWith("/")?n:r2(n,e):e,search:s2(r),hash:o2(i)}}function r2(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function zh(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function zE(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function jE(t,e,n,r){r===void 0&&(r=!1);let i;typeof t=="string"?i=Yo(t):(i=Il({},t),It(!i.pathname||!i.pathname.includes("?"),zh("?","pathname","search",i)),It(!i.pathname||!i.pathname.includes("#"),zh("#","pathname","hash",i)),It(!i.search||!i.search.includes("#"),zh("#","search","hash",i)));let s=t===""||i.pathname==="",o=s?"/":i.pathname,a;if(r||o==null)a=n;else{let h=e.length-1;if(o.startsWith("..")){let p=o.split("/");for(;p[0]==="..";)p.shift(),h-=1;i.pathname=p.join("/")}a=h>=0?e[h]:"/"}let u=n2(i,a),d=o&&o!=="/"&&o.endsWith("/"),c=(s||o===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(d||c)&&(u.pathname+="/"),u}const Si=t=>t.join("/").replace(/\/\/+/g,"/"),i2=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),s2=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,o2=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;class a2{constructor(e,n,r){this.status=e,this.statusText=n||"",this.data=r}}function l2(t){return t instanceof a2}const u2=new Set(["POST","PUT","PATCH","DELETE"]);[...u2];var Rd={exports:{}},Pd={};/** 42 * @license React 43 * react-jsx-runtime.production.min.js 44 * 45 * Copyright (c) Facebook, Inc. and its affiliates. 46 * 47 * This source code is licensed under the MIT license found in the 48 * LICENSE file in the root directory of this source tree. 49 */var c2=O.exports,d2=Symbol.for("react.element"),h2=Symbol.for("react.fragment"),f2=Object.prototype.hasOwnProperty,p2=c2.__SECRET_INT
49ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,m2={key:!0,ref:!0,__self:!0,__source:!0};function HE(t,e,n){var r,i={},s=null,o=null;n!==void 0&&(s=""+n),e.key!==void 0&&(s=""+e.key),e.ref!==void 0&&(o=e.ref);for(r in e)f2.call(e,r)&&!m2.hasOwnProperty(r)&&(i[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)i[r]===void 0&&(i[r]=e[r]);return{$$typeof:d2,type:t,key:s,ref:o,props:i,_owner:p2.current}}Pd.Fragment=h2;Pd.jsx=HE;Pd.jsxs=HE;(function(t){t.exports=Pd})(Rd);const zf=Rd.exports.Fragment,ge=Rd.exports.jsx,Kc=Rd.exports.jsxs;/** 50 * React Router v6.4.3 51 * 52 * Copyright (c) Remix Software Inc. 53 * 54 * This source code is licensed under the MIT license found in the 55 * LICENSE.md file in the root directory of this source tree. 56 * 57 * @license MIT 58 */function jf(){return jf=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},jf.apply(this,arguments)}function g2(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}const y2=typeof Object.is=="function"?Object.is:g2,{useState:v2,useEffect:x2,useLayoutEffect:_2,useDebugValue:E2}=G0;function w2(t,e,n){const r=e(),[{inst:i},s]=v2({inst:{value:r,getSnapshot:e}});return _2(()=>{i.value=r,i.getSnapshot=e,jh(i)&&s({inst:i})},[t,r,e]),x2(()=>(jh(i)&&s({inst:i}),t(()=>{jh(i)&&s({inst:i})})),[t]),E2(r),r}function jh(t){const e=t.getSnapshot,n=t.value;try{const r=e();return!y2(n,r)}catch{return!0}}function A2(t,e,n){return e()}const C2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",T2=!C2,I2=T2?A2:w2;"useSyncExternalStore"in G0&&(t=>t.useSyncExternalStore)(G0);const S2=O.exports.createContext(null),R2=O.exports.createContext(null),qE=O.exports.createContext(null),Tm=O.exports.createContext(null),kd=O.exports.createContext(null),Jo=O.exports.createContext({outlet:null,matches:[]}),WE=O.exports.createContext(null);function P2(t,e){let{relative:n}=e===void 0?{}:e;jl()||It(!1);let{basename:r,navigator:i}=O.exports.useContext(Tm),{hash:s,pathname:o,search:a}=GE(t,{relative:n}),u=o;return r!=="/"&&(u=o==="/"?r:Si([r,o])),i.createHref({pathname:u,search:a,hash:s})}function jl(){return O.exports.useContext(kd)!=null}function Zo(){return jl()||It(!1),O.exports.useContext(kd).location}function Dd(){jl()||It(!1);let{basename:t,navigator:e}=O.exports.useContext(Tm),{matches:n}=O.exports.useContext(Jo),{pathname:r}=Zo(),i=JSON.stringify(zE(n).map(a=>a.pathnameBase)),s=O.exports.useRef(!1);return O.exports.useEffect(()=>{s.current=!0}),O.exports.useCallback(function(a,u){if(u===void 0&&(u={}),!s.current)return;if(typeof a=="number"){e.go(a);return}let d=jE(a,JSON.parse(i),r,u.relative==="path");t!=="/"&&(d.pathname=d.pathname==="/"?t:Si([t,d.pathname])),(u.replace?e.replace:e.push)(d,u.state,u)},[t,e,i,r])}function l5(){let{matches:t}=O.exports.useContext(Jo),e=t[t.length-1];return e?e.params:{}}function GE(t,e){let{relative:n}=e===void 0?{}:e,{matches:r}=O.exports.useContext(Jo),{pathname:i}=Zo(),s=JSON.stringify(zE(r).map(o=>o.pathnameBase));return O.exports.useMemo(()=>jE(t,JSON.parse(s),i,n==="path"),[t,s,i,n])}function k2(t,e){jl()||It(!1);let n=O.exports.useContext(qE),{matches:r}=O.exports.useContext(Jo),i=r[r.length-1],s=i?i.params:{};i&&i.pathname;let o=i?i.pathnameBase:"/";i&&i.route;let a=Zo(),u;if(e){var d;let v=typeof e=="string"?Yo(e):e;o==="/"||((d=v.pathname)==null?void 0:d.startsWith(o))||It(!1),u=v}else u=a;let c=u.pathname||"/",h=o==="/"?c:c.slice(o.length)||"/",p=$S(t,{pathname:h}),y=N2(p&&p.map(v=>Object.assign({},v,{params:Object.assign({},s,v.params),pathname:Si([o,v.pathname]),pathnameBase:v.pathnameBase==="/"?o:Si([o,v.pathnameBase])})),r,n||void 0);return e&&y?ge(kd.Provider,{value:{location:jf({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:yi.Pop},children:y}):y}function D2(){let t=O2(),e=l2(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},s={padding:"2px 4px",backgroundColor:r};return Kc(zf,{children:[ge("h2",{children:"Unhandled Thrown Error!"}),ge("h3",{style:{fontStyle:"italic"},children:e}),n?ge("pre",{style:i,children:n}):null,ge("p",{children:"\u{1F4BF} Hey developer \u{1F44B}"}),Kc("p",{children:["You can provide a way better UX than this when your app throws errors by providing your own\xA0",ge("code",{style:s,children:"errorElement"})," props on\xA0",ge("code",{style:s,children:"<Route>"})]})]})}class b2 extends O.exports.Component{constructor(e){super(e),this.state={location:e.location,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location?{error:e.error,location:e.location}:{error:e.error||n.error,location:n.location}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error?ge(WE.Provider,{value:this.state.error,children:this.props.component}):this.props.children}}
58function F2(t){let{routeContext:e,match:n,children:r}=t,i=O.exports.useContext(S2);return i&&n.route.errorElement&&(i._deepestRenderedBoundaryId=n.route.id),ge(Jo.Provider,{value:e,children:r})}function N2(t,e,n){if(e===void 0&&(e=[]),t==null)if(n!=null&&n.errors)t=n.matches;else return null;let r=t,i=n==null?void 0:n.errors;if(i!=null){let s=r.findIndex(o=>o.route.id&&(i==null?void 0:i[o.route.id]));s>=0||It(!1),r=r.slice(0,Math.min(r.length,s+1))}return r.reduceRight((s,o,a)=>{let u=o.route.id?i==null?void 0:i[o.route.id]:null,d=n?o.route.errorElement||ge(D2,{}):null,c=()=>ge(F2,{match:o,routeContext:{outlet:s,matches:e.concat(r.slice(0,a+1))},children:u?d:o.route.element!==void 0?o.route.element:s});return n&&(o.route.errorElement||a===0)?ge(b2,{location:n.location,component:d,error:u,children:c()}):c()},null)}var uv;(function(t){t.UseRevalidator="useRevalidator"})(uv||(uv={}));var Hf;(function(t){t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator"})(Hf||(Hf={}));function B2(t){let e=O.exports.useContext(qE);return e||It(!1),e}function O2(){var t;let e=O.exports.useContext(WE),n=B2(Hf.UseRouteError),r=O.exports.useContext(Jo),i=r.matches[r.matches.length-1];return e||(r||It(!1),i.route.id||It(!1),(t=n.errors)==null?void 0:t[i.route.id])}function L2(t){It(!1)}function M2(t){let{basename:e="/",children:n=null,location:r,navigationType:i=yi.Pop,navigator:s,static:o=!1}=t;jl()&&It(!1);let a=e.replace(/^\/*/,"/"),u=O.exports.useMemo(()=>({basename:a,navigator:s,static:o}),[a,s,o]);typeof r=="string"&&(r=Yo(r));let{pathname:d="/",search:c="",hash:h="",state:p=null,key:y="default"}=r,v=O.exports.useMemo(()=>{let E=$E(d,a);return E==null?null:{pathname:E,search:c,hash:h,state:p,key:y}},[a,d,c,h,p,y]);return v==null?null:ge(Tm.Provider,{value:u,children:ge(kd.Provider,{children:n,value:{location:v,navigationType:i}})})}function u5(t){let{children:e,location:n}=t,r=O.exports.useContext(R2),i=r&&!e?r.router.routes:qf(e);return k2(i,n)}var cv;(function(t){t[t.pending=0]="pending",t[t.success=1]="success",t[t.error=2]="error"})(cv||(cv={}));new Promise(()=>{});function qf(t,e){e===void 0&&(e=[]);let n=[];return O.exports.Children.forEach(t,(r,i)=>{if(!O.exports.isValidElement(r))return;if(r.type===O.exports.Fragment){n.push.apply(n,qf(r.props.children,e));return}r.type!==L2&&It(!1),!r.props.index||!r.props.children||It(!1);let s=[...e,i],o={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,hasErrorBoundary:r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle};r.props.children&&(o.children=qf(r.props.children,s)),n.push(o)}),n}/** 59 * React Router DOM v6.4.3 60 * 61 * Copyright (c) Remix Software Inc. 62 * 63 * This source code is licensed under the MIT license found in the 64 * LICENSE.md file in the root directory of this source tree. 65 * 66 * @license MIT 67 */function V2(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function U2(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function $2(t,e){return t.button===0&&(!e||e==="_self")&&!U2(t)}function Wf(t){return t===void 0&&(t=""),new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((e,n)=>{let r=t[n];return e.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function z2(t,e){let n=Wf(t);for(let r of e.keys())n.has(r)||e.getAll(r).forEach(i=>{n.append(r,i)});return n}const j2=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"];function c5(t){let{basename:e,children:n,window:r}=t,i=O.exports.useRef();i.current==null&&(i.current=LS({window:r,v5Compat:!0}));let s=i.current,[o,a]=O.exports.useState({action:s.action,location:s.location});return O.exports.useLayoutEffect(()=>s.listen(a),[s]),ge(M2,{basename:e,children:n,location:o.location,navigationType:o.action,navigator:s})}const d5=O.exports.forwardRef(function(e,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:a,target:u,to:d,preventScrollReset:c}=e,h=V2(e,j2),p=P2(d,{relative:i}),y=H2(d,{replace:o,state:a,target:u,preventScrollReset:c,relative:i});function v(E){r&&r(E),E.defaultPrevented||y(E)}return ge("a",{...h,href:p,onClick:s?r:v,ref:n,target:u})});var dv;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmitImpl="useSubmitImpl",t.UseFetcher="useFetcher"})(dv||(dv={}));var hv;(function(t){t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(hv||(hv={}));function H2(t,e){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o}=e===void 0?{}:e,a=Dd(),u=Zo(),d=GE(t,{relative:o});return O.exports.useCallback(c=>{if($2(c,n)){c.preventDefault();let h=r!==void 0?r:Sl(u)===Sl(d);a(t,{replace:h,state:i,preventScrollReset:s,relative:o})}},[u,a,d,r,i,n,t,s,o])}
67function h5(t){let e=O.exports.useRef(Wf(t)),n=Zo(),r=O.exports.useMemo(()=>z2(n.search,e.current),[n.search]),i=Dd(),s=O.exports.useCallback((o,a)=>{const u=Wf(typeof o=="function"?o(r):o);i("?"+u,a)},[i,r]);return[r,s]}var KE="https://js.stripe.com/v3",q2=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,fv="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",W2=function(){for(var e=document.querySelectorAll('script[src^="'.concat(KE,'"]')),n=0;n<e.length;n++){var r=e[n];if(!!q2.test(r.src))return r}return null},pv=function(e){var n=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",r=document.createElement("script");r.src="".concat(KE).concat(n);var i=document.head||document.body;if(!i)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return i.appendChild(r),r},G2=function(e,n){!e||!e._registerWrapper||e._registerWrapper({name:"stripe-js",version:"3.0.3",startTime:n})},Fa=null,zu=null,ju=null,K2=function(e){return function(){e(new Error("Failed to load Stripe.js"))}},Q2=function(e,n){return function(){window.Stripe?e(window.Stripe):n(new Error("Stripe.js not available"))}},X2=function(e){return Fa!==null?Fa:(Fa=new Promise(function(n,r){if(typeof window>"u"||typeof document>"u"){n(null);return}if(window.Stripe&&e&&console.warn(fv),window.Stripe){n(window.Stripe);return}try{var i=W2();if(i&&e)console.warn(fv);else if(!i)i=pv(e);else if(i&&ju!==null&&zu!==null){var s;i.removeEventListener("load",ju),i.removeEventListener("error",zu),(s=i.parentNode)===null||s===void 0||s.removeChild(i),i=pv(e)}ju=Q2(n,r),zu=K2(r),i.addEventListener("load",ju),i.addEventListener("error",zu)}catch(o){r(o);return}}),Fa.catch(function(n){return Fa=null,Promise.reject(n)}))},Y2=function(e,n,r){if(e===null)return null;var i=e.apply(void 0,n);return G2(i,r),i},Na,QE=!1,XE=function(){return Na||(Na=X2(null).catch(function(e){return Na=null,Promise.reject(e)}),Na)};Promise.resolve().then(function(){return XE()}).catch(function(t){QE||console.warn(t)});var J2=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];QE=!0;var i=Date.now();return XE().then(function(s){return Y2(s,n,i)})},YE={exports:{}};function Z2(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Hh={exports:{}};const eR={},tR=Object.freeze(Object.defineProperty({__proto__:null,default:eR},Symbol.toStringTag,{value:"Module"})),nR=xT(tR);var mv;function Ie(){return mv||(mv=1,function(t,e){(function(n,r){t.exports=r()})(we,function(){var n=n||function(r,i){var s;if(typeof window<"u"&&window.crypto&&(s=window.crypto),typeof self<"u"&&self.crypto&&(s=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(s=globalThis.crypto),!s&&typeof window<"u"&&window.msCrypto&&(s=window.msCrypto),!s&&typeof we<"u"&&we.crypto&&(s=we.crypto),!s&&typeof Z2=="function")try{s=nR}catch{}var o=function(){if(s){if(typeof s.getRandomValues=="function")try{return s.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof s.randomBytes=="function")try{return s.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},a=Object.create||function(){function m(){}return function(x){var R;return m.prototype=x,R=new m,m.prototype=null,R}}(),u={},d=u.lib={},c=d.Base=function(){return{extend:function(m){var x=a(this);return m&&x.mixIn(m),(!x.hasOwnProperty("init")||this.init===x.init)&&(x.init=function(){x.$super.init.apply(this,arguments)}),x.init.prototype=x,x.$super=this,x},create:function(){var m=this.extend();return m.init.apply(m,arguments),m},init:function(){},mixIn:function(m){for(var x in m)m.hasOwnProperty(x)&&(this[x]=m[x]);m.hasOwnProperty("toString")&&(this.toString=m.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),h=d.WordArray=c.extend({init:function(m,x){m=this.words=m||[],x!=i?this.sigBytes=x:this.sigBytes=m.length*4},toString:function(m){return(m||y).stringify(this)},concat:function(m){var x=this.words,R=m.words,F=this.sigBytes,b=m.sigBytes;if(this.clamp(),F%4)for(var C=0;C<b;C++){var _=R[C>>>2]>>>24-C%4*8&255;x[F+C>>>2]|=_<<24-(F+C)%4*8}else for(var T=0;T<b;T+=4)x[F+T>>>2]=R[T>>>2];return this.sigBytes+=b,this},clamp:function(){var m=this.words,x=this.sigBytes;m[x>>>2]&=4294967295<<32-x%4*8,m.length=r.ceil(x/4)},clone:function(){var m=c.clone.call(this);return m.words=this.words.slice(0),m},random:function(m){for(var x=[],R=0;R<m;R+=4)x.push(o());return new h.init(x,m)}}),p=u.enc={},y=p.Hex={stringify:function(m){for(var x=m.words,R=m.sigBytes,F=[],b=0;b<R;b++){var C=x[b>>>2]>>>24-b%4*8&255;F.push((C>>>4).toString(16)),F.push((C&15).toString(16))}return F.join("")},parse:function(m){for(var x=m.length,R=[],F=0;F<x;F+=2)R[F>>>3]|=parseInt(m.substr(F,2),16)<<24-F%8*4;return new h.init(R,x/2)}},v=p.Latin1={stringify:function(m){for(var x=m.words,R=m.sigBytes,F=[],b=0;b<R;b++){var C=x[b>>>2]>>>24-b%4*8&255;F.push(String.fromCharCode(C))}return F.join("")},parse:function(m){for(var x=m.length,R=[],F=0;F<x;F++)R[F>>>2]|=(m.charCodeAt(F)&255)<<24-F%4*8;return new h.init(R,x)}},E=p.Utf8={stringify:function(m){try{return decodeURIComponent(escape(v.stringify(m)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(m){return v.parse(unescape(encodeURIComponent(m)))}},I=d.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new h.init,this._nDataBytes=0},_append:function(m){typeof m=="string"&&(m=E.parse(m)),this._data.concat(m),this._nDataBytes+=m.sigBytes},_process:function(m){var x,R=this._data,F=R.words,b=R.sigBytes,C=this.blockSize,_=C*4,T=b/_;m?T=r.ceil(T):T=r.max((T|0)-this._minBufferSize,0);var w=T*C,S=r.min(w*4,b);if(w){for(var D=0;D<w;D+=C)this._doProcessBlock(F,D);x=F.splice(0,w),R.sigBytes-=S}return new h.init(x,S)},clone:function(){var m=c.clone.call(this);return m._data=this._data.clone(),m},_minBufferSize:0});d.Hasher=I.extend({cfg:c.extend(),init:function(m){this.cfg=this.cfg.extend(m),this.reset()},reset:function(){I.reset.call(this),this._doReset()},update:function(m){return this._append(m),this._process(),this},finalize:function(m){m&&this._append(m);var x=this._doFinalize();return x},blockSize:16,_createHelper:function(m){return function(x,R){return new m.init(R).finalize(x)}},_createHmacHelper:function(m){return function(x,R){return new A.HMAC.init(m,R).finalize(x)}}});var A=u.algo={};return u}(Math);return n})}(Hh)),Hh.exports}var qh={exports:{}},gv;function bd(){return gv||(gv=1,function(t,e){(function(n,r){t.exports=r(Ie())})(we,function(n){return function(r){var i=n,s=i.lib,o=s.Base,a=s.WordArray,u=i.x64={};u.Word=o.extend({init:function(d,c){this.high=d,this.low=c}}),u.WordArray=o.extend({init:function(d,c){d=this.words=d||[],c!=r?this.sigBytes=c:this.sigBytes=d.length*8},toX32:function(){for(var d=this.words,c=d.length,h=[],p=0;p<c;p++){var y=d[p];h.push(y.high),h.push(y.low)}return a.create(h,this.sigBytes)},clone:function(){for(var d=o.clone.call(this),c=d.words=this.words.slice(0),h=c.length,p=0;p<h;p++)c[p]=c[p].clone();return d}})}(),n})}(qh)),qh.exports}var Wh={exports:{}},yv;function rR(){return yv||(yv=1,function(t,e){(function(n,r){t.exports=r(Ie())})(we,function(n){return function(){if(typeof ArrayBuffer=="function"){var r=n,i=r.lib,s=i.WordArray,o=s.init,a=s.init=function(u){if(u instanceof ArrayBuffer&&(u=new Uint8Array(u)),(u instanceof Int8Array||typeof Uint8ClampedArray<"u"&&u instanceof Uint8ClampedArray||u instanceof Int16Array||u instanceof Uint16Array||u instanceof Int32Array||u instanceof Uint32Array||u instanceof Float32Array||u instanceof Float64Array)&&(u=new Uint8Array(u.buffer,u.byteOffset,u.byteLength)),u instanceof Uint8Array){for(var d=u.byteLength,c=[],h=0;h<d;h++)c[h>>>2]|=u[h]<<24-h%4*8;o.call(this,c,d)}else o.apply(this,arguments)};a.prototype=s}}(),n.lib.WordArray})}(Wh)),Wh.exports}var Gh={exports:{}},vv;function iR(){return vv||(vv=1,function(t,e){(function(n,r){t.exports=r(Ie())})(we,function(n){return function(){var r=n,i=r.lib,s=i.WordArray,o=r.enc;o.Utf16=o.Utf16BE={stringify:function(u){for(var d=u.words,c=u.sigBytes,h=[],p=0;p<c;p+=2){var y=d[p>>>2]>>>16-p%4*8&65535;h.push(String.fromCharCode(y))}return h.join("")},parse:function(u){for(var d=u.length,c=[],h=0;h<d;h++)c[h>>>1]|=u.charCodeAt(h)<<16-h%2*16;return s.create(c,d*2)}},o.Utf16LE={stringify:function(u){for(var d=u.words,c=u.sigBytes,h=[],p=0;p<c;p+=2){var y=a(d[p>>>2]>>>16-p%4*8&65535);h.push(String.fromCharCode(y))}return h.join("")},parse:function(u){for(var d=u.length,c=[],h=0;h<d;h++)c[h>>>1]|=a(u.charCodeAt(h)<<16-h%2*16);return s.create(c,d*2)}};function a(u){return u<<8&4278255360|u>>>8&16711935}}(),n.enc.Utf16})}(Gh)),Gh.exports}
vendor: 35,068 bytes, lines 67-80
67var Kh={exports:{}},xv;function Ns(){return xv||(xv=1,function(t,e){(function(n,r){t.exports=r(Ie())})(we,function(n){return function(){var r=n,i=r.lib,s=i.WordArray,o=r.enc;o.Base64={stringify:function(u){var d=u.words,c=u.sigBytes,h=this._map;u.clamp();for(var p=[],y=0;y<c;y+=3)for(var v=d[y>>>2]>>>24-y%4*8&255,E=d[y+1>>>2]>>>24-(y+1)%4*8&255,I=d[y+2>>>2]>>>24-(y+2)%4*8&255,A=v<<16|E<<8|I,m=0;m<4&&y+m*.75<c;m++)p.push(h.charAt(A>>>6*(3-m)&63));var x=h.charAt(64);if(x)for(;p.length%4;)p.push(x);return p.join("")},parse:function(u){var d=u.length,c=this._map,h=this._reverseMap;if(!h){h=this._reverseMap=[];for(var p=0;p<c.length;p++)h[c.charCodeAt(p)]=p}var y=c.charAt(64);if(y){var v=u.indexOf(y);v!==-1&&(d=v)}return a(u,d,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function a(u,d,c){for(var h=[],p=0,y=0;y<d;y++)if(y%4){var v=c[u.charCodeAt(y-1)]<<y%4*2,E=c[u.charCodeAt(y)]>>>6-y%4*2,I=v|E;h[p>>>2]|=I<<24-p%4*8,p++}return s.create(h,p)}}(),n.enc.Base64})}(Kh)),Kh.exports}var Qh={exports:{}},_v;function sR(){return _v||(_v=1,function(t,e){(function(n,r){t.exports=r(Ie())})(we,function(n){return function(){var r=n,i=r.lib,s=i.WordArray,o=r.enc;o.Base64url={stringify:function(u,d){d===void 0&&(d=!0);var c=u.words,h=u.sigBytes,p=d?this._safe_map:this._map;u.clamp();for(var y=[],v=0;v<h;v+=3)for(var E=c[v>>>2]>>>24-v%4*8&255,I=c[v+1>>>2]>>>24-(v+1)%4*8&255,A=c[v+2>>>2]>>>24-(v+2)%4*8&255,m=E<<16|I<<8|A,x=0;x<4&&v+x*.75<h;x++)y.push(p.charAt(m>>>6*(3-x)&63));var R=p.charAt(64);if(R)for(;y.length%4;)y.push(R);return y.join("")},parse:function(u,d){d===void 0&&(d=!0);var c=u.length,h=d?this._safe_map:this._map,p=this._reverseMap;if(!p){p=this._reverseMap=[];for(var y=0;y<h.length;y++)p[h.charCodeAt(y)]=y}var v=h.charAt(64);if(v){var E=u.indexOf(v);E!==-1&&(c=E)}return a(u,c,p)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function a(u,d,c){for(var h=[],p=0,y=0;y<d;y++)if(y%4){var v=c[u.charCodeAt(y-1)]<<y%4*2,E=c[u.charCodeAt(y)]>>>6-y%4*2,I=v|E;h[p>>>2]|=I<<24-p%4*8,p++}return s.create(h,p)}}(),n.enc.Base64url})}(Qh)),Qh.exports}var Xh={exports:{}},Ev;function Bs(){return Ev||(Ev=1,function(t,e){(function(n,r){t.exports=r(Ie())})(we,function(n){return function(r){var i=n,s=i.lib,o=s.WordArray,a=s.Hasher,u=i.algo,d=[];(function(){for(var E=0;E<64;E++)d[E]=r.abs(r.sin(E+1))*4294967296|0})();var c=u.MD5=a.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(E,I){for(var A=0;A<16;A++){var m=I+A,x=E[m];E[m]=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360}var R=this._hash.words,F=E[I+0],b=E[I+1],C=E[I+2],_=E[I+3],T=E[I+4],w=E[I+5],S=E[I+6],D=E[I+7],P=E[I+8],N=E[I+9],B=E[I+10],U=E[I+11],W=E[I+12],L=E[I+13],G=E[I+14],X=E[I+15],V=R[0],$=R[1],H=R[2],K=R[3];V=h(V,$,H,K,F,7,d[0]),K=h(K,V,$,H,b,12,d[1]),H=h(H,K,V,$,C,17,d[2]),$=h($,H,K,V,_,22,d[3]),V=h(V,$,H,K,T,7,d[4]),K=h(K,V,$,H,w,12,d[5]),H=h(H,K,V,$,S,17,d[6]),$=h($,H,K,V,D,22,d[7]),V=h(V,$,H,K,P,7,d[8]),K=h(K,V,$,H,N,12,d[9]),H=h(H,K,V,$,B,17,d[10]),$=h($,H,K,V,U,22,d[11]),V=h(V,$,H,K,W,7,d[12]),K=h(K,V,$,H,L,12,d[13]),H=h(H,K,V,$,G,17,d[14]),$=h($,H,K,V,X,22,d[15]),V=p(V,$,H,K,b,5,d[16]),K=p(K,V,$,H,S,9,d[17]),H=p(H,K,V,$,U,14,d[18]),$=p($,H,K,V,F,20,d[19]),V=p(V,$,H,K,w,5,d[20]),K=p(K,V,$,H,B,9,d[21]),H=p(H,K,V,$,X,14,d[22]),$=p($,H,K,V,T,20,d[23]),V=p(V,$,H,K,N,5,d[24]),K=p(K,V,$,H,G,9,d[25]),H=p(H,K,V,$,_,14,d[26]),$=p($,H,K,V,P,20,d[27]),V=p(V,$,H,K,L,5,d[28]),K=p(K,V,$,H,C,9,d[29]),H=p(H,K,V,$,D,14,d[30]),$=p($,H,K,V,W,20,d[31]),V=y(V,$,H,K,w,4,d[32]),K=y(K,V,$,H,P,11,d[33]),H=y(H,K,V,$,U,16,d[34]),$=y($,H,K,V,G,23,d[35]),V=y(V,$,H,K,b,4,d[36]),K=y(K,V,$,H,T,11,d[37]),H=y(H,K,V,$,D,16,d[38]),$=y($,H,K,V,B,23,d[39]),V=y(V,$,H,K,L,4,d[40]),K=y(K,V,$,H,F,11,d[41]),H=y(H,K,V,$,_,16,d[42]),$=y($,H,K,V,S,23,d[43]),V=y(V,$,H,K,N,4,d[44]),K=y(K,V,$,H,W,11,d[45]),H=y(H,K,V,$,X,16,d[46]),$=y($,H,K,V,C,23,d[47]),V=v(V,$,H,K,F,6,d[48]),K=v(K,V,$,H,D,10,d[49]),H=v(H,K,V,$,G,15,d[50]),$=v($,H,K,V,w,21,d[51]),V=v(V,$,H,K,W,6,d[52]),K=v(K,V,$,H,_,10,d[53]),H=v(H,K,V,$,B,15,d[54]),$=v($,H,K,V,b,21,d[55]),V=v(V,$,H,K,P,6,d[56]),K=v(K,V,$,H,X,10,d[57]),H=v(H,K,V,$,S,15,d[58]),$=v($,H,K,V,L,21,d[59]),V=v(V,$,H,K,T,6,d[60]),K=v(K,V,$,H,U,10,d[61]),H=v(H,K,V,$,C,15,d[62]),$=v($,H,K,V,N,21,d[63]),R[0]=R[0]+V|0,R[1]=R[1]+$|0,R[2]=R[2]+H|0,R[3]=R[3]+K|0},_doFinalize:function(){var E=this._data,I=E.words,A=this._nDataBytes*8,m=E.sigBytes*8;I[m>>>5]|=128<<24-m%32;var x=r.floor(A/4294967296),R=A;I[(m+64>>>9<<4)+15]=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,I[(m+64>>>9<<4)+14]=(R<<8|R>>>24)&16711935|(R<<24|R>>>8)&4278255360,E.sigBytes=(I.length+1)*4,this._process();for(var F=this._hash,b=F.words,C=0;C<4;C++){var _=b[C];b[C]=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360}return F},clone:function(){var E=a.clone.call(this);return E._hash=this._hash.clone(),E}});function h(E,I,A,m,x,R,F){var b=E+(I&A|~I&m)+x+F;return(b<<R|b>>>32-R)+I}function p(E,I,A,m,x,R,F){var b=E+(I&m|A&~m)+x+F;return(b<<R|b>>>32-R)+I}function y(E,I,A,m,x,R,F){var b=E+(I^A^m)+x+F;return(b<<R|b>>>32-R)+I}function v(E,I,A,m,x,R,F){var b=E+(A^(I|~m))+x+F;return(b<<R|b>>>32-R)+I}i.MD5=a._createHelper(c),i.HmacMD5=a._createHmacHelper(c)}(Math),n.MD5})}(Xh)),Xh.exports}var Yh={exports:{}},wv;function JE(){return wv||(wv=1,function(t,e){(function(n,r){t.exports=r(Ie())})(we,function(n){return function(){var r=n,i=r.lib,s=i.WordArray,o=i.Hasher,a=r.algo,u=[],d=a.SHA1=o.extend({_doReset:function(){this._hash=new s.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(c,h){for(var p=this._hash.words,y=p[0],v=p[1],E=p[2],I=p[3],A=p[4],m=0;m<80;m++){if(m<16)u[m]=c[h+m]|0;else{var x=u[m-3]^u[m-8]^u[m-14]^u[m-16];u[m]=x<<1|x>>>31}var R=(y<<5|y>>>27)+A+u[m];m<20?R+=(v&E|~v&I)+1518500249:m<40?R+=(v^E^I)+1859775393:m<60?R+=(v&E|v&I|E&I)-1894007588:R+=(v^E^I)-899497514,A=I,I=E,E=v<<30|v>>>2,v=y,y=R}p[0]=p[0]+y|0,p[1]=p[1]+v|0,p[2]=p[2]+E|0,p[3]=p[3]+I|0,p[4]=p[4]+A|0},_doFinalize:function(){var c=this._data,h=c.words,p=this._nDataBytes*8,y=c.sigBytes*8;return h[y>>>5]|=128<<24-y%32,h[(y+64>>>9<<4)+14]=Math.floor(p/4294967296),h[(y+64>>>9<<4)+15]=p,c.sigBytes=h.length*4,this._process(),this._hash},clone:function(){var c=o.clone.call(this);return c._hash=this._hash.clone(),c}});r.SHA1=o._createHelper(d),r.HmacSHA1=o._createHmacHelper(d)}(),n.SHA1})}(Yh)),Yh.exports}var Jh={exports:{}},Av;function Im(){return Av||(Av=1,function(t,e){(function(n,r){t.exports=r(Ie())})(we,function(n){return function(r){var i=n,s=i.lib,o=s.WordArray,a=s.Hasher,u=i.algo,d=[],c=[];(function(){function y(A){for(var m=r.sqrt(A),x=2;x<=m;x++)if(!(A%x))return!1;return!0}function v(A){return(A-(A|0))*4294967296|0}for(var E=2,I=0;I<64;)y(E)&&(I<8&&(d[I]=v(r.pow(E,1/2))),c[I]=v(r.pow(E,1/3)),I++),E++})();var h=[],p=u.SHA256=a.extend({_doReset:function(){this._hash=new o.init(d.slice(0))},_doProcessBlock:function(y,v){for(var E=this._hash.words,I=E[0],A=E[1],m=E[2],x=E[3],R=E[4],F=E[5],b=E[6],C=E[7],_=0;_<64;_++){if(_<16)h[_]=y[v+_]|0;else{var T=h[_-15],w=(T<<25|T>>>7)^(T<<14|T>>>18)^T>>>3,S=h[_-2],D=(S<<15|S>>>17)^(S<<13|S>>>19)^S>>>10;h[_]=w+h[_-7]+D+h[_-16]}var P=R&F^~R&b,N=I&A^I&m^A&m,B=(I<<30|I>>>2)^(I<<19|I>>>13)^(I<<10|I>>>22),U=(R<<26|R>>>6)^(R<<21|R>>>11)^(R<<7|R>>>25),W=C+U+P+c[_]+h[_],L=B+N;C=b,b=F,F=R,R=x+W|0,x=m,m=A,A=I,I=W+L|0}E[0]=E[0]+I|0,E[1]=E[1]+A|0,E[2]=E[2]+m|0,E[3]=E[3]+x|0,E[4]=E[4]+R|0,E[5]=E[5]+F|0,E[6]=E[6]+b|0,E[7]=E[7]+C|0},_doFinalize:function(){var y=this._data,v=y.words,E=this._nDataBytes*8,I=y.sigBytes*8;return v[I>>>5]|=128<<24-I%32,v[(I+64>>>9<<4)+14]=r.floor(E/4294967296),v[(I+64>>>9<<4)+15]=E,y.sigBytes=v.length*4,this._process(),this._hash},clone:function(){var y=a.clone.call(this);return y._hash=this._hash.clone(),y}});i.SHA256=a._createHelper(p),i.HmacSHA256=a._createHmacHelper(p)}(Math),n.SHA256})}(Jh)),Jh.exports}var Zh={exports:{}},Cv;function oR(){return Cv||(Cv=1,function(t,e){(function(n,r,i){t.exports=r(Ie(),Im())})(we,function(n){return function(){var r=n,i=r.lib,s=i.WordArray,o=r.algo,a=o.SHA256,u=o.SHA224=a.extend({_doReset:function(){this._hash=new s.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var d=a._doFinalize.call(this);return d.sigBytes-=4,d}});r.SHA224=a._createHelper(u),r.HmacSHA224=a._createHmacHelper(u)}(),n.SHA224})}(Zh)),Zh.exports}var e0={exports:{}},Tv;function ZE(){return Tv||(Tv=1,function(t,e){(function(n,r,i){t.exports=r(Ie(),bd())})(we,function(n){return function(){var r=n,i=r.lib,s=i.Hasher,o=r.x64,a=o.Word,u=o.WordArray,d=r.algo;function c(){return a.create.apply(a,arguments)}var h=[c(1116352408,3609767458),c(1899447441,602891725),c(3049323471,3964484399),c(3921009573,2173295548),c(961987163,4081628472),c(1508970993,3053834265),c(2453635748,2937671579),c(2870763221,3664609560),c(3624381080,2734883394),c(310598401,1164996542),c(607225278,1323610764),c(1426881987,3590304994),c(1925078388,4068182383),c(2162078206,991336113),c(2614888103,633803317),c(3248222580,3479774868),c(3835390401,2666613458),c(4022224774,944711139),c(264347078,2341262773),c(604807628,2007800933),c(770255983,1495990901),c(1249150122,1856431235),c(1555081692,3175218132),c(1996064986,2198950837),c(2554220882,3999719339),c(2821834349,766784016),c(2952996808,2566594879),c(3210313671,3203337956),c(3336571891,1034457026),c(3584528711,2466948901),c(113926993,3758326383),c(338241895,168717936),c(666307205,1188179964),c(773529912,1546045734),c(1294757372,1522805485),c(1396182291,2643833823),c(1695183700,2343527390),c(1986661051,1014477480),c(2177026350,1206759142),c(2456956037,344077627),c(2730485921,1290863460),c(2820302411,3158454273),c(3259730800,3505952657),c(3345764771,106217008),c(3516065817,3606008344),c(3600352804,1432725776),c(4094571909,1467031594),c(275423344,851169720),c(430227734,3100823752),c(506948616,1363258195),c(659060556,3750685593),c(883997877,3785050280),c(958139571,3318307427),c(1322822218,3812723403),c(1537002063,2003034995),c(1747873779,3602036899),c(1955562222,1575990012),c(2024104815,1125592928),c(2227730452,2716904306),c(2361852424,442776044),c(2428436474,593698344),c(2756734187,3733110249),c(3204031479,2999351573),c(3329325298,3815920427),c(3391569614,3928383900),c(3515267271,566280711),c(3940187606,3454069534),c(4118630271,4000239992),c(116418474,1914138554),c(174292421,2731055270),c(289380356,3203993006),c(460393269,320620315),c(685471733,587496836),c(852142971,1086792851),c(1017036298,365543100),c(1126000580,2618297676),c(1288033470,3409855158),c(1501505948,4234509866),c(1607167915,987167468),c(1816402316,1246189591)],p=[];(function(){for(var v=0;v<80;v++)p[v]=c()})();var y=d.SHA512=s.extend({_doReset:function(){this._hash=new u.init([new a.init(1779033703,4089235720),new a.init(3144134277,2227873595),new a.init(1013904242,4271175723),new a.init(2773480762,1595750129),new a.init(1359893119,2917565137),new a.init(2600822924,725511199),new a.init(528734635,4215389547),new a.init(1541459225,327033209)])},_doProcessBlock:function(v,E){for(var I=this._hash.words,A=I[0],m=I[1],x=I[2],R=I[3],F=I[4],b=I[5],C=I[6],_=I[7],T=A.high,w=A.low,S=m.high,D=m.low,P=x.high,N=x.low,B=R.high,U=R.low,W=F.high,L=F.low,G=b.high,X=b.low,V=C.high,$=C.low,H=_.high,K=_.low,ye=T,he=w,_e=S,ue=D,_t=P,ct=N,Et=B,wt=U,me=W,Je=L,In=G,Sn=X,Un=V,$n=$,nr=H,Rn=K,dt=0;dt<80;dt++){var ht,nn,Pn=p[dt];if(dt<16)nn=Pn.high=v[E+dt*2]|0,ht=Pn.low=v[E+dt*2+1]|0;else{var Ee=p[dt-15],ft=Ee.high,Fe=Ee.low,pt=(ft>>>1|Fe<<31)^(ft>>>8|Fe<<24)^ft>>>7,wr=(Fe>>>1|ft<<31)^(Fe>>>8|ft<<24)^(Fe>>>7|ft<<25),Wi=p[dt-2],pn=Wi.high,Ar=Wi.low,Cr=(pn>>>19|Ar<<13)^(pn<<3|Ar>>>29)^pn>>>6,Gi=(Ar>>>19|pn<<13)^(Ar<<3|pn>>>29)^(Ar>>>6|pn<<26),Ki=p[dt-7],Qi=Ki.high,la=Ki.low,$s=p[dt-16],Xi=$s.high,Yi=$s.low;ht=wr+la,nn=pt+Qi+(ht>>>0<wr>>>0?1:0),ht=ht+Gi,nn=nn+Cr+(ht>>>0<Gi>>>0?1:0),ht=ht+Yi,nn=nn+Xi+(ht>>>0<Yi>>>0?1:0),Pn.high=nn,Pn.low=ht}var zs=me&In^~me&Un,rr=Je&Sn^~Je&$n,Tr=ye&_e^ye&_t^_e&_t,Kr=he&ue^he&ct^ue&ct,zn=(ye>>>28|he<<4)^(ye<<30|he>>>2)^(ye<<25|he>>>7),ir=(he>>>28|ye<<4)^(he<<30|ye>>>2)^(he<<25|ye>>>7),Ir=(me>>>14|Je<<18)^(me>>>18|Je<<14)^(me<<23|Je>>>9),js=(Je>>>14|me<<18)^(Je>>>18|me<<14)^(Je<<23|me>>>9),rn=h[dt],Ji=rn.high,Oe=rn.low,mt=Rn+js,Lt=nr+Ir+(mt>>>0<Rn>>>0?1:0),mt=mt+rr,Lt=Lt+zs+(mt>>>0<rr>>>0?1:0),mt=mt+Oe,Lt=Lt+Ji+(mt>>>0<Oe>>>0?1:0),mt=mt+ht,Lt=Lt+nn+(mt>>>0<ht>>>0?1:0),sr=ir+Kr,ua=zn+Tr+(sr>>>0<ir>>>0?1:0);nr=Un,Rn=$n,Un=In,$n=Sn,In=me,Sn=Je,Je=wt+mt|0,me=Et+Lt+(Je>>>0<wt>>>0?1:0)|0,Et=_t,wt=ct,_t=_e,ct=ue,_e=ye,ue=he,he=mt+sr|0,ye=Lt+ua+(he>>>0<mt>>>0?1:0)|0}w=A.low=w+he,A.high=T+ye+(w>>>0<he>>>0?1:0),D=m.low=D+ue,m.high=S+_e+(D>>>0<ue>>>0?1:0),N=x.low=N+ct,x.high=P+_t+(N>>>0<ct>>>0?1:0),U=R.low=U+wt,R.high=B+Et+(U>>>0<wt>>>0?1:0),L=F.low=L+Je,F.high=W+me+(L>>>0<Je>>>0?1:0),X=b.low=X+Sn,b.high=G+In+(X>>>0<Sn>>>0?1:0),$=C.low=$+$n,C.high=V+Un+($>>>0<$n>>>0?1:0),K=_.low=K+Rn,_.high=H+nr+(K>>>0<Rn>>>0?1:0)},_doFinalize:function(){var v=this._data,E=v.words,I=this._nDataBytes*8,A=v.sigBytes*8;E[A>>>5]|=128<<24-A%32,E[(A+128>>>10<<5)+30]=Math.floor(I/4294967296),E[(A+128>>>10<<5)+31]=I,v.sigBytes=E.length*4,this._process();var m=this._hash.toX32();return m},clone:function(){var v=s.clone.call(this);return v._hash=this._hash.clone(),v},blockSize:1024/32});r.SHA512=s._createHelper(y),r.HmacSHA512=s._createHmacHelper(y)}(),n.SHA512})}(e0)),e0.exports}var t0={exports:{}},Iv;function aR(){return Iv||(Iv=1,function(t,e){(function(n,r,i){t.exports=r(Ie(),bd(),ZE())})(we,function(n){return function(){var r=n,i=r.x64,s=i.Word,o=i.WordArray,a=r.algo,u=a.SHA512,d=a.SHA384=u.extend({_doReset:function(){this._hash=new o.init([new s.init(3418070365,3238371032),new s.init(1654270250,914150663),new s.init(2438529370,812702999),new s.init(355462360,4144912697),new s.init(1731405415,4290775857),new s.init(2394180231,1750603025),new s.init(3675008525,1694076839),new s.init(1203062813,3204075428)])},_doFinalize:function(){var c=u._doFinalize.call(this);return c.sigBytes-=16,c}});r.SHA384=u._createHelper(d),r.HmacSHA384=u._createHmacHelper(d)}(),n.SHA384})}(t0)),t0.exports}var n0={exports:{}},Sv;function lR(){return Sv||(Sv=1,function(t,e){(function(n,r,i){t.exports=r(Ie(),bd())})(we,function(n){return function(r){var i=n,s=i.lib,o=s.WordArray,a=s.Hasher,u=i.x64,d=u.Word,c=i.algo,h=[],p=[],y=[];(function(){for(var I=1,A=0,m=0;m<24;m++){h[I+5*A]=(m+1)*(m+2)/2%64;var x=A%5,R=(2*I+3*A)%5;I=x,A=R}for(var I=0;I<5;I++)for(var A=0;A<5;A++)p[I+5*A]=A+(2*I+3*A)%5*5;for(var F=1,b=0;b<24;b++){for(var C=0,_=0,T=0;T<7;T++){if(F&1){var w=(1<<T)-1;w<32?_^=1<<w:C^=1<<w-32}F&128?F=F<<1^113:F<<=1}y[b]=d.create(C,_)}})();var v=[];(function(){for(var I=0;I<25;I++)v[I]=d.create()})();var E=c.SHA3=a.extend({cfg:a.cfg.extend({outputLength:512}),_doReset:function(){for(var I=this._state=[],A=0;A<25;A++)I[A]=new d.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(I,A){for(var m=this._state,x=this.blockSize/2,R=0;R<x;R++){var F=I[A+2*R],b=I[A+2*R+1];F=(F<<8|F>>>24)&16711935|(F<<24|F>>>8)&4278255360,b=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360;var C=m[R];C.high^=b,C.low^=F}for(var _=0;_<24;_++){for(var T=0;T<5;T++){for(var w=0,S=0,D=0;D<5;D++){var C=m[T+5*D];w^=C.high,S^=C.low}var P=v[T];P.high=w,P.low=S}for(var T=0;T<5;T++)for(var N=v[(T+4)%5],B=v[(T+1)%5],U=B.high,W=B.low,w=N.high^(U<<1|W>>>31),S=N.low^(W<<1|U>>>31),D=0;D<5;D++){var C=m[T+5*D];C.high^=w,C.low^=S}for(var L=1;L<25;L++){var w,S,C=m[L],G=C.high,X=C.low,V=h[L];V<32?(w=G<<V|X>>>32-V,S=X<<V|G>>>32-V):(w=X<<V-32|G>>>64-V,S=G<<V-32|X>>>64-V);var $=v[p[L]];$.high=w,$.low=S}var H=v[0],K=m[0];H.high=K.high,H.low=K.low;for(var T=0;T<5;T++)for(var D=0;D<5;D++){var L=T+5*D,C=m[L],ye=v[L],he=v[(T+1)%5+5*D],_e=v[(T+2)%5+5*D];C.high=ye.high^~he.high&_e.high,C.low=ye.low^~he.low&_e.low}var C=m[0],ue=y[_];C.high^=ue.high,C.low^=ue.low}},_doFinalize:function(){var I=this._data,A=I.words;this._nDataBytes*8;var m=I.sigBytes*8,x=this.blockSize*32;A[m>>>5]|=1<<24-m%32,A[(r.ceil((m+1)/x)*x>>>5)-1]|=128,I.sigBytes=A.length*4,this._process();for(var R=this._state,F=this.cfg.outputLength/8,b=F/8,C=[],_=0;_<b;_++){var T=R[_],w=T.high,S=T.low;w=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360,S=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360,C.push(S),C.push(w)}return new o.init(C,F)},clone:function(){for(var I=a.clone.call(this),A=I._state=this._state.slice(0),m=0;m<25;m++)A[m]=A[m].clone();return I}});i.SHA3=a._createHelper(E),i.HmacSHA3=a._createHmacHelper(E)}(Math),n.SHA3})}(n0)),n0.exports}var r0={exports:{}},Rv;function uR(){return Rv||(Rv=1,function(t,e){(function(n,r){t.exports=r(Ie())})(we,function(n){/** @preserve 68 (c) 2012 by Cédric Mesnil. All rights reserved. 69 70 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 71 72 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 73 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 74 75 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 76 */return function(r){var i=n,s=i.lib,o=s.WordArray,a=s.Hasher,u=i.algo,d=o.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),c=o.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),h=o.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),p=o.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),y=o.create([0,1518500249,1859775393,2400959708,2840853838]),v=o.create([1352829926,1548603684,1836072691,2053994217,0]),E=u.RIPEMD160=a.extend({_doReset:function(){this._hash=o.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(b,C){for(var _=0;_<16;_++){var T=C+_,w=b[T];b[T]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360}var S=this._hash.words,D=y.words,P=v.words,N=d.words,B=c.words,U=h.words,W=p.words,L,G,X,V,$,H,K,ye,he,_e;H=L=S[0],K=G=S[1],ye=X=S[2],he=V=S[3],_e=$=S[4];for(var ue,_=0;_<80;_+=1)ue=L+b[C+N[_]]|0,_<16?ue+=I(G,X,V)+D[0]:_<32?ue+=A(G,X,V)+D[1]:_<48?ue+=m(G,X,V)+D[2]:_<64?ue+=x(G,X,V)+D[3]:ue+=R(G,X,V)+D[4],ue=ue|0,ue=F(ue,U[_]),ue=ue+$|0,L=$,$=V,V=F(X,10),X=G,G=ue,ue=H+b[C+B[_]]|0,_<16?ue+=R(K,ye,he)+P[0]:_<32?ue+=x(K,ye,he)+P[1]:_<48?ue+=m(K,ye,he)+P[2]:_<64?ue+=A(K,ye,he)+P[3]:ue+=I(K,ye,he)+P[4],ue=ue|0,ue=F(ue,W[_]),ue=ue+_e|0,H=_e,_e=he,he=F(ye,10),ye=K,K=ue;ue=S[1]+X+he|0,S[1]=S[2]+V+_e|0,S[2]=S[3]+$+H|0,S[3]=S[4]+L+K|0,S[4]=S[0]+G+ye|0,S[0]=ue},_doFinalize:function(){var b=this._data,C=b.words,_=this._nDataBytes*8,T=b.sigBytes*8;C[T>>>5]|=128<<24-T%32,C[(T+64>>>9<<4)+14]=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360,b.sigBytes=(C.length+1)*4,this._process();for(var w=this._hash,S=w.words,D=0;D<5;D++){var P=S[D];S[D]=(P<<8|P>>>24)&16711935|(P<<24|P>>>8)&4278255360}return w},clone:function(){var b=a.clone.call(this);return b._hash=this._hash.clone(),b}});function I(b,C,_){return b^C^_}function A(b,C,_){return b&C|~b&_}function m(b,C,_){return(b|~C)^_}function x(b,C,_){return b&_|C&~_}function R(b,C,_){return b^(C|~_)}function F(b,C){return b<<C|b>>>32-C}i.RIPEMD160=a._createHelper(E),i.HmacRIPEMD160=a._createHmacHelper(E)}(),n.RIPEMD160})}(r0)),r0.exports}var i0={exports:{}},Pv;function Sm(){return Pv||(Pv=1,function(t,e){(function(n,r){t.exports=r(Ie())})(we,function(n){(function(){var r=n,i=r.lib,s=i.Base,o=r.enc,a=o.Utf8,u=r.algo;u.HMAC=s.extend({init:function(d,c){d=this._hasher=new d.init,typeof c=="string"&&(c=a.parse(c));var h=d.blockSize,p=h*4;c.sigBytes>p&&(c=d.finalize(c)),c.clamp();for(var y=this._oKey=c.clone(),v=this._iKey=c.clone(),E=y.words,I=v.words,A=0;A<h;A++)E[A]^=1549556828,I[A]^=909522486;y.sigBytes=v.sigBytes=p,this.reset()},reset:function(){var d=this._hasher;d.reset(),d.update(this._iKey)},update:function(d){return this._hasher.update(d),this},finalize:function(d){var c=this._hasher,h=c.finalize(d);c.reset();var p=c.finalize(this._oKey.clone().concat(h));return p}})})()})}(i0)),i0.exports}var s0={exports:{}},kv;function cR(){return kv||(kv=1,function(t,e){(function(n,r,i){t.exports=r(Ie(),Im(),Sm())})(we,function(n){return function(){var r=n,i=r.lib,s=i.Base,o=i.WordArray,a=r.algo,u=a.SHA256,d=a.HMAC,c=a.PBKDF2=s.extend({cfg:s.extend({keySize:128/32,hasher:u,iterations:25e4}),init:function(h){this.cfg=this.cfg.extend(h)},compute:function(h,p){for(var y=this.cfg,v=d.create(y.hasher,h),E=o.create(),I=o.create([1]),A=E.words,m=I.words,x=y.keySize,R=y.iterations;A.length<x;){var F=v.update(p).finalize(I);v.reset();for(var b=F.words,C=b.length,_=F,T=1;T<R;T++){_=v.finalize(_),v.reset();for(var w=_.words,S=0;S<C;S++)b[S]^=w[S]}E.concat(F),m[0]++}return E.sigBytes=x*4,E}});r.PBKDF2=function(h,p,y){return c.create(y).compute(h,p)}}(),n.PBKDF2})}(s0)),s0.exports}var o0={exports:{}},Dv;function ji(){return Dv||(Dv=1,function(t,e){(function(n,r,i){t.exports=r(Ie(),JE(),Sm())})(we,function(n){return function(){var r=n,i=r.lib,s=i.Base,o=i.WordArray,a=r.algo,u=a.MD5,d=a.EvpKDF=s.extend({cfg:s.extend({keySize:128/32,hasher:u,iterations:1}),init:function(c){this.cfg=this.cfg.extend(c)},compute:function(c,h){for(var p,y=this.cfg,v=y.hasher.create(),E=o.create(),I=E.words,A=y.keySize,m=y.iterations;I.length<A;){p&&v.update(p),p=v.update(c).finalize(h),v.reset();for(var x=1;x<m;x++)p=v.finalize(p),v.reset();E.concat(p)}return E.sigBytes=A*4,E}});r.EvpKDF=function(c,h,p){return d.create(p).compute(c,h)}}(),n.EvpKDF})}(o0)),o0.exports}var a0={exports:{}},bv;function St(){return bv||(bv=1,function(t,e){(function(n,r,i){t.exports=r(Ie(),ji())})(we,function(n){n.lib.Cipher||function(r){var i=n,s=i.lib,o=s.Base,a=s.WordArray,u=s.BufferedBlockAlgorithm,d=i.enc;d.Utf8;var c=d.Base64,h=i.algo,p=h.EvpKDF,y=s.Cipher=u.extend({cfg:o.extend(),createEncryptor:function(w,S){return this.create(this._ENC_XFORM_MODE,w,S)},createDecryptor:function(w,S){return this.create(this._DEC_XFORM_MODE,w,S)},init:function(w,S,D){this.cfg=this.cfg.extend(D),this._xformMode=w,this._key=S,this.reset()},reset:function(){u.reset.call(this),this._doReset()},process:function(w){return this._append(w),this._process()},finalize:function(w){w&&this._append(w);var S=this._doFinalize();return S},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function w(S){return typeof S=="string"?T:b}return function(S){return{encrypt:function(D,P,N){return w(P).encrypt(S,D,P,N)},decrypt:function(D,P,N){return w(P).decrypt(S,D,P,N)}}}}()});s.StreamCipher=y.extend({_doFinalize:function(){var w=this._process(!0);return w},blockSize:1});var v=i.mode={},E=s.BlockCipherMode=o.extend({createEncryptor:function(w,S){return this.Encryptor.create(w,S)},createDecryptor:function(w,S){return this.Decryptor.create(w,S)},init:function(w,S){this._cipher=w,this._iv=S}}),I=v.CBC=function(){var w=E.extend();w.Encryptor=w.extend({processBlock:function(D,P){var N=this._cipher,B=N.blockSize;S.call(this,D,P,B),N.encryptBlock(D,P),this._prevBlock=D.slice(P,P+B)}}),w.Decryptor=w.extend({processBlock:function(D,P){var N=this._cipher,B=N.blockSize,U=D.slice(P,P+B);N.decryptBlock(D,P),S.call(this,D,P,B),this._prevBlock=U}});function S(D,P,N){var B,U=this._iv;U?(B=U,this._iv=r):B=this._prevBlock;for(var W=0;W<N;W++)D[P+W]^=B[W]}return w}(),A=i.pad={},m=A.Pkcs7={pad:function(w,S){for(var D=S*4,P=D-w.sigBytes%D,N=P<<24|P<<16|P<<8|P,B=[],U=0;U<P;U+=4)B.push(N);var W=a.create(B,P);w.concat(W)},unpad:function(w){var S=w.words[w.sigBytes-1>>>2]&255;w.sigBytes-=S}};s.BlockCipher=y.extend({cfg:y.cfg.extend({mode:I,padding:m}),reset:function(){var w;y.reset.call(this);var S=this.cfg,D=S.iv,P=S.mode;this._xformMode==this._ENC_XFORM_MODE?w=P.createEncryptor:(w=P.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==w?this._mode.init(this,D&&D.words):(this._mode=w.call(P,this,D&&D.words),this._mode.__creator=w)},_doProcessBlock:function(w,S){this._mode.processBlock(w,S)},_doFinalize:function(){var w,S=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(S.pad(this._data,this.blockSize),w=this._process(!0)):(w=this._process(!0),S.unpad(w)),w},blockSize:128/32});var x=s.CipherParams=o.extend({init:function(w){this.mixIn(w)},toString:function(w){return(w||this.formatter).stringify(this)}}),R=i.format={},F=R.OpenSSL={stringify:function(w){var S,D=w.ciphertext,P=w.salt;return P?S=a.create([1398893684,1701076831]).concat(P).concat(D):S=D,S.toString(c)},parse:function(w){var S,D=c.parse(w),P=D.words;return P[0]==1398893684&&P[1]==1701076831&&(S=a.create(P.slice(2,4)),P.splice(0,4),D.sigBytes-=16),x.create({ciphertext:D,salt:S})}},b=s.SerializableCipher=o.extend({cfg:o.extend({format:F}),encrypt:function(w,S,D,P){P=this.cfg.extend(P);var N=w.createEncryptor(D,P),B=N.finalize(S),U=N.cfg;return x.create({ciphertext:B,key:D,iv:U.iv,algorithm:w,mode:U.mode,padding:U.padding,blockSize:w.blockSize,formatter:P.format})},decrypt:function(w,S,D,P){P=this.cfg.extend(P),S=this._parse(S,P.format);var N=w.createDecryptor(D,P).finalize(S.ciphertext);return N},_parse:function(w,S){return typeof w=="string"?S.parse(w,this):w}}),C=i.kdf={},_=C.OpenSSL={execute:function(w,S,D,P,N){if(P||(P=a.random(64/8)),N)var B=p.create({keySize:S+D,hasher:N}).compute(w,P);else var B=p.create({keySize:S+D}).compute(w,P);var U=a.create(B.words.slice(S),D*4);return B.sigBytes=S*4,x.create({key:B,iv:U,salt:P})}},T=s.PasswordBasedCipher=b.extend({cfg:b.cfg.extend({kdf:_}),encrypt:function(w,S,D,P){P=this.cfg.extend(P);var N=P.kdf.execute(D,w.keySize,w.ivSize,P.salt,P.hasher);P.iv=N.iv;var B=b.encrypt.call(this,w,S,N.key,P);return B.mixIn(N),B},decrypt:function(w,S,D,P){P=this.cfg.extend(P),S=this._parse(S,P.format);var N=P.kdf.execute(D,w.keySize,w.ivSize,S.salt,P.hasher);P.iv=N.iv;var B=b.decrypt.call(this,w,S,N.key,P);return B}})}()})}(a0)),a0.exports}var l0={exports:{}},Fv;function dR(){return Fv||(Fv=1,function(t,e){(function(n,r,i){t.exports=r(Ie(),St())})(we,function(n){return n.mode.CFB=function(){var r=n.lib.BlockCipherMode.extend();r.Encryptor=r.extend({processBlock:function(s,o){var a=this._cipher,u=a.blockSize;i.call(this,s,o,u,a),this._prevBlock=s.slice(o,o+u)}}),r.Decryptor=r.extend({processBlock:function(s,o){var a=this._cipher,u=a.blockSize,d=s.slice(o,o+u);i.call(this,s,o,u,a),this._prevBlock=d}});function i(s,o,a,u){var d,c=this._iv;c?(d=c.slice(0),this._iv=void 0):d=this._prevBlock,u.encryptBlock(d,0);for(var h=0;h<a;h++)s[o+h]^=d[h]}return r}(),n.mode.CFB})}(l0)),l0.exports}var u0={exports:{}},Nv;function hR(){return Nv||(Nv=1,function(t,e){(function(n,r,i){t.exports=r(Ie(),St())})(we,function(n){return n.mode.CTR=function(){var r=n.lib.BlockCipherMode.extend(),i=r.Encryptor=r.extend({processBlock:function(s,o){var a=this._cipher,u=a.blockSize,d=this._iv,c=this._counter;d&&(c=this._counter=d.slice(0),this._iv=void 0);var h=c.slice(0);a.encryptBlock(h,0),c[u-1]=c[u-1]+1|0;for(var p=0;p<u;p++)s[o+p]^=h[p]}});return r.Decryptor=i,r}(),n.mode.CTR})}(u0)),u0.exports}var c0={exports:{}},Bv;function fR(){return Bv||(Bv=1,function(t,e){(function(n,r,i){t.exports=r(Ie(),St())})(we,function(n){/** @preserve 77 * Counter block mode compatible with Dr Brian Gladman fileenc.c 78 * derived from CryptoJS.mode.CTR 79 * Jan Hruby [email protected] 80 */return n.mode.CTRGladman=function(){var r=n.lib.BlockCipherMode.extend();function i(a){if((a>>24&255)===255){var u=a>>16&255,d=a>>8&255,c=a&255;u===255?(u=0,d===255?(d=0,c===255?c=0:++c):++d):++u,a=0,a+=u<<16,a+=d<<8,a+=c}else a+=1<<24;return a}function s(a){return(a[0]=i(a[0]))===0&&(a[1]=i(a[1])),a}var o=r.Encryptor=r.extend({processBlock:function(a,u){var d=this._cipher,c=d.blockSize,h=this._iv,p=this._counter;h&&(p=this._counter=h.slice(0),this._iv=void 0),s(p);var y=p.slice(0);d.encryptBlock(y,0);for(var v=0;v<c;v++)a[u+v]^=y[v]}});return r.Decryptor=o,r}(),n.mode.CTRGladman})}(c0)),c0.exports}var d0={exports:{}},Ov;function pR(){return Ov||(Ov=1,function(t,e){(function(n,r,i){t.exports=r(Ie(),St())})(we,function(n){return n.mode.OFB=function(){var r=n.lib.BlockCipherMode.extend(),i=r.Encryptor=r.extend({processBlock:function(s,o){var a=this._cipher,u=a.blockSize,d=this._iv,c=this._keystream;d&&(c=this._keystream=d.slice(0),this._iv=void 0),a.encryptBlock(c,0);for(var h=0;h<u;h++)s[o+h]^=c[h]}});return r.Decryptor=i,r}(),n.mode.OFB})}(d0)),d0.exports}var h0={exports:{}},Lv;function mR(){return Lv||(Lv=1,function(t,e){(function(n,r,i){t.exports=r(Ie(),St())})(we,function(n){return n.mode.ECB=function(){var r=n.lib.BlockCipherMode.extend();return r.Encryptor=r.extend({processBlock:function(i,s){this._cipher.encryptBlock(i,s)}}),r.Decryptor=r.extend({processBlock:function(i,s){this._cipher.decryptBlock(i,s)}}),r}(),n.mode.ECB})}(h0)),h0.exports}var f0={exports:{}},Mv;function gR(){return Mv||(Mv=1,function(t,e){(function(n,r,i){t.exports=r(Ie(),St())})(we,function(n){return n.pad.AnsiX923={pad:function(r,i){var s=r.sigBytes,o=i*4,a=o-s%o,u=s+a-1;r.clamp(),r.words[u>>>2]|=a<<24-u%4*8,r.sigBytes+=a},unpad:function(r){var i=r.words[r.sigBytes-1>>>2]&255;r.sigBytes-=i}},n.pad.Ansix923})}(f0)),f0.exports}var p0={exports:{}},Vv;function yR(){return Vv||(Vv=1,function(t,e){(function(n,r,i){t.exports=r(Ie(),St())})(we,function(n){return n.pad.Iso10126={pad:function(r,i){var s=i*4,o=s-r.sigBytes%s;r.concat(n.lib.WordArray.random(o-1)).concat(n.lib.WordArray.create([o<<24],1))},unpad:function(r){var i=r.words[r.sigBytes-1>>>2]&255;r.sigBytes-=i}},n.pad.Iso10126})}(p0)),p0.exports}var m0={exports:{}},Uv;function vR(){return Uv||(Uv=1,function(t,e){(function(n,r,i){t.exports=r(Ie(),St())})(we,function(n){return n.pad.Iso97971={pad:function(r,i){r.concat(n.lib.WordArray.create([2147483648],1)),n.pad.ZeroPadding.pad(r,i)},unpad:function(r){n.pad.ZeroPadding.unpad(r),r.sigBytes--}},n.pad.Iso97971})}(m0)),m0.exports}var g0={exports:{}},$v;function xR(){return $v||($v=1,function(t,e){(function(n,r,i){t.exports=r(Ie(),St())})(we,function(n){return n.pad.ZeroPadding={pad:function(r,i){var s=i*4;r.clamp(),r.sigBytes+=s-(r.sigBytes%s||s)},unpad:function(r){for(var i=r.words,s=r.sigBytes-1,s=r.sigBytes-1;s>=0;s--)if(i[s>>>2]>>>24-s%4*8&255){r.sigBytes=s+1;break}}},n.pad.ZeroPadding})}(g0)),g0.exports}var y0={exports:{}},zv;function _R(){return zv||(zv=1,function(t,e){(function(n,r,i){t.exports=r(Ie(),St())})(we,function(n){return n.pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding})}(y0)),y0.exports}var v0={exports:{}},jv;function ER(){return jv||(jv=1,function(t,e){(function(n,r,i){t.exports=r(Ie(),St())})(we,function(n){return function(r){var i=n,s=i.lib,o=s.CipherParams,a=i.enc,u=a.Hex,d=i.format;d.Hex={stringify:function(c){return c.ciphertext.toString(u)},parse:function(c){var h=u.parse(c);return o.create({ciphertext:h})}}}(),n.format.Hex})}(v0)),v0.exports}var x0={exports:{}},Hv;function wR(){return Hv||(Hv=1,function(t,e){(function(n,r,i){t.exports=r(Ie(),Ns(),Bs(),ji(),St())})(we,function(n){return function(){var r=n,i=r.lib,s=i.BlockCipher,o=r.algo,a=[],u=[],d=[],c=[],h=[],p=[],y=[],v=[],E=[],I=[];(function(){for(var x=[],R=0;R<256;R++)R<128?x[R]=R<<1:x[R]=R<<1^283;for(var F=0,b=0,R=0;R<256;R++){var C=b^b<<1^b<<2^b<<3^b<<4;C=C>>>8^C&255^99,a[F]=C,u[C]=F;var _=x[F],T=x[_],w=x[T],S=x[C]*257^C*16843008;d[F]=S<<24|S>>>8,c[F]=S<<16|S>>>16,h[F]=S<<8|S>>>24,p[F]=S;var S=w*16843009^T*65537^_*257^F*16843008;y[C]=S<<24|S>>>8,v[C]=S<<16|S>>>16,E[C]=S<<8|S>>>24,I[C]=S,F?(F=_^x[x[x[w^_]]],b^=x[x[b]]):F=b=1}})();var A=[0,1,2,4,8,16,32,64,128,27,54],m=o.AES=s.extend({_doReset:function(){var x;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var R=this._keyPriorReset=this._key,F=R.words,b=R.sigBytes/4,C=this._nRounds=b+6,_=(C+1)*4,T=this._keySchedule=[],w=0;w<_;w++)w<b?T[w]=F[w]:(x=T[w-1],w%b?b>6&&w%b==4&&(x=a[x>>>24]<<24|a[x>>>16&255]<<16|a[x>>>8&255]<<8|a[x&255]):(x=x<<8|x>>>24,x=a[x>>>24]<<24|a[x>>>16&255]<<16|a[x>>>8&255]<<8|a[x&255],x^=A[w/b|0]<<24),T[w]=T[w-b]^x);for(var S=this._invKeySchedule=[],D=0;D<_;D++){var w=_-D;if(D%4)var x=T[w];else var x=T[w-4];D<4||w<=4?S[D]=x:S[D]=y[a[x>>>24]]^v[a[x>>>16&255]]^E[a[x>>>8&255]]^I[a[x&255]]}}},encryptBlock:function(x,R){this._doCryptBlock(x,R,this._keySchedule,d,c,h,p,a)},decryptBlock:function(x,R){var F=x[R+1];x[R+1]=x[R+3],x[R+3]=F,this._doCryptBlock(x,R,this._invKeySchedule,y,v,E,I,u);var F=x[R+1];x[R+1]=x[R+3],x[R+3]=F},_doCryptBlock:function(x,R,F,b,C,_,T,w){for(var S=this._nRounds,D=x[R]^F[0],P=x[R+1]^F[1],N=x[R+2]^F[2],B=x[R+3]^F[3],U=4,W=1;W<S;W++){var L=b[D>>>24]^C[P>>>16&255]^_[N>>>8&255]^T[B&255]^F[U++],G=b[P>>>24]^C[N>>>16&255]^_[B>>>8&255]^T[D&255]^F[U++],X=b[N>>>24]^C[B>>>16&255]^_[D>>>8&255]^T[P&255]^F[U++],V=b[B>>>24]^C[D>>>16&255]^_[P>>>8&255]^T[N&255]^F[U++];D=L,P=G,N=X,B=V}var L=(w[D>>>24]<<24|w[P>>>16&255]<<16|w[N>>>8&255]<<8|w[B&255])^F[U++],G=(w[P>>>24]<<24|w[N>>>16&255]<<16|w[B>>>8&255]<<8|w[D&255])^F[U++],X=(w[N>>>24]<<24|w[B>>>16&255]<<16|w[D>>>8&255]<<8|w[P&255])^F[U++],V=(w[B>>>24]<<24|w[D>>>16&255]<<16|w[P>>>8&255]<<8|w[N&255])^F[U++];x[R]=L,x[R+1]=G,x[R+2]=X,x[R+3]=V},keySize:256/32});r.AES=s._createHelper(m)}(),n.AES})}(x0)),x0.exports}var _0={exports:{}},qv;function AR(){return qv||(qv=1,function(t,e){(function(n,r,i){t.exports=r(Ie(),Ns(),Bs(),ji(),St())})(we,function(n){return function(){var r=n,i=r.lib,s=i.WordArray,o=i.BlockCipher,a=r.algo,u=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],d=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],c=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],h
vendor: 7,629 bytes, line 80
80=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],
80p=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],y=a.DES=o.extend({_doReset:function(){for(var A=this._key,m=A.words,x=[],R=0;R<56;R++){var F=u[R]-1;x[R]=m[F>>>5]>>>
vendor: 7,979 bytes, line 80
8031-F%32&1}for(var b=this._subKeys=[],C=0;C<16;C++){for(var _=b[C]=[],T=c[C],R=0;R<24;R++)_[R/6|0]|=x[(d[R]-1+T)%28]<<31-R%6,_[4+(R/6|0)]|=x[28+(d[R+24]-1+T)%28]<<31-R%6;_[0]=_[0]<<1|_[0]>>>31;for(var R=1;R<7;R++)_[R]=_[R]>>>(R-1)*4+3;_[7]=_[7]<<5|_[7]>>>27}for(var w=this._invSubKeys=[],R=0;R<16;R++)w[R]=b[15-R]},encryptBlock:function(A,m){this._doCryptBlock(A,m,this._subKeys)},decryptBlock:function(A,m){this._doCryptBlock(A,m,this._invSubKeys)},_doCryptBlock:function(A,m,x){this._lBlock=A[m],this._rBlock=A[m+1],v.call(this,4,252645135),v.call(this,16,65535),E.call(this,2,858993459),E.call(this,8,16711935),v.call(this,1,1431655765);for(var R=0;R<16;R++){for(var F=x[R],b=this._lBlock,C=this._rBlock,_=0,T=0;T<8;T++)_|=h[T][((C^F[T])&p[T])>>>0];this._lBlock=C,this._rBlock=b^_}var w=this._lBlock;this._lBlock=this._rBlock,this._rBlock=w,v.call(this,1,1431655765),E.call(this,8,16711935),E.call(this,2,858993459),v.call(this,16,65535),v.call(this,4,252645135),A[m]=this._lBlock,A[m+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function v(A,m){var x=(this._lBlock>>>A^this._rBlock)&m;this._rBlock^=x,this._lBlock^=x<<A}function E(A,m){var x=(this._rBlock>>>A^this._lBlock)&m;this._lBlock^=x,this._rBlock^=x<<A}r.DES=o._createHelper(y);var I=a.TripleDES=o.extend({_doReset:function(){var A=this._key,m=A.words;if(m.length!==2&&m.length!==4&&m.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var x=m.slice(0,2),R=m.length<4?m.slice(0,2):m.slice(2,4),F=m.length<6?m.slice(0,2):m.slice(4,6);this._des1=y.createEncryptor(s.create(x)),this._des2=y.createEncryptor(s.create(R)),this._des3=y.createEncryptor(s.create(F))},encryptBlock:function(A,m){this._des1.encryptBlock(A,m),this._des2.decryptBlock(A,m),this._des3.encryptBlock(A,m)},decryptBlock:function(A,m){this._des3.decryptBlock(A,m),this._des2.encryptBlock(A,m),this._des1.decryptBlock(A,m)},keySize:192/32,ivSize:64/32,blockSize:64/32});r.TripleDES=o._createHelper(I)}(),n.TripleDES})}(_0)),_0.exports}var E0={exports:{}},Wv;function CR(){return Wv||(Wv=1,function(t,e){(function(n,r,i){t.exports=r(Ie(),Ns(),Bs(),ji(),St())})(we,function(n){return function(){var r=n,i=r.lib,s=i.StreamCipher,o=r.algo,a=o.RC4=s.extend({_doReset:function(){for(var c=this._key,h=c.words,p=c.sigBytes,y=this._S=[],v=0;v<256;v++)y[v]=v;for(var v=0,E=0;v<256;v++){var I=v%p,A=h[I>>>2]>>>24-I%4*8&255;E=(E+y[v]+A)%256;var m=y[v];y[v]=y[E],y[E]=m}this._i=this._j=0},_doProcessBlock:function(c,h){c[h]^=u.call(this)},keySize:256/32,ivSize:0});function u(){for(var c=this._S,h=this._i,p=this._j,y=0,v=0;v<4;v++){h=(h+1)%256,p=(p+c[h])%256;var E=c[h];c[h]=c[p],c[p]=E,y|=c[(c[h]+c[p])%256]<<24-v*8}return this._i=h,this._j=p,y}r.RC4=s._createHelper(a);var d=o.RC4Drop=a.extend({cfg:a.cfg.extend({drop:192}),_doReset:function(){a._doReset.call(this);for(var c=this.cfg.drop;c>0;c--)u.call(this)}});r.RC4Drop=s._createHelper(d)}(),n.RC4})}(E0)),E0.exports}var w0={exports:{}},Gv;function TR(){return Gv||(Gv=1,function(t,e){(function(n,r,i){t.exports=r(Ie(),Ns(),Bs(),ji(),St())})(we,function(n){return function(){var r=n,i=r.lib,s=i.StreamCipher,o=r.algo,a=[],u=[],d=[],c=o.Rabbit=s.extend({_doReset:function(){for(var p=this._key.words,y=this.cfg.iv,v=0;v<4;v++)p[v]=(p[v]<<8|p[v]>>>24)&16711935|(p[v]<<24|p[v]>>>8)&4278255360;var E=this._X=[p[0],p[3]<<16|p[2]>>>16,p[1],p[0]<<16|p[3]>>>16,p[2],p[1]<<16|p[0]>>>16,p[3],p[2]<<16|p[1]>>>16],I=this._C=[p[2]<<16|p[2]>>>16,p[0]&4294901760|p[1]&65535,p[3]<<16|p[3]>>>16,p[1]&4294901760|p[2]&65535,p[0]<<16|p[0]>>>16,p[2]&4294901760|p[3]&65535,p[1]<<16|p[1]>>>16,p[3]&4294901760|p[0]&65535];this._b=0;for(var v=0;v<4;v++)h.call(this);for(var v=0;v<8;v++)I[v]^=E[v+4&7];if(y){var A=y.words,m=A[0],x=A[1],R=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360,F=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,b=R>>>16|F&4294901760,C=F<<16|R&65535;I[0]^=R,I[1]^=b,I[2]^=F,I[3]^=C,I[4]^=R,I[5]^=b,I[6]^=F,I[7]^=C;for(var v=0;v<4;v++)h.call(this)}},_doProcessBlock:function(p,y){var v=this._X;h.call(this),a[0]=v[0]^v[5]>>>16^v[3]<<16,a[1]=v[2]^v[7]>>>16^v[5]<<16,a[2]=v[4]^v[1]>>>16^v[7]<<16,a[3]=v[6]^v[3]>>>16^v[1]<<16;for(var E=0;E<4;E++)a[E]=(a[E]<<8|a[E]>>>24)&16711935|(a[E]<<24|a[E]>>>8)&4278255360,p[y+E]^=a[E]},blockSize:128/32,ivSize:64/32});function h(){for(var p=this._X,y=this._C,v=0;v<8;v++)u[v]=y[v];y[0]=y[0]+1295307597+this._b|0,y[1]=y[1]+3545052371+(y[0]>>>0<u[0]>>>0?1:0)|0,y[2]=y[2]+886263092+(y[1]>>>0<u[1]>>>0?1:0)|0,y[3]=y[3]+1295307597+(y[2]>>>0<u[2]>>>0?1:0)|0,y[4]=y[4]+3545052371+(y[3]>>>0<u[3]>>>0?1:0)|0,y[5]=y[5]+886263092+(y[4]>>>0<u[4]>>>0?1:0)|0,y[6]=y[6]+1295307597+(y[5]>>>0<u[5]>>>0?1:0)|0,y[7]=y[7]+3545052371+(y[6]>>>0<u[6]>>>0?1:0)|0,this._b=y[7]>>>0<u[7]>>>0?1:0;for(var v=0;v<8;v++){var E=p[v]+y[v],I=E&65535,A=E>>>16,m=((I*I>>>17)+I*A>>>15)+A*A,x=((E&4294901760)*E|0)+((E&65535)*E|0);d[v]=m^x}p[0]=d[0]+(d[7]<<16|d[7]>>>16)+(d[6]<<16|d[6]>>>16)|0,p[1]=d[1]+(d[0]<<8|d[0]>>>24)+d[7]|0,p[2]=d[2]+(d[1]<<16|d[1]>>>16)+(d[0]<<16|d[0]>>>16)|0,p[3]=d[3]+(d[2]<<8|d[2]>>>24)+d[1]|0,p[4]=d[4]+(d[3]<<16|d[3]>>>16)+(d[2]<<16|d[2]>>>16)|0,p[5]=d[5]+(d[4]<<8|d[4]>>>24)+d[3]|0,p[6]=d[6]+(d[5]<<16|d[5]>>>16)+(d[4]<<16|d[4]>>>16)|0,p[7]=d[7]+(d[6]<<8|d[6]>>>24)+d[5]|0}r.Rabbit=s._createHelper(c)}(),n.Rabbit})}(w0)),w0.exports}var A0={exports:{}},Kv;function IR(){return Kv||(Kv=1,function(t,e){(function(n,r,i){t.exports=r(Ie(),Ns(),Bs(),ji(),St())})(we,function(n){return function(){var r=n,i=r.lib,s=i.StreamCipher,o=r.algo,a=[],u=[],d=[],c=o.RabbitLegacy=s.extend({_doReset:function(){var p=this._key.words,y=this.cfg.iv,v=this._X=[p[0],p[3]<<16|p[2]>>>16,p[1],p[0]<<16|p[3]>>>16,p[2],p[1]<<16|p[0]>>>16,p[3],p[2]<<16|p[1]>>>16],E=this._C=[p[2]<<16|p[2]>>>16,p[0]&4294901760|p[1]&65535,p[3]<<16|p[3]>>>16,p[1]&4294901760|p[2]&65535,p[0]<<16|p[0]>>>16,p[2]&4294901760|p[3]&65535,p[1]<<16|p[1]>>>16,p[3]&4294901760|p[0]&65535];this._b=0;for(var I=0;I<4;I++)h.call(this);for(var I=0;I<8;I++)E[I]^=v[I+4&7];if(y){var A=y.words,m=A[0],x=A[1],R=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360,F=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,b=R>>>16|F&4294901760,C=F<<16|R&65535;E[0]^=R,E[1]^=b,E[2]^=F,E[3]^=C,E[4]^=R,E[5]^=b,E[6]^=F,E[7]^=C;for(var I=0;I<4;I++)h.call(this)}},_doProcessBlock:function(p,y){var v=this._X;h.call(this),a[0]=v[0]^v[5]>>>16^v[3]<<16,a[1]=v[2]^v[7]>>>16^v[5]<<16,a[2]=v[4]^v[1]>>>16^v[7]<<16,a[3]=v[6]^v[3]>>>16^v[1]<<16;for(var E=0;E<4;E++)a[E]=(a[E]<<8|a[E]>>>24)&16711935|(a[E]<<24|a[E]>>>8)&4278255360,p[y+E]^=a[E]},blockSize:128/32,ivSize:64/32});function h(){for(var p=this._X,y=this._C,v=0;v<8;v++)u[v]=y[v];y[0]=y[0]+1295307597+this._b|0,y[1]=y[1]+3545052371+(y[0]>>>0<u[0]>>>0?1:0)|0,y[2]=y[2]+886263092+(y[1]>>>0<u[1]>>>0?1:0)|0,y[3]=y[3]+1295307597+(y[2]>>>0<u[2]>>>0?1:0)|0,y[4]=y[4]+3545052371+(y[3]>>>0<u[3]>>>0?1:0)|0,y[5]=y[5]+886263092+(y[4]>>>0<u[4]>>>0?1:0)|0,y[6]=y[6]+1295307597+(y[5]>>>0<u[5]>>>0?1:0)|0,y[7]=y[7]+3545052371+(y[6]>>>0<u[6]>>>0?1:0)|0,this._b=y[7]>>>0<u[7]>>>0?1:0;for(var v=0;v<8;v++){var E=p[v]+y[v],I=E&65535,A=E>>>16,m=((I*I>>>17)+I*A>>>15)+A*A,x=((E&4294901760)*E|0)+((E&65535)*E|0);d[v]=m^x}p[0]=d[0]+(d[7]<<16|d[7]>>>16)+(d[6]<<16|d[6]>>>16)|0,p[1]=d[1]+(d[0]<<8|d[0]>>>24)+d[7]|0,p[2]=d[2]+(d[1]<<16|d[1]>>>16)+(d[0]<<16|d[0]>>>16)|0,p[3]=d[3]+(d[2]<<8|d[2]>>>24)+d[1]|0,p[4]=d[4]+(d[3]<<16|d[3]>>>16)+(d[2]<<16|d[2]>>>16)|0,p[5]=d[5]+(d[4]<<8|d[4]>>>24)+d[3]|0,p[6]=d[6]+(d[5]<<16|d[5]>>>16)+(d[4]<<16|d[4]>>>16)|0,p[7]=d[7]+(d[6]<<8|d[6]>>>24)+d[5]|0}r.RabbitLegacy=s._createHelper(c)}(),n.RabbitLegacy})}(A0)),A0.exports}var C0={exports:{}},Qv;function SR(){return Qv||(Qv=1,function(t,e){(function(n,r,i){t.exports=r(Ie(),Ns(),Bs(),ji(),St())})(we,function(n){return function(){var r=n,i=r.lib,s=i.BlockCipher,o=r.algo;const a=16,u=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],d
vendor: 11,033 bytes, line 80
80=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]]
vendor: 1,459 bytes, line 80
80;var c={pbox:[],sbox:[]};function h(I,A){let m=A>>24&255,x=A>>16&255,R=A>>8&255,F=A&255,b=I.sbox[0][m]+I.sbox[1][x];return b=b^I.sbox[2][R],b=b+I.sbox[3][F],b}function p(I,A,m){let x=A,R=m,F;for(let b=0;b<a;++b)x=x^I.pbox[b],R=h(I,x)^R,F=x,x=R,R=F;return F=x,x=R,R=F,R=R^I.pbox[a],x=x^I.pbox[a+1],{left:x,right:R}}function y(I,A,m){let x=A,R=m,F;for(let b=a+1;b>1;--b)x=x^I.pbox[b],R=h(I,x)^R,F=x,x=R,R=F;return F=x,x=R,R=F,R=R^I.pbox[1],x=x^I.pbox[0],{left:x,right:R}}function v(I,A,m){for(let C=0;C<4;C++){I.sbox[C]=[];for(let _=0;_<256;_++)I.sbox[C][_]=d[C][_]}let x=0;for(let C=0;C<a+2;C++)I.pbox[C]=u[C]^A[x],x++,x>=m&&(x=0);let R=0,F=0,b=0;for(let C=0;C<a+2;C+=2)b=p(I,R,F),R=b.left,F=b.right,I.pbox[C]=R,I.pbox[C+1]=F;for(let C=0;C<4;C++)for(let _=0;_<256;_+=2)b=p(I,R,F),R=b.left,F=b.right,I.sbox[C][_]=R,I.sbox[C][_+1]=F;return!0}var E=o.Blowfish=s.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var I=this._keyPriorReset=this._key,A=I.words,m=I.sigBytes/4;v(c,A,m)}},encryptBlock:function(I,A){var m=p(c,I[A],I[A+1]);I[A]=m.left,I[A+1]=m.right},decryptBlock:function(I,A){var m=y(c,I[A],I[A+1]);I[A]=m.left,I[A+1]=m.right},blockSize:64/32,keySize:128/32,ivSize:64/32});r.Blowfish=s._createHelper(E)}(),n.Blowfish})}(C0)),C0.exports}(function(t,e){(function(n,r,i){t.exports=r(Ie(),bd(),rR(),iR(),Ns(),sR(),Bs(),JE(),Im(),oR(),ZE(),aR(),lR(),uR(),Sm(),cR(),ji(),St(),dR(),hR(),fR(),pR(),mR(),gR(),yR(),vR(),xR(),_R(),ER(),wR(),AR(),C
vendor: 8,257 bytes, line 80
80R(),TR(),IR(),SR())})(we,function(n){return n})})(YE);const fs=YE.exports;function ew(t,e){return function(){return t.apply(e,arguments)}}const{toString:RR}=Object.prototype,{getPrototypeOf:Rm}=Object,Fd=(t=>e=>{const n=RR.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Er=t=>(t=t.toLowerCase(),e=>Fd(e)===t),Nd=t=>e=>typeof e===t,{isArray:ea}=Array,Rl=Nd("undefined");function PR(t){return t!==null&&!Rl(t)&&t.constructor!==null&&!Rl(t.constructor)&&Nn(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const tw=Er("ArrayBuffer");function kR(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&tw(t.buffer),e}const DR=Nd("string"),Nn=Nd("function"),nw=Nd("number"),Bd=t=>t!==null&&typeof t=="object",bR=t=>t===!0||t===!1,dc=t=>{if(Fd(t)!=="object")return!1;const e=Rm(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},FR=Er("Date"),NR=Er("File"),BR=Er("Blob"),OR=Er("FileList"),LR=t=>Bd(t)&&Nn(t.pipe),MR=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Nn(t.append)&&((e=Fd(t))==="formdata"||e==="object"&&Nn(t.toString)&&t.toString()==="[object FormData]"))},VR=Er("URLSearchParams"),UR=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Hl(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,i;if(typeof t!="object"&&(t=[t]),ea(t))for(r=0,i=t.length;r<i;r++)e.call(null,t[r],r,t);else{const s=n?Object.getOwnPropertyNames(t):Object.keys(t),o=s.length;let a;for(r=0;r<o;r++)a=s[r],e.call(null,t[a],a,t)}}function rw(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,i;for(;r-- >0;)if(i=n[r],e===i.toLowerCase())return i;return null}const iw=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),sw=t=>!Rl(t)&&t!==iw;function Gf(){const{caseless:t}=sw(this)&&this||{},e={},n=(r,i)=>{const s=t&&rw(e,i)||i;dc(e[s])&&dc(r)?e[s]=Gf(e[s],r):dc(r)?e[s]=Gf({},r):ea(r)?e[s]=r.slice():e[s]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Hl(arguments[r],n);return e}const $R=(t,e,n,{allOwnKeys:r}={})=>(Hl(e,(i,s)=>{n&&Nn(i)?t[s]=ew(i,n):t[s]=i},{allOwnKeys:r}),t),zR=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),jR=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},HR=(t,e,n,r)=>{let i,s,o;const a={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),s=i.length;s-- >0;)o=i[s],(!r||r(o,t,e))&&!a[o]&&(e[o]=t[o],a[o]=!0);t=n!==!1&&Rm(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},qR=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},WR=t=>{if(!t)return null;if(ea(t))return t;let e=t.length;if(!nw(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},GR=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Rm(Uint8Array)),KR=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=r.next())&&!i.done;){const s=i.value;e.call(t,s[0],s[1])}},QR=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},XR=Er("HTMLFormElement"),YR=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),Xv=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),JR=Er("RegExp"),ow=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};Hl(n,(i,s)=>{let o;(o=e(i,s,t))!==!1&&(r[s]=o||i)}),Object.defineProperties(t,r)},ZR=t=>{ow(t,(e,n)=>{if(Nn(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(!!Nn(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},e4=(t,e)=>{const n={},r=i=>{i.forEach(s=>{n[s]=!0})};return ea(t)?r(t):r(String(t).split(e)),n},t4=()=>{},n4=(t,e)=>(t=+t,Number.isFinite(t)?t:e),T0="abcdefghijklmnopqrstuvwxyz",Yv="0123456789",aw={DIGIT:Yv,ALPHA:T0,ALPHA_DIGIT:T0+T0.toUpperCase()+Yv},r4=(t=16,e=aw.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function i4(t){return!!(t&&Nn(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const s4=t=>{const e=new Array(10),n=(r,i)=>{if(Bd(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[i]=r;const s=ea(r)?[]:{};return Hl(r,(o,a)=>{const u=n(o,i+1);!Rl(u)&&(s[a]=u)}),e[i]=void 0,s}}return r};return n(t,0)},o4=Er("AsyncFunction"),a4=t=>t&&(Bd(t)||Nn(t))&&Nn(t.then)&&Nn(t.catch),Q={isArray:ea,isArrayBuffer:tw,isBuffer:PR,isFormData:MR,isArrayBufferView:kR,isString:DR,isNumber:nw,isBoolean:bR,isObject:Bd,isPlainObject:dc,isUndefined:Rl,isDate:FR,isFile:NR,isBlob:BR,isRegExp:JR,isFunction:Nn,isStream:LR,isURLSearchParams:VR,isTypedArray:GR,isFileList:OR,forEach:Hl,merge:Gf,extend:$R,trim:UR,stripBOM:zR,inherits:jR,toFlatObject:HR,kindOf:Fd,kindOfTest:Er,endsWith:qR,toArray:WR,forEachEntry:KR,matchAll:QR,isHTMLForm:XR,hasOwnProperty:Xv,hasOwnProp:Xv,reduceDescriptors:ow,freezeMethods:ZR,toObjectSet:e4,toCamelCase:YR,noop:t4,toFiniteNumber:n4,findKey:rw,global:iw,isContextDefined:sw,ALPHABET:aw,generateString:r4,isSpecCompliantForm:i4,toJSONObject:s4,isAsyncFn:o4,isThenable:a4};function Re(t,e,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}Q.inherits(Re,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Q.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const lw=Re.prototype,uw={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{uw[t]={value:t}});Object.defineProperties(Re,uw);Object.defineProperty(lw,"isAxiosError",{value:!0});Re.from=(t,e,n,r,i,s)=>{const o=Object.create(lw);return Q.toFlatObject(t,o,function(u){return u!==Error.prototype},a=>a!=="isAxiosError"),Re.call(o,t.message,e,n,r,i),o.cause=t,o.name=t.name,s&&Object.assign(o,s),o};const l4=null;function Kf(t){return Q.isPlainObject(t)||Q.isArray(t)}function cw(t){return Q.endsWith(t,"[]")?t.slice(0,-2):t}function Jv(t,e,n){return t?t.concat(e).map(function(i,s){return i=cw(i),!n&&s?"["+i+"]":i}).join(n?".":""):e}function u4(t){return Q.isArray(t)&&!t.some(Kf)}const c4=Q.toFlatObject(Q,{},null,function(e){return/^is[A-Z]/.test(e)});function Od(t,e,n){if(!Q.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=Q.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(E,I){return!Q.isUndefined(I[E])});const r=n.metaTokens,i=n.visitor||c,s=n.dots,o=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&Q.isSpecCompliantForm(e);if(!Q.isFunction(i))throw new TypeError("visitor must be a function");function d(v){if(v===null)return"";if(Q.isDate(v))return v.toISOString();if(!u&&Q.isBlob(v))throw new Re("Blob is not supported. Use a Buffer instead.");return Q.isArrayBuffer(v)||Q.isTypedArray(v)?u&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function c(v,E,I){let A=v;if(v&&!I&&typeof v=="object"){if(Q.endsWith(E,"{}"))E=r?E:E.slice(0,-2),v=JSON.stringify(v);else if(Q.isArray(v)&&u4(v)||(Q.isFileList(v)||Q.endsWith(E,"[]"))&&(A=Q.toArray(v)))return E=cw(E),A.forEach(function(x,R){!(Q.isUndefined(x)||x===null)&&e.append(o===!0?Jv([E],R,s):o===null?E:E+"[]",d(x))}),!1}return Kf(v)?!0:(e.append(Jv(I,E,s),d(v)),!1)}const h=[],p=Object.assign(c4,{defaultVisitor:c,convertValue:d,isVisitable:Kf});function y(v,E){if(!Q.isUndefined(v)){if(h.indexOf(v)!==-1)throw Error("Circular reference detected in "+E.join("."));h.push(v),Q.forEach(v,function(A,m){(!(Q.isUndefined(A)||A===null)&&i.call(e,A,Q.isString(m)?m.trim():m,E,p))===!0&&y(A,E?E.concat(m):[m])}),h.pop()}}if(!Q.isObject(t))throw new TypeError("data must be an object");return y(t),e}
vendor: 5,218 bytes, lines 80-81
80function Zv(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function Pm(t,e){this._pairs=[],t&&Od(t,this,e)}const dw=Pm.prototype;dw.append=function(e,n){this._pairs.push([e,n])};dw.toString=function(e){const n=e?function(r){return e.call(this,r,Zv)}:Zv;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function d4(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function hw(t,e,n){if(!e)return t;const r=n&&n.encode||d4,i=n&&n.serialize;let s;if(i?s=i(e,n):s=Q.isURLSearchParams(e)?e.toString():new Pm(e,n).toString(r),s){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class h4{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Q.forEach(this.handlers,function(r){r!==null&&e(r)})}}const ex=h4,fw={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},f4=typeof URLSearchParams<"u"?URLSearchParams:Pm,p4=typeof FormData<"u"?FormData:null,m4=typeof Blob<"u"?Blob:null,g4={isBrowser:!0,classes:{URLSearchParams:f4,FormData:p4,Blob:m4},protocols:["http","https","file","blob","url","data"]},pw=typeof window<"u"&&typeof document<"u",y4=(t=>pw&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator<"u"&&navigator.product),v4=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),x4=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:pw,hasStandardBrowserWebWorkerEnv:v4,hasStandardBrowserEnv:y4},Symbol.toStringTag,{value:"Module"})),fr={...x4,...g4};function _4(t,e){return Od(t,new fr.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,s){return fr.isNode&&Q.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function E4(t){return Q.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function w4(t){const e={},n=Object.keys(t);let r;const i=n.length;let s;for(r=0;r<i;r++)s=n[r],e[s]=t[s];return e}function mw(t){function e(n,r,i,s){let o=n[s++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),u=s>=n.length;return o=!o&&Q.isArray(i)?i.length:o,u?(Q.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!a):((!i[o]||!Q.isObject(i[o]))&&(i[o]=[]),e(n,r,i[o],s)&&Q.isArray(i[o])&&(i[o]=w4(i[o])),!a)}if(Q.isFormData(t)&&Q.isFunction(t.entries)){const n={};return Q.forEachEntry(t,(r,i)=>{e(E4(r),i,n,0)}),n}return null}function A4(t,e,n){if(Q.isString(t))try{return(e||JSON.parse)(t),Q.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const km={transitional:fw,adapter:["xhr","http"],transformRequest:[function(e,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,s=Q.isObject(e);if(s&&Q.isHTMLForm(e)&&(e=new FormData(e)),Q.isFormData(e))return i?JSON.stringify(mw(e)):e;if(Q.isArrayBuffer(e)||Q.isBuffer(e)||Q.isStream(e)||Q.isFile(e)||Q.isBlob(e))return e;if(Q.isArrayBufferView(e))return e.buffer;if(Q.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return _4(e,this.formSerializer).toString();if((a=Q.isFileList(e))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Od(a?{"files[]":e}:e,u&&new u,this.formSerializer)}}return s||i?(n.setContentType("application/json",!1),A4(e)):e}],transformResponse:[function(e){const n=this.transitional||km.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(e&&Q.isString(e)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(a){if(o)throw a.name==="SyntaxError"?Re.from(a,Re.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:fr.classes.FormData,Blob:fr.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Q.forEach(["delete","get","head","post","put","patch"],t=>{km.headers[t]={}});const Dm=km,C4=Q.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),T4=t=>{const e={};let n,r,i;return t&&t.split(` 81`).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||e[n]&&C4[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},tx=Symbol("internals");function Ba(t){return t&&String(t).trim().toLowerCase()}function hc(t){return t===!1||t==null?t:Q.isArray(t)?t.map(hc):String(t)}function I4(t){const e=Object.create(null),n=/([^\s,;
81=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const S4=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function I0(t,e,n,r,i){if(Q.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!Q.isString(e)){if(Q.isString(r))return e.indexOf(r)!==-1;if(Q.isRegExp(r))return r.test(e)}}function R4(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function P4(t,e){const n=Q.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(i,s,o){return this[r].call(this,e,i,s,o)},configurable:!0})})}class Ld{constructor(e){e&&this.set(e)}set(e,n,r){const i=this;function s(a,u,d){const c=Ba(u);if(!c)throw new Error("header name must be a non-empty string");const h=Q.findKey(i,c);(!h||i[h]===void 0||d===!0||d===void 0&&i[h]!==!1)&&(i[h||u]=hc(a))}const o=(a,u)=>Q.forEach(a,(d,c)=>s(d,c,u));return Q.isPlainObject(e)||e instanceof this.constructor?o(e,n):Q.isString(e)&&(e=e.trim())&&!S4(e)?o(T4(e),n):e!=null&&s(n,e,r),this}get(e,n){if(e=Ba(e),e){const r=Q.findKey(this,e);if(r){const i=this[r];if(!n)return i;if(n===!0)return I4(i);if(Q.isFunction(n))return n.call(this,i,r);if(Q.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Ba(e),e){const r=Q.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||I0(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let i=!1;function s(o){if(o=Ba(o),o){const a=Q.findKey(r,o);a&&(!n||I0(r,r[a],a,n))&&(delete r[a],i=!0)}}return Q.isArray(e)?e.forEach(s):s(e),i}clear(e){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const s=n[r];(!e||I0(this,this[s],s,e,!0))&&(delete this[s],i=!0)}return i}normalize(e){const n=this,r={};return Q.forEach(this,(i,s)=>{const o=Q.findKey(r,s);if(o){n[o]=hc(i),delete n[s];return}const a=e?R4(s):String(s).trim();a!==s&&delete n[s],n[a]=hc(i),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return Q.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=e&&Q.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(` 82`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(i=>r.set(i)),r}static accessor(e){const r=(this[tx]=this[tx]={accessors:{}}).accessors,i=this.prototype;function s(o){const a=Ba(o);r[a]||(P4(i,o),r[a]=!0)}return Q.isArray(e)?e.forEach(s):s(e),this}}Ld.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Q.reduceDescriptors(Ld.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});Q.freezeMethods(Ld);const Lr=Ld;function S0(t,e){const n=this||Dm,r=e||n,i=Lr.from(r.headers);let s=r.data;return Q.forEach(t,function(a){s=a.call(n,s,i.normalize(),e?e.status:void 0)}),i.normalize(),s}function gw(t){return!!(t&&t.__CANCEL__)}function ql(t,e,n){Re.call(this,t==null?"canceled":t,Re.ERR_CANCELED,e,n),this.name="CanceledError"}Q.inherits(ql,Re,{__CANCEL__:!0});function k4(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Re("Request failed with status code "+n.status,[Re.ERR_BAD_REQUEST,Re.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const D4=fr.hasStandardBrowserEnv?{write(t,e,n,r,i,s){const o=[t+"="+encodeURIComponent(e)];Q.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),Q.isString(r)&&o.push("path="+r),Q.isString(i)&&o.push("domain="+i),s===!0&&o.push("secure"),document.cookie=o.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function b4(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function F4(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function yw(t,e){return t&&!b4(e)?F4(t,e):e}const N4=fr.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(s){let o=s;return e&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(o){const a=Q.isString(o)?i(o):o;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function B4(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function O4(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i=0,s=0,o;return e=e!==void 0?e:1e3,function(u){const d=Date.now(),c=r[s];o||(o=d),n[i]=u,r[i]=d;let h=s,p=0;for(;h!==i;)p+=n[h++],h=h%t;if(i=(i+1)%t,i===s&&(s=(s+1)%t),d-o<e)return;const y=c&&d-c;return y?Math.round(p*1e3/y):void 0}}function nx(t,e){let n=0;const r=O4(50,250);return i=>{const s=i.loaded,o=i.lengthComputable?i.total:void 0,a=s-n,u=r(a),d=s<=o;n=s;const c={loaded:s,total:o,progress:o?s/o:void 0,bytes:a,rate:u||void 0,estimated:u&&o&&d?(o-s)/u:void 0,event:i};c[e?"download":"upload"]=!0,t(c)}}const L4=typeof XMLHttpRequest<"u",M4=L4&&function(t){return new Promise(function(n,r){let i=t.data;const s=Lr.from(t.headers).normalize();let{responseType:o,withXSRFToken:a}=t,u;function d(){t.cancelToken&&t.cancelToken.unsubscribe(u),t.signal&&t.signal.removeEventListener("abort",u)}let c;if(Q.isFormData(i)){if(fr.hasStandardBrowserEnv||fr.hasStandardBrowserWebWorkerEnv)s.setContentType(!1);else if((c=s.getContentType())!==!1){const[E,...I]=c?c.split(";").map(A=>
82A.trim()).filter(Boolean):[];s.setContentType([E||"multipart/form-data",...I].join("; "))}}let h=new XMLHttpRequest;if(t.auth){const E=t.auth.username||"",I=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";s.set("Authorization","Basic "+btoa(E+":"+I))}const p=yw(t.baseURL,t.url);h.open(t.method.toUpperCase(),hw(p,t.params,t.paramsSerializer),!0),h.timeout=t.timeout;function y(){if(!h)return;const E=Lr.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),A={data:!o||o==="text"||o==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:E,config:t,request:h};k4(function(x){n(x),d()},function(x){r(x),d()},A),h=null}if("onloadend"in h?h.onloadend=y:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(y)},h.onabort=function(){!h||(r(new Re("Request aborted",Re.ECONNABORTED,t,h)),h=null)},h.onerror=function(){r(new Re("Network Error",Re.ERR_NETWORK,t,h)),h=null},h.ontimeout=function(){let I=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const A=t.transitional||fw;t.timeoutErrorMessage&&(I=t.timeoutErrorMessage),r(new Re(I,A.clarifyTimeoutError?Re.ETIMEDOUT:Re.ECONNABORTED,t,h)),h=null},fr.hasStandardBrowserEnv&&(a&&Q.isFunction(a)&&(a=a(t)),a||a!==!1&&N4(p))){const E=t.xsrfHeaderName&&t.xsrfCookieName&&D4.read(t.xsrfCookieName);E&&s.set(t.xsrfHeaderName,E)}i===void 0&&s.setContentType(null),"setRequestHeader"in h&&Q.forEach(s.toJSON(),function(I,A){h.setRequestHeader(A,I)}
82),Q.isUndefined(t.withCredentials)||(h.withCredentials=!!t.withCredentials),o&&o!=="json"&&(h.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&h.addEventListener("progress",nx(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&h.upload&&h.upload.addEventListener("progress",nx(t.onUploadProgress)),(t.cancelToken||t.signal)&&(u=E=>{!h||(r(!E||E.type?new ql(null,t,h):E),h.abort(),h=null)},t.cancelToken&&t.cancelToken.subscribe(u),t.signal&&(t.signal.aborted?u():t.signal.addEventListener("abort",u)));const v=B4(p);if(v&&fr.protocols.indexOf(v)===-1){r(new Re("Unsupported protocol "+v+":",Re.ERR_BAD_REQUEST,t));return}h.send(i||null)})},Qf={http:l4,xhr:M4};Q.forEach(Qf,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const rx=t=>`- ${t}`,V4=t=>Q.isFunction(t)||t===null||t===!1,vw={getAdapter:t=>{t=Q.isArray(t)?t:[t];const{length:e}=t;let n,r;const i={};for(let s=0;s<e;s++){n=t[s];let o;if(r=n,!V4(n)&&(r=Qf[(o=String(n)).toLowerCase()],r===void 0))throw new Re(`Unknown adapter '${o}'`);if(r)break;i[o||"#"+s]=r}if(!r){const s=Object.entries(i).map(([a,u])=>`adapter ${a} `+(u===!1?"is not supported by the environment":"is not available in the build"));let o=e?s.length>1?`since : 83`+s.map(rx).join(` 84`):" "+rx(s[0]):"as no adapter specified";throw new Re("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:Qf};function R0(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ql(null,t)}function ix(t){return R0(t),t.headers=Lr.from(t.headers),t.data=S0.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),vw.getAdapter(t.adapter||Dm.adapter)(t).then(function(r){return R0(t),r.data=S0.call(t,t.transformResponse,r),r.headers=Lr.from(r.headers),r},function(r){return gw(r)||(R0(t),r&&r.response&&(r.response.data=S0.call(t,t.transformResponse,r.response),r.response.headers=Lr.from(r.response.headers))),Promise.reject(r)})}const sx=t=>t instanceof Lr?t.toJSON():t;function Lo(t,e){e=e||{};const n={};function r(d,c,h){return Q.isPlainObject(d)&&Q.isPlainObject(c)?Q.merge.call({caseless:h},d,c):Q.isPlainObject(c)?Q.merge({},c):Q.isArray(c)?c.slice():c}
vendor: 4,605 bytes, lines 84-85
84function i(d,c,h){if(Q.isUndefined(c)){if(!Q.isUndefined(d))return r(void 0,d,h)}else return r(d,c,h)}function s(d,c){if(!Q.isUndefined(c))return r(void 0,c)}function o(d,c){if(Q.isUndefined(c)){if(!Q.isUndefined(d))return r(void 0,d)}else return r(void 0,c)}function a(d,c,h){if(h in e)return r(d,c);if(h in t)return r(void 0,d)}const u={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(d,c)=>i(sx(d),sx(c),!0)};return Q.forEach(Object.keys(Object.assign({},t,e)),function(c){const h=u[c]||i,p=h(t[c],e[c],c);Q.isUndefined(p)&&h!==a||(n[c]=p)}),n}const xw="1.6.7",bm={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{bm[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const ox={};bm.transitional=function(e,n,r){function i(s,o){return"[Axios v"+xw+"] Transitional option '"+s+"'"+o+(r?". "+r:"")}return(s,o,a)=>{if(e===!1)throw new Re(i(o," has been removed"+(n?" in "+n:"")),Re.ERR_DEPRECATED);return n&&!ox[o]&&(ox[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(s,o,a):!0}};function U4(t,e,n){if(typeof t!="object")throw new Re("options must be an object",Re.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const s=r[i],o=e[s];if(o){const a=t[s],u=a===void 0||o(a,s,t);if(u!==!0)throw new Re("option "+s+" must be "+u,Re.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Re("Unknown option "+s,Re.ERR_BAD_OPTION)}}const Xf={assertOptions:U4,validators:bm},ii=Xf.validators;class Qc{constructor(e){this.defaults=e,this.interceptors={request:new ex,response:new ex}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=` 85`+s):r.stack=s}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Lo(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&Xf.assertOptions(r,{silentJSONParsing:ii.transitional(ii.boolean),forcedJSONParsing:ii.transitional(ii.boolean),clarifyTimeoutError:ii.transitional(ii.boolean)},!1),i!=null&&(Q.isFunction(i)?n.paramsSerializer={serialize:i}:Xf.assertOptions(i,{encode:ii.function,serialize:ii.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=s&&Q.merge(s.common,s[n.method]);s&&Q.forEach(["delete","get","head","post","put","patch","common"],v=>{delete s[v]}),n.headers=Lr.concat(o,s);const a=[];let u=!0;this.interceptors.request.forEach(function(E){typeof E.runWhen=="function"&&E.runWhen(n)===!1||(u=u&&E.synchronous,a.unshift(E.fulfilled,E.rejected))});const d=[];this.interceptors.response.forEach(function(E){d.push(E.fulfilled,E.rejected)});let c,h=0,p;if(!u){const v=[ix.bind(this),void 0];for(v.unshift.apply(v,a),v.push.apply(v,d),p=v.length,c=Promise.resolve(n);h<p;)c=c.then(v[h++],v[h++]);return c}p=a.length;let y=n;for(h=0;h<p;){const v=a[h++],E=a[h++];try{y=v(y)}catch(I){E.call(this,I);break}}try{c=ix.call(this,y)}catch(v){return Promise.reject(v)}for(h=0,p=d.length;h<p;)c=c.then(d[h++],d[h++]);return c}getUri(e){e=Lo(this.defaults,e);const n=yw(e.baseURL,e.url);return hw(n,e.params,e.paramsSerializer)}}Q.forEach(["delete","get","head","options"],function(e){Qc.prototype[e]=function(n,r){return this.request(Lo(r||{},{method:e,url:n,data:(r||{}).data}))}});Q.forEach(["post","put","patch"],function(e){function n(r){return function(s,o,a){return this.request(Lo(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}Qc.prototype[e]=n(),Qc.prototype[e+"Form"]=n(!0)});const fc=Qc;class Fm{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(a=>{r.subscribe(a),s=a}).then(i);return o.cancel=function(){r.unsubscribe(s)},o},e(function(s,o,a){r.reason||(r.reason=new ql(s,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}
85subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new Fm(function(i){e=i}),cancel:e}}}const $4=Fm;function z4(t){return function(n){return t.apply(null,n)}}function j4(t){return Q.isObject(t)&&t.isAxiosError===!0}const Yf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Yf).forEach(([t,e])=>{Yf[e]=t});const H4=Yf;function _w(t){const e=new fc(t),n=ew(fc.prototype.request,e);return Q.extend(n,fc.prototype,e,{allOwnKeys:!0}),Q.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return _w(Lo(t,i))},n}const ut=_w(Dm);ut.Axios=fc;ut.CanceledError=ql;ut.CancelToken=$4;ut.isCancel=gw;ut.VERSION=xw;ut.toFormData=Od;ut.AxiosError=Re;ut.Cancel=ut.CanceledError;ut.all=function(e){return Promise.all(e)};ut.spread=z4;ut.isAxiosError=j4;ut.mergeConfig=Lo;ut.AxiosHeaders=Lr;ut.formToJSON=t=>mw(Q.isHTMLForm(t)?new FormData(t):t);ut.getAdapter=vw.getAdapter;ut.HttpStatusCode=H4;ut.default=ut;const Nm=ut,{Axios:f5,AxiosError:q4,CanceledError:p5,isCancel:m5,CancelToken:g5,VERSION:y5,all:v5,Cancel:x5,isAxiosError:_5,spread:E5,toFormData:w5,AxiosHeaders:A5,HttpStatusCode:C5,formToJSON:T5,getAdapter:I5,mergeConfig:S5}=Nm,Oa=window.location.href,Dt=(()=>Oa.match(/:\/\/[^.]+\.([^.]+)\./)&&Oa.match(/:\/\/[^.]+\.([^.]+)\./)[1]&&Oa.match(/:\/\/[^.]+\.([^.]+)\./)[1]!=="sandbox"&&Oa.match(/:\/\/[^.]+\.([^.]+)\./)[1]!=="charac"?Oa.match(/:\/\/[^.]+\.([^.]+)\./)[1]:"Charac")(),Ew="charac@bdefgijklmnopqstuvwxyz@charac",Bm="enc::",W4="U2FsdGVkX1",ww=t=>{const e=typeof t=="string"?t:JSON.stringify(t),n=fs.AES.encrypt(e,Ew).toString();return`${Bm}${n}`},G4=t=>{const e=t.replace(Bm,""),r=fs.AES.decrypt(e,Ew).toString(fs.enc.Utf8);try{return JSON.parse(r)}catch{return r}},Aw=t=>{if(!t)return null;if(t.startsWith(Bm)||t.startsWith(W4))try{return G4(t)}catch{return null}try{return JSON.parse(t)}catch{return t}},te={setItem:(t,e)=>{const n=ww(e);localStorage.setItem(t,n)},getItem:t=>Aw(localStorage.getItem(t)),removeItem:t=>localStorage.removeItem(t),clear:()=>localStorage.clear()},lt={setItem:(t,e)=>{const n=ww(e);sessionStorage.setItem(t,n)},getItem:t=>Aw(sessionStorage.getItem(t)),removeItem:t=>sessionStorage.removeItem(t),clear:()=>sessionStorage.clear()},Om=t=>{const n={...te.getItem("user")||{},...t};te.setItem("user",JSON.stringify(n))};te.getItem("pharmacyBrand");const z=Nm.create(),K4=()=>te.getItem("accessToken"),Q4=()=>te.getItem("user"),Cw=()=>({headers:{Authorization:`Bearer ${te.getItem("accessToken")}`}});Cw();const X4=()=>{Cw()};window.addEventListener("storage",t=>{t.key==="accessToken"&&X4()});z.interceptors.request.use(t=>{const e=K4(),n=Q4();let r=new URL(t.url);const i=t.useStaticBrand,s=te.getItem("pharmacyBrand");if(t.headers.Brand=i?Dt:s&&s!=="undefined"?s:Dt,t.secureToken)t.headers.Authorization=`Bearer ${t.secureToken}`;else if(e)if(n["userroles.role.roleName"]==="GUEST"&&r.pathname.includes("magiclink"))t.headers.Authorization=" ";else if(n["userroles.role.roleName"]==="GUEST"&&(r.pathname.includes("slot/release")||r.pathname.includes("/appointment/zero")||r.pathname.includes("/appointment/add")||r.pathname.includes("/api/v1/payment/checkout")||r.pathname.includes("/payment/status"))){const o=te.getItem("guestUserToken");t.headers.Authorization=`Bearer ${o||e}`}else t.secureToken?t.headers.Authorization=`Bearer ${t==null?void 0:t.secureToken}`:t.headers.Authorization=`Bearer ${e}`;return t.timeout=2e4,t},t=>Promise.reject(t));z.interceptors.response.use(t=>t,t=>{throw t.code==="ECONNABORTED"?new q4("Request timed out. Please try again later."):t});const R5=(t,e)=>{if(!t)return[];const n=Array.isArray(t)?t.map(r=>typeof r=="object"?r.id:r):t.toString().split(",").map(r=>
85r.trim()).filter(Boolean);return e.filter(r=>n.includes(r.id))},P5=t=>Array.isArray(t)?t.map(e=>({id:e.id,name:e.conditionName||e.allergyName})).filter(e=>e.id&&e.name):[],Md=t=>{var e;return Array.isArray(t)?t:Array.isArray(t==null?void 0:t.data)?t.data:Array.isArray((e=t==null?void 0:t.data)==null?void 0:e.data)?t.data.data:[]},k5=t=>{if(typeof t!="string"||t==="")return"";try{const e=new TextEncoder().encode(t),n=Array.from(e,r=>String.fromCharCode(r)).join("");return btoa(n)}catch{return""}},j="https://ecomm-api.charac.co.uk/api/v1",Y4=async()=>{var t,e;try{const n=await z.post(`${j}/auth/token`,null,{useStaticBrand:!0});return te.setItem("signInToken",n.data.data.token),n.data.data.token}catch(n){throw new Error(((e=(t=n.response)==null?void 0:t.data)==null?void 0:e.message)||"Authentication failed")}},Tw=(t,e)=>{const n=fs.enc.Utf8.parse(e),r=fs.enc.Utf8.parse("encryptionIntVec");return fs.AES.encrypt(t,n,{iv:r,mode:fs.mode.CBC}).toString()},J4=async(t,e)=>{var i,s;const n=te.getItem("signInToken");let r=Tw(t.password,n);try{return(await z.post(`${j}/auth/signin?q=${n}`,{email:t.email,password:r,isChecked:!1,twoFalogin:!0,multiFactorAuth:e},{useStaticBrand:!0})).data.data}catch(o){throw new Error(((s=(i=o.response)==null?void 0:i.data)==null?void 0:s.message)||"Authentication failed")}},Z4=async t=>{var e,n;try{const r=await z.post(`${j}/auth/verify`,t,{useStaticBrand:!0});return te.setItem("accessToken",r.data.data.user.token),te.setItem("tokenId",r.data.data.user.tokenId),te.setItem("user",JSON.stringify(r.data.data.user.eRsul)),r.data.data}catch(r){throw new Error(((n=(e=r.response)==null?void 0:e.data)==null?void 0:n.message)||"Authentication failed")}},eP=async(t,e,n,r)=>{var i,s;try{const o=await z.get(`${j}/guest?groupId=${t}&pharmacyId=${e}&homePharmacyId=${n}&location=${encodeURIComponent(r)}`,{useStaticBrand:!0});te.setItem("accessToken",o.data.data.user.token),te.setItem("tokenId",o.data.data.user.tokenId);let a=o.data.data.user.eRsul;return te.setItem("user",JSON.stringify(a)),o.data.data.user.eRsul}catch(o){throw new Error(((s=(i=o.response)==null?void 0:i.data)==null?void 0:s.message)||"Authentication failed")}},tP=async t=>{var e,n;try{const r=await z.post(`${j}
85/guest/updateGuestWithPharmacy`,t,{useStaticBrand:!0});te.setItem("accessToken",r.data.data.user.token),te.setItem("tokenId",r.data.data.user.tokenId);let i=r.data.data.user.eRsul;return te.setItem("user",JSON.stringify(i)),r.data.data}catch(r){throw new Error(((n=(e=r.response)==null?void 0:e.data)==null?void 0:n.message)||"Authentication failed")}},nP=async t=>{var r,i;const e=te.getItem("signInToken");let n=Tw(t.password,e);try{const s=await z.post(`${j}/auth/signin?q=${e}`,{email:t.email,password:n,isChecked:!1,twoFalogin:!1},{useStaticBrand:!0});return te.setItem("accessToken",s.data.data.user.token),te.setItem("tokenId",s.data.data.user.tokenId),te.setItem("user",JSON.stringify(s.data.data.user.eRsul)),s.data.data}catch(s){throw new Error(((i=(r=s.response)==null?void 0:r.data)==null?void 0:i.message)||"Authentication failed")}},rP=async(t,e)=>{var r,i;const n=te.getItem("signInToken");try{const s=await z.post(`${j}/nhsauth/login?q=${n}`,{code:t,redirectUri:e},{useStaticBrand:!0});return te.setItem("accessToken",s.data.data.user.token),te.setItem("tokenId",s.data.data.user.tokenId),te.setItem("user",JSON.stringify(s.data.data.user.eRsul)),lt.setItem("loginMethod","nhs"),s.data.data}catch(s){throw new Error(((i=(r=s.response)==null?void 0:r.data)==null?void 0:i.message)||"Authentication failed")}},iP=async()=>{try{const t=te.getItem("tokenId");await z.post(`${j}/auth/logout`,{tokenId:t},{useStaticBrand:!0}),te.removeItem("tokenId"),te.removeItem("accessToken"),te.removeItem("user"),te.removeItem("cartId"),te.removeItem("pharmacyBrand")}catch{te.removeItem("tokenId"),te.removeItem("accessToken"),te.removeItem("user"),te.removeItem("cartId"),te.removeItem("pharmacyBrand")}},sP=async t=>{var e,n;te.getItem("signInToken");try{const r=await z.post(`${j}/auth/signup`,t,{useStaticBrand:!0});return lt.setItem("loginMethod","normalSignup"),r.data.data}catch(r){throw new Error(((n=(e=r.response)==null?void 0:e.data)==null?void 0:n.message)||"Authentication failed")}},oP=async t=>{var e,n;te.getItem("signInToken");try{return(await z.post(`${j}/auth/guestusersignup`,t,{useStaticBrand:!0})).data.data}catch(r){throw new Error(((n=(e=r.response)==null?void 0:e.data)==null?void 0:n.message)||"Authentication failed")}},aP=async(t,e)=>{var n,r;te.getItem("signInToken");try{const i=await z.put(`${j}/patient?patientId=${t}`,e);return(i==null?void 0:i.data.data.message)=="Profile update successfull"&&Om(i.data.data.user.eRsul),i.data.data}catch(i){throw new Error(((r=(n=i.response)==null?void 0:n.data)==null?void 0:r.message)||"Authentication failed")}},lP=async()=>{try{const t=await z.get(`${j}/health-conditions`);return Md(t.data)}catch(t){throw t}},uP=async()=>{try{const t=await z.get(`${j}/allergies`);return Md(t.data)}catch(t){throw t}},cP=async t=>{try{const e=te.getItem("accessToken"),n=await z.get(`${j}/patients/${t}/allergies`,{headers:{Authorization:`Bearer ${e}`,brand:Dt,brandurl:window.location.href}});return Md(n.data)}catch(e){throw e}},dP=async t=>{try{const e=te.getItem("accessToken"),n=await z.get(`${j}/patients/${t}/health-conditions`,{headers:{Authorization:`Bearer ${e}`,brand:Dt,brandurl:window.location.href}});return Md(n.data)}catch(e){throw e}},hP=async(t,e)=>{try{const n=te.getItem("accessToken");return(await z.post(`${j}/patients/${t}/allergies`,e,{headers:{Authorization:`Bearer ${n}`,brand:Dt,brandurl:window.location.href}})).data}catch(n){throw n}},fP=async(t,e)=>{try{const n=te.getItem("accessToken");return(await z.post(`${j}/patients/${t}/health-conditions`,e,{headers:{Authorization:`Bearer ${n}`,brand:Dt,brandurl:window.location.href}})).data}catch(n){throw n}},pP=async(t,e)=>{try{const n=te.getItem("accessToken");return(await z.delete(`${j}/patients/${t}/health-conditions/${e}`,{headers:{Authorization:`Bearer ${n}`,brand:Dt,brandurl:window.location.href}})).data}catch(n){throw n}},mP=async(t,e)=>{try{const n=te.getItem("accessToken");return(await z.delete(`${j}/patients/${t}/allergies/${e}`,{headers:{Authorization:`Bearer ${n}`,brand:Dt,brandurl:window.location.href}})).data}catch(n){throw n}},gP=async(t,e)=>{try{return(await z.get(`${j}/categories?storeId=${t}&page=${e}&limit=20`)).data.data}catch(n){throw n}},yP=async(t,e,n)=>{try{const r=encodeURIComponent(e);return(await z.get(`${j}/categories?${t}=${r}&storeId=${n}`)).data.data.data[0]}catch(r){throw r}},vP=async(t,e)=>{try{return(await z.get(`${j}/products?storeId=${t}&page=${e}&limit=20`)).data.data}catch(n){throw n}},xP=async t=>{try{return(await z.get(`${j}/products/promotions/${t}`)).data.data}catch(e){throw e}},_P=async(t,e,n,r)=>{try{const i=encodeURIComponent(n);return(await z.get(`${j}/products?storeId=${t}&${e}=${i}&page=${r}&limit=20`)).data.data}catch(i){throw i}},EP=async(t,e,n,r,i,s)=>{try{const o=n.replace(/ /g,"_"),a=encodeURIComponent(o),u=await z.get(`${j}/search?storeId=${t}&searchtext=${a}&os=${e}&page=${r}&limit=${i}&pagination=${s}`),{brands:d,categories:c,products:h}=u.data.data;return{brands:d,categories:c,products:h}}catch(o){throw o}},wP=async(t,e,n)=>{try{const r=encodeURIComponent(e);return(await z.get(`${j}/products?${t}=${r}&storeId=${n}`)).data.data.data[0]}catch(r){throw r}},AP=async t=>{try{return(await z.get(`${j}/products/${t}`)).data.data}catch(e){throw e}},CP=async t=>{try{return(await z.post(`${j}/cart/add`,{object:"cart",customer_id:t})).data.data.id}catch(e){throw e}},TP=async t=>{try{return(await z.get(`${j}/cart/${t}`)).data.data[0]}catch(e){throw e}},IP=async t=>{try{return(await z.put(`${j}/cart/update`,t)).data.data[0]}catch(e){throw e}},SP=async t=>{try{return(await z.post(`${j}/cartlineitem/add`,t)).data.data[0]}catch(e){throw e}},RP=async t=>{try{return(await z.post(`${j}/cartlineitem/v2/add`,t)).data.data[0]}catch(e){throw e}},PP=async t=>{try{return(await z.get(`${j}/cartlineitem/${t}`)).data.data}catch(e){throw e}},kP=async t=>{try{return(await z.put(`${j}/cartlineitem/update`,t)).data.data[0]}catch(e){throw e}},DP=async(t,e)=>{try{return(await z.post(`${j}/cartlineitem/delete`,{id:t,cart_id:e})).data.data[0]}catch(n){throw n}},bP=async t=>{try{return(await z.post(`${j}/cartlineitem/status`,t)).data}catch(e){throw e}},FP=async t=>{try{return(await z.post(`${j}/cartlineitem/cancel?itemCancel=true`,t)).data}catch(e){throw e}},NP=async t=>{try{return(await z.post(`${j}/order`,t)).data.data}catch(e){throw e}},BP=async t=>{try{return(await z.put(`${j}/order`,t)).data.data}catch(e){throw e}},OP=async(t,e)=>{try{return(await z.get(`${j}/order?customerId=${t}&page=${e}&limit=20`)).data}catch(n){throw n}},LP=async t=>{try{return(await z.get(`${j}/order/${t}`)).data}catch(e){throw e}},Iw=async t=>{try{return(await z.post(`${j}/address/add`,t)).data.data}catch(e){throw e}},MP=async t=>{try{return(await z.put(`${j}/address/update`,t)).data.data}catch(e){throw e}},VP=async t=>{try{return(await z.get(`${j}/address?customerId=${t}`)).data.data}catch(e){throw e}},UP=async t=>{try{return(await z.post(`${j}/address/delete`,{id:t})).data.data}catch(e){throw e}},$P=async t=>{var e;try{const n=await z.post(`${j}/payment/checkout`,t);if(n)return(e=n==null?void 0:n.data)==null?void 0:e.data}catch(n){throw n}},zP=async(t,e)=>{try{return(await z.post(`${j}/cart/latest`,{customer_id:t,storeId:e})).data.data[0]}catch(n){throw n}},jP=async t=>{try{return(await z.post(`${j}/cart/merge`,t)).data.data[0]}catch(e){throw e}},HP=async t=>{try{return(await z.get(`${j}/wishlist/${t}`)).data.data}catch(e){throw e}},qP=async t=>{try{return(await z.post(`${j}/wishlist/add`,t)).data.data}catch(e){throw e}},WP=async t=>{try{return(await z.post(`${j}/wishlist/delete`,t)).data.data}catch(e){throw e}},GP=async t=>{try{return(await z.post(`${j}/prescription/nhs/session`,t)).data.data}catch(e){throw e}},KP=async(t,e)=>{try{return(await z.get(`${j}/prescription/nhs?gpCode=${t}&patientKey=${e}`)).data.data}catch(n){throw n}},QP=async t=>{try{const e=te.getItem("accessToken");return(await z.post(`${j}/prescription/nhs/request`,t,{headers:{Authorization:`Bearer ${e}`,brand:Dt,brandurl:window.location.href,medicationcontrolledbypharmacyadmin:"false",isim1pharmacy:!0}})).data.data}catch(e){throw e}},XP=async()=>{try{const t=te.getItem("tokenId"),e=te.getItem("accessToken"),n=await z.post(`${j}/auth/refresh`,null,{headers:{Authorization:`Bearer ${e}`,tokenid:t}});return te.setItem("accessToken",n.data.data.data.token),te.setItem("tokenId",n.data.data.data.tokenId),n.data.data.data.token}catch(t){throw t}},YP=async t=>{try{return(await z.post(`${j}/exemption/add`,t)).data.data}catch(e){throw e}},JP=async t=>{try{return(await z.get(`${j}/exemption/${t}`)).data.data}catch(e){throw e}},ZP=async t=>{try{return(await z.post(`${j}/exemption/update`,t)).data.data}catch(e){throw e}},ek=async t=>{try{return(await z.post(`${j}/appointment/booked`,t)).data.data}catch(e){throw e}},tk=async t=>{try{return(await z.get(`${j}/services?pharmacyId=${t}&isNewGetServices=true`)).data.data}catch(e){throw e}},nk=async t=>{try{return(await z.get(`${j}/services/search/${t}`)).data.data.data}catch(e){throw e}},rk=async(t,e)=>{try{return(await z.get(`${j}/services/search/${t}/${e}`)).data.data.data}catch(n){throw n}},ik=async t=>{try{return(await z.get(`${j}/patient/list?userId=${t}`)).data.data.data}catch(e){throw e}},sk=async t=>{try{return(await z.post(`${j}/slot`,t)).data.data}catch(e){throw e}},ok=async(t,e,n)=>{try{return(await z.post(`${j}/slot?nextavailableslotcheck=true${e?"&isGroup=true":""}${n?"&serviceAvailability=true":""}`,t)).data.data}catch(r){throw r}},ak=async t=>{try{return(await z.post(`${j}/slot/block`,t)).data.data}catch(e){throw e}},lk=async t=>{try{return(await z.post(`${j}/appointment/zero`,t)).data.data}catch(e){throw e}},uk=async t=>{try{return(await z.post(`${j}/appointment/add`,t)).data.data}catch(e){throw e}},ck=async t=>{try{return(await z.post(`${j}/slot/release`,t)).data.data}catch(e){throw e}},dk=async(t,e)=>{try{return(await z.post(`${j}/appointment/cancel?appointmentId=${e}`,t)).data}catch(n){throw n}},hk=async()=>{try{const t=te.getItem("user")["patients.postCode"];return(await z.get(`${j}/pharmacy/brand/${Dt}?postCode=${t.substring(0,3)}`)).data.data.data}catch(t){throw t}},fk=async({page:t=1,limit:e=20,search:n="",brandId:r=""}={})=>{try{return(await z.get(`${j}/pharmacy/all/brand/${r}`,{params:{page:t,limit:e,...n?{search:n}:{}}})).data}catch(i){throw i}},pk=async t=>{try{return(await z.get(`${j}/pharmacy/search?postCode=${t}`)).data.data}catch(e){throw e}},mk=async()=>{var t,e;try{const n=Dt!=="Charac"?te.getItem("user")["pharmacy.groupId"]:null;return(e=(t=(await z.get(`${j}/group/pharmacy?groupId=${n}`)).data)==null?void 0:t.data)==null?void 0:e.groupPharmacies}catch(n){throw n}},gk=async t=>{try{return(await z.post(`${j}/pharmacy/nominate`,t)).data.data}catch(e){throw e}},yk=async t=>{try{const e=await z.put(`${j}
85/pharmacy/changepharmacy`,t,{useStaticBrand:!0});return e.data.data.message=="Pharmacy change success!"&&(te.setItem("accessToken",e.data.data.accessToken),te.setItem("tokenId",e.data.data.tokenId),Om(e.data.data.user.eRsul)),e.data.data}catch(e){throw e}},vk=async t=>{try{return(await z.post(`${j}/video`,t)).data.data}catch(e){throw e}},xk=async t=>{try{return await z.post(`${j}/video/end`,t)}catch(e){throw e}},_k=async t=>{try{const e=await z.post(`${j}/nhsauth/link`,t);return e.data.data.data.message=="Your account has been successfully linked with your GP. You can now request your repeat prescriptions."&&Om(e.data.data.userData.user.eRsul),e.data.data}catch(e){throw e}},Ek=async t=>{try{return(await z.get(`${j}/prescription/nhs/gps?postCode=${t}`)).data.data.gpList}catch(e){throw e}},wk=async t=>{try{return(await z.post(`${j}/dmdb`,t)).data.data.data}catch(e){throw e}},Ak=async t=>{try{return(await z.post(`${j}/prescription/nhs/link`,t)).data.data}catch(e){throw e}},Ck=async(t,e)=>{try{const n=new URLSearchParams({pharmacyServiceFormId:t});return e&&n.append("patientId",e),(await z.get(`${j}/form/appointment?${n.toString()}`)).data.data.data}catch(n){throw n}},Tk=async t=>{try{const e=new URLSearchParams({appointmentFormId:t});return(await z.get(`${j}/form/appointment?${e.toString()}`)).data.data.data}catch(e){throw e}},Ik=async t=>{try{return(await z.post(`${j}/form/appointment`,t)).data.data}catch(e){throw e}},Sk=async(t,e)=>{try{return(await z.put(`${j}/form/appointment?appointmentFormId=${t}`,e)).data.data}catch(n){throw n}},Rk=async t=>{try{return(await z.put(`${j}/tcpp`,t)).data.data}catch(e){throw e}},Pk=async t=>{try{return(await z.post(`${j}/payment/status`,t)).data.data}catch(e){throw e}},kk=async t=>{try{return(await z.put(`${j}/appointment/reschedule`,t)).data.data}catch(e){throw e}},Dk=async t=>{try{return(await z.get(`${j}/products/cart/${t}`)).data.data}catch(e){throw e}},bk=async t=>{try{return(await z.get(`${j}/reminder?userId=${t}`)).data.data.data}catch(e){throw e}},Fk=async t=>{try{return(await z.post(`${j}/reminder`,t)).data.data}catch(e){throw e}},Nk=async t=>{try{return(await z.put(`${j}/reminder`,t)).data.data}catch(e){throw e}},Bk=async t=>{try{return(await z.delete(`${j}/reminder`,{data:t})).data.data}catch(e){throw e}},Ok=async(t,e,n)=>{try{return(await z.get(`${j}/prescription/nhs/group?gpCode=${t}&patientKey=${e}&postCode=${n}`)).data.data}catch(r){throw r}},Lk=async t=>{try{return await z.post(`${j}/auth/forgot`,t)}catch(e){throw e}},Mk=async(t,e)=>{try{return await z.post(`${j}/auth/reset?q=${t}`,e)}catch(n){throw n}},Vk=async t=>{try{const e=await z.post(`${j}/auth/tpsignin`,t);return te.setItem("accessToken",e.data.data.user.token),te.setItem("tokenId",e.data.data.user.tokenId),te.setItem("user",JSON.stringify(e.data.data.user.eRsul)),lt.setItem("loginMethod","google"),e.data.data}catch(e){throw e}},Uk=async t=>{try{return(await z.get(`${j}/pdf?type=order_invoice&order_id=${t}`)).data.data}catch(e){throw e}},$k=async t=>{try{return(await z.get(`${j}/dependent?userId=${t}`)).data.data}catch(e){throw e}},zk=async(t,e)=>{try{const n=await z.post(`${j}/dependent`,t,e?{secureToken:e}:void 0);return te.setItem("accessToken",n.data.data[0].tokens.token),te.setItem("tokenId",n.data.data[0].refreshToken),n.data.data}catch(n){throw n}},jk=async t=>{try{return(await z.put(`${j}/dependent`,t)).data.data}catch(e){throw e}},Hk=async(t,e)=>{try{return(await z.delete(`${j}/dependent?patientId=${t}&userId=${e}`)).data.data}catch(n){throw n}},qk=async t=>{try{return(await z.post(`${j}/patient/delete`,t)).data.data}catch(e){throw e}},Wk=async(t,e,n)=>{try{return await z.get(`${j}/pdf/template?type=${t}&${e}=${n}`)}catch(r){throw r}},Gk=async t=>{try{return(await z.post(`${j}/dependent/nhslink`,t)).data.data}catch(e){throw e}},Kk=async t=>{try{return(await z.post(`${j}/cart/validate`,t)).data.data}catch(e){throw e}},Qk=async t=>{try{return(await z.post(`${j}/payment/prescription/status`,t)).data.data}catch(e){throw e}},Xk=async()=>{try{return(await z.get(`${j}/auth/loginview`,{useStaticBrand:!0})).data.data}catch(t){throw t}},Yk=async(t,e)=>{try{return(await z.get(`${j}/brands?storeId=${t}&page=${e}&limit=20`)).data.data}catch(n){throw n}},Jk=async(t,e,n)=>{try{const r=encodeURIComponent(e);return(await z.get(`${j}/brands?${t}=${r}&storeId=${n}`)).data.data.brands[0]}catch(r){throw r}},Zk=async t=>{try{return(await z.post(`${j}/notification/history`,t)).data.data}catch(e){throw e}},eD=async t=>{try{return(await z.get(`${j}/promotions?storeId=${t}&page=1&limit=100`)).data.data}catch(e){throw e}},tD=async()=>{try{return(await z.get(`${j}/tcpp?brand=${Dt}`)).data.data}catch(t){throw t}},nD=async(t,e)=>{try{return(await z.get(`${j}/notificationprefernce?userId=${t}&pharmacyId=${e}`)).data.data}catch(n){throw n}},rD=async t=>{try{return(await z.put(`${j}/notificationprefernce`,t)).data.data.data}catch(e){throw e}},iD=async t=>{try{return(await z.get(`${j}/pharmacy/${t}`)).data.data}catch(e){throw e}},sD=async(t,e,n)=>{try{return(await z.get(`${j}/categories/search?storeId=${t}&searchtext=${e}&pagination=true&page=${n}&limit=20`)).data.data}catch(r){throw r}},oD=async(t,e,n)=>{try{return(await z.get(`${j}/brands/search?storeId=${t}&searchtext=${e}&pagination=true&page=${n}&limit=20`)).data.data}catch(r){throw r}},aD=async t=>{try{return(await z.get(`${j}/products/getlatestquantity/${t}`)).data.data[0]}catch(e){throw e}},lD=async(t,e)=>{try{return(await z.get(`${j}/schemaconfig/user/${t}?entityFormId=${e}`)).data.data}catch(n){throw n}},uD=async t=>{try{return(await z.post(`${j}/schemaconfig`,t)).data.data}catch(e){throw e}},cD=async(t,e)=>{try{return(await z.post(`${j}/schemaconfig/${e}`,t)).data.data}catch(n){throw n}},dD=async t=>{try{return(await z.get(`${j}/mps/${t}`)).data.data}catch(e){throw e}},hD=async t=>{try{return(await z.get(`${j}/mps/product/${t}`)).data.data}catch(e){throw e}},fD=async t=>{try{return(await z.post(`${j}/mps/question`,t)).data.data}catch(e){throw e}},pD=async(t,e)=>{try{return(await z.get(`${j}/magiclink/${t}?r=${e}`)).data.data}catch(n){throw n}},mD=async t=>{try{return(await z.get(`${j}/gpmaster/${t}`)).data.data}catch(e){throw e}},gD=async t=>{try{return(await z.post(`${j}/gpmaster/patients/link`,t)).data.data}catch(e){throw e}},yD=async t=>{try{return(await z.post(`${j}/gpmaster`,t)).data.data}catch(e){throw e}},vD=async t=>{try{let{gp_code:e,pharmacyId:n}=t;return(await z.get(`${j}/gpmaster/${e}/${n}`)).data.data}catch(e){throw e}},xD=async t=>{try{return(await z.post(`${j}/analyst`,t)).data.data.data}catch(e){throw e}},_D=async t=>{try{return(await z.post(`${j}/cart/filterStoresWithLiveStock`,t)).data.data}catch(e){throw e}},ED=async t=>{try{return(await z.post(`${j}/pharmacy/pharmacyGeoLocation`,t)).data.data}catch(e){throw e}},wD=async t=>{try{return(await z.get(`${j}
85/guest/getPostcodes?location=${encodeURIComponent(t)}`)).data.data}catch(e){throw e}},AD=async(t,e)=>{try{return(await z.get(`${j}/pharmacy/pharmaciesavailability?pharmacyIds=${t}&date=${e}`)).data.data}catch(n){throw n}},CD=async t=>{try{return(await z.get(`${j}/services/filter/group/${t}`)).data.data}catch(e){throw e}},TD=async t=>{try{return(await z.get(`${j}/services/filter/pharmacy/${t}`)).data.data}catch(e){throw e}},ID=async t=>{try{return(await z.get(`${j}/auth/checkUser?email=${t}`,{useStaticBrand:!0})).data.data}catch(e){throw e}},SD=async(t,e)=>{try{return(await z.put(`${j}/auth/updatemobile`,t,{secureToken:e})).data.data}catch(n){throw n}},RD=async t=>{try{return(await z.post(`${j}/auth/sendotp`,t,{useStaticBrand:!0})).data.data}catch(e){throw e}},PD=async t=>{try{return(await z.get(`${j}/schedule/${t}`)).data.data.data}catch(e){throw e}},kD=async t=>{try{return(await z.get(`${j}/schedule/history/${t}`)).data}catch(e){throw e}},DD=async t=>{try{return(await z.get(`${j}/schedule/list/${t}`)).data.data.data}catch(e){throw e}},bD=async t=>{try{return(await z.post(`${j}/schedule`,t)).data}catch(e){throw e}},FD=async t=>{try{return(await z.post(`${j}/schedule/status`,t)).data}catch(e){throw e}},ND={loadingCount:0,error:null,newerrors:[]},Hu=(t,e)=>{var r,i,s,o;if(e!=null&&e._isTokenRefreshFailure)return;const n=typeof e=="string"?e.trim():((i=(r=e==null?void 0:e.response)==null?void 0:r.data)==null?void 0:i.message)||((o=(s=e==null?void 0:e.response)==null?void 0:s.data)==null?void 0:o.error)||(e==null?void 0:e.message)||"We're experiencing technical difficulties. Please try again in a moment.";!n||!String(n).trim()||t({type:qt.ADD_NEWERROR,payload:String(n).trim()})},qt={INCREMENT_LOADING:"INCREMENT_LOADING",DECREMENT_LOADING:"DECREMENT_LOADING",SET_ERROR:"SET_ERROR",CLEAR_ERROR:"CLEAR_ERROR",ADD_NEWERROR:"ADD_ERROR",CLEAR_NEWERRORS:"CLEAR_ERRORS"},BD=(t,e)=>{switch(e.type){case qt.INCREMENT_LOADING:return{...t,loadingCount:t.loadingCount+1};case qt.DECREMENT_LOADING:return{...t,loadingCount:Math.max(0,t.loadingCount-1)};case qt.SET_ERROR:return{...t,error:e.payload};case qt.CLEAR_ERROR:return{...t,error:null};case qt.ADD_NEWERROR:const i=[...t.newerrors.slice(-9),e.payload];return{...t,newerrors:i};case qt.CLEAR_NEWERRORS:return{...t,newerrors:[]};default:return t}},Sw=O.exports.createContext(),D5=({children:t})=>{const[e,n]=O.exports.useReducer(BD,ND);Dd();const[r,i]=O.exports.useState(!1),s=O.exports.useRef(!1),o=O.exports.useRef(null),a=async(c,...h)=>{var p,y;n({type:qt.INCREMENT_LOADING});try{return await c(...h)}catch(v){if(v.response&&v.response.status===401&&te.getItem("accessToken"))try{return await u.refreshTokenAndRetry(()=>c(...h))}catch(E){!E._isTokenRefreshFailure&&E.response&&E.response.status!==401&&Hu(n,E)}else{if(v.response&&v.response.status===409)return{success:!1,status:(p=v.response)==null?void 0:p.status,error:(y=v.response.data)==null?void 0:y.message};Hu(n,v)}}finally{n({type:qt.DECREMENT_LOADING})}};O.exports.useEffect(()=>{n({type:qt.CLEAR_ERROR})},[]),O.exports.useEffect(()=>{if(e.newerrors.length>0){const c=setTimeout(()=>{n({type:qt.CLEAR_NEWERRORS})},1e4);return()=>clearTimeout(c)}},[e.newerrors]);const u={refreshTokenAndRetry:async c=>{s.current||(s.current=!0,o.current=XP().finally(()=>{s.current=!1}));try{i(!0),await o.current,i(!1)}catch(h){if(o.current!==null){o.current=null,n({type:qt.CLEAR_NEWERRORS});const p=`${window.location.pathname}${window.location.search}${window.location.hash}`,y=te.getItem("user");y&&(y==null?void 0:y["userroles.role.roleName"])!=="GUEST"?(te.clear(),lt.clear(),te.setItem("redirectionUrl",p),window.location.replace("/login")):(te.clear(),lt.clear(),window.location.replace(p))}else i(!1);throw h._isTokenRefreshFailure=!0,h}if(c)return await c()},getSignInToken:async()=>{n({type:qt.INCREMENT_LOADING});try{return await Y4(),!0}catch(c){c.response&&c.response.status===401&&te.getItem("accessToken")?await u.refreshTokenAndRetry(null):Hu(n,c)}finally{n({type:qt.DECREMENT_LOADING})}},logout:async()=>{n({type:qt.INCREMENT_LOADING});try{return await iP(),!0}catch(c){c.response&&c.response.status===401&&te.getItem("accessToken")?await u.refreshTokenAndRetry(null):Hu(n,c)}finally{n({type:qt.DECREMENT_LOADING})}},authenticateUser:(c,h)=>
85a(J4,c,h),signIn:c=>a(nP,c),verifyOtp:c=>a(Z4,c),completeNhsOAuth:(c,h)=>a(rP,c,h),signUp:c=>a(sP,c),updateProfile:(c,h)=>a(aP,c,h),getPromotions:c=>a(eD,c),getAllCategories:(c,h)=>a(gP,c,h),getCategory:(c,h,p)=>a(yP,c,h,p),createCart:c=>a(CP,c),getCart:c=>a(TP,c),getCustomerCart:(c,h)=>a(zP,c,h),mergeCarts:c=>a(jP,c),getAllProducts:(c,h)=>a(vP,c,h),getAllProductsbyFilter:(c,h,p,y)=>a(_P,c,h,p,y),getAllProductsSearch:(c,h,p,y,v,E)=>a(EP,c,h,p,y,v,E),getProduct:(c,h,p)=>a(wP,c,h,p),getProductbyid:c=>a(AP,c),addLineItem:c=>a(SP,c),addLineItemsBulk:c=>a(RP,c),getLineItem:c=>a(PP,c),updateLineItem:c=>a(kP,c),updateCart:c=>a(IP,c),deleteLineItem:(c,h)=>a(DP,c,h),createOrder:c=>a(NP,c),getOrders:(c,h)=>a(OP,c,h),addAddress:c=>a(Iw,c),updateAddress:c=>a(MP,c),getAllAddresses:c=>a(VP,c),deleteAddress:c=>a(UP,c),createPaymentSession:c=>a($P,c),getUserWishlist:c=>a(HP,c),addItemsWishlist:c=>a(qP,c),delItemsFromWishlist:c=>a(WP,c),startPrescriptionSession:c=>a(GP,c),getMedicationByPatient:(c,h)=>a(KP,c,h),requestMedication:c=>a(QP,c),getExemptions:c=>a(JP,c),addExemptions:c=>a(YP,c),updateExemptions:c=>a(ZP,c),getBookedAppointments:c=>a(ek,c),getServices:c=>a(tk,c),searchService:c=>a(nk,c),getPatientList:c=>a(ik,c),getSlotsForDate:c=>a(sk,c),nextAvailableSlotsForDate:(c,h,p)=>a(ok,c,h,p),appointmentSlotBlock:c=>a(ak,c),appointmentSlotRelease:c=>a(ck,c),bookAppointment:c=>a(lk,c),addAppointment:c=>a(uk,c),cancelAppointment:(c,h)=>a(dk,c,h),getPharmacyList:()=>a(hk),nominatePharmacy:c=>a(gk,c),changePharmacy:c=>a(yk,c),createRoom:c=>a(vk,c),gpLink:c=>a(_k,c),getFormSchema:(c,h)=>a(Ck,c,h),submitFormData:c=>a(Ik,c),updateAppointmentForm:(c,h)=>a(Sk,c,h),updatePrivacyPolicy:c=>a(Rk,c),bookPaidAppointment:c=>a(Pk,c),rescheduleAppointment:c=>a(kk,c),getGp:c=>a(Ek,c),getMedicines:c=>a(wk,c),linkGp:c=>a(Ak,c),getCartProducts:c=>a(Dk,c),getReminders:c=>a(bk,c),saveReminder:c=>a(Fk,c),editReminder:c=>a(Nk,c),deleteReminder:c=>a(Bk,c),updateOrder:c=>a(BP,c),getOrder:c=>a(LP,c),getOrderedPrescriptions:(c,h,p)=>a(Ok,c,h,p),sendResetLink:c=>a(Lk,c),resetPassword:(c,h)=>a(Mk,c,h),googleSignin:c=>a(Vk,c),downloadOrderInvoice:c=>a(Uk,c),getDependents:c=>a($k,c),addDependents:(c,h)=>a(zk,c,h),editDependents:c=>a(jk,c),deleteAccount:c=>a(qk,c),deleteDependents:(c,h)=>a(Hk,c,h),downloadInvoice:(c,h,p)=>a(Wk,c,h,p),dependentNhsGpLink:c=>a(Gk,c),validatePline:c=>a(Kk,c),prescriptionStatusUpdate:c=>a(Qk,c),getGaKey:()=>a(Xk),getBrands:(c,h)=>a(Yk,c,h),getBrandbyid:(c,h,p)=>a(Jk,c,h,p),getNotifications:c=>a(Zk,c),gettcpp:()=>a(tD),getNotificationSettings:(c,h)=>a(nD,c,h),updateNotificationSettings:c=>a(rD,c),getAllProductsForPromotion:c=>a(xP,c),getPharmacyDetails:c=>a(iD,c),searchCategory:(c,h,p)=>a(sD,c,h,p),searchBrand:(c,h,p)=>a(oD,c,h,p),getLatestInventory:c=>a(aD,c),updateLineItemStatus:c=>a(bP,c),endSession:c=>a(xk,c),getGroupPharmacyList:c=>
85a(mk,c),getPreQuestionnaireForm:(c,h)=>a(lD,c,h),savePreQuestionnaireForm:c=>a(uD,c),updatePreQuestionnaireForm:(c,h)=>a(cD,c,h),cancelOrderItem:c=>a(FP,c),getMpsProductId:c=>a(dD,c),getMpsProductDetails:c=>a(hD,c),getMpsProductQuestion:c=>a(fD,c),validateMagicLink:(c,h)=>a(pD,c,h),getGuestUser:(c,h,p,y)=>a(eP,c,h,p,y),guestToUser:c=>a(oP,c),getNonIm1Gp:c=>a(mD,c),linkNonIm1GpApi:c=>a(gD,c),addGP:c=>a(yD,c),getProductStores:c=>a(_D,c),updateGuestWithPharmacy:c=>a(tP,c),searchPharmacy:c=>a(pk,c),getPharmacyGeoLocation:c=>a(ED,c),getPostcodes:c=>a(wD,c),getPharmaciesAvailability:(c,h)=>a(AD,c,h),getAppointmentFormSchema:c=>a(Tk,c),getGPPharmacyDetails:c=>a(vD,c),getRecentMedicationList:c=>a(xD,c),getGroupServices:c=>a(CD,c),getPharmacyServices:c=>a(TD,c),getAllPharmacies:c=>a(fk,c),searchServiceByNameAndPharmacy:(c,h)=>a(rk,c,h),checkUser:c=>a(ID,c),updateMobileAndSendOtp:(c,h)=>a(SD,c,h),resendOtp:c=>a(RD,c),getConditions:()=>a(lP),getAllergies:()=>a(uP),getPatientAllergies:c=>a(cP,c),getPatientConditions:c=>a(dP,c),updatePatientAllergies:(c,h)=>a(hP,c,h),updatePatientConditions:(c,h)=>a(fP,c,h),deletePatientCondition:(c,h)=>a(pP,c,h),deletePatientAllergy:(c,h)=>a(mP,c,h),getScheduleOrderById:c=>a(PD,c),getScheduleHistory:c=>a(kD,c),getScheduleOrderList:c=>a(DD,c),createOrUpdateScheduleOrder:c=>a(bD,c),updateScheduleStatus:c=>a(FD,c)},d={...e,...u,showLoadingText:r,dispatch:n};return ge(Sw.Provider,{value:d,children:t})},OD=()=>O.exports.useContext(Sw);var Rw={},Pw={},kw={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=function(){for(var i=arguments.length,s=new Array(i),o=0;o<i;o++)s[o]=arguments[o];if(typeof window<"u"){var a;typeof window.gtag>"u"&&(window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)}),(a=window).gtag.apply(a,s)}},n=e;t.default=n})(kw);var Dw={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var e=/^(a|an|and|as|at|but|by|en|for|if|in|nor|of|on|or|per|the|to|vs?\.?|via)$/i;function n(a){return a.toString().trim().replace(/[A-Za-z0-9\u00C0-\u00FF]+[^\s-]*/g,function(u,d,c){return d>0&&d+u.length!==c.length&&u.search(e)>-1&&c.charAt(d-2)!==":"&&(c.charAt(d+u.length)!=="-"||c.charAt(d-1)==="-")&&c.charAt(d-1).search(/[^\s-]/)<0?u.toLowerCase():u.substr(1).search(/[A-Z]|\../)>-1?u:u.charAt(0).toUpperCase()+u.substr(1)})}function r(a){return typeof a=="string"&&a.indexOf("@")!==-1}var i="REDACTED (Potential Email Address)";function s(a){return r(a)?(console.warn("This arg looks like an email address, redacting."),i):a}function o(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,c=a||"";return u&&(c=n(a)),d&&(c=s(c)),c}})(Dw);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.GA4=void 0;var e=o(kw),n=o(Dw),r=["eventCategory","eventAction","eventLabel","eventValue","hitType"],i=["title","location"],s=["page","hitType"];function o(N){return N&&N.__esModule?N:{default:N}}function a(N,B){if(N==null)return{};var U=u(N,B),W,L;if(Object.getOwnPropertySymbols){var G=Object.getOwnPropertySymbols(N);for(L=0;L<G.length;L++)W=G[L],!(B.indexOf(W)>=0)&&(!Object.prototype.propertyIsEnumerable.call(N,W)||(U[W]=N[W]))}return U}function u(N,B){if(N==null)return{};var U={},W=Object.keys(N),L,G;for(G=0;G<W.length;G++)L=W[G],!(B.indexOf(L)>=0)&&(U[L]=N[L]);return U}function d(N){return d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(B){return typeof B}:function(B){return B&&typeof Symbol=="function"&&B.constructor===Symbol&&B!==Symbol.prototype?"symbol":typeof B},d(N)}function c(N){return y(N)||p(N)||m(N)||h()}function h(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 86In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function p(N){if(typeof Symbol<"u"&&N[Symbol.iterator]!=null||N["@@iterator"]!=null)return Array.from(N)}function y(N){if(Array.isArray(N))return x(N)}function v(N,B){var U=Object.keys(N);if(Object.getOwnPropertySymbols){var W=Object.getOwnPropertySymbols(N);B&&(W=W.filter(function(L){return Object.getOwnPropertyDescriptor(N,L).enumerable})),U.push.apply(U,W)}return U}function E(N){for(var B=1;B<arguments.length;B++){var U=arguments[B]!=null?arguments[B]:{};
86B%2?v(Object(U),!0).forEach(function(W){T(N,W,U[W])}):Object.getOwnPropertyDescriptors?Object.defineProperties(N,Object.getOwnPropertyDescriptors(U)):v(Object(U)).forEach(function(W){Object.defineProperty(N,W,Object.getOwnPropertyDescriptor(U,W))})}return N}function I(N,B){return F(N)||R(N,B)||m(N,B)||A()}function A(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 87In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m(N,B){if(!!N){if(typeof N=="string")return x(N,B);var U=Object.prototype.toString.call(N).slice(8,-1);if(U==="Object"&&N.constructor&&(U=N.constructor.name),U==="Map"||U==="Set")return Array.from(N);if(U==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(U))return x(N,B)}}function x(N,B){(B==null||B>N.length)&&(B=N.length);for(var U=0,W=new Array(B);U<B;U++)W[U]=N[U];return W}function R(N,B){var U=N==null?null:typeof Symbol<"u"&&N[Symbol.iterator]||N["@@iterator"];if(U!=null){var W,L,G,X,V=[],$=!0,H=!1;try{if(G=(U=U.call(N)).next,B===0){if(Object(U)!==U)return;$=!1}else for(;!($=(W=G.call(U)).done)&&(V.push(W.value),V.length!==B);$=!0);}catch(K){H=!0,L=K}finally{try{if(!$&&U.return!=null&&(X=U.return(),Object(X)!==X))return}finally{if(H)throw L}}return V}}function F(N){if(Array.isArray(N))return N}function b(N,B){if(!(N instanceof B))throw new TypeError("Cannot call a class as a function")}function C(N,B){for(var U=0;U<B.length;U++){var W=B[U];W.enumerable=W.enumerable||!1,W.configurable=!0,"value"in W&&(W.writable=!0),Object.defineProperty(N,w(W.key),W)}}function _(N,B,U){return B&&C(N.prototype,B),U&&C(N,U),Object.defineProperty(N,"prototype",{writable:!1}),N}function T(N,B,U){return B=w(B),B in N?Object.defineProperty(N,B,{value:U,enumerable:!0,configurable:!0,writable:!0}):N[B]=U,N}function w(N){var B=S(N,"string");return d(B)==="symbol"?B:String(B)}function S(N,B){if(d(N)!=="object"||N===null)return N;var U=N[Symbol.toPrimitive];if(U!==void 0){var W=U.call(N,B||"default");if(d(W)!=="object")return W;throw new TypeError("@@toPrimitive must return a primitive value.")}return(B==="string"?String:Number)(N)}var D=function(){function N(){var B=this;b(this,N),T(this,"reset",function(){B.isInitialized=!1,B._testMode=!1,B._currentMeasurementId,B._hasLoadedGA=!1,B._isQueuing=!1,B._queueGtag=[]}),T(this,"_gtag",function(){for(var U=arguments.length,W=new Array(U),L=0;L<U;L++)W[L]=arguments[L];B._testMode||B._isQueuing?B._queueGtag.push(W):e.default.apply(void 0,W)}),T(this,"_loadGA",function(U,W){var L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"https://www.googletagmanager.com/gtag/js";if(!(typeof window>"u"||typeof document>"u")&&!B._hasLoadedGA){var G=document.createElement("script");G.async=!0,G.src="".concat(L,"?id=").concat(U),W&&G.setAttribute("nonce",W),document.body.appendChild(G),window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},B._hasLoadedGA=!0}}),T(this,"_toGtagOptions",function(U){if(!!U){var W={cookieUpdate:"cookie_update",cookieExpires:"cookie_expires",cookieDomain:"cookie_domain",cookieFlags:"cookie_flags",userId:"user_id",clientId:"client_id",anonymizeIp:"anonymize_ip",contentGroup1:"content_group1",contentGroup2:"content_group2",contentGroup3:"content_group3",contentGroup4:"content_group4",contentGroup5:"content_group5",allowAdFeatures:"allow_google_signals",allowAdPersonalizationSignals:"allow_ad_personalization_signals",nonInteraction:"non_interaction",page:"page_path",hitCallback:"event_callback"},L=Object.entries(U).reduce(function(G,X){var V=I(X,2),$=V[0],H=V[1];return W[$]?G[W[$]]=H:G[$]=H,G},{});return L}}),T(this,"initialize",function(U){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!U)throw new Error("Require GA_MEASUREMENT_ID");var L=typeof U=="string"?[{trackingId:U}]:U;B._currentMeasurementId=L[0].trackingId;var G=W.gaOptions,X=W.gtagOptions,V=W.nonce,$=W.testMode,H=$===void 0?!1:$,K=W.gtagUrl;if(B._testMode=H,H||B._loadGA(B._currentMeasurementId,V,K),B.isInitialized||(B._gtag("js",new Date),L.forEach(function(_e){var ue=E(E(E({},B._toGtagOptions(E(E({},G),_e.gaOptions))),X),_e.gtagOptions);Object.keys(ue).length?B._gtag("config",_e.trackingId,ue):B._gtag("config",_e.trackingId)})),B.isInitialized=!0,!H){var ye=c(B._queueGtag);for(B._queueGtag=[],B._isQueuing=!1;ye.length;){var he=ye.shift();B._gtag.apply(B,c(he)),he[0]==="get"&&(B._isQueuing=!0)}}}
87),T(this,"set",function(U){if(!U){console.warn("`fieldsObject` is required in .set()");return}if(d(U)!=="object"){console.warn("Expected `fieldsObject` arg to be an Object");return}Object.keys(U).length===0&&console.warn("empty `fieldsObject` given to .set()"),B._gaCommand("set",U)}),T(this,"_gaCommandSendEvent",function(U,W,L,G,X){B._gtag("event",W,E(E({event_category:U,event_label:L,value:G},X&&{non_interaction:X.nonInteraction}),B._toGtagOptions(X)))}),T(this,"_gaCommandSendEventParameters",function(){for(var U=arguments.length,W=new Array(U),L=0;L<U;L++)W[L]=arguments[L];if(typeof W[0]=="string")B._gaCommandSendEvent.apply(B,c(W.slice(1)));else{var G=W[0],X=G.eventCategory,V=G.eventAction,$=G.eventLabel,H=G.eventValue;G.hitType;var K=a(G,r);B._gaCommandSendEvent(X,V,$,H,K)}}),T(this,"_gaCommandSendTiming",function(U,W,L,G){B._gtag("event","timing_complete",{name:W,value:L,event_category:U,event_label:G})}),T(this,"_gaCommandSendPageview",function(U,W){if(W&&Object.keys(W).length){var L=B._toGtagOptions(W),G=L.title,X=L.location,V=a(L,i);B._gtag("event","page_view",E(E(E(E({},U&&{page_path:U}),G&&{page_title:G}),X&&{page_location:X}),V))}else U?B._gtag("event","page_view",{page_path:U}):B._gtag("event","page_view")}),T(this,"_gaCommandSendPageviewParameters",function(){for(var U=arguments.length,W=new Array(U),L=0;L<U;L++)W[L]=arguments[L];if(typeof W[0]=="string")B._gaCommandSendPageview.apply(B,c(W.slice(1)));else{var G=W[0],X=G.page;G.hitType;var V=a(G,s);B._gaCommandSendPageview(X,V)}}),T(this,"_gaCommandSend",function(){for(var U=arguments.length,W=new Array(U),L=0;L<U;L++)W[L]=arguments[L];var G=typeof W[0]=="string"?W[0]:W[0].hitType;switch(G){case"event":B._gaCommandSendEventParameters.apply(B,W);break;case"pageview":B._gaCommandSendPageviewParameters.apply(B,W);break;case"timing":B._gaCommandSendTiming.apply(B,c(W.slice(1)));break;case"screenview":case"transaction":case"item":case"social":case"exception":console.warn("Unsupported send command: ".concat(G));break;default:console.warn("Send command doesn't exist: ".concat(G))}}),T(this,"_gaCommandSet",function(){for(var U=arguments.length,W=new Array(U),L=0;L<U;L++)W[L]=arguments[L];typeof W[0]=="string"&&(W[0]=T({},W[0],W[1])),B._gtag("set",B._toGtagOptions(W[0]))}),T(this,"_gaCommand",function(U){for(var W=arguments.length,L=new Array(W>1?W-1:0),G=1;G<W;G++)L[G-1]=arguments[G];switch(U){case"send":B._gaCommandSend.apply(B,L);break;case"set":B._gaCommandSet.apply(B,L);break;default:console.warn("Command doesn't exist: ".concat(U))}}),T(this,"ga",function(){for(var U=arguments.length,W=new Array(U),L=0;L<U;L++)W[L]=arguments[L];if(typeof W[0]=="string")B._gaCommand.apply(B,W);else{var G=W[0];B._gtag("get",B._currentMeasurementId,"client_id",function(X){B._isQueuing=!1;var V=B._queueGtag;for(G({get:function(K){return K==="clientId"?X:K==="trackingId"?B._currentMeasurementId:K==="apiVersion"?"1":void 0}});V.length;){var $=V.shift();B._gtag.apply(B,c($))}}),B._isQueuing=!0}return B.ga}),T(this,"event",function(U,W){if(typeof U=="string")B._gtag("event",U,B._toGtagOptions(W));else{var L=U.action,G=U.category,X=U.label,V=U.value,$=U.nonInteraction,H=U.transport;if(!G||!L){console.warn("args.category AND args.action are required in event()");return}var K={hitType:"event",eventCategory:(0,n.default)(G),eventAction:(0,n.default)(L)};X&&(K.eventLabel=(0,n.default)(X)),typeof V<"u"&&(typeof V!="number"?console.warn("Expected `args.value` arg to be a Number."):K.eventValue=V),typeof $<"u"&&(typeof $!="boolean"?console.warn("`args.nonInteraction` must be a boolean."):K.nonInteraction=$),typeof H<"u"&&(typeof H!="string"?console.warn("`args.transport` must be a string."):(["beacon","xhr","image"].indexOf(H)===-1&&console.warn("`args.transport` must be either one of these values: `beacon`, `xhr` or `image`"),K.transport=H)),B._gaCommand("send",K)}}),T(this,"send",function(U){B._gaCommand("send",U)}),this.reset()}return _(N,[{key:"gtag",value:function(){this._gtag.apply(this,arguments)}}]),N}();t.GA4=D;var P=new D;t.default=P})(Pw);(function(t){function e(a){return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},e(a)}
87Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ReactGAImplementation=void 0;var n=i(Pw);function r(a){if(typeof WeakMap!="function")return null;var u=new WeakMap,d=new WeakMap;return(r=function(h){return h?d:u})(a)}function i(a,u){if(!u&&a&&a.__esModule)return a;if(a===null||e(a)!=="object"&&typeof a!="function")return{default:a};var d=r(u);if(d&&d.has(a))return d.get(a);var c={},h=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var p in a)if(p!=="default"&&Object.prototype.hasOwnProperty.call(a,p)){var y=h?Object.getOwnPropertyDescriptor(a,p):null;y&&(y.get||y.set)?Object.defineProperty(c,p,y):c[p]=a[p]}return c.default=a,d&&d.set(a,c),c}var s=n.GA4;t.ReactGAImplementation=s;var o=n.default;t.default=o})(Rw);const Jf=Rp(Rw);/** 88 * @license 89 * Copyright 2017 Google LLC 90 * 91 * Licensed under the Apache License, Version 2.0 (the "License"); 92 * you may not use this file except in compliance with the License. 93 * You may obtain a copy of the License at 94 * 95 * http://www.apache.org/licenses/LICENSE-2.0 96 * 97 * Unless required by applicable law or agreed to in writing, software 98 * distributed under the License is distributed on an "AS IS" BASIS, 99 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 100 * See the License for the specific language governing permissions and 101 * limitations under the License. 102 *//** 103 * @license 104 * Copyright 2017 Google LLC 105 * 106 * Licensed under the Apache License, Version 2.0 (the "License"); 107 * you may not use this file except in compliance with the License. 108 * You may obtain a copy of the License at 109 * 110 * http://www.apache.org/licenses/LICENSE-2.0 111 * 112 * Unless required by applicable law or agreed to in writing, software 113 * distributed under the License is distributed on an "AS IS" BASIS, 114 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 115 * See the License for the specific language governing permissions and 116 * limitations under the License. 117 */const bw=function(t){const e=[];let n=0;for(let r=0;r<t.length;r++){let i=t.charCodeAt(r);i<128?e[n++]=i:i<2048?(e[n++]=i>>6|192,e[n++]=i&63|128):(i&64512)===55296&&r+1<t.length&&(t.charCodeAt(r+1)&64512)===56320?(i=65536+((i&1023)<<10)+(t.charCodeAt(++r)&1023),e[n++]=i>>18|240,e[n++]=i>>12&63|128,e[n++]=i>>6&63|128,e[n++]=i&63|128):(e[n++]=i>>12|224,e[n++]=i>>6&63|128,e[n++]=i&63|128)}return e},LD=function(t){const e=[];let n=0,r=0;for(;n<t.length;){const i=t[n++];if(i<128)e[r++]=String.fromCharCode(i);else if(i>191&&i<224){const s=t[n++];e[r++]=String.fromCharCode((i&31)<<6|s&63)}else if(i>239&&i<365){const s=t[n++],o=t[n++],a=t[n++],u=((i&7)<<18|(s&63)<<12|(o&63)<<6|a&63)-65536;e[r++]=String.fromCharCode(55296+(u>>10)),e[r++]=String.fromCharCode(56320+(u&1023))}else{const s=t[n++],o=t[n++];e[r++]=String.fromCharCode((i&15)<<12|(s&63)<<6|o&63)}}return e.join("")},Fw={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let i=0;i<t.length;i+=3){const s=t[i],o=i+1<t.length,a=o?t[i+1]:0,u=i+2<t.length,d=u?t[i+2]:0,c=s>>2,h=(s&3)<<4|a>>4;let p=(a&15)<<2|d>>6,y=d&63;u||(y=64,o||(p=64)),r.push(n[c],n[h],n[p],n[y])}return r.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(bw(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):LD(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();const n=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let i=0;i<t.length;){const s=n[t.charAt(i++)],a=i<t.length?n[t.charAt(i)]:0;++i;const d=i<t.length?n[t.charAt(i)]:64;++i;const h=i<t.length?n[t.charAt(i)]:64;if(++i,s==null||a==null||d==null||h==null)throw new MD;const p=s<<2|a>>4;if(r.push(p),d!==64){const y=a<<4&240|d>>2;if(r.push(y),h!==64){const v=d<<6&192|h;r.push(v)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let t=0;t<this.ENCODED_VALS.length;t++)this.byteToCharMap_[t]=this.ENCODED_VALS.charAt(t),this.charToByteMap_[this.byteToCharMap_[t]]=t,this.byteToCharMapWebSafe_[t]=this.ENCODED_VALS_WEBSAFE.charAt(t),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[t]]=t,t>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}};
117class MD extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const VD=function(t){const e=bw(t);return Fw.encodeByteArray(e,!0)},Xc=function(t){return VD(t).replace(/\./g,"")},Nw=function(t){try{return Fw.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};/** 118 * @license 119 * Copyright 2022 Google LLC 120 * 121 * Licensed under the Apache License, Version 2.0 (the "License"); 122 * you may not use this file except in compliance with the License. 123 * You may obtain a copy of the License at 124 * 125 * http://www.apache.org/licenses/LICENSE-2.0 126 * 127 * Unless required by applicable law or agreed to in writing, software 128 * distributed under the License is distributed on an "AS IS" BASIS, 129 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 130 * See the License for the specific language governing permissions and 131 * limitations under the License. 132 */function UD(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}/** 133 * @license 134 * Copyright 2022 Google LLC 135 * 136 * Licensed under the Apache License, Version 2.0 (the "License"); 137 * you may not use this file except in compliance with the License. 138 * You may obtain a copy of the License at 139 * 140 * http://www.apache.org/licenses/LICENSE-2.0 141 * 142 * Unless required by applicable law or agreed to in writing, software 143 * distributed under the License is distributed on an "AS IS" BASIS, 144 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 145 * See the License for the specific language governing permissions and 146 * limitations under the License. 147 */const $D=()=>UD().__FIREBASE_DEFAULTS__,zD=()=>{if(typeof process>"u"||typeof process.env>"u")return;const t=process.env.__FIREBASE_DEFAULTS__;if(t)return JSON.parse(t)},jD=()=>{if(typeof document>"u")return;let t;try{t=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const e=t&&Nw(t[1]);return e&&JSON.parse(e)},Vd=()=>{try{return $D()||zD()||jD()}catch(t){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${t}`);return}},Bw=t=>{var e,n;return(n=(e=Vd())===null||e===void 0?void 0:e.emulatorHosts)===null||n===void 0?void 0:n[t]},HD=t=>{const e=Bw(t);if(!e)return;const n=e.lastIndexOf(":");if(n<=0||n+1===e.length)throw new Error(`Invalid host ${e} with no separate hostname and port!`);const r=parseInt(e.substring(n+1),10);return e[0]==="["?[e.substring(1,n-1),r]:[e.substring(0,n),r]},Ow=()=>{var t;return(t=Vd())===null||t===void 0?void 0:t.config},Lw=t=>{var e;return(e=Vd())===null||e===void 0?void 0:e[`_${t}`]};/** 148 * @license 149 * Copyright 2017 Google LLC 150 * 151 * Licensed under the Apache License, Version 2.0 (the "License"); 152 * you may not use this file except in compliance with the License. 153 * You may obtain a copy of the License at 154 * 155 * http://www.apache.org/licenses/LICENSE-2.0 156 * 157 * Unless required by applicable law or agreed to in writing, software 158 * distributed under the License is distributed on an "AS IS" BASIS, 159 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 160 * See the License for the specific language governing permissions and 161 * limitations under the License. 162 */class qD{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,n)=>{this.resolve=e,this.reject=n})}wrapCallback(e){return(n,r)=>{n?this.reject(n):this.resolve(r),typeof e=="function"&&(this.promise.catch(()=>{}),e.length===1?e(n):e(n,r))}}}/** 163 * @license 164 * Copyright 2021 Google LLC 165 * 166 * Licensed under the Apache License, Version 2.0 (the "License"); 167 * you may not use this file except in compliance with the License. 168 * You may obtain a copy of the License at 169 * 170 * http://www.apache.org/licenses/LICENSE-2.0 171 * 172 * Unless required by applicable law or agreed to in writing, software 173 * distributed under the License is distributed on an "AS IS" BASIS, 174 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 175 * See the License for the specific language governing permissions and 176 * limitations under the License. 177 */function WD(t,e){if(t.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const n={alg:"none",type:"JWT"},r=e||"demo-project",i=t.iat||0,s=t.sub||t.user_id;if(!s)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const o=Object.assign({iss:`https://securetoken.google.com/${r}`,aud:r,iat:i,exp:i+3600,auth_time:i,sub:s,user_id:s,firebase:{sign_in_provider:"custom",identities:{}}},t),a="";return[Xc(JSON.stringify(n)),Xc(JSON.stringify(o)),a].join(".")}/** 178 * @license 179 * Copyright 2017 Google LLC 180 * 181 * Licensed under the Apache License, Version 2.0 (the "License");
182 * you may not use this file except in compliance with the License. 183 * You may obtain a copy of the License at 184 * 185 * http://www.apache.org/licenses/LICENSE-2.0 186 * 187 * Unless required by applicable law or agreed to in writing, software 188 * distributed under the License is distributed on an "AS IS" BASIS, 189 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 190 * See the License for the specific language governing permissions and 191 * limitations under the License. 192 */function Ot(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function GD(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(Ot())}function KD(){var t;const e=(t=Vd())===null||t===void 0?void 0:t.forceEnvironment;if(e==="node")return!0;if(e==="browser")return!1;try{return Object.prototype.toString.call(global.process)==="[object process]"}catch{return!1}}function QD(){const t=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof t=="object"&&t.id!==void 0}function XD(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function YD(){const t=Ot();return t.indexOf("MSIE ")>=0||t.indexOf("Trident/")>=0}function JD(){return!KD()&&!!navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function ZD(){try{return typeof indexedDB=="object"}catch{return!1}}function e8(){return new Promise((t,e)=>{try{let n=!0;const r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),n||self.indexedDB.deleteDatabase(r),t(!0)},i.onupgradeneeded=()=>{n=!1},i.onerror=()=>{var s;e(((s=i.error)===null||s===void 0?void 0:s.message)||"")}}catch(n){e(n)}})}/** 193 * @license 194 * Copyright 2017 Google LLC 195 * 196 * Licensed under the Apache License, Version 2.0 (the "License"); 197 * you may not use this file except in compliance with the License. 198 * You may obtain a copy of the License at 199 * 200 * http://www.apache.org/licenses/LICENSE-2.0 201 * 202 * Unless required by applicable law or agreed to in writing, software 203 * distributed under the License is distributed on an "AS IS" BASIS, 204 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 205 * See the License for the specific language governing permissions and 206 * limitations under the License. 207 */const t8="FirebaseError";class Wr extends Error{constructor(e,n,r){super(n),this.code=e,this.customData=r,this.name=t8,Object.setPrototypeOf(this,Wr.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,Wl.prototype.create)}}class Wl{constructor(e,n,r){this.service=e,this.serviceName=n,this.errors=r}create(e,...n){const r=n[0]||{},i=`${this.service}/${e}`,s=this.errors[e],o=s?n8(s,r):"Error",a=`${this.serviceName}: ${o} (${i}).`;return new Wr(i,a,r)}}function n8(t,e){return t.replace(r8,(n,r)=>{const i=e[r];return i!=null?String(i):`<${r}?>`})}const r8=/\{\$([^}]+)}/g;function i8(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}function Yc(t,e){if(t===e)return!0;const n=Object.keys(t),r=Object.keys(e);for(const i of n){if(!r.includes(i))return!1;const s=t[i],o=e[i];if(ax(s)&&ax(o)){if(!Yc(s,o))return!1}else if(s!==o)return!1}for(const i of r)if(!n.includes(i))return!1;return!0}function ax(t){return t!==null&&typeof t=="object"}/** 208 * @license 209 * Copyright 2017 Google LLC 210 * 211 * Licensed under the Apache License, Version 2.0 (the "License"); 212 * you may not use this file except in compliance with the License. 213 * You may obtain a copy of the License at 214 * 215 * http://www.apache.org/licenses/LICENSE-2.0 216 * 217 * Unless required by applicable law or agreed to in writing, software 218 * distributed under the License is distributed on an "AS IS" BASIS, 219 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 220 * See the License for the specific language governing permissions and 221 * limitations under the License. 222 */function Gl(t){const e=[];for(const[n,r]of Object.entries(t))Array.isArray(r)?r.forEach(i=>
222{e.push(encodeURIComponent(n)+"="+encodeURIComponent(i))}):e.push(encodeURIComponent(n)+"="+encodeURIComponent(r));return e.length?"&"+e.join("&"):""}function za(t){const e={};return t.replace(/^\?/,"").split("&").forEach(r=>{if(r){const[i,s]=r.split("=");e[decodeURIComponent(i)]=decodeURIComponent(s)}}),e}function ja(t){const e=t.indexOf("?");if(!e)return"";const n=t.indexOf("#",e);return t.substring(e,n>0?n:void 0)}function s8(t,e){const n=new o8(t,e);return n.subscribe.bind(n)}class o8{constructor(e,n){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=n,this.task.then(()=>{e(this)}).catch(r=>{this.error(r)})}next(e){this.forEachObserver(n=>{n.next(e)})}error(e){this.forEachObserver(n=>{n.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,n,r){let i;if(e===void 0&&n===void 0&&r===void 0)throw new Error("Missing Observer.");a8(e,["next","error","complete"])?i=e:i={next:e,error:n,complete:r},i.next===void 0&&(i.next=P0),i.error===void 0&&(i.error=P0),i.complete===void 0&&(i.complete=P0);const s=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?i.error(this.finalError):i.complete()}catch{}}),this.observers.push(i),s}unsubscribeOne(e){this.observers===void 0||this.observers[e]===void 0||(delete this.observers[e],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let n=0;n<this.observers.length;n++)this.sendOne(n,e)}sendOne(e,n){this.task.then(()=>{if(this.observers!==void 0&&this.observers[e]!==void 0)try{n(this.observers[e])}catch(r){typeof console<"u"&&console.error&&console.error(r)}})}close(e){this.finalized||(this.finalized=!0,e!==void 0&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function a8(t,e){if(typeof t!="object"||t===null)return!1;for(const n of e)if(n in t&&typeof t[n]=="function")return!0;return!1}function P0(){}/** 223 * @license 224 * Copyright 2021 Google LLC 225 * 226 * Licensed under the Apache License, Version 2.0 (the "License"); 227 * you may not use this file except in compliance with the License. 228 * You may obtain a copy of the License at 229 * 230 * http://www.apache.org/licenses/LICENSE-2.0 231 * 232 * Unless required by applicable law or agreed to in writing, software 233 * distributed under the License is distributed on an "AS IS" BASIS, 234 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 235 * See the License for the specific language governing permissions and 236 * limitations under the License. 237 */function xt(t){return t&&t._delegate?t._delegate:t}class Is{constructor(e,n,r){this.name=e,this.instanceFactory=n,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}/** 238 * @license 239 * Copyright 2019 Google LLC 240 * 241 * Licensed under the Apache License, Version 2.0 (the "License"); 242 * you may not use this file except in compliance with the License. 243 * You may obtain a copy of the License at 244 * 245 * http://www.apache.org/licenses/LICENSE-2.0 246 * 247 * Unless required by applicable law or agreed to in writing, software 248 * distributed under the License is distributed on an "AS IS" BASIS, 249 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 250 * See the License for the specific language governing permissions and 251 * limitations under the License. 252 */const as="[DEFAULT]";/** 253 * @license 254 * Copyright 2019 Google LLC 255 * 256 * Licensed under the Apache License, Version 2.0 (the "License"); 257 * you may not use this file except in compliance with the License. 258 * You may obtain a copy of the License at 259 * 260 * http://www.apache.org/licenses/LICENSE-2.0 261 * 262 * Unless required by applicable law or agreed to in writing, softw
262are 263 * distributed under the License is distributed on an "AS IS" BASIS, 264 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 265 * See the License for the specific language governing permissions and 266 * limitations under the License. 267 */class l8{constructor(e,n){this.name=e,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const n=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(n)){const r=new qD;if(this.instancesDeferred.set(n,r),this.isInitialized(n)||this.shouldAutoInitialize())try{const i=this.getOrInitializeService({instanceIdentifier:n});i&&r.resolve(i)}catch{}}return this.instancesDeferred.get(n).promise}getImmediate(e){var n;const r=this.normalizeInstanceIdentifier(e==null?void 0:e.identifier),i=(n=e==null?void 0:e.optional)!==null&&n!==void 0?n:!1;if(this.isInitialized(r)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:r})}catch(s){if(i)return null;throw s}else{if(i)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,!!this.shouldAutoInitialize()){if(c8(e))try{this.getOrInitializeService({instanceIdentifier:as})}catch{}for(const[n,r]of this.instancesDeferred.entries()){const i=this.normalizeInstanceIdentifier(n);try{const s=this.getOrInitializeService({instanceIdentifier:i});r.resolve(s)}catch{}}}}clearInstance(e=as){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter(n=>"INTERNAL"in n).map(n=>n.INTERNAL.delete()),...e.filter(n=>"_delete"in n).map(n=>n._delete())])}isComponentSet(){return this.component!=null}isInitialized(e=as){return this.instances.has(e)}getOptions(e=as){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:n={}}=e,r=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const i=this.getOrInitializeService({instanceIdentifier:r,options:n});for(const[s,o]of this.instancesDeferred.entries()){const a=this.normalizeInstanceIdentifier(s);r===a&&o.resolve(i)}return i}onInit(e,n){var r;const i=this.normalizeInstanceIdentifier(n),s=(r=this.onInitCallbacks.get(i))!==null&&r!==void 0?r:new Set;s.add(e),this.onInitCallbacks.set(i,s);const o=this.instances.get(i);return o&&e(o,i),()=>{s.delete(e)}}invokeOnInitCallbacks(e,n){const r=this.onInitCallbacks.get(n);if(!!r)for(const i of r)try{i(e,n)}catch{}}getOrInitializeService({instanceIdentifier:e,options:n={}}){let r=this.instances.get(e);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:u8(e),options:n}),this.instances.set(e,r),this.instancesOptions.set(e,n),this.invokeOnInitCallbacks(r,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,r)}catch{}return r||null}normalizeInstanceIdentifier(e=as){return this.component?this.component.multipleInstances?e:as:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function u8(t){return t===as?void 0:t}function c8(t){return t.instantiationMode==="EAGER"}/** 268 * @license 269 * Copyright 2019 Google LLC 270 * 271 * Licensed under the Apache License, Version 2.0 (the "License"); 272 * you may not use this file except in compliance with the License. 273 * You may obtain a copy of the License at 274 * 275 * http://www.apache.org/licenses/LICENSE-2.0 276 * 277 * Unless required by applicable law or agreed to in writing, software 278 * distributed under the License is distributed on an "AS IS" BASIS, 279 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 280 * See the License for the specific language governing permissions and 281 * limitations under the License. 282 */class d8{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const n=this.getProvider(e.name);if(n.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);n.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const n=new l8(e,this);return this.providers.set(e,n),n}getProviders(){return Array.from(this.providers.values())}}/** 283 * @license 284 * Copyright 2017 Google LLC 285 * 286 * Licensed under the Apache License, Version 2.0 (the "License");
287 * you may not use this file except in compliance with the License. 288 * You may obtain a copy of the License at 289 * 290 * http://www.apache.org/licenses/LICENSE-2.0 291 * 292 * Unless required by applicable law or agreed to in writing, software 293 * distributed under the License is distributed on an "AS IS" BASIS, 294 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 295 * See the License for the specific language governing permissions and 296 * limitations under the License. 297 */var Te;(function(t){t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT"})(Te||(Te={}));const h8={debug:Te.DEBUG,verbose:Te.VERBOSE,info:Te.INFO,warn:Te.WARN,error:Te.ERROR,silent:Te.SILENT},f8=Te.INFO,p8={[Te.DEBUG]:"log",[Te.VERBOSE]:"log",[Te.INFO]:"info",[Te.WARN]:"warn",[Te.ERROR]:"error"},m8=(t,e,...n)=>{if(e<t.logLevel)return;const r=new Date().toISOString(),i=p8[e];if(i)console[i](`[${r}] ${t.name}:`,...n);else throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)};class Lm{constructor(e){this.name=e,this._logLevel=f8,this._logHandler=m8,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in Te))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?h8[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if(typeof e!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,Te.DEBUG,...e),this._logHandler(this,Te.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,Te.VERBOSE,...e),this._logHandler(this,Te.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,Te.INFO,...e),this._logHandler(this,Te.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,Te.WARN,...e),this._logHandler(this,Te.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,Te.ERROR,...e),this._logHandler(this,Te.ERROR,...e)}}const g8=(t,e)=>e.some(n=>t instanceof n);let lx,ux;function y8(){return lx||(lx=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function v8(){return ux||(ux=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Mw=new WeakMap,Zf=new WeakMap,Vw=new WeakMap,k0=new WeakMap,Mm=new WeakMap;function x8(t){const e=new Promise((n,r)=>{const i=()=>{t.removeEventListener("success",s),t.removeEventListener("error",o)},s=()=>{n(Ri(t.result)),i()},o=()=>{r(t.error),i()};t.addEventListener("success",s),t.addEventListener("error",o)});return e.then(n=>{n instanceof IDBCursor&&Mw.set(n,t)}).catch(()=>{}),Mm.set(e,t),e}function _8(t){if(Zf.has(t))return;const e=new Promise((n,r)=>{const i=()=>{t.removeEventListener("complete",s),t.removeEventListener("error",o),t.removeEventListener("abort",o)},s=()=>{n(),i()},o=()=>{r(t.error||new DOMException("AbortError","AbortError")),i()};t.addEventListener("complete",s),t.addEventListener("error",o),t.addEventListener("abort",o)});Zf.set(t,e)}let ep={get(t,e,n){if(t instanceof IDBTransaction){if(e==="done")return Zf.get(t);if(e==="objectStoreNames")return t.objectStoreNames||Vw.get(t);if(e==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Ri(t[e])},set(t,e,n){return t[e]=n,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function E8(t){ep=t(ep)}function w8(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...n){const r=t.call(D0(this),e,...n);return Vw.set(r,e.sort?e.sort():[e]),Ri(r)}:v8().includes(t)?function(...e){return t.apply(D0(this),e),Ri(Mw.get(this))}:function(...e){return Ri(t.apply(D0(this),e))}}function A8(t){return typeof t=="function"?w8(t):(t instanceof IDBTransaction&&_8(t),g8(t,y8())?new Proxy(t,ep):t)}function Ri(t){if(t instanceof IDBRequest)return x8(t);if(k0.has(t))return k0.get(t);
297const e=A8(t);return e!==t&&(k0.set(t,e),Mm.set(e,t)),e}const D0=t=>Mm.get(t);function C8(t,e,{blocked:n,upgrade:r,blocking:i,terminated:s}={}){const o=indexedDB.open(t,e),a=Ri(o);return r&&o.addEventListener("upgradeneeded",u=>{r(Ri(o.result),u.oldVersion,u.newVersion,Ri(o.transaction),u)}),n&&o.addEventListener("blocked",u=>n(u.oldVersion,u.newVersion,u)),a.then(u=>{s&&u.addEventListener("close",()=>s()),i&&u.addEventListener("versionchange",d=>i(d.oldVersion,d.newVersion,d))}).catch(()=>{}),a}const T8=["get","getKey","getAll","getAllKeys","count"],I8=["put","add","delete","clear"],b0=new Map;function cx(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(b0.get(e))return b0.get(e);const n=e.replace(/FromIndex$/,""),r=e!==n,i=I8.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||T8.includes(n)))return;const s=async function(o,...a){const u=this.transaction(o,i?"readwrite":"readonly");let d=u.store;return r&&(d=d.index(a.shift())),(await Promise.all([d[n](...a),i&&u.done]))[0]};return b0.set(e,s),s}E8(t=>({...t,get:(e,n,r)=>cx(e,n)||t.get(e,n,r),has:(e,n)=>!!cx(e,n)||t.has(e,n)}));/** 298 * @license 299 * Copyright 2019 Google LLC 300 * 301 * Licensed under the Apache License, Version 2.0 (the "License"); 302 * you may not use this file except in compliance with the License. 303 * You may obtain a copy of the License at 304 * 305 * http://www.apache.org/licenses/LICENSE-2.0 306 * 307 * Unless required by applicable law or agreed to in writing, software 308 * distributed under the License is distributed on an "AS IS" BASIS, 309 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 310 * See the License for the specific language governing permissions and 311 * limitations under the License. 312 */class S8{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(n=>{if(R8(n)){const r=n.getImmediate();return`${r.library}/${r.version}`}else return null}).filter(n=>n).join(" ")}}function R8(t){const e=t.getComponent();return(e==null?void 0:e.type)==="VERSION"}const tp="@firebase/app",dx="0.10.5";/** 313 * @license 314 * Copyright 2019 Google LLC 315 * 316 * Licensed under the Apache License, Version 2.0 (the "License"); 317 * you may not use this file except in compliance with the License. 318 * You may obtain a copy of the License at 319 * 320 * http://www.apache.org/licenses/LICENSE-2.0 321 * 322 * Unless required by applicable law or agreed to in writing, software 323 * distributed under the License is distributed on an "AS IS" BASIS, 324 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 325 * See the License for the specific language governing permissions and 326 * limitations under the License. 327 */const Ss=new Lm("@firebase/app"),P8="@firebase/app-compat",k8="@firebase/analytics-compat",D8="@firebase/analytics",b8="@firebase/app-check-compat",F8="@firebase/app-check",N8="@firebase/auth",B8="@firebase/auth-compat",O8="@firebase/database",L8="@firebase/database-compat",M8="@firebase/functions",V8="@firebase/functions-compat",U8="@firebase/installations",$8="@firebase/installations-compat",z8="@firebase/messaging",j8="@firebase/messaging-compat",H8="@firebase/performance",q8="@firebase/performance-compat",W8="@firebase/remote-config",G8="@firebase/remote-config-compat",K8="@firebase/storage",Q8="@firebase/storage-compat",X8="@firebase/firestore",Y8="@firebase/vertexai-preview",J8="@firebase/firestore-compat",Z8="firebase",e6="10.12.2";/** 328 * @license 329 * Copyright 2019 Google LLC 330 * 331 * Licensed under the Apache License, Version 2.0 (the "License"); 332 * you may not use this file except in compliance with the License. 333 * You may obtain a copy of the License at 334 * 335 * http://www.apache.org/licenses/LICENSE-2.0 336 * 337 * Unless required by applicable law or agreed to in writing, software 338 * distributed under the License is distributed on an "AS IS" BASIS, 339 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 340 * See the License for the specific language governing permissions and 341 * limitations under the License. 342 */const np="[DEFAULT]",t6={[tp]:"fire-core",[P8]:"fire-core-compat",[D8]:"fire-analytics",[k8]:"fire-analytics-compat",[F8]:"fire-app-check",[b8]:"fire-app-check-compat",[N8]:"fire-auth",[B8]:"fire-auth-compat",[O8]:"fire-rtdb",[L8]:"fire-rtdb-compat",[M8]:"fire-fn",[V8]:"fire-fn-compat",[U8]:"fire-iid",[$8]:"fire-iid-compat",[z8]:"fire-fcm",[j8]:"fire-fcm-compat",[H8]:"fire-perf",[q8]:"fire-perf-compat",[W8]:"fire-rc",[G8]:"fire-rc-compat",[K8]:"fire-g
342cs",[Q8]:"fire-gcs-compat",[X8]:"fire-fst",[J8]:"fire-fst-compat",[Y8]:"fire-vertex","fire-js":"fire-js",[Z8]:"fire-js-all"};/** 343 * @license 344 * Copyright 2019 Google LLC 345 * 346 * Licensed under the Apache License, Version 2.0 (the "License"); 347 * you may not use this file except in compliance with the License. 348 * You may obtain a copy of the License at 349 * 350 * http://www.apache.org/licenses/LICENSE-2.0 351 * 352 * Unless required by applicable law or agreed to in writing, software 353 * distributed under the License is distributed on an "AS IS" BASIS, 354 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 355 * See the License for the specific language governing permissions and 356 * limitations under the License. 357 */const Jc=new Map,n6=new Map,rp=new Map;function hx(t,e){try{t.container.addComponent(e)}catch(n){Ss.debug(`Component ${e.name} failed to register with FirebaseApp ${t.name}`,n)}}function Mo(t){const e=t.name;if(rp.has(e))return Ss.debug(`There were multiple attempts to register component ${e}.`),!1;rp.set(e,t);for(const n of Jc.values())hx(n,t);for(const n of n6.values())hx(n,t);return!0}function Vm(t,e){const n=t.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),t.container.getProvider(e)}function pr(t){return t.settings!==void 0}/** 358 * @license 359 * Copyright 2019 Google LLC 360 * 361 * Licensed under the Apache License, Version 2.0 (the "License"); 362 * you may not use this file except in compliance with the License. 363 * You may obtain a copy of the License at 364 * 365 * http://www.apache.org/licenses/LICENSE-2.0 366 * 367 * Unless required by applicable law or agreed to in writing, software 368 * distributed under the License is distributed on an "AS IS" BASIS, 369 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 370 * See the License for the specific language governing permissions and 371 * limitations under the License. 372 */const r6={["no-app"]:"No Firebase App '{$appName}' has been created - call initializeApp() first",["bad-app-name"]:"Illegal App name: '{$appName}'",["duplicate-app"]:"Firebase App named '{$appName}' already exists with different options or config",["app-deleted"]:"Firebase App named '{$appName}' already deleted",["server-app-deleted"]:"Firebase Server App has been deleted",["no-options"]:"Need to provide options, when not being deployed to hosting via source.",["invalid-app-argument"]:"firebase.{$appName}() takes either no argument or a Firebase App instance.",["invalid-log-argument"]:"First argument to `onLog` must be null or a function.",["idb-open"]:"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.",["idb-get"]:"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.",["idb-set"]:"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.",["idb-delete"]:"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.",["finalization-registry-not-supported"]:"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.",["invalid-server-app-environment"]:"FirebaseServerApp is not for use in browser environments."},Pi=new Wl("app","Firebase",r6);/** 373 * @license 374 * Copyright 2019 Google LLC 375 * 376 * Licensed under the Apache License, Version 2.0 (the "License"); 377 * you may not use this file except in compliance with the License. 378 * You may obtain a copy of the License at 379 * 380 * http://www.apache.org/licenses/LICENSE-2.0 381 * 382 * Unless required by applicable law or agreed to in writing, software 383 * distributed under the License is distributed on an "AS IS" BASIS, 384 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 385 * See the License for the specific language governing permissions and 386 * limitations under the License. 387 */class i6{constructor(e,n,r){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},n),this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new Is("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw Pi.create("app-deleted",{appName:this._name})}}/** 388 * @license 389 * Copyright 2019 Google LLC 390 * 391 * Licensed under the Apache License, Version 2.0 (the "License");
392 * you may not use this file except in compliance with the License. 393 * You may obtain a copy of the License at 394 * 395 * http://www.apache.org/licenses/LICENSE-2.0 396 * 397 * Unless required by applicable law or agreed to in writing, software 398 * distributed under the License is distributed on an "AS IS" BASIS, 399 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 400 * See the License for the specific language governing permissions and 401 * limitations under the License. 402 */const ta=e6;function Uw(t,e={}){let n=t;typeof e!="object"&&(e={name:e});const r=Object.assign({name:np,automaticDataCollectionEnabled:!1},e),i=r.name;if(typeof i!="string"||!i)throw Pi.create("bad-app-name",{appName:String(i)});if(n||(n=Ow()),!n)throw Pi.create("no-options");const s=Jc.get(i);if(s){if(Yc(n,s.options)&&Yc(r,s.config))return s;throw Pi.create("duplicate-app",{appName:i})}const o=new d8(i);for(const u of rp.values())o.addComponent(u);const a=new i6(n,r,o);return Jc.set(i,a),a}function $w(t=np){const e=Jc.get(t);if(!e&&t===np&&Ow())return Uw();if(!e)throw Pi.create("no-app",{appName:t});return e}function ki(t,e,n){var r;let i=(r=t6[t])!==null&&r!==void 0?r:t;n&&(i+=`-${n}`);const s=i.match(/\s|\//),o=e.match(/\s|\//);if(s||o){const a=[`Unable to register library "${i}" with version "${e}":`];s&&a.push(`library name "${i}" contains illegal characters (whitespace or "/")`),s&&o&&a.push("and"),o&&a.push(`version name "${e}" contains illegal characters (whitespace or "/")`),Ss.warn(a.join(" "));return}Mo(new Is(`${i}-version`,()=>({library:i,version:e}),"VERSION"))}/** 403 * @license 404 * Copyright 2021 Google LLC 405 * 406 * Licensed under the Apache License, Version 2.0 (the "License"); 407 * you may not use this file except in compliance with the License. 408 * You may obtain a copy of the License at 409 * 410 * http://www.apache.org/licenses/LICENSE-2.0 411 * 412 * Unless required by applicable law or agreed to in writing, software 413 * distributed under the License is distributed on an "AS IS" BASIS, 414 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 415 * See the License for the specific language governing permissions and 416 * limitations under the License. 417 */const s6="firebase-heartbeat-database",o6=1,Pl="firebase-heartbeat-store";let F0=null;function zw(){return F0||(F0=C8(s6,o6,{upgrade:(t,e)=>{switch(e){case 0:try{t.createObjectStore(Pl)}catch(n){console.warn(n)}}}}).catch(t=>{throw Pi.create("idb-open",{originalErrorMessage:t.message})})),F0}async function a6(t){try{const n=(await zw()).transaction(Pl),r=await n.objectStore(Pl).get(jw(t));return await n.done,r}catch(e){if(e instanceof Wr)Ss.warn(e.message);else{const n=Pi.create("idb-get",{originalErrorMessage:e==null?void 0:e.message});Ss.warn(n.message)}}}async function fx(t,e){try{const r=(await zw()).transaction(Pl,"readwrite");await r.objectStore(Pl).put(e,jw(t)),await r.done}catch(n){if(n instanceof Wr)Ss.warn(n.message);else{const r=Pi.create("idb-set",{originalErrorMessage:n==null?void 0:n.message});Ss.warn(r.message)}}}function jw(t){return`${t.name}!${t.options.appId}`}/** 418 * @license 419 * Copyright 2021 Google LLC 420 * 421 * Licensed under the Apache License, Version 2.0 (the "License"); 422 * you may not use this file except in compliance with the License. 423 * You may obtain a copy of the License at 424 * 425 * http://www.apache.org/licenses/LICENSE-2.0 426 * 427 * Unless required by applicable law or agreed to in writing, software 428 * distributed under the License is distributed on an "AS IS" BASIS, 429 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 430 * See the License for the specific language governing permissions and 431 * limitations under the License. 432 */const l6=1024,u6=30*24*60*60*1e3;class c6{constructor(e){this.container=e,this._heartbeatsCache=null;const n=this.container.getProvider("app").getImmediate();this._storage=new h6(n),this._heartbeatsCachePromise=this._storage.read().then(r=>(this._heartbeatsCache=r,r))}async triggerHeartbeat(){var e,n;const i=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),s=px();if(!(((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,((n=this._heartbeatsCache)===null||n===void 0?void 0:n.heartbeats)==null))&&!(this._heartbeatsCache.lastSentHeartbeatDate===s||this._heartbeatsCache.heartbeats.some(o=>o.date===s)))return this._heartbeatsCache.heartbeats.push({date:s,agent:i}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(o=>{const a=new Date(o.date).valueOf();return Date.now()-a<=u6}),this._storage.overwrite(this._heartbeatsCache)}async getHeartbeatsHeader(){var e;if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";const n=px(),{heartbeatsToSend:r,unsentEntries:i}=d6(this._heartbeatsCache.heartbeats),s=Xc(JSON.stringify({version:2,heartbeats:r}));return this._heartbeatsCache.lastSentHeartbeatDate=n,i.length>0?(this._heartbeatsCache.heartbeats=i,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),s}}function px(){return new Date().toISOString().substring(0,10)}function d6(t,e=l6){const n=[];let r=t.slice();for(const i of t){const s=n.find(o=>o.agent===i.agent);if(s){if(s.dates.push(i.date),mx(n)>e){s.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),mx(n)>e){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}class h6{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return ZD()?e8().then(()=>!0).catch(()=>!1):!1}async read(){if(await this._canUseIndexedDBPromise){const n=await a6(this.app);return n!=null&&n.heartbeats?n:{heartbeats:[]}}else return{heartbeats:[]}}async overwrite(e){var n;if(await this._canUseIndexedDBPromise){const i=await this.read();return fx(this.app,{lastSentHeartbeatDate:(n=e.lastSentHeartbeatDate)!==null&&n!==void 0?n:i.lastSentHeartbeatDate,heartbeats:e.heartbeats})}else return}async add(e){var n;if(await this._canUseIndexedDBPromise){const i=await this.read();return fx(this.app,{lastSentHeartbeatDate:(n=e.lastSentHeartbeatDate)!==null&&n!==void 0?n:i.lastSentHeartbeatDate,heartbeats:[...i.heartbeats,...e.heartbeats]})}else return}}function mx(t){return Xc(JSON.stringify({version:2,heartbeats:t})).length}/** 433 * @license 434 * Copyright 2019 Google LLC 435 * 436 * Licensed under the Apache License, Version 2.0 (the "License");
437 * you may not use this file except in compliance with the License. 438 * You may obtain a copy of the License at 439 * 440 * http://www.apache.org/licenses/LICENSE-2.0 441 * 442 * Unless required by applicable law or agreed to in writing, software 443 * distributed under the License is distributed on an "AS IS" BASIS, 444 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 445 * See the License for the specific language governing permissions and 446 * limitations under the License. 447 */function f6(t){Mo(new Is("platform-logger",e=>new S8(e),"PRIVATE")),Mo(new Is("heartbeat",e=>new c6(e),"PRIVATE")),ki(tp,dx,t),ki(tp,dx,"esm2017"),ki("fire-js","")}f6("");var p6="firebase",m6="10.12.2";/** 448 * @license 449 * Copyright 2020 Google LLC 450 * 451 * Licensed under the Apache License, Version 2.0 (the "License"); 452 * you may not use this file except in compliance with the License. 453 * You may obtain a copy of the License at 454 * 455 * http://www.apache.org/licenses/LICENSE-2.0 456 * 457 * Unless required by applicable law or agreed to in writing, software 458 * distributed under the License is distributed on an "AS IS" BASIS, 459 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 460 * See the License for the specific language governing permissions and 461 * limitations under the License. 462 */ki(p6,m6,"app");function Um(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function Hw(){return{["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."}}const g6=Hw,qw=new Wl("auth","Firebase",Hw());/** 463 * @license 464 * Copyright 2020 Google LLC 465 * 466 * Licensed under the Apache License, Version 2.0 (the "License"); 467 * you may not use this file except in compliance with the License. 468 * You may obtain a copy of the License at 469 * 470 * http://www.apache.org/licenses/LICENSE-2.0 471 * 472 * Unless required by applicable law or agreed to in writing, software 473 * distributed under the License is distributed on an "AS IS" BASIS, 474 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 475 * See the License for the specific language governing permissions and 476 * limitations under the License. 477 */const Zc=new Lm("@firebase/auth");function y6(t,...e){Zc.logLevel<=Te.WARN&&Zc.warn(`Auth (${ta}): ${t}`,...e)}function pc(t,...e){Zc.logLevel<=Te.ERROR&&Zc.error(`Auth (${ta}): ${t}`,...e)}/** 478 * @license 479 * Copyright 2020 Google LLC 480 * 481 * Licensed under the Apache License, Version 2.0 (the "License"); 482 * you may not use this file except in compliance with the License. 483 * You may obtain a copy of the License at 484 * 485 * http://www.apache.org/licenses/LICENSE-2.0 486 * 487 * Unless required by applicable law or agreed to in writing, software 488 * distributed under the License is distributed on an "AS IS" BASIS, 489 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 490 * See the License for the specific language governing permissions and 491 * limitations under the License. 492 */function Mn(t,...e){throw zm(t,...e)}function Zn(t,...e){return zm(t,...e)}function $m(t,e,n){const r=Object.assign(Object.assign({},g6()),{[e]:n});return new Wl("auth","Firebase",r).create(e,{appName:t.name})}function Di(t){return $m(t,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function v6(t,e,n){const r=n;if(!(e instanceof r))throw r.name!==e.constructor.name&&Mn(t,"argument-error"),$m(t,"argument-error",`Type of ${e.constructor.name} does not match expected instance.Did you pass a reference from a different Auth SDK?`)}function zm(t,...e){if(typeof t!="string"){const n=e[0],r=[...e.slice(1)];return r[0]&&(r[0].appName=t.name),t._errorFactory.create(n,...r)}return qw.create(t,...e)}function fe(t,e,...n){if(!t)throw zm(e,...n)}function Fr(t){const e="INTERNAL ASSERTION FAILED: "+t;throw pc(e),new Error(e)}function zr(t,e){t||Fr(e)}/** 493 * @license 494 * Copyright 2020 Google LLC 495 * 496 * Licensed under the Apache License, Version 2.0 (the "License");
497 * you may not use this file except in compliance with the License. 498 * You may obtain a copy of the License at 499 * 500 * http://www.apache.org/licenses/LICENSE-2.0 501 * 502 * Unless required by applicable law or agreed to in writing, software 503 * distributed under the License is distributed on an "AS IS" BASIS, 504 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 505 * See the License for the specific language governing permissions and 506 * limitations under the License. 507 */function ip(){var t;return typeof self<"u"&&((t=self.location)===null||t===void 0?void 0:t.href)||""}function x6(){return gx()==="http:"||gx()==="https:"}function gx(){var t;return typeof self<"u"&&((t=self.location)===null||t===void 0?void 0:t.protocol)||null}/** 508 * @license 509 * Copyright 2020 Google LLC 510 * 511 * Licensed under the Apache License, Version 2.0 (the "License"); 512 * you may not use this file except in compliance with the License. 513 * You may obtain a copy of the License at 514 * 515 * http://www.apache.org/licenses/LICENSE-2.0 516 * 517 * Unless required by applicable law or agreed to in writing, software 518 * distributed under the License is distributed on an "AS IS" BASIS, 519 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 520 * See the License for the specific language governing permissions and 521 * limitations under the License. 522 */function _6(){return typeof navigator<"u"&&navigator&&"onLine"in navigator&&typeof navigator.onLine=="boolean"&&(x6()||QD()||"connection"in navigator)?navigator.onLine:!0}function E6(){if(typeof navigator>"u")return null;const t=navigator;return t.languages&&t.languages[0]||t.language||null}/** 523 * @license 524 * Copyright 2020 Google LLC 525 * 526 * Licensed under the Apache License, Version 2.0 (the "License"); 527 * you may not use this file except in compliance with the License. 528 * You may obtain a copy of the License at 529 * 530 * http://www.apache.org/licenses/LICENSE-2.0 531 * 532 * Unless required by applicable law or agreed to in writing, software 533 * distributed under the License is distributed on an "AS IS" BASIS, 534 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 535 * See the License for the specific language governing permissions and 536 * limitations under the License. 537 */class Kl{constructor(e,n){this.shortDelay=e,this.longDelay=n,zr(n>e,"Short delay should be less than long delay!"),this.isMobile=GD()||XD()}get(){return _6()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}/** 538 * @license 539 * Copyright 2020 Google LLC 540 * 541 * Licensed under the Apache License, Version 2.0 (the "License"); 542 * you may not use this file except in compliance with the License. 543 * You may obtain a copy of the License at 544 * 545 * http://www.apache.org/licenses/LICENSE-2.0 546 * 547 * Unless required by applicable law or agreed to in writing, software 548 * distributed under the License is distributed on an "AS IS" BASIS, 549 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 550 * See the License for the specific language governing permissions and 551 * limitations under the License. 552 */function jm(t,e){zr(t.emulator,"Emulator should always be set here");const{url:n}=t.emulator;return e?`${n}${e.startsWith("/")?e.slice(1):e}`:n}/** 553 * @license 554 * Copyright 2020 Google LLC 555 * 556 * Licensed under the Apache License, Version 2.0 (the "License"); 557 * you may not use this file except in compliance with the License. 558 * You may obtain a copy of the License at 559 * 560 * http://www.apache.org/licenses/LICENSE-2.0 561 * 562 * Unless required by applicable law or agreed to in writing, software 563 * distributed under the License is distributed on an "AS IS" BASIS, 564 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 565 * See the License for the specific language governing permissions and 566 * limitations under the License. 567 */class Ww{static initialize(e,n,r){this.fetchImpl=e,n&&(this.headersImpl=n),r&&(this.responseImpl=r)}static fetch(){if(this.fetchImpl)return this.fetchImpl;if(typeof self<"u"&&"fetch"in self)return self.fetch;if(typeof globalThis<"u"&&globalThis.fetch)return globalThis.fetch;if(typeof fetch<"u")return fetch;Fr("Could not find fetch implementation, make sure you call FetchProvi
567der.initialize() with an appropriate polyfill")}static headers(){if(this.headersImpl)return this.headersImpl;if(typeof self<"u"&&"Headers"in self)return self.Headers;if(typeof globalThis<"u"&&globalThis.Headers)return globalThis.Headers;if(typeof Headers<"u")return Headers;Fr("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){if(this.responseImpl)return this.responseImpl;if(typeof self<"u"&&"Response"in self)return self.Response;if(typeof globalThis<"u"&&globalThis.Response)return globalThis.Response;if(typeof Response<"u")return Response;Fr("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}/** 568 * @license 569 * Copyright 2020 Google LLC 570 * 571 * Licensed under the Apache License, Version 2.0 (the "License"); 572 * you may not use this file except in compliance with the License. 573 * You may obtain a copy of the License at 574 * 575 * http://www.apache.org/licenses/LICENSE-2.0 576 * 577 * Unless required by applicable law or agreed to in writing, software 578 * distributed under the License is distributed on an "AS IS" BASIS, 579 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 580 * See the License for the specific language governing permissions and 581 * limitations under the License. 582 */const w6={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",INVALID_LOGIN_CREDENTIALS:"invalid-credential",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-recaptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"};/** 583 * @license 584 * Copyright 2020 Google LLC 585 * 586 * Licensed under the Apache License, Version 2.0 (the "License"); 587 * you may not use this file except in compliance with the License. 588 * You may obtain a copy of the License at 589 * 590 * http://www.apache.org/licenses/LICENSE-2.0 591 * 592 * Unless required by applicable law or agreed to in writing, software 593 * distributed under the License is distributed on an "AS IS" BASIS, 594 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 595 * See the License for the specific language governing permissions and 596 * limitations under the License. 597 */const A6=new Kl(3e4,6e4);function Os(t,e){return t.tenantId&&!e.tenantId?Object.assign(Object.assign({},e),{tenantId:t.tenantId}):e}async function Hi(t,e,n,r,i={}){return Gw(t,i,async()=>{let s={},o={};r&&(e==="GET"?o=r:s={body:JSON.stringify(r)});const a=Gl(Object.assign({key:t.config.apiKey},o)).slice(1),u=await t._getAdditionalHeaders();return u["Content-Type"]="application/json",t.languageCode&&(u["X-Firebase-Locale"]=t.languageCode),Ww.fetch()(Kw(t,t.config.apiHost,n,a),Object.assign({method:e,headers:u,referrerPolicy:"no-referrer"},s))})}async function Gw(t,e,n){t._canInitEmulator=!1;const r=Object.assign(Object.assign({},w6),e);try{const i=new T6(t),s=await Promise.race([n(),i.promise]);i.clearNetworkTimeout();const o=await s.json();if("needConfirmation"in o)throw qu(t,"account-exists-with-different-credential",o);if(s.ok&&!("errorMessage"in o))return o;{const a=s.ok?o.errorMessage:o.error.message,[u,d]=a.split(" : ");if(u==="FEDERATED_USER_ID_ALREADY_LINKED")throw qu(t,"credential-already-in-use",o);if(u==="EMAIL_EXISTS")throw qu(t,"email-already-in-use",o);if(u==="USER_DISABLED")throw qu(t,"user-disabled",o);const c=r[u]||u.toLowerCase().replace(/[_\s]+/g,"-");if(d)throw $m(t,c,d);Mn(t,c)}}catch(i){if(i instanceof Wr)throw i;
597Mn(t,"network-request-failed",{message:String(i)})}}async function Ud(t,e,n,r,i={}){const s=await Hi(t,e,n,r,i);return"mfaPendingCredential"in s&&Mn(t,"multi-factor-auth-required",{_serverResponse:s}),s}function Kw(t,e,n,r){const i=`${e}${n}?${r}`;return t.config.emulator?jm(t.config,i):`${t.config.apiScheme}://${i}`}function C6(t){switch(t){case"ENFORCE":return"ENFORCE";case"AUDIT":return"AUDIT";case"OFF":return"OFF";default:return"ENFORCEMENT_STATE_UNSPECIFIED"}}class T6{constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((n,r)=>{this.timer=setTimeout(()=>r(Zn(this.auth,"network-request-failed")),A6.get())})}clearNetworkTimeout(){clearTimeout(this.timer)}}function qu(t,e,n){const r={appName:t.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);const i=Zn(t,e,r);return i.customData._tokenResponse=n,i}function yx(t){return t!==void 0&&t.enterprise!==void 0}class I6{constructor(e){if(this.siteKey="",this.recaptchaEnforcementState=[],e.recaptchaKey===void 0)throw new Error("recaptchaKey undefined");this.siteKey=e.recaptchaKey.split("/")[3],this.recaptchaEnforcementState=e.recaptchaEnforcementState}getProviderEnforcementState(e){if(!this.recaptchaEnforcementState||this.recaptchaEnforcementState.length===0)return null;for(const n of this.recaptchaEnforcementState)if(n.provider&&n.provider===e)return C6(n.enforcementState);return null}isProviderEnabled(e){return this.getProviderEnforcementState(e)==="ENFORCE"||this.getProviderEnforcementState(e)==="AUDIT"}}async function S6(t,e){return Hi(t,"GET","/v2/recaptchaConfig",Os(t,e))}/** 598 * @license 599 * Copyright 2020 Google LLC 600 * 601 * Licensed under the Apache License, Version 2.0 (the "License"); 602 * you may not use this file except in compliance with the License. 603 * You may obtain a copy of the License at 604 * 605 * http://www.apache.org/licenses/LICENSE-2.0 606 * 607 * Unless required by applicable law or agreed to in writing, software 608 * distributed under the License is distributed on an "AS IS" BASIS, 609 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 610 * See the License for the specific language governing permissions and 611 * limitations under the License. 612 */async function R6(t,e){return Hi(t,"POST","/v1/accounts:delete",e)}async function Qw(t,e){return Hi(t,"POST","/v1/accounts:lookup",e)}/** 613 * @license 614 * Copyright 2020 Google LLC 615 * 616 * Licensed under the Apache License, Version 2.0 (the "License"); 617 * you may not use this file except in compliance with the License. 618 * You may obtain a copy of the License at 619 * 620 * http://www.apache.org/licenses/LICENSE-2.0 621 * 622 * Unless required by applicable law or agreed to in writing, software 623 * distributed under the License is distributed on an "AS IS" BASIS, 624 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 625 * See the License for the specific language governing permissions and 626 * limitations under the License. 627 */function il(t){if(!!t)try{const e=new Date(Number(t));if(!isNaN(e.getTime()))return e.toUTCString()}catch{}}async function P6(t,e=!1){const n=xt(t),r=await n.getIdToken(e),i=Hm(r);fe(i&&i.exp&&i.auth_time&&i.iat,n.auth,"internal-error");const s=typeof i.firebase=="object"?i.firebase:void 0,o=s==null?void 0:s.sign_in_provider;return{claims:i,token:r,authTime:il(N0(i.auth_time)),issuedAtTime:il(N0(i.iat)),expirationTime:il(N0(i.exp)),signInProvider:o||null,signInSecondFactor:(s==null?void 0:s.sign_in_second_factor)||null}}function N0(t){return Number(t)*1e3}function Hm(t){const[e,n,r]=t.split(".");if(e===void 0||n===void 0||r===void 0)return pc("JWT malformed, contained fewer than 3 sections"),null;try{const i=Nw(n);return i?JSON.parse(i):(pc("Failed to decode base64 JWT payload"),null)}catch(i){return pc("Caught error parsing JWT payload as JSON",i==null?void 0:i.toString()),null}}function vx(t){const e=Hm(t);return fe(e,"internal-error"),fe(typeof e.exp<"u","internal-error"),fe(typeof e.iat<"u","internal-error"),Number(e.exp)-Number(e.iat)}/** 628 * @license 629 * Copyright 2020 Google LLC 630 * 631 * Licensed under the Apache License, Version 2.0 (the "License");
632 * you may not use this file except in compliance with the License. 633 * You may obtain a copy of the License at 634 * 635 * http://www.apache.org/licenses/LICENSE-2.0 636 * 637 * Unless required by applicable law or agreed to in writing, software 638 * distributed under the License is distributed on an "AS IS" BASIS, 639 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 640 * See the License for the specific language governing permissions and 641 * limitations under the License. 642 */async function kl(t,e,n=!1){if(n)return e;try{return await e}catch(r){throw r instanceof Wr&&k6(r)&&t.auth.currentUser===t&&await t.auth.signOut(),r}}function k6({code:t}){return t==="auth/user-disabled"||t==="auth/user-token-expired"}/** 643 * @license 644 * Copyright 2020 Google LLC 645 * 646 * Licensed under the Apache License, Version 2.0 (the "License"); 647 * you may not use this file except in compliance with the License. 648 * You may obtain a copy of the License at 649 * 650 * http://www.apache.org/licenses/LICENSE-2.0 651 * 652 * Unless required by applicable law or agreed to in writing, software 653 * distributed under the License is distributed on an "AS IS" BASIS, 654 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 655 * See the License for the specific language governing permissions and 656 * limitations under the License. 657 */class D6{constructor(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){!this.isRunning||(this.isRunning=!1,this.timerId!==null&&clearTimeout(this.timerId))}getInterval(e){var n;if(e){const r=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),r}else{this.errorBackoff=3e4;const i=((n=this.user.stsTokenManager.expirationTime)!==null&&n!==void 0?n:0)-Date.now()-3e5;return Math.max(0,i)}}schedule(e=!1){if(!this.isRunning)return;const n=this.getInterval(e);this.timerId=setTimeout(async()=>{await this.iteration()},n)}async iteration(){try{await this.user.getIdToken(!0)}catch(e){(e==null?void 0:e.code)==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}}/** 658 * @license 659 * Copyright 2020 Google LLC 660 * 661 * Licensed under the Apache License, Version 2.0 (the "License"); 662 * you may not use this file except in compliance with the License. 663 * You may obtain a copy of the License at 664 * 665 * http://www.apache.org/licenses/LICENSE-2.0 666 * 667 * Unless required by applicable law or agreed to in writing, software 668 * distributed under the License is distributed on an "AS IS" BASIS, 669 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 670 * See the License for the specific language governing permissions and 671 * limitations under the License. 672 */class sp{constructor(e,n){this.createdAt=e,this.lastLoginAt=n,this._initializeTime()}_initializeTime(){this.lastSignInTime=il(this.lastLoginAt),this.creationTime=il(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}/** 673 * @license 674 * Copyright 2019 Google LLC 675 * 676 * Licensed under the Apache License, Version 2.0 (the "License"); 677 * you may not use this file except in compliance with the License. 678 * You may obtain a copy of the License at 679 * 680 * http://www.apache.org/licenses/LICENSE-2.0 681 * 682 * Unless required by applicable law or agreed to in writing, software 683 * distributed under the License is distributed on an "AS IS" BASIS, 684 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 685 * See the License for the specific language governing permissions and 686 * limitations under the License. 687 */async function ed(t){var e;const n=t.auth,r=await t.getIdToken(),i=await kl(t,Qw(n,{idToken:r}));fe(i==null?void 0:i.users.length,n,"internal-error");const s=i.users[0];t._notifyReloadListener(s);const o=!((e=s.providerUserInfo)===null||e===void 0)&&e.length?Xw(s.providerUserInfo):[],a=F6(t.providerData,o),u=t.isAnonymous,d=!(t.email&&s.passwordHash)&&!(a!=null&&a.length),c=u?d:!1,h={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:a,metadata:new sp(s.createdAt,s.lastLoginAt),isAnonymous:c};Object.assign(t,h)}async function b6(t){const e=xt(t);await ed(e),await e.auth._persistUserIfCurrent(e),e.auth._notifyListenersIfCurrent(e)}function F6(t,e){return[...t.filter(r=>!e.some(i=>i.providerId===r.providerId)),...e]}function Xw(t){return t.map(e=>{var{providerId:n}=e,r=Um(e,["providerId"]);
687return{providerId:n,uid:r.rawId||"",displayName:r.displayName||null,email:r.email||null,phoneNumber:r.phoneNumber||null,photoURL:r.photoUrl||null}})}/** 688 * @license 689 * Copyright 2020 Google LLC 690 * 691 * Licensed under the Apache License, Version 2.0 (the "License"); 692 * you may not use this file except in compliance with the License. 693 * You may obtain a copy of the License at 694 * 695 * http://www.apache.org/licenses/LICENSE-2.0 696 * 697 * Unless required by applicable law or agreed to in writing, software 698 * distributed under the License is distributed on an "AS IS" BASIS, 699 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 700 * See the License for the specific language governing permissions and 701 * limitations under the License. 702 */async function N6(t,e){const n=await Gw(t,{},async()=>{const r=Gl({grant_type:"refresh_token",refresh_token:e}).slice(1),{tokenApiHost:i,apiKey:s}=t.config,o=Kw(t,i,"/v1/token",`key=${s}`),a=await t._getAdditionalHeaders();return a["Content-Type"]="application/x-www-form-urlencoded",Ww.fetch()(o,{method:"POST",headers:a,body:r})});return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}}async function B6(t,e){return Hi(t,"POST","/v2/accounts:revokeToken",Os(t,e))}/** 703 * @license 704 * Copyright 2020 Google LLC 705 * 706 * Licensed under the Apache License, Version 2.0 (the "License"); 707 * you may not use this file except in compliance with the License. 708 * You may obtain a copy of the License at 709 * 710 * http://www.apache.org/licenses/LICENSE-2.0 711 * 712 * Unless required by applicable law or agreed to in writing, software 713 * distributed under the License is distributed on an "AS IS" BASIS, 714 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 715 * See the License for the specific language governing permissions and 716 * limitations under the License. 717 */class Io{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){fe(e.idToken,"internal-error"),fe(typeof e.idToken<"u","internal-error"),fe(typeof e.refreshToken<"u","internal-error");const n="expiresIn"in e&&typeof e.expiresIn<"u"?Number(e.expiresIn):vx(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,n)}updateFromIdToken(e){fe(e.length!==0,"internal-error");const n=vx(e);this.updateTokensAndExpiration(e,null,n)}async getToken(e,n=!1){return!n&&this.accessToken&&!this.isExpired?this.accessToken:(fe(this.refreshToken,e,"user-token-expired"),this.refreshToken?(await this.refresh(e,this.refreshToken),this.accessToken):null)}clearRefreshToken(){this.refreshToken=null}async refresh(e,n){const{accessToken:r,refreshToken:i,expiresIn:s}=await N6(e,n);this.updateTokensAndExpiration(r,i,Number(s))}updateTokensAndExpiration(e,n,r){this.refreshToken=n||null,this.accessToken=e||null,this.expirationTime=Date.now()+r*1e3}static fromJSON(e,n){const{refreshToken:r,accessToken:i,expirationTime:s}=n,o=new Io;return r&&(fe(typeof r=="string","internal-error",{appName:e}),o.refreshToken=r),i&&(fe(typeof i=="string","internal-error",{appName:e}),o.accessToken=i),s&&(fe(typeof s=="number","internal-error",{appName:e}),o.expirationTime=s),o}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new Io,this.toJSON())}_performRefresh(){return Fr("not implemented")}}/** 718 * @license 719 * Copyright 2020 Google LLC 720 * 721 * Licensed under the Apache License, Version 2.0 (the "License"); 722 * you may not use this file except in compliance with the License. 723 * You may obtain a copy of the License at 724 * 725 * http://www.apache.org/licenses/LICENSE-2.0 726 * 727 * Unless required by applicable law or agreed to in writing, software 728 * distributed under the License is distributed on an "AS IS" BASIS, 729 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 730 * See the License for the specific language governing permissions and 731 * limitations under the License. 732 */function si(t,e){fe(typeof t=="string"||typeof t>"u","internal-error",{appName:e})}class Nr{constructor(e){var{uid:n,auth:r,stsTokenManager:i}=e,s=Um(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new D6(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=n,this.auth=r,this.stsTokenManager=i,this.accessToken=i.accessToken,this.displayName=s.displayName||null,this.email=s.email||null,this.emailVerified=s.emailVerified||!1,this.phoneNumber=s.phoneNumber||null,this.photoURL=s.photoURL||null,this.isAnonymous=s.isAnonymous||!1,this.tenantId=s.tenantId||null,this.providerData=s.providerData?[...s.providerData]:[],this.metadata=new sp(s.createdAt||void 0,s.lastLoginAt||void 0)}async getIdToken(e){const n=await kl(this,this.stsTokenManager.getToken(this.auth,e));return fe(n,this.auth,"internal-error"),this.accessToken!==n&&(this.accessToken=n,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),n}getIdTokenResult(e){return P6(this,e)}reload(){return b6(this)}_assign(e){this!==e&&(fe(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.ph
732otoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map(n=>Object.assign({},n)),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){const n=new Nr(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}));return n.metadata._copy(this.metadata),n}_onReload(e){fe(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(e,n=!1){let r=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),r=!0),n&&await ed(this),await this.auth._persistUserIfCurrent(this),r&&this.auth._notifyListenersIfCurrent(this)}async delete(){if(pr(this.auth.app))return Promise.reject(Di(this.auth));const e=await this.getIdToken();return await kl(this,R6(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return Object.assign(Object.assign({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(e=>Object.assign({},e)),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(e,n){var r,i,s,o,a,u,d,c;const h=(r=n.displayName)!==null&&r!==void 0?r:void 0,p=(i=n.email)!==null&&i!==void 0?i:void 0,y=(s=n.phoneNumber)!==null&&s!==void 0?s:void 0,v=(o=n.photoURL)!==null&&o!==void 0?o:void 0,E=(a=n.tenantId)!==null&&a!==void 0?a:void 0,I=(u=n._redirectEventId)!==null&&u!==void 0?u:void 0,A=(d=n.createdAt)!==null&&d!==void 0?d:void 0,m=(c=n.lastLoginAt)!==null&&c!==void 0?c:void 0,{uid:x,emailVerified:R,isAnonymous:F,providerData:b,stsTokenManager:C}=n;fe(x&&C,e,"internal-error");const _=Io.fromJSON(this.name,C);fe(typeof x=="string",e,"internal-error"),si(h,e.name),si(p,e.name),fe(typeof R=="boolean",e,"internal-error"),fe(typeof F=="boolean",e,"internal-error"),si(y,e.name),si(v,e.name),si(E,e.name),si(I,e.name),si(A,e.name),si(m,e.name);const T=new Nr({uid:x,auth:e,email:p,emailVerified:R,displayName:h,isAnonymous:F,photoURL:v,phoneNumber:y,tenantId:E,stsTokenManager:_,createdAt:A,lastLoginAt:m});return b&&Array.isArray(b)&&(T.providerData=b.map(w=>Object.assign({},w))),I&&(T._redirectEventId=I),T}static async _fromIdTokenResponse(e,n,r=!1){const i=new Io;i.updateFromServerResponse(n);const s=new Nr({uid:n.localId,auth:e,stsTokenManager:i,isAnonymous:r});return await ed(s),s}static async _fromGetAccountInfoResponse(e,n,r){const i=n.users[0];fe(i.localId!==void 0,"internal-error");const s=i.providerUserInfo!==void 0?Xw(i.providerUserInfo):[],o=!(i.email&&i.passwordHash)&&!(s!=null&&s.length),a=new Io;a.updateFromIdToken(r);const u=new Nr({uid:i.localId,auth:e,stsTokenManager:a,isAnonymous:o}),d={uid:i.localId,displayName:i.displayName||null,photoURL:i.photoUrl||null,email:i.email||null,emailVerified:i.emailVerified||!1,phoneNumber:i.phoneNumber||null,tenantId:i.tenantId||null,providerData:s,metadata:new sp(i.createdAt,i.lastLoginAt),isAnonymous:!(i.email&&i.passwordHash)&&!(s!=null&&s.length)};return Object.assign(u,d),u}}/** 733 * @license 734 * Copyright 2020 Google LLC 735 * 736 * Licensed under the Apache License, Version 2.0 (the "License"); 737 * you may not use this file except in compliance with the License. 738 * You may obtain a copy of the License at 739 * 740 * http://www.apache.org/licenses/LICENSE-2.0 741 * 742 * Unless required by applicable law or agreed to in writing, softw
742are 743 * distributed under the License is distributed on an "AS IS" BASIS, 744 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 745 * See the License for the specific language governing permissions and 746 * limitations under the License. 747 */const xx=new Map;function Br(t){zr(t instanceof Function,"Expected a class definition");let e=xx.get(t);return e?(zr(e instanceof t,"Instance stored in cache mismatched with class"),e):(e=new t,xx.set(t,e),e)}/** 748 * @license 749 * Copyright 2019 Google LLC 750 * 751 * Licensed under the Apache License, Version 2.0 (the "License"); 752 * you may not use this file except in compliance with the License. 753 * You may obtain a copy of the License at 754 * 755 * http://www.apache.org/licenses/LICENSE-2.0 756 * 757 * Unless required by applicable law or agreed to in writing, software 758 * distributed under the License is distributed on an "AS IS" BASIS, 759 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 760 * See the License for the specific language governing permissions and 761 * limitations under the License. 762 */class Yw{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(e,n){this.storage[e]=n}async _get(e){const n=this.storage[e];return n===void 0?null:n}async _remove(e){delete this.storage[e]}_addListener(e,n){}_removeListener(e,n){}}
762Yw.type="NONE";const _x=Yw;/** 763 * @license 764 * Copyright 2019 Google LLC 765 * 766 * Licensed under the Apache License, Version 2.0 (the "License"); 767 * you may not use this file except in compliance with the License. 768 * You may obtain a copy of the License at 769 * 770 * http://www.apache.org/licenses/LICENSE-2.0 771 * 772 * Unless required by applicable law or agreed to in writing, software 773 * distributed under the License is distributed on an "AS IS" BASIS, 774 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 775 * See the License for the specific language governing permissions and 776 * limitations under the License. 777 */function mc(t,e,n){return`firebase:${t}:${e}:${n}`}class So{constructor(e,n,r){this.persistence=e,this.auth=n,this.userKey=r;const{config:i,name:s}=this.auth;this.fullUserKey=mc(this.userKey,i.apiKey,s),this.fullPersistenceKey=mc("persistence",i.apiKey,s),this.boundEventHandler=n._onStorageEvent.bind(n),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}async getCurrentUser(){const e=await this.persistence._get(this.fullUserKey);return e?Nr._fromJSON(this.auth,e):null}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(e){if(this.persistence===e)return;const n=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=e,n)return this.setCurrentUser(n)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(e,n,r="authUser"){if(!n.length)return new So(Br(_x),e,r);const i=(await Promise.all(n.map(async d=>{if(await d._isAvailable())return d}))).filter(d=>d);let s=i[0]||Br(_x);const o=mc(r,e.config.apiKey,e.name);let a=null;for(const d of n)try{const c=await d._get(o);if(c){const h=Nr._fromJSON(e,c);d!==s&&(a=h),s=d;break}}catch{}const u=i.filter(d=>d._shouldAllowMigration);return!s._shouldAllowMigration||!u.length?new So(s,e,r):(s=u[0],a&&await s._set(o,a.toJSON()),await Promise.all(n.map(async d=>{if(d!==s)try{await d._remove(o)}catch{}})),new So(s,e,r))}}/** 778 * @license 779 * Copyright 2020 Google LLC 780 * 781 * Licensed under the Apache License, Version 2.0 (the "License"); 782 * you may not use this file except in compliance with the License. 783 * You may obtain a copy of the License at 784 * 785 * http://www.apache.org/licenses/LICENSE-2.0 786 * 787 * Unless required by applicable law or agreed to in writing, software 788 * distributed under the License is distributed on an "AS IS" BASIS, 789 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 790 * See the License for the specific language governing permissions and 791 * limitations under the License. 792 */function Ex(t){const e=t.toLowerCase();if(e.includes("opera/")||e.includes("opr/")||e.includes("opios/"))return"Opera";if(eA(e))return"IEMobile";if(e.includes("msie")||e.includes("trident/"))return"IE";if(e.includes("edge/"))return"Edge";if(Jw(e))return"Firefox";if(e.includes("silk/"))return"Silk";if(nA(e))return"Blackberry";if(rA(e))return"Webos";if(qm(e))return"Safari";if((e.includes("chrome/")||Zw(e))&&!e.includes("edge/"))return"Chrome";if(tA(e))return"Android";{const n=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,r=t.match(n);if((r==null?void 0:r.length)===2)return r[1]}return"Other"}function Jw(t=Ot()){return/firefox\//i.test(t)}function qm(t=Ot()){const e=t.toLowerCase();return e.includes("safari/")&&!e.includes("chrome/")&&!e.includes("crios/")&&!e.includes("android")}function Zw(t=Ot()){return/crios\//i.test(t)}function eA(t=Ot()){return/iemobile/i.test(t)}function tA(t=Ot()){return/android/i.test(t)}function nA(t=Ot()){return/blackberry/i.test(t)}function rA(t=Ot()){return/webos/i.test(t)}function $d(t=Ot()){return/iphone|ipad|ipod/i.test(t)||/macintosh/i.test(t)&&/mobile/i.test(t)}function O6(t=Ot()){var e;return $d(t)&&!!(!((e=window.navigator)===null||e===void 0)&&e.standalone)}function L6(){return YD()&&document.documentMode===10}function iA(t=Ot()){return $d(t)||tA(t)||rA(t)||nA(t)||/windows phone/i.test(t)||eA(t)}function M6(){try{return!!(window&&window!==window.top)}catch{return!1}}/** 793 * @license 794 * Copyright 2020 Google LLC 795 * 796 * Licensed under the Apache License, Version 2.0 (the "License");
797 * you may not use this file except in compliance with the License. 798 * You may obtain a copy of the License at 799 * 800 * http://www.apache.org/licenses/LICENSE-2.0 801 * 802 * Unless required by applicable law or agreed to in writing, software 803 * distributed under the License is distributed on an "AS IS" BASIS, 804 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 805 * See the License for the specific language governing permissions and 806 * limitations under the License. 807 */function sA(t,e=[]){let n;switch(t){case"Browser":n=Ex(Ot());break;case"Worker":n=`${Ex(Ot())}-${t}`;break;default:n=t}const r=e.length?e.join(","):"FirebaseCore-web";return`${n}/JsCore/${ta}/${r}`}/** 808 * @license 809 * Copyright 2022 Google LLC 810 * 811 * Licensed under the Apache License, Version 2.0 (the "License"); 812 * you may not use this file except in compliance with the License. 813 * You may obtain a copy of the License at 814 * 815 * http://www.apache.org/licenses/LICENSE-2.0 816 * 817 * Unless required by applicable law or agreed to in writing, software 818 * distributed under the License is distributed on an "AS IS" BASIS, 819 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 820 * See the License for the specific language governing permissions and 821 * limitations under the License. 822 */class V6{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,n){const r=s=>new Promise((o,a)=>{try{const u=e(s);o(u)}catch(u){a(u)}});r.onAbort=n,this.queue.push(r);const i=this.queue.length-1;return()=>{this.queue[i]=()=>Promise.resolve()}}async runMiddleware(e){if(this.auth.currentUser===e)return;const n=[];try{for(const r of this.queue)await r(e),r.onAbort&&n.push(r.onAbort)}catch(r){n.reverse();for(const i of n)try{i()}catch{}throw this.auth._errorFactory.create("login-blocked",{originalMessage:r==null?void 0:r.message})}}}/** 823 * @license 824 * Copyright 2023 Google LLC 825 * 826 * Licensed under the Apache License, Version 2.0 (the "License"); 827 * you may not use this file except in compliance with the License. 828 * You may obtain a copy of the License at 829 * 830 * http://www.apache.org/licenses/LICENSE-2.0 831 * 832 * Unless required by applicable law or agreed to in writing, software 833 * distributed under the License is distributed on an "AS IS" BASIS, 834 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 835 * See the License for the specific language governing permissions and 836 * limitations under the License. 837 */async function U6(t,e={}){return Hi(t,"GET","/v2/passwordPolicy",Os(t,e))}/** 838 * @license 839 * Copyright 2023 Google LLC 840 * 841 * Licensed under the Apache License, Version 2.0 (the "License"); 842 * you may not use this file except in compliance with the License. 843 * You may obtain a copy of the License at 844 * 845 * http://www.apache.org/licenses/LICENSE-2.0 846 * 847 * Unless required by applicable law or agreed to in writing, software 848 * distributed under the License is distributed on an "AS IS" BASIS, 849 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 850 * See the License for the specific language governing permissions and 851 * limitations under the License. 852 */const $6=6;class z6{constructor(e){var n,r,i,s;const o=e.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=(n=o.minPasswordLength)!==null&&n!==void 0?n:$6,o.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=o.maxPasswordLength),o.containsLowercaseCharacter!==void 0&&(this.customStrengthOptions.containsLowercaseLetter=o.containsLowercaseCharacter),o.containsUppercaseCharacter!==void 0&&(this.customStrengthOptions.containsUppercaseLetter=o.containsUppercaseCharacter),o.containsNumericCharacter!==void 0&&(this.customStrengthOptions.containsNumericCharacter=o.containsNumericCharacter),o.containsNonAlphanumericCharacter!==void 0&&(this.customStrengthOptions.containsNonAlphanumericCharacter=o.containsNonAlphanumericCharacter),this.enforcementState=e.enforcementState,this.enforcementState==="ENFORCEMENT_STATE_UNSPECIFIED"&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=(i=(r=e.allowedNonAlphanumericCharacters)===null||r===void 0?void 0:r.join(""))!==null&&i!==void 0?i:"",this.forceUpgradeOnSignin=(s=e.forceUpgradeOnSignin)!==null&&s!==void 0?s:!1,this.schemaVersion=e.schemaVersion}validatePassword(e){var n,r,i,s,o,a;const u={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(e,u),this.validatePasswordCharacterOptions(e,u),u.isValid&&
852(u.isValid=(n=u.meetsMinPasswordLength)!==null&&n!==void 0?n:!0),u.isValid&&(u.isValid=(r=u.meetsMaxPasswordLength)!==null&&r!==void 0?r:!0),u.isValid&&(u.isValid=(i=u.containsLowercaseLetter)!==null&&i!==void 0?i:!0),u.isValid&&(u.isValid=(s=u.containsUppercaseLetter)!==null&&s!==void 0?s:!0),u.isValid&&(u.isValid=(o=u.containsNumericCharacter)!==null&&o!==void 0?o:!0),u.isValid&&(u.isValid=(a=u.containsNonAlphanumericCharacter)!==null&&a!==void 0?a:!0),u}validatePasswordLengthOptions(e,n){const r=this.customStrengthOptions.minPasswordLength,i=this.customStrengthOptions.maxPasswordLength;r&&(n.meetsMinPasswordLength=e.length>=r),i&&(n.meetsMaxPasswordLength=e.length<=i)}validatePasswordCharacterOptions(e,n){this.updatePasswordCharacterOptionsStatuses(n,!1,!1,!1,!1);let r;for(let i=0;i<e.length;i++)r=e.charAt(i),this.updatePasswordCharacterOptionsStatuses(n,r>="a"&&r<="z",r>="A"&&r<="Z",r>="0"&&r<="9",this.allowedNonAlphanumericCharacters.includes(r))}updatePasswordCharacterOptionsStatuses(e,n,r,i,s){this.customStrengthOptions.containsLowercaseLetter&&(e.containsLowercaseLetter||(e.containsLowercaseLetter=n)),this.customStrengthOptions.containsUppercaseLetter&&(e.containsUppercaseLetter||(e.containsUppercaseLetter=r)),this.customStrengthOptions.containsNumericCharacter&&(e.containsNumericCharacter||(e.containsNumericCharacter=i)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(e.containsNonAlphanumericCharacter||(e.containsNonAlphanumericCharacter=s))}}/** 853 * @license 854 * Copyright 2020 Google LLC 855 * 856 * Licensed under the Apache License, Version 2.0 (the "License"); 857 * you may not use this file except in compliance with the License. 858 * You may obtain a copy of the License at 859 * 860 * http://www.apache.org/licenses/LICENSE-2.0 861 * 862 * Unless required by applicable law or agreed to in writing, software 863 * distributed under the License is distributed on an "AS IS" BASIS, 864 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 865 * See the License for the specific language governing permissions and 866 * limitations under the License. 867 */class j6{constructor(e,n,r,i){this.app=e,this.heartbeatServiceProvider=n,this.appCheckServiceProvider=r,this.config=i,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new wx(this),this.idTokenSubscription=new wx(this),this.beforeStateQueue=new V6(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=qw,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=i.sdkClientVersion}_initializeWithPersistence(e,n){return n&&(this._popupRedirectResolver=Br(n)),this._initializationPromise=this.queue(async()=>{var r,i;if(!this._deleted&&(this.persistenceManager=await So.create(this,e),!this._deleted)){if(!((r=this._popupRedirectResolver)===null||r===void 0)&&r._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch{}await this.initializeCurrentUser(n),this.lastNotifiedUid=((i=this.currentUser)===null||i===void 0?void 0:i.uid)||null,!this._deleted&&(this._isInitialized=!0)}}),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;const e=await this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!e)){if(this.currentUser&&e&&this.currentUser.uid===e.uid){this._currentUser._assign(e),await this.currentUser.getIdToken();return}await this._updateCurrentUser(e,!0)}}async initializeCurrentUserFromIdToken(e){try{const n=await Qw(this,{idToken:e}),r=await Nr._fromGetAccountInfoResponse(this,n,e);await this.directlySetCurrentUser(r)}catch(n){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",n),await this.directlySetCurrentUser(null)}}async initializeCurrentUser(e){var n;if(pr(this.app)){const o=this.app.settings.authIdToken;return o?new Promise(a=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(o).then(a,a))}):this.directlySetCurrentUser(null)}const r=await this.assertedPersistence.getCurrentUser();let i=r,s=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const o=(n=this.redirectUser)===null||n===void 0?void 0:n._redirectEventId,a=i==null?void 0:i._redirectEventId,u=await this.tryRedirectSignIn(e);(!o||o===a)&&(u==null?void 0:u.user)&&(i=u.user,s=!0)}if(!i)return this.directlySetCurrentUser(null);
867if(!i._redirectEventId){if(s)try{await this.beforeStateQueue.runMiddleware(i)}catch(o){i=r,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(o))}return i?this.reloadAndSetCurrentUserOrClear(i):this.directlySetCurrentUser(null)}return fe(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===i._redirectEventId?this.directlySetCurrentUser(i):this.reloadAndSetCurrentUserOrClear(i)}async tryRedirectSignIn(e){let n=null;try{n=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch{await this._setRedirectUser(null)}return n}async reloadAndSetCurrentUserOrClear(e){try{await ed(e)}catch(n){if((n==null?void 0:n.code)!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=E6()}async _delete(){this._deleted=!0}async updateCurrentUser(e){if(pr(this.app))return Promise.reject(Di(this));const n=e?xt(e):null;return n&&fe(n.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(n&&n._clone(this))}async _updateCurrentUser(e,n=!1){if(!this._deleted)return e&&fe(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),n||await this.beforeStateQueue.runMiddleware(e),this.queue(async()=>{await this.directlySetCurrentUser(e),this.notifyAuthListeners()})}async signOut(){return pr(this.app)?Promise.reject(Di(this)):(await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0))}setPersistence(e){return pr(this.app)?Promise.reject(Di(this)):this.queue(async()=>{await this.assertedPersistence.setPersistence(Br(e))})}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword(e){this._getPasswordPolicyInternal()||await this._updatePasswordPolicy();const n=this._getPasswordPolicyInternal();return n.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):n.validatePassword(e)}_getPasswordPolicyInternal(){return this.tenantId===null?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}async _updatePasswordPolicy(){const e=await U6(this),n=new z6(e);this.tenantId===null?this._projectPasswordPolicy=n:this._tenantPasswordPolicies[this.tenantId]=n}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(e){this._errorFactory=new Wl("auth","Firebase",e())}onAuthStateChanged(e,n,r){return this.registerStateListener(this.authStateSubscription,e,n,r)}beforeAuthStateChanged(e,n){return this.beforeStateQueue.pushCallback(e,n)}onIdTokenChanged(e,n,r){return this.registerStateListener(this.idTokenSubscription,e,n,r)}authStateReady(){return new Promise((e,n)=>{if(this.currentUser)e();else{const r=this.onAuthStateChanged(()=>{r(),e()},n)}})}async revokeAccessToken(e){if(this.currentUser){const n=await this.currentUser.getIdToken(),r={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:e,idToken:n};this.tenantId!=null&&(r.tenantId=this.tenantId),await B6(this,r)}}toJSON(){var e;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:(e=this._currentUser)===null||e===void 0?void 0:e.toJSON()}}async _setRedirectUser(e,n){const r=await this.getOrInitRedirectPersistenceManager(n);return e===null?r.removeCurrentUser():r.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){const n=e&&Br(e)||this._popupRedirectResolver;fe(n,this,"argument-error"),this.redirectPersistenceManager=await So.create(this,[Br(n._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){var n,r;return this._isInitialized&&await this.queue(async()=>{}),((n=this._currentUser)===null||n===void 0?void 0:n._redirectEventId)===e?this._currentUser:((r=this.redirectUser)===null||r===void 0?void 0:r._redirectEventId)===e?this.redirectUser:null}async _persistUserIfCurrent(e){if(e===this.currentUser)return this.queue(async()=>this.directlySetCurrentUser(e))}_notifyListenersIfCurrent(e){e===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var e,n;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const r=(n=(e=this.currentUser)===null||e===void 0?void 0:e.uid)!==null&&n!==void 0?n:null;this.lastNotifiedUid!==r&&(this.lastNotifiedUid=r,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,n,r,i){if(this._deleted)return()=>{};const s=typeof n=="function"?n:n.next.bind(n);let o=!1;const a=this._isInitialized?Promise.resolve():this._initializationPromise;if(fe(a,this,"internal-error"),a.then(()=>{o||s(this.currentUser)}),typeof n=="function"){const u=e.addObserver(n,r,i);return()=>{o=!0,u()}}else{const u=e.addObserver(n);return()=>{o=!0,u()}}}async directlySetCurrentUser(e){this.currentUser&&this.currentUser!==e&&this._currentUser._stopProactiveRefresh(),e&&this.isProactiveRefreshEnabled&&e._startProactiveRefresh(),this.currentUser=e,e?await this.assertedPersistence.setCurrentUser(e):await this.assertedPersistence.removeCurrentUser()}queue(e){return this.operations=this.operations.then(e,e),this.operations}get assertedPersistence(){return fe(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){!e||this.frameworks.includes(e)||(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=sA(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){var e;const n={["X-Client-Version"]:this.clientVersion};this.app.options.appId&&(n["X-Firebase-gmpid"]=this.app.options.appId);const r=await((e=this.heartbeatServiceProvider.getImmediate({optional:!0}))===null||e===void 0?void 0:e.getHeartbeatsHeader());r&&(n["X-Firebase-Client"]=r);const i=await this._getAppCheckToken();return i&&(n["X-Firebase-AppCheck"]=i),n}async _getAppCheckToken(){var e;const n=await((e=this.appCheckServiceProvider.getImmediate({optional:!0}))===null||e===void 0?void 0:e.getToken());
867return n!=null&&n.error&&y6(`Error while retrieving App Check token: ${n.error}`),n==null?void 0:n.token}}function Ls(t){return xt(t)}class wx{constructor(e){this.auth=e,this.observer=null,this.addObserver=s8(n=>this.observer=n)}get next(){return fe(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}/** 868 * @license 869 * Copyright 2020 Google LLC 870 * 871 * Licensed under the Apache License, Version 2.0 (the "License"); 872 * you may not use this file except in compliance with the License. 873 * You may obtain a copy of the License at 874 * 875 * http://www.apache.org/licenses/LICENSE-2.0 876 * 877 * Unless required by applicable law or agreed to in writing, software 878 * distributed under the License is distributed on an "AS IS" BASIS, 879 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 880 * See the License for the specific language governing permissions and 881 * limitations under the License. 882 */let zd={async loadJS(){throw new Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function H6(t){zd=t}function oA(t){return zd.loadJS(t)}function q6(){return zd.recaptchaEnterpriseScript}function W6(){return zd.gapiScript}function G6(t){return`__${t}${Math.floor(Math.random()*1e6)}`}const K6="recaptcha-enterprise",Q6="NO_RECAPTCHA";class X6{constructor(e){this.type=K6,this.auth=Ls(e)}async verify(e="verify",n=!1){async function r(s){if(!n){if(s.tenantId==null&&s._agentRecaptchaConfig!=null)return s._agentRecaptchaConfig.siteKey;if(s.tenantId!=null&&s._tenantRecaptchaConfigs[s.tenantId]!==void 0)return s._tenantRecaptchaConfigs[s.tenantId].siteKey}return new Promise(async(o,a)=>{S6(s,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(u=>{if(u.recaptchaKey===void 0)a(new Error("recaptcha Enterprise site key undefined"));else{const d=new I6(u);return s.tenantId==null?s._agentRecaptchaConfig=d:s._tenantRecaptchaConfigs[s.tenantId]=d,o(d.siteKey)}}).catch(u=>{a(u)})})}function i(s,o,a){const u=window.grecaptcha;yx(u)?u.enterprise.ready(()=>{u.enterprise.execute(s,{action:e}).then(d=>{o(d)}).catch(()=>{o(Q6)})}):a(Error("No reCAPTCHA enterprise script loaded."))}return new Promise((s,o)=>{r(this.auth).then(a=>{if(!n&&yx(window.grecaptcha))i(a,s,o);else{if(typeof window>"u"){o(new Error("RecaptchaVerifier is only supported in browser"));return}let u=q6();u.length!==0&&(u+=a),oA(u).then(()=>{i(a,s,o)}).catch(d=>{o(d)})}}).catch(a=>{o(a)})})}}async function Ax(t,e,n,r=!1){const i=new X6(t);let s;try{s=await i.verify(n)}catch{s=await i.verify(n,!0)}const o=Object.assign({},e);return r?Object.assign(o,{captchaResp:s}):Object.assign(o,{captchaResponse:s}),Object.assign(o,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(o,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),o}async function Cx(t,e,n,r){var i;if(!((i=t._getRecaptchaConfig())===null||i===void 0)&&i.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")){const s=await Ax(t,e,n,n==="getOobCode");return r(t,s)}else return r(t,e).catch(async s=>{if(s.code==="auth/missing-recaptcha-token"){console.log(`${n} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`);const o=await Ax(t,e,n,n==="getOobCode");return r(t,o)}else return Promise.reject(s)})}/** 883 * @license 884 * Copyright 2020 Google LLC 885 * 886 * Licensed under the Apache License, Version 2.0 (the "License"); 887 * you may not use this file except in compliance with the License. 888 * You may obtain a copy of the License at 889 * 890 * http://www.apache.org/licenses/LICENSE-2.0 891 * 892 * Unless required by applicable law or agreed to in writing, software 893 * distributed under the License is distributed on an "AS IS" BASIS, 894 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 895 * See the License for the specific language governing permissions and 896 * limitations under the License. 897 */function Y6(t,e){const n=Vm(t,"auth");if(n.isInitialized()){const i=n.getImmediate(),s=n.getOptions();if(Yc(s,e!=null?e:{}))return i;Mn(i,"already-initialized")}return n.initialize({options:e})}function J6(t,e){const n=(e==null?void 0:e.persistence)||[],r=(Array.isArray(n)?n:[n]).map(Br);e!=null&&e.errorMap&&t._updateErrorMap(e.errorMap),t._initializeWithPersistence(r,e==null?void 0:e.popupRedirectResolver)}function Z6(t,e,n){const r=Ls(t);fe(r._canInitEmulator,r,"emulator-config-failed"),fe(/^https?:\/\//.test(e),r,"invali
897d-emulator-scheme");const i=!!(n!=null&&n.disableWarnings),s=aA(e),{host:o,port:a}=e3(e),u=a===null?"":`:${a}`;r.config.emulator={url:`${s}//${o}${u}/`},r.settings.appVerificationDisabledForTesting=!0,r.emulatorConfig=Object.freeze({host:o,port:a,protocol:s.replace(":",""),options:Object.freeze({disableWarnings:i})}),i||t3()}function aA(t){const e=t.indexOf(":");return e<0?"":t.substr(0,e+1)}function e3(t){const e=aA(t),n=/(\/\/)?([^?#/]+)/.exec(t.substr(e.length));if(!n)return{host:"",port:null};const r=n[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(r);if(i){const s=i[1];return{host:s,port:Tx(r.substr(s.length+1))}}else{const[s,o]=r.split(":");return{host:s,port:Tx(o)}}}function Tx(t){if(!t)return null;const e=Number(t);return isNaN(e)?null:e}function t3(){function t(){const e=document.createElement("p"),n=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",n.position="fixed",n.width="100%",n.backgroundColor="#ffffff",n.border=".1em solid #000000",n.color="#b50000",n.bottom="0px",n.left="0px",n.margin="0px",n.zIndex="10000",n.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}typeof console<"u"&&typeof console.info=="function"&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials."),typeof window<"u"&&typeof document<"u"&&(document.readyState==="loading"?window.addEventListener("DOMContentLoaded",t):t())}/** 898 * @license 899 * Copyright 2020 Google LLC 900 * 901 * Licensed under the Apache License, Version 2.0 (the "License"); 902 * you may not use this file except in compliance with the License. 903 * You may obtain a copy of the License at 904 * 905 * http://www.apache.org/licenses/LICENSE-2.0 906 * 907 * Unless required by applicable law or agreed to in writing, software 908 * distributed under the License is distributed on an "AS IS" BASIS, 909 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 910 * See the License for the specific language governing permissions and 911 * limitations under the License. 912 */class Wm{constructor(e,n){this.providerId=e,this.signInMethod=n}toJSON(){return Fr("not implemented")}_getIdTokenResponse(e){return Fr("not implemented")}_linkToIdToken(e,n){return Fr("not implemented")}_getReauthenticationResolver(e){return Fr("not implemented")}}async function n3(t,e){return Hi(t,"POST","/v1/accounts:signUp",e)}/** 913 * @license 914 * Copyright 2020 Google LLC 915 * 916 * Licensed under the Apache License, Version 2.0 (the "License"); 917 * you may not use this file except in compliance with the License. 918 * You may obtain a copy of the License at 919 * 920 * http://www.apache.org/licenses/LICENSE-2.0 921 * 922 * Unless required by applicable law or agreed to in writing, software 923 * distributed under the License is distributed on an "AS IS" BASIS, 924 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 925 * See the License for the specific language governing permissions and 926 * limitations under the License. 927 */async function r3(t,e){return Ud(t,"POST","/v1/accounts:signInWithPassword",Os(t,e))}/** 928 * @license 929 * Copyright 2020 Google LLC 930 * 931 * Licensed under the Apache License, Version 2.0 (the "License"); 932 * you may not use this file except in compliance with the License. 933 * You may obtain a copy of the License at 934 * 935 * http://www.apache.org/licenses/LICENSE-2.0 936 * 937 * Unless required by applicable law or agreed to in writing, software 938 * distributed under the License is distributed on an "AS IS" BASIS, 939 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 940 * See the License for the specific language governing permissions and 941 * limitations under the License. 942 */async function i3(t,e){return Ud(t,"POST","/v1/accounts:signInWithEmailLink",Os(t,e))}async function s3(t,e){return Ud(t,"POST","/v1/accounts:signInWithEmailLink",Os(t,e))}/** 943 * @license 944 * Copyright 2020 Google LLC 945 * 946 * Licensed under the Apache License, Version 2.0 (the "License"); 947 * you may not use this file except in compliance with the License. 948 * You may obtain a copy of the License at 949 * 950 * http://www.apache.org/licenses/LICENSE-2.0 951 * 952 * Unless required by applicable law or agreed to in writing, softw
952are 953 * distributed under the License is distributed on an "AS IS" BASIS, 954 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 955 * See the License for the specific language governing permissions and 956 * limitations under the License. 957 */class Dl extends Wm{constructor(e,n,r,i=null){super("password",r),this._email=e,this._password=n,this._tenantId=i}static _fromEmailAndPassword(e,n){return new Dl(e,n,"password")}static _fromEmailAndCode(e,n,r=null){return new Dl(e,n,"emailLink",r)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(e){const n=typeof e=="string"?JSON.parse(e):e;if((n==null?void 0:n.email)&&(n==null?void 0:n.password)){if(n.signInMethod==="password")return this._fromEmailAndPassword(n.email,n.password);if(n.signInMethod==="emailLink")return this._fromEmailAndCode(n.email,n.password,n.tenantId)}return null}async _getIdTokenResponse(e){switch(this.signInMethod){case"password":const n={returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"};return Cx(e,n,"signInWithPassword",r3);case"emailLink":return i3(e,{email:this._email,oobCode:this._password});default:Mn(e,"internal-error")}}async _linkToIdToken(e,n){switch(this.signInMethod){case"password":const r={idToken:n,returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"};return Cx(e,r,"signUpPassword",n3);case"emailLink":return s3(e,{idToken:n,email:this._email,oobCode:this._password});default:Mn(e,"internal-error")}}_getReauthenticationResolver(e){return this._getIdTokenResponse(e)}}/** 958 * @license 959 * Copyright 2020 Google LLC 960 * 961 * Licensed under the Apache License, Version 2.0 (the "License"); 962 * you may not use this file except in compliance with the License. 963 * You may obtain a copy of the License at 964 * 965 * http://www.apache.org/licenses/LICENSE-2.0 966 * 967 * Unless required by applicable law or agreed to in writing, software 968 * distributed under the License is distributed on an "AS IS" BASIS, 969 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 970 * See the License for the specific language governing permissions and 971 * limitations under the License. 972 */async function Ro(t,e){return Ud(t,"POST","/v1/accounts:signInWithIdp",Os(t,e))}/** 973 * @license 974 * Copyright 2020 Google LLC 975 * 976 * Licensed under the Apache License, Version 2.0 (the "License"); 977 * you may not use this file except in compliance with the License. 978 * You may obtain a copy of the License at 979 * 980 * http://www.apache.org/licenses/LICENSE-2.0 981 * 982 * Unless required by applicable law or agreed to in writing, software 983 * distributed under the License is distributed on an "AS IS" BASIS, 984 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 985 * See the License for the specific language governing permissions and 986 * limitations under the License. 987 */const o3="http://localhost";class Rs extends Wm{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){const n=new Rs(e.providerId,e.signInMethod);return e.idToken||e.accessToken?(e.idToken&&(n.idToken=e.idToken),e.accessToken&&(n.accessToken=e.accessToken),e.nonce&&!e.pendingToken&&(n.nonce=e.nonce),e.pendingToken&&(n.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(n.accessToken=e.oauthToken,n.secret=e.oauthTokenSecret):Mn("argument-error"),n}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,n
987once:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){const n=typeof e=="string"?JSON.parse(e):e,{providerId:r,signInMethod:i}=n,s=Um(n,["providerId","signInMethod"]);if(!r||!i)return null;const o=new Rs(r,i);return o.idToken=s.idToken||void 0,o.accessToken=s.accessToken||void 0,o.secret=s.secret,o.nonce=s.nonce,o.pendingToken=s.pendingToken||null,o}_getIdTokenResponse(e){const n=this.buildRequest();return Ro(e,n)}_linkToIdToken(e,n){const r=this.buildRequest();return r.idToken=n,Ro(e,r)}_getReauthenticationResolver(e){const n=this.buildRequest();return n.autoCreate=!1,Ro(e,n)}buildRequest(){const e={requestUri:o3,returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{const n={};this.idToken&&(n.id_token=this.idToken),this.accessToken&&(n.access_token=this.accessToken),this.secret&&(n.oauth_token_secret=this.secret),n.providerId=this.providerId,this.nonce&&!this.pendingToken&&(n.nonce=this.nonce),e.postBody=Gl(n)}return e}}/** 988 * @license 989 * Copyright 2020 Google LLC 990 * 991 * Licensed under the Apache License, Version 2.0 (the "License"); 992 * you may not use this file except in compliance with the License. 993 * You may obtain a copy of the License at 994 * 995 * http://www.apache.org/licenses/LICENSE-2.0 996 * 997 * Unless required by applicable law or agreed to in writing, software 998 * distributed under the License is distributed on an "AS IS" BASIS, 999 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1000 * See the License for the specific language governing permissions and 1001 * limitations under the License. 1002 */function a3(t){switch(t){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}}function l3(t){const e=za(ja(t)).link,n=e?za(ja(e)).deep_link_id:null,r=za(ja(t)).deep_link_id;return(r?za(ja(r)).link:null)||r||n||e||t}class Gm{constructor(e){var n,r,i,s,o,a;const u=za(ja(e)),d=(n=u.apiKey)!==null&&n!==void 0?n:null,c=(r=u.oobCode)!==null&&r!==void 0?r:null,h=a3((i=u.mode)!==null&&i!==void 0?i:null);fe(d&&c&&h,"argument-error"),this.apiKey=d,this.operation=h,this.code=c,this.continueUrl=(s=u.continueUrl)!==null&&s!==void 0?s:null,this.languageCode=(o=u.languageCode)!==null&&o!==void 0?o:null,this.tenantId=(a=u.tenantId)!==null&&a!==void 0?a:null}static parseLink(e){const n=l3(e);try{return new Gm(n)}catch{return null}}}/** 1003 * @license 1004 * Copyright 2020 Google LLC 1005 * 1006 * Licensed under the Apache License, Version 2.0 (the "License"); 1007 * you may not use this file except in compliance with the License. 1008 * You may obtain a copy of the License at 1009 * 1010 * http://www.apache.org/licenses/LICENSE-2.0 1011 * 1012 * Unless required by applicable law or agreed to in writing, software 1013 * distributed under the License is distributed on an "AS IS" BASIS, 1014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1015 * See the License for the specific language governing permissions and 1016 * limitations under the License. 1017 */class na{constructor(){this.providerId=na.PROVIDER_ID}static credential(e,n){return Dl._fromEmailAndPassword(e,n)}static credentialWithLink(e,n){const r=Gm.parseLink(n);return fe(r,"argument-error"),Dl._fromEmailAndCode(e,r.code,r.tenantId)}}na.PROVIDER_ID="password";na.EMAIL_PASSWORD_SIGN_IN_METHOD="password";na.EMAIL_LINK_SIGN_IN_METHOD="emailLink";/** 1018 * @license 1019 * Copyright 2020 Google LLC 1020 * 1021 * Licensed under the Apache License, Version 2.0 (the "License"); 1022 * you may not use this file except in compliance with the License. 1023 * You may obtain a copy of the License at 1024 * 1025 * http://www.apache.org/licenses/LICENSE-2.0 1026 * 1027 * Unless required by applicable law or agreed to in writing, software 1028 * distributed under the License is distributed on an "AS IS" BASIS, 1029 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1030 * See the License for the specific language governing permissions and 1031 * limitations under the License. 1032 */class Km{constructor(e){this.providerId=e,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(e){this.defaultLanguageCode=e}setCustomParameters(e){return this.customParameters=e,this}getCustomParameters(){return this.customParameters}}/** 1033 * @license 1034 * Copyright 2019 Google LLC 1035 * 1036 * Licensed under the Apache License, Version 2.0 (the "License");
1037 * you may not use this file except in compliance with the License. 1038 * You may obtain a copy of the License at 1039 * 1040 * http://www.apache.org/licenses/LICENSE-2.0 1041 * 1042 * Unless required by applicable law or agreed to in writing, software 1043 * distributed under the License is distributed on an "AS IS" BASIS, 1044 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1045 * See the License for the specific language governing permissions and 1046 * limitations under the License. 1047 */class Ql extends Km{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}/** 1048 * @license 1049 * Copyright 2020 Google LLC 1050 * 1051 * Licensed under the Apache License, Version 2.0 (the "License"); 1052 * you may not use this file except in compliance with the License. 1053 * You may obtain a copy of the License at 1054 * 1055 * http://www.apache.org/licenses/LICENSE-2.0 1056 * 1057 * Unless required by applicable law or agreed to in writing, software 1058 * distributed under the License is distributed on an "AS IS" BASIS, 1059 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1060 * See the License for the specific language governing permissions and 1061 * limitations under the License. 1062 */class di extends Ql{constructor(){super("facebook.com")}static credential(e){return Rs._fromParams({providerId:di.PROVIDER_ID,signInMethod:di.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return di.credentialFromTaggedObject(e)}static credentialFromError(e){return di.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return di.credential(e.oauthAccessToken)}catch{return null}}}di.FACEBOOK_SIGN_IN_METHOD="facebook.com";di.PROVIDER_ID="facebook.com";/** 1063 * @license 1064 * Copyright 2020 Google LLC 1065 * 1066 * Licensed under the Apache License, Version 2.0 (the "License"); 1067 * you may not use this file except in compliance with the License. 1068 * You may obtain a copy of the License at 1069 * 1070 * http://www.apache.org/licenses/LICENSE-2.0 1071 * 1072 * Unless required by applicable law or agreed to in writing, software 1073 * distributed under the License is distributed on an "AS IS" BASIS, 1074 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1075 * See the License for the specific language governing permissions and 1076 * limitations under the License. 1077 */class kr extends Ql{constructor(){super("google.com"),this.addScope("profile")}static credential(e,n){return Rs._fromParams({providerId:kr.PROVIDER_ID,signInMethod:kr.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:n})}static credentialFromResult(e){return kr.credentialFromTaggedObject(e)}static credentialFromError(e){return kr.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthIdToken:n,oauthAccessToken:r}=e;if(!n&&!r)return null;try{return kr.credential(n,r)}catch{return null}}}kr.GOOGLE_SIGN_IN_METHOD="google.com";kr.PROVIDER_ID="google.com";/** 1078 * @license 1079 * Copyright 2020 Google LLC 1080 * 1081 * Licensed under the Apache License, Version 2.0 (the "License"); 1082 * you may not use this file except in compliance with the License. 1083 * You may obtain a copy of the License at 1084 * 1085 * http://www.apache.org/licenses/LICENSE-2.0 1086 * 1087 * Unless required by applicable law or agreed to in writing, software 1088 * distributed under the License is distributed on an "AS IS" BASIS, 1089 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1090 * See the License for the specific language governing permissions and 1091 * limitations under the License. 1092 */class hi extends Ql{constructor(){super("github.com")}static credential(e){return Rs._fromParams({providerId:hi.PROVIDER_ID,signInMethod:hi.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return hi.credentialFromTaggedObject(e)}static credentialFromError(e){return hi.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return hi.credential(e.oauthAccessToken)}catch{return null}}}hi.GITHUB_SIGN_IN_METHOD="github.com";hi.PROVIDER_ID="github.com";/** 1093 * @license 1094 * Copyright 2020 Google LLC 1095 * 1096 * Licensed under the Apache License, Version 2.0 (the "License");
1097 * you may not use this file except in compliance with the License. 1098 * You may obtain a copy of the License at 1099 * 1100 * http://www.apache.org/licenses/LICENSE-2.0 1101 * 1102 * Unless required by applicable law or agreed to in writing, software 1103 * distributed under the License is distributed on an "AS IS" BASIS, 1104 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1105 * See the License for the specific language governing permissions and 1106 * limitations under the License. 1107 */class fi extends Ql{constructor(){super("twitter.com")}static credential(e,n){return Rs._fromParams({providerId:fi.PROVIDER_ID,signInMethod:fi.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:n})}static credentialFromResult(e){return fi.credentialFromTaggedObject(e)}static credentialFromError(e){return fi.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthAccessToken:n,oauthTokenSecret:r}=e;if(!n||!r)return null;try{return fi.credential(n,r)}catch{return null}}}fi.TWITTER_SIGN_IN_METHOD="twitter.com";fi.PROVIDER_ID="twitter.com";/** 1108 * @license 1109 * Copyright 2020 Google LLC 1110 * 1111 * Licensed under the Apache License, Version 2.0 (the "License"); 1112 * you may not use this file except in compliance with the License. 1113 * You may obtain a copy of the License at 1114 * 1115 * http://www.apache.org/licenses/LICENSE-2.0 1116 * 1117 * Unless required by applicable law or agreed to in writing, software 1118 * distributed under the License is distributed on an "AS IS" BASIS, 1119 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1120 * See the License for the specific language governing permissions and 1121 * limitations under the License. 1122 */class Vo{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,n,r,i=!1){const s=await Nr._fromIdTokenResponse(e,r,i),o=Ix(r);return new Vo({user:s,providerId:o,_tokenResponse:r,operationType:n})}static async _forOperation(e,n,r){await e._updateTokensIfNecessary(r,!0);const i=Ix(r);return new Vo({user:e,providerId:i,_tokenResponse:r,operationType:n})}}function Ix(t){return t.providerId?t.providerId:"phoneNumber"in t?"phone":null}/** 1123 * @license 1124 * Copyright 2020 Google LLC 1125 * 1126 * Licensed under the Apache License, Version 2.0 (the "License"); 1127 * you may not use this file except in compliance with the License. 1128 * You may obtain a copy of the License at 1129 * 1130 * http://www.apache.org/licenses/LICENSE-2.0 1131 * 1132 * Unless required by applicable law or agreed to in writing, software 1133 * distributed under the License is distributed on an "AS IS" BASIS, 1134 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1135 * See the License for the specific language governing permissions and 1136 * limitations under the License. 1137 */class td extends Wr{constructor(e,n,r,i){var s;super(n.code,n.message),this.operationType=r,this.user=i,Object.setPrototypeOf(this,td.prototype),this.customData={appName:e.name,tenantId:(s=e.tenantId)!==null&&s!==void 0?s:void 0,_serverResponse:n.customData._serverResponse,operationType:r}}static _fromErrorAndOperation(e,n,r,i){return new td(e,n,r,i)}}function lA(t,e,n,r){return(e==="reauthenticate"?n._getReauthenticationResolver(t):n._getIdTokenResponse(t)).catch(s=>{throw s.code==="auth/multi-factor-auth-required"?td._fromErrorAndOperation(t,s,e,r):s})}async function u3(t,e,n=!1){const r=await kl(t,e._linkToIdToken(t.auth,await t.getIdToken()),n);return Vo._forOperation(t,"link",r)}/** 1138 * @license 1139 * Copyright 2019 Google LLC 1140 * 1141 * Licensed under the Apache License, Version 2.0 (the "License"); 1142 * you may not use this file except in compliance with the License. 1143 * You may obtain a copy of the License at 1144 * 1145 * http://www.apache.org/licenses/LICENSE-2.0 1146 * 1147 * Unless required by applicable law or agreed to in writing, software 1148 * distributed under the License is distributed on an "AS IS" BASIS, 1149 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1150 * See the License for the specific language governing permissions and 1151 * limitations under the License. 1152 */async function c3(t,e,n=!1){const{auth:r}=t;if(pr(r.app))return Promise.reject(Di(r));const i="reauthenticate";try{const s=await kl(t,lA(r,i,e,t),n);fe(s.idToken,r,"internal-error");const o=Hm(s.idToken);fe(o,r,"internal-error");const{sub:a}=o;return fe(t.uid===a,r,"user-mismatch"),Vo._forOperation(t,i,s)}catch(s){throw(s==null?void 0:s.code)==="auth/user-not-found"&&Mn(r,"user-mismatch"),s}}/** 1153 * @license 1154 * Copyright 2020 Google LLC 1155 * 1156 * Licensed under the Apache License, Version 2.0 (the "License");
1157 * you may not use this file except in compliance with the License. 1158 * You may obtain a copy of the License at 1159 * 1160 * http://www.apache.org/licenses/LICENSE-2.0 1161 * 1162 * Unless required by applicable law or agreed to in writing, software 1163 * distributed under the License is distributed on an "AS IS" BASIS, 1164 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1165 * See the License for the specific language governing permissions and 1166 * limitations under the License. 1167 */async function uA(t,e,n=!1){if(pr(t.app))return Promise.reject(Di(t));const r="signIn",i=await lA(t,r,e),s=await Vo._fromIdTokenResponse(t,r,i);return n||await t._updateCurrentUser(s.user),s}async function d3(t,e){return uA(Ls(t),e)}/** 1168 * @license 1169 * Copyright 2020 Google LLC 1170 * 1171 * Licensed under the Apache License, Version 2.0 (the "License"); 1172 * you may not use this file except in compliance with the License. 1173 * You may obtain a copy of the License at 1174 * 1175 * http://www.apache.org/licenses/LICENSE-2.0 1176 * 1177 * Unless required by applicable law or agreed to in writing, software 1178 * distributed under the License is distributed on an "AS IS" BASIS, 1179 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1180 * See the License for the specific language governing permissions and 1181 * limitations under the License. 1182 */async function h3(t){const e=Ls(t);e._getPasswordPolicyInternal()&&await e._updatePasswordPolicy()}function f3(t,e,n){return pr(t.app)?Promise.reject(Di(t)):d3(xt(t),na.credential(e,n)).catch(async r=>{throw r.code==="auth/password-does-not-meet-requirements"&&h3(t),r})}function p3(t,e,n,r){return xt(t).onIdTokenChanged(e,n,r)}function m3(t,e,n){return xt(t).beforeAuthStateChanged(e,n)}function g3(t,e,n,r){return xt(t).onAuthStateChanged(e,n,r)}const nd="__sak";/** 1183 * @license 1184 * Copyright 2019 Google LLC 1185 * 1186 * Licensed under the Apache License, Version 2.0 (the "License"); 1187 * you may not use this file except in compliance with the License. 1188 * You may obtain a copy of the License at 1189 * 1190 * http://www.apache.org/licenses/LICENSE-2.0 1191 * 1192 * Unless required by applicable law or agreed to in writing, software 1193 * distributed under the License is distributed on an "AS IS" BASIS, 1194 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1195 * See the License for the specific language governing permissions and 1196 * limitations under the License. 1197 */class cA{constructor(e,n){this.storageRetriever=e,this.type=n}_isAvailable(){try{return this.storage?(this.storage.setItem(nd,"1"),this.storage.removeItem(nd),Promise.resolve(!0)):Promise.resolve(!1)}catch{return Promise.resolve(!1)}}_set(e,n){return this.storage.setItem(e,JSON.stringify(n)),Promise.resolve()}_get(e){const n=this.storage.getItem(e);return Promise.resolve(n?JSON.parse(n):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}}/** 1198 * @license 1199 * Copyright 2020 Google LLC 1200 * 1201 * Licensed under the Apache License, Version 2.0 (the "License"); 1202 * you may not use this file except in compliance with the License. 1203 * You may obtain a copy of the License at 1204 * 1205 * http://www.apache.org/licenses/LICENSE-2.0 1206 * 1207 * Unless required by applicable law or agreed to in writing, software 1208 * distributed under the License is distributed on an "AS IS" BASIS, 1209 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1210 * See the License for the specific language governing permissions and 1211 * limitations under the License. 1212 */function y3(){const t=Ot();return qm(t)||$d(t)}const v3=1e3,x3=10;class dA extends cA{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(e,n)=>this.onStorageEvent(e,n),this.listeners={},this.localCache={},this.pollTimer=null,this.safariLocalStorageNotSynced=y3()&&M6(),this.fallbackToPolling=iA(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(const n of Object.keys(this.listeners)){const r=this.storage.getItem(n),i=this.localCache[n];r!==i&&e(n,i,r)}}onStorageEvent(e,n=!1){if(!e.key){this.forAllChangedKeys((o,a,u)=>{this.notifyListeners(o,u)});return}const r=e.key;if(n?this.detachListener():this.stopPolling(),this.safariLocalStorageNotSynced){const o=this.storage.getItem(r);if(e.newValue!==o)e.newValue!==null?this.storage.setItem(r,e.newValue):this.storage.removeItem(r);else if(this.localCache[r]===e.newValue&&!n)return}const i=()=>{const o=this.storage.getItem(r);!n&&this.localCache[r]===o||this.notifyListeners(r,o)},s=this.storage.getItem(r);L6()&&s!==e.newValue&&e.newValue!==e.oldValue?setTimeout(i,x3):i()}notifyListeners(e,n){this.localCache[e]=n;const r=this.listeners[e];if(r)for(const i of Array.from(r))i(n&&JSON.parse(n))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((e,n,r)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:n,newValue:r}),!0)})},v3)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,n){Object.keys(this.listeners).length===0&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(n)}_removeListener(e,n){this.listeners[e]&&(this.listeners[e].delete(n),this.listeners[e].size===0&&delete this.listeners[e]),Ob
1212ject.keys(this.listeners).length===0&&(this.detachListener(),this.stopPolling())}async _set(e,n){await super._set(e,n),this.localCache[e]=JSON.stringify(n)}async _get(e){const n=await super._get(e);return this.localCache[e]=JSON.stringify(n),n}async _remove(e){await super._remove(e),delete this.localCache[e]}}dA.type="LOCAL";const _3=dA;/** 1213 * @license 1214 * Copyright 2020 Google LLC 1215 * 1216 * Licensed under the Apache License, Version 2.0 (the "License"); 1217 * you may not use this file except in compliance with the License. 1218 * You may obtain a copy of the License at 1219 * 1220 * http://www.apache.org/licenses/LICENSE-2.0 1221 * 1222 * Unless required by applicable law or agreed to in writing, software 1223 * distributed under the License is distributed on an "AS IS" BASIS, 1224 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1225 * See the License for the specific language governing permissions and 1226 * limitations under the License. 1227 */class hA extends cA{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,n){}_removeListener(e,n){}}hA.type="SESSION";const fA=hA;/** 1228 * @license 1229 * Copyright 2019 Google LLC 1230 * 1231 * Licensed under the Apache License, Version 2.0 (the "License"); 1232 * you may not use this file except in compliance with the License. 1233 * You may obtain a copy of the License at 1234 * 1235 * http://www.apache.org/licenses/LICENSE-2.0 1236 * 1237 * Unless required by applicable law or agreed to in writing, software 1238 * distributed under the License is distributed on an "AS IS" BASIS, 1239 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1240 * See the License for the specific language governing permissions and 1241 * limitations under the License. 1242 */function E3(t){return Promise.all(t.map(async e=>{try{return{fulfilled:!0,value:await e}}catch(n){return{fulfilled:!1,reason:n}}}))}/** 1243 * @license 1244 * Copyright 2019 Google LLC 1245 * 1246 * Licensed under the Apache License, Version 2.0 (the "License"); 1247 * you may not use this file except in compliance with the License. 1248 * You may obtain a copy of the License at 1249 * 1250 * http://www.apache.org/licenses/LICENSE-2.0 1251 * 1252 * Unless required by applicable law or agreed to in writing, software 1253 * distributed under the License is distributed on an "AS IS" BASIS, 1254 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1255 * See the License for the specific language governing permissions and 1256 * limitations under the License. 1257 */class jd{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){const n=this.receivers.find(i=>i.isListeningto(e));if(n)return n;const r=new jd(e);return this.receivers.push(r),r}isListeningto(e){return this.eventTarget===e}async handleEvent(e){const n=e,{eventId:r,eventType:i,data:s}=n.data,o=this.handlersMap[i];if(!(o!=null&&o.size))return;n.ports[0].postMessage({status:"ack",eventId:r,eventType:i});const a=Array.from(o).map(async d=>d(n.origin,s)),u=await E3(a);n.ports[0].postMessage({status:"done",eventId:r,eventType:i,response:u})}_subscribe(e,n){Object.keys(this.handlersMap).length===0&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(n)}_unsubscribe(e,n){this.handlersMap[e]&&n&&this.handlersMap[e].delete(n),(!n||this.handlersMap[e].size===0)&&delete this.handlersMap[e],Object.keys(this.handlersMap).length===0&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}jd.receivers=[];/** 1258 * @license 1259 * Copyright 2020 Google LLC 1260 * 1261 * Licensed under the Apache License, Version 2.0 (the "License"); 1262 * you may not use this file except in compliance with the License. 1263 * You may obtain a copy of the License at 1264 * 1265 * http://www.apache.org/licenses/LICENSE-2.0 1266 * 1267 * Unless required by applicable law or agreed to in writing, software 1268 * distributed under the License is distributed on an "AS IS" BASIS, 1269 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1270 * See the License for the specific language governing permissions and 1271 * limitations under the License. 1272 */function Qm(t="",e=10){let n="";for(let r=0;r<e;r++)n+=Math.floor(Math.random()*10);return t+n}/** 1273 * @license 1274 * Copyright 2019 Google LLC 1275 * 1276 * Licensed under the Apache License, Version 2.0 (the "License");
1277 * you may not use this file except in compliance with the License. 1278 * You may obtain a copy of the License at 1279 * 1280 * http://www.apache.org/licenses/LICENSE-2.0 1281 * 1282 * Unless required by applicable law or agreed to in writing, software 1283 * distributed under the License is distributed on an "AS IS" BASIS, 1284 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1285 * See the License for the specific language governing permissions and 1286 * limitations under the License. 1287 */class w3{constructor(e){this.target=e,this.handlers=new Set}removeMessageHandler(e){e.messageChannel&&(e.messageChannel.port1.removeEventListener("message",e.onMessage),e.messageChannel.port1.close()),this.handlers.delete(e)}async _send(e,n,r=50){const i=typeof MessageChannel<"u"?new MessageChannel:null;if(!i)throw new Error("connection_unavailable");let s,o;return new Promise((a,u)=>{const d=Qm("",20);i.port1.start();const c=setTimeout(()=>{u(new Error("unsupported_event"))},r);o={messageChannel:i,onMessage(h){const p=h;if(p.data.eventId===d)switch(p.data.status){case"ack":clearTimeout(c),s=setTimeout(()=>{u(new Error("timeout"))},3e3);break;case"done":clearTimeout(s),a(p.data.response);break;default:clearTimeout(c),clearTimeout(s),u(new Error("invalid_response"));break}}},this.handlers.add(o),i.port1.addEventListener("message",o.onMessage),this.target.postMessage({eventType:e,eventId:d,data:n},[i.port2])}).finally(()=>{o&&this.removeMessageHandler(o)})}}/** 1288 * @license 1289 * Copyright 2020 Google LLC 1290 * 1291 * Licensed under the Apache License, Version 2.0 (the "License"); 1292 * you may not use this file except in compliance with the License. 1293 * You may obtain a copy of the License at 1294 * 1295 * http://www.apache.org/licenses/LICENSE-2.0 1296 * 1297 * Unless required by applicable law or agreed to in writing, software 1298 * distributed under the License is distributed on an "AS IS" BASIS, 1299 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1300 * See the License for the specific language governing permissions and 1301 * limitations under the License. 1302 */function yr(){return window}function A3(t){yr().location.href=t}/** 1303 * @license 1304 * Copyright 2020 Google LLC. 1305 * 1306 * Licensed under the Apache License, Version 2.0 (the "License"); 1307 * you may not use this file except in compliance with the License. 1308 * You may obtain a copy of the License at 1309 * 1310 * http://www.apache.org/licenses/LICENSE-2.0 1311 * 1312 * Unless required by applicable law or agreed to in writing, software 1313 * distributed under the License is distributed on an "AS IS" BASIS, 1314 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1315 * See the License for the specific language governing permissions and 1316 * limitations under the License. 1317 */function pA(){return typeof yr().WorkerGlobalScope<"u"&&typeof yr().importScripts=="function"}async function C3(){if(!(navigator!=null&&navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch{return null}}function T3(){var t;return((t=navigator==null?void 0:navigator.serviceWorker)===null||t===void 0?void 0:t.controller)||null}function I3(){return pA()?self:null}/** 1318 * @license 1319 * Copyright 2019 Google LLC 1320 * 1321 * Licensed under the Apache License, Version 2.0 (the "License"); 1322 * you may not use this file except in compliance with the License. 1323 * You may obtain a copy of the License at 1324 * 1325 * http://www.apache.org/licenses/LICENSE-2.0 1326 * 1327 * Unless required by applicable law or agreed to in writing, software 1328 * distributed under the License is distributed on an "AS IS" BASIS, 1329 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1330 * See the License for the specific language governing permissions and 1331 * limitations under the License. 1332 */const mA="firebaseLocalStorageDb",S3=1,rd="firebaseLocalStorage",gA="fbase_key";class Xl{constructor(e){this.request=e}toPromise(){return new Promise((e,n)=>{this.request.addEventListener("success",()=>{e(this.request.result)}),this.request.addEventListener("error",()=>{n(this.request.error)})})}}function Hd(t,e){return t.transaction([rd],e?"readwrite":"readonly").objectStore(rd)}function R3(){const t=indexedDB.deleteDatabase(mA);
1332return new Xl(t).toPromise()}function op(){const t=indexedDB.open(mA,S3);return new Promise((e,n)=>{t.addEventListener("error",()=>{n(t.error)}),t.addEventListener("upgradeneeded",()=>{const r=t.result;try{r.createObjectStore(rd,{keyPath:gA})}catch(i){n(i)}}),t.addEventListener("success",async()=>{const r=t.result;r.objectStoreNames.contains(rd)?e(r):(r.close(),await R3(),e(await op()))})})}async function Sx(t,e,n){const r=Hd(t,!0).put({[gA]:e,value:n});return new Xl(r).toPromise()}async function P3(t,e){const n=Hd(t,!1).get(e),r=await new Xl(n).toPromise();return r===void 0?null:r.value}function Rx(t,e){const n=Hd(t,!0).delete(e);return new Xl(n).toPromise()}const k3=800,D3=3;class yA{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}async _openDb(){return this.db?this.db:(this.db=await op(),this.db)}async _withRetries(e){let n=0;for(;;)try{const r=await this._openDb();return await e(r)}catch(r){if(n++>D3)throw r;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return pA()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=jd._getInstance(I3()),this.receiver._subscribe("keyChanged",async(e,n)=>({keyProcessed:(await this._poll()).includes(n.key)}
1332)),this.receiver._subscribe("ping",async(e,n)=>["keyChanged"])}async initializeSender(){var e,n;if(this.activeServiceWorker=await C3(),!this.activeServiceWorker)return;this.sender=new w3(this.activeServiceWorker);const r=await this.sender._send("ping",{},800);!r||((e=r[0])===null||e===void 0?void 0:e.fulfilled)&&((n=r[0])===null||n===void 0?void 0:n.value.includes("keyChanged"))&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){if(!(!this.sender||!this.activeServiceWorker||T3()!==this.activeServiceWorker))try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch{}}async _isAvailable(){try{if(!indexedDB)return!1;const e=await op();return await Sx(e,nd,"1"),await Rx(e,nd),!0}catch{}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,n){return this._withPendingWrite(async()=>(await this._withRetries(r=>Sx(r,e,n)),this.localCache[e]=n,this.notifyServiceWorker(e)))}async _get(e){const n=await this._withRetries(r=>P3(r,e));return this.localCache[e]=n,n}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(n=>Rx(n,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){const e=await this._withRetries(i=>{const s=Hd(i,!1).getAll();return new Xl(s).toPromise()});if(!e)return[];if(this.pendingWrites!==0)return[];const n=[],r=new Set;if(e.length!==0)for(const{fbase_key:i,value:s}of e)r.add(i),JSON.stringify(this.localCache[i])!==JSON.stringify(s)&&(this.notifyListeners(i,s),n.push(i));for(const i of Object.keys(this.localCache))this.localCache[i]&&!r.has(i)&&(this.notifyListeners(i,null),n.push(i));return n}notifyListeners(e,n){this.localCache[e]=n;const r=this.listeners[e];if(r)for(const i of Array.from(r))i(n)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),k3)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,n){Object.keys(this.listeners).length===0&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(n)}_removeListener(e,n){this.listeners[e]&&(this.listeners[e].delete(n),this.listeners[e].size===0&&delete this.listeners[e]),Ob
vendor: 4,318 bytes, lines 1332-1381
1332ject.keys(this.listeners).length===0&&this.stopPolling()}}yA.type="LOCAL";const b3=yA;new Kl(3e4,6e4);/** 1333 * @license 1334 * Copyright 2021 Google LLC 1335 * 1336 * Licensed under the Apache License, Version 2.0 (the "License"); 1337 * you may not use this file except in compliance with the License. 1338 * You may obtain a copy of the License at 1339 * 1340 * http://www.apache.org/licenses/LICENSE-2.0 1341 * 1342 * Unless required by applicable law or agreed to in writing, software 1343 * distributed under the License is distributed on an "AS IS" BASIS, 1344 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1345 * See the License for the specific language governing permissions and 1346 * limitations under the License. 1347 */function vA(t,e){return e?Br(e):(fe(t._popupRedirectResolver,t,"argument-error"),t._popupRedirectResolver)}/** 1348 * @license 1349 * Copyright 2019 Google LLC 1350 * 1351 * Licensed under the Apache License, Version 2.0 (the "License"); 1352 * you may not use this file except in compliance with the License. 1353 * You may obtain a copy of the License at 1354 * 1355 * http://www.apache.org/licenses/LICENSE-2.0 1356 * 1357 * Unless required by applicable law or agreed to in writing, software 1358 * distributed under the License is distributed on an "AS IS" BASIS, 1359 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1360 * See the License for the specific language governing permissions and 1361 * limitations under the License. 1362 */class Xm extends Wm{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return Ro(e,this._buildIdpRequest())}_linkToIdToken(e,n){return Ro(e,this._buildIdpRequest(n))}_getReauthenticationResolver(e){return Ro(e,this._buildIdpRequest())}_buildIdpRequest(e){const n={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return e&&(n.idToken=e),n}}function F3(t){return uA(t.auth,new Xm(t),t.bypassAuthState)}function N3(t){const{auth:e,user:n}=t;return fe(n,e,"internal-error"),c3(n,new Xm(t),t.bypassAuthState)}async function B3(t){const{auth:e,user:n}=t;return fe(n,e,"internal-error"),u3(n,new Xm(t),t.bypassAuthState)}/** 1363 * @license 1364 * Copyright 2020 Google LLC 1365 * 1366 * Licensed under the Apache License, Version 2.0 (the "License"); 1367 * you may not use this file except in compliance with the License. 1368 * You may obtain a copy of the License at 1369 * 1370 * http://www.apache.org/licenses/LICENSE-2.0 1371 * 1372 * Unless required by applicable law or agreed to in writing, software 1373 * distributed under the License is distributed on an "AS IS" BASIS, 1374 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1375 * See the License for the specific language governing permissions and 1376 * limitations under the License. 1377 */class xA{constructor(e,n,r,i,s=!1){this.auth=e,this.resolver=r,this.user=i,this.bypassAuthState=s,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(n)?n:[n]}execute(){return new Promise(async(e,n)=>{this.pendingPromise={resolve:e,reject:n};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(r){this.reject(r)}})}async onAuthEvent(e){const{urlResponse:n,sessionId:r,postBody:i,tenantId:s,error:o,type:a}=e;if(o){this.reject(o);return}const u={auth:this.auth,requestUri:n,sessionId:r,tenantId:s||void 0,postBody:i||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(a)(u))}catch(d){this.reject(d)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return F3;case"linkViaPopup":case"linkViaRedirect":return B3;case"reauthViaPopup":case"reauthViaRedirect":return N3;default:Mn(this.auth,"internal-error")}}resolve(e){zr(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){zr(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}/** 1378 * @license 1379 * Copyright 2020 Google LLC 1380 * 1381 * Licensed under the Apache License, Version 2.0 (the "License");
1382 * you may not use this file except in compliance with the License. 1383 * You may obtain a copy of the License at 1384 * 1385 * http://www.apache.org/licenses/LICENSE-2.0 1386 * 1387 * Unless required by applicable law or agreed to in writing, software 1388 * distributed under the License is distributed on an "AS IS" BASIS, 1389 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1390 * See the License for the specific language governing permissions and 1391 * limitations under the License. 1392 */const O3=new Kl(2e3,1e4);async function L3(t,e,n){if(pr(t.app))return Promise.reject(Zn(t,"operation-not-supported-in-this-environment"));const r=Ls(t);v6(t,e,Km);const i=vA(r,n);return new ps(r,"signInViaPopup",e,i).executeNotNull()}class ps extends xA{constructor(e,n,r,i,s){super(e,n,i,s),this.provider=r,this.authWindow=null,this.pollId=null,ps.currentPopupAction&&ps.currentPopupAction.cancel(),ps.currentPopupAction=this}async executeNotNull(){const e=await this.execute();return fe(e,this.auth,"internal-error"),e}async onExecution(){zr(this.filter.length===1,"Popup operations only handle one event");const e=Qm();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],e),this.authWindow.associatedEvent=e,this.resolver._originValidation(this.auth).catch(n=>{this.reject(n)}),this.resolver._isIframeWebStorageSupported(this.auth,n=>{n||this.reject(Zn(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){var e;return((e=this.authWindow)===null||e===void 0?void 0:e.associatedEvent)||null}cancel(){this.reject(Zn(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,ps.
1392currentPopupAction=null}pollUserCancellation(){const e=()=>{var n,r;if(!((r=(n=this.authWindow)===null||n===void 0?void 0:n.window)===null||r===void 0)&&r.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(Zn(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(e,O3.get())};e()}}ps.currentPopupAction=null;/** 1393 * @license 1394 * Copyright 2020 Google LLC 1395 * 1396 * Licensed under the Apache License, Version 2.0 (the "License"); 1397 * you may not use this file except in compliance with the License. 1398 * You may obtain a copy of the License at 1399 * 1400 * http://www.apache.org/licenses/LICENSE-2.0 1401 * 1402 * Unless required by applicable law or agreed to in writing, software 1403 * distributed under the License is distributed on an "AS IS" BASIS, 1404 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1405 * See the License for the specific language governing permissions and 1406 * limitations under the License. 1407 */const M3="pendingRedirect",gc=new Map;class V3 extends xA{constructor(e,n,r=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],n,void 0,r),this.eventId=null}async execute(){let e=gc.get(this.auth._key());if(!e){try{const r=await U3(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(r)}catch(n){e=()=>Promise.reject(n)}gc.set(this.auth._key(),e)}return this.bypassAuthState||gc.set(this.auth._key(),()=>Promise.resolve(null)),e()}async onAuthEvent(e){if(e.type==="signInViaRedirect")return super.onAuthEvent(e);if(e.type==="unknown"){this.resolve(null);return}if(e.eventId){const n=await this.auth._redirectUserForId(e.eventId);if(n)return this.user=n,super.onAuthEvent(e);this.resolve(null)}}async onExecution(){}cleanUp(){}}async function U3(t,e){const n=j3(e),r=z3(t);if(!await r._isAvailable())return!1;const i=await r._get(n)==="true";return await r._remove(n),i}function $3(t,e){gc.set(t._key(),e)}function z3(t){return Br(t._redirectPersistence)}function j3(t){return mc(M3,t.config.apiKey,t.name)}async function H3(t,e,n=!1){if(pr(t.app))return Promise.reject(Di(t));const r=Ls(t),i=vA(r,e),o=await new V3(r,i,n).execute();return o&&!n&&(delete o.user._redirectEventId,await r._persistUserIfCurrent(o.user),await r._setRedirectUser(null,e)),o}/** 1408 * @license 1409 * Copyright 2020 Google LLC 1410 * 1411 * Licensed under the Apache License, Version 2.0 (the "License"); 1412 * you may not use this file except in compliance with the License. 1413 * You may obtain a copy of the License at 1414 * 1415 * http://www.apache.org/licenses/LICENSE-2.0 1416 * 1417 * Unless required by applicable law or agreed to in writing, software 1418 * distributed under the License is distributed on an "AS IS" BASIS, 1419 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1420 * See the License for the specific language governing permissions and 1421 * limitations under the License. 1422 */const q3=10*60*1e3;class W3{constructor(e){this.auth=e,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(e){this.consumers.delete(e)}onEvent(e){if(this.hasEventBeenHandled(e))return!1;let n=!1;return this.consumers.forEach(r=>{this.isEventForConsumer(e,r)&&(n=!0,this.sendToConsumer(e,r),this.saveEventToCache(e))}),this.hasHandledPotentialRedirect||!G3(e)||(this.hasHandledPotentialRedirect=!0,n||(this.queuedRedirectEvent=e,n=!0)),n}sendToConsumer(e,n){var r;if(e.error&&!_A(e)){const i=((r=e.error.code)===null||r===void 0?void 0:r.split("auth/")[1])||"internal-error";n.onError(Zn(this.auth,i))}else n.onAuthEvent(e)}isEventForConsumer(e,n){const r=n.eventId===null||!!e.eventId&&e.eventId===n.eventId;return n.filter.includes(e.type)&&r}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=q3&&this.cachedEventUids.clear(),this.cachedEventUids.has(Px(e))}saveEventToCache(e){this.cachedEventUids.add(Px(e)),this.lastProcessedEventTime=
1422Date.now()}}function Px(t){return[t.type,t.eventId,t.sessionId,t.tenantId].filter(e=>e).join("-")}function _A({type:t,error:e}){return t==="unknown"&&(e==null?void 0:e.code)==="auth/no-auth-event"}function G3(t){switch(t.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return _A(t);default:return!1}}/** 1423 * @license 1424 * Copyright 2020 Google LLC 1425 * 1426 * Licensed under the Apache License, Version 2.0 (the "License"); 1427 * you may not use this file except in compliance with the License. 1428 * You may obtain a copy of the License at 1429 * 1430 * http://www.apache.org/licenses/LICENSE-2.0 1431 * 1432 * Unless required by applicable law or agreed to in writing, software 1433 * distributed under the License is distributed on an "AS IS" BASIS, 1434 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1435 * See the License for the specific language governing permissions and 1436 * limitations under the License. 1437 */async function K3(t,e={}){return Hi(t,"GET","/v1/projects",e)}/** 1438 * @license 1439 * Copyright 2020 Google LLC 1440 * 1441 * Licensed under the Apache License, Version 2.0 (the "License"); 1442 * you may not use this file except in compliance with the License. 1443 * You may obtain a copy of the License at 1444 * 1445 * http://www.apache.org/licenses/LICENSE-2.0 1446 * 1447 * Unless required by applicable law or agreed to in writing, software 1448 * distributed under the License is distributed on an "AS IS" BASIS, 1449 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1450 * See the License for the specific language governing permissions and 1451 * limitations under the License. 1452 */const Q3=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,X3=/^https?/;async function Y3(t){if(t.config.emulator)return;const{authorizedDomains:e}=await K3(t);for(const n of e)try{if(J3(n))return}catch{}Mn(t,"unauthorized-domain")}function J3(t){const e=ip(),{protocol:n,hostname:r}=new URL(e);if(t.startsWith("chrome-extension://")){const o=new URL(t);return o.hostname===""&&r===""?n==="chrome-extension:"&&t.replace("chrome-extension://","")===e.replace("chrome-extension://",""):n==="chrome-extension:"&&o.hostname===r}if(!X3.test(n))return!1;if(Q3.test(t))return r===t;const i=t.replace(/\./g,"\\.");return new RegExp("^(.+\\."+i+"|"+i+")$","i").test(r)}/** 1453 * @license 1454 * Copyright 2020 Google LLC. 1455 * 1456 * Licensed under the Apache License, Version 2.0 (the "License"); 1457 * you may not use this file except in compliance with the License. 1458 * You may obtain a copy of the License at 1459 * 1460 * http://www.apache.org/licenses/LICENSE-2.0 1461 * 1462 * Unless required by applicable law or agreed to in writing, software 1463 * distributed under the License is distributed on an "AS IS" BASIS, 1464 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1465 * See the License for the specific language governing permissions and 1466 * limitations under the License. 1467 */const Z3=new Kl(3e4,6e4);function kx(){const t=yr().___jsl;if(t!=null&&t.H){for(const e of Object.keys(t.H))if(t.H[e].r=t.H[e].r||[],t.H[e].L=t.H[e].L||[],t.H[e].r=[...t.H[e].L],t.CP)for(let n=0;n<t.CP.length;n++)t.CP[n]=null}}function eb(t){return new Promise((e,n)=>{var r,i,s;function o(){kx(),gapi.load("gapi.iframes",{callback:()=>{e(gapi.iframes.getContext())},ontimeout:()=>{kx(),n(Zn(t,"network-request-failed"))},timeout:Z3.get()})}if(!((i=(r=yr().gapi)===null||r===void 0?void 0:r.iframes)===null||i===void 0)&&i.Iframe)e(gapi.iframes.getContext());else if(!((s=yr().gapi)===null||s===void 0)&&s.load)o();else{const a=G6("iframefcb");return yr()[a]=()=>{gapi.load?o():n(Zn(t,"network-request-failed"))},oA(`${W6()}?onload=${a}`).catch(u=>n(u))}}).catch(e=>{throw yc=null,e})}let yc=null;function tb(t){return yc=yc||eb(t),yc}/** 1468 * @license 1469 * Copyright 2020 Google LLC. 1470 * 1471 * Licensed under the Apache License, Version 2.0 (the "License"); 1472 * you may not use this file except in compliance with the License. 1473 * You may obtain a copy of the License at 1474 * 1475 * http://www.apache.org/licenses/LICENSE-2.0 1476 * 1477 * Unless required by applicable law or agreed to in writing, software 1478 * distributed under the License is distributed on an "AS IS" BASIS, 1479 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1480 * See the License for the specific language governing permissions and 1481 * limitations under the License. 1482 */const nb=new Kl(5e3,15e3),rb="__/auth/iframe",ib="emulator/auth/iframe",sb={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},ob=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function ab(t){const e=t.config;fe(e.authDomain,t,"auth-domain-config-required");const n=e.emulator?jm(e,ib):`https://${t.config.authDomain}/${rb}`,r={apiKey:e.apiKey,appName:t.name,v:ta},i=ob.get(t.config.apiHost);i&&(r.eid=i);const s=t._getFrameworks();return s.length&&(r.fw=s.join(",")),`${n}?${Gl(r).slice(1)}`}async function lb(t){const e=await tb(t),n=yr().gapi;return fe(n,t,"internal-error"),e.open({where:document.body,url:ab(t),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:sb,dontclear:!0},r=>new Promise(async(i,s)=>{await r.restyle({setHideOnLeave:!1});const o=Zn(t,"network-request-failed"),a=yr().setTimeout(()=>{s(o)},nb.get());function u(){yr().clearTimeout(a),i(r)}r.ping(u).then(u,()=>{s(o)})}))}/** 1483 * @license 1484 * Copyright 2020 Google LLC. 1485 * 1486 * Licensed under the Apache License, Version 2.0 (the "License");
1487 * you may not use this file except in compliance with the License. 1488 * You may obtain a copy of the License at 1489 * 1490 * http://www.apache.org/licenses/LICENSE-2.0 1491 * 1492 * Unless required by applicable law or agreed to in writing, software 1493 * distributed under the License is distributed on an "AS IS" BASIS, 1494 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1495 * See the License for the specific language governing permissions and 1496 * limitations under the License. 1497 */const ub={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},cb=500,db=600,hb="_blank",fb="http://localhost";class Dx{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}}function pb(t,e,n,r=cb,i=db){const s=Math.max((window.screen.availHeight-i)/2,0).toString(),o=Math.max((window.screen.availWidth-r)/2,0).toString();let a="";const u=Object.assign(Object.assign({},ub),{width:r.toString(),height:i.toString(),top:s,left:o}),d=Ot().toLowerCase();n&&(a=Zw(d)?hb:n),Jw(d)&&(e=e||fb,u.scrollbars="yes");const c=Object.entries(u).reduce((p,[y,v])=>`${p}${y}=${v},`,"");if(O6(d)&&a!=="_self")return mb(e||"",a),new Dx(null);const h=window.open(e||"",a,c);fe(h,t,"popup-blocked");try{h.focus()}catch{}return new Dx(h)}function mb(t,e){const n=document.createElement("a");n.href=t,n.target=e;const r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}/** 1498 * @license 1499 * Copyright 2021 Google LLC 1500 * 1501 * Licensed under the Apache License, Version 2.0 (the "License"); 1502 * you may not use this file except in compliance with the License. 1503 * You may obtain a copy of the License at 1504 * 1505 * http://www.apache.org/licenses/LICENSE-2.0 1506 * 1507 * Unless required by applicable law or agreed to in writing, software 1508 * distributed under the License is distributed on an "AS IS" BASIS, 1509 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1510 * See the License for the specific language governing permissions and 1511 * limitations under the License. 1512 */const gb="__/auth/handler",yb="emulator/auth/handler",vb=encodeURIComponent("fac");async function bx(t,e,n,r,i,s){fe(t.config.authDomain,t,"auth-domain-config-required"),fe(t.config.apiKey,t,"invalid-api-key");const o={apiKey:t.config.apiKey,appName:t.name,authType:n,redirectUrl:r,v:ta,eventId:i};if(e instanceof Km){e.setDefaultLanguage(t.languageCode),o.providerId=e.providerId||"",i8(e.getCustomParameters())||(o.customParameters=JSON.stringify(e.getCustomParameters()));for(const[c,h]of Object.entries(s||{}))o[c]=h}if(e instanceof Ql){const c=e.getScopes().filter(h=>h!=="");c.length>0&&(o.scopes=c.join(","))}t.tenantId&&(o.tid=t.tenantId);const a=o;for(const c of Object.keys(a))a[c]===void 0&&delete a[c];const u=await t._getAppCheckToken(),d=u?`#${vb}=${encodeURIComponent(u)}`:"";return`${xb(t)}?${Gl(a).slice(1)}${d}`}function xb({config:t}){return t.emulator?jm(t,yb):`https://${t.authDomain}/${gb}`}/** 1513 * @license 1514 * Copyright 2020 Google LLC 1515 * 1516 * Licensed under the Apache License, Version 2.0 (the "License"); 1517 * you may not use this file except in compliance with the License. 1518 * You may obtain a copy of the License at 1519 * 1520 * http://www.apache.org/licenses/LICENSE-2.0 1521 * 1522 * Unless required by applicable law or agreed to in writing, software 1523 * distributed under the License is distributed on an "AS IS" BASIS, 1524 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1525 * See the License for the specific language governing permissions and 1526 * limitations under the License. 1527 */const B0="webStorageSupport";class _b{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=fA,this._completeRedirectFn=H3,this._overrideRedirectResult=$3}async _openPopup(e,n,r,i){var s;zr((s=this.eventManagers[e._key()])===null||s===void 0?void 0:s.manager,"_initialize() not called before _openPopup()");const o=await bx(e,n,r,ip(),i);return pb(e,o,Qm())}async _openRedirect(e,n,r,i){await this._originValidation(e);const s=await bx(e,n,r,ip(),i);return A3(s),new Promise(()=>{})}_initialize(e){const n=e._key();if(this.eventManagers[n]){const{manager:i,promise:s}=this.eventManagers[n];return i?Promise.resolve(i):(zr(s,"If manager is not set, promise should be"),s)}const r=this.initAndGetManager(e);return this.eventManagers[n]={promise:r},r.catch(()=>{delete this.eventManagers[n]}),r}async initAndGetManager(e){const n=await lb(e),r=new W3(e);return n.register("authEvent",i=>
1527(fe(i==null?void 0:i.authEvent,e,"invalid-auth-event"),{status:r.onEvent(i.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:r},this.iframes[e._key()]=n,r}_isIframeWebStorageSupported(e,n){this.iframes[e._key()].send(B0,{type:B0},i=>{var s;const o=(s=i==null?void 0:i[0])===null||s===void 0?void 0:s[B0];o!==void 0&&n(!!o),Mn(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){const n=e._key();return this.originValidationPromises[n]||(this.originValidationPromises[n]=Y3(e)),this.originValidationPromises[n]}get _shouldInitProactively(){return iA()||qm()||$d()}}const Eb=_b;var Fx="@firebase/auth",Nx="1.7.4";/** 1528 * @license 1529 * Copyright 2020 Google LLC 1530 * 1531 * Licensed under the Apache License, Version 2.0 (the "License"); 1532 * you may not use this file except in compliance with the License. 1533 * You may obtain a copy of the License at 1534 * 1535 * http://www.apache.org/licenses/LICENSE-2.0 1536 * 1537 * Unless required by applicable law or agreed to in writing, software 1538 * distributed under the License is distributed on an "AS IS" BASIS, 1539 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1540 * See the License for the specific language governing permissions and 1541 * limitations under the License. 1542 */class wb{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),((e=this.auth.currentUser)===null||e===void 0?void 0:e.uid)||null}async getToken(e){return this.assertAuthConfigured(),await this.auth._initializationPromise,this.auth.currentUser?{accessToken:await this.auth.currentUser.getIdToken(e)}:null}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;const n=this.auth.onIdTokenChanged(r=>{e((r==null?void 0:r.stsTokenManager.accessToken)||null)});this.internalListeners.set(e,n),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();const n=this.internalListeners.get(e);!n||(this.internalListeners.delete(e),n(),this.updateProactiveRefresh())}assertAuthConfigured(){fe(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}/** 1543 * @license 1544 * Copyright 2020 Google LLC 1545 * 1546 * Licensed under the Apache License, Version 2.0 (the "License"); 1547 * you may not use this file except in compliance with the License. 1548 * You may obtain a copy of the License at 1549 * 1550 * http://www.apache.org/licenses/LICENSE-2.0 1551 * 1552 * Unless required by applicable law or agreed to in writing, software 1553 * distributed under the License is distributed on an "AS IS" BASIS, 1554 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1555 * See the License for the specific language governing permissions and 1556 * limitations under the License. 1557 */function Ab(t){switch(t){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}function Cb(t){Mo(new Is("auth",(e,{options:n})=>{const r=e.getProvider("app").getImmediate(),i=e.getProvider("heartbeat"),s=e.getProvider("app-check-internal"),{apiKey:o,authDomain:a}=r.options;fe(o&&!o.includes(":"),"invalid-api-key",{appName:r.name});const u={apiKey:o,authDomain:a,clientPlatform:t,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:sA(t)},d=new j6(r,i,s,u);return J6(d,n),d},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,n,r)=>{e.getProvider("auth-internal").initialize()})),Mo(new Is("auth-internal",e=>{const n=Ls(e.getProvider("auth").getImmediate());return(r=>new wb(r))(n)},"PRIVATE").setInstantiationMode("EXPLICIT")),ki(Fx,Nx,Ab(t)),ki(Fx,Nx,"esm2017")}/** 1558 * @license 1559 * Copyright 2021 Google LLC 1560 * 1561 * Licensed under the Apache License, Version 2.0 (the "License"); 1562 * you may not use this file except in compliance with the License. 1563 * You may obtain a copy of the License at 1564 * 1565 * http://www.apache.org/licenses/LICENSE-2.0 1566 * 1567 * Unless required by applicable law or agreed to in writing, softw
vendor: 54,398 bytes, lines 1567-1598
1567are 1568 * distributed under the License is distributed on an "AS IS" BASIS, 1569 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1570 * See the License for the specific language governing permissions and 1571 * limitations under the License. 1572 */const Tb=5*60,Ib=Lw("authIdTokenMaxAge")||Tb;let Bx=null;const Sb=t=>async e=>{const n=e&&await e.getIdTokenResult(),r=n&&(new Date().getTime()-Date.parse(n.issuedAtTime))/1e3;if(r&&r>Ib)return;const i=n==null?void 0:n.token;Bx!==i&&(Bx=i,await fetch(t,{method:i?"POST":"DELETE",headers:i?{Authorization:`Bearer ${i}`}:{}}))};function Rb(t=$w()){const e=Vm(t,"auth");if(e.isInitialized())return e.getImmediate();const n=Y6(t,{popupRedirectResolver:Eb,persistence:[b3,_3,fA]}),r=Lw("authTokenSyncURL");if(r&&typeof isSecureContext=="boolean"&&isSecureContext){const s=new URL(r,location.origin);if(location.origin===s.origin){const o=Sb(s.toString());m3(n,o,()=>o(n.currentUser)),p3(n,a=>o(a))}}const i=Bw("auth");return i&&Z6(n,`http://${i}`),n}function Pb(){var t,e;return(e=(t=document.getElementsByTagName("head"))===null||t===void 0?void 0:t[0])!==null&&e!==void 0?e:document}H6({loadJS(t){return new Promise((e,n)=>{const r=document.createElement("script");r.setAttribute("src",t),r.onload=e,r.onerror=i=>{const s=Zn("internal-error");s.customData=i,n(s)},r.type="text/javascript",r.charset="UTF-8",Pb().appendChild(r)})},gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="});Cb("Browser");var Ox=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/** @license 1573Copyright The Closure Library Authors. 1574SPDX-License-Identifier: Apache-2.0 1575*/var xs,EA;(function(){var t;/** @license 1576 1577 Copyright The Closure Library Authors. 1578 SPDX-License-Identifier: Apache-2.0 1579*/function e(C,_){function T(){}T.prototype=_.prototype,C.D=_.prototype,C.prototype=new T,C.prototype.constructor=C,C.C=function(w,S,D){for(var P=Array(arguments.length-2),N=2;N<arguments.length;N++)P[N-2]=arguments[N];return _.prototype[S].apply(w,P)}}function n(){this.blockSize=-1}function r(){this.blockSize=-1,this.blockSize=64,this.g=Array(4),this.B=Array(this.blockSize),this.o=this.h=0,this.s()}e(r,n),r.prototype.s=function(){this.g[0]=1732584193,this.g[1]=4023233417,this.g[2]=2562383102,this.g[3]=271733878,this.o=this.h=0};function i(C,_,T){T||(T=0);var w=Array(16);if(typeof _=="string")for(var S=0;16>S;++S)w[S]=_.charCodeAt(T++)|_.charCodeAt(T++)<<8|_.charCodeAt(T++)<<16|_.charCodeAt(T++)<<24;else for(S=0;16>S;++S)w[S]=_[T++]|_[T++]<<8|_[T++]<<16|_[T++]<<24;_=C.g[0],T=C.g[1],S=C.g[2];var D=C.g[3],P=_+(D^T&(S^D))+w[0]+3614090360&4294967295;_=T+(P<<7&4294967295|P>>>25),P=D+(S^_&(T^S))+w[1]+3905402710&4294967295,D=_+(P<<12&4294967295|P>>>20),P=S+(T^D&(_^T))+w[2]+606105819&4294967295,S=D+(P<<17&4294967295|P>>>15),P=T+(_^S&(D^_))+w[3]+3250441966&4294967295,T=S+(P<<22&4294967295|P>>>10),P=_+(D^T&(S^D))+w[4]+4118548399&4294967295,_=T+(P<<7&4294967295|P>>>25),P=D+(S^_&(T^S))+w[5]+1200080426&4294967295,D=_+(P<<12&4294967295|P>>>20),P=S+(T^D&(_^T))+w[6]+2821735955&4294967295,S=D+(P<<17&4294967295|P>>>15),P=T+(_^S&(D^_))+w[7]+4249261313&4294967295,T=S+(P<<22&4294967295|P>>>10),P=_+(D^T&(S^D))+w[8]+1770035416&4294967295,_=T+(P<<7&4294967295|P>>>25),P=D+(S^_&(T^S))+w[9]+2336552879&4294967295,D=_+(P<<12&4294967295|P>>>20),P=S+(T^D&(_^T))+w[10]+4294925233&4294967295,S=D+(P<<17&4294967295|P>>>15),P=T+(_^S&(D^_))+w[11]+2304563134&4294967295,T=S+(P<<22&4294967295|P>>>10),P=_+(D^T&(S^D))+w[12]+1804603682&4294967295,_=T+(P<<7&4294967295|P>>>25),P=D+(S^_&(T^S))+w[13]+4254626195&4294967295,D=_+(P<<12&4294967295|P>>>20),P=S+(T^D&(_^T))+w[14]+2792965006&4294967295,S=D+(P<<17&4294967295|P>>>15),P=T+(_^S&(D^_))+w[15]+1236535329&4294967295,T=S+(P<<22&4294967295|P>>>10),P=_+(S^D&(T^S))+w[1]+4129170786&4294967295,_=T+(P<<5&4294967295|P>>>27),P=D+(T^S&(_^T))+w[6]+3225465664&4294967295,D=_+(P<<9&4294967295|P>>>23),P=S+(_^T&(D^_))+w[11]+643717713&4294967295,S=D+(P<<14&4294967295|P>>>18),P=T+(D^_&(S^D))+w[0]+3921069994&4294967295,T=S+(P<<20&4294967295|P>>>12),P=_+(S^D&(T^S))+w[5]+3593408605&4294967295,_=T+(P<<5&4294967295|P>>>27),P=D+(T^S&(_^T))+w[10]+38016083&4294967295,D=_+(P<<9&4294967295|P>>>23),P=S+(_^T&(D^_))+w[15]+3634488961&4294967295,S=D+(P<<14&4294967295|P>>>18),P=T+(D^_&(S^D))+w[4]+3889429448&4294967295,T=S+(P<<20&4294967295|P>>>12),P=_+(S^D&(T^S))+w[9]+568446438&4294967295,_=T+(P<<5&4294967295|P>>>27),P=D+(T^S&(_^T))+w[14]+3275163606&4294967295,D=_+(P<<9&4294967295|P>>>23),P=S+(_^T&(D^_))+w[3]+4107603335&4294967295,S=D+(P<<14&4294967295|P>>>18),P=T+(D^_&(S^D))+w[8]+1163531501&4294967295,T=S+(P<<20&4294967295|P>>>12),P=_+(S^D&(T^S))+w[13]+2850285829&4294967295,_=T+(P<<5&4294967295|P>>>27),P=D+(T^S&(_^T))+w[2]+4243563512&4294967295,D=_+(P<<9&4294967295|P>>>23),P=S+(_^T&(D^_))+w[7]+1735328473&4294967295,S=D+(P<<14&4294967295|P>>>18),P=T+(D^_&(S^D))+w[12]+2368359562&4294967295,T=S+(P<<20&4294967295|P>>>12),P=_+(T^S^D)+w[5]+4294588738&4294967295,_=T+(P<<4&4294967295|P>>>28),P=D+(_^T^S)+w[8]+2272392833&4294967295,D=_+(P<<11&4294967295|P>>>21),P=S+(D^_^T)+w[11]+1839030562&4294967295,S=D+(P<<16&4294967295|P>>>16),P=T+(S^D^_)+w[14]+4259657740&4294967295,T=S+(P<<23&4294967295|P>>>9),P=_+(T^S^D)+w[1]+2763975236&4294967295,_=T+(P<<4&4294967295|P>>>28),P=D+(_^T^S)+w[4]+1272893353&4294967295,D=_+(P<<11&4294967295|P>>>21),P=S+(D^_^T)+w[7]+4139469664&4294967295,S=D+(P<<16&4294967295|P>>>16),P=T+(S^D^_)+w[10]+3200236656&4294967295,T=S+(P<<23&4294967295|P>>>9),P=_+(T^S^D)+w[13]+681279174&4294967295,_=T+(P<<4&4294967295|P>>>28),P=D+(_^T^S)+w[0]+3936430074&4294967295,D=_+(P<<11&4294967295|P>>>21),P=S+(D^_^T)+w[3]+3572445317&4294967295,S=D+(P<<16&4294967295|P>>>16),P=T+(S^D^_)+w[6]+76029189&4294967295,T=S+(P<<23&4294967295|P>>>9),P=_+(T^S^D)+w[9]+3654602809&4294967295,_=T+(P<<4&4294967295|P>>>28),P=D+(_^T^S)+w[12]+3873151461&4294967295,D=_+(P<<11&4294967295|P>>>21),P=S+(D^_^T)+w[15]+530742520&4294967295,S=D+(P<<16&4294967295|P>>>16),P=T+(S^D^_)+w[2]+3299628645&4294967295,T=S+(P<<23&4294967295|P>>>9),P=_+(S^(T|~D))+w[0]+4096336452&4294967295,_=T+(P<<6&4294967295|P>>>26),P=D+(T^(_|~S))+w[7]+1126891415&4294967295,D=_+(P<<10&4294967295|P>>>22),P=S+(_^(D|~T))+w[14]+2878612391&4294967295,S=D+(P<<15&4294967295|P>>>17),P=T+(D^(S|~_))+w[5]+4237533241&4294967295,T=S+(P<<21&4294967295|P>>>11),P=_+(S^(T|~D))+w[12]+1700485571&4294967295,_=T+(P<<6&4294967295|P>>>26),P=D+(T^(_|~S))+w[3]+2399980690&4294967295,D=_+(P<<10&4294967295|P>>>22),P=S+(_^(D|~T))+w[10]+4293915773&4294967295,S=D+(P<<15&4294967295|P>>>17),P=T+(D^(S|~_))+w[1]+2240044497&4294967295,T=S+(P<<21&4294967295|P>>>11),P=_+(S^(T|~D))+w[8]+1873313359&4294967295,_=T+(P<<6&4294967295|P>>>26),P=D+(T^(_|~S))+w[15]+4264355552&4294967295,D=_+(P<<10&4294967295|P>>>22),P=S+(_^(D|~T))+w[6]+2734768916&4294967295,S=D+(P<<15&4294967295|P>>>17),P=T+(D^(S|~_))+w[13]+1309151649&4294967295,T=S+(P<<21&4294967295|P>>>11),P=_+(S^(T|~D))+w[4]+4149444226&4294967295,_=T+(P<<6&4294967295|P>>>26),P=D+(T^(_|~S))+w[11]+3174756917&4294967295,D=_+(P<<10&4294967295|P>>>22),P=S+(_^(D|~T))+w[2]+718787259&4294967295,S=D+(P<<15&4294967295|P>>>17),P=T+(D^(S|~_))+w[9]+3951481745&4294967295,C.g[0]=C.g[0]+_&4294967295,C.g[1]=C.g[1]+(S+(P<<21&4294967295|P>>>11))&4294967295,C.g[2]=C.g[2]+S&4294967295,C.g[3]=C.g[3]+D&4294967295}r.prototype.u=function(C,_){_===void 0&&(_=C.length);for(var T=_-this.blockSize,w=this.B,S=this.h,D=0;D<_;){if(S==0)for(;D<=T;)i(this,C,D),D+=this.blockSize;if(typeof C=="string"){for(;D<_;)if(w[S++]=C.charCodeAt(D++),S==this.blockSize){i(this,w),S=0;break}}else for(;D<_;)if(w[S++]=C[D++],S==this.blockSize){i(this,w),S=0;break}}this.h=S,this.o+=_},r.prototype.v=function(){var C=Array((56>this.h?this.blockSize:2*this.blockSize)-this.h);C[0]=128;for(var _=1;_<C.length-8;++_)C[_]=0;var T=8*this.o;for(_=C.length-8;_<C.length;++_)C[_]=T&255,T/=256;for(this.u(C),C=Array(16),_=T=0;4>_;++_)for(var w=0;32>w;w+=8)C[T++]=this.g[_]>>>w&255;return C};function s(C,_){var T=a;return Object.prototype.hasOwnProperty.call(T,C)?T[C]:T[C]=_(C)}function o(C,_){this.h=_;for(var T=[],w=!0,S=C.length-1;0<=S;S--){var D=C[S]|0;w&&D==_||(T[S]=D,w=!1)}this.g=T}var a={};function u(C){return-128<=C&&128>C?s(C,function(_){return new o([_|0],0>_?-1:0)}):new o([C|0],0>C?-1:0)}function d(C){if(isNaN(C)||!isFinite(C))return h;if(0>C)return I(d(-C));for(var _=[],T=1,w=0;C>=T;w++)_[w]=C/T|0,T*=4294967296;return new o(_,0)}function c(C,_){if(C.length==0)throw Error("number format error: empty string");if(_=_||10,2>_||36<_)throw Error("radix out of range: "+_);if(C.charAt(0)=="-")return I(c(C.substring(1),_));if(0<=C.indexOf("-"))throw Error('number format error: interior "-" character');for(var T=d(Math.pow(_,8)),w=h,S=0;S<C.length;S+=8){var D=Math.min(8,C.length-S),P=parseInt(C.substring(S,S+D),_);8>D?(D=d(Math.pow(_,D)),w=w.j(D).add(d(P))):(w=w.j(T),w=w.add(d(P)))}return w}var h=u(0),p=u(1),y=u(16777216);t=o.prototype,t.m=function(){if(E(this))return-I(this).m();for(var C=0,_=1,T=0;T<this.g.length;T++){var w=this.i(T);C+=(0<=w?w:4294967296+w)*_,_*=4294967296}return C},t.toString=function(C){if(C=C||10,2>C||36<C)throw Error("radix out of range: "+C);if(v(this))return"0";if(E(this))return"-"+I(this).toString(C);for(var _=d(Math.pow(C,6)),T=this,w="";;){var S=R(T,_).g;T=A(T,S.j(_));var D=((0<T.g.length?T.g[0]:T.h)>>>0).toString(C);if(T=S,v(T))return D+w;for(;6>D.length;)D="0"+D;w=D+w}},t.i=function(C){return 0>C?0:C<this.g.length?this.g[C]:this.h};function v(C){if(C.h!=0)return!1;for(var _=0;_<C.g.length;_++)if(C.g[_]!=0)return!1;return!0}function E(C){return C.h==-1}t.l=function(C){return C=A(this,C),E(C)?-1:v(C)?0:1};function I(C){for(var _=C.g.length,T=[],w=0;w<_;w++)T[w]=~C.g[w];return new o(T,~C.h).add(p)}t.abs=function(){return E(this)?I(this):this},t.add=function(C){for(var _=Math.max(this.g.length,C.g.length),T=[],w=0,S=0;S<=_;S++){var D=w+(this.i(S)&65535)+(C.i(S)&65535),P=(D>>>16)+(this.i(S)>>>16)+(C.i(S)>>>16);w=P>>>16,D&=65535,P&=65535,T[S]=P<<16|D}return new o(T,T[T.length-1]&-2147483648?-1:0)};function A(C,_){return C.add(I(_))}t.j=function(C){if(v(this)||v(C))return h;if(E(this))return E(C)?I(this).j(I(C)):I(I(this).j(C));if(E(C))return I(this.j(I(C)));if(0>this.l(y)&&0>C.l(y))return d(this.m()*C.m());for(var _=this.g.length+C.g.length,T=[],w=0;w<2*_;w++)T[w]=0;for(w=0;w<this.g.length;w++)for(var S=0;S<C.g.length;S++){var D=this.i(w)>>>16,P=this.i(w)&65535,N=C.i(S)>>>16,B=C.i(S)&65535;T[2*w+2*S]+=P*B,m(T,2*w+2*S),T[2*w+2*S+1]+=D*B,m(T,2*w+2*S+1),T[2*w+2*S+1]+=P*N,m(T,2*w+2*S+1),T[2*w+2*S+2]+=D*N,m(T,2*w+2*S+2)}for(w=0;w<_;w++)T[w]=T[2*w+1]<<16|T[2*w];for(w=_;w<2*_;w++)T[w]=0;return new o(T,0)};function m(C,_){for(;(C[_]&65535)!=C[_];)C[_+1]+=C[_]>>>16,C[_]&=65535,_++}function x(C,_){this.g=C,this.h=_}function R(C,_){if(v(_))throw Error("division by zero");if(v(C))return new x(h,h);if(E(C))return _=R(I(C),_),new x(I(_.g),I(_.h));if(E(_))return _=R(C,I(_)),new x(I(_.g),_.h);if(30<C.g.length){if(E(C)||E(_))throw Error("slowDivide_ only works with positive integers.");for(var T=p,w=_;0>=w.l(C);)T=F(T),w=F(w);var S=b(T,1),D=b(w,1);for(w=b(w,2),T=b(T,2);!v(w);){var P=D.add(w);0>=P.l(C)&&(S=S.add(T),D=P),w=b(w,1),T=b(T,1)}return _=A(C,S.j(_)),new x(S,_)}for(S=h;0<=C.l(_);){for(T=Math.max(1,Math.floor(C.m()/_.m())),w=Math.ceil(Math.log(T)/Math.LN2),w=48>=w?1:Math.pow(2,w-48),D=d(T),P=D.j(_);E(P)||0<P.l(C);)T-=w,D=d(T),P=D.j(_);v(D)&&(D=p),S=S.add(D),C=A(C,P)}return new x(S,C)}t.A=function(C){return R(this,C).h},t.and=function(C){for(var _=Math.max(this.g.length,C.g.length),T=[],w=0;w<_;w++)T[w]=this.i(w)&C.i(w);return new o(T,this.h&C.h)},t.or=function(C){for(var _=Math.max(this.g.length,C.g.length),T=[],w=0;w<_;w++)T[w]=this.i(w)|C.i(w);return new o(T,this.h|C.h)},t.xor=function(C){for(var _=Math.max(this.g.length,C.g.length),T=[],w=0;w<_;w++)T[w]=this.i(w)^C.i(w);return new o(T,this.h^C.h)};function F(C){for(var _=C.g.length+1,T=[],w=0;w<_;w++)T[w]=C.i(w)<<1|C.i(w-1)>>>31;return new o(T,C.h)}function b(C,_){var T=_>>5;_%=32;for(var w=C.g.length-T,S=[],D=0;D<w;D++)S[D]=0<_?C.i(D+T)>>>_|C.i(D+T+1)<<32-_:C.i(D+T);return new o(S,C.h)}r.prototype.digest=r.prototype.v,r.prototype.reset=r.prototype.s,r.prototype.update=r.prototype.u,EA=r,o.prototype.add=o.prototype.add,o.prototype.multiply=o.prototype.j,o.prototype.modulo=o.prototype.A,o.prototype.compare=o.prototype.l,o.prototype.toNumber=o.prototype.m,o.prototype.toString=o.prototype.toString,o.prototype.getBits=o.prototype.i,o.fromNumber=d,o.fromString=c,xs=o}).apply(typeof Ox<"u"?Ox:typeof self<"u"?self:typeof window<"u"?window:{});var Wu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/** @license 1580Copyright The Closure Library Authors. 1581SPDX-License-Identifier: Apache-2.0 1582*/var wA,AA,Ha,CA,vc,ap,TA,IA,SA;(function(){var t,e=typeof Object.defineProperties=="function"?Object.defineProperty:function(l,f,g){return l==Array.prototype||l==Object.prototype||(l[f]=g.value),l};function n(l){l=[typeof globalThis=="object"&&globalThis,l,typeof window=="object"&&window,typeof self=="object"&&self,typeof Wu=="object"&&Wu];for(var f=0;f<l.length;++f){var g=l[f];if(g&&g.Math==Math)return g}throw Error("Cannot find global object")}var r=n(this);function i(l,f){if(f)e:{var g=r;l=l.split(".");for(var k=0;k<l.length-1;k++){var M=l[k];if(!(M in g))break e;g=g[M]}l=l[l.length-1],k=g[l],f=f(k),f!=k&&f!=null&&e(g,l,{configurable:!0,writable:!0,value:f})}}function s(l,f){l instanceof String&&(l+="");var g=0,k=!1,M={next:function(){if(!k&&g<l.length){var q=g++;return{value:f(q,l[q]),done:!1}}return k=!0,{done:!0,value:void 0}}};return M[Symbol.iterator]=function(){return M},M}i("Array.prototype.values",function(l){return l||function(){return s(this,function(f,g){return g})}});/** @license 1583 1584 Copyright The Closure Library Authors. 1585 SPDX-License-Identifier: Apache-2.0 1586*/var o=o||{},a=this||self;function u(l){var f=typeof l;return f=f!="object"?f:l?Array.isArray(l)?"array":f:"null",f=="array"||f=="object"&&typeof l.length=="number"}function d(l){var f=typeof l;return f=="object"&&l!=null||f=="function"}function c(l,f,g){return l.call.apply(l.bind,arguments)}function h(l,f,g){if(!l)throw Error();if(2<arguments.length){var k=Array.prototype.slice.call(arguments,2);return function(){var M=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(M,k),l.apply(f,M)}}return function(){return l.apply(f,arguments)}}function p(l,f,g){return p=Function.prototype.bind&&Function.prototype.bind.toString().indexOf("native code")!=-1?c:h,p.apply(null,arguments)}function y(l,f){var g=Array.prototype.slice.call(arguments,1);return function(){var k=g.slice();return k.push.apply(k,arguments),l.apply(this,k)}}function v(l,f){function g(){}g.prototype=f.prototype,l.aa=f.prototype,l.prototype=new g,l.prototype.constructor=l,l.Qb=function(k,M,q){for(var ne=Array(arguments.length-2),Be=2;Be<arguments.length;Be++)ne[Be-2]=arguments[Be];return f.prototype[M].apply(k,ne)}}function E(l){const f=l.length;if(0<f){const g=Array(f);for(let k=0;k<f;k++)g[k]=l[k];return g}return[]}function I(l,f){for(let g=1;g<arguments.length;g++){const k=arguments[g];if(u(k)){const M=l.length||0,q=k.length||0;l.length=M+q;for(let ne=0;ne<q;ne++)l[M+ne]=k[ne]}else l.push(k)}}class A{constructor(f,g){this.i=f,this.j=g,this.h=0,this.g=null}get(){let f;return 0<this.h?(this.h--,f=this.g,this.g=f.next,f.next=null):f=this.i(),f}}function m(l){return/^[\s\xa0]*$/.test(l)}function x(){var l=a.navigator;return l&&(l=l.userAgent)?l:""}function R(l){return R[" "](l),l}R[" "]=function(){};var F=x().indexOf("Gecko")!=-1&&!(x().toLowerCase().indexOf("webkit")!=-1&&x().indexOf("Edge")==-1)&&!(x().indexOf("Trident")!=-1||x().indexOf("MSIE")!=-1)&&x().indexOf("Edge")==-1;function b(l,f,g){for(const k in l)f.call(g,l[k],k,l)}function C(l,f){for(const g in l)f.call(void 0,l[g],g,l)}function _(l){const f={};for(const g in l)f[g]=l[g];return f}const T="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function w(l,f){let g,k;for(let M=1;M<arguments.length;M++){k=arguments[M];for(g in k)l[g]=k[g];for(let q=0;q<T.length;q++)g=T[q],Object.prototype.hasOwnProperty.call(k,g)&&(l[g]=k[g])}}function S(l){var f=1;l=l.split(":");const g=[];for(;0<f&&l.length;)g.push(l.shift()),f--;return l.length&&g.push(l.join(":")),g}function D(l){a.setTimeout(()=>{throw l},0)}function P(){var l=G;let f=null;return l.g&&(f=l.g,l.g=l.g.next,l.g||(l.h=null),f.next=null),f}class N{constructor(){this.h=this.g=null}add(f,g){const k=B.get();k.set(f,g),this.h?this.h.next=k:this.g=k,this.h=k}}var B=new A(()=>new U,l=>l.reset());class U{constructor(){this.next=this.g=this.h=null}set(f,g){this.h=f,this.g=g,this.next=null}reset(){this.next=this.g=this.h=null}}let W,L=!1,G=new N,X=()=>{const l=a.Promise.resolve(void 0);W=()=>{l.then(V)}};var V=()=>{for(var l;l=P();){try{l.h.call(l.g)}catch(g){D(g)}var f=B;f.j(l),100>f.h&&(f.h++,l.next=f.g,f.g=l)}L=!1};function $(){this.s=this.s,this.C=this.C}$.prototype.s=!1,$.prototype.ma=function(){this.s||(this.s=!0,this.N())},$.prototype.N=function(){if(this.C)for(;this.C.length;)this.C.shift()()};function H(l,f){this.type=l,this.g=this.target=f,this.defaultPrevented=!1}H.prototype.h=function(){this.defaultPrevented=!0};var K=function(){if(!a.addEventListener||!Object.defineProperty)return!1;var l=!1,f=Object.defineProperty({},"passive",{get:function(){l=!0}});try{const g=()=>{};a.addEventListener("test",g,f),a.removeEventListener("test",g,f)}catch{}return l}();function ye(l,f){if(H.call(this,l?l.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,l){var g=this.type=l.type,k=l.changedTouches&&l.changedTouches.length?l.changedTouches[0]:null;if(this.target=l.target||l.srcElement,this.g=f,f=l.relatedTarget){if(F){e:{try{R(f.nodeName);var M=!0;break e}catch{}M=!1}M||(f=null)}}else g=="mouseover"?f=l.fromElement:g=="mouseout"&&(f=l.toElement);this.relatedTarget=f,k?(this.clientX=k.clientX!==void 0?k.clientX:k.pageX,this.clientY=k.clientY!==void 0?k.clientY:k.pageY,this.screenX=k.screenX||0,this.screenY=k.screenY||0):(this.clientX=l.clientX!==void 0?l.clientX:l.pageX,this.clientY=l.clientY!==void 0?l.clientY:l.pageY,this.screenX=l.screenX||0,this.screenY=l.screenY||0),this.button=l.button,this.key=l.key||"",this.ctrlKey=l.ctrlKey,this.altKey=l.altKey,this.shiftKey=l.shiftKey,this.metaKey=l.metaKey,this.pointerId=l.pointerId||0,this.pointerType=typeof l.pointerType=="string"?l.pointerType:he[l.pointerType]||"",this.state=l.state,this.i=l,l.defaultPrevented&&ye.aa.h.call(this)}}v(ye,H);var he={2:"touch",3:"pen",4:"mouse"};ye.prototype.h=function(){ye.aa.h.call(this);var l=this.i;l.preventDefault?l.preventDefault():l.returnValue=!1};var _e="closure_listenable_"+(1e6*Math.random()|0),ue=0;function _t(l,f,g,k,M){this.listener=l,this.proxy=null,this.src=f,this.type=g,this.capture=!!k,this.ha=M,this.key=++ue,this.da=this.fa=!1}function ct(l){l.da=!0,l.listener=null,l.proxy=null,l.src=null,l.ha=null}function Et(l){this.src=l,this.g={},this.h=0}Et.prototype.add=function(l,f,g,k,M){var q=l.toString();l=this.g[q],l||(l=this.g[q]=[],this.h++);var ne=me(l,f,k,M);return-1<ne?(f=l[ne],g||(f.fa=!1)):(f=new _t(f,this.src,q,!!k,M),f.fa=g,l.push(f)),f};function wt(l,f){var g=f.type;if(g in l.g){var k=l.g[g],M=Array.prototype.indexOf.call(k,f,void 0),q;(q=0<=M)&&Array.prototype.splice.call(k,M,1),q&&(ct(f),l.g[g].length==0&&(delete l.g[g],l.h--))}}function me(l,f,g,k){for(var M=0;M<l.length;++M){var q=l[M];if(!q.da&&q.listener==f&&q.capture==!!g&&q.ha==k)return M}return-1}var Je="closure_lm_"+(1e6*Math.random()|0),In={};function Sn(l,f,g,k,M){if(k&&k.once)return nr(l,f,g,k,M);if(Array.isArray(f)){for(var q=0;q<f.length;q++)Sn(l,f[q],g,k,M);return null}return g=ft(g),l&&l[_e]?l.K(f,g,d(k)?!!k.capture:!!k,M):Un(l,f,g,!1,k,M)}function Un(l,f,g,k,M,q){if(!f)throw Error("Invalid event type");var ne=d(M)?!!M.capture:!!M,Be=Pn(l);if(Be||(l[Je]=Be=new Et(l)),g=Be.add(f,g,k,ne,q),g.proxy)return g;if(k=$n(),g.proxy=k,k.src=l,k.listener=g,l.addEventListener)K||(M=ne),M===void 0&&(M=!1),l.addEventListener(f.toString(),k,M);else if(l.attachEvent)l.attachEvent(ht(f.toString()),k);else if(l.addListener&&l.removeListener)l.addListener(k);else throw Error("addEventListener and attachEvent are unavailable.");return g}function $n(){function l(g){return f.call(l.src,l.listener,g)}const f=nn;return l}function nr(l,f,g,k,M){if(Array.isArray(f)){for(var q=0;q<f.length;q++)nr(l,f[q],g,k,M);return null}return g=ft(g),l&&l[_e]?l.L(f,g,d(k)?!!k.capture:!!k,M):Un(l,f,g,!0,k,M)}function Rn(l,f,g,k,M){if(Array.isArray(f))for(var q=0;q<f.length;q++)Rn(l,f[q],g,k,M);else k=d(k)?!!k.capture:!!k,g=ft(g),l&&l[_e]?(l=l.i,f=String(f).toString(),f in l.g&&(q=l.g[f],g=me(q,g,k,M),-1<g&&(ct(q[g]),Array.prototype.splice.call(q,g,1),q.length==0&&(delete l.g[f],l.h--)))):l&&(l=Pn(l))&&(f=l.g[f.toString()],l=-1,f&&(l=me(f,g,k,M)),(g=-1<l?f[l]:null)&&dt(g))}function dt(l){if(typeof l!="number"&&l&&!l.da){var f=l.src;if(f&&f[_e])wt(f.i,l);else{var g=l.type,k=l.proxy;f.removeEventListener?f.removeEventListener(g,k,l.capture):f.detachEvent?f.detachEvent(ht(g),k):f.addListener&&f.removeListener&&f.removeListener(k),(g=Pn(f))?(wt(g,l),g.h==0&&(g.src=null,f[Je]=null)):ct(l)}}}function ht(l){return l in In?In[l]:In[l]="on"+l}function nn(l,f){if(l.da)l=!0;else{f=new ye(f,this);var g=l.listener,k=l.ha||l.src;l.fa&&dt(l),l=g.call(k,f)}return l}function Pn(l){return l=l[Je],l instanceof Et?l:null}var Ee="__closure_events_fn_"+(1e9*Math.random()>>>0);function ft(l){return typeof l=="function"?l:(l[Ee]||(l[Ee]=function(f){return l.handleEvent(f)}),l[Ee])}function Fe(){$.call(this),this.i=new Et(this),this.M=this,this.F=null}v(Fe,$),Fe.prototype[_e]=!0,Fe.prototype.removeEventListener=function(l,f,g,k){Rn(this,l,f,g,k)};function pt(l,f){var g,k=l.F;if(k)for(g=[];k;k=k.F)g.push(k);if(l=l.M,k=f.type||f,typeof f=="string")f=new H(f,l);else if(f instanceof H)f.target=f.target||l;else{var M=f;f=new H(k,l),w(f,M)}if(M=!0,g)for(var q=g.length-1;0<=q;q--){var ne=f.g=g[q];M=wr(ne,k,!0,f)&&M}if(ne=f.g=l,M=wr(ne,k,!0,f)&&M,M=wr(ne,k,!1,f)&&M,g)for(q=0;q<g.length;q++)ne=f.g=g[q],M=wr(ne,k,!1,f)&&M}Fe.prototype.N=function(){if(Fe.aa.N.call(this),this.i){var l=this.i,f;for(f in l.g){for(var g=l.g[f],k=0;k<g.length;k++)ct(g[k]);delete l.g[f],l.h--}}this.F=null},Fe.prototype.K=function(l,f,g,k){return this.i.add(String(l),f,!1,g,k)},Fe.prototype.L=function(l,f,g,k){return this.i.add(String(l),f,!0,g,k)};function wr(l,f,g,k){if(f=l.i.g[String(f)],!f)return!0;f=f.concat();for(var M=!0,q=0;q<f.length;++q){var ne=f[q];if(ne&&!ne.da&&ne.capture==g){var Be=ne.listener,Rt=ne.ha||ne.src;ne.fa&&wt(l.i,ne),M=Be.call(Rt,k)!==!1&&M}}return M&&!k.defaultPrevented}function Wi(l,f,g){if(typeof l=="function")g&&(l=p(l,g));else if(l&&typeof l.handleEvent=="function")l=p(l.handleEvent,l);else throw Error("Invalid listener argument");return 2147483647<Number(f)?-1:a.setTimeout(l,f||0)}function pn(l){l.g=Wi(()=>{l.g=null,l.i&&(l.i=!1,pn(l))},l.l);const f=l.h;l.h=null,l.m.apply(null,f)}class Ar extends ${constructor(f,g){super(),this.m=f,this.l=g,this.h=null,this.i=!1,this.g=null}j(f){this.h=arguments,this.g?this.i=!0:pn(this)}N(){super.N(),this.g&&(a.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function Cr(l){$.call(this),this.h=l,this.g={}}v(Cr,$);var Gi=[];function Ki(l){b(l.g,function(f,g){this.g.hasOwnProperty(g)&&dt(f)},l),l.g={}}Cr.prototype.N=function(){Cr.aa.N.call(this),Ki(this)},Cr.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")};var Qi=a.JSON.stringify,la=a.JSON.parse,$s=class{stringify(l){return a.JSON.stringify(l,void 0)}parse(l){return a.JSON.parse(l,void 0)}};function Xi(){}Xi.prototype.h=null;function Yi(l){return l.h||(l.h=l.i())}function zs(){}var rr={OPEN:"a",kb:"b",Ja:"c",wb:"d"};function Tr(){H.call(this,"d")}v(Tr,H);function Kr(){H.call(this,"c")}v(Kr,H);var zn={},ir=null;function Ir(){return ir=ir||new Fe}zn.La="serverreachability";function js(l){H.call(this,zn.La,l)}v(js,H);function rn(l){const f=Ir();pt(f,new js(f))}zn.STAT_EVENT="statevent";function Ji(l,f){H.call(this,zn.STAT_EVENT,l),this.stat=f}v(Ji,H);function Oe(l){const f=Ir();pt(f,new Ji(f,l))}zn.Ma="timingevent";function mt(l,f){H.call(this,zn.Ma,l),this.size=f}v(mt,H);function Lt(l,f){if(typeof l!="function")throw Error("Fn must not be null and must be a function");return a.setTimeout(function(){l()},f)}function sr(){this.g=!0}sr.prototype.xa=function(){this.g=!1};function ua(l,f,g,k,M,q){l.info(function(){if(l.g)if(q)for(var ne="",Be=q.split("&"),Rt=0;Rt<Be.length;Rt++){var ke=Be[Rt].split("=");if(1<ke.length){var Ut=ke[0];ke=ke[1];var $t=Ut.split("_");ne=2<=$t.length&&$t[1]=="type"?ne+(Ut+"="+ke+"&"):ne+(Ut+"=redacted&")}}else ne=null;else ne=q;return"XMLHTTP REQ ("+k+") [attempt "+M+"]: "+f+` 1587`+g+` 1588`+ne})}function uh(l,f,g,k,M,q,ne){l.info(function(){return"XMLHTTP RESP ("+k+") [ attempt "+M+"]: "+f+` 1589`+g+` 1590`+q+" "+ne})}function Qr(l,f,g,k){l.info(function(){return"XMLHTTP TEXT ("+f+"): "+Hs(l,g)+(k?" "+k:"")})}function ch(l,f){l.info(function(){return"TIMEOUT: "+f})}sr.prototype.info=function(){};function Hs(l,f){if(!l.g)return f;if(!f)return null;try{var g=JSON.parse(f);if(g){for(l=0;l<g.length;l++)if(Array.isArray(g[l])){var k=g[l];if(!(2>k.length)){var M=k[1];if(Array.isArray(M)&&!(1>M.length)){var q=M[0];if(q!="noop"&&q!="stop"&&q!="close")for(var ne=1;ne<M.length;ne++)M[ne]=""}}}}return Qi(g)}catch{return f}}var Xr={NO_ERROR:0,gb:1,tb:2,sb:3,nb:4,rb:5,ub:6,Ia:7,TIMEOUT:8,xb:9},Yr={lb:"complete",Hb:"success",Ja:"error",Ia:"abort",zb:"ready",Ab:"readystatechange",TIMEOUT:"timeout",vb:"incrementaldata",yb:"progress",ob:"downloadprogress",Pb:"uploadprogress"},mn;function sn(){}v(sn,Xi),sn.prototype.g=function(){return new XMLHttpRequest},sn.prototype.i=function(){return{}},mn=new sn;function on(l,f,g,k){this.j=l,this.i=f,this.l=g,this.R=k||1,this.U=new Cr(this),this.I=45e3,this.H=null,this.o=!1,this.m=this.A=this.v=this.L=this.F=this.S=this.B=null,this.D=[],this.g=null,this.C=0,this.s=this.u=null,this.X=-1,this.J=!1,this.O=0,this.M=null,this.W=this.K=this.T=this.P=!1,this.h=new or}function or(){this.i=null,this.g="",this.h=!1}var ca={},qs={};function Zi(l,f,g){l.L=1,l.v=Ue(Ne(f)),l.m=g,l.P=!0,da(l,null)}function da(l,f){l.F=Date.now(),Ws(l),l.A=Ne(l.v);var g=l.A,k=l.R;Array.isArray(k)||(k=[String(k)]),ya(g.i,"t",k),l.C=0,g=l.j.J,l.h=new or,l.g=qg(l.j,g?f:null,!l.m),0<l.O&&(l.M=new Ar(p(l.Y,l,l.g),l.O)),f=l.U,g=l.g,k=l.ca;var M="readystatechange";Array.isArray(M)||(M&&(Gi[0]=M.toString()),M=Gi);for(var q=0;q<M.length;q++){var ne=Sn(g,M[q],k||f.handleEvent,!1,f.h||f);if(!ne)break;f.g[ne.key]=ne}f=l.H?_(l.H):{},l.m?(l.u||(l.u="POST"),f["Content-Type"]="application/x-www-form-urlencoded",l.g.ea(l.A,l.u,l.m,f)):(l.u="GET",l.g.ea(l.A,l.u,null,f)),rn(),ua(l.i,l.u,l.A,l.l,l.R,l.m)}on.prototype.ca=function(l){l=l.target;const f=this.M;f&&Le(l)==3?f.j():this.Y(l)},on.prototype.Y=function(l){try{if(l==this.g)e:{const $t=Le(this.g);var f=this.g.Ba();const Ys=this.g.Z();if(!(3>$t)&&($t!=3||this.g&&(this.h.h||this.g.oa()||qe(this.g)))){this.J||$t!=4||f==7||(f==8||0>=Ys?rn(3):rn(2)),ha(this);var g=this.g.Z();this.X=g;t:if(su(this)){var k=qe(this.g);l="";var M=k.length,q=Le(this.g)==4;if(!this.h.i){if(typeof TextDecoder>"u"){ar(this),es(this);var ne="";break t}this.h.i=new a.TextDecoder}for(f=0;f<M;f++)this.h.h=!0,l+=this.h.i.decode(k[f],{stream:!(q&&f==M-1)});k.length=0,this.h.g+=l,this.C=0,ne=this.h.g}else ne=this.g.oa();if(this.o=g==200,uh(this.i,this.u,this.A,this.l,this.R,$t,g),this.o){if(this.T&&!this.K){t:{if(this.g){var Be,Rt=this.g;if((Be=Rt.g?Rt.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!m(Be)){var ke=Be;break t}}ke=null}if(g=ke)Qr(this.i,this.l,g,"Initial handshake response via X-HTTP-Initial-Response"),this.K=!0,fa(this,g);else{this.o=!1,this.s=3,Oe(12),ar(this),es(this);break e}}if(this.P){g=!0;let Wn;for(;!this.J&&this.C<ne.length;)if(Wn=ou(this,ne),Wn==qs){$t==4&&(this.s=4,Oe(14),g=!1),Qr(this.i,this.l,null,"[Incomplete Response]");break}else if(Wn==ca){this.s=4,Oe(15),Qr(this.i,this.l,ne,"[Invalid Chunk]"),g=!1;break}else Qr(this.i,this.l,Wn,null),fa(this,Wn);if(su(this)&&this.C!=0&&(this.h.g=this.h.g.slice(this.C),this.C=0),$t!=4||ne.length!=0||this.h.h||(this.s=1,Oe(16),g=!1),this.o=this.o&&g,!g)Qr(this.i,this.l,ne,"[Invalid Chunked Response]"),ar(this),es(this);else if(0<ne.length&&!this.W){this.W=!0;var Ut=this.j;Ut.g==this&&Ut.ba&&!Ut.M&&(Ut.j.info("Great, no buffering proxy detected. Bytes received: "+ne.length),ph(Ut),Ut.M=!0,Oe(11))}}else Qr(this.i,this.l,ne,null),fa(this,ne);$t==4&&ar(this),this.o&&!this.J&&($t==4?$g(this.j,this):(this.o=!1,Ws(this)))}else ni(this.g),g==400&&0<ne.indexOf("Unknown SID")?(this.s=3,Oe(12)):(this.s=0,Oe(13)),ar(this),es(this)}}}catch{}finally{}};function su(l){return l.g?l.u=="GET"&&l.L!=2&&l.j.Ca:!1}function ou(l,f){var g=l.C,k=f.indexOf(` 1591`,g);return k==-1?qs:(g=Number(f.substring(g,k)),isNaN(g)?ca:(k+=1,k+g>f.length?qs:(f=f.slice(k,k+g),l.C=k+g,f)))}on.prototype.cancel=function(){this.J=!0,ar(this)};function Ws(l){l.S=Date.now()+l.I,au(l,l.I)}function au(l,f){if(l.B!=null)throw Error("WatchDog timer not null");l.B=Lt(p(l.ba,l),f)}function ha(l){l.B&&(a.clearTimeout(l.B),l.B=null)}on.prototype.ba=function(){this.B=null;const l=Date.now();0<=l-this.S?(ch(this.i,this.A),this.L!=2&&(rn(),Oe(17)),ar(this),this.s=2,es(this)):au(this,this.S-l)};function es(l){l.j.G==0||l.J||$g(l.j,l)}function ar(l){ha(l);var f=l.M;f&&typeof f.ma=="function"&&f.ma(),l.M=null,Ki(l.U),l.g&&(f=l.g,l.g=null,f.abort(),f.ma())}function fa(l,f){try{var g=l.j;if(g.G!=0&&(g.g==l||Gs(g.h,l))){if(!l.K&&Gs(g.h,l)&&g.G==3){try{var k=g.Da.g.parse(f)}catch{k=null}if(Array.isArray(k)&&k.length==3){var M=k;if(M[0]==0){e:if(!g.u){if(g.g)if(g.g.F+3e3<l.F)wu(g),_u(g);else break e;fh(g),Oe(18)}}else g.za=M[1],0<g.za-g.T&&37500>M[2]&&g.F&&g.v==0&&!g.C&&(g.C=Lt(p(g.Za,g),6e3));if(1>=uu(g.h)&&g.ca){try{g.ca()}catch{}g.ca=void 0}}else is(g,11)}else if((l.K||g.g==l)&&wu(g),!m(f))for(M=g.Da.g.parse(f),f=0;f<M.length;f++){let ke=M[f];if(g.T=ke[0],ke=ke[1],g.G==2)if(ke[0]=="c"){g.K=ke[1],g.ia=ke[2];const Ut=ke[3];Ut!=null&&(g.la=Ut,g.j.info("VER="+g.la));const $t=ke[4];$t!=null&&(g.Aa=$t,g.j.info("SVER="+g.Aa));const Ys=ke[5];Ys!=null&&typeof Ys=="number"&&0<Ys&&(k=1.5*Ys,g.L=k,g.j.info("backChannelRequestTimeoutMs_="+k)),k=g;const Wn=l.g;if(Wn){const Cu=Wn.g?Wn.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(Cu){var q=k.h;q.g||Cu.indexOf("spdy")==-1&&Cu.indexOf("quic")==-1&&Cu.indexOf("h2")==-1||(q.j=q.l,q.g=new Set,q.h&&(Ks(q,q.h),q.h=null))}if(k.D){const mh=Wn.g?Wn.g.getResponseHeader("X-HTTP-Session-Id"):null;mh&&(k.ya=mh,de(k.I,k.D,mh))}}g.G=3,g.l&&g.l.ua(),g.ba&&(g.R=Date.now()-l.F,g.j.info("Handshake RTT: "+g.R+"ms")),k=g;var ne=l;if(k.qa=Hg(k,k.J?k.ia:null,k.W),ne.K){cu(k.h,ne);var Be=ne,Rt=k.L;Rt&&(Be.I=Rt),Be.B&&(ha(Be),Ws(Be)),k.g=ne}else Vg(k);0<g.i.length&&Eu(g)}else ke[0]!="stop"&&ke[0]!="close"||is(g,7);else g.G==3&&(ke[0]=="stop"||ke[0]=="close"?ke[0]=="stop"?is(g,7):hh(g):ke[0]!="noop"&&g.l&&g.l.ta(ke),g.v=0)}}rn(4)}catch{}}var dh=class{constructor(l,f){this.g=l,this.map=f}};function lu(l){this.l=l||10,a.PerformanceNavigationTiming?(l=a.performance.getEntriesByType("navigation"),l=0<l.length&&(l[0].nextHopProtocol=="hq"||l[0].nextHopProtocol=="h2")):l=!!(a.chrome&&a.chrome.loadTimes&&a.chrome.loadTimes()&&a.chrome.loadTimes().wasFetchedViaSpdy),this.j=l?this.l:1,this.g=null,1<this.j&&(this.g=new Set),this.h=null,this.i=[]}function pa(l){return l.h?!0:l.g?l.g.size>=l.j:!1}function uu(l){return l.h?1:l.g?l.g.size:0}function Gs(l,f){return l.h?l.h==f:l.g?l.g.has(f):!1}function Ks(l,f){l.g?l.g.add(f):l.h=f}function cu(l,f){l.h&&l.h==f?l.h=null:l.g&&l.g.has(f)&&l.g.delete(f)}lu.prototype.cancel=function(){if(this.i=du(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&this.g.size!==0){for(const l of this.g.values())l.cancel();this.g.clear()}};function du(l){if(l.h!=null)return l.i.concat(l.h.D);if(l.g!=null&&l.g.size!==0){let f=l.i;for(const g of l.g.values())f=f.concat(g.D);return f}return E(l.i)}function re(l){if(l.V&&typeof l.V=="function")return l.V();if(typeof Map<"u"&&l instanceof Map||typeof Set<"u"&&l instanceof Set)return Array.from(l.values());if(typeof l=="string")return l.split("");if(u(l)){for(var f=[],g=l.length,k=0;k<g;k++)f.push(l[k]);return f}f=[],g=0;for(k in l)f[g++]=l[k];return f}function le(l){if(l.na&&typeof l.na=="function")return l.na();if(!l.V||typeof l.V!="function"){if(typeof Map<"u"&&l instanceof Map)return Array.from(l.keys());if(!(typeof Set<"u"&&l instanceof Set)){if(u(l)||typeof l=="string"){var f=[];l=l.length;for(var g=0;g<l;g++)f.push(g);return f}f=[],g=0;for(const k in l)f[g++]=k;return f}}}function oe(l,f){if(l.forEach&&typeof l.forEach=="function")l.forEach(f,void 0);else if(u(l)||typeof l=="string")Array.prototype.forEach.call(l,f,void 0);else for(var g=le(l),k=re(l),M=k.length,q=0;q<M;q++)f.call(void 0,k[q],g&&g[q],l)}var ee=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function nt(l,f){if(l){l=l.split("&");for(var g=0;g<l.length;g++){var k=l[g].indexOf("="),M=null;if(0<=k){var q=l[g].substring(0,k);M=l[g].substring(k+1)}else q=l[g];f(q,M?decodeURIComponent(M.replace(/\+/g," ")):"")}}}function Ze(l){if(this.g=this.o=this.j="",this.s=null,this.m=this.l="",this.h=!1,l instanceof Ze){this.h=l.h,et(this,l.j),this.o=l.o,this.g=l.g,Mt(this,l.s),this.l=l.l;var f=l.i,g=new Jr;g.i=f.i,f.g&&(g.g=new Map(f.g),g.h=f.h),Ge(this,g),this.m=l.m}else l&&(f=String(l).match(ee))?(this.h=!1,et(this,f[1]||"",!0),this.o=Yt(f[2]||""),this.g=Yt(f[3]||"",!0),Mt(this,f[4]),this.l=Yt(f[5]||"",!0),Ge(this,f[6]||"",!0),this.m=Yt(f[7]||"")):(this.h=!1,this.i=new Jr(null,this.h))}Ze.prototype.toString=function(){var l=[],f=this.j;f&&l.push(Vt(f,jn,!0),":");var g=this.g;return(g||f=="file")&&(l.push("//"),(f=this.o)&&l.push(Vt(f,jn,!0),"@"),l.push(encodeURIComponent(String(g)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),g=this.s,g!=null&&l.push(":",String(g))),(g=this.l)&&(this.g&&g.charAt(0)!="/"&&l.push("/"),l.push(Vt(g,g.charAt(0)=="/"?ts:lr,!0))),(g=this.i.toString())&&l.push("?",g),(g=this.m)&&l.push("#",Vt(g,hu)),l.join("")};function Ne(l){return new Ze(l)}function et(l,f,g){l.j=g?Yt(f,!0):f,l.j&&(l.j=l.j.replace(/:$/,""))}function Mt(l,f){if(f){if(f=Number(f),isNaN(f)||0>f)throw Error("Bad port number "+f);l.s=f}else l.s=null}function Ge(l,f,g){f instanceof Jr?(l.i=f,fu(l.i,l.h)):(g||(f=Vt(f,ur)),l.i=new Jr(f,l.h))}function de(l,f,g){l.i.set(f,g)}function Ue(l){return de(l,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),l}function Yt(l,f){return l?f?decodeURI(l.replace(/%25/g,"%2525")):decodeURIComponent(l):""}function Vt(l,f,g){return typeof l=="string"?(l=encodeURI(l).replace(f,gn),g&&(l=l.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),l):null}function gn(l){return l=l.charCodeAt(0),"%"+(l>>4&15).toString(16)+(l&15).toString(16)}var jn=/[#\/\?@]/g,lr=/[#\?:]/g,ts=/[#\?]/g,ur=/[#\?@]/g,hu=/#/g;function Jr(l,f){this.h=this.g=null,this.i=l||null,this.j=!!f}function Hn(l){l.g||(l.g=new Map,l.h=0,l.i&&nt(l.i,function(f,g){l.add(decodeURIComponent(f.replace(/\+/g," ")),g)}))}t=Jr.prototype,t.add=function(l,f){Hn(this),this.i=null,l=Sr(this,l);var g=this.g.get(l);return g||this.g.set(l,g=[]),g.push(f),this.h+=1,this};function ma(l,f){Hn(l),f=Sr(l,f),l.g.has(f)&&(l.i=null,l.h-=l.g.get(f).length,l.g.delete(f))}function ga(l,f){return Hn(l),f=Sr(l,f),l.g.has(f)}t.forEach=function(l,f){Hn(this),this.g.forEach(function(g,k){g.forEach(function(M){l.call(f,M,k,this)},this)},this)},t.na=function(){Hn(this);const l=Array.from(this.g.values()),f=Array.from(this.g.keys()),g=[];for(let k=0;k<f.length;k++){const M=l[k];for(let q=0;q<M.length;q++)g.push(f[k])}return g},t.V=function(l){Hn(this);let f=[];if(typeof l=="string")ga(this,l)&&(f=f.concat(this.g.get(Sr(this,l))));else{l=Array.from(this.g.values());for(let g=0;g<l.length;g++)f=f.concat(l[g])}return f},t.set=function(l,f){return Hn(this),this.i=null,l=Sr(this,l),ga(this,l)&&(this.h-=this.g.get(l).length),this.g.set(l,[f]),this.h+=1,this},t.get=function(l,f){return l?(l=this.V(l),0<l.length?String(l[0]):f):f};function ya(l,f,g){ma(l,f),0<g.length&&(l.i=null,l.g.set(Sr(l,f),E(g)),l.h+=g.length)}t.toString=function(){if(this.i)return this.i;if(!this.g)return"";const l=[],f=Array.from(this.g.keys());for(var g=0;g<f.length;g++){var k=f[g];const q=encodeURIComponent(String(k)),ne=this.V(k);for(k=0;k<ne.length;k++){var M=q;ne[k]!==""&&(M+="="+encodeURIComponent(String(ne[k]))),l.push(M)}}return this.i=l.join("&")};function Sr(l,f){return f=String(f),l.j&&(f=f.toLowerCase()),f}function fu(l,f){f&&!l.j&&(Hn(l),l.i=null,l.g.forEach(function(g,k){var M=k.toLowerCase();k!=M&&(ma(this,k),ya(this,M,g))},l)),l.j=f}function pu(l,f){const g=new sr;if(a.Image){const k=new Image;k.onload=y(qn,g,"TestLoadImage: loaded",!0,f,k),k.onerror=y(qn,g,"TestLoadImage: error",!1,f,k),k.onabort=y(qn,g,"TestLoadImage: abort",!1,f,k),k.ontimeout=y(qn,g,"TestLoadImage: timeout",!1,f,k),a.setTimeout(function(){k.ontimeout&&k.ontimeout()},1e4),k.src=l}else f(!1)}function mu(l,f){const g=new sr,k=new AbortController,M=setTimeout(()=>{k.abort(),qn(g,"TestPingServer: timeout",!1,f)},1e4);fetch(l,{signal:k.signal}).then(q=>{clearTimeout(M),q.ok?qn(g,"TestPingServer: ok",!0,f):qn(g,"TestPingServer: server error",!1,f)}).catch(()=>{clearTimeout(M),qn(g,"TestPingServer: error",!1,f)})}function qn(l,f,g,k,M){try{M&&(M.onload=null,M.onerror=null,M.onabort=null,M.ontimeout=null),k(g)}catch{}}function gu(){this.g=new $s}function yu(l,f,g){const k=g||"";try{oe(l,function(M,q){let ne=M;d(M)&&(ne=Qi(M)),f.push(k+q+"="+encodeURIComponent(ne))})}catch(M){throw f.push(k+"type="+encodeURIComponent("_badmap")),M}}function Zr(l){this.l=l.Ub||null,this.j=l.eb||!1}v(Zr,Xi),Zr.prototype.g=function(){return new ns(this.l,this.j)},Zr.prototype.i=function(l){return function(){return l}}({});function ns(l,f){Fe.call(this),this.D=l,this.o=f,this.m=void 0,this.status=this.readyState=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.u=new Headers,this.h=null,this.B="GET",this.A="",this.g=!1,this.v=this.j=this.l=null}v(ns,Fe),t=ns.prototype,t.open=function(l,f){if(this.readyState!=0)throw this.abort(),Error("Error reopening a connection");this.B=l,this.A=f,this.readyState=1,ti(this)},t.send=function(l){if(this.readyState!=1)throw this.abort(),Error("need to call open() first. ");this.g=!0;const f={headers:this.u,method:this.B,credentials:this.m,cache:void 0};l&&(f.body=l),(this.D||a).fetch(new Request(this.A,f)).then(this.Sa.bind(this),this.ga.bind(this))},t.abort=function(){this.response=this.responseText="",this.u=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted.").catch(()=>{}),1<=this.readyState&&this.g&&this.readyState!=4&&(this.g=!1,ei(this)),this.readyState=0},t.Sa=function(l){if(this.g&&(this.l=l,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=l.headers,this.readyState=2,ti(this)),this.g&&(this.readyState=3,ti(this),this.g)))if(this.responseType==="arraybuffer")l.arrayBuffer().then(this.Qa.bind(this),this.ga.bind(this));else if(typeof a.ReadableStream<"u"&&"body"in l){if(this.j=l.body.getReader(),this.o){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.v=new TextDecoder;va(this)}else l.text().then(this.Ra.bind(this),this.ga.bind(this))};function va(l){l.j.read().then(l.Pa.bind(l)).catch(l.ga.bind(l))}t.Pa=function(l){if(this.g){if(this.o&&l.value)this.response.push(l.value);else if(!this.o){var f=l.value?l.value:new Uint8Array(0);(f=this.v.decode(f,{stream:!l.done}))&&(this.response=this.responseText+=f)}l.done?ei(this):ti(this),this.readyState==3&&va(this)}},t.Ra=function(l){this.g&&(this.response=this.responseText=l,ei(this))},t.Qa=function(l){this.g&&(this.response=l,ei(this))},t.ga=function(){this.g&&ei(this)};function ei(l){l.readyState=4,l.l=null,l.j=null,l.v=null,ti(l)}t.setRequestHeader=function(l,f){this.u.append(l,f)},t.getResponseHeader=function(l){return this.h&&this.h.get(l.toLowerCase())||""},t.getAllResponseHeaders=function(){if(!this.h)return"";const l=[],f=this.h.entries();for(var g=f.next();!g.done;)g=g.value,l.push(g[0]+": "+g[1]),g=f.next();return l.join(`\r 1592`)};function ti(l){l.onreadystatechange&&l.onreadystatechange.call(l)}Object.defineProperty(ns.prototype,"withCredentials",{get:function(){return this.m==="include"},set:function(l){this.m=l?"include":"same-origin"}});function xa(l){let f="";return b(l,function(g,k){f+=k,f+=":",f+=g,f+=`\r 1593`}),f}function Qs(l,f,g){e:{for(k in g){var k=!1;break e}k=!0}k||(g=xa(g),typeof l=="string"?g!=null&&encodeURIComponent(String(g)):de(l,f,g))}function $e(l){Fe.call(this),this.headers=new Map,this.o=l||null,this.h=!1,this.v=this.g=null,this.D="",this.m=0,this.l="",this.j=this.B=this.u=this.A=!1,this.I=null,this.H="",this.J=!1}v($e,Fe);var vu=/^https?$/i,xu=["POST","PUT"];t=$e.prototype,t.Ha=function(l){this.J=l},t.ea=function(l,f,g,k){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.D+"; newUri="+l);f=f?f.toUpperCase():"GET",this.D=l,this.l="",this.m=0,this.A=!1,this.h=!0,this.g=this.o?this.o.g():mn.g(),this.v=this.o?Yi(this.o):Yi(mn),this.g.onreadystatechange=p(this.Ea,this);try{this.B=!0,this.g.open(f,String(l),!0),this.B=!1}catch(q){_a(this,q);return}if(l=g||"",g=new Map(this.headers),k)if(Object.getPrototypeOf(k)===Object.prototype)for(var M in k)g.set(M,k[M]);else if(typeof k.keys=="function"&&typeof k.get=="function")for(const q of k.keys())g.set(q,k.get(q));else throw Error("Unknown input type for opt_headers: "+String(k));k=Array.from(g.keys()).find(q=>q.toLowerCase()=="content-type"),M=a.FormData&&l instanceof a.FormData,!(0<=Array.prototype.indexOf.call(xu,f,void 0))||k||M||g.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const[q,ne]of g)this.g.setRequestHeader(q,ne);this.H&&(this.g.responseType=this.H),"withCredentials"in this.g&&this.g.withCredentials!==this.J&&(this.g.withCredentials=this.J);try{an(this),this.u=!0,this.g.send(l),this.u=!1}catch(q){_a(this,q)}};function _a(l,f){l.h=!1,l.g&&(l.j=!0,l.g.abort(),l.j=!1),l.l=f,l.m=5,Ea(l),rs(l)}function Ea(l){l.A||(l.A=!0,pt(l,"complete"),pt(l,"error"))}t.abort=function(l){this.g&&this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1,this.m=l||7,pt(this,"complete"),pt(this,"abort"),rs(this))},t.N=function(){this.g&&(this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1),rs(this,!0)),$e.aa.N.call(this)},t.Ea=function(){this.s||(this.B||this.u||this.j?wa(this):this.bb())},t.bb=function(){wa(this)};function wa(l){if(l.h&&typeof o<"u"&&(!l.v[1]||Le(l)!=4||l.Z()!=2)){if(l.u&&Le(l)==4)Wi(l.Ea,0,l);else if(pt(l,"readystatechange"),Le(l)==4){l.h=!1;try{const ne=l.Z();e:switch(ne){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var f=!0;break e;default:f=!1}var g;if(!(g=f)){var k;if(k=ne===0){var M=String(l.D).match(ee)[1]||null;!M&&a.self&&a.self.location&&(M=a.self.location.protocol.slice(0,-1)),k=!vu.test(M?M.toLowerCase():"")}g=k}if(g)pt(l,"complete"),pt(l,"success");else{l.m=6;try{var q=2<Le(l)?l.g.statusText:""}catch{q=""}l.l=q+" ["+l.Z()+"]",Ea(l)}}finally{rs(l)}}}}function rs(l,f){if(l.g){an(l);const g=l.g,k=l.v[0]?()=>{}:null;l.g=null,l.v=null,f||pt(l,"ready");try{g.onreadystatechange=k}catch{}}}function an(l){l.I&&(a.clearTimeout(l.I),l.I=null)}t.isActive=function(){return!!this.g};function Le(l){return l.g?l.g.readyState:0}t.Z=function(){try{return 2<Le(this)?this.g.status:-1}catch{return-1}},t.oa=function(){try{return this.g?this.g.responseText:""}catch{return""}},t.Oa=function(l){if(this.g){var f=this.g.responseText;return l&&f.indexOf(l)==0&&(f=f.substring(l.length)),la(f)}};function qe(l){try{if(!l.g)return null;if("response"in l.g)return l.g.response;switch(l.H){case"":case"text":return l.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in l.g)return l.g.mozResponseArrayBuffer}return null}catch{return null}}function ni(l){const f={};l=(l.g&&2<=Le(l)&&l.g.getAllResponseHeaders()||"").split(`\r 1594`);for(let k=0;k<l.length;k++){if(m(l[k]))continue;var g=S(l[k]);const M=g[0];if(g=g[1],typeof g!="string")continue;g=g.trim();const q=f[M]||[];f[M]=q,q.push(g)}C(f,function(k){return k.join(", ")})}t.Ba=function(){return this.m},t.Ka=function(){return typeof this.l=="string"?this.l:String(this.l)};function Aa(l,f,g){return g&&g.internalChannelParams&&g.internalChannelParams[l]||f}function Bg(l){this.Aa=0,this.i=[],this.j=new sr,this.ia=this.qa=this.I=this.W=this.g=this.ya=this.D=this.H=this.m=this.S=this.o=null,this.Ya=this.U=0,this.Va=Aa("failFast",!1,l),this.F=this.C=this.u=this.s=this.l=null,this.X=!0,this.za=this.T=-1,this.Y=this.v=this.B=0,this.Ta=Aa("baseRetryDelayMs",5e3,l),this.cb=Aa("retryDelaySeedMs",1e4,l),this.Wa=Aa("forwardChannelMaxRetries",2,l),this.wa=Aa("forwardChannelRequestTimeoutMs",2e4,l),this.pa=l&&l.xmlHttpFactory||void 0,this.Xa=l&&l.Tb||void 0,this.Ca=l&&l.useFetchStreams||!1,this.L=void 0,this.J=l&&l.supportsCrossDomainXhr||!1,this.K="",this.h=new lu(l&&l.concurrentRequestLimit),this.Da=new gu,this.P=l&&l.fastHandshake||!1,this.O=l&&l.encodeInitMessageHeaders||!1,this.P&&this.O&&(this.O=!1),this.Ua=l&&l.Rb||!1,l&&l.xa&&this.j.xa(),l&&l.forceLongPolling&&(this.X=!1),this.ba=!this.P&&this.X&&l&&l.detectBufferingProxy||!1,this.ja=void 0,l&&l.longPollingTimeout&&0<l.longPollingTimeout&&(this.ja=l.longPollingTimeout),this.ca=void 0,this.R=0,this.M=!1,this.ka=this.A=null}t=Bg.prototype,t.la=8,t.G=1,t.connect=function(l,f,g,k){Oe(0),this.W=l,this.H=f||{},g&&k!==void 0&&(this.H.OSID=g,this.H.OAID=k),this.F=this.X,this.I=Hg(this,null,this.W),Eu(this)};function hh(l){if(Og(l),l.G==3){var f=l.U++,g=Ne(l.I);if(de(g,"SID",l.K),de(g,"RID",f),de(g,"TYPE","terminate"),Ca(l,g),f=new on(l,l.j,f),f.L=2,f.v=Ue(Ne(g)),g=!1,a.navigator&&a.navigator.sendBeacon)try{g=a.navigator.sendBeacon(f.v.toString(),"")}catch{}!g&&a.Image&&(new Image().src=f.v,g=!0),g||(f.g=qg(f.j,null),f.g.ea(f.v)),f.F=Date.now(),Ws(f)}jg(l)}function _u(l){l.g&&(ph(l),l.g.cancel(),l.g=null)}function Og(l){_u(l),l.u&&(a.clearTimeout(l.u),l.u=null),wu(l),l.h.cancel(),l.s&&(typeof l.s=="number"&&a.clearTimeout(l.s),l.s=null)}function Eu(l){if(!pa(l.h)&&!l.s){l.s=!0;var f=l.Ga;W||X(),L||(W(),L=!0),G.add(f,l),l.B=0}}function yT(l,f){return uu(l.h)>=l.h.j-(l.s?1:0)?!1:l.s?(l.i=f.D.concat(l.i),!0):l.G==1||l.G==2||l.B>=(l.Va?0:l.Wa)?!1:(l.s=Lt(p(l.Ga,l,f),zg(l,l.B)),l.B++,!0)}t.Ga=function(l){if(this.s)if(this.s=null,this.G==1){if(!l){this.U=Math.floor(1e5*Math.random()),l=this.U++;const M=new on(this,this.j,l);let q=this.o;if(this.S&&(q?(q=_(q),w(q,this.S)):q=this.S),this.m!==null||this.O||(M.H=q,q=null),this.P)e:{for(var f=0,g=0;g<this.i.length;g++){t:{var k=this.i[g];if("__data__"in k.map&&(k=k.map.__data__,typeof k=="string")){k=k.length;break t}k=void 0}if(k===void 0)break;if(f+=k,4096<f){f=g;break e}if(f===4096||g===this.i.length-1){f=g+1;break e}}f=1e3}else f=1e3;f=Mg(this,M,f),g=Ne(this.I),de(g,"RID",l),de(g,"CVER",22),this.D&&de(g,"X-HTTP-Session-Id",this.D),Ca(this,g),q&&(this.O?f="headers="+encodeURIComponent(String(xa(q)))+"&"+f:this.m&&Qs(g,this.m,q)),Ks(this.h,M),this.Ua&&de(g,"TYPE","init"),this.P?(de(g,"$req",f),de(g,"SID","null"),M.T=!0,Zi(M,g,null)):Zi(M,g,f),this.G=2}}else this.G==3&&(l?Lg(this,l):this.i.length==0||pa(this.h)||Lg(this))};function Lg(l,f){var g;f?g=f.l:g=l.U++;const k=Ne(l.I);de(k,"SID",l.K),de(k,"RID",g),de(k,"AID",l.T),Ca(l,k),l.m&&l.o&&Qs(k,l.m,l.o),g=new on(l,l.j,g,l.B+1),l.m===null&&(g.H=l.o),f&&(l.i=f.D.concat(l.i)),f=Mg(l,g,1e3),g.I=Math.round(.5*l.wa)+Math.round(.5*l.wa*Math.random()),Ks(l.h,g),Zi(g,k,f)}function Ca(l,f){l.H&&b(l.H,function(g,k){de(f,k,g)}),l.l&&oe({},function(g,k){de(f,k,g)})}function Mg(l,f,g){g=Math.min(l.i.length,g);var k=l.l?p(l.l.Na,l.l,l):null;e:{var M=l.i;let q=-1;for(;;){const ne=["count="+g];q==-1?0<g?(q=M[0].g,ne.push("ofs="+q)):q=0:ne.push("ofs="+q);let Be=!0;for(let Rt=0;Rt<g;Rt++){let ke=M[Rt].g;const Ut=M[Rt].map;if(ke-=q,0>ke)q=Math.max(0,M[Rt].g-100),Be=!1;else try{yu(Ut,ne,"req"+ke+"_")}catch{k&&k(Ut)}}if(Be){k=ne.join("&");break e}}}return l=l.i.splice(0,g),f.D=l,k}function Vg(l){if(!l.g&&!l.u){l.Y=1;var f=l.Fa;W||X(),L||(W(),L=!0),G.add(f,l),l.v=0}}function fh(l){return l.g||l.u||3<=l.v?!1:(l.Y++,l.u=Lt(p(l.Fa,l),zg(l,l.v)),l.v++,!0)}t.Fa=function(){if(this.u=null,Ug(this),this.ba&&!(this.M||this.g==null||0>=this.R)){var l=2*this.R;this.j.info("BP detection timer enabled: "+l),this.A=Lt(p(this.ab,this),l)}},t.ab=function(){this.A&&(this.A=null,this.j.info("BP detection timeout reached."),this.j.info("Buffering proxy detected and switch to long-polling!"),this.F=!1,this.M=!0,Oe(10),_u(this),Ug(this))};function ph(l){l.A!=null&&(a.clearTimeout(l.A),l.A=null)}function Ug(l){l.g=new on(l,l.j,"rpc",l.Y),l.m===null&&(l.g.H=l.o),l.g.O=0;var f=Ne(l.qa);de(f,"RID","rpc"),de(f,"SID",l.K),de(f,"AID",l.T),de(f,"CI",l.F?"0":"1"),!l.F&&l.ja&&de(f,"TO",l.ja),de(f,"TYPE","xmlhttp"),Ca(l,f),l.m&&l.o&&Qs(f,l.m,l.o),l.L&&(l.g.I=l.L);var g=l.g;l=l.ia,g.L=1,g.v=Ue(Ne(f)),g.m=null,g.P=!0,da(g,l)}t.Za=function(){this.C!=null&&(this.C=null,_u(this),fh(this),Oe(19))};function wu(l){l.C!=null&&(a.clearTimeout(l.C),l.C=null)}function $g(l,f){var g=null;if(l.g==f){wu(l),ph(l),l.g=null;var k=2}else if(Gs(l.h,f))g=f.D,cu(l.h,f),k=1;else return;if(l.G!=0){if(f.o)if(k==1){g=f.m?f.m.length:0,f=Date.now()-f.F;var M=l.B;k=Ir(),pt(k,new mt(k,g)),Eu(l)}else Vg(l);else if(M=f.s,M==3||M==0&&0<f.X||!(k==1&&yT(l,f)||k==2&&fh(l)))switch(g&&0<g.length&&(f=l.h,f.i=f.i.concat(g)),M){case 1:is(l,5);break;case 4:is(l,10);break;case 3:is(l,6);break;default:is(l,2)}}}function zg(l,f){let g=l.Ta+Math.floor(Math.random()*l.cb);return l.isActive()||(g*=2),g*f}function is(l,f){if(l.j.info("Error code "+f),f==2){var g=p(l.fb,l),k=l.Xa;const M=!k;k=new Ze(k||"//www.google.com/images/cleardot.gif"),a.location&&a.location.protocol=="http"||et(k,"https"),Ue(k),M?pu(k.toString(),g):mu(k.toString(),g)}else Oe(2);l.G=0,l.l&&l.l.sa(f),jg(l),Og(l)}t.fb=function(l){l?(this.j.info("Successfully pinged google.com"),Oe(2)):(this.j.info("Failed to ping google.com"),Oe(1))};function jg(l){if(l.G=0,l.ka=[],l.l){const f=du(l.h);(f.length!=0||l.i.length!=0)&&(I(l.ka,f),I(l.ka,l.i),l.h.i.length=0,E(l.i),l.i.length=0),l.l.ra()}}function Hg(l,f,g){var k=g instanceof Ze?Ne(g):new Ze(g);if(k.g!="")f&&(k.g=f+"."+k.g),Mt(k,k.s);else{var M=a.location;k=M.protocol,f=f?f+"."+M.hostname:M.hostname,M=+M.port;var q=new Ze(null);k&&et(q,k),f&&(q.g=f),M&&Mt(q,M),g&&(q.l=g),k=q}return g=l.D,f=l.ya,g&&f&&de(k,g,f),de(k,"VER",l.la),Ca(l,k),k}function qg(l,f,g){if(f&&!l.J)throw Error("Can't create secondary domain capable XhrIo object.");return f=l.Ca&&!l.pa?new $e(new Zr({eb:g})):new $e(l.pa),f.Ha(l.J),f}t.isActive=function(){return!!this.l&&this.l.isActive(this)};function Wg(){}t=Wg.prototype,t.ua=function(){},t.ta=function(){},t.sa=function(){},t.ra=function(){},t.isActive=function(){return!0},t.Na=function(){};function Au(){}Au.prototype.g=function(l,f){return new yn(l,f)};function yn(l,f){Fe.call(this),this.g=new Bg(f),this.l=l,this.h=f&&f.messageUrlParams||null,l=f&&f.messageHeaders||null,f&&f.clientProtocolHeaderRequired&&(l?l["X-Client-Protocol"]="webchannel":l={"X-Client-Protocol":"webchannel"}),this.g.o=l,l=f&&f.initMessageHeaders||null,f&&f.messageContentType&&(l?l["X-WebChannel-Content-Type"]=f.messageContentType:l={"X-WebChannel-Content-Type":f.messageContentType}),f&&f.va&&(l?l["X-WebChannel-Client-Profile"]=f.va:l={"X-WebChannel-Client-Profile":f.va}),this.g.S=l,(l=f&&f.Sb)&&!m(l)&&(this.g.m=l),this.v=f&&f.supportsCrossDomainXhr||!1,this.u=f&&f.sendRawJson||!1,(f=f&&f.httpSessionIdParam)&&!m(f)&&(this.g.D=f,l=this.h,l!==null&&f in l&&(l=this.h,f in l&&delete l[f])),this.j=new Xs(this)}v(yn,Fe),yn.prototype.m=function(){this.g.l=this.j,this.v&&(this.g.J=!0),this.g.connect(this.l,this.h||void 0)},yn.prototype.close=function(){hh(this.g)},yn.prototype.o=function(l){var f=this.g;if(typeof l=="string"){var g={};g.__data__=l,l=g}else this.u&&(g={},g.__data__=Qi(l),l=g);f.i.push(new dh(f.Ya++,l)),f.G==3&&Eu(f)},yn.prototype.N=function(){this.g.l=null,delete this.j,hh(this.g),delete this.g,yn.aa.N.call(this)};function Gg(l){Tr.call(this),l.__headers__&&(this.headers=l.__headers__,this.statusCode=l.__status__,delete l.__headers__,delete l.__status__);var f=l.__sm__;if(f){e:{for(const g in f){l=g;break e}l=void 0}(this.i=l)&&(l=this.i,f=f!==null&&l in f?f[l]:void 0),this.data=f}else this.data=l}v(Gg,Tr);function Kg(){Kr.call(this),this.status=1}v(Kg,Kr);function Xs(l){this.g=l}v(Xs,Wg),Xs.prototype.ua=function(){pt(this.g,"a")},Xs.prototype.ta=function(l){pt(this.g,new Gg(l))},Xs.prototype.sa=function(l){pt(this.g,new Kg)},Xs.prototype.ra=function(){pt(this.g,"b")},Au.prototype.createWebChannel=Au.prototype.g,yn.prototype.send=yn.prototype.o,yn.prototype.open=yn.prototype.m,yn.prototype.close=yn.prototype.close,SA=function(){return new Au},IA=function(){return Ir()},TA=zn,ap={mb:0,pb:1,qb:2,Jb:3,Ob:4,Lb:5,Mb:6,Kb:7,Ib:8,Nb:9,PROXY:10,NOPROXY:11,Gb:12,Cb:13,Db:14,Bb:15,Eb:16,Fb:17,ib:18,hb:19,jb:20},Xr.NO_ERROR=0,Xr.TIMEOUT=8,Xr.HTTP_ERROR=6,vc=Xr,Yr.COMPLETE="complete",CA=Yr,zs.EventType=rr,rr.OPEN="a",rr.CLOSE="b",rr.ERROR="c",rr.MESSAGE="d",Fe.prototype.listen=Fe.prototype.K,Ha=zs,AA=Zr,$e.prototype.listenOnce=$e.prototype.L,$e.prototype.getLastError=$e.prototype.Ka,$e.prototype.getLastErrorCode=$e.prototype.Ba,$e.prototype.getStatus=$e.prototype.Z,$e.prototype.getResponseJson=$e.prototype.Oa,$e.prototype.getResponseText=$e.prototype.oa,$e.prototype.send=$e.prototype.ea,$e.prototype.setWithCredentials=$e.prototype.Ha,wA=$e}).apply(typeof Wu<"u"?Wu:typeof self<"u"?self:typeof window<"u"?window:{});const Lx="@firebase/firestore";/** 1595 * @license 1596 * Copyright 2017 Google LLC 1597 * 1598 * Licensed under the Apache License, Version 2.0 (the "License");
1599 * you may not use this file except in compliance with the License. 1600 * You may obtain a copy of the License at 1601 * 1602 * http://www.apache.org/licenses/LICENSE-2.0 1603 * 1604 * Unless required by applicable law or agreed to in writing, software 1605 * distributed under the License is distributed on an "AS IS" BASIS, 1606 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1607 * See the License for the specific language governing permissions and 1608 * limitations under the License. 1609 */class Wt{constructor(e){this.uid=e}isAuthenticated(){return this.uid!=null}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual(e){return e.uid===this.uid}}Wt.UNAUTHENTICATED=new Wt(null),Wt.GOOGLE_CREDENTIALS=new Wt("google-credentials-uid"),Wt.FIRST_PARTY=new Wt("first-party-uid"),Wt.MOCK_USER=new Wt("mock-user");/** 1610 * @license 1611 * Copyright 2017 Google LLC 1612 * 1613 * Licensed under the Apache License, Version 2.0 (the "License"); 1614 * you may not use this file except in compliance with the License. 1615 * You may obtain a copy of the License at 1616 * 1617 * http://www.apache.org/licenses/LICENSE-2.0 1618 * 1619 * Unless required by applicable law or agreed to in writing, software 1620 * distributed under the License is distributed on an "AS IS" BASIS, 1621 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1622 * See the License for the specific language governing permissions and 1623 * limitations under the License. 1624 */let ra="10.12.1";/** 1625 * @license 1626 * Copyright 2017 Google LLC 1627 * 1628 * Licensed under the Apache License, Version 2.0 (the "License"); 1629 * you may not use this file except in compliance with the License. 1630 * You may obtain a copy of the License at 1631 * 1632 * http://www.apache.org/licenses/LICENSE-2.0 1633 * 1634 * Unless required by applicable law or agreed to in writing, software 1635 * distributed under the License is distributed on an "AS IS" BASIS, 1636 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1637 * See the License for the specific language governing permissions and 1638 * limitations under the License. 1639 */const Ps=new Lm("@firebase/firestore");function La(){return Ps.logLevel}function ae(t,...e){if(Ps.logLevel<=Te.DEBUG){const n=e.map(Ym);Ps.debug(`Firestore (${ra}): ${t}`,...n)}}function jr(t,...e){if(Ps.logLevel<=Te.ERROR){const n=e.map(Ym);Ps.error(`Firestore (${ra}): ${t}`,...n)}}function Uo(t,...e){if(Ps.logLevel<=Te.WARN){const n=e.map(Ym);Ps.warn(`Firestore (${ra}): ${t}`,...n)}}function Ym(t){if(typeof t=="string")return t;try{/** 1640* @license 1641* Copyright 2020 Google LLC 1642* 1643* Licensed under the Apache License, Version 2.0 (the "License"); 1644* you may not use this file except in compliance with the License. 1645* You may obtain a copy of the License at 1646* 1647* http://www.apache.org/licenses/LICENSE-2.0 1648* 1649* Unless required by applicable law or agreed to in writing, software 1650* distributed under the License is distributed on an "AS IS" BASIS, 1651* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1652* See the License for the specific language governing permissions and 1653* limitations under the License. 1654*/return function(n){return JSON.stringify(n)}(t)}catch{return t}}/** 1655 * @license 1656 * Copyright 2017 Google LLC 1657 * 1658 * Licensed under the Apache License, Version 2.0 (the "License"); 1659 * you may not use this file except in compliance with the License. 1660 * You may obtain a copy of the License at 1661 * 1662 * http://www.apache.org/licenses/LICENSE-2.0 1663 * 1664 * Unless required by applicable law or agreed to in writing, software 1665 * distributed under the License is distributed on an "AS IS" BASIS, 1666 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1667 * See the License for the specific language governing permissions and 1668 * limitations under the License. 1669 */function pe(t="Unexpected state"){const e=`FIRESTORE (${ra}) INTERNAL ASSERTION FAILED: `+t;throw jr(e),new Error(e)}function Ve(t,e){t||pe()}function xe(t,e){return t}/** 1670 * @license 1671 * Copyright 2017 Google LLC 1672 * 1673 * Licensed under the Apache License, Version 2.0 (the "License"); 1674 * you may not use this file except in compliance with the License. 1675 * You may obtain a copy of the License at 1676 * 1677 * http://www.apache.org/licenses/LICENSE-2.0 1678 * 1679 * Unless required by applicable law or agreed to in writing, softw
1679are 1680 * distributed under the License is distributed on an "AS IS" BASIS, 1681 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1682 * See the License for the specific language governing permissions and 1683 * limitations under the License. 1684 */const Y={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"};class se extends Wr{constructor(e,n){super(e,n),this.code=e,this.message=n,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}/** 1685 * @license 1686 * Copyright 2017 Google LLC 1687 * 1688 * Licensed under the Apache License, Version 2.0 (the "License"); 1689 * you may not use this file except in compliance with the License. 1690 * You may obtain a copy of the License at 1691 * 1692 * http://www.apache.org/licenses/LICENSE-2.0 1693 * 1694 * Unless required by applicable law or agreed to in writing, software 1695 * distributed under the License is distributed on an "AS IS" BASIS, 1696 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1697 * See the License for the specific language governing permissions and 1698 * limitations under the License. 1699 */class bi{constructor(){this.promise=new Promise((e,n)=>{this.resolve=e,this.reject=n})}}/** 1700 * @license 1701 * Copyright 2017 Google LLC 1702 * 1703 * Licensed under the Apache License, Version 2.0 (the "License"); 1704 * you may not use this file except in compliance with the License. 1705 * You may obtain a copy of the License at 1706 * 1707 * http://www.apache.org/licenses/LICENSE-2.0 1708 * 1709 * Unless required by applicable law or agreed to in writing, software 1710 * distributed under the License is distributed on an "AS IS" BASIS, 1711 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1712 * See the License for the specific language governing permissions and 1713 * limitations under the License. 1714 */class RA{constructor(e,n){this.user=n,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${e}`)}}class kb{getToken(){return Promise.resolve(null)}invalidateToken(){}start(e,n){e.enqueueRetryable(()=>n(Wt.UNAUTHENTICATED))}shutdown(){}}class Db{constructor(e){this.token=e,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(e,n){this.changeListener=n,e.enqueueRetryable(()=>n(this.token.user))}shutdown(){this.changeListener=null}}class bb{constructor(e){this.t=e,this.currentUser=Wt.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(e,n){let r=this.i;const i=u=>this.i!==r?(r=this.i,n(u)):Promise.resolve();let s=new bi;this.o=()=>{this.i++,this.currentUser=this.u(),s.resolve(),s=new bi,e.enqueueRetryable(()=>i(this.currentUser))};const o=()=>{const u=s;e.enqueueRetryable(async()=>{await u.promise,await i(this.currentUser)})},a=u=>{ae("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=u,this.auth.addAuthTokenListener(this.o),o()};this.t.onInit(u=>a(u)),setTimeout(()=>{if(!this.auth){const u=this.t.getImmediate({optional:!0});u?a(u):(ae("FirebaseAuthCredentialsProvider","Auth not yet detected"),s.resolve(),s=new bi)}},0),o()}getToken(){const e=this.i,n=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(n).then(r=>this.i!==e?(ae("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):r?(Ve(typeof r.accessToken=="string"),new RA(r.accessToken,this.currentUser)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.auth.removeAuthTokenListener(this.o)}u(){const e=this.auth&&this.auth.getUid();return Ve(e===null||typeof e=="string"),new Wt(e)}}class Fb{constructor(e,n,r){this.l=e,this.h=n,this.P=r,this.type="FirstParty",this.user=Wt.FIRST_PARTY,this.I=new Map}T(){return this.P?this.P():null}get headers(){this.I.set("X-Goog-AuthUser",this.l);const e=this.T();return e&&this.I.set("Authorization",e),this.h&&this.I.set("X-Goog-Iam-Authorization-Token",this.h),this.I}}class Nb{constructor(e,n,r){this.l=e,this.h=n,this.P=r}getToken(){return Promise.resolve(new Fb(this.l,this.h,this.P))}start(e,n){e.enqueueRetryable(()=>n(Wt.FIRST_PARTY))}shutdown(){}invalidateToken(){}}class Bb{constructor(e){this.value=e,this.type="AppCheck",this.headers=new Map,e&&e.length>0&&this.headers.set("x-firebase-appcheck",this.value)}}class Ob{constructor(e){this.A=e,this.forceRefresh=!1,this.appCheck=null,this.R=null}start(e,n){const r=s=>{s.error!=null&&ae("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${s.error.message}`);const o=s.token!==this.R;return this.R=s.token,ae("FirebaseAppCheckTokenProvider",`Received ${o?"new":"existing"} token.`),o?n(s.token):Promise.resolve()};this.o=s=>{e.enqueueRetryable(()=>r(s))};const i=s=>{ae("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=s,this.appCheck.addTokenListener(this.o)};this.A.onInit(s=>i(s)),setTimeout(()=>{if(!this.appCheck){const s=this.A.getImmediate({optional:!0});s?i(s):ae("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}},0)}getToken(){const e=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(e).then(n=>n?(Ve(typeof n.token=="string"),this.R=n.token,new Bb(n.token)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.appCheck.removeTokenListener(this.o)}}/** 1715 * @license 1716 * Copyright 2020 Google LLC 1717 * 1718 * Licensed under the Apache License, Version 2.0 (the "License");
1719 * you may not use this file except in compliance with the License. 1720 * You may obtain a copy of the License at 1721 * 1722 * http://www.apache.org/licenses/LICENSE-2.0 1723 * 1724 * Unless required by applicable law or agreed to in writing, software 1725 * distributed under the License is distributed on an "AS IS" BASIS, 1726 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1727 * See the License for the specific language governing permissions and 1728 * limitations under the License. 1729 */function Lb(t){const e=typeof self<"u"&&(self.crypto||self.msCrypto),n=new Uint8Array(t);if(e&&typeof e.getRandomValues=="function")e.getRandomValues(n);else for(let r=0;r<t;r++)n[r]=Math.floor(256*Math.random());return n}/** 1730 * @license 1731 * Copyright 2017 Google LLC 1732 * 1733 * Licensed under the Apache License, Version 2.0 (the "License"); 1734 * you may not use this file except in compliance with the License. 1735 * You may obtain a copy of the License at 1736 * 1737 * http://www.apache.org/licenses/LICENSE-2.0 1738 * 1739 * Unless required by applicable law or agreed to in writing, software 1740 * distributed under the License is distributed on an "AS IS" BASIS, 1741 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1742 * See the License for the specific language governing permissions and 1743 * limitations under the License. 1744 */class PA{static newId(){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=Math.floor(256/e.length)*e.length;let r="";for(;r.length<20;){const i=Lb(40);for(let s=0;s<i.length;++s)r.length<20&&i[s]<n&&(r+=e.charAt(i[s]%e.length))}return r}}function De(t,e){return t<e?-1:t>e?1:0}function $o(t,e,n){return t.length===e.length&&t.every((r,i)=>n(r,e[i]))}/** 1745 * @license 1746 * Copyright 2017 Google LLC 1747 * 1748 * Licensed under the Apache License, Version 2.0 (the "License"); 1749 * you may not use this file except in compliance with the License. 1750 * You may obtain a copy of the License at 1751 * 1752 * http://www.apache.org/licenses/LICENSE-2.0 1753 * 1754 * Unless required by applicable law or agreed to in writing, software 1755 * distributed under the License is distributed on an "AS IS" BASIS, 1756 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1757 * See the License for the specific language governing permissions and 1758 * limitations under the License. 1759 */class vt{constructor(e,n){if(this.seconds=e,this.nanoseconds=n,n<0)throw new se(Y.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(n>=1e9)throw new se(Y.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(e<-62135596800)throw new se(Y.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e);if(e>=253402300800)throw new se(Y.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}static now(){return vt.fromMillis(Date.now())}static fromDate(e){return vt.fromMillis(e.getTime())}static fromMillis(e){const n=Math.floor(e/1e3),r=Math.floor(1e6*(e-1e3*n));return new vt(n,r)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo(e){return this.seconds===e.seconds?De(this.nanoseconds,e.nanoseconds):De(this.seconds,e.seconds)}isEqual(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}}valueOf(){const e=this.seconds- -62135596800;return String(e).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}/** 1760 * @license 1761 * Copyright 2017 Google LLC 1762 * 1763 * Licensed under the Apache License, Version 2.0 (the "License"); 1764 * you may not use this file except in compliance with the License. 1765 * You may obtain a copy of the License at 1766 * 1767 * http://www.apache.org/licenses/LICENSE-2.0 1768 * 1769 * Unless required by applicable law or agreed to in writing, software 1770 * distributed under the License is distributed on an "AS IS" BASIS, 1771 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1772 * See the License for the specific language governing permissions and 1773 * limitations under the License. 1774 */class ve{constructor(e){this.timestamp=e}static fromTimestamp(e){return new ve(e)}static min(){return new ve(new vt(0,0))}static max(){return new ve(new vt(253402300799,999999999))}compareTo(e){return this.timestamp._compareTo(e.timestamp)}isEqual(e){return this.timestamp.isEqual(e.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}}/** 1775 * @license 1776 * Copyright 2017 Google LLC 1777 * 1778 * Licensed under the Apache License, Version 2.0 (the "License");
1779 * you may not use this file except in compliance with the License. 1780 * You may obtain a copy of the License at 1781 * 1782 * http://www.apache.org/licenses/LICENSE-2.0 1783 * 1784 * Unless required by applicable law or agreed to in writing, software 1785 * distributed under the License is distributed on an "AS IS" BASIS, 1786 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1787 * See the License for the specific language governing permissions and 1788 * limitations under the License. 1789 */class bl{constructor(e,n,r){n===void 0?n=0:n>e.length&&pe(),r===void 0?r=e.length-n:r>e.length-n&&pe(),this.segments=e,this.offset=n,this.len=r}get length(){return this.len}isEqual(e){return bl.comparator(this,e)===0}child(e){const n=this.segments.slice(this.offset,this.limit());return e instanceof bl?e.forEach(r=>{n.push(r)}):n.push(e),this.construct(n)}limit(){return this.offset+this.length}popFirst(e){return e=e===void 0?1:e,this.construct(this.segments,this.offset+e,this.length-e)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(e){return this.segments[this.offset+e]}isEmpty(){return this.length===0}isPrefixOf(e){if(e.length<this.length)return!1;for(let n=0;n<this.length;n++)if(this.get(n)!==e.get(n))return!1;return!0}isImmediateParentOf(e){if(this.length+1!==e.length)return!1;for(let n=0;n<this.length;n++)if(this.get(n)!==e.get(n))return!1;return!0}forEach(e){for(let n=this.offset,r=this.limit();n<r;n++)e(this.segments[n])}toArray(){return this.segments.slice(this.offset,this.limit())}static comparator(e,n){const r=Math.min(e.length,n.length);for(let i=0;i<r;i++){const s=e.get(i),o=n.get(i);if(s<o)return-1;if(s>o)return 1}return e.length<n.length?-1:e.length>n.length?1:0}}class je extends bl{construct(e,n,r){return new je(e,n,r)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}toUriEncodedString(){return this.toArray().map(encodeURIComponent).join("/")}static fromString(...e){const n=[];for(const r of e){if(r.indexOf("//")>=0)throw new se(Y.INVALID_ARGUMENT,`Invalid segment (${r}). Paths must not contain // in them.`);n.push(...r.split("/").filter(i=>i.length>0))}return new je(n)}static emptyPath(){return new je([])}}const Mb=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class bt extends bl{construct(e,n,r){return new bt(e,n,r)}static isValidIdentifier(e){return Mb.test(e)}canonicalString(){return this.toArray().map(e=>(e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),bt.isValidIdentifier(e)||(e="`"+e+"`"),e)).join(".")}toString(){return this.canonicalString()}isKeyField(){return this.length===1&&this.get(0)==="__name__"}static keyField(){return new bt(["__name__"])}static fromServerFormat(e){const n=[];let r="",i=0;const s=()=>
1789{if(r.length===0)throw new se(Y.INVALID_ARGUMENT,`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);n.push(r),r=""};let o=!1;for(;i<e.length;){const a=e[i];if(a==="\\"){if(i+1===e.length)throw new se(Y.INVALID_ARGUMENT,"Path has trailing escape character: "+e);const u=e[i+1];if(u!=="\\"&&u!=="."&&u!=="`")throw new se(Y.INVALID_ARGUMENT,"Path has invalid escape sequence: "+e);r+=u,i+=2}else a==="`"?(o=!o,i++):a!=="."||o?(r+=a,i++):(s(),i++)}if(s(),o)throw new se(Y.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new bt(n)}static emptyPath(){return new bt([])}}/** 1790 * @license 1791 * Copyright 2017 Google LLC 1792 * 1793 * Licensed under the Apache License, Version 2.0 (the "License"); 1794 * you may not use this file except in compliance with the License. 1795 * You may obtain a copy of the License at 1796 * 1797 * http://www.apache.org/licenses/LICENSE-2.0 1798 * 1799 * Unless required by applicable law or agreed to in writing, software 1800 * distributed under the License is distributed on an "AS IS" BASIS, 1801 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1802 * See the License for the specific language governing permissions and 1803 * limitations under the License. 1804 */class ce{constructor(e){this.path=e}static fromPath(e){return new ce(je.fromString(e))}static fromName(e){return new ce(je.fromString(e).popFirst(5))}static empty(){return new ce(je.emptyPath())}get collectionGroup(){return this.path.popLast().lastSegment()}hasCollectionId(e){return this.path.length>=2&&this.path.get(this.path.length-2)===e}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(e){return e!==null&&je.comparator(this.path,e.path)===0}toString(){return this.path.toString()}static comparator(e,n){return je.comparator(e.path,n.path)}static isDocumentKey(e){return e.length%2==0}static fromSegments(e){return new ce(new je(e.slice()))}}function Vb(t,e){const n=t.toTimestamp().seconds,r=t.toTimestamp().nanoseconds+1,i=ve.fromTimestamp(r===1e9?new vt(n+1,0):new vt(n,r));return new Li(i,ce.empty(),e)}function Ub(t){return new Li(t.readTime,t.key,-1)}class Li{constructor(e,n,r){this.readTime=e,this.documentKey=n,this.largestBatchId=r}static min(){return new Li(ve.min(),ce.empty(),-1)}static max(){return new Li(ve.max(),ce.empty(),-1)}}function $b(t,e){let n=t.readTime.compareTo(e.readTime);return n!==0?n:(n=ce.comparator(t.documentKey,e.documentKey),n!==0?n:De(t.largestBatchId,e.largestBatchId))}/** 1805 * @license 1806 * Copyright 2020 Google LLC 1807 * 1808 * Licensed under the Apache License, Version 2.0 (the "License"); 1809 * you may not use this file except in compliance with the License. 1810 * You may obtain a copy of the License at 1811 * 1812 * http://www.apache.org/licenses/LICENSE-2.0 1813 * 1814 * Unless required by applicable law or agreed to in writing, software 1815 * distributed under the License is distributed on an "AS IS" BASIS, 1816 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1817 * See the License for the specific language governing permissions and 1818 * limitations under the License. 1819 */const zb="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.";class jb{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(e){this.onCommittedListeners.push(e)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach(e=>e())}}/** 1820 * @license 1821 * Copyright 2017 Google LLC 1822 * 1823 * Licensed under the Apache License, Version 2.0 (the "License"); 1824 * you may not use this file except in compliance with the License. 1825 * You may obtain a copy of the License at 1826 * 1827 * http://www.apache.org/licenses/LICENSE-2.0 1828 * 1829 * Unless required by applicable law or agreed to in writing, software 1830 * distributed under the License is distributed on an "AS IS" BASIS, 1831 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1832 * See the License for the specific language governing permissions and 1833 * limitations under the License. 1834 */async function Yl(t){if(t.code!==Y.FAILED_PRECONDITION||t.message!==zb)throw t;ae("LocalStore","Unexpectedly lost primary lease")}/** 1835 * @license 1836 * Copyright 2017 Google LLC 1837 * 1838 * Licensed under the Apache License, Version 2.0 (the "License");
1839 * you may not use this file except in compliance with the License. 1840 * You may obtain a copy of the License at 1841 * 1842 * http://www.apache.org/licenses/LICENSE-2.0 1843 * 1844 * Unless required by applicable law or agreed to in writing, software 1845 * distributed under the License is distributed on an "AS IS" BASIS, 1846 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1847 * See the License for the specific language governing permissions and 1848 * limitations under the License. 1849 */class J{constructor(e){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,e(n=>{this.isDone=!0,this.result=n,this.nextCallback&&this.nextCallback(n)},n=>{this.isDone=!0,this.error=n,this.catchCallback&&this.catchCallback(n)})}catch(e){return this.next(void 0,e)}next(e,n){return this.callbackAttached&&pe(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(n,this.error):this.wrapSuccess(e,this.result):new J((r,i)=>{this.nextCallback=s=>{this.wrapSuccess(e,s).next(r,i)},this.catchCallback=s=>{this.wrapFailure(n,s).next(r,i)}})}toPromise(){return new Promise((e,n)=>{this.next(e,n)})}wrapUserFunction(e){try{const n=e();return n instanceof J?n:J.resolve(n)}catch(n){return J.reject(n)}}wrapSuccess(e,n){return e?this.wrapUserFunction(()=>e(n)):J.resolve(n)}wrapFailure(e,n){return e?this.wrapUserFunction(()=>e(n)):J.reject(n)}static resolve(e){return new J((n,r)=>{n(e)})}static reject(e){return new J((n,r)=>{r(e)})}static waitFor(e){return new J((n,r)=>{let i=0,s=0,o=!1;e.forEach(a=>{++i,a.next(()=>{++s,o&&s===i&&n()},u=>r(u))}),o=!0,s===i&&n()})}static or(e){let n=J.resolve(!1);for(const r of e)n=n.next(i=>i?J.resolve(i):r());return n}static forEach(e,n){const r=[];return e.forEach((i,s)=>{r.push(n.call(this,i,s))}),this.waitFor(r)}static mapArray(e,n){return new J((r,i)=>{const s=e.length,o=new Array(s);let a=0;for(let u=0;u<s;u++){const d=u;n(e[d]).next(c=>{o[d]=c,++a,a===s&&r(o)},c=>i(c))}})}static doWhile(e,n){return new J((r,i)=>{const s=()=>{e()===!0?n().next(()=>{s()},i):r()};s()})}}function Hb(t){const e=t.match(/Android ([\d.]+)/i),n=e?e[1].split(".").slice(0,2).join("."):"-1";return Number(n)}function Jl(t){return t.name==="IndexedDbTransactionError"}/** 1850 * @license 1851 * Copyright 2018 Google LLC 1852 * 1853 * Licensed under the Apache License, Version 2.0 (the "License"); 1854 * you may not use this file except in compliance with the License. 1855 * You may obtain a copy of the License at 1856 * 1857 * http://www.apache.org/licenses/LICENSE-2.0 1858 * 1859 * Unless required by applicable law or agreed to in writing, software 1860 * distributed under the License is distributed on an "AS IS" BASIS, 1861 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1862 * See the License for the specific language governing permissions and 1863 * limitations under the License. 1864 */class Jm{constructor(e,n){this.previousValue=e,n&&(n.sequenceNumberHandler=r=>this.ie(r),this.se=r=>n.writeSequenceNumber(r))}ie(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}next(){const e=++this.previousValue;return this.se&&this.se(e),e}}Jm.oe=-1;function qd(t){return t==null}function id(t){return t===0&&1/t==-1/0}function qb(t){return typeof t=="number"&&Number.isInteger(t)&&!id(t)&&t<=Number.MAX_SAFE_INTEGER&&t>=Number.MIN_SAFE_INTEGER}/** 1865 * @license 1866 * Copyright 2017 Google LLC 1867 * 1868 * Licensed under the Apache License, Version 2.0 (the "License"); 1869 * you may not use this file except in compliance with the License. 1870 * You may obtain a copy of the License at 1871 * 1872 * http://www.apache.org/licenses/LICENSE-2.0 1873 * 1874 * Unless required by applicable law or agreed to in writing, software 1875 * distributed under the License is distributed on an "AS IS" BASIS, 1876 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1877 * See the License for the specific language governing permissions and 1878 * limitations under the License. 1879 */function Mx(t){let e=0;for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&e++;return e}function Ms(t,e){for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(n,t[n])}function kA(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}/** 1880 * @license 1881 * Copyright 2017 Google LLC 1882 * 1883 * Licensed under the Apache License, Version 2.0 (the "License");
1884 * you may not use this file except in compliance with the License. 1885 * You may obtain a copy of the License at 1886 * 1887 * http://www.apache.org/licenses/LICENSE-2.0 1888 * 1889 * Unless required by applicable law or agreed to in writing, software 1890 * distributed under the License is distributed on an "AS IS" BASIS, 1891 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1892 * See the License for the specific language governing permissions and 1893 * limitations under the License. 1894 */class Ye{constructor(e,n){this.comparator=e,this.root=n||kt.EMPTY}insert(e,n){return new Ye(this.comparator,this.root.insert(e,n,this.comparator).copy(null,null,kt.BLACK,null,null))}remove(e){return new Ye(this.comparator,this.root.remove(e,this.comparator).copy(null,null,kt.BLACK,null,null))}get(e){let n=this.root;for(;!n.isEmpty();){const r=this.comparator(e,n.key);if(r===0)return n.value;r<0?n=n.left:r>0&&(n=n.right)}return null}indexOf(e){let n=0,r=this.root;for(;!r.isEmpty();){const i=this.comparator(e,r.key);if(i===0)return n+r.left.size;i<0?r=r.left:(n+=r.left.size+1,r=r.right)}return-1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(e){return this.root.inorderTraversal(e)}forEach(e){this.inorderTraversal((n,r)=>(e(n,r),!1))}toString(){const e=[];return this.inorderTraversal((n,r)=>(e.push(`${n}:${r}`),!1)),`{${e.join(", ")}}`}reverseTraversal(e){return this.root.reverseTraversal(e)}getIterator(){return new Gu(this.root,null,this.comparator,!1)}getIteratorFrom(e){return new Gu(this.root,e,this.comparator,!1)}getReverseIterator(){return new Gu(this.root,null,this.comparator,!0)}getReverseIteratorFrom(e){return new Gu(this.root,e,this.comparator,!0)}}class Gu{constructor(e,n,r,i){this.isReverse=i,this.nodeStack=[];let s=1;for(;!e.isEmpty();)if(s=n?r(e.key,n):1,n&&i&&(s*=-1),s<0)e=this.isReverse?e.left:e.right;else{if(s===0){this.nodeStack.push(e);break}this.nodeStack.push(e),e=this.isReverse?e.right:e.left}}getNext(){let e=this.nodeStack.pop();const n={key:e.key,value:e.value};if(this.isReverse)for(e=e.left;!e.isEmpty();)this.nodeStack.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack.push(e),e=e.left;return n}hasNext(){return this.nodeStack.length>0}peek(){if(this.nodeStack.length===0)return null;const e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}}}class kt{constructor(e,n,r,i,s){this.key=e,this.value=n,this.color=r!=null?r:kt.RED,this.left=i!=null?i:kt.EMPTY,this.right=s!=null?s:kt.EMPTY,this.size=this.left.size+1+this.right.size}copy(e,n,r,i,s){return new kt(e!=null?e:this.key,n!=null?n:this.value,r!=null?r:this.color,i!=null?i:this.left,s!=null?s:this.right)}isEmpty(){return!1}inorderTraversal(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)}reverseTraversal(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}min(){return this.left.isEmpty()?this:this.left.min()}minKey(){return this.min().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(e,n,r){let i=this;const s=r(e,i.key);return i=s<0?i.copy(null,null,null,i.left.insert(e,n,r),null):s===0?i.copy(null,n,null,null,null):i.copy(null,null,null,null,i.right.insert(e,n,r)),i.fixUp()}removeMin(){if(this.left.isEmpty())return kt.EMPTY;let e=this;return e.left.isRed()||e.left.left.isRed()||(e=e.moveRedLeft()),e=e.copy(null,null,null,e.left.removeMin(),null),e.fixUp()}remove(e,n){let r,i=this;if(n(e,i.key)<0)i.left.isEmpty()||i.left.isRed()||i.left.left.isRed()||(i=i.moveRedLeft()),i=i.copy(null,null,null,i.left.remove(e,n),null);else{if(i.left.isRed()&&(i=i.rotateRight()),i.right.isEmpty()||i.right.isRed()||i.right.left.isRed()||(i=i.moveRedRight()),n(e,i.key)===0){if(i.right.isEmpty())return kt.EMPTY;r=i.right.min(),i=i.copy(r.key,r.value,null,null,i.right.removeMin())}i=i.copy(null,null,null,null,i.right.remove(e,n))}return i.fixUp()}isRed(){return this.color}fixUp(){let e=this;return e.right.isRed()&&!e.left.isRed()&&(e=e.rotateLeft()),e.left.isRed()&&e.left.left.isRed()&&(e=e.rotateRight()),e.left.isRed()&&e.right.isRed()&&(e=e.colorFlip()),e}moveRedLeft(){let e=this.colorFlip();return e.right.left.isRed()&&(e=e.copy(null,null,null,null,e.right.rotateRight()),e=e.rotateLeft(),e=e.colorFlip()),e}moveRedRight(){let e=this.colorFlip();return e.left.left.isRed()&&(e=e.rotateRight(),e=e.colorFlip()),e}rotateLeft(){const e=this.copy(null,null,kt.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight(){const e=this.copy(null,null,kt.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)}colorFlip(){const e=this.left.copy(null,null,!this.left.color,null,null),n=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,n)}checkMaxDepth(){const e=this.check();return Math.pow(2,e)<=this.size+1}check(){if(this.isRed()&&this.left.isRed()||this.right.isRed())throw pe();const e=this.left.check();if(e!==this.right.check())throw pe();return e+(this.isRed()?0:1)}}kt.EMPTY=null,kt.RED=!0,kt.BLACK=!1;
1894kt.EMPTY=new class{constructor(){this.size=0}get key(){throw pe()}get value(){throw pe()}get color(){throw pe()}get left(){throw pe()}get right(){throw pe()}copy(e,n,r,i,s){return this}insert(e,n,r){return new kt(e,n)}remove(e,n){return this}isEmpty(){return!0}inorderTraversal(e){return!1}reverseTraversal(e){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};/** 1895 * @license 1896 * Copyright 2017 Google LLC 1897 * 1898 * Licensed under the Apache License, Version 2.0 (the "License"); 1899 * you may not use this file except in compliance with the License. 1900 * You may obtain a copy of the License at 1901 * 1902 * http://www.apache.org/licenses/LICENSE-2.0 1903 * 1904 * Unless required by applicable law or agreed to in writing, software 1905 * distributed under the License is distributed on an "AS IS" BASIS, 1906 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1907 * See the License for the specific language governing permissions and 1908 * limitations under the License. 1909 */class Nt{constructor(e){this.comparator=e,this.data=new Ye(this.comparator)}has(e){return this.data.get(e)!==null}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(e){return this.data.indexOf(e)}forEach(e){this.data.inorderTraversal((n,r)=>(e(n),!1))}forEachInRange(e,n){const r=this.data.getIteratorFrom(e[0]);for(;r.hasNext();){const i=r.getNext();if(this.comparator(i.key,e[1])>=0)return;n(i.key)}}forEachWhile(e,n){let r;for(r=n!==void 0?this.data.getIteratorFrom(n):this.data.getIterator();r.hasNext();)if(!e(r.getNext().key))return}firstAfterOrEqual(e){const n=this.data.getIteratorFrom(e);return n.hasNext()?n.getNext().key:null}getIterator(){return new Vx(this.data.getIterator())}getIteratorFrom(e){return new Vx(this.data.getIteratorFrom(e))}add(e){return this.copy(this.data.remove(e).insert(e,!0))}delete(e){return this.has(e)?this.copy(this.data.remove(e)):this}isEmpty(){return this.data.isEmpty()}unionWith(e){let n=this;return n.size<e.size&&(n=e,e=this),e.forEach(r=>{n=n.add(r)}),n}isEqual(e){if(!(e instanceof Nt)||this.size!==e.size)return!1;const n=this.data.getIterator(),r=e.data.getIterator();for(;n.hasNext();){const i=n.getNext().key,s=r.getNext().key;if(this.comparator(i,s)!==0)return!1}return!0}toArray(){const e=[];return this.forEach(n=>{e.push(n)}),e}toString(){const e=[];return this.forEach(n=>e.push(n)),"SortedSet("+e.toString()+")"}copy(e){const n=new Nt(this.comparator);return n.data=e,n}}class Vx{constructor(e){this.iter=e}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}/** 1910 * @license 1911 * Copyright 2020 Google LLC 1912 * 1913 * Licensed under the Apache License, Version 2.0 (the "License"); 1914 * you may not use this file except in compliance with the License. 1915 * You may obtain a copy of the License at 1916 * 1917 * http://www.apache.org/licenses/LICENSE-2.0 1918 * 1919 * Unless required by applicable law or agreed to in writing, software 1920 * distributed under the License is distributed on an "AS IS" BASIS, 1921 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1922 * See the License for the specific language governing permissions and 1923 * limitations under the License. 1924 */class _n{constructor(e){this.fields=e,e.sort(bt.comparator)}static empty(){return new _n([])}unionWith(e){let n=new Nt(bt.comparator);for(const r of this.fields)n=n.add(r);for(const r of e)n=n.add(r);return new _n(n.toArray())}covers(e){for(const n of this.fields)if(n.isPrefixOf(e))return!0;return!1}isEqual(e){return $o(this.fields,e.fields,(n,r)=>n.isEqual(r))}}/** 1925 * @license 1926 * Copyright 2023 Google LLC 1927 * 1928 * Licensed under the Apache License, Version 2.0 (the "License"); 1929 * you may not use this file except in compliance with the License. 1930 * You may obtain a copy of the License at 1931 * 1932 * http://www.apache.org/licenses/LICENSE-2.0 1933 * 1934 * Unless required by applicable law or agreed to in writing, software 1935 * distributed under the License is distributed on an "AS IS" BASIS, 1936 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1937 * See the License for the specific language governing permissions and 1938 * limitations under the License.
1939 */class DA extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}/** 1940 * @license 1941 * Copyright 2020 Google LLC 1942 * 1943 * Licensed under the Apache License, Version 2.0 (the "License"); 1944 * you may not use this file except in compliance with the License. 1945 * You may obtain a copy of the License at 1946 * 1947 * http://www.apache.org/licenses/LICENSE-2.0 1948 * 1949 * Unless required by applicable law or agreed to in writing, software 1950 * distributed under the License is distributed on an "AS IS" BASIS, 1951 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1952 * See the License for the specific language governing permissions and 1953 * limitations under the License. 1954 */class Xt{constructor(e){this.binaryString=e}static fromBase64String(e){const n=function(i){try{return atob(i)}catch(s){throw typeof DOMException<"u"&&s instanceof DOMException?new DA("Invalid base64 string: "+s):s}}(e);return new Xt(n)}static fromUint8Array(e){const n=function(i){let s="";for(let o=0;o<i.length;++o)s+=String.fromCharCode(i[o]);return s}(e);return new Xt(n)}[Symbol.iterator](){let e=0;return{next:()=>e<this.binaryString.length?{value:this.binaryString.charCodeAt(e++),done:!1}:{value:void 0,done:!0}}}toBase64(){return function(n){return btoa(n)}(this.binaryString)}toUint8Array(){return function(n){const r=new Uint8Array(n.length);for(let i=0;i<n.length;i++)r[i]=n.charCodeAt(i);return r}(this.binaryString)}approximateByteSize(){return 2*this.binaryString.length}compareTo(e){return De(this.binaryString,e.binaryString)}isEqual(e){return this.binaryString===e.binaryString}}Xt.EMPTY_BYTE_STRING=new Xt("");const Wb=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function Mi(t){if(Ve(!!t),typeof t=="string"){let e=0;const n=Wb.exec(t);if(Ve(!!n),n[1]){let i=n[1];i=(i+"000000000").substr(0,9),e=Number(i)}const r=new Date(t);return{seconds:Math.floor(r.getTime()/1e3),nanos:e}}return{seconds:st(t.seconds),nanos:st(t.nanos)}}function st(t){return typeof t=="number"?t:typeof t=="string"?Number(t):0}function ks(t){return typeof t=="string"?Xt.fromBase64String(t):Xt.fromUint8Array(t)}/** 1955 * @license 1956 * Copyright 2020 Google LLC 1957 * 1958 * Licensed under the Apache License, Version 2.0 (the "License"); 1959 * you may not use this file except in compliance with the License. 1960 * You may obtain a copy of the License at 1961 * 1962 * http://www.apache.org/licenses/LICENSE-2.0 1963 * 1964 * Unless required by applicable law or agreed to in writing, software 1965 * distributed under the License is distributed on an "AS IS" BASIS, 1966 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1967 * See the License for the specific language governing permissions and 1968 * limitations under the License. 1969 */function Zm(t){var e,n;return((n=(((e=t==null?void 0:t.mapValue)===null||e===void 0?void 0:e.fields)||{}).__type__)===null||n===void 0?void 0:n.stringValue)==="server_timestamp"}function eg(t){const e=t.mapValue.fields.__previous_value__;return Zm(e)?eg(e):e}function Fl(t){const e=Mi(t.mapValue.fields.__local_write_time__.timestampValue);return new vt(e.seconds,e.nanos)}/** 1970 * @license 1971 * Copyright 2017 Google LLC 1972 * 1973 * Licensed under the Apache License, Version 2.0 (the "License"); 1974 * you may not use this file except in compliance with the License. 1975 * You may obtain a copy of the License at 1976 * 1977 * http://www.apache.org/licenses/LICENSE-2.0 1978 * 1979 * Unless required by applicable law or agreed to in writing, software 1980 * distributed under the License is distributed on an "AS IS" BASIS, 1981 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1982 * See the License for the specific language governing permissions and 1983 * limitations under the License. 1984 */class Gb{constructor(e,n,r,i,s,o,a,u,d){this.databaseId=e,this.appId=n,this.persistenceKey=r,this.host=i,this.ssl=s,this.forceLongPolling=o,this.autoDetectLongPolling=a,this.longPollingOptions=u,this.useFetchStreams=d}}class Nl{constructor(e,n){this.projectId=e,this.database=n||"(default)"}static empty(){return new Nl("","")}get isDefaultDatabase(){return this.database==="(default)"}isEqual(e){return e instanceof Nl&&e.projectId===this.projectId&&e.database===this.database}}/** 1985 * @license 1986 * Copyright 2020 Google LLC 1987 * 1988 * Licensed under the Apache License, Version 2.0 (the "License");
1989 * you may not use this file except in compliance with the License. 1990 * You may obtain a copy of the License at 1991 * 1992 * http://www.apache.org/licenses/LICENSE-2.0 1993 * 1994 * Unless required by applicable law or agreed to in writing, software 1995 * distributed under the License is distributed on an "AS IS" BASIS, 1996 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1997 * See the License for the specific language governing permissions and 1998 * limitations under the License. 1999 */const Ku={mapValue:{fields:{__type__:{stringValue:"__max__"}}}};function Ds(t){return"nullValue"in t?0:"booleanValue"in t?1:"integerValue"in t||"doubleValue"in t?2:"timestampValue"in t?3:"stringValue"in t?5:"bytesValue"in t?6:"referenceValue"in t?7:"geoPointValue"in t?8:"arrayValue"in t?9:"mapValue"in t?Zm(t)?4:Kb(t)?9007199254740991:10:pe()}function _r(t,e){if(t===e)return!0;const n=Ds(t);if(n!==Ds(e))return!1;switch(n){case 0:case 9007199254740991:return!0;case 1:return t.booleanValue===e.booleanValue;case 4:return Fl(t).isEqual(Fl(e));case 3:return function(i,s){if(typeof i.timestampValue=="string"&&typeof s.timestampValue=="string"&&i.timestampValue.length===s.timestampValue.length)return i.timestampValue===s.timestampValue;const o=Mi(i.timestampValue),a=Mi(s.timestampValue);return o.seconds===a.seconds&&o.nanos===a.nanos}(t,e);case 5:return t.stringValue===e.stringValue;case 6:return function(i,s){return ks(i.bytesValue).isEqual(ks(s.bytesValue))}(t,e);case 7:return t.referenceValue===e.referenceValue;case 8:return function(i,s){return st(i.geoPointValue.latitude)===st(s.geoPointValue.latitude)&&st(i.geoPointValue.longitude)===st(s.geoPointValue.longitude)}(t,e);case 2:return function(i,s){if("integerValue"in i&&"integerValue"in s)return st(i.integerValue)===st(s.integerValue);if("doubleValue"in i&&"doubleValue"in s){const o=st(i.doubleValue),a=st(s.doubleValue);return o===a?id(o)===id(a):isNaN(o)&&isNaN(a)}return!1}(t,e);case 9:return $o(t.arrayValue.values||[],e.arrayValue.values||[],_r);case 10:return function(i,s){const o=i.mapValue.fields||{},a=s.mapValue.fields||{};if(Mx(o)!==Mx(a))return!1;for(const u in o)if(o.hasOwnProperty(u)&&(a[u]===void 0||!_r(o[u],a[u])))return!1;return!0}(t,e);default:return pe()}}function Bl(t,e){return(t.values||[]).find(n=>_r(n,e))!==void 0}function zo(t,e){if(t===e)return 0;const n=Ds(t),r=Ds(e);if(n!==r)return De(n,r);switch(n){case 0:case 9007199254740991:return 0;case 1:return De(t.booleanValue,e.booleanValue);case 2:return function(s,o){const a=st(s.integerValue||s.doubleValue),u=st(o.integerValue||o.doubleValue);return a<u?-1:a>u?1:a===u?0:isNaN(a)?isNaN(u)?0:-1:1}(t,e);case 3:return Ux(t.timestampValue,e.timestampValue);case 4:return Ux(Fl(t),Fl(e));case 5:return De(t.stringValue,e.stringValue);case 6:return function(s,o){const a=ks(s),u=ks(o);return a.compareTo(u)}(t.bytesValue,e.bytesValue);case 7:return function(s,o){const a=s.split("/"),u=o.split("/");for(let d=0;d<a.length&&d<u.length;d++){const c=De(a[d],u[d]);if(c!==0)return c}return De(a.length,u.length)}(t.referenceValue,e.referenceValue);case 8:return function(s,o){const a=De(st(s.latitude),st(o.latitude));return a!==0?a:De(st(s.longitude),st(o.longitude))}(t.geoPointValue,e.geoPointValue);case 9:return function(s,o){const a=s.values||[],u=o.values||[];for(let d=0;d<a.length&&d<u.length;++d){const c=zo(a[d],u[d]);if(c)return c}return De(a.length,u.length)}(t.arrayValue,e.arrayValue);case 10:return function(s,o){if(s===Ku.mapValue&&o===Ku.mapValue)return 0;if(s===Ku.mapValue)return 1;if(o===Ku.mapValue)return-1;const a=s.fields||{},u=Object.keys(a),d=o.fields||{},c=Object.keys(d);u.sort(),c.sort();for(let h=0;h<u.length&&h<c.length;++h){const p=De(u[h],c[h]);if(p!==0)return p;const y=zo(a[u[h]],d[c[h]]);if(y!==0)return y}return De(u.length,c.length)}(t.mapValue,e.mapValue);default:throw pe()}}function Ux(t,e){if(typeof t=="string"&&typeof e=="string"&&t.length===e.length)return De(t,e);const n=Mi(t),r=Mi(e),i=De(n.seconds,r.seconds);return i!==0?i:De(n.nanos,r.nanos)}function jo(t){return lp(t)}function lp(t){return"nullValue"in t?"null":"booleanValue"in t?""+t.booleanValue:"integerValue"in t?""+t.integerValue:"doubleValue"in t?""+t.doubleValue:"timestampValue"in t?function(n){const r=Mi(n);return`time(${r.seconds},${r.nanos})`}(t.timestampValue):"stringValue"in t?t.stringValue:"bytesValue"in t?function(n){return ks(n).toBase64()}(t.bytesValue):"referenceValue"in t?function(n){return ce.fromName(n).toString()}(t.referenceValue):"geoPointValue"in t?function(n){return`geo(${n.latitude},${n.longitude})`}(t.geoPointValue):"arrayValue"in t?function(n){let r="[",i=!0;for(const s of n.values||[])i?i=!1:r+=",",r+=lp(s);return r+"]"}(t.arrayValue):"mapValue"in t?function(n){const r=Object.keys(n.fields||{}).sort();let i="{",s=!0;for(const o of r)s?s=!1:i+=",",i+=`${o}:${lp(n.fields[o])}`;return i+"}"}(t.mapValue):pe()}function $x(t,e){return{referenceValue:`projects/${t.projectId}/databases/${t.database}/documents/${e.path.canonicalString()}`}}function up(t){return!!t&&"integerValue"in t}function tg(t){return!!t&&"arrayValue"in t}function zx(t){return!!t&&"nullValue"in t}function jx(t){return!!t&&"doubleValue"in t&&isNaN(Number(t.doubleValue))}function xc(t){return!!t&&"mapValue"in t}function sl(t){if(t.geoPointValue)return{geoPointValue:Object.assign({},t.geoPointValue)};if(t.timestampValue&&typeof t.timestampValue=="object")return{timestampValue:Object.assign({},t.timestampValue)};if(t.mapValue){const e={mapValue:{fields:{}}};return Ms(t.mapValue.fields,(n,r)=>e.mapValue.fields[n]=sl(r)),e}if(t.arrayValue){const e={arrayValue:{values:[]}};for(let n=0;n<(t.arrayValue.values||[]).length;++n)e.arrayValue.values[n]=sl(t.arrayValue.values[n]);return e}return Object.assign({},t)}function Kb(t){return(((t.mapValue||{}).fields||{}).__type__||{}).stringValue==="__max__"}/** 2000 * @license 2001 * Copyright 2017 Google LLC 2002 * 2003 * Licensed under the Apache License, Version 2.0 (the "License");
2004 * you may not use this file except in compliance with the License. 2005 * You may obtain a copy of the License at 2006 * 2007 * http://www.apache.org/licenses/LICENSE-2.0 2008 * 2009 * Unless required by applicable law or agreed to in writing, software 2010 * distributed under the License is distributed on an "AS IS" BASIS, 2011 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2012 * See the License for the specific language governing permissions and 2013 * limitations under the License. 2014 */class un{constructor(e){this.value=e}static empty(){return new un({mapValue:{}})}field(e){if(e.isEmpty())return this.value;{let n=this.value;for(let r=0;r<e.length-1;++r)if(n=(n.mapValue.fields||{})[e.get(r)],!xc(n))return null;return n=(n.mapValue.fields||{})[e.lastSegment()],n||null}}set(e,n){this.getFieldsMap(e.popLast())[e.lastSegment()]=sl(n)}setAll(e){let n=bt.emptyPath(),r={},i=[];e.forEach((o,a)=>{if(!n.isImmediateParentOf(a)){const u=this.getFieldsMap(n);this.applyChanges(u,r,i),r={},i=[],n=a.popLast()}o?r[a.lastSegment()]=sl(o):i.push(a.lastSegment())});const s=this.getFieldsMap(n);this.applyChanges(s,r,i)}delete(e){const n=this.field(e.popLast());xc(n)&&n.mapValue.fields&&delete n.mapValue.fields[e.lastSegment()]}isEqual(e){return _r(this.value,e.value)}getFieldsMap(e){let n=this.value;n.mapValue.fields||(n.mapValue={fields:{}});for(let r=0;r<e.length;++r){let i=n.mapValue.fields[e.get(r)];xc(i)&&i.mapValue.fields||(i={mapValue:{fields:{}}},n.mapValue.fields[e.get(r)]=i),n=i}return n.mapValue.fields}applyChanges(e,n,r){Ms(n,(i,s)=>e[i]=s);for(const i of r)delete e[i]}clone(){return new un(sl(this.value))}}function bA(t){const e=[];return Ms(t.fields,(n,r)=>{const i=new bt([n]);if(xc(r)){const s=bA(r.mapValue).fields;
vendor: 4,180 bytes, lines 2014-2054
2014if(s.length===0)e.push(i);else for(const o of s)e.push(i.child(o))}else e.push(i)}),new _n(e)}/** 2015 * @license 2016 * Copyright 2017 Google LLC 2017 * 2018 * Licensed under the Apache License, Version 2.0 (the "License"); 2019 * you may not use this file except in compliance with the License. 2020 * You may obtain a copy of the License at 2021 * 2022 * http://www.apache.org/licenses/LICENSE-2.0 2023 * 2024 * Unless required by applicable law or agreed to in writing, software 2025 * distributed under the License is distributed on an "AS IS" BASIS, 2026 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2027 * See the License for the specific language governing permissions and 2028 * limitations under the License. 2029 */class Kt{constructor(e,n,r,i,s,o,a){this.key=e,this.documentType=n,this.version=r,this.readTime=i,this.createTime=s,this.data=o,this.documentState=a}static newInvalidDocument(e){return new Kt(e,0,ve.min(),ve.min(),ve.min(),un.empty(),0)}static newFoundDocument(e,n,r,i){return new Kt(e,1,n,ve.min(),r,i,0)}static newNoDocument(e,n){return new Kt(e,2,n,ve.min(),ve.min(),un.empty(),0)}static newUnknownDocument(e,n){return new Kt(e,3,n,ve.min(),ve.min(),un.empty(),2)}convertToFoundDocument(e,n){return!this.createTime.isEqual(ve.min())||this.documentType!==2&&this.documentType!==0||(this.createTime=e),this.version=e,this.documentType=1,this.data=n,this.documentState=0,this}convertToNoDocument(e){return this.version=e,this.documentType=2,this.data=un.empty(),this.documentState=0,this}convertToUnknownDocument(e){return this.version=e,this.documentType=3,this.data=un.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=ve.min(),this}setReadTime(e){return this.readTime=e,this}get hasLocalMutations(){return this.documentState===1}get hasCommittedMutations(){return this.documentState===2}get hasPendingWrites(){return this.hasLocalMutations||this.hasCommittedMutations}isValidDocument(){return this.documentType!==0}isFoundDocument(){return this.documentType===1}isNoDocument(){return this.documentType===2}isUnknownDocument(){return this.documentType===3}isEqual(e){return e instanceof Kt&&this.key.isEqual(e.key)&&this.version.isEqual(e.version)&&this.documentType===e.documentType&&this.documentState===e.documentState&&this.data.isEqual(e.data)}mutableCopy(){return new Kt(this.key,this.documentType,this.version,this.readTime,this.createTime,this.data.clone(),this.documentState)}toString(){return`Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {createTime: ${this.createTime}}), {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`}}/** 2030 * @license 2031 * Copyright 2022 Google LLC 2032 * 2033 * Licensed under the Apache License, Version 2.0 (the "License"); 2034 * you may not use this file except in compliance with the License. 2035 * You may obtain a copy of the License at 2036 * 2037 * http://www.apache.org/licenses/LICENSE-2.0 2038 * 2039 * Unless required by applicable law or agreed to in writing, software 2040 * distributed under the License is distributed on an "AS IS" BASIS, 2041 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2042 * See the License for the specific language governing permissions and 2043 * limitations under the License. 2044 */class sd{constructor(e,n){this.position=e,this.inclusive=n}}function Hx(t,e,n){let r=0;for(let i=0;i<t.position.length;i++){const s=e[i],o=t.position[i];if(s.field.isKeyField()?r=ce.comparator(ce.fromName(o.referenceValue),n.key):r=zo(o,n.data.field(s.field)),s.dir==="desc"&&(r*=-1),r!==0)break}return r}function qx(t,e){if(t===null)return e===null;if(e===null||t.inclusive!==e.inclusive||t.position.length!==e.position.length)return!1;for(let n=0;n<t.position.length;n++)if(!_r(t.position[n],e.position[n]))return!1;return!0}/** 2045 * @license 2046 * Copyright 2022 Google LLC 2047 * 2048 * Licensed under the Apache License, Version 2.0 (the "License"); 2049 * you may not use this file except in compliance with the License. 2050 * You may obtain a copy of the License at 2051 * 2052 * http://www.apache.org/licenses/LICENSE-2.0 2053 * 2054 * Unless required by applicable law or agreed to in writing, softw
2054are 2055 * distributed under the License is distributed on an "AS IS" BASIS, 2056 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2057 * See the License for the specific language governing permissions and 2058 * limitations under the License. 2059 */class od{constructor(e,n="asc"){this.field=e,this.dir=n}}function Qb(t,e){return t.dir===e.dir&&t.field.isEqual(e.field)}/** 2060 * @license 2061 * Copyright 2022 Google LLC 2062 * 2063 * Licensed under the Apache License, Version 2.0 (the "License"); 2064 * you may not use this file except in compliance with the License. 2065 * You may obtain a copy of the License at 2066 * 2067 * http://www.apache.org/licenses/LICENSE-2.0 2068 * 2069 * Unless required by applicable law or agreed to in writing, software 2070 * distributed under the License is distributed on an "AS IS" BASIS, 2071 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2072 * See the License for the specific language governing permissions and 2073 * limitations under the License. 2074 */class FA{}class at extends FA{constructor(e,n,r){super(),this.field=e,this.op=n,this.value=r}static create(e,n,r){return e.isKeyField()?n==="in"||n==="not-in"?this.createKeyFieldInFilter(e,n,r):new Yb(e,n,r):n==="array-contains"?new eF(e,r):n==="in"?new tF(e,r):n==="not-in"?new nF(e,r):n==="array-contains-any"?new rF(e,r):new at(e,n,r)}static createKeyFieldInFilter(e,n,r){return n==="in"?new Jb(e,r):new Zb(e,r)}matches(e){const n=e.data.field(this.field);return this.op==="!="?n!==null&&this.matchesComparison(zo(n,this.value)):n!==null&&Ds(this.value)===Ds(n)&&this.matchesComparison(zo(n,this.value))}matchesComparison(e){switch(this.op){case"<":return e<0;case"<=":return e<=0;case"==":return e===0;case"!=":return e!==0;case">":return e>0;case">=":return e>=0;default:return pe()}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}}class tr extends FA{constructor(e,n){super(),this.filters=e,this.op=n,this.ae=null}static create(e,n){return new tr(e,n)}matches(e){return NA(this)?this.filters.find(n=>!n.matches(e))===void 0:this.filters.find(n=>n.matches(e))!==void 0}getFlattenedFilters(){return this.ae!==null||(this.ae=this.filters.reduce((e,n)=>e.concat(n.getFlattenedFilters()),[])),this.ae}getFilters(){return Object.assign([],this.filters)}}function NA(t){return t.op==="and"}function BA(t){return Xb(t)&&NA(t)}function Xb(t){for(const e of t.filters)if(e instanceof tr)return!1;return!0}function cp(t){if(t instanceof at)return t.field.canonicalString()+t.op.toString()+jo(t.value);if(BA(t))return t.filters.map(e=>cp(e)).join(",");{const e=t.filters.map(n=>cp(n)).join(",");return`${t.op}(${e})`}}function OA(t,e){return t instanceof at?function(r,i){return i instanceof at&&r.op===i.op&&r.field.isEqual(i.field)&&_r(r.value,i.value)}(t,e):t instanceof tr?function(r,i){return i instanceof tr&&r.op===i.op&&r.filters.length===i.filters.length?r.filters.reduce((s,o,a)=>s&&OA(o,i.filters[a]),!0):!1}(t,e):void pe()}function LA(t){return t instanceof at?function(n){return`${n.field.canonicalString()} ${n.op} ${jo(n.value)}`}(t):t instanceof tr?function(n){return n.op.toString()+" {"+n.getFilters().map(LA).join(" ,")+"}"}(t):"Filter"}class Yb extends at{constructor(e,n,r){super(e,n,r),this.key=ce.fromName(r.referenceValue)}matches(e){const n=ce.comparator(e.key,this.key);return this.matchesComparison(n)}}class Jb extends at{constructor(e,n){super(e,"in",n),this.keys=MA("in",n)}matches(e){return this.keys.some(n=>n.isEqual(e.key))}}class Zb extends at{constructor(e,n){super(e,"not-in",n),this.keys=MA("not-in",n)}matches(e){return!this.keys.some(n=>n.isEqual(e.key))}}function MA(t,e){var n;return(((n=e.arrayValue)===null||n===void 0?void 0:n.values)||[]).map(r=>ce.fromName(r.referenceValue))}class eF extends at{constructor(e,n){super(e,"array-contains",n)}matches(e){const n=e.data.field(this.field);return tg(n)&&Bl(n.arrayValue,this.value)}}class tF extends at{constructor(e,n){super(e,"in",n)}matches(e){const n=e.data.field(this.field);return n!==null&&Bl(this.value.arrayValue,n)}}class nF extends at{constructor(e,n){super(e,"not-in",n)}matches(e){if(Bl(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;const n=e.data.field(this.field);return n!==null&&!Bl(this.value.arrayValue,n)}}class rF extends at{constructor(e,n){super(e,"array-contains-any",n)}matches(e){const n=e.data.field(this.field);return!(!tg(n)||!n.arrayValue.values)&&n.arrayValue.values.some(r=>Bl(this.value.arrayValue,r))}}/** 2075 * @license 2076 * Copyright 2019 Google LLC 2077 * 2078 * Licensed under the Apache License, Version 2.0 (the "License");
2079 * you may not use this file except in compliance with the License. 2080 * You may obtain a copy of the License at 2081 * 2082 * http://www.apache.org/licenses/LICENSE-2.0 2083 * 2084 * Unless required by applicable law or agreed to in writing, software 2085 * distributed under the License is distributed on an "AS IS" BASIS, 2086 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2087 * See the License for the specific language governing permissions and 2088 * limitations under the License. 2089 */class iF{constructor(e,n=null,r=[],i=[],s=null,o=null,a=null){this.path=e,this.collectionGroup=n,this.orderBy=r,this.filters=i,this.limit=s,this.startAt=o,this.endAt=a,this.ue=null}}function Wx(t,e=null,n=[],r=[],i=null,s=null,o=null){return new iF(t,e,n,r,i,s,o)}function ng(t){const e=xe(t);if(e.ue===null){let n=e.path.canonicalString();e.collectionGroup!==null&&(n+="|cg:"+e.collectionGroup),n+="|f:",n+=e.filters.map(r=>cp(r)).join(","),n+="|ob:",n+=e.orderBy.map(r=>function(s){return s.field.canonicalString()+s.dir}(r)).join(","),qd(e.limit)||(n+="|l:",n+=e.limit),e.startAt&&(n+="|lb:",n+=e.startAt.inclusive?"b:":"a:",n+=e.startAt.position.map(r=>jo(r)).join(",")),e.endAt&&(n+="|ub:",n+=e.endAt.inclusive?"a:":"b:",n+=e.endAt.position.map(r=>jo(r)).join(",")),e.ue=n}return e.ue}function rg(t,e){if(t.limit!==e.limit||t.orderBy.length!==e.orderBy.length)return!1;for(let n=0;n<t.orderBy.length;n++)if(!Qb(t.orderBy[n],e.orderBy[n]))return!1;if(t.filters.length!==e.filters.length)return!1;for(let n=0;n<t.filters.length;n++)if(!OA(t.filters[n],e.filters[n]))return!1;return t.collectionGroup===e.collectionGroup&&!!t.path.isEqual(e.path)&&!!qx(t.startAt,e.startAt)&&qx(t.endAt,e.endAt)}function dp(t){return ce.isDocumentKey(t.path)&&t.collectionGroup===null&&t.filters.length===0}/** 2090 * @license 2091 * Copyright 2017 Google LLC 2092 * 2093 * Licensed under the Apache License, Version 2.0 (the "License"); 2094 * you may not use this file except in compliance with the License. 2095 * You may obtain a copy of the License at 2096 * 2097 * http://www.apache.org/licenses/LICENSE-2.0 2098 * 2099 * Unless required by applicable law or agreed to in writing, software 2100 * distributed under the License is distributed on an "AS IS" BASIS, 2101 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2102 * See the License for the specific language governing permissions and 2103 * limitations under the License. 2104 */class Zl{constructor(e,n=null,r=[],i=[],s=null,o="F",a=null,u=null){this.path=e,this.collectionGroup=n,this.explicitOrderBy=r,this.filters=i,this.limit=s,this.limitType=o,this.startAt=a,this.endAt=u,this.ce=null,this.le=null,this.he=null,this.startAt,this.endAt}}function sF(t,e,n,r,i,s,o,a){return new Zl(t,e,n,r,i,s,o,a)}function ig(t){return new Zl(t)}function Gx(t){return t.filters.length===0&&t.limit===null&&t.startAt==null&&t.endAt==null&&(t.explicitOrderBy.length===0||t.explicitOrderBy.length===1&&t.explicitOrderBy[0].field.isKeyField())}function VA(t){return t.collectionGroup!==null}function ol(t){const e=xe(t);if(e.ce===null){e.ce=[];const n=new Set;for(const s of e.explicitOrderBy)e.ce.push(s),n.add(s.field.canonicalString());const r=e.explicitOrderBy.length>0?e.explicitOrderBy[e.explicitOrderBy.length-1].dir:"asc";(function(o){let a=new Nt(bt.comparator);return o.filters.forEach(u=>{u.getFlattenedFilters().forEach(d=>{d.isInequality()&&(a=a.add(d.field))})}),a})(e).forEach(s=>{n.has(s.canonicalString())||s.isKeyField()||e.ce.push(new od(s,r))}),n.has(bt.keyField().canonicalString())||e.ce.push(new od(bt.keyField(),r))}return e.ce}function vr(t){const e=xe(t);return e.le||(e.le=oF(e,ol(t))),e.le}function oF(t,e){if(t.limitType==="F")return Wx(t.path,t.collectionGroup,e,t.filters,t.limit,t.startAt,t.endAt);{e=e.map(i=>{const s=i.dir==="desc"?"asc":"desc";return new od(i.field,s)});const n=t.endAt?new sd(t.endAt.position,t.endAt.inclusive):null,r=t.startAt?new sd(t.startAt.position,t.startAt.inclusive):null;return Wx(t.path,t.collectionGroup,e,t.filters,t.limit,n,r)}}function hp(t,e){const n=t.filters.concat([e]);return new Zl(t.path,t.collectionGroup,t.explicitOrderBy.slice(),n,t.limit,t.limitType,t.startAt,t.endAt)}function fp(t,e,n){return new Zl(t.path,t.collectionGroup,t.explicitOrderBy.slice(),t.filters.slice(),e,n,t.startAt,t.endAt)}function Wd(t,e){return rg(vr(t),vr(e))&&t.limitType===e.limitType}function UA(t){return`${ng(vr(t))}|lt:${t.limitType}`}function ro(t){return`Query(target=${function(n){let r=n.path.canonicalString();return n.collectionGroup!==null&&(r+=" collectionGroup="+n.collectionGroup),n.filters.length>0&&(r+=`, filters: [${n.filters.map(i=>LA(i)).join(", ")}]`),qd(n.limit)||(r+=", limit: "+n.limit),n.orderBy.length>0&&(r+=`, orderBy: [${n.orderBy.map(i=>function(o){return`${o.field.canonicalString()} (${o.dir})`}(i)).join(", ")}]`),n.startAt&&(r+=", startAt: ",r+=n.startAt.inclusive?"b:":"a:",r+=n.startAt.position.map(i=>jo(i)).join(",")),n.endAt&&(r+=", endAt: ",r+=n.endAt.inclusive?"a:":"b:",r+=n.endAt.position.map(i=>jo(i)).join(",")),`Target(${r})`}(vr(t))}; limitType=${t.limitType})`}function Gd(t,e){return e.isFoundDocument()&&function(r,i){const s=i.key.path;return r.collectionGroup!==null?i.key.hasCollectionId(r.collectionGroup)&&r.path.isPrefixOf(s):ce.isDocumentKey(r.path)?r.path.isEqual(s):r.path.isImmediateParentOf(s)}(t,e)&&function(r,i){for(const s of ol(r))if(!s.field.isKeyField()&&i.data.field(s.field)===null)return!1;return!0}(t,e)&&function(r,i){for(const s of r.filters)if(!s.matches(i))return!1;return!0}(t,e)&&function(r,i){return!(r.startAt&&!function(o,a,u){const d=Hx(o,a,u);return o.inclusive?d<=0:d<0}(r.startAt,ol(r),i)||r.endAt&&!function(o,a,u){const d=Hx(o,a,u);return o.inclusive?d>=0:d>0}(r.endAt,ol(r),i))}(t,e)}function aF(t){return t.collectionGroup||(t.path.length%2==1?t.path.lastSegment():t.path.get(t.path.length-2))}function $A(t){return(e,n)=>{let r=!1;for(const i of ol(t)){const s=lF(i,e,n);if(s!==0)return s;r=r||i.field.isKeyField()}return 0}}function lF(t,e,n){const r=t.field.isKeyField()?ce.comparator(e.key,n.key):function(s,o,a){const u=o.data.field(s),d=a.data.field(s);return u!==null&&d!==null?zo(u,d):pe()}
2104(t.field,e,n);switch(t.dir){case"asc":return r;case"desc":return-1*r;default:return pe()}}/** 2105 * @license 2106 * Copyright 2017 Google LLC 2107 * 2108 * Licensed under the Apache License, Version 2.0 (the "License"); 2109 * you may not use this file except in compliance with the License. 2110 * You may obtain a copy of the License at 2111 * 2112 * http://www.apache.org/licenses/LICENSE-2.0 2113 * 2114 * Unless required by applicable law or agreed to in writing, software 2115 * distributed under the License is distributed on an "AS IS" BASIS, 2116 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2117 * See the License for the specific language governing permissions and 2118 * limitations under the License. 2119 */class ia{constructor(e,n){this.mapKeyFn=e,this.equalsFn=n,this.inner={},this.innerSize=0}get(e){const n=this.mapKeyFn(e),r=this.inner[n];if(r!==void 0){for(const[i,s]of r)if(this.equalsFn(i,e))return s}}has(e){return this.get(e)!==void 0}set(e,n){const r=this.mapKeyFn(e),i=this.inner[r];if(i===void 0)return this.inner[r]=[[e,n]],void this.innerSize++;for(let s=0;s<i.length;s++)if(this.equalsFn(i[s][0],e))return void(i[s]=[e,n]);i.push([e,n]),this.innerSize++}delete(e){const n=this.mapKeyFn(e),r=this.inner[n];if(r===void 0)return!1;for(let i=0;i<r.length;i++)if(this.equalsFn(r[i][0],e))return r.length===1?delete this.inner[n]:r.splice(i,1),this.innerSize--,!0;return!1}forEach(e){Ms(this.inner,(n,r)=>{for(const[i,s]of r)e(i,s)})}isEmpty(){return kA(this.inner)}size(){return this.innerSize}}/** 2120 * @license 2121 * Copyright 2017 Google LLC 2122 * 2123 * Licensed under the Apache License, Version 2.0 (the "License"); 2124 * you may not use this file except in compliance with the License. 2125 * You may obtain a copy of the License at 2126 * 2127 * http://www.apache.org/licenses/LICENSE-2.0 2128 * 2129 * Unless required by applicable law or agreed to in writing, software 2130 * distributed under the License is distributed on an "AS IS" BASIS, 2131 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2132 * See the License for the specific language governing permissions and 2133 * limitations under the License. 2134 */const uF=new Ye(ce.comparator);function Hr(){return uF}const zA=new Ye(ce.comparator);function qa(...t){let e=zA;for(const n of t)e=e.insert(n.key,n);return e}function jA(t){let e=zA;return t.forEach((n,r)=>e=e.insert(n,r.overlayedDocument)),e}function ms(){return al()}function HA(){return al()}function al(){return new ia(t=>t.toString(),(t,e)=>t.isEqual(e))}const cF=new Ye(ce.comparator),dF=new Nt(ce.comparator);function Ae(...t){let e=dF;for(const n of t)e=e.add(n);return e}const hF=new Nt(De);function fF(){return hF}/** 2135 * @license 2136 * Copyright 2020 Google LLC 2137 * 2138 * Licensed under the Apache License, Version 2.0 (the "License"); 2139 * you may not use this file except in compliance with the License. 2140 * You may obtain a copy of the License at 2141 * 2142 * http://www.apache.org/licenses/LICENSE-2.0 2143 * 2144 * Unless required by applicable law or agreed to in writing, software 2145 * distributed under the License is distributed on an "AS IS" BASIS, 2146 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2147 * See the License for the specific language governing permissions and 2148 * limitations under the License. 2149 */function qA(t,e){if(t.useProto3Json){if(isNaN(e))return{doubleValue:"NaN"};if(e===1/0)return{doubleValue:"Infinity"};if(e===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:id(e)?"-0":e}}function WA(t){return{integerValue:""+t}}function pF(t,e){return qb(e)?WA(e):qA(t,e)}/** 2150 * @license 2151 * Copyright 2018 Google LLC 2152 * 2153 * Licensed under the Apache License, Version 2.0 (the "License"); 2154 * you may not use this file except in compliance with the License. 2155 * You may obtain a copy of the License at 2156 * 2157 * http://www.apache.org/licenses/LICENSE-2.0 2158 * 2159 * Unless required by applicable law or agreed to in writing, software 2160 * distributed under the License is distributed on an "AS IS" BASIS, 2161 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2162 * See the License for the specific language governing permissions and 2163 * limitations under the License. 2164 */class Kd{constructor(){this._=void 0}}function mF(t,e,n){return t instanceof ad?function(i,s){const o={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:i.seconds,nanos:i.nanoseconds}}}};return s&&Zm(s)&&(s=eg(s)),s&&(o.fields.__previous_value__=s),{mapValue:o}}(n,e):t instanceof Ol?KA(t,e):t instanceof Ll?QA(t,e):function(i,s){const o=GA(i,s),a=Kx(o)+Kx(i.Pe);
2164return up(o)&&up(i.Pe)?WA(a):qA(i.serializer,a)}(t,e)}function gF(t,e,n){return t instanceof Ol?KA(t,e):t instanceof Ll?QA(t,e):n}function GA(t,e){return t instanceof ld?function(r){return up(r)||function(s){return!!s&&"doubleValue"in s}(r)}(e)?e:{integerValue:0}:null}class ad extends Kd{}class Ol extends Kd{constructor(e){super(),this.elements=e}}function KA(t,e){const n=XA(e);for(const r of t.elements)n.some(i=>_r(i,r))||n.push(r);return{arrayValue:{values:n}}}class Ll extends Kd{constructor(e){super(),this.elements=e}}function QA(t,e){let n=XA(e);for(const r of t.elements)n=n.filter(i=>!_r(i,r));return{arrayValue:{values:n}}}class ld extends Kd{constructor(e,n){super(),this.serializer=e,this.Pe=n}}function Kx(t){return st(t.integerValue||t.doubleValue)}function XA(t){return tg(t)&&t.arrayValue.values?t.arrayValue.values.slice():[]}function yF(t,e){return t.field.isEqual(e.field)&&function(r,i){return r instanceof Ol&&i instanceof Ol||r instanceof Ll&&i instanceof Ll?$o(r.elements,i.elements,_r):r instanceof ld&&i instanceof ld?_r(r.Pe,i.Pe):r instanceof ad&&i instanceof ad}(t.transform,e.transform)}class vF{constructor(e,n){this.version=e,this.transformResults=n}}class Bn{constructor(e,n){this.updateTime=e,this.exists=n}static none(){return new Bn}static exists(e){return new Bn(void 0,e)}static updateTime(e){return new Bn(e)}get isNone(){return this.updateTime===void 0&&this.exists===void 0}isEqual(e){return this.exists===e.exists&&(this.updateTime?!!e.updateTime&&this.updateTime.isEqual(e.updateTime):!e.updateTime)}}function _c(t,e){return t.updateTime!==void 0?e.isFoundDocument()&&e.version.isEqual(t.updateTime):t.exists===void 0||t.exists===e.isFoundDocument()}class Qd{}function YA(t,e){if(!t.hasLocalMutations||e&&e.fields.length===0)return null;if(e===null)return t.isNoDocument()?new sg(t.key,Bn.none()):new eu(t.key,t.data,Bn.none());{const n=t.data,r=un.empty();let i=new Nt(bt.comparator);for(let s of e.fields)if(!i.has(s)){let o=n.field(s);o===null&&s.length>1&&(s=s.popLast(),o=n.field(s)),o===null?r.delete(s):r.set(s,o),i=i.add(s)}return new qi(t.key,r,new _n(i.toArray()),Bn.none())}}function xF(t,e,n){t instanceof eu?function(i,s,o){const a=i.value.clone(),u=Xx(i.fieldTransforms,s,o.transformResults);a.setAll(u),s.convertToFoundDocument(o.version,a).setHasCommittedMutations()}(t,e,n):t instanceof qi?function(i,s,o){if(!_c(i.precondition,s))return void s.convertToUnknownDocument(o.version);const a=Xx(i.fieldTransforms,s,o.transformResults),u=s.data;u.setAll(JA(i)),u.setAll(a),s.convertToFoundDocument(o.version,u).setHasCommittedMutations()}(t,e,n):function(i,s,o){s.convertToNoDocument(o.version).setHasCommittedMutations()}(0,e,n)}function ll(t,e,n,r){return t instanceof eu?function(s,o,a,u){if(!_c(s.precondition,o))return a;const d=s.value.clone(),c=Yx(s.fieldTransforms,u,o);return d.setAll(c),o.convertToFoundDocument(o.version,d).setHasLocalMutations(),null}(t,e,n,r):t instanceof qi?function(s,o,a,u){if(!_c(s.precondition,o))return a;const d=Yx(s.fieldTransforms,u,o),c=o.data;return c.setAll(JA(s)),c.setAll(d),o.convertToFoundDocument(o.version,c).setHasLocalMutations(),a===null?null:a.unionWith(s.fieldMask.fields).unionWith(s.fieldTransforms.map(h=>h.field))}(t,e,n,r):function(s,o,a){return _c(s.precondition,o)?(o.convertToNoDocument(o.version).setHasLocalMutations(),null):a}(t,e,n)}function _F(t,e){let n=null;for(const r of t.fieldTransforms){const i=e.data.field(r.field),s=GA(r.transform,i||null);s!=null&&(n===null&&(n=un.empty()),n.set(r.field,s))}return n||null}function Qx(t,e){return t.type===e.type&&!!t.key.isEqual(e.key)&&!!t.precondition.isEqual(e.precondition)&&!!function(r,i){return r===void 0&&i===void 0||!(!r||!i)&&$o(r,i,(s,o)=>yF(s,o))}(t.fieldTransforms,e.fieldTransforms)&&(t.type===0?t.value.isEqual(e.value):t.type!==1||t.data.isEqual(e.data)&&t.fieldMask.isEqual(e.fieldMask))}class eu extends Qd{constructor(e,n,r,i=[]){super(),this.key=e,this.value=n,this.precondition=r,this.fieldTransforms=i,this.type=0}getFieldMask(){return null}}class qi extends Qd{constructor(e,n,r,i,s=[]){super(),this.key=e,this.data=n,this.fieldMask=r,this.prec
2164ondition=i,this.fieldTransforms=s,this.type=1}getFieldMask(){return this.fieldMask}}function JA(t){const e=new Map;return t.fieldMask.fields.forEach(n=>{if(!n.isEmpty()){const r=t.data.field(n);e.set(n,r)}}),e}function Xx(t,e,n){const r=new Map;Ve(t.length===n.length);for(let i=0;i<n.length;i++){const s=t[i],o=s.transform,a=e.data.field(s.field);r.set(s.field,gF(o,a,n[i]))}return r}function Yx(t,e,n){const r=new Map;for(const i of t){const s=i.transform,o=n.data.field(i.field);r.set(i.field,mF(s,o,e))}return r}class sg extends Qd{constructor(e,n){super(),this.key=e,this.precondition=n,this.type=2,this.fieldTransforms=[]}getFieldMask(){return null}}class EF extends Qd{constructor(e,n){super(),this.key=e,this.precondition=n,this.type=3,this.fieldTransforms=[]}getFieldMask(){return null}}/** 2165 * @license 2166 * Copyright 2017 Google LLC 2167 * 2168 * Licensed under the Apache License, Version 2.0 (the "License"); 2169 * you may not use this file except in compliance with the License. 2170 * You may obtain a copy of the License at 2171 * 2172 * http://www.apache.org/licenses/LICENSE-2.0 2173 * 2174 * Unless required by applicable law or agreed to in writing, software 2175 * distributed under the License is distributed on an "AS IS" BASIS, 2176 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2177 * See the License for the specific language governing permissions and 2178 * limitations under the License. 2179 */class wF{constructor(e,n,r,i){this.batchId=e,this.localWriteTime=n,this.baseMutations=r,this.mutations=i}applyToRemoteDocument(e,n){const r=n.mutationResults;for(let i=0;i<this.mutations.length;i++){const s=this.mutations[i];s.key.isEqual(e.key)&&xF(s,e,r[i])}}applyToLocalView(e,n){for(const r of this.baseMutations)r.key.isEqual(e.key)&&(n=ll(r,e,n,this.localWriteTime));for(const r of this.mutations)r.key.isEqual(e.key)&&(n=ll(r,e,n,this.localWriteTime));return n}applyToLocalDocumentSet(e,n){const r=HA();return this.mutations.forEach(i=>{const s=e.get(i.key),o=s.overlayedDocument;let a=this.applyToLocalView(o,s.mutatedFields);a=n.has(i.key)?null:a;const u=YA(o,a);u!==null&&r.set(i.key,u),o.isValidDocument()||o.convertToNoDocument(ve.min())}),r}keys(){return this.mutations.reduce((e,n)=>e.add(n.key),Ae())}isEqual(e){return this.batchId===e.batchId&&$o(this.mutations,e.mutations,(n,r)=>Qx(n,r))&&$o(this.baseMutations,e.baseMutations,(n,r)=>Qx(n,r))}}class og{constructor(e,n,r,i){this.batch=e,this.commitVersion=n,this.mutationResults=r,this.docVersions=i}static from(e,n,r){Ve(e.mutations.length===r.length);let i=function(){return cF}();const s=e.mutations;for(let o=0;o<s.length;o++)i=i.insert(s[o].key,r[o].version);return new og(e,n,r,i)}}/** 2180 * @license 2181 * Copyright 2022 Google LLC 2182 * 2183 * Licensed under the Apache License, Version 2.0 (the "License"); 2184 * you may not use this file except in compliance with the License. 2185 * You may obtain a copy of the License at 2186 * 2187 * http://www.apache.org/licenses/LICENSE-2.0 2188 * 2189 * Unless required by applicable law or agreed to in writing, software 2190 * distributed under the License is distributed on an "AS IS" BASIS, 2191 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2192 * See the License for the specific language governing permissions and 2193 * limitations under the License. 2194 */class AF{constructor(e,n){this.largestBatchId=e,this.mutation=n}getKey(){return this.mutation.key}isEqual(e){return e!==null&&this.mutation===e.mutation}toString(){return`Overlay{ 2195 largestBatchId: ${this.largestBatchId}, 2196 mutation: ${this.mutation.toString()} 2197 }`}}/** 2198 * @license 2199 * Copyright 2017 Google LLC 2200 * 2201 * Licensed under the Apache License, Version 2.0 (the "License"); 2202 * you may not use this file except in compliance with the License. 2203 * You may obtain a copy of the License at 2204 * 2205 * http://www.apache.org/licenses/LICENSE-2.0 2206 * 2207 * Unless required by applicable law or agreed to in writing, software 2208 * distributed under the License is distributed on an "AS IS" BASIS, 2209 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2210 * See the License for the specific language governing permissions and 2211 * limitations under the License. 2212 */class CF{constructor(e,n){this.count=e,this.unchangedNames=n}}/** 2213 * @license 2214 * Copyright 2017 Google LLC 2215 * 2216 * Licensed under the Apache License, Version 2.0 (the "License");
2217 * you may not use this file except in compliance with the License. 2218 * You may obtain a copy of the License at 2219 * 2220 * http://www.apache.org/licenses/LICENSE-2.0 2221 * 2222 * Unless required by applicable law or agreed to in writing, software 2223 * distributed under the License is distributed on an "AS IS" BASIS, 2224 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2225 * See the License for the specific language governing permissions and 2226 * limitations under the License. 2227 */var it,Se;function TF(t){switch(t){default:return pe();case Y.CANCELLED:case Y.UNKNOWN:case Y.DEADLINE_EXCEEDED:case Y.RESOURCE_EXHAUSTED:case Y.INTERNAL:case Y.UNAVAILABLE:case Y.UNAUTHENTICATED:return!1;case Y.INVALID_ARGUMENT:case Y.NOT_FOUND:case Y.ALREADY_EXISTS:case Y.PERMISSION_DENIED:case Y.FAILED_PRECONDITION:case Y.ABORTED:case Y.OUT_OF_RANGE:case Y.UNIMPLEMENTED:case Y.DATA_LOSS:return!0}}function ZA(t){if(t===void 0)return jr("GRPC error has no .code"),Y.UNKNOWN;switch(t){case it.OK:return Y.OK;case it.CANCELLED:return Y.CANCELLED;case it.UNKNOWN:return Y.UNKNOWN;case it.DEADLINE_EXCEEDED:return Y.DEADLINE_EXCEEDED;case it.RESOURCE_EXHAUSTED:return Y.RESOURCE_EXHAUSTED;case it.INTERNAL:return Y.INTERNAL;case it.UNAVAILABLE:return Y.UNAVAILABLE;case it.UNAUTHENTICATED:return Y.UNAUTHENTICATED;case it.INVALID_ARGUMENT:return Y.INVALID_ARGUMENT;case it.NOT_FOUND:return Y.NOT_FOUND;case it.ALREADY_EXISTS:return Y.ALREADY_EXISTS;case it.PERMISSION_DENIED:return Y.PERMISSION_DENIED;case it.FAILED_PRECONDITION:return Y.FAILED_PRECONDITION;case it.ABORTED:return Y.ABORTED;case it.OUT_OF_RANGE:return Y.OUT_OF_RANGE;case it.UNIMPLEMENTED:return Y.UNIMPLEMENTED;case it.DATA_LOSS:return Y.DATA_LOSS;default:return pe()}}(Se=it||(it={}))[Se.OK=0]="OK",Se[Se.CANCELLED=1]="CANCELLED",Se[Se.UNKNOWN=2]="UNKNOWN",Se[Se.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",Se[Se.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",Se[Se.NOT_FOUND=5]="NOT_FOUND",Se[Se.ALREADY_EXISTS=6]="ALREADY_EXISTS",Se[Se.PERMISSION_DENIED=7]="PERMISSION_DENIED",Se[Se.UNAUTHENTICATED=16]="UNAUTHENTICATED",Se[Se.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",Se[Se.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",Se[Se.ABORTED=10]="ABORTED",Se[Se.OUT_OF_RANGE=11]="OUT_OF_RANGE",Se[Se.UNIMPLEMENTED=12]="UNIMPLEMENTED",Se[Se.INTERNAL=13]="INTERNAL",Se[Se.UNAVAILABLE=14]="UNAVAILABLE",Se[Se.DATA_LOSS=15]="DATA_LOSS";/** 2228 * @license 2229 * Copyright 2023 Google LLC 2230 * 2231 * Licensed under the Apache License, Version 2.0 (the "License"); 2232 * you may not use this file except in compliance with the License. 2233 * You may obtain a copy of the License at 2234 * 2235 * http://www.apache.org/licenses/LICENSE-2.0 2236 * 2237 * Unless required by applicable law or agreed to in writing, software 2238 * distributed under the License is distributed on an "AS IS" BASIS, 2239 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2240 * See the License for the specific language governing permissions and 2241 * limitations under the License. 2242 */function IF(){return new TextEncoder}/** 2243 * @license 2244 * Copyright 2022 Google LLC 2245 * 2246 * Licensed under the Apache License, Version 2.0 (the "License"); 2247 * you may not use this file except in compliance with the License. 2248 * You may obtain a copy of the License at 2249 * 2250 * http://www.apache.org/licenses/LICENSE-2.0 2251 * 2252 * Unless required by applicable law or agreed to in writing, software 2253 * distributed under the License is distributed on an "AS IS" BASIS, 2254 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2255 * See the License for the specific language governing permissions and 2256 * limitations under the License. 2257 */const SF=new xs([4294967295,4294967295],0);function Jx(t){const e=IF().encode(t),n=new EA;return n.update(e),new Uint8Array(n.digest())}function Zx(t){const e=new DataView(t.buffer),n=e.getUint32(0,!0),r=e.getUint32(4,!0),i=e.getUint32(8,!0),s=e.getUint32(12,!0);return[new xs([n,r],0),new xs([i,s],0)]}class ag{constructor(e,n,r){if(this.bitmap=e,this.padding=n,this.hashCount=r,n<0||n>=8)throw new Wa(`Invalid padding: ${n}`);if(r<0)throw new Wa(`Invalid hash count: ${r}`);if(e.length>0&&this.hashCount===0)throw new Wa(`Invalid hash count: ${r}`);if(e.length===0&&n!==0)throw new Wa(`Invalid padding when bitmap length is 0: ${n}`);
2257this.Ie=8*e.length-n,this.Te=xs.fromNumber(this.Ie)}Ee(e,n,r){let i=e.add(n.multiply(xs.fromNumber(r)));return i.compare(SF)===1&&(i=new xs([i.getBits(0),i.getBits(1)],0)),i.modulo(this.Te).toNumber()}de(e){return(this.bitmap[Math.floor(e/8)]&1<<e%8)!=0}mightContain(e){if(this.Ie===0)return!1;const n=Jx(e),[r,i]=Zx(n);for(let s=0;s<this.hashCount;s++){const o=this.Ee(r,i,s);if(!this.de(o))return!1}return!0}static create(e,n,r){const i=e%8==0?0:8-e%8,s=new Uint8Array(Math.ceil(e/8)),o=new ag(s,i,n);return r.forEach(a=>o.insert(a)),o}insert(e){if(this.Ie===0)return;const n=Jx(e),[r,i]=Zx(n);for(let s=0;s<this.hashCount;s++){const o=this.Ee(r,i,s);this.Ae(o)}}Ae(e){const n=Math.floor(e/8),r=e%8;this.bitmap[n]|=1<<r}}class Wa extends Error{constructor(){super(...arguments),this.name="BloomFilterError"}}/** 2258 * @license 2259 * Copyright 2017 Google LLC 2260 * 2261 * Licensed under the Apache License, Version 2.0 (the "License"); 2262 * you may not use this file except in compliance with the License. 2263 * You may obtain a copy of the License at 2264 * 2265 * http://www.apache.org/licenses/LICENSE-2.0 2266 * 2267 * Unless required by applicable law or agreed to in writing, software 2268 * distributed under the License is distributed on an "AS IS" BASIS, 2269 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2270 * See the License for the specific language governing permissions and 2271 * limitations under the License. 2272 */class Xd{constructor(e,n,r,i,s){this.snapshotVersion=e,this.targetChanges=n,this.targetMismatches=r,this.documentUpdates=i,this.resolvedLimboDocuments=s}static createSynthesizedRemoteEventForCurrentChange(e,n,r){const i=new Map;return i.set(e,tu.createSynthesizedTargetChangeForCurrentChange(e,n,r)),new Xd(ve.min(),i,new Ye(De),Hr(),Ae())}}class tu{constructor(e,n,r,i,s){this.resumeToken=e,this.current=n,this.addedDocuments=r,this.modifiedDocuments=i,this.removedDocuments=s}static createSynthesizedTargetChangeForCurrentChange(e,n,r){return new tu(r,n,Ae(),Ae(),Ae())}}/** 2273 * @license 2274 * Copyright 2017 Google LLC 2275 * 2276 * Licensed under the Apache License, Version 2.0 (the "License"); 2277 * you may not use this file except in compliance with the License. 2278 * You may obtain a copy of the License at 2279 * 2280 * http://www.apache.org/licenses/LICENSE-2.0 2281 * 2282 * Unless required by applicable law or agreed to in writing, software 2283 * distributed under the License is distributed on an "AS IS" BASIS, 2284 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2285 * See the License for the specific language governing permissions and 2286 * limitations under the License. 2287 */class Ec{constructor(e,n,r,i){this.Re=e,this.removedTargetIds=n,this.key=r,this.Ve=i}}class eC{constructor(e,n){this.targetId=e,this.me=n}}class tC{constructor(e,n,r=Xt.EMPTY_BYTE_STRING,i=null){this.state=e,this.targetIds=n,this.resumeToken=r,this.cause=i}}class e_{constructor(){this.fe=0,this.ge=n_(),this.pe=Xt.EMPTY_BYTE_STRING,this.ye=!1,this.we=!0}get current(){return this.ye}get resumeToken(){return this.pe}get Se(){return this.fe!==0}get be(){return this.we}De(e){e.approximateByteSize()>0&&(this.we=!0,this.pe=e)}Ce(){let e=Ae(),n=Ae(),r=Ae();return this.ge.forEach((i,s)=>{switch(s){case 0:e=e.add(i);break;case 2:n=n.add(i);break;case 1:r=r.add(i);break;default:pe()}}),new tu(this.pe,this.ye,e,n,r)}ve(){this.we=!1,this.ge=n_()}Fe(e,n){this.we=!0,this.ge=this.ge.insert(e,n)}Me(e){this.we=!0,this.ge=this.ge.remove(e)}xe(){this.fe+=1}Oe(){this.fe-=1,Ve(this.fe>=0)}Ne(){this.we=!0,this.ye=!0}}class RF{constructor(e){this.Le=e,this.Be=new Map,this.ke=Hr(),this.qe=t_(),this.Qe=new Ye(De)}Ke(e){for(const n of e.Re)e.Ve&&e.Ve.isFoundDocument()?this.$e(n,e.Ve):this.Ue(n,e.key,e.Ve);for(const n of e.removedTargetIds)this.Ue(n,e.key,e.Ve)}We(e){this.forEachTarget(e,n=>{const r=this.Ge(n);switch(e.state){case 0:this.ze(n)&&r.De(e.resumeToken);break;case 1:r.Oe(),r.Se||r.ve(),r.De(e.resumeToken);break;case 2:r.Oe(),r.Se||this.removeTarget(n);break;case 3:this.ze(n)&&(r.Ne(),r.De(e.resumeToken));break;case 4:this.ze(n)&&(this.je(n),r.De(e.resumeToken));break;default:pe()}})}forEachTarget(e,n){e.targetIds.length>0?e.targetIds.forEach(n):this.Be.forEach((r,i)=>{this.ze(i)&&n(i)})}He(e){const n=e.targetId,r=e.me.count,i=this.Je(n);if(i){const s=i.target;if(dp(s))if(r===0){const o=new ce(s.path);
2287this.Ue(n,o,Kt.newNoDocument(o,ve.min()))}else Ve(r===1);else{const o=this.Ye(n);if(o!==r){const a=this.Ze(e),u=a?this.Xe(a,e,o):1;if(u!==0){this.je(n);const d=u===2?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch";this.Qe=this.Qe.insert(n,d)}}}}}Ze(e){const n=e.me.unchangedNames;if(!n||!n.bits)return null;const{bits:{bitmap:r="",padding:i=0},hashCount:s=0}=n;let o,a;try{o=ks(r).toUint8Array()}catch(u){if(u instanceof DA)return Uo("Decoding the base64 bloom filter in existence filter failed ("+u.message+"); ignoring the bloom filter and falling back to full re-query."),null;throw u}try{a=new ag(o,i,s)}catch(u){return Uo(u instanceof Wa?"BloomFilter error: ":"Applying bloom filter failed: ",u),null}return a.Ie===0?null:a}Xe(e,n,r){return n.me.count===r-this.nt(e,n.targetId)?0:2}nt(e,n){const r=this.Le.getRemoteKeysForTarget(n);let i=0;return r.forEach(s=>{const o=this.Le.tt(),a=`projects/${o.projectId}/databases/${o.database}/documents/${s.path.canonicalString()}`;e.mightContain(a)||(this.Ue(n,s,null),i++)}),i}rt(e){const n=new Map;this.Be.forEach((s,o)=>{const a=this.Je(o);if(a){if(s.current&&dp(a.target)){const u=new ce(a.target.path);this.ke.get(u)!==null||this.it(o,u)||this.Ue(o,u,Kt.newNoDocument(u,e))}s.be&&(n.set(o,s.Ce()),s.ve())}});let r=Ae();this.qe.forEach((s,o)=>{let a=!0;o.forEachWhile(u=>{const d=this.Je(u);return!d||d.purpose==="TargetPurposeLimboResolution"||(a=!1,!1)}),a&&(r=r.add(s))}),this.ke.forEach((s,o)=>o.setReadTime(e));const i=new Xd(e,n,this.Qe,this.ke,r);return this.ke=Hr(),this.qe=t_(),this.Qe=new Ye(De),i}$e(e,n){if(!this.ze(e))return;const r=this.it(e,n.key)?2:0;this.Ge(e).Fe(n.key,r),this.ke=this.ke.insert(n.key,n),this.qe=this.qe.insert(n.key,this.st(n.key).add(e))}Ue(e,n,r){if(!this.ze(e))return;const i=this.Ge(e);this.it(e,n)?i.Fe(n,1):i.Me(n),this.qe=this.qe.insert(n,this.st(n).delete(e)),r&&(this.ke=this.ke.insert(n,r))}removeTarget(e){this.Be.delete(e)}Ye(e){const n=this.Ge(e).Ce();return this.Le.getRemoteKeysForTarget(e).size+n.addedDocuments.size-n.removedDocuments.size}xe(e){this.Ge(e).xe()}Ge(e){let n=this.Be.get(e);return n||(n=new e_,this.Be.set(e,n)),n}st(e){let n=this.qe.get(e);return n||(n=new Nt(De),this.qe=this.qe.insert(e,n)),n}ze(e){const n=this.Je(e)!==null;return n||ae("WatchChangeAggregator","Detected inactive target",e),n}Je(e){const n=this.Be.get(e);return n&&n.Se?null:this.Le.ot(e)}je(e){this.Be.set(e,new e_),this.Le.getRemoteKeysForTarget(e).forEach(n=>{this.Ue(e,n,null)})}it(e,n){return this.Le.getRemoteKeysForTarget(e).has(n)}}function t_(){return new Ye(ce.comparator)}function n_(){return new Ye(ce.comparator)}const PF=(()=>({asc:"ASCENDING",desc:"DESCENDING"}))(),kF=(()=>({"<":"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"}))(),DF=(()=>({and:"AND",or:"OR"}))();class bF{constructor(e,n){this.databaseId=e,this.useProto3Json=n}}function pp(t,e){return t.useProto3Json||qd(e)?e:{value:e}}function ud(t,e){return t.useProto3Json?`${new Date(1e3*e.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+e.nanoseconds).slice(-9)}Z`:{seconds:""+e.seconds,nanos:e.nanoseconds}}function nC(t,e){return t.useProto3Json?e.toBase64():e.toUint8Array()}function FF(t,e){return ud(t,e.toTimestamp())}function xr(t){return Ve(!!t),ve.fromTimestamp(function(n){const r=Mi(n);return new vt(r.seconds,r.nanos)}(t))}function lg(t,e){return mp(t,e).canonicalString()}function mp(t,e){const n=function(i){return new je(["projects",i.projectId,"databases",i.database])}(t).child("documents");return e===void 0?n:n.child(e)}function rC(t){const e=je.fromString(t);return Ve(lC(e)),e}function gp(t,e){return lg(t.databaseId,e.path)}function O0(t,e){const n=rC(e);if(n.get(1)!==t.databaseId.projectId)throw new se(Y.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+n.get(1)+" vs "+t.databaseId.projectId);if(n.get(3)!==t.databaseId.database)throw new se(Y.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+t.databaseId.database);return new ce(sC(n))}function iC(t,e){return lg(t.databaseId,e)}function NF(t){const e=rC(t);return e.length===4?je.emptyPath():sC(e)}function yp(t){return new je(["projects",t.databaseId.projectId,"databases",t.databaseId.database]).canonicalString()}function sC(t){return Ve(t.length>4&&t.get(4)==="documents"),t.popFirst(5)}function r_(t,e,n){return{name:gp(t,e),fields:n.value.mapValue.fields}}function BF(t,e){let n;if("targetChange"in e){e.targetChange;const r=function(d){return d==="NO_CHANGE"?0:d==="ADD"?1:d==="REMOVE"?2:d==="CURRENT"?3:d==="RESET"?4:pe()}(e.targetChange.targetChangeType||"NO_CHANGE"),i=e.targetChange.targetIds||[],s=function(d,c){return d.useProto3Json?(Ve(c===void 0||typeof c=="string"),Xt.fromBase64String(c||"")):(Ve(c===void 0||c instanceof Buffer||c instanceof Uint8Array),Xt.fromUint8Array(c||new Uint8Array))}(t,e.targetChange.resumeToken),o=e.targetChange.cause,a=o&&function(d){const c=d.code===void 0?Y.UNKNOWN:ZA(d.code);return new se(c,d.message||"")}(o);n=new tC(r,i,s,a||null)}else if("documentChange"in e){e.documentChange;const r=e.documentChange;r.document,r.document.name,r.document.updateTime;const i=O0(t,r.document.name),s=xr(r.document.updateTime),o=r.document.createTime?xr(r.document.createTime):ve.min(),a=new un({mapValue:{fields:r.document.fields}}),u=Kt.newFoundDocument(i,s,o,a),d=r.targetIds||[],c=r.removedTargetIds||[];n=new Ec(d,c,u.key,u)}else if("documentDelete"in e){e.documentDelete;const r=e.documentDelete;r.document;const i=O0(t,r.document),s=r.readTime?xr(r.readTime):ve.min(),o=Kt.newNoDocument(i,s),a=r.removedTargetIds||[];n=new Ec([],a,o.key,o)}else if("documentRemove"in e){e.documentRemove;const r=e.documentRemove;r.document;const i=O0(t,r.document),s=r.removedTargetIds||[];n=new Ec([],s,i,null)}else{if(!("filter"in e))return pe();{e.filter;const r=e.filter;r.targetId;const{count:i=0,unchangedNames:s}=r,o=new CF(i,s),a=r.targetId;n=new eC(a,o)}}return n}function OF(t,e){let n;if(e instanceof eu)n={update:r_(t,e.key,e.value)};else if(e instanceof sg)n={delete:gp(t,e.key)};else if(e instanceof qi)n={update:r_(t,e.key,e.data),updateMask:qF(e.fieldMask)};else{if(!(e instanceof EF))return pe();n={verify:gp(t,e.key)}}return e.fieldTransforms.length>0&&(n.updateTransforms=e.fieldTransforms.map(r=>function(s,o){const a=o.transform;if(a instanceof ad)return{fieldPath:o.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(a instanceof Ol)return{fieldPath:o.field.canonicalString(),appendMissingElements:{values:a.elements}};if(a instanceof Ll)return{fieldPath:o.field.canonicalString(),removeAllFromArray:{values:a.elements}};if(a instanceof ld)return{fieldPath:o.field.canonicalString(),increment:a.Pe};throw pe()}(0,r))),e.precondition.isNone||(n.currentDocument=function(i,s){return s.updateTime!==void 0?{updateTime:FF(i,s.updateTime)}:s.exists!==void 0?{exists:s.exists}:pe()}(t,e.precondition)),n}function LF(t,e){return t&&t.length>0?(Ve(e!==void 0),t.map(n=>function(i,s){let o=i.updateTime?xr(i.updateTime):xr(s);return o.isEqual(ve.min())&&(o=xr(s)),new vF(o,i.transformResults||[])}(n,e))):[]}function MF(t,e){return{documents:[iC(t,e.path)]}}function VF(t,e){const n={structuredQuery:{}},r=e.path;let i;e.collectionGroup!==null?(i=r,n.structuredQuery.from=[{collectionId:e.collectionGroup,allDescendants:!0}]):(i=r.popLast(),n.structuredQuery.from=[{collectionId:r.lastSegment()}]),n.parent=iC(t,i);const s=function(d){if(d.length!==0)return aC(tr.create(d,"and"))}(e.filters);s&&(n.structuredQuery.where=s);const o=function(d){if(d.length!==0)return d.map(c=>function(p){return{field:io(p.field),direction:zF(p.dir)}}(c))}(e.orderBy);o&&(n.structuredQuery.orderBy=o);const a=pp(t,e.limit);return a!==null&&(n.structuredQuery.limit=a),e.startAt&&(n.structuredQuery.startAt=function(d){return{before:d.inclusive,values:d.position}}(e.startAt)),e.endAt&&(n.structuredQuery.endAt=function(d){return{before:!d.inclusive,values:d.position}}(e.endAt)),{_t:n,parent:i}}function UF(t){let e=NF(t.parent);
2287const n=t.structuredQuery,r=n.from?n.from.length:0;let i=null;if(r>0){Ve(r===1);const c=n.from[0];c.allDescendants?i=c.collectionId:e=e.child(c.collectionId)}let s=[];n.where&&(s=function(h){const p=oC(h);return p instanceof tr&&BA(p)?p.getFilters():[p]}(n.where));let o=[];n.orderBy&&(o=function(h){return h.map(p=>function(v){return new od(so(v.field),function(I){switch(I){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(v.direction))}(p))}(n.orderBy));let a=null;n.limit&&(a=function(h){let p;return p=typeof h=="object"?h.value:h,qd(p)?null:p}(n.limit));let u=null;n.startAt&&(u=function(h){const p=!!h.before,y=h.values||[];return new sd(y,p)}(n.startAt));let d=null;return n.endAt&&(d=function(h){const p=!h.before,y=h.values||[];return new sd(y,p)}(n.endAt)),sF(e,i,o,s,a,"F",u,d)}function $F(t,e){const n=function(i){switch(i){case"TargetPurposeListen":return null;case"TargetPurposeExistenceFilterMismatch":return"existence-filter-mismatch";case"TargetPurposeExistenceFilterMismatchBloom":return"existence-filter-mismatch-bloom";case"TargetPurposeLimboResolution":return"limbo-document";default:return pe()}}(e.purpose);return n==null?null:{"goog-listen-tags":n}}function oC(t){return t.unaryFilter!==void 0?function(n){switch(n.unaryFilter.op){case"IS_NAN":const r=so(n.unaryFilter.field);return at.create(r,"==",{doubleValue:NaN});case"IS_NULL":const i=so(n.unaryFilter.field);return at.create(i,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":const s=so(n.unaryFilter.field);return at.create(s,"!=",{doubleValue:NaN});case"IS_NOT_NULL":const o=so(n.unaryFilter.field);return at.create(o,"!=",{nullValue:"NULL_VALUE"});default:return pe()}}(t):t.fieldFilter!==void 0?function(n){return at.create(so(n.fieldFilter.field),function(i){switch(i){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";default:return pe()}}(n.fieldFilter.op),n.fieldFilter.value)}(t):t.compositeFilter!==void 0?function(n){return tr.create(n.compositeFilter.filters.map(r=>oC(r)),function(i){switch(i){case"AND":return"and";case"OR":return"or";default:return pe()}}(n.compositeFilter.op))}(t):pe()}function zF(t){return PF[t]}function jF(t){return kF[t]}function HF(t){return DF[t]}function io(t){return{fieldPath:t.canonicalString()}}function so(t){return bt.fromServerFormat(t.fieldPath)}function aC(t){return t instanceof at?function(n){if(n.op==="=="){if(jx(n.value))return{unaryFilter:{field:io(n.field),op:"IS_NAN"}};if(zx(n.value))return{unaryFilter:{field:io(n.field),op:"IS_NULL"}}}else if(n.op==="!="){if(jx(n.value))return{unaryFilter:{field:io(n.field),op:"IS_NOT_NAN"}};if(zx(n.value))return{unaryFilter:{field:io(n.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:io(n.field),op:jF(n.op),value:n.value}}}(t):t instanceof tr?function(n){const r=n.getFilters().map(i=>aC(i));return r.length===1?r[0]:{compositeFilter:{op:HF(n.op),filters:r}}}(t):pe()}function qF(t){const e=[];return t.fields.forEach(n=>e.push(n.canonicalString())),{fieldPaths:e}}function lC(t){return t.length>=4&&t.get(0)==="projects"&&t.get(2)==="databases"}/** 2288 * @license 2289 * Copyright 2017 Google LLC 2290 * 2291 * Licensed under the Apache License, Version 2.0 (the "License"); 2292 * you may not use this file except in compliance with the License. 2293 * You may obtain a copy of the License at 2294 * 2295 * http://www.apache.org/licenses/LICENSE-2.0 2296 * 2297 * Unless required by applicable law or agreed to in writing, software 2298 * distributed under the License is distributed on an "AS IS" BASIS, 2299 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2300 * See the License for the specific language governing permissions and 2301 * limitations under the License. 2302 */class vi{constructor(e,n,r,i,s=ve.min(),o=ve.min(),a=Xt.EMPTY_BYTE_STRING,u=null){this.target=e,this.targetId=n,this.purpose=r,this.sequenceNumber=i,this.snapshotVersion=s,this.lastLimboFreeSnapshotVersion=o,this.resumeToken=a,this.expectedCount=u}withSequenceNumber(e){return new vi(this.target,this.targetId,this.purpose,e,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}withResumeToken(e,n){return new vi(this.target,this.targetId,this.purpose,this.sequenceNumber,n,this.lastLimboFreeSnapshotVersion,e,null)}withExpectedCount(e){return new vi(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,e)}withLastLimboFreeSnapshotVersion(e){return new vi(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,e,this.resumeToken,this.expectedCount)}}/** 2303 * @license 2304 * Copyright 2017 Google LLC 2305 * 2306 * Licensed under the Apache License, Version 2.0 (the "License");
2307 * you may not use this file except in compliance with the License. 2308 * You may obtain a copy of the License at 2309 * 2310 * http://www.apache.org/licenses/LICENSE-2.0 2311 * 2312 * Unless required by applicable law or agreed to in writing, software 2313 * distributed under the License is distributed on an "AS IS" BASIS, 2314 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2315 * See the License for the specific language governing permissions and 2316 * limitations under the License. 2317 */class WF{constructor(e){this.ct=e}}function GF(t){const e=UF({parent:t.parent,structuredQuery:t.structuredQuery});return t.limitType==="LAST"?fp(e,e.limit,"L"):e}/** 2318 * @license 2319 * Copyright 2019 Google LLC 2320 * 2321 * Licensed under the Apache License, Version 2.0 (the "License"); 2322 * you may not use this file except in compliance with the License. 2323 * You may obtain a copy of the License at 2324 * 2325 * http://www.apache.org/licenses/LICENSE-2.0 2326 * 2327 * Unless required by applicable law or agreed to in writing, software 2328 * distributed under the License is distributed on an "AS IS" BASIS, 2329 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2330 * See the License for the specific language governing permissions and 2331 * limitations under the License. 2332 */class KF{constructor(){this._n=new QF}addToCollectionParentIndex(e,n){return this._n.add(n),J.resolve()}getCollectionParents(e,n){return J.resolve(this._n.getEntries(n))}addFieldIndex(e,n){return J.resolve()}deleteFieldIndex(e,n){return J.resolve()}deleteAllFieldIndexes(e){return J.resolve()}createTargetIndexes(e,n){return J.resolve()}getDocumentsMatchingTarget(e,n){return J.resolve(null)}getIndexType(e,n){return J.resolve(0)}getFieldIndexes(e,n){return J.resolve([])}getNextCollectionGroupToUpdate(e){return J.resolve(null)}getMinOffset(e,n){return J.resolve(Li.min())}getMinOffsetFromCollectionGroup(e,n){return J.resolve(Li.min())}updateCollectionGroup(e,n,r){return J.resolve()}updateIndexEntries(e,n){return J.resolve()}}class QF{constructor(){this.index={}}add(e){const n=e.lastSegment(),r=e.popLast(),i=this.index[n]||new Nt(je.comparator),s=!i.has(r);return this.index[n]=i.add(r),s}has(e){const n=e.lastSegment(),r=e.popLast(),i=this.index[n];return i&&i.has(r)}getEntries(e){return(this.index[e]||new Nt(je.comparator)).toArray()}}/** 2333 * @license 2334 * Copyright 2017 Google LLC 2335 * 2336 * Licensed under the Apache License, Version 2.0 (the "License"); 2337 * you may not use this file except in compliance with the License. 2338 * You may obtain a copy of the License at 2339 * 2340 * http://www.apache.org/licenses/LICENSE-2.0 2341 * 2342 * Unless required by applicable law or agreed to in writing, software 2343 * distributed under the License is distributed on an "AS IS" BASIS, 2344 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2345 * See the License for the specific language governing permissions and 2346 * limitations under the License. 2347 */class Ho{constructor(e){this.On=e}next(){return this.On+=2,this.On}static Nn(){return new Ho(0)}static Ln(){return new Ho(-1)}}/** 2348 * @license 2349 * Copyright 2017 Google LLC 2350 * 2351 * Licensed under the Apache License, Version 2.0 (the "License"); 2352 * you may not use this file except in compliance with the License. 2353 * You may obtain a copy of the License at 2354 * 2355 * http://www.apache.org/licenses/LICENSE-2.0 2356 * 2357 * Unless required by applicable law or agreed to in writing, software 2358 * distributed under the License is distributed on an "AS IS" BASIS, 2359 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2360 * See the License for the specific language governing permissions and 2361 * limitations under the License. 2362 */class XF{constructor(){this.changes=new ia(e=>e.toString(),(e,n)=>e.isEqual(n)),this.changesApplied=!1}addEntry(e){this.assertNotApplied(),this.changes.set(e.key,e)}removeEntry(e,n){this.assertNotApplied(),this.changes.set(e,Kt.newInvalidDocument(e).setReadTime(n))}getEntry(e,n){this.assertNotApplied();const r=this.changes.get(n);return r!==void 0?J.resolve(r):this.getFromCache(e,n)}getEntries(e,n){return this.getAllFromCache(e,n)}apply(e){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(e)}
vendor: 9,247 bytes, lines 2362-2441
2362assertNotApplied(){}}/** 2363 * @license 2364 * Copyright 2017 Google LLC 2365 * 2366 * Licensed under the Apache License, Version 2.0 (the "License"); 2367 * you may not use this file except in compliance with the License. 2368 * You may obtain a copy of the License at 2369 * 2370 * http://www.apache.org/licenses/LICENSE-2.0 2371 * 2372 * Unless required by applicable law or agreed to in writing, software 2373 * distributed under the License is distributed on an "AS IS" BASIS, 2374 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2375 * See the License for the specific language governing permissions and 2376 * limitations under the License. 2377 *//** 2378 * @license 2379 * Copyright 2022 Google LLC 2380 * 2381 * Licensed under the Apache License, Version 2.0 (the "License"); 2382 * you may not use this file except in compliance with the License. 2383 * You may obtain a copy of the License at 2384 * 2385 * http://www.apache.org/licenses/LICENSE-2.0 2386 * 2387 * Unless required by applicable law or agreed to in writing, software 2388 * distributed under the License is distributed on an "AS IS" BASIS, 2389 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2390 * See the License for the specific language governing permissions and 2391 * limitations under the License. 2392 */class YF{constructor(e,n){this.overlayedDocument=e,this.mutatedFields=n}}/** 2393 * @license 2394 * Copyright 2017 Google LLC 2395 * 2396 * Licensed under the Apache License, Version 2.0 (the "License"); 2397 * you may not use this file except in compliance with the License. 2398 * You may obtain a copy of the License at 2399 * 2400 * http://www.apache.org/licenses/LICENSE-2.0 2401 * 2402 * Unless required by applicable law or agreed to in writing, software 2403 * distributed under the License is distributed on an "AS IS" BASIS, 2404 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2405 * See the License for the specific language governing permissions and 2406 * limitations under the License. 2407 */class JF{constructor(e,n,r,i){this.remoteDocumentCache=e,this.mutationQueue=n,this.documentOverlayCache=r,this.indexManager=i}getDocument(e,n){let r=null;return this.documentOverlayCache.getOverlay(e,n).next(i=>(r=i,this.remoteDocumentCache.getEntry(e,n))).next(i=>(r!==null&&ll(r.mutation,i,_n.empty(),vt.now()),i))}getDocuments(e,n){return this.remoteDocumentCache.getEntries(e,n).next(r=>this.getLocalViewOfDocuments(e,r,Ae()).next(()=>r))}getLocalViewOfDocuments(e,n,r=Ae()){const i=ms();return this.populateOverlays(e,i,n).next(()=>this.computeViews(e,n,i,r).next(s=>{let o=qa();return s.forEach((a,u)=>{o=o.insert(a,u.overlayedDocument)}),o}))}getOverlayedDocuments(e,n){const r=ms();return this.populateOverlays(e,r,n).next(()=>this.computeViews(e,n,r,Ae()))}populateOverlays(e,n,r){const i=[];return r.forEach(s=>{n.has(s)||i.push(s)}),this.documentOverlayCache.getOverlays(e,i).next(s=>{s.forEach((o,a)=>{n.set(o,a)})})}computeViews(e,n,r,i){let s=Hr();const o=al(),a=function(){return al()}();return n.forEach((u,d)=>{const c=r.get(d.key);i.has(d.key)&&(c===void 0||c.mutation instanceof qi)?s=s.insert(d.key,d):c!==void 0?(o.set(d.key,c.mutation.getFieldMask()),ll(c.mutation,d,c.mutation.getFieldMask(),vt.now())):o.set(d.key,_n.empty())}),this.recalculateAndSaveOverlays(e,s).next(u=>(u.forEach((d,c)=>o.set(d,c)),n.forEach((d,c)=>{var h;return a.set(d,new YF(c,(h=o.get(d))!==null&&h!==void 0?h:null))}),a))}recalculateAndSaveOverlays(e,n){const r=al();let i=new Ye((o,a)=>o-a),s=Ae();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,n).next(o=>{for(const a of o)a.keys().forEach(u=>{const d=n.get(u);if(d===null)return;let c=r.get(u)||_n.empty();c=a.applyToLocalView(d,c),r.set(u,c);const h=(i.get(a.batchId)||Ae()).add(u);i=i.insert(a.batchId,h)})}).next(()=>{const o=[],a=i.getReverseIterator();for(;a.hasNext();){const u=a.getNext(),d=u.key,c=u.value,h=HA();c.forEach(p=>{if(!s.has(p)){const y=YA(n.get(p),r.get(p));y!==null&&h.set(p,y),s=s.add(p)}}),o.push(this.documentOverlayCache.saveOverlays(e,d,h))}return J.waitFor(o)}).next(()=>r)}recalculateAndSaveOverlaysForDocumentKeys(e,n){return this.remoteDocumentCache.getEntries(e,n).next(r=>this.recalculateAndSaveOverlays(e,r))}getDocumentsMatchingQuery(e,n,r,i){return function(o){return ce.isDocumentKey(o.path)&&o.collectionGroup===null&&o.filters.length===0}(n)?this.getDocumentsMatchingDocumentQuery(e,n.path):VA(n)?this.getDocumentsMatchingCollectionGroupQuery(e,n,r,i):this.getDocumentsMatchingCollectionQuery(e,n,r,i)}getNextDocuments(e,n,r,i){return this.remoteDocumentCache.getAllFromCollectionGroup(e,n,r,i).next(s=>{const o=i-s.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(e,n,r.largestBatchId,i-s.size):J.resolve(ms());let a=-1,u=s;return o.next(d=>J.forEach(d,(c,h)=>(a<h.largestBatchId&&(a=h.largestBatchId),s.get(c)?J.resolve():this.remoteDocumentCache.getEntry(e,c).next(p=>{u=u.insert(c,p)}))).next(()=>this.populateOverlays(e,d,s)).next(()=>this.computeViews(e,u,d,Ae())).next(c=>({batchId:a,changes:jA(c)})))})}getDocumentsMatchingDocumentQuery(e,n){return this.getDocument(e,new ce(n)).next(r=>{let i=qa();return r.isFoundDocument()&&(i=i.insert(r.key,r)),i})}getDocumentsMatchingCollectionGroupQuery(e,n,r,i){const s=n.collectionGroup;let o=qa();return this.indexManager.getCollectionParents(e,s).next(a=>J.forEach(a,u=>{const d=function(h,p){return new Zl(p,null,h.explicitOrderBy.slice(),h.filters.slice(),h.limit,h.limitType,h.startAt,h.endAt)}(n,u.child(s));return this.getDocumentsMatchingCollectionQuery(e,d,r,i).next(c=>{c.forEach((h,p)=>{o=o.insert(h,p)})})}).next(()=>o))}getDocumentsMatchingCollectionQuery(e,n,r,i){let s;return this.documentOverlayCache.getOverlaysForCollection(e,n.path,r.largestBatchId).next(o=>(s=o,this.remoteDocumentCache.getDocumentsMatchingQuery(e,n,r,s,i))).next(o=>{s.forEach((u,d)=>{const c=d.getKey();o.get(c)===null&&(o=o.insert(c,Kt.newInvalidDocument(c)))});let a=qa();return o.forEach((u,d)=>{const c=s.get(u);c!==void 0&&ll(c.mutation,d,_n.empty(),vt.now()),Gd(n,d)&&(a=a.insert(u,d))}),a})}}/** 2408 * @license 2409 * Copyright 2020 Google LLC 2410 * 2411 * Licensed under the Apache License, Version 2.0 (the "License"); 2412 * you may not use this file except in compliance with the License. 2413 * You may obtain a copy of the License at 2414 * 2415 * http://www.apache.org/licenses/LICENSE-2.0 2416 * 2417 * Unless required by applicable law or agreed to in writing, software 2418 * distributed under the License is distributed on an "AS IS" BASIS, 2419 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2420 * See the License for the specific language governing permissions and 2421 * limitations under the License. 2422 */class ZF{constructor(e){this.serializer=e,this.cr=new Map,this.lr=new Map}getBundleMetadata(e,n){return J.resolve(this.cr.get(n))}saveBundleMetadata(e,n){return this.cr.set(n.id,function(i){return{id:i.id,version:i.version,createTime:xr(i.createTime)}}(n)),J.resolve()}getNamedQuery(e,n){return J.resolve(this.lr.get(n))}saveNamedQuery(e,n){return this.lr.set(n.name,function(i){return{name:i.name,query:GF(i.bundledQuery),readTime:xr(i.readTime)}}(n)),J.resolve()}}/** 2423 * @license 2424 * Copyright 2022 Google LLC 2425 * 2426 * Licensed under the Apache License, Version 2.0 (the "License"); 2427 * you may not use this file except in compliance with the License. 2428 * You may obtain a copy of the License at 2429 * 2430 * http://www.apache.org/licenses/LICENSE-2.0 2431 * 2432 * Unless required by applicable law or agreed to in writing, software 2433 * distributed under the License is distributed on an "AS IS" BASIS, 2434 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2435 * See the License for the specific language governing permissions and 2436 * limitations under the License. 2437 */class eN{constructor(){this.overlays=new Ye(ce.comparator),this.hr=new Map}getOverlay(e,n){return J.resolve(this.overlays.get(n))}getOverlays(e,n){const r=ms();return J.forEach(n,i=>this.getOverlay(e,i).next(s=>{s!==null&&r.set(i,s)})).next(()=>r)}saveOverlays(e,n,r){return r.forEach((i,s)=>{this.ht(e,n,s)}),J.resolve()}removeOverlaysForBatchId(e,n,r){const i=this.hr.get(r);return i!==void 0&&(i.forEach(s=>this.overlays=this.overlays.remove(s)),this.hr.delete(r)),J.resolve()}getOverlaysForCollection(e,n,r){const i=ms(),s=n.length+1,o=new ce(n.child("")),a=this.overlays.getIteratorFrom(o);for(;a.hasNext();){const u=a.getNext().value,d=u.getKey();if(!n.isPrefixOf(d.path))break;d.path.length===s&&u.largestBatchId>r&&i.set(u.getKey(),u)}return J.resolve(i)}getOverlaysForCollectionGroup(e,n,r,i){let s=new Ye((d,c)=>d-c);const o=this.overlays.getIterator();for(;o.hasNext();){const d=o.getNext().value;if(d.getKey().getCollectionGroup()===n&&d.largestBatchId>r){let c=s.get(d.largestBatchId);c===null&&(c=ms(),s=s.insert(d.largestBatchId,c)),c.set(d.getKey(),d)}}const a=ms(),u=s.getIterator();for(;u.hasNext()&&(u.getNext().value.forEach((d,c)=>a.set(d,c)),!(a.size()>=i)););return J.resolve(a)}ht(e,n,r){const i=this.overlays.get(r.key);if(i!==null){const o=this.hr.get(i.largestBatchId).delete(r.key);this.hr.set(i.largestBatchId,o)}this.overlays=this.overlays.insert(r.key,new AF(n,r));let s=this.hr.get(n);s===void 0&&(s=Ae(),this.hr.set(n,s)),this.hr.set(n,s.add(r.key))}}/** 2438 * @license 2439 * Copyright 2017 Google LLC 2440 * 2441 * Licensed under the Apache License, Version 2.0 (the "License");
2442 * you may not use this file except in compliance with the License. 2443 * You may obtain a copy of the License at 2444 * 2445 * http://www.apache.org/licenses/LICENSE-2.0 2446 * 2447 * Unless required by applicable law or agreed to in writing, software 2448 * distributed under the License is distributed on an "AS IS" BASIS, 2449 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2450 * See the License for the specific language governing permissions and 2451 * limitations under the License. 2452 */class ug{constructor(){this.Pr=new Nt(At.Ir),this.Tr=new Nt(At.Er)}isEmpty(){return this.Pr.isEmpty()}addReference(e,n){const r=new At(e,n);this.Pr=this.Pr.add(r),this.Tr=this.Tr.add(r)}dr(e,n){e.forEach(r=>this.addReference(r,n))}removeReference(e,n){this.Ar(new At(e,n))}Rr(e,n){e.forEach(r=>this.removeReference(r,n))}Vr(e){const n=new ce(new je([])),r=new At(n,e),i=new At(n,e+1),s=[];return this.Tr.forEachInRange([r,i],o=>{this.Ar(o),s.push(o.key)}),s}mr(){this.Pr.forEach(e=>this.Ar(e))}Ar(e){this.Pr=this.Pr.delete(e),this.Tr=this.Tr.delete(e)}gr(e){const n=new ce(new je([])),r=new At(n,e),i=new At(n,e+1);let s=Ae();return this.Tr.forEachInRange([r,i],o=>{s=s.add(o.key)}),s}containsKey(e){const n=new At(e,0),r=this.Pr.firstAfterOrEqual(n);return r!==null&&e.isEqual(r.key)}}class At{constructor(e,n){this.key=e,this.pr=n}static Ir(e,n){return ce.comparator(e.key,n.key)||De(e.pr,n.pr)}static Er(e,n){return De(e.pr,n.pr)||ce.comparator(e.key,n.key)}}/** 2453 * @license 2454 * Copyright 2017 Google LLC 2455 * 2456 * Licensed under the Apache License, Version 2.0 (the "License"); 2457 * you may not use this file except in compliance with the License. 2458 * You may obtain a copy of the License at 2459 * 2460 * http://www.apache.org/licenses/LICENSE-2.0 2461 * 2462 * Unless required by applicable law or agreed to in writing, software 2463 * distributed under the License is distributed on an "AS IS" BASIS, 2464 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2465 * See the License for the specific language governing permissions and 2466 * limitations under the License. 2467 */class tN{constructor(e,n){this.indexManager=e,this.referenceDelegate=n,this.mutationQueue=[],this.yr=1,this.wr=new Nt(At.Ir)}checkEmpty(e){return J.resolve(this.mutationQueue.length===0)}addMutationBatch(e,n,r,i){const s=this.yr;this.yr++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];const o=new wF(s,n,r,i);this.mutationQueue.push(o);for(const a of i)this.wr=this.wr.add(new At(a.key,s)),this.indexManager.addToCollectionParentIndex(e,a.key.path.popLast());return J.resolve(o)}lookupMutationBatch(e,n){return J.resolve(this.Sr(n))}getNextMutationBatchAfterBatchId(e,n){const r=n+1,i=this.br(r),s=i<0?0:i;return J.resolve(this.mutationQueue.length>s?this.mutationQueue[s]:null)}getHighestUnacknowledgedBatchId(){return J.resolve(this.mutationQueue.length===0?-1:this.yr-1)}getAllMutationBatches(e){return J.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(e,n){const r=new At(n,0),i=new At(n,Number.POSITIVE_INFINITY),s=[];return this.wr.forEachInRange([r,i],o=>{const a=this.Sr(o.pr);s.push(a)}),J.resolve(s)}getAllMutationBatchesAffectingDocumentKeys(e,n){let r=new Nt(De);return n.forEach(i=>{const s=new At(i,0),o=new At(i,Number.POSITIVE_INFINITY);this.wr.forEachInRange([s,o],a=>{r=r.add(a.pr)})}),J.resolve(this.Dr(r))}getAllMutationBatchesAffectingQuery(e,n){const r=n.path,i=r.length+1;let s=r;ce.isDocumentKey(s)||(s=s.child(""));const o=new At(new ce(s),0);let a=new Nt(De);return this.wr.forEachWhile(u=>{const d=u.key.path;return!!r.isPrefixOf(d)&&(d.length===i&&(a=a.add(u.pr)),!0)},o),J.resolve(this.Dr(a))}Dr(e){const n=[];return e.forEach(r=>{const i=this.Sr(r);i!==null&&n.push(i)}),n}removeMutationBatch(e,n){Ve(this.Cr(n.batchId,"removed")===0),this.mutationQueue.shift();let r=this.wr;return J.forEach(n.mutations,i=>{const s=new At(i.key,n.batchId);return r=r.delete(s),this.referenceDelegate.markPotentiallyOrphaned(e,i.key)}).next(()=>{this.wr=r})}Mn(e){}containsKey(e,n){const r=new At(n,0),i=this.wr.firstAfterOrEqual(r);return J.resolve(n.isEqual(i&&i.key))}
2467performConsistencyCheck(e){return this.mutationQueue.length,J.resolve()}Cr(e,n){return this.br(e)}br(e){return this.mutationQueue.length===0?0:e-this.mutationQueue[0].batchId}Sr(e){const n=this.br(e);return n<0||n>=this.mutationQueue.length?null:this.mutationQueue[n]}}/** 2468 * @license 2469 * Copyright 2017 Google LLC 2470 * 2471 * Licensed under the Apache License, Version 2.0 (the "License"); 2472 * you may not use this file except in compliance with the License. 2473 * You may obtain a copy of the License at 2474 * 2475 * http://www.apache.org/licenses/LICENSE-2.0 2476 * 2477 * Unless required by applicable law or agreed to in writing, software 2478 * distributed under the License is distributed on an "AS IS" BASIS, 2479 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2480 * See the License for the specific language governing permissions and 2481 * limitations under the License. 2482 */class nN{constructor(e){this.vr=e,this.docs=function(){return new Ye(ce.comparator)}(),this.size=0}setIndexManager(e){this.indexManager=e}addEntry(e,n){const r=n.key,i=this.docs.get(r),s=i?i.size:0,o=this.vr(n);return this.docs=this.docs.insert(r,{document:n.mutableCopy(),size:o}),this.size+=o-s,this.indexManager.addToCollectionParentIndex(e,r.path.popLast())}removeEntry(e){const n=this.docs.get(e);n&&(this.docs=this.docs.remove(e),this.size-=n.size)}getEntry(e,n){const r=this.docs.get(n);return J.resolve(r?r.document.mutableCopy():Kt.newInvalidDocument(n))}getEntries(e,n){let r=Hr();return n.forEach(i=>{const s=this.docs.get(i);r=r.insert(i,s?s.document.mutableCopy():Kt.newInvalidDocument(i))}),J.resolve(r)}getDocumentsMatchingQuery(e,n,r,i){let s=Hr();const o=n.path,a=new ce(o.child("")),u=this.docs.getIteratorFrom(a);for(;u.hasNext();){const{key:d,value:{document:c}}=u.getNext();if(!o.isPrefixOf(d.path))break;d.path.length>o.length+1||$b(Ub(c),r)<=0||(i.has(c.key)||Gd(n,c))&&(s=s.insert(c.key,c.mutableCopy()))}return J.resolve(s)}getAllFromCollectionGroup(e,n,r,i){pe()}Fr(e,n){return J.forEach(this.docs,r=>n(r))}newChangeBuffer(e){return new rN(this)}getSize(e){return J.resolve(this.size)}}class rN extends XF{constructor(e){super(),this.ar=e}applyChanges(e){const n=[];
vendor: 9,751 bytes, lines 2482-2557
2482return this.changes.forEach((r,i)=>{i.isValidDocument()?n.push(this.ar.addEntry(e,i)):this.ar.removeEntry(r)}),J.waitFor(n)}getFromCache(e,n){return this.ar.getEntry(e,n)}getAllFromCache(e,n){return this.ar.getEntries(e,n)}}/** 2483 * @license 2484 * Copyright 2017 Google LLC 2485 * 2486 * Licensed under the Apache License, Version 2.0 (the "License"); 2487 * you may not use this file except in compliance with the License. 2488 * You may obtain a copy of the License at 2489 * 2490 * http://www.apache.org/licenses/LICENSE-2.0 2491 * 2492 * Unless required by applicable law or agreed to in writing, software 2493 * distributed under the License is distributed on an "AS IS" BASIS, 2494 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2495 * See the License for the specific language governing permissions and 2496 * limitations under the License. 2497 */class iN{constructor(e){this.persistence=e,this.Mr=new ia(n=>ng(n),rg),this.lastRemoteSnapshotVersion=ve.min(),this.highestTargetId=0,this.Or=0,this.Nr=new ug,this.targetCount=0,this.Lr=Ho.Nn()}forEachTarget(e,n){return this.Mr.forEach((r,i)=>n(i)),J.resolve()}getLastRemoteSnapshotVersion(e){return J.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(e){return J.resolve(this.Or)}allocateTargetId(e){return this.highestTargetId=this.Lr.next(),J.resolve(this.highestTargetId)}setTargetsMetadata(e,n,r){return r&&(this.lastRemoteSnapshotVersion=r),n>this.Or&&(this.Or=n),J.resolve()}qn(e){this.Mr.set(e.target,e);const n=e.targetId;n>this.highestTargetId&&(this.Lr=new Ho(n),this.highestTargetId=n),e.sequenceNumber>this.Or&&(this.Or=e.sequenceNumber)}addTargetData(e,n){return this.qn(n),this.targetCount+=1,J.resolve()}updateTargetData(e,n){return this.qn(n),J.resolve()}removeTargetData(e,n){return this.Mr.delete(n.target),this.Nr.Vr(n.targetId),this.targetCount-=1,J.resolve()}removeTargets(e,n,r){let i=0;const s=[];return this.Mr.forEach((o,a)=>{a.sequenceNumber<=n&&r.get(a.targetId)===null&&(this.Mr.delete(o),s.push(this.removeMatchingKeysForTargetId(e,a.targetId)),i++)}),J.waitFor(s).next(()=>i)}getTargetCount(e){return J.resolve(this.targetCount)}getTargetData(e,n){const r=this.Mr.get(n)||null;return J.resolve(r)}addMatchingKeys(e,n,r){return this.Nr.dr(n,r),J.resolve()}removeMatchingKeys(e,n,r){this.Nr.Rr(n,r);const i=this.persistence.referenceDelegate,s=[];return i&&n.forEach(o=>{s.push(i.markPotentiallyOrphaned(e,o))}),J.waitFor(s)}removeMatchingKeysForTargetId(e,n){return this.Nr.Vr(n),J.resolve()}getMatchingKeysForTargetId(e,n){const r=this.Nr.gr(n);return J.resolve(r)}containsKey(e,n){return J.resolve(this.Nr.containsKey(n))}}/** 2498 * @license 2499 * Copyright 2017 Google LLC 2500 * 2501 * Licensed under the Apache License, Version 2.0 (the "License"); 2502 * you may not use this file except in compliance with the License. 2503 * You may obtain a copy of the License at 2504 * 2505 * http://www.apache.org/licenses/LICENSE-2.0 2506 * 2507 * Unless required by applicable law or agreed to in writing, software 2508 * distributed under the License is distributed on an "AS IS" BASIS, 2509 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2510 * See the License for the specific language governing permissions and 2511 * limitations under the License. 2512 */class sN{constructor(e,n){this.Br={},this.overlays={},this.kr=new Jm(0),this.qr=!1,this.qr=!0,this.referenceDelegate=e(this),this.Qr=new iN(this),this.indexManager=new KF,this.remoteDocumentCache=function(i){return new nN(i)}(r=>this.referenceDelegate.Kr(r)),this.serializer=new WF(n),this.$r=new ZF(this.serializer)}start(){return Promise.resolve()}shutdown(){return this.qr=!1,Promise.resolve()}get started(){return this.qr}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(e){return this.indexManager}getDocumentOverlayCache(e){let n=this.overlays[e.toKey()];return n||(n=new eN,this.overlays[e.toKey()]=n),n}getMutationQueue(e,n){let r=this.Br[e.toKey()];return r||(r=new tN(n,this.referenceDelegate),this.Br[e.toKey()]=r),r}getTargetCache(){return this.Qr}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.$r}runTransaction(e,n,r){ae("MemoryPersistence","Starting transaction:",e);const i=new oN(this.kr.next());return this.referenceDelegate.Ur(),r(i).next(s=>this.referenceDelegate.Wr(i).next(()=>s)).toPromise().then(s=>(i.raiseOnCommittedEvent(),s))}Gr(e,n){return J.or(Object.values(this.Br).map(r=>()=>r.containsKey(e,n)))}}class oN extends jb{constructor(e){super(),this.currentSequenceNumber=e}}class cg{constructor(e){this.persistence=e,this.zr=new ug,this.jr=null}static Hr(e){return new cg(e)}get Jr(){if(this.jr)return this.jr;throw pe()}addReference(e,n,r){return this.zr.addReference(r,n),this.Jr.delete(r.toString()),J.resolve()}removeReference(e,n,r){return this.zr.removeReference(r,n),this.Jr.add(r.toString()),J.resolve()}markPotentiallyOrphaned(e,n){return this.Jr.add(n.toString()),J.resolve()}removeTarget(e,n){this.zr.Vr(n.targetId).forEach(i=>this.Jr.add(i.toString()));const r=this.persistence.getTargetCache();return r.getMatchingKeysForTargetId(e,n.targetId).next(i=>{i.forEach(s=>this.Jr.add(s.toString()))}).next(()=>r.removeTargetData(e,n))}Ur(){this.jr=new Set}Wr(e){const n=this.persistence.getRemoteDocumentCache().newChangeBuffer();return J.forEach(this.Jr,r=>{const i=ce.fromPath(r);return this.Yr(e,i).next(s=>{s||n.removeEntry(i,ve.min())})}).next(()=>(this.jr=null,n.apply(e)))}updateLimboDocument(e,n){return this.Yr(e,n).next(r=>{r?this.Jr.delete(n.toString()):this.Jr.add(n.toString())})}Kr(e){return 0}Yr(e,n){return J.or([()=>J.resolve(this.zr.containsKey(n)),()=>this.persistence.getTargetCache().containsKey(e,n),()=>this.persistence.Gr(e,n)])}}/** 2513 * @license 2514 * Copyright 2017 Google LLC 2515 * 2516 * Licensed under the Apache License, Version 2.0 (the "License"); 2517 * you may not use this file except in compliance with the License. 2518 * You may obtain a copy of the License at 2519 * 2520 * http://www.apache.org/licenses/LICENSE-2.0 2521 * 2522 * Unless required by applicable law or agreed to in writing, software 2523 * distributed under the License is distributed on an "AS IS" BASIS, 2524 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2525 * See the License for the specific language governing permissions and 2526 * limitations under the License. 2527 */class dg{constructor(e,n,r,i){this.targetId=e,this.fromCache=n,this.qi=r,this.Qi=i}static Ki(e,n){let r=Ae(),i=Ae();for(const s of n.docChanges)switch(s.type){case 0:r=r.add(s.doc.key);break;case 1:i=i.add(s.doc.key)}return new dg(e,n.fromCache,r,i)}}/** 2528 * @license 2529 * Copyright 2023 Google LLC 2530 * 2531 * Licensed under the Apache License, Version 2.0 (the "License"); 2532 * you may not use this file except in compliance with the License. 2533 * You may obtain a copy of the License at 2534 * 2535 * http://www.apache.org/licenses/LICENSE-2.0 2536 * 2537 * Unless required by applicable law or agreed to in writing, software 2538 * distributed under the License is distributed on an "AS IS" BASIS, 2539 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2540 * See the License for the specific language governing permissions and 2541 * limitations under the License. 2542 */class aN{constructor(){this._documentReadCount=0}get documentReadCount(){return this._documentReadCount}incrementDocumentReadCount(e){this._documentReadCount+=e}}/** 2543 * @license 2544 * Copyright 2019 Google LLC 2545 * 2546 * Licensed under the Apache License, Version 2.0 (the "License"); 2547 * you may not use this file except in compliance with the License. 2548 * You may obtain a copy of the License at 2549 * 2550 * http://www.apache.org/licenses/LICENSE-2.0 2551 * 2552 * Unless required by applicable law or agreed to in writing, software 2553 * distributed under the License is distributed on an "AS IS" BASIS, 2554 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2555 * See the License for the specific language governing permissions and 2556 * limitations under the License. 2557 */class lN{constructor(){this.$i=!1,this.Ui=!1,this.Wi=100,this.Gi=function(){return JD()?8:Hb(Ot())>0?6:4}()}initialize(e,n){this.zi=e,this.indexManager=n,this.$i=!0}getDocumentsMatchingQuery(e,n,r,i){const s={result:null};return this.ji(e,n).next(o=>{s.result=o}).next(()=>{if(!s.result)return this.Hi(e,n,i,r).next(o=>{s.result=o})}).next(()=>{if(s.result)return;const o=new aN;return this.Ji(e,n,o).next(a=>{if(s.result=a,this.Ui)return this.Yi(e,n,o,a.size)})}).next(()=>s.result)}Yi(e,n,r,i){return r.documentReadCount<this.Wi?(La()<=Te.DEBUG&&ae("QueryEngine","SDK will not create cache indexes for query:",ro(n),"since it only creates cache indexes for collection contains","more than or equal to",this.Wi,"documents"),J.resolve()):(La()<=Te.DEBUG&&ae("QueryEngine","Query:",ro(n),"scans",r.documentReadCount,"local documents and returns",i,"documents as results."),r.documentReadCount>this.Gi*i?(La()<=Te.DEBUG&&ae("QueryEngine","The SDK decides to create cache indexes for query:",ro(n),"as using cache indexes may help improve performance."),this.indexManager.createTargetIndexes(e,vr(n))):J.resolve())}ji(e,n){if(Gx(n))return J.resolve(null);let r=vr(n);return this.indexManager.getIndexType(e,r).next(i=>i===0?null:(n.limit!==null&&i===1&&(n=fp(n,null,"F"),r=vr(n)),this.indexManager.getDocumentsMatchingTarget(e,r).next(s=>{const o=Ae(...s);return this.zi.getDocuments(e,o).next(a=>this.indexManager.getMinOffset(e,r).next(u=>{const d=this.Zi(n,a);return this.Xi(n,d,o,u.readTime)?this.ji(e,fp(n,null,"F")):this.es(e,d,n,u)}))})))}Hi(e,n,r,i){return Gx(n)||i.isEqual(ve.min())?J.resolve(null):this.zi.getDocuments(e,r).next(s=>{const o=this.Zi(n,s);return this.Xi(n,o,r,i)?J.resolve(null):(La()<=Te.DEBUG&&ae("QueryEngine","Re-using previous result from %s to execute query: %s",i.toString(),ro(n)),this.es(e,o,n,Vb(i,-1)).next(a=>a))})}Zi(e,n){let r=new Nt($A(e));
2557return n.forEach((i,s)=>{Gd(e,s)&&(r=r.add(s))}),r}Xi(e,n,r,i){if(e.limit===null)return!1;if(r.size!==n.size)return!0;const s=e.limitType==="F"?n.last():n.first();return!!s&&(s.hasPendingWrites||s.version.compareTo(i)>0)}Ji(e,n,r){return La()<=Te.DEBUG&&ae("QueryEngine","Using full collection scan to execute query:",ro(n)),this.zi.getDocumentsMatchingQuery(e,n,Li.min(),r)}es(e,n,r,i){return this.zi.getDocumentsMatchingQuery(e,r,i).next(s=>(n.forEach(o=>{s=s.insert(o.key,o)}),s))}}/** 2558 * @license 2559 * Copyright 2020 Google LLC 2560 * 2561 * Licensed under the Apache License, Version 2.0 (the "License"); 2562 * you may not use this file except in compliance with the License. 2563 * You may obtain a copy of the License at 2564 * 2565 * http://www.apache.org/licenses/LICENSE-2.0 2566 * 2567 * Unless required by applicable law or agreed to in writing, software 2568 * distributed under the License is distributed on an "AS IS" BASIS, 2569 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2570 * See the License for the specific language governing permissions and 2571 * limitations under the License. 2572 */class uN{constructor(e,n,r,i){this.persistence=e,this.ts=n,this.serializer=i,this.ns=new Ye(De),this.rs=new ia(s=>ng(s),rg),this.ss=new Map,this.os=e.getRemoteDocumentCache(),this.Qr=e.getTargetCache(),this.$r=e.getBundleCache(),this._s(r)}_s(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutationQueue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new JF(this.os,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.os.setIndexManager(this.indexManager),this.ts.initialize(this.localDocuments,this.indexManager)}collectGarbage(e){return this.persistence.runTransaction("Collect garbage","readwrite-primary",n=>e.collect(n,this.ns))}}function cN(t,e,n,r){return new uN(t,e,n,r)}async function uC(t,e){const n=xe(t);return await n.persistence.runTransaction("Handle user change","readonly",r=>{let i;
2572return n.mutationQueue.getAllMutationBatches(r).next(s=>(i=s,n._s(e),n.mutationQueue.getAllMutationBatches(r))).next(s=>{const o=[],a=[];let u=Ae();for(const d of i){o.push(d.batchId);for(const c of d.mutations)u=u.add(c.key)}for(const d of s){a.push(d.batchId);for(const c of d.mutations)u=u.add(c.key)}return n.localDocuments.getDocuments(r,u).next(d=>({us:d,removedBatchIds:o,addedBatchIds:a}))})})}function dN(t,e){const n=xe(t);return n.persistence.runTransaction("Acknowledge batch","readwrite-primary",r=>{const i=e.batch.keys(),s=n.os.newChangeBuffer({trackRemovals:!0});return function(a,u,d,c){const h=d.batch,p=h.keys();let y=J.resolve();return p.forEach(v=>{y=y.next(()=>c.getEntry(u,v)).next(E=>{const I=d.docVersions.get(v);Ve(I!==null),E.version.compareTo(I)<0&&(h.applyToRemoteDocument(E,d),E.isValidDocument()&&(E.setReadTime(d.commitVersion),c.addEntry(E)))})}),y.next(()=>a.mutationQueue.removeMutationBatch(u,h))}(n,r,e,s).next(()=>s.apply(r)).next(()=>n.mutationQueue.performConsistencyCheck(r)).next(()=>n.documentOverlayCache.removeOverlaysForBatchId(r,i,e.batch.batchId)).next(()=>n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(r,function(a){let u=Ae();for(let d=0;d<a.mutationResults.length;++d)a.mutationResults[d].transformResults.length>0&&(u=u.add(a.batch.mutations[d].key));return u}(e))).next(()=>n.localDocuments.getDocuments(r,i))})}function cC(t){const e=xe(t);return e.persistence.runTransaction("Get last remote snapshot version","readonly",n=>e.Qr.getLastRemoteSnapshotVersion(n))}function hN(t,e){const n=xe(t),r=e.snapshotVersion;let i=n.ns;return n.persistence.runTransaction("Apply remote event","readwrite-primary",s=>{const o=n.os.newChangeBuffer({trackRemovals:!0});i=n.ns;const a=[];
2572e.targetChanges.forEach((c,h)=>{const p=i.get(h);if(!p)return;a.push(n.Qr.removeMatchingKeys(s,c.removedDocuments,h).next(()=>n.Qr.addMatchingKeys(s,c.addedDocuments,h)));let y=p.withSequenceNumber(s.currentSequenceNumber);e.targetMismatches.get(h)!==null?y=y.withResumeToken(Xt.EMPTY_BYTE_STRING,ve.min()).withLastLimboFreeSnapshotVersion(ve.min()):c.resumeToken.approximateByteSize()>0&&(y=y.withResumeToken(c.resumeToken,r)),i=i.insert(h,y),function(E,I,A){return E.resumeToken.approximateByteSize()===0||I.snapshotVersion.toMicroseconds()-E.snapshotVersion.toMicroseconds()>=3e8?!0:A.addedDocuments.size+A.modifiedDocuments.size+A.removedDocuments.size>0}(p,y,c)&&a.push(n.Qr.updateTargetData(s,y))});let u=Hr(),d=Ae();if(e.documentUpdates.forEach(c=>{e.resolvedLimboDocuments.has(c)&&a.push(n.persistence.referenceDelegate.updateLimboDocument(s,c))}),a.push(fN(s,o,e.documentUpdates).next(c=>{u=c.cs,d=c.ls})),!r.isEqual(ve.min())){const c=n.Qr.getLastRemoteSnapshotVersion(s).next(h=>n.Qr.setTargetsMetadata(s,s.currentSequenceNumber,r));a.push(c)}return J.waitFor(a).next(()=>o.apply(s)).next(()=>n.localDocuments.getLocalViewOfDocuments(s,u,d)).next(()=>u)}).then(s=>(n.ns=i,s))}function fN(t,e,n){let r=Ae(),i=Ae();return n.forEach(s=>r=r.add(s)),e.getEntries(t,r).next(s=>{let o=Hr();return n.forEach((a,u)=>{const d=s.get(a);u.isFoundDocument()!==d.isFoundDocument()&&(i=i.add(a)),u.isNoDocument()&&u.version.isEqual(ve.min())?(e.removeEntry(a,u.readTime),o=o.insert(a,u)):!d.isValidDocument()||u.version.compareTo(d.version)>0||u.version.compareTo(d.version)===0&&d.hasPendingWrites?(e.addEntry(u),o=o.insert(a,u)):ae("LocalStore","Ignoring outdated watch update for ",a,". Current version:",d.version," Watch version:",u.version)}),{cs:o,ls:i}})}function pN(t,e){const n=xe(t);return n.persistence.runTransaction("Get next mutation batch","readonly",r=>(e===void 0&&(e=-1),n.mutationQueue.getNextMutationBatchAfterBatchId(r,e)))}function mN(t,e){const n=xe(t);return n.persistence.runTransaction("Allocate target","readwrite",r=>{let i;return n.Qr.getTargetData(r,e).next(s=>s?(i=s,J.resolve(i)):n.Qr.allocateTargetId(r).next(o=>(i=new vi(e,o,"TargetPurposeListen",r.currentSequenceNumber),n.Qr.addTargetData(r,i).next(()=>i))))}).then(r=>{const i=n.ns.get(r.targetId);return(i===null||r.snapshotVersion.compareTo(i.snapshotVersion)>0)&&(n.ns=n.ns.insert(r.targetId,r),n.rs.set(e,r.targetId)),r})}async function vp(t,e,n){const r=xe(t),i=r.ns.get(e),s=n?"readwrite":"readwrite-primary";try{n||await r.persistence.runTransaction("Release target",s,o=>r.persistence.referenceDelegate.removeTarget(o,i))}catch(o){if(!Jl(o))throw o;ae("LocalStore",`Failed to update sequence numbers for target ${e}: ${o}`)}r.ns=r.ns.remove(e),r.rs.delete(i.target)}function i_(t,e,n){const r=xe(t);let i=ve.min(),s=Ae();return r.persistence.runTransaction("Execute query","readwrite",o=>function(u,d,c){const h=xe(u),p=h.rs.get(c);return p!==void 0?J.resolve(h.ns.get(p)):h.Qr.getTargetData(d,c)}(r,o,vr(e)).next(a=>{if(a)return i=a.lastLimboFreeSnapshotVersion,r.Qr.getMatchingKeysForTargetId(o,a.targetId).next(u=>{s=u})}).next(()=>r.ts.getDocumentsMatchingQuery(o,e,n?i:ve.min(),n?s:Ae())).next(a=>(gN(r,aF(e),a),{documents:a,hs:s})))}function gN(t,e,n){let r=t.ss.get(e)||ve.min();n.forEach((i,s)=>{s.readTime.compareTo(r)>0&&(r=s.readTime)}),t.ss.set(e,r)}class s_{constructor(){this.activeTargetIds=fF()}As(e){this.activeTargetIds=this.activeTargetIds.add(e)}Rs(e){this.activeTargetIds=this.activeTargetIds.delete(e)}ds(){const e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)}}class yN{constructor(){this.no=new s_,this.ro={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(e){}updateMutationState(e,n,r){}addLocalQueryTarget(e){return this.no.As(e),this.ro[e]||"not-current"}updateQueryState(e,n,r){this.ro[e]=n}removeLocalQueryTarget(e){this.no.Rs(e)}isLocalQueryTarget(e){return this.no.activeTargetIds.has(e)}clearQueryState(e){delete this.ro[e]}getAllActiveQueryTargets(){return this.no.activeTargetIds}isActiveQueryTarget(e){return this.no.activeTargetIds.has(e)}start(){return this.no=new s_,Promise.resolve()}handleUserChange(e,n,r){}setOnlineState(e){}shutdown(){}writeSequenceNumber(e){}notifyBundleLoaded(e){}}/** 2573 * @license 2574 * Copyright 2019 Google LLC 2575 * 2576 * Licensed under the Apache License, Version 2.0 (the "License");
2577 * you may not use this file except in compliance with the License. 2578 * You may obtain a copy of the License at 2579 * 2580 * http://www.apache.org/licenses/LICENSE-2.0 2581 * 2582 * Unless required by applicable law or agreed to in writing, software 2583 * distributed under the License is distributed on an "AS IS" BASIS, 2584 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2585 * See the License for the specific language governing permissions and 2586 * limitations under the License. 2587 */class vN{io(e){}shutdown(){}}/** 2588 * @license 2589 * Copyright 2019 Google LLC 2590 * 2591 * Licensed under the Apache License, Version 2.0 (the "License"); 2592 * you may not use this file except in compliance with the License. 2593 * You may obtain a copy of the License at 2594 * 2595 * http://www.apache.org/licenses/LICENSE-2.0 2596 * 2597 * Unless required by applicable law or agreed to in writing, software 2598 * distributed under the License is distributed on an "AS IS" BASIS, 2599 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2600 * See the License for the specific language governing permissions and 2601 * limitations under the License. 2602 */class o_{constructor(){this.so=()=>this.oo(),this._o=()=>this.ao(),this.uo=[],this.co()}io(e){this.uo.push(e)}shutdown(){window.removeEventListener("online",this.so),window.removeEventListener("offline",this._o)}co(){window.addEventListener("online",this.so),window.addEventListener("offline",this._o)}oo(){ae("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(const e of this.uo)e(0)}ao(){ae("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(const e of this.uo)e(1)}static D(){return typeof window<"u"&&window.addEventListener!==void 0&&window.removeEventListener!==void 0}}/** 2603 * @license 2604 * Copyright 2023 Google LLC 2605 * 2606 * Licensed under the Apache License, Version 2.0 (the "License"); 2607 * you may not use this file except in compliance with the License. 2608 * You may obtain a copy of the License at 2609 * 2610 * http://www.apache.org/licenses/LICENSE-2.0 2611 * 2612 * Unless required by applicable law or agreed to in writing, software 2613 * distributed under the License is distributed on an "AS IS" BASIS, 2614 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2615 * See the License for the specific language governing permissions and 2616 * limitations under the License. 2617 */let Qu=null;function L0(){return Qu===null?Qu=function(){return 268435456+Math.round(2147483648*Math.random())}():Qu++,"0x"+Qu.toString(16)}/** 2618 * @license 2619 * Copyright 2020 Google LLC 2620 * 2621 * Licensed under the Apache License, Version 2.0 (the "License"); 2622 * you may not use this file except in compliance with the License. 2623 * You may obtain a copy of the License at 2624 * 2625 * http://www.apache.org/licenses/LICENSE-2.0 2626 * 2627 * Unless required by applicable law or agreed to in writing, software 2628 * distributed under the License is distributed on an "AS IS" BASIS, 2629 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2630 * See the License for the specific language governing permissions and 2631 * limitations under the License. 2632 */const xN={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"};/** 2633 * @license 2634 * Copyright 2017 Google LLC 2635 * 2636 * Licensed under the Apache License, Version 2.0 (the "License"); 2637 * you may not use this file except in compliance with the License. 2638 * You may obtain a copy of the License at 2639 * 2640 * http://www.apache.org/licenses/LICENSE-2.0 2641 * 2642 * Unless required by applicable law or agreed to in writing, software 2643 * distributed under the License is distributed on an "AS IS" BASIS, 2644 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2645 * See the License for the specific language governing permissions and 2646 * limitations under the License. 2647 */class _N{constructor(e){this.lo=e.lo,this.ho=e.ho}Po(e){this.Io=e}To(e){this.Eo=e}Ao(e){this.Ro=e}onMessage(e){this.Vo=e}close(){this.ho()}send(e){this.lo(e)}mo(){this.Io()}fo(){this.Eo()}po(e){this.Ro(e)}yo(e){this.Vo(e)}}/** 2648 * @license 2649 * Copyright 2017 Google LLC 2650 * 2651 * Licensed under the Apache License, Version 2.0 (the "License");
2652 * you may not use this file except in compliance with the License. 2653 * You may obtain a copy of the License at 2654 * 2655 * http://www.apache.org/licenses/LICENSE-2.0 2656 * 2657 * Unless required by applicable law or agreed to in writing, software 2658 * distributed under the License is distributed on an "AS IS" BASIS, 2659 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2660 * See the License for the specific language governing permissions and 2661 * limitations under the License. 2662 */const Ht="WebChannelConnection";class EN extends class{constructor(n){this.databaseInfo=n,this.databaseId=n.databaseId;const r=n.ssl?"https":"http",i=encodeURIComponent(this.databaseId.projectId),s=encodeURIComponent(this.databaseId.database);this.wo=r+"://"+n.host,this.So=`projects/${i}/databases/${s}`,this.bo=this.databaseId.database==="(default)"?`project_id=${i}`:`project_id=${i}&database_id=${s}`}get Do(){return!1}Co(n,r,i,s,o){const a=L0(),u=this.vo(n,r.toUriEncodedString());ae("RestConnection",`Sending RPC '${n}' ${a}:`,u,i);const d={"google-cloud-resource-prefix":this.So,"x-goog-request-params":this.bo};return this.Fo(d,s,o),this.Mo(n,u,d,i).then(c=>(ae("RestConnection",`Received RPC '${n}' ${a}: `,c),c),c=>{throw Uo("RestConnection",`RPC '${n}' ${a} failed with error: `,c,"url: ",u,"request:",i),c})}xo(n,r,i,s,o,a){return this.Co(n,r,i,s,o)}Fo(n,r,i){n["X-Goog-Api-Client"]=function(){return"gl-js/ fire/"+ra}(),n["Content-Type"]="text/plain",this.databaseInfo.appId&&(n["X-Firebase-GMPID"]=this.databaseInfo.appId),r&&r.headers.forEach((s,o)=>n[o]=s),i&&i.headers.forEach((s,o)=>n[o]=s)}vo(n,r){const i=xN[n];return`${this.wo}/v1/${r}:${i}`}terminate(){}}{constructor(e){super(e),this.forceLongPolling=e.forceLongPolling,this.autoDetectLongPolling=e.autoDetectLongPolling,this.useFetchStreams=e.useFetchStreams,this.longPollingOptions=e.longPollingOptions}Mo(e,n,r,i){const s=L0();return new Promise((o,a)=>{const u=new wA;u.setWithCredentials(!0),u.listenOnce(CA.COMPLETE,()=>{try{switch(u.getLastErrorCode()){case vc.NO_ERROR:const c=u.getResponseJson();ae(Ht,`XHR for RPC '${e}' ${s} received:`,JSON.stringify(c)),o(c);break;case vc.TIMEOUT:ae(Ht,`RPC '${e}' ${s} timed out`),a(new se(Y.DEADLINE_EXCEEDED,"Request time out"));break;case vc.HTTP_ERROR:const h=u.getStatus();if(ae(Ht,`RPC '${e}' ${s} failed with status:`,h,"response text:",u.getResponseText()),h>0){let p=u.getResponseJson();Array.isArray(p)&&(p=p[0]);const y=p==null?void 0:p.error;if(y&&y.status&&y.message){const v=function(I){const A=I.toLowerCase().replace(/_/g,"-");return Object.values(Y).indexOf(A)>=0?A:Y.UNKNOWN}(y.status);a(new se(v,y.message))}else a(new se(Y.UNKNOWN,"Server responded with status "+u.getStatus()))}else a(new se(Y.UNAVAILABLE,"Connection failed."));break;default:pe()}}finally{ae(Ht,`RPC '${e}' ${s} completed.`)}});const d=JSON.stringify(i);ae(Ht,`RPC '${e}' ${s} sending request:`,i),u.send(n,"POST",d,r,15)})}Oo(e,n,r){const i=L0(),s=[this.wo,"/","google.firestore.v1.Firestore","/",e,"/channel"],o=SA(),a=IA(),u={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:`projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling},d=this.longPollingOptions.timeoutSeconds;d!==void 0&&(u.longPollingTimeout=Math.round(1e3*d)),this.useFetchStreams&&(u.xmlHttpFactory=new AA({})),this.Fo(u.initMessageHeaders,n,r),u.encodeInitMessageHeaders=!0;const c=s.join("");ae(Ht,`Creating RPC '${e}' stream ${i}: ${c}`,u);const h=o.createWebChannel(c,u);let p=!1,y=!1;const v=new _N({lo:I=>{y?ae(Ht,`Not sending because RPC '${e}' stream ${i} is closed:`,I):(p||(ae(Ht,`Opening RPC '${e}' stream ${i} transport.`),h.open(),p=!0),ae(Ht,`RPC '${e}' stream ${i} sending:`,I),h.send(I))},ho:()=>h.close()}),E=(I,A,m)=>{I.listen(A,x=>{try{m(x)}catch(R){setTimeout(()=>{throw R},0)}})};return E(h,Ha.EventType.OPEN,()=>{y||(ae(Ht,`RPC '${e}' stream ${i} transport opened.`),v.mo())}),E(h,Ha.EventType.CLOSE,()=>{y||(y=!0,ae(Ht,`RPC '${e}' stream ${i} transport closed`),v.po())}
2662),E(h,Ha.EventType.ERROR,I=>{y||(y=!0,Uo(Ht,`RPC '${e}' stream ${i} transport errored:`,I),v.po(new se(Y.UNAVAILABLE,"The operation could not be completed")))}),E(h,Ha.EventType.MESSAGE,I=>{var A;if(!y){const m=I.data[0];Ve(!!m);const x=m,R=x.error||((A=x[0])===null||A===void 0?void 0:A.error);if(R){ae(Ht,`RPC '${e}' stream ${i} received error:`,R);const F=R.status;let b=function(T){const w=it[T];if(w!==void 0)return ZA(w)}(F),C=R.message;b===void 0&&(b=Y.INTERNAL,C="Unknown error status: "+F+" with message "+R.message),y=!0,v.po(new se(b,C)),h.close()}else ae(Ht,`RPC '${e}' stream ${i} received:`,m),v.yo(m)}}),E(a,TA.STAT_EVENT,I=>{I.stat===ap.PROXY?ae(Ht,`RPC '${e}' stream ${i} detected buffering proxy`):I.stat===ap.NOPROXY&&ae(Ht,`RPC '${e}' stream ${i} detected no buffering proxy`)}),setTimeout(()=>{v.fo()},0),v}}function M0(){return typeof document<"u"?document:null}/** 2663 * @license 2664 * Copyright 2020 Google LLC 2665 * 2666 * Licensed under the Apache License, Version 2.0 (the "License"); 2667 * you may not use this file except in compliance with the License. 2668 * You may obtain a copy of the License at 2669 * 2670 * http://www.apache.org/licenses/LICENSE-2.0 2671 * 2672 * Unless required by applicable law or agreed to in writing, software 2673 * distributed under the License is distributed on an "AS IS" BASIS, 2674 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2675 * See the License for the specific language governing permissions and 2676 * limitations under the License. 2677 */function Yd(t){return new bF(t,!0)}/** 2678 * @license 2679 * Copyright 2017 Google LLC 2680 * 2681 * Licensed under the Apache License, Version 2.0 (the "License"); 2682 * you may not use this file except in compliance with the License. 2683 * You may obtain a copy of the License at 2684 * 2685 * http://www.apache.org/licenses/LICENSE-2.0 2686 * 2687 * Unless required by applicable law or agreed to in writing, software 2688 * distributed under the License is distributed on an "AS IS" BASIS, 2689 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2690 * See the License for the specific language governing permissions and 2691 * limitations under the License. 2692 */class dC{constructor(e,n,r=1e3,i=1.5,s=6e4){this.oi=e,this.timerId=n,this.No=r,this.Lo=i,this.Bo=s,this.ko=0,this.qo=null,this.Qo=Date.now(),this.reset()}reset(){this.ko=0}Ko(){this.ko=this.Bo}$o(e){this.cancel();const n=Math.floor(this.ko+this.Uo()),r=Math.max(0,Date.now()-this.Qo),i=Math.max(0,n-r);i>0&&ae("ExponentialBackoff",`Backing off for ${i} ms (base delay: ${this.ko} ms, delay with jitter: ${n} ms, last attempt: ${r} ms ago)`),this.qo=this.oi.enqueueAfterDelay(this.timerId,i,()=>(this.Qo=Date.now(),e())),this.ko*=this.Lo,this.ko<this.No&&(this.ko=this.No),this.ko>this.Bo&&(this.ko=this.Bo)}Wo(){this.qo!==null&&(this.qo.skipDelay(),this.qo=null)}cancel(){this.qo!==null&&(this.qo.cancel(),this.qo=null)}Uo(){return(Math.random()-.5)*this.ko}}/** 2693 * @license 2694 * Copyright 2017 Google LLC 2695 * 2696 * Licensed under the Apache License, Version 2.0 (the "License"); 2697 * you may not use this file except in compliance with the License. 2698 * You may obtain a copy of the License at 2699 * 2700 * http://www.apache.org/licenses/LICENSE-2.0 2701 * 2702 * Unless required by applicable law or agreed to in writing, software 2703 * distributed under the License is distributed on an "AS IS" BASIS, 2704 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2705 * See the License for the specific language governing permissions and 2706 * limitations under the License. 2707 */class hC{constructor(e,n,r,i,s,o,a,u){this.oi=e,this.Go=r,this.zo=i,this.connection=s,this.authCredentialsProvider=o,this.appCheckCredentialsProvider=a,this.listener=u,this.state=0,this.jo=0,this.Ho=null,this.Jo=null,this.stream=null,this.Yo=new dC(e,n)}Zo(){return this.state===1||this.state===5||this.Xo()}Xo(){return this.state===2||this.state===3}start(){this.state!==4?this.auth():this.e_()}async stop(){this.Zo()&&await this.close(0)}t_(){this.state=0,this.Yo.reset()}n_(){this.Xo()&&this.Ho===null&&(this.Ho=this.oi.enqueueAfterDelay(this.Go,6e4,()=>this.r_()))}i_(e){this.s_(),this.stream.send(e)}async r_(){if(this.Xo())return this.close(0)}s_(){this.Ho&&(this.Ho.cancel(),this.Ho=null)}o_(){this.Jo&&(this.Jo.cancel(),this.Jo=null)}async close(e,n){this.s_(),this.o_(),this.Yo.cancel(),this.jo++,e!==4?this.Yo.reset():n&&n.code===Y.RESOURCE_EXHAUSTED?(jr(n.toString()),jr("Using maximum backoff delay to prevent overloading the backend."),this.Yo.Ko()):n&&n.code===Y.UNAUTHENTICATED&&this.state!==3&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),this.stream!==null&&(this.__(),this.stream.close(),this.stream=null),this.state=e,await this.listener.Ao(n)}__(){}auth(){this.state=1;const e=this.a_(this.jo),n=this.jo;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then(([r,i])=>{this.jo===n&&this.u_(r,i)},r=>{e(()=>{const i=new se(Y.UNKNOWN,"Fetching auth token failed: "+r.message);return this.c_(i)})})}u_(e,n){const r=this.a_(this.jo);this.stream=this.l_(e,n),this.stream.Po(()=>{r(()=>this.listener.Po())}),this.stream.To(()=>{r(()=>(this.state=2,this.Jo=this.oi.enqueueAfterDelay(this.zo,1e4,()=>(this.Xo()&&(this.state=3),Promise.resolve())),this.listener.To()))}),this.stream.Ao(i=>{r(()=>this.c_(i))}),this.stream.onMessage(i=>{r(()=>this.onMessage(i))})}e_(){this.state=5,this.Yo.$o(async()=>{this.state=0,this.start()})}c_(e){return ae("PersistentStream",`close with error: ${e}`),this.stream=null,this.close(4,e)}a_(e){return n=>{this.oi.enqueueAndForget(()=>this.jo===e?n():(ae("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve()))}}}class wN extends hC{constructor(e,n,r,i,s,o){super(e,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",n,r,i,o),this.serializer
2707=s}l_(e,n){return this.connection.Oo("Listen",e,n)}onMessage(e){this.Yo.reset();const n=BF(this.serializer,e),r=function(s){if(!("targetChange"in s))return ve.min();const o=s.targetChange;return o.targetIds&&o.targetIds.length?ve.min():o.readTime?xr(o.readTime):ve.min()}(e);return this.listener.h_(n,r)}P_(e){const n={};n.database=yp(this.serializer),n.addTarget=function(s,o){let a;const u=o.target;if(a=dp(u)?{documents:MF(s,u)}:{query:VF(s,u)._t},a.targetId=o.targetId,o.resumeToken.approximateByteSize()>0){a.resumeToken=nC(s,o.resumeToken);const d=pp(s,o.expectedCount);d!==null&&(a.expectedCount=d)}else if(o.snapshotVersion.compareTo(ve.min())>0){a.readTime=ud(s,o.snapshotVersion.toTimestamp());const d=pp(s,o.expectedCount);d!==null&&(a.expectedCount=d)}return a}(this.serializer,e);const r=$F(this.serializer,e);r&&(n.labels=r),this.i_(n)}I_(e){const n={};n.database=yp(this.serializer),n.removeTarget=e,this.i_(n)}}class AN extends hC{constructor(e,n,r,i,s,o){super(e,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",n,r,i,o),this.serializer=s,this.T_=!1}get E_(){return this.T_}start(){this.T_=!1,this.lastStreamToken=void 0,super.start()}__(){this.T_&&this.d_([])}l_(e,n){return this.connection.Oo("Write",e,n)}onMessage(e){if(Ve(!!e.streamToken),this.lastStreamToken=e.streamToken,this.T_){this.Yo.reset();const n=LF(e.writeResults,e.commitTime),r=xr(e.commitTime);return this.listener.A_(r,n)}return Ve(!e.writeResults||e.writeResults.length===0),this.T_=!0,this.listener.R_()}V_(){const e={};e.database=yp(this.serializer),this.i_(e)}d_(e){const n={streamToken:this.lastStreamToken,writes:e.map(r=>OF(this.serializer,r))};this.i_(n)}}/** 2708 * @license 2709 * Copyright 2017 Google LLC 2710 * 2711 * Licensed under the Apache License, Version 2.0 (the "License"); 2712 * you may not use this file except in compliance with the License. 2713 * You may obtain a copy of the License at 2714 * 2715 * http://www.apache.org/licenses/LICENSE-2.0 2716 * 2717 * Unless required by applicable law or agreed to in writing, software 2718 * distributed under the License is distributed on an "AS IS" BASIS, 2719 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2720 * See the License for the specific language governing permissions and 2721 * limitations under the License. 2722 */class CN extends class{}{constructor(e,n,r,i){super(),this.authCredentials=e,this.appCheckCredentials=n,this.connection=r,this.serializer=i,this.m_=!1}f_(){if(this.m_)throw new se(Y.FAILED_PRECONDITION,"The client has already been terminated.")}Co(e,n,r,i){return this.f_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([s,o])=>this.connection.Co(e,mp(n,r),i,s,o)).catch(s=>{throw s.name==="FirebaseError"?(s.code===Y.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),s):new se(Y.UNKNOWN,s.toString())})}xo(e,n,r,i,s){return this.f_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([o,a])=>this.connection.xo(e,mp(n,r),i,o,a,s)).catch(o=>{throw o.name==="FirebaseError"?(o.code===Y.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),o):new se(Y.UNKNOWN,o.toString())})}terminate(){this.m_=!0,this.connection.terminate()}}class TN{constructor(e,n){this.asyncQueue=e,this.onlineStateHandler=n,this.state="Unknown",this.g_=0,this.p_=null,this.y_=!0}w_(){this.g_===0&&(this.S_("Unknown"),this.p_=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,()=>(this.p_=null,this.b_("Backend didn't respond within 10 seconds."),this.S_("Offline"),Promise.resolve())))}D_(e){this.state==="Online"?this.S_("Unknown"):(this.g_++,this.g_>=1&&(this.C_(),this.b_(`Connection failed 1 times. Most recent error: ${e.toString()}`),this.S_("Offline")))}set(e){this.C_(),this.g_=0,e==="Online"&&(this.y_=!1),this.S_(e)}S_(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}b_(e){const n=`Could not reach Cloud Firestore backend. ${e} 2723This 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.y_?(jr(n),this.y_=!1):ae("OnlineStateTracker",n)}C_(){this.p_!==null&&(this.p_.cancel(),this.p_=null)}}/** 2724 * @license 2725 * Copyright 2017 Google LLC 2726 * 2727 * Licensed under the Apache License, Version 2.0 (the "License");
2728 * you may not use this file except in compliance with the License. 2729 * You may obtain a copy of the License at 2730 * 2731 * http://www.apache.org/licenses/LICENSE-2.0 2732 * 2733 * Unless required by applicable law or agreed to in writing, software 2734 * distributed under the License is distributed on an "AS IS" BASIS, 2735 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2736 * See the License for the specific language governing permissions and 2737 * limitations under the License. 2738 */class IN{constructor(e,n,r,i,s){this.localStore=e,this.datastore=n,this.asyncQueue=r,this.remoteSyncer={},this.v_=[],this.F_=new Map,this.M_=new Set,this.x_=[],this.O_=s,this.O_.io(o=>{r.enqueueAndForget(async()=>{Vs(this)&&(ae("RemoteStore","Restarting streams for network reachability change."),await async function(u){const d=xe(u);d.M_.add(4),await nu(d),d.N_.set("Unknown"),d.M_.delete(4),await Jd(d)}(this))})}),this.N_=new TN(r,i)}}async function Jd(t){if(Vs(t))for(const e of t.x_)await e(!0)}async function nu(t){for(const e of t.x_)await e(!1)}function fC(t,e){const n=xe(t);n.F_.has(e.targetId)||(n.F_.set(e.targetId,e),mg(n)?pg(n):sa(n).Xo()&&fg(n,e))}function hg(t,e){const n=xe(t),r=sa(n);n.F_.delete(e),r.Xo()&&pC(n,e),n.F_.size===0&&(r.Xo()?r.n_():Vs(n)&&n.N_.set("Unknown"))}function fg(t,e){if(t.L_.xe(e.targetId),e.resumeToken.approximateByteSize()>0||e.snapshotVersion.compareTo(ve.min())>0){const n=t.remoteSyncer.getRemoteKeysForTarget(e.targetId).size;e=e.withExpectedCount(n)}sa(t).P_(e)}function pC(t,e){t.L_.xe(e),sa(t).I_(e)}function pg(t){t.L_=new RF({getRemoteKeysForTarget:e=>t.remoteSyncer.getRemoteKeysForTarget(e),ot:e=>t.F_.get(e)||null,tt:()=>t.datastore.serializer.databaseId}),sa(t).start(),t.N_.w_()}function mg(t){return Vs(t)&&!sa(t).Zo()&&t.F_.size>0}function Vs(t){return xe(t).M_.size===0}function mC(t){t.L_=void 0}async function SN(t){t.N_.set("Online")}async function RN(t){t.F_.forEach((e,n)=>{fg(t,e)})}async function PN(t,e){mC(t),mg(t)?(t.N_.D_(e),pg(t)):t.N_.set("Unknown")}async function kN(t,e,n){if(t.N_.set("Online"),e instanceof tC&&e.state===2&&e.cause)try{await async function(i,s){const o=s.cause;for(const a of s.targetIds)i.F_.has(a)&&(await i.remoteSyncer.rejectListen(a,o),i.F_.delete(a),i.L_.removeTarget(a))}(t,e)}catch(r){ae("RemoteStore","Failed to remove targets %s: %s ",e.targetIds.join(","),r),await cd(t,r)}else if(e instanceof Ec?t.L_.Ke(e):e instanceof eC?t.L_.He(e):t.L_.We(e),!n.isEqual(ve.min()))try{const r=await cC(t.localStore);n.compareTo(r)>=0&&await function(s,o){const a=s.L_.rt(o);
2738return a.targetChanges.forEach((u,d)=>{if(u.resumeToken.approximateByteSize()>0){const c=s.F_.get(d);c&&s.F_.set(d,c.withResumeToken(u.resumeToken,o))}}),a.targetMismatches.forEach((u,d)=>{const c=s.F_.get(u);if(!c)return;s.F_.set(u,c.withResumeToken(Xt.EMPTY_BYTE_STRING,c.snapshotVersion)),pC(s,u);const h=new vi(c.target,u,d,c.sequenceNumber);fg(s,h)}),s.remoteSyncer.applyRemoteEvent(a)}(t,n)}catch(r){ae("RemoteStore","Failed to raise snapshot:",r),await cd(t,r)}}async function cd(t,e,n){if(!Jl(e))throw e;t.M_.add(1),await nu(t),t.N_.set("Offline"),n||(n=()=>cC(t.localStore)),t.asyncQueue.enqueueRetryable(async()=>{ae("RemoteStore","Retrying IndexedDB access"),await n(),t.M_.delete(1),await Jd(t)})}function gC(t,e){return e().catch(n=>cd(t,n,e))}async function Zd(t){const e=xe(t),n=Vi(e);let r=e.v_.length>0?e.v_[e.v_.length-1].batchId:-1;for(;DN(e);)try{const i=await pN(e.localStore,r);if(i===null){e.v_.length===0&&n.n_();break}r=i.batchId,bN(e,i)}catch(i){await cd(e,i)}yC(e)&&vC(e)}function DN(t){return Vs(t)&&t.v_.length<10}function bN(t,e){t.v_.push(e);const n=Vi(t);n.Xo()&&n.E_&&n.d_(e.mutations)}function yC(t){return Vs(t)&&!Vi(t).Zo()&&t.v_.length>0}function vC(t){Vi(t).start()}async function FN(t){Vi(t).V_()}async function NN(t){const e=Vi(t);for(const n of t.v_)e.d_(n.mutations)}async function BN(t,e,n){const r=t.v_.shift(),i=og.from(r,e,n);await gC(t,()=>t.remoteSyncer.applySuccessfulWrite(i)),await Zd(t)}async function ON(t,e){e&&Vi(t).E_&&await async function(r,i){if(function(o){return TF(o)&&o!==Y.ABORTED}(i.code)){const s=r.v_.shift();Vi(r).t_(),await gC(r,()=>r.remoteSyncer.rejectFailedWrite(s.batchId,i)),await Zd(r)}}(t,e),yC(t)&&vC(t)}async function a_(t,e){const n=xe(t);n.asyncQueue.verifyOperationInProgress(),ae("RemoteStore","RemoteStore received new credentials");const r=Vs(n);n.M_.add(3),await nu(n),r&&n.N_.set("Unknown"),await n.remoteSyncer.handleCredentialChange(e),n.M_.delete(3),await Jd(n)}async function LN(t,e){const n=xe(t);e?(n.M_.delete(2),await Jd(n)):e||(n.M_.add(2),await nu(n),n.N_.set("Unknown"))}function sa(t){return t.B_||(t.B_=function(n,r,i){const s=xe(n);return s.f_(),new wN(r,s.connection,s.authCredentials,s.appCheckCredentials,s.serializer,i)}(t.datastore,t.asyncQueue,{Po:SN.bind(null,t),To:RN.bind(null,t),Ao:PN.bind(null,t),h_:kN.bind(null,t)}),t.x_.push(async e=>{e?(t.B_.t_(),mg(t)?pg(t):t.N_.set("Unknown")):(await t.B_.stop(),mC(t))})),t.B_}function Vi(t){return t.k_||(t.k_=function(n,r,i){const s=xe(n);return s.f_(),new AN(r,s.connection,s.authCredentials,s.appCheckCredentials,s.serializer,i)}(t.datastore,t.asyncQueue,{Po:()=>Promise.resolve(),To:FN.bind(null,t),Ao:ON.bind(null,t),R_:NN.bind(null,t),A_:BN.bind(null,t)}),t.x_.push(async e=>{e?(t.k_.t_(),await Zd(t)):(await t.k_.stop(),t.v_.length>0&&(ae("RemoteStore",`Stopping write stream with ${t.v_.length} pending writes`),t.v_=[]))})),t.k_}/** 2739 * @license 2740 * Copyright 2017 Google LLC 2741 * 2742 * Licensed under the Apache License, Version 2.0 (the "License"); 2743 * you may not use this file except in compliance with the License. 2744 * You may obtain a copy of the License at 2745 * 2746 * http://www.apache.org/licenses/LICENSE-2.0 2747 * 2748 * Unless required by applicable law or agreed to in writing, software 2749 * distributed under the License is distributed on an "AS IS" BASIS, 2750 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2751 * See the License for the specific language governing permissions and 2752 * limitations under the License. 2753 */class gg{constructor(e,n,r,i,s){this.asyncQueue=e,this.timerId=n,this.targetTimeMs=r,this.op=i,this.removalCallback=s,this.deferred=new bi,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(o=>{})}get promise(){return this.deferred.promise}static createAndSchedule(e,n,r,i,s){const o=Date.now()+r,a=new gg(e,n,o,i,s);return a.start(r),a}start(e){this.timerHandle=setTimeout(()=>this.handleDelayElapsed(),e)}skipDelay(){return this.handleDelayElapsed()}cancel(e){this.timerHandle!==null&&(this.clearTimeout(),this.deferred.reject(new se(Y.CANCELLED,"Operation cancelled"+(e?": "+e:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget(()=>this.timerHandle!==null?(this.clearTimeout(),this.op().then(e=>this.deferred.resolve(e))):Promise.resolve())}clearTimeout(){this.timerHandle!==null&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}function yg(t,e){if(jr("AsyncQueue",`${e}: ${t}`),Jl(t))return new se(Y.UNAVAILABLE,`${e}: ${t}`);throw t}/** 2754 * @license 2755 * Copyright 2017 Google LLC 2756 * 2757 * Licensed under the Apache License, Version 2.0 (the "License");
2758 * you may not use this file except in compliance with the License. 2759 * You may obtain a copy of the License at 2760 * 2761 * http://www.apache.org/licenses/LICENSE-2.0 2762 * 2763 * Unless required by applicable law or agreed to in writing, software 2764 * distributed under the License is distributed on an "AS IS" BASIS, 2765 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2766 * See the License for the specific language governing permissions and 2767 * limitations under the License. 2768 */class Po{constructor(e){this.comparator=e?(n,r)=>e(n,r)||ce.comparator(n.key,r.key):(n,r)=>ce.comparator(n.key,r.key),this.keyedMap=qa(),this.sortedSet=new Ye(this.comparator)}static emptySet(e){return new Po(e.comparator)}has(e){return this.keyedMap.get(e)!=null}get(e){return this.keyedMap.get(e)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(e){const n=this.keyedMap.get(e);return n?this.sortedSet.indexOf(n):-1}get size(){return this.sortedSet.size}forEach(e){this.sortedSet.inorderTraversal((n,r)=>(e(n),!1))}add(e){const n=this.delete(e.key);return n.copy(n.keyedMap.insert(e.key,e),n.sortedSet.insert(e,null))}delete(e){const n=this.get(e);return n?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(n)):this}isEqual(e){if(!(e instanceof Po)||this.size!==e.size)return!1;const n=this.sortedSet.getIterator(),r=e.sortedSet.getIterator();for(;n.hasNext();){const i=n.getNext().key,s=r.getNext().key;if(!i.isEqual(s))return!1}return!0}toString(){const e=[];return this.forEach(n=>{e.push(n.toString())}),e.length===0?"DocumentSet ()":`DocumentSet ( 2769 `+e.join(` 2770`)+` 2771)`}copy(e,n){const r=new Po;return r.comparator=this.comparator,r.keyedMap=e,r.sortedSet=n,r}}/** 2772 * @license 2773 * Copyright 2017 Google LLC 2774 * 2775 * Licensed under the Apache License, Version 2.0 (the "License"); 2776 * you may not use this file except in compliance with the License. 2777 * You may obtain a copy of the License at 2778 * 2779 * http://www.apache.org/licenses/LICENSE-2.0 2780 * 2781 * Unless required by applicable law or agreed to in writing, software 2782 * distributed under the License is distributed on an "AS IS" BASIS, 2783 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2784 * See the License for the specific language governing permissions and 2785 * limitations under the License. 2786 */class l_{constructor(){this.q_=new Ye(ce.comparator)}track(e){const n=e.doc.key,r=this.q_.get(n);r?e.type!==0&&r.type===3?this.q_=this.q_.insert(n,e):e.type===3&&r.type!==1?this.q_=this.q_.insert(n,{type:r.type,doc:e.doc}):e.type===2&&r.type===2?this.q_=this.q_.insert(n,{type:2,doc:e.doc}):e.type===2&&r.type===0?this.q_=this.q_.insert(n,{type:0,doc:e.doc}):e.type===1&&r.type===0?this.q_=this.q_.remove(n):e.type===1&&r.type===2?this.q_=this.q_.insert(n,{type:1,doc:r.doc}):e.type===0&&r.type===1?this.q_=this.q_.insert(n,{type:2,doc:e.doc}):pe():this.q_=this.q_.insert(n,e)}Q_(){const e=[];return this.q_.inorderTraversal((n,r)=>{e.push(r)}),e}}class qo{constructor(e,n,r,i,s,o,a,u,d){this.query=e,this.docs=n,this.oldDocs=r,this.docChanges=i,this.mutatedKeys=s,this.fromCache=o,this.syncStateChanged=a,this.excludesMetadataChanges=u,this.hasCachedResults=d}static fromInitialDocuments(e,n,r,i,s){const o=[];return n.forEach(a=>{o.push({type:0,doc:a})}),new qo(e,n,Po.emptySet(n),o,r,i,!0,!1,s)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(e){if(!(this.fromCache===e.fromCache&&this.hasCachedResults===e.hasCachedResults&&this.syncStateChanged===e.syncStateChanged&&this.mutatedKeys.isEqual(e.mutatedKeys)&&Wd(this.query,e.query)&&this.docs.isEqual(e.docs)&&this.oldDocs.isEqual(e.oldDocs)))return!1;const n=this.docChanges,r=e.docChanges;if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++)if(n[i].type!==r[i].type||!n[i].doc.isEqual(r[i].doc))return!1;return!0}}/** 2787 * @license 2788 * Copyright 2017 Google LLC 2789 * 2790 * Licensed under the Apache License, Version 2.0 (the "License"); 2791 * you may not use this file except in compliance with the License. 2792 * You may obtain a copy of the License at 2793 * 2794 * http://www.apache.org/licenses/LICENSE-2.0 2795 * 2796 * Unless required by applicable law or agreed to in writing, softw
2796are 2797 * distributed under the License is distributed on an "AS IS" BASIS, 2798 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2799 * See the License for the specific language governing permissions and 2800 * limitations under the License. 2801 */class MN{constructor(){this.K_=void 0,this.U_=[]}W_(){return this.U_.some(e=>e.G_())}}class VN{constructor(){this.queries=new ia(e=>UA(e),Wd),this.onlineState="Unknown",this.z_=new Set}}async function xC(t,e){const n=xe(t);let r=3;const i=e.query;let s=n.queries.get(i);s?!s.W_()&&e.G_()&&(r=2):(s=new MN,r=e.G_()?0:1);try{switch(r){case 0:s.K_=await n.onListen(i,!0);break;case 1:s.K_=await n.onListen(i,!1);break;case 2:await n.onFirstRemoteStoreListen(i)}}catch(o){const a=yg(o,`Initialization of query '${ro(e.query)}' failed`);return void e.onError(a)}n.queries.set(i,s),s.U_.push(e),e.j_(n.onlineState),s.K_&&e.H_(s.K_)&&vg(n)}async function _C(t,e){const n=xe(t),r=e.query;let i=3;const s=n.queries.get(r);if(s){const o=s.U_.indexOf(e);o>=0&&(s.U_.splice(o,1),s.U_.length===0?i=e.G_()?0:1:!s.W_()&&e.G_()&&(i=2))}switch(i){case 0:return n.queries.delete(r),n.onUnlisten(r,!0);case 1:return n.queries.delete(r),n.onUnlisten(r,!1);case 2:return n.onLastRemoteStoreUnlisten(r);default:return}}function UN(t,e){const n=xe(t);let r=!1;for(const i of e){const s=i.query,o=n.queries.get(s);if(o){for(const a of o.U_)a.H_(i)&&(r=!0);o.K_=i}}r&&vg(n)}function $N(t,e,n){const r=xe(t),i=r.queries.get(e);if(i)for(const s of i.U_)s.onError(n);r.queries.delete(e)}function vg(t){t.z_.forEach(e=>{e.next()})}var xp,u_;(u_=xp||(xp={})).J_="default",u_.Cache="cache";class EC{constructor(e,n,r){this.query=e,this.Y_=n,this.Z_=!1,this.X_=null,this.onlineState="Unknown",this.options=r||{}}H_(e){if(!this.options.includeMetadataChanges){const r=[];for(const i of e.docChanges)i.type!==3&&r.push(i);e=new qo(e.query,e.docs,e.oldDocs,r,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0,e.hasCachedResults)}let n=!1;return this.Z_?this.ea(e)&&(this.Y_.next(e),n=!0):this.ta(e,this.onlineState)&&(this.na(e),n=!0),this.X_=e,n}onError(e){this.Y_.error(e)}j_(e){this.onlineState=e;let n=!1;return this.X_&&!this.Z_&&this.ta(this.X_,e)&&(this.na(this.X_),n=!0),n}ta(e,n){if(!e.fromCache||!this.G_())return!0;const r=n!=="Offline";return(!this.options.ra||!r)&&(!e.docs.isEmpty()||e.hasCachedResults||n==="Offline")}ea(e){if(e.docChanges.length>0)return!0;const n=this.X_&&this.X_.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!n)&&this.options.includeMetadataChanges===!0}na(e){e=qo.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache,e.hasCachedResults),this.Z_=!0,this.Y_.next(e)}G_(){return this.options.source!==xp.Cache}}/** 2802 * @license 2803 * Copyright 2017 Google LLC 2804 * 2805 * Licensed under the Apache License, Version 2.0 (the "License"); 2806 * you may not use this file except in compliance with the License. 2807 * You may obtain a copy of the License at 2808 * 2809 * http://www.apache.org/licenses/LICENSE-2.0 2810 * 2811 * Unless required by applicable law or agreed to in writing, software 2812 * distributed under the License is distributed on an "AS IS" BASIS, 2813 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2814 * See the License for the specific language governing permissions and 2815 * limitations under the License. 2816 */class wC{constructor(e){this.key=e}}class AC{constructor(e){this.key=e}}class zN{constructor(e,n){this.query=e,this.la=n,this.ha=null,this.hasCachedResults=!1,this.current=!1,this.Pa=Ae(),this.mutatedKeys=Ae(),this.Ia=$A(e),this.Ta=new Po(this.Ia)}get Ea(){return this.la}da(e,n){const r=n?n.Aa:new l_,i=n?n.Ta:this.Ta;let s=n?n.mutatedKeys:this.mutatedKeys,o=i,a=!1;const u=this.query.limitType==="F"&&i.size===this.query.limit?i.last():null,d=this.query.limitType==="L"&&i.size===this.query.limit?i.first():null;if(e.inorderTraversal((c,h)=>{const p=i.get(c),y=Gd(this.query,h)?h:null,v=!!p&&this.mutatedKeys.has(p.key),E=!!y&&(y.hasLocalMutations||this.mutatedKeys.has(y.key)&&y.hasCommittedMutations);let I=!1;p&&y?p.data.isEqual(y.data)?v!==E&&(r.track({type:3,doc:y}),I=!0):this.Ra(p,y)||(r.track({type:2,doc:y}),I=!0,(u&&this.Ia(y,u)>0||d&&this.Ia(y,d)<0)&&(a=!0)):!p&&y?(r.track({type:0,doc:y}),I=!0):p&&!y&&(r.track({type:1,doc:p}),I=!0,(u||d)&&(a=!0)),I&&(y?(o=o.add(y),s=E?s.add(c):s.delete(c)):(o=o.delete(c),s=s.delete(c)))}),this.query.limit!==null)for(;o.size>this.query.limit;){const c=this.query.limitType==="F"?o.last():o.first();o=o.delete(c.key),s=s.delete(c.key),r.track({type:1,doc:c})}return{Ta:o,Aa:r,Xi:a,mutatedKeys:s}}Ra(e,n){return e.hasLocalMutations&&n.hasCommittedMutations&&!n.hasLocalMutations}
2816applyChanges(e,n,r,i){const s=this.Ta;this.Ta=e.Ta,this.mutatedKeys=e.mutatedKeys;const o=e.Aa.Q_();o.sort((c,h)=>function(y,v){const E=I=>{switch(I){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return pe()}};return E(y)-E(v)}(c.type,h.type)||this.Ia(c.doc,h.doc)),this.Va(r),i=i!=null&&i;const a=n&&!i?this.ma():[],u=this.Pa.size===0&&this.current&&!i?1:0,d=u!==this.ha;return this.ha=u,o.length!==0||d?{snapshot:new qo(this.query,e.Ta,s,o,e.mutatedKeys,u===0,d,!1,!!r&&r.resumeToken.approximateByteSize()>0),fa:a}:{fa:a}}j_(e){return this.current&&e==="Offline"?(this.current=!1,this.applyChanges({Ta:this.Ta,Aa:new l_,mutatedKeys:this.mutatedKeys,Xi:!1},!1)):{fa:[]}}ga(e){return!this.la.has(e)&&!!this.Ta.has(e)&&!this.Ta.get(e).hasLocalMutations}Va(e){e&&(e.addedDocuments.forEach(n=>this.la=this.la.add(n)),e.modifiedDocuments.forEach(n=>{}),e.removedDocuments.forEach(n=>this.la=this.la.delete(n)),this.current=e.current)}ma(){if(!this.current)return[];const e=this.Pa;this.Pa=Ae(),this.Ta.forEach(r=>{this.ga(r.key)&&(this.Pa=this.Pa.add(r.key))});const n=[];return e.forEach(r=>{this.Pa.has(r)||n.push(new AC(r))}),this.Pa.forEach(r=>{e.has(r)||n.push(new wC(r))}),n}pa(e){this.la=e.hs,this.Pa=Ae();const n=this.da(e.documents);return this.applyChanges(n,!0)}ya(){return qo.fromInitialDocuments(this.query,this.Ta,this.mutatedKeys,this.ha===0,this.hasCachedResults)}}class jN{constructor(e,n,r){this.query=e,this.targetId=n,this.view=r}}class HN{constructor(e){this.key=e,this.wa=!1}}class qN{constructor(e,n,r,i,s,o){this.localStore=e,this.remoteStore=n,this.eventManager=r,this.sharedClientState=i,this.currentUser=s,this.maxConcurrentLimboResolutions=o,this.Sa={},this.ba=new ia(a=>UA(a),Wd),this.Da=new Map,this.Ca=new Set,this.va=new Ye(ce.comparator),this.Fa=new Map,this.Ma=new ug,this.xa={},this.Oa=new Map,this.Na=Ho.Ln(),this.onlineState="Unknown",this.La=void 0}get isPrimaryClient(){return this.La===!0}}async function WN(t,e,n=!0){const r=PC(t);let i;const s=r.ba.get(e);return s?(r.sharedClientState.addLocalQueryTarget(s.targetId),i=s.view.ya()):i=await CC(r,e,n,!0),i}async function GN(t,e){const n=PC(t);await CC(n,e,!0,!1)}async function CC(t,e,n,r){const i=await mN(t.localStore,vr(e)),s=i.targetId,o=n?t.sharedClientState.addLocalQueryTarget(s):"not-current";let a;return r&&(a=await KN(t,e,s,o==="current",i.resumeToken)),t.isPrimaryClient&&n&&fC(t.remoteStore,i),a}async function KN(t,e,n,r,i){t.Ba=(h,p,y)=>async function(E,I,A,m){let x=I.view.da(A);x.Xi&&(x=await i_(E.localStore,I.query,!1).then(({documents:C})=>I.view.da(C,x)));const R=m&&m.targetChanges.get(I.targetId),F=m&&m.targetMismatches.get(I.targetId)!=null,b=I.view.applyChanges(x,E.isPrimaryClient,R,F);return d_(E,I.targetId,b.fa),b.snapshot}(t,h,p,y);const s=await i_(t.localStore,e,!0),o=new zN(e,s.hs),a=o.da(s.documents),u=tu.createSynthesizedTargetChangeForCurrentChange(n,r&&t.onlineState!=="Offline",i),d=o.applyChanges(a,t.isPrimaryClient,u);d_(t,n,d.fa);const c=new jN(e,n,o);return t.ba.set(e,c),t.Da.has(n)?t.Da.get(n).push(e):t.Da.set(n,[e]),d.snapshot}async function QN(t,e,n){const r=xe(t),i=r.ba.get(e),s=r.Da.get(i.targetId);if(s.length>1)return r.Da.set(i.targetId,s.filter(o=>!Wd(o,e))),void r.ba.delete(e);r.isPrimaryClient?(r.sharedClientState.removeLocalQueryTarget(i.targetId),r.sharedCl
2816ientState.isActiveQueryTarget(i.targetId)||await vp(r.localStore,i.targetId,!1).then(()=>{r.sharedClientState.clearQueryState(i.targetId),n&&hg(r.remoteStore,i.targetId),_p(r,i.targetId)}).catch(Yl)):(_p(r,i.targetId),await vp(r.localStore,i.targetId,!0))}async function XN(t,e){const n=xe(t),r=n.ba.get(e),i=n.Da.get(r.targetId);n.isPrimaryClient&&i.length===1&&(n.sharedClientState.removeLocalQueryTarget(r.targetId),hg(n.remoteStore,r.targetId))}async function YN(t,e,n){const r=iB(t);try{const i=await function(o,a){const u=xe(o),d=vt.now(),c=a.reduce((y,v)=>y.add(v.key),Ae());let h,p;return u.persistence.runTransaction("Locally write mutations","readwrite",y=>{let v=Hr(),E=Ae();return u.os.getEntries(y,c).next(I=>{v=I,v.forEach((A,m)=>{m.isValidDocument()||(E=E.add(A))})}).next(()=>u.localDocuments.getOverlayedDocuments(y,v)).next(I=>{h=I;const A=[];for(const m of a){const x=_F(m,h.get(m.key).overlayedDocument);x!=null&&A.push(new qi(m.key,x,bA(x.value.mapValue),Bn.exists(!0)))}return u.mutationQueue.addMutationBatch(y,d,A,a)}).next(I=>{p=I;const A=I.applyToLocalDocumentSet(h,E);return u.documentOverlayCache.saveOverlays(y,I.batchId,A)})}).then(()=>({batchId:p.batchId,changes:jA(h)}))}(r.localStore,e);r.sharedClientState.addPendingMutation(i.batchId),function(o,a,u){let d=o.xa[o.currentUser.toKey()];d||(d=new Ye(De)),d=d.insert(a,u),o.xa[o.currentUser.toKey()]=d}(r,i.batchId,n),await ru(r,i.changes),await Zd(r.remoteStore)}catch(i){const s=yg(i,"Failed to persist write");n.reject(s)}}async function TC(t,e){const n=xe(t);try{const r=await hN(n.localStore,e);
2816e.targetChanges.forEach((i,s)=>{const o=n.Fa.get(s);o&&(Ve(i.addedDocuments.size+i.modifiedDocuments.size+i.removedDocuments.size<=1),i.addedDocuments.size>0?o.wa=!0:i.modifiedDocuments.size>0?Ve(o.wa):i.removedDocuments.size>0&&(Ve(o.wa),o.wa=!1))}),await ru(n,r,e)}catch(r){await Yl(r)}}function c_(t,e,n){const r=xe(t);if(r.isPrimaryClient&&n===0||!r.isPrimaryClient&&n===1){const i=[];r.ba.forEach((s,o)=>{const a=o.view.j_(e);a.snapshot&&i.push(a.snapshot)}),function(o,a){const u=xe(o);u.onlineState=a;let d=!1;u.queries.forEach((c,h)=>{for(const p of h.U_)p.j_(a)&&(d=!0)}),d&&vg(u)}(r.eventManager,e),i.length&&r.Sa.h_(i),r.onlineState=e,r.isPrimaryClient&&r.sharedClientState.setOnlineState(e)}}async function JN(t,e,n){const r=xe(t);r.sharedClientState.updateQueryState(e,"rejected",n);const i=r.Fa.get(e),s=i&&i.key;if(s){let o=new Ye(ce.comparator);o=o.insert(s,Kt.newNoDocument(s,ve.min()));const a=Ae().add(s),u=new Xd(ve.min(),new Map,new Ye(De),o,a);await TC(r,u),r.va=r.va.remove(s),r.Fa.delete(e),xg(r)}else await vp(r.localStore,e,!1).then(()=>_p(r,e,n)).catch(Yl)}async function ZN(t,e){const n=xe(t),r=e.batch.batchId;try{const i=await dN(n.localStore,e);SC(n,r,null),IC(n,r),n.sharedClientState.updateMutationState(r,"acknowledged"),await ru(n,i)}catch(i){await Yl(i)}}async function eB(t,e,n){const r=xe(t);try{const i=await function(o,a){const u=xe(o);return u.persistence.runTransaction("Reject batch","readwrite-primary",d=>{let c;return u.mutationQueue.lookupMutationBatch(d,a).next(h=>(Ve(h!==null),c=h.keys(),u.mutationQueue.removeMutationBatch(d,h))).next(()=>u.mutationQueue.performConsistencyCheck(d)).next(()=>u.documentOverlayCache.removeOverlaysForBatchId(d,c,a)).next(()=>u.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(d,c)).next(()=>u.localDocuments.getDocuments(d,c))})}(r.localStore,e);SC(r,e,n),IC(r,e),r.sharedClientState.updateMutationState(e,"rejected",n),await ru(r,i)}catch(i){await Yl(i)}}function IC(t,e){(t.Oa.get(e)||[]).forEach(n=>{n.resolve()}),t.Oa.delete(e)}function SC(t,e,n){const r=xe(t);let i=r.xa[r.currentUser.toKey()];if(i){const s=i.get(e);s&&(n?s.reject(n):s.resolve(),i=i.remove(e)),r.xa[r.currentUser.toKey()]=i}}
2816function _p(t,e,n=null){t.sharedClientState.removeLocalQueryTarget(e);for(const r of t.Da.get(e))t.ba.delete(r),n&&t.Sa.ka(r,n);t.Da.delete(e),t.isPrimaryClient&&t.Ma.Vr(e).forEach(r=>{t.Ma.containsKey(r)||RC(t,r)})}function RC(t,e){t.Ca.delete(e.path.canonicalString());const n=t.va.get(e);n!==null&&(hg(t.remoteStore,n),t.va=t.va.remove(e),t.Fa.delete(n),xg(t))}function d_(t,e,n){for(const r of n)r instanceof wC?(t.Ma.addReference(r.key,e),tB(t,r)):r instanceof AC?(ae("SyncEngine","Document no longer in limbo: "+r.key),t.Ma.removeReference(r.key,e),t.Ma.containsKey(r.key)||RC(t,r.key)):pe()}function tB(t,e){const n=e.key,r=n.path.canonicalString();t.va.get(n)||t.Ca.has(r)||(ae("SyncEngine","New document in limbo: "+n),t.Ca.add(r),xg(t))}function xg(t){for(;t.Ca.size>0&&t.va.size<t.maxConcurrentLimboResolutions;){const e=t.Ca.values().next().value;t.Ca.delete(e);const n=new ce(je.fromString(e)),r=t.Na.next();t.Fa.set(r,new HN(n)),t.va=t.va.insert(n,r),fC(t.remoteStore,new vi(vr(ig(n.path)),r,"TargetPurposeLimboResolution",Jm.oe))}}async function ru(t,e,n){const r=xe(t),i=[],s=[],o=[];r.ba.isEmpty()||(r.ba.forEach((a,u)=>{o.push(r.Ba(u,e,n).then(d=>{if((d||n)&&r.isPrimaryClient){const c=d&&!d.fromCache;r.sharedClientState.updateQueryState(u.targetId,c?"current":"not-current")}if(d){i.push(d);const c=dg.Ki(u.targetId,d);s.push(c)}}))}),await Promise.all(o),r.Sa.h_(i),await async function(u,d){const c=xe(u);try{await c.persistence.runTransaction("notifyLocalViewChanges","readwrite",h=>J.forEach(d,p=>J.forEach(p.qi,y=>c.persistence.referenceDelegate.addReference(h,p.targetId,y)).next(()=>J.forEach(p.Qi,y=>c.persistence.referenceDelegate.removeReference(h,p.targetId,y)))))}catch(h){if(!Jl(h))throw h;ae("LocalStore","Failed to update sequence numbers: "+h)}for(const h of d){const p=h.targetId;if(!h.fromCache){const y=c.ns.get(p),v=y.snapshotVersion,E=y.withLastLimboFreeSnapshotVersion(v);c.ns=c.ns.insert(p,E)}}}(r.localStore,s))}async function nB(t,e){const n=xe(t);if(!n.currentUser.isEqual(e)){ae("SyncEngine","User change. New user:",e.toKey());const r=await uC(n.localStore,e);n.currentUser=e,function(s,o){s.Oa.forEach(a=>{a.forEach(u=>{u.reject(new se(Y.CANCELLED,o))})}),s.Oa.clear()}(n,"'waitForPendingWrites' promise is rejected due to a user change."),n.sharedClientState.handleUserChange(e,r.removedBatchIds,r.addedBatchIds),await ru(n,r.us)}}function rB(t,e){const n=xe(t),r=n.Fa.get(e);if(r&&r.wa)return Ae().add(r.key);{let i=Ae();const s=n.Da.get(e);if(!s)return i;for(const o of s){const a=n.ba.get(o);i=i.unionWith(a.view.Ea)}return i}}function PC(t){const e=xe(t);return e.remoteStore.remoteSyncer.applyRemoteEvent=TC.bind(null,e),e.remoteStore.remoteSyncer.getRemoteKeysForTarget=rB.bind(null,e),e.remoteStore.remoteSyncer.rejectListen=JN.bind(null,e),e.Sa.h_=UN.bind(null,e.eventManager),e.Sa.ka=$N.bind(null,e.eventManager),e}function iB(t){const e=xe(t);return e.remoteStore.remoteSyncer.applySuccessfulWrite=ZN.bind(null,e),e.remoteStore.remoteSyncer.rejectFailedWrite=eB.bind(null,e),e}class h_{constructor(){this.synchronizeTabs=!1}async initialize(e){this.serializer=Yd(e.databaseInfo.databaseId),this.sharedClientState=this.createSharedClientState(e),this.persistence=this.createPersistence(e),await this.persistence.start(),this.localStore=this.createLocalStore(e),this.gcScheduler=this.createGarbageCollectionScheduler(e,this.localStore),this.indexBackfillerScheduler=this.createIndexBackfillerScheduler(e,this.localStore)}createGarbageCollectionScheduler(e,n){return null}createIndexBackfillerScheduler(e,n){return null}createLocalStore(e){return cN(this.persistence,new lN,e.initialUser,this.serializer)}createPersistence(e){return new sN(cg.Hr,this.serializer)}createSharedClientState(e){return new yN}async terminate(){var e,n;(e=this.gcScheduler)===null||e===void 0||e.stop(),(n=this.indexBackfillerScheduler)===null||n===void 0||n.stop(),this.sharedClientState.shutdown(),await this.persistence.shutdown()}}class sB{async initialize(e,n){this.localStore||(this.localStore=e.localStore,this.sharedClientState=e.sharedClientState,this.datastore=this.createDatastore(n),this.remoteStore=this.createRemoteStore(n),this.eventManager=this.createEventManager(n),this.syncEngine=this.createSyncEngine(n,!e.synchronizeTabs),this.sharedCl
2816ientState.onlineStateHandler=r=>c_(this.syncEngine,r,1),this.remoteStore.remoteSyncer.handleCredentialChange=nB.bind(null,this.syncEngine),await LN(this.remoteStore,this.syncEngine.isPrimaryClient))}createEventManager(e){return function(){return new VN}()}createDatastore(e){const n=Yd(e.databaseInfo.databaseId),r=function(s){return new EN(s)}(e.databaseInfo);return function(s,o,a,u){return new CN(s,o,a,u)}(e.authCredentials,e.appCheckCredentials,r,n)}createRemoteStore(e){return function(r,i,s,o,a){return new IN(r,i,s,o,a)}(this.localStore,this.datastore,e.asyncQueue,n=>c_(this.syncEngine,n,0),function(){return o_.D()?new o_:new vN}())}createSyncEngine(e,n){return function(i,s,o,a,u,d,c){const h=new qN(i,s,o,a,u,d);return c&&(h.La=!0),h}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,e.initialUser,e.maxConcurrentLimboResolutions,n)}async terminate(){var e;await async function(r){const i=xe(r);ae("RemoteStore","RemoteStore shutting down."),i.M_.add(5),await nu(i),i.O_.shutdown(),i.N_.set("Unknown")}(this.remoteStore),(e=this.datastore)===null||e===void 0||e.terminate()}}/** 2817 * @license 2818 * Copyright 2020 Google LLC 2819 * 2820 * Licensed under the Apache License, Version 2.0 (the "License"); 2821 * you may not use this file except in compliance with the License. 2822 * You may obtain a copy of the License at 2823 * 2824 * http://www.apache.org/licenses/LICENSE-2.0 2825 * 2826 * Unless required by applicable law or agreed to in writing, software 2827 * distributed under the License is distributed on an "AS IS" BASIS, 2828 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2829 * See the License for the specific language governing permissions and 2830 * limitations under the License. 2831 *//** 2832 * @license 2833 * Copyright 2017 Google LLC 2834 * 2835 * Licensed under the Apache License, Version 2.0 (the "License"); 2836 * you may not use this file except in compliance with the License. 2837 * You may obtain a copy of the License at 2838 * 2839 * http://www.apache.org/licenses/LICENSE-2.0 2840 * 2841 * Unless required by applicable law or agreed to in writing, software 2842 * distributed under the License is distributed on an "AS IS" BASIS, 2843 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2844 * See the License for the specific language governing permissions and 2845 * limitations under the License. 2846 */class kC{constructor(e){this.observer=e,this.muted=!1}next(e){this.observer.next&&this.Ka(this.observer.next,e)}error(e){this.observer.error?this.Ka(this.observer.error,e):jr("Uncaught Error in snapshot listener:",e.toString())}$a(){this.muted=!0}Ka(e,n){this.muted||setTimeout(()=>{this.muted||e(n)},0)}}/** 2847 * @license 2848 * Copyright 2017 Google LLC 2849 * 2850 * Licensed under the Apache License, Version 2.0 (the "License"); 2851 * you may not use this file except in compliance with the License. 2852 * You may obtain a copy of the License at 2853 * 2854 * http://www.apache.org/licenses/LICENSE-2.0 2855 * 2856 * Unless required by applicable law or agreed to in writing, software 2857 * distributed under the License is distributed on an "AS IS" BASIS, 2858 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2859 * See the License for the specific language governing permissions and 2860 * limitations under the License. 2861 */class oB{constructor(e,n,r,i){this.authCredentials=e,this.appCheckCredentials=n,this.asyncQueue=r,this.databaseInfo=i,this.user=Wt.UNAUTHENTICATED,this.clientId=PA.newId(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this.authCredentials.start(r,async s=>{ae("FirestoreClient","Received user=",s.uid),await this.authCredentialListener(s),this.user=s}),this.appCheckCredentials.start(r,s=>(ae("FirestoreClient","Received new app check token=",s),this.appCheckCredentialListener(s,this.user)))}get configuration(){return{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(e){this.authCredentialListener=e}setAppCheckTokenChangeListener(e){this.appCheckCredentialListener=e}verifyNotTerminated(){if(this.asyncQueue.isShuttingDown)throw new se(Y.FAILED_PRECONDITION,"The client has already been terminated.")}terminate(){this.asyncQueue.enterRestrictedMode();const e=new bi;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(async()=>{try{this._onlineComponents&&await this._onlineComponents.terminate(),this._offlineComponents&&await this._offlineComponents.terminate(),this.authCredentials.shutdown(),this.appCheckCredentials.shutdown(),e.resolve()}catch(n){const r=yg(n,"Failed to shutdown persistence");e.reject(r)}}),e.promise}}async function V0(t,e){t.asyncQueue.verifyOperationInProgress(),ae("FirestoreClient","Initializing OfflineComponentProvider");const n=t.configuration;await e.initialize(n);let r=n.initialUser;t.setCredentialChangeListener(async i=>{r.isEqual(i)||(await uC(e.localStore,i),r=i)}),e.persistence.setDatabaseDeletedListener(()=>t.terminate()),t._offlineComponents=e}async function f_(t,e){t.asyncQueue.verifyOperationInProgress();const n=await lB(t);ae("FirestoreClient","Initializing OnlineComponentProvider"),await e.initialize(n,t.configuration),t.setCredentialChangeListener(r=>a_(e.remoteStore,r)),t.setAppCheckTokenChangeListener((r,i)=>a_(e.remoteStore,i)),t._onlineComponents=e}function aB(t){return t.name==="FirebaseError"?t.code===Y.FAILED_PRECONDITION||t.code===Y.UNIMPLEMENT
2861ED:!(typeof DOMException<"u"&&t instanceof DOMException)||t.code===22||t.code===20||t.code===11}async function lB(t){if(!t._offlineComponents)if(t._uninitializedComponentsProvider){ae("FirestoreClient","Using user provided OfflineComponentProvider");try{await V0(t,t._uninitializedComponentsProvider._offline)}catch(e){const n=e;if(!aB(n))throw n;Uo("Error using user provided cache. Falling back to memory cache: "+n),await V0(t,new h_)}}else ae("FirestoreClient","Using default OfflineComponentProvider"),await V0(t,new h_);return t._offlineComponents}async function DC(t){return t._onlineComponents||(t._uninitializedComponentsProvider?(ae("FirestoreClient","Using user provided OnlineComponentProvider"),await f_(t,t._uninitializedComponentsProvider._online)):(ae("FirestoreClient","Using default OnlineComponentProvider"),await f_(t,new sB))),t._onlineComponents}function uB(t){return DC(t).then(e=>e.syncEngine)}async function Ep(t){const e=await DC(t),n=e.eventManager;return n.onListen=WN.bind(null,e.syncEngine),n.onUnlisten=QN.bind(null,e.syncEngine),n.onFirstRemoteStoreListen=GN.bind(null,e.syncEngine),n.onLastRemoteStoreUnlisten=XN.bind(null,e.syncEngine),n}function cB(t,e,n={}){const r=new bi;return t.asyncQueue.enqueueAndForget(async()=>function(s,o,a,u,d){const c=new kC({next:p=>{o.enqueueAndForget(()=>_C(s,h)),p.fromCache&&u.source==="server"?d.reject(new se(Y.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.)')):d.resolve(p)},error:p=>d.reject(p)}),h=new EC(a,c,{includeMetadataChanges:!0,ra:!0});return xC(s,h)}(await Ep(t),t.asyncQueue,e,n,r)),r.promise}/** 2862 * @license 2863 * Copyright 2023 Google LLC 2864 * 2865 * Licensed under the Apache License, Version 2.0 (the "License"); 2866 * you may not use this file except in compliance with the License. 2867 * You may obtain a copy of the License at 2868 * 2869 * http://www.apache.org/licenses/LICENSE-2.0 2870 * 2871 * Unless required by applicable law or agreed to in writing, software 2872 * distributed under the License is distributed on an "AS IS" BASIS, 2873 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2874 * See the License for the specific language governing permissions and 2875 * limitations under the License. 2876 */function bC(t){const e={};return t.timeoutSeconds!==void 0&&(e.timeoutSeconds=t.timeoutSeconds),e}/** 2877 * @license 2878 * Copyright 2020 Google LLC 2879 * 2880 * Licensed under the Apache License, Version 2.0 (the "License"); 2881 * you may not use this file except in compliance with the License. 2882 * You may obtain a copy of the License at 2883 * 2884 * http://www.apache.org/licenses/LICENSE-2.0 2885 * 2886 * Unless required by applicable law or agreed to in writing, software 2887 * distributed under the License is distributed on an "AS IS" BASIS, 2888 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2889 * See the License for the specific language governing permissions and 2890 * limitations under the License. 2891 */const p_=new Map;/** 2892 * @license 2893 * Copyright 2017 Google LLC 2894 * 2895 * Licensed under the Apache License, Version 2.0 (the "License"); 2896 * you may not use this file except in compliance with the License. 2897 * You may obtain a copy of the License at 2898 * 2899 * http://www.apache.org/licenses/LICENSE-2.0 2900 * 2901 * Unless required by applicable law or agreed to in writing, software 2902 * distributed under the License is distributed on an "AS IS" BASIS, 2903 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2904 * See the License for the specific language governing permissions and 2905 * limitations under the License. 2906 */function FC(t,e,n){if(!n)throw new se(Y.INVALID_ARGUMENT,`Function ${t}() cannot be called with an empty ${e}.`)}function dB(t,e,n,r){if(e===!0&&r===!0)throw new se(Y.INVALID_ARGUMENT,`${t} and ${n} cannot be used together.`)}function m_(t){if(!ce.isDocumentKey(t))throw new se(Y.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${t} has ${t.length}.`)}
2906function g_(t){if(ce.isDocumentKey(t))throw new se(Y.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${t} has ${t.length}.`)}function eh(t){if(t===void 0)return"undefined";if(t===null)return"null";if(typeof t=="string")return t.length>20&&(t=`${t.substring(0,20)}...`),JSON.stringify(t);if(typeof t=="number"||typeof t=="boolean")return""+t;if(typeof t=="object"){if(t instanceof Array)return"an array";{const e=function(r){return r.constructor?r.constructor.name:null}(t);return e?`a custom ${e} object`:"an object"}}return typeof t=="function"?"a function":pe()}function Fi(t,e){if("_delegate"in t&&(t=t._delegate),!(t instanceof e)){if(e.name===t.constructor.name)throw new se(Y.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{const n=eh(t);throw new se(Y.INVALID_ARGUMENT,`Expected type '${e.name}', but it was: ${n}`)}}return t}/** 2907 * @license 2908 * Copyright 2020 Google LLC 2909 * 2910 * Licensed under the Apache License, Version 2.0 (the "License"); 2911 * you may not use this file except in compliance with the License. 2912 * You may obtain a copy of the License at 2913 * 2914 * http://www.apache.org/licenses/LICENSE-2.0 2915 * 2916 * Unless required by applicable law or agreed to in writing, software 2917 * distributed under the License is distributed on an "AS IS" BASIS, 2918 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2919 * See the License for the specific language governing permissions and 2920 * limitations under the License. 2921 */class y_{constructor(e){var n,r;if(e.host===void 0){if(e.ssl!==void 0)throw new se(Y.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=e.host,this.ssl=(n=e.ssl)===null||n===void 0||n;if(this.credentials=e.credentials,this.ignoreUndefinedProperties=!!e.ignoreUndefinedProperties,this.localCache=e.localCache,e.cacheSizeBytes===void 0)this.cacheSizeBytes=41943040;else{if(e.cacheSizeBytes!==-1&&e.cacheSizeBytes<1048576)throw new se(Y.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}dB("experimentalForceLongPolling",e.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",e.experimentalAutoDetectLongPolling),this.experimentalForceLongPolling=!!e.experimentalForceLongPolling,this.experimentalForceLongPolling?this.experimentalAutoDetectLongPolling=!1:e.experimentalAutoDetectLongPolling===void 0?this.experimentalAutoDetectLongPolling=!0:this.experimentalAutoDetectLongPolling=!!e.experimentalAutoDetectLongPolling,this.experimentalLongPollingOptions=bC((r=e.experimentalLongPollingOptions)!==null&&r!==void 0?r:{}),function(s){if(s.timeoutSeconds!==void 0){if(isNaN(s.timeoutSeconds))throw new se(Y.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (must not be NaN)`);if(s.timeoutSeconds<5)throw new se(Y.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (minimum allowed value is 5)`);if(s.timeoutSeconds>30)throw new se(Y.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (maximum allowed value is 30)`)}}(this.experimentalLongPollingOptions),this.useFetchStreams=!!e.useFetchStreams}isEqual(e){return this.host===e.host&&this.ssl===e.ssl&&this.credentials===e.credentials&&this.cacheSizeBytes===e.cacheSizeBytes&&this.experimentalForceLongPolling===e.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===e.experimentalAutoDetectLongPolling&&function(r,i){return r.timeoutSeconds===i.timeoutSeconds}(this.experimentalLongPollingOptions,e.experimentalLongPollingOptions)&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}}class th{constructor(e,n,r,i){this._authCredentials=e,this._appCheckCredentials=n,this._databaseId=r,this._app=i,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new y_({}),this._settingsFrozen=!1}get app(){if(!this._app)throw new se(Y.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return this._terminateTask!==void 0}_setSettings(e){if(this._settingsFrozen)throw new se(Y.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 y_(e),e.credentials!==void 0&&(this._authCredentials=function(r){if(!r)return new kb;switch(r.type){case"firstParty":return new Nb(r.sessionIndex||"0",r.iamToken||null,r.authTokenFactory||null);case"provider":return r.client;
2921default:throw new se(Y.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}}(e.credentials))}_getSettings(){return this._settings}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return this._terminateTask||(this._terminateTask=this._terminate()),this._terminateTask}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return function(n){const r=p_.get(n);r&&(ae("ComponentProvider","Removing Datastore"),p_.delete(n),r.terminate())}(this),Promise.resolve()}}function hB(t,e,n,r={}){var i;const s=(t=Fi(t,th))._getSettings(),o=`${e}:${n}`;if(s.host!=="firestore.googleapis.com"&&s.host!==o&&Uo("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used."),t._setSettings(Object.assign(Object.assign({},s),{host:o,ssl:!1})),r.mockUserToken){let a,u;if(typeof r.mockUserToken=="string")a=r.mockUserToken,u=Wt.MOCK_USER;else{a=WD(r.mockUserToken,(i=t._app)===null||i===void 0?void 0:i.options.projectId);const d=r.mockUserToken.sub||r.mockUserToken.user_id;if(!d)throw new se(Y.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");u=new Wt(d)}t._authCredentials=new Db(new RA(a,u))}}/** 2922 * @license 2923 * Copyright 2020 Google LLC 2924 * 2925 * Licensed under the Apache License, Version 2.0 (the "License"); 2926 * you may not use this file except in compliance with the License. 2927 * You may obtain a copy of the License at 2928 * 2929 * http://www.apache.org/licenses/LICENSE-2.0 2930 * 2931 * Unless required by applicable law or agreed to in writing, software 2932 * distributed under the License is distributed on an "AS IS" BASIS, 2933 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2934 * See the License for the specific language governing permissions and 2935 * limitations under the License. 2936 */class Us{constructor(e,n,r){this.converter=n,this._query=r,this.type="query",this.firestore=e}withConverter(e){return new Us(this.firestore,e,this._query)}}class wn{constructor(e,n,r){this.converter=n,this._key=r,this.type="document",this.firestore=e}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new Ni(this.firestore,this.converter,this._key.path.popLast())}withConverter(e){return new wn(this.firestore,e,this._key)}}class Ni extends Us{constructor(e,n,r){super(e,n,ig(r)),this._path=r,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){const e=this._path.popLast();return e.isEmpty()?null:new wn(this.firestore,null,new ce(e))}withConverter(e){return new Ni(this.firestore,e,this._path)}}function B5(t,e,...n){if(t=xt(t),FC("collection","path",e),t instanceof th){const r=je.fromString(e,...n);return g_(r),new Ni(t,null,r)}{if(!(t instanceof wn||t instanceof Ni))throw new se(Y.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const r=t._path.child(je.fromString(e,...n));return g_(r),new Ni(t.firestore,null,r)}}function fB(t,e,...n){if(t=xt(t),arguments.length===1&&(e=PA.newId()),FC("doc","path",e),t instanceof th){const r=je.fromString(e,...n);return m_(r),new wn(t,null,new ce(r))}{if(!(t instanceof wn||t instanceof Ni))throw new se(Y.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const r=t._path.child(je.fromString(e,...n));return m_(r),new wn(t.firestore,t instanceof Ni?t.converter:null,new ce(r))}}/** 2937 * @license 2938 * Copyright 2020 Google LLC 2939 * 2940 * Licensed under the Apache License, Version 2.0 (the "License"); 2941 * you may not use this file except in compliance with the License. 2942 * You may obtain a copy of the License at 2943 * 2944 * http://www.apache.org/licenses/LICENSE-2.0 2945 * 2946 * Unless required by applicable law or agreed to in writing, software 2947 * distributed under the License is distributed on an "AS IS" BASIS, 2948 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2949 * See the License for the specific language governing permissions and 2950 * limitations under the License. 2951 */class pB{constructor(){this.iu=Promise.resolve(),this.su=[],this.ou=!1,this._u=[],this.au=null,this.uu=!1,this.cu=!1,this.lu=[],this.Yo=new dC(this,"async_queue_retry"),this.hu=()=>{const n=M0();n&&ae("AsyncQueue","Visibility state changed to "+n.visibilityState),this.Yo.Wo()};const e=M0();e&&typeof e.addEventListener=="function"&&e.addEventListener("visibilitychange",this.hu)}get isShuttingDown(){return this.ou}enqueueAndForget(e){this.enqueue(e)}enqueueAndForgetEvenWhileRestricted(e){this.Pu(),this.Iu(e)}enterRestrictedMode(e){if(!this.ou){this.ou=!0,this.cu=e||!1;const n=M0();n&&typeof n.removeEventListener=="function"&&n.removeEventListener("visibilitychange",this.hu)}}enqueue(e){if(this.Pu(),this.ou)return new Promise(()=>{});const n=new bi;return this.Iu(()=>this.ou&&this.cu?Promise.resolve():(e().then(n.resolve,n.reject),n.promise)).then(()=>n.promise)}enqueueRetryable(e){this.enqueueAndForget(()=>(this.su.push(e),this.Tu()))}async Tu(){if(this.su.length!==0){try{await this.su[0](),this.su.shift(),this.Yo.reset()}catch(e){if(!Jl(e))throw e;ae("AsyncQueue","Operation failed with retryable error: "+e)}this.su.length>0&&this.Yo.$o(()=>this.Tu())}}Iu(e){const n=this.iu.then(()=>(this.uu=!0,e().catch(r=>{this.au=r,this.uu=!1;const i=function(o){let a=o.message||"";return o.stack&&(a=o.stack.includes(o.message)?o.stack:o.message+` 2952`+o.stack),a}(r);throw jr("INTERNAL UNHANDLED ERROR: ",i),r}).then(r=>(this.uu=!1,r))));return this.iu=n,n}enqueueAfterDelay(e,n,r){this.Pu(),this.lu.indexOf(e)>-1&&(n=0);const i=gg.createAndSchedule(this,e,n,r,s=>this.Eu(s));return this._u.push(i),i}Pu(){this.au&&pe()}verifyOperationInProgress(){}async du(){let e;do e=this.iu,await e;while(e!==this.iu)}Au(e){for(const n of this._u)if(n.timerId===e)return!0;return!1}Ru(e){return this.du().then(()=>{this._u.sort((n,r)=>n.targetTimeMs-r.targetTimeMs);for(const n of this._u)if(n.skipDelay(),e!=="all"&&n.timerId===e)break;return this.du()})}Vu(e){this.lu.push(e)}Eu(e){const n=this._u.indexOf(e);this._u.splice(n,1)}}function v_(t){return function(n,r){if(typeof n!="object"||n===null)return!1;const i=n;for(const s of r)if(s in i&&typeof i[s]=="function")return!0;return!1}(t,["next","error","complete"])}class Wo extends th{constructor(e,n,r,i){super(e,n,r,i),this.type="firestore",this._queue=function(){return new pB}(),this._persistenceKey=(i==null?void 0:i.name)||"[DEFAULT]"}_terminate(){return this._firestoreClient||NC(this),this._firestoreClient.terminate()}}function x_(t,e){const n=typeof t=="object"?t:$w(),r=typeof t=="string"?t:e||"(default)",i=Vm(n,"firestore").getImmediate({identifier:r});if(!i._initialized){const s=HD("firestore");s&&hB(i,...s)}return i}function nh(t){return t._firestoreClient||NC(t),t._firestoreClient.verifyNotTerminated(),t._firestoreClient}function NC(t){var e,n,r;const i=t._freezeSettings(),s=function(a,u,d,c){return new Gb(a,u,d,c.host,c.ssl,c.experimentalForceLongPolling,c.experimentalAutoDetectLongPolling,bC(c.experimentalLongPollingOptions),c.useFetchStreams)}(t._databaseId,((e=t._app)===null||e===void 0?void 0:e.options.appId)||"",t._persistenceKey,i);t._firestoreClient=new oB(t._authCredentials,t._appCheckCredentials,t._queue,s),((n=i.localCache)===null||n===void 0?void 0:n._offlineComponentProvider)&&((r=i.localCache)===null||r===void 0?void 0:r._onlineComponentProvider)&&(t._firestoreClient._uninitializedComponentsProvider={_offlineKind:i.localCache.kind,_offline:i.localCache._offlineComponentProvider,_online:i.localCache._onlineComponentProvider})}/** 2953 * @license 2954 * Copyright 2020 Google LLC 2955 * 2956 * Licensed under the Apache License, Version 2.0 (the "License");
2957 * you may not use this file except in compliance with the License. 2958 * You may obtain a copy of the License at 2959 * 2960 * http://www.apache.org/licenses/LICENSE-2.0 2961 * 2962 * Unless required by applicable law or agreed to in writing, software 2963 * distributed under the License is distributed on an "AS IS" BASIS, 2964 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2965 * See the License for the specific language governing permissions and 2966 * limitations under the License. 2967 */class Go{constructor(e){this._byteString=e}static fromBase64String(e){try{return new Go(Xt.fromBase64String(e))}catch(n){throw new se(Y.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+n)}}static fromUint8Array(e){return new Go(Xt.fromUint8Array(e))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(e){return this._byteString.isEqual(e._byteString)}}/** 2968 * @license 2969 * Copyright 2020 Google LLC 2970 * 2971 * Licensed under the Apache License, Version 2.0 (the "License"); 2972 * you may not use this file except in compliance with the License. 2973 * You may obtain a copy of the License at 2974 * 2975 * http://www.apache.org/licenses/LICENSE-2.0 2976 * 2977 * Unless required by applicable law or agreed to in writing, software 2978 * distributed under the License is distributed on an "AS IS" BASIS, 2979 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2980 * See the License for the specific language governing permissions and 2981 * limitations under the License. 2982 */class rh{constructor(...e){for(let n=0;n<e.length;++n)if(e[n].length===0)throw new se(Y.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new bt(e)}isEqual(e){return this._internalPath.isEqual(e._internalPath)}}/** 2983 * @license 2984 * Copyright 2020 Google LLC 2985 * 2986 * Licensed under the Apache License, Version 2.0 (the "License"); 2987 * you may not use this file except in compliance with the License. 2988 * You may obtain a copy of the License at 2989 * 2990 * http://www.apache.org/licenses/LICENSE-2.0 2991 * 2992 * Unless required by applicable law or agreed to in writing, software 2993 * distributed under the License is distributed on an "AS IS" BASIS, 2994 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2995 * See the License for the specific language governing permissions and 2996 * limitations under the License. 2997 */class _g{constructor(e){this._methodName=e}}/** 2998 * @license 2999 * Copyright 2017 Google LLC 3000 * 3001 * Licensed under the Apache License, Version 2.0 (the "License"); 3002 * you may not use this file except in compliance with the License. 3003 * You may obtain a copy of the License at 3004 * 3005 * http://www.apache.org/licenses/LICENSE-2.0 3006 * 3007 * Unless required by applicable law or agreed to in writing, software 3008 * distributed under the License is distributed on an "AS IS" BASIS, 3009 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3010 * See the License for the specific language governing permissions and 3011 * limitations under the License. 3012 */class Eg{constructor(e,n){if(!isFinite(e)||e<-90||e>90)throw new se(Y.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(n)||n<-180||n>180)throw new se(Y.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+n);this._lat=e,this._long=n}get latitude(){return this._lat}get longitude(){return this._long}isEqual(e){return this._lat===e._lat&&this._long===e._long}toJSON(){return{latitude:this._lat,longitude:this._long}}_compareTo(e){return De(this._lat,e._lat)||De(this._long,e._long)}}/** 3013 * @license 3014 * Copyright 2017 Google LLC 3015 * 3016 * Licensed under the Apache License, Version 2.0 (the "License"); 3017 * you may not use this file except in compliance with the License. 3018 * You may obtain a copy of the License at 3019 * 3020 * http://www.apache.org/licenses/LICENSE-2.0 3021 * 3022 * Unless required by applicable law or agreed to in writing, software 3023 * distributed under the License is distributed on an "AS IS" BASIS, 3024 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3025 * See the License for the specific language governing permissions and 3026 * limitations under the License. 3027 */const mB=/^__.*__$/;class gB{constructor(e,n,r){this.data=e,this.fieldMask=n,this.fieldTransforms=r}toMutation(e,n){return this.fieldMask!==null?new qi(e,this.data,this.fieldMask,n,this.fieldTransforms):new eu(e,this.data,n,this.fieldTransforms)}}class BC{constructor(e,n,r){this.data=e,this.fieldMask=n,this.fieldTransforms=r}toMutation(e,n){return new qi(e,this.data,this.fieldMask,n,this.fieldTransforms)}}function OC(t){switch(t){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw pe()}}class wg{constructor(e,n,r,i,s,o){this.settings=e,this.databaseId=n,this.serializer
3027=r,this.ignoreUndefinedProperties=i,s===void 0&&this.mu(),this.fieldTransforms=s||[],this.fieldMask=o||[]}get path(){return this.settings.path}get fu(){return this.settings.fu}gu(e){return new wg(Object.assign(Object.assign({},this.settings),e),this.databaseId,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}pu(e){var n;const r=(n=this.path)===null||n===void 0?void 0:n.child(e),i=this.gu({path:r,yu:!1});return i.wu(e),i}Su(e){var n;const r=(n=this.path)===null||n===void 0?void 0:n.child(e),i=this.gu({path:r,yu:!1});return i.mu(),i}bu(e){return this.gu({path:void 0,yu:!0})}Du(e){return dd(e,this.settings.methodName,this.settings.Cu||!1,this.path,this.settings.vu)}contains(e){return this.fieldMask.find(n=>e.isPrefixOf(n))!==void 0||this.fieldTransforms.find(n=>e.isPrefixOf(n.field))!==void 0}mu(){if(this.path)for(let e=0;e<this.path.length;e++)this.wu(this.path.get(e))}wu(e){if(e.length===0)throw this.Du("Document fields must not be empty");if(OC(this.fu)&&mB.test(e))throw this.Du('Document fields cannot begin and end with "__"')}}class yB{constructor(e,n,r){this.databaseId=e,this.ignoreUndefinedProperties=n,this.serializer=r||Yd(e)}Fu(e,n,r,i=!1){return new wg({fu:e,methodName:n,vu:r,path:bt.emptyPath(),yu:!1,Cu:i},this.databaseId,this.serializer,this.ignoreUndefinedProperties)}}function Ag(t){const e=t._freezeSettings(),n=Yd(t._databaseId);return new yB(t._databaseId,!!e.ignoreUndefinedProperties,n)}function LC(t,e,n,r,i,s={}){const o=t.Fu(s.merge||s.mergeFields?2:0,e,n,i);Cg("Data must be an object, but it was:",o,r);const a=MC(r,o);let u,d;if(s.merge)u=new _n(o.fieldMask),d=o.fieldTransforms;else if(s.mergeFields){const c=[];for(const h of s.mergeFields){const p=wp(e,h,n);if(!o.contains(p))throw new se(Y.INVALID_ARGUMENT,`Field '${p}' is specified in your field mask but missing from your input data.`);UC(c,p)||c.push(p)}u=new _n(c),d=o.fieldTransforms.filter(h=>u.covers(h.field))}else u=null,d=o.fieldTransforms;return new gB(new un(a),u,d)}class ih extends _g{_toFieldTransform(e){if(e.fu!==2)throw e.fu===1?e.Du(`${this._methodName}() can only appear at the top level of your update data`):e.Du(`${this._methodName}() cannot be used with set() unless you pass {merge:true}`);return e.fieldMask.push(e.path),null}isEqual(e){return e instanceof ih}}function vB(t,e,n,r){const i=t.Fu(1,e,n);Cg("Data must be an object, but it was:",i,r);const s=[],o=un.empty();Ms(r,(u,d)=>{const c=Tg(e,u,n);d=xt(d);const h=i.Su(c);if(d instanceof ih)s.push(c);else{const p=iu(d,h);p!=null&&(s.push(c),o.set(c,p))}});const a=new _n(s);return new BC(o,a,i.fieldTransforms)}function xB(t,e,n,r,i,s){const o=t.Fu(1,e,n),a=[wp(e,r,n)],u=[i];if(s.length%2!=0)throw new se(Y.INVALID_ARGUMENT,`Function ${e}() needs to be called with an even number of arguments that alternate between field names and values.`);for(let p=0;p<s.length;p+=2)a.push(wp(e,s[p])),u.push(s[p+1]);const d=[],c=un.empty();for(let p=a.length-1;p>=0;--p)if(!UC(d,a[p])){const y=a[p];let v=u[p];v=xt(v);const E=o.Su(y);if(v instanceof ih)d.push(y);else{const I=iu(v,E);I!=null&&(d.push(y),c.set(y,I))}}const h=new _n(d);return new BC(c,h,o.fieldTransforms)}function _B(t,e,n,r=!1){return iu(n,t.Fu(r?4:3,e))}function iu(t,e){if(VC(t=xt(t)))return Cg("Unsupported field value:",e,t),MC(t,e);if(t instanceof _g)return function(r,i){if(!OC(i.fu))throw i.Du(`${r._methodName}() can only be used with update() and set()`);if(!i.path)throw i.Du(`${r._methodName}() is not currently supported inside arrays`);const s=r._toFieldTransform(i);s&&i.fieldTransforms.push(s)}(t,e),null;if(t===void 0&&e.ignoreUndefinedProperties)return null;if(e.path&&e.fieldMask.push(e.path),t instanceof Array){if(e.settings.yu&&e.fu!==4)throw e.Du("Nested arrays are not supported");return function(r,i){const s=[];let o=0;for(const a of r){let u=iu(a,i.bu(o));u==null&&(u={nullValue:"NULL_VALUE"}),s.push(u),o++}return{arrayValue:{values:s}}}(t,e)}return function(r,i){if((r=xt(r))===null)return{nullValue:"NULL_VALUE"};if(typeof r=="number")return pF(i.serializer,r);if(typeof r=="boolean")return{booleanValue:r};if(typeof r=="string")return{stringValue:r};if(r instanceof Date){const s=vt.fromDate(r);return{timestampValue:ud(i.serializer,s)}}if(r instanceof vt){const s=new vt(r.seconds,1e3*Math.floor(r.nanoseconds/1e3));return{timestampValue:ud(i.serializer,s)}}if(r instanceof Eg)return{geoPointValue:{latitude:r.latitude,longitude:r.longitude}};if(r instanceof Go)return{bytesValue:nC(i.serializer,r._byteString)};if(r instanceof wn){const s=i.databaseId,o=r.firestore._databaseId;if(!o.isEqual(s))throw i.Du(`Document reference is for database ${o.projectId}/${o.database} but should be for database ${s.projectId}/${s.database}`);return{referenceValue:lg(r.firestore._databaseId||i.databaseId,r._key.path)}}throw i.Du(`Unsupported field value: ${eh(r)}`)}(t,e)}function MC(t,e){const n={};return kA(t)?e.path&&e.path.length>0&&e.fieldMask.push(e.path):Ms(t,(r,i)=>{const s=iu(i,e.pu(r));s!=null&&(n[r]=s)}),{mapValue:{fields:n}}}function VC(t){return!(typeof t!="object"||t===null||t instanceof Array||t instanceof Date||t instanceof vt||t instanceof Eg||t instanceof Go||t instanceof wn||t instanceof _g)}function Cg(t,e,n){if(!VC(n)||!function(i){return typeof i=="object"&&i!==null&&(Object.getPrototypeOf(i)===Object.prototype||Ob
3027ject.getPrototypeOf(i)===null)}(n)){const r=eh(n);throw r==="an object"?e.Du(t+" a custom object"):e.Du(t+" "+r)}}function wp(t,e,n){if((e=xt(e))instanceof rh)return e._internalPath;if(typeof e=="string")return Tg(t,e);throw dd("Field path arguments must be of type string or ",t,!1,void 0,n)}const EB=new RegExp("[~\\*/\\[\\]]");function Tg(t,e,n){if(e.search(EB)>=0)throw dd(`Invalid field path (${e}). Paths must not contain '~', '*', '/', '[', or ']'`,t,!1,void 0,n);try{return new rh(...e.split("."))._internalPath}catch{throw dd(`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,t,!1,void 0,n)}}function dd(t,e,n,r,i){const s=r&&!r.isEmpty(),o=i!==void 0;let a=`Function ${e}() called with invalid data`;n&&(a+=" (via `toFirestore()`)"),a+=". ";let u="";return(s||o)&&(u+=" (found",s&&(u+=` in field ${r}`),o&&(u+=` in document ${i}`),u+=")"),new se(Y.INVALID_ARGUMENT,a+t+u)}function UC(t,e){return t.some(n=>n.isEqual(e))}/** 3028 * @license 3029 * Copyright 2020 Google LLC 3030 * 3031 * Licensed under the Apache License, Version 2.0 (the "License"); 3032 * you may not use this file except in compliance with the License. 3033 * You may obtain a copy of the License at 3034 * 3035 * http://www.apache.org/licenses/LICENSE-2.0 3036 * 3037 * Unless required by applicable law or agreed to in writing, software 3038 * distributed under the License is distributed on an "AS IS" BASIS, 3039 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3040 * See the License for the specific language governing permissions and 3041 * limitations under the License. 3042 */class $C{constructor(e,n,r,i,s){this._firestore=e,this._userDataWriter=n,this._key=r,this._document=i,this._converter=s}get id(){return this._key.path.lastSegment()}get ref(){return new wn(this._firestore,this._converter,this._key)}exists(){return this._document!==null}data(){if(this._document){if(this._converter){const e=new wB(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}}get(e){if(this._document){const n=this._document.data.field(Ig("DocumentSnapshot.get",e));if(n!==null)return this._userDataWriter.convertValue(n)}}}class wB extends $C{data(){return super.data()}}function Ig(t,e){return typeof e=="string"?Tg(t,e):e instanceof rh?e._internalPath:e._delegate._internalPath}/** 3043 * @license 3044 * Copyright 2020 Google LLC 3045 * 3046 * Licensed under the Apache License, Version 2.0 (the "License"); 3047 * you may not use this file except in compliance with the License. 3048 * You may obtain a copy of the License at 3049 * 3050 * http://www.apache.org/licenses/LICENSE-2.0 3051 * 3052 * Unless required by applicable law or agreed to in writing, software 3053 * distributed under the License is distributed on an "AS IS" BASIS, 3054 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3055 * See the License for the specific language governing permissions and 3056 * limitations under the License. 3057 */function zC(t){if(t.limitType==="L"&&t.explicitOrderBy.length===0)throw new se(Y.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}class Sg{}class AB extends Sg{}function O5(t,e,...n){let r=[];e instanceof Sg&&r.push(e),r=r.concat(n),function(s){const o=s.filter(u=>u instanceof Rg).length,a=s.filter(u=>u instanceof sh).length;if(o>1||o>0&&a>0)throw new se(Y.INVALID_ARGUMENT,"InvalidQuery. When using composite filters, you cannot use more than one filter at the top level. Consider nesting the multiple filters within an `and(...)` statement. For example: change `query(query, where(...), or(...))` to `query(query, and(where(...), or(...)))`.")}(r);for(const i of r)t=i._apply(t);return t}class sh extends AB{constructor(e,n,r){super(),this._field=e,this._op=n,this._value=r,this.type="where"}static _create(e,n,r){return new sh(e,n,r)}_apply(e){const n=this._parse(e);return jC(e._query,n),new Us(e.firestore,e.converter,hp(e._query,n))}_parse(e){const n=Ag(e.firestore);return function(s,o,a,u,d,c,h){let p;if(d.isKeyField()){if(c==="array-contains"||c==="array-contains-any")throw new se(Y.INVA
3057LID_ARGUMENT,`Invalid Query. You can't perform '${c}' queries on documentId().`);if(c==="in"||c==="not-in"){E_(h,c);const y=[];for(const v of h)y.push(__(u,s,v));p={arrayValue:{values:y}}}else p=__(u,s,h)}else c!=="in"&&c!=="not-in"&&c!=="array-contains-any"||E_(h,c),p=_B(a,o,h,c==="in"||c==="not-in");return at.create(d,c,p)}(e._query,"where",n,e.firestore._databaseId,this._field,this._op,this._value)}}function L5(t,e,n){const r=e,i=Ig("where",t);return sh._create(i,r,n)}class Rg extends Sg{constructor(e,n){super(),this.type=e,this._queryConstraints=n}static _create(e,n){return new Rg(e,n)}_parse(e){const n=this._queryConstraints.map(r=>r._parse(e)).filter(r=>r.getFilters().length>0);return n.length===1?n[0]:tr.create(n,this._getOperator())}_apply(e){const n=this._parse(e);return n.getFilters().length===0?e:(function(i,s){let o=i;const a=s.getFlattenedFilters();for(const u of a)jC(o,u),o=hp(o,u)}(e._query,n),new Us(e.firestore,e.converter,hp(e._query,n)))}_getQueryConstraints(){return this._queryConstraints}_getOperator(){return this.type==="and"?"and":"or"}}function __(t,e,n){if(typeof(n=xt(n))=="string"){if(n==="")throw new se(Y.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");if(!VA(e)&&n.indexOf("/")!==-1)throw new se(Y.INVALID_ARGUMENT,`Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '${n}' contains a '/' character.`);const r=e.path.child(je.fromString(n));if(!ce.isDocumentKey(r))throw new se(Y.INVALID_ARGUMENT,`Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '${r}' is not because it has an odd number of segments (${r.length}).`);return $x(t,new ce(r))}if(n instanceof wn)return $x(t,n._key);throw new se(Y.INVALID_ARGUMENT,`Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${eh(n)}.`)}function E_(t,e){if(!Array.isArray(t)||t.length===0)throw new se(Y.INVALID_ARGUMENT,`Invalid Query. A non-empty array is required for '${e.toString()}' filters.`)}function jC(t,e){const n=function(i,s){for(const o of i)for(const a of o.getFlattenedFilters())if(s.indexOf(a.op)>=0)return a.op;return null}(t.filters,function(i){switch(i){case"!=":return["!=","not-in"];case"array-contains-any":case"in":return["not-in"];case"not-in":return["array-contains-any","in","not-in","!="];default:return[]}}(e.op));if(n!==null)throw n===e.op?new se(Y.INVALID_ARGUMENT,`Invalid query. You cannot use more than one '${e.op.toString()}' filter.`):new se(Y.INVALID_ARGUMENT,`Invalid query. You cannot use '${e.op.toString()}' filters with '${n.toString()}' filters.`)}class CB{convertValue(e,n="none"){switch(Ds(e)){case 0:return null;case 1:return e.booleanValue;case 2:return st(e.integerValue||e.doubleValue);case 3:return this.convertTimestamp(e.timestampValue);case 4:return this.convertServerTimestamp(e,n);case 5:return e.stringValue;case 6:return this.convertBytes(ks(e.bytesValue));case 7:return this.convertReference(e.referenceValue);case 8:return this.convertGeoPoint(e.geoPointValue);case 9:return this.convertArray(e.arrayValue,n);case 10:return this.convertObject(e.mapValue,n);default:throw pe()}}convertObject(e,n){return this.convertObjectMap(e.fields,n)}convertObjectMap(e,n="none"){const r={};return Ms(e,(i,s)=>{r[i]=this.convertValue(s,n)}),r}convertGeoPoint(e){return new Eg(st(e.latitude),st(e.longitude))}convertArray(e,n){return(e.values||[]).map(r=>this.convertValue(r,n))}convertServerTimestamp(e,n){switch(n){case"previous":const r=eg(e);return r==null?null:this.convertValue(r,n);case"estimate":return this.convertTimestamp(Fl(e));default:return null}}convertTimestamp(e){const n=Mi(e);return new vt(n.seconds,n.nanos)}convertDocumentKey(e,n){const r=je.fromString(e);Ve(lC(r));const i=new Nl(r.get(1),r.get(3)),s=new ce(r.popFirst(5));return i.isEqual(n)||jr(`Document ${s} contains a document reference within a different database (${i.projectId}/${i.database}) which is not supported. It will be treated as a reference in the current database (${n.projectId}/${n.database}) instead.`),s}}/** 3058 * @license 3059 * Copyright 2020 Google LLC 3060 * 3061 * Licensed under the Apache License, Version 2.0 (the "License");
3062 * you may not use this file except in compliance with the License. 3063 * You may obtain a copy of the License at 3064 * 3065 * http://www.apache.org/licenses/LICENSE-2.0 3066 * 3067 * Unless required by applicable law or agreed to in writing, software 3068 * distributed under the License is distributed on an "AS IS" BASIS, 3069 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3070 * See the License for the specific language governing permissions and 3071 * limitations under the License. 3072 */function HC(t,e,n){let r;return r=t?n&&(n.merge||n.mergeFields)?t.toFirestore(e,n):t.toFirestore(e):e,r}/** 3073 * @license 3074 * Copyright 2020 Google LLC 3075 * 3076 * Licensed under the Apache License, Version 2.0 (the "License"); 3077 * you may not use this file except in compliance with the License. 3078 * You may obtain a copy of the License at 3079 * 3080 * http://www.apache.org/licenses/LICENSE-2.0 3081 * 3082 * Unless required by applicable law or agreed to in writing, software 3083 * distributed under the License is distributed on an "AS IS" BASIS, 3084 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3085 * See the License for the specific language governing permissions and 3086 * limitations under the License. 3087 */class Ga{constructor(e,n){this.hasPendingWrites=e,this.fromCache=n}isEqual(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}class qC extends $C{constructor(e,n,r,i,s,o){super(e,n,r,i,o),this._firestore=e,this._firestoreImpl=e,this.metadata=s}exists(){return super.exists()}data(e={}){if(this._document){if(this._converter){const n=new wc(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(n,e)}return this._userDataWriter.convertValue(this._document.data.value,e.serverTimestamps)}}get(e,n={}){if(this._document){const r=this._document.data.field(Ig("DocumentSnapshot.get",e));if(r!==null)return this._userDataWriter.convertValue(r,n.serverTimestamps)}}}class wc extends qC{data(e={}){return super.data(e)}}class WC{constructor(e,n,r,i){this._firestore=e,this._userDataWriter=n,this._snapshot=i,this.metadata=new Ga(i.hasPendingWrites,i.fromCache),this.query=r}get docs(){const e=[];return this.forEach(n=>e.push(n)),e}get size(){return this._snapshot.docs.size}get empty(){return this.size===0}forEach(e,n){this._snapshot.docs.forEach(r=>{e.call(n,new wc(this._firestore,this._userDataWriter,r.key,r,new Ga(this._snapshot.mutatedKeys.has(r.key),this._snapshot.fromCache),this.query.converter))})}docChanges(e={}){const n=!!e.includeMetadataChanges;if(n&&this._snapshot.excludesMetadataChanges)throw new se(Y.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===n||(this._cachedChanges=function(i,s){if(i._snapshot.oldDocs.isEmpty()){let o=0;return i._snapshot.docChanges.map(a=>{const u=new wc(i._firestore,i._userDataWriter,a.doc.key,a.doc,new Ga(i._snapshot.mutatedKeys.has(a.doc.key),i._snapshot.fromCache),i.query.converter);return a.doc,{type:"added",doc:u,oldIndex:-1,newIndex:o++}})}{let o=i._snapshot.oldDocs;return i._snapshot.docChanges.filter(a=>s||a.type!==3).map(a=>{const u=new wc(i._firestore,i._userDataWriter,a.doc.key,a.doc,new Ga(i._snapshot.mutatedKeys.has(a.doc.key),i._snapshot.fromCache),i.query.converter);let d=-1,c=-1;return a.type!==0&&(d=o.indexOf(a.doc.key),o=o.delete(a.doc.key)),a.type!==1&&(o=o.add(a.doc),c=o.indexOf(a.doc.key)),{type:TB(a.type),doc:u,oldIndex:d,newIndex:c}})}}(this,n),this._cachedChangesIncludeMetadataChanges=n),this._cachedChanges}}function TB(t){switch(t){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return pe()}}class Pg extends CB{constructor(e){super(),this.firestore=e}convertBytes(e){return new Go(e)}convertReference(e){const n=this.convertDocumentKey(e,this.firestore._databaseId);return new wn(this.firestore,null,n)}}function M5(t){t=Fi(t,Us);const e=Fi(t.firestore,Wo),n=nh(e),r=new Pg(e);return zC(t._query),cB(n,t._query).then(i=>new WC(e,r,t,i))}function V5(t,e){const n=Fi(t.firestore,Wo),r=fB(t),i=HC(t.converter,e);return GC(n,[LC(Ag(t.firestore),"addDoc",r._key,i,t.converter!==null,{}).toMutation(r._key,Bn.exists(!1))]).then(()=>r)}function U5(t,...e){var n,r,i;t=xt(t);let s={includeMetadataChanges:!1,source:"default"},o=0;typeof e[o]!="object"||v_(e[o])||(s=e[o],o++);const a={includeMetadataChanges:s.includeMetadataChanges,source:s.source};if(v_(e[o])){const h=e[o];e[o]=(n=h.next)===null||n===void 0?void 0:n.bind(h),e[o+1]=(r=h.error)===null||r===void 0?void 0:r.bind(h),e[o+2]=(i=h.complete)===null||i===void 0?void 0:i.bind(h)}let u,d,c;if(t instanceof wn)d=Fi(t.firestore,Wo),c=ig(t._key.path),u={next:h=>{e[o]&&e[o](IB(d,t,h))},error:e[o+1],complete:e[o+2]};else{const h=Fi(t,Us);d=Fi(h.firestore,Wo),c=h._query;const p=new Pg(d);u={next:y=>{e[o]&&e[o](new WC(d,p,h,y))},error:e[o+1],complete:e[o+2]},zC(t._query)}return function(p,y,v,E){const I=new kC(E),A=new EC(y,I,v);return p.asyncQueue.enqueueAndForget(async()=>xC(await Ep(p),A)),()=>{I.$a(),p.asyncQueue.enqueueAndForget(async()=>_C(await Ep(p),A))}}(nh(d),c,a,u)}function GC(t,e){return function(r,i){const s=new bi;return r.asyncQueue.enqueueAndForget(async()=>YN(await uB(r),i,s)),s.promise}(nh(t),e)}function IB(t,e,n){const r=n.docs.get(e._key),i=new Pg(t);return new qC(t,i,e._key,r,new Ga(n.hasPendingWrites,n.fromCache),e.converter)}/** 3088 * @license 3089 * Copyright 2020 Google LLC 3090 * 3091 * Licensed under the Apache License, Version 2.0 (the "License");
3092 * you may not use this file except in compliance with the License. 3093 * You may obtain a copy of the License at 3094 * 3095 * http://www.apache.org/licenses/LICENSE-2.0 3096 * 3097 * Unless required by applicable law or agreed to in writing, software 3098 * distributed under the License is distributed on an "AS IS" BASIS, 3099 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3100 * See the License for the specific language governing permissions and 3101 * limitations under the License. 3102 */class SB{constructor(e,n){this._firestore=e,this._commitHandler=n,this._mutations=[],this._committed=!1,this._dataReader=Ag(e)}set(e,n,r){this._verifyNotCommitted();const i=U0(e,this._firestore),s=HC(i.converter,n,r),o=LC(this._dataReader,"WriteBatch.set",i._key,s,i.converter!==null,r);return this._mutations.push(o.toMutation(i._key,Bn.none())),this}update(e,n,r,...i){this._verifyNotCommitted();const s=U0(e,this._firestore);let o;return o=typeof(n=xt(n))=="string"||n instanceof rh?xB(this._dataReader,"WriteBatch.update",s._key,n,r,i):vB(this._dataReader,"WriteBatch.update",s._key,n),this._mutations.push(o.toMutation(s._key,Bn.exists(!0))),this}delete(e){this._verifyNotCommitted();const n=U0(e,this._firestore);return this._mutations=this._mutations.concat(new sg(n._key,Bn.none())),this}commit(){return this._verifyNotCommitted(),this._committed=!0,this._mutations.length>0?this._commitHandler(this._mutations):Promise.resolve()}_verifyNotCommitted(){if(this._committed)throw new se(Y.FAILED_PRECONDITION,"A write batch can no longer be used after commit() has been called.")}}function U0(t,e){if((t=xt(t)).firestore!==e)throw new se(Y.INVALID_ARGUMENT,"Provided document reference is from a different Firestore instance.");return t}/** 3103 * @license 3104 * Copyright 2020 Google LLC 3105 * 3106 * Licensed under the Apache License, Version 2.0 (the "License"); 3107 * you may not use this file except in compliance with the License. 3108 * You may obtain a copy of the License at 3109 * 3110 * http://www.apache.org/licenses/LICENSE-2.0 3111 * 3112 * Unless required by applicable law or agreed to in writing, software 3113 * distributed under the License is distributed on an "AS IS" BASIS, 3114 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3115 * See the License for the specific language governing permissions and 3116 * limitations under the License. 3117 */function $5(t){return nh(t=Fi(t,Wo)),new SB(t,e=>GC(t,e))}(function(e,n=!0){(function(i){ra=i})(ta),Mo(new Is("firestore",(r,{instanceIdentifier:i,options:s})=>{const o=r.getProvider("app").getImmediate(),a=new Wo(new bb(r.getProvider("auth-internal")),new Ob(r.getProvider("app-check-internal")),function(d,c){if(!Object.prototype.hasOwnProperty.apply(d.options,["projectId"]))throw new se(Y.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new Nl(d.options.projectId,c)}(o,i),o);return s=Object.assign({useFetchStreams:n},s),a._setSettings(s),a},"PUBLIC").setMultipleInstances(!0)),ki(Lx,"4.6.3",e),ki(Lx,"4.6.3","esm2017")})();let $0,Zs,Xu;const RB=async t=>{try{$0=Uw(t),Zs=Rb();const e=new kr;e.setCustomParameters({prompt:"select_account"});const n=()=>L3(Zs,e),r=async()=>{try{return await f3(Zs,"[email protected]","Qwerty@321"),!0}catch{return!1}};return new Promise((i,s)=>{g3(Zs,async o=>{o?(Xu=x_($0),i({auth:Zs,signInWithGooglePopup:n,db:Xu})):await r()?(Xu=x_($0),i({auth:Zs,signInWithGooglePopup:n,db:Xu})):s("User not authenticated and auto-login failed.")})})}catch(e){throw console.error("Error initializing Firebase"),e}},PB=async()=>{const t=new URLSearchParams(window.location.search),e=[];["utm_source","utm_medium","utm_campaign","utm_term","utm_content"].forEach(r=>{const i=t.get(r);if(i){let s={utmkey:r,utmvalue:i};e.push(s)}}),localStorage.setItem("utms",JSON.stringify(e))},KC=O.exports.createContext(),z5=({children:t})=>{const[e,n]=O.exports.useState(!1);return O.exports.useEffect(()=>{const r=()=>{n(window.innerWidth<=1280)};return r(),window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r)}},[]),ge(KC.Provider,{value:{isMobile:e},children:t})},kB=()=>{const t=O.exports.useContext(KC);if(!t)throw new Error("useMobileLayout must be used within a MobileLayoutProvider");return t},DB=async(t=null)=>{var o,a;if(!t){const u=te.getItem("user");t=u?typeof u=="string"?JSON.parse(u):u:null}if(!t)return console.warn("No user data available to create address"),null;const e=t.firstName||"",n=t["patients.lastName"]||"",i={fullName:`${e} ${n}`.trim(),firstName:e,lastName:n,address:t["patients.address"]||"",addressLine1:t["patients.address"]||"",postcode:t["patients.postCode"]||((o=t.userDetails)==null?void 0:o.postCode)||"",postCode:t["patients.postCode"]||((a=t.userDetails)==null?void 0:a.postCode)||"",city:t["patients.city"]||"",state:t["patients.province"]||"",country:t.countryCode||"gb",countryCode:t.countryCode||"gb",province:t["patients.province"]||"",mobileNumber:t.mobile||t.phone||"",phone:t.mobile||t.phone||"",addressType:"home",home:!0,work:!1,customerId:t.id||null,isBillingAddress:!0,isShippingAddress:!0,isDeleted:!1};if(!(i.firstName&&i.lastName&&i.addressLine1&&i.city&&i.postCode&&i.phone&&i.customerId))return console.warn("Incomplete address data from profile. Address not saved to backend."),null;try{return await Iw(i)}catch(u){return console.error("Failed to add address from profile:",u),null}};function bB(t){if(!t)return!1;let e=t.trim();/^www\./i.test(e)&&!/^https?:\/\//i.test(e)&&(e="https://"+e);try{const n=new URL(e);return!(n.origin===window.location.origin||n.hostname.split(".").filter(
3117Boolean).map(i=>i.toLowerCase()).some(i=>["shop","app","admin"].includes(i)))}catch{return!1}}function FB(){const t=lt.getItem("isRestrictedUser")==="true",e=lt.getItem("restrictedGroupId"),n=lt.getItem("restrictedPharmacyId");return{isRestrictedUser:t,groupId:e?parseInt(e):null,pharmacyId:n?parseInt(n):null}}function NB({groupId:t,pharmacyId:e}){t&<.setItem("restrictedGroupId",t),e&<.setItem("restrictedPharmacyId",e),lt.setItem("isRestrictedUser",!0)}function BB(t){if(lt.getItem("redirectedFrom"))return;const n=t||document.referrer||null;bB(n)&<.setItem("redirectedFrom",n)}function j5(){lt.removeItem("isRestrictedUser"),lt.removeItem("restrictedGroupId"),lt.removeItem("restrictedPharmacyId"),lt.removeItem("redirectedFrom")}let w_=null;const OB=t=>{if(typeof window>"u"||typeof document>"u"||!t||(window._uxa=window._uxa||[],window._uxa.push(["setPath",window.location.pathname+window.location.search+window.location.hash.replace("#","?__")]),w_===t))return;w_=t;const e=document.getElementById("contentsquare-script");e&&e.remove();const n=document.createElement("script");n.id="contentsquare-script",n.type="text/javascript",n.async=!0,n.src=`https://t.contentsquare.net/uxa/${t}.js`,document.head.appendChild(n)},LB=t=>{typeof window>"u"||(window._uxa=window._uxa||[],window._uxa.push(["trackPageview",t||window.location.pathname+window.location.search+window.location.hash.replace("#","?__")]))},MB=(t,e={})=>{!t||typeof window>"u"||(window._uxa=window._uxa||[],window._uxa.push(["trackEvent",{name:t,properties:e}]))};let A_=null;const VB=t=>{if(typeof window>"u"||typeof document>"u"||!t||A_===t)return;A_=t;const e=document.getElementById("meta-pixel-script");e&&e.remove(),function(i,s,o,a,u,d,c){i.fbq||(u=i.fbq=function(){u.callMethod?u.callMethod.apply(u,arguments):u.queue.push(arguments)},i._fbq||(i._fbq=u),u.push=u,u.loaded=!0,u.version="2.0",u.queue=[],d=s.createElement(o),d.id="meta-pixel-script",d.async=!0,d.src=a,c=s.getElementsByTagName(o)[0],c.parentNode.insertBefore(d,c))}(window,document,"script","https://connect.facebook.net/en_US/fbevents.js"),window.fbq("init",t),window.fbq("track","PageView");const n=`https://www.facebook.com/tr?id=${t}&ev=PageView&noscript=1`,r=document.getElementById("meta-pixel-noscript");
3117if(r){const i=r.querySelector("img");if(i)i.src=n;else{const s=document.createElement("img");s.height="1",s.width="1",s.style.display="none",s.src=n,r.appendChild(s)}}else{const i=document.createElement("noscript");i.id="meta-pixel-noscript";const s=document.createElement("img");s.height="1",s.width="1",s.style.display="none",s.src=n,i.appendChild(s),document.body.insertBefore(i,document.body.firstChild)}},UB=()=>{typeof window.fbq=="function"&&window.fbq("track","PageView")},$B=(t,e={})=>{!t||typeof window.fbq!="function"||window.fbq("track",t,e)};let C_=null;const zB=t=>{if(typeof window>"u"||typeof document>"u"||!t||C_===t)return;C_=t,window.dataLayer=window.dataLayer||[],window.dataLayer.push({"gtm.start":new Date().getTime(),event:"gtm.js"});const e=document.getElementById("gtm-script");e&&e.remove();const n=document.createElement("script");n.id="gtm-script",n.async=!0,n.src=`https://www.googletagmanager.com/gtm.js?id=${t}`,document.head.appendChild(n);const r=document.getElementById("gtm-noscript"),i=`https://www.googletagmanager.com/ns.html?id=${t}`;if(r){const s=r.querySelector("iframe");if(s)s.src=i;else{const o=document.createElement("iframe");o.src=i,o.height="0",o.width="0",o.style.display="none",o.style.visibility="hidden",r.appendChild(o)}}else{const s=document.createElement("noscript");s.id="gtm-noscript";const o=document.createElement("iframe");o.src=i,o.height="0",o.width="0",o.style.display="none",o.style.visibility="hidden",s.appendChild(o),document.body.insertBefore(s,document.body.firstChild)}},QC=t=>{!t||typeof t!="object"||(window.dataLayer=window.dataLayer||[],window.dataLayer.push(t))},H5=t=>{!t||(QC({event:"page_view",page_path:t}),LB(t),UB())},jB=(t,e={})=>{!t||(QC({event:t,...e}),MB(t),$B(t,e))},XC=O.exports.createContext({signInToken:null,user:null,cart:{},wishList:{},setCart:()=>{},setOrder:()=>{},setWishlist:()=>{},setShowConsentAlert:()=>{},countries:[],auth:null,signInWithGooglePopup:null,db:null}),HB=()=>{const t=localStorage.getItem("utms");if(!t)return;let e;try{e=JSON.parse(t)}catch{return}if(!Array.isArray(e))return;const n={};e.forEach(({utmkey:r,utmvalue:i})=>{n[r]=i}),Jf.set(n)};function q5({children:t}){const e=Dd(),{isMobile:n}=kB(),[r,i]=O.exports.useState(null),[s,o]=O.exports.useState(null),[a,u]=O.exports.useState(null),[d,c]=O.exports.useState(!1),[h,p]=O.exports.useState(!1),[y,v]=O.exports.useState(!0),{createPaymentSession:E,getPharmacyDetails:I,getSignInToken:A,getGaKey:m,getPromotions:x,gettcpp:R,validateMagicLink:F,logout:b,getCustomerCart:C,getGuestUser:_,addLineItem:T,updateCart:w,getAllAddresses:S}=OD(),[D,P]=O.exports.useState(()=>te.getItem("signInToken")||null),[N,B]=O.exports.useState(null),[U,W]=O.exports.useState(!1);O.exports.useEffect(()=>{const re=te.getItem("user");re&&B(re),W(!0)},[]);const[L,G]=O.exports.useState(null),[X,V]=O.exports.useState({}),[$,H]=O.exports.useState({products:[]}),[K,ye]=O.exports.useState(null),[he,_e]=O.exports.useState(null),[ue,_t]=O.exports.useState(null),ct=[{value:"gb",name:"United Kingdom",phone:"+44"}],Et=/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$/,wt=/^(([A-Za-z_ ]+[\-\'\â]?)*([A-Za-z_ ]+)?\s)*([A-Za-z_ ]+[\-\'\â]?)*([A-Za-z_ ]+)?$/,me=/^([A-Za-z][A-Ha-hJ-Yj-y]?[0-9][A-Za-z0-9]? ?[0-9][A-Za-z]{2}|[Gg][Ii][Rr] ?0[Aa]{2})$/,Je=/^(\+?44)?7\d{9}$|^(\+?44)?1\d{9}$|^(\+?44)?2\d{9}$|^(\+?44)?3\d{9}$|^07\d{9}$|^01\d{9}$|^02\d{9}$|^03\d{9}$/,In=re=>Et.test(re),Sn=re=>wt.test(re),Un=re=>me.test(re),$n=re=>Je.test(re),nr=(re,le=3,oe=150)=>(re==null?void 0:re.length)>=le&&(re==null?void 0:re.length)<=oe,Rn=(re,le=3,oe=150)=>(re==null?void 0:re.length)>=le&&(re==null?void 0:re.length)<=oe,dt=(re,le=10,oe=15)=>(re==null?void 0:re.length)>=le&&(re==null?void 0:re.length)<=oe,ht=(re,le=8,oe=64)=>(re==null?void 0:re.length)>=le&&(re==null?void 0:re.length)<=oe,Pn=(re=>getComputedStyle(document.documentElement).getPropertyValue(re))("--primary-color"),[Ee,ft]=O.exports.useState(""),[Fe,pt]=O.exports.useState(null),[wr,Wi]=O.exports.useState(null),[pn,Ar]=O.exports.useState(null),[Cr,Gi]=O.exports.useState(null),[Ki,Qi]=O.exports.useState(!1),[la,$s]=O.exports.useState(null),[Xi,Yi]=O.exports.useState(null),[zs,rr]=O.exports.useState(null),[Tr,Kr]=O.exports.useState(!0),[zn,ir]=O.exports.useState(null),[Ir,js]=O.exports.useState(null),[rn,Ji]=O.exports.useState(null),[Oe,mt]=O.exports.useState(void 0),[Lt,sr]=O.exports.useState("Shop"),[ua,uh]=O.exports.useState(null),[Qr,ch]=O.exports.useState(null),{search:Hs}=Zo(),Xr=O.exports.useRef(!1),Yr=(re,le)=>{const oe=new URLSearchParams(le);for(const[ee,nt]of oe.entries())if(ee.toLowerCase()===re.toLowerCase())return nt;return null},mn=Yr("pharmacy",Hs),sn=Yr("groupid",Hs);let on=Yr("redirectedfrom",Hs);if(on)try{on=decodeURIComponent(on)}catch{}const or=Yr("type",Hs),ca=O.exports.useRef(void 0),qs=O.exports.useRef(void 0),Zi=(or==null?void 0:or.toLowerCase())=="externallink"||(or==null?void 0:or.toLowerCase())=="redirection";O.exports.useEffect(()=>{ca.current!==mn&&(ca.current=mn,Ji(mn&&Zi?mn:null))},[mn]),O.exports.useEffect(()=>{if(!Boolean(mn||sn)||!Zi)return;const le=FB();(!le.isRestrictedUser||le.groupId!==sn||le.pharmacyId!==mn)&&NB({groupId:sn,pharmacyId:mn})},[mn,sn,or]),O.exports.useEffect(()=>{BB(on)},[on]),O.exports.useEffect(()=>{qs.current!==sn&&(qs.current=sn,mt(sn&&Zi?sn:null))},[sn]),O.exports.useEffect(()=>
3117{const re=async oe=>{const{auth:ee,signInWithGooglePopup:nt,db:Ze}=await RB(oe);i(ee),o(()=>nt),u(Ze)},le=async()=>{var ur,hu,Jr,Hn,ma,ga,ya,Sr,fu,pu,mu,qn,gu,yu,Zr,ns,va,ei,ti,xa,Qs,$e,vu,xu,_a,Ea,wa,rs;await PB(),A();const oe=await fetch("https://api.ipify.org?format=json");(oe==null?void 0:oe.status)==200&&$s(await(oe==null?void 0:oe.json()));const ee=await m();ee!=null&&ee.copyrightYear&&Gi(ee.copyrightYear),ee.title&&Ar(ee.title),typeof ee.enableNhsLogin=="boolean"&&ch(ee.enableNhsLogin),(hu=(ur=ee==null?void 0:ee.configs)==null?void 0:ur.authView)!=null&&hu.guestEnabled&&Kr(!((Hn=(Jr=ee==null?void 0:ee.configs)==null?void 0:Jr.authView)!=null&&Hn.guestEnabled)),(ma=ee==null?void 0:ee.configs)!=null&&ma.authView&&"multiFactorAuth"in ee.configs.authView&&v(ee.configs.authView.multiFactorAuth),(ya=(ga=ee==null?void 0:ee.configs)==null?void 0:ga.authView)!=null&&ya.homePharmacy&&js((fu=(Sr=ee==null?void 0:ee.configs)==null?void 0:Sr.authView)==null?void 0:fu.homePharmacy),(pu=ee==null?void 0:ee.configs)!=null&&pu.storeLinks&&uh((mu=ee==null?void 0:ee.configs)==null?void 0:mu.storeLinks),ee!=null&&ee.gaKey&&(Jf.initialize(ee.gaKey),HB());const nt=(gu=(qn=ee==null?void 0:ee.configs)==null?void 0:qn.analytics)==null?void 0:gu.gtmId;nt&&zB(nt);const Ze=(Zr=(yu=ee==null?void 0:ee.configs)==null?void 0:yu.analytics)==null?void 0:Zr.metaPixelId;Ze&&VB(Ze);const Ne=(va=(ns=ee==null?void 0:ee.configs)==null?void 0:ns.analytics)==null?void 0:va.hotjarId;Ne&&OB(Ne),(ei=ee==null?void 0:ee.configs)!=null&&ei.firebaseConfig&&re((ti=ee.configs)==null?void 0:ti.firebaseConfig),(ee==null?void 0:ee.privacyPolicyLink)&&(ee==null?void 0:ee.termsLink)&&pt({termsAndCondition:ee==null?void 0:ee.termsLink,privacyPolicy:ee==null?void 0:ee.privacyPolicyLink});const et=new URLSearchParams(location.search);et.get("r");const Mt=te.getItem("user"),Ge=Mt==null?void 0:Mt["userroles.role.roleName"],de=(Qs=(xa=ee==null?void 0:ee.configs)==null?void 0:xa.authView)==null?void 0:Qs.guestEnabled,Ue=["/appointments/viewallappointments","orders/store","orders/prescriptions","orders/details","/user","/notifications","/wishlist","/dependents","/addresses"],Yt=["/resetpassword","/backtomobile"],Vt=["/login","/register","/forgotpassword","/emailsentconfirmation","/resetpassword"],gn=Ge==="G
3117UEST",jn=Ue.some(an=>location.pathname.startsWith(an)),lr=Yt.some(an=>location.pathname.startsWith(an)),ts=Vt.some(an=>location.pathname.startsWith(an));if(et.has("r")){Qi(!0);const an=et.get("r"),Le=et.get("n"),qe=await F(Le,an);if(($e=qe==null?void 0:qe.data)!=null&&$e.enableOtpScreen)e(`/login?r=${an}&n=${Le}`,{state:{type:"otpSent",data:qe==null?void 0:qe.data.data}}),te.setItem("redirectionData",JSON.stringify(qe==null?void 0:qe.data));else{const ni=new URLSearchParams;switch((vu=qe==null?void 0:qe.data)==null?void 0:vu.linkType){case"RESCHEDULE_APPOINTMENT":ni.set("type","reschedule"),ni.set("bookingid",encodeURIComponent(btoa((_a=(xu=qe==null?void 0:qe.data)==null?void 0:xu.data)==null?void 0:_a.bookingId.toString()))),e(`/appointments/book?${ni.toString()}`);break;case"CANCELLED_APPOINTMENT":ni.set("type","rebook"),ni.set("bookingid",encodeURIComponent(btoa((wa=(Ea=qe==null?void 0:qe.data)==null?void 0:Ea.data)==null?void 0:wa.bookingId.toString()))),e(`/appointments/book?${ni.toString()}`);break;case"ONBOARD_ME":te.getItem("user")&&(await b(),setTimeout(()=>{window.location.reload()},100)),e(`/register?r=${an}&n=${Le}`,{state:{data:(rs=qe==null?void 0:qe.data)==null?void 0:rs.data,type:"inviteMe"}});break;default:e("/");break}}}else if(et.has("u")){const an=et.get("u");try{const Le=JSON.parse(atob(decodeURIComponent(an)));te.setItem("accessToken",Le==null?void 0:Le.token),te.setItem("tokenId",Le==null?void 0:Le.tokenId),te.setItem("user",JSON.stringify(Le==null?void 0:Le.eRsul)),Le.navigateTo?(e(`/${Le.navigateTo}`),setTimeout(()=>{window.location.reload()},0)):(e("/"),setTimeout(()=>{window.location.reload()},0))}catch{console.error("Error decoding the r parameter")}}else(!Mt||gn&&jn)&&!lr&&(!de||jn)&&(ts||te.setItem("redirectionUrl",window.location.pathname),e("/login"))};(async()=>await le())()},[]);const[da,su]=O.exports.useState(!1);O.exports.useEffect(()=>{const re=()=>new Promise((oe,ee)=>{if(!navigator.geolocation)return ee("Geolocation not supported");navigator.geolocation.getCurrentPosition(oe,ee)});(async()=>{try{const oe=await re();lt.setItem("geoPermissionStatus","granted"),_t({latitude:oe.coords.latitude,longitude:oe.coords.longitude})}catch(oe){te.setItem("geoPermissionStatus","denied"),console.warn("Geolocation error:",oe),_t(null)}finally{su(!0)}})()},[]);const ou=O.exports.useRef(null);O.exports.useEffect(()=>{var Yt,Vt;if(!U)return;const re=async()=>{try{const gn=await _(Oe,Oe?null:rn,Oe?null:Ir,ue?JSON.stringify(ue):null);gn&&(B(gn),e(location),ou.current=!0)}catch(gn){console.warn("Guest user fetch error:",gn)}},le=te.getItem("lastGeoPermissionStatus"),ee=le&&le!==(ue?"granted":"denied"),nt=!N,Ze=N&&N["userroles.role.roleName"]=="GUEST"&&!((Yt=N.userDetails)!=null&&Yt.postCode)&&ue,Ne=N&&N["userroles.role.roleName"]=="GUEST"&&((Vt=N.userDetails)==null?void 0:Vt.postCode)&&!ue,et=N==null?void 0:N.pharmacyId,Mt=N==null?void 0:N["pharmacy.groupId"],Ge=N&&N["userroles.role.roleName"]=="GUEST"&&et&&rn&&et!=rn,de=N&&N["userroles.role.roleName"]=="GUEST"&&Oe&&Mt!=Oe;(nt||Ze&&ee||Ne&&ee||Ge||de)&&!Tr&&(rn!==void 0&&Oe!==void 0)&&da&&!ou.current&&re()},[Tr,N,ue,rn,Ir,Oe,da]);const[Ws,au]=O.exports.useState({width:180,height:"auto"}),[ha,es]=O.exports.useState({width:180,height:"auto"}),ar=(re,le)=>new Promise(oe=>{re(ee=>JSON.stringify(ee)!==JSON.stringify(le)?le:ee),setTimeout(()=>oe(le),0)});O.exports.useEffect(()=>{let re;return re=setTimeout(async()=>{if(!Dt)return;const oe=new Image;oe.src=`https://webassetsqa.sandbox.charac.co.uk/${Dt}/store/logo.svg`,oe.onload=async()=>{const ee=n?160:200,nt=n?60:100,Ze=n?120:250,Ne=n?80:125,et=n?320:400,Mt=n?120:200;let{width:Ge,height:de}=oe;const Ue=ee/Ge,Yt=nt/de,Vt=Math.max(Ue,Yt);Ge*=Vt,de*=Vt;let gn=Ge,jn=de;if(Ge>Ze||de>Ne){const lr=Ze/Ge,ts=Ne/de,ur=Math.min(lr,ts);gn=Ge*ur,jn=de*ur}if(Ge>et||de>Mt){const lr=et/Ge,ts=Mt/de,ur=Math.min(lr,ts);Ge*=ur,de*=ur}await ar(es,{width:gn,height:jn}),await ar(au,{width:Ge,height:de})}},100),()=>clearTimeout(re)},[Dt,n]);const fa=re=>new Intl.NumberFormat("en-GB",{style:"currency",currency:"GBP"}).format(re),dh=O.exports.useCallback(({eventName:re,eventCategory:le,eventLabel:oe,eventValue:ee})=>{const nt=`${pn}_${ee}`;Jf.event(re,{event_category:le,event_label:oe,value:nt}),jB(re,{event_category:le,event_label:oe,value:nt})},[pn]),lu=async re=>{const le=await E(re);if((le==null?void 0:le.paymentProvider)=="STRIPE")pa(le),lt.setItem("payment_intent",le==null?void 0:le.payment_intent);else if((le==null?void 0:le.paymentProvider)=="RYFT")return lt.setItem("payment_intent",le==null?void 0:le.payment_intent),Gs(le),e("/pay"),!0},pa=async re=>{if(re){const oe=await J2(...re.connectedAcoountKey),ee=re;ee&&await oe.redirectToCheckout({sessionId:ee.id})}},[uu,Gs]=O.exports.useState(null);O.exports.useEffect(()=>{const re=async()=>{var nt,Ze;
3117const oe=await I(N.pharmacyId);G(oe);const ee=Ne=>!Ne||Ne==="null"?"Charac":Ne;if(Dt=="Charac"&&((nt=oe==null?void 0:oe.data)==null?void 0:nt.brand)!==void 0){const Ne=ee(te.getItem("pharmacyBrand")),et=ee((Ze=oe==null?void 0:oe.data)==null?void 0:Ze.brand);Dt==="Charac"&&Ne!==et&&(te.setItem("pharmacyBrand",et),et!=="Charac"&&window.location.reload())}},le=async()=>{_e(!0);try{const oe=await x(N.pharmacyId||"*");oe!=null&&oe.promotions?ye([...oe==null?void 0:oe.promotions]):ye([])}catch{}finally{_e(!1)}};N!=null&&N.pharmacyId&&re(),N&&((N==null?void 0:N.pharmacyId)||N["userroles.role.roleName"]=="GUEST")&&le()},[N]),O.exports.useEffect(()=>{(async()=>{var le,oe;if((X==null?void 0:X.id)&&he!==null&&he==!1&&te.getItem("previouscartprdoucts")){const ee=te.getItem("previouscartprdoucts"),nt=te.getItem("previouscart");if(!ee||!nt)return;const Ze=JSON.parse(ee),Ne=JSON.parse(nt),Mt=Ze.map(de=>{var Yt,Vt;const Ue=(Yt=Ne.cartItems)==null?void 0:Yt.find(gn=>{var jn,lr;return((jn=gn.title)==null?void 0:jn.trim().toLowerCase())===((lr=de.title)==null?void 0:lr.trim().toLowerCase())});return{cart_id:X.id,productId:de.id,priceToCustomer:de.priceToCustomer,quantity:(Vt=Ue==null?void 0:Ue.quantity)!=null?Vt:1,lineItemType:"Product",item_form:Ue!=null&&Ue.form?Ue==null?void 0:Ue.form:null,formId:Ue!=null&&Ue.formId?Ue==null?void 0:Ue.formId:null,product_type:{plineItem:de.plineItem,viatrisItem:de.viatrisItem,pomItem:de.productClassification=="pom"},tax_total:de.v_taxValue}});let Ge=null;for(const de of Mt)Ge=await T(de);if(Ge){Ge.shipping_methods=(le=Ne.shipping_methods)!=null?le:[],Ge.payments=(oe=Ne.payments)!=null?oe:[];const de=await w(Ge);V(de)}te.removeItem("previouscartprdoucts"),te.removeItem("previouscart")}})()},[he,X]);const Ks=async(re=!1)=>{const le=await S(N.id);if(le)if(!le.data||le.data.length===0)if(ir(null),!Xr.current||re){Xr.current=!0;const oe=await DB(N);return oe?(ir(oe),oe):null}else return null;else return ir(le.data[0]),Xr.current=!1,le.data[0];return null};O.exports.useEffect(()=>{N&&N["userroles.role.roleName"]!=="GUEST"&&Ks()},[N]);const cu=async()=>{if(N!=null&&N.id){let re=await C(N.id,N.pharmacyId);return re&&V(re),re}},du={names:{newPatient:"patient_signup",medicationRequest:"medication_requested",appointmentBooking:"appointment_booked",serviceAction:"service_selected",newDependent:"dependent_added",videoCall:"video_session_started",rescheduleAppointment:"appointment_rescheduled",cancelAppointment:"appointment_canceled",completeProfile:"complete_profile_clicked",setReminder:"meds_reminder_added",productSearch:"product_search",productAction:"product_selected",addToCart:"item_added_to_cart",orderPlaced:"order_created",addToWishlist:"item_added_to_wishlist",categoryAction:"category_selected",chatAction:"chat_opened",chatMessage:"chat_message_sent",brandAction:"brand_selected",questionsStarted:"start_questions",questionsAnswered:"questions_answered",promotionBanner:"promotion_selected",guestRedirected:"guest_redirected_to_v2",guestServiceLink:"guest_service_link"},categories:{pharmacy:"Pharmacy",patient:"Patient",medication:"Medication",appointment:"Appointment",service:"Service",profile:"Profile",dependent:"Dependent",chat:"Chat",videoCall:"Video Call",reschedule:"Reschedule",medicationReminder:"Medication Reminder",rebook:"Rebook",product:"Product",category:"Category",brand:"Brand",wishList:"Wishlist",promotion:"Banners/Carousel"},labels:{newPatient:"PATIENT_SIGNUP",newMedication:"MEDICATION_REQUESTED",newAppointment:"APPOINTMENT_BOOKED",serviceAction:"SERVICE_SELECTED",newDependent:"DEPENDENT_ADDED",videoCall:"VIDEO_SESSION_STARTED",rescheduleAppointment:"APPOINTMENT_RESCHEDULED",cancelAppointment:"APPOINTMENT_CANCELED",completeProfile:"PROFILE_COMPLETED",setReminder:"MEDICATION_REMINDER_SET",productSearch:"PRODUCT_SEARCHED",productAction:"PRODUCT_SELECTED",addToCart:"ITEM_ADDED_TO_CART",orderPlaced:"ORDER_PLACED",addToWishlist:"ITEM_ADDED_TO_WISHLIST",categoryAction:"CATEGORY_SELECTED",chatAction:"CHAT_OPENED",chatMessage:"CHAT_MESSAGE_SENT",brandAction:"BRAND_SELECTED",questionsStarted:"QUESTIONS_STARTED",questionsAnswered:"QUESTIONS_COMPLETED",promotionBanner:"PROMOTION_SELECTED",guestRedirected:"GUEST_REDIRECTED",guestServiceLink:"GUEST_SERVICE_LINK"}};return ge(XC.Provider,{value:{signInToken:D,user:N,cart:X,setCart:V,wishList:$,setWishlist:H,countries:ct,formatPrice:fa,handlePayment:lu,name:Ee,setName:ft,primaryColor:Pn,redirectToStripe:pa,ryftObject:uu,setRyftObject:Gs,validateEmail:In,validateName:Sn,validateMobileFormat:$n,validatePostCo
3117de:Un,validateAddressLength:nr,validateCityLength:Rn,validateMobileLength:dt,validatePasswordLength:ht,gaevent:dh,eventConstants:du,userPharmacy:L,auth:r,signInWithGooglePopup:s,db:a,promotions:K,links:Fe,brandTitle:pn,isRedirection:Ki,ip:la,getLatestCart:cu,selectedSortFilterDesc:zs,setSelectedSortFilterDesc:rr,sortFilter:Xi,setSortFilter:Yi,breadCrumbs:d,setBreadCrumbs:c,logoSize:Ws,navbarLogoSize:ha,order:wr,setOrder:Wi,loginRequired:Tr,setLoginRequired:Kr,setUser:B,defaultAddress:zn,setDefaultAddress:ir,refreshAddress:Ks,userGeoLocation:ue,setUserGeoLocation:_t,activeMenuItem:Lt,setActiveMenuItem:sr,enableNhsLogin:Qr,storeLinks:ua,showConsentAlert:h,setShowConsentAlert:p,getUrlParam:Yr,multiFactorAuth:y,copyrightYear:Cr,userLoaded:U},children:t})}function W5(){return O.exports.useContext(XC)}const YC=O.exports.createContext(),G5=({children:t})=>{const[e,n]=O.exports.useState([]),r=(o,a)=>{n([...e,{id:Date.now(),state:o,message:a}])},i=o=>{n(a=>a.filter(u=>u.id!==o))},s=()=>{n([])};return ge(YC.Provider,{value:{showToast:r,hideToast:i,clearAllToasts:s,toasts:e},children:t})},K5=()=>{const t=O.exports.useContext(YC);if(!t)throw new Error("useToast must be used within a ToastProvider");return t},JC=O.exports.createContext(),Q5=({children:t})=>{const[e,n]=O.exports.useState(!1),r=()=>{n(!0)},i=()=>{n(!1)};return ge(JC.Provider,{value:{show:r,hide:i,showSpinner:e},children:t})},X5=()=>{const t=O.exports.useContext(JC);if(!t)throw new Error("useSpinner must be used within a SpinnerProvider");return t};var Ac={exports:{}},qB="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",WB=qB,GB=WB;function ZC(){}function eT(){}eT.resetWarningCache=ZC;var KB=function(){function t(r,i,s,o,a,u){if(u!==GB){var d=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 d.name="Invariant Violation",d}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:eT,resetWarningCache:ZC};return n.PropTypes=n,n};Ac.exports=KB();var tT={exports:{}};/*! 3118 Copyright (c) 2018 Jed Watson. 3119 Licensed under the MIT License (MIT), see 3120 http://jedwatson.github.io/classnames 3121*/(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var s=arguments[i];if(!!s){var o=typeof s;if(o==="string"||o==="number")r.push(s);else if(Array.isArray(s)){if(s.length){var a=n.apply(null,s);a&&r.push(a)}}else if(o==="object"){if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]")){r.push(s.toString());continue}for(var u in s)e.call(s,u)&&s[u]&&r.push(u)}}}return r.join(" ")}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(tT);const Vn=tT.exports;function QB(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Ap(t,e){return Ap=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Ap(t,e)}function XB(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Ap(t,e)}const YB=["xxl","xl","lg","md","sm","xs"],JB="xs",oh=O.exports.createContext({prefixes:{},breakpoints:YB,minBreakpoint:JB});function oa(t,e){const{prefixes:n}=O.exports.useContext(oh);return t||n[e]||e}function ZB(){const{breakpoints:t}=O.exports.useContext(oh);return t}function eO(){const{minBreakpoint:t}=O.exports.useContext(oh);return t}function tO(){const{dir:t}=O.exports.useContext(oh);return t==="rtl"}function ah(t){return t&&t.ownerDocument||document}function nO(t){var e=ah(t);return e&&e.defaultView||window}function rO(t,e){return nO(t).getComputedStyle(t,e)}var iO=/([A-Z])/g;function sO(t){return t.replace(iO,"-$1").toLowerCase()}var oO=/^ms-/;function Yu(t){return sO(t).replace(oO,"-ms-")}var aO=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function lO(t){return!!(t&&aO.test(t))}function _s(t,e){var n="",r="";if(typeof e=="string")return t.style.getPropertyValue(Yu(e))||rO(t).getPropertyValue(Yu(e));Object.keys(e).forEach(function(i){var s=e[i];!s&&s!==0?t.style.removeProperty(Yu(i)):lO(i)?r+=i+"("+s+") ":n+=Yu(i)+": "+s+";"}),r&&(n+="transform: "+r+";"),t.style.cssText+=";"+n}const T_={disabled:!1},nT=gs.createContext(null);var uO=function(e){return e.scrollTop},Ka="unmounted",ls="exited",li="entering",us="entered",Cp="exiting",Gr=function(t){XB(e,t);function e(r,i){var s;s=t.call(this,r,i)||this;var o=i,a=o&&!o.isMounting?r.enter:r.appear,u;return s.appearStatus=null,r.in?a?(u=ls,s.appearStatus=li):u=us:r.unmountOnExit||r.mountOnEnter?u=Ka:u=ls,s.state={status:u},s.nextCallback=null,s}e.getDerivedStateFromProps=function(i,s){var o=i.in;return o&&s.status===Ka?{status:ls}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var s=null;if(i!==this.props){var o=this.state.status;this.props.in?o!==li&&o!==us&&(s=li):(o===li||o===us)&&(s=Cp)}this.updateStatus(!1,s)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,s,o,a;return s=o=a=i,i!=null&&typeof i!="number"&&(s=i.exit,o=i.enter,a=i.appear!==void 0?i.appear:o),{exit:s,enter
3121:o,appear:a}},n.updateStatus=function(i,s){if(i===void 0&&(i=!1),s!==null)if(this.cancelNextCallback(),s===li){if(this.props.unmountOnExit||this.props.mountOnEnter){var o=this.props.nodeRef?this.props.nodeRef.current:xo.findDOMNode(this);o&&uO(o)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ls&&this.setState({status:Ka})},n.performEnter=function(i){var s=this,o=this.props.enter,a=this.context?this.context.isMounting:i,u=this.props.nodeRef?[a]:[xo.findDOMNode(this),a],d=u[0],c=u[1],h=this.getTimeouts(),p=a?h.appear:h.enter;if(!i&&!o||T_.disabled){this.safeSetState({status:us},function(){s.props.onEntered(d)});return}this.props.onEnter(d,c),this.safeSetState({status:li},function(){s.props.onEntering(d,c),s.onTransitionEnd(p,function(){s.safeSetState({status:us},function(){s.props.onEntered(d,c)})})})},n.performExit=function(){var i=this,s=this.props.exit,o=this.getTimeouts(),a=this.props.nodeRef?void 0:xo.findDOMNode(this);if(!s||T_.disabled){this.safeSetState({status:ls},function(){i.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:Cp},function(){i.props.onExiting(a),i.onTransitionEnd(o.exit,function(){i.safeSetState({status:ls},function(){i.props.onExited(a)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,s){s=this.setNextCallback(s),this.setState(i,s)},n.setNextCallback=function(i){var s=this,o=!0;return this.nextCallback=function(a){o&&(o=!1,s.nextCallback=null,i(a))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},n.onTransitionEnd=function(i,s){this.setNextCallback(s);var o=this.props.nodeRef?this.props.nodeRef.current:xo.findDOMNode(this),a=i==null&&!this.props.addEndListener;if(!o||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var u=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],d=u[0],c=u[1];this.props.addEndListener(d,c)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Ka)return null;var s=this.props,o=s.children;s.in,s.mountOnEnter,s.unmountOnExit,s.appear,s.enter,s.exit,s.timeout,s.addEndListener,s.onEnter,s.onEntering,s.onEntered,s.onExit,s.onExiting,s.onExited,s.nodeRef;var a=QB(s,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return ge(nT.Provider,{value:null,children:typeof o=="function"?o(i,a):gs.cloneElement(gs.Children.only(o),a)})},e}(gs.Component);Gr.contextType=nT;Gr.propTypes={};function eo(){}Gr.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:eo,onEntering:eo,onEntered:eo,onExit:eo,onExiting:eo,onExited:eo};Gr.UNMOUNTED=Ka;Gr.EXITED=ls;Gr.ENTERING=li;Gr.ENTERED=us;Gr.EXITING=Cp;const aa=!!(typeof window<"u"&&window.document&&window.document.createElement);var Tp=!1,Ip=!1;try{var z0={get passive(){return Tp=!0},get once(){return Ip=Tp=!0}};aa&&(window.addEventListener("test",z0,z0),window.removeEventListener("test",z0,!0))}catch{}function rT(t,e,n,r){if(r&&typeof r!="boolean"&&!Ip){var i=r.once,s=r.capture,o=n;!Ip&&i&&(o=n.__once||function a(u){this.removeEventListener(e,a,s),n.call(this,u)},n.__once=o),t.addEventListener(e,o,Tp?r:s)}t.addEventListener(e,n,r)}function Sp(t,e,n,r){var i=r&&typeof r!="boolean"?r.capture:r;t.removeEventListener(e,n,i),n.__once&&t.removeEventListener(e,n.__once,i)}function hd(t,e,n,r){return rT(t,e,n,r),function(){Sp(t,e,n,r)}}function cO(t,e,n,r){if(n===void 0&&(n=!1),r===void 0&&(r=!0),t){var i=document.createEvent("HTMLEvents");i.initEvent(e,n,r),t.dispatchEvent(i)}}function dO(t){var e=_s(t,"transitionDuration")||"",n=e.indexOf("ms")===-1?1e3:1;return parseFloat(e)*n}function hO(t,e,n){n===void 0&&(n=5);var r=!1,i=setTimeout(function(){r||cO(t,"transitionend",!0)},e+n),s=hd(t,"transitionend",function(){r=!0},{once:!0});return function(){clearTimeout(i),s()}}function iT(t,e,n,r){n==null&&(n=dO(t)||0);var i=hO(t,n,r),s=hd(t,"transitionend",e);return function(){i(),s()}}function I_(t,e){const n=_s(t,e)||"",r=n.indexOf("ms")===-1?1e3:1;return parseFloat(n)*r}function fO(t,e){const n=I_(t,"transitionDuration"),r=I_(t,"transitionDelay"),i=iT(t,s=>{s.target===t&&(i(),e(s))},n+r)}function pO(t){t.offsetHeight}var S_=function(e){return!e||typeof e=="function"?e:function(n){e.current=n}};function mO(t,e){var n=S_(t),r=S_(e);return function(i){n&&n(i),r&&r(i)}}function sT(t,e){return O.exports.useMemo(function(){return mO(t,e)},[t,e])}function gO(t){return t&&"setState"in t?xo.findDOMNode(t):t!=null?t:null}const yO=gs.forwardRef(({onEnter:t,onEntering:e,onEntered:n,onExit:r,onExiting:i,onExited:s,addEndListener:o,children:a,childRef:u,...d},c)=>{const h=O.exports.useRef(null),p=sT(h,u),y=b=>{p(gO(b))},v=b=>C=>{b&&h.current&&b(h.current,C)},E=O.exports.useCallback(v(t),[t]),I=O.exports.useCallback(v(e),[e]),A=O.exports.useCallback(v(n),[n]),m=O.exports.useCallback(v(r),[r]),x=O.exports.useCallback(v(i),[i]),R=O.exports.useCallback(v(s),[s]),F=O.exports.useCallback(v(o),[o]);return ge(Gr,{ref:c,...d,onEnter:E,onEntered:A,onEntering:I,onExit:m,onExited:R,onExiting:x,addEndListener:F,nodeRef:h,children:typeof a=="function"?(b,C)=>a(b,{...C,ref:y}):gs.cloneElement(a,{ref:y})})}),vO=yO;function xO(t){var e=O.exports.useRef(t);return O.exports.useEffect(function(){e.current=t},[t]),e}function pi(t){var e=xO(t);return O.exports.useCallback(function(){return e.current&&e.current.apply(e,arguments)},[e])}function _O(){return O.exports.useState(null)}function EO(){var t=O.exports.useRef(!0),e=O.exports.useRef(function(){return t.current});return O.exports.useEffect(function(){return t.current=!0,function(){t.current=!1}},[]),e.current}function wO(t){var e=O.exports.useRef(null);return O.exports.useEffect(function(){e.current=t}),e.current}const AO={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1},CO={[li]:"show",[us]:"show"},kg=O.exports.forwardRef(({className:t,children:e,transitionClasses:n={},...r},i)=>{const s=O.exports.useCallback((o,a)=>{pO(o),r.onEnter==null||r.onEnter(o,a)},[r]);return ge(vO,{ref:i,addEndListener:fO,...r,onEnter:s,childRef:e.ref,children:(o,a)=>O.exports.cloneElement(e,{...a,className:Vn("fade",t,e.props.className,CO[o],n[o])})})});kg.defaultProps=AO;kg.displayName="Fade";const oT=kg,TO={"aria-label":Ac.exports.string,onClick:Ac.exports.func,variant:Ac.exports.oneOf(["white"])},IO={"aria-label":"Close"},lh=O.exports.forwardRef(({className:t,variant:e,...n},r)=>ge("button",{ref:r,type:"button",className:Vn("btn-close",e&&`btn-close-${e}`,t),...n}));lh.displayName="CloseButton";lh.propTypes=TO;lh.defaultProps=IO;const SO=lh,RO=t=>
3121O.exports.forwardRef((e,n)=>ge("div",{...e,ref:n,className:Vn(e.className,t)}));var PO=/-(.)/g;function kO(t){return t.replace(PO,function(e,n){return n.toUpperCase()})}const DO=t=>t[0].toUpperCase()+kO(t).slice(1);function Dg(t,{displayName:e=DO(t),Component:n,defaultProps:r}={}){const i=O.exports.forwardRef(({className:s,bsPrefix:o,as:a=n||"div",...u},d)=>{const c=oa(o,t);return ge(a,{ref:d,className:Vn(s,c),...u})});return i.defaultProps=r,i.displayName=e,i}function bO(t){var e=O.exports.useRef(t);return e.current=t,e}function aT(t){var e=bO(t);O.exports.useEffect(function(){return function(){return e.current()}},[])}function FO({as:t,bsPrefix:e,className:n,...r}){e=oa(e,"col");const i=ZB(),s=eO(),o=[],a=[];return i.forEach(u=>{const d=r[u];delete r[u];let c,h,p;typeof d=="object"&&d!=null?{span:c,offset:h,order:p}=d:c=d;const y=u!==s?`-${u}`:"";c&&o.push(c===!0?`${e}${y}`:`${e}${y}-${c}`),p!=null&&a.push(`order${y}-${p}`),h!=null&&a.push(`offset${y}-${h}`)}),[{...r,className:Vn(n,...o,...a)},{as:t,bsPrefix:e,spans:o}]}const lT=O.exports.forwardRef((t,e)=>{const[{className:n,...r},{as:i="div",bsPrefix:s,spans:o}]=FO(t);return ge(i,{...r,ref:e,className:Vn(n,!o.length&&s)})});lT.displayName="Col";const Y5=lT;var NO=Function.prototype.bind.call(Function.prototype.call,[].slice);function to(t,e){return NO(t.querySelectorAll(e))}function R_(t,e){if(t.contains)return t.contains(e);if(t.compareDocumentPosition)return t===e||!!(t.compareDocumentPosition(e)&16)}const BO="data-rr-ui-",OO="rrUi";function LO(t){return`${BO}${t}`}function J5(t){return`${OO}${t}`}const uT=O.exports.createContext(aa?window:void 0);uT.Provider;function cT(){return O.exports.useContext(uT)}var Ju;function P_(t){if((!Ju&&Ju!==0||t)&&aa){var e=document.createElement("div");e.style.position="absolute",e.style.top="-9999px",e.style.width="50px",e.style.height="50px",e.style.overflow="scroll",document.body.appendChild(e),Ju=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return Ju}function j0(t){t===void 0&&(t=ah());try{var e=t.activeElement;return!e||!e.nodeName?null:e}catch{return t.body}}function MO(t=document){const e=t.defaultView;return Math.abs(e.innerWidth-t.documentElement.clientWidth)}const k_=LO("modal-open");class bg{constructor({ownerDocument:e,handleContainerOverflow:n=!0,isRTL:r=!1}={}){this.handleContainerOverflow=n,this.isRTL=r,this.modals=[],this.ownerDocument=e}getScrollbarWidth(){return MO(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(e){}removeModalAttributes(e){}setContainerStyle(e){const n={overflow:"hidden"},r=this.isRTL?"paddingLeft":"paddingRight",i=this.getElement();e.style={overflow:i.style.overflow,[r]:i.style[r]},e.scrollBarWidth&&(n[r]=`${parseInt(_s(i,r)||"0",10)+e.scrollBarWidth}px`),i.setAttribute(k_,""),_s(i,n)}reset(){[...this.modals].forEach(e=>this.remove(e))}
3121removeContainerStyle(e){const n=this.getElement();n.removeAttribute(k_),Object.assign(n.style,e.style)}add(e){let n=this.modals.indexOf(e);return n!==-1||(n=this.modals.length,this.modals.push(e),this.setModalAttributes(e),n!==0)||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),n}remove(e){const n=this.modals.indexOf(e);n!==-1&&(this.modals.splice(n,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(e))}isTopModal(e){return!!this.modals.length&&this.modals[this.modals.length-1]===e}}const H0=(t,e)=>aa?t==null?(e||ah()).body:(typeof t=="function"&&(t=t()),t&&"current"in t&&(t=t.current),t&&("nodeType"in t||t.getBoundingClientRect)?t:null):null;function VO(t,e){const n=cT(),[r,i]=O.exports.useState(()=>H0(t,n==null?void 0:n.document));if(!r){const s=H0(t);s&&i(s)}return O.exports.useEffect(()=>{e&&r&&e(r)},[e,r]),O.exports.useEffect(()=>{const s=H0(t);s!==r&&i(s)},[t,r]),r}const UO=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","backdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];function $O(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}let q0;function zO(t){return q0||(q0=new bg({ownerDocument:t==null?void 0:t.document})),q0}function jO(t){const e=cT(),n=t||zO(e),r=O.exports.useRef({dialog:null,backdrop:null});return Object.assign(r.current,{add:()=>n.add(r.current),remove:()=>n.remove(r.current),isTopModal:()=>n.isTopModal(r.current),setDialogRef:O.exports.useCallback(i=>{r.current.dialog=i},[]),setBackdropRef:O.exports.useCallback(i=>{r.current.backdrop=i},[])})}const dT=O.exports.forwardRef((t,e)=>{let{show:n=!1,role:r="dialog",className:i,style:s,children:o,backdrop:a=!0,keyboard:u=!0,onBackdropClick:d,onEscapeKeyDown:c,transition:h,backdropTransition:p,autoFocus:y=!0,enforceFocus:v=!0,restoreFocus:E=!0,restoreFocusOptions:I,renderDialog:A,renderBackdrop:m=me=>ge("div",Object.assign({},me)),manager:x,container:R,onShow:F,onHide:b=()=>{},onExit:C,onExited:_,onExiting:T,onEnter:w,onEntering:S,onEntered:D}=t,P=$O(t,UO);const N=VO(R),B=jO(x),U=EO(),W=wO(n),[L,G]=O.exports.useState(!n),X=O.exports.useRef(null);O.exports.useImperativeHandle(e,()=>B,[B]),aa&&!W&&n&&(X.current=j0()),!h&&!n&&!L?G(!0):n&&L&&G(!1);const V=pi(()=>{if(B.add(),_e.current=hd(document,"keydown",ye),he.current=hd(document,"focus",()=>setTimeout(H),!0),F&&F(),y){const me=j0(document);B.dialog&&me&&!R_(B.dialog,me)&&(X.current=me,B.dialog.focus())}}),$=pi(()=>{if(B.remove(),_e.current==null||_e.current(),he.current==null||he.current(),E){var me;(me=X.current)==null||me.focus==null||me.focus(I),X.current=null}});O.exports.useEffect(()=>{!n||!N||V()},[n,N,V]),O.exports.useEffect(()=>{!L||$()},[L,$]),aT(()=>{$()});const H=pi(()=>{if(!v||!U()||!B.isTopModal())return;const me=j0();B.dialog&&me&&!R_(B.dialog,me)&&B.dialog.focus()}),K=pi(me=>{me.target===me.currentTarget&&(d==null||d(me),a===!0&&b())}),ye=pi(me=>{u&&me.keyCode===27&&B.isTopModal()&&(c==null||c(me),me.defaultPrevented||b())}),he=O.exports.useRef(),_e=O.exports.useRef(),ue=(...me)=>{G(!0),_==null||_(...me)},_t=h;if(!N||!(n||_t&&!L))return null;const ct=Object.assign({role:r,ref:B.setDialogRef,"aria-modal":r==="dialog"?!0:void 0},P,{style:s,className:i,tabIndex:-1});let Et=A?A(ct):ge("div",Object.assign({},ct,{children:O.exports.cloneElement(o,{role:"document"})}));_t&&(Et=ge(_t,{appear:!0,unmountOnExit:!0,in:!!n,onExit:C,onExiting:T,onExited:ue,onEnter:w,onEntering:S,onEntered:D,children:Et}));let wt=null;if(a){const me=p;wt=m({ref:B.setBackdropRef,onClick:K}),me&&(wt=ge(me,{appear:!0,in:!!n,children:wt}))}return ge(zf,{children:xo.createPortal(Kc(zf,{children:[wt,Et]}),N)})});dT.displayName="Modal";const HO=Object.assign(dT,{Manager:bg});function qO(t,e){return t.classList?!!e&&t.classList.contains(e):(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")!==-1}function WO(t,e){t.classList?t.classList.add(e):qO(t,e)||(typeof t.className=="string"?t.className=t.className+" "+e:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+e))}function D_(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function GO(t,e){t.classList?t.classList.remove(e):typeof t.className=="string"?t.className=D_(t.className,e):t.setAttribute("class",D_(t.className&&t.className.baseVal||"",e))}const no={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class KO extends bg{adjustAndStore(e,n,r){const i=n.style[e];n.dataset[e]=i,_s(n,{[e]:`${parseFloat(_s(n,e))+r}px`})}restore(e,n){const r=n.dataset[e];r!==void 0&&(delete n.dataset[e],_s(n,{[e]:r}))}setContainerStyle(e){super.setContainerStyle(e);const n=this.getElement();if(WO(n,"modal-open"),!e.scrollBarWidth)return;const r=this.isRTL?"paddingLeft":"paddingRight",i=this.isRTL?"marginLeft":"marginRight";to(n,no.FIXED_CONTENT).forEach(s=>this.adjustAndStore(r,s,e.scrollBarWidth)),to(n,no.STICKY_CONTENT).forEach(s=>this.adjustAndStore(i,s,-e.scrollBarWidth)),to(n,no.NAVBAR_TOGGLER).forEac
3121h(s=>this.adjustAndStore(i,s,e.scrollBarWidth))}removeContainerStyle(e){super.removeContainerStyle(e);const n=this.getElement();GO(n,"modal-open");const r=this.isRTL?"paddingLeft":"paddingRight",i=this.isRTL?"marginLeft":"marginRight";to(n,no.FIXED_CONTENT).forEach(s=>this.restore(r,s)),to(n,no.STICKY_CONTENT).forEach(s=>this.restore(i,s)),to(n,no.NAVBAR_TOGGLER).forEach(s=>this.restore(i,s))}}let W0;function QO(t){return W0||(W0=new KO(t)),W0}const XO=Dg("modal-body"),YO=O.exports.createContext({onHide(){}}),hT=YO,fT=O.exports.forwardRef(({bsPrefix:t,className:e,contentClassName:n,centered:r,size:i,fullscreen:s,children:o,scrollable:a,...u},d)=>{t=oa(t,"modal");const c=`${t}-dialog`,h=typeof s=="string"?`${t}-fullscreen-${s}`:`${t}-fullscreen`;return ge("div",{...u,ref:d,className:Vn(c,e,i&&`${t}-${i}`,r&&`${c}-centered`,a&&`${c}-scrollable`,s&&h),children:ge("div",{className:Vn(`${t}-content`,n),children:o})})});fT.displayName="ModalDialog";const pT=fT,JO=Dg("modal-footer"),ZO={closeLabel:"Close",closeButton:!1},mT=O.exports.forwardRef(({closeLabel:t,closeVariant:e,closeButton:n,onHide:r,children:i,...s},o)=>{const a=O.exports.useContext(hT),u=pi(()=>{a==null||a.onHide(),r==null||r()});return Kc("div",{ref:o,...s,children:[i,n&&ge(SO,{"aria-label":t,variant:e,onClick:u})]})});mT.defaultProps=ZO;const e5=mT,t5={closeLabel:"Close",closeButton:!1},Fg=O.exports.forwardRef(({bsPrefix:t,className:e,...n},r)=>(t=oa(t,"modal-header"),ge(e5,{ref:r,...n,className:Vn(e,t)})));Fg.displayName="ModalHeader";Fg.defaultProps=t5;const n5=Fg,r5=RO("h4"),i5=Dg("modal-title",{Component:r5}),s5={show:!1,backdrop:!0,keyboard:!0,autoFocus:!0,enforceFocus:!0,restoreFocus:!0,animation:!0,dialogAs:pT};function o5(t){return ge(oT,{...t,timeout:null})}function a5(t){return ge(oT,{...t,timeout:null})}const Ng=O.exports.forwardRef(({bsPrefix:t,className:e,style:n,dialogClassName:r,contentClassName:i,children:s,dialogAs:o,"aria-labelledby":a,"aria-describedby":u,"aria-label":d,show:c,animation:h,backdrop:p,keyboard:y,onEscapeKeyDown:v,onShow:E,onHide:I,container:A,autoFocus:m,enforceFocus:x,restoreFocus:R,restoreFocusOptions:F,onEntered:b,onExit:C,onExiting:_,onEnter:T,onEntering:w,onExited:S,backdropClassName:D,manager:P,...N},B)=>{const[U,W]=O.exports.useState({}),[L,G]=O.exports.useState(!1),X=O.exports.useRef(!1),V=O.exports.useRef(!1),$=O.exports.useRef(null),[H,K]=_O(),ye=sT(B,K),he=pi(I),_e=tO();t=oa(t,"modal");const ue=O.exports.useMemo(()=>({onHide:he}),[he]);function _t(){return P||QO({isRTL:_e})}function ct(Ee){if(!aa)return;const ft=_t().getScrollbarWidth()>0,Fe=Ee.scrollHeight>ah(Ee).documentElement.clientHeight;W({paddingRight:ft&&!Fe?P_():void 0,paddingLeft:!ft&&Fe?P_():void 0})}const Et=pi(()=>{H&&ct(H.dialog)});aT(()=>{Sp(window,"resize",Et),$.current==null||$.current()});const wt=()=>{X.current=!0},me=Ee=>{X.current&&H&&Ee.target===H.dialog&&(V.current=!0),X.current=!1},Je=()=>{G(!0),$.current=iT(H.dialog,()=>{G(!1)})},In=Ee=>{Ee.target===Ee.currentTarget&&Je()},Sn=Ee=>{if(p==="static"){In(Ee);return}if(V.current||Ee.target!==Ee.currentTarget){V.current=!1;return}I==null||I()},Un=Ee=>{!y&&p==="static"?(Ee.preventDefault(),Je()):y&&v&&v(Ee)},$n=(Ee,ft)=>{Ee&&ct(Ee),T==null||T(Ee,ft)},nr=Ee=>{$.current==null||$.current(),C==null||C(Ee)},Rn=(Ee,ft)=>{w==null||w(Ee,ft),rT(window,"resize",Et)},dt=Ee=>{Ee&&(Ee.style.display=""),S==null||S(Ee),Sp(window,"resize",Et)},ht=O.exports.useCallback(Ee=>ge("div",{...Ee,className:Vn(`${t}-backdrop`,D,!h&&"show")}),[h,D,t]),nn={...n,...U};nn.display="block";const Pn=Ee=>ge("div",{role:"dialog",...Ee,style:nn,className:Vn(e,t,L&&`${t}-static`,!h&&"show"),onClick:p?Sn:void 0,onMouseUp:me,"aria-label":d,"aria-labelledby":a,"aria-describedby":u,children:ge(o,{...N,onMouseDown:wt,className:r,contentClassName:i,children:s})});return ge(hT.Provider,{value:ue,children:ge(HO,{show:c,ref:ye,backdrop:p,container:A,keyboard:!0,autoFocus:m,enforceFocus:x,restoreFocus:R,restoreFocusOptions:F,onEscapeKeyDown:Un,onShow:E,onHide:I,onEnter:$n,onEntering:Rn,onEntered:b,onExit:nr,onExiting:_,onExited:dt,manager:_t(),transition:h?o5:void 0,backdropTransition:h?a5:void 0,renderBackdrop:ht,renderDialog:Pn})})});Ng.displayName="Modal";Ng.defaultProps=s5;const Z5=Object.assign(Ng,{Body:XO,Header:n5,Title:i5,Footer:JO,Dialog:pT,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150}),gT=O.exports.forwardRef(({bsPrefix:t,variant:e,animation:n="border",size:r,as:i="div",className:s,...o},a)=>
3121{t=oa(t,"spinner");const u=`${t}-${n}`;return ge(i,{ref:a,...o,className:Vn(s,u,r&&`${u}-${r}`,e&&`text-${e}`)})});gT.displayName="Spinner";const e9=gT;const t9=t=>{const[e,n]=O.exports.useState(!1);return O.exports.useEffect(()=>{let r=!0;return(async()=>{try{const s=await Nm.get(t);if(r){const o=document.createElement("style");o.type="text/css",o.appendChild(document.createTextNode(s.data)),document.head.appendChild(o),n(!0)}}catch{r&&n(!1)}})(),()=>{r=!1}},[t]),e};export{Z5 as $,cT as A,wO as B,to as C,rT as D,ls as E,zf as F,sT as G,Y5 as H,J5 as I,e5 as J,HO as K,oT as L,hT as M,KO as N,QO as O,VO as P,xo as Q,gs as R,qO as S,vO as T,gO as U,ZB as V,eO as W,SO as X,Zo as Y,FB as Z,QB as _,Kc as a,lt as a0,Ap as a1,G0 as a2,Fp as a3,we as a4,OD as a5,kB as a6,K5 as a7,Dt as a8,X5 as a9,hP as aA,H5 as aB,Q5 as aC,G5 as aD,Jg as aE,t9 as aF,c5 as aG,D5 as aH,z5 as aI,q5 as aJ,Tm as aK,te as aa,l5 as ab,u5 as ac,L2 as ad,P5 as ae,R5 as af,Om as ag,j5 as ah,e9 as ai,JS as aj,d5 as ak,k5 as al,h5 as am,xk as an,xT as ao,Rp as ap,O5 as aq,L5 as ar,B5 as as,U5 as at,$5 as au,M5 as av,V5 as aw,lP as ax,uP as ay,fP as az,W5 as b,Vn as c,Cp as d,li as e,us as f,pO as g,pi as h,oa as i,ge as j,Dg as k,RO as l,EO as m,aT as n,tO as o,Ac as p,xO as q,O as r,_s as s,fO as t,Dd as u,R_ as v,ah as w,hd as x,_O as y,LO as z};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.