mirror of
https://github.com/KarolChang/jm-expense-vue-ts.git
synced 2024-12-26 19:58:35 +00:00
1446 lines
481 KiB
JavaScript
1446 lines
481 KiB
JavaScript
|
var sb=Object.defineProperty,ob=Object.defineProperties;var ab=Object.getOwnPropertyDescriptors;var gd=Object.getOwnPropertySymbols;var lb=Object.prototype.hasOwnProperty,cb=Object.prototype.propertyIsEnumerable;var vd=(t,e,n)=>e in t?sb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ie=(t,e)=>{for(var n in e||(e={}))lb.call(e,n)&&vd(t,n,e[n]);if(gd)for(var n of gd(e))cb.call(e,n)&&vd(t,n,e[n]);return t},oo=(t,e)=>ob(t,ab(e));function Mc(t,e){const n=Object.create(null),r=t.split(",");for(let i=0;i<r.length;i++)n[r[i]]=!0;return e?i=>!!n[i.toLowerCase()]:i=>!!n[i]}const ub="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",db=Mc(ub);function up(t){return!!t||t===""}function En(t){if(ge(t)){const e={};for(let n=0;n<t.length;n++){const r=t[n],i=rt(r)?pb(r):En(r);if(i)for(const s in i)e[s]=i[s]}return e}else{if(rt(t))return t;if(et(t))return t}}const fb=/;(?![^(]*\))/g,hb=/:(.+)/;function pb(t){const e={};return t.split(fb).forEach(n=>{if(n){const r=n.split(hb);r.length>1&&(e[r[0].trim()]=r[1].trim())}}),e}function Ve(t){let e="";if(rt(t))e=t;else if(ge(t))for(let n=0;n<t.length;n++){const r=Ve(t[n]);r&&(e+=r+" ")}else if(et(t))for(const n in t)t[n]&&(e+=n+" ");return e.trim()}function An(t){if(!t)return null;let{class:e,style:n}=t;return e&&!rt(e)&&(t.class=Ve(e)),n&&(t.style=En(n)),t}function mb(t,e){if(t.length!==e.length)return!1;let n=!0;for(let r=0;n&&r<t.length;r++)n=Vs(t[r],e[r]);return n}function Vs(t,e){if(t===e)return!0;let n=yd(t),r=yd(e);if(n||r)return n&&r?t.getTime()===e.getTime():!1;if(n=ge(t),r=ge(e),n||r)return n&&r?mb(t,e):!1;if(n=et(t),r=et(e),n||r){if(!n||!r)return!1;const i=Object.keys(t).length,s=Object.keys(e).length;if(i!==s)return!1;for(const o in t){const l=t.hasOwnProperty(o),u=e.hasOwnProperty(o);if(l&&!u||!l&&u||!Vs(t[o],e[o]))return!1}}return String(t)===String(e)}function Rc(t,e){return t.findIndex(n=>Vs(n,e))}const st=t=>t==null?"":ge(t)||et(t)&&(t.toString===hp||!ke(t.toString))?JSON.stringify(t,dp,2):String(t),dp=(t,e)=>e&&e.__v_isRef?dp(t,e.value):gi(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[r,i])=>(n[`${r} =>`]=i,n),{})}:Bi(e)?{[`Set(${e.size})`]:[...e.values()]}:et(e)&&!ge(e)&&!pp(e)?String(e):e,ze={},mi=[],qt=()=>{},gb=()=>!1,vb=/^on[^a-z]/,sa=t=>vb.test(t),Lc=t=>t.startsWith("onUpdate:"),ct=Object.assign,$c=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},yb=Object.prototype.hasOwnProperty,Le=(t,e)=>yb.call(t,e),ge=Array.isArray,gi=t=>oa(t)==="[object Map]",Bi=t=>oa(t)==="[object Set]",yd=t=>t instanceof Date,ke=t=>typeof t=="function",rt=t=>typeof t=="string",Bc=t=>typeof t=="symbol",et=t=>t!==null&&typeof t=="object",fp=t=>et(t)&&ke(t.then)&&ke(t.catch),hp=Object.prototype.toString,oa=t=>hp.call(t),_b=t=>oa(t).slice(8,-1),pp=t=>oa(t)==="[object Object]",Uc=t=>rt(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,Co=Mc(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),aa=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},bb=/-(\w)/g,mn=aa(t=>t.replace(bb,(e,n)=>n?n.toUpperCase():"")),wb=/\B([A-Z])/g,Vr=aa(t=>t.replace(wb,"-$1").toLowerCase()),la=aa(t=>t.charAt(0).toUpperCase()+t.slice(1)),tl=aa(t=>t?`on${la(t)}`:""),Ds=(t,e)=>!Object.is(t,e),So=(t,e)=>{for(let n=0;n<t.length;n++)t[n](e)},Lo=(t,e,n)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:n})},Ps=t=>{const e=parseFloat(t);return isNaN(e)?t:e};let _d;const Eb=()=>_d||(_d=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});let on;const ao=[];class mp{constructor(e=!1){this.active=!0,this.effects=[],this.cleanups=[],!e&&on&&(this.parent=on,this.index=(on.scopes||(on.scopes=[])).push(this)-1)}run(e){if(this.active)try{return this.on(),e()}finally{this.off()}}on(){this.active&&(ao.push(this),on=this)}off(){this.active&&(ao.pop(),on=ao[ao.length-1])}stop(e){if(this.active){if(this.effects.forEach(n=>n.stop()),this.cleanups.forEach(n=>n()),this.scopes&&this.scopes.forEach(n=>n.stop
|
||
|
* sweetalert2 v11.4.8
|
||
|
* Released under the MIT License.
|
||
|
*/(function(t,e){(function(n,r){t.exports=r()})(Mn,function(){const n="SweetAlert2:",r=a=>{const c=[];for(let h=0;h<a.length;h++)c.indexOf(a[h])===-1&&c.push(a[h]);return c},i=a=>a.charAt(0).toUpperCase()+a.slice(1),s=a=>Array.prototype.slice.call(a),o=a=>{console.warn("".concat(n," ").concat(typeof a=="object"?a.join(" "):a))},l=a=>{console.error("".concat(n," ").concat(a))},u=[],d=a=>{u.includes(a)||(u.push(a),o(a))},f=(a,c)=>{d('"'.concat(a,'" is deprecated and will be removed in the next major release. Please use "').concat(c,'" instead.'))},p=a=>typeof a=="function"?a():a,v=a=>a&&typeof a.toPromise=="function",m=a=>v(a)?a.toPromise():Promise.resolve(a),S=a=>a&&Promise.resolve(a)===a,T={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},A=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","color","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],O={},k=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],C=a=>Object.prototype.hasOwnProperty.call(T,a),D=a=>A.indexOf(a)!==-1,B=a=>O[a],j=a=>{C(a)||o('Unknown parameter "'.concat(a,'"'))},b=a=>{k.includes(a)&&o('The parameter "'.concat(a,'" is incompatible with toasts'))},x=a=>{B(a)&&f(a,B(a))},R=a=>{!a.backdrop&&a.allowOutsideClick&&o('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const c in a)j(c),a.toast&&b(c),x(c)},H="swal2-",w=a=>{const c={};for(const h in a)c[a[h]]=H+a[h];return c},g=w(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start"
|
||
|
a[href],
|
||
|
area[href],
|
||
|
input:not([disabled]),
|
||
|
select:not([disabled]),
|
||
|
textarea:not([disabled]),
|
||
|
button:not([disabled]),
|
||
|
iframe,
|
||
|
object,
|
||
|
embed,
|
||
|
[tabindex="0"],
|
||
|
[contenteditable],
|
||
|
audio[controls],
|
||
|
video[controls],
|
||
|
summary
|
||
|
`,E=()=>{const a=s(G().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort((h,_)=>{const Y=parseInt(h.getAttribute("tabindex")),ue=parseInt(_.getAttribute("tabindex"));return Y>ue?1:Y<ue?-1:0}),c=s(G().querySelectorAll(y)).filter(h=>h.getAttribute("tabindex")!=="-1");return r(a.concat(c)).filter(h=>it(h))},P=()=>q(document.body,g.shown)&&!q(document.body,g["toast-shown"])&&!q(document.body,g["no-backdrop"]),M=()=>G()&&q(G(),g.toast),$=()=>G().hasAttribute("data-loading"),X={previousBodyPadding:null},Q=(a,c)=>{if(a.textContent="",c){const _=new DOMParser().parseFromString(c,"text/html");s(_.querySelector("head").childNodes).forEach(Y=>{a.appendChild(Y)}),s(_.querySelector("body").childNodes).forEach(Y=>{a.appendChild(Y)})}},q=(a,c)=>{if(!c)return!1;const h=c.split(/\s+/);for(let _=0;_<h.length;_++)if(!a.classList.contains(h[_]))return!1;return!0},te=(a,c)=>{s(a.classList).forEach(h=>{!Object.values(g).includes(h)&&!Object.values(F).includes(h)&&!Object.values(c.showClass).includes(h)&&a.classList.remove(h)})},N=(a,c,h)=>{if(te(a,c),c.customClass&&c.customClass[h]){if(typeof c.customClass[h]!="string"&&!c.customClass[h].forEach)return o("Invalid type of customClass.".concat(h,'! Expected string or iterable object, got "').concat(typeof c.customClass[h],'"'));ne(a,c.customClass[h])}},J=(a,c)=>{if(!c)return null;switch(c){case"select":case"textarea":case"file":return a.querySelector(".".concat(g.popup," > .").concat(g[c]));case"checkbox":return a.querySelector(".".concat(g.popup," > .").concat(g.checkbox," input"));case"radio":return a.querySelector(".".concat(g.popup," > .").concat(g.radio," input:checked"))||a.querySelector(".".concat(g.popup," > .").concat(g.radio," input:first-child"));case"range":return a.querySelector(".".concat(g.popup," > .").concat(g.range," input"));default:return a.querySelector(".".concat(g.popup," > .").concat(g.input))}},U=a=>{if(a.focus(),a.type!=="file"){const c=a.value;a.value="",a.value=c}},ie=(a,c,h)=>{!a||!c||(typeof c=="string"&&(c=c.split(/\s+/).filter(Boolean)),c.forEach(_=>{Array.isArray(a)?a.forEach(Y=>{h?Y.classList.add(_):Y.classList.remove(_)}):h?a.classList.add(_):a.classList.remove(_)}))},ne=(a,c)=>{ie(a,c,!0)},ye=(a,c)=>{ie(a,c,!1)},Ne=(a,c)=>{const h=s(a.childNodes);for(let _=0;_<h.length;_++)if(q(h[_],c))return h[_]},Re=(a,c,h)=>{h==="".concat(parseInt(h))&&(h=parseInt(h)),h||parseInt(h)===0?a.style[c]=typeof h=="number"?"".concat(h,"px"):h:a.style.removeProperty(c)},Ce=function(a){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"flex";a.style.display=c},Ye=a=>{a.style.display="none"},_n=(a,c,h,_)=>{const Y=a.querySelector(c);Y&&(Y.style[h]=_)},or=(a,c,h)=>{c?Ce(a,h):Ye(a)},it=a=>!!(a&&(a.offsetWidth||a.offsetHeight||a.getClientRects().length)),no=()=>!it(qe())&&!it(L())&&!it(se()),ut=a=>a.scrollHeight>a.clientHeight,Tt=a=>{const c=window.getComputedStyle(a),h=parseFloat(c.getPropertyValue("animation-duration")||"0"),_=parseFloat(c.getPropertyValue("transition-duration")||"0");return h>0||_>0},Gr=function(a){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const h=de();it(h)&&(c&&(h.style.transition="none",h.style.width="100%"),setTimeout(()=>{h.style.transition="width ".concat(a/1e3,"s linear"),h.style.width="0%"},10))},Nv=()=>{const a=de(),c=parseInt(window.getComputedStyle(a).width);a.style.removeProperty("transition"),a.style.width="100%";const h=parseInt(window.getComputedStyle(a).width),_=c/h*100;a.style.removeProperty("transition"),a.style.width="".concat(_,"%")},Fu=()=>typeof window=="undefined"||typeof document=="undefined",xv=100,Oe={},Mv=()=>{Oe.previousActiveElement&&Oe.previousActiveElement.focus?(Oe.previousActiveElement.focus(),Oe.previousActiveElement=null):document.body&&document.body.focus()},Rv=a=>new Promise(c=>{if(!a)return c();const h=window.scrollX,_=window.scrollY;Oe.restoreFocusTimeout=setTimeout(()=>{Mv(),c()},xv),window.scrollTo(h,_)}),Lv=`
|
||
|
<div aria-labelledby="`.concat(g.title,'" aria-describedby="').concat(g["html-container"],'" class="').concat(g.popup,`" tabindex="-1">
|
||
|
<button type="button" class="`).concat(g.close,`"></button>
|
||
|
<ul class="`).concat(g["progress-steps"],`"></ul>
|
||
|
<div class="`).concat(g.icon,`"></div>
|
||
|
<img class="`).concat(g.image,`" />
|
||
|
<h2 class="`).concat(g.title,'" id="').concat(g.title,`"></h2>
|
||
|
<div class="`).concat(g["html-container"],'" id="').concat(g["html-container"],`"></div>
|
||
|
<input class="`).concat(g.input,`" />
|
||
|
<input type="file" class="`).concat(g.file,`" />
|
||
|
<div class="`).concat(g.range,`">
|
||
|
<input type="range" />
|
||
|
<output></output>
|
||
|
</div>
|
||
|
<select class="`).concat(g.select,`"></select>
|
||
|
<div class="`).concat(g.radio,`"></div>
|
||
|
<label for="`).concat(g.checkbox,'" class="').concat(g.checkbox,`">
|
||
|
<input type="checkbox" />
|
||
|
<span class="`).concat(g.label,`"></span>
|
||
|
</label>
|
||
|
<textarea class="`).concat(g.textarea,`"></textarea>
|
||
|
<div class="`).concat(g["validation-message"],'" id="').concat(g["validation-message"],`"></div>
|
||
|
<div class="`).concat(g.actions,`">
|
||
|
<div class="`).concat(g.loader,`"></div>
|
||
|
<button type="button" class="`).concat(g.confirm,`"></button>
|
||
|
<button type="button" class="`).concat(g.deny,`"></button>
|
||
|
<button type="button" class="`).concat(g.cancel,`"></button>
|
||
|
</div>
|
||
|
<div class="`).concat(g.footer,`"></div>
|
||
|
<div class="`).concat(g["timer-progress-bar-container"],`">
|
||
|
<div class="`).concat(g["timer-progress-bar"],`"></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
`).replace(/(^|\n)\s*/g,""),$v=()=>{const a=V();return a?(a.remove(),ye([document.documentElement,document.body],[g["no-backdrop"],g["toast-shown"],g["has-column"]]),!0):!1},ar=()=>{Oe.currentInstance.resetValidationMessage()},Bv=()=>{const a=G(),c=Ne(a,g.input),h=Ne(a,g.file),_=a.querySelector(".".concat(g.range," input")),Y=a.querySelector(".".concat(g.range," output")),ue=Ne(a,g.select),tt=a.querySelector(".".concat(g.checkbox," input")),Ct=Ne(a,g.textarea);c.oninput=ar,h.onchange=ar,ue.onchange=ar,tt.onchange=ar,Ct.oninput=ar,_.oninput=()=>{ar(),Y.value=_.value},_.onchange=()=>{ar(),_.nextSibling.value=_.value}},Uv=a=>typeof a=="string"?document.querySelector(a):a,Hv=a=>{const c=G();c.setAttribute("role",a.toast?"alert":"dialog"),c.setAttribute("aria-live",a.toast?"polite":"assertive"),a.toast||c.setAttribute("aria-modal","true")},Fv=a=>{window.getComputedStyle(a).direction==="rtl"&&ne(V(),g.rtl)},Vv=a=>{const c=$v();if(Fu()){l("SweetAlert2 requires document to initialize");return}const h=document.createElement("div");h.className=g.container,c&&ne(h,g["no-transition"]),Q(h,Lv);const _=Uv(a.target);_.appendChild(h),Hv(a),Fv(_),Bv()},Wa=(a,c)=>{a instanceof HTMLElement?c.appendChild(a):typeof a=="object"?jv(a,c):a&&Q(c,a)},jv=(a,c)=>{a.jquery?Wv(c,a):Q(c,a.toString())},Wv=(a,c)=>{if(a.textContent="",0 in c)for(let h=0;h in c;h++)a.appendChild(c[h].cloneNode(!0));else a.appendChild(c.cloneNode(!0))},Ki=(()=>{if(Fu())return!1;const a=document.createElement("div"),c={WebkitAnimation:"webkitAnimationEnd",animation:"animationend"};for(const h in c)if(Object.prototype.hasOwnProperty.call(c,h)&&typeof a.style[h]!="undefined")return c[h];return!1})(),qv=()=>{const a=document.createElement("div");a.className=g["scrollbar-measure"],document.body.appendChild(a);const c=a.getBoundingClientRect().width-a.clientWidth;return document.body.removeChild(a),c},Yv=(a,c)=>{const h=be(),_=z();!c.showConfirmButton&&!c.showDenyButton&&!c.showCancelButton?Ye(h):Ce(h),N(h,c,"actions"),Kv(h,_,c),Q(_,c.loaderHtml),N(_,c,"loader")};function Kv(a,c,h){const _=qe(),Y=L(),ue=se();qa(_,"confirm",h),qa(Y,"deny",h),qa(ue,"cancel",h),zv(_,Y,ue,h),h.reverseButtons&&(h.toast?(a.insertBefore(ue,_),a.insertBefore(Y,_)):(a.insertBefore(ue,c),a.insertBefore(Y,c),a.insertBefore(_,c)))}function zv(a,c,h,_){if(!_.buttonsStyling)return ye([a,c,h],g.styled);ne([a,c,h],g.styled),_.confirmButtonColor&&(a.style.backgroundColor=_.confirmButtonColor,ne(a,g["default-outline"])),_.denyButtonColor&&(c.style.backgroundColor=_.denyButtonColor,ne(c,g["default-outline"])),_.cancelButtonColor&&(h.style.backgroundColor=_.cancelButtonColor,ne(h,g["default-outline"]))}function qa(a,c,h){or(a,h["show".concat(i(c),"Button")],"inline-block"),Q(a,h["".concat(c,"ButtonText")]),a.setAttribute("aria-label",h["".concat(c,"ButtonAriaLabel")]),a.className=g[c],N(a,h,"".concat(c,"Button")),ne(a,h["".concat(c,"ButtonClass")])}function Gv(a,c){typeof c=="string"?a.style.background=c:c||ne([document.documentElement,document.body],g["no-backdrop"])}function Xv(a,c){c in g?ne(a,g[c]):(o('The "position" parameter is not valid, defaulting to "center"'),ne(a,g.center))}function Jv(a,c){if(c&&typeof c=="string"){const h="grow-".concat(c);h in g&&ne(a,g[h])}}const Qv=(a,c)=>{const h=V();!h||(Gv(h,c.backdrop),Xv(h,c.position),Jv(h,c.grow),N(h,c,"container"))};var De={awaitingPromise:new WeakMap,promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap};const Zv=["input","file","range","select","radio","checkbox","textarea"],ey=(a,c)=>{const h=G(),_=De.innerParams.get(a),Y=!_||c.input!==_.input;Zv.forEach(ue=>{const tt=g[ue],Ct=Ne(h,tt);ry(ue,c.inputAttributes),Ct.className=tt,Y&&Ye(Ct)}),c.input&&(Y&&ty(c),iy(c))},ty=a=>{if(!_t[a.input])return l('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(a.input,'"'));const c=Vu(a.input),h=_t[a.input](c,a);Ce(h),setTimeout(()=>{U(h)})},ny=a=>{for(let c=0;c<a.attributes.length;c++){const h=a.attributes[c].name;["type","value","style"].includes(h)||a.r
|
||
|
<div class="swal2-success-circular-line-left"></div>
|
||
|
<span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>
|
||
|
<div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>
|
||
|
<div class="swal2-success-circular-line-right"></div>
|
||
|
`,dy=`
|
||
|
<span class="swal2-x-mark">
|
||
|
<span class="swal2-x-mark-line-left"></span>
|
||
|
<span class="swal2-x-mark-line-right"></span>
|
||
|
</span>
|
||
|
`,Wu=(a,c)=>{a.textContent="",c.iconHtml?Q(a,qu(c.iconHtml)):c.icon==="success"?Q(a,uy):c.icon==="error"?Q(a,dy):Q(a,qu({question:"?",warning:"!",info:"i"}[c.icon]))},fy=(a,c)=>{if(!!c.iconColor){a.style.color=c.iconColor,a.style.borderColor=c.iconColor;for(const h of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])_n(a,h,"backgroundColor",c.iconColor);_n(a,".swal2-success-ring","borderColor",c.iconColor)}},qu=a=>'<div class="'.concat(g["icon-content"],'">').concat(a,"</div>"),hy=(a,c)=>{const h=Ue();if(!c.imageUrl)return Ye(h);Ce(h,""),h.setAttribute("src",c.imageUrl),h.setAttribute("alt",c.imageAlt),Re(h,"width",c.imageWidth),Re(h,"height",c.imageHeight),h.className=g.image,N(h,c,"image")},py=a=>{const c=document.createElement("li");return ne(c,g["progress-step"]),Q(c,a),c},my=a=>{const c=document.createElement("li");return ne(c,g["progress-step-line"]),a.progressStepsDistance&&(c.style.width=a.progressStepsDistance),c},gy=(a,c)=>{const h=We();if(!c.progressSteps||c.progressSteps.length===0)return Ye(h);Ce(h),h.textContent="",c.currentProgressStep>=c.progressSteps.length&&o("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),c.progressSteps.forEach((_,Y)=>{const ue=py(_);if(h.appendChild(ue),Y===c.currentProgressStep&&ne(ue,g["active-progress-step"]),Y!==c.progressSteps.length-1){const tt=my(c);h.appendChild(tt)}})},vy=(a,c)=>{const h=Te();or(h,c.title||c.titleText,"block"),c.title&&Wa(c.title,h),c.titleText&&(h.innerText=c.titleText),N(h,c,"title")},yy=(a,c)=>{const h=V(),_=G();c.toast?(Re(h,"width",c.width),_.style.width="100%",_.insertBefore(z(),le())):Re(_,"width",c.width),Re(_,"padding",c.padding),c.color&&(_.style.color=c.color),c.background&&(_.style.background=c.background),Ye(xe()),_y(_,c)},_y=(a,c)=>{a.className="".concat(g.popup," ").concat(it(a)?c.showClass.popup:""),c.toast?(ne([document.documentElement,document.body],g["toast-shown"]),ne(a,g.toast)):ne(a,g.modal),N(a,c,"popup"),typeof c.customClass=="string"&&ne(a,c.customClass),c.icon&&ne(a,g["icon-".concat(c.icon)])},Yu=(a,c)=>{yy(a,c),Qv(a,c),gy(a,c),ly(a,c),hy(a,c),vy(a,c),ay(a,c),sy(a,c),Yv(a,c),oy(a,c),typeof c.didRender=="function"&&c.didRender(G())},Xr=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),by=()=>{s(document.body.children).forEach(c=>{c===V()||c.contains(V())||(c.hasAttribute("aria-hidden")&&c.setAttribute("data-previous-aria-hidden",c.getAttribute("aria-hidden")),c.setAttribute("aria-hidden","true"))})},Ku=()=>{s(document.body.children).forEach(c=>{c.hasAttribute("data-previous-aria-hidden")?(c.setAttribute("aria-hidden",c.getAttribute("data-previous-aria-hidden")),c.removeAttribute("data-previous-aria-hidden")):c.removeAttribute("aria-hidden")})},zu=["swal-title","swal-html","swal-footer"],wy=a=>{const c=typeof a.template=="string"?document.querySelector(a.template):a.template;if(!c)return{};const h=c.content;return Iy(h),Object.assign(Ey(h),Ty(h),Cy(h),Sy(h),Ay(h),Oy(h,zu))},Ey=a=>{const c={};return s(a.querySelectorAll("swal-param")).forEach(h=>{lr(h,["name","value"]);const _=h.getAttribute("name"),Y=h.getAttribute("value");typeof T[_]=="boolean"&&Y==="false"&&(c[_]=!1),typeof T[_]=="object"&&(c[_]=JSON.parse(Y))}),c},Ty=a=>{const c={};return s(a.querySelectorAll("swal-button")).forEach(h=>{lr(h,["type","color","aria-label"]);const _=h.getAttribute("type");c["".concat(_,"ButtonText")]=h.innerHTML,c["show".concat(i(_),"Button")]=!0,h.hasAttribute("color")&&(c["".concat(_,"ButtonColor")]=h.getAttribute("color")),h.hasAttribute("aria-label")&&(c["".concat(_,"ButtonAriaLabel")]=h.getAttribute("aria-label"))}),c},Cy=a=>{const c={},h=a.querySelector("swal-image");return h&&(lr(h,["src","width","height","alt"]),h.hasAttribute("src")&&(c.imageUrl=h.getAttribute("src")),h.hasAttribute("width")&&(c.imageWidth=h.getAttribute("width")),h.hasAttribute("height")&&(c.imageHeight=h.getAttribute("height")),h.hasAttribute("alt")&&(c.imageAlt=h.getAttribute("alt"))),c
|
||
|
showLoaderOnConfirm should be used together with preConfirm, see usage example:
|
||
|
https://sweetalert2.github.io/#ajax-request`),Dy(a),typeof a.title=="string"&&(a.title=a.title.split(`
|
||
|
`).join("<br />")),Vv(a)}class Ny{constructor(c,h){this.callback=c,this.remaining=h,this.running=!1,this.start()}start(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}stop(){return this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=new Date().getTime()-this.started.getTime()),this.remaining}increase(c){const h=this.running;return h&&this.stop(),this.remaining+=c,h&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}const xy=()=>{X.previousBodyPadding===null&&document.body.scrollHeight>window.innerHeight&&(X.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(X.previousBodyPadding+qv(),"px"))},My=()=>{X.previousBodyPadding!==null&&(document.body.style.paddingRight="".concat(X.previousBodyPadding,"px"),X.previousBodyPadding=null)},Ry=()=>{if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!q(document.body,g.iosfix)){const c=document.body.scrollTop;document.body.style.top="".concat(c*-1,"px"),ne(document.body,g.iosfix),$y(),Ly()}},Ly=()=>{const a=navigator.userAgent,c=!!a.match(/iPad/i)||!!a.match(/iPhone/i),h=!!a.match(/WebKit/i);c&&h&&!a.match(/CriOS/i)&&G().scrollHeight>window.innerHeight-44&&(V().style.paddingBottom="".concat(44,"px"))},$y=()=>{const a=V();let c;a.ontouchstart=h=>{c=By(h)},a.ontouchmove=h=>{c&&(h.preventDefault(),h.stopPropagation())}},By=a=>{const c=a.target,h=V();return Uy(a)||Hy(a)?!1:c===h||!ut(h)&&c.tagName!=="INPUT"&&c.tagName!=="TEXTAREA"&&!(ut(He())&&He().contains(c))},Uy=a=>a.touches&&a.touches.length&&a.touches[0].touchType==="stylus",Hy=a=>a.touches&&a.touches.length>1,Fy=()=>{if(q(document.body,g.iosfix)){const a=parseInt(document.body.style.top,10);ye(document.body,g.iosfix),document.body.style.top="",document.body.scrollTop=a*-1}},Xu=10,Vy=a=>{const c=V(),h=G();typeof a.willOpen=="function"&&a.willOpen(h);const Y=window.getComputedStyle(document.body).overflowY;qy(c,h,a),setTimeout(()=>{jy(c,h)},Xu),P()&&(Wy(c,a.scrollbarPadding,Y),by()),!M()&&!Oe.previousActiveElement&&(Oe.previousActiveElement=document.activeElement),typeof a.didOpen=="function"&&setTimeout(()=>a.didOpen(h)),ye(c,g["no-transition"])},Ju=a=>{const c=G();if(a.target!==c)return;const h=V();c.removeEventListener(Ki,Ju),h.style.overflowY="auto"},jy=(a,c)=>{Ki&&Tt(c)?(a.style.overflowY="hidden",c.addEventListener(Ki,Ju)):a.style.overflowY="auto"},Wy=(a,c,h)=>{Ry(),c&&h!=="hidden"&&xy(),setTimeout(()=>{a.scrollTop=0})},qy=(a,c,h)=>{ne(a,h.showClass.backdrop),c.style.setProperty("opacity","0","important"),Ce(c,"grid"),setTimeout(()=>{ne(c,h.showClass.popup),c.style.removeProperty("opacity")},Xu),ne([document.documentElement,document.body],g.shown),h.heightAuto&&h.backdrop&&!h.toast&&ne([document.documentElement,document.body],g["height-auto"])},Jr=a=>{let c=G();c||new so,c=G();const h=z();M()?Ye(le()):Yy(c,a),Ce(h),c.setAttribute("data-loading",!0),c.setAttribute("aria-busy",!0),c.focus()},Yy=(a,c)=>{const h=be(),_=z();!c&&it(qe())&&(c=qe()),Ce(h),c&&(Ye(c),_.setAttribute("data-button-to-replace",c.className)),_.parentNode.insertBefore(_,c),ne([a,h],g.loading)},Ky=(a,c)=>{c.input==="select"||c.input==="radio"?Qy(a,c):["text","email","number","tel","textarea"].includes(c.input)&&(v(c.inputValue)||S(c.inputValue))&&(Jr(qe()),Zy(a,c))},zy=(a,c)=>{const h=a.getInput();if(!h)return null;switch(c.input){case"checkbox":return Gy(h);case"radio":return Xy(h);case"file":return Jy(h);default:return c.inputAutoTrim?h.value.trim():h.value}},Gy=a=>a.checked?1:0,Xy=a=>a.checked?a.value:null,Jy=a=>a.files.length?a.getAttribute("multiple")!==null?a.files:a.files[0]:null,Qy=(a,c)=>{const h=G(),_=Y=>e_[c.input](h,Ka(Y),c);v(c.inputOptions)||S(c.inputOptions)?(Jr(qe()),m(c.inputOptions).then(Y=>{a.hideLoading(),_(Y)})):typeof c.inputOptions=="object"?_(c.inputOptions):l("Unexpected type of inputO
|
||
|
|
||
|
If you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md`))}),c};function k_(){const a=De.domCache.get(this),c=De.innerParams.get(this);if(!c){ad(this);return}a.popup&&Oe.swalCloseEventFinishedCallback&&(Oe.swalCloseEventFinishedCallback(),delete Oe.swalCloseEventFinishedCallback),Oe.deferDisposalTimer&&(clearTimeout(Oe.deferDisposalTimer),delete Oe.deferDisposalTimer),typeof c.didDestroy=="function"&&c.didDestroy(),D_(this)}const D_=a=>{ad(a),delete a.params,delete Oe.keydownHandler,delete Oe.keydownTarget,delete Oe.currentInstance},ad=a=>{a.isAwaitingPromise()?(Ga(De,a),De.awaitingPromise.set(a,!0)):(Ga(Gi,a),Ga(De,a))},Ga=(a,c)=>{for(const h in a)a[h].delete(c)};var ld=Object.freeze({hideLoading:Zu,disableLoading:Zu,getInput:n_,close:ro,isAwaitingPromise:p_,rejectPromise:g_,handleAwaitingPromise:Xi,closePopup:ro,closeModal:ro,closeToast:ro,enableButtons:b_,disableButtons:w_,enableInput:E_,disableInput:T_,showValidationMessage:C_,resetValidationMessage:S_,getProgressSteps:A_,update:O_,_destroy:k_});const P_=a=>{const c=De.innerParams.get(a);a.disableButtons(),c.input?cd(a,"confirm"):Ja(a,!0)},N_=a=>{const c=De.innerParams.get(a);a.disableButtons(),c.returnInputValueOnDeny?cd(a,"deny"):Xa(a,!1)},x_=(a,c)=>{a.disableButtons(),c(Xr.cancel)},cd=(a,c)=>{const h=De.innerParams.get(a);if(!h.input)return l('The "input" parameter is needed to be set when using returnInputValueOn'.concat(i(c)));const _=zy(a,h);h.inputValidator?M_(a,_,c):a.getInput().checkValidity()?c==="deny"?Xa(a,_):Ja(a,_):(a.enableButtons(),a.showValidationMessage(h.validationMessage))},M_=(a,c,h)=>{const _=De.innerParams.get(a);a.disableInput(),Promise.resolve().then(()=>m(_.inputValidator(c,_.validationMessage))).then(ue=>{a.enableButtons(),a.enableInput(),ue?a.showValidationMessage(ue):h==="deny"?Xa(a,c):Ja(a,c)})},Xa=(a,c)=>{const h=De.innerParams.get(a||void 0);h.showLoaderOnDeny&&Jr(L()),h.preDeny?(De.awaitingPromise.set(a||void 0,!0),Promise.resolve().then(()=>m(h.preDeny(c,h.validationMessage))).then(Y=>{Y===!1?(a.hideLoading(),Xi(a)):a.closePopup({isDenied:!0,value:typeof Y=="undefined"?c:Y})}).catch(Y=>dd(a||void 0,Y))):a.closePopup({isDenied:!0,value:c})},ud=(a,c)=>{a.closePopup({isConfirmed:!0,value:c})},dd=(a,c)=>{a.rejectPromise(c)},Ja=(a,c)=>{const h=De.innerParams.get(a||void 0);h.showLoaderOnConfirm&&Jr(),h.preConfirm?(a.resetValidationMessage(),De.awaitingPromise.set(a||void 0,!0),Promise.resolve().then(()=>m(h.preConfirm(c,h.validationMessage))).then(Y=>{it(xe())||Y===!1?(a.hideLoading(),Xi(a)):ud(a,typeof Y=="undefined"?c:Y)}).catch(Y=>dd(a||void 0,Y))):ud(a,c)},R_=(a,c,h)=>{De.innerParams.get(a).toast?L_(a,c,h):(B_(c),U_(c),H_(a,c,h))},L_=(a,c,h)=>{c.popup.onclick=()=>{const _=De.innerParams.get(a);_&&($_(_)||_.timer||_.input)||h(Xr.close)}},$_=a=>a.showConfirmButton||a.showDenyButton||a.showCancelButton||a.showCloseButton;let io=!1;const B_=a=>{a.popup.onmousedown=()=>{a.container.onmouseup=function(c){a.container.onmouseup=void 0,c.target===a.container&&(io=!0)}}},U_=a=>{a.container.onmousedown=()=>{a.popup.onmouseup=function(c){a.popup.onmouseup=void 0,(c.target===a.popup||a.popup.contains(c.target))&&(io=!0)}}},H_=(a,c,h)=>{c.container.onclick=_=>{const Y=De.innerParams.get(a);if(io){io=!1;return}_.target===c.container&&p(Y.allowOutsideClick)&&h(Xr.backdrop)}},F_=a=>typeof a=="object"&&a.jquery,fd=a=>a instanceof Element||F_(a),V_=a=>{const c={};return typeof a[0]=="object"&&!fd(a[0])?Object.assign(c,a[0]):["title","html","icon"].forEach((h,_)=>{const Y=a[_];typeof Y=="string"||fd(Y)?c[h]=Y:Y!==void 0&&l("Unexpected type of ".concat(h,'! Expected "string" or "Element", got ').concat(typeof Y))}),c};function j_(){const a=this;for(var c=arguments.length,h=new Array(c),_=0;_<c;_++)h[_]=arguments[_];return new a(...h)}function W_(a){class c extends this{_main(_,Y){return super._main(_,Object.assign({},a,Y))}}return c}const q_=()=>Oe.timeout&&Oe.timeout.getTimerLeft(),hd=()=>{if(Oe.timeout)return Nv(),Oe.timeout.stop()},pd=()=>{if(Oe.timeout){con
|
||
|
* vue-router v4.0.12
|
||
|
* (c) 2021 Eduardo San Martin Morote
|
||
|
* @license MIT
|
||
|
*/const mm=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",Fi=t=>mm?Symbol(t):"_vr_"+t,B0=Fi("rvlm"),tf=Fi("rvd"),ya=Fi("r"),iu=Fi("rl"),lc=Fi("rvl"),ui=typeof window!="undefined";function U0(t){return t.__esModule||mm&&t[Symbol.toStringTag]==="Module"}const Ke=Object.assign;function al(t,e){const n={};for(const r in e){const i=e[r];n[r]=Array.isArray(i)?i.map(t):t(i)}return n}const ys=()=>{},H0=/\/$/,F0=t=>t.replace(H0,"");function ll(t,e,n="/"){let r,i={},s="",o="";const l=e.indexOf("?"),u=e.indexOf("#",l>-1?l:0);return l>-1&&(r=e.slice(0,l),s=e.slice(l+1,u>-1?u:e.length),i=t(s)),u>-1&&(r=r||e.slice(0,u),o=e.slice(u,e.length)),r=q0(r!=null?r:e,n),{fullPath:r+(s&&"?")+s+o,path:r,query:i,hash:o}}function V0(t,e){const n=e.query?t(e.query):"";return e.path+(n&&"?")+n+(e.hash||"")}function nf(t,e){return!e||!t.toLowerCase().startsWith(e.toLowerCase())?t:t.slice(e.length)||"/"}function j0(t,e,n){const r=e.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&Ai(e.matched[r],n.matched[i])&&gm(e.params,n.params)&&t(e.query)===t(n.query)&&e.hash===n.hash}function Ai(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function gm(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(!W0(t[n],e[n]))return!1;return!0}function W0(t,e){return Array.isArray(t)?rf(t,e):Array.isArray(e)?rf(e,t):t===e}function rf(t,e){return Array.isArray(e)?t.length===e.length&&t.every((n,r)=>n===e[r]):t.length===1&&t[0]===e}function q0(t,e){if(t.startsWith("/"))return t;if(!t)return e;const n=e.split("/"),r=t.split("/");let i=n.length-1,s,o;for(s=0;s<r.length;s++)if(o=r[s],!(i===1||o==="."))if(o==="..")i--;else break;return n.slice(0,i).join("/")+"/"+r.slice(s-(s===r.length?1:0)).join("/")}var $s;(function(t){t.pop="pop",t.push="push"})($s||($s={}));var _s;(function(t){t.back="back",t.forward="forward",t.unknown=""})(_s||(_s={}));function Y0(t){if(!t)if(ui){const e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^\w+:\/\/[^\/]+/,"")}else t="/";return t[0]!=="/"&&t[0]!=="#"&&(t="/"+t),F0(t)}const K0=/^[^#]+#/;function z0(t,e){return t.replace(K0,"#")+e}function G0(t,e){const n=document.documentElement.getBoundingClientRect(),r=t.getBoundingClientRect();return{behavior:e.behavior,left:r.left-n.left-(e.left||0),top:r.top-n.top-(e.top||0)}}const _a=()=>({left:window.pageXOffset,top:window.pageYOffset});function X0(t){let e;if("el"in t){const n=t.el,r=typeof n=="string"&&n.startsWith("#"),i=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;e=G0(i,t)}else e=t;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.pageXOffset,e.top!=null?e.top:window.pageYOffset)}function sf(t,e){return(history.state?history.state.position-e:-1)+t}const cc=new Map;function J0(t,e){cc.set(t,e)}function Q0(t){const e=cc.get(t);return cc.delete(t),e}let Z0=()=>location.protocol+"//"+location.host;function vm(t,e){const{pathname:n,search:r,hash:i}=e,s=t.indexOf("#");if(s>-1){let l=i.includes(t.slice(s))?t.slice(s).length:1,u=i.slice(l);return u[0]!=="/"&&(u="/"+u),nf(u,"")}return nf(n,t)+r+i}function eE(t,e,n,r){let i=[],s=[],o=null;const l=({state:v})=>{const m=vm(t,location),S=n.value,T=e.value;let A=0;if(v){if(n.value=m,e.value=v,o&&o===S){o=null;return}A=T?v.position-T.position:0}else r(m);i.forEach(O=>{O(n.value,S,{delta:A,type:$s.pop,direction:A?A>0?_s.forward:_s.back:_s.unknown})})};function u(){o=n.value}function d(v){i.push(v);const m=()=>{const S=i.indexOf(v);S>-1&&i.splice(S,1)};return s.push(m),m}function f(){const{history:v}=window;!v.state||v.replaceState(Ke({},v.state,{scroll:_a()}),"")}function p(){for(const v of s)v();s=[],window.removeEventListener("popstate",l),window.removeEventListener("beforeunload",f)}return window.addEventListener("popstate",l),window.addEventListener("beforeunload",f),{pauseListeners:u,listen:d,destroy:p}}function of(t,e,n,r=!1,i=!1){return{back:t,current:e,forward:n,replaced:r,position:window.history.length,scroll:i?_a():null}}function tE(t){const{history:e,locat
|
||
|
* pinia v2.0.6
|
||
|
* (c) 2021 Eduardo San Martin Morote
|
||
|
* @license MIT
|
||
|
*/let Sm;const ba=t=>Sm=t,Am=Symbol();function dc(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var bs;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(bs||(bs={}));function Sx(){const t=gp(!0),e=t.run(()=>Se({}));let n=[],r=[];const i=Ei({install(s){ba(i),i._a=s,s.provide(Am,i),s.config.globalProperties.$pinia=i,r.forEach(o=>n.push(o)),r=[]},use(s){return!this._a&&!HE?r.push(s):n.push(s),this},_p:n,_a:null,_e:t,_s:new Map,state:e});return i}function gf(t,e,n){t.push(e);const r=()=>{const i=t.indexOf(e);i>-1&&t.splice(i,1)};return!n&&va()&&ma(r),r}function vf(t,...e){t.forEach(n=>{n(...e)})}function fc(t,e){for(const n in e){const r=e[n],i=t[n];dc(i)&&dc(r)&&!Xe(r)&&!Jn(r)?t[n]=fc(i,r):t[n]=r}return t}const FE=Symbol();function VE(t){return!dc(t)||!t.hasOwnProperty(FE)}const{assign:bn}=Object;function jE(t){return!!(Xe(t)&&t.effect)}function WE(t,e,n,r){const{state:i,actions:s,getters:o}=e,l=n.state.value[t];let u;function d(){l||(n.state.value[t]=i?i():{});const f=nw(n.state.value[t]);return bn(f,s,Object.keys(o||{}).reduce((p,v)=>(p[v]=Ei(ce(()=>{ba(n);const m=n._s.get(t);return o[v].call(m,m)})),p),{}))}return u=Om(t,d,e,n),u.$reset=function(){const p=i?i():{};this.$patch(v=>{bn(v,p)})},u}const ul=()=>{};function Om(t,e,n={},r,i){let s;const o=n.state,l=bn({actions:{}},n),u={deep:!0};let d,f=Ei([]),p=Ei([]),v;const m=r.state.value[t];!o&&!m&&(r.state.value[t]={}),Se({});function S(B){let j;d=!1,typeof B=="function"?(B(r.state.value[t]),j={type:bs.patchFunction,storeId:t,events:v}):(fc(r.state.value[t],B),j={type:bs.patchObject,payload:B,storeId:t,events:v}),d=!0,vf(f,j,r.state.value[t])}const T=ul;function A(){s.stop(),f=[],p=[],r._s.delete(t)}function O(B,j){return function(){ba(r);const b=Array.from(arguments);let x=ul,R=ul;function H(V){x=V}function w(V){R=V}vf(p,{args:b,name:B,store:C,after:H,onError:w});let g;try{g=j.apply(this&&this.$id===t?this:C,b)}catch(V){if(R(V)!==!1)throw V}if(g instanceof Promise)return g.then(V=>{const ae=x(V);return ae===void 0?V:ae}).catch(V=>{if(R(V)!==!1)return Promise.reject(V)});const F=x(g);return F===void 0?g:F}}const k={_p:r,$id:t,$onAction:gf.bind(null,p),$patch:S,$reset:T,$subscribe(B,j={}){const b=gf(f,B,j.detached),x=s.run(()=>cn(()=>r.state.value[t],H=>{d&&B({storeId:t,type:bs.direct,events:v},H)},bn({},u,j)));return()=>{x(),b()}},$dispose:A},C=Hi(bn({},k));r._s.set(t,C);const D=r._e.run(()=>(s=gp(),s.run(()=>e())));for(const B in D){const j=D[B];if(Xe(j)&&!jE(j)||Jn(j))o||(m&&VE(j)&&(Xe(j)?j.value=m[B]:fc(j,m[B])),r.state.value[t][B]=j);else if(typeof j=="function"){const b=O(B,j);D[B]=b,l.actions[B]=j}}return bn(C,D),bn(Be(C),D),Object.defineProperty(C,"$state",{get:()=>r.state.value[t],set:B=>{S(j=>{bn(j,B)})}}),r._p.forEach(B=>{bn(C,s.run(()=>B({store:C,app:r._a,pinia:r,options:l})))}),m&&o&&n.hydrate&&n.hydrate(C.$state,m),d=!0,C}function Ax(t,e,n){let r,i;const s=typeof e=="function";typeof t=="string"?(r=t,i=s?n:e):(i=t,r=t.id);function o(l,u){const d=va();return l=l||d&&ht(Am),l&&ba(l),l=Sm,l._s.has(r)||(s?Om(r,e,i,l):WE(r,i,l)),l._s.get(r)}return o.$id=r,o}var ou={exports:{}},Im=function(e,n){return function(){for(var i=new Array(arguments.length),s=0;s<i.length;s++)i[s]=arguments[s];return e.apply(n,i)}},qE=Im,qr=Object.prototype.toString;function au(t){return qr.call(t)==="[object Array]"}function hc(t){return typeof t=="undefined"}function YE(t){return t!==null&&!hc(t)&&t.constructor!==null&&!hc(t.constructor)&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function KE(t){return qr.call(t)==="[object ArrayBuffer]"}function zE(t){return typeof FormData!="undefined"&&t instanceof FormData}function GE(t){var e;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&t.buffer instanceof ArrayBuffer,e}function XE(t){return typeof t=="string"}function JE(t){return typeof t=="number"}function km(t){return t!==null&&typeof t=="object"}function Oo(t){if(qr.call(t)!=="[object Object]")return!1
|
||
|
`),function(l){if(s=l.indexOf(":"),r=dl.trim(l.substr(0,s)).toLowerCase(),i=dl.trim(l.substr(s+1)),r){if(n[r]&&bT.indexOf(r)>=0)return;r==="set-cookie"?n[r]=(n[r]?n[r]:[]).concat([i]):n[r]=n[r]?n[r]+", "+i:i}}),n},_f=xt,ET=_f.isStandardBrowserEnv()?function(){var e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),r;function i(s){var o=s;return e&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(o){var l=_f.isString(o)?i(o):o;return l.protocol===r.protocol&&l.host===r.host}}():function(){return function(){return!0}}();function cu(t){this.message=t}cu.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};cu.prototype.__CANCEL__=!0;var Ea=cu,go=xt,TT=hT,CT=pT,ST=Pm,AT=_T,OT=wT,IT=ET,fl=xm,kT=Ca,DT=Ea,bf=function(e){return new Promise(function(r,i){var s=e.data,o=e.headers,l=e.responseType,u;function d(){e.cancelToken&&e.cancelToken.unsubscribe(u),e.signal&&e.signal.removeEventListener("abort",u)}go.isFormData(s)&&delete o["Content-Type"];var f=new XMLHttpRequest;if(e.auth){var p=e.auth.username||"",v=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.Authorization="Basic "+btoa(p+":"+v)}var m=AT(e.baseURL,e.url);f.open(e.method.toUpperCase(),ST(m,e.params,e.paramsSerializer),!0),f.timeout=e.timeout;function S(){if(!!f){var A="getAllResponseHeaders"in f?OT(f.getAllResponseHeaders()):null,O=!l||l==="text"||l==="json"?f.responseText:f.response,k={data:O,status:f.status,statusText:f.statusText,headers:A,config:e,request:f};TT(function(D){r(D),d()},function(D){i(D),d()},k),f=null}}if("onloadend"in f?f.onloadend=S:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(S)},f.onabort=function(){!f||(i(fl("Request aborted",e,"ECONNABORTED",f)),f=null)},f.onerror=function(){i(fl("Network Error",e,null,f)),f=null},f.ontimeout=function(){var O=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",k=e.transitional||kT.transitional;e.timeoutErrorMessage&&(O=e.timeoutErrorMessage),i(fl(O,e,k.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",f)),f=null},go.isStandardBrowserEnv()){var T=(e.withCredentials||IT(m))&&e.xsrfCookieName?CT.read(e.xsrfCookieName):void 0;T&&(o[e.xsrfHeaderName]=T)}"setRequestHeader"in f&&go.forEach(o,function(O,k){typeof s=="undefined"&&k.toLowerCase()==="content-type"?delete o[k]:f.setRequestHeader(k,O)}),go.isUndefined(e.withCredentials)||(f.withCredentials=!!e.withCredentials),l&&l!=="json"&&(f.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&f.addEventListener("progress",e.onDownloadProgress),typeof e.onUploadProgress=="function"&&f.upload&&f.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(u=function(A){!f||(i(!A||A&&A.type?new DT("canceled"):A),f.abort(),f=null)},e.cancelToken&&e.cancelToken.subscribe(u),e.signal&&(e.signal.aborted?u():e.signal.addEventListener("abort",u))),s||(s=null),f.send(s)})},at=xt,wf=uT,PT=Nm,NT={"Content-Type":"application/x-www-form-urlencoded"};function Ef(t,e){!at.isUndefined(t)&&at.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}function xT(){var t;return(typeof XMLHttpRequest!="undefined"||typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]")&&(t=bf),t}function MT(t,e,n){if(at.isString(t))try{return(e||JSON.parse)(t),at.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}var Ta={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:xT(),transformRequest:[function(e,n){return wf(n,"Accept"),wf(n,"Content-Type"),at.isFormData(e)||at.isArrayBuffer(e)||at.isBuffer(e)||at.isStream(e)||at.isFile(e)||at.isBlob(e)?e:at.isArrayBufferView(e)?e.buffer:at.isURLSearchParams(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.
|
||
|
*//**
|
||
|
* @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 eC=function(t){const e=[];let n=0;for(let r=0;r<t.length;r++){let i=t.charCodeAt(r);i<128?e[n++]=i:i<2048?(e[n++]=i>>6|192,e[n++]=i&63|128):(i&64512)===55296&&r+1<t.length&&(t.charCodeAt(r+1)&64512)===56320?(i=65536+((i&1023)<<10)+(t.charCodeAt(++r)&1023),e[n++]=i>>18|240,e[n++]=i>>12&63|128,e[n++]=i>>6&63|128,e[n++]=i&63|128):(e[n++]=i>>12|224,e[n++]=i>>6&63|128,e[n++]=i&63|128)}return e},tC=function(t){const e=[];let n=0,r=0;for(;n<t.length;){const i=t[n++];if(i<128)e[r++]=String.fromCharCode(i);else if(i>191&&i<224){const s=t[n++];e[r++]=String.fromCharCode((i&31)<<6|s&63)}else if(i>239&&i<365){const s=t[n++],o=t[n++],l=t[n++],u=((i&7)<<18|(s&63)<<12|(o&63)<<6|l&63)-65536;e[r++]=String.fromCharCode(55296+(u>>10)),e[r++]=String.fromCharCode(56320+(u&1023))}else{const s=t[n++],o=t[n++];e[r++]=String.fromCharCode((i&15)<<12|(s&63)<<6|o&63)}}return e.join("")},nC={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let i=0;i<t.length;i+=3){const s=t[i],o=i+1<t.length,l=o?t[i+1]:0,u=i+2<t.length,d=u?t[i+2]:0,f=s>>2,p=(s&3)<<4|l>>4;let v=(l&15)<<2|d>>6,m=d&63;u||(m=64,o||(v=64)),r.push(n[f],n[p],n[v],n[m])}return r.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(eC(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):tC(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();const n=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let i=0;i<t.length;){const s=n[t.charAt(i++)],l=i<t.length?n[t.charAt(i)]:0;++i;const d=i<t.length?n[t.charAt(i)]:64;++i;const p=i<t.length?n[t.charAt(i)]:64;if(++i,s==null||l==null||d==null||p==null)throw Error();const v=s<<2|l>>4;if(r.push(v),d!==64){const m=l<<4&240|d>>2;if(r.push(m),p!==64){const S=d<<6&192|p;r.push(S)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let t=0;t<this.ENCODED_VALS.length;t++)this.byteToCharMap_[t]=this.ENCODED_VALS.charAt(t),this.charToByteMap_[this.byteToCharMap_[t]]=t,this.byteToCharMapWebSafe_[t]=this.ENCODED_VALS_WEBSAFE.charAt(t),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[t]]=t,t>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}},rC=function(t){try{return nC.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e)}return 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.
|
||
|
*/class iC{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,n)=>{this.resolve=e,this.reject=n})}wrapCallback(e){return(n,r)=>{n?this.reject(n):this.resolve(r),typeof e=="function"&&(this.promise.catch(()=>{}),e.length===1?e(n):e(n,r))}}}/**
|
||
|
* @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 pt(){return typeof navigator!="undefined"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function sC(){return typeof window!="undefined"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(pt())}function oC(){const t=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof t=="object"&&t.id!==void 0}function aC(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function lC(){const t=pt();return t.indexOf("MSIE ")>=0||t.indexOf("Trident/")>=0}/**
|
||
|
* @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 cC="FirebaseError";class Vi extends Error{constructor(e,n,r){super(n);this.code=e,this.customData=r,this.name=cC,Object.setPrototypeOf(this,Vi.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,qs.prototype.create)}}class qs{constructor(e,n,r){this.service=e,this.serviceName=n,this.errors=r}create(e,...n){const r=n[0]||{},i=`${this.service}/${e}`,s=this.errors[e],o=s?uC(s,r):"Error",l=`${this.serviceName}: ${o} (${i}).`;return new Vi(i,l,r)}}function uC(t,e){return t.replace(dC,(n,r)=>{const i=e[r];return i!=null?String(i):`<${r}?>`})}const dC=/\{\$([^}]+)}/g;function fC(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}function Yo(t,e){if(t===e)return!0;const n=Object.keys(t),r=Object.keys(e);for(const i of n){if(!r.includes(i))return!1;const s=t[i],o=e[i];if(If(s)&&If(o)){if(!Yo(s,o))return!1}else if(s!==o)return!1}for(const i of r)if(!n.includes(i))return!1;return!0}function If(t){return t!==null&&typeof t=="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 Ys(t){const e=[];for(const[n,r]of Object.entries(t))Array.isArray(r)?r.forEach(i=>{e.push(encodeURIComponent(n)+"="+encodeURIComponent(i))}):e.push(encodeURIComponent(n)+"="+encodeURIComponent(r));return e.length?"&"+e.join("&"):""}function ds(t){const e={};return t.replace(/^\?/,"").split("&").forEach(r=>{if(r){const[i,s]=r.split("=");e[decodeURIComponent(i)]=decodeURIComponent(s)}}),e}function fs(t){const e=t.indexOf("?");if(!e)return"";const n=t.indexOf("#",e);return t.substring(e,n>0?n:void 0)}function hC(t,e){const n=new pC(t,e);return n.subscribe.bind(n)}class pC{constructor(e,n){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=n,this.task.then(()=>{e(this)}).catch(r=>{this.error(r)})}next(e){this.forEachObserver(n=>{n.next(e)})}error(e){this.forEachObserver(n=>{n.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,n,r){let i;if(e===void 0&&n===void 0&&r===void 0)throw new Error("Missing Observer.");mC(e,["next","error","complete"])?i=e:i={next:e,error:n,complete:r},i.next===void 0&&(i.next=ml),i.error===void 0&&(i.error=ml),i.complete===void 0&&(i.complete=ml);const s=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?i.error(this.finalError):i.complete()}catch{}}),this.observers.push(i),s}unsubscribeOne(e){this.observers===void 0||this.observers[e]===void 0||(delete this.observers[e],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let n=0;n<this.observers.length;n++)this.sendOne(n,e)}sendOne(e,n){this.task.then(()=>{if(this.observers!==void 0&&this.observers[e]!==void 0)try{n(this.observers[e])}catch(r){typeof console!="undefined"&&console.error&&console.error(r)}})}close(e){this.finalized||(this.finalized=!0,e!==void 0&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function mC(t,e){if(typeof t!="object"||t===null)return!1;for(const n of e)if(n in t&&typeof t[n]=="function")return!0;return!1}function ml(){}/**
|
||
|
* @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 Yr(t){return t&&t._delegate?t._delegate:t}class Bs{constructor(e,n,r){this.name=e,this.instanceFactory=n,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}/**
|
||
|
* @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 vr="[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 gC{constructor(e,n){this.name=e,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const n=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(n)){const r=new iC;if(this.instancesDeferred.set(n,r),this.isInitialized(n)||this.shouldAutoInitialize())try{const i=this.getOrInitializeService({instanceIdentifier:n});i&&r.resolve(i)}catch{}}return this.instancesDeferred.get(n).promise}getImmediate(e){var n;const r=this.normalizeInstanceIdentifier(e==null?void 0:e.identifier),i=(n=e==null?void 0:e.optional)!==null&&n!==void 0?n:!1;if(this.isInitialized(r)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:r})}catch(s){if(i)return null;throw s}else{if(i)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,!!this.shouldAutoInitialize()){if(yC(e))try{this.getOrInitializeService({instanceIdentifier:vr})}catch{}for(const[n,r]of this.instancesDeferred.entries()){const i=this.normalizeInstanceIdentifier(n);try{const s=this.getOrInitializeService({instanceIdentifier:i});r.resolve(s)}catch{}}}}clearInstance(e=vr){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter(n=>"INTERNAL"in n).map(n=>n.INTERNAL.delete()),...e.filter(n=>"_delete"in n).map(n=>n._delete())])}isComponentSet(){return this.component!=null}isInitialized(e=vr){return this.instances.has(e)}getOptions(e=vr){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:n={}}=e,r=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const i=this.getOrInitializeService({instanceIdentifier:r,options:n});for(const[s,o]of this.instancesDeferred.entries()){const l=this.normalizeInstanceIdentifier(s);r===l&&o.resolve(i)}return i}onInit(e,n){var r;const i=this.normalizeInstanceIdentifier(n),s=(r=this.onInitCallbacks.get(i))!==null&&r!==void 0?r:new Set;s.add(e),this.onInitCallbacks.set(i,s);const o=this.instances.get(i);return o&&e(o,i),()=>{s.delete(e)}}invokeOnInitCallbacks(e,n){const r=this.onInitCallbacks.get(n);if(!!r)for(const i of r)try{i(e,n)}catch{}}getOrInitializeService({instanceIdentifier:e,options:n={}}){let r=this.instances.get(e);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:vC(e),options:n}),this.instances.set(e,r),this.instancesOptions.set(e,n),this.invokeOnInitCallbacks(r,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,r)}catch{}return r||null}normalizeInstanceIdentifier(e=vr){return this.component?this.component.multipleInstances?e:vr:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function vC(t){return t===vr?void 0:t}function yC(t){return t.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 _C{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const n=this.getProvider(e.name);if(n.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);n.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const n=new gC(e,this);return this.providers.set(e,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 Ge;(function(t){t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT"})(Ge||(Ge={}));const bC={debug:Ge.DEBUG,verbose:Ge.VERBOSE,info:Ge.INFO,warn:Ge.WARN,error:Ge.ERROR,silent:Ge.SILENT},wC=Ge.INFO,EC={[Ge.DEBUG]:"log",[Ge.VERBOSE]:"log",[Ge.INFO]:"info",[Ge.WARN]:"warn",[Ge.ERROR]:"error"},TC=(t,e,...n)=>{if(e<t.logLevel)return;const r=new Date().toISOString(),i=EC[e];if(i)console[i](`[${r}] ${t.name}:`,...n);else throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)};class Hm{constructor(e){this.name=e,this._logLevel=wC,this._logHandler=TC,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in Ge))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?bC[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if(typeof e!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,Ge.DEBUG,...e),this._logHandler(this,Ge.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,Ge.VERBOSE,...e),this._logHandler(this,Ge.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,Ge.INFO,...e),this._logHandler(this,Ge.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,Ge.WARN,...e),this._logHandler(this,Ge.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,Ge.ERROR,...e),this._logHandler(this,Ge.ERROR,...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.
|
||
|
*/class CC{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(n=>{if(SC(n)){const r=n.getImmediate();return`${r.library}/${r.version}`}else return null}).filter(n=>n).join(" ")}}function SC(t){const e=t.getComponent();return(e==null?void 0:e.type)==="VERSION"}const mc="@firebase/app",kf="0.7.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 du=new Hm("@firebase/app"),AC="@firebase/app-compat",OC="@firebase/analytics-compat",IC="@firebase/analytics",kC="@firebase/app-check-compat",DC="@firebase/app-check",PC="@firebase/auth",NC="@firebase/auth-compat",xC="@firebase/database",MC="@firebase/database-compat",RC="@firebase/functions",LC="@firebase/functions-compat",$C="@firebase/installations",BC="@firebase/installations-compat",UC="@firebase/messaging",HC="@firebase/messaging-compat",FC="@firebase/performance",VC="@firebase/performance-compat",jC="@firebase/remote-config",WC="@firebase/remote-config-compat",qC="@firebase/storage",YC="@firebase/storage-compat",KC="@firebase/firestore",zC="@firebase/firestore-compat",GC="firebase",XC="9.6.3";/**
|
||
|
* @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 Fm="[DEFAULT]",JC={[mc]:"fire-core",[AC]:"fire-core-compat",[IC]:"fire-analytics",[OC]:"fire-analytics-compat",[DC]:"fire-app-check",[kC]:"fire-app-check-compat",[PC]:"fire-auth",[NC]:"fire-auth-compat",[xC]:"fire-rtdb",[MC]:"fire-rtdb-compat",[RC]:"fire-fn",[LC]:"fire-fn-compat",[$C]:"fire-iid",[BC]:"fire-iid-compat",[UC]:"fire-fcm",[HC]:"fire-fcm-compat",[FC]:"fire-perf",[VC]:"fire-perf-compat",[jC]:"fire-rc",[WC]:"fire-rc-compat",[qC]:"fire-gcs",[YC]:"fire-gcs-compat",[KC]:"fire-fst",[zC]:"fire-fst-compat","fire-js":"fire-js",[GC]:"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 Ko=new Map,gc=new Map;function QC(t,e){try{t.container.addComponent(e)}catch(n){du.debug(`Component ${e.name} failed to register with FirebaseApp ${t.name}`,n)}}function zo(t){const e=t.name;if(gc.has(e))return du.debug(`There were multiple attempts to register component ${e}.`),!1;gc.set(e,t);for(const n of Ko.values())QC(n,t);return!0}function Vm(t,e){return t.container.getProvider(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.
|
||
|
*/const ZC={["no-app"]:"No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()",["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",["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."},Go=new qs("app","Firebase",ZC);/**
|
||
|
* @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 eS{constructor(e,n,r){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},n),this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new Bs("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw Go.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 Aa=XC;function Ix(t,e={}){typeof e!="object"&&(e={name:e});const n=Object.assign({name:Fm,automaticDataCollectionEnabled:!1},e),r=n.name;if(typeof r!="string"||!r)throw Go.create("bad-app-name",{appName:String(r)});const i=Ko.get(r);if(i){if(Yo(t,i.options)&&Yo(n,i.config))return i;throw Go.create("duplicate-app",{appName:r})}const s=new _C(r);for(const l of gc.values())s.addComponent(l);const o=new eS(t,n,s);return Ko.set(r,o),o}function tS(t=Fm){const e=Ko.get(t);if(!e)throw Go.create("no-app",{appName:t});return e}function vi(t,e,n){var r;let i=(r=JC[t])!==null&&r!==void 0?r:t;n&&(i+=`-${n}`);const s=i.match(/\s|\//),o=e.match(/\s|\//);if(s||o){const l=[`Unable to register library "${i}" with version "${e}":`];s&&l.push(`library name "${i}" contains illegal characters (whitespace or "/")`),s&&o&&l.push("and"),o&&l.push(`version name "${e}" contains illegal characters (whitespace or "/")`),du.warn(l.join(" "));return}zo(new Bs(`${i}-version`,()=>({library:i,version:e}),"VERSION"))}/**
|
||
|
* @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 nS(t){zo(new Bs("platform-logger",e=>new CC(e),"PRIVATE")),vi(mc,kf,t),vi(mc,kf,"esm2017"),vi("fire-js","")}nS("");/*! *****************************************************************************
|
||
|
Copyright (c) Microsoft Corporation.
|
||
|
|
||
|
Permission to use, copy, modify, and/or distribute this software for any
|
||
|
purpose with or without fee is hereby granted.
|
||
|
|
||
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
|
PERFORMANCE OF THIS SOFTWARE.
|
||
|
***************************************************************************** */function fu(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function jm(){return{["dependent-sdk-initialized-before-auth"]:"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}}const rS=jm,Wm=new qs("auth","Firebase",jm());/**
|
||
|
* @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 Df=new Hm("@firebase/auth");function ko(t,...e){Df.logLevel<=Ge.ERROR&&Df.error(`Auth (${Aa}): ${t}`,...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 zt(t,...e){throw hu(t,...e)}function fn(t,...e){return hu(t,...e)}function iS(t,e,n){const r=Object.assign(Object.assign({},rS()),{[e]:n});return new qs("auth","Firebase",r).create(e,{appName:t.name})}function hu(t,...e){if(typeof t!="string"){const n=e[0],r=[...e.slice(1)];return r[0]&&(r[0].appName=t.name),t._errorFactory.create(n,...r)}return Wm.create(t,...e)}function Ee(t,e,...n){if(!t)throw hu(e,...n)}function Tn(t){const e="INTERNAL ASSERTION FAILED: "+t;throw ko(e),new Error(e)}function In(t,e){t||Tn(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.
|
||
|
*/const Pf=new Map;function Cn(t){In(t instanceof Function,"Expected a class definition");let e=Pf.get(t);return e?(In(e instanceof t,"Instance stored in cache mismatched with class"),e):(e=new t,Pf.set(t,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.
|
||
|
*/function sS(t,e){const n=Vm(t,"auth");if(n.isInitialized()){const i=n.getImmediate(),s=n.getOptions();if(Yo(s,e!=null?e:{}))return i;zt(i,"already-initialized")}return n.initialize({options:e})}function oS(t,e){const n=(e==null?void 0:e.persistence)||[],r=(Array.isArray(n)?n:[n]).map(Cn);e!=null&&e.errorMap&&t._updateErrorMap(e.errorMap),t._initializeWithPersistence(r,e==null?void 0:e.popupRedirectResolver)}/**
|
||
|
* @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 vc(){var t;return typeof self!="undefined"&&((t=self.location)===null||t===void 0?void 0:t.href)||""}function aS(){return Nf()==="http:"||Nf()==="https:"}function Nf(){var t;return typeof self!="undefined"&&((t=self.location)===null||t===void 0?void 0:t.protocol)||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.
|
||
|
*/function lS(){return typeof navigator!="undefined"&&navigator&&"onLine"in navigator&&typeof navigator.onLine=="boolean"&&(aS()||oC()||"connection"in navigator)?navigator.onLine:!0}function cS(){if(typeof navigator=="undefined")return null;const t=navigator;return t.languages&&t.languages[0]||t.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 Ks{constructor(e,n){this.shortDelay=e,this.longDelay=n,In(n>e,"Short delay should be less than long delay!"),this.isMobile=sC()||aC()}get(){return lS()?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 pu(t,e){In(t.emulator,"Emulator should always be set here");const{url:n}=t.emulator;return e?`${n}${e.startsWith("/")?e.slice(1):e}`: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 qm{static initialize(e,n,r){this.fetchImpl=e,n&&(this.headersImpl=n),r&&(this.responseImpl=r)}static fetch(){if(this.fetchImpl)return this.fetchImpl;if(typeof self!="undefined"&&"fetch"in self)return self.fetch;Tn("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!="undefined"&&"Headers"in self)return self.Headers;Tn("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!="undefined"&&"Response"in self)return self.Response;Tn("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 uS={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:"internal-error",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",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"};/**
|
||
|
* @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 dS=new Ks(3e4,6e4);function Oa(t,e){return t.tenantId&&!e.tenantId?Object.assign(Object.assign({},e),{tenantId:t.tenantId}):e}async function zs(t,e,n,r,i={}){return Ym(t,i,async()=>{let s={},o={};r&&(e==="GET"?o=r:s={body:JSON.stringify(r)});const l=Ys(Object.assign({key:t.config.apiKey},o)).slice(1),u=await t._getAdditionalHeaders();return u["Content-Type"]="application/json",t.languageCode&&(u["X-Firebase-Locale"]=t.languageCode),qm.fetch()(Km(t,t.config.apiHost,n,l),Object.assign({method:e,headers:u,referrerPolicy:"no-referrer"},s))})}async function Ym(t,e,n){t._canInitEmulator=!1;const r=Object.assign(Object.assign({},uS),e);try{const i=new fS(t),s=await Promise.race([n(),i.promise]);i.clearNetworkTimeout();const o=await s.json();if("needConfirmation"in o)throw gl(t,"account-exists-with-different-credential",o);if(s.ok&&!("errorMessage"in o))return o;{const l=s.ok?o.errorMessage:o.error.message,[u,d]=l.split(" : ");if(u==="FEDERATED_USER_ID_ALREADY_LINKED")throw gl(t,"credential-already-in-use",o);if(u==="EMAIL_EXISTS")throw gl(t,"email-already-in-use",o);const f=r[u]||u.toLowerCase().replace(/[_\s]+/g,"-");if(d)throw iS(t,f,d);zt(t,f)}}catch(i){if(i instanceof Vi)throw i;zt(t,"network-request-failed")}}async function Ia(t,e,n,r,i={}){const s=await zs(t,e,n,r,i);return"mfaPendingCredential"in s&&zt(t,"multi-factor-auth-required",{_serverResponse:s}),s}function Km(t,e,n,r){const i=`${e}${n}?${r}`;return t.config.emulator?pu(t.config,i):`${t.config.apiScheme}://${i}`}class fS{constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((n,r)=>{this.timer=setTimeout(()=>r(fn(this.auth,"timeout")),dS.get())})}clearNetworkTimeout(){clearTimeout(this.timer)}}function gl(t,e,n){const r={appName:t.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);const i=fn(t,e,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 hS(t,e){return zs(t,"POST","/v1/accounts:delete",e)}async function pS(t,e){return zs(t,"POST","/v1/accounts:lookup",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 ws(t){if(!!t)try{const e=new Date(Number(t));if(!isNaN(e.getTime()))return e.toUTCString()}catch{}}async function mS(t,e=!1){const n=Yr(t),r=await n.getIdToken(e),i=mu(r);Ee(i&&i.exp&&i.auth_time&&i.iat,n.auth,"internal-error");const s=typeof i.firebase=="object"?i.firebase:void 0,o=s==null?void 0:s.sign_in_provider;return{claims:i,token:r,authTime:ws(vl(i.auth_time)),issuedAtTime:ws(vl(i.iat)),expirationTime:ws(vl(i.exp)),signInProvider:o||null,signInSecondFactor:(s==null?void 0:s.sign_in_second_factor)||null}}function vl(t){return Number(t)*1e3}function mu(t){const[e,n,r]=t.split(".");if(e===void 0||n===void 0||r===void 0)return ko("JWT malformed, contained fewer than 3 sections"),null;try{const i=rC(n);return i?JSON.parse(i):(ko("Failed to decode base64 JWT payload"),null)}catch(i){return ko("Caught error parsing JWT payload as JSON",i),null}}function gS(t){const e=mu(t);return Ee(e,"internal-error"),Ee(typeof e.exp!="undefined","internal-error"),Ee(typeof e.iat!="undefined","internal-error"),Number(e.exp)-Number(e.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 Us(t,e,n=!1){if(n)return e;try{return await e}catch(r){throw r instanceof Vi&&vS(r)&&t.auth.currentUser===t&&await t.auth.signOut(),r}}function vS({code:t}){return t==="auth/user-disabled"||t==="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 yS{constructor(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){!this.isRunning||(this.isRunning=!1,this.timerId!==null&&clearTimeout(this.timerId))}getInterval(e){var n;if(e){const r=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),r}else{this.errorBackoff=3e4;const i=((n=this.user.stsTokenManager.expirationTime)!==null&&n!==void 0?n:0)-Date.now()-3e5;return Math.max(0,i)}}schedule(e=!1){if(!this.isRunning)return;const n=this.getInterval(e);this.timerId=setTimeout(async()=>{await this.iteration()},n)}async iteration(){try{await this.user.getIdToken(!0)}catch(e){e.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 zm{constructor(e,n){this.createdAt=e,this.lastLoginAt=n,this._initializeTime()}_initializeTime(){this.lastSignInTime=ws(this.lastLoginAt),this.creationTime=ws(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.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 Xo(t){var e;const n=t.auth,r=await t.getIdToken(),i=await Us(t,pS(n,{idToken:r}));Ee(i==null?void 0:i.users.length,n,"internal-error");const s=i.users[0];t._notifyReloadListener(s);const o=!((e=s.providerUserInfo)===null||e===void 0)&&e.length?wS(s.providerUserInfo):[],l=bS(t.providerData,o),u=t.isAnonymous,d=!(t.email&&s.passwordHash)&&!(l!=null&&l.length),f=u?d:!1,p={uid:s.localId,displayName:s.displayName||null,photoURL:s.photoUrl||null,email:s.email||null,emailVerified:s.emailVerified||!1,phoneNumber:s.phoneNumber||null,tenantId:s.tenantId||null,providerData:l,metadata:new zm(s.createdAt,s.lastLoginAt),isAnonymous:f};Object.assign(t,p)}async function _S(t){const e=Yr(t);await Xo(e),await e.auth._persistUserIfCurrent(e),e.auth._notifyListenersIfCurrent(e)}function bS(t,e){return[...t.filter(r=>!e.some(i=>i.providerId===r.providerId)),...e]}function wS(t){return t.map(e=>{var{providerId:n}=e,r=fu(e,["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 ES(t,e){const n=await Ym(t,{},async()=>{const r=Ys({grant_type:"refresh_token",refresh_token:e}).slice(1),{tokenApiHost:i,apiKey:s}=t.config,o=Km(t,i,"/v1/token",`key=${s}`),l=await t._getAdditionalHeaders();return l["Content-Type"]="application/x-www-form-urlencoded",qm.fetch()(o,{method:"POST",headers:l,body:r})});return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}}/**
|
||
|
* @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 Hs{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){Ee(e.idToken,"internal-error"),Ee(typeof e.idToken!="undefined","internal-error"),Ee(typeof e.refreshToken!="undefined","internal-error");const n="expiresIn"in e&&typeof e.expiresIn!="undefined"?Number(e.expiresIn):gS(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,n)}async getToken(e,n=!1){return Ee(!this.accessToken||this.refreshToken,e,"user-token-expired"),!n&&this.accessToken&&!this.isExpired?this.accessToken:this.refreshToken?(await this.refresh(e,this.refreshToken),this.accessToken):null}clearRefreshToken(){this.refreshToken=null}async refresh(e,n){const{accessToken:r,refreshToken:i,expiresIn:s}=await ES(e,n);this.updateTokensAndExpiration(r,i,Number(s))}updateTokensAndExpiration(e,n,r){this.refreshToken=n||null,this.accessToken=e||null,this.expirationTime=Date.now()+r*1e3}static fromJSON(e,n){const{refreshToken:r,accessToken:i,expirationTime:s}=n,o=new Hs;return r&&(Ee(typeof r=="string","internal-error",{appName:e}),o.refreshToken=r),i&&(Ee(typeof i=="string","internal-error",{appName:e}),o.accessToken=i),s&&(Ee(typeof s=="number","internal-error",{appName:e}),o.expirationTime=s),o}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new Hs,this.toJSON())}_performRefresh(){return Tn("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 Ln(t,e){Ee(typeof t=="string"||typeof t=="undefined","internal-error",{appName:e})}class Pr{constructor(e){var{uid:n,auth:r,stsTokenManager:i}=e,s=fu(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.emailVerified=!1,this.isAnonymous=!1,this.tenantId=null,this.providerData=[],this.proactiveRefresh=new yS(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=n,this.auth=r,this.stsTokenManager=i,this.accessToken=i.accessToken,this.displayName=s.displayName||null,this.email=s.email||null,this.emailVerified=s.emailVerified||!1,this.phoneNumber=s.phoneNumber||null,this.photoURL=s.photoURL||null,this.isAnonymous=s.isAnonymous||!1,this.tenantId=s.tenantId||null,this.metadata=new zm(s.createdAt||void 0,s.lastLoginAt||void 0)}async getIdToken(e){const n=await Us(this,this.stsTokenManager.getToken(this.auth,e));return Ee(n,this.auth,"internal-error"),this.accessToken!==n&&(this.accessToken=n,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),n}getIdTokenResult(e){return mS(this,e)}reload(){return _S(this)}_assign(e){this!==e&&(Ee(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map(n=>Object.assign({},n)),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){return new Pr(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}))}_onReload(e){Ee(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(e,n=!1){let r=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),r=!0),n&&await Xo(this),await this.auth._persistUserIfCurrent(this),r&&this.auth._notifyListenersIfCurrent(this)}async delete(){const e=await this.getIdToken();return await Us(this,hS(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return Object.assign(Object.assign({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(e=>Object.assign({},e)),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(e,n){var r,i,s,o,l,u,d,f;const p=(r=n.displayName)!==null&&r!==void 0?r:void 0,v=(i=n.email)!==null&&i!==void 0?i:void 0,m=(s=n.phoneNumber)!==null&&s!==void 0?s:void 0,S=(o=n.photoURL)!==null&&o!==void 0?o:void 0,T=(l=n.tenantId)!==null&&l!==void 0?l:void 0,A=(u=n._redirectEventId)!==null&&u!==void 0?u:void 0,O=(d=n.createdAt)!==null&&d!==void 0?d:void 0,k=(f=n.lastLoginAt)!==null&&f!==void 0?f:void 0,{uid:C,emailVerified:D,isAnonymous:B,providerData:j,stsTokenManager:b}=n;Ee(C&&b,e,"internal-error");const x=Hs.fromJSON(this.name,b);Ee(typeof C=="string",e,"internal-error"),Ln(p,e.name),Ln(v,e.name),Ee(typeof D=="boolean",e,"internal-error"),Ee(typeof B=="boolean",e,"internal-error"),Ln(m,e.name),Ln(S,e.name),Ln(T,e.name),Ln(A,e.name),Ln(O,e.name),Ln(k,e.name);const R=new Pr({uid:C,auth:e,email:v,emailVerified:D,displayName:p,isAnonymous:B,photoURL:S,phoneNumber:m,tenantId:T,stsTokenManager:x,createdAt:O,lastLoginAt:k});return j&&Array.isArray(j)&&(R.providerData=j.map(H=>Object.assign({},H))),A&&(R._redirectEventId=A),R}static async _fromIdTokenResponse(e,n,r=!1){con
|
||
|
* @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 Gm{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(e,n){this.storage[e]=n}async _get(e){const n=this.storage[e];return n===void 0?null:n}async _remove(e){delete this.storage[e]}_addListener(e,n){}_removeListener(e,n){}}Gm.type="NONE";const xf=Gm;/**
|
||
|
* @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 Do(t,e,n){return`firebase:${t}:${e}:${n}`}class yi{constructor(e,n,r){this.persistence=e,this.auth=n,this.userKey=r;const{config:i,name:s}=this.auth;this.fullUserKey=Do(this.userKey,i.apiKey,s),this.fullPersistenceKey=Do("persistence",i.apiKey,s),this.boundEventHandler=n._onStorageEvent.bind(n),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}async getCurrentUser(){const e=await this.persistence._get(this.fullUserKey);return e?Pr._fromJSON(this.auth,e):null}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(e){if(this.persistence===e)return;const n=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=e,n)return this.setCurrentUser(n)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(e,n,r="authUser"){if(!n.length)return new yi(Cn(xf),e,r);const i=(await Promise.all(n.map(async d=>{if(await d._isAvailable())return d}))).filter(d=>d);let s=i[0]||Cn(xf);const o=Do(r,e.config.apiKey,e.name);let l=null;for(const d of n)try{const f=await d._get(o);if(f){const p=Pr._fromJSON(e,f);d!==s&&(l=p),s=d;break}}catch{}const u=i.filter(d=>d._shouldAllowMigration);return!s._shouldAllowMigration||!u.length?new yi(s,e,r):(s=u[0],l&&await s._set(o,l.toJSON()),await Promise.all(n.map(async d=>{if(d!==s)try{await d._remove(o)}catch{}})),new yi(s,e,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 Mf(t){const e=t.toLowerCase();if(e.includes("opera/")||e.includes("opr/")||e.includes("opios/"))return"Opera";if(Qm(e))return"IEMobile";if(e.includes("msie")||e.includes("trident/"))return"IE";if(e.includes("edge/"))return"Edge";if(Xm(e))return"Firefox";if(e.includes("silk/"))return"Silk";if(eg(e))return"Blackberry";if(tg(e))return"Webos";if(gu(e))return"Safari";if((e.includes("chrome/")||Jm(e))&&!e.includes("edge/"))return"Chrome";if(Zm(e))return"Android";{const n=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,r=t.match(n);if((r==null?void 0:r.length)===2)return r[1]}return"Other"}function Xm(t=pt()){return/firefox\//i.test(t)}function gu(t=pt()){const e=t.toLowerCase();return e.includes("safari/")&&!e.includes("chrome/")&&!e.includes("crios/")&&!e.includes("android")}function Jm(t=pt()){return/crios\//i.test(t)}function Qm(t=pt()){return/iemobile/i.test(t)}function Zm(t=pt()){return/android/i.test(t)}function eg(t=pt()){return/blackberry/i.test(t)}function tg(t=pt()){return/webos/i.test(t)}function ka(t=pt()){return/iphone|ipad|ipod/i.test(t)}function TS(t=pt()){var e;return ka(t)&&!!(!((e=window.navigator)===null||e===void 0)&&e.standalone)}function CS(){return lC()&&document.documentMode===10}function ng(t=pt()){return ka(t)||Zm(t)||tg(t)||eg(t)||/windows phone/i.test(t)||Qm(t)}function SS(){try{return!!(window&&window!==window.top)}catch{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.
|
||
|
*/function rg(t,e=[]){let n;switch(t){case"Browser":n=Mf(pt());break;case"Worker":n=`${Mf(pt())}-${t}`;break;default:n=t}const r=e.length?e.join(","):"FirebaseCore-web";return`${n}/JsCore/${Aa}/${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.
|
||
|
*/class AS{constructor(e,n){this.app=e,this.config=n,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new Rf(this),this.idTokenSubscription=new Rf(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=Wm,this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=n.sdkClientVersion}_initializeWithPersistence(e,n){return n&&(this._popupRedirectResolver=Cn(n)),this._initializationPromise=this.queue(async()=>{var r,i;if(!this._deleted&&(this.persistenceManager=await yi.create(this,e),!this._deleted)){if(!((r=this._popupRedirectResolver)===null||r===void 0)&&r._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch{}await this.initializeCurrentUser(n),this.lastNotifiedUid=((i=this.currentUser)===null||i===void 0?void 0:i.uid)||null,!this._deleted&&(this._isInitialized=!0)}}),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;const e=await this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!e)){if(this.currentUser&&e&&this.currentUser.uid===e.uid){this._currentUser._assign(e),await this.currentUser.getIdToken();return}await this._updateCurrentUser(e)}}async initializeCurrentUser(e){var n;let r=await this.assertedPersistence.getCurrentUser();if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const i=(n=this.redirectUser)===null||n===void 0?void 0:n._redirectEventId,s=r==null?void 0:r._redirectEventId,o=await this.tryRedirectSignIn(e);(!i||i===s)&&(o==null?void 0:o.user)&&(r=o.user)}return r?r._redirectEventId?(Ee(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===r._redirectEventId?this.directlySetCurrentUser(r):this.reloadAndSetCurrentUserOrClear(r)):this.reloadAndSetCurrentUserOrClear(r):this.directlySetCurrentUser(null)}async tryRedirectSignIn(e){let n=null;try{n=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch{await this._setRedirectUser(null)}return n}async reloadAndSetCurrentUserOrClear(e){try{await Xo(e)}catch(n){if(n.code!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=cS()}async _delete(){this._deleted=!0}async updateCurrentUser(e){const n=e?Yr(e):null;return n&&Ee(n.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(n&&n._clone(this))}async _updateCurrentUser(e){if(!this._deleted)return e&&Ee(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),this.queue(async()=>{await this.directlySetCurrentUser(e),this.notifyAuthListeners()})}async signOut(){return(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null)}setPersistence(e){return this.queue(async()=>{await this.assertedPersistence.setPersistence(Cn(e))})}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(e){this._errorFactory=new qs("auth","Firebase",e())}onAuthStateChanged(e,n,r){return this.registerStateListener(this.authStateSubscription,e,n,r)}onIdTokenChanged(e,n,r){return this.registerStateListener(this.idTokenSubscription,e,n,r)}toJSON(){var e;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:(e=this._currentUser)===null||e===void 0?void 0:e.toJSON()}}async _setRedirectUser(e,n){const r=await this.getOrInitRedirectPersistenceManager(n);return e===null?r.removeCurrentUser():r.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){const n=e&&Cn(e)||this._popupRedirectResolver;Ee(n,this,"argument-error"),this.redirectPersistenceManager=await yi.create(this,[Cn(n._redirectPersiste
|
||
|
* @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 yu{constructor(e,n){this.providerId=e,this.signInMethod=n}toJSON(){return Tn("not implemented")}_getIdTokenResponse(e){return Tn("not implemented")}_linkToIdToken(e,n){return Tn("not implemented")}_getReauthenticationResolver(e){return Tn("not implemented")}}async function OS(t,e){return zs(t,"POST","/v1/accounts:update",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.
|
||
|
*/async function IS(t,e){return Ia(t,"POST","/v1/accounts:signInWithPassword",Oa(t,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.
|
||
|
*/async function kS(t,e){return Ia(t,"POST","/v1/accounts:signInWithEmailLink",Oa(t,e))}async function DS(t,e){return Ia(t,"POST","/v1/accounts:signInWithEmailLink",Oa(t,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 Fs extends yu{constructor(e,n,r,i=null){super("password",r);this._email=e,this._password=n,this._tenantId=i}static _fromEmailAndPassword(e,n){return new Fs(e,n,"password")}static _fromEmailAndCode(e,n,r=null){return new Fs(e,n,"emailLink",r)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(e){const n=typeof e=="string"?JSON.parse(e):e;if((n==null?void 0:n.email)&&(n==null?void 0:n.password)){if(n.signInMethod==="password")return this._fromEmailAndPassword(n.email,n.password);if(n.signInMethod==="emailLink")return this._fromEmailAndCode(n.email,n.password,n.tenantId)}return null}async _getIdTokenResponse(e){switch(this.signInMethod){case"password":return IS(e,{returnSecureToken:!0,email:this._email,password:this._password});case"emailLink":return kS(e,{email:this._email,oobCode:this._password});default:zt(e,"internal-error")}}async _linkToIdToken(e,n){switch(this.signInMethod){case"password":return OS(e,{idToken:n,returnSecureToken:!0,email:this._email,password:this._password});case"emailLink":return DS(e,{idToken:n,email:this._email,oobCode:this._password});default:zt(e,"internal-error")}}_getReauthenticationResolver(e){return this._getIdTokenResponse(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.
|
||
|
*/async function _i(t,e){return Ia(t,"POST","/v1/accounts:signInWithIdp",Oa(t,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.
|
||
|
*/const PS="http://localhost";class $r extends yu{constructor(){super(...arguments);this.pendingToken=null}static _fromParams(e){const n=new $r(e.providerId,e.signInMethod);return e.idToken||e.accessToken?(e.idToken&&(n.idToken=e.idToken),e.accessToken&&(n.accessToken=e.accessToken),e.nonce&&!e.pendingToken&&(n.nonce=e.nonce),e.pendingToken&&(n.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(n.accessToken=e.oauthToken,n.secret=e.oauthTokenSecret):zt("argument-error"),n}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,nonce:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){const n=typeof e=="string"?JSON.parse(e):e,{providerId:r,signInMethod:i}=n,s=fu(n,["providerId","signInMethod"]);if(!r||!i)return null;const o=new $r(r,i);return o.idToken=s.idToken||void 0,o.accessToken=s.accessToken||void 0,o.secret=s.secret,o.nonce=s.nonce,o.pendingToken=s.pendingToken||null,o}_getIdTokenResponse(e){const n=this.buildRequest();return _i(e,n)}_linkToIdToken(e,n){const r=this.buildRequest();return r.idToken=n,_i(e,r)}_getReauthenticationResolver(e){const n=this.buildRequest();return n.autoCreate=!1,_i(e,n)}buildRequest(){const e={requestUri:PS,returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{const n={};this.idToken&&(n.id_token=this.idToken),this.accessToken&&(n.access_token=this.accessToken),this.secret&&(n.oauth_token_secret=this.secret),n.providerId=this.providerId,this.nonce&&!this.pendingToken&&(n.nonce=this.nonce),e.postBody=Ys(n)}return 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 NS(t){switch(t){case"recoverEmail":return"RECOVER_EMAIL";case"resetPassword":return"PASSWORD_RESET";case"signIn":return"EMAIL_SIGNIN";case"verifyEmail":return"VERIFY_EMAIL";case"verifyAndChangeEmail":return"VERIFY_AND_CHANGE_EMAIL";case"revertSecondFactorAddition":return"REVERT_SECOND_FACTOR_ADDITION";default:return null}}function xS(t){const e=ds(fs(t)).link,n=e?ds(fs(e)).deep_link_id:null,r=ds(fs(t)).deep_link_id;return(r?ds(fs(r)).link:null)||r||n||e||t}class _u{constructor(e){var n,r,i,s,o,l;const u=ds(fs(e)),d=(n=u.apiKey)!==null&&n!==void 0?n:null,f=(r=u.oobCode)!==null&&r!==void 0?r:null,p=NS((i=u.mode)!==null&&i!==void 0?i:null);Ee(d&&f&&p,"argument-error"),this.apiKey=d,this.operation=p,this.code=f,this.continueUrl=(s=u.continueUrl)!==null&&s!==void 0?s:null,this.languageCode=(o=u.languageCode)!==null&&o!==void 0?o:null,this.tenantId=(l=u.tenantId)!==null&&l!==void 0?l:null}static parseLink(e){const n=xS(e);try{return new _u(n)}catch{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.
|
||
|
*/class ji{constructor(){this.providerId=ji.PROVIDER_ID}static credential(e,n){return Fs._fromEmailAndPassword(e,n)}static credentialWithLink(e,n){const r=_u.parseLink(n);return Ee(r,"argument-error"),Fs._fromEmailAndCode(e,r.code,r.tenantId)}}ji.PROVIDER_ID="password";ji.EMAIL_PASSWORD_SIGN_IN_METHOD="password";ji.EMAIL_LINK_SIGN_IN_METHOD="emailLink";/**
|
||
|
* @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 ig{constructor(e){this.providerId=e,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(e){this.defaultLanguageCode=e}setCustomParameters(e){return this.customParameters=e,this}getCustomParameters(){return this.customParameters}}/**
|
||
|
* @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 Gs extends ig{constructor(){super(...arguments);this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),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 Yn extends Gs{constructor(){super("facebook.com")}static credential(e){return $r._fromParams({providerId:Yn.PROVIDER_ID,signInMethod:Yn.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return Yn.credentialFromTaggedObject(e)}static credentialFromError(e){return Yn.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return Yn.credential(e.oauthAccessToken)}catch{return null}}}Yn.FACEBOOK_SIGN_IN_METHOD="facebook.com";Yn.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 Kn extends Gs{constructor(){super("google.com");this.addScope("profile")}static credential(e,n){return $r._fromParams({providerId:Kn.PROVIDER_ID,signInMethod:Kn.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:n})}static credentialFromResult(e){return Kn.credentialFromTaggedObject(e)}static credentialFromError(e){return Kn.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthIdToken:n,oauthAccessToken:r}=e;if(!n&&!r)return null;try{return Kn.credential(n,r)}catch{return null}}}Kn.GOOGLE_SIGN_IN_METHOD="google.com";Kn.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 zn extends Gs{constructor(){super("github.com")}static credential(e){return $r._fromParams({providerId:zn.PROVIDER_ID,signInMethod:zn.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return zn.credentialFromTaggedObject(e)}static credentialFromError(e){return zn.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return zn.credential(e.oauthAccessToken)}catch{return null}}}zn.GITHUB_SIGN_IN_METHOD="github.com";zn.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 Gn extends Gs{constructor(){super("twitter.com")}static credential(e,n){return $r._fromParams({providerId:Gn.PROVIDER_ID,signInMethod:Gn.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:n})}static credentialFromResult(e){return Gn.credentialFromTaggedObject(e)}static credentialFromError(e){return Gn.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthAccessToken:n,oauthTokenSecret:r}=e;if(!n||!r)return null;try{return Gn.credential(n,r)}catch{return null}}}Gn.TWITTER_SIGN_IN_METHOD="twitter.com";Gn.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 ki{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,n,r,i=!1){const s=await Pr._fromIdTokenResponse(e,r,i),o=Lf(r);return new ki({user:s,providerId:o,_tokenResponse:r,operationType:n})}static async _forOperation(e,n,r){await e._updateTokensIfNecessary(r,!0);const i=Lf(r);return new ki({user:e,providerId:i,_tokenResponse:r,operationType:n})}}function Lf(t){return t.providerId?t.providerId:"phoneNumber"in t?"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 Jo extends Vi{constructor(e,n,r,i){var s;super(n.code,n.message);this.operationType=r,this.user=i,Object.setPrototypeOf(this,Jo.prototype),this.customData={appName:e.name,tenantId:(s=e.tenantId)!==null&&s!==void 0?s:void 0,_serverResponse:n.customData._serverResponse,operationType:r}}static _fromErrorAndOperation(e,n,r,i){return new Jo(e,n,r,i)}}function sg(t,e,n,r){return(e==="reauthenticate"?n._getReauthenticationResolver(t):n._getIdTokenResponse(t)).catch(s=>{throw s.code==="auth/multi-factor-auth-required"?Jo._fromErrorAndOperation(t,s,e,r):s})}async function MS(t,e,n=!1){const r=await Us(t,e._linkToIdToken(t.auth,await t.getIdToken()),n);return ki._forOperation(t,"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 RS(t,e,n=!1){const{auth:r}=t,i="reauthenticate";try{const s=await Us(t,sg(r,i,e,t),n);Ee(s.idToken,r,"internal-error");const o=mu(s.idToken);Ee(o,r,"internal-error");const{sub:l}=o;return Ee(t.uid===l,r,"user-mismatch"),ki._forOperation(t,i,s)}catch(s){throw(s==null?void 0:s.code)==="auth/user-not-found"&&zt(r,"user-mismatch"),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 og(t,e,n=!1){const r="signIn",i=await sg(t,r,e),s=await ki._fromIdTokenResponse(t,r,i);return n||await t._updateCurrentUser(s.user),s}async function LS(t,e){return og(vu(t),e)}function kx(t,e,n){return LS(Yr(t),ji.credential(e,n))}function Dx(t,e,n,r){return Yr(t).onAuthStateChanged(e,n,r)}function Px(t){return Yr(t).signOut()}const Qo="__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 ag{constructor(e,n){this.storageRetriever=e,this.type=n}_isAvailable(){try{return this.storage?(this.storage.setItem(Qo,"1"),this.storage.removeItem(Qo),Promise.resolve(!0)):Promise.resolve(!1)}catch{return Promise.resolve(!1)}}_set(e,n){return this.storage.setItem(e,JSON.stringify(n)),Promise.resolve()}_get(e){const n=this.storage.getItem(e);return Promise.resolve(n?JSON.parse(n):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}}/**
|
||
|
* @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 $S(){const t=pt();return gu(t)||ka(t)}const BS=1e3,US=10;class lg extends ag{constructor(){super(()=>window.localStorage,"LOCAL");this.boundEventHandler=(e,n)=>this.onStorageEvent(e,n),this.listeners={},this.localCache={},this.pollTimer=null,this.safariLocalStorageNotSynced=$S()&&SS(),this.fallbackToPolling=ng(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(const n of Object.keys(this.listeners)){const r=this.storage.getItem(n),i=this.localCache[n];r!==i&&e(n,i,r)}}onStorageEvent(e,n=!1){if(!e.key){this.forAllChangedKeys((o,l,u)=>{this.notifyListeners(o,u)});return}const r=e.key;if(n?this.detachListener():this.stopPolling(),this.safariLocalStorageNotSynced){const o=this.storage.getItem(r);if(e.newValue!==o)e.newValue!==null?this.storage.setItem(r,e.newValue):this.storage.removeItem(r);else if(this.localCache[r]===e.newValue&&!n)return}const i=()=>{const o=this.storage.getItem(r);!n&&this.localCache[r]===o||this.notifyListeners(r,o)},s=this.storage.getItem(r);CS()&&s!==e.newValue&&e.newValue!==e.oldValue?setTimeout(i,US):i()}notifyListeners(e,n){this.localCache[e]=n;const r=this.listeners[e];if(r)for(const i of Array.from(r))i(n&&JSON.parse(n))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((e,n,r)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:n,newValue:r}),!0)})},BS)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,n){Object.keys(this.listeners).length===0&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(n)}_removeListener(e,n){this.listeners[e]&&(this.listeners[e].delete(n),this.listeners[e].size===0&&delete this.listeners[e]),Object.keys(this.listeners).length===0&&(this.detachListener(),this.stopPolling())}async _set(e,n){await super._set(e,n),this.localCache[e]=JSON.stringify(n)}async _get(e){const n=await super._get(e);return this.localCache[e]=JSON.stringify(n),n}async _remove(e){await super._remove(e),delete this.localCache[e]}}lg.type="LOCAL";const HS=lg;/**
|
||
|
* @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 cg extends ag{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,n){}_removeListener(e,n){}}cg.type="SESSION";const ug=cg;/**
|
||
|
* @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 FS(t){return Promise.all(t.map(async e=>{try{const n=await e;return{fulfilled:!0,value:n}}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 Da{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){const n=this.receivers.find(i=>i.isListeningto(e));if(n)return n;const r=new Da(e);return this.receivers.push(r),r}isListeningto(e){return this.eventTarget===e}async handleEvent(e){const n=e,{eventId:r,eventType:i,data:s}=n.data,o=this.handlersMap[i];if(!(o!=null&&o.size))return;n.ports[0].postMessage({status:"ack",eventId:r,eventType:i});const l=Array.from(o).map(async d=>d(n.origin,s)),u=await FS(l);n.ports[0].postMessage({status:"done",eventId:r,eventType:i,response:u})}_subscribe(e,n){Object.keys(this.handlersMap).length===0&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(n)}_unsubscribe(e,n){this.handlersMap[e]&&n&&this.handlersMap[e].delete(n),(!n||this.handlersMap[e].size===0)&&delete this.handlersMap[e],Object.keys(this.handlersMap).length===0&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}Da.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 bu(t="",e=10){let n="";for(let r=0;r<e;r++)n+=Math.floor(Math.random()*10);return 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 VS{constructor(e){this.target=e,this.handlers=new Set}removeMessageHandler(e){e.messageChannel&&(e.messageChannel.port1.removeEventListener("message",e.onMessage),e.messageChannel.port1.close()),this.handlers.delete(e)}async _send(e,n,r=50){const i=typeof MessageChannel!="undefined"?new MessageChannel:null;if(!i)throw new Error("connection_unavailable");let s,o;return new Promise((l,u)=>{const d=bu("",20);i.port1.start();const f=setTimeout(()=>{u(new Error("unsupported_event"))},r);o={messageChannel:i,onMessage(p){const v=p;if(v.data.eventId===d)switch(v.data.status){case"ack":clearTimeout(f),s=setTimeout(()=>{u(new Error("timeout"))},3e3);break;case"done":clearTimeout(s),l(v.data.response);break;default:clearTimeout(f),clearTimeout(s),u(new Error("invalid_response"));break}}},this.handlers.add(o),i.port1.addEventListener("message",o.onMessage),this.target.postMessage({eventType:e,eventId:d,data:n},[i.port2])}).finally(()=>{o&&this.removeMessageHandler(o)})}}/**
|
||
|
* @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 hn(){return window}function jS(t){hn().location.href=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 dg(){return typeof hn().WorkerGlobalScope!="undefined"&&typeof hn().importScripts=="function"}async function WS(){if(!(navigator!=null&&navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch{return null}}function qS(){var t;return((t=navigator==null?void 0:navigator.serviceWorker)===null||t===void 0?void 0:t.controller)||null}function YS(){return dg()?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 fg="firebaseLocalStorageDb",KS=1,Zo="firebaseLocalStorage",hg="fbase_key";class Xs{constructor(e){this.request=e}toPromise(){return new Promise((e,n)=>{this.request.addEventListener("success",()=>{e(this.request.result)}),this.request.addEventListener("error",()=>{n(this.request.error)})})}}function Pa(t,e){return t.transaction([Zo],e?"readwrite":"readonly").objectStore(Zo)}function zS(){const t=indexedDB.deleteDatabase(fg);return new Xs(t).toPromise()}function yc(){const t=indexedDB.open(fg,KS);return new Promise((e,n)=>{t.addEventListener("error",()=>{n(t.error)}),t.addEventListener("upgradeneeded",()=>{const r=t.result;try{r.createObjectStore(Zo,{keyPath:hg})}catch(i){n(i)}}),t.addEventListener("success",async()=>{const r=t.result;r.objectStoreNames.contains(Zo)?e(r):(r.close(),await zS(),e(await yc()))})})}async function $f(t,e,n){const r=Pa(t,!0).put({[hg]:e,value:n});return new Xs(r).toPromise()}async function GS(t,e){const n=Pa(t,!1).get(e),r=await new Xs(n).toPromise();return r===void 0?null:r.value}function Bf(t,e){const n=Pa(t,!0).delete(e);return new Xs(n).toPromise()}const XS=800,JS=3;class pg{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 yc(),this.db)}async _withRetries(e){let n=0;for(;;)try{const r=await this._openDb();return await e(r)}catch(r){if(n++>JS)throw r;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return dg()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=Da._getInstance(YS()),this.receiver._subscribe("keyChanged",async(e,n)=>({keyProcessed:(await this._poll()).includes(n.key)})),this.receiver._subscribe("ping",async(e,n)=>["keyChanged"])}async initializeSender(){var e,n;if(this.activeServiceWorker=await WS(),!this.activeServiceWorker)return;this.sender=new VS(this.activeServiceWorker);const r=await this.sender._send("ping",{},800);!r||((e=r[0])===null||e===void 0?void 0:e.fulfilled)&&((n=r[0])===null||n===void 0?void 0:n.value.includes("keyChanged"))&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){if(!(!this.sender||!this.activeServiceWorker||qS()!==this.activeServiceWorker))try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch{}}async _isAvailable(){try{if(!indexedDB)return!1;const e=await yc();return await $f(e,Qo,"1"),await Bf(e,Qo),!0}catch{}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,n){return this._withPendingWrite(async()=>(await this._withRetries(r=>$f(r,e,n)),this.localCache[e]=n,this.notifyServiceWorker(e)))}async _get(e){const n=await this._withRetries(r=>GS(r,e));return this.localCache[e]=n,n}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(n=>Bf(n,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){const e=await this._withRetries(i=>{const s=Pa(i,!1).getAll();return new Xs(s).toPromise()});if(!e)return[];if(this.pendingWrites!==0)return[];const n=[],r=new Set;for(const{fbase_key:i,value:s}of e)r.add(i),JSON.stringify(this.localCache[i])!==JSON.stringify(s)&&(this.notifyListeners(i,s),n.push(i));for(const i of Object.keys(this.localCache))this.localCache[i]&&!r.has(i)&&(this.notifyListeners(i,null),n.push(i));return n}notifyListeners(e,n){this.localCache[e]=n;const r=this.listeners[e];if(r)for(const i of Array.from(r))i(n)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),XS)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,n){Object.keys(this.listeners).length===0&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(n)}_removeListener(
|
||
|
* @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 ZS(){var t,e;return(e=(t=document.getElementsByTagName("head"))===null||t===void 0?void 0:t[0])!==null&&e!==void 0?e:document}function eA(t){return new Promise((e,n)=>{const r=document.createElement("script");r.setAttribute("src",t),r.onload=e,r.onerror=i=>{const s=fn("internal-error");s.customData=i,n(s)},r.type="text/javascript",r.charset="UTF-8",ZS().appendChild(r)})}function tA(t){return`__${t}${Math.floor(Math.random()*1e6)}`}new Ks(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 nA(t,e){return e?Cn(e):(Ee(t._popupRedirectResolver,t,"argument-error"),t._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 wu extends yu{constructor(e){super("custom","custom");this.params=e}_getIdTokenResponse(e){return _i(e,this._buildIdpRequest())}_linkToIdToken(e,n){return _i(e,this._buildIdpRequest(n))}_getReauthenticationResolver(e){return _i(e,this._buildIdpRequest())}_buildIdpRequest(e){const n={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return e&&(n.idToken=e),n}}function rA(t){return og(t.auth,new wu(t),t.bypassAuthState)}function iA(t){const{auth:e,user:n}=t;return Ee(n,e,"internal-error"),RS(n,new wu(t),t.bypassAuthState)}async function sA(t){const{auth:e,user:n}=t;return Ee(n,e,"internal-error"),MS(n,new wu(t),t.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 mg{constructor(e,n,r,i,s=!1){this.auth=e,this.resolver=r,this.user=i,this.bypassAuthState=s,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(n)?n:[n]}execute(){return new Promise(async(e,n)=>{this.pendingPromise={resolve:e,reject:n};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(r){this.reject(r)}})}async onAuthEvent(e){const{urlResponse:n,sessionId:r,postBody:i,tenantId:s,error:o,type:l}=e;if(o){this.reject(o);return}const u={auth:this.auth,requestUri:n,sessionId:r,tenantId:s||void 0,postBody:i||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(l)(u))}catch(d){this.reject(d)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return rA;case"linkViaPopup":case"linkViaRedirect":return sA;case"reauthViaPopup":case"reauthViaRedirect":return iA;default:zt(this.auth,"internal-error")}}resolve(e){In(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){In(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}/**
|
||
|
* @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 oA=new Ks(2e3,1e4);class hi extends mg{constructor(e,n,r,i,s){super(e,n,i,s);this.provider=r,this.authWindow=null,this.pollId=null,hi.currentPopupAction&&hi.currentPopupAction.cancel(),hi.currentPopupAction=this}async executeNotNull(){const e=await this.execute();return Ee(e,this.auth,"internal-error"),e}async onExecution(){In(this.filter.length===1,"Popup operations only handle one event");const e=bu();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],e),this.authWindow.associatedEvent=e,this.resolver._originValidation(this.auth).catch(n=>{this.reject(n)}),this.resolver._isIframeWebStorageSupported(this.auth,n=>{n||this.reject(fn(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){var e;return((e=this.authWindow)===null||e===void 0?void 0:e.associatedEvent)||null}cancel(){this.reject(fn(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,hi.currentPopupAction=null}pollUserCancellation(){const e=()=>{var n,r;if(!((r=(n=this.authWindow)===null||n===void 0?void 0:n.window)===null||r===void 0)&&r.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(fn(this.auth,"popup-closed-by-user"))},2e3);return}this.pollId=window.setTimeout(e,oA.get())};e()}}hi.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 aA="pendingRedirect",yl=new Map;class lA extends mg{constructor(e,n,r=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],n,void 0,r);this.eventId=null}async execute(){let e=yl.get(this.auth._key());if(!e){try{const r=await cA(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(r)}catch(n){e=()=>Promise.reject(n)}yl.set(this.auth._key(),e)}return this.bypassAuthState||yl.set(this.auth._key(),()=>Promise.resolve(null)),e()}async onAuthEvent(e){if(e.type==="signInViaRedirect")return super.onAuthEvent(e);if(e.type==="unknown"){this.resolve(null);return}if(e.eventId){const n=await this.auth._redirectUserForId(e.eventId);if(n)return this.user=n,super.onAuthEvent(e);this.resolve(null)}}async onExecution(){}cleanUp(){}}async function cA(t,e){const n=dA(e),r=uA(t);if(!await r._isAvailable())return!1;const i=await r._get(n)==="true";return await r._remove(n),i}function uA(t){return Cn(t._redirectPersistence)}function dA(t){return Do(aA,t.config.apiKey,t.name)}async function fA(t,e,n=!1){const r=vu(t),i=nA(r,e),o=await new lA(r,i,n).execute();return o&&!n&&(delete o.user._redirectEventId,await r._persistUserIfCurrent(o.user),await r._setRedirectUser(null,e)),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.
|
||
|
*/const hA=10*60*1e3;class pA{constructor(e){this.auth=e,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(e){this.consumers.delete(e)}onEvent(e){if(this.hasEventBeenHandled(e))return!1;let n=!1;return this.consumers.forEach(r=>{this.isEventForConsumer(e,r)&&(n=!0,this.sendToConsumer(e,r),this.saveEventToCache(e))}),this.hasHandledPotentialRedirect||!mA(e)||(this.hasHandledPotentialRedirect=!0,n||(this.queuedRedirectEvent=e,n=!0)),n}sendToConsumer(e,n){var r;if(e.error&&!gg(e)){const i=((r=e.error.code)===null||r===void 0?void 0:r.split("auth/")[1])||"internal-error";n.onError(fn(this.auth,i))}else n.onAuthEvent(e)}isEventForConsumer(e,n){const r=n.eventId===null||!!e.eventId&&e.eventId===n.eventId;return n.filter.includes(e.type)&&r}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=hA&&this.cachedEventUids.clear(),this.cachedEventUids.has(Uf(e))}saveEventToCache(e){this.cachedEventUids.add(Uf(e)),this.lastProcessedEventTime=Date.now()}}function Uf(t){return[t.type,t.eventId,t.sessionId,t.tenantId].filter(e=>e).join("-")}function gg({type:t,error:e}){return t==="unknown"&&(e==null?void 0:e.code)==="auth/no-auth-event"}function mA(t){switch(t.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return gg(t);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 gA(t,e={}){return zs(t,"GET","/v1/projects",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.
|
||
|
*/const vA=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,yA=/^https?/;async function _A(t){if(t.config.emulator)return;const{authorizedDomains:e}=await gA(t);for(const n of e)try{if(bA(n))return}catch{}zt(t,"unauthorized-domain")}function bA(t){const e=vc(),{protocol:n,hostname:r}=new URL(e);if(t.startsWith("chrome-extension://")){const o=new URL(t);return o.hostname===""&&r===""?n==="chrome-extension:"&&t.replace("chrome-extension://","")===e.replace("chrome-extension://",""):n==="chrome-extension:"&&o.hostname===r}if(!yA.test(n))return!1;if(vA.test(t))return r===t;const i=t.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 wA=new Ks(3e4,6e4);function Hf(){const t=hn().___jsl;if(t!=null&&t.H){for(const e of Object.keys(t.H))if(t.H[e].r=t.H[e].r||[],t.H[e].L=t.H[e].L||[],t.H[e].r=[...t.H[e].L],t.CP)for(let n=0;n<t.CP.length;n++)t.CP[n]=null}}function EA(t){return new Promise((e,n)=>{var r,i,s;function o(){Hf(),gapi.load("gapi.iframes",{callback:()=>{e(gapi.iframes.getContext())},ontimeout:()=>{Hf(),n(fn(t,"network-request-failed"))},timeout:wA.get()})}if(!((i=(r=hn().gapi)===null||r===void 0?void 0:r.iframes)===null||i===void 0)&&i.Iframe)e(gapi.iframes.getContext());else if(!((s=hn().gapi)===null||s===void 0)&&s.load)o();else{const l=tA("iframefcb");return hn()[l]=()=>{gapi.load?o():n(fn(t,"network-request-failed"))},eA(`https://apis.google.com/js/api.js?onload=${l}`).catch(u=>n(u))}}).catch(e=>{throw Po=null,e})}let Po=null;function TA(t){return Po=Po||EA(t),Po}/**
|
||
|
* @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 CA=new Ks(5e3,15e3),SA="__/auth/iframe",AA="emulator/auth/iframe",OA={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},IA=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function kA(t){const e=t.config;Ee(e.authDomain,t,"auth-domain-config-required");const n=e.emulator?pu(e,AA):`https://${t.config.authDomain}/${SA}`,r={apiKey:e.apiKey,appName:t.name,v:Aa},i=IA.get(t.config.apiHost);i&&(r.eid=i);const s=t._getFrameworks();return s.length&&(r.fw=s.join(",")),`${n}?${Ys(r).slice(1)}`}async function DA(t){const e=await TA(t),n=hn().gapi;return Ee(n,t,"internal-error"),e.open({where:document.body,url:kA(t),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:OA,dontclear:!0},r=>new Promise(async(i,s)=>{await r.restyle({setHideOnLeave:!1});const o=fn(t,"network-request-failed"),l=hn().setTimeout(()=>{s(o)},CA.get());function u(){hn().clearTimeout(l),i(r)}r.ping(u).then(u,()=>{s(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.
|
||
|
*/const PA={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},NA=500,xA=600,MA="_blank",RA="http://localhost";class Ff{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}}function LA(t,e,n,r=NA,i=xA){const s=Math.max((window.screen.availHeight-i)/2,0).toString(),o=Math.max((window.screen.availWidth-r)/2,0).toString();let l="";const u=Object.assign(Object.assign({},PA),{width:r.toString(),height:i.toString(),top:s,left:o}),d=pt().toLowerCase();n&&(l=Jm(d)?MA:n),Xm(d)&&(e=e||RA,u.scrollbars="yes");const f=Object.entries(u).reduce((v,[m,S])=>`${v}${m}=${S},`,"");if(TS(d)&&l!=="_self")return $A(e||"",l),new Ff(null);const p=window.open(e||"",l,f);Ee(p,t,"popup-blocked");try{p.focus()}catch{}return new Ff(p)}function $A(t,e){const n=document.createElement("a");n.href=t,n.target=e;const r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}/**
|
||
|
* @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 BA="__/auth/handler",UA="emulator/auth/handler";function Vf(t,e,n,r,i,s){Ee(t.config.authDomain,t,"auth-domain-config-required"),Ee(t.config.apiKey,t,"invalid-api-key");const o={apiKey:t.config.apiKey,appName:t.name,authType:n,redirectUrl:r,v:Aa,eventId:i};if(e instanceof ig){e.setDefaultLanguage(t.languageCode),o.providerId=e.providerId||"",fC(e.getCustomParameters())||(o.customParameters=JSON.stringify(e.getCustomParameters()));for(const[u,d]of Object.entries(s||{}))o[u]=d}if(e instanceof Gs){const u=e.getScopes().filter(d=>d!=="");u.length>0&&(o.scopes=u.join(","))}t.tenantId&&(o.tid=t.tenantId);const l=o;for(const u of Object.keys(l))l[u]===void 0&&delete l[u];return`${HA(t)}?${Ys(l).slice(1)}`}function HA({config:t}){return t.emulator?pu(t,UA):`https://${t.authDomain}/${BA}`}/**
|
||
|
* @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 _l="webStorageSupport";class FA{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=ug,this._completeRedirectFn=fA}async _openPopup(e,n,r,i){var s;In((s=this.eventManagers[e._key()])===null||s===void 0?void 0:s.manager,"_initialize() not called before _openPopup()");const o=Vf(e,n,r,vc(),i);return LA(e,o,bu())}async _openRedirect(e,n,r,i){return await this._originValidation(e),jS(Vf(e,n,r,vc(),i)),new Promise(()=>{})}_initialize(e){const n=e._key();if(this.eventManagers[n]){const{manager:i,promise:s}=this.eventManagers[n];return i?Promise.resolve(i):(In(s,"If manager is not set, promise should be"),s)}const r=this.initAndGetManager(e);return this.eventManagers[n]={promise:r},r.catch(()=>{delete this.eventManagers[n]}),r}async initAndGetManager(e){const n=await DA(e),r=new pA(e);return n.register("authEvent",i=>(Ee(i==null?void 0:i.authEvent,e,"invalid-auth-event"),{status:r.onEvent(i.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:r},this.iframes[e._key()]=n,r}_isIframeWebStorageSupported(e,n){this.iframes[e._key()].send(_l,{type:_l},i=>{var s;const o=(s=i==null?void 0:i[0])===null||s===void 0?void 0:s[_l];o!==void 0&&n(!!o),zt(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){const n=e._key();return this.originValidationPromises[n]||(this.originValidationPromises[n]=_A(e)),this.originValidationPromises[n]}get _shouldInitProactively(){return ng()||gu()||ka()}}const VA=FA;var jf="@firebase/auth",Wf="0.19.5";/**
|
||
|
* @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 jA{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),((e=this.auth.currentUser)===null||e===void 0?void 0:e.uid)||null}async getToken(e){return this.assertAuthConfigured(),await this.auth._initializationPromise,this.auth.currentUser?{accessToken:await this.auth.currentUser.getIdToken(e)}:null}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;const n=this.auth.onIdTokenChanged(r=>{var i;e(((i=r)===null||i===void 0?void 0:i.stsTokenManager.accessToken)||null)});this.internalListeners.set(e,n),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();const n=this.internalListeners.get(e);!n||(this.internalListeners.delete(e),n(),this.updateProactiveRefresh())}assertAuthConfigured(){Ee(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 WA(t){switch(t){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";default:return}}function qA(t){zo(new Bs("auth",(e,{options:n})=>{const r=e.getProvider("app").getImmediate(),{apiKey:i,authDomain:s}=r.options;return(o=>{Ee(i&&!i.includes(":"),"invalid-api-key",{appName:o.name}),Ee(!(s!=null&&s.includes(":")),"argument-error",{appName:o.name});const l={apiKey:i,authDomain:s,clientPlatform:t,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:rg(t)},u=new AS(o,l);return oS(u,n),u})(r)},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,n,r)=>{e.getProvider("auth-internal").initialize()})),zo(new Bs("auth-internal",e=>{const n=vu(e.getProvider("auth").getImmediate());return(r=>new jA(r))(n)},"PRIVATE").setInstantiationMode("EXPLICIT")),vi(jf,Wf,WA(t)),vi(jf,Wf,"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.
|
||
|
*/function Nx(t=tS()){const e=Vm(t,"auth");return e.isInitialized()?e.getImmediate():sS(t,{popupRedirectResolver:VA,persistence:[QS,HS,ug]})}qA("Browser");var YA="firebase",KA="9.6.3";/**
|
||
|
* @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.
|
||
|
*/vi(YA,KA,"app");function me(t){if(t===null||t===!0||t===!1)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function _e(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function Ae(t){_e(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&e==="[object Date]"?new Date(t.getTime()):typeof t=="number"||e==="[object Number]"?new Date(t):((typeof t=="string"||e==="[object String]")&&typeof console!="undefined"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn(new Error().stack)),new Date(NaN))}function Nr(t,e){_e(2,arguments);var n=Ae(t),r=me(e);return isNaN(r)?new Date(NaN):(r&&n.setDate(n.getDate()+r),n)}function Js(t,e){_e(2,arguments);var n=Ae(t),r=me(e);if(isNaN(r))return new Date(NaN);if(!r)return n;var i=n.getDate(),s=new Date(n.getTime());s.setMonth(n.getMonth()+r+1,0);var o=s.getDate();return i>=o?s:(n.setFullYear(s.getFullYear(),s.getMonth(),i),n)}function zA(t,e){if(_e(2,arguments),!e||typeof e!="object")return new Date(NaN);var n=e.years?me(e.years):0,r=e.months?me(e.months):0,i=e.weeks?me(e.weeks):0,s=e.days?me(e.days):0,o=e.hours?me(e.hours):0,l=e.minutes?me(e.minutes):0,u=e.seconds?me(e.seconds):0,d=Ae(t),f=r||n?Js(d,r+n*12):d,p=s||i?Nr(f,s+i*7):f,v=l+o*60,m=u+v*60,S=m*1e3,T=new Date(p.getTime()+S);return T}function GA(t,e){_e(2,arguments);var n=Ae(t).getTime(),r=me(e);return new Date(n+r)}function vg(t,e){_e(1,arguments);var n=e||{},r=n.locale,i=r&&r.options&&r.options.weekStartsOn,s=i==null?0:me(i),o=n.weekStartsOn==null?s:me(n.weekStartsOn);if(!(o>=0&&o<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var l=Ae(t),u=l.getDay(),d=(u<o?7:0)+u-o;return l.setDate(l.getDate()-d),l.setHours(0,0,0,0),l}function ea(t){return _e(1,arguments),vg(t,{weekStartsOn:1})}function XA(t){_e(1,arguments);var e=Ae(t),n=e.getFullYear(),r=new Date(0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);var i=ea(r),s=new Date(0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);var o=ea(s);return e.getTime()>=i.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function JA(t){_e(1,arguments);var e=XA(t),n=new Date(0);n.setFullYear(e,0,4),n.setHours(0,0,0,0);var r=ea(n);return r}function yg(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}function _g(t){return _e(1,arguments),t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function Es(t){if(_e(1,arguments),!_g(t)&&typeof t!="number")return!1;var e=Ae(t);return!isNaN(Number(e))}var QA={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},ZA=function(t,e,n){var r,i=QA[t];return typeof i=="string"?r=i:e===1?r=i.one:r=i.other.replace("{{count}}",e.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},eO=ZA;function bl(t){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.width?String(e.width):t.defaultWidth,r=t.formats[n]||t.formats[t.defa
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}var xI={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",class:"dp__icon"},MI=[fe("path",{d:"M29.333 8c0-2.208-1.792-4-4-4h-18.667c-2.208 0-4 1.792-4 4v18.667c0 2.208 1.792 4 4 4h18.667c2.208 0 4-1.792 4-4v-18.667zM26.667 8v18.667c0 0.736-0.597 1.333-1.333 1.333 0 0-18.667 0-18.667 0-0.736 0-1.333-0.597-1.333-1.333 0 0 0-18.667 0-18.667 0-0.736 0.597-1.333 1.333-1.333 0 0 18.667 0 18.667 0 0.736 0 1.333 0.597 1.333 1.333z"},null,-1),fe("path",{d:"M20 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"},null,-1),fe("path",{d:"M9.333 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"},null,-1),fe("path",{d:"M4 14.667h24c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-24c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z"},null,-1)],Ts={render:function(t,e){return K(),oe("svg",xI,MI)}},RI={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",class:"dp__icon"},LI=[fe("path",{d:"M23.057 7.057l-16 16c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l16-16c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0z"},null,-1),fe("path",{d:"M7.057 8.943l16 16c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885l-16-16c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"},null,-1)],$I={render:function(t,e){return K(),oe("svg",RI,LI)}},BI={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",class:"dp__icon"},UI=[fe("path",{d:"M20.943 23.057l-7.057-7.057c0 0 7.057-7.057 7.057-7.057 0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-8 8c-0.521 0.521-0.521 1.365 0 1.885l8 8c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"},null,-1)],Qf={render:function(t,e){return K(),oe("svg",BI,UI)}},HI={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",class:"dp__icon"},FI=[fe("path",{d:"M12.943 24.943l8-8c0.521-0.521 0.521-1.365 0-1.885l-8-8c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885l7.057 7.057c0 0-7.057 7.057-7.057 7.057-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0z"},null,-1)],Zf={render:function(t,e){return K(),oe("svg",HI,FI)}},VI={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",class:"dp__icon"},jI=[fe("path",{d:"M16 1.333c-8.095 0-14.667 6.572-14.667 14.667s6.572 14.667 14.667 14.667c8.095 0 14.667-6.572 14.667-14.667s-6.572-14.667-14.667-14.667zM16 4c6.623 0 12 5.377 12 12s-5.377 12-12 12c-6.623 0-12-5.377-12-12s5.377-12 12-12z"},null,-1),fe("path",{d:"M14.667 8v8c0 0.505 0.285 0.967 0.737 1.193l5.333 2.667c0.658 0.329 1.46 0.062 1.789-0.596s0.062-1.46-0.596-1.789l-4.596-2.298c0 0 0-7.176 0-7.176 0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"},null,-1)],No={render:function(t,e){return K(),oe("svg",VI,jI)}},WI={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",class:"dp__icon"},qI=[fe("path",{d:"M24.943 19.057l-8-8c-0.521-0.521-1.365-0.521-1.885 0l-8 8c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l7.057-7.057c0 0 7.057 7.057 7.057 7.057 0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"},null,-1)],Tl={render:function(t,e){return K(),oe("svg",WI,qI)}},YI={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",class:"dp__icon"},KI=[fe("path",{d:"M7.057 12.943l8 8c0.521 0.521 1.365 0.521 1.885 0l8-8c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-7.057 7.057c0 0-7.057-7.057-7.057-7.057-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"},null,-1)],Cl={render:function(t,e){return K(),oe("svg",YI,KI)}},tn=function(t){var e=6e4*t.getTimezoneOffset();return new Date(t.getTime()-e)},Sl=function(t,e){var n=II(t,e.slice(0,t.length),new Date);return Es(n)&&_g(n)?n:null},tr=function(t){var e=new Date(JSON.parse(JSON.stringify(t)));return e=Dg(e,0),e=Pg(e,0),e=Ng(e,0),e=PI(e,0)},bc=function(t){ret
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}var rh=function(t,e,n,r){var i=[],s=new Date(e,t),o=new Date(e,t+1,0);return function l(u){var d=function(f,p,v){for(var m=new Date(JSON.parse(JSON.stringify(f))),S=[],T=0;T<7;T++){var A=Nr(m,T),O=Ot(A)!==p;S.push({text:v&&O?"":A.getDate(),value:A,current:!O})}return S}(u,t,r);i.push({days:d}),i[i.length-1].days.some(function(f){return Lt(tr(f.value),tr(o))})||l(Nr(u,7))}(vg(s,{weekStartsOn:n})),i},zI=function(t){return function(e){for(var n="",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=r.length,s=0;s<e;s++)n+=r.charAt(Math.floor(Math.random()*i));return n+t}(5)},$t=function(t){var e,n=I(t);return(e=n==null?void 0:n.$el)!==null&&e!==void 0?e:n},ih=function(t){return Object.assign({open:"dp-open",close:"dp-close",next:"calendar-next",previous:"calendar-prev"},t)},GI=["aria-disabled","aria-readonly"],XI={key:2,class:"dp__input_wrap"},JI=["id","placeholder","disabled","readonly","required","value","onKeydown"],QI={key:2,class:"dp__clear_icon"},ZI=Gt({props:{inputValue:{type:String,default:""},placeholder:{type:String,default:""},hideInputIcon:{type:Boolean,default:!1},disabled:{type:Boolean,default:!0},readonly:{type:Boolean,default:!0},clearable:{type:Boolean,default:!0},range:{type:Boolean,default:!1},state:{type:Boolean,default:null},inputClassName:{type:String,default:null},inline:{type:Boolean,default:!1},textInput:{type:Boolean,default:!1},textInputOptions:{type:Object,default:function(){return null}},isMenuOpen:{type:Boolean,default:!1},autoApply:{type:Boolean,default:!1},pattern:{type:String,default:""},uid:{type:String,default:null},openMenuOnFocus:{type:Boolean,default:!0},required:{type:Boolean,default:!1}},emits:["clear","open","update:inputValue","setInputDate","close","selectDate","setEmptyDate"],setup:function(t,e){var n=e.expose,r=e.emit,i=t,s=Se(),o=Se(null),l=Se(!1),u=js(),d=ce(function(){return Zn({dp__pointer:!i.disabled&&!i.readonly&&!i.textInput,dp__disabled:i.disabled,dp__input:!0,dp__input_icon_pad:!i.hideInputIcon,dp__input_valid:i.state,dp__input_invalid:i.state===!1,dp__input_focus:l.value||i.isMenuOpen},i.inputClassName,!!i.inputClassName)}),f=function(C){var D=C.target.value,B=i.textInputOptions,j=B.format,b=B.rangeSeparator;if(D!==""){if(i.range){var x=NI(D.split("".concat(b)),2),R=x[0],H=x[1];if(R&&H){var w=Sl(R.trim(),j||i.pattern),g=Sl(H.trim(),j||i.pattern);s.value=w&&g?[w,g]:null}}else s.value=Sl(D,j||i.pattern);r("setInputDate",s.value)}else r("setInputDate",null),i.autoApply&&(r("setEmptyDate"),s.value=null);r("update:inputValue",D)},p=function(){var C,D;(C=i.textInputOptions)!==null&&C!==void 0&&C.enterSubmit&&bc(s.value)&&i.inputValue!==""?(r("setInputDate",s.value,!0),s.value=null):(D=i.textInputOptions)!==null&&D!==void 0&&D.enterSubmit&&i.inputValue===""&&(s.value=null,r("clear"))},v=function(){var C,D;(C=i.textInputOptions)!==null&&C!==void 0&&C.tabSubmit&&bc(s.value)&&i.inputValue!==""?(r("setInputDate",s.value,!0),s.value=null):(D=i.textInputOptions)!==null&&D!==void 0&&D.tabSubmit&&i.inputValue===""&&(s.value=null,r("clear")),r("close")},m=function(){l.value=!0,i.openMenuOnFocus&&!i.isMenuOpen?r("open"):i.isMenuOpen&&(k(),r("close"))},S=function(){var C;(!i.openMenuOnFocus||u["dp-input"]||u.trigger)&&(i.textInput&&(C=i.textInputOptions)!==null&&C!==void 0&&C.openMenu&&!i.isMenuOpen?r("open"):i.textInput||r("open"))},T=function(){l.value=!1,i.autoApply&&i.textInput&&s.value&&(r("setInputDate",s.value),r("selectDate"),s.value=null)},A=function(C){C.stopImmediatePropagation()},O=function(){r("clear")},k=function(){l.value=!1;var C=$t(o);C&&C.blur()};return n({unFocus:k}),function(C,D){return K(),oe("div",{onClick:S,"aria-label":"Datepicker input",role:"textbox","aria-multiline":"false","aria-disabled":t.disabled,"aria-readonly":t.readonly},[!C.$slots.trigger||C.$slots["dp-input"]||t.inline?W("",!0):he(C.$slots,"trigger",{key:0}),!C.$slots["dp-input"]||C.$slots.trigger||t.inline?W("",!0):he(C.$slots,"dp-input",{key:1,value:t.inputValue,onInput:f,onEnter:p,onTab:v}),C.$s
|
||
|
* Bootstrap v5.1.3 (https://getbootstrap.com/)
|
||
|
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||
|
*/const xk=1e6,Mk=1e3,Oc="transitionend",Rk=t=>t==null?`${t}`:{}.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase(),Lk=t=>{do t+=Math.floor(Math.random()*xk);while(document.getElementById(t));return t},sv=t=>{let e=t.getAttribute("data-bs-target");if(!e||e==="#"){let n=t.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),e=n&&n!=="#"?n.trim():null}return e},Bu=t=>{const e=sv(t);return e&&document.querySelector(e)?e:null},nr=t=>{const e=sv(t);return e?document.querySelector(e):null},$k=t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:n}=window.getComputedStyle(t);const r=Number.parseFloat(e),i=Number.parseFloat(n);return!r&&!i?0:(e=e.split(",")[0],n=n.split(",")[0],(Number.parseFloat(e)+Number.parseFloat(n))*Mk)},ov=t=>{t.dispatchEvent(new Event(Oc))},Hr=t=>!t||typeof t!="object"?!1:(typeof t.jquery!="undefined"&&(t=t[0]),typeof t.nodeType!="undefined"),rr=t=>Hr(t)?t.jquery?t[0]:t:typeof t=="string"&&t.length>0?document.querySelector(t):null,yn=(t,e,n)=>{Object.keys(n).forEach(r=>{const i=n[r],s=e[r],o=s&&Hr(s)?"element":Rk(s);if(!new RegExp(i).test(o))throw new TypeError(`${t.toUpperCase()}: Option "${r}" provided type "${o}" but expected type "${i}".`)})},Zs=t=>!Hr(t)||t.getClientRects().length===0?!1:getComputedStyle(t).getPropertyValue("visibility")==="visible",Lr=t=>!t||t.nodeType!==Node.ELEMENT_NODE||t.classList.contains("disabled")?!0:typeof t.disabled!="undefined"?t.disabled:t.hasAttribute("disabled")&&t.getAttribute("disabled")!=="false",av=t=>{if(!document.documentElement.attachShadow)return null;if(typeof t.getRootNode=="function"){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?av(t.parentNode):null},ra=()=>{},qi=t=>{t.offsetHeight},lv=()=>{const{jQuery:t}=window;return t&&!document.body.hasAttribute("data-bs-no-jquery")?t:null},Ml=[],Bk=t=>{document.readyState==="loading"?(Ml.length||document.addEventListener("DOMContentLoaded",()=>{Ml.forEach(e=>e())}),Ml.push(t)):t()},Et=()=>document.documentElement.dir==="rtl",Ft=t=>{Bk(()=>{const e=lv();if(e){const n=t.NAME,r=e.fn[n];e.fn[n]=t.jQueryInterface,e.fn[n].Constructor=t,e.fn[n].noConflict=()=>(e.fn[n]=r,t.jQueryInterface)}})},Tr=t=>{typeof t=="function"&&t()},cv=(t,e,n=!0)=>{if(!n){Tr(t);return}const r=5,i=$k(e)+r;let s=!1;const o=({target:l})=>{l===e&&(s=!0,e.removeEventListener(Oc,o),Tr(t))};e.addEventListener(Oc,o),setTimeout(()=>{s||ov(e)},i)},uv=(t,e,n,r)=>{let i=t.indexOf(e);if(i===-1)return t[!n&&r?t.length-1:0];const s=t.length;return i+=n?1:-1,r&&(i=(i+s)%s),t[Math.max(0,Math.min(i,s-1))]},Uk=/[^.]*(?=\..*)\.|.*/,Hk=/\..*/,Fk=/::\d+$/,Rl={};let _h=1;const Vk={mouseenter:"mouseover",mouseleave:"mouseout"},jk=/^(mouseenter|mouseleave)/i,dv=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function fv(t,e){return e&&`${e}::${_h++}`||t.uidEvent||_h++}function hv(t){const e=fv(t);return t.uidEvent=e,Rl[e]=Rl[e]||{},Rl[e]}function Wk(t,e){return function n(r){return r.delegateTarget=t,n.oneOff&&Z.off(t,r.type,e),e.apply(t,[r])}}function qk(t,e,n){return function r(i){const s=t.querySelectorAll(e);for(let{target:o}=i;o&&o!==this;o=o.parentNode)for(let l=s.length;l--;)if(s[l]===o)return i.delegateTarget=o,r.oneOff&&Z.off(t,i.type,e,n),n.apply(o,[i]);return null}}function pv(t,e,n=null){const r=Object.keys(t);for(let i=0,s=r.length;i<s;i++){const o=t[r[i]];if(o.originalHandler===e&&o.delegationSelector===n)return o}return null}function mv(t,e,n){const r=typeof e=="string",i=r?n:e;let s=gv(t);return dv.has
|