const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["ManageLandingPage-Ds27c7b8.mjs","AuthenticatedLayout-Wif50tHm.mjs","index-CMsXSJFI.mjs","ErrorBoundary-BOZtjfPT.mjs","AuthenticatedLayout-DoHNBmM9.css","CustomInput-B-PBeaxJ.mjs","utils-MTmaJVH-.mjs","index-BK0nVWds.mjs","CustomTextarea-AreEFgEU.mjs","Button-BTFCBnMu.mjs","Admin-DXHVMc4L.css","ManagePlayerRegistration-Dzkjxfn9.mjs","format-cwXK75ha.mjs","ManageProShop-DRSoaRyA.mjs","ManageTournament-BAhO4bR-.mjs","EditTournament-BxhUVMU7.mjs","PrimaryButton-D5iCKctU.mjs","transition-DEXpyXxd.mjs","EditTournament-Hec2WTOF.css","EditTournamentCourse-DLK8FW7u.mjs","EditCourseTee-BxpTdPf-.mjs","EditTournamentPlayer-C173MVzj.mjs","CreateGame-BP7loBrG.mjs","PlayerScoreCard-S4GyMLcQ.mjs","FormatHtml-BMUkyhT-.mjs","emotion-react.browser.esm-CUEDQqpc.mjs","TransitionGroupContext-Di1pr8UX.mjs","TransitionGroup-D7udTpD5.mjs","Transition-BgjhU2IT.mjs","ManageTournamentPrizes-OJfOD-wE.mjs","CreateTournament-C2JB77eQ.mjs","EditTournamentGames-CAk0kFxg.mjs","EditTournamentPrizes-ek2Xh9Az.mjs","ConfirmPassword-BVMFPojm.mjs","GuestLayout-D693SH9e.mjs","InputError-CyxER2Uz.mjs","InputLabel-CyQW9NKp.mjs","TextInput-B9ar76TT.mjs","ForgotPassword-Bq05FEk4.mjs","Login-CH1KU-ty.mjs","Register-Df3Ycj84.mjs","ResetPassword-DVGyY_Dg.mjs","VerifyEmail-CJq-Fur0.mjs","NotFound-Dcsh2Iqs.mjs","Game-Q-7q9vsl.mjs","TournamentCard-DRsePv7D.mjs","Game-Dxb0p86S.css","ProShop-BMto7aUH.mjs","Tournament-BUGAHMOh.mjs","TournamentRegistration-PJs0wxrK.mjs","About-aXR-oVGy.mjs","SEO-B5YZ0rHH.mjs","DefaultPropsProvider-BXt93Vrw.mjs","useIsFocusVisible-DpcX7bZh.mjs","useForkRef-CfZH1qd8.mjs","GTJAPrompt-eNLs4HHf.mjs","useEventCallback-B9fiCZ0O.mjs","GeneralScoreBoard-UPxK2QNA.mjs","Tools-ucQBcX_w.mjs","Landing-zPPY6yv5.mjs","Landing-CuP963aq.css","NewsCorner-C_V4oU80.mjs","ShowTournament-D49VW8m3.mjs","Tournaments-CFQoZFX6.mjs","Edit-D8U9uIO7.mjs","DeleteUserForm-CuzLJKeP.mjs","UpdatePasswordForm-Juvy1IfA.mjs","UpdateProfileInformationForm-CQo-to52.mjs","Scoreboard-ESMlkDsU.mjs","Scoreboard-Bf3aAHCT.css","Dashboard-DfXb2twV.mjs","Registration-BbESTG67.mjs"])))=>i.map(i=>d[i]); function O_(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const b_="modulepreload",R_=function(e){return"/build/"+e},Bd={},V=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),a=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));i=Promise.allSettled(n.map(l=>{if(l=R_(l),l in Bd)return;Bd[l]=!0;const u=l.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${c}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":b_,u||(f.as="script"),f.crossOrigin="",f.href=l,a&&f.setAttribute("nonce",a),document.head.appendChild(f),u)return new Promise((p,w)=>{f.addEventListener("load",p),f.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${l}`)))})}))}function o(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return i.then(s=>{for(const a of s||[])a.status==="rejected"&&o(a.reason);return t().catch(o)})};var N_=typeof globalThis<"u"?globalThis:typeof window<"u"||typeof window<"u"?window:typeof self<"u"?self:{};function Lo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function x_(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var Om={exports:{}},La={},bm={exports:{}},W={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Mo=Symbol.for("react.element"),D_=Symbol.for("react.portal"),L_=Symbol.for("react.fragment"),M_=Symbol.for("react.strict_mode"),$_=Symbol.for("react.profiler"),F_=Symbol.for("react.provider"),U_=Symbol.for("react.context"),B_=Symbol.for("react.forward_ref"),z_=Symbol.for("react.suspense"),j_=Symbol.for("react.memo"),V_=Symbol.for("react.lazy"),zd=Symbol.iterator;function H_(e){return e===null||typeof e!="object"?null:(e=zd&&e[zd]||e["@@iterator"],typeof e=="function"?e:null)}var Rm={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Nm=Object.assign,xm={};function wi(e,t,n){this.props=e,this.context=t,this.refs=xm,this.updater=n||Rm}wi.prototype.isReactComponent={};wi.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};wi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Dm(){}Dm.prototype=wi.prototype;function zc(e,t,n){this.props=e,this.context=t,this.refs=xm,this.updater=n||Rm}var jc=zc.prototype=new Dm;jc.constructor=zc;Nm(jc,wi.prototype);jc.isPureReactComponent=!0;var jd=Array.isArray,Lm=Object.prototype.hasOwnProperty,Vc={current:null},Mm={key:!0,ref:!0,__self:!0,__source:!0};function $m(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)Lm.call(t,r)&&!Mm.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1t=>{const n=nS.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),xt=e=>(e=e.toLowerCase(),t=>Ma(t)===e),$a=e=>t=>typeof t===e,{isArray:_i}=Array,lo=$a("undefined");function rS(e){return e!==null&&!lo(e)&&e.constructor!==null&&!lo(e.constructor)&&ot(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const zm=xt("ArrayBuffer");function iS(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&zm(e.buffer),t}const oS=$a("string"),ot=$a("function"),jm=$a("number"),Fa=e=>e!==null&&typeof e=="object",sS=e=>e===!0||e===!1,Os=e=>{if(Ma(e)!=="object")return!1;const t=Wc(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},aS=xt("Date"),lS=xt("File"),uS=xt("Blob"),cS=xt("FileList"),fS=e=>Fa(e)&&ot(e.pipe),dS=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ot(e.append)&&((t=Ma(e))==="formdata"||t==="object"&&ot(e.toString)&&e.toString()==="[object FormData]"))},pS=xt("URLSearchParams"),[hS,mS,gS,yS]=["ReadableStream","Request","Response","Headers"].map(xt),vS=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function $o(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),_i(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}const ar=typeof globalThis<"u"?globalThis:typeof self<"u"?self:window,Hm=e=>!lo(e)&&e!==ar;function Eu(){const{caseless:e}=Hm(this)&&this||{},t={},n=(r,i)=>{const o=e&&Vm(t,i)||i;Os(t[o])&&Os(r)?t[o]=Eu(t[o],r):Os(r)?t[o]=Eu({},r):_i(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r($o(t,(i,o)=>{n&&ot(i)?e[o]=Bm(i,n):e[o]=i},{allOwnKeys:r}),e),_S=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),SS=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},ES=(e,t,n,r)=>{let i,o,s;const a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],(!r||r(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=n!==!1&&Wc(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},TS=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},IS=e=>{if(!e)return null;if(_i(e))return e;let t=e.length;if(!jm(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},kS=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Wc(Uint8Array)),PS=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},AS=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},CS=xt("HTMLFormElement"),OS=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),Hd=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),bS=xt("RegExp"),Wm=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};$o(n,(i,o)=>{let s;(s=t(i,o,e))!==!1&&(r[o]=s||i)}),Object.defineProperties(e,r)},RS=e=>{Wm(e,(t,n)=>{if(ot(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(ot(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},NS=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return _i(e)?r(e):r(String(e).split(t)),n},xS=()=>{},DS=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,wl="abcdefghijklmnopqrstuvwxyz",Wd="0123456789",Km={DIGIT:Wd,ALPHA:wl,ALPHA_DIGIT:wl+wl.toUpperCase()+Wd},LS=(e=16,t=Km.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function MS(e){return!!(e&&ot(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const $S=e=>{const t=new Array(10),n=(r,i)=>{if(Fa(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const o=_i(r)?[]:{};return $o(r,(s,a)=>{const l=n(s,i+1);!lo(l)&&(o[a]=l)}),t[i]=void 0,o}}return r};return n(e,0)},FS=xt("AsyncFunction"),US=e=>e&&(Fa(e)||ot(e))&&ot(e.then)&&ot(e.catch),qm=((e,t)=>e?setImmediate:t?((n,r)=>(ar.addEventListener("message",({source:i,data:o})=>{i===ar&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),ar.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",ot(ar.postMessage)),BS=typeof queueMicrotask<"u"?queueMicrotask.bind(ar):typeof process<"u"&&process.nextTick||qm,I={isArray:_i,isArrayBuffer:zm,isBuffer:rS,isFormData:dS,isArrayBufferView:iS,isString:oS,isNumber:jm,isBoolean:sS,isObject:Fa,isPlainObject:Os,isReadableStream:hS,isRequest:mS,isResponse:gS,isHeaders:yS,isUndefined:lo,isDate:aS,isFile:lS,isBlob:uS,isRegExp:bS,isFunction:ot,isStream:fS,isURLSearchParams:pS,isTypedArray:kS,isFileList:cS,forEach:$o,merge:Eu,extend:wS,trim:vS,stripBOM:_S,inherits:SS,toFlatObject:ES,kindOf:Ma,kindOfTest:xt,endsWith:TS,toArray:IS,forEachEntry:PS,matchAll:AS,isHTMLForm:CS,hasOwnProperty:Hd,hasOwnProp:Hd,reduceDescriptors:Wm,freezeMethods:RS,toObjectSet:NS,toCamelCase:OS,noop:xS,toFiniteNumber:DS,findKey:Vm,global:ar,isContextDefined:Hm,ALPHABET:Km,generateString:LS,isSpecCompliantForm:MS,toJSONObject:$S,isAsyncFn:FS,isThenable:US,setImmediate:qm,asap:BS};function z(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}I.inherits(z,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:I.toJSONObject(this.config),code:this.code,status:this.status}}});const Gm=z.prototype,Qm={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Qm[e]={value:e}});Object.defineProperties(z,Qm);Object.defineProperty(Gm,"isAxiosError",{value:!0});z.from=(e,t,n,r,i,o)=>{const s=Object.create(Gm);return I.toFlatObject(e,s,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),z.call(s,e.message,t,n,r,i),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};const zS=null;function Tu(e){return I.isPlainObject(e)||I.isArray(e)}function Jm(e){return I.endsWith(e,"[]")?e.slice(0,-2):e}function Kd(e,t,n){return e?e.concat(t).map(function(i,o){return i=Jm(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function jS(e){return I.isArray(e)&&!e.some(Tu)}const VS=I.toFlatObject(I,{},null,function(t){return/^is[A-Z]/.test(t)});function Ua(e,t,n){if(!I.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=I.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,T){return!I.isUndefined(T[v])});const r=n.metaTokens,i=n.visitor||c,o=n.dots,s=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&I.isSpecCompliantForm(t);if(!I.isFunction(i))throw new TypeError("visitor must be a function");function u(d){if(d===null)return"";if(I.isDate(d))return d.toISOString();if(!l&&I.isBlob(d))throw new z("Blob is not supported. Use a Buffer instead.");return I.isArrayBuffer(d)||I.isTypedArray(d)?l&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function c(d,v,T){let y=d;if(d&&!T&&typeof d=="object"){if(I.endsWith(v,"{}"))v=r?v:v.slice(0,-2),d=JSON.stringify(d);else if(I.isArray(d)&&jS(d)||(I.isFileList(d)||I.endsWith(v,"[]"))&&(y=I.toArray(d)))return v=Jm(v),y.forEach(function(m,S){!(I.isUndefined(m)||m===null)&&t.append(s===!0?Kd([v],S,o):s===null?v:v+"[]",u(m))}),!1}return Tu(d)?!0:(t.append(Kd(T,v,o),u(d)),!1)}const f=[],p=Object.assign(VS,{defaultVisitor:c,convertValue:u,isVisitable:Tu});function w(d,v){if(!I.isUndefined(d)){if(f.indexOf(d)!==-1)throw Error("Circular reference detected in "+v.join("."));f.push(d),I.forEach(d,function(y,h){(!(I.isUndefined(y)||y===null)&&i.call(t,y,I.isString(h)?h.trim():h,v,p))===!0&&w(y,v?v.concat(h):[h])}),f.pop()}}if(!I.isObject(e))throw new TypeError("data must be an object");return w(e),t}function qd(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Kc(e,t){this._pairs=[],e&&Ua(e,this,t)}const Xm=Kc.prototype;Xm.append=function(t,n){this._pairs.push([t,n])};Xm.toString=function(t){const n=t?function(r){return t.call(this,r,qd)}:qd;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function HS(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ym(e,t,n){if(!t)return e;const r=n&&n.encode||HS;I.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let o;if(i?o=i(t,n):o=I.isURLSearchParams(t)?t.toString():new Kc(t,n).toString(r),o){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class Gd{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){I.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Zm={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},WS=typeof URLSearchParams<"u"?URLSearchParams:Kc,KS=typeof FormData<"u"?FormData:null,qS=typeof Blob<"u"?Blob:null,GS={isBrowser:!0,classes:{URLSearchParams:WS,FormData:KS,Blob:qS},protocols:["http","https","file","blob","url","data"]},qc=typeof window<"u"&&typeof document<"u",Iu=typeof navigator=="object"&&navigator||void 0,QS=qc&&(!Iu||["ReactNative","NativeScript","NS"].indexOf(Iu.product)<0),JS=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",XS=qc&&window.location.href||"http://localhost",YS=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:qc,hasStandardBrowserEnv:QS,hasStandardBrowserWebWorkerEnv:JS,navigator:Iu,origin:XS},Symbol.toStringTag,{value:"Module"})),Fe={...YS,...GS};function ZS(e,t){return Ua(e,new Fe.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Fe.isNode&&I.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function e1(e){return I.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function t1(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r=n.length;return s=!s&&I.isArray(i)?i.length:s,l?(I.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!I.isObject(i[s]))&&(i[s]=[]),t(n,r,i[s],o)&&I.isArray(i[s])&&(i[s]=t1(i[s])),!a)}if(I.isFormData(e)&&I.isFunction(e.entries)){const n={};return I.forEachEntry(e,(r,i)=>{t(e1(r),i,n,0)}),n}return null}function n1(e,t,n){if(I.isString(e))try{return(t||JSON.parse)(e),I.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const Fo={transitional:Zm,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=I.isObject(t);if(o&&I.isHTMLForm(t)&&(t=new FormData(t)),I.isFormData(t))return i?JSON.stringify(eg(t)):t;if(I.isArrayBuffer(t)||I.isBuffer(t)||I.isStream(t)||I.isFile(t)||I.isBlob(t)||I.isReadableStream(t))return t;if(I.isArrayBufferView(t))return t.buffer;if(I.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return ZS(t,this.formSerializer).toString();if((a=I.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Ua(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),n1(t)):t}],transformResponse:[function(t){const n=this.transitional||Fo.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(I.isResponse(t)||I.isReadableStream(t))return t;if(t&&I.isString(t)&&(r&&!this.responseType||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(a){if(s)throw a.name==="SyntaxError"?z.from(a,z.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Fe.classes.FormData,Blob:Fe.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};I.forEach(["delete","get","head","post","put","patch"],e=>{Fo.headers[e]={}});const r1=I.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),i1=e=>{const t={};let n,r,i;return e&&e.split(` `).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||t[n]&&r1[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Qd=Symbol("internals");function Ri(e){return e&&String(e).trim().toLowerCase()}function bs(e){return e===!1||e==null?e:I.isArray(e)?e.map(bs):String(e)}function o1(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const s1=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function _l(e,t,n,r,i){if(I.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!I.isString(t)){if(I.isString(r))return t.indexOf(r)!==-1;if(I.isRegExp(r))return r.test(t)}}function a1(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function l1(e,t){const n=I.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,s){return this[r].call(this,t,i,o,s)},configurable:!0})})}class Je{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(a,l,u){const c=Ri(l);if(!c)throw new Error("header name must be a non-empty string");const f=I.findKey(i,c);(!f||i[f]===void 0||u===!0||u===void 0&&i[f]!==!1)&&(i[f||l]=bs(a))}const s=(a,l)=>I.forEach(a,(u,c)=>o(u,c,l));if(I.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(I.isString(t)&&(t=t.trim())&&!s1(t))s(i1(t),n);else if(I.isHeaders(t))for(const[a,l]of t.entries())o(l,a,r);else t!=null&&o(n,t,r);return this}get(t,n){if(t=Ri(t),t){const r=I.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return o1(i);if(I.isFunction(n))return n.call(this,i,r);if(I.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Ri(t),t){const r=I.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||_l(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(s){if(s=Ri(s),s){const a=I.findKey(r,s);a&&(!n||_l(r,r[a],a,n))&&(delete r[a],i=!0)}}return I.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||_l(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return I.forEach(this,(i,o)=>{const s=I.findKey(r,o);if(s){n[s]=bs(i),delete n[o];return}const a=t?a1(o):String(o).trim();a!==o&&delete n[o],n[a]=bs(i),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return I.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&I.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[Qd]=this[Qd]={accessors:{}}).accessors,i=this.prototype;function o(s){const a=Ri(s);r[a]||(l1(i,s),r[a]=!0)}return I.isArray(t)?t.forEach(o):o(t),this}}Je.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);I.reduceDescriptors(Je.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});I.freezeMethods(Je);function Sl(e,t){const n=this||Fo,r=t||n,i=Je.from(r.headers);let o=r.data;return I.forEach(e,function(a){o=a.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function tg(e){return!!(e&&e.__CANCEL__)}function Si(e,t,n){z.call(this,e??"canceled",z.ERR_CANCELED,t,n),this.name="CanceledError"}I.inherits(Si,z,{__CANCEL__:!0});function ng(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new z("Request failed with status code "+n.status,[z.ERR_BAD_REQUEST,z.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function u1(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function c1(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,s;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=r[o];s||(s=u),n[i]=l,r[i]=u;let f=o,p=0;for(;f!==i;)p+=n[f++],f=f%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),u-s{n=c,i=null,o&&(clearTimeout(o),o=null),e.apply(null,u)};return[(...u)=>{const c=Date.now(),f=c-n;f>=r?s(u,c):(i=u,o||(o=setTimeout(()=>{o=null,s(i)},r-f)))},()=>i&&s(i)]}const Qs=(e,t,n=3)=>{let r=0;const i=c1(50,250);return f1(o=>{const s=o.loaded,a=o.lengthComputable?o.total:void 0,l=s-r,u=i(l),c=s<=a;r=s;const f={loaded:s,total:a,progress:a?s/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a&&c?(a-s)/u:void 0,event:o,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(f)},n)},Jd=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Xd=e=>(...t)=>I.asap(()=>e(...t)),d1=Fe.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Fe.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Fe.origin),Fe.navigator&&/(msie|trident)/i.test(Fe.navigator.userAgent)):()=>!0,p1=Fe.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const s=[e+"="+encodeURIComponent(t)];I.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),I.isString(r)&&s.push("path="+r),I.isString(i)&&s.push("domain="+i),o===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function h1(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function m1(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function rg(e,t){return e&&!h1(t)?m1(e,t):t}const Yd=e=>e instanceof Je?{...e}:e;function wr(e,t){t=t||{};const n={};function r(u,c,f,p){return I.isPlainObject(u)&&I.isPlainObject(c)?I.merge.call({caseless:p},u,c):I.isPlainObject(c)?I.merge({},c):I.isArray(c)?c.slice():c}function i(u,c,f,p){if(I.isUndefined(c)){if(!I.isUndefined(u))return r(void 0,u,f,p)}else return r(u,c,f,p)}function o(u,c){if(!I.isUndefined(c))return r(void 0,c)}function s(u,c){if(I.isUndefined(c)){if(!I.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function a(u,c,f){if(f in t)return r(u,c);if(f in e)return r(void 0,u)}const l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(u,c,f)=>i(Yd(u),Yd(c),f,!0)};return I.forEach(Object.keys(Object.assign({},e,t)),function(c){const f=l[c]||i,p=f(e[c],t[c],c);I.isUndefined(p)&&f!==a||(n[c]=p)}),n}const ig=e=>{const t=wr({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:a}=t;t.headers=s=Je.from(s),t.url=Ym(rg(t.baseURL,t.url),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if(I.isFormData(n)){if(Fe.hasStandardBrowserEnv||Fe.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((l=s.getContentType())!==!1){const[u,...c]=l?l.split(";").map(f=>f.trim()).filter(Boolean):[];s.setContentType([u||"multipart/form-data",...c].join("; "))}}if(Fe.hasStandardBrowserEnv&&(r&&I.isFunction(r)&&(r=r(t)),r||r!==!1&&d1(t.url))){const u=i&&o&&p1.read(o);u&&s.set(i,u)}return t},g1=typeof XMLHttpRequest<"u",y1=g1&&function(e){return new Promise(function(n,r){const i=ig(e);let o=i.data;const s=Je.from(i.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=i,c,f,p,w,d;function v(){w&&w(),d&&d(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let T=new XMLHttpRequest;T.open(i.method.toUpperCase(),i.url,!0),T.timeout=i.timeout;function y(){if(!T)return;const m=Je.from("getAllResponseHeaders"in T&&T.getAllResponseHeaders()),k={data:!a||a==="text"||a==="json"?T.responseText:T.response,status:T.status,statusText:T.statusText,headers:m,config:e,request:T};ng(function(A){n(A),v()},function(A){r(A),v()},k),T=null}"onloadend"in T?T.onloadend=y:T.onreadystatechange=function(){!T||T.readyState!==4||T.status===0&&!(T.responseURL&&T.responseURL.indexOf("file:")===0)||setTimeout(y)},T.onabort=function(){T&&(r(new z("Request aborted",z.ECONNABORTED,e,T)),T=null)},T.onerror=function(){r(new z("Network Error",z.ERR_NETWORK,e,T)),T=null},T.ontimeout=function(){let S=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const k=i.transitional||Zm;i.timeoutErrorMessage&&(S=i.timeoutErrorMessage),r(new z(S,k.clarifyTimeoutError?z.ETIMEDOUT:z.ECONNABORTED,e,T)),T=null},o===void 0&&s.setContentType(null),"setRequestHeader"in T&&I.forEach(s.toJSON(),function(S,k){T.setRequestHeader(k,S)}),I.isUndefined(i.withCredentials)||(T.withCredentials=!!i.withCredentials),a&&a!=="json"&&(T.responseType=i.responseType),u&&([p,d]=Qs(u,!0),T.addEventListener("progress",p)),l&&T.upload&&([f,w]=Qs(l),T.upload.addEventListener("progress",f),T.upload.addEventListener("loadend",w)),(i.cancelToken||i.signal)&&(c=m=>{T&&(r(!m||m.type?new Si(null,e,T):m),T.abort(),T=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const h=u1(i.url);if(h&&Fe.protocols.indexOf(h)===-1){r(new z("Unsupported protocol "+h+":",z.ERR_BAD_REQUEST,e));return}T.send(o||null)})},v1=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const o=function(u){if(!i){i=!0,a();const c=u instanceof Error?u:this.reason;r.abort(c instanceof z?c:new Si(c instanceof Error?c.message:c))}};let s=t&&setTimeout(()=>{s=null,o(new z(`timeout ${t} of ms exceeded`,z.ETIMEDOUT))},t);const a=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(o):u.removeEventListener("abort",o)}),e=null)};e.forEach(u=>u.addEventListener("abort",o));const{signal:l}=r;return l.unsubscribe=()=>I.asap(a),l}},w1=function*(e,t){let n=e.byteLength;if(n{const i=_1(e,t);let o=0,s,a=l=>{s||(s=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await i.next();if(u){a(),l.close();return}let f=c.byteLength;if(n){let p=o+=f;n(p)}l.enqueue(new Uint8Array(c))}catch(u){throw a(u),u}},cancel(l){return a(l),i.return()}},{highWaterMark:2})},Ba=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",og=Ba&&typeof ReadableStream=="function",E1=Ba&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),sg=(e,...t)=>{try{return!!e(...t)}catch{return!1}},T1=og&&sg(()=>{let e=!1;const t=new Request(Fe.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),ep=64*1024,ku=og&&sg(()=>I.isReadableStream(new Response("").body)),Js={stream:ku&&(e=>e.body)};Ba&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Js[t]&&(Js[t]=I.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new z(`Response type '${t}' is not supported`,z.ERR_NOT_SUPPORT,r)})})})(new Response);const I1=async e=>{if(e==null)return 0;if(I.isBlob(e))return e.size;if(I.isSpecCompliantForm(e))return(await new Request(Fe.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(I.isArrayBufferView(e)||I.isArrayBuffer(e))return e.byteLength;if(I.isURLSearchParams(e)&&(e=e+""),I.isString(e))return(await E1(e)).byteLength},k1=async(e,t)=>{const n=I.toFiniteNumber(e.getContentLength());return n??I1(t)},P1=Ba&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:o,timeout:s,onDownloadProgress:a,onUploadProgress:l,responseType:u,headers:c,withCredentials:f="same-origin",fetchOptions:p}=ig(e);u=u?(u+"").toLowerCase():"text";let w=v1([i,o&&o.toAbortSignal()],s),d;const v=w&&w.unsubscribe&&(()=>{w.unsubscribe()});let T;try{if(l&&T1&&n!=="get"&&n!=="head"&&(T=await k1(c,r))!==0){let k=new Request(t,{method:"POST",body:r,duplex:"half"}),C;if(I.isFormData(r)&&(C=k.headers.get("content-type"))&&c.setContentType(C),k.body){const[A,_]=Jd(T,Qs(Xd(l)));r=Zd(k.body,ep,A,_)}}I.isString(f)||(f=f?"include":"omit");const y="credentials"in Request.prototype;d=new Request(t,{...p,signal:w,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:y?f:void 0});let h=await fetch(d);const m=ku&&(u==="stream"||u==="response");if(ku&&(a||m&&v)){const k={};["status","statusText","headers"].forEach(P=>{k[P]=h[P]});const C=I.toFiniteNumber(h.headers.get("content-length")),[A,_]=a&&Jd(C,Qs(Xd(a),!0))||[];h=new Response(Zd(h.body,ep,A,()=>{_&&_(),v&&v()}),k)}u=u||"text";let S=await Js[I.findKey(Js,u)||"text"](h,e);return!m&&v&&v(),await new Promise((k,C)=>{ng(k,C,{data:S,headers:Je.from(h.headers),status:h.status,statusText:h.statusText,config:e,request:d})})}catch(y){throw v&&v(),y&&y.name==="TypeError"&&/fetch/i.test(y.message)?Object.assign(new z("Network Error",z.ERR_NETWORK,e,d),{cause:y.cause||y}):z.from(y,y&&y.code,e,d)}}),Pu={http:zS,xhr:y1,fetch:P1};I.forEach(Pu,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const tp=e=>`- ${e}`,A1=e=>I.isFunction(e)||e===null||e===!1,ag={getAdapter:e=>{e=I.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let o=0;o`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=t?o.length>1?`since : `+o.map(tp).join(` `):" "+tp(o[0]):"as no adapter specified";throw new z("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:Pu};function El(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Si(null,e)}function np(e){return El(e),e.headers=Je.from(e.headers),e.data=Sl.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ag.getAdapter(e.adapter||Fo.adapter)(e).then(function(r){return El(e),r.data=Sl.call(e,e.transformResponse,r),r.headers=Je.from(r.headers),r},function(r){return tg(r)||(El(e),r&&r.response&&(r.response.data=Sl.call(e,e.transformResponse,r.response),r.response.headers=Je.from(r.response.headers))),Promise.reject(r)})}const lg="1.7.8",za={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{za[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const rp={};za.transitional=function(t,n,r){function i(o,s){return"[Axios v"+lg+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,a)=>{if(t===!1)throw new z(i(s," has been removed"+(n?" in "+n:"")),z.ERR_DEPRECATED);return n&&!rp[s]&&(rp[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,s,a):!0}};za.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function C1(e,t,n){if(typeof e!="object")throw new z("options must be an object",z.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],s=t[o];if(s){const a=e[o],l=a===void 0||s(a,o,e);if(l!==!0)throw new z("option "+o+" must be "+l,z.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new z("Unknown option "+o,z.ERR_BAD_OPTION)}}const Rs={assertOptions:C1,validators:za},Lt=Rs.validators;class dr{constructor(t){this.defaults=t,this.interceptors={request:new Gd,response:new Gd}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` `+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=wr(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Rs.assertOptions(r,{silentJSONParsing:Lt.transitional(Lt.boolean),forcedJSONParsing:Lt.transitional(Lt.boolean),clarifyTimeoutError:Lt.transitional(Lt.boolean)},!1),i!=null&&(I.isFunction(i)?n.paramsSerializer={serialize:i}:Rs.assertOptions(i,{encode:Lt.function,serialize:Lt.function},!0)),Rs.assertOptions(n,{baseUrl:Lt.spelling("baseURL"),withXsrfToken:Lt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&I.merge(o.common,o[n.method]);o&&I.forEach(["delete","get","head","post","put","patch","common"],d=>{delete o[d]}),n.headers=Je.concat(s,o);const a=[];let l=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(l=l&&v.synchronous,a.unshift(v.fulfilled,v.rejected))});const u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let c,f=0,p;if(!l){const d=[np.bind(this),void 0];for(d.unshift.apply(d,a),d.push.apply(d,u),p=d.length,c=Promise.resolve(n);f{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(a=>{r.subscribe(a),o=a}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},t(function(o,s,a){r.reason||(r.reason=new Si(o,s,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Gc(function(i){t=i}),cancel:t}}}function O1(e){return function(n){return e.apply(null,n)}}function b1(e){return I.isObject(e)&&e.isAxiosError===!0}const Au={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Au).forEach(([e,t])=>{Au[t]=e});function ug(e){const t=new dr(e),n=Bm(dr.prototype.request,t);return I.extend(n,dr.prototype,t,{allOwnKeys:!0}),I.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return ug(wr(e,i))},n}const ue=ug(Fo);ue.Axios=dr;ue.CanceledError=Si;ue.CancelToken=Gc;ue.isCancel=tg;ue.VERSION=lg;ue.toFormData=Ua;ue.AxiosError=z;ue.Cancel=ue.CanceledError;ue.all=function(t){return Promise.all(t)};ue.spread=O1;ue.isAxiosError=b1;ue.mergeConfig=wr;ue.AxiosHeaders=Je;ue.formToJSON=e=>eg(I.isHTMLForm(e)?new FormData(e):e);ue.getAdapter=ag.getAdapter;ue.HttpStatusCode=Au;ue.default=ue;window.axios=ue;window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";var ip={};/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const cg=function(e){const t=[];let n=0;for(let r=0;r>6|192,t[n++]=i&63|128):(i&64512)===55296&&r+1>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=i&63|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=i&63|128)}return t},R1=function(e){const t=[];let n=0,r=0;for(;n191&&i<224){const o=e[n++];t[r++]=String.fromCharCode((i&31)<<6|o&63)}else if(i>239&&i<365){const o=e[n++],s=e[n++],a=e[n++],l=((i&7)<<18|(o&63)<<12|(s&63)<<6|a&63)-65536;t[r++]=String.fromCharCode(55296+(l>>10)),t[r++]=String.fromCharCode(56320+(l&1023))}else{const o=e[n++],s=e[n++];t[r++]=String.fromCharCode((i&15)<<12|(o&63)<<6|s&63)}}return t.join("")},fg={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(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let i=0;i>2,f=(o&3)<<4|a>>4;let p=(a&15)<<2|u>>6,w=u&63;l||(w=64,s||(p=64)),r.push(n[c],n[f],n[p],n[w])}return r.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(cg(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):R1(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let i=0;i>4;if(r.push(p),u!==64){const w=a<<4&240|u>>2;if(r.push(w),f!==64){const d=u<<6&192|f;r.push(d)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};class N1 extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const x1=function(e){const t=cg(e);return fg.encodeByteArray(t,!0)},dg=function(e){return x1(e).replace(/\./g,"")},pg=function(e){try{return fg.decodeString(e,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};/** * @license * Copyright 2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function D1(){if(typeof self<"u")return self;if(typeof window<"u"||typeof window<"u")return window;throw new Error("Unable to locate global object.")}/** * @license * Copyright 2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const L1=()=>D1().__FIREBASE_DEFAULTS__,M1=()=>{if(typeof process>"u"||typeof ip>"u")return;const e=ip.__FIREBASE_DEFAULTS__;if(e)return JSON.parse(e)},$1=()=>{if(typeof document>"u")return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const t=e&&pg(e[1]);return t&&JSON.parse(t)},Qc=()=>{try{return L1()||M1()||$1()}catch(e){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`);return}},F1=e=>{var t,n;return(n=(t=Qc())===null||t===void 0?void 0:t.emulatorHosts)===null||n===void 0?void 0:n[e]},hg=()=>{var e;return(e=Qc())===null||e===void 0?void 0:e.config},mg=e=>{var t;return(t=Qc())===null||t===void 0?void 0:t[`_${e}`]};/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class U1{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((t,n)=>{this.resolve=t,this.reject=n})}wrapCallback(t){return(n,r)=>{n?this.reject(n):this.resolve(r),typeof t=="function"&&(this.promise.catch(()=>{}),t.length===1?t(n):t(n,r))}}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function We(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function B1(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(We())}function z1(){return typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers"}function gg(){const e=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof e=="object"&&e.id!==void 0}function j1(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function V1(){const e=We();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}function Jc(){try{return typeof indexedDB=="object"}catch{return!1}}function Xc(){return new Promise((e,t)=>{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),e(!0)},i.onupgradeneeded=()=>{n=!1},i.onerror=()=>{var o;t(((o=i.error)===null||o===void 0?void 0:o.message)||"")}}catch(n){t(n)}})}function yg(){return!(typeof navigator>"u"||!navigator.cookieEnabled)}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const H1="FirebaseError";class qt extends Error{constructor(t,n,r){super(n),this.code=t,this.customData=r,this.name=H1,Object.setPrototypeOf(this,qt.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,qn.prototype.create)}}class qn{constructor(t,n,r){this.service=t,this.serviceName=n,this.errors=r}create(t,...n){const r=n[0]||{},i=`${this.service}/${t}`,o=this.errors[t],s=o?W1(o,r):"Error",a=`${this.serviceName}: ${s} (${i}).`;return new qt(i,a,r)}}function W1(e,t){return e.replace(K1,(n,r)=>{const i=t[r];return i!=null?String(i):`<${r}?>`})}const K1=/\{\$([^}]+)}/g;function q1(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function uo(e,t){if(e===t)return!0;const n=Object.keys(e),r=Object.keys(t);for(const i of n){if(!r.includes(i))return!1;const o=e[i],s=t[i];if(op(o)&&op(s)){if(!uo(o,s))return!1}else if(o!==s)return!1}for(const i of r)if(!n.includes(i))return!1;return!0}function op(e){return e!==null&&typeof e=="object"}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function Uo(e){const t=[];for(const[n,r]of Object.entries(e))Array.isArray(r)?r.forEach(i=>{t.push(encodeURIComponent(n)+"="+encodeURIComponent(i))}):t.push(encodeURIComponent(n)+"="+encodeURIComponent(r));return t.length?"&"+t.join("&"):""}function G1(e,t){const n=new Q1(e,t);return n.subscribe.bind(n)}class Q1{constructor(t,n){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=n,this.task.then(()=>{t(this)}).catch(r=>{this.error(r)})}next(t){this.forEachObserver(n=>{n.next(t)})}error(t){this.forEachObserver(n=>{n.error(t)}),this.close(t)}complete(){this.forEachObserver(t=>{t.complete()}),this.close()}subscribe(t,n,r){let i;if(t===void 0&&n===void 0&&r===void 0)throw new Error("Missing Observer.");J1(t,["next","error","complete"])?i=t:i={next:t,error:n,complete:r},i.next===void 0&&(i.next=Tl),i.error===void 0&&(i.error=Tl),i.complete===void 0&&(i.complete=Tl);const o=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),o}unsubscribeOne(t){this.observers===void 0||this.observers[t]===void 0||(delete this.observers[t],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(t){if(!this.finalized)for(let n=0;n{if(this.observers!==void 0&&this.observers[t]!==void 0)try{n(this.observers[t])}catch(r){typeof console<"u"&&console.error&&console.error(r)}})}close(t){this.finalized||(this.finalized=!0,t!==void 0&&(this.finalError=t),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function J1(e,t){if(typeof e!="object"||e===null)return!1;for(const n of t)if(n in e&&typeof e[n]=="function")return!0;return!1}function Tl(){}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const X1=1e3,Y1=2,Z1=4*60*60*1e3,eE=.5;function sp(e,t=X1,n=Y1){const r=t*Math.pow(n,e),i=Math.round(eE*r*(Math.random()-.5)*2);return Math.min(Z1,r+i)}/** * @license * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function ut(e){return e&&e._delegate?e._delegate:e}class _t{constructor(t,n,r){this.name=t,this.instanceFactory=n,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(t){return this.instantiationMode=t,this}setMultipleInstances(t){return this.multipleInstances=t,this}setServiceProps(t){return this.serviceProps=t,this}setInstanceCreatedCallback(t){return this.onInstanceCreated=t,this}}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const rr="[DEFAULT]";/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class tE{constructor(t,n){this.name=t,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(t){const n=this.normalizeInstanceIdentifier(t);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(t){var n;const r=this.normalizeInstanceIdentifier(t==null?void 0:t.identifier),i=(n=t==null?void 0:t.optional)!==null&&n!==void 0?n:!1;if(this.isInitialized(r)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:r})}catch(o){if(i)return null;throw o}else{if(i)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(t){if(t.name!==this.name)throw Error(`Mismatching Component ${t.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=t,!!this.shouldAutoInitialize()){if(rE(t))try{this.getOrInitializeService({instanceIdentifier:rr})}catch{}for(const[n,r]of this.instancesDeferred.entries()){const i=this.normalizeInstanceIdentifier(n);try{const o=this.getOrInitializeService({instanceIdentifier:i});r.resolve(o)}catch{}}}}clearInstance(t=rr){this.instancesDeferred.delete(t),this.instancesOptions.delete(t),this.instances.delete(t)}async delete(){const t=Array.from(this.instances.values());await Promise.all([...t.filter(n=>"INTERNAL"in n).map(n=>n.INTERNAL.delete()),...t.filter(n=>"_delete"in n).map(n=>n._delete())])}isComponentSet(){return this.component!=null}isInitialized(t=rr){return this.instances.has(t)}getOptions(t=rr){return this.instancesOptions.get(t)||{}}initialize(t={}){const{options:n={}}=t,r=this.normalizeInstanceIdentifier(t.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[o,s]of this.instancesDeferred.entries()){const a=this.normalizeInstanceIdentifier(o);r===a&&s.resolve(i)}return i}onInit(t,n){var r;const i=this.normalizeInstanceIdentifier(n),o=(r=this.onInitCallbacks.get(i))!==null&&r!==void 0?r:new Set;o.add(t),this.onInitCallbacks.set(i,o);const s=this.instances.get(i);return s&&t(s,i),()=>{o.delete(t)}}invokeOnInitCallbacks(t,n){const r=this.onInitCallbacks.get(n);if(r)for(const i of r)try{i(t,n)}catch{}}getOrInitializeService({instanceIdentifier:t,options:n={}}){let r=this.instances.get(t);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:nE(t),options:n}),this.instances.set(t,r),this.instancesOptions.set(t,n),this.invokeOnInitCallbacks(r,t),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,t,r)}catch{}return r||null}normalizeInstanceIdentifier(t=rr){return this.component?this.component.multipleInstances?t:rr:t}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function nE(e){return e===rr?void 0:e}function rE(e){return e.instantiationMode==="EAGER"}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class iE{constructor(t){this.name=t,this.providers=new Map}addComponent(t){const n=this.getProvider(t.name);if(n.isComponentSet())throw new Error(`Component ${t.name} has already been registered with ${this.name}`);n.setComponent(t)}addOrOverwriteComponent(t){this.getProvider(t.name).isComponentSet()&&this.providers.delete(t.name),this.addComponent(t)}getProvider(t){if(this.providers.has(t))return this.providers.get(t);const n=new tE(t,this);return this.providers.set(t,n),n}getProviders(){return Array.from(this.providers.values())}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */var Z;(function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"})(Z||(Z={}));const oE={debug:Z.DEBUG,verbose:Z.VERBOSE,info:Z.INFO,warn:Z.WARN,error:Z.ERROR,silent:Z.SILENT},sE=Z.INFO,aE={[Z.DEBUG]:"log",[Z.VERBOSE]:"log",[Z.INFO]:"info",[Z.WARN]:"warn",[Z.ERROR]:"error"},lE=(e,t,...n)=>{if(tt.some(n=>e instanceof n);let ap,lp;function cE(){return ap||(ap=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function fE(){return lp||(lp=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const vg=new WeakMap,Cu=new WeakMap,wg=new WeakMap,Il=new WeakMap,Zc=new WeakMap;function dE(e){const t=new Promise((n,r)=>{const i=()=>{e.removeEventListener("success",o),e.removeEventListener("error",s)},o=()=>{n(ln(e.result)),i()},s=()=>{r(e.error),i()};e.addEventListener("success",o),e.addEventListener("error",s)});return t.then(n=>{n instanceof IDBCursor&&vg.set(n,e)}).catch(()=>{}),Zc.set(t,e),t}function pE(e){if(Cu.has(e))return;const t=new Promise((n,r)=>{const i=()=>{e.removeEventListener("complete",o),e.removeEventListener("error",s),e.removeEventListener("abort",s)},o=()=>{n(),i()},s=()=>{r(e.error||new DOMException("AbortError","AbortError")),i()};e.addEventListener("complete",o),e.addEventListener("error",s),e.addEventListener("abort",s)});Cu.set(e,t)}let Ou={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return Cu.get(e);if(t==="objectStoreNames")return e.objectStoreNames||wg.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return ln(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function hE(e){Ou=e(Ou)}function mE(e){return e===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(t,...n){const r=e.call(kl(this),t,...n);return wg.set(r,t.sort?t.sort():[t]),ln(r)}:fE().includes(e)?function(...t){return e.apply(kl(this),t),ln(vg.get(this))}:function(...t){return ln(e.apply(kl(this),t))}}function gE(e){return typeof e=="function"?mE(e):(e instanceof IDBTransaction&&pE(e),uE(e,cE())?new Proxy(e,Ou):e)}function ln(e){if(e instanceof IDBRequest)return dE(e);if(Il.has(e))return Il.get(e);const t=gE(e);return t!==e&&(Il.set(e,t),Zc.set(t,e)),t}const kl=e=>Zc.get(e);function ja(e,t,{blocked:n,upgrade:r,blocking:i,terminated:o}={}){const s=indexedDB.open(e,t),a=ln(s);return r&&s.addEventListener("upgradeneeded",l=>{r(ln(s.result),l.oldVersion,l.newVersion,ln(s.transaction),l)}),n&&s.addEventListener("blocked",l=>n(l.oldVersion,l.newVersion,l)),a.then(l=>{o&&l.addEventListener("close",()=>o()),i&&l.addEventListener("versionchange",u=>i(u.oldVersion,u.newVersion,u))}).catch(()=>{}),a}function Pl(e,{blocked:t}={}){const n=indexedDB.deleteDatabase(e);return t&&n.addEventListener("blocked",r=>t(r.oldVersion,r)),ln(n).then(()=>{})}const yE=["get","getKey","getAll","getAllKeys","count"],vE=["put","add","delete","clear"],Al=new Map;function up(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(Al.get(t))return Al.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=vE.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||yE.includes(n)))return;const o=async function(s,...a){const l=this.transaction(s,i?"readwrite":"readonly");let u=l.store;return r&&(u=u.index(a.shift())),(await Promise.all([u[n](...a),i&&l.done]))[0]};return Al.set(t,o),o}hE(e=>({...e,get:(t,n,r)=>up(t,n)||e.get(t,n,r),has:(t,n)=>!!up(t,n)||e.has(t,n)}));/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class wE{constructor(t){this.container=t}getPlatformInfoString(){return this.container.getProviders().map(n=>{if(_E(n)){const r=n.getImmediate();return`${r.library}/${r.version}`}else return null}).filter(n=>n).join(" ")}}function _E(e){const t=e.getComponent();return(t==null?void 0:t.type)==="VERSION"}const bu="@firebase/app",cp="0.10.13";/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const cn=new Yc("@firebase/app"),SE="@firebase/app-compat",EE="@firebase/analytics-compat",TE="@firebase/analytics",IE="@firebase/app-check-compat",kE="@firebase/app-check",PE="@firebase/auth",AE="@firebase/auth-compat",CE="@firebase/database",OE="@firebase/data-connect",bE="@firebase/database-compat",RE="@firebase/functions",NE="@firebase/functions-compat",xE="@firebase/installations",DE="@firebase/installations-compat",LE="@firebase/messaging",ME="@firebase/messaging-compat",$E="@firebase/performance",FE="@firebase/performance-compat",UE="@firebase/remote-config",BE="@firebase/remote-config-compat",zE="@firebase/storage",jE="@firebase/storage-compat",VE="@firebase/firestore",HE="@firebase/vertexai-preview",WE="@firebase/firestore-compat",KE="firebase",qE="10.14.1";/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const Ru="[DEFAULT]",GE={[bu]:"fire-core",[SE]:"fire-core-compat",[TE]:"fire-analytics",[EE]:"fire-analytics-compat",[kE]:"fire-app-check",[IE]:"fire-app-check-compat",[PE]:"fire-auth",[AE]:"fire-auth-compat",[CE]:"fire-rtdb",[OE]:"fire-data-connect",[bE]:"fire-rtdb-compat",[RE]:"fire-fn",[NE]:"fire-fn-compat",[xE]:"fire-iid",[DE]:"fire-iid-compat",[LE]:"fire-fcm",[ME]:"fire-fcm-compat",[$E]:"fire-perf",[FE]:"fire-perf-compat",[UE]:"fire-rc",[BE]:"fire-rc-compat",[zE]:"fire-gcs",[jE]:"fire-gcs-compat",[VE]:"fire-fst",[WE]:"fire-fst-compat",[HE]:"fire-vertex","fire-js":"fire-js",[KE]:"fire-js-all"};/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const Xs=new Map,QE=new Map,Nu=new Map;function fp(e,t){try{e.container.addComponent(t)}catch(n){cn.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,n)}}function Rt(e){const t=e.name;if(Nu.has(t))return cn.debug(`There were multiple attempts to register component ${t}.`),!1;Nu.set(t,e);for(const n of Xs.values())fp(n,e);for(const n of QE.values())fp(n,e);return!0}function Or(e,t){const n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}function Rn(e){return e.settings!==void 0}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const JE={"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."},Mn=new qn("app","Firebase",JE);/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class XE{constructor(t,n,r){this._isDeleted=!1,this._options=Object.assign({},t),this._config=Object.assign({},n),this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new _t("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(t){this.checkDestroyed(),this._automaticDataCollectionEnabled=t}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(t){this._isDeleted=t}checkDestroyed(){if(this.isDeleted)throw Mn.create("app-deleted",{appName:this._name})}}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const Bo=qE;function _g(e,t={}){let n=e;typeof t!="object"&&(t={name:t});const r=Object.assign({name:Ru,automaticDataCollectionEnabled:!1},t),i=r.name;if(typeof i!="string"||!i)throw Mn.create("bad-app-name",{appName:String(i)});if(n||(n=hg()),!n)throw Mn.create("no-options");const o=Xs.get(i);if(o){if(uo(n,o.options)&&uo(r,o.config))return o;throw Mn.create("duplicate-app",{appName:i})}const s=new iE(i);for(const l of Nu.values())s.addComponent(l);const a=new XE(n,r,s);return Xs.set(i,a),a}function ef(e=Ru){const t=Xs.get(e);if(!t&&e===Ru&&hg())return _g();if(!t)throw Mn.create("no-app",{appName:e});return t}function vt(e,t,n){var r;let i=(r=GE[e])!==null&&r!==void 0?r:e;n&&(i+=`-${n}`);const o=i.match(/\s|\//),s=t.match(/\s|\//);if(o||s){const a=[`Unable to register library "${i}" with version "${t}":`];o&&a.push(`library name "${i}" contains illegal characters (whitespace or "/")`),o&&s&&a.push("and"),s&&a.push(`version name "${t}" contains illegal characters (whitespace or "/")`),cn.warn(a.join(" "));return}Rt(new _t(`${i}-version`,()=>({library:i,version:t}),"VERSION"))}/** * @license * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const YE="firebase-heartbeat-database",ZE=1,co="firebase-heartbeat-store";let Cl=null;function Sg(){return Cl||(Cl=ja(YE,ZE,{upgrade:(e,t)=>{switch(t){case 0:try{e.createObjectStore(co)}catch(n){console.warn(n)}}}}).catch(e=>{throw Mn.create("idb-open",{originalErrorMessage:e.message})})),Cl}async function eT(e){try{const n=(await Sg()).transaction(co),r=await n.objectStore(co).get(Eg(e));return await n.done,r}catch(t){if(t instanceof qt)cn.warn(t.message);else{const n=Mn.create("idb-get",{originalErrorMessage:t==null?void 0:t.message});cn.warn(n.message)}}}async function dp(e,t){try{const r=(await Sg()).transaction(co,"readwrite");await r.objectStore(co).put(t,Eg(e)),await r.done}catch(n){if(n instanceof qt)cn.warn(n.message);else{const r=Mn.create("idb-set",{originalErrorMessage:n==null?void 0:n.message});cn.warn(r.message)}}}function Eg(e){return`${e.name}!${e.options.appId}`}/** * @license * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const tT=1024,nT=30*24*60*60*1e3;class rT{constructor(t){this.container=t,this._heartbeatsCache=null;const n=this.container.getProvider("app").getImmediate();this._storage=new oT(n),this._heartbeatsCachePromise=this._storage.read().then(r=>(this._heartbeatsCache=r,r))}async triggerHeartbeat(){var t,n;try{const i=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),o=pp();return((t=this._heartbeatsCache)===null||t===void 0?void 0:t.heartbeats)==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,((n=this._heartbeatsCache)===null||n===void 0?void 0:n.heartbeats)==null)||this._heartbeatsCache.lastSentHeartbeatDate===o||this._heartbeatsCache.heartbeats.some(s=>s.date===o)?void 0:(this._heartbeatsCache.heartbeats.push({date:o,agent:i}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(s=>{const a=new Date(s.date).valueOf();return Date.now()-a<=nT}),this._storage.overwrite(this._heartbeatsCache))}catch(r){cn.warn(r)}}async getHeartbeatsHeader(){var t;try{if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,((t=this._heartbeatsCache)===null||t===void 0?void 0:t.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";const n=pp(),{heartbeatsToSend:r,unsentEntries:i}=iT(this._heartbeatsCache.heartbeats),o=dg(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)),o}catch(n){return cn.warn(n),""}}}function pp(){return new Date().toISOString().substring(0,10)}function iT(e,t=tT){const n=[];let r=e.slice();for(const i of e){const o=n.find(s=>s.agent===i.agent);if(o){if(o.dates.push(i.date),hp(n)>t){o.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),hp(n)>t){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}class oT{constructor(t){this.app=t,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return Jc()?Xc().then(()=>!0).catch(()=>!1):!1}async read(){if(await this._canUseIndexedDBPromise){const n=await eT(this.app);return n!=null&&n.heartbeats?n:{heartbeats:[]}}else return{heartbeats:[]}}async overwrite(t){var n;if(await this._canUseIndexedDBPromise){const i=await this.read();return dp(this.app,{lastSentHeartbeatDate:(n=t.lastSentHeartbeatDate)!==null&&n!==void 0?n:i.lastSentHeartbeatDate,heartbeats:t.heartbeats})}else return}async add(t){var n;if(await this._canUseIndexedDBPromise){const i=await this.read();return dp(this.app,{lastSentHeartbeatDate:(n=t.lastSentHeartbeatDate)!==null&&n!==void 0?n:i.lastSentHeartbeatDate,heartbeats:[...i.heartbeats,...t.heartbeats]})}else return}}function hp(e){return dg(JSON.stringify({version:2,heartbeats:e})).length}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function sT(e){Rt(new _t("platform-logger",t=>new wE(t),"PRIVATE")),Rt(new _t("heartbeat",t=>new rT(t),"PRIVATE")),vt(bu,cp,e),vt(bu,cp,"esm2017"),vt("fire-js","")}sT("");var aT="firebase",lT="10.14.1";/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */vt(aT,lT,"app");function tf(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i"u")return null;const e=navigator;return e.languages&&e.languages[0]||e.language||null}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class zo{constructor(t,n){this.shortDelay=t,this.longDelay=n,dn(n>t,"Short delay should be less than long delay!"),this.isMobile=B1()||j1()}get(){return dT()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function rf(e,t){dn(e.emulator,"Emulator should always be set here");const{url:n}=e.emulator;return t?`${n}${t.startsWith("/")?t.slice(1):t}`:n}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Pg{static initialize(t,n,r){this.fetchImpl=t,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;nn("Could not find fetch implementation, make sure you call FetchProvider.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;nn("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;nn("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const hT={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"};/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const mT=new zo(3e4,6e4);function of(e,t){return e.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:e.tenantId}):t}async function Ei(e,t,n,r,i={}){return Ag(e,i,async()=>{let o={},s={};r&&(t==="GET"?s=r:o={body:JSON.stringify(r)});const a=Uo(Object.assign({key:e.config.apiKey},s)).slice(1),l=await e._getAdditionalHeaders();l["Content-Type"]="application/json",e.languageCode&&(l["X-Firebase-Locale"]=e.languageCode);const u=Object.assign({method:t,headers:l},o);return z1()||(u.referrerPolicy="no-referrer"),Pg.fetch()(Cg(e,e.config.apiHost,n,a),u)})}async function Ag(e,t,n){e._canInitEmulator=!1;const r=Object.assign(Object.assign({},hT),t);try{const i=new yT(e),o=await Promise.race([n(),i.promise]);i.clearNetworkTimeout();const s=await o.json();if("needConfirmation"in s)throw os(e,"account-exists-with-different-credential",s);if(o.ok&&!("errorMessage"in s))return s;{const a=o.ok?s.errorMessage:s.error.message,[l,u]=a.split(" : ");if(l==="FEDERATED_USER_ID_ALREADY_LINKED")throw os(e,"credential-already-in-use",s);if(l==="EMAIL_EXISTS")throw os(e,"email-already-in-use",s);if(l==="USER_DISABLED")throw os(e,"user-disabled",s);const c=r[l]||l.toLowerCase().replace(/[_\s]+/g,"-");if(u)throw kg(e,c,u);fn(e,c)}}catch(i){if(i instanceof qt)throw i;fn(e,"network-request-failed",{message:String(i)})}}async function gT(e,t,n,r,i={}){const o=await Ei(e,t,n,r,i);return"mfaPendingCredential"in o&&fn(e,"multi-factor-auth-required",{_serverResponse:o}),o}function Cg(e,t,n,r){const i=`${t}${n}?${r}`;return e.config.emulator?rf(e.config,i):`${e.config.apiScheme}://${i}`}class yT{constructor(t){this.auth=t,this.timer=null,this.promise=new Promise((n,r)=>{this.timer=setTimeout(()=>r(Vt(this.auth,"network-request-failed")),mT.get())})}clearNetworkTimeout(){clearTimeout(this.timer)}}function os(e,t,n){const r={appName:e.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);const i=Vt(e,t,r);return i.customData._tokenResponse=n,i}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */async function vT(e,t){return Ei(e,"POST","/v1/accounts:delete",t)}async function Og(e,t){return Ei(e,"POST","/v1/accounts:lookup",t)}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function qi(e){if(e)try{const t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch{}}async function wT(e,t=!1){const n=ut(e),r=await n.getIdToken(t),i=sf(r);U(i&&i.exp&&i.auth_time&&i.iat,n.auth,"internal-error");const o=typeof i.firebase=="object"?i.firebase:void 0,s=o==null?void 0:o.sign_in_provider;return{claims:i,token:r,authTime:qi(Ol(i.auth_time)),issuedAtTime:qi(Ol(i.iat)),expirationTime:qi(Ol(i.exp)),signInProvider:s||null,signInSecondFactor:(o==null?void 0:o.sign_in_second_factor)||null}}function Ol(e){return Number(e)*1e3}function sf(e){const[t,n,r]=e.split(".");if(t===void 0||n===void 0||r===void 0)return Ns("JWT malformed, contained fewer than 3 sections"),null;try{const i=pg(n);return i?JSON.parse(i):(Ns("Failed to decode base64 JWT payload"),null)}catch(i){return Ns("Caught error parsing JWT payload as JSON",i==null?void 0:i.toString()),null}}function gp(e){const t=sf(e);return U(t,"internal-error"),U(typeof t.exp<"u","internal-error"),U(typeof t.iat<"u","internal-error"),Number(t.exp)-Number(t.iat)}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */async function fo(e,t,n=!1){if(n)return t;try{return await t}catch(r){throw r instanceof qt&&_T(r)&&e.auth.currentUser===e&&await e.auth.signOut(),r}}function _T({code:e}){return e==="auth/user-disabled"||e==="auth/user-token-expired"}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class ST{constructor(t){this.user=t,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(t){var n;if(t){const r=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),r}else{this.errorBackoff=3e4;const i=((n=this.user.stsTokenManager.expirationTime)!==null&&n!==void 0?n:0)-Date.now()-3e5;return Math.max(0,i)}}schedule(t=!1){if(!this.isRunning)return;const n=this.getInterval(t);this.timerId=setTimeout(async()=>{await this.iteration()},n)}async iteration(){try{await this.user.getIdToken(!0)}catch(t){(t==null?void 0:t.code)==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Du{constructor(t,n){this.createdAt=t,this.lastLoginAt=n,this._initializeTime()}_initializeTime(){this.lastSignInTime=qi(this.lastLoginAt),this.creationTime=qi(this.createdAt)}_copy(t){this.createdAt=t.createdAt,this.lastLoginAt=t.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */async function Zs(e){var t;const n=e.auth,r=await e.getIdToken(),i=await fo(e,Og(n,{idToken:r}));U(i==null?void 0:i.users.length,n,"internal-error");const o=i.users[0];e._notifyReloadListener(o);const s=!((t=o.providerUserInfo)===null||t===void 0)&&t.length?bg(o.providerUserInfo):[],a=TT(e.providerData,s),l=e.isAnonymous,u=!(e.email&&o.passwordHash)&&!(a!=null&&a.length),c=l?u:!1,f={uid:o.localId,displayName:o.displayName||null,photoURL:o.photoUrl||null,email:o.email||null,emailVerified:o.emailVerified||!1,phoneNumber:o.phoneNumber||null,tenantId:o.tenantId||null,providerData:a,metadata:new Du(o.createdAt,o.lastLoginAt),isAnonymous:c};Object.assign(e,f)}async function ET(e){const t=ut(e);await Zs(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}function TT(e,t){return[...e.filter(r=>!t.some(i=>i.providerId===r.providerId)),...t]}function bg(e){return e.map(t=>{var{providerId:n}=t,r=tf(t,["providerId"]);return{providerId:n,uid:r.rawId||"",displayName:r.displayName||null,email:r.email||null,phoneNumber:r.phoneNumber||null,photoURL:r.photoUrl||null}})}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */async function IT(e,t){const n=await Ag(e,{},async()=>{const r=Uo({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:i,apiKey:o}=e.config,s=Cg(e,i,"/v1/token",`key=${o}`),a=await e._getAdditionalHeaders();return a["Content-Type"]="application/x-www-form-urlencoded",Pg.fetch()(s,{method:"POST",headers:a,body:r})});return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}}async function kT(e,t){return Ei(e,"POST","/v2/accounts:revokeToken",of(e,t))}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Xr{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(t){U(t.idToken,"internal-error"),U(typeof t.idToken<"u","internal-error"),U(typeof t.refreshToken<"u","internal-error");const n="expiresIn"in t&&typeof t.expiresIn<"u"?Number(t.expiresIn):gp(t.idToken);this.updateTokensAndExpiration(t.idToken,t.refreshToken,n)}updateFromIdToken(t){U(t.length!==0,"internal-error");const n=gp(t);this.updateTokensAndExpiration(t,null,n)}async getToken(t,n=!1){return!n&&this.accessToken&&!this.isExpired?this.accessToken:(U(this.refreshToken,t,"user-token-expired"),this.refreshToken?(await this.refresh(t,this.refreshToken),this.accessToken):null)}clearRefreshToken(){this.refreshToken=null}async refresh(t,n){const{accessToken:r,refreshToken:i,expiresIn:o}=await IT(t,n);this.updateTokensAndExpiration(r,i,Number(o))}updateTokensAndExpiration(t,n,r){this.refreshToken=n||null,this.accessToken=t||null,this.expirationTime=Date.now()+r*1e3}static fromJSON(t,n){const{refreshToken:r,accessToken:i,expirationTime:o}=n,s=new Xr;return r&&(U(typeof r=="string","internal-error",{appName:t}),s.refreshToken=r),i&&(U(typeof i=="string","internal-error",{appName:t}),s.accessToken=i),o&&(U(typeof o=="number","internal-error",{appName:t}),s.expirationTime=o),s}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(t){this.accessToken=t.accessToken,this.refreshToken=t.refreshToken,this.expirationTime=t.expirationTime}_clone(){return Object.assign(new Xr,this.toJSON())}_performRefresh(){return nn("not implemented")}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function En(e,t){U(typeof e=="string"||typeof e>"u","internal-error",{appName:t})}class rn{constructor(t){var{uid:n,auth:r,stsTokenManager:i}=t,o=tf(t,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new ST(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=n,this.auth=r,this.stsTokenManager=i,this.accessToken=i.accessToken,this.displayName=o.displayName||null,this.email=o.email||null,this.emailVerified=o.emailVerified||!1,this.phoneNumber=o.phoneNumber||null,this.photoURL=o.photoURL||null,this.isAnonymous=o.isAnonymous||!1,this.tenantId=o.tenantId||null,this.providerData=o.providerData?[...o.providerData]:[],this.metadata=new Du(o.createdAt||void 0,o.lastLoginAt||void 0)}async getIdToken(t){const n=await fo(this,this.stsTokenManager.getToken(this.auth,t));return U(n,this.auth,"internal-error"),this.accessToken!==n&&(this.accessToken=n,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),n}getIdTokenResult(t){return wT(this,t)}reload(){return ET(this)}_assign(t){this!==t&&(U(this.uid===t.uid,this.auth,"internal-error"),this.displayName=t.displayName,this.photoURL=t.photoURL,this.email=t.email,this.emailVerified=t.emailVerified,this.phoneNumber=t.phoneNumber,this.isAnonymous=t.isAnonymous,this.tenantId=t.tenantId,this.providerData=t.providerData.map(n=>Object.assign({},n)),this.metadata._copy(t.metadata),this.stsTokenManager._assign(t.stsTokenManager))}_clone(t){const n=new rn(Object.assign(Object.assign({},this),{auth:t,stsTokenManager:this.stsTokenManager._clone()}));return n.metadata._copy(this.metadata),n}_onReload(t){U(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=t,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(t){this.reloadListener?this.reloadListener(t):this.reloadUserInfo=t}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(t,n=!1){let r=!1;t.idToken&&t.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(t),r=!0),n&&await Zs(this),await this.auth._persistUserIfCurrent(this),r&&this.auth._notifyListenersIfCurrent(this)}async delete(){if(Rn(this.auth.app))return Promise.reject(pr(this.auth));const t=await this.getIdToken();return await fo(this,vT(this.auth,{idToken:t})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return Object.assign(Object.assign({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(t=>Object.assign({},t)),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(t,n){var r,i,o,s,a,l,u,c;const f=(r=n.displayName)!==null&&r!==void 0?r:void 0,p=(i=n.email)!==null&&i!==void 0?i:void 0,w=(o=n.phoneNumber)!==null&&o!==void 0?o:void 0,d=(s=n.photoURL)!==null&&s!==void 0?s:void 0,v=(a=n.tenantId)!==null&&a!==void 0?a:void 0,T=(l=n._redirectEventId)!==null&&l!==void 0?l:void 0,y=(u=n.createdAt)!==null&&u!==void 0?u:void 0,h=(c=n.lastLoginAt)!==null&&c!==void 0?c:void 0,{uid:m,emailVerified:S,isAnonymous:k,providerData:C,stsTokenManager:A}=n;U(m&&A,t,"internal-error");const _=Xr.fromJSON(this.name,A);U(typeof m=="string",t,"internal-error"),En(f,t.name),En(p,t.name),U(typeof S=="boolean",t,"internal-error"),U(typeof k=="boolean",t,"internal-error"),En(w,t.name),En(d,t.name),En(v,t.name),En(T,t.name),En(y,t.name),En(h,t.name);const P=new rn({uid:m,auth:t,email:p,emailVerified:S,displayName:f,isAnonymous:k,photoURL:d,phoneNumber:w,tenantId:v,stsTokenManager:_,createdAt:y,lastLoginAt:h});return C&&Array.isArray(C)&&(P.providerData=C.map(O=>Object.assign({},O))),T&&(P._redirectEventId=T),P}static async _fromIdTokenResponse(t,n,r=!1){const i=new Xr;i.updateFromServerResponse(n);const o=new rn({uid:n.localId,auth:t,stsTokenManager:i,isAnonymous:r});return await Zs(o),o}static async _fromGetAccountInfoResponse(t,n,r){const i=n.users[0];U(i.localId!==void 0,"internal-error");const o=i.providerUserInfo!==void 0?bg(i.providerUserInfo):[],s=!(i.email&&i.passwordHash)&&!(o!=null&&o.length),a=new Xr;a.updateFromIdToken(r);const l=new rn({uid:i.localId,auth:t,stsTokenManager:a,isAnonymous:s}),u={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:o,metadata:new Du(i.createdAt,i.lastLoginAt),isAnonymous:!(i.email&&i.passwordHash)&&!(o!=null&&o.length)};return Object.assign(l,u),l}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const yp=new Map;function on(e){dn(e instanceof Function,"Expected a class definition");let t=yp.get(e);return t?(dn(t instanceof e,"Instance stored in cache mismatched with class"),t):(t=new e,yp.set(e,t),t)}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Rg{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(t,n){this.storage[t]=n}async _get(t){const n=this.storage[t];return n===void 0?null:n}async _remove(t){delete this.storage[t]}_addListener(t,n){}_removeListener(t,n){}}Rg.type="NONE";const vp=Rg;/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function xs(e,t,n){return`firebase:${e}:${t}:${n}`}class Yr{constructor(t,n,r){this.persistence=t,this.auth=n,this.userKey=r;const{config:i,name:o}=this.auth;this.fullUserKey=xs(this.userKey,i.apiKey,o),this.fullPersistenceKey=xs("persistence",i.apiKey,o),this.boundEventHandler=n._onStorageEvent.bind(n),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(t){return this.persistence._set(this.fullUserKey,t.toJSON())}async getCurrentUser(){const t=await this.persistence._get(this.fullUserKey);return t?rn._fromJSON(this.auth,t):null}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(t){if(this.persistence===t)return;const n=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=t,n)return this.setCurrentUser(n)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(t,n,r="authUser"){if(!n.length)return new Yr(on(vp),t,r);const i=(await Promise.all(n.map(async u=>{if(await u._isAvailable())return u}))).filter(u=>u);let o=i[0]||on(vp);const s=xs(r,t.config.apiKey,t.name);let a=null;for(const u of n)try{const c=await u._get(s);if(c){const f=rn._fromJSON(t,c);u!==o&&(a=f),o=u;break}}catch{}const l=i.filter(u=>u._shouldAllowMigration);return!o._shouldAllowMigration||!l.length?new Yr(o,t,r):(o=l[0],a&&await o._set(s,a.toJSON()),await Promise.all(n.map(async u=>{if(u!==o)try{await u._remove(s)}catch{}})),new Yr(o,t,r))}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function wp(e){const t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(Lg(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(Ng(t))return"Firefox";if(t.includes("silk/"))return"Silk";if($g(t))return"Blackberry";if(Fg(t))return"Webos";if(xg(t))return"Safari";if((t.includes("chrome/")||Dg(t))&&!t.includes("edge/"))return"Chrome";if(Mg(t))return"Android";{const n=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,r=e.match(n);if((r==null?void 0:r.length)===2)return r[1]}return"Other"}function Ng(e=We()){return/firefox\//i.test(e)}function xg(e=We()){const t=e.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function Dg(e=We()){return/crios\//i.test(e)}function Lg(e=We()){return/iemobile/i.test(e)}function Mg(e=We()){return/android/i.test(e)}function $g(e=We()){return/blackberry/i.test(e)}function Fg(e=We()){return/webos/i.test(e)}function af(e=We()){return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function PT(e=We()){var t;return af(e)&&!!(!((t=window.navigator)===null||t===void 0)&&t.standalone)}function AT(){return V1()&&document.documentMode===10}function Ug(e=We()){return af(e)||Mg(e)||Fg(e)||$g(e)||/windows phone/i.test(e)||Lg(e)}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function Bg(e,t=[]){let n;switch(e){case"Browser":n=wp(We());break;case"Worker":n=`${wp(We())}-${e}`;break;default:n=e}const r=t.length?t.join(","):"FirebaseCore-web";return`${n}/JsCore/${Bo}/${r}`}/** * @license * Copyright 2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class CT{constructor(t){this.auth=t,this.queue=[]}pushCallback(t,n){const r=o=>new Promise((s,a)=>{try{const l=t(o);s(l)}catch(l){a(l)}});r.onAbort=n,this.queue.push(r);const i=this.queue.length-1;return()=>{this.queue[i]=()=>Promise.resolve()}}async runMiddleware(t){if(this.auth.currentUser===t)return;const n=[];try{for(const r of this.queue)await r(t),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})}}}/** * @license * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */async function OT(e,t={}){return Ei(e,"GET","/v2/passwordPolicy",of(e,t))}/** * @license * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const bT=6;class RT{constructor(t){var n,r,i,o;const s=t.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=(n=s.minPasswordLength)!==null&&n!==void 0?n:bT,s.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=s.maxPasswordLength),s.containsLowercaseCharacter!==void 0&&(this.customStrengthOptions.containsLowercaseLetter=s.containsLowercaseCharacter),s.containsUppercaseCharacter!==void 0&&(this.customStrengthOptions.containsUppercaseLetter=s.containsUppercaseCharacter),s.containsNumericCharacter!==void 0&&(this.customStrengthOptions.containsNumericCharacter=s.containsNumericCharacter),s.containsNonAlphanumericCharacter!==void 0&&(this.customStrengthOptions.containsNonAlphanumericCharacter=s.containsNonAlphanumericCharacter),this.enforcementState=t.enforcementState,this.enforcementState==="ENFORCEMENT_STATE_UNSPECIFIED"&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=(i=(r=t.allowedNonAlphanumericCharacters)===null||r===void 0?void 0:r.join(""))!==null&&i!==void 0?i:"",this.forceUpgradeOnSignin=(o=t.forceUpgradeOnSignin)!==null&&o!==void 0?o:!1,this.schemaVersion=t.schemaVersion}validatePassword(t){var n,r,i,o,s,a;const l={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(t,l),this.validatePasswordCharacterOptions(t,l),l.isValid&&(l.isValid=(n=l.meetsMinPasswordLength)!==null&&n!==void 0?n:!0),l.isValid&&(l.isValid=(r=l.meetsMaxPasswordLength)!==null&&r!==void 0?r:!0),l.isValid&&(l.isValid=(i=l.containsLowercaseLetter)!==null&&i!==void 0?i:!0),l.isValid&&(l.isValid=(o=l.containsUppercaseLetter)!==null&&o!==void 0?o:!0),l.isValid&&(l.isValid=(s=l.containsNumericCharacter)!==null&&s!==void 0?s:!0),l.isValid&&(l.isValid=(a=l.containsNonAlphanumericCharacter)!==null&&a!==void 0?a:!0),l}validatePasswordLengthOptions(t,n){const r=this.customStrengthOptions.minPasswordLength,i=this.customStrengthOptions.maxPasswordLength;r&&(n.meetsMinPasswordLength=t.length>=r),i&&(n.meetsMaxPasswordLength=t.length<=i)}validatePasswordCharacterOptions(t,n){this.updatePasswordCharacterOptionsStatuses(n,!1,!1,!1,!1);let r;for(let i=0;i="a"&&r<="z",r>="A"&&r<="Z",r>="0"&&r<="9",this.allowedNonAlphanumericCharacters.includes(r))}updatePasswordCharacterOptionsStatuses(t,n,r,i,o){this.customStrengthOptions.containsLowercaseLetter&&(t.containsLowercaseLetter||(t.containsLowercaseLetter=n)),this.customStrengthOptions.containsUppercaseLetter&&(t.containsUppercaseLetter||(t.containsUppercaseLetter=r)),this.customStrengthOptions.containsNumericCharacter&&(t.containsNumericCharacter||(t.containsNumericCharacter=i)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(t.containsNonAlphanumericCharacter||(t.containsNonAlphanumericCharacter=o))}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class NT{constructor(t,n,r,i){this.app=t,this.heartbeatServiceProvider=n,this.appCheckServiceProvider=r,this.config=i,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new _p(this),this.idTokenSubscription=new _p(this),this.beforeStateQueue=new CT(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=Ig,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=t.name,this.clientVersion=i.sdkClientVersion}_initializeWithPersistence(t,n){return n&&(this._popupRedirectResolver=on(n)),this._initializationPromise=this.queue(async()=>{var r,i;if(!this._deleted&&(this.persistenceManager=await Yr.create(this,t),!this._deleted)){if(!((r=this._popupRedirectResolver)===null||r===void 0)&&r._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch{}await this.initializeCurrentUser(n),this.lastNotifiedUid=((i=this.currentUser)===null||i===void 0?void 0:i.uid)||null,!this._deleted&&(this._isInitialized=!0)}}),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;const t=await this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!t)){if(this.currentUser&&t&&this.currentUser.uid===t.uid){this._currentUser._assign(t),await this.currentUser.getIdToken();return}await this._updateCurrentUser(t,!0)}}async initializeCurrentUserFromIdToken(t){try{const n=await Og(this,{idToken:t}),r=await rn._fromGetAccountInfoResponse(this,n,t);await this.directlySetCurrentUser(r)}catch(n){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",n),await this.directlySetCurrentUser(null)}}async initializeCurrentUser(t){var n;if(Rn(this.app)){const s=this.app.settings.authIdToken;return s?new Promise(a=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(s).then(a,a))}):this.directlySetCurrentUser(null)}const r=await this.assertedPersistence.getCurrentUser();let i=r,o=!1;if(t&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const s=(n=this.redirectUser)===null||n===void 0?void 0:n._redirectEventId,a=i==null?void 0:i._redirectEventId,l=await this.tryRedirectSignIn(t);(!s||s===a)&&(l!=null&&l.user)&&(i=l.user,o=!0)}if(!i)return this.directlySetCurrentUser(null);if(!i._redirectEventId){if(o)try{await this.beforeStateQueue.runMiddleware(i)}catch(s){i=r,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(s))}return i?this.reloadAndSetCurrentUserOrClear(i):this.directlySetCurrentUser(null)}return U(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===i._redirectEventId?this.directlySetCurrentUser(i):this.reloadAndSetCurrentUserOrClear(i)}async tryRedirectSignIn(t){let n=null;try{n=await this._popupRedirectResolver._completeRedirectFn(this,t,!0)}catch{await this._setRedirectUser(null)}return n}async reloadAndSetCurrentUserOrClear(t){try{await Zs(t)}catch(n){if((n==null?void 0:n.code)!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(t)}useDeviceLanguage(){this.languageCode=pT()}async _delete(){this._deleted=!0}async updateCurrentUser(t){if(Rn(this.app))return Promise.reject(pr(this));const n=t?ut(t):null;return n&&U(n.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(n&&n._clone(this))}async _updateCurrentUser(t,n=!1){if(!this._deleted)return t&&U(this.tenantId===t.tenantId,this,"tenant-id-mismatch"),n||await this.beforeStateQueue.runMiddleware(t),this.queue(async()=>{await this.directlySetCurrentUser(t),this.notifyAuthListeners()})}async signOut(){return Rn(this.app)?Promise.reject(pr(this)):(await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0))}setPersistence(t){return Rn(this.app)?Promise.reject(pr(this)):this.queue(async()=>{await this.assertedPersistence.setPersistence(on(t))})}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword(t){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(t)}_getPasswordPolicyInternal(){return this.tenantId===null?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}async _updatePasswordPolicy(){const t=await OT(this),n=new RT(t);this.tenantId===null?this._projectPasswordPolicy=n:this._tenantPasswordPolicies[this.tenantId]=n}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(t){this._errorFactory=new qn("auth","Firebase",t())}onAuthStateChanged(t,n,r){return this.registerStateListener(this.authStateSubscription,t,n,r)}beforeAuthStateChanged(t,n){return this.beforeStateQueue.pushCallback(t,n)}onIdTokenChanged(t,n,r){return this.registerStateListener(this.idTokenSubscription,t,n,r)}authStateReady(){return new Promise((t,n)=>{if(this.currentUser)t();else{const r=this.onAuthStateChanged(()=>{r(),t()},n)}})}async revokeAccessToken(t){if(this.currentUser){const n=await this.currentUser.getIdToken(),r={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:t,idToken:n};this.tenantId!=null&&(r.tenantId=this.tenantId),await kT(this,r)}}toJSON(){var t;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:(t=this._currentUser)===null||t===void 0?void 0:t.toJSON()}}async _setRedirectUser(t,n){const r=await this.getOrInitRedirectPersistenceManager(n);return t===null?r.removeCurrentUser():r.setCurrentUser(t)}async getOrInitRedirectPersistenceManager(t){if(!this.redirectPersistenceManager){const n=t&&on(t)||this._popupRedirectResolver;U(n,this,"argument-error"),this.redirectPersistenceManager=await Yr.create(this,[on(n._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(t){var n,r;return this._isInitialized&&await this.queue(async()=>{}),((n=this._currentUser)===null||n===void 0?void 0:n._redirectEventId)===t?this._currentUser:((r=this.redirectUser)===null||r===void 0?void 0:r._redirectEventId)===t?this.redirectUser:null}async _persistUserIfCurrent(t){if(t===this.currentUser)return this.queue(async()=>this.directlySetCurrentUser(t))}_notifyListenersIfCurrent(t){t===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 t,n;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const r=(n=(t=this.currentUser)===null||t===void 0?void 0:t.uid)!==null&&n!==void 0?n:null;this.lastNotifiedUid!==r&&(this.lastNotifiedUid=r,this.authStateSubscription.next(this.currentUser))}registerStateListener(t,n,r,i){if(this._deleted)return()=>{};const o=typeof n=="function"?n:n.next.bind(n);let s=!1;const a=this._isInitialized?Promise.resolve():this._initializationPromise;if(U(a,this,"internal-error"),a.then(()=>{s||o(this.currentUser)}),typeof n=="function"){const l=t.addObserver(n,r,i);return()=>{s=!0,l()}}else{const l=t.addObserver(n);return()=>{s=!0,l()}}}async directlySetCurrentUser(t){this.currentUser&&this.currentUser!==t&&this._currentUser._stopProactiveRefresh(),t&&this.isProactiveRefreshEnabled&&t._startProactiveRefresh(),this.currentUser=t,t?await this.assertedPersistence.setCurrentUser(t):await this.assertedPersistence.removeCurrentUser()}queue(t){return this.operations=this.operations.then(t,t),this.operations}get assertedPersistence(){return U(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(t){!t||this.frameworks.includes(t)||(this.frameworks.push(t),this.frameworks.sort(),this.clientVersion=Bg(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){var t;const n={"X-Client-Version":this.clientVersion};this.app.options.appId&&(n["X-Firebase-gmpid"]=this.app.options.appId);const r=await((t=this.heartbeatServiceProvider.getImmediate({optional:!0}))===null||t===void 0?void 0:t.getHeartbeatsHeader());r&&(n["X-Firebase-Client"]=r);const i=await this._getAppCheckToken();return i&&(n["X-Firebase-AppCheck"]=i),n}async _getAppCheckToken(){var t;const n=await((t=this.appCheckServiceProvider.getImmediate({optional:!0}))===null||t===void 0?void 0:t.getToken());return n!=null&&n.error&&cT(`Error while retrieving App Check token: ${n.error}`),n==null?void 0:n.token}}function lf(e){return ut(e)}class _p{constructor(t){this.auth=t,this.observer=null,this.addObserver=G1(n=>this.observer=n)}get next(){return U(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */let uf={async loadJS(){throw new Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function xT(e){uf=e}function DT(e){return uf.loadJS(e)}function LT(){return uf.gapiScript}function MT(e){return`__${e}${Math.floor(Math.random()*1e6)}`}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function $T(e,t){const n=Or(e,"auth");if(n.isInitialized()){const i=n.getImmediate(),o=n.getOptions();if(uo(o,t??{}))return i;fn(i,"already-initialized")}return n.initialize({options:t})}function FT(e,t){const n=(t==null?void 0:t.persistence)||[],r=(Array.isArray(n)?n:[n]).map(on);t!=null&&t.errorMap&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(r,t==null?void 0:t.popupRedirectResolver)}function UT(e,t,n){const r=lf(e);U(r._canInitEmulator,r,"emulator-config-failed"),U(/^https?:\/\//.test(t),r,"invalid-emulator-scheme");const i=!1,o=zg(t),{host:s,port:a}=BT(t),l=a===null?"":`:${a}`;r.config.emulator={url:`${o}//${s}${l}/`},r.settings.appVerificationDisabledForTesting=!0,r.emulatorConfig=Object.freeze({host:s,port:a,protocol:o.replace(":",""),options:Object.freeze({disableWarnings:i})}),zT()}function zg(e){const t=e.indexOf(":");return t<0?"":e.substr(0,t+1)}function BT(e){const t=zg(e),n=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!n)return{host:"",port:null};const r=n[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(r);if(i){const o=i[1];return{host:o,port:Sp(r.substr(o.length+1))}}else{const[o,s]=r.split(":");return{host:o,port:Sp(s)}}}function Sp(e){if(!e)return null;const t=Number(e);return isNaN(t)?null:t}function zT(){function e(){const t=document.createElement("p"),n=t.style;t.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",t.classList.add("firebase-emulator-warning"),document.body.appendChild(t)}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",e):e())}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class jg{constructor(t,n){this.providerId=t,this.signInMethod=n}toJSON(){return nn("not implemented")}_getIdTokenResponse(t){return nn("not implemented")}_linkToIdToken(t,n){return nn("not implemented")}_getReauthenticationResolver(t){return nn("not implemented")}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */async function Zr(e,t){return gT(e,"POST","/v1/accounts:signInWithIdp",of(e,t))}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const jT="http://localhost";class _r extends jg{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(t){const n=new _r(t.providerId,t.signInMethod);return t.idToken||t.accessToken?(t.idToken&&(n.idToken=t.idToken),t.accessToken&&(n.accessToken=t.accessToken),t.nonce&&!t.pendingToken&&(n.nonce=t.nonce),t.pendingToken&&(n.pendingToken=t.pendingToken)):t.oauthToken&&t.oauthTokenSecret?(n.accessToken=t.oauthToken,n.secret=t.oauthTokenSecret):fn("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(t){const n=typeof t=="string"?JSON.parse(t):t,{providerId:r,signInMethod:i}=n,o=tf(n,["providerId","signInMethod"]);if(!r||!i)return null;const s=new _r(r,i);return s.idToken=o.idToken||void 0,s.accessToken=o.accessToken||void 0,s.secret=o.secret,s.nonce=o.nonce,s.pendingToken=o.pendingToken||null,s}_getIdTokenResponse(t){const n=this.buildRequest();return Zr(t,n)}_linkToIdToken(t,n){const r=this.buildRequest();return r.idToken=n,Zr(t,r)}_getReauthenticationResolver(t){const n=this.buildRequest();return n.autoCreate=!1,Zr(t,n)}buildRequest(){const t={requestUri:jT,returnSecureToken:!0};if(this.pendingToken)t.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),t.postBody=Uo(n)}return t}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Vg{constructor(t){this.providerId=t,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(t){this.defaultLanguageCode=t}setCustomParameters(t){return this.customParameters=t,this}getCustomParameters(){return this.customParameters}}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class jo extends Vg{constructor(){super(...arguments),this.scopes=[]}addScope(t){return this.scopes.includes(t)||this.scopes.push(t),this}getScopes(){return[...this.scopes]}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Pn extends jo{constructor(){super("facebook.com")}static credential(t){return _r._fromParams({providerId:Pn.PROVIDER_ID,signInMethod:Pn.FACEBOOK_SIGN_IN_METHOD,accessToken:t})}static credentialFromResult(t){return Pn.credentialFromTaggedObject(t)}static credentialFromError(t){return Pn.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t||!("oauthAccessToken"in t)||!t.oauthAccessToken)return null;try{return Pn.credential(t.oauthAccessToken)}catch{return null}}}Pn.FACEBOOK_SIGN_IN_METHOD="facebook.com";Pn.PROVIDER_ID="facebook.com";/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class tn extends jo{constructor(){super("google.com"),this.addScope("profile")}static credential(t,n){return _r._fromParams({providerId:tn.PROVIDER_ID,signInMethod:tn.GOOGLE_SIGN_IN_METHOD,idToken:t,accessToken:n})}static credentialFromResult(t){return tn.credentialFromTaggedObject(t)}static credentialFromError(t){return tn.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t)return null;const{oauthIdToken:n,oauthAccessToken:r}=t;if(!n&&!r)return null;try{return tn.credential(n,r)}catch{return null}}}tn.GOOGLE_SIGN_IN_METHOD="google.com";tn.PROVIDER_ID="google.com";/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class An extends jo{constructor(){super("github.com")}static credential(t){return _r._fromParams({providerId:An.PROVIDER_ID,signInMethod:An.GITHUB_SIGN_IN_METHOD,accessToken:t})}static credentialFromResult(t){return An.credentialFromTaggedObject(t)}static credentialFromError(t){return An.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t||!("oauthAccessToken"in t)||!t.oauthAccessToken)return null;try{return An.credential(t.oauthAccessToken)}catch{return null}}}An.GITHUB_SIGN_IN_METHOD="github.com";An.PROVIDER_ID="github.com";/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Cn extends jo{constructor(){super("twitter.com")}static credential(t,n){return _r._fromParams({providerId:Cn.PROVIDER_ID,signInMethod:Cn.TWITTER_SIGN_IN_METHOD,oauthToken:t,oauthTokenSecret:n})}static credentialFromResult(t){return Cn.credentialFromTaggedObject(t)}static credentialFromError(t){return Cn.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t)return null;const{oauthAccessToken:n,oauthTokenSecret:r}=t;if(!n||!r)return null;try{return Cn.credential(n,r)}catch{return null}}}Cn.TWITTER_SIGN_IN_METHOD="twitter.com";Cn.PROVIDER_ID="twitter.com";/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class ai{constructor(t){this.user=t.user,this.providerId=t.providerId,this._tokenResponse=t._tokenResponse,this.operationType=t.operationType}static async _fromIdTokenResponse(t,n,r,i=!1){const o=await rn._fromIdTokenResponse(t,r,i),s=Ep(r);return new ai({user:o,providerId:s,_tokenResponse:r,operationType:n})}static async _forOperation(t,n,r){await t._updateTokensIfNecessary(r,!0);const i=Ep(r);return new ai({user:t,providerId:i,_tokenResponse:r,operationType:n})}}function Ep(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class ea extends qt{constructor(t,n,r,i){var o;super(n.code,n.message),this.operationType=r,this.user=i,Object.setPrototypeOf(this,ea.prototype),this.customData={appName:t.name,tenantId:(o=t.tenantId)!==null&&o!==void 0?o:void 0,_serverResponse:n.customData._serverResponse,operationType:r}}static _fromErrorAndOperation(t,n,r,i){return new ea(t,n,r,i)}}function Hg(e,t,n,r){return(t==="reauthenticate"?n._getReauthenticationResolver(e):n._getIdTokenResponse(e)).catch(o=>{throw o.code==="auth/multi-factor-auth-required"?ea._fromErrorAndOperation(e,o,t,r):o})}async function VT(e,t,n=!1){const r=await fo(e,t._linkToIdToken(e.auth,await e.getIdToken()),n);return ai._forOperation(e,"link",r)}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */async function HT(e,t,n=!1){const{auth:r}=e;if(Rn(r.app))return Promise.reject(pr(r));const i="reauthenticate";try{const o=await fo(e,Hg(r,i,t,e),n);U(o.idToken,r,"internal-error");const s=sf(o.idToken);U(s,r,"internal-error");const{sub:a}=s;return U(e.uid===a,r,"user-mismatch"),ai._forOperation(e,i,o)}catch(o){throw(o==null?void 0:o.code)==="auth/user-not-found"&&fn(r,"user-mismatch"),o}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */async function WT(e,t,n=!1){if(Rn(e.app))return Promise.reject(pr(e));const r="signIn",i=await Hg(e,r,t),o=await ai._fromIdTokenResponse(e,r,i);return n||await e._updateCurrentUser(o.user),o}function KT(e,t,n,r){return ut(e).onIdTokenChanged(t,n,r)}function qT(e,t,n){return ut(e).beforeAuthStateChanged(t,n)}function xN(e,t,n,r){return ut(e).onAuthStateChanged(t,n,r)}function DN(e){return ut(e).signOut()}const ta="__sak";/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Wg{constructor(t,n){this.storageRetriever=t,this.type=n}_isAvailable(){try{return this.storage?(this.storage.setItem(ta,"1"),this.storage.removeItem(ta),Promise.resolve(!0)):Promise.resolve(!1)}catch{return Promise.resolve(!1)}}_set(t,n){return this.storage.setItem(t,JSON.stringify(n)),Promise.resolve()}_get(t){const n=this.storage.getItem(t);return Promise.resolve(n?JSON.parse(n):null)}_remove(t){return this.storage.removeItem(t),Promise.resolve()}get storage(){return this.storageRetriever()}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const GT=1e3,QT=10;class Kg extends Wg{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(t,n)=>this.onStorageEvent(t,n),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=Ug(),this._shouldAllowMigration=!0}forAllChangedKeys(t){for(const n of Object.keys(this.listeners)){const r=this.storage.getItem(n),i=this.localCache[n];r!==i&&t(n,i,r)}}onStorageEvent(t,n=!1){if(!t.key){this.forAllChangedKeys((s,a,l)=>{this.notifyListeners(s,l)});return}const r=t.key;n?this.detachListener():this.stopPolling();const i=()=>{const s=this.storage.getItem(r);!n&&this.localCache[r]===s||this.notifyListeners(r,s)},o=this.storage.getItem(r);AT()&&o!==t.newValue&&t.newValue!==t.oldValue?setTimeout(i,QT):i()}notifyListeners(t,n){this.localCache[t]=n;const r=this.listeners[t];if(r)for(const i of Array.from(r))i(n&&JSON.parse(n))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((t,n,r)=>{this.onStorageEvent(new StorageEvent("storage",{key:t,oldValue:n,newValue:r}),!0)})},GT)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(t,n){Object.keys(this.listeners).length===0&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[t]||(this.listeners[t]=new Set,this.localCache[t]=this.storage.getItem(t)),this.listeners[t].add(n)}_removeListener(t,n){this.listeners[t]&&(this.listeners[t].delete(n),this.listeners[t].size===0&&delete this.listeners[t]),Object.keys(this.listeners).length===0&&(this.detachListener(),this.stopPolling())}async _set(t,n){await super._set(t,n),this.localCache[t]=JSON.stringify(n)}async _get(t){const n=await super._get(t);return this.localCache[t]=JSON.stringify(n),n}async _remove(t){await super._remove(t),delete this.localCache[t]}}Kg.type="LOCAL";const JT=Kg;/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class qg extends Wg{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(t,n){}_removeListener(t,n){}}qg.type="SESSION";const Gg=qg;/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function XT(e){return Promise.all(e.map(async t=>{try{return{fulfilled:!0,value:await t}}catch(n){return{fulfilled:!1,reason:n}}}))}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Va{constructor(t){this.eventTarget=t,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(t){const n=this.receivers.find(i=>i.isListeningto(t));if(n)return n;const r=new Va(t);return this.receivers.push(r),r}isListeningto(t){return this.eventTarget===t}async handleEvent(t){const n=t,{eventId:r,eventType:i,data:o}=n.data,s=this.handlersMap[i];if(!(s!=null&&s.size))return;n.ports[0].postMessage({status:"ack",eventId:r,eventType:i});const a=Array.from(s).map(async u=>u(n.origin,o)),l=await XT(a);n.ports[0].postMessage({status:"done",eventId:r,eventType:i,response:l})}_subscribe(t,n){Object.keys(this.handlersMap).length===0&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[t]||(this.handlersMap[t]=new Set),this.handlersMap[t].add(n)}_unsubscribe(t,n){this.handlersMap[t]&&n&&this.handlersMap[t].delete(n),(!n||this.handlersMap[t].size===0)&&delete this.handlersMap[t],Object.keys(this.handlersMap).length===0&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}Va.receivers=[];/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function cf(e="",t=10){let n="";for(let r=0;r{const u=cf("",20);i.port1.start();const c=setTimeout(()=>{l(new Error("unsupported_event"))},r);s={messageChannel:i,onMessage(f){const p=f;if(p.data.eventId===u)switch(p.data.status){case"ack":clearTimeout(c),o=setTimeout(()=>{l(new Error("timeout"))},3e3);break;case"done":clearTimeout(o),a(p.data.response);break;default:clearTimeout(c),clearTimeout(o),l(new Error("invalid_response"));break}}},this.handlers.add(s),i.port1.addEventListener("message",s.onMessage),this.target.postMessage({eventType:t,eventId:u,data:n},[i.port2])}).finally(()=>{s&&this.removeMessageHandler(s)})}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function Ht(){return window}function ZT(e){Ht().location.href=e}/** * @license * Copyright 2020 Google LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function Qg(){return typeof Ht().WorkerGlobalScope<"u"&&typeof Ht().importScripts=="function"}async function eI(){if(!(navigator!=null&&navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch{return null}}function tI(){var e;return((e=navigator==null?void 0:navigator.serviceWorker)===null||e===void 0?void 0:e.controller)||null}function nI(){return Qg()?self:null}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const Jg="firebaseLocalStorageDb",rI=1,na="firebaseLocalStorage",Xg="fbase_key";class Vo{constructor(t){this.request=t}toPromise(){return new Promise((t,n)=>{this.request.addEventListener("success",()=>{t(this.request.result)}),this.request.addEventListener("error",()=>{n(this.request.error)})})}}function Ha(e,t){return e.transaction([na],t?"readwrite":"readonly").objectStore(na)}function iI(){const e=indexedDB.deleteDatabase(Jg);return new Vo(e).toPromise()}function Lu(){const e=indexedDB.open(Jg,rI);return new Promise((t,n)=>{e.addEventListener("error",()=>{n(e.error)}),e.addEventListener("upgradeneeded",()=>{const r=e.result;try{r.createObjectStore(na,{keyPath:Xg})}catch(i){n(i)}}),e.addEventListener("success",async()=>{const r=e.result;r.objectStoreNames.contains(na)?t(r):(r.close(),await iI(),t(await Lu()))})})}async function Tp(e,t,n){const r=Ha(e,!0).put({[Xg]:t,value:n});return new Vo(r).toPromise()}async function oI(e,t){const n=Ha(e,!1).get(t),r=await new Vo(n).toPromise();return r===void 0?null:r.value}function Ip(e,t){const n=Ha(e,!0).delete(t);return new Vo(n).toPromise()}const sI=800,aI=3;class Yg{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 Lu(),this.db)}async _withRetries(t){let n=0;for(;;)try{const r=await this._openDb();return await t(r)}catch(r){if(n++>aI)throw r;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return Qg()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=Va._getInstance(nI()),this.receiver._subscribe("keyChanged",async(t,n)=>({keyProcessed:(await this._poll()).includes(n.key)})),this.receiver._subscribe("ping",async(t,n)=>["keyChanged"])}async initializeSender(){var t,n;if(this.activeServiceWorker=await eI(),!this.activeServiceWorker)return;this.sender=new YT(this.activeServiceWorker);const r=await this.sender._send("ping",{},800);r&&!((t=r[0])===null||t===void 0)&&t.fulfilled&&!((n=r[0])===null||n===void 0)&&n.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(t){if(!(!this.sender||!this.activeServiceWorker||tI()!==this.activeServiceWorker))try{await this.sender._send("keyChanged",{key:t},this.serviceWorkerReceiverAvailable?800:50)}catch{}}async _isAvailable(){try{if(!indexedDB)return!1;const t=await Lu();return await Tp(t,ta,"1"),await Ip(t,ta),!0}catch{}return!1}async _withPendingWrite(t){this.pendingWrites++;try{await t()}finally{this.pendingWrites--}}async _set(t,n){return this._withPendingWrite(async()=>(await this._withRetries(r=>Tp(r,t,n)),this.localCache[t]=n,this.notifyServiceWorker(t)))}async _get(t){const n=await this._withRetries(r=>oI(r,t));return this.localCache[t]=n,n}async _remove(t){return this._withPendingWrite(async()=>(await this._withRetries(n=>Ip(n,t)),delete this.localCache[t],this.notifyServiceWorker(t)))}async _poll(){const t=await this._withRetries(i=>{const o=Ha(i,!1).getAll();return new Vo(o).toPromise()});if(!t)return[];if(this.pendingWrites!==0)return[];const n=[],r=new Set;if(t.length!==0)for(const{fbase_key:i,value:o}of t)r.add(i),JSON.stringify(this.localCache[i])!==JSON.stringify(o)&&(this.notifyListeners(i,o),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(t,n){this.localCache[t]=n;const r=this.listeners[t];if(r)for(const i of Array.from(r))i(n)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),sI)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(t,n){Object.keys(this.listeners).length===0&&this.startPolling(),this.listeners[t]||(this.listeners[t]=new Set,this._get(t)),this.listeners[t].add(n)}_removeListener(t,n){this.listeners[t]&&(this.listeners[t].delete(n),this.listeners[t].size===0&&delete this.listeners[t]),Object.keys(this.listeners).length===0&&this.stopPolling()}}Yg.type="LOCAL";const lI=Yg;new zo(3e4,6e4);/** * @license * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function uI(e,t){return t?on(t):(U(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class ff extends jg{constructor(t){super("custom","custom"),this.params=t}_getIdTokenResponse(t){return Zr(t,this._buildIdpRequest())}_linkToIdToken(t,n){return Zr(t,this._buildIdpRequest(n))}_getReauthenticationResolver(t){return Zr(t,this._buildIdpRequest())}_buildIdpRequest(t){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 t&&(n.idToken=t),n}}function cI(e){return WT(e.auth,new ff(e),e.bypassAuthState)}function fI(e){const{auth:t,user:n}=e;return U(n,t,"internal-error"),HT(n,new ff(e),e.bypassAuthState)}async function dI(e){const{auth:t,user:n}=e;return U(n,t,"internal-error"),VT(n,new ff(e),e.bypassAuthState)}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Zg{constructor(t,n,r,i,o=!1){this.auth=t,this.resolver=r,this.user=i,this.bypassAuthState=o,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(n)?n:[n]}execute(){return new Promise(async(t,n)=>{this.pendingPromise={resolve:t,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(t){const{urlResponse:n,sessionId:r,postBody:i,tenantId:o,error:s,type:a}=t;if(s){this.reject(s);return}const l={auth:this.auth,requestUri:n,sessionId:r,tenantId:o||void 0,postBody:i||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(a)(l))}catch(u){this.reject(u)}}onError(t){this.reject(t)}getIdpTask(t){switch(t){case"signInViaPopup":case"signInViaRedirect":return cI;case"linkViaPopup":case"linkViaRedirect":return dI;case"reauthViaPopup":case"reauthViaRedirect":return fI;default:fn(this.auth,"internal-error")}}resolve(t){dn(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(t),this.unregisterAndCleanUp()}reject(t){dn(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(t),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const pI=new zo(2e3,1e4);class Fr extends Zg{constructor(t,n,r,i,o){super(t,n,i,o),this.provider=r,this.authWindow=null,this.pollId=null,Fr.currentPopupAction&&Fr.currentPopupAction.cancel(),Fr.currentPopupAction=this}async executeNotNull(){const t=await this.execute();return U(t,this.auth,"internal-error"),t}async onExecution(){dn(this.filter.length===1,"Popup operations only handle one event");const t=cf();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],t),this.authWindow.associatedEvent=t,this.resolver._originValidation(this.auth).catch(n=>{this.reject(n)}),this.resolver._isIframeWebStorageSupported(this.auth,n=>{n||this.reject(Vt(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){var t;return((t=this.authWindow)===null||t===void 0?void 0:t.associatedEvent)||null}cancel(){this.reject(Vt(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,Fr.currentPopupAction=null}pollUserCancellation(){const t=()=>{var n,r;if(!((r=(n=this.authWindow)===null||n===void 0?void 0:n.window)===null||r===void 0)&&r.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(Vt(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(t,pI.get())};t()}}Fr.currentPopupAction=null;/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const hI="pendingRedirect",Ds=new Map;class mI extends Zg{constructor(t,n,r=!1){super(t,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],n,void 0,r),this.eventId=null}async execute(){let t=Ds.get(this.auth._key());if(!t){try{const r=await gI(this.resolver,this.auth)?await super.execute():null;t=()=>Promise.resolve(r)}catch(n){t=()=>Promise.reject(n)}Ds.set(this.auth._key(),t)}return this.bypassAuthState||Ds.set(this.auth._key(),()=>Promise.resolve(null)),t()}async onAuthEvent(t){if(t.type==="signInViaRedirect")return super.onAuthEvent(t);if(t.type==="unknown"){this.resolve(null);return}if(t.eventId){const n=await this.auth._redirectUserForId(t.eventId);if(n)return this.user=n,super.onAuthEvent(t);this.resolve(null)}}async onExecution(){}cleanUp(){}}async function gI(e,t){const n=wI(t),r=vI(e);if(!await r._isAvailable())return!1;const i=await r._get(n)==="true";return await r._remove(n),i}function yI(e,t){Ds.set(e._key(),t)}function vI(e){return on(e._redirectPersistence)}function wI(e){return xs(hI,e.config.apiKey,e.name)}async function _I(e,t,n=!1){if(Rn(e.app))return Promise.reject(pr(e));const r=lf(e),i=uI(r,t),s=await new mI(r,i,n).execute();return s&&!n&&(delete s.user._redirectEventId,await r._persistUserIfCurrent(s.user),await r._setRedirectUser(null,t)),s}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const SI=10*60*1e3;class EI{constructor(t){this.auth=t,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(t){this.consumers.add(t),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,t)&&(this.sendToConsumer(this.queuedRedirectEvent,t),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(t){this.consumers.delete(t)}onEvent(t){if(this.hasEventBeenHandled(t))return!1;let n=!1;return this.consumers.forEach(r=>{this.isEventForConsumer(t,r)&&(n=!0,this.sendToConsumer(t,r),this.saveEventToCache(t))}),this.hasHandledPotentialRedirect||!TI(t)||(this.hasHandledPotentialRedirect=!0,n||(this.queuedRedirectEvent=t,n=!0)),n}sendToConsumer(t,n){var r;if(t.error&&!ey(t)){const i=((r=t.error.code)===null||r===void 0?void 0:r.split("auth/")[1])||"internal-error";n.onError(Vt(this.auth,i))}else n.onAuthEvent(t)}isEventForConsumer(t,n){const r=n.eventId===null||!!t.eventId&&t.eventId===n.eventId;return n.filter.includes(t.type)&&r}hasEventBeenHandled(t){return Date.now()-this.lastProcessedEventTime>=SI&&this.cachedEventUids.clear(),this.cachedEventUids.has(kp(t))}saveEventToCache(t){this.cachedEventUids.add(kp(t)),this.lastProcessedEventTime=Date.now()}}function kp(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter(t=>t).join("-")}function ey({type:e,error:t}){return e==="unknown"&&(t==null?void 0:t.code)==="auth/no-auth-event"}function TI(e){switch(e.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return ey(e);default:return!1}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */async function II(e,t={}){return Ei(e,"GET","/v1/projects",t)}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const kI=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,PI=/^https?/;async function AI(e){if(e.config.emulator)return;const{authorizedDomains:t}=await II(e);for(const n of t)try{if(CI(n))return}catch{}fn(e,"unauthorized-domain")}function CI(e){const t=xu(),{protocol:n,hostname:r}=new URL(t);if(e.startsWith("chrome-extension://")){const s=new URL(e);return s.hostname===""&&r===""?n==="chrome-extension:"&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):n==="chrome-extension:"&&s.hostname===r}if(!PI.test(n))return!1;if(kI.test(e))return r===e;const i=e.replace(/\./g,"\\.");return new RegExp("^(.+\\."+i+"|"+i+")$","i").test(r)}/** * @license * Copyright 2020 Google LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const OI=new zo(3e4,6e4);function Pp(){const e=Ht().___jsl;if(e!=null&&e.H){for(const t of Object.keys(e.H))if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=[...e.H[t].L],e.CP)for(let n=0;n{var r,i,o;function s(){Pp(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{Pp(),n(Vt(e,"network-request-failed"))},timeout:OI.get()})}if(!((i=(r=Ht().gapi)===null||r===void 0?void 0:r.iframes)===null||i===void 0)&&i.Iframe)t(gapi.iframes.getContext());else if(!((o=Ht().gapi)===null||o===void 0)&&o.load)s();else{const a=MT("iframefcb");return Ht()[a]=()=>{gapi.load?s():n(Vt(e,"network-request-failed"))},DT(`${LT()}?onload=${a}`).catch(l=>n(l))}}).catch(t=>{throw Ls=null,t})}let Ls=null;function RI(e){return Ls=Ls||bI(e),Ls}/** * @license * Copyright 2020 Google LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const NI=new zo(5e3,15e3),xI="__/auth/iframe",DI="emulator/auth/iframe",LI={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},MI=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function $I(e){const t=e.config;U(t.authDomain,e,"auth-domain-config-required");const n=t.emulator?rf(t,DI):`https://${e.config.authDomain}/${xI}`,r={apiKey:t.apiKey,appName:e.name,v:Bo},i=MI.get(e.config.apiHost);i&&(r.eid=i);const o=e._getFrameworks();return o.length&&(r.fw=o.join(",")),`${n}?${Uo(r).slice(1)}`}async function FI(e){const t=await RI(e),n=Ht().gapi;return U(n,e,"internal-error"),t.open({where:document.body,url:$I(e),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:LI,dontclear:!0},r=>new Promise(async(i,o)=>{await r.restyle({setHideOnLeave:!1});const s=Vt(e,"network-request-failed"),a=Ht().setTimeout(()=>{o(s)},NI.get());function l(){Ht().clearTimeout(a),i(r)}r.ping(l).then(l,()=>{o(s)})}))}/** * @license * Copyright 2020 Google LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const UI={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},BI=500,zI=600,jI="_blank",VI="http://localhost";class Ap{constructor(t){this.window=t,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}}function HI(e,t,n,r=BI,i=zI){const o=Math.max((window.screen.availHeight-i)/2,0).toString(),s=Math.max((window.screen.availWidth-r)/2,0).toString();let a="";const l=Object.assign(Object.assign({},UI),{width:r.toString(),height:i.toString(),top:o,left:s}),u=We().toLowerCase();n&&(a=Dg(u)?jI:n),Ng(u)&&(t=t||VI,l.scrollbars="yes");const c=Object.entries(l).reduce((p,[w,d])=>`${p}${w}=${d},`,"");if(PT(u)&&a!=="_self")return WI(t||"",a),new Ap(null);const f=window.open(t||"",a,c);U(f,e,"popup-blocked");try{f.focus()}catch{}return new Ap(f)}function WI(e,t){const n=document.createElement("a");n.href=e,n.target=t;const r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}/** * @license * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const KI="__/auth/handler",qI="emulator/auth/handler",GI=encodeURIComponent("fac");async function Cp(e,t,n,r,i,o){U(e.config.authDomain,e,"auth-domain-config-required"),U(e.config.apiKey,e,"invalid-api-key");const s={apiKey:e.config.apiKey,appName:e.name,authType:n,redirectUrl:r,v:Bo,eventId:i};if(t instanceof Vg){t.setDefaultLanguage(e.languageCode),s.providerId=t.providerId||"",q1(t.getCustomParameters())||(s.customParameters=JSON.stringify(t.getCustomParameters()));for(const[c,f]of Object.entries({}))s[c]=f}if(t instanceof jo){const c=t.getScopes().filter(f=>f!=="");c.length>0&&(s.scopes=c.join(","))}e.tenantId&&(s.tid=e.tenantId);const a=s;for(const c of Object.keys(a))a[c]===void 0&&delete a[c];const l=await e._getAppCheckToken(),u=l?`#${GI}=${encodeURIComponent(l)}`:"";return`${QI(e)}?${Uo(a).slice(1)}${u}`}function QI({config:e}){return e.emulator?rf(e,qI):`https://${e.authDomain}/${KI}`}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const bl="webStorageSupport";class JI{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Gg,this._completeRedirectFn=_I,this._overrideRedirectResult=yI}async _openPopup(t,n,r,i){var o;dn((o=this.eventManagers[t._key()])===null||o===void 0?void 0:o.manager,"_initialize() not called before _openPopup()");const s=await Cp(t,n,r,xu(),i);return HI(t,s,cf())}async _openRedirect(t,n,r,i){await this._originValidation(t);const o=await Cp(t,n,r,xu(),i);return ZT(o),new Promise(()=>{})}_initialize(t){const n=t._key();if(this.eventManagers[n]){const{manager:i,promise:o}=this.eventManagers[n];return i?Promise.resolve(i):(dn(o,"If manager is not set, promise should be"),o)}const r=this.initAndGetManager(t);return this.eventManagers[n]={promise:r},r.catch(()=>{delete this.eventManagers[n]}),r}async initAndGetManager(t){const n=await FI(t),r=new EI(t);return n.register("authEvent",i=>(U(i==null?void 0:i.authEvent,t,"invalid-auth-event"),{status:r.onEvent(i.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[t._key()]={manager:r},this.iframes[t._key()]=n,r}_isIframeWebStorageSupported(t,n){this.iframes[t._key()].send(bl,{type:bl},i=>{var o;const s=(o=i==null?void 0:i[0])===null||o===void 0?void 0:o[bl];s!==void 0&&n(!!s),fn(t,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(t){const n=t._key();return this.originValidationPromises[n]||(this.originValidationPromises[n]=AI(t)),this.originValidationPromises[n]}get _shouldInitProactively(){return Ug()||xg()||af()}}const XI=JI;var Op="@firebase/auth",bp="1.7.9";/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class YI{constructor(t){this.auth=t,this.internalListeners=new Map}getUid(){var t;return this.assertAuthConfigured(),((t=this.auth.currentUser)===null||t===void 0?void 0:t.uid)||null}async getToken(t){return this.assertAuthConfigured(),await this.auth._initializationPromise,this.auth.currentUser?{accessToken:await this.auth.currentUser.getIdToken(t)}:null}addAuthTokenListener(t){if(this.assertAuthConfigured(),this.internalListeners.has(t))return;const n=this.auth.onIdTokenChanged(r=>{t((r==null?void 0:r.stsTokenManager.accessToken)||null)});this.internalListeners.set(t,n),this.updateProactiveRefresh()}removeAuthTokenListener(t){this.assertAuthConfigured();const n=this.internalListeners.get(t);n&&(this.internalListeners.delete(t),n(),this.updateProactiveRefresh())}assertAuthConfigured(){U(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function ZI(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}function ek(e){Rt(new _t("auth",(t,{options:n})=>{const r=t.getProvider("app").getImmediate(),i=t.getProvider("heartbeat"),o=t.getProvider("app-check-internal"),{apiKey:s,authDomain:a}=r.options;U(s&&!s.includes(":"),"invalid-api-key",{appName:r.name});const l={apiKey:s,authDomain:a,clientPlatform:e,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:Bg(e)},u=new NT(r,i,o,l);return FT(u,n),u},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((t,n,r)=>{t.getProvider("auth-internal").initialize()})),Rt(new _t("auth-internal",t=>{const n=lf(t.getProvider("auth").getImmediate());return(r=>new YI(r))(n)},"PRIVATE").setInstantiationMode("EXPLICIT")),vt(Op,bp,ZI(e)),vt(Op,bp,"esm2017")}/** * @license * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const tk=5*60,nk=mg("authIdTokenMaxAge")||tk;let Rp=null;const rk=e=>async t=>{const n=t&&await t.getIdTokenResult(),r=n&&(new Date().getTime()-Date.parse(n.issuedAtTime))/1e3;if(r&&r>nk)return;const i=n==null?void 0:n.token;Rp!==i&&(Rp=i,await fetch(e,{method:i?"POST":"DELETE",headers:i?{Authorization:`Bearer ${i}`}:{}}))};function LN(e=ef()){const t=Or(e,"auth");if(t.isInitialized())return t.getImmediate();const n=$T(e,{popupRedirectResolver:XI,persistence:[lI,JT,Gg]}),r=mg("authTokenSyncURL");if(r&&typeof isSecureContext=="boolean"&&isSecureContext){const o=new URL(r,location.origin);if(location.origin===o.origin){const s=rk(o.toString());qT(n,s,()=>s(n.currentUser)),KT(n,a=>s(a))}}const i=F1("auth");return i&&UT(n,`http://${i}`),n}function ik(){var e,t;return(t=(e=document.getElementsByTagName("head"))===null||e===void 0?void 0:e[0])!==null&&t!==void 0?t:document}xT({loadJS(e){return new Promise((t,n)=>{const r=document.createElement("script");r.setAttribute("src",e),r.onload=t,r.onerror=i=>{const o=Vt("internal-error");o.customData=i,n(o)},r.type="text/javascript",r.charset="UTF-8",ik().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="});ek("Browser");const ty="@firebase/installations",df="0.6.9";/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const ny=1e4,ry=`w:${df}`,iy="FIS_v2",ok="https://firebaseinstallations.googleapis.com/v1",sk=60*60*1e3,ak="installations",lk="Installations";/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const uk={"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"not-registered":"Firebase Installation is not registered.","installation-not-found":"Firebase Installation not found.","request-failed":'{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',"app-offline":"Could not process request. Application offline.","delete-pending-registration":"Can't delete installation while there is a pending registration request."},Sr=new qn(ak,lk,uk);function oy(e){return e instanceof qt&&e.code.includes("request-failed")}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function sy({projectId:e}){return`${ok}/projects/${e}/installations`}function ay(e){return{token:e.token,requestStatus:2,expiresIn:fk(e.expiresIn),creationTime:Date.now()}}async function ly(e,t){const r=(await t.json()).error;return Sr.create("request-failed",{requestName:e,serverCode:r.code,serverMessage:r.message,serverStatus:r.status})}function uy({apiKey:e}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e})}function ck(e,{refreshToken:t}){const n=uy(e);return n.append("Authorization",dk(t)),n}async function cy(e){const t=await e();return t.status>=500&&t.status<600?e():t}function fk(e){return Number(e.replace("s","000"))}function dk(e){return`${iy} ${e}`}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */async function pk({appConfig:e,heartbeatServiceProvider:t},{fid:n}){const r=sy(e),i=uy(e),o=t.getImmediate({optional:!0});if(o){const u=await o.getHeartbeatsHeader();u&&i.append("x-firebase-client",u)}const s={fid:n,authVersion:iy,appId:e.appId,sdkVersion:ry},a={method:"POST",headers:i,body:JSON.stringify(s)},l=await cy(()=>fetch(r,a));if(l.ok){const u=await l.json();return{fid:u.fid||n,registrationStatus:2,refreshToken:u.refreshToken,authToken:ay(u.authToken)}}else throw await ly("Create Installation",l)}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function fy(e){return new Promise(t=>{setTimeout(t,e)})}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function hk(e){return btoa(String.fromCharCode(...e)).replace(/\+/g,"-").replace(/\//g,"_")}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const mk=/^[cdef][\w-]{21}$/,Mu="";function gk(){try{const e=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(e),e[0]=112+e[0]%16;const n=yk(e);return mk.test(n)?n:Mu}catch{return Mu}}function yk(e){return hk(e).substr(0,22)}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function Wa(e){return`${e.appName}!${e.appId}`}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const dy=new Map;function py(e,t){const n=Wa(e);hy(n,t),vk(n,t)}function hy(e,t){const n=dy.get(e);if(n)for(const r of n)r(t)}function vk(e,t){const n=wk();n&&n.postMessage({key:e,fid:t}),_k()}let lr=null;function wk(){return!lr&&"BroadcastChannel"in self&&(lr=new BroadcastChannel("[Firebase] FID Change"),lr.onmessage=e=>{hy(e.data.key,e.data.fid)}),lr}function _k(){dy.size===0&&lr&&(lr.close(),lr=null)}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const Sk="firebase-installations-database",Ek=1,Er="firebase-installations-store";let Rl=null;function pf(){return Rl||(Rl=ja(Sk,Ek,{upgrade:(e,t)=>{switch(t){case 0:e.createObjectStore(Er)}}})),Rl}async function ra(e,t){const n=Wa(e),i=(await pf()).transaction(Er,"readwrite"),o=i.objectStore(Er),s=await o.get(n);return await o.put(t,n),await i.done,(!s||s.fid!==t.fid)&&py(e,t.fid),t}async function my(e){const t=Wa(e),r=(await pf()).transaction(Er,"readwrite");await r.objectStore(Er).delete(t),await r.done}async function Ka(e,t){const n=Wa(e),i=(await pf()).transaction(Er,"readwrite"),o=i.objectStore(Er),s=await o.get(n),a=t(s);return a===void 0?await o.delete(n):await o.put(a,n),await i.done,a&&(!s||s.fid!==a.fid)&&py(e,a.fid),a}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */async function hf(e){let t;const n=await Ka(e.appConfig,r=>{const i=Tk(r),o=Ik(e,i);return t=o.registrationPromise,o.installationEntry});return n.fid===Mu?{installationEntry:await t}:{installationEntry:n,registrationPromise:t}}function Tk(e){const t=e||{fid:gk(),registrationStatus:0};return gy(t)}function Ik(e,t){if(t.registrationStatus===0){if(!navigator.onLine){const i=Promise.reject(Sr.create("app-offline"));return{installationEntry:t,registrationPromise:i}}const n={fid:t.fid,registrationStatus:1,registrationTime:Date.now()},r=kk(e,n);return{installationEntry:n,registrationPromise:r}}else return t.registrationStatus===1?{installationEntry:t,registrationPromise:Pk(e)}:{installationEntry:t}}async function kk(e,t){try{const n=await pk(e,t);return ra(e.appConfig,n)}catch(n){throw oy(n)&&n.customData.serverCode===409?await my(e.appConfig):await ra(e.appConfig,{fid:t.fid,registrationStatus:0}),n}}async function Pk(e){let t=await Np(e.appConfig);for(;t.registrationStatus===1;)await fy(100),t=await Np(e.appConfig);if(t.registrationStatus===0){const{installationEntry:n,registrationPromise:r}=await hf(e);return r||n}return t}function Np(e){return Ka(e,t=>{if(!t)throw Sr.create("installation-not-found");return gy(t)})}function gy(e){return Ak(e)?{fid:e.fid,registrationStatus:0}:e}function Ak(e){return e.registrationStatus===1&&e.registrationTime+nyfetch(r,a));if(l.ok){const u=await l.json();return ay(u)}else throw await ly("Generate Auth Token",l)}function Ok(e,{fid:t}){return`${sy(e)}/${t}/authTokens:generate`}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */async function mf(e,t=!1){let n;const r=await Ka(e.appConfig,o=>{if(!yy(o))throw Sr.create("not-registered");const s=o.authToken;if(!t&&Nk(s))return o;if(s.requestStatus===1)return n=bk(e,t),o;{if(!navigator.onLine)throw Sr.create("app-offline");const a=Dk(o);return n=Rk(e,a),a}});return n?await n:r.authToken}async function bk(e,t){let n=await xp(e.appConfig);for(;n.authToken.requestStatus===1;)await fy(100),n=await xp(e.appConfig);const r=n.authToken;return r.requestStatus===0?mf(e,t):r}function xp(e){return Ka(e,t=>{if(!yy(t))throw Sr.create("not-registered");const n=t.authToken;return Lk(n)?Object.assign(Object.assign({},t),{authToken:{requestStatus:0}}):t})}async function Rk(e,t){try{const n=await Ck(e,t),r=Object.assign(Object.assign({},t),{authToken:n});return await ra(e.appConfig,r),n}catch(n){if(oy(n)&&(n.customData.serverCode===401||n.customData.serverCode===404))await my(e.appConfig);else{const r=Object.assign(Object.assign({},t),{authToken:{requestStatus:0}});await ra(e.appConfig,r)}throw n}}function yy(e){return e!==void 0&&e.registrationStatus===2}function Nk(e){return e.requestStatus===2&&!xk(e)}function xk(e){const t=Date.now();return t{const t=e.getProvider("app").getImmediate(),n=Uk(t),r=Or(t,"heartbeat");return{app:t,appConfig:n,heartbeatServiceProvider:r,_delete:()=>Promise.resolve()}},jk=e=>{const t=e.getProvider("app").getImmediate(),n=Or(t,vy).getImmediate();return{getId:()=>Mk(n),getToken:i=>$k(n,i)}};function Vk(){Rt(new _t(vy,zk,"PUBLIC")),Rt(new _t(Bk,jk,"PRIVATE"))}Vk();vt(ty,df);vt(ty,df,"esm2017");/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const ia="analytics",Hk="firebase_id",Wk="origin",Kk=60*1e3,qk="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig",gf="https://www.googletagmanager.com/gtag/js";/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const Xe=new Yc("@firebase/analytics");/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const Gk={"already-exists":"A Firebase Analytics instance with the appId {$id} already exists. Only one Firebase Analytics instance can be created for each appId.","already-initialized":"initializeAnalytics() cannot be called again with different options than those it was initially called with. It can be called again with the same options to return the existing instance, or getAnalytics() can be used to get a reference to the already-initialized instance.","already-initialized-settings":"Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect.","interop-component-reg-failed":"Firebase Analytics Interop Component failed to instantiate: {$reason}","invalid-analytics-context":"Firebase Analytics is not supported in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","indexeddb-unavailable":"IndexedDB unavailable or restricted in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","fetch-throttle":"The config fetch request timed out while in an exponential backoff state. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.","config-fetch-failed":"Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}","no-api-key":'The "apiKey" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid API key.',"no-app-id":'The "appId" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid app ID.',"no-client-id":'The "client_id" field is empty.',"invalid-gtag-resource":"Trusted Types detected an invalid gtag resource: {$gtagURL}."},st=new qn("analytics","Analytics",Gk);/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function Qk(e){if(!e.startsWith(gf)){const t=st.create("invalid-gtag-resource",{gtagURL:e});return Xe.warn(t.message),""}return e}function wy(e){return Promise.all(e.map(t=>t.catch(n=>n)))}function Jk(e,t){let n;return window.trustedTypes&&(n=window.trustedTypes.createPolicy(e,t)),n}function Xk(e,t){const n=Jk("firebase-js-sdk-policy",{createScriptURL:Qk}),r=document.createElement("script"),i=`${gf}?l=${e}&id=${t}`;r.src=n?n==null?void 0:n.createScriptURL(i):i,r.async=!0,document.head.appendChild(r)}function Yk(e){let t=[];return Array.isArray(window[e])?t=window[e]:window[e]=t,t}async function Zk(e,t,n,r,i,o){const s=r[i];try{if(s)await t[s];else{const l=(await wy(n)).find(u=>u.measurementId===i);l&&await t[l.appId]}}catch(a){Xe.error(a)}e("config",i,o)}async function eP(e,t,n,r,i){try{let o=[];if(i&&i.send_to){let s=i.send_to;Array.isArray(s)||(s=[s]);const a=await wy(n);for(const l of s){const u=a.find(f=>f.measurementId===l),c=u&&t[u.appId];if(c)o.push(c);else{o=[];break}}}o.length===0&&(o=Object.values(t)),await Promise.all(o),e("event",r,i||{})}catch(o){Xe.error(o)}}function tP(e,t,n,r){async function i(o,...s){try{if(o==="event"){const[a,l]=s;await eP(e,t,n,a,l)}else if(o==="config"){const[a,l]=s;await Zk(e,t,n,r,a,l)}else if(o==="consent"){const[a,l]=s;e("consent",a,l)}else if(o==="get"){const[a,l,u]=s;e("get",a,l,u)}else if(o==="set"){const[a]=s;e("set",a)}else e(o,...s)}catch(a){Xe.error(a)}}return i}function nP(e,t,n,r,i){let o=function(...s){window[r].push(arguments)};return window[i]&&typeof window[i]=="function"&&(o=window[i]),window[i]=tP(o,e,t,n),{gtagCore:o,wrappedGtag:window[i]}}function rP(e){const t=window.document.getElementsByTagName("script");for(const n of Object.values(t))if(n.src&&n.src.includes(gf)&&n.src.includes(e))return n;return null}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const iP=30,oP=1e3;class sP{constructor(t={},n=oP){this.throttleMetadata=t,this.intervalMillis=n}getThrottleMetadata(t){return this.throttleMetadata[t]}setThrottleMetadata(t,n){this.throttleMetadata[t]=n}deleteThrottleMetadata(t){delete this.throttleMetadata[t]}}const _y=new sP;function aP(e){return new Headers({Accept:"application/json","x-goog-api-key":e})}async function lP(e){var t;const{appId:n,apiKey:r}=e,i={method:"GET",headers:aP(r)},o=qk.replace("{app-id}",n),s=await fetch(o,i);if(s.status!==200&&s.status!==304){let a="";try{const l=await s.json();!((t=l.error)===null||t===void 0)&&t.message&&(a=l.error.message)}catch{}throw st.create("config-fetch-failed",{httpStatus:s.status,responseMessage:a})}return s.json()}async function uP(e,t=_y,n){const{appId:r,apiKey:i,measurementId:o}=e.options;if(!r)throw st.create("no-app-id");if(!i){if(o)return{measurementId:o,appId:r};throw st.create("no-api-key")}const s=t.getThrottleMetadata(r)||{backoffCount:0,throttleEndTimeMillis:Date.now()},a=new dP;return setTimeout(async()=>{a.abort()},Kk),Sy({appId:r,apiKey:i,measurementId:o},s,a,t)}async function Sy(e,{throttleEndTimeMillis:t,backoffCount:n},r,i=_y){var o;const{appId:s,measurementId:a}=e;try{await cP(r,t)}catch(l){if(a)return Xe.warn(`Timed out fetching this Firebase app's measurement ID from the server. Falling back to the measurement ID ${a} provided in the "measurementId" field in the local Firebase config. [${l==null?void 0:l.message}]`),{appId:s,measurementId:a};throw l}try{const l=await lP(e);return i.deleteThrottleMetadata(s),l}catch(l){const u=l;if(!fP(u)){if(i.deleteThrottleMetadata(s),a)return Xe.warn(`Failed to fetch this Firebase app's measurement ID from the server. Falling back to the measurement ID ${a} provided in the "measurementId" field in the local Firebase config. [${u==null?void 0:u.message}]`),{appId:s,measurementId:a};throw l}const c=Number((o=u==null?void 0:u.customData)===null||o===void 0?void 0:o.httpStatus)===503?sp(n,i.intervalMillis,iP):sp(n,i.intervalMillis),f={throttleEndTimeMillis:Date.now()+c,backoffCount:n+1};return i.setThrottleMetadata(s,f),Xe.debug(`Calling attemptFetch again in ${c} millis`),Sy(e,f,r,i)}}function cP(e,t){return new Promise((n,r)=>{const i=Math.max(t-Date.now(),0),o=setTimeout(n,i);e.addEventListener(()=>{clearTimeout(o),r(st.create("fetch-throttle",{throttleEndTimeMillis:t}))})})}function fP(e){if(!(e instanceof qt)||!e.customData)return!1;const t=Number(e.customData.httpStatus);return t===429||t===500||t===503||t===504}class dP{constructor(){this.listeners=[]}addEventListener(t){this.listeners.push(t)}abort(){this.listeners.forEach(t=>t())}}async function pP(e,t,n,r,i){if(i&&i.global){e("event",n,r);return}else{const o=await t,s=Object.assign(Object.assign({},r),{send_to:o});e("event",n,s)}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */async function hP(){if(Jc())try{await Xc()}catch(e){return Xe.warn(st.create("indexeddb-unavailable",{errorInfo:e==null?void 0:e.toString()}).message),!1}else return Xe.warn(st.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),!1;return!0}async function mP(e,t,n,r,i,o,s){var a;const l=uP(e);l.then(w=>{n[w.measurementId]=w.appId,e.options.measurementId&&w.measurementId!==e.options.measurementId&&Xe.warn(`The measurement ID in the local Firebase config (${e.options.measurementId}) does not match the measurement ID fetched from the server (${w.measurementId}). To ensure analytics events are always sent to the correct Analytics property, update the measurement ID field in the local config or remove it from the local config.`)}).catch(w=>Xe.error(w)),t.push(l);const u=hP().then(w=>{if(w)return r.getId()}),[c,f]=await Promise.all([l,u]);rP(o)||Xk(o,c.measurementId),i("js",new Date);const p=(a=s==null?void 0:s.config)!==null&&a!==void 0?a:{};return p[Wk]="firebase",p.update=!0,f!=null&&(p[Hk]=f),i("config",c.measurementId,p),c.measurementId}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class gP{constructor(t){this.app=t}_delete(){return delete Gi[this.app.options.appId],Promise.resolve()}}let Gi={},Dp=[];const Lp={};let xl="dataLayer",yP="gtag",Mp,Ey,$p=!1;function vP(){const e=[];if(gg()&&e.push("This is a browser extension environment."),yg()||e.push("Cookies are not available."),e.length>0){const t=e.map((r,i)=>`(${i+1}) ${r}`).join(" "),n=st.create("invalid-analytics-context",{errorInfo:t});Xe.warn(n.message)}}function wP(e,t,n){vP();const r=e.options.appId;if(!r)throw st.create("no-app-id");if(!e.options.apiKey)if(e.options.measurementId)Xe.warn(`The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest measurement ID for this Firebase app. Falling back to the measurement ID ${e.options.measurementId} provided in the "measurementId" field in the local Firebase config.`);else throw st.create("no-api-key");if(Gi[r]!=null)throw st.create("already-exists",{id:r});if(!$p){Yk(xl);const{wrappedGtag:o,gtagCore:s}=nP(Gi,Dp,Lp,xl,yP);Ey=o,Mp=s,$p=!0}return Gi[r]=mP(e,Dp,Lp,t,Mp,xl,n),new gP(e)}function _P(e=ef()){e=ut(e);const t=Or(e,ia);return t.isInitialized()?t.getImmediate():SP(e)}function SP(e,t={}){const n=Or(e,ia);if(n.isInitialized()){const i=n.getImmediate();if(uo(t,n.getOptions()))return i;throw st.create("already-initialized")}return n.initialize({options:t})}function EP(e,t,n,r){e=ut(e),pP(Ey,Gi[e.app.options.appId],t,n,r).catch(i=>Xe.error(i))}const Fp="@firebase/analytics",Up="0.10.8";function TP(){Rt(new _t(ia,(t,{options:n})=>{const r=t.getProvider("app").getImmediate(),i=t.getProvider("installations-internal").getImmediate();return wP(r,i,n)},"PUBLIC")),Rt(new _t("analytics-internal",e,"PRIVATE")),vt(Fp,Up),vt(Fp,Up,"esm2017");function e(t){try{const n=t.getProvider(ia).getImmediate();return{logEvent:(r,i,o)=>EP(n,r,i,o)}}catch(n){throw st.create("interop-component-reg-failed",{reason:n})}}}TP();/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const IP="/firebase-messaging-sw.js",kP="/firebase-cloud-messaging-push-scope",Ty="BDOU99-h67HcA6JeFXHbSNMu7e2yNNu3RzoMj8TM4W88jITfq7ZmPvIM1Iv-4_l2LxQcYwhqby2xGpWwzjfAnG4",PP="https://fcmregistrations.googleapis.com/v1",Iy="google.c.a.c_id",AP="google.c.a.c_l",CP="google.c.a.ts",OP="google.c.a.e";var Bp;(function(e){e[e.DATA_MESSAGE=1]="DATA_MESSAGE",e[e.DISPLAY_NOTIFICATION=3]="DISPLAY_NOTIFICATION"})(Bp||(Bp={}));/** * @license * Copyright 2018 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */var po;(function(e){e.PUSH_RECEIVED="push-received",e.NOTIFICATION_CLICKED="notification-clicked"})(po||(po={}));/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function Xt(e){const t=new Uint8Array(e);return btoa(String.fromCharCode(...t)).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function bP(e){const t="=".repeat((4-e.length%4)%4),n=(e+t).replace(/\-/g,"+").replace(/_/g,"/"),r=atob(n),i=new Uint8Array(r.length);for(let o=0;oo.name).includes(Dl))return null;let t=null;return(await ja(Dl,RP,{upgrade:async(r,i,o,s)=>{var a;if(i<2||!r.objectStoreNames.contains(zp))return;const l=s.objectStore(zp),u=await l.index("fcmSenderId").get(e);if(await l.clear(),!!u){if(i===2){const c=u;if(!c.auth||!c.p256dh||!c.endpoint)return;t={token:c.fcmToken,createTime:(a=c.createTime)!==null&&a!==void 0?a:Date.now(),subscriptionOptions:{auth:c.auth,p256dh:c.p256dh,endpoint:c.endpoint,swScope:c.swScope,vapidKey:typeof c.vapidKey=="string"?c.vapidKey:Xt(c.vapidKey)}}}else if(i===3){const c=u;t={token:c.fcmToken,createTime:c.createTime,subscriptionOptions:{auth:Xt(c.auth),p256dh:Xt(c.p256dh),endpoint:c.endpoint,swScope:c.swScope,vapidKey:Xt(c.vapidKey)}}}else if(i===4){const c=u;t={token:c.fcmToken,createTime:c.createTime,subscriptionOptions:{auth:Xt(c.auth),p256dh:Xt(c.p256dh),endpoint:c.endpoint,swScope:c.swScope,vapidKey:Xt(c.vapidKey)}}}}}})).close(),await Pl(Dl),await Pl("fcm_vapid_details_db"),await Pl("undefined"),xP(t)?t:null}function xP(e){if(!e||!e.subscriptionOptions)return!1;const{subscriptionOptions:t}=e;return typeof e.createTime=="number"&&e.createTime>0&&typeof e.token=="string"&&e.token.length>0&&typeof t.auth=="string"&&t.auth.length>0&&typeof t.p256dh=="string"&&t.p256dh.length>0&&typeof t.endpoint=="string"&&t.endpoint.length>0&&typeof t.swScope=="string"&&t.swScope.length>0&&typeof t.vapidKey=="string"&&t.vapidKey.length>0}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const DP="firebase-messaging-database",LP=1,ho="firebase-messaging-store";let Ll=null;function ky(){return Ll||(Ll=ja(DP,LP,{upgrade:(e,t)=>{switch(t){case 0:e.createObjectStore(ho)}}})),Ll}async function MP(e){const t=Py(e),r=await(await ky()).transaction(ho).objectStore(ho).get(t);if(r)return r;{const i=await NP(e.appConfig.senderId);if(i)return await yf(e,i),i}}async function yf(e,t){const n=Py(e),i=(await ky()).transaction(ho,"readwrite");return await i.objectStore(ho).put(t,n),await i.done,t}function Py({appConfig:e}){return e.appId}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const $P={"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"only-available-in-window":"This method is available in a Window context.","only-available-in-sw":"This method is available in a service worker context.","permission-default":"The notification permission was not granted and dismissed instead.","permission-blocked":"The notification permission was not granted and blocked instead.","unsupported-browser":"This browser doesn't support the API's required to use the Firebase SDK.","indexed-db-unsupported":"This browser doesn't support indexedDb.open() (ex. Safari iFrame, Firefox Private Browsing, etc)","failed-service-worker-registration":"We are unable to register the default service worker. {$browserErrorMessage}","token-subscribe-failed":"A problem occurred while subscribing the user to FCM: {$errorInfo}","token-subscribe-no-token":"FCM returned no token when subscribing the user to push.","token-unsubscribe-failed":"A problem occurred while unsubscribing the user from FCM: {$errorInfo}","token-update-failed":"A problem occurred while updating the user from FCM: {$errorInfo}","token-update-no-token":"FCM returned no token when updating the user to push.","use-sw-after-get-token":"The useServiceWorker() method may only be called once and must be called before calling getToken() to ensure your service worker is used.","invalid-sw-registration":"The input to useServiceWorker() must be a ServiceWorkerRegistration.","invalid-bg-handler":"The input to setBackgroundMessageHandler() must be a function.","invalid-vapid-key":"The public VAPID key must be a string.","use-vapid-key-after-get-token":"The usePublicVapidKey() method may only be called once and must be called before calling getToken() to ensure your VAPID key is used."},Ue=new qn("messaging","Messaging",$P);/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */async function FP(e,t){const n=await wf(e),r=Ay(t),i={method:"POST",headers:n,body:JSON.stringify(r)};let o;try{o=await(await fetch(vf(e.appConfig),i)).json()}catch(s){throw Ue.create("token-subscribe-failed",{errorInfo:s==null?void 0:s.toString()})}if(o.error){const s=o.error.message;throw Ue.create("token-subscribe-failed",{errorInfo:s})}if(!o.token)throw Ue.create("token-subscribe-no-token");return o.token}async function UP(e,t){const n=await wf(e),r=Ay(t.subscriptionOptions),i={method:"PATCH",headers:n,body:JSON.stringify(r)};let o;try{o=await(await fetch(`${vf(e.appConfig)}/${t.token}`,i)).json()}catch(s){throw Ue.create("token-update-failed",{errorInfo:s==null?void 0:s.toString()})}if(o.error){const s=o.error.message;throw Ue.create("token-update-failed",{errorInfo:s})}if(!o.token)throw Ue.create("token-update-no-token");return o.token}async function BP(e,t){const r={method:"DELETE",headers:await wf(e)};try{const o=await(await fetch(`${vf(e.appConfig)}/${t}`,r)).json();if(o.error){const s=o.error.message;throw Ue.create("token-unsubscribe-failed",{errorInfo:s})}}catch(i){throw Ue.create("token-unsubscribe-failed",{errorInfo:i==null?void 0:i.toString()})}}function vf({projectId:e}){return`${PP}/projects/${e}/registrations`}async function wf({appConfig:e,installations:t}){const n=await t.getToken();return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e.apiKey,"x-goog-firebase-installations-auth":`FIS ${n}`})}function Ay({p256dh:e,auth:t,endpoint:n,vapidKey:r}){const i={web:{endpoint:n,auth:t,p256dh:e}};return r!==Ty&&(i.web.applicationPubKey=r),i}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const zP=7*24*60*60*1e3;async function jP(e){const t=await HP(e.swRegistration,e.vapidKey),n={vapidKey:e.vapidKey,swScope:e.swRegistration.scope,endpoint:t.endpoint,auth:Xt(t.getKey("auth")),p256dh:Xt(t.getKey("p256dh"))},r=await MP(e.firebaseDependencies);if(r){if(WP(r.subscriptionOptions,n))return Date.now()>=r.createTime+zP?VP(e,{token:r.token,createTime:Date.now(),subscriptionOptions:n}):r.token;try{await BP(e.firebaseDependencies,r.token)}catch(i){console.warn(i)}return jp(e.firebaseDependencies,n)}else return jp(e.firebaseDependencies,n)}async function VP(e,t){try{const n=await UP(e.firebaseDependencies,t),r=Object.assign(Object.assign({},t),{token:n,createTime:Date.now()});return await yf(e.firebaseDependencies,r),n}catch(n){throw n}}async function jp(e,t){const r={token:await FP(e,t),createTime:Date.now(),subscriptionOptions:t};return await yf(e,r),r.token}async function HP(e,t){const n=await e.pushManager.getSubscription();return n||e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:bP(t)})}function WP(e,t){const n=t.vapidKey===e.vapidKey,r=t.endpoint===e.endpoint,i=t.auth===e.auth,o=t.p256dh===e.p256dh;return n&&r&&i&&o}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function Vp(e){const t={from:e.from,collapseKey:e.collapse_key,messageId:e.fcmMessageId};return KP(t,e),qP(t,e),GP(t,e),t}function KP(e,t){if(!t.notification)return;e.notification={};const n=t.notification.title;n&&(e.notification.title=n);const r=t.notification.body;r&&(e.notification.body=r);const i=t.notification.image;i&&(e.notification.image=i);const o=t.notification.icon;o&&(e.notification.icon=o)}function qP(e,t){t.data&&(e.data=t.data)}function GP(e,t){var n,r,i,o,s;if(!t.fcmOptions&&!(!((n=t.notification)===null||n===void 0)&&n.click_action))return;e.fcmOptions={};const a=(i=(r=t.fcmOptions)===null||r===void 0?void 0:r.link)!==null&&i!==void 0?i:(o=t.notification)===null||o===void 0?void 0:o.click_action;a&&(e.fcmOptions.link=a);const l=(s=t.fcmOptions)===null||s===void 0?void 0:s.analytics_label;l&&(e.fcmOptions.analyticsLabel=l)}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function QP(e){return typeof e=="object"&&!!e&&Iy in e}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function JP(e){if(!e||!e.options)throw Ml("App Configuration Object");if(!e.name)throw Ml("App Name");const t=["projectId","apiKey","appId","messagingSenderId"],{options:n}=e;for(const r of t)if(!n[r])throw Ml(r);return{appName:e.name,projectId:n.projectId,apiKey:n.apiKey,appId:n.appId,senderId:n.messagingSenderId}}function Ml(e){return Ue.create("missing-app-config-values",{valueName:e})}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class XP{constructor(t,n,r){this.deliveryMetricsExportedToBigQueryEnabled=!1,this.onBackgroundMessageHandler=null,this.onMessageHandler=null,this.logEvents=[],this.isLogServiceStarted=!1;const i=JP(t);this.firebaseDependencies={app:t,appConfig:i,installations:n,analyticsProvider:r}}_delete(){return Promise.resolve()}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */async function YP(e){try{e.swRegistration=await navigator.serviceWorker.register(IP,{scope:kP}),e.swRegistration.update().catch(()=>{})}catch(t){throw Ue.create("failed-service-worker-registration",{browserErrorMessage:t==null?void 0:t.message})}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */async function ZP(e,t){if(!t&&!e.swRegistration&&await YP(e),!(!t&&e.swRegistration)){if(!(t instanceof ServiceWorkerRegistration))throw Ue.create("invalid-sw-registration");e.swRegistration=t}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */async function eA(e,t){t?e.vapidKey=t:e.vapidKey||(e.vapidKey=Ty)}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */async function Cy(e,t){if(!navigator)throw Ue.create("only-available-in-window");if(Notification.permission==="default"&&await Notification.requestPermission(),Notification.permission!=="granted")throw Ue.create("permission-blocked");return await eA(e,t==null?void 0:t.vapidKey),await ZP(e,t==null?void 0:t.serviceWorkerRegistration),jP(e)}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */async function tA(e,t,n){const r=nA(t);(await e.firebaseDependencies.analyticsProvider.get()).logEvent(r,{message_id:n[Iy],message_name:n[AP],message_time:n[CP],message_device_time:Math.floor(Date.now()/1e3)})}function nA(e){switch(e){case po.NOTIFICATION_CLICKED:return"notification_open";case po.PUSH_RECEIVED:return"notification_foreground";default:throw new Error}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */async function rA(e,t){const n=t.data;if(!n.isFirebaseMessaging)return;e.onMessageHandler&&n.messageType===po.PUSH_RECEIVED&&(typeof e.onMessageHandler=="function"?e.onMessageHandler(Vp(n)):e.onMessageHandler.next(Vp(n)));const r=n.data;QP(r)&&r[OP]==="1"&&await tA(e,n.messageType,r)}const Hp="@firebase/messaging",Wp="0.12.12";/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const iA=e=>{const t=new XP(e.getProvider("app").getImmediate(),e.getProvider("installations-internal").getImmediate(),e.getProvider("analytics-internal"));return navigator.serviceWorker.addEventListener("message",n=>rA(t,n)),t},oA=e=>{const t=e.getProvider("messaging").getImmediate();return{getToken:r=>Cy(t,r)}};function sA(){Rt(new _t("messaging",iA,"PUBLIC")),Rt(new _t("messaging-internal",oA,"PRIVATE")),vt(Hp,Wp),vt(Hp,Wp,"esm2017")}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */async function aA(){try{await Xc()}catch{return!1}return typeof window<"u"&&Jc()&&yg()&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function lA(e,t){if(!navigator)throw Ue.create("only-available-in-window");return e.onMessageHandler=t,()=>{e.onMessageHandler=null}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function uA(e=ef()){return aA().then(t=>{if(!t)throw Ue.create("unsupported-browser")},t=>{throw Ue.create("indexed-db-unsupported")}),Or(ut(e),"messaging").getImmediate()}async function cA(e,t){return e=ut(e),Cy(e,t)}function fA(e,t){return e=ut(e),lA(e,t)}sA();function Oy(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;ttypeof e=="number"&&!isNaN(e),hr=e=>typeof e=="string",rt=e=>typeof e=="function",Ms=e=>hr(e)||rt(e)?e:null,$u=e=>L.isValidElement(e)||hr(e)||rt(e)||mo(e);function dA(e,t,n){n===void 0&&(n=300);const{scrollHeight:r,style:i}=e;requestAnimationFrame(()=>{i.minHeight="initial",i.height=r+"px",i.transition=`all ${n}ms`,requestAnimationFrame(()=>{i.height="0",i.padding="0",i.margin="0",setTimeout(t,n)})})}function qa(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:i=!0,collapseDuration:o=300}=e;return function(s){let{children:a,position:l,preventExitTransition:u,done:c,nodeRef:f,isIn:p,playToast:w}=s;const d=r?`${t}--${l}`:t,v=r?`${n}--${l}`:n,T=L.useRef(0);return L.useLayoutEffect(()=>{const y=f.current,h=d.split(" "),m=S=>{S.target===f.current&&(w(),y.removeEventListener("animationend",m),y.removeEventListener("animationcancel",m),T.current===0&&S.type!=="animationcancel"&&y.classList.remove(...h))};y.classList.add(...h),y.addEventListener("animationend",m),y.addEventListener("animationcancel",m)},[]),L.useEffect(()=>{const y=f.current,h=()=>{y.removeEventListener("animationend",h),i?dA(y,c,o):c()};p||(u?h():(T.current=1,y.className+=` ${v}`,y.addEventListener("animationend",h)))},[p]),J.createElement(J.Fragment,null,a)}}function Kp(e,t){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const Ve=new Map;let go=[];const Fu=new Set,pA=e=>Fu.forEach(t=>t(e)),by=()=>Ve.size>0;function Ry(e,t){var n;if(t)return!((n=Ve.get(t))==null||!n.isToastActive(e));let r=!1;return Ve.forEach(i=>{i.isToastActive(e)&&(r=!0)}),r}function Ny(e,t){$u(e)&&(by()||go.push({content:e,options:t}),Ve.forEach(n=>{n.buildToast(e,t)}))}function qp(e,t){Ve.forEach(n=>{t!=null&&t!=null&&t.containerId?(t==null?void 0:t.containerId)===n.id&&n.toggle(e,t==null?void 0:t.id):n.toggle(e,t==null?void 0:t.id)})}function hA(e){const{subscribe:t,getSnapshot:n,setProps:r}=L.useRef(function(o){const s=o.containerId||1;return{subscribe(a){const l=function(c,f,p){let w=1,d=0,v=[],T=[],y=[],h=f;const m=new Map,S=new Set,k=()=>{y=Array.from(m.values()),S.forEach(_=>_())},C=_=>{T=_==null?[]:T.filter(P=>P!==_),k()},A=_=>{const{toastId:P,onOpen:O,updateId:B,children:F}=_.props,ee=B==null;_.staleId&&m.delete(_.staleId),m.set(P,_),T=[...T,_.props.toastId].filter(fe=>fe!==_.staleId),k(),p(Kp(_,ee?"added":"updated")),ee&&rt(O)&&O(L.isValidElement(F)&&F.props)};return{id:c,props:h,observe:_=>(S.add(_),()=>S.delete(_)),toggle:(_,P)=>{m.forEach(O=>{P!=null&&P!==O.props.toastId||rt(O.toggle)&&O.toggle(_)})},removeToast:C,toasts:m,clearQueue:()=>{d-=v.length,v=[]},buildToast:(_,P)=>{if((Q=>{let{containerId:_e,toastId:me,updateId:H}=Q;const Ie=_e?_e!==c:c!==1,dt=m.has(me)&&H==null;return Ie||dt})(P))return;const{toastId:O,updateId:B,data:F,staleId:ee,delay:fe}=P,ye=()=>{C(O)},xe=B==null;xe&&d++;const we={...h,style:h.toastStyle,key:w++,...Object.fromEntries(Object.entries(P).filter(Q=>{let[_e,me]=Q;return me!=null})),toastId:O,updateId:B,data:F,closeToast:ye,isIn:!1,className:Ms(P.className||h.toastClassName),bodyClassName:Ms(P.bodyClassName||h.bodyClassName),progressClassName:Ms(P.progressClassName||h.progressClassName),autoClose:!P.isLoading&&(N=P.autoClose,M=h.autoClose,N===!1||mo(N)&&N>0?N:M),deleteToast(){const Q=m.get(O),{onClose:_e,children:me}=Q.props;rt(_e)&&_e(L.isValidElement(me)&&me.props),p(Kp(Q,"removed")),m.delete(O),d--,d<0&&(d=0),v.length>0?A(v.shift()):k()}};var N,M;we.closeButton=h.closeButton,P.closeButton===!1||$u(P.closeButton)?we.closeButton=P.closeButton:P.closeButton===!0&&(we.closeButton=!$u(h.closeButton)||h.closeButton);let $=_;L.isValidElement(_)&&!hr(_.type)?$=L.cloneElement(_,{closeToast:ye,toastProps:we,data:F}):rt(_)&&($=_({closeToast:ye,toastProps:we,data:F}));const G={content:$,props:we,staleId:ee};h.limit&&h.limit>0&&d>h.limit&&xe?v.push(G):mo(fe)?setTimeout(()=>{A(G)},fe):A(G)},setProps(_){h=_},setToggle:(_,P)=>{m.get(_).toggle=P},isToastActive:_=>T.some(P=>P===_),getSnapshot:()=>y}}(s,o,pA);Ve.set(s,l);const u=l.observe(a);return go.forEach(c=>Ny(c.content,c.options)),go=[],()=>{u(),Ve.delete(s)}},setProps(a){var l;(l=Ve.get(s))==null||l.setProps(a)},getSnapshot(){var a;return(a=Ve.get(s))==null?void 0:a.getSnapshot()}}}(e)).current;r(e);const i=L.useSyncExternalStore(t,n,n);return{getToastToRender:function(o){if(!i)return[];const s=new Map;return e.newestOnTop&&i.reverse(),i.forEach(a=>{const{position:l}=a.props;s.has(l)||s.set(l,[]),s.get(l).push(a)}),Array.from(s,a=>o(a[0],a[1]))},isToastActive:Ry,count:i==null?void 0:i.length}}function mA(e){const[t,n]=L.useState(!1),[r,i]=L.useState(!1),o=L.useRef(null),s=L.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:a,pauseOnHover:l,closeToast:u,onClick:c,closeOnClick:f}=e;var p,w;function d(){n(!0)}function v(){n(!1)}function T(m){const S=o.current;s.canDrag&&S&&(s.didMove=!0,t&&v(),s.delta=e.draggableDirection==="x"?m.clientX-s.start:m.clientY-s.start,s.start!==m.clientX&&(s.canCloseOnClick=!1),S.style.transform=`translate3d(${e.draggableDirection==="x"?`${s.delta}px, var(--y)`:`0, calc(${s.delta}px + var(--y))`},0)`,S.style.opacity=""+(1-Math.abs(s.delta/s.removalDistance)))}function y(){document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",y);const m=o.current;if(s.canDrag&&s.didMove&&m){if(s.canDrag=!1,Math.abs(s.delta)>s.removalDistance)return i(!0),e.closeToast(),void e.collapseAll();m.style.transition="transform 0.2s, opacity 0.2s",m.style.removeProperty("transform"),m.style.removeProperty("opacity")}}(w=Ve.get((p={id:e.toastId,containerId:e.containerId,fn:n}).containerId||1))==null||w.setToggle(p.id,p.fn),L.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||v(),window.addEventListener("focus",d),window.addEventListener("blur",v),()=>{window.removeEventListener("focus",d),window.removeEventListener("blur",v)}},[e.pauseOnFocusLoss]);const h={onPointerDown:function(m){if(e.draggable===!0||e.draggable===m.pointerType){s.didMove=!1,document.addEventListener("pointermove",T),document.addEventListener("pointerup",y);const S=o.current;s.canCloseOnClick=!0,s.canDrag=!0,S.style.transition="none",e.draggableDirection==="x"?(s.start=m.clientX,s.removalDistance=S.offsetWidth*(e.draggablePercent/100)):(s.start=m.clientY,s.removalDistance=S.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(m){const{top:S,bottom:k,left:C,right:A}=o.current.getBoundingClientRect();m.nativeEvent.type!=="touchend"&&e.pauseOnHover&&m.clientX>=C&&m.clientX<=A&&m.clientY>=S&&m.clientY<=k?v():d()}};return a&&l&&(h.onMouseEnter=v,e.stacked||(h.onMouseLeave=d)),f&&(h.onClick=m=>{c&&c(m),s.canCloseOnClick&&u()}),{playToast:d,pauseToast:v,isRunning:t,preventExitTransition:r,toastRef:o,eventHandlers:h}}function gA(e){let{delay:t,isRunning:n,closeToast:r,type:i="default",hide:o,className:s,style:a,controlledProgress:l,progress:u,rtl:c,isIn:f,theme:p}=e;const w=o||l&&u===0,d={...a,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};l&&(d.transform=`scaleX(${u})`);const v=Nn("Toastify__progress-bar",l?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${p}`,`Toastify__progress-bar--${i}`,{"Toastify__progress-bar--rtl":c}),T=rt(s)?s({rtl:c,type:i,defaultClassName:v}):Nn(v,s),y={[l&&u>=1?"onTransitionEnd":"onAnimationEnd"]:l&&u<1?null:()=>{f&&r()}};return J.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":w},J.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${p} Toastify__progress-bar--${i}`}),J.createElement("div",{role:"progressbar","aria-hidden":w?"true":"false","aria-label":"notification timer",className:T,style:d,...y}))}let yA=1;const xy=()=>""+yA++;function vA(e){return e&&(hr(e.toastId)||mo(e.toastId))?e.toastId:xy()}function Qi(e,t){return Ny(e,t),t.toastId}function oa(e,t){return{...t,type:t&&t.type||e,toastId:vA(t)}}function ss(e){return(t,n)=>Qi(t,oa(e,n))}function Y(e,t){return Qi(e,oa("default",t))}Y.loading=(e,t)=>Qi(e,oa("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),Y.promise=function(e,t,n){let r,{pending:i,error:o,success:s}=t;i&&(r=hr(i)?Y.loading(i,n):Y.loading(i.render,{...n,...i}));const a={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},l=(c,f,p)=>{if(f==null)return void Y.dismiss(r);const w={type:c,...a,...n,data:p},d=hr(f)?{render:f}:f;return r?Y.update(r,{...w,...d}):Y(d.render,{...w,...d}),p},u=rt(e)?e():e;return u.then(c=>l("success",s,c)).catch(c=>l("error",o,c)),u},Y.success=ss("success"),Y.info=ss("info"),Y.error=ss("error"),Y.warning=ss("warning"),Y.warn=Y.warning,Y.dark=(e,t)=>Qi(e,oa("default",{theme:"dark",...t})),Y.dismiss=function(e){(function(t){var n;if(by()){if(t==null||hr(n=t)||mo(n))Ve.forEach(r=>{r.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){const r=Ve.get(t.containerId);r?r.removeToast(t.id):Ve.forEach(i=>{i.removeToast(t.id)})}}else go=go.filter(r=>t!=null&&r.options.toastId!==t)})(e)},Y.clearWaitingQueue=function(e){e===void 0&&(e={}),Ve.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},Y.isActive=Ry,Y.update=function(e,t){t===void 0&&(t={});const n=((r,i)=>{var o;let{containerId:s}=i;return(o=Ve.get(s||1))==null?void 0:o.toasts.get(r)})(e,t);if(n){const{props:r,content:i}=n,o={delay:100,...r,...t,toastId:t.toastId||e,updateId:xy()};o.toastId!==e&&(o.staleId=e);const s=o.render||i;delete o.render,Qi(s,o)}},Y.done=e=>{Y.update(e,{progress:1})},Y.onChange=function(e){return Fu.add(e),()=>{Fu.delete(e)}},Y.play=e=>qp(!0,e),Y.pause=e=>qp(!1,e);const wA=typeof window<"u"?L.useLayoutEffect:L.useEffect,as=e=>{let{theme:t,type:n,isLoading:r,...i}=e;return J.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...i})},$l={info:function(e){return J.createElement(as,{...e},J.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return J.createElement(as,{...e},J.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return J.createElement(as,{...e},J.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return J.createElement(as,{...e},J.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return J.createElement("div",{className:"Toastify__spinner"})}},_A=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:i,playToast:o}=mA(e),{closeButton:s,children:a,autoClose:l,onClick:u,type:c,hideProgressBar:f,closeToast:p,transition:w,position:d,className:v,style:T,bodyClassName:y,bodyStyle:h,progressClassName:m,progressStyle:S,updateId:k,role:C,progress:A,rtl:_,toastId:P,deleteToast:O,isIn:B,isLoading:F,closeOnClick:ee,theme:fe}=e,ye=Nn("Toastify__toast",`Toastify__toast-theme--${fe}`,`Toastify__toast--${c}`,{"Toastify__toast--rtl":_},{"Toastify__toast--close-on-click":ee}),xe=rt(v)?v({rtl:_,position:d,type:c,defaultClassName:ye}):Nn(ye,v),we=function(G){let{theme:Q,type:_e,isLoading:me,icon:H}=G,Ie=null;const dt={theme:Q,type:_e};return H===!1||(rt(H)?Ie=H({...dt,isLoading:me}):L.isValidElement(H)?Ie=L.cloneElement(H,dt):me?Ie=$l.spinner():(Tt=>Tt in $l)(_e)&&(Ie=$l[_e](dt))),Ie}(e),N=!!A||!l,M={closeToast:p,type:c,theme:fe};let $=null;return s===!1||($=rt(s)?s(M):L.isValidElement(s)?L.cloneElement(s,M):function(G){let{closeToast:Q,theme:_e,ariaLabel:me="close"}=G;return J.createElement("button",{className:`Toastify__close-button Toastify__close-button--${_e}`,type:"button",onClick:H=>{H.stopPropagation(),Q(H)},"aria-label":me},J.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},J.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(M)),J.createElement(w,{isIn:B,done:O,position:d,preventExitTransition:n,nodeRef:r,playToast:o},J.createElement("div",{id:P,onClick:u,"data-in":B,className:xe,...i,style:T,ref:r},J.createElement("div",{...B&&{role:C},className:rt(y)?y({type:c}):Nn("Toastify__toast-body",y),style:h},we!=null&&J.createElement("div",{className:Nn("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!F})},we),J.createElement("div",null,a)),$,J.createElement(gA,{...k&&!N?{key:`pb-${k}`}:{},rtl:_,theme:fe,delay:l,isRunning:t,isIn:B,closeToast:p,hide:f,type:c,style:S,className:m,controlledProgress:N,progress:A||0})))},Ga=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},Dy=qa(Ga("bounce",!0));qa(Ga("slide",!0));qa(Ga("zoom"));qa(Ga("flip"));const SA={position:"top-right",transition:Dy,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function MN(e){let t={...SA,...e};const n=e.stacked,[r,i]=L.useState(!0),o=L.useRef(null),{getToastToRender:s,isToastActive:a,count:l}=hA(t),{className:u,style:c,rtl:f,containerId:p}=t;function w(v){const T=Nn("Toastify__toast-container",`Toastify__toast-container--${v}`,{"Toastify__toast-container--rtl":f});return rt(u)?u({position:v,rtl:f,defaultClassName:T}):Nn(T,Ms(u))}function d(){n&&(i(!0),Y.play())}return wA(()=>{if(n){var v;const T=o.current.querySelectorAll('[data-in="true"]'),y=12,h=(v=t.position)==null?void 0:v.includes("top");let m=0,S=0;Array.from(T).reverse().forEach((k,C)=>{const A=k;A.classList.add("Toastify__toast--stacked"),C>0&&(A.dataset.collapsed=`${r}`),A.dataset.pos||(A.dataset.pos=h?"top":"bot");const _=m*(r?.2:1)+(r?0:y*C);A.style.setProperty("--y",`${h?_:-1*_}px`),A.style.setProperty("--g",`${y}`),A.style.setProperty("--s",""+(1-(r?S:0))),m+=A.offsetHeight,S+=.025})}},[r,l,n]),J.createElement("div",{ref:o,className:"Toastify",id:p,onMouseEnter:()=>{n&&(i(!1),Y.pause())},onMouseLeave:d},s((v,T)=>{const y=T.length?{...c}:{...c,pointerEvents:"none"};return J.createElement("div",{className:w(v),style:y,key:`container-${v}`},T.map(h=>{let{content:m,props:S}=h;return J.createElement(_A,{...S,stacked:n,collapseAll:d,isIn:a(S.toastId,S.containerId),style:S.style,key:`toast-${S.key}`},m)}))}))}let Fl={};const EA=e=>{const t={position:"top-right",autoClose:5e3,delay:1e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0,theme:"light",transition:Dy},n=i=>i.toString().toLowerCase().replace(/\s+/g,"_").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"_").replace(/^-+/,"").replace(/-+$/,""),r=(i,o)=>{const s=n(`${i}_${o}`);return Fl[s]==null?(Fl[s]=!0,setTimeout(()=>{delete Fl[s]},t.autoClose+t.delay),!0):!1};(e!=null&&e.info||e!=null&&e.success||e!=null&&e.error)&&(e!=null&&e.success&&r("success",e.success)?Y.success(e.success,t):e!=null&&e.info&&r("info",e.info)?Y.info(e.info,t):e!=null&&e.error&&r("error",e.error)&&Y.error(e.error,t))},TA={apiKey:"AIzaSyCtWr9RQYoZB8tCCxExvpVtjCu5BhOOe-A",authDomain:"golftogether-676a4.firebaseapp.com",projectId:"golftogether-676a4",storageBucket:"golftogether-676a4.appspot.com",messagingSenderId:"943755315489",appId:"1:943755315489:web:fd1a382bdd675a539c9660",measurementId:"G-3VLN1V2MJV"},Ly=_g(TA);_P(Ly);new tn;const My=uA(Ly),Gp=async()=>{cA(My,{vapidKey:"BPZv85nUNP7XCcAQDQoH0ruYiXQA_lpQ6geIaQ-4rSPf3f8BVnl_jz1r6zaO5gxKeTj2Wewkr-CcCSmP0T1eXIg"}).then(e=>{e&&ue.post("/token",{token:e}).then(t=>t)}).catch(e=>{console.log(e)})};fA(My,e=>{var n,r,i,o;console.log("notification payload",e);const t=(n=e==null?void 0:e.notification)==null?void 0:n.title;new Notification((r=e==null?void 0:e.notification)==null?void 0:r.title,{body:(i=e==null?void 0:e.notification)==null?void 0:i.body,icon:(o=e==null?void 0:e.notification)==null?void 0:o.image}),EA({info:t})});Notification.permission!=="granted"?Notification.requestPermission().then(e=>{e==="granted"&&Gp().then(t=>t)}):Gp().then(e=>e);var $y={exports:{}},ct={},Fy={exports:{}},Uy={};/** * @license React * scheduler.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */(function(e){function t(N,M){var $=N.length;N.push(M);e:for(;0<$;){var G=$-1>>>1,Q=N[G];if(0>>1;G<_e;){var me=2*(G+1)-1,H=N[me],Ie=me+1,dt=N[Ie];if(0>i(H,$))Iei(dt,H)?(N[G]=dt,N[Ie]=$,G=Ie):(N[G]=H,N[me]=$,G=me);else if(Iei(dt,$))N[G]=dt,N[Ie]=$,G=Ie;else break e}}return M}function i(N,M){var $=N.sortIndex-M.sortIndex;return $!==0?$:N.id-M.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],u=[],c=1,f=null,p=3,w=!1,d=!1,v=!1,T=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function m(N){for(var M=n(u);M!==null;){if(M.callback===null)r(u);else if(M.startTime<=N)r(u),M.sortIndex=M.expirationTime,t(l,M);else break;M=n(u)}}function S(N){if(v=!1,m(N),!d)if(n(l)!==null)d=!0,xe(k);else{var M=n(u);M!==null&&we(S,M.startTime-N)}}function k(N,M){d=!1,v&&(v=!1,y(_),_=-1),w=!0;var $=p;try{for(m(M),f=n(l);f!==null&&(!(f.expirationTime>M)||N&&!B());){var G=f.callback;if(typeof G=="function"){f.callback=null,p=f.priorityLevel;var Q=G(f.expirationTime<=M);M=e.unstable_now(),typeof Q=="function"?f.callback=Q:f===n(l)&&r(l),m(M)}else r(l);f=n(l)}if(f!==null)var _e=!0;else{var me=n(u);me!==null&&we(S,me.startTime-M),_e=!1}return _e}finally{f=null,p=$,w=!1}}var C=!1,A=null,_=-1,P=5,O=-1;function B(){return!(e.unstable_now()-ON||125G?(N.sortIndex=$,t(u,N),n(l)===null&&N===n(u)&&(v?(y(_),_=-1):v=!0,we(S,$-G))):(N.sortIndex=Q,t(l,N),d||w||(d=!0,xe(k))),N},e.unstable_shouldYield=B,e.unstable_wrapCallback=function(N){var M=p;return function(){var $=p;p=M;try{return N.apply(this,arguments)}finally{p=$}}}})(Uy);Fy.exports=Uy;var IA=Fy.exports;/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var kA=L,lt=IA;function R(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Uu=Object.prototype.hasOwnProperty,PA=/^[: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]*$/,Qp={},Jp={};function AA(e){return Uu.call(Jp,e)?!0:Uu.call(Qp,e)?!1:PA.test(e)?Jp[e]=!0:(Qp[e]=!0,!1)}function CA(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function OA(e,t,n,r){if(t===null||typeof t>"u"||CA(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function qe(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var Ne={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ne[e]=new qe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ne[t]=new qe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ne[e]=new qe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ne[e]=new qe(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ne[e]=new qe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ne[e]=new qe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ne[e]=new qe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ne[e]=new qe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ne[e]=new qe(e,5,!1,e.toLowerCase(),null,!1,!1)});var _f=/[\-:]([a-z])/g;function Sf(e){return e[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(e){var t=e.replace(_f,Sf);Ne[t]=new qe(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(_f,Sf);Ne[t]=new qe(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(_f,Sf);Ne[t]=new qe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ne[e]=new qe(e,1,!1,e.toLowerCase(),null,!1,!1)});Ne.xlinkHref=new qe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ne[e]=new qe(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ef(e,t,n,r){var i=Ne.hasOwnProperty(t)?Ne[t]:null;(i!==null?i.type!==0:r||!(2a||i[s]!==o[a]){var l=` `+i[s].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{Bl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Vi(e):""}function bA(e){switch(e.tag){case 5:return Vi(e.type);case 16:return Vi("Lazy");case 13:return Vi("Suspense");case 19:return Vi("SuspenseList");case 0:case 2:case 15:return e=zl(e.type,!1),e;case 11:return e=zl(e.type.render,!1),e;case 1:return e=zl(e.type,!0),e;default:return""}}function Vu(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Br:return"Fragment";case Ur:return"Portal";case Bu:return"Profiler";case Tf:return"StrictMode";case zu:return"Suspense";case ju:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case jy:return(e.displayName||"Context")+".Consumer";case zy:return(e._context.displayName||"Context")+".Provider";case If:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case kf:return t=e.displayName||null,t!==null?t:Vu(e.type)||"Memo";case In:t=e._payload,e=e._init;try{return Vu(e(t))}catch{}}return null}function RA(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Vu(t);case 8:return t===Tf?"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 t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Wn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Hy(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function NA(e){var t=Hy(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function us(e){e._valueTracker||(e._valueTracker=NA(e))}function Wy(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Hy(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function sa(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Hu(e,t){var n=t.checked;return ce({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Yp(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Wn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Ky(e,t){t=t.checked,t!=null&&Ef(e,"checked",t,!1)}function Wu(e,t){Ky(e,t);var n=Wn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ku(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ku(e,t.type,Wn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Zp(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Ku(e,t,n){(t!=="number"||sa(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Hi=Array.isArray;function ei(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=cs.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function vo(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ji={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},xA=["Webkit","ms","Moz","O"];Object.keys(Ji).forEach(function(e){xA.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ji[t]=Ji[e]})});function Jy(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ji.hasOwnProperty(e)&&Ji[e]?(""+t).trim():t+"px"}function Xy(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Jy(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var DA=ce({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 Qu(e,t){if(t){if(DA[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(R(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(R(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(R(61))}if(t.style!=null&&typeof t.style!="object")throw Error(R(62))}}function Ju(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Xu=null;function Pf(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Yu=null,ti=null,ni=null;function nh(e){if(e=Ko(e)){if(typeof Yu!="function")throw Error(R(280));var t=e.stateNode;t&&(t=Za(t),Yu(e.stateNode,e.type,t))}}function Yy(e){ti?ni?ni.push(e):ni=[e]:ti=e}function Zy(){if(ti){var e=ti,t=ni;if(ni=ti=null,nh(e),t)for(e=0;e>>=0,e===0?32:31-(WA(e)/KA|0)|0}var fs=64,ds=4194304;function Wi(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ca(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=Wi(a):(o&=s,o!==0&&(r=Wi(o)))}else s=n&~i,s!==0?r=Wi(s):o!==0&&(r=Wi(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Ho(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ot(t),e[t]=n}function JA(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Yi),fh=" ",dh=!1;function wv(e,t){switch(e){case"keyup":return IC.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _v(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var zr=!1;function PC(e,t){switch(e){case"compositionend":return _v(t);case"keypress":return t.which!==32?null:(dh=!0,fh);case"textInput":return e=t.data,e===fh&&dh?null:e;default:return null}}function AC(e,t){if(zr)return e==="compositionend"||!Df&&wv(e,t)?(e=yv(),Fs=Rf=xn=null,zr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=gh(n)}}function Iv(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Iv(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function kv(){for(var e=window,t=sa();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=sa(e.document)}return t}function Lf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function MC(e){var t=kv(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Iv(n.ownerDocument.documentElement,n)){if(r!==null&&Lf(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=yh(n,o);var s=yh(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,jr=null,ic=null,eo=null,oc=!1;function vh(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;oc||jr==null||jr!==sa(r)||(r=jr,"selectionStart"in r&&Lf(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}),eo&&Io(eo,r)||(eo=r,r=pa(ic,"onSelect"),0Wr||(e.current=fc[Wr],fc[Wr]=null,Wr--)}function te(e,t){Wr++,fc[Wr]=e.current,e.current=t}var Kn={},Be=Qn(Kn),Ye=Qn(!1),Tr=Kn;function ui(e,t){var n=e.type.contextTypes;if(!n)return Kn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ze(e){return e=e.childContextTypes,e!=null}function ma(){ie(Ye),ie(Be)}function kh(e,t,n){if(Be.current!==Kn)throw Error(R(168));te(Be,t),te(Ye,n)}function Dv(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(R(108,RA(e)||"Unknown",i));return ce({},n,r)}function ga(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Kn,Tr=Be.current,te(Be,e),te(Ye,Ye.current),!0}function Ph(e,t,n){var r=e.stateNode;if(!r)throw Error(R(169));n?(e=Dv(e,t,Tr),r.__reactInternalMemoizedMergedChildContext=e,ie(Ye),ie(Be),te(Be,e)):ie(Ye),te(Ye,n)}var en=null,el=!1,tu=!1;function Lv(e){en===null?en=[e]:en.push(e)}function GC(e){el=!0,Lv(e)}function Jn(){if(!tu&&en!==null){tu=!0;var e=0,t=X;try{var n=en;for(X=1;e>=s,i-=s,sn=1<<32-Ot(t)+i|n<_?(P=A,A=null):P=A.sibling;var O=p(y,A,m[_],S);if(O===null){A===null&&(A=P);break}e&&A&&O.alternate===null&&t(y,A),h=o(O,h,_),C===null?k=O:C.sibling=O,C=O,A=P}if(_===m.length)return n(y,A),oe&&ir(y,_),k;if(A===null){for(;__?(P=A,A=null):P=A.sibling;var B=p(y,A,O.value,S);if(B===null){A===null&&(A=P);break}e&&A&&B.alternate===null&&t(y,A),h=o(B,h,_),C===null?k=B:C.sibling=B,C=B,A=P}if(O.done)return n(y,A),oe&&ir(y,_),k;if(A===null){for(;!O.done;_++,O=m.next())O=f(y,O.value,S),O!==null&&(h=o(O,h,_),C===null?k=O:C.sibling=O,C=O);return oe&&ir(y,_),k}for(A=r(y,A);!O.done;_++,O=m.next())O=w(A,y,_,O.value,S),O!==null&&(e&&O.alternate!==null&&A.delete(O.key===null?_:O.key),h=o(O,h,_),C===null?k=O:C.sibling=O,C=O);return e&&A.forEach(function(F){return t(y,F)}),oe&&ir(y,_),k}function T(y,h,m,S){if(typeof m=="object"&&m!==null&&m.type===Br&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case ls:e:{for(var k=m.key,C=h;C!==null;){if(C.key===k){if(k=m.type,k===Br){if(C.tag===7){n(y,C.sibling),h=i(C,m.props.children),h.return=y,y=h;break e}}else if(C.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===In&&Oh(k)===C.type){n(y,C.sibling),h=i(C,m.props),h.ref=$i(y,C,m),h.return=y,y=h;break e}n(y,C);break}else t(y,C);C=C.sibling}m.type===Br?(h=gr(m.props.children,y.mode,S,m.key),h.return=y,y=h):(S=Ks(m.type,m.key,m.props,null,y.mode,S),S.ref=$i(y,h,m),S.return=y,y=S)}return s(y);case Ur:e:{for(C=m.key;h!==null;){if(h.key===C)if(h.tag===4&&h.stateNode.containerInfo===m.containerInfo&&h.stateNode.implementation===m.implementation){n(y,h.sibling),h=i(h,m.children||[]),h.return=y,y=h;break e}else{n(y,h);break}else t(y,h);h=h.sibling}h=uu(m,y.mode,S),h.return=y,y=h}return s(y);case In:return C=m._init,T(y,h,C(m._payload),S)}if(Hi(m))return d(y,h,m,S);if(Ni(m))return v(y,h,m,S);ws(y,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,h!==null&&h.tag===6?(n(y,h.sibling),h=i(h,m),h.return=y,y=h):(n(y,h),h=lu(m,y.mode,S),h.return=y,y=h),s(y)):n(y,h)}return T}var fi=Uv(!0),Bv=Uv(!1),wa=Qn(null),_a=null,Gr=null,Uf=null;function Bf(){Uf=Gr=_a=null}function zf(e){var t=wa.current;ie(wa),e._currentValue=t}function hc(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function ii(e,t){_a=e,Uf=Gr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Qe=!0),e.firstContext=null)}function St(e){var t=e._currentValue;if(Uf!==e)if(e={context:e,memoizedValue:t,next:null},Gr===null){if(_a===null)throw Error(R(308));Gr=e,_a.dependencies={lanes:0,firstContext:e}}else Gr=Gr.next=e;return t}var cr=null;function jf(e){cr===null?cr=[e]:cr.push(e)}function zv(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,jf(t)):(n.next=i.next,i.next=n),t.interleaved=n,mn(e,r)}function mn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var kn=!1;function Vf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function jv(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function un(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function zn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,q&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,mn(e,n)}return i=r.interleaved,i===null?(t.next=t,jf(r)):(t.next=i.next,i.next=t),r.interleaved=t,mn(e,n)}function Bs(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Cf(e,n)}}function bh(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Sa(e,t,n,r){var i=e.updateQueue;kn=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,u=l.next;l.next=null,s===null?o=u:s.next=u,s=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==s&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(o!==null){var f=i.baseState;s=0,c=u=l=null,a=o;do{var p=a.lane,w=a.eventTime;if((r&p)===p){c!==null&&(c=c.next={eventTime:w,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var d=e,v=a;switch(p=t,w=n,v.tag){case 1:if(d=v.payload,typeof d=="function"){f=d.call(w,f,p);break e}f=d;break e;case 3:d.flags=d.flags&-65537|128;case 0:if(d=v.payload,p=typeof d=="function"?d.call(w,f,p):d,p==null)break e;f=ce({},f,p);break e;case 2:kn=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,p=i.effects,p===null?i.effects=[a]:p.push(a))}else w={eventTime:w,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=w,l=f):c=c.next=w,s|=p;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;p=a,a=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(!0);if(c===null&&(l=f),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);Pr|=s,e.lanes=s,e.memoizedState=f}}function Rh(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=ru.transition;ru.transition={};try{e(!1),t()}finally{X=n,ru.transition=r}}function o0(){return Et().memoizedState}function YC(e,t,n){var r=Vn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},s0(e))a0(t,n);else if(n=zv(e,t,n,r),n!==null){var i=He();bt(n,e,r,i),l0(n,t,r)}}function ZC(e,t,n){var r=Vn(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(s0(e))a0(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,Nt(a,s)){var l=t.interleaved;l===null?(i.next=i,jf(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=zv(e,t,i,r),n!==null&&(i=He(),bt(n,e,r,i),l0(n,t,r))}}function s0(e){var t=e.alternate;return e===le||t!==null&&t===le}function a0(e,t){to=Ta=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function l0(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Cf(e,n)}}var Ia={readContext:St,useCallback:Le,useContext:Le,useEffect:Le,useImperativeHandle:Le,useInsertionEffect:Le,useLayoutEffect:Le,useMemo:Le,useReducer:Le,useRef:Le,useState:Le,useDebugValue:Le,useDeferredValue:Le,useTransition:Le,useMutableSource:Le,useSyncExternalStore:Le,useId:Le,unstable_isNewReconciler:!1},eO={readContext:St,useCallback:function(e,t){return Ft().memoizedState=[e,t===void 0?null:t],e},useContext:St,useEffect:xh,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,js(4194308,4,e0.bind(null,t,e),n)},useLayoutEffect:function(e,t){return js(4194308,4,e,t)},useInsertionEffect:function(e,t){return js(4,2,e,t)},useMemo:function(e,t){var n=Ft();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ft();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=YC.bind(null,le,e),[r.memoizedState,e]},useRef:function(e){var t=Ft();return e={current:e},t.memoizedState=e},useState:Nh,useDebugValue:Xf,useDeferredValue:function(e){return Ft().memoizedState=e},useTransition:function(){var e=Nh(!1),t=e[0];return e=XC.bind(null,e[1]),Ft().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=le,i=Ft();if(oe){if(n===void 0)throw Error(R(407));n=n()}else{if(n=t(),Ce===null)throw Error(R(349));kr&30||Kv(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,xh(Gv.bind(null,r,o,e),[e]),r.flags|=2048,No(9,qv.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Ft(),t=Ce.identifierPrefix;if(oe){var n=an,r=sn;n=(r&~(1<<32-Ot(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=bo++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[zt]=t,e[Ao]=r,v0(e,t,!1,!1),t.stateNode=e;e:{switch(s=Ju(n,r),n){case"dialog":re("cancel",e),re("close",e),i=r;break;case"iframe":case"object":case"embed":re("load",e),i=r;break;case"video":case"audio":for(i=0;ihi&&(t.flags|=128,r=!0,Fi(o,!1),t.lanes=4194304)}else{if(!r)if(e=Ea(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Fi(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!oe)return Me(t),null}else 2*ge()-o.renderingStartTime>hi&&n!==1073741824&&(t.flags|=128,r=!0,Fi(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=ge(),t.sibling=null,n=ae.current,te(ae,r?n&1|2:n&1),t):(Me(t),null);case 22:case 23:return rd(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?nt&1073741824&&(Me(t),t.subtreeFlags&6&&(t.flags|=8192)):Me(t),null;case 24:return null;case 25:return null}throw Error(R(156,t.tag))}function lO(e,t){switch($f(t),t.tag){case 1:return Ze(t.type)&&ma(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return di(),ie(Ye),ie(Be),Kf(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Wf(t),null;case 13:if(ie(ae),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(R(340));ci()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ie(ae),null;case 4:return di(),null;case 10:return zf(t.type._context),null;case 22:case 23:return rd(),null;case 24:return null;default:return null}}var Ss=!1,$e=!1,uO=typeof WeakSet=="function"?WeakSet:Set,D=null;function Qr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){he(e,t,r)}else n.current=null}function Tc(e,t,n){try{n()}catch(r){he(e,t,r)}}var Hh=!1;function cO(e,t){if(sc=fa,e=kv(),Lf(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,u=0,c=0,f=e,p=null;t:for(;;){for(var w;f!==n||i!==0&&f.nodeType!==3||(a=s+i),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(w=f.firstChild)!==null;)p=f,f=w;for(;;){if(f===e)break t;if(p===n&&++u===i&&(a=s),p===o&&++c===r&&(l=s),(w=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=w}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(ac={focusedElem:e,selectionRange:n},fa=!1,D=t;D!==null;)if(t=D,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,D=e;else for(;D!==null;){t=D;try{var d=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(d!==null){var v=d.memoizedProps,T=d.memoizedState,y=t.stateNode,h=y.getSnapshotBeforeUpdate(t.elementType===t.type?v:Pt(t.type,v),T);y.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var m=t.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(R(163))}}catch(S){he(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,D=e;break}D=t.return}return d=Hh,Hh=!1,d}function no(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Tc(t,n,o)}i=i.next}while(i!==r)}}function rl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ic(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function S0(e){var t=e.alternate;t!==null&&(e.alternate=null,S0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[zt],delete t[Ao],delete t[cc],delete t[KC],delete t[qC])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function E0(e){return e.tag===5||e.tag===3||e.tag===4}function Wh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||E0(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function kc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ha));else if(r!==4&&(e=e.child,e!==null))for(kc(e,t,n),e=e.sibling;e!==null;)kc(e,t,n),e=e.sibling}function Pc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Pc(e,t,n),e=e.sibling;e!==null;)Pc(e,t,n),e=e.sibling}var be=null,At=!1;function Tn(e,t,n){for(n=n.child;n!==null;)T0(e,t,n),n=n.sibling}function T0(e,t,n){if(Wt&&typeof Wt.onCommitFiberUnmount=="function")try{Wt.onCommitFiberUnmount(Qa,n)}catch{}switch(n.tag){case 5:$e||Qr(n,t);case 6:var r=be,i=At;be=null,Tn(e,t,n),be=r,At=i,be!==null&&(At?(e=be,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):be.removeChild(n.stateNode));break;case 18:be!==null&&(At?(e=be,n=n.stateNode,e.nodeType===8?eu(e.parentNode,n):e.nodeType===1&&eu(e,n),Eo(e)):eu(be,n.stateNode));break;case 4:r=be,i=At,be=n.stateNode.containerInfo,At=!0,Tn(e,t,n),be=r,At=i;break;case 0:case 11:case 14:case 15:if(!$e&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&Tc(n,t,s),i=i.next}while(i!==r)}Tn(e,t,n);break;case 1:if(!$e&&(Qr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){he(n,t,a)}Tn(e,t,n);break;case 21:Tn(e,t,n);break;case 22:n.mode&1?($e=(r=$e)||n.memoizedState!==null,Tn(e,t,n),$e=r):Tn(e,t,n);break;default:Tn(e,t,n)}}function Kh(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new uO),t.forEach(function(r){var i=wO.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function kt(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=ge()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*dO(r/1960))-r,10e?16:e,Dn===null)var r=!1;else{if(e=Dn,Dn=null,Aa=0,q&6)throw Error(R(331));var i=q;for(q|=4,D=e.current;D!==null;){var o=D,s=o.child;if(D.flags&16){var a=o.deletions;if(a!==null){for(var l=0;lge()-td?mr(e,0):ed|=n),et(e,t)}function R0(e,t){t===0&&(e.mode&1?(t=ds,ds<<=1,!(ds&130023424)&&(ds=4194304)):t=1);var n=He();e=mn(e,t),e!==null&&(Ho(e,t,n),et(e,n))}function vO(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),R0(e,n)}function wO(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(R(314))}r!==null&&r.delete(t),R0(e,n)}var N0;N0=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ye.current)Qe=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Qe=!1,sO(e,t,n);Qe=!!(e.flags&131072)}else Qe=!1,oe&&t.flags&1048576&&Mv(t,va,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Vs(e,t),e=t.pendingProps;var i=ui(t,Be.current);ii(t,n),i=Gf(null,t,r,e,i,n);var o=Qf();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ze(r)?(o=!0,ga(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Vf(t),i.updater=nl,t.stateNode=i,i._reactInternals=t,gc(t,r,e,n),t=wc(null,t,r,!0,o,n)):(t.tag=0,oe&&o&&Mf(t),je(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Vs(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=SO(r),e=Pt(r,e),i){case 0:t=vc(null,t,r,e,n);break e;case 1:t=zh(null,t,r,e,n);break e;case 11:t=Uh(null,t,r,e,n);break e;case 14:t=Bh(null,t,r,Pt(r.type,e),n);break e}throw Error(R(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Pt(r,i),vc(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Pt(r,i),zh(e,t,r,i,n);case 3:e:{if(m0(t),e===null)throw Error(R(387));r=t.pendingProps,o=t.memoizedState,i=o.element,jv(e,t),Sa(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=pi(Error(R(423)),t),t=jh(e,t,r,n,i);break e}else if(r!==i){i=pi(Error(R(424)),t),t=jh(e,t,r,n,i);break e}else for(it=Bn(t.stateNode.containerInfo.firstChild),at=t,oe=!0,Ct=null,n=Bv(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ci(),r===i){t=gn(e,t,n);break e}je(e,t,r,n)}t=t.child}return t;case 5:return Vv(t),e===null&&pc(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,lc(r,i)?s=null:o!==null&&lc(r,o)&&(t.flags|=32),h0(e,t),je(e,t,s,n),t.child;case 6:return e===null&&pc(t),null;case 13:return g0(e,t,n);case 4:return Hf(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=fi(t,null,r,n):je(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Pt(r,i),Uh(e,t,r,i,n);case 7:return je(e,t,t.pendingProps,n),t.child;case 8:return je(e,t,t.pendingProps.children,n),t.child;case 12:return je(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,te(wa,r._currentValue),r._currentValue=s,o!==null)if(Nt(o.value,s)){if(o.children===i.children&&!Ye.current){t=gn(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=un(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),hc(o.return,n,t),a.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(R(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),hc(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}je(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,ii(t,n),i=St(i),r=r(i),t.flags|=1,je(e,t,r,n),t.child;case 14:return r=t.type,i=Pt(r,t.pendingProps),i=Pt(r.type,i),Bh(e,t,r,i,n);case 15:return d0(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Pt(r,i),Vs(e,t),t.tag=1,Ze(r)?(e=!0,ga(t)):e=!1,ii(t,n),u0(t,r,i),gc(t,r,i,n),wc(null,t,r,!0,e,n);case 19:return y0(e,t,n);case 22:return p0(e,t,n)}throw Error(R(156,t.tag))};function x0(e,t){return sv(e,t)}function _O(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yt(e,t,n,r){return new _O(e,t,n,r)}function od(e){return e=e.prototype,!(!e||!e.isReactComponent)}function SO(e){if(typeof e=="function")return od(e)?1:0;if(e!=null){if(e=e.$$typeof,e===If)return 11;if(e===kf)return 14}return 2}function Hn(e,t){var n=e.alternate;return n===null?(n=yt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ks(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")od(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Br:return gr(n.children,i,o,t);case Tf:s=8,i|=8;break;case Bu:return e=yt(12,n,t,i|2),e.elementType=Bu,e.lanes=o,e;case zu:return e=yt(13,n,t,i),e.elementType=zu,e.lanes=o,e;case ju:return e=yt(19,n,t,i),e.elementType=ju,e.lanes=o,e;case Vy:return ol(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case zy:s=10;break e;case jy:s=9;break e;case If:s=11;break e;case kf:s=14;break e;case In:s=16,r=null;break e}throw Error(R(130,e==null?e:typeof e,""))}return t=yt(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function gr(e,t,n,r){return e=yt(7,e,r,t),e.lanes=n,e}function ol(e,t,n,r){return e=yt(22,e,r,t),e.elementType=Vy,e.lanes=n,e.stateNode={isHidden:!1},e}function lu(e,t,n){return e=yt(6,e,null,t),e.lanes=n,e}function uu(e,t,n){return t=yt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function EO(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Vl(0),this.expirationTimes=Vl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vl(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function sd(e,t,n,r,i,o,s,a,l){return e=new EO(e,t,n,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=yt(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Vf(o),e}function TO(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE($0)}catch(e){console.error(e)}}$0(),$y.exports=ct;var F0=$y.exports;const $N=Lo(F0);var U0,em=F0;U0=em.createRoot,em.hydrateRoot;var CO=function(t){return OO(t)&&!bO(t)};function OO(e){return!!e&&typeof e=="object"}function bO(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||xO(e)}var RO=typeof Symbol=="function"&&Symbol.for,NO=RO?Symbol.for("react.element"):60103;function xO(e){return e.$$typeof===NO}function DO(e){return Array.isArray(e)?[]:{}}function Do(e,t){return t.clone!==!1&&t.isMergeableObject(e)?mi(DO(e),e,t):e}function LO(e,t,n){return e.concat(t).map(function(r){return Do(r,n)})}function MO(e,t){if(!t.customMerge)return mi;var n=t.customMerge(e);return typeof n=="function"?n:mi}function $O(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function tm(e){return Object.keys(e).concat($O(e))}function B0(e,t){try{return t in e}catch{return!1}}function FO(e,t){return B0(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function UO(e,t,n){var r={};return n.isMergeableObject(e)&&tm(e).forEach(function(i){r[i]=Do(e[i],n)}),tm(t).forEach(function(i){FO(e,i)||(B0(e,i)&&n.isMergeableObject(t[i])?r[i]=MO(i,n)(e[i],t[i],n):r[i]=Do(t[i],n))}),r}function mi(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||LO,n.isMergeableObject=n.isMergeableObject||CO,n.cloneUnlessOtherwiseSpecified=Do;var r=Array.isArray(t),i=Array.isArray(e),o=r===i;return o?r?n.arrayMerge(e,t,n):UO(e,t,n):Do(t,n)}mi.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return mi(r,i,n)},{})};var BO=mi,zO=BO;const jO=Lo(zO);var VO=Error,HO=EvalError,WO=RangeError,KO=ReferenceError,z0=SyntaxError,Go=TypeError,qO=URIError,GO=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;t[n]=i;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,n);if(s.value!==i||s.enumerable!==!0)return!1}return!0},nm=typeof Symbol<"u"&&Symbol,QO=GO,JO=function(){return typeof nm!="function"||typeof Symbol!="function"||typeof nm("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:QO()},cu={__proto__:null,foo:{}},XO=Object,YO=function(){return{__proto__:cu}.foo===cu.foo&&!(cu instanceof XO)},ZO="Function.prototype.bind called on incompatible ",eb=Object.prototype.toString,tb=Math.max,nb="[object Function]",rm=function(t,n){for(var r=[],i=0;i"u"||!Pe?K:Pe(Uint8Array),vr={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?K:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?K:ArrayBuffer,"%ArrayIteratorPrototype%":Dr&&Pe?Pe([][Symbol.iterator]()):K,"%AsyncFromSyncIteratorPrototype%":K,"%AsyncFunction%":$r,"%AsyncGenerator%":$r,"%AsyncGeneratorFunction%":$r,"%AsyncIteratorPrototype%":$r,"%Atomics%":typeof Atomics>"u"?K:Atomics,"%BigInt%":typeof BigInt>"u"?K:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?K:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?K:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?K:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":fb,"%eval%":eval,"%EvalError%":db,"%Float32Array%":typeof Float32Array>"u"?K:Float32Array,"%Float64Array%":typeof Float64Array>"u"?K:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?K:FinalizationRegistry,"%Function%":j0,"%GeneratorFunction%":$r,"%Int8Array%":typeof Int8Array>"u"?K:Int8Array,"%Int16Array%":typeof Int16Array>"u"?K:Int16Array,"%Int32Array%":typeof Int32Array>"u"?K:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Dr&&Pe?Pe(Pe([][Symbol.iterator]())):K,"%JSON%":typeof JSON=="object"?JSON:K,"%Map%":typeof Map>"u"?K:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Dr||!Pe?K:Pe(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?K:Promise,"%Proxy%":typeof Proxy>"u"?K:Proxy,"%RangeError%":pb,"%ReferenceError%":hb,"%Reflect%":typeof Reflect>"u"?K:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?K:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Dr||!Pe?K:Pe(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?K:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Dr&&Pe?Pe(""[Symbol.iterator]()):K,"%Symbol%":Dr?Symbol:K,"%SyntaxError%":gi,"%ThrowTypeError%":gb,"%TypedArray%":vb,"%TypeError%":si,"%Uint8Array%":typeof Uint8Array>"u"?K:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?K:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?K:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?K:Uint32Array,"%URIError%":mb,"%WeakMap%":typeof WeakMap>"u"?K:WeakMap,"%WeakRef%":typeof WeakRef>"u"?K:WeakRef,"%WeakSet%":typeof WeakSet>"u"?K:WeakSet};if(Pe)try{null.error}catch(e){var wb=Pe(Pe(e));vr["%Error.prototype%"]=wb}var _b=function e(t){var n;if(t==="%AsyncFunction%")n=fu("async function () {}");else if(t==="%GeneratorFunction%")n=fu("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=fu("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&Pe&&(n=Pe(i.prototype))}return vr[t]=n,n},im={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Qo=cd,ba=cb,Sb=Qo.call(Function.call,Array.prototype.concat),Eb=Qo.call(Function.apply,Array.prototype.splice),om=Qo.call(Function.call,String.prototype.replace),Ra=Qo.call(Function.call,String.prototype.slice),Tb=Qo.call(Function.call,RegExp.prototype.exec),Ib=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,kb=/\\(\\)?/g,Pb=function(t){var n=Ra(t,0,1),r=Ra(t,-1);if(n==="%"&&r!=="%")throw new gi("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new gi("invalid intrinsic syntax, expected opening `%`");var i=[];return om(t,Ib,function(o,s,a,l){i[i.length]=a?om(l,kb,"$1"):s||o}),i},Ab=function(t,n){var r=t,i;if(ba(im,r)&&(i=im[r],r="%"+i[0]+"%"),ba(vr,r)){var o=vr[r];if(o===$r&&(o=_b(r)),typeof o>"u"&&!n)throw new si("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:o}}throw new gi("intrinsic "+t+" does not exist!")},ki=function(t,n){if(typeof t!="string"||t.length===0)throw new si("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new si('"allowMissing" argument must be a boolean');if(Tb(/^%?[^%]*%?$/,t)===null)throw new gi("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=Pb(t),i=r.length>0?r[0]:"",o=Ab("%"+i+"%",n),s=o.name,a=o.value,l=!1,u=o.alias;u&&(i=u[0],Eb(r,Sb([0,1],u)));for(var c=1,f=!0;c=r.length){var v=yr(a,p);f=!!v,f&&"get"in v&&!("originalValue"in v.get)?a=v.get:a=a[p]}else f=ba(a,p),a=a[p];f&&!l&&(vr[s]=a)}}return a},V0={exports:{}},pu,sm;function fd(){if(sm)return pu;sm=1;var e=ki,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return pu=t,pu}var Cb=ki,qs=Cb("%Object.getOwnPropertyDescriptor%",!0);if(qs)try{qs([],"length")}catch{qs=null}var H0=qs,am=fd(),Ob=z0,Lr=Go,lm=H0,bb=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new Lr("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new Lr("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Lr("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Lr("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Lr("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Lr("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!lm&&lm(t,n);if(am)am(t,n,{configurable:s===null&&l?l.configurable:!s,enumerable:i===null&&l?l.enumerable:!i,value:r,writable:o===null&&l?l.writable:!o});else if(a||!i&&!o&&!s)t[n]=r;else throw new Ob("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Rc=fd(),W0=function(){return!!Rc};W0.hasArrayLengthDefineBug=function(){if(!Rc)return null;try{return Rc([],"length",{value:1}).length!==1}catch{return!0}};var Rb=W0,Nb=ki,um=bb,xb=Rb(),cm=H0,fm=Go,Db=Nb("%Math.floor%"),Lb=function(t,n){if(typeof t!="function")throw new fm("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||Db(n)!==n)throw new fm("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],i=!0,o=!0;if("length"in t&&cm){var s=cm(t,"length");s&&!s.configurable&&(i=!1),s&&!s.writable&&(o=!1)}return(i||o||!r)&&(xb?um(t,"length",n,!0,!0):um(t,"length",n)),t};(function(e){var t=cd,n=ki,r=Lb,i=Go,o=n("%Function.prototype.apply%"),s=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||t.call(s,o),l=fd(),u=n("%Math.max%");e.exports=function(p){if(typeof p!="function")throw new i("a function is required");var w=a(t,s,arguments);return r(w,1+u(0,p.length-(arguments.length-1)),!0)};var c=function(){return a(t,o,arguments)};l?l(e.exports,"apply",{value:c}):e.exports.apply=c})(V0);var Mb=V0.exports,K0=ki,q0=Mb,$b=q0(K0("String.prototype.indexOf")),Fb=function(t,n){var r=K0(t,!!n);return typeof r=="function"&&$b(t,".prototype.")>-1?q0(r):r};const Ub={},Bb=Object.freeze(Object.defineProperty({__proto__:null,default:Ub},Symbol.toStringTag,{value:"Module"})),zb=x_(Bb);var dd=typeof Map=="function"&&Map.prototype,hu=Object.getOwnPropertyDescriptor&&dd?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Na=dd&&hu&&typeof hu.get=="function"?hu.get:null,dm=dd&&Map.prototype.forEach,pd=typeof Set=="function"&&Set.prototype,mu=Object.getOwnPropertyDescriptor&&pd?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,xa=pd&&mu&&typeof mu.get=="function"?mu.get:null,pm=pd&&Set.prototype.forEach,jb=typeof WeakMap=="function"&&WeakMap.prototype,oo=jb?WeakMap.prototype.has:null,Vb=typeof WeakSet=="function"&&WeakSet.prototype,so=Vb?WeakSet.prototype.has:null,Hb=typeof WeakRef=="function"&&WeakRef.prototype,hm=Hb?WeakRef.prototype.deref:null,Wb=Boolean.prototype.valueOf,Kb=Object.prototype.toString,qb=Function.prototype.toString,Gb=String.prototype.match,hd=String.prototype.slice,Ln=String.prototype.replace,Qb=String.prototype.toUpperCase,mm=String.prototype.toLowerCase,G0=RegExp.prototype.test,gm=Array.prototype.concat,Bt=Array.prototype.join,Jb=Array.prototype.slice,ym=Math.floor,Nc=typeof BigInt=="function"?BigInt.prototype.valueOf:null,gu=Object.getOwnPropertySymbols,xc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,yi=typeof Symbol=="function"&&typeof Symbol.iterator=="object",ze=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===yi||!0)?Symbol.toStringTag:null,Q0=Object.prototype.propertyIsEnumerable,vm=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function wm(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||G0.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-ym(-e):ym(e);if(r!==e){var i=String(r),o=hd.call(t,i.length+1);return Ln.call(i,n,"$&_")+"."+Ln.call(Ln.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Ln.call(t,n,"$&_")}var Dc=zb,_m=Dc.custom,Sm=Y0(_m)?_m:null,J0={__proto__:null,double:'"',single:"'"},Xb={__proto__:null,double:/(["\\])/g,single:/(['\\])/g},Yb=function e(t,n,r,i){var o=n||{};if(Zt(o,"quoteStyle")&&!Zt(J0,o.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Zt(o,"maxStringLength")&&(typeof o.maxStringLength=="number"?o.maxStringLength<0&&o.maxStringLength!==1/0:o.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=Zt(o,"customInspect")?o.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Zt(o,"indent")&&o.indent!==null&&o.indent!==" "&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Zt(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=o.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return ew(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?wm(t,l):l}if(typeof t=="bigint"){var u=String(t)+"n";return a?wm(t,u):u}var c=typeof o.depth>"u"?5:o.depth;if(typeof r>"u"&&(r=0),r>=c&&c>0&&typeof t=="object")return Lc(t)?"[Array]":"[Object]";var f=gR(o,r);if(typeof i>"u")i=[];else if(Z0(i,t)>=0)return"[Circular]";function p(ee,fe,ye){if(fe&&(i=Jb.call(i),i.push(fe)),ye){var xe={depth:o.depth};return Zt(o,"quoteStyle")&&(xe.quoteStyle=o.quoteStyle),e(ee,xe,r+1,i)}return e(ee,o,r+1,i)}if(typeof t=="function"&&!Em(t)){var w=aR(t),d=Is(t,p);return"[Function"+(w?": "+w:" (anonymous)")+"]"+(d.length>0?" { "+Bt.call(d,", ")+" }":"")}if(Y0(t)){var v=yi?Ln.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):xc.call(t);return typeof t=="object"&&!yi?Bi(v):v}if(pR(t)){for(var T="<"+mm.call(String(t.nodeName)),y=t.attributes||[],h=0;h",T}if(Lc(t)){if(t.length===0)return"[]";var m=Is(t,p);return f&&!mR(m)?"["+Mc(m,f)+"]":"[ "+Bt.call(m,", ")+" ]"}if(tR(t)){var S=Is(t,p);return!("cause"in Error.prototype)&&"cause"in t&&!Q0.call(t,"cause")?"{ ["+String(t)+"] "+Bt.call(gm.call("[cause]: "+p(t.cause),S),", ")+" }":S.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Bt.call(S,", ")+" }"}if(typeof t=="object"&&s){if(Sm&&typeof t[Sm]=="function"&&Dc)return Dc(t,{depth:c-r});if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(lR(t)){var k=[];return dm&&dm.call(t,function(ee,fe){k.push(p(fe,t,!0)+" => "+p(ee,t))}),Tm("Map",Na.call(t),k,f)}if(fR(t)){var C=[];return pm&&pm.call(t,function(ee){C.push(p(ee,t))}),Tm("Set",xa.call(t),C,f)}if(uR(t))return yu("WeakMap");if(dR(t))return yu("WeakSet");if(cR(t))return yu("WeakRef");if(rR(t))return Bi(p(Number(t)));if(oR(t))return Bi(p(Nc.call(t)));if(iR(t))return Bi(Wb.call(t));if(nR(t))return Bi(p(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof window<"u"&&t===window)return"{ [object globalThis] }";if(!eR(t)&&!Em(t)){var A=Is(t,p),_=vm?vm(t)===Object.prototype:t instanceof Object||t.constructor===Object,P=t instanceof Object?"":"null prototype",O=!_&&ze&&Object(t)===t&&ze in t?hd.call(Xn(t),8,-1):P?"Object":"",B=_||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",F=B+(O||P?"["+Bt.call(gm.call([],O||[],P||[]),": ")+"] ":"");return A.length===0?F+"{}":f?F+"{"+Mc(A,f)+"}":F+"{ "+Bt.call(A,", ")+" }"}return String(t)};function X0(e,t,n){var r=n.quoteStyle||t,i=J0[r];return i+e+i}function Zb(e){return Ln.call(String(e),/"/g,""")}function Lc(e){return Xn(e)==="[object Array]"&&(!ze||!(typeof e=="object"&&ze in e))}function eR(e){return Xn(e)==="[object Date]"&&(!ze||!(typeof e=="object"&&ze in e))}function Em(e){return Xn(e)==="[object RegExp]"&&(!ze||!(typeof e=="object"&&ze in e))}function tR(e){return Xn(e)==="[object Error]"&&(!ze||!(typeof e=="object"&&ze in e))}function nR(e){return Xn(e)==="[object String]"&&(!ze||!(typeof e=="object"&&ze in e))}function rR(e){return Xn(e)==="[object Number]"&&(!ze||!(typeof e=="object"&&ze in e))}function iR(e){return Xn(e)==="[object Boolean]"&&(!ze||!(typeof e=="object"&&ze in e))}function Y0(e){if(yi)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!xc)return!1;try{return xc.call(e),!0}catch{}return!1}function oR(e){if(!e||typeof e!="object"||!Nc)return!1;try{return Nc.call(e),!0}catch{}return!1}var sR=Object.prototype.hasOwnProperty||function(e){return e in this};function Zt(e,t){return sR.call(e,t)}function Xn(e){return Kb.call(e)}function aR(e){if(e.name)return e.name;var t=Gb.call(qb.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Z0(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return ew(hd.call(e,0,t.maxStringLength),t)+r}var i=Xb[t.quoteStyle||"single"];i.lastIndex=0;var o=Ln.call(Ln.call(e,i,"\\$1"),/[\x00-\x1f]/g,hR);return X0(o,"single",t)}function hR(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+Qb.call(t.toString(16))}function Bi(e){return"Object("+e+")"}function yu(e){return e+" { ? }"}function Tm(e,t,n,r){var i=r?Mc(n,r):Bt.call(n,", ");return e+" ("+t+") {"+i+"}"}function mR(e){for(var t=0;t=0)return!1;return!0}function gR(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=Bt.call(Array(e.indent+1)," ");else return null;return{base:n,prev:Bt.call(Array(t+1),n)}}function Mc(e,t){if(e.length===0)return"";var n=` `+t.prev+t.base;return n+Bt.call(e,","+n)+` `+t.prev}function Is(e,t){var n=Lc(e),r=[];if(n){r.length=e.length;for(var i=0;i1;){var n=t.pop(),r=n.obj[n.prop];if(sr(r)){for(var i=[],o=0;o=_u?s.slice(l,l+_u):s,c=[],f=0;f=48&&p<=57||p>=65&&p<=90||p>=97&&p<=122||o===RR.RFC1738&&(p===40||p===41)){c[c.length]=u.charAt(f);continue}if(p<128){c[c.length]=$t[p];continue}if(p<2048){c[c.length]=$t[192|p>>6]+$t[128|p&63];continue}if(p<55296||p>=57344){c[c.length]=$t[224|p>>12]+$t[128|p>>6&63]+$t[128|p&63];continue}f+=1,p=65536+((p&1023)<<10|u.charCodeAt(f)&1023),c[c.length]=$t[240|p>>18]+$t[128|p>>12&63]+$t[128|p>>6&63]+$t[128|p&63]}a+=c.join("")}return a},$R=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],i=0;i"u"&&(k=0)}if(typeof c=="function"?m=c(n,m):m instanceof Date?m=w(m):r==="comma"&&Ut(m)&&(m=Gs.maybeMap(m,function($){return $ instanceof Date?w($):$})),m===null){if(s)return u&&!T?u(n,Se.encoder,y,"key",d):n;m=""}if(WR(m)||Gs.isBuffer(m)){if(u){var _=T?n:u(n,Se.encoder,y,"key",d);return[v(_)+"="+v(u(m,Se.encoder,y,"value",d))]}return[v(n)+"="+v(String(m))]}var P=[];if(typeof m>"u")return P;var O;if(r==="comma"&&Ut(m))T&&u&&(m=Gs.maybeMap(m,u)),O=[{value:m.length>0?m.join(",")||null:void 0}];else if(Ut(c))O=c;else{var B=Object.keys(m);O=f?B.sort(f):B}var F=l?String(n).replace(/\./g,"%2E"):String(n),ee=i&&Ut(m)&&m.length===1?F+"[]":F;if(o&&Ut(m)&&m.length===0)return ee+"[]";for(var fe=0;fe"u"?t.encodeDotInKeys===!0?!0:Se.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:Se.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:Se.allowEmptyArrays,arrayFormat:s,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Se.charsetSentinel,commaRoundTrip:!!t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?Se.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Se.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:Se.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:Se.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Se.encodeValuesOnly,filter:o,format:r,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Se.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Se.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Se.strictNullHandling}},GR=function(e,t){var n=e,r=qR(t),i,o;typeof r.filter=="function"?(o=r.filter,n=o("",n)):Ut(r.filter)&&(o=r.filter,i=o);var s=[];if(typeof n!="object"||n===null)return"";var a=ow[r.arrayFormat],l=a==="comma"&&r.commaRoundTrip;i||(i=Object.keys(n)),r.sort&&i.sort(r.sort);for(var u=iw(),c=0;c0?d+w:""},vi=rw,$c=Object.prototype.hasOwnProperty,QR=Array.isArray,pe={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:vi.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},JR=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},aw=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},XR="utf8=%26%2310003%3B",YR="utf8=%E2%9C%93",ZR=function(t,n){var r={__proto__:null},i=n.ignoreQueryPrefix?t.replace(/^\?/,""):t;i=i.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var o=n.parameterLimit===1/0?void 0:n.parameterLimit,s=i.split(n.delimiter,o),a=-1,l,u=n.charset;if(n.charsetSentinel)for(l=0;l-1&&(d=QR(d)?[d]:d);var v=$c.call(r,w);v&&n.duplicates==="combine"?r[w]=vi.combine(r[w],d):(!v||n.duplicates==="last")&&(r[w]=d)}return r},eN=function(e,t,n,r){for(var i=r?t:aw(t,n),o=e.length-1;o>=0;--o){var s,a=e[o];if(a==="[]"&&n.parseArrays)s=n.allowEmptyArrays&&(i===""||n.strictNullHandling&&i===null)?[]:[].concat(i);else{s=n.plainObjects?{__proto__:null}:{};var l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,u=n.decodeDotInKeys?l.replace(/%2E/g,"."):l,c=parseInt(u,10);!n.parseArrays&&u===""?s={0:i}:!isNaN(c)&&a!==u&&String(c)===u&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(s=[],s[c]=i):u!=="__proto__"&&(s[u]=i)}i=s}return i},tN=function(t,n,r,i){if(t){var o=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=r.depth>0&&s.exec(o),u=l?o.slice(0,l.index):o,c=[];if(u){if(!r.plainObjects&&$c.call(Object.prototype,u)&&!r.allowPrototypes)return;c.push(u)}for(var f=0;r.depth>0&&(l=a.exec(o))!==null&&f"u"?pe.charset:t.charset,r=typeof t.duplicates>"u"?pe.duplicates:t.duplicates;if(r!=="combine"&&r!=="first"&&r!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var i=typeof t.allowDots>"u"?t.decodeDotInKeys===!0?!0:pe.allowDots:!!t.allowDots;return{allowDots:i,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:pe.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:pe.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:pe.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:pe.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:pe.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:pe.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:pe.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:pe.decoder,delimiter:typeof t.delimiter=="string"||vi.isRegExp(t.delimiter)?t.delimiter:pe.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:pe.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:pe.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:pe.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:pe.plainObjects,strictDepth:typeof t.strictDepth=="boolean"?!!t.strictDepth:pe.strictDepth,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:pe.strictNullHandling}},rN=function(e,t){var n=nN(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?{__proto__:null}:{};for(var r=typeof e=="string"?ZR(e,n):e,i=n.plainObjects?{__proto__:null}:{},o=Object.keys(r),s=0;s
'};n.configure=function(d){var v,T;for(v in d)T=d[v],T!==void 0&&d.hasOwnProperty(v)&&(r[v]=T);return this},n.status=null,n.set=function(d){var v=n.isStarted();d=i(d,r.minimum,1),n.status=d===1?null:d;var T=n.render(!v),y=T.querySelector(r.barSelector),h=r.speed,m=r.easing;return T.offsetWidth,a(function(S){r.positionUsing===""&&(r.positionUsing=n.getPositioningCSS()),l(y,s(d,h,m)),d===1?(l(T,{transition:"none",opacity:1}),T.offsetWidth,setTimeout(function(){l(T,{transition:"all "+h+"ms linear",opacity:0}),setTimeout(function(){n.remove(),S()},h)},h)):setTimeout(S,h)}),this},n.isStarted=function(){return typeof n.status=="number"},n.start=function(){n.status||n.set(0);var d=function(){setTimeout(function(){n.status&&(n.trickle(),d())},r.trickleSpeed)};return r.trickle&&d(),this},n.done=function(d){return!d&&!n.status?this:n.inc(.3+.5*Math.random()).set(1)},n.inc=function(d){var v=n.status;return v?(typeof d!="number"&&(d=(1-v)*i(Math.random()*v,.1,.95)),v=i(v+d,0,.994),n.set(v)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},function(){var d=0,v=0;n.promise=function(T){return!T||T.state()==="resolved"?this:(v===0&&n.start(),d++,v++,T.always(function(){v--,v===0?(d=0,n.done()):n.set((d-v)/d)}),this)}}(),n.render=function(d){if(n.isRendered())return document.getElementById("nprogress");c(document.documentElement,"nprogress-busy");var v=document.createElement("div");v.id="nprogress",v.innerHTML=r.template;var T=v.querySelector(r.barSelector),y=d?"-100":o(n.status||0),h=document.querySelector(r.parent),m;return l(T,{transition:"all 0 linear",transform:"translate3d("+y+"%,0,0)"}),r.showSpinner||(m=v.querySelector(r.spinnerSelector),m&&w(m)),h!=document.body&&c(h,"nprogress-custom-parent"),h.appendChild(v),v},n.remove=function(){f(document.documentElement,"nprogress-busy"),f(document.querySelector(r.parent),"nprogress-custom-parent");var d=document.getElementById("nprogress");d&&w(d)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var d=document.body.style,v="WebkitTransform"in d?"Webkit":"MozTransform"in d?"Moz":"msTransform"in d?"ms":"OTransform"in d?"O":"";return v+"Perspective"in d?"translate3d":v+"Transform"in d?"translate":"margin"};function i(d,v,T){return dT?T:d}function o(d){return(-1+d)*100}function s(d,v,T){var y;return r.positionUsing==="translate3d"?y={transform:"translate3d("+o(d)+"%,0,0)"}:r.positionUsing==="translate"?y={transform:"translate("+o(d)+"%,0)"}:y={"margin-left":o(d)+"%"},y.transition="all "+v+"ms "+T,y}var a=function(){var d=[];function v(){var T=d.shift();T&&T(v)}return function(T){d.push(T),d.length==1&&v()}}(),l=function(){var d=["Webkit","O","Moz","ms"],v={};function T(S){return S.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(k,C){return C.toUpperCase()})}function y(S){var k=document.body.style;if(S in k)return S;for(var C=d.length,A=S.charAt(0).toUpperCase()+S.slice(1),_;C--;)if(_=d[C]+A,_ in k)return _;return S}function h(S){return S=T(S),v[S]||(v[S]=y(S))}function m(S,k,C){k=h(k),S.style[k]=C}return function(S,k){var C=arguments,A,_;if(C.length==2)for(A in k)_=k[A],_!==void 0&&k.hasOwnProperty(A)&&m(S,A,_);else m(S,C[1],C[2])}}();function u(d,v){var T=typeof d=="string"?d:p(d);return T.indexOf(" "+v+" ")>=0}function c(d,v){var T=p(d),y=T+v;u(T,v)||(d.className=y.substring(1))}function f(d,v){var T=p(d),y;u(d,v)&&(y=T.replace(" "+v+" "," "),d.className=y.substring(1,y.length-1))}function p(d){return(" "+(d.className||"")+" ").replace(/\s+/gi," ")}function w(d){d&&d.parentNode&&d.parentNode.removeChild(d)}return n})})(lw);var aN=lw.exports;const jt=Lo(aN);function uw(e,t){let n;return function(...r){clearTimeout(n),n=setTimeout(()=>e.apply(this,r),t)}}function vn(e,t){return document.dispatchEvent(new CustomEvent(`inertia:${e}`,t))}var lN=e=>vn("before",{cancelable:!0,detail:{visit:e}}),uN=e=>vn("error",{detail:{errors:e}}),cN=e=>vn("exception",{cancelable:!0,detail:{exception:e}}),Pm=e=>vn("finish",{detail:{visit:e}}),fN=e=>vn("invalid",{cancelable:!0,detail:{response:e}}),zi=e=>vn("navigate",{detail:{page:e}}),dN=e=>vn("progress",{detail:{progress:e}}),pN=e=>vn("start",{detail:{visit:e}}),hN=e=>vn("success",{detail:{page:e}});function Fc(e){return e instanceof File||e instanceof Blob||e instanceof FileList&&e.length>0||e instanceof FormData&&Array.from(e.values()).some(t=>Fc(t))||typeof e=="object"&&e!==null&&Object.values(e).some(t=>Fc(t))}function cw(e,t=new FormData,n=null){e=e||{};for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&dw(t,fw(n,r),e[r]);return t}function fw(e,t){return e?e+"["+t+"]":t}function dw(e,t,n){if(Array.isArray(n))return Array.from(n.keys()).forEach(r=>dw(e,fw(t,r.toString()),n[r]));if(n instanceof Date)return e.append(t,n.toISOString());if(n instanceof File)return e.append(t,n,n.name);if(n instanceof Blob)return e.append(t,n);if(typeof n=="boolean")return e.append(t,n?"1":"0");if(typeof n=="string")return e.append(t,n);if(typeof n=="number")return e.append(t,`${n}`);if(n==null)return e.append(t,"");cw(n,e,t)}var mN={modal:null,listener:null,show(e){typeof e=="object"&&(e=`All Inertia requests must receive a valid Inertia response, however a plain JSON response was received.
${JSON.stringify(e)}`);let t=document.createElement("html");t.innerHTML=e,t.querySelectorAll("a").forEach(r=>r.setAttribute("target","_top")),this.modal=document.createElement("div"),this.modal.style.position="fixed",this.modal.style.width="100vw",this.modal.style.height="100vh",this.modal.style.padding="50px",this.modal.style.boxSizing="border-box",this.modal.style.backgroundColor="rgba(0, 0, 0, .6)",this.modal.style.zIndex=2e5,this.modal.addEventListener("click",()=>this.hide());let n=document.createElement("iframe");if(n.style.backgroundColor="white",n.style.borderRadius="5px",n.style.width="100%",n.style.height="100%",this.modal.appendChild(n),document.body.prepend(this.modal),document.body.style.overflow="hidden",!n.contentWindow)throw new Error("iframe not yet ready.");n.contentWindow.document.open(),n.contentWindow.document.write(t.outerHTML),n.contentWindow.document.close(),this.listener=this.hideOnEscape.bind(this),document.addEventListener("keydown",this.listener)},hide(){this.modal.outerHTML="",this.modal=null,document.body.style.overflow="visible",document.removeEventListener("keydown",this.listener)},hideOnEscape(e){e.keyCode===27&&this.hide()}};function Mr(e){return new URL(e.toString(),window.location.toString())}function pw(e,t,n,r="brackets"){let i=/^https?:\/\//.test(t.toString()),o=i||t.toString().startsWith("/"),s=!o&&!t.toString().startsWith("#")&&!t.toString().startsWith("?"),a=t.toString().includes("?")||e==="get"&&Object.keys(n).length,l=t.toString().includes("#"),u=new URL(t.toString(),"http://localhost");return e==="get"&&Object.keys(n).length&&(u.search=km.stringify(jO(km.parse(u.search,{ignoreQueryPrefix:!0}),n),{encodeValuesOnly:!0,arrayFormat:r}),n={}),[[i?`${u.protocol}//${u.host}`:"",o?u.pathname:"",s?u.pathname.substring(1):"",a?u.search:"",l?u.hash:""].join(""),n]}function ji(e){return e=new URL(e.href),e.hash="",e}var Am=typeof window>"u",gN=class{constructor(){this.visitId=null}init({initialPage:e,resolveComponent:t,swapComponent:n}){this.page=e,this.resolveComponent=t,this.swapComponent=n,this.setNavigationType(),this.clearRememberedStateOnReload(),this.isBackForwardVisit()?this.handleBackForwardVisit(this.page):this.isLocationVisit()?this.handleLocationVisit(this.page):this.handleInitialPageVisit(this.page),this.setupEventListeners()}setNavigationType(){this.navigationType=window.performance&&window.performance.getEntriesByType("navigation").length>0?window.performance.getEntriesByType("navigation")[0].type:"navigate"}clearRememberedStateOnReload(){var e;this.navigationType==="reload"&&((e=window.history.state)!=null&&e.rememberedState)&&delete window.history.state.rememberedState}handleInitialPageVisit(e){this.page.url+=window.location.hash,this.setPage(e,{preserveState:!0}).then(()=>zi(e))}setupEventListeners(){window.addEventListener("popstate",this.handlePopstateEvent.bind(this)),document.addEventListener("scroll",uw(this.handleScrollEvent.bind(this),100),!0)}scrollRegions(){return document.querySelectorAll("[scroll-region]")}handleScrollEvent(e){typeof e.target.hasAttribute=="function"&&e.target.hasAttribute("scroll-region")&&this.saveScrollPositions()}saveScrollPositions(){this.replaceState({...this.page,scrollRegions:Array.from(this.scrollRegions()).map(e=>({top:e.scrollTop,left:e.scrollLeft}))})}resetScrollPositions(){window.scrollTo(0,0),this.scrollRegions().forEach(e=>{typeof e.scrollTo=="function"?e.scrollTo(0,0):(e.scrollTop=0,e.scrollLeft=0)}),this.saveScrollPositions(),window.location.hash&&setTimeout(()=>{var e;return(e=document.getElementById(window.location.hash.slice(1)))==null?void 0:e.scrollIntoView()})}restoreScrollPositions(){this.page.scrollRegions&&this.scrollRegions().forEach((e,t)=>{let n=this.page.scrollRegions[t];if(n)typeof e.scrollTo=="function"?e.scrollTo(n.left,n.top):(e.scrollTop=n.top,e.scrollLeft=n.left);else return})}isBackForwardVisit(){return window.history.state&&this.navigationType==="back_forward"}handleBackForwardVisit(e){window.history.state.version=e.version,this.setPage(window.history.state,{preserveScroll:!0,preserveState:!0}).then(()=>{this.restoreScrollPositions(),zi(e)})}locationVisit(e,t){try{let n={preserveScroll:t};window.sessionStorage.setItem("inertiaLocationVisit",JSON.stringify(n)),window.location.href=e.href,ji(window.location).href===ji(e).href&&window.location.reload()}catch{return!1}}isLocationVisit(){try{return window.sessionStorage.getItem("inertiaLocationVisit")!==null}catch{return!1}}handleLocationVisit(e){var n,r;let t=JSON.parse(window.sessionStorage.getItem("inertiaLocationVisit")||"");window.sessionStorage.removeItem("inertiaLocationVisit"),e.url+=window.location.hash,e.rememberedState=((n=window.history.state)==null?void 0:n.rememberedState)??{},e.scrollRegions=((r=window.history.state)==null?void 0:r.scrollRegions)??[],this.setPage(e,{preserveScroll:t.preserveScroll,preserveState:!0}).then(()=>{t.preserveScroll&&this.restoreScrollPositions(),zi(e)})}isLocationVisitResponse(e){return!!(e&&e.status===409&&e.headers["x-inertia-location"])}isInertiaResponse(e){return!!(e!=null&&e.headers["x-inertia"])}createVisitId(){return this.visitId={},this.visitId}cancelVisit(e,{cancelled:t=!1,interrupted:n=!1}){e&&!e.completed&&!e.cancelled&&!e.interrupted&&(e.cancelToken.abort(),e.onCancel(),e.completed=!1,e.cancelled=t,e.interrupted=n,Pm(e),e.onFinish(e))}finishVisit(e){!e.cancelled&&!e.interrupted&&(e.completed=!0,e.cancelled=!1,e.interrupted=!1,Pm(e),e.onFinish(e))}resolvePreserveOption(e,t){return typeof e=="function"?e(t):e==="errors"?Object.keys(t.props.errors||{}).length>0:e}cancel(){this.activeVisit&&this.cancelVisit(this.activeVisit,{cancelled:!0})}visit(e,{method:t="get",data:n={},replace:r=!1,preserveScroll:i=!1,preserveState:o=!1,only:s=[],except:a=[],headers:l={},errorBag:u="",forceFormData:c=!1,onCancelToken:f=()=>{},onBefore:p=()=>{},onStart:w=()=>{},onProgress:d=()=>{},onFinish:v=()=>{},onCancel:T=()=>{},onSuccess:y=()=>{},onError:h=()=>{},queryStringArrayFormat:m="brackets"}={}){let S=typeof e=="string"?Mr(e):e;if((Fc(n)||c)&&!(n instanceof FormData)&&(n=cw(n)),!(n instanceof FormData)){let[_,P]=pw(t,S,n,m);S=Mr(_),n=P}let k={url:S,method:t,data:n,replace:r,preserveScroll:i,preserveState:o,only:s,except:a,headers:l,errorBag:u,forceFormData:c,queryStringArrayFormat:m,cancelled:!1,completed:!1,interrupted:!1};if(p(k)===!1||!lN(k))return;this.activeVisit&&this.cancelVisit(this.activeVisit,{interrupted:!0}),this.saveScrollPositions();let C=this.createVisitId();this.activeVisit={...k,onCancelToken:f,onBefore:p,onStart:w,onProgress:d,onFinish:v,onCancel:T,onSuccess:y,onError:h,queryStringArrayFormat:m,cancelToken:new AbortController},f({cancel:()=>{this.activeVisit&&this.cancelVisit(this.activeVisit,{cancelled:!0})}}),pN(k),w(k);let A=!!(s.length||a.length);ue({method:t,url:ji(S).href,data:t==="get"?{}:n,params:t==="get"?n:{},signal:this.activeVisit.cancelToken.signal,headers:{...l,Accept:"text/html, application/xhtml+xml","X-Requested-With":"XMLHttpRequest","X-Inertia":!0,...A?{"X-Inertia-Partial-Component":this.page.component}:{},...s.length?{"X-Inertia-Partial-Data":s.join(",")}:{},...a.length?{"X-Inertia-Partial-Except":a.join(",")}:{},...u&&u.length?{"X-Inertia-Error-Bag":u}:{},...this.page.version?{"X-Inertia-Version":this.page.version}:{}},onUploadProgress:_=>{n instanceof FormData&&(_.percentage=_.progress?Math.round(_.progress*100):0,dN(_),d(_))}}).then(_=>{var F;if(!this.isInertiaResponse(_))return Promise.reject({response:_});let P=_.data;A&&P.component===this.page.component&&(P.props={...this.page.props,...P.props}),i=this.resolvePreserveOption(i,P),o=this.resolvePreserveOption(o,P),o&&((F=window.history.state)!=null&&F.rememberedState)&&P.component===this.page.component&&(P.rememberedState=window.history.state.rememberedState);let O=S,B=Mr(P.url);return O.hash&&!B.hash&&ji(O).href===B.href&&(B.hash=O.hash,P.url=B.href),this.setPage(P,{visitId:C,replace:r,preserveScroll:i,preserveState:o})}).then(()=>{let _=this.page.props.errors||{};if(Object.keys(_).length>0){let P=u?_[u]?_[u]:{}:_;return uN(P),h(P)}return hN(this.page),y(this.page)}).catch(_=>{if(this.isInertiaResponse(_.response))return this.setPage(_.response.data,{visitId:C});if(this.isLocationVisitResponse(_.response)){let P=Mr(_.response.headers["x-inertia-location"]),O=S;O.hash&&!P.hash&&ji(O).href===P.href&&(P.hash=O.hash),this.locationVisit(P,i===!0)}else if(_.response)fN(_.response)&&mN.show(_.response.data);else return Promise.reject(_)}).then(()=>{this.activeVisit&&this.finishVisit(this.activeVisit)}).catch(_=>{if(!ue.isCancel(_)){let P=cN(_);if(this.activeVisit&&this.finishVisit(this.activeVisit),P)return Promise.reject(_)}})}setPage(e,{visitId:t=this.createVisitId(),replace:n=!1,preserveScroll:r=!1,preserveState:i=!1}={}){return Promise.resolve(this.resolveComponent(e.component)).then(o=>{t===this.visitId&&(e.scrollRegions=e.scrollRegions||[],e.rememberedState=e.rememberedState||{},n=n||Mr(e.url).href===window.location.href,n?this.replaceState(e):this.pushState(e),this.swapComponent({component:o,page:e,preserveState:i}).then(()=>{r||this.resetScrollPositions(),n||zi(e)}))})}pushState(e){this.page=e,window.history.pushState(e,"",e.url)}replaceState(e){this.page=e,window.history.replaceState(e,"",e.url)}handlePopstateEvent(e){if(e.state!==null){let t=e.state,n=this.createVisitId();Promise.resolve(this.resolveComponent(t.component)).then(r=>{n===this.visitId&&(this.page=t,this.swapComponent({component:r,page:t,preserveState:!1}).then(()=>{this.restoreScrollPositions(),zi(t)}))})}else{let t=Mr(this.page.url);t.hash=window.location.hash,this.replaceState({...this.page,url:t.href}),this.resetScrollPositions()}}get(e,t={},n={}){return this.visit(e,{...n,method:"get",data:t})}reload(e={}){return this.visit(window.location.href,{...e,preserveScroll:!0,preserveState:!0})}replace(e,t={}){return console.warn(`Inertia.replace() has been deprecated and will be removed in a future release. Please use Inertia.${t.method??"get"}() instead.`),this.visit(e,{preserveState:!0,...t,replace:!0})}post(e,t={},n={}){return this.visit(e,{preserveState:!0,...n,method:"post",data:t})}put(e,t={},n={}){return this.visit(e,{preserveState:!0,...n,method:"put",data:t})}patch(e,t={},n={}){return this.visit(e,{preserveState:!0,...n,method:"patch",data:t})}delete(e,t={}){return this.visit(e,{preserveState:!0,...t,method:"delete"})}remember(e,t="default"){var n;Am||this.replaceState({...this.page,rememberedState:{...(n=this.page)==null?void 0:n.rememberedState,[t]:e}})}restore(e="default"){var t,n;if(!Am)return(n=(t=window.history.state)==null?void 0:t.rememberedState)==null?void 0:n[e]}on(e,t){let n=r=>{let i=t(r);r.cancelable&&!r.defaultPrevented&&i===!1&&r.preventDefault()};return document.addEventListener(`inertia:${e}`,n),()=>document.removeEventListener(`inertia:${e}`,n)}},yN={buildDOMElement(e){let t=document.createElement("template");t.innerHTML=e;let n=t.content.firstChild;if(!e.startsWith("