vendor: 5,323 bytes, lines 1-9
1(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 l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).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)}})();function g_(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var cm={exports:{}},Ra={},dm={exports:{}},le={};/** 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 zo=Symbol.for("react.element"),y_=Symbol.for("react.portal"),v_=Symbol.for("react.fragment"),__=Symbol.for("react.strict_mode"),w_=Symbol.for("react.profiler"),S_=Symbol.for("react.provider"),E_=Symbol.for("react.context"),k_=Symbol.for("react.forward_ref"),I_=Symbol.for("react.suspense"),T_=Symbol.for("react.memo"),C_=Symbol.for("react.lazy"),qh=Symbol.iterator;function N_(t){return t===null||typeof t!="object"?null:(t=qh&&t[qh]||t["@@iterator"],typeof t=="function"?t:null)}var hm={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},fm=Object.assign,pm={};function xs(t,e,n){this.props=t,this.context=e,this.refs=pm,this.updater=n||hm}xs.prototype.isReactComponent={};xs.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")};xs.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function mm(){}mm.prototype=xs.prototype;function Yc(t,e,n){this.props=t,this.context=e,this.refs=pm,this.updater=n||hm}var Zc=Yc.prototype=new mm;Zc.constructor=Yc;fm(Zc,xs.prototype);Zc.isPureReactComponent=!0;var Gh=Array.isArray,gm=Object.prototype.hasOwnProperty,ed={current:null},ym={key:!0,ref:!0,__self:!0,__source:!0};function vm(t,e,n){var r,i={},s=null,l=null;if(e!=null)for(r in e.ref!==void 0&&(l=e.ref),e.key!==void 0&&(s=""+e.key),e)gm.call(e,r)&&!ym.hasOwnProperty(r)&&(i[r]=e[r]);var u=arguments.length-2;if(u===1)i.children=n;else if(1<u){for(var c=Array(u),f=0;f<u;f++)c[f]=arguments[f+2];i.children=c}if(t&&t.defaultProps)for(r in u=t.defaultProps,u)i[r]===void 0&&(i[r]=u[r]);return{$$typeof:zo,type:t,key:s,ref:l,props:i,_owner:ed.current}}function x_(t,e){return{$$typeof:zo,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function td(t){return typeof t=="object"&&t!==null&&t.$$typeof===zo}function A_(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var Kh=/\/+/g;function iu(t,e){return typeof t=="object"&&t!==null&&t.key!=null?A_(""+t.key):e.toString(36)}function Nl(t,e,n,r,i){var s=typeof t;(s==="undefined"||s==="boolean")&&(t=null);var l=!1;if(t===null)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(t.$$typeof){case zo:case y_:l=!0}}if(l)return l=t,i=i(l),t=r===""?"."+iu(l,0):r,Gh(i)?(n="",t!=null&&(n=t.replace(Kh,"$&/")+"/"),Nl(i,e,n,"",function(f){return f})):i!=null&&(td(i)&&(i=x_(i,n+(!i.key||l&&l.key===i.key?"":(""+i.key).replace(Kh,"$&/")+"/")+t)),e.push(i)),1;if(l=0,r=r===""?".":r+":",Gh(t))for(var u=0;u<t.length;u++){s=t[u];var c=r+iu(s,u);l+=Nl(s,e,n,c,i)}else if(c=N_(t),typeof c=="function")for(t=c.call(t),u=0;!(s=t.next()).done;)s=s.value,c=r+iu(s,u++),l+=Nl(s,e,n,c,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 l}function rl(t,e,n){if(t==null)return t;var r=[],i=0;return Nl(t,r,"","",function(s){return e.call(n,s,i++)}),r}function R_(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 Nt={current:null},xl={transition:null},P_={ReactCurrentDispatcher:Nt,ReactCurrentBatchConfig:xl,ReactCurrentOwner:ed};function _m(){throw Error("act(...) is not supported in production builds of React.")}le.Children={map:rl,forEach:function(t,e,n){rl(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return rl(t,function(){e++}),e},toArray:function(t){return rl(t,function(e){return e})||[]},only:function(t){if(!td(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};le.Component=xs;le.Fragment=v_;le.Profiler=w_;le.PureComponent=Yc;le.StrictMode=__;le.Suspense=I_;
vendor: 9,036 bytes, lines 9-33
9le.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=P_;le.act=_m;le.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=fm({},t.props),i=t.key,s=t.ref,l=t._owner;if(e!=null){if(e.ref!==void 0&&(s=e.ref,l=ed.current),e.key!==void 0&&(i=""+e.key),t.type&&t.type.defaultProps)var u=t.type.defaultProps;for(c in e)gm.call(e,c)&&!ym.hasOwnProperty(c)&&(r[c]=e[c]===void 0&&u!==void 0?u[c]:e[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){u=Array(c);for(var f=0;f<c;f++)u[f]=arguments[f+2];r.children=u}return{$$typeof:zo,type:t.type,key:i,ref:s,props:r,_owner:l}};le.createContext=function(t){return t={$$typeof:E_,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:S_,_context:t},t.Consumer=t};le.createElement=vm;le.createFactory=function(t){var e=vm.bind(null,t);return e.type=t,e};le.createRef=function(){return{current:null}};le.forwardRef=function(t){return{$$typeof:k_,render:t}};le.isValidElement=td;le.lazy=function(t){return{$$typeof:C_,_payload:{_status:-1,_result:t},_init:R_}};le.memo=function(t,e){return{$$typeof:T_,type:t,compare:e===void 0?null:e}};le.startTransition=function(t){var e=xl.transition;xl.transition={};try{t()}finally{xl.transition=e}};le.unstable_act=_m;le.useCallback=function(t,e){return Nt.current.useCallback(t,e)};le.useContext=function(t){return Nt.current.useContext(t)};le.useDebugValue=function(){};le.useDeferredValue=function(t){return Nt.current.useDeferredValue(t)};le.useEffect=function(t,e){return Nt.current.useEffect(t,e)};le.useId=function(){return Nt.current.useId()};le.useImperativeHandle=function(t,e,n){return Nt.current.useImperativeHandle(t,e,n)};le.useInsertionEffect=function(t,e){return Nt.current.useInsertionEffect(t,e)};le.useLayoutEffect=function(t,e){return Nt.current.useLayoutEffect(t,e)};le.useMemo=function(t,e){return Nt.current.useMemo(t,e)};le.useReducer=function(t,e,n){return Nt.current.useReducer(t,e,n)};le.useRef=function(t){return Nt.current.useRef(t)};le.useState=function(t){return Nt.current.useState(t)};le.useSyncExternalStore=function(t,e,n){return Nt.current.useSyncExternalStore(t,e,n)};le.useTransition=function(){return Nt.current.useTransition()};le.version="18.3.1";dm.exports=le;var N=dm.exports;const wm=g_(N);/** 10 * @license React 11 * react-jsx-runtime.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 */var O_=N,L_=Symbol.for("react.element"),j_=Symbol.for("react.fragment"),b_=Object.prototype.hasOwnProperty,D_=O_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,M_={key:!0,ref:!0,__self:!0,__source:!0};function Sm(t,e,n){var r,i={},s=null,l=null;n!==void 0&&(s=""+n),e.key!==void 0&&(s=""+e.key),e.ref!==void 0&&(l=e.ref);for(r in e)b_.call(e,r)&&!M_.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:L_,type:t,key:s,ref:l,props:i,_owner:D_.current}}Ra.Fragment=j_;Ra.jsx=Sm;Ra.jsxs=Sm;cm.exports=Ra;var h=cm.exports,Vu={},Em={exports:{}},Yt={},km={exports:{}},Im={};/** 18 * @license React 19 * scheduler.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 */(function(t){function e(F,$){var G=F.length;F.push($);e:for(;0<G;){var se=G-1>>>1,re=F[se];if(0<i(re,$))F[se]=$,F[G]=re,G=se;else break e}}function n(F){return F.length===0?null:F[0]}function r(F){if(F.length===0)return null;var $=F[0],G=F.pop();if(G!==$){F[0]=G;e:for(var se=0,re=F.length,W=re>>>1;se<W;){var ie=2*(se+1)-1,pe=F[ie],ae=ie+1,ot=F[ae];if(0>i(pe,G))ae<re&&0>i(ot,pe)?(F[se]=ot,F[ae]=G,se=ae):(F[se]=pe,F[ie]=G,se=ie);else if(ae<re&&0>i(ot,G))F[se]=ot,F[ae]=G,se=ae;else break e}}return $}function i(F,$){var G=F.sortIndex-$.sortIndex;return G!==0?G:F.id-$.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var l=Date,u=l.now();t.unstable_now=function(){return l.now()-u}}var c=[],f=[],_=1,k=null,E=3,L=!1,A=!1,P=!1,D=typeof setTimeout=="function"?setTimeout:null,I=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(F){for(var $=n(f);$!==null;){if($.callback===null)r(f);else if($.startTime<=F)r(f),$.sortIndex=$.expirationTime,e(c,$);else break;$=n(f)}}function O(F){if(P=!1,C(F),!A)if(n(c)!==null)A=!0,He(U);else{var $=n(f);$!==null&&K(O,$.startTime-F)}}function U(F,$){A=!1,P&&(P=!1,I(p),p=-1),L=!0;var G=E;try{for(C($),k=n(c);k!==null&&(!(k.expirationTime>$)||F&&!T());){var se=k.callback;if(typeof se=="function"){k.callback=null,E=k.priorityLevel;var re=se(k.expirationTime<=$);$=t.unstable_now(),typeof re=="function"?k.callback=re:k===n(c)&&r(c),C($)}else r(c);k=n(c)}if(k!==null)var W=!0;else{var ie=n(f);ie!==null&&K(O,ie.startTime-$),W=!1}return W}finally{k=null,E=G,L=!1}}var M=!1,y=null,p=-1,g=5,S=-1;function T(){return!(t.unstable_now()-S<g)}function x(){if(y!==null){var F=t.unstable_now();S=F;var $=!0;try{$=y(!0,F)}finally{$?w():(M=!1,y=null)}}else M=!1}var w;if(typeof v=="function")w=function(){v(x)};else if(typeof MessageChannel<"u"){var ee=new MessageChannel,Ve=ee.port2;ee.port1.onmessage=x,w=function(){Ve.postMessage(null)}}else w=function(){D(x,0)};function He(F){y=F,M||(M=!0,w())}function K(F,$){p=D(function(){F(t.unstable_now())},$)}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(F){F.callback=null},t.unstable_continueExecution=function(){A||L||(A=!0,He(U))},t.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):g=0<F?Math.floor(1e3/F):5},t.unstable_getCurrentPriorityLevel=function(){return E},t.unstable_getFirstCallbackNode=function(){return n(c)},t.unstable_next=function(F){switch(E){case 1:case 2:case 3:var $=3;break;default:$=E}var G=E;E=$;try{return F()}finally{E=G}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(F,$){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var G=E;E=F;try{return $()}finally{E=G}},t.unstable_scheduleCallback=function(F,$,G){var se=t.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?se+G:se):G=se,F){case 1:var re=-1;break;case 2:re=250;break;case 5:re=1073741823;break;case 4:re=1e4;break;default:re=5e3}return re=G+re,F={id:_++,callback:$,priorityLevel:F,startTime:G,expirationTime:re,sortIndex:-1},G>se?(F.sortIndex=G,e(f,F),n(c)===null&&F===n(f)&&(P?(I(p),p=-1):P=!0,K(O,G-se))):(F.sortIndex=re,e(c,F),A||L||(A=!0,He(U))),F},t.unstable_shouldYield=T,t.unstable_wrapCallback=function(F){var $=E;return function(){var G=E;E=$;try{return F.apply(this,arguments)}finally{E=G}}}})(Im);km.exports=Im;var U_=km.exports;/** 26 * @license React 27 * react-dom.production.min.js 28 * 29 * Copyright (c) Facebook, Inc. and its affiliates. 30 * 31 * This source code is licensed under the MIT license found in the 32 * LICENSE file in the root directory of this source tree. 33 */var F_=N,Jt=U_;function B(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 Tm=new Set,wo={};function Fi(t,e){vs(t,e),vs(t+"Capture",e)}function vs(t,e){for(wo[t]=e,t=0;t<e.length;t++)Tm.add(e[t])}var dr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Hu=Object.prototype.hasOwnProperty,z_=/^[: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]*$/,Qh={},Xh={};function B_(t){return Hu.call(Xh,t)?!0:Hu.call(Qh,t)?!1:z_.test(t)?Xh[t]=!0:(Qh[t]=!0,!1)}function $_(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 V_(t,e,n,r){if(e===null||typeof e>"u"||$_(t,e,n,r))return!0;
vendor: 5,200 bytes, lines 33-34
33if(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 xt(t,e,n,r,i,s,l){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=l}var ft={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){ft[t]=new xt(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];ft[e]=new xt(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){ft[t]=new xt(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){ft[t]=new xt(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){ft[t]=new xt(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){ft[t]=new xt(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){ft[t]=new xt(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){ft[t]=new xt(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){ft[t]=new xt(t,5,!1,t.toLowerCase(),null,!1,!1)});var nd=/[\-:]([a-z])/g;function rd(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(nd,rd);ft[e]=new xt(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(nd,rd);ft[e]=new xt(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(nd,rd);ft[e]=new xt(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){ft[t]=new xt(t,1,!1,t.toLowerCase(),null,!1,!1)});ft.xlinkHref=new xt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){ft[t]=new xt(t,1,!1,t.toLowerCase(),null,!0,!0)});function id(t,e,n,r){var i=ft.hasOwnProperty(e)?ft[e]:null;(i!==null?i.type!==0:r||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(V_(e,n,i,r)&&(n=null),r||i===null?B_(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 yr=F_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,il=Symbol.for("react.element"),Xi=Symbol.for("react.portal"),Ji=Symbol.for("react.fragment"),sd=Symbol.for("react.strict_mode"),Wu=Symbol.for("react.profiler"),Cm=Symbol.for("react.provider"),Nm=Symbol.for("react.context"),od=Symbol.for("react.forward_ref"),qu=Symbol.for("react.suspense"),Gu=Symbol.for("react.suspense_list"),ld=Symbol.for("react.memo"),xr=Symbol.for("react.lazy"),xm=Symbol.for("react.offscreen"),Jh=Symbol.iterator;function $s(t){return t===null||typeof t!="object"?null:(t=Jh&&t[Jh]||t["@@iterator"],typeof t=="function"?t:null)}var Oe=Object.assign,su;function Js(t){if(su===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);su=e&&e[1]||""}return` 34`+su+t}var ou=!1;function lu(t,e){if(!t||ou)return"";ou=!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(f){var r=f}Reflect.construct(t,[],e)}else{try{e.call()}catch(f){r=f}t.call(e.prototype)}else{try{throw Error()}catch(f){r=f}t()}}
vendor: 5,608 bytes, lines 34-37
34catch(f){if(f&&r&&typeof f.stack=="string"){for(var i=f.stack.split(` 35`),s=r.stack.split(` 36`),l=i.length-1,u=s.length-1;1<=l&&0<=u&&i[l]!==s[u];)u--;for(;1<=l&&0<=u;l--,u--)if(i[l]!==s[u]){if(l!==1||u!==1)do if(l--,u--,0>u||i[l]!==s[u]){var c=` 37`+i[l].replace(" at new "," at ");return t.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",t.displayName)),c}while(1<=l&&0<=u);break}}}finally{ou=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?Js(t):""}function H_(t){switch(t.tag){case 5:return Js(t.type);case 16:return Js("Lazy");case 13:return Js("Suspense");case 19:return Js("SuspenseList");case 0:case 2:case 15:return t=lu(t.type,!1),t;case 11:return t=lu(t.type.render,!1),t;case 1:return t=lu(t.type,!0),t;default:return""}}function Ku(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 Ji:return"Fragment";case Xi:return"Portal";case Wu:return"Profiler";case sd:return"StrictMode";case qu:return"Suspense";case Gu:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case Nm:return(t.displayName||"Context")+".Consumer";case Cm:return(t._context.displayName||"Context")+".Provider";case od:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case ld:return e=t.displayName||null,e!==null?e:Ku(t.type)||"Memo";case xr:e=t._payload,t=t._init;try{return Ku(t(e))}catch{}}return null}function W_(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 Ku(e);case 8:return e===sd?"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 Qr(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Am(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function q_(t){var e=Am(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(l){r=""+l,s.call(this,l)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function sl(t){t._valueTracker||(t._valueTracker=q_(t))}function Rm(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=Am(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function ql(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 Qu(t,e){var n=e.checked;return Oe({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function Yh(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=Qr(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 Pm(t,e){e=e.checked,e!=null&&id(t,"checked",e,!1)}function Xu(t,e){Pm(t,e);var n=Qr(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")?Ju(t,e.type,n):e.hasOwnProperty("defaultValue")&&Ju(t,e.type,Qr(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function Zh(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 Ju(t,e,n){(e!=="number"||ql(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Ys=Array.isArray;function as(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=""+Qr(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 Yu(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(B(91));return Oe({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function ef(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(B(92));if(Ys(n)){if(1<n.length)throw Error(B(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:Qr(n)}}
vendor: 11,121 bytes, line 37
37function Om(t,e){var n=Qr(e.value),r=Qr(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 tf(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function Lm(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 Zu(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?Lm(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var ol,jm=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(ol=ol||document.createElement("div"),ol.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=ol.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function So(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var to={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},G_=["Webkit","ms","Moz","O"];Object.keys(to).forEach(function(t){G_.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),to[e]=to[t]})});function bm(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||to.hasOwnProperty(t)&&to[t]?(""+e).trim():e+"px"}function Dm(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=bm(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var K_=Oe({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 ec(t,e){if(e){if(K_[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(B(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(B(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(B(61))}if(e.style!=null&&typeof e.style!="object")throw Error(B(62))}}function tc(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 nc=null;function ad(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var rc=null,us=null,cs=null;function nf(t){if(t=Vo(t)){if(typeof rc!="function")throw Error(B(280));var e=t.stateNode;e&&(e=ba(e),rc(t.stateNode,t.type,e))}}function Mm(t){us?cs?cs.push(t):cs=[t]:us=t}function Um(){if(us){var t=us,e=cs;if(cs=us=null,nf(t),e)for(t=0;t<e.length;t++)nf(e[t])}}function Fm(t,e){return t(e)}function zm(){}var au=!1;function Bm(t,e,n){if(au)return t(e,n);au=!0;try{return Fm(t,e,n)}finally{au=!1,(us!==null||cs!==null)&&(zm(),Um())}}function Eo(t,e){var n=t.stateNode;if(n===null)return null;var r=ba(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(B(231,e,typeof n));return n}var ic=!1;if(dr)try{var Vs={};Object.defineProperty(Vs,"passive",{get:function(){ic=!0}}),window.addEventListener("test",Vs,Vs),window.removeEventListener("test",Vs,Vs)}catch{ic=!1}function Q_(t,e,n,r,i,s,l,u,c){var f=Array.prototype.slice.call(arguments,3);try{e.apply(n,f)}catch(_){this.onError(_)}}var no=!1,Gl=null,Kl=!1,sc=null,X_={onError:function(t){no=!0,Gl=t}};function J_(t,e,n,r,i,s,l,u,c){no=!1,Gl=null,Q_.apply(X_,arguments)}function Y_(t,e,n,r,i,s,l,u,c){if(J_.apply(this,arguments),no){if(no){var f=Gl;no=!1,Gl=null}else throw Error(B(198));Kl||(Kl=!0,sc=f)}}function zi(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function $m(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 rf(t){if(zi(t)!==t)throw Error(B(188))}function Z_(t){var e=t.alternate;if(!e){if(e=zi(t),e===null)throw Error(B(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 rf(i),t;if(s===r)return rf(i),e;s=s.sibling}throw Error(B(188))}if(n.return!==r.return)n=i,r=s;else{for(var l=!1,u=i.child;u;){if(u===n){l=!0,n=i,r=s;break}if(u===r){l=!0,r=i,n=s;break}u=u.sibling}if(!l){for(u=s.child;u;){if(u===n){l=!0,n=s,r=i;break}if(u===r){l=!0,r=s,n=i;break}u=u.sibling}if(!l)throw Error(B(189))}}if(n.alternate!==r)throw Error(B(190))}if(n.tag!==3)throw Error(B(188));return n.stateNode.current===n?t:e}function Vm(t){return t=Z_(t),t!==null?Hm(t):null}function Hm(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=Hm(t);if(e!==null)return e;t=t.sibling}return null}var Wm=Jt.unstable_scheduleCallback,sf=Jt.unstable_cancelCallback,ew=Jt.unstable_shouldYield,tw=Jt.unstable_requestPaint,$e=Jt.unstable_now,nw=Jt.unstable_getCurrentPriorityLevel,ud=Jt.unstable_ImmediatePriority,qm=Jt.unstable_UserBlockingPriority,Ql=Jt.unstable_NormalPriority,rw=Jt.unstable_LowPriority,Gm=Jt.unstable_IdlePriority,Pa=null,Xn=null;function iw(t){if(Xn&&typeof Xn.onCommitFiberRoot=="function")try{Xn.onCommitFiberRoot(Pa,t,void 0,(t.current.flags&128)===128)}catch{}}var An=Math.clz32?Math.clz32:lw,sw=Math.log,ow=Math.LN2;function lw(t){return t>>>=0,t===0?32:31-(sw(t)/ow|0)|0}var ll=64,al=4194304;function Zs(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 Xl(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,s=t.pingedLanes,l=n&268435455;if(l!==0){var u=l&~i;u!==0?r=Zs(u):(s&=l,s!==0&&(r=Zs(s)))}else l=n&~i,l!==0?r=Zs(l):s!==0&&(r=Zs(s));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,s=e&-e,i>=s||i===16&&(s&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0<e;)n=31-An(e),i=1<<n,r|=t[n],e&=~i;return r}function aw(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 uw(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,i=t.expirationTimes,s=t.pendingLanes;0<s;){var l=31-An(s),u=1<<l,c=i[l];c===-1?(!(u&n)||u&r)&&(i[l]=aw(u,e)):c<=e&&(t.expiredLanes|=u),s&=~u}}function oc(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function Km(){var t=ll;return ll<<=1,!(ll&4194240)&&(ll=64),t}function uu(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function Bo(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-An(e),t[e]=n}function cw(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-An(n),s=1<<i;e[i]=0,r[i]=-1,t[i]=-1,n&=~s}}function cd(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-An(n),i=1<<r;i&e|t[r]&e&&(t[r]|=e),n&=~i}}var we=0;function Qm(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var Xm,dd,Jm,Ym,Zm,lc=!1,ul=[],Fr=null,zr=null,Br=null,ko=new Map,Io=new Map,Rr=[],dw="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 of(t,e){switch(t){case"focusin":case"focusout":Fr=null;break;case"dragenter":case"dragleave":zr=null;break;case"mouseover":case"mouseout":Br=null;break;case"pointerover":case"pointerout":ko.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Io.delete(e.pointerId)}}function Hs(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=Vo(e),e!==null&&dd(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),t)}function hw(t,e,n,r,i){switch(e){case"focusin":return Fr=Hs(Fr,t,e,n,r,i),!0;case"dragenter":return zr=Hs(zr,t,e,n,r,i),!0;case"mouseover":return Br=Hs(Br,t,e,n,r,i),!0;case"pointerover":var s=i.pointerId;return ko.set(s,Hs(ko.get(s)||null,t,e,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,Io.set(s,Hs(Io.get(s)||null,t,e,n,r,i)),!0}return!1}function eg(t){var e=yi(t.target);if(e!==null){var n=zi(e);if(n!==null){if(e=n.tag,e===13){if(e=$m(n),e!==null){t.blockedOn=e,Zm(t.priority,function(){Jm(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 Al(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=ac(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var r=new n.constructor(n.type,n);nc=r,n.target.dispatchEvent(r),nc=null}else return e=Vo(n),e!==null&&dd(e),t.blockedOn=n,!1;e.shift()}return!0}function lf(t,e,n){Al(t)&&n.delete(e)}function fw(){lc=!1,Fr!==null&&Al(Fr)&&(Fr=null),zr!==null&&Al(zr)&&(zr=null),Br!==null&&Al(Br)&&(Br=null),k
vendor: 11,476 bytes, line 37
37o.forEach(lf),Io.forEach(lf)}function Ws(t,e){t.blockedOn===e&&(t.blockedOn=null,lc||(lc=!0,Jt.unstable_scheduleCallback(Jt.unstable_NormalPriority,fw)))}function To(t){function e(i){return Ws(i,t)}if(0<ul.length){Ws(ul[0],t);for(var n=1;n<ul.length;n++){var r=ul[n];r.blockedOn===t&&(r.blockedOn=null)}}for(Fr!==null&&Ws(Fr,t),zr!==null&&Ws(zr,t),Br!==null&&Ws(Br,t),ko.forEach(e),Io.forEach(e),n=0;n<Rr.length;n++)r=Rr[n],r.blockedOn===t&&(r.blockedOn=null);for(;0<Rr.length&&(n=Rr[0],n.blockedOn===null);)eg(n),n.blockedOn===null&&Rr.shift()}var ds=yr.ReactCurrentBatchConfig,Jl=!0;function pw(t,e,n,r){var i=we,s=ds.transition;ds.transition=null;try{we=1,hd(t,e,n,r)}finally{we=i,ds.transition=s}}function mw(t,e,n,r){var i=we,s=ds.transition;ds.transition=null;try{we=4,hd(t,e,n,r)}finally{we=i,ds.transition=s}}function hd(t,e,n,r){if(Jl){var i=ac(t,e,n,r);if(i===null)_u(t,e,r,Yl,n),of(t,r);else if(hw(i,t,e,n,r))r.stopPropagation();else if(of(t,r),e&4&&-1<dw.indexOf(t)){for(;i!==null;){var s=Vo(i);if(s!==null&&Xm(s),s=ac(t,e,n,r),s===null&&_u(t,e,r,Yl,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else _u(t,e,r,null,n)}}var Yl=null;function ac(t,e,n,r){if(Yl=null,t=ad(r),t=yi(t),t!==null)if(e=zi(t),e===null)t=null;else if(n=e.tag,n===13){if(t=$m(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 Yl=t,null}function tg(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(nw()){case ud:return 1;case qm:return 4;case Ql:case rw:return 16;case Gm:return 536870912;default:return 16}default:return 16}}var Mr=null,fd=null,Rl=null;function ng(){if(Rl)return Rl;var t,e=fd,n=e.length,r,i="value"in Mr?Mr.value:Mr.textContent,s=i.length;for(t=0;t<n&&e[t]===i[t];t++);var l=n-t;for(r=1;r<=l&&e[n-r]===i[s-r];r++);return Rl=i.slice(t,1<r?1-r:void 0)}function Pl(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 cl(){return!0}function af(){return!1}function Zt(t){function e(n,r,i,s,l){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=l,this.currentTarget=null;for(var u in t)t.hasOwnProperty(u)&&(n=t[u],this[u]=n?n(s):s[u]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?cl:af,this.isPropagationStopped=af,this}return Oe(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=cl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=cl)},persist:function(){},isPersistent:cl}),e}var As={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},pd=Zt(As),$o=Oe({},As,{view:0,detail:0}),gw=Zt($o),cu,du,qs,Oa=Oe({},$o,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:md,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!==qs&&(qs&&t.type==="mousemove"?(cu=t.screenX-qs.screenX,du=t.screenY-qs.screenY):du=cu=0,qs=t),cu)},movementY:function(t){return"movementY"in t?t.movementY:du}}),uf=Zt(Oa),yw=Oe({},Oa,{dataTransfer:0}),vw=Zt(yw),_w=Oe({},$o,{relatedTarget:0}),hu=Zt(_w),ww=Oe({},As,{animationName:0,elapsedTime:0,pseudoElement:0}),Sw=Zt(ww),Ew=Oe({},As,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),kw=Zt(Ew),Iw=Oe({},As,{data:0}),cf=Zt(Iw),Tw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Cw={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"},Nw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xw(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=Nw[t])?!!e[t]:!1}function md(){return xw}var Aw=Oe({},$o,{key:function(t){if(t.key){var e=Tw[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Pl(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Cw[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:md,charCode:function(t){return t.type==="keypress"?Pl(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Pl(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Rw=Zt(Aw),Pw=Oe({},Oa,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),df=Zt(Pw),Ow=Oe({},$o,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:md}),Lw=Zt(Ow),jw=Oe({},As,{propertyName:0,elapsedTime:0,pseudoElement:0}),bw=Zt(jw),Dw=Oe({},Oa,{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}),Mw=Zt(Dw),Uw=[9,13,27,32],gd=dr&&"CompositionEvent"in window,ro=null;dr&&"documentMode"in document&&(ro=document.documentMode);var Fw=dr&&"TextEvent"in window&&!ro,rg=dr&&(!gd||ro&&8<ro&&11>=ro),hf=" ",ff=!1;function ig(t,e){switch(t){case"keyup":return Uw.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function sg(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Yi=!1;function zw(t,e){switch(t){case"compositionend":return sg(e);case"keypress":return e.which!==32?null:(ff=!0,hf);case"textInput":return t=e.data,t===hf&&ff?null:t;default:return null}}function Bw(t,e){if(Yi)return t==="compositionend"||!gd&&ig(t,e)?(t=ng(),Rl=fd=Mr=null,Yi=!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 rg&&e.locale!=="ko"?null:e.data;default:return null}}var $w={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 pf(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!$w[t.type]:e==="textarea"}function og(t,e,n,r){Mm(r),e=Zl(e,"onChange"),0<e.length&&(n=new pd("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var io=null,Co=null;function Vw(t){yg(t,0)}function La(t){var e=ts(t);if(Rm(e))return t}function Hw(t,e){if(t==="change")return e}var lg=!1;if(dr){var fu;if(dr){var pu="oninput"in document;if(!pu){var mf=document.createElement("div");mf.setAttribute("oninput","return;"),pu=typeof mf.oninput=="function"}fu=pu}else fu=!1;lg=fu&&(!document.documentMode||9<document.documentMode)}function gf(){io&&(io.detachEvent("onpropertychange",ag),Co=io=null)}function ag(t){if(t.propertyName==="value"&&La(Co)){var e=[];og(e,Co,t,ad(t)),Bm(Vw,e)}}function Ww(t,e,n){t==="focusin"?(gf(),io=e,Co=n,io.attachEvent("onpropertychange",ag)):t==="focusout"&&gf()}function qw(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return La(Co)}function Gw(t,e){if(t==="click")return La(e)}function Kw(t,e){if(t==="input"||t==="change")return La(e)}function Qw(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var On=typeof Object.is=="function"?Object.is:Qw;function No(t,e){if(On(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(!Hu.call(e,i)||!On(t[i],e[i]))return!1}return!0}function yf(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function vf(t,e){var n=yf(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=yf(n)}}function ug(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?ug(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function cg(){for(var t=window,e=ql();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=ql(t.document)}return e}function yd(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 Xw(t){var e=cg(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&ug(n.ownerDocument.documentElement,n)){if(r!==null&&yd(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=vf(n,s);var l=vf(n,r);i&&l&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==l.node||t.focusOffset!==l.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),s>r?(t.addRange(e),t.extend(l.node,l.offset)):(e.setEnd(l.node,l.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 Jw=dr&&"documentMode"in document&&11>
vendor: 4,874 bytes, line 37
37=document.documentMode,Zi=null,uc=null,so=null,cc=!1;function _f(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;cc||Zi==null||Zi!==ql(r)||(r=Zi,"selectionStart"in r&&yd(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),so&&No(so,r)||(so=r,r=Zl(uc,"onSelect"),0<r.length&&(e=new pd("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=Zi)))}function dl(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var es={animationend:dl("Animation","AnimationEnd"),animationiteration:dl("Animation","AnimationIteration"),animationstart:dl("Animation","AnimationStart"),transitionend:dl("Transition","TransitionEnd")},mu={},dg={};dr&&(dg=document.createElement("div").style,"AnimationEvent"in window||(delete es.animationend.animation,delete es.animationiteration.animation,delete es.animationstart.animation),"TransitionEvent"in window||delete es.transitionend.transition);function ja(t){if(mu[t])return mu[t];if(!es[t])return t;var e=es[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in dg)return mu[t]=e[n];return t}var hg=ja("animationend"),fg=ja("animationiteration"),pg=ja("animationstart"),mg=ja("transitionend"),gg=new Map,wf="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 ei(t,e){gg.set(t,e),Fi(e,[t])}for(var gu=0;gu<wf.length;gu++){var yu=wf[gu],Yw=yu.toLowerCase(),Zw=yu[0].toUpperCase()+yu.slice(1);ei(Yw,"on"+Zw)}ei(hg,"onAnimationEnd");ei(fg,"onAnimationIteration");ei(pg,"onAnimationStart");ei("dblclick","onDoubleClick");ei("focusin","onFocus");ei("focusout","onBlur");ei(mg,"onTransitionEnd");vs("onMouseEnter",["mouseout","mouseover"]);vs("onMouseLeave",["mouseout","mouseover"]);vs("onPointerEnter",["pointerout","pointerover"]);vs("onPointerLeave",["pointerout","pointerover"]);Fi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Fi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Fi("onBeforeInput",["compositionend","keypress","textInput","paste"]);Fi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Fi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Fi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var eo="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(" "),e0=new Set("cancel close invalid load scroll toggle".split(" ").concat(eo));function Sf(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,Y_(r,e,void 0,t),t.currentTarget=null}function yg(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 l=r.length-1;0<=l;l--){var u=r[l],c=u.instance,f=u.currentTarget;if(u=u.listener,c!==s&&i.isPropagationStopped())break e;Sf(i,u,f),s=c}else for(l=0;l<r.length;l++){if(u=r[l],c=u.instance,f=u.currentTarget,u=u.listener,c!==s&&i.isPropagationStopped())break e;Sf(i,u,f),s=c}}}if(Kl)throw t=sc,Kl=!1,sc=null,t}function Ce(t,e){var n=e[mc];n===void 0&&(n=e[mc]=new Set);var r=t+"__bubble";n.has(r)||(vg(e,t,2,!1),n.add(r))}function vu(t,e,n){var r=0;e&&(r|=4),vg(n,t,r,e)}var hl="_reactListening"+Math.random().toString(36).slice(2);function xo(t){if(!t[hl]){t[hl]=!0,Tm.forEach(function(n){n!=="selectionchange"&&(e0.has(n)||vu(n,!1,t),vu(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[hl]||(e[hl]=!0,vu("selectionchange",!1,e))}}function vg(t,e,n,r){switch(tg(e)){case 1:var i=pw;break;case 4:i=mw;break;default:i=hd}n=i.bind(null,e,n,t),i=void 0,!ic||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 _u(t,e,n,r,i){var s=r;if(!(e&1)&&!(e&2)&&r!==null)e:for(;;){if(r===null)return;var l=r.tag;if(l===3||l===4){var u=r.stateNode.containerInfo;
vendor: 2,527 bytes, line 37
37if(u===i||u.nodeType===8&&u.parentNode===i)break;if(l===4)for(l=r.return;l!==null;){var c=l.tag;if((c===3||c===4)&&(c=l.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;l=l.return}for(;u!==null;){if(l=yi(u),l===null)return;if(c=l.tag,c===5||c===6){r=s=l;continue e}u=u.parentNode}}r=r.return}Bm(function(){var f=s,_=ad(n),k=[];e:{var E=gg.get(t);if(E!==void 0){var L=pd,A=t;switch(t){case"keypress":if(Pl(n)===0)break e;case"keydown":case"keyup":L=Rw;break;case"focusin":A="focus",L=hu;break;case"focusout":A="blur",L=hu;break;case"beforeblur":case"afterblur":L=hu;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":L=uf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":L=vw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":L=Lw;break;case hg:case fg:case pg:L=Sw;break;case mg:L=bw;break;case"scroll":L=gw;break;case"wheel":L=Mw;break;case"copy":case"cut":case"paste":L=kw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":L=df}var P=(e&4)!==0,D=!P&&t==="scroll",I=P?E!==null?E+"Capture":null:E;P=[];for(var v=f,C;v!==null;){C=v;var O=C.stateNode;if(C.tag===5&&O!==null&&(C=O,I!==null&&(O=Eo(v,I),O!=null&&P.push(Ao(v,O,C)))),D)break;v=v.return}0<P.length&&(E=new L(E,A,null,n,_),k.push({event:E,listeners:P}))}}if(!(e&7)){e:{if(E=t==="mouseover"||t==="pointerover",L=t==="mouseout"||t==="pointerout",E&&n!==nc&&(A=n.relatedTarget||n.fromElement)&&(yi(A)||A[hr]))break e;if((L||E)&&(E=_.window===_?_:(E=_.ownerDocument)?E.defaultView||E.parentWindow:window,L?(A=n.relatedTarget||n.toElement,L=f,A=A?yi(A):null,A!==null&&(D=zi(A),A!==D||A.tag!==5&&A.tag!==6)&&(A=null)):(L=null,A=f),L!==A)){if(P=uf,O="onMouseLeave",I="onMouseEnter",v="mouse",(t==="pointerout"||t==="pointerover")&&(P=df,O="onPointerLeave",I="onPointerEnter",v="pointer"),D=L==null?E:ts(L),C=A==null?E:ts(A),E=new P(O,v+"leave",L,n,_),E.target=D,E.relatedTarget=C,O=null,yi(_)===f&&(P=new P(I,v+"enter",A,n,_),P.target=C,P.relatedTarget=D,O=P),D=O,L&&A)t:{for(P=L,I=A,v=0,C=P;C;C=Gi(C))v++;for(C=0,O=I;O;O=Gi(O))C++;for(;0<v-C;)P=Gi(P),v--;for(;0<C-v;)I=Gi(I),C--;for(;v--;){if(P===I||I!==null&&P===I.alternate)break t;P=Gi(P),I=Gi(I)}P=null}else P=null;L!==null&&Ef(k,E,L,P,!1),A!==null&&D!==null&&Ef(k,D,A,P,!0)}}
vendor: 7,023 bytes, lines 37-38
37e:{if(E=f?ts(f):window,L=E.nodeName&&E.nodeName.toLowerCase(),L==="select"||L==="input"&&E.type==="file")var U=Hw;else if(pf(E))if(lg)U=Kw;else{U=qw;var M=Ww}else(L=E.nodeName)&&L.toLowerCase()==="input"&&(E.type==="checkbox"||E.type==="radio")&&(U=Gw);if(U&&(U=U(t,f))){og(k,U,n,_);break e}M&&M(t,E,f),t==="focusout"&&(M=E._wrapperState)&&M.controlled&&E.type==="number"&&Ju(E,"number",E.value)}switch(M=f?ts(f):window,t){case"focusin":(pf(M)||M.contentEditable==="true")&&(Zi=M,uc=f,so=null);break;case"focusout":so=uc=Zi=null;break;case"mousedown":cc=!0;break;case"contextmenu":case"mouseup":case"dragend":cc=!1,_f(k,n,_);break;case"selectionchange":if(Jw)break;case"keydown":case"keyup":_f(k,n,_)}var y;if(gd)e:{switch(t){case"compositionstart":var p="onCompositionStart";break e;case"compositionend":p="onCompositionEnd";break e;case"compositionupdate":p="onCompositionUpdate";break e}p=void 0}else Yi?ig(t,n)&&(p="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(p="onCompositionStart");p&&(rg&&n.locale!=="ko"&&(Yi||p!=="onCompositionStart"?p==="onCompositionEnd"&&Yi&&(y=ng()):(Mr=_,fd="value"in Mr?Mr.value:Mr.textContent,Yi=!0)),M=Zl(f,p),0<M.length&&(p=new cf(p,t,null,n,_),k.push({event:p,listeners:M}),y?p.data=y:(y=sg(n),y!==null&&(p.data=y)))),(y=Fw?zw(t,n):Bw(t,n))&&(f=Zl(f,"onBeforeInput"),0<f.length&&(_=new cf("onBeforeInput","beforeinput",null,n,_),k.push({event:_,listeners:f}),_.data=y))}yg(k,e)})}function Ao(t,e,n){return{instance:t,listener:e,currentTarget:n}}function Zl(t,e){for(var n=e+"Capture",r=[];t!==null;){var i=t,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Eo(t,n),s!=null&&r.unshift(Ao(t,s,i)),s=Eo(t,e),s!=null&&r.push(Ao(t,s,i))),t=t.return}return r}function Gi(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function Ef(t,e,n,r,i){for(var s=e._reactName,l=[];n!==null&&n!==r;){var u=n,c=u.alternate,f=u.stateNode;if(c!==null&&c===r)break;u.tag===5&&f!==null&&(u=f,i?(c=Eo(n,s),c!=null&&l.unshift(Ao(n,c,u))):i||(c=Eo(n,s),c!=null&&l.push(Ao(n,c,u)))),n=n.return}l.length!==0&&t.push({event:e,listeners:l})}var t0=/\r\n?/g,n0=/\u0000|\uFFFD/g;function kf(t){return(typeof t=="string"?t:""+t).replace(t0,` 38`).replace(n0,"")}function fl(t,e,n){if(e=kf(e),kf(t)!==e&&n)throw Error(B(425))}function ea(){}var dc=null,hc=null;function fc(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 pc=typeof setTimeout=="function"?setTimeout:void 0,r0=typeof clearTimeout=="function"?clearTimeout:void 0,If=typeof Promise=="function"?Promise:void 0,i0=typeof queueMicrotask=="function"?queueMicrotask:typeof If<"u"?function(t){return If.resolve(null).then(t).catch(s0)}:pc;function s0(t){setTimeout(function(){throw t})}function wu(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),To(e);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);To(e)}function $r(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 Tf(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 Rs=Math.random().toString(36).slice(2),Gn="__reactFiber$"+Rs,Ro="__reactProps$"+Rs,hr="__reactContainer$"+Rs,mc="__reactEvents$"+Rs,o0="__reactListeners$"+Rs,l0="__reactHandles$"+Rs;function yi(t){var e=t[Gn];if(e)return e;for(var n=t.parentNode;n;){if(e=n[hr]||n[Gn]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=Tf(t);t!==null;){if(n=t[Gn])return n;t=Tf(t)}return e}t=n,n=t.parentNode}return null}function Vo(t){return t=t[Gn]||t[hr],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function ts(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(B(33))}function ba(t){return t[Ro]||null}var gc=[],ns=-1;function ti(t){return{current:t}}function Ne(t){0>ns||(t.current=gc[ns],gc[ns]=null,ns--)}function Ie(t,e){ns++,gc[ns]=t.current,t.current=e}var Xr={},vt=ti(Xr),Ut=ti(!1),Ai=Xr;function _s(t,e){var n=t.type.contextTypes;if(!n)return Xr;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 Ft(t){return t=t.childContextTypes,t!=null}function ta(){Ne(Ut),Ne(vt)}function Cf(t,e,n){if(vt.current!==Xr)throw Error(B(168));Ie(vt,e),Ie(Ut,n)}function _g(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(B(108,W_(t)||"Unknown",i));return Oe({},n,r)}function na(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Xr,Ai=vt.current,Ie(vt,t),Ie(Ut,Ut.current),!0}function Nf(t,e,n){var r=t.stateNode;if(!r)throw Error(B(169));n?(t=_g(t,e,Ai),r.__reactInternalMemoizedMergedChildContext=t,Ne(Ut),Ne(vt),Ie(vt,t)):Ne(Ut),Ie(Ut,n)}var rr=null,Da=!1,Su=!1;function wg(t){rr===null?rr=[t]:rr.push(t)}function a0(t){Da=!0,wg(t)}function ni(){if(!Su&&rr!==null){Su=!0;var t=0,e=we;try{var n=rr;for(we=1;t<n.length;t++){var r=n[t];do r=r(!0);while(r!==null)}rr=null,Da=!1}catch(i){throw rr!==null&&(rr=rr.slice(t+1)),Wm(ud,ni),i}finally{we=e,Su=!1}}return null}var rs=[],is=0,ra=null,ia=0,un=[],cn=0,Ri=null,or=1,lr="";function hi(t,e){rs[is++]=ia,rs[is++]=ra,ra=t,ia=e}function Sg(t,e,n){un[cn++]=or,un[cn++]=lr,un[cn++]=Ri,Ri=t;var r=or;t=lr;var i=32-An(r)-1;r&=~(1<<i),n+=1;var s=32-An(e)+i;if(30<s){var l=i-i%5;s=(r&(1<<l)-1).toString(32),r>>=l,i-=l,or=1<<32-An(e)+i|n<<i|r,lr=s+t}else or=1<<s|n<<i|r,lr=t}function vd(t){t.return!==null&&(hi(t,1),Sg(t,1,0))}function _d(t){for(;t===ra;)ra=rs[--is],rs[is]=null,ia=rs[--is],rs[is]=null;for(;t===Ri;)Ri=un[--cn],un[cn]=null,lr=un[--cn],un[cn]=null,or=un[--cn],un[cn]=null}var Xt=null,Kt=null,xe=!1,Tn=null;function Eg(t,e){var n=hn(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 xf(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,Xt=t,Kt=$r(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,Xt=t,Kt=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=Ri!==null?{id:or,overflow:lr}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=hn(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,Xt=t,Kt=null,!0):!1;default:return!1}}function yc(t){return(t.mode&1)!==0&&(t.flags&128)===0}function vc(t){if(xe){var e=Kt;if(e){var n=e;if(!xf(t,e)){if(yc(t))throw Error(B(418));e=$r(n.nextSibling);var r=Xt;
vendor: 26,186 bytes, lines 38-40
38e&&xf(t,e)?Eg(r,n):(t.flags=t.flags&-4097|2,xe=!1,Xt=t)}}else{if(yc(t))throw Error(B(418));t.flags=t.flags&-4097|2,xe=!1,Xt=t}}}function Af(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;Xt=t}function pl(t){if(t!==Xt)return!1;if(!xe)return Af(t),xe=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!fc(t.type,t.memoizedProps)),e&&(e=Kt)){if(yc(t))throw kg(),Error(B(418));for(;e;)Eg(t,e),e=$r(e.nextSibling)}if(Af(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(B(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){Kt=$r(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}Kt=null}}else Kt=Xt?$r(t.stateNode.nextSibling):null;return!0}function kg(){for(var t=Kt;t;)t=$r(t.nextSibling)}function ws(){Kt=Xt=null,xe=!1}function wd(t){Tn===null?Tn=[t]:Tn.push(t)}var u0=yr.ReactCurrentBatchConfig;function Gs(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(B(309));var r=n.stateNode}if(!r)throw Error(B(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(l){var u=i.refs;l===null?delete u[s]:u[s]=l},e._stringRef=s,e)}if(typeof t!="string")throw Error(B(284));if(!n._owner)throw Error(B(290,t))}return t}function ml(t,e){throw t=Object.prototype.toString.call(e),Error(B(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function Rf(t){var e=t._init;return e(t._payload)}function Ig(t){function e(I,v){if(t){var C=I.deletions;C===null?(I.deletions=[v],I.flags|=16):C.push(v)}}function n(I,v){if(!t)return null;for(;v!==null;)e(I,v),v=v.sibling;return null}function r(I,v){for(I=new Map;v!==null;)v.key!==null?I.set(v.key,v):I.set(v.index,v),v=v.sibling;return I}function i(I,v){return I=qr(I,v),I.index=0,I.sibling=null,I}function s(I,v,C){return I.index=C,t?(C=I.alternate,C!==null?(C=C.index,C<v?(I.flags|=2,v):C):(I.flags|=2,v)):(I.flags|=1048576,v)}function l(I){return t&&I.alternate===null&&(I.flags|=2),I}function u(I,v,C,O){return v===null||v.tag!==6?(v=xu(C,I.mode,O),v.return=I,v):(v=i(v,C),v.return=I,v)}function c(I,v,C,O){var U=C.type;return U===Ji?_(I,v,C.props.children,O,C.key):v!==null&&(v.elementType===U||typeof U=="object"&&U!==null&&U.$$typeof===xr&&Rf(U)===v.type)?(O=i(v,C.props),O.ref=Gs(I,v,C),O.return=I,O):(O=Ul(C.type,C.key,C.props,null,I.mode,O),O.ref=Gs(I,v,C),O.return=I,O)}function f(I,v,C,O){return v===null||v.tag!==4||v.stateNode.containerInfo!==C.containerInfo||v.stateNode.implementation!==C.implementation?(v=Au(C,I.mode,O),v.return=I,v):(v=i(v,C.children||[]),v.return=I,v)}function _(I,v,C,O,U){return v===null||v.tag!==7?(v=ki(C,I.mode,O,U),v.return=I,v):(v=i(v,C),v.return=I,v)}function k(I,v,C){if(typeof v=="string"&&v!==""||typeof v=="number")return v=xu(""+v,I.mode,C),v.return=I,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case il:return C=Ul(v.type,v.key,v.props,null,I.mode,C),C.ref=Gs(I,null,v),C.return=I,C;case Xi:return v=Au(v,I.mode,C),v.return=I,v;case xr:var O=v._init;return k(I,O(v._payload),C)}if(Ys(v)||$s(v))return v=ki(v,I.mode,C,null),v.return=I,v;ml(I,v)}return null}function E(I,v,C,O){var U=v!==null?v.key:null;if(typeof C=="string"&&C!==""||typeof C=="number")return U!==null?null:u(I,v,""+C,O);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case il:return C.key===U?c(I,v,C,O):null;case Xi:return C.key===U?f(I,v,C,O):null;case xr:return U=C._init,E(I,v,U(C._payload),O)}if(Ys(C)||$s(C))return U!==null?null:_(I,v,C,O,null);ml(I,C)}return null}function L(I,v,C,O,U){if(typeof O=="string"&&O!==""||typeof O=="number")return I=I.get(C)||null,u(v,I,""+O,U);if(typeof O=="object"&&O!==null){switch(O.$$typeof){case il:return I=I.get(O.key===null?C:O.key)||null,c(v,I,O,U);case Xi:return I=I.get(O.key===null?C:O.key)||null,f(v,I,O,U);case xr:var M=O._init;return L(I,v,C,M(O._payload),U)}if(Ys(O)||$s(O))return I=I.get(C)||null,_(v,I,O,U,null);ml(v,O)}return null}function A(I,v,C,O){for(var U=null,M=null,y=v,p=v=0,g=null;y!==null&&p<C.length;p++){y.index>p?(g=y,y=null):g=y.sibling;var S=E(I,y,C[p],O);if(S===null){y===null&&(y=g);break}t&&y&&S.alternate===null&&e(I,y),v=s(S,v,p),M===null?U=S:M.sibling=S,M=S,y=g}if(p===C.length)return n(I,y),xe&&hi(I,p),U;if(y===null){for(;p<C.length;p++)y=k(I,C[p],O),y!==null&&(v=s(y,v,p),M===null?U=y:M.sibling=y,M=y);return xe&&hi(I,p),U}for(y=r(I,y);p<C.length;p++)g=L(y,I,p,C[p],O),g!==null&&(t&&g.alternate!==null&&y.delete(g.key===null?p:g.key),v=s(g,v,p),M===null?U=g:M.sibling=g,M=g);return t&&y.forEach(function(T){return e(I,T)}),xe&&hi(I,p),U}function P(I,v,C,O){var U=$s(C);if(typeof U!="function")throw Error(B(150));if(C=U.call(C),C==null)throw Error(B(151));for(var M=U=null,y=v,p=v=0,g=null,S=C.next();y!==null&&!S.done;p++,S=C.next()){y.index>p?(g=y,y=null):g=y.sibling;var T=E(I,y,S.value,O);if(T===null){y===null&&(y=g);break}t&&y&&T.alternate===null&&e(I,y),v=s(T,v,p),M===null?U=T:M.sibling=T,M=T,y=g}if(S.done)return n(I,y),xe&&hi(I,p),U;if(y===null){for(;!S.done;p++,S=C.next())S=k(I,S.value,O),S!==null&&(v=s(S,v,p),M===null?U=S:M.sibling=S,M=S);return xe&&hi(I,p),U}for(y=r(I,y);!S.done;p++,S=C.next())S=L(y,I,p,S.value,O),S!==null&&(t&&S.alternate!==null&&y.delete(S.key===null?p:S.key),v=s(S,v,p),M===null?U=S:M.sibling=S,M=S);return t&&y.forEach(function(x){return e(I,x)}),xe&&hi(I,p),U}function D(I,v,C,O){if(typeof C=="object"&&C!==null&&C.type===Ji&&C.key===null&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case il:e:{for(var U=C.key,M=v;M!==null;){if(M.key===U){if(U=C.type,U===Ji){if(M.tag===7){n(I,M.sibling),v=i(M,C.props.children),v.return=I,I=v;break e}}else if(M.elementType===U||typeof U=="object"&&U!==null&&U.$$typeof===xr&&Rf(U)===M.type){n(I,M.sibling),v=i(M,C.props),v.ref=Gs(I,M,C),v.return=I,I=v;break e}n(I,M);break}else e(I,M);M=M.sibling}C.type===Ji?(v=ki(C.props.children,I.mode,O,C.key),v.return=I,I=v):(O=Ul(C.type,C.key,C.props,null,I.mode,O),O.ref=Gs(I,v,C),O.return=I,I=O)}return l(I);case Xi:e:{for(M=C.key;v!==null;){if(v.key===M)if(v.tag===4&&v.stateNode.containerInfo===C.containerInfo&&v.stateNode.implementation===C.implementation){n(I,v.sibling),v=i(v,C.children||[]),v.return=I,I=v;break e}else{n(I,v);break}else e(I,v);v=v.sibling}v=Au(C,I.mode,O),v.return=I,I=v}return l(I);case xr:return M=C._init,D(I,v,M(C._payload),O)}if(Ys(C))return A(I,v,C,O);if($s(C))return P(I,v,C,O);ml(I,C)}return typeof C=="string"&&C!==""||typeof C=="number"?(C=""+C,v!==null&&v.tag===6?(n(I,v.sibling),v=i(v,C),v.return=I,I=v):(n(I,v),v=xu(C,I.mode,O),v.return=I,I=v),l(I)):n(I,v)}return D}var Ss=Ig(!0),Tg=Ig(!1),sa=ti(null),oa=null,ss=null,Sd=null;function Ed(){Sd=ss=oa=null}function kd(t){var e=sa.current;Ne(sa),t._currentValue=e}function _c(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 hs(t,e){oa=t,Sd=ss=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(Mt=!0),t.firstContext=null)}function pn(t){var e=t._currentValue;if(Sd!==t)if(t={context:t,memoizedValue:e,next:null},ss===null){if(oa===null)throw Error(B(308));ss=t,oa.dependencies={lanes:0,firstContext:t}}else ss=ss.next=t;return e}var vi=null;function Id(t){vi===null?vi=[t]:vi.push(t)}function Cg(t,e,n,r){var i=e.interleaved;return i===null?(n.next=n,Id(e)):(n.next=i.next,i.next=n),e.interleaved=n,fr(t,r)}function fr(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 Ar=!1;function Td(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ng(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 cr(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Vr(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,he&2){var i=r.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),r.pending=e,fr(t,n)}return i=r.interleaved,i===null?(e.next=e,Id(r)):(e.next=i.next,i.next=e),r.interleaved=e,fr(t,n)}function Ol(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,cd(t,n)}}function Pf(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 l={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=l:s=s.next=l,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 la(t,e,n,r){var i=t.updateQueue;Ar=!1;var s=i.firstBaseUpdate,l=i.lastBaseUpdate,u=i.shared.pending;if(u!==null){i.shared.pending=null;var c=u,f=c.next;c.next=null,l===null?s=f:l.next=f,l=c;var _=t.alternate;_!==null&&(_=_.updateQueue,u=_.lastBaseUpdate,u!==l&&(u===null?_.firstBaseUpdate=f:u.next=f,_.lastBaseUpdate=c))}if(s!==null){var k=i.baseState;l=0,_=f=c=null,u=s;do{var E=u.lane,L=u.eventTime;if((r&E)===E){_!==null&&(_=_.next={eventTime:L,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var A=t,P=u;switch(E=e,L=n,P.tag){case 1:if(A=P.payload,typeof A=="function"){k=A.call(L,k,E);break e}k=A;break e;case 3:A.flags=A.flags&-65537|128;case 0:if(A=P.payload,E=typeof A=="function"?A.call(L,k,E):A,E==null)break e;k=Oe({},k,E);break e;case 2:Ar=!0}}u.callback!==null&&u.lane!==0&&(t.flags|=64,E=i.effects,E===null?i.effects=[u]:E.push(u))}else L={eventTime:L,lane:E,tag:u.tag,payload:u.payload,callback:u.callback,next:null},_===null?(f=_=L,c=k):_=_.next=L,l|=E;if(u=u.next,u===null){if(u=i.shared.pending,u===null)break;E=u,u=E.next,E.next=null,i.lastBaseUpdate=E,i.shared.pending=null}}while(!0);if(_===null&&(c=k),i.baseState=c,i.firstBaseUpdate=f,i.lastBaseUpdate=_,e=i.shared.interleaved,e!==null){i=e;do l|=i.lane,i=i.next;while(i!==e)}else s===null&&(i.shared.lanes=0);Oi|=l,t.lanes=l,t.memoizedState=k}}function Of(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(B(191,i));i.call(r)}}}var Ho={},Jn=ti(Ho),Po=ti(Ho),Oo=ti(Ho);function _i(t){if(t===Ho)throw Error(B(174));return t}function Cd(t,e){switch(Ie(Oo,e),Ie(Po,t),Ie(Jn,Ho),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Zu(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Zu(e,t)}Ne(Jn),Ie(Jn,e)}function Es(){Ne(Jn),Ne(Po),Ne(Oo)}function xg(t){_i(Oo.current);var e=_i(Jn.current),n=Zu(e,t.type);e!==n&&(Ie(Po,t),Ie(Jn,n))}function Nd(t){Po.current===t&&(Ne(Jn),Ne(Po))}var Re=ti(0);function aa(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)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 Eu=[];function xd(){for(var t=0;t<Eu.length;t++)Eu[t]._workInProgressVersionPrimary=null;Eu.length=0}var Ll=yr.ReactCurrentDispatcher,ku=yr.ReactCurrentBatchConfig,Pi=0,Pe=null,Ye=null,it=null,ua=!1,oo=!1,Lo=0,c0=0;function mt(){throw Error(B(321))}function Ad(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!On(t[n],e[n]))return!1;return!0}function Rd(t,e,n,r,i,s){if(Pi=s,Pe=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,Ll.current=t===null||t.memoizedState===null?p0:m0,t=n(r,i),oo){s=0;do{if(oo=!1,Lo=0,25<=s)throw Error(B(301));s+=1,it=Ye=null,e.updateQueue=null,Ll.current=g0,t=n(r,i)}while(oo)}if(Ll.current=ca,e=Ye!==null&&Ye.next!==null,Pi=0,it=Ye=Pe=null,ua=!1,e)throw Error(B(300));return t}function Pd(){var t=Lo!==0;return Lo=0,t}function $n(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return it===null?Pe.memoizedState=it=t:it=it.next=t,it}function mn(){if(Ye===null){var t=Pe.alternate;t=t!==null?t.memoizedState:null}else t=Ye.next;var e=it===null?Pe.memoizedState:it.next;if(e!==null)it=e,Ye=t;else{if(t===null)throw Error(B(310));Ye=t,t={memoizedState:Ye.memoizedState,baseState:Ye.baseState,baseQueue:Ye.baseQueue,queue:Ye.queue,next:null},it===null?Pe.memoizedState=it=t:it=it.next=t}return it}function jo(t,e){return typeof e=="function"?e(t):e}function Iu(t){var e=mn(),n=e.queue;if(n===null)throw Error(B(311));n.lastRenderedReducer=t;var r=Ye,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var l=i.next;i.next=s.next,s.next=l}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var u=l=null,c=null,f=s;do{var _=f.lane;if((Pi&_)===_)c!==null&&(c=c.next={lane:0,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null}),r=f.hasEagerState?f.eagerState:t(r,f.action);else{var k={lane:_,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null};c===null?(u=c=k,l=r):c=c.next=k,Pe.lanes|=_,Oi|=_}f=f.next}while(f!==null&&f!==s);c===null?l=r:c.next=u,On(r,e.memoizedState)||(Mt=!0),e.memoizedState=r,e.baseState=l,e.baseQueue=c,n.lastRenderedState=r}if(t=n.interleaved,t!==null){i=t;do s=i.lane,Pe.lanes|=s,Oi|=s,i=i.next;while(i!==t)}else i===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function Tu(t){var e=mn(),n=e.queue;if(n===null)throw Error(B(311));n.lastRenderedReducer=t;var r=n.dispatch,i=n.pending,s=e.memoizedState;if(i!==null){n.pending=null;var l=i=i.next;do s=t(s,l.action),l=l.next;while(l!==i);On(s,e.memoizedState)||(Mt=!0),e.memoizedState=s,e.baseQueue===null&&(e.baseState=s),n.lastRenderedState=s}return[s,r]}function Ag(){}function Rg(t,e){var n=Pe,r=mn(),i=e(),s=!On(r.memoizedState,i);if(s&&(r.memoizedState=i,Mt=!0),r=r.queue,Od(Lg.bind(null,n,r,t),[t]),r.getSnapshot!==e||s||it!==null&&it.memoizedState.tag&1){if(n.flags|=2048,bo(9,Og.bind(null,n,r,i,e),void 0,null),st===null)throw Error(B(349));Pi&30||Pg(n,e,i)}return i}function Pg(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=Pe.updateQueue,e===null?(e={lastEffect:null,stores:null},Pe.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function Og(t,e,n,r){e.value=n,e.getSnapshot=r,jg(e)&&bg(t)}function Lg(t,e,n){return n(function(){jg(e)&&bg(t)})}function jg(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!On(t,n)}catch{return!0}}function bg(t){var e=fr(t,1);e!==null&&Rn(e,t,1,-1)}function Lf(t){var e=$n();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:t},e.queue=t,t=t.dispatch=f0.bind(null,Pe,t),[e.memoizedState,t]}function bo(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},e=Pe.updateQueue,e===null?(e={lastEffect:null,stores:null},Pe.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 Dg(){return mn().memoizedState}function jl(t,e,n,r){var i=$n();Pe.flags|=t,i.memoizedState=bo(1|e,n,void 0,r===void 0?null:r)}function Ma(t,e,n,r){var i=mn();r=r===void 0?null:r;var s=void 0;if(Ye!==null){var l=Ye.memoizedState;if(s=l.destroy,r!==null&&Ad(r,l.deps)){i.memoizedState=bo(e,n,s,r);return}}Pe.flags|=t,i.memoizedState=bo(1|e,n,s,r)}function jf(t,e){return jl(8390656,8,t,e)}function Od(t,e){return Ma(2048,8,t,e)}function Mg(t,e){return Ma(4,2,t,e)}function Ug(t,e){return Ma(4,4,t,e)}function Fg(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 zg(t,e,n){return n=n!=null?n.concat([t]):null,Ma(4,4,Fg.bind(null,e,t),n)}function Ld(){}function Bg(t,e){var n=mn();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&Ad(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function $g(t,e){var n=mn();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&Ad(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function Vg(t,e,n){return Pi&21?(On(n,e)||(n=Km(),Pe.lanes|=n,Oi|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,Mt=!0),t.memoizedState=n)}function d0(t,e){var n=we;we=n!==0&&4>n?n:4,t(!0);var r=ku.transition;ku.transition={};try{t(!1),e()}finally{we=n,ku.transition=r}}function Hg(){return mn().memoizedState}function h0(t,e,n){var r=Wr(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Wg(t))qg(e,n);else if(n=Cg(t,e,n,r),n!==null){var i=Tt();Rn(n,t,r,i),Gg(n,e,r)}}function f0(t,e,n){var r=Wr(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Wg(t))qg(e,i);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var l=e.lastRenderedState,u=s(l,n);if(i.hasEagerState=!0,i.eagerState=u,On(u,l)){var c=e.interleaved;c===null?(i.next=i,Id(e)):(i.next=c.next,c.next=i),e.interleaved=i;return}}catch{}finally{}n=Cg(t,e,i,r),n!==null&&(i=Tt(),Rn(n,t,r,i),Gg(n,e,r))}}function Wg(t){var e=t.alternate;return t===Pe||e!==null&&e===Pe}function qg(t,e){oo=ua=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function Gg(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,cd(t,n)}}var ca={readContext:pn,useCallback:mt,useContext:mt,useEffect:mt,useImperativeHandle:mt,useInsertionEffect:mt,useLayoutEffect:mt,useMemo:mt,useReducer:mt,useRef:mt,useState:mt,useDebugValue:mt,useDeferredValue:mt,useTransition:mt,useMutableSource:mt,useSyncExternalStore:mt,useId:mt,unstable_isNewReconciler:!1},p0={readContext:pn,useCallback:function(t,e){return $n().memoizedState=[t,e===void 0?null:e],t},useContext:pn,useEffect:jf,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,jl(4194308,4,Fg.bind(null,e,t),n)},useLayoutEffect:function(t,e){return jl(4194308,4,t,e)},useInsertionEffect:function(t,e){return jl(4,2,t,e)},useMemo:function(t,e){var n=$n();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=$n();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=h0.bind(null,Pe,t),[r.memoizedState,t]},useRef:function(t){var e=$n();return t={current:t},e.memoizedState=t},useState:Lf,useDebugValue:Ld,useDeferredValue:function(t){return $n().memoizedState=t},useTransition:function(){var t=Lf(!1),e=t[0];return t=d0.bind(null,t[1]),$n().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=Pe,i=$n();if(xe){if(n===void 0)throw Error(B(407));n=n()}else{if(n=e(),st===null)throw Error(B(349));Pi&30||Pg(r,e,n)}i.memoizedState=n;var s={value:n,getSnapshot:e};return i.queue=s,jf(Lg.bind(null,r,s,t),[t]),r.flags|=2048,bo(9,Og.bind(null,r,s,n,e),void 0,null),n},useId:function(){var t=$n(),e=st.identifierPrefix;if(xe){var n=lr,r=or;n=(r&~(1<<32-An(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=Lo++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=c0++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},m0={readContext:pn,useCallback:Bg,useContext:pn,useEffect:Od,useImperativeHandle:zg,useInsertionEffect:Mg,useLayoutEffect:Ug,useMemo:$g,useReducer:Iu,useRef:Dg,useState:function(){return Iu(jo)},useDebugValue:Ld,useDeferredValue:function(t){var e=mn();return Vg(e,Ye.memoizedState,t)},useTransition:function(){var t=Iu(jo)[0],e=mn().memoizedState;return[t,e]},useMutableSource:Ag,useSyncExternalStore:Rg,useId:Hg,unstable_isNewReconciler:!1},g0={readContext:pn,useCallback:Bg,useContext:pn,useEffect:Od,useImperativeHandle:zg,useInsertionEffect:Mg,useLayoutEffect:Ug,useMemo:$g,useReducer:Tu,useRef:Dg,useState:function(){return Tu(jo)},useDebugValue:Ld,useDeferredValue:function(t){var e=mn();return Ye===null?e.memoizedState=t:Vg(e,Ye.memoizedState,t)},useTransition:function(){var t=Tu(jo)[0],e=mn().memoizedState;return[t,e]},useMutableSource:Ag,useSyncExternalStore:Rg,useId:Hg,unstable_isNewReconciler:!1};function kn(t,e){if(t&&t.defaultProps){e=Oe({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}function wc(t,e,n,r){e=t.memoizedState,n=n(r,e),n=n==null?e:Oe({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var Ua={isMounted:function(t){return(t=t._reactInternals)?zi(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=Tt(),i=Wr(t),s=cr(r,i);s.payload=e,n!=null&&(s.callback=n),e=Vr(t,s,i),e!==null&&(Rn(e,t,i,r),Ol(e,t,i))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=Tt(),i=Wr(t),s=cr(r,i);s.tag=1,s.payload=e,n!=null&&(s.callback=n),e=Vr(t,s,i),e!==null&&(Rn(e,t,i,r),Ol(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=Tt(),r=Wr(t),i=cr(n,r);i.tag=2,e!=null&&(i.callback=e),e=Vr(t,i,r),e!==null&&(Rn(e,t,r,n),Ol(e,t,r))}};function bf(t,e,n,r,i,s,l){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,s,l):e.prototype&&e.prototype.isPureReactComponent?!No(n,r)||!No(i,s):!0}function Kg(t,e,n){var r=!1,i=Xr,s=e.contextType;return typeof s=="object"&&s!==null?s=pn(s):(i=Ft(e)?Ai:vt.current,r=e.contextTypes,s=(r=r!=null)?_s(t,i):Xr),e=new e(n,s),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=Ua,t.stateNode=e,e._reactInternals=t,r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=s),e}function Df(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&&Ua.enqueueReplaceState(e,e.state,null)}function Sc(t,e,n,r){var i=t.stateNode;i.props=n,i.state=t.memoizedState,i.refs={},Td(t);var s=e.contextType;typeof s=="object"&&s!==null?i.context=pn(s):(s=Ft(e)?Ai:vt.current,i.context=_s(t,s)),i.state=t.memoizedState,s=e.getDerivedStateFromProps,typeof s=="function"&&(wc(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&&Ua.enqueueReplaceState(i,i.state,null),la(t,n,i,r),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308)}function ks(t,e){try{var n="",r=e;do n+=H_(r),r=r.return;while(r);var i=n}catch(s){i=` 39Error generating stack: `+s.message+` 40`+s.stack}return{value:t,source:e,stack:i,digest:null}}function Cu(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function Ec(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var y0=typeof WeakMap=="function"?WeakMap:Map;function Qg(t,e,n){n=cr(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){ha||(ha=!0,Oc=r),Ec(t,e)},n}function Xg(t,e,n){n=cr(-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(){Ec(t,e)}}var s=t.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Ec(t,e),typeof r!="function"&&(Hr===null?Hr=new Set([this]):Hr.add(this));var l=e.stack;this.componentDidCatch(e.value,{componentStack:l!==null?l:""})}),n}function Mf(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new y0;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=P0.bind(null,t,e,n),e.then(t,t))}function Uf(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 Ff(t,e,n,r,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=cr(-1,1),e.tag=2,Vr(n,e,1))),n.lanes|=1),t)}var v0=yr.ReactCurrentOwner,Mt=!1;function It(t,e,n,r){e.child=t===null?Tg(e,null,n,r):Ss(e,t.child,n,r)}function zf(t,e,n,r,i){n=n.render;var s=e.ref;return hs(e,i),r=Rd(t,e,n,r,s,i),n=Pd(),t!==null&&!Mt?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,pr(t,e,i)):(xe&&n&&vd(e),e.flags|=1,It(t,e,r,i),e.child)}function Bf(t,e,n,r,i){if(t===null){var s=n.type;return typeof s=="function"&&!Bd(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=s,Jg(t,e,s,r,i)):(t=Ul(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)){var l=s.memoizedProps;if(n=n.compare,n=n!==null?n:No,n(l,r)&&t.ref===e.ref)return pr(t,e,i)}return e.flags|=1,t=qr(s,r),t.ref=e.ref,t.return=e,e.child=t}function Jg(t,e,n,r,i){if(t!==null){var s=t.memoizedProps;if(No(s,r)&&t.ref===e.ref)if(Mt=!1,e.pendingProps=r=s,(t.lanes&i)!==0)t.flags&131072&&(Mt=!0);else return e.lanes=t.lanes,pr(t,e,i)}return kc(t,e,n,r,i)}function Yg(t,e,n){var r=e.pendingProps,i=r.children,s=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ie(ls,qt),qt|=n;else{if(!(n&1073741824))return t=s!==null?s.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,Ie(ls,qt),qt|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,Ie(ls,qt),qt|=r}else s!==null?(r=s.baseLanes|n,e.memoizedState=null):r=n,Ie(ls,qt),qt|=r;return It(t,e,i,n),e.child}function Zg(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}
vendor: 4,515 bytes, line 40
40function kc(t,e,n,r,i){var s=Ft(n)?Ai:vt.current;return s=_s(e,s),hs(e,i),n=Rd(t,e,n,r,s,i),r=Pd(),t!==null&&!Mt?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,pr(t,e,i)):(xe&&r&&vd(e),e.flags|=1,It(t,e,n,i),e.child)}function $f(t,e,n,r,i){if(Ft(n)){var s=!0;na(e)}else s=!1;if(hs(e,i),e.stateNode===null)bl(t,e),Kg(e,n,r),Sc(e,n,r,i),r=!0;else if(t===null){var l=e.stateNode,u=e.memoizedProps;l.props=u;var c=l.context,f=n.contextType;typeof f=="object"&&f!==null?f=pn(f):(f=Ft(n)?Ai:vt.current,f=_s(e,f));var _=n.getDerivedStateFromProps,k=typeof _=="function"||typeof l.getSnapshotBeforeUpdate=="function";k||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(u!==r||c!==f)&&Df(e,l,r,f),Ar=!1;var E=e.memoizedState;l.state=E,la(e,r,l,i),c=e.memoizedState,u!==r||E!==c||Ut.current||Ar?(typeof _=="function"&&(wc(e,n,_,r),c=e.memoizedState),(u=Ar||bf(e,n,u,r,E,c,f))?(k||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount()),typeof l.componentDidMount=="function"&&(e.flags|=4194308)):(typeof l.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=c),l.props=r,l.state=c,l.context=f,r=u):(typeof l.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{l=e.stateNode,Ng(t,e),u=e.memoizedProps,f=e.type===e.elementType?u:kn(e.type,u),l.props=f,k=e.pendingProps,E=l.context,c=n.contextType,typeof c=="object"&&c!==null?c=pn(c):(c=Ft(n)?Ai:vt.current,c=_s(e,c));var L=n.getDerivedStateFromProps;(_=typeof L=="function"||typeof l.getSnapshotBeforeUpdate=="function")||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(u!==k||E!==c)&&Df(e,l,r,c),Ar=!1,E=e.memoizedState,l.state=E,la(e,r,l,i);var A=e.memoizedState;u!==k||E!==A||Ut.current||Ar?(typeof L=="function"&&(wc(e,n,L,r),A=e.memoizedState),(f=Ar||bf(e,n,f,r,E,A,c)||!1)?(_||typeof l.UNSAFE_componentWillUpdate!="function"&&typeof l.componentWillUpdate!="function"||(typeof l.componentWillUpdate=="function"&&l.componentWillUpdate(r,A,c),typeof l.UNSAFE_componentWillUpdate=="function"&&l.UNSAFE_componentWillUpdate(r,A,c)),typeof l.componentDidUpdate=="function"&&(e.flags|=4),typeof l.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof l.componentDidUpdate!="function"||u===t.memoizedProps&&E===t.memoizedState||(e.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||u===t.memoizedProps&&E===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=A),l.props=r,l.state=A,l.context=c,r=f):(typeof l.componentDidUpdate!="function"||u===t.memoizedProps&&E===t.memoizedState||(e.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||u===t.memoizedProps&&E===t.memoizedState||(e.flags|=1024),r=!1)}return Ic(t,e,n,r,s,i)}function Ic(t,e,n,r,i,s){Zg(t,e);var l=(e.flags&128)!==0;if(!r&&!l)return i&&Nf(e,n,!1),pr(t,e,s);r=e.stateNode,v0.current=e;var u=l&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&l?(e.child=Ss(e,t.child,null,s),e.child=Ss(e,null,u,s)):It(t,e,u,s),e.memoizedState=r.state,i&&Nf(e,n,!0),e.child}function ey(t){var e=t.stateNode;e.pendingContext?Cf(t,e.pendingContext,e.pendingContext!==e.context):e.context&&Cf(t,e.context,!1),Cd(t,e.containerInfo)}function Vf(t,e,n,r,i){return ws(),wd(i),e.flags|=256,It(t,e,n,r),e.child}var Tc={dehydrated:null,treeContext:null,retryLane:0};function Cc(t){return{baseLanes:t,cachePool:null,transitions:null}}function ty(t,e,n){var r=e.pendingProps,i=Re.current,s=!1,l=(e.flags&128)!==0,u;if((u=l)||(u=t!==null&&t.memoizedState===null?!1:(i&2)!==0),u?(s=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),Ie(Re,i&1),t===null)return vc(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(l=r.children,t=r.fallback,s?(r=e.mode,s=e.child,l={mode:"hidden",children:l},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=l):s=Ba(l,r,0,null),t=ki(t,r,n,null),s.return=e,t.return=e,s.sibling=t,e.child=s,e.child.memoizedState=Cc(n),e.memoizedState=Tc,t):jd(e,l));if(i=t.memoizedState,i!==null&&(u=i.dehydrated,u!==null))return _0(t,e,l,r,u,i,n);if(s){s=r.fallback,l=e.mode,i=t.child,u=i.sibling;var c={mode:"hidden",children:r.children};return!(l&1)&&e.child!==i?(r=e.child,r.childLanes=0,r.pendingProps=c,e.deletions=null):(r=qr(i,
vendor: 7,571 bytes, line 40
40c),r.subtreeFlags=i.subtreeFlags&14680064),u!==null?s=qr(u,s):(s=ki(s,l,n,null),s.flags|=2),s.return=e,r.return=e,r.sibling=s,e.child=r,r=s,s=e.child,l=t.child.memoizedState,l=l===null?Cc(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=t.childLanes&~n,e.memoizedState=Tc,r}return s=t.child,t=s.sibling,r=qr(s,{mode:"visible",children:r.children}),!(e.mode&1)&&(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 jd(t,e){return e=Ba({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function gl(t,e,n,r){return r!==null&&wd(r),Ss(e,t.child,null,n),t=jd(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function _0(t,e,n,r,i,s,l){if(n)return e.flags&256?(e.flags&=-257,r=Cu(Error(B(422))),gl(t,e,l,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(s=r.fallback,i=e.mode,r=Ba({mode:"visible",children:r.children},i,0,null),s=ki(s,i,l,null),s.flags|=2,r.return=e,s.return=e,r.sibling=s,e.child=r,e.mode&1&&Ss(e,t.child,null,l),e.child.memoizedState=Cc(l),e.memoizedState=Tc,s);if(!(e.mode&1))return gl(t,e,l,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var u=r.dgst;return r=u,s=Error(B(419)),r=Cu(s,r,void 0),gl(t,e,l,r)}if(u=(l&t.childLanes)!==0,Mt||u){if(r=st,r!==null){switch(l&-l){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|l)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,fr(t,i),Rn(r,t,i,-1))}return zd(),r=Cu(Error(B(421))),gl(t,e,l,r)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=O0.bind(null,t),i._reactRetry=e,null):(t=s.treeContext,Kt=$r(i.nextSibling),Xt=e,xe=!0,Tn=null,t!==null&&(un[cn++]=or,un[cn++]=lr,un[cn++]=Ri,or=t.id,lr=t.overflow,Ri=e),e=jd(e,r.children),e.flags|=4096,e)}function Hf(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),_c(t.return,e,n)}function Nu(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 ny(t,e,n){var r=e.pendingProps,i=r.revealOrder,s=r.tail;if(It(t,e,r.children,n),r=Re.current,r&2)r=r&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Hf(t,n,e);else if(t.tag===19)Hf(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(Ie(Re,r),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(n=e.child,i=null;n!==null;)t=n.alternate,t!==null&&aa(t)===null&&(i=n),n=n.sibling;n=i,n===null?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),Nu(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&&aa(t)===null){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}Nu(e,!0,n,null,s);break;case"together":Nu(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function bl(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function pr(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),Oi|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(B(153));if(e.child!==null){for(t=e.child,n=qr(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=qr(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function w0(t,e,n){switch(e.tag){case 3:ey(e),ws();break;case 5:xg(e);break;case 1:Ft(e.type)&&na(e);break;case 4:Cd(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,i=e.memoizedProps.value;Ie(sa,r._currentValue),r._currentValue=i;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(Ie(Re,Re.current&1),e.flags|=128,null):n&e.child.childLanes?ty(t,e,n):(Ie(Re,Re.current&1),t=pr(t,e,n),t!==null?t.sibling:null);Ie(Re,Re.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return ny(t,e,n);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ie(Re,Re.current),r)break;return null;case 22:case 23:return e.lanes=0,Yg(t,e,n)}return pr(t,e,n)}var ry,Nc,iy,sy;ry=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}};Nc=function(){};iy=function(t,e,n,r){var i=t.memoizedProps;if(i!==r){t=e.stateNode,_i(Jn.current);var s=null;switch(n){case"input":i=Qu(t,i),r=Qu(t,r),s=[];break;case"select":i=Oe({},i,{value:void 0}),r=Oe({},r,{value:void 0}),s=[];break;case"textarea":i=Yu(t,i),r=Yu(t,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=ea)}ec(n,r);var l;n=null;for(f in i)if(!r.hasOwnProperty(f)&&i.hasOwnProperty(f)&&i[f]!=null)if(f==="style"){var u=i[f];for(l in u)u.hasOwnProperty(l)&&(n||(n={}),n[l]="")}else f!=="dangerouslySetInnerHTML"&&f!=="children"&&f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(wo.hasOwnProperty(f)?s||(s=[]):(s=s||[]).push(f,null));for(f in r){var c=r[f];if(u=i!=null?i[f]:void 0,r.hasOwnProperty(f)&&c!==u&&(c!=null||u!=null))if(f==="style")if(u){for(l in u)!u.hasOwnProperty(l)||c&&c.hasOwnProperty(l)||(n||(n={}),n[l]="");for(l in c)c.hasOwnProperty(l)&&u[l]!==c[l]&&(n||(n={}),n[l]=c[l])}else n||(s||(s=[]),s.push(f,n)),n=c;else f==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,u=u?u.__html:void 0,c!=null&&u!==c&&(s=s||[]).push(f,c)):f==="children"?typeof c!="string"&&typeof c!="number"||(s=s||[]).push(f,""+c):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&(wo.hasOwnProperty(f)?(c!=null&&f==="onScroll"&&Ce("scroll",t),s||u===c||(s=[])):(s=s||[]).push(f,c))}n&&(s=s||[]).push("style",n);var f=s;(e.updateQueue=f)&&(e.flags|=4)}};sy=function(t,e,n,r){n!==r&&(e.flags|=4)};function Ks(t,e){if(!xe)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 gt(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 S0(t,e,n){var r=e.pendingProps;switch(_d(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return gt(e),null;case 1:return Ft(e.type)&&ta(),gt(e),null;case 3:return r=e.stateNode,Es(),Ne(Ut),Ne(vt),xd(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(pl(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Tn!==null&&(bc(Tn),Tn=null))),Nc(t,e),gt(e),null;case 5:Nd(e);
vendor: 31,397 bytes, line 40
40var i=_i(Oo.current);if(n=e.type,t!==null&&e.stateNode!=null)iy(t,e,n,r,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(B(166));return gt(e),null}if(t=_i(Jn.current),pl(e)){r=e.stateNode,n=e.type;var s=e.memoizedProps;switch(r[Gn]=e,r[Ro]=s,t=(e.mode&1)!==0,n){case"dialog":Ce("cancel",r),Ce("close",r);break;case"iframe":case"object":case"embed":Ce("load",r);break;case"video":case"audio":for(i=0;i<eo.length;i++)Ce(eo[i],r);break;case"source":Ce("error",r);break;case"img":case"image":case"link":Ce("error",r),Ce("load",r);break;case"details":Ce("toggle",r);break;case"input":Yh(r,s),Ce("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Ce("invalid",r);break;case"textarea":ef(r,s),Ce("invalid",r)}ec(n,s),i=null;for(var l in s)if(s.hasOwnProperty(l)){var u=s[l];l==="children"?typeof u=="string"?r.textContent!==u&&(s.suppressHydrationWarning!==!0&&fl(r.textContent,u,t),i=["children",u]):typeof u=="number"&&r.textContent!==""+u&&(s.suppressHydrationWarning!==!0&&fl(r.textContent,u,t),i=["children",""+u]):wo.hasOwnProperty(l)&&u!=null&&l==="onScroll"&&Ce("scroll",r)}switch(n){case"input":sl(r),Zh(r,s,!0);break;case"textarea":sl(r),tf(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=ea)}r=i,e.updateQueue=r,r!==null&&(e.flags|=4)}else{l=i.nodeType===9?i:i.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=Lm(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=l.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=l.createElement(n,{is:r.is}):(t=l.createElement(n),n==="select"&&(l=t,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):t=l.createElementNS(t,n),t[Gn]=e,t[Ro]=r,ry(t,e,!1,!1),e.stateNode=t;e:{switch(l=tc(n,r),n){case"dialog":Ce("cancel",t),Ce("close",t),i=r;break;case"iframe":case"object":case"embed":Ce("load",t),i=r;break;case"video":case"audio":for(i=0;i<eo.length;i++)Ce(eo[i],t);i=r;break;case"source":Ce("error",t),i=r;break;case"img":case"image":case"link":Ce("error",t),Ce("load",t),i=r;break;case"details":Ce("toggle",t),i=r;break;case"input":Yh(t,r),i=Qu(t,r),Ce("invalid",t);break;case"option":i=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},i=Oe({},r,{value:void 0}),Ce("invalid",t);break;case"textarea":ef(t,r),i=Yu(t,r),Ce("invalid",t);break;default:i=r}ec(n,i),u=i;for(s in u)if(u.hasOwnProperty(s)){var c=u[s];s==="style"?Dm(t,c):s==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&jm(t,c)):s==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&So(t,c):typeof c=="number"&&So(t,""+c):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(wo.hasOwnProperty(s)?c!=null&&s==="onScroll"&&Ce("scroll",t):c!=null&&id(t,s,c,l))}switch(n){case"input":sl(t),Zh(t,r,!1);break;case"textarea":sl(t),tf(t);break;case"option":r.value!=null&&t.setAttribute("value",""+Qr(r.value));break;case"select":t.multiple=!!r.multiple,s=r.value,s!=null?as(t,!!r.multiple,s,!1):r.defaultValue!=null&&as(t,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(t.onclick=ea)}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)}return gt(e),null;case 6:if(t&&e.stateNode!=null)sy(t,e,t.memoizedProps,r);else{if(typeof r!="string"&&e.stateNode===null)throw Error(B(166));if(n=_i(Oo.current),_i(Jn.current),pl(e)){if(r=e.stateNode,n=e.memoizedProps,r[Gn]=e,(s=r.nodeValue!==n)&&(t=Xt,t!==null))switch(t.tag){case 3:fl(r.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&fl(r.nodeValue,n,(t.mode&1)!==0)}s&&(e.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Gn]=e,e.stateNode=r}return gt(e),null;case 13:if(Ne(Re),r=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(xe&&Kt!==null&&e.mode&1&&!(e.flags&128))kg(),ws(),e.flags|=98560,s=!1;else if(s=pl(e),r!==null&&r.dehydrated!==null){if(t===null){if(!s)throw Error(B(318));if(s=e.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(B(317));s[Gn]=e}else ws(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;gt(e),s=!1}else Tn!==null&&(bc(Tn),Tn=null),s=!0;if(!s)return e.flags&65536?e:null}return e.flags&128?(e.lanes=n,e):(r=r!==null,r!==(t!==null&&t.memoizedState!==null)&&r&&(e.child.flags|=8192,e.mode&1&&(t===null||Re.current&1?Ze===0&&(Ze=3):zd())),e.updateQueue!==null&&(e.flags|=4),gt(e),null);case 4:return Es(),Nc(t,e),t===null&&xo(e.stateNode.containerInfo),gt(e),null;case 10:return kd(e.type._context),gt(e),null;case 17:return Ft(e.type)&&ta(),gt(e),null;case 19:if(Ne(Re),s=e.memoizedState,s===null)return gt(e),null;if(r=(e.flags&128)!==0,l=s.rendering,l===null)if(r)Ks(s,!1);else{if(Ze!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(l=aa(t),l!==null){for(e.flags|=128,Ks(s,!1),r=l.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,l=s.alternate,l===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=l.childLanes,s.lanes=l.lanes,s.child=l.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=l.memoizedProps,s.memoizedState=l.memoizedState,s.updateQueue=l.updateQueue,s.type=l.type,t=l.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return Ie(Re,Re.current&1|2),e.child}t=t.sibling}s.tail!==null&&$e()>Is&&(e.flags|=128,r=!0,Ks(s,!1),e.lanes=4194304)}else{if(!r)if(t=aa(l),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Ks(s,!0),s.tail===null&&s.tailMode==="hidden"&&!l.alternate&&!xe)return gt(e),null}else 2*$e()-s.renderingStartTime>Is&&n!==1073741824&&(e.flags|=128,r=!0,Ks(s,!1),e.lanes=4194304);s.isBackwards?(l.sibling=e.child,e.child=l):(n=s.last,n!==null?n.sibling=l:e.child=l,s.last=l)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=$e(),e.sibling=null,n=Re.current,Ie(Re,r?n&1|2:n&1),e):(gt(e),null);case 22:case 23:return Fd(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?qt&1073741824&&(gt(e),e.subtreeFlags&6&&(e.flags|=8192)):gt(e),null;case 24:return null;case 25:return null}throw Error(B(156,e.tag))}function E0(t,e){switch(_d(e),e.tag){case 1:return Ft(e.type)&&ta(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Es(),Ne(Ut),Ne(vt),xd(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Nd(e),null;case 13:if(Ne(Re),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(B(340));ws()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Ne(Re),null;case 4:return Es(),null;case 10:return kd(e.type._context),null;case 22:case 23:return Fd(),null;case 24:return null;default:return null}}var yl=!1,yt=!1,k0=typeof WeakSet=="function"?WeakSet:Set,q=null;function os(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){be(t,e,r)}else n.current=null}function xc(t,e,n){try{n()}catch(r){be(t,e,r)}}var Wf=!1;function I0(t,e){if(dc=Jl,t=cg(),yd(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 l=0,u=-1,c=-1,f=0,_=0,k=t,E=null;t:for(;;){for(var L;k!==n||i!==0&&k.nodeType!==3||(u=l+i),k!==s||r!==0&&k.nodeType!==3||(c=l+r),k.nodeType===3&&(l+=k.nodeValue.length),(L=k.firstChild)!==null;)E=k,k=L;for(;;){if(k===t)break t;if(E===n&&++f===i&&(u=l),E===s&&++_===r&&(c=l),(L=k.nextSibling)!==null)break;k=E,E=k.parentNode}k=L}n=u===-1||c===-1?null:{start:u,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(hc={focusedElem:t,selectionRange:n},Jl=!1,q=e;q!==null;)if(e=q,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,q=t;else for(;q!==null;){e=q;try{var A=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(A!==null){var P=A.memoizedProps,D=A.memoizedState,I=e.stateNode,v=I.getSnapshotBeforeUpdate(e.elementType===e.type?P:kn(e.type,P),D);I.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var C=e.stateNode.containerInfo;C.nodeType===1?C.textContent="":C.nodeType===9&&C.documentElement&&C.removeChild(C.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(B(163))}}catch(O){be(e,e.return,O)}if(t=e.sibling,t!==null){t.return=e.return,q=t;break}q=e.return}return A=Wf,Wf=!1,A}function lo(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&&xc(e,n,s)}i=i.next}while(i!==r)}}function Fa(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 Ac(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 oy(t){var e=t.alternate;e!==null&&(t.alternate=null,oy(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[Gn],delete e[Ro],delete e[mc],delete e[o0],delete e[l0])),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 ly(t){return t.tag===5||t.tag===3||t.tag===4}function qf(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||ly(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 Rc(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=ea));else if(r!==4&&(t=t.child,t!==null))for(Rc(t,e,n),t=t.sibling;t!==null;)Rc(t,e,n),t=t.sibling}function Pc(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(Pc(t,e,n),t=t.sibling;t!==null;)Pc(t,e,n),t=t.sibling}var dt=null,In=!1;function Cr(t,e,n){for(n=n.child;n!==null;)ay(t,e,n),n=n.sibling}function ay(t,e,n){if(Xn&&typeof Xn.onCommitFiberUnmount=="function")try{Xn.onCommitFiberUnmount(Pa,n)}catch{}switch(n.tag){case 5:yt||os(n,e);case 6:var r=dt,i=In;dt=null,Cr(t,e,n),dt=r,In=i,dt!==null&&(In?(t=dt,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):dt.removeChild(n.stateNode));break;case 18:dt!==null&&(In?(t=dt,n=n.stateNode,t.nodeType===8?wu(t.parentNode,n):t.nodeType===1&&wu(t,n),To(t)):wu(dt,n.stateNode));break;case 4:r=dt,i=In,dt=n.stateNode.containerInfo,In=!0,Cr(t,e,n),dt=r,In=i;break;case 0:case 11:case 14:case 15:if(!yt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,l=s.destroy;s=s.tag,l!==void 0&&(s&2||s&4)&&xc(n,e,l),i=i.next}while(i!==r)}Cr(t,e,n);break;case 1:if(!yt&&(os(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){be(n,e,u)}Cr(t,e,n);break;case 21:Cr(t,e,n);break;case 22:n.mode&1?(yt=(r=yt)||n.memoizedState!==null,Cr(t,e,n),yt=r):Cr(t,e,n);break;default:Cr(t,e,n)}}function Gf(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new k0),e.forEach(function(r){var i=L0.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Sn(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,l=e,u=l;e:for(;u!==null;){switch(u.tag){case 5:dt=u.stateNode,In=!1;break e;case 3:dt=u.stateNode.containerInfo,In=!0;break e;case 4:dt=u.stateNode.containerInfo,In=!0;break e}u=u.return}if(dt===null)throw Error(B(160));ay(s,l,i),dt=null,In=!1;var c=i.alternate;c!==null&&(c.return=null),i.return=null}catch(f){be(i,e,f)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)uy(e,t),e=e.sibling}function uy(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Sn(e,t),zn(t),r&4){try{lo(3,t,t.return),Fa(3,t)}catch(P){be(t,t.return,P)}try{lo(5,t,t.return)}catch(P){be(t,t.return,P)}}break;case 1:Sn(e,t),zn(t),r&512&&n!==null&&os(n,n.return);break;case 5:if(Sn(e,t),zn(t),r&512&&n!==null&&os(n,n.return),t.flags&32){var i=t.stateNode;try{So(i,"")}catch(P){be(t,t.return,P)}}if(r&4&&(i=t.stateNode,i!=null)){var s=t.memoizedProps,l=n!==null?n.memoizedProps:s,u=t.type,c=t.updateQueue;if(t.updateQueue=null,c!==null)try{u==="input"&&s.type==="radio"&&s.name!=null&&Pm(i,s),tc(u,l);var f=tc(u,s);for(l=0;l<c.length;l+=2){var _=c[l],k=c[l+1];_==="style"?Dm(i,k):_==="dangerouslySetInnerHTML"?jm(i,k):_==="children"?So(i,k):id(i,_,k,f)}switch(u){case"input":Xu(i,s);break;case"textarea":Om(i,s);break;case"select":var E=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var L=s.value;L!=null?as(i,!!s.multiple,L,!1):E!==!!s.multiple&&(s.defaultValue!=null?as(i,!!s.multiple,s.defaultValue,!0):as(i,!!s.multiple,s.multiple?[]:"",!1))}i[Ro]=s}catch(P){be(t,t.return,P)}}break;case 6:if(Sn(e,t),zn(t),r&4){if(t.stateNode===null)throw Error(B(162));i=t.stateNode,s=t.memoizedProps;try{i.nodeValue=s}catch(P){be(t,t.return,P)}}break;case 3:if(Sn(e,t),zn(t),r&4&&n!==null&&n.memoizedState.isDehydrated)try{To(e.containerInfo)}catch(P){be(t,t.return,P)}break;case 4:Sn(e,t),zn(t);break;case 13:Sn(e,t),zn(t),i=t.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(Md=$e())),r&4&&Gf(t);break;case 22:if(_=n!==null&&n.memoizedState!==null,t.mode&1?(yt=(f=yt)||_,Sn(e,t),yt=f):Sn(e,t),zn(t),r&8192){if(f=t.memoizedState!==null,(t.stateNode.isHidden=f)&&!_&&t.mode&1)for(q=t,_=t.child;_!==null;){for(k=q=_;q!==null;){switch(E=q,L=E.child,E.tag){case 0:case 11:case 14:case 15:lo(4,E,E.return);break;case 1:os(E,E.return);var A=E.stateNode;if(typeof A.componentWillUnmount=="function"){r=E,n=E.return;try{e=r,A.props=e.memoizedProps,A.state=e.memoizedState,A.componentWillUnmount()}catch(P){be(r,n,P)}}break;case 5:os(E,E.return);break;case 22:if(E.memoizedState!==null){Qf(k);continue}}L!==null?(L.return=E,q=L):Qf(k)}_=_.sibling}e:for(_=null,k=t;;){if(k.tag===5){if(_===null){_=k;try{i=k.stateNode,f?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(u=k.stateNode,c=k.memoizedProps.style,l=c!=null&&c.hasOwnProperty("display")?c.display:null,u.style.display=bm("display",l))}catch(P){be(t,t.return,P)}}}else if(k.tag===6){if(_===null)try{k.stateNode.nodeValue=f?"":k.memoizedProps}catch(P){be(t,t.return,P)}}else if((k.tag!==22&&k.tag!==23||k.memoizedState===null||k===t)&&k.child!==null){k.child.return=k,k=k.child;continue}if(k===t)break e;for(;k.sibling===null;){if(k.return===null||k.return===t)break e;_===k&&(_=null),k=k.return}_===k&&(_=null),k.sibling.return=k.return,k=k.sibling}}break;case 19:Sn(e,t),zn(t),r&4&&Gf(t);break;case 21:break;default:Sn(e,t),zn(t)}}function zn(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(ly(n)){var r=n;break e}n=n.return}throw Error(B(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(So(i,""),r.flags&=-33);var s=qf(t);Pc(t,s,i);break;case 3:case 4:var l=r.stateNode.containerInfo,u=qf(t);Rc(t,u,l);break;default:throw Error(B(161))}}catch(c){be(t,t.return,c)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function T0(t,e,n){q=t,cy(t)}function cy(t,e,n){for(var r=(t.mode&1)!==0;q!==null;){var i=q,s=i.child;if(i.tag===22&&r){var l=i.memoizedState!==null||yl;if(!l){var u=i.alternate,c=u!==null&&u.memoizedState!==null||yt;u=yl;var f=yt;if(yl=l,(yt=c)&&!f)for(q=i;q!==null;)l=q,c=l.child,l.tag===22&&l.memoizedState!==null?Xf(i):c!==null?(c.return=l,q=c):Xf(i);for(;s!==null;)q=s,cy(s),s=s.sibling;q=i,yl=u,yt=f}Kf(t)}else i.subtreeFlags&8772&&s!==null?(s.return=i,q=s):Kf(t)}}function Kf(t){for(;q!==null;){var e=q;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:yt||Fa(5,e);break;case 1:var r=e.stateNode;if(e.flags&4&&!yt)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&&Of(e,s,r);break;case 3:var l=e.updateQueue;if(l!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}Of(e,l,n)}break;case 5:var u=e.stateNode;if(n===null&&e.flags&4){n=u;var c=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var f=e.alternate;if(f!==null){var _=f.memoizedState;if(_!==null){var k=_.dehydrated;k!==null&&To(k)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(B(163))}yt||e.flags&512&&Ac(e)}catch(E){be(e,e.return,E)}}if(e===t){q=null;break}if(n=e.sibling,n!==null){n.return=e.return,q=n;break}q=e.return}}function Qf(t){for(;q!==null;){var e=q;if(e===t){q=null;break}var n=e.sibling;if(n!==null){n.return=e.return,q=n;break}q=e.return}}function Xf(t){for(;q!==null;){var e=q;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{Fa(4,e)}catch(c){be(e,n,c)}break;case 1:var r=e.stateNode;if(typeof r.componentDidMount=="function"){var i=e.return;try{r.componentDidMount()}catch(c){be(e,i,c)}}var s=e.return;try{Ac(e)}catch(c){be(e,s,c)}break;case 5:var l=e.return;try{Ac(e)}catch(c){be(e,l,c)}}}catch(c){be(e,e.return,c)}if(e===t){q=null;break}var u=e.sibling;if(u!==null){u.return=e.return,q=u;break}q=e.return}}var C0=Math.ceil,da=yr.ReactCurrentDispatcher,bd=yr.ReactCurrentOwner,fn=yr.ReactCurrentBatchConfig,he=0,st=null,Ke=null,ht=0,qt=0,ls=ti(0),Ze=0,Do=null,Oi=0,za=0,Dd=0,ao=null,Dt=null,Md=0,Is=1/0,nr=null,ha=!1,Oc=null,Hr=null,vl=!1,Ur=null,fa=0,uo=0,Lc=null,Dl=-1,Ml=0;function Tt(){return he&6?$e():Dl!==-1?Dl:Dl=$e()}function Wr(t){return t.mode&1?he&2&&ht!==0?ht&-ht:u0.transition!==null?(Ml===0&&(Ml=Km()),Ml):(t=we,t!==0||(t=window.event,t=t===void 0?16:tg(t.type)),t):1}function Rn(t,e,n,r){if(50<uo)throw uo=0,Lc=null,Error(B(185));Bo(t,n,r),(!(he&2)||t!==st)&&(t===st&&(!(he&2)&&(za|=n),Ze===4&&Pr(t,ht)),zt(t,r),n===1&&he===0&&!(e.mode&1)&&(Is=$e()+500,Da&&ni()))}function zt(t,e){var n=t.callbackNode;uw(t,e);var r=Xl(t,t===st?ht:0);if(r===0)n!==null&&sf(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(n!=null&&sf(n),e===1)t.tag===0?a0(Jf.bind(null,t)):wg(Jf.bind(null,t)),i0(function(){!(he&6)&&ni()}),n=null;else{switch(Qm(r)){case 1:n=ud;break;case 4:n=qm;break;case 16:n=Ql;break;case 536870912:n=Gm;break;default:n=Ql}n=vy(n,dy.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function dy(t,e){if(Dl=-1,Ml=0,he&6)throw Error(B(327));var n=t.callbackNode;if(fs()&&t.callbackNode!==n)return null;var r=Xl(t,t===st?ht:0);if(r===0)return null;if(r&30||r&t.expiredLanes||e)e=pa(t,r);else{e=r;var i=he;he|=2;var s=fy();(st!==t||ht!==e)&&(nr=null,Is=$e()+500,Ei(t,e));do try{A0();break}catch(u){hy(t,u)}while(!0);Ed(),da.current=s,he=i,Ke!==null?e=0:(st=null,ht=0,e=Ze)}if(e!==0){if(e===2&&(i=oc(t),i!==0&&(r=i,e=jc(t,i))),e===1)throw n=Do,Ei(t,0),Pr(t,r),zt(t,$e()),n;if(e===6)Pr(t,r);else{if(i=t.current.alternate,!(r&30)&&!N0(i)&&(e=pa(t,r),e===2&&(s=oc(t),s!==0&&(r=s,e=jc(t,s))),e===1))throw n=Do,Ei(t,0),Pr(t,r),zt(t,$e()),n;switch(t.finishedWork=i,t.finishedLanes=r,e){case 0:case 1:throw Error(B(345));case 2:fi(t,Dt,nr);break;case 3:if(Pr(t,r),(r&130023424)===r&&(e=Md+500-$e(),10<e)){if(Xl(t,0)!==0)break;if(i=t.suspendedLanes,(i&r)!==r){Tt(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=pc(fi.bind(null,t,Dt,nr),e);break}fi(t,Dt,nr);break;case 4:if(Pr(t,r),(r&4194240)===r)break;for(e=t.eventTimes,i=-1;0<r;){var l=31-An(r);s=1<<l,l=e[l],l>i&&(i=l),r&=~s}if(r=i,r=$e()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*C0(r/1960))-r,10<r){t.timeoutHandle=pc(fi.bind(null,t,Dt,nr),r);break}fi(t,Dt,nr);break;case 5:fi(t,Dt,nr);break;default:throw Error(B(329))}}}return zt(t,$e()),t.callbackNode===n?dy.bind(null,t):null}function jc(t,e){var n=ao;return t.current.memoizedState.isDehydrated&&(Ei(t,e).flags|=256),t=pa(t,e),t!==2&&(e=Dt,Dt=n,e!==null&&bc(e)),t}function bc(t){Dt===null?Dt=t:Dt.push.apply(Dt,t)}function N0(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(!On(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 Pr(t,e){for(e&=~Dd,e&=~za,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-An(e),r=1<<n;t[n]=-1,e&=~r}}function Jf(t){if(he&6)throw Error(B(327));fs();var e=Xl(t,0);if(!(e&1))return zt(t,$e()),null;var n=pa(t,e);if(t.tag!==0&&n===2){var r=oc(t);r!==0&&(e=r,n=jc(t,r))}if(n===1)throw n=Do,Ei(t,0),Pr(t,e),zt(t,$e()),n;if(n===6)throw Error(B(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,fi(t,Dt,nr),zt(t,$e()),null}function Ud(t,e){var n=he;he|=1;try{return t(e)}finally{he=n,he===0&&(Is=$e()+500,Da&&ni())}}function Li(t){Ur!==null&&Ur.tag===0&&!(he&6)&&fs();var e=he;he|=1;var n=fn.transition,r=we;try{if(fn.transition=null,we=1,t)return t()}finally{we=r,fn.transition=n,he=e,!(he&6)&&ni()}}function Fd(){qt=ls.current,Ne(ls)}function Ei(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,r0(n)),Ke!==null)for(n=Ke.return;n!==null;){var r=n;switch(_d(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&ta();break;case 3:Es(),Ne(Ut),Ne(vt),xd();break;case 5:Nd(r);break;case 4:Es();break;case 13:Ne(Re);break;case 19:Ne(Re);break;case 10:kd(r.type._context);break;case 22:case 23:Fd()}n=n.return}if(st=t,Ke=t=qr(t.current,null),ht=qt=e,Ze=0,Do=null,Dd=za=Oi=0,Dt=ao=null,vi!==null){for(e=0;e<vi.length;e++)if(n=vi[e],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var l=s.next;s.next=i,r.next=l}n.pending=r}vi=null}return t}function hy(t,e){do{var n=Ke;try{if(Ed(),Ll.current=ca,ua){for(var r=Pe.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}ua=!1}if(Pi=0,it=Ye=Pe=null,oo=!1,Lo=0,bd.current=null,n===null||n.return===null){Ze=1,Do=e,Ke=null;break}e:{var s=t,l=n.return,u=n,c=e;if(e=ht,u.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var f=c,_=u,k=_.tag;if(!(_.mode&1)&&(k===0||k===11||k===15)){var E=_.alternate;E?(_.updateQueue=E.updateQueue,_.memoizedState=E.memoizedState,_.lanes=E.lanes):(_.updateQueue=null,_.memoizedState=null)}var L=Uf(l);if(L!==null){L.flags&=-257,Ff(L,l,u,s,e),L.mode&1&&Mf(s,f,e),e=L,c=f;var A=e.updateQueue;if(A===null){var P=new Set;P.add(c),e.updateQueue=P}else A.add(c);break e}else{if(!(e&1)){Mf(s,f,e),zd();break e}c=Error(B(426))}}else if(xe&&u.mode&1){var D=Uf(l);if(D!==null){!(D.flags&65536)&&(D.flags|=256),Ff(D,l,u,s,e),wd(ks(c,u));break e}}s=c=ks(c,u),Ze!==4&&(Ze=2),ao===null?ao=[s]:ao.push(s),s=l;do{switch(s.tag){case 3:s.flags|=65536,e&=-e,s.lanes|=e;var I=Qg(s,c,e);Pf(s,I);break e;case 1:u=c;var v=s.type,C=s.stateNode;if(!(s.flags&128)&&(typeof v.getDerivedStateFromError=="function"||C!==null&&typeof C.componentDidCatch=="function"&&(Hr===null||!Hr.has(C)))){s.flags|=65536,e&=-e,s.lanes|=e;var O=Xg(s,u,e);Pf(s,O);break e}}s=s.return}while(s!==null)}my(n)}catch(U){e=U,Ke===n&&n!==null&&(Ke=n=n.return);continue}break}while(!0)}function fy(){var t=da.current;return da.current=ca,t===null?ca:t}function zd(){(Ze===0||Ze===3||Ze===2)&&(Ze=4),st===null||!(Oi&268435455)&&!(za&268435455)||Pr(st,ht)}function pa(t,e){var n=he;he|=2;var r=fy();(st!==t||ht!==e)&&(nr=null,Ei(t,e));do try{x0();break}catch(i){hy(t,i)}while(!0);if(Ed(),he=n,da.current=r,Ke!==null)throw Error(B(261));return st=null,ht=0,Ze}function x0(){for(;Ke!==null;)py(Ke)}function A0(){for(;Ke!==null&&!ew();)py(Ke)}function py(t){var e=yy(t.alternate,t,qt);t.memoizedProps=t.pendingProps,e===null?my(t):Ke=e,bd.current=null}function my(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=E0(n,e),n!==null){n.flags&=32767,Ke=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{Ze=6,Ke=null;return}}else if(n=S0(n,e,qt),n!==null){Ke=n;return}if(e=e.sibling,e!==null){Ke=e;return}Ke=e=t}while(e!==null);Ze===0&&(Ze=5)}function fi(t,e,n){var r=we,i=fn.transition;try{fn.transition=null,we=1,R0(t,e,n,r)}finally{fn.transition=i,we=r}return null}function R0(t,e,n,r){do fs();while(Ur!==null);if(he&6)throw Error(B(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(B(177));t.callbackNode=null,t.callbackPriority=0;var s=n.lanes|n.childLanes;if(cw(t,s),t===st&&(Ke=st=null,ht=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||vl||(vl=!0,vy(Ql,function(){return fs(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=fn.transition,fn.transition=null;var l=we;we=1;var u=he;he|=4,bd.current=null,I0(t,n),uy(n,t),Xw(hc),Jl=!!dc,hc=dc=null,t.current=n,T0(n),tw(),he=u,we=l,fn.transition=s}else t.current=n;if(vl&&(vl=!1,Ur=t,fa=i),s=t.pendingLanes,s===0&&(Hr=null),iw(n.stateNode),zt(t,$e()),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(ha)throw ha=!1,t=Oc,Oc=null,t;return fa&1&&t.tag!==0&&fs(),s=t.pendingLanes,s&1?t===Lc?uo++:(uo=0,Lc=t):uo=0,ni(),null}function fs(){if(Ur!==null){var t=Qm(fa),e=fn.transition,n=we;try{if(fn.transition=null,we=16>t?16:t,Ur===null)var r=!1;else{if(t=Ur,Ur=null,fa=0,he&6)throw Error(B(331));var i=he;for(he|=4,q=t.current;q!==null;){var s=q,l=s.child;if(q.flags&16){var u=s.deletions;if(u!==null){for(var c=0;c<u.length;c++){var f=u[c];for(q=f;q!==null;){var _=q;switch(_.tag){case 0:case 11:case 15:lo(8,_,s)}var k=_.child;if(k!==null)k.return=_,q=k;else for(;q!==null;){_=q;var E=_.sibling,L=_.return;if(oy(_),_===f){q=null;break}if(E!==null){E.return=L,q=E;break}q=L}}}var A=s.alternate;if(A!==null){var P=A.child;if(P!==null){A.child=null;do{var D=P.sibling;P.sibling=null,P=D}while(P!==null)}}q=s}}if(s.subtreeFlags&2064&&l!==null)l.return=s,q=l;else e:for(;q!==null;){if(s=q,s.flags&2048)switch(s.tag){case 0:case 11:case 15:lo(9,s,s.return)}var I=s.sibling;if(I!==null){I.return=s.return,q=I;break e}q=s.return}}var v=t.current;for(q=v;q!==null;){l=q;var C=l.child;if(l.subtreeFlags&2064&&C!==null)C.return=l,q=C;else e:for(l=v;q!==null;){if(u=q,u.flags&2048)try{switch(u.tag){case 0:case 11:case 15:Fa(9,u)}}catch(U){be(u,u.return,U)}if(u===l){q=null;break e}var O=u.sibling;if(O!==null){O.return=u.return,q=O;break e}q=u.return}}if(he=i,ni(),Xn&&typeof Xn.onPostCommitFiberRoot=="function")try{Xn.onPostCommitFiberRoot(Pa,t)}catch{}r=!0}return r}finally{we=n,fn.transition=e}}return!1}function Yf(t,e,n){e=ks(n,e),e=Qg(t,e,1),t=Vr(t,e,1),e=Tt(),t!==null&&(Bo(t,1,e),zt(t,e))}function be(t,e,n){if(t.tag===3)Yf(t,t,n);else for(;e!==null;){if(e.tag===3){Yf(e,t,n);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Hr===null||!Hr.has(r))){t=ks(n,t),t=Xg(e,t,1),e=Vr(e,t,1),t=Tt(),e!==null&&(Bo(e,1,t),zt(e,t));break}}e=e.return}}function P0(t,e,n){var r=t.pingCache;r!==null&&r.delete(e),e=Tt(),t.pingedLanes|=t.suspendedLanes&n,st===t&&(ht&n)===n&&(Ze===4||Ze===3&&(ht&130023424)===ht&&500>$e()-Md?Ei(t,0):Dd|=n),zt(t,e)}function gy(t,e){e===0&&(t.mode&1?(e=al,al<<=1,!(al&130023424)&&(al=4194304)):e=1);var n=Tt();t=fr(t,e),t!==null&&(Bo(t,e,n),zt(t,n))}function O0(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),gy(t,n)}function L0(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(B(314))}r!==null&&r.delete(e),gy(t,n)}var yy;yy=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Ut.current)Mt=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return Mt=!1,w0(t,e,n);Mt=!!(t.flags&131072)}else Mt=!1,xe&&e.flags&1048576&&Sg(e,ia,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;bl(t,e),t=e.pendingProps;var i=_s(e,vt.current);hs(e,n),i=Rd(null,e,r,t,i,n);var s=Pd();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,Ft(r)?(s=!0,na(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Td(e),i.updater=Ua,e.stateNode=i,i._reactInternals=e,Sc(e,r,t,n),e=Ic(null,e,r,!0,s,n)):(e.tag=0,xe&&s&&vd(e),It(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(bl(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=b0(r),t=kn(r,t),i){case 0:e=kc(null,e,r,t,n);break e;case 1:e=$f(null,e,r,t,n);break e;case 11:e=zf(null,e,r,t,n);break e;case 14:e=Bf(null,e,r,kn(r.type,t),n);break e}throw Error(B(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:kn(r,i),kc(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:kn(r,i),$f(t,e,r,i,n);case 3:e:{if(ey(e),t===null)throw Error(B(387));r=e.pendingProps,s=e.memoizedState,i=s.element,Ng(t,e),la(e,r,null,n);var l=e.memoizedState;if(r=l.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){i=ks(Error(B(423)),e),e=Vf(t,e,r,n,i);break e}else if(r!==i){i=ks(Error(B(424)),e),e=Vf(t,e,r,n,i);break e}else for(Kt=$r(e.stateNode.containerInfo.firstChild),Xt=e,xe=!0,Tn=null,n=Tg(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ws(),r===i){e=pr(t,e,n);break e}It(t,e,r,n)}e=e.child}return e;case 5:return xg(e),t===null&&vc(e),r=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,l=i.children,fc(r,i)?l=null:s!==null&&fc(r,s)&&(e.flags|=32),Zg(t,e),It(t,e,l,n),e.child;case 6:return t===null&&vc(e),null;case 13:return ty(t,e,n);case 4:return Cd(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=Ss(e,null,r,n):It(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:kn(r,i),zf(t,e,r,i,n);case 7:return It(t,e,e.pendingProps,n),e.child;case 8:return It(t,e,e.pendingProps.children,n),e.child;case 12:return It(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,s=e.memoizedProps,l=i.value,Ie(sa,r._currentValue),r._currentValue=l,s!==null)if(On(s.value,l)){if(s.children===i.children&&!Ut.current){e=pr(t,e,n);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var u=s.dependencies;if(u!==null){l=s.child;for(var c=u.firstContext;c!==null;){if(c.context===r){if(s.tag===1){c=cr(-1,n&-n),c.tag=2;var f=s.updateQueue;if(f!==null){f=f.shared;
vendor: 11,910 bytes, line 40
40var _=f.pending;_===null?c.next=c:(c.next=_.next,_.next=c),f.pending=c}}s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),_c(s.return,n,e),u.lanes|=n;break}c=c.next}}else if(s.tag===10)l=s.type===e.type?null:s.child;else if(s.tag===18){if(l=s.return,l===null)throw Error(B(341));l.lanes|=n,u=l.alternate,u!==null&&(u.lanes|=n),_c(l,n,e),l=s.sibling}else l=s.child;if(l!==null)l.return=s;else for(l=s;l!==null;){if(l===e){l=null;break}if(s=l.sibling,s!==null){s.return=l.return,l=s;break}l=l.return}s=l}It(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,hs(e,n),i=pn(i),r=r(i),e.flags|=1,It(t,e,r,n),e.child;case 14:return r=e.type,i=kn(r,e.pendingProps),i=kn(r.type,i),Bf(t,e,r,i,n);case 15:return Jg(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:kn(r,i),bl(t,e),e.tag=1,Ft(r)?(t=!0,na(e)):t=!1,hs(e,n),Kg(e,r,i),Sc(e,r,i,n),Ic(null,e,r,!0,t,n);case 19:return ny(t,e,n);case 22:return Yg(t,e,n)}throw Error(B(156,e.tag))};function vy(t,e){return Wm(t,e)}function j0(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 hn(t,e,n,r){return new j0(t,e,n,r)}function Bd(t){return t=t.prototype,!(!t||!t.isReactComponent)}function b0(t){if(typeof t=="function")return Bd(t)?1:0;if(t!=null){if(t=t.$$typeof,t===od)return 11;if(t===ld)return 14}return 2}function qr(t,e){var n=t.alternate;return n===null?(n=hn(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 Ul(t,e,n,r,i,s){var l=2;if(r=t,typeof t=="function")Bd(t)&&(l=1);else if(typeof t=="string")l=5;else e:switch(t){case Ji:return ki(n.children,i,s,e);case sd:l=8,i|=8;break;case Wu:return t=hn(12,n,e,i|2),t.elementType=Wu,t.lanes=s,t;case qu:return t=hn(13,n,e,i),t.elementType=qu,t.lanes=s,t;case Gu:return t=hn(19,n,e,i),t.elementType=Gu,t.lanes=s,t;case xm:return Ba(n,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Cm:l=10;break e;case Nm:l=9;break e;case od:l=11;break e;case ld:l=14;break e;case xr:l=16,r=null;break e}throw Error(B(130,t==null?t:typeof t,""))}return e=hn(l,n,e,i),e.elementType=t,e.type=r,e.lanes=s,e}function ki(t,e,n,r){return t=hn(7,t,r,e),t.lanes=n,t}function Ba(t,e,n,r){return t=hn(22,t,r,e),t.elementType=xm,t.lanes=n,t.stateNode={isHidden:!1},t}function xu(t,e,n){return t=hn(6,t,null,e),t.lanes=n,t}function Au(t,e,n){return e=hn(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function D0(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=uu(0),this.expirationTimes=uu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=uu(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function $d(t,e,n,r,i,s,l,u,c){return t=new D0(t,e,n,u,c),e===1?(e=1,s===!0&&(e|=8)):e=0,s=hn(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Td(s),t}function M0(t,e,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Xi,key:r==null?null:""+r,children:t,containerInfo:e,implementation:n}}function _y(t){if(!t)return Xr;t=t._reactInternals;e:{if(zi(t)!==t||t.tag!==1)throw Error(B(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(Ft(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(B(171))}if(t.tag===1){var n=t.type;if(Ft(n))return _g(t,n,e)}return e}function wy(t,e,n,r,i,s,l,u,c){return t=$d(n,r,!0,t,i,s,l,u,c),t.context=_y(null),n=t.current,r=Tt(),i=Wr(n),s=cr(r,i),s.callback=e??null,Vr(n,s,i),t.current.lanes=i,Bo(t,i,r),zt(t,r),t}function $a(t,e,n,r){var i=e.current,s=Tt(),l=Wr(i);return n=_y(n),e.context===null?e.context=n:e.pendingContext=n,e=cr(s,l),e.payload={element:t},r=r===void 0?null:r,r!==null&&(e.callback=r),t=Vr(i,e,l),t!==null&&(Rn(t,i,l,s),Ol(t,i,l)),l}function ma(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 Zf(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function Vd(t,e){Zf(t,e),(t=t.alternate)&&Zf(t,e)}function U0(){return null}var Sy=typeof reportError=="function"?reportError:function(t){console.error(t)};function Hd(t){this._internalRoot=t}Va.prototype.render=Hd.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(B(409));$a(t,e,null,null)};Va.prototype.unmount=Hd.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Li(function(){$a(null,t,null,null)}),e[hr]=null}};function Va(t){this._internalRoot=t}Va.prototype.unstable_scheduleHydration=function(t){if(t){var e=Ym();t={blockedOn:null,target:t,priority:e};for(var n=0;n<Rr.length&&e!==0&&e<Rr[n].priority;n++);Rr.splice(n,0,t),n===0&&eg(t)}};function Wd(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Ha(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function ep(){}function F0(t,e,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var f=ma(l);s.call(f)}}var l=wy(e,r,t,0,null,!1,!1,"",ep);return t._reactRootContainer=l,t[hr]=l.current,xo(t.nodeType===8?t.parentNode:t),Li(),l}for(;i=t.lastChild;)t.removeChild(i);if(typeof r=="function"){var u=r;r=function(){var f=ma(c);u.call(f)}}var c=$d(t,0,!1,null,null,!1,!1,"",ep);return t._reactRootContainer=c,t[hr]=c.current,xo(t.nodeType===8?t.parentNode:t),Li(function(){$a(e,c,n,r)}),c}function Wa(t,e,n,r,i){var s=n._reactRootContainer;if(s){var l=s;if(typeof i=="function"){var u=i;i=function(){var c=ma(l);u.call(c)}}$a(e,l,t,i)}else l=F0(n,e,t,i,r);return ma(l)}Xm=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=Zs(e.pendingLanes);n!==0&&(cd(e,n|1),zt(e,$e()),!(he&6)&&(Is=$e()+500,ni()))}break;case 13:Li(function(){var r=fr(t,1);if(r!==null){var i=Tt();Rn(r,t,1,i)}}),Vd(t,1)}};dd=function(t){if(t.tag===13){var e=fr(t,134217728);if(e!==null){var n=Tt();Rn(e,t,134217728,n)}Vd(t,134217728)}};Jm=function(t){if(t.tag===13){var e=Wr(t),n=fr(t,e);if(n!==null){var r=Tt();Rn(n,t,e,r)}Vd(t,e)}};Ym=function(){return we};Zm=function(t,e){var n=we;try{return we=t,e()}finally{we=n}};rc=function(t,e,n){switch(e){case"input":if(Xu(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=ba(r);if(!i)throw Error(B(90));Rm(r),Xu(r,i)}}}break;case"textarea":Om(t,n);break;case"select":e=n.value,e!=null&&as(t,!!n.multiple,e,!1)}};Fm=Ud;zm=Li;var z0={usingClientEntryPoint:!1,Events:[Vo,ts,ba,Mm,Um,Ud]},Qs={findFiberByHostInstance:yi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},B0={bundleType:Qs.bundleType,version:Qs.version,rendererPackageName:Qs.rendererPackageName,rendererConfig:Qs.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:yr.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=Vm(t),t===null?null:t.stateNode},findFiberByHostInstance:Qs.findFiberByHostInstance||U0,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var _l=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!_l.isDisabled&&_l.supportsFiber)try{Pa=_l.inject(B0),Xn=_l}catch{}}Yt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=z0;Yt.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Wd(e))throw Error(B(200));return M0(t,e,null,n)};Yt.createRoot=function(t,e){if(!Wd(t))throw Error(B(299));var n=!1,r="",i=Sy;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=$d(t,1,!1,null,null,n,!1,r,i),t[hr]=e.current,xo(t.nodeType===8?t.parentNode:t),new Hd(e)};Yt.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(B(188)):(t=Object.keys(t).join(","),Error(B(268,t)));return t=Vm(e),t=t===null?null:t.stateNode,t};Yt.flushSync=function(t){return Li(t)};Yt.hydrate=function(t,e,n){if(!Ha(e))throw Error(B(200));return Wa(null,t,e,!0,n)};Yt.hydrateRoot=function(t,e,n){if(!Wd(t))throw Error(B(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",l=Sy;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(l=n.onRecoverableError)),e=wy(e,null,t,1,n??null,i,!1,s,l),t[hr]=e.current,xo(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 Va(e)};Yt.render=function(t,e,n){if(!Ha(e))throw Error(B(200));return Wa(null,t,e,!1,n)};Yt.unmountComponentAtNode=function(t){if(!Ha(t))throw Error(B(40));return t._reactRootContainer?(Li(function(){Wa(null,null,t,!1,function(){t._reactRootContainer=null,t[hr]=null})}),!0):!1};Yt.unstable_batchedUpdates=Ud;Yt.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!Ha(n))throw Error(B(200));if(t==null||t._reactInternals===void 0)throw Error(B(38));return Wa(t,e,n,!1,r)};Yt.version="18.3.1-next-f1338f8080-20240426";function Ey(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ey)}catch(t){console.error(t)}}Ey(),Em.exports=Yt;var $0=Em.exports,tp=$0;Vu.createRoot=tp.createRoot,Vu.hydrateRoot=tp.hydrateRoot;const Ii={healthcare:{displayName:"Healthcare",threshold:7,description:"Clinical medicine, medical devices, EHR systems, telehealth, patient outcomes, drug discovery, diagnostics, mental health interventions, dental technology, rehabilitation, public health, epidemiology, veterinary science"},"food-beverage":{displayName:"Food & Beverage",threshold:7,description:"Food science, food safety, supply chain traceability, nutrition labeling, restaurant technology, food preservation, fermentation, quality control, menu optimization, dietary research"},retail:{displayName:"Retail",threshold:7,description:"Consumer behavior, inventory management, point-of-sale systems, demand forecasting, pricing optimization, e-commerce platforms, recommendation engines, loss prevention, omnichannel retail"}
40,hospitality:{displayName:"Hospitality",threshold:7,description:"Hotel management systems, tourism analytics, booking optimization, guest experience, event management, travel demand modeling, dynamic pricing, service industry research"},education:{displayName:"Education",threshold:7,description:"Learning management systems, EdTech, student outcomes, adaptive learning, curriculum design, assessment methods, online education, classroom technology, literacy research"},"sports-fitness":{displayName:"Sports & Fitness",threshold:6,description:"Sports analytics, wearable technology, injury prevention, performance tracking, fitness apps, biomechanics, athlete monitoring, exercise science"},community:{displayName:"Community",threshold:6,description:"Volunteer coordination, nonprofit management, community engagement, donor analytics, social impact measurement, civic technology, faith-based organization research"},construction:{displayName:"Construction",threshold:6,description:"Building information modeling (BIM), structural engineering, smart buildings, construction safety, project management, green building, prefabrication, civil engineering"},manufacturing:{displayName:"Manufacturing",threshold:7,description:"Industrial automation, quality control, predictive maintenance, supply chain optimization, robotics, additive manufacturing (3D printing), lean production, factory IoT"},"professional-services":{displayName:"Professional Services",threshold:7,description:"Knowledge management, consulting methodologies, workflow automation, professional liability, service delivery optimization, outsourcing research"},"financial-services":{displayName:"Financial Services",threshold:7,description:"Fintech, fraud detection, credit scoring, algorithmic trading, regulatory compliance (RegTech), blockchain, insurance modeling, risk assessment, banking technology"},"real-estate":{displayName:"Real Estate",threshold:6,description:"Property valuation models, smart buildings, real estate market analytics, PropTech, lease management, zoning analysis, mortgage technology"},technology:{displayName:"Technology",threshold:7,description:"Software engineering, cloud infrastructure, AI/ML, cybersecurity, databases, DevOps, API design, programming languages, distributed systems, LLMs, computer vision"},"transportation-logistics":{displayName:"Transportation & Logistics",threshold:6,description:"Autonomous vehicles, route optimization, fleet management, last-mile delivery, warehouse robotics, supply chain visibility, traffic modeling, shipping logistics"},"media-entertainment":{displayName:"Media & Entertainment",threshold:7,description:"Content recommendation, streaming technology, digital advertising, gaming AI, content moderation, audience analytics, generative media, publishing technology"},"energy-utilities":{displayName:"Energy & Utilities",threshold:7,description:"Smart grids, renewable energy optimization, energy storage, carbon capture, utility demand forecasting, oil & gas exploration, nuclear technology, sustainability"},agriculture:{displayName:"Agriculture",threshold:7,description:"Precision agriculture, crop monitoring, soil analysis, agricultural drones, livestock management, sustainable farming, agri-tech, food supply chain, aquaculture"},automotive:{displayName:"Automotive",threshold:6,description:"Autonomous driving, EV battery technology, connected vehicles, ADAS, vehicle-to-everything (V2X), automotive manufacturing, fleet electrification"},government:{displayName:"Government",threshold:7,description:"E-government, public policy analytics, civic data platforms, regulatory technology, census methods, defense technology, digital identity, public administration"},nonprofit:{displayName:"Nonprofit",threshold:7,description:"Social impact research, fundraising optimization, grant management, program evaluation, humanitarian logistics, international development"},sales:{displayName:"Sales",threshold:5,description:"CRM research, sales forecasting, lead scoring, conversion optimization, pricing strategy, customer acquisition, checkout UX, e-commerce conversion"},marketing:{displayName:"Marketing",threshold:7,description:"SEO/SEM research, consumer psychology, brand analytics, campaign optimization, social media analysis, market segmentation, A/B testing, content strategy"},finance:{displayName:"Finance",threshold:6,description:"Financial modeling, accounting automation, tax compliance technology, budgeting tools, audit analytics, expense management, payment processing"},legal:{displayName:"Legal",threshold:7,description:"Legal tech, contract analysis (NLP), compliance automation, privacy regulation (GDPR/CCPA), e-discovery, intellectual property, consent management"},hr:{displayName:"Human Resources",threshold:7,description:"Workforce analytics, recruitment te
40chnology, employee engagement, organizational psychology, compensation benchmarking, DEI research, remote work studies"},safety:{displayName:"Safety",threshold:6,description:"Occupational health research, workplace safety systems, incident analysis, ergonomics, hazard detection, safety compliance technology, OSHA-related research"},"customer-service":{displayName:"Customer Service",threshold:5,description:"Chatbot/conversational AI, sentiment analysis, ticket routing, customer satisfaction measurement, service quality research, voice-of-customer analytics"},it:{displayName:"IT",threshold:5,description:"Infrastructure research, DevOps practices, system reliability, network security, identity management, cloud migration, monitoring and observability"},administration:{displayName:"Administration",threshold:6,description:"Document management, office automation, facility optimization, scheduling algorithms, records management, digital signatures, workflow digitization"},procurement:{displayName:"Procurement",threshold:5,description:"Supply chain research, vendor evaluation methods, procurement automation, spend analytics, sourcing optimization, contract management"}};function ky(t){return t==="home"?"Home":Ii[t].displayName}const np=10;function Jr(t){return Object.prototype.hasOwnProperty.call(Ii,t)}const ga=["technology","food-beverage","healthcare"];function Ki(t){const e=t!=null&&t.length?t:null;if(!e)return ga.map(r=>({id:r,label:Ii[r].displayName}));const n=[];for(const r of e){const i=r.category;Jr(i)&&n.push({id:i,label:Ii[i].displayName})}return n.length===0?ga.map(r=>({id:r,label:Ii[r].displayName})):n}const V0=Object.keys(Ii).map(t=>({id:t,label:Ii[t].displayName}));[...Ki(ga.map(t=>({category:t})))];function ya(t){return t!=="home"&&Jr(t)?{repostsOnly:!1,category:t}:{repostsOnly:!0,category:""}}function H0(){var e,n;const t=(n=(e=document.getElementById("root"))==null?void 0:e.getAttribute("data-feed"))==null?void 0:n.trim();return t==="home"?"home":t&&Jr(t)?t:"home"}function Iy(t){const e=t==null?void 0:t.trim();if(e==="home")return"home";if(e&&Jr(e))return e}function co(t){var e;(e=document.getElementById("root"))==null||e.setAttribute("data-feed",t)}function wl(t,e){const n=new URLSearchParams;t.repostsOnly&&n.set("reposts","true"),t.category&&n.set("category",t.category),e!=null&&e.before&&n.set("before",String(e.before)),e!=null&&e.after&&n.set("after",String(e.after));const r=n.toString();return r?`?${r}`:""}function Bn(t){if(t.repostsOnly&&!t.category.trim())return"home";const e=t.category.trim();return!t.repostsOnly&&Jr(e)?e:"home"}function W0(t){const e=t.replace(/\/+$/,"")||"/";return e==="/timeline"?"":e.startsWith("/timeline/")?e.slice(10):""}function rp(t){var u,c,f,_;const e=t.replace(/^[?#]/,"").trim();if(!e)return{};const n=new URLSearchParams(e),r=(u=n.get("feed"))==null?void 0:u.trim(),i=((c=n.get("post"))==null?void 0:c.trim())||((f=n.get("memeId"))==null?void 0:f.trim())||void 0,s={};r==="home"?s.feed="home":r&&Jr(r)&&(s.feed=r),i&&(s.initialMemeId=i);const l=(_=n.get("q"))==null?void 0:_.trim();return l&&(s.searchQuery=l),s}function q0(t){if(t==="#suggest-repost")return"suggest-repost";if(t==="#open-repost")return"open-repost"}function G0(t){const e=W0(t);if(!e)return{};const n=e.split("/").filter(Boolean);if(n[0]==="feed"&&n[1]){const r=decodeURIComponent(n[1]),i=r==="home"?"home":Jr(r)?r:void 0;if(i!==void 0)return n[2]==="p"&&n[3]?{feed:i,initialMemeId:decodeURIComponent(n.slice(3).join("/"))}:{feed:i}}if(n[0]==="p"&&n[1])return{initialMemeId:decodeURIComponent(n.slice(1).join("/"))};if(n.length===1){const r=decodeURIComponent(n[0]);if(r==="home")return{feed:"home"};if(Jr(r))return{feed:r}}return{}}function qd(t){const e=G0(t.pathname),n=rp(t.search),r=q0(t.hash),i=t.hash.length>1&&t.hash.includes("=")?rp(t.hash.slice(1)):{};return{feed:n.feed??i.feed??e.feed,initialMemeId:n.initialMemeId??i.initialMemeId??e.initialMemeId,searchQuery:n.searchQuery??i.searchQuery??e.searchQuery,postAction:r}}function Ty(t){return"/timeline"}function Cy(t,e,n,r,i){const s=t.replace(/\/$/,"")||"/timeline";let l=s;e!=="home"&&(l=`${s}/feed/${e}`),n&&(l=`${l}/p/${encodeURIComponent(n)}`);const u=r==null?void 0:r.trim(),c=u?`${l}?q=${encodeURIComponent(u)}`:l;return i?`${c}#${i}`:c}const Ln={fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"};function ji(t){return h.jsx("svg",{viewBox:"0 0 24 24","aria-hidden":!0,...t,children:h.jsx("path",{...Ln,d:"M6 18
4018 6M6 6l12 12"})})}function Gd(t){return h.jsx("svg",{viewBox:"0 0 24 24","aria-hidden":!0,...t,children:h.jsx("path",{...Ln,d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182m0-4.991v4.99"})})}function Ny(t){return h.jsx("svg",{viewBox:"0 0 24 24","aria-hidden":!0,...t,children:h.jsx("path",{...Ln,d:"m21 8.25c0-2.485-2.015-4.5-4.5-4.5-1.74 0-3.248.988-4 2.434-.752-1.446-2.26-2.434-4-2.434C6.015 3.75 4 5.765 4 8.25c0 7.084 8.5 11.25 8.5 11.25S21 15.334 21 8.25Z"})})}function K0(t){return h.jsx("svg",{viewBox:"0 0 24 24","aria-hidden":!0,...t,children:h.jsx("path",{...Ln,d:"M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9 5.25h.008v.008H12v-.008z"})})}function xy(t){return h.jsxs("svg",{viewBox:"0 0 24 24","aria-hidden":!0,...t,children:[h.jsx("circle",{cx:"12",cy:"12",r:"10",fill:"none",stroke:"currentColor",strokeWidth:"2.5",opacity:"0.25"}),h.jsx("path",{fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",d:"M22 12a10 10 0 0 0-10-10"})]})}function Q0(t){return h.jsx("svg",{viewBox:"0 0 24 24","aria-hidden":!0,...t,children:h.jsx("path",{...Ln,d:"m2.25 15.75 5.159-5.159a2.25 2.25 0 0 1 3.182 0l5.159 5.159m-1.5-1.5 1.409-1.409a2.25 2.25 0 0 1 3.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 0 0 1.5-1.5V6a1.5 1.5 0 0 0-1.5-1.5H3.75A1.5 1.5 0 0 0 2.25 6v12a1.5 1.5 0 0 0 1.5 1.5Zm10.5-11.25h.008v.008h-.008V8.25Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"})})}function Ay(t){return h.jsx("svg",{viewBox:"0 0 24 24","aria-hidden":!0,...t,children:h.jsx("path",{...Ln,d:"M15.75 19.5 8.25 12l7.5-7.5"})})}function X0(t){return h.jsx("svg",{viewBox:"0 0 24 24","aria-hidden":!0,...t,children:h.jsx("path",{...Ln,d:"m19.5 8.25-7.5 7.5-7.5-7.5"})})}function Kd(t){return h.jsx("svg",{viewBox:"0 0 24 24","aria-hidden":!0,...t,children:h.jsx("path",{...Ln,d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"})})}function ip(t){return h.jsx("svg",{viewBox:"0 0 24 24","aria-hidden":!0,...t,children:h.jsx("path",{...Ln,d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"})})}function J0(t){return h.jsx("svg",{viewBox:"0 0 24 24","aria-hidden":!0,...t,children:h.jsx("path",{...Ln,d:"M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.455 2.456L21.75 6l-1.036.259a3.375 3.375 0 0 0-2.455 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z"})})}function Y0(t){return h.jsx("svg",{viewBox:"0 0 24 24","aria-hidden":!0,...t,children:h.jsx("path",{...Ln,d:"M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5M18 10.5 21 3m0 0h-5.25M21 3v5.25"})})}const sp='a[href],button:not([disabled]),textarea:not([disabled]),input:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])';function Ps(t,e){const[n,r]=N.useState(!1),[i,s]=N.useState(!1),l=N.useRef(null),u=N.useRef(null);N.useEffect(()=>{if(t)u.current=document.activeElement,r(!0),requestAnimationFrame(()=>{requestAnimationFrame(()=>s(!0))});else if(n){s(!1);const f=setTimeout(()=>r(!1),220);return()=>clearTimeout(f)}},[t]),N.useEffect(()=>{if(i){const f=l.current;if(!f)return;const _=f.querySelector(sp);_==null||_.focus()}!n&&u.current instanceof HTMLElement&&(u.current.focus(),u.current=null)},[i,n]),N.useEffect(()=>{if(!i)return;const f=l.current;if(!f)return;const _=k=>{if(k.key==="Tab"){const E=Array.from(f.querySelectorAll(sp));if(E.length===0){k.preventDefault();return}const L=E[0],A=E[E.length-1];k.shiftKey&&document.activeElement===L?(k.preventDefault(),A.focus()):!k.shiftKey&&document.activeElement===A&&(k.preventDefault(),L.focus())}};return document.addEventListener("keydown",_),()=>document.removeEventListener("keydown",_)},[i]);const c=N.useCallback(()=>{e()},[e]);return{mounted:n,open:i,ref:l,close:c}}function Z0({open:t,onClose:e,apiBase:n,user:r,initialOrderedIds:i,onSaved:s}){const[l,u]=N.useState(i),[c,f]=N.useState(!1),[_,k]=N.useState(null),E=Ps(t,e);N.useEffect(()=>{t&&(u(i),k(null))},[t,i]),N.useEffect(()=>{if(!t)return;const P=D=>{D.key==="Escape"&&!c&&e()};return document.addEventListener("keydown",P),()=>document.removeEventListener("keydown",P)},[t,c,e]);const L=P=>{u(D=>D.includes(P)?D.length<=1?D:D.filter(I=>I!==P):D.length>=np?D:[...D,P])},A=async()=>
40{if(l.length===0){k("Select at least one category.");return}f(!0),k(null);try{const P=await r.getIdToken(),D=await fetch(`${n}/api/preferences`,{method:"PUT",headers:{Authorization:`Bearer ${P}`,"Content-Type":"application/json"},body:JSON.stringify({categories:l})});if(!D.ok){const v=await D.json().catch(()=>({}));throw new Error(v.error||D.statusText)}const I=await D.json();s(I.categories),e()}catch(P){k(P instanceof Error?P.message:String(P))}finally{f(!1)}};return E.mounted?h.jsx("div",{ref:E.ref,className:`tl-modal${E.open?" tl-modal--open":""}`,role:"dialog","aria-modal":"true","aria-labelledby":"tl-cat-pref-title",children:h.jsxs("div",{className:"tl-modal__sheet tl-cat-pref__sheet",children:[h.jsxs("div",{className:"tl-modal__top",children:[h.jsx("div",{className:"tl-modal__head",children:h.jsx("h3",{className:"tl-modal__title",id:"tl-cat-pref-title",children:"Feed categories"})}),h.jsx("button",{type:"button",className:"tl-modal__close tl-modal__close--icon",onClick:E.close,disabled:c,"aria-label":"Close feed categories",children:h.jsx(ji,{className:"tl-icon"})})]}),h.jsxs("p",{className:"tl-cat-pref__hint",children:["Choose up to ",np," categories for the feed submenu. Order follows when you add or remove selections."]}),h.jsx("div",{className:"tl-cat-pref__list",children:V0.map(({id:P,label:D})=>h.jsxs("label",{className:"tl-cat-pref__row",children:[h.jsx("input",{type:"checkbox",checked:l.includes(P),onChange:()=>L(P)}),h.jsx("span",{children:D})]},P))}),_&&h.jsx("div",{className:"tl-error tl-cat-pref__error",children:_}),h.jsxs("div",{className:"tl-modal__actions",children:[h.jsx("button",{type:"button",className:"tl-modal__secondary",onClick:E.close,disabled:c,children:"Cancel"}),h.jsx("button",{type:"button",className:"tl-action__button",onClick:()=>void A(),disabled:c,children:c?"Saving...":"Save"})]})]})}):null}const e1=()=>{};var op={};/** 41 * @license 42 * Copyright 2017 Google LLC 43 * 44 * Licensed under the Apache License, Version 2.0 (the "License"); 45 * you may not use this file except in compliance with the License. 46 * You may obtain a copy of the License at 47 * 48 * http://www.apache.org/licenses/LICENSE-2.0 49 * 50 * Unless required by applicable law or agreed to in writing, software 51 * distributed under the License is distributed on an "AS IS" BASIS, 52 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 53 * See the License for the specific language governing permissions and 54 * limitations under the License. 55 */const Ry=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},t1=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++],l=t[n++],u=t[n++],c=((i&7)<<18|(s&63)<<12|(l&63)<<6|u&63)-65536;e[r++]=String.fromCharCode(55296+(c>>10)),e[r++]=String.fromCharCode(56320+(c&1023))}else{const s=t[n++],l=t[n++];e[r++]=String.fromCharCode((i&15)<<12|(s&63)<<6|l&63)}}return e.join("")},Py={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],l=i+1<t.length,u=l?t[i+1]:0,c=i+2<t.length,f=c?t[i+2]:0,_=s>>2,k=(s&3)<<4|u>>4;let E=(u&15)<<2|f>>6,L=f&63;c||(L=64,l||(E=64)),r.push(n[_],n[k],n[E],n[L])}return r.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(Ry(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):t1(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++)],u=i<t.length?n[t.charAt(i)]:0;++i;const f=i<t.length?n[t.charAt(i)]:64;++i;const k=i<t.length?n[t.charAt(i)]:64;if(++i,s==null||u==null||f==null||k==null)throw new n1;const E=s<<2|u>>4;if(r.push(E),f!==64){const L=u<<4&240|f>>2;if(r.push(L),k!==64){const A=f<<6&192|k;r.push(A)}}}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)}}};
55class n1 extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const r1=function(t){const e=Ry(t);return Py.encodeByteArray(e,!0)},va=function(t){return r1(t).replace(/\./g,"")},Oy=function(t){try{return Py.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};/** 56 * @license 57 * Copyright 2022 Google LLC 58 * 59 * Licensed under the Apache License, Version 2.0 (the "License"); 60 * you may not use this file except in compliance with the License. 61 * You may obtain a copy of the License at 62 * 63 * http://www.apache.org/licenses/LICENSE-2.0 64 * 65 * Unless required by applicable law or agreed to in writing, software 66 * distributed under the License is distributed on an "AS IS" BASIS, 67 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 68 * See the License for the specific language governing permissions and 69 * limitations under the License. 70 */function i1(){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.")}/** 71 * @license 72 * Copyright 2022 Google LLC 73 * 74 * Licensed under the Apache License, Version 2.0 (the "License"); 75 * you may not use this file except in compliance with the License. 76 * You may obtain a copy of the License at 77 * 78 * http://www.apache.org/licenses/LICENSE-2.0 79 * 80 * Unless required by applicable law or agreed to in writing, software 81 * distributed under the License is distributed on an "AS IS" BASIS, 82 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 83 * See the License for the specific language governing permissions and 84 * limitations under the License. 85 */const s1=()=>i1().__FIREBASE_DEFAULTS__,o1=()=>{if(typeof process>"u"||typeof op>"u")return;const t=op.__FIREBASE_DEFAULTS__;if(t)return JSON.parse(t)},l1=()=>{if(typeof document>"u")return;let t;try{t=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const e=t&&Oy(t[1]);return e&&JSON.parse(e)},Qd=()=>{try{return e1()||s1()||o1()||l1()}catch(t){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${t}`);return}},Ly=t=>{var e,n;return(n=(e=Qd())==null?void 0:e.emulatorHosts)==null?void 0:n[t]},a1=t=>{const e=Ly(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]},jy=()=>{var t;return(t=Qd())==null?void 0:t.config},by=t=>{var e;return(e=Qd())==null?void 0:e[`_${t}`]};/** 86 * @license 87 * Copyright 2017 Google LLC 88 * 89 * Licensed under the Apache License, Version 2.0 (the "License"); 90 * you may not use this file except in compliance with the License. 91 * You may obtain a copy of the License at 92 * 93 * http://www.apache.org/licenses/LICENSE-2.0 94 * 95 * Unless required by applicable law or agreed to in writing, software 96 * distributed under the License is distributed on an "AS IS" BASIS, 97 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 98 * See the License for the specific language governing permissions and 99 * limitations under the License. 100 */class u1{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))}}}/** 101 * @license 102 * Copyright 2025 Google LLC 103 * 104 * Licensed under the Apache License, Version 2.0 (the "License"); 105 * you may not use this file except in compliance with the License. 106 * You may obtain a copy of the License at 107 * 108 * http://www.apache.org/licenses/LICENSE-2.0 109 * 110 * Unless required by applicable law or agreed to in writing, software 111 * distributed under the License is distributed on an "AS IS" BASIS, 112 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 113 * See the License for the specific language governing permissions and 114 * limitations under the License. 115 */function Os(t){try{return(t.startsWith("http://")||t.startsWith("https://")?new URL(t).hostname:t).endsWith(".cloudworkstations.dev")}catch{return!1}}async function Dy(t){return(await fetch(t,{credentials:"include"})).ok}/** 116 * @license 117 * Copyright 2021 Google LLC 118 * 119 * Licensed under the Apache License, Version 2.0 (the "License");
120 * you may not use this file except in compliance with the License. 121 * You may obtain a copy of the License at 122 * 123 * http://www.apache.org/licenses/LICENSE-2.0 124 * 125 * Unless required by applicable law or agreed to in writing, software 126 * distributed under the License is distributed on an "AS IS" BASIS, 127 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 128 * See the License for the specific language governing permissions and 129 * limitations under the License. 130 */function c1(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 l={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};return[va(JSON.stringify(n)),va(JSON.stringify(l)),""].join(".")}const ho={};function d1(){const t={prod:[],emulator:[]};for(const e of Object.keys(ho))ho[e]?t.emulator.push(e):t.prod.push(e);return t}function h1(t){let e=document.getElementById(t),n=!1;return e||(e=document.createElement("div"),e.setAttribute("id",t),n=!0),{created:n,element:e}}let lp=!1;function My(t,e){if(typeof window>"u"||typeof document>"u"||!Os(window.location.host)||ho[t]===e||ho[t]||lp)return;ho[t]=e;function n(E){return`__firebase__banner__${E}`}const r="__firebase__banner",s=d1().prod.length>0;function l(){const E=document.getElementById(r);E&&E.remove()}function u(E){E.style.display="flex",E.style.background="#7faaf0",E.style.position="fixed",E.style.bottom="5px",E.style.left="5px",E.style.padding=".5em",E.style.borderRadius="5px",E.style.alignItems="center"}function c(E,L){E.setAttribute("width","24"),E.setAttribute("id",L),E.setAttribute("height","24"),E.setAttribute("viewBox","0 0 24 24"),E.setAttribute("fill","none"),E.style.marginLeft="-6px"}function f(){const E=document.createElement("span");return E.style.cursor="pointer",E.style.marginLeft="16px",E.style.fontSize="24px",E.innerHTML=" ×",E.onclick=()=>{lp=!0,l()},E}function _(E,L){E.setAttribute("id",L),E.innerText="Learn more",E.href="https://firebase.google.com/docs/studio/preview-apps#preview-backend",E.setAttribute("target","__blank"),E.style.paddingLeft="5px",E.style.textDecoration="underline"}function k(){const E=h1(r),L=n("text"),A=document.getElementById(L)||document.createElement("span"),P=n("learnmore"),D=document.getElementById(P)||document.createElement("a"),I=n("preprendIcon"),v=document.getElementById(I)||document.createElementNS("http://www.w3.org/2000/svg","svg");if(E.created){const C=E.element;u(C),_(D,P);const O=f();c(v,I),C.append(v,A,D,O),document.body.appendChild(C)}s?(A.innerText="Preview backend disconnected.",v.innerHTML=`<g clip-path="url(#clip0_6013_33858)"> 131<path d="M4.8 17.6L12 5.6L19.2 17.6H4.8ZM6.91667 16.4H17.0833L12 7.93333L6.91667 16.4ZM12 15.6C12.1667 15.6 12.3056 15.5444 12.4167 15.4333C12.5389 15.3111 12.6 15.1667 12.6 15C12.6 14.8333 12.5389 14.6944 12.4167 14.5833C12.3056 14.4611 12.1667 14.4 12 14.4C11.8333 14.4 11.6889 14.4611 11.5667 14.5833C11.4556 14.6944 11.4 14.8333 11.4 15C11.4 15.1667 11.4556 15.3111 11.5667 15.4333C11.6889 15.5444 11.8333 15.6 12 15.6ZM11.4 13.6H12.6V10.4H11.4V13.6Z" fill="#212121"/> 132</g> 133<defs> 134<clipPath id="clip0_6013_33858"> 135<rect width="24" height="24" fill="white"/> 136</clipPath> 137</defs>`):(v.innerHTML=`<g clip-path="url(#clip0_6083_34804)"> 138<path d="M11.4 15.2H12.6V11.2H11.4V15.2ZM12 10C12.1667 10 12.3056 9.94444 12.4167 9.83333C12.5389 9.71111 12.6 9.56667 12.6 9.4C12.6 9.23333 12.5389 9.09444 12.4167 8.98333C12.3056 8.86111 12.1667 8.8 12 8.8C11.8333 8.8 11.6889 8.86111 11.5667 8.98333C11.4556 9.09444 11.4 9.23333 11.4 9.4C11.4 9.56667 11.4556 9.71111 11.5667 9.83333C11.6889 9.94444 11.8333 10 12 10ZM12 18.4C11.1222 18.4 10.2944 18.2333 9.51667 17.9C8.73889 17.5667 8.05556 17.1111 7.46667 16.5333C6.88889 15.9444 6.43333 15.2611 6.1 14.4833C5.76667 13.7056 5.6 12.8778 5.6 12C5.6 11.1111 5.76667 10.2833 6.1 9.51667C6.43333 8.73889 6.88889 8.06111 7.46667 7.48333C8.05556 6.89444 8.73889 6.43333 9.51667 6.1C10.2944 5.76667 11.1222 5.6 12 5.6C12.8889 5.6 13.7167 5.76667 14.4833 6.1C15.2611 6.43333 15.9389 6.89444 16.5167 7.48333C17.1056 8.06111 17.5667 8.73889 17.9 9.51667C18.2333 10.2833 18.4 11.1111 18.4 12C18.4 12.8778 18.2333 13.7056 17.9 14.4833C17.5667 15.2611 17.1056 15.9444 16.5167 16.5333C15.9389 17.1111 15.2611 17.5667 14.4833 17.9C13.7167 18.2333 12.8889 18.4 12 18.4ZM12 17.2C13.4444 17.2 14.6722 16.6944 15.6833 15.6833C16.6944 14.6722 17.2 13.4444 17.2 12C17.2 10.5556 16.6944 9.32778 15.6833 8.31667C14.6722 7.30555 13.4444 6.8 12 6.8C10.5556 6.8 9.32778 7.30555 8.31667 8.31667C7.30556 9.32778 6.8 10.5556 6.8 12C6.8 13.4444 7.30556 14.6722 8.31667 15.6833C9.32778 16.6944 10.5556 17.2 12 17.2Z" fill="#212121"/> 139</g> 140<defs> 141<clipPath id="clip0_6083_34804"> 142<rect width="24" height="24" fill="white"/> 143</clipPath> 144</defs>`,A.innerText="Preview backend running in this workspace."),A.setAttribute("id",L)}document.readyState==="loading"?window.addEventListener("DOMContentLoaded",k):k()}/** 145 * @license 146 * Copyright 2017 Google LLC 147 * 148 * Licensed under the Apache License, Version 2.0 (the "License");
149 * you may not use this file except in compliance with the License. 150 * You may obtain a copy of the License at 151 * 152 * http://www.apache.org/licenses/LICENSE-2.0 153 * 154 * Unless required by applicable law or agreed to in writing, software 155 * distributed under the License is distributed on an "AS IS" BASIS, 156 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 157 * See the License for the specific language governing permissions and 158 * limitations under the License. 159 */function Ct(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function f1(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(Ct())}function p1(){return typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers"}function m1(){const t=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof t=="object"&&t.id!==void 0}function g1(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function y1(){const t=Ct();return t.indexOf("MSIE ")>=0||t.indexOf("Trident/")>=0}function v1(){try{return typeof indexedDB=="object"}catch{return!1}}function _1(){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?void 0:s.message)||"")}}catch(n){e(n)}})}/** 160 * @license 161 * Copyright 2017 Google LLC 162 * 163 * Licensed under the Apache License, Version 2.0 (the "License"); 164 * you may not use this file except in compliance with the License. 165 * You may obtain a copy of the License at 166 * 167 * http://www.apache.org/licenses/LICENSE-2.0 168 * 169 * Unless required by applicable law or agreed to in writing, software 170 * distributed under the License is distributed on an "AS IS" BASIS, 171 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 172 * See the License for the specific language governing permissions and 173 * limitations under the License. 174 */const w1="FirebaseError";class tr extends Error{constructor(e,n,r){super(n),this.code=e,this.customData=r,this.name=w1,Object.setPrototypeOf(this,tr.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,Wo.prototype.create)}}class Wo{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],l=s?S1(s,r):"Error",u=`${this.serviceName}: ${l} (${i}).`;return new tr(i,u,r)}}function S1(t,e){return t.replace(E1,(n,r)=>{const i=e[r];return i!=null?String(i):`<${r}?>`})}const E1=/\{\$([^}]+)}/g;function k1(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}function Ts(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],l=e[i];if(ap(s)&&ap(l)){if(!Ts(s,l))return!1}else if(s!==l)return!1}for(const i of r)if(!n.includes(i))return!1;return!0}function ap(t){return t!==null&&typeof t=="object"}/** 175 * @license 176 * Copyright 2017 Google LLC 177 * 178 * Licensed under the Apache License, Version 2.0 (the "License"); 179 * you may not use this file except in compliance with the License. 180 * You may obtain a copy of the License at 181 * 182 * http://www.apache.org/licenses/LICENSE-2.0 183 * 184 * Unless required by applicable law or agreed to in writing, software 185 * distributed under the License is distributed on an "AS IS" BASIS, 186 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 187 * See the License for the specific language governing permissions and 188 * limitations under the License. 189 */function qo(t){const e=[];for(const[n,r]of Object.entries(t))Array.isArray(r)?r.forEach(i=>{e.push(encodeURIComponent(n)+"="+encodeURIComponent(i))}):e.push(encodeURIComponent(n)+"="+encodeURIComponent(r));return e.length?"&"+e.join("&"):""}function I1(t,e){const n=new T1(t,e);return n.subscribe.bind(n)}class T1{constructor(e,n){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Prom
189ise.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.");C1(e,["next","error","complete"])?i=e:i={next:e,error:n,complete:r},i.next===void 0&&(i.next=Ru),i.error===void 0&&(i.error=Ru),i.complete===void 0&&(i.complete=Ru);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 C1(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 Ru(){}/** 190 * @license 191 * Copyright 2021 Google LLC 192 * 193 * Licensed under the Apache License, Version 2.0 (the "License"); 194 * you may not use this file except in compliance with the License. 195 * You may obtain a copy of the License at 196 * 197 * http://www.apache.org/licenses/LICENSE-2.0 198 * 199 * Unless required by applicable law or agreed to in writing, software 200 * distributed under the License is distributed on an "AS IS" BASIS, 201 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 202 * See the License for the specific language governing permissions and 203 * limitations under the License. 204 */function en(t){return t&&t._delegate?t._delegate:t}class Yr{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}}/** 205 * @license 206 * Copyright 2019 Google LLC 207 * 208 * Licensed under the Apache License, Version 2.0 (the "License"); 209 * you may not use this file except in compliance with the License. 210 * You may obtain a copy of the License at 211 * 212 * http://www.apache.org/licenses/LICENSE-2.0 213 * 214 * Unless required by applicable law or agreed to in writing, software 215 * distributed under the License is distributed on an "AS IS" BASIS, 216 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 217 * See the License for the specific language governing permissions and 218 * limitations under the License. 219 */const pi="[DEFAULT]";/** 220 * @license 221 * Copyright 2019 Google LLC 222 * 223 * Licensed under the Apache License, Version 2.0 (the "License"); 224 * you may not use this file except in compliance with the License. 225 * You may obtain a copy of the License at 226 * 227 * http://www.apache.org/licenses/LICENSE-2.0 228 * 229 * Unless required by applicable law or agreed to in writing, software 230 * distributed under the License is distributed on an "AS IS" BASIS, 231 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 232 * See the License for the specific language governing permissions and 233 * limitations under the License. 234 */class N1{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 u1;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){const n=this.normalizeInstanceIdentifier(e==null?void 0:e.identifier),r=(e==null?void 0:e.optional)??!1;if(this.isInitialized(n)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:n})}catch(i){if(r)return null;throw i}else{if(r)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(A1(e))try{this.getOrInitializeService({instanceIdentifier:pi})}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=pi){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=pi){return this.instances.has(e)}getOptions(e=pi){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,l]of this.instancesDeferred.entries()){const u=this.normalizeInstanceIdentifier(s);r===u&&l.resolve(i)}return i}onInit(e,n){const r=this.normalizeInstanceIdentifier(n),i=this.onInitCallbacks.get(r)??new Set;i.add(e),this.onInitCallbacks.set(r,i);const s=this.instances.get(r);return s&&e(s,r),()=>{i.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:x1(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=pi){return this.component?this.component.multipleInstances?e:pi:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function x1(t){return t===pi?void 0:t}function A1(t){return t.instantiationMode==="EAGER"}/** 235 * @license 236 * Copyright 2019 Google LLC 237 * 238 * Licensed under the Apache License, Version 2.0 (the "License");
239 * you may not use this file except in compliance with the License. 240 * You may obtain a copy of the License at 241 * 242 * http://www.apache.org/licenses/LICENSE-2.0 243 * 244 * Unless required by applicable law or agreed to in writing, software 245 * distributed under the License is distributed on an "AS IS" BASIS, 246 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 247 * See the License for the specific language governing permissions and 248 * limitations under the License. 249 */class R1{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 N1(e,this);return this.providers.set(e,n),n}getProviders(){return Array.from(this.providers.values())}}/** 250 * @license 251 * Copyright 2017 Google LLC 252 * 253 * Licensed under the Apache License, Version 2.0 (the "License"); 254 * you may not use this file except in compliance with the License. 255 * You may obtain a copy of the License at 256 * 257 * http://www.apache.org/licenses/LICENSE-2.0 258 * 259 * Unless required by applicable law or agreed to in writing, software 260 * distributed under the License is distributed on an "AS IS" BASIS, 261 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 262 * See the License for the specific language governing permissions and 263 * limitations under the License. 264 */var _e;(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"})(_e||(_e={}));const P1={debug:_e.DEBUG,verbose:_e.VERBOSE,info:_e.INFO,warn:_e.WARN,error:_e.ERROR,silent:_e.SILENT},O1=_e.INFO,L1={[_e.DEBUG]:"log",[_e.VERBOSE]:"log",[_e.INFO]:"info",[_e.WARN]:"warn",[_e.ERROR]:"error"},j1=(t,e,...n)=>{if(e<t.logLevel)return;const r=new Date().toISOString(),i=L1[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 Xd{constructor(e){this.name=e,this._logLevel=O1,this._logHandler=j1,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in _e))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?P1[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,_e.DEBUG,...e),this._logHandler(this,_e.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,_e.VERBOSE,...e),this._logHandler(this,_e.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,_e.INFO,...e),this._logHandler(this,_e.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,_e.WARN,...e),this._logHandler(this,_e.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,_e.ERROR,...e),this._logHandler(this,_e.ERROR,...e)}}const b1=(t,e)=>e.some(n=>t instanceof n);let up,cp;function D1(){return up||(up=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function M1(){return cp||(cp=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Uy=new WeakMap,Dc=new WeakMap,Fy=new WeakMap,Pu=new WeakMap,Jd=new WeakMap;function U1(t){const e=new Promise((n,r)=>{const i=()=>{t.removeEventListener("success",s),t.removeEventListener("error",l)},s=()=>{n(Gr(t.result)),i()},l=()=>{r(t.error),i()};t.addEventListener("success",s),t.addEventListener("error",l)});return e.then(n=>{n instanceof IDBCursor&&Uy.set(n,t)}).catch(()=>{}),Jd.set(e,t),e}function F1(t){if(Dc.has(t))return;const e=new Promise((n,r)=>{const i=()=>{t.removeEventListener("complete",s),t.removeEventListener("error",l),t.removeEventListener("abort",l)},s=()=>{n(),i()},l=()=>{r(t.error||new DOMException("AbortError","AbortError")),i()};t.addEventListener("complete",s),t.addEventListener("error",l),t.addEventListener("abort",l)});Dc.set(t,e)}let Mc={get(t,e,n){if(t instanceof IDBTransaction){if(e==="done")return Dc.get(t);if(e==="objectStoreNames")return t.objectStoreNames||Fy.get(t);if(e==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Gr(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 z1(t){Mc=t(Mc)}function B1(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...n){const r=t.call(Ou(this),e,...n);return Fy.set(r,e.sort?e.sort():[e]),Gr(r)}:M1().includes(t)?function(...e){return t.apply(Ou(this),e),Gr(Uy.get(this))}:function(...e){return Gr(t.apply(Ou(this),e))}}function $1(t){return typeof t=="function"?B1(t):(t instanceof IDBTransaction&&F1(t),b1(t,D1())?new Proxy(t,Mc):t)}function Gr(t){if(t instanceof IDBRequest)return U1(t);if(Pu.has(t))return Pu.get(t);const e=$1(t);return e!==t&&(Pu.set(t,e),Jd.set(e,t)),e}const Ou=t=>Jd.get(t);function V1(t,e,{blocked:n,upgrade:r,blocking:i,terminated:s}={}){const l=indexedDB.open(t,e),u=Gr(l);return r&&l.addEventListener("upgradeneeded",c=>{r(Gr(l.result),c.oldVersion,c.newVersion,Gr(l.transaction),c)}),n&&l.addEventListener("blocked",c=>n(c.oldVersion,c.newVersion,c)),u.then(c=>{s&&c.addEventListener("close",()=>s()),i&&c.addEventListener("versionchange",f=>i(f.oldVersion,f.newVersion,f))}).catch(()=>{}),u}const H1=["get","getKey","getAll","getAllKeys","count"],W1=["put","add","delete","clear"],Lu=new Map;function dp(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(Lu.get(e))return Lu.get(e);const n=e.replace(/FromIndex$/,""),r=e!==n,i=W1.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||H1.includes(n)))return;const s=async function(l,...u){const c=this.transaction(l,i?"readwrite":"readonly");let f=c.store;
264return r&&(f=f.index(u.shift())),(await Promise.all([f[n](...u),i&&c.done]))[0]};return Lu.set(e,s),s}z1(t=>({...t,get:(e,n,r)=>dp(e,n)||t.get(e,n,r),has:(e,n)=>!!dp(e,n)||t.has(e,n)}));/** 265 * @license 266 * Copyright 2019 Google LLC 267 * 268 * Licensed under the Apache License, Version 2.0 (the "License"); 269 * you may not use this file except in compliance with the License. 270 * You may obtain a copy of the License at 271 * 272 * http://www.apache.org/licenses/LICENSE-2.0 273 * 274 * Unless required by applicable law or agreed to in writing, software 275 * distributed under the License is distributed on an "AS IS" BASIS, 276 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 277 * See the License for the specific language governing permissions and 278 * limitations under the License. 279 */class q1{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(n=>{if(G1(n)){const r=n.getImmediate();return`${r.library}/${r.version}`}else return null}).filter(n=>n).join(" ")}}function G1(t){const e=t.getComponent();return(e==null?void 0:e.type)==="VERSION"}const Uc="@firebase/app",hp="0.14.9";/** 280 * @license 281 * Copyright 2019 Google LLC 282 * 283 * Licensed under the Apache License, Version 2.0 (the "License"); 284 * you may not use this file except in compliance with the License. 285 * You may obtain a copy of the License at 286 * 287 * http://www.apache.org/licenses/LICENSE-2.0 288 * 289 * Unless required by applicable law or agreed to in writing, software 290 * distributed under the License is distributed on an "AS IS" BASIS, 291 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 292 * See the License for the specific language governing permissions and 293 * limitations under the License. 294 */const mr=new Xd("@firebase/app"),K1="@firebase/app-compat",Q1="@firebase/analytics-compat",X1="@firebase/analytics",J1="@firebase/app-check-compat",Y1="@firebase/app-check",Z1="@firebase/auth",eS="@firebase/auth-compat",tS="@firebase/database",nS="@firebase/data-connect",rS="@firebase/database-compat",iS="@firebase/functions",sS="@firebase/functions-compat",oS="@firebase/installations",lS="@firebase/installations-compat",aS="@firebase/messaging",uS="@firebase/messaging-compat",cS="@firebase/performance",dS="@firebase/performance-compat",hS="@firebase/remote-config",fS="@firebase/remote-config-compat",pS="@firebase/storage",mS="@firebase/storage-compat",gS="@firebase/firestore",yS="@firebase/ai",vS="@firebase/firestore-compat",_S="firebase",wS="12.10.0";/** 295 * @license 296 * Copyright 2019 Google LLC 297 * 298 * Licensed under the Apache License, Version 2.0 (the "License"); 299 * you may not use this file except in compliance with the License. 300 * You may obtain a copy of the License at 301 * 302 * http://www.apache.org/licenses/LICENSE-2.0 303 * 304 * Unless required by applicable law or agreed to in writing, software 305 * distributed under the License is distributed on an "AS IS" BASIS, 306 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 307 * See the License for the specific language governing permissions and 308 * limitations under the License. 309 */const Fc="[DEFAULT]",SS={[Uc]:"fire-core",[K1]:"fire-core-compat",[X1]:"fire-analytics",[Q1]:"fire-analytics-compat",[Y1]:"fire-app-check",[J1]:"fire-app-check-compat",[Z1]:"fire-auth",[eS]:"fire-auth-compat",[tS]:"fire-rtdb",[nS]:"fire-data-connect",[rS]:"fire-rtdb-compat",[iS]:"fire-fn",[sS]:"fire-fn-compat",[oS]:"fire-iid",[lS]:"fire-iid-compat",[aS]:"fire-fcm",[uS]:"fire-fcm-compat",[cS]:"fire-perf",[dS]:"fire-perf-compat",[hS]:"fire-rc",[fS]:"fire-rc-compat",[pS]:"fire-gcs",[mS]:"fire-gcs-compat",[gS]:"fire-fst",[vS]:"fire-fst-compat",[yS]:"fire-vertex","fire-js":"fire-js",[_S]:"fire-js-all"};/** 310 * @license 311 * Copyright 2019 Google LLC 312 * 313 * Licensed under the Apache License, Version 2.0 (the "License"); 314 * you may not use this file except in compliance with the License. 315 * You may obtain a copy of the License at 316 * 317 * http://www.apache.org/licenses/LICENSE-2.0 318 * 319 * Unless required by applicable law or agreed to in writing, software 320 * distributed under the License is distributed on an "AS IS" BASIS, 321 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 322 * See the License for the specific language governing permissions and 323 * limitations under the License. 324 */const Mo=new Map,ES=new Map,zc=new Map;function fp(t,e){try{t.container.addComponent(e)}catch(n){mr.debug(`Component ${e.name} failed to register with FirebaseApp ${t.name}`,n)}}function bi(t){const e=t.name;if(zc.has(e))return mr.debug(`There were multiple attempts to register component ${e}.`),!1;zc.set(e,t);for(const n of Mo.values())fp(n,t);for(const n of ES.values())fp(n,t);return!0}function Yd(t,e){const n=t.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),t.container.getProvider(e)}function dn(t){return t==null?!1:t.settings!==void 0}/** 325 * @license 326 * Copyright 2019 Google LLC 327 * 328 * Licensed under the Apache License, Version 2.0 (the "License");
329 * you may not use this file except in compliance with the License. 330 * You may obtain a copy of the License at 331 * 332 * http://www.apache.org/licenses/LICENSE-2.0 333 * 334 * Unless required by applicable law or agreed to in writing, software 335 * distributed under the License is distributed on an "AS IS" BASIS, 336 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 337 * See the License for the specific language governing permissions and 338 * limitations under the License. 339 */const kS={"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.","invali
339d-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."},Kr=new Wo("app","Firebase",kS);/** 340 * @license 341 * Copyright 2019 Google LLC 342 * 343 * Licensed under the Apache License, Version 2.0 (the "License"); 344 * you may not use this file except in compliance with the License. 345 * You may obtain a copy of the License at 346 * 347 * http://www.apache.org/licenses/LICENSE-2.0 348 * 349 * Unless required by applicable law or agreed to in writing, software 350 * distributed under the License is distributed on an "AS IS" BASIS, 351 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 352 * See the License for the specific language governing permissions and 353 * limitations under the License. 354 */class IS{constructor(e,n,r){this._isDeleted=!1,this._options={...e},this._config={...n},this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new Yr("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 Kr.create("app-deleted",{appName:this._name})}}/** 355 * @license 356 * Copyright 2019 Google LLC 357 * 358 * Licensed under the Apache License, Version 2.0 (the "License"); 359 * you may not use this file except in compliance with the License. 360 * You may obtain a copy of the License at 361 * 362 * http://www.apache.org/licenses/LICENSE-2.0 363 * 364 * Unless required by applicable law or agreed to in writing, software 365 * distributed under the License is distributed on an "AS IS" BASIS, 366 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 367 * See the License for the specific language governing permissions and 368 * limitations under the License. 369 */const Bi=wS;function zy(t,e={}){let n=t;typeof e!="object"&&(e={name:e});const r={name:Fc,automaticDataCollectionEnabled:!0,...e},i=r.name;if(typeof i!="string"||!i)throw Kr.create("bad-app-name",{appName:String(i)});if(n||(n=jy()),!n)throw Kr.create("no-options");const s=Mo.get(i);if(s){if(Ts(n,s.options)&&Ts(r,s.config))return s;throw Kr.create("duplicate-app",{appName:i})}const l=new R1(i);for(const c of zc.values())l.addComponent(c);const u=new IS(n,r,l);return Mo.set(i,u),u}function Zd(t=Fc){const e=Mo.get(t);if(!e&&t===Fc&&jy())return zy();if(!e)throw Kr.create("no-app",{appName:t});return e}function TS(){return Array.from(Mo.values())}function Yn(t,e,n){let r=SS[t]??t;n&&(r+=`-${n}`);const i=r.match(/\s|\//),s=e.match(/\s|\//);if(i||s){const l=[`Unable to register library "${r}" with version "${e}":`];i&&l.push(`library name "${r}" contains illegal characters (whitespace or "/")`),i&&s&&l.push("and"),s&&l.push(`version name "${e}" contains illegal characters (whitespace or "/")`),mr.warn(l.join(" "));return}bi(new Yr(`${r}-version`,()=>({library:r,version:e}),"VERSION"))}/** 370 * @license 371 * Copyright 2021 Google LLC 372 * 373 * Licensed under the Apache License, Version 2.0 (the "License"); 374 * you may not use this file except in compliance with the License. 375 * You may obtain a copy of the License at 376 * 377 * http://www.apache.org/licenses/LICENSE-2.0 378 * 379 * Unless required by applicable law or agreed to in writing, softw
379are 380 * distributed under the License is distributed on an "AS IS" BASIS, 381 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 382 * See the License for the specific language governing permissions and 383 * limitations under the License. 384 */const CS="firebase-heartbeat-database",NS=1,Uo="firebase-heartbeat-store";let ju=null;function By(){return ju||(ju=V1(CS,NS,{upgrade:(t,e)=>{switch(e){case 0:try{t.createObjectStore(Uo)}catch(n){console.warn(n)}}}}).catch(t=>{throw Kr.create("idb-open",{originalErrorMessage:t.message})})),ju}async function xS(t){try{const n=(await By()).transaction(Uo),r=await n.objectStore(Uo).get($y(t));return await n.done,r}catch(e){if(e instanceof tr)mr.warn(e.message);else{const n=Kr.create("idb-get",{originalErrorMessage:e==null?void 0:e.message});mr.warn(n.message)}}}async function pp(t,e){try{const r=(await By()).transaction(Uo,"readwrite");await r.objectStore(Uo).put(e,$y(t)),await r.done}catch(n){if(n instanceof tr)mr.warn(n.message);else{const r=Kr.create("idb-set",{originalErrorMessage:n==null?void 0:n.message});mr.warn(r.message)}}}function $y(t){return`${t.name}!${t.options.appId}`}/** 385 * @license 386 * Copyright 2021 Google LLC 387 * 388 * Licensed under the Apache License, Version 2.0 (the "License"); 389 * you may not use this file except in compliance with the License. 390 * You may obtain a copy of the License at 391 * 392 * http://www.apache.org/licenses/LICENSE-2.0 393 * 394 * Unless required by applicable law or agreed to in writing, software 395 * distributed under the License is distributed on an "AS IS" BASIS, 396 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 397 * See the License for the specific language governing permissions and 398 * limitations under the License. 399 */const AS=1024,RS=30;class PS{constructor(e){this.container=e,this._heartbeatsCache=null;const n=this.container.getProvider("app").getImmediate();this._storage=new LS(n),this._heartbeatsCachePromise=this._storage.read().then(r=>(this._heartbeatsCache=r,r))}async triggerHeartbeat(){var e,n;try{const i=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),s=mp();if(((e=this._heartbeatsCache)==null?void 0:e.heartbeats)==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,((n=this._heartbeatsCache)==null?void 0:n.heartbeats)==null)||this._heartbeatsCache.lastSentHeartbeatDate===s||this._heartbeatsCache.heartbeats.some(l=>l.date===s))return;if(this._heartbeatsCache.heartbeats.push({date:s,agent:i}),this._heartbeatsCache.heartbeats.length>RS){const l=jS(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice(l,1)}return this._storage.overwrite(this._heartbeatsCache)}catch(r){mr.warn(r)}}async getHeartbeatsHeader(){var e;try{if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,((e=this._heartbeatsCache)==null?void 0:e.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";const n=mp(),{heartbeatsToSend:r,unsentEntries:i}=OS(this._heartbeatsCache.heartbeats),s=va(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}catch(n){return mr.warn(n),""}}}function mp(){return new Date().toISOString().substring(0,10)}function OS(t,e=AS){const n=[];let r=t.slice();for(const i of t){const s=n.find(l=>l.agent===i.agent);if(s){if(s.dates.push(i.date),gp(n)>e){s.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),gp(n)>e){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}class LS{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return v1()?_1().then(()=>!0).catch(()=>!1):!1}async read(){if(await this._canUseIndexedDBPromise){const n=await xS(this.app);return n!=null&&n.heartbeats?n:{heartbeats:[]}}else return{heartbeats:[]}}async overwrite(e){if(await this._canUseIndexedDBPromise){const r=await this.read();return pp(this.app,{lastSentHeartbeatDate:e.lastSentHeartbeatDate??r.lastSentHeartbeatDate,heartbeats:e.heartbeats})}else return}async add(e){if(await this._canUseIndexedDBPromise){const r=await this.read();return pp(this.app,{lastSentHeartbeatDate:e.lastSentHeartbeatDate??r.lastSentHeartbeatDate,heartbeats:[...r.heartbeats,...e.heartbeats]})}else return}}function gp(t){return va(JSON.stringify({version:2,heartbeats:t})).length}function jS(t){if(t.length===0)return-1;let e=0,n=t[0].date;for(let r=1;r<t.length;r++)t[r].date<n&&(n=t[r].date,e=r);return e}/** 400 * @license 401 * Copyright 2019 Google LLC 402 * 403 * Licensed under the Apache License, Version 2.0 (the "License");
404 * you may not use this file except in compliance with the License. 405 * You may obtain a copy of the License at 406 * 407 * http://www.apache.org/licenses/LICENSE-2.0 408 * 409 * Unless required by applicable law or agreed to in writing, software 410 * distributed under the License is distributed on an "AS IS" BASIS, 411 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 412 * See the License for the specific language governing permissions and 413 * limitations under the License. 414 */function bS(t){bi(new Yr("platform-logger",e=>new q1(e),"PRIVATE")),bi(new Yr("heartbeat",e=>new PS(e),"PRIVATE")),Yn(Uc,hp,t),Yn(Uc,hp,"esm2020"),Yn("fire-js","")}bS("");/** 415 * @license 416 * Copyright 2017 Google LLC 417 * 418 * Licensed under the Apache License, Version 2.0 (the "License"); 419 * you may not use this file except in compliance with the License. 420 * You may obtain a copy of the License at 421 * 422 * http://www.apache.org/licenses/LICENSE-2.0 423 * 424 * Unless required by applicable law or agreed to in writing, software 425 * distributed under the License is distributed on an "AS IS" BASIS, 426 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 427 * See the License for the specific language governing permissions and 428 * limitations under the License. 429 */const Vy="firebasestorage.googleapis.com",Hy="storageBucket",DS=2*60*1e3,MS=10*60*1e3;/** 430 * @license 431 * Copyright 2017 Google LLC 432 * 433 * Licensed under the Apache License, Version 2.0 (the "License"); 434 * you may not use this file except in compliance with the License. 435 * You may obtain a copy of the License at 436 * 437 * http://www.apache.org/licenses/LICENSE-2.0 438 * 439 * Unless required by applicable law or agreed to in writing, software 440 * distributed under the License is distributed on an "AS IS" BASIS, 441 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 442 * See the License for the specific language governing permissions and 443 * limitations under the License. 444 */class Me extends tr{constructor(e,n,r=0){super(bu(e),`Firebase Storage: ${n} (${bu(e)})`),this.status_=r,this.customData={serverResponse:null},this._baseMessage=this.message,Object.setPrototypeOf(this,Me.prototype)}get status(){return this.status_}set status(e){this.status_=e}_codeEquals(e){return bu(e)===this.code}get serverResponse(){return this.customData.serverResponse}set serverResponse(e){this.customData.serverResponse=e,this.customData.serverResponse?this.message=`${this._baseMessage} 445${this.customData.serverResponse}`:this.message=this._baseMessage}}var De;(function(t){t.UNKNOWN="unknown",t.OBJECT_NOT_FOUND="object-not-found",t.BUCKET_NOT_FOUND="bucket-not-found",t.PROJECT_NOT_FOUND="project-not-found",t.QUOTA_EXCEEDED="quota-exceeded",t.UNAUTHENTICATED="unauthenticated",t.UNAUTHORIZED="unauthorized",t.UNAUTHORIZED_APP="unauthorized-app",t.RETRY_LIMIT_EXCEEDED="retry-limit-exceeded",t.INVALID_CHECKSUM="invalid-checksum",t.CANCELED="canceled",t.INVALID_EVENT_NAME="invalid-event-name",t.INVALID_URL="invalid-url",t.INVALID_DEFAULT_BUCKET="invalid-default-bucket",t.NO_DEFAULT_BUCKET="no-default-bucket",t.CANNOT_SLICE_BLOB="cannot-slice-blob",t.SERVER_FILE_WRONG_SIZE="server-file-wrong-size",t.NO_DOWNLOAD_URL="no-download-url",t.INVALID_ARGUMENT="invalid-argument",t.INVALID_ARGUMENT_COUNT="invalid-argument-count",t.APP_DELETED="app-deleted",t.INVALID_ROOT_OPERATION="invalid-root-operation",t.INVALID_FORMAT="invalid-format",t.INTERNAL_ERROR="internal-error",t.UNSUPPORTED_ENVIRONMENT="unsupported-environment"})(De||(De={}));function bu(t){return"storage/"+t}function eh(){const t="An unknown error occurred, please check the error payload for server response.";return new Me(De.UNKNOWN,t)}function US(t){return new Me(De.OBJECT_NOT_FOUND,"Object '"+t+"' does not exist.")}function FS(t){return new Me(De.QUOTA_EXCEEDED,"Quota for bucket '"+t+"' exceeded, please view quota on https://firebase.google.com/pricing/.")}function zS(){const t="User is not authenticated, please authenticate using Firebase Authentication and try again.";return new Me(De.UNAUTHENTICATED,t)}function BS(){return new Me(De.UNAUTHORIZED_APP,"This app does not have permission to access Firebase Storage on this project.")}function $S(t){return new Me(De.UNAUTHORIZED,"User does not have permission to access '"+t+"'.")}function VS(){return new Me(De.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again.")}function HS(){return new Me(De.CANCELED,"User canceled the upload/download.")}function WS(t){return new Me(De.INVALID_URL,"Invalid URL '"+t+"'.")}function qS(t){return new Me(De.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+t+"'.")}function GS(){return new Me(De.NO_DEFAULT_BUCKET,"No default bucket found. Did you set the '"+Hy+"' property when initializing the app?")}function KS(){return new Me(De.CANNOT_SLICE_BLOB,"Cannot slice blob for upload. Please retry the upload.")}function QS(){return new Me(De.NO_DOWNLOAD_URL,"The given file does not have any download URLs.")}function XS(t){return new Me(De.UNSUPPORTED_ENVIRONMENT,`${t} is missing. Make sure to install the required polyfills. See https://firebase.google.com/docs/web/environments-js-sdk#polyfills for more information.`)}function Bc(t){return new Me(De.INVALID_ARGUMENT,t)}function Wy(){return new Me(De.APP_DELETED,"The Firebase app was deleted.")}function JS(t){return new Me(De.INVALID_ROOT_OPERATION,"The operation '"+t+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}function fo(t,e){return new Me(De.INVALID_FORMAT,"String does not match format '"+t+"': "+e)}function Xs(t){throw new Me(De.INTERNAL_ERROR,"Internal error: "+t)}/** 446 * @license 447 * Copyright 2017 Google LLC 448 * 449 * Licensed under the Apache License, Version 2.0 (the "License");
450 * you may not use this file except in compliance with the License. 451 * You may obtain a copy of the License at 452 * 453 * http://www.apache.org/licenses/LICENSE-2.0 454 * 455 * Unless required by applicable law or agreed to in writing, software 456 * distributed under the License is distributed on an "AS IS" BASIS, 457 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 458 * See the License for the specific language governing permissions and 459 * limitations under the License. 460 */class Qt{constructor(e,n){this.bucket=e,this.path_=n}get path(){return this.path_}get isRoot(){return this.path.length===0}fullServerUrl(){const e=encodeURIComponent;return"/b/"+e(this.bucket)+"/o/"+e(this.path)}bucketOnlyServerUrl(){return"/b/"+encodeURIComponent(this.bucket)+"/o"}static makeFromBucketSpec(e,n){let r;try{r=Qt.makeFromUrl(e,n)}catch{return new Qt(e,"")}if(r.path==="")return r;throw qS(e)}static makeFromUrl(e,n){let r=null;const i="([A-Za-z0-9.\\-_]+)";function s(O){O.path.charAt(O.path.length-1)==="/"&&(O.path_=O.path_.slice(0,-1))}const l="(/(.*))?$",u=new RegExp("^gs://"+i+l,"i"),c={bucket:1,path:3};function f(O){O.path_=decodeURIComponent(O.path)}const _="v[A-Za-z0-9_]+",k=n.replace(/[.]/g,"\\."),E="(/([^?#]*).*)?$",L=new RegExp(`^https?://${k}/${_}/b/${i}/o${E}`,"i"),A={bucket:1,path:3},P=n===Vy?"(?:storage.googleapis.com|storage.cloud.google.com)":n,D="([^?#]*)",I=new RegExp(`^https?://${P}/${i}/${D}`,"i"),C=[{regex:u,indices:c,postModify:s},{regex:L,indices:A,postModify:f},{regex:I,indices:{bucket:1,path:2},postModify:f}];for(let O=0;O<C.length;O++){const U=C[O],M=U.regex.exec(e);if(M){const y=M[U.indices.bucket];let p=M[U.indices.path];p||(p=""),r=new Qt(y,p),U.postModify(r);break}}if(r==null)throw WS(e);return r}}class YS{constructor(e){this.promise_=Promise.reject(e)}getPromise(){return this.promise_}cancel(e=!1){}}/** 461 * @license 462 * Copyright 2017 Google LLC 463 * 464 * Licensed under the Apache License, Version 2.0 (the "License"); 465 * you may not use this file except in compliance with the License. 466 * You may obtain a copy of the License at 467 * 468 * http://www.apache.org/licenses/LICENSE-2.0 469 * 470 * Unless required by applicable law or agreed to in writing, software 471 * distributed under the License is distributed on an "AS IS" BASIS, 472 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 473 * See the License for the specific language governing permissions and 474 * limitations under the License. 475 */function ZS(t,e,n){let r=1,i=null,s=null,l=!1,u=0;function c(){return u===2}let f=!1;function _(...D){f||(f=!0,e.apply(null,D))}function k(D){i=setTimeout(()=>{i=null,t(L,c())},D)}function E(){s&&clearTimeout(s)}function L(D,...I){if(f){E();return}if(D){E(),_.call(null,D,...I);return}if(c()||l){E(),_.call(null,D,...I);return}r<64&&(r*=2);let C;u===1?(u=2,C=0):C=(r+Math.random())*1e3,k(C)}let A=!1;function P(D){A||(A=!0,E(),!f&&(i!==null?(D||(u=2),clearTimeout(i),k(0)):D||(u=1)))}return k(0),s=setTimeout(()=>{l=!0,P(!0)},n),P}function eE(t){t(!1)}/** 476 * @license 477 * Copyright 2017 Google LLC 478 * 479 * Licensed under the Apache License, Version 2.0 (the "License"); 480 * you may not use this file except in compliance with the License. 481 * You may obtain a copy of the License at 482 * 483 * http://www.apache.org/licenses/LICENSE-2.0 484 * 485 * Unless required by applicable law or agreed to in writing, software 486 * distributed under the License is distributed on an "AS IS" BASIS, 487 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 488 * See the License for the specific language governing permissions and 489 * limitations under the License. 490 */function tE(t){return t!==void 0}function nE(t){return typeof t=="object"&&!Array.isArray(t)}function th(t){return typeof t=="string"||t instanceof String}function yp(t){return nh()&&t instanceof Blob}function nh(){return typeof Blob<"u"}function vp(t,e,n,r){if(r<e)throw Bc(`Invalid value for '${t}'. Expected ${e} or greater.`);if(r>n)throw Bc(`Invalid value for '${t}'. Expected ${n} or less.`)}/** 491 * @license 492 * Copyright 2017 Google LLC 493 * 494 * Licensed under the Apache License, Version 2.0 (the "License");
495 * you may not use this file except in compliance with the License. 496 * You may obtain a copy of the License at 497 * 498 * http://www.apache.org/licenses/LICENSE-2.0 499 * 500 * Unless required by applicable law or agreed to in writing, software 501 * distributed under the License is distributed on an "AS IS" BASIS, 502 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 503 * See the License for the specific language governing permissions and 504 * limitations under the License. 505 */function rh(t,e,n){let r=e;return n==null&&(r=`https://${e}`),`${n}://${r}/v0${t}`}function qy(t){const e=encodeURIComponent;let n="?";for(const r in t)if(t.hasOwnProperty(r)){const i=e(r)+"="+e(t[r]);n=n+i+"&"}return n=n.slice(0,-1),n}var Ti;(function(t){t[t.NO_ERROR=0]="NO_ERROR",t[t.NETWORK_ERROR=1]="NETWORK_ERROR",t[t.ABORT=2]="ABORT"})(Ti||(Ti={}));/** 506 * @license 507 * Copyright 2022 Google LLC 508 * 509 * Licensed under the Apache License, Version 2.0 (the "License"); 510 * you may not use this file except in compliance with the License. 511 * You may obtain a copy of the License at 512 * 513 * http://www.apache.org/licenses/LICENSE-2.0 514 * 515 * Unless required by applicable law or agreed to in writing, software 516 * distributed under the License is distributed on an "AS IS" BASIS, 517 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 518 * See the License for the specific language governing permissions and 519 * limitations under the License. 520 */function rE(t,e){const n=t>=500&&t<600,i=[408,429].indexOf(t)!==-1,s=e.indexOf(t)!==-1;return n||i||s}/** 521 * @license 522 * Copyright 2017 Google LLC 523 * 524 * Licensed under the Apache License, Version 2.0 (the "License"); 525 * you may not use this file except in compliance with the License. 526 * You may obtain a copy of the License at 527 * 528 * http://www.apache.org/licenses/LICENSE-2.0 529 * 530 * Unless required by applicable law or agreed to in writing, software 531 * distributed under the License is distributed on an "AS IS" BASIS, 532 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 533 * See the License for the specific language governing permissions and 534 * limitations under the License. 535 */class iE{constructor(e,n,r,i,s,l,u,c,f,_,k,E=!0,L=!1){this.url_=e,this.method_=n,this.headers_=r,this.body_=i,this.successCodes_=s,this.additionalRetryCodes_=l,this.callback_=u,this.errorCallback_=c,this.timeout_=f,this.progressCallback_=_,this.connectionFactory_=k,this.retry=E,this.isUsingEmulator=L,this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.promise_=new Promise((A,P)=>{this.resolve_=A,this.reject_=P,this.start_()})}start_(){const e=(r,i)=>{if(i){r(!1,new Sl(!1,null,!0));return}const s=this.connectionFactory_();this.pendingConnection_=s;const l=u=>{const c=u.loaded,f=u.lengthComputable?u.total:-1;this.progressCallback_!==null&&this.progressCallback_(c,f)};this.progressCallback_!==null&&s.addUploadProgressListener(l),s.send(this.url_,this.method_,this.isUsingEmulator,this.body_,this.headers_).then(()=>{this.progressCallback_!==null&&s.removeUploadProgressListener(l),this.pendingConnection_=null;const u=s.getErrorCode()===Ti.NO_ERROR,c=s.getStatus();if(!u||rE(c,this.additionalRetryCodes_)&&this.retry){const _=s.getErrorCode()===Ti.ABORT;r(!1,new Sl(!1,null,_));return}const f=this.successCodes_.indexOf(c)!==-1;r(!0,new Sl(f,s))})},n=(r,i)=>{const s=this.resolve_,l=this.reject_,u=i.connection;if(i.wasSuccessCode)try{const c=this.callback_(u,u.getResponse());tE(c)?s(c):s()}catch(c){l(c)}else if(u!==null){const c=eh();c.serverResponse=u.getErrorText(),this.errorCallback_?l(this.errorCallback_(u,c)):l(c)}else if(i.canceled){const c=this.appDelete_?Wy():HS();l(c)}else{const c=VS();l(c)}};this.canceled_?n(!1,new Sl(!1,null,!0)):this.backoffId_=ZS(e,n,this.timeout_)}getPromise(){return this.promise_}cancel(e){this.canceled_=!0,this.appDelete_=e||!1,this.backoffId_!==null&&eE(this.backoffId_),this.pendingConnection_!==null&&this.pendingConnection_.abort()}}class Sl{constructor(e,n,r){this.wasSuccessCode=e,this.connection=n,this.canceled=!!r}}function sE(t,e){e!==null&&e.length>0&&(t.Authorization="Firebase "+e)}function oE(t,e){t["X-Firebase-Storage-Version"]="webjs/"+(e??"AppManager")}function lE(t,e){e&&(t["X-Firebase-GMPID"]=e)}function aE(t,e){e!==null&&(t["X-Firebase-AppCheck"]=e)}
535function uE(t,e,n,r,i,s,l=!0,u=!1){const c=qy(t.urlParams),f=t.url+c,_=Object.assign({},t.headers);return lE(_,e),sE(_,n),oE(_,s),aE(_,r),new iE(f,t.method,_,t.body,t.successCodes,t.additionalRetryCodes,t.handler,t.errorHandler,t.timeout,t.progressCallback,i,l,u)}/** 536 * @license 537 * Copyright 2017 Google LLC 538 * 539 * Licensed under the Apache License, Version 2.0 (the "License"); 540 * you may not use this file except in compliance with the License. 541 * You may obtain a copy of the License at 542 * 543 * http://www.apache.org/licenses/LICENSE-2.0 544 * 545 * Unless required by applicable law or agreed to in writing, software 546 * distributed under the License is distributed on an "AS IS" BASIS, 547 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 548 * See the License for the specific language governing permissions and 549 * limitations under the License. 550 */function cE(){return typeof BlobBuilder<"u"?BlobBuilder:typeof WebKitBlobBuilder<"u"?WebKitBlobBuilder:void 0}function dE(...t){const e=cE();if(e!==void 0){const n=new e;for(let r=0;r<t.length;r++)n.append(t[r]);return n.getBlob()}else{if(nh())return new Blob(t);throw new Me(De.UNSUPPORTED_ENVIRONMENT,"This browser doesn't seem to support creating Blobs")}}function hE(t,e,n){return t.webkitSlice?t.webkitSlice(e,n):t.mozSlice?t.mozSlice(e,n):t.slice?t.slice(e,n):null}/** 551 * @license 552 * Copyright 2021 Google LLC 553 * 554 * Licensed under the Apache License, Version 2.0 (the "License"); 555 * you may not use this file except in compliance with the License. 556 * You may obtain a copy of the License at 557 * 558 * http://www.apache.org/licenses/LICENSE-2.0 559 * 560 * Unless required by applicable law or agreed to in writing, software 561 * distributed under the License is distributed on an "AS IS" BASIS, 562 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 563 * See the License for the specific language governing permissions and 564 * limitations under the License. 565 */function fE(t){if(typeof atob>"u")throw XS("base-64");return atob(t)}/** 566 * @license 567 * Copyright 2017 Google LLC 568 * 569 * Licensed under the Apache License, Version 2.0 (the "License"); 570 * you may not use this file except in compliance with the License. 571 * You may obtain a copy of the License at 572 * 573 * http://www.apache.org/licenses/LICENSE-2.0 574 * 575 * Unless required by applicable law or agreed to in writing, software 576 * distributed under the License is distributed on an "AS IS" BASIS, 577 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 578 * See the License for the specific language governing permissions and 579 * limitations under the License. 580 */const Kn={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"};class Du{constructor(e,n){this.data=e,this.contentType=n||null}}function pE(t,e){switch(t){case Kn.RAW:return new Du(Gy(e));case Kn.BASE64:case Kn.BASE64URL:return new Du(Ky(t,e));case Kn.DATA_URL:return new Du(gE(e),yE(e))}throw eh()}function Gy(t){const e=[];for(let n=0;n<t.length;n++){let r=t.charCodeAt(n);if(r<=127)e.push(r);else if(r<=2047)e.push(192|r>>6,128|r&63);else if((r&64512)===55296)if(!(n<t.length-1&&(t.charCodeAt(n+1)&64512)===56320))e.push(239,191,189);else{const s=r,l=t.charCodeAt(++n);r=65536|(s&1023)<<10|l&1023,e.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|r&63)}else(r&64512)===56320?e.push(239,191,189):e.push(224|r>>12,128|r>>6&63,128|r&63)}return new Uint8Array(e)}function mE(t){let e;try{e=decodeURIComponent(t)}catch{throw fo(Kn.DATA_URL,"Malformed data URL.")}return Gy(e)}function Ky(t,e){switch(t){case Kn.BASE64:{const i=e.indexOf("-")!==-1,s=e.indexOf("_")!==-1;if(i||s)throw fo(t,"Invalid character '"+(i?"-":"_")+"' found: is it base64url encoded?");break}case Kn.BASE64URL:{const i=e.indexOf("+")!==-1,s=e.indexOf("/")!==-1;if(i||s)throw fo(t,"Invalid character '"+(i?"+":"/")+"' found: is it base64 encoded?");e=e.replace(/-/g,"+").replace(/_/g,"/");break}}let n;try{n=fE(e)}catch(i){throw i.message.includes("polyfill")?i:fo(t,"Invalid character found")}const r=new Uint8Array(n.length);for(let i=0;i<n.length;i++)r[i]=n.charCodeAt(i);return r}class Qy{constructor(e){this.base64=!1,this.contentType=null;const n=e.match(/^data:([^,]+)?,/);if(n===null)throw fo(Kn.DATA_URL,"Must be formatted 'data:[<mediatype>][;base64],<data>");const r=n[1]||null;r!=null&&(this.base64=vE(r,";base64"),this.contentType=this.base64?r.substring(0,r.length-7):r),this.rest=e.substring(e.indexOf(",")+1)}}function gE(t){const e=new Qy(t);return e.base64?Ky(Kn.BASE64,e.rest):mE(e.rest)}function yE(t){return new Qy(t).contentType}function vE(t,e){return t.length>=e.length?t.substring(t.length-e.length)===e:!1}/** 581 * @license 582 * Copyright 2017 Google LLC 583 * 584 * Licensed under the Apache License, Version 2.0 (the "License");
585 * you may not use this file except in compliance with the License. 586 * You may obtain a copy of the License at 587 * 588 * http://www.apache.org/licenses/LICENSE-2.0 589 * 590 * Unless required by applicable law or agreed to in writing, software 591 * distributed under the License is distributed on an "AS IS" BASIS, 592 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 593 * See the License for the specific language governing permissions and 594 * limitations under the License. 595 */class Or{constructor(e,n){let r=0,i="";yp(e)?(this.data_=e,r=e.size,i=e.type):e instanceof ArrayBuffer?(n?this.data_=new Uint8Array(e):(this.data_=new Uint8Array(e.byteLength),this.data_.set(new Uint8Array(e))),r=this.data_.length):e instanceof Uint8Array&&(n?this.data_=e:(this.data_=new Uint8Array(e.length),this.data_.set(e)),r=e.length),this.size_=r,this.type_=i}size(){return this.size_}type(){return this.type_}slice(e,n){if(yp(this.data_)){const r=this.data_,i=hE(r,e,n);return i===null?null:new Or(i)}else{const r=new Uint8Array(this.data_.buffer,e,n-e);return new Or(r,!0)}}static getBlob(...e){if(nh()){const n=e.map(r=>r instanceof Or?r.data_:r);return new Or(dE.apply(null,n))}else{const n=e.map(l=>th(l)?pE(Kn.RAW,l).data:l.data_);let r=0;n.forEach(l=>{r+=l.byteLength});const i=new Uint8Array(r);let s=0;return n.forEach(l=>{for(let u=0;u<l.length;u++)i[s++]=l[u]}),new Or(i,!0)}}uploadData(){return this.data_}}/** 596 * @license 597 * Copyright 2017 Google LLC 598 * 599 * Licensed under the Apache License, Version 2.0 (the "License"); 600 * you may not use this file except in compliance with the License. 601 * You may obtain a copy of the License at 602 * 603 * http://www.apache.org/licenses/LICENSE-2.0 604 * 605 * Unless required by applicable law or agreed to in writing, software 606 * distributed under the License is distributed on an "AS IS" BASIS, 607 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 608 * See the License for the specific language governing permissions and 609 * limitations under the License. 610 */function Xy(t){let e;try{e=JSON.parse(t)}catch{return null}return nE(e)?e:null}/** 611 * @license 612 * Copyright 2017 Google LLC 613 * 614 * Licensed under the Apache License, Version 2.0 (the "License"); 615 * you may not use this file except in compliance with the License. 616 * You may obtain a copy of the License at 617 * 618 * http://www.apache.org/licenses/LICENSE-2.0 619 * 620 * Unless required by applicable law or agreed to in writing, software 621 * distributed under the License is distributed on an "AS IS" BASIS, 622 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 623 * See the License for the specific language governing permissions and 624 * limitations under the License. 625 */function _E(t){if(t.length===0)return null;const e=t.lastIndexOf("/");return e===-1?"":t.slice(0,e)}function wE(t,e){const n=e.split("/").filter(r=>r.length>0).join("/");return t.length===0?n:t+"/"+n}function Jy(t){const e=t.lastIndexOf("/",t.length-2);return e===-1?t:t.slice(e+1)}/** 626 * @license 627 * Copyright 2017 Google LLC 628 * 629 * Licensed under the Apache License, Version 2.0 (the "License"); 630 * you may not use this file except in compliance with the License. 631 * You may obtain a copy of the License at 632 * 633 * http://www.apache.org/licenses/LICENSE-2.0 634 * 635 * Unless required by applicable law or agreed to in writing, software 636 * distributed under the License is distributed on an "AS IS" BASIS, 637 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 638 * See the License for the specific language governing permissions and 639 * limitations under the License. 640 */function SE(t,e){return e}class kt{constructor(e,n,r,i){this.server=e,this.local=n||e,this.writable=!!r,this.xform=i||SE}}let El=null;function EE(t){return!th(t)||t.length<2?t:Jy(t)}function Yy(){if(El)return El;const t=[];t.push(new kt("bucket")),t.push(new kt("generation")),t.push(new kt("metageneration")),t.push(new kt("name","fullPath",!0));function e(s,l){return EE(l)}const n=new kt("name");n.xform=e,t.push(n);function r(s,l){return l!==void 0?Number(l):l}const i=new kt("size");return i.xform=r,t.push(i),t.push(new kt("timeCreated")),t.push(new kt("updated")),t.push(new kt("md5Hash",null,!0)),t.push(new kt("cacheControl",null,!0)),t.push(new kt("contentDisposition",null,!0)),t.push(new kt("contentEncoding",null,!0)),t.push(new kt("contentLanguage",null,!0)),t.push(new kt("contentType",null,!0)),t.push(new kt("metadata","customMetadata",!0)),El=t,El}function kE(t,e){function n(){const r=t.bucket,i=t.fullPath,s=new Qt(r,i);return e._makeStorageReference(s)}Object.defineProperty(t,"ref",{get:n})}function IE(t,e,n){const r={};r.type="file";const i=n.length;for(let s=0;s<i;s++){const l=n[s];r[l.local]=l.xform(r,e[l.server])}return kE(r,t),r}function Zy(t,e,n){const r=Xy(e);return r===null?null:IE(t,r,n)}function TE(t,e,n,r){const i=Xy(e);if(i===null||!th(i.downloadTokens))return null;const s=i.downloadTokens;if(s.length===0)return null;const l=encodeURIComponent;return s.split(",").map(f=>{const _=t.bucket,k=t.fullPath,E="/b/"+l(_)+"/o/"+l(k),L=rh(E,n,r),A=qy({alt:"media",token:f});return L+A})[0]}function CE(t,e){const n={},r=e.length;for(let i=0;i<r;i++){const s=e[i];s.writable&&(n[s.server]=t[s.local])}return JSON.stringify(n)}class ev{constructor(e,n,r,i){this.url=e,this.method=n,this.handler=r,this.timeout=i,this.urlParam
vendor: 4,234 bytes, lines 640-673
640s={},this.headers={},this.body=null,this.errorHandler=null,this.progressCallback=null,this.successCodes=[200],this.additionalRetryCodes=[]}}/** 641 * @license 642 * Copyright 2017 Google LLC 643 * 644 * Licensed under the Apache License, Version 2.0 (the "License"); 645 * you may not use this file except in compliance with the License. 646 * You may obtain a copy of the License at 647 * 648 * http://www.apache.org/licenses/LICENSE-2.0 649 * 650 * Unless required by applicable law or agreed to in writing, software 651 * distributed under the License is distributed on an "AS IS" BASIS, 652 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 653 * See the License for the specific language governing permissions and 654 * limitations under the License. 655 */function tv(t){if(!t)throw eh()}function NE(t,e){function n(r,i){const s=Zy(t,i,e);return tv(s!==null),s}return n}function xE(t,e){function n(r,i){const s=Zy(t,i,e);return tv(s!==null),TE(s,i,t.host,t._protocol)}return n}function nv(t){function e(n,r){let i;return n.getStatus()===401?n.getErrorText().includes("Firebase App Check token is invalid")?i=BS():i=zS():n.getStatus()===402?i=FS(t.bucket):n.getStatus()===403?i=$S(t.path):i=r,i.status=n.getStatus(),i.serverResponse=r.serverResponse,i}return e}function AE(t){const e=nv(t);function n(r,i){let s=e(r,i);return r.getStatus()===404&&(s=US(t.path)),s.serverResponse=i.serverResponse,s}return n}function RE(t,e,n){const r=e.fullServerUrl(),i=rh(r,t.host,t._protocol),s="GET",l=t.maxOperationRetryTime,u=new ev(i,s,xE(t,n),l);return u.errorHandler=AE(e),u}function PE(t,e){return t&&t.contentType||e&&e.type()||"application/octet-stream"}function OE(t,e,n){const r=Object.assign({},n);return r.fullPath=t.path,r.size=e.size(),r.contentType||(r.contentType=PE(null,e)),r}function LE(t,e,n,r,i){const s=e.bucketOnlyServerUrl(),l={"X-Goog-Upload-Protocol":"multipart"};function u(){let C="";for(let O=0;O<2;O++)C=C+Math.random().toString().slice(2);return C}const c=u();l["Content-Type"]="multipart/related; boundary="+c;const f=OE(e,r,i),_=CE(f,n),k="--"+c+`\r 656Content-Type: application/json; charset=utf-8\r 657\r 658`+_+`\r 659--`+c+`\r 660Content-Type: `+f.contentType+`\r 661\r 662`,E=`\r 663--`+c+"--",L=Or.getBlob(k,r,E);if(L===null)throw KS();const A={name:f.fullPath},P=rh(s,t.host,t._protocol),D="POST",I=t.maxUploadRetryTime,v=new ev(P,D,NE(t,n),I);return v.urlParams=A,v.headers=l,v.body=L.uploadData(),v.errorHandler=nv(e),v}class jE{constructor(){this.sent_=!1,this.xhr_=new XMLHttpRequest,this.initXhr(),this.errorCode_=Ti.NO_ERROR,this.sendPromise_=new Promise(e=>{this.xhr_.addEventListener("abort",()=>{this.errorCode_=Ti.ABORT,e()}),this.xhr_.addEventListener("error",()=>{this.errorCode_=Ti.NETWORK_ERROR,e()}),this.xhr_.addEventListener("load",()=>{e()})})}send(e,n,r,i,s){if(this.sent_)throw Xs("cannot .send() more than once");if(Os(e)&&r&&(this.xhr_.withCredentials=!0),this.sent_=!0,this.xhr_.open(n,e,!0),s!==void 0)for(const l in s)s.hasOwnProperty(l)&&this.xhr_.setRequestHeader(l,s[l].toString());return i!==void 0?this.xhr_.send(i):this.xhr_.send(),this.sendPromise_}getErrorCode(){if(!this.sent_)throw Xs("cannot .getErrorCode() before sending");return this.errorCode_}getStatus(){if(!this.sent_)throw Xs("cannot .getStatus() before sending");try{return this.xhr_.status}catch{return-1}}getResponse(){if(!this.sent_)throw Xs("cannot .getResponse() before sending");return this.xhr_.response}getErrorText(){if(!this.sent_)throw Xs("cannot .getErrorText() before sending");return this.xhr_.statusText}abort(){this.xhr_.abort()}getResponseHeader(e){return this.xhr_.getResponseHeader(e)}addUploadProgressListener(e){this.xhr_.upload!=null&&this.xhr_.upload.addEventListener("progress",e)}removeUploadProgressListener(e){this.xhr_.upload!=null&&this.xhr_.upload.removeEventListener("progress",e)}}class bE extends jE{initXhr(){this.xhr_.responseType="text"}}function rv(){return new bE}/** 664 * @license 665 * Copyright 2019 Google LLC 666 * 667 * Licensed under the Apache License, Version 2.0 (the "License"); 668 * you may not use this file except in compliance with the License. 669 * You may obtain a copy of the License at 670 * 671 * http://www.apache.org/licenses/LICENSE-2.0 672 * 673 * Unless required by applicable law or agreed to in writing, softw
673are 674 * distributed under the License is distributed on an "AS IS" BASIS, 675 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 676 * See the License for the specific language governing permissions and 677 * limitations under the License. 678 */class Di{constructor(e,n){this._service=e,n instanceof Qt?this._location=n:this._location=Qt.makeFromUrl(n,e.host)}toString(){return"gs://"+this._location.bucket+"/"+this._location.path}_newRef(e,n){return new Di(e,n)}get root(){const e=new Qt(this._location.bucket,"");return this._newRef(this._service,e)}get bucket(){return this._location.bucket}get fullPath(){return this._location.path}get name(){return Jy(this._location.path)}get storage(){return this._service}get parent(){const e=_E(this._location.path);if(e===null)return null;const n=new Qt(this._location.bucket,e);return new Di(this._service,n)}_throwIfRoot(e){if(this._location.path==="")throw JS(e)}}function DE(t,e,n){t._throwIfRoot("uploadBytes");const r=LE(t.storage,t._location,Yy(),new Or(e,!0),n);return t.storage.makeRequestWithTokens(r,rv).then(i=>({metadata:i,ref:t}))}function ME(t){t._throwIfRoot("getDownloadURL");const e=RE(t.storage,t._location,Yy());return t.storage.makeRequestWithTokens(e,rv).then(n=>{if(n===null)throw QS();return n})}function UE(t,e){const n=wE(t._location.path,e),r=new Qt(t._location.bucket,n);return new Di(t.storage,r)}/** 679 * @license 680 * Copyright 2017 Google LLC 681 * 682 * Licensed under the Apache License, Version 2.0 (the "License"); 683 * you may not use this file except in compliance with the License. 684 * You may obtain a copy of the License at 685 * 686 * http://www.apache.org/licenses/LICENSE-2.0 687 * 688 * Unless required by applicable law or agreed to in writing, software 689 * distributed under the License is distributed on an "AS IS" BASIS, 690 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 691 * See the License for the specific language governing permissions and 692 * limitations under the License. 693 */function FE(t){return/^[A-Za-z]+:\/\//.test(t)}function zE(t,e){return new Di(t,e)}function iv(t,e){if(t instanceof ih){const n=t;if(n._bucket==null)throw GS();const r=new Di(n,n._bucket);return e!=null?iv(r,e):r}else return e!==void 0?UE(t,e):t}function BE(t,e){if(e&&FE(e)){if(t instanceof ih)return zE(t,e);throw Bc("To use ref(service, url), the first argument must be a Storage instance.")}else return iv(t,e)}function _p(t,e){const n=e==null?void 0:e[Hy];return n==null?null:Qt.makeFromBucketSpec(n,t)}function $E(t,e,n,r={}){t.host=`${e}:${n}`;const i=Os(e);i&&(Dy(`https://${t.host}/b`),My("Storage",!0)),t._isUsingEmulator=!0,t._protocol=i?"https":"http";const{mockUserToken:s}=r;s&&(t._overrideAuthToken=typeof s=="string"?s:c1(s,t.app.options.projectId))}class ih{constructor(e,n,r,i,s,l=!1){this.app=e,this._authProvider=n,this._appCheckProvider=r,this._url=i,this._firebaseVersion=s,this._isUsingEmulator=l,this._bucket=null,this._host=Vy,this._protocol="https",this._appId=null,this._deleted=!1,this._maxOperationRetryTime=DS,this._maxUploadRetryTime=MS,this._requests=new Set,i!=null?this._bucket=Qt.makeFromBucketSpec(i,this._host):this._bucket=_p(this._host,this.app.options)}get host(){return this._host}set host(e){this._host=e,this._url!=null?this._bucket=Qt.makeFromBucketSpec(this._url,e):this._bucket=_p(e,this.app.options)}get maxUploadRetryTime(){return this._maxUploadRetryTime}set maxUploadRetryTime(e){vp("time",0,Number.POSITIVE_INFINITY,e),this._maxUploadRetryTime=e}get maxOperationRetryTime(){return this._maxOperationRetryTime}set maxOperationRetryTime(e){vp("time",0,Number.POSITIVE_INFINITY,e),this._maxOperationRetryTime=e}async _getAuthToken(){if(this._overrideAuthToken)return this._overrideAuthToken;const e=this._authProvider.getImmediate({optional:!0});if(e){const n=await e.getToken();if(n!==null)return n.accessToken}return null}async _getAppCheckToken(){if(dn(this.app)&&this.app.settings.appCheckToken)return this.app.settings.appCheckToken;const e=this._appCheckProvider.getImmediate({optional:!0});return e?(await e.getToken()).token:null}_delete(){return this._deleted||(this._deleted=!0,this._requests.forEac
693h(e=>e.cancel()),this._requests.clear()),Promise.resolve()}_makeStorageReference(e){return new Di(this,e)}_makeRequest(e,n,r,i,s=!0){if(this._deleted)return new YS(Wy());{const l=uE(e,this._appId,r,i,n,this._firebaseVersion,s,this._isUsingEmulator);return this._requests.add(l),l.getPromise().then(()=>this._requests.delete(l),()=>this._requests.delete(l)),l}}async makeRequestWithTokens(e,n){const[r,i]=await Promise.all([this._getAuthToken(),this._getAppCheckToken()]);return this._makeRequest(e,n,r,i).getPromise()}}const wp="@firebase/storage",Sp="0.14.1";/** 694 * @license 695 * Copyright 2020 Google LLC 696 * 697 * Licensed under the Apache License, Version 2.0 (the "License"); 698 * you may not use this file except in compliance with the License. 699 * You may obtain a copy of the License at 700 * 701 * http://www.apache.org/licenses/LICENSE-2.0 702 * 703 * Unless required by applicable law or agreed to in writing, software 704 * distributed under the License is distributed on an "AS IS" BASIS, 705 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 706 * See the License for the specific language governing permissions and 707 * limitations under the License. 708 */const sv="storage";function ov(t,e,n){return t=en(t),DE(t,e,n)}function lv(t){return t=en(t),ME(t)}function av(t,e){return t=en(t),BE(t,e)}function uv(t=Zd(),e){t=en(t);const r=Yd(t,sv).getImmediate({identifier:e}),i=a1("storage");return i&&VE(r,...i),r}function VE(t,e,n,r={}){$E(t,e,n,r)}function HE(t,{instanceIdentifier:e}){const n=t.getProvider("app").getImmediate(),r=t.getProvider("auth-internal"),i=t.getProvider("app-check-internal");return new ih(n,r,i,e,Bi)}function WE(){bi(new Yr(sv,HE,"PUBLIC").setMultipleInstances(!0)),Yn(wp,Sp,""),Yn(wp,Sp,"esm2020")}WE();var qE="firebase",GE="12.10.0";/** 709 * @license 710 * Copyright 2020 Google LLC 711 * 712 * Licensed under the Apache License, Version 2.0 (the "License"); 713 * you may not use this file except in compliance with the License. 714 * You may obtain a copy of the License at 715 * 716 * http://www.apache.org/licenses/LICENSE-2.0 717 * 718 * Unless required by applicable law or agreed to in writing, software 719 * distributed under the License is distributed on an "AS IS" BASIS, 720 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 721 * See the License for the specific language governing permissions and 722 * limitations under the License. 723 */Yn(qE,GE,"app");function cv(){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 KE=cv,dv=new Wo("auth","Firebase",cv());/** 724 * @license 725 * Copyright 2020 Google LLC 726 * 727 * Licensed under the Apache License, Version 2.0 (the "License"); 728 * you may not use this file except in compliance with the License. 729 * You may obtain a copy of the License at 730 * 731 * http://www.apache.org/licenses/LICENSE-2.0 732 * 733 * Unless required by applicable law or agreed to in writing, software 734 * distributed under the License is distributed on an "AS IS" BASIS, 735 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 736 * See the License for the specific language governing permissions and 737 * limitations under the License. 738 */const _a=new Xd("@firebase/auth");function QE(t,...e){_a.logLevel<=_e.WARN&&_a.warn(`Auth (${Bi}): ${t}`,...e)}function Fl(t,...e){_a.logLevel<=_e.ERROR&&_a.error(`Auth (${Bi}): ${t}`,...e)}/** 739 * @license 740 * Copyright 2020 Google LLC 741 * 742 * Licensed under the Apache License, Version 2.0 (the "License"); 743 * you may not use this file except in compliance with the License. 744 * You may obtain a copy of the License at 745 * 746 * http://www.apache.org/licenses/LICENSE-2.0 747 * 748 * Unless required by applicable law or agreed to in writing, software 749 * distributed under the License is distributed on an "AS IS" BASIS, 750 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 751 * See the License for the specific language governing permissions and 752 * limitations under the License. 753 */function er(t,...e){throw oh(t,...e)}function Pn(t,...e){return oh(t,...e)}function sh(t,e,n){const r={...KE(),[e]:n};return new Wo("auth","Firebase",r).create(e,{appName:t.name})}function Ci(t){return sh(t,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function XE(t,e,n){const r=n;if(!(e instanceof r))throw r.name!==e.constructor.name&&er(t,"argument-error"),sh(t,"argument-error",`Type of ${e.constructor.name} does not match expected instance.Did you pass a reference from a different Auth SDK?`)}function oh(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 dv.create(t,...e)}function J(t,e,...n){if(!t)throw oh(e,...n)}function ar(t){const e="INTERNAL ASSERTION FAILED: "+t;throw Fl(e),new Error(e)}function gr(t,e){t||ar(e)}/** 754 * @license 755 * Copyright 2020 Google LLC 756 * 757 * Licensed under the Apache License, Version 2.0 (the "License");
758 * you may not use this file except in compliance with the License. 759 * You may obtain a copy of the License at 760 * 761 * http://www.apache.org/licenses/LICENSE-2.0 762 * 763 * Unless required by applicable law or agreed to in writing, software 764 * distributed under the License is distributed on an "AS IS" BASIS, 765 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 766 * See the License for the specific language governing permissions and 767 * limitations under the License. 768 */function $c(){var t;return typeof self<"u"&&((t=self.location)==null?void 0:t.href)||""}function JE(){return Ep()==="http:"||Ep()==="https:"}function Ep(){var t;return typeof self<"u"&&((t=self.location)==null?void 0:t.protocol)||null}/** 769 * @license 770 * Copyright 2020 Google LLC 771 * 772 * Licensed under the Apache License, Version 2.0 (the "License"); 773 * you may not use this file except in compliance with the License. 774 * You may obtain a copy of the License at 775 * 776 * http://www.apache.org/licenses/LICENSE-2.0 777 * 778 * Unless required by applicable law or agreed to in writing, software 779 * distributed under the License is distributed on an "AS IS" BASIS, 780 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 781 * See the License for the specific language governing permissions and 782 * limitations under the License. 783 */function YE(){return typeof navigator<"u"&&navigator&&"onLine"in navigator&&typeof navigator.onLine=="boolean"&&(JE()||m1()||"connection"in navigator)?navigator.onLine:!0}function ZE(){if(typeof navigator>"u")return null;const t=navigator;return t.languages&&t.languages[0]||t.language||null}/** 784 * @license 785 * Copyright 2020 Google LLC 786 * 787 * Licensed under the Apache License, Version 2.0 (the "License"); 788 * you may not use this file except in compliance with the License. 789 * You may obtain a copy of the License at 790 * 791 * http://www.apache.org/licenses/LICENSE-2.0 792 * 793 * Unless required by applicable law or agreed to in writing, software 794 * distributed under the License is distributed on an "AS IS" BASIS, 795 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 796 * See the License for the specific language governing permissions and 797 * limitations under the License. 798 */class Go{constructor(e,n){this.shortDelay=e,this.longDelay=n,gr(n>e,"Short delay should be less than long delay!"),this.isMobile=f1()||g1()}get(){return YE()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}/** 799 * @license 800 * Copyright 2020 Google LLC 801 * 802 * Licensed under the Apache License, Version 2.0 (the "License"); 803 * you may not use this file except in compliance with the License. 804 * You may obtain a copy of the License at 805 * 806 * http://www.apache.org/licenses/LICENSE-2.0 807 * 808 * Unless required by applicable law or agreed to in writing, software 809 * distributed under the License is distributed on an "AS IS" BASIS, 810 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 811 * See the License for the specific language governing permissions and 812 * limitations under the License. 813 */function lh(t,e){gr(t.emulator,"Emulator should always be set here");const{url:n}=t.emulator;return e?`${n}${e.startsWith("/")?e.slice(1):e}`:n}/** 814 * @license 815 * Copyright 2020 Google LLC 816 * 817 * Licensed under the Apache License, Version 2.0 (the "License"); 818 * you may not use this file except in compliance with the License. 819 * You may obtain a copy of the License at 820 * 821 * http://www.apache.org/licenses/LICENSE-2.0 822 * 823 * Unless required by applicable law or agreed to in writing, software 824 * distributed under the License is distributed on an "AS IS" BASIS, 825 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 826 * See the License for the specific language governing permissions and 827 * limitations under the License. 828 */class hv{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;ar("Could not find fetch implementation, make sure you call FetchProvi
828der.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;ar("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;ar("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}/** 829 * @license 830 * Copyright 2020 Google LLC 831 * 832 * Licensed under the Apache License, Version 2.0 (the "License"); 833 * you may not use this file except in compliance with the License. 834 * You may obtain a copy of the License at 835 * 836 * http://www.apache.org/licenses/LICENSE-2.0 837 * 838 * Unless required by applicable law or agreed to in writing, software 839 * distributed under the License is distributed on an "AS IS" BASIS, 840 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 841 * See the License for the specific language governing permissions and 842 * limitations under the License. 843 */const ek={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"};/** 844 * @license 845 * Copyright 2020 Google LLC 846 * 847 * Licensed under the Apache License, Version 2.0 (the "License"); 848 * you may not use this file except in compliance with the License. 849 * You may obtain a copy of the License at 850 * 851 * http://www.apache.org/licenses/LICENSE-2.0 852 * 853 * Unless required by applicable law or agreed to in writing, software 854 * distributed under the License is distributed on an "AS IS" BASIS, 855 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 856 * See the License for the specific language governing permissions and 857 * limitations under the License. 858 */const tk=["/v1/accounts:signInWithCustomToken","/v1/accounts:signInWithEmailLink","/v1/accounts:signInWithIdp","/v1/accounts:signInWithPassword","/v1/accounts:signInWithPhoneNumber","/v1/token"],nk=new Go(3e4,6e4);function ah(t,e){return t.tenantId&&!e.tenantId?{...e,tenantId:t.tenantId}:e}async function Ls(t,e,n,r,i={}){return fv(t,i,async()=>{let s={},l={};r&&(e==="GET"?l=r:s={body:JSON.stringify(r)});const u=qo({key:t.config.apiKey,...l}).slice(1),c=await t._getAdditionalHeaders();c["Content-Type"]="application/json",t.languageCode&&(c["X-Firebase-Locale"]=t.languageCode);const f={method:e,headers:c,...s};return p1()||(f.referrerPolicy="no-referrer"),t.emulatorConfig&&Os(t.emulatorConfig.host)&&(f.credentials="include"),hv.fetch()(await pv(t,t.config.apiHost,n,u),f)}
858)}async function fv(t,e,n){t._canInitEmulator=!1;const r={...ek,...e};try{const i=new ik(t),s=await Promise.race([n(),i.promise]);i.clearNetworkTimeout();const l=await s.json();if("needConfirmation"in l)throw kl(t,"account-exists-with-different-credential",l);if(s.ok&&!("errorMessage"in l))return l;{const u=s.ok?l.errorMessage:l.error.message,[c,f]=u.split(" : ");if(c==="FEDERATED_USER_ID_ALREADY_LINKED")throw kl(t,"credential-already-in-use",l);if(c==="EMAIL_EXISTS")throw kl(t,"email-already-in-use",l);if(c==="USER_DISABLED")throw kl(t,"user-disabled",l);const _=r[c]||c.toLowerCase().replace(/[_\s]+/g,"-");if(f)throw sh(t,_,f);er(t,_)}}catch(i){if(i instanceof tr)throw i;er(t,"network-request-failed",{message:String(i)})}}async function rk(t,e,n,r,i={}){const s=await Ls(t,e,n,r,i);return"mfaPendingCredential"in s&&er(t,"multi-factor-auth-required",{_serverResponse:s}),s}async function pv(t,e,n,r){const i=`${e}${n}?${r}`,s=t,l=s.config.emulator?lh(t.config,i):`${t.config.apiScheme}://${i}`;return tk.includes(n)&&(await s._persistenceManagerAvailable,s._getPersistenceType()==="COOKIE")?s._getPersistence()._getFinalTarget(l).toString():l}class ik{clearNetworkTimeout(){clearTimeout(this.timer)}constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((n,r)=>{this.timer=setTimeout(()=>r(Pn(this.auth,"network-request-failed")),nk.get())})}}function kl(t,e,n){const r={appName:t.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);const i=Pn(t,e,r);return i.customData._tokenResponse=n,i}/** 859 * @license 860 * Copyright 2020 Google LLC 861 * 862 * Licensed under the Apache License, Version 2.0 (the "License"); 863 * you may not use this file except in compliance with the License. 864 * You may obtain a copy of the License at 865 * 866 * http://www.apache.org/licenses/LICENSE-2.0 867 * 868 * Unless required by applicable law or agreed to in writing, software 869 * distributed under the License is distributed on an "AS IS" BASIS, 870 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 871 * See the License for the specific language governing permissions and 872 * limitations under the License. 873 */async function sk(t,e){return Ls(t,"POST","/v1/accounts:delete",e)}async function wa(t,e){return Ls(t,"POST","/v1/accounts:lookup",e)}/** 874 * @license 875 * Copyright 2020 Google LLC 876 * 877 * Licensed under the Apache License, Version 2.0 (the "License"); 878 * you may not use this file except in compliance with the License. 879 * You may obtain a copy of the License at 880 * 881 * http://www.apache.org/licenses/LICENSE-2.0 882 * 883 * Unless required by applicable law or agreed to in writing, software 884 * distributed under the License is distributed on an "AS IS" BASIS, 885 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 886 * See the License for the specific language governing permissions and 887 * limitations under the License. 888 */function po(t){if(t)try{const e=new Date(Number(t));if(!isNaN(e.getTime()))return e.toUTCString()}catch{}}async function ok(t,e=!1){const n=en(t),r=await n.getIdToken(e),i=uh(r);J(i&&i.exp&&i.auth_time&&i.iat,n.auth,"internal-error");const s=typeof i.firebase=="object"?i.firebase:void 0,l=s==null?void 0:s.sign_in_provider;return{claims:i,token:r,authTime:po(Mu(i.auth_time)),issuedAtTime:po(Mu(i.iat)),expirationTime:po(Mu(i.exp)),signInProvider:l||null,signInSecondFactor:(s==null?void 0:s.sign_in_second_factor)||null}}function Mu(t){return Number(t)*1e3}function uh(t){const[e,n,r]=t.split(".");if(e===void 0||n===void 0||r===void 0)return Fl("JWT malformed, contained fewer than 3 sections"),null;try{const i=Oy(n);return i?JSON.parse(i):(Fl("Failed to decode base64 JWT payload"),null)}catch(i){return Fl("Caught error parsing JWT payload as JSON",i==null?void 0:i.toString()),null}}function kp(t){const e=uh(t);return J(e,"internal-error"),J(typeof e.exp<"u","internal-error"),J(typeof e.iat<"u","internal-error"),Number(e.exp)-Number(e.iat)}/** 889 * @license 890 * Copyright 2020 Google LLC 891 * 892 * Licensed under the Apache License, Version 2.0 (the "License"); 893 * you may not use this file except in compliance with the License. 894 * You may obtain a copy of the License at 895 * 896 * http://www.apache.org/licenses/LICENSE-2.0 897 * 898 * Unless required by applicable law or agreed to in writing, softw
898are 899 * distributed under the License is distributed on an "AS IS" BASIS, 900 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 901 * See the License for the specific language governing permissions and 902 * limitations under the License. 903 */async function Fo(t,e,n=!1){if(n)return e;try{return await e}catch(r){throw r instanceof tr&&lk(r)&&t.auth.currentUser===t&&await t.auth.signOut(),r}}function lk({code:t}){return t==="auth/user-disabled"||t==="auth/user-token-expired"}/** 904 * @license 905 * Copyright 2020 Google LLC 906 * 907 * Licensed under the Apache License, Version 2.0 (the "License"); 908 * you may not use this file except in compliance with the License. 909 * You may obtain a copy of the License at 910 * 911 * http://www.apache.org/licenses/LICENSE-2.0 912 * 913 * Unless required by applicable law or agreed to in writing, software 914 * distributed under the License is distributed on an "AS IS" BASIS, 915 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 916 * See the License for the specific language governing permissions and 917 * limitations under the License. 918 */class ak{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){if(e){const n=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),n}else{this.errorBackoff=3e4;const r=(this.user.stsTokenManager.expirationTime??0)-Date.now()-3e5;return Math.max(0,r)}}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()}}/** 919 * @license 920 * Copyright 2020 Google LLC 921 * 922 * Licensed under the Apache License, Version 2.0 (the "License"); 923 * you may not use this file except in compliance with the License. 924 * You may obtain a copy of the License at 925 * 926 * http://www.apache.org/licenses/LICENSE-2.0 927 * 928 * Unless required by applicable law or agreed to in writing, software 929 * distributed under the License is distributed on an "AS IS" BASIS, 930 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 931 * See the License for the specific language governing permissions and 932 * limitations under the License. 933 */class Vc{constructor(e,n){this.createdAt=e,this.lastLoginAt=n,this._initializeTime()}_initializeTime(){this.lastSignInTime=po(this.lastLoginAt),this.creationTime=po(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}/** 934 * @license 935 * Copyright 2019 Google LLC 936 * 937 * Licensed under the Apache License, Version 2.0 (the "License"); 938 * you may not use this file except in compliance with the License. 939 * You may obtain a copy of the License at 940 * 941 * http://www.apache.org/licenses/LICENSE-2.0 942 * 943 * Unless required by applicable law or agreed to in writing, software 944 * distributed under the License is distributed on an "AS IS" BASIS, 945 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 946 * See the License for the specific language governing permissions and 947 * limitations under the License. 948 */async function Sa(t){var k;const e=t.auth,n=await t.getIdToken(),r=await Fo(t,wa(e,{idToken:n}));J(r==null?void 0:r.users.length,e,"internal-error");const i=r.users[0];t._notifyReloadListener(i);const s=(k=i.providerUserInfo)!=null&&k.length?mv(i.providerUserInfo):[],l=ck(t.providerData,s),u=t.isAnonymous,c=!(t.email&&i.passwordHash)&&!(l!=null&&l.length),f=u?c:!1,_={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:l,metadata:new Vc(i.createdAt,i.lastLoginAt),isAnonymous:f};Object.assign(t,_)}async function uk(t){const e=en(t);await Sa(e),await e.auth._persistUserIfCurrent(e),e.auth._notifyListenersIfCurrent(e)}function ck(t,e){return[...t.filter(r=>!e.some(i=>i.providerId===r.providerId)),...e]}function mv(t){return t.map(({providerId:e,...n})=>
948({providerId:e,uid:n.rawId||"",displayName:n.displayName||null,email:n.email||null,phoneNumber:n.phoneNumber||null,photoURL:n.photoUrl||null}))}/** 949 * @license 950 * Copyright 2020 Google LLC 951 * 952 * Licensed under the Apache License, Version 2.0 (the "License"); 953 * you may not use this file except in compliance with the License. 954 * You may obtain a copy of the License at 955 * 956 * http://www.apache.org/licenses/LICENSE-2.0 957 * 958 * Unless required by applicable law or agreed to in writing, software 959 * distributed under the License is distributed on an "AS IS" BASIS, 960 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 961 * See the License for the specific language governing permissions and 962 * limitations under the License. 963 */async function dk(t,e){const n=await fv(t,{},async()=>{const r=qo({grant_type:"refresh_token",refresh_token:e}).slice(1),{tokenApiHost:i,apiKey:s}=t.config,l=await pv(t,i,"/v1/token",`key=${s}`),u=await t._getAdditionalHeaders();u["Content-Type"]="application/x-www-form-urlencoded";const c={method:"POST",headers:u,body:r};return t.emulatorConfig&&Os(t.emulatorConfig.host)&&(c.credentials="include"),hv.fetch()(l,c)});return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}}async function hk(t,e){return Ls(t,"POST","/v2/accounts:revokeToken",ah(t,e))}/** 964 * @license 965 * Copyright 2020 Google LLC 966 * 967 * Licensed under the Apache License, Version 2.0 (the "License"); 968 * you may not use this file except in compliance with the License. 969 * You may obtain a copy of the License at 970 * 971 * http://www.apache.org/licenses/LICENSE-2.0 972 * 973 * Unless required by applicable law or agreed to in writing, software 974 * distributed under the License is distributed on an "AS IS" BASIS, 975 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 976 * See the License for the specific language governing permissions and 977 * limitations under the License. 978 */class ps{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){J(e.idToken,"internal-error"),J(typeof e.idToken<"u","internal-error"),J(typeof e.refreshToken<"u","internal-error");const n="expiresIn"in e&&typeof e.expiresIn<"u"?Number(e.expiresIn):kp(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,n)}updateFromIdToken(e){J(e.length!==0,"internal-error");const n=kp(e);this.updateTokensAndExpiration(e,null,n)}async getToken(e,n=!1){return!n&&this.accessToken&&!this.isExpired?this.accessToken:(J(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 dk(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,l=new ps;return r&&(J(typeof r=="string","internal-error",{appName:e}),l.refreshToken=r),i&&(J(typeof i=="string","internal-error",{appName:e}),l.accessToken=i),s&&(J(typeof s=="number","internal-error",{appName:e}),l.expirationTime=s),l}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 ps,this.toJSON())}_performRefresh(){return ar("not implemented")}}/** 979 * @license 980 * Copyright 2020 Google LLC 981 * 982 * Licensed under the Apache License, Version 2.0 (the "License"); 983 * you may not use this file except in compliance with the License. 984 * You may obtain a copy of the License at 985 * 986 * http://www.apache.org/licenses/LICENSE-2.0 987 * 988 * Unless required by applicable law or agreed to in writing, software 989 * distributed under the License is distributed on an "AS IS" BASIS, 990 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 991 * See the License for the specific language governing permissions and 992 * limitations under the License. 993 */function Nr(t,e){J(typeof t=="string"||typeof t>"u","internal-error",{appName:e})}class Nn{constructor({uid:e,auth:n,stsTokenManager:r,...i}){this.providerId="firebase",this.proactiveRefresh=new ak(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=e,this.auth=n,this.stsTokenManager=r,this.accessToken=r.accessToken,this.displayName=i.displayName||null,this.email=i.email||null,this.emailVerified=i.emailVerified||!1,this.phoneNumber=i.phoneNumber||null,this.photoURL=i.photoURL||null,this.isAnonymous=i.isAnonymous||!1,this.tenantId=i.tenantId||null,this.providerData=i.providerData?[...i.providerData]:[],this.metadata=new Vc(i.createdAt||void 0,i.lastLoginAt||void 0)}async getIdToken(e){const n=await Fo(this,this.stsTokenManager.getToken(this.auth,e));return J(n,this.auth,"internal-error"),this.accessToken!==n&&(this.accessToken=n,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),n}getIdTokenResult(e){return ok(this,e)}reload(){return uk(this)}_assign(e){this!==e&&(J(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.ph
993otoURL,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=>({...n})),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){const n=new Nn({...this,auth:e,stsTokenManager:this.stsTokenManager._clone()});return n.metadata._copy(this.metadata),n}_onReload(e){J(!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 Sa(this),await this.auth._persistUserIfCurrent(this),r&&this.auth._notifyListenersIfCurrent(this)}async delete(){if(dn(this.auth.app))return Promise.reject(Ci(this.auth));const e=await this.getIdToken();return await Fo(this,sk(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return{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=>({...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){const r=n.displayName??void 0,i=n.email??void 0,s=n.phoneNumber??void 0,l=n.photoURL??void 0,u=n.tenantId??void 0,c=n._redirectEventId??void 0,f=n.createdAt??void 0,_=n.lastLoginAt??void 0,{uid:k,emailVerified:E,isAnonymous:L,providerData:A,stsTokenManager:P}=n;J(k&&P,e,"internal-error");const D=ps.fromJSON(this.name,P);J(typeof k=="string",e,"internal-error"),Nr(r,e.name),Nr(i,e.name),J(typeof E=="boolean",e,"internal-error"),J(typeof L=="boolean",e,"internal-error"),Nr(s,e.name),Nr(l,e.name),Nr(u,e.name),Nr(c,e.name),Nr(f,e.name),Nr(_,e.name);const I=new Nn({uid:k,auth:e,email:i,emailVerified:E,displayName:r,isAnonymous:L,photoURL:l,phoneNumber:s,tenantId:u,stsTokenManager:D,createdAt:f,lastLoginAt:_});return A&&Array.isArray(A)&&(I.providerData=A.map(v=>({...v}))),c&&(I._redirectEventId=c),I}static async _fromIdTokenResponse(e,n,r=!1){const i=new ps;i.updateFromServerResponse(n);const s=new Nn({uid:n.localId,auth:e,stsTokenManager:i,isAnonymous:r});return await Sa(s),s}static async _fromGetAccountInfoResponse(e,n,r){const i=n.users[0];J(i.localId!==void 0,"internal-error");const s=i.providerUserInfo!==void 0?mv(i.providerUserInfo):[],l=!(i.email&&i.passwordHash)&&!(s!=null&&s.length),u=new ps;u.updateFromIdToken(r);const c=new Nn({uid:i.localId,auth:e,stsTokenManager:u,isAnonymous:l}),f={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 Vc(i.createdAt,i.lastLoginAt),isAnonymous:!(i.email&&i.passwordHash)&&!(s!=null&&s.length)};return Object.assign(c,f),c}}/** 994 * @license 995 * Copyright 2020 Google LLC 996 * 997 * Licensed under the Apache License, Version 2.0 (the "License"); 998 * you may not use this file except in compliance with the License. 999 * You may obtain a copy of the License at 1000 * 1001 * http://www.apache.org/licenses/LICENSE-2.0 1002 * 1003 * Unless required by applicable law or agreed to in writing, software 1004 * distributed under the License is distributed on an "AS IS" BASIS, 1005 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1006 * See the License for the specific language governing permissions and 1007 * limitations under the License. 1008 */const Ip=new Map;function ur(t){gr(t instanceof Function,"Expected a class definition");let e=Ip.get(t);return e?(gr(e instanceof t,"Instance stored in cache mismatched with class"),e):(e=new t,Ip.set(t,e),e)}/** 1009 * @license 1010 * Copyright 2019 Google LLC 1011 * 1012 * Licensed under the Apache License, Version 2.0 (the "License");
1013 * you may not use this file except in compliance with the License. 1014 * You may obtain a copy of the License at 1015 * 1016 * http://www.apache.org/licenses/LICENSE-2.0 1017 * 1018 * Unless required by applicable law or agreed to in writing, software 1019 * distributed under the License is distributed on an "AS IS" BASIS, 1020 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1021 * See the License for the specific language governing permissions and 1022 * limitations under the License. 1023 */class gv{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){}}gv.type="NONE";const Tp=gv;/** 1024 * @license 1025 * Copyright 2019 Google LLC 1026 * 1027 * Licensed under the Apache License, Version 2.0 (the "License"); 1028 * you may not use this file except in compliance with the License. 1029 * You may obtain a copy of the License at 1030 * 1031 * http://www.apache.org/licenses/LICENSE-2.0 1032 * 1033 * Unless required by applicable law or agreed to in writing, software 1034 * distributed under the License is distributed on an "AS IS" BASIS, 1035 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1036 * See the License for the specific language governing permissions and 1037 * limitations under the License. 1038 */function zl(t,e,n){return`firebase:${t}:${e}:${n}`}class ms{constructor(e,n,r){this.persistence=e,this.auth=n,this.userKey=r;const{config:i,name:s}=this.auth;this.fullUserKey=zl(this.userKey,i.apiKey,s),this.fullPersistenceKey=zl("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);if(!e)return null;if(typeof e=="string"){const n=await wa(this.auth,{idToken:e}).catch(()=>{});return n?Nn._fromGetAccountInfoResponse(this.auth,n,e):null}return Nn._fromJSON(this.auth,e)}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 ms(ur(Tp),e,r);const i=(await Promise.all(n.map(async f=>{if(await f._isAvailable())return f}))).filter(f=>f);let s=i[0]||ur(Tp);const l=zl(r,e.config.apiKey,e.name);let u=null;for(const f of n)try{const _=await f._get(l);if(_){let k;if(typeof _=="string"){const E=await wa(e,{idToken:_}).catch(()=>{});if(!E)break;k=await Nn._fromGetAccountInfoResponse(e,E,_)}else k=Nn._fromJSON(e,_);f!==s&&(u=k),s=f;break}}catch{}const c=i.filter(f=>f._shouldAllowMigration);return!s._shouldAllowMigration||!c.length?new ms(s,e,r):(s=c[0],u&&await s._set(l,u.toJSON()),await Promise.all(n.map(async f=>{if(f!==s)try{await f._remove(l)}catch{}})),new ms(s,e,r))}}/** 1039 * @license 1040 * Copyright 2020 Google LLC 1041 * 1042 * Licensed under the Apache License, Version 2.0 (the "License"); 1043 * you may not use this file except in compliance with the License. 1044 * You may obtain a copy of the License at 1045 * 1046 * http://www.apache.org/licenses/LICENSE-2.0 1047 * 1048 * Unless required by applicable law or agreed to in writing, software 1049 * distributed under the License is distributed on an "AS IS" BASIS, 1050 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1051 * See the License for the specific language governing permissions and 1052 * limitations under the License. 1053 */function Cp(t){const e=t.toLowerCase();if(e.includes("opera/")||e.includes("opr/")||e.includes("opios/"))return"Opera";if(wv(e))return"IEMobile";if(e.includes("msie")||e.includes("trident/"))return"IE";if(e.includes("edge/"))return"Edge";if(yv(e))return"Firefox";if(e.includes("silk/"))return"Silk";if(Ev(e))return"Blackberry";if(kv(e))return"Webos";if(vv(e))return"Safari";if((e.includes("chrome/")||_v(e))&&!e.includes("edge/"))return"Chrome";if(Sv(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 yv(t=Ct()){return/firefox\//i.test(t)}function vv(t=Ct()){const e=t.toLowerCase();return e.includes("safari/")&&!e.includes("chrome/")&&!e.includes("crios/")&&!e.includes("android")}function _v(t=Ct()){return/crios\//i.test(t)}function wv(t=Ct()){return/iemobile/i.test(t)}function Sv(t=Ct()){return/android/i.test(t)}function Ev(t=Ct()){return/blackberry/i.test(t)}function kv(t=Ct()){return/webos/i.test(t)}function ch(t=Ct()){return/iphone|ipad|ipod/i.test(t)||/macintosh/i.test(t)&&/mobile/i.test(t)}function fk(t=Ct()){var e;return ch(t)&&!!((e=window.navigator)!=null&&e.standalone)}function pk(){return y1()&&document.documentMode===10}function Iv(t=Ct()){return ch(t)||Sv(t)||kv(t)||Ev(t)||/windows phone/i.test(t)||wv(t)}/** 1054 * @license 1055 * Copyright 2020 Google LLC 1056 * 1057 * Licensed under the Apache License, Version 2.0 (the "License");
1058 * you may not use this file except in compliance with the License. 1059 * You may obtain a copy of the License at 1060 * 1061 * http://www.apache.org/licenses/LICENSE-2.0 1062 * 1063 * Unless required by applicable law or agreed to in writing, software 1064 * distributed under the License is distributed on an "AS IS" BASIS, 1065 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1066 * See the License for the specific language governing permissions and 1067 * limitations under the License. 1068 */function Tv(t,e=[]){let n;switch(t){case"Browser":n=Cp(Ct());break;case"Worker":n=`${Cp(Ct())}-${t}`;break;default:n=t}const r=e.length?e.join(","):"FirebaseCore-web";return`${n}/JsCore/${Bi}/${r}`}/** 1069 * @license 1070 * Copyright 2022 Google LLC 1071 * 1072 * Licensed under the Apache License, Version 2.0 (the "License"); 1073 * you may not use this file except in compliance with the License. 1074 * You may obtain a copy of the License at 1075 * 1076 * http://www.apache.org/licenses/LICENSE-2.0 1077 * 1078 * Unless required by applicable law or agreed to in writing, software 1079 * distributed under the License is distributed on an "AS IS" BASIS, 1080 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1081 * See the License for the specific language governing permissions and 1082 * limitations under the License. 1083 */class mk{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,n){const r=s=>new Promise((l,u)=>{try{const c=e(s);l(c)}catch(c){u(c)}});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})}}}/** 1084 * @license 1085 * Copyright 2023 Google LLC 1086 * 1087 * Licensed under the Apache License, Version 2.0 (the "License"); 1088 * you may not use this file except in compliance with the License. 1089 * You may obtain a copy of the License at 1090 * 1091 * http://www.apache.org/licenses/LICENSE-2.0 1092 * 1093 * Unless required by applicable law or agreed to in writing, software 1094 * distributed under the License is distributed on an "AS IS" BASIS, 1095 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1096 * See the License for the specific language governing permissions and 1097 * limitations under the License. 1098 */async function gk(t,e={}){return Ls(t,"GET","/v2/passwordPolicy",ah(t,e))}/** 1099 * @license 1100 * Copyright 2023 Google LLC 1101 * 1102 * Licensed under the Apache License, Version 2.0 (the "License"); 1103 * you may not use this file except in compliance with the License. 1104 * You may obtain a copy of the License at 1105 * 1106 * http://www.apache.org/licenses/LICENSE-2.0 1107 * 1108 * Unless required by applicable law or agreed to in writing, software 1109 * distributed under the License is distributed on an "AS IS" BASIS, 1110 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1111 * See the License for the specific language governing permissions and 1112 * limitations under the License. 1113 */const yk=6;class vk{constructor(e){var r;const n=e.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=n.minPasswordLength??yk,n.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=n.maxPasswordLength),n.containsLowercaseCharacter!==void 0&&(this.customStrengthOptions.containsLowercaseLetter=n.containsLowercaseCharacter),n.containsUppercaseCharacter!==void 0&&(this.customStrengthOptions.containsUppercaseLetter=n.containsUppercaseCharacter),n.containsNumericCharacter!==void 0&&(this.customStrengthOptions.containsNumericCharacter=n.containsNumericCharacter),n.containsNonAlphanumericCharacter!==void 0&&(this.customStrengthOptions.containsNonAlphanumericCharacter=n.containsNonAlphanumericCharacter),this.enforcementState=e.enforcementState,this.enforcementState==="ENFORCEMENT_STATE_UNSPECIFIED"&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=((r=e.allowedNonAlphanumericCharacters)==null?void 0:r.join(""))??"",this.forceUpgradeOnSignin=e.forceUpgradeOnSignin??!1,this.schemaVersion=e.schemaVersion}validatePassword(e){const n={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(e,n),this.validatePasswordCharacterOptions(e,n),n.isValid&&
1113(n.isValid=n.meetsMinPasswordLength??!0),n.isValid&&(n.isValid=n.meetsMaxPasswordLength??!0),n.isValid&&(n.isValid=n.containsLowercaseLetter??!0),n.isValid&&(n.isValid=n.containsUppercaseLetter??!0),n.isValid&&(n.isValid=n.containsNumericCharacter??!0),n.isValid&&(n.isValid=n.containsNonAlphanumericCharacter??!0),n}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))}}/** 1114 * @license 1115 * Copyright 2020 Google LLC 1116 * 1117 * Licensed under the Apache License, Version 2.0 (the "License"); 1118 * you may not use this file except in compliance with the License. 1119 * You may obtain a copy of the License at 1120 * 1121 * http://www.apache.org/licenses/LICENSE-2.0 1122 * 1123 * Unless required by applicable law or agreed to in writing, software 1124 * distributed under the License is distributed on an "AS IS" BASIS, 1125 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1126 * See the License for the specific language governing permissions and 1127 * limitations under the License. 1128 */class _k{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 Np(this),this.idTokenSubscription=new Np(this),this.beforeStateQueue=new mk(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=dv,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this._resolvePersistenceManagerAvailable=void 0,this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=i.sdkClientVersion,this._persistenceManagerAvailable=new Promise(s=>this._resolvePersistenceManagerAvailable=s)}_initializeWithPersistence(e,n){return n&&(this._popupRedirectResolver=ur(n)),this._initializationPromise=this.queue(async()=>{var r,i,s;if(!this._deleted&&(this.persistenceManager=await ms.create(this,e),(r=this._resolvePersistenceManagerAvailable)==null||r.call(this),!this._deleted)){if((i=this._popupRedirectResolver)!=null&&i._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch{}await this.initializeCurrentUser(n),this.lastNotifiedUid=((s=this.currentUser)==null?void 0:s.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 wa(this,{idToken:e}),r=await Nn._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 s;if(dn(this.app)){const l=this.app.settings.authIdToken;return l?new Promise(u=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(l).then(u,u))}):this.directlySetCurrentUser(null)}const n=await this.assertedPersistence.getCurrentUser();let r=n,i=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const l=(s=this.redirectUser)==null?void 0:s._redirectEventId,u=r==null?void 0:r._redirectEventId,c=await this.tryRedirectSignIn(e);(!l||l===u)&&(c!=null&&c.user)&&(r=c.user,i=!0)}if(!r)return this.directlySetCurrentUser(null);
1128if(!r._redirectEventId){if(i)try{await this.beforeStateQueue.runMiddleware(r)}catch(l){r=n,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(l))}return r?this.reloadAndSetCurrentUserOrClear(r):this.directlySetCurrentUser(null)}return J(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===r._redirectEventId?this.directlySetCurrentUser(r):this.reloadAndSetCurrentUserOrClear(r)}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 Sa(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=ZE()}async _delete(){this._deleted=!0}async updateCurrentUser(e){if(dn(this.app))return Promise.reject(Ci(this));const n=e?en(e):null;return n&&J(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&&J(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 dn(this.app)?Promise.reject(Ci(this)):(await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0))}setPersistence(e){return dn(this.app)?Promise.reject(Ci(this)):this.queue(async()=>{await this.assertedPersistence.setPersistence(ur(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 gk(this),n=new vk(e);this.tenantId===null?this._projectPasswordPolicy=n:this._tenantPasswordPolicies[this.tenantId]=n}_getPersistenceType(){return this.assertedPersistence.persistence.type}_getPersistence(){return this.assertedPersistence.persistence}_updateErrorMap(e){this._errorFactory=new Wo("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 hk(this,r)}}toJSON(){var e;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:(e=this._currentUser)==null?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&&ur(e)||this._popupRedirectResolver;J(n,this,"argument-error"),this.redirectPersistenceManager=await ms.create(this,[ur(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?void 0:n._redirectEventId)===e?this._currentUser:((r=this.redirectUser)==null?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 n;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const e=((n=this.currentUser)==null?void 0:n.uid)??null;this.lastNotifiedUid!==e&&(this.lastNotifiedUid=e,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 l=!1;const u=this._isInitialized?Promise.resolve():this._initializationPromise;if(J(u,this,"internal-error"),u.then(()=>{l||s(this.currentUser)}),typeof n=="function"){const c=e.addObserver(n,r,i);return()=>{l=!0,c()}}else{const c=e.addObserver(n);return()=>{l=!0,c()}}}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 J(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){!e||this.frameworks.includes(e)||(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=Tv(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){var i;const e={"X-Client-Version":this.clientVersion};this.app.options.appId&&(e["X-Firebase-gmpid"]=this.app.options.appId);const n=await((i=this.heartbeatServiceProvider.getImmediate({optional:!0}))==null?void 0:i.getHeartbeatsHeader());n&&(e["X-Firebase-Client"]=n);const r=await this._getAppCheckToken();return r&&(e["X-Firebase-AppCheck"]=r),e}async _getAppCheckToken(){var n;if(dn(this.app)&&this.app.settings.appCheckToken)return this.app.settings.appCheckToken;const e=await((n=this.appCheckServiceProvider.getImmediate({optional:!0}))==null?void 0:n.getToken());return e!=null&&e.error&&QE(`Error while retrieving App Check token: ${e.error}`),e==null?void 0:e.token}}function qa(t){return en(t)}class Np{constructor(e){this.auth=e,this.observer=null,this.addObserver=I1(n=>this.observer=n)}get next(){return J(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}/** 1129 * @license 1130 * Copyright 2020 Google LLC 1131 * 1132 * Licensed under the Apache License, Version 2.0 (the "License");
1133 * you may not use this file except in compliance with the License. 1134 * You may obtain a copy of the License at 1135 * 1136 * http://www.apache.org/licenses/LICENSE-2.0 1137 * 1138 * Unless required by applicable law or agreed to in writing, software 1139 * distributed under the License is distributed on an "AS IS" BASIS, 1140 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1141 * See the License for the specific language governing permissions and 1142 * limitations under the License. 1143 */let dh={async loadJS(){throw new Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function wk(t){dh=t}function Sk(t){return dh.loadJS(t)}function Ek(){return dh.gapiScript}function kk(t){return`__${t}${Math.floor(Math.random()*1e6)}`}/** 1144 * @license 1145 * Copyright 2020 Google LLC 1146 * 1147 * Licensed under the Apache License, Version 2.0 (the "License"); 1148 * you may not use this file except in compliance with the License. 1149 * You may obtain a copy of the License at 1150 * 1151 * http://www.apache.org/licenses/LICENSE-2.0 1152 * 1153 * Unless required by applicable law or agreed to in writing, software 1154 * distributed under the License is distributed on an "AS IS" BASIS, 1155 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1156 * See the License for the specific language governing permissions and 1157 * limitations under the License. 1158 */function Ik(t,e){const n=Yd(t,"auth");if(n.isInitialized()){const i=n.getImmediate(),s=n.getOptions();if(Ts(s,e??{}))return i;er(i,"already-initialized")}return n.initialize({options:e})}function Tk(t,e){const n=(e==null?void 0:e.persistence)||[],r=(Array.isArray(n)?n:[n]).map(ur);e!=null&&e.errorMap&&t._updateErrorMap(e.errorMap),t._initializeWithPersistence(r,e==null?void 0:e.popupRedirectResolver)}function Ck(t,e,n){const r=qa(t);
1158J(/^https?:\/\//.test(e),r,"invalid-emulator-scheme");const i=!1,s=Cv(e),{host:l,port:u}=Nk(e),c=u===null?"":`:${u}`,f={url:`${s}//${l}${c}/`},_=Object.freeze({host:l,port:u,protocol:s.replace(":",""),options:Object.freeze({disableWarnings:i})});if(!r._canInitEmulator){J(r.config.emulator&&r.emulatorConfig,r,"emulator-config-failed"),J(Ts(f,r.config.emulator)&&Ts(_,r.emulatorConfig),r,"emulator-config-failed");return}r.config.emulator=f,r.emulatorConfig=_,r.settings.appVerificationDisabledForTesting=!0,Os(l)?(Dy(`${s}//${l}${c}`),My("Auth",!0)):xk()}function Cv(t){const e=t.indexOf(":");return e<0?"":t.substr(0,e+1)}function Nk(t){const e=Cv(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:xp(r.substr(s.length+1))}}else{const[s,l]=r.split(":");return{host:s,port:xp(l)}}}function xp(t){if(!t)return null;const e=Number(t);return isNaN(e)?null:e}function xk(){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())}/** 1159 * @license 1160 * Copyright 2020 Google LLC 1161 * 1162 * Licensed under the Apache License, Version 2.0 (the "License"); 1163 * you may not use this file except in compliance with the License. 1164 * You may obtain a copy of the License at 1165 * 1166 * http://www.apache.org/licenses/LICENSE-2.0 1167 * 1168 * Unless required by applicable law or agreed to in writing, software 1169 * distributed under the License is distributed on an "AS IS" BASIS, 1170 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1171 * See the License for the specific language governing permissions and 1172 * limitations under the License. 1173 */class Nv{constructor(e,n){this.providerId=e,this.signInMethod=n}toJSON(){return ar("not implemented")}_getIdTokenResponse(e){return ar("not implemented")}_linkToIdToken(e,n){return ar("not implemented")}_getReauthenticationResolver(e){return ar("not implemented")}}/** 1174 * @license 1175 * Copyright 2020 Google LLC 1176 * 1177 * Licensed under the Apache License, Version 2.0 (the "License"); 1178 * you may not use this file except in compliance with the License. 1179 * You may obtain a copy of the License at 1180 * 1181 * http://www.apache.org/licenses/LICENSE-2.0 1182 * 1183 * Unless required by applicable law or agreed to in writing, software 1184 * distributed under the License is distributed on an "AS IS" BASIS, 1185 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1186 * See the License for the specific language governing permissions and 1187 * limitations under the License. 1188 */async function gs(t,e){return rk(t,"POST","/v1/accounts:signInWithIdp",ah(t,e))}/** 1189 * @license 1190 * Copyright 2020 Google LLC 1191 * 1192 * Licensed under the Apache License, Version 2.0 (the "License"); 1193 * you may not use this file except in compliance with the License. 1194 * You may obtain a copy of the License at 1195 * 1196 * http://www.apache.org/licenses/LICENSE-2.0 1197 * 1198 * Unless required by applicable law or agreed to in writing, software 1199 * distributed under the License is distributed on an "AS IS" BASIS, 1200 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1201 * See the License for the specific language governing permissions and 1202 * limitations under the License. 1203 */const Ak="http://localhost";class Mi extends Nv{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){const n=new Mi(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&&
1203(n.nonce=e.nonce),e.pendingToken&&(n.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(n.accessToken=e.oauthToken,n.secret=e.oauthTokenSecret):er("argument-error"),n}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,nonce:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){const n=typeof e=="string"?JSON.parse(e):e,{providerId:r,signInMethod:i,...s}=n;if(!r||!i)return null;const l=new Mi(r,i);return l.idToken=s.idToken||void 0,l.accessToken=s.accessToken||void 0,l.secret=s.secret,l.nonce=s.nonce,l.pendingToken=s.pendingToken||null,l}_getIdTokenResponse(e){const n=this.buildRequest();return gs(e,n)}_linkToIdToken(e,n){const r=this.buildRequest();return r.idToken=n,gs(e,r)}_getReauthenticationResolver(e){const n=this.buildRequest();return n.autoCreate=!1,gs(e,n)}buildRequest(){const e={requestUri:Ak,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=qo(n)}return e}}/** 1204 * @license 1205 * Copyright 2020 Google LLC 1206 * 1207 * Licensed under the Apache License, Version 2.0 (the "License"); 1208 * you may not use this file except in compliance with the License. 1209 * You may obtain a copy of the License at 1210 * 1211 * http://www.apache.org/licenses/LICENSE-2.0 1212 * 1213 * Unless required by applicable law or agreed to in writing, software 1214 * distributed under the License is distributed on an "AS IS" BASIS, 1215 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1216 * See the License for the specific language governing permissions and 1217 * limitations under the License. 1218 */class hh{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}}/** 1219 * @license 1220 * Copyright 2019 Google LLC 1221 * 1222 * Licensed under the Apache License, Version 2.0 (the "License"); 1223 * you may not use this file except in compliance with the License. 1224 * You may obtain a copy of the License at 1225 * 1226 * http://www.apache.org/licenses/LICENSE-2.0 1227 * 1228 * Unless required by applicable law or agreed to in writing, software 1229 * distributed under the License is distributed on an "AS IS" BASIS, 1230 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1231 * See the License for the specific language governing permissions and 1232 * limitations under the License. 1233 */class Ko extends hh{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}/** 1234 * @license 1235 * Copyright 2020 Google LLC 1236 * 1237 * Licensed under the Apache License, Version 2.0 (the "License"); 1238 * you may not use this file except in compliance with the License. 1239 * You may obtain a copy of the License at 1240 * 1241 * http://www.apache.org/licenses/LICENSE-2.0 1242 * 1243 * Unless required by applicable law or agreed to in writing, software 1244 * distributed under the License is distributed on an "AS IS" BASIS, 1245 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1246 * See the License for the specific language governing permissions and 1247 * limitations under the License. 1248 */class Lr extends Ko{constructor(){super("facebook.com")}static credential(e){return Mi._fromParams({providerId:Lr.PROVIDER_ID,signInMethod:Lr.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return Lr.credentialFromTaggedObject(e)}static credentialFromError(e){return Lr.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return Lr.credential(e.oauthAccessToken)}catch{return null}}}Lr.FACEBOOK_SIGN_IN_METHOD="facebook.com";Lr.PROVIDER_ID="facebook.com";/** 1249 * @license 1250 * Copyright 2020 Google LLC 1251 * 1252 * Licensed under the Apache License, Version 2.0 (the "License");
1253 * you may not use this file except in compliance with the License. 1254 * You may obtain a copy of the License at 1255 * 1256 * http://www.apache.org/licenses/LICENSE-2.0 1257 * 1258 * Unless required by applicable law or agreed to in writing, software 1259 * distributed under the License is distributed on an "AS IS" BASIS, 1260 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1261 * See the License for the specific language governing permissions and 1262 * limitations under the License. 1263 */class ir extends Ko{constructor(){super("google.com"),this.addScope("profile")}static credential(e,n){return Mi._fromParams({providerId:ir.PROVIDER_ID,signInMethod:ir.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:n})}static credentialFromResult(e){return ir.credentialFromTaggedObject(e)}static credentialFromError(e){return ir.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthIdToken:n,oauthAccessToken:r}=e;if(!n&&!r)return null;try{return ir.credential(n,r)}catch{return null}}}ir.GOOGLE_SIGN_IN_METHOD="google.com";ir.PROVIDER_ID="google.com";/** 1264 * @license 1265 * Copyright 2020 Google LLC 1266 * 1267 * Licensed under the Apache License, Version 2.0 (the "License"); 1268 * you may not use this file except in compliance with the License. 1269 * You may obtain a copy of the License at 1270 * 1271 * http://www.apache.org/licenses/LICENSE-2.0 1272 * 1273 * Unless required by applicable law or agreed to in writing, software 1274 * distributed under the License is distributed on an "AS IS" BASIS, 1275 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1276 * See the License for the specific language governing permissions and 1277 * limitations under the License. 1278 */class jr extends Ko{constructor(){super("github.com")}static credential(e){return Mi._fromParams({providerId:jr.PROVIDER_ID,signInMethod:jr.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return jr.credentialFromTaggedObject(e)}static credentialFromError(e){return jr.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return jr.credential(e.oauthAccessToken)}catch{return null}}}jr.GITHUB_SIGN_IN_METHOD="github.com";jr.PROVIDER_ID="github.com";/** 1279 * @license 1280 * Copyright 2020 Google LLC 1281 * 1282 * Licensed under the Apache License, Version 2.0 (the "License"); 1283 * you may not use this file except in compliance with the License. 1284 * You may obtain a copy of the License at 1285 * 1286 * http://www.apache.org/licenses/LICENSE-2.0 1287 * 1288 * Unless required by applicable law or agreed to in writing, software 1289 * distributed under the License is distributed on an "AS IS" BASIS, 1290 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1291 * See the License for the specific language governing permissions and 1292 * limitations under the License. 1293 */class br extends Ko{constructor(){super("twitter.com")}static credential(e,n){return Mi._fromParams({providerId:br.PROVIDER_ID,signInMethod:br.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:n})}static credentialFromResult(e){return br.credentialFromTaggedObject(e)}static credentialFromError(e){return br.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthAccessToken:n,oauthTokenSecret:r}=e;if(!n||!r)return null;try{return br.credential(n,r)}catch{return null}}}br.TWITTER_SIGN_IN_METHOD="twitter.com";br.PROVIDER_ID="twitter.com";/** 1294 * @license 1295 * Copyright 2020 Google LLC 1296 * 1297 * Licensed under the Apache License, Version 2.0 (the "License"); 1298 * you may not use this file except in compliance with the License. 1299 * You may obtain a copy of the License at 1300 * 1301 * http://www.apache.org/licenses/LICENSE-2.0 1302 * 1303 * Unless required by applicable law or agreed to in writing, software 1304 * distributed under the License is distributed on an "AS IS" BASIS, 1305 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1306 * See the License for the specific language governing permissions and 1307 * limitations under the License. 1308 */class Cs{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 Nn._fromIdTokenResponse(e,r,i),l=Ap(r);return new Cs({user:s,providerId:l,_tokenResponse:r,operationType:n})}static async _forOperation(e,n,r){await e._updateTokensIfNecessary(r,!0);const i=Ap(r);return new Cs({user:e,providerId:i,_tokenResponse:r,operationType:n})}}function Ap(t){return t.providerId?t.providerId:"phoneNumber"in t?"phone":null}/** 1309 * @license 1310 * Copyright 2020 Google LLC 1311 * 1312 * Licensed under the Apache License, Version 2.0 (the "License");
1313 * you may not use this file except in compliance with the License. 1314 * You may obtain a copy of the License at 1315 * 1316 * http://www.apache.org/licenses/LICENSE-2.0 1317 * 1318 * Unless required by applicable law or agreed to in writing, software 1319 * distributed under the License is distributed on an "AS IS" BASIS, 1320 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1321 * See the License for the specific language governing permissions and 1322 * limitations under the License. 1323 */class Ea extends tr{constructor(e,n,r,i){super(n.code,n.message),this.operationType=r,this.user=i,Object.setPrototypeOf(this,Ea.prototype),this.customData={appName:e.name,tenantId:e.tenantId??void 0,_serverResponse:n.customData._serverResponse,operationType:r}}static _fromErrorAndOperation(e,n,r,i){return new Ea(e,n,r,i)}}function xv(t,e,n,r){return(e==="reauthenticate"?n._getReauthenticationResolver(t):n._getIdTokenResponse(t)).catch(s=>{throw s.code==="auth/multi-factor-auth-required"?Ea._fromErrorAndOperation(t,s,e,r):s})}async function Rk(t,e,n=!1){const r=await Fo(t,e._linkToIdToken(t.auth,await t.getIdToken()),n);return Cs._forOperation(t,"link",r)}/** 1324 * @license 1325 * Copyright 2019 Google LLC 1326 * 1327 * Licensed under the Apache License, Version 2.0 (the "License"); 1328 * you may not use this file except in compliance with the License. 1329 * You may obtain a copy of the License at 1330 * 1331 * http://www.apache.org/licenses/LICENSE-2.0 1332 * 1333 * Unless required by applicable law or agreed to in writing, software 1334 * distributed under the License is distributed on an "AS IS" BASIS, 1335 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1336 * See the License for the specific language governing permissions and 1337 * limitations under the License. 1338 */async function Pk(t,e,n=!1){const{auth:r}=t;if(dn(r.app))return Promise.reject(Ci(r));const i="reauthenticate";try{const s=await Fo(t,xv(r,i,e,t),n);J(s.idToken,r,"internal-error");const l=uh(s.idToken);J(l,r,"internal-error");const{sub:u}=l;return J(t.uid===u,r,"user-mismatch"),Cs._forOperation(t,i,s)}catch(s){throw(s==null?void 0:s.code)==="auth/user-not-found"&&er(r,"user-mismatch"),s}}/** 1339 * @license 1340 * Copyright 2020 Google LLC 1341 * 1342 * Licensed under the Apache License, Version 2.0 (the "License"); 1343 * you may not use this file except in compliance with the License. 1344 * You may obtain a copy of the License at 1345 * 1346 * http://www.apache.org/licenses/LICENSE-2.0 1347 * 1348 * Unless required by applicable law or agreed to in writing, software 1349 * distributed under the License is distributed on an "AS IS" BASIS, 1350 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1351 * See the License for the specific language governing permissions and 1352 * limitations under the License. 1353 */async function Ok(t,e,n=!1){if(dn(t.app))return Promise.reject(Ci(t));const r="signIn",i=await xv(t,r,e),s=await Cs._fromIdTokenResponse(t,r,i);return n||await t._updateCurrentUser(s.user),s}function Lk(t,e,n,r){return en(t).onIdTokenChanged(e,n,r)}function jk(t,e,n){return en(t).beforeAuthStateChanged(e,n)}function bk(t,e,n,r){return en(t).onAuthStateChanged(e,n,r)}function Dk(t){return en(t).signOut()}const ka="__sak";/** 1354 * @license 1355 * Copyright 2019 Google LLC 1356 * 1357 * Licensed under the Apache License, Version 2.0 (the "License"); 1358 * you may not use this file except in compliance with the License. 1359 * You may obtain a copy of the License at 1360 * 1361 * http://www.apache.org/licenses/LICENSE-2.0 1362 * 1363 * Unless required by applicable law or agreed to in writing, software 1364 * distributed under the License is distributed on an "AS IS" BASIS, 1365 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1366 * See the License for the specific language governing permissions and 1367 * limitations under the License. 1368 */class Av{constructor(e,n){this.storageRetriever=e,this.type=n}_isAvailable(){try{return this.storage?(this.storage.setItem(ka,"1"),this.storage.removeItem(ka),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()}}/** 1369 * @license 1370 * Copyright 2020 Google LLC 1371 * 1372 * Licensed under the Apache License, Version 2.0 (the "License");
1373 * you may not use this file except in compliance with the License. 1374 * You may obtain a copy of the License at 1375 * 1376 * http://www.apache.org/licenses/LICENSE-2.0 1377 * 1378 * Unless required by applicable law or agreed to in writing, software 1379 * distributed under the License is distributed on an "AS IS" BASIS, 1380 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1381 * See the License for the specific language governing permissions and 1382 * limitations under the License. 1383 */const Mk=1e3,Uk=10;class Rv extends Av{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(e,n)=>this.onStorageEvent(e,n),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=Iv(),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((l,u,c)=>{this.notifyListeners(l,c)});return}const r=e.key;n?this.detachListener():this.stopPolling();const i=()=>{const l=this.storage.getItem(r);!n&&this.localCache[r]===l||this.notifyListeners(r,l)},s=this.storage.getItem(r);pk()&&s!==e.newValue&&e.newValue!==e.oldValue?setTimeout(i,Uk):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)})},Mk)}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
1383ject.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]}}Rv.type="LOCAL";const Fk=Rv;/** 1384 * @license 1385 * Copyright 2020 Google LLC 1386 * 1387 * Licensed under the Apache License, Version 2.0 (the "License"); 1388 * you may not use this file except in compliance with the License. 1389 * You may obtain a copy of the License at 1390 * 1391 * http://www.apache.org/licenses/LICENSE-2.0 1392 * 1393 * Unless required by applicable law or agreed to in writing, software 1394 * distributed under the License is distributed on an "AS IS" BASIS, 1395 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1396 * See the License for the specific language governing permissions and 1397 * limitations under the License. 1398 */class Pv extends Av{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,n){}_removeListener(e,n){}}Pv.type="SESSION";const Ov=Pv;/** 1399 * @license 1400 * Copyright 2019 Google LLC 1401 * 1402 * Licensed under the Apache License, Version 2.0 (the "License"); 1403 * you may not use this file except in compliance with the License. 1404 * You may obtain a copy of the License at 1405 * 1406 * http://www.apache.org/licenses/LICENSE-2.0 1407 * 1408 * Unless required by applicable law or agreed to in writing, software 1409 * distributed under the License is distributed on an "AS IS" BASIS, 1410 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1411 * See the License for the specific language governing permissions and 1412 * limitations under the License. 1413 */function zk(t){return Promise.all(t.map(async e=>{try{return{fulfilled:!0,value:await e}}catch(n){return{fulfilled:!1,reason:n}}}))}/** 1414 * @license 1415 * Copyright 2019 Google LLC 1416 * 1417 * Licensed under the Apache License, Version 2.0 (the "License"); 1418 * you may not use this file except in compliance with the License. 1419 * You may obtain a copy of the License at 1420 * 1421 * http://www.apache.org/licenses/LICENSE-2.0 1422 * 1423 * Unless required by applicable law or agreed to in writing, software 1424 * distributed under the License is distributed on an "AS IS" BASIS, 1425 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1426 * See the License for the specific language governing permissions and 1427 * limitations under the License. 1428 */class Ga{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 Ga(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,l=this.handlersMap[i];if(!(l!=null&&l.size))return;n.ports[0].postMessage({status:"ack",eventId:r,eventType:i});const u=Array.from(l).map(async f=>f(n.origin,s)),c=await zk(u);n.ports[0].postMessage({status:"done",eventId:r,eventType:i,response:c})}_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)}}Ga.receivers=[];/** 1429 * @license 1430 * Copyright 2020 Google LLC 1431 * 1432 * Licensed under the Apache License, Version 2.0 (the "License"); 1433 * you may not use this file except in compliance with the License. 1434 * You may obtain a copy of the License at 1435 * 1436 * http://www.apache.org/licenses/LICENSE-2.0 1437 * 1438 * Unless required by applicable law or agreed to in writing, software 1439 * distributed under the License is distributed on an "AS IS" BASIS, 1440 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1441 * See the License for the specific language governing permissions and 1442 * limitations under the License. 1443 */function fh(t="",e=10){let n="";for(let r=0;r<e;r++)n+=Math.floor(Math.random()*10);return t+n}/** 1444 * @license 1445 * Copyright 2019 Google LLC 1446 * 1447 * Licensed under the Apache License, Version 2.0 (the "License");
1448 * you may not use this file except in compliance with the License. 1449 * You may obtain a copy of the License at 1450 * 1451 * http://www.apache.org/licenses/LICENSE-2.0 1452 * 1453 * Unless required by applicable law or agreed to in writing, software 1454 * distributed under the License is distributed on an "AS IS" BASIS, 1455 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1456 * See the License for the specific language governing permissions and 1457 * limitations under the License. 1458 */class Bk{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,l;return new Promise((u,c)=>{const f=fh("",20);i.port1.start();const _=setTimeout(()=>{c(new Error("unsupported_event"))},r);l={messageChannel:i,onMessage(k){const E=k;if(E.data.eventId===f)switch(E.data.status){case"ack":clearTimeout(_),s=setTimeout(()=>{c(new Error("timeout"))},3e3);break;case"done":clearTimeout(s),u(E.data.response);break;default:clearTimeout(_),clearTimeout(s),c(new Error("invalid_response"));break}}},this.handlers.add(l),i.port1.addEventListener("message",l.onMessage),this.target.postMessage({eventType:e,eventId:f,data:n},[i.port2])}).finally(()=>{l&&this.removeMessageHandler(l)})}}/** 1459 * @license 1460 * Copyright 2020 Google LLC 1461 * 1462 * Licensed under the Apache License, Version 2.0 (the "License"); 1463 * you may not use this file except in compliance with the License. 1464 * You may obtain a copy of the License at 1465 * 1466 * http://www.apache.org/licenses/LICENSE-2.0 1467 * 1468 * Unless required by applicable law or agreed to in writing, software 1469 * distributed under the License is distributed on an "AS IS" BASIS, 1470 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1471 * See the License for the specific language governing permissions and 1472 * limitations under the License. 1473 */function Zn(){return window}function $k(t){Zn().location.href=t}/** 1474 * @license 1475 * Copyright 2020 Google LLC. 1476 * 1477 * Licensed under the Apache License, Version 2.0 (the "License"); 1478 * you may not use this file except in compliance with the License. 1479 * You may obtain a copy of the License at 1480 * 1481 * http://www.apache.org/licenses/LICENSE-2.0 1482 * 1483 * Unless required by applicable law or agreed to in writing, software 1484 * distributed under the License is distributed on an "AS IS" BASIS, 1485 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1486 * See the License for the specific language governing permissions and 1487 * limitations under the License. 1488 */function Lv(){return typeof Zn().WorkerGlobalScope<"u"&&typeof Zn().importScripts=="function"}async function Vk(){if(!(navigator!=null&&navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch{return null}}function Hk(){var t;return((t=navigator==null?void 0:navigator.serviceWorker)==null?void 0:t.controller)||null}function Wk(){return Lv()?self:null}/** 1489 * @license 1490 * Copyright 2019 Google LLC 1491 * 1492 * Licensed under the Apache License, Version 2.0 (the "License"); 1493 * you may not use this file except in compliance with the License. 1494 * You may obtain a copy of the License at 1495 * 1496 * http://www.apache.org/licenses/LICENSE-2.0 1497 * 1498 * Unless required by applicable law or agreed to in writing, software 1499 * distributed under the License is distributed on an "AS IS" BASIS, 1500 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1501 * See the License for the specific language governing permissions and 1502 * limitations under the License. 1503 */const jv="firebaseLocalStorageDb",qk=1,Ia="firebaseLocalStorage",bv="fbase_key";class Qo{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 Ka(t,e){return t.transaction([Ia],e?"readwrite":"readonly").objectStore(Ia)}function Gk(){const t=indexedDB.deleteDatabase(jv);
1503return new Qo(t).toPromise()}function Hc(){const t=indexedDB.open(jv,qk);return new Promise((e,n)=>{t.addEventListener("error",()=>{n(t.error)}),t.addEventListener("upgradeneeded",()=>{const r=t.result;try{r.createObjectStore(Ia,{keyPath:bv})}catch(i){n(i)}}),t.addEventListener("success",async()=>{const r=t.result;r.objectStoreNames.contains(Ia)?e(r):(r.close(),await Gk(),e(await Hc()))})})}async function Rp(t,e,n){const r=Ka(t,!0).put({[bv]:e,value:n});return new Qo(r).toPromise()}async function Kk(t,e){const n=Ka(t,!1).get(e),r=await new Qo(n).toPromise();return r===void 0?null:r.value}function Pp(t,e){const n=Ka(t,!0).delete(e);return new Qo(n).toPromise()}const Qk=800,Xk=3;class Dv{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 Hc(),this.db)}async _withRetries(e){let n=0;for(;;)try{const r=await this._openDb();return await e(r)}catch(r){if(n++>Xk)throw r;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return Lv()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=Ga._getInstance(Wk()),this.receiver._subscribe("keyChanged",async(e,n)=>({keyProcessed:(await this._poll()).includes(n.key)}
1503)),this.receiver._subscribe("ping",async(e,n)=>["keyChanged"])}async initializeSender(){var n,r;if(this.activeServiceWorker=await Vk(),!this.activeServiceWorker)return;this.sender=new Bk(this.activeServiceWorker);const e=await this.sender._send("ping",{},800);e&&(n=e[0])!=null&&n.fulfilled&&(r=e[0])!=null&&r.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){if(!(!this.sender||!this.activeServiceWorker||Hk()!==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 Hc();return await Rp(e,ka,"1"),await Pp(e,ka),!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=>Rp(r,e,n)),this.localCache[e]=n,this.notifyServiceWorker(e)))}async _get(e){const n=await this._withRetries(r=>Kk(r,e));return this.localCache[e]=n,n}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(n=>Pp(n,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){const e=await this._withRetries(i=>{const s=Ka(i,!1).getAll();return new Qo(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(),Qk)}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,315 bytes, lines 1503-1552
1503ject.keys(this.listeners).length===0&&this.stopPolling()}}Dv.type="LOCAL";const Jk=Dv;new Go(3e4,6e4);/** 1504 * @license 1505 * Copyright 2021 Google LLC 1506 * 1507 * Licensed under the Apache License, Version 2.0 (the "License"); 1508 * you may not use this file except in compliance with the License. 1509 * You may obtain a copy of the License at 1510 * 1511 * http://www.apache.org/licenses/LICENSE-2.0 1512 * 1513 * Unless required by applicable law or agreed to in writing, software 1514 * distributed under the License is distributed on an "AS IS" BASIS, 1515 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1516 * See the License for the specific language governing permissions and 1517 * limitations under the License. 1518 */function Mv(t,e){return e?ur(e):(J(t._popupRedirectResolver,t,"argument-error"),t._popupRedirectResolver)}/** 1519 * @license 1520 * Copyright 2019 Google LLC 1521 * 1522 * Licensed under the Apache License, Version 2.0 (the "License"); 1523 * you may not use this file except in compliance with the License. 1524 * You may obtain a copy of the License at 1525 * 1526 * http://www.apache.org/licenses/LICENSE-2.0 1527 * 1528 * Unless required by applicable law or agreed to in writing, software 1529 * distributed under the License is distributed on an "AS IS" BASIS, 1530 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1531 * See the License for the specific language governing permissions and 1532 * limitations under the License. 1533 */class ph extends Nv{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return gs(e,this._buildIdpRequest())}_linkToIdToken(e,n){return gs(e,this._buildIdpRequest(n))}_getReauthenticationResolver(e){return gs(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 Yk(t){return Ok(t.auth,new ph(t),t.bypassAuthState)}function Zk(t){const{auth:e,user:n}=t;return J(n,e,"internal-error"),Pk(n,new ph(t),t.bypassAuthState)}async function eI(t){const{auth:e,user:n}=t;return J(n,e,"internal-error"),Rk(n,new ph(t),t.bypassAuthState)}/** 1534 * @license 1535 * Copyright 2020 Google LLC 1536 * 1537 * Licensed under the Apache License, Version 2.0 (the "License"); 1538 * you may not use this file except in compliance with the License. 1539 * You may obtain a copy of the License at 1540 * 1541 * http://www.apache.org/licenses/LICENSE-2.0 1542 * 1543 * Unless required by applicable law or agreed to in writing, software 1544 * distributed under the License is distributed on an "AS IS" BASIS, 1545 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1546 * See the License for the specific language governing permissions and 1547 * limitations under the License. 1548 */class Uv{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:l,type:u}=e;if(l){this.reject(l);return}const c={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(u)(c))}catch(f){this.reject(f)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return Yk;case"linkViaPopup":case"linkViaRedirect":return eI;case"reauthViaPopup":case"reauthViaRedirect":return Zk;default:er(this.auth,"internal-error")}}resolve(e){gr(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){gr(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()}}/** 1549 * @license 1550 * Copyright 2020 Google LLC 1551 * 1552 * Licensed under the Apache License, Version 2.0 (the "License");
1553 * you may not use this file except in compliance with the License. 1554 * You may obtain a copy of the License at 1555 * 1556 * http://www.apache.org/licenses/LICENSE-2.0 1557 * 1558 * Unless required by applicable law or agreed to in writing, software 1559 * distributed under the License is distributed on an "AS IS" BASIS, 1560 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1561 * See the License for the specific language governing permissions and 1562 * limitations under the License. 1563 */const tI=new Go(2e3,1e4);async function nI(t,e,n){if(dn(t.app))return Promise.reject(Pn(t,"operation-not-supported-in-this-environment"));const r=qa(t);XE(t,e,hh);const i=Mv(r,n);return new wi(r,"signInViaPopup",e,i).executeNotNull()}class wi extends Uv{constructor(e,n,r,i,s){super(e,n,i,s),this.provider=r,this.authWindow=null,this.pollId=null,wi.currentPopupAction&&wi.currentPopupAction.cancel(),wi.currentPopupAction=this}async executeNotNull(){const e=await this.execute();return J(e,this.auth,"internal-error"),e}async onExecution(){gr(this.filter.length===1,"Popup operations only handle one event");const e=fh();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(Pn(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){var e;return((e=this.authWindow)==null?void 0:e.associatedEvent)||null}cancel(){this.reject(Pn(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,wi.currentPopupAction=null}pollUserCancellation(){const e=()=>{var n,r;if((r=(n=this.authWindow)==null?void 0:n.window)!=null&&r.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(Pn(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(e,tI.get())};e()}}wi.currentPopupAction=null;/** 1564 * @license 1565 * Copyright 2020 Google LLC 1566 * 1567 * Licensed under the Apache License, Version 2.0 (the "License"); 1568 * you may not use this file except in compliance with the License. 1569 * You may obtain a copy of the License at 1570 * 1571 * http://www.apache.org/licenses/LICENSE-2.0 1572 * 1573 * Unless required by applicable law or agreed to in writing, software 1574 * distributed under the License is distributed on an "AS IS" BASIS, 1575 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1576 * See the License for the specific language governing permissions and 1577 * limitations under the License. 1578 */const rI="pendingRedirect",Bl=new Map;class iI extends Uv{constructor(e,n,r=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],n,void 0,r),this.eventId=null}async execute(){let e=Bl.get(this.auth._key());if(!e){try{const r=await sI(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(r)}catch(n){e=()=>Promise.reject(n)}Bl.set(this.auth._key(),e)}return this.bypassAuthState||Bl.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 sI(t,e){const n=aI(e),r=lI(t);if(!await r._isAvailable())return!1;const i=await r._get(n)==="true";return await r._remove(n),i}function oI(t,e){Bl.set(t._key(),e)}function lI(t){return ur(t._redirectPersistence)}function aI(t){return zl(rI,t.config.apiKey,t.name)}async function uI(t,e,n=!1){if(dn(t.app))return Promise.reject(Ci(t));const r=qa(t),i=Mv(r,e),l=await new iI(r,i,n).execute();return l&&!n&&(delete l.user._redirectEventId,await r._persistUserIfCurrent(l.user),await r._setRedirectUser(null,e)),l}/** 1579 * @license 1580 * Copyright 2020 Google LLC 1581 * 1582 * Licensed under the Apache License, Version 2.0 (the "License"); 1583 * you may not use this file except in compliance with the License. 1584 * You may obtain a copy of the License at 1585 * 1586 * http://www.apache.org/licenses/LICENSE-2.0 1587 * 1588 * Unless required by applicable law or agreed to in writing, softw
1588are 1589 * distributed under the License is distributed on an "AS IS" BASIS, 1590 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1591 * See the License for the specific language governing permissions and 1592 * limitations under the License. 1593 */const cI=10*60*1e3;class dI{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||!hI(e)||(this.hasHandledPotentialRedirect=!0,n||(this.queuedRedirectEvent=e,n=!0)),n}sendToConsumer(e,n){var r;if(e.error&&!Fv(e)){const i=((r=e.error.code)==null?void 0:r.split("auth/")[1])||"internal-error";n.onError(Pn(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>=cI&&this.cachedEventUids.clear(),this.cachedEventUids.has(Op(e))}saveEventToCache(e){this.cachedEventUids.add(Op(e)),this.lastProcessedEventTime=Date.now()}}function Op(t){return[t.type,t.eventId,t.sessionId,t.tenantId].filter(e=>e).join("-")}function Fv({type:t,error:e}){return t==="unknown"&&(e==null?void 0:e.code)==="auth/no-auth-event"}function hI(t){switch(t.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return Fv(t);default:return!1}}/** 1594 * @license 1595 * Copyright 2020 Google LLC 1596 * 1597 * Licensed under the Apache License, Version 2.0 (the "License"); 1598 * you may not use this file except in compliance with the License. 1599 * You may obtain a copy of the License at 1600 * 1601 * http://www.apache.org/licenses/LICENSE-2.0 1602 * 1603 * Unless required by applicable law or agreed to in writing, software 1604 * distributed under the License is distributed on an "AS IS" BASIS, 1605 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1606 * See the License for the specific language governing permissions and 1607 * limitations under the License. 1608 */async function fI(t,e={}){return Ls(t,"GET","/v1/projects",e)}/** 1609 * @license 1610 * Copyright 2020 Google LLC 1611 * 1612 * Licensed under the Apache License, Version 2.0 (the "License"); 1613 * you may not use this file except in compliance with the License. 1614 * You may obtain a copy of the License at 1615 * 1616 * http://www.apache.org/licenses/LICENSE-2.0 1617 * 1618 * Unless required by applicable law or agreed to in writing, software 1619 * distributed under the License is distributed on an "AS IS" BASIS, 1620 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1621 * See the License for the specific language governing permissions and 1622 * limitations under the License. 1623 */const pI=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,mI=/^https?/;async function gI(t){if(t.config.emulator)return;const{authorizedDomains:e}=await fI(t);for(const n of e)try{if(yI(n))return}catch{}er(t,"unauthorized-domain")}function yI(t){const e=$c(),{protocol:n,hostname:r}=new URL(e);if(t.startsWith("chrome-extension://")){const l=new URL(t);return l.hostname===""&&r===""?n==="chrome-extension:"&&t.replace("chrome-extension://","")===e.replace("chrome-extension://",""):n==="chrome-extension:"&&l.hostname===r}if(!mI.test(n))return!1;if(pI.test(t))return r===t;const i=t.replace(/\./g,"\\.");return new RegExp("^(.+\\."+i+"|"+i+")$","i").test(r)}/** 1624 * @license 1625 * Copyright 2020 Google LLC. 1626 * 1627 * Licensed under the Apache License, Version 2.0 (the "License"); 1628 * you may not use this file except in compliance with the License. 1629 * You may obtain a copy of the License at 1630 * 1631 * http://www.apache.org/licenses/LICENSE-2.0 1632 * 1633 * Unless required by applicable law or agreed to in writing, softw
1633are 1634 * distributed under the License is distributed on an "AS IS" BASIS, 1635 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1636 * See the License for the specific language governing permissions and 1637 * limitations under the License. 1638 */const vI=new Go(3e4,6e4);function Lp(){const t=Zn().___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 _I(t){return new Promise((e,n)=>{var i,s,l;function r(){Lp(),gapi.load("gapi.iframes",{callback:()=>{e(gapi.iframes.getContext())},ontimeout:()=>{Lp(),n(Pn(t,"network-request-failed"))},timeout:vI.get()})}if((s=(i=Zn().gapi)==null?void 0:i.iframes)!=null&&s.Iframe)e(gapi.iframes.getContext());else if((l=Zn().gapi)!=null&&l.load)r();else{const u=kk("iframefcb");return Zn()[u]=()=>{gapi.load?r():n(Pn(t,"network-request-failed"))},Sk(`${Ek()}?onload=${u}`).catch(c=>n(c))}}).catch(e=>{throw $l=null,e})}let $l=null;function wI(t){return $l=$l||_I(t),$l}/** 1639 * @license 1640 * Copyright 2020 Google LLC. 1641 * 1642 * Licensed under the Apache License, Version 2.0 (the "License"); 1643 * you may not use this file except in compliance with the License. 1644 * You may obtain a copy of the License at 1645 * 1646 * http://www.apache.org/licenses/LICENSE-2.0 1647 * 1648 * Unless required by applicable law or agreed to in writing, software 1649 * distributed under the License is distributed on an "AS IS" BASIS, 1650 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1651 * See the License for the specific language governing permissions and 1652 * limitations under the License. 1653 */const SI=new Go(5e3,15e3),EI="__/auth/iframe",kI="emulator/auth/iframe",II={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},TI=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function CI(t){const e=t.config;J(e.authDomain,t,"auth-domain-config-required");const n=e.emulator?lh(e,kI):`https://${t.config.authDomain}/${EI}`,r={apiKey:e.apiKey,appName:t.name,v:Bi},i=TI.get(t.config.apiHost);i&&(r.eid=i);const s=t._getFrameworks();return s.length&&(r.fw=s.join(",")),`${n}?${qo(r).slice(1)}`}async function NI(t){const e=await wI(t),n=Zn().gapi;return J(n,t,"internal-error"),e.open({where:document.body,url:CI(t),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:II,dontclear:!0},r=>new Promise(async(i,s)=>{await r.restyle({setHideOnLeave:!1});const l=Pn(t,"network-request-failed"),u=Zn().setTimeout(()=>{s(l)},SI.get());function c(){Zn().clearTimeout(u),i(r)}r.ping(c).then(c,()=>{s(l)})}))}/** 1654 * @license 1655 * Copyright 2020 Google LLC. 1656 * 1657 * Licensed under the Apache License, Version 2.0 (the "License"); 1658 * you may not use this file except in compliance with the License. 1659 * You may obtain a copy of the License at 1660 * 1661 * http://www.apache.org/licenses/LICENSE-2.0 1662 * 1663 * Unless required by applicable law or agreed to in writing, software 1664 * distributed under the License is distributed on an "AS IS" BASIS, 1665 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1666 * See the License for the specific language governing permissions and 1667 * limitations under the License. 1668 */const xI={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},AI=500,RI=600,PI="_blank",OI="http://localhost";class jp{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}}function LI(t,e,n,r=AI,i=RI){const s=Math.max((window.screen.availHeight-i)/2,0).toString(),l=Math.max((window.screen.availWidth-r)/2,0).toString();let u="";const c={...xI,width:r.toString(),height:i.toString(),top:s,left:l},f=Ct().toLowerCase();n&&(u=_v(f)?PI:n),yv(f)&&(e=e||OI,c.scrollbars="yes");const _=Object.entries(c).reduce((E,[L,A])=>`${E}${L}=${A},`,"");if(fk(f)&&u!=="_self")return jI(e||"",u),new jp(null);const k=window.open(e||"",u,_);J(k,t,"popup-blocked");try{k.focus()}catch{}return new jp(k)}function jI(t,e){const n=document.createElement("a");n.href=t,n.target=e;const r=document.createEvent("MouseEvent");
1668r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}/** 1669 * @license 1670 * Copyright 2021 Google LLC 1671 * 1672 * Licensed under the Apache License, Version 2.0 (the "License"); 1673 * you may not use this file except in compliance with the License. 1674 * You may obtain a copy of the License at 1675 * 1676 * http://www.apache.org/licenses/LICENSE-2.0 1677 * 1678 * Unless required by applicable law or agreed to in writing, software 1679 * distributed under the License is distributed on an "AS IS" BASIS, 1680 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1681 * See the License for the specific language governing permissions and 1682 * limitations under the License. 1683 */const bI="__/auth/handler",DI="emulator/auth/handler",MI=encodeURIComponent("fac");async function bp(t,e,n,r,i,s){J(t.config.authDomain,t,"auth-domain-config-required"),J(t.config.apiKey,t,"invalid-api-key");const l={apiKey:t.config.apiKey,appName:t.name,authType:n,redirectUrl:r,v:Bi,eventId:i};if(e instanceof hh){e.setDefaultLanguage(t.languageCode),l.providerId=e.providerId||"",k1(e.getCustomParameters())||(l.customParameters=JSON.stringify(e.getCustomParameters()));for(const[_,k]of Object.entries({}))l[_]=k}if(e instanceof Ko){const _=e.getScopes().filter(k=>k!=="");_.length>0&&(l.scopes=_.join(","))}t.tenantId&&(l.tid=t.tenantId);const u=l;for(const _ of Object.keys(u))u[_]===void 0&&delete u[_];const c=await t._getAppCheckToken(),f=c?`#${MI}=${encodeURIComponent(c)}`:"";return`${UI(t)}?${qo(u).slice(1)}${f}`}function UI({config:t}){return t.emulator?lh(t,DI):`https://${t.authDomain}/${bI}`}/** 1684 * @license 1685 * Copyright 2020 Google LLC 1686 * 1687 * Licensed under the Apache License, Version 2.0 (the "License"); 1688 * you may not use this file except in compliance with the License. 1689 * You may obtain a copy of the License at 1690 * 1691 * http://www.apache.org/licenses/LICENSE-2.0 1692 * 1693 * Unless required by applicable law or agreed to in writing, software 1694 * distributed under the License is distributed on an "AS IS" BASIS, 1695 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1696 * See the License for the specific language governing permissions and 1697 * limitations under the License. 1698 */const Uu="webStorageSupport";class FI{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Ov,this._completeRedirectFn=uI,this._overrideRedirectResult=oI}async _openPopup(e,n,r,i){var l;gr((l=this.eventManagers[e._key()])==null?void 0:l.manager,"_initialize() not called before _openPopup()");const s=await bp(e,n,r,$c(),i);return LI(e,s,fh())}async _openRedirect(e,n,r,i){await this._originValidation(e);const s=await bp(e,n,r,$c(),i);return $k(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):(gr(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 NI(e),r=new dI(e);return n.register("authEvent",i=>(J(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(Uu,{type:Uu},i=>{var l;const s=(l=i==null?void 0:i[0])==null?void 0:l[Uu];s!==void 0&&n(!!s),er(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){const n=e._key();return this.originValidationPromises[n]||(this.originValidationPromises[n]=gI(e)),this.originValidationPromises[n]}get _shouldInitProactively(){return Iv()||vv()||ch()}}const zI=FI;var Dp="@firebase/auth",Mp="1.12.1";/** 1699 * @license 1700 * Copyright 2020 Google LLC 1701 * 1702 * Licensed under the Apache License, Version 2.0 (the "License"); 1703 * you may not use this file except in compliance with the License. 1704 * You may obtain a copy of the License at 1705 * 1706 * http://www.apache.org/licenses/LICENSE-2.0 1707 * 1708 * Unless required by applicable law or agreed to in writing, softw
1708are 1709 * distributed under the License is distributed on an "AS IS" BASIS, 1710 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1711 * See the License for the specific language governing permissions and 1712 * limitations under the License. 1713 */class BI{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),((e=this.auth.currentUser)==null?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(){J(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}/** 1714 * @license 1715 * Copyright 2020 Google LLC 1716 * 1717 * Licensed under the Apache License, Version 2.0 (the "License"); 1718 * you may not use this file except in compliance with the License. 1719 * You may obtain a copy of the License at 1720 * 1721 * http://www.apache.org/licenses/LICENSE-2.0 1722 * 1723 * Unless required by applicable law or agreed to in writing, software 1724 * distributed under the License is distributed on an "AS IS" BASIS, 1725 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1726 * See the License for the specific language governing permissions and 1727 * limitations under the License. 1728 */function $I(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 VI(t){bi(new Yr("auth",(e,{options:n})=>{const r=e.getProvider("app").getImmediate(),i=e.getProvider("heartbeat"),s=e.getProvider("app-check-internal"),{apiKey:l,authDomain:u}=r.options;J(l&&!l.includes(":"),"invalid-api-key",{appName:r.name});const c={apiKey:l,authDomain:u,clientPlatform:t,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:Tv(t)},f=new _k(r,i,s,c);return Tk(f,n),f},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,n,r)=>{e.getProvider("auth-internal").initialize()})),bi(new Yr("auth-internal",e=>{const n=qa(e.getProvider("auth").getImmediate());return(r=>new BI(r))(n)},"PRIVATE").setInstantiationMode("EXPLICIT")),Yn(Dp,Mp,$I(t)),Yn(Dp,Mp,"esm2020")}/** 1729 * @license 1730 * Copyright 2021 Google LLC 1731 * 1732 * Licensed under the Apache License, Version 2.0 (the "License"); 1733 * you may not use this file except in compliance with the License. 1734 * You may obtain a copy of the License at 1735 * 1736 * http://www.apache.org/licenses/LICENSE-2.0 1737 * 1738 * Unless required by applicable law or agreed to in writing, software 1739 * distributed under the License is distributed on an "AS IS" BASIS, 1740 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1741 * See the License for the specific language governing permissions and 1742 * limitations under the License. 1743 */const HI=5*60,WI=by("authIdTokenMaxAge")||HI;let Up=null;const qI=t=>async e=>{const n=e&&await e.getIdTokenResult(),r=n&&(new Date().getTime()-Date.parse(n.issuedAtTime))/1e3;if(r&&r>WI)return;const i=n==null?void 0:n.token;Up!==i&&(Up=i,await fetch(t,{method:i?"POST":"DELETE",headers:i?{Authorization:`Bearer ${i}`}:{}}))};function GI(t=Zd()){const e=Yd(t,"auth");if(e.isInitialized())return e.getImmediate();const n=Ik(t,{popupRedirectResolver:zI,persistence:[Jk,Fk,Ov]}),r=by("authTokenSyncURL");if(r&&typeof isSecureContext=="boolean"&&isSecureContext){const s=new URL(r,location.origin);if(location.origin===s.origin){const l=qI(s.toString());jk(n,l,()=>l(n.currentUser)),Lk(n,u=>l(u))}}const i=Ly("auth");return i&&Ck(n,`http://${i}`),n}function KI(){var t;return((t=document.getElementsByTagName("head"))==null?void 0:t[0])??document}
1743wk({loadJS(t){return new Promise((e,n)=>{const r=document.createElement("script");r.setAttribute("src",t),r.onload=e,r.onerror=i=>{const s=Pn("internal-error");s.customData=i,n(s)},r.type="text/javascript",r.charset="UTF-8",KI().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="});VI("Browser");var Fp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/** @license 1744Copyright The Closure Library Authors. 1745SPDX-License-Identifier: Apache-2.0 1746*/var mh;(function(){var t;/** @license 1747 1748 Copyright The Closure Library Authors. 1749 SPDX-License-Identifier: Apache-2.0 1750*/function e(y,p){function g(){}g.prototype=p.prototype,y.F=p.prototype,y.prototype=new g,y.prototype.constructor=y,y.D=function(S,T,x){for(var w=Array(arguments.length-2),ee=2;ee<arguments.length;ee++)w[ee-2]=arguments[ee];return p.prototype[T].apply(S,w)}}function n(){this.blockSize=-1}function r(){this.blockSize=-1,this.blockSize=64,this.g=Array(4),this.C=Array(this.blockSize),this.o=this.h=0,this.u()}e(r,n),r.prototype.u=function(){this.g[0]=1732584193,this.g[1]=4023233417,this.g[2]=2562383102,this.g[3]=271733878,this.o=this.h=0};function i(y,p,g){g||(g=0);const S=Array(16);if(typeof p=="string")for(var T=0;T<16;++T)S[T]=p.charCodeAt(g++)|p.charCodeAt(g++)<<8|p.charCodeAt(g++)<<16|p.charCodeAt(g++)<<24;else for(T=0;T<16;++T)S[T]=p[g++]|p[g++]<<8|p[g++]<<16|p[g++]<<24;p=y.g[0],g=y.g[1],T=y.g[2];let x=y.g[3],w;w=p+(x^g&(T^x))+S[0]+3614090360&4294967295,p=g+(w<<7&4294967295|w>>>25),w=x+(T^p&(g^T))+S[1]+3905402710&4294967295,x=p+(w<<12&4294967295|w>>>20),w=T+(g^x&(p^g))+S[2]+606105819&4294967295,T=x+(w<<17&4294967295|w>>>15),w=g+(p^T&(x^p))+S[3]+3250441966&4294967295,g=T+(w<<22&4294967295|w>>>10),w=p+(x^g&(T^x))+S[4]+4118548399&4294967295,p=g+(w<<7&4294967295|w>>>25),w=x+(T^p&(g^T))+S[5]+1200080426&4294967295,x=p+(w<<12&4294967295|w>>>20),w=T+(g^x&(p^g))+S[6]+2821735955&4294967295,T=x+(w<<17&4294967295|w>>>15),w=g+(p^T&(x^p))+S[7]+4249261313&4294967295,g=T+(w<<22&4294967295|w>>>10),w=p+(x^g&(T^x))+S[8]+1770035416&4294967295,p=g+(w<<7&4294967295|w>>>25),w=x+(T^p&(g^T))+S[9]+2336552879&4294967295,x=p+(w<<12&4294967295|w>>>20),w=T+(g^x&(p^g))+S[10]+4294925233&4294967295,T=x+(w<<17&4294967295|w>>>15),w=g+(p^T&(x^p))+S[11]+2304563134&4294967295,g=T+(w<<22&4294967295|w>>>10),w=p+(x^g&(T^x))+S[12]+1804603682&4294967295,p=g+(w<<7&4294967295|w>>>25),w=x+(T^p&(g^T))+S[13]+4254626195&4294967295,x=p+(w<<12&4294967295|w>>>20),w=T+(g^x&(p^g))+S[14]+2792965006&4294967295,T=x+(w<<17&4294967295|w>>>15),w=g+(p^T&(x^p))+S[15]+1236535329&4294967295,g=T+(w<<22&4294967295|w>>>10),w=p+(T^x&(g^T))+S[1]+4129170786&4294967295,p=g+(w<<5&4294967295|w>>>27),w=x+(g^T&(p^g))+S[6]+3225465664&4294967295,x=p+(w<<9&4294967295|w>>>23),w=T+(p^g&(x^p))+S[11]+643717713&4294967295,T=x+(w<<14&4294967295|w>>>18),w=g+(x^p&(T^x))+S[0]+3921069994&4294967295,g=T+(w<<20&4294967295|w>>>12),w=p+(T^x&(g^T))+S[5]+3593408605&4294967295,p=g+(w<<5&4294967295|w>>>27),w=x+(g^T&(p^g))+S[10]+38016083&4294967295,x=p+(w<<9&4294967295|w>>>23),w=T+(p^g&(x^p))+S[15]+3634488961&4294967295,T=x+(w<<14&4294967295|w>>>18),w=g+(x^p&(T^x))+S[4]+3889429448&4294967295,g=T+(w<<20&4294967295|w>>>12),w=p+(T^x&(g^T))+S[9]+568446438&4294967295,p=g+(w<<5&4294967295|w>>>27),w=x+(g^T&(p^g))+S[14]+3275163606&4294967295,x=p+(w<<9&4294967295|w>>>23),w=T+(p^g&(x^p))+S[3]+4107603335&4294967295,T=x+(w<<14&4294967295|w>>>18),w=g+(x^p&(T^x))+S[8]+1163531501&4294967295,g=T+(w<<20&4294967295|w>>>12),w=p+(T^x&(g^T))+S[13]+2850285829&4294967295,p=g+(w<<5&4294967295|w>>>27),w=x+(g^T&(p^g))+S[2]+4243563512&4294967295,x=p+(w<<9&4294967295|w>>>23),w=T+(p^g&(x^p))+S[7]+1735328473&4294967295,T=x+(w<<14&4294967295|w>>>18),w=g+(x^p&(T^x))+S[12]+2368359562&4294967295,g=T+(w<<20&4294967295|w>>>12),w=p+(g^T^x)+S[5]+4294588738&4294967295,p=g+(w<<4&4294967295|w>>>28),w=x+(p^g^T)+S[8]+2272392833&4294967295,x=p+(w<<11&4294967295|w>>>21),w=T+(x^p^g)+S[11]+1839030562&4294967295,T=x+(w<<16&4294967295|w>>>16),w=g+(T^x^p)+S[14]+4259657740&4294967295,g=T+(w<<23&4294967295|w>>>9),w=p+(g^T^x)+S[1]+2763975236&4294967295,p=g+(w<<4&4294967295|w>>>28),w=x+(p^g^T)+S[4]+1272893353&4294967295,x=p+(w<<11&4294967295|w>>>21),w=T+(x^p^g)+S[7]+4139469664&4294967295,T=x+(w<<16&4294967295|w>>>16),w=g+(T^x^p)+S[10]+3200236656&4294967295,g=T+(w<<23&4294967295|w>>>9),w=p+(g^T^x)+S[13]+681279174&4294967295,p=g+(w<<4&4294967295|w>>>28),w=x+(p^g^T)+S[0]+3936430074&4294967295,x=p+(w<<11&4294967295|w>>>21),w=T+(x^p^g)+S[3]+3572445317&4294967295,T=x+(w<<16&4294967295|w>>>16),w=g+(T^x^p)+S[6]+76029189&4294967295,g=T+(w<<23&4294967295|w>>>9),w=p+(g^T^x)+S[9]+3654602809&4294967295,p=g+(w<<4&4294967295|w>>>28),w=x+(p^g^T)+S[12]+3873151461&4294967295,x=p+(w<<11&4294967295|w>>>21),w=T+(x^p^g)+S[15]+530742520&4294967295,T=x+(w<<16&4294967295|w>>>16),w=g+(T^x^p)+S[2]+3299628645&4294967295,g=T+(w<<23&4294967295|w>>>9),w=p+(T^(g|~x))+S[0]+4096336452&4294967295,p=g+(w<<6&4294967295|w>>>26),w=x+(g^(p|~T))+S[7]+1126891415&4294967295,x=p+(w<<10&4294967295|w>>>22),w=T+(p^(x|~g))+S[14]+2878612391&4294967295,T=x+(w<<15&4294967295|w>>>17),w=g+(x^(T|~p))+S[5]+4237533241&4294967295,g=T+(w<<21&4294967295|w>>>11),w=p+(T^(g|~x))+S[12]+1700485571&4294967295,p=g+(w<<6&4294967295|w>>>26),w=x+(g^(p|~T))+S[3]+2399980690&4294967295,x=p+(w<<10&4294967295|w>>>22),w=T+(p^(x|~g))+S[10]+4293915773&4294967295,T=x+(w<<15&4294967295|w>>>17),w=g+(x^(T|~p))+S[1]+2240044497&4294967295,g=T+(w<<21&4294967295|w>>>11),w=p+(T^(g|~x))+S[8]+1873313359&4294967295,p=g+(w<<6&4294967295|w>>>26),w=x+(g^(p|~T))+S[15]+4264355552&4294967295,x=p+(w<<10&4294967295|w>>>22),w=T+(p^(x|~g))+S[6]+2734768916&4294967295,T=x+(w<<15&4294967295|w>>>17),w=g+(x^(T|~p))+S[13]+1309151649&4294967295,g=T+(w<<21&4294967295|w>>>11),w=p+(T^(g|~x))+S[4]+4149444226&4294967295,p=g+(w<<6&4294967295|w>>>26),w=x+(g^(p|~T))+S[11]+3174756917&4294967295,x=p+(w<<10&4294967295|w>>>22),w=T+(p^(x|~g))+S[2]+718787259&4294967295,T=x+(w<<15&4294967295|w>>>17),w=g+(x^(T|~p))+S[9]+3951481745&4294967295,y.g[0]=y.g[0]+p&4294967295,y.g[1]=y.g[1]+(T+(w<<21&4294967295|w>>>11))&4294967295,y.g[2]=y.g[2]+T&4294967295,y.g[3]=y.g[3]+x&4294967295}r.prototype.v=function(y,p){p===void 0&&(p=y.length);const g=p-this.blockSize,S=this.C;let T=this.h,x=0;for(;x<p;){if(T==0)for(;x<=g;)i(this,y,x),x+=this.blockSize;if(typeof y=="string"){for(;x<p;)if(S[T++]=y.charCodeAt(x++),T==this.blockSize){i(this,S),T=0;break}}else for(;x<p;)if(S[T++]=y[x++],T==this.blockSize){i(this,S),T=0;break}}this.h=T,this.o+=p},r.prototype.A=function(){var y=Array((this.h<56?this.blockSize:this.blockSize*2)-this.h);y[0]=128;for(var p=1;p<y.length-8;++p)y[p]=0;p=this.o*8;for(var g=y.length-8;g<y.length;++g)y[g]=p&255,p/=256;for(this.v(y),y=Array(16),p=0,g=0;g<4;++g)for(let S=0;S<32;S+=8)y[p++]=this.g[g]>>>S&255;return y};function s(y,p){var g=u;return Object.prototype.hasOwnProperty.call(g,y)?g[y]:g[y]=p(y)}function l(y,p){this.h=p;const g=[];let S=!0;for(let T=y.length-1;T>=0;T--){const x=y[T]|0;S&&x==p||(g[T]=x,S=!1)}this.g=g}var u={};function c(y){return-128<=y&&y<128?s(y,function(p){return new l([p|0],p<0?-1:0)}):new l([y|0],y<0?-1:0)}function f(y){if(isNaN(y)||!isFinite(y))return k;if(y<0)return D(f(-y));const p=[];let g=1;for(let S=0;y>=g;S++)p[S]=y/g|0,g*=4294967296;return new l(p,0)}function _(y,p){if(y.length==0)throw Error("number format error: empty string");if(p=p||10,p<2||36<p)throw Error("radix out of range: "+p);if(y.charAt(0)=="-")return D(_(y.substring(1),p));if(y.indexOf("-")>=0)throw Error('number format error: interior "-" character');const g=f(Math.pow(p,8));let S=k;for(let x=0;x<y.length;x+=8){var T=Math.min(8,y.length-x);const w=parseInt(y.substring(x,x+T),p);T<8?(T=f(Math.pow(p,T)),S=S.j(T).add(f(w))):(S=S.j(g),S=S.add(f(w)))}return S}var k=c(0),E=c(1),L=c(16777216);
1750t=l.prototype,t.m=function(){if(P(this))return-D(this).m();let y=0,p=1;for(let g=0;g<this.g.length;g++){const S=this.i(g);y+=(S>=0?S:4294967296+S)*p,p*=4294967296}return y},t.toString=function(y){if(y=y||10,y<2||36<y)throw Error("radix out of range: "+y);if(A(this))return"0";if(P(this))return"-"+D(this).toString(y);const p=f(Math.pow(y,6));var g=this;let S="";for(;;){const T=O(g,p).g;g=I(g,T.j(p));let x=((g.g.length>0?g.g[0]:g.h)>>>0).toString(y);if(g=T,A(g))return x+S;for(;x.length<6;)x="0"+x;S=x+S}},t.i=function(y){return y<0?0:y<this.g.length?this.g[y]:this.h};function A(y){if(y.h!=0)return!1;for(let p=0;p<y.g.length;p++)if(y.g[p]!=0)return!1;return!0}function P(y){return y.h==-1}t.l=function(y){return y=I(this,y),P(y)?-1:A(y)?0:1};function D(y){const p=y.g.length,g=[];for(let S=0;S<p;S++)g[S]=~y.g[S];return new l(g,~y.h).add(E)}t.abs=function(){return P(this)?D(this):this},t.add=function(y){const p=Math.max(this.g.length,y.g.length),g=[];let S=0;for(let T=0;T<=p;T++){let x=S+(this.i(T)&65535)+(y.i(T)&65535),w=(x>>>16)+(this.i(T)>>>16)+(y.i(T)>>>16);S=w>>>16,x&=65535,w&=65535,g[T]=w<<16|x}return new l(g,g[g.length-1]&-2147483648?-1:0)};function I(y,p){return y.add(D(p))}t.j=function(y){if(A(this)||A(y))return k;if(P(this))return P(y)?D(this).j(D(y)):D(D(this).j(y));if(P(y))return D(this.j(D(y)));if(this.l(L)<0&&y.l(L)<0)return f(this.m()*y.m());const p=this.g.length+y.g.length,g=[];for(var S=0;S<2*p;S++)g[S]=0;for(S=0;S<this.g.length;S++)for(let T=0;T<y.g.length;T++){const x=this.i(S)>>>16,w=this.i(S)&65535,ee=y.i(T)>>>16,Ve=y.i(T)&65535;g[2*S+2*T]+=w*Ve,v(g,2*S+2*T),g[2*S+2*T+1]+=x*Ve,v(g,2*S+2*T+1),g[2*S+2*T+1]+=w*ee,v(g,2*S+2*T+1),g[2*S+2*T+2]+=x*ee,v(g,2*S+2*T+2)}for(y=0;y<p;y++)g[y]=g[2*y+1]<<16|g[2*y];for(y=p;y<2*p;y++)g[y]=0;return new l(g,0)};function v(y,p){for(;(y[p]&65535)!=y[p];)y[p+1]+=y[p]>>>16,y[p]&=65535,p++}function C(y,p){this.g=y,this.h=p}function O(y,p){if(A(p))throw Error("division by zero");if(A(y))return new C(k,k);if(P(y))return p=O(D(y),p),new C(D(p.g),D(p.h));if(P(p))return p=O(y,D(p)),new C(D(p.g),p.h);if(y.g.length>30){if(P(y)||P(p))throw Error("slowDivide_ only works with positive integers.");for(var g=E,S=p;S.l(y)<=0;)g=U(g),S=U(S);var T=M(g,1),x=M(S,1);for(S=M(S,2),g=M(g,2);!A(S);){var w=x.add(S);w.l(y)<=0&&(T=T.add(g),x=w),S=M(S,1),g=M(g,1)}return p=I(y,T.j(p)),new C(T,p)}for(T=k;y.l(p)>=0;){for(g=Math.max(1,Math.floor(y.m()/p.m())),S=Math.ceil(Math.log(g)/Math.LN2),S=S<=48?1:Math.pow(2,S-48),x=f(g),w=x.j(p);P(w)||w.l(y)>0;)g-=S,x=f(g),w=x.j(p);A(x)&&(x=E),T=T.add(x),y=I(y,w)}return new C(T,y)}t.B=function(y){return O(this,y).h},t.and=function(y){const p=Math.max(this.g.length,y.g.length),g=[];for(let S=0;S<p;S++)g[S]=this.i(S)&y.i(S);return new l(g,this.h&y.h)},t.or=function(y){const p=Math.max(this.g.length,y.g.length),g=[];for(let S=0;S<p;S++)g[S]=this.i(S)|y.i(S);return new l(g,this.h|y.h)},t.xor=function(y){const p=Math.max(this.g.length,y.g.length),g=[];for(let S=0;S<p;S++)g[S]=this.i(S)^y.i(S);return new l(g,this.h^y.h)};function U(y){const p=y.g.length+1,g=[];for(let S=0;S<p;S++)g[S]=y.i(S)<<1|y.i(S-1)>>>31;return new l(g,y.h)}function M(y,p){const g=p>>5;p%=32;const S=y.g.length-g,T=[];for(let x=0;x<S;x++)T[x]=p>0?y.i(x+g)>>>p|y.i(x+g+1)<<32-p:y.i(x+g);return new l(T,y.h)}r.prototype.digest=r.prototype.A,r.prototype.reset=r.prototype.u,r.prototype.update=r.prototype.v,l.prototype.add=l.prototype.add,l.prototype.multiply=l.prototype.j,l.prototype.modulo=l.prototype.B,l.prototype.compare=l.prototype.l,l.prototype.toNumber=l.prototype.m,l.prototype.toString=l.prototype.toString,l.prototype.getBits=l.prototype.i,l.fromNumber=f,l.fromString=_,mh=l}).apply(typeof Fp<"u"?Fp:typeof self<"u"?self:typeof window<"u"?window:{});var Il=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};(function(){var t,e=Object.defineProperty;function n(o){o=[typeof globalThis=="object"&&globalThis,o,typeof window=="object"&&window,typeof self=="object"&&self,typeof Il=="object"&&Il];for(var a=0;a<o.length;++a){var d=o[a];if(d&&d.Math==Math)return d}throw Error("Cannot find global object")}var r=n(this);function i(o,a){if(a)e:{var d=r;o=o.split(".");for(var m=0;m<o.length-1;m++){var R=o[m];if(!(R in d))break e;d=d[R]}o=o[o.length-1],m=d[o],a=a(m),a!=m&&a!=null&&e(d,o,{configurable:!0,writable:!0,value:a})}}i("Symbol.dispose",function(o){return o||Symbol("Symbol.dispose")}),i("Array.prototype.values",function(o){return o||function(){return this[Symbol.iterator]()}}),i("Object.entries",function(o){return o||function(a){var d=[],m;for(m in a)Object.prototype.hasOwnProperty.call(a,m)&&d.push([m,a[m]]);return d}});/** @license 1751 1752 Copyright The Closure Library Authors. 1753 SPDX-License-Identifier: Apache-2.0 1754*/var s=s||{},l=this||self;function u(o){var a=typeof o;return a=="object"&&o!=null||a=="function"}function c(o,a,d){return o.call.apply(o.bind,arguments)}function f(o,a,d){return f=c,f.apply(null,arguments)}
1754function _(o,a){var d=Array.prototype.slice.call(arguments,1);return function(){var m=d.slice();return m.push.apply(m,arguments),o.apply(this,m)}}function k(o,a){function d(){}d.prototype=a.prototype,o.Z=a.prototype,o.prototype=new d,o.prototype.constructor=o,o.Ob=function(m,R,b){for(var V=Array(arguments.length-2),ne=2;ne<arguments.length;ne++)V[ne-2]=arguments[ne];return a.prototype[R].apply(m,V)}}var E=typeof AsyncContext<"u"&&typeof AsyncContext.Snapshot=="function"?o=>o&&AsyncContext.Snapshot.wrap(o):o=>o;function L(o){const a=o.length;if(a>0){const d=Array(a);for(let m=0;m<a;m++)d[m]=o[m];return d}return[]}function A(o,a){for(let m=1;m<arguments.length;m++){const R=arguments[m];var d=typeof R;if(d=d!="object"?d:R?Array.isArray(R)?"array":d:"null",d=="array"||d=="object"&&typeof R.length=="number"){d=o.length||0;const b=R.length||0;o.length=d+b;for(let V=0;V<b;V++)o[d+V]=R[V]}else o.push(R)}}class P{constructor(a,d){this.i=a,this.j=d,this.h=0,this.g=null}get(){let a;return this.h>0?(this.h--,a=this.g,this.g=a.next,a.next=null):a=this.i(),a}}function D(o){l.setTimeout(()=>{throw o},0)}function I(){var o=y;let a=null;return o.g&&(a=o.g,o.g=o.g.next,o.g||(o.h=null),a.next=null),a}class v{constructor(){this.h=this.g=null}add(a,d){const m=C.get();m.set(a,d),this.h?this.h.next=m:this.g=m,this.h=m}}var C=new P(()=>new O,o=>o.reset());class O{constructor(){this.next=this.g=this.h=null}set(a,d){this.h=a,this.g=d,this.next=null}reset(){this.next=this.g=this.h=null}}let U,M=!1,y=new v,p=()=>{const o=Promise.resolve(void 0);U=()=>{o.then(g)}};function g(){for(var o;o=I();){try{o.h.call(o.g)}catch(d){D(d)}var a=C;a.j(o),a.h<100&&(a.h++,o.next=a.g,a.g=o)}M=!1}function S(){this.u=this.u,this.C=this.C}S.prototype.u=!1,S.prototype.dispose=function(){this.u||(this.u=!0,this.N())},S.prototype[Symbol.dispose]=function(){this.dispose()},S.prototype.N=function(){if(this.C)for(;this.C.length;)this.C.shift()()};function T(o,a){this.type=o,this.g=this.target=a,this.defaultPrevented=!1}T.prototype.h=function(){this.defaultPrevented=!0};var x=function(){if(!l.addEventListener||!Object.defineProperty)return!1;var o=!1,a=Object.defineProperty({},"passive",{get:function(){o=!0}});try{const d=()=>{};l.addEventListener("test",d,a),l.removeEventListener("test",d,a)}catch{}return o}();function w(o){return/^[\s\xa0]*$/.test(o)}function ee(o,a){T.call(this,o?o.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,o&&this.init(o,a)}k(ee,T),ee.prototype.init=function(o,a){const d=this.type=o.type,m=o.changedTouches&&o.changedTouches.length?o.changedTouches[0]:null;this.target=o.target||o.srcElement,this.g=a,a=o.relatedTarget,a||(d=="mouseover"?a=o.fromElement:d=="mouseout"&&(a=o.toElement)),this.relatedTarget=a,m?(this.clientX=m.clientX!==void 0?m.clientX:m.pageX,this.clientY=m.clientY!==void 0?m.clientY:m.pageY,this.screenX=m.screenX||0,this.screenY=m.screenY||0):(this.clientX=o.clientX!==void 0?o.clientX:o.pageX,this.clientY=o.clientY!==void 0?o.clientY:o.pageY,this.screenX=o.screenX||0,this.screenY=o.screenY||0),this.button=o.button,this.key=o.key||"",this.ctrlKey=o.ctrlKey,this.altKey=o.altKey,this.shiftKey=o.shiftKey,this.metaKey=o.metaKey,this.pointerId=o.pointerId||0,this.pointerType=o.pointerType,this.state=o.state,this.i=o,o.defaultPrevented&&ee.Z.h.call(this)},ee.prototype.h=function(){ee.Z.h.call(this);const o=this.i;o.preventDefault?o.preventDefault():o.returnValue=!1};var Ve="closure_listenable_"+(Math.random()*1e6|0),He=0;function K(o,a,d,m,R){this.listener=o,this.proxy=null,this.src=a,this.type=d,this.capture=!!m,this.ha=R,this.key=++He,this.da=this.fa=!1}function F(o){o.da=!0,o.listener=null,o.proxy=null,o.src=null,o.ha=null}function $(o,a,d){for(const m in o)a.call(d,o[m],m,o)}function G(o,a){for(const d in o)a.call(void 0,o[d],d,o)}function se(o){const a={};for(const d in o)a[d]=o[d];return a}const re="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleStr
1754ing toString valueOf".split(" ");function W(o,a){let d,m;for(let R=1;R<arguments.length;R++){m=arguments[R];for(d in m)o[d]=m[d];for(let b=0;b<re.length;b++)d=re[b],Object.prototype.hasOwnProperty.call(m,d)&&(o[d]=m[d])}}function ie(o){this.src=o,this.g={},this.h=0}ie.prototype.add=function(o,a,d,m,R){const b=o.toString();o=this.g[b],o||(o=this.g[b]=[],this.h++);const V=ae(o,a,m,R);return V>-1?(a=o[V],d||(a.fa=!1)):(a=new K(a,this.src,b,!!m,R),a.fa=d,o.push(a)),a};function pe(o,a){const d=a.type;if(d in o.g){var m=o.g[d],R=Array.prototype.indexOf.call(m,a,void 0),b;(b=R>=0)&&Array.prototype.splice.call(m,R,1),b&&(F(a),o.g[d].length==0&&(delete o.g[d],o.h--))}}function ae(o,a,d,m){for(let R=0;R<o.length;++R){const b=o[R];if(!b.da&&b.listener==a&&b.capture==!!d&&b.ha==m)return R}return-1}var ot="closure_lm_"+(Math.random()*1e6|0),tn={};function vr(o,a,d,m,R){if(Array.isArray(a)){for(let b=0;b<a.length;b++)vr(o,a[b],d,m,R);return null}return d=lt(d),o&&o[Ve]?o.J(a,d,u(m)?!!m.capture:!1,R):Bt(o,a,d,!1,m,R)}function Bt(o,a,d,m,R,b){if(!a)throw Error("Invalid event type");const V=u(R)?!!R.capture:!!R;let ne=Xe(o);if(ne||(o[ot]=ne=new ie(o)),d=ne.add(a,d,m,V,b),d.proxy)return d;if(m=Ue(),d.proxy=m,m.src=o,m.listener=d,o.addEventListener)x||(R=V),R===void 0&&(R=!1),o.addEventListener(a.toString(),m,R);else if(o.attachEvent)o.attachEvent(gn(a.toString()),m);else if(o.addListener&&o.removeListener)o.addListener(m);else throw Error("addEventListener and attachEvent are unavailable.");return d}function Ue(){function o(d){return a.call(o.src,o.listener,d)}const a=nn;return o}function Fe(o,a,d,m,R){if(Array.isArray(a))for(var b=0;b<a.length;b++)Fe(o,a[b],d,m,R);else m=u(m)?!!m.capture:!!m,d=lt(d),o&&o[Ve]?(o=o.i,b=String(a).toString(),b in o.g&&(a=o.g[b],d=ae(a,d,m,R),d>-1&&(F(a[d]),Array.prototype.splice.call(a,d,1),a.length==0&&(delete o.g[b],o.h--)))):o&&(o=Xe(o))&&(a=o.g[a.toString()],o=-1,a&&(o=ae(a,d,m,R)),(d=o>-1?a[o]:null)&&ze(d))}function ze(o){if(typeof o!="number"&&o&&!o.da){var a=o.src;if(a&&a[Ve])pe(a.i,o);else{var d=o.type,m=o.proxy;a.removeEventListener?a.removeEventListener(d,m,o.capture):a.detachEvent?a.detachEvent(gn(d),m):a.addListener&&a.removeListener&&a.removeListener(m),(d=Xe(a))?(pe(d,o),d.h==0&&(d.src=null,a[ot]=null)):F(o)}}}function gn(o){return o in tn?tn[o]:tn[o]="on"+o}function nn(o,a){if(o.da)o=!0;else{a=new ee(a,this);const d=o.listener,m=o.ha||o.src;o.fa&&ze(o),o=d.call(m,a)}return o}function Xe(o){return o=o[ot],o instanceof ie?o:null}var jn="__closure_events_fn_"+(Math.random()*1e9>>>0);function lt(o){return typeof o=="function"?o:(o[jn]||(o[jn]=function(a){return o.handleEvent(a)}),o[jn])}function Z(){S.call(this),this.i=new ie(this),this.M=this,this.G=null}k(Z,S),Z.prototype[Ve]=!0,Z.prototype.removeEventListener=function(o,a,d,m){Fe(this,o,a,d,m)};function Se(o,a){var d,m=o.G;if(m)for(d=[];m;m=m.G)d.push(m);if(o=o.M,m=a.type||a,typeof a=="string")a=new T(a,o);else if(a instanceof T)a.target=a.target||o;else{var R=a;a=new T(m,o),W(a,R)}R=!0;let b,V;if(d)for(V=d.length-1;V>=0;V--)b=a.g=d[V],R=At(b,m,!0,a)&&R;if(b=a.g=o,R=At(b,m,!0,a)&&R,R=At(b,m,!1,a)&&R,d)for(V=0;V<d.length;V++)b=a.g=d[V],R=At(b,m,!1,a)&&R}Z.prototype.N=function(){if(Z.Z.N.call(this),this.i){var o=this.i;for(const a in o.g){const d=o.g[a];for(let m=0;m<d.length;m++)F(d[m]);delete o.g[a],o.h--}}this.G=null},Z.prototype.J=function(o,a,d,m){return this.i.add(String(o),a,!1,d,m)},Z.prototype.K=function(o,a,d,m){return this.i.add(String(o),a,!0,d,m)};function At(o,a,d,m){if(a=o.i.g[String(a)],!a)return!0;a=a.concat();let R=!0;for(let b=0;b<a.length;++b){const V=a[b];if(V&&!V.da&&V.capture==d){const ne=V.listener,Je=V.ha||V.src;V.fa&&pe(o.i,V),R=ne.call(Je,m)!==!1&&R}}return R&&!m.defaultPrevented}function $t(o,a){if(typeof o!="function")if(o&&typeof o.handleEvent=="function")o=f(o.handleEvent,o);else throw Error("Invalid listener argument");return Number(a)>2147483647?-1:l.setTimeout(o,a||0)}function yn(o){o.g=$t(()=>{o.g=null,o.i&&(o.i=!1,yn(o))},o.l);const a=o.h;o.h=null,o.m.apply(null,a)}class at extends S{constructor(a,d){super(),this.m=a,this.l=d,this.h=null,this.i=!1,this.g=null}j(a){this.h=arguments,this.g?this.i=!0:yn(this)}N(){super.N(),this.g&&(l.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function Rt(o){S.call(this),this.h=o,this.g={}}k(Rt,S);var et=[];function _t(o){$(o.g,function(a,d){this.g.hasOwnProperty(d)&&ze(a)},o),o.g={}}Rt.prototype.N=function(){Rt.Z.N.call(this),_t(this)},Rt.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")};var Pt=l.JSON.stringify,$i=l.JSON.parse,Vi=class{stringify(o){return l.JSON.stringify(o,void 0)}parse(o){return l.JSON.parse(o,void 0)}};function bn(){}function Vt(){}var pt={OPEN:"a",hb:"b",ERROR:"c",tb:"d"};function rn(){T.call(this,"d")}k(rn,T);function sn(){T.call(this,"c")}k(sn,T);var tt={},ri=null;function Dn(){return ri=ri||new Z}tt.Ia="serverreachability";function Ht(o){T.call(this,tt.Ia,o)}k(Ht,T);function wt(o){const a=Dn();Se(a,new Ht(a))}tt.STAT_EVENT="statevent";function Mn(o,a){T.call(this,tt.STAT_EVENT,o),this.stat=a}k(Mn,T);function We(o){const a=Dn();Se(a,new Mn(a,o))}tt.Ja="timingevent";function vn(o,a){T.call(this,tt.Ja,o),this.size=a}k(vn,T);function on(o,a){if(typeof o!="function")throw Error("Fn must not be null and must be a function");return l.setTimeout(function(){o()},a)}function Ot(){this.g=!0}Ot.prototype.ua=function(){this.g=!1};function St(o,a,d,m,R,b){o.info(function(){if(o.g)if(b){var V="",ne=b.split("&");for(let ke=0;ke<ne.length;ke++){var Je=ne[ke].split("=");if(Je.length>1){const rt=Je[0];Je=Je[1];const Fn=rt.split("_");V=Fn.length>=2&&Fn[1]=="type"?V+(rt+"="+Je+"&"):V+(rt+"=redacted&")}}}else V=null;else V=b;return"XMLHTTP REQ ("+m+") [attempt "+R+"]: "+a+` 1755`+d+` 1756`+V})}function _r(o,a,d,m,R,b,V){o.info(function(){return"XMLHTTP RESP ("+m+") [ attempt "+R+"]: "+a+` 1757`+d+` 1758`+b+" "+V})}function ut(o,a,d,m){o.info(function(){return"XMLHTTP TEXT ("+a+"): "+si(o,d)+(m?" "+m:"")})}function ii(o,a){o.info(function(){return"TIMEOUT: "+a})}Ot.prototype.info=function(){};function si(o,a){if(!o.g)return a;
1758if(!a)return null;try{const b=JSON.parse(a);if(b){for(o=0;o<b.length;o++)if(Array.isArray(b[o])){var d=b[o];if(!(d.length<2)){var m=d[1];if(Array.isArray(m)&&!(m.length<1)){var R=m[0];if(R!="noop"&&R!="stop"&&R!="close")for(let V=1;V<m.length;V++)m[V]=""}}}}return Pt(b)}catch{return a}}var _n={NO_ERROR:0,TIMEOUT:8},Q={},ye;function Te(){}k(Te,bn),Te.prototype.g=function(){return new XMLHttpRequest},ye=new Te;function qe(o){return encodeURIComponent(String(o))}function Le(o){var a=1;o=o.split(":");const d=[];for(;a>0&&o.length;)d.push(o.shift()),a--;return o.length&&d.push(o.join(":")),d}function Ge(o,a,d,m){this.j=o,this.i=a,this.l=d,this.S=m||1,this.V=new Rt(this),this.H=45e3,this.J=null,this.o=!1,this.u=this.B=this.A=this.M=this.F=this.T=this.D=null,this.G=[],this.g=null,this.C=0,this.m=this.v=null,this.X=-1,this.K=!1,this.P=0,this.O=null,this.W=this.L=this.U=this.R=!1,this.h=new ln}function ln(){this.i=null,this.g="",this.h=!1}var Lt={},jt={};function je(o,a,d){o.M=1,o.A=ai(ve(a)),o.u=d,o.R=!0,Wt(o,null)}function Wt(o,a){o.F=Date.now(),Et(o),o.B=ve(o.A);var d=o.B,m=o.S;Array.isArray(m)||(m=[String(m)]),Ih(d.i,"t",m),o.C=0,d=o.j.L,o.h=new ln,o.g=$h(o.j,d?a:null,!o.u),o.P>0&&(o.O=new at(f(o.Y,o,o.g),o.P)),a=o.V,d=o.g,m=o.ba;var R="readystatechange";Array.isArray(R)||(R&&(et[0]=R.toString()),R=et);for(let b=0;b<R.length;b++){const V=vr(d,R[b],m||a.handleEvent,!1,a.h||a);if(!V)break;a.g[V.key]=V}a=o.J?se(o.J):{},o.u?(o.v||(o.v="POST"),a["Content-Type"]="application/x-www-form-urlencoded",o.g.ea(o.B,o.v,o.u,a)):(o.v="GET",o.g.ea(o.B,o.v,null,a)),wt(),St(o.i,o.v,o.B,o.l,o.S,o.u)}Ge.prototype.ba=function(o){o=o.target;const a=this.O;a&&kr(o)==3?a.j():this.Y(o)},Ge.prototype.Y=function(o){try{if(o==this.g)e:{const ne=kr(this.g),Je=this.g.ya(),ke=this.g.ca();if(!(ne<3)&&(ne!=3||this.g&&(this.h.h||this.g.la()||Ph(this.g)))){this.K||ne!=4||Je==7||(Je==8||ke<=0?wt(3):wt(2)),Hi(this);var a=this.g.ca();this.X=a;var d=wn(this);if(this.o=a==200,_r(this.i,this.v,this.B,this.l,this.S,ne,a),this.o){if(this.U&&!this.L){t:{if(this.g){var m,R=this.g;if((m=R.g?R.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!w(m)){var b=m;break t}}b=null}if(o=b)ut(this.i,this.l,o,"Initial handshake response via X-HTTP-Initial-Response"),this.L=!0,li(this,o);else{this.o=!1,this.m=3,We(12),Un(this),wr(this);break e}}if(this.R){o=!0;let rt;for(;!this.K&&this.C<d.length;)if(rt=oi(this,d),rt==jt){ne==4&&(this.m=4,We(14),o=!1),ut(this.i,this.l,null,"[Incomplete Response]");break}else if(rt==Lt){this.m=4,We(15),ut(this.i,this.l,d,"[Invalid Chunk]"),o=!1;break}else ut(this.i,this.l,rt,null),li(this,rt);if(ct(this)&&this.C!=0&&(this.h.g=this.h.g.slice(this.C),this.C=0),ne!=4||d.length!=0||this.h.h||(this.m=1,We(16),o=!1),this.o=this.o&&o,!o)ut(this.i,this.l,d,"[Invalid Chunked Response]"),Un(this),wr(this);else if(d.length>0&&!this.W){this.W=!0;var V=this.j;V.g==this&&V.aa&&!V.P&&(V.j.info("Great, no buffering proxy detected. Bytes received: "+d.length),nu(V),V.P=!0,We(11))}}else ut(this.i,this.l,d,null),li(this,d);ne==4&&Un(this),this.o&&!this.K&&(ne==4?Uh(this.j,this):(this.o=!1,Et(this)))}else p_(this.g),a==400&&d.indexOf("Unknown SID")>0?(this.m=3,We(12)):(this.m=0,We(13)),Un(this),wr(this)}}}catch{}finally{}};function wn(o){if(!ct(o))return o.g.la();const a=Ph(o.g);if(a==="")return"";let d="";const m=a.length,R=kr(o.g)==4;if(!o.h.i){if(typeof TextDecoder>"u")return Un(o),wr(o),"";o.h.i=new l.TextDecoder}for(let b=0;b<m;b++)o.h.h=!0,d+=o.h.i.decode(a[b],{stream:!(R&&b==m-1)});return a.length=0,o.h.g+=d,o.C=0,o.h.g}function ct(o){return o.g?o.v=="GET"&&o.M!=2&&o.j.Aa:!1}function oi(o,a){var d=o.C,m=a.indexOf(` 1759`,d);return m==-1?jt:(d=Number(a.substring(d,m)),isNaN(d)?Lt:(m+=1,m+d>a.length?jt:(a=a.slice(m,m+d),o.C=m+d,a)))}Ge.prototype.cancel=function(){this.K=!0,Un(this)};function Et(o){o.T=Date.now()+o.H,js(o,o.H)}function js(o,a){if(o.D!=null)throw Error("WatchDog timer not null");o.D=on(f(o.aa,o),a)}function Hi(o){o.D&&(l.clearTimeout(o.D),o.D=null)}Ge.prototype.aa=function(){this.D=null;const o=Date.now();o-this.T>=0?(ii(this.i,this.B),this.M!=2&&(wt(),We(17)),Un(this),this.m=2,wr(this)):js(this,this.T-o)};function wr(o){o.j.I==0||o.K||Uh(o.j,o)}function Un(o){Hi(o);var a=o.O;a&&typeof a.dispose=="function"&&a.dispose(),o.O=null,_t(o.V),o.g&&(a=o.g,o.g=null,a.abort(),a.dispose())}function li(o,a){try{var d=o.j;if(d.I!=0&&(d.g==o||H(d.h,o))){if(!o.L&&H(d.h,o)&&d.I==3){try{var m=d.Ba.g.parse(a)}catch{m=null}if(Array.isArray(m)&&m.length==3){var R=m;
1759if(R[0]==0){e:if(!d.v){if(d.g)if(d.g.F+3e3<o.F)tl(d),Zo(d);else break e;tu(d),We(18)}}else d.xa=R[1],0<d.xa-d.K&&R[2]<37500&&d.F&&d.A==0&&!d.C&&(d.C=on(f(d.Va,d),6e3));z(d.h)<=1&&d.ta&&(d.ta=void 0)}else ci(d,11)}else if((o.L||d.g==o)&&tl(d),!w(a))for(R=d.Ba.g.parse(a),a=0;a<R.length;a++){let ke=R[a];const rt=ke[0];if(!(rt<=d.K))if(d.K=rt,ke=ke[1],d.I==2)if(ke[0]=="c"){d.M=ke[1],d.ba=ke[2];const Fn=ke[3];Fn!=null&&(d.ka=Fn,d.j.info("VER="+d.ka));const di=ke[4];di!=null&&(d.za=di,d.j.info("SVER="+d.za));const Ir=ke[5];Ir!=null&&typeof Ir=="number"&&Ir>0&&(m=1.5*Ir,d.O=m,d.j.info("backChannelRequestTimeoutMs_="+m)),m=d;const Tr=o.g;if(Tr){const nl=Tr.g?Tr.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(nl){var b=m.h;b.g||nl.indexOf("spdy")==-1&&nl.indexOf("quic")==-1&&nl.indexOf("h2")==-1||(b.j=b.l,b.g=new Set,b.h&&(X(b,b.h),b.h=null))}if(m.G){const ru=Tr.g?Tr.g.getResponseHeader("X-HTTP-Session-Id"):null;ru&&(m.wa=ru,de(m.J,m.G,ru))}}d.I=3,d.l&&d.l.ra(),d.aa&&(d.T=Date.now()-o.F,d.j.info("Handshake RTT: "+d.T+"ms")),m=d;var V=o;if(m.na=Bh(m,m.L?m.ba:null,m.W),V.L){ue(m.h,V);var ne=V,Je=m.O;Je&&(ne.H=Je),ne.D&&(Hi(ne),Et(ne)),m.g=V}else Dh(m);d.i.length>0&&el(d)}else ke[0]!="stop"&&ke[0]!="close"||ci(d,7);else d.I==3&&(ke[0]=="stop"||ke[0]=="close"?ke[0]=="stop"?ci(d,7):eu(d):ke[0]!="noop"&&d.l&&d.l.qa(ke),d.A=0)}}wt(4)}catch{}}var Ja=class{constructor(o,a){this.g=o,this.map=a}};function bs(o){this.l=o||10,l.PerformanceNavigationTiming?(o=l.performance.getEntriesByType("navigation"),o=o.length>0&&(o[0].nextHopProtocol=="hq"||o[0].nextHopProtocol=="h2")):o=!!(l.chrome&&l.chrome.loadTimes&&l.chrome.loadTimes()&&l.chrome.loadTimes().wasFetchedViaSpdy),this.j=o?this.l:1,this.g=null,this.j>1&&(this.g=new Set),this.h=null,this.i=[]}function j(o){return o.h?!0:o.g?o.g.size>=o.j:!1}function z(o){return o.h?1:o.g?o.g.size:0}function H(o,a){return o.h?o.h==a:o.g?o.g.has(a):!1}function X(o,a){o.g?o.g.add(a):o.h=a}function ue(o,a){o.h&&o.h==a?o.h=null:o.g&&o.g.has(a)&&o.g.delete(a)}bs.prototype.cancel=function(){if(this.i=fe(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&this.g.size!==0){for(const o of this.g.values())o.cancel();this.g.clear()}};function fe(o){if(o.h!=null)return o.i.concat(o.h.G);if(o.g!=null&&o.g.size!==0){let a=o.i;for(const d of o.g.values())a=a.concat(d.G);return a}return L(o.i)}var oe=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function Y(o,a){if(o){o=o.split("&");for(let d=0;d<o.length;d++){const m=o[d].indexOf("=");let R,b=null;m>=0?(R=o[d].substring(0,m),b=o[d].substring(m+1)):R=o[d],a(R,b?decodeURIComponent(b.replace(/\+/g," ")):"")}}}function te(o){this.g=this.o=this.j="",this.u=null,this.m=this.h="",this.l=!1;let a;o instanceof te?(this.l=o.l,Ee(this,o.j),this.o=o.o,this.g=o.g,nt(this,o.u),this.h=o.h,Ae(this,Th(o.i)),this.m=o.m):o&&(a=String(o).match(oe))?(this.l=!1,Ee(this,a[1]||"",!0),this.o=Sr(a[2]||""),this.g=Sr(a[3]||"",!0),nt(this,a[4]),this.h=Sr(a[5]||"",!0),Ae(this,a[6]||"",!0),this.m=Sr(a[7]||"")):(this.l=!1,this.i=new Ms(null,this.l))}te.prototype.toString=function(){const o=[];var a=this.j;a&&o.push(Ds(a,wh,!0),":");var d=this.g;return(d||a=="file")&&(o.push("//"),(a=this.o)&&o.push(Ds(a,wh,!0),"@"),o.push(qe(d).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),d=this.u,d!=null&&o.push(":",String(d))),(d=this.h)&&(this.g&&d.charAt(0)!="/"&&o.push("/"),o.push(Ds(d,d.charAt(0)=="/"?s_:i_,!0))),(d=this.i.toString())&&o.push("?",d),(d=this.m)&&o.push("#",Ds(d,l_)),o.join("")},te.prototype.resolve=function(o){const a=ve(this);let d=!!o.j;d?Ee(a,o.j):d=!!o.o,d?a.o=o.o:d=!!o.g,d?a.g=o.g:d=o.u!=null;var m=o.h;if(d)nt(a,o.u);else if(d=!!o.h){if(m.charAt(0)!="/")if(this.g&&!this.h)m="/"+m;else{var R=a.h.lastIndexOf("/");R!=-1&&(m=a.h.slice(0,R+1)+m)}if(R=m,R==".."||R==".")m="";else if(R.indexOf("./")!=-1||R.indexOf("/.")!=-1){m=R.lastIndexOf("/",0)==0,R=R.split("/");const b=[];for(let V=0;V<R.length;){const ne=R[V++];ne=="."?m&&V==R.length&&b.push(""):ne==".."?((b.length>1||b.length==1&&b[0]!="")&&b.pop(),m&&V==R.length&&b.push("")):(b.push(ne),m=!0)}m=b.join("/")}else m=R}
1759return d?a.h=m:d=o.i.toString()!=="",d?Ae(a,Th(o.i)):d=!!o.m,d&&(a.m=o.m),a};function ve(o){return new te(o)}function Ee(o,a,d){o.j=d?Sr(a,!0):a,o.j&&(o.j=o.j.replace(/:$/,""))}function nt(o,a){if(a){if(a=Number(a),isNaN(a)||a<0)throw Error("Bad port number "+a);o.u=a}else o.u=null}function Ae(o,a,d){a instanceof Ms?(o.i=a,a_(o.i,o.l)):(d||(a=Ds(a,o_)),o.i=new Ms(a,o.l))}function de(o,a,d){o.i.set(a,d)}function ai(o){return de(o,"zx",Math.floor(Math.random()*2147483648).toString(36)+Math.abs(Math.floor(Math.random()*2147483648)^Date.now()).toString(36)),o}function Sr(o,a){return o?a?decodeURI(o.replace(/%25/g,"%2525")):decodeURIComponent(o):""}function Ds(o,a,d){return typeof o=="string"?(o=encodeURI(o).replace(a,r_),d&&(o=o.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),o):null}function r_(o){return o=o.charCodeAt(0),"%"+(o>>4&15).toString(16)+(o&15).toString(16)}var wh=/[#\/\?@]/g,i_=/[#\?:]/g,s_=/[#\?]/g,o_=/[#\?@]/g,l_=/#/g;function Ms(o,a){this.h=this.g=null,this.i=o||null,this.j=!!a}function ui(o){o.g||(o.g=new Map,o.h=0,o.i&&Y(o.i,function(a,d){o.add(decodeURIComponent(a.replace(/\+/g," ")),d)}))}t=Ms.prototype,t.add=function(o,a){ui(this),this.i=null,o=Wi(this,o);let d=this.g.get(o);return d||this.g.set(o,d=[]),d.push(a),this.h+=1,this};function Sh(o,a){ui(o),a=Wi(o,a),o.g.has(a)&&(o.i=null,o.h-=o.g.get(a).length,o.g.delete(a))}function Eh(o,a){return ui(o),a=Wi(o,a),o.g.has(a)}t.forEach=function(o,a){ui(this),this.g.forEach(function(d,m){d.forEach(function(R){o.call(a,R,m,this)},this)},this)};function kh(o,a){ui(o);let d=[];if(typeof a=="string")Eh(o,a)&&(d=d.concat(o.g.get(Wi(o,a))));else for(o=Array.from(o.g.values()),a=0;a<o.length;a++)d=d.concat(o[a]);return d}t.set=function(o,a){return ui(this),this.i=null,o=Wi(this,o),Eh(this,o)&&(this.h-=this.g.get(o).length),this.g.set(o,[a]),this.h+=1,this},t.get=function(o,a){return o?(o=kh(this,o),o.length>0?String(o[0]):a):a};function Ih(o,a,d){Sh(o,a),d.length>0&&(o.i=null,o.g.set(Wi(o,a),L(d)),o.h+=d.length)}t.toString=function(){if(this.i)return this.i;if(!this.g)return"";const o=[],a=Array.from(this.g.keys());for(let m=0;m<a.length;m++){var d=a[m];const R=qe(d);d=kh(this,d);for(let b=0;b<d.length;b++){let V=R;d[b]!==""&&(V+="="+qe(d[b])),o.push(V)}}return this.i=o.join("&")};function Th(o){const a=new Ms;return a.i=o.i,o.g&&(a.g=new Map(o.g),a.h=o.h),a}function Wi(o,a){return a=String(a),o.j&&(a=a.toLowerCase()),a}function a_(o,a){a&&!o.j&&(ui(o),o.i=null,o.g.forEach(function(d,m){const R=m.toLowerCase();m!=R&&(Sh(this,m),Ih(this,R,d))},o)),o.j=a}function u_(o,a){const d=new Ot;if(l.Image){const m=new Image;m.onload=_(Er,d,"TestLoadImage: loaded",!0,a,m),m.onerror=_(Er,d,"TestLoadImage: error",!1,a,m),m.onabort=_(Er,d,"TestLoadImage: abort",!1,a,m),m.ontimeout=_(Er,d,"TestLoadImage: timeout",!1,a,m),l.setTimeout(function(){m.ontimeout&&m.ontimeout()},1e4),m.src=o}else a(!1)}function c_(o,a){const d=new Ot,m=new AbortController,R=setTimeout(()=>{m.abort(),Er(d,"TestPingServer: timeout",!1,a)},1e4);fetch(o,{signal:m.signal}).then(b=>{clearTimeout(R),b.ok?Er(d,"TestPingServer: ok",!0,a):Er(d,"TestPingServer: server error",!1,a)}).catch(()=>{clearTimeout(R),Er(d,"TestPingServer: error",!1,a)})}function Er(o,a,d,m,R){try{R&&(R.onload=null,R.onerror=null,R.onabort=null,R.ontimeout=null),m(d)}catch{}}function d_(){this.g=new Vi}function Ya(o){this.i=o.Sb||null,this.h=o.ab||!1}k(Ya,bn),Ya.prototype.g=function(){return new Jo(this.i,this.h)};function Jo(o,a){Z.call(this),this.H=o,this.o=a,this.m=void 0,this.status=this.readyState=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.A=new Headers,this.h=null,this.F="GET",this.D="",this.g=!1,this.B=this.j=this.l=null,this.v=new AbortController}k(Jo,Z),t=Jo.prototype,t.open=function(o,a){if(this.readyState!=0)throw this.abort(),Error("Error reopening a connection");this.F=o,this.D=a,this.readyState=1,Fs(this)},t.send=function(o){if(this.readyState!=1)throw this.abort(),Error("need to call open() first. ");if(this.v.signal.aborted)throw this.abort(),Error("Request was aborted.");this.g=!0;const a={headers:this.A,method:this.F,credentials:this.m,cache:void 0,signal:this.v.signal};
vendor: 5,091 bytes, lines 1759-1761
1759o&&(a.body=o),(this.H||l).fetch(new Request(this.D,a)).then(this.Pa.bind(this),this.ga.bind(this))},t.abort=function(){this.response=this.responseText="",this.A=new Headers,this.status=0,this.v.abort(),this.j&&this.j.cancel("Request was aborted.").catch(()=>{}),this.readyState>=1&&this.g&&this.readyState!=4&&(this.g=!1,Us(this)),this.readyState=0},t.Pa=function(o){if(this.g&&(this.l=o,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=o.headers,this.readyState=2,Fs(this)),this.g&&(this.readyState=3,Fs(this),this.g)))if(this.responseType==="arraybuffer")o.arrayBuffer().then(this.Na.bind(this),this.ga.bind(this));else if(typeof l.ReadableStream<"u"&&"body"in o){if(this.j=o.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.B=new TextDecoder;Ch(this)}else o.text().then(this.Oa.bind(this),this.ga.bind(this))};function Ch(o){o.j.read().then(o.Ma.bind(o)).catch(o.ga.bind(o))}t.Ma=function(o){if(this.g){if(this.o&&o.value)this.response.push(o.value);else if(!this.o){var a=o.value?o.value:new Uint8Array(0);(a=this.B.decode(a,{stream:!o.done}))&&(this.response=this.responseText+=a)}o.done?Us(this):Fs(this),this.readyState==3&&Ch(this)}},t.Oa=function(o){this.g&&(this.response=this.responseText=o,Us(this))},t.Na=function(o){this.g&&(this.response=o,Us(this))},t.ga=function(){this.g&&Us(this)};function Us(o){o.readyState=4,o.l=null,o.j=null,o.B=null,Fs(o)}t.setRequestHeader=function(o,a){this.A.append(o,a)},t.getResponseHeader=function(o){return this.h&&this.h.get(o.toLowerCase())||""},t.getAllResponseHeaders=function(){if(!this.h)return"";const o=[],a=this.h.entries();for(var d=a.next();!d.done;)d=d.value,o.push(d[0]+": "+d[1]),d=a.next();return o.join(`\r 1760`)};function Fs(o){o.onreadystatechange&&o.onreadystatechange.call(o)}Object.defineProperty(Jo.prototype,"withCredentials",{get:function(){return this.m==="include"},set:function(o){this.m=o?"include":"same-origin"}});function Nh(o){let a="";return $(o,function(d,m){a+=m,a+=":",a+=d,a+=`\r 1761`}),a}function Za(o,a,d){e:{for(m in d){var m=!1;break e}m=!0}m||(d=Nh(d),typeof o=="string"?d!=null&&qe(d):de(o,a,d))}function Be(o){Z.call(this),this.headers=new Map,this.L=o||null,this.h=!1,this.g=null,this.D="",this.o=0,this.l="",this.j=this.B=this.v=this.A=!1,this.m=null,this.F="",this.H=!1}k(Be,Z);var h_=/^https?$/i,f_=["POST","PUT"];t=Be.prototype,t.Fa=function(o){this.H=o},t.ea=function(o,a,d,m){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.D+"; newUri="+o);a=a?a.toUpperCase():"GET",this.D=o,this.l="",this.o=0,this.A=!1,this.h=!0,this.g=this.L?this.L.g():ye.g(),this.g.onreadystatechange=E(f(this.Ca,this));try{this.B=!0,this.g.open(a,String(o),!0),this.B=!1}catch(b){xh(this,b);return}if(o=d||"",d=new Map(this.headers),m)if(Object.getPrototypeOf(m)===Object.prototype)for(var R in m)d.set(R,m[R]);else if(typeof m.keys=="function"&&typeof m.get=="function")for(const b of m.keys())d.set(b,m.get(b));else throw Error("Unknown input type for opt_headers: "+String(m));m=Array.from(d.keys()).find(b=>b.toLowerCase()=="content-type"),R=l.FormData&&o instanceof l.FormData,!(Array.prototype.indexOf.call(f_,a,void 0)>=0)||m||R||d.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const[b,V]of d)this.g.setRequestHeader(b,V);this.F&&(this.g.responseType=this.F),"withCredentials"in this.g&&this.g.withCredentials!==this.H&&(this.g.withCredentials=this.H);try{this.m&&(clearTimeout(this.m),this.m=null),this.v=!0,this.g.send(o),this.v=!1}catch(b){xh(this,b)}};function xh(o,a){o.h=!1,o.g&&(o.j=!0,o.g.abort(),o.j=!1),o.l=a,o.o=5,Ah(o),Yo(o)}function Ah(o){o.A||(o.A=!0,Se(o,"complete"),Se(o,"error"))}t.abort=function(o){this.g&&this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1,this.o=o||7,Se(this,"complete"),Se(this,"abort"),Yo(this))},t.N=function(){this.g&&(this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1),Yo(this,!0)),Be.Z.N.call(this)},t.Ca=function(){this.u||(this.B||this.v||this.j?Rh(this):this.Xa())},t.Xa=function(){Rh(this)};function Rh(o){if(o.h&&typeof s<"u"){if(o.v&&kr(o)==4)setTimeout(o.Ca.bind(o),0);else if(Se(o,"readystatechange"),kr(o)==4){o.h=!1;try{const b=o.ca();e:switch(b){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var a=!0;break e;default:a=!1}var d;if(!(d=a)){var m;if(m=b===0){let V=String(o.D).match(oe)[1]||null;!V&&l.self&&l.self.location&&(V=l.self.location.protocol.slice(0,-1)),m=!h_.test(V?V.toLowerCase():"")}d=m}if(d)Se(o,"complete"),Se(o,"success");else{o.o=6;try{var R=kr(o)>2?o.g.statusText:""}catch{R=""}o.l=R+" ["+o.ca()+"]",Ah(o)}}finally{Yo(o)}}}}function Yo(o,a){if(o.g){o.m&&(clearTimeout(o.m),o.m=null);const d=o.g;o.g=null,a||Se(o,"ready");try{d.onreadystatechange=null}catch{}}}t.isActive=function(){return!!this.g};function kr(o){return o.g?o.g.readyState:0}t.ca=function(){try{return kr(this)>2?this.g.status:-1}catch{return-1}},t.la=function(){try{return this.g?this.g.responseText:""}catch{return""}}
vendor: 4,906 bytes, lines 1761-1762
1761,t.La=function(o){if(this.g){var a=this.g.responseText;return o&&a.indexOf(o)==0&&(a=a.substring(o.length)),$i(a)}};function Ph(o){try{if(!o.g)return null;if("response"in o.g)return o.g.response;switch(o.F){case"":case"text":return o.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in o.g)return o.g.mozResponseArrayBuffer}return null}catch{return null}}function p_(o){const a={};o=(o.g&&kr(o)>=2&&o.g.getAllResponseHeaders()||"").split(`\r 1762`);for(let m=0;m<o.length;m++){if(w(o[m]))continue;var d=Le(o[m]);const R=d[0];if(d=d[1],typeof d!="string")continue;d=d.trim();const b=a[R]||[];a[R]=b,b.push(d)}G(a,function(m){return m.join(", ")})}t.ya=function(){return this.o},t.Ha=function(){return typeof this.l=="string"?this.l:String(this.l)};function zs(o,a,d){return d&&d.internalChannelParams&&d.internalChannelParams[o]||a}function Oh(o){this.za=0,this.i=[],this.j=new Ot,this.ba=this.na=this.J=this.W=this.g=this.wa=this.G=this.H=this.u=this.U=this.o=null,this.Ya=this.V=0,this.Sa=zs("failFast",!1,o),this.F=this.C=this.v=this.m=this.l=null,this.X=!0,this.xa=this.K=-1,this.Y=this.A=this.D=0,this.Qa=zs("baseRetryDelayMs",5e3,o),this.Za=zs("retryDelaySeedMs",1e4,o),this.Ta=zs("forwardChannelMaxRetries",2,o),this.va=zs("forwardChannelRequestTimeoutMs",2e4,o),this.ma=o&&o.xmlHttpFactory||void 0,this.Ua=o&&o.Rb||void 0,this.Aa=o&&o.useFetchStreams||!1,this.O=void 0,this.L=o&&o.supportsCrossDomainXhr||!1,this.M="",this.h=new bs(o&&o.concurrentRequestLimit),this.Ba=new d_,this.S=o&&o.fastHandshake||!1,this.R=o&&o.encodeInitMessageHeaders||!1,this.S&&this.R&&(this.R=!1),this.Ra=o&&o.Pb||!1,o&&o.ua&&this.j.ua(),o&&o.forceLongPolling&&(this.X=!1),this.aa=!this.S&&this.X&&o&&o.detectBufferingProxy||!1,this.ia=void 0,o&&o.longPollingTimeout&&o.longPollingTimeout>0&&(this.ia=o.longPollingTimeout),this.ta=void 0,this.T=0,this.P=!1,this.ja=this.B=null}t=Oh.prototype,t.ka=8,t.I=1,t.connect=function(o,a,d,m){We(0),this.W=o,this.H=a||{},d&&m!==void 0&&(this.H.OSID=d,this.H.OAID=m),this.F=this.X,this.J=Bh(this,null,this.W),el(this)};function eu(o){if(Lh(o),o.I==3){var a=o.V++,d=ve(o.J);if(de(d,"SID",o.M),de(d,"RID",a),de(d,"TYPE","terminate"),Bs(o,d),a=new Ge(o,o.j,a),a.M=2,a.A=ai(ve(d)),d=!1,l.navigator&&l.navigator.sendBeacon)try{d=l.navigator.sendBeacon(a.A.toString(),"")}catch{}!d&&l.Image&&(new Image().src=a.A,d=!0),d||(a.g=$h(a.j,null),a.g.ea(a.A)),a.F=Date.now(),Et(a)}zh(o)}function Zo(o){o.g&&(nu(o),o.g.cancel(),o.g=null)}function Lh(o){Zo(o),o.v&&(l.clearTimeout(o.v),o.v=null),tl(o),o.h.cancel(),o.m&&(typeof o.m=="number"&&l.clearTimeout(o.m),o.m=null)}function el(o){if(!j(o.h)&&!o.m){o.m=!0;var a=o.Ea;U||p(),M||(U(),M=!0),y.add(a,o),o.D=0}}function m_(o,a){return z(o.h)>=o.h.j-(o.m?1:0)?!1:o.m?(o.i=a.G.concat(o.i),!0):o.I==1||o.I==2||o.D>=(o.Sa?0:o.Ta)?!1:(o.m=on(f(o.Ea,o,a),Fh(o,o.D)),o.D++,!0)}t.Ea=function(o){if(this.m)if(this.m=null,this.I==1){if(!o){this.V=Math.floor(Math.random()*1e5),o=this.V++;const R=new Ge(this,this.j,o);let b=this.o;if(this.U&&(b?(b=se(b),W(b,this.U)):b=this.U),this.u!==null||this.R||(R.J=b,b=null),this.S)e:{for(var a=0,d=0;d<this.i.length;d++){t:{var m=this.i[d];if("__data__"in m.map&&(m=m.map.__data__,typeof m=="string")){m=m.length;break t}m=void 0}if(m===void 0)break;if(a+=m,a>4096){a=d;break e}if(a===4096||d===this.i.length-1){a=d+1;break e}}a=1e3}else a=1e3;a=bh(this,R,a),d=ve(this.J),de(d,"RID",o),de(d,"CVER",22),this.G&&de(d,"X-HTTP-Session-Id",this.G),Bs(this,d),b&&(this.R?a="headers="+qe(Nh(b))+"&"+a:this.u&&Za(d,this.u,b)),X(this.h,R),this.Ra&&de(d,"TYPE","init"),this.S?(de(d,"$req",a),de(d,"SID","null"),R.U=!0,je(R,d,null)):je(R,d,a),this.I=2}}else this.I==3&&(o?jh(this,o):this.i.length==0||j(this.h)||jh(this))};function jh(o,a){var d;a?d=a.l:d=o.V++;const m=ve(o.J);de(m,"SID",o.M),de(m,"RID",d),de(m,"AID",o.K),Bs(o,m),o.u&&o.o&&Za(m,o.u,o.o),d=new Ge(o,o.j,d,o.D+1),o.u===null&&(d.J=o.o),a&&(o.i=a.G.concat(o.i)),a=bh(o,d,1e3),d.H=Math.round(o.va*.5)+Math.round(o.va*.5*Math.random()),X(o.h,d),je(d,m,a)}function Bs(o,a){o.H&&$(o.H,function(d,m){de(a,m,d)}),o.l&&$({},function(d,m){de(a,m,d)})}function bh(o,a,d){d=Math.min(o.i.length,d);const m=o.l?f(o.l.Ka,o.l,o):null;e:{var R=o.i;let ne=-1;for(;;){const Je=["count="+d];ne==-1?d>0?(ne=R[0].g,Je.push("ofs="+ne)):ne=0:Je.push("ofs="+ne);let ke=!0;for(let rt=0;rt<d;rt++){var b=R[rt].g;const Fn=R[rt].map;if(b-=ne,b<0)ne=Math.max(0,R[rt].g-100),ke=!1;else try{b="req"+b+"_"||"";try{var V=Fn instanceof Map?Fn:Object.entries(Fn);for(const[di,Ir]of V){let Tr=Ir;u(Ir)&&(Tr=Pt(Ir)),Je.push(b+di+"="+encodeURIComponent(Tr))}}catch(di){throw Je.push(b+"type="+encodeURIComponent("_badmap")),di}}catch{m&&m(Fn)}}if(ke){V=Je.join("&");break e}}V=void 0}return o=o.i.splice(0,d),a.G=o,V}function Dh(o){if(!o.g&&!o.v){o.Y=1;var a=o.Da;U||p(),M||(U(),M=!0),y.add(a,o),o.A=0}}function tu(o){return o.g||o.v||o.A>=3?!1:(o.Y++,o.v=on(f(o.Da,o),Fh(o,o.A)),o.A++,!0)}
vendor: 5,167 bytes, lines 1762-1766
1762t.Da=function(){if(this.v=null,Mh(this),this.aa&&!(this.P||this.g==null||this.T<=0)){var o=4*this.T;this.j.info("BP detection timer enabled: "+o),this.B=on(f(this.Wa,this),o)}},t.Wa=function(){this.B&&(this.B=null,this.j.info("BP detection timeout reached."),this.j.info("Buffering proxy detected and switch to long-polling!"),this.F=!1,this.P=!0,We(10),Zo(this),Mh(this))};function nu(o){o.B!=null&&(l.clearTimeout(o.B),o.B=null)}function Mh(o){o.g=new Ge(o,o.j,"rpc",o.Y),o.u===null&&(o.g.J=o.o),o.g.P=0;var a=ve(o.na);de(a,"RID","rpc"),de(a,"SID",o.M),de(a,"AID",o.K),de(a,"CI",o.F?"0":"1"),!o.F&&o.ia&&de(a,"TO",o.ia),de(a,"TYPE","xmlhttp"),Bs(o,a),o.u&&o.o&&Za(a,o.u,o.o),o.O&&(o.g.H=o.O);var d=o.g;o=o.ba,d.M=1,d.A=ai(ve(a)),d.u=null,d.R=!0,Wt(d,o)}t.Va=function(){this.C!=null&&(this.C=null,Zo(this),tu(this),We(19))};function tl(o){o.C!=null&&(l.clearTimeout(o.C),o.C=null)}function Uh(o,a){var d=null;if(o.g==a){tl(o),nu(o),o.g=null;var m=2}else if(H(o.h,a))d=a.G,ue(o.h,a),m=1;else return;if(o.I!=0){if(a.o)if(m==1){d=a.u?a.u.length:0,a=Date.now()-a.F;var R=o.D;m=Dn(),Se(m,new vn(m,d)),el(o)}else Dh(o);else if(R=a.m,R==3||R==0&&a.X>0||!(m==1&&m_(o,a)||m==2&&tu(o)))switch(d&&d.length>0&&(a=o.h,a.i=a.i.concat(d)),R){case 1:ci(o,5);break;case 4:ci(o,10);break;case 3:ci(o,6);break;default:ci(o,2)}}}function Fh(o,a){let d=o.Qa+Math.floor(Math.random()*o.Za);return o.isActive()||(d*=2),d*a}function ci(o,a){if(o.j.info("Error code "+a),a==2){var d=f(o.bb,o),m=o.Ua;const R=!m;m=new te(m||"//www.google.com/images/cleardot.gif"),l.location&&l.location.protocol=="http"||Ee(m,"https"),ai(m),R?u_(m.toString(),d):c_(m.toString(),d)}else We(2);o.I=0,o.l&&o.l.pa(a),zh(o),Lh(o)}t.bb=function(o){o?(this.j.info("Successfully pinged google.com"),We(2)):(this.j.info("Failed to ping google.com"),We(1))};function zh(o){if(o.I=0,o.ja=[],o.l){const a=fe(o.h);(a.length!=0||o.i.length!=0)&&(A(o.ja,a),A(o.ja,o.i),o.h.i.length=0,L(o.i),o.i.length=0),o.l.oa()}}function Bh(o,a,d){var m=d instanceof te?ve(d):new te(d);if(m.g!="")a&&(m.g=a+"."+m.g),nt(m,m.u);else{var R=l.location;m=R.protocol,a=a?a+"."+R.hostname:R.hostname,R=+R.port;const b=new te(null);m&&Ee(b,m),a&&(b.g=a),R&&nt(b,R),d&&(b.h=d),m=b}return d=o.G,a=o.wa,d&&a&&de(m,d,a),de(m,"VER",o.ka),Bs(o,m),m}function $h(o,a,d){if(a&&!o.L)throw Error("Can't create secondary domain capable XhrIo object.");return a=o.Aa&&!o.ma?new Be(new Ya({ab:d})):new Be(o.ma),a.Fa(o.L),a}t.isActive=function(){return!!this.l&&this.l.isActive(this)};function Vh(){}t=Vh.prototype,t.ra=function(){},t.qa=function(){},t.pa=function(){},t.oa=function(){},t.isActive=function(){return!0},t.Ka=function(){};function an(o,a){Z.call(this),this.g=new Oh(a),this.l=o,this.h=a&&a.messageUrlParams||null,o=a&&a.messageHeaders||null,a&&a.clientProtocolHeaderRequired&&(o?o["X-Client-Protocol"]="webchannel":o={"X-Client-Protocol":"webchannel"}),this.g.o=o,o=a&&a.initMessageHeaders||null,a&&a.messageContentType&&(o?o["X-WebChannel-Content-Type"]=a.messageContentType:o={"X-WebChannel-Content-Type":a.messageContentType}),a&&a.sa&&(o?o["X-WebChannel-Client-Profile"]=a.sa:o={"X-WebChannel-Client-Profile":a.sa}),this.g.U=o,(o=a&&a.Qb)&&!w(o)&&(this.g.u=o),this.A=a&&a.supportsCrossDomainXhr||!1,this.v=a&&a.sendRawJson||!1,(a=a&&a.httpSessionIdParam)&&!w(a)&&(this.g.G=a,o=this.h,o!==null&&a in o&&(o=this.h,a in o&&delete o[a])),this.j=new qi(this)}k(an,Z),an.prototype.m=function(){this.g.l=this.j,this.A&&(this.g.L=!0),this.g.connect(this.l,this.h||void 0)},an.prototype.close=function(){eu(this.g)},an.prototype.o=function(o){var a=this.g;if(typeof o=="string"){var d={};d.__data__=o,o=d}else this.v&&(d={},d.__data__=Pt(o),o=d);a.i.push(new Ja(a.Ya++,o)),a.I==3&&el(a)},an.prototype.N=function(){this.g.l=null,delete this.j,eu(this.g),delete this.g,an.Z.N.call(this)};function Hh(o){rn.call(this),o.__headers__&&(this.headers=o.__headers__,this.statusCode=o.__status__,delete o.__headers__,delete o.__status__);var a=o.__sm__;if(a){e:{for(const d in a){o=d;break e}o=void 0}(this.i=o)&&(o=this.i,a=a!==null&&o in a?a[o]:void 0),this.data=a}else this.data=o}k(Hh,rn);function Wh(){sn.call(this),this.status=1}k(Wh,sn);function qi(o){this.g=o}k(qi,Vh),qi.prototype.ra=function(){Se(this.g,"a")},qi.prototype.qa=function(o){Se(this.g,new Hh(o))},qi.prototype.pa=function(o){Se(this.g,new Wh)},qi.prototype.oa=function(){Se(this.g,"b")},an.prototype.send=an.prototype.o,an.prototype.open=an.prototype.m,an.prototype.close=an.prototype.close,_n.NO_ERROR=0,_n.TIMEOUT=8,_n.HTTP_ERROR=6,Q.COMPLETE="complete",Vt.EventType=pt,pt.OPEN="a",pt.CLOSE="b",pt.ERROR="c",pt.MESSAGE="d",Z.prototype.listen=Z.prototype.J,Be.prototype.listenOnce=Be.prototype.K,Be.prototype.getLastError=Be.prototype.Ha,Be.prototype.getLastErrorCode=Be.prototype.ya,Be.prototype.getStatus=Be.prototype.ca,Be.prototype.getResponseJson=Be.prototype.La,Be.prototype.getResponseText=Be.prototype.la,Be.prototype.send=Be.prototype.ea,Be.prototype.setWithCredentials=Be.prototype.Fa}).apply(typeof Il<"u"?Il:typeof self<"u"?self:typeof window<"u"?window:{});/** 1763 * @license 1764 * Copyright 2017 Google LLC 1765 * 1766 * Licensed under the Apache License, Version 2.0 (the "License");
1767 * you may not use this file except in compliance with the License. 1768 * You may obtain a copy of the License at 1769 * 1770 * http://www.apache.org/licenses/LICENSE-2.0 1771 * 1772 * Unless required by applicable law or agreed to in writing, software 1773 * distributed under the License is distributed on an "AS IS" BASIS, 1774 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1775 * See the License for the specific language governing permissions and 1776 * limitations under the License. 1777 */class Gt{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}}Gt.UNAUTHENTICATED=new Gt(null),Gt.GOOGLE_CREDENTIALS=new Gt("google-credentials-uid"),Gt.FIRST_PARTY=new Gt("first-party-uid"),Gt.MOCK_USER=new Gt("mock-user");/** 1778 * @license 1779 * Copyright 2017 Google LLC 1780 * 1781 * Licensed under the Apache License, Version 2.0 (the "License"); 1782 * you may not use this file except in compliance with the License. 1783 * You may obtain a copy of the License at 1784 * 1785 * http://www.apache.org/licenses/LICENSE-2.0 1786 * 1787 * Unless required by applicable law or agreed to in writing, software 1788 * distributed under the License is distributed on an "AS IS" BASIS, 1789 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1790 * See the License for the specific language governing permissions and 1791 * limitations under the License. 1792 */let Qa="12.10.0";function QI(t){Qa=t}/** 1793 * @license 1794 * Copyright 2020 Google LLC 1795 * 1796 * Licensed under the Apache License, Version 2.0 (the "License"); 1797 * you may not use this file except in compliance with the License. 1798 * You may obtain a copy of the License at 1799 * 1800 * http://www.apache.org/licenses/LICENSE-2.0 1801 * 1802 * Unless required by applicable law or agreed to in writing, software 1803 * distributed under the License is distributed on an "AS IS" BASIS, 1804 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1805 * See the License for the specific language governing permissions and 1806 * limitations under the License. 1807 *//** 1808 * @license 1809 * Copyright 2017 Google LLC 1810 * 1811 * Licensed under the Apache License, Version 2.0 (the "License"); 1812 * you may not use this file except in compliance with the License. 1813 * You may obtain a copy of the License at 1814 * 1815 * http://www.apache.org/licenses/LICENSE-2.0 1816 * 1817 * Unless required by applicable law or agreed to in writing, software 1818 * distributed under the License is distributed on an "AS IS" BASIS, 1819 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1820 * See the License for the specific language governing permissions and 1821 * limitations under the License. 1822 */const Ta=new Xd("@firebase/firestore");function xn(t,...e){if(Ta.logLevel<=_e.DEBUG){const n=e.map(Bv);Ta.debug(`Firestore (${Qa}): ${t}`,...n)}}function zv(t,...e){if(Ta.logLevel<=_e.ERROR){const n=e.map(Bv);Ta.error(`Firestore (${Qa}): ${t}`,...n)}}function Bv(t){if(typeof t=="string")return t;try{return function(n){return JSON.stringify(n)}(t)}catch{return t}}/** 1823 * @license 1824 * Copyright 2017 Google LLC 1825 * 1826 * Licensed under the Apache License, Version 2.0 (the "License"); 1827 * you may not use this file except in compliance with the License. 1828 * You may obtain a copy of the License at 1829 * 1830 * http://www.apache.org/licenses/LICENSE-2.0 1831 * 1832 * Unless required by applicable law or agreed to in writing, software 1833 * distributed under the License is distributed on an "AS IS" BASIS, 1834 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1835 * See the License for the specific language governing permissions and 1836 * limitations under the License. 1837 */function Ca(t,e,n){let r="Unexpected state";typeof e=="string"?r=e:n=e,$v(t,r,n)}function $v(t,e,n){let r=`FIRESTORE (${Qa}) INTERNAL ASSERTION FAILED: ${e} (ID: ${t.toString(16)})`;if(n!==void 0)try{r+=" CONTEXT: "+JSON.stringify(n)}catch{r+=" CONTEXT: "+n}throw zv(r),new Error(r)}function mo(t,e,n,r){let i="Unexpected state";typeof n=="string"?i=n:r=n,t||$v(e,i,r)}/** 1838 * @license 1839 * Copyright 2017 Google LLC 1840 * 1841 * Licensed under the Apache License, Version 2.0 (the "License");
1842 * you may not use this file except in compliance with the License. 1843 * You may obtain a copy of the License at 1844 * 1845 * http://www.apache.org/licenses/LICENSE-2.0 1846 * 1847 * Unless required by applicable law or agreed to in writing, software 1848 * distributed under the License is distributed on an "AS IS" BASIS, 1849 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1850 * See the License for the specific language governing permissions and 1851 * limitations under the License. 1852 */const me={CANCELLED:"cancelled",INVALID_ARGUMENT:"invalid-argument",FAILED_PRECONDITION:"failed-precondition"};class ge extends tr{constructor(e,n){super(e,n),this.code=e,this.message=n,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}/** 1853 * @license 1854 * Copyright 2017 Google LLC 1855 * 1856 * Licensed under the Apache License, Version 2.0 (the "License"); 1857 * you may not use this file except in compliance with the License. 1858 * You may obtain a copy of the License at 1859 * 1860 * http://www.apache.org/licenses/LICENSE-2.0 1861 * 1862 * Unless required by applicable law or agreed to in writing, software 1863 * distributed under the License is distributed on an "AS IS" BASIS, 1864 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1865 * See the License for the specific language governing permissions and 1866 * limitations under the License. 1867 */class go{constructor(){this.promise=new Promise((e,n)=>{this.resolve=e,this.reject=n})}}/** 1868 * @license 1869 * Copyright 2017 Google LLC 1870 * 1871 * Licensed under the Apache License, Version 2.0 (the "License"); 1872 * you may not use this file except in compliance with the License. 1873 * You may obtain a copy of the License at 1874 * 1875 * http://www.apache.org/licenses/LICENSE-2.0 1876 * 1877 * Unless required by applicable law or agreed to in writing, software 1878 * distributed under the License is distributed on an "AS IS" BASIS, 1879 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1880 * See the License for the specific language governing permissions and 1881 * limitations under the License. 1882 */class XI{constructor(e,n){this.user=n,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${e}`)}}class JI{getToken(){return Promise.resolve(null)}invalidateToken(){}start(e,n){e.enqueueRetryable(()=>n(Gt.UNAUTHENTICATED))}shutdown(){}}class YI{constructor(e){this.t=e,this.currentUser=Gt.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(e,n){mo(this.o===void 0,42304);let r=this.i;const i=c=>this.i!==r?(r=this.i,n(c)):Promise.resolve();let s=new go;this.o=()=>{this.i++,this.currentUser=this.u(),s.resolve(),s=new go,e.enqueueRetryable(()=>i(this.currentUser))};const l=()=>{const c=s;e.enqueueRetryable(async()=>{await c.promise,await i(this.currentUser)})},u=c=>{xn("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=c,this.o&&(this.auth.addAuthTokenListener(this.o),l())};this.t.onInit(c=>u(c)),setTimeout(()=>{if(!this.auth){const c=this.t.getImmediate({optional:!0});c?u(c):(xn("FirebaseAuthCredentialsProvider","Auth not yet detected"),s.resolve(),s=new go)}},0),l()}getToken(){const e=this.i,n=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(n).then(r=>this.i!==e?(xn("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):r?(mo(typeof r.accessToken=="string",31837,{l:r}),new XI(r.accessToken,this.currentUser)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.o&&this.auth.removeAuthTokenListener(this.o),this.o=void 0}u(){const e=this.auth&&this.auth.getUid();return mo(e===null||typeof e=="string",2055,{h:e}),new Gt(e)}}class ZI{constructor(e,n,r){this.P=e,this.T=n,this.I=r,this.type="FirstParty",this.user=Gt.FIRST_PARTY,this.R=new Map}A(){return this.I?this.I():null}get headers(){this.R.set("X-Goog-AuthUser",this.P);const e=this.A();return e&&this.R.set("Authorization",e),this.T&&this.R.set("X-Goog-Iam-Authorization-Token",this.T),this.R}}class e2{constructor(e,n,r){this.P=e,this.T=n,this.I=r}getToken(){return Promise.resolve(new ZI(this.P,this.T,this.I))}start(e,n){e.enqueueRetryable(()=>n(Gt.FIRST_PARTY))}shutdown(){}invalidateToken(){}}class zp{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 t2{constructor(e,n){this.V=n,this.forceRefresh=!1,this.appCheck=null,this.m=null,this.p=null,dn(e)&&e.settings.appCheckToken&&(this.p=e.settings.appCheckToken)}start(e,n){mo(this.o===void 0,3512);const r=s=>{s.error!=null&&xn("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${s.error.message}`);const l=s.token!==this.m;return this.m=s.token,xn("FirebaseAppCheckTokenProvider",`Received ${l?"new":"existing"} token.`),l?n(s.token):Promise.resolve()};this.o=s=>{e.enqueueRetryable(()=>r(s))};const i=s=>{xn("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=s,this.o&&this.appCheck.addTokenListener(this.o)};this.V.onInit(s=>i(s)),setTimeout(()=>{if(!this.appCheck){const s=this.V.getImmediate({optional:!0});s?i(s):xn("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}},0)}getToken(){if(this.p)return Promise.resolve(new zp(this.p));const e=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(e).then(n=>n?(mo(typeof n.token=="string",44558,{tokenResult:n}),this.m=n.token,new zp(n.token)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.o&&this.appCheck.removeTokenListener(this.o),this.o=void 0}}/** 1883 * @license 1884 * Copyright 2020 Google LLC 1885 * 1886 * Licensed under the Apache License, Version 2.0 (the "License");
1887 * you may not use this file except in compliance with the License. 1888 * You may obtain a copy of the License at 1889 * 1890 * http://www.apache.org/licenses/LICENSE-2.0 1891 * 1892 * Unless required by applicable law or agreed to in writing, software 1893 * distributed under the License is distributed on an "AS IS" BASIS, 1894 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1895 * See the License for the specific language governing permissions and 1896 * limitations under the License. 1897 */function n2(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}/** 1898 * @license 1899 * Copyright 2017 Google LLC 1900 * 1901 * Licensed under the Apache License, Version 2.0 (the "License"); 1902 * you may not use this file except in compliance with the License. 1903 * You may obtain a copy of the License at 1904 * 1905 * http://www.apache.org/licenses/LICENSE-2.0 1906 * 1907 * Unless required by applicable law or agreed to in writing, software 1908 * distributed under the License is distributed on an "AS IS" BASIS, 1909 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1910 * See the License for the specific language governing permissions and 1911 * limitations under the License. 1912 */class r2{static newId(){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=62*Math.floor(4.129032258064516);let r="";for(;r.length<20;){const i=n2(40);for(let s=0;s<i.length;++s)r.length<20&&i[s]<n&&(r+=e.charAt(i[s]%62))}return r}}function Zr(t,e){return t<e?-1:t>e?1:0}function i2(t,e){const n=Math.min(t.length,e.length);for(let r=0;r<n;r++){const i=t.charAt(r),s=e.charAt(r);if(i!==s)return Fu(i)===Fu(s)?Zr(i,s):Fu(i)?1:-1}return Zr(t.length,e.length)}const s2=55296,o2=57343;function Fu(t){const e=t.charCodeAt(0);return e>=s2&&e<=o2}/** 1913 * @license 1914 * Copyright 2017 Google LLC 1915 * 1916 * Licensed under the Apache License, Version 2.0 (the "License"); 1917 * you may not use this file except in compliance with the License. 1918 * You may obtain a copy of the License at 1919 * 1920 * http://www.apache.org/licenses/LICENSE-2.0 1921 * 1922 * Unless required by applicable law or agreed to in writing, software 1923 * distributed under the License is distributed on an "AS IS" BASIS, 1924 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1925 * See the License for the specific language governing permissions and 1926 * limitations under the License. 1927 */const Bp="__name__";class Hn{constructor(e,n,r){n===void 0?n=0:n>e.length&&Ca(637,{offset:n,range:e.length}),r===void 0?r=e.length-n:r>e.length-n&&Ca(1746,{length:r,range:e.length-n}),this.segments=e,this.offset=n,this.len=r}get length(){return this.len}isEqual(e){return Hn.comparator(this,e)===0}child(e){const n=this.segments.slice(this.offset,this.limit());return e instanceof Hn?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=Hn.compareSegments(e.get(i),n.get(i));if(s!==0)return s}return Zr(e.length,n.length)}static compareSegments(e,n){const r=Hn.isNumericId(e),i=Hn.isNumericId(n);return r&&!i?-1:!r&&i?1:r&&i?Hn.extractNumericId(e).compare(Hn.extractNumericId(n)):i2(e,n)}static isNumericId(e){return e.startsWith("__id")&&e.endsWith("__")}static extractNumericId(e){return mh.fromString(e.substring(4,e.length-2))}}class Cn extends Hn{construct(e,n,r){return new Cn(e,n,r)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}
1927toUriEncodedString(){return this.toArray().map(encodeURIComponent).join("/")}static fromString(...e){const n=[];for(const r of e){if(r.indexOf("//")>=0)throw new ge(me.INVALID_ARGUMENT,`Invalid segment (${r}). Paths must not contain // in them.`);n.push(...r.split("/").filter(i=>i.length>0))}return new Cn(n)}static emptyPath(){return new Cn([])}}const l2=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class gi extends Hn{construct(e,n,r){return new gi(e,n,r)}static isValidIdentifier(e){return l2.test(e)}canonicalString(){return this.toArray().map(e=>(e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),gi.isValidIdentifier(e)||(e="`"+e+"`"),e)).join(".")}toString(){return this.canonicalString()}isKeyField(){return this.length===1&&this.get(0)===Bp}static keyField(){return new gi([Bp])}static fromServerFormat(e){const n=[];let r="",i=0;const s=()=>{if(r.length===0)throw new ge(me.INVALID_ARGUMENT,`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);n.push(r),r=""};let l=!1;for(;i<e.length;){const u=e[i];if(u==="\\"){if(i+1===e.length)throw new ge(me.INVALID_ARGUMENT,"Path has trailing escape character: "+e);const c=e[i+1];if(c!=="\\"&&c!=="."&&c!=="`")throw new ge(me.INVALID_ARGUMENT,"Path has invalid escape sequence: "+e);r+=c,i+=2}else u==="`"?(l=!l,i++):u!=="."||l?(r+=u,i++):(s(),i++)}if(s(),l)throw new ge(me.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new gi(n)}static emptyPath(){return new gi([])}}/** 1928 * @license 1929 * Copyright 2017 Google LLC 1930 * 1931 * Licensed under the Apache License, Version 2.0 (the "License"); 1932 * you may not use this file except in compliance with the License. 1933 * You may obtain a copy of the License at 1934 * 1935 * http://www.apache.org/licenses/LICENSE-2.0 1936 * 1937 * Unless required by applicable law or agreed to in writing, software 1938 * distributed under the License is distributed on an "AS IS" BASIS, 1939 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1940 * See the License for the specific language governing permissions and 1941 * limitations under the License. 1942 */class Si{constructor(e){this.path=e}static fromPath(e){return new Si(Cn.fromString(e))}static fromName(e){return new Si(Cn.fromString(e).popFirst(5))}static empty(){return new Si(Cn.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&&Cn.comparator(this.path,e.path)===0}toString(){return this.path.toString()}static comparator(e,n){return Cn.comparator(e.path,n.path)}static isDocumentKey(e){return e.length%2==0}static fromSegments(e){return new Si(new Cn(e.slice()))}}function a2(t,e,n,r){if(e===!0&&r===!0)throw new ge(me.INVALID_ARGUMENT,`${t} and ${n} cannot be used together.`)}function u2(t){return typeof t=="object"&&t!==null&&(Object.getPrototypeOf(t)===Object.prototype||Object.getPrototypeOf(t)===null)}/** 1943 * @license 1944 * Copyright 2025 Google LLC 1945 * 1946 * Licensed under the Apache License, Version 2.0 (the "License"); 1947 * you may not use this file except in compliance with the License. 1948 * You may obtain a copy of the License at 1949 * 1950 * http://www.apache.org/licenses/LICENSE-2.0 1951 * 1952 * Unless required by applicable law or agreed to in writing, software 1953 * distributed under the License is distributed on an "AS IS" BASIS, 1954 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1955 * See the License for the specific language governing permissions and 1956 * limitations under the License. 1957 */function Qe(t,e){const n={typeString:t};return e&&(n.value=e),n}function Xo(t,e){if(!u2(t))throw new ge(me.INVALID_ARGUMENT,"JSON must be an object");let n;for(const r in e)if(e[r]){const i=e[r].typeString,s="value"in e[r]?{value:e[r].value}:void 0;if(!(r in t)){n=`JSON missing required field: '${r}'`;break}const l=t[r];if(i&&typeof l!==i){n=`JSON field '${r}' must be a ${i}.`;break}if(s!==void 0&&l!==s.value){n=`Expected '${r}' field to equal '${s.value}'`;break}}if(n)throw new ge(me.INVALID_ARGUMENT,n);return!0}/** 1958 * @license 1959 * Copyright 2017 Google LLC 1960 * 1961 * Licensed under the Apache License, Version 2.0 (the "License");
1962 * you may not use this file except in compliance with the License. 1963 * You may obtain a copy of the License at 1964 * 1965 * http://www.apache.org/licenses/LICENSE-2.0 1966 * 1967 * Unless required by applicable law or agreed to in writing, software 1968 * distributed under the License is distributed on an "AS IS" BASIS, 1969 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1970 * See the License for the specific language governing permissions and 1971 * limitations under the License. 1972 */const $p=-62135596800,Vp=1e6;class qn{static now(){return qn.fromMillis(Date.now())}static fromDate(e){return qn.fromMillis(e.getTime())}static fromMillis(e){const n=Math.floor(e/1e3),r=Math.floor((e-1e3*n)*Vp);return new qn(n,r)}constructor(e,n){if(this.seconds=e,this.nanoseconds=n,n<0)throw new ge(me.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(n>=1e9)throw new ge(me.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(e<$p)throw new ge(me.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e);if(e>=253402300800)throw new ge(me.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/Vp}_compareTo(e){return this.seconds===e.seconds?Zr(this.nanoseconds,e.nanoseconds):Zr(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{type:qn._jsonSchemaVersion,seconds:this.seconds,nanoseconds:this.nanoseconds}}static fromJSON(e){if(Xo(e,qn._jsonSchema))return new qn(e.seconds,e.nanoseconds)}valueOf(){const e=this.seconds-$p;return String(e).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}qn._jsonSchemaVersion="firestore/timestamp/1.0",qn._jsonSchema={type:Qe("string",qn._jsonSchemaVersion),seconds:Qe("number"),nanoseconds:Qe("number")};function c2(t){return t.name==="IndexedDbTransactionError"}/** 1973 * @license 1974 * Copyright 2023 Google LLC 1975 * 1976 * Licensed under the Apache License, Version 2.0 (the "License"); 1977 * you may not use this file except in compliance with the License. 1978 * You may obtain a copy of the License at 1979 * 1980 * http://www.apache.org/licenses/LICENSE-2.0 1981 * 1982 * Unless required by applicable law or agreed to in writing, software 1983 * distributed under the License is distributed on an "AS IS" BASIS, 1984 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1985 * See the License for the specific language governing permissions and 1986 * limitations under the License. 1987 */class d2 extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}/** 1988 * @license 1989 * Copyright 2020 Google LLC 1990 * 1991 * Licensed under the Apache License, Version 2.0 (the "License"); 1992 * you may not use this file except in compliance with the License. 1993 * You may obtain a copy of the License at 1994 * 1995 * http://www.apache.org/licenses/LICENSE-2.0 1996 * 1997 * Unless required by applicable law or agreed to in writing, software 1998 * distributed under the License is distributed on an "AS IS" BASIS, 1999 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2000 * See the License for the specific language governing permissions and 2001 * limitations under the License. 2002 */class Ui{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 d2("Invalid base64 string: "+s):s}}(e);return new Ui(n)}static fromUint8Array(e){const n=function(i){let s="";for(let l=0;l<i.length;++l)s+=String.fromCharCode(i[l]);return s}(e);return new Ui(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 Zr(this.binaryString,e.binaryString)}isEqual(e){return this.binaryString===e.binaryString}}Ui.EMPTY_BYTE_STRING=new Ui("");const Hp="(default)";class Na{constructor(e,n){this.projectId=e,this.database=n||Hp}static empty(){return new Na("","")}get isDefaultDatabase(){return this.database===Hp}isEqual(e){return e instanceof Na&&e.projectId===this.projectId&&e.database===this.database}}function h2(t,e){if(!Object.prototype.hasOwnProperty.apply(t.options,["projectId"]))throw new ge(me.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new Na(t.options.projectId,e)}/** 2003 * @license 2004 * Copyright 2017 Google LLC 2005 * 2006 * Licensed under the Apache License, Version 2.0 (the "License");
2007 * you may not use this file except in compliance with the License. 2008 * You may obtain a copy of the License at 2009 * 2010 * http://www.apache.org/licenses/LICENSE-2.0 2011 * 2012 * Unless required by applicable law or agreed to in writing, software 2013 * distributed under the License is distributed on an "AS IS" BASIS, 2014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2015 * See the License for the specific language governing permissions and 2016 * limitations under the License. 2017 */class f2{constructor(e,n=null,r=[],i=[],s=null,l="F",u=null,c=null){this.path=e,this.collectionGroup=n,this.explicitOrderBy=r,this.filters=i,this.limit=s,this.limitType=l,this.startAt=u,this.endAt=c,this.Ie=null,this.Ee=null,this.Re=null,this.startAt,this.endAt}}function p2(t){return new f2(t)}/** 2018 * @license 2019 * Copyright 2017 Google LLC 2020 * 2021 * Licensed under the Apache License, Version 2.0 (the "License"); 2022 * you may not use this file except in compliance with the License. 2023 * You may obtain a copy of the License at 2024 * 2025 * http://www.apache.org/licenses/LICENSE-2.0 2026 * 2027 * Unless required by applicable law or agreed to in writing, software 2028 * distributed under the License is distributed on an "AS IS" BASIS, 2029 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2030 * See the License for the specific language governing permissions and 2031 * limitations under the License. 2032 */var Wp,ce;(ce=Wp||(Wp={}))[ce.OK=0]="OK",ce[ce.CANCELLED=1]="CANCELLED",ce[ce.UNKNOWN=2]="UNKNOWN",ce[ce.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",ce[ce.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",ce[ce.NOT_FOUND=5]="NOT_FOUND",ce[ce.ALREADY_EXISTS=6]="ALREADY_EXISTS",ce[ce.PERMISSION_DENIED=7]="PERMISSION_DENIED",ce[ce.UNAUTHENTICATED=16]="UNAUTHENTICATED",ce[ce.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",ce[ce.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",ce[ce.ABORTED=10]="ABORTED",ce[ce.OUT_OF_RANGE=11]="OUT_OF_RANGE",ce[ce.UNIMPLEMENTED=12]="UNIMPLEMENTED",ce[ce.INTERNAL=13]="INTERNAL",ce[ce.UNAVAILABLE=14]="UNAVAILABLE",ce[ce.DATA_LOSS=15]="DATA_LOSS";/** 2033 * @license 2034 * Copyright 2022 Google LLC 2035 * 2036 * Licensed under the Apache License, Version 2.0 (the "License"); 2037 * you may not use this file except in compliance with the License. 2038 * You may obtain a copy of the License at 2039 * 2040 * http://www.apache.org/licenses/LICENSE-2.0 2041 * 2042 * Unless required by applicable law or agreed to in writing, software 2043 * distributed under the License is distributed on an "AS IS" BASIS, 2044 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2045 * See the License for the specific language governing permissions and 2046 * limitations under the License. 2047 */new mh([4294967295,4294967295],0);/** 2048 * @license 2049 * Copyright 2018 Google LLC 2050 * 2051 * Licensed under the Apache License, Version 2.0 (the "License"); 2052 * you may not use this file except in compliance with the License. 2053 * You may obtain a copy of the License at 2054 * 2055 * http://www.apache.org/licenses/LICENSE-2.0 2056 * 2057 * Unless required by applicable law or agreed to in writing, software 2058 * distributed under the License is distributed on an "AS IS" BASIS, 2059 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2060 * See the License for the specific language governing permissions and 2061 * limitations under the License. 2062 */const m2=41943040;/** 2063 * @license 2064 * Copyright 2020 Google LLC 2065 * 2066 * Licensed under the Apache License, Version 2.0 (the "License"); 2067 * you may not use this file except in compliance with the License. 2068 * You may obtain a copy of the License at 2069 * 2070 * http://www.apache.org/licenses/LICENSE-2.0 2071 * 2072 * Unless required by applicable law or agreed to in writing, software 2073 * distributed under the License is distributed on an "AS IS" BASIS, 2074 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2075 * See the License for the specific language governing permissions and 2076 * limitations under the License. 2077 */const g2=1048576;function zu(){return typeof document<"u"?document:null}class y2{constructor(e,n,r=1e3,i=1.5,s=6e4){this.Ci=e,this.timerId=n,this.R_=r,this.A_=i,this.V_=s,this.d_=0,this.m_=null,this.f_=Date.now(),this.reset()}reset(){this.d_=0}g_(){this.d_=this.V_}p_(e){this.cancel();const n=Math.floor(this.d_+this.y_()),r=Math.max(0,Date.now()-this.f_),i=Math.max(0,n-r);i>0&&xn("ExponentialBackoff",`Backing off for ${i} ms (base delay: ${this.d_}
2077 ms, delay with jitter: ${n} ms, last attempt: ${r} ms ago)`),this.m_=this.Ci.enqueueAfterDelay(this.timerId,i,()=>(this.f_=Date.now(),e())),this.d_*=this.A_,this.d_<this.R_&&(this.d_=this.R_),this.d_>this.V_&&(this.d_=this.V_)}w_(){this.m_!==null&&(this.m_.skipDelay(),this.m_=null)}cancel(){this.m_!==null&&(this.m_.cancel(),this.m_=null)}y_(){return(Math.random()-.5)*this.d_}}/** 2078 * @license 2079 * Copyright 2017 Google LLC 2080 * 2081 * Licensed under the Apache License, Version 2.0 (the "License"); 2082 * you may not use this file except in compliance with the License. 2083 * You may obtain a copy of the License at 2084 * 2085 * http://www.apache.org/licenses/LICENSE-2.0 2086 * 2087 * Unless required by applicable law or agreed to in writing, software 2088 * distributed under the License is distributed on an "AS IS" BASIS, 2089 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2090 * See the License for the specific language governing permissions and 2091 * limitations under the License. 2092 */class gh{constructor(e,n,r,i,s){this.asyncQueue=e,this.timerId=n,this.targetTimeMs=r,this.op=i,this.removalCallback=s,this.deferred=new go,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(l=>{})}get promise(){return this.deferred.promise}static createAndSchedule(e,n,r,i,s){const l=Date.now()+r,u=new gh(e,n,l,i,s);return u.start(r),u}start(e){this.timerHandle=setTimeout(()=>this.handleDelayElapsed(),e)}skipDelay(){return this.handleDelayElapsed()}cancel(e){this.timerHandle!==null&&(this.clearTimeout(),this.deferred.reject(new ge(me.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)}}var qp,Gp;(Gp=qp||(qp={})).Ma="default",Gp.Cache="cache";/** 2093 * @license 2094 * Copyright 2023 Google LLC 2095 * 2096 * Licensed under the Apache License, Version 2.0 (the "License"); 2097 * you may not use this file except in compliance with the License. 2098 * You may obtain a copy of the License at 2099 * 2100 * http://www.apache.org/licenses/LICENSE-2.0 2101 * 2102 * Unless required by applicable law or agreed to in writing, software 2103 * distributed under the License is distributed on an "AS IS" BASIS, 2104 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2105 * See the License for the specific language governing permissions and 2106 * limitations under the License. 2107 */function v2(t){const e={};return t.timeoutSeconds!==void 0&&(e.timeoutSeconds=t.timeoutSeconds),e}/** 2108 * @license 2109 * Copyright 2020 Google LLC 2110 * 2111 * Licensed under the Apache License, Version 2.0 (the "License"); 2112 * you may not use this file except in compliance with the License. 2113 * You may obtain a copy of the License at 2114 * 2115 * http://www.apache.org/licenses/LICENSE-2.0 2116 * 2117 * Unless required by applicable law or agreed to in writing, software 2118 * distributed under the License is distributed on an "AS IS" BASIS, 2119 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2120 * See the License for the specific language governing permissions and 2121 * limitations under the License. 2122 */const _2="ComponentProvider",Kp=new Map;/** 2123 * @license 2124 * Copyright 2020 Google LLC 2125 * 2126 * Licensed under the Apache License, Version 2.0 (the "License"); 2127 * you may not use this file except in compliance with the License. 2128 * You may obtain a copy of the License at 2129 * 2130 * http://www.apache.org/licenses/LICENSE-2.0 2131 * 2132 * Unless required by applicable law or agreed to in writing, software 2133 * distributed under the License is distributed on an "AS IS" BASIS, 2134 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2135 * See the License for the specific language governing permissions and 2136 * limitations under the License. 2137 */const w2="firestore.googleapis.com",Qp=!0;class Xp{constructor(e){if(e.host===void 0){if(e.ssl!==void 0)throw new ge(me.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host=w2,this.ssl=Qp}else this.host=e.host,this.ssl=e.ssl??Qp;if(this.isUsingEmulator=e.emulatorOptions!==void 0,this.credentials=e.credentials,this.ignoreUndefinedProperties=!!e.ignoreUndefinedProperties,this.localCache=e.localCache,e.cacheSizeBytes===void 0)this.cacheSizeBytes=m2;
2137else{if(e.cacheSizeBytes!==-1&&e.cacheSizeBytes<g2)throw new ge(me.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}a2("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=v2(e.experimentalLongPollingOptions??{}),function(r){if(r.timeoutSeconds!==void 0){if(isNaN(r.timeoutSeconds))throw new ge(me.INVALID_ARGUMENT,`invalid long polling timeout: ${r.timeoutSeconds} (must not be NaN)`);if(r.timeoutSeconds<5)throw new ge(me.INVALID_ARGUMENT,`invalid long polling timeout: ${r.timeoutSeconds} (minimum allowed value is 5)`);if(r.timeoutSeconds>30)throw new ge(me.INVALID_ARGUMENT,`invalid long polling timeout: ${r.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 S2{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 Xp({}),this._settingsFrozen=!1,this._emulatorOptions={},this._terminateTask="notTerminated"}get app(){if(!this._app)throw new ge(me.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return this._terminateTask!=="notTerminated"}_setSettings(e){if(this._settingsFrozen)throw new ge(me.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 Xp(e),this._emulatorOptions=e.emulatorOptions||{},e.credentials!==void 0&&(this._authCredentials=function(r){if(!r)return new JI;switch(r.type){case"firstParty":return new e2(r.sessionIndex||"0",r.iamToken||null,r.authTokenFactory||null);case"provider":return r.client;default:throw new ge(me.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}}(e.credentials))}_getSettings(){return this._settings}_getEmulatorOptions(){return this._emulatorOptions}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return this._terminateTask==="notTerminated"&&(this._terminateTask=this._terminate()),this._terminateTask}async _restart(){this._terminateTask==="notTerminated"?await this._terminate():this._terminateTask="notTerminated"}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return function(n){const r=Kp.get(n);r&&(xn(_2,"Removing Datastore"),Kp.delete(n),r.terminate())}(this),Promise.resolve()}}/** 2138 * @license 2139 * Copyright 2020 Google LLC 2140 * 2141 * Licensed under the Apache License, Version 2.0 (the "License"); 2142 * you may not use this file except in compliance with the License. 2143 * You may obtain a copy of the License at 2144 * 2145 * http://www.apache.org/licenses/LICENSE-2.0 2146 * 2147 * Unless required by applicable law or agreed to in writing, software 2148 * distributed under the License is distributed on an "AS IS" BASIS, 2149 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2150 * See the License for the specific language governing permissions and 2151 * limitations under the License. 2152 */class yh{constructor(e,n,r){this.converter=n,this._query=r,this.type="query",this.firestore=e}withConverter(e){return new yh(this.firestore,e,this._query)}}class Qn{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()}
2152get path(){return this._key.path.canonicalString()}get parent(){return new vh(this.firestore,this.converter,this._key.path.popLast())}withConverter(e){return new Qn(this.firestore,e,this._key)}toJSON(){return{type:Qn._jsonSchemaVersion,referencePath:this._key.toString()}}static fromJSON(e,n,r){if(Xo(n,Qn._jsonSchema))return new Qn(e,r||null,new Si(Cn.fromString(n.referencePath)))}}Qn._jsonSchemaVersion="firestore/documentReference/1.0",Qn._jsonSchema={type:Qe("string",Qn._jsonSchemaVersion),referencePath:Qe("string")};class vh extends yh{constructor(e,n,r){super(e,n,p2(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 Qn(this.firestore,null,new Si(e))}withConverter(e){return new vh(this.firestore,e,this._path)}}/** 2153 * @license 2154 * Copyright 2020 Google LLC 2155 * 2156 * Licensed under the Apache License, Version 2.0 (the "License"); 2157 * you may not use this file except in compliance with the License. 2158 * You may obtain a copy of the License at 2159 * 2160 * http://www.apache.org/licenses/LICENSE-2.0 2161 * 2162 * Unless required by applicable law or agreed to in writing, software 2163 * distributed under the License is distributed on an "AS IS" BASIS, 2164 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2165 * See the License for the specific language governing permissions and 2166 * limitations under the License. 2167 */const Jp="AsyncQueue";class Yp{constructor(e=Promise.resolve()){this.Yu=[],this.ec=!1,this.tc=[],this.nc=null,this.rc=!1,this.sc=!1,this.oc=[],this.M_=new y2(this,"async_queue_retry"),this._c=()=>{const r=zu();r&&xn(Jp,"Visibility state changed to "+r.visibilityState),this.M_.w_()},this.ac=e;const n=zu();n&&typeof n.addEventListener=="function"&&n.addEventListener("visibilitychange",this._c)}get isShuttingDown(){return this.ec}enqueueAndForget(e){this.enqueue(e)}enqueueAndForgetEvenWhileRestricted(e){this.uc(),this.cc(e)}enterRestrictedMode(e){if(!this.ec){this.ec=!0,this.sc=e||!1;const n=zu();n&&typeof n.removeEventListener=="function"&&n.removeEventListener("visibilitychange",this._c)}}enqueue(e){if(this.uc(),this.ec)return new Promise(()=>{});const n=new go;return this.cc(()=>this.ec&&this.sc?Promise.resolve():(e().then(n.resolve,n.reject),n.promise)).then(()=>n.promise)}enqueueRetryable(e){this.enqueueAndForget(()=>(this.Yu.push(e),this.lc()))}async lc(){if(this.Yu.length!==0){try{await this.Yu[0](),this.Yu.shift(),this.M_.reset()}catch(e){if(!c2(e))throw e;xn(Jp,"Operation failed with retryable error: "+e)}this.Yu.length>0&&this.M_.p_(()=>this.lc())}}cc(e){const n=this.ac.then(()=>(this.rc=!0,e().catch(r=>{throw this.nc=r,this.rc=!1,zv("INTERNAL UNHANDLED ERROR: ",Zp(r)),r}).then(r=>(this.rc=!1,r))));return this.ac=n,n}enqueueAfterDelay(e,n,r){this.uc(),this.oc.indexOf(e)>-1&&(n=0);const i=gh.createAndSchedule(this,e,n,r,s=>this.hc(s));return this.tc.push(i),i}uc(){this.nc&&Ca(47125,{Pc:Zp(this.nc)})}verifyOperationInProgress(){}async Tc(){let e;do e=this.ac,await e;while(e!==this.ac)}Ic(e){for(const n of this.tc)if(n.timerId===e)return!0;return!1}Ec(e){return this.Tc().then(()=>{this.tc.sort((n,r)=>n.targetTimeMs-r.targetTimeMs);for(const n of this.tc)if(n.skipDelay(),e!=="all"&&n.timerId===e)break;return this.Tc()})}Rc(e){this.oc.push(e)}hc(e){const n=this.tc.indexOf(e);this.tc.splice(n,1)}}function Zp(t){let e=t.message||"";return t.stack&&(e=t.stack.includes(t.message)?t.stack:t.message+` 2168`+t.stack),e}class E2 extends S2{constructor(e,n,r,i){super(e,n,r,i),this.type="firestore",this._queue=new Yp,this._persistenceKey=(i==null?void 0:i.name)||"[DEFAULT]"}async _terminate(){if(this._firestoreClient){const e=this._firestoreClient.terminate();this._queue=new Yp(e),this._firestoreClient=void 0,await e}}}/** 2169 * @license 2170 * Copyright 2020 Google LLC 2171 * 2172 * Licensed under the Apache License, Version 2.0 (the "License"); 2173 * you may not use this file except in compliance with the License. 2174 * You may obtain a copy of the License at 2175 * 2176 * http://www.apache.org/licenses/LICENSE-2.0 2177 * 2178 * Unless required by applicable law or agreed to in writing, softw
2178are 2179 * distributed under the License is distributed on an "AS IS" BASIS, 2180 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2181 * See the License for the specific language governing permissions and 2182 * limitations under the License. 2183 */class sr{constructor(e){this._byteString=e}static fromBase64String(e){try{return new sr(Ui.fromBase64String(e))}catch(n){throw new ge(me.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+n)}}static fromUint8Array(e){return new sr(Ui.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)}toJSON(){return{type:sr._jsonSchemaVersion,bytes:this.toBase64()}}static fromJSON(e){if(Xo(e,sr._jsonSchema))return sr.fromBase64String(e.bytes)}}sr._jsonSchemaVersion="firestore/bytes/1.0",sr._jsonSchema={type:Qe("string",sr._jsonSchemaVersion),bytes:Qe("string")};/** 2184 * @license 2185 * Copyright 2020 Google LLC 2186 * 2187 * Licensed under the Apache License, Version 2.0 (the "License"); 2188 * you may not use this file except in compliance with the License. 2189 * You may obtain a copy of the License at 2190 * 2191 * http://www.apache.org/licenses/LICENSE-2.0 2192 * 2193 * Unless required by applicable law or agreed to in writing, software 2194 * distributed under the License is distributed on an "AS IS" BASIS, 2195 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2196 * See the License for the specific language governing permissions and 2197 * limitations under the License. 2198 */class Vv{constructor(...e){for(let n=0;n<e.length;++n)if(e[n].length===0)throw new ge(me.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new gi(e)}isEqual(e){return this._internalPath.isEqual(e._internalPath)}}/** 2199 * @license 2200 * Copyright 2017 Google LLC 2201 * 2202 * Licensed under the Apache License, Version 2.0 (the "License"); 2203 * you may not use this file except in compliance with the License. 2204 * You may obtain a copy of the License at 2205 * 2206 * http://www.apache.org/licenses/LICENSE-2.0 2207 * 2208 * Unless required by applicable law or agreed to in writing, software 2209 * distributed under the License is distributed on an "AS IS" BASIS, 2210 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2211 * See the License for the specific language governing permissions and 2212 * limitations under the License. 2213 */class Ni{constructor(e,n){if(!isFinite(e)||e<-90||e>90)throw new ge(me.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(n)||n<-180||n>180)throw new ge(me.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}_compareTo(e){return Zr(this._lat,e._lat)||Zr(this._long,e._long)}toJSON(){return{latitude:this._lat,longitude:this._long,type:Ni._jsonSchemaVersion}}static fromJSON(e){if(Xo(e,Ni._jsonSchema))return new Ni(e.latitude,e.longitude)}}Ni._jsonSchemaVersion="firestore/geoPoint/1.0",Ni._jsonSchema={type:Qe("string",Ni._jsonSchemaVersion),latitude:Qe("number"),longitude:Qe("number")};/** 2214 * @license 2215 * Copyright 2024 Google LLC 2216 * 2217 * Licensed under the Apache License, Version 2.0 (the "License"); 2218 * you may not use this file except in compliance with the License. 2219 * You may obtain a copy of the License at 2220 * 2221 * http://www.apache.org/licenses/LICENSE-2.0 2222 * 2223 * Unless required by applicable law or agreed to in writing, software 2224 * distributed under the License is distributed on an "AS IS" BASIS, 2225 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2226 * See the License for the specific language governing permissions and 2227 * limitations under the License. 2228 */class xi{constructor(e){this._values=(e||[]).map(n=>n)}toArray(){return this._values.map(e=>e)}isEqual(e){return function(r,i){if(r.length!==i.length)return!1;for(let s=0;s<r.length;++s)if(r[s]!==i[s])return!1;return!0}(this._values,e._values)}toJSON(){return{type:xi._jsonSchemaVersion,vectorValues:this._values}}
2228static fromJSON(e){if(Xo(e,xi._jsonSchema)){if(Array.isArray(e.vectorValues)&&e.vectorValues.every(n=>typeof n=="number"))return new xi(e.vectorValues);throw new ge(me.INVALID_ARGUMENT,"Expected 'vectorValues' field to be a number array")}}}xi._jsonSchemaVersion="firestore/vectorValue/1.0",xi._jsonSchema={type:Qe("string",xi._jsonSchemaVersion),vectorValues:Qe("object")};function Hv(t,e,n){if((e=en(e))instanceof Vv)return e._internalPath;if(typeof e=="string")return I2(t,e);throw Wc("Field path arguments must be of type string or ",t)}const k2=new RegExp("[~\\*/\\[\\]]");function I2(t,e,n){if(e.search(k2)>=0)throw Wc(`Invalid field path (${e}). Paths must not contain '~', '*', '/', '[', or ']'`,t);try{return new Vv(...e.split("."))._internalPath}catch{throw Wc(`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,t)}}function Wc(t,e,n,r,i){let s=`Function ${e}() called with invalid data`;s+=". ";let l="";return new ge(me.INVALID_ARGUMENT,s+t+l)}const em="@firebase/firestore",tm="4.12.0";/** 2229 * @license 2230 * Copyright 2020 Google LLC 2231 * 2232 * Licensed under the Apache License, Version 2.0 (the "License"); 2233 * you may not use this file except in compliance with the License. 2234 * You may obtain a copy of the License at 2235 * 2236 * http://www.apache.org/licenses/LICENSE-2.0 2237 * 2238 * Unless required by applicable law or agreed to in writing, software 2239 * distributed under the License is distributed on an "AS IS" BASIS, 2240 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2241 * See the License for the specific language governing permissions and 2242 * limitations under the License. 2243 */class Wv{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 Qn(this._firestore,this._converter,this._key)}exists(){return this._document!==null}data(){if(this._document){if(this._converter){const e=new T2(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}}_fieldsProto(){var e;return((e=this._document)==null?void 0:e.data.clone().value.mapValue.fields)??void 0}get(e){if(this._document){const n=this._document.data.field(Hv("DocumentSnapshot.get",e));if(n!==null)return this._userDataWriter.convertValue(n)}}}class T2 extends Wv{data(){return super.data()}}class Tl{constructor(e,n){this.hasPendingWrites=e,this.fromCache=n}isEqual(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}class ys extends Wv{constructor(e,n,r,i,s,l){super(e,n,r,i,l),this._firestore=e,this._firestoreImpl=e,this.metadata=s}exists(){return super.exists()}data(e={}){if(this._document){if(this._converter){const n=new Vl(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(Hv("DocumentSnapshot.get",e));if(r!==null)return this._userDataWriter.convertValue(r,n.serverTimestamps)}}toJSON(){if(this.metadata.hasPendingWrites)throw new ge(me.FAILED_PRECONDITION,"DocumentSnapshot.toJSON() attempted to serialize a document with pending writes. Await waitForPendingWrites() before invoking toJSON().");const e=this._document,n={};return n.type=ys._jsonSchemaVersion,n.bundle="",n.bundleSource="DocumentSnapshot",n.bundleName=this._key.toString(),!e||!e.isValidDocument()||!e.isFoundDocument()?n:(this._userDataWriter.convertObjectMap(e.data.value.mapValue.fields,"previous"),n.bundle=(this._firestore,this.ref.path,"NOT SUPPORTED"),n)}}ys._jsonSchemaVersion="firestore/documentSnapshot/1.0",ys._jsonSchema={type:Qe("string",ys._jsonSchemaVersion),bundleSource:Qe("string","DocumentSnapshot"),bundleName:Qe("string"),bundle:Qe("string")};class Vl extends ys{data(e={}){return super.data(e)}}class yo{constructor(e,n,r,i){this._firestore=e,this._userDataWriter=n,this._snapshot=i,this.metadata=new Tl(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 Vl(this._firestore,this._userDataWriter,r.key,r,new Tl(this._snapshot.mutatedKeys.has(r.key),this._snapshot.fromCache),this.query.converter))})}
2243docChanges(e={}){const n=!!e.includeMetadataChanges;if(n&&this._snapshot.excludesMetadataChanges)throw new ge(me.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 l=0;return i._snapshot.docChanges.map(u=>{const c=new Vl(i._firestore,i._userDataWriter,u.doc.key,u.doc,new Tl(i._snapshot.mutatedKeys.has(u.doc.key),i._snapshot.fromCache),i.query.converter);return u.doc,{type:"added",doc:c,oldIndex:-1,newIndex:l++}})}{let l=i._snapshot.oldDocs;return i._snapshot.docChanges.filter(u=>s||u.type!==3).map(u=>{const c=new Vl(i._firestore,i._userDataWriter,u.doc.key,u.doc,new Tl(i._snapshot.mutatedKeys.has(u.doc.key),i._snapshot.fromCache),i.query.converter);let f=-1,_=-1;return u.type!==0&&(f=l.indexOf(u.doc.key),l=l.delete(u.doc.key)),u.type!==1&&(l=l.add(u.doc),_=l.indexOf(u.doc.key)),{type:C2(u.type),doc:c,oldIndex:f,newIndex:_}})}}(this,n),this._cachedChangesIncludeMetadataChanges=n),this._cachedChanges}toJSON(){if(this.metadata.hasPendingWrites)throw new ge(me.FAILED_PRECONDITION,"QuerySnapshot.toJSON() attempted to serialize a document with pending writes. Await waitForPendingWrites() before invoking toJSON().");const e={};e.type=yo._jsonSchemaVersion,e.bundleSource="QuerySnapshot",e.bundleName=r2.newId(),this._firestore._databaseId.database,this._firestore._databaseId.projectId;const n=[],r=[],i=[];return this.docs.forEach(s=>{s._document!==null&&(n.push(s._document),r.push(this._userDataWriter.convertObjectMap(s._document.data.value.mapValue.fields,"previous")),i.push(s.ref.path))}),e.bundle=(this._firestore,this.query._query,e.bundleName,"NOT SUPPORTED"),e}}function C2(t){switch(t){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return Ca(61501,{type:t})}}/** 2244 * @license 2245 * Copyright 2022 Google LLC 2246 * 2247 * Licensed under the Apache License, Version 2.0 (the "License"); 2248 * you may not use this file except in compliance with the License. 2249 * You may obtain a copy of the License at 2250 * 2251 * http://www.apache.org/licenses/LICENSE-2.0 2252 * 2253 * Unless required by applicable law or agreed to in writing, software 2254 * distributed under the License is distributed on an "AS IS" BASIS, 2255 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2256 * See the License for the specific language governing permissions and 2257 * limitations under the License. 2258 */yo._jsonSchemaVersion="firestore/querySnapshot/1.0",yo._jsonSchema={type:Qe("string",yo._jsonSchemaVersion),bundleSource:Qe("string","QuerySnapshot"),bundleName:Qe("string"),bundle:Qe("string")};(function(e,n=!0){QI(Bi),bi(new Yr("firestore",(r,{instanceIdentifier:i,options:s})=>{const l=r.getProvider("app").getImmediate(),u=new E2(new YI(r.getProvider("auth-internal")),new t2(l,r.getProvider("app-check-internal")),h2(l,i),l);return s={useFetchStreams:n,...s},u._setSettings(s),u},"PUBLIC").setMultipleInstances(!0)),Yn(em,tm,e),Yn(em,tm,"esm2020")})();const qv=new Set(["near.tl","www.near.tl"]);function N2(){return typeof window>"u"?!1:qv.has(window.location.hostname)}function x2(){return typeof window>"u"?"/__/firebase/init.json":N2()?"https://app.near.tl/__/firebase/init.json":"/__/firebase/init.json"}function Ns(t){const e=(t??"").trim().replace(/\/$/,"");if(e)return e;if(typeof window>"u")return"";const{protocol:n,hostname:r}=window.location;return qv.has(r)?`${n}//app.near.tl`:window.location.origin}let Bu=null,$u=null;async function A2(){const t=x2(),e=t.startsWith("http"),n=await fetch(t,{credentials:e?"omit":"same-origin"});if(!n.ok)throw new Error("Failed to load Firebase config from Hosting");const r=await n.json();if(!r.apiKey||!r.projectId)throw new Error("Firebase config is missing required fields");return r}async function _h(){return Bu||(Bu=(async()=>{if(TS().length>0)return Zd();const t=await A2();return zy(t)})()),Bu}async function Xa(){return $u||($u=_h().then(t=>GI(t))),$u}async function R2(t){const e=await Xa();return bk(e,t)}async function xa(){const t=await Xa(),e=new ir;await nI(t,e)}async function P2(){const t=await Xa();await Dk(t)}async function vo(){return(await Xa()).currentUser}function O2(t,e){var r,i;const n=(i=(r=t.claims.firebase)==null?void 0:r.identities)==null?void 0:i["google.com"];if(Array.isArray(n)){const s=n.find(l=>typeof l=="string"&&l.trim().length>0);if(typeof s=="string")return s.trim()}return e}async function qc(t){const e=await t.getIdTokenResult();return O2(e,t.uid)}async function L2(t,e){const n=await _h(),r=uv(n),i=`repost-images/${t}/${Date.now()}-${e.name}`,s=av(r,i);return await ov(s,e),lv(s)}async function j2(t,e){const n=await _h(),r=uv(n),i=`profile-images/${t}/${Date.now()}-${e.name}`,s=av(r,i);return await ov(s,e),lv(s)}const b2=2e3,nm=2;function D2({open:t,onClose:e,apiBase:n,user:r,currentProfile:i,onSaved:s}){const[l,u]=N.useState(""),[c,f]=N.useState(""),[_,k]=N.useState(""),[E,L]=N.useState(null),[A,P]=N.useState(null),[D,I]=N.useState(!1),[v,C]=N.useState(null),O=N.useRef(null),U=Ps(t,e);N.useEffect(()=>{t&&(u((i==null?void 0:i.name)||r.displayName||""),f(typeof(i==null?void 0:i.working_on)=="string"?i.working_on:""),k((i==null?void 0:i.picture)||r.photoURL||""),L(null),P(null),C(null))},[t,i,r]),N.useEffect(()=>{if(!E)return;const g=URL.createObjectURL(E);return P(g),()=>URL.revokeObjectURL(g)},[E]);const M=g=>{if(g){if(!g.type.startsWith("image/")){C("Please select an image file.");return}if(g.size>nm*1024*1024){C(`Image must be under ${nm} MB.`);return}C(null),L(g)}},y=async()=>{const g=l.trim();if(!g){C("Name cannot be empty.");return}I(!0),C(null);try{let S=_;E&&(S=await j2(r.uid,E));const T=await r.getIdToken(),x=await fetch(`${n}/api/preferences`,{method:"PUT",headers:{Authorization:`Bearer ${T}`,"Content-Type":"application/json"},body:JSON.stringify({profile:{name:g,picture:S,working_on:c.trim()}})});if(!x.ok){const ee=await x.json().catch(()=>({}));throw new Error(ee.error||x.statusText)}const w=await x.json();s(w.profile??{name:g,picture:S,working_on:c.trim()}),e()}catch(S){C(S instanceof Error?S.message:String(S))}finally{I(!1)}};if(!U.mounted)return null;const p=A||_;return h.jsx("div",{ref:U.ref,className:`tl-modal${U.open?" tl-modal--open":""}`,role:"dialog","aria-modal":"true","aria-labelledby":"tl-edit-profile-title",children:h.jsxs("div",{className:"tl-modal__sheet tl-edit-profile__sheet",children:[h.jsxs("div",{className:"tl-modal__top",children:[h.jsx("div",{className:"tl-modal__head",children:h.jsx("h3",{className:"tl-modal__title",id:"tl-edit-profile-title",children:"Edit profile"})}),h.jsx("button",{type:"button",className:"tl-modal__close tl-modal__close--icon",onClick:U.close,disabled:D,"aria-label":"Close edit profile",children:h.jsx(ji,{className:"tl-icon"})})]}),h.jsxs("div",{className:"tl-edit-profile__body",children:[h.jsxs("div",{className:"tl-edit-profile__avatar-section",children:[p?h.jsx("img",{className:"tl-edit-profile__avatar",src:p,alt:""}):h.jsx("div",{className:"tl-edit-profile__avatar tl-edit-profile__avatar--placeholder",children:(l||"?").slice(0,2).toUpperCase()}),h.jsx("button",{type:"button",className:"tl-edit-profile__change-photo",onClick:()=>{var g;return(g=O.current)==null?void 0:g.click()},disabled:D,children:"Change photo"}),h.jsx("input",{ref:O,type:"file",accept:"image/*",className:"tl-sr-only",onChange:g=>{var S;return M((S=g.target.files)==null?void 0:S[0])}})]}),h.jsxs("label",{className:"tl-edit-profile__field",children:[h.jsx("span",{className:"tl-edit-profile__label",children:"Display name"}),h.jsx("input",{type:"text",className:"tl-edit-profile__input",value:l,onCh
2258ange:g=>u(g.target.value),maxLength:100,disabled:D})]}),h.jsxs("label",{className:"tl-edit-profile__field",children:[h.jsx("span",{className:"tl-edit-profile__label",children:"Working on"}),h.jsx("textarea",{className:"tl-edit-profile__textarea",value:c,onChange:g=>f(g.target.value),maxLength:b2,disabled:D,placeholder:"What are you working on? What are you interested in?",rows:4})]})]}),v&&h.jsx("div",{className:"tl-error tl-edit-profile__error",children:v}),h.jsxs("div",{className:"tl-modal__actions",children:[h.jsx("button",{type:"button",className:"tl-modal__secondary",onClick:U.close,disabled:D,children:"Cancel"}),h.jsx("button",{type:"button",className:"tl-action__button",onClick:()=>void y(),disabled:D,children:D?"Saving...":"Save"})]})]})})}const Gc="neartale:feed-reload",_o="neartale:feed-filter",Kc="neartale:search-toggle",Qc="neartale:search-state";function Gv(t){const e=window.history.state;return{...typeof e=="object"&&e!==null?{...e}:{},...t}}function Hl(t,e,n,r){const i=Ty(),s=Cy(i,t,e,n,r);window.history.replaceState(Gv({tlPost:!1}),"",s)}function rm(t,e,n,r){const i=Ty(),s=Cy(i,t,e,n,r);window.history.pushState(Gv({tlPost:!0}),"",s)}function M2(){const t=window.history.state;return!!(t!=null&&t.tlPost)}function U2(t,e){const n=(t==null?void 0:t.trim())||(e==null?void 0:e.split("@")[0])||"?",r=n.split(/\s+/).filter(Boolean);return r.length>=2?(r[0][0]+r[r.length-1][0]).toUpperCase():n.slice(0,2).toUpperCase()}function F2(){return h.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),h.jsx("circle",{cx:"12",cy:"7",r:"4"})]})}function z2({user:t,authLoading:e,onLogin:n,onLogout:r,apiBase:i="",compact:s=!1}){const[l,u]=N.useState(!1),[c,f]=N.useState(!1),[_,k]=N.useState(()=>Ki(null)),[E,L]=N.useState(!1),[A,P]=N.useState(!1),[D,I]=N.useState(),[v,C]=N.useState(()=>H0()),[O,U]=N.useState(!1),M=N.useRef(null),y=N.useRef(null),p=Ns(i);N.useEffect(()=>{const K=F=>{var $;U((($=F.detail)==null?void 0:$.open)??!1)};return window.addEventListener(Qc,K),()=>window.removeEventListener(Qc,K)},[]),N.useEffect(()=>{if(!t||!p){k(Ki(null)),I(void 0);return}let K=!1;return(async()=>{try{const F=await t.getIdToken(),$=await fetch(`${p}/api/preferences`,{headers:{Authorization:`Bearer ${F}`}});if(!$.ok)throw new Error($.statusText);const G=await $.json();K||(k(Ki(G.categories)),G.profile&&I(G.profile))}catch{K||k(Ki(null))}})(),()=>{K=!0}},[t,p]),N.useEffect(()=>{if(!l)return;const K=$=>{const G=M.current;G&&!G.contains($.target)&&u(!1)},F=$=>{$.key==="Escape"&&u(!1)};return document.addEventListener("mousedown",K),document.addEventListener("keydown",F),()=>{document.removeEventListener("mousedown",K),document.removeEventListener("keydown",F)}},[l]),N.useEffect(()=>{const K=F=>{const $=F.detail;$&&C(Bn($))};return window.addEventListener(_o,K),()=>window.removeEventListener(_o,K)},[]),N.useEffect(()=>{if(!c)return;const K=$=>{const G=y.current;G&&!G.contains($.target)&&f(!1)},F=$=>{$.key==="Escape"&&f(!1)};return document.addEventListener("mousedown",K),document.addEventListener("keydown",F),()=>{document.removeEventListener("mousedown",K),document.removeEventListener("keydown",F)}},[c]),N.useEffect(()=>{const K=()=>{const F=qd(window.location);C(F.feed??"home")};return window.addEventListener("popstate",K),()=>window.removeEventListener("popstate",K)},[]);const g=()=>u(!1),S=async()=>{try{await Promise.resolve(n())}finally{g()}},T=async()=>{try{await Promise.resolve(r())}finally{g()}},x=K=>{f(!1),co(K),C(K),Hl(K,null);const F=ya(K);window.dispatchEvent(new CustomEvent(_o,{detail:F})),window.scrollTo({top:0,behavior:"smooth"})},w=K=>{K.metaKey||K.ctrlKey||K.shiftKey||K.altKey||(K.preventDefault(),x("home"))},ee=()=>{f(!0)},Ve=K=>{K.preventDefault(),K.stopPropagation(),f(F=>!F)},He=()=>{if(f(!1),!t){Promise.resolve(n());return}p&&L(!0)};return h.jsxs("header",{className:`tl-authbar${s?" tl-authbar--compact":""}`,children:[h.jsxs("div",{className:"tl-authbar__inner",children:[h.jsxs("a",{className:"tl-authbar__brand",href:"javascript:void(0)",onClick:w,children:[h.jsx("img",{className:"tl-authbar__brand-logo",src:"https://formfacade.com/logo.png",alt:""}),h.jsx("span",{className:"tl-authbar__brand-name",children:"Neartale"})]}),h.jsxs("div",{className:"tl-authbar__actions",children:[h.jsxs("nav",{className:"tl-authbar__home-feed",ref:y,"aria-label":"Feed",children:[h.jsxs("div",{className:`tl-authbar__home-row${c?" tl-authbar__home-row--open":""}`,children:[h.jsx("button",{type:"button",className:"tl-authbar__home-main tl-authbar__home-main--active","aria-current":"page",onClick:ee,children:ky(v)}),h.jsx("button",{type:"button",className:`tl-authbar__home-chevron${c?" tl-authbar__home-chevron--open":""}${v!=="home"?" tl-authbar__home-chevron--category-active":""}`,"aria-expanded":c,"aria-haspopup":"menu","aria-label":"Open feed menu",onClick:Ve,children:h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,
2258children:h.jsx("path",{d:"m6 9 6 6 6-6"})})})]}),c&&h.jsxs("div",{className:"tl-authbar__home-submenu",role:"menu",children:[h.jsx("button",{type:"button",role:"menuitem",className:`tl-authbar__home-submenu-item${v==="home"?" tl-authbar__home-submenu-item--active":""}`,onClick:()=>x("home"),children:"Home"}),_.map(({id:K,label:F})=>h.jsx("button",{type:"button",role:"menuitem",className:`tl-authbar__home-submenu-item${v===K?" tl-authbar__home-submenu-item--active":""}`,onClick:()=>x(K),children:F},K)),h.jsx("button",{type:"button",role:"menuitem",className:"tl-authbar__home-submenu-item tl-authbar__home-submenu-item--customize",onClick:He,children:"Edit categories"})]})]}),h.jsxs("div",{className:"tl-authbar__actions-end",children:[h.jsx("button",{type:"button",className:`tl-authbar__icon-btn tl-authbar__icon-btn--search${O?" tl-authbar__icon-btn--active":""}`,"aria-label":O?"Close search":"Search posts","aria-pressed":O,onClick:()=>{window.dispatchEvent(new CustomEvent(Kc))},children:h.jsx(Kd,{})}),h.jsx("div",{className:"tl-authbar__account",ref:M,children:e?h.jsx("div",{className:"tl-skeleton tl-skeleton--circle tl-authbar__skeleton-avatar"}):h.jsxs(h.Fragment,{children:[h.jsx("button",{type:"button",className:"tl-authbar__icon-btn","aria-label":"Account menu","aria-haspopup":"menu","aria-expanded":l,onClick:()=>u(K=>!K),children:D!=null&&D.picture||t!=null&&t.photoURL?h.jsx("img",{className:"tl-authbar__icon-btn-avatar",src:(D==null?void 0:D.picture)||(t==null?void 0:t.photoURL)||"",alt:""}):t?h.jsx("span",{className:"tl-authbar__icon-btn-initials",children:U2((D==null?void 0:D.name)||t.displayName,t.email)}):h.jsx(F2,{})}),l&&h.jsx("div",{className:"tl-authbar__menu",role:"menu",children:t?h.jsxs(h.Fragment,{children:[h.jsx("p",{className:"tl-authbar__status",children:(D==null?void 0:D.name)||t.displayName||t.email||t.uid}),h.jsx("div",{className:"tl-authbar__menu-divider"}),h.jsx("button",{type:"button",role:"menuitem",className:"tl-authbar__menu-item",onClick:()=>{u(!1),P(!0)},children:"Edit profile"}),h.jsx("button",{type:"button",role:"menuitem",className:"tl-authbar__menu-item",onClick:T,children:"Logout"})]}):h.jsxs(h.Fragment,{children:[h.jsx("p",{className:"tl-authbar__status",children:"Sign in to post"}),h.jsx("button",{type:"button",className:"tl-authbar__btn",onClick:S,children:"Continue with Google"})]})})]})})]})]})]}),t&&p?h.jsxs(h.Fragment,{children:[h.jsx(Z0,{open:E,onClose:()=>L(!1),apiBase:p,user:t,initialOrderedIds:_.map(K=>K.id),onSaved:K=>{k(Ki(K))}}),h.jsx(D2,{open:A,onClose:()=>P(!1),apiBase:p,user:t,currentProfile:D,onSaved:K=>{I(K),window.dispatchEvent(new CustomEvent(Gc))}})]}):null]})}function B2(t){const e=Date.now(),n=Math.floor((e-t)/1e3);return n<60?`${n}s`:n<3600?`${Math.floor(n/60)}m`:n<86400?`${Math.floor(n/3600)}h`:`${Math.floor(n/86400)}d`}function $2(t){const e=t.trim();if(!e)return null;const n=e.match(/openalex\.org\/([^/?#]+)/i);if(n!=null&&n[1])return n[1];if(/^https?:\/\//i.test(e))try{const r=new URL(e);if(r.hostname.replace(/^www\./i,"").toLowerCase()==="openalex.org"){const s=r.pathname.replace(/^\/+|\/+$/g,"").split("/")[0];if(s)return s}return null}catch{return null}return e.replace(/\//g,"_")}function V2(t){const e=typeof t=="string"?t.trim():"";if(!e)return null;const n=$2(e);return n?`https://openalex.org/${n.replace(/^\/+/,"").split("/")[0]}`:/^W\d+/i.test(e)?`https://openalex.org/${e}`:null}const H2=5;function W2({open:t,reposting:e,quote:n,imagePreview:r,preview:i,onClose:s,onQuoteChange:l,onImageSelect:u,onImageRemove:c,onOpenMemeCreator:f,onSubmit:_}){const k=Ps(t,s),E=N.useRef(null);if(N.useEffect(()=>{if(!t)return;const A=P=>{P.key==="Escape"&&!e&&s()};return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)},[t,e,s]),!k.mounted)return null;const L=A=>{A&&A.type.startsWith("image/")&&(A.size>H2*1024*1024||u(A))};return h.jsx("div",{ref:k.ref,className:`tl-modal${k.open?" tl-modal--open":""}`,role:"dialog","aria-modal":"true","aria-label":"Repost",children:h.jsxs("div",{className:"tl-modal__sheet",children:[h.jsxs("div",{className:"tl-modal__top",children:[h.jsxs("div",{className:"tl-modal__head",children:[h.jsx("span",{className:"tl-action-btn__icon","aria-hidden":"true",children:h.jsx(Gd,{className:"tl-icon"})}),h.jsx("h3",{className:"tl-modal__title",children:"Repost"})]}),h.jsx("button",{type:"button",className:"tl-modal__close tl-modal__close--icon",onClick:k.close,disabled:e,"aria-label":"Close repost dialog",children:h.jsx(ji,{className:"tl-icon"})})]}),h.jsxs("div",{className:"tl-modal__preview",children:[h.jsx("h4",{className:"tl-title",children:h.jsx("span",{className:"tl-title__link",children:i.headline||i.title||"Post"})}),i.explanation?h.jsx("p",{className:"tl-text",style:{whiteSpace:"pre-wrap"},children:i.explanation}):null]}),r?h.jsxs("div",{className:"tl-repost-upload__preview",children:[h.jsx("img",{src:r,alt:"Upload preview",className:"tl-repost-upload__img"}),h.jsx("button",{type:"button",className:"tl-repost-upload__remove",onClick:c,disabled:e,"aria-label":"Remove image",children:h.jsx(ji,{className:"tl-icon"})})]}):h.jsxs("div",{className:"tl-repost-actions",children:[h.jsxs("button",{type:"button",className:"tl-repost-action tl-repost-action--primary",onClick:f,disabled:e,children:[h.jsx(J0,{className:"tl-repost-action__icon"}),h.jsx("span",{children:"Create meme"})]}),h.jsxs("button",{type:"button",className:"tl-repost-action",onClick:()=>{var A;return(A=E.current)==null?void 0:A.click()},onDragOver:A=>A.preventDefault(),onDrop:A=>{A.preventDefault(),L(A.dataTransfer.files[0])},disabled:e,children:[h.jsx(Q0,{className:"tl-repost-action__icon"}),h.jsx("span",{children:"Upload image"})]})]}),h.jsx("input",{ref:E,type:"file",accept:"image/*",hidden:!0,onChange:A=>{var P;L((P=A.target.files)==null?void 0:P[0]),A.target.value=""}}),h.jsx("textarea",{className:"tl-action__textarea",rows:5,value:n,onChange:A=>l(A.target.value),placeholder:"Add a comment",disabled:e}),h.jsxs("div",{className:"tl-modal__actions",children:[h.jsx("button",{type:"button",className:"tl-modal__secondary",onClick:k.close,disabled:e,children:"Cancel"}),h.jsx("button",{type:"button",className:"tl-action__button",onClick:_,disabled:e,children:e?"Reposting...":"Post"})]})]})})}function q2({open:t,preview:e,apiBase:n,user:r,onClose:i,onMemeCreated:s}){const l=Ps(t,i),[u,c]=N.useState("suggest"),[f,_]=N.useState([]),[k,E]=N.useState(!1),[L,A]=N.useState(null),[P,D]=N.useState(""),[I,v]=N.useState([]),[C,O]=N.useState(!1),[U,M]=N.useState(null),[y,p]=N.useState([]),[g,S]=N.useState(!1),[T,x]=N.useState(null),[w,ee]=N.useState(null);N.useEffect(()=>{if(!t)return;c("suggest"),_([]),v([]),D(""),M(null),x(null),ee(null),A(null);let W=!1;return(async()=>{E(!0);try{const pe=await(r==null?void 0:r.getIdToken()),ae=await fetch(`${n}/api/meme/suggest`,{method:"POST",headers:{"Content-Type":"application/json",...pe?{Authorization:`Bearer ${pe}`}:{}},body:JSON.stringify({headline:e.headline||e.title||"",explanation:e.explanation||""})});if(!ae.ok)throw new Error(await ae.text());const ot=await ae.json();W||_(ot.suggestions||[])}catch(pe){W||A(pe instanceof Error?pe.message:String(pe))}finally{W||E(!1)}})(),()=>{W=!0}},[t,n,r,e]);const Ve=N.useCallback(async W=>{if(!W.trim()){v([]);return}O(!0);try{const ie=await(r==null?void 0:r.getIdToken()),pe=await fetch(`${n}/api/meme/search?q=${encodeURIComponent(W.trim())}`,{headers:ie?{Authorization:`Bearer ${ie}`}:{}});if(!pe.ok)throw new Error(await pe.text());const ae=await pe.json();v(ae.memes||[])}catch{v([])}finally{O(!1)}},[n,r]),He=W=>{D(W),W.trim()||v([])},K=W=>{W.key==="Enter"&&(W.preventDefault(),Ve(P))},F=W=>{M({id:W.templateId,name:W.name,url:W.url,box_count:W.box_count}),p([...W.boxes]),ee(null),c("edit")},$=W=>{M(W),p(Array.from({length:W.box_count},()=>"")),ee(null),c("edit")},G=async()=>
2258{if(U){S(!0),ee(null);try{const W=await(r==null?void 0:r.getIdToken()),ie=await fetch(`${n}/api/meme/caption`,{method:"POST",headers:{"Content-Type":"application/json",...W?{Authorization:`Bearer ${W}`}:{}},body:JSON.stringify({templateId:U.id,boxes:y})});if(!ie.ok)throw new Error(await ie.text());const pe=await ie.json();x(pe.url),c("preview")}catch(W){ee(W instanceof Error?W.message:String(W))}finally{S(!1)}}},se=()=>{T&&s(T)};if(N.useEffect(()=>{if(!t)return;const W=ie=>{ie.key==="Escape"&&i()};return document.addEventListener("keydown",W),()=>document.removeEventListener("keydown",W)},[t,i]),!l.mounted)return null;const re=P.trim()?I:[];return h.jsx("div",{ref:l.ref,className:`tl-modal tl-modal--meme${l.open?" tl-modal--open":""}`,role:"dialog","aria-modal":"true","aria-label":"Create meme",children:h.jsxs("div",{className:"tl-modal__sheet tl-meme-creator",children:[h.jsxs("div",{className:"tl-modal__top",children:[h.jsxs("div",{className:"tl-modal__head",children:[u!=="suggest"&&h.jsx("button",{type:"button",className:"tl-meme-back",onClick:()=>c(u==="preview"?"edit":"suggest"),children:h.jsx(Ay,{className:"tl-icon"})}),h.jsxs("h3",{className:"tl-modal__title",children:[u==="suggest"&&"Create meme",u==="edit"&&"Edit text",u==="preview"&&"Preview"]})]}),h.jsx("button",{type:"button",className:"tl-modal__close tl-modal__close--icon",onClick:l.close,"aria-label":"Close meme creator",children:h.jsx(ji,{className:"tl-icon"})})]}),u==="suggest"&&h.jsxs("div",{className:"tl-meme-suggest",children:[h.jsxs("div",{className:"tl-meme-search",children:[h.jsx(Kd,{className:"tl-meme-search__icon"}),h.jsx("input",{type:"text",className:"tl-meme-search__input",placeholder:"Search meme templates...",value:P,onChange:W=>He(W.target.value),onKeyDown:K}),C&&h.jsx(xy,{className:"tl-meme-search__spinner tl-spin"})]}),re.length>0&&h.jsx("div",{className:"tl-meme-grid",children:re.map(W=>h.jsxs("button",{type:"button",className:"tl-meme-card",onClick:()=>$(W),children:[h.jsx("img",{src:W.url,alt:W.name,className:"tl-meme-card__img"}),h.jsx("span",{className:"tl-meme-card__name",children:W.name})]},W.id))}),!P.trim()&&h.jsxs(h.Fragment,{children:[k&&h.jsx("div",{className:"tl-meme-grid",children:[1,2,3,4,5].map(W=>h.jsxs("div",{className:"tl-meme-card tl-meme-card--skeleton",children:[h.jsx("div",{className:"tl-meme-card__img tl-shimmer"}),h.jsx("div",{className:"tl-meme-card__text tl-shimmer"})]},W))}),L&&h.jsx("p",{className:"tl-meme-error",children:L}),!k&&f.length>0&&h.jsx("div",{className:"tl-meme-grid",children:f.map((W,ie)=>h.jsxs("button",{type:"button",className:"tl-meme-card",onClick:()=>F(W),children:[h.jsx("img",{src:W.url,alt:W.name,className:"tl-meme-card__img"}),h.jsx("div",{className:"tl-meme-card__boxes",children:W.boxes.map((pe,ae)=>h.jsx("span",{className:"tl-meme-card__box",children:pe},ae))}),h.jsx("span",{className:"tl-meme-card__name",children:W.name})]},`${W.templateId}-${ie}`))})]})]}),u==="edit"&&U&&h.jsxs("div",{className:"tl-meme-editor",children:[h.jsx("img",{src:U.url,alt:U.name,className:"tl-meme-editor__img"}),h.jsx("div",{className:"tl-meme-editor__fields",children:y.map((W,ie)=>h.jsxs("label",{className:"tl-meme-editor__label",children:[h.jsxs("span",{className:"tl-meme-editor__label-text",children:["Text ",ie+1]}),h.jsx("input",{type:"text",className:"tl-meme-editor__input",maxLength:50,value:W,onChange:pe=>{const ae=[...y];ae[ie]=pe.target.value,p(ae)},placeholder:`Text ${ie+1}`})]},ie))}),w&&h.jsx("p",{className:"tl-meme-error",children:w}),h.jsxs("div",{className:"tl-modal__actions",children:[h.jsx("button",{type:"button",className:"tl-modal__secondary",onClick:()=>c("suggest"),children:"Back"}),h.jsx("button",{type:"button",className:"tl-action__button",onClick:G,disabled:g||y.every(W=>!W.trim()),children:g?"Generating...":"Generate"})]})]}),u==="preview"&&T&&h.jsxs("div",{className:"tl-meme-preview",children:[h.jsx("img",{src:T,alt:"Generated meme",className:"tl-meme-preview__img"}),h.jsxs("div",{className:"tl-modal__actions",children:[h.jsx("button",{type:"button",className:"tl-modal__secondary",onClick:()=>c("edit"),children:"Back"}),h.jsx("button",{type:"button",className:"tl-action__button",onClick:se,children:"Use this meme"})]})]})]})})}function G2({open:t,headline:e,onClose:n,onSendNow:r}){const i=Ps(t,n);return N.useEffect(()=>{if(!t)return;const s=l=>{l.key==="Escape"&&n()};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[n,t]),i.mounted?h.jsx("div",{ref:i.ref,className:`tl-modal${i.open?" tl-modal--open":""}`,role:"dialog","aria-modal":"true","aria-label":"Send newsletter now",children:h.jsxs("div",{className:"tl-modal__sheet",children:[h.jsxs("div",{className:"tl-modal__top",children:[h.jsx("div",{className:"tl-modal__head",children:h.jsx("h3",{className:"tl-modal__title",children:"Send to your respondents now?"})}),h.jsx("button",{type:"button",className:"tl-modal__close tl-modal__close--icon",onClick:i.close,"aria-label":"Close newsletter prompt",children:h.jsx(ji,{className:"tl-icon"})})]}),h.jsx("p",{className:"tl-text",style:{margin:"0 0 12px 0"},children:"Your repost is published. If you want, we can open the campaign builder now with this post highlighted and ready for newsletter sending."}),e?h.jsx("div",{className:"tl-modal__preview",children:h.jsx("h4",{className:"tl-title",children:h.jsx("span",{className:"tl-title__link",children:e})})}):null,h.jsxs("div",{className:"tl-modal__actions",children:[h.jsx("button",{type:"button",className:"tl-modal__secondary",onClick:i.close,children:"Later"}),h.jsx("button",{type:"button",className:"tl-action__button",onClick:r,children:"Send newsletter now"})]})]})}):null}function bt(){return h.jsxs("div",{className:"tl-skeleton-card",children:[h.jsxs("div",{className:"tl-skeleton-card__header",children:[h.jsx("div",{className:"tl-skeleton tl-skeleton--circle tl-skeleton-card__avatar"}),h.jsxs("div",{className:"tl-skeleton-card__meta",children:[h.jsx("div",{className:"tl-skeleton tl-skeleton-card__line tl-skeleton-card__line--medium"}),h.jsx("div",{className:"tl-skeleton tl-skeleton-card__line tl-skeleton-card__line--short"})]})]}),h.jsx("div",{className:"tl-skeleton tl-skeleton-card__image"}),h.jsxs("div",{className:"tl-skeleton-card__body",children:[h.jsx("div",{className:"tl-skeleton tl-skeleton-card__line tl-skeleton-card__line--long"}),h.jsx("div",{className:"tl-skeleton tl-skeleton-card__line tl-skeleton-card__line--medium"})]})]})}const Kv="https://near.tl/user";function Qv(t){const e=t.likes;return!e||typeof e!="object"?{}:Object.fromEntries(Object.entries(e).filter(([,n])=>typeof n=="number"&&Number.isFinite(n)))}function Xc(t){const e=Object.keys(Qv(t)).length;if(e>0)return e;const n=t.likeCount;return typeof n=="number"&&Number.isFinite(n)?n:0}function Wl(t,e){return e?Object.prototype.hasOwnProperty.call(Qv(t),e):!1}function Xv({post:t,linkProfile:e}){var i,s;if(!t.reviewer)return null;const n=((i=t.reviewer.sub)==null?void 0:i.trim())||((s=t.uid)==null?void 0:s.trim()),r=e&&n?`${Kv}/${encodeURIComponent(n)}`:null;return h.jsxs("div",{className:"tl-header",children:[t.reviewer.picture&&(r?h.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"tl-header__link",children:h.jsx("img",{src:t.reviewer.picture,alt:t.reviewer.name||"Reviewer",className:"tl-avatar"})}):h.jsx("img",{src:t.reviewer.picture,alt:t.reviewer.name||"Reviewer",className:"tl-avatar"})),h.jsxs("div",{className:"tl-header__meta",children:[t.reviewer.name&&(r?h.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"tl-header__link",children:h.jsx("p",{className:"tl-header__name",children:t.reviewer.name})}):h.jsx("p",{className:"tl-header__name",children:t.reviewer.name})),t.at!=null&&h.jsx("p",{className:"tl-header__time",children:B2(t.at)})]})]})}function Jv({post:t}){return h.jsx("div",{className:"tl-media",children:t.memeurl&&!t.repost?h.jsx("div",{className:"tl-media__link",children:h.jsx("img",{src:t.memeurl,alt:"",className:"tl-media__img"})}):h.jsx("h3",{className:"tl-title",children:h.jsx("span",{className:"tl-title__link",children:t.headline||t.title||"Post"})})})}
2258function Jc({post:t,onOpen:e,onToggleLike:n,onOpenRepost:r,likedByViewer:i=!1,liking:s=!1}){var f;const l=Xc(t),u=typeof t.repostCount=="number"&&Number.isFinite(t.repostCount)?t.repostCount:0,c=!!(n||r);return h.jsx("article",{className:"tl-card tl-card--interactive","data-meme-id":t.memeId,role:"button",tabIndex:0,onClick:()=>e(t),onKeyDown:_=>{(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),e(t))},children:h.jsxs("div",{className:"tl-card__body",children:[h.jsx(Xv,{post:t}),h.jsx(Jv,{post:t}),t.repost&&h.jsxs("div",{className:"tl-repost",children:[h.jsx("div",{className:"tl-repost__label",children:"Reposted"}),t.repostedVia&&h.jsxs("p",{className:"tl-repost__via",children:["Via"," ",(f=t.repostedVia.reviewer)!=null&&f.name?h.jsx("span",{className:"tl-repost__name",children:t.repostedVia.reviewer.name}):h.jsx("span",{className:"tl-repost__name",children:"intermediate repost"})]}),t.repost.memeurl&&h.jsx("img",{src:t.repost.memeurl,alt:"",className:"tl-repost__img"}),t.repost.explanation&&h.jsx("p",{className:"tl-repost__text",style:{whiteSpace:"pre-wrap"},children:t.repost.explanation})]}),t.repost&&t.memeurl&&h.jsx("div",{className:"tl-media__link",children:h.jsx("img",{src:t.memeurl,alt:"",className:"tl-media__img"})}),t.explanation&&h.jsx("p",{className:"tl-text",style:{whiteSpace:"pre-wrap"},children:t.explanation}),c?h.jsxs("div",{className:"tl-card__footer",children:[n?h.jsxs("button",{type:"button",className:`tl-card-action${i?" tl-card-action--selected":""}`,"aria-pressed":i,disabled:s,onClick:_=>{_.stopPropagation(),n(t)},onKeyDown:_=>_.stopPropagation(),"aria-label":i?"Unlike post":"Like post",title:i?"Unlike":"Like",children:[h.jsx("span",{className:"tl-card-action__icon","aria-hidden":"true",children:h.jsx(Ny,{className:"tl-icon"})}),l>0?h.jsx("span",{className:"tl-card-action__count",children:l}):null]}):null,r?h.jsxs("button",{type:"button",className:"tl-card-action tl-card-action--repost",onClick:_=>{_.stopPropagation(),r(t)},onKeyDown:_=>_.stopPropagation(),"aria-label":"Repost post",title:"Repost",children:[h.jsx("span",{className:"tl-card-action__icon","aria-hidden":"true",children:h.jsx(Gd,{className:"tl-icon"})}),u>0?h.jsx("span",{className:"tl-card-action__count",children:u}):null]}):null]}):null]})})}function K2({post:t,onOpenRoot:e}){var s,l,u,c,f;const n=(s=t.rootExplainerPostId)==null?void 0:s.trim(),r=(u=(l=t.repostedVia)==null?void 0:l.reviewer)==null?void 0:u.sub,i=(f=(c=t.repostedVia)==null?void 0:c.reviewer)==null?void 0:f.name;return h.jsx("article",{className:"tl-card","data-meme-id":t.memeId,children:h.jsxs("div",{className:"tl-card__body",children:[h.jsx(Xv,{post:t,linkProfile:!0}),h.jsx(Jv,{post:t}),t.repost&&h.jsxs("div",{className:`tl-repost${n&&e?" tl-repost--link":""}`,role:n&&e?"button":void 0,tabIndex:n&&e?0:void 0,onClick:n&&e?()=>e(n):void 0,onKeyDown:n&&e?_=>{(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),e(n))}:void 0,children:[h.jsx("div",{className:"tl-repost__label",children:"Reposted"}),t.repostedVia&&h.jsxs("p",{className:"tl-repost__via",children:["Via"," ",r?h.jsx("a",{href:`${Kv}/${encodeURIComponent(r)}`,target:"_blank",rel:"noopener noreferrer",className:"tl-repost__name tl-repost__name--link",onClick:_=>_.stopPropagation(),children:i||"intermediate repost"}):h.jsx("span",{className:"tl-repost__name",children:i||"intermediate repost"})]}),t.repost.memeurl&&h.jsx("img",{src:t.repost.memeurl,alt:"",className:"tl-repost__img"}),t.repost.explanation&&h.jsx("p",{className:"tl-repost__text",style:{whiteSpace:"pre-wrap"},children:t.repost.explanation})]}),t.repost&&t.memeurl&&h.jsx("div",{className:"tl-media__link",children:h.jsx("img",{src:t.memeurl,alt:"",className:"tl-media__img"})}),t.explanation&&h.jsx("p",{className:"tl-text",style:{whiteSpace:"pre-wrap"},children:t.explanation})]})})}function mi(t,e,n){const r=new Set(t.map(s=>s.memeId)),i=e.filter(s=>!r.has(s.memeId));return n==="before"?[...i,...t]:[...t,...i]}const En=1,Qi=10,Wn=365;function Q2(t,e){if(t)return ya(t);const n=e==null?void 0:e.trim();return n?{repostsOnly:!1,category:n}:ya("home")}function X2({apiBase:t="",feed:e,category:n="",initialMemeId:r="",initialSearchQuery:i="",suggestRepost:s,openRepost:l,user:u=null}){const[c,f]=N.useState([]),[_,k]=N.useState(!0),[E,L]=N.useState(null),[A,P]=N.useState(r.trim()||null),[D,I]=N.useState(null),[v,C]=N.useState(l?"open-repost":s?"suggest-repost":null),[O,U]=N.useState(0),[M,y]=N.useState(null),[p,g]=N.useState(null),[S,T]=N.useState({}),[x,w]=N.useState(()=>Q2(e,n)),ee=N.useRef(x);ee.current=x;const[Ve,He]=N.useState(null),[K,F]=N.useState(null),[$,G]=N.useState(!1),[se,re]=N.useState(!0),[W,ie]=N.useState(!1),[pe,ae]=N.useState(0),ot=N.useRef(null),tn=N.useRef(null),vr=N.useRef(null),Bt=N.useRef(null),Ue=N.useRef(0),Fe=N.useRef(0),ze=N.useRef(async()=>{}),gn=N.useRef(()=>{}),[nn,Xe]=N.useState(!1),[jn,lt]=N.useState(""),[Z,Se]=N.useState(!1),[At,$t]=N.useState(null),yn=N.useRef(null);yn.current=At;const[at,Rt]=N.useState(""),[et,_t]=N.useState([]),[Pt,$i]=N.useState(!1),[Vi,bn]=N.useState(null),[Vt,pt]=N.useState(!1),[rn,sn]=N.useState(!1),tt=N.useRef(0),ri=N.useRef(!1),Dn=N.useRef(null),Ht=N.useMemo(()=>new Set(ga),[]),[wt,Mn]=N.useState(Ht),[We,vn]=N.useState(!u),[on,Ot]=N.useState(!0),[St,_r]=N.useState(""),[ut,ii]=N.useState(null),[si,_n]=N.useState(""),[Q,ye]=N.useState(!1),[Te,qe]=N.useState(!1),Le=N.useRef(0),[Ge,ln]=N.useState(!1);N.useLayoutEffect(()=>{if(!u){g(null),Mn(Ht),vn(!0),Ot(!0),_r(""),_n(""),ye(!1),ln(!1);return}let j=!1;return vn(!1),(async()=>{var z,H;try{const X=await u.getIdToken(),ue=await fetch(`${t}/api/preferences`,{headers:{Authorization:`Bearer ${X}`}});if(!ue.ok){j||(Mn(Ht),Ot(!0),_r(""),_n(""),ye(!1),vn(!0));return}const fe=await ue.json();if(j)return;const oe=(z=fe.categories)==null?void 0:z.map(Y=>
2258Y.category).filter(Boolean);Mn(oe!=null&&oe.length?new Set(oe):Ht),Ot(!!fe.fromDefaults),_r(typeof fe.publishId=="string"?fe.publishId.trim():""),_n(typeof((H=fe.profile)==null?void 0:H.working_on)=="string"?fe.profile.working_on.trim():""),ye(fe.personalizedFeedAvailable===!0),vn(!0)}catch{j||(Mn(Ht),Ot(!0),_r(""),_n(""),ye(!1),vn(!0))}})(),()=>{j=!0}},[u,t,O,Ht]),N.useEffect(()=>{let j=!1;if(!u){g(null);return}return(async()=>{try{const z=await qc(u);j||g(z)}catch{j||g(null)}})(),()=>{j=!0}},[u]),N.useEffect(()=>{var j;At==="publishId"&&(on&&St.trim()&&Bn(ee.current)==="home"||((j=Bt.current)==null||j.abort(),Ue.current++,Se(!1),$t(null),_t([]),Rt(""),bn(null),Xe(!1),lt(""),pt(!1),sn(!1),tt.current=0))},[on,St,At]),N.useEffect(()=>{if(!M)return;const j=setTimeout(()=>y(null),3e3);return()=>clearTimeout(j)},[M]);const Lt=N.useCallback(j=>{const z=H=>{if(H.memeId!==j.memeId)return H;const X=j.liked?{...H.likes??{},...typeof j.at=="number"?{[j.userId]:j.at}:{}}:Object.fromEntries(Object.entries(H.likes??{}).filter(([ue])=>ue!==j.userId));return{...H,likes:X,likeCount:j.likeCount}};f(H=>H.map(z)),_t(H=>H.map(z)),I(H=>H&&H.memeId===j.memeId?z(H):H)},[]),jt=N.useCallback(async(j,z)=>{const H=(z==null?void 0:z.onError)??(X=>y(X));try{let X=u||await vo();if(X||(await xa(),X=await vo()),!X){H("Please sign in to like posts.");return}let ue=p;ue||(ue=await qc(X),g(ue));const fe=!!Wl(j,ue);T(ve=>({...ve,[j.memeId]:!0}));const oe=await X.getIdToken(),Y=await fetch(`${t}/api/like`,{method:fe?"DELETE":"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${oe}`},body:JSON.stringify({memeId:j.memeId})});if(!Y.ok)throw new Error(await Y.text());const te=await Y.json();te.userId&&typeof te.likeCount=="number"&&Lt({memeId:j.memeId,userId:te.userId,liked:te.liked===!0,at:te.at,likeCount:te.likeCount})}catch(X){H(X instanceof Error?X.message:String(X))}finally{T(X=>{const ue={...X};return delete ue[j.memeId],ue})}},[t,u,p,Lt]);N.useEffect(()=>{const j=()=>{P(null),C(null),U(z=>z+1)};return window.addEventListener(Gc,j),()=>window.removeEventListener(Gc,j)},[]),N.useEffect(()=>{const j=z=>{const H=z.detail;H&&(w(H),P(null),C(null),Se(!1),$t(null),_t([]),Rt(""),bn(null),Xe(!1),lt(""),pt(!1),sn(!1),tt.current=0,Bn(H)!=="home"&&ln(!1),U(X=>X+1))};return window.addEventListener(_o,j),()=>window.removeEventListener(_o,j)},[]);const je=N.useCallback(async(j,z)=>{var fe;const H=j.trim();if(!H)return;(fe=Bt.current)==null||fe.abort();const X=new AbortController;Bt.current=X;const ue=++Ue.current;$i(!0),bn(null);try{const oe=ee.current,Y=new URLSearchParams({q:H,limit:String(Qi),start:"0",end:String(En)});!oe.repostsOnly&&oe.category.trim()&&Y.set("category",oe.category.trim());const te=await fetch(`${t}/api/posts/search?${Y}`,{signal:X.signal});if(!te.ok){const nt=te.status===503?"Search is temporarily unavailable.":te.status===400?"Invalid search request.":`Search failed (${te.status})`;throw new Error(nt)}const ve=await te.json();if(ue!==Ue.current)return;const Ee=ve.posts??[];_t(Ee),tt.current=En,pt(Ee.length>0&&En<Wn),Se(!0),$t("query"),Rt(H),Xe(!0),z!=null&&z.skipUrlReplace||Hl(Bn(ee.current),null,H,null)}catch(oe){if(oe instanceof Error&&oe.name==="AbortError"||ue!==Ue.current)return;bn(oe instanceof Error?oe.message:String(oe))}finally{ue===Ue.current&&$i(!1)}},[t]),Wt=N.useCallback(()=>{var j;(j=Bt.current)==null||j.abort(),Ue.current++,Se(!1),$t(null),_t([]),Rt(""),bn(null),lt(""),Xe(!1),pt(!1),sn(!1),tt.current=0},[]),wn=N.useCallback(()=>{const j=yn.current==="publishId";Wt(),Hl(Bn(ee.current),null,null,null),j&&ln(!0)},[Wt]);N.useEffect(()=>{ze.current=je,gn.current=wn}),N.useEffect(()=>{const j=()=>{Xe(z=>{const H=!z;return H?queueMicrotask(()=>{var X;return(X=vr.current)==null?void 0:X.focus()}):wn(),window.dispatchEvent(new CustomEvent(Qc,{detail:{open:H}})),H})};return window.addEventListener(Kc,j),()=>window.removeEventListener(Kc,j)},[]),N.useEffect(()=>{if(!nn)return;const j=window.setTimeout(()=>{var z;return(z=vr.current)==null?void 0:z.focus()},0);return()=>window.clearTimeout(j)},[nn]),N.useEffect(()=>{if(!nn&&!Z)return;const j=z=>{z.key==="Escape"&&(Z?gn.current():Xe(!1))};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},[nn,Z]),N.useEffect(()=>{if(_)return;const j=i==null?void 0:i.trim();!j||ri.current||(ri.current=!0,lt(j),Xe(!0),ze.current(j,{skipUrlReplace:!0}))},[_,i]);const ct=N.useCallback(async j=>{const z=j.trim();if(!z)return null;Dn.current=z;try{const H=await fetch(`${t}/api/post/${encodeURIComponent(z)}`);return H.ok?(await H.json()).post??null:(y("Original post not found"),null)}catch{return y("Original post not found"),null}finally{Dn.current===z&&(Dn.current=null)}},[t]),oi=N.useCallback(async(j,z,H=null)=>{y(null),C(H);const X=Bn(ee.current),ue=Z?et:c,fe=Z&&yn.current==="query"&&at.trim()?at.trim():null;if(ue.some(Y=>Y.memeId===j)){I(null),P(j),window.scrollTo({top:0,behavior:"smooth"}),z&&rm(X,j,fe,H);return}const oe=await ct(j);oe&&(I(oe),f(Y=>mi(Y,[oe],"before")),P(oe.memeId),window.scrollTo({top:0,behavior:"smooth"}),z&&rm(X,oe.memeId,fe,H))},[c,et,Z,at,ct]);N.useEffect(()=>{const j=()=>{var ve;const z=qd(window.location),H=z.feed??"home",X=z.initialMemeId??null,ue=z.postAction??null,fe=ya(H),oe=ee.current;(oe.repostsOnly!==fe.repostsOnly||oe.category!==fe.category)&&U(Ee=>Ee+1),w(fe),P(X),C(ue),co(H);const te=((ve=z.searchQuery)==null?void 0:ve.trim())??"";te?(lt(te),Xe(!0),ze.current(te,{skipUrlReplace:!0})):Wt()};
2258return window.addEventListener("popstate",j),()=>window.removeEventListener("popstate",j)},[Wt]),N.useEffect(()=>{if(!A){I(null);return}c.some(z=>z.memeId===A)||et.some(z=>z.memeId===A)||(D==null?void 0:D.memeId)===A||Dn.current!==A&&(async()=>{const z=await ct(A);z&&(I(z),f(H=>mi(H,[z],"before")))})()},[A,c,et,D,ct]);const Et=N.useCallback(j=>x.repostsOnly&&wt.size>0?j.filter(z=>wt.has(z.category||"home")):j,[x.repostsOnly,wt]);N.useEffect(()=>{var oe;if(!We){k(!0);return}const j=++Fe.current;if(!!u&&on&&St.trim().length>0&&!Q&&si.trim().length===0&&Bn(x)==="home"&&!Ge&&!(i!=null&&i.trim())){let Y=!1;k(!0),L(null),He(null),F(null),re(!1),ae(0),(oe=Bt.current)==null||oe.abort();const te=new AbortController;Bt.current=te;const ve=++Ue.current,Ee=St.trim(),nt=new URLSearchParams({publishId:Ee,limit:String(Qi),start:"0",end:String(En)});return fetch(`${t}/api/posts/search?${nt}`,{signal:te.signal}).then(Ae=>{if(!Ae.ok){const de=Ae.status===503?"Personalized feed is temporarily unavailable.":Ae.status===400?"Invalid personalized feed request.":Ae.status===404?"Personalization profile not found.":`Personalized feed failed (${Ae.status})`;throw new Error(de)}return Ae.json()}).then(Ae=>{if(Y||ve!==Ue.current||j!==Fe.current)return;const de=Ae.posts??[];_t(de),tt.current=En,pt(de.length>0&&En<Wn),Se(!0),$t("publishId"),Rt(""),bn(null),Xe(!1),f([]),k(!1)}).catch(Ae=>{Ae instanceof Error&&Ae.name==="AbortError"||Y||ve!==Ue.current||j!==Fe.current||(L(Ae instanceof Error?Ae.message:String(Ae)),Se(!1),$t(null),_t([]),pt(!1),tt.current=0,k(!1))}),()=>{Y=!0,te.abort()}}if(qe(!1),!!u&&(Q||si.trim().length>0)){let Y=!1;const te=new AbortController;return k(!0),L(null),He(null),F(null),ae(0),(async()=>{try{const Ee=await u.getIdToken();if(Y||j!==Fe.current)return;const nt=En,Ae=new URLSearchParams({limit:String(Qi),start:"0",end:String(nt)});x.category.trim()&&Ae.set("category",x.category.trim());const de=await fetch(`${t}/api/posts/personalized?${Ae}`,{signal:te.signal,headers:{Authorization:`Bearer ${Ee}`}});if(Y||j!==Fe.current)return;const ai=await de.json();if(de.ok&&ai.personalized===!0){const Sr=Et(ai.posts??[]);f(Sr),Le.current=nt,re(Sr.length>0&&nt<Wn),qe(!0),k(!1);return}}catch(Ee){if(Ee instanceof Error&&Ee.name==="AbortError")return}if(Y||j!==Fe.current)return;const ve=wl(x);try{const Ee=await fetch(`${t}/api/feed${ve}`,{signal:te.signal});if(!Ee.ok)throw new Error(Ee.statusText);const nt=await Ee.json();if(Y||j!==Fe.current)return;const Ae=Et(nt.posts??[]);f(Ae),He(nt.oldestAt??null),F(nt.newestAt??null),re(nt.oldestAt!=null)}catch(Ee){!Y&&j===Fe.current&&!(Ee instanceof Error&&Ee.name==="AbortError")&&L(Ee instanceof Error?Ee.message:String(Ee))}finally{!Y&&j===Fe.current&&k(!1)}})(),()=>{Y=!0,te.abort()}}let X=!1;const ue=new AbortController;k(!0),L(null),He(null),F(null),re(!0),ae(0);const fe=wl(x);return fetch(`${t}/api/feed${fe}`,{signal:ue.signal}).then(Y=>Y.ok?Y.json():Promise.reject(new Error(Y.statusText))).then(Y=>{if(X||j!==Fe.current)return;const te=Et(Y.posts??[]);f(te),He(Y.oldestAt??null),F(Y.newestAt??null),re(Y.oldestAt!=null)}).catch(Y=>{X||j!==Fe.current||Y instanceof Error&&Y.name==="AbortError"||L(Y instanceof Error?Y.message:String(Y))}).finally(()=>{!X&&j===Fe.current&&k(!1)}),()=>{X=!0,ue.abort()}},[t,x.repostsOnly,x.category,O,wt,Et,We,u,on,St,Ge,i,si,Q]);const js=N.useCallback(async()=>{if(!Te||!u||$||!se)return;const j=Le.current,H=j+En;if(j>=Wn){re(!1);return}G(!0);try{const X=await u.getIdToken(),ue=new URLSearchParams({limit:String(Qi),start:String(j),end:String(H)});ee.current.category.trim()&&ue.set("category",ee.current.category.trim());const fe=await fetch(`${t}/api/posts/personalized?${ue}`,{headers:{Authorization:`Bearer ${X}`}});if(!fe.ok)return;const oe=await fe.json();if(oe.personalized!==!0)return;const Y=oe.posts??[],te=Et(Y);f(ve=>mi(ve,te,"after")),Le.current=H,re(te.length>0&&H<Wn)}catch{}finally{G(!1)}},[Te,u,$,se,t,Et]),Hi=N.useCallback(async()=>{if(!Z){if(Te){js();return}if(!($||!se||!Ve)){G(!0);try{const j=wl(x,{before:Ve}),z=await fetch(`${t}/api/feed${j}`);if(!z.ok)throw new Error(z.statusText);const H=await z.json(),X=Et(H.posts??[]);f(ue=>mi(ue,X,"after")),He(H.oldestAt??null),re(H.oldestAt!=null)}catch{}finally{G(!1)}}}},[Z,Te,js,$,se,Ve,x,t,Et]),wr=N.useCallback(async()=>
2258{if(!(Z||Te)&&!(W||!K)){ie(!0);try{const j=wl(x,{after:K}),z=await fetch(`${t}/api/feed${j}`);if(!z.ok)throw new Error(z.statusText);const H=await z.json(),X=Et(H.posts??[]);X.length>0&&(ae(X.length),f(ue=>mi(ue,X,"before")),F(H.newestAt??K))}catch{}finally{ie(!1)}}},[Z,W,K,x,t,Et]),Un=N.useCallback(async()=>{if(!Z||!Vt||rn)return;const j=At;if(j!=="query"&&j!=="publishId"||j==="query"&&!at.trim()||j==="publishId"&&!St.trim())return;const z=tt.current,X=z+En;if(z>=Wn){pt(!1);return}const ue=Ue.current;sn(!0);try{const fe=new URLSearchParams({limit:String(Qi),start:String(z),end:String(X)});if(j==="query"){fe.set("q",at.trim());const ve=ee.current;!ve.repostsOnly&&ve.category.trim()&&fe.set("category",ve.category.trim())}else fe.set("publishId",St.trim());const oe=await fetch(`${t}/api/posts/search?${fe}`);if(!oe.ok||ue!==Ue.current)return;const Y=await oe.json();if(ue!==Ue.current)return;const te=Y.posts??[];_t(ve=>mi(ve,te,"after")),tt.current=X,pt(te.length>0&&X<Wn)}catch{}finally{sn(!1)}},[Z,Vt,rn,At,at,St,t]);N.useEffect(()=>{const j=tn.current;if(!j||!Z||!Vt||rn||Pt)return;const z=new IntersectionObserver(([H])=>{H.isIntersecting&&Un()},{rootMargin:"200px"});return z.observe(j),()=>z.disconnect()},[Z,Vt,rn,Pt,Un,et.length]),N.useEffect(()=>{const j=ot.current;if(!j||!se||Z)return;const z=new IntersectionObserver(([H])=>{H.isIntersecting&&Hi()},{rootMargin:"200px"});return z.observe(j),()=>z.disconnect()},[Z,se,Ve,$,Hi]),N.useEffect(()=>{const j=()=>{document.visibilityState==="visible"&&K&&!A&&!Z&&wr()};return document.addEventListener("visibilitychange",j),()=>document.removeEventListener("visibilitychange",j)},[Z,K,A,wr]);const li=A?c.find(j=>j.memeId===A)??et.find(j=>j.memeId===A)??((D==null?void 0:D.memeId)===A?D:void 0):void 0,Ja=nn||Z&&At==="query",bs=()=>{const j=jn.trim();j&&je(j)};return h.jsxs(h.Fragment,{children:[Ja?h.jsxs("div",{className:"tl-search-strip",children:[h.jsx("label",{htmlFor:"tl-search-input",className:"tl-visually-hidden",children:"Search posts"}),h.jsxs("div",{className:"tl-search-row",children:[h.jsx("input",{ref:vr,id:"tl-search-input",type:"search",className:"tl-search-input",placeholder:"Search posts...",value:jn,autoComplete:"off",onChange:j=>lt(j.target.value),onKeyDown:j=>{j.key==="Enter"&&(j.preventDefault(),bs())}}),h.jsx("button",{type:"button",className:"tl-search-submit","aria-label":"Run search",onClick:bs,children:h.jsx(Kd,{className:"tl-icon"})})]}),Pt&&jn.trim()?h.jsx("div",{className:"tl-search-meta",children:h.jsxs("span",{className:"tl-search-chip",children:['Searching for "',jn.trim(),'"â¦']})}):Z&&at.trim()?h.jsxs("div",{className:"tl-search-meta",children:[h.jsxs("span",{className:"tl-search-chip",children:['Results for "',at,'"']}),h.jsx("button",{type:"button",className:"tl-search-clear-feed",onClick:()=>wn(),children:"Clear search"})]}):null,Vi?h.jsx("div",{className:"tl-error tl-search-error",children:Vi}):null]}):null,!li&&M?h.jsx("div",{className:"tl-error",children:M}):null,li?h.jsx(sT,{apiBase:t,post:li,feedPosts:Z?et:c,onBack:()=>{if(M2()){window.history.back();return}P(null),C(null),Hl(Bn(ee.current),null,Z&&At==="query"&&at.trim()?at.trim():null,null)},user:u,onReposted:j=>{f(z=>[j,...z]),Z&&_t(z=>[j,...z]),I(j),P(j.memeId),St.trim()&&ii(j)},onNavigate:j=>void oi(j,!0),onToggleLike:jt,navError:M,suggestRepost:v==="suggest-repost",openRepost:v==="open-repost"}):_||!Z&&Pt?h.jsxs("div",{className:"tl-grid",children:[h.jsx(bt,{}),h.jsx(bt,{}),h.jsx(bt,{})]}):E?h.jsxs("div",{className:"tl-error",children:["Failed to load feed: ",E]}):Z?Pt?h.jsxs("div",{className:"tl-grid",children:[h.jsx(bt,{}),h.jsx(bt,{}),h.jsx(bt,{})]}):et.length===0?h.jsxs("div",{className:"tl-empty tl-empty--feed",children:[h.jsx(ip,{className:"tl-empty__icon"}),h.jsx("p",{className:"tl-empty__text",children:"No matching posts yet."})]}):h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"tl-grid",children:et.map(j=>h.jsx(Jc,{post:j,onOpen:z=>void oi(z.memeId,!0),onToggleLike:z=>void jt(z),onOpenRepost:z=>void oi(z.memeId,!0,"open-repost"),likedByViewer:Wl(j,p),liking:!!S[j.memeId]},j.memeId))}),Vt&&h.jsx("div",{ref:tn,className:"tl-sentinel"}),rn&&h.jsxs("div",{className:"tl-grid",children:[h.jsx(bt,{}),h.jsx(bt,{})]}),!Vt&&et.length>0&&h.jsx("p",{className:"tl-end-of-feed",children:"No more search results"})]}):c.length===0?h.jsxs("div",{className:"tl-empty tl-empty--feed",children:[h.jsx(ip,{className:"tl-empty__icon"}),h.jsx("p",{className:"tl-empty__text",children:Bn(x)==="home"?"No posts yet":`No posts in ${ky(Bn(x)).toLowerCase()}
2258 yet.`})]}):h.jsxs(h.Fragment,{children:[pe>0&&h.jsxs("div",{className:"tl-new-posts-banner",role:"button",tabIndex:0,onClick:()=>{ae(0),window.scrollTo({top:0,behavior:"smooth"})},onKeyDown:j=>{(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),ae(0),window.scrollTo({top:0,behavior:"smooth"}))},children:[pe===1?"1 new post":`${pe} new posts`," â tap to see"]}),h.jsx("div",{className:"tl-grid",children:c.map(j=>h.jsx(Jc,{post:j,onOpen:z=>{oi(z.memeId,!0)},onToggleLike:z=>void jt(z),onOpenRepost:z=>void oi(z.memeId,!0,"open-repost"),likedByViewer:Wl(j,p),liking:!!S[j.memeId]},j.memeId))}),se&&h.jsx("div",{ref:ot,className:"tl-sentinel"}),$&&h.jsxs("div",{className:"tl-grid",children:[h.jsx(bt,{}),h.jsx(bt,{})]}),!se&&c.length>0&&h.jsx("p",{className:"tl-end-of-feed",children:"You are all caught up"})]}),h.jsx(G2,{open:!!ut,headline:(ut==null?void 0:ut.headline)||(ut==null?void 0:ut.title)||"",onClose:()=>ii(null),onSendNow:()=>{const j=ut;if(!j)return;const z=new URLSearchParams;z.set("postId",j.memeId),St.trim()&&z.set("publishId",St.trim()),ii(null);const H=Ns("");window.location.assign(`${H}/campaign?${z.toString()}`)}})]})}const J2=20,Cl="Loading questionâ¦",Y2={backgroundColor:"var(--ff-primary-600, #4f46e5)",color:"#fff",borderColor:"var(--ff-primary-600, #4f46e5)",opacity:1,cursor:"wait"},Z2={backgroundColor:"#dcfce7",color:"#166534",borderColor:"#16a34a",opacity:1},eT={backgroundColor:"#fee2e2",color:"#991b1b",borderColor:"#dc2626",opacity:1};function tT(t){var r,i,s;const e=(r=t.rootExplainerPostId)==null?void 0:r.trim();return e||((s=(i=t.repost)==null?void 0:i.memeId)==null?void 0:s.trim())||null}function nT(t,e){const n=new Set;let r=t,i=0;for(;i<J2;){const s=tT(r);if(!s||n.has(s))break;n.add(r.memeId),i++;const l=e.get(s);if(!l)break;r=l}return r}function im({icon:t,label:e,onClick:n,disabled:r=!1,count:i,selected:s=!1}){return h.jsxs("button",{type:"button",className:`tl-action-btn${s?" tl-action-btn--selected":""}`,onClick:n,disabled:r,"aria-pressed":s,children:[h.jsx("span",{className:"tl-action-btn__icon","aria-hidden":"true",children:t}),h.jsx("span",{className:"tl-action-btn__label",children:e}),(i??0)>0&&h.jsxs("span",{className:"tl-action-btn__count",children:["· ",i]})]})}function rT({primaryUrl:t,pdfUrl:e,quizAction:n,showQuizAction:r=!1}){const[i,s]=N.useState(!1),l=N.useRef(null);N.useEffect(()=>{if(!i)return;const c=f=>{var _;(_=l.current)!=null&&_.contains(f.target)||s(!1)};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[i]);const u=!!e||!!(r&&n);return h.jsxs("div",{className:"tl-paper-split",ref:l,children:[h.jsxs("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:`tl-action-btn tl-paper-split__main${u?"":" tl-paper-split__main--solo"}`,"aria-label":"Open paper in new tab",children:[h.jsx("span",{className:"tl-action-btn__icon","aria-hidden":"true",children:h.jsx(Y0,{className:"tl-icon"})}),h.jsx("span",{className:"tl-action-btn__label",children:"Research"})]}),u?h.jsx("button",{type:"button",className:"tl-action-btn tl-paper-split__caret","aria-expanded":i,"aria-haspopup":"menu","aria-label":"More paper links",onClick:()=>s(c=>!c),children:h.jsx(X0,{className:"tl-icon"})}):null,i&&u?h.jsxs("ul",{className:"tl-paper-split__menu",role:"menu",children:[e?h.jsx("li",{role:"none",children:h.jsx("a",{role:"menuitem",href:e,target:"_blank",rel:"noopener noreferrer",className:"tl-paper-split__menu-link",onClick:()=>s(!1),children:"Download PDF"})}):null,r&&n?h.jsx("li",{role:"none",children:h.jsx("button",{type:"button",role:"menuitem",className:"tl-paper-split__menu-button",onClick:()=>{s(!1),n()},children:"Take quiz"})}):null]}):null]})}function iT({apiBase:t,memeId:e,category:n="",onOpen:r}){const[i,s]=N.useState([]),[l,u]=N.useState(!0),[c,f]=N.useState(!1),[_,k]=N.useState(null),[E,L]=N.useState(!1),A=N.useRef(0),P=N.useRef(null),D=t.trim().replace(/\/$/,""),I=n.trim(),v=N.useCallback((O,U)=>{const M=new URLSearchParams({postId:e,limit:String(Qi),start:String(O),end:String(U)});return I&&M.set("category",I),M},[e,I]);N.useEffect(()=>{let O=!1;u(!0),f(!1),k(null),s([]),L(!1),A.current=0;const U=En;return fetch(`${D}/api/posts/search?${v(0,U)}`).then(async M=>{const y=await M.json();if(!M.ok){const p=typeof y.error=="string"?y.error:M.status===404?"Post not found":M.statusText||"Request failed";throw new Error(p)}return y}).then(M=>
2258{if(O)return;const y=M.posts??[];s(y),A.current=U,L(y.length>0&&U<Wn)}).catch(M=>{O||(s([]),k(M instanceof Error?M.message:String(M)))}).finally(()=>{O||u(!1)}),()=>{O=!0}},[D,e,v]);const C=N.useCallback(async()=>{if(!E||c||l||_)return;const O=A.current,M=O+En;if(O>=Wn){L(!1);return}f(!0);try{const y=await fetch(`${D}/api/posts/search?${v(O,M)}`),p=await y.json();if(!y.ok)return;const g=p.posts??[];s(S=>mi(S,g,"after")),A.current=M,L(g.length>0&&M<Wn)}catch{}finally{f(!1)}},[D,v,_,E,l,c]);return N.useEffect(()=>{const O=P.current;if(!O||!E||c||l||_)return;const U=new IntersectionObserver(([M])=>{M.isIntersecting&&C()},{rootMargin:"200px"});return U.observe(O),()=>U.disconnect()},[_,E,C,l,c]),l?h.jsxs("section",{className:"tl-related",children:[h.jsx("h3",{className:"tl-related__heading",children:"Related"}),h.jsxs("div",{className:"tl-grid",children:[h.jsx(bt,{}),h.jsx(bt,{}),h.jsx(bt,{})]})]}):_?h.jsxs("section",{className:"tl-related",children:[h.jsx("h3",{className:"tl-related__heading",children:"Related"}),h.jsx("p",{className:"tl-related__empty",children:_})]}):i.length===0?h.jsxs("section",{className:"tl-related",children:[h.jsx("h3",{className:"tl-related__heading",children:"Related"}),h.jsx("p",{className:"tl-related__empty",children:"No related posts yet."})]}):h.jsxs("section",{className:"tl-related",children:[h.jsx("h3",{className:"tl-related__heading",children:"Related"}),h.jsx("div",{className:"tl-grid",children:i.map(O=>h.jsx(Jc,{post:O,onOpen:r},O.memeId))}),E?h.jsx("div",{ref:P,className:"tl-sentinel","aria-hidden":!0}):null,c?h.jsx("div",{className:"tl-grid",children:h.jsx(bt,{})}):null]})}function sT({apiBase:t="",post:e,feedPosts:n,onBack:r,user:i,onReposted:s,onToggleLike:l,onNavigate:u,navError:c,suggestRepost:f,openRepost:_}){var _n;const[k,E]=N.useState(""),[L,A]=N.useState(null),[P,D]=N.useState(null),[I,v]=N.useState(null),[C,O]=N.useState(!1),[U,M]=N.useState(Xc(e)),[y,p]=N.useState(!1),[g,S]=N.useState(!1),[T,x]=N.useState(!1),[w,ee]=N.useState(!!(f&&!_)),[Ve,He]=N.useState(!1),[K,F]=N.useState(!1),[$,G]=N.useState(!1),[se,re]=N.useState(null),[W,ie]=N.useState(null),[pe,ae]=N.useState(null),[ot,tn]=N.useState([]),[vr,Bt]=N.useState(1),[Ue,Fe]=N.useState("question"),[ze,gn]=N.useState(null),[nn,Xe]=N.useState(null),[jn,lt]=N.useState(Cl),[Z,Se]=N.useState(null),[At,$t]=N.useState(0),[yn,at]=N.useState(0),[Rt,et]=N.useState(`${e.memeId}-thread`),[_t,Pt]=N.useState(null),$i=!!e.memeId,Vi=!!e.memeId&&!!(e.title||"").trim(),Vt=Ps(K,()=>{$||F(!1)});N.useEffect(()=>{ee(!!(f&&!_))},[e.memeId,f,_]),N.useEffect(()=>{if(!w)return;const Q=()=>ee(!1);return document.addEventListener("click",Q,{once:!0}),()=>document.removeEventListener("click",Q)},[w]),N.useEffect(()=>{if(!K)return;const Q=ye=>{ye.key==="Escape"&&!$&&F(!1)};return document.addEventListener("keydown",Q),()=>document.removeEventListener("keydown",Q)},[K,$]),N.useEffect(()=>{tn([]),re(null),ie(null),ae(null),Se(null),Bt(1),Fe("question"),gn(null),Xe(null),lt(Cl),$t(0),at(0),et(`${e.memeId}-thread`),Pt(null)},[e.memeId,e.title,e.category]),N.useEffect(()=>{M(Xc(e))},[e.memeId,e.likeCount,e.likes]),N.useEffect(()=>{let Q=!1;if(!i){O(!1);return}return(async()=>{try{const ye=await qc(i);if(Q)return;O(Wl(e,ye))}catch{if(Q)return;O(!1)}})(),()=>{Q=!0}},[i,e.memeId,e.likes]);const pt=N.useMemo(()=>i?"":"Sign in to like, repost, or answer quiz",[i]),rn=N.useMemo(()=>new Map(n.map(Q=>[Q.memeId,Q])),[n]),sn=N.useMemo(()=>nT(e,rn),[e,rn]),tt=N.useMemo(()=>{var qe,Le;const Q=(qe=e.paperLandingUrl)==null?void 0:qe.trim(),ye=(Le=e.paperOpenAlexUrl)==null?void 0:Le.trim(),Te=V2(e.paperDocId);return Q||ye||Te||""},[e.paperLandingUrl,e.paperOpenAlexUrl,e.paperDocId]),ri=((_n=e.paperPdfUrl)==null?void 0:_n.trim())||void 0,Dn=async()=>{v(null),p(!0);try{await l(e,{onError:Q=>v(Q)})}finally{p(!1)}},Ht=N.useCallback(async()=>{v(null);try{i||await xa(),x(!0)}catch(Q){v(Q instanceof Error?Q.message:String(Q))}},[i]),wt=N.useRef(null);N.useEffect(()=>{if(!_){wt.current===e.memeId&&(wt.current=null);return}wt.current!==e.memeId&&(wt.current=e.memeId,ee(!1),Ht())},[_,e.memeId,Ht]);const Mn=async Q=>{var Lt,jt,je,Wt,wn;const ye=i||await vo();if(!ye)throw new Error("Sign in to take the quiz");const Te=await ye.getIdToken(),qe=await fetch(`${t}/api/quiz/reply`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${Te}`},body:JSON.stringify({memeId:e.memeId,threadId:Q,bootstrap:!0})});if(!qe.ok)throw new Error(await qe.text());const Le=await qe.json();Le.threadId&&et(Le.threadId);const Ge=((jt=(Lt=Le.quiz)==null?void 0:Lt.question)==null?void 0:jt.trim())||"",ln=((Wt=(je=Le.quiz)==null?void 0:je.choices)==null?void 0:Wt.filter(ct=>typeof ct=="string"&&ct.trim()))??[];if(!Ge||ln.length<2)throw new Error("Quiz unavailable");lt(Ge),tn(ln),typeof((wn=Le.quiz)==null?void 0:wn.level)=="number"&&Bt(Le.quiz.level)},We=async()=>{v(null);try{i||await xa(),F(!0),Fe("question"),gn(null),Xe(null),lt(Cl),re(null),ie(null),ae(null),Se(null),tn([]),$t(0),at(0),Pt(null),G(!0),await Mn(Rt)}catch(Q){v(Q instanceof Error?Q.message:String(Q)),lt("Couldnât load the quiz. Try again.")}finally{G(!1)}},vn=()=>{ze!=null&&ze.length&&(tn(ze),gn(null),nn!=null&&nn.trim()&<(nn.trim()),Xe(null),Fe("question"),ie(null),ae(null),Se(null),re(null))},on=async()=>{const Q=`${e.memeId}-thread-${Date.now()}`;et(Q),Fe("question"),gn(null),Xe(null),lt(Cl),re(null),ie(null),ae(null),Se(null),tn([]),$t(0),at(0),Bt(1),Pt(null),v(null),G(!0);try{await Mn(Q)}catch(ye){v(ye instanceof Error?ye.message:String(ye)),lt("Couldnât load the quiz. Try again.")}finally{G(!1)}},Ot=()=>{P&&URL.revokeObjectURL(P),A(null),D(null)},St=Q=>{P&&URL.revokeObjectURL(P),A(Q),D(URL.createObjectURL(Q))},_r=Q=>{P&&URL.revokeObjectURL(P),A(null),D(Q),He(!1)},ut=Q=>{Q&&Q!==e.memeId&&u(Q)},ii=async()=>{var ye;const Q=i||await vo();if(!Q){v("Please sign in to repost.");return}v(null),S(!0);try{let Te;L?Te=await L2(Q.uid,L):P&&!P.startsWith("blob:")&&(Te=P);const qe=await Q.getIdToken(),Le=await fetch(`${t}/api/repost`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${qe}`},body:JSON.stringify({sourceMemeId:e.memeId,quote:k.trim(),...Te?{memeurl:Te}:{}})});if(!Le.ok)throw new Error(await Le.text());const Ge=await Le.json();(ye=Ge.post)!=null&&ye.memeId&&(x(!1),E(""),Ot(),s(Ge.post))}catch(Te){v(Te instanceof Error?Te.message:String(Te))}finally{S(!1)}},si=async(Q,ye)=>{var qe,Le,Ge,ln;const Te=i||await vo();if(!(!Te||ot.length===0)){v(null),G(!0),ae(ye),ie(Q);try{const Lt=await Te.getIdToken(),jt=await fetch(`${t}/api/quiz/reply`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${Lt}`},body:JSON.stringify({memeId:e.memeId,threadId:Rt,answer:Q,level:vr,..._t?{quizId:_t}:{}})});if(!jt.ok)throw new Error(await jt.text());const je=await jt.json();re(je.correction||null),Se(je.correct===!0),Fe("feedback");const Wt=((Le=(qe=je.quiz)==null?void 0:qe.choices)==null?void 0:Le.filter(ct=>typeof ct=="string"&&ct.trim()))??[];gn(Wt.length>0?Wt:null);const wn=typeof((Ge=je.quiz)==null?void 0:Ge.question)=="string"?je.quiz.question.trim():"";Xe(wn.length>0?wn:null),at(ct=>ct+1),je.correct===!0&&$t(ct=>ct+1),typeof((ln=je.quiz)==null?void 0:ln.level)=="number"&&Bt(je.quiz.level),je.threadId&&et(je.threadId),je.quizId&&Pt(je.quizId)}catch(Lt){v(Lt instanceof Error?Lt.message:String(Lt)),ie(null),ae(null)}finally{G(!1)}}};return h.jsxs("div",{className:"tl-post",children:[h.jsx("div",{className:"tl-post__topbar",children:h.jsxs("button",{type:"button",className:"tl-post__back",onClick:r,children:[h.jsx(Ay,{className:"tl-icon tl-icon--back"}),"Back"]})}),h.jsx(K2,{post:e,onOpenRoot:ut}),h.jsxs("div",{className:"tl-post__action-bar",children:[h.jsxs("div",{className:"tl-post__actions",children:[h.jsx(im,{icon:h.jsx(Ny,{className:"tl-icon"}),label:"Like",onClick:Dn,disabled:y||!$i,count:U,selected:C}),h.jsxs("div",{className:`tl-repost-hint-anchor${w?" tl-repost-hint-anchor--active":""}`,children:[h.jsx(im,{icon:h.jsx(Gd,{className:"tl-icon"}),label:"Repost",onClick:Ht,disabled:g,count:e.repostCount}),w&&h.jsx("div",{className:"tl-repost-hint",role:"tooltip",children:"Add your take and be the first to break this latest story to your users"})]})]}),tt?h.jsx(rT,{primaryUrl:tt,pdfUrl:ri,quizAction:We,showQuizAction:Vi}):null]}),h.jsx(iT,{apiBase:t,memeId:e.memeId,category:e.category,onOpen:Q=>{u(Q.memeId)}}),h.jsx(W2,{open:T,reposting:g,quote:k,imagePreview:P,preview:sn,onClose:()=>{x(!1),Ot()},onQuoteChange:E,onImageSelect:St,onImageRemove:Ot,onOpenMemeCreator:()=>He(!0),onSubmit:ii}),h.jsx(q2,{open:Ve,preview:sn,apiBase:t,user:i,onClose:()=>He(!1),onMemeCreated:_r}),Vt.mounted&&h.jsx("div",{ref:Vt.ref,className:`tl-modal${Vt.open?" tl-modal--open":""}`,role:"dialog","aria-modal":"true","aria-label":"Quiz",children:h.jsxs("div",{className:"tl-modal__sheet",children:[h.jsxs("div",{className:"tl-modal__top",children:[h.jsxs("div",{className:"tl-modal__head",children:[h.jsx("span",{className:"tl-action-btn__icon","aria-hidden":"true",children:h.jsx(K0,{className:"tl-icon"})}),h.jsxs("h3",{className:"tl-modal__title",children:["Quiz",yn>0||Ue==="question"?` â Question ${yn+(Ue==="question"?1:0)}`:""]})]}),h.jsx("button",{type:"button",className:"tl-modal__close tl-modal__close--icon",onClick:Vt.close,disabled:$,"aria-label":"Close quiz",children:h.jsx(ji,{className:"tl-icon"})})]}),h.jsx("p",{className:"tl-action__label",children:jn}),Ue==="question"&&h.jsx("div",{className:"tl-quiz",children:ot.map((Q,ye)=>h.jsx("button",{type:"button",className:`tl-quiz__choice${$&&pe===ye?" tl-quiz__choice--selected":""}`,style:$&&pe===ye?Y2:void 0,disabled:$,onClick:()=>si(Q,ye),children:Q},`${Q}-${ye}`))}),Ue==="feedback"&&W&&h.jsx("p",{className:"tl-action__label",children:h.jsxs("span",{className:"tl-quiz__answer-badge",style:Z?Z2:eT,children:[Z?"Correct":"Incorrect",": ",W]})}),se&&h.jsx("p",{className:"tl-action__label",children:se}),!i&&h.jsx("p",{className:"tl-action__hint",children:pt}),h.jsxs("div",{className:"tl-quiz__footer",children:[h.jsx("div",{className:"tl-quiz__footer-score",children:yn>0&&h.jsxs("span",{className:"tl-quiz__score-badge",children:[At," / ",yn," correct"]})}),h.jsx("div",{className:"tl-quiz__footer-actions",children:$?h.jsxs("p",{className:"tl-quiz__waiting",role:"status","aria-live":"polite",children:[h.jsx(xy,{className:"tl-spinner"}),Ue==="question"&&ot.length===0?"Preparing your quizâ¦":"Checking your answerâ¦"]}):Ue==="question"?h.jsx("button",{type:"button",className:"tl-modal__secondary",onClick:vn,disabled:!(ze!=null&&ze.length),style:ze!=null&&ze.length?void 0:{visibility:"hidden"},children:"Skip"}):ze!=null&&ze.length?h.jsx("button",{type:"button",className:"tl-modal__primary",onClick:vn,children:"Next question"}):h.jsx("button",{type:"button",className:"tl-modal__secondary",onClick:on,children:"Start over"})})]})]})}),I&&h.jsx("div",{className:"tl-error",children:I}),c&&h.jsx("div",{className:"tl-error",children:c})]})}function Yv(t){const e=(t==null?void 0:t.suppressErrors)??!1,[n,r]=N.useState(null),[i,s]=N.useState(!0),[l,u]=N.useState(null);return N.useEffect(()=>{let c=!1,f;return R2(_=>{c||(r(_),s(!1))}).then(_=>{f=_}).catch(_=>{c||(e?(r(null),u(null)):u(_ instanceof Error?_.message:String(_)),s(!1))}),()=>{c=!0,f&&f()}},[e]),{user:n,loading:i,error:l}}const Aa=new Map;function Zv(t){return typeof t=="string"?document.querySelector(t):t}function e_(t){const e=Zv(t);if(!e)return null;const n=Aa.get(e);if(n)return n;const r=Vu.createRoot(e);return Aa.set(e,r),r}function oT(t){const e=Zv(t);if(!e)return;const n=Aa.get(e);n&&(n.unmount(),Aa.delete(e))}const lT=48;function aT(t){const e=window.matchMedia("(prefers-reduced-motion: reduce)"),n=()=>{t()},r=()=>{t()};return window.addEventListener("scroll",n,{passive:!0}),e.addEventListener("change",r),()=>{window.removeEventListener("scroll",n),e.removeEventListener("change",r)}}function uT(){return typeof window>"u"||window.matchMedia("(prefers-reduced-motion: reduce)").matches?!1:(window.scrollY||document.documentElement.scrollTop)>lT}function cT(){return N.useSyncExternalStore(aT,uT,()=>!1)}function sm(){var t;return((t=document.getElementById("root"))==null?void 0:t.getAttribute("data-api-base"))??""}function dT(){const{user:t,loading:e,error:n}=Yv(),[r,i]=N.useState(null),[s,l]=N.useState(()=>Ns(sm())),u=cT(),c=n||r;N.useEffect(()=>{l(Ns(sm()))},[]);const f=async()=>{i(null);try{await xa()}catch(k){i(k instanceof Error?k.message:String(k))}},_=async()=>{i(null);try{await P2()}catch(k){i(k instanceof Error?k.message:String(k))}};return h.jsxs("div",{className:"tl-authbar-mount",children:[h.jsx(z2,{user:t,authLoading:e,onLogin:f,onLogout:_,apiBase:s,compact:u}),c&&h.jsx("div",{className:"tl-error",children:c})]})}function hT(t){const{user:e}=Yv({suppressErrors:!0}),n=Ns(t.apiBase??"");return h.jsx("div",{className:"tl-feed-shell py-2 w-full transition-all duration-500",children:h.jsx(X2,{apiBase:n,feed:t.feed,category:t.category??"",initialMemeId:t.initialMemeId,initialSearchQuery:t.initialSearchQuery,suggestRepost:t.suggestRepost||t.postAction==="suggest-repost",openRepost:t.openRepost||t.postAction==="open-repost",user:e})})}function t_(t){const e=e_(t);e&&e.render(h.jsx(wm.StrictMode,{children:h.jsx(dT,{})}))}function n_(t,e={}){const n=e_(t);n&&n.render(h.jsx(wm.StrictMode,{children:h.jsx(hT,{...e})}))}window.TimelineEmbed={mountLogin:t_,mountFeed:n_,unmount:oT};const om=document.getElementById("header"),Dr=document.getElementById("root"),Vn=qd(window.location);var lm;if(Dr){const t=(lm=Dr.getAttribute("data-feed"))==null?void 0:lm.trim(),e=Iy(t),n=Dr.getAttribute("data-category")??"";Vn.feed?co(Vn.feed):e?co(e):n.trim()||co("home")}om&&t_(om);var am,um;if(Dr){const t=Ns(Dr.getAttribute("data-api-base")??""),e=Dr.getAttribute("data-category")??"",n=(am=Dr.getAttribute("data-feed"))==null?void 0:am.trim(),r
2258=Iy(n),i={apiBase:t};Vn.feed?i.feed=Vn.feed:r?i.feed=r:e.trim()?i.category=e:i.feed="home",Vn.initialMemeId&&(i.initialMemeId=Vn.initialMemeId),Vn.postAction&&(i.postAction=Vn.postAction),(um=Vn.searchQuery)!=null&&um.trim()&&(i.initialSearchQuery=Vn.searchQuery.trim()),n_(Dr,i)}
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.