1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[888],{8357:function(e,t,n){"use strict";n.d(t,{Z:function(){return J}});var r=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){if(this.ctr%(this.isSpeedy?65e3:1)==0){var t,n;this._insertTag(((n=document.createElement("style")).setAttribute("data-emotion",this.key),void 0!==this.nonce&&n.setAttribute("nonce",this.nonce),n.appendChild(document.createTextNode("")),n.setAttribute("data-s",""),n))}var r=this.tags[this.tags.length-1];if(this.isSpeedy){var i=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(r);try{i.insertRule(e,i.cssRules.length)}catch(s){}}else r.appendChild(document.createTextNode(e));this.ctr++}
1,t.flush=function(){this.tags.forEach(function(e){return e.parentNode&&e.parentNode.removeChild(e)}),this.tags=[],this.ctr=0},e}(),i=Math.abs,s=String.fromCharCode,o=Object.assign;function a(e){return e.trim()}function l(e,t,n){return e.replace(t,n)}function u(e,t){return e.indexOf(t)}function c(e,t){return 0|e.charCodeAt(t)}function h(e,t,n){return e.slice(t,n)}function d(e){return e.length}function f(e){return e.length}function p(e,t){return t.push(e),e}var m=1,g=1,y=0,v=0,_=0,b="";function w(e,t,n,r,i,s,o){return{value:e,root:t,parent:n,type:r,props:i,children:s,line:m,column:g,length:o,return:""}}function E(e,t){return o(w("",null,null,"",null,null,0),e,{length:-e.length},t)}function x(){return _=v>0?c(b,--v):0,g--,10===_&&(g=1,m--),_}function S(){return _=v<y?c(b,v++):0,g++,10===_&&(g=1,m++),_}function T(){return c(b,v)}function I(e,t){return h(b,e,t)}function k(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function C(e){return m=g=1,y=d(b=e),v=0,[]}function R(e){return b="",e}function A(e){return a(I(v-1,function e(t){for(;S();)switch(_){case t:return v;case 34:case 39:34!==t&&39!==t&&e(_);break;case 40:41===t&&e(t);break;case 92:S()}return v}(91===e?e+2:40===e?e+1:e)))}function O(e){for(;_=T();)if(_<33)S();else break;return k(e)>2||k(_)>3?"":" "}function D(e,t){for(;--t&&S()&&!(_<48)&&!(_>102)&&(!(_>57)||!(_<65))&&(!(_>70)||!(_<97)););return I(e,v+(t<6&&32==T()&&32==S()))}function N(e,t){for(;S();)if(e+_===57)break;else if(e+_===84&&47===T())break;return"/*"+I(t,v-1)+"*"+s(47===e?e:S())}function P(e){for(;!k(T());)S();return I(e,v)}var F="-ms-",M="-moz-",L="-webkit-",j="comm",U="rule",B="decl",Z="@ke
1yframes";function $(e,t){for(var n="",r=f(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function V(e,t,n,r){switch(e.type){case"@import":case B:return e.return=e.return||e.value;case j:return"";case Z:return e.return=e.value+"{"+$(e.children,r)+"}";case U:e.value=e.props.join(",")}return d(n=$(e.children,r))?e.return=e.value+"{"+n+"}":""}function z(e,t,n,r,s,o,u,c,d,p,m){for(var g=s-1,y=0===s?o:[""],v=f(y),_=0,b=0,E=0;_<r;++_)for(var x=0,S=h(e,g+1,g=i(b=u[_])),T=e;x<v;++x)(T=a(b>0?y[x]+" "+S:l(S,/&\f/g,y[x])))&&(d[E++]=T);return w(e,t,n,0===s?U:c,d,p,m)}function q(e,t,n){return w(e,t,n,j,s(_),h(e,2,-2),0)}function G(e,t,n,r){return w(e,t,n,B,h(e,0,r),h(e,r+1,-1),r)}var W=function(e,t,n){for(var r=0,i=0;r=i,i=T(),38===r&&12===i&&(t[n]=1),!k(i);)S();return I(e,v)},H=function(e,t){var n=-1,r=44;do switch(k(r)){case 0:38===r&&12===T()&&(t[n]=1),e[n]+=W(v-1,t,n);break;case 2:e[n]+=A(r);break;case 4:if(44===r){e[++n]=58===T()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=s(r)}while(r=S());return e},K=new WeakMap,Y=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||K.get(n))&&!r){K.set(e,!0);for(var i,s,o=[],a=R(H(C(t),o)),l=n.props,u=0,c=0;u<a.length;u++)for(var h=0;h<l.length;h++,c++)e.props[c]=o[u]?a[u].replace(/&\f/g,l[h]):l[h]+" "+a[u]}}},Q=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}},X=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case B:e.return=function e(t,n){var r,i;switch((((n<<2^c(t,0))<<2^c(t,1))<<2^c(t,2))<<2^c(t,3)){case 5103:return L+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return L+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return L+t+M+t+F+t+t;case 6828:case 4268:return L+t+F+t+t;case 6165:return L+t+F+"flex-"+t+t;case 5187:return L+t+l(t,/(\w+).+(:[^]+)/,L+"box-$1$2"+F+"flex-$1$2")+t;case 5443:return L+t+F+"flex-item-"+l(t,/flex-|-self/,"")+t;case 4675:return L+t+F+"flex-line-pack"+l(t,/align-content|flex-|-self/,"")+t;case 5548:return L+t+F+l(t,"shrink","negative")+t;case 5292:return L+t+F+l(t,"basis","preferred-size")+t;case 6060:return L+"box-"+l(t,"-grow","")+L+t+F+l(t,"grow","positive")+t;case 4554:return L+l(t,/([^-])(transform)/g,"$1"+L+"$2")+t;case 6187:return l(l(l(t,/(zoom-|grab)/,L+"$1"),/(image-set)/,L+"$1"),t,"")+t;case 5495:case 3959:return l(t,/(image-set\([^]*)/,L+"$1$`$1");case 4968:return l(l(t,/(.+:)(flex-)?(.*)/,L+"box-pack:$3"+F+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+L+t+t;case 4095:case 3583:case 4068:case 2532:return l(t,/(.+)-inline(.+)/,L+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(d(t)-1-n>6)switch(c(t,n+1)){case 109:if(45!==c(t,n+4))break;case 102:return l(t,/(.+:)(.+)-([^]+)/,"$1"+L+"$2-$3$1"+M+(108==c(t,n+3)?"$3":"$2-$3"))+t;case 115:return~u(t,"stretch")?e(l(t,"stretch","fill-available"),n)+t:t}break;case 4949:if(115!==c(t,n+1))break;case 6444:switch(c(t,d(t)-3-(~u(t,"!important")&&10))){case 107:return l(t,":",":"+L)+t;case 101:return l(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+L+(45===c(t,14)?"inline-":"")+"box$3$1"+L+"$2$3$1"+F+"$2box$3")+t}break;case 5936:switch(c(t,n+11)){case 114:return L+t+F+l(t,/[svh]\w+-[tblr]{2}/,"tb")+t;
1case 108:return L+t+F+l(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return L+t+F+l(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return L+t+F+t+t}return t}(e.value,e.length);break;case Z:return $([E(e,{value:l(e.value,"@","@"+L)})],r);case U:if(e.length){var i,s;return i=e.props,s=function(t){var n;switch(n=t,(n=/(::plac\w+|:read-\w+)/.exec(n))?n[0]:n){case":read-only":case":read-write":return $([E(e,{props:[l(t,/:(read-\w+)/,":"+M+"$1")]})],r);case"::placeholder":return $([E(e,{props:[l(t,/:(plac\w+)/,":"+L+"input-$1")]}),E(e,{props:[l(t,/:(plac\w+)/,":"+M+"$1")]}),E(e,{props:[l(t,/:(plac\w+)/,F+"input-$1")]})],r)}return""},i.map(s).join("")}}}],J=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var i=e.stylisPlugins||X,o={},a=[];h=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)o[t[n]]=!0;a.push(e)});var c,h,m,g,y,_,b=[V,(c=function(e){g.insert(e)},function(e){!e.root&&(e=e.return)&&c(e)})],w=(y=[Y,Q].concat(i,b),_=f(y),function(e,t,n,r){for(var i="",s=0;s<_;s++)i+=y[s](e,t,n,r)||"";return i}),E=function(e){var t;return $(R(function e(t,n,r,i,o,a,c,h,f){for(var m=0,g=0,y=c,_=0,b=0,w=0,E=1,I=1,k=1,C=0,R="",F=o,M=a,L=i,j=R;I;)switch(w=C,C=S()){case 40:if(108!=w&&58==j.charCodeAt(y-1)){-1!=u(j+=l(A(C),"&","&\f"),"&\f")&&(k=-1);break}case 34:case 39:case 91:j+=A(C);break;case 9:case 10:case 13:case 32:j+=O(w);break;case 92:j+=D(v-1,7);continue;case 47:switch(T()){case 42:case 47:p(q(N(S(),v),n,r),f);break;default:j+="/"}break;case 123*E:h[m++]=d(j)*k;case 125*E:case 59:case 0:switch(C){case 0:case 125:I=0;case 59+g:b>0&&d(j)-y&&p(b>32?G(j+";",i,r,y-1):G(l(j," ","")+";",i,r,y-2),f);break;case 59:j+=";";default:if(p(L=z(j,n,r,m,g,o,h,R,F=[],M=[],y),a),123===C){if(0===g)e(j,n,L,L,F,a,y,h,M);else switch(_){case 100:case 109:case 115:e(t,L,L,i&&p(z(t,L,L,0,0,o,h,R,o,F=[],y),M),o,M,y,h,i?F:M);break;default:e(j,L,L,L,[""],M,0,h,M)}}}m=g=b=0,E=k=1,R=j="",y=c;break;case 58:y=1+d(j),b=w;default:if(E<1){if(123==C)--E;else if(125==C&&0==E++&&125==x())continue}switch(j+=s(C),C*E){case 38:k=g>0?1:(j+="\f",-1);break;case 44:h[m++]=(d(j)-1)*k,k=1;break;case 64:45===T()&&(j+=A(S())),_=T(),g=y=d(R=j+=P(v)),C++;break;case 45:45===w&&2==d(j)&&(E=0)}}return a}("",null,null,null,[""],t=C(t=e),0,[0],t)),w)};m=function(e,t,n,r){g=n,E(e?e+"{"+t.styles+"}":t.styles),r&&(I.inserted[t.name]=!0)};var I={key:t,sheet:new r({key:t,container:h,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:m};return I.sheet.hydrate(a),I}},5042:function(e,t){"use strict";t.Z=function(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}},2443:function(e,t,n){"use strict";n.d(t,{C:function(){return o},T:function(){return l},w:function(){return a}});var r=n(7294),i=n(8357);n(8137),n(7278);var s=(0,r.createContext)("undefined"!=typeof HTMLElement?(0,i.Z)({key:"css"}):null),o=s.Provider,a=function(e){return(0,r.forwardRef)(function(t,n){return e(t,(0,r.useContext)(s),n)})},l=(0,r.createContext)({})},917:function(e,t,n){"use strict";n.d(t,{F4:function(){return c},iv:function(){return u},xB:function(){return l}});var r=n(7294);n(8357);var i=n(2443);n(8679);var s=n(444),o=n(8137),a=n(7278),l=(0,i.w)(function(e,t){var n=e.styles,l=(0,o.O)([n],void 0,(0,r.useContext)(i.T)),u=(0,r.useRef)();return(0,a.j)(function(){var e=t.key+"-global",n=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),r=!1,i=document.querySelector('style[data-emotion="'+e+" "+l.name+'"]');return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),null!==i&&(r=!0,i.setAttribute("data-emotion",e),n.hydrate([i])),u.current=[n,r],function(){n.flush()}},[t]),(0,a.j)(function(){var e=u.current,n=e[0];if(e[1]){e[1]=!1;return}if(void 0!==l.next&&(0,s.My)(t,l.next,!0),n.tags.length){var r=n.tags[n.tags.length-1].nextElementSibling;n.before=r,n.flush()}t.insert("",l,n,!1)},[t,l.name]),null});function u(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,o.O)(t)}var c=function(){var e=u.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}},8137:function(e,t,n){"use strict";n.d(t,{O:function(){return m}});var r,i=function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))*1540483477+((t>>
1>16)*59797<<16),t^=t>>>24,n=(65535&t)*1540483477+((t>>>16)*59797<<16)^(65535&n)*1540483477+((n>>>16)*59797<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n^=255&e.charCodeAt(r),n=(65535&n)*1540483477+((n>>>16)*59797<<16)}return n^=n>>>13,(((n=(65535&n)*1540483477+((n>>>16)*59797<<16))^n>>>15)>>>0).toString(36)},s={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},o=n(5042),a=/[A-Z]|^ms/g,l=/_EMO_([^_]+?)_([^]*?)_EMO_/g,u=function(e){return 45===e.charCodeAt(1)},c=function(e){return null!=e&&"boolean"!=typeof e},h=(0,o.Z)(function(e){return u(e)?e:e.replace(a,"-$&").toLowerCase()}),d=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(l,function(e,t,n){return r={name:t,styles:n,next:r},t})}return 1===s[e]||u(e)||"number"!=typeof t||0===t?t:t+"px"};function f(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return r={name:n.name,styles:n.styles,next:r},n.name;if(void 0!==n.styles){var i,s=n.next;if(void 0!==s)for(;void 0!==s;)r={name:s.name,styles:s.styles,next:r},s=s.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=f(e,t,n[i])+";";else for(var s in n){var o=n[s];if("object"!=typeof o)null!=t&&void 0!==t[o]?r+=s+"{"+t[o]+"}":c(o)&&(r+=h(s)+":"+d(s,o)+";");else if(Array.isArray(o)&&"string"==typeof o[0]&&(null==t||void 0===t[o[0]]))for(var a=0;a<o.length;a++)c(o[a])&&(r+=h(s)+":"+d(s,o[a])+";");else{var l=f(e,t,o);switch(s){case"animation":case"animationName":r+=h(s)+":"+l+";";break;default:r+=s+"{"+l+"}"}}}return r}(e,t,n);case"function":if(void 0!==e){var o=r,a=n(e);return r=o,f(e,t,a)}}if(null==t)return n;var l=t[n];return void 0!==l?l:n}var p=/label:\s*([^\s;\n{]+)\s*(;|$)/g,m=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var s,o,a=!0,l="";r=void 0;var u=e[0];null==u||void 0===u.raw?(a=!1,l+=f(n,t,u)):l+=u[0];for(var c=1;c<e.length;c++)l+=f(n,t,e[c]),a&&(l+=u[c]);p.lastIndex=0;for(var h="";null!==(o=p.exec(l));)h+="-"+o[1];return{name:i(l)+h,styles:l,next:r}}},7278:function(e,t,n){"use strict";n.d(t,{L:function(){return a},j:function(){return l}});var r,i=n(7294),s=function(e){return e()},o=!!(r||(r=n.t(i,2))).useInsertionEffect&&(r||(r=n.t(i,2))).useInsertionEffect,a=o||s,l=o||i.useLayoutEffect},444:function(e,t,n){"use strict";function r(e,t,n){var r="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "}),r}n.d(t,{My:function(){return s},fp:function(){return r},hC:function(){return i}});var i=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},s=function(e,t,n){i(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var s=t;do e.insert(t===s?"."+r:"",s,e.sheet,!0),s=s.next;while(void 0!==s)}}},1352:function(e,t,n){"use strict";n.d(t,{$:function(){return tc},A:function(){return c},B:function(){return d},G:function(){return ex},H:function(){return eI},J:function(){return eB},L:function(){return ei},M:function(){return eH},N:function(){return eX},P:function(){return nS},Q:function(){return eJ},R:function(){return ny},T:function(){return e0},U:function(){return eQ},V:function(){return e2},W:function(){return e4},X:function(){return e8},Y:function(){return to},Z:function(){return ta},_:function(){return tl},a:function(){return tX},a0:function(){return tp},a1:function(){return tm},a2:function(){return tg},a3:function(){return ty},a4:function(){return tv},a5:function(){return t_},a6:function(){return tb},a7:function(){return tw},a8:function(){return tE},a9:function(){return tx},aA:function(){return nJ},aB:function(){return nQ},aC:function(){return nZ},aD:function(){return nB},aE:function(){return ew},aI:function(){return t0},aL:function(){return e1},aa:function(){return tT},ab:function(){return tI},ac:function(){return tk},af:function(){return tR},ag:function(){return tA},ah:function(){return tO},ak:function(){return tt},al:function(){return tU},an:function(){return tV},ao:function(){return tG},ap:function(){return eg},aq:function(){return x},ar:function(){return em},as:function(){return ed},at:function(){return g},au:function(){return ro},av:function(){return n2},aw:function(){return y},ax:function(){return w},ay:function(){return T},az:function(){return es},b:function(){return tY},c:function(){return nD},d:function(){return nP},e:function(){return nN},f:function(){return nz},g:function(){return nH},h:function(){return nG},i:function(){return ns},j:function(){return nY},k:function(){return rl},l:function(){return nb},m:function(){return rh},n:function(){return rv},o:function(){return u},r:function(){return nw},s:function(){return n_},u:function(){return nx},v:function(){return tB}});var r,i=n(4444),s=n(2238),o=n(3333),a=n(655),l=n(8463);let u={FACEBOOK:"facebook.com",GITHUB:"github.com",GOOGLE:"google.com",PASSWORD:"password",PHONE:"phone",TWITTER:"twitter.com"},c={EMAIL_SIGNIN:"EMAIL_SIGNIN",PASSWORD_RESET:"PASSWORD_RESET",RECOVER_EMAIL:"RECOVER_EMAIL",REVERT_SECOND_FACTOR_ADDITION:"REVERT_SECOND_FACTOR_ADDITION",VERIFY_AND_CHANGE_EMAIL:"VERIFY_AND_CHANGE_EMAIL",VERIFY_EMAIL:"VERIFY_EMAIL"};function h(){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."}}let d=/** 2 * @license 3 * Copyright 2020 Google LLC 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ function(){return{"admin-restricted-operation":"This operation is restricted to administrators only.","argument-error":"","app-not-authorized":"This app, identified by the domain where it's hosted, is not authorized to use Firebase Authentication with the provided API key. Review your key configuration in the Google API console.","app-not-installed":"The requested mobile application corresponding to the identifier (Android package name or iOS bundle ID) provided is not installed on this device.","captcha-check-failed":"The reCAPTCHA response token provided is either invalid, expired, already used or the domain associated with it does not match the list of whitelisted domains.","code-expired":"The SMS code has expired. Please re-send the verification code to try again.","cordova-not-ready":"Cordova framework is not ready.","cors-unsupported":"This browser is not supported.","credential-already-in-use":"This credential is already associated with a different user account.","custom-token-mismatch":"The custom token corresponds to a different audience.","requires-recent-login":"This operation is sensitive and requires recent authentication. Log in again before retrying this request.","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.","dynamic-link-not-activated":"Please activate Dynamic Links in the Firebase Console and agree to the terms and conditions.","email-change-needs-verification":"Multi-factor users must al
16ways have a verified email.","email-already-in-use":"The email address is already in use by another account.","emulator-config-failed":'Auth instance has already been used to make a network call. Auth can no longer be configured to use the emulator. Try calling "connectAuthEmulator()" sooner.',"expired-action-code":"The action code has expired.","cancelled-popup-request":"This operation has been cancelled due to another conflicting popup being opened.","internal-error":"An internal AuthError has occurred.","invalid-app-credential":"The phone verification request contains an invalid application verifier. The reCAPTCHA token response is either invalid or expired.","invalid-app-id":"The mobile app identifier is not registed for the current project.","invalid-user-token":"This user's credential isn't valid for this project. This can happen if the user's token has been tampered with, or if the user isn't for the project associated with this API key.","invalid-auth-event":"An internal AuthError has occurred.","invalid-verification-code":"The SMS verification code used to create the phone auth credential is invalid. Please resend the verification code sms and be sure to use the verification code provided by the user.","invalid-continue-uri":"The continue URL provided in the request is invalid.","invalid-cordova-configuration":"The following Cordova plugins must be installed to enable OAuth sign-in: cordova-plugin-buildinfo, cordova-universal-links-plugin, cordova-plugin-browsertab, cordova-plugin-inappbrowser and cordova-plugin-customurlscheme.","invalid-custom-token":"The custom token format is incorrect. Please check the documentation.","invalid-dynamic-link-domain":"The provided dynamic link domain is not configured or authorized for the current project.","invalid-email":"The email address is badly formatted.","invalid-emulator-scheme":"Emulator URL must start with a valid scheme (http:// or https://).","invalid-api-key":"Your API key is invalid, please check you have copied it correctly.","invalid-cert-hash":"The SHA-1 certificate hash provided is invalid.","invalid-credential":"The supplied auth credential is malformed or has expired.","invalid-message-payload":"The email template corresponding to this action contains invalid characters in its message. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-multi-factor-session":"The request does not contain a valid proof of first factor successful sign-in.","invalid-oauth-provider":"EmailAuthProvider is not supported for this operation. This operation only supports OAuth providers.","invalid-oauth-client-id":"The OAuth client ID provided is either invalid or does not match the specified API key.","unauthorized-domain":"This domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console.","invalid-action-code":"The action code is invalid. This can happen if the code is malformed, expired, or has already been used.","wrong-password":"The password is invalid or the user does not have a password.","invalid-persistence-type":"The specified persistence type is invalid. It can only be local, session or none.","invali
16d-phone-number":"The format of the phone number provided is incorrect. Please enter the phone number in a format that can be parsed into E.164 format. E.164 phone numbers are written in the format [+][country code][subscriber number including area code].","invalid-provider-id":"The specified provider ID is invalid.","invalid-recipient-email":"The email corresponding to this action failed to send as the provided recipient email address is invalid.","invalid-sender":"The email template corresponding to this action contains an invalid sender email or name. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-verification-id":"The verification ID used to create the phone auth credential is invalid.","invalid-tenant-id":"The Auth instance's tenant ID is invalid.","login-blocked":"Login blocked by user-provided method: {$originalMessage}","missing-android-pkg-name":"An Android Package Name must be provided if the Android App is required to be installed.","auth-domain-config-required":"Be sure to include authDomain when calling firebase.initializeApp(), by following the instructions in the Firebase console.","missing-app-credential":"The phone verification request is missing an application verifier assertion. A reCAPTCHA response token needs to be provided.","missing-verification-code":"The phone auth credential was created with an empty SMS verification code.","missing-continue-uri":"A continue URL must be provided in the request.","missing-iframe-start":"An internal AuthError has occurred.","missing-ios-bundle-id":"An iOS Bundle ID must be provided if an App Store ID is provided.","missing-or-invalid-nonce":"The request does not contain a valid nonce. This can occur if the SHA-256 hash of the provided raw nonce does not match the hashed nonce in the ID token payload.","missing-multi-factor-info":"No second factor identifier is provided.","missing-multi-factor-session":"The request is missing proof of first factor successful sign-in.","missing-phone-number":"To send verification codes, provide a phone number for the recipient.","missing-verification-id":"The phone auth credential was created with an empty verification ID.","app-deleted":"This instance of FirebaseApp has been deleted.","multi-factor-info-not-found":"The user does not have a second factor matching the identifier provided.","multi-factor-auth-required":"Proof of ownership of a second factor is required to complete sign-in.","account-exists-with-different-credential":"An account already exists with the same email address but different sign-in credentials. Sign in using a provider associated with this email address.","network-request-failed":"A network AuthError (such as timeout, interrupted connection or unreachable host) has occurred.","no-auth-event":"An internal AuthError has occurred.","no-such-provider":"User was not linked to an account with the given provider.","null-user":"A null user object was provided as the argument for an operation which requires a non-null user object.","operation-not-allowed":"The given sign-in provider is disabled for this Firebase project. Enable it in the Firebase console, under the sign-in method tab of the Auth section.","operation-not-supported-in-this-environment":'This operation is not supported in the environment this application is running on. "location.protocol" must be http, https or chrome-extension and web storage must be enabled.',"popup-blocked":"Unable to establish a connection with the popup. It may have been blocked by the browser.","popup-closed-by-user":"The popup has been closed by the user before finalizing the operation.","provider-already-linked":"User can only be linked to one identity for the given provider.","quota-exceeded":"The project's quota for this operation has been exceeded.","redirect-cancelled-by-user":"The redirect operation has been cancelled by the user before finalizing.","redirect-operation-pending":"A redirect sign-in operation is already pending.","rejected-credential":"The request contains malformed or mismatching credentials.","second-factor-already-in-use":"The second factor is already enrolled on this account.","maximum-second-factor-count-exceeded":"The maximum allowed number of second factors on a user has been exceeded.","tenant-id-mismatch":"The provided tenant ID does not match the Auth instance's tenant ID",timeout:"The operation has timed out.","user-token-expired":"The user's credential is no longer valid. The user must sign in again.","too-many-requests":"We have blocked all requests from this device due to unusual activity. Try again later.","unauthorized-continue-uri":"The domain of the continue URL is not whitelisted. Please whitelist the domain in the Firebase console.","unsupported-first-factor":"Enrolling a second factor or signing in with a multi-factor account requires sign-in with a supported first factor.","unsupported-persistence-type":"The current environment does not support the specified persistence type.","unsupported-tenant-operation":"This operation is not supported in a multi-tenant context.","unverified-email":"The operation requires a verified email.","user-cancelled":"The user did not grant your application the permissions it requested.","user-not-found":"There is no user record corresponding to this identifier. The user may have been deleted.","user-disabled":"The user account has been disabled by an administrator.","user-mismatch":"The supplied credentials do not correspond to the previously signed in user.","user-signed-out":"","weak-password":"The password must be 6 characters long or more.","web-storage-unsupported":"This browser is not supported or 3rd party cookies and data may be disabled.","already-initialized":"initializeAuth() has already been called with different options. To avoid this error, call initializeAuth() with the same options as when it was originally called, or call getAuth() to return the already initialized instance."}},f=new i.LL("auth","Firebase",h()),p=new o.Yd("@firebase/auth");function m(e,...t){p.logLevel<=o.in.ERROR&&p.error(`Auth (${s.SDK_VERSION}): ${e}`,...t)}/** 17 * @license 18 * Copyright 2020 Google LLC 19 * 20 * Licensed under the Apache License, Version 2.0 (the "License");
21 * you may not use this file except in compliance with the License. 22 * You may obtain a copy of the License at 23 * 24 * http://www.apache.org/licenses/LICENSE-2.0 25 * 26 * Unless required by applicable law or agreed to in writing, software 27 * distributed under the License is distributed on an "AS IS" BASIS, 28 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 29 * See the License for the specific language governing permissions and 30 * limitations under the License. 31 */ function g(e,...t){throw b(e,...t)}function y(e,...t){return b(e,...t)}function v(e,t,n){let r=Object.assign(Object.assign({},h()),{[t]:n}),s=new i.LL("auth","Firebase",r);return s.create(t,{appName:e.name})}function _(e,t,n){if(!(t instanceof n))throw n.name!==t.constructor.name&&g(e,"argument-error"),v(e,"argument-error",`Type of ${t.constructor.name} does not match expected instance.Did you pass a reference from a different Auth SDK?`)}function b(e,...t){if("string"!=typeof e){let n=t[0],r=[...t.slice(1)];return r[0]&&(r[0].appName=e.name),e._errorFactory.create(n,...r)}return f.create(e,...t)}function w(e,t,...n){if(!e)throw b(t,...n)}function E(e){let t="INTERNAL ASSERTION FAILED: "+e;throw m(t),Error(t)}function x(e,t){e||E(t)}/** 32 * @license 33 * Copyright 2020 Google LLC 34 * 35 * Licensed under the Apache License, Version 2.0 (the "License"); 36 * you may not use this file except in compliance with the License. 37 * You may obtain a copy of the License at 38 * 39 * http://www.apache.org/licenses/LICENSE-2.0 40 * 41 * Unless required by applicable law or agreed to in writing, software 42 * distributed under the License is distributed on an "AS IS" BASIS, 43 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 44 * See the License for the specific language governing permissions and 45 * limitations under the License. 46 */ let S=new Map;function T(e){x(e instanceof Function,"Expected a class definition");let t=S.get(e);return t?(x(t instanceof e,"Instance stored in cache mismatched with class"),t):(t=new e,S.set(e,t),t)}/** 47 * @license 48 * Copyright 2020 Google LLC 49 * 50 * Licensed under the Apache License, Version 2.0 (the "License"); 51 * you may not use this file except in compliance with the License. 52 * You may obtain a copy of the License at 53 * 54 * http://www.apache.org/licenses/LICENSE-2.0 55 * 56 * Unless required by applicable law or agreed to in writing, software 57 * distributed under the License is distributed on an "AS IS" BASIS, 58 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 59 * See the License for the specific language governing permissions and 60 * limitations under the License. 61 */ function I(){var e;return"undefined"!=typeof self&&(null===(e=self.location)||void 0===e?void 0:e.href)||""}function k(){return"http:"===C()||"https:"===C()}function C(){var e;return"undefined"!=typeof self&&(null===(e=self.location)||void 0===e?void 0:e.protocol)||null}/** 62 * @license 63 * Copyright 2020 Google LLC 64 * 65 * Licensed under the Apache License, Version 2.0 (the "License"); 66 * you may not use this file except in compliance with the License. 67 * You may obtain a copy of the License at 68 * 69 * http://www.apache.org/licenses/LICENSE-2.0 70 * 71 * Unless required by applicable law or agreed to in writing, software 72 * distributed under the License is distributed on an "AS IS" BASIS, 73 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 74 * See the License for the specific language governing permissions and 75 * limitations under the License. 76 */ class R{constructor(e,t){this.shortDelay=e,this.longDelay=t,x(t>e,"Short delay should be less than long delay!"),this.isMobile=(0,i.uI)()||(0,i.b$)()}get(){return!("undefined"!=typeof navigator&&navigator&&"onLine"in navigator&&"boolean"==typeof navigator.onLine&&(k()||(0,i.ru)()||"connection"in navigator))||navigator.onLine?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}/** 77 * @license 78 * Copyright 2020 Google LLC 79 * 80 * Licensed under the Apache License, Version 2.0 (the "License");
81 * you may not use this file except in compliance with the License. 82 * You may obtain a copy of the License at 83 * 84 * http://www.apache.org/licenses/LICENSE-2.0 85 * 86 * Unless required by applicable law or agreed to in writing, software 87 * distributed under the License is distributed on an "AS IS" BASIS, 88 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 89 * See the License for the specific language governing permissions and 90 * limitations under the License. 91 */ function A(e,t){x(e.emulator,"Emulator should always be set here");let{url:n}=e.emulator;return t?`${n}${t.startsWith("/")?t.slice(1):t}`:n}/** 92 * @license 93 * Copyright 2020 Google LLC 94 * 95 * Licensed under the Apache License, Version 2.0 (the "License"); 96 * you may not use this file except in compliance with the License. 97 * You may obtain a copy of the License at 98 * 99 * http://www.apache.org/licenses/LICENSE-2.0 100 * 101 * Unless required by applicable law or agreed to in writing, software 102 * distributed under the License is distributed on an "AS IS" BASIS, 103 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 104 * See the License for the specific language governing permissions and 105 * limitations under the License. 106 */ class O{static initialize(e,t,n){this.fetchImpl=e,t&&(this.headersImpl=t),n&&(this.responseImpl=n)}static fetch(){return this.fetchImpl?this.fetchImpl:"undefined"!=typeof self&&"fetch"in self?self.fetch:void E("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){return this.headersImpl?this.headersImpl:"undefined"!=typeof self&&"Headers"in self?self.Headers:void E("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){return this.responseImpl?this.responseImpl:"undefined"!=typeof self&&"Response"in self?self.Response:void E("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}/** 107 * @license 108 * Copyright 2020 Google LLC 109 * 110 * Licensed under the Apache License, Version 2.0 (the "License"); 111 * you may not use this file except in compliance with the License. 112 * You may obtain a copy of the License at 113 * 114 * http://www.apache.org/licenses/LICENSE-2.0 115 * 116 * Unless required by applicable law or agreed to in writing, software 117 * distributed under the License is distributed on an "AS IS" BASIS, 118 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 119 * See the License for the specific language governing permissions and 120 * limitations under the License. 121 */ let D={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"},N=new R(3e4,6e4);function P(e,t){return e.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:e.tenantId}):t}async function F(e,t,n,r,s={}){return M(e,s,async()=>{let s={},o={};r&&("GET"===t?o=r:s={body:JSON.stringify(r)});let a=(0,i.xO)(Object.assign({key:e.config.apiKey},o)).slice(1),l=await e._getAdditionalHeaders();return l["Content-Type"]="application/json",e.languageCode&&(l["X-Firebase-Locale"]=e.languageCode),O.fetch()(j(e,e.config.apiHost,n,a),Object.assign({method:t,headers:l,referrerPolicy:"no-referrer"},s))})}async function M(e,t,n){e._canInitEmulator=!1;let r=Object.assign(Object.assign({},D),t);try{let s=new U(e),o=await Promise.race([n(),s.promise]);s.clearNetworkTimeout();let a=await o.json();if("needConfirmation"in a)throw B(e,"account-exists-with-different-credential",a);if(o.ok&&!("errorMessage"in a))return a;{let l=o.ok?a.errorMessage:a.error.message,[u,c]=l.split(" : ");if("FEDERATED_USER_ID_ALREADY_LINKED"===u)throw B(e,"credential-already-in-use",a);if("EMAIL_EXISTS"===u)throw B(e,"email-already-in-use",a);if("USER_DISABLED"===u)throw B(e,"user-disabled",a);let h=r[u]||u.toLowerCase().replace(/[_\s]+/g,"-");if(c)throw v(e,h,c);g(e,h)}}catch(d){if(d instanceof i.ZR)throw d;g(e,"network-request-failed")}}async function L(e,t,n,r,i={}){let s=await F(e,t,n,r,i);return"mfaPendingCredential"in s&&g(e,"multi-factor-auth-required",{_serverResponse:s}),s}function j(e,t,n,r){let i=`${t}${n}?${r}`;return e.config.emulator?A(e.config,i):`${e.config.apiScheme}://${i}`}class U{constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((e,t)=>
121{this.timer=setTimeout(()=>t(y(this.auth,"network-request-failed")),N.get())})}clearNetworkTimeout(){clearTimeout(this.timer)}}function B(e,t,n){let r={appName:e.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);let i=y(e,t,r);return i.customData._tokenResponse=n,i}/** 122 * @license 123 * Copyright 2020 Google LLC 124 * 125 * Licensed under the Apache License, Version 2.0 (the "License"); 126 * you may not use this file except in compliance with the License. 127 * You may obtain a copy of the License at 128 * 129 * http://www.apache.org/licenses/LICENSE-2.0 130 * 131 * Unless required by applicable law or agreed to in writing, software 132 * distributed under the License is distributed on an "AS IS" BASIS, 133 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 134 * See the License for the specific language governing permissions and 135 * limitations under the License. 136 */ async function Z(e,t){return F(e,"POST","/v1/accounts:delete",t)}async function $(e,t){return F(e,"POST","/v1/accounts:update",t)}async function V(e,t){return F(e,"POST","/v1/accounts:lookup",t)}/** 137 * @license 138 * Copyright 2020 Google LLC 139 * 140 * Licensed under the Apache License, Version 2.0 (the "License"); 141 * you may not use this file except in compliance with the License. 142 * You may obtain a copy of the License at 143 * 144 * http://www.apache.org/licenses/LICENSE-2.0 145 * 146 * Unless required by applicable law or agreed to in writing, software 147 * distributed under the License is distributed on an "AS IS" BASIS, 148 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 149 * See the License for the specific language governing permissions and 150 * limitations under the License. 151 */ function z(e){if(e)try{let t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(n){}}async function q(e,t=!1){let n=(0,i.m9)(e),r=await n.getIdToken(t),s=W(r);w(s&&s.exp&&s.auth_time&&s.iat,n.auth,"internal-error");let o="object"==typeof s.firebase?s.firebase:void 0,a=null==o?void 0:o.sign_in_provider;return{claims:s,token:r,authTime:z(G(s.auth_time)),issuedAtTime:z(G(s.iat)),expirationTime:z(G(s.exp)),signInProvider:a||null,signInSecondFactor:(null==o?void 0:o.sign_in_second_factor)||null}}function G(e){return 1e3*Number(e)}function W(e){var t;let[n,r,s]=e.split(".");if(void 0===n||void 0===r||void 0===s)return m("JWT malformed, contained fewer than 3 sections"),null;try{let o=(0,i.tV)(r);if(!o)return m("Failed to decode base64 JWT payload"),null;return JSON.parse(o)}catch(a){return m("Caught error parsing JWT payload as JSON",null===(t=a)||void 0===t?void 0:t.toString()),null}}/** 152 * @license 153 * Copyright 2020 Google LLC 154 * 155 * Licensed under the Apache License, Version 2.0 (the "License"); 156 * you may not use this file except in compliance with the License. 157 * You may obtain a copy of the License at 158 * 159 * http://www.apache.org/licenses/LICENSE-2.0 160 * 161 * Unless required by applicable law or agreed to in writing, software 162 * distributed under the License is distributed on an "AS IS" BASIS, 163 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 164 * See the License for the specific language governing permissions and 165 * limitations under the License. 166 */ async function H(e,t,n=!1){if(n)return t;try{return await t}catch(r){throw r instanceof i.ZR&&function({code:e}){return"auth/user-disabled"===e||"auth/user-token-expired"===e}(r)&&e.auth.currentUser===e&&await e.auth.signOut(),r}}/** 167 * @license 168 * Copyright 2020 Google LLC 169 * 170 * Licensed under the Apache License, Version 2.0 (the "License"); 171 * you may not use this file except in compliance with the License. 172 * You may obtain a copy of the License at 173 * 174 * http://www.apache.org/licenses/LICENSE-2.0 175 * 176 * Unless required by applicable law or agreed to in writing, software 177 * distributed under the License is distributed on an "AS IS" BASIS, 178 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 179 * See the License for the specific language governing permissions and 180 * limitations under the License. 181 */ class K{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,null!==this.timerId&&clearTimeout(this.timerId))}getInterval(e){var t;if(e){let n=this.errorBackoff;return this.errorBackoff=Math.min(2*this.errorBackoff,96e4),n}{this.errorBackoff=3e4;let r=null!==(t=this.user.stsTokenManager.expirationTime)&&void 0!==t?t:0,i=r-Date.now()-3e5;return Math.max(0,i)}}schedule(e=!1){if(!this.isRunning)return;let t=this.getInterval(e);this.timerId=setTimeout(async()=>{await this.iteration()},t)}async iteration(){var e;try{await this.user.getIdToken(!0)}catch(t){(null===(e=t)||void 0===e?void 0:e.code)==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}}/** 182 * @license 183 * Copyright 2020 Google LLC 184 * 185 * Licensed under the Apache License, Version 2.0 (the "License");
186 * you may not use this file except in compliance with the License. 187 * You may obtain a copy of the License at 188 * 189 * http://www.apache.org/licenses/LICENSE-2.0 190 * 191 * Unless required by applicable law or agreed to in writing, software 192 * distributed under the License is distributed on an "AS IS" BASIS, 193 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 194 * See the License for the specific language governing permissions and 195 * limitations under the License. 196 */ class Y{constructor(e,t){this.createdAt=e,this.lastLoginAt=t,this._initializeTime()}_initializeTime(){this.lastSignInTime=z(this.lastLoginAt),this.creationTime=z(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}/** 197 * @license 198 * Copyright 2019 Google LLC 199 * 200 * Licensed under the Apache License, Version 2.0 (the "License"); 201 * you may not use this file except in compliance with the License. 202 * You may obtain a copy of the License at 203 * 204 * http://www.apache.org/licenses/LICENSE-2.0 205 * 206 * Unless required by applicable law or agreed to in writing, software 207 * distributed under the License is distributed on an "AS IS" BASIS, 208 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 209 * See the License for the specific language governing permissions and 210 * limitations under the License. 211 */ async function Q(e){var t,n;let r=e.auth,i=await e.getIdToken(),s=await H(e,V(r,{idToken:i}));w(null==s?void 0:s.users.length,r,"internal-error");let o=s.users[0];e._notifyReloadListener(o);let l=(null===(t=o.providerUserInfo)||void 0===t?void 0:t.length)?(n=o.providerUserInfo,n.map(e=>{var{providerId:t}=e,n=(0,a.__rest)(e,["providerId"]);return{providerId:t,uid:n.rawId||"",displayName:n.displayName||null,email:n.email||null,phoneNumber:n.phoneNumber||null,photoURL:n.photoUrl||null}})):[],u=function(e,t){let n=e.filter(e=>!t.some(t=>t.providerId===e.providerId));return[...n,...t]}(e.providerData,l),c=e.isAnonymous,h=!(e.email&&o.passwordHash)&&!(null==u?void 0:u.length),d={uid:o.localId,displayName:o.displayName||null,photoURL:o.photoUrl||null,email:o.email||null,emailVerified:o.emailVerified||!1,phoneNumber:o.phoneNumber||null,tenantId:o.tenantId||null,providerData:u,metadata:new Y(o.createdAt,o.lastLoginAt),isAnonymous:!!c&&h};Object.assign(e,d)}async function X(e){let t=(0,i.m9)(e);await Q(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}/** 212 * @license 213 * Copyright 2020 Google LLC 214 * 215 * Licensed under the Apache License, Version 2.0 (the "License"); 216 * you may not use this file except in compliance with the License. 217 * You may obtain a copy of the License at 218 * 219 * http://www.apache.org/licenses/LICENSE-2.0 220 * 221 * Unless required by applicable law or agreed to in writing, software 222 * distributed under the License is distributed on an "AS IS" BASIS, 223 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 224 * See the License for the specific language governing permissions and 225 * limitations under the License. 226 */ async function J(e,t){let n=await M(e,{},async()=>{let n=(0,i.xO)({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:r,apiKey:s}=e.config,o=j(e,r,"/v1/token",`key=${s}`),a=await e._getAdditionalHeaders();return a["Content-Type"]="application/x-www-form-urlencoded",O.fetch()(o,{method:"POST",headers:a,body:n})});return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}}/** 227 * @license 228 * Copyright 2020 Google LLC 229 * 230 * Licensed under the Apache License, Version 2.0 (the "License"); 231 * you may not use this file except in compliance with the License. 232 * You may obtain a copy of the License at 233 * 234 * http://www.apache.org/licenses/LICENSE-2.0 235 * 236 * Unless required by applicable law or agreed to in writing, software 237 * distributed under the License is distributed on an "AS IS" BASIS, 238 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 239 * See the License for the specific language governing permissions and 240 * limitations under the License. 241 */ class ee{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){w(e.idToken,"internal-error"),w(void 0!==e.idToken,"internal-error"),w(void 0!==e.refreshToken,"internal-error");
241let t="expiresIn"in e&&void 0!==e.expiresIn?Number(e.expiresIn):function(e){let t=W(e);return w(t,"internal-error"),w(void 0!==t.exp,"internal-error"),w(void 0!==t.iat,"internal-error"),Number(t.exp)-Number(t.iat)}(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,t)}async getToken(e,t=!1){return(w(!this.accessToken||this.refreshToken,e,"user-token-expired"),t||!this.accessToken||this.isExpired)?this.refreshToken?(await this.refresh(e,this.refreshToken),this.accessToken):null:this.accessToken}clearRefreshToken(){this.refreshToken=null}async refresh(e,t){let{accessToken:n,refreshToken:r,expiresIn:i}=await J(e,t);this.updateTokensAndExpiration(n,r,Number(i))}updateTokensAndExpiration(e,t,n){this.refreshToken=t||null,this.accessToken=e||null,this.expirationTime=Date.now()+1e3*n}static fromJSON(e,t){let{refreshToken:n,accessToken:r,expirationTime:i}=t,s=new ee;return n&&(w("string"==typeof n,"internal-error",{appName:e}),s.refreshToken=n),r&&(w("string"==typeof r,"internal-error",{appName:e}),s.accessToken=r),i&&(w("number"==typeof i,"internal-error",{appName:e}),s.expirationTime=i),s}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 ee,this.toJSON())}_performRefresh(){return E("not implemented")}}/** 242 * @license 243 * Copyright 2020 Google LLC 244 * 245 * Licensed under the Apache License, Version 2.0 (the "License"); 246 * you may not use this file except in compliance with the License. 247 * You may obtain a copy of the License at 248 * 249 * http://www.apache.org/licenses/LICENSE-2.0 250 * 251 * Unless required by applicable law or agreed to in writing, software 252 * distributed under the License is distributed on an "AS IS" BASIS, 253 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 254 * See the License for the specific language governing permissions and 255 * limitations under the License. 256 */ function et(e,t){w("string"==typeof e||void 0===e,"internal-error",{appName:t})}class en{constructor(e){var{uid:t,auth:n,stsTokenManager:r}=e,i=(0,a.__rest)(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new K(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=t,this.auth=n,this.stsTokenManager=r,this.accessToken=r.accessToken,this.displayName=i.displayName||null,this.email=i.email||null,this.emailVerified=i.emailVerified||!1,this.phoneNumber=i.phoneNumber||null,this.photoURL=i.photoURL||null,this.isAnonymous=i.isAnonymous||!1,this.tenantId=i.tenantId||null,this.providerData=i.providerData?[...i.providerData]:[],this.metadata=new Y(i.createdAt||void 0,i.lastLoginAt||void 0)}async getIdToken(e){let t=await H(this,this.stsTokenManager.getToken(this.auth,e));return w(t,this.auth,"internal-error"),this.accessToken!==t&&(this.accessToken=t,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),t}getIdTokenResult(e){return q(this,e)}reload(){return X(this)}_assign(e){this!==e&&(w(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(e=>Object.assign({},e)),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){return new en(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}))}_onReload(e){w(!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,t=!1){let n=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),n=!0),t&&await Q(this),await this.auth._persistUserIfCurrent(this),n&&this.auth._notifyListenersIfCurrent(this)}async delete(){let e=await this.getIdToken();return await H(this,Z(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,isA
256nonymous: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,t){var n,r,i,s,o,a,l,u;let c=null!==(n=t.displayName)&&void 0!==n?n:void 0,h=null!==(r=t.email)&&void 0!==r?r:void 0,d=null!==(i=t.phoneNumber)&&void 0!==i?i:void 0,f=null!==(s=t.photoURL)&&void 0!==s?s:void 0,p=null!==(o=t.tenantId)&&void 0!==o?o:void 0,m=null!==(a=t._redirectEventId)&&void 0!==a?a:void 0,g=null!==(l=t.createdAt)&&void 0!==l?l:void 0,y=null!==(u=t.lastLoginAt)&&void 0!==u?u:void 0,{uid:v,emailVerified:_,isAnonymous:b,providerData:E,stsTokenManager:x}=t;w(v&&x,e,"internal-error");let S=ee.fromJSON(this.name,x);w("string"==typeof v,e,"internal-error"),et(c,e.name),et(h,e.name),w("boolean"==typeof _,e,"internal-error"),w("boolean"==typeof b,e,"internal-error"),et(d,e.name),et(f,e.name),et(p,e.name),et(m,e.name),et(g,e.name),et(y,e.name);let T=new en({uid:v,auth:e,email:h,emailVerified:_,displayName:c,isAnonymous:b,photoURL:f,phoneNumber:d,tenantId:p,stsTokenManager:S,createdAt:g,lastLoginAt:y});return E&&Array.isArray(E)&&(T.providerData=E.map(e=>Object.assign({},e))),m&&(T._redirectEventId=m),T}static async _fromIdTokenResponse(e,t,n=!1){let r=new ee;r.updateFromServerResponse(t);let i=new en({uid:t.localId,auth:e,stsTokenManager:r,isAnonymous:n});return await Q(i),i}}/** 257 * @license 258 * Copyright 2019 Google LLC 259 * 260 * Licensed under the Apache License, Version 2.0 (the "License"); 261 * you may not use this file except in compliance with the License. 262 * You may obtain a copy of the License at 263 * 264 * http://www.apache.org/licenses/LICENSE-2.0 265 * 266 * Unless required by applicable law or agreed to in writing, software 267 * distributed under the License is distributed on an "AS IS" BASIS, 268 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 269 * See the License for the specific language governing permissions and 270 * limitations under the License. 271 */ class er{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(e,t){this.storage[e]=t}async _get(e){let t=this.storage[e];return void 0===t?null:t}async _remove(e){delete this.storage[e]}_addListener(e,t){}_removeListener(e,t){}}er.type="NONE";let ei=er;/** 272 * @license 273 * Copyright 2019 Google LLC 274 * 275 * Licensed under the Apache License, Version 2.0 (the "License"); 276 * you may not use this file except in compliance with the License. 277 * You may obtain a copy of the License at 278 * 279 * http://www.apache.org/licenses/LICENSE-2.0 280 * 281 * Unless required by applicable law or agreed to in writing, software 282 * distributed under the License is distributed on an "AS IS" BASIS, 283 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 284 * See the License for the specific language governing permissions and 285 * limitations under the License.
286 */ function es(e,t,n){return`firebase:${e}:${t}:${n}`}class eo{constructor(e,t,n){this.persistence=e,this.auth=t,this.userKey=n;let{config:r,name:i}=this.auth;this.fullUserKey=es(this.userKey,r.apiKey,i),this.fullPersistenceKey=es("persistence",r.apiKey,i),this.boundEventHandler=t._onStorageEvent.bind(t),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}async getCurrentUser(){let e=await this.persistence._get(this.fullUserKey);return e?en._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;let t=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=e,t)return this.setCurrentUser(t)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(e,t,n="authUser"){if(!t.length)return new eo(T(ei),e,n);let r=(await Promise.all(t.map(async e=>{if(await e._isAvailable())return e}))).filter(e=>e),i=r[0]||T(ei),s=es(n,e.config.apiKey,e.name),o=null;for(let a of t)try{let l=await a._get(s);if(l){let u=en._fromJSON(e,l);a!==i&&(o=u),i=a;break}}catch(c){}let h=r.filter(e=>e._shouldAllowMigration);return i._shouldAllowMigration&&h.length&&(i=h[0],o&&await i._set(s,o.toJSON()),await Promise.all(t.map(async e=>{if(e!==i)try{await e._remove(s)}catch(t){}}))),new eo(i,e,n)}}/** 287 * @license 288 * Copyright 2020 Google LLC 289 * 290 * Licensed under the Apache License, Version 2.0 (the "License"); 291 * you may not use this file except in compliance with the License. 292 * You may obtain a copy of the License at 293 * 294 * http://www.apache.org/licenses/LICENSE-2.0 295 * 296 * Unless required by applicable law or agreed to in writing, software 297 * distributed under the License is distributed on an "AS IS" BASIS, 298 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 299 * See the License for the specific language governing permissions and 300 * limitations under the License. 301 */ function ea(e){let t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(eh(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";{if(t.includes("edge/"))return"Edge";if(el(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(ef(t))return"Blackberry";if(ep(t))return"Webos";if(eu(t))return"Safari";if((t.includes("chrome/")||ec(t))&&!t.includes("edge/"))return"Chrome";if(ed(t))return"Android";let n=e.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/);if((null==n?void 0:n.length)===2)return n[1]}return"Other"}function el(e=(0,i.z$)()){return/firefox\//i.test(e)}function eu(e=(0,i.z$)()){let t=e.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function ec(e=(0,i.z$)()){return/crios\//i.test(e)}function eh(e=(0,i.z$)()){return/iemobile/i.test(e)}function ed(e=(0,i.z$)()){return/android/i.test(e)}function ef(e=(0,i.z$)()){return/blackberry/i.test(e)}function ep(e=(0,i.z$)()){return/webos/i.test(e)}function em(e=(0,i.z$)()){return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function eg(e=(0,i.z$)()){return/(iPad|iPhone|iPod).*OS 7_\d/i.test(e)||/(iPad|iPhone|iPod).*OS 8_\d/i.test(e)}function ey(e=(0,i.z$)()){return em(e)||ed(e)||ep(e)||ef(e)||/windows phone/i.test(e)||eh(e)}/** 302 * @license 303 * Copyright 2020 Google LLC 304 * 305 * Licensed under the Apache License, Version 2.0 (the "License"); 306 * you may not use this file except in compliance with the License. 307 * You may obtain a copy of the License at 308 * 309 * http://www.apache.org/licenses/LICENSE-2.0 310 * 311 * Unless required by applicable law or agreed to in writing, software 312 * distributed under the License is distributed on an "AS IS" BASIS, 313 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 314 * See the License for the specific language governing permissions and 315 * limitations under the License. 316 */ function ev(e,t=[]){let n;switch(e){case"Browser":n=ea((0,i.z$)());break;case"Worker":n=`${ea((0,i.z$)())}-${e}`;break;default:n=e}let r=t.length?t.join(","):"FirebaseCore-web";return`${n}/JsCore/${s.SDK_VERSION}/${r}`}/** 317 * @license 318 * Copyright 2022 Google LLC 319 * 320 * Licensed under the Apache License, Version 2.0 (the "License");
321 * you may not use this file except in compliance with the License. 322 * You may obtain a copy of the License at 323 * 324 * http://www.apache.org/licenses/LICENSE-2.0 325 * 326 * Unless required by applicable law or agreed to in writing, software 327 * distributed under the License is distributed on an "AS IS" BASIS, 328 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 329 * See the License for the specific language governing permissions and 330 * limitations under the License. 331 */ class e_{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,t){let n=t=>new Promise((n,r)=>{try{let i=e(t);n(i)}catch(s){r(s)}});n.onAbort=t,this.queue.push(n);let r=this.queue.length-1;return()=>{this.queue[r]=()=>Promise.resolve()}}async runMiddleware(e){var t;if(this.auth.currentUser===e)return;let n=[];try{for(let r of this.queue)await r(e),r.onAbort&&n.push(r.onAbort)}catch(o){for(let i of(n.reverse(),n))try{i()}catch(s){}throw this.auth._errorFactory.create("login-blocked",{originalMessage:null===(t=o)||void 0===t?void 0:t.message})}}}/** 332 * @license 333 * Copyright 2020 Google LLC 334 * 335 * Licensed under the Apache License, Version 2.0 (the "License"); 336 * you may not use this file except in compliance with the License. 337 * You may obtain a copy of the License at 338 * 339 * http://www.apache.org/licenses/LICENSE-2.0 340 * 341 * Unless required by applicable law or agreed to in writing, software 342 * distributed under the License is distributed on an "AS IS" BASIS, 343 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 344 * See the License for the specific language governing permissions and 345 * limitations under the License. 346 */ class eb{constructor(e,t,n){this.app=e,this.heartbeatServiceProvider=t,this.config=n,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new eE(this),this.idTokenSubscription=new eE(this),this.beforeStateQueue=new e_(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=f,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,t){return t&&(this._popupRedirectResolver=T(t)),this._initializationPromise=this.queue(async()=>{var n,r;if(!this._deleted&&(this.persistenceManager=await eo.create(this,e),!this._deleted)){if(null===(n=this._popupRedirectResolver)||void 0===n?void 0:n._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch(i){}await this.initializeCurrentUser(t),this.lastNotifiedUid=(null===(r=this.currentUser)||void 0===r?void 0:r.uid)||null,!this._deleted&&(this._isInitialized=!0)}}),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;let e=await this.assertedPersistence.getCurrentUser();if(this.currentUser||e){if(this.currentUser&&e&&this.currentUser.uid===e.uid){this._currentUser._assign(e),await this.currentUser.getIdToken();return}await this._updateCurrentUser(e,!0)}}async initializeCurrentUser(e){var t;let n=await this.assertedPersistence.getCurrentUser(),r=n,i=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();let s=null===(t=this.redirectUser)||void 0===t?void 0:t._redirectEventId,o=null==r?void 0:r._redirectEventId,a=await this.tryRedirectSignIn(e);(!s||s===o)&&(null==a?void 0:a.user)&&(r=a.user,i=!0)}if(!r)return this.directlySetCurrentUser(null);if(!r._redirectEventId){if(i)try{await this.beforeStateQueue.runMiddleware(r)}catch(l){r=n,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(l))}return r?this.reloadAndSetCurrentUserOrClear(r):this.directlySetCurrentUser(null)}return(w(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===r._redirectEventId)?this.directlySetCurrentUser(r):this.reloadAndSetCurrentUserOrClear(r)}async tryRedirectSignIn(e){let t=null;try{t=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch(n){await this._setRedirectUser(null)}return t}async reloadAndSetCurrentUserOrClear(e){var t;try{await Q(e)}catch(n){if((null===(t=n)||void 0===t?void 0:t.code)!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=function(){if("undefined"==typeof navigator)return null;let e=navigator;return e.languages&&e.languages[0]||e.language||null}()}async _delete(){this._deleted=!0}
346async updateCurrentUser(e){let t=e?(0,i.m9)(e):null;return t&&w(t.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(t&&t._clone(this))}async _updateCurrentUser(e,t=!1){if(!this._deleted)return e&&w(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),t||await this.beforeStateQueue.runMiddleware(e),this.queue(async()=>{await this.directlySetCurrentUser(e),this.notifyAuthListeners()})}async signOut(){return await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0)}setPersistence(e){return this.queue(async()=>{await this.assertedPersistence.setPersistence(T(e))})}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(e){this._errorFactory=new i.LL("auth","Firebase",e())}onAuthStateChanged(e,t,n){return this.registerStateListener(this.authStateSubscription,e,t,n)}beforeAuthStateChanged(e,t){return this.beforeStateQueue.pushCallback(e,t)}onIdTokenChanged(e,t,n){return this.registerStateListener(this.idTokenSubscription,e,t,n)}toJSON(){var e;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:null===(e=this._currentUser)||void 0===e?void 0:e.toJSON()}}async _setRedirectUser(e,t){let n=await this.getOrInitRedirectPersistenceManager(t);return null===e?n.removeCurrentUser():n.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){let t=e&&T(e)||this._popupRedirectResolver;w(t,this,"argument-error"),this.redirectPersistenceManager=await eo.create(this,[T(t._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){var t,n;return(this._isInitialized&&await this.queue(async()=>{}),(null===(t=this._currentUser)||void 0===t?void 0:t._redirectEventId)===e)?this._currentUser:(null===(n=this.redirectUser)||void 0===n?void 0:n._redirectEventId)===e?this.redirectUser:null}async _persistUserIfCurrent(e){if(e===this.currentUser)return this.queue(async()=>this.directlySetCurrentUser(e))}_notifyListenersIfCurrent(e){e===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var e,t;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);let n=null!==(t=null===(e=this.currentUser)||void 0===e?void 0:e.uid)&&void 0!==t?t:null;this.lastNotifiedUid!==n&&(this.lastNotifiedUid=n,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,t,n,r){if(this._deleted)return()=>{};let i="function"==typeof t?t:t.next.bind(t),s=this._isInitialized?Promise.resolve():this._initializationPromise;return(w(s,this,"internal-error"),s.then(()=>i(this.currentUser)),"function"==typeof t)?e.addObserver(t,n,r):e.addObserver(t)}async directlySetCurrentUser(e){this.currentUser&&this.currentUser!==e&&this._currentUser._stopProactiveRefresh(),e&&this.isProactiveRefreshEnabled&&e._startProactiveRefresh(),this.currentUser=e,e?await this.assertedPersistence.setCurrentUser(e):await this.assertedPersistence.removeCurrentUser()}queue(e){return this.operations=this.operations.then(e,e),this.operations}get assertedPersistence(){return w(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){!(!e||this.frameworks.includes(e))&&(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=ev(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){var e;let t={"X-Client-Version":this.clientVersion};this.app.options.appId&&(t["X-Firebase-gmpid"]=this.app.options.appId);let n=await (null===(e=this.heartbeatServiceProvider.getImmediate({optional:!0}))||void 0===e?void 0:e.getHeartbeatsHeader());return n&&(t["X-Firebase-Client"]=n),t}}function ew(e){return(0,i.m9)(e)}class eE{constructor(e){this.auth=e,this.observer=null,this.addObserver=(0,i.ne)(e=>this.observer=e)}get next(){return w(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}function ex(e,t,n){let r=ew(e);w(r._canInitEmulator,r,"emulator-config-failed"),w(/^https?:\/\//.test(t),r,"invali
346d-emulator-scheme");let i=!!(null==n?void 0:n.disableWarnings),s=eS(t),{host:o,port:a}=function(e){let t=eS(e),n=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!n)return{host:"",port:null};let r=n[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(r);if(i){let s=i[1];return{host:s,port:eT(r.substr(s.length+1))}}{let[o,a]=r.split(":");return{host:o,port:eT(a)}}}(t),l=null===a?"":`:${a}`;r.config.emulator={url:`${s}//${o}${l}/`},r.settings.appVerificationDisabledForTesting=!0,r.emulatorConfig=Object.freeze({host:o,port:a,protocol:s.replace(":",""),options:Object.freeze({disableWarnings:i})}),i||function(){function e(){let e=document.createElement("p"),t=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",t.position="fixed",t.width="100%",t.backgroundColor="#ffffff",t.border=".1em solid #000000",t.color="#b50000",t.bottom="0px",t.left="0px",t.margin="0px",t.zIndex="10000",t.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}"undefined"!=typeof console&&"function"==typeof console.info&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials."),"undefined"!=typeof window&&"undefined"!=typeof document&&("loading"===document.readyState?window.addEventListener("DOMContentLoaded",e):e())}()}function eS(e){let t=e.indexOf(":");return t<0?"":e.substr(0,t+1)}function eT(e){if(!e)return null;let t=Number(e);return isNaN(t)?null:t}/** 347 * @license 348 * Copyright 2020 Google LLC 349 * 350 * Licensed under the Apache License, Version 2.0 (the "License"); 351 * you may not use this file except in compliance with the License. 352 * You may obtain a copy of the License at 353 * 354 * http://www.apache.org/licenses/LICENSE-2.0 355 * 356 * Unless required by applicable law or agreed to in writing, software 357 * distributed under the License is distributed on an "AS IS" BASIS, 358 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 359 * See the License for the specific language governing permissions and 360 * limitations under the License. 361 */ class eI{constructor(e,t){this.providerId=e,this.signInMethod=t}toJSON(){return E("not implemented")}_getIdTokenResponse(e){return E("not implemented")}_linkToIdToken(e,t){return E("not implemented")}_getReauthenticationResolver(e){return E("not implemented")}}/** 362 * @license 363 * Copyright 2020 Google LLC 364 * 365 * Licensed under the Apache License, Version 2.0 (the "License"); 366 * you may not use this file except in compliance with the License. 367 * You may obtain a copy of the License at 368 * 369 * http://www.apache.org/licenses/LICENSE-2.0 370 * 371 * Unless required by applicable law or agreed to in writing, software 372 * distributed under the License is distributed on an "AS IS" BASIS, 373 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 374 * See the License for the specific language governing permissions and 375 * limitations under the License. 376 */ async function ek(e,t){return F(e,"POST","/v1/accounts:resetPassword",P(e,t))}async function eC(e,t){return F(e,"POST","/v1/accounts:update",t)}async function eR(e,t){return F(e,"POST","/v1/accounts:update",P(e,t))}/** 377 * @license 378 * Copyright 2020 Google LLC 379 * 380 * Licensed under the Apache License, Version 2.0 (the "License"); 381 * you may not use this file except in compliance with the License. 382 * You may obtain a copy of the License at 383 * 384 * http://www.apache.org/licenses/LICENSE-2.0 385 * 386 * Unless required by applicable law or agreed to in writing, software 387 * distributed under the License is distributed on an "AS IS" BASIS, 388 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 389 * See the License for the specific language governing permissions and 390 * limitations under the License. 391 */ async function eA(e,t){return L(e,"POST","/v1/accounts:signInWithPassword",P(e,t))}async function eO(e,t){return F(e,"POST","/v1/accounts:sendOobCode",P(e,t))}async function eD(e,t){return eO(e,t)}async function eN(e,t){return eO(e,t)}async function eP(e,t){return eO(e,t)}async function eF(e,t){return eO(e,t)}/** 392 * @license 393 * Copyright 2020 Google LLC 394 * 395 * Licensed under the Apache License, Version 2.0 (the "License");
396 * you may not use this file except in compliance with the License. 397 * You may obtain a copy of the License at 398 * 399 * http://www.apache.org/licenses/LICENSE-2.0 400 * 401 * Unless required by applicable law or agreed to in writing, software 402 * distributed under the License is distributed on an "AS IS" BASIS, 403 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 404 * See the License for the specific language governing permissions and 405 * limitations under the License. 406 */ async function eM(e,t){return L(e,"POST","/v1/accounts:signInWithEmailLink",P(e,t))}async function eL(e,t){return L(e,"POST","/v1/accounts:signInWithEmailLink",P(e,t))}/** 407 * @license 408 * Copyright 2020 Google LLC 409 * 410 * Licensed under the Apache License, Version 2.0 (the "License"); 411 * you may not use this file except in compliance with the License. 412 * You may obtain a copy of the License at 413 * 414 * http://www.apache.org/licenses/LICENSE-2.0 415 * 416 * Unless required by applicable law or agreed to in writing, software 417 * distributed under the License is distributed on an "AS IS" BASIS, 418 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 419 * See the License for the specific language governing permissions and 420 * limitations under the License. 421 */ class ej extends eI{constructor(e,t,n,r=null){super("password",n),this._email=e,this._password=t,this._tenantId=r}static _fromEmailAndPassword(e,t){return new ej(e,t,"password")}static _fromEmailAndCode(e,t,n=null){return new ej(e,t,"emailLink",n)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(e){let t="string"==typeof e?JSON.parse(e):e;if((null==t?void 0:t.email)&&(null==t?void 0:t.password)){if("password"===t.signInMethod)return this._fromEmailAndPassword(t.email,t.password);if("emailLink"===t.signInMethod)return this._fromEmailAndCode(t.email,t.password,t.tenantId)}return null}async _getIdTokenResponse(e){switch(this.signInMethod){case"password":return eA(e,{returnSecureToken:!0,email:this._email,password:this._password});case"emailLink":return eM(e,{email:this._email,oobCode:this._password});default:g(e,"internal-error")}}async _linkToIdToken(e,t){switch(this.signInMethod){case"password":return eC(e,{idToken:t,returnSecureToken:!0,email:this._email,password:this._password});case"emailLink":return eL(e,{idToken:t,email:this._email,oobCode:this._password});default:g(e,"internal-error")}}_getReauthenticationResolver(e){return this._getIdTokenResponse(e)}}/** 422 * @license 423 * Copyright 2020 Google LLC 424 * 425 * Licensed under the Apache License, Version 2.0 (the "License"); 426 * you may not use this file except in compliance with the License. 427 * You may obtain a copy of the License at 428 * 429 * http://www.apache.org/licenses/LICENSE-2.0 430 * 431 * Unless required by applicable law or agreed to in writing, software 432 * distributed under the License is distributed on an "AS IS" BASIS, 433 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 434 * See the License for the specific language governing permissions and 435 * limitations under the License. 436 */ async function eU(e,t){return L(e,"POST","/v1/accounts:signInWithIdp",P(e,t))}class eB extends eI{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){let t=new eB(e.providerId,e.signInMethod);return e.idToken||e.accessToken?(e.idToken&&(t.idToken=e.idToken),e.accessToken&&(t.accessToken=e.accessToken),e.nonce&&!e.pendingToken&&(t.nonce=e.nonce),e.pendingToken&&(t.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(t.accessToken=e.oauthToken,t.secret=e.oauthTokenSecret):g("argument-error"),t}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,n
436once:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){let t="string"==typeof e?JSON.parse(e):e,{providerId:n,signInMethod:r}=t,i=(0,a.__rest)(t,["providerId","signInMethod"]);if(!n||!r)return null;let s=new eB(n,r);return s.idToken=i.idToken||void 0,s.accessToken=i.accessToken||void 0,s.secret=i.secret,s.nonce=i.nonce,s.pendingToken=i.pendingToken||null,s}_getIdTokenResponse(e){let t=this.buildRequest();return eU(e,t)}_linkToIdToken(e,t){let n=this.buildRequest();return n.idToken=t,eU(e,n)}_getReauthenticationResolver(e){let t=this.buildRequest();return t.autoCreate=!1,eU(e,t)}buildRequest(){let e={requestUri:"http://localhost",returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{let t={};this.idToken&&(t.id_token=this.idToken),this.accessToken&&(t.access_token=this.accessToken),this.secret&&(t.oauth_token_secret=this.secret),t.providerId=this.providerId,this.nonce&&!this.pendingToken&&(t.nonce=this.nonce),e.postBody=(0,i.xO)(t)}return e}}/** 437 * @license 438 * Copyright 2020 Google LLC 439 * 440 * Licensed under the Apache License, Version 2.0 (the "License"); 441 * you may not use this file except in compliance with the License. 442 * You may obtain a copy of the License at 443 * 444 * http://www.apache.org/licenses/LICENSE-2.0 445 * 446 * Unless required by applicable law or agreed to in writing, software 447 * distributed under the License is distributed on an "AS IS" BASIS, 448 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 449 * See the License for the specific language governing permissions and 450 * limitations under the License. 451 */ async function eZ(e,t){return F(e,"POST","/v1/accounts:sendVerificationCode",P(e,t))}async function e$(e,t){return L(e,"POST","/v1/accounts:signInWithPhoneNumber",P(e,t))}async function eV(e,t){let n=await L(e,"POST","/v1/accounts:signInWithPhoneNumber",P(e,t));if(n.temporaryProof)throw B(e,"account-exists-with-different-credential",n);return n}let ez={USER_NOT_FOUND:"user-not-found"};async function eq(e,t){let n=Object.assign(Object.assign({},t),{operation:"REAUTH"});return L(e,"POST","/v1/accounts:signInWithPhoneNumber",P(e,n),ez)}/** 452 * @license 453 * Copyright 2020 Google LLC 454 * 455 * Licensed under the Apache License, Version 2.0 (the "License"); 456 * you may not use this file except in compliance with the License. 457 * You may obtain a copy of the License at 458 * 459 * http://www.apache.org/licenses/LICENSE-2.0 460 * 461 * Unless required by applicable law or agreed to in writing, software 462 * distributed under the License is distributed on an "AS IS" BASIS, 463 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 464 * See the License for the specific language governing permissions and 465 * limitations under the License. 466 */ class eG extends eI{constructor(e){super("phone","phone"),this.params=e}static _fromVerification(e,t){return new eG({verificationId:e,verificationCode:t})}static _fromTokenResponse(e,t){return new eG({phoneNumber:e,temporaryProof:t})}_getIdTokenResponse(e){return e$(e,this._makeVerificationRequest())}_linkToIdToken(e,t){return eV(e,Object.assign({idToken:t},this._makeVerificationRequest()))}_getReauthenticationResolver(e){return eq(e,this._makeVerificationRequest())}_makeVerificationRequest(){let{temporaryProof:e,phoneNumber:t,verificationId:n,verificationCode:r}=this.params;return e&&t?{temporaryProof:e,phoneNumber:t}:{sessionInfo:n,code:r}}toJSON(){let e={providerId:this.providerId};return this.params.phoneNumber&&(e.phoneNumber=this.params.phoneNumber),this.params.temporaryProof&&(e.temporaryProof=this.params.temporaryProof),this.params.verificationCode&&(e.verificationCode=this.params.verificationCode),this.params.verificationId&&(e.verificationId=this.params.verificationId),e}static fromJSON(e){"string"==typeof e&&(e=JSON.parse(e));let{verificationId:t,verificationCode:n,phoneNumber:r,temporaryProof:i}=e;return n||t||r||i?new eG({verificationId:t,verificationCode:n,phoneNumber:r,temporaryProof:i}):null}}class eW{constructor(e){var t,n,r,s,o,a;let l=(0,i.zd)((0,i.pd)(e)),u=null!==(t=l.apiKey)&&void 0!==t?t:null,c=null!==(n=l.oobCode)&&void 0!==n?n:null,h=/** 467 * @license 468 * Copyright 2020 Google LLC 469 * 470 * Licensed under the Apache License, Version 2.0 (the "License");
471 * you may not use this file except in compliance with the License. 472 * You may obtain a copy of the License at 473 * 474 * http://www.apache.org/licenses/LICENSE-2.0 475 * 476 * Unless required by applicable law or agreed to in writing, software 477 * distributed under the License is distributed on an "AS IS" BASIS, 478 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 479 * See the License for the specific language governing permissions and 480 * limitations under the License. 481 */ function(e){switch(e){case"recoverEmail":return"RECOVER_EMAIL";case"resetPassword":return"PASSWORD_RESET";case"signIn":return"EMAIL_SIGNIN";case"verifyEmail":return"VERIFY_EMAIL";case"verifyAndChangeEmail":return"VERIFY_AND_CHANGE_EMAIL";case"revertSecondFactorAddition":return"REVERT_SECOND_FACTOR_ADDITION";default:return null}}(null!==(r=l.mode)&&void 0!==r?r:null);w(u&&c&&h,"argument-error"),this.apiKey=u,this.operation=h,this.code=c,this.continueUrl=null!==(s=l.continueUrl)&&void 0!==s?s:null,this.languageCode=null!==(o=l.languageCode)&&void 0!==o?o:null,this.tenantId=null!==(a=l.tenantId)&&void 0!==a?a:null}static parseLink(e){let t=function(e){let t=(0,i.zd)((0,i.pd)(e)).link,n=t?(0,i.zd)((0,i.pd)(t)).deep_link_id:null,r=(0,i.zd)((0,i.pd)(e)).deep_link_id,s=r?(0,i.zd)((0,i.pd)(r)).link:null;return s||r||n||t||e}(e);try{return new eW(t)}catch(n){return null}}}/** 482 * @license 483 * Copyright 2020 Google LLC 484 * 485 * Licensed under the Apache License, Version 2.0 (the "License"); 486 * you may not use this file except in compliance with the License. 487 * You may obtain a copy of the License at 488 * 489 * http://www.apache.org/licenses/LICENSE-2.0 490 * 491 * Unless required by applicable law or agreed to in writing, software 492 * distributed under the License is distributed on an "AS IS" BASIS, 493 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 494 * See the License for the specific language governing permissions and 495 * limitations under the License. 496 */ class eH{constructor(){this.providerId=eH.PROVIDER_ID}static credential(e,t){return ej._fromEmailAndPassword(e,t)}static credentialWithLink(e,t){let n=eW.parseLink(t);return w(n,"argument-error"),ej._fromEmailAndCode(e,n.code,n.tenantId)}}eH.PROVIDER_ID="password",eH.EMAIL_PASSWORD_SIGN_IN_METHOD="password",eH.EMAIL_LINK_SIGN_IN_METHOD="emailLink";/** 497 * @license 498 * Copyright 2020 Google LLC 499 * 500 * Licensed under the Apache License, Version 2.0 (the "License"); 501 * you may not use this file except in compliance with the License. 502 * You may obtain a copy of the License at 503 * 504 * http://www.apache.org/licenses/LICENSE-2.0 505 * 506 * Unless required by applicable law or agreed to in writing, software 507 * distributed under the License is distributed on an "AS IS" BASIS, 508 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 509 * See the License for the specific language governing permissions and 510 * limitations under the License. 511 */ class eK{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}}/** 512 * @license 513 * Copyright 2019 Google LLC 514 * 515 * Licensed under the Apache License, Version 2.0 (the "License"); 516 * you may not use this file except in compliance with the License. 517 * You may obtain a copy of the License at 518 * 519 * http://www.apache.org/licenses/LICENSE-2.0 520 * 521 * Unless required by applicable law or agreed to in writing, software 522 * distributed under the License is distributed on an "AS IS" BASIS, 523 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 524 * See the License for the specific language governing permissions and 525 * limitations under the License. 526 */ class eY extends eK{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}class eQ extends eY{static credentialFromJSON(e){let t="string"==typeof e?JSON.parse(e):e;return w("providerId"in t&&"signInMethod"in t,"argument-error"),eB._fromParams(t)}credential(e){return this._credential(Object.assign(Object.assign({},e),{nonce:e.rawNonce}))}_credential(e){return w(e.idToken||e.accessToken,"argument-error"),eB._fromParams(Object.assign(Object.assign({}
526,e),{providerId:this.providerId,signInMethod:this.providerId}))}static credentialFromResult(e){return eQ.oauthCredentialFromTaggedObject(e)}static credentialFromError(e){return eQ.oauthCredentialFromTaggedObject(e.customData||{})}static oauthCredentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthIdToken:t,oauthAccessToken:n,oauthTokenSecret:r,pendingToken:i,nonce:s,providerId:o}=e;if(!n&&!r&&!t&&!i||!o)return null;try{return new eQ(o)._credential({idToken:t,accessToken:n,nonce:s,pendingToken:i})}catch(a){return null}}}/** 527 * @license 528 * Copyright 2020 Google LLC 529 * 530 * Licensed under the Apache License, Version 2.0 (the "License"); 531 * you may not use this file except in compliance with the License. 532 * You may obtain a copy of the License at 533 * 534 * http://www.apache.org/licenses/LICENSE-2.0 535 * 536 * Unless required by applicable law or agreed to in writing, software 537 * distributed under the License is distributed on an "AS IS" BASIS, 538 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 539 * See the License for the specific language governing permissions and 540 * limitations under the License. 541 */ class eX extends eY{constructor(){super("facebook.com")}static credential(e){return eB._fromParams({providerId:eX.PROVIDER_ID,signInMethod:eX.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return eX.credentialFromTaggedObject(e)}static credentialFromError(e){return eX.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return eX.credential(e.oauthAccessToken)}catch(t){return null}}}eX.FACEBOOK_SIGN_IN_METHOD="facebook.com",eX.PROVIDER_ID="facebook.com";/** 542 * @license 543 * Copyright 2020 Google LLC 544 * 545 * Licensed under the Apache License, Version 2.0 (the "License"); 546 * you may not use this file except in compliance with the License. 547 * You may obtain a copy of the License at 548 * 549 * http://www.apache.org/licenses/LICENSE-2.0 550 * 551 * Unless required by applicable law or agreed to in writing, software 552 * distributed under the License is distributed on an "AS IS" BASIS, 553 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 554 * See the License for the specific language governing permissions and 555 * limitations under the License. 556 */ class eJ extends eY{constructor(){super("google.com"),this.addScope("profile")}static credential(e,t){return eB._fromParams({providerId:eJ.PROVIDER_ID,signInMethod:eJ.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:t})}static credentialFromResult(e){return eJ.credentialFromTaggedObject(e)}static credentialFromError(e){return eJ.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthIdToken:t,oauthAccessToken:n}=e;if(!t&&!n)return null;try{return eJ.credential(t,n)}catch(r){return null}}}eJ.GOOGLE_SIGN_IN_METHOD="google.com",eJ.PROVIDER_ID="google.com";/** 557 * @license 558 * Copyright 2020 Google LLC 559 * 560 * Licensed under the Apache License, Version 2.0 (the "License"); 561 * you may not use this file except in compliance with the License. 562 * You may obtain a copy of the License at 563 * 564 * http://www.apache.org/licenses/LICENSE-2.0 565 * 566 * Unless required by applicable law or agreed to in writing, software 567 * distributed under the License is distributed on an "AS IS" BASIS, 568 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 569 * See the License for the specific language governing permissions and 570 * limitations under the License. 571 */ class e0 extends eY{constructor(){super("github.com")}static credential(e){return eB._fromParams({providerId:e0.PROVIDER_ID,signInMethod:e0.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return e0.credentialFromTaggedObject(e)}static credentialFromError(e){return e0.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return e0.credential(e.oauthAccessToken)}catch(t){return null}}}e0.GITHUB_SIGN_IN_METHOD="github.com",e0.PROVIDER_ID="github.com";class e1 extends eI{constructor(e,t){super(e,e),this.pendingToken=t}_getIdTokenResponse(e){let t=this.buildRequest();return eU(e,t)}_linkToIdToken(e,t){let n=this.buildRequest();return n.idToken=t,eU(e,n)}_getReauthenticationResolver(e){let t=this.buildRequest();return t.autoCreate=!1,eU(e,t)}toJSON(){return{signInMethod:this.signInMethod,providerId:this.providerId,pendingToken:this.pendingToken}}static fromJSON(e){let t="string"==typeof e?JSON.parse(e):e,{providerId:n,signInMethod:r,pendingToken:i}=t;return n&&r&&i&&n===r?new e1(n,i):null}static _create(e,t){return new e1(e,t)}buildRequest(){return{requestUri:"http://localhost",returnSecureToken:!0,pendingToken:this.pendingToken}}}class e2 extends eK{constructor(e){w(e.startsWith("saml."),"argument-error"),super(e)}static credentialFromResult(e){return e2.samlCredentialFromTaggedObject(e)}static credentialFromError(e){return e2.samlCredentialFromTaggedObject(e.customData||{})}static credentialFromJSON(e){let t=e1.fromJSON(e);return w(t,"argument-error"),t}
571static samlCredentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{pendingToken:t,providerId:n}=e;if(!t||!n)return null;try{return e1._create(n,t)}catch(r){return null}}}/** 572 * @license 573 * Copyright 2020 Google LLC 574 * 575 * Licensed under the Apache License, Version 2.0 (the "License"); 576 * you may not use this file except in compliance with the License. 577 * You may obtain a copy of the License at 578 * 579 * http://www.apache.org/licenses/LICENSE-2.0 580 * 581 * Unless required by applicable law or agreed to in writing, software 582 * distributed under the License is distributed on an "AS IS" BASIS, 583 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 584 * See the License for the specific language governing permissions and 585 * limitations under the License. 586 */ class e4 extends eY{constructor(){super("twitter.com")}static credential(e,t){return eB._fromParams({providerId:e4.PROVIDER_ID,signInMethod:e4.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:t})}static credentialFromResult(e){return e4.credentialFromTaggedObject(e)}static credentialFromError(e){return e4.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthAccessToken:t,oauthTokenSecret:n}=e;if(!t||!n)return null;try{return e4.credential(t,n)}catch(r){return null}}}/** 587 * @license 588 * Copyright 2020 Google LLC 589 * 590 * Licensed under the Apache License, Version 2.0 (the "License"); 591 * you may not use this file except in compliance with the License. 592 * You may obtain a copy of the License at 593 * 594 * http://www.apache.org/licenses/LICENSE-2.0 595 * 596 * Unless required by applicable law or agreed to in writing, software 597 * distributed under the License is distributed on an "AS IS" BASIS, 598 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 599 * See the License for the specific language governing permissions and 600 * limitations under the License. 601 */ async function e5(e,t){return L(e,"POST","/v1/accounts:signUp",P(e,t))}e4.TWITTER_SIGN_IN_METHOD="twitter.com",e4.PROVIDER_ID="twitter.com";/** 602 * @license 603 * Copyright 2020 Google LLC 604 * 605 * Licensed under the Apache License, Version 2.0 (the "License"); 606 * you may not use this file except in compliance with the License. 607 * You may obtain a copy of the License at 608 * 609 * http://www.apache.org/licenses/LICENSE-2.0 610 * 611 * Unless required by applicable law or agreed to in writing, software 612 * distributed under the License is distributed on an "AS IS" BASIS, 613 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 614 * See the License for the specific language governing permissions and 615 * limitations under the License. 616 */ class e3{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,t,n,r=!1){let i=await en._fromIdTokenResponse(e,n,r),s=e6(n),o=new e3({user:i,providerId:s,_tokenResponse:n,operationType:t});return o}static async _forOperation(e,t,n){await e._updateTokensIfNecessary(n,!0);let r=e6(n);return new e3({user:e,providerId:r,_tokenResponse:n,operationType:t})}}function e6(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}/** 617 * @license 618 * Copyright 2020 Google LLC 619 * 620 * Licensed under the Apache License, Version 2.0 (the "License"); 621 * you may not use this file except in compliance with the License. 622 * You may obtain a copy of the License at 623 * 624 * http://www.apache.org/licenses/LICENSE-2.0 625 * 626 * Unless required by applicable law or agreed to in writing, software 627 * distributed under the License is distributed on an "AS IS" BASIS, 628 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 629 * See the License for the specific language governing permissions and 630 * limitations under the License. 631 */ async function e8(e){var t;let n=ew(e);if(await n._initializationPromise,null===(t=n.currentUser)||void 0===t?void 0:t.isAnonymous)return new e3({user:n.currentUser,providerId:null,operationType:"signIn"});let r=await e5(n,{returnSecureToken:!0}),i=await e3._fromIdTokenResponse(n,"signIn",r,!0);return await n._updateCurrentUser(i.user),i}/** 632 * @license 633 * Copyright 2020 Google LLC 634 * 635 * Licensed under the Apache License, Version 2.0 (the "License");
636 * you may not use this file except in compliance with the License. 637 * You may obtain a copy of the License at 638 * 639 * http://www.apache.org/licenses/LICENSE-2.0 640 * 641 * Unless required by applicable law or agreed to in writing, software 642 * distributed under the License is distributed on an "AS IS" BASIS, 643 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 644 * See the License for the specific language governing permissions and 645 * limitations under the License. 646 */ class e7 extends i.ZR{constructor(e,t,n,r){var i;super(t.code,t.message),this.operationType=n,this.user=r,Object.setPrototypeOf(this,e7.prototype),this.customData={appName:e.name,tenantId:null!==(i=e.tenantId)&&void 0!==i?i:void 0,_serverResponse:t.customData._serverResponse,operationType:n}}static _fromErrorAndOperation(e,t,n,r){return new e7(e,t,n,r)}}function e9(e,t,n,r){let i="reauthenticate"===t?n._getReauthenticationResolver(e):n._getIdTokenResponse(e);return i.catch(n=>{if("auth/multi-factor-auth-required"===n.code)throw e7._fromErrorAndOperation(e,n,t,r);throw n})}/** 647 * @license 648 * Copyright 2020 Google LLC 649 * 650 * Licensed under the Apache License, Version 2.0 (the "License"); 651 * you may not use this file except in compliance with the License. 652 * You may obtain a copy of the License at 653 * 654 * http://www.apache.org/licenses/LICENSE-2.0 655 * 656 * Unless required by applicable law or agreed to in writing, software 657 * distributed under the License is distributed on an "AS IS" BASIS, 658 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 659 * See the License for the specific language governing permissions and 660 * limitations under the License. 661 */ function te(e){return new Set(e.map(({providerId:e})=>e).filter(e=>!!e))}/** 662 * @license 663 * Copyright 2019 Google LLC 664 * 665 * Licensed under the Apache License, Version 2.0 (the "License"); 666 * you may not use this file except in compliance with the License. 667 * You may obtain a copy of the License at 668 * 669 * http://www.apache.org/licenses/LICENSE-2.0 670 * 671 * Unless required by applicable law or agreed to in writing, software 672 * distributed under the License is distributed on an "AS IS" BASIS, 673 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 674 * See the License for the specific language governing permissions and 675 * limitations under the License. 676 */ async function tt(e,t){let n=(0,i.m9)(e);await tr(!0,n,t);let{providerUserInfo:r}=await $(n.auth,{idToken:await n.getIdToken(),deleteProvider:[t]}),s=te(r||[]);return n.providerData=n.providerData.filter(e=>s.has(e.providerId)),s.has("phone")||(n.phoneNumber=null),await n.auth._persistUserIfCurrent(n),n}async function tn(e,t,n=!1){let r=await H(e,t._linkToIdToken(e.auth,await e.getIdToken()),n);return e3._forOperation(e,"link",r)}async function tr(e,t,n){await Q(t);let r=te(t.providerData);w(r.has(n)===e,t.auth,!1===e?"provider-already-linked":"no-such-provider")}/** 677 * @license 678 * Copyright 2019 Google LLC 679 * 680 * Licensed under the Apache License, Version 2.0 (the "License"); 681 * you may not use this file except in compliance with the License. 682 * You may obtain a copy of the License at 683 * 684 * http://www.apache.org/licenses/LICENSE-2.0 685 * 686 * Unless required by applicable law or agreed to in writing, software 687 * distributed under the License is distributed on an "AS IS" BASIS, 688 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 689 * See the License for the specific language governing permissions and 690 * limitations under the License. 691 */ async function ti(e,t,n=!1){var r;let{auth:i}=e,s="reauthenticate";try{let o=await H(e,e9(i,s,t,e),n);w(o.idToken,i,"internal-error");let a=W(o.idToken);w(a,i,"internal-error");let{sub:l}=a;return w(e.uid===l,i,"user-mismatch"),e3._forOperation(e,s,o)}catch(u){throw(null===(r=u)||void 0===r?void 0:r.code)==="auth/user-not-found"&&g(i,"user-mismatch"),u}}/** 692 * @license 693 * Copyright 2020 Google LLC 694 * 695 * Licensed under the Apache License, Version 2.0 (the "License"); 696 * you may not use this file except in compliance with the License. 697 * You may obtain a copy of the License at 698 * 699 * http://www.apache.org/licenses/LICENSE-2.0 700 * 701 * Unless required by applicable law or agreed to in writing, softw
701are 702 * distributed under the License is distributed on an "AS IS" BASIS, 703 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 704 * See the License for the specific language governing permissions and 705 * limitations under the License. 706 */ async function ts(e,t,n=!1){let r="signIn",i=await e9(e,r,t),s=await e3._fromIdTokenResponse(e,r,i);return n||await e._updateCurrentUser(s.user),s}async function to(e,t){return ts(ew(e),t)}async function ta(e,t){let n=(0,i.m9)(e);return await tr(!1,n,t.providerId),tn(n,t)}async function tl(e,t){return ti((0,i.m9)(e),t)}/** 707 * @license 708 * Copyright 2020 Google LLC 709 * 710 * Licensed under the Apache License, Version 2.0 (the "License"); 711 * you may not use this file except in compliance with the License. 712 * You may obtain a copy of the License at 713 * 714 * http://www.apache.org/licenses/LICENSE-2.0 715 * 716 * Unless required by applicable law or agreed to in writing, software 717 * distributed under the License is distributed on an "AS IS" BASIS, 718 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 719 * See the License for the specific language governing permissions and 720 * limitations under the License. 721 */ async function tu(e,t){return L(e,"POST","/v1/accounts:signInWithCustomToken",P(e,t))}/** 722 * @license 723 * Copyright 2020 Google LLC 724 * 725 * Licensed under the Apache License, Version 2.0 (the "License"); 726 * you may not use this file except in compliance with the License. 727 * You may obtain a copy of the License at 728 * 729 * http://www.apache.org/licenses/LICENSE-2.0 730 * 731 * Unless required by applicable law or agreed to in writing, software 732 * distributed under the License is distributed on an "AS IS" BASIS, 733 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 734 * See the License for the specific language governing permissions and 735 * limitations under the License. 736 */ async function tc(e,t){let n=ew(e),r=await tu(n,{token:t,returnSecureToken:!0}),i=await e3._fromIdTokenResponse(n,"signIn",r);return await n._updateCurrentUser(i.user),i}/** 737 * @license 738 * Copyright 2020 Google LLC 739 * 740 * Licensed under the Apache License, Version 2.0 (the "License"); 741 * you may not use this file except in compliance with the License. 742 * You may obtain a copy of the License at 743 * 744 * http://www.apache.org/licenses/LICENSE-2.0 745 * 746 * Unless required by applicable law or agreed to in writing, software 747 * distributed under the License is distributed on an "AS IS" BASIS, 748 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 749 * See the License for the specific language governing permissions and 750 * limitations under the License. 751 */ class th{constructor(e,t){this.factorId=e,this.uid=t.mfaEnrollmentId,this.enrollmentTime=new Date(t.enrolledAt).toUTCString(),this.displayName=t.displayName}static _fromServerResponse(e,t){return"phoneInfo"in t?td._fromServerResponse(e,t):g(e,"internal-error")}}class td extends th{constructor(e){super("phone",e),this.phoneNumber=e.phoneInfo}static _fromServerResponse(e,t){return new td(t)}}/** 752 * @license 753 * Copyright 2020 Google LLC 754 * 755 * Licensed under the Apache License, Version 2.0 (the "License"); 756 * you may not use this file except in compliance with the License. 757 * You may obtain a copy of the License at 758 * 759 * http://www.apache.org/licenses/LICENSE-2.0 760 * 761 * Unless required by applicable law or agreed to in writing, software 762 * distributed under the License is distributed on an "AS IS" BASIS, 763 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 764 * See the License for the specific language governing permissions and 765 * limitations under the License. 766 */ function tf(e,t,n){var r;w((null===(r=n.url)||void 0===r?void 0:r.length)>0,e,"invalid-continue-uri"),w(void 0===n.dynamicLinkDomain||n.dynamicLinkDomain.length>0,e,"invalid-dynamic-link-domain"),t.continueUrl=n.url,t.dynamicLinkDomain=n.dynamicLinkDomain,t.canHandleCodeInApp=n.handleCodeInApp,n.iOS&&(w(n.iOS.bundleId.length>0,e,"missing-ios-bundle-id"),t.iOSBundleId=n.iOS.bundleId),n.android&&(w(n.android.packageName.length>0,e,"missing-android-pkg-name"),t.androidInstallApp=n.android.installApp,t.androidMinimumVersionCode=n.android.minimumVersion,t.androidPackageName=n.android.packageName)}/** 767 * @license 768 * Copyright 2020 Google LLC 769 * 770 * Licensed under the Apache License, Version 2.0 (the "License");
771 * you may not use this file except in compliance with the License. 772 * You may obtain a copy of the License at 773 * 774 * http://www.apache.org/licenses/LICENSE-2.0 775 * 776 * Unless required by applicable law or agreed to in writing, software 777 * distributed under the License is distributed on an "AS IS" BASIS, 778 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 779 * See the License for the specific language governing permissions and 780 * limitations under the License. 781 */ async function tp(e,t,n){let r=(0,i.m9)(e),s={requestType:"PASSWORD_RESET",email:t};n&&tf(r,s,n),await eN(r,s)}async function tm(e,t,n){await ek((0,i.m9)(e),{oobCode:t,newPassword:n})}async function tg(e,t){await eR((0,i.m9)(e),{oobCode:t})}async function ty(e,t){let n=(0,i.m9)(e),r=await ek(n,{oobCode:t}),s=r.requestType;switch(w(s,n,"internal-error"),s){case"EMAIL_SIGNIN":break;case"VERIFY_AND_CHANGE_EMAIL":w(r.newEmail,n,"internal-error");break;case"REVERT_SECOND_FACTOR_ADDITION":w(r.mfaInfo,n,"internal-error");default:w(r.email,n,"internal-error")}let o=null;return r.mfaInfo&&(o=th._fromServerResponse(ew(n),r.mfaInfo)),{data:{email:("VERIFY_AND_CHANGE_EMAIL"===r.requestType?r.newEmail:r.email)||null,previousEmail:("VERIFY_AND_CHANGE_EMAIL"===r.requestType?r.email:r.newEmail)||null,multiFactorInfo:o},operation:s}}async function tv(e,t){let{data:n}=await ty((0,i.m9)(e),t);return n.email}async function t_(e,t,n){let r=ew(e),i=await e5(r,{returnSecureToken:!0,email:t,password:n}),s=await e3._fromIdTokenResponse(r,"signIn",i);return await r._updateCurrentUser(s.user),s}function tb(e,t,n){return to((0,i.m9)(e),eH.credential(t,n))}/** 782 * @license 783 * Copyright 2020 Google LLC 784 * 785 * Licensed under the Apache License, Version 2.0 (the "License"); 786 * you may not use this file except in compliance with the License. 787 * You may obtain a copy of the License at 788 * 789 * http://www.apache.org/licenses/LICENSE-2.0 790 * 791 * Unless required by applicable law or agreed to in writing, software 792 * distributed under the License is distributed on an "AS IS" BASIS, 793 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 794 * See the License for the specific language governing permissions and 795 * limitations under the License. 796 */ async function tw(e,t,n){let r=(0,i.m9)(e),s={requestType:"EMAIL_SIGNIN",email:t};w(n.handleCodeInApp,r,"argument-error"),n&&tf(r,s,n),await eP(r,s)}function tE(e,t){let n=eW.parseLink(t);return(null==n?void 0:n.operation)==="EMAIL_SIGNIN"}async function tx(e,t,n){let r=(0,i.m9)(e),s=eH.credentialWithLink(t,n||I());return w(s._tenantId===(r.tenantId||null),r,"tenant-id-mismatch"),to(r,s)}/** 797 * @license 798 * Copyright 2020 Google LLC 799 * 800 * Licensed under the Apache License, Version 2.0 (the "License"); 801 * you may not use this file except in compliance with the License. 802 * You may obtain a copy of the License at 803 * 804 * http://www.apache.org/licenses/LICENSE-2.0 805 * 806 * Unless required by applicable law or agreed to in writing, software 807 * distributed under the License is distributed on an "AS IS" BASIS, 808 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 809 * See the License for the specific language governing permissions and 810 * limitations under the License. 811 */ async function tS(e,t){return F(e,"POST","/v1/accounts:createAuthUri",P(e,t))}/** 812 * @license 813 * Copyright 2020 Google LLC 814 * 815 * Licensed under the Apache License, Version 2.0 (the "License"); 816 * you may not use this file except in compliance with the License. 817 * You may obtain a copy of the License at 818 * 819 * http://www.apache.org/licenses/LICENSE-2.0 820 * 821 * Unless required by applicable law or agreed to in writing, software 822 * distributed under the License is distributed on an "AS IS" BASIS, 823 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 824 * See the License for the specific language governing permissions and 825 * limitations under the License. 826 */ async function tT(e,t){let n=k()?I():"http://localhost",{signinMethods:r}=await tS((0,i.m9)(e),{identifier:t,continueUri:n});return r||[]}async function tI(e,t){let n=(0,i.m9)(e),r=await e.getIdToken(),s={requestType:"VERIFY_EMAIL",idToken:r};t&&tf(n.auth,s,t);let{email:o}=await eD(n.auth,s);o!==e.email&&await e.reload()}
826async function tk(e,t,n){let r=(0,i.m9)(e),s=await e.getIdToken(),o={requestType:"VERIFY_AND_CHANGE_EMAIL",idToken:s,newEmail:t};n&&tf(r.auth,o,n);let{email:a}=await eF(r.auth,o);a!==e.email&&await e.reload()}/** 827 * @license 828 * Copyright 2020 Google LLC 829 * 830 * Licensed under the Apache License, Version 2.0 (the "License"); 831 * you may not use this file except in compliance with the License. 832 * You may obtain a copy of the License at 833 * 834 * http://www.apache.org/licenses/LICENSE-2.0 835 * 836 * Unless required by applicable law or agreed to in writing, software 837 * distributed under the License is distributed on an "AS IS" BASIS, 838 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 839 * See the License for the specific language governing permissions and 840 * limitations under the License. 841 */ async function tC(e,t){return F(e,"POST","/v1/accounts:update",t)}/** 842 * @license 843 * Copyright 2020 Google LLC 844 * 845 * Licensed under the Apache License, Version 2.0 (the "License"); 846 * you may not use this file except in compliance with the License. 847 * You may obtain a copy of the License at 848 * 849 * http://www.apache.org/licenses/LICENSE-2.0 850 * 851 * Unless required by applicable law or agreed to in writing, software 852 * distributed under the License is distributed on an "AS IS" BASIS, 853 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 854 * See the License for the specific language governing permissions and 855 * limitations under the License. 856 */ async function tR(e,{displayName:t,photoURL:n}){if(void 0===t&&void 0===n)return;let r=(0,i.m9)(e),s=await r.getIdToken(),o=await H(r,tC(r.auth,{idToken:s,displayName:t,photoUrl:n,returnSecureToken:!0}));r.displayName=o.displayName||null,r.photoURL=o.photoUrl||null;let a=r.providerData.find(({providerId:e})=>"password"===e);a&&(a.displayName=r.displayName,a.photoURL=r.photoURL),await r._updateTokensIfNecessary(o)}function tA(e,t){return tD((0,i.m9)(e),t,null)}function tO(e,t){return tD((0,i.m9)(e),null,t)}async function tD(e,t,n){let{auth:r}=e,i=await e.getIdToken(),s={idToken:i,returnSecureToken:!0};t&&(s.email=t),n&&(s.password=n);let o=await H(e,eC(r,s));await e._updateTokensIfNecessary(o,!0)}class tN{constructor(e,t,n={}){this.isNewUser=e,this.providerId=t,this.profile=n}}class tP extends tN{constructor(e,t,n,r){super(e,t,n),this.username=r}}class tF extends tN{constructor(e,t){super(e,"facebook.com",t)}}class tM extends tP{constructor(e,t){super(e,"github.com",t,"string"==typeof(null==t?void 0:t.login)?null==t?void 0:t.login:null)}}class tL extends tN{constructor(e,t){super(e,"google.com",t)}}class tj extends tP{constructor(e,t,n){super(e,"twitter.com",t,n)}}function tU(e){let{user:t,_tokenResponse:n}=e;return t.isAnonymous&&!n?{providerId:null,isNewUser:!1,profile:null}:/** 857 * @license 858 * Copyright 2019 Google LLC 859 * 860 * Licensed under the Apache License, Version 2.0 (the "License"); 861 * you may not use this file except in compliance with the License. 862 * You may obtain a copy of the License at 863 * 864 * http://www.apache.org/licenses/LICENSE-2.0 865 * 866 * Unless required by applicable law or agreed to in writing, software 867 * distributed under the License is distributed on an "AS IS" BASIS, 868 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 869 * See the License for the specific language governing permissions and 870 * limitations under the License. 871 */ function(e){var t,n;if(!e)return null;let{providerId:r}=e,i=e.rawUserInfo?JSON.parse(e.rawUserInfo):{},s=e.isNewUser||"identitytoolkit#SignupNewUserResponse"===e.kind;if(!r&&(null==e?void 0:e.idToken)){let o=null===(n=null===(t=W(e.idToken))||void 0===t?void 0:t.firebase)||void 0===n?void 0:n.sign_in_provider;if(o)return new tN(s,"anonymous"!==o&&"custom"!==o?o:null)}if(!r)return null;switch(r){case"facebook.com":return new tF(s,i);case"github.com":return new tM(s,i);case"google.com":return new tL(s,i);case"twitter.com":return new tj(s,i,e.screenName||null);case"custom":case"anonymous":return new tN(s,null);default:return new tN(s,r,i)}}(n)}function tB(e,t,n,r){return(0,i.m9)(e).onAuthStateChanged(t,n,r)}class tZ{constructor(e,t,n){this.type=e,this.credential=t,this.auth=n}static _fromIdtoken(e,t){return new tZ("enroll",e,t)}static _fromMfaPendingCredential(e){return new tZ("signin",e)}toJSON(){let e="enroll"===this.type?"idToken":"pendingCredential";return{multiFactorSession:{[e]:this.credential}}}static fromJSON(e){var t,n;if(null==e?void 0:e.multiFactorSession){if(null===(t=e.multiFactorSession)||void 0===t?void 0:t.pendingCredential)return tZ._fromMfaPendingCredential(e.multiFactorSession.pendingCredential);if(null===(n=e.multiFactorSession)||void 0===n?void 0:n.idToken)return tZ._fromIdtoken(e.multiFactorSession.idToken)}return null}}/** 872 * @license 873 * Copyright 2020 Google LLC 874 * 875 * Licensed under the Apache License, Version 2.0 (the "License");
876 * you may not use this file except in compliance with the License. 877 * You may obtain a copy of the License at 878 * 879 * http://www.apache.org/licenses/LICENSE-2.0 880 * 881 * Unless required by applicable law or agreed to in writing, software 882 * distributed under the License is distributed on an "AS IS" BASIS, 883 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 884 * See the License for the specific language governing permissions and 885 * limitations under the License. 886 */ class t${constructor(e,t,n){this.session=e,this.hints=t,this.signInResolver=n}static _fromError(e,t){let n=ew(e),r=t.customData._serverResponse,i=(r.mfaInfo||[]).map(e=>th._fromServerResponse(n,e));w(r.mfaPendingCredential,n,"internal-error");let s=tZ._fromMfaPendingCredential(r.mfaPendingCredential);return new t$(s,i,async e=>{let i=await e._process(n,s);delete r.mfaInfo,delete r.mfaPendingCredential;let o=Object.assign(Object.assign({},r),{idToken:i.idToken,refreshToken:i.refreshToken});switch(t.operationType){case"signIn":let a=await e3._fromIdTokenResponse(n,t.operationType,o);return await n._updateCurrentUser(a.user),a;case"reauthenticate":return w(t.user,n,"internal-error"),e3._forOperation(t.user,t.operationType,o);default:g(n,"internal-error")}})}async resolveSignIn(e){return this.signInResolver(e)}}function tV(e,t){var n;let r=(0,i.m9)(e);return w(t.customData.operationType,r,"argument-error"),w(null===(n=t.customData._serverResponse)||void 0===n?void 0:n.mfaPendingCredential,r,"argument-error"),t$._fromError(r,t)}class tz{constructor(e){this.user=e,this.enrolledFactors=[],e._onReload(t=>{t.mfaInfo&&(this.enrolledFactors=t.mfaInfo.map(t=>th._fromServerResponse(e.auth,t)))})}static _fromUser(e){return new tz(e)}async getSession(){return tZ._fromIdtoken(await this.user.getIdToken(),this.user.auth)}
886async enroll(e,t){let n=await this.getSession(),r=await H(this.user,e._process(this.user.auth,n,t));return await this.user._updateTokensIfNecessary(r),this.user.reload()}async unenroll(e){var t,n,r;let i="string"==typeof e?e:e.uid,s=await this.user.getIdToken(),o=await H(this.user,F(n=this.user.auth,"POST","/v2/accounts/mfaEnrollment:withdraw",P(n,{idToken:s,mfaEnrollmentId:i})));this.enrolledFactors=this.enrolledFactors.filter(({uid:e})=>e!==i),await this.user._updateTokensIfNecessary(o);try{await this.user.reload()}catch(a){if((null===(t=a)||void 0===t?void 0:t.code)!=="auth/user-token-expired")throw a}}}let tq=new WeakMap;function tG(e){let t=(0,i.m9)(e);return tq.has(t)||tq.set(t,tz._fromUser(t)),tq.get(t)}let tW="__sak";/** 887 * @license 888 * Copyright 2019 Google LLC 889 * 890 * Licensed under the Apache License, Version 2.0 (the "License"); 891 * you may not use this file except in compliance with the License. 892 * You may obtain a copy of the License at 893 * 894 * http://www.apache.org/licenses/LICENSE-2.0 895 * 896 * Unless required by applicable law or agreed to in writing, software 897 * distributed under the License is distributed on an "AS IS" BASIS, 898 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 899 * See the License for the specific language governing permissions and 900 * limitations under the License. 901 */ class tH{constructor(e,t){this.storageRetriever=e,this.type=t}_isAvailable(){try{if(!this.storage)return Promise.resolve(!1);return this.storage.setItem(tW,"1"),this.storage.removeItem(tW),Promise.resolve(!0)}catch(e){return Promise.resolve(!1)}}_set(e,t){return this.storage.setItem(e,JSON.stringify(t)),Promise.resolve()}_get(e){let t=this.storage.getItem(e);return Promise.resolve(t?JSON.parse(t):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}}class tK extends tH{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(e,t)=>this.onStorageEvent(e,t),this.listeners={},this.localCache={},this.pollTimer=null,this.safariLocalStorageNotSynced=/** 902 * @license 903 * Copyright 2020 Google LLC 904 * 905 * Licensed under the Apache License, Version 2.0 (the "License"); 906 * you may not use this file except in compliance with the License. 907 * You may obtain a copy of the License at 908 * 909 * http://www.apache.org/licenses/LICENSE-2.0 910 * 911 * Unless required by applicable law or agreed to in writing, software 912 * distributed under the License is distributed on an "AS IS" BASIS, 913 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 914 * See the License for the specific language governing permissions and 915 * limitations under the License. 916 */ function(){let e=(0,i.z$)();return eu(e)||em(e)}()&&function(){try{return!!(window&&window!==window.top)}catch(e){return!1}}(),this.fallbackToPolling=ey(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(let t of Object.keys(this.listeners)){let n=this.storage.getItem(t),r=this.localCache[t];n!==r&&e(t,r,n)}}onStorageEvent(e,t=!1){if(!e.key){this.forAllChangedKeys((e,t,n)=>{this.notifyListeners(e,n)});return}let n=e.key;if(t?this.detachListener():this.stopPolling(),this.safariLocalStorageNotSynced){let r=this.storage.getItem(n);if(e.newValue!==r)null!==e.newValue?this.storage.setItem(n,e.newValue):this.storage.removeItem(n);else if(this.localCache[n]===e.newValue&&!t)return}let s=()=>{let e=this.storage.getItem(n);(t||this.localCache[n]!==e)&&this.notifyListeners(n,e)},o=this.storage.getItem(n);(0,i.w1)()&&10===document.documentMode&&o!==e.newValue&&e.newValue!==e.oldValue?setTimeout(s,10):s()}notifyListeners(e,t){this.localCache[e]=t;let n=this.listeners[e];if(n)for(let r of Array.from(n))r(t?JSON.parse(t):t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((e,t,n)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:t,newValue:n}),!0)})},1e3)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,t){0===Object.keys(this.listeners).length&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&(this.detachListener(),this.stopPolling())}async _set(e,t){await super._set(e,t),this.localCache[e]=JSON.stringify(t)}async _get(e){let t=await super._get(e);return this.localCache[e]=JSON.stringify(t),t}async _remove(e){await super._remove(e),delete this.localCache[e]}}tK.type="LOCAL";let tY=tK;/** 917 * @license 918 * Copyright 2020 Google LLC 919 * 920 * Licensed under the Apache License, Version 2.0 (the "License");
921 * you may not use this file except in compliance with the License. 922 * You may obtain a copy of the License at 923 * 924 * http://www.apache.org/licenses/LICENSE-2.0 925 * 926 * Unless required by applicable law or agreed to in writing, software 927 * distributed under the License is distributed on an "AS IS" BASIS, 928 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 929 * See the License for the specific language governing permissions and 930 * limitations under the License. 931 */ class tQ extends tH{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,t){}_removeListener(e,t){}}tQ.type="SESSION";let tX=tQ;/** 932 * @license 933 * Copyright 2019 Google LLC 934 * 935 * Licensed under the Apache License, Version 2.0 (the "License"); 936 * you may not use this file except in compliance with the License. 937 * You may obtain a copy of the License at 938 * 939 * http://www.apache.org/licenses/LICENSE-2.0 940 * 941 * Unless required by applicable law or agreed to in writing, software 942 * distributed under the License is distributed on an "AS IS" BASIS, 943 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 944 * See the License for the specific language governing permissions and 945 * limitations under the License. 946 */ class tJ{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){let t=this.receivers.find(t=>t.isListeningto(e));if(t)return t;let n=new tJ(e);return this.receivers.push(n),n}isListeningto(e){return this.eventTarget===e}async handleEvent(e){var t;let{eventId:n,eventType:r,data:i}=e.data,s=this.handlersMap[r];if(!(null==s?void 0:s.size))return;e.ports[0].postMessage({status:"ack",eventId:n,eventType:r});let o=Array.from(s).map(async t=>t(e.origin,i)),a=await Promise.all(o.map(async e=>{try{let t=await e;return{fulfilled:!0,value:t}}catch(n){return{fulfilled:!1,reason:n}}}));e.ports[0].postMessage({status:"done",eventId:n,eventType:r,response:a})}_subscribe(e,t){0===Object.keys(this.handlersMap).length&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(t)}_unsubscribe(e,t){this.handlersMap[e]&&t&&this.handlersMap[e].delete(t),t&&0!==this.handlersMap[e].size||delete this.handlersMap[e],0===Object.keys(this.handlersMap).length&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}/** 947 * @license 948 * Copyright 2020 Google LLC 949 * 950 * Licensed under the Apache License, Version 2.0 (the "License"); 951 * you may not use this file except in compliance with the License. 952 * You may obtain a copy of the License at 953 * 954 * http://www.apache.org/licenses/LICENSE-2.0 955 * 956 * Unless required by applicable law or agreed to in writing, software 957 * distributed under the License is distributed on an "AS IS" BASIS, 958 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 959 * See the License for the specific language governing permissions and 960 * limitations under the License.
961 */ function t0(e="",t=10){let n="";for(let r=0;r<t;r++)n+=Math.floor(10*Math.random());return e+n}tJ.receivers=[];/** 962 * @license 963 * Copyright 2019 Google LLC 964 * 965 * Licensed under the Apache License, Version 2.0 (the "License"); 966 * you may not use this file except in compliance with the License. 967 * You may obtain a copy of the License at 968 * 969 * http://www.apache.org/licenses/LICENSE-2.0 970 * 971 * Unless required by applicable law or agreed to in writing, software 972 * distributed under the License is distributed on an "AS IS" BASIS, 973 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 974 * See the License for the specific language governing permissions and 975 * limitations under the License. 976 */ class t1{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,t,n=50){let r="undefined"!=typeof MessageChannel?new MessageChannel:null;if(!r)throw Error("connection_unavailable");let i,s;return new Promise((o,a)=>{let l=t0("",20);r.port1.start();let u=setTimeout(()=>{a(Error("unsupported_event"))},n);s={messageChannel:r,onMessage(e){if(e.data.eventId===l)switch(e.data.status){case"ack":clearTimeout(u),i=setTimeout(()=>{a(Error("timeout"))},3e3);break;case"done":clearTimeout(i),o(e.data.response);break;default:clearTimeout(u),clearTimeout(i),a(Error("invalid_response"))}}},this.handlers.add(s),r.port1.addEventListener("message",s.onMessage),this.target.postMessage({eventType:e,eventId:l,data:t},[r.port2])}).finally(()=>{s&&this.removeMessageHandler(s)})}}/** 977 * @license 978 * Copyright 2020 Google LLC 979 * 980 * Licensed under the Apache License, Version 2.0 (the "License"); 981 * you may not use this file except in compliance with the License. 982 * You may obtain a copy of the License at 983 * 984 * http://www.apache.org/licenses/LICENSE-2.0 985 * 986 * Unless required by applicable law or agreed to in writing, software 987 * distributed under the License is distributed on an "AS IS" BASIS, 988 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 989 * See the License for the specific language governing permissions and 990 * limitations under the License. 991 */ function t2(){return window}/** 992 * @license 993 * Copyright 2020 Google LLC. 994 * 995 * Licensed under the Apache License, Version 2.0 (the "License"); 996 * you may not use this file except in compliance with the License. 997 * You may obtain a copy of the License at 998 * 999 * http://www.apache.org/licenses/LICENSE-2.0 1000 * 1001 * Unless required by applicable law or agreed to in writing, software 1002 * distributed under the License is distributed on an "AS IS" BASIS, 1003 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1004 * See the License for the specific language governing permissions and 1005 * limitations under the License. 1006 */ function t4(){return void 0!==t2().WorkerGlobalScope&&"function"==typeof t2().importScripts}async function t5(){if(!(null==navigator?void 0:navigator.serviceWorker))return null;try{let e=await navigator.serviceWorker.ready;return e.active}catch(t){return null}}/** 1007 * @license 1008 * Copyright 2019 Google LLC 1009 * 1010 * Licensed under the Apache License, Version 2.0 (the "License"); 1011 * you may not use this file except in compliance with the License. 1012 * You may obtain a copy of the License at 1013 * 1014 * http://www.apache.org/licenses/LICENSE-2.0 1015 * 1016 * Unless required by applicable law or agreed to in writing, software 1017 * distributed under the License is distributed on an "AS IS" BASIS, 1018 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1019 * See the License for the specific language governing permissions and 1020 * limitations under the License. 1021 */ let t3="firebaseLocalStorageDb",t6="firebaseLocalStorage",t8="fbase_key";class t7{constructor(e){this.request=e}toPromise(){return new Promise((e,t)=>{this.request.addEventListener("success",()=>{e(this.request.result)}),this.request.addEventListener("error",()=>{t(this.request.error)})})}}function t9(e,t){return e.transaction([t6],t?"readwrite":"readonly").objectStore(t6)}function ne(){let e=indexedDB.open(t3,1);return new Promise((t,n)=>{e.addEventListener("error",()=>{n(e.error)}),e.addEventListener("upgradeneeded",()=>{let t=e.result;try{t.createObjectStore(t6,{keyPath:t8})}catch(r){n(r)}}),e.addEventListener("success",async()=>{let n=e.result;n.objectStoreNames.contains(t6)?t(n):(n.close(),await function(){let e=indexedDB.deleteDatabase(t3);
1021return new t7(e).toPromise()}(),t(await ne()))})})}async function nt(e,t,n){let r=t9(e,!0).put({[t8]:t,value:n});return new t7(r).toPromise()}async function nn(e,t){let n=t9(e,!1).get(t),r=await new t7(n).toPromise();return void 0===r?null:r.value}function nr(e,t){let n=t9(e,!0).delete(t);return new t7(n).toPromise()}class ni{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=await ne()),this.db}async _withRetries(e){let t=0;for(;;)try{let n=await this._openDb();return await e(n)}catch(r){if(t++>3)throw r;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return t4()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=tJ._getInstance(t4()?self:null),this.receiver._subscribe("keyChanged",async(e,t)=>{let n=await this._poll();return{keyProcessed:n.includes(t.key)}}),this.receiver._subscribe("ping",async(e,t)=>["keyChanged"])}async initializeSender(){var e,t;if(this.activeServiceWorker=await t5(),!this.activeServiceWorker)return;this.sender=new t1(this.activeServiceWorker);let n=await this.sender._send("ping",{},800);n&&(null===(e=n[0])||void 0===e?void 0:e.fulfilled)&&(null===(t=n[0])||void 0===t?void 0:t.value.includes("keyChanged"))&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){var t;if(this.sender&&this.activeServiceWorker&&((null===(t=null==navigator?void 0:navigator.serviceWorker)||void 0===t?void 0:t.controller)||null)===this.activeServiceWorker)try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch(n){}}async _isAvailable(){try{if(!indexedDB)return!1;let e=await ne();return await nt(e,tW,"1"),await nr(e,tW),!0}catch(t){}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,t){return this._withPendingWrite(async()=>(await this._withRetries(n=>nt(n,e,t)),this.localCache[e]=t,this.notifyServiceWorker(e)))}async _get(e){let t=await this._withRetries(t=>nn(t,e));return this.localCache[e]=t,t}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(t=>nr(t,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){let e=await this._withRetries(e=>{let t=t9(e,!1).getAll();return new t7(t).toPromise()});if(!e||0!==this.pendingWrites)return[];let t=[],n=new Set;for(let{fbase_key:r,value:i}of e)n.add(r),JSON.stringify(this.localCache[r])!==JSON.stringify(i)&&(this.notifyListeners(r,i),t.push(r));for(let s of Object.keys(this.localCache))this.localCache[s]&&!n.has(s)&&(this.notifyListeners(s,null),t.push(s));return t}notifyListeners(e,t){this.localCache[e]=t;let n=this.listeners[e];if(n)for(let r of Array.from(n))r(t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),800)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,t){0===Object.keys(this.listeners).length&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&this.stopPolling()}}ni.type="LOCAL";let ns=ni;/** 1022 * @license 1023 * Copyright 2020 Google LLC 1024 * 1025 * Licensed under the Apache License, Version 2.0 (the "License"); 1026 * you may not use this file except in compliance with the License. 1027 * You may obtain a copy of the License at 1028 * 1029 * http://www.apache.org/licenses/LICENSE-2.0 1030 * 1031 * Unless required by applicable law or agreed to in writing, software 1032 * distributed under the License is distributed on an "AS IS" BASIS, 1033 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1034 * See the License for the specific language governing permissions and 1035 * limitations under the License. 1036 */ async function no(e){return(await F(e,"GET","/v1/recaptchaParams")).recaptchaSiteKey||""}function na(e){return new Promise((t,n)=>{var r,i;let s=document.createElement("script");s.setAttribute("src",e),s.onload=t,s.onerror=e=>{let t=y("internal-error");t.customData=e,n(t)},s.type="text/javascript",s.charset="UTF-8",(null!==(i=null===(r=document.getElementsByTagName("head"))||void 0===r?void 0:r[0])&&void 0!==i?i:document).appendChild(s)})}function nl(e){return`__${e}${Math.floor(1e6*Math.random())}`}class nu{constructor(e){this.auth=e,this.counter=1e12,this._widgets=new Map}render(e,t){let n=this.counter;return this._widgets.set(n,new nc(e,this.auth.name,t||{})),this.counter++,n}reset(e){var t;let n=e||1e12;null===(t=this._widgets.get(n))||void 0===t||t.delete(),this._widgets.delete(n)}getResponse(e){var t;return(null===(t=this._widgets.get(e||1e12))||void 0===t?void 0:t.getResponse())||""}async execute(e){var t;return null===(t=this._widgets.get(e||1e12))||void 0===t||t.execute(),""}}class nc{constructor(e,t,n){this.params=n,this.timerId=null,this.deleted=!1,this.responseToken=null,this.clickHandler=()=>{this.execute()};let r="string"==typeof e?document.getElementById(e):e;w(r,"argument-error",{appName:t}),this.container=r,this.isVisible="invisible"!==this.params.size,this.isVisible?this.execute():this.container.addEventListener("click",this.clickHandler)}getResponse(){return this.checkIfDeleted(),this.responseToken}delete(){this.checkIfDeleted(),this.deleted=!0,this.timerId&&(clearTimeout(this.timerId),this.timerId=null),this.container.removeEventListener("click",this.clickHandler)}execute(){this.checkIfDeleted(),!this.timerId&&(this.timerId=window.setTimeout(()=>{this.responseToken=function(e){let t=[],n="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";for(let r=0;r<50;r++)t.push(n.charAt(Math.floor(Math.random()*n.length)));return t.join("")}(50);let{callback:e,"expired-callback":t}=this.params;if(e)try{e(this.responseToken)}catch(n){}this.timerId=window.setTimeout(()=>{if(this.timerId=null,this.responseToken=null,t)try{t()}catch(e){}this.isVisible&&this.execute()},6e4)},500))}checkIfDeleted(){if(this.deleted)throw Error("reCAPTCHA mock was already deleted!")}}/** 1037 * @license 1038 * Copyright 2020 Google LLC 1039 * 1040 * Licensed under the Apache License, Version 2.0 (the "License");
1041 * you may not use this file except in compliance with the License. 1042 * You may obtain a copy of the License at 1043 * 1044 * http://www.apache.org/licenses/LICENSE-2.0 1045 * 1046 * Unless required by applicable law or agreed to in writing, software 1047 * distributed under the License is distributed on an "AS IS" BASIS, 1048 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1049 * See the License for the specific language governing permissions and 1050 * limitations under the License. 1051 */ let nh=nl("rcb"),nd=new R(3e4,6e4);class nf{constructor(){var e;this.hostLanguage="",this.counter=0,this.librarySeparatelyLoaded=!!(null===(e=t2().grecaptcha)||void 0===e?void 0:e.render)}load(e,t=""){var n;return(w((n=t,n.length<=6&&/^\s*[a-zA-Z0-9\-]*\s*$/.test(n)),e,"argument-error"),this.shouldResolveImmediately(t))?Promise.resolve(t2().grecaptcha):new Promise((n,r)=>{let s=t2().setTimeout(()=>{r(y(e,"network-request-failed"))},nd.get());t2()[nh]=()=>{t2().clearTimeout(s),delete t2()[nh];let i=t2().grecaptcha;if(!i){r(y(e,"internal-error"));return}let o=i.render;i.render=(e,t)=>{let n=o(e,t);return this.counter++,n},this.hostLanguage=t,n(i)};let o=`https://www.google.com/recaptcha/api.js??${(0,i.xO)({onload:nh,render:"explicit",hl:t})}`;na(o).catch(()=>{clearTimeout(s),r(y(e,"internal-error"))})})}clearedOneInstance(){this.counter--}shouldResolveImmediately(e){var t;return!!(null===(t=t2().grecaptcha)||void 0===t?void 0:t.render)&&(e===this.hostLanguage||this.counter>0||this.librarySeparatelyLoaded)}}class np{async load(e){return new nu(e)}clearedOneInstance(){}}/** 1052 * @license 1053 * Copyright 2020 Google LLC 1054 * 1055 * Licensed under the Apache License, Version 2.0 (the "License"); 1056 * you may not use this file except in compliance with the License. 1057 * You may obtain a copy of the License at 1058 * 1059 * http://www.apache.org/licenses/LICENSE-2.0 1060 * 1061 * Unless required by applicable law or agreed to in writing, software 1062 * distributed under the License is distributed on an "AS IS" BASIS, 1063 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1064 * See the License for the specific language governing permissions and 1065 * limitations under the License. 1066 */ let nm="recaptcha",ng={theme:"light",type:"image"};class ny{constructor(e,t=Object.assign({},ng),n){this.parameters=t,this.type=nm,this.destroyed=!1,this.widgetId=null,this.tokenChangeListeners=new Set,this.renderPromise=null,this.recaptcha=null,this.auth=ew(n),this.isInvisible="invisible"===this.parameters.size,w("undefined"!=typeof document,this.auth,"operation-not-supported-in-this-environment");let r="string"==typeof e?document.getElementById(e):e;w(r,this.auth,"argument-error"),this.container=r,this.parameters.callback=this.makeTokenCallback(this.parameters.callback),this._recaptchaLoader=this.auth.settings.appVerificationDisabledForTesting?new np:new nf,this.validateStartingState()}async verify(){this.assertNotDestroyed();let e=await this.render(),t=this.getAssertedRecaptcha(),n=t.getResponse(e);return n||new Promise(n=>{let r=e=>{e&&(this.tokenChangeListeners.delete(r),n(e))};this.tokenChangeListeners.add(r),this.isInvisible&&t.execute(e)})}render(){try{this.assertNotDestroyed()}catch(e){return Promise.reject(e)}return this.renderPromise||(this.renderPromise=this.makeRenderPromise().catch(e=>{throw this.renderPromise=null,e})),this.renderPromise}_reset(){this.assertNotDestroyed(),null!==this.widgetId&&this.getAssertedRecaptcha().reset(this.widgetId)}clear(){this.assertNotDestroyed(),this.destroyed=!0,this._recaptchaLoader.clearedOneInstance(),this.isInvisible||this.container.childNodes.forEach(e=>{this.container.removeChild(e)})}validateStartingState(){w(!this.parameters.sitekey,this.auth,"argument-error"),w(this.isInvisible||!this.container.hasChildNodes(),this.auth,"argument-error"),w("undefined"!=typeof document,this.auth,"operation-not-supported-in-this-environment")}makeTokenCallback(e){return t=>{if(this.tokenChangeListeners.forEach(e=>e(t)),"function"==typeof e)e(t);else if("string"==typeof e){let n=t2()[e];"function"==typeof n&&n(t)}}}assertNotDestroyed(){w(!this.destroyed,this.auth,"internal-error")}async makeRenderPromise(){if(await this.init(),!this.widgetId){let e=this.container;if(!this.isInvisible){let t=document.createElement("div");e.appendChild(t),e=t}this.widgetId=this.getAssertedRecaptcha().render(e,this.parameters)}return this.widgetId}
1066async init(){let e;w(k()&&!t4(),this.auth,"internal-error"),await (e=null,new Promise(t=>{if("complete"===document.readyState){t();return}e=()=>t(),window.addEventListener("load",e)}).catch(t=>{throw e&&window.removeEventListener("load",e),t})),this.recaptcha=await this._recaptchaLoader.load(this.auth,this.auth.languageCode||void 0);let t=await no(this.auth);w(t,this.auth,"internal-error"),this.parameters.sitekey=t}getAssertedRecaptcha(){return w(this.recaptcha,this.auth,"internal-error"),this.recaptcha}}/** 1067 * @license 1068 * Copyright 2020 Google LLC 1069 * 1070 * Licensed under the Apache License, Version 2.0 (the "License"); 1071 * you may not use this file except in compliance with the License. 1072 * You may obtain a copy of the License at 1073 * 1074 * http://www.apache.org/licenses/LICENSE-2.0 1075 * 1076 * Unless required by applicable law or agreed to in writing, software 1077 * distributed under the License is distributed on an "AS IS" BASIS, 1078 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1079 * See the License for the specific language governing permissions and 1080 * limitations under the License. 1081 */ class nv{constructor(e,t){this.verificationId=e,this.onConfirmation=t}confirm(e){let t=eG._fromVerification(this.verificationId,e);return this.onConfirmation(t)}}async function n_(e,t,n){let r=ew(e),s=await nE(r,t,(0,i.m9)(n));return new nv(s,e=>to(r,e))}async function nb(e,t,n){let r=(0,i.m9)(e);await tr(!1,r,"phone");let s=await nE(r.auth,t,(0,i.m9)(n));return new nv(s,e=>ta(r,e))}async function nw(e,t,n){let r=(0,i.m9)(e),s=await nE(r.auth,t,(0,i.m9)(n));return new nv(s,e=>tl(r,e))}async function nE(e,t,n){var r,i,s,o,a;let l=await n.verify();try{w("string"==typeof l,e,"argument-error"),w(n.type===nm,e,"argument-error");let u;if(u="string"==typeof t?{phoneNumber:t}:t,"session"in u){let c=u.session;if("phoneNumber"in u){w("enroll"===c.type,e,"internal-error");let h=await (i=e,s={idToken:c.credential,phoneEnrollmentInfo:{phoneNumber:u.phoneNumber,recaptchaToken:l}},F(i,"POST","/v2/accounts/mfaEnrollment:start",P(i,s)));return h.phoneSessionInfo.sessionInfo}{w("signin"===c.type,e,"internal-error");let d=(null===(r=u.multiFactorHint)||void 0===r?void 0:r.uid)||u.multiFactorUid;w(d,e,"missing-multi-factor-info");let f=await (o=e,a={mfaPendingCredential:c.credential,mfaEnrollmentId:d,phoneSignInInfo:{recaptchaToken:l}},F(o,"POST","/v2/accounts/mfaSignIn:start",P(o,a)));return f.phoneResponseInfo.sessionInfo}}{let{sessionInfo:p}=await eZ(e,{phoneNumber:u.phoneNumber,recaptchaToken:l});return p}}finally{n._reset()}}async function nx(e,t){await tn((0,i.m9)(e),t)}/** 1082 * @license 1083 * Copyright 2020 Google LLC 1084 * 1085 * Licensed under the Apache License, Version 2.0 (the "License"); 1086 * you may not use this file except in compliance with the License. 1087 * You may obtain a copy of the License at 1088 * 1089 * http://www.apache.org/licenses/LICENSE-2.0 1090 * 1091 * Unless required by applicable law or agreed to in writing, software 1092 * distributed under the License is distributed on an "AS IS" BASIS, 1093 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1094 * See the License for the specific language governing permissions and 1095 * limitations under the License. 1096 */ class nS{constructor(e){this.providerId=nS.PROVIDER_ID,this.auth=ew(e)}verifyPhoneNumber(e,t){return nE(this.auth,e,(0,i.m9)(t))}static credential(e,t){return eG._fromVerification(e,t)}static credentialFromResult(e){return nS.credentialFromTaggedObject(e)}static credentialFromError(e){return nS.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{phoneNumber:t,temporaryProof:n}=e;return t&&n?eG._fromTokenResponse(t,n):null}}/** 1097 * @license 1098 * Copyright 2021 Google LLC 1099 * 1100 * Licensed under the Apache License, Version 2.0 (the "License"); 1101 * you may not use this file except in compliance with the License. 1102 * You may obtain a copy of the License at 1103 * 1104 * http://www.apache.org/licenses/LICENSE-2.0 1105 * 1106 * Unless required by applicable law or agreed to in writing, software 1107 * distributed under the License is distributed on an "AS IS" BASIS, 1108 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1109 * See the License for the specific language governing permissions and 1110 * limitations under the License. 1111 */ function nT(e,t){return t?T(t):(w(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}
1111nS.PROVIDER_ID="phone",nS.PHONE_SIGN_IN_METHOD="phone";/** 1112 * @license 1113 * Copyright 2019 Google LLC 1114 * 1115 * Licensed under the Apache License, Version 2.0 (the "License"); 1116 * you may not use this file except in compliance with the License. 1117 * You may obtain a copy of the License at 1118 * 1119 * http://www.apache.org/licenses/LICENSE-2.0 1120 * 1121 * Unless required by applicable law or agreed to in writing, software 1122 * distributed under the License is distributed on an "AS IS" BASIS, 1123 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1124 * See the License for the specific language governing permissions and 1125 * limitations under the License. 1126 */ class nI extends eI{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return eU(e,this._buildIdpRequest())}_linkToIdToken(e,t){return eU(e,this._buildIdpRequest(t))}_getReauthenticationResolver(e){return eU(e,this._buildIdpRequest())}_buildIdpRequest(e){let t={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return e&&(t.idToken=e),t}}function nk(e){return ts(e.auth,new nI(e),e.bypassAuthState)}function nC(e){let{auth:t,user:n}=e;return w(n,t,"internal-error"),ti(n,new nI(e),e.bypassAuthState)}async function nR(e){let{auth:t,user:n}=e;return w(n,t,"internal-error"),tn(n,new nI(e),e.bypassAuthState)}/** 1127 * @license 1128 * Copyright 2020 Google LLC 1129 * 1130 * Licensed under the Apache License, Version 2.0 (the "License"); 1131 * you may not use this file except in compliance with the License. 1132 * You may obtain a copy of the License at 1133 * 1134 * http://www.apache.org/licenses/LICENSE-2.0 1135 * 1136 * Unless required by applicable law or agreed to in writing, software 1137 * distributed under the License is distributed on an "AS IS" BASIS, 1138 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1139 * See the License for the specific language governing permissions and 1140 * limitations under the License. 1141 */ class nA{constructor(e,t,n,r,i=!1){this.auth=e,this.resolver=n,this.user=r,this.bypassAuthState=i,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(t)?t:[t]}execute(){return new Promise(async(e,t)=>{this.pendingPromise={resolve:e,reject:t};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(n){this.reject(n)}})}async onAuthEvent(e){let{urlResponse:t,sessionId:n,postBody:r,tenantId:i,error:s,type:o}=e;if(s){this.reject(s);return}let a={auth:this.auth,requestUri:t,sessionId:n,tenantId:i||void 0,postBody:r||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(o)(a))}catch(l){this.reject(l)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return nk;case"linkViaPopup":case"linkViaRedirect":return nR;case"reauthViaPopup":case"reauthViaRedirect":return nC;default:g(this.auth,"internal-error")}}resolve(e){x(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){x(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()}}/** 1142 * @license 1143 * Copyright 2020 Google LLC 1144 * 1145 * Licensed under the Apache License, Version 2.0 (the "License"); 1146 * you may not use this file except in compliance with the License. 1147 * You may obtain a copy of the License at 1148 * 1149 * http://www.apache.org/licenses/LICENSE-2.0 1150 * 1151 * Unless required by applicable law or agreed to in writing, software 1152 * distributed under the License is distributed on an "AS IS" BASIS, 1153 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1154 * See the License for the specific language governing permissions and 1155 * limitations under the License. 1156 */ let nO=new R(2e3,1e4);async function nD(e,t,n){let r=ew(e);_(e,t,eK);let i=nT(r,n),s=new nF(r,"signInViaPopup",t,i);return s.executeNotNull()}async function nN(e,t,n){let r=(0,i.m9)(e);_(r.auth,t,eK);let s=nT(r.auth,n),o=new nF(r.auth,"reauthViaPopup",t,s,r);return o.executeNotNull()}async function nP(e,t,n){let r=(0,i.m9)(e);_(r.auth,t,eK);let s=nT(r.auth,n),o=new nF(r.auth,"linkViaPopup",t,s,r);return o.executeNotNull()}
1156class nF extends nA{constructor(e,t,n,r,i){super(e,t,r,i),this.provider=n,this.authWindow=null,this.pollId=null,nF.currentPopupAction&&nF.currentPopupAction.cancel(),nF.currentPopupAction=this}async executeNotNull(){let e=await this.execute();return w(e,this.auth,"internal-error"),e}async onExecution(){x(1===this.filter.length,"Popup operations only handle one event");let e=t0();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],e),this.authWindow.associatedEvent=e,this.resolver._originValidation(this.auth).catch(e=>{this.reject(e)}),this.resolver._isIframeWebStorageSupported(this.auth,e=>{e||this.reject(y(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){var e;return(null===(e=this.authWindow)||void 0===e?void 0:e.associatedEvent)||null}cancel(){this.reject(y(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,nF.currentPopupAction=null}pollUserCancellation(){let e=()=>{var t,n;if(null===(n=null===(t=this.authWindow)||void 0===t?void 0:t.window)||void 0===n?void 0:n.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(y(this.auth,"popup-closed-by-user"))},2e3);return}this.pollId=window.setTimeout(e,nO.get())};e()}}nF.currentPopupAction=null;let nM=new Map;class nL extends nA{constructor(e,t,n=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],t,void 0,n),this.eventId=null}async execute(){let e=nM.get(this.auth._key());if(!e){try{let t=await nj(this.resolver,this.auth),n=t?await super.execute():null;e=()=>Promise.resolve(n)}catch(r){e=()=>Promise.reject(r)}nM.set(this.auth._key(),e)}return this.bypassAuthState||nM.set(this.auth._key(),()=>Promise.resolve(null)),e()}async onAuthEvent(e){if("signInViaRedirect"===e.type)return super.onAuthEvent(e);if("unknown"===e.type){this.resolve(null);return}if(e.eventId){let t=await this.auth._redirectUserForId(e.eventId);if(t)return this.user=t,super.onAuthEvent(e);this.resolve(null)}}async onExecution(){}cleanUp(){}}async function nj(e,t){let n=nV(t),r=n$(e);if(!await r._isAvailable())return!1;let i=await r._get(n)==="true";return await r._remove(n),i}async function nU(e,t){return n$(e)._set(nV(t),"true")}function nB(){nM.clear()}function nZ(e,t){nM.set(e._key(),t)}function n$(e){return T(e._redirectPersistence)}function nV(e){return es("pendingRedirect",e.config.apiKey,e.name)}/** 1157 * @license 1158 * Copyright 2020 Google LLC 1159 * 1160 * Licensed under the Apache License, Version 2.0 (the "License"); 1161 * you may not use this file except in compliance with the License. 1162 * You may obtain a copy of the License at 1163 * 1164 * http://www.apache.org/licenses/LICENSE-2.0 1165 * 1166 * Unless required by applicable law or agreed to in writing, software 1167 * distributed under the License is distributed on an "AS IS" BASIS, 1168 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1169 * See the License for the specific language governing permissions and 1170 * limitations under the License. 1171 */ function nz(e,t,n){return nq(e,t,n)}async function nq(e,t,n){let r=ew(e);_(e,t,eK);let i=nT(r,n);return await nU(i,r),i._openRedirect(r,t,"signInViaRedirect")}function nG(e,t,n){return nW(e,t,n)}async function nW(e,t,n){let r=(0,i.m9)(e);_(r.auth,t,eK);let s=nT(r.auth,n);await nU(s,r.auth);let o=await nX(r);return s._openRedirect(r.auth,t,"reauthViaRedirect",o)}function nH(e,t,n){return nK(e,t,n)}async function nK(e,t,n){let r=(0,i.m9)(e);_(r.auth,t,eK);let s=nT(r.auth,n);await tr(!1,r,t.providerId),await nU(s,r.auth);let o=await nX(r);return s._openRedirect(r.auth,t,"linkViaRedirect",o)}async function nY(e,t){return await ew(e)._initializationPromise,nQ(e,t,!1)}async function nQ(e,t,n=!1){let r=ew(e),i=nT(r,t),s=new nL(r,i,n),o=await s.execute();return o&&!n&&(delete o.user._redirectEventId,await r._persistUserIfCurrent(o.user),await r._setRedirectUser(null,t)),o}async function nX(e){let t=t0(`${e.uid}:::`);return e._redirectEventId=t,await e.auth._setRedirectUser(e),await e.auth._persistUserIfCurrent(e),t}class nJ{constructor(e){this.auth=e,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=
1171Date.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 t=!1;return this.consumers.forEach(n=>{this.isEventForConsumer(e,n)&&(t=!0,this.sendToConsumer(e,n),this.saveEventToCache(e))}),this.hasHandledPotentialRedirect||!function(e){switch(e.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return n1(e);default:return!1}}(e)||(this.hasHandledPotentialRedirect=!0,t||(this.queuedRedirectEvent=e,t=!0)),t}sendToConsumer(e,t){var n;if(e.error&&!n1(e)){let r=(null===(n=e.error.code)||void 0===n?void 0:n.split("auth/")[1])||"internal-error";t.onError(y(this.auth,r))}else t.onAuthEvent(e)}isEventForConsumer(e,t){let n=null===t.eventId||!!e.eventId&&e.eventId===t.eventId;return t.filter.includes(e.type)&&n}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=6e5&&this.cachedEventUids.clear(),this.cachedEventUids.has(n0(e))}saveEventToCache(e){this.cachedEventUids.add(n0(e)),this.lastProcessedEventTime=Date.now()}}function n0(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter(e=>e).join("-")}function n1({type:e,error:t}){return"unknown"===e&&(null==t?void 0:t.code)==="auth/no-auth-event"}/** 1172 * @license 1173 * Copyright 2020 Google LLC 1174 * 1175 * Licensed under the Apache License, Version 2.0 (the "License"); 1176 * you may not use this file except in compliance with the License. 1177 * You may obtain a copy of the License at 1178 * 1179 * http://www.apache.org/licenses/LICENSE-2.0 1180 * 1181 * Unless required by applicable law or agreed to in writing, software 1182 * distributed under the License is distributed on an "AS IS" BASIS, 1183 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1184 * See the License for the specific language governing permissions and 1185 * limitations under the License. 1186 */ async function n2(e,t={}){return F(e,"GET","/v1/projects",t)}/** 1187 * @license 1188 * Copyright 2020 Google LLC 1189 * 1190 * Licensed under the Apache License, Version 2.0 (the "License"); 1191 * you may not use this file except in compliance with the License. 1192 * You may obtain a copy of the License at 1193 * 1194 * http://www.apache.org/licenses/LICENSE-2.0 1195 * 1196 * Unless required by applicable law or agreed to in writing, software 1197 * distributed under the License is distributed on an "AS IS" BASIS, 1198 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1199 * See the License for the specific language governing permissions and 1200 * limitations under the License. 1201 */ let n4=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,n5=/^https?/;async function n3(e){if(e.config.emulator)return;let{authorizedDomains:t}=await n2(e);for(let n of t)try{if(n6(n))return}catch(r){}g(e,"unauthorized-domain")}function n6(e){let t=I(),{protocol:n,hostname:r}=new URL(t);if(e.startsWith("chrome-extension://")){let i=new URL(e);return""===i.hostname&&""===r?"chrome-extension:"===n&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):"chrome-extension:"===n&&i.hostname===r}if(!n5.test(n))return!1;if(n4.test(e))return r===e;let s=e.replace(/\./g,"\\."),o=RegExp("^(.+\\."+s+"|"+s+")$","i");return o.test(r)}/** 1202 * @license 1203 * Copyright 2020 Google LLC. 1204 * 1205 * Licensed under the Apache License, Version 2.0 (the "License"); 1206 * you may not use this file except in compliance with the License. 1207 * You may obtain a copy of the License at 1208 * 1209 * http://www.apache.org/licenses/LICENSE-2.0 1210 * 1211 * Unless required by applicable law or agreed to in writing, software 1212 * distributed under the License is distributed on an "AS IS" BASIS, 1213 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1214 * See the License for the specific language governing permissions and 1215 * limitations under the License. 1216 */ let n8=new R(3e4,6e4);function n7(){let e=t2().___jsl;if(null==e?void 0:e.H){for(let t of Object.keys(e.H))if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=[...e.H[t].L],e.CP)for(let n=0;n<e.CP.length;n++)e.CP[n]=null}}let n9=null,re=new R(5e3,15e3),rt={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},rn=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);async function rr(e){var t,n;let r=await (n9=n9||new Promise((t,n)=>{var r,i,s;function o(){n7(),gapi.load("gapi.iframes",{callback(){t(gapi.iframes.getContext())},ontimeout(){n7(),n(y(e,"network-request-failed"))},timeout:n8.get()})}if(null===(i=null===(r=t2().gapi)||void 0===r?void 0:r.iframes)||void 0===i?void 0:i.Iframe)t(gapi.iframes.getContext());else if(null===(s=t2().gapi)||void 0===s?void 0:s.load)o();else{let a=nl("iframefcb");return t2()[a]=()=>{gapi.load?o():n(y(e,"network-request-failed"))},na(`https://apis.google.com/js/api.js?onload=${a}`).catch(e=>n(e))}}).catch(e=>{throw n9=null,e})),o=t2().gapi;return w(o,e,"internal-error"),r.open({where:document.body,url:function(e){let t=e.config;w(t.authDomain,e,"auth-domain-config-required");let n=t.emulator?A(t,"emulator/auth/iframe"):`https://${e.config.authDomain}
1216/__/auth/iframe`,r={apiKey:t.apiKey,appName:e.name,v:s.SDK_VERSION},o=rn.get(e.config.apiHost);o&&(r.eid=o);let a=e._getFrameworks();return a.length&&(r.fw=a.join(",")),`${n}?${(0,i.xO)(r).slice(1)}`}(e),messageHandlersFilter:o.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:rt,dontclear:!0},t=>new Promise(async(n,r)=>{await t.restyle({setHideOnLeave:!1});let i=y(e,"network-request-failed"),s=t2().setTimeout(()=>{r(i)},re.get());function o(){t2().clearTimeout(s),n(t)}t.ping(o).then(o,()=>{r(i)})}))}/** 1217 * @license 1218 * Copyright 2020 Google LLC. 1219 * 1220 * Licensed under the Apache License, Version 2.0 (the "License"); 1221 * you may not use this file except in compliance with the License. 1222 * You may obtain a copy of the License at 1223 * 1224 * http://www.apache.org/licenses/LICENSE-2.0 1225 * 1226 * Unless required by applicable law or agreed to in writing, software 1227 * distributed under the License is distributed on an "AS IS" BASIS, 1228 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1229 * See the License for the specific language governing permissions and 1230 * limitations under the License. 1231 */ let ri={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};class rs{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch(e){}}}function ro(e,t,n,r,o,a){w(e.config.authDomain,e,"auth-domain-config-required"),w(e.config.apiKey,e,"invalid-api-key");let l={apiKey:e.config.apiKey,appName:e.name,authType:n,redirectUrl:r,v:s.SDK_VERSION,eventId:o};if(t instanceof eK)for(let[u,c]of(t.setDefaultLanguage(e.languageCode),l.providerId=t.providerId||"",(0,i.xb)(t.getCustomParameters())||(l.customParameters=JSON.stringify(t.getCustomParameters())),Object.entries(a||{})))l[u]=c;if(t instanceof eY){let h=t.getScopes().filter(e=>""!==e);h.length>0&&(l.scopes=h.join(","))}for(let d of(e.tenantId&&(l.tid=e.tenantId),Object.keys(l)))void 0===l[d]&&delete l[d];return`${function({config:e}){return e.emulator?A(e,"emulator/auth/handler"):`https://${e.authDomain}/__/auth/handler`}(e)}?${(0,i.xO)(l).slice(1)}`}/** 1232 * @license 1233 * Copyright 2020 Google LLC 1234 * 1235 * Licensed under the Apache License, Version 2.0 (the "License"); 1236 * you may not use this file except in compliance with the License. 1237 * You may obtain a copy of the License at 1238 * 1239 * http://www.apache.org/licenses/LICENSE-2.0 1240 * 1241 * Unless required by applicable law or agreed to in writing, software 1242 * distributed under the License is distributed on an "AS IS" BASIS, 1243 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1244 * See the License for the specific language governing permissions and 1245 * limitations under the License. 1246 */ let ra="webStorageSupport",rl=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=tX,this._completeRedirectFn=nQ,this._overrideRedirectResult=nZ}async _openPopup(e,t,n,r){var s;x(null===(s=this.eventManagers[e._key()])||void 0===s?void 0:s.manager,"_initialize() not called before _openPopup()");let o=ro(e,t,n,I(),r);return function(e,t,n,r=500,s=600){let o=Math.max((window.screen.availHeight-s)/2,0).toString(),a=Math.max((window.screen.availWidth-r)/2,0).toString(),l="",u=Object.assign(Object.assign({},ri),{width:r.toString(),height:s.toString(),top:o,left:a}),c=(0,i.z$)().toLowerCase();n&&(l=ec(c)?"_blank":n),el(c)&&(t=t||"http://localhost",u.scrollbars="yes");let h=Object.entries(u).reduce((e,[t,n])=>`${e}${t}=${n},`,"");if(function(e=(0,i.z$)()){var t;return em(e)&&!!(null===(t=window.navigator)||void 0===t?void 0:t.standalone)}(c)&&"_self"!==l)return function(e,t){let n=document.createElement("a");n.href=e,n.target=t;let r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}(t||"",l),new rs(null);let d=window.open(t||"",l,h);w(d,e,"popup-blocked");try{d.focus()}catch(f){}return new rs(d)}(e,o,t0())}async _openRedirect(e,t,n,r){var i;return await this._originValidation(e),i=ro(e,t,n,I(),r),t2().location.href=i,new Promise(()=>{})}_initialize(e){let t=e._key();if(this.eventManagers[t]){let{manager:n,promise:r}=this.eventManagers[t];return n?Promise.resolve(n):(x(r,"If manager is not set, promise should be"),r)}let i=this.initAndGetManager(e);return this.eventManagers[t]={promise:i},i.catch(()=>{delete this.eventManagers[t]}),i}async initAndGetManager(e){let t=await rr(e),n=new nJ(e);return t.register("authEvent",t=>
1246{w(null==t?void 0:t.authEvent,e,"invalid-auth-event");let r=n.onEvent(t.authEvent);return{status:r?"ACK":"ERROR"}},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:n},this.iframes[e._key()]=t,n}_isIframeWebStorageSupported(e,t){let n=this.iframes[e._key()];n.send(ra,{type:ra},n=>{var r;let i=null===(r=null==n?void 0:n[0])||void 0===r?void 0:r[ra];void 0!==i&&t(!!i),g(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){let t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=n3(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return ey()||eu()||em()}};class ru{constructor(e){this.factorId=e}_process(e,t,n){switch(t.type){case"enroll":return this._finalizeEnroll(e,t.credential,n);case"signin":return this._finalizeSignIn(e,t.credential);default:return E("unexpected MultiFactorSessionType")}}}class rc extends ru{constructor(e){super("phone"),this.credential=e}static _fromCredential(e){return new rc(e)}_finalizeEnroll(e,t,n){var r,i;return F(e,"POST","/v2/accounts/mfaEnrollment:finalize",P(e,i={idToken:t,displayName:n,phoneVerificationInfo:this.credential._makeVerificationRequest()}))}_finalizeSignIn(e,t){var n,r;return F(e,"POST","/v2/accounts/mfaSignIn:finalize",P(e,r={mfaPendingCredential:t,phoneVerificationInfo:this.credential._makeVerificationRequest()}))}}class rh{constructor(){}static assertion(e){return rc._fromCredential(e)}}rh.FACTOR_ID="phone";var rd="@firebase/auth",rf="0.20.10";/** 1247 * @license 1248 * Copyright 2020 Google LLC 1249 * 1250 * Licensed under the Apache License, Version 2.0 (the "License"); 1251 * you may not use this file except in compliance with the License. 1252 * You may obtain a copy of the License at 1253 * 1254 * http://www.apache.org/licenses/LICENSE-2.0 1255 * 1256 * Unless required by applicable law or agreed to in writing, software 1257 * distributed under the License is distributed on an "AS IS" BASIS, 1258 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1259 * See the License for the specific language governing permissions and 1260 * limitations under the License. 1261 */ class rp{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),(null===(e=this.auth.currentUser)||void 0===e?void 0:e.uid)||null}async getToken(e){if(this.assertAuthConfigured(),await this.auth._initializationPromise,!this.auth.currentUser)return null;let t=await this.auth.currentUser.getIdToken(e);return{accessToken:t}}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;let t=this.auth.onIdTokenChanged(t=>{e((null==t?void 0:t.stsTokenManager.accessToken)||null)});this.internalListeners.set(e,t),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();let t=this.internalListeners.get(e);t&&(this.internalListeners.delete(e),t(),this.updateProactiveRefresh())}assertAuthConfigured(){w(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}let rm=(0,i.Pz)("authIdTokenMaxAge")||300,rg=null,ry=e=>async t=>{let n=t&&await t.getIdTokenResult(),r=n&&(new Date().getTime()-Date.parse(n.issuedAtTime))/1e3;if(r&&r>rm)return;let i=null==n?void 0:n.token;rg!==i&&(rg=i,await fetch(e,{method:i?"POST":"DELETE",headers:i?{Authorization:`Bearer ${i}`}:{}}))};function rv(e=(0,s.getApp)()){let t=(0,s._getProvider)(e,"auth");if(t.isInitialized())return t.getImmediate();let n=/** 1262 * @license 1263 * Copyright 2020 Google LLC 1264 * 1265 * Licensed under the Apache License, Version 2.0 (the "License"); 1266 * you may not use this file except in compliance with the License. 1267 * You may obtain a copy of the License at 1268 * 1269 * http://www.apache.org/licenses/LICENSE-2.0 1270 * 1271 * Unless required by applicable law or agreed to in writing, software 1272 * distributed under the License is distributed on an "AS IS" BASIS, 1273 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1274 * See the License for the specific language governing permissions and 1275 * limitations under the License. 1276 */ function(e,t){let n=(0,s._getProvider)(e,"auth");if(n.isInitialized()){let r=n.getImmediate(),o=n.getOptions();if((0,i.vZ)(o,null!=t?t:{}))return r;g(r,"already-initialized")}let a=n.initialize({options:t});return a}(e,{popupRedirectResolver:rl,persistence:[ns,tY,tX]}
1276),r=(0,i.Pz)("authTokenSyncURL");if(r){var o,a,l,u,c;let h=ry(r);l=()=>h(n.currentUser),(0,i.m9)(n).beforeAuthStateChanged(h,l),c=e=>h(e),(0,i.m9)(n).onIdTokenChanged(c,void 0,void 0)}let d=(0,i.q4)("auth");return d&&ex(n,`http://${d}`),n}r="Browser",(0,s._registerComponent)(new l.wA("auth",(e,{options:t})=>{let n=e.getProvider("app").getImmediate(),i=e.getProvider("heartbeat"),{apiKey:s,authDomain:o}=n.options;return((e,n)=>{w(s&&!s.includes(":"),"invalid-api-key",{appName:e.name}),w(!(null==o?void 0:o.includes(":")),"argument-error",{appName:e.name});let i={apiKey:s,authDomain:o,clientPlatform:r,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:ev(r)},a=new eb(e,n,i);return function(e,t){let n=(null==t?void 0:t.persistence)||[],r=(Array.isArray(n)?n:[n]).map(T);(null==t?void 0:t.errorMap)&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(r,null==t?void 0:t.popupRedirectResolver)}(a,t),a})(n,i)},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,t,n)=>{let r=e.getProvider("auth-internal");r.initialize()})),(0,s._registerComponent)(new l.wA("auth-internal",e=>{var t;let n=ew(e.getProvider("auth").getImmediate());return new rp(n)},"PRIVATE").setInstantiationMode("EXPLICIT")),(0,s.registerVersion)(rd,rf,/** 1277 * @license 1278 * Copyright 2020 Google LLC 1279 * 1280 * Licensed under the Apache License, Version 2.0 (the "License"); 1281 * you may not use this file except in compliance with the License. 1282 * You may obtain a copy of the License at 1283 * 1284 * http://www.apache.org/licenses/LICENSE-2.0 1285 * 1286 * Unless required by applicable law or agreed to in writing, software 1287 * distributed under the License is distributed on an "AS IS" BASIS, 1288 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1289 * See the License for the specific language governing permissions and 1290 * limitations under the License. 1291 */ function(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";default:return}}(r)),(0,s.registerVersion)(rd,rf,"esm2017")},1294:function(e,t,n){"use strict";n.d(t,{u7:function(){return hz},Jj:function(){return c1},IX:function(){return cZ},my:function(){return cf},xU:function(){return hH},Lz:function(){return c2},WA:function(){return n1},F8:function(){return c5},$q:function(){return hK},W:function(){return hY},EK:function(){return ro},PU:function(){return di},l7:function(){return r4},Ky:function(){return rd},Xb:function(){return rh},Cf:function(){return ca},K9:function(){return nJ},Me:function(){return rH},yq:function(){return nY},Wi:function(){return cr},ET:function(){return h7},Ab:function(){return dd},vr:function(){return dh},Fc:function(){return cH},hJ:function(){return cg},B$:function(){return cy},at:function(){return cd},oe:function(){return h8},AK:function(){return du},TF:function(){return cQ},JU:function(){return cv},ST:function(){return cq},fH:function(){return cG},Ix:function(){return cY},Wu:function(){return hU},Lx:function(){return hj},qY:function(){return cV},GL:function(){return dt},QT:function(){return hX},kl:function(){return h0},Xk:function(){return h1},PL:function(){return h2},UQ:function(){return h4},zN:function(){return h5},nP:function(){return df},b9:function(){return hD},vh:function(){return hN},Pb:function(){return cX},L$:function(){return cJ},cf:function(){return h9},sc:function(){return de},Xo:function(){return hA},IO:function(){return hI},iE:function(){return cb},Eo:function(){return c_},i3:function(){return dl},Bt:function(){return dc},pl:function(){return h3},Ub:function(){return nW},qK:function(){return hQ},TQ:function(){return hM},e0:function(){return hF},r7:function(){return h6},Mx:function(){return cK},ar:function(){return hC}});var r,i,s,o,a,l,u,c,h,d=n(2238),f=n(8463),p=n(3333),m=n(4444),g="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{},y={},v=v||{},_=g||self;function b(){}function w(e){var t=typeof e;return"array"==(t="object"!=t?t:e?Array.isArray(e)?"array":t:"null")||"object"==t&&"number"==typeof e.length}function E(e){var t=typeof e;return"object"==t&&null!=e||"function"==t}function x(e,t,n){return e.call.apply(e.bind,arguments)}function S(e,t,n){if(!e)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),e.apply(t,n)}}return function(){return e.apply(t,arguments)}}function T(e,t,n){return(T=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?x:S).apply(null,arguments)}
1291function I(e,t){var n=Array.prototype.slice.call(arguments,1);return function(){var t=n.slice();return t.push.apply(t,arguments),e.apply(this,t)}}function k(e,t){function n(){}n.prototype=t.prototype,e.X=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.Wb=function(e,n,r){for(var i=Array(arguments.length-2),s=2;s<arguments.length;s++)i[s-2]=arguments[s];return t.prototype[n].apply(e,i)}}function C(){this.s=this.s,this.o=this.o}C.prototype.s=!1,C.prototype.na=function(){this.s||(this.s=!0,this.M())},C.prototype.M=function(){if(this.o)for(;this.o.length;)this.o.shift()()};let R=Array.prototype.indexOf?function(e,t){return Array.prototype.indexOf.call(e,t,void 0)}:function(e,t){if("string"==typeof e)return"string"!=typeof t||1!=t.length?-1:e.indexOf(t,0);for(let n=0;n<e.length;n++)if(n in e&&e[n]===t)return n;return -1};function A(e){let t=e.length;if(0<t){let n=Array(t);for(let r=0;r<t;r++)n[r]=e[r];return n}return[]}function O(e,t){for(let n=1;n<arguments.length;n++){let r=arguments[n];if(w(r)){let i=e.length||0,s=r.length||0;e.length=i+s;for(let o=0;o<s;o++)e[i+o]=r[o]}else e.push(r)}}function D(e,t){this.type=e,this.g=this.target=t,this.defaultPrevented=!1}D.prototype.h=function(){this.defaultPrevented=!0};var N=function(){if(!_.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});try{_.addEventListener("test",b,t),_.removeEventListener("test",b,t)}catch(n){}return e}();function P(e){return/^[\s\xa0]*$/.test(e)}var F=String.prototype.trim?function(e){return e.trim()}:function(e){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(e)[1]};function M(e,t){return e<t?-1:e>t?1:0}function L(){var e=_.navigator;return e&&(e=e.userAgent)?e:""}function j(e){return -1!=L().indexOf(e)}function U(e){return U[" "](e),e}U[" "]=b;var B=j("Opera"),Z=j("Trident")||j("MSIE"),$=j("Edge"),V=$||Z,z=j("Gecko")&&!(-1!=L().toLowerCase().indexOf("webkit")&&!j("Edge"))&&!(j("Trident")||j("MSIE"))&&!j("Edge"),q=-1!=L().toLowerCase().indexOf("webkit")&&!j("Edge");function G(){var e=_.document;return e?e.documentMode:void 0}a:{var W,H="",K=(W=L(),z?/rv:([^\);]+)(\)|;)/.exec(W):$?/Edge\/([\d\.]+)/.exec(W):Z?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(W):q?/WebKit\/(\S+)/.exec(W):B?/(?:Version)[ \/]?(\S+)/.exec(W):void 0);if(K&&(H=K?K[1]:""),Z){var Y=G();if(null!=Y&&Y>parseFloat(H)){s=String(Y);break a}}s=H}var Q={};if(_.document&&Z){o=G()||parseInt(s,10)||void 0}else o=void 0;var X=o;function J(e,t){if(D.call(this,e?e.type:""),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.pointerId=0,this.pointerType="",this.i=null,e){var n=this.type=e.type,r=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:null;if(this.target=e.target||e.srcElement,this.g=t,t=e.relatedTarget){if(z){a:{try{U(t.nodeName);var i=!0;break a}catch(s){}i=!1}i||(t=null)}}else"mouseover"==n?t=e.fromElement:"mouseout"==n&&(t=e.toElement);this.relatedTarget=t,r?(this.clientX=void 0!==r.clientX?r.clientX:r.pageX,this.clientY=void 0!==r.clientY?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0):(this.clientX=void 0!==e.clientX?e.clientX:e.pageX,this.clientY=void 0!==e.clientY?e.clientY:e.pageY,this.screenX=e.screenX||0,this.screenY=e.screenY||0),this.button=e.button,this.key=e.key||"",this.ctrlKey=e.ctrlKey,this.altKey=e.altKey,this.shiftKey=e.shiftKey,this.metaKey=e.metaKey,this.pointerId=e.pointerId||0,this.pointerType="string"==typeof e.pointerType?e.pointerType:ee[e.pointerType]||"",this.state=e.state,this.i=e,e.defaultPrevented&&J.X.h.call(this)}}k(J,D);var ee={2:"touch",3:"pen",4:"mouse"};J.prototype.h=function(){J.X.h.call(this);var e=this.i;e.preventDefault?e.preventDefault():e.returnValue=!1};var et="closure_listenable_"+(1e6*Math.random()|0),en=0;function er(e,t,n,r,i){this.listener=e,this.proxy=null,this.src=t,this.type=n,this.capture=!!r,this.ha=i,this.key=++en,this.ba=this.ea=!1}function ei(e){e.ba=!0,e.listener=null,e.proxy=null,e.src=null,e.ha=null}
1291function es(e,t,n){for(let r in e)t.call(n,e[r],r,e)}function eo(e){let t={};for(let n in e)t[n]=e[n];return t}let ea="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function el(e,t){let n,r;for(let i=1;i<arguments.length;i++){for(n in r=arguments[i])e[n]=r[n];for(let s=0;s<ea.length;s++)n=ea[s],Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}}function eu(e){this.src=e,this.g={},this.h=0}function ec(e,t){var n=t.type;if(n in e.g){var r,i=e.g[n],s=R(i,t);(r=0<=s)&&Array.prototype.splice.call(i,s,1),r&&(ei(t),0==e.g[n].length&&(delete e.g[n],e.h--))}}function eh(e,t,n,r){for(var i=0;i<e.length;++i){var s=e[i];if(!s.ba&&s.listener==t&&!!n==s.capture&&s.ha==r)return i}return -1}eu.prototype.add=function(e,t,n,r,i){var s=e.toString();(e=this.g[s])||(e=this.g[s]=[],this.h++);var o=eh(e,t,r,i);return -1<o?(t=e[o],n||(t.ea=!1)):((t=new er(t,this.src,s,!!r,i)).ea=n,e.push(t)),t};var ed="closure_lm_"+(1e6*Math.random()|0),ef={};function ep(e,t,n,r,i){if(r&&r.once)return function e(t,n,r,i,s){if(Array.isArray(n)){for(var o=0;o<n.length;o++)e(t,n[o],r,i,s);return null}return r=ew(r),t&&t[et]?t.O(n,r,E(i)?!!i.capture:!!i,s):em(t,n,r,!0,i,s)}(e,t,n,r,i);if(Array.isArray(t)){for(var s=0;s<t.length;s++)ep(e,t[s],n,r,i);return null}return n=ew(n),e&&e[et]?e.N(t,n,E(r)?!!r.capture:!!r,i):em(e,t,n,!1,r,i)}function em(e,t,n,r,i,s){if(!t)throw Error("Invalid event type");var o=E(i)?!!i.capture:!!i,a=e_(e);if(a||(e[ed]=a=new eu(e)),(n=a.add(t,n,r,o,s)).proxy)return n;if(r=function(){function e(n){return t.call(e.src,e.listener,n)}let t=ev;return e}(),n.proxy=r,r.src=e,r.listener=n,e.addEventListener)N||(i=o),void 0===i&&(i=!1),e.addEventListener(t.toString(),r,i);else if(e.attachEvent)e.attachEvent(ey(t.toString()),r);else if(e.addListener&&e.removeListener)e.addListener(r);else throw Error("addEventListener and attachEvent are unavailable.");return n}function eg(e){if("number"!=typeof e&&e&&!e.ba){var t=e.src;if(t&&t[et])ec(t.i,e);else{var n=e.type,r=e.proxy;t.removeEventListener?t.removeEventListener(n,r,e.capture):t.detachEvent?t.detachEvent(ey(n),r):t.addListener&&t.removeListener&&t.removeListener(r),(n=e_(t))?(ec(n,e),0==n.h&&(n.src=null,t[ed]=null)):ei(e)}}}function ey(e){return e in ef?ef[e]:ef[e]="on"+e}function ev(e,t){if(e.ba)e=!0;else{t=new J(t,this);var n=e.listener,r=e.ha||e.src;e.ea&&eg(e),e=n.call(r,t)}return e}function e_(e){return(e=e[ed])instanceof eu?e:null}var eb="__closure_events_fn_"+(1e9*Math.random()>>>0);function ew(e){return"function"==typeof e?e:(e[eb]||(e[eb]=function(t){return e.handleEvent(t)}),e[eb])}function eE(){C.call(this),this.i=new eu(this),this.P=this,this.I=null}function ex(e,t){var n,r=e.I;if(r)for(n=[];r;r=r.I)n.push(r);if(e=e.P,r=t.type||t,"string"==typeof t)t=new D(t,e);else if(t instanceof D)t.target=t.target||e;else{var i=t;el(t=new D(r,e),i)}if(i=!0,n)for(var s=n.length-1;0<=s;s--){var o=t.g=n[s];i=eS(o,r,!0,t)&&i}if(i=eS(o=t.g=e,r,!0,t)&&i,i=eS(o,r,!1,t)&&i,n)for(s=0;s<n.length;s++)i=eS(o=t.g=n[s],r,!1,t)&&i}function eS(e,t,n,r){if(!(t=e.i.g[String(t)]))return!0;t=t.concat();for(var i=!0,s=0;s<t.length;++s){var o=t[s];if(o&&!o.ba&&o.capture==n){var a=o.listener,l=o.ha||o.src;o.ea&&ec(e.i,o),i=!1!==a.call(l,r)&&i}}return i&&!r.defaultPrevented}k(eE,C),eE.prototype[et]=!0,eE.prototype.removeEventListener=function(e,t,n,r){!function e(t,n,r,i,s){if(Array.isArray(n))for(var o=0;o<n.length;o++)e(t,n[o],r,i,s);else(i=E(i)?!!i.capture:!!i,r=ew(r),t&&t[et])?(t=t.i,(n=String(n).toString())in t.g&&-1<(r=eh(o=t.g[n],r,i,s))&&(ei(o[r]),Array.prototype.splice.call(o,r,1),0==o.length&&(delete t.g[n],t.h--))):t&&(t=e_(t))&&(n=t.g[n.toString()],t=-1,n&&(t=eh(n,r,i,s)),(r=-1<t?n[t]:null)&&eg(r))}(this,e,t,n,r)},eE.prototype.M=function(){if(eE.X.M.call(this),this.i){var e,t=this.i;for(e in t.g){for(var n=t.g[e],r=0;r<n.length;r++)ei(n[r]);delete t.g[e],t.h--}}this.I=null},eE.prototype.N=function(e,t,n,r){return this.i.add(String(e),t,!1,n,r)},eE.prototype.O=function(e,t,n,r){return this.i.add(String(e),t,!0,n,r)};var eT=_.JSON.stringify;function eI(){var e=eD;let t=null;return e.g&&(t=e.g,e.g=e.g.next,e.g||(e.h=null),t.next=null),t}var ek=new class{constructor(e,t){this.i=e,this.j=t,this.h=0,this.g=null}get(){let e;return 0<this.h?(this.h--,e=this.g,this.g=e.next,e.next=null):e=this.i(),e}}(()=>new eC,e=>e.reset());class eC{constructor(){this.next=this.g=this.h=null}set(e,t){this.h=e,this.g=t,this.next=null}reset(){this.next=this.g=this.h=null}}function eR(e){_.setTimeout(()=>{throw e},0)}function eA(e,t){var n;a||(n=_.Promise.resolve(void 0),a=function(){n.then(eN)}
1291),eO||(a(),eO=!0),eD.add(e,t)}var eO=!1,eD=new class{constructor(){this.h=this.g=null}add(e,t){let n=ek.get();n.set(e,t),this.h?this.h.next=n:this.g=n,this.h=n}};function eN(){for(var e;e=eI();){try{e.h.call(e.g)}catch(t){eR(t)}var n=ek;n.j(e),100>n.h&&(n.h++,e.next=n.g,n.g=e)}eO=!1}function eP(e,t){eE.call(this),this.h=e||1,this.g=t||_,this.j=T(this.lb,this),this.l=Date.now()}function eF(e){e.ca=!1,e.R&&(e.g.clearTimeout(e.R),e.R=null)}function eM(e,t,n){if("function"==typeof e)n&&(e=T(e,n));else if(e&&"function"==typeof e.handleEvent)e=T(e.handleEvent,e);else throw Error("Invalid listener argument");return 2147483647<Number(t)?-1:_.setTimeout(e,t||0)}k(eP,eE),(h=eP.prototype).ca=!1,h.R=null,h.lb=function(){if(this.ca){var e=Date.now()-this.l;0<e&&e<.8*this.h?this.R=this.g.setTimeout(this.j,this.h-e):(this.R&&(this.g.clearTimeout(this.R),this.R=null),ex(this,"tick"),this.ca&&(eF(this),this.start()))}},h.start=function(){this.ca=!0,this.R||(this.R=this.g.setTimeout(this.j,this.h),this.l=Date.now())},h.M=function(){eP.X.M.call(this),eF(this),delete this.g};class eL extends C{constructor(e,t){super(),this.m=e,this.j=t,this.h=null,this.i=!1,this.g=null}l(e){this.h=arguments,this.g?this.i=!0:function e(t){t.g=eM(()=>{t.g=null,t.i&&(t.i=!1,e(t))},t.j);let n=t.h;t.h=null,t.m.apply(null,n)}(this)}M(){super.M(),this.g&&(_.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function ej(e){C.call(this),this.h=e,this.g={}}k(ej,C);var eU=[];function eB(e,t,n,r){Array.isArray(n)||(n&&(eU[0]=n.toString()),n=eU);for(var i=0;i<n.length;i++){var s=ep(t,n[i],r||e.handleEvent,!1,e.h||e);if(!s)break;e.g[s.key]=s}}function eZ(e){es(e.g,function(e,t){this.g.hasOwnProperty(t)&&eg(e)},e),e.g={}}function e$(){this.g=!0}function eV(e,t,n,r){e.info(function(){return"XMLHTTP TEXT ("+t+"): "+function(e,t){if(!e.g)return t;if(!t)return null;try{var n=JSON.parse(t);if(n){for(e=0;e<n.length;e++)if(Array.isArray(n[e])){var r=n[e];if(!(2>r.length)){var i=r[1];if(Array.isArray(i)&&!(1>i.length)){var s=i[0];if("noop"!=s&&"stop"!=s&&"close"!=s)for(var o=1;o<i.length;o++)i[o]=""}}}}return eT(n)}catch(a){return t}}(e,n)+(r?" "+r:"")})}ej.prototype.M=function(){ej.X.M.call(this),eZ(this)},ej.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")},e$.prototype.Aa=function(){this.g=!1},e$.prototype.info=function(){};var ez={},eq=null;function eG(){return eq=eq||new eE}function eW(e){D.call(this,ez.Pa,e)}function eH(e){let t=eG();ex(t,new eW(t,e))}function eK(e,t){D.call(this,ez.STAT_EVENT,e),this.stat=t}function eY(e){let t=eG();ex(t,new eK(t,e))}function eQ(e,t){D.call(this,ez.Qa,e),this.size=t}function eX(e,t){if("function"!=typeof e)throw Error("Fn must not be null and must be a function");return _.setTimeout(function(){e()},t)}ez.Pa="serverreachability",k(eW,D),ez.STAT_EVENT="statevent",k(eK,D),ez.Qa="timingevent",k(eQ,D);var eJ={NO_ERROR:0,mb:1,zb:2,yb:3,tb:4,xb:5,Ab:6,Ma:7,TIMEOUT:8,Db:9},e0={rb:"complete",Nb:"success",Na:"error",Ma:"abort",Fb:"ready",Gb:"readystatechange",TIMEOUT:"timeout",Bb:"incrementaldata",Eb:"progress",ub:"downloadprogress",Vb:"uploadprogress"};function e1(){}function e2(e){return e.h||(e.h=e.i())}function e4(){}e1.prototype.h=null;var e5={OPEN:"a",qb:"b",Na:"c",Cb:"d"};function e3(){D.call(this,"d")}function e6(){D.call(this,"c")}function e8(){}function e7(e,t,n,r){this.l=e,this.j=t,this.m=n,this.U=r||1,this.S=new ej(this),this.O=te,e=V?125:void 0,this.T=new eP(e),this.H=null,this.i=!1,this.s=this.A=this.v=this.K=this.F=this.V=this.B=null,this.D=[],this.g=null,this.C=0,this.o=this.u=null,this.Y=-1,this.I=!1,this.N=0,this.L=null,this.$=this.J=this.Z=this.P=!1,this.h=new e9}function e9(){this.i=null,this.g="",this.h=!1}k(e3,D),k(e6,D),k(e8,e1),e8.prototype.g=function(){return new XMLHttpRequest},e8.prototype.i=function(){return{}},l=new e8;var te=45e3,tt={},tn={};function tr(e,t,n){e.K=1,e.v=tE(ty(t)),e.s=n,e.P=!0,ti(e,null)}function ti(e,t){e.F=Date.now(),tl(e),e.A=ty(e.v);var n=e.A,r=e.U;Array.isArray(r)||(r=[String(r)]),tF(n.i,"t",r),e.C=0,n=e.l.H,e.h=new e9,e.g=nT(e.l,n?t:null,!e.s),0<e.N&&(e.L=new eL(T(e.La,e,e.g),e.N)),eB(e.S,e.g,"readystatechange",e.ib),t=e.H?eo(e.H):{},e.s?(e.u||(e.u="POST"),t["Content-Type"]="application/x-www-form-urlencoded",e.g.da(e.A,e.u,e.s,t)):(e.u="GET",e.g.da(e.A,e.u,null,t)),eH(1),function(e,t,n,r,i,s){e.info(function(){if(e.g){if(s)for(var o="",a=s.split("&"),l=0;l<a.length;l++){var u=a[l].split("=");if(1<u.length){var c=u[0];u=u[1];var h=c.split("_");o=2<=h.length&&"type"==h[1]?o+(c+"=")+u+"&":o+(c+"=redacted&")}}else o=null}else o=s;return"XMLHTTP REQ ("+r+") [attempt "+i+"]: "+t+"\n"+n+"\n"+o})}(e.j,e.u,e.A,e.m,e.U,e.s)}function ts(e){return!!e.g&&"GET"==e.u&&2!=e.K&&e.l.Da}function to(e,t,n){let r=!0,i;for(;!e.I&&e.C<n.length;)if((i=ta(e,n))==tn){4==t&&(e.o=4,eY(14),r=!1),eV(e.j,e.m,null,"[Incomplete Response]");break}else if(i==tt){e.o=4,eY(15),eV(e.j,e.m,n,"[Invalid Chunk]"),r=!1;break}else eV(e.j,e.m,i,null),tf(e,i);ts(e)&&i!=tn&&i!=tt&&(e.h.g="",e.C=0),4!=t||0!=n.length||e.h.h||(e.o=1,eY(16),r=!1),e.i=e.i&&r,r?0<n.length&&!e.$&&(e.$=!0,(t=e.l).g==e&&t.$&&!t.K&&(t.j.info("Great, no buffering proxy detected. Bytes received: "+n.length),ny(t),t.K=!0,eY(11))):(eV(e.j,e.m,n,"[Invalid Chunked Response]"),td(e),th(e))}function ta(e,t){var n=e.C,r=t.indexOf("\n",n);return -1==r?tn:isNaN(n=Number(t.substring(n,r)))?tt:(r+=1)+n>t.length?tn:(t=t.substr(r,n),e.C=r+n,t)}function tl(e){e.V=Date.now()+e.O,tu(e,e.O)}function tu(e,t){if(null!=e.B)throw Error("WatchDog timer not null");e.B=eX(T(e.gb,e),t)}function tc(e){e.B&&(_.clearTimeout(e.B),e.B=null)}function th(e){0==e.l.G||e.I||nb(e.l,e)}function td(e){tc(e);var t=e.L;t&&"function"==typeof t.na&&t.na(),e.L=null,eF(e.T),eZ(e.S),e.g&&(t=e.g,e.g=null,t.abort(),t.na())}function tf(e,t){try{var n=e.l;if(0!=n.G&&(n.g==e||t$(n.h,e))){if(!e.J&&t$(n.h,e)&&3==n.G){try{var r=n.Fa.g.parse(t)}catch(i){r=null}if(Array.isArray(r)&&3==r.length){var s=r;if(0==s[0]){a:if(!n.u){if(n.g){if(n.g.F+3e3<e.F)n_(n),nu(n);else break a}ng(n),eY(18)}}else n.Ba=s[1],0<n.Ba-n.T&&37500>s[2]&&n.L&&0==n.A&&!n.v&&(n.v=eX(T(n.cb,n),6e3));if(1>=tZ(n.h)&&n.ja){try{n.ja()}catch(o){}n.ja=void 0}}else nE(n,11)}else if((e.J||n.g==e)&&n_(n),!P(t))for(s=n.Fa.g.parse(t),t=0;t<s.length;t++){let a=s[t];if(n.T=a[0],a=a[1],2==n.G){if("c"==a[0]){n.I=a[1],n.ka=a[2];let l=a[3];null!=l&&(n.ma=l,n.j.info("VER="+n.ma));let u=a[4];null!=u&&(n.Ca=u,n.j.info("SVER="+n.Ca));let c=a[5];null!=c&&"number"==typeof c&&0<c&&(r=1.5*c,n.J=r,n.j.info("backChannelRequestTimeoutMs_="+r)),r=n;let h=e.g;if(h){let d=h.g?h.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(d){var f=r.h;f.g||-1==d.indexOf("spdy")&&-1==d.indexOf("quic")&&-1==d.indexOf("h2")||(f.j=f.l,f.g=new Set,f.h&&(tV(f,f.h),f.h=null))}if(r.D){let p=h.g?h.g.getResponseHeader("X-HTTP-Session-Id"):null;p&&(r.za=p,tw(r.F,r.D,p))}}if(n.G=3,n.l&&n.l.xa(),n.$&&(n.P=Date.now()-e.F,n.j.info("Handshake RTT: "+n.P+"ms")),(r=n).sa=nS(r,r.H?r.ka:null,r.V),e.J){tz(r.h,e);var m=r.J;m&&e.setTimeout(m),e.B&&(tc(e),tl(e)),r.g=e}else nm(r);0<n.i.length&&nh(n)}else"stop"!=a[0]&&"close"!=a[0]||nE(n,7)}else 3==n.G&&("stop"==a[0]||"close"==a[0]?"stop"==a[0]?nE(n,7):nl(n):"noop"!=a[0]&&n.l&&n.l.wa(a),n.A=0)}}eH(4)}catch(g){}}
1291function tp(e,t){if(e.forEach&&"function"==typeof e.forEach)e.forEach(t,void 0);else if(w(e)||"string"==typeof e)Array.prototype.forEach.call(e,t,void 0);else for(var n=function(e){if(e.oa&&"function"==typeof e.oa)return e.oa();if(!e.W||"function"!=typeof e.W){if("undefined"!=typeof Map&&e instanceof Map)return Array.from(e.keys());if(!("undefined"!=typeof Set&&e instanceof Set)){if(w(e)||"string"==typeof e){var t=[];e=e.length;for(var n=0;n<e;n++)t.push(n);return t}for(let r in t=[],n=0,e)t[n++]=r;return t}}}(e),r=function(e){if(e.W&&"function"==typeof e.W)return e.W();if("undefined"!=typeof Map&&e instanceof Map||"undefined"!=typeof Set&&e instanceof Set)return Array.from(e.values());if("string"==typeof e)return e.split("");if(w(e)){for(var t=[],n=e.length,r=0;r<n;r++)t.push(e[r]);return t}for(r in t=[],n=0,e)t[n++]=e[r];return t}(e),i=r.length,s=0;s<i;s++)t.call(void 0,r[s],n&&n[s],e)}(h=e7.prototype).setTimeout=function(e){this.O=e},h.ib=function(e){e=e.target;let t=this.L;t&&3==nn(e)?t.l():this.La(e)},h.La=function(e){try{if(e==this.g)a:{let t=nn(this.g);var n=this.g.Ea();let r=this.g.aa();if(!(3>t)&&(3!=t||V||this.g&&(this.h.h||this.g.fa()||nr(this.g)))){this.I||4!=t||7==n||(8==n||0>=r?eH(3):eH(2)),tc(this);var i=this.g.aa();this.Y=i;b:if(ts(this)){var s=nr(this.g);e="";var o=s.length,a=4==nn(this.g);if(!this.h.i){if("undefined"==typeof TextDecoder){td(this),th(this);var l="";break b}this.h.i=new _.TextDecoder}for(n=0;n<o;n++)this.h.h=!0,e+=this.h.i.decode(s[n],{stream:a&&n==o-1});s.splice(0,o),this.h.g+=e,this.C=0,l=this.h.g}else l=this.g.fa();if(this.i=200==i,function(e,t,n,r,i,s,o){e.info(function(){return"XMLHTTP RESP ("+r+") [ attempt "+i+"]: "+t+"\n"+n+"\n"+s+" "+o})}(this.j,this.u,this.A,this.m,this.U,t,i),this.i){if(this.Z&&!this.J){b:{if(this.g){var u,c=this.g;if((u=c.g?c.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!P(u)){var h=u;break b}}h=null}if(i=h)eV(this.j,this.m,i,"Initial handshake response via X-HTTP-Initial-Response"),this.J=!0,tf(this,i);else{this.i=!1,this.o=3,eY(12),td(this),th(this);break a}}this.P?(to(this,t,l),V&&this.i&&3==t&&(eB(this.S,this.T,"tick",this.hb),this.T.start())):(eV(this.j,this.m,l,null),tf(this,l)),4==t&&td(this),this.i&&!this.I&&(4==t?nb(this.l,this):(this.i=!1,tl(this)))}else 400==i&&0<l.indexOf("Unknown SID")?(this.o=3,eY(12)):(this.o=0,eY(13)),td(this),th(this)}}}catch(d){}finally{}},h.hb=function(){if(this.g){var e=nn(this.g),t=this.g.fa();this.C<t.length&&(tc(this),to(this,e,t),this.i&&4!=e&&tl(this))}},h.cancel=function(){this.I=!0,td(this)},h.gb=function(){this.B=null;let e=Date.now();0<=e-this.V?(function(e,t){e.info(function(){return"TIMEOUT: "+t})}(this.j,this.A),2!=this.K&&(eH(3),eY(17)),td(this),this.o=2,th(this)):tu(this,this.V-e)};var tm=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function tg(e,t){if(this.g=this.s=this.j="",this.m=null,this.o=this.l="",this.h=!1,e instanceof tg){this.h=void 0!==t?t:e.h,tv(this,e.j),this.s=e.s,this.g=e.g,t_(this,e.m),this.l=e.l,t=e.i;var n=new tO;n.i=t.i,t.g&&(n.g=new Map(t.g),n.h=t.h),tb(this,n),this.o=e.o}else e&&(n=String(e).match(tm))?(this.h=!!t,tv(this,n[1]||"",!0),this.s=tx(n[2]||""),this.g=tx(n[3]||"",!0),t_(this,n[4]),this.l=tx(n[5]||"",!0),tb(this,n[6]||"",!0),this.o=tx(n[7]||"")):(this.h=!!t,this.i=new tO(null,this.h))}function ty(e){return new tg(e)}function tv(e,t,n){e.j=n?tx(t,!0):t,e.j&&(e.j=e.j.replace(/:$/,""))}function t_(e,t){if(t){if(isNaN(t=Number(t))||0>t)throw Error("Bad port number "+t);e.m=t}else e.m=null}function tb(e,t,n){var r,i;t instanceof tO?(e.i=t,r=e.i,(i=e.h)&&!r.j&&(tD(r),r.i=null,r.g.forEach(function(e,t){var n=t.toLowerCase();t!=n&&(tN(this,t),tF(this,n,e))},r)),r.j=i):(n||(t=tS(t,tR)),e.i=new tO(t,e.h))}function tw(e,t,n){e.i.set(t,n)}function tE(e){return tw(e,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),e}function tx(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function tS(e,t,n){return"string"==typeof e?(e=encodeURI(e).replace(t,tT),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function tT(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}tg.prototype.toString=function(){var e=[],t=this.j;t&&e.push(tS(t,tI,!0),":");var n=this.g;return(n||"file"==t)&&(e.push("//"),(t=this.s)&&e.push(tS(t,tI,!0),"@"),e.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.m)&&e.push(":",String(n))),(n=this.l)&&(this.g&&"/"!=n.charAt(0)&&e.push("/"),e.push(tS(n,"/"==n.charAt(0)?tC:tk,!0))),(n=this.i.toString())&&e.push("?",n),(n=this.o)&&e.push("#",tS(n,tA)),e.join("")};var tI=/[#\/\?@]/g,tk=/[#\?:]/g,tC=/[#\?]/g,tR=/[#\?@]/g,tA=/#/g;function tO(e,t){this.h=this.g=null,this.i=e||null,this.j=!!t}function tD(e){e.g||(e.g=new Map,e.h=0,e.i&&function(e,t){if(e){e=e.split("&");for(var n=0;n<e.length;n++){var r=e[n].indexOf("="),i=null;if(0<=r){var s=e[n].substring(0,r);i=e[n].substring(r+1)}else s=e[n];t(s,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}(e.i,function(t,n){e.add(decodeURIComponent(t.replace(/\+/g," ")),n)}))}function tN(e,t){tD(e),t=tM(e,t),e.g.has(t)&&(e.i=null,e.h-=e.g.get(t).length,e.g.delete(t))}function tP(e,t){return tD(e),t=tM(e,t),e.g.has(t)}function tF(e,t,n){tN(e,t),0<n.length&&(e.i=null,e.g.set(tM(e,t),A(n)),e.h+=n.length)}function tM(e,t){return t=String(t),e.j&&(t=t.toLowerCase()),t}(h=tO.prototype).add=function(e,t){tD(this),this.i=null,e=tM(this,e);var n=this.g.get(e);return n||this.g.set(e,n=[]),n.push(t),this.h+=1,this},h.forEach=function(e,t){tD(this),this.g.forEach(function(n,r){n.forEac
1291h(function(n){e.call(t,n,r,this)},this)},this)},h.oa=function(){tD(this);let e=Array.from(this.g.values()),t=Array.from(this.g.keys()),n=[];for(let r=0;r<t.length;r++){let i=e[r];for(let s=0;s<i.length;s++)n.push(t[r])}return n},h.W=function(e){tD(this);let t=[];if("string"==typeof e)tP(this,e)&&(t=t.concat(this.g.get(tM(this,e))));else{e=Array.from(this.g.values());for(let n=0;n<e.length;n++)t=t.concat(e[n])}return t},h.set=function(e,t){return tD(this),this.i=null,tP(this,e=tM(this,e))&&(this.h-=this.g.get(e).length),this.g.set(e,[t]),this.h+=1,this},h.get=function(e,t){return e&&0<(e=this.W(e)).length?String(e[0]):t},h.toString=function(){if(this.i)return this.i;if(!this.g)return"";let e=[],t=Array.from(this.g.keys());for(var n=0;n<t.length;n++){var r=t[n];let i=encodeURIComponent(String(r)),s=this.W(r);for(r=0;r<s.length;r++){var o=i;""!==s[r]&&(o+="="+encodeURIComponent(String(s[r]))),e.push(o)}}return this.i=e.join("&")};var tL=class{constructor(e,t){this.h=e,this.g=t}};function tj(e){this.l=e||tU,e=_.PerformanceNavigationTiming?0<(e=_.performance.getEntriesByType("navigation")).length&&("hq"==e[0].nextHopProtocol||"h2"==e[0].nextHopProtocol):!!(_.g&&_.g.Ga&&_.g.Ga()&&_.g.Ga().$b),this.j=e?this.l:1,this.g=null,1<this.j&&(this.g=new Set),this.h=null,this.i=[]}var tU=10;function tB(e){return!!e.h||!!e.g&&e.g.size>=e.j}function tZ(e){return e.h?1:e.g?e.g.size:0}function t$(e,t){return e.h?e.h==t:!!e.g&&e.g.has(t)}function tV(e,t){e.g?e.g.add(t):e.h=t}function tz(e,t){e.h&&e.h==t?e.h=null:e.g&&e.g.has(t)&&e.g.delete(t)}function tq(e){if(null!=e.h)return e.i.concat(e.h.D);if(null!=e.g&&0!==e.g.size){let t=e.i;for(let n of e.g.values())t=t.concat(n.D);return t}return A(e.i)}function tG(){}function tW(){this.g=new tG}function tH(e,t,n){let r=n||"";try{tp(e,function(e,n){let i=e;E(e)&&(i=eT(e)),t.push(r+n+"="+encodeURIComponent(i))})}catch(i){throw t.push(r+"type="+encodeURIComponent("_badmap")),i}}function tK(e,t,n,r,i){try{t.onload=null,t.onerror=null,t.onabort=null,t.ontimeout=null,i(r)}catch(s){}}function tY(e){this.l=e.ac||null,this.j=e.jb||!1}function tQ(e,t){eE.call(this),this.D=e,this.u=t,this.m=void 0,this.readyState=tX,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.v=new Headers,this.h=null,this.C="GET",this.B="",this.g=!1,this.A=this.j=this.l=null}tj.prototype.cancel=function(){if(this.i=tq(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&0!==this.g.size){for(let e of this.g.values())e.cancel();this.g.clear()}},tG.prototype.stringify=function(e){return _.JSON.stringify(e,void 0)},tG.prototype.parse=function(e){return _.JSON.parse(e,void 0)},k(tY,e1),tY.prototype.g=function(){return new tQ(this.l,this.j)},tY.prototype.i=(i={},function(){return i}),k(tQ,eE);var tX=0;function tJ(e){e.j.read().then(e.Ta.bind(e)).catch(e.ga.bind(e))}function t0(e){e.readyState=4,e.l=null,e.j=null,e.A=null,t1(e)}function t1(e){e.onreadystatechange&&e.onreadystatechange.call(e)}(h=tQ.prototype).open=function(e,t){if(this.readyState!=tX)throw this.abort(),Error("Error reopening a connection");this.C=e,this.B=t,this.readyState=1,t1(this)},h.send=function(e){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.g=!0;let t={headers:this.v,method:this.C,credentials:this.m,cache:void 0};e&&(t.body=e),(this.D||_).fetch(new Request(this.B,t)).then(this.Wa.bind(this),this.ga.bind(this))},h.abort=function(){this.response=this.responseText="",this.v=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted.").catch(()=>{}),1<=this.readyState&&this.g&&4!=this.readyState&&(this.g=!1,t0(this)),this.readyState=tX},h.Wa=function(e){if(this.g&&(this.l=e,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=e.headers,this.readyState=2,t1(this)),this.g&&(this.readyState=3,t1(this),this.g))){if("arraybuffer"===this.responseType)e.arrayBuffer().then(this.Ua.bind(this),this.ga.bind(this));else if(void 0!==_.ReadableStream&&"body"in e){if(this.j=e.body.getReader(),this.u){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.A=new TextDecoder;tJ(this)}else e.text().then(this.Va.bind(this),this.ga.bind(this))}},h.Ta=function(e){if(this.g){if(this.u&&e.value)this.response.push(e.value);else if(!this.u){var t=e.value?e.value:new Uint8Array(0);(t=this.A.decode(t,{stream:!e.done}))&&(this.response=this.responseText+=t)}e.done?t0(this):t1(this),3==this.readyState&&tJ(this)}},h.Va=function(e){this.g&&(this.response=this.responseText=e,t0(this))},h.Ua=function(e){this.g&&(this.response=e,t0(this))},h.ga=function(){this.g&&t0(this)},h.setRequestHeader=function(e,t){this.v.append(e,t)},h.getResponseHeader=function(e){return this.h&&this.h.get(e.toLowerCase())||""},h.getAllResponseHeaders=function(){if(!this.h)return"";let e=[],t=this.h.entries();for(var n=t.next();!n.done;)e.push((n=n.value)[0]+": "+n[1]),n=t.next();return e.join("\r\n")},Object.defineProperty(tQ.prototype,"withCredentials",{get:function(){return"include"===this.m},set:function(e){this.m=e?"include":"same-origin"}});var t2=_.JSON.parse;function t4(e){eE.call(this),this.headers=new Map,this.u=e||null,this.h=!1,this.C=this.g=null,this.H="",this.m=0,this.j="",this.l=this.F=this.v=this.D=!1,this.B=0,this.A=null,this.J=t5,this.K=this.L=!1}k(t4,eE);var t5="",t3=/^https?$/i,t6=["POST","PUT"];function t8(e,t){e.h=!1,e.g&&(e.l=!0,e.g.abort(),e.l=!1),e.j=t,e.m=5,t7(e),ne(e)}function t7(e){e.D||(e.D=!0,ex(e,"complete"),ex(e,"error"))}function t9(e){if(e.h&&void 0!==v&&(!e.C[1]||4!=nn(e)||2!=e.aa())){if(e.v&&4==nn(e))eM(e.Ha,0,e);else if(ex(e,"readystatechange"),4==nn(e)){e.h=!1;try{let t=e.aa();a:switch(t){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var n,r,i=!0;break a;default:i=!1}if(!(n=i)){if(r=0===t){var s=String(e.H).match(tm)[1]||null;if(!s&&_.self&&_.self.location){var o=_.self.location.protocol;s=o.substr(0,o.length-1)}r=!t3.test(s?s.toLowerCase():"")}n=r}if(n)ex(e,"complete"),ex(e,"success");else{e.m=6;try{var a=2<nn(e)?e.g.statusText:""}catch(l){a=""}e.j=a+" ["+e.aa()+"]",t7(e)}}finally{ne(e)}}}}function ne(e,t){if(e.g){nt(e);let n=e.g,r=e.C[0]?b:null;e.g=null,e.C=null,t||ex(e,"ready");try{n.onreadystatechange=r}catch(i){}}}function nt(e){e.g&&e.K&&(e.g.ontimeout=null),e.A&&(_.clearTimeout(e.A),e.A=null)}function nn(e){return e.g?e.g.readyState:0}function nr(e){try{if(!e.g)return null;if("response"in e.g)return e.g.response;switch(e.J){case t5:case"text":return e.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in e.g)return e.g.mozResponseArrayBuffer}return null}catch(t){return null}}function ni(e){let t="";return es(e,function(e,n){t+=n,t+=":",t+=e,t+="\r\n"}),t}function ns(e,t,n){a:{for(r in n){var r=!1;break a}r=!0}r||(n=ni(n),"string"==typeof e?null!=n&&encodeURIComponent(String(n)):tw(e,t,n
vendor: 1,980 bytes, line 1291
1291))}function no(e,t,n){return n&&n.internalChannelParams&&n.internalChannelParams[e]||t}function na(e){this.Ca=0,this.i=[],this.j=new e$,this.ka=this.sa=this.F=this.V=this.g=this.za=this.D=this.ia=this.o=this.S=this.s=null,this.ab=this.U=0,this.Za=no("failFast",!1,e),this.L=this.v=this.u=this.m=this.l=null,this.Y=!0,this.pa=this.Ba=this.T=-1,this.Z=this.A=this.C=0,this.Xa=no("baseRetryDelayMs",5e3,e),this.bb=no("retryDelaySeedMs",1e4,e),this.$a=no("forwardChannelMaxRetries",2,e),this.ta=no("forwardChannelRequestTimeoutMs",2e4,e),this.ra=e&&e.xmlHttpFactory||void 0,this.Da=e&&e.Zb||!1,this.J=void 0,this.H=e&&e.supportsCrossDomainXhr||!1,this.I="",this.h=new tj(e&&e.concurrentRequestLimit),this.Fa=new tW,this.O=e&&e.fastHandshake||!1,this.N=e&&e.encodeInitMessageHeaders||!1,this.O&&this.N&&(this.N=!1),this.Ya=e&&e.Xb||!1,e&&e.Aa&&this.j.Aa(),e&&e.forceLongPolling&&(this.Y=!1),this.$=!this.O&&this.Y&&e&&e.detectBufferingProxy||!1,this.ja=void 0,this.P=0,this.K=!1,this.la=this.B=null}function nl(e){if(nc(e),3==e.G){var t=e.U++,n=ty(e.F);tw(n,"SID",e.I),tw(n,"RID",t),tw(n,"TYPE","terminate"),nf(e,n),(t=new e7(e,e.j,t,void 0)).K=2,t.v=tE(ty(n)),n=!1,_.navigator&&_.navigator.sendBeacon&&(n=_.navigator.sendBeacon(t.v.toString(),"")),!n&&_.Image&&((new Image).src=t.v,n=!0),n||(t.g=nT(t.l,null),t.g.da(t.v)),t.F=Date.now(),tl(t)}nx(e)}function nu(e){e.g&&(ny(e),e.g.cancel(),e.g=null)}function nc(e){nu(e),e.u&&(_.clearTimeout(e.u),e.u=null),n_(e),e.h.cancel(),e.m&&("number"==typeof e.m&&_.clearTimeout(e.m),e.m=null)}function nh(e){tB(e.h)||e.m||(e.m=!0,eA(e.Ja,e),e.C=0)}function nd(e,t){var n;n=t?t.m:e.U++;let r=ty(e.F);tw(r,"SID",e.I),tw(r,"RID",n),tw(r,"AID",e.T),nf(e,r),e.o&&e.s&&ns(r,e.o,e.s),n=new e7(e,e.j,n,e.C+1),null===e.o&&(n.H=e.s),t&&(e.i=t.D.concat(e.i)),t=np(e,n,1e3),n.setTimeout(Math.round(.5*e.ta)+Math.round(.5*e.ta*Math.random())),tV(e.h,n),tr(n,r,t)}function nf(e,t){e.ia&&es(e.ia,function(e,n){tw(t,n,e)}),e.l&&tp({},function(e,n){tw(t,n,e)})}
1291function np(e,t,n){n=Math.min(e.i.length,n);var r=e.l?T(e.l.Ra,e.l,e):null;a:{var i=e.i;let s=-1;for(;;){let o=["count="+n];-1==s?0<n?(s=i[0].h,o.push("ofs="+s)):s=0:o.push("ofs="+s);let a=!0;for(let l=0;l<n;l++){let u=i[l].h,c=i[l].g;if(0>(u-=s))s=Math.max(0,i[l].h-100),a=!1;else try{tH(c,o,"req"+u+"_")}catch(h){r&&r(c)}}if(a){r=o.join("&");break a}}}return e=e.i.splice(0,n),t.D=e,r}function nm(e){e.g||e.u||(e.Z=1,eA(e.Ia,e),e.A=0)}function ng(e){return!e.g&&!e.u&&!(3<=e.A)&&(e.Z++,e.u=eX(T(e.Ia,e),nw(e,e.A)),e.A++,!0)}function ny(e){null!=e.B&&(_.clearTimeout(e.B),e.B=null)}function nv(e){e.g=new e7(e,e.j,"rpc",e.Z),null===e.o&&(e.g.H=e.s),e.g.N=0;var t=ty(e.sa);tw(t,"RID","rpc"),tw(t,"SID",e.I),tw(t,"CI",e.L?"0":"1"),tw(t,"AID",e.T),tw(t,"TYPE","xmlhttp"),nf(e,t),e.o&&e.s&&ns(t,e.o,e.s),e.J&&e.g.setTimeout(e.J);var n=e.g;e=e.ka,n.K=1,n.v=tE(ty(t)),n.s=null,n.P=!0,ti(n,e)}function n_(e){null!=e.v&&(_.clearTimeout(e.v),e.v=null)}function nb(e,t){var n=null;if(e.g==t){n_(e),ny(e),e.g=null;var r=2}else{if(!t$(e.h,t))return;n=t.D,tz(e.h,t),r=1}if(0!=e.G){if(e.pa=t.Y,t.i){if(1==r){n=t.s?t.s.length:0,t=Date.now()-t.F;var i,s,o=e.C;ex(r=eG(),new eQ(r,n,t,o)),nh(e)}else nm(e)}else if(3==(o=t.o)||0==o&&0<e.pa||!(1==r&&(i=e,s=t,!(tZ(i.h)>=i.h.j-(i.m?1:0))&&(i.m?(i.i=s.D.concat(i.i),!0):1!=i.G&&2!=i.G&&!(i.C>=(i.Za?0:i.$a))&&(i.m=eX(T(i.Ja,i,s),nw(i,i.C)),i.C++,!0)))||2==r&&ng(e)))switch(n&&0<n.length&&((t=e.h).i=t.i.concat(n)),o){case 1:nE(e,5);break;case 4:nE(e,10);break;case 3:nE(e,6);break;default:nE(e,2)}}}function nw(e,t){let n=e.Xa+Math.floor(Math.random()*e.bb);return e.l||(n*=2),n*t}function nE(e,t){if(e.j.info("Error code "+t),2==t){var n=null;e.l&&(n=null);var r=T(e.kb,e);n||(n=new tg("//www.google.com/images/cleardot.gif"),_.location&&"http"==_.location.protocol||tv(n,"https"),tE(n)),function(e,t){let n=new e$;if(_.Image){let r=new Image;r.onload=I(tK,n,r,"TestLoadImage: loaded",!0,t),r.onerror=I(tK,n,r,"TestLoadImage: error",!1,t),r.onabort=I(tK,n,r,"TestLoadImage: abort",!1,t),r.ontimeout=I(tK,n,r,"TestLoadImage: timeout",!1,t),_.setTimeout(function(){r.ontimeout&&r.ontimeout()},1e4),r.src=e}else t(!1)}(n.toString(),r)}else eY(2);e.G=0,e.l&&e.l.va(t),nx(e),nc(e)}function nx(e){if(e.G=0,e.la=[],e.l){let t=tq(e.h);(0!=t.length||0!=e.i.length)&&(O(e.la,t),O(e.la,e.i),e.h.i.length=0,A(e.i),e.i.length=0),e.l.ua()}}function nS(e,t,n){var r=n instanceof tg?ty(n):new tg(n,void 0);if(""!=r.g)t&&(r.g=t+"."+r.g),t_(r,r.m);else{var i=_.location;r=i.protocol,t=t?t+"."+i.hostname:i.hostname,i=+i.port;var s=new tg(null,void 0);r&&tv(s,r),t&&(s.g=t),i&&t_(s,i),n&&(s.l=n),r=s}return n=e.D,t=e.za,n&&t&&tw(r,n,t),tw(r,"VER",e.ma),nf(e,r),r}function nT(e,t,n){if(t&&!e.H)throw Error("Can't create secondary domain capable XhrIo object.");return(t=new t4(n&&e.Da&&!e.ra?new tY({jb:!0}):e.ra)).Ka(e.H),t}function nI(){}function nk(){if(Z&&!(10<=Number(X)))throw Error("Environmental error: no available transport.")}function nC(e,t){eE.call(this),this.g=new na(t),this.l=e,this.h=t&&t.messageUrlParams||null,e=t&&t.messageHeaders||null,t&&t.clientProtocolHeaderRequired&&(e?e["X-Client-Protocol"]="webchannel":e={"X-Client-Protocol":"webchannel"}),this.g.s=e,e=t&&t.initMessageHeaders||null,t&&t.messageContentType&&(e?e["X-WebChannel-Content-Type"]=t.messageContentType:e={"X-WebChannel-Content-Type":t.messageContentType}),t&&t.ya&&(e?e["X-WebChannel-Client-Profile"]=t.ya:e={"X-WebChannel-Client-Profile":t.ya}),this.g.S=e,(e=t&&t.Yb)&&!P(e)&&(this.g.o=e),this.A=t&&t.supportsCrossDomainXhr||!1,this.v=t&&t.sendRawJson||!1,(t=t&&t.httpSessionIdParam)&&!P(t)&&(this.g.D=t,null!==(e=this.h)&&t in e&&t in(e=this.h)&&delete e[t]),this.j=new nO(this)}function nR(e){e3.call(this);var t=e.__sm__;if(t){a:{for(let n in t){e=n;break a}e=void 0}(this.i=e)&&(e=this.i,t=null!==t&&e in t?t[e]:void 0),this.data=t}else this.data=e}function nA(){e6.call(this),this.status=1}function nO(e){this.g=e}(h=t4.prototype).Ka=function(e){this.L=e},h.da=function(e,t,n,r){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.H+"; newUri="+e);t=t?t.toUpperCase():"GET",this.H=e,this.j="",this.m=0,this.D=!1,this.h=!0,this.g=this.u?this.u.g():l.g(),this.C=this.u?e2(this.u):e2(l),this.g.onreadystatechange=T(this.Ha,this);try{this.F=!0,this.g.open(t,String(e),!0),this.F=!1}catch(i){t8(this,i);return}if(e=n||"",n=new Map(this.headers),r){if(Object.getPrototypeOf(r)===Object.prototype)for(var o in r)n.set(o,r[o]);else if("function"==typeof r.keys&&"function"==typeof r.get)for(let a of r.keys())n.set(a,r.get(a));else throw Error("Unknown input type for opt_headers: "+String(r))}for(let[u,c]of(r=Array.from(n.keys()).find(e=>"content-type"==e.toLowerCase()),o=_.FormData&&e instanceof _.FormData,!(0<=R(t6,t))||r||o||n.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),n))this.g.setRequestHeader(u,c);this.J&&(this.g.responseType=this.J),"withCredentials"in this.g&&this.g.withCredentials!==this.L&&(this.g.withCredentials=this.L);try{var h,d,f;nt(this),0<this.B&&((this.K=(h=this.g,Z&&(d=function(){let e=0,t=F(String(s)).split("."),n=F("9").split("."),r=Math.max(t.length,n.length);for(let i=0;0==e&&i<r;i++){var o=t[i]||"",a=n[i]||"";do{if(o=/(\d*)(\D*)(.*)/.exec(o)||["","","",""],a=/(\d*)(\D*)(.*)/.exec(a)||["","","",""],0==o[0].length&&0==a[0].length)break;e=M(0==o[1].length?0:parseInt(o[1],10),0==a[1].length?0:parseInt(a[1],10))||M(0==o[2].length,0==a[2].length)||M(o[2],a[2]),o=o[3],a=a[3]}while(0==e)}return 0<=e}
1291,f=Q,Object.prototype.hasOwnProperty.call(f,9)?f[9]:f[9]=d(9))&&"number"==typeof h.timeout&&void 0!==h.ontimeout))?(this.g.timeout=this.B,this.g.ontimeout=T(this.qa,this)):this.A=eM(this.qa,this.B,this)),this.v=!0,this.g.send(e),this.v=!1}catch(p){t8(this,p)}},h.qa=function(){void 0!==v&&this.g&&(this.j="Timed out after "+this.B+"ms, aborting",this.m=8,ex(this,"timeout"),this.abort(8))},h.abort=function(e){this.g&&this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1,this.m=e||7,ex(this,"complete"),ex(this,"abort"),ne(this))},h.M=function(){this.g&&(this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1),ne(this,!0)),t4.X.M.call(this)},h.Ha=function(){this.s||(this.F||this.v||this.l?t9(this):this.fb())},h.fb=function(){t9(this)},h.aa=function(){try{return 2<nn(this)?this.g.status:-1}catch(e){return -1}},h.fa=function(){try{return this.g?this.g.responseText:""}catch(e){return""}},h.Sa=function(e){if(this.g){var t=this.g.responseText;return e&&0==t.indexOf(e)&&(t=t.substring(e.length)),t2(t)}},h.Ea=function(){return this.m},h.Oa=function(){return"string"==typeof this.j?this.j:String(this.j)},(h=na.prototype).ma=8,h.G=1,h.Ja=function(e){if(this.m){if(this.m=null,1==this.G){if(!e){this.U=Math.floor(1e5*Math.random()),e=this.U++;let t=new e7(this,this.j,e,void 0),n=this.s;if(this.S&&(n?el(n=eo(n),this.S):n=this.S),null!==this.o||this.N||(t.H=n,n=null),this.O)a:{for(var r=0,i=0;i<this.i.length;i++){b:{var s=this.i[i];if("__data__"in s.g&&"string"==typeof(s=s.g.__data__)){s=s.length;break b}s=void 0}if(void 0===s)break;if(4096<(r+=s)){r=i;break a}if(4096===r||i===this.i.length-1){r=i+1;break a}}r=1e3}else r=1e3;r=np(this,t,r),i=ty(this.F),tw(i,"RID",e),tw(i,"CVER",22),this.D&&tw(i,"X-HTTP-Session-Id",this.D),nf(this,i),n&&(this.N?r="headers="+encodeURIComponent(String(ni(n)))+"&"+r:this.o&&ns(i,this.o,n)),tV(this.h,t),this.Ya&&tw(i,"TYPE","init"),this.O?(tw(i,"$req",r),tw(i,"SID","null"),t.Z=!0,tr(t,i,null)):tr(t,i,r),this.G=2}}else 3==this.G&&(e?nd(this,e):0==this.i.length||tB(this.h)||nd(this))}},h.Ia=function(){if(this.u=null,nv(this),this.$&&!(this.K||null==this.g||0>=this.P)){var e=2*this.P;this.j.info("BP detection timer enabled: "+e),this.B=eX(T(this.eb,this),e)}},h.eb=function(){this.B&&(this.B=null,this.j.info("BP detection timeout reached."),this.j.info("Buffering proxy detected and switch to long-polling!"),this.L=!1,this.K=!0,eY(10),nu(this),nv(this))},h.cb=function(){null!=this.v&&(this.v=null,nu(this),ng(this),eY(19))},h.kb=function(e){e?(this.j.info("Successfully pinged google.com"),eY(2)):(this.j.info("Failed to ping google.com"),eY(1))},(h=nI.prototype).xa=function(){},h.wa=function(){},h.va=function(){},h.ua=function(){},h.Ra=function(){},nk.prototype.g=function(e,t){return new nC(e,t)},k(nC,eE),nC.prototype.m=function(){this.g.l=this.j,this.A&&(this.g.H=!0);var e=this.g,t=this.l,n=this.h||void 0;eY(0),e.V=t,e.ia=n||{},e.L=e.Y,e.F=nS(e,null,e.V),nh(e)},nC.prototype.close=function(){nl(this.g)},nC.prototype.u=function(e){var t=this.g;if("string"==typeof e){var n={};n.__data__=e,e=n}else this.v&&((n={}).__data__=eT(e),e=n);t.i.push(new tL(t.ab++,e)),3==t.G&&nh(t)},nC.prototype.M=function(){this.g.l=null,delete this.j,nl(this.g),delete this.g,nC.X.M.call(this)},k(nR,e3),k(nA,e6),k(nO,nI),nO.prototype.xa=function(){ex(this.g,"a")},nO.prototype.wa=function(e){ex(this.g,new nR(e))},nO.prototype.va=function(e){ex(this.g,new nA(e))},nO.prototype.ua=function(){ex(this.g,"b")},nk.prototype.createWebChannel=nk.prototype.g,nC.prototype.send=nC.prototype.u,nC.prototype.open=nC.prototype.m,nC.prototype.close=nC.prototype.close,eJ.NO_ERROR=0,eJ.TIMEOUT=8,eJ.HTTP_ERROR=6,e0.COMPLETE="complete",e4.EventType=e5,e5.OPEN="a",e5.CLOSE="b",e5.ERROR="c",e5.MESSAGE="d",eE.prototype.listen=eE.prototype.N,t4.prototype.listenOnce=t4.prototype.O,t4.prototype.getLastError=t4.prototype.Oa,t4.prototype.getLastErrorCode=t4.prototype.Ea,t4.prototype.getStatus=t4.prototype.aa,t4.prototype.getResponseJson=t4.prototype.Sa,t4.prototype.getResponseText=t4.prototype.fa,t4.prototype.send=t4.prototype.da,t4.prototype.setWithCredentials=t4.prototype.Ka;var nD=y.createWebChannelTransport=function(){return new nk},nN=y.getStatEventTarget=function(){return eG()},nP=y.ErrorCode=eJ,nF=y.EventType=e0,nM=y.Event=ez,nL=y.Stat={sb:0,vb:1,wb:2,Pb:3,Ub:4,Rb:5,Sb:6,Qb:7,Ob:8,Tb:9,PROXY:10,NOPROXY:11,Mb:12,Ib:13,Jb:14,Hb:15,Kb:16,Lb:17,ob:18,nb:19,pb:20},nj=y.FetchXmlHttpFactory=tY,nU=y.WebChannel=e4,nB=y.XhrIo=t4,nZ=n(3454);let n$="@firebase/firestore";/** 1292 * @license 1293 * Copyright 2017 Google LLC 1294 * 1295 * Licensed under the Apache License, Version 2.0 (the "License");
1296 * you may not use this file except in compliance with the License. 1297 * You may obtain a copy of the License at 1298 * 1299 * http://www.apache.org/licenses/LICENSE-2.0 1300 * 1301 * Unless required by applicable law or agreed to in writing, software 1302 * distributed under the License is distributed on an "AS IS" BASIS, 1303 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1304 * See the License for the specific language governing permissions and 1305 * limitations under the License. 1306 */ class nV{constructor(e){this.uid=e}isAuthenticated(){return null!=this.uid}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual(e){return e.uid===this.uid}}nV.UNAUTHENTICATED=new nV(null),nV.GOOGLE_CREDENTIALS=new nV("google-credentials-uid"),nV.FIRST_PARTY=new nV("first-party-uid"),nV.MOCK_USER=new nV("mock-user");/** 1307 * @license 1308 * Copyright 2017 Google LLC 1309 * 1310 * Licensed under the Apache License, Version 2.0 (the "License"); 1311 * you may not use this file except in compliance with the License. 1312 * You may obtain a copy of the License at 1313 * 1314 * http://www.apache.org/licenses/LICENSE-2.0 1315 * 1316 * Unless required by applicable law or agreed to in writing, software 1317 * distributed under the License is distributed on an "AS IS" BASIS, 1318 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1319 * See the License for the specific language governing permissions and 1320 * limitations under the License. 1321 */ let nz="9.12.1",nq=new p.Yd("@firebase/firestore");function nG(){return nq.logLevel}function nW(e){nq.setLogLevel(e)}function nH(e,...t){if(nq.logLevel<=p.in.DEBUG){let n=t.map(nQ);nq.debug(`Firestore (${nz}): ${e}`,...n)}}function nK(e,...t){if(nq.logLevel<=p.in.ERROR){let n=t.map(nQ);nq.error(`Firestore (${nz}): ${e}`,...n)}}function nY(e,...t){if(nq.logLevel<=p.in.WARN){let n=t.map(nQ);nq.warn(`Firestore (${nz}): ${e}`,...n)}}function nQ(e){var t;if("string"==typeof e)return e;try{return t=e,JSON.stringify(t)}catch(n){return e}}/** 1322 * @license 1323 * Copyright 2017 Google LLC 1324 * 1325 * Licensed under the Apache License, Version 2.0 (the "License"); 1326 * you may not use this file except in compliance with the License. 1327 * You may obtain a copy of the License at 1328 * 1329 * http://www.apache.org/licenses/LICENSE-2.0 1330 * 1331 * Unless required by applicable law or agreed to in writing, software 1332 * distributed under the License is distributed on an "AS IS" BASIS, 1333 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1334 * See the License for the specific language governing permissions and 1335 * limitations under the License. 1336 */ function nX(e="Unexpected state"){let t=`FIRESTORE (${nz}) INTERNAL ASSERTION FAILED: `+e;throw nK(t),Error(t)}function nJ(e,t){e||nX()}/** 1337 * @license 1338 * Copyright 2017 Google LLC 1339 * 1340 * Licensed under the Apache License, Version 2.0 (the "License"); 1341 * you may not use this file except in compliance with the License. 1342 * You may obtain a copy of the License at 1343 * 1344 * http://www.apache.org/licenses/LICENSE-2.0 1345 * 1346 * Unless required by applicable law or agreed to in writing, software 1347 * distributed under the License is distributed on an "AS IS" BASIS, 1348 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1349 * See the License for the specific language governing permissions and 1350 * limitations under the License. 1351 */ let n0={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"};class n1 extends m.ZR{constructor(e,t){super(e,t),this.code=e,this.message=t,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}/** 1352 * @license 1353 * Copyright 2017 Google LLC 1354 * 1355 * Licensed under the Apache License, Version 2.0 (the "License"); 1356 * you may not use this file except in compliance with the License. 1357 * You may obtain a copy of the License at 1358 * 1359 * http://www.apache.org/licenses/LICENSE-2.0 1360 * 1361 * Unless required by applicable law or agreed to in writing, softw
1361are 1362 * distributed under the License is distributed on an "AS IS" BASIS, 1363 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1364 * See the License for the specific language governing permissions and 1365 * limitations under the License. 1366 */ class n2{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}/** 1367 * @license 1368 * Copyright 2017 Google LLC 1369 * 1370 * Licensed under the Apache License, Version 2.0 (the "License"); 1371 * you may not use this file except in compliance with the License. 1372 * You may obtain a copy of the License at 1373 * 1374 * http://www.apache.org/licenses/LICENSE-2.0 1375 * 1376 * Unless required by applicable law or agreed to in writing, software 1377 * distributed under the License is distributed on an "AS IS" BASIS, 1378 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1379 * See the License for the specific language governing permissions and 1380 * limitations under the License. 1381 */ class n4{constructor(e,t){this.user=t,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${e}`)}}class n5{getToken(){return Promise.resolve(null)}invalidateToken(){}start(e,t){e.enqueueRetryable(()=>t(nV.UNAUTHENTICATED))}shutdown(){}}class n3{constructor(e){this.token=e,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(e,t){this.changeListener=t,e.enqueueRetryable(()=>t(this.token.user))}shutdown(){this.changeListener=null}}class n6{constructor(e){this.t=e,this.currentUser=nV.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(e,t){let n=this.i,r=e=>this.i!==n?(n=this.i,t(e)):Promise.resolve(),i=new n2;this.o=()=>{this.i++,this.currentUser=this.u(),i.resolve(),i=new n2,e.enqueueRetryable(()=>r(this.currentUser))};let s=()=>{let t=i;e.enqueueRetryable(async()=>{await t.promise,await r(this.currentUser)})},o=e=>{nH("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=e,this.auth.addAuthTokenListener(this.o),s()};this.t.onInit(e=>o(e)),setTimeout(()=>{if(!this.auth){let e=this.t.getImmediate({optional:!0});e?o(e):(nH("FirebaseAuthCredentialsProvider","Auth not yet detected"),i.resolve(),i=new n2)}},0),s()}getToken(){let e=this.i,t=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(t).then(t=>{var n;return this.i!==e?(nH("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):t?("string"==typeof t.accessToken||nX(),new n4(t.accessToken,this.currentUser)):null}):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.auth.removeAuthTokenListener(this.o)}u(){let e=this.auth&&this.auth.getUid();return null===e||"string"==typeof e||nX(),new nV(e)}}class n8{constructor(e,t,n,r){this.h=e,this.l=t,this.m=n,this.g=r,this.type="FirstParty",this.user=nV.FIRST_PARTY,this.p=new Map}I(){var e;return this.g?this.g():(("object"!=typeof this.h||null===this.h||!this.h.auth||!this.h.auth.getAuthHeaderValueForFirstParty)&&nX(),this.h.auth.getAuthHeaderValueForFirstParty([]))}get headers(){this.p.set("X-Goog-AuthUser",this.l);let e=this.I();return e&&this.p.set("Authorization",e),this.m&&this.p.set("X-Goog-Iam-Authorization-Token",this.m),this.p}}class n7{constructor(e,t,n,r){this.h=e,this.l=t,this.m=n,this.g=r}getToken(){return Promise.resolve(new n8(this.h,this.l,this.m,this.g))}start(e,t){e.enqueueRetryable(()=>t(nV.FIRST_PARTY))}shutdown(){}invalidateToken(){}}class n9{constructor(e){this.value=e,this.type="AppCheck",this.headers=new Map,e&&e.length>0&&this.headers.set("x-firebase-appcheck",this.value)}}class re{constructor(e){this.T=e,this.forceRefresh=!1,this.appCheck=null,this.A=null}start(e,t){let n=e=>{null!=e.error&&nH("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${e.error.message}`);let n=e.token!==this.A;return this.A=e.token,nH("FirebaseAppCheckTokenProvider",`Received ${n?"new":"existing"} token.`),n?t(e.token):Promise.resolve()};this.o=t=>{e.enqueueRetryable(()=>n(t))};let r=e=>{nH("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=e,this.appCheck.addTokenListener(this.o)};this.T.onInit(e=>r(e)),setTimeout(()=>{if(!this.appCheck){let e=this.T.getImmediate({optional:!0});e?r(e):nH("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}},0)}getToken(){let e=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(e).then(e=>{var t;return e?("string"==typeof e.token||nX(),this.A=e.token,new n9(e.token)):null}):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.appCheck.removeTokenListener(this.o)}}/** 1382 * @license 1383 * Copyright 2020 Google LLC 1384 * 1385 * Licensed under the Apache License, Version 2.0 (the "License");
1386 * you may not use this file except in compliance with the License. 1387 * You may obtain a copy of the License at 1388 * 1389 * http://www.apache.org/licenses/LICENSE-2.0 1390 * 1391 * Unless required by applicable law or agreed to in writing, software 1392 * distributed under the License is distributed on an "AS IS" BASIS, 1393 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1394 * See the License for the specific language governing permissions and 1395 * limitations under the License. 1396 */ function rt(e){let t="undefined"!=typeof self&&(self.crypto||self.msCrypto),n=new Uint8Array(e);if(t&&"function"==typeof t.getRandomValues)t.getRandomValues(n);else for(let r=0;r<e;r++)n[r]=Math.floor(256*Math.random());return n}/** 1397 * @license 1398 * Copyright 2017 Google LLC 1399 * 1400 * Licensed under the Apache License, Version 2.0 (the "License"); 1401 * you may not use this file except in compliance with the License. 1402 * You may obtain a copy of the License at 1403 * 1404 * http://www.apache.org/licenses/LICENSE-2.0 1405 * 1406 * Unless required by applicable law or agreed to in writing, software 1407 * distributed under the License is distributed on an "AS IS" BASIS, 1408 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1409 * See the License for the specific language governing permissions and 1410 * limitations under the License. 1411 */ class rn{static R(){let e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t=Math.floor(256/e.length)*e.length,n="";for(;n.length<20;){let r=rt(40);for(let i=0;i<r.length;++i)n.length<20&&r[i]<t&&(n+=e.charAt(r[i]%e.length))}return n}}function rr(e,t){return e<t?-1:e>t?1:0}function ri(e,t,n){return e.length===t.length&&e.every((e,r)=>n(e,t[r]))}function rs(e){return e+"\0"}/** 1412 * @license 1413 * Copyright 2017 Google LLC 1414 * 1415 * Licensed under the Apache License, Version 2.0 (the "License"); 1416 * you may not use this file except in compliance with the License. 1417 * You may obtain a copy of the License at 1418 * 1419 * http://www.apache.org/licenses/LICENSE-2.0 1420 * 1421 * Unless required by applicable law or agreed to in writing, software 1422 * distributed under the License is distributed on an "AS IS" BASIS, 1423 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1424 * See the License for the specific language governing permissions and 1425 * limitations under the License. 1426 */ class ro{constructor(e,t){if(this.seconds=e,this.nanoseconds=t,t<0||t>=1e9)throw new n1(n0.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(e<-62135596800||e>=253402300800)throw new n1(n0.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}static now(){return ro.fromMillis(Date.now())}static fromDate(e){return ro.fromMillis(e.getTime())}static fromMillis(e){let t=Math.floor(e/1e3);return new ro(t,Math.floor(1e6*(e-1e3*t)))}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo(e){return this.seconds===e.seconds?rr(this.nanoseconds,e.nanoseconds):rr(this.seconds,e.seconds)}isEqual(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}}valueOf(){let e=this.seconds- -62135596800;return String(e).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}/** 1427 * @license 1428 * Copyright 2017 Google LLC 1429 * 1430 * Licensed under the Apache License, Version 2.0 (the "License"); 1431 * you may not use this file except in compliance with the License. 1432 * You may obtain a copy of the License at 1433 * 1434 * http://www.apache.org/licenses/LICENSE-2.0 1435 * 1436 * Unless required by applicable law or agreed to in writing, software 1437 * distributed under the License is distributed on an "AS IS" BASIS, 1438 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1439 * See the License for the specific language governing permissions and 1440 * limitations under the License. 1441 */ class ra{constructor(e){this.timestamp=e}static fromTimestamp(e){return new ra(e)}static min(){return new ra(new ro(0,0))}static max(){return new ra(new ro(253402300799,999999999))}compareTo(e){return this.timestamp._compareTo(e.timestamp)}isEqual(e){return this.timestamp.isEqual(e.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}}/** 1442 * @license 1443 * Copyright 2017 Google LLC 1444 * 1445 * Licensed under the Apache License, Version 2.0 (the "License");
1446 * you may not use this file except in compliance with the License. 1447 * You may obtain a copy of the License at 1448 * 1449 * http://www.apache.org/licenses/LICENSE-2.0 1450 * 1451 * Unless required by applicable law or agreed to in writing, software 1452 * distributed under the License is distributed on an "AS IS" BASIS, 1453 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1454 * See the License for the specific language governing permissions and 1455 * limitations under the License. 1456 */ class rl{constructor(e,t,n){void 0===t?t=0:t>e.length&&nX(),void 0===n?n=e.length-t:n>e.length-t&&nX(),this.segments=e,this.offset=t,this.len=n}get length(){return this.len}isEqual(e){return 0===rl.comparator(this,e)}child(e){let t=this.segments.slice(this.offset,this.limit());return e instanceof rl?e.forEach(e=>{t.push(e)}):t.push(e),this.construct(t)}limit(){return this.offset+this.length}popFirst(e){return e=void 0===e?1:e,this.construct(this.segments,this.offset+e,this.length-e)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(e){return this.segments[this.offset+e]}isEmpty(){return 0===this.length}isPrefixOf(e){if(e.length<this.length)return!1;for(let t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}isImmediateParentOf(e){if(this.length+1!==e.length)return!1;for(let t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}forEach(e){for(let t=this.offset,n=this.limit();t<n;t++)e(this.segments[t])}toArray(){return this.segments.slice(this.offset,this.limit())}static comparator(e,t){let n=Math.min(e.length,t.length);for(let r=0;r<n;r++){let i=e.get(r),s=t.get(r);if(i<s)return -1;if(i>s)return 1}return e.length<t.length?-1:e.length>t.length?1:0}}class ru extends rl{construct(e,t,n){return new ru(e,t,n)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}static fromString(...e){let t=[];for(let n of e){if(n.indexOf("//")>=0)throw new n1(n0.INVALID_ARGUMENT,`Invalid segment (${n}). Paths must not contain // in them.`);t.push(...n.split("/").filter(e=>e.length>0))}return new ru(t)}static emptyPath(){return new ru([])}}let rc=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class rh extends rl{construct(e,t,n){return new rh(e,t,n)}static isValidIdentifier(e){return rc.test(e)}canonicalString(){return this.toArray().map(e=>(e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),rh.isValidIdentifier(e)||(e="`"+e+"`"),e)).join(".")}toString(){return this.canonicalString()}isKeyField(){return 1===this.length&&"__name__"===this.get(0)}static keyField(){return new rh(["__name__"])}static fromServerFormat(e){let t=[],n="",r=0,i=()=>{if(0===n.length)throw new n1(n0.INVALID_ARGUMENT,`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);t.push(n),n=""},s=!1;for(;r<e.length;){let o=e[r];if("\\"===o){if(r+1===e.length)throw new n1(n0.INVALID_ARGUMENT,"Path has trailing escape character: "+e);let a=e[r+1];if("\\"!==a&&"."!==a&&"`"!==a)throw new n1(n0.INVALID_ARGUMENT,"Path has invalid escape sequence: "+e);n+=a,r+=2}else"`"===o?(s=!s,r++):"."!==o||s?(n+=o,r++):(i(),r++)}if(i(),s)throw new n1(n0.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new rh(t)}static emptyPath(){return new rh([])}}/** 1457 * @license 1458 * Copyright 2017 Google LLC 1459 * 1460 * Licensed under the Apache License, Version 2.0 (the "License"); 1461 * you may not use this file except in compliance with the License. 1462 * You may obtain a copy of the License at 1463 * 1464 * http://www.apache.org/licenses/LICENSE-2.0 1465 * 1466 * Unless required by applicable law or agreed to in writing, software 1467 * distributed under the License is distributed on an "AS IS" BASIS, 1468 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1469 * See the License for the specific language governing permissions and 1470 * limitations under the License. 1471 */ class rd{constructor(e){this.path=e}static fromPath(e){return new rd(ru.fromString(e))}static fromName(e){return new rd(ru.fromString(e).popFirst(5))}static empty(){return new rd(ru.emptyPath())}get collectionGroup(){return this.path.popLast().lastSegment()}hasCollectionId(e){return this.path.length>=2&&this.path.get(this.path.length-2)===e}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(e){return null!==e&&0===ru.comparator(this.path,e.path)}toString(){return this.path.toString()}static comparator(e,t){return ru.comparator(e.path,t.path)}static isDocumentKey(e){return e.length%2==0}static fromSegments(e){return new rd(new ru(e.slice()))}}/** 1472 * @license 1473 * Copyright 2021 Google LLC 1474 * 1475 * Licensed under the Apache License, Version 2.0 (the "License");
1476 * you may not use this file except in compliance with the License. 1477 * You may obtain a copy of the License at 1478 * 1479 * http://www.apache.org/licenses/LICENSE-2.0 1480 * 1481 * Unless required by applicable law or agreed to in writing, software 1482 * distributed under the License is distributed on an "AS IS" BASIS, 1483 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1484 * See the License for the specific language governing permissions and 1485 * limitations under the License. 1486 */ class rf{constructor(e,t,n,r){this.indexId=e,this.collectionGroup=t,this.fields=n,this.indexState=r}}function rp(e){return e.fields.find(e=>2===e.kind)}function rm(e){return e.fields.filter(e=>2!==e.kind)}rf.UNKNOWN_ID=-1;class rg{constructor(e,t){this.fieldPath=e,this.kind=t}}class ry{constructor(e,t){this.sequenceNumber=e,this.offset=t}static empty(){return new ry(0,rb.min())}}function rv(e,t){let n=e.toTimestamp().seconds,r=e.toTimestamp().nanoseconds+1,i=ra.fromTimestamp(1e9===r?new ro(n+1,0):new ro(n,r));return new rb(i,rd.empty(),t)}function r_(e){return new rb(e.readTime,e.key,-1)}class rb{constructor(e,t,n){this.readTime=e,this.documentKey=t,this.largestBatchId=n}static min(){return new rb(ra.min(),rd.empty(),-1)}static max(){return new rb(ra.max(),rd.empty(),-1)}}function rw(e,t){let n=e.readTime.compareTo(t.readTime);return 0!==n?n:0!==(n=rd.comparator(e.documentKey,t.documentKey))?n:rr(e.largestBatchId,t.largestBatchId)}/** 1487 * @license 1488 * Copyright 2020 Google LLC 1489 * 1490 * Licensed under the Apache License, Version 2.0 (the "License"); 1491 * you may not use this file except in compliance with the License. 1492 * You may obtain a copy of the License at 1493 * 1494 * http://www.apache.org/licenses/LICENSE-2.0 1495 * 1496 * Unless required by applicable law or agreed to in writing, software 1497 * distributed under the License is distributed on an "AS IS" BASIS, 1498 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1499 * See the License for the specific language governing permissions and 1500 * limitations under the License. 1501 */ let rE="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.";class rx{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(e){this.onCommittedListeners.push(e)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach(e=>e())}}/** 1502 * @license 1503 * Copyright 2017 Google LLC 1504 * 1505 * Licensed under the Apache License, Version 2.0 (the "License"); 1506 * you may not use this file except in compliance with the License. 1507 * You may obtain a copy of the License at 1508 * 1509 * http://www.apache.org/licenses/LICENSE-2.0 1510 * 1511 * Unless required by applicable law or agreed to in writing, software 1512 * distributed under the License is distributed on an "AS IS" BASIS, 1513 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1514 * See the License for the specific language governing permissions and 1515 * limitations under the License. 1516 */ async function rS(e){if(e.code!==n0.FAILED_PRECONDITION||e.message!==rE)throw e;nH("LocalStore","Unexpectedly lost primary lease")}/** 1517 * @license 1518 * Copyright 2017 Google LLC 1519 * 1520 * Licensed under the Apache License, Version 2.0 (the "License"); 1521 * you may not use this file except in compliance with the License. 1522 * You may obtain a copy of the License at 1523 * 1524 * http://www.apache.org/licenses/LICENSE-2.0 1525 * 1526 * Unless required by applicable law or agreed to in writing, software 1527 * distributed under the License is distributed on an "AS IS" BASIS, 1528 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1529 * See the License for the specific language governing permissions and 1530 * limitations under the License. 1531 */ class rT{constructor(e){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,e(e=>{this.isDone=!0,this.result=e,this.nextCallback&&this.nextCallback(e)},e=>{this.isDone=!0,this.error=e,this.catchCallback&&this.catchCallback(e)})}catch(e){return this.next(void 0,e)}next(e,t){return this.callbackAttached&&nX(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(t,this.error):this.wrapSuccess(e,this.result):new rT((n,r)=>{this.nextCallback=t=>{this.wrapSuccess(e,t).next(n,r)},this.catchCallback=e=>{this.wrapFailure(t,e).next(n,r)}})}toPromise(){return new Promise((e,t)=>
1531{this.next(e,t)})}wrapUserFunction(e){try{let t=e();return t instanceof rT?t:rT.resolve(t)}catch(n){return rT.reject(n)}}wrapSuccess(e,t){return e?this.wrapUserFunction(()=>e(t)):rT.resolve(t)}wrapFailure(e,t){return e?this.wrapUserFunction(()=>e(t)):rT.reject(t)}static resolve(e){return new rT((t,n)=>{t(e)})}static reject(e){return new rT((t,n)=>{n(e)})}static waitFor(e){return new rT((t,n)=>{let r=0,i=0,s=!1;e.forEach(e=>{++r,e.next(()=>{++i,s&&i===r&&t()},e=>n(e))}),s=!0,i===r&&t()})}static or(e){let t=rT.resolve(!1);for(let n of e)t=t.next(e=>e?rT.resolve(e):n());return t}static forEach(e,t){let n=[];return e.forEach((e,r)=>{n.push(t.call(this,e,r))}),this.waitFor(n)}static mapArray(e,t){return new rT((n,r)=>{let i=e.length,s=Array(i),o=0;for(let a=0;a<i;a++){let l=a;t(e[l]).next(e=>{s[l]=e,++o===i&&n(s)},e=>r(e))}})}static doWhile(e,t){return new rT((n,r)=>{let i=()=>{!0===e()?t().next(()=>{i()},r):n()};i()})}}/** 1532 * @license 1533 * Copyright 2017 Google LLC 1534 * 1535 * Licensed under the Apache License, Version 2.0 (the "License"); 1536 * you may not use this file except in compliance with the License. 1537 * You may obtain a copy of the License at 1538 * 1539 * http://www.apache.org/licenses/LICENSE-2.0 1540 * 1541 * Unless required by applicable law or agreed to in writing, software 1542 * distributed under the License is distributed on an "AS IS" BASIS, 1543 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1544 * See the License for the specific language governing permissions and 1545 * limitations under the License. 1546 */ class rI{constructor(e,t){this.action=e,this.transaction=t,this.aborted=!1,this.P=new n2,this.transaction.oncomplete=()=>{this.P.resolve()},this.transaction.onabort=()=>{t.error?this.P.reject(new rR(e,t.error)):this.P.resolve()},this.transaction.onerror=t=>{let n=rP(t.target.error);this.P.reject(new rR(e,n))}}static open(e,t,n,r){try{return new rI(t,e.transaction(r,n))}catch(i){throw new rR(t,i)}}get v(){return this.P.promise}abort(e){e&&this.P.reject(e),this.aborted||(nH("SimpleDb","Aborting transaction:",e?e.message:"Client-initiated abort"),this.aborted=!0,this.transaction.abort())}V(){let e=this.transaction;this.aborted||"function"!=typeof e.commit||e.commit()}store(e){let t=this.transaction.objectStore(e);return new rO(t)}}class rk{constructor(e,t,n){this.name=e,this.version=t,this.S=n,12.2===rk.D((0,m.z$)())&&nK("Firestore persistence suffers from a bug in iOS 12.2 Safari that may cause your app to stop working. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.")}static delete(e){return nH("SimpleDb","Removing database:",e),rD(window.indexedDB.deleteDatabase(e)).toPromise()}static C(){if(!(0,m.hl)())return!1;if(rk.N())return!0;let e=(0,m.z$)(),t=rk.D(e),n=rk.k(e);return!(e.indexOf("MSIE ")>0||e.indexOf("Trident/")>0||e.indexOf("Edge/")>0||0<t&&t<10||0<n&&n<4.5)}static N(){var e;return void 0!==nZ&&"YES"===(null===(e=nZ.env)||void 0===e?void 0:e.O)}static M(e,t){return e.store(t)}static D(e){let t=e.match(/i(?:phone|pad|pod) os ([\d_]+)/i),n=t?t[1].split("_").slice(0,2).join("."):"-1";return Number(n)}static k(e){let t=e.match(/Android ([\d.]+)/i),n=t?t[1].split(".").slice(0,2).join("."):"-1";return Number(n)}async F(e){return this.db||(nH("SimpleDb","Opening database:",this.name),this.db=await new Promise((t,n)=>{let r=indexedDB.open(this.name,this.version);r.onsuccess=e=>{let n=e.target.result;t(n)},r.onblocked=()=>{n(new rR(e,"Cannot upgrade IndexedDB schema while another tab is open. Close all tabs that access Firestore and reload this page to proceed."))},r.onerror=t=>{let r=t.target.error;"VersionError"===r.name?n(new n1(n0.FAILED_PRECONDITION,"A newer version of the Firestore SDK was previously used and so the persisted data is not compatible with the version of the SDK you are now using. The SDK will operate with persistence disabled. If you need persistence, please re-upgrade to a newer version of the SDK or else clear the persisted IndexedDB data for your app to start fresh.")):"InvalidStateError"===r.name?n(new n1(n0.FAILED_PRECONDITION,"Unable to open an IndexedDB connection. This could be due to running in a private browsing session on a browser whose private browsing sessions do not support IndexedDB: "+r)):n(new rR(e,r))},r.onupgradeneeded=e=>{nH("SimpleDb",'Database "'+this.name+'" requires upgrade from version:',e.oldVersion);let t=e.target.result;this.S.$(t,r.transaction,e.oldVersion,this.version).next(()=>{nH("SimpleDb","Database upgrade to version "+this.version+" complete")}
1546)}})),this.B&&(this.db.onversionchange=e=>this.B(e)),this.db}L(e){this.B=e,this.db&&(this.db.onversionchange=t=>e(t))}async runTransaction(e,t,n,r){let i="readonly"===t,s=0;for(;;){++s;try{this.db=await this.F(e);let o=rI.open(this.db,e,i?"readonly":"readwrite",n),a=r(o).next(e=>(o.V(),e)).catch(e=>(o.abort(e),rT.reject(e))).toPromise();return a.catch(()=>{}),await o.v,a}catch(u){let l="FirebaseError"!==u.name&&s<3;if(nH("SimpleDb","Transaction failed with error:",u.message,"Retrying:",l),this.close(),!l)return Promise.reject(u)}}}close(){this.db&&this.db.close(),this.db=void 0}}class rC{constructor(e){this.U=e,this.q=!1,this.K=null}get isDone(){return this.q}get G(){return this.K}set cursor(e){this.U=e}done(){this.q=!0}j(e){this.K=e}delete(){return rD(this.U.delete())}}class rR extends n1{constructor(e,t){super(n0.UNAVAILABLE,`IndexedDB transaction '${e}' failed: ${t}`),this.name="IndexedDbTransactionError"}}function rA(e){return"IndexedDbTransactionError"===e.name}class rO{constructor(e){this.store=e}put(e,t){let n;return void 0!==t?(nH("SimpleDb","PUT",this.store.name,e,t),n=this.store.put(t,e)):(nH("SimpleDb","PUT",this.store.name,"<auto-key>",e),n=this.store.put(e)),rD(n)}add(e){return nH("SimpleDb","ADD",this.store.name,e,e),rD(this.store.add(e))}get(e){return rD(this.store.get(e)).next(t=>(void 0===t&&(t=null),nH("SimpleDb","GET",this.store.name,e,t),t))}delete(e){return nH("SimpleDb","DELETE",this.store.name,e),rD(this.store.delete(e))}count(){return nH("SimpleDb","COUNT",this.store.name),rD(this.store.count())}W(e,t){let n=this.options(e,t);if(n.index||"function"!=typeof this.store.getAll){let r=this.cursor(n),i=[];return this.H(r,(e,t)=>{i.push(t)}).next(()=>i)}{let s=this.store.getAll(n.range);return new rT((e,t)=>{s.onerror=e=>{t(e.target.error)},s.onsuccess=t=>{e(t.target.result)}})}}J(e,t){let n=this.store.getAll(e,null===t?void 0:t);return new rT((e,t)=>{n.onerror=e=>{t(e.target.error)},n.onsuccess=t=>{e(t.target.result)}})}Y(e,t){nH("SimpleDb","DELETE ALL",this.store.name);let n=this.options(e,t);n.X=!1;let r=this.cursor(n);return this.H(r,(e,t,n)=>n.delete())}Z(e,t){let n;t?n=e:(n={},t=e);let r=this.cursor(n);return this.H(r,t)}tt(e){let t=this.cursor({});return new rT((n,r)=>{t.onerror=e=>{let t=rP(e.target.error);r(t)},t.onsuccess=t=>{let r=t.target.result;r?e(r.primaryKey,r.value).next(e=>{e?r.continue():n()}):n()}})}H(e,t){let n=[];return new rT((r,i)=>{e.onerror=e=>{i(e.target.error)},e.onsuccess=e=>{let i=e.target.result;if(!i)return void r();let s=new rC(i),o=t(i.primaryKey,i.value,s);if(o instanceof rT){let a=o.catch(e=>(s.done(),rT.reject(e)));n.push(a)}s.isDone?r():null===s.G?i.continue():i.continue(s.G)}}).next(()=>rT.waitFor(n))}options(e,t){let n;return void 0!==e&&("string"==typeof e?n=e:t=e),{index:n,range:t}}cursor(e){let t="next";if(e.reverse&&(t="prev"),e.index){let n=this.store.index(e.index);return e.X?n.openKeyCursor(e.range,t):n.openCursor(e.range,t)}return this.store.openCursor(e.range,t)}}function rD(e){return new rT((t,n)=>{e.onsuccess=e=>{let n=e.target.result;t(n)},e.onerror=e=>{let t=rP(e.target.error);n(t)}})}let rN=!1;function rP(e){let t=rk.D((0,m.z$)());if(t>=12.2&&t<13){let n="An internal error was encountered in the Indexed Database server";if(e.message.indexOf(n)>=0){let r=new n1("internal",`IOS_INDEXEDDB_BUG1: IndexedDb has thrown '${n}'. This is likely due to an unavoidable bug in iOS. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.`);return rN||(rN=!0,setTimeout(()=>{throw r},0)),r}}return e}class rF{constructor(e,t){this.asyncQueue=e,this.et=t,this.task=null}start(){this.nt(15e3)}stop(){this.task&&(this.task.cancel(),this.task=null)}get started(){return null!==this.task}nt(e){nH("IndexBackiller",`Scheduled in ${e}ms`),this.task=this.asyncQueue.enqueueAfterDelay("index_backfill",e,async()=>{this.task=null;try{nH("IndexBackiller",`Documents written: ${await this.et.st()}`)}catch(e){rA(e)?nH("IndexBackiller","Ignoring IndexedDB error during index backfill: ",e):await rS(e)}await this.nt(6e4)})}}class rM{constructor(e,t){this.localStore=e,this.persistence=t}async st(e=50){return this.persistence.runTransaction("Backfill Indexes","readwrite-primary",t=>this.it(t,e))}it(e,t){let n=new Set,r=t,i=!0;return rT.doWhile(()=>!0===i&&r>0,()=>this.localStore.indexManager.getNextCollectionGroupToUpdate(e).next(t=>
1546{if(null!==t&&!n.has(t))return nH("IndexBackiller",`Processing collection: ${t}`),this.rt(e,t,r).next(e=>{r-=e,n.add(t)});i=!1})).next(()=>t-r)}rt(e,t,n){return this.localStore.indexManager.getMinOffsetFromCollectionGroup(e,t).next(r=>this.localStore.localDocuments.getNextDocuments(e,t,r,n).next(n=>{let i=n.changes;return this.localStore.indexManager.updateIndexEntries(e,i).next(()=>this.ot(r,n)).next(n=>(nH("IndexBackiller",`Updating offset: ${n}`),this.localStore.indexManager.updateCollectionGroup(e,t,n))).next(()=>i.size)}))}ot(e,t){let n=e;return t.changes.forEach((e,t)=>{let r=r_(t);rw(r,n)>0&&(n=r)}),new rb(n.readTime,n.documentKey,Math.max(t.batchId,e.largestBatchId))}}/** 1547 * @license 1548 * Copyright 2018 Google LLC 1549 * 1550 * Licensed under the Apache License, Version 2.0 (the "License"); 1551 * you may not use this file except in compliance with the License. 1552 * You may obtain a copy of the License at 1553 * 1554 * http://www.apache.org/licenses/LICENSE-2.0 1555 * 1556 * Unless required by applicable law or agreed to in writing, software 1557 * distributed under the License is distributed on an "AS IS" BASIS, 1558 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1559 * See the License for the specific language governing permissions and 1560 * limitations under the License. 1561 */ class rL{constructor(e,t){this.previousValue=e,t&&(t.sequenceNumberHandler=e=>this.ut(e),this.ct=e=>t.writeSequenceNumber(e))}ut(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}next(){let e=++this.previousValue;return this.ct&&this.ct(e),e}}/** 1562 * @license 1563 * Copyright 2017 Google LLC 1564 * 1565 * Licensed under the Apache License, Version 2.0 (the "License"); 1566 * you may not use this file except in compliance with the License. 1567 * You may obtain a copy of the License at 1568 * 1569 * http://www.apache.org/licenses/LICENSE-2.0 1570 * 1571 * Unless required by applicable law or agreed to in writing, software 1572 * distributed under the License is distributed on an "AS IS" BASIS, 1573 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1574 * See the License for the specific language governing permissions and 1575 * limitations under the License. 1576 */ function rj(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function rU(e,t){for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(n,e[n])}function rB(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}/** 1577 * @license 1578 * Copyright 2017 Google LLC 1579 * 1580 * Licensed under the Apache License, Version 2.0 (the "License"); 1581 * you may not use this file except in compliance with the License. 1582 * You may obtain a copy of the License at 1583 * 1584 * http://www.apache.org/licenses/LICENSE-2.0 1585 * 1586 * Unless required by applicable law or agreed to in writing, software 1587 * distributed under the License is distributed on an "AS IS" BASIS, 1588 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1589 * See the License for the specific language governing permissions and 1590 * limitations under the License. 1591 */ rL.at=-1;class rZ{constructor(e,t){this.comparator=e,this.root=t||rV.EMPTY}insert(e,t){return new rZ(this.comparator,this.root.insert(e,t,this.comparator).copy(null,null,rV.BLACK,null,null))}remove(e){return new rZ(this.comparator,this.root.remove(e,this.comparator).copy(null,null,rV.BLACK,null,null))}get(e){let t=this.root;for(;!t.isEmpty();){let n=this.comparator(e,t.key);if(0===n)return t.value;n<0?t=t.left:n>0&&(t=t.right)}return null}indexOf(e){let t=0,n=this.root;for(;!n.isEmpty();){let r=this.comparator(e,n.key);if(0===r)return t+n.left.size;r<0?n=n.left:(t+=n.left.size+1,n=n.right)}return -1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(e){return this.root.inorderTraversal(e)}forEach(e){this.inorderTraversal((t,n)=>(e(t,n),!1))}toString(){let e=[];return this.inorderTraversal((t,n)=>(e.push(`${t}:${n}`),!1)),`{${e.join(", ")}}`}reverseTraversal(e){return this.root.reverseTraversal(e)}getIterator(){return new r$(this.root,null,this.comparator,!1)}getIteratorFrom(e){return new r$(this.root,e,this.comparator,!1)}getReverseIterator(){return new r$(this.root,null,this.comparator,!0)}getReverseIteratorFrom(e){return new r$(this.root,e,this.comparator,!0)}}class r${constructor(e,t,n,r){this.isReverse=r,this.nodeStack=[];let i=1;for(;!e.isEmpty();)if(i=t?n(e.key,t):1,t&&r&&(i*=-1),i<0)e=this.isReverse?e.left:e.right;else{if(0===i){this.nodeStack.push(e);break}this.nodeStack.push(e),e=this.isReverse?e.right:e.left}}getNext(){let e=this.nodeStack.pop(),t={key:e.key,value:e.value};if(this.isReverse)for(e=e.left;!e.isEmpty();)this.nodeStack.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack.push(e),e=e.left;return t}hasNext(){return this.nodeStack.length>0}peek(){if(0===this.nodeStack.length)return null;let e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}}}class rV{constructor(e,t,n,r,i){this.key=e,this.value=t,this.color=null!=n?n:rV.RED,this.left=null!=r?r:rV.EMPTY,this.right=null!=i?i:rV.EMPTY,this.size=this.left.size+1+this.right.size}copy(e,t,n,r,i){return new rV(null!=e?e:this.key,null!=t?t:this.value,
1591null!=n?n:this.color,null!=r?r:this.left,null!=i?i:this.right)}isEmpty(){return!1}inorderTraversal(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)}reverseTraversal(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}min(){return this.left.isEmpty()?this:this.left.min()}minKey(){return this.min().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(e,t,n){let r=this,i=n(e,r.key);return(r=i<0?r.copy(null,null,null,r.left.insert(e,t,n),null):0===i?r.copy(null,t,null,null,null):r.copy(null,null,null,null,r.right.insert(e,t,n))).fixUp()}removeMin(){if(this.left.isEmpty())return rV.EMPTY;let e=this;return e.left.isRed()||e.left.left.isRed()||(e=e.moveRedLeft()),(e=e.copy(null,null,null,e.left.removeMin(),null)).fixUp()}remove(e,t){let n,r=this;if(0>t(e,r.key))r.left.isEmpty()||r.left.isRed()||r.left.left.isRed()||(r=r.moveRedLeft()),r=r.copy(null,null,null,r.left.remove(e,t),null);else{if(r.left.isRed()&&(r=r.rotateRight()),r.right.isEmpty()||r.right.isRed()||r.right.left.isRed()||(r=r.moveRedRight()),0===t(e,r.key)){if(r.right.isEmpty())return rV.EMPTY;n=r.right.min(),r=r.copy(n.key,n.value,null,null,r.right.removeMin())}r=r.copy(null,null,null,null,r.right.remove(e,t))}return r.fixUp()}isRed(){return this.color}fixUp(){let e=this;return e.right.isRed()&&!e.left.isRed()&&(e=e.rotateLeft()),e.left.isRed()&&e.left.left.isRed()&&(e=e.rotateRight()),e.left.isRed()&&e.right.isRed()&&(e=e.colorFlip()),e}moveRedLeft(){let e=this.colorFlip();return e.right.left.isRed()&&(e=(e=(e=e.copy(null,null,null,null,e.right.rotateRight())).rotateLeft()).colorFlip()),e}moveRedRight(){let e=this.colorFlip();return e.left.left.isRed()&&(e=(e=e.rotateRight()).colorFlip()),e}rotateLeft(){let e=this.copy(null,null,rV.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight(){let e=this.copy(null,null,rV.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)}colorFlip(){let e=this.left.copy(null,null,!this.left.color,null,null),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,t)}checkMaxDepth(){let e=this.check();return Math.pow(2,e)<=this.size+1}check(){if(this.isRed()&&this.left.isRed()||this.right.isRed())throw nX();let e=this.left.check();if(e!==this.right.check())throw nX();return e+(this.isRed()?0:1)}}rV.EMPTY=null,rV.RED=!0,rV.BLACK=!1,rV.EMPTY=new class{constructor(){this.size=0}get key(){throw nX()}get value(){throw nX()}get color(){throw nX()}get left(){throw nX()}get right(){throw nX()}copy(e,t,n,r,i){return this}insert(e,t,n){return new rV(e,t)}remove(e,t){return this}isEmpty(){return!0}inorderTraversal(e){return!1}reverseTraversal(e){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};/** 1592 * @license 1593 * Copyright 2017 Google LLC 1594 * 1595 * Licensed under the Apache License, Version 2.0 (the "License"); 1596 * you may not use this file except in compliance with the License. 1597 * You may obtain a copy of the License at 1598 * 1599 * http://www.apache.org/licenses/LICENSE-2.0 1600 * 1601 * Unless required by applicable law or agreed to in writing, software 1602 * distributed under the License is distributed on an "AS IS" BASIS, 1603 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1604 * See the License for the specific language governing permissions and 1605 * limitations under the License. 1606 */ class rz{constructor(e){this.comparator=e,this.data=new rZ(this.comparator)}has(e){return null!==this.data.get(e)}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(e){return this.data.indexOf(e)}forEach(e){this.data.inorderTraversal((t,n)=>(e(t),!1))}forEachInRange(e,t){let n=this.data.getIteratorFrom(e[0]);for(;n.hasNext();){let r=n.getNext();if(this.comparator(r.key,e[1])>=0)return;t(r.key)}}forEachWhile(e,t){let n;for(n=void 0!==t?this.data.getIteratorFrom(t):this.data.getIterator();n.hasNext();)if(!e(n.getNext().key))return}firstAfterOrEqual(e){let t=this.data.getIteratorFrom(e);return t.hasNext()?t.getNext().key:null}getIterator(){return new rq(this.data.getIterator())}getIteratorFrom(e){return new rq(this.data.getIteratorFrom(e))}add(e){return this.copy(this.data.remove(e).insert(e,!0))}delete(e){return this.has(e)?this.copy(this.data.remove(e)):this}isEmpty(){return this.data.isEmpty()}unionWith(e){let t=this;
1606return t.size<e.size&&(t=e,e=this),e.forEach(e=>{t=t.add(e)}),t}isEqual(e){if(!(e instanceof rz)||this.size!==e.size)return!1;let t=this.data.getIterator(),n=e.data.getIterator();for(;t.hasNext();){let r=t.getNext().key,i=n.getNext().key;if(0!==this.comparator(r,i))return!1}return!0}toArray(){let e=[];return this.forEach(t=>{e.push(t)}),e}toString(){let e=[];return this.forEach(t=>e.push(t)),"SortedSet("+e.toString()+")"}copy(e){let t=new rz(this.comparator);return t.data=e,t}}class rq{constructor(e){this.iter=e}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}function rG(e){return e.hasNext()?e.getNext():void 0}/** 1607 * @license 1608 * Copyright 2020 Google LLC 1609 * 1610 * Licensed under the Apache License, Version 2.0 (the "License"); 1611 * you may not use this file except in compliance with the License. 1612 * You may obtain a copy of the License at 1613 * 1614 * http://www.apache.org/licenses/LICENSE-2.0 1615 * 1616 * Unless required by applicable law or agreed to in writing, software 1617 * distributed under the License is distributed on an "AS IS" BASIS, 1618 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1619 * See the License for the specific language governing permissions and 1620 * limitations under the License. 1621 */ class rW{constructor(e){this.fields=e,e.sort(rh.comparator)}static empty(){return new rW([])}unionWith(e){let t=new rz(rh.comparator);for(let n of this.fields)t=t.add(n);for(let r of e)t=t.add(r);return new rW(t.toArray())}covers(e){for(let t of this.fields)if(t.isPrefixOf(e))return!0;return!1}isEqual(e){return ri(this.fields,e.fields,(e,t)=>e.isEqual(t))}}/** 1622 * @license 1623 * Copyright 2020 Google LLC 1624 * 1625 * Licensed under the Apache License, Version 2.0 (the "License"); 1626 * you may not use this file except in compliance with the License. 1627 * You may obtain a copy of the License at 1628 * 1629 * http://www.apache.org/licenses/LICENSE-2.0 1630 * 1631 * Unless required by applicable law or agreed to in writing, software 1632 * distributed under the License is distributed on an "AS IS" BASIS, 1633 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1634 * See the License for the specific language governing permissions and 1635 * limitations under the License. 1636 */ function rH(){return"undefined"!=typeof atob}/** 1637 * @license 1638 * Copyright 2020 Google LLC 1639 * 1640 * Licensed under the Apache License, Version 2.0 (the "License"); 1641 * you may not use this file except in compliance with the License. 1642 * You may obtain a copy of the License at 1643 * 1644 * http://www.apache.org/licenses/LICENSE-2.0 1645 * 1646 * Unless required by applicable law or agreed to in writing, software 1647 * distributed under the License is distributed on an "AS IS" BASIS, 1648 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1649 * See the License for the specific language governing permissions and 1650 * limitations under the License. 1651 */ class rK{constructor(e){this.binaryString=e}static fromBase64String(e){let t=atob(e);return new rK(t)}static fromUint8Array(e){let t=function(e){let t="";for(let n=0;n<e.length;++n)t+=String.fromCharCode(e[n]);return t}(e);return new rK(t)}[Symbol.iterator](){let e=0;return{next:()=>e<this.binaryString.length?{value:this.binaryString.charCodeAt(e++),done:!1}:{value:void 0,done:!0}}}toBase64(){var e;return btoa(this.binaryString)}toUint8Array(){return function(e){let t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}(this.binaryString)}approximateByteSize(){return 2*this.binaryString.length}compareTo(e){return rr(this.binaryString,e.binaryString)}isEqual(e){return this.binaryString===e.binaryString}}rK.EMPTY_BYTE_STRING=new rK("");let rY=RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function rQ(e){if(!e&&nX(),"string"==typeof e){let t=0,n=rY.exec(e);if(!n&&nX(),n[1]){let r=n[1];t=Number(r=(r+"000000000").substr(0,9))}let i=new Date(e);return{seconds:Math.floor(i.getTime()/1e3),nanos:t}}return{seconds:rX(e.seconds),nanos:rX(e.nanos)}}function rX(e){return"number"==typeof e?e:"string"==typeof e?Number(e):0}function rJ(e){return"string"==typeof e?rK.fromBase64String(e):rK.fromUint8Array(e)}/** 1652 * @license 1653 * Copyright 2020 Google LLC 1654 * 1655 * Licensed under the Apache License, Version 2.0 (the "License");
1656 * you may not use this file except in compliance with the License. 1657 * You may obtain a copy of the License at 1658 * 1659 * http://www.apache.org/licenses/LICENSE-2.0 1660 * 1661 * Unless required by applicable law or agreed to in writing, software 1662 * distributed under the License is distributed on an "AS IS" BASIS, 1663 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1664 * See the License for the specific language governing permissions and 1665 * limitations under the License. 1666 */ function r0(e){var t,n;return"server_timestamp"===(null===(n=((null===(t=null==e?void 0:e.mapValue)||void 0===t?void 0:t.fields)||{}).__type__)||void 0===n?void 0:n.stringValue)}function r1(e){let t=rQ(e.mapValue.fields.__local_write_time__.timestampValue);return new ro(t.seconds,t.nanos)}/** 1667 * @license 1668 * Copyright 2017 Google LLC 1669 * 1670 * Licensed under the Apache License, Version 2.0 (the "License"); 1671 * you may not use this file except in compliance with the License. 1672 * You may obtain a copy of the License at 1673 * 1674 * http://www.apache.org/licenses/LICENSE-2.0 1675 * 1676 * Unless required by applicable law or agreed to in writing, software 1677 * distributed under the License is distributed on an "AS IS" BASIS, 1678 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1679 * See the License for the specific language governing permissions and 1680 * limitations under the License. 1681 */ class r2{constructor(e,t,n,r,i,s,o,a){this.databaseId=e,this.appId=t,this.persistenceKey=n,this.host=r,this.ssl=i,this.forceLongPolling=s,this.autoDetectLongPolling=o,this.useFetchStreams=a}}class r4{constructor(e,t){this.projectId=e,this.database=t||"(default)"}static empty(){return new r4("","")}get isDefaultDatabase(){return"(default)"===this.database}isEqual(e){return e instanceof r4&&e.projectId===this.projectId&&e.database===this.database}}function r5(e){return null==e}function r3(e){return 0===e&&1/e==-1/0}function r6(e){return"number"==typeof e&&Number.isInteger(e)&&!r3(e)&&e<=Number.MAX_SAFE_INTEGER&&e>=Number.MIN_SAFE_INTEGER}/** 1682 * @license 1683 * Copyright 2020 Google LLC 1684 * 1685 * Licensed under the Apache License, Version 2.0 (the "License"); 1686 * you may not use this file except in compliance with the License. 1687 * You may obtain a copy of the License at 1688 * 1689 * http://www.apache.org/licenses/LICENSE-2.0 1690 * 1691 * Unless required by applicable law or agreed to in writing, software 1692 * distributed under the License is distributed on an "AS IS" BASIS, 1693 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1694 * See the License for the specific language governing permissions and 1695 * limitations under the License. 1696 */ let r8={mapValue:{fields:{__type__:{stringValue:"__max__"}}}},r7={nullValue:"NULL_VALUE"};function r9(e){return"nullValue"in e?0:"booleanValue"in e?1:"integerValue"in e||"doubleValue"in e?2:"timestampValue"in e?3:"stringValue"in e?5:"bytesValue"in e?6:"referenceValue"in e?7:"geoPointValue"in e?8:"arrayValue"in e?9:"mapValue"in e?r0(e)?4:ip(e)?9007199254740991:10:nX()}function ie(e,t){var n,r,i,s;if(e===t)return!0;let o=r9(e);if(o!==r9(t))return!1;switch(o){case 0:case 9007199254740991:return!0;case 1:return e.booleanValue===t.booleanValue;case 4:return r1(e).isEqual(r1(t));case 3:return function(e,t){if("string"==typeof e.timestampValue&&"string"==typeof t.timestampValue&&e.timestampValue.length===t.timestampValue.length)return e.timestampValue===t.timestampValue;let n=rQ(e.timestampValue),r=rQ(t.timestampValue);return n.seconds===r.seconds&&n.nanos===r.nanos}(e,t);case 5:return e.stringValue===t.stringValue;case 6:return rJ(e.bytesValue).isEqual(rJ(t.bytesValue));case 7:return e.referenceValue===t.referenceValue;case 8:return rX(e.geoPointValue.latitude)===rX(t.geoPointValue.latitude)&&rX(e.geoPointValue.longitude)===rX(t.geoPointValue.longitude);case 2:return function(e,t){if("integerValue"in e&&"integerValue"in t)return rX(e.integerValue)===rX(t.integerValue);if("doubleValue"in e&&"doubleValue"in t){let n=rX(e.doubleValue),r=rX(t.doubleValue);return n===r?r3(n)===r3(r):isNaN(n)&&isNaN(r)}return!1}(e,t);case 9:return ri(e.arrayValue.values||[],t.arrayValue.values||[],ie);case 10:return function(e,t){let n=e.mapValue.fields||{},r=t.mapValue.fields||{};if(rj(n)!==rj(r))return!1;for(let i in n)if(n.hasOwnProperty(i)&&(void 0===r[i]||!ie(n[i],r[i])))return!1;return!0}(e,t);default:return nX()}}function it(e,t){return void 0!==(e.values||[]).find(e=>ie(e,t))}function ir(e,t){if(e===t)return 0;let n=r9(e),r=r9(t);if(n!==r)return rr(n,r);switch(n){case 0:case 9007199254740991:return 0;case 1:return rr(e.booleanValue,t.booleanValue);case 2:return function(e,t){let n=rX(e.integerValue||e.doubleValue),r=rX(t.integerValue||t.doubleValue);return n<r?-1:n>r?1:n===r?0:isNaN(n)?isNaN(r)?0:-1:1}(e,t);case 3:return ii(e.timestampValue,t.timestampValue);case 4:return ii(r1(e),r1(t));case 5:return rr(e.stringValue,t.stringValue);case 6:return function(e,t){let n=rJ(e),r=rJ(t);return n.compareTo(r)}(e.bytesValue,t.bytesValue);case 7:return function(e,t){let n=e.split("/"),r=t.split("/");for(let i=0;i<n.length&&i<r.length;i++){let s=rr(n[i],r[i]);if(0!==s)return s}return rr(n.length,r.length)}(e.referenceValue,t.referenceValue);case 8:return function(e,t){let n=rr(rX(e.latitude),rX(t.latitude));return 0!==n?n:rr(rX(e.longitude),rX(t.longitude))}(e.geoPointValue,t.geoPointValue);case 9:return function(e,t){let n=e.values||[],r=t.values||[];for(let i=0;i<n.length&&i<r.length;++i){let s=ir(n[i],r[i]);if(s)return s}return rr(n.length,r.length)}(e.arrayValue,t.arrayValue);case 10:return function(e,t){if(e===r8.mapValue&&t===r8.mapValue)return 0;if(e===r8.mapValue)return 1;if(t===r8.mapValue)return -1;let n=e.fields||{},r=Object.keys(n),i=t.fields||{},s=Object.keys(i);r.sort(),s.sort();for(let o=0;o<r.length&&o<s.length;++o){let a=rr(r[o],s[o]);if(0!==a)return a;let l=ir(n[r[o]],i[s[o]]);if(0!==l)return l}return rr(r.length,s.length)}(e.mapValue,t.mapValue);default:throw nX()}}function ii(e,t){if("string"==typeof e&&"string"==typeof t&&e.length===t.length)return rr(e,t);let n=rQ(e),r=rQ(t),i=rr(n.seconds,r.seconds);return 0!==i?i:rr(n.nanos,r.nanos)}function is(e){var t,n;return"nullValue"in e?"null":"booleanValue"in e?""+e.booleanValue:"integerValue"in e?""+e.integerValue:"doubleValue"in e?""+e.doubleValue:"timestampValue"in e?function(e){let t=rQ(e);return`time(${t.seconds},${t.nanos})`}(e.timestampValue):"stringValue"in e?e.stringValue:"bytesValue"in e?rJ(e.bytesValue).toBase64():"referenceValue"in e?(n=e.referenceValue,rd.fromN
1696ame(n).toString()):"geoPointValue"in e?`geo(${(t=e.geoPointValue).latitude},${t.longitude})`:"arrayValue"in e?function(e){let t="[",n=!0;for(let r of e.values||[])n?n=!1:t+=",",t+=is(r);return t+"]"}(e.arrayValue):"mapValue"in e?function(e){let t=Object.keys(e.fields||{}).sort(),n="{",r=!0;for(let i of t)r?r=!1:n+=",",n+=`${i}:${is(e.fields[i])}`;return n+"}"}(e.mapValue):nX()}function io(e,t){return{referenceValue:`projects/${e.projectId}/databases/${e.database}/documents/${t.path.canonicalString()}`}}function ia(e){return!!e&&"integerValue"in e}function il(e){return!!e&&"arrayValue"in e}function iu(e){return!!e&&"nullValue"in e}function ic(e){return!!e&&"doubleValue"in e&&isNaN(Number(e.doubleValue))}function ih(e){return!!e&&"mapValue"in e}function id(e){if(e.geoPointValue)return{geoPointValue:Object.assign({},e.geoPointValue)};if(e.timestampValue&&"object"==typeof e.timestampValue)return{timestampValue:Object.assign({},e.timestampValue)};if(e.mapValue){let t={mapValue:{fields:{}}};return rU(e.mapValue.fields,(e,n)=>t.mapValue.fields[e]=id(n)),t}if(e.arrayValue){let n={arrayValue:{values:[]}};for(let r=0;r<(e.arrayValue.values||[]).length;++r)n.arrayValue.values[r]=id(e.arrayValue.values[r]);return n}return Object.assign({},e)}function ip(e){return"__max__"===(((e.mapValue||{}).fields||{}).__type__||{}).stringValue}function im(e){return"nullValue"in e?r7:"booleanValue"in e?{booleanValue:!1}:"integerValue"in e||"doubleValue"in e?{doubleValue:NaN}:"timestampValue"in e?{timestampValue:{seconds:Number.MIN_SAFE_INTEGER}}:"stringValue"in e?{stringValue:""}:"bytesValue"in e?{bytesValue:""}:"referenceValue"in e?io(r4.empty(),rd.empty()):"geoPointValue"in e?{geoPointValue:{latitude:-90,longitude:-180}}:"arrayValue"in e?{arrayValue:{}}:"mapValue"in e?{mapValue:{}}:nX()}function ig(e){return"nullValue"in e?{booleanValue:!1}:"booleanValue"in e?{doubleValue:NaN}:"integerValue"in e||"doubleValue"in e?{timestampValue:{seconds:Number.MIN_SAFE_INTEGER}}:"timestampValue"in e?{stringValue:""}:"stringValue"in e?{bytesValue:""}:"bytesValue"in e?io(r4.empty(),rd.empty()):"referenceValue"in e?{geoPointValue:{latitude:-90,longitude:-180}}:"geoPointValue"in e?{arrayValue:{}}:"arrayValue"in e?{mapValue:{}}:"mapValue"in e?r8:nX()}function iy(e,t){let n=ir(e.value,t.value);return 0!==n?n:e.inclusive&&!t.inclusive?-1:!e.inclusive&&t.inclusive?1:0}function iv(e,t){let n=ir(e.value,t.value);return 0!==n?n:e.inclusive&&!t.inclusive?1:!e.inclusive&&t.inclusive?-1:0}/** 1697 * @license 1698 * Copyright 2017 Google LLC 1699 * 1700 * Licensed under the Apache License, Version 2.0 (the "License"); 1701 * you may not use this file except in compliance with the License. 1702 * You may obtain a copy of the License at 1703 * 1704 * http://www.apache.org/licenses/LICENSE-2.0 1705 * 1706 * Unless required by applicable law or agreed to in writing, software 1707 * distributed under the License is distributed on an "AS IS" BASIS, 1708 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1709 * See the License for the specific language governing permissions and 1710 * limitations under the License. 1711 */ class i_{constructor(e){this.value=e}static empty(){return new i_({mapValue:{}})}field(e){if(e.isEmpty())return this.value;{let t=this.value;for(let n=0;n<e.length-1;++n)if(!ih(t=(t.mapValue.fields||{})[e.get(n)]))return null;return(t=(t.mapValue.fields||{})[e.lastSegment()])||null}}set(e,t){this.getFieldsMap(e.popLast())[e.lastSegment()]=id(t)}setAll(e){let t=rh.emptyPath(),n={},r=[];e.forEach((e,i)=>{if(!t.isImmediateParentOf(i)){let s=this.getFieldsMap(t);this.applyChanges(s,n,r),n={},r=[],t=i.popLast()}e?n[i.lastSegment()]=id(e):r.push(i.lastSegment())});let i=this.getFieldsMap(t);this.applyChanges(i,n,r)}delete(e){let t=this.field(e.popLast());ih(t)&&t.mapValue.fields&&delete t.mapValue.fields[e.lastSegment()]}isEqual(e){return ie(this.value,e.value)}getFieldsMap(e){let t=this.value;t.mapValue.fields||(t.mapValue={fields:{}});for(let n=0;n<e.length;++n){let r=t.mapValue.fields[e.get(n)];ih(r)&&r.mapValue.fields||(r={mapValue:{fields:{}}},t.mapValue.fields[e.get(n)]=r),t=r}return t.mapValue.fields}
1711applyChanges(e,t,n){for(let r of(rU(t,(t,n)=>e[t]=n),n))delete e[r]}clone(){return new i_(id(this.value))}}function ib(e){let t=[];return rU(e.fields,(e,n)=>{let r=new rh([e]);if(ih(n)){let i=ib(n.mapValue).fields;if(0===i.length)t.push(r);else for(let s of i)t.push(r.child(s))}else t.push(r)}),new rW(t)}/** 1712 * @license 1713 * Copyright 2017 Google LLC 1714 * 1715 * Licensed under the Apache License, Version 2.0 (the "License"); 1716 * you may not use this file except in compliance with the License. 1717 * You may obtain a copy of the License at 1718 * 1719 * http://www.apache.org/licenses/LICENSE-2.0 1720 * 1721 * Unless required by applicable law or agreed to in writing, software 1722 * distributed under the License is distributed on an "AS IS" BASIS, 1723 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1724 * See the License for the specific language governing permissions and 1725 * limitations under the License. 1726 */ class iw{constructor(e,t,n,r,i,s){this.key=e,this.documentType=t,this.version=n,this.readTime=r,this.data=i,this.documentState=s}static newInvalidDocument(e){return new iw(e,0,ra.min(),ra.min(),i_.empty(),0)}static newFoundDocument(e,t,n){return new iw(e,1,t,ra.min(),n,0)}static newNoDocument(e,t){return new iw(e,2,t,ra.min(),i_.empty(),0)}static newUnknownDocument(e,t){return new iw(e,3,t,ra.min(),i_.empty(),2)}convertToFoundDocument(e,t){return this.version=e,this.documentType=1,this.data=t,this.documentState=0,this}convertToNoDocument(e){return this.version=e,this.documentType=2,this.data=i_.empty(),this.documentState=0,this}convertToUnknownDocument(e){return this.version=e,this.documentType=3,this.data=i_.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=ra.min(),this}setReadTime(e){return this.readTime=e,this}get hasLocalMutations(){return 1===this.documentState}get hasCommittedMutations(){return 2===this.documentState}get hasPendingWrites(){return this.hasLocalMutations||this.hasCommittedMutations}isValidDocument(){return 0!==this.documentType}isFoundDocument(){return 1===this.documentType}isNoDocument(){return 2===this.documentType}isUnknownDocument(){return 3===this.documentType}isEqual(e){return e instanceof iw&&this.key.isEqual(e.key)&&this.version.isEqual(e.version)&&this.documentType===e.documentType&&this.documentState===e.documentState&&this.data.isEqual(e.data)}mutableCopy(){return new iw(this.key,this.documentType,this.version,this.readTime,this.data.clone(),this.documentState)}toString(){return`Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`}}/** 1727 * @license 1728 * Copyright 2019 Google LLC 1729 * 1730 * Licensed under the Apache License, Version 2.0 (the "License"); 1731 * you may not use this file except in compliance with the License. 1732 * You may obtain a copy of the License at 1733 * 1734 * http://www.apache.org/licenses/LICENSE-2.0 1735 * 1736 * Unless required by applicable law or agreed to in writing, software 1737 * distributed under the License is distributed on an "AS IS" BASIS, 1738 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1739 * See the License for the specific language governing permissions and 1740 * limitations under the License. 1741 */ class iE{constructor(e,t=null,n=[],r=[],i=null,s=null,o=null){this.path=e,this.collectionGroup=t,this.orderBy=n,this.filters=r,this.limit=i,this.startAt=s,this.endAt=o,this.ht=null}}function ix(e,t=null,n=[],r=[],i=null,s=null,o=null){return new iE(e,t,n,r,i,s,o)}function iS(e){var t;let n=e;if(null===n.ht){let r=n.path.canonicalString();null!==n.collectionGroup&&(r+="|cg:"+n.collectionGroup),r+="|f:",r+=n.filters.map(e=>{var t;return e.field.canonicalString()+e.op.toString()+is(t=e.value)}).join(","),r+="|ob:",r+=n.orderBy.map(e=>{var t;return e.field.canonicalString()+e.dir}).join(","),r5(n.limit)||(r+="|l:",r+=n.limit),n.startAt&&(r+="|lb:",r+=n.startAt.inclusive?"b:":"a:",r+=n.startAt.position.map(e=>{var t;return is(e)}).join(",")),n.endAt&&(r+="|ub:",r+=n.endAt.inclusive?"a:":"b:",r+=n.endAt.position.map(e=>{var t;return is(e)}).join(",")),n.ht=r}return n.ht}function iT(e,t){var n,r;if(e.limit!==t.limit||e.orderBy.length!==t.orderBy.length)return!1;for(let i=0;i<e.orderBy.length;i++)if(!iZ(e.orderBy[i],t.orderBy[i]))return!1;if(e.filters.length!==t.filters.length)return!1;for(let s=0;s<e.filters.length;s++)if(n=e.filters[s],r=t.filters[s],n.op!==r.op||!n.field.isEqual(r.field)||!ie(n.value,r.value))return!1;return e.collectionGroup===t.collectionGroup&&!!e.path.isEqual(t.path)&&!!iV(e.startAt,t.startAt)&&iV(e.endAt,t.endAt)}function iI(e){return rd.isDocumentKey(e.path)&&null===e.collectionGroup&&0===e.filters.length}function ik(e,t){return e.filters.filter(e=>e instanceof iA&&e.field.isEqual(t))}function iC(e,t,n){let r=r7,i=!0;for(let s of ik(e,t)){let o=r7,a=!0;switch(s.op){case"<":case"<=":o=im(s.value);break;case"==":case"in":case">=":o=s.value;break;case">":o=s.value,a=!1;break;case"!=":case"not-in":o=r7}0>iy({value:r,inclusive:i},{value:o,inclusive:a})&&(r=o,i=a)}if(null!==n){for(let l=0;l<e.orderBy.length;++l)if(e.orderBy[l].field.isEqual(t)){let u=n.position[l];0>iy({value:r,inclusive:i},{value:u,inclusive:n.inclusive})&&(r=u,i=n.inclusive);break}}return{value:r,inclusive:i}}function iR(e,t,n){let r=r8,i=!0;for(let s of ik(e,t)){let o=r8,a=!0;switch(s.op){case">=":case">":o=ig(s.value),a=!1;break;case"==":case"in":case"<=":o=s.value;break;case"<":o=s.value,a=!1;break;case"!=":case"not-in":o=r8}iv({value:r,inclusive:i},{value:o,inclusive:a})>0&&(r=o,i=a)}if(null!==n){for(let l=0;l<e.orderBy.length;++l)if(e.orderBy[l].field.isEqual(t)){let u=n.position[l];iv({value:r,inclusive:i},{value:u,inclusive:n.inclusive})>0&&(r=u,i=n.inclusive);break}}return{value:r,inclusive:i}}class iA extends class{}{constructor(e,t,n){super(),this.field=e,this.op=t,this.value=n}static create(e,t,n){return e.isKeyField()?"in"===t||"not-in"===t?this.lt(e,t,n):new iO(e,t,n):"array-contains"===t?new iF(e,n
1741):"in"===t?new iM(e,n):"not-in"===t?new iL(e,n):"array-contains-any"===t?new ij(e,n):new iA(e,t,n)}static lt(e,t,n){return"in"===t?new iD(e,n):new iN(e,n)}matches(e){let t=e.data.field(this.field);return"!="===this.op?null!==t&&this.ft(ir(t,this.value)):null!==t&&r9(this.value)===r9(t)&&this.ft(ir(t,this.value))}ft(e){switch(this.op){case"<":return e<0;case"<=":return e<=0;case"==":return 0===e;case"!=":return 0!==e;case">":return e>0;case">=":return e>=0;default:return nX()}}dt(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}}class iO extends iA{constructor(e,t,n){super(e,t,n),this.key=rd.fromName(n.referenceValue)}matches(e){let t=rd.comparator(e.key,this.key);return this.ft(t)}}class iD extends iA{constructor(e,t){super(e,"in",t),this.keys=iP("in",t)}matches(e){return this.keys.some(t=>t.isEqual(e.key))}}class iN extends iA{constructor(e,t){super(e,"not-in",t),this.keys=iP("not-in",t)}matches(e){return!this.keys.some(t=>t.isEqual(e.key))}}function iP(e,t){var n;return((null===(n=t.arrayValue)||void 0===n?void 0:n.values)||[]).map(e=>rd.fromName(e.referenceValue))}class iF extends iA{constructor(e,t){super(e,"array-contains",t)}matches(e){let t=e.data.field(this.field);return il(t)&&it(t.arrayValue,this.value)}}class iM extends iA{constructor(e,t){super(e,"in",t)}matches(e){let t=e.data.field(this.field);return null!==t&&it(this.value.arrayValue,t)}}class iL extends iA{constructor(e,t){super(e,"not-in",t)}matches(e){if(it(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;let t=e.data.field(this.field);return null!==t&&!it(this.value.arrayValue,t)}}class ij extends iA{constructor(e,t){super(e,"array-contains-any",t)}matches(e){let t=e.data.field(this.field);return!(!il(t)||!t.arrayValue.values)&&t.arrayValue.values.some(e=>it(this.value.arrayValue,e))}}class iU{constructor(e,t){this.position=e,this.inclusive=t}}class iB{constructor(e,t="asc"){this.field=e,this.dir=t}}function iZ(e,t){return e.dir===t.dir&&e.field.isEqual(t.field)}function i$(e,t,n){let r=0;for(let i=0;i<e.position.length;i++){let s=t[i],o=e.position[i];if(r=s.field.isKeyField()?rd.comparator(rd.fromName(o.referenceValue),n.key):ir(o,n.data.field(s.field)),"desc"===s.dir&&(r*=-1),0!==r)break}return r}function iV(e,t){if(null===e)return null===t;if(null===t||e.inclusive!==t.inclusive||e.position.length!==t.position.length)return!1;for(let n=0;n<e.position.length;n++)if(!ie(e.position[n],t.position[n]))return!1;return!0}/** 1742 * @license 1743 * Copyright 2017 Google LLC 1744 * 1745 * Licensed under the Apache License, Version 2.0 (the "License"); 1746 * you may not use this file except in compliance with the License. 1747 * You may obtain a copy of the License at 1748 * 1749 * http://www.apache.org/licenses/LICENSE-2.0 1750 * 1751 * Unless required by applicable law or agreed to in writing, software 1752 * distributed under the License is distributed on an "AS IS" BASIS, 1753 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1754 * See the License for the specific language governing permissions and 1755 * limitations under the License. 1756 */ class iz{constructor(e,t=null,n=[],r=[],i=null,s="F",o=null,a=null){this.path=e,this.collectionGroup=t,this.explicitOrderBy=n,this.filters=r,this.limit=i,this.limitType=s,this.startAt=o,this.endAt=a,this._t=null,this.wt=null,this.startAt,this.endAt}}function iq(e,t,n,r,i,s,o,a){return new iz(e,t,n,r,i,s,o,a)}function iG(e){return new iz(e)}function iW(e){return 0===e.filters.length&&null===e.limit&&null==e.startAt&&null==e.endAt&&(0===e.explicitOrderBy.length||1===e.explicitOrderBy.length&&e.explicitOrderBy[0].field.isKeyField())}function iH(e){return e.explicitOrderBy.length>0?e.explicitOrderBy[0].field:null}function iK(e){for(let t of e.filters)if(t.dt())return t.field;return null}function iY(e){return null!==e.collectionGroup}function iQ(e){var t;let n=e;if(null===n._t){n._t=[];let r=iK(n),i=iH(n);if(null!==r&&null===i)r.isKeyField()||n._t.push(new iB(r)),n._t.push(new iB(rh.keyField(),"asc"));else{let s=!1;for(let o of n.explicitOrderBy)n._t.push(o),o.field.isKeyField()&&(s=!0);if(!s){let a=n.explicitOrderBy.length>0?n.explicitOrderBy[n.explicitOrderBy.length-1].dir:"asc";n._t.push(new iB(rh.keyField(),a))}}}return n._t}function iX(e){var t;let n=e;if(!n.wt){if("F"===n.limitType)n.wt=ix(n.path,n.collectionGroup,iQ(n),n.filters,n.limit,n.startAt,n.endAt);else{let r=[];for(let i of iQ(n)){let s="desc"===i.dir?"asc":"desc";r.push(new iB(i.field,s))}let o=n.endAt?new iU(n.endAt.position,n.endAt.inclusive):null,a=n.startAt?new iU(n.startAt.position,n.startAt.inclusive):null;n.wt=ix(n.path,n.collectionGroup,r,n.filters,n.limit,o,a)}}return n.wt}function iJ(e,t,n){return new iz(e.path,e.collectionGroup,e.explicitOrderBy.slice(),e.filters.slice(),t,n,e.startAt,e.endAt)}function i0(e,t){return iT(iX(e),iX(t))&&e.limitType===t.limitType}function i1(e){return`${iS(iX(e))}|lt:${e.limitType}`}function i2(e){var t;let n;return`Query(target=${n=(t=iX(e)).path.canonicalString(),null!==t.collectionGroup&&(n+=" collectionGroup="+t.collectionGroup),t.filters.length>0&&(n+=`, filters: [${t.filters.map(e=>{var t;return`${e.field.canonicalString()} ${e.op} ${is(t=e.value)}`}).join(", ")}]`),r5(t.limit)||(n+=", limit: "+t.limit),t.orderBy.length>0&&(n+=`, orderBy: [${t.orderBy.map(e=>{var t;return`${e.field.canonicalString()} (${e.dir})`}).join(", ")}]`),t.startAt&&(n+=", startAt: ",n+=t.startAt.inclusive?"b:":"a:",n+=t.startAt.position.map(e=>{var t;return is(e)}).join(",")),t.endAt&&(n+=", endAt: ",n+=t.endAt.inclusive?"a:":"b:",n+=t.endAt.position.map(e=>{var t;return is(e)}).join(",")),`Target(${n})`}; limitType=${e.limitType})`}function i4(e,t){var n,r;return t.isFoundDocument()&&function(e,t){let n=t.key.path;return null!==e.collectionGroup?t.key.hasCollectionId(e.collectionGroup)&&e.path.isPrefixOf(n):rd.isDocumentKey(e.path)?e.path.isEqual(n):e.path.isImmediateParentOf(n)}(e,t)&&function(e,t){for(let n of e.explicitOrderBy)if(!n.field.isKeyField()&&null===t.data.field(n.field))return!1;return!0}(e,t)&&function(e,t){for(let n of e.filters)if(!n.matches(t))return!1;return!0}(e,t)&&(!e.startAt||!!function(e,t,n){let r=i$(e,t,n);return e.inclusive?r<=0:r<0}(e.startAt,iQ(e),t))&&(!e.endAt||!!function(e,t,n){let r=i$(e,t,n);return e.inclusive?r>=0:r>0}(e.endAt,iQ(e),t))}function i5(e){return e.collectionGroup||(e.path.length%2==1?e.path.lastSegment():e.path.get(e.path.length-2))}function i3(e){return(t,n)=>{let r=!1;for(let i of iQ(e)){let s=i6(i,t,n);if(0!==s)return s;r=r||i.field.isKeyField()}return 0}}function i6(e,t,n){let r=e.field.isKeyField()?rd.comparator(t.key,n.key):function(e,t,n){let r=t.data.field(e),i=n.data.field(e);return null!==r&&null!==i?ir(r,i):nX()}(e.field,t,n);switch(e.dir){case"asc":return r;case"desc":return -1*r;default:return nX()}}/** 1757 * @license 1758 * Copyright 2020 Google LLC 1759 * 1760 * Licensed under the Apache License, Version 2.0 (the "License");
1761 * you may not use this file except in compliance with the License. 1762 * You may obtain a copy of the License at 1763 * 1764 * http://www.apache.org/licenses/LICENSE-2.0 1765 * 1766 * Unless required by applicable law or agreed to in writing, software 1767 * distributed under the License is distributed on an "AS IS" BASIS, 1768 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1769 * See the License for the specific language governing permissions and 1770 * limitations under the License. 1771 */ function i8(e,t){if(e.gt){if(isNaN(t))return{doubleValue:"NaN"};if(t===1/0)return{doubleValue:"Infinity"};if(t===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:r3(t)?"-0":t}}function i7(e){return{integerValue:""+e}}function i9(e,t){return r6(t)?i7(t):i8(e,t)}/** 1772 * @license 1773 * Copyright 2018 Google LLC 1774 * 1775 * Licensed under the Apache License, Version 2.0 (the "License"); 1776 * you may not use this file except in compliance with the License. 1777 * You may obtain a copy of the License at 1778 * 1779 * http://www.apache.org/licenses/LICENSE-2.0 1780 * 1781 * Unless required by applicable law or agreed to in writing, software 1782 * distributed under the License is distributed on an "AS IS" BASIS, 1783 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1784 * See the License for the specific language governing permissions and 1785 * limitations under the License. 1786 */ class se{constructor(){this._=void 0}}function st(e,t,n){return e instanceof si?function(e,t){let n={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:e.seconds,nanos:e.nanoseconds}}}};return t&&(n.fields.__previous_value__=t),{mapValue:n}}(n,t):e instanceof ss?so(e,t):e instanceof sa?sl(e,t):function(e,t){let n=sr(e,t),r=sc(n)+sc(e.yt);return ia(n)&&ia(e.yt)?i7(r):i8(e.It,r)}(e,t)}function sn(e,t,n){return e instanceof ss?so(e,t):e instanceof sa?sl(e,t):n}function sr(e,t){var n;return e instanceof su?ia(t)||t&&"doubleValue"in t?t:{integerValue:0}:null}class si extends se{}class ss extends se{constructor(e){super(),this.elements=e}}function so(e,t){let n=sh(t);for(let r of e.elements)n.some(e=>ie(e,r))||n.push(r);return{arrayValue:{values:n}}}class sa extends se{constructor(e){super(),this.elements=e}}function sl(e,t){let n=sh(t);for(let r of e.elements)n=n.filter(e=>!ie(e,r));return{arrayValue:{values:n}}}class su extends se{constructor(e,t){super(),this.It=e,this.yt=t}}function sc(e){return rX(e.integerValue||e.doubleValue)}function sh(e){return il(e)&&e.arrayValue.values?e.arrayValue.values.slice():[]}/** 1787 * @license 1788 * Copyright 2017 Google LLC 1789 * 1790 * Licensed under the Apache License, Version 2.0 (the "License"); 1791 * you may not use this file except in compliance with the License. 1792 * You may obtain a copy of the License at 1793 * 1794 * http://www.apache.org/licenses/LICENSE-2.0 1795 * 1796 * Unless required by applicable law or agreed to in writing, software 1797 * distributed under the License is distributed on an "AS IS" BASIS, 1798 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1799 * See the License for the specific language governing permissions and 1800 * limitations under the License. 1801 */ class sd{constructor(e,t){this.field=e,this.transform=t}}class sf{constructor(e,t){this.version=e,this.transformResults=t}}class sp{constructor(e,t){this.updateTime=e,this.exists=t}static none(){return new sp}static exists(e){return new sp(void 0,e)}static updateTime(e){return new sp(e)}get isNone(){return void 0===this.updateTime&&void 0===this.exists}isEqual(e){return this.exists===e.exists&&(this.updateTime?!!e.updateTime&&this.updateTime.isEqual(e.updateTime):!e.updateTime)}}function sm(e,t){return void 0!==e.updateTime?t.isFoundDocument()&&t.version.isEqual(e.updateTime):void 0===e.exists||e.exists===t.isFoundDocument()}class sg{}function sy(e,t){if(!e.hasLocalMutations||t&&0===t.fields.length)return null;if(null===t)return e.isNoDocument()?new sk(e.key,sp.none()):new sE(e.key,e.data,sp.none());{let n=e.data,r=i_.empty(),i=new rz(rh.comparator);for(let s of t.fields)if(!i.has(s)){let o=n.field(s);null===o&&s.length>1&&(s=s.popLast(),o=n.field(s)),null===o?r.delete(s):r.set(s,o),i=i.add(s)}return new sx(e.key,r,new rW(i.toArray()),sp.none())}}function sv(e,t,n){e instanceof sE?function(e,t,n){let r=e.value.clone(),i=sT(e.fieldTransforms,t,n.transformResults);r.setAll(i),t.convertToFoundDocument(n.version,r).setHasCommittedMutations()}
1801(e,t,n):e instanceof sx?function(e,t,n){if(!sm(e.precondition,t))return void t.convertToUnknownDocument(n.version);let r=sT(e.fieldTransforms,t,n.transformResults),i=t.data;i.setAll(sS(e)),i.setAll(r),t.convertToFoundDocument(n.version,i).setHasCommittedMutations()}(e,t,n):function(e,t,n){t.convertToNoDocument(n.version).setHasCommittedMutations()}(0,t,n)}function s_(e,t,n,r){var i,s,o;return e instanceof sE?function(e,t,n,r){if(!sm(e.precondition,t))return n;let i=e.value.clone(),s=sI(e.fieldTransforms,r,t);return i.setAll(s),t.convertToFoundDocument(t.version,i).setHasLocalMutations(),null}(e,t,n,r):e instanceof sx?function(e,t,n,r){if(!sm(e.precondition,t))return n;let i=sI(e.fieldTransforms,r,t),s=t.data;return(s.setAll(sS(e)),s.setAll(i),t.convertToFoundDocument(t.version,s).setHasLocalMutations(),null===n)?null:n.unionWith(e.fieldMask.fields).unionWith(e.fieldTransforms.map(e=>e.field))}(e,t,n,r):sm(e.precondition,t)?(t.convertToNoDocument(t.version).setHasLocalMutations(),null):n}function sb(e,t){let n=null;for(let r of e.fieldTransforms){let i=t.data.field(r.field),s=sr(r.transform,i||null);null!=s&&(null===n&&(n=i_.empty()),n.set(r.field,s))}return n||null}function sw(e,t){var n,r;return e.type===t.type&&!!e.key.isEqual(t.key)&&!!e.precondition.isEqual(t.precondition)&&(n=e.fieldTransforms,r=t.fieldTransforms,!!(void 0===n&&void 0===r||!(!n||!r)&&ri(n,r,(e,t)=>{var n,r,i,s;return e.field.isEqual(t.field)&&(i=e.transform,s=t.transform,i instanceof ss&&s instanceof ss||i instanceof sa&&s instanceof sa?ri(i.elements,s.elements,ie):i instanceof su&&s instanceof su?ie(i.yt,s.yt):i instanceof si&&s instanceof si)})))&&(0===e.type?e.value.isEqual(t.value):1!==e.type||e.data.isEqual(t.data)&&e.fieldMask.isEqual(t.fieldMask))}class sE extends sg{constructor(e,t,n,r=[]){super(),this.key=e,this.value=t,this.precondition=n,this.fieldTransforms=r,this.type=0}getFieldMask(){return null}}class sx extends sg{constructor(e,t,n,r,i=[]){super(),this.key=e,this.data=t,this.fieldMask=n,this.precondition=r,this.fieldTransforms=i,this.type=1}getFieldMask(){return this.fieldMask}}function sS(e){let t=new Map;return e.fieldMask.fields.forEach(n=>{if(!n.isEmpty()){let r=e.data.field(n);t.set(n,r)}}),t}function sT(e,t,n){var r;let i=new Map;(r=e.length===n.length)||nX();for(let s=0;s<n.length;s++){let o=e[s],a=o.transform,l=t.data.field(o.field);i.set(o.field,sn(a,l,n[s]))}return i}function sI(e,t,n){let r=new Map;for(let i of e){let s=i.transform,o=n.data.field(i.field);r.set(i.field,st(s,o,t))}return r}class sk extends sg{constructor(e,t){super(),this.key=e,this.precondition=t,this.type=2,this.fieldTransforms=[]}getFieldMask(){return null}}class sC extends sg{constructor(e,t){super(),this.key=e,this.precondition=t,this.type=3,this.fieldTransforms=[]}getFieldMask(){return null}}/** 1802 * @license 1803 * Copyright 2017 Google LLC 1804 * 1805 * Licensed under the Apache License, Version 2.0 (the "License"); 1806 * you may not use this file except in compliance with the License. 1807 * You may obtain a copy of the License at 1808 * 1809 * http://www.apache.org/licenses/LICENSE-2.0 1810 * 1811 * Unless required by applicable law or agreed to in writing, software 1812 * distributed under the License is distributed on an "AS IS" BASIS, 1813 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1814 * See the License for the specific language governing permissions and 1815 * limitations under the License. 1816 */ class sR{constructor(e){this.count=e}}function sA(e){switch(e){default:return nX();case n0.CANCELLED:case n0.UNKNOWN:case n0.DEADLINE_EXCEEDED:case n0.RESOURCE_EXHAUSTED:case n0.INTERNAL:case n0.UNAVAILABLE:case n0.UNAUTHENTICATED:return!1;case n0.INVALID_ARGUMENT:case n0.NOT_FOUND:case n0.ALREADY_EXISTS:case n0.PERMISSION_DENIED:case n0.FAILED_PRECONDITION:case n0.ABORTED:case n0.OUT_OF_RANGE:case n0.UNIMPLEMENTED:case n0.DATA_LOSS:return!0}}function sO(e){if(void 0===e)return nK("GRPC error has no .code"),n0.UNKNOWN;switch(e){case u.OK:return n0.OK;case u.CANCELLED:return n0.CANCELLED;case u.UNKNOWN:return n0.UNKNOWN;case u.DEADLINE_EXCEEDED:return n0.DEADLINE_EXCEEDED;case u.RESOURCE_EXHAUSTED:return n0.RESOURCE_EXHAUSTED;case u.INTERNAL:return n0.INTERNAL;case u.UNAVAILABLE:return n0.UNAVAILABLE;case u.UNAUTHENTICATED:return n0.UNAUTHENTICATED;case u.INVALID_ARGUMENT:return n0.INVALID_ARGUMENT;case u.NOT_FOUND:return n0.NOT_FOUND;case u.ALREADY_EXISTS:return n0.ALREADY_EXISTS;case u.PERMISSION_DENIED:return n0.PERMISSION_DENIED;case u.FAILED_PRECONDITION:return n0.FAILED_PRECONDITION;case u.ABORTED:return n0.ABORTED;case u.OUT_OF_RANGE:return n0.OUT_OF_RANGE;
1816case u.UNIMPLEMENTED:return n0.UNIMPLEMENTED;case u.DATA_LOSS:return n0.DATA_LOSS;default:return nX()}}(c=u||(u={}))[c.OK=0]="OK",c[c.CANCELLED=1]="CANCELLED",c[c.UNKNOWN=2]="UNKNOWN",c[c.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",c[c.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",c[c.NOT_FOUND=5]="NOT_FOUND",c[c.ALREADY_EXISTS=6]="ALREADY_EXISTS",c[c.PERMISSION_DENIED=7]="PERMISSION_DENIED",c[c.UNAUTHENTICATED=16]="UNAUTHENTICATED",c[c.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",c[c.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",c[c.ABORTED=10]="ABORTED",c[c.OUT_OF_RANGE=11]="OUT_OF_RANGE",c[c.UNIMPLEMENTED=12]="UNIMPLEMENTED",c[c.INTERNAL=13]="INTERNAL",c[c.UNAVAILABLE=14]="UNAVAILABLE",c[c.DATA_LOSS=15]="DATA_LOSS";/** 1817 * @license 1818 * Copyright 2017 Google LLC 1819 * 1820 * Licensed under the Apache License, Version 2.0 (the "License"); 1821 * you may not use this file except in compliance with the License. 1822 * You may obtain a copy of the License at 1823 * 1824 * http://www.apache.org/licenses/LICENSE-2.0 1825 * 1826 * Unless required by applicable law or agreed to in writing, software 1827 * distributed under the License is distributed on an "AS IS" BASIS, 1828 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1829 * See the License for the specific language governing permissions and 1830 * limitations under the License. 1831 */ class sD{constructor(e,t){this.mapKeyFn=e,this.equalsFn=t,this.inner={},this.innerSize=0}get(e){let t=this.mapKeyFn(e),n=this.inner[t];if(void 0!==n){for(let[r,i]of n)if(this.equalsFn(r,e))return i}}has(e){return void 0!==this.get(e)}set(e,t){let n=this.mapKeyFn(e),r=this.inner[n];if(void 0===r)return this.inner[n]=[[e,t]],void this.innerSize++;for(let i=0;i<r.length;i++)if(this.equalsFn(r[i][0],e))return void(r[i]=[e,t]);r.push([e,t]),this.innerSize++}delete(e){let t=this.mapKeyFn(e),n=this.inner[t];if(void 0===n)return!1;for(let r=0;r<n.length;r++)if(this.equalsFn(n[r][0],e))return 1===n.length?delete this.inner[t]:n.splice(r,1),this.innerSize--,!0;return!1}forEach(e){rU(this.inner,(t,n)=>{for(let[r,i]of n)e(r,i)})}isEmpty(){return rB(this.inner)}size(){return this.innerSize}}/** 1832 * @license 1833 * Copyright 2017 Google LLC 1834 * 1835 * Licensed under the Apache License, Version 2.0 (the "License"); 1836 * you may not use this file except in compliance with the License. 1837 * You may obtain a copy of the License at 1838 * 1839 * http://www.apache.org/licenses/LICENSE-2.0 1840 * 1841 * Unless required by applicable law or agreed to in writing, software 1842 * distributed under the License is distributed on an "AS IS" BASIS, 1843 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1844 * See the License for the specific language governing permissions and 1845 * limitations under the License. 1846 */ let sN=new rZ(rd.comparator),sP=new rZ(rd.comparator);function sF(...e){let t=sP;for(let n of e)t=t.insert(n.key,n);return t}function sM(e){let t=sP;return e.forEach((e,n)=>t=t.insert(e,n.overlayedDocument)),t}function sL(){return sU()}function sj(){return sU()}function sU(){return new sD(e=>e.toString(),(e,t)=>e.isEqual(t))}let sB=new rZ(rd.comparator),sZ=new rz(rd.comparator);function s$(...e){let t=sZ;for(let n of e)t=t.add(n);return t}let sV=new rz(rr);/** 1847 * @license 1848 * Copyright 2017 Google LLC 1849 * 1850 * Licensed under the Apache License, Version 2.0 (the "License"); 1851 * you may not use this file except in compliance with the License. 1852 * You may obtain a copy of the License at 1853 * 1854 * http://www.apache.org/licenses/LICENSE-2.0 1855 * 1856 * Unless required by applicable law or agreed to in writing, software 1857 * distributed under the License is distributed on an "AS IS" BASIS, 1858 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1859 * See the License for the specific language governing permissions and 1860 * limitations under the License. 1861 */ class sz{constructor(e,t,n,r,i){this.snapshotVersion=e,this.targetChanges=t,this.targetMismatches=n,this.documentUpdates=r,this.resolvedLimboDocuments=i}static createSynthesizedRemoteEventForCurrentChange(e,t,n){let r=new Map;return r.set(e,sq.createSynthesizedTargetChangeForCurrentChange(e,t,n)),new sz(ra.min(),r,sV,sN,s$())}}class sq{constructor(e,t,n,r,i){this.resumeToken=e,this.current=t,this.addedDocuments=n,this.modifiedDocuments=r,this.removedDocuments=i}static createSynthesizedTargetChangeForCurrentChange(e,t,n){return new sq(n,t,s$(),s$(),s$())}}/** 1862 * @license 1863 * Copyright 2017 Google LLC 1864 * 1865 * Licensed under the Apache License, Version 2.0 (the "License");
1866 * you may not use this file except in compliance with the License. 1867 * You may obtain a copy of the License at 1868 * 1869 * http://www.apache.org/licenses/LICENSE-2.0 1870 * 1871 * Unless required by applicable law or agreed to in writing, software 1872 * distributed under the License is distributed on an "AS IS" BASIS, 1873 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1874 * See the License for the specific language governing permissions and 1875 * limitations under the License. 1876 */ class sG{constructor(e,t,n,r){this.Tt=e,this.removedTargetIds=t,this.key=n,this.Et=r}}class sW{constructor(e,t){this.targetId=e,this.At=t}}class sH{constructor(e,t,n=rK.EMPTY_BYTE_STRING,r=null){this.state=e,this.targetIds=t,this.resumeToken=n,this.cause=r}}class sK{constructor(){this.Rt=0,this.bt=sX(),this.Pt=rK.EMPTY_BYTE_STRING,this.vt=!1,this.Vt=!0}get current(){return this.vt}get resumeToken(){return this.Pt}get St(){return 0!==this.Rt}get Dt(){return this.Vt}Ct(e){e.approximateByteSize()>0&&(this.Vt=!0,this.Pt=e)}xt(){let e=s$(),t=s$(),n=s$();return this.bt.forEach((r,i)=>{switch(i){case 0:e=e.add(r);break;case 2:t=t.add(r);break;case 1:n=n.add(r);break;default:nX()}}),new sq(this.Pt,this.vt,e,t,n)}Nt(){this.Vt=!1,this.bt=sX()}kt(e,t){this.Vt=!0,this.bt=this.bt.insert(e,t)}Ot(e){this.Vt=!0,this.bt=this.bt.remove(e)}Mt(){this.Rt+=1}Ft(){this.Rt-=1}$t(){this.Vt=!0,this.vt=!0}}class sY{constructor(e){this.Bt=e,this.Lt=new Map,this.Ut=sN,this.qt=sQ(),this.Kt=new rz(rr)}Gt(e){for(let t of e.Tt)e.Et&&e.Et.isFoundDocument()?this.Qt(t,e.Et):this.jt(t,e.key,e.Et);for(let n of e.removedTargetIds)this.jt(n,e.key,e.Et)}Wt(e){this.forEachTarget(e,t=>{let n=this.zt(t);switch(e.state){case 0:this.Ht(t)&&n.Ct(e.resumeToken);break;case 1:n.Ft(),n.St||n.Nt(),n.Ct(e.resumeToken);break;case 2:n.Ft(),n.St||this.removeTarget(t);break;case 3:this.Ht(t)&&(n.$t(),n.Ct(e.resumeToken));break;case 4:this.Ht(t)&&(this.Jt(t),n.Ct(e.resumeToken));break;default:nX()}})}forEachTarget(e,t){e.targetIds.length>0?e.targetIds.forEach(t):this.Lt.forEach((e,n)=>{this.Ht(n)&&t(n)})}Yt(e){let t=e.targetId,n=e.At.count,r=this.Xt(t);if(r){let i=r.target;if(iI(i)){if(0===n){let s=new rd(i.path);this.jt(t,s,iw.newNoDocument(s,ra.min()))}else{var o;(o=1===n)||nX()}}else this.Zt(t)!==n&&(this.Jt(t),this.Kt=this.Kt.add(t))}}te(e){let t=new Map;this.Lt.forEach((n,r)=>{let i=this.Xt(r);if(i){if(n.current&&iI(i.target)){let s=new rd(i.target.path);null!==this.Ut.get(s)||this.ee(r,s)||this.jt(r,s,iw.newNoDocument(s,e))}n.Dt&&(t.set(r,n.xt()),n.Nt())}});let n=s$();this.qt.forEach((e,t)=>{let r=!0;t.forEachWhile(e=>{let t=this.Xt(e);return!t||2===t.purpose||(r=!1,!1)}),r&&(n=n.add(e))}),this.Ut.forEach((t,n)=>n.setReadTime(e));let r=new sz(e,t,this.Kt,this.Ut,n);return this.Ut=sN,this.qt=sQ(),this.Kt=new rz(rr),r}Qt(e,t){if(!this.Ht(e))return;let n=this.ee(e,t.key)?2:0;this.zt(e).kt(t.key,n),this.Ut=this.Ut.insert(t.key,t),this.qt=this.qt.insert(t.key,this.ne(t.key).add(e))}jt(e,t,n){if(!this.Ht(e))return;let r=this.zt(e);this.ee(e,t)?r.kt(t,1):r.Ot(t),this.qt=this.qt.insert(t,this.ne(t).delete(e)),n&&(this.Ut=this.Ut.insert(t,n))}removeTarget(e){this.Lt.delete(e)}Zt(e){let t=this.zt(e).xt();return this.Bt.getRemoteKeysForTarget(e).size+t.addedDocuments.size-t.removedDocuments.size}Mt(e){this.zt(e).Mt()}zt(e){let t=this.Lt.get(e);return t||(t=new sK,this.Lt.set(e,t)),t}ne(e){let t=this.qt.get(e);return t||(t=new rz(rr),this.qt=this.qt.insert(e,t)),t}Ht(e){let t=null!==this.Xt(e);return t||nH("WatchChangeAggregator","Detected inactive target",e),t}Xt(e){let t=this.Lt.get(e);return t&&t.St?null:this.Bt.se(e)}Jt(e){this.Lt.set(e,new sK),this.Bt.getRemoteKeysForTarget(e).forEach(t=>{this.jt(e,t,null)})}ee(e,t){return this.Bt.getRemoteKeysForTarget(e).has(t)}}function sQ(){return new rZ(rd.comparator)}function sX(){return new rZ(rd.comparator)}/** 1877 * @license 1878 * Copyright 2017 Google LLC 1879 * 1880 * Licensed under the Apache License, Version 2.0 (the "License"); 1881 * you may not use this file except in compliance with the License. 1882 * You may obtain a copy of the License at 1883 * 1884 * http://www.apache.org/licenses/LICENSE-2.0 1885 * 1886 * Unless required by applicable law or agreed to in writing, softw
1886are 1887 * distributed under the License is distributed on an "AS IS" BASIS, 1888 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1889 * See the License for the specific language governing permissions and 1890 * limitations under the License. 1891 */ let sJ={asc:"ASCENDING",desc:"DESCENDING"},s0={"<":"LESS_THAN","<=":"LESS_THAN_OR_EQUAL",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","!=":"NOT_EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","not-in":"NOT_IN","array-contains-any":"ARRAY_CONTAINS_ANY"};class s1{constructor(e,t){this.databaseId=e,this.gt=t}}function s2(e,t){return e.gt?`${new Date(1e3*t.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+t.nanoseconds).slice(-9)}Z`:{seconds:""+t.seconds,nanos:t.nanoseconds}}function s4(e,t){return e.gt?t.toBase64():t.toUint8Array()}function s5(e){return!e&&nX(),ra.fromTimestamp(function(e){let t=rQ(e);return new ro(t.seconds,t.nanos)}(e))}function s3(e,t){var n;return new ru(["projects",e.projectId,"databases",e.database]).child("documents").child(t).canonicalString()}function s6(e){var t;let n=ru.fromString(e);return od(n)||nX(),n}function s8(e,t){return s3(e.databaseId,t.path)}function s7(e,t){let n=s6(t);if(n.get(1)!==e.databaseId.projectId)throw new n1(n0.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+n.get(1)+" vs "+e.databaseId.projectId);if(n.get(3)!==e.databaseId.database)throw new n1(n0.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+e.databaseId.database);return new rd(on(n))}function s9(e,t){return s3(e.databaseId,t)}function oe(e){let t=s6(e);return 4===t.length?ru.emptyPath():on(t)}function ot(e){return new ru(["projects",e.databaseId.projectId,"databases",e.databaseId.database]).canonicalString()}function on(e){var t;return e.length>4&&"documents"===e.get(4)||nX(),e.popFirst(5)}function or(e,t,n){return{name:s8(e,t),fields:n.value.mapValue.fields}}function oi(e,t,n){let r=s7(e,t.name),i=s5(t.updateTime),s=new i_({mapValue:{fields:t.fields}}),o=iw.newFoundDocument(r,i,s);return n&&o.setHasCommittedMutations(),n?o.setHasCommittedMutations():o}function os(e,t){var n,r,i,s;let o;
1891if(t instanceof sE)o={update:or(e,t.key,t.value)};else if(t instanceof sk)o={delete:s8(e,t.key)};else if(t instanceof sx)o={update:or(e,t.key,t.data),updateMask:function(e){let t=[];return e.fields.forEach(e=>t.push(e.canonicalString())),{fieldPaths:t}}(t.fieldMask)};else{if(!(t instanceof sC))return nX();o={verify:s8(e,t.key)}}return t.fieldTransforms.length>0&&(o.updateTransforms=t.fieldTransforms.map(e=>(function(e,t){let n=t.transform;if(n instanceof si)return{fieldPath:t.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(n instanceof ss)return{fieldPath:t.field.canonicalString(),appendMissingElements:{values:n.elements}};if(n instanceof sa)return{fieldPath:t.field.canonicalString(),removeAllFromArray:{values:n.elements}};if(n instanceof su)return{fieldPath:t.field.canonicalString(),increment:n.yt};throw nX()})(0,e))),t.precondition.isNone||(o.currentDocument=void 0!==(r=t.precondition).updateTime?{updateTime:s2(e,(s=r.updateTime).toTimestamp())}:void 0!==r.exists?{exists:r.exists}:nX()),o}function oo(e,t){var n;let r=t.currentDocument?void 0!==(n=t.currentDocument).updateTime?sp.updateTime(s5(n.updateTime)):void 0!==n.exists?sp.exists(n.exists):sp.none():sp.none(),i=t.updateTransforms?t.updateTransforms.map(t=>(function(e,t){let n=null;if("setToServerValue"in t){var r;"REQUEST_TIME"===t.setToServerValue||nX(),n=new si}else if("appendMissingElements"in t){let i=t.appendMissingElements.values||[];n=new ss(i)}else if("removeAllFromArray"in t){let s=t.removeAllFromArray.values||[];n=new sa(s)}else"increment"in t?n=new su(e,t.increment):nX();let o=rh.fromServerFormat(t.fieldPath);return new sd(o,n)})(e,t)):[];if(t.update){t.update.name;let s=s7(e,t.update.name),o=new i_({mapValue:{fields:t.update.fields}});if(t.updateMask){let a=function(e){let t=e.fieldPaths||[];return new rW(t.map(e=>rh.fromServerFormat(e)))}(t.updateMask);return new sx(s,o,a,r,i)}return new sE(s,o,r,i)}if(t.delete){let l=s7(e,t.delete);return new sk(l,r)}if(t.verify){let u=s7(e,t.verify);return new sC(u,r)}return nX()}function oa(e,t){return{documents:[s9(e,t.path)]}}function ol(e,t){var n,r,i,s;let o={structuredQuery:{}},a=t.path;null!==t.collectionGroup?(o.parent=s9(e,a),o.structuredQuery.from=[{collectionId:t.collectionGroup,allDescendants:!0}]):(o.parent=s9(e,a.popLast()),o.structuredQuery.from=[{collectionId:a.lastSegment()}]);let l=function(e){if(0===e.length)return;let t=e.map(e=>(function(e){var t;if("=="===e.op){if(ic(e.value))return{unaryFilter:{field:oc(e.field),op:"IS_NAN"}};if(iu(e.value))return{unaryFilter:{field:oc(e.field),op:"IS_NULL"}}}else if("!="===e.op){if(ic(e.value))return{unaryFilter:{field:oc(e.field),op:"IS_NOT_NAN"}};if(iu(e.value))return{unaryFilter:{field:oc(e.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:oc(e.field),op:(t=e.op,s0[t]),value:e.value}}})(e));return 1===t.length?t[0]:{compositeFilter:{op:"AND",filters:t}}}(t.filters);l&&(o.structuredQuery.where=l);let u=function(e){if(0!==e.length)return e.map(e=>{var t,n;return{field:oc(e.field),direction:(n=e.dir,sJ[n])}})}(t.orderBy);u&&(o.structuredQuery.orderBy=u);let c=(i=t.limit,e.gt||r5(i)?i:{value:i});return null!==c&&(o.structuredQuery.limit=c),t.startAt&&(o.structuredQuery.startAt={before:(n=t.startAt).inclusive,values:n.position}),t.endAt&&(o.structuredQuery.endAt={before:!(s=t.endAt).inclusive,values:s.position}),o}function ou(e){var t,n;let r=oe(e.parent),i=e.structuredQuery,s=i.from?i.from.length:0,o=null;if(s>0){(t=1===s)||nX();let a=i.from[0];a.allDescendants?o=a.collectionId:r=r.child(a.collectionId)}let l=[];i.where&&(l=function e(t){var n;return t?void 0!==t.unaryFilter?[function(e){switch(e.unaryFilter.op){case"IS_NAN":let t=oh(e.unaryFilter.field);return iA.create(t,"==",{doubleValue:NaN});case"IS_NULL":let n=oh(e.unaryFilter.field);return iA.create(n,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":let r=oh(e.unaryFilter.field);return iA.create(r,"!=",{doubleValue:NaN});case"IS_NOT_NULL":let i=oh(e.unaryFilter.field);return iA.create(i,"!=",{nullValue:"NULL_VALUE"});default:return nX()}}(t)]:void 0!==t.fieldFilter?[(n=t,iA.create(oh(n.fieldFilter.field),function(e){switch(e){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";default:return nX()}}(n.fieldFilter.op),n.fieldFilter.value))]:void 0!==t.compositeFilter?t.compositeFilter.filters.map(t=>e(t)).reduce((e,t)=>
1891e.concat(t)):nX():[]}(i.where));let u=[];i.orderBy&&(u=i.orderBy.map(e=>{var t;return new iB(oh(e.field),function(e){switch(e){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(e.direction))}));let c=null,h;i.limit&&(c=r5(h="object"==typeof(n=i.limit)?n.value:n)?null:h);let d=null;i.startAt&&(d=function(e){let t=!!e.before,n=e.values||[];return new iU(n,t)}(i.startAt));let f=null;return i.endAt&&(f=function(e){let t=!e.before,n=e.values||[];return new iU(n,t)}(i.endAt)),iq(r,o,u,l,c,"F",d,f)}function oc(e){return{fieldPath:e.canonicalString()}}function oh(e){return rh.fromServerFormat(e.fieldPath)}function od(e){return e.length>=4&&"projects"===e.get(0)&&"databases"===e.get(2)}/** 1892 * @license 1893 * Copyright 2017 Google LLC 1894 * 1895 * Licensed under the Apache License, Version 2.0 (the "License"); 1896 * you may not use this file except in compliance with the License. 1897 * You may obtain a copy of the License at 1898 * 1899 * http://www.apache.org/licenses/LICENSE-2.0 1900 * 1901 * Unless required by applicable law or agreed to in writing, software 1902 * distributed under the License is distributed on an "AS IS" BASIS, 1903 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1904 * See the License for the specific language governing permissions and 1905 * limitations under the License. 1906 */ function of(e){let t="";for(let n=0;n<e.length;n++)t.length>0&&(t=om(t)),t=op(e.get(n),t);return om(t)}function op(e,t){let n=t,r=e.length;for(let i=0;i<r;i++){let s=e.charAt(i);switch(s){case"\0":n+="\x01\x10";break;case"\x01":n+="\x01\x11";break;default:n+=s}}return n}function om(e){return e+"\x01\x01"}function og(e){var t;let n=e.length;if(n>=2||nX(),2===n)return"\x01"===e.charAt(0)&&"\x01"===e.charAt(1)||nX(),ru.emptyPath();let r=n-2,i=[],s="";for(let o=0;o<n;){let a=e.indexOf("\x01",o);switch((a<0||a>r)&&nX(),e.charAt(a+1)){case"\x01":let l=e.substring(o,a),u;0===s.length?u=l:(s+=l,u=s,s=""),i.push(u);break;case"\x10":s+=e.substring(o,a),s+="\0";break;case"\x11":s+=e.substring(o,a+1);break;default:nX()}o=a+2}return new ru(i)}/** 1907 * @license 1908 * Copyright 2022 Google LLC 1909 * 1910 * Licensed under the Apache License, Version 2.0 (the "License"); 1911 * you may not use this file except in compliance with the License. 1912 * You may obtain a copy of the License at 1913 * 1914 * http://www.apache.org/licenses/LICENSE-2.0 1915 * 1916 * Unless required by applicable law or agreed to in writing, software 1917 * distributed under the License is distributed on an "AS IS" BASIS, 1918 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1919 * See the License for the specific language governing permissions and 1920 * limitations under the License. 1921 */ let oy=["userId","batchId"];/** 1922 * @license 1923 * Copyright 2022 Google LLC 1924 * 1925 * Licensed under the Apache License, Version 2.0 (the "License"); 1926 * you may not use this file except in compliance with the License. 1927 * You may obtain a copy of the License at 1928 * 1929 * http://www.apache.org/licenses/LICENSE-2.0 1930 * 1931 * Unless required by applicable law or agreed to in writing, software 1932 * distributed under the License is distributed on an "AS IS" BASIS, 1933 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1934 * See the License for the specific language governing permissions and 1935 * limitations under the License. 1936 */ function ov(e,t){return[e,of(t)]}function o_(e,t,n){return[e,of(t),n]}let ob={},ow=["prefixPath","collectionGroup","readTime","documentId"],oE=["prefixPath","collectionGroup","documentId"],ox=["collectionGroup","readTime","prefixPath","documentId"],oS=["canonicalId","targetId"],oT=["targetId","path"],oI=["path","targetId"],ok=["collectionId","parent"],oC=["indexId","uid"],oR=["uid","sequenceNumber"],oA=["indexId","uid","arrayValue","directionalValue","orderedDocumentKey","documentKey"],oO=["indexId","uid","orderedDocumentKey"],oD=["userId","collectionPath","documentId"],oN=["userId","collectionPath","largestBatchId"],oP=["userId","collectionGroup","largestBatchId"],oF=["mutationQueues","mutations","documentMutations","remoteDocuments","targets","owner","targetGlobal","targetDocuments","clientMetadata","remoteDocumentGlobal","collectionParents","bundles","namedQueries"],oM=[...oF,"documentOverlays"],oL=["mutation
1936Queues","mutations","documentMutations","remoteDocumentsV14","targets","owner","targetGlobal","targetDocuments","clientMetadata","remoteDocumentGlobal","collectionParents","bundles","namedQueries","documentOverlays"],oj=[...oL,"indexConfiguration","indexState","indexEntries"];/** 1937 * @license 1938 * Copyright 2020 Google LLC 1939 * 1940 * Licensed under the Apache License, Version 2.0 (the "License"); 1941 * you may not use this file except in compliance with the License. 1942 * You may obtain a copy of the License at 1943 * 1944 * http://www.apache.org/licenses/LICENSE-2.0 1945 * 1946 * Unless required by applicable law or agreed to in writing, software 1947 * distributed under the License is distributed on an "AS IS" BASIS, 1948 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1949 * See the License for the specific language governing permissions and 1950 * limitations under the License. 1951 */ class oU extends rx{constructor(e,t){super(),this.ie=e,this.currentSequenceNumber=t}}function oB(e,t){var n;return rk.M(e.ie,t)}/** 1952 * @license 1953 * Copyright 2017 Google LLC 1954 * 1955 * Licensed under the Apache License, Version 2.0 (the "License"); 1956 * you may not use this file except in compliance with the License. 1957 * You may obtain a copy of the License at 1958 * 1959 * http://www.apache.org/licenses/LICENSE-2.0 1960 * 1961 * Unless required by applicable law or agreed to in writing, software 1962 * distributed under the License is distributed on an "AS IS" BASIS, 1963 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1964 * See the License for the specific language governing permissions and 1965 * limitations under the License. 1966 */ class oZ{constructor(e,t,n,r){this.batchId=e,this.localWriteTime=t,this.baseMutations=n,this.mutations=r}applyToRemoteDocument(e,t){let n=t.mutationResults;for(let r=0;r<this.mutations.length;r++){let i=this.mutations[r];i.key.isEqual(e.key)&&sv(i,e,n[r])}}applyToLocalView(e,t){for(let n of this.baseMutations)n.key.isEqual(e.key)&&(t=s_(n,e,t,this.localWriteTime));for(let r of this.mutations)r.key.isEqual(e.key)&&(t=s_(r,e,t,this.localWriteTime));return t}applyToLocalDocumentSet(e,t){let n=sj();return this.mutations.forEach(r=>{let i=e.get(r.key),s=i.overlayedDocument,o=this.applyToLocalView(s,i.mutatedFields);o=t.has(r.key)?null:o;let a=sy(s,o);null!==a&&n.set(r.key,a),s.isValidDocument()||s.convertToNoDocument(ra.min())}),n}keys(){return this.mutations.reduce((e,t)=>e.add(t.key),s$())}isEqual(e){return this.batchId===e.batchId&&ri(this.mutations,e.mutations,(e,t)=>sw(e,t))&&ri(this.baseMutations,e.baseMutations,(e,t)=>sw(e,t))}}class o${constructor(e,t,n,r){this.batch=e,this.commitVersion=t,this.mutationResults=n,this.docVersions=r}static from(e,t,n){var r;(r=e.mutations.length===n.length)||nX();let i=sB,s=e.mutations;for(let o=0;o<s.length;o++)i=i.insert(s[o].key,n[o].version);return new o$(e,t,n,i)}}/** 1967 * @license 1968 * Copyright 2022 Google LLC 1969 * 1970 * Licensed under the Apache License, Version 2.0 (the "License"); 1971 * you may not use this file except in compliance with the License. 1972 * You may obtain a copy of the License at 1973 * 1974 * http://www.apache.org/licenses/LICENSE-2.0 1975 * 1976 * Unless required by applicable law or agreed to in writing, software 1977 * distributed under the License is distributed on an "AS IS" BASIS, 1978 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1979 * See the License for the specific language governing permissions and 1980 * limitations under the License. 1981 */ class oV{constructor(e,t){this.largestBatchId=e,this.mutation=t}getKey(){return this.mutation.key}isEqual(e){return null!==e&&this.mutation===e.mutation}toString(){return`Overlay{ 1982 largestBatchId: ${this.largestBatchId}, 1983 mutation: ${this.mutation.toString()} 1984 }`}}/** 1985 * @license 1986 * Copyright 2017 Google LLC 1987 * 1988 * Licensed under the Apache License, Version 2.0 (the "License"); 1989 * you may not use this file except in compliance with the License. 1990 * You may obtain a copy of the License at 1991 * 1992 * http://www.apache.org/licenses/LICENSE-2.0 1993 * 1994 * Unless required by applicable law or agreed to in writing, software 1995 * distributed under the License is distributed on an "AS IS" BASIS, 1996 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1997 * See the License for the specific language governing permissions and 1998 * limitations under the License. 1999 */ class oz{constructor(e,t,n,r,i=ra.min(),s=ra.min(),o=rK.EMPTY_BYTE_STRING){this.target=e,this.targetId=t,this.purpose=n,this.sequenceNumber=r,this.snapshotVersion=i,this.lastLimboFreeSnapshotVersion=s,this.resumeToken=o}withSequenceNumber(e){return new oz(this.target,this.targetId,this.purpose,e,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken)}withResumeToken(e,t){return new oz(this.target,this.targetId,this.purpose,this.sequenceNumber,t,this.lastLimboFreeSnapshotVersion,e)}withLastLimboFreeSnapshotVersion(e){return new oz(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,e,this.resumeToken)}}/** 2000 * @license 2001 * Copyright 2017 Google LLC 2002 * 2003 * Licensed under the Apache License, Version 2.0 (the "License");
2004 * you may not use this file except in compliance with the License. 2005 * You may obtain a copy of the License at 2006 * 2007 * http://www.apache.org/licenses/LICENSE-2.0 2008 * 2009 * Unless required by applicable law or agreed to in writing, software 2010 * distributed under the License is distributed on an "AS IS" BASIS, 2011 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2012 * See the License for the specific language governing permissions and 2013 * limitations under the License. 2014 */ class oq{constructor(e){this.re=e}}function oG(e,t){let n=t.key,r={prefixPath:n.getCollectionPath().popLast().toArray(),collectionGroup:n.collectionGroup,documentId:n.path.lastSegment(),readTime:oW(t.readTime),hasCommittedMutations:t.hasCommittedMutations};if(t.isFoundDocument()){var i,s;r.document={name:s8(i=e.re,t.key),fields:t.data.value.mapValue.fields,updateTime:s2(i,t.version.toTimestamp())}}else if(t.isNoDocument())r.noDocument={path:n.path.toArray(),readTime:oH(t.version)};else{if(!t.isUnknownDocument())return nX();r.unknownDocument={path:n.path.toArray(),version:oH(t.version)}}return r}function oW(e){let t=e.toTimestamp();return[t.seconds,t.nanoseconds]}function oH(e){let t=e.toTimestamp();return{seconds:t.seconds,nanoseconds:t.nanoseconds}}function oK(e){let t=new ro(e.seconds,e.nanoseconds);return ra.fromTimestamp(t)}function oY(e,t){let n=(t.baseMutations||[]).map(t=>oo(e.re,t));for(let r=0;r<t.mutations.length-1;++r){let i=t.mutations[r];if(r+1<t.mutations.length&&void 0!==t.mutations[r+1].transform){let s=t.mutations[r+1];i.updateTransforms=s.transform.fieldTransforms,t.mutations.splice(r+1,1),++r}}let o=t.mutations.map(t=>oo(e.re,t)),a=ro.fromMillis(t.localWriteTimeMs);return new oZ(t.batchId,a,n,o)}function oQ(e){var t,n,r;let i=oK(e.readTime),s=void 0!==e.lastLimboFreeSnapshotVersion?oK(e.lastLimboFreeSnapshotVersion):ra.min(),o;return void 0!==e.query.documents?(1===(t=e.query).documents.length||nX(),o=iX(iG(oe(t.documents[0])))):o=iX(ou(r=e.query)),new oz(o,e.targetId,0,e.lastListenSequenceNumber,i,s,rK.fromBase64String(e.resumeToken))}function oX(e,t){let n=oH(t.snapshotVersion),r=oH(t.lastLimboFreeSnapshotVersion),i;i=iI(t.target)?oa(e.re,t.target):ol(e.re,t.target);let s=t.resumeToken.toBase64();return{targetId:t.targetId,canonicalId:iS(t.target),readTime:n,resumeToken:s,lastListenSequenceNumber:t.sequenceNumber,lastLimboFreeSnapshotVersion:r,query:i}}function oJ(e){let t=ou({parent:e.parent,structuredQuery:e.structuredQuery});return"LAST"===e.limitType?iJ(t,t.limit,"L"):t}function o0(e,t){return new oV(t.largestBatchId,oo(e.re,t.overlayMutation))}function o1(e,t){let n=t.path.lastSegment();return[e,of(t.path.popLast()),n]}function o2(e,t,n,r){return{indexId:e,uid:t.uid||"",sequenceNumber:n,readTime:oH(r.readTime),documentKey:of(r.documentKey.path),largestBatchId:r.largestBatchId}}/** 2015 * @license 2016 * Copyright 2020 Google LLC 2017 * 2018 * Licensed under the Apache License, Version 2.0 (the "License"); 2019 * you may not use this file except in compliance with the License. 2020 * You may obtain a copy of the License at 2021 * 2022 * http://www.apache.org/licenses/LICENSE-2.0 2023 * 2024 * Unless required by applicable law or agreed to in writing, software 2025 * distributed under the License is distributed on an "AS IS" BASIS, 2026 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2027 * See the License for the specific language governing permissions and 2028 * limitations under the License. 2029 */ class o4{getBundleMetadata(e,t){return o5(e).get(t).next(e=>{if(e)return{id:e.bundleId,createTime:oK(e.createTime),version:e.version}})}saveBundleMetadata(e,t){return o5(e).put({bundleId:t.id,createTime:oH(s5(t.createTime)),version:t.version})}getNamedQuery(e,t){return o3(e).get(t).next(e=>{if(e)return{name:e.name,query:oJ(e.bundledQuery),readTime:oK(e.readTime)}})}saveNamedQuery(e,t){var n;return o3(e).put({name:t.name,readTime:oH(s5(t.readTime)),bundledQuery:t.bundledQuery})}}function o5(e){return oB(e,"bundles")}function o3(e){return oB(e,"namedQueries")}/** 2030 * @license 2031 * Copyright 2022 Google LLC 2032 * 2033 * Licensed under the Apache License, Version 2.0 (the "License");
2034 * you may not use this file except in compliance with the License. 2035 * You may obtain a copy of the License at 2036 * 2037 * http://www.apache.org/licenses/LICENSE-2.0 2038 * 2039 * Unless required by applicable law or agreed to in writing, software 2040 * distributed under the License is distributed on an "AS IS" BASIS, 2041 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2042 * See the License for the specific language governing permissions and 2043 * limitations under the License. 2044 */ class o6{constructor(e,t){this.It=e,this.userId=t}static oe(e,t){let n=t.uid||"";return new o6(e,n)}getOverlay(e,t){return o8(e).get(o1(this.userId,t)).next(e=>e?o0(this.It,e):null)}getOverlays(e,t){let n=sL();return rT.forEach(t,t=>this.getOverlay(e,t).next(e=>{null!==e&&n.set(t,e)})).next(()=>n)}saveOverlays(e,t,n){let r=[];return n.forEach((n,i)=>{let s=new oV(t,i);r.push(this.ue(e,s))}),rT.waitFor(r)}removeOverlaysForBatchId(e,t,n){let r=new Set;t.forEach(e=>r.add(of(e.getCollectionPath())));let i=[];return r.forEach(t=>{let r=IDBKeyRange.bound([this.userId,t,n],[this.userId,t,n+1],!1,!0);i.push(o8(e).Y("collectionPathOverlayIndex",r))}),rT.waitFor(i)}getOverlaysForCollection(e,t,n){let r=sL(),i=of(t),s=IDBKeyRange.bound([this.userId,i,n],[this.userId,i,Number.POSITIVE_INFINITY],!0);return o8(e).W("collectionPathOverlayIndex",s).next(e=>{for(let t of e){let n=o0(this.It,t);r.set(n.getKey(),n)}return r})}getOverlaysForCollectionGroup(e,t,n,r){let i=sL(),s,o=IDBKeyRange.bound([this.userId,t,n],[this.userId,t,Number.POSITIVE_INFINITY],!0);return o8(e).Z({index:"collectionGroupOverlayIndex",range:o},(e,t,n)=>{let o=o0(this.It,t);i.size()<r||o.largestBatchId===s?(i.set(o.getKey(),o),s=o.largestBatchId):n.done()}).next(()=>i)}ue(e,t){return o8(e).put(function(e,t,n){let[r,i,s]=o1(t,n.mutation.key);return{userId:t,collectionPath:i,documentId:s,collectionGroup:n.mutation.key.getCollectionGroup(),largestBatchId:n.largestBatchId,overlayMutation:os(e.re,n.mutation)}}(this.It,this.userId,t))}}function o8(e){return oB(e,"documentOverlays")}/** 2045 * @license 2046 * Copyright 2021 Google LLC 2047 * 2048 * Licensed under the Apache License, Version 2.0 (the "License"); 2049 * you may not use this file except in compliance with the License. 2050 * You may obtain a copy of the License at 2051 * 2052 * http://www.apache.org/licenses/LICENSE-2.0 2053 * 2054 * Unless required by applicable law or agreed to in writing, software 2055 * distributed under the License is distributed on an "AS IS" BASIS, 2056 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2057 * See the License for the specific language governing permissions and 2058 * limitations under the License. 2059 */ class o7{constructor(){}ce(e,t){this.ae(e,t),t.he()}ae(e,t){if("nullValue"in e)this.le(t,5);else if("booleanValue"in e)this.le(t,10),t.fe(e.booleanValue?1:0);else if("integerValue"in e)this.le(t,15),t.fe(rX(e.integerValue));else if("doubleValue"in e){let n=rX(e.doubleValue);isNaN(n)?this.le(t,13):(this.le(t,15),r3(n)?t.fe(0):t.fe(n))}else if("timestampValue"in e){let r=e.timestampValue;this.le(t,20),"string"==typeof r?t.de(r):(t.de(`${r.seconds||""}`),t.fe(r.nanos||0))}else if("stringValue"in e)this._e(e.stringValue,t),this.we(t);else if("bytesValue"in e)this.le(t,30),t.me(rJ(e.bytesValue)),this.we(t);else if("referenceValue"in e)this.ge(e.referenceValue,t);else if("geoPointValue"in e){let i=e.geoPointValue;this.le(t,45),t.fe(i.latitude||0),t.fe(i.longitude||0)}else"mapValue"in e?ip(e)?this.le(t,Number.MAX_SAFE_INTEGER):(this.ye(e.mapValue,t),this.we(t)):"arrayValue"in e?(this.pe(e.arrayValue,t),this.we(t)):nX()}_e(e,t){this.le(t,25),this.Ie(e,t)}Ie(e,t){t.de(e)}ye(e,t){let n=e.fields||{};for(let r of(this.le(t,55),Object.keys(n)))this._e(r,t),this.ae(n[r],t)}pe(e,t){let n=e.values||[];for(let r of(this.le(t,50),n))this.ae(r,t)}ge(e,t){this.le(t,37),rd.fromName(e).path.forEach(e=>{this.le(t,60),this.Ie(e,t)})}le(e,t){e.fe(t)}we(e){e.fe(2)}}function o9(e){if(0===e)return 8;let t=0;return e>>4==0&&(t+=4,e<<=4),e>>6==0&&(t+=2,e<<=2),e>>7==0&&(t+=1),t}function ae(e){let t=64-function(e){let t=0;for(let n=0;n<8;++n){let r=o9(255&e[n]);if(t+=r,8!==r)break}return t}(e);return Math.ceil(t/8)}o7.Te=new o7;class at{constructor(){this.buffer=new Uint8Array(1024),this.position=0}Ee(e){let t=e[Symbol.iterator](),n=t.next();for(;!n.done;)this.Ae(n.value),n=t.next();this.Re()}be(e){let t=e[Symbol.iterator](),n=t.next();for(;!n.done;)this.Pe(n.value),n=t.next();this.ve()}Ve(e){for(let t of e){let n=t.charCodeAt(0);if(n<128)this.Ae(n);else if(n<2048)this.Ae(960|n>>>6),this.Ae(128|63&n);else if(t<"\ud800"||"\udbff"<t)this.Ae(480|n>>>12),this.Ae(128|63&n>>>6),this.Ae(128|63&n);else{let r=t.codePointAt(0);this.Ae(240|r>>>18),this.Ae(128|63&r>>>12),this.Ae(128|63&r>>>6),this.Ae(128|63&r)}}this.Re()}Se(e){for(let t of e){let n=t.charCodeAt(0);if(n<128)this.Pe(n);else if(n<2048)this.Pe(960|n>>>6),this.Pe(128|63&n);else if(t<"\ud800"||"\udbff"<t)this.Pe(480|n>>>12),this.Pe(128|63&n>>>6),this.Pe(128|63&n);else{let r=t.codePointAt(0);this.Pe(240|r>>>18),this.Pe(128|63&r>>>12),this.Pe(128|63&r>>>6),this.Pe(128|63&r)}}this.ve()}De(e){let t=this.Ce(e),n=ae(t);this.xe(1+n),this.buffer[this.position++]=255&n;for(let r=t.length-n;r<t.length;++r)this.buffer[this.position++]=255&t[r]}Ne(e){let t=this.Ce(e),n=ae(t);this.xe(1+n),this.buffer[this.position++]=~(255&n);for(let r=t.length-n;r<t.length;++r)this.buffer[this.position++]=~(255&t[r])}ke(){this.Oe(255),this.Oe(255)}Me(){this.Fe(255),this.Fe(255)}reset(){this.position=0}seed(e){this.xe(e.length),this.buffer.set(e,this.position),this.position+=e.length}$e(){return this.buffer.slice(0,this.position)}Ce(e){let t=function(e){let t=new DataView(new ArrayBuffer(8));return t.setFloat64(0,e,!1),new Uint8Array(t.buffer)}(e),n=0!=(128&t[0]);t[0]^=n?255:128;for(let r=1;r<t.length;++r)t[r]^=n?255:0;return t}Ae(e){let t=255&e;0===t?(this.Oe(0),this.Oe(255)):255===t?(this.Oe(255),this.Oe(0)):this.Oe(t)}Pe(e){let t=255&e;0===t?(this.Fe(0),this.Fe(255)):255===t?(this.Fe(255),this.Fe(0)):this.Fe(e)}Re(){this.Oe(0),this.Oe(1)}ve(){this.Fe(0),this.Fe(1)}Oe(e){this.xe(1),this.buffer[this.position++]=e}Fe(e){this.xe(1),this.buffer[this.position++]=~e}xe(e){let t=e+this.position;if(t<=this.buffer.length)return;let n=2*this.buffer.length;n<t&&(n=t);let r=new Uint8Array(n);r.set(this.buffer),this.buffer=r}}class an{constructor(e){this.Be=e}
2059me(e){this.Be.Ee(e)}de(e){this.Be.Ve(e)}fe(e){this.Be.De(e)}he(){this.Be.ke()}}class ar{constructor(e){this.Be=e}me(e){this.Be.be(e)}de(e){this.Be.Se(e)}fe(e){this.Be.Ne(e)}he(){this.Be.Me()}}class ai{constructor(){this.Be=new at,this.Le=new an(this.Be),this.Ue=new ar(this.Be)}seed(e){this.Be.seed(e)}qe(e){return 0===e?this.Le:this.Ue}$e(){return this.Be.$e()}reset(){this.Be.reset()}}/** 2060 * @license 2061 * Copyright 2022 Google LLC 2062 * 2063 * Licensed under the Apache License, Version 2.0 (the "License"); 2064 * you may not use this file except in compliance with the License. 2065 * You may obtain a copy of the License at 2066 * 2067 * http://www.apache.org/licenses/LICENSE-2.0 2068 * 2069 * Unless required by applicable law or agreed to in writing, software 2070 * distributed under the License is distributed on an "AS IS" BASIS, 2071 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2072 * See the License for the specific language governing permissions and 2073 * limitations under the License. 2074 */ class as{constructor(e,t,n,r){this.indexId=e,this.documentKey=t,this.arrayValue=n,this.directionalValue=r}Ke(){let e=this.directionalValue.length,t=0===e||255===this.directionalValue[e-1]?e+1:e,n=new Uint8Array(t);return n.set(this.directionalValue,0),t!==e?n.set([0],this.directionalValue.length):++n[n.length-1],new as(this.indexId,this.documentKey,this.arrayValue,n)}}function ao(e,t){let n=e.indexId-t.indexId;return 0!==n?n:0!==(n=aa(e.arrayValue,t.arrayValue))?n:0!==(n=aa(e.directionalValue,t.directionalValue))?n:rd.comparator(e.documentKey,t.documentKey)}function aa(e,t){for(let n=0;n<e.length&&n<t.length;++n){let r=e[n]-t[n];if(0!==r)return r}return e.length-t.length}/** 2075 * @license 2076 * Copyright 2022 Google LLC 2077 * 2078 * Licensed under the Apache License, Version 2.0 (the "License"); 2079 * you may not use this file except in compliance with the License. 2080 * You may obtain a copy of the License at 2081 * 2082 * http://www.apache.org/licenses/LICENSE-2.0 2083 * 2084 * Unless required by applicable law or agreed to in writing, software 2085 * distributed under the License is distributed on an "AS IS" BASIS, 2086 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2087 * See the License for the specific language governing permissions and 2088 * limitations under the License. 2089 */ class al{constructor(e){for(let t of(this.collectionId=null!=e.collectionGroup?e.collectionGroup:e.path.lastSegment(),this.Ge=e.orderBy,this.Qe=[],e.filters)){let n=t;n.dt()?this.je=n:this.Qe.push(n)}}We(e){let t=rp(e);if(void 0!==t&&!this.ze(t))return!1;let n=rm(e),r=0,i=0;for(;r<n.length&&this.ze(n[r]);++r);if(r===n.length)return!0;if(void 0!==this.je){let s=n[r];if(!this.He(this.je,s)||!this.Je(this.Ge[i++],s))return!1;++r}for(;r<n.length;++r){let o=n[r];if(i>=this.Ge.length||!this.Je(this.Ge[i++],o))return!1}return!0}ze(e){for(let t of this.Qe)if(this.He(t,e))return!0;return!1}He(e,t){if(void 0===e||!e.field.isEqual(t.fieldPath))return!1;let n="array-contains"===e.op||"array-contains-any"===e.op;return 2===t.kind===n}Je(e,t){return!!e.field.isEqual(t.fieldPath)&&(0===t.kind&&"asc"===e.dir||1===t.kind&&"desc"===e.dir)}}/** 2090 * @license 2091 * Copyright 2019 Google LLC 2092 * 2093 * Licensed under the Apache License, Version 2.0 (the "License"); 2094 * you may not use this file except in compliance with the License. 2095 * You may obtain a copy of the License at 2096 * 2097 * http://www.apache.org/licenses/LICENSE-2.0 2098 * 2099 * Unless required by applicable law or agreed to in writing, software 2100 * distributed under the License is distributed on an "AS IS" BASIS, 2101 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2102 * See the License for the specific language governing permissions and 2103 * limitations under the License. 2104 */ class au{constructor(){this.Ye=new ac}addToCollectionParentIndex(e,t){return this.Ye.add(t),rT.resolve()}getCollectionParents(e,t){return rT.resolve(this.Ye.getEntries(t))}addFieldIndex(e,t){return rT.resolve()}deleteFieldIndex(e,t){return rT.resolve()}getDocumentsMatchingTarget(e,t){return rT.resolve(null)}getIndexType(e,t){return rT.resolve(0)}getFieldIndexes(e,t){return rT.resolve([])}getNextCollectionGroupToUpdate(e){return rT.resolve(null)}getMinOffset(e,t){return rT.resolve(rb.min())}getMinOffsetFromCollectionGroup(e,t){return rT.resolve(rb.min())}updateCollectionGroup(e,t,n){return rT.resolve()}updateIndexEntries(e,t){return rT.resolve()}}class ac{constructor(){this.index={}}add(e){let t=e.lastSegment(),n=e.popLast(),r=this.index[t]||new rz(ru.comparator),i=!r.has(n);return this.index[t]=r.add(n),i}has(e){let t=e.lastSegment(),n=e.popLast(),r=this.index[t];return r&&r.has(n)}getEntries(e){return(this.index[e]||new rz(ru.comparator)).toArray()}}/** 2105 * @license 2106 * Copyright 2019 Google LLC 2107 * 2108 * Licensed under the Apache License, Version 2.0 (the "License");
2109 * you may not use this file except in compliance with the License. 2110 * You may obtain a copy of the License at 2111 * 2112 * http://www.apache.org/licenses/LICENSE-2.0 2113 * 2114 * Unless required by applicable law or agreed to in writing, software 2115 * distributed under the License is distributed on an "AS IS" BASIS, 2116 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2117 * See the License for the specific language governing permissions and 2118 * limitations under the License. 2119 */ let ah=new Uint8Array(0);class ad{constructor(e,t){this.user=e,this.databaseId=t,this.Xe=new ac,this.Ze=new sD(e=>iS(e),(e,t)=>iT(e,t)),this.uid=e.uid||""}addToCollectionParentIndex(e,t){if(!this.Xe.has(t)){let n=t.lastSegment(),r=t.popLast();e.addOnCommittedListener(()=>{this.Xe.add(t)});let i={collectionId:n,parent:of(r)};return af(e).put(i)}return rT.resolve()}getCollectionParents(e,t){let n=[],r=IDBKeyRange.bound([t,""],[rs(t),""],!1,!0);return af(e).W(r).next(e=>{for(let r of e){if(r.collectionId!==t)break;n.push(og(r.parent))}return n})}addFieldIndex(e,t){var n;let r=am(e),i={indexId:t.indexId,collectionGroup:t.collectionGroup,fields:t.fields.map(e=>[e.fieldPath.canonicalString(),e.kind])};delete i.indexId;let s=r.add(i);if(t.indexState){let o=ag(e);return s.next(e=>{o.put(o2(e,this.user,t.indexState.sequenceNumber,t.indexState.offset))})}return s.next()}deleteFieldIndex(e,t){let n=am(e),r=ag(e),i=ap(e);return n.delete(t.indexId).next(()=>r.delete(IDBKeyRange.bound([t.indexId],[t.indexId+1],!1,!0))).next(()=>i.delete(IDBKeyRange.bound([t.indexId],[t.indexId+1],!1,!0)))}getDocumentsMatchingTarget(e,t){let n=ap(e),r=!0,i=new Map;return rT.forEach(this.tn(t),t=>this.en(e,t).next(e=>{r&&(r=!!e),i.set(t,e)})).next(()=>{if(r){let e=s$(),s=[];return rT.forEach(i,(r,i)=>{nH("IndexedDbIndexManager",`Using index id=${r.indexId}|cg=${r.collectionGroup}|f=${r.fields.map(e=>`${e.fieldPath}:${e.kind}`).join(",")} to execute ${iS(t)}`);let o=function(e,t){let n=rp(t);if(void 0===n)return null;for(let r of ik(e,n.fieldPath))switch(r.op){case"array-contains-any":return r.value.arrayValue.values||[];case"array-contains":return[r.value]}return null}(i,r),a=function(e,t){let n=new Map;for(let r of rm(t))for(let i of ik(e,r.fieldPath))switch(i.op){case"==":case"in":n.set(r.fieldPath.canonicalString(),i.value);break;case"not-in":case"!=":return n.set(r.fieldPath.canonicalString(),i.value),Array.from(n.values())}return null}(i,r),l=function(e,t){let n=[],r=!0;for(let i of rm(t)){let s=0===i.kind?iC(e,i.fieldPath,e.startAt):iR(e,i.fieldPath,e.startAt);n.push(s.value),r&&(r=s.inclusive)}return new iU(n,r)}(i,r),u=function(e,t){let n=[],r=!0;for(let i of rm(t)){let s=0===i.kind?iR(e,i.fieldPath,e.endAt):iC(e,i.fieldPath,e.endAt);n.push(s.value),r&&(r=s.inclusive)}return new iU(n,r)}(i,r),c=this.nn(r,i,l),h=this.nn(r,i,u),d=this.sn(r,i,a),f=this.rn(r.indexId,o,c,l.inclusive,h,u.inclusive,d);return rT.forEach(f,r=>n.J(r,t.limit).next(t=>{t.forEach(t=>{let n=rd.fromSegments(t.documentKey);e.has(n)||(e=e.add(n),s.push(n))})}))}).next(()=>s)}return rT.resolve(null)})}tn(e){let t=this.Ze.get(e);return t||(t=[e],this.Ze.set(e,t),t)}rn(e,t,n,r,i,s,o){let a=(null!=t?t.length:1)*Math.max(n.length,i.length),l=a/(null!=t?t.length:1),u=[];for(let c=0;c<a;++c){let h=t?this.on(t[c/l]):ah,d=this.un(e,h,n[c%l],r),f=this.cn(e,h,i[c%l],s),p=o.map(t=>this.un(e,h,t,!0));u.push(...this.createRange(d,f,p))}return u}un(e,t,n,r){let i=new as(e,rd.empty(),t,n);return r?i:i.Ke()}cn(e,t,n,r){let i=new as(e,rd.empty(),t,n);return r?i.Ke():i}en(e,t){let n=new al(t),r=null!=t.collectionGroup?t.collectionGroup:t.path.lastSegment();return this.getFieldIndexes(e,r).next(e=>{let t=null;for(let r of e)n.We(r)&&(!t||r.fields.length>t.fields.length)&&(t=r);return t})}getIndexType(e,t){let n=2;return rT.forEach(this.tn(t),t=>this.en(e,t).next(e=>{e?0!==n&&e.fields.length<function(e){let t=new rz(rh.comparator),n=!1;for(let r of e.filters){let i=r;i.field.isKeyField()||("array-contains"===i.op||"array-contains-any"===i.op?n=!0:t=t.add(i.field))}for(let s of e.orderBy)s.field.isKeyField()||(t=t.add(s.field));return t.size+(n?1:0)}(t)&&(n=1):n=0})).next(()=>n)}an(e,t){let n=new ai;for(let r of rm(e)){let i=t.data.field(r.fieldPath);if(null==i)return null;let s=n.qe(r.kind);o7.Te.ce(i,s)}return n.$e()}on(e){let t=new ai;return o7.Te.ce(e,t.qe(0)),t.$e()}hn(e,t){let n=new ai;return o7.Te.ce(io(this.databaseId,t),n.qe(function(e){let t=rm(e);return 0===t.length?0:t[t.length-1].kind}(e))),n.$e()}sn(e,t,n){if(null===n)return[];let r=[];r.push(new ai);let i=0;for(let s of rm(e)){let o=n[i++];for(let a of r)if(this.ln(t,s.fieldPath)&&il(o))r=this.fn(r,s,o);else{let l=a.qe(s.kind);o7.Te.ce(o,l)}}return this.dn(r)}nn(e,t,n){return this.sn(e,t,n.position)}dn(e){let t=[];for(let n=0;n<e.length;++n)t[n]=e[n].$e();return t}
2119fn(e,t,n){let r=[...e],i=[];for(let s of n.arrayValue.values||[])for(let o of r){let a=new ai;a.seed(o.$e()),o7.Te.ce(s,a.qe(t.kind)),i.push(a)}return i}ln(e,t){return!!e.filters.find(e=>e instanceof iA&&e.field.isEqual(t)&&("in"===e.op||"not-in"===e.op))}getFieldIndexes(e,t){let n=am(e),r=ag(e);return(t?n.W("collectionGroupIndex",IDBKeyRange.bound(t,t)):n.W()).next(e=>{let t=[];return rT.forEach(e,e=>r.get([e.indexId,this.uid]).next(n=>{t.push(function(e,t){let n=t?new ry(t.sequenceNumber,new rb(oK(t.readTime),new rd(og(t.documentKey)),t.largestBatchId)):ry.empty(),r=e.fields.map(([e,t])=>new rg(rh.fromServerFormat(e),t));return new rf(e.indexId,e.collectionGroup,r,n)}(e,n))})).next(()=>t)})}getNextCollectionGroupToUpdate(e){return this.getFieldIndexes(e).next(e=>0===e.length?null:(e.sort((e,t)=>{let n=e.indexState.sequenceNumber-t.indexState.sequenceNumber;return 0!==n?n:rr(e.collectionGroup,t.collectionGroup)}),e[0].collectionGroup))}updateCollectionGroup(e,t,n){let r=am(e),i=ag(e);return this._n(e).next(e=>r.W("collectionGroupIndex",IDBKeyRange.bound(t,t)).next(t=>rT.forEach(t,t=>i.put(o2(t.indexId,this.user,e,n)))))}updateIndexEntries(e,t){let n=new Map;return rT.forEach(t,(t,r)=>{let i=n.get(t.collectionGroup);return(i?rT.resolve(i):this.getFieldIndexes(e,t.collectionGroup)).next(i=>(n.set(t.collectionGroup,i),rT.forEach(i,n=>this.wn(e,t,n).next(t=>{let i=this.mn(r,n);return t.isEqual(i)?rT.resolve():this.gn(e,r,n,t,i)}))))})}yn(e,t,n,r){return ap(e).put({indexId:r.indexId,uid:this.uid,arrayValue:r.arrayValue,directionalValue:r.directionalValue,orderedDocumentKey:this.hn(n,t.key),documentKey:t.key.path.toArray()})}pn(e,t,n,r){return ap(e).delete([r.indexId,this.uid,r.arrayValue,r.directionalValue,this.hn(n,t.key),t.key.path.toArray()])}wn(e,t,n){let r=ap(e),i=new rz(ao);return r.Z({index:"documentKeyIndex",range:IDBKeyRange.only([n.indexId,this.uid,this.hn(n,t)])},(e,r)=>{i=i.add(new as(n.indexId,t,r.arrayValue,r.directionalValue))}).next(()=>i)}mn(e,t){let n=new rz(ao),r=this.an(t,e);if(null==r)return n;let i=rp(t);if(null!=i){let s=e.data.field(i.fieldPath);if(il(s))for(let o of s.arrayValue.values||[])n=n.add(new as(t.indexId,e.key,this.on(o),r))}else n=n.add(new as(t.indexId,e.key,ah,r));return n}gn(e,t,n,r,i){nH("IndexedDbIndexManager","Updating index entries for document '%s'",t.key);let s=[];return function(e,t,n,r,i){let s=e.getIterator(),o=t.getIterator(),a=rG(s),l=rG(o);for(;a||l;){let u=!1,c=!1;if(a&&l){let h=n(a,l);h<0?c=!0:h>0&&(u=!0)}else null!=a?c=!0:u=!0;u?(r(l),l=rG(o)):c?(i(a),a=rG(s)):(a=rG(s),l=rG(o))}}(r,i,ao,r=>{s.push(this.yn(e,t,n,r))},r=>{s.push(this.pn(e,t,n,r))}),rT.waitFor(s)}_n(e){let t=1;return ag(e).Z({index:"sequenceNumberIndex",reverse:!0,range:IDBKeyRange.upperBound([this.uid,Number.MAX_SAFE_INTEGER])},(e,n,r)=>{r.done(),t=n.sequenceNumber+1}).next(()=>t)}createRange(e,t,n){n=n.sort((e,t)=>ao(e,t)).filter((e,t,n)=>!t||0!==ao(e,n[t-1]));let r=[];for(let i of(r.push(e),n)){let s=ao(i,e),o=ao(i,t);if(0===s)r[0]=e.Ke();else if(s>0&&o<0)r.push(i),r.push(i.Ke());else if(o>0)break}r.push(t);let a=[];for(let l=0;l<r.length;l+=2)a.push(IDBKeyRange.bound([r[l].indexId,this.uid,r[l].arrayValue,r[l].directionalValue,ah,[]],[r[l+1].indexId,this.uid,r[l+1].arrayValue,r[l+1].directionalValue,ah,[]]));return a}getMinOffsetFromCollectionGroup(e,t){return this.getFieldIndexes(e,t).next(ay)}getMinOffset(e,t){return rT.mapArray(this.tn(t),t=>this.en(e,t).next(e=>e||nX())).next(ay)}}function af(e){return oB(e,"collectionParents")}function ap(e){return oB(e,"indexEntries")}function am(e){return oB(e,"indexConfiguration")}function ag(e){return oB(e,"indexState")}function ay(e){var t;(t=0!==e.length)||nX();let n=e[0].indexState.offset,r=n.largestBatchId;for(let i=1;i<e.length;i++){let s=e[i].indexState.offset;0>rw(s,n)&&(n=s),r<s.largestBatchId&&(r=s.largestBatchId)}return new rb(n.readTime,n.documentKey,r)}/** 2120 * @license 2121 * Copyright 2018 Google LLC 2122 * 2123 * Licensed under the Apache License, Version 2.0 (the "License"); 2124 * you may not use this file except in compliance with the License. 2125 * You may obtain a copy of the License at 2126 * 2127 * http://www.apache.org/licenses/LICENSE-2.0 2128 * 2129 * Unless required by applicable law or agreed to in writing, softw
2129are 2130 * distributed under the License is distributed on an "AS IS" BASIS, 2131 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2132 * See the License for the specific language governing permissions and 2133 * limitations under the License. 2134 */ let av={didRun:!1,sequenceNumbersCollected:0,targetsRemoved:0,documentsRemoved:0};class a_{constructor(e,t,n){this.cacheSizeCollectionThreshold=e,this.percentileToCollect=t,this.maximumSequenceNumbersToCollect=n}static withCacheSize(e){return new a_(e,a_.DEFAULT_COLLECTION_PERCENTILE,a_.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}}/** 2135 * @license 2136 * Copyright 2020 Google LLC 2137 * 2138 * Licensed under the Apache License, Version 2.0 (the "License"); 2139 * you may not use this file except in compliance with the License. 2140 * You may obtain a copy of the License at 2141 * 2142 * http://www.apache.org/licenses/LICENSE-2.0 2143 * 2144 * Unless required by applicable law or agreed to in writing, software 2145 * distributed under the License is distributed on an "AS IS" BASIS, 2146 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2147 * See the License for the specific language governing permissions and 2148 * limitations under the License. 2149 */ function ab(e,t,n){let r=e.store("mutations"),i=e.store("documentMutations"),s=[],o=IDBKeyRange.only(n.batchId),a=0,l=r.Z({range:o},(e,t,n)=>(a++,n.delete()));s.push(l.next(()=>{var e;(e=1===a)||nX()}));let u=[];for(let c of n.mutations){let h=o_(t,c.key.path,n.batchId);s.push(i.delete(h)),u.push(c.key)}return rT.waitFor(s).next(()=>u)}function aw(e){if(!e)return 0;let t;if(e.document)t=e.document;else if(e.unknownDocument)t=e.unknownDocument;else{if(!e.noDocument)throw nX();t=e.noDocument}return JSON.stringify(t).length}/** 2150 * @license 2151 * Copyright 2017 Google LLC 2152 * 2153 * Licensed under the Apache License, Version 2.0 (the "License"); 2154 * you may not use this file except in compliance with the License. 2155 * You may obtain a copy of the License at 2156 * 2157 * http://www.apache.org/licenses/LICENSE-2.0 2158 * 2159 * Unless required by applicable law or agreed to in writing, software 2160 * distributed under the License is distributed on an "AS IS" BASIS, 2161 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2162 * See the License for the specific language governing permissions and 2163 * limitations under the License. 2164 */ a_.DEFAULT_COLLECTION_PERCENTILE=10,a_.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,a_.DEFAULT=new a_(41943040,a_.DEFAULT_COLLECTION_PERCENTILE,a_.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),a_.DISABLED=new a_(-1,0,0);class aE{constructor(e,t,n,r){this.userId=e,this.It=t,this.indexManager=n,this.referenceDelegate=r,this.In={}}static oe(e,t,n,r){var i;(i=""!==e.uid)||nX();let s=e.isAuthenticated()?e.uid:"";return new aE(s,t,n,r)}checkEmpty(e){let t=!0,n=IDBKeyRange.bound([this.userId,Number.NEGATIVE_INFINITY],[this.userId,Number.POSITIVE_INFINITY]);return aS(e).Z({index:"userMutationsIndex",range:n},(e,n,r)=>{t=!1,r.done()}).next(()=>t)}addMutationBatch(e,t,n,r){let i=aT(e),s=aS(e);return s.add({}).next(o=>{var a;"number"==typeof o||nX();let l=new oZ(o,t,n,r),u=function(e,t,n){let r=n.baseMutations.map(t=>os(e.re,t)),i=n.mutations.map(t=>os(e.re,t));return{userId:t,batchId:n.batchId,localWriteTimeMs:n.localWriteTime.toMillis(),baseMutations:r,mutations:i}}(this.It,this.userId,l),c=[],h=new rz((e,t)=>rr(e.canonicalString(),t.canonicalString()));for(let d of r){let f=o_(this.userId,d.key.path,o);h=h.add(d.key.path.popLast()),c.push(s.put(u)),c.push(i.put(f,ob))}return h.forEach(t=>{c.push(this.indexManager.addToCollectionParentIndex(e,t))}),e.addOnCommittedListener(()=>{this.In[o]=l.keys()}),rT.waitFor(c).next(()=>l)})}lookupMutationBatch(e,t){return aS(e).get(t).next(e=>{var t;return e?(e.userId===this.userId||nX(),oY(this.It,e)):null})}Tn(e,t){return this.In[t]?rT.resolve(this.In[t]):this.lookupMutationBatch(e,t).next(e=>{if(e){let n=e.keys();return this.In[t]=n,n}return null})}getNextMutationBatchAfterBatchId(e,t){let n=t+1,r=IDBKeyRange.lowerBound([this.userId,n]),i=null;return aS(e).Z({index:"userMutationsIndex",range:r},(e,t,r)=>{var s;t.userId===this.userId&&(t.batchId>=n||nX(),i=oY(this.It,t)),r.done()}).next(()=>i)}getHighestUnacknowledgedBatchId(e){let t=IDBKeyRange.upperBound([this.userId,Number.POSITIVE_INFINITY]),n=-1;return aS(e).Z({index:"userMutationsIndex",range:t,reverse:!0},(e,t,r)=>{n=t.batchId,r.done()}).next(()=>n)}getAllMutationBatches(e){let t=IDBKeyRange.bound([this.userId,-1],[this.userId,Number.POSITIVE_INFINITY]);return aS(e).W("userMutationsIndex",t).next(e=>e.map(e=>oY(this.It,e)))}getAllMutationBatchesAffectingDocumentKey(e,t){let n=ov(this.userId,t.path),r=IDBKeyRange.lowerBound(n),i=[];return aT(e).Z({range:r},(n,r,s)=>{let[o,a,l]=n,u=og(a);if(o===this.userId&&t.path.isEqual(u))return aS(e).get(l).next(e=>{var t;if(!e)throw nX();e.userId===this.userId||nX(),i.push(oY(this.It,e))});s.done()}).next(()=>i)}getAllMutationBatchesAffectingDocumentKeys(e,t){let n=new rz(rr),r=[];return t.forEach(t=>{let i=ov(this.userId,t.path),s=IDBKeyRange.lowerBound(i),o=aT(e).Z({range:s},(e,r,i)=>{let[s,o,a]=e,l=og(o);s===this.userId&&t.path.isEqual(l)?n=n.add(a):i.done()});r.push(o)}),rT.waitFor(r).next(()=>this.En(e,n))}getAllMutationBatchesAffectingQuery(e,t){let n=t.path,r=n.length+1,i=ov(this.userId,n),s=IDBKeyRange.lowerBound(i),o=new rz(rr);return aT(e).Z({range:s},(e,t,i)=>{let[s,a,l]=e,u=og(a);s===this.userId&&n.isPrefixOf(u)?u.length===r&&(o=o.add(l)):i.done()}).next(()=>this.En(e,o))}En(e,t){let n=[],r=[];return t.forEach(t=>{r.push(aS(e).get(t).next(e=>{var t;if(null===e)throw nX();e.userId===this.userId||nX(),n.push(oY(this.It,e))}))}),rT.waitFor(r).next(()=>n)}removeMutationBatch(e,t){return ab(e.ie,this.userId,t).next(n=>(e.addOnCommittedListener(()=>{this.An(t.batchId)}),rT.forEach(n,t=>this.referenceDelegate.markPotentiallyOrphaned(e,t))))}An(e){delete this.In[e]}performConsistencyCheck(e){return this.checkEmpty(e).next(t=>
2164{if(!t)return rT.resolve();let n=IDBKeyRange.lowerBound([this.userId]),r=[];return aT(e).Z({range:n},(e,t,n)=>{if(e[0]===this.userId){let i=og(e[1]);r.push(i)}else n.done()}).next(()=>{var e;(e=0===r.length)||nX()})})}containsKey(e,t){return ax(e,this.userId,t)}Rn(e){return aI(e).get(this.userId).next(e=>e||{userId:this.userId,lastAcknowledgedBatchId:-1,lastStreamToken:""})}}function ax(e,t,n){let r=ov(t,n.path),i=r[1],s=IDBKeyRange.lowerBound(r),o=!1;return aT(e).Z({range:s,X:!0},(e,n,r)=>{let[s,a,l]=e;s===t&&a===i&&(o=!0),r.done()}).next(()=>o)}function aS(e){return oB(e,"mutations")}function aT(e){return oB(e,"documentMutations")}function aI(e){return oB(e,"mutationQueues")}/** 2165 * @license 2166 * Copyright 2017 Google LLC 2167 * 2168 * Licensed under the Apache License, Version 2.0 (the "License"); 2169 * you may not use this file except in compliance with the License. 2170 * You may obtain a copy of the License at 2171 * 2172 * http://www.apache.org/licenses/LICENSE-2.0 2173 * 2174 * Unless required by applicable law or agreed to in writing, software 2175 * distributed under the License is distributed on an "AS IS" BASIS, 2176 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2177 * See the License for the specific language governing permissions and 2178 * limitations under the License. 2179 */ class ak{constructor(e){this.bn=e}next(){return this.bn+=2,this.bn}static Pn(){return new ak(0)}static vn(){return new ak(-1)}}/** 2180 * @license 2181 * Copyright 2017 Google LLC 2182 * 2183 * Licensed under the Apache License, Version 2.0 (the "License"); 2184 * you may not use this file except in compliance with the License. 2185 * You may obtain a copy of the License at 2186 * 2187 * http://www.apache.org/licenses/LICENSE-2.0 2188 * 2189 * Unless required by applicable law or agreed to in writing, software 2190 * distributed under the License is distributed on an "AS IS" BASIS, 2191 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2192 * See the License for the specific language governing permissions and 2193 * limitations under the License. 2194 */ class aC{constructor(e,t){this.referenceDelegate=e,this.It=t}allocateTargetId(e){return this.Vn(e).next(t=>{let n=new ak(t.highestTargetId);return t.highestTargetId=n.next(),this.Sn(e,t).next(()=>t.highestTargetId)})}getLastRemoteSnapshotVersion(e){return this.Vn(e).next(e=>ra.fromTimestamp(new ro(e.lastRemoteSnapshotVersion.seconds,e.lastRemoteSnapshotVersion.nanoseconds)))}getHighestSequenceNumber(e){return this.Vn(e).next(e=>e.highestListenSequenceNumber)}setTargetsMetadata(e,t,n){return this.Vn(e).next(r=>(r.highestListenSequenceNumber=t,n&&(r.lastRemoteSnapshotVersion=n.toTimestamp()),t>r.highestListenSequenceNumber&&(r.highestListenSequenceNumber=t),this.Sn(e,r)))}addTargetData(e,t){return this.Dn(e,t).next(()=>this.Vn(e).next(n=>(n.targetCount+=1,this.Cn(t,n),this.Sn(e,n))))}updateTargetData(e,t){return this.Dn(e,t)}removeTargetData(e,t){return this.removeMatchingKeysForTargetId(e,t.targetId).next(()=>aR(e).delete(t.targetId)).next(()=>this.Vn(e)).next(t=>{var n;return t.targetCount>0||nX(),t.targetCount-=1,this.Sn(e,t)})}removeTargets(e,t,n){let r=0,i=[];return aR(e).Z((s,o)=>{let a=oQ(o);a.sequenceNumber<=t&&null===n.get(a.targetId)&&(r++,i.push(this.removeTargetData(e,a)))}).next(()=>rT.waitFor(i)).next(()=>r)}forEachTarget(e,t){return aR(e).Z((e,n)=>{let r=oQ(n);t(r)})}Vn(e){return aA(e).get("targetGlobalKey").next(e=>(null!==e||nX(),e))}Sn(e,t){return aA(e).put("targetGlobalKey",t)}Dn(e,t){return aR(e).put(oX(this.It,t))}Cn(e,t){let n=!1;return e.targetId>t.highestTargetId&&(t.highestTargetId=e.targetId,n=!0),e.sequenceNumber>t.highestListenSequenceNumber&&(t.highestListenSequenceNumber=e.sequenceNumber,n=!0),n}getTargetCount(e){return this.Vn(e).next(e=>e.targetCount)}getTargetData(e,t){let n=iS(t),r=IDBKeyRange.bound([n,Number.NEGATIVE_INFINITY],[n,Number.POSITIVE_INFINITY]),i=null;return aR(e).Z({range:r,index:"queryTargetsIndex"},(e,n,r)=>{let s=oQ(n);iT(t,s.target)&&(i=s,r.done())}).next(()=>i)}addMatchingKeys(e,t,n){let r=[],i=aO(e);return t.forEach(t=>{let s=of(t.path);r.push(i.put({targetId:n,path:s})),r.push(this.referenceDelegate.addReference(e,n,t))}),rT.waitFor(r)}removeMatchingKeys(e,t,n){let r=aO(e);return rT.forEach(t,t=>{let i=of(t.path);return rT.waitFor([r.delete([n,i]),this.referenceDelegate.removeReference(e,n,t)])})}removeMatchingKeysForTargetId(e,t){let n=aO(e),r=IDBKeyRange.bound([t],[t+1],!1,!0);return n.delete(r)}getMatchingKeysForTargetId(e,t){let n=IDBKeyRange.bound([t],[t+1],!1,!0),r=aO(e),i=s$(
2194);return r.Z({range:n,X:!0},(e,t,n)=>{let r=og(e[1]),s=new rd(r);i=i.add(s)}).next(()=>i)}containsKey(e,t){let n=of(t.path),r=IDBKeyRange.bound([n],[rs(n)],!1,!0),i=0;return aO(e).Z({index:"documentTargetsIndex",X:!0,range:r},([e,t],n,r)=>{0!==e&&(i++,r.done())}).next(()=>i>0)}se(e,t){return aR(e).get(t).next(e=>e?oQ(e):null)}}function aR(e){return oB(e,"targets")}function aA(e){return oB(e,"targetGlobal")}function aO(e){return oB(e,"targetDocuments")}/** 2195 * @license 2196 * Copyright 2020 Google LLC 2197 * 2198 * Licensed under the Apache License, Version 2.0 (the "License"); 2199 * you may not use this file except in compliance with the License. 2200 * You may obtain a copy of the License at 2201 * 2202 * http://www.apache.org/licenses/LICENSE-2.0 2203 * 2204 * Unless required by applicable law or agreed to in writing, software 2205 * distributed under the License is distributed on an "AS IS" BASIS, 2206 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2207 * See the License for the specific language governing permissions and 2208 * limitations under the License. 2209 */ function aD([e,t],[n,r]){let i=rr(e,n);return 0===i?rr(t,r):i}class aN{constructor(e){this.xn=e,this.buffer=new rz(aD),this.Nn=0}kn(){return++this.Nn}On(e){let t=[e,this.kn()];if(this.buffer.size<this.xn)this.buffer=this.buffer.add(t);else{let n=this.buffer.last();0>aD(t,n)&&(this.buffer=this.buffer.delete(n).add(t))}}get maxValue(){return this.buffer.last()[0]}}class aP{constructor(e,t,n){this.garbageCollector=e,this.asyncQueue=t,this.localStore=n,this.Mn=null}start(){-1!==this.garbageCollector.params.cacheSizeCollectionThreshold&&this.Fn(6e4)}stop(){this.Mn&&(this.Mn.cancel(),this.Mn=null)}get started(){return null!==this.Mn}Fn(e){nH("LruGarbageCollector",`Garbage collection scheduled in ${e}ms`),this.Mn=this.asyncQueue.enqueueAfterDelay("lru_garbage_collection",e,async()=>{this.Mn=null;try{await this.localStore.collectGarbage(this.garbageCollector)}catch(e){rA(e)?nH("LruGarbageCollector","Ignoring IndexedDB error during garbage collection: ",e):await rS(e)}await this.Fn(3e5)})}}class aF{constructor(e,t){this.$n=e,this.params=t}calculateTargetCount(e,t){return this.$n.Bn(e).next(e=>Math.floor(t/100*e))}nthSequenceNumber(e,t){if(0===t)return rT.resolve(rL.at);let n=new aN(t);return this.$n.forEachTarget(e,e=>n.On(e.sequenceNumber)).next(()=>this.$n.Ln(e,e=>n.On(e))).next(()=>n.maxValue)}removeTargets(e,t,n){return this.$n.removeTargets(e,t,n)}removeOrphanedDocuments(e,t){return this.$n.removeOrphanedDocuments(e,t)}collect(e,t){return -1===this.params.cacheSizeCollectionThreshold?(nH("LruGarbageCollector","Garbage collection skipped; disabled"),rT.resolve(av)):this.getCacheSize(e).next(n=>n<this.params.cacheSizeCollectionThreshold?(nH("LruGarbageCollector",`Garbage collection skipped; Cache size ${n} is lower than threshold ${this.params.cacheSizeCollectionThreshold}`),av):this.Un(e,t))}getCacheSize(e){return this.$n.getCacheSize(e)}Un(e,t){let n,r,i,s,o,a,l,u=Date.now();return this.calculateTargetCount(e,this.params.percentileToCollect).next(t=>(t>this.params.maximumSequenceNumbersToCollect?(nH("LruGarbageCollector",`Capping sequence numbers to collect down to the maximum of ${this.params.maximumSequenceNumbersToCollect} from ${t}`),r=this.params.maximumSequenceNumbersToCollect):r=t,s=Date.now(),this.nthSequenceNumber(e,r))).next(r=>(n=r,o=Date.now(),this.removeTargets(e,n,t))).next(t=>(i=t,a=Date.now(),this.removeOrphanedDocuments(e,n))).next(e=>(l=Date.now(),nG()<=p.in.DEBUG&&nH("LruGarbageCollector",`LRU Garbage Collection 2210 Counted targets in ${s-u}ms 2211 Determined least recently used ${r} in `+(o-s)+"ms\n"+` Removed ${i} targets in `+(a-o)+"ms\n"+` Removed ${e} documents in `+(l-a)+"ms\n"+`Total Duration: ${l-u}ms`),rT.resolve({didRun:!0,sequenceNumbersCollected:r,targetsRemoved:i,documentsRemoved:e})))}}/** 2212 * @license 2213 * Copyright 2020 Google LLC 2214 * 2215 * Licensed under the Apache License, Version 2.0 (the "License"); 2216 * you may not use this file except in compliance with the License. 2217 * You may obtain a copy of the License at 2218 * 2219 * http://www.apache.org/licenses/LICENSE-2.0 2220 * 2221 * Unless required by applicable law or agreed to in writing, softw
2221are 2222 * distributed under the License is distributed on an "AS IS" BASIS, 2223 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2224 * See the License for the specific language governing permissions and 2225 * limitations under the License. 2226 */ class aM{constructor(e,t){var n,r;this.db=e,this.garbageCollector=new aF(this,t)}Bn(e){let t=this.qn(e);return this.db.getTargetCache().getTargetCount(e).next(e=>t.next(t=>e+t))}qn(e){let t=0;return this.Ln(e,e=>{t++}).next(()=>t)}forEachTarget(e,t){return this.db.getTargetCache().forEachTarget(e,t)}Ln(e,t){return this.Kn(e,(e,n)=>t(n))}addReference(e,t,n){return aL(e,n)}removeReference(e,t,n){return aL(e,n)}removeTargets(e,t,n){return this.db.getTargetCache().removeTargets(e,t,n)}markPotentiallyOrphaned(e,t){return aL(e,t)}Gn(e,t){var n,r;let i;return i=!1,aI(e).tt(n=>ax(e,n,t).next(e=>(e&&(i=!0),rT.resolve(!e)))).next(()=>i)}removeOrphanedDocuments(e,t){let n=this.db.getRemoteDocumentCache().newChangeBuffer(),r=[],i=0;return this.Kn(e,(s,o)=>{if(o<=t){let a=this.Gn(e,s).next(t=>{if(!t)return i++,n.getEntry(e,s).next(()=>(n.removeEntry(s,ra.min()),aO(e).delete([0,of(s.path)])))});r.push(a)}}).next(()=>rT.waitFor(r)).next(()=>n.apply(e)).next(()=>i)}removeTarget(e,t){let n=t.withSequenceNumber(e.currentSequenceNumber);return this.db.getTargetCache().updateTargetData(e,n)}updateLimboDocument(e,t){return aL(e,t)}Kn(e,t){let n=aO(e),r,i=rL.at;return n.Z({index:"documentTargetsIndex"},([e,n],{path:s,sequenceNumber:o})=>{0===e?(i!==rL.at&&t(new rd(og(r)),i),i=o,r=s):i=rL.at}).next(()=>{i!==rL.at&&t(new rd(og(r)),i)})}getCacheSize(e){return this.db.getRemoteDocumentCache().getSize(e)}}function aL(e,t){var n,r;return aO(e).put((r=e.currentSequenceNumber,{targetId:0,path:of(t.path),sequenceNumber:r}))}/** 2227 * @license 2228 * Copyright 2017 Google LLC 2229 * 2230 * Licensed under the Apache License, Version 2.0 (the "License"); 2231 * you may not use this file except in compliance with the License. 2232 * You may obtain a copy of the License at 2233 * 2234 * http://www.apache.org/licenses/LICENSE-2.0 2235 * 2236 * Unless required by applicable law or agreed to in writing, software 2237 * distributed under the License is distributed on an "AS IS" BASIS, 2238 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2239 * See the License for the specific language governing permissions and 2240 * limitations under the License. 2241 */ class aj{constructor(){this.changes=new sD(e=>e.toString(),(e,t)=>e.isEqual(t)),this.changesApplied=!1}addEntry(e){this.assertNotApplied(),this.changes.set(e.key,e)}removeEntry(e,t){this.assertNotApplied(),this.changes.set(e,iw.newInvalidDocument(e).setReadTime(t))}getEntry(e,t){this.assertNotApplied();let n=this.changes.get(t);return void 0!==n?rT.resolve(n):this.getFromCache(e,t)}getEntries(e,t){return this.getAllFromCache(e,t)}apply(e){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(e)}assertNotApplied(){}}/** 2242 * @license 2243 * Copyright 2017 Google LLC 2244 * 2245 * Licensed under the Apache License, Version 2.0 (the "License"); 2246 * you may not use this file except in compliance with the License. 2247 * You may obtain a copy of the License at 2248 * 2249 * http://www.apache.org/licenses/LICENSE-2.0 2250 * 2251 * Unless required by applicable law or agreed to in writing, software 2252 * distributed under the License is distributed on an "AS IS" BASIS, 2253 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2254 * See the License for the specific language governing permissions and 2255 * limitations under the License. 2256 */ class aU{constructor(e){this.It=e}setIndexManager(e){this.indexManager=e}addEntry(e,t,n){return aV(e).put(n)}removeEntry(e,t,n){return aV(e).delete(function(e,t){let n=e.path.toArray();return[n.slice(0,n.length-2),n[n.length-2],oW(t),n[n.length-1]]}(t,n))}updateMetadata(e,t){return this.getMetadata(e).next(n=>(n.byteSize+=t,this.Qn(e,n)))}getEntry(e,t){let n=iw.newInvalidDocument(t);return aV(e).Z({index:"documentKeyIndex",range:IDBKeyRange.only(az(t))},(e,r)=>{n=this.jn(t,r)}).next(()=>n)}Wn(e,t){let n={size:0,document:iw.newInvalidDocument(t)};return aV(e).Z({index:"documentKeyIndex",range:IDBKeyRange.only(az(t))},(e,r)=>{n={document:this.jn(t,r),size:aw(r)}
2256}).next(()=>n)}getEntries(e,t){let n=sN;return this.zn(e,t,(e,t)=>{let r=this.jn(e,t);n=n.insert(e,r)}).next(()=>n)}Hn(e,t){let n=sN,r=new rZ(rd.comparator);return this.zn(e,t,(e,t)=>{let i=this.jn(e,t);n=n.insert(e,i),r=r.insert(e,aw(t))}).next(()=>({documents:n,Jn:r}))}zn(e,t,n){if(t.isEmpty())return rT.resolve();let r=new rz(aG);t.forEach(e=>r=r.add(e));let i=IDBKeyRange.bound(az(r.first()),az(r.last())),s=r.getIterator(),o=s.getNext();return aV(e).Z({index:"documentKeyIndex",range:i},(e,t,r)=>{let i=rd.fromSegments([...t.prefixPath,t.collectionGroup,t.documentId]);for(;o&&0>aG(o,i);)n(o,null),o=s.getNext();o&&o.isEqual(i)&&(n(o,t),o=s.hasNext()?s.getNext():null),o?r.j(az(o)):r.done()}).next(()=>{for(;o;)n(o,null),o=s.hasNext()?s.getNext():null})}getAllFromCollection(e,t,n){let r=[t.popLast().toArray(),t.lastSegment(),oW(n.readTime),n.documentKey.path.isEmpty()?"":n.documentKey.path.lastSegment()],i=[t.popLast().toArray(),t.lastSegment(),[Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],""];return aV(e).W(IDBKeyRange.bound(r,i,!0)).next(e=>{let t=sN;for(let n of e){let r=this.jn(rd.fromSegments(n.prefixPath.concat(n.collectionGroup,n.documentId)),n);t=t.insert(r.key,r)}return t})}getAllFromCollectionGroup(e,t,n,r){let i=sN,s=aq(t,n),o=aq(t,rb.max());return aV(e).Z({index:"collectionGroupIndex",range:IDBKeyRange.bound(s,o,!0)},(e,t,n)=>{let s=this.jn(rd.fromSegments(t.prefixPath.concat(t.collectionGroup,t.documentId)),t);(i=i.insert(s.key,s)).size===r&&n.done()}).next(()=>i)}newChangeBuffer(e){return new aZ(this,!!e&&e.trackRemovals)}getSize(e){return this.getMetadata(e).next(e=>e.byteSize)}getMetadata(e){return a$(e).get("remoteDocumentGlobalKey").next(e=>(!e&&nX(),e))}Qn(e,t){return a$(e).put("remoteDocumentGlobalKey",t)}jn(e,t){if(t){let n=function(e,t){let n;if(t.document)n=oi(e.re,t.document,!!t.hasCommittedMutations);else if(t.noDocument){let r=rd.fromSegments(t.noDocument.path),i=oK(t.noDocument.readTime);n=iw.newNoDocument(r,i),t.hasCommittedMutations&&n.setHasCommittedMutations()}else{if(!t.unknownDocument)return nX();{let s=rd.fromSegments(t.unknownDocument.path),o=oK(t.unknownDocument.version);n=iw.newUnknownDocument(s,o)}}return t.readTime&&n.setReadTime(function(e){let t=new ro(e[0],e[1]);return ra.fromTimestamp(t)}(t.readTime)),n}(this.It,t);if(!(n.isNoDocument()&&n.version.isEqual(ra.min())))return n}return iw.newInvalidDocument(e)}}function aB(e){return new aU(e)}class aZ extends aj{constructor(e,t){super(),this.Yn=e,this.trackRemovals=t,this.Xn=new sD(e=>e.toString(),(e,t)=>e.isEqual(t))}applyChanges(e){let t=[],n=0,r=new rz((e,t)=>rr(e.canonicalString(),t.canonicalString()));
2256return this.changes.forEach((i,s)=>{let o=this.Xn.get(i);if(t.push(this.Yn.removeEntry(e,i,o.readTime)),s.isValidDocument()){let a=oG(this.Yn.It,s);r=r.add(i.path.popLast());let l=aw(a);n+=l-o.size,t.push(this.Yn.addEntry(e,i,a))}else if(n-=o.size,this.trackRemovals){let u=oG(this.Yn.It,s.convertToNoDocument(ra.min()));t.push(this.Yn.addEntry(e,i,u))}}),r.forEach(n=>{t.push(this.Yn.indexManager.addToCollectionParentIndex(e,n))}),t.push(this.Yn.updateMetadata(e,n)),rT.waitFor(t)}getFromCache(e,t){return this.Yn.Wn(e,t).next(e=>(this.Xn.set(t,{size:e.size,readTime:e.document.readTime}),e.document))}getAllFromCache(e,t){return this.Yn.Hn(e,t).next(({documents:e,Jn:t})=>(t.forEach((t,n)=>{this.Xn.set(t,{size:n,readTime:e.get(t).readTime})}),e))}}function a$(e){return oB(e,"remoteDocumentGlobal")}function aV(e){return oB(e,"remoteDocumentsV14")}function az(e){let t=e.path.toArray();return[t.slice(0,t.length-2),t[t.length-2],t[t.length-1]]}function aq(e,t){let n=t.documentKey.path.toArray();return[e,oW(t.readTime),n.slice(0,n.length-2),n.length>0?n[n.length-1]:""]}function aG(e,t){let n=e.path.toArray(),r=t.path.toArray(),i=0;for(let s=0;s<n.length-2&&s<r.length-2;++s)if(i=rr(n[s],r[s]))return i;return(i=rr(n.length,r.length))||(i=rr(n[n.length-2],r[r.length-2]))||rr(n[n.length-1],r[r.length-1])}/** 2257 * @license 2258 * Copyright 2017 Google LLC 2259 * 2260 * Licensed under the Apache License, Version 2.0 (the "License"); 2261 * you may not use this file except in compliance with the License. 2262 * You may obtain a copy of the License at 2263 * 2264 * http://www.apache.org/licenses/LICENSE-2.0 2265 * 2266 * Unless required by applicable law or agreed to in writing, software 2267 * distributed under the License is distributed on an "AS IS" BASIS, 2268 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2269 * See the License for the specific language governing permissions and 2270 * limitations under the License. 2271 */ /** 2272 * @license 2273 * Copyright 2022 Google LLC 2274 * 2275 * Licensed under the Apache License, Version 2.0 (the "License"); 2276 * you may not use this file except in compliance with the License. 2277 * You may obtain a copy of the License at 2278 * 2279 * http://www.apache.org/licenses/LICENSE-2.0 2280 * 2281 * Unless required by applicable law or agreed to in writing, software 2282 * distributed under the License is distributed on an "AS IS" BASIS, 2283 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2284 * See the License for the specific language governing permissions and 2285 * limitations under the License. 2286 */ class aW{constructor(e,t){this.overlayedDocument=e,this.mutatedFields=t}}/** 2287 * @license 2288 * Copyright 2017 Google LLC 2289 * 2290 * Licensed under the Apache License, Version 2.0 (the "License"); 2291 * you may not use this file except in compliance with the License. 2292 * You may obtain a copy of the License at 2293 * 2294 * http://www.apache.org/licenses/LICENSE-2.0 2295 * 2296 * Unless required by applicable law or agreed to in writing, software 2297 * distributed under the License is distributed on an "AS IS" BASIS, 2298 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2299 * See the License for the specific language governing permissions and 2300 * limitations under the License. 2301 */ class aH{constructor(e,t,n,r){this.remoteDocumentCache=e,this.mutationQueue=t,this.documentOverlayCache=n,this.indexManager=r}getDocument(e,t){let n=null;return this.documentOverlayCache.getOverlay(e,t).next(r=>(n=r,this.getBaseDocument(e,t,n))).next(e=>(null!==n&&s_(n.mutation,e,rW.empty(),ro.now()),e))}getDocuments(e,t){return this.remoteDocumentCache.getEntries(e,t).next(t=>this.getLocalViewOfDocuments(e,t,s$()).next(()=>t))}getLocalViewOfDocuments(e,t,n=s$()){let r=sL();return this.populateOverlays(e,r,t).next(()=>this.computeViews(e,t,r,n).next(e=>{let t=sF();return e.forEach((e,n)=>{t=t.insert(e,n.overlayedDocument)}),t}))}getOverlayedDocuments(e,t){let n=sL();return this.populateOverlays(e,n,t).next(()=>this.computeViews(e,t,n,s$()))}populateOverlays(e,t,n){let r=[];return n.forEach(e=>{t.has(e)||r.push(e)}),this.documentOverlayCache.getOverlays(e,r).next(e=>{e.forEach((e,n)=>{t.set(e,n)})})}computeViews(e,t,n,r){let i=sN,s=sU(),o=sU();return t.forEach((e,t)=>{let o=n.get(t.key);r.has(t.key)&&(void 0===o||o.mutation instanceof sx)?i=i.insert(t.key,t):void 0!==o&&(s.set(t.key,o.mutation.getFieldMask()),s_(o.mutation,t,o.mutation.getFieldMask(),ro.now()))}),this.recalculateAndSaveOverlays(e,i).next(e=>(e.forEach((e,t)=>s.set(e,t)),t.forEach((e,t)=>{var n;return o.set(e,new aW(t,null!==(n=s.get(e))&&void 0!==n?n:null))}),o))}recalculateAndSaveOverlays(e,t){let n=sU(),r=new rZ((e,t)=>e-t),i=s$();
2301return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,t).next(e=>{for(let i of e)i.keys().forEach(e=>{let s=t.get(e);if(null===s)return;let o=n.get(e)||rW.empty();o=i.applyToLocalView(s,o),n.set(e,o);let a=(r.get(i.batchId)||s$()).add(e);r=r.insert(i.batchId,a)})}).next(()=>{let s=[],o=r.getReverseIterator();for(;o.hasNext();){let a=o.getNext(),l=a.key,u=a.value,c=sj();u.forEach(e=>{if(!i.has(e)){let r=sy(t.get(e),n.get(e));null!==r&&c.set(e,r),i=i.add(e)}}),s.push(this.documentOverlayCache.saveOverlays(e,l,c))}return rT.waitFor(s)}).next(()=>n)}recalculateAndSaveOverlaysForDocumentKeys(e,t){return this.remoteDocumentCache.getEntries(e,t).next(t=>this.recalculateAndSaveOverlays(e,t))}getDocumentsMatchingQuery(e,t,n){var r;return rd.isDocumentKey(t.path)&&null===t.collectionGroup&&0===t.filters.length?this.getDocumentsMatchingDocumentQuery(e,t.path):iY(t)?this.getDocumentsMatchingCollectionGroupQuery(e,t,n):this.getDocumentsMatchingCollectionQuery(e,t,n)}getNextDocuments(e,t,n,r){return this.remoteDocumentCache.getAllFromCollectionGroup(e,t,n,r).next(i=>{let s=r-i.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(e,t,n.largestBatchId,r-i.size):rT.resolve(sL()),o=-1,a=i;return s.next(t=>rT.forEach(t,(t,n)=>(o<n.largestBatchId&&(o=n.largestBatchId),i.get(t)?rT.resolve():this.getBaseDocument(e,t,n).next(e=>{a=a.insert(t,e)}))).next(()=>this.populateOverlays(e,t,i)).next(()=>this.computeViews(e,a,t,s$())).next(e=>({batchId:o,changes:sM(e)})))})}getDocumentsMatchingDocumentQuery(e,t){return this.getDocument(e,new rd(t)).next(e=>{let t=sF();return e.isFoundDocument()&&(t=t.insert(e.key,e)),t})}getDocumentsMatchingCollectionGroupQuery(e,t,n){let r=t.collectionGroup,i=sF();return this.indexManager.getCollectionParents(e,r).next(s=>rT.forEach(s,s=>{var o,a;let l=(a=s.child(r),new iz(a,null,t.explicitOrderBy.slice(),t.filters.slice(),t.limit,t.limitType,t.startAt,t.endAt));return this.getDocumentsMatchingCollectionQuery(e,l,n).next(e=>{e.forEach((e,t)=>{i=i.insert(e,t)})})}).next(()=>i))}getDocumentsMatchingCollectionQuery(e,t,n){let r;return this.remoteDocumentCache.getAllFromCollection(e,t.path,n).next(i=>(r=i,this.documentOverlayCache.getOverlaysForCollection(e,t.path,n.largestBatchId))).next(e=>{e.forEach((e,t)=>{let n=t.getKey();null===r.get(n)&&(r=r.insert(n,iw.newInvalidDocument(n)))});let n=sF();return r.forEach((r,i)=>{let s=e.get(r);void 0!==s&&s_(s.mutation,i,rW.empty(),ro.now()),i4(t,i)&&(n=n.insert(r,i))}),n})}getBaseDocument(e,t,n){return null===n||1===n.mutation.type?this.remoteDocumentCache.getEntry(e,t):rT.resolve(iw.newInvalidDocument(t))}}/** 2302 * @license 2303 * Copyright 2020 Google LLC 2304 * 2305 * Licensed under the Apache License, Version 2.0 (the "License"); 2306 * you may not use this file except in compliance with the License. 2307 * You may obtain a copy of the License at 2308 * 2309 * http://www.apache.org/licenses/LICENSE-2.0 2310 * 2311 * Unless required by applicable law or agreed to in writing, software 2312 * distributed under the License is distributed on an "AS IS" BASIS, 2313 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2314 * See the License for the specific language governing permissions and 2315 * limitations under the License. 2316 */ class aK{constructor(e){this.It=e,this.Zn=new Map,this.ts=new Map}getBundleMetadata(e,t){return rT.resolve(this.Zn.get(t))}saveBundleMetadata(e,t){return this.Zn.set(t.id,{id:t.id,version:t.version,createTime:s5(t.createTime)}),rT.resolve()}getNamedQuery(e,t){return rT.resolve(this.ts.get(t))}saveNamedQuery(e,t){var n;return this.ts.set(t.name,{name:t.name,query:oJ(t.bundledQuery),readTime:s5(t.readTime)}),rT.resolve()}}/** 2317 * @license 2318 * Copyright 2022 Google LLC 2319 * 2320 * Licensed under the Apache License, Version 2.0 (the "License"); 2321 * you may not use this file except in compliance with the License. 2322 * You may obtain a copy of the License at 2323 * 2324 * http://www.apache.org/licenses/LICENSE-2.0 2325 * 2326 * Unless required by applicable law or agreed to in writing, software 2327 * distributed under the License is distributed on an "AS IS" BASIS, 2328 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2329 * See the License for the specific language governing permissions and 2330 * limitations under the License. 2331 */ class aY{constructor(){this.overlays=new rZ(rd.comparator),this.es=new Map}getOverlay(e,t){return rT.resolve(this.overlays.get(t))}getOverlays(e,t){let n=sL();return rT.forEach(t,t=>this.getOverlay(e,t).next(e=>{null!==e&&n.set(t,e)})).next(()=>n)}
2331saveOverlays(e,t,n){return n.forEach((n,r)=>{this.ue(e,t,r)}),rT.resolve()}removeOverlaysForBatchId(e,t,n){let r=this.es.get(n);return void 0!==r&&(r.forEach(e=>this.overlays=this.overlays.remove(e)),this.es.delete(n)),rT.resolve()}getOverlaysForCollection(e,t,n){let r=sL(),i=t.length+1,s=new rd(t.child("")),o=this.overlays.getIteratorFrom(s);for(;o.hasNext();){let a=o.getNext().value,l=a.getKey();if(!t.isPrefixOf(l.path))break;l.path.length===i&&a.largestBatchId>n&&r.set(a.getKey(),a)}return rT.resolve(r)}getOverlaysForCollectionGroup(e,t,n,r){let i=new rZ((e,t)=>e-t),s=this.overlays.getIterator();for(;s.hasNext();){let o=s.getNext().value;if(o.getKey().getCollectionGroup()===t&&o.largestBatchId>n){let a=i.get(o.largestBatchId);null===a&&(a=sL(),i=i.insert(o.largestBatchId,a)),a.set(o.getKey(),o)}}let l=sL(),u=i.getIterator();for(;u.hasNext()&&(u.getNext().value.forEach((e,t)=>l.set(e,t)),!(l.size()>=r)););return rT.resolve(l)}ue(e,t,n){let r=this.overlays.get(n.key);if(null!==r){let i=this.es.get(r.largestBatchId).delete(n.key);this.es.set(r.largestBatchId,i)}this.overlays=this.overlays.insert(n.key,new oV(t,n));let s=this.es.get(t);void 0===s&&(s=s$(),this.es.set(t,s)),this.es.set(t,s.add(n.key))}}/** 2332 * @license 2333 * Copyright 2017 Google LLC 2334 * 2335 * Licensed under the Apache License, Version 2.0 (the "License"); 2336 * you may not use this file except in compliance with the License. 2337 * You may obtain a copy of the License at 2338 * 2339 * http://www.apache.org/licenses/LICENSE-2.0 2340 * 2341 * Unless required by applicable law or agreed to in writing, software 2342 * distributed under the License is distributed on an "AS IS" BASIS, 2343 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2344 * See the License for the specific language governing permissions and 2345 * limitations under the License. 2346 */ class aQ{constructor(){this.ns=new rz(aX.ss),this.rs=new rz(aX.os)}isEmpty(){return this.ns.isEmpty()}addReference(e,t){let n=new aX(e,t);this.ns=this.ns.add(n),this.rs=this.rs.add(n)}us(e,t){e.forEach(e=>this.addReference(e,t))}removeReference(e,t){this.cs(new aX(e,t))}hs(e,t){e.forEach(e=>this.removeReference(e,t))}ls(e){let t=new rd(new ru([])),n=new aX(t,e),r=new aX(t,e+1),i=[];return this.rs.forEachInRange([n,r],e=>{this.cs(e),i.push(e.key)}),i}fs(){this.ns.forEach(e=>this.cs(e))}cs(e){this.ns=this.ns.delete(e),this.rs=this.rs.delete(e)}ds(e){let t=new rd(new ru([])),n=new aX(t,e),r=new aX(t,e+1),i=s$();return this.rs.forEachInRange([n,r],e=>{i=i.add(e.key)}),i}containsKey(e){let t=new aX(e,0),n=this.ns.firstAfterOrEqual(t);return null!==n&&e.isEqual(n.key)}}class aX{constructor(e,t){this.key=e,this._s=t}static ss(e,t){return rd.comparator(e.key,t.key)||rr(e._s,t._s)}static os(e,t){return rr(e._s,t._s)||rd.comparator(e.key,t.key)}}/** 2347 * @license 2348 * Copyright 2017 Google LLC 2349 * 2350 * Licensed under the Apache License, Version 2.0 (the "License"); 2351 * you may not use this file except in compliance with the License. 2352 * You may obtain a copy of the License at 2353 * 2354 * http://www.apache.org/licenses/LICENSE-2.0 2355 * 2356 * Unless required by applicable law or agreed to in writing, software 2357 * distributed under the License is distributed on an "AS IS" BASIS, 2358 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2359 * See the License for the specific language governing permissions and 2360 * limitations under the License. 2361 */ class aJ{constructor(e,t){this.indexManager=e,this.referenceDelegate=t,this.mutationQueue=[],this.ws=1,this.gs=new rz(aX.ss)}checkEmpty(e){return rT.resolve(0===this.mutationQueue.length)}addMutationBatch(e,t,n,r){let i=this.ws;this.ws++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];let s=new oZ(i,t,n,r);for(let o of(this.mutationQueue.push(s),r))this.gs=this.gs.add(new aX(o.key,i)),this.indexManager.addToCollectionParentIndex(e,o.key.path.popLast());return rT.resolve(s)}lookupMutationBatch(e,t){return rT.resolve(this.ys(t))}getNextMutationBatchAfterBatchId(e,t){let n=this.ps(t+1),r=n<0?0:n;return rT.resolve(this.mutationQueue.length>r?this.mutationQueue[r]:null)}getHighestUnacknowledgedBatchId(){return rT.resolve(0===this.mutation
2361Queue.length?-1:this.ws-1)}getAllMutationBatches(e){return rT.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(e,t){let n=new aX(t,0),r=new aX(t,Number.POSITIVE_INFINITY),i=[];return this.gs.forEachInRange([n,r],e=>{let t=this.ys(e._s);i.push(t)}),rT.resolve(i)}getAllMutationBatchesAffectingDocumentKeys(e,t){let n=new rz(rr);return t.forEach(e=>{let t=new aX(e,0),r=new aX(e,Number.POSITIVE_INFINITY);this.gs.forEachInRange([t,r],e=>{n=n.add(e._s)})}),rT.resolve(this.Is(n))}getAllMutationBatchesAffectingQuery(e,t){let n=t.path,r=n.length+1,i=n;rd.isDocumentKey(i)||(i=i.child(""));let s=new aX(new rd(i),0),o=new rz(rr);return this.gs.forEachWhile(e=>{let t=e.key.path;return!!n.isPrefixOf(t)&&(t.length===r&&(o=o.add(e._s)),!0)},s),rT.resolve(this.Is(o))}Is(e){let t=[];return e.forEach(e=>{let n=this.ys(e);null!==n&&t.push(n)}),t}removeMutationBatch(e,t){var n;0===this.Ts(t.batchId,"removed")||nX(),this.mutationQueue.shift();let r=this.gs;return rT.forEach(t.mutations,n=>{let i=new aX(n.key,t.batchId);return r=r.delete(i),this.referenceDelegate.markPotentiallyOrphaned(e,n.key)}).next(()=>{this.gs=r})}An(e){}containsKey(e,t){let n=new aX(t,0),r=this.gs.firstAfterOrEqual(n);return rT.resolve(t.isEqual(r&&r.key))}performConsistencyCheck(e){return this.mutationQueue.length,rT.resolve()}Ts(e,t){return this.ps(e)}ps(e){return 0===this.mutationQueue.length?0:e-this.mutationQueue[0].batchId}ys(e){let t=this.ps(e);return t<0||t>=this.mutationQueue.length?null:this.mutationQueue[t]}}/** 2362 * @license 2363 * Copyright 2017 Google LLC 2364 * 2365 * Licensed under the Apache License, Version 2.0 (the "License"); 2366 * you may not use this file except in compliance with the License. 2367 * You may obtain a copy of the License at 2368 * 2369 * http://www.apache.org/licenses/LICENSE-2.0 2370 * 2371 * Unless required by applicable law or agreed to in writing, software 2372 * distributed under the License is distributed on an "AS IS" BASIS, 2373 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2374 * See the License for the specific language governing permissions and 2375 * limitations under the License. 2376 */ class a0{constructor(e){this.Es=e,this.docs=new rZ(rd.comparator),this.size=0}setIndexManager(e){this.indexManager=e}addEntry(e,t){let n=t.key,r=this.docs.get(n),i=r?r.size:0,s=this.Es(t);return this.docs=this.docs.insert(n,{document:t.mutableCopy(),size:s}),this.size+=s-i,this.indexManager.addToCollectionParentIndex(e,n.path.popLast())}removeEntry(e){let t=this.docs.get(e);t&&(this.docs=this.docs.remove(e),this.size-=t.size)}getEntry(e,t){let n=this.docs.get(t);return rT.resolve(n?n.document.mutableCopy():iw.newInvalidDocument(t))}getEntries(e,t){let n=sN;return t.forEach(e=>{let t=this.docs.get(e);n=n.insert(e,t?t.document.mutableCopy():iw.newInvalidDocument(e))}),rT.resolve(n)}getAllFromCollection(e,t,n){let r=sN,i=new rd(t.child("")),s=this.docs.getIteratorFrom(i);for(;s.hasNext();){let{key:o,value:{document:a}}=s.getNext();if(!t.isPrefixOf(o.path))break;o.path.length>t.length+1||0>=rw(r_(a),n)||(r=r.insert(a.key,a.mutableCopy()))}return rT.resolve(r)}getAllFromCollectionGroup(e,t,n,r){nX()}As(e,t){return rT.forEach(this.docs,e=>t(e))}newChangeBuffer(e){return new a1(this)}getSize(e){return rT.resolve(this.size)}}class a1 extends aj{constructor(e){super(),this.Yn=e}applyChanges(e){let t=[];
vendor: 4,854 bytes, lines 2376-2406
2376return this.changes.forEach((n,r)=>{r.isValidDocument()?t.push(this.Yn.addEntry(e,r)):this.Yn.removeEntry(n)}),rT.waitFor(t)}getFromCache(e,t){return this.Yn.getEntry(e,t)}getAllFromCache(e,t){return this.Yn.getEntries(e,t)}}/** 2377 * @license 2378 * Copyright 2017 Google LLC 2379 * 2380 * Licensed under the Apache License, Version 2.0 (the "License"); 2381 * you may not use this file except in compliance with the License. 2382 * You may obtain a copy of the License at 2383 * 2384 * http://www.apache.org/licenses/LICENSE-2.0 2385 * 2386 * Unless required by applicable law or agreed to in writing, software 2387 * distributed under the License is distributed on an "AS IS" BASIS, 2388 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2389 * See the License for the specific language governing permissions and 2390 * limitations under the License. 2391 */ class a2{constructor(e){this.persistence=e,this.Rs=new sD(e=>iS(e),iT),this.lastRemoteSnapshotVersion=ra.min(),this.highestTargetId=0,this.bs=0,this.Ps=new aQ,this.targetCount=0,this.vs=ak.Pn()}forEachTarget(e,t){return this.Rs.forEach((e,n)=>t(n)),rT.resolve()}getLastRemoteSnapshotVersion(e){return rT.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(e){return rT.resolve(this.bs)}allocateTargetId(e){return this.highestTargetId=this.vs.next(),rT.resolve(this.highestTargetId)}setTargetsMetadata(e,t,n){return n&&(this.lastRemoteSnapshotVersion=n),t>this.bs&&(this.bs=t),rT.resolve()}Dn(e){this.Rs.set(e.target,e);let t=e.targetId;t>this.highestTargetId&&(this.vs=new ak(t),this.highestTargetId=t),e.sequenceNumber>this.bs&&(this.bs=e.sequenceNumber)}addTargetData(e,t){return this.Dn(t),this.targetCount+=1,rT.resolve()}updateTargetData(e,t){return this.Dn(t),rT.resolve()}removeTargetData(e,t){return this.Rs.delete(t.target),this.Ps.ls(t.targetId),this.targetCount-=1,rT.resolve()}removeTargets(e,t,n){let r=0,i=[];return this.Rs.forEach((s,o)=>{o.sequenceNumber<=t&&null===n.get(o.targetId)&&(this.Rs.delete(s),i.push(this.removeMatchingKeysForTargetId(e,o.targetId)),r++)}),rT.waitFor(i).next(()=>r)}getTargetCount(e){return rT.resolve(this.targetCount)}getTargetData(e,t){let n=this.Rs.get(t)||null;return rT.resolve(n)}addMatchingKeys(e,t,n){return this.Ps.us(t,n),rT.resolve()}removeMatchingKeys(e,t,n){this.Ps.hs(t,n);let r=this.persistence.referenceDelegate,i=[];return r&&t.forEach(t=>{i.push(r.markPotentiallyOrphaned(e,t))}),rT.waitFor(i)}removeMatchingKeysForTargetId(e,t){return this.Ps.ls(t),rT.resolve()}getMatchingKeysForTargetId(e,t){let n=this.Ps.ds(t);return rT.resolve(n)}containsKey(e,t){return rT.resolve(this.Ps.containsKey(t))}}/** 2392 * @license 2393 * Copyright 2017 Google LLC 2394 * 2395 * Licensed under the Apache License, Version 2.0 (the "License"); 2396 * you may not use this file except in compliance with the License. 2397 * You may obtain a copy of the License at 2398 * 2399 * http://www.apache.org/licenses/LICENSE-2.0 2400 * 2401 * Unless required by applicable law or agreed to in writing, software 2402 * distributed under the License is distributed on an "AS IS" BASIS, 2403 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2404 * See the License for the specific language governing permissions and 2405 * limitations under the License. 2406 */ class a4{constructor(e,t){var n;this.Vs={},this.overlays={},this.Ss=new rL(0),this.Ds=!1,this.Ds=!0,this.referenceDelegate=e(this),this.Cs=new a2(this),this.indexManager=new au,this.remoteDocumentCache=(n=e=>this.referenceDelegate.xs(e),new a0(n)),this.It=new oq(t),this.Ns=new aK(this.It)}start(){return Promise.resolve()}shutdown(){return this.Ds=!1,Promise.resolve()}get started(){return this.Ds}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(e){return this.indexManager}getDocumentOverlayCache(e){let t=this.overlays[e.toKey()];return t||(t=new aY,this.overlays[e.toKey()]=t),t}getMutationQueue(e,t){let n=this.Vs[e.toKey()];return n||(n=new aJ(t,this.referenceDelegate),this.Vs[e.toKey()]=n),n}getTargetCache(){return this.Cs}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.Ns}runTransaction(e,t,n){nH("MemoryPersistence","Starting transaction:",e);let r=new a5(this.Ss.next());return this.referenceDelegate.ks(),n(r).next(e=>this.referenceDelegate.Os(r).next(()=>e)).toPromise().then(e=>(r.raiseOnCommittedEvent(),e))}Ms(e,t){return rT.or(Object.values(this.Vs).map(n=>()=>n.containsKey(e,t)))}}class a5 extends rx{constructor(e){super(),this.currentSequenceNumber=e}}class a3{constructor(e){this.persistence=e,this.Fs=new aQ,this.$s=null}static Bs(e){return new a3(e)}get Ls(){if(this.$s)return this.$s;throw nX()}addReference(e,t,n){return this.Fs.addReference(n,t),this.Ls.delete(n.toString()),rT.resolve()}removeReference(e,t,n){return this.Fs.removeReference(n,t),this.Ls.add(n.toString()),rT.resolve()}markPotentiallyOrphaned(e,t){return this.Ls.add(t.toString()),rT.resolve()}
2406removeTarget(e,t){this.Fs.ls(t.targetId).forEach(e=>this.Ls.add(e.toString()));let n=this.persistence.getTargetCache();return n.getMatchingKeysForTargetId(e,t.targetId).next(e=>{e.forEach(e=>this.Ls.add(e.toString()))}).next(()=>n.removeTargetData(e,t))}ks(){this.$s=new Set}Os(e){let t=this.persistence.getRemoteDocumentCache().newChangeBuffer();return rT.forEach(this.Ls,n=>{let r=rd.fromPath(n);return this.Us(e,r).next(e=>{e||t.removeEntry(r,ra.min())})}).next(()=>(this.$s=null,t.apply(e)))}updateLimboDocument(e,t){return this.Us(e,t).next(e=>{e?this.Ls.delete(t.toString()):this.Ls.add(t.toString())})}xs(e){return 0}Us(e,t){return rT.or([()=>rT.resolve(this.Fs.containsKey(t)),()=>this.persistence.getTargetCache().containsKey(e,t),()=>this.persistence.Ms(e,t)])}}/** 2407 * @license 2408 * Copyright 2020 Google LLC 2409 * 2410 * Licensed under the Apache License, Version 2.0 (the "License"); 2411 * you may not use this file except in compliance with the License. 2412 * You may obtain a copy of the License at 2413 * 2414 * http://www.apache.org/licenses/LICENSE-2.0 2415 * 2416 * Unless required by applicable law or agreed to in writing, software 2417 * distributed under the License is distributed on an "AS IS" BASIS, 2418 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2419 * See the License for the specific language governing permissions and 2420 * limitations under the License. 2421 */ class a6{constructor(e){this.It=e}$(e,t,n,r){var i,s;let o=new rI("createOrUpgrade",t);n<1&&r>=1&&(function(e){e.createObjectStore("owner")}(e),e.createObjectStore("mutationQueues",{keyPath:"userId"}),e.createObjectStore("mutations",{keyPath:"batchId",autoIncrement:!0}).createIndex("userMutationsIndex",oy,{unique:!0}),e.createObjectStore("documentMutations"),a8(e),function(e){e.createObjectStore("remoteDocuments")}(e));let a=rT.resolve();return n<3&&r>=3&&(0!==n&&(e.deleteObjectStore("targetDocuments"),e.deleteObjectStore("targets"),e.deleteObjectStore("targetGlobal"),a8(e)),a=a.next(()=>(function(e){let t=e.store("targetGlobal"),n={highestTargetId:0,highestListenSequenceNumber:0,lastRemoteSnapshotVersion:ra.min().toTimestamp(),targetCount:0};return t.put("targetGlobalKey",n)})(o))),n<4&&r>=4&&(0!==n&&(a=a.next(()=>{var t,n;return o.store("mutations").W().next(t=>{e.deleteObjectStore("mutations"),e.createObjectStore("mutations",{keyPath:"batchId",autoIncrement:!0}).createIndex("userMutationsIndex",oy,{unique:!0});let n=o.store("mutations"),r=t.map(e=>n.put(e));return rT.waitFor(r)})})),a=a.next(()=>{!function(e){e.createObjectStore("clientMetadata",{keyPath:"clientId"})}(e)})),n<5&&r>=5&&(a=a.next(()=>this.qs(o))),n<6&&r>=6&&(a=a.next(()=>((function(e){e.createObjectStore("remoteDocumentGlobal")})(e),this.Ks(o)))),n<7&&r>=7&&(a=a.next(()=>this.Gs(o))),n<8&&r>=8&&(a=a.next(()=>this.Qs(e,o))),n<9&&r>=9&&(a=a.next(()=>{var t;e.objectStoreNames.contains("remoteDocumentChanges")&&e.deleteObjectStore("remoteDocumentChanges")})),n<10&&r>=10&&(a=a.next(()=>this.js(o))),n<11&&r>=11&&(a=a.next(()=>{(function(e){e.createObjectStore("bundles",{keyPath:"bundleId"})})(e),function(e){e.createObjectStore("namedQueries",{keyPath:"name"})}(e)})),n<12&&r>=12&&(a=a.next(()=>{!function(e){let t=e.createObjectStore("documentOverlays",{keyPath:oD});t.createIndex("collectionPathOverlayIndex",oN,{unique:!1}),t.createIndex("collectionGroupOverlayIndex",oP,{unique:!1})}(e)})),n<13&&r>=13&&(a=a.next(()=>(function(e){let t=e.createObjectStore("remoteDocumentsV14",{keyPath:ow});t.createIndex("documentKeyIndex",oE),t.createIndex("collectionGroupIndex",ox)})(e)).next(()=>this.Ws(e,o)).next(()=>e.deleteObjectStore("remoteDocuments"))),n<14&&r>=14&&(a=a.next(()=>this.zs(e,o))),n<15&&r>=15&&(a=a.next(()=>{var t;e.createObjectStore("indexConfiguration",{keyPath:"indexId",autoIncrement:!0}).createIndex("collectionGroupIndex","collectionGroup",{unique:!1}),e.createObjectStore("indexState",{keyPath:oC}).createIndex("sequenceNumberIndex",oR,{unique:!1}),e.createObjectStore("indexEntries",{keyPath:oA}).createIndex("documentKeyIndex",oO,{unique:!1})})),a}Ks(e){let t=0;return e.store("remoteDocuments").Z((e,n)=>{t+=aw(n)}).next(()=>e.store("remoteDocumentGlobal").put("remoteDocumentGlobalKey",{byteSize:t}))}
2421qs(e){let t=e.store("mutationQueues"),n=e.store("mutations");return t.W().next(t=>rT.forEach(t,t=>{let r=IDBKeyRange.bound([t.userId,-1],[t.userId,t.lastAcknowledgedBatchId]);return n.W("userMutationsIndex",r).next(n=>rT.forEach(n,n=>{var r;(r=n.userId===t.userId)||nX();let i=oY(this.It,n);return ab(e,t.userId,i).next(()=>{})}))}))}Gs(e){let t=e.store("targetDocuments"),n=e.store("remoteDocuments");return e.store("targetGlobal").get("targetGlobalKey").next(e=>{let r=[];return n.Z((n,i)=>{var s;let o=new ru(n),a=[0,of(o)];r.push(t.get(a).next(n=>{var r;return n?rT.resolve():t.put({targetId:0,path:of(o),sequenceNumber:e.highestListenSequenceNumber})}))}).next(()=>rT.waitFor(r))})}Qs(e,t){e.createObjectStore("collectionParents",{keyPath:ok});let n=t.store("collectionParents"),r=new ac,i=e=>{if(r.add(e)){let t=e.lastSegment(),i=e.popLast();return n.put({collectionId:t,parent:of(i)})}};return t.store("remoteDocuments").Z({X:!0},(e,t)=>{let n=new ru(e);return i(n.popLast())}).next(()=>t.store("documentMutations").Z({X:!0},([e,t,n],r)=>{let s=og(t);return i(s.popLast())}))}js(e){let t=e.store("targets");return t.Z((e,n)=>{let r=oQ(n),i=oX(this.It,r);return t.put(i)})}Ws(e,t){let n=t.store("remoteDocuments"),r=[];return n.Z((e,n)=>{let i=t.store("remoteDocumentsV14"),s=(n.document?new rd(ru.fromString(n.document.name).popFirst(5)):n.noDocument?rd.fromSegments(n.noDocument.path):n.unknownDocument?rd.fromSegments(n.unknownDocument.path):nX()).path.toArray(),o={prefixPath:s.slice(0,s.length-2),collectionGroup:s[s.length-2],documentId:s[s.length-1],readTime:n.readTime||[0,0],unknownDocument:n.unknownDocument,noDocument:n.noDocument,document:n.document,hasCommittedMutations:!!n.hasCommittedMutations};r.push(i.put(o))}).next(()=>rT.waitFor(r))}zs(e,t){let n=t.store("mutations"),r=aB(this.It),i=new a4(a3.Bs,this.It.re);return n.W().next(e=>{let n=new Map;return e.forEach(e=>{var t;let r=null!==(t=n.get(e.userId))&&void 0!==t?t:s$();oY(this.It,e).keys().forEach(e=>r=r.add(e)),n.set(e.userId,r)}),rT.forEach(n,(e,n)=>{let s=new nV(n),o=o6.oe(this.It,s),a=i.getIndexManager(s),l=aE.oe(s,this.It,a,i.referenceDelegate);return new aH(r,l,o,a).recalculateAndSaveOverlaysForDocumentKeys(new oU(t,rL.at),e).next()})})}}function a8(e){e.createObjectStore("targetDocuments",{keyPath:oT}).createIndex("documentTargetsIndex",oI,{unique:!0}),e.createObjectStore("targets",{keyPath:"targetId"}).createIndex("queryTargetsIndex",oS,{unique:!0}),e.createObjectStore("targetGlobal")}let a7="Failed to obtain exclusive access to the persistence layer. To allow shared access, multi-tab synchronization has to be enabled in all tabs. If you are using `experimentalForceOwningTab:true`, make sure that only one tab has persistence enabled at any given time.";class a9{constructor(e,t,n,r,i,s,o,a,l,u,c=15){if(this.allowTabSynchronization=e,this.persistenceKey=t,this.clientId=n,this.Hs=i,this.window=s,this.document=o,this.Js=l,this.Ys=u,this.Xs=c,this.Ss=null,this.Ds=!1,this.isPrimary=!1,this.networkEnabled=!0,this.Zs=null,this.inForeground=!1,this.ti=null,this.ei=null,this.ni=Number.NEGATIVE_INFINITY,this.si=e=>Promise.resolve(),!a9.C())throw new n1(n0.UNIMPLEMENTED,"This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.");this.referenceDelegate=new aM(this,r),this.ii=t+"main",this.It=new oq(a),this.ri=new rk(this.ii,this.Xs,new a6(this.It)),this.Cs=new aC(this.referenceDelegate,this.It),this.remoteDocumentCache=aB(this.It),this.Ns=new o4,this.window&&this.window.localStorage?this.oi=this.window.localStorage:(this.oi=null,!1===u&&nK("IndexedDbPersistence","LocalStorage is unavailable. As a result, persistence may not work reliably. In particular enablePersistence() could fail immediately after refreshing the page."))}start(){return this.ui().then(()=>{if(!this.isPrimary&&!this.allowTabSynchronization)throw new n1(n0.FAILED_PRECONDITION,a7);return this.ci(),this.ai(),this.hi(),this.runTransaction("getHighestListenSequenceNumber","readonly",e=>this.Cs.getHighestSequenceNumber(e))}).then(e=>{this.Ss=new rL(e,this.Js)}).then(()=>{this.Ds=!0}).catch(e=>(this.ri&&this.ri.close(),Promise.reject(e)))}li(e){return this.si=async t=>{if(this.started)return e(t)},e(this.isPrimary)}setDatabaseDeletedListener(e){this.ri.L(async t=>{null===t.newVersion&&await e()})}setNetworkEnabled(e){this.networkEnabled!==e&&(this.networkEnabled=e,this.Hs.enqueueAndForget(async()=>{this.started&&await this.ui()}))}ui(){return this.runTransaction("updateClientMetadataAndTryBecomePrimary","readwrite",e=>lt(e).put({clientId:this.clientId,updateTimeMs:Date.now(),networkEnabled:this.networkEnabled,inForeground:this.inForeground}).next(()=>{if(this.isPrimary)return this.fi(e).next(e=>{e||(this.isPrimary=!1,this.Hs.enqueueRetryable(()=>this.si(!1)))})}).next(()=>this.di(e)).next(t=>this.isPrimary&&!t?this._i(e).next(()=>!1):!!t&&this.wi(e).next(()=>!0))).catch(e=>{if(rA(e))return nH("IndexedDbPersistence","Failed to extend owner lease: ",e),this.isPrimary;if(!this.allowTabSynchronization)throw e;return nH("IndexedDbPersistence","Releasing owner lease after error during lease refresh",e),!1}).then(e=>{this.isPrimary!==e&&this.Hs.enqueueRetryable(()=>this.si(e)),this.isPrimary=e})}fi(e){return le(e).get("owner").next(e=>rT.resolve(this.mi(e)))}gi(e){return lt(e).delete(this.clientId)}async yi(){if(this.isPrimary&&!this.pi(this.ni,18e5)){this.ni=Date.now();let e=await this.runTransaction("maybeGarbageCollectMultiClientState","readwrite-primary",e=>
2421{let t=oB(e,"clientMetadata");return t.W().next(e=>{let n=this.Ii(e,18e5),r=e.filter(e=>-1===n.indexOf(e));return rT.forEach(r,e=>t.delete(e.clientId)).next(()=>r)})}).catch(()=>[]);if(this.oi)for(let t of e)this.oi.removeItem(this.Ti(t.clientId))}}hi(){this.ei=this.Hs.enqueueAfterDelay("client_metadata_refresh",4e3,()=>this.ui().then(()=>this.yi()).then(()=>this.hi()))}mi(e){return!!e&&e.ownerId===this.clientId}di(e){return this.Ys?rT.resolve(!0):le(e).get("owner").next(t=>{if(null!==t&&this.pi(t.leaseTimestampMs,5e3)&&!this.Ei(t.ownerId)){if(this.mi(t)&&this.networkEnabled)return!0;if(!this.mi(t)){if(!t.allowTabSynchronization)throw new n1(n0.FAILED_PRECONDITION,a7);return!1}}return!(!this.networkEnabled||!this.inForeground)||lt(e).W().next(e=>void 0===this.Ii(e,5e3).find(e=>{if(this.clientId!==e.clientId){let t=!this.networkEnabled&&e.networkEnabled,n=!this.inForeground&&e.inForeground,r=this.networkEnabled===e.networkEnabled;if(t||n&&r)return!0}return!1}))}).next(e=>(this.isPrimary!==e&&nH("IndexedDbPersistence",`Client ${e?"is":"is not"} eligible for a primary lease.`),e))}async shutdown(){this.Ds=!1,this.Ai(),this.ei&&(this.ei.cancel(),this.ei=null),this.Ri(),this.bi(),await this.ri.runTransaction("shutdown","readwrite",["owner","clientMetadata"],e=>{let t=new oU(e,rL.at);return this._i(t).next(()=>this.gi(t))}),this.ri.close(),this.Pi()}Ii(e,t){return e.filter(e=>this.pi(e.updateTimeMs,t)&&!this.Ei(e.clientId))}vi(){return this.runTransaction("getActiveClients","readonly",e=>lt(e).W().next(e=>this.Ii(e,18e5).map(e=>e.clientId)))}get started(){return this.Ds}getMutationQueue(e,t){return aE.oe(e,this.It,t,this.referenceDelegate)}getTargetCache(){return this.Cs}getRemoteDocumentCache(){return this.remoteDocumentCache}getIndexManager(e){return new ad(e,this.It.re.databaseId)}getDocumentOverlayCache(e){return o6.oe(this.It,e)}getBundleCache(){return this.Ns}runTransaction(e,t,n){var r;nH("IndexedDbPersistence","Starting transaction:",e);let i=15===(r=this.Xs)?oj:14===r?oL:13===r?oL:12===r?oM:11===r?oF:void nX(),s;return this.ri.runTransaction(e,"readonly"===t?"readonly":"readwrite",i,r=>(s=new oU(r,this.Ss?this.Ss.next():rL.at),"readwrite-primary"===t?this.fi(s).next(e=>!!e||this.di(s)).next(t=>{if(!t)throw nK(`Failed to obtain primary lease for action '${e}'.`),this.isPrimary=!1,this.Hs.enqueueRetryable(()=>this.si(!1)),new n1(n0.FAILED_PRECONDITION,rE);return n(s)}).next(e=>this.wi(s).next(()=>e)):this.Vi(s).next(()=>n(s)))).then(e=>(s.raiseOnCommittedEvent(),e))}Vi(e){return le(e).get("owner").next(e=>{if(null!==e&&this.pi(e.leaseTimestampMs,5e3)&&!this.Ei(e.ownerId)&&!this.mi(e)&&!(this.Ys||this.allowTabSynchronization&&e.allowTabSynchronization))throw new n1(n0.FAILED_PRECONDITION,a7)})}wi(e){let t={ownerId:this.clientId,allowTabSynchronization:this.allowTabSynchronization,leaseTimestampMs:Date.now()};return le(e).put("owner",t)}static C(){return rk.C()}_i(e){let t=le(e);return t.get("owner").next(e=>this.mi(e)?(nH("IndexedDbPersistence","Releasing primary lease."),t.delete("owner")):rT.resolve())}pi(e,t){let n=Date.now();return!(e<n-t)&&(!(e>n)||(nK(`Detected an update time that is in the future: ${e} > ${n}`),!1))}ci(){null!==this.document&&"function"==typeof this.document.addEventListener&&(this.ti=()=>{this.Hs.enqueueAndForget(()=>(this.inForeground="visible"===this.document.visibilityState,this.ui()))},this.document.addEventListener("visibilitychange",this.ti),this.inForeground="visible"===this.document.visibilityState)}Ri(){this.ti&&(this.document.removeEventListener("visibilitychange",this.ti),this.ti=null)}ai(){var e;"function"==typeof(null===(e=this.window)||void 0===e?void 0:e.addEventListener)&&(this.Zs=()=>{this.Ai(),(0,m.G6)()&&navigator.appVersion.match(/Version\/1[45]/)&&this.Hs.enterRestrictedMode(!0),this.Hs.enqueueAndForget(()=>this.shutdown())},this.window.addEventListener("pagehide",this.Zs))}bi(){this.Zs&&(this.window.removeEventListener("pagehide",this.Zs),this.Zs=null)}Ei(e){var t;try{let n=null!==(null===(t=this.oi)||void 0===t?void 0:t.getItem(this.Ti(e)));return nH("IndexedDbPersistence",`Client '${e}' ${n?"is":"is not"} zombied in LocalStorage`),n}catch(r){return nK("IndexedDbPersistence","Failed to get zombied client id.",r),!1}}Ai(){if(this.oi)try{this.oi.setItem(this.Ti(this.clientId),String(Date.now()))}catch(e){nK("Failed to set zombie client id.",e)}}Pi(){if(this.oi)try{this.oi.removeItem(this.Ti(this.clientId))}catch(e){}}Ti(e){return`firestore_zombie_${this.persistenceKey}_${e}`}}function le(e){return oB(e,"owner")}function lt(e){return oB(e,"clientMetadata")}function ln(e,t){let n=e.projectId;return e.isDefaultDatabase||(n+="."+e.database),"firestore/"+t+"/"+n+"/"}/** 2422 * @license 2423 * Copyright 2017 Google LLC 2424 * 2425 * Licensed under the Apache License, Version 2.0 (the "License");
2426 * you may not use this file except in compliance with the License. 2427 * You may obtain a copy of the License at 2428 * 2429 * http://www.apache.org/licenses/LICENSE-2.0 2430 * 2431 * Unless required by applicable law or agreed to in writing, software 2432 * distributed under the License is distributed on an "AS IS" BASIS, 2433 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2434 * See the License for the specific language governing permissions and 2435 * limitations under the License. 2436 */ class lr{constructor(e,t,n,r){this.targetId=e,this.fromCache=t,this.Si=n,this.Di=r}static Ci(e,t){let n=s$(),r=s$();for(let i of t.docChanges)switch(i.type){case 0:n=n.add(i.doc.key);break;case 1:r=r.add(i.doc.key)}return new lr(e,t.fromCache,n,r)}}/** 2437 * @license 2438 * Copyright 2019 Google LLC 2439 * 2440 * Licensed under the Apache License, Version 2.0 (the "License"); 2441 * you may not use this file except in compliance with the License. 2442 * You may obtain a copy of the License at 2443 * 2444 * http://www.apache.org/licenses/LICENSE-2.0 2445 * 2446 * Unless required by applicable law or agreed to in writing, software 2447 * distributed under the License is distributed on an "AS IS" BASIS, 2448 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2449 * See the License for the specific language governing permissions and 2450 * limitations under the License. 2451 */ class li{constructor(){this.xi=!1}initialize(e,t){this.Ni=e,this.indexManager=t,this.xi=!0}getDocumentsMatchingQuery(e,t,n,r){return this.ki(e,t).next(i=>i||this.Oi(e,t,r,n)).next(n=>n||this.Mi(e,t))}ki(e,t){if(iW(t))return rT.resolve(null);let n=iX(t);return this.indexManager.getIndexType(e,n).next(r=>0===r?null:(null!==t.limit&&1===r&&(t=iJ(t,null,"F"),n=iX(t)),this.indexManager.getDocumentsMatchingTarget(e,n).next(r=>{let i=s$(...r);return this.Ni.getDocuments(e,i).next(r=>this.indexManager.getMinOffset(e,n).next(n=>{let s=this.Fi(t,r);return this.$i(t,s,i,n.readTime)?this.ki(e,iJ(t,null,"F")):this.Bi(e,s,t,n)}))})))}Oi(e,t,n,r){return iW(t)||r.isEqual(ra.min())?this.Mi(e,t):this.Ni.getDocuments(e,n).next(i=>{let s=this.Fi(t,i);return this.$i(t,s,n,r)?this.Mi(e,t):(nG()<=p.in.DEBUG&&nH("QueryEngine","Re-using previous result from %s to execute query: %s",r.toString(),i2(t)),this.Bi(e,s,t,rv(r,-1)))})}Fi(e,t){let n=new rz(i3(e));return t.forEach((t,r)=>{i4(e,r)&&(n=n.add(r))}),n}$i(e,t,n,r){if(null===e.limit)return!1;if(n.size!==t.size)return!0;let i="F"===e.limitType?t.last():t.first();return!!i&&(i.hasPendingWrites||i.version.compareTo(r)>0)}Mi(e,t){return nG()<=p.in.DEBUG&&nH("QueryEngine","Using full collection scan to execute query:",i2(t)),this.Ni.getDocumentsMatchingQuery(e,t,rb.min())}Bi(e,t,n,r){return this.Ni.getDocumentsMatchingQuery(e,n,r).next(e=>(t.forEach(t=>{e=e.insert(t.key,t)}),e))}}/** 2452 * @license 2453 * Copyright 2020 Google LLC 2454 * 2455 * Licensed under the Apache License, Version 2.0 (the "License"); 2456 * you may not use this file except in compliance with the License. 2457 * You may obtain a copy of the License at 2458 * 2459 * http://www.apache.org/licenses/LICENSE-2.0 2460 * 2461 * Unless required by applicable law or agreed to in writing, software 2462 * distributed under the License is distributed on an "AS IS" BASIS, 2463 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2464 * See the License for the specific language governing permissions and 2465 * limitations under the License. 2466 */ class ls{constructor(e,t,n,r){this.persistence=e,this.Li=t,this.It=r,this.Ui=new rZ(rr),this.qi=new sD(e=>iS(e),iT),this.Ki=new Map,this.Gi=e.getRemoteDocumentCache(),this.Cs=e.getTargetCache(),this.Ns=e.getBundleCache(),this.Qi(n)}Qi(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutationQueue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new aH(this.Gi,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.Gi.setIndexManager(this.indexManager),this.Li.initialize(this.localDocuments,this.indexManager)}collectGarbage(e){return this.persistence.runTransaction("Collect garbage","readwrite-primary",t=>e.collect(t,this.Ui))}}function lo(e,t,n,r){return new ls(e,t,n,r)}async function la(e,t){var n;return await e.persistence.runTransaction("Handle user change","readonly",n=>{let r;
2466return e.mutationQueue.getAllMutationBatches(n).next(i=>(r=i,e.Qi(t),e.mutationQueue.getAllMutationBatches(n))).next(t=>{let i=[],s=[],o=s$();for(let a of r)for(let l of(i.push(a.batchId),a.mutations))o=o.add(l.key);for(let u of t)for(let c of(s.push(u.batchId),u.mutations))o=o.add(c.key);return e.localDocuments.getDocuments(n,o).next(e=>({ji:e,removedBatchIds:i,addedBatchIds:s}))})})}function ll(e){var t;return e.persistence.runTransaction("Get last remote snapshot version","readonly",t=>e.Cs.getLastRemoteSnapshotVersion(t))}function lu(e,t,n){let r=s$(),i=s$();return n.forEach(e=>r=r.add(e)),t.getEntries(e,r).next(e=>{let r=sN;return n.forEach((n,s)=>{let o=e.get(n);s.isFoundDocument()!==o.isFoundDocument()&&(i=i.add(n)),s.isNoDocument()&&s.version.isEqual(ra.min())?(t.removeEntry(n,s.readTime),r=r.insert(n,s)):!o.isValidDocument()||s.version.compareTo(o.version)>0||0===s.version.compareTo(o.version)&&o.hasPendingWrites?(t.addEntry(s),r=r.insert(n,s)):nH("LocalStore","Ignoring outdated watch update for ",n,". Current version:",o.version," Watch version:",s.version)}),{Wi:r,zi:i}})}function lc(e,t){var n;return e.persistence.runTransaction("Get next mutation batch","readonly",n=>(void 0===t&&(t=-1),e.mutationQueue.getNextMutationBatchAfterBatchId(n,t)))}function lh(e,t){var n;let r=e;return r.persistence.runTransaction("Allocate target","readwrite",e=>{let n;return r.Cs.getTargetData(e,t).next(i=>i?(n=i,rT.resolve(n)):r.Cs.allocateTargetId(e).next(i=>(n=new oz(t,i,0,e.currentSequenceNumber),r.Cs.addTargetData(e,n).next(()=>n))))}).then(e=>{let n=r.Ui.get(e.targetId);return(null===n||e.snapshotVersion.compareTo(n.snapshotVersion)>0)&&(r.Ui=r.Ui.insert(e.targetId,e),r.qi.set(t,e.targetId)),e})}async function ld(e,t,n){var r;let i=e,s=i.Ui.get(t);try{n||await i.persistence.runTransaction("Release target",n?"readwrite":"readwrite-primary",e=>i.persistence.referenceDelegate.removeTarget(e,s))}catch(o){if(!rA(o))throw o;nH("LocalStore",`Failed to update sequence numbers for target ${t}: ${o}`)}i.Ui=i.Ui.remove(t),i.qi.delete(s.target)}function lf(e,t,n){var r;let i=ra.min(),s=s$();return e.persistence.runTransaction("Execute query","readonly",r=>(function(e,t,n){var r;let i=e.qi.get(n);return void 0!==i?rT.resolve(e.Ui.get(i)):e.Cs.getTargetData(t,n)})(e,r,iX(t)).next(t=>{if(t)return i=t.lastLimboFreeSnapshotVersion,e.Cs.getMatchingKeysForTargetId(r,t.targetId).next(e=>{s=e})}).next(()=>e.Li.getDocumentsMatchingQuery(r,t,n?i:ra.min(),n?s:s$())).next(n=>(lg(e,i5(t),n),{documents:n,Hi:s})))}function lp(e,t){var n,r;let i=r=e.Cs,s=e.Ui.get(t);return s?Promise.resolve(s.target):e.persistence.runTransaction("Get target data","readonly",e=>i.se(e,t).next(e=>e?e.target:null))}function lm(e,t){var n;let r=e.Ki.get(t)||ra.min();return e.persistence.runTransaction("Get new document changes","readonly",n=>e.Gi.getAllFromCollectionGroup(n,t,rv(r,-1),Number.MAX_SAFE_INTEGER)).then(n=>(lg(e,t,n),n))}function lg(e,t,n){let r=e.Ki.get(t)||ra.min();n.forEach((e,t)=>{t.readTime.compareTo(r)>0&&(r=t.readTime)}),e.Ki.set(t,r)}async function ly(e,t,n,r){var i,s;let o=s$(),a=sN;for(let l of n){let u=t.Ji(l.metadata.name);l.document&&(o=o.add(u));let c=t.Yi(l);c.setReadTime(t.Xi(l.metadata.readTime)),a=a.insert(u,c)}let h=e.Gi.newChangeBuffer({trackRemovals:!0}),d=await lh(e,iX(iG(ru.fromString(`__bundle__/docs/${r}`))));return e.persistence.runTransaction("Apply bundle documents","readwrite",t=>lu(t,h,a).next(e=>(h.apply(t),e)).next(n=>e.Cs.removeMatchingKeysForTargetId(t,d.targetId).next(()=>e.Cs.addMatchingKeys(t,o,d.targetId)).next(()=>e.localDocuments.getLocalViewOfDocuments(t,n.Wi,n.zi)).next(()=>n.Wi)))}async function lv(e,t,n=s$()){var r;let i=await lh(e,iX(oJ(t.bundledQuery))),s=e;return s.persistence.runTransaction("Save named query","readwrite",e=>{let r=s5(t.readTime);if(i.snapshotVersion.compareTo(r)>=0)return s.Ns.saveNamedQuery(e,t);let o=i.withResumeToken(rK.EMPTY_BYTE_STRING,r);return s.Ui=s.Ui.insert(o.targetId,o),s.Cs.updateTargetData(e,o).next(()=>s.Cs.removeMatchingKeysForTargetId(e,i.targetId)).next(()=>s.Cs.addMatchingKeys(e,n,i.targetId)).next(()=>s.Ns.saveNamedQuery(e,t))})}function l_(e,t){return`firestore_clients_${e}_${t}`}function lb(e,t,n){let r=`firestore_mutations_${e}_${n}`;return t.isAuthenticated()&&(r+=`_${t.uid}`),r}function lw(e,t){return`firestore_targets_${e}_${t}`}class lE{constructor(e,t,n,r){this.user=e,this.batchId=t,this.state=n,this.error=r}static Zi(e,t,n){let r=JSON.parse(n),i,s="object"==typeof r&&-1!==["pending","acknowledged","rejected"].indexOf(r.state)&&(void 0===r.error||"object"==typeof r.error);return s&&r.error&&(s="string"==typeof r.error.message&&"string"==typeof r.error.code)&&(i=new n1(r.error.code,r.error.message)),s?new lE(e,t,r.state,i):(nK("SharedCl
2466ientState",`Failed to parse mutation state for ID '${t}': ${n}`),null)}tr(){let e={state:this.state,updateTimeMs:Date.now()};return this.error&&(e.error={code:this.error.code,message:this.error.message}),JSON.stringify(e)}}class lx{constructor(e,t,n){this.targetId=e,this.state=t,this.error=n}static Zi(e,t){let n=JSON.parse(t),r,i="object"==typeof n&&-1!==["not-current","current","rejected"].indexOf(n.state)&&(void 0===n.error||"object"==typeof n.error);return i&&n.error&&(i="string"==typeof n.error.message&&"string"==typeof n.error.code)&&(r=new n1(n.error.code,n.error.message)),i?new lx(e,n.state,r):(nK("SharedClientState",`Failed to parse target state for ID '${e}': ${t}`),null)}tr(){let e={state:this.state,updateTimeMs:Date.now()};return this.error&&(e.error={code:this.error.code,message:this.error.message}),JSON.stringify(e)}}class lS{constructor(e,t){this.clientId=e,this.activeTargetIds=t}static Zi(e,t){let n=JSON.parse(t),r="object"==typeof n&&n.activeTargetIds instanceof Array,i=sV;for(let s=0;r&&s<n.activeTargetIds.length;++s)r=r6(n.activeTargetIds[s]),i=i.add(n.activeTargetIds[s]);return r?new lS(e,i):(nK("SharedClientState",`Failed to parse client data for instance '${e}': ${t}`),null)}}class lT{constructor(e,t){this.clientId=e,this.onlineState=t}static Zi(e){let t=JSON.parse(e);return"object"==typeof t&&-1!==["Unknown","Online","Offline"].indexOf(t.onlineState)&&"string"==typeof t.clientId?new lT(t.clientId,t.onlineState):(nK("SharedClientState",`Failed to parse online state: ${e}`),null)}}class lI{constructor(){this.activeTargetIds=sV}er(e){this.activeTargetIds=this.activeTargetIds.add(e)}nr(e){this.activeTargetIds=this.activeTargetIds.delete(e)}tr(){let e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)}}class lk{constructor(e,t,n,r,i){var s,o,a;this.window=e,this.Hs=t,this.persistenceKey=n,this.sr=r,this.syncEngine=null,this.onlineStateHandler=null,this.sequenceNumberHandler=null,this.ir=this.rr.bind(this),this.ur=new rZ(rr),this.started=!1,this.cr=[];let l=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");this.storage=this.window.localStorage,this.currentUser=i,this.ar=l_(this.persistenceKey,this.sr),this.hr=`firestore_sequence_number_${s=this.persistenceKey}`,this.ur=this.ur.insert(this.sr,new lI),this.lr=RegExp(`^firestore_clients_${l}_([^_]*)$`),this.dr=RegExp(`^firestore_mutations_${l}_(\\d+)(?:_(.*))?$`),this._r=RegExp(`^firestore_targets_${l}
2466_(\\d+)$`),this.wr=`firestore_online_state_${o=this.persistenceKey}`,this.mr=`firestore_bundle_loaded_v2_${a=this.persistenceKey}`,this.window.addEventListener("storage",this.ir)}static C(e){return!(!e||!e.localStorage)}async start(){let e=await this.syncEngine.vi();for(let t of e){if(t===this.sr)continue;let n=this.getItem(l_(this.persistenceKey,t));if(n){let r=lS.Zi(t,n);r&&(this.ur=this.ur.insert(r.clientId,r))}}this.gr();let i=this.storage.getItem(this.wr);if(i){let s=this.yr(i);s&&this.pr(s)}for(let o of this.cr)this.rr(o);this.cr=[],this.window.addEventListener("pagehide",()=>this.shutdown()),this.started=!0}writeSequenceNumber(e){this.setItem(this.hr,JSON.stringify(e))}getAllActiveQueryTargets(){return this.Ir(this.ur)}isActiveQueryTarget(e){let t=!1;return this.ur.forEach((n,r)=>{r.activeTargetIds.has(e)&&(t=!0)}),t}addPendingMutation(e){this.Tr(e,"pending")}updateMutationState(e,t,n){this.Tr(e,t,n),this.Er(e)}addLocalQueryTarget(e){let t="not-current";if(this.isActiveQueryTarget(e)){let n=this.storage.getItem(lw(this.persistenceKey,e));if(n){let r=lx.Zi(e,n);r&&(t=r.state)}}return this.Ar.er(e),this.gr(),t}removeLocalQueryTarget(e){this.Ar.nr(e),this.gr()}isLocalQueryTarget(e){return this.Ar.activeTargetIds.has(e)}clearQueryState(e){this.removeItem(lw(this.persistenceKey,e))}updateQueryState(e,t,n){this.Rr(e,t,n)}handleUserChange(e,t,n){t.forEach(e=>{this.Er(e)}),this.currentUser=e,n.forEach(e=>{this.addPendingMutation(e)})}setOnlineState(e){this.br(e)}notifyBundleLoaded(e){this.Pr(e)}shutdown(){this.started&&(this.window.removeEventListener("storage",this.ir),this.removeItem(this.ar),this.started=!1)}getItem(e){let t=this.storage.getItem(e);return nH("SharedClientState","READ",e,t),t}setItem(e,t){nH("SharedClientState","SET",e,t),this.storage.setItem(e,t)}removeItem(e){nH("SharedClientState","REMOVE",e),this.storage.removeItem(e)}rr(e){if(e.storageArea===this.storage){if(nH("SharedClientState","EVENT",e.key,e.newValue),e.key===this.ar)return void nK("Received WebStorage notification for local change. Another client might have garbage-collected our state");this.Hs.enqueueRetryable(async()=>{if(this.started){if(null!==e.key){if(this.lr.test(e.key)){if(null==e.newValue){let t=this.vr(e.key);return this.Vr(t,null)}{let n=this.Sr(e.key,e.newValue);if(n)return this.Vr(n.clientId,n)}}else if(this.dr.test(e.key)){if(null!==e.newValue){let r=this.Dr(e.key,e.newValue);if(r)return this.Cr(r)}}else if(this._r.test(e.key)){if(null!==e.newValue){let i=this.Nr(e.key,e.newValue);if(i)return this.kr(i)}}else if(e.key===this.wr){if(null!==e.newValue){let s=this.yr(e.newValue);if(s)return this.pr(s)}}else if(e.key===this.hr){let o=function(e){let t=rL.at;if(null!=e)try{let n=JSON.parse(e);"number"==typeof n||nX(),t=n}catch(r){nK("SharedClientState","Failed to read sequence number from WebStorage",r)}return t}(e.newValue);o!==rL.at&&this.sequenceNumberHandler(o)}else if(e.key===this.mr){let a=this.Or(e.newValue);await Promise.all(a.map(e=>this.syncEngine.Mr(e)))}}}else this.cr.push(e)})}}get Ar(){return this.ur.get(this.sr)}gr(){this.setItem(this.ar,this.Ar.tr())}Tr(e,t,n){let r=new lE(this.currentUser,e,t,n),i=lb(this.persistenceKey,this.currentUser,e);this.setItem(i,r.tr())}Er(e){let t=lb(this.persistenceKey,this.currentUser,e);this.removeItem(t)}br(e){let t={clientId:this.sr,onlineState:e};this.storage.setItem(this.wr,JSON.stringify(t))}Rr(e,t,n){let r=lw(this.persistenceKey,e),i=new lx(e,t,n);this.setItem(r,i.tr())}Pr(e){let t=JSON.stringify(Array.from(e));this.setItem(this.mr,t)}vr(e){let t=this.lr.exec(e);return t?t[1]:null}Sr(e,t){let n=this.vr(e);return lS.Zi(n,t)}Dr(e,t){let n=this.dr.exec(e),r=Number(n[1]),i=void 0!==n[2]?n[2]:null;return lE.Zi(new nV(i),r,t)}Nr(e,t){let n=this._r.exec(e),r=Number(n[1]);return lx.Zi(r,t)}yr(e){return lT.Zi(e)}Or(e){return JSON.parse(e)}async Cr(e){if(e.user.uid===this.currentUser.uid)return this.syncEngine.Fr(e.batchId,e.state,e.error);nH("SharedClientState",`Ignoring mutation for non-active user ${e.user.uid}`)}kr(e){return this.syncEngine.$r(e.targetId,e.state,e.error)}Vr(e,t){let n=t?this.ur.insert(e,t):this.ur.remove(e),r=this.Ir(this.ur),i=this.Ir(n),s=[],o=[];
2466return i.forEach(e=>{r.has(e)||s.push(e)}),r.forEach(e=>{i.has(e)||o.push(e)}),this.syncEngine.Br(s,o).then(()=>{this.ur=n})}pr(e){this.ur.get(e.clientId)&&this.onlineStateHandler(e.onlineState)}Ir(e){let t=sV;return e.forEach((e,n)=>{t=t.unionWith(n.activeTargetIds)}),t}}class lC{constructor(){this.Lr=new lI,this.Ur={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(e){}updateMutationState(e,t,n){}addLocalQueryTarget(e){return this.Lr.er(e),this.Ur[e]||"not-current"}updateQueryState(e,t,n){this.Ur[e]=t}removeLocalQueryTarget(e){this.Lr.nr(e)}isLocalQueryTarget(e){return this.Lr.activeTargetIds.has(e)}clearQueryState(e){delete this.Ur[e]}getAllActiveQueryTargets(){return this.Lr.activeTargetIds}isActiveQueryTarget(e){return this.Lr.activeTargetIds.has(e)}start(){return this.Lr=new lI,Promise.resolve()}handleUserChange(e,t,n){}setOnlineState(e){}shutdown(){}writeSequenceNumber(e){}notifyBundleLoaded(e){}}/** 2467 * @license 2468 * Copyright 2019 Google LLC 2469 * 2470 * Licensed under the Apache License, Version 2.0 (the "License"); 2471 * you may not use this file except in compliance with the License. 2472 * You may obtain a copy of the License at 2473 * 2474 * http://www.apache.org/licenses/LICENSE-2.0 2475 * 2476 * Unless required by applicable law or agreed to in writing, software 2477 * distributed under the License is distributed on an "AS IS" BASIS, 2478 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2479 * See the License for the specific language governing permissions and 2480 * limitations under the License. 2481 */ class lR{qr(e){}shutdown(){}}/** 2482 * @license 2483 * Copyright 2019 Google LLC 2484 * 2485 * Licensed under the Apache License, Version 2.0 (the "License"); 2486 * you may not use this file except in compliance with the License. 2487 * You may obtain a copy of the License at 2488 * 2489 * http://www.apache.org/licenses/LICENSE-2.0 2490 * 2491 * Unless required by applicable law or agreed to in writing, software 2492 * distributed under the License is distributed on an "AS IS" BASIS, 2493 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2494 * See the License for the specific language governing permissions and 2495 * limitations under the License. 2496 */ class lA{constructor(){this.Kr=()=>this.Gr(),this.Qr=()=>this.jr(),this.Wr=[],this.zr()}qr(e){this.Wr.push(e)}shutdown(){window.removeEventListener("online",this.Kr),window.removeEventListener("offline",this.Qr)}zr(){window.addEventListener("online",this.Kr),window.addEventListener("offline",this.Qr)}Gr(){for(let e of(nH("ConnectivityMonitor","Network connectivity changed: AVAILABLE"),this.Wr))e(0)}jr(){for(let e of(nH("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE"),this.Wr))e(1)}static C(){return"undefined"!=typeof window&&void 0!==window.addEventListener&&void 0!==window.removeEventListener}}/** 2497 * @license 2498 * Copyright 2020 Google LLC 2499 * 2500 * Licensed under the Apache License, Version 2.0 (the "License"); 2501 * you may not use this file except in compliance with the License. 2502 * You may obtain a copy of the License at 2503 * 2504 * http://www.apache.org/licenses/LICENSE-2.0 2505 * 2506 * Unless required by applicable law or agreed to in writing, software 2507 * distributed under the License is distributed on an "AS IS" BASIS, 2508 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2509 * See the License for the specific language governing permissions and 2510 * limitations under the License. 2511 */ let lO={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"};/** 2512 * @license 2513 * Copyright 2017 Google LLC 2514 * 2515 * Licensed under the Apache License, Version 2.0 (the "License"); 2516 * you may not use this file except in compliance with the License. 2517 * You may obtain a copy of the License at 2518 * 2519 * http://www.apache.org/licenses/LICENSE-2.0 2520 * 2521 * Unless required by applicable law or agreed to in writing, software 2522 * distributed under the License is distributed on an "AS IS" BASIS, 2523 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2524 * See the License for the specific language governing permissions and 2525 * limitations under the License. 2526 */ class lD{constructor(e){this.Hr=e.Hr,this.Jr=e.Jr}Yr(e){this.Xr=e}Zr(e){this.eo=e}onMessage(e){this.no=e}close(){this.Jr()}send(e){this.Hr(e)}
2526so(){this.Xr()}io(e){this.eo(e)}ro(e){this.no(e)}}/** 2527 * @license 2528 * Copyright 2017 Google LLC 2529 * 2530 * Licensed under the Apache License, Version 2.0 (the "License"); 2531 * you may not use this file except in compliance with the License. 2532 * You may obtain a copy of the License at 2533 * 2534 * http://www.apache.org/licenses/LICENSE-2.0 2535 * 2536 * Unless required by applicable law or agreed to in writing, software 2537 * distributed under the License is distributed on an "AS IS" BASIS, 2538 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2539 * See the License for the specific language governing permissions and 2540 * limitations under the License. 2541 */ class lN extends class{constructor(e){this.databaseInfo=e,this.databaseId=e.databaseId;let t=e.ssl?"https":"http";this.oo=t+"://"+e.host,this.uo="projects/"+this.databaseId.projectId+"/databases/"+this.databaseId.database+"/documents"}get co(){return!1}ao(e,t,n,r,i){let s=this.ho(e,t);nH("RestConnection","Sending: ",s,n);let o={};return this.lo(o,r,i),this.fo(e,s,o,n).then(e=>(nH("RestConnection","Received: ",e),e),t=>{throw nY("RestConnection",`${e} failed with error: `,t,"url: ",s,"request:",n),t})}_o(e,t,n,r,i,s){return this.ao(e,t,n,r,i)}lo(e,t,n){e["X-Goog-Api-Client"]="gl-js/ fire/"+nz,e["Content-Type"]="text/plain",this.databaseInfo.appId&&(e["X-Firebase-GMPID"]=this.databaseInfo.appId),t&&t.headers.forEach((t,n)=>e[n]=t),n&&n.headers.forEach((t,n)=>e[n]=t)}ho(e,t){let n=lO[e];return`${this.oo}/v1/${t}:${n}`}}{constructor(e){super(e),this.forceLongPolling=e.forceLongPolling,this.autoDetectLongPolling=e.autoDetectLongPolling,this.useFetchStreams=e.useFetchStreams}fo(e,t,n,r){return new Promise((i,s)=>{let o=new nB;o.setWithCredentials(!0),o.listenOnce(nF.COMPLETE,()=>{try{switch(o.getLastErrorCode()){case nP.NO_ERROR:let t=o.getResponseJson();nH("Connection","XHR received:",JSON.stringify(t)),i(t);break;case nP.TIMEOUT:nH("Connection",'RPC "'+e+'" timed out'),s(new n1(n0.DEADLINE_EXCEEDED,"Request time out"));break;case nP.HTTP_ERROR:let n=o.getStatus();if(nH("Connection",'RPC "'+e+'" failed with status:',n,"response text:",o.getResponseText()),n>0){let r=o.getResponseJson().error;if(r&&r.status&&r.message){let a=function(e){let t=e.toLowerCase().replace(/_/g,"-");return Object.values(n0).indexOf(t)>=0?t:n0.UNKNOWN}(r.status);s(new n1(a,r.message))}else s(new n1(n0.UNKNOWN,"Server responded with status "+o.getStatus()))}else s(new n1(n0.UNAVAILABLE,"Connection failed."));break;default:nX()}}finally{nH("Connection",'RPC "'+e+'" completed.')}});let a=JSON.stringify(r);o.send(t,"POST",a,n,15)})}wo(e,t,n){let r=[this.oo,"/","google.firestore.v1.Firestore","/",e,"/channel"],i=nD(),s=nN(),o={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:`projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling};this.useFetchStreams&&(o.xmlHttpFactory=new nj({})),this.lo(o.initMessageHeaders,t,n),o.encodeInitMessageHeaders=!0;let a=r.join("");nH("Connection","Creating WebChannel: "+a,o);let l=i.createWebChannel(a,o),c=!1,h=!1,d=new lD({Hr(e){h?nH("Connection","Not sending because WebChannel is closed:",e):(c||(nH("Connection","Opening WebChannel transport."),l.open(),c=!0),nH("Connection","WebChannel sending:",e),l.send(e))},Jr:()=>l.close()}),f=(e,t,n)=>{e.listen(t,e=>{try{n(e)}catch(t){setTimeout(()=>{throw t},0)}})};return f(l,nU.EventType.OPEN,()=>{h||nH("Connection","WebChannel transport opened.")}),f(l,nU.EventType.CLOSE,()=>{h||(h=!0,nH("Connection","WebChannel transport closed"),d.io())}),f(l,nU.EventType.ERROR,e=>{h||(h=!0,nY("Connection","WebChannel transport errored:",e),d.io(new n1(n0.UNAVAILABLE,"The operation could not be completed")))}),f(l,nU.EventType.MESSAGE,e=>{var t,n;if(!h){let r=e.data[0];(n=!!r)||nX();let i=r.error||(null===(t=r[0])||void 0===t?void 0:t.error);if(i){nH("Connection","WebChannel received error:",i);let s=i.status,o=function(e){let t=u[e];if(void 0!==t)return sO(t)}(s),a=i.message;void 0===o&&(o=n0.INTERNAL,a="Unknown error status: "+s+" with message "+i.message),h=!0,d.io(new n1(o,a)),l.close()}else nH("Connection","WebChannel received:",r),d.ro(r)}}),f(s,nM.STAT_EVENT,e=>{e.stat===nL.PROXY?nH("Connection","Detected buffering proxy"):e.stat===nL.NOPROXY&&nH("Connection","Detected no buffering proxy")}),setTimeout(()=>{d.so()},0),d}}/** 2542 * @license 2543 * Copyright 2020 Google LLC 2544 * 2545 * Licensed under the Apache License, Version 2.0 (the "License");
2546 * you may not use this file except in compliance with the License. 2547 * You may obtain a copy of the License at 2548 * 2549 * http://www.apache.org/licenses/LICENSE-2.0 2550 * 2551 * Unless required by applicable law or agreed to in writing, software 2552 * distributed under the License is distributed on an "AS IS" BASIS, 2553 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2554 * See the License for the specific language governing permissions and 2555 * limitations under the License. 2556 */ /** 2557 * @license 2558 * Copyright 2020 Google LLC 2559 * 2560 * Licensed under the Apache License, Version 2.0 (the "License"); 2561 * you may not use this file except in compliance with the License. 2562 * You may obtain a copy of the License at 2563 * 2564 * http://www.apache.org/licenses/LICENSE-2.0 2565 * 2566 * Unless required by applicable law or agreed to in writing, software 2567 * distributed under the License is distributed on an "AS IS" BASIS, 2568 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2569 * See the License for the specific language governing permissions and 2570 * limitations under the License. 2571 */ function lP(){return"undefined"!=typeof window?window:null}function lF(){return"undefined"!=typeof document?document:null}/** 2572 * @license 2573 * Copyright 2020 Google LLC 2574 * 2575 * Licensed under the Apache License, Version 2.0 (the "License"); 2576 * you may not use this file except in compliance with the License. 2577 * You may obtain a copy of the License at 2578 * 2579 * http://www.apache.org/licenses/LICENSE-2.0 2580 * 2581 * Unless required by applicable law or agreed to in writing, software 2582 * distributed under the License is distributed on an "AS IS" BASIS, 2583 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2584 * See the License for the specific language governing permissions and 2585 * limitations under the License. 2586 */ function lM(e){return new s1(e,!0)}class lL{constructor(e,t,n=1e3,r=1.5,i=6e4){this.Hs=e,this.timerId=t,this.mo=n,this.yo=r,this.po=i,this.Io=0,this.To=null,this.Eo=Date.now(),this.reset()}reset(){this.Io=0}Ao(){this.Io=this.po}Ro(e){this.cancel();let t=Math.floor(this.Io+this.bo()),n=Math.max(0,Date.now()-this.Eo),r=Math.max(0,t-n);r>0&&nH("ExponentialBackoff",`Backing off for ${r} ms (base delay: ${this.Io} ms, delay with jitter: ${t} ms, last attempt: ${n} ms ago)`),this.To=this.Hs.enqueueAfterDelay(this.timerId,r,()=>(this.Eo=Date.now(),e())),this.Io*=this.yo,this.Io<this.mo&&(this.Io=this.mo),this.Io>this.po&&(this.Io=this.po)}Po(){null!==this.To&&(this.To.skipDelay(),this.To=null)}cancel(){null!==this.To&&(this.To.cancel(),this.To=null)}bo(){return(Math.random()-.5)*this.Io}}/** 2587 * @license 2588 * Copyright 2017 Google LLC 2589 * 2590 * Licensed under the Apache License, Version 2.0 (the "License"); 2591 * you may not use this file except in compliance with the License. 2592 * You may obtain a copy of the License at 2593 * 2594 * http://www.apache.org/licenses/LICENSE-2.0 2595 * 2596 * Unless required by applicable law or agreed to in writing, software 2597 * distributed under the License is distributed on an "AS IS" BASIS, 2598 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2599 * See the License for the specific language governing permissions and 2600 * limitations under the License. 2601 */ class lj{constructor(e,t,n,r,i,s,o,a){this.Hs=e,this.vo=n,this.Vo=r,this.So=i,this.authCredentialsProvider=s,this.appCheckCredentialsProvider=o,this.listener=a,this.state=0,this.Do=0,this.Co=null,this.xo=null,this.stream=null,this.No=new lL(e,t)}ko(){return 1===this.state||5===this.state||this.Oo()}Oo(){return 2===this.state||3===this.state}start(){4!==this.state?this.auth():this.Mo()}async stop(){this.ko()&&await this.close(0)}Fo(){this.state=0,this.No.reset()}$o(){this.Oo()&&null===this.Co&&(this.Co=this.Hs.enqueueAfterDelay(this.vo,6e4,()=>this.Bo()))}Lo(e){this.Uo(),this.stream.send(e)}async Bo(){if(this.Oo())return this.close(0)}Uo(){this.Co&&(this.Co.cancel(),this.Co=null)}qo(){this.xo&&(this.xo.cancel(),this.xo=null)}async close(e,t){this.Uo(),this.qo(),this.No.cancel(),this.Do++,4!==e?this.No.reset():t&&t.code===n0.RESOURCE_EXHAUSTED?(nK(t.toString()),nK("Using maximum backoff delay to prevent overloading the backend."),this.No.Ao()):t&&t.code===n0.UNAUTHENTICATED&&3!==this.state&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),null!==this.stream&&(this.Ko(),this.stream.close(),this.stream=null),this.state=e,await this.listener.Zr(t)}Ko(){}auth(){this.state=1;let e=this.Go(this.Do),t=this.Do;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then(([e,n])=>
2601{this.Do===t&&this.Qo(e,n)},t=>{e(()=>{let e=new n1(n0.UNKNOWN,"Fetching auth token failed: "+t.message);return this.jo(e)})})}Qo(e,t){let n=this.Go(this.Do);this.stream=this.Wo(e,t),this.stream.Yr(()=>{n(()=>(this.state=2,this.xo=this.Hs.enqueueAfterDelay(this.Vo,1e4,()=>(this.Oo()&&(this.state=3),Promise.resolve())),this.listener.Yr()))}),this.stream.Zr(e=>{n(()=>this.jo(e))}),this.stream.onMessage(e=>{n(()=>this.onMessage(e))})}Mo(){this.state=5,this.No.Ro(async()=>{this.state=0,this.start()})}jo(e){return nH("PersistentStream",`close with error: ${e}`),this.stream=null,this.close(4,e)}Go(e){return t=>{this.Hs.enqueueAndForget(()=>this.Do===e?t():(nH("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve()))}}}class lU extends lj{constructor(e,t,n,r,i,s){super(e,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",t,n,r,s),this.It=i}Wo(e,t){return this.So.wo("Listen",e,t)}onMessage(e){this.No.reset();let t=function(e,t){let n;if("targetChange"in t){var r,i,s,o;t.targetChange;let a="NO_CHANGE"===(r=t.targetChange.targetChangeType||"NO_CHANGE")?0:"ADD"===r?1:"REMOVE"===r?2:"CURRENT"===r?3:"RESET"===r?4:nX(),l=t.targetChange.targetIds||[],u=(s=t.targetChange.resumeToken,e.gt?(void 0===s||"string"==typeof s||nX(),rK.fromBase64String(s||"")):(void 0===s||s instanceof Uint8Array||nX(),rK.fromUint8Array(s||new Uint8Array))),c=t.targetChange.cause,h=c&&function(e){let t=void 0===e.code?n0.UNKNOWN:sO(e.code);return new n1(t,e.message||"")}(c);n=new sH(a,l,u,h||null)}else if("documentChange"in t){t.documentChange;let d=t.documentChange;d.document,d.document.name,d.document.updateTime;let f=s7(e,d.document.name),p=s5(d.document.updateTime),m=new i_({mapValue:{fields:d.document.fields}}),g=iw.newFoundDocument(f,p,m),y=d.targetIds||[],v=d.removedTargetIds||[];n=new sG(y,v,g.key,g)}else if("documentDelete"in t){t.documentDelete;let _=t.documentDelete;_.document;let b=s7(e,_.document),w=_.readTime?s5(_.readTime):ra.min(),E=iw.newNoDocument(b,w),x=_.removedTargetIds||[];n=new sG([],x,E.key,E)}else if("documentRemove"in t){t.documentRemove;let S=t.documentRemove;S.document;let T=s7(e,S.document),I=S.removedTargetIds||[];n=new sG([],I,T,null)}else{if(!("filter"in t))return nX();{t.filter;let k=t.filter;k.targetId;let C=k.count||0,R=new sR(C),A=k.targetId;n=new sW(A,R)}}return n}(this.It,e),n=function(e){if(!("targetChange"in e))return ra.min();let t=e.targetChange;return t.targetIds&&t.targetIds.length?ra.min():t.readTime?s5(t.readTime):ra.min()}(e);return this.listener.zo(t,n)}Ho(e){let t={};t.database=ot(this.It),t.addTarget=function(e,t){let n,r=t.target;return(n=iI(r)?{documents:oa(e,r)}:{query:ol(e,r)}).targetId=t.targetId,t.resumeToken.approximateByteSize()>0?n.resumeToken=s4(e,t.resumeToken):t.snapshotVersion.compareTo(ra.min())>0&&(n.readTime=s2(e,t.snapshotVersion.toTimestamp())),n}(this.It,e);let n=function(e,t){let n=function(e,t){switch(t){case 0:return null;case 1:return"existence-filter-mismatch";case 2:return"limbo-document";default:return nX()}}(0,t.purpose);return null==n?null:{"goog-listen-tags":n}}(this.It,e);n&&(t.labels=n),this.Lo(t)}Jo(e){let t={};t.database=ot(this.It),t.removeTarget=e,this.Lo(t)}}class lB extends lj{constructor(e,t,n,r,i,s){super(e,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",t,n,r,s),this.It=i,this.Yo=!1}get Xo(){return this.Yo}start(){this.Yo=!1,this.lastStreamToken=void 0,super.start()}Ko(){this.Yo&&this.Zo([])}Wo(e,t){return this.So.wo("Write",e,t)}onMessage(e){var t,n,r,i;if(!e.streamToken&&nX(),this.lastStreamToken=e.streamToken,this.Yo){this.No.reset();let s=(n=e.writeResults,r=e.commitTime,n&&n.length>0?(void 0!==r||nX(),n.map(e=>{var t,n;let i;return n=r,(i=e.updateTime?s5(e.updateTime):s5(n)).isEqual(ra.min())&&(i=s5(n)),new sf(i,e.transformResults||[])})):[]),o=s5(e.commitTime);return this.listener.tu(o,s)}return e.writeResults&&0!==e.writeResults.length&&nX(),this.Yo=!0,this.listener.eu()}nu(){let e={};e.database=ot(this.It),this.Lo(e)}Zo(e){let t={streamToken:this.lastStreamToken,writes:e.map(e=>os(this.It,e))};this.Lo(t)}}/** 2602 * @license 2603 * Copyright 2017 Google LLC 2604 * 2605 * Licensed under the Apache License, Version 2.0 (the "License");
2606 * you may not use this file except in compliance with the License. 2607 * You may obtain a copy of the License at 2608 * 2609 * http://www.apache.org/licenses/LICENSE-2.0 2610 * 2611 * Unless required by applicable law or agreed to in writing, software 2612 * distributed under the License is distributed on an "AS IS" BASIS, 2613 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2614 * See the License for the specific language governing permissions and 2615 * limitations under the License. 2616 */ class lZ extends class{}{constructor(e,t,n,r){super(),this.authCredentials=e,this.appCheckCredentials=t,this.So=n,this.It=r,this.su=!1}iu(){if(this.su)throw new n1(n0.FAILED_PRECONDITION,"The client has already been terminated.")}ao(e,t,n){return this.iu(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([r,i])=>this.So.ao(e,t,n,r,i)).catch(e=>{throw"FirebaseError"===e.name?(e.code===n0.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),e):new n1(n0.UNKNOWN,e.toString())})}_o(e,t,n,r){return this.iu(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([i,s])=>this.So._o(e,t,n,i,s,r)).catch(e=>{throw"FirebaseError"===e.name?(e.code===n0.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),e):new n1(n0.UNKNOWN,e.toString())})}terminate(){this.su=!0}}class l${constructor(e,t){this.asyncQueue=e,this.onlineStateHandler=t,this.state="Unknown",this.ru=0,this.ou=null,this.uu=!0}cu(){0===this.ru&&(this.au("Unknown"),this.ou=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,()=>(this.ou=null,this.hu("Backend didn't respond within 10 seconds."),this.au("Offline"),Promise.resolve())))}lu(e){"Online"===this.state?this.au("Unknown"):(this.ru++,this.ru>=1&&(this.fu(),this.hu(`Connection failed 1 times. Most recent error: ${e.toString()}`),this.au("Offline")))}set(e){this.fu(),this.ru=0,"Online"===e&&(this.uu=!1),this.au(e)}au(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}hu(e){let t=`Could not reach Cloud Firestore backend. ${e} 2617This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.`;this.uu?(nK(t),this.uu=!1):nH("OnlineStateTracker",t)}fu(){null!==this.ou&&(this.ou.cancel(),this.ou=null)}}/** 2618 * @license 2619 * Copyright 2017 Google LLC 2620 * 2621 * Licensed under the Apache License, Version 2.0 (the "License"); 2622 * you may not use this file except in compliance with the License. 2623 * You may obtain a copy of the License at 2624 * 2625 * http://www.apache.org/licenses/LICENSE-2.0 2626 * 2627 * Unless required by applicable law or agreed to in writing, software 2628 * distributed under the License is distributed on an "AS IS" BASIS, 2629 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2630 * See the License for the specific language governing permissions and 2631 * limitations under the License. 2632 */ class lV{constructor(e,t,n,r,i){this.localStore=e,this.datastore=t,this.asyncQueue=n,this.remoteSyncer={},this.du=[],this._u=new Map,this.wu=new Set,this.mu=[],this.gu=i,this.gu.qr(e=>{n.enqueueAndForget(async()=>{lX(this)&&(nH("RemoteStore","Restarting streams for network reachability change."),await async function(e){var t;e.wu.add(4),await lq(e),e.yu.set("Unknown"),e.wu.delete(4),await lz(e)}(this))})}),this.yu=new l$(n,r)}}async function lz(e){if(lX(e))for(let t of e.mu)await t(!0)}async function lq(e){for(let t of e.mu)await t(!1)}function lG(e,t){var n;e._u.has(t.targetId)||(e._u.set(t.targetId,t),lQ(e)?lY(e):uo(e).Oo()&&lH(e,t))}function lW(e,t){var n;let r=uo(e);e._u.delete(t),r.Oo()&&lK(e,t),0===e._u.size&&(r.Oo()?r.$o():lX(e)&&e.yu.set("Unknown"))}function lH(e,t){e.pu.Mt(t.targetId),uo(e).Ho(t)}function lK(e,t){e.pu.Mt(t),uo(e).Jo(t)}function lY(e){e.pu=new sY({getRemoteKeysForTarget:t=>e.remoteSyncer.getRemoteKeysForTarget(t),se:t=>e._u.get(t)||null}),uo(e).start(),e.yu.cu()}function lQ(e){return lX(e)&&!uo(e).ko()&&e._u.size>0}function lX(e){var t;return 0===e.wu.size}function lJ(e){e.pu=void 0}async function l0(e){e._u.forEach((t,n)=>{lH(e,t)})}async function l1(e,t){lJ(e),lQ(e)?(e.yu.lu(t),lY(e)):e.yu.set("Unknown")}async function l2(e,t,n){if(e.yu.set("Online"),t instanceof sH&&2===t.state&&t.cause)try{await async function(e,t){let n=t.cause;for(let r of t.targetIds)e._u.has(r)&&(await e.remoteSyncer.rejectListen(r,n),e._u.delete(r),e.pu.removeTarget(r))}(e,t)}catch(r){nH("RemoteStore","Failed to remove targets %s: %s ",t.targetIds.join(","),r),await l4(e,r)}else if(t instanceof sG?e.pu.Gt(t):t instanceof sW?e.pu.Yt(t):e.pu.Wt(t),!n.isEqual(ra.min()))try{let i=await ll(e.localStore);n.compareTo(i)>=0&&await function(e,t){let n=e.pu.te(t);
2632return n.targetChanges.forEach((n,r)=>{if(n.resumeToken.approximateByteSize()>0){let i=e._u.get(r);i&&e._u.set(r,i.withResumeToken(n.resumeToken,t))}}),n.targetMismatches.forEach(t=>{let n=e._u.get(t);if(!n)return;e._u.set(t,n.withResumeToken(rK.EMPTY_BYTE_STRING,n.snapshotVersion)),lK(e,t);let r=new oz(n.target,t,1,n.sequenceNumber);lH(e,r)}),e.remoteSyncer.applyRemoteEvent(n)}(e,n)}catch(s){nH("RemoteStore","Failed to raise snapshot:",s),await l4(e,s)}}async function l4(e,t,n){if(!rA(t))throw t;e.wu.add(1),await lq(e),e.yu.set("Offline"),n||(n=()=>ll(e.localStore)),e.asyncQueue.enqueueRetryable(async()=>{nH("RemoteStore","Retrying IndexedDB access"),await n(),e.wu.delete(1),await lz(e)})}function l5(e,t){return t().catch(n=>l4(e,n,t))}async function l3(e){var t;let n=ua(e),r=e.du.length>0?e.du[e.du.length-1].batchId:-1;for(;l6(e);)try{let i=await lc(e.localStore,r);if(null===i){0===e.du.length&&n.$o();break}r=i.batchId,l8(e,i)}catch(s){await l4(e,s)}l7(e)&&l9(e)}function l6(e){return lX(e)&&e.du.length<10}function l8(e,t){e.du.push(t);let n=ua(e);n.Oo()&&n.Xo&&n.Zo(t.mutations)}function l7(e){return lX(e)&&!ua(e).ko()&&e.du.length>0}function l9(e){ua(e).start()}async function ue(e){ua(e).nu()}async function ut(e){let t=ua(e);for(let n of e.du)t.Zo(n.mutations)}async function un(e,t,n){let r=e.du.shift(),i=o$.from(r,t,n);await l5(e,()=>e.remoteSyncer.applySuccessfulWrite(i)),await l3(e)}async function ur(e,t){t&&ua(e).Xo&&await async function(e,t){var n;if(sA(n=t.code)&&n!==n0.ABORTED){let r=e.du.shift();ua(e).Fo(),await l5(e,()=>e.remoteSyncer.rejectFailedWrite(r.batchId,t)),await l3(e)}}(e,t),l7(e)&&l9(e)}async function ui(e,t){var n;e.asyncQueue.verifyOperationInProgress(),nH("RemoteStore","RemoteStore received new credentials");let r=lX(e);e.wu.add(3),await lq(e),r&&e.yu.set("Unknown"),await e.remoteSyncer.handleCredentialChange(t),e.wu.delete(3),await lz(e)}async function us(e,t){var n;t?(e.wu.delete(2),await lz(e)):t||(e.wu.add(2),await lq(e),e.yu.set("Unknown"))}function uo(e){return e.Iu||(e.Iu=function(e,t,n){var r;return e.iu(),new lU(t,e.So,e.authCredentials,e.appCheckCredentials,e.It,n)}(e.datastore,e.asyncQueue,{Yr:l0.bind(null,e),Zr:l1.bind(null,e),zo:l2.bind(null,e)}),e.mu.push(async t=>{t?(e.Iu.Fo(),lQ(e)?lY(e):e.yu.set("Unknown")):(await e.Iu.stop(),lJ(e))})),e.Iu}function ua(e){return e.Tu||(e.Tu=function(e,t,n){var r;return e.iu(),new lB(t,e.So,e.authCredentials,e.appCheckCredentials,e.It,n)}(e.datastore,e.asyncQueue,{Yr:ue.bind(null,e),Zr:ur.bind(null,e),eu:ut.bind(null,e),tu:un.bind(null,e)}),e.mu.push(async t=>{t?(e.Tu.Fo(),await l3(e)):(await e.Tu.stop(),e.du.length>0&&(nH("RemoteStore",`Stopping write stream with ${e.du.length} pending writes`),e.du=[]))})),e.Tu}/** 2633 * @license 2634 * Copyright 2017 Google LLC 2635 * 2636 * Licensed under the Apache License, Version 2.0 (the "License"); 2637 * you may not use this file except in compliance with the License. 2638 * You may obtain a copy of the License at 2639 * 2640 * http://www.apache.org/licenses/LICENSE-2.0 2641 * 2642 * Unless required by applicable law or agreed to in writing, software 2643 * distributed under the License is distributed on an "AS IS" BASIS, 2644 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2645 * See the License for the specific language governing permissions and 2646 * limitations under the License. 2647 */ class ul{constructor(e,t,n,r,i){this.asyncQueue=e,this.timerId=t,this.targetTimeMs=n,this.op=r,this.removalCallback=i,this.deferred=new n2,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(e=>{})}static createAndSchedule(e,t,n,r,i){let s=Date.now()+n,o=new ul(e,t,s,r,i);return o.start(n),o}start(e){this.timerHandle=setTimeout(()=>this.handleDelayElapsed(),e)}skipDelay(){return this.handleDelayElapsed()}cancel(e){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new n1(n0.CANCELLED,"Operation cancelled"+(e?": "+e:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget(()=>null!==this.timerHandle?(this.clearTimeout(),this.op().then(e=>this.deferred.resolve(e))):Promise.resolve())}clearTimeout(){null!==this.timerHandle&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}function uu(e,t){if(nK("AsyncQueue",`${t}: ${e}`),rA(e))return new n1(n0.UNAVAILABLE,`${t}: ${e}`);throw e}/** 2648 * @license 2649 * Copyright 2017 Google LLC 2650 * 2651 * Licensed under the Apache License, Version 2.0 (the "License");
2652 * you may not use this file except in compliance with the License. 2653 * You may obtain a copy of the License at 2654 * 2655 * http://www.apache.org/licenses/LICENSE-2.0 2656 * 2657 * Unless required by applicable law or agreed to in writing, software 2658 * distributed under the License is distributed on an "AS IS" BASIS, 2659 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2660 * See the License for the specific language governing permissions and 2661 * limitations under the License. 2662 */ class uc{constructor(e){this.comparator=e?(t,n)=>e(t,n)||rd.comparator(t.key,n.key):(e,t)=>rd.comparator(e.key,t.key),this.keyedMap=sF(),this.sortedSet=new rZ(this.comparator)}static emptySet(e){return new uc(e.comparator)}has(e){return null!=this.keyedMap.get(e)}get(e){return this.keyedMap.get(e)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(e){let t=this.keyedMap.get(e);return t?this.sortedSet.indexOf(t):-1}get size(){return this.sortedSet.size}forEach(e){this.sortedSet.inorderTraversal((t,n)=>(e(t),!1))}add(e){let t=this.delete(e.key);return t.copy(t.keyedMap.insert(e.key,e),t.sortedSet.insert(e,null))}delete(e){let t=this.get(e);return t?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(t)):this}isEqual(e){if(!(e instanceof uc)||this.size!==e.size)return!1;let t=this.sortedSet.getIterator(),n=e.sortedSet.getIterator();for(;t.hasNext();){let r=t.getNext().key,i=n.getNext().key;if(!r.isEqual(i))return!1}return!0}toString(){let e=[];return this.forEach(t=>{e.push(t.toString())}),0===e.length?"DocumentSet ()":"DocumentSet (\n "+e.join(" \n")+"\n)"}copy(e,t){let n=new uc;return n.comparator=this.comparator,n.keyedMap=e,n.sortedSet=t,n}}/** 2663 * @license 2664 * Copyright 2017 Google LLC 2665 * 2666 * Licensed under the Apache License, Version 2.0 (the "License"); 2667 * you may not use this file except in compliance with the License. 2668 * You may obtain a copy of the License at 2669 * 2670 * http://www.apache.org/licenses/LICENSE-2.0 2671 * 2672 * Unless required by applicable law or agreed to in writing, software 2673 * distributed under the License is distributed on an "AS IS" BASIS, 2674 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2675 * See the License for the specific language governing permissions and 2676 * limitations under the License. 2677 */ class uh{constructor(){this.Eu=new rZ(rd.comparator)}track(e){let t=e.doc.key,n=this.Eu.get(t);n?0!==e.type&&3===n.type?this.Eu=this.Eu.insert(t,e):3===e.type&&1!==n.type?this.Eu=this.Eu.insert(t,{type:n.type,doc:e.doc}):2===e.type&&2===n.type?this.Eu=this.Eu.insert(t,{type:2,doc:e.doc}):2===e.type&&0===n.type?this.Eu=this.Eu.insert(t,{type:0,doc:e.doc}):1===e.type&&0===n.type?this.Eu=this.Eu.remove(t):1===e.type&&2===n.type?this.Eu=this.Eu.insert(t,{type:1,doc:n.doc}):0===e.type&&1===n.type?this.Eu=this.Eu.insert(t,{type:2,doc:e.doc}):nX():this.Eu=this.Eu.insert(t,e)}Au(){let e=[];return this.Eu.inorderTraversal((t,n)=>{e.push(n)}),e}}class ud{constructor(e,t,n,r,i,s,o,a,l){this.query=e,this.docs=t,this.oldDocs=n,this.docChanges=r,this.mutatedKeys=i,this.fromCache=s,this.syncStateChanged=o,this.excludesMetadataChanges=a,this.hasCachedResults=l}static fromInitialDocuments(e,t,n,r,i){let s=[];return t.forEach(e=>{s.push({type:0,doc:e})}),new ud(e,t,uc.emptySet(t),s,n,r,!0,!1,i)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(e){if(!(this.fromCache===e.fromCache&&this.hasCachedResults===e.hasCachedResults&&this.syncStateChanged===e.syncStateChanged&&this.mutatedKeys.isEqual(e.mutatedKeys)&&i0(this.query,e.query)&&this.docs.isEqual(e.docs)&&this.oldDocs.isEqual(e.oldDocs)))return!1;let t=this.docChanges,n=e.docChanges;if(t.length!==n.length)return!1;for(let r=0;r<t.length;r++)if(t[r].type!==n[r].type||!t[r].doc.isEqual(n[r].doc))return!1;return!0}}/** 2678 * @license 2679 * Copyright 2017 Google LLC 2680 * 2681 * Licensed under the Apache License, Version 2.0 (the "License"); 2682 * you may not use this file except in compliance with the License. 2683 * You may obtain a copy of the License at 2684 * 2685 * http://www.apache.org/licenses/LICENSE-2.0 2686 * 2687 * Unless required by applicable law or agreed to in writing, softw
2687are 2688 * distributed under the License is distributed on an "AS IS" BASIS, 2689 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2690 * See the License for the specific language governing permissions and 2691 * limitations under the License. 2692 */ class uf{constructor(){this.Ru=void 0,this.listeners=[]}}class up{constructor(){this.queries=new sD(e=>i1(e),i0),this.onlineState="Unknown",this.bu=new Set}}async function um(e,t){var n;let r=t.query,i=!1,s=e.queries.get(r);if(s||(i=!0,s=new uf),i)try{s.Ru=await e.onListen(r)}catch(a){let o=uu(a,`Initialization of query '${i2(t.query)}' failed`);return void t.onError(o)}e.queries.set(r,s),s.listeners.push(t),t.Pu(e.onlineState),s.Ru&&t.vu(s.Ru)&&u_(e)}async function ug(e,t){var n;let r=t.query,i=!1,s=e.queries.get(r);if(s){let o=s.listeners.indexOf(t);o>=0&&(s.listeners.splice(o,1),i=0===s.listeners.length)}if(i)return e.queries.delete(r),e.onUnlisten(r)}function uy(e,t){var n;let r=!1;for(let i of t){let s=i.query,o=e.queries.get(s);if(o){for(let a of o.listeners)a.vu(i)&&(r=!0);o.Ru=i}}r&&u_(e)}function uv(e,t,n){var r;let i=e.queries.get(t);if(i)for(let s of i.listeners)s.onError(n);e.queries.delete(t)}function u_(e){e.bu.forEach(e=>{e.next()})}class ub{constructor(e,t,n){this.query=e,this.Vu=t,this.Su=!1,this.Du=null,this.onlineState="Unknown",this.options=n||{}}vu(e){if(!this.options.includeMetadataChanges){let t=[];for(let n of e.docChanges)3!==n.type&&t.push(n);e=new ud(e.query,e.docs,e.oldDocs,t,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0,e.hasCachedResults)}let r=!1;return this.Su?this.Cu(e)&&(this.Vu.next(e),r=!0):this.xu(e,this.onlineState)&&(this.Nu(e),r=!0),this.Du=e,r}onError(e){this.Vu.error(e)}Pu(e){this.onlineState=e;let t=!1;return this.Du&&!this.Su&&this.xu(this.Du,e)&&(this.Nu(this.Du),t=!0),t}xu(e,t){return!e.fromCache||(!this.options.ku||!("Offline"!==t))&&(!e.docs.isEmpty()||e.hasCachedResults||"Offline"===t)}Cu(e){if(e.docChanges.length>0)return!0;let t=this.Du&&this.Du.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!t)&&!0===this.options.includeMetadataChanges}Nu(e){e=ud.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache,e.hasCachedResults),this.Su=!0,this.Vu.next(e)}}/** 2693 * @license 2694 * Copyright 2020 Google LLC 2695 * 2696 * Licensed under the Apache License, Version 2.0 (the "License"); 2697 * you may not use this file except in compliance with the License. 2698 * You may obtain a copy of the License at 2699 * 2700 * http://www.apache.org/licenses/LICENSE-2.0 2701 * 2702 * Unless required by applicable law or agreed to in writing, software 2703 * distributed under the License is distributed on an "AS IS" BASIS, 2704 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2705 * See the License for the specific language governing permissions and 2706 * limitations under the License. 2707 */ class uw{constructor(e,t){this.payload=e,this.byteLength=t}Ou(){return"metadata"in this.payload}}/** 2708 * @license 2709 * Copyright 2020 Google LLC 2710 * 2711 * Licensed under the Apache License, Version 2.0 (the "License"); 2712 * you may not use this file except in compliance with the License. 2713 * You may obtain a copy of the License at 2714 * 2715 * http://www.apache.org/licenses/LICENSE-2.0 2716 * 2717 * Unless required by applicable law or agreed to in writing, software 2718 * distributed under the License is distributed on an "AS IS" BASIS, 2719 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2720 * See the License for the specific language governing permissions and 2721 * limitations under the License. 2722 */ class uE{constructor(e){this.It=e}Ji(e){return s7(this.It,e)}Yi(e){return e.metadata.exists?oi(this.It,e.document,!1):iw.newNoDocument(this.Ji(e.metadata.name),this.Xi(e.metadata.readTime))}Xi(e){return s5(e)}}class ux{constructor(e,t,n){this.Mu=e,this.localStore=t,this.It=n,this.queries=[],this.documents=[],this.collectionGroups=new Set,this.progress=uS(e)}Fu(e){this.progress.bytesLoaded+=e.byteLength;let t=this.progress.documentsLoaded;if(e.payload.namedQuery)this.queries.push(e.payload.namedQuery);else if(e.payload.documentMetadata){this.documents.push({metadata:e.payload.documentMetadata}),e.payload.documentMetadata.exists||++t;let n=ru.fromString(e.payload.documentMetadata.name);this.collectionGroups.add(n.get(n.length-2))}else e.payload.document&&(this.documents[this.documents.length-1].document=e.payload.document,++t);return t!==this.progress.documentsLoaded?(this.progress.documentsLoaded=t,Object.assign({},this.progress)):null}$u(e){let t=new Map,n=new uE(this.It);for(let r of e)if(r.metadata.queries){let i=n.Ji(r.metadata.name);for(let s of r.metadata.queries){let o=(t.get(s)||s$()).add(i);t.set(s,o)}}return t}async complete(){let e=await ly(this.localStore,new uE(this.It),this.documents,this.Mu.id),t=this.$u(this.documents);for(let n of this.queries)await lv(this.localStore,n,t.get(n.name));return this.progress.taskState="Success",{progress:this.progress,Bu:this.collectionGroups,Lu:e}}}function uS(e){return{taskState:"Running",documentsLoaded:0,bytesLoaded:0,totalDocuments:e.totalDocuments,totalBytes:e.totalBytes}}/** 2723 * @license 2724 * Copyright 2017 Google LLC 2725 * 2726 * Licensed under the Apache License, Version 2.0 (the "License");
2727 * you may not use this file except in compliance with the License. 2728 * You may obtain a copy of the License at 2729 * 2730 * http://www.apache.org/licenses/LICENSE-2.0 2731 * 2732 * Unless required by applicable law or agreed to in writing, software 2733 * distributed under the License is distributed on an "AS IS" BASIS, 2734 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2735 * See the License for the specific language governing permissions and 2736 * limitations under the License. 2737 */ class uT{constructor(e){this.key=e}}class uI{constructor(e){this.key=e}}class uk{constructor(e,t){this.query=e,this.Uu=t,this.qu=null,this.hasCachedResults=!1,this.current=!1,this.Ku=s$(),this.mutatedKeys=s$(),this.Gu=i3(e),this.Qu=new uc(this.Gu)}get ju(){return this.Uu}Wu(e,t){let n=t?t.zu:new uh,r=t?t.Qu:this.Qu,i=t?t.mutatedKeys:this.mutatedKeys,s=r,o=!1,a="F"===this.query.limitType&&r.size===this.query.limit?r.last():null,l="L"===this.query.limitType&&r.size===this.query.limit?r.first():null;if(e.inorderTraversal((e,t)=>{let u=r.get(e),c=i4(this.query,t)?t:null,h=!!u&&this.mutatedKeys.has(u.key),d=!!c&&(c.hasLocalMutations||this.mutatedKeys.has(c.key)&&c.hasCommittedMutations),f=!1;u&&c?u.data.isEqual(c.data)?h!==d&&(n.track({type:3,doc:c}),f=!0):this.Hu(u,c)||(n.track({type:2,doc:c}),f=!0,(a&&this.Gu(c,a)>0||l&&0>this.Gu(c,l))&&(o=!0)):!u&&c?(n.track({type:0,doc:c}),f=!0):u&&!c&&(n.track({type:1,doc:u}),f=!0,(a||l)&&(o=!0)),f&&(c?(s=s.add(c),i=d?i.add(e):i.delete(e)):(s=s.delete(e),i=i.delete(e)))}),null!==this.query.limit)for(;s.size>this.query.limit;){let u="F"===this.query.limitType?s.last():s.first();s=s.delete(u.key),i=i.delete(u.key),n.track({type:1,doc:u})}return{Qu:s,zu:n,$i:o,mutatedKeys:i}}Hu(e,t){return e.hasLocalMutations&&t.hasCommittedMutations&&!t.hasLocalMutations}applyChanges(e,t,n){let r=this.Qu;this.Qu=e.Qu,this.mutatedKeys=e.mutatedKeys;let i=e.zu.Au();i.sort((e,t)=>(function(e,t){let n=e=>{switch(e){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return nX()}};return n(e)-n(t)})(e.type,t.type)||this.Gu(e.doc,t.doc)),this.Ju(n);let s=t?this.Yu():[],o=0===this.Ku.size&&this.current?1:0,a=o!==this.qu;return(this.qu=o,0!==i.length||a)?{snapshot:new ud(this.query,e.Qu,r,i,e.mutatedKeys,0===o,a,!1,!!n&&n.resumeToken.approximateByteSize()>0),Xu:s}:{Xu:s}}Pu(e){return this.current&&"Offline"===e?(this.current=!1,this.applyChanges({Qu:this.Qu,zu:new uh,mutatedKeys:this.mutatedKeys,$i:!1},!1)):{Xu:[]}}Zu(e){return!this.Uu.has(e)&&!!this.Qu.has(e)&&!this.Qu.get(e).hasLocalMutations}Ju(e){e&&(e.addedDocuments.forEach(e=>this.Uu=this.Uu.add(e)),e.modifiedDocuments.forEach(e=>{}),e.removedDocuments.forEach(e=>this.Uu=this.Uu.delete(e)),this.current=e.current)}Yu(){if(!this.current)return[];let e=this.Ku;this.Ku=s$(),this.Qu.forEach(e=>{this.Zu(e.key)&&(this.Ku=this.Ku.add(e.key))});let t=[];return e.forEach(e=>{this.Ku.has(e)||t.push(new uI(e))}),this.Ku.forEach(n=>{e.has(n)||t.push(new uT(n))}),t}tc(e){this.Uu=e.Hi,this.Ku=s$();let t=this.Wu(e.documents);return this.applyChanges(t,!0)}ec(){return ud.fromInitialDocuments(this.query,this.Qu,this.mutatedKeys,0===this.qu,this.hasCachedResults)}}class uC{constructor(e,t,n){this.query=e,this.targetId=t,this.view=n}}class uR{constructor(e){this.key=e,this.nc=!1}}class uA{constructor(e,t,n,r,i,s){this.localStore=e,this.remoteStore=t,this.eventManager=n,this.sharedClientState=r,this.currentUser=i,this.maxConcurrentLimboResolutions=s,this.sc={},this.ic=new sD(e=>i1(e),i0),this.rc=new Map,this.oc=new Set,this.uc=new rZ(rd.comparator),this.cc=new Map,this.ac=new aQ,this.hc={},this.lc=new Map,this.fc=ak.vn(),this.onlineState="Unknown",this.dc=void 0}get isPrimaryClient(){return!0===this.dc}}async function uO(e,t){let n=u6(e),r,i,s=n.ic.get(t);if(s)r=s.targetId,n.sharedClientState.addLocalQueryTarget(r),i=s.view.ec();else{let o=await lh(n.localStore,iX(t));n.isPrimaryClient&&lG(n.remoteStore,o);let a=n.sharedClientState.addLocalQueryTarget(o.targetId);i=await uD(n,t,r=o.targetId,"current"===a,o.resumeToken)}return i}async function uD(e,t,n,r,i){e._c=(t,n,r)=>(async function(e,t,n,r){let i=t.view.Wu(n);i.$i&&(i=await lf(e.localStore,t.query,!1).then(({documents:e})=>t.view.Wu(e,i)));let s=r&&r.targetChanges.get(t.targetId),o=t.view.applyChanges(i,e.isPrimaryClient,s);return uq(e,t.targetId,o.Xu),o.snapshot})(e,t,n,r);let s=await lf(e.localStore,t,!0),o=new uk(t,s.Hi),a=o.Wu(s.documents),l=sq.createSynthesizedTargetChangeForCurrentChange(n,r&&"Offline"!==e.onlineState,i),u=o.applyChanges(a,e.isPrimaryClient,l);uq(e,n,u.Xu);let c=new uC(t,n,o);return e.ic.set(t,c),e.rc.has(n)?e.rc.get(n).push(t):e.rc.set(n,[t]),u.snapshot}async function uN(e,t){var n;let r=e.ic.get(t),i=e.rc.get(r.targetId);if(i.length>1)return e.rc.set(r.targetId,i.filter(e=>!i0(e,t))),void e.ic.delete(t);
2737e.isPrimaryClient?(e.sharedClientState.removeLocalQueryTarget(r.targetId),e.sharedClientState.isActiveQueryTarget(r.targetId)||await ld(e.localStore,r.targetId,!1).then(()=>{e.sharedClientState.clearQueryState(r.targetId),lW(e.remoteStore,r.targetId),uV(e,r.targetId)}).catch(rS)):(uV(e,r.targetId),await ld(e.localStore,r.targetId,!0))}async function uP(e,t,n){let r=u8(e);try{var i,s,o;let a=await function(e,t){var n;let r=ro.now(),i=t.reduce((e,t)=>e.add(t.key),s$()),s,o;return e.persistence.runTransaction("Locally write mutations","readwrite",n=>{let a=sN,l=s$();return e.Gi.getEntries(n,i).next(e=>{(a=e).forEach((e,t)=>{t.isValidDocument()||(l=l.add(e))})}).next(()=>e.localDocuments.getOverlayedDocuments(n,a)).next(i=>{s=i;let o=[];for(let a of t){let l=sb(a,s.get(a.key).overlayedDocument);null!=l&&o.push(new sx(a.key,l,ib(l.value.mapValue),sp.exists(!0)))}return e.mutationQueue.addMutationBatch(n,r,o,t)}).next(t=>{o=t;let r=t.applyToLocalDocumentSet(s,l);return e.documentOverlayCache.saveOverlays(n,t.batchId,r)})}).then(()=>({batchId:o.batchId,changes:sM(s)}))}(r.localStore,t),l;
2737r.sharedClientState.addPendingMutation(a.batchId),i=r,s=a.batchId,(l=i.hc[i.currentUser.toKey()])||(l=new rZ(rr)),l=l.insert(s,n),i.hc[i.currentUser.toKey()]=l,await uH(r,a.changes),await l3(r.remoteStore)}catch(c){let u=uu(c,"Failed to persist write");n.reject(u)}}async function uF(e,t){var n;try{let r=await function(e,t){var n;let r=e,i=t.snapshotVersion,s=r.Ui;return r.persistence.runTransaction("Apply remote event","readwrite-primary",e=>{let n=r.Gi.newChangeBuffer({trackRemovals:!0});s=r.Ui;let o=[];t.targetChanges.forEach((n,a)=>{var l,u,c;let h=s.get(a);if(!h)return;o.push(r.Cs.removeMatchingKeys(e,n.removedDocuments,a).next(()=>r.Cs.addMatchingKeys(e,n.addedDocuments,a)));let d=h.withSequenceNumber(e.currentSequenceNumber);t.targetMismatches.has(a)?d=d.withResumeToken(rK.EMPTY_BYTE_STRING,ra.min()).withLastLimboFreeSnapshotVersion(ra.min()):n.resumeToken.approximateByteSize()>0&&(d=d.withResumeToken(n.resumeToken,i)),s=s.insert(a,d),u=d,(0===h.resumeToken.approximateByteSize()||u.snapshotVersion.toMicroseconds()-h.snapshotVersion.toMicroseconds()>=3e8||n.addedDocuments.size+n.modifiedDocuments.size+n.removedDocuments.size>0)&&o.push(r.Cs.updateTargetData(e,d))});let a=sN,l=s$();if(t.documentUpdates.forEach(n=>{t.resolvedLimboDocuments.has(n)&&o.push(r.persistence.referenceDelegate.updateLimboDocument(e,n))}),o.push(lu(e,n,t.documentUpdates).next(e=>{a=e.Wi,l=e.zi})),!i.isEqual(ra.min())){let u=r.Cs.getLastRemoteSnapshotVersion(e).next(t=>r.Cs.setTargetsMetadata(e,e.currentSequenceNumber,i));o.push(u)}return rT.waitFor(o).next(()=>n.apply(e)).next(()=>r.localDocuments.getLocalViewOfDocuments(e,a,l)).next(()=>a)}).then(e=>(r.Ui=s,e))}(e.localStore,t);
2737t.targetChanges.forEach((t,n)=>{var r,i,s;let o=e.cc.get(n);o&&(t.addedDocuments.size+t.modifiedDocuments.size+t.removedDocuments.size<=1||nX(),t.addedDocuments.size>0?o.nc=!0:t.modifiedDocuments.size>0?(i=o.nc)||nX():t.removedDocuments.size>0&&(o.nc||nX(),o.nc=!1))}),await uH(e,r,t)}catch(i){await rS(i)}}function uM(e,t,n){var r;let i=e;if(i.isPrimaryClient&&0===n||!i.isPrimaryClient&&1===n){let s=[];i.ic.forEach((e,n)=>{let r=n.view.Pu(t);r.snapshot&&s.push(r.snapshot)}),function(e,t){var n;let r=e;r.onlineState=t;let i=!1;r.queries.forEach((e,n)=>{for(let r of n.listeners)r.Pu(t)&&(i=!0)}),i&&u_(r)}(i.eventManager,t),s.length&&i.sc.zo(s),i.onlineState=t,i.isPrimaryClient&&i.sharedClientState.setOnlineState(t)}}async function uL(e,t,n){var r;let i=e;i.sharedClientState.updateQueryState(t,"rejected",n);let s=i.cc.get(t),o=s&&s.key;if(o){let a=new rZ(rd.comparator);a=a.insert(o,iw.newNoDocument(o,ra.min()));let l=s$().add(o),u=new sz(ra.min(),new Map,new rz(rr),a,l);await uF(i,u),i.uc=i.uc.remove(o),i.cc.delete(t),uW(i)}else await ld(i.localStore,t,!1).then(()=>uV(i,t,n)).catch(rS)}async function uj(e,t){var n;let r=t.batch.batchId;try{let i=await function(e,t){var n;return e.persistence.runTransaction("Acknowledge batch","readwrite-primary",n=>{let r=t.batch.keys(),i=e.Gi.newChangeBuffer({trackRemovals:!0});return(function(e,t,n,r){let i=n.batch,s=i.keys(),o=rT.resolve();return s.forEach(e=>{o=o.next(()=>r.getEntry(t,e)).next(t=>{let s=n.docVersions.get(e);null!==s||nX(),0>t.version.compareTo(s)&&(i.applyToRemoteDocument(t,n),t.isValidDocument()&&(t.setReadTime(n.commitVersion),r.addEntry(t)))})}),o.next(()=>e.mutationQueue.removeMutationBatch(t,i))})(e,n,t,i).next(()=>i.apply(n)).next(()=>e.mutationQueue.performConsistencyCheck(n)).next(()=>e.documentOverlayCache.removeOverlaysForBatchId(n,r,t.batch.batchId)).next(()=>e.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(n,function(e){let t=s$();for(let n=0;n<e.mutationResults.length;++n)e.mutationResults[n].transformResults.length>0&&(t=t.add(e.batch.mutations[n].key));return t}(t))).next(()=>e.localDocuments.getDocuments(n,r))})}(e.localStore,t);u$(e,r,null),uZ(e,r),e.sharedClientState.updateMutationState(r,"acknowledged"),await uH(e,i)}catch(s){await rS(s)}}async function uU(e,t,n){var r;try{let i=await function(e,t){var n;return e.persistence.runTransaction("Reject batch","readwrite-primary",n=>{let r;return e.mutationQueue.lookupMutationBatch(n,t).next(t=>(null!==t||nX(),r=t.keys(),e.mutationQueue.removeMutationBatch(n,t))).next(()=>e.mutationQueue.performConsistencyCheck(n)).next(()=>e.documentOverlayCache.removeOverlaysForBatchId(n,r,t)).next(()=>e.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(n,r)).next(()=>e.localDocuments.getDocuments(n,r))})}(e.localStore,t);u$(e,t,n),uZ(e,t),e.sharedClientState.updateMutationState(t,"rejected",n),await uH(e,i)}catch(s){await rS(s)}}async function uB(e,t){var n;lX(e.remoteStore)||nH("SyncEngine","The network is disabled. The task returned by 'awaitPendingWrites()' will not complete until the network is enabled.");try{let r=await function(e){var t;return e.persistence.runTransaction("Get highest unacknowledged batch id","readonly",t=>e.mutationQueue.getHighestUnacknowledgedBatchId(t))}(e.localStore);if(-1===r)return void t.resolve();let i=e.lc.get(r)||[];i.push(t),e.lc.set(r,i)}catch(o){let s=uu(o,"Initialization of waitForPendingWrites() operation failed");t.reject(s)}}function uZ(e,t){(e.lc.get(t)||[]).forEach(e=>{e.resolve()}),e.lc.delete(t)}function u$(e,t,n){var r;let i=e,s=i.hc[i.currentUser.toKey()];if(s){let o=s.get(t);o&&(n?o.reject(n):o.resolve(),s=s.remove(t)),i.hc[i.currentUser.toKey()]=s}}function uV(e,t,n=null){for(let r of(e.sharedClientState.removeLocalQueryTarget(t),e.rc.get(t)))e.ic.delete(r),n&&e.sc.wc(r,n);e.rc.delete(t),e.isPrimaryClient&&e.ac.ls(t).forEach(t=>{e.ac.containsKey(t)||uz(e,t)})}function uz(e,t){e.oc.delete(t.path.canonicalString());let n=e.uc.get(t);null!==n&&(lW(e.remoteStore,n),e.uc=e.uc.remove(t),e.cc.delete(n),uW(e))}function uq(e,t,n){for(let r of n)r instanceof uT?(e.ac.addReference(r.key,t),uG(e,r)):r instanceof uI?(nH("SyncEngine","Document no longer in limbo: "+r.key),e.ac.removeReference(r.key,t),e.ac.containsKey(r.key)||uz(e,r.key)):nX()}function uG(e,t){let n=t.key,r=n.path.canonicalString();e.uc.get(n)||e.oc.has(r)||(nH("SyncEngine","New document in limbo: "+n),e.oc.add(r),uW(e))}function uW(e){for(;e.oc.size>0&&e.uc.size<e.maxConcurrentLimboResolutions;){let t=e.oc.values().next().value;e.oc.delete(t);let n=new rd(ru.fromString(t)),r=e.fc.next();e.cc.set(r,new uR(n)),e.uc=e.uc.insert(n,r),lG(e.remoteStore,new oz(iX(iG(n.path)),r,2,rL.at))}}async function uH(e,t,n){var r;let i=[],s=[],o=[];e.ic.isEmpty()||(e.ic.forEach((r,a)=>{o.push(e._c(a,t,n).then(t=>
2737{if((t||n)&&e.isPrimaryClient&&e.sharedClientState.updateQueryState(a.targetId,(null==t?void 0:t.fromCache)?"not-current":"current"),t){i.push(t);let r=lr.Ci(a.targetId,t);s.push(r)}}))}),await Promise.all(o),e.sc.zo(i),await async function(e,t){var n;let r=e;try{await r.persistence.runTransaction("notifyLocalViewChanges","readwrite",e=>rT.forEach(t,t=>rT.forEach(t.Si,n=>r.persistence.referenceDelegate.addReference(e,t.targetId,n)).next(()=>rT.forEach(t.Di,n=>r.persistence.referenceDelegate.removeReference(e,t.targetId,n)))))}catch(i){if(!rA(i))throw i;nH("LocalStore","Failed to update sequence numbers: "+i)}for(let s of t){let o=s.targetId;if(!s.fromCache){let a=r.Ui.get(o),l=a.snapshotVersion,u=a.withLastLimboFreeSnapshotVersion(l);r.Ui=r.Ui.insert(o,u)}}}(e.localStore,s))}async function uK(e,t){var n,r,i;let s=e;if(!s.currentUser.isEqual(t)){nH("SyncEngine","User change. New user:",t.toKey());let o=await la(s.localStore,t);s.currentUser=t,i="'waitForPendingWrites' promise is rejected due to a user change.",(r=s).lc.forEach(e=>{e.forEach(e=>{e.reject(new n1(n0.CANCELLED,i))})}),r.lc.clear(),s.sharedClientState.handleUserChange(t,o.removedBatchIds,o.addedBatchIds),await uH(s,o.ji)}}function uY(e,t){var n;let r=e.cc.get(t);if(r&&r.nc)return s$().add(r.key);{let i=s$(),s=e.rc.get(t);if(!s)return i;for(let o of s){let a=e.ic.get(o);i=i.unionWith(a.view.ju)}return i}}async function uQ(e,t){var n;let r=await lf(e.localStore,t.query,!0),i=t.view.tc(r);return e.isPrimaryClient&&uq(e,t.targetId,i.Xu),i}async function uX(e,t){var n;return lm(e.localStore,t).then(t=>uH(e,t))}async function uJ(e,t,n,r){var i;let s=await function(e,t){var n,r;let i=r=e.mutationQueue;return e.persistence.runTransaction("Lookup mutation documents","readonly",n=>i.Tn(n,t).next(t=>t?e.localDocuments.getDocuments(n,t):rT.resolve(null)))}(e.localStore,t);null!==s?("pending"===n?await l3(e.remoteStore):"acknowledged"===n||"rejected"===n?(u$(e,t,r||null),uZ(e,t),function(e,t){var n,r;(r=e.mutationQueue).An(t)}(e.localStore,t)):nX(),await uH(e,s)):nH("SyncEngine","Cannot apply mutation batch with id: "+t)}async function u0(e,t){var n;let r=e;if(u6(r),u8(r),!0===t&&!0!==r.dc){let i=r.sharedClientState.getAllActiveQueryTargets(),s=await u1(r,i.toArray());for(let o of(r.dc=!0,await us(r.remoteStore,!0),s))lG(r.remoteStore,o)}else if(!1===t&&!1!==r.dc){let a=[],l=Promise.resolve();r.rc.forEach((e,t)=>{r.sharedClientState.isLocalQueryTarget(t)?a.push(t):l=l.then(()=>(uV(r,t),ld(r.localStore,t,!0))),lW(r.remoteStore,t)}),await l,await u1(r,a),function(e){var t;let n=e;n.cc.forEach((e,t)=>{lW(n.remoteStore,t)}),n.ac.fs(),n.cc=new Map,n.uc=new rZ(rd.comparator)}(r),r.dc=!1,await us(r.remoteStore,!1)}}async function u1(e,t,n){var r;let i=[],s=[];for(let o of t){let a,l=e.rc.get(o);if(l&&0!==l.length)for(let u of(a=await lh(e.localStore,iX(l[0])),l)){let c=e.ic.get(u),h=await uQ(e,c);h.snapshot&&s.push(h.snapshot)}else{let d=await lp(e.localStore,o);await uD(e,u2(d),o,!1,(a=await lh(e.localStore,d)).resumeToken)}i.push(a)}return e.sc.zo(s),i}function u2(e){return iq(e.path,e.collectionGroup,e.orderBy,e.filters,e.limit,"F",e.startAt,e.endAt)}function u4(e){var t,n,r;return(r=(n=e.localStore).persistence).vi()}async function u5(e,t,n,r){var i;if(e.dc)return void nH("SyncEngine","Ignoring unexpected query state notification.");let s=e.rc.get(t);if(s&&s.length>0)switch(n){case"current":case"not-current":{let o=await lm(e.localStore,i5(s[0])),a=sz.createSynthesizedRemoteEventForCurrentChange(t,"current"===n,rK.EMPTY_BYTE_STRING);await uH(e,o,a);break}case"rejected":await ld(e.localStore,t,!0),uV(e,t,r);break;default:nX()}}async function u3(e,t,n){let r=u6(e);if(r.dc){for(let i of t){if(r.rc.has(i)){nH("SyncEngine","Adding an already active target "+i);continue}let s=await lp(r.localStore,i),o=await lh(r.localStore,s);await uD(r,u2(s),o.targetId,!1,o.resumeToken),lG(r.remoteStore,o)}
2737for(let a of n)r.rc.has(a)&&await ld(r.localStore,a,!1).then(()=>{lW(r.remoteStore,a),uV(r,a)}).catch(rS)}}function u6(e){var t;let n=e;return n.remoteStore.remoteSyncer.applyRemoteEvent=uF.bind(null,n),n.remoteStore.remoteSyncer.getRemoteKeysForTarget=uY.bind(null,n),n.remoteStore.remoteSyncer.rejectListen=uL.bind(null,n),n.sc.zo=uy.bind(null,n.eventManager),n.sc.wc=uv.bind(null,n.eventManager),n}function u8(e){var t;let n=e;return n.remoteStore.remoteSyncer.applySuccessfulWrite=uj.bind(null,n),n.remoteStore.remoteSyncer.rejectFailedWrite=uU.bind(null,n),n}class u7{constructor(){this.synchronizeTabs=!1}async initialize(e){this.It=lM(e.databaseInfo.databaseId),this.sharedClientState=this.gc(e),this.persistence=this.yc(e),await this.persistence.start(),this.localStore=this.Ic(e),this.gcScheduler=this.Tc(e,this.localStore),this.indexBackfillerScheduler=this.Ec(e,this.localStore)}Tc(e,t){return null}Ec(e,t){return null}Ic(e){return lo(this.persistence,new li,e.initialUser,this.It)}yc(e){return new a4(a3.Bs,this.It)}gc(e){return new lC}async terminate(){this.gcScheduler&&this.gcScheduler.stop(),await this.sharedClientState.shutdown(),await this.persistence.shutdown()}}class u9 extends u7{constructor(e,t,n){super(),this.Ac=e,this.cacheSizeBytes=t,this.forceOwnership=n,this.synchronizeTabs=!1}async initialize(e){await super.initialize(e),await this.Ac.initialize(this,e),await u8(this.Ac.syncEngine),await l3(this.Ac.remoteStore),await this.persistence.li(()=>(this.gcScheduler&&!this.gcScheduler.started&&this.gcScheduler.start(),this.indexBackfillerScheduler&&!this.indexBackfillerScheduler.started&&this.indexBackfillerScheduler.start(),Promise.resolve()))}Ic(e){return lo(this.persistence,new li,e.initialUser,this.It)}Tc(e,t){let n=this.persistence.referenceDelegate.garbageCollector;return new aP(n,e.asyncQueue,t)}Ec(e,t){let n=new rM(t,this.persistence);return new rF(e.asyncQueue,n)}yc(e){let t=ln(e.databaseInfo.databaseId,e.databaseInfo.persistenceKey),n=void 0!==this.cacheSizeBytes?a_.withCacheSize(this.cacheSizeBytes):a_.DEFAULT;return new a9(this.synchronizeTabs,t,e.clientId,n,e.asyncQueue,lP(),lF(),this.It,this.sharedClientState,!!this.forceOwnership)}gc(e){return new lC}}class ce extends u9{constructor(e,t){super(e,t,!1),this.Ac=e,this.cacheSizeBytes=t,this.synchronizeTabs=!0}async initialize(e){await super.initialize(e);let t=this.Ac.syncEngine;this.sharedClientState instanceof lk&&(this.sharedClientState.syncEngine={Fr:uJ.bind(null,t),$r:u5.bind(null,t),Br:u3.bind(null,t),vi:u4.bind(null,t),Mr:uX.bind(null,t)},await this.sharedClientState.start()),await this.persistence.li(async e=>{await u0(this.Ac.syncEngine,e),this.gcScheduler&&(e&&!this.gcScheduler.started?this.gcScheduler.start():e||this.gcScheduler.stop()),this.indexBackfillerScheduler&&(e&&!this.indexBackfillerScheduler.started?this.indexBackfillerScheduler.start():e||this.indexBackfillerScheduler.stop())})}gc(e){let t=lP();if(!lk.C(t))throw new n1(n0.UNIMPLEMENTED,"IndexedDB persistence is only available on platforms that support LocalStorage.");let n=ln(e.databaseInfo.databaseId,e.databaseInfo.persistenceKey);return new lk(t,e.asyncQueue,n,e.clientId,e.initialUser)}}class ct{async initialize(e,t){this.localStore||(this.localStore=e.localStore,this.sharedClientState=e.sharedClientState,this.datastore=this.createDatastore(t),this.remoteStore=this.createRemoteStore(t),this.eventManager=this.createEventManager(t),this.syncEngine=this.createSyncEngine(t,!e.synchronizeTabs),this.sharedClientState.onlineStateHandler=e=>uM(this.syncEngine,e,1),this.remoteStore.remoteSyncer.handleCredentialChange=uK.bind(null,this.syncEngine),await us(this.remoteStore,this.syncEngine.isPrimaryClient))}createEventManager(e){return new up}createDatastore(e){var t,n,r,i,s;let o=lM(e.databaseInfo.databaseId),a=(t=e.databaseInfo,new lN(t));return n=e.authCredentials,r=e.appCheckCredentials,new lZ(n,r,a,o)}createRemoteStore(e){var t,n,r,i,s;return t=this.localStore,n=this.datastore,r=e.asyncQueue,i=e=>uM(this.syncEngine,e,0),s=lA.C()?new lA:new lR,new lV(t,n,r,i,s)}createSyncEngine(e,t){return function(e,t,n,r,i,s,o){let a=new uA(e,t,n,r,i,s);return o&&(a.dc=!0),a}(this.localStore,this.remoteStore,this.eventManager,this.sharedCl
2737ientState,e.initialUser,e.maxConcurrentLimboResolutions,t)}terminate(){return async function(e){var t;nH("RemoteStore","RemoteStore shutting down."),e.wu.add(5),await lq(e),e.gu.shutdown(),e.yu.set("Unknown")}(this.remoteStore)}}/** 2738 * @license 2739 * Copyright 2017 Google LLC 2740 * 2741 * Licensed under the Apache License, Version 2.0 (the "License"); 2742 * you may not use this file except in compliance with the License. 2743 * You may obtain a copy of the License at 2744 * 2745 * http://www.apache.org/licenses/LICENSE-2.0 2746 * 2747 * Unless required by applicable law or agreed to in writing, software 2748 * distributed under the License is distributed on an "AS IS" BASIS, 2749 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2750 * See the License for the specific language governing permissions and 2751 * limitations under the License. 2752 */ function cn(e,t,n){if(!n)throw new n1(n0.INVALID_ARGUMENT,`Function ${e}() cannot be called with an empty ${t}.`)}function cr(e,t,n,r){if(!0===t&&!0===r)throw new n1(n0.INVALID_ARGUMENT,`${e} and ${n} cannot be used together.`)}function ci(e){if(!rd.isDocumentKey(e))throw new n1(n0.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${e} has ${e.length}.`)}function cs(e){if(rd.isDocumentKey(e))throw new n1(n0.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${e} has ${e.length}.`)}function co(e){if(void 0===e)return"undefined";if(null===e)return"null";if("string"==typeof e)return e.length>20&&(e=`${e.substring(0,20)}...`),JSON.stringify(e);if("number"==typeof e||"boolean"==typeof e)return""+e;if("object"==typeof e){if(e instanceof Array)return"an array";{var t;let n=(t=e).constructor?t.constructor.name:null;return n?`a custom ${n} object`:"an object"}}return"function"==typeof e?"a function":nX()}function ca(e,t){if("_delegate"in e&&(e=e._delegate),!(e instanceof t)){if(t.name===e.constructor.name)throw new n1(n0.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{let n=co(e);throw new n1(n0.INVALID_ARGUMENT,`Expected type '${t.name}', but it was: ${n}`)}}return e}function cl(e,t){if(t<=0)throw new n1(n0.INVALID_ARGUMENT,`Function ${e}() requires a positive number, but it was: ${t}.`)}/** 2753 * @license 2754 * Copyright 2020 Google LLC 2755 * 2756 * Licensed under the Apache License, Version 2.0 (the "License"); 2757 * you may not use this file except in compliance with the License. 2758 * You may obtain a copy of the License at 2759 * 2760 * http://www.apache.org/licenses/LICENSE-2.0 2761 * 2762 * Unless required by applicable law or agreed to in writing, software 2763 * distributed under the License is distributed on an "AS IS" BASIS, 2764 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2765 * See the License for the specific language governing permissions and 2766 * limitations under the License. 2767 */ let cu=new Map;class cc{constructor(e){var t;if(void 0===e.host){if(void 0!==e.ssl)throw new n1(n0.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=e.host,this.ssl=null===(t=e.ssl)||void 0===t||t;if(this.credentials=e.credentials,this.ignoreUndefinedProperties=!!e.ignoreUndefinedProperties,void 0===e.cacheSizeBytes)this.cacheSizeBytes=41943040;else{if(-1!==e.cacheSizeBytes&&e.cacheSizeBytes<1048576)throw new n1(n0.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}this.experimentalForceLongPolling=!!e.experimentalForceLongPolling,this.experimentalAutoDetectLongPolling=!!e.experimentalAutoDetectLongPolling,this.useFetchStreams=!!e.useFetchStreams,cr("experimentalForceLongPolling",e.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",e.experimentalAutoDetectLongPolling)}isEqual(e){return this.host===e.host&&this.ssl===e.ssl&&this.credentials===e.credentials&&this.cacheSizeBytes===e.cacheSizeBytes&&this.experimentalForceLongPolling===e.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===e.experimentalAutoDetectLongPolling&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}}/** 2768 * @license 2769 * Copyright 2020 Google LLC 2770 * 2771 * Licensed under the Apache License, Version 2.0 (the "License");
2772 * you may not use this file except in compliance with the License. 2773 * You may obtain a copy of the License at 2774 * 2775 * http://www.apache.org/licenses/LICENSE-2.0 2776 * 2777 * Unless required by applicable law or agreed to in writing, software 2778 * distributed under the License is distributed on an "AS IS" BASIS, 2779 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2780 * See the License for the specific language governing permissions and 2781 * limitations under the License. 2782 */ class ch{constructor(e,t,n,r){this._authCredentials=e,this._appCheckCredentials=t,this._databaseId=n,this._app=r,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new cc({}),this._settingsFrozen=!1}get app(){if(!this._app)throw new n1(n0.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return void 0!==this._terminateTask}_setSettings(e){if(this._settingsFrozen)throw new n1(n0.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this._settings=new cc(e),void 0!==e.credentials&&(this._authCredentials=function(e){if(!e)return new n5;switch(e.type){case"gapi":let t=e.client;return new n7(t,e.sessionIndex||"0",e.iamToken||null,e.authTokenFactory||null);case"provider":return e.client;default:throw new n1(n0.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}}(e.credentials))}_getSettings(){return this._settings}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return this._terminateTask||(this._terminateTask=this._terminate()),this._terminateTask}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return function(e){let t=cu.get(e);t&&(nH("ComponentProvider","Removing Datastore"),cu.delete(e),t.terminate())}(this),Promise.resolve()}}function cd(e,t,n,r={}){var i;let s=(e=ca(e,ch))._getSettings();if("firestore.googleapis.com"!==s.host&&s.host!==t&&nY("Host has been set in both settings() and useEmulator(), emulator host will be used"),e._setSettings(Object.assign(Object.assign({},s),{host:`${t}:${n}`,ssl:!1})),r.mockUserToken){let o,a;if("string"==typeof r.mockUserToken)o=r.mockUserToken,a=nV.MOCK_USER;else{o=(0,m.Sg)(r.mockUserToken,null===(i=e._app)||void 0===i?void 0:i.options.projectId);let l=r.mockUserToken.sub||r.mockUserToken.user_id;if(!l)throw new n1(n0.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");a=new nV(l)}e._authCredentials=new n3(new n4(o,a))}}/** 2783 * @license 2784 * Copyright 2020 Google LLC 2785 * 2786 * Licensed under the Apache License, Version 2.0 (the "License"); 2787 * you may not use this file except in compliance with the License. 2788 * You may obtain a copy of the License at 2789 * 2790 * http://www.apache.org/licenses/LICENSE-2.0 2791 * 2792 * Unless required by applicable law or agreed to in writing, software 2793 * distributed under the License is distributed on an "AS IS" BASIS, 2794 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2795 * See the License for the specific language governing permissions and 2796 * limitations under the License. 2797 */ class cf{constructor(e,t,n){this.converter=t,this._key=n,this.type="document",this.firestore=e}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new cm(this.firestore,this.converter,this._key.path.popLast())}withConverter(e){return new cf(this.firestore,e,this._key)}}class cp{constructor(e,t,n){this.converter=t,this._query=n,this.type="query",this.firestore=e}withConverter(e){return new cp(this.firestore,e,this._query)}}class cm extends cp{constructor(e,t,n){super(e,t,iG(n)),this._path=n,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){let e=this._path.popLast();
2797return e.isEmpty()?null:new cf(this.firestore,null,new rd(e))}withConverter(e){return new cm(this.firestore,e,this._path)}}function cg(e,t,...n){if(e=(0,m.m9)(e),cn("collection","path",t),e instanceof ch){let r=ru.fromString(t,...n);return cs(r),new cm(e,null,r)}{if(!(e instanceof cf||e instanceof cm))throw new n1(n0.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");let i=e._path.child(ru.fromString(t,...n));return cs(i),new cm(e.firestore,null,i)}}function cy(e,t){var n;if(e=ca(e,ch),cn("collectionGroup","collection id",t),t.indexOf("/")>=0)throw new n1(n0.INVALID_ARGUMENT,`Invalid collection ID '${t}' passed to function collectionGroup(). Collection IDs must not contain '/'.`);return new cp(e,null,new iz(ru.emptyPath(),t))}function cv(e,t,...n){if(e=(0,m.m9)(e),1===arguments.length&&(t=rn.R()),cn("doc","path",t),e instanceof ch){let r=ru.fromString(t,...n);return ci(r),new cf(e,null,new rd(r))}{if(!(e instanceof cf||e instanceof cm))throw new n1(n0.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");let i=e._path.child(ru.fromString(t,...n));return ci(i),new cf(e.firestore,e instanceof cm?e.converter:null,new rd(i))}}function c_(e,t){return e=(0,m.m9)(e),t=(0,m.m9)(t),(e instanceof cf||e instanceof cm)&&(t instanceof cf||t instanceof cm)&&e.firestore===t.firestore&&e.path===t.path&&e.converter===t.converter}function cb(e,t){return e=(0,m.m9)(e),t=(0,m.m9)(t),e instanceof cp&&t instanceof cp&&e.firestore===t.firestore&&i0(e._query,t._query)&&e.converter===t.converter}/** 2798 * @license 2799 * Copyright 2020 Google LLC 2800 * 2801 * Licensed under the Apache License, Version 2.0 (the "License"); 2802 * you may not use this file except in compliance with the License. 2803 * You may obtain a copy of the License at 2804 * 2805 * http://www.apache.org/licenses/LICENSE-2.0 2806 * 2807 * Unless required by applicable law or agreed to in writing, software 2808 * distributed under the License is distributed on an "AS IS" BASIS, 2809 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2810 * See the License for the specific language governing permissions and 2811 * limitations under the License. 2812 */ function cw(e,t=10240){let n=0;return{async read(){if(n<e.byteLength){let r={value:e.slice(n,n+t),done:!1};return n+=t,r}return{done:!0}},async cancel(){},releaseLock(){},closed:Promise.reject("unimplemented")}}/** 2813 * @license 2814 * Copyright 2020 Google LLC 2815 * 2816 * Licensed under the Apache License, Version 2.0 (the "License"); 2817 * you may not use this file except in compliance with the License. 2818 * You may obtain a copy of the License at 2819 * 2820 * http://www.apache.org/licenses/LICENSE-2.0 2821 * 2822 * Unless required by applicable law or agreed to in writing, software 2823 * distributed under the License is distributed on an "AS IS" BASIS, 2824 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2825 * See the License for the specific language governing permissions and 2826 * limitations under the License. 2827 */ /** 2828 * @license 2829 * Copyright 2017 Google LLC 2830 * 2831 * Licensed under the Apache License, Version 2.0 (the "License"); 2832 * you may not use this file except in compliance with the License. 2833 * You may obtain a copy of the License at 2834 * 2835 * http://www.apache.org/licenses/LICENSE-2.0 2836 * 2837 * Unless required by applicable law or agreed to in writing, software 2838 * distributed under the License is distributed on an "AS IS" BASIS, 2839 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2840 * See the License for the specific language governing permissions and 2841 * limitations under the License. 2842 */ class cE{constructor(e){this.observer=e,this.muted=!1}next(e){this.observer.next&&this.Rc(this.observer.next,e)}error(e){this.observer.error?this.Rc(this.observer.error,e):nK("Uncaught Error in snapshot listener:",e)}bc(){this.muted=!0}Rc(e,t){this.muted||setTimeout(()=>{this.muted||e(t)},0)}}/** 2843 * @license 2844 * Copyright 2020 Google LLC 2845 * 2846 * Licensed under the Apache License, Version 2.0 (the "License");
2847 * you may not use this file except in compliance with the License. 2848 * You may obtain a copy of the License at 2849 * 2850 * http://www.apache.org/licenses/LICENSE-2.0 2851 * 2852 * Unless required by applicable law or agreed to in writing, software 2853 * distributed under the License is distributed on an "AS IS" BASIS, 2854 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2855 * See the License for the specific language governing permissions and 2856 * limitations under the License. 2857 */ class cx{constructor(e,t){this.Pc=e,this.It=t,this.metadata=new n2,this.buffer=new Uint8Array,this.vc=new TextDecoder("utf-8"),this.Vc().then(e=>{e&&e.Ou()?this.metadata.resolve(e.payload.metadata):this.metadata.reject(Error(`The first element of the bundle is not a metadata, it is 2858 ${JSON.stringify(null==e?void 0:e.payload)}`))},e=>this.metadata.reject(e))}close(){return this.Pc.cancel()}async getMetadata(){return this.metadata.promise}async mc(){return await this.getMetadata(),this.Vc()}async Vc(){let e=await this.Sc();if(null===e)return null;let t=this.vc.decode(e),n=Number(t);isNaN(n)&&this.Dc(`length string (${t}) is not valid number`);let r=await this.Cc(n);return new uw(JSON.parse(r),e.length+n)}xc(){return this.buffer.findIndex(e=>123===e)}async Sc(){for(;0>this.xc()&&!await this.Nc(););if(0===this.buffer.length)return null;let e=this.xc();e<0&&this.Dc("Reached the end of bundle when a length string is expected.");let t=this.buffer.slice(0,e);return this.buffer=this.buffer.slice(e),t}async Cc(e){for(;this.buffer.length<e;)await this.Nc()&&this.Dc("Reached the end of bundle when more is expected.");let t=this.vc.decode(this.buffer.slice(0,e));return this.buffer=this.buffer.slice(e),t}Dc(e){throw this.Pc.cancel(),Error(`Invalid bundle format: ${e}`)}async Nc(){let e=await this.Pc.read();if(!e.done){let t=new Uint8Array(this.buffer.length+e.value.length);t.set(this.buffer),t.set(e.value,this.buffer.length),this.buffer=t}return e.done}}/** 2859 * @license 2860 * Copyright 2017 Google LLC 2861 * 2862 * Licensed under the Apache License, Version 2.0 (the "License"); 2863 * you may not use this file except in compliance with the License. 2864 * You may obtain a copy of the License at 2865 * 2866 * http://www.apache.org/licenses/LICENSE-2.0 2867 * 2868 * Unless required by applicable law or agreed to in writing, software 2869 * distributed under the License is distributed on an "AS IS" BASIS, 2870 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2871 * See the License for the specific language governing permissions and 2872 * limitations under the License. 2873 */ class cS{constructor(e){this.datastore=e,this.readVersions=new Map,this.mutations=[],this.committed=!1,this.lastWriteError=null,this.writtenDocs=new Set}async lookup(e){if(this.ensureCommitNotCalled(),this.mutations.length>0)throw new n1(n0.INVALID_ARGUMENT,"Firestore transactions require all reads to be executed before all writes.");let t=await async function(e,t){var n;let r=ot(e.It)+"/documents",i={documents:t.map(t=>s8(e.It,t))},s=await e._o("BatchGetDocuments",r,i,t.length),o=new Map;s.forEach(t=>{var n,r;let i=(n=e.It,"found"in t?function(e,t){var n;t.found||nX(),t.found.name,t.found.updateTime;let r=s7(e,t.found.name),i=s5(t.found.updateTime),s=new i_({mapValue:{fields:t.found.fields}});return iw.newFoundDocument(r,i,s)}(n,t):"missing"in t?function(e,t){var n,r;t.missing||nX(),!t.readTime&&nX();let i=s7(e,t.missing),s=s5(t.readTime);return iw.newNoDocument(i,s)}(n,t):nX());o.set(i.key.toString(),i)});let a=[];return t.forEach(e=>{let t=o.get(e.toString());t||nX(),a.push(t)}),a}(this.datastore,e);return t.forEach(e=>this.recordVersion(e)),t}set(e,t){this.write(t.toMutation(e,this.precondition(e))),this.writtenDocs.add(e.toString())}update(e,t){try{this.write(t.toMutation(e,this.preconditionForUpdate(e)))}catch(n){this.lastWriteError=n}this.writtenDocs.add(e.toString())}delete(e){this.write(new sk(e,this.precondition(e))),this.writtenDocs.add(e.toString())}async commit(){if(this.ensureCommitNotCalled(),this.lastWriteError)throw this.lastWriteError;let e=this.readVersions;this.mutations.forEach(t=>{e.delete(t.key.toString())}),e.forEach((e,t)=>{let n=rd.fromPath(t);
2873this.mutations.push(new sC(n,this.precondition(n)))}),await async function(e,t){var n;let r=ot(e.It)+"/documents",i={writes:t.map(t=>os(e.It,t))};await e.ao("Commit",r,i)}(this.datastore,this.mutations),this.committed=!0}recordVersion(e){let t;if(e.isFoundDocument())t=e.version;else{if(!e.isNoDocument())throw nX();t=ra.min()}let n=this.readVersions.get(e.key.toString());if(n){if(!t.isEqual(n))throw new n1(n0.ABORTED,"Document version changed between two reads.")}else this.readVersions.set(e.key.toString(),t)}precondition(e){let t=this.readVersions.get(e.toString());return!this.writtenDocs.has(e.toString())&&t?t.isEqual(ra.min())?sp.exists(!1):sp.updateTime(t):sp.none()}preconditionForUpdate(e){let t=this.readVersions.get(e.toString());if(!this.writtenDocs.has(e.toString())&&t){if(t.isEqual(ra.min()))throw new n1(n0.INVALID_ARGUMENT,"Can't update a document that doesn't exist.");return sp.updateTime(t)}return sp.exists(!0)}write(e){this.ensureCommitNotCalled(),this.mutations.push(e)}ensureCommitNotCalled(){}}/** 2874 * @license 2875 * Copyright 2019 Google LLC 2876 * 2877 * Licensed under the Apache License, Version 2.0 (the "License"); 2878 * you may not use this file except in compliance with the License. 2879 * You may obtain a copy of the License at 2880 * 2881 * http://www.apache.org/licenses/LICENSE-2.0 2882 * 2883 * Unless required by applicable law or agreed to in writing, software 2884 * distributed under the License is distributed on an "AS IS" BASIS, 2885 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2886 * See the License for the specific language governing permissions and 2887 * limitations under the License. 2888 */ class cT{constructor(e,t,n,r,i){this.asyncQueue=e,this.datastore=t,this.options=n,this.updateFunction=r,this.deferred=i,this.kc=n.maxAttempts,this.No=new lL(this.asyncQueue,"transaction_retry")}run(){this.kc-=1,this.Oc()}Oc(){this.No.Ro(async()=>{let e=new cS(this.datastore),t=this.Mc(e);t&&t.then(t=>{this.asyncQueue.enqueueAndForget(()=>e.commit().then(()=>{this.deferred.resolve(t)}).catch(e=>{this.Fc(e)}))}).catch(e=>{this.Fc(e)})})}Mc(e){try{let t=this.updateFunction(e);return!r5(t)&&t.catch&&t.then?t:(this.deferred.reject(Error("Transaction callback must return a Promise")),null)}catch(n){return this.deferred.reject(n),null}}Fc(e){this.kc>0&&this.$c(e)?(this.kc-=1,this.asyncQueue.enqueueAndForget(()=>(this.Oc(),Promise.resolve()))):this.deferred.reject(e)}$c(e){if("FirebaseError"===e.name){let t=e.code;return"aborted"===t||"failed-precondition"===t||!sA(t)}return!1}}/** 2889 * @license 2890 * Copyright 2017 Google LLC 2891 * 2892 * Licensed under the Apache License, Version 2.0 (the "License"); 2893 * you may not use this file except in compliance with the License. 2894 * You may obtain a copy of the License at 2895 * 2896 * http://www.apache.org/licenses/LICENSE-2.0 2897 * 2898 * Unless required by applicable law or agreed to in writing, software 2899 * distributed under the License is distributed on an "AS IS" BASIS, 2900 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2901 * See the License for the specific language governing permissions and 2902 * limitations under the License. 2903 */ class cI{constructor(e,t,n,r){this.authCredentials=e,this.appCheckCredentials=t,this.asyncQueue=n,this.databaseInfo=r,this.user=nV.UNAUTHENTICATED,this.clientId=rn.R(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this.authCredentials.start(n,async e=>{nH("FirestoreClient","Received user=",e.uid),await this.authCredentialListener(e),this.user=e}),this.appCheckCredentials.start(n,e=>(nH("FirestoreClient","Received new app check token=",e),this.appCheckCredentialListener(e,this.user)))}async getConfiguration(){return{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(e){this.authCredentialListener=e}setAppCheckTokenChangeListener(e){this.appCheckCredentialListener=e}verifyNotTerminated(){if(this.asyncQueue.isShuttingDown)throw new n1(n0.FAILED_PRECONDITION,"The client has already been terminated.")}terminate(){this.asyncQueue.enterRestrictedMode();let e=new n2;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(async()=>{try{this.onlineComponents&&await this.onlineComponents.terminate(),this.offlineComponents&&await this.offlineComponents.terminate(),this.authCredentials.shutdown(),this.appCheckCredentials.shutdown(),e.resolve()}catch(n){let t=uu(n,"Failed to shutdown persistence");e.reject(t)}}),e.promise}}async function ck(e,t){e.asyncQueue.verifyOperationInProgress(),nH("FirestoreClient","Initializing OfflineComponentProvider");let n=await e.getConfiguration();await t.initialize(n);let r=n.initialUser;e.setCredentialChangeListener(async e=>{r.isEqual(e)||(await la(t.localStore,e),r=e)}),t.persistence.setDatabaseDeletedListener(()=>e.terminate()),e.offlineComponents=t}async function cC(e,t){e.asyncQueue.verifyOperationInProgress();let n=await cR(e);nH("FirestoreClient","Initializing OnlineComponentProvider");let r=await e.getConfiguration();await t.initialize(n,r),e.setCredentialChangeListener(e=>ui(t.remoteStore,e)),e.setAppCheckTokenChangeListener((e,n)=>ui(t.remoteStore,n)),e.onlineComponents=t}async function cR(e){return e.offlineComponents||(nH("FirestoreClient","Using default OfflineComponentProvider"),await ck(e,new u7)),e.offlineComponents}async function cA(e){return e.onlineComponents||(nH("FirestoreClient","Using default OnlineComponentProvider"),await cC(e,new ct)),e.onlineComponents}function cO(e){return cR(e).then(e=>e.persistence)}function cD(e){return cR(e).then(e=>e.localStore)}function cN(e){return cA(e).then(e=>e.remoteStore)}function cP(e){return cA(e).then(e=>e.syncEngine)}async function cF(e){let t=await cA(e),n=t.eventManager;return n.onListen=uO.bind(null,t.syncEngine),n.onUnlisten=uN.bind(null,t.syncEngine),n}function cM(e,t,n={}){let r=new n2;return e.asyncQueue.enqueueAndForget(async()=>(function(e,t,n,r,i){let s=new cE({next(s){t.enqueueAndForget(()=>ug(e,o));let a=s.docs.has(n);!a&&s.fromCache?i.reject(new n1(n0.UNAVAILABLE,"Failed to get document because the client is offline.")):a&&s.fromCache&&r&&"server"===r.source?i.reject(new n1(n0.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):i.resolve(s)},error:e=>i.reject(e)}),o=new ub(iG(n.path),s,{includeMetadataChanges:!0,ku:!0});return um(e,o)})(await cF(e),e.asyncQueue,t,n,r)),r.promise}function cL(e,t,n={}){let r=new n2;return e.asyncQueue.enqueueAndForget(async()=>(function(e,t,n,r,i){let s=new cE({next(n){t.enqueueAndForget(()=>ug(e,o)),n.fromCache&&"server"===r.source?i.reject(new n1(n0.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):i.resolve(n)},error:e=>i.reject(e)}),o=new ub(n,s,{includeMetadataChanges:!0,ku:!0});return um(e,o)})(await cF(e),e.asyncQueue,t,n,r)),r.promise}
2903class cj{constructor(){this.Bc=Promise.resolve(),this.Lc=[],this.Uc=!1,this.qc=[],this.Kc=null,this.Gc=!1,this.Qc=!1,this.jc=[],this.No=new lL(this,"async_queue_retry"),this.Wc=()=>{let e=lF();e&&nH("AsyncQueue","Visibility state changed to "+e.visibilityState),this.No.Po()};let e=lF();e&&"function"==typeof e.addEventListener&&e.addEventListener("visibilitychange",this.Wc)}get isShuttingDown(){return this.Uc}enqueueAndForget(e){this.enqueue(e)}enqueueAndForgetEvenWhileRestricted(e){this.zc(),this.Hc(e)}enterRestrictedMode(e){if(!this.Uc){this.Uc=!0,this.Qc=e||!1;let t=lF();t&&"function"==typeof t.removeEventListener&&t.removeEventListener("visibilitychange",this.Wc)}}enqueue(e){if(this.zc(),this.Uc)return new Promise(()=>{});let t=new n2;return this.Hc(()=>this.Uc&&this.Qc?Promise.resolve():(e().then(t.resolve,t.reject),t.promise)).then(()=>t.promise)}enqueueRetryable(e){this.enqueueAndForget(()=>(this.Lc.push(e),this.Jc()))}async Jc(){if(0!==this.Lc.length){try{await this.Lc[0](),this.Lc.shift(),this.No.reset()}catch(e){if(!rA(e))throw e;nH("AsyncQueue","Operation failed with retryable error: "+e)}this.Lc.length>0&&this.No.Ro(()=>this.Jc())}}Hc(e){let t=this.Bc.then(()=>(this.Gc=!0,e().catch(e=>{var t;this.Kc=e,this.Gc=!1;let n,r=(n=e.message||"",e.stack&&(n=e.stack.includes(e.message)?e.stack:e.message+"\n"+e.stack),n);throw nK("INTERNAL UNHANDLED ERROR: ",r),e}).then(e=>(this.Gc=!1,e))));return this.Bc=t,t}enqueueAfterDelay(e,t,n){this.zc(),this.jc.indexOf(e)>-1&&(t=0);let r=ul.createAndSchedule(this,e,t,n,e=>this.Yc(e));return this.qc.push(r),r}zc(){this.Kc&&nX()}verifyOperationInProgress(){}async Xc(){let e;do await (e=this.Bc);while(e!==this.Bc)}Zc(e){for(let t of this.qc)if(t.timerId===e)return!0;return!1}ta(e){return this.Xc().then(()=>{for(let t of(this.qc.sort((e,t)=>e.targetTimeMs-t.targetTimeMs),this.qc))if(t.skipDelay(),"all"!==e&&t.timerId===e)break;return this.Xc()})}ea(e){this.jc.push(e)}Yc(e){let t=this.qc.indexOf(e);this.qc.splice(t,1)}}function cU(e){return function(e,t){if("object"!=typeof e||null===e)return!1;for(let n of t)if(n in e&&"function"==typeof e[n])return!0;return!1}(e,["next","error","complete"])}class cB{constructor(){this._progressObserver={},this._taskCompletionResolver=new n2,this._lastProgress={taskState:"Running",totalBytes:0,totalDocuments:0,bytesLoaded:0,documentsLoaded:0}}onProgress(e,t,n){this._progressObserver={next:e,error:t,complete:n}}catch(e){return this._taskCompletionResolver.promise.catch(e)}then(e,t){return this._taskCompletionResolver.promise.then(e,t)}_completeWith(e){this._updateProgress(e),this._progressObserver.complete&&this._progressObserver.complete(),this._taskCompletionResolver.resolve(e)}_failWith(e){this._lastProgress.taskState="Error",this._progressObserver.next&&this._progressObserver.next(this._lastProgress),this._progressObserver.error&&this._progressObserver.error(e),this._taskCompletionResolver.reject(e)}_updateProgress(e){this._lastProgress=e,this._progressObserver.next&&this._progressObserver.next(e)}}/** 2904 * @license 2905 * Copyright 2020 Google LLC 2906 * 2907 * Licensed under the Apache License, Version 2.0 (the "License"); 2908 * you may not use this file except in compliance with the License. 2909 * You may obtain a copy of the License at 2910 * 2911 * http://www.apache.org/licenses/LICENSE-2.0 2912 * 2913 * Unless required by applicable law or agreed to in writing, software 2914 * distributed under the License is distributed on an "AS IS" BASIS, 2915 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2916 * See the License for the specific language governing permissions and 2917 * limitations under the License. 2918 */ let cZ=-1;class c$ extends ch{constructor(e,t,n,r){super(e,t,n,r),this.type="firestore",this._queue=new cj,this._persistenceKey=(null==r?void 0:r.name)||"[DEFAULT]"}_terminate(){return this._firestoreClient||cz(this),this._firestoreClient.terminate()}}function cV(e){return e._firestoreClient||cz(e),e._firestoreClient.verifyNotTerminated(),e._firestoreClient}function cz(e){var t,n,r,i,s;let o=e._freezeSettings(),a=(n=e._databaseId,r=(null===(t=e._app)||void 0===t?void 0:t.options.appId)||"",i=e._persistenceKey,new r2(n,r,i,o.host,o.ssl,o.experimentalForceLongPolling,o.experimentalAutoDetectLongPolling,o.useFetchStreams));e._firestoreClient=new cI(e._authCredentials,e._appCheckCredentials,e._queue,a)}function cq(e,t){c0(e=ca(e,c$));let n=cV(e),r=e._freezeSettings(),i=new ct;return cW(n,i,new u9(i,r.cacheSizeBytes,null==t?void 0:t.forceOwnership))}function cG(e){c0(e=ca(e,c$));let t=cV(e),n=e._freezeSettings(),r=new ct;return cW(t,r,new ce(r,n.cacheSizeBytes))}function cW(e,t,n){let r=new n2;return e.asyncQueue.enqueue(async()=>{try{await ck(e,n),await cC(e,t),r.resolve()}catch(s){var i;if("FirebaseError"===s.name?s.code!==n0.FAILED_PRECONDITION&&s.code!==n0.UNIMPLEMENT
2918ED:!!("undefined"!=typeof DOMException&&s instanceof DOMException)&&22!==s.code&&20!==s.code&&11!==s.code)throw s;nY("Error enabling offline persistence. Falling back to persistence disabled: "+s),r.reject(s)}}).then(()=>r.promise)}function cH(e){if(e._initialized&&!e._terminated)throw new n1(n0.FAILED_PRECONDITION,"Persistence can only be cleared before a Firestore instance is initialized or after it is terminated.");let t=new n2;return e._queue.enqueueAndForgetEvenWhileRestricted(async()=>{try{await async function(e){if(!rk.C())return Promise.resolve();await rk.delete(e+"main")}(ln(e._databaseId,e._persistenceKey)),t.resolve()}catch(n){t.reject(n)}}),t.promise}function cK(e){return function(e){let t=new n2;return e.asyncQueue.enqueueAndForget(async()=>uB(await cP(e),t)),t.promise}(cV(e=ca(e,c$)))}function cY(e){var t;return(t=cV(e=ca(e,c$))).asyncQueue.enqueue(async()=>{let e=await cO(t),n=await cN(t);return e.setNetworkEnabled(!0),function(e){var t;return e.wu.delete(0),lz(e)}(n)})}function cQ(e){var t;return(t=cV(e=ca(e,c$))).asyncQueue.enqueue(async()=>{let e=await cO(t),n=await cN(t);return e.setNetworkEnabled(!1),async function(e){var t;e.wu.add(0),await lq(e),e.yu.set("Offline")}(n)})}function cX(e,t){let n=cV(e=ca(e,c$)),r=new cB;return function(e,t,n,r){var i,s,o,a;let l,u=(s=lM(t),o=function(e,t){if(e instanceof Uint8Array)return cw(e,t);if(e instanceof ArrayBuffer)return cw(new Uint8Array(e),t);if(e instanceof ReadableStream)return e.getReader();throw Error("Source of `toByteStreamReader` has to be a ArrayBuffer or ReadableStream")}("string"==typeof n?(new TextEncoder).encode(n):n),new cx(o,s));e.asyncQueue.enqueueAndForget(async()=>{!function(e,t,n){var r;(async function(e,t,n){try{let r=await t.getMetadata();if(await function(e,t){var n;let r=s5(t.createTime);return e.persistence.runTransaction("hasNewerBundle","readonly",n=>e.Ns.getBundleMetadata(n,t.id)).then(e=>!!e&&e.createTime.compareTo(r)>=0)}(e.localStore,r)){var i;return await t.close(),n._completeWith({taskState:"Success",documentsLoaded:r.totalDocuments,bytesLoaded:r.totalBytes,totalDocuments:r.totalDocuments,totalBytes:r.totalBytes}),Promise.resolve(new Set)}n._updateProgress(uS(r));let s=new ux(r,e.localStore,t.It),o=await t.mc();for(;o;){let a=await s.Fu(o);a&&n._updateProgress(a),o=await t.mc()}let l=await s.complete();return await uH(e,l.Lu,void 0),await function(e,t){var n;return e.persistence.runTransaction("Save bundle","readwrite",n=>e.Ns.saveBundleMetadata(n,t))}(e.localStore,r),n._completeWith(l.progress),Promise.resolve(l.Bu)}catch(u){return nY("SyncEngine",`Loading bundle failed with ${u}`),n._failWith(u),Promise.resolve(new Set)}})(e,t,n).then(t=>{e.sharedClientState.notifyBundleLoaded(t)})}(await cP(e),u,r)})}(n,e._databaseId,t,r),r}function cJ(e,t){var n,r;return(n=cV(e=ca(e,c$))).asyncQueue.enqueue(async()=>(function(e,t){var n;return e.persistence.runTransaction("Get named query","readonly",n=>e.Ns.getNamedQuery(n,t))})(await cD(n),t)).then(t=>t?new cp(e,null,t.query):null)}function c0(e){if(e._initialized||e._terminated)throw new n1(n0.FAILED_PRECONDITION,"Firestore has already been started and persistence can no longer be enabled. You can only enable persistence before calling any other methods on a Firestore object.")}/** 2919 * @license 2920 * Copyright 2020 Google LLC 2921 * 2922 * Licensed under the Apache License, Version 2.0 (the "License"); 2923 * you may not use this file except in compliance with the License. 2924 * You may obtain a copy of the License at 2925 * 2926 * http://www.apache.org/licenses/LICENSE-2.0 2927 * 2928 * Unless required by applicable law or agreed to in writing, software 2929 * distributed under the License is distributed on an "AS IS" BASIS, 2930 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2931 * See the License for the specific language governing permissions and 2932 * limitations under the License. 2933 */ /** 2934 * @license 2935 * Copyright 2020 Google LLC 2936 * 2937 * Licensed under the Apache License, Version 2.0 (the "License"); 2938 * you may not use this file except in compliance with the License. 2939 * You may obtain a copy of the License at 2940 * 2941 * http://www.apache.org/licenses/LICENSE-2.0 2942 * 2943 * Unless required by applicable law or agreed to in writing, softw
2943are 2944 * distributed under the License is distributed on an "AS IS" BASIS, 2945 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2946 * See the License for the specific language governing permissions and 2947 * limitations under the License. 2948 */ class c1{constructor(e){this._byteString=e}static fromBase64String(e){try{return new c1(rK.fromBase64String(e))}catch(t){throw new n1(n0.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+t)}}static fromUint8Array(e){return new c1(rK.fromUint8Array(e))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(e){return this._byteString.isEqual(e._byteString)}}/** 2949 * @license 2950 * Copyright 2020 Google LLC 2951 * 2952 * Licensed under the Apache License, Version 2.0 (the "License"); 2953 * you may not use this file except in compliance with the License. 2954 * You may obtain a copy of the License at 2955 * 2956 * http://www.apache.org/licenses/LICENSE-2.0 2957 * 2958 * Unless required by applicable law or agreed to in writing, software 2959 * distributed under the License is distributed on an "AS IS" BASIS, 2960 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2961 * See the License for the specific language governing permissions and 2962 * limitations under the License. 2963 */ class c2{constructor(...e){for(let t=0;t<e.length;++t)if(0===e[t].length)throw new n1(n0.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new rh(e)}isEqual(e){return this._internalPath.isEqual(e._internalPath)}}/** 2964 * @license 2965 * Copyright 2020 Google LLC 2966 * 2967 * Licensed under the Apache License, Version 2.0 (the "License"); 2968 * you may not use this file except in compliance with the License. 2969 * You may obtain a copy of the License at 2970 * 2971 * http://www.apache.org/licenses/LICENSE-2.0 2972 * 2973 * Unless required by applicable law or agreed to in writing, software 2974 * distributed under the License is distributed on an "AS IS" BASIS, 2975 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2976 * See the License for the specific language governing permissions and 2977 * limitations under the License. 2978 */ class c4{constructor(e){this._methodName=e}}/** 2979 * @license 2980 * Copyright 2017 Google LLC 2981 * 2982 * Licensed under the Apache License, Version 2.0 (the "License"); 2983 * you may not use this file except in compliance with the License. 2984 * You may obtain a copy of the License at 2985 * 2986 * http://www.apache.org/licenses/LICENSE-2.0 2987 * 2988 * Unless required by applicable law or agreed to in writing, software 2989 * distributed under the License is distributed on an "AS IS" BASIS, 2990 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2991 * See the License for the specific language governing permissions and 2992 * limitations under the License. 2993 */ class c5{constructor(e,t){if(!isFinite(e)||e<-90||e>90)throw new n1(n0.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(t)||t<-180||t>180)throw new n1(n0.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+t);this._lat=e,this._long=t}get latitude(){return this._lat}get longitude(){return this._long}isEqual(e){return this._lat===e._lat&&this._long===e._long}toJSON(){return{latitude:this._lat,longitude:this._long}}_compareTo(e){return rr(this._lat,e._lat)||rr(this._long,e._long)}}/** 2994 * @license 2995 * Copyright 2017 Google LLC 2996 * 2997 * Licensed under the Apache License, Version 2.0 (the "License"); 2998 * you may not use this file except in compliance with the License. 2999 * You may obtain a copy of the License at 3000 * 3001 * http://www.apache.org/licenses/LICENSE-2.0 3002 * 3003 * Unless required by applicable law or agreed to in writing, software 3004 * distributed under the License is distributed on an "AS IS" BASIS, 3005 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3006 * See the License for the specific language governing permissions and 3007 * limitations under the License. 3008 */ let c3=/^__.*__$/;class c6{constructor(e,t,n){this.data=e,this.fieldMask=t,this.fieldTransforms=n}toMutation(e,t){return null!==this.fieldMask?new sx(e,this.data,this.fieldMask,t,this.fieldTransforms):new sE(e,this.data,t,this.fieldTransforms)}}class c8{constructor(e,t,n){this.data=e,this.fieldMask=t,this.fieldTransforms=n}toMutation(e,t){return new sx(e,this.data,this.fieldMask,t,this.fieldTransforms)}}function c7(e){switch(e){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw nX()}}class c9{constructor(e,t,n,r,i,s){this.settings=e,this.databaseId=t,this.It=n,this.ignoreUndefinedProperties=r,void 0===i&&this.na(),this.fieldTransforms=i||[],this.fieldMask=s||[]}get path(){return this.settings.path}get sa(){return this.settings.sa}ia(e){return new c9(Object.assign(Object.assign({},this.settings),e),this.databaseId,this.It,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}ra(e){var t;let n=null===(t=this.path)||void 0===t?void 0:t.child(e),r=this.ia({path:n,oa:!1});return r.ua(e),r}ca(e){var t;let n=null===(t=this.path)||void 0===t?void 0:t.child(e),r=this.ia({path:n,oa:!1});return r.na(),r}aa(e){return this.ia({path:void 0,oa:!0})}ha(e){return h_(e,this.settings.methodName,this.settings.la||!1,this.path,this.settings.fa)}contains(e){return void 0!==this.fieldMask.find(t=>e.isPrefixOf(t))||void 0!==this.fieldTransforms.find(t=>e.isPrefixOf(t.field))}na(){if(this.path)for(let e=0;e<this.path.length;e++)this.ua(this.path.get(e))}ua(e){if(0===e.length)throw this.ha("Document fields must not be empty");if(c7(this.sa)&&c3.test(e))throw this.ha('Document fields cannot begin and end with "__"')}}class he{constructor(e,t,n){this.databaseId=e,this.ignoreUndefinedProperties=t,this.It=n||lM(e)}da(e,t,n,r=!1){return new c9({sa:e,methodName:t,fa:n,path:rh.emptyPath(),oa:!1,la:r},this.databaseId,this.It,this.ignoreUndefinedProperties)}}function ht(e){let t=e._freezeSettings(),n=lM(e._databaseId);return new he(e._databaseId,!!t.ignoreUndefinedProperties,n)}function hn(e,t,n,r,i,s={}){let o=e.da(s.merge||s.mergeFields?2:0,t,n,i);hm("Data must be an object, but it was:",o,r);let a=hf(r,o),l,u;if(s.merge)l=new rW(o.fieldMask),u=o.fieldTransforms;else if(s.mergeFields){let c=[];for(let h of s.mergeFields){let d=hg(t,h,n);if(!o.contains(d))throw new n1(n0.INVALID_ARGUMENT,`Field '${d}' is specified in your field mask but missing from your input data.`);hb(c,d)||c.push(d)}l=new rW(c),u=o.fieldTransforms.filter(e=>l.covers(e.field))}else l=null,u=o.fieldTransforms;return new c6(new i_(a),l,u)}class hr extends c4{_toFieldTransform(e){if(2!==e.sa)throw 1===e.sa?e.ha(`${this._methodName}() can only appear at the top level of your update data`):e.ha(`${this._methodName}() cannot be used with set() unless you pass {merge:true}`);return e.fieldMask.push(e.path),null}isEqual(e){return e instanceof hr}}function hi(e,t,n){return new c9({sa:3,fa:t.settings.fa,methodName:e._methodName,oa:n},t.databaseId,t.It,t.ignoreUndefinedProperties)}class hs extends c4{_toFieldTransform(e){return new sd(e.path,new si)}isEqual(e){return e instanceof hs}}class ho extends c4{constructor(e,t){super(e),this._a=t}_toFieldTransform(e){let t=hi(this,e,!0),n=this._a.map(e=>hd(e,t)),r=new ss(n);return new sd(e.path,r)}isEqual(e){return this===e}}class ha extends c4{constructor(e,t){super(e),this._a=t}_toFieldTransform(e){let t=hi(this,e,!0),n=this._a.map(e=>hd(e,t)),r=new sa(n);return new sd(e.path,r)}isEqual(e){return this===e}}class hl extends c4{constructor(e,t){super(e),this.wa=t}_toFieldTransform(e){let t=new su(e.It,i9(e.It,this.wa));return new sd(e.path,t)}isEqual(e){return this===e}}function hu(e,t,n,r){let i=e.da(1,t,n);hm("Data must be an object, but it was:",i,r);let s=[],o=i_.empty();rU(r,(e,r)=>{let a=hv(t,e,n);r=(0,m.m9)(r);let l=i.ca(a);if(r instanceof hr)s.push(a);else{let u=hd(r,l);null!=u&&(s.push(a),o.set(a,u))}});let a=new rW(s);return new c8(o,a,i.fieldTransforms)}function hc(e,t,n,r,i,s){let o=e.da(1,t,n),a=[hg(t,r,n)],l=[i];if(s.length%2!=0)throw new n1(n0.INVALID_ARGUMENT,`Function ${t}() needs to be called with an even number of arguments that alternate between field names and values.`);for(let u=0;u<s.length;u+=2)a.push(hg(t,s[u])),l.push(s[u+1]);let c=[],h=i_.empty();for(let d=a.length-1;d>=0;--d)if(!hb(c,a[d])){let f=a[d],p=l[d];p=(0,m.m9)(p);let g=o.ca(f);if(p instanceof hr)c.push(f);else{let y=hd(p,g);null!=y&&(c.push(f),h.set(f,y))}}let v=new rW(c);return new c8(h,v,o.fieldTransforms)}function hh(e,t,n,r=!1){return hd(n,e.da(r?4:3,t))}function hd(e,t){if(hp(e=(0,m.m9)(e)))return hm("Unsupported field value:",t,e),hf(e,t);if(e instanceof c4)return function(e,t){if(!c7(t.sa))throw t.ha(`${e._methodName}
3008() can only be used with update() and set()`);if(!t.path)throw t.ha(`${e._methodName}() is not currently supported inside arrays`);let n=e._toFieldTransform(t);n&&t.fieldTransforms.push(n)}(e,t),null;if(void 0===e&&t.ignoreUndefinedProperties)return null;if(t.path&&t.fieldMask.push(t.path),e instanceof Array){if(t.settings.oa&&4!==t.sa)throw t.ha("Nested arrays are not supported");return function(e,t){let n=[],r=0;for(let i of e){let s=hd(i,t.aa(r));null==s&&(s={nullValue:"NULL_VALUE"}),n.push(s),r++}return{arrayValue:{values:n}}}(e,t)}return function(e,t){if(null===(e=(0,m.m9)(e)))return{nullValue:"NULL_VALUE"};if("number"==typeof e)return i9(t.It,e);if("boolean"==typeof e)return{booleanValue:e};if("string"==typeof e)return{stringValue:e};if(e instanceof Date){let n=ro.fromDate(e);return{timestampValue:s2(t.It,n)}}if(e instanceof ro){let r=new ro(e.seconds,1e3*Math.floor(e.nanoseconds/1e3));return{timestampValue:s2(t.It,r)}}if(e instanceof c5)return{geoPointValue:{latitude:e.latitude,longitude:e.longitude}};if(e instanceof c1)return{bytesValue:s4(t.It,e._byteString)};if(e instanceof cf){let i=t.databaseId,s=e.firestore._databaseId;if(!s.isEqual(i))throw t.ha(`Document reference is for database ${s.projectId}/${s.database} but should be for database ${i.projectId}/${i.database}`);return{referenceValue:s3(e.firestore._databaseId||t.databaseId,e._key.path)}}throw t.ha(`Unsupported field value: ${co(e)}`)}(e,t)}function hf(e,t){let n={};return rB(e)?t.path&&t.path.length>0&&t.fieldMask.push(t.path):rU(e,(e,r)=>{let i=hd(r,t.ra(e));null!=i&&(n[e]=i)}),{mapValue:{fields:n}}}function hp(e){return!("object"!=typeof e||null===e||e instanceof Array||e instanceof Date||e instanceof ro||e instanceof c5||e instanceof c1||e instanceof cf||e instanceof c4)}function hm(e,t,n){var r;if(!hp(n)||"object"!=typeof n||null===n||Object.getPrototypeOf(n)!==Object.prototype&&null!==Object.getPrototypeOf(n)){let i=co(n);throw"an object"===i?t.ha(e+" a custom object"):t.ha(e+" "+i)}}function hg(e,t,n){if((t=(0,m.m9)(t))instanceof c2)return t._internalPath;if("string"==typeof t)return hv(e,t);throw h_("Field path arguments must be of type string or ",e,!1,void 0,n)}let hy=RegExp("[~\\*/\\[\\]]");function hv(e,t,n){if(t.search(hy)>=0)throw h_(`Invalid field path (${t}). Paths must not contain '~', '*', '/', '[', or ']'`,e,!1,void 0,n);try{return new c2(...t.split("."))._internalPath}catch(r){throw h_(`Invalid field path (${t}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,e,!1,void 0,n)}}function h_(e,t,n,r,i){let s=r&&!r.isEmpty(),o=void 0!==i,a=`Function ${t}() called with invalid data`;n&&(a+=" (via `toFirestore()`)"),a+=". ";let l="";return(s||o)&&(l+=" (found",s&&(l+=` in field ${r}`),o&&(l+=` in document ${i}`),l+=")"),new n1(n0.INVALID_ARGUMENT,a+e+l)}function hb(e,t){return e.some(e=>e.isEqual(t))}/** 3009 * @license 3010 * Copyright 2020 Google LLC 3011 * 3012 * Licensed under the Apache License, Version 2.0 (the "License"); 3013 * you may not use this file except in compliance with the License. 3014 * You may obtain a copy of the License at 3015 * 3016 * http://www.apache.org/licenses/LICENSE-2.0 3017 * 3018 * Unless required by applicable law or agreed to in writing, software 3019 * distributed under the License is distributed on an "AS IS" BASIS, 3020 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3021 * See the License for the specific language governing permissions and 3022 * limitations under the License. 3023 */ class hw{constructor(e,t,n,r,i){this._firestore=e,this._userDataWriter=t,this._key=n,this._document=r,this._converter=i}get id(){return this._key.path.lastSegment()}get ref(){return new cf(this._firestore,this._converter,this._key)}exists(){return null!==this._document}data(){if(this._document){if(this._converter){let e=new hE(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}}get(e){if(this._document){let t=this._document.data.field(hx("DocumentSnapshot.get",e));if(null!==t)return this._userDataWriter.convertValue(t)}}}class hE extends hw{data(){return super.data()}}function hx(e,t){return"string"==typeof t?hv(e,t):t instanceof c2?t._internalPath:t._delegate._internalPath}/** 3024 * @license 3025 * Copyright 2020 Google LLC 3026 * 3027 * Licensed under the Apache License, Version 2.0 (the "License");
3028 * you may not use this file except in compliance with the License. 3029 * You may obtain a copy of the License at 3030 * 3031 * http://www.apache.org/licenses/LICENSE-2.0 3032 * 3033 * Unless required by applicable law or agreed to in writing, software 3034 * distributed under the License is distributed on an "AS IS" BASIS, 3035 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3036 * See the License for the specific language governing permissions and 3037 * limitations under the License. 3038 */ function hS(e){if("L"===e.limitType&&0===e.explicitOrderBy.length)throw new n1(n0.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}class hT{}function hI(e,...t){for(let n of t)e=n._apply(e);return e}class hk extends hT{constructor(e,t,n){super(),this.ma=e,this.ga=t,this.ya=n,this.type="where"}_apply(e){let t=ht(e.firestore),n=function(e,t,n,r,i,s,o){let a;if(i.isKeyField()){if("array-contains"===s||"array-contains-any"===s)throw new n1(n0.INVALID_ARGUMENT,`Invalid Query. You can't perform '${s}' queries on documentId().`);if("in"===s||"not-in"===s){h$(o,s);let l=[];for(let u of o)l.push(hZ(r,e,u));a={arrayValue:{values:l}}}else a=hZ(r,e,o)}else"in"!==s&&"not-in"!==s&&"array-contains-any"!==s||h$(o,s),a=hh(n,t,o,"in"===s||"not-in"===s);let c=iA.create(i,s,a);return function(e,t){if(t.dt()){let n=iK(e);if(null!==n&&!n.isEqual(t.field))throw new n1(n0.INVALID_ARGUMENT,`Invalid query. All where filters with an inequality (<, <=, !=, not-in, >, or >=) must be on the same field. But you have inequality filters on '${n.toString()}' and '${t.field.toString()}'`);let r=iH(e);null!==r&&hV(e,t.field,r)}let i=function(e,t){for(let n of e.filters)if(t.indexOf(n.op)>=0)return n.op;return null}(e,function(e){switch(e){case"!=":return["!=","not-in"];case"array-contains":return["array-contains","array-contains-any","not-in"];case"in":return["array-contains-any","in","not-in"];case"array-contains-any":return["array-contains","array-contains-any","in","not-in"];case"not-in":return["array-contains","array-contains-any","in","not-in","!="];default:return[]}}(t.op));if(null!==i)throw i===t.op?new n1(n0.INVALID_ARGUMENT,`Invalid query. You cannot use more than one '${t.op.toString()}' filter.`):new n1(n0.INVALID_ARGUMENT,`Invalid query. You cannot use '${t.op.toString()}' filters with '${i.toString()}' filters.`)}(e,c),c}(e._query,"where",t,e.firestore._databaseId,this.ma,this.ga,this.ya);return new cp(e.firestore,e.converter,function(e,t){let n=e.filters.concat([t]);return new iz(e.path,e.collectionGroup,e.explicitOrderBy.slice(),n,e.limit,e.limitType,e.startAt,e.endAt)}(e._query,n))}}function hC(e,t,n){let r=hx("where",e);return new hk(r,t,n)}class hR extends hT{constructor(e,t){super(),this.ma=e,this.pa=t,this.type="orderBy"}_apply(e){let t=function(e,t,n){if(null!==e.startAt)throw new n1(n0.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(null!==e.endAt)throw new n1(n0.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");let r=new iB(t,n);return function(e,t){if(null===iH(e)){let n=iK(e);null!==n&&hV(e,n,t.field)}}(e,r),r}(e._query,this.ma,this.pa);return new cp(e.firestore,e.converter,function(e,t){let n=e.explicitOrderBy.concat([t]);return new iz(e.path,e.collectionGroup,n,e.filters.slice(),e.limit,e.limitType,e.startAt,e.endAt)}(e._query,t))}}function hA(e,t="asc"){let n=hx("orderBy",e);return new hR(n,t)}class hO extends hT{constructor(e,t,n){super(),this.type=e,this.Ia=t,this.Ta=n}_apply(e){return new cp(e.firestore,e.converter,iJ(e._query,this.Ia,this.Ta))}}function hD(e){return cl("limit",e),new hO("limit",e,"F")}function hN(e){return cl("limitToLast",e),new hO("limitToLast",e,"L")}class hP extends hT{constructor(e,t,n){super(),this.type=e,this.Ea=t,this.Aa=n}_apply(e){var t,n;let r=hB(e,this.type,this.Ea,this.Aa);return new cp(e.firestore,e.converter,(t=e._query,new iz(t.path,t.collectionGroup,t.explicitOrderBy.slice(),t.filters.slice(),t.limit,t.limitType,r,t.endAt)))}}function hF(...e){return new hP("startAt",e,!0)}function hM(...e){return new hP("startAfter",e,!1)}class hL extends hT{constructor(e,t,n){super(),this.type=e,this.Ea=t,this.Aa=n}_apply(e){var t,n;let r=hB(e,this.type,this.Ea,this.Aa);return new cp(e.firestore,e.converter,(t=e._query,new iz(t.path,t.collectionGroup,t.explicitOrderBy.slice(),t.filters.slice(),t.limit,t.limitType,t.startAt,r)))}}function hj(...e){return new hL("endBefore",e,!1)}function hU(...e){return new hL("endAt",e,!0)}function hB(e,t,n,r){if(n[0]=(0,m.m9)(n[0]),n[0]instanceof hw)return function(e,t,n,r,i){if(!r)throw new n1(n0.NOT_FOUND,`Can't use a DocumentSnapshot that doesn't exist for ${n}().`);let s=[];for(let o of iQ(e))if(o.field.isKeyField())s.push(io(t,r.key));else{let a=r.data.field(o.field);if(r0(a))throw new n1(n0.INVALID_ARGUMENT,'Invalid query. You are trying to start or end a query using a document for which the field "'+o.field+'" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');if(null===a){let l=o.field.canonicalString();throw new n1(n0.INVALID_ARGUMENT,`Invalid query. You are trying to start or end a query using a document for which the field '${l}' (used as the orderBy) does not exist.`)}s.push(a)}return new iU(s,i)}(e._query,e.firestore._databaseId,t,n[0]._document,r);{let i=ht(e.firestore);return function(e,t,n,r,i,s){let o=e.explicitOrderBy;if(i.length>o.length)throw new n1(n0.INVALID_ARGUMENT,`Too many arguments provided to ${r}(). The number of arguments must be less than or equal to the number of orderBy() clauses`);let a=[];for(let l=0;l<i.length;l++){let u=i[l];
3038if(o[l].field.isKeyField()){if("string"!=typeof u)throw new n1(n0.INVALID_ARGUMENT,`Invalid query. Expected a string for document ID in ${r}(), but got a ${typeof u}`);if(!iY(e)&&-1!==u.indexOf("/"))throw new n1(n0.INVALID_ARGUMENT,`Invalid query. When querying a collection and ordering by documentId(), the value passed to ${r}() must be a plain document ID, but '${u}' contains a slash.`);let c=e.path.child(ru.fromString(u));if(!rd.isDocumentKey(c))throw new n1(n0.INVALID_ARGUMENT,`Invalid query. When querying a collection group and ordering by documentId(), the value passed to ${r}() must result in a valid document path, but '${c}' is not because it contains an odd number of segments.`);let h=new rd(c);a.push(io(t,h))}else{let d=hh(n,r,u);a.push(d)}}return new iU(a,s)}(e._query,e.firestore._databaseId,i,t,n,r)}}function hZ(e,t,n){if("string"==typeof(n=(0,m.m9)(n))){if(""===n)throw new n1(n0.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");if(!iY(t)&&-1!==n.indexOf("/"))throw new n1(n0.INVALID_ARGUMENT,`Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '${n}' contains a '/' character.`);let r=t.path.child(ru.fromString(n));if(!rd.isDocumentKey(r))throw new n1(n0.INVALID_ARGUMENT,`Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '${r}' is not because it has an odd number of segments (${r.length}).`);return io(e,new rd(r))}if(n instanceof cf)return io(e,n._key);throw new n1(n0.INVALID_ARGUMENT,`Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${co(n)}.`)}function h$(e,t){if(!Array.isArray(e)||0===e.length)throw new n1(n0.INVALID_ARGUMENT,`Invalid Query. A non-empty array is required for '${t.toString()}' filters.`);if(e.length>10)throw new n1(n0.INVALID_ARGUMENT,`Invalid Query. '${t.toString()}' filters support a maximum of 10 elements in the value array.`)}function hV(e,t,n){if(!n.isEqual(t))throw new n1(n0.INVALID_ARGUMENT,`Invalid query. You have a where filter with an inequality (<, <=, !=, not-in, >, or >=) on field '${t.toString()}' and so you must also use '${t.toString()}' as your first argument to orderBy(), but your first orderBy() is on field '${n.toString()}' instead.`)}/** 3039 * @license 3040 * Copyright 2020 Google LLC 3041 * 3042 * Licensed under the Apache License, Version 2.0 (the "License"); 3043 * you may not use this file except in compliance with the License. 3044 * You may obtain a copy of the License at 3045 * 3046 * http://www.apache.org/licenses/LICENSE-2.0 3047 * 3048 * Unless required by applicable law or agreed to in writing, software 3049 * distributed under the License is distributed on an "AS IS" BASIS, 3050 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3051 * See the License for the specific language governing permissions and 3052 * limitations under the License. 3053 */ class hz{convertValue(e,t="none"){switch(r9(e)){case 0:return null;case 1:return e.booleanValue;case 2:return rX(e.integerValue||e.doubleValue);case 3:return this.convertTimestamp(e.timestampValue);case 4:return this.convertServerTimestamp(e,t);case 5:return e.stringValue;case 6:return this.convertBytes(rJ(e.bytesValue));case 7:return this.convertReference(e.referenceValue);case 8:return this.convertGeoPoint(e.geoPointValue);case 9:return this.convertArray(e.arrayValue,t);case 10:return this.convertObject(e.mapValue,t);default:throw nX()}}convertObject(e,t){let n={};return rU(e.fields,(e,r)=>{n[e]=this.convertValue(r,t)}),n}convertGeoPoint(e){return new c5(rX(e.latitude),rX(e.longitude))}convertArray(e,t){return(e.values||[]).map(e=>this.convertValue(e,t))}convertServerTimestamp(e,t){switch(t){case"previous":let n=function e(t){let n=t.mapValue.fields.__previous_value__;return r0(n)?e(n):n}(e);return null==n?null:this.convertValue(n,t);case"estimate":return this.convertTimestamp(r1(e));default:return null}}convertTimestamp(e){let t=rQ(e);return new ro(t.seconds,t.nanos)}convertDocumentKey(e,t){var n;let r=ru.fromString(e);(n=od(r))||nX();let i=new r4(r.get(1),r.get(3)),s=new rd(r.popFirst(5));return i.isEqual(t)||nK(`Document ${s} contains a document reference within a different database (${i.projectId}/${i.database}) which is not supported. It will be treated as a reference in the current database (${t.projectId}/${t.database}) instead.`),s}}/** 3054 * @license 3055 * Copyright 2020 Google LLC 3056 * 3057 * Licensed under the Apache License, Version 2.0 (the "License");
3058 * you may not use this file except in compliance with the License. 3059 * You may obtain a copy of the License at 3060 * 3061 * http://www.apache.org/licenses/LICENSE-2.0 3062 * 3063 * Unless required by applicable law or agreed to in writing, software 3064 * distributed under the License is distributed on an "AS IS" BASIS, 3065 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3066 * See the License for the specific language governing permissions and 3067 * limitations under the License. 3068 */ function hq(e,t,n){return e?n&&(n.merge||n.mergeFields)?e.toFirestore(t,n):e.toFirestore(t):t}class hG extends hz{constructor(e){super(),this.firestore=e}convertBytes(e){return new c1(e)}convertReference(e){let t=this.convertDocumentKey(e,this.firestore._databaseId);return new cf(this.firestore,null,t)}}/** 3069 * @license 3070 * Copyright 2020 Google LLC 3071 * 3072 * Licensed under the Apache License, Version 2.0 (the "License"); 3073 * you may not use this file except in compliance with the License. 3074 * You may obtain a copy of the License at 3075 * 3076 * http://www.apache.org/licenses/LICENSE-2.0 3077 * 3078 * Unless required by applicable law or agreed to in writing, software 3079 * distributed under the License is distributed on an "AS IS" BASIS, 3080 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3081 * See the License for the specific language governing permissions and 3082 * limitations under the License.
3083 */ class hW{constructor(e,t){this.hasPendingWrites=e,this.fromCache=t}isEqual(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}class hH extends hw{constructor(e,t,n,r,i,s){super(e,t,n,r,s),this._firestore=e,this._firestoreImpl=e,this.metadata=i}exists(){return super.exists()}data(e={}){if(this._document){if(this._converter){let t=new hK(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(t,e)}return this._userDataWriter.convertValue(this._document.data.value,e.serverTimestamps)}}get(e,t={}){if(this._document){let n=this._document.data.field(hx("DocumentSnapshot.get",e));if(null!==n)return this._userDataWriter.convertValue(n,t.serverTimestamps)}}}class hK extends hH{data(e={}){return super.data(e)}}class hY{constructor(e,t,n,r){this._firestore=e,this._userDataWriter=t,this._snapshot=r,this.metadata=new hW(r.hasPendingWrites,r.fromCache),this.query=n}get docs(){let e=[];return this.forEach(t=>e.push(t)),e}get size(){return this._snapshot.docs.size}get empty(){return 0===this.size}forEach(e,t){this._snapshot.docs.forEach(n=>{e.call(t,new hK(this._firestore,this._userDataWriter,n.key,n,new hW(this._snapshot.mutatedKeys.has(n.key),this._snapshot.fromCache),this.query.converter))})}docChanges(e={}){let t=!!e.includeMetadataChanges;if(t&&this._snapshot.excludesMetadataChanges)throw new n1(n0.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===t||(this._cachedChanges=function(e,t){if(e._snapshot.oldDocs.isEmpty()){let n=0;return e._snapshot.docChanges.map(t=>({type:"added",doc:new hK(e._firestore,e._userDataWriter,t.doc.key,t.doc,new hW(e._snapshot.mutatedKeys.has(t.doc.key),e._snapshot.fromCache),e.query.converter),oldIndex:-1,newIndex:n++}))}{let r=e._snapshot.oldDocs;return e._snapshot.docChanges.filter(e=>t||3!==e.type).map(t=>{let n=new hK(e._firestore,e._userDataWriter,t.doc.key,t.doc,new hW(e._snapshot.mutatedKeys.has(t.doc.key),e._snapshot.fromCache),e.query.converter),i=-1,s=-1;return 0!==t.type&&(i=r.indexOf(t.doc.key),r=r.delete(t.doc.key)),1!==t.type&&(s=(r=r.add(t.doc)).indexOf(t.doc.key)),{type:function(e){switch(e){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return nX()}}(t.type),doc:n,oldIndex:i,newIndex:s}})}}(this,t),this._cachedChangesIncludeMetadataChanges=t),this._cachedChanges}}function hQ(e,t){return e instanceof hH&&t instanceof hH?e._firestore===t._firestore&&e._key.isEqual(t._key)&&(null===e._document?null===t._document:e._document.isEqual(t._document))&&e._converter===t._converter:e instanceof hY&&t instanceof hY&&e._firestore===t._firestore&&cb(e.query,t.query)&&e.metadata.isEqual(t.metadata)&&e._snapshot.isEqual(t._snapshot)}/** 3084 * @license 3085 * Copyright 2020 Google LLC 3086 * 3087 * Licensed under the Apache License, Version 2.0 (the "License"); 3088 * you may not use this file except in compliance with the License. 3089 * You may obtain a copy of the License at 3090 * 3091 * http://www.apache.org/licenses/LICENSE-2.0 3092 * 3093 * Unless required by applicable law or agreed to in writing, software 3094 * distributed under the License is distributed on an "AS IS" BASIS, 3095 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3096 * See the License for the specific language governing permissions and 3097 * limitations under the License. 3098 */ function hX(e){e=ca(e,cf);let t=ca(e.firestore,c$);return cM(cV(t),e._key).then(n=>dn(t,e,n))}class hJ extends hz{constructor(e){super(),this.firestore=e}convertBytes(e){return new c1(e)}convertReference(e){let t=this.convertDocumentKey(e,this.firestore._databaseId);return new cf(this.firestore,null,t)}}function h0(e){e=ca(e,cf);let t=ca(e.firestore,c$),n=cV(t),r=new hJ(t);return(function(e,t){let n=new n2;return e.asyncQueue.enqueueAndForget(async()=>(async function(e,t,n){try{let r=await function(e,t){var n;return e.persistence.runTransaction("read document","readonly",n=>e.localDocuments.getDocument(n,t))}(e,t);r.isFoundDocument()?n.resolve(r):r.isNoDocument()?n.resolve(null):n.reject(new n1(n0.UNAVAILABLE,"Failed to get document from cache. (However, this document may exist on the server. Run again without setting 'source' in the GetOptions to attempt to retrieve the document from the server.)"))}catch(s){let i=uu(s,`Failed to get document '${t} from cache`);n.reject(i)}})(await cD(e),t,n)),n.promise})(n,e._key).then(n=>new hH(t,r,e._key,n,new hW(null!==n&&n.hasLocalMutations,!0),e.converter))}function h1(e){e=ca(e,cf);let t=ca(e.firestore,c$);return cM(cV(t),e._key,{source:"server"}).then(n=>dn(t,e,n))}function h2(e){e=ca(e,cp);let t=ca(e.firestore,c$),n=cV(t),r=new hJ(t);return hS(e._query),cL(n,e._query).then(n=>new hY(t,r,e,n))}function h4(e){e=ca(e,cp);let t=ca(e.firestore,c$),n=cV(t),r=new hJ(t);return(function(e,t){let n=new n2;return e.asyncQueue.enqueueAndForget(async()=>(async function(e,t,n){try{let r=await lf(e,t,!0),i=new uk(t,r.Hi),s=i.Wu(r.documents),o=i.applyChanges(s,
3098!1);n.resolve(o.snapshot)}catch(l){let a=uu(l,`Failed to execute query '${t} against cache`);n.reject(a)}})(await cD(e),t,n)),n.promise})(n,e._query).then(n=>new hY(t,r,e,n))}function h5(e){e=ca(e,cp);let t=ca(e.firestore,c$),n=cV(t),r=new hJ(t);return cL(n,e._query,{source:"server"}).then(n=>new hY(t,r,e,n))}function h3(e,t,n){e=ca(e,cf);let r=ca(e.firestore,c$),i=hq(e.converter,t,n);return dt(r,[hn(ht(r),"setDoc",e._key,i,null!==e.converter,n).toMutation(e._key,sp.none())])}function h6(e,t,n,...r){e=ca(e,cf);let i=ca(e.firestore,c$),s=ht(i),o;return o="string"==typeof(t=(0,m.m9)(t))||t instanceof c2?hc(s,"updateDoc",e._key,t,n,r):hu(s,"updateDoc",e._key,t),dt(i,[o.toMutation(e._key,sp.exists(!0))])}function h8(e){return dt(ca(e.firestore,c$),[new sk(e._key,sp.none())])}function h7(e,t){let n=ca(e.firestore,c$),r=cv(e),i=hq(e.converter,t);return dt(n,[hn(ht(e.firestore),"addDoc",r._key,i,null!==e.converter,{}).toMutation(r._key,sp.exists(!1))]).then(()=>r)}function h9(e,...t){var n,r,i;e=(0,m.m9)(e);let s={includeMetadataChanges:!1},o=0;"object"!=typeof t[o]||cU(t[o])||(s=t[o],o++);let a={includeMetadataChanges:s.includeMetadataChanges};if(cU(t[o])){let l=t[o];t[o]=null===(n=l.next)||void 0===n?void 0:n.bind(l),t[o+1]=null===(r=l.error)||void 0===r?void 0:r.bind(l),t[o+2]=null===(i=l.complete)||void 0===i?void 0:i.bind(l)}let u,c,h;if(e instanceof cf)c=ca(e.firestore,c$),h=iG(e._key.path),u={next(n){t[o]&&t[o](dn(c,e,n))},error:t[o+1],complete:t[o+2]};else{let d=ca(e,cp);c=ca(d.firestore,c$),h=d._query;let f=new hJ(c);u={next(e){t[o]&&t[o](new hY(c,f,d,e))},error:t[o+1],complete:t[o+2]},hS(e._query)}return function(e,t,n,r){let i=new cE(r),s=new ub(t,i,n);return e.asyncQueue.enqueueAndForget(async()=>um(await cF(e),s)),()=>{i.bc(),e.asyncQueue.enqueueAndForget(async()=>ug(await cF(e),s))}}(cV(c),h,a,u)}function de(e,t){return function(e,t){let n=new cE(t);return e.asyncQueue.enqueueAndForget(async()=>{var t,r,i;(t=await cF(e)).bu.add(n),n.next()}),()=>{n.bc(),e.asyncQueue.enqueueAndForget(async()=>(function(e,t){var n;e.bu.delete(t)})(await cF(e),n))}}(cV(e=ca(e,c$)),cU(t)?t:{next:t})}function dt(e,t){return function(e,t){let n=new n2;return e.asyncQueue.enqueueAndForget(async()=>uP(await cP(e),t,n)),n.promise}(cV(e),t)}function dn(e,t,n){let r=n.docs.get(t._key),i=new hJ(e);return new hH(e,i,t._key,r,new hW(n.hasPendingWrites,n.fromCache),t.converter)}/** 3099 * @license 3100 * Copyright 2022 Google LLC 3101 * 3102 * Licensed under the Apache License, Version 2.0 (the "License"); 3103 * you may not use this file except in compliance with the License. 3104 * You may obtain a copy of the License at 3105 * 3106 * http://www.apache.org/licenses/LICENSE-2.0 3107 * 3108 * Unless required by applicable law or agreed to in writing, software 3109 * distributed under the License is distributed on an "AS IS" BASIS, 3110 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3111 * See the License for the specific language governing permissions and 3112 * limitations under the License. 3113 */ let dr={maxAttempts:5};/** 3114 * @license 3115 * Copyright 2020 Google LLC 3116 * 3117 * Licensed under the Apache License, Version 2.0 (the "License"); 3118 * you may not use this file except in compliance with the License. 3119 * You may obtain a copy of the License at 3120 * 3121 * http://www.apache.org/licenses/LICENSE-2.0 3122 * 3123 * Unless required by applicable law or agreed to in writing, software 3124 * distributed under the License is distributed on an "AS IS" BASIS, 3125 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3126 * See the License for the specific language governing permissions and 3127 * limitations under the License. 3128 */ class di{constructor(e,t){this._firestore=e,this._commitHandler=t,this._mutations=[],this._committed=!1,this._dataReader=ht(e)}set(e,t,n){this._verifyNotCommitted();let r=ds(e,this._firestore),i=hq(r.converter,t,n),s=hn(this._dataReader,"WriteBatch.set",r._key,i,null!==r.converter,n);return this._mutations.push(s.toMutation(r._key,sp.none())),this}update(e,t,n,...r){this._verifyNotCommitted();let i=ds(e,this._firestore),s;return s="string"==typeof(t=(0,m.m9)(t))||t instanceof c2?hc(this._dataReader,"WriteBatch.update",i._key,t,n,r):
3128hu(this._dataReader,"WriteBatch.update",i._key,t),this._mutations.push(s.toMutation(i._key,sp.exists(!0))),this}delete(e){this._verifyNotCommitted();let t=ds(e,this._firestore);return this._mutations=this._mutations.concat(new sk(t._key,sp.none())),this}commit(){return this._verifyNotCommitted(),this._committed=!0,this._mutations.length>0?this._commitHandler(this._mutations):Promise.resolve()}_verifyNotCommitted(){if(this._committed)throw new n1(n0.FAILED_PRECONDITION,"A write batch can no longer be used after commit() has been called.")}}function ds(e,t){if((e=(0,m.m9)(e)).firestore!==t)throw new n1(n0.INVALID_ARGUMENT,"Provided document reference is from a different Firestore instance.");return e}/** 3129 * @license 3130 * Copyright 2020 Google LLC 3131 * 3132 * Licensed under the Apache License, Version 2.0 (the "License"); 3133 * you may not use this file except in compliance with the License. 3134 * You may obtain a copy of the License at 3135 * 3136 * http://www.apache.org/licenses/LICENSE-2.0 3137 * 3138 * Unless required by applicable law or agreed to in writing, software 3139 * distributed under the License is distributed on an "AS IS" BASIS, 3140 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3141 * See the License for the specific language governing permissions and 3142 * limitations under the License. 3143 */ /** 3144 * @license 3145 * Copyright 2020 Google LLC 3146 * 3147 * Licensed under the Apache License, Version 2.0 (the "License"); 3148 * you may not use this file except in compliance with the License. 3149 * You may obtain a copy of the License at 3150 * 3151 * http://www.apache.org/licenses/LICENSE-2.0 3152 * 3153 * Unless required by applicable law or agreed to in writing, software 3154 * distributed under the License is distributed on an "AS IS" BASIS, 3155 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3156 * See the License for the specific language governing permissions and 3157 * limitations under the License. 3158 */ class da extends class{constructor(e,t){this._firestore=e,this._transaction=t,this._dataReader=ht(e)}get(e){let t=ds(e,this._firestore),n=new hG(this._firestore);return this._transaction.lookup([t._key]).then(e=>{if(!e||1!==e.length)return nX();let r=e[0];if(r.isFoundDocument())return new hw(this._firestore,n,r.key,r,t.converter);if(r.isNoDocument())return new hw(this._firestore,n,t._key,null,t.converter);throw nX()})}set(e,t,n){let r=ds(e,this._firestore),i=hq(r.converter,t,n),s=hn(this._dataReader,"Transaction.set",r._key,i,null!==r.converter,n);return this._transaction.set(r._key,s),this}update(e,t,n,...r){let i=ds(e,this._firestore),s;return s="string"==typeof(t=(0,m.m9)(t))||t instanceof c2?hc(this._dataReader,"Transaction.update",i._key,t,n,r):hu(this._dataReader,"Transaction.update",i._key,t),this._transaction.update(i._key,s),this}delete(e){let t=ds(e,this._firestore);return this._transaction.delete(t._key),this}}{constructor(e,t){super(e,t),this._firestore=e}get(e){let t=ds(e,this._firestore),n=new hJ(this._firestore);return super.get(e).then(e=>new hH(this._firestore,n,t._key,e._document,new hW(!1,!1),t.converter))}}function dl(e,t,n){e=ca(e,c$);let r=Object.assign(Object.assign({},dr),n);return!function(e){if(e.maxAttempts<1)throw new n1(n0.INVALID_ARGUMENT,"Max attempts must be at least 1")}(r),function(e,t,n){let r=new n2;return e.asyncQueue.enqueueAndForget(async()=>{var i;let s=await cA(e).then(e=>e.datastore);new cT(e.asyncQueue,s,n,t,r).run()}),r.promise}(cV(e),n=>t(new da(e,n)),r)}/** 3159 * @license 3160 * Copyright 2020 Google LLC 3161 * 3162 * Licensed under the Apache License, Version 2.0 (the "License"); 3163 * you may not use this file except in compliance with the License. 3164 * You may obtain a copy of the License at 3165 * 3166 * http://www.apache.org/licenses/LICENSE-2.0 3167 * 3168 * Unless required by applicable law or agreed to in writing, software 3169 * distributed under the License is distributed on an "AS IS" BASIS, 3170 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3171 * See the License for the specific language governing permissions and 3172 * limitations under the License. 3173 */ function du(){return new hr("deleteField")}function dc(){return new hs("serverTimestamp")}function dh(...e){return new ho("arrayUnion",e)}function dd(...e){return new ha("arrayRemove",e)}function df(e){return new hl("increment",e)}!function(e,t=!0){var n;nz=d.SDK_VERSION,(0,d._registerComponent)(new f.wA("firestore",(e,{instanceIdentifier:n,options:r})=>{let i=e.getProvider("app").getImmediate(),s=new c$(new n6(e.getProvider("auth-internal")),new re(e.getProvider("app-check-internal")),function(e,t){if(!Object.prototype.hasOwnProperty.apply(e.options,["projectId"]))throw new n1(n0.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new r4(e.options.projectId,t)}(i,n),i);return r=Object.assign({useFetchStreams:t},r),s._setSettings(r),s},"PUBLIC").setMultipleInstances(!0)),(0,d.registerVersion)(n$,"3.7.1",void 0),(0,d.registerVersion)(n$,"3.7.1","esm2017")}()},4444:function(e,t,n){"use strict";n.d(t,{$s:function(){return V},BH:function(){return R},G6:function(){return v},L:function(){return l},LL:function(){return D},Pz:function(){return C},Sg:function(){return A},UG:function(){return f},ZB:function(){return function e(t,n){if(!(n instanceof Object))return n;switch(n.constructor){case Date:return new Date(n.getTime());case Object:void 0===t&&(t={});break;case Array:t=[];break;default:return n}for(let r in n)n.hasOwnProperty(r)&&c(r)&&(t[r]=e(t[r],n[r]));return t}},ZR:function(){return O},aH:function(){return k},b$:function(){return g},eu:function(){return b},hl:function(){return _},jU:function(){return p},m9:function(){return z},ne:function(){return B},pd:function(){return U},q4:function(){return I},r3:function(){return P},ru:function(){return m},tV:function(){return u},uI:function(){return d},vZ:function(){return function e(t,n){if(t===n)return!0;let r=Object.keys(t),i=Object.keys(n);for(let s of r){if(!i.includes(s))return!1;let o=t[s],a=n[s];if(M(o)&&M(a)){if(!e(o,a))return!1}else if(o!==a)return!1}for(let l of i)if(!r.includes(l))return!1;return!0}},w1:function(){return y},xO:function(){return L},xb:function(){return F},z$:function(){return h},zI:function(){return w},zd:function(){return j}});var r=n(3454);/** 3174 * @license 3175 * Copyright 2017 Google LLC 3176 * 3177 * Licensed under the Apache License, Version 2.0 (the "License");
3178 * you may not use this file except in compliance with the License. 3179 * You may obtain a copy of the License at 3180 * 3181 * http://www.apache.org/licenses/LICENSE-2.0 3182 * 3183 * Unless required by applicable law or agreed to in writing, software 3184 * distributed under the License is distributed on an "AS IS" BASIS, 3185 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3186 * See the License for the specific language governing permissions and 3187 * limitations under the License. 3188 */ let i=function(e){let t=[],n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=63&i|128):(64512&i)==55296&&r+1<e.length&&(64512&e.charCodeAt(r+1))==56320?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++r)),t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return t},s=function(e){let t=[],n=0,r=0;for(;n<e.length;){let i=e[n++];if(i<128)t[r++]=String.fromCharCode(i);else if(i>191&&i<224){let s=e[n++];t[r++]=String.fromCharCode((31&i)<<6|63&s)}else if(i>239&&i<365){let o=e[n++],a=e[n++],l=e[n++],u=((7&i)<<18|(63&o)<<12|(63&a)<<6|63&l)-65536;t[r++]=String.fromCharCode(55296+(u>>10)),t[r++]=String.fromCharCode(56320+(1023&u))}else{let c=e[n++],h=e[n++];t[r++]=String.fromCharCode((15&i)<<12|(63&c)<<6|63&h)}}return t.join("")},o={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();let n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let i=0;i<e.length;i+=3){let s=e[i],o=i+1<e.length,a=o?e[i+1]:0,l=i+2<e.length,u=l?e[i+2]:0,c=s>>2,h=(3&s)<<4|a>>4,d=(15&a)<<2|u>>6,f=63&u;l||(f=64,o||(d=64)),r.push(n[c],n[h],n[d],n[f])}return r.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(i(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):s(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();let n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let i=0;i<e.length;){let s=n[e.charAt(i++)],o=i<e.length,a=o?n[e.charAt(i)]:0;++i;let l=i<e.length,u=l?n[e.charAt(i)]:64;++i;let c=i<e.length,h=c?n[e.charAt(i)]:64;if(++i,null==s||null==a||null==u||null==h)throw Error();let d=s<<2|a>>4;if(r.push(d),64!==u){let f=a<<4&240|u>>2;if(r.push(f),64!==h){let p=u<<6&192|h;r.push(p)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}},a=function(e){let t=i(e);return o.encodeByteArray(t,!0)},l=function(e){return a(e).replace(/\./g,"")},u=function(e){try{return o.decodeString(e,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};function c(e){return"__proto__"!==e}/** 3189 * @license 3190 * Copyright 2017 Google LLC 3191 * 3192 * Licensed under the Apache License, Version 2.0 (the "License"); 3193 * you may not use this file except in compliance with the License. 3194 * You may obtain a copy of the License at 3195 * 3196 * http://www.apache.org/licenses/LICENSE-2.0 3197 * 3198 * Unless required by applicable law or agreed to in writing, software 3199 * distributed under the License is distributed on an "AS IS" BASIS, 3200 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3201 * See the License for the specific language governing permissions and 3202 * limitations under the License. 3203 */ function h(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""}function d(){return"undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(h())}function f(){try{return"[object process]"===Object.prototype.toString.call(n.g.process)}catch(e){return!1}}function p(){return"object"==typeof self&&self.self===self}function m(){let e="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof e&&void 0!==e.id}function g(){return"object"==typeof navigator&&"ReactNative"===navigator.product}function y(){let e=h();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}function v(){return!f()&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function _(){return"object"==typeof indexedDB}function b(){return new Promise((e,t)=>
3203{try{let n=!0,r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),n||self.indexedDB.deleteDatabase(r),e(!0)},i.onupgradeneeded=()=>{n=!1},i.onerror=()=>{var e;t((null===(e=i.error)||void 0===e?void 0:e.message)||"")}}catch(s){t(s)}})}function w(){return"undefined"!=typeof navigator&&!!navigator.cookieEnabled}/** 3204 * @license 3205 * Copyright 2022 Google LLC 3206 * 3207 * Licensed under the Apache License, Version 2.0 (the "License"); 3208 * you may not use this file except in compliance with the License. 3209 * You may obtain a copy of the License at 3210 * 3211 * http://www.apache.org/licenses/LICENSE-2.0 3212 * 3213 * Unless required by applicable law or agreed to in writing, software 3214 * distributed under the License is distributed on an "AS IS" BASIS, 3215 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3216 * See the License for the specific language governing permissions and 3217 * limitations under the License. 3218 */ let E=()=>(function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw Error("Unable to locate global object.")})().__FIREBASE_DEFAULTS__,x=()=>{if(void 0===r||void 0===r.env)return;let e=r.env.__FIREBASE_DEFAULTS__;if(e)return JSON.parse(e)},S=()=>{if("undefined"==typeof document)return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(t){return}let n=e&&u(e[1]);return n&&JSON.parse(n)},T=()=>{try{return E()||x()||S()}catch(e){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`);return}},I=e=>{var t,n;return null===(n=null===(t=T())||void 0===t?void 0:t.emulatorHosts)||void 0===n?void 0:n[e]},k=()=>{var e;return null===(e=T())||void 0===e?void 0:e.config},C=e=>{var t;return null===(t=T())||void 0===t?void 0:t[`_${e}`]};/** 3219 * @license 3220 * Copyright 2017 Google LLC 3221 * 3222 * Licensed under the Apache License, Version 2.0 (the "License"); 3223 * you may not use this file except in compliance with the License. 3224 * You may obtain a copy of the License at 3225 * 3226 * http://www.apache.org/licenses/LICENSE-2.0 3227 * 3228 * Unless required by applicable law or agreed to in writing, software 3229 * distributed under the License is distributed on an "AS IS" BASIS, 3230 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3231 * See the License for the specific language governing permissions and 3232 * limitations under the License. 3233 */ class R{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}wrapCallback(e){return(t,n)=>{t?this.reject(t):this.resolve(n),"function"==typeof e&&(this.promise.catch(()=>{}),1===e.length?e(t):e(t,n))}}}/** 3234 * @license 3235 * Copyright 2021 Google LLC 3236 * 3237 * Licensed under the Apache License, Version 2.0 (the "License"); 3238 * you may not use this file except in compliance with the License. 3239 * You may obtain a copy of the License at 3240 * 3241 * http://www.apache.org/licenses/LICENSE-2.0 3242 * 3243 * Unless required by applicable law or agreed to in writing, software 3244 * distributed under the License is distributed on an "AS IS" BASIS, 3245 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3246 * See the License for the specific language governing permissions and 3247 * limitations under the License. 3248 */ function A(e,t){if(e.uid)throw Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');let n=t||"demo-project",r=e.iat||0,i=e.sub||e.user_id;if(!i)throw Error("mockUserToken must contain 'sub' or 'user_id' field!");let s=Object.assign({iss:`https://securetoken.google.com/${n}`,aud:n,iat:r,exp:r+3600,auth_time:r,sub:i,user_id:i,firebase:{sign_in_provider:"custom",identities:{}}},e);return[l(JSON.stringify({alg:"none",type:"JWT"})),l(JSON.stringify(s)),""].join(".")}class O extends Error{constructor(e,t,n){super(t),this.code=e,this.customData=n,this.name="FirebaseError",Object.setPrototypeOf(this,O.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,D.prototype.create)}}class D{constructor(e,t,n){this.service=e,this.serviceName=t,this.errors=n}create(e,...t){var n,r;let i=t[0]||{},s=`${this.service}/${e}`,o=this.errors[e],a=o?(n=o,r=i,n.replace(N,(e,t)=>{let n=r[t];return null!=n?String(n):`<${t}?>`})):"Error",l=`${this.serviceName}: ${a} (${s}).`,u=new O(s,l,i);return u}}let N=/\{\$([^}]+)}/g;/** 3249 * @license 3250 * Copyright 2017 Google LLC 3251 * 3252 * Licensed under the Apache License, Version 2.0 (the "License");
3253 * you may not use this file except in compliance with the License. 3254 * You may obtain a copy of the License at 3255 * 3256 * http://www.apache.org/licenses/LICENSE-2.0 3257 * 3258 * Unless required by applicable law or agreed to in writing, software 3259 * distributed under the License is distributed on an "AS IS" BASIS, 3260 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3261 * See the License for the specific language governing permissions and 3262 * limitations under the License. 3263 */ function P(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function F(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function M(e){return null!==e&&"object"==typeof e}/** 3264 * @license 3265 * Copyright 2017 Google LLC 3266 * 3267 * Licensed under the Apache License, Version 2.0 (the "License"); 3268 * you may not use this file except in compliance with the License. 3269 * You may obtain a copy of the License at 3270 * 3271 * http://www.apache.org/licenses/LICENSE-2.0 3272 * 3273 * Unless required by applicable law or agreed to in writing, software 3274 * distributed under the License is distributed on an "AS IS" BASIS, 3275 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3276 * See the License for the specific language governing permissions and 3277 * limitations under the License. 3278 */ function L(e){let t=[];for(let[n,r]of Object.entries(e))Array.isArray(r)?r.forEach(e=>{t.push(encodeURIComponent(n)+"="+encodeURIComponent(e))}):t.push(encodeURIComponent(n)+"="+encodeURIComponent(r));return t.length?"&"+t.join("&"):""}function j(e){let t={},n=e.replace(/^\?/,"").split("&");return n.forEach(e=>{if(e){let[n,r]=e.split("=");
3278t[decodeURIComponent(n)]=decodeURIComponent(r)}}),t}function U(e){let t=e.indexOf("?");if(!t)return"";let n=e.indexOf("#",t);return e.substring(t,n>0?n:void 0)}function B(e,t){let n=new Z(e,t);return n.subscribe.bind(n)}class Z{constructor(e,t){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then(()=>{e(this)}).catch(e=>{this.error(e)})}next(e){this.forEachObserver(t=>{t.next(e)})}error(e){this.forEachObserver(t=>{t.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,t,n){let r;if(void 0===e&&void 0===t&&void 0===n)throw Error("Missing Observer.");void 0===(r=!function(e,t){if("object"!=typeof e||null===e)return!1;for(let n of t)if(n in e&&"function"==typeof e[n])return!0;return!1}(e,["next","error","complete"])?{next:e,error:t,complete:n}:e).next&&(r.next=$),void 0===r.error&&(r.error=$),void 0===r.complete&&(r.complete=$);let i=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?r.error(this.finalError):r.complete()}catch(e){}}),this.observers.push(r),i}unsubscribeOne(e){void 0!==this.observers&&void 0!==this.observers[e]&&(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let t=0;t<this.observers.length;t++)this.sendOne(t,e)}sendOne(e,t){this.task.then(()=>{if(void 0!==this.observers&&void 0!==this.observers[e])try{t(this.observers[e])}catch(n){"undefined"!=typeof console&&console.error&&console.error(n)}})}close(e){!this.finalized&&(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function $(){}function V(e,t=1e3,n=2){let r=t*Math.pow(n,e);return Math.min(144e5,r+Math.round(.5*r*(Math.random()-.5)*2))}/** 3279 * @license 3280 * Copyright 2021 Google LLC 3281 * 3282 * Licensed under the Apache License, Version 2.0 (the "License"); 3283 * you may not use this file except in compliance with the License. 3284 * You may obtain a copy of the License at 3285 * 3286 * http://www.apache.org/licenses/LICENSE-2.0 3287 * 3288 * Unless required by applicable law or agreed to in writing, software 3289 * distributed under the License is distributed on an "AS IS" BASIS, 3290 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3291 * See the License for the specific language governing permissions and 3292 * limitations under the License. 3293 */ function z(e){return e&&e._delegate?e._delegate:e}},8442:function(e,t){"use strict";t.Z=function(e){return"string"==typeof e}},9535:function(e,t,n){"use strict";var r=n(4836);t.Z=void 0,function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=o(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var a=i?Object.getOwnPropertyDescriptor(e,s):null;a&&(a.get||a.set)?Object.defineProperty(r,s,a):r[s]=e[s]}r.default=e,n&&n.set(e,r)}(n(7294));var i=r(n(4938)),s=n(5893);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(o=function(e){return e?n:t})(e)}var a=(0,i.default)((0,s.jsx)("path",{d:"M12.545,10.239v3.821h5.445c-0.712,2.315-2.647,3.972-5.445,3.972c-3.332,0-6.033-2.701-6.033-6.032s2.701-6.032,6.033-6.032c1.498,0,2.866,0.549,3.921,1.453l2.814-2.814C17.503,2.988,15.139,2,12.545,2C7.021,2,2.543,6.477,2.543,12s4.478,10,10.002,10c8.396,0,10.249-7.85,9.426-11.748L12.545,10.239z"}),"Google");t.Z=a},4938:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r.createSvgIcon}});var r=n(3029)},2741:function(e,t,n){"use strict";n.d(t,{Z:function(){return P}});var r,i=n(3366),s=n(7462),o=n(7294),a=n(6010),l=n(4780),u=n(1796),c=n(1719),h=n(8884),d=n(6622),f=n(918),p=n(4867),m=n(1588);function g(e){return(0,p.Z)("MuiAlert",e)}let y=(0,m.Z)("MuiAlert",["root","action","icon","message","filled","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]);var v=n(562),_=n(8175),b=n(5893),w=(0,_.Z)((0,b.jsx)("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}
3293),"SuccessOutlined"),E=(0,_.Z)((0,b.jsx)("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),x=(0,_.Z)((0,b.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),S=(0,_.Z)((0,b.jsx)("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),T=(0,_.Z)((0,b.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");let I=["action","children","className","closeText","color","icon","iconMapping","onClose","role","severity","variant"],k=e=>{let{variant:t,color:n,severity:r,classes:i}=e,s={root:["root",`${t}${(0,d.Z)(n||r)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return(0,l.Z)(s,g,i)},C=(0,c.ZP)(f.Z,{name:"MuiAlert",slot:"Root",overridesResolver(e,t){let{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${(0,d.Z)(n.color||n.severity)}`]]}})(({theme:e,ownerState:t})=>{let n="light"===e.palette.mode?u._j:u.$n,r="light"===e.palette.mode?u.$n:u._j,i=t.color||t.severity;return(0,s.Z)({},e.typography.body2,{backgroundColor:"transparent",display:"flex",padding:"6px 16px"},i&&"standard"===t.variant&&{color:e.vars?e.vars.palette.Alert[`${i}Color`]:n(e.palette[i].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${i}StandardBg`]:r(e.palette[i].light,.9),[`& .${y.icon}`]:e.vars?{color:e.vars.palette.Alert[`${i}IconColor`]}:{color:"dark"===e.palette.mode?e.palette[i].main:e.palette[i].light}},i&&"outlined"===t.variant&&{color:e.vars?e.vars.palette.Alert[`${i}Color`]:n(e.palette[i].light,.6),border:`1px solid ${(e.vars||e).palette[i].light}`,[`& .${y.icon}`]:e.vars?{color:e.vars.palette.Alert[`${i}IconColor`]}:{color:"dark"===e.palette.mode?e.palette[i].main:e.palette[i].light}},i&&"filled"===t.variant&&(0,s.Z)({fontWeight:e.typography.fontWeightMedium},e.vars?{color:e.vars.palette.Alert[`${i}FilledColor`],backgroundColor:e.vars.palette.Alert[`${i}FilledBg`]}:{backgroundColor:"dark"===e.palette.mode?e.palette[i].dark:e.palette[i].main,color:e.palette.getContrastText("dark"===e.palette.mode?e.palette[i].dark:e.palette[i].main)}))}),R=(0,c.ZP)("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),A=(0,c.ZP)("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),O=(0,c.ZP)("div",{name:"MuiAlert",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),D={success:(0,b.jsx)(w,{fontSize:"inherit"}),warning:(0,b.jsx)(E,{fontSize:"inherit"}),error:(0,b.jsx)(x,{fontSize:"inherit"}),info:(0,b.jsx)(S,{fontSize:"inherit"})},N=o.forwardRef(function(e,t){let n=(0,h.Z)({props:e,name:"MuiAlert"}),{action:o,children:l,className:u,closeText:c="Close",color:d,icon:f,iconMapping:p=D,onClose:m,role:g="alert",severity:y="success",variant:_="standard"}=n,w=(0,i.Z)(n,I),E=(0,s.Z)({},n,{color:d,severity:y,variant:_}),x=k(E);return(0,b.jsxs)(C,(0,s.Z)({role:g,elevation:0,ownerState:E,className:(0,a.Z)(x.root,u),ref:t},w,{children:[!1!==f?(0,b.jsx)(R,{ownerState:E,className:x.icon,children:f||p[y]||D[y]}):null,(0,b.jsx)(A,{ownerState:E,className:x.message,children:l}),null!=o?(0,b.jsx)(O,{ownerState:E,className:x.action,children:o}):null,null==o&&m?(0,b.jsx)(O,{ownerState:E,className:x.action,children:(0,b.jsx)(v.Z,{size:"small","aria-label":c,title:c,color:"inherit",onClick:m,children:r||(r=(0,b.jsx)(T,{fontSize:"small"}))})}):null]}))});var P=N},8735:function(e,t,n){"use strict";n.d(t,{Z:function(){return _}});var r=n(3366),i=n(7462),s=n(7294),o=n(6010),a=n(4780),l=n(1719),u=n(8884),c=n(9942),h=n(4867),d=n(1588);function f(e){return(0,h.Z)("MuiBackdrop",e)}(0,d.Z)("MuiBackdrop",["root","invisible"]);var p=n(5893);let m=["children","component","components","componentsProps","className","invisible","open","transitionDuration","TransitionComponent"],g=e=>{let{classes:t,invisible:n}=e;return(0,a.Z)({root:["root",n&&"invisible"]},f,t)},y=(0,l.ZP)("div",{name:"MuiBackdrop",slot:"Root",overridesResolver(e,t){let{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>(0,i.Z)({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),v=s.forwardRef(function(e,t){var n,s;let a=(0,u.Z)({props:e,name:"MuiBackdrop"}),{children:l,component:h="div",components:d={},componentsProps:f={},className:v,invisible:_=!1,open:b,transitionDuration:w,TransitionComponent:E=c.Z}=a,x=(0,r.Z)(a,m),S=(0,i.Z)({},a,{component:h,invisible:_}),T=g(S);return(0,p.jsx)(E,(0,i.Z)({in:b,timeout:w},x,{children:(0,p.jsx)(y,{"aria-hidden":!0,as:null!=(n=d.Root)?n:h,className:(0,o.Z)(T.root,v),ownerState:(0,i.Z)({},S,null==(s=f.root)?void 0:s.ownerState),classes:T,ref:t,children:l})}))});var _=v},120:function(e,t,n){"use strict";var r=n(1354),i=n(7078),s=n(9762);let o=(0,s.Z)(),a=(0,r.Z)({defaultTheme:o,defaultClassName:"MuiBox-root",generateClassName:i.Z.generate});t.Z=a},9828:function(e,t,n){"use strict";n.d(t,{Z:function(){return $}});var r=n(7462),i=n(3366),s=n(7294),o=n(6010),a=n(4780),l=n(1719),u=n(8884),c=n(4771),h=n(4846),d=n(1625),f=n(5068),p=n(220);function m(e,t){var n=Object.create(null);return e&&s.Children.map(e,function(e){return e}
3293).forEach(function(e){var r;n[e.key]=t&&(0,s.isValidElement)(e)?t(e):e}),n}function g(e,t,n){return null!=n[t]?n[t]:e.props[t]}var y=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},v=function(e){function t(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind(function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}(0,f.Z)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,i,o,a,l,u,c=t.children,h=t.handleExited;return{children:t.firstRender?m(e.children,function(t){return(0,s.cloneElement)(t,{onExited:h.bind(null,t),in:!0,appear:g(t,"appear",e),enter:g(t,"enter",e),exit:g(t,"exit",e)})}):(l=m(e.children),Object.keys(u=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),s=[];for(var o in e)o in t?s.length&&(i[o]=s,s=[]):s.push(o);var a={};for(var l in t){if(i[l])for(r=0;r<i[l].length;r++){var u=i[l][r];a[i[l][r]]=n(u)}a[l]=n(l)}for(r=0;r<s.length;r++)a[s[r]]=n(s[r]);return a}(c,l)).forEach(function(t){var n=u[t];if((0,s.isValidElement)(n)){var r=t in c,i=t in l,o=c[t],a=(0,s.isValidElement)(o)&&!o.props.in;i&&(!r||a)?u[t]=(0,s.cloneElement)(n,{onExited:h.bind(null,n),in:!0,exit:g(n,"exit",e),enter:g(n,"enter",e)}):i||!r||a?i&&r&&(0,s.isValidElement)(o)&&(u[t]=(0,s.cloneElement)(n,{onExited:h.bind(null,n),in:o.props.in,exit:g(n,"exit",e),enter:g(n,"enter",e)})):u[t]=(0,s.cloneElement)(n,{in:!1})}}),u),firstRender:!1}},n.handleExited=function(e,t){var n=m(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=(0,r.Z)({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=(0,i.Z)(e,["component","childFactory"]),o=this.state.contextValue,a=y(this.state.children).map(n);return(delete r.appear,delete r.enter,delete r.exit,null===t)?s.createElement(p.Z.Provider,{value:o},a):s.createElement(p.Z.Provider,{value:o},s.createElement(t,r,a))},t}(s.Component);v.propTypes={},v.defaultProps={component:"div",childFactory:function(e){return e}};var _=n(917),b=n(5893),w=function(e){let{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:a,rippleSize:l,in:u,onExited:c,timeout:h}=e,[d,f]=s.useState(!1),p=(0,o.Z)(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),m=(0,o.Z)(n.child,d&&n.childLeaving,r&&n.childPulsate);return u||d||f(!0),s.useEffect(()=>{if(!u&&null!=c){let e=setTimeout(c,h);return()=>{clearTimeout(e)}}},[c,u,h]),(0,b.jsx)("span",{className:p,style:{width:l,height:l,top:-(l/2)+a,left:-(l/2)+i},children:(0,b.jsx)("span",{className:m})})},E=n(1588);let x=(0,E.Z)("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),S=["center","classes","className"],T,I,k,C,R=(0,_.F4)(T||(T=(e=>e)` 3294 0% { 3295 transform: scale(0); 3296 opacity: 0.1; 3297 } 3298 3299 100% { 3300 transform: scale(1); 3301 opacity: 0.3; 3302 } 3303`)),A=(0,_.F4)(I||(I=(e=>e)` 3304 0% { 3305 opacity: 1; 3306 } 3307 3308 100% { 3309 opacity: 0; 3310 } 3311`)),O=(0,_.F4)(k||(k=(e=>e)` 3312 0% { 3313 transform: scale(1); 3314 } 3315 3316 50% { 3317 transform: scale(0.92); 3318 } 3319 3320 100% { 3321 transform: scale(1); 3322 } 3323`)),D=(0,l.ZP)("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),N=(0,l.ZP)(w,{name:"MuiTouchRipple",slot:"Ripple"})(C||(C=(e=>e)` 3324 opacity: 0; 3325 position: absolute; 3326 3327 &.${0} { 3328 opacity: 0.3; 3329 transform: scale(1); 3330 animation-name: ${0}; 3331 animation-duration: ${0}ms; 3332 animation-timing-function: ${0}; 3333 } 3334 3335 &.${0} { 3336 animation-duration: ${0}ms; 3337 } 3338 3339 & .${0} { 3340 opacity: 1; 3341 display: block; 3342 width: 100%; 3343 height: 100%; 3344 border-radius: 50%; 3345 background-color: currentColor; 3346 } 3347 3348 & .${0} { 3349 opacity: 0; 3350 animation-name: ${0}; 3351 animation-duration: ${0}ms; 3352 animation-timing-function: ${0}; 3353 } 3354 3355 & .${0} { 3356 position: absolute; 3357 /* @noflip */ 3358 left: 0px; 3359 top: 0; 3360 animation-name: ${0}; 3361 animation-duration: 2500ms; 3362 animation-timing-function: ${0}; 3363 animation-iteration-count: infinite; 3364 animation-delay: 200ms; 3365 } 3366`),x.rippleVisible,R,550,({theme:e})=>e.transitions.easing.easeInOut,x.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,x.child,x.childLeaving,A,550,({theme:e})=>e.transitions.easing.easeInOut,x.childPulsate,O,({theme:e})=>e.transitions.easing.easeInOut),P=s.forwardRef(function(e,t){let n=(0,u.Z)({props:e,name:"MuiTouchRipple"}),{center:a=!1,classes:l={},className:c}=n,h=(0,i.Z)(n,S),[d,f]=s.useState([]),p=s.useRef(0),m=s.useRef(null);s.useEffect(()=>{m.current&&(m.current(),m.current=null)},[d]);let g=s.useRef(!1),y=s.useRef(null),_=s.useRef(null),w=s.useRef(null);s.useEffect(()=>()=>{clearTimeout(y.current)},[]);let E=s.useCallback(e=>{let{pulsate:t,rippleX:n,rippleY:r,rippleSize:i,cb:s}=e;f(e=>[...e,(0,b.jsx)(N,{classes:{ripple:(0,o.Z)(l.ripple,x.ripple),rippleVisible:(0,o.Z)(l.rippleVisible,x.rippleVisible),ripplePulsate:(0,o.Z)(l.ripplePulsate,x.ripplePulsate),
3366child:(0,o.Z)(l.child,x.child),childLeaving:(0,o.Z)(l.childLeaving,x.childLeaving),childPulsate:(0,o.Z)(l.childPulsate,x.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:i},p.current)]),p.current+=1,m.current=s},[l]),T=s.useCallback((e={},t={},n)=>{let{pulsate:r=!1,center:i=a||t.pulsate,fakeElement:s=!1}=t;if((null==e?void 0:e.type)==="mousedown"&&g.current){g.current=!1;return}(null==e?void 0:e.type)==="touchstart"&&(g.current=!0);let o=s?null:w.current,l=o?o.getBoundingClientRect():{width:0,height:0,left:0,top:0},u,c,h;if(!i&&void 0!==e&&(0!==e.clientX||0!==e.clientY)&&(e.clientX||e.touches)){let{clientX:d,clientY:f}=e.touches&&e.touches.length>0?e.touches[0]:e;u=Math.round(d-l.left),c=Math.round(f-l.top)}else u=Math.round(l.width/2),c=Math.round(l.height/2);if(i)(h=Math.sqrt((2*l.width**2+l.height**2)/3))%2==0&&(h+=1);else{let p=2*Math.max(Math.abs((o?o.clientWidth:0)-u),u)+2,m=2*Math.max(Math.abs((o?o.clientHeight:0)-c),c)+2;h=Math.sqrt(p**2+m**2)}null!=e&&e.touches?null===_.current&&(_.current=()=>{E({pulsate:r,rippleX:u,rippleY:c,rippleSize:h,cb:n})},y.current=setTimeout(()=>{_.current&&(_.current(),_.current=null)},80)):E({pulsate:r,rippleX:u,rippleY:c,rippleSize:h,cb:n})},[a,E]),I=s.useCallback(()=>{T({},{pulsate:!0})},[T]),k=s.useCallback((e,t)=>{if(clearTimeout(y.current),(null==e?void 0:e.type)==="touchend"&&_.current){_.current(),_.current=null,y.current=setTimeout(()=>{k(e,t)});return}_.current=null,f(e=>e.length>0?e.slice(1):e),m.current=t},[]);return s.useImperativeHandle(t,()=>({pulsate:I,start:T,stop:k}),[I,T,k]),(0,b.jsx)(D,(0,r.Z)({className:(0,o.Z)(x.root,l.root,c),ref:w},h,{children:(0,b.jsx)(v,{component:null,exit:!0,children:d})}))});var F=n(4867);function M(e){return(0,F.Z)("MuiButtonBase",e)}let L=(0,E.Z)("MuiButtonBase",["root","disabled","focusVisible"]),j=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],U=e=>{let{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,s=(0,a.Z)({root:["root",t&&"disabled",n&&"focusVisible"]},M,i);return n&&r&&(s.root+=` ${r}`),s},B=(0,l.ZP)("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${L.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Z=s.forwardRef(function(e,t){let n=(0,u.Z)({props:e,name:"MuiButtonBase"}),{action:a,centerRipple:l=!1,children:f,className:p,component:m="button",disabled:g=!1,disableRipple:y=!1,disableTouchRipple:v=!1,focusRipple:_=!1,LinkComponent:w="a",onBlur:E,onClick:x,onContextMenu:S,onDragLeave:T,onFocus:I,onFocusVisible:k,onKeyDown:C,onKeyUp:R,onMouseDown:A,onMouseLeave:O,onMouseUp:D,onTouchEnd:N,onTouchMove:F,onTouchStart:M,tabIndex:L=0,TouchRippleProps:Z,touchRippleRef:$,type:V}=n,z=(0,i.Z)(n,j),q=s.useRef(null),G=s.useRef(null),W=(0,c.Z)(G,$),{isFocusVisibleRef:H,onFocus:K,onBlur:Y,ref:Q}=(0,d.Z)(),[X,J]=s.useState(!1);g&&X&&J(!1),s.useImperativeHandle(a,()=>({focusVisible(){J(!0),q.current.focus()}}),[]);let[ee,et]=s.useState(!1);function en(e,t,n=v){return(0,h.Z)(r=>(t&&t(r),!n&&G.current&&G.current[e](r),!0))}s.useEffect(()=>{et(!0)},[]),s.useEffect(()=>{X&&_&&!y&&ee&&G.current.pulsate()},[y,_,X,ee]);let er=en("start",A),ei=en("stop",S),es=en("stop",T),eo=en("stop",D),ea=en("stop",e=>{X&&e.preventDefault(),O&&O(e)}),el=en("start",M),eu=en("stop",N),ec=en("stop",F),eh=en("stop",e=>{Y(e),!1===H.current&&J(!1),E&&E(e)},!1),ed=(0,h.Z)(e=>{q.current||(q.current=e.currentTarget),K(e),!0===H.current&&(J(!0),k&&k(e)),I&&I(e)}),ef=()=>{let e=q.current;return m&&"button"!==m&&!("A"===e.tagName&&e.href)},ep=s.useRef(!1),em=(0,h.Z)(e=>{_&&!ep.current&&X&&G.current&&" "===e.key&&(ep.current=!0,G.current.stop(e,()=>{G.current.start(e)})),e.target===e.currentTarget&&ef()&&" "===e.key&&e.preventDefault(),C&&C(e),e.target===e.currentTarget&&ef()&&"Enter"===e.key&&!g&&(e.preventDefault(),x&&x(e))}),eg=(0,h.Z)(e=>{_&&" "===e.key&&G.current&&X&&!e.defaultPrevented&&(ep.current=!1,G.current.stop(e,()=>{G.current.pulsate(e)})),R&&R(e),x&&e.target===e.currentTarget&&ef()&&" "===e.key&&!e.defaultPrevented&&x(e)}),ey=m;"button"===ey&&(z.href||z.to)&&(ey=w);let ev={};"button"===ey?(ev.type=void 0===V?"button":V,ev.disabled=g):(z.href||z.to||(ev.role="button"),g&&(ev["aria-disabled"]=g));let e_=(0,c.Z)(t,Q,q),eb=(0,r.Z)({},n,{centerRipple:l,component:m,disabled:g,disableRipple:y,disableTouchRipple:v,focusRipple:_,tabIndex:L,focusVisible:X}),ew=U(eb);return(0,b.jsxs)(B,(0,r.Z)({as:ey,className:(0,o.Z)(ew.root,p),ownerState:eb,onBlur:eh,onClick:x,onContextMenu:ei,onFocus:ed,onKeyDown:em,onKeyUp:eg,onMouseDown:er,onMouseLeave:ea,onMouseUp:eo,onDragLeave:es,onTouchEnd:eu,onTouchMove:ec,onTouchStart:el,ref:e_,tabIndex:g?-1:L,type:V},ev,z,{children:[f,!ee||y||g?null:(0,b.jsx)(P,(0,r.Z)({ref:W,center:l},Z))]}))});var $=Z},5084:function(e,t,n){"use strict";n.d(t,{Z:function(){return k}});var r=n(3366),i=n(7462),s=n(7294),o=n(6010),a=n(7925),l=n(4780),u=n(1796),c=n(1719),h=n(8884),d=n(9828),f=n(6622),p=n(4867),m=n(1588);function g(e){return(0,p.Z)("MuiButton",e)}let y=(0,m.Z)("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),v=s.createContext({});var _=n(5893);let b=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],w=e=>{let{color:t,disableElevation:n,fullWidth:r,size:s,variant:o,classes:a}=e,u={root:["root",o,`${o}${(0,f.Z)(t)}`,`size${(0,f.Z)(s)}`,`${o}Size${(0,f.Z)(s)}`,"inherit"===t&&"colorInherit",n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${(0,f.Z)(s)}`],endIcon:["endIcon",`iconSize${(0,f.Z)(s)}`]},c=(0,l.Z)(u,g,a);return(0,i.Z)({},a,c)},E=e=>(0,i.Z)({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),x=(0,c.ZP)(d.Z,{shouldForwardProp:e=>(0,c.FO)(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver(e,t){let{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${(0,f.Z)(n.color)}`],t[`size${(0,f.Z)(n.size)}`],t[`${n.variant}Size${(0,f.Z)(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var n,r;return(0,i.Z)({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":(0,i.Z)({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,u.Fq)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===t.variant&&"inherit"!==t.color&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainCh
3366annel} / ${e.vars.palette.action.hoverOpacity})`:(0,u.Fq)(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===t.variant&&"inherit"!==t.color&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,u.Fq)(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===t.variant&&{backgroundColor:(e.vars||e).palette.grey.A100,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},"contained"===t.variant&&"inherit"!==t.color&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":(0,i.Z)({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${y.focusVisible}`]:(0,i.Z)({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${y.disabled}`]:(0,i.Z)({color:(e.vars||e).palette.action.disabled},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"outlined"===t.variant&&"secondary"===t.color&&{border:`1px solid ${(e.vars||e).palette.action.disabled}`},"contained"===t.variant&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},"text"===t.variant&&{padding:"6px 8px"},"text"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main},"outlined"===t.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${(0,u.Fq)(e.palette[t.color].main,.5)}`},"contained"===t.variant&&{color:e.vars?e.vars.palette.text.primary:null==(n=(r=e.palette).getContrastText)?void 0:n.call(r,e.palette.grey[300]),backgroundColor:(e.vars||e).palette.grey[300],boxShadow:(e.vars||e).shadows[2]},"contained"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},"inherit"===t.color&&{color:"inherit",borderColor:"currentColor"},"small"===t.size&&"text"===t.variant&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"text"===t.variant&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"outlined"===t.variant&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"outlined"===t.variant&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"contained"===t.variant&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"contained"===t.variant&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${y.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${y.disabled}`]:{boxShadow:"none"}}),S=(0,c.ZP)("span",{name:"MuiButton",slot:"StartIcon",overridesResolver(e,t){let{ownerState:n}=e;return[t.startIcon,t[`iconSize${(0,f.Z)(n.size)}`]]}})(({ownerState:e})=>(0,i.Z)({display:"inherit",marginRight:8,marginLeft:-4},"small"===e.size&&{marginLeft:-2},E(e))),T=(0,c.ZP)("span",{name:"MuiButton",slot:"EndIcon",overridesResolver(e,t){let{ownerState:n}=e;return[t.endIcon,t[`iconSize${(0,f.Z)(n.size)}`]]}})(({ownerState:e})=>(0,i.Z)({display:"inherit",marginRight:-4,marginLeft:8},"small"===e.size&&{marginRight:-2},E(e))),I=s.forwardRef(function(e,t){let n=s.useContext(v),l=(0,a.Z)(n,e),u=(0,h.Z)({props:l,name:"MuiButton"}),{children:c,color:d="primary",component:f="button",className:p,disabled:m=!1,disableElevation:g=!1,disableFocusRipple:y=!1,endIcon:E,focusVisibleClassName:I,fullWidth:k=!1,size:C="medium",startIcon:R,type:A,variant:O="text"}=u,D=(0,r.Z)(u,b),N=(0,i.Z)({},u,{color:d,component:f,disabled:m,disableElevation:g,disableFocusRipple:y,fullWidth:k,size:C,type:A,variant:O}),P=w(N),F=R&&(0,_.jsx)(S,{className:P.startIcon,ownerState:N,children:R}),M=E&&(0,_.jsx)(T,{className:P.endIcon,ownerState:N,children:E});return(0,_.jsxs)(x,(0,i.Z)({ownerState:N,className:(0,o.Z)(n.className,P.root,p),component:f,disabled:m,focusRipple:!y,focusVisibleClassName:(0,o.Z)(P.focusVisible,I),ref:t,type:A},D,{classes:P,children:[F,c,M]}))});var k=I},754:function(e,t,n){"use strict";n.d(t,{Z:function(){return R}});var r=n(3366),i=n(7462),s=n(7294),o=n(6010),a=n(4780),l=n(917),u=n(6622),c=n(8884),h=n(1719),d=n(4867),f=n(1588);function p(e){return(0,d.Z)("MuiCircularProgress",e)}(0,f.Z)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var m=n(5893);let g=["className","color","disableShrink","size","style","thickness","value","variant"],y=e=>e,v,_,b,w,E=(0,l.F4)(v||(v=y` 3367 0% { 3368 transform: rotate(0deg); 3369 } 3370 3371 100% { 3372 transform: rotate(360deg); 3373 } 3374`)),x=(0,l.F4)(_||(_=y` 3375 0% { 3376 stroke-dasharray: 1px, 200px; 3377 stroke-dashoffset: 0; 3378 } 3379 3380 50% { 3381 stroke-dasharray: 100px, 200px; 3382 stroke-dashoffset: -15px; 3383 } 3384 3385 100% { 3386 stroke-dasharray: 100px, 200px; 3387 stroke-dashoffset: -125px; 3388 } 3389`)),S=e=>{let{classes:t,variant:n,color:r,disableShrink:i}=e,s={root:["root",n,`color${(0,u.Z)(r)}
3389`],svg:["svg"],circle:["circle",`circle${(0,u.Z)(n)}`,i&&"circleDisableShrink"]};return(0,a.Z)(s,p,t)},T=(0,h.ZP)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver(e,t){let{ownerState:n}=e;return[t.root,t[n.variant],t[`color${(0,u.Z)(n.color)}`]]}})(({ownerState:e,theme:t})=>(0,i.Z)({display:"inline-block"},"determinate"===e.variant&&{transition:t.transitions.create("transform")},"inherit"!==e.color&&{color:(t.vars||t).palette[e.color].main}),({ownerState:e})=>"indeterminate"===e.variant&&(0,l.iv)(b||(b=y` 3390 animation: ${0} 1.4s linear infinite; 3391 `),E)),I=(0,h.ZP)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),k=(0,h.ZP)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver(e,t){let{ownerState:n}=e;return[t.circle,t[`circle${(0,u.Z)(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(({ownerState:e,theme:t})=>(0,i.Z)({stroke:"currentColor"},"determinate"===e.variant&&{transition:t.transitions.create("stroke-dashoffset")},"indeterminate"===e.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:e})=>"indeterminate"===e.variant&&!e.disableShrink&&(0,l.iv)(w||(w=y` 3392 animation: ${0} 1.4s ease-in-out infinite; 3393 `),x)),C=s.forwardRef(function(e,t){let n=(0,c.Z)({props:e,name:"MuiCircularProgress"}),{className:s,color:a="primary",disableShrink:l=!1,size:u=40,style:h,thickness:d=3.6,value:f=0,variant:p="indeterminate"}=n,y=(0,r.Z)(n,g),v=(0,i.Z)({},n,{color:a,disableShrink:l,size:u,thickness:d,value:f,variant:p}),_=S(v),b={},w={},E={};if("determinate"===p){let x=2*Math.PI*((44-d)/2);b.strokeDasharray=x.toFixed(3),E["aria-valuenow"]=Math.round(f),b.strokeDashoffset=`${((100-f)/100*x).toFixed(3)}px`,w.transform="rotate(-90deg)"}return(0,m.jsx)(T,(0,i.Z)({className:(0,o.Z)(_.root,s),style:(0,i.Z)({width:u,height:u},w,h),ownerState:v,ref:t,role:"progressbar"},E,y,{children:(0,m.jsx)(I,{className:_.svg,ownerState:v,viewBox:"22 22 44 44",children:(0,m.jsx)(k,{className:_.circle,style:b,ownerState:v,cx:44,cy:44,r:(44-d)/2,fill:"none",strokeWidth:d})})}))});var R=C},9942:function(e,t,n){"use strict";var r=n(7462),i=n(3366),s=n(7294),o=n(8662),a=n(2097),l=n(3566),u=n(4771),c=n(5893);let h=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],d={entering:{opacity:1},entered:{opacity:1}},f=s.forwardRef(function(e,t){let n=(0,a.Z)(),f={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:p,appear:m=!0,children:g,easing:y,in:v,onEnter:_,onEntered:b,onEntering:w,onExit:E,onExited:x,onExiting:S,style:T,timeout:I=f,TransitionComponent:k=o.ZP}=e,C=(0,i.Z)(e,h),R=s.useRef(null),A=(0,u.Z)(R,g.ref,t),O=e=>t=>{if(e){let n=R.current;void 0===t?e(n):e(n,t)}},D=O(w),N=O((e,t)=>{(0,l.n)(e);let r=(0,l.C)({style:T,timeout:I,easing:y},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),_&&_(e,t)}),P=O(b),F=O(S),M=O(e=>{let t=(0,l.C)({style:T,timeout:I,easing:y},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),E&&E(e)}),L=O(x),j=e=>{p&&p(R.current,e)};return(0,c.jsx)(k,(0,r.Z)({appear:m,in:v,nodeRef:R,onEnter:N,onEntered:P,onEntering:D,onExit:M,onExited:L,onExiting:F,addEndListener:j,timeout:I},C,{children:(e,t)=>s.cloneElement(g,(0,r.Z)({style:(0,r.Z)({opacity:0,visibility:"exited"!==e||v?void 0:"hidden"},d[e],T,g.props.style),ref:A},t))}))});t.Z=f},7630:function(e,t,n){"use strict";n.d(t,{Z:function(){return E}});var r=n(3366),i=n(7462),s=n(7294),o=n(9766),a=n(4780),l=n(1011),u=n(1719),c=n(8884),h=n(4867),d=n(1588),f=n(8493);function p(e){return(0,h.Z)("MuiFilledInput",e)}let m=(0,i.Z)({},f.Z,(0,d.Z)("MuiFilledInput",["root","underline","input"]));var g=n(5893);let y=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","type"],v=e=>{let{classes:t,disableUnderline:n}=e,r=(0,a.Z)({root:["root",!n&&"underline"],input:["input"]},p,t);return(0,i.Z)({},t,r)},_=(0,u.ZP)(l.Ej,{shouldForwardProp:e=>(0,u.FO)(e)||"classes"===e,name:"MuiFilledInput",slot:"Root",overridesResolver(e,t){let{ownerState:n}=e;return[...(0,l.Gx)(e,t),!n.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{var n;let r="light"===e.palette.mode,s=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)";return(0,i.Z)({position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:s,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)","@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:s}},[`&.${m.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:s},[`&.${m.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)"}},!t.disableUnderline&&{"&:after":{borderBottom:`2px solid ${null==(n=(e.vars||e).palette[t.color||"primary"])?void 0:n.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${m.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${m.error}:after`]:{borderBottomColor:(e.vars||e).palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroun
3393dChannel} / ${e.vars.opacity.inputUnderline})`:r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)"}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${m.disabled}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${m.disabled}:before`]:{borderBottomStyle:"dotted"}},t.startAdornment&&{paddingLeft:12},t.endAdornment&&{paddingRight:12},t.multiline&&(0,i.Z)({padding:"25px 12px 8px"},"small"===t.size&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17}))}),b=(0,u.ZP)(l.rA,{name:"MuiFilledInput",slot:"Input",overridesResolver:l._o})(({theme:e,ownerState:t})=>(0,i.Z)({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===t.size&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0},t.hiddenLabel&&"small"===t.size&&{paddingTop:8,paddingBottom:9})),w=s.forwardRef(function(e,t){let n=(0,c.Z)({props:e,name:"MuiFilledInput"}),{components:s={},componentsProps:a,fullWidth:u=!1,inputComponent:h="input",multiline:d=!1,type:f="text"}=n,p=(0,r.Z)(n,y),m=(0,i.Z)({},n,{fullWidth:u,inputComponent:h,multiline:d,type:f}),w=v(n),E={root:{ownerState:m},input:{ownerState:m}},x=a?(0,o.Z)(a,E):E;return(0,g.jsx)(l.ZP,(0,i.Z)({components:(0,i.Z)({Root:_,Input:b},s),componentsProps:x,fullWidth:u,inputComponent:h,multiline:d,ref:t,type:f},p,{classes:w}))});w.muiName="Input";var E=w},5343:function(e,t,n){"use strict";n.d(t,{Z:function(){return E}});var r=n(3366),i=n(7462),s=n(7294),o=n(6010),a=n(4780),l=n(8884),u=n(1719),c=n(7240),h=n(6622),d=n(7335),f=n(2586),p=n(4867),m=n(1588);function g(e){return(0,p.Z)("MuiFormControl",e)}(0,m.Z)("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);var y=n(5893);let v=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],_=e=>{let{classes:t,margin:n,fullWidth:r}=e,i={root:["root","none"!==n&&`margin${(0,h.Z)(n)}`,r&&"fullWidth"]};return(0,a.Z)(i,g,t)},b=(0,u.ZP)("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>(0,i.Z)({},t.root,t[`margin${(0,h.Z)(e.margin)}`],e.fullWidth&&t.fullWidth)})(({ownerState:e})=>(0,i.Z)({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},"normal"===e.margin&&{marginTop:16,marginBottom:8},"dense"===e.margin&&{marginTop:8,marginBottom:4},e.fullWidth&&{width:"100%"})),w=s.forwardRef(function(e,t){let n=(0,l.Z)({props:e,name:"MuiFormControl"}),{children:a,className:u,color:h="primary",component:p="div",disabled:m=!1,error:g=!1,focused:w,fullWidth:E=!1,hiddenLabel:x=!1,margin:S="none",required:T=!1,size:I="medium",variant:k="outlined"}=n,C=(0,r.Z)(n,v),R=(0,i.Z)({},n,{color:h,component:p,disabled:m,error:g,fullWidth:E,hiddenLabel:x,margin:S,required:T,size:I,variant:k}),A=_(R),[O,D]=s.useState(()=>{let e=!1;return a&&s.Children.forEach(a,t=>{if(!(0,d.Z)(t,["Input","Select"]))return;let n=(0,d.Z)(t,["Select"])?t.props.input:t;n&&(0,c.B7)(n.props)&&(e=!0)}),e}),[N,P]=s.useState(()=>{let e=!1;return a&&s.Children.forEach(a,t=>{(0,d.Z)(t,["Input","Select"])&&(0,c.vd)(t.props,!0)&&(e=!0)}),e}),[F,M]=s.useState(!1);m&&F&&M(!1);let L,j=s.useCallback(()=>{P(!0)},[]),U=s.useCallback(()=>{P(!1)},[]);return(0,y.jsx)(f.Z.Provider,{value:{adornedStart:O,setAdornedStart:D,color:h,disabled:m,error:g,filled:N,focused:void 0===w||m?F:w,fullWidth:E,hiddenLabel:x,size:I,onBlur(){M(!1)},onEmpty:U,onFilled:j,onFocus(){M(!0)},registerEffect:L,required:T,variant:k},children:(0,y.jsx)(b,(0,i.Z)({as:p,ownerState:R,className:(0,o.Z)(A.root,u),ref:t},C,{children:a}))})});var E=w},2586:function(e,t,n){"use strict";var r=n(7294);let i=r.createContext();t.Z=i},6594:function(e,t,n){"use strict";function r({props:e,states:t,muiFormControl:n}){return t.reduce((t,r)=>(t[r]=e[r],n&&void 0===e[r]&&(t[r]=n[r]),t),{})}n.d(t,{Z:function(){return r}})},9711:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(7294),i=n(2586);function s(){return r.useContext(i.Z)}},2631:function(e,t,n){"use strict";n.d(t,{Z:function(){return x}});var r,i=n(3366),s=n(7462),o=n(7294),a=n(6010),l=n(4780),u=n(6594),c=n(9711),h=n(1719),d=n(6622),f=n(4867),p=n(1588);function m(e){return(0,f.Z)("MuiFormHelperText",e)}let g=(0,p.Z)("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var y=n(8884),v=n(5893);let _=["children","className","component","disabled","error","filled","focused","margin","required","variant"],b=e=>{let{classes:t,contained:n,size:r,disabled:i,error:s,filled:o,focused:a,required:u}=e,c={root:["root",i&&"disabled",s&&"error",r&&`size${(0,d.Z)(r)}
3393`,n&&"contained",a&&"focused",o&&"filled",u&&"required"]};return(0,l.Z)(c,m,t)},w=(0,h.ZP)("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver(e,t){let{ownerState:n}=e;return[t.root,n.size&&t[`size${(0,d.Z)(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(({theme:e,ownerState:t})=>(0,s.Z)({color:(e.vars||e).palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${g.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${g.error}`]:{color:(e.vars||e).palette.error.main}},"small"===t.size&&{marginTop:4},t.contained&&{marginLeft:14,marginRight:14})),E=o.forwardRef(function(e,t){let n=(0,y.Z)({props:e,name:"MuiFormHelperText"}),{children:o,className:l,component:h="p"}=n,d=(0,i.Z)(n,_),f=(0,c.Z)(),p=(0,u.Z)({props:n,muiFormControl:f,states:["variant","size","disabled","error","filled","focused","required"]}),m=(0,s.Z)({},n,{component:h,contained:"filled"===p.variant||"outlined"===p.variant,variant:p.variant,size:p.size,disabled:p.disabled,error:p.error,filled:p.filled,focused:p.focused,required:p.required}),g=b(m);return(0,v.jsx)(w,(0,s.Z)({as:h,ownerState:m,className:(0,a.Z)(g.root,l),ref:t},d,{children:" "===o?r||(r=(0,v.jsx)("span",{className:"notranslate",children:"â"})):o}))});var x=E},3918:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(7462);n(7294);var i=n(917),s=n(5893);function o(e){let{styles:t,defaultTheme:n={}}=e;return(0,s.jsx)(i.xB,{styles:"function"==typeof t?e=>{var r;return t(null==e||0===Object.keys(e).length?n:e)}:t})}var a=n(5165),l=function(e){return(0,s.jsx)(o,(0,r.Z)({},e,{defaultTheme:a.Z}))}},9072:function(e,t,n){"use strict";n.d(t,{ZP:function(){return k}});var r=n(3366),i=n(7462),s=n(7294),o=n(6010),a=n(5408),l=n(9707),u=n(4780),c=n(1719),h=n(8884),d=n(2097);let f=s.createContext();var p=n(4867),m=n(1588);function g(e){return(0,p.Z)("MuiGrid",e)}let y=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],v=(0,m.Z)("MuiGrid",["root","container","item","zeroMinWidth",...[0,1,2,3,4,5,6,7,8,9,10].map(e=>`spacing-xs-${e}`),...["column-reverse","column","row-reverse","row"].map(e=>`direction-xs-${e}`),...["nowrap","wrap-reverse","wrap"].map(e=>`wrap-xs-${e}`),...y.map(e=>`grid-xs-${e}`),...y.map(e=>`grid-sm-${e}`),...y.map(e=>`grid-md-${e}`),...y.map(e=>`grid-lg-${e}`),...y.map(e=>`grid-xl-${e}`)]);var _=v,b=n(5893);let w=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function E(e){let t=parseFloat(e);return`${t}
3393${String(e).replace(String(t),"")||"px"}`}function x({breakpoints:e,values:t}){let n="";Object.keys(t).forEach(e=>{""===n&&0!==t[e]&&(n=e)});let r=Object.keys(e).sort((t,n)=>e[t]-e[n]);return r.slice(0,r.indexOf(n))}let S=(0,c.ZP)("div",{name:"MuiGrid",slot:"Root",overridesResolver(e,t){let{ownerState:n}=e,{container:r,direction:i,item:s,spacing:o,wrap:a,zeroMinWidth:l,breakpoints:u}=n,c=[];r&&(c=function(e,t,n={}){if(!e||e<=0)return[];if("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e)return[n[`spacing-xs-${String(e)}`]];let r=[];return t.forEach(t=>{let i=e[t];Number(i)>0&&r.push(n[`spacing-${t}-${String(i)}`])}),r}(o,u,t));let h=[];return u.forEach(e=>{let r=n[e];r&&h.push(t[`grid-${e}-${String(r)}`])}),[t.root,r&&t.container,s&&t.item,l&&t.zeroMinWidth,...c,"row"!==i&&t[`direction-xs-${String(i)}`],"wrap"!==a&&t[`wrap-xs-${String(a)}`],...h]}})(({ownerState:e})=>(0,i.Z)({boxSizing:"border-box"},e.container&&{display:"flex",flexWrap:"wrap",width:"100%"},e.item&&{margin:0},e.zeroMinWidth&&{minWidth:0},"wrap"!==e.wrap&&{flexWrap:e.wrap}),function({theme:e,ownerState:t}){let n=(0,a.P$)({values:t.direction,breakpoints:e.breakpoints.values});return(0,a.k9)({theme:e},n,e=>{let t={flexDirection:e};return 0===e.indexOf("column")&&(t[`& > .${_.item}`]={maxWidth:"none"}),t})},function({theme:e,ownerState:t}){let{container:n,rowSpacing:r}=t,i={};if(n&&0!==r){let s=(0,a.P$)({values:r,breakpoints:e.breakpoints.values}),o;"object"==typeof s&&(o=x({breakpoints:e.breakpoints.values,values:s})),i=(0,a.k9)({theme:e},s,(t,n)=>{var r;let i=e.spacing(t);return"0px"!==i?{marginTop:`-${E(i)}`,[`& > .${_.item}`]:{paddingTop:E(i)}}:null!=o&&o.includes(n)?{}:{marginTop:0,[`& > .${_.item}`]:{paddingTop:0}}})}return i},function({theme:e,ownerState:t}){let{container:n,columnSpacing:r}=t,i={};if(n&&0!==r){let s=(0,a.P$)({values:r,breakpoints:e.breakpoints.values}),o;"object"==typeof s&&(o=x({breakpoints:e.breakpoints.values,values:s})),i=(0,a.k9)({theme:e},s,(t,n)=>{var r;let i=e.spacing(t);return"0px"!==i?{width:`calc(100% + ${E(i)})`,marginLeft:`-${E(i)}`,[`& > .${_.item}`]:{paddingLeft:E(i)}}:null!=o&&o.includes(n)?{}:{width:"100%",marginLeft:0,[`& > .${_.item}`]:{paddingLeft:0}}})}return i},function({theme:e,ownerState:t}){let n;return e.breakpoints.keys.reduce((r,s)=>{let o={};if(t[s]&&(n=t[s]),!n)return r;if(!0===n)o={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===n)o={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{let l=(0,a.P$)({values:t.columns,breakpoints:e.breakpoints.values}),u="object"==typeof l?l[s]:l;if(null==u)return r;let c=`${Math.round(n/u*1e8)/1e6}%`,h={};if(t.container&&t.item&&0!==t.columnSpacing){let d=e.spacing(t.columnSpacing);if("0px"!==d){let f=`calc(${c} + ${E(d)})`;h={flexBasis:f,maxWidth:f}}}o=(0,i.Z)({flexBasis:c,flexGrow:0,maxWidth:c},h)}return 0===e.breakpoints.values[s]?Object.assign(r,o):r[e.breakpoints.up(s)]=o,r},{})}),T=e=>{let{classes:t,container:n,direction:r,item:i,spacing:s,wrap:o,zeroMinWidth:a,breakpoints:l}=e,c=[];n&&(c=function(e,t){if(!e||e<=0)return[];if("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e)return[`spacing-xs-${String(e)}`];let n=[];return t.forEach(t=>{let r=e[t];if(Number(r)>0){let i=`spacing-${t}-${String(r)}`;n.push(i)}}),n}(s,l));let h=[];l.forEach(t=>{let n=e[t];n&&h.push(`grid-${t}-${String(n)}`)});let d={root:["root",n&&"container",i&&"item",a&&"zeroMinWidth",...c,"row"!==r&&`direction-xs-${String(r)}`,"wrap"!==o&&`wrap-xs-${String(o)}`,...h]};return(0,u.Z)(d,g,t)},I=s.forwardRef(function(e,t){let n=(0,h.Z)({props:e,name:"MuiGrid"}),{breakpoints:a}=(0,d.Z)(),u=(0,l.Z)(n),{className:c,columns:p,columnSpacing:m,component:g="div",container:y=!1,direction:v="row",item:_=!1,rowSpacing:E,spacing:x=0,wrap:I="wrap",zeroMinWidth:k=!1}=u,C=(0,r.Z)(u,w),R=s.useContext(f),A=y?p||12:R,O={},D=(0,i.Z)({},C);a.keys.forEach(e=>{null!=C[e]&&(O[e]=C[e],delete D[e])});let N=(0,i.Z)({},u,{columns:A,container:y,direction:v,item:_,rowSpacing:E||x,columnSpacing:m||x,wrap:I,zeroMinWidth:k,spacing:x},O,{breakpoints:a.keys}),P=T(N);return(0,b.jsx)(f.Provider,{value:A,children:(0,b.jsx)(S,(0,i.Z)({ownerState:N,className:(0,o.Z)(P.root,c),as:g,ref:t},D))})});var k=I},1760:function(e,t,n){"use strict";var r=n(7462),i=n(3366),s=n(7294),o=n(8662),a=n(2097),l=n(3566),u=n(4771),c=n(5893);let h=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function d(e){return`scale(${e}, ${e**2})`}let f={entering:{opacity:1,transform:d(1)},entered:{opacity:1,transform:"none"}},p="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),m=s.forwardRef(function(e,t){let{addEndListener:n,appear:m=!0,children:g,easing:y,in:v,onEnter:_,onEntered:b,onEntering:w,onExit:E,onExited:x,onExiting:S,style:T,timeout:I="auto",TransitionComponent:k=o.ZP}=e,C=(0,i.Z)(e,h),R=s.useRef(),A=s.useRef(),O=(0,a.Z)(),D=s.useRef(null),N=(0,u.Z)(D,g.ref,t),P=e=>t=>{if(e){let n=D.current;void 0===t?e(n):e(n,t)}},F=P(w),M=P((e,t)=>{(0,l.n)(e);let{duration:n,delay:r,easing:i}=(0,l.C)({style:T,timeout:I,easing:y},{mode:"enter"}),s;"auto"===I?(s=O.transitions.getAutoHeightDuration(e.clientHeight),A.current=s):s=n,e.style.transition=[O.transitions.create("opacity",{duration:s,delay:r}),O.transitions.create("transform",{duration:p?s:.666*s,delay:r,easing:i})].join(","),_&&_(e,t)}),L=P(b),j=P(S),U=P(e=>{let{duration:t,delay:n,easing:r}=(0,l.C)({style:T,timeout:I,easing:y},{mode:"exit"}),i;"auto"===I?(i=O.transitions.getAutoHeightDuration(e.clientHeight),A.current=i):i=t,e.style.transition=[O.transitions.create("opacity",{duration:i,delay:n}),O.transitions.create("transform",{duration:p?i:.666*i,delay:p?n:n||.333*i,easing:r})].join(","),e.style.opacity=0,e.style.transform=d(.75),E&&E(e)}),B=P(x),Z=e=>{"auto"===I&&(R.current=setTimeout(e,A.current||0)),n&&n(D.current,e)};return s.useEffect(()=>()=>{clearTimeout(R.current)},[]),(0,c.jsx)(k,(0,r.Z)({appear:m,in:v,nodeRef:D,onEnter:M,onEntered:L,onEntering:F,onExit:U,onExited:B,onExiting:j,addEndListener:Z,timeout:"auto"===I?null:I},C,{children:(e,t)=>s.cloneElement(g,(0,r.Z)({style:(0,r.Z)({opacity:0,transform:d(.75),visibility:"exited"!==e||v?void 0:"hidden"},f[e],T,g.props.style),ref:N},t))}))});m.muiSupportAuto=!0,t.Z=m},562:function(e,t,n){"use strict";n.d(t,{Z:function(){return E}});var r=n(3366),i=n(7462),s=n(7294),o=n(6010),a=n(4780),l=n(1796),u=n(1719),c=n(8884),h=n(9828),d=n(6622),f=n(4867),p=n(1588);function m(e){return(0,f.Z)("MuiIconButton",e)}let g=(0,p.Z)("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]);var y=n(5893);let v=["edge","children","className","color","disabled","disableFocusRipple","size"],_=e=>{let{classes:t,disabled:n,color:r,edge:i,size:s}=e,o={root:["root",n&&"disabled","default"!==r&&`color${(0,d.Z)(r)}`,i&&`edge${(0,d.Z)(i)}`,`size${(0,d.Z)(s)}`]};return(0,a.Z)(o,m,t)},b=(0,u.ZP)(h.Z,{name:"MuiIconButton",slot:"Root",overridesResolver(e,t){let{ownerState:n}=e;return[t.root,"default"!==n.color&&t[`color${(0,d.Z)(n.color)}`],n.edge&&t[`edge${(0,d.Z)(n.edge)}`],t[`size${(0,d.Z)(n.size)}`]]}})(({theme:e,ownerState:t})=>(0,i.Z)({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,l.Fq)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"start"===t.edge&&{marginLeft:"small"===t.size?-3:-12},"end"===t.edge&&{marginRight:"small"===t.size?-3:-12}),({theme:e,ownerState:t})=>(0,i.Z)({},"inherit"===t.color&&{color:"inherit"},"inherit"!==t.color&&"default"!==t.color&&(0,i.Z)({color:(e.vars||e).palette[t.color].main},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainCh
3393annel} / ${e.vars.palette.action.hoverOpacity})`:(0,l.Fq)(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}}),"small"===t.size&&{padding:5,fontSize:e.typography.pxToRem(18)},"large"===t.size&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${g.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})),w=s.forwardRef(function(e,t){let n=(0,c.Z)({props:e,name:"MuiIconButton"}),{edge:s=!1,children:a,className:l,color:u="default",disabled:h=!1,disableFocusRipple:d=!1,size:f="medium"}=n,p=(0,r.Z)(n,v),m=(0,i.Z)({},n,{edge:s,color:u,disabled:h,disableFocusRipple:d,size:f}),g=_(m);return(0,y.jsx)(b,(0,i.Z)({className:(0,o.Z)(g.root,l),centerRipple:!0,focusRipple:!d,disabled:h,ref:t,ownerState:m},p,{children:a}))});var E=w},1011:function(e,t,n){"use strict";n.d(t,{rA:function(){return L},Ej:function(){return M},ZP:function(){return B},_o:function(){return P},Gx:function(){return N}});var r=n(3366),i=n(7462),s=n(1387),o=n(7294),a=n(6010),l=n(4780),u=n(3935),c=n(67),h=n(8290),d=n(7596),f=n(6600),p=n(5893);let m=["onChange","maxRows","minRows","style","value"];function g(e,t){return parseInt(e[t],10)||0}let y={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function v(e){return null==e||0===Object.keys(e).length}let _=o.forwardRef(function(e,t){let{onChange:n,maxRows:s,minRows:a=1,style:l,value:_}=e,b=(0,r.Z)(e,m),{current:w}=o.useRef(null!=_),E=o.useRef(null),x=(0,c.Z)(t,E),S=o.useRef(null),T=o.useRef(0),[I,k]=o.useState({}),C=o.useCallback(()=>{let t=E.current,n=(0,h.Z)(t),r=n.getComputedStyle(t);if("0px"===r.width)return{};let i=S.current;i.style.width=r.width,i.value=t.value||e.placeholder||"x","\n"===i.value.slice(-1)&&(i.value+=" ");let o=r["box-sizing"],l=g(r,"padding-bottom")+g(r,"padding-top"),u=g(r,"border-bottom-width")+g(r,"border-top-width"),c=i.scrollHeight;i.value="x";let d=i.scrollHeight,f=c;a&&(f=Math.max(Number(a)*d,f)),s&&(f=Math.min(Number(s)*d,f)),f=Math.max(f,d);let p=f+("border-box"===o?l+u:0),m=1>=Math.abs(f-c);return{outerHeightStyle:p,overflow:m}},[s,a,e.placeholder]),R=(e,t)=>{let{outerHeightStyle:n,overflow:r}=t;return T.current<20&&(n>0&&Math.abs((e.outerHeightStyle||0)-n)>1||e.overflow!==r)?(T.current+=1,{overflow:r,outerHeightStyle:n}):e},A=o.useCallback(()=>{let e=C();!v(e)&&k(t=>R(t,e))},[C]),O=()=>{let e=C();!v(e)&&(0,u.flushSync)(()=>{k(t=>R(t,e))})};o.useEffect(()=>{let e=(0,d.Z)(()=>{T.current=0,E.current&&O()}),t=(0,h.Z)(E.current);t.addEventListener("resize",e);let n;return"undefined"!=typeof ResizeObserver&&(n=new ResizeObserver(e)).observe(E.current),()=>{e.clear(),t.removeEventListener("resize",e),n&&n.disconnect()}}),(0,f.Z)(()=>{A()}),o.useEffect(()=>{T.current=0},[_]);let D=e=>{T.current=0,w||A(),n&&n(e)};return(0,p.jsxs)(o.Fragment,{children:[(0,p.jsx)("textarea",(0,i.Z)({value:_,onChange:D,ref:x,rows:a,style:(0,i.Z)({height:I.outerHeightStyle,overflow:I.overflow?"hidden":null},l)},b)),(0,p.jsx)("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:S,tabIndex:-1,style:(0,i.Z)({},y.shadow,l,{padding:0})})]})});var b=n(8442),w=n(6594),E=n(2586),x=n(9711),S=n(1719),T=n(8884),I=n(6622),k=n(4771),C=n(3289),R=n(3918),A=n(7240),O=n(8493);let D=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","startAdornment","type","value"],N=(e,t)=>{let{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,"small"===n.size&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${(0,I.Z)(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},P=(e,t)=>{let{ownerState:n}=e;return[t.input,"small"===n.size&&t.inputSizeSmall,n.multiline&&t.inputMultiline,"search"===n.type&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},F=e=>{let{classes:t,color:n,disabled:r,error:i,endAdornment:s,focused:o,formControl:a,fullWidth:u,hiddenLabel:c,multiline:h,readOnly:d,size:f,startAdornment:p,type:m}=e,g={root:["root",`color${(0,I.Z)(n)}
3393`,r&&"disabled",i&&"error",u&&"fullWidth",o&&"focused",a&&"formControl","small"===f&&"sizeSmall",h&&"multiline",p&&"adornedStart",s&&"adornedEnd",c&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled","search"===m&&"inputTypeSearch",h&&"inputMultiline","small"===f&&"inputSizeSmall",c&&"inputHiddenLabel",p&&"inputAdornedStart",s&&"inputAdornedEnd",d&&"readOnly"]};return(0,l.Z)(g,O.u,t)},M=(0,S.ZP)("div",{name:"MuiInputBase",slot:"Root",overridesResolver:N})(({theme:e,ownerState:t})=>(0,i.Z)({},e.typography.body1,{color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${O.Z.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},t.multiline&&(0,i.Z)({padding:"4px 0 5px"},"small"===t.size&&{paddingTop:1}),t.fullWidth&&{width:"100%"})),L=(0,S.ZP)("input",{name:"MuiInputBase",slot:"Input",overridesResolver:P})(({theme:e,ownerState:t})=>{let n="light"===e.palette.mode,r=(0,i.Z)({color:"currentColor"},e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5},{transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})}),s={opacity:"0 !important"},o=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5};return(0,i.Z)({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${O.Z.formControl} &`]:{"&::-webkit-input-placeholder":s,"&::-moz-placeholder":s,"&:-ms-input-placeholder":s,"&::-ms-input-placeholder":s,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus:-ms-input-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${O.Z.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},"small"===t.size&&{paddingTop:1},t.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},"search"===t.type&&{MozAppearance:"textfield"})}),j=(0,p.jsx)(R.Z,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),U=o.forwardRef(function(e,t){let n=(0,T.Z)({props:e,name:"MuiInputBase"}),{"aria-describedby":l,autoComplete:u,autoFocus:c,className:h,components:d={},componentsProps:f={},defaultValue:m,disabled:g,disableInjectingGlobalStyles:y,endAdornment:v,fullWidth:S=!1,id:I,inputComponent:R="input",inputProps:O={},inputRef:N,maxRows:P,minRows:U,multiline:B=!1,name:Z,onBlur:$,onChange:V,onClick:z,onFocus:q,onKeyDown:G,onKeyUp:W,placeholder:H,readOnly:K,renderSuffix:Y,rows:Q,startAdornment:X,type:J="text",value:ee}=n,et=(0,r.Z)(n,D),en=null!=O.value?O.value:ee,{current:er}=o.useRef(null!=en),ei=o.useRef(),es=o.useCallback(e=>{},[]),eo=(0,k.Z)(ei,N,O.ref,es),[ea,el]=o.useState(!1),eu=(0,x.Z)(),ec=(0,w.Z)({props:n,muiFormControl:eu,states:["color","disabled","error","hiddenLabel","size","required","filled"]});ec.focused=eu?eu.focused:ea,o.useEffect(()=>{!eu&&g&&ea&&(el(!1),$&&$())},[eu,g,ea,$]);let eh=eu&&eu.onFilled,ed=eu&&eu.onEmpty,ef=o.useCallback(e=>{(0,A.vd)(e)?eh&&eh():ed&&ed()},[eh,ed]);(0,C.Z)(()=>{er&&ef({value:en})},[en,ef,er]);let ep=e=>{if(ec.disabled){e.stopPropagation();return}q&&q(e),O.onFocus&&O.onFocus(e),eu&&eu.onFocus?eu.onFocus(e):el(!0)},em=e=>{$&&$(e),O.onBlur&&O.onBlur(e),eu&&eu.onBlur?eu.onBlur(e):el(!1)},eg=(e,...t)=>{if(!er){let n=e.target||ei.current;if(null==n)throw Error((0,s.Z)(1));ef({value:n.value})}O.onChange&&O.onChange(e,...t),V&&V(e,...t)};o.useEffect(()=>{ef(ei.current)},[]);let ey=e=>{ei.current&&e.currentTarget===e.target&&ei.current.focus(),z&&z(e)},ev=R,e_=O;B&&"input"===ev&&(e_=Q?(0,i.Z)({type:void 0,minRows:Q,maxRows:Q},e_):(0,i.Z)({type:void 0,maxRows:P,minRows:U},e_),ev=_);let eb=e=>{ef("mui-auto-fill-cancel"===e.animationName?ei.current:{value:"x"})};o.useEffect(()=>{eu&&eu.setAdornedStart(Boolean(X))},[eu,X]);let ew=(0,i.Z)({},n,{color:ec.color||"primary",disabled:ec.disabled,endAdornment:v,error:ec.error,focused:ec.focused,formControl:eu,fullWidth:S,hiddenLabel:ec.hiddenLabel,multiline:B,size:ec.size,startAdornment:X,type:J}),eE=F(ew),ex=d.Root||M,eS=f.root||{},eT=d.Input||L;return e_=(0,i.Z)({},e_,f.input),(0,p.jsxs)(o.Fragment,{children:[!y&&j,(0,p.jsxs)(ex,(0,i.Z)({},eS,!(0,b.Z)(ex)&&{ownerState:(0,i.Z)({},ew,eS.ownerState)},{ref:t,onClick:ey},et,{className:(0,a.Z)(eE.root,eS.className,h),children:[X,(0,p.jsx)(E.Z.Provider,{value:null,children:(0,p.jsx)(eT,(0,i.Z)({ownerState:ew,"aria-invalid":ec.error,"aria-describedby":l,autoComplete:u,autoFocus:c,defaultValue:m,disabled:ec.disabled,id:I,onAnimationStart:eb,name:Z,placeholder:H,readOnly:K,required:ec.required,rows:Q,value:en,onKeyDown:G,onKeyUp:W,type:J},e_,!(0,b.Z)(eT)&&{as:ev,ownerState:(0,i.Z)({},ew,e_.ownerState)},{ref:eo,className:(0,a.Z)(eE.input,e_.className),onBlur:em,onChange:eg,onFocus:ep}))}),v,Y?Y((0,i.Z)({},ec,{startAdornment:X}
3393)):null]}))]})});var B=U},8493:function(e,t,n){"use strict";n.d(t,{u:function(){return s}});var r=n(4867),i=n(1588);function s(e){return(0,r.Z)("MuiInputBase",e)}let o=(0,i.Z)("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);t.Z=o},7240:function(e,t,n){"use strict";function r(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function i(e,t=!1){return e&&(r(e.value)&&""!==e.value||t&&r(e.defaultValue)&&""!==e.defaultValue)}function s(e){return e.startAdornment}n.d(t,{B7:function(){return s},vd:function(){return i}})},8316:function(e,t,n){"use strict";n.d(t,{Z:function(){return C}});var r=n(3366),i=n(7462),s=n(7294),o=n(4780),a=n(6010),l=n(6594),u=n(9711),c=n(6622),h=n(8884),d=n(1719),f=n(4867),p=n(1588);function m(e){return(0,f.Z)("MuiFormLabel",e)}let g=(0,p.Z)("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]);var y=n(5893);let v=["children","className","color","component","disabled","error","filled","focused","required"],_=e=>{let{classes:t,color:n,focused:r,disabled:i,error:s,filled:a,required:l}=e,u={root:["root",`color${(0,c.Z)(n)}`,i&&"disabled",s&&"error",a&&"filled",r&&"focused",l&&"required"],asterisk:["asterisk",s&&"error"]};return(0,o.Z)(u,m,t)},b=(0,d.ZP)("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:e},t)=>(0,i.Z)({},t.root,"secondary"===e.color&&t.colorSecondary,e.filled&&t.filled)})(({theme:e,ownerState:t})=>(0,i.Z)({color:(e.vars||e).palette.text.secondary},e.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${g.focused}`]:{color:(e.vars||e).palette[t.color].main},[`&.${g.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${g.error}`]:{color:(e.vars||e).palette.error.main}})),w=(0,d.ZP)("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${g.error}`]:{color:(e.vars||e).palette.error.main}})),E=s.forwardRef(function(e,t){let n=(0,h.Z)({props:e,name:"MuiFormLabel"}),{children:s,className:o,component:c="label"}=n,d=(0,r.Z)(n,v),f=(0,u.Z)(),p=(0,l.Z)({props:n,muiFormControl:f,states:["color","required","focused","disabled","error","filled"]}),m=(0,i.Z)({},n,{color:p.color||"primary",component:c,disabled:p.disabled,error:p.error,filled:p.filled,focused:p.focused,required:p.required}),g=_(m);return(0,y.jsxs)(b,(0,i.Z)({as:c,ownerState:m,className:(0,a.Z)(g.root,o),ref:t},d,{children:[s,p.required&&(0,y.jsxs)(w,{ownerState:m,"aria-hidden":!0,className:g.asterisk,children:["â","*"]})]}))});function x(e){return(0,f.Z)("MuiInputLabel",e)}(0,p.Z)("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);let S=["disableAnimation","margin","shrink","variant","className"],T=e=>{let{classes:t,formControl:n,size:r,shrink:s,disableAnimation:a,variant:l,required:u}=e,c=(0,o.Z)({root:["root",n&&"formControl",!a&&"animated",s&&"shrink","small"===r&&"sizeSmall",l],asterisk:[u&&"asterisk"]},x,t);return(0,i.Z)({},t,c)},I=(0,d.ZP)(E,{shouldForwardProp:e=>(0,d.FO)(e)||"classes"===e,name:"MuiInputLabel",slot:"Root",overridesResolver(e,t){let{ownerState:n}=e;return[{[`& .${g.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,"small"===n.size&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,t[n.variant]]}})(({theme:e,ownerState:t})=>(0,i.Z)({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},t.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},"small"===t.size&&{transform:"translate(0, 17px) scale(1)"},t.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!t.disableAnimation&&{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},"filled"===t.variant&&(0,i.Z)({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===t.size&&{transform:"translate(12px, 13px) scale(1)"},t.shrink&&(0,i.Z)({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7
3393px) scale(0.75)",maxWidth:"calc(133% - 24px)"},"small"===t.size&&{transform:"translate(12px, 4px) scale(0.75)"})),"outlined"===t.variant&&(0,i.Z)({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===t.size&&{transform:"translate(14px, 9px) scale(1)"},t.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 24px)",transform:"translate(14px, -9px) scale(0.75)"}))),k=s.forwardRef(function(e,t){let n=(0,h.Z)({name:"MuiInputLabel",props:e}),{disableAnimation:s=!1,shrink:o,className:c}=n,d=(0,r.Z)(n,S),f=(0,u.Z)(),p=o;void 0===p&&f&&(p=f.filled||f.focused||f.adornedStart);let m=(0,l.Z)({props:n,muiFormControl:f,states:["size","variant","required"]}),g=(0,i.Z)({},n,{disableAnimation:s,formControl:f,shrink:p,size:m.size,variant:m.variant,required:m.required}),v=T(g);return(0,y.jsx)(I,(0,i.Z)({"data-shrink":p,ownerState:g,ref:t,className:(0,a.Z)(v.root,c)},d,{classes:v}))});var C=k},6480:function(e,t,n){"use strict";n.d(t,{Z:function(){return E}});var r=n(3366),i=n(7462),s=n(7294),o=n(4780),a=n(9766),l=n(1011),u=n(1719),c=n(8884),h=n(4867),d=n(1588),f=n(8493);function p(e){return(0,h.Z)("MuiInput",e)}let m=(0,i.Z)({},f.Z,(0,d.Z)("MuiInput",["root","underline","input"]));var g=n(5893);let y=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","type"],v=e=>{let{classes:t,disableUnderline:n}=e,r=(0,o.Z)({root:["root",!n&&"underline"],input:["input"]},p,t);return(0,i.Z)({},t,r)},_=(0,u.ZP)(l.Ej,{shouldForwardProp:e=>(0,u.FO)(e)||"classes"===e,name:"MuiInput",slot:"Root",overridesResolver(e,t){let{ownerState:n}=e;return[...(0,l.Gx)(e,t),!n.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{let n="light"===e.palette.mode,r=n?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(r=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),(0,i.Z)({position:"relative"},t.formControl&&{"label + &":{marginTop:16}},!t.disableUnderline&&{"&:after":{borderBottom:`2px solid ${(e.vars||e).palette[t.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${m.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${m.error}:after`]:{borderBottomColor:(e.vars||e).palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:`1px solid ${r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${m.disabled}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${m.disabled}:before`]:{borderBottomStyle:"dotted"}})}),b=(0,u.ZP)(l.rA,{name:"MuiInput",slot:"Input",overridesResolver:l._o})({}),w=s.forwardRef(function(e,t){let n=(0,c.Z)({props:e,name:"MuiInput"}),{disableUnderline:s,components:o={},componentsProps:u,fullWidth:h=!1,inputComponent:d="input",multiline:f=!1,type:p="text"}=n,m=(0,r.Z)(n,y),w=v(n),E={root:{ownerState:{disableUnderline:s}}},x=u?(0,a.Z)(u,E):E;return(0,g.jsx)(l.ZP,(0,i.Z)({components:(0,i.Z)({Root:_,Input:b},o),componentsProps:x,fullWidth:h,inputComponent:d,multiline:f,ref:t,type:p},m,{classes:w}))});w.muiName="Input";var E=w},8346:function(e,t,n){"use strict";n.d(t,{Z:function(){return C}});var r=n(3366),i=n(7462),s=n(7294),o=n(6010),a=n(4780),l=n(6622),u=n(1719),c=n(8884),h=n(1625),d=n(4771),f=n(9630),p=n(4867),m=n(1588);function g(e){return(0,p.Z)("MuiLink",e)}let y=(0,m.Z)("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]);var v=n(4844),_=n(1796);let b={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},w=e=>b[e]||e,E=({theme:e,ownerState:t})=>{let n=w(t.color),r=(0,v.D)(e,`palette.${n}`,!1)||t.color,i=(0,v.D)(e,`palette.${n}Channel`);return"vars"in e&&i?`rgba(${i} / 0.4)`:(0,_.Fq)(r,.4)};var x=n(5893);let S=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],T=e=>{let{classes:t,component:n,focusVisible:r,underline:i}=e,s={root:["root",`underline${(0,l.Z)(i)}`,"button"===n&&"button",r&&"focusVisible"]};return(0,a.Z)(s,g,t)},I=(0,u.ZP)(f.Z,{name:"MuiLink",slot:"Root",overridesResolver(e,t){let{ownerState:n}=e;return[t.root,t[`underline${(0,l.Z)(n.underline)}`],"button"===n.component&&t.button]}})(({theme:e,ownerState:t})=>(0,i.Z)({},"none"===t.underline&&{textDecoration:"none"},"hover"===t.underline&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},"always"===t.underline&&(0,i.Z)({textDecoration:"underline"},"inherit"!==t.color&&{textDecorationColor:E({theme:e,ownerState:t})},{"&:hover":{textDecorationColor:"inherit"}}),"button"===t.component&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${y.focusVisible}`]:{outline:"auto"}})),k=s.forwardRef(function(e,t){let n=(0,c.Z)({props:e,name:"MuiLink"}
3393),{className:a,color:l="primary",component:u="a",onBlur:f,onFocus:p,TypographyClasses:m,underline:g="always",variant:y="inherit",sx:v}=n,_=(0,r.Z)(n,S),{isFocusVisibleRef:w,onBlur:E,onFocus:k,ref:C}=(0,h.Z)(),[R,A]=s.useState(!1),O=(0,d.Z)(t,C),D=e=>{E(e),!1===w.current&&A(!1),f&&f(e)},N=e=>{k(e),!0===w.current&&A(!0),p&&p(e)},P=(0,i.Z)({},n,{color:l,component:u,focusVisible:R,underline:g,variant:y}),F=T(P);return(0,x.jsx)(I,(0,i.Z)({color:l,className:(0,o.Z)(F.root,a),classes:m,component:u,onBlur:D,onFocus:N,ref:O,ownerState:P,variant:y,sx:[...Object.keys(b).includes(l)?[]:[{color:l}],...Array.isArray(v)?v:[v]]},_))});var C=k},7742:function(e,t,n){"use strict";var r=n(7294);let i=r.createContext({});t.Z=i},4803:function(e,t,n){"use strict";n.d(t,{Z:function(){return en}});var r=n(7462),i=n(3366),s=n(7294);n(6607);var o=n(6010),a=n(4780),l=n(7505),u=n(1719),c=n(8884),h=n(7742),d=n(4867),f=n(1588);function p(e){return(0,d.Z)("MuiList",e)}(0,f.Z)("MuiList",["root","padding","dense","subheader"]);var m=n(5893);let g=["children","className","component","dense","disablePadding","subheader"],y=e=>{let{classes:t,disablePadding:n,dense:r,subheader:i}=e;return(0,a.Z)({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},p,t)},v=(0,u.ZP)("ul",{name:"MuiList",slot:"Root",overridesResolver(e,t){let{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})(({ownerState:e})=>(0,r.Z)({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),_=s.forwardRef(function(e,t){let n=(0,c.Z)({props:e,name:"MuiList"}),{children:a,className:l,component:u="ul",dense:d=!1,disablePadding:f=!1,subheader:p}=n,_=(0,i.Z)(n,g),b=s.useMemo(()=>({dense:d}),[d]),w=(0,r.Z)({},n,{component:u,dense:d,disablePadding:f}),E=y(w);return(0,m.jsx)(h.Z.Provider,{value:b,children:(0,m.jsxs)(v,(0,r.Z)({as:u,className:(0,o.Z)(E.root,l),ref:t,ownerState:w},_,{children:[p,a]}))})});var b=n(5806).Z,w=n(4771),E=n(3289);let x=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function S(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function T(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function I(e,t){if(void 0===t)return!0;let n=e.innerText;return void 0===n&&(n=e.textContent),0!==(n=n.trim().toLowerCase()).length&&(t.repeating?n[0]===t.keys[0]:0===n.indexOf(t.keys.join("")))}function k(e,t,n,r,i,s){let o=!1,a=i(e,t,!!t&&n);for(;a;){if(a===e.firstChild){if(o)return!1;o=!0}let l=!r&&(a.disabled||"true"===a.getAttribute("aria-disabled"));if(a.hasAttribute("tabindex")&&I(a,s)&&!l)return a.focus(),!0;a=i(e,a,n)}return!1}let C=s.forwardRef(function(e,t){let{actions:n,autoFocus:o=!1,autoFocusItem:a=!1,children:u,className:c,disabledItemsFocusable:h=!1,disableListWrap:d=!1,onKeyDown:f,variant:p="selectedMenu"}=e,g=(0,i.Z)(e,x),y=s.useRef(null),v=s.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});(0,E.Z)(()=>{o&&y.current.focus()},[o]),s.useImperativeHandle(n,()=>({adjustStyleForScrollbar(e,t){let n=!y.current.style.width;if(e.clientHeight<y.current.clientHeight&&n){let r=`${b((0,l.Z)(e))}px`;y.current.style["rtl"===t.direction?"paddingLeft":"paddingRight"]=r,y.current.style.width=`calc(100% + ${r})`}return y.current}}),[]);let C=e=>{let t=y.current,n=e.key,r=(0,l.Z)(t).activeElement;if("ArrowDown"===n)e.preventDefault(),k(t,r,d,h,S);else if("ArrowUp"===n)e.preventDefault(),k(t,r,d,h,T);else if("Home"===n)e.preventDefault(),k(t,null,d,h,S);else if("End"===n)e.preventDefault(),k(t,null,d,h,T);else if(1===n.length){let i=v.current,s=n.toLowerCase(),o=performance.now();i.keys.length>0&&(o-i.lastTime>500?(i.keys=[],i.repeating=!0,i.previousKeyMatched=!0):i.repeating&&s!==i.keys[0]&&(i.repeating=!1)),i.lastTime=o,i.keys.push(s);let a=r&&!i.repeating&&I(r,i);i.previousKeyMatched&&(a||k(t,r,!1,h,S,i))?e.preventDefault():i.previousKeyMatched=!1}f&&f(e)},R=(0,w.Z)(y,t),A=-1;
3393s.Children.forEach(u,(e,t)=>{s.isValidElement(e)&&(e.props.disabled||("selectedMenu"===p&&e.props.selected?A=t:-1!==A||(A=t)))});let O=s.Children.map(u,(e,t)=>{if(t===A){let n={};return a&&(n.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===p&&(n.tabIndex=0),s.cloneElement(e,n)}return e});return(0,m.jsx)(_,(0,r.Z)({role:"menu",ref:R,className:c,onKeyDown:C,tabIndex:o?0:-1},g,{children:O}))});var R=n(918),A=n(5400),O=n(7577),D=n(1760),N=n(2219);function P(e){return(0,d.Z)("MuiPopover",e)}(0,f.Z)("MuiPopover",["root","paper"]);let F=["onEntering"],M=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"];function L(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function j(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function U(e){return[e.horizontal,e.vertical].map(e=>"number"==typeof e?`${e}px`:e).join(" ")}function B(e){return"function"==typeof e?e():e}let Z=e=>{let{classes:t}=e;return(0,a.Z)({root:["root"],paper:["paper"]},P,t)},$=(0,u.ZP)(N.Z,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),V=(0,u.ZP)(R.Z,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),z=s.forwardRef(function(e,t){let n=(0,c.Z)({props:e,name:"MuiPopover"}),{action:a,anchorEl:u,anchorOrigin:h={vertical:"top",horizontal:"left"},anchorPosition:d,anchorReference:f="anchorEl",children:p,className:g,container:y,elevation:v=8,marginThreshold:_=16,open:b,PaperProps:E={},transformOrigin:x={vertical:"top",horizontal:"left"},TransitionComponent:S=D.Z,transitionDuration:T="auto",TransitionProps:{onEntering:I}={}}=n,k=(0,i.Z)(n.TransitionProps,F),C=(0,i.Z)(n,M),R=s.useRef(),N=(0,w.Z)(R,E.ref),P=(0,r.Z)({},n,{anchorOrigin:h,anchorReference:f,elevation:v,marginThreshold:_,PaperProps:E,transformOrigin:x,TransitionComponent:S,transitionDuration:T,TransitionProps:k}),z=Z(P),q=s.useCallback(()=>{if("anchorPosition"===f)return d;let e=B(u),t=e&&1===e.nodeType?e:(0,l.Z)(R.current).body,n=t.getBoundingClientRect();return{top:n.top+L(n,h.vertical),left:n.left+j(n,h.horizontal)}},[u,h.horizontal,h.vertical,d,f]),G=s.useCallback(e=>({vertical:L(e,x.vertical),horizontal:j(e,x.horizontal)}),[x.horizontal,x.vertical]),W=s.useCallback(e=>{let t={width:e.offsetWidth,height:e.offsetHeight},n=G(t);if("none"===f)return{top:null,left:null,transformOrigin:U(n)};let r=q(),i=r.top-n.vertical,s=r.left-n.horizontal,o=i+t.height,a=s+t.width,l=(0,O.Z)(B(u)),c=l.innerHeight-_,h=l.innerWidth-_;if(i<_){let d=i-_;i-=d,n.vertical+=d}else if(o>c){let p=o-c;i-=p,n.vertical+=p}if(s<_){let m=s-_;s-=m,n.horizontal+=m}else if(a>h){let g=a-h;s-=g,n.horizontal+=g}return{top:`${Math.round(i)}px`,left:`${Math.round(s)}px`,transformOrigin:U(n)}},[u,f,q,G,_]),[H,K]=s.useState(b),Y=s.useCallback(()=>{let e=R.current;if(!e)return;let t=W(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,K(!0)},[W]),Q=(e,t)=>{I&&I(e,t),Y()},X=()=>{K(!1)};s.useEffect(()=>{b&&Y()}),s.useImperativeHandle(a,()=>b?{updatePosition(){Y()}}:null,[b,Y]),s.useEffect(()=>{if(!b)return;let e=(0,A.Z)(()=>{Y()}),t=(0,O.Z)(u);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[u,b,Y]);let J=T;"auto"!==T||S.muiSupportAuto||(J=void 0);let ee=y||(u?(0,l.Z)(B(u)).body:void 0);return(0,m.jsx)($,(0,r.Z)({BackdropProps:{invisible:!0},className:(0,o.Z)(z.root,g),container:ee,open:b,ref:t,ownerState:P},C,{children:(0,m.jsx)(S,(0,r.Z)({appear:!0,in:b,onEntering:Q,onExited:X,timeout:J},k,{children:(0,m.jsx)(V,(0,r.Z)({elevation:v},E,{ref:N,className:(0,o.Z)(z.paper,E.className)},H?void 0:{style:(0,r.Z)({},E.style,{opacity:0})},{ownerState:P,children:p}))}))}))});var q=n(2097);function G(e){return(0,d.Z)("MuiMenu",e)}(0,f.Z)("MuiMenu",["root","paper","list"]);let W=["onEntering"],H=["autoFocus","children","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant"],K={vertical:"top",horizontal:"right"},Y={vertical:"top",horizontal:"left"},Q=e=>{let{classes:t}=e;return(0,a.Z)({root:["root"],paper:["paper"],list:["list"]},G,t)},X=(0,u.ZP)(z,{shouldForwardProp:e=>(0,u.FO)(e)||"classes"===e,name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),J=(0,u.ZP)(R.Z,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),ee=(0,u.ZP)(C,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),et=s.forwardRef(function(e,t){let n=(0,c.Z)({props:e,name:"MuiMenu"}),{autoFocus:a=!0,children:l,disableAutoFocusItem:u=!1,MenuListProps:h={},onClose:d,open:f,PaperProps:p={},PopoverClasses:g,transitionDuration:y="auto",TransitionProps:{onEntering:v}={},variant:_="selectedMenu"}=n,b=(0,i.Z)(n.TransitionProps,W),w=(0,i.Z)(n,H),E=(0,q.Z)(),x="rtl"===E.direction,S=(0,r.Z)({},n,{autoFocus:a,disableAutoFocusItem:u,MenuListProps:h,onEntering:v,PaperProps:p,transitionDuration:y,TransitionProps:b,variant:_}),T=Q(S),I=s.useRef(null),k=(e,t)=>{I.current&&I.current.adjustStyleForScrollbar(e,E),v&&v(e,t)},C=e=>{"Tab"===e.key&&(e.preventDefault(),d&&d(e,"tabKeyDown"))},R=-1;return s.Children.map(l,(e,t)=>{s.isValidElement(e)&&(e.props.disabled||("selectedMenu"===_&&e.props.selected?R=t:-1!==R||(R=t)))}),(0,m.jsx)(X,(0,r.Z)({classes:g,onClose:d,anchorOrigin:{vertical:"bottom",horizontal:x?"right":"left"},transformOrigin:x?K:Y,PaperProps:(0,r.Z)({component:J},p,{classes:(0,r.Z)({},p.classes,{root:T.paper})}),className:T.root,open:f,ref:t,transitionDuration:y,TransitionProps:(0,r.Z)({onEntering:k},b),ownerState:S},w,{children:(0,m.jsx)(ee,(0,r.Z)({onKeyDown:C,actions:I,autoFocus:a&&(-1===R||u),autoFocusItem:a&&!u&&f,variant:_},h,{className:(0,o.Z)(T.list,h.className),children:l}))}))});var en=et},2219:function(e,t,n){"use strict";n.d(t,{Z:function(){return G}});var r=n(3366),i=n(7462),s=n(7294),o=n(67),a=n(7094),l=n(3633),u=n(9064),c=n(4780),h=n(3935),d=n(6600),f=n(7960),p=n(5893);let m=s.forwardRef(function(e,t){let{children:n,container:r,disablePortal:i=!1}=e,[a,l]=s.useState(null),u=(0,o.Z)(s.isValidElement(n)?n.ref:null,t);return((0,d.Z)(()=>
3393{if(!i){var e;l(("function"==typeof r?r():r)||document.body)}},[r,i]),(0,d.Z)(()=>{if(a&&!i)return(0,f.Z)(t,a),()=>{(0,f.Z)(t,null)}},[t,a,i]),i)?s.isValidElement(n)?s.cloneElement(n,{ref:u}):n:(0,p.jsx)(s.Fragment,{children:a?h.createPortal(n,a):a})});var g=n(8290),y=n(5806);function v(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function _(e){return parseInt((0,g.Z)(e).getComputedStyle(e).paddingRight,10)||0}function b(e,t,n,r=[],i){let s=[t,n,...r];[].forEach.call(e.children,e=>{let t=-1===s.indexOf(e),n=!function(e){let t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&v(e,i)})}function w(e,t){let n=-1;return e.some((e,r)=>!!t(e)&&(n=r,!0)),n}function E(e){let t=[],n=[];return Array.from(e.querySelectorAll('input,select,textarea,a[href],button,[tabindex],audio[controls],video[controls],[contenteditable]:not([contenteditable="false"])')).forEach((e,r)=>{var i;let s=function(e){let t=parseInt(e.getAttribute("tabindex"),10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);!(-1===s||e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type||!e.name)return!1;let t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`),n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}(e))&&(0===s?t.push(e):n.push({documentOrder:r,tabIndex:s,node:e}))}),n.sort((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex).map(e=>e.node).concat(t)}function x(){return!0}var S=function(e){let{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:l=E,isEnabled:u=x,open:c}=e,h=s.useRef(),d=s.useRef(null),f=s.useRef(null),m=s.useRef(null),g=s.useRef(null),y=s.useRef(!1),v=s.useRef(null),_=(0,o.Z)(t.ref,v),b=s.useRef(null);s.useEffect(()=>{c&&v.current&&(y.current=!n)},[n,c]),s.useEffect(()=>{if(!c||!v.current)return;let e=(0,a.Z)(v.current);return!v.current.contains(e.activeElement)&&(v.current.hasAttribute("tabIndex")||v.current.setAttribute("tabIndex",-1),y.current&&v.current.focus()),()=>{i||(m.current&&m.current.focus&&(h.current=!0,m.current.focus()),m.current=null)}},[c]),s.useEffect(()=>{if(!c||!v.current)return;let e=(0,a.Z)(v.current),t=t=>{let{current:n}=v;if(null!==n){if(!e.hasFocus()||r||!u()||h.current){h.current=!1;return}if(!n.contains(e.activeElement)){if(t&&g.current!==t.target||e.activeElement!==g.current)g.current=null;else if(null!==g.current)return;if(!y.current)return;let i=[];if((e.activeElement===d.current||e.activeElement===f.current)&&(i=l(v.current)),i.length>0){var s,o;let a=Boolean((null==(s=b.current)?void 0:s.shiftKey)&&(null==(o=b.current)?void 0:o.key)==="Tab"),c=i[0],p=i[i.length-1];a?p.focus():c.focus()}else n.focus()}}},n=t=>{b.current=t,!r&&u()&&"Tab"===t.key&&e.activeElement===v.current&&t.shiftKey&&(h.current=!0,f.current.focus())};e.addEventListener("focusin",t),e.addEventListener("keydown",n,!0);let i=setInterval(()=>{"BODY"===e.activeElement.tagName&&t()},50);return()=>{clearInterval(i),e.removeEventListener("focusin",t),e.removeEventListener("keydown",n,!0)}},[n,r,i,u,c,l]);let w=e=>{null===m.current&&(m.current=e.relatedTarget),y.current=!0,g.current=e.target;let n=t.props.onFocus;n&&n(e)},S=e=>{null===m.current&&(m.current=e.relatedTarget),y.current=!0};return(0,p.jsxs)(s.Fragment,{children:[(0,p.jsx)("div",{tabIndex:c?0:-1,onFocus:S,ref:d,"data-testid":"sentinelStart"}),s.cloneElement(t,{ref:_,onFocus:w}),(0,p.jsx)("div",{tabIndex:c?0:-1,onFocus:S,ref:f,"data-testid":"sentinelEnd"})]})},T=n(1588),I=n(4867);function k(e){return(0,I.Z)("MuiModal",e)}(0,T.Z)("MuiModal",["root","hidden"]);var C=n(8442),R=n(6010);function A(e){if(void 0===e)return{};let t={};return Object.keys(e).filter(t=>
3393!(t.match(/^on[A-Z]/)&&"function"==typeof e[t])).forEach(n=>{t[n]=e[n]}),t}function O(e,t){return"function"==typeof e?e(t):e}let D=["elementType","externalSlotProps","ownerState"];function N(e){var t;let{elementType:n,externalSlotProps:s,ownerState:a}=e,l=(0,r.Z)(e,D),u=O(s,a),{props:c,internalRef:h}=function(e){let{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:s,className:o}=e;if(!t){let a=(0,R.Z)(null==s?void 0:s.className,null==r?void 0:r.className,o,null==n?void 0:n.className),l=(0,i.Z)({},null==n?void 0:n.style,null==s?void 0:s.style,null==r?void 0:r.style),u=(0,i.Z)({},n,s,r);return a.length>0&&(u.className=a),Object.keys(l).length>0&&(u.style=l),{props:u,internalRef:void 0}}let c=function(e,t=[]){if(void 0===e)return{};let n={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&"function"==typeof e[n]&&!t.includes(n)).forEach(t=>{n[t]=e[t]}),n}((0,i.Z)({},s,r)),h=A(r),d=A(s),f=t(c),p=(0,R.Z)(null==f?void 0:f.className,null==n?void 0:n.className,o,null==s?void 0:s.className,null==r?void 0:r.className),m=(0,i.Z)({},null==f?void 0:f.style,null==n?void 0:n.style,null==s?void 0:s.style,null==r?void 0:r.style),g=(0,i.Z)({},f,n,d,h);return p.length>0&&(g.className=p),Object.keys(m).length>0&&(g.style=m),{props:g,internalRef:f.ref}}((0,i.Z)({},l,{externalSlotProps:u})),d=(0,o.Z)(h,null==u?void 0:u.ref,null==(t=e.additionalProps)?void 0:t.ref),f=function(e,t={},n){return(0,C.Z)(e)?t:(0,i.Z)({},t,{ownerState:(0,i.Z)({},t.ownerState,n)})}(n,(0,i.Z)({},c,{ref:d}),a);return f}let P=["children","classes","closeAfterTransition","component","components","componentsProps","container","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onKeyDown","open","onTransitionEnter","onTransitionExited"],F=e=>{let{open:t,exited:n,classes:r}=e;return(0,c.Z)({root:["root",!t&&n&&"hidden"]},k,r)},M=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&v(e.modalRef,!1);let r=function(e){let t=[];return[].forEach.call(e.children,e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)}),t}(t);b(t,e.mount,e.modalRef,r,!0);let i=w(this.containers,e=>e.container===t);return -1!==i?(this.containers[i].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){let n=w(this.containers,t=>-1!==t.modals.indexOf(e)),r=this.containers[n];r.restore||(r.restore=function(e,t){let n=[],r=e.container;if(!t.disableScrollLock){if(function(e){let t=(0,a.Z)(e);return t.body===e?(0,g.Z)(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){let i=(0,y.Z)((0,a.Z)(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${_(r)+i}px`;let s=(0,a.Z)(r).querySelectorAll(".mui-fixed");[].forEach.call(s,e=>{n.push({value:e.style.paddingRight,property:"padding-right",el:e}),e.style.paddingRight=`${_(e)+i}px`})}let o;if(r.parentNode instanceof DocumentFragment)o=(0,a.Z)(r).body;else{let l=r.parentElement,u=(0,g.Z)(r);o=(null==l?void 0:l.nodeName)==="HTML"&&"scroll"===u.getComputedStyle(l).overflowY?l:r}n.push({value:o.style.overflow,property:"overflow",el:o},{value:o.style.overflowX,property:"overflow-x",el:o},{value:o.style.overflowY,property:"overflow-y",el:o}),o.style.overflow="hidden"}let c=()=>{n.forEach(({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)})};return c}(r,t))}remove(e,t=!0){let n=this.modals.indexOf(e);if(-1===n)return n;let r=w(this.containers,t=>-1!==t.modals.indexOf(e)),i=this.containers[r];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(n,1),0===i.modals.length)i.restore&&i.restore(),e.modalRef&&v(e.modalRef,t),b(i.container,e.mount,e.modalRef,i.hiddenSiblings,!1),this.containers.splice(r,1);else{let s=i.modals[i.modals.length-1];s.modalRef&&v(s.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}},L=s.forwardRef(function(e,t){var n,c;let{children:h,classes:d,closeAfterTransition:f=!1,component:g="div",components:y={},componentsProps:_={},container:b,disableAutoFocus:w=!1,disableEnforceFocus:E=!1,disableEscapeKeyDown:x=!1,disablePortal:T=!1,disableRestoreFocus:I=!1,disableScrollLock:k=!1,hideBackdrop:C=!1,keepMounted:R=!1,manager:A=M,onBackdropClick:O,onClose:D,onKeyDown:L,open:j,onTransitionEnter:U,onTransitionExited:B}=e,Z=(0,r.Z)(e,P),[$,V]=s.useState(!0),z=s.useRef({}),q=s.useRef(null),G=s.useRef(null),W=(0,o.Z)(G,t),H=!!e.children&&e.children.props.hasOwnProperty("in"),K=null==(n=e["aria-hidden"])||n,Y=()=>(0,a.Z)(q.current),Q=()=>(z.current.modalRef=G.current,z.current.mountNode=q.current,z.current),X=()=>{A.mount(Q(),{disableScrollLock:k}),G.current.scrollTop=0},J=(0,l.Z)(()=>{var e;let t=("function"==typeof b?b():b)||Y().body;A.add(Q(),t),G.current&&X()}),ee=s.useCallback(()=>A.isTopModal(Q()),[A]),et=(0,l.Z)(e=>{q.current=e,e&&(j&&ee()?X():v(G.current,K))}),en=s.useCallback(()=>{A.remove(Q(),K)},[A,K]);s.useEffect(()=>()=>{en()},[en]),s.useEffect(()=>{j?J():H&&f||en()},[j,en,H,f,J]);let er=(0,i.Z)({},e,{classes:d,closeAfterTransition:f,disableAutoFocus:w,disableEnforceFocus:E,disableEscapeKeyDown:x,disablePortal:T,disableRestoreFocus:I,disableScrollLock:k,exited:$,hideBackdrop:C,keepMounted:R}),ei=F(er),es=()=>{V(!1),U&&U()},eo=()=>{V(!0),B&&B(),f&&en()},ea=e=>{e.target===e.currentTarget&&(O&&O(e),D&&D(e,"backdropClick"))},el=e=>{L&&L(e),"Escape"===e.key&&ee()&&!x&&(e.stopPropagation(),D&&D(e,"escapeKeyDown"))},eu={};void 0===h.props.tabIndex&&(eu.tabIndex="-1"),H&&(eu.onEnter=(0,u.Z)(es,h.props.onEnter),eu.onExited=(0,u.Z)(eo,h.props.onExited));let ec=y.Root||g,eh=N({elementType:ec,externalSlotProps:_.root,externalForwardedProps:Z,additionalProps:{ref:W,role:"presentation",onKeyDown:el},className:ei.root,ownerState:er}),ed=y.Backdrop,ef=N({elementType:ed,externalSlotProps:_.backdrop,additionalProps:{"aria-hidden":!0,onClick:ea,open:j},ownerState:er});return R||j||H&&!$?(0,p.jsx)(m,{ref:et,container:b,disablePortal:T,children:(0,p.jsxs)(ec,(0,i.Z)({},eh,{children:[!C&&ed?(0,p.jsx)(ed,(0,i.Z)({},ef)):null,(0,p.jsx)(S,{disableEnforceFocus:E,disableAutoFocus:w,disableRestoreFocus:I,isEnabled:ee,open:j,children:s.cloneElement(h,eu)})]}))}):null});var j=n(1719),U=n(8884),B=n(8735);let Z=["BackdropComponent","BackdropProps","closeAfterTransition","children","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","theme"],$=e=>e.classes,V=(0,j.ZP)("div",{name:"MuiModal",slot:"Root",overridesResolver(e,t){let{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(({theme:e,ownerState:t})=>(0,i.Z)({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),z=(0,j.ZP)(B.Z,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),q=s.forwardRef(function(e,t){var n,o;let a=(0,U.Z)({name:"MuiModal",props:e}),{BackdropComponent:l=z,BackdropProps:u,closeAfterTransition:c=!1,children:h,component:d,components:f={},componentsProps:m={},disableAutoFocus:g=!1,disableEnforceFocus:y=!1,disableEscapeKeyDown:v=!1,disablePortal:_=!1,disableRestoreFocus:b=!1,disableScrollLock:w=!1,hideBackdrop:E=!1,keepMounted:x=!1,theme:S}=a,T=(0,r.Z)(a,Z),[I,k]=s.useState(!0),R={closeAfterTransition:c,disableAutoFocus:g,disableEnforceFocus:y,disableEscapeKeyDown:v,disablePortal:_,disableRestoreFocus:b,disableScrollLock:w,hideBackdrop:E,keepMounted:x},A=(0,i.Z)({},a,R,{exited:I}),D=$(A),N=null!=(n=null!=(o=f.Root)?o:d)?n:V;return(0,p.jsx)(L,(0,i.Z)({components:(0,i.Z)({Root:N,Backdrop:l},f),componentsProps:{root:()=>(0,i.Z)({},O(m.root,A),!(0,C.Z)(N)&&{as:d,theme:S}),backdrop:()=>(0,i.Z)({},u,O(m.backdrop,A))},onTransitionEnter:()=>k(!1),onTransitionExited:()=>k(!0),ref:t},T,{classes:D},R,{children:h}))});var G=q},4246:function(e,t,n){"use strict";n.d(t,{Z:function(){return C}});var r,i=n(3366),s=n(7462),o=n(7294),a=n(4780),l=n(1719),u=n(5893);let c=["children","classes","className","label","notched"],h=(0,l.ZP)("fieldset")({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),d=(0,l.ZP)("legend")(({ownerState:e,theme:t})=>(0,s.Z)({float:"unset",width:"auto",overflow:"hidden"},!e.withLabel&&{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})},e.withLabel&&(0,s.Z)({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},e.notched&&{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})})));var f=n(9711),p=n(6594),m=n(4867),g=n(1588),y=n(8493);function v(e){return(0,m.Z)("MuiOutlinedInput",e)}let _=(0,s.Z)({},y.Z,(0,g.Z)("MuiOutlinedInput",["root","notchedOutline","input"]));var b=n(1011),w=n(8884);let E=["components","fullWidth","inputComponent","label","multiline","notched","type"],x=e=>{let{classes:t}=e,n=(0,a.Z)({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},v,t);return(0,s.Z)({},t,n)},S=(0,l.ZP)(b.Ej,{shouldForwardProp:e=>(0,l.FO)(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:b.Gx}
3393)(({theme:e,ownerState:t})=>{let n="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return(0,s.Z)({position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${_.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${_.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${_.focused} .${_.notchedOutline}`]:{borderColor:(e.vars||e).palette[t.color].main,borderWidth:2},[`&.${_.error} .${_.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${_.disabled} .${_.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},t.startAdornment&&{paddingLeft:14},t.endAdornment&&{paddingRight:14},t.multiline&&(0,s.Z)({padding:"16.5px 14px"},"small"===t.size&&{padding:"8.5px 14px"}))}),T=(0,l.ZP)(function(e){let{className:t,label:n,notched:o}=e,a=(0,i.Z)(e,c),l=null!=n&&""!==n,f=(0,s.Z)({},e,{notched:o,withLabel:l});return(0,u.jsx)(h,(0,s.Z)({"aria-hidden":!0,className:t,ownerState:f},a,{children:(0,u.jsx)(d,{ownerState:f,children:l?(0,u.jsx)("span",{children:n}):r||(r=(0,u.jsx)("span",{className:"notranslate",children:"â"}))})}))},{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{let t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),I=(0,l.ZP)(b.rA,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:b._o})(({theme:e,ownerState:t})=>(0,s.Z)({padding:"16.5px 14px"},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===t.size&&{padding:"8.5px 14px"},t.multiline&&{padding:0},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0})),k=o.forwardRef(function(e,t){var n;let r=(0,w.Z)({props:e,name:"MuiOutlinedInput"}),{components:a={},fullWidth:l=!1,inputComponent:c="input",label:h,multiline:d=!1,notched:m,type:g="text"}=r,y=(0,i.Z)(r,E),v=x(r),_=(0,f.Z)(),k=(0,p.Z)({props:r,muiFormControl:_,states:["required"]}),C=(0,s.Z)({},r,{color:k.color||"primary",disabled:k.disabled,error:k.error,focused:k.focused,formControl:_,fullWidth:l,hiddenLabel:k.hiddenLabel,multiline:d,size:k.size,type:g});return(0,u.jsx)(b.ZP,(0,s.Z)({components:(0,s.Z)({Root:S,Input:I},a),renderSuffix:e=>(0,u.jsx)(T,{ownerState:C,className:v.notchedOutline,label:null!=h&&""!==h&&k.required?n||(n=(0,u.jsxs)(o.Fragment,{children:[h,"\xa0","*"]})):h,notched:void 0!==m?m:Boolean(e.startAdornment||e.filled||e.focused)}),fullWidth:l,inputComponent:c,multiline:d,ref:t,type:g},y,{classes:(0,s.Z)({},v,{notchedOutline:null})}))});k.muiName="Input";var C=k},918:function(e,t,n){"use strict";n.d(t,{Z:function(){return b}});var r=n(3366),i=n(7462),s=n(7294),o=n(6010),a=n(4780),l=n(1796),u=n(1719),c=n(8884),h=n(4867),d=n(1588);function f(e){return(0,h.Z)("MuiPaper",e)}(0,d.Z)("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);var p=n(5893);let m=["className","component","elevation","square","variant"],g=e=>((e<1?5.11916*e**2:4.5*Math.log(e+1)+2)/100).toFixed(2),y=e=>{let{square:t,elevation:n,variant:r,classes:i}=e,s={root:["root",r,!t&&"rounded","elevation"===r&&`elevation${n}`]};return(0,a.Z)(s,f,i)},v=(0,u.ZP)("div",{name:"MuiPaper",slot:"Root",overridesResolver(e,t){let{ownerState:n}=e;
3393return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t[`elevation${n.elevation}`]]}})(({theme:e,ownerState:t})=>{var n;return(0,i.Z)({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.divider}`},"elevation"===t.variant&&(0,i.Z)({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&"dark"===e.palette.mode&&{backgroundImage:`linear-gradient(${(0,l.Fq)("#fff",g(t.elevation))}, ${(0,l.Fq)("#fff",g(t.elevation))})`},e.vars&&{backgroundImage:null==(n=e.vars.overlays)?void 0:n[t.elevation]}))}),_=s.forwardRef(function(e,t){let n=(0,c.Z)({props:e,name:"MuiPaper"}),{className:s,component:a="div",elevation:l=1,square:u=!1,variant:h="elevation"}=n,d=(0,r.Z)(n,m),f=(0,i.Z)({},n,{component:a,elevation:l,square:u,variant:h}),g=y(f);return(0,p.jsx)(v,(0,i.Z)({as:a,ownerState:f,className:(0,o.Z)(g.root,s),ref:t},d))});var b=_},6541:function(e,t,n){"use strict";n.d(t,{Z:function(){return et}});var r,i,s,o=n(7462),a=n(3366),l=n(7294),u=n(6010),c=n(9766),h=n(1387);n(6607);var d=n(4780),f=n(7505),p=n(6622),m=n(4803),g=n(4867),y=n(1588);function v(e){return(0,g.Z)("MuiNativeSelect",e)}let _=(0,y.Z)("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput"]);var b=n(1719),w=n(5893);let E=["className","disabled","IconComponent","inputRef","variant"],x=e=>{let{classes:t,variant:n,disabled:r,multiple:i,open:s}=e,o={select:["select",n,r&&"disabled",i&&"multiple"],icon:["icon",`icon${(0,p.Z)(n)}`,s&&"iconOpen",r&&"disabled"]};return(0,d.Z)(o,v,t)},S=({ownerState:e,theme:t})=>(0,o.Z)({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{backgroundColor:"light"===t.palette.mode?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)",borderRadius:0},"&::-ms-expand":{display:"none"},[`&.${_.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:t.palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},"filled"===e.variant&&{"&&&":{paddingRight:32}},"outlined"===e.variant&&{borderRadius:t.shape.borderRadius,"&:focus":{borderRadius:t.shape.borderRadius},"&&&":{paddingRight:32}}),T=(0,b.ZP)("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:b.FO,overridesResolver(e,t){let{ownerState:n}=e;return[t.select,t[n.variant],{[`&.${_.multiple}`]:t.multiple}]}})(S),I=({ownerState:e,theme:t})=>(0,o.Z)({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:t.palette.action.active,[`&.${_.disabled}`]:{color:t.palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},"filled"===e.variant&&{right:7},"outlined"===e.variant&&{right:7}),k=(0,b.ZP)("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver(e,t){let{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${(0,p.Z)(n.variant)}`],n.open&&t.iconOpen]}})(I),C=l.forwardRef(function(e,t){let{className:n,disabled:r,IconComponent:i,inputRef:s,variant:c="standard"}=e,h=(0,a.Z)(e,E),d=(0,o.Z)({},e,{disabled:r,variant:c}),f=x(d);return(0,w.jsxs)(l.Fragment,{children:[(0,w.jsx)(T,(0,o.Z)({ownerState:d,className:(0,u.Z)(f.select,n),disabled:r,ref:s||t},h)),e.multiple?null:(0,w.jsx)(k,{as:i,ownerState:d,className:f.icon})]})});var R=n(7240),A=n(4771),O=n(4591);function D(e){return(0,g.Z)("MuiSelect",e)}let N=(0,y.Z)("MuiSelect",["select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput"]),P=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],F=(0,b.ZP)("div",{name:"MuiSelect",slot:"Select",overridesResolver(e,t){let{ownerState:n}=e;return[{[`&.${N.select}`]:t.select},{[`&.${N.select}`]:t[n.variant]},{[`&.${N.multiple}`]:t.multiple}]}})(S,{[`&.${N.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),M=(0,b.ZP)("svg",{name:"MuiSelect",slot:"Icon",overridesResolver(e,t){let{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${(0,p.Z)(n.variant)}`],n.open&&t.iconOpen]}})(I),L=(0,b.ZP)("input",{shouldForwardProp:e=>(0,b.Dz)(e)&&"classes"!==e,name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function j(e,t){return"object"==typeof t&&null!==t?e===t:String(e)===String(t)}let U=e=>{let{classes:t,variant:n,disabled:r,multiple:i,open:s}=e,o={select:["select",n,r&&"disabled",i&&"multiple"],icon:["icon",`icon${(0,p.Z)(n)}`,s&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return(0,d.Z)(o,D,t)},B=l.forwardRef(function(e,t){var n;let{"aria-describedby":i,"aria-label":s,autoFocus:c,autoWidth:d,children:p,className:g,defaultOpen:y,defaultValue:v,disabled:_,displayEmpty:b,IconComponent:E,inputRef:x,labelId:S,MenuProps:T={},multiple:I,name:k,onBlur:C,onChange:D,onClose:N,onFocus:B,onOpen:Z,open:$,readOnly:V,renderValue:z,SelectDisplayProps:q={},tabIndex:G,value:W,variant:H="standard"}=e,K=(0,a.Z)(e,P),[Y,Q]=(0,O.Z)({controlled:W,default:v,name:"Select"}),[X,J]=(0,O.Z)({controlled:$,default:y,name:"Select"}),ee=l.useRef(null),et=l.useRef(null),[en,er]=l.useState(null),{current:ei}=l.useRef(null!=$),[es,eo]=l.useState(),ea=(0,A.Z)(t,x),el=l.useCallback(e=>{et.current=e,e&&er(e)},[]);l.useImperativeHandle(ea,()=>({focus(){et.current.focus()},node:ee.current,value:Y}),[Y]),l.useEffect(()=>{y&&X&&en&&!ei&&(eo(d?null:en.clientWidth),et.current.focus())},[en,d]),l.useEffect(()=>{c&&et.current.focus()},[c]),l.useEffect(()=>{if(!S)return;let e=(0,f.Z)(et.current).getElementById(S);if(e){let t=()=>{getSelection().isCollapsed&&et.current.focus()};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}},[S]);let eu=(e,t)=>
3393{e?Z&&Z(t):N&&N(t),ei||(eo(d?null:en.clientWidth),J(e))},ec=e=>{0===e.button&&(e.preventDefault(),et.current.focus(),eu(!0,e))},eh=e=>{eu(!1,e)},ed=l.Children.toArray(p),ef=e=>{let t=ed.map(e=>e.props.value).indexOf(e.target.value);if(-1===t)return;let n=ed[t];Q(n.props.value),D&&D(e,n)},ep=e=>t=>{let n;if(t.currentTarget.hasAttribute("tabindex")){if(I){n=Array.isArray(Y)?Y.slice():[];let r=Y.indexOf(e.props.value);-1===r?n.push(e.props.value):n.splice(r,1)}else n=e.props.value;if(e.props.onClick&&e.props.onClick(t),Y!==n&&(Q(n),D)){let i=t.nativeEvent||t,s=new i.constructor(i.type,i);Object.defineProperty(s,"target",{writable:!0,value:{value:n,name:k}}),D(s,e)}I||eu(!1,t)}},em=e=>{V||-1===[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)||(e.preventDefault(),eu(!0,e))},eg=null!==en&&X,ey=e=>{!eg&&C&&(Object.defineProperty(e,"target",{writable:!0,value:{value:Y,name:k}}),C(e))};delete K["aria-invalid"];let ev,e_,eb=[],ew=!1;((0,R.vd)({value:Y})||b)&&(z?ev=z(Y):ew=!0);let eE=ed.map((e,t,n)=>{if(!l.isValidElement(e))return null;let r;if(I){if(!Array.isArray(Y))throw Error((0,h.Z)(2));(r=Y.some(t=>j(t,e.props.value)))&&ew&&eb.push(e.props.children)}else(r=j(Y,e.props.value))&&ew&&(e_=e.props.children);return void 0===e.props.value?l.cloneElement(e,{"aria-readonly":!0,role:"option"}):l.cloneElement(e,{"aria-selected":r?"true":"false",onClick:ep(e),onKeyUp(t){" "===t.key&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:"option",selected:void 0===n[0].props.value||!0===n[0].props.disabled?(()=>{if(Y)return r;let t=n.find(e=>void 0!==e.props.value&&!0!==e.props.disabled);return e===t||r})():r,value:void 0,"data-value":e.props.value})});ew&&(ev=I?0===eb.length?null:eb.reduce((e,t,n)=>(e.push(t),n<eb.length-1&&e.push(", "),e),[]):e_);let ex=es;!d&&ei&&en&&(ex=en.clientWidth);let eS;eS=void 0!==G?G:_?null:0;let eT=q.id||(k?`mui-component-select-${k}`:void 0),eI=(0,o.Z)({},e,{variant:H,value:Y,open:eg}),ek=U(eI);return(0,w.jsxs)(l.Fragment,{children:[(0,w.jsx)(F,(0,o.Z)({ref:el,tabIndex:eS,role:"button","aria-disabled":_?"true":void 0,"aria-expanded":eg?"true":"false","aria-haspopup":"listbox","aria-label":s,"aria-labelledby":[S,eT].filter(Boolean).join(" ")||void 0,"aria-describedby":i,onKeyDown:em,onMouseDown:_||V?null:ec,onBlur:ey,onFocus:B},q,{ownerState:eI,className:(0,u.Z)(q.className,ek.select,g),id:eT,children:null!=(n=ev)&&("string"!=typeof n||n.trim())?ev:r||(r=(0,w.jsx)("span",{className:"notranslate",children:"â"}))})),(0,w.jsx)(L,(0,o.Z)({value:Array.isArray(Y)?Y.join(","):Y,name:k,ref:ee,"aria-hidden":!0,onChange:ef,tabIndex:-1,disabled:_,className:ek.nativeInput,autoFocus:c,ownerState:eI},K)),(0,w.jsx)(M,{as:E,className:ek.icon,ownerState:eI}),(0,w.jsx)(m.Z,(0,o.Z)({id:`menu-${k||""}`,anchorEl:en,open:eg,onClose:eh,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},T,{MenuListProps:(0,o.Z)({"aria-labelledby":S,role:"listbox",disableListWrap:!0},T.MenuListProps),PaperProps:(0,o.Z)({},T.PaperProps,{style:(0,o.Z)({minWidth:ex},null!=T.PaperProps?T.PaperProps.style:null)}),children:eE}))]})});var Z=n(6594),$=n(9711),V=(0,n(8175).Z)((0,w.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),z=n(6480),q=n(7630),G=n(4246),W=n(8884);let H=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],K=e=>{let{classes:t}=e;return t},Y={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>(0,b.FO)(e)&&"variant"!==e,slot:"Root"},Q=(0,b.ZP)(z.Z,Y)(""),X=(0,b.ZP)(G.Z,Y)(""),J=(0,b.ZP)(q.Z,Y)(""),ee=l.forwardRef(function(e,t){let n=(0,W.Z)({name:"MuiSelect",props:e}),{autoWidth:r=!1,children:h,classes:d={},className:f,defaultOpen:p=!1,displayEmpty:m=!1,IconComponent:g=V,id:y,input:v,inputProps:_,label:b,labelId:E,MenuProps:x,multiple:S=!1,native:T=!1,onClose:I,onOpen:k,open:R,renderValue:O,SelectDisplayProps:D,variant:N="outlined"}=n,P=(0,a.Z)(n,H),F=(0,$.Z)(),M=(0,Z.Z)({props:n,muiFormControl:F,states:["variant"]}),L=M.variant||N,j=v||({standard:i||(i=(0,w.jsx)(Q,{})),outlined:(0,w.jsx)(X,{label:b}),filled:s||(s=(0,w.jsx)(J,{}))})[L],U=(0,o.Z)({},n,{variant:L,classes:d}),z=K(U),q=(0,A.Z)(t,j.ref);return(0,w.jsx)(l.Fragment,{children:l.cloneElement(j,(0,o.Z)({inputComponent:T?C:B,inputProps:(0,o.Z)({children:h,IconComponent:g,variant:L,type:void 0,multiple:S},T?{id:y}:{autoWidth:r,defaultOpen:p,displayEmpty:m,labelId:E,MenuProps:x,onClose:I,onOpen:k,open:R,renderValue:O,SelectDisplayProps:(0,o.Z)({id:y},D)},_,{classes:_?(0,c.Z)(z,_.classes):z},v?v.props.inputProps:{})},S&&T&&"outlined"===L?{notched:!0}:{},{ref:q,className:(0,u.Z)(j.props.className,f)},!v&&{variant:L},P))})});ee.muiName="Select";var et=ee},9243:function(e,t,n){"use strict";n.d(t,{Z:function(){return L}});var r=n(3366),i=n(7462),s=n(7294),o=n(6010),a=n(4780),l=n(67),u=n(3633),c=n(7094),h=n(5893);function d(e){return e.substring(2).toLowerCase()}var f=function(e){let{children:t,disableReactTree:n=!1,mouseEvent:r="onClick",onClickAway:i,touchEvent:o="onTouchEnd"}=e,a=s.useRef(!1),f=s.useRef(null),p=s.useRef(!1),m=s.useRef(!1);s.useEffect(()=>(setTimeout(()=>{p.current=!0},0),()=>{p.current=!1}),[]);let g=(0,l.Z)(t.ref,f),y=(0,u.Z)(e=>{var t,r;let s=m.current;m.current=!1;let o=(0,c.Z)(f.current);if(!p.current||!f.current||"clientX"in e&&(o.documentElement.clientWidth<e.clientX||o.documentElement.clientHeight<e.clientY))return;if(a.current){a.current=!1;return}let l;(e.composedPath?e.composedPath().indexOf(f.current)>-1:!o.documentElement.contains(e.target)||f.current.contains(e.target))||!n&&s||i(e)}),v=e=>n=>{m.current=!0;let r=t.props[e];r&&r(n)},_={ref:g};return!1!==o&&(_[o]=v(o)),s.useEffect(()=>{if(!1!==o){let e=d(o),t=(0,c.Z)(f.current),n=()=>{a.current=!0};return t.addEventListener(e,y),t.addEventListener("touchmove",n),()=>{t.removeEventListener(e,y),t.removeEventListener("touchmove",n)}}},[y,o]),!1!==r&&(_[r]=v(r)),s.useEffect(()=>{if(!1!==r){let e=d(r),t=(0,c.Z)(f.current);return t.addEventListener(e,y),()=>{t.removeEventListener(e,y)}}},[y,r]),(0,h.jsx)(s.Fragment,{children:s.cloneElement(t,_)})},p=n(1719),m=n(2097),g=n(8884),y=n(4846),v=n(6622),_=n(1760),b=n(1796),w=n(918),E=n(4867),x=n(1588);function S(e){return(0,E.Z)("MuiSnackbarContent",e)}(0,x.Z)("MuiSnackbarContent",["root","message","action"]);let T=["action","className","message","role"],I=e=>{let{classes:t}=e;return(0,a.Z)({root:["root"],action:["action"],message:["message"]},S,t)},k=(0,p.ZP)(w.Z,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{let t="light"===e.palette.mode?.8:.98,n=(0,b._4)(e.palette.background.default,t);return(0,i.Z)({},e.typography.body2,{color:e.vars?e.vars.palette.SnackbarContent.color:e.palette.getContrastText(n),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,flexGrow:1,[e.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}})}),C=(0,p.ZP)("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0"}),R=(0,p.ZP)("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),A=s.forwardRef(function(e,t){let n=(0,g.Z)({props:e,name:"MuiSnackbarContent"}),{action:s,className:a,message:l,role:u="alert"}=n,c=(0,r.Z)(n,T),d=I(n);return(0,h.jsxs)(k,(0,i.Z)({role:u,square:!0,elevation:6,className:(0,o.Z)(d.root,a),ownerState:n,ref:t},c,{children:[(0,h.jsx)(C,{className:d.message,ownerState:n,children:l}),s?(0,h.jsx)(R,{className:d.action,ownerState:n,children:s}):null]}))});function O(e){return(0,E.Z)("MuiSnackbar",e)}
3393(0,x.Z)("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);let D=["onEnter","onExited"],N=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],P=e=>{let{classes:t,anchorOrigin:n}=e,r={root:["root",`anchorOrigin${(0,v.Z)(n.vertical)}${(0,v.Z)(n.horizontal)}`]};return(0,a.Z)(r,O,t)},F=(0,p.ZP)("div",{name:"MuiSnackbar",slot:"Root",overridesResolver(e,t){let{ownerState:n}=e;return[t.root,t[`anchorOrigin${(0,v.Z)(n.anchorOrigin.vertical)}${(0,v.Z)(n.anchorOrigin.horizontal)}`]]}})(({theme:e,ownerState:t})=>(0,i.Z)({zIndex:(e.vars||e).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},"top"===t.anchorOrigin.vertical?{top:8}:{bottom:8},"left"===t.anchorOrigin.horizontal&&{justifyContent:"flex-start"},"right"===t.anchorOrigin.horizontal&&{justifyContent:"flex-end"},{[e.breakpoints.up("sm")]:(0,i.Z)({},"top"===t.anchorOrigin.vertical?{top:24}:{bottom:24},"center"===t.anchorOrigin.horizontal&&{left:"50%",right:"auto",transform:"translateX(-50%)"},"left"===t.anchorOrigin.horizontal&&{left:24,right:"auto"},"right"===t.anchorOrigin.horizontal&&{right:24,left:"auto"})})),M=s.forwardRef(function(e,t){let n=(0,g.Z)({props:e,name:"MuiSnackbar"}),a=(0,m.Z)(),l={enter:a.transitions.duration.enteringScreen,exit:a.transitions.duration.leavingScreen},{action:u,anchorOrigin:{vertical:c,horizontal:d}={vertical:"bottom",horizontal:"left"},autoHideDuration:p=null,children:v,className:b,ClickAwayListenerProps:w,ContentProps:E,disableWindowBlurListener:x=!1,message:S,onBlur:T,onClose:I,onFocus:k,onMouseEnter:C,onMouseLeave:R,open:O,resumeHideDuration:M,TransitionComponent:L=_.Z,transitionDuration:j=l,TransitionProps:{onEnter:U,onExited:B}={}}=n,Z=(0,r.Z)(n.TransitionProps,D),$=(0,r.Z)(n,N),V=(0,i.Z)({},n,{anchorOrigin:{vertical:c,horizontal:d}}),z=P(V),q=s.useRef(),[G,W]=s.useState(!0),H=(0,y.Z)((...e)=>{I&&I(...e)}),K=(0,y.Z)(e=>{I&&null!=e&&(clearTimeout(q.current),q.current=setTimeout(()=>{H(null,"timeout")},e))});s.useEffect(()=>(O&&K(p),()=>{clearTimeout(q.current)}),[O,p,K]);let Y=()=>{clearTimeout(q.current)},Q=s.useCallback(()=>{null!=p&&K(null!=M?M:.5*p)},[p,M,K]),X=e=>{k&&k(e),Y()},J=e=>{C&&C(e),Y()},ee=e=>{T&&T(e),Q()},et=e=>{R&&R(e),Q()},en=e=>{I&&I(e,"clickaway")},er=e=>{W(!0),B&&B(e)},ei=(e,t)=>{W(!1),U&&U(e,t)};return(s.useEffect(()=>{if(!x&&O)return window.addEventListener("focus",Q),window.addEventListener("blur",Y),()=>{window.removeEventListener("focus",Q),window.removeEventListener("blur",Y)}},[x,Q,O]),s.useEffect(()=>{if(O)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){!e.defaultPrevented&&("Escape"===e.key||"Esc"===e.key)&&I&&I(e,"escapeKeyDown")}},[G,O,I]),!O&&G)?null:(0,h.jsx)(f,(0,i.Z)({onClickAway:en},w,{children:(0,h.jsx)(F,(0,i.Z)({className:(0,o.Z)(z.root,b),onBlur:ee,onFocus:X,onMouseEnter:J,onMouseLeave:et,ownerState:V,ref:t,role:"presentation"},$,{children:(0,h.jsx)(L,(0,i.Z)({appear:!0,in:O,timeout:j,direction:"top"===c?"down":"up",onEnter:ei,onExited:er},Z,{children:v||(0,h.jsx)(A,(0,i.Z)({message:S,action:u},E))}))}))}))});var L=M},7836:function(e,t,n){"use strict";n.d(t,{Z:function(){return k}});var r=n(7462),i=n(3366),s=n(7294),o=n(6010),a=n(4780),l=n(7579),u=n(1719),c=n(8884),h=n(6480),d=n(7630),f=n(4246),p=n(8316),m=n(5343),g=n(2631),y=n(6541),v=n(4867),_=n(1588);function b(e){return(0,v.Z)("MuiTextField",e)}(0,_.Z)("MuiTextField",["root"]);var w=n(5893);let E=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],x={standard:h.Z,filled:d.Z,outlined:f.Z},S=e=>{let{classes:t}=e;return(0,a.Z)({root:["root"]},b,t)}
3393,T=(0,u.ZP)(m.Z,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),I=s.forwardRef(function(e,t){let n=(0,c.Z)({props:e,name:"MuiTextField"}),{autoComplete:s,autoFocus:a=!1,children:u,className:h,color:d="primary",defaultValue:f,disabled:m=!1,error:v=!1,FormHelperTextProps:_,fullWidth:b=!1,helperText:I,id:k,InputLabelProps:C,inputProps:R,InputProps:A,inputRef:O,label:D,maxRows:N,minRows:P,multiline:F=!1,name:M,onBlur:L,onChange:j,onFocus:U,placeholder:B,required:Z=!1,rows:$,select:V=!1,SelectProps:z,type:q,value:G,variant:W="outlined"}=n,H=(0,i.Z)(n,E),K=(0,r.Z)({},n,{autoFocus:a,color:d,disabled:m,error:v,fullWidth:b,multiline:F,required:Z,select:V,variant:W}),Y=S(K),Q={};"outlined"===W&&(C&&void 0!==C.shrink&&(Q.notched=C.shrink),Q.label=D),V&&(z&&z.native||(Q.id=void 0),Q["aria-describedby"]=void 0);let X=(0,l.Z)(k),J=I&&X?`${X}-helper-text`:void 0,ee=D&&X?`${X}-label`:void 0,et=x[W],en=(0,w.jsx)(et,(0,r.Z)({"aria-describedby":J,autoComplete:s,autoFocus:a,defaultValue:f,fullWidth:b,multiline:F,name:M,rows:$,maxRows:N,minRows:P,type:q,value:G,id:X,inputRef:O,onBlur:L,onChange:j,onFocus:U,placeholder:B,inputProps:R},Q,A));return(0,w.jsxs)(T,(0,r.Z)({className:(0,o.Z)(Y.root,h),disabled:m,error:v,fullWidth:b,ref:t,required:Z,color:d,variant:W,ownerState:K},H,{children:[null!=D&&""!==D&&(0,w.jsx)(p.Z,(0,r.Z)({htmlFor:X,id:ee},C,{children:D})),V?(0,w.jsx)(y.Z,(0,r.Z)({"aria-describedby":J,id:X,labelId:ee,value:G,input:en},z,{children:u})):en,I&&(0,w.jsx)(g.Z,(0,r.Z)({id:J},_,{children:I}))]}))});var k=I},9630:function(e,t,n){"use strict";n.d(t,{Z:function(){return x}});var r=n(3366),i=n(7462),s=n(7294),o=n(6010),a=n(9707),l=n(4780),u=n(1719),c=n(8884),h=n(6622),d=n(4867),f=n(1588);function p(e){return(0,d.Z)("MuiTypography",e)}(0,f.Z)("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);var m=n(5893);let g=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],y=e=>{let{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:s,classes:o}=e,a={root:["root",s,"inherit"!==e.align&&`align${(0,h.Z)(t)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return(0,l.Z)(a,p,o)},v=(0,u.ZP)("span",{name:"MuiTypography",slot:"Root",overridesResolver(e,t){let{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t[`align${(0,h.Z)(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>(0,i.Z)({margin:0},t.variant&&e.typography[t.variant],"inherit"!==t.align&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),_={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},b={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},w=e=>b[e]||e,E=s.forwardRef(function(e,t){let n=(0,c.Z)({props:e,name:"MuiTypography"}),s=w(n.color),l=(0,a.Z)((0,i.Z)({},n,{color:s})),{align:u="inherit",className:h,component:d,gutterBottom:f=!1,noWrap:p=!1,paragraph:b=!1,variant:E="body1",variantMapping:x=_}=l,S=(0,r.Z)(l,g),T=(0,i.Z)({},l,{align:u,color:s,className:h,component:d,gutterBottom:f,noWrap:p,paragraph:b,variant:E,variantMapping:x}),I=d||(b?"p":x[E]||_[E])||"span",k=y(T);return(0,m.jsx)(v,(0,i.Z)({as:I,ref:t,ownerState:T,className:(0,o.Z)(k.root,h)},S))});var x=E},9762:function(e,t,n){"use strict";n.d(t,{Z:function(){return N}});var r=n(7462),i=n(3366),s=n(1387),o=n(9766),a=n(6500),l=n(1796),u={black:"#000",white:"#fff"},c={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},h={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},d={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},f={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},p={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},m={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},g={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};let y=["mode","contrastThreshold","tonalOffset"],v={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:u.white,default:u.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackgroun
3393d:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},_={text:{primary:u.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:u.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function b(e,t,n,r){let i=r.light||r,s=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=(0,l.$n)(e.main,i):"dark"===t&&(e.dark=(0,l._j)(e.main,s)))}let w=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"],E={textTransform:"uppercase"},x='"Roboto", "Helvetica", "Arial", sans-serif';function S(...e){return`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,0.2),${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,0.14),${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,0.12)`}let T=["none",S(0,2,1,-1,0,1,1,0,0,1,3,0),S(0,3,1,-2,0,2,2,0,0,1,5,0),S(0,3,3,-2,0,3,4,0,0,1,8,0),S(0,2,4,-1,0,4,5,0,0,1,10,0),S(0,3,5,-1,0,5,8,0,0,1,14,0),S(0,3,5,-1,0,6,10,0,0,1,18,0),S(0,4,5,-2,0,7,10,1,0,2,16,1),S(0,5,5,-3,0,8,10,1,0,3,14,2),S(0,5,6,-3,0,9,12,1,0,3,16,2),S(0,6,6,-3,0,10,14,1,0,4,18,3),S(0,6,7,-4,0,11,15,1,0,4,20,3),S(0,7,8,-4,0,12,17,2,0,5,22,4),S(0,7,8,-4,0,13,19,2,0,5,24,4),S(0,7,9,-4,0,14,21,2,0,5,26,4),S(0,8,9,-5,0,15,22,2,0,6,28,5),S(0,8,10,-5,0,16,24,2,0,6,30,5),S(0,8,11,-5,0,17,26,2,0,6,32,5),S(0,9,11,-5,0,18,28,2,0,7,34,6),S(0,9,12,-6,0,19,29,2,0,7,36,6),S(0,10,13,-6,0,20,31,3,0,8,38,7),S(0,10,13,-6,0,21,33,3,0,8,40,7),S(0,10,14,-6,0,22,35,3,0,8,42,7),S(0,11,14,-7,0,23,36,3,0,9,44,8),S(0,11,15,-7,0,24,38,3,0,9,46,8)],I=["duration","easing","delay"],k={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},C={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function R(e){return`${Math.round(e)}ms`}function A(e){if(!e)return 0;let t=e/36;return Math.round((4+15*t**.25+t/5)*10)}var O={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};let D=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];var N=function(e={},...t){var n,S;let{mixins:N={},palette:P={},transitions:F={},typography:M={}}=e,L=(0,i.Z)(e,D);if(e.vars)throw Error((0,s.Z)(18));let j=function(e){let{mode:t="light",contrastThreshold:n=3,tonalOffset:a=.2}=e,w=(0,i.Z)(e,y),E=e.primary||function(e="light"){return"dark"===e?{main:p[200],light:p[50],dark:p[400]}:{main:p[700],light:p[400],dark:p[800]}}(t),x=e.secondary||function(e="light"){return"dark"===e?{main:h[200],light:h[50],dark:h[400]}:{main:h[500],light:h[300],dark:h[700]}}(t),S=e.error||function(e="light"){return"dark"===e?{main:d[500],light:d[300],dark:d[700]}:{main:d[700],light:d[400],dark:d[800]}}(t),T=e.info||function(e="light"){return"dark"===e?{main:m[400],light:m[300],dark:m[700]}:{main:m[700],light:m[500],dark:m[900]}}(t),I=e.success||function(e="light"){return"dark"===e?{main:g[400],light:g[300],dark:g[700]}:{main:g[800],light:g[500],dark:g[900]}}(t),k=e.warning||function(e="light"){return"dark"===e?{main:f[400],light:f[300],dark:f[700]}:{main:"#ed6c02",light:f[500],dark:f[900]}}(t);function C(e){let t=(0,l.mi)(e,_.text.primary)>=n?_.text.primary:v.text.primary;return t}let R=({color:e,name:t,mainShade:n=500,lightShade:i=300,darkShade:o=700})=>{if(!(e=(0,r.Z)({},e)).main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty("main"))throw Error((0,s.Z)(11,t?` (${t})`:"",n));if("string"!=typeof e.main)throw Error((0,s.Z)(12,t?` (${t})`:"",JSON.stringify(e.main)));return b(e,"light",i,a),b(e,"dark",o,a),e.contrastText||(e.contrastText=C(e.main)),e},A=(0,o.Z)((0,r.Z)({common:(0,r.Z)({},u),mode:t,primary:R({color:E,name:"primary"}
3393),secondary:R({color:x,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:R({color:S,name:"error"}),warning:R({color:k,name:"warning"}),info:R({color:T,name:"info"}),success:R({color:I,name:"success"}),grey:c,contrastThreshold:n,getContrastText:C,augmentColor:R,tonalOffset:a},{dark:_,light:v}[t]),w);return A}(P),U=(0,a.Z)(e),B=(0,o.Z)(U,{mixins:(n=U.breakpoints,(0,r.Z)({toolbar:{minHeight:56,[n.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[n.up("sm")]:{minHeight:64}}},N)),palette:j,shadows:T.slice(),typography:function(e,t){let n="function"==typeof t?t(e):t,{fontFamily:s=x,fontSize:a=14,fontWeightLight:l=300,fontWeightRegular:u=400,fontWeightMedium:c=500,fontWeightBold:h=700,htmlFontSize:d=16,allVariants:f,pxToRem:p}=n,m=(0,i.Z)(n,w),g=a/14,y=p||(e=>`${e/d*g}rem`),v=(e,t,n,i,o)=>{var a;return(0,r.Z)({fontFamily:s,fontWeight:e,fontSize:y(t),lineHeight:n},s===x?{letterSpacing:`${Math.round(1e5*(i/t))/1e5}em`}:{},o,f)},_={h1:v(l,96,1.167,-1.5),h2:v(l,60,1.2,-.5),h3:v(u,48,1.167,0),h4:v(u,34,1.235,.25),h5:v(u,24,1.334,0),h6:v(c,20,1.6,.15),subtitle1:v(u,16,1.75,.15),subtitle2:v(c,14,1.57,.1),body1:v(u,16,1.5,.15),body2:v(u,14,1.43,.15),button:v(c,14,1.75,.4,E),caption:v(u,12,1.66,.4),overline:v(u,12,2.66,1,E)};return(0,o.Z)((0,r.Z)({htmlFontSize:d,pxToRem:y,fontFamily:s,fontSize:a,fontWeightLight:l,fontWeightRegular:u,fontWeightMedium:c,fontWeightBold:h},_),m,{clone:!1})}(j,M),transitions:function(e){let t=(0,r.Z)({},k,e.easing),n=(0,r.Z)({},C,e.duration),s=(e=["all"],r={})=>{let{duration:s=n.standard,easing:o=t.easeInOut,delay:a=0}=r;return(0,i.Z)(r,I),(Array.isArray(e)?e:[e]).map(e=>`${e} ${"string"==typeof s?s:R(s)} ${o} ${"string"==typeof a?a:R(a)}`).join(",")};return(0,r.Z)({getAutoHeightDuration:A,create:s},e,{easing:t,duration:n})}(F),zIndex:(0,r.Z)({},O)});return B=(0,o.Z)(B,L),B=t.reduce((e,t)=>(0,o.Z)(e,t),B)}},5165:function(e,t,n){"use strict";var r=n(9762);let i=(0,r.Z)();t.Z=i},1719:function(e,t,n){"use strict";n.d(t,{Dz:function(){return o},FO:function(){return s}});var r=n(182),i=n(5165);let s=e=>(0,r.x9)(e)&&"classes"!==e,o=r.x9,a=(0,r.ZP)({defaultTheme:i.Z,rootShouldForwardProp:s});t.ZP=a},2097:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}}),n(7294);var r=n(9718),i=n(5165);function s(){let e=(0,r.Z)(i.Z);return e}},8884:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(5149),i=n(5165);function s({props:e,name:t}){return(0,r.Z)({props:e,name:t,defaultTheme:i.Z})}},3566:function(e,t,n){"use strict";n.d(t,{C:function(){return i},n:function(){return r}});let r=e=>e.scrollTop;function i(e,t){var n,r;let{timeout:i,easing:s,style:o={}}=e;return{duration:null!=(n=o.transitionDuration)?n:"number"==typeof i?i:i[t.mode]||0,easing:null!=(r=o.transitionTimingFunction)?r:"object"==typeof s?s[t.mode]:s,delay:o.transitionDelay}}},6622:function(e,t,n){"use strict";var r=n(8320);t.Z=r.Z},8175:function(e,t,n){"use strict";n.d(t,{Z:function(){return _}});var r=n(7462),i=n(7294),s=n(3366),o=n(6010),a=n(4780),l=n(6622),u=n(8884),c=n(1719),h=n(4867),d=n(1588);function f(e){return(0,h.Z)("MuiSvgIcon",e)}(0,d.Z)("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var p=n(5893);let m=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],g=e=>{let{color:t,fontSize:n,classes:r}=e,i={root:["root","inherit"!==t&&`color${(0,l.Z)(t)}`,`fontSize${(0,l.Z)(n)}`]};return(0,a.Z)(i,f,r)},y=(0,c.ZP)("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver(e,t){let{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${(0,l.Z)(n.color)}`],t[`fontSize${(0,l.Z)(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,r,i,s,o,a,l,u,c,h,d,f,p,m,g,y,v;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,transition:null==(n=e.transitions)?void 0:null==(r=n.create)?void 0:r.call(n,"fill",{duration:null==(i=e.transitions)?void 0:null==(s=i.duration)?void 0:s.shorter}),fontSize:({inherit:"inherit",small:(null==(o=e.typography)?void 0:null==(a=o.pxToRem)?void 0:a.call(o,20))||"1.25rem",medium:(null==(l=e.typography)?void 0:null==(u=l.pxToRem)?void 0:u.call(l,24))||"1.5rem",large:(null==(c=e.typography)?void 0:null==(h=c.pxToRem)?void 0:h.call(c,35))||"2.1875rem"})[t.fontSize],color:null!=(d=null==(f=(e.vars||e).palette)?void 0:null==(p=f[t.color])?void 0:p.main)?d:({action:null==(m=(e.vars||e).palette)?void 0:null==(g=m.action)?void 0:g.active,disabled:null==(y=(e.vars||e).palette)?void 0:null==(v=y.action)?void 0:v.disabled,inherit:void 0})[t.color]}}),v=i.forwardRef(function(e,t){let n=(0,u.Z)({props:e,name:"MuiSvgIcon"}),{children:i,className:a,color:l="inherit",component:c="svg",fontSize:h="medium",htmlColor:d,inheritViewBox:f=!1,titleAccess:v,viewBox:_="0 0 24 24"}=n,b=(0,s.Z)(n,m),w=(0,r.Z)({},n,{color:l,component:c,fontSize:h,instanceFontSize:e.fontSize,inheritViewBox:f,viewBox:_}),E={};f||(E.viewBox=_);let x=g(w);return(0,p.jsxs)(y,(0,r.Z)({as:c,className:(0,o.Z)(x.root,a),focusable:"false",color:d,"aria-hidden":!v||void 0,role:v?"img":void 0,ref:t},E,b,{ownerState:w,children:[i,v?(0,p.jsx)("title",{children:v}):null]}))});function _(e,t){function n(n,i){return(0,p.jsx)(v,(0,r.Z)({"data-testid":`${t}Icon`,ref:i},n,{children:e}))}return n.muiName=v.muiName,i.memo(i.forwardRef(n))}v.muiName="SvgIcon"},5400:function(e,t,n){"use strict";var r=n(7596);t.Z=r.Z},3029:function(e,t,n){"use strict";n.r(t),n.d(t,{capitalize:function(){return i.Z},createChainedFunction:function(){return s},createSvgIcon:function(){return o.Z},debounce:function(){return a.Z},deprecatedPropType:function(){return l},isMuiElement:function(){return u.Z},ownerDocument:function(){return c.Z},ownerWindow:function(){return h.Z},requirePropFactory:function(){return d},setRef:function(){return f},unstable_ClassNameGenerator:function(){return E},unstable_useEnhancedEffect:function(){return p.Z},unstable_useId:function(){return m},unsupportedProp:function(){return y},useControlled:function(){return v.Z},useEventCallback:function(){return _.Z},useForkRef:function(){return b.Z},useIsFocusVisible:function(){return w.Z}});var r=n(7078),i=n(6622),s=n(9064).Z,o=n(8175),a=n(5400),l=function(e,t){return()=>null},u=n(7335),c=n(7505),h=n(7577);n(7462);var d=function(e,t){return()=>null},f=n(7960).Z,p=n(3289),m=n(7579).Z;function g(e,t,n,r,i){return null}var y=g,v=n(4591),_=n(4846),b=n(4771),w=n(1625);let E={configure(e){console.warn("MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.\n\nYou should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead\n\nThe detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401\n\nThe updated documentation: https://mui.com/guides/classname-generator/"),r.Z.configure(e)}}},7335:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(7294),i=function(e,t){return r.isValidElement(e)&&-1!==t.indexOf(e.type.muiName)}},7505:function(e,t,n){"use strict";var r=n(7094);t.Z=r.Z},7577:function(e,t,n){"use strict";var r=n(8290);t.Z=r.Z},4591:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(7294),i=function({controlled:e,default:t,name:n,state:i="value"}){let{current:s}=r.useRef(void 0!==e),[o,a]=r.useState(t),l=r.useCallback(e=>{s||a(e)},[]);return[s?e:o,l]}},3289:function(e,t,n){"use strict";var r=n(6600);t.Z=r.Z},4846:function(e,t,n){"use strict";var r=n(3633);t.Z=r.Z},4771:function(e,t,n){"use strict";var r=n(67);t.Z=r.Z},1625:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(7294);let i=!0,s=!1,o,a={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function l(e){!e.metaKey&&!e.altKey&&!e.ctrlKey&&(i=!0)}function u(){i=!1}function c(){"hidden"===this.visibilityState&&s&&(i=!0)}var h=function(){let e=r.useCallback(e=>{if(null!=e){var t;(t=e.ownerDocument).addEventListener("keydown",l,!0),t.addEventListener("mousedown",u,!0),t.addEventListener("pointerdown",u,!0),t.addEventListener("touchstart",u,!0),t.addEventListener("visibilitychange",c,!0)}},[]),t=r.useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!function(e){let{target:t}=e;try{return t.matches(":focus-visible")}catch(n){}return i||function(e){let{type:t,tagName:n}=e;return"INPUT"===n&&!!a[t]&&!e.readOnly||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&(s=!0,window.clearTimeout(o),o=window.setTimeout(()=>{s=!1},100),t.current=!1,!0)},ref:e}}},3023:function(e,t){"use strict";/** 3394 * @license React 3395 * react-is.production.min.js 3396 * 3397 * Copyright (c) Facebook, Inc. and its affiliates. 3398 * 3399 * This source code is licensed under the MIT license found in the 3400 * LICENSE file in the root directory of this source tree. 3401 */ var n;Symbol.for("react.element"),Symbol.for("react.portal"),Symbol.for("react.fragment"),Symbol.for("react.strict_mode"),Symbol.for("react.profiler"),Symbol.for("react.provider"),Symbol.for("react.context"),Symbol.for("react.server_context"),Symbol.for("react.forward_ref"),Symbol.for("react.suspense"),Symbol.for("react.suspense_list"),Symbol.for("react.memo"),Symbol.for("react.lazy"),Symbol.for("react.offscreen"),Symbol.for("react.module.reference")},6607:function(e,t,n){"use strict";n(3023)},4819:function(e,t,n){"use strict";var r=n(7294);let i=r.createContext(null);t.Z=i},6760:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(7294),i=n(4819);function s(){let e=r.useContext(i.Z);return e}},9731:function(e,t,n){"use strict";n.d(t,{ZP:function(){return v},Co:function(){return _}});var r,i=n(7294),s=n(7462),o=n(5042),a=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInl
3401ine|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,l=(0,o.Z)(function(e){return a.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&91>e.charCodeAt(2)}),u=n(2443),c=n(444),h=n(8137),d=n(7278),f=function(e){return"theme"!==e},p=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?l:f},m=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},g=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return(0,c.hC)(t,n,r),(0,d.L)(function(){return(0,c.My)(t,n,r)}),null},y=(function e(t,n){var r,o,a=t.__emotion_real===t,l=a&&t.__emotion_base||t;void 0!==n&&(r=n.label,o=n.target);var d=m(t,n,a),f=d||p(l),y=!f("as");return function(){var v=arguments,_=a&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&_.push("label:"+r+";"),null==v[0]||void 0===v[0].raw)_.push.apply(_,v);else{_.push(v[0][0]);for(var b=v.length,w=1;w<b;w++)_.push(v[w],v[0][w])}var E=(0,u.w)(function(e,t,n){var r=y&&e.as||l,s="",a=[],m=e;if(null==e.theme){for(var v in m={},e)m[v]=e[v];m.theme=(0,i.useContext)(u.T)}"string"==typeof e.className?s=(0,c.fp)(t.registered,a,e.className):null!=e.className&&(s=e.className+" ");var b=(0,h.O)(_.concat(a),t.registered,m);s+=t.key+"-"+b.name,void 0!==o&&(s+=" "+o);var w=y&&void 0===d?p(r):f,E={};for(var x in e)(!y||"as"!==x)&&w(x)&&(E[x]=e[x]);return E.className=s,E.ref=n,(0,i.createElement)(i.Fragment,null,(0,i.createElement)(g,{cache:t,serialized:b,isStringTag:"string"==typeof r}),(0,i.createElement)(r,E))});return E.displayName=void 0!==r?r:"Styled("+("string"==typeof l?l:l.displayName||l.name||"Component")+")",E.defaultProps=t.defaultProps,E.__emotion_real=E,E.__emotion_base=l,E.__emotion_styles=_,E.__emotion_forwardProp=d,Object.defineProperty(E,"toString",{value:function(){return"."+o}}),E.withComponent=function(t,r){return e(t,(0,s.Z)({},n,r,{shouldForwardProp:m(E,r,!0)})).apply(void 0,_)},E}}).bind();/** @license MUI v5.10.8 3402 * 3403 * This source code is licensed under the MIT license found in the 3404 * LICENSE file in the root directory of this source tree. 3405 */ function v(e,t){let n=y(e,t);return n}["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach(function(e){y[e]=y(e)});let _=(e,t)=>
3405{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}},8377:function(e,t,n){"use strict";var r=n(1354);let i=(0,r.Z)();t.Z=i},5408:function(e,t,n){"use strict";n.d(t,{L7:function(){return l},P$:function(){return c},VO:function(){return i},W8:function(){return a},dt:function(){return u},k9:function(){return o}});var r=n(9766);let i={xs:0,sm:600,md:900,lg:1200,xl:1536},s={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${i[e]}px)`};function o(e,t,n){let r=e.theme||{};if(Array.isArray(t)){let o=r.breakpoints||s;return t.reduce((e,r,i)=>(e[o.up(o.keys[i])]=n(t[i]),e),{})}if("object"==typeof t){let a=r.breakpoints||s;return Object.keys(t).reduce((e,r)=>{if(-1!==Object.keys(a.values||i).indexOf(r)){let s=a.up(r);e[s]=n(t[r],r)}else e[r]=t[r];return e},{})}let l=n(t);return l}function a(e={}){var t;let n=null==(t=e.keys)?void 0:t.reduce((t,n)=>{let r=e.up(n);return t[r]={},t},{});return n||{}}function l(e,t){return e.reduce((e,t)=>{let n=e[t],r=!n||0===Object.keys(n).length;return r&&delete e[t],e},t)}function u(e,...t){let n=a(e),i=[n,...t].reduce((e,t)=>(0,r.Z)(e,t),{});return l(Object.keys(n),i)}function c({values:e,breakpoints:t,base:n}){let r=n||function(e,t){if("object"!=typeof e)return{};let n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((t,r)=>{r<e.length&&(n[t]=!0)}):r.forEach(t=>{null!=e[t]&&(n[t]=!0)}),n}(e,t),i=Object.keys(r);if(0===i.length)return e;let s;return i.reduce((t,n,r)=>(Array.isArray(e)?(t[n]=null!=e[r]?e[r]:e[s],s=r):"object"==typeof e?(t[n]=null!=e[n]?e[n]:e[s],s=n):t[n]=e,t),{})}},1796:function(e,t,n){"use strict";n.d(t,{$n:function(){return h},Fq:function(){return u},_4:function(){return d},_j:function(){return c},mi:function(){return l}});var r=n(1387);function i(e,t=0,n=1){return Math.min(Math.max(t,e),n)}function s(e){if(e.type)return e;if("#"===e.charAt(0))return s(function(e){e=e.slice(1);let t=RegExp(`.{1,${e.length>=6?2:1}}`,"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map(e=>e+e)),n?`rgb${4===n.length?"a":""}(${n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(", ")})`:""}(e));let t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw Error((0,r.Z)(9,e));let i=e.substring(t+1,e.length-1),o;if("color"===n){if(o=(i=i.split(" ")).shift(),4===i.length&&"/"===i[3].charAt(0)&&(i[3]=i[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(o))throw Error((0,r.Z)(10,o))}else i=i.split(",");return i=i.map(e=>parseFloat(e)),{type:n,values:i,colorSpace:o}}function o(e){let{type:t,colorSpace:n}=e,{values:r}=e;return -1!==t.indexOf("rgb")?r=r.map((e,t)=>t<3?parseInt(e,10):e):-1!==t.indexOf("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),`${t}(${r=-1!==t.indexOf("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`})`}function a(e){let t="hsl"===(e=s(e)).type||"hsla"===e.type?s(function(e){e=s(e);let{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,a=r*Math.min(i,1-i),l=(e,t=(e+n/30)%12)=>i-a*Math.max(Math.min(t-3,9-t,1),-1),u="rgb",c=[Math.round(255*l(0)),Math.round(255*l(8)),Math.round(255*l(4))];return"hsla"===e.type&&(u+="a",c.push(t[3])),o({type:u,values:c})}(e)).values:e.values;return Number((.2126*(t=t.map(t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)))[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function l(e,t){let n=a(e),r=a(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function u(e,t){return e=s(e),t=i(t),("rgb"===e.type||"hsl"===e.type)&&(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,o(e)}function c(e,t){if(e=s(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return o(e)}function h(e,t){if(e=s(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return o(e)}function d(e,t=.15){return a(e)>.5?c(e,t):h(e,t)}},1354:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(7462),i=n(3366),s=n(7294),o=n(6010),a=n(9731),l=n(6523),u=n(9707),c=n(9718),h=n(5893);let d=["className","component"];function f(e={}){let{defaultTheme:t,defaultClassName:n="MuiBox-root",generateClassName:f,styleFunctionSx:p=l.Z}=e,m=(0,a.ZP)("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(p),g=s.forwardRef(function(e,s){let a=(0,c.Z)(t),l=(0,u.Z)(e),{className:p,component:g="div"}=l,y=(0,i.Z)(l,d);return(0,h.jsx)(m,(0,r.Z)({as:g,ref:s,className:(0,o.Z)(p,f?f(n):n),theme:a},y))});return g}},182:function(e,t,n){"use strict";n.d(t,{ZP:function(){return w},x9:function(){return _}});var r=n(3366),i=n(7462),s=n(9731),o=n(6500),a=n(8320);let l=["variant"];function u(e){return 0===e.length}function c(e){let{variant:t}=e,n=(0,r.Z)(e,l),i=t||"";
3405return Object.keys(n).sort().forEach(t=>{"color"===t?i+=u(i)?e[t]:(0,a.Z)(e[t]):i+=`${u(i)?t:(0,a.Z)(t)}${(0,a.Z)(e[t].toString())}`}),i}var h=n(6523);let d=["name","slot","skipVariantsResolver","skipSx","overridesResolver"],f=["theme"],p=["theme"];function m(e){return 0===Object.keys(e).length}let g=(e,t)=>t.components&&t.components[e]&&t.components[e].styleOverrides?t.components[e].styleOverrides:null,y=(e,t)=>{let n=[];t&&t.components&&t.components[e]&&t.components[e].variants&&(n=t.components[e].variants);let r={};return n.forEach(e=>{let t=c(e.props);r[t]=e.style}),r},v=(e,t,n,r)=>{var i,s;let{ownerState:o={}}=e,a=[],l=null==n?void 0:null==(i=n.components)?void 0:null==(s=i[r])?void 0:s.variants;return l&&l.forEach(n=>{let r=!0;Object.keys(n.props).forEach(t=>{o[t]!==n.props[t]&&e[t]!==n.props[t]&&(r=!1)}),r&&a.push(t[c(n.props)])}),a};function _(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}let b=(0,o.Z)();function w(e={}){let{defaultTheme:t=b,rootShouldForwardProp:n=_,slotShouldForwardProp:o=_,styleFunctionSx:a=h.Z}=e,l=e=>{let n=m(e.theme)?t:e.theme;return a((0,i.Z)({},e,{theme:n}))};return l.__mui_systemSx=!0,(e,a={})=>{(0,s.Co)(e,e=>e.filter(e=>!(null!=e&&e.__mui_systemSx)));let{name:u,slot:c,skipVariantsResolver:h,skipSx:b,overridesResolver:w}=a,E=(0,r.Z)(a,d),x=void 0!==h?h:c&&"Root"!==c||!1,S=b||!1,T,I=_;if("Root"===c)I=n;else if(c)I=o;else{var k;"string"==typeof e&&e.charCodeAt(0)>96&&(I=void 0)}let C=(0,s.ZP)(e,(0,i.Z)({shouldForwardProp:I,label:T},E)),R=(e,...n)=>{let s=n?n.map(e=>"function"==typeof e&&e.__emotion_real!==e?n=>{let{theme:s}=n,o=(0,r.Z)(n,f);return e((0,i.Z)({theme:m(s)?t:s},o))}:e):[],o=e;u&&w&&s.push(e=>{let n=m(e.theme)?t:e.theme,r=g(u,n);if(r){let s={};return Object.entries(r).forEach(([t,r])=>{s[t]="function"==typeof r?r((0,i.Z)({},e,{theme:n})):r}),w(e,s)}return null}),u&&!x&&s.push(e=>{let n=m(e.theme)?t:e.theme;return v(e,y(u,n),n,u)}),S||s.push(l);let a=s.length-n.length;if(Array.isArray(e)&&a>0){let c=Array(a).fill("");(o=[...e,...c]).raw=[...e.raw,...c]}else"function"==typeof e&&e.__emotion_real!==e&&(o=n=>{let{theme:s}=n,o=(0,r.Z)(n,p);return e((0,i.Z)({theme:m(s)?t:s},o))});let h=C(o,...s);return h};return C.withConfig&&(R.withConfig=C.withConfig),R}}},6500:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(7462),i=n(3366),s=n(9766);let o=["values","unit","step"],a=e=>{let t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>(0,r.Z)({},e,{[t.key]:t.val}),{})};var l={borderRadius:4},u=n(8700);let c=["breakpoints","palette","spacing","shape"];var h=function(e={},...t){let{breakpoints:n={},palette:h={},spacing:d,shape:f={}}=e,p=(0,i.Z)(e,c),m=function(e){let{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:s=5}=e,l=(0,i.Z)(e,o),u=a(t),c=Object.keys(u);function h(e){let r="number"==typeof t[e]?t[e]:e;return`@media (min-width:${r}${n})`}function d(e){let r="number"==typeof t[e]?t[e]:e;return`@media (max-width:${r-s/100}${n})`}function f(e,r){let i=c.indexOf(r);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==i&&"number"==typeof t[c[i]]?t[c[i]]:r)-s/100}${n})`}return(0,r.Z)({keys:c,values:u,up:h,down:d,between:f,only:function(e){return c.indexOf(e)+1<c.length?f(e,c[c.indexOf(e)+1]):h(e)},not:function(e){let t=c.indexOf(e);return 0===t?h(c[1]):t===c.length-1?d(c[t]):f(e,c[c.indexOf(e)+1]).replace("@media","@media not all and")},unit:n},l)}(n),g=function(e=8){if(e.mui)return e;let t=(0,u.hB)({spacing:e}),n=(...e)=>{let n=0===e.length?[1]:e;return n.map(e=>{let n=t(e);return"number"==typeof n?`${n}px`:n}).join(" ")};return n.mui=!0,n}(d),y=(0,s.Z)({breakpoints:m,direction:"ltr",components:{},palette:(0,r.Z)({mode:"light"},h),spacing:g,shape:(0,r.Z)({},l,f)},p);return t.reduce((e,t)=>(0,s.Z)(e,t),y)}},5578:function(e,t,n){"use strict";n.d(t,{Gc:function(){return eF},G$:function(){return eP}});var r=n(4844),i=n(7730),s=function(...e){let t=e.reduce((e,t)=>(t.filterProps.forEach(n=>{e[n]=t}),e),{}),n=e=>Object.keys(e).reduce((n,r)=>t[r]?(0,i.Z)(n,t[r](e)):n,{});return n.propTypes={},n.filterProps=e.reduce((e,t)=>
3405e.concat(t.filterProps),[]),n},o=n(8700),a=n(5408);function l(e){return"number"!=typeof e?e:`${e}px solid`}let u=(0,r.Z)({prop:"border",themeKey:"borders",transform:l}),c=(0,r.Z)({prop:"borderTop",themeKey:"borders",transform:l}),h=(0,r.Z)({prop:"borderRight",themeKey:"borders",transform:l}),d=(0,r.Z)({prop:"borderBottom",themeKey:"borders",transform:l}),f=(0,r.Z)({prop:"borderLeft",themeKey:"borders",transform:l}),p=(0,r.Z)({prop:"borderColor",themeKey:"palette"}),m=(0,r.Z)({prop:"borderTopColor",themeKey:"palette"}),g=(0,r.Z)({prop:"borderRightColor",themeKey:"palette"}),y=(0,r.Z)({prop:"borderBottomColor",themeKey:"palette"}),v=(0,r.Z)({prop:"borderLeftColor",themeKey:"palette"}),_=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){let t=(0,o.eI)(e.theme,"shape.borderRadius",4,"borderRadius"),n=e=>({borderRadius:(0,o.NA)(t,e)});return(0,a.k9)(e,e.borderRadius,n)}return null};_.propTypes={},_.filterProps=["borderRadius"];let b=s(u,c,h,d,f,p,m,g,y,v,_),w=(0,r.Z)({prop:"displayPrint",cssProperty:!1,transform:e=>({"@media print":{display:e}})}),E=(0,r.Z)({prop:"display"}),x=(0,r.Z)({prop:"overflow"}),S=(0,r.Z)({prop:"textOverflow"}),T=(0,r.Z)({prop:"visibility"}),I=(0,r.Z)({prop:"whiteSpace"});var k=s(w,E,x,S,T,I);let C=(0,r.Z)({prop:"flexBasis"}),R=(0,r.Z)({prop:"flexDirection"}),A=(0,r.Z)({prop:"flexWrap"}),O=(0,r.Z)({prop:"justifyContent"}),D=(0,r.Z)({prop:"alignItems"}),N=(0,r.Z)({prop:"alignContent"}),P=(0,r.Z)({prop:"order"}),F=(0,r.Z)({prop:"flex"}),M=(0,r.Z)({prop:"flexGrow"}),L=(0,r.Z)({prop:"flexShrink"}),j=(0,r.Z)({prop:"alignSelf"}),U=(0,r.Z)({prop:"justifyItems"}),B=(0,r.Z)({prop:"justifySelf"}),Z=s(C,R,A,O,D,N,P,F,M,L,j,U,B),$=e=>{if(void 0!==e.gap&&null!==e.gap){let t=(0,o.eI)(e.theme,"spacing",8,"gap"),n=e=>({gap:(0,o.NA)(t,e)});return(0,a.k9)(e,e.gap,n)}return null};$.propTypes={},$.filterProps=["gap"];let V=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){let t=(0,o.eI)(e.theme,"spacing",8,"columnGap"),n=e=>({columnGap:(0,o.NA)(t,e)});return(0,a.k9)(e,e.columnGap,n)}return null};V.propTypes={},V.filterProps=["columnGap"];let z=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){let t=(0,o.eI)(e.theme,"spacing",8,"rowGap"),n=e=>({rowGap:(0,o.NA)(t,e)});return(0,a.k9)(e,e.rowGap,n)}return null};z.propTypes={},z.filterProps=["rowGap"];let q=(0,r.Z)({prop:"gridColumn"}),G=(0,r.Z)({prop:"gridRow"}),W=(0,r.Z)({prop:"gridAutoFlow"}),H=(0,r.Z)({prop:"gridAutoColumns"}),K=(0,r.Z)({prop:"gridAutoRows"}),Y=(0,r.Z)({prop:"gridTemplateColumns"}),Q=(0,r.Z)({prop:"gridTemplateRows"}),X=(0,r.Z)({prop:"gridTemplateAreas"}),J=(0,r.Z)({prop:"gridArea"}),ee=s($,V,z,q,G,W,H,K,Y,Q,X,J),et=(0,r.Z)({prop:"position"}),en=(0,r.Z)({prop:"zIndex",themeKey:"zIndex"}),er=(0,r.Z)({prop:"top"}),ei=(0,r.Z)({prop:"right"}),es=(0,r.Z)({prop:"bottom"}),eo=(0,r.Z)({prop:"left"});var ea=s(et,en,er,ei,es,eo);function el(e,t){return"grey"===t?t:e}let eu=(0,r.Z)({prop:"color",themeKey:"palette",transform:el}),ec=(0,r.Z)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:el}),eh=(0,r.Z)({prop:"backgroundColor",themeKey:"palette",transform:el}),ed=s(eu,ec,eh),ef=(0,r.Z)({prop:"boxShadow",themeKey:"shadows"});function ep(e){return e<=1&&0!==e?`${100*e}%`:e}let em=(0,r.Z)({prop:"width",transform:ep}),eg=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){let t=t=>{var n,r,i;let s=(null==(n=e.theme)?void 0:null==(r=n.breakpoints)?void 0:null==(i=r.values)?void 0:i[t])||a.VO[t];return{maxWidth:s||ep(t)}};return(0,a.k9)(e,e.maxWidth,t)}return null};eg.filterProps=["maxWidth"];let ey=(0,r.Z)({prop:"minWidth",transform:ep}),ev=(0,r.Z)({prop:"height",transform:ep}),e_=(0,r.Z)({prop:"maxHeight",transform:ep}),eb=(0,r.Z)({prop:"minHeight",transform:ep});(0,r.Z)({prop:"size",cssProperty:"width",transform:ep}),(0,r.Z)({prop:"size",cssProperty:"height",transform:ep});let ew=(0,r.Z)({prop:"boxSizing"}),eE=s(em,eg,ey,ev,e_,eb,ew),ex=(0,r.Z)({prop:"fontFamily",themeKey:"typography"}),eS=(0,r.Z)({prop:"fontSize",themeKey:"typography"}),eT=(0,r.Z)({prop:"fontStyle",themeKey:"typography"}),eI=(0,r.Z)({prop:"fontWeight",themeKey:"typography"}),ek=(0,r.Z)({prop:"letterSpacing"}),eC=(0,r.Z)({prop:"textTransform"}),eR=(0,r.Z)({prop:"lineHeight"}),eA=(0,r.Z)({prop:"textAlign"}),eO=(0,r.Z)({prop:"typography",cssProperty:!1,themeKey:"typography"}),eD=s(eO,ex,eS,eT,eI,ek,eR,eA,eC),eN={borders:b.filterProps,display:k.filterProps,flexbox:Z.filterProps,grid:ee.filterProps,positions:ea.filterProps,palette:ed.filterProps,shadows:ef.filterProps,sizing:eE.filterProps,spacing:o.ZP.filterProps,typography:eD.filterProps},eP={borders:b,display:k,flexbox:Z,grid:ee,positions:ea,palette:ed,shadows:ef,sizing:eE,spacing:o.ZP,typography:eD}
3405,eF=Object.keys(eN).reduce((e,t)=>(eN[t].forEach(n=>{e[n]=eP[t]}),e),{})},7730:function(e,t,n){"use strict";var r=n(9766);t.Z=function(e,t){return t?(0,r.Z)(e,t,{clone:!1}):e}},8700:function(e,t,n){"use strict";n.d(t,{hB:function(){return p},eI:function(){return f},ZP:function(){return b},NA:function(){return m}});var r=n(5408),i=n(4844),s=n(7730);let o={m:"margin",p:"padding"},a={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},l={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},u=function(e){let t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}(e=>{if(e.length>2){if(!l[e])return[e];e=l[e]}let[t,n]=e.split(""),r=o[t],i=a[n]||"";return Array.isArray(i)?i.map(e=>r+e):[r+i]}),c=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],h=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],d=[...c,...h];function f(e,t,n,r){var s;let o=null!=(s=(0,i.D)(e,t,!1))?s:n;return"number"==typeof o?e=>"string"==typeof e?e:o*e:Array.isArray(o)?e=>"string"==typeof e?e:o[e]:"function"==typeof o?o:()=>void 0}function p(e){return f(e,"spacing",8,"spacing")}function m(e,t){if("string"==typeof t||null==t)return t;let n=e(Math.abs(t));return t>=0?n:"number"==typeof n?-n:`-${n}`}function g(e,t){let n=p(e.theme);return Object.keys(e).map(i=>(function(e,t,n,i){var s,o;if(-1===t.indexOf(n))return null;let a=u(n),l=e=>a.reduce((t,n)=>(t[n]=m(i,e),t),{}),c=e[n];return(0,r.k9)(e,c,l)})(e,t,i,n)).reduce(s.Z,{})}function y(e){return g(e,c)}function v(e){return g(e,h)}function _(e){return g(e,d)}y.propTypes={},y.filterProps=c,v.propTypes={},v.filterProps=h,_.propTypes={},_.filterProps=d;var b=_},4844:function(e,t,n){"use strict";n.d(t,{D:function(){return s}});var r=n(8320),i=n(5408);function s(e,t,n=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&n){let r=`vars.${t}`.split(".").reduce((e,t)=>e&&e[t]?e[t]:null,e);if(null!=r)return r}return t.split(".").reduce((e,t)=>e&&null!=e[t]?e[t]:null,e)}function o(e,t,n,r=n){let i;return i="function"==typeof e?e(n):Array.isArray(e)?e[n]||r:s(e,n)||r,t&&(i=t(i,r)),i}t.Z=function(e){let{prop:t,cssProperty:n=e.prop,themeKey:a,transform:l}=e,u=e=>{if(null==e[t])return null;let u=e[t],c=e.theme,h=s(c,a)||{},d=e=>{let i=o(h,l,e);return(e===i&&"string"==typeof e&&(i=o(h,l,`${t}${"default"===e?"":(0,r.Z)(e)}`,e)),!1===n)?i:{[n]:i}};return(0,i.k9)(e,u,d)};return u.propTypes={},u.filterProps=[t],u}},9707:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(7462),i=n(3366),s=n(9766),o=n(5578);let a=["sx"],l=e=>{let t={systemProps:{},otherProps:{}};return Object.keys(e).forEach(n=>{o.Gc[n]?t.systemProps[n]=e[n]:t.otherProps[n]=e[n]}),t};function u(e){let{sx:t}=e,n=(0,i.Z)(e,a),{systemProps:o,otherProps:u}=l(n),c;return c=Array.isArray(t)?[o,...t]:"function"==typeof t?(...e)=>{let n=t(...e);return(0,s.P)(n)?(0,r.Z)({},o,n):o}:(0,r.Z)({},o,t),(0,r.Z)({},u,{sx:c})}},6523:function(e,t,n){"use strict";var r=n(7730),i=n(5578),s=n(5408);let o=function(e=i.G$){let t=Object.keys(e).reduce((t,n)=>(e[n].filterProps.forEach(r=>{t[r]=e[n]}),t),{});function n(e,n,r){let i=t[e];return i?i({[e]:n,theme:r}):{[e]:n}}return function e(i){let{sx:o,theme:a={}}=i||{};if(!o)return null;function l(i){let o=i;if("function"==typeof i)o=i(a);else if("object"!=typeof i)return i;if(!o)return null;let l=(0,s.W8)(a.breakpoints),u=Object.keys(l),c=l;return Object.keys(o).forEach(i=>{var l,u;let h="function"==typeof(l=o[i])?l(a):l;if(null!=h){if("object"==typeof h){if(t[i])c=(0,r.Z)(c,n(i,h,a));else{let d=(0,s.k9)({theme:a},h,e=>({[i]:e}));(function(...e){let t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]),n=new Set(t);return e.every(e=>n.size===Object.keys(e).length)})(d,h)?c[i]=e({sx:h,theme:a}):c=(0,r.Z)(c,d)}}else c=(0,r.Z)(c,n(i,h,a))}}),(0,s.L7)(u,c)}return Array.isArray(o)?o.map(l):l(o)}}();o.filterProps=["sx"],t.Z=o},9718:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(6500),i=n(6760),s=function(e=null){var t;let n=(0,i.Z)();return n&&0!==Object.keys(n).length?n:e};let o=(0,r.Z)();function a(e=o){return s(e)}var l=a},5149:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(7925),i=n(9718);function s({props:e,name:t,defaultTheme:n}){let s=(0,i.Z)(n),o=function(e){let{theme:t,name:n,props:i}=e;return t&&t.components&&t.components[n]&&t.components[n].defaultProps?(0,r.Z)(t.components[n].defaultProps,i):i}({theme:s,name:t,props:e});return o}},7078:function(e,t){"use strict";let n=e=>e,r,i=(r=n,{configure(e){r=e},generate:e=>r(e),reset(){r=n}});t.Z=i},8320:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(1387);function i(e){if("string"!=typeof e)throw Error((0,r.Z)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},4780:function(e,t,n){"use strict";function r(e,t,n){let r={};return Object.keys(e).forEach(i=>
3405{r[i]=e[i].reduce((e,r)=>(r&&(e.push(t(r)),n&&n[r]&&e.push(n[r])),e),[]).join(" ")}),r}n.d(t,{Z:function(){return r}})},9064:function(e,t,n){"use strict";function r(...e){return e.reduce((e,t)=>null==t?e:function(...n){e.apply(this,n),t.apply(this,n)},()=>{})}n.d(t,{Z:function(){return r}})},7596:function(e,t,n){"use strict";function r(e,t=166){let n;function r(...r){let i=()=>{e.apply(this,r)};clearTimeout(n),n=setTimeout(i,t)}return r.clear=()=>{clearTimeout(n)},r}n.d(t,{Z:function(){return r}})},9766:function(e,t,n){"use strict";n.d(t,{P:function(){return i},Z:function(){return function e(t,n,s={clone:!0}){let o=s.clone?(0,r.Z)({},t):t;return i(t)&&i(n)&&Object.keys(n).forEach(r=>{"__proto__"!==r&&(i(n[r])&&r in t&&i(t[r])?o[r]=e(t[r],n[r],s):o[r]=n[r])}),o}}});var r=n(7462);function i(e){return null!==e&&"object"==typeof e&&e.constructor===Object}},1387:function(e,t,n){"use strict";function r(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}n.d(t,{Z:function(){return r}})},4867:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(7078);let i={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",required:"required",selected:"selected"};function s(e,t,n="Mui"){let s=i[t];return s?`${n}-${s}`:`${r.Z.generate(e)}-${t}`}},1588:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(4867);function i(e,t,n="Mui"){let i={};return t.forEach(t=>{i[t]=(0,r.Z)(e,t,n)}),i}},5806:function(e,t,n){"use strict";function r(e){let t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}n.d(t,{Z:function(){return r}})},7094:function(e,t,n){"use strict";function r(e){return e&&e.ownerDocument||document}n.d(t,{Z:function(){return r}})},8290:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(7094);function i(e){let t=(0,r.Z)(e);return t.defaultView||window}},7925:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(7462);function i(e,t){let n=(0,r.Z)({},t);return Object.keys(e).forEach(t=>{void 0===n[t]&&(n[t]=e[t])}),n}},7960:function(e,t,n){"use strict";function r(e,t){"function"==typeof e?e(t):e&&(e.current=t)}n.d(t,{Z:function(){return r}})},6600:function(e,t,n){"use strict";var r=n(7294);let i="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;t.Z=i},3633:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(7294),i=n(6600);function s(e){let t=r.useRef(e);return(0,i.Z)(()=>{t.current=e}),r.useCallback((...e)=>(0,t.current)(...e),[])}},67:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(7294),i=n(7960);function s(...e){return r.useMemo(()=>e.every(e=>null==e)?null:t=>{e.forEach(e=>{(0,i.Z)(e,t)})},e)}},7579:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r,i=n(7294);let s=0,o=(r||(r=n.t(i,2))).useId;function a(e){if(void 0!==o){let t=o();return null!=e?e:t}return function(e){let[t,n]=i.useState(e);return i.useEffect(()=>{null==t&&n(`mui-${s+=1}`)},[t]),e||t}(e)}},4487:function(e,t,n){"use strict";n.d(t,{$e:function(){return o},Tb:function(){return i},e:function(){return s}});var r=n(5659);function i(e,t){return(0,r.Gd)().captureException(e,{captureContext:t})}function s(e){(0,r.Gd)().configureScope(e)}function o(e){(0,r.Gd)().withScope(e)}},5659:function(e,t,n){"use strict";n.d(t,{Gd:function(){return f},cu:function(){return h}});var r=n(2844),i=n(1170),s=n(2343),o=n(1235),a=n(2448),l=n(350),u=n(9015);class c{__init(){this._stack=[{}]}constructor(e,t=new l.s,n=4){this._version=n,c.prototype.__init.call(this),this.getStackTop().scope=t,e&&this.bindClient(e)}isOlderThan(e){return this._version<e}bindClient(e){let t=this.getStackTop();t.client=e,e&&e.setupIntegrations&&e.setupIntegrations()}pushScope(){let e=l.s.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:e}),e}popScope(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}withScope(e){let t=this.pushScope();try{e(t)}finally{this.popScope()}}
3405getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(e,t){let n=this._lastEventId=t&&t.event_id?t.event_id:(0,r.DM)(),i=Error("Sentry syntheticException");return this._withClient((r,s)=>{r.captureException(e,{originalException:e,syntheticException:i,...t,event_id:n},s)}),n}captureMessage(e,t,n){let i=this._lastEventId=n&&n.event_id?n.event_id:(0,r.DM)(),s=Error(e);return this._withClient((r,o)=>{r.captureMessage(e,t,{originalException:e,syntheticException:s,...n,event_id:i},o)}),i}captureEvent(e,t){let n=t&&t.event_id?t.event_id:(0,r.DM)();return"transaction"!==e.type&&(this._lastEventId=n),this._withClient((r,i)=>{r.captureEvent(e,{...t,event_id:n},i)}),n}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){let{scope:n,client:r}=this.getStackTop();if(!n||!r)return;let{beforeBreadcrumb:o=null,maxBreadcrumbs:a=100}=r.getOptions&&r.getOptions()||{};if(a<=0)return;let l=(0,i.yW)(),u={timestamp:l,...e},c=o?(0,s.Cf)(()=>o(u,t)):u;null!==c&&n.addBreadcrumb(c,a)}setUser(e){let t=this.getScope();t&&t.setUser(e)}setTags(e){let t=this.getScope();t&&t.setTags(e)}setExtras(e){let t=this.getScope();t&&t.setExtras(e)}setTag(e,t){let n=this.getScope();n&&n.setTag(e,t)}setExtra(e,t){let n=this.getScope();n&&n.setExtra(e,t)}setContext(e,t){let n=this.getScope();n&&n.setContext(e,t)}configureScope(e){let{scope:t,client:n}=this.getStackTop();t&&n&&e(t)}run(e){let t=d(this);try{e(this)}finally{d(t)}}getIntegration(e){let t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(n){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,t){return this._callExtensionMethod("startTransaction",e,t)}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){let e=this.getStackTop(),t=e&&e.scope,n=t&&t.getSession();n&&(0,u.RJ)(n),this._sendSessionUpdate(),t&&t.setSession()}startSession(e){let{scope:t,client:n}=this.getStackTop(),{release:r,environment:i}=n&&n.getOptions()||{},{userAgent:s}=o.n2.navigator||{},a=(0,u.Hv)({release:r,environment:i,...t&&{user:t.getUser()},...s&&{userAgent:s},...e});if(t){let l=t.getSession&&t.getSession();l&&"ok"===l.status&&(0,u.CT)(l,{status:"exited"}),this.endSession(),t.setSession(a)}return a}shouldSendDefaultPii(){let e=this.getClient(),t=e&&e.getOptions();return Boolean(t&&t.sendDefaultPii)}_sendSessionUpdate(){let{scope:e,client:t}=this.getStackTop();if(!e)return;let n=e.getSession();n&&t&&t.captureSession&&t.captureSession(n)}_withClient(e){let{scope:t,client:n}=this.getStackTop();n&&e(n,t)}_callExtensionMethod(e,...t){let n=h(),r=n.__SENTRY__;if(r&&r.extensions&&"function"==typeof r.extensions[e])return r.extensions[e].apply(this,t);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.warn(`Extension method ${e} couldn't be found, doing nothing.`)}}function h(){return o.n2.__SENTRY__=o.n2.__SENTRY__||{extensions:{},hub:void 0},o.n2}function d(e){let t=h(),n=m(t);return g(t,e),n}function f(){let e=h();return((!p(e)||m(e).isOlderThan(4))&&g(e,new c),(0,a.KV)())?function(e){try{let t=h().__SENTRY__,n=t&&t.extensions&&t.extensions.domain&&t.extensions.domain.active;if(!n)return m(e);if(!p(n)||m(n).isOlderThan(4)){let r=m(e).getStackTop();g(n,new c(r.client,l.s.clone(r.scope)))}return m(n)}catch(i){return m(e)}}(e):m(e)}function p(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function m(e){return(0,o.YO)("hub",()=>new c,e)}function g(e,t){if(!e)return!1;let n=e.__SENTRY__=e.__SENTRY__||{};return n.hub=t,!0}},350:function(e,t,n){"use strict";n.d(t,{c:function(){return d},s:function(){return c}});var r=n(7597),i=n(1170),s=n(6893),o=n(2343),a=n(2844),l=n(1235),u=n(9015);class c{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(e){let t=new c;return e&&(t._breadcrumbs=[...e._breadcrumbs],t._tags={...e._tags},t._extra={...e._extra},t._contexts={...e._contexts},t._user=e._user,t._level=e._level,t._span=e._span,t._session=e._session,t._transactionName=e._transactionName,t._fingerprint=e._fingerprint,t._eventProcessors=[...e._eventProcessors],t._requestSession=e._requestSession,t._attachments=[...e._attachments]),t}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{},this._session&&(0,u.CT)(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){let e=this.getSpan();return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;if("function"==typeof e){let t=e(this);return t instanceof c?t:this}return e instanceof c?(this._tags={...this._tags,...e._tags},this._extra={...this._extra,...e._extra},this._contexts={...this._contexts,...e._contexts},e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession)):(0,r.PO)(e)&&(this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(e,t){let n="number"==typeof t?t:100;if(n<=0)return this;let r={timestamp:(0,i.yW)(),...e};return this._breadcrumbs=[...this._breadcrumbs,r].slice(-n),this._notifyScopeListeners(),this}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(e,t={}){if(this._extra&&Object.keys(this._extra).length&&(e.extra={...this._extra,...e.extra}),this._tags&&Object.keys(this._tags).length&&(e.tags={...this._tags,...e.tags}),this._user&&Object.keys(this._user).length&&(e.user={...this._user,...e.user}),this._contexts&&Object.keys(this._contexts).length&&(e.contexts={...this._contexts,...e.contexts}),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts={trace:this._span.getTraceContext(),...e.contexts};let n=this._span.transaction&&this._span.transaction.name;n&&(e.tags={transaction:n,...e.tags})}return this._applyFingerprint(e),e.breadcrumbs=[...e.breadcrumbs||[],...this._breadcrumbs],e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([...h(),...this._eventProcessors],e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}_notifyEventProcessors(e,t,n,i=0){return new s.cW((s,a)=>{let l=e[i];if(null===t||"function"!=typeof l)s(t);else{let u=l({...t},n);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&l.id&&null===u&&o.kg.log(`Event processor "${l.id}" dropped event`),(0,r.J8)(u)?u.then(t=>this._notifyEventProcessors(e,t,n,i+1).then(s)).then(null,a):this._notifyEventProcessors(e,u,n,i+1).then(s).then(null,a)}})}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEac
3405h(e=>{e(this)}),this._notifyingListeners=!1)}_applyFingerprint(e){e.fingerprint=e.fingerprint?(0,a.lE)(e.fingerprint):[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}}function h(){return(0,l.YO)("globalEventProcessors",()=>[])}function d(e){h().push(e)}},9015:function(e,t,n){"use strict";n.d(t,{CT:function(){return a},Hv:function(){return o},RJ:function(){return l}});var r=n(1170),i=n(2844),s=n(535);function o(e){let t=(0,r.ph)(),n={sid:(0,i.DM)(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON(){var e;return e=n,(0,s.Jr)({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}};return e&&a(n,e),n}function a(e,t={}){if(!t.user||(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||(0,r.ph)(),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:(0,i.DM)()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{let n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function l(e,t){let n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),a(e,n)}},2758:function(e,t,n){"use strict";n.d(t,{ro:function(){return g},lb:function(){return m}});var r=n(5659),i=n(2343),s=n(7597),o=n(2448),a=n(9732),l=n(3233);function u(){let e=(0,l.x1)();if(e){let t="internal_error";("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.kg.log(`[Tracing] Transaction: ${t} -> Global error occured`),e.setStatus(t)}}var c=n(6458),h=n(3391);function d(){let e=this.getScope();if(e){let t=e.getSpan();if(t)return{"sentry-trace":t.toTraceparent()}}return{}}function f(e,t,n){var r;if(!(0,l.zu)(t))return e.sampled=!1,e;if(void 0!==e.sampled)return e.setMetadata({sampleRate:Number(e.sampled)}),e;let o;return("function"==typeof t.tracesSampler?(o=t.tracesSampler(n),e.setMetadata({sampleRate:Number(o)})):void 0!==n.parentSampled?o=n.parentSampled:(o=t.tracesSampleRate,e.setMetadata({sampleRate:Number(o)})),r=o,(0,s.i2)(r)||!("number"==typeof r||"boolean"==typeof r)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.kg.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(r)} of type ${JSON.stringify(typeof r)}.`),1):(r<0||r>1)&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.kg.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${r}.`),1))?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.kg.warn("[Tracing] Discarding transaction because of invalid sample rate."),e.sampled=!1,e):o?(e.sampled=Math.random()<o,e.sampled)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.kg.log(`[Tracing] starting ${e.op} transaction - ${e.name}`),e):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.kg.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(o)})`),e):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.kg.log(`[Tracing] Discarding transaction because ${"function"==typeof t.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),e.sampled=!1,e)}function p(e,t){let n=this.getClient(),r=n&&n.getOptions()||{},s=r.instrumenter||"sentry",o=e.instrumenter||"sentry";s!==o&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.kg.error(`A transaction was started with instrumenter=\`${o}\`, but the SDK is configured with the \`${s}\` instrumenter. 3406The transaction will not be sampled. Please use the ${s} instrumentation to start transactions.`),e.sampled=!1);let a=new h.Y(e,this);return(a=f(a,r,{parentSampled:e.parentSampled,transactionContext:e,...t})).sampled&&a.initSpanRecorder(r._experiments&&r._experiments.maxSpans),a}function m(e,t,n,r,i,s,o){let a=e.getClient(),l=a&&a.getOptions()||{},u=new c.io(t,e,n,r,o,i);return(u=f(u,l,{parentSampled:t.parentSampled,transactionContext:t,...s})).sampled&&u.initSpanRecorder(l._experiments&&l._experiments.maxSpans),u}function g(){!function(){let e=(0,r.cu)();e.__SENTRY__&&(e.__SENTRY__.extensions=e.__SENTRY__.extensions||{},e.__SENTRY__.extensions.startTransaction||(e.__SENTRY__.extensions.startTransaction=p),e.__SENTRY__.extensions.traceHeaders||(e.__SENTRY__.extensions.traceHeaders=d))}(),(0,o.KV)()&&function(){let t=(0,r.cu)();if(!t.__SENTRY__)return;let n={mongodb(){let t=(0,o.l$)(e,"./integrations/node/mongo");return new t.Mongo},mongoose(){let t=(0,o.l$)(e,"./integrations/node/mongo");return new t.Mongo({mongoose:!0})},mysql(){let t=(0,o.l$)(e,"./integrations/node/mysql");return new t.Mysql},pg(){let t=(0,o.l$)(e,"./integrations/node/postgres");return new t.Postgres}},i=Object.keys(n).filter(e=>!!(0,o.$y)(e)).map(e=>{try{return n[e]()}catch(t){return}}).filter(e=>e);i.length>0&&(t.__SENTRY__.integrations=[...t.__SENTRY__.integrations||[],...i])}(),(0,a.o)("error",u),(0,a.o)("unhandledrejection",u)}e=n.hmd(e)},6458:function(e,t,n){"use strict";n.d(t,{hd:function(){return u},io:function(){return h},mg:function(){return l},nT:function(){return a}});var r=n(1170),i=n(2343),s=n(5334),o=n(3391);let a=1e3,l=3e4,u=5e3;class c extends s.gB{constructor(e,t,n,r){super(r),this._pushActivity=e,this._popActivity=t,this.transactionSpanId=n}add(e){e.spanId!==this.transactionSpanId&&(e.finish=t=>{e.endTimestamp="number"==typeof t?t:(0,r._I)(),this._popActivity(e.spanId)},void 0===e.endTimestamp&&this._pushActivity(e.spanId)),super.add(e)}}class h extends o.Y{__init(){this.activities={}}__init2(){this._heartbeatCounter=0}__init3(){this._finished=!1}__init4(){this._beforeFinishCallbacks=[]}constructor(e,t,n=a,r=l,s=u,o=!1){super(e,t),this._idleHub=t,this._idleTimeout=n,this._finalTimeout=r,this._heartbeatInterval=s,this._onScope=o,h.prototype.__init.call(this),h.prototype.__init2.call(this),h.prototype.__init3.call(this),h.prototype.__init4.call(this),o&&(d(t),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.kg.log(`Setting idle transaction on scope. Span ID: ${this.spanId}`),t.configureScope(e=>e.setSpan(this))),this._startIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this.finish())},this._finalTimeout)}finish(e=(0,r._I)()){if(this._finished=!0,this.activities={},this.spanRecorder){for(let t of(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.kg.log("[Tracing] finishing IdleTransaction",new Date(1e3*e).toISOString(),this.op),this._beforeFinishCallbacks))t(this,e);this.spanRecorder.spans=this.spanRecorder.spans.filter(t=>{if(t.spanId===this.spanId)return!0;!t.endTimestamp&&(t.endTimestamp=e,t.setStatus("cancelled"),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.kg.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(t,void 0,2)));let n=t.startTimestamp<e;return!n&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.kg.log("[Tracing] discarding Span since it happened after Transaction was finished",JSON.stringify(t,void 0,2)),n}),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.kg.log("[Tracing] flushing IdleTransaction")}else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.kg.log("[Tracing] No active IdleTransaction");return this._onScope&&d(this._idleHub),super.finish(e)}registerBeforeFinishCallback(e){this._beforeFinishCallbacks.push(e)}initSpanRecorder(e){if(!this.spanRecorder){let t=e=>{!this._finished&&this._pushActivity(e)},n=e=>{!this._finished&&this._popActivity(e)};this.spanRecorder=new c(t,n,this.spanId,e),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.kg.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}_cancelIdleTimeout(){this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0)}_startIdleTimeout(e){this._cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{this._finished||0!==Object.keys(this.activities).length||this.finish(e)},this._idleTimeout)}
3406_pushActivity(e){this._cancelIdleTimeout(),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.kg.log(`[Tracing] pushActivity: ${e}`),this.activities[e]=!0,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.kg.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(e){if(this.activities[e]&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.kg.log(`[Tracing] popActivity ${e}`),delete this.activities[e],("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.kg.log("[Tracing] new activities count",Object.keys(this.activities).length)),0===Object.keys(this.activities).length){let t=(0,r._I)()+this._idleTimeout/1e3;this._startIdleTimeout(t)}}_beat(){if(this._finished)return;let e=Object.keys(this.activities).join("");e===this._prevHeartbeatString?this._heartbeatCounter+=1:this._heartbeatCounter=1,this._prevHeartbeatString=e,this._heartbeatCounter>=3?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.kg.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this.finish()):this._pingHeartbeat()}_pingHeartbeat(){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.kg.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout(()=>{this._beat()},this._heartbeatInterval)}}function d(e){let t=e.getScope();if(t){let n=t.getTransaction();n&&t.setSpan(void 0)}}},5334:function(e,t,n){"use strict";n.d(t,{Dr:function(){return u},gB:function(){return l}});var r=n(5375),i=n(2844),s=n(1170),o=n(2343),a=n(535);class l{__init(){this.spans=[]}constructor(e=1e3){l.prototype.__init.call(this),this._maxlen=e}add(e){this.spans.length>this._maxlen?e.spanRecorder=void 0:this.spans.push(e)}}class u{__init2(){this.traceId=(0,i.DM)()}__init3(){this.spanId=(0,i.DM)().substring(16)}__init4(){this.startTimestamp=(0,s._I)()}__init5(){this.tags={}}__init6(){this.data={}}__init7(){this.instrumenter="sentry"}constructor(e){if(u.prototype.__init2.call(this),u.prototype.__init3.call(this),u.prototype.__init4.call(this),u.prototype.__init5.call(this),u.prototype.__init6.call(this),u.prototype.__init7.call(this),!e)return this;e.traceId&&(this.traceId=e.traceId),e.spanId&&(this.spanId=e.spanId),e.parentSpanId&&(this.parentSpanId=e.parentSpanId),"sampled"in e&&(this.sampled=e.sampled),e.op&&(this.op=e.op),e.description&&(this.description=e.description),e.data&&(this.data=e.data),e.tags&&(this.tags=e.tags),e.status&&(this.status=e.status),e.startTimestamp&&(this.startTimestamp=e.startTimestamp),e.endTimestamp&&(this.endTimestamp=e.endTimestamp),e.instrumenter&&(this.instrumenter=e.instrumenter)}startChild(e){let t=new u({...e,parentSpanId:this.spanId,sampled:this.sampled,traceId:this.traceId});if(t.spanRecorder=this.spanRecorder,t.spanRecorder&&t.spanRecorder.add(t),t.transaction=this.transaction,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&t.transaction){let n=e&&e.op||"< unknown op >",r=t.transaction.name||"< unknown name >",i=t.transaction.spanId,s=`[Tracing] Starting '${n}' span on transaction '${r}' (${i}).`;t.transaction.metadata.spanMetadata[t.spanId]={logMessage:s},o.kg.log(s)}return t}setTag(e,t){return this.tags={...this.tags,[e]:t},this}setData(e,t){return this.data={...this.data,[e]:t},this}setStatus(e){return this.status=e,this}setHttpStatus(e){this.setTag("http.status_code",String(e));let t=function(e){if(e<400&&e>=100)return"ok";if(e>=400&&e<500)switch(e){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(e>=500&&e<600)switch(e){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}(e);return"unknown_error"!==t&&this.setStatus(t),this}isSuccess(){return"ok"===this.status}finish(e){if(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&this.transaction&&this.transaction.spanId!==this.spanId){let{logMessage:t}=this.transaction.metadata.spanMetadata[this.spanId];t&&o.kg.log(t.replace("Starting","Finishing"))}this.endTimestamp="number"==typeof e?e:(0,s._I)()}toTraceparent(){let e="";return void 0!==this.sampled&&(e=this.sampled?"-1":"-0"),`${this.traceId}-${this.spanId}${e}`}toContext(){return(0,a.Jr)({data:this.data,description:this.description,endTimestamp:this.endTimestamp,op:this.op,parentSpanId:this.parentSpanId,sampled:this.sampled,spanId:this.spanId,startTimestamp:this.startTimestamp,status:this.status,tags:this.tags,traceId:this.traceId})}updateWithContext(e){return this.data=(0,r.h)(e.data,()=>({})),this.description=e.description,this.endTimestamp=e.endTimestamp,this.op=e.op,this.parentSpanId=e.parentSpanId,this.sampled=e.sampled,this.spanId=(0,r.h)(e.spanId,()=>this.spanId),this.startTimestamp=(0,r.h)(e.startTimestamp,()=>this.startTimestamp),this.status=e.status,this.tags=(0,r.h)(e.tags,()=>({})),this.traceId=(0,r.h)(e.traceId,()=>this.traceId),this}getTraceContext(){return(0,a.Jr)({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,trace_id:this.traceId})}toJSON(){return(0,a.Jr)({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,start_timestamp:this.startTimestamp,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this.endTimestamp,trace_id:this.traceId})}}},3391:function(e,t,n){"use strict";n.d(t,{Y:function(){return u}});var r=n(5375),i=n(5659),s=n(1170),o=n(2343),a=n(535),l=n(5334);class u extends l.Dr{__init(){this._measurements={}}__init2(){this._contexts={}}__init3(){this._frozenDynamicSamplingContext=void 0}constructor(e,t){super(e),u.prototype.__init.call(this),u.prototype.__init2.call(this),u.prototype.__init3.call(this),this._hub=t||(0,i.Gd)(),this._name=e.name||"",this.metadata={source:"custom",...e.metadata,spanMetadata:{},changes:[],propagations:0},this._trimEnd=e.trimEnd,this.transaction=this;let n=this.metadata.dynamicSamplingContext;n&&(this._frozenDynamicSamplingContext={...n})}get name(){return this._name}set name(e){this.setName(e)}setName(e,t="custom"){(e!==this.name||t!==this.metadata.source)&&this.metadata.changes.push({source:this.metadata.source,timestamp:(0,s.ph)(),propagations:this.metadata.propagations}),this._name=e,this.metadata.source=t}initSpanRecorder(e=1e3){this.spanRecorder||(this.spanRecorder=new l.gB(e)),this.spanRecorder.add(this)}setContext(e,t){null===t?delete this._contexts[e]:this._contexts[e]=t}setMeasurement(e,t,n=""){this._measurements[e]={value:t,unit:n}}setMetadata(e){this.metadata={...this.metadata,...e}}finish(e){if(void 0!==this.endTimestamp)return;if(this.name||(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&o.kg.warn("Transaction has no name, falling back to `<unlabeled transaction>
3406`."),this.name="<unlabeled transaction>"),super.finish(e),!0!==this.sampled){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&o.kg.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled.");let t=this._hub.getClient();t&&t.recordDroppedEvent("sample_rate","transaction");return}let n=this.spanRecorder?this.spanRecorder.spans.filter(e=>e!==this&&e.endTimestamp):[];this._trimEnd&&n.length>0&&(this.endTimestamp=n.reduce((e,t)=>e.endTimestamp&&t.endTimestamp?e.endTimestamp>t.endTimestamp?e:t:e).endTimestamp);let r=this.metadata,i={contexts:{...this._contexts,trace:this.getTraceContext()},spans:n,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",sdkProcessingMetadata:{...r,dynamicSamplingContext:this.getDynamicSamplingContext()},...r.source&&{transaction_info:{source:r.source,changes:r.changes,propagations:r.propagations}}},s=Object.keys(this._measurements).length>0;return s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&o.kg.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),i.measurements=this._measurements),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&o.kg.log(`[Tracing] Finishing ${this.op} transaction: ${this.name}.`),this._hub.captureEvent(i)}toContext(){let e=super.toContext();return(0,a.Jr)({...e,name:this.name,trimEnd:this._trimEnd})}updateWithContext(e){return super.updateWithContext(e),this.name=(0,r.h)(e.name,()=>""),this._trimEnd=e.trimEnd,this}getDynamicSamplingContext(){if(this._frozenDynamicSamplingContext)return this._frozenDynamicSamplingContext;let e=this._hub||(0,i.Gd)(),t=e&&e.getClient();if(!t)return{};let{environment:n,release:r}=t.getOptions()||{},{publicKey:s}=t.getDsn()||{},o=this.metadata.sampleRate,l=void 0!==o?o.toString():void 0,u=e.getScope(),{segment:c}=u&&u.getUser()||{},h=this.metadata.source,d=h&&"url"!==h?this.name:void 0,f=(0,a.Jr)({environment:n,release:r,transaction:d,user_segment:c,public_key:s,trace_id:this.traceId,sample_rate:l});return f}}},3233:function(e,t,n){"use strict";n.d(t,{XL:function(){return o},x1:function(){return s},zu:function(){return i}});var r=n(5659);function i(e){let t=(0,r.Gd)().getClient(),n=e||t&&t.getOptions();return!!n&&("tracesSampleRate"in n||"tracesSampler"in n)}function s(e){let t=e||(0,r.Gd)(),n=t.getScope();return n&&n.getTransaction()}function o(e){return e/1e3}},8464:function(e,t,n){"use strict";n.d(t,{Rt:function(){return o},l4:function(){return l},qT:function(){return u}});var r=n(7597),i=n(1235);let s=(0,i.Rf)();function o(e,t){try{let n=e,r=[],i=0,s=0,o;for(;n&&i++<5&&(o=a(n,t),"html"!==o&&(!(i>1)||!(s+3*r.length+o.length>=80)));)r.push(o),s+=o.length,n=n.parentNode;return r.reverse().join(" > ")}catch(l){return"<unknown>"}}function a(e,t){let n=[],i,s,o,a,l;if(!e||!e.tagName)return"";n.push(e.tagName.toLowerCase());let u=t&&t.length?t.filter(t=>e.getAttribute(t)).map(t=>[t,e.getAttribute(t)]):null;if(u&&u.length)u.forEach(e=>{n.push(`[${e[0]}="${e[1]}"]`)});else if(e.id&&n.push(`#${e.id}`),(i=e.className)&&(0,r.HD)(i))for(l=0,s=i.split(/\s+/);l<s.length;l++)n.push(`.${s[l]}`);let c=["type","name","title","alt"];for(l=0;l<c.length;l++)o=c[l],(a=e.getAttribute(o))&&n.push(`[${o}="${a}"]`);return n.join("")}function l(){try{return s.document.location.href}catch(e){return""}}function u(e){return s.document&&s.document.querySelector?s.document.querySelector(e):null}},5375:function(e,t,n){"use strict";function r(e,t){return null!=e?e:t()}n.d(t,{h:function(){return r}})},9732:function(e,t,n){"use strict";n.d(t,{o:function(){return d}});var r=n(7597),i=n(2343),s=n(535),o=n(360),a=n(8823),l=n(1235);let u=(0,l.Rf)(),c={},h={};function d(e,t){c[e]=c[e]||[],c[e].push(t),function(e){if(!h[e])switch(h[e]=!0,e){case"console":"console"in u&&i.RU.forEach(function(e){e in u.console&&(0,s.hl)(u.console,e,function(t){return function(...n){f("console",{args:n,level:e}),t&&t.apply(u.console,n)}})});break;case"dom":(function(){if(!("document"in u))return;let e=f.bind(null,"dom"),t=y(e,!0);u.document.addEventListener("click",t,!1),u.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{let n=u[t]&&u[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&((0,s.hl)(n,"addEventListener",function(t){return function(n,r,i){if("click"===n||"keypress"==n)try{let s=this,o=s.__sentry_instrumentation_handlers__=s.__sentry_instrumentation_handlers__||{},a=o[n]=o[n]||{refCount:0};if(!a.handler){let l=y(e);a.handler=l,t.call(this,n,l,i)}a.refCount+=1}catch(u){}return t.call(this,n,r,i)}}),(0,s.hl)(n,"removeEventListener",function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{let i=this.__sentry_instrumentation_handlers__||{},s=i[t];
3406s&&(s.refCount-=1,s.refCount<=0&&(e.call(this,t,s.handler,r),s.handler=void 0,delete i[t]),0===Object.keys(i).length&&delete this.__sentry_instrumentation_handlers__)}catch(o){}return e.call(this,t,n,r)}}))})})();break;case"xhr":(function(){if(!("XMLHttpRequest"in u))return;let e=XMLHttpRequest.prototype;(0,s.hl)(e,"open",function(e){return function(...t){let n=this,i=t[1],o=n.__sentry_xhr__={method:(0,r.HD)(t[0])?t[0].toUpperCase():t[0],url:t[1]};(0,r.HD)(i)&&"POST"===o.method&&i.match(/sentry_key/)&&(n.__sentry_own_request__=!0);let a=function(){if(4===n.readyState){try{o.status_code=n.status}catch(e){}f("xhr",{args:t,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:n})}};return"onreadystatechange"in n&&"function"==typeof n.onreadystatechange?(0,s.hl)(n,"onreadystatechange",function(e){return function(...t){return a(),e.apply(n,t)}}):n.addEventListener("readystatechange",a),e.apply(n,t)}}),(0,s.hl)(e,"send",function(e){return function(...t){return this.__sentry_xhr__&&void 0!==t[0]&&(this.__sentry_xhr__.body=t[0]),f("xhr",{args:t,startTimestamp:Date.now(),xhr:this}),e.apply(this,t)}})})();break;case"fetch":!(0,a.t$)()||(0,s.hl)(u,"fetch",function(e){return function(...t){let n={args:t,fetchData:{method:function(e=[]){return"Request"in u&&(0,r.V9)(e[0],Request)&&e[0].method?String(e[0].method).toUpperCase():e[1]&&e[1].method?String(e[1].method).toUpperCase():"GET"}(t),url:function(e=[]){return"string"==typeof e[0]?e[0]:"Request"in u&&(0,r.V9)(e[0],Request)?e[0].url:String(e[0])}(t)},startTimestamp:Date.now()};return f("fetch",{...n}),e.apply(u,t).then(e=>(f("fetch",{...n,endTimestamp:Date.now(),response:e}),e),e=>{throw f("fetch",{...n,endTimestamp:Date.now(),error:e}),e})}});break;case"history":(function(){if(!(0,a.Bf)())return;let e=u.onpopstate;function t(e){return function(...t){let n=t.length>2?t[2]:void 0;if(n){let r=p,i=String(n);p=i,f("history",{from:r,to:i})}return e.apply(this,t)}}u.onpopstate=function(...t){let n=u.location.href,r=p;if(p=n,f("history",{from:r,to:n}),e)try{return e.apply(this,t)}catch(i){}},(0,s.hl)(u.history,"pushState",t),(0,s.hl)(u.history,"replaceState",t)})();break;case"error":v=u.onerror,u.onerror=function(e,t,n,r,i){return f("error",{column:r,error:i,line:n,msg:e,url:t}),!!v&&v.apply(this,arguments)};break;case"unhandledrejection":_=u.onunhandledrejection,u.onunhandledrejection=function(e){return f("unhandledrejection",e),!_||_.apply(this,arguments)};break;default:("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.kg.warn("unknown instrumentation type:",e);return}}(e)}function f(e,t){if(e&&c[e])for(let n of c[e]||[])try{n(t)}catch(r){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.kg.error(`Error while triggering instrumentation handler. 3407Type: ${e} 3408Name: ${(0,o.$P)(n)} 3409Error:`,r)}}let p,m,g;function y(e,t=!1){return n=>{if(!n||g===n||function(e){if("keypress"!==e.type)return!1;try{let t=e.target;if(!t||!t.tagName)return!0;if("INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable)return!1}catch(n){}return!0}(n))return;let r="keypress"===n.type?"input":n.type;void 0===m?(e({event:n,name:r,global:t}),g=n):function(e,t){if(!e||e.type!==t.type)return!0;try{if(e.target!==t.target)return!0}catch(n){}return!1}(g,n)&&(e({event:n,name:r,global:t}),g=n),clearTimeout(m),m=u.setTimeout(()=>{m=void 0},1e3)}}let v=null,_=null},7597:function(e,t,n){"use strict";n.d(t,{Cy:function(){return g},HD:function(){return u},J8:function(){return m},Kj:function(){return p},PO:function(){return h},TX:function(){return a},V9:function(){return v},VW:function(){return o},VZ:function(){return i},cO:function(){return d},fm:function(){return l},i2:function(){return y},kK:function(){return f},pt:function(){return c}});let r=Object.prototype.toString;function i(e){switch(r.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return v(e,Error)}}function s(e,t){return r.call(e)===`[object ${t}]`}function o(e){return s(e,"ErrorEvent")}function a(e){return s(e,"DOMError")}function l(e){return s(e,"DOMException")}function u(e){return s(e,"String")}function c(e){return null===e||"object"!=typeof e&&"function"!=typeof e}function h(e){return s(e,"Object")}function d(e){return"undefined"!=typeof Event&&v(e,Event)}function f(e){return"undefined"!=typeof Element&&v(e,Element)}function p(e){return s(e,"RegExp")}function m(e){return Boolean(e&&e.then&&"function"==typeof e.then)}
3409function g(e){return h(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function y(e){return"number"==typeof e&&e!=e}function v(e,t){try{return e instanceof t}catch(n){return!1}}},2343:function(e,t,n){"use strict";n.d(t,{Cf:function(){return s},RU:function(){return i},kg:function(){return a}});var r=n(1235);let i=["debug","info","warn","error","log","assert","trace"];function s(e){if(!("console"in r.n2))return e();let t=r.n2.console,n={};i.forEach(e=>{let r=t[e]&&t[e].__sentry_original__;e in t&&r&&(n[e]=t[e],t[e]=r)});try{return e()}finally{Object.keys(n).forEach(e=>{t[e]=n[e]})}}function o(){let e=!1,t={enable(){e=!0},disable(){e=!1}};return"undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?i.forEach(n=>{t[n]=(...t)=>{e&&s(()=>{r.n2.console[n](`Sentry Logger [${n}]:`,...t)})}}):i.forEach(e=>{t[e]=()=>void 0}),t}let a;a="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?(0,r.YO)("logger",o):o()},2844:function(e,t,n){"use strict";n.d(t,{DM:function(){return s},Db:function(){return l},EG:function(){return u},YO:function(){return c},jH:function(){return a},lE:function(){return h}});var r=n(535),i=n(1235);function s(){let e=i.n2,t=e.crypto||e.msCrypto;if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");let n=t&&t.getRandomValues?()=>t.getRandomValues(new Uint8Array(1))[0]:()=>16*Math.random();return"10000000100040008000100000000000".replace(/[018]/g,e=>(e^(15&n())>>e/4).toString(16))}function o(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function a(e){let{message:t,event_id:n}=e;if(t)return t;let r=o(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function l(e,t,n){let r=e.exception=e.exception||{},i=r.values=r.values||[],s=i[0]=i[0]||{};s.value||(s.value=t||""),s.type||(s.type=n||"Error")}function u(e,t){let n=o(e);if(!n)return;let r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){let i={...r&&r.data,...t.data};n.mechanism.data=i}}function c(e){if(e&&e.__sentry_captured__)return!0;try{(0,r.xp)(e,"__sentry_captured__",!0)}catch(t){}return!1}function h(e){return Array.isArray(e)?e:[e]}},2448:function(e,t,n){"use strict";n.d(t,{l$:function(){return s},KV:function(){return i},$y:function(){return o}}),e=n.hmd(e);var r=n(3454);function i(){return!("undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call(void 0!==r?r:0)}function s(e,t){return e.require(t)}function o(t){let n;try{n=s(e,t)}catch(r){}try{let{cwd:i}=s(e,"process");n=s(e,`${i()}/node_modules/${t}`)}catch(o){}return n}},535:function(e,t,n){"use strict";n.d(t,{$Q:function(){return l},HK:function(){return u},Jr:function(){return m},Sh:function(){return h},_j:function(){return c},hl:function(){return o},xp:function(){return a},zf:function(){return p}});var r=n(8464),i=n(7597),s=n(7321);function o(e,t,n){if(!(t in e))return;let r=e[t],i=n(r);if("function"==typeof i)try{l(i,r)}catch(s){}e[t]=i}function a(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}function l(e,t){let n=t.prototype||{};e.prototype=t.prototype=n,a(e,"__sentry_original__",t)}function u(e){return e.__sentry_original__}function c(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function h(e){if((0,i.VZ)(e))return{message:e.message,name:e.name,stack:e.stack,...f(e)};if(!(0,i.cO)(e))return e;{let t={type:e.type,target:d(e.target),currentTarget:d(e.currentTarget),...f(e)};return"undefined"!=typeof CustomEvent&&(0,i.V9)(e,CustomEvent)&&(t.detail=e.detail),t}}function d(e){try{return(0,i.kK)(e)?(0,r.Rt)(e):Object.prototype.toString.call(e)}catch(t){return"<unknown>"}}function f(e){if("object"!=typeof e||null===e)return{};{let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}}function p(e,t=40){let n=Object.keys(h(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return(0,s.$G)(n[0],t);for(let r=n.length;r>0;r--){let i=n.slice(0,r).join(", ");if(!(i.length>t)){if(r===n.length)return i;return(0,s.$G)(i,t)}}return""}function m(e){let t=new Map;return function e(t,n){if((0,i.PO)(t)){let r=n.get(t);if(void 0!==r)return r;let s={};for(let o of(n.set(t,s),Object.keys(t)))void 0!==t[o]&&(s[o]=e(t[o],n));return s}if(Array.isArray(t)){let a=n.get(t);if(void 0!==a)return a;let l=[];return n.set(t,l),t.forEach(t=>{l.push(e(t,n))}),l}return t}(e,t)}},360:function(e,t,n){"use strict";function r(...e){let t=e.sort((e,t)=>
3409e[0]-t[0]).map(e=>e[1]);return(e,n=0)=>{let r=[];for(let i of e.split("\n").slice(n)){let s=i.replace(/\(error: (.*)\)/,"$1");for(let o of t){let a=o(s);if(a){r.push(a);break}}}return function(e){if(!e.length)return[];let t=e,n=t[0].function||"",r=t[t.length-1].function||"";return(-1!==n.indexOf("captureMessage")||-1!==n.indexOf("captureException"))&&(t=t.slice(1)),-1!==r.indexOf("sentryWrapped")&&(t=t.slice(0,-1)),t.slice(0,50).map(e=>({...e,filename:e.filename||t[0].filename,function:e.function||"?"})).reverse()}(r)}}function i(e){return Array.isArray(e)?r(...e):e}n.d(t,{$P:function(){return o},Sq:function(){return i},pE:function(){return r}});let s="<anonymous>";function o(e){try{if(!e||"function"!=typeof e)return s;return e.name||s}catch(t){return s}}},7321:function(e,t,n){"use strict";n.d(t,{$G:function(){return i},U0:function(){return o},nK:function(){return s}});var r=n(7597);function i(e,t=0){return"string"!=typeof e||0===t?e:e.length<=t?e:`${e.substr(0,t)}...`}function s(e,t){if(!Array.isArray(e))return"";let n=[];for(let r=0;r<e.length;r++){let i=e[r];try{n.push(String(i))}catch(s){n.push("[value cannot be serialized]")}}return n.join(t)}function o(e,t=[],n=!1){return t.some(t=>(function(e,t,n=!1){return!!(0,r.HD)(e)&&((0,r.Kj)(t)?t.test(e):!!(0,r.HD)(t)&&(n?e===t:e.includes(t)))})(e,t,n))}},8823:function(e,t,n){"use strict";n.d(t,{Ak:function(){return o},Bf:function(){return u},Du:function(){return a},t$:function(){return l}});var r=n(2343),i=n(1235);let s=(0,i.Rf)();function o(){if(!("fetch"in s))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}function a(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function l(){if(!o())return!1;if(a(s.fetch))return!0;let e=!1,t=s.document;if(t&&"function"==typeof t.createElement)try{let n=t.createElement("iframe");
3409n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=a(n.contentWindow.fetch)),t.head.removeChild(n)}catch(i){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",i)}return e}function u(){let e=s.chrome,t=e&&e.app&&e.app.runtime,n="history"in s&&!!s.history.pushState&&!!s.history.replaceState;return!t&&n}},6893:function(e,t,n){"use strict";n.d(t,{$2:function(){return a},WD:function(){return o},cW:function(){return l}});var r,i,s=n(7597);function o(e){return new l(t=>{t(e)})}function a(e){return new l((t,n)=>{n(e)})}(i=r||(r={}))[i.PENDING=0]="PENDING",i[i.RESOLVED=1]="RESOLVED",i[i.REJECTED=2]="REJECTED";class l{__init(){this._state=r.PENDING}__init2(){this._handlers=[]}constructor(e){l.prototype.__init.call(this),l.prototype.__init2.call(this),l.prototype.__init3.call(this),l.prototype.__init4.call(this),l.prototype.__init5.call(this),l.prototype.__init6.call(this);try{e(this._resolve,this._reject)}catch(t){this._reject(t)}}then(e,t){return new l((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(i){r(i)}else n(t)},e=>{if(t)try{n(t(e))}catch(i){r(i)}else r(e)},]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(e){return new l((t,n)=>{let r,i;return this.then(t=>{i=!1,r=t,e&&e()},t=>{i=!0,r=t,e&&e()}).then(()=>{if(i){n(r);return}t(r)})})}__init3(){this._resolve=e=>{this._setResult(r.RESOLVED,e)}}__init4(){this._reject=e=>{this._setResult(r.REJECTED,e)}}__init5(){this._setResult=(e,t)=>{if(this._state===r.PENDING){if((0,s.J8)(t)){t.then(this._resolve,this._reject);return}this._state=e,this._value=t,this._executeHandlers()}}}__init6(){this._executeHandlers=()=>{if(this._state===r.PENDING)return;let e=this._handlers.slice();this._handlers=[],e.forEach(e=>{!e[0]&&(this._state===r.RESOLVED&&e[1](this._value),this._state===r.REJECTED&&e[2](this._value),e[0]=!0)})}}}},1170:function(e,t,n){"use strict";n.d(t,{Z1:function(){return d},_I:function(){return h},ph:function(){return c},yW:function(){return u}});var r=n(2448),i=n(1235);e=n.hmd(e);let s=(0,i.Rf)(),o={nowSeconds:()=>Date.now()/1e3},a=(0,r.KV)()?function(){try{let t=(0,r.l$)(e,"perf_hooks");return t.performance}catch(n){return}}():function(){let{performance:e}=s;if(!e||!e.now)return;let t=Date.now()-e.now();return{now:()=>e.now(),timeOrigin:t}}(),l=void 0===a?o:{nowSeconds:()=>(a.timeOrigin+a.now())/1e3},u=o.nowSeconds.bind(o),c=l.nowSeconds.bind(l),h=c,d=(()=>{let{performance:e}=s;if(!e||!e.now)return;let t=e.now(),n=Date.now(),r=e.timeOrigin?Math.abs(e.timeOrigin+t-n):36e5,i=e.timing&&e.timing.navigationStart,o="number"==typeof i?Math.abs(i+t-n):36e5;return r<36e5||o<36e5?r<=o?e.timeOrigin:i:n})()},1235:function(e,t,n){"use strict";function r(e){return e&&e.Math==Math?e:void 0}n.d(t,{Rf:function(){return s},YO:function(){return o},n2:function(){return i}});let i="object"==typeof globalThis&&r(globalThis)||"object"==typeof window&&r(window)||"object"==typeof self&&r(self)||"object"==typeof n.g&&r(n.g)||function(){return this}()||{};function s(){return i}function o(e,t,n){let r=n||i,s=r.__SENTRY__=r.__SENTRY__||{},o=s[e]||(s[e]=t());return o}},9484:function(e,t,n){("undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"Bwfo8l3uxD6lAmKtUeJhq"}},6010:function(e,t,n){"use strict";function r(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e){if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=r(e[t]))&&(i&&(i+=" "),i+=n);else for(t in e)e[t]&&(i&&(i+=" "),i+=t)}return i}t.Z=function(){for(var e,t,n=0,i="";n<arguments.length;)(e=arguments[n++])&&(t=r(e))&&(i&&(i+=" "),i+=t);return i}},7702:function(e,t,n){"use strict";n.d(t,{v0:function(){return r.n},Aj:function(){return r.v},ck:function(){return r.af}});var r=n(1352);n(4444),n(2238),n(3333),n(8463)},6257:function(e,t,n){"use strict";n.d(t,{Bt:function(){return r.Bt},ET:function(){return r.ET},IO:function(){return r.IO},JU:function(){return r.JU},Xo:function(){return r.Xo},cf:function(){return r.cf},hJ:function(){return r.hJ},oe:function(){return r.oe},pl:function(){return r.pl},r7:function(){return r.r7}});var r=n(1294)},6230:function(e){e.exports="object"==typeof self?self.FormData:window.FormData},2175:function(e,t,n){"use strict";n.d(t,{TA:function(){return nO}});var r=n(7294),i=n(9590),s=n.n(i),o=function(e){var t,n,r,i;return t=e,!!t&&"object"==typeof t&&(n=e,r=Object.prototype.toString.call(n),"[object RegExp]"!==r&&"[object Date]"!==r&&(i=n,i.$$typeof!==a))},a="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function l(e,t){var n;return!1!==t.clone&&t.isMergeableObject(e)?c(Array.isArray(e)?[]:{},e,t):e}function u(e,t,n){return e.concat(t).map(function(e){return l(e,n)})}
3409function c(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||u,n.isMergeableObject=n.isMergeableObject||o;var r,i,s,a,h,d=Array.isArray(t);return d!==Array.isArray(e)?l(t,n):d?n.arrayMerge(e,t,n):(a={},(s=n).isMergeableObject(e)&&Object.keys(e).forEach(function(t){a[t]=l(e[t],s)}),Object.keys(t).forEach(function(n){s.isMergeableObject(t[n])&&e[n]?a[n]=c(e[n],t[n],s):a[n]=l(t[n],s)}),a)}c.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,n){return c(e,n,t)},{})};var h="object"==typeof global&&global&&global.Object===Object&&global,d="object"==typeof self&&self&&self.Object===Object&&self,f=h||d||Function("return this")(),p=f.Symbol,m=Object.prototype,g=m.hasOwnProperty,y=m.toString,v=p?p.toStringTag:void 0,_=function(e){var t=g.call(e,v),n=e[v];try{e[v]=void 0;var r=!0}catch(i){}var s=y.call(e);return r&&(t?e[v]=n:delete e[v]),s},b=Object.prototype.toString,w=p?p.toStringTag:void 0,E=function(e){var t;return null==e?void 0===e?"[object Undefined]":"[object Null]":w&&w in Object(e)?_(e):b.call(e)},x=function(e,t){return function(n){return e(t(n))}},S=x(Object.getPrototypeOf,Object),T=function(e){return null!=e&&"object"==typeof e},I=Function.prototype,k=Object.prototype,C=I.toString,R=k.hasOwnProperty,A=C.call(Object),O=function(e){if(!T(e)||"[object Object]"!=E(e))return!1;var t=S(e);if(null===t)return!0;var n=R.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&C.call(n)==A},D=function(){this.__data__=[],this.size=0},N=function(e,t){return e===t||e!=e&&t!=t},P=function(e,t){for(var n=e.length;n--;)if(N(e[n][0],t))return n;return -1},F=Array.prototype.splice,M=function(e){var t=this.__data__,n=P(t,e);return!(n<0)&&(n==t.length-1?t.pop():F.call(t,n,1),--this.size,!0)},L=function(e){var t=this.__data__,n=P(t,e);return n<0?void 0:t[n][1]},j=function(e){return P(this.__data__,e)>-1},U=function(e,t){var n=this.__data__,r=P(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function B(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}B.prototype.clear=D,B.prototype.delete=M,B.prototype.get=L,B.prototype.has=j,B.prototype.set=U;var Z,$=function(){this.__data__=new B,this.size=0},V=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},z=function(e){return this.__data__.get(e)},q=function(e){return this.__data__.has(e)},G=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},W=function(e){if(!G(e))return!1;var t=E(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},H=f["__core-js_shared__"],K=(Z=/[^.]+$/.exec(H&&H.keys&&H.keys.IE_PROTO||""))?"Symbol(src)_1."+Z:"",Y=Function.prototype.toString,Q=function(e){if(null!=e){try{return Y.call(e)}catch(t){}try{return e+""}catch(n){}}return""},X=/^\[object .+?Constructor\]$/,J=Function.prototype,ee=Object.prototype,et=J.toString,en=ee.hasOwnProperty,er=RegExp("^"+et.call(en).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ei=function(e){var t;return!!G(e)&&(!K||!(K in e))&&(W(e)?er:X).test(Q(e))},es=function(e,t){var n,r,i=null==e?void 0:e[t];return ei(i)?i:void 0},eo=es(f,"Map"),ea=es(Object,"create"),el=function(){this.__data__=ea?ea(null):{},this.size=0},eu=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ec=Object.prototype.hasOwnProperty,eh=function(e){var t=this.__data__;if(ea){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return ec.call(t,e)?t[e]:void 0},ed=Object.prototype.hasOwnProperty,ef=function(e){var t=this.__data__;return ea?void 0!==t[e]:ed.call(t,e)},ep=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ea&&void 0===t?"__lodash_hash_undefined__":t,this};function em(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}em.prototype.clear=el,em.prototype.delete=eu,em.prototype.get=eh,em.prototype.has=ef,em.prototype.set=ep;var eg=function(){this.size=0,this.__data__={hash:new em,map:new(eo||B),string:new em}},ey=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},ev=function(e,t){var n=e.__data__;return ey(t)?n["string"==typeof t?"string":"hash"]:n.map},e_=function(e){var t=ev(this,e).delete(e);return this.size-=t?1:0,t},eb=function(e){return ev(this,e).get(e)},ew=function(e){return ev(this,e).has(e)},eE=function(e,t){var n=ev(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function ex(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ex.prototype.clear=eg,ex.prototype.delete=e_,ex.prototype.get=eb,ex.prototype.has=ew,ex.prototype.set=eE;var eS=function(e,t){var n=this.__data__;if(n instanceof B){var r=n.__data__;if(!eo||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ex(r)}return n.set(e,t),this.size=n.size,this};function eT(e){var t=this.__data__=new B(e);this.size=t.size}eT.prototype.clear=$,eT.prototype.delete=V,eT.prototype.get=z,eT.prototype.has=q,eT.prototype.set=eS;var eI=function(e,t){for(var n=-1,r=null==e?0:e.length;
3409++n<r&&!1!==t(e[n],n,e););return e},ek=function(){try{var e=es(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),eC=function(e,t,n){"__proto__"==t&&ek?ek(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},eR=Object.prototype.hasOwnProperty,eA=function(e,t,n){var r=e[t];eR.call(e,t)&&N(r,n)&&(void 0!==n||t in e)||eC(e,t,n)},eO=function(e,t,n,r){var i=!n;n||(n={});for(var s=-1,o=t.length;++s<o;){var a=t[s],l=r?r(n[a],e[a],a,n,e):void 0;void 0===l&&(l=e[a]),i?eC(n,a,l):eA(n,a,l)}return n},eD=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r},eN=function(e){return T(e)&&"[object Arguments]"==E(e)},eP=Object.prototype,eF=eP.hasOwnProperty,eM=eP.propertyIsEnumerable,eL=eN(function(){return arguments}())?eN:function(e){return T(e)&&eF.call(e,"callee")&&!eM.call(e,"callee")},ej=Array.isArray;function eU(){return!1}var eB,eZ="object"==typeof exports&&exports&&!exports.nodeType&&exports,e$=eZ&&"object"==typeof module&&module&&!module.nodeType&&module,eV=e$&&e$.exports===eZ?f.Buffer:void 0,ez=(eV?eV.isBuffer:void 0)||eU,eq=/^(?:0|[1-9]\d*)$/,eG=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&eq.test(e))&&e>-1&&e%1==0&&e<t},eW=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},eH={};eH["[object Float32Array]"]=eH["[object Float64Array]"]=eH["[object Int8Array]"]=eH["[object Int16Array]"]=eH["[object Int32Array]"]=eH["[object Uint8Array]"]=eH["[object Uint8ClampedArray]"]=eH["[object Uint16Array]"]=eH["[object Uint32Array]"]=!0,eH["[object Arguments]"]=eH["[object Array]"]=eH["[object ArrayBuffer]"]=eH["[object Boolean]"]=eH["[object DataView]"]=eH["[object Date]"]=eH["[object Error]"]=eH["[object Function]"]=eH["[object Map]"]=eH["[object Number]"]=eH["[object Object]"]=eH["[object RegExp]"]=eH["[object Set]"]=eH["[object String]"]=eH["[object WeakMap]"]=!1;var eK=function(e){return T(e)&&eW(e.length)&&!!eH[E(e)]},eY=function(e){return function(t){return e(t)}},eQ="object"==typeof exports&&exports&&!exports.nodeType&&exports,eX=eQ&&"object"==typeof module&&module&&!module.nodeType&&module,eJ=eX&&eX.exports===eQ&&h.process,e0=function(){try{var e=eX&&eX.require&&eX.require("util").types;if(e)return e;return eJ&&eJ.binding&&eJ.binding("util")}catch(t){}}(),e1=e0&&e0.isTypedArray,e2=e1?eY(e1):eK,e4=Object.prototype.hasOwnProperty,e5=function(e,t){var n=ej(e),r=!n&&eL(e),i=!n&&!r&&ez(e),s=!n&&!r&&!i&&e2(e),o=n||r||i||s,a=o?eD(e.length,String):[],l=a.length;for(var u in e)(t||e4.call(e,u))&&!(o&&("length"==u||i&&("offset"==u||"parent"==u)||s&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||eG(u,l)))&&a.push(u);return a},e3=Object.prototype,e6=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||e3)},e8=x(Object.keys,Object),e7=Object.prototype.hasOwnProperty,e9=function(e){if(!e6(e))return e8(e);var t=[];for(var n in Object(e))e7.call(e,n)&&"constructor"!=n&&t.push(n);return t},te=function(e){return null!=e&&eW(e.length)&&!W(e)},tt=function(e){return te(e)?e5(e):e9(e)},tn=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t},tr=Object.prototype.hasOwnProperty,ti=function(e){if(!G(e))return tn(e);var t=e6(e),n=[];for(var r in e)"constructor"==r&&(t||!tr.call(e,r))||n.push(r);return n},ts=function(e){return te(e)?e5(e,!0):ti(e)},to="object"==typeof exports&&exports&&!exports.nodeType&&exports,ta=to&&"object"==typeof module&&module&&!module.nodeType&&module,tl=ta&&ta.exports===to?f.Buffer:void 0,tu=tl?tl.allocUnsafe:void 0,tc=function(e,t){if(t)return e.slice();var n=e.length,r=tu?tu(n):new e.constructor(n);return e.copy(r),r},th=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t},td=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,s=[];++n<r;){var o=e[n];t(o,n,e)&&(s[i++]=o)}return s};function tf(){return[]}var tp=Object.prototype.propertyIsEnumerable,tm=Object.getOwnPropertySymbols,tg=tm?function(e){return null==e?[]:td(tm(e=Object(e)),function(t){return tp.call(e,t)})}:tf,ty=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e},tv=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)ty(t,tg(e)),e=S(e);return t}:tf,t_=function(e,t,n){var r=t(e);return ej(e)?r:ty(r,n(e))},tb=function(e){return t_(e,tt,tg)},tw=function(e){return t_(e,ts,tv)}
3409,tE=es(f,"DataView"),tx=es(f,"Promise"),tS=es(f,"Set"),tT=es(f,"WeakMap"),tI="[object Map]",tk="[object Promise]",tC="[object Set]",tR="[object WeakMap]",tA="[object DataView]",tO=Q(tE),tD=Q(eo),tN=Q(tx),tP=Q(tS),tF=Q(tT),tM=E;(tE&&tM(new tE(new ArrayBuffer(1)))!=tA||eo&&tM(new eo)!=tI||tx&&tM(tx.resolve())!=tk||tS&&tM(new tS)!=tC||tT&&tM(new tT)!=tR)&&(tM=function(e){var t=E(e),n="[object Object]"==t?e.constructor:void 0,r=n?Q(n):"";if(r)switch(r){case tO:return tA;case tD:return tI;case tN:return tk;case tP:return tC;case tF:return tR}return t});var tL=tM,tj=Object.prototype.hasOwnProperty,tU=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&tj.call(e,"index")&&(n.index=e.index,n.input=e.input),n},tB=f.Uint8Array,tZ=function(e){var t=new e.constructor(e.byteLength);return new tB(t).set(new tB(e)),t},t$=function(e,t){var n=t?tZ(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)},tV=/\w*$/,tz=function(e){var t=new e.constructor(e.source,tV.exec(e));return t.lastIndex=e.lastIndex,t},tq=p?p.prototype:void 0,tG=tq?tq.valueOf:void 0,tW=function(e,t){var n=t?tZ(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)},tH=function(e,t,n){var r,i=e.constructor;switch(t){case"[object ArrayBuffer]":return tZ(e);case"[object Boolean]":case"[object Date]":return new i(+e);case"[object DataView]":return t$(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return tW(e,n);case"[object Map]":case"[object Set]":return new i;case"[object Number]":case"[object String]":return new i(e);case"[object RegExp]":return tz(e);case"[object Symbol]":return tG?Object(tG.call(e)):{}}},tK=Object.create,tY=function(){function e(){}return function(t){if(!G(t))return{};if(tK)return tK(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),tQ=function(e){return T(e)&&"[object Map]"==tL(e)},tX=e0&&e0.isMap,tJ=tX?eY(tX):tQ,t0=function(e){return T(e)&&"[object Set]"==tL(e)},t1=e0&&e0.isSet,t2=t1?eY(t1):t0,t4="[object Arguments]",t5="[object Function]",t3="[object Object]",t6={};t6[t4]=t6["[object Array]"]=t6["[object ArrayBuffer]"]=t6["[object DataView]"]=t6["[object Boolean]"]=t6["[object Date]"]=t6["[object Float32Array]"]=t6["[object Float64Array]"]=t6["[object Int8Array]"]=t6["[object Int16Array]"]=t6["[object Int32Array]"]=t6["[object Map]"]=t6["[object Number]"]=t6[t3]=t6["[object RegExp]"]=t6["[object Set]"]=t6["[object String]"]=t6["[object Symbol]"]=t6["[object Uint8Array]"]=t6["[object Uint8ClampedArray]"]=t6["[object Uint16Array]"]=t6["[object Uint32Array]"]=!0,t6["[object Error]"]=t6[t5]=t6["[object WeakMap]"]=!1;var t8=function e(t,n,r,i,s,o){var a,l=1&n,u=2&n;if(r&&(a=s?r(t,i,s,o):r(t)),void 0!==a)return a;if(!G(t))return t;var c=ej(t);if(c){if(a=tU(t),!l)return th(t,a)}else{var h,d,f,p,m,g,y,v,_,b=tL(t),w=b==t5||"[object GeneratorFunction]"==b;if(ez(t))return tc(t,l);if(b==t3||b==t4||w&&!s){if(a=u||w?{}:"function"!=typeof(h=t).constructor||e6(h)?{}:tY(S(h)),!l)return u?(p=t,d=a,f=t,m=d&&eO(f,ts(f),d),eO(p,tv(p),m)):(v=t,g=a,y=t,_=g&&eO(y,tt(y),g),eO(v,tg(v),_))}else{if(!t6[b])return s?t:{};a=tH(t,b,l)}}o||(o=new eT);var E=o.get(t);if(E)return E;o.set(t,a),t2(t)?t.forEach(function(i){a.add(e(i,n,r,i,t,o))}):tJ(t)&&t.forEach(function(i,s){a.set(s,e(i,n,r,s,t,o))});var x=c?void 0:(4&n?u?tw:tb:u?ts:tt)(t);return eI(x||t,function(i,s){x&&(i=t[s=i]),eA(a,s,e(i,n,r,s,t,o))}),a},t7=function(e){return t8(e,4)},t9=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i},ne=function(e){return"symbol"==typeof e||T(e)&&"[object Symbol]"==E(e)};function nt(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=e.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(nt.Cache||ex),n}nt.Cache=ex;var nn,nr,ni,ns=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,no=/\\(\\)?/g,na=(ni=(nr=nt(nn=function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ns,function(e,n,r,i){t.push(r?i.replace(no,"$1"):n||e)}),t},function(e){return 500===ni.size&&ni.clear(),e})).cache,nr),nl=1/0,nu=function(e){if("string"==typeof e||ne(e))return e;var t=e+"";return"0"==t&&1/e==-nl?"-0":t},nc=1/0,nh=p?p.prototype:void 0,nd=nh?nh.toString:void 0,nf=function(e){var t;return ej(e)?t9(e,nu):ne(e)?[e]:th(na(null==e?"":function e(t){if("string"==typeof t)return t;if(ej(t))return t9(t,e)+"";if(ne(t))return nd?nd.call(t):"";var n=t+"";return"0"==n&&1/t==-nc?"-0":n}(e)))},np=function(e,t){};function nm(){return(nm=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ng(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function ny(e,t){if(null==e)return{};var n,r,i={},s=Object.keys(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function nv(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n(8679);var n_=function(e){return Array.isArray(e)&&0===e.length},nb=function(e){return"function"==typeof e},nw=function(e){return null!==e&&"object"==typeof e},nE=function(e){return"[object String]"===Object.prototype.toString.call(e)},nx=function(e){return 0===r.Children.count(e)},nS=function(e){return nw(e)&&nb(e.then)};function nT(e,t,n,r){void 0===r&&(r=0);for(var i=nf(t);e&&r<i.length;)e=e[i[r++]];return void 0===e?n:e}function nI(e,t,n){for(var r=t7(e),i=r,s=0,o=nf(t);s<o.length-1;s++){var a=o[s],l=nT(e,o.slice(0,s+1));if(l&&(nw(l)||Array.isArray(l)))i=i[a]=t7(l);else{var u,c=o[s+1];i=i[a]=String(Math.floor(Number(c)))===c&&Number(c)>=0?[]:{}}}return(0===s?e:i)[o[s]]===n?e:(void 0===n?delete i[o[s]]:i[o[s]]=n,0===s&&void 0===n&&delete r[o[s]],r)}var nk=(0,r.createContext)(void 0);function nC(e,t){switch(t.type){case"SET_VALUES":return nm({},e,{values:t.payload});case"SET_TOUCHED":return nm({},e,{touched:t.payload});case"SET_ERRORS":if(s()(e.errors,t.payload))return e;return nm({},e,{errors:t.payload});case"SET_STATUS":return nm({},e,{status:t.payload});case"SET_ISSUBMITTING":return nm({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return nm({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return nm({},e,{values:nI(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return nm({},e,{touched:nI(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return nm({},e,{errors:nI(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return nm({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return nm({},e,{touched:function e(t,n,r,i){void 0===r&&(r=new WeakMap),void 0===i&&(i={});for(var s=0,o=Object.keys(t);s<o.length;s++){var a=o[s],l=t[a];nw(l)?r.get(l)||(r.set(l,!0),i[a]=Array.isArray(l)?[]:{},e(l,n,r,i[a])):i[a]=n}return i}(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":case"SUBMIT_SUCCESS":return nm({},e,{isSubmitting:!1});default:return e}}nk.displayName="FormikContext",nk.Provider,nk.Consumer;var nR={},nA={};function nO(e){var t=e.validateOnChange,n=void 0===t||t,i=e.validateOnBlur,o=void 0===i||i,a=e.validateOnMount,l=void 0!==a&&a,u=e.isInitialValid,h=e.enableReinitialize,d=void 0!==h&&h,f=e.onSubmit,p=ny(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),m=nm({validateOnChange:n,validateOnBlur:o,validateOnMount:l,onSubmit:f},p),g=(0,r.useRef)(m.initialValues),y=(0,r.useRef)(m.initialErrors||nR),v=(0,r.useRef)(m.initialTouched||nA),_=(0,r.useRef)(m.initialStatus),b=(0,r.useRef)(!1),w=(0,r.useRef)({});(0,r.useEffect)(function(){return b.current=!0,function(){b.current=!1}},[]);var E=(0,r.useReducer)(nC,{values:m.initialValues,errors:m.initialErrors||nR,touched:m.initialTouched||nA,status:m.initialStatus,isSubmitting:!1,isValidating:!1,submitCount:0}),x=E[0],S=E[1],T=(0,r.useCallback)(function(e,t){return new Promise(function(n,r){var i=m.validate(e,t);null==i?n(nR):nS(i)?i.then(function(e){n(e||nR)},function(e){r(e)}):n(i)})},[m.validate]),I=(0,r.useCallback)(function(e,t){var n,r,i,s,o,a=m.validationSchema,l=nb(
3409a)?a(t):a,u=t&&l.validateAt?l.validateAt(t,e):(n=e,r=l,void 0===i&&(i=!1),void 0===s&&(s={}),o=function e(t){var n=Array.isArray(t)?[]:{};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var i=String(r);!0===Array.isArray(t[i])?n[i]=t[i].map(function(t){return!0===Array.isArray(t)||O(t)?e(t):""!==t?t:void 0}):O(t[i])?n[i]=e(t[i]):n[i]=""!==t[i]?t[i]:void 0}return n}(n),r[i?"validateSync":"validate"](o,{abortEarly:!1,context:s}));return new Promise(function(e,t){u.then(function(){e(nR)},function(n){"ValidationError"===n.name?e(function(e){var t={};if(e.inner){if(0===e.inner.length)return nI(t,e.path,e.message);for(var n=e.inner,r=Array.isArray(n),i=0,n=r?n:n[Symbol.iterator]();;){if(r){if(i>=n.length)break;s=n[i++]}else{if((i=n.next()).done)break;s=i.value}var s,o=s;nT(t,o.path)||(t=nI(t,o.path,o.message))}}return t}(n)):t(n)})})},[m.validationSchema]),k=(0,r.useCallback)(function(e,t){return new Promise(function(n){return n(w.current[e].validate(t))})},[]),C=(0,r.useCallback)(function(e){var t=Object.keys(w.current).filter(function(e){return nb(w.current[e].validate)});return Promise.all(t.length>
34090?t.map(function(t){return k(t,nT(e,t))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")]).then(function(e){return e.reduce(function(e,n,r){return"DO_NOT_DELETE_YOU_WILL_BE_FIRED"===n||n&&(e=nI(e,t[r],n)),e},{})})},[k]),R=(0,r.useCallback)(function(e){return Promise.all([C(e),m.validationSchema?I(e):{},m.validate?T(e):{}]).then(function(e){var t=e[0],n=e[1],r=e[2];return c.all([t,n,r],{arrayMerge:nD})})},[m.validate,m.validationSchema,C,T,I]),A=nP(function(e){return void 0===e&&(e=x.values),S({type:"SET_ISVALIDATING",payload:!0}),R(e).then(function(e){return b.current&&(S({type:"SET_ISVALIDATING",payload:!1}),S({type:"SET_ERRORS",payload:e})),e})});(0,r.useEffect)(function(){l&&!0===b.current&&s()(g.current,m.initialValues)&&A(g.current)},[l,A]);var D=(0,r.useCallback)(function(e){var t=e&&e.values?e.values:g.current,n=e&&e.errors?e.errors:y.current?y.current:m.initialErrors||{},r=e&&e.touched?e.touched:v.current?v.current:m.initialTouched||{},i=e&&e.status?e.status:_.current?_.current:m.initialStatus;g.current=t,y.current=n,v.current=r,_.current=i;var s=function(){S({type:"RESET_FORM",payload:{isSubmitting:!!e&&!!e.isSubmitting,errors:n,touched:r,status:i,values:t,isValidating:!!e&&!!e.isValidating,submitCount:e&&e.submitCount&&"number"==typeof e.submitCount?e.submitCount:0}})};if(m.onReset){var o=m.onReset(x.values,Q);nS(o)?o.then(s):s()}else s()},[m.initialErrors,m.initialStatus,m.initialTouched]);(0,r.useEffect)(function(){!0===b.current&&!s()(g.current,m.initialValues)&&(d&&(g.current=m.initialValues,D()),l&&A(g.current))},[d,m.initialValues,D,l,A]),(0,r.useEffect)(function(){d&&!0===b.current&&!s()(y.current,m.initialErrors)&&(y.current=m.initialErrors||nR,S({type:"SET_ERRORS",payload:m.initialErrors||nR}))},[d,m.initialErrors]),(0,r.useEffect)(function(){d&&!0===b.current&&!s()(v.current,m.initialTouched)&&(v.current=m.initialTouched||nA,S({type:"SET_TOUCHED",payload:m.initialTouched||nA}))},[d,m.initialTouched]),(0,r.useEffect)(function(){d&&!0===b.current&&!s()(_.current,m.initialStatus)&&(_.current=m.initialStatus,S({type:"SET_STATUS",payload:m.initialStatus}))},[d,m.initialStatus,m.initialTouched]);var N=nP(function(e){if(w.current[e]&&nb(w.current[e].validate)){var t=nT(x.values,e),n=w.current[e].validate(t);return nS(n)?(S({type:"SET_ISVALIDATING",payload:!0}),n.then(function(e){return e}).then(function(t){S({type:"SET_FIELD_ERROR",payload:{field:e,value:t}}),S({type:"SET_ISVALIDATING",payload:!1})})):(S({type:"SET_FIELD_ERROR",payload:{field:e,value:n}}),Promise.resolve(n))}return m.validationSchema?(S({type:"SET_ISVALIDATING",payload:!0}),I(x.values,e).then(function(e){return e}).then(function(t){S({type:"SET_FIELD_ERROR",payload:{field:e,value:t[e]}}),S({type:"SET_ISVALIDATING",payload:!1})})):Promise.resolve()}),P=(0,r.useCallback)(function(e,t){var n=t.validate;w.current[e]={validate:n}},[]),F=(0,r.useCallback)(function(e){delete w.current[e]},[]),M=nP(function(e,t){return S({type:"SET_TOUCHED",payload:e}),(void 0===t?o:t)?A(x.values):Promise.resolve()}),L=(0,r.useCallback)(function(e){S({type:"SET_ERRORS",payload:e})},[]),j=nP(function(e,t){var r=nb(e)?e(x.values):e;return S({type:"SET_VALUES",payload:r}),(void 0===t?n:t)?A(r):Promise.resolve()}),U=(0,r.useCallback)(function(e,t){S({type:"SET_FIELD_ERROR",payload:{field:e,value:t}})},[]),B=nP(function(e,t,r){return S({type:"SET_FIELD_VALUE",payload:{field:e,value:t}}),(void 0===r?n:r)?A(nI(x.values,e,t)):Promise.resolve()}),Z=(0,r.useCallback)(function(e,t){var n,r=t,i=e;if(!nE(e)){e.persist&&e.persist();var s,o=e.target?e.target:e.currentTarget,a=o.type,l=o.name,u=o.id,c=o.value,h=o.checked,d=(o.outerHTML,o.options),f=o.multiple;r=t||l||u,i=/number|range/.test(a)?(n=parseFloat(c),isNaN(n)?"":n):/checkbox/.test(a)?function(e,t,n){if("boolean"==typeof e)return Boolean(t);var r=[],i=!1,s=-1;if(Array.isArray(e))r=e,i=(s=e.indexOf(n))>=0;else if(!n||"true"==n||"false"==n)return Boolean(t);return t&&n&&!i?r.concat(n):i?r.slice(0,s).concat(r.slice(s+1)):r}(nT(x.values,r),h,c):d&&f?(s=d,Array.from(s).filter(function(e){return e.selected}).map(function(e){return e.value})):c}r&&B(r,i)},[B,x.values]),$=nP(function(e){if(nE(e))return function(t){return Z(t,e)};Z(e)}),V=nP(function(e,t,n){return void 0===t&&(t=!0),S({type:"SET_FIELD_TOUCHED",payload:{field:e,value:t}}),(void 0===n?o:n)?A(x.values):Promise.resolve()}),z=(0,r.useCallback)(function(e,t){e.persist&&e.persist();var n=e.target,r=n.name,i=n.id;n.outerHTML,V(t||r||i,!0)},[V]),q=nP(function(e){if(nE(e))return function(t){return z(t,e)};z(e)}),G=(0,r.useCallback)(function(e){nb(e)?S({type:"SET_FORMIK_STATE",payload:e}):S({type:"SET_FORMIK_STATE",payload:function(){return e}})}
3409,[]),W=(0,r.useCallback)(function(e){S({type:"SET_STATUS",payload:e})},[]),H=(0,r.useCallback)(function(e){S({type:"SET_ISSUBMITTING",payload:e})},[]),K=nP(function(){return S({type:"SUBMIT_ATTEMPT"}),A().then(function(e){var t,n=e instanceof Error;if(!n&&0===Object.keys(e).length){try{if(void 0===(t=X()))return}catch(r){throw r}return Promise.resolve(t).then(function(e){return b.current&&S({type:"SUBMIT_SUCCESS"}),e}).catch(function(e){if(b.current)throw S({type:"SUBMIT_FAILURE"}),e})}if(b.current&&(S({type:"SUBMIT_FAILURE"}),n))throw e})}),Y=nP(function(e){e&&e.preventDefault&&nb(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&nb(e.stopPropagation)&&e.stopPropagation(),K().catch(function(e){console.warn("Warning: An unhandled error was caught from submitForm()",e)})}),Q={resetForm:D,validateForm:A,validateField:N,setErrors:L,setFieldError:U,setFieldTouched:V,setFieldValue:B,setStatus:W,setSubmitting:H,setTouched:M,setValues:j,setFormikState:G,submitForm:K},X=nP(function(){return f(x.values,Q)}),J=nP(function(e){e&&e.preventDefault&&nb(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&nb(e.stopPropagation)&&e.stopPropagation(),D()}),ee=(0,r.useCallback)(function(e){return{value:nT(x.values,e),error:nT(x.errors,e),touched:!!nT(x.touched,e),initialValue:nT(g.current,e),initialTouched:!!nT(v.current,e),initialError:nT(y.current,e)}},[x.errors,x.touched,x.values]),et=(0,r.useCallback)(function(e){return{setValue:function(t,n){return B(e,t,n)},setTouched:function(t,n){return V(e,t,n)},setError:function(t){return U(e,t)}}},[B,V,U]),en=(0,r.useCallback)(function(e){var t=nw(e),n=t?e.name:e,r=nT(x.values,n),i={name:n,value:r,onChange:$,onBlur:q};if(t){var s=e.type,o=e.value,a=e.as,l=e.multiple;"checkbox"===s?void 0===o?i.checked=!!r:(i.checked=!!(Array.isArray(r)&&~r.indexOf(o)),i.value=o):"radio"===s?(i.checked=r===o,i.value=o):"select"===a&&l&&(i.value=i.value||[],i.multiple=!0)}return i},[q,$,x.values]),er=(0,r.useMemo)(function(){return!s()(g.current,x.values)},[g.current,x.values]),ei=(0,r.useMemo)(function(){return void 0!==u?er?x.errors&&0===Object.keys(x.errors).length:!1!==u&&nb(u)?u(m):u:x.errors&&0===Object.keys(x.errors).length},[u,er,x.errors,m]);return nm({},x,{initialValues:g.current,initialErrors:y.current,initialTouched:v.current,initialStatus:_.current,handleBlur:q,handleChange:$,handleReset:J,handleSubmit:Y,resetForm:D,setErrors:L,setFormikState:G,setFieldTouched:V,setFieldValue:B,setFieldError:U,setStatus:W,setSubmitting:H,setTouched:M,setValues:j,submitForm:K,validateForm:A,validateField:N,isValid:ei,dirty:er,unregisterField:F,registerField:P,getFieldProps:en,getFieldMeta:ee,getFieldHelpers:et,validateOnBlur:o,validateOnChange:n,validateOnMount:l})}function nD(e,t,n){var r=e.slice();return t.forEach(function(t,i){if(void 0===r[i]){var s=!1!==n.clone&&n.isMergeableObject(t);r[i]=s?c(Array.isArray(t)?[]:{},t,n):t}else n.isMergeableObject(t)?r[i]=c(e[i],t,n):-1===e.indexOf(t)&&r.push(t)}),r}var nN="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?r.useLayoutEffect:r.useEffect;function nP(e){var t=(0,r.useRef)(e);return nN(function(){t.current=e}),(0,r.useCallback)(function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.current.apply(void 0,n)},[])}(0,r.forwardRef)(function(e,t){var n,i=e.action,s=ny(e,["action"]),o=((n=(0,r.useContext)(nk))||np(!1),n),a=o.handleReset,l=o.handleSubmit;return(0,r.createElement)("form",Object.assign({onSubmit:l,ref:t,onReset:a,action:null!=i?i:"#"},s))}).displayName="Form";var nF=function(e,t,n){var r=nU(e),i=r[t];return r.splice(t,1),r.splice(n,0,i),r},nM=function(e,t,n){var r=nU(e),i=r[t];return r[t]=r[n],r[n]=i,r},nL=function(e,t,n){var r=nU(e);return r.splice(t,0,n),r},nj=function(e,t,n){var r=nU(e);return r[t]=n,r},nU=function(e){if(!e)return[];if(Array.isArray(e))return[].concat(e);var t=Object.keys(e).map(function(e){return parseInt(e)}).reduce(function(e,t){return t>e?t:e},0);return Array.from(nm({},e,{length:t+1}))};(function(e){function t(t){var n;return(n=e.call(this,t)||this).updateArrayField=function(e,t,r){var i=n.props,s=i.name;(0,i.formik.setFormikState)(function(n){var i=nI(n.values,s,e(nT(n.values,s))),o=r?("function"==typeof r?r:e)(nT(n.errors,s)):void 0,a=t?("function"==typeof t?t:e)(nT(n.touched,s)):void 0;return n_(o)&&(o=void 0),n_(a)&&(a=void 0),nm({},n,{values:i,errors:r?nI(n.errors,s,o):n.errors,touched:t?nI(n.touched,s,a):n.touched})})},n.push=function(e){return n.updateArrayField(function(t){var n;return[].concat(nU(t),[t8(e,5)])},!1,!1)},n.handlePush=function(e){return function(){return n.push(e)}},n.swap=function(e,t){return n.updateArrayField(function(n){return nM(n,e,t)},!0,!0)},n.handleSwap=function(e,t){return function(){return n.swap(e,t)}},n.move=function(e,t){return n.updateArrayField(function(n){return nF(n,e,t)},!0,!0)},n.handleMove=function(e,t){return function(){return n.move(e,t)}},n.insert=function(e,t){return n.updateArrayField(function(n){return nL(n,e,t)},function(t){return nL(t,e,null)},function(t){return nL(t,e,null)})},n.handleInsert=function(e,t){return function(){return n.insert(e,t)}},n.replace=function(e,t){return n.updateArrayField(function(n){return nj(n,e,t)},!1,!1)},n.handleReplace=function(e,t){return function(){return n.replace(e,t)}},n.unshift=function(e){var t=-1;return n.updateArrayField(function(n){var r=n?[e].concat(n):[e];return t<0&&(t=r.length),r},function(e){var n=e?[null].concat(e):[null];return t<0&&(t=n.length),n},function(e){var n=e?[null].concat(e):[null];return t<0&&(t=n.length),n}),t},n.handleUnshift=function(e){return function(){return n.unshift(e)}},n.handleRemove=function(e){return function(){return n.remove(e)}},n.handlePop=function(){return function(){return n.pop()}},n.remove=n.remove.bind(nv(n)),n.pop=n.pop.bind(nv(n)),n}ng(t,e);var n=t.prototype;return n.componentDidUpdate=function(e){this.props.validateOnChange&&this.props.formik.validateOnChange&&!s()(nT(e.formik.values,e.name),nT(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},n.remove=function(e){var t;return this.updateArrayField(function(n){var r=n?nU(n):[];return t||(t=r[e]),nb(r.splice)&&r.splice(e,1),r},!0,!0),t},n.pop=function(){var e;return this.updateArrayField(function(t){return e||(e=t&&t.pop&&t.pop()),t},!0,!0),e},n.render=function(){var e={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},t=this.props,n=t.component,i=t.render,s=t.children,o=t.name,a=ny(t.formik,["validate","validationSchema"]),l=nm({},e,{form:a,name:o});return n?(0,r.createElement)(n,l):i?i(l):s?"function"==typeof s?s(l):nx(s)?null:r.Children.only(s):null},t})(r.Component).defaultProps={validateOnChange:!0},r.Component,r.Component},8679:function(e,t,n){"use strict";var r=n(9864),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},s={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function l(e){return r.isMemo(e)?o:a[e.$$typeof]||i}a[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[r.Memo]=o;var u=Object.defineProperty,c=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(p){var i=f(n);i&&i!==p&&e(t,i,r)}var o=c(n);
3409h&&(o=o.concat(h(n)));for(var a=l(t),m=l(n),g=0;g<o.length;++g){var y=o[g];if(!s[y]&&!(r&&r[y])&&!(m&&m[y])&&!(a&&a[y])){var v=d(n,y);try{u(t,y,v)}catch(_){}}}}return t}},8552:function(e,t,n){var r=n(852),i=n(5639),s=r(i,"DataView");e.exports=s},1989:function(e,t,n){var r=n(1789),i=n(401),s=n(7667),o=n(1327),a=n(1866);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=s,l.prototype.has=o,l.prototype.set=a,e.exports=l},8407:function(e,t,n){var r=n(7040),i=n(4125),s=n(2117),o=n(7518),a=n(4705);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=s,l.prototype.has=o,l.prototype.set=a,e.exports=l},7071:function(e,t,n){var r=n(852),i=n(5639),s=r(i,"Map");e.exports=s},3369:function(e,t,n){var r=n(4785),i=n(1285),s=n(6e3),o=n(9916),a=n(5265);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=s,l.prototype.has=o,l.prototype.set=a,e.exports=l},3818:function(e,t,n){var r=n(852),i=n(5639),s=r(i,"Promise");e.exports=s},8525:function(e,t,n){var r=n(852),i=n(5639),s=r(i,"Set");e.exports=s},8668:function(e,t,n){var r=n(3369),i=n(619),s=n(2385);function o(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}o.prototype.add=o.prototype.push=i,o.prototype.has=s,e.exports=o},6384:function(e,t,n){var r=n(8407),i=n(7465),s=n(3779),o=n(7599),a=n(4758),l=n(4309);function u(e){var t=this.__data__=new r(e);this.size=t.size}u.prototype.clear=i,u.prototype.delete=s,u.prototype.get=o,u.prototype.has=a,u.prototype.set=l,e.exports=u},2705:function(e,t,n){var r=n(5639).Symbol;e.exports=r},1149:function(e,t,n){var r=n(5639).Uint8Array;e.exports=r},577:function(e,t,n){var r=n(852),i=n(5639),s=r(i,"WeakMap");e.exports=s},4963:function(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,s=[];++n<r;){var o=e[n];t(o,n,e)&&(s[i++]=o)}return s}},4636:function(e,t,n){var r=n(2545),i=n(5694),s=n(1469),o=n(4144),a=n(213),l=n(6719),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=s(e),c=!n&&i(e),h=!n&&!c&&o(e),d=!n&&!c&&!h&&l(e),f=n||c||h||d,p=f?r(e.length,String):[],m=p.length;for(var g in e)(t||u.call(e,g))&&!(f&&("length"==g||h&&("offset"==g||"parent"==g)||d&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||a(g,m)))&&p.push(g);return p}},9932:function(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},2488:function(e){e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},2663:function(e){e.exports=function(e,t,n,r){var i=-1,s=null==e?0:e.length;for(r&&s&&(n=e[++i]);++i<s;)n=t(n,e[i],i,e);return n}},2908:function(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},4286:function(e){e.exports=function(e){return e.split("")}},9029:function(e){var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(t)||[]}},8470:function(e,t,n){var r=n(7813);e.exports=function(e,t){for(var n=e.length;n--;
3409)if(r(e[n][0],t))return n;return -1}},9465:function(e,t,n){var r=n(8777);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},8483:function(e,t,n){var r=n(5063)();e.exports=r},7816:function(e,t,n){var r=n(8483),i=n(3674);e.exports=function(e,t){return e&&r(e,t,i)}},7786:function(e,t,n){var r=n(1811),i=n(327);e.exports=function(e,t){t=r(t,e);for(var n=0,s=t.length;null!=e&&n<s;)e=e[i(t[n++])];return n&&n==s?e:void 0}},8866:function(e,t,n){var r=n(2488),i=n(1469);e.exports=function(e,t,n){var s=t(e);return i(e)?s:r(s,n(e))}},4239:function(e,t,n){var r=n(2705),i=n(9607),s=n(2333),o=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":o&&o in Object(e)?i(e):s(e)}},8565:function(e){var t=Object.prototype.hasOwnProperty;e.exports=function(e,n){return null!=e&&t.call(e,n)}},13:function(e){e.exports=function(e,t){return null!=e&&t in Object(e)}},9454:function(e,t,n){var r=n(4239),i=n(7005);e.exports=function(e){return i(e)&&"[object Arguments]"==r(e)}},939:function(e,t,n){var r=n(2492),i=n(7005);function s(e,t,n,o,a){return e===t||(null!=e&&null!=t&&(i(e)||i(t))?r(e,t,n,o,s,a):e!=e&&t!=t)}e.exports=s},2492:function(e,t,n){var r=n(6384),i=n(7114),s=n(8351),o=n(6096),a=n(4160),l=n(1469),u=n(4144),c=n(6719),h="[object Arguments]",d="[object Array]",f="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,m,g,y){var v=l(e),_=l(t),b=v?d:a(e),w=_?d:a(t);b=b==h?f:b,w=w==h?f:w;var E=b==f,x=w==f,S=b==w;if(S&&u(e)){if(!u(t))return!1;v=!0,E=!1}if(S&&!E)return y||(y=new r),v||c(e)?i(e,t,n,m,g,y):s(e,t,b,n,m,g,y);if(!(1&n)){var T=E&&p.call(e,"__wrapped__"),I=x&&p.call(t,"__wrapped__");
3409if(T||I){var k=T?e.value():e,C=I?t.value():t;return y||(y=new r),g(k,C,n,m,y)}}return!!S&&(y||(y=new r),o(e,t,n,m,g,y))}},2958:function(e,t,n){var r=n(6384),i=n(939);e.exports=function(e,t,n,s){var o=n.length,a=o,l=!s;if(null==e)return!a;for(e=Object(e);o--;){var u=n[o];if(l&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<a;){var c=(u=n[o])[0],h=e[c],d=u[1];if(l&&u[2]){if(void 0===h&&!(c in e))return!1}else{var f=new r;if(s)var p=s(h,d,c,e,t,f);if(!(void 0===p?i(d,h,3,s,f):p))return!1}}return!0}},8458:function(e,t,n){var r=n(3560),i=n(5346),s=n(3218),o=n(346),a=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,c=l.toString,h=u.hasOwnProperty,d=RegExp("^"+c.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!s(e)||i(e))&&(r(e)?d:a).test(o(e))}},8749:function(e,t,n){var r=n(4239),i=n(1780),s=n(7005),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,e.exports=function(e){return s(e)&&i(e.length)&&!!o[r(e)]}},7206:function(e,t,n){var r=n(1573),i=n(6432),s=n(6557),o=n(1469),a=n(9601);e.exports=function(e){return"function"==typeof e?e:null==e?s:"object"==typeof e?o(e)?i(e[0],e[1]):r(e):a(e)}},280:function(e,t,n){var r=n(5726),i=n(6916),s=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))s.call(e,n)&&"constructor"!=n&&t.push(n);return t}},1573:function(e,t,n){var r=n(2958),i=n(1499),s=n(2634);e.exports=function(e){var t=i(e);return 1==t.length&&t[0][2]?s(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},6432:function(e,t,n){var r=n(939),i=n(7361),s=n(9095),o=n(5403),a=n(9162),l=n(2634),u=n(327);e.exports=function(e,t){return o(e)&&a(t)?l(u(e),t):function(n){var o=i(n,e);return void 0===o&&o===t?s(n,e):r(t,o,3)}}},371:function(e){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},9152:function(e,t,n){var r=n(7786);e.exports=function(e){return function(t){return r(t,e)}}},8674:function(e){e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},4259:function(e){e.exports=function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(i);++r<i;)s[r]=e[r+t];return s}},2545:function(e){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},531:function(e,t,n){var r=n(2705),i=n(9932),s=n(1469),o=n(3448),a=1/0,l=r?r.prototype:void 0,u=l?l.toString:void 0;function c(e){if("string"==typeof e)return e;if(s(e))return i(e,c)+"";if(o(e))return u?u.call(e):"";var t=e+"";return"0"==t&&1/e==-a?"-0":t}e.exports=c},1717:function(e){e.exports=function(e){return function(t){return e(t)}}},4757:function(e){e.exports=function(e,t){return e.has(t)}},1811:function(e,t,n){var r=n(1469),i=n(5403),s=n(5514),o=n(9833);e.exports=function(e,t){return r(e)?e:i(e,t)?[e]:s(o(e))}},180:function(e,t,n){var r=n(4259);e.exports=function(e,t,n){var i=e.length;return n=void 0===n?i:n,!t&&n>=i?e:r(e,t,n)}},4429:function(e,t,n){var r=n(5639)["__core-js_shared__"];e.exports=r},5063:function(e){e.exports=function(e){return function(t,n,r){for(var i=-1,s=Object(t),o=r(t),a=o.length;a--;){var l=o[e?a:++i];if(!1===n(s[l],l,s))break}return t}}},8805:function(e,t,n){var r=n(180),i=n(2689),s=n(3140),o=n(9833);e.exports=function(e){return function(t){t=o(t);var n=i(t)?s(t):void 0,a=n?n[0]:t.charAt(0),l=n?r(n,1).join(""):t.slice(1);return a[e]()+l}}},5393:function(e,t,n){var r=n(2663),i=n(3816),s=n(4348),o=RegExp("['â]","g");e.exports=function(e){return function(t){return r(s(i(t).replace(o,"")),e,"")}}},9389:function(e,t,n){var r,i=n(8674)({Ã:"A",Ã:"A",Ã:"A",Ã:"A",Ã:"A",Ã
:"A",à :"a",á:"a",â:"a",ã:"a",ä:"a",Ã¥:"a",Ã:"C",ç:"c",Ã:"D",ð:"d",Ã:"E",Ã:"E",Ã:"E",Ã:"E",è:"e",é:"e",ê:"e",ë:"e",Ã:"I",Ã:"I",Ã:"I",Ã:"I",ì:"i",Ã:"i",î:"i",ï:"i",Ã:"N",ñ:"n",Ã:"O",Ã:"O",Ã:"O",Ã:"O",Ã:"O",Ã:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ã:"U",Ã:"U",Ã:"U",Ã:"U",ù:"u",ú:"u",û:"u",ü:"u",Ã:"Y",ý:"y",ÿ:"y",Ã:"Ae",æ:"ae",Ã:"Th",þ:"th",Ã:"ss",Ä:"A",Ä:"A",Ä:"A",Ä:"a",Ä:"a",Ä
:"a",Ä:"C",Ä:"C",Ä:"C",Ä:"C",Ä:"c",Ä:"c",Ä:"c",Ä:"c",Ä:"D",Ä:"D",Ä:"d",Ä:"d",Ä:"E",Ä:"E",Ä:"E",Ä:"E",Ä:"E",Ä:"e",Ä:"e",Ä:"e",Ä:"e",Ä:"e",Ä:"G",Ä:"G",Ä :"G",Ä¢:"G",Ä:"g",Ä:"g",Ä¡:"g",Ä£:"g",Ĥ:"H",Ħ:"H",Ä¥:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Ä®:"I",İ:"I",Ä©:"i",Ä«:"i",Ä:"i",į:"i",ı:"i",Ä´:"J",ĵ:"j",Ķ:"K",Ä·:"k",ĸ:"k",Ĺ:"L",Ä»:"L",Ľ:"L",Ä¿:"L",Å:"L",ĺ:"l",ļ:"l",ľ:"l",Å:"l",Å:"l",Å:"N",Å
:"N",Å:"N",Å:"N",Å:"n",Å:"n",Å:"n",Å:"n",Å:"O",Å:"O",Å:"O",Å:"o",Å:"o",Å:"o",Å:"R",Å:"R",Å:"R",Å:"r",Å:"r",Å:"r",Å:"S",Å:"S",Å:"S",Å :"S",Å:"s",Å:"s",Å:"s",Å¡:"s",Å¢:"T",Ť:"T",Ŧ:"T",Å£:"t",Å¥:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Å®:"U",Ű:"U",Ų:"U",Å©:"u",Å«:"u",Å:"u",ů:"u",ű:"u",ų:"u",Å´:"W",ŵ:"w",Ŷ:"Y",Å·:"y",Ÿ:"Y",Ź:"Z",Å»:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Å:"Oe",Å:"oe",Å:"'n",Å¿:"s"});e.exports=i},8777:function(e,t,n){var r=n(852),i=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();e.exports=i},7114:function(e,t,n){var r=n(8668),i=n(2908),s=n(4757);e.exports=function(e,t,n,o,a,l){var u=1&n,c=e.length,h=t.length;if(c!=h&&!(u&&h>c))return!1;var d=l.get(e),f=l.get(t);if(d&&f)return d==t&&f==e;var p=-1,m=!0,g=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++p<c;){var y=e[p],v=t[p];if(o)var _=u?o(v,y,p,t,e,l):o(y,v,p,e,t,l);if(void 0!==_){if(_)continue;m=!1;break}if(g){if(!i(t,function(e,t){if(!s(g,t)&&(y===e||a(y,e,n,o,l)))return g.push(t)})){m=!1;break}}else if(!(y===v||a(y,v,n,o,l))){m=!1;break}}return l.delete(e),l.delete(t),m}},8351:function(e,t,n){var r=n(2705),i=n(1149),s=n(7813),o=n(7114),a=n(8776),l=n(1814),u=r?r.prototype:void 0,c=u?u.valueOf:void 0;e.exports=function(e,t,n,r,u,h,d){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!h(new i(e),new i(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return s(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var f=a;case"[object Set]":if(f||(f=l),e.size!=t.size&&!(1&r))break;var p=d.get(e);if(p)return p==t;r|=2,d.set(e,t);var m=o(f(e),f(t),r,u,h,d);return d.delete(e),m;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},6096:function(e,t,n){var r=n(8234),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,s,o,a){var l=1&n,u=r(e),c=u.length;if(c!=r(t).length&&!l)return!1;for(var h=c;h--;){var d=u[h];if(!(l?d in t:i.call(t,d)))return!1}var f=a.get(e),p=a.get(t);if(f&&p)return f==t&&p==e;var m=!0;a.set(e,t),a.set(t,e);for(var g=l;++h<c;){var y=e[d=u[h]],v=t[d];if(s)var _=l?s(v,y,d,t,e,a):s(y,v,d,e,t,a);if(!(void 0===_?y===v||o(y,v,n,s,a):_)){m=!1;break}g||(g="constructor"==d)}if(m&&!g){var b=e.constructor,w=t.constructor;b!=w&&"constructor"in e&&"constructor"in t&&!("function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w)&&(m=!1)}return a.delete(e),a.delete(t),m}},1957:function(e,t,n){var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},8234:function(e,t,n){var r=n(8866),i=n(9551),s=n(3674);e.exports=function(e){return r(e,s,i)}},5050:function(e,t,n){var r=n(7019);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},1499:function(e,t,n){var r=n(9162),i=n(3674);e.exports=function(e){for(var t=i(e),n=t.length;n--;){var s=t[n],o=e[s];t[n]=[s,o,r(o)]}return t}},852:function(e,t,n){var r=n(8458),i=n(7801);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},9607:function(e,t,n){var r=n(2705),i=Object.prototype,s=i.hasOwnProperty,o=i.toString,a=r?r.toStringTag:void 0;e.exports=function(e){var t=s.call(e,a),n=e[a];try{e[a]=void 0;var r=!0}catch(i){}var l=o.call(e);return r&&(t?e[a]=n:delete e[a]),l}},9551:function(e,t,n){var r=n(4963),i=n(479),s=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,a=o?function(e){return null==e?[]:r(o(e=Object(e)),function(t){return s.call(e,t)})}:i;e.exports=a},4160:function(e,t,n){var r=n(8552),i=n(7071),s=n(3818),o=n(8525),a=n(577),l=n(4239),u=n(346),c="[object Map]",h="[object Promise]",d="[object Set]",f="[object WeakMap]",p="[object DataView]",m=u(r),g=u(i),y=u(s),v=u(o),_=u(a),b=l;
vendor: 4,465 bytes, line 3409
3409(r&&b(new r(new ArrayBuffer(1)))!=p||i&&b(new i)!=c||s&&b(s.resolve())!=h||o&&b(new o)!=d||a&&b(new a)!=f)&&(b=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,r=n?u(n):"";if(r)switch(r){case m:return p;case g:return c;case y:return h;case v:return d;case _:return f}return t}),e.exports=b},7801:function(e){e.exports=function(e,t){return null==e?void 0:e[t]}},222:function(e,t,n){var r=n(1811),i=n(5694),s=n(1469),o=n(213),a=n(1780),l=n(327);e.exports=function(e,t,n){t=r(t,e);for(var u=-1,c=t.length,h=!1;++u<c;){var d=l(t[u]);if(!(h=null!=e&&n(e,d)))break;e=e[d]}return h||++u!=c?h:!!(c=null==e?0:e.length)&&a(c)&&o(d,c)&&(s(e)||i(e))}},2689:function(e){var t=RegExp("[\\u200d\ud800-\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},3157:function(e){var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;e.exports=function(e){return t.test(e)}},1789:function(e,t,n){var r=n(4536);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},401:function(e){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},7667:function(e,t,n){var r=n(4536),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},1327:function(e,t,n){var r=n(4536),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},1866:function(e,t,n){var r=n(4536);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},213:function(e){var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},5403:function(e,t,n){var r=n(1469),i=n(3448),s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!!("number"==n||"symbol"==n||"boolean"==n||null==e||i(e))||o.test(e)||!s.test(e)||null!=t&&e in Object(t)}},7019:function(e){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},5346:function(e,t,n){var r,i=n(4429),s=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!s&&s in e}},5726:function(e){var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},9162:function(e,t,n){var r=n(3218);e.exports=function(e){return e==e&&!r(e)}},7040:function(e){e.exports=function(){this.__data__=[],this.size=0}},4125:function(e,t,n){var r=n(8470),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():i.call(t,n,1),--this.size,!0)}},2117:function(e,t,n){var r=n(8470);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},7518:function(e,t,n){var r=n(8470);e.exports=function(e){return r(this.__data__,e)>-1}},4705:function(e,t,n){var r=n(8470);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},4785:function(e,t,n){var r=n(1989),i=n(8407),s=n(7071);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(s||i),string:new r}}},1285:function(e,t,n){var r=n(5050);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},6e3:function(e,t,n){var r=n(5050);e.exports=function(e){return r(this,e).get(e)}},9916:function(e,t,n){var r=n(5050);e.exports=function(e){return r(this,e).has(e)}},5265:function(e,t,n){var r=n(5050);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},8776:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}},2634:function(e){e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},4523:function(e,t,n){var r=n(8306);e.exports=function(e){var t=r(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}},4536:function(e,t,n){var r=n(852)(Object,"create");e.exports=r},6916:function(e,t,n){var r=n(5569)(Object.keys,Object);e.exports=r},1167:function(e,t,n){e=n.nmd(e);var r=n(1957),i=t&&!t.nodeType&&t,s=i&&e&&!e.nodeType&&e,o=s&&s.exports===i&&r.process,a=function(){try{var e=s&&s.require&&s.require("util").t
3409ypes;if(e)return e;return o&&o.binding&&o.binding("util")}catch(t){}}();e.exports=a},2333:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5569:function(e){e.exports=function(e,t){return function(n){return e(t(n))}}},5639:function(e,t,n){var r=n(1957),i="object"==typeof self&&self&&self.Object===Object&&self,s=r||i||Function("return this")();e.exports=s},619:function(e){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},2385:function(e){e.exports=function(e){return this.__data__.has(e)}},1814:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}},7465:function(e,t,n){var r=n(8407);e.exports=function(){this.__data__=new r,this.size=0}},3779:function(e){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},7599:function(e){e.exports=function(e){return this.__data__.get(e)}},4758:function(e){e.exports=function(e){return this.__data__.has(e)}},4309:function(e,t,n){var r=n(8407),i=n(7071),s=n(3369);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var o=n.__data__;if(!i||o.length<199)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new s(o)}return n.set(e,t),this.size=n.size,this}},3140:function(e,t,n){var r=n(4286),i=n(2689),s=n(5889);e.exports=function(e){return i(e)?s(e):r(e)}},5514:function(e,t,n){var r=n(4523),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g,o=r(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,function(e,n,r,i){t.push(r?i.replace(s,"$1"):n||e)}),t});e.exports=o},327:function(e,t,n){var r=n(3448),i=1/0;e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}},346:function(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(n){}try{return e+""}catch(r){}}return""}},5889:function(e){var t="\ud800-\udfff",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",r="\ud83c[\udffb-\udfff]",i="[^"+t+"]",s="(?:\ud83c[\udde6-\uddff]){2}",o="[\ud800-\udbff][\udc00-\udfff]",a="(?:"+n+"|"+r+")?",l="[\\ufe0e\\ufe0f]?",u="(?:\\u200d(?:"+[i,s,o].join("|")+")"+l+a+")*",c=RegExp(r+"(?="+r+")|"+("(?:"+[i+n+"?",n,s,o,"["+t+"]"].join("|"))+")"+(l+a+u),"g");e.exports=function(e){return e.match(c)||[]}},2757:function(e){var t="\ud800-\udfff",n="\\u2700-\\u27bf",r="a-z\\xdf-\\xf6\\xf8-\\xff",i="A-Z\\xc0-\\xd6\\xd8-\\xde",s="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",o="['â]",a="["+s+"]",l="["+r+"]",u="[^"+t+s+"\\d+"+n+r+i+"]",c="(?:\ud83c[\udde6-\uddff]){2}",h="[\ud800-\udbff][\udc00-\udfff]",d="["+i+"]",f="(?:"+l+"|"+u+")",p="(?:"+o+"(?:d|ll|m|re|s|t|ve))?",m="(?:"+o+"(?:D|LL|M|RE|S|T|VE))?",g="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\ud83c[\udffb-\udfff])?",y="[\\ufe0e\\ufe0f]?",v="(?:\\u200d(?:"+["[^"+t+"]",c,h].join("|")+")"+y+g+")*",_="(?:"+["["+n+"]",c,h].join("|")+")"+(y+g+v),b=RegExp([d+"?"+l+"+"+p+"(?="+[a,d,"$"].join("|")+")","(?:"+d+"|"+u+")+"+m+"(?="+[a,d+f,"$"].join("|")+")",d+"?"+f+"+"+p,d+"+"+m,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])","\\d+",_].join("|"),"g");e.exports=function(e){return e.match(b)||[]}},8929:function(e,t,n){var r=n(8403),i=n(5393)(function(e,t,n){return t=t.toLowerCase(),e+(n?r(t):t)});e.exports=i},8403:function(e,t,n){var r=n(9833),i=n(1700);e.exports=function(e){return i(r(e).toLowerCase())}},3816:function(e,t,n){var r=n(9389),i=n(9833),s=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u01
34097f]/g,o=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=i(e))&&e.replace(s,r).replace(o,"")}},7813:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},7361:function(e,t,n){var r=n(7786);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},8721:function(e,t,n){var r=n(8565),i=n(222);e.exports=function(e,t){return null!=e&&i(e,t,r)}},9095:function(e,t,n){var r=n(13),i=n(222);e.exports=function(e,t){return null!=e&&i(e,t,r)}},6557:function(e){function t(e){return e}e.exports=t},5694:function(e,t,n){var r=n(9454),i=n(7005),s=Object.prototype,o=s.hasOwnProperty,a=s.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return i(e)&&o.call(e,"callee")&&!a.call(e,"callee")};e.exports=l},1469:function(e){var t=Array.isArray;e.exports=t},8612:function(e,t,n){var r=n(3560),i=n(1780);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},4144:function(e,t,n){e=n.nmd(e);var r=n(5639),i=n(5062),s=t&&!t.nodeType&&t,o=s&&e&&!e.nodeType&&e,a=o&&o.exports===s?r.Buffer:void 0,l=a?a.isBuffer:void 0;e.exports=l||i},3560:function(e,t,n){var r=n(4239),i=n(3218);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1780:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},3218:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},7005:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},3448:function(e,t,n){var r=n(4239),i=n(7005);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},6719:function(e,t,n){var r=n(8749),i=n(1717),s=n(1167),o=s&&s.isTypedArray,a=o?i(o):r;e.exports=a},3674:function(e,t,n){var r=n(4636),i=n(280),s=n(8612);e.exports=function(e){return s(e)?r(e):i(e)}},7523:function(e,t,n){var r=n(9465),i=n(7816),s=n(7206);e.exports=function(e,t){var n={};return t=s(t,3),i(e,function(e,i,s){r(n,t(e,i,s),e)}),n}},6604:function(e,t,n){var r=n(9465),i=n(7816),s=n(7206);e.exports=function(e,t){var n={};return t=s(t,3),i(e,function(e,i,s){r(n,i,t(e,i,s))}),n}},8306:function(e,t,n){var r=n(3369);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=e.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(i.Cache||r),n}i.Cache=r,e.exports=i},9601:function(e,t,n){var r=n(371),i=n(9152),s=n(5403),o=n(327);e.exports=function(e){return s(e)?r(o(e)):i(e)}},1865:function(e,t,n){var r=n(5393)(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()});e.exports=r},479:function(e){function t(){return[]}e.exports=t},5062:function(e){function t(){return!1}e.exports=t},9833:function(e,t,n){var r=n(531);e.exports=function(e){return null==e?"":r(e)}},1700:function(e,t,n){var r=n(8805)("toUpperCase");e.exports=r},4348:function(e,t,n){var r=n(9029),i=n(3157),s=n(9833),o=n(2757);e.exports=function(e,t,n){return(e=s(e),void 0===(t=n?void 0:t))?i(e)?o(e):r(e):e.match(t)||[]}},3454:function(e,t,n){"use strict";var r,i;e.exports=(null==(r=n.g.process)?void 0:r.env)&&"object"==typeof(null==(i=n.g.process)?void 0:i.env)?n.g.process:n(7663)},1118:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return n(643)}])},494:function(e,t,n){"use strict";n.d(t,{a:function(){return c}});var r=n(7568),i=n(655),s=n(5893),o=n(7294),a=n(5103),l=n(7702),u=(0,o.createContext)();function c(){return(0,o.useContext)(u)}t.Z=function(e){var t=e.children,n=function(e,t){return a.I8.signInWithEmailAndPassword(e,t)},c=function(){return a.I8.signOut()},h=function(e){return a.I8.sendPasswordResetEmail(e)},d=function(e){return m.updateEmail(e)},f=function(e){return m.updatePassword(e)},p=(0,o.useState)(),m=p[0],g=p[1],y=(0,o.useState)(!0),v=y[0],_=y[1],b=(0,l.v0)();function w(){return(w=(0,r.Z)(function(e,t){return(0,i.__generator)(this,function(n){return[2,a.I8.createUserWithEmailAndPassword(e,t)]})})).apply(this,arguments)}(0,o.useEffect)(function(){var e=(0,l.Aj)(b,function(e){e?g({uid:e.uid,email:e.email,displayName:e.displayName}):g(null),_(!1)});return function(){return e()}},[]);var E,x=(E=(0,r.Z)(function(){var e;return(0,i.__generator)(this,function(e){switch(e.label){case 0:return[4,a.I8.signInWithPopup(a.qV)];case 1:return[2,e.sent()]}})}),function(){return E.apply(this,arguments)});return(0,s.jsx)(u.Provider,{value:{currentUser:m,signup:function(e,t){return w.apply(this,arguments)}
3409,signInWithGoogle:x,login:n,logout:c,resetPassword:h,updateEmail:d,updatePassword:f},children:!v&&t})}},5052:function(e,t,n){"use strict";n.d(t,{P:function(){return l},S:function(){return u}});var r=n(6042),i=n(5893),s=n(1163),o=n(494),a=n(5177);function l(e){return function(t){var n=(0,o.a)().currentUser,a=(0,s.useRouter)();return n&&a.replace("/"),(0,i.jsx)(e,(0,r.Z)({},t))}}function u(e){return function(t){var n=(0,o.a)().currentUser,l=(0,s.useRouter)();return n?(0,i.jsx)(i.Fragment,{children:n?(0,i.jsx)(e,(0,r.Z)({},t)):null}):(l.replace("/ingresar"),(0,i.jsx)(a.Z,{}))}}n(7294)},5103:function(e,t,n){"use strict";n.d(t,{I8:function(){return n2},ZP:function(){return n5},qV:function(){return n4}});var r,i,s=n(4444),o=n(8463),a=n(2238),l=n(3333);/** 3410 * @license 3411 * Copyright 2020 Google LLC 3412 * 3413 * Licensed under the Apache License, Version 2.0 (the "License"); 3414 * you may not use this file except in compliance with the License. 3415 * You may obtain a copy of the License at 3416 * 3417 * http://www.apache.org/licenses/LICENSE-2.0 3418 * 3419 * Unless required by applicable law or agreed to in writing, software 3420 * distributed under the License is distributed on an "AS IS" BASIS, 3421 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3422 * See the License for the specific language governing permissions and 3423 * limitations under the License. 3424 */ class u{constructor(e,t){this._delegate=e,this.firebase=t,(0,a._addComponent)(e,new o.wA("app-compat",()=>this,"PUBLIC")),this.container=e.container}get automaticDataCollectionEnabled(){return this._delegate.automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this._delegate.automaticDataCollectionEnabled=e}get name(){return this._delegate.name}get options(){return this._delegate.options}delete(){return new Promise(e=>{this._delegate.checkDestroyed(),e()}).then(()=>(this.firebase.INTERNAL.removeApp(this.name),(0,a.deleteApp)(this._delegate)))}_getService(e,t=a._DEFAULT_ENTRY_NAME){var n;this._delegate.checkDestroyed();let r=this._delegate.container.getProvider(e);return r.isInitialized()||(null===(n=r.getComponent())||void 0===n?void 0:n.instantiationMode)!=="EXPLICIT"||r.initialize(),r.getImmediate({identifier:t})}_removeServiceInstance(e,t=a._DEFAULT_ENTRY_NAME){this._delegate.container.getProvider(e).clearInstance(t)}_addComponent(e){(0,a._addComponent)(this._delegate,e)}_addOrOverwriteComponent(e){(0,a._addOrOverwriteComponent)(this._delegate,e)}toJSON(){return{name:this.name,automaticDataCollectionEnabled:this.automaticDataCollectionEnabled,options:this.options}}}let c=new s.LL("app-compat","Firebase",{"no-app":"No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance."}),h=/** 3425 * @license 3426 * Copyright 2019 Google LLC 3427 * 3428 * Licensed under the Apache License, Version 2.0 (the "License"); 3429 * you may not use this file except in compliance with the License. 3430 * You may obtain a copy of the License at 3431 * 3432 * http://www.apache.org/licenses/LICENSE-2.0 3433 * 3434 * Unless required by applicable law or agreed to in writing, software 3435 * distributed under the License is distributed on an "AS IS" BASIS, 3436 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3437 * See the License for the specific language governing permissions and 3438 * limitations under the License. 3439 */ function e(){let t=/** 3440 * @license 3441 * Copyright 2019 Google LLC 3442 * 3443 * Licensed under the Apache License, Version 2.0 (the "License"); 3444 * you may not use this file except in compliance with the License. 3445 * You may obtain a copy of the License at 3446 * 3447 * http://www.apache.org/licenses/LICENSE-2.0 3448 * 3449 * Unless required by applicable law or agreed to in writing, software 3450 * distributed under the License is distributed on an "AS IS" BASIS, 3451 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3452 * See the License for the specific language governing permissions and 3453 * limitations under the License. 3454 */ function(e){let t={},n={__esModule:!0,initializeApp:function(r,i={}){let o=a.initializeApp(r,i);if((0,s.r3)(t,o.name))return t[o.name];let l=new e(o,n);return t[o.name]=l,l},app:r,registerVersion:a.registerVersion,setLogLevel:a.setLogLevel,onLog:a.onLog,apps:null,SDK_VERSION:a.SDK_VERSION,INTERNAL:{registerComponent:function(t){let i=t.name,o=i.replace("-compat","");if(a._registerComponent(t)&&"PUBLIC"===t.type){let l=(e=r())=>{if("function"!=typeof e[o])throw c.create("invalid-app-argument",{appName:i});return e[o]()};void 0!==t.serviceProps&&(0,s.ZB)(l,t.serviceProps),n[o]=l,e.prototype[o]=function(...e){let n=this._getService.bind(this,i);return n.apply(this,t.multipleInstances?e:[])}}return"PUBLIC"===t.type?n[o]:null},removeApp:function(e){delete t[e]},useAsService:function(e,t){return"serverAuth"===t?null:t},modularAPIs:a}};function r(e){if(e=e||a._DEFAULT_ENTRY_NAME,!(0,s.r3)(t,e))throw c.create("no-app",{appName:e});return t[e]}return n.default=n,Object.defineProperty(n,"apps",{get:function(){return Object.keys(t).map(e=>t[e])}}),r.App=e,n}(u);return t.INTERNAL=Object.assign(Object.assign({},t.INTERNAL),{createFirebaseNamespace:e,extendNamespace:function(e){(0,s.ZB)(t,e)},createSubscribe:s.ne,ErrorFactory:s.LL,deepExtend:s.ZB}),t}(),d=new l.Yd("@firebase/app-compat");/** 3455 * @license 3456 * Copyright 2020 Google LLC 3457 * 3458 * Licensed under the Apache License, Version 2.0 (the "License");
3459 * you may not use this file except in compliance with the License. 3460 * You may obtain a copy of the License at 3461 * 3462 * http://www.apache.org/licenses/LICENSE-2.0 3463 * 3464 * Unless required by applicable law or agreed to in writing, software 3465 * distributed under the License is distributed on an "AS IS" BASIS, 3466 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3467 * See the License for the specific language governing permissions and 3468 * limitations under the License. 3469 */ if((0,s.jU)()&&void 0!==self.firebase){d.warn(` 3470 Warning: Firebase is already defined in the global scope. Please make sure 3471 Firebase library is only loaded once. 3472 `);let f=self.firebase.SDK_VERSION;f&&f.indexOf("LITE")>=0&&d.warn(` 3473 Warning: You are trying to load Firebase while using Firebase Performance standalone script. 3474 You should load Firebase Performance with this instance of Firebase to avoid loading duplicate code. 3475 `)}(0,a.registerVersion)("@firebase/app-compat","0.1.37",void 0),/** 3476 * @license 3477 * Copyright 2020 Google LLC 3478 * 3479 * Licensed under the Apache License, Version 2.0 (the "License"); 3480 * you may not use this file except in compliance with the License. 3481 * You may obtain a copy of the License at 3482 * 3483 * http://www.apache.org/licenses/LICENSE-2.0 3484 * 3485 * Unless required by applicable law or agreed to in writing, software 3486 * distributed under the License is distributed on an "AS IS" BASIS, 3487 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3488 * See the License for the specific language governing permissions and 3489 * limitations under the License. 3490 */ h.registerVersion("firebase","9.12.1","app-compat");var p=n(1352);/** 3491 * @license 3492 * Copyright 2021 Google LLC 3493 * 3494 * Licensed under the Apache License, Version 2.0 (the "License"); 3495 * you may not use this file except in compliance with the License. 3496 * You may obtain a copy of the License at 3497 * 3498 * http://www.apache.org/licenses/LICENSE-2.0 3499 * 3500 * Unless required by applicable law or agreed to in writing, software 3501 * distributed under the License is distributed on an "AS IS" BASIS, 3502 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3503 * See the License for the specific language governing permissions and 3504 * limitations under the License. 3505 */ function m(){return window}async function g(e,t,n){var r;let{BuildInfo:i}=m();(0,p.aq)(t.sessionId,"AuthEvent did not contain a session ID");let s=await _(t.sessionId),o={};return(0,p.ar)()?o.ibi=i.packageName:(0,p.as)()?o.apn=i.packageName:(0,p.at)(e,"operation-not-supported-in-this-environment"),i.displayName&&(o.appDisplayName=i.displayName),o.sessionId=s,(0,p.au)(e,n,t.type,void 0,null!==(r=t.eventId)&&void 0!==r?r:void 0,o)}async function y(e){let{BuildInfo:t}=m(),n={};(0,p.ar)()?n.iosBundleId=t.packageName:(0,p.as)()?n.androidPackageName=t.packageName:(0,p.at)(e,"operation-not-supported-in-this-environment"),await (0,p.av)(e,n)}async function v(e,t,n){let{cordova:r}=m(),i=()=>{};try{await new Promise((s,o)=>{let a=null;function l(){var e;s();let t=null===(e=r.plugins.browsertab)||void 0===e?void 0:e.close;"function"==typeof t&&t(),"function"==typeof(null==n?void 0:n.close)&&n.close()}function u(){!a&&(a=window.setTimeout(()=>{o((0,p.aw)(e,"redirect-cancelled-by-user"))},2e3))}function c(){(null==document?void 0:document.visibilityState)==="visible"&&u()}t.addPassiveListener(l),document.addEventListener("resume",u,!1),(0,p.as)()&&document.addEventListener("visibilitychange",c,!1),i=()=>{t.removePassiveListener(l),document.removeEventListener("resume",u,!1),document.removeEventListener("visibilitychange",c,!1),a&&window.clearTimeout(a)}})}finally{i()}}async function _(e){let t=function(e){if((0,p.aq)(/[0-9a-zA-Z]+/.test(e),"Can only convert alpha-numeric strings"),"undefined"!=typeof TextEncoder)return new TextEncoder().encode(e);let t=new ArrayBuffer(e.length),n=new Uint8Array(t);for(let r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return n}(e),n=await crypto.subtle.digest("SHA-256",t),r=Array.from(new Uint8Array(n));return r.map(e=>e.toString(16).padStart(2,"0")).join("")}class b extends p.aA{constructor(){super(...arguments),this.passiveListeners=new Set,this.initPromise=new Promise(e=>{this.resolveInialized=e})}addPassiveListener(e){this.passiveListeners.add(e)}removePassiveListener(e){this.passiveListeners.delete(e)}resetRedirect(){this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1}onEvent(e){return this.resolveInialized(),this.passiveListeners.forEac
3505h(t=>t(e)),super.onEvent(e)}async initialized(){await this.initPromise}}async function w(e){let t=await E()._get(x(e));return t&&await E()._remove(x(e)),t}function E(){return(0,p.ay)(p.b)}function x(e){return(0,p.az)("authEvent",e.config.apiKey,e.name)}function S(e){if(!(null==e?void 0:e.includes("?")))return{};let[t,...n]=e.split("?");return(0,s.zd)(n.join("?"))}let T=class{constructor(){this._redirectPersistence=p.a,this._shouldInitProactively=!0,this.eventManagers=new Map,this.originValidationPromises={},this._completeRedirectFn=p.aB,this._overrideRedirectResult=p.aC}async _initialize(e){let t=e._key(),n=this.eventManagers.get(t);return n||(n=new b(e),this.eventManagers.set(t,n),this.attachCallbackListeners(e,n)),n}_openPopup(e){(0,p.at)(e,"operation-not-supported-in-this-environment")}async _openRedirect(e,t,n,r){var i,s;!function(e){var t,n,r,i,s,o,a,l,u,c;let h=m();(0,p.ax)("function"==typeof(null===(t=null==h?void 0:h.universalLinks)||void 0===t?void 0:t.subscribe),e,"invalid-cordova-configuration",{missingPlugin:"cordova-universal-links-plugin-fix"}),(0,p.ax)(void 0!==(null===(n=null==h?void 0:h.BuildInfo)||void 0===n?void 0:n.packageName),e,"invalid-cordova-configuration",{missingPlugin:"cordova-plugin-buildInfo"}),(0,p.ax)("function"==typeof(null===(s=null===(i=null===(r=null==h?void 0:h.cordova)||void 0===r?void 0:r.plugins)||void 0===i?void 0:i.browsertab)||void 0===s?void 0:s.openUrl),e,"invalid-cordova-configuration",{missingPlugin:"cordova-plugin-browsertab"}),(0,p.ax)("function"==typeof(null===(l=null===(a=null===(o=null==h?void 0:h.cordova)||void 0===o?void 0:o.plugins)||void 0===a?void 0:a.browsertab)||void 0===l?void 0:l.isAvailable),e,"invalid-cordova-configuration",{missingPlugin:"cordova-plugin-browsertab"}),(0,p.ax)("function"==typeof(null===(c=null===(u=null==h?void 0:h.cordova)||void 0===u?void 0:u.InAppBrowser)||void 0===c?void 0:c.open),e,"invalid-cordova-configuration",{missingPlugin:"cordova-plugin-inappbrowser"})}(e);let o=await this._initialize(e);await o.initialized(),o.resetRedirect(),(0,p.aD)(),await this._originValidation(e);let a=function(e,t,n=null){return{type:t,eventId:n,urlResponse:null,sessionId:function(){let e=[],t="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";for(let n=0;n<20;n++){let r=Math.floor(Math.random()*t.length);e.push(t.charAt(r))}return e.join("")}(),postBody:null,tenantId:e.tenantId,error:(0,p.aw)(e,"no-auth-event")}}(e,n,r);await E()._set(x(e),a);let l=await g(e,a,t),u=await function(e){let{cordova:t}=m();return new Promise(n=>{t.plugins.browsertab.isAvailable(r=>{let i=null;r?t.plugins.browsertab.openUrl(e):i=t.InAppBrowser.open(e,(0,p.ap)()?"_blank":"_system","location=yes"),n(i)})})}(l);return v(e,o,u)}_isIframeWebStorageSupported(e,t){throw Error("Method not implemented.")}_originValidation(e){let t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=y(e)),this.originValidationPromises[t]}attachCallbackListeners(e,t){let{universalLinks:n,handleOpenURL:r,BuildInfo:i}=m(),s=setTimeout(async()=>{await w(e),t.onEvent(I())},500),o=async n=>{clearTimeout(s);let r=await w(e),i=null;r&&(null==n?void 0:n.url)&&(i=function(e,t){var n,r;let i=function(e){let t=S(e),n=t.link?decodeURIComponent(t.link):void 0,r=S(n).link,i=t.deep_link_id?decodeURIComponent(t.deep_link_id):void 0,s=S(i).link;return s||i||r||n||e}(t);if(i.includes("/__/auth/callback")){let s=S(i),o=s.firebaseError?function(e){try{return JSON.parse(e)}catch(t){return null}}(decodeURIComponent(s.firebaseError)):null,a=null===(r=null===(n=null==o?void 0:o.code)||void 0===n?void 0:n.split("auth/"))||void 0===r?void 0:r[1],l=a?(0,p.aw)(a):null;return l?{type:e.type,eventId:e.eventId,tenantId:e.tenantId,error:l,urlResponse:null,sessionId:null,postBody:null}:{type:e.type,eventId:e.eventId,tenantId:e.tenantId,sessionId:e.sessionId,urlResponse:i,postBody:null}}return null}(r,n.url)),t.onEvent(i||I())};void 0!==n&&"function"==typeof n.subscribe&&n.subscribe(null,o);let a=`${i.packageName.toLowerCase()}://`;m().handleOpenURL=async e=>{if(e.toLowerCase().startsWith(a)&&o({url:e}),"function"==typeof r)try{r(e)}catch(t){console.error(t)}}}};function I(){return{type:"unknown",eventId:null,sessionId:null,urlResponse:null,postBody:null,tenantId:null,error:(0,p.aw)("no-auth-event")}}function k(){var e;return(null===(e=null==self?void 0:self.location)||void 0===e?void 0:e.protocol)||null}function C(e=(0,s.z$)()){return!!(("file:"===k()||"ionic:"===k()||"capacitor:"===k())&&e.toLowerCase().match(/iphone|ipad|ipod|android/))}function R(){try{let e=self.localStorage,t=p.aI();if(e){if(e.setItem(t,"1"),e.removeItem(t),function(e=(0,s.z$)()){return(0,s.w1)()&&(null==document?void 0:document.documentMode)===11||function(e=(0,s.z$)()){return/Edge\/\d+/.test(e)}(e)}())return(0,s.hl)();return!0}}catch(n){return A()&&(0,s.hl)()}return!1}function A(){return void 0!==n.g&&"WorkerGlobalScope"in n.g&&"importScripts"in n.g}function O(){return("http:"===k()||"https:"===k()||(0,s.ru)()||C())&&!((0,s.b$)()||(0,s.UG)())&&R()&&!A()}function D(){return C()&&"undefined"!=typeof document}async function N(){return!!D()&&new Promise(e=>{let t=setTimeout(()=>{e(!1)},1e3);document.addEventListener("deviceready",()=>{clearTimeout(t),e(!0)})})}/** 3506 * @license 3507 * Copyright 2020 Google LLC 3508 * 3509 * Licensed under the Apache License, Version 2.0 (the "License");
3510 * you may not use this file except in compliance with the License. 3511 * You may obtain a copy of the License at 3512 * 3513 * http://www.apache.org/licenses/LICENSE-2.0 3514 * 3515 * Unless required by applicable law or agreed to in writing, software 3516 * distributed under the License is distributed on an "AS IS" BASIS, 3517 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3518 * See the License for the specific language governing permissions and 3519 * limitations under the License. 3520 */ let P={LOCAL:"local",NONE:"none",SESSION:"session"},F=p.ax,M="persistence";async function L(e){await e._initializationPromise;let t=j(),n=p.az(M,e.config.apiKey,e.name);t&&t.setItem(n,e._getPersistence())}function j(){var e;try{return(null===(e="undefined"!=typeof window?window:null)||void 0===e?void 0:e.sessionStorage)||null}catch(t){return null}}/** 3521 * @license 3522 * Copyright 2020 Google LLC 3523 * 3524 * Licensed under the Apache License, Version 2.0 (the "License"); 3525 * you may not use this file except in compliance with the License. 3526 * You may obtain a copy of the License at 3527 * 3528 * http://www.apache.org/licenses/LICENSE-2.0 3529 * 3530 * Unless required by applicable law or agreed to in writing, software 3531 * distributed under the License is distributed on an "AS IS" BASIS, 3532 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3533 * See the License for the specific language governing permissions and 3534 * limitations under the License. 3535 */ let U=p.ax;class B{constructor(){this.browserResolver=p.ay(p.k),this.cordovaResolver=p.ay(T),this.underlyingResolver=null,this._redirectPersistence=p.a,this._completeRedirectFn=p.aB,this._overrideRedirectResult=p.aC}async _initialize(e){return await this.selectUnderlyingResolver(),this.assertedUnderlyingResolver._initialize(e)}async _openPopup(e,t,n,r){return await this.selectUnderlyingResolver(),this.assertedUnderlyingResolver._openPopup(e,t,n,r)}async _openRedirect(e,t,n,r){return await this.selectUnderlyingResolver(),this.assertedUnderlyingResolver._openRedirect(e,t,n,r)}_isIframeWebStorageSupported(e,t){this.assertedUnderlyingResolver._isIframeWebStorageSupported(e,t)}_originValidation(e){return this.assertedUnderlyingResolver._originValidation(e)}get _shouldInitProactively(){return D()||this.browserResolver._shouldInitProactively}get assertedUnderlyingResolver(){return U(this.underlyingResolver,"internal-error"),this.underlyingResolver}async selectUnderlyingResolver(){if(this.underlyingResolver)return;let e=await N();this.underlyingResolver=e?this.cordovaResolver:this.browserResolver}}/** 3536 * @license 3537 * Copyright 2020 Google LLC 3538 * 3539 * Licensed under the Apache License, Version 2.0 (the "License"); 3540 * you may not use this file except in compliance with the License. 3541 * You may obtain a copy of the License at 3542 * 3543 * http://www.apache.org/licenses/LICENSE-2.0 3544 * 3545 * Unless required by applicable law or agreed to in writing, software 3546 * distributed under the License is distributed on an "AS IS" BASIS, 3547 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3548 * See the License for the specific language governing permissions and 3549 * limitations under the License. 3550 */ function Z(e){return e.unwrap()}function $(e){let{_tokenResponse:t}=e instanceof s.ZR?e.customData:e;if(!t)return null;if(!(e instanceof s.ZR)&&"temporaryProof"in t&&"phoneNumber"in t)return p.P.credentialFromResult(e);let n=t.providerId;if(!n||n===p.o.PASSWORD)return null;let r;switch(n){case p.o.GOOGLE:r=p.Q;break;case p.o.FACEBOOK:r=p.N;break;case p.o.GITHUB:r=p.T;break;case p.o.TWITTER:r=p.W;break;default:let{oauthIdToken:i,oauthAccessToken:o,oauthTokenSecret:a,pendingToken:l,nonce:u}=t;if(!o&&!a&&!i&&!l)return null;if(l){if(n.startsWith("saml."))return p.aL._create(n,l);return p.J._fromParams({providerId:n,signInMethod:n,pendingToken:l,idToken:i,accessToken:o})}return new p.U(n).credential({idToken:i,accessToken:o,rawNonce:u})}return e instanceof s.ZR?r.credentialFromError(e):r.credentialFromResult(e)}function V(e,t){return t.catch(t=>{throw t instanceof s.ZR&&function(e,t){var n;let r=null===(n=t.customData)||void 0===n?void 0:n._tokenResponse;if((null==t?void 0:t.code)==="auth/multi-factor-auth-required"){let i=t;i.resolver=new q(e,p.an(e,t))}else if(r){let s=$(t),o=t;s&&(o.credential=s,o.tenantId=r.tenantId||void 0,o.email=r.email||void 0,o.phoneNumber=r.phoneNumber||void 0)}}(e,t),t}).then(e=>{var t;let n=e.operationType,r=e.user;return{operationType:n,credential:$(e),additionalUserInfo:p.al(e),user:G.getOrCreate(r)}})}async function z(e,t){let n=await t;return{verificationId:n.verificationId,confirm:t=>V(e,n.confirm(t))}}class q{constructor(e,t){var n;this.resolver=t,this.auth=e.wrapped()}get session(){return this.resolver.session}get hints(){return this.resolver.hints}resolveSignIn(e){return V(Z(this.auth),this.resolver.resolveSignIn(e))}}/** 3551 * @license 3552 * Copyright 2020 Google LLC 3553 * 3554 * Licensed under the Apache License, Version 2.0 (the "License");
3555 * you may not use this file except in compliance with the License. 3556 * You may obtain a copy of the License at 3557 * 3558 * http://www.apache.org/licenses/LICENSE-2.0 3559 * 3560 * Unless required by applicable law or agreed to in writing, software 3561 * distributed under the License is distributed on an "AS IS" BASIS, 3562 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3563 * See the License for the specific language governing permissions and 3564 * limitations under the License. 3565 */ class G{constructor(e){this._delegate=e,this.multiFactor=p.ao(e)}static getOrCreate(e){return G.USER_MAP.has(e)||G.USER_MAP.set(e,new G(e)),G.USER_MAP.get(e)}delete(){return this._delegate.delete()}reload(){return this._delegate.reload()}toJSON(){return this._delegate.toJSON()}getIdTokenResult(e){return this._delegate.getIdTokenResult(e)}getIdToken(e){return this._delegate.getIdToken(e)}linkAndRetrieveDataWithCredential(e){return this.linkWithCredential(e)}async linkWithCredential(e){return V(this.auth,p.Z(this._delegate,e))}async linkWithPhoneNumber(e,t){return z(this.auth,p.l(this._delegate,e,t))}async linkWithPopup(e){return V(this.auth,p.d(this._delegate,e,B))}async linkWithRedirect(e){return await L(p.aE(this.auth)),p.g(this._delegate,e,B)}reauthenticateAndRetrieveDataWithCredential(e){return this.reauthenticateWithCredential(e)}async reauthenticateWithCredential(e){return V(this.auth,p._(this._delegate,e))}reauthenticateWithPhoneNumber(e,t){return z(this.auth,p.r(this._delegate,e,t))}reauthenticateWithPopup(e){return V(this.auth,p.e(this._delegate,e,B))}async reauthenticateWithRedirect(e){return await L(p.aE(this.auth)),p.h(this._delegate,e,B)}sendEmailVerification(e){return p.ab(this._delegate,e)}async unlink(e){return await p.ak(this._delegate,e),this}updateEmail(e){return p.ag(this._delegate,e)}updatePassword(e){return p.ah(this._delegate,e)}updatePhoneNumber(e){return p.u(this._delegate,e)}updateProfile(e){return p.af(this._delegate,e)}verifyBeforeUpdateEmail(e,t){return p.ac(this._delegate,e,t)}get emailVerified(){return this._delegate.emailVerified}get isAnonymous(){return this._delegate.isAnonymous}get metadata(){return this._delegate.metadata}get phoneNumber(){return this._delegate.phoneNumber}get providerData(){return this._delegate.providerData}get refreshToken(){return this._delegate.refreshToken}get tenantId(){return this._delegate.tenantId}get displayName(){return this._delegate.displayName}get email(){return this._delegate.email}get photoURL(){return this._delegate.photoURL}get providerId(){return this._delegate.providerId}get uid(){return this._delegate.uid}get auth(){return this._delegate.auth}}G.USER_MAP=new WeakMap;/** 3566 * @license 3567 * Copyright 2020 Google LLC 3568 * 3569 * Licensed under the Apache License, Version 2.0 (the "License"); 3570 * you may not use this file except in compliance with the License. 3571 * You may obtain a copy of the License at 3572 * 3573 * http://www.apache.org/licenses/LICENSE-2.0 3574 * 3575 * Unless required by applicable law or agreed to in writing, software 3576 * distributed under the License is distributed on an "AS IS" BASIS, 3577 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3578 * See the License for the specific language governing permissions and 3579 * limitations under the License. 3580 */ let W=p.ax;class H{constructor(e,t){if(this.app=e,t.isInitialized()){this._delegate=t.getImmediate(),this.linkUnderlyingAuth();return}let{apiKey:n}=e.options;W(n,"invalid-api-key",{appName:e.name}),W(n,"invalid-api-key",{appName:e.name});let r="undefined"!=typeof window?B:void 0;this._delegate=t.initialize({options:{persistence:function(e,t){let n=function(e,t){let n=j();if(!n)return[];let r=p.az(M,e,t),i=n.getItem(r);switch(i){case P.NONE:return[p.L];case P.LOCAL:return[p.i,p.a];case P.SESSION:return[p.a];default:return[]}}(e,t);if("undefined"==typeof self||n.includes(p.i)||n.push(p.i),"undefined"!=typeof window)for(let r of[p.b,p.a])n.includes(r)||n.push(r);return n.includes(p.L)||n.push(p.L),n}(n,e.name),popupRedirectResolver:r}}),this._delegate._updateErrorMap(p.B),this.linkUnderlyingAuth()}get emulatorConfig(){return this._delegate.emulatorConfig}get currentUser(){return this._delegate.currentUser?G.getOrCreate(this._delegate.currentUser):null}get languageCode(){return this._delegate.languageCode}set languageCode(e){this._delegate.languageCode=e}get settings(){return this._delegate.settings}get tenantId(){return this._delegate.tenantId}set tenantId(e){this._delegate.tenantId=e}
3580useDeviceLanguage(){this._delegate.useDeviceLanguage()}signOut(){return this._delegate.signOut()}useEmulator(e,t){p.G(this._delegate,e,t)}applyActionCode(e){return p.a2(this._delegate,e)}checkActionCode(e){return p.a3(this._delegate,e)}confirmPasswordReset(e,t){return p.a1(this._delegate,e,t)}async createUserWithEmailAndPassword(e,t){return V(this._delegate,p.a5(this._delegate,e,t))}fetchProvidersForEmail(e){return this.fetchSignInMethodsForEmail(e)}fetchSignInMethodsForEmail(e){return p.aa(this._delegate,e)}isSignInWithEmailLink(e){return p.a8(this._delegate,e)}async getRedirectResult(){W(O(),this._delegate,"operation-not-supported-in-this-environment");let e=await p.j(this._delegate,B);return e?V(this._delegate,Promise.resolve(e)):{credential:null,user:null}}addFrameworkForLogging(e){!/** 3581 * @license 3582 * Copyright 2017 Google LLC 3583 * 3584 * Licensed under the Apache License, Version 2.0 (the "License"); 3585 * you may not use this file except in compliance with the License. 3586 * You may obtain a copy of the License at 3587 * 3588 * http://www.apache.org/licenses/LICENSE-2.0 3589 * 3590 * Unless required by applicable law or agreed to in writing, software 3591 * distributed under the License is distributed on an "AS IS" BASIS, 3592 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3593 * See the License for the specific language governing permissions and 3594 * limitations under the License. 3595 */ function(e,t){(0,p.aE)(e)._logFramework(t)}(this._delegate,e)}onAuthStateChanged(e,t,n){let{next:r,error:i,complete:s}=K(e,t,n);return this._delegate.onAuthStateChanged(r,i,s)}onIdTokenChanged(e,t,n){let{next:r,error:i,complete:s}=K(e,t,n);return this._delegate.onIdTokenChanged(r,i,s)}sendSignInLinkToEmail(e,t){return p.a7(this._delegate,e,t)}sendPasswordResetEmail(e,t){return p.a0(this._delegate,e,t||void 0)}async setPersistence(e){!function(e,t){if(F(Object.values(P).includes(t),e,"invalid-persistence-type"),(0,s.b$)()){F(t!==P.SESSION,e,"unsupported-persistence-type");return}if((0,s.UG)()){F(t===P.NONE,e,"unsupported-persistence-type");return}if(A()){F(t===P.NONE||t===P.LOCAL&&(0,s.hl)(),e,"unsupported-persistence-type");return}F(t===P.NONE||R(),e,"unsupported-persistence-type")}(this._delegate,e);let t;switch(e){case P.SESSION:t=p.a;break;case P.LOCAL:let n=await p.ay(p.i)._isAvailable();t=n?p.i:p.b;break;case P.NONE:t=p.L;break;default:return p.at("argument-error",{appName:this._delegate.name})}return this._delegate.setPersistence(t)}signInAndRetrieveDataWithCredential(e){return this.signInWithCredential(e)}signInAnonymously(){return V(this._delegate,p.X(this._delegate))}signInWithCredential(e){return V(this._delegate,p.Y(this._delegate,e))}signInWithCustomToken(e){return V(this._delegate,p.$(this._delegate,e))}signInWithEmailAndPassword(e,t){return V(this._delegate,p.a6(this._delegate,e,t))}signInWithEmailLink(e,t){return V(this._delegate,p.a9(this._delegate,e,t))}signInWithPhoneNumber(e,t){return z(this._delegate,p.s(this._delegate,e,t))}async signInWithPopup(e){return W(O(),this._delegate,"operation-not-supported-in-this-environment"),V(this._delegate,p.c(this._delegate,e,B))}async signInWithRedirect(e){return W(O(),this._delegate,"operation-not-supported-in-this-environment"),await L(this._delegate),p.f(this._delegate,e,B)}updateCurrentUser(e){return this._delegate.updateCurrentUser(e)}verifyPasswordResetCode(e){return p.a4(this._delegate,e)}unwrap(){return this._delegate}_delete(){return this._delegate._delete()}linkUnderlyingAuth(){this._delegate.wrapped=()=>this}}function K(e,t,n){let r=e;"function"!=typeof e&&({next:r,error:t,complete:n}=e);let i=r,s=e=>i(e&&G.getOrCreate(e));return{next:s,error:t,complete:n}}H.Persistence=P;/** 3596 * @license 3597 * Copyright 2020 Google LLC 3598 * 3599 * Licensed under the Apache License, Version 2.0 (the "License"); 3600 * you may not use this file except in compliance with the License. 3601 * You may obtain a copy of the License at 3602 * 3603 * http://www.apache.org/licenses/LICENSE-2.0 3604 * 3605 * Unless required by applicable law or agreed to in writing, software 3606 * distributed under the License is distributed on an "AS IS" BASIS, 3607 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3608 * See the License for the specific language governing permissions and 3609 * limitations under the License. 3610 */ class Y{constructor(){this.providerId="phone",this._delegate=new p.P(Z(h.auth()))}static credential(e,t){return p.P.credential(e,t)}verifyPhoneNumber(e,t){return this._delegate.verifyPhoneNumber(e,t)}unwrap(){return this._delegate}}Y.PHONE_SIGN_IN_METHOD=p.P.PHONE_SIGN_IN_METHOD,Y.PROVIDER_ID=p.P.PROVIDER_ID;/** 3611 * @license 3612 * Copyright 2020 Google LLC 3613 * 3614 * Licensed under the Apache License, Version 2.0 (the "License");
3615 * you may not use this file except in compliance with the License. 3616 * You may obtain a copy of the License at 3617 * 3618 * http://www.apache.org/licenses/LICENSE-2.0 3619 * 3620 * Unless required by applicable law or agreed to in writing, software 3621 * distributed under the License is distributed on an "AS IS" BASIS, 3622 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3623 * See the License for the specific language governing permissions and 3624 * limitations under the License. 3625 */ let Q=p.ax;(nQ=h).INTERNAL.registerComponent(new o.wA("auth-compat",e=>{let t=e.getProvider("app-compat").getImmediate(),n=e.getProvider("auth");return new H(t,n)},"PUBLIC").setServiceProps({ActionCodeInfo:{Operation:{EMAIL_SIGNIN:p.A.EMAIL_SIGNIN,PASSWORD_RESET:p.A.PASSWORD_RESET,RECOVER_EMAIL:p.A.RECOVER_EMAIL,REVERT_SECOND_FACTOR_ADDITION:p.A.REVERT_SECOND_FACTOR_ADDITION,VERIFY_AND_CHANGE_EMAIL:p.A.VERIFY_AND_CHANGE_EMAIL,VERIFY_EMAIL:p.A.VERIFY_EMAIL}},EmailAuthProvider:p.M,FacebookAuthProvider:p.N,GithubAuthProvider:p.T,GoogleAuthProvider:p.Q,OAuthProvider:p.U,SAMLAuthProvider:p.V,PhoneAuthProvider:Y,PhoneMultiFactorGenerator:p.m,RecaptchaVerifier:class e{constructor(e,t,n=h.app()){var r;Q(null===(r=n.options)||void 0===r?void 0:r.apiKey,"invalid-api-key",{appName:n.name}),this._delegate=new p.R(e,t,n.auth()),this.type=this._delegate.type}clear(){this._delegate.clear()}render(){return this._delegate.render()}verify(){return this._delegate.verify()}},TwitterAuthProvider:p.W,Auth:H,AuthCredential:p.H,Error:s.ZR}).setInstantiationMode("LAZY").setMultipleInstances(!1)),nQ.registerVersion("@firebase/auth-compat","0.2.23");var X=n(1294);/** 3626 * @license 3627 * Copyright 2021 Google LLC 3628 * 3629 * Licensed under the Apache License, Version 2.0 (the "License"); 3630 * you may not use this file except in compliance with the License. 3631 * You may obtain a copy of the License at 3632 * 3633 * http://www.apache.org/licenses/LICENSE-2.0 3634 * 3635 * Unless required by applicable law or agreed to in writing, software 3636 * distributed under the License is distributed on an "AS IS" BASIS, 3637 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3638 * See the License for the specific language governing permissions and 3639 * limitations under the License. 3640 */ function J(e,t){if(void 0===t)return{merge:!1};if(void 0!==t.mergeFields&&void 0!==t.merge)throw new X.WA("invalid-argument",`Invalid options passed to function ${e}(): You cannot specify both "merge" and "mergeFields".`);return t}/** 3641 * @license 3642 * Copyright 2017 Google LLC 3643 * 3644 * Licensed under the Apache License, Version 2.0 (the "License"); 3645 * you may not use this file except in compliance with the License. 3646 * You may obtain a copy of the License at 3647 * 3648 * http://www.apache.org/licenses/LICENSE-2.0 3649 * 3650 * Unless required by applicable law or agreed to in writing, software 3651 * distributed under the License is distributed on an "AS IS" BASIS, 3652 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3653 * See the License for the specific language governing permissions and 3654 * limitations under the License. 3655 */ function ee(){if("undefined"==typeof Uint8Array)throw new X.WA("unimplemented","Uint8Arrays are not available in this environment.")}function et(){if(!(0,X.Me)())throw new X.WA("unimplemented","Blobs are unavailable in Firestore in this environment.")}class en{constructor(e){this._delegate=e}static fromBase64String(e){return et(),new en(X.Jj.fromBase64String(e))}static fromUint8Array(e){return ee(),new en(X.Jj.fromUint8Array(e))}toBase64(){return et(),this._delegate.toBase64()}toUint8Array(){return ee(),this._delegate.toUint8Array()}isEqual(e){return this._delegate.isEqual(e._delegate)}toString(){return"Blob(base64: "+this.toBase64()+")"}}/** 3656 * @license 3657 * Copyright 2017 Google LLC 3658 * 3659 * Licensed under the Apache License, Version 2.0 (the "License"); 3660 * you may not use this file except in compliance with the License. 3661 * You may obtain a copy of the License at 3662 * 3663 * http://www.apache.org/licenses/LICENSE-2.0 3664 * 3665 * Unless required by applicable law or agreed to in writing, softw
3665are 3666 * distributed under the License is distributed on an "AS IS" BASIS, 3667 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3668 * See the License for the specific language governing permissions and 3669 * limitations under the License. 3670 */ function er(e){return function(e,t){if("object"!=typeof e||null===e)return!1;for(let n of t)if(n in e&&"function"==typeof e[n])return!0;return!1}(e,["next","error","complete"])}/** 3671 * @license 3672 * Copyright 2017 Google LLC 3673 * 3674 * Licensed under the Apache License, Version 2.0 (the "License"); 3675 * you may not use this file except in compliance with the License. 3676 * You may obtain a copy of the License at 3677 * 3678 * http://www.apache.org/licenses/LICENSE-2.0 3679 * 3680 * Unless required by applicable law or agreed to in writing, software 3681 * distributed under the License is distributed on an "AS IS" BASIS, 3682 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3683 * See the License for the specific language governing permissions and 3684 * limitations under the License. 3685 */ class ei{enableIndexedDbPersistence(e,t){return(0,X.ST)(e._delegate,{forceOwnership:t})}enableMultiTabIndexedDbPersistence(e){return(0,X.fH)(e._delegate)}clearIndexedDbPersistence(e){return(0,X.Fc)(e._delegate)}}class es{constructor(e,t,n){this._delegate=t,this._persistenceProvider=n,this.INTERNAL={delete:()=>this.terminate()},e instanceof X.l7||(this._appCompat=e)}get _databaseId(){return this._delegate._databaseId}settings(e){let t=this._delegate._getSettings();e.merge||t.host===e.host||(0,X.yq)("You are overriding the original host. If you did not intend to override your settings, use {merge: true}."),e.merge&&delete(e=Object.assign(Object.assign({},t),e)).merge,this._delegate._setSettings(e)}useEmulator(e,t,n={}){(0,X.at)(this._delegate,e,t,n)}enableNetwork(){return(0,X.Ix)(this._delegate)}disableNetwork(){return(0,X.TF)(this._delegate)}enablePersistence(e){let t=!1,n=!1;return e&&(t=!!e.synchronizeTabs,n=!!e.experimentalForceOwningTab,(0,X.Wi)("synchronizeTabs",t,"experimentalForceOwningTab",n)),t?this._persistenceProvider.enableMultiTabIndexedDbPersistence(this):this._persistenceProvider.enableIndexedDbPersistence(this,n)}clearPersistence(){return this._persistenceProvider.clearIndexedDbPersistence(this)}terminate(){return this._appCompat&&(this._appCompat._removeServiceInstance("firestore-compat"),this._appCompat._removeServiceInstance("firestore")),this._delegate._delete()}waitForPendingWrites(){return(0,X.Mx)(this._delegate)}onSnapshotsInSync(e){return(0,X.sc)(this._delegate,e)}get app(){if(!this._appCompat)throw new X.WA("failed-precondition","Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._appCompat}collection(e){try{return new e_(this,(0,X.hJ)(this._delegate,e))}catch(t){throw eh(t,"collection()","Firestore.collection()")}}doc(e){try{return new ec(this,(0,X.JU)(this._delegate,e))}catch(t){throw eh(t,"doc()","Firestore.doc()")}}collectionGroup(e){try{return new eg(this,(0,X.B$)(this._delegate,e))}catch(t){throw eh(t,"collectionGroup()","Firestore.collectionGroup()")}}runTransaction(e){return(0,X.i3)(this._delegate,t=>e(new ea(this,t)))}batch(){return(0,X.qY)(this._delegate),new el(new X.PU(this._delegate,e=>(0,X.GL)(this._delegate,e)))}loadBundle(e){return(0,X.Pb)(this._delegate,e)}namedQuery(e){return(0,X.L$)(this._delegate,e).then(e=>e?new eg(this,e):null)}}class eo extends X.u7{constructor(e){super(),this.firestore=e}convertBytes(e){return new en(new X.Jj(e))}convertReference(e){let t=this.convertDocumentKey(e,this.firestore._databaseId);return ec.forKey(t,this.firestore,null)}}class ea{constructor(e,t){this._firestore=e,this._delegate=t,this._userDataWriter=new eo(e)}get(e){let t=eb(e);return this._delegate.get(t).then(e=>new ep(this._firestore,new X.xU(this._firestore._delegate,this._userDataWriter,e._key,e._document,e.metadata,t.converter)))}set(e,t,n){let r=eb(e);return n?(J("Transaction.set",n),this._delegate.set(r,t,n)):this._delegate.set(r,t),this}update(e,t,n,...r){let i=eb(e);return 2===arguments.length?this._delegate.update(i,t):this._delegate.update(i,t,n,...r),this}delete(e){let t=eb(e);return this._delegate.delete(t),this}}
3685class el{constructor(e){this._delegate=e}set(e,t,n){let r=eb(e);return n?(J("WriteBatch.set",n),this._delegate.set(r,t,n)):this._delegate.set(r,t),this}update(e,t,n,...r){let i=eb(e);return 2===arguments.length?this._delegate.update(i,t):this._delegate.update(i,t,n,...r),this}delete(e){let t=eb(e);return this._delegate.delete(t),this}commit(){return this._delegate.commit()}}class eu{constructor(e,t,n){this._firestore=e,this._userDataWriter=t,this._delegate=n}fromFirestore(e,t){let n=new X.$q(this._firestore._delegate,this._userDataWriter,e._key,e._document,e.metadata,null);return this._delegate.fromFirestore(new em(this._firestore,n),null!=t?t:{})}toFirestore(e,t){return t?this._delegate.toFirestore(e,t):this._delegate.toFirestore(e)}static getInstance(e,t){let n=eu.INSTANCES,r=n.get(e);r||(r=new WeakMap,n.set(e,r));let i=r.get(t);return i||(i=new eu(e,new eo(e),t),r.set(t,i)),i}}eu.INSTANCES=new WeakMap;class ec{constructor(e,t){this.firestore=e,this._delegate=t,this._userDataWriter=new eo(e)}static forPath(e,t,n){if(e.length%2!=0)throw new X.WA("invalid-argument",`Invalid document reference. Document references must have an even number of segments, but ${e.canonicalString()} has ${e.length}`);return new ec(t,new X.my(t._delegate,n,new X.Ky(e)))}static forKey(e,t,n){return new ec(t,new X.my(t._delegate,n,e))}get id(){return this._delegate.id}get parent(){return new e_(this.firestore,this._delegate.parent)}get path(){return this._delegate.path}collection(e){try{return new e_(this.firestore,(0,X.hJ)(this._delegate,e))}catch(t){throw eh(t,"collection()","DocumentReference.collection()")}}isEqual(e){return(e=(0,s.m9)(e))instanceof X.my&&(0,X.Eo)(this._delegate,e)}set(e,t){t=J("DocumentReference.set",t);try{if(t)return(0,X.pl)(this._delegate,e,t);return(0,X.pl)(this._delegate,e)}catch(n){throw eh(n,"setDoc()","DocumentReference.set()")}}update(e,t,...n){try{if(1===arguments.length)return(0,X.r7)(this._delegate,e);return(0,X.r7)(this._delegate,e,t,...n)}catch(r){throw eh(r,"updateDoc()","DocumentReference.update()")}}delete(){return(0,X.oe)(this._delegate)}onSnapshot(...e){let t=ed(e),n=ef(e,e=>new ep(this.firestore,new X.xU(this.firestore._delegate,this._userDataWriter,e._key,e._document,e.metadata,this._delegate.converter)));return(0,X.cf)(this._delegate,t,n)}get(e){let t;return((null==e?void 0:e.source)==="cache"?(0,X.kl)(this._delegate):(null==e?void 0:e.source)==="server"?(0,X.Xk)(this._delegate):(0,X.QT)(this._delegate)).then(e=>new ep(this.firestore,new X.xU(this.firestore._delegate,this._userDataWriter,e._key,e._document,e.metadata,this._delegate.converter)))}withConverter(e){return new ec(this.firestore,e?this._delegate.withConverter(eu.getInstance(this.firestore,e)):this._delegate.withConverter(null))}}function eh(e,t,n){return e.message=e.message.replace(t,n),e}function ed(e){for(let t of e)if("object"==typeof t&&!er(t))return t;return{}}function ef(e,t){var n,r;let i;return{next(e){i.next&&i.next(t(e))},error:null===(n=(i=er(e[0])?e[0]:er(e[1])?e[1]:"function"==typeof e[0]?{next:e[0],error:e[1],complete:e[2]}:{next:e[1],error:e[2],complete:e[3]}).error)||void 0===n?void 0:n.bind(i),complete:null===(r=i.complete)||void 0===r?void 0:r.bind(i)}}class ep{constructor(e,t){this._firestore=e,this._delegate=t}get ref(){return new ec(this._firestore,this._delegate.ref)}get id(){return this._delegate.id}get metadata(){return this._delegate.metadata}get exists(){return this._delegate.exists()}data(e){return this._delegate.data(e)}get(e,t){return this._delegate.get(e,t)}isEqual(e){return(0,X.qK)(this._delegate,e._delegate)}}class em extends ep{data(e){let t=this._delegate.data(e);return(0,X.K9)(void 0!==t,"Document in a QueryDocumentSnapshot should exist"),t}}class eg{constructor(e,t){this.firestore=e,this._delegate=t,this._userDataWriter=new eo(e)}where(e,t,n){try{return new eg(this.firestore,(0,X.IO)(this._delegate,(0,X.ar)(e,t,n)))}catch(r){throw eh(r,/(orderBy|where)\(\)/,"Query.$1()")}}orderBy(e,t){try{return new eg(this.firestore,(0,X.IO)(this._delegate,(0,X.Xo)(e,t)))}catch(n){throw eh(n,/(orderBy|where)\(\)/,"Query.$1()")}}limit(e){try{return new eg(this.firestore,(0,X.IO)(this._delegate,(0,X.b9)(e)))}catch(t){throw eh(t,"limit()","Query.limit()")}}limitToLast(e){try{return new eg(this.firestore,(0,X.IO)(this._delegate,(0,X.vh)(e)))}catch(t){throw eh(t,"limitToLast()","Query.limitToLast()")}}startAt(...e){try{return new eg(this.firestore,(0,X.IO)(this._delegate,(0,X.e0)(...e)))}catch(t){throw eh(t,"startAt()","Query.startAt()")}}startAfter(...e){try{return new eg(this.firestore,(0,X.IO)(this._delegate,(0,X.TQ)(...e)))}catch(t){throw eh(t,"startAfter()","Query.startAfter()")}}endBefore(...e){try{return new eg(this.firestore,(0,X.IO)(this._delegate,(0,X.Lx)(...e)))}catch(t){throw eh(t,"endBefore()","Query.endBefore()")}}endAt(...e){try{return new eg(this.firestore,(0,X.IO)(this._delegate,(0,X.Wu)(...e)))}catch(t){throw eh(t,"endAt()","Query.endAt()")}}isEqual(e){return(0,X.iE)(this._delegate,e._delegate)}get(e){let t;return((null==e?void 0:e.source)==="cache"?(0,X.UQ)(this._delegate):(null==e?void 0:e.source)==="server"?(0,X.zN)(this._delegate):(0,X.PL)(this._delegate)).then(e=>
3685new ev(this.firestore,new X.W(this.firestore._delegate,this._userDataWriter,this._delegate,e._snapshot)))}onSnapshot(...e){let t=ed(e),n=ef(e,e=>new ev(this.firestore,new X.W(this.firestore._delegate,this._userDataWriter,this._delegate,e._snapshot)));return(0,X.cf)(this._delegate,t,n)}withConverter(e){return new eg(this.firestore,e?this._delegate.withConverter(eu.getInstance(this.firestore,e)):this._delegate.withConverter(null))}}class ey{constructor(e,t){this._firestore=e,this._delegate=t}get type(){return this._delegate.type}get doc(){return new em(this._firestore,this._delegate.doc)}get oldIndex(){return this._delegate.oldIndex}get newIndex(){return this._delegate.newIndex}}class ev{constructor(e,t){this._firestore=e,this._delegate=t}get query(){return new eg(this._firestore,this._delegate.query)}get metadata(){return this._delegate.metadata}get size(){return this._delegate.size}get empty(){return this._delegate.empty}get docs(){return this._delegate.docs.map(e=>new em(this._firestore,e))}docChanges(e){return this._delegate.docChanges(e).map(e=>new ey(this._firestore,e))}forEach(e,t){this._delegate.forEach(n=>{e.call(t,new em(this._firestore,n))})}isEqual(e){return(0,X.qK)(this._delegate,e._delegate)}}class e_ extends eg{constructor(e,t){super(e,t),this.firestore=e,this._delegate=t}get id(){return this._delegate.id}get path(){return this._delegate.path}get parent(){let e=this._delegate.parent;return e?new ec(this.firestore,e):null}doc(e){try{if(void 0===e)return new ec(this.firestore,(0,X.JU)(this._delegate));return new ec(this.firestore,(0,X.JU)(this._delegate,e))}catch(t){throw eh(t,"doc()","CollectionReference.doc()")}}add(e){return(0,X.ET)(this._delegate,e).then(e=>new ec(this.firestore,e))}isEqual(e){return(0,X.Eo)(this._delegate,e._delegate)}withConverter(e){return new e_(this.firestore,e?this._delegate.withConverter(eu.getInstance(this.firestore,e)):this._delegate.withConverter(null))}}function eb(e){return(0,X.Cf)(e,X.my)}/** 3686 * @license 3687 * Copyright 2017 Google LLC 3688 * 3689 * Licensed under the Apache License, Version 2.0 (the "License"); 3690 * you may not use this file except in compliance with the License. 3691 * You may obtain a copy of the License at 3692 * 3693 * http://www.apache.org/licenses/LICENSE-2.0 3694 * 3695 * Unless required by applicable law or agreed to in writing, software 3696 * distributed under the License is distributed on an "AS IS" BASIS, 3697 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3698 * See the License for the specific language governing permissions and 3699 * limitations under the License. 3700 */ class ew{constructor(...e){this._delegate=new X.Lz(...e)}static documentId(){return new ew(X.Xb.keyField().canonicalString())}isEqual(e){return(e=(0,s.m9)(e))instanceof X.Lz&&this._delegate._internalPath.isEqual(e._internalPath)}}/** 3701 * @license 3702 * Copyright 2017 Google LLC 3703 * 3704 * Licensed under the Apache License, Version 2.0 (the "License"); 3705 * you may not use this file except in compliance with the License. 3706 * You may obtain a copy of the License at 3707 * 3708 * http://www.apache.org/licenses/LICENSE-2.0 3709 * 3710 * Unless required by applicable law or agreed to in writing, software 3711 * distributed under the License is distributed on an "AS IS" BASIS, 3712 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3713 * See the License for the specific language governing permissions and 3714 * limitations under the License. 3715 */ class eE{constructor(e){this._delegate=e}static serverTimestamp(){let e=(0,X.Bt)();return e._methodName="FieldValue.serverTimestamp",new eE(e)}static delete(){let e=(0,X.AK)();return e._methodName="FieldValue.delete",new eE(e)}static arrayUnion(...e){let t=(0,X.vr)(...e);return t._methodName="FieldValue.arrayUnion",new eE(t)}static arrayRemove(...e){let t=(0,X.Ab)(...e);return t._methodName="FieldValue.arrayRemove",new eE(t)}static increment(e){let t=(0,X.nP)(e);return t._methodName="FieldValue.increment",new eE(t)}isEqual(e){return this._delegate.isEqual(e._delegate)}}/** 3716 * @license 3717 * Copyright 2021 Google LLC 3718 * 3719 * Licensed under the Apache License, Version 2.0 (the "License");
3720 * you may not use this file except in compliance with the License. 3721 * You may obtain a copy of the License at 3722 * 3723 * http://www.apache.org/licenses/LICENSE-2.0 3724 * 3725 * Unless required by applicable law or agreed to in writing, software 3726 * distributed under the License is distributed on an "AS IS" BASIS, 3727 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3728 * See the License for the specific language governing permissions and 3729 * limitations under the License. 3730 */ let ex={Firestore:es,GeoPoint:X.F8,Timestamp:X.EK,Blob:en,Transaction:ea,WriteBatch:el,DocumentReference:ec,DocumentSnapshot:ep,Query:eg,QueryDocumentSnapshot:em,QuerySnapshot:ev,CollectionReference:e_,FieldPath:ew,FieldValue:eE,setLogLevel:function(e){(0,X.Ub)(e)},CACHE_SIZE_UNLIMITED:X.IX};!function(e,t){e.INTERNAL.registerComponent(new o.wA("firestore-compat",e=>{let n=e.getProvider("app-compat").getImmediate(),r=e.getProvider("firestore").getImmediate();return t(n,r)},"PUBLIC").setServiceProps(Object.assign({},ex)))}(nX=h,(e,t)=>new es(e,t,new ei)),nX.registerVersion("@firebase/firestore-compat","0.2.1");/** 3731 * @license 3732 * Copyright 2017 Google LLC 3733 * 3734 * Licensed under the Apache License, Version 2.0 (the "License"); 3735 * you may not use this file except in compliance with the License. 3736 * You may obtain a copy of the License at 3737 * 3738 * http://www.apache.org/licenses/LICENSE-2.0 3739 * 3740 * Unless required by applicable law or agreed to in writing, software 3741 * distributed under the License is distributed on an "AS IS" BASIS, 3742 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3743 * See the License for the specific language governing permissions and 3744 * limitations under the License. 3745 */ let eS="firebasestorage.googleapis.com",eT="storageBucket";/** 3746 * @license 3747 * Copyright 2017 Google LLC 3748 * 3749 * Licensed under the Apache License, Version 2.0 (the "License"); 3750 * you may not use this file except in compliance with the License. 3751 * You may obtain a copy of the License at 3752 * 3753 * http://www.apache.org/licenses/LICENSE-2.0 3754 * 3755 * Unless required by applicable law or agreed to in writing, software 3756 * distributed under the License is distributed on an "AS IS" BASIS, 3757 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3758 * See the License for the specific language governing permissions and 3759 * limitations under the License. 3760 */ class eI extends s.ZR{constructor(e,t,n=0){super(ek(e),`Firebase Storage: ${t} (${ek(e)})`),this.status_=n,this.customData={serverResponse:null},this._baseMessage=this.message,Object.setPrototypeOf(this,eI.prototype)}get status(){return this.status_}set status(e){this.status_=e}_codeEquals(e){return ek(e)===this.code}get serverResponse(){return this.customData.serverResponse}set serverResponse(e){this.customData.serverResponse=e,this.customData.serverResponse?this.message=`${this._baseMessage} 3761${this.customData.serverResponse}`:this.message=this._baseMessage}}function ek(e){return"storage/"+e}function eC(){return new eI("unknown","An unknown error occurred, please check the error payload for server response.")}function eR(){return new eI("retry-limit-exceeded","Max retry time for operation exceeded, please try again.")}function eA(){return new eI("canceled","User canceled the upload/download.")}function eO(){return new eI("cannot-slice-blob","Cannot slice blob for upload. Please retry the upload.")}function eD(e){return new eI("invalid-argument",e)}function eN(){return new eI("app-deleted","The Firebase app was deleted.")}function eP(e){return new eI("invalid-root-operation","The operation '"+e+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}function eF(e,t){return new eI("invalid-format","String does not match format '"+e+"': "+t)}function eM(e){throw new eI("internal-error","Internal error: "+e)}/** 3762 * @license 3763 * Copyright 2017 Google LLC 3764 * 3765 * Licensed under the Apache License, Version 2.0 (the "License"); 3766 * you may not use this file except in compliance with the License. 3767 * You may obtain a copy of the License at 3768 * 3769 * http://www.apache.org/licenses/LICENSE-2.0 3770 * 3771 * Unless required by applicable law or agreed to in writing, softw
3771are 3772 * distributed under the License is distributed on an "AS IS" BASIS, 3773 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3774 * See the License for the specific language governing permissions and 3775 * limitations under the License. 3776 */ class eL{constructor(e,t){this.bucket=e,this.path_=t}get path(){return this.path_}get isRoot(){return 0===this.path.length}fullServerUrl(){let e=encodeURIComponent;return"/b/"+e(this.bucket)+"/o/"+e(this.path)}bucketOnlyServerUrl(){let e=encodeURIComponent;return"/b/"+e(this.bucket)+"/o"}static makeFromBucketSpec(e,t){var n;let r;try{r=eL.makeFromUrl(e,t)}catch(i){return new eL(e,"")}if(""===r.path)return r;throw new eI("invalid-default-bucket","Invalid default bucket '"+e+"'.")}static makeFromUrl(e,t){let n=null,r="([A-Za-z0-9.\\-_]+)",i=RegExp("^gs://"+r+"(/(.*))?$","i");function s(e){e.path_=decodeURIComponent(e.path)}let o=t.replace(/[.]/g,"\\."),a=RegExp(`^https?://${o}/v[A-Za-z0-9_]+/b/${r}/o(/([^?#]*).*)?$`,"i"),l=RegExp(`^https?://${t===eS?"(?:storage.googleapis.com|storage.cloud.google.com)":t}/${r}/([^?#]*)`,"i"),u=[{regex:i,indices:{bucket:1,path:3},postModify:function(e){"/"===e.path.charAt(e.path.length-1)&&(e.path_=e.path_.slice(0,-1))}},{regex:a,indices:{bucket:1,path:3},postModify:s},{regex:l,indices:{bucket:1,path:2},postModify:s}];for(let c=0;c<u.length;c++){let h=u[c],d=h.regex.exec(e);if(d){let f=d[h.indices.bucket],p=d[h.indices.path];p||(p=""),n=new eL(f,p),h.postModify(n);break}}if(null==n){var m;throw new eI("invalid-url","Invalid URL '"+e+"'.")}return n}}class ej{constructor(e){this.promise_=Promise.reject(e)}getPromise(){return this.promise_}cancel(e=!1){}}function eU(e){return"string"==typeof e||e instanceof String}function eB(e){return eZ()&&e instanceof Blob}function eZ(){return"undefined"!=typeof Blob}function e$(e,t,n,r){if(r<t)throw eD(`Invalid value for '${e}'. Expected ${t} or greater.`);if(r>n)throw eD(`Invalid value for '${e}'. Expected ${n} or less.`)}/** 3777 * @license 3778 * Copyright 2017 Google LLC 3779 * 3780 * Licensed under the Apache License, Version 2.0 (the "License"); 3781 * you may not use this file except in compliance with the License. 3782 * You may obtain a copy of the License at 3783 * 3784 * http://www.apache.org/licenses/LICENSE-2.0 3785 * 3786 * Unless required by applicable law or agreed to in writing, software 3787 * distributed under the License is distributed on an "AS IS" BASIS, 3788 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3789 * See the License for the specific language governing permissions and 3790 * limitations under the License. 3791 */ function eV(e,t,n){let r=t;return null==n&&(r=`https://${t}`),`${n}://${r}/v0${e}`}function ez(e){let t=encodeURIComponent,n="?";for(let r in e)if(e.hasOwnProperty(r)){let i=t(r)+"="+t(e[r]);n=n+i+"&"}return n.slice(0,-1)}/** 3792 * @license 3793 * Copyright 2022 Google LLC 3794 * 3795 * Licensed under the Apache License, Version 2.0 (the "License"); 3796 * you may not use this file except in compliance with the License. 3797 * You may obtain a copy of the License at 3798 * 3799 * http://www.apache.org/licenses/LICENSE-2.0 3800 * 3801 * Unless required by applicable law or agreed to in writing, software 3802 * distributed under the License is distributed on an "AS IS" BASIS, 3803 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3804 * See the License for the specific language governing permissions and 3805 * limitations under the License. 3806 */ function eq(e,t){let n=-1!==[408,429].indexOf(e),r=-1!==t.indexOf(e);return e>=500&&e<600||n||r}(nJ=r||(r={}))[nJ.NO_ERROR=0]="NO_ERROR",nJ[nJ.NETWORK_ERROR=1]="NETWORK_ERROR",nJ[nJ.ABORT=2]="ABORT";/** 3807 * @license 3808 * Copyright 2017 Google LLC 3809 * 3810 * Licensed under the Apache License, Version 2.0 (the "License"); 3811 * you may not use this file except in compliance with the License. 3812 * You may obtain a copy of the License at 3813 * 3814 * http://www.apache.org/licenses/LICENSE-2.0 3815 * 3816 * Unless required by applicable law or agreed to in writing, software 3817 * distributed under the License is distributed on an "AS IS" BASIS, 3818 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3819 * See the License for the specific language governing permissions and 3820 * limitations under the License. 3821 */ class eG{constructor(e,t,n,r,i,s,o,a,l,u,c,h=!0){this.url_=e,this.method_=t,this.headers_=n,this.body_=r,this.successCodes_=i,this.additionalRetryCodes_=s,this.callback_=o,this.errorCallback_=a,this.timeout_=l,this.progressCallback_=u,this.connectionFactory_=c,this.retry=h,this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.promise_=new Promise((e,t)=>
3821{this.resolve_=e,this.reject_=t,this.start_()})}start_(){let e=(e,t)=>{if(t){e(!1,new eW(!1,null,!0));return}let n=this.connectionFactory_();this.pendingConnection_=n;let i=e=>{let t=e.loaded,n=e.lengthComputable?e.total:-1;null!==this.progressCallback_&&this.progressCallback_(t,n)};null!==this.progressCallback_&&n.addUploadProgressListener(i),n.send(this.url_,this.method_,this.body_,this.headers_).then(()=>{null!==this.progressCallback_&&n.removeUploadProgressListener(i),this.pendingConnection_=null;let t=n.getErrorCode()===r.NO_ERROR,s=n.getStatus();if((!t||eq(s,this.additionalRetryCodes_))&&this.retry){let o=n.getErrorCode()===r.ABORT;e(!1,new eW(!1,null,o));return}let a=-1!==this.successCodes_.indexOf(s);e(!0,new eW(a,n))})},t=(e,t)=>{let n=this.resolve_,r=this.reject_,i=t.connection;if(t.wasSuccessCode)try{var s;let o=this.callback_(i,i.getResponse());void 0!==o?n(o):n()}catch(a){r(a)}else if(null!==i){let l=eC();l.serverResponse=i.getErrorText(),r(this.errorCallback_?this.errorCallback_(i,l):l)}else if(t.canceled){let u=this.appDelete_?eN():eA();r(u)}else{let c=eR();r(c)}};this.canceled_?t(!1,new eW(!1,null,!0)):this.backoffId_=/** 3822 * @license 3823 * Copyright 2017 Google LLC 3824 * 3825 * Licensed under the Apache License, Version 2.0 (the "License"); 3826 * you may not use this file except in compliance with the License. 3827 * You may obtain a copy of the License at 3828 * 3829 * http://www.apache.org/licenses/LICENSE-2.0 3830 * 3831 * Unless required by applicable law or agreed to in writing, software 3832 * distributed under the License is distributed on an "AS IS" BASIS, 3833 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3834 * See the License for the specific language governing permissions and 3835 * limitations under the License. 3836 */ function(e,t,n){let r=1,i=null,s=null,o=!1,a=0;function l(){return 2===a}let u=!1;function c(...e){u||(u=!0,t.apply(null,e))}function h(t){i=setTimeout(()=>{i=null,e(f,l())},t)}function d(){s&&clearTimeout(s)}function f(e,...t){if(u){d();return}if(e){d(),c.call(null,e,...t);return}let n=l()||o;if(n){d(),c.call(null,e,...t);return}r<64&&(r*=2);let i;1===a?(a=2,i=0):i=(r+Math.random())*1e3,h(i)}let p=!1;function m(e){if(!p)p=!0,d(),!u&&(null!==i?(e||(a=2),clearTimeout(i),h(0)):e||(a=1))}return h(0),s=setTimeout(()=>{o=!0,m(!0)},n),m}(e,t,this.timeout_)}getPromise(){return this.promise_}cancel(e){if(this.canceled_=!0,this.appDelete_=e||!1,null!==this.backoffId_){var t;(t=this.backoffId_)(!1)}null!==this.pendingConnection_&&this.pendingConnection_.abort()}}class eW{constructor(e,t,n){this.wasSuccessCode=e,this.connection=t,this.canceled=!!n}}function eH(...e){let t="undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:void 0;if(void 0!==t){let n=new t;for(let r=0;r<e.length;r++)n.append(e[r]);return n.getBlob()}if(eZ())return new Blob(e);throw new eI("unsupported-environment","This browser doesn't seem to support creating Blobs")}/** 3837 * @license 3838 * Copyright 2017 Google LLC 3839 * 3840 * Licensed under the Apache License, Version 2.0 (the "License"); 3841 * you may not use this file except in compliance with the License. 3842 * You may obtain a copy of the License at 3843 * 3844 * http://www.apache.org/licenses/LICENSE-2.0 3845 * 3846 * Unless required by applicable law or agreed to in writing, software 3847 * distributed under the License is distributed on an "AS IS" BASIS, 3848 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3849 * See the License for the specific language governing permissions and 3850 * limitations under the License. 3851 */ let eK={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"};class eY{constructor(e,t){this.data=e,this.contentType=t||null}}function eQ(e,t){switch(e){case eK.RAW:return new eY(eX(t));case eK.BASE64:case eK.BASE64URL:return new eY(eJ(e,t));case eK.DATA_URL:return new eY(function(e){let t=new e0(e);return t.base64?eJ(eK.BASE64,t.rest):function(e){let t;try{t=decodeURIComponent(e)}catch(n){throw eF(eK.DATA_URL,"Malformed data URL.")}return eX(t)}(t.rest)}(t),function(e){let t=new e0(e);return t.contentType}(t))}throw eC()}function eX(e){let t=[];for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(r<=127)t.push(r);else if(r<=2047)t.push(192|r>>6,128|63&r);else if((64512&r)==55296){let i=n<e.length-1&&(64512&e.charCodeAt(n+1))==56320;if(i){let s=r,o=e.charCodeAt(++n);r=65536|(1023&s)<<10|1023&o,t.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|63&r)}else t.push(239,191,189)}else(64512&r)==56320?t.push(239,191,189):t.push(224|r>>12,128|r>>6&63,128|63&r)}return new Uint8Array(t)}function eJ(e,t){switch(e){case eK.BASE64:{let n=-1!==t.indexOf("-"),r=-1!==t.indexOf("_");if(n||r)throw eF(e,"Invalid character '"+(n?"-":"_")+"' found: is it base64url encoded?");break}case eK.BASE64URL:{let i=-1!==t.indexOf("+"),s=-1!==t.indexOf("/");if(i||s)throw eF(e,"Invalid character '"+(i?"+":"/")+"' found: is it base64 encoded?");t=t.replace(/-/g,"+").replace(/_/g,"/")}}let o;try{var a;a=t,o=atob(a)}catch(l){throw eF(e,"Invalid character found")}let u=new Uint8Array(o.length);for(let c=0;c<o.length;
3851c++)u[c]=o.charCodeAt(c);return u}class e0{constructor(e){this.base64=!1,this.contentType=null;let t=e.match(/^data:([^,]+)?,/);if(null===t)throw eF(eK.DATA_URL,"Must be formatted 'data:[<mediatype>][;base64],<data>");let n=t[1]||null;null!=n&&(this.base64=function(e,t){let n=e.length>=t.length;return!!n&&e.substring(e.length-t.length)===t}(n,";base64"),this.contentType=this.base64?n.substring(0,n.length-7):n),this.rest=e.substring(e.indexOf(",")+1)}}/** 3852 * @license 3853 * Copyright 2017 Google LLC 3854 * 3855 * Licensed under the Apache License, Version 2.0 (the "License"); 3856 * you may not use this file except in compliance with the License. 3857 * You may obtain a copy of the License at 3858 * 3859 * http://www.apache.org/licenses/LICENSE-2.0 3860 * 3861 * Unless required by applicable law or agreed to in writing, software 3862 * distributed under the License is distributed on an "AS IS" BASIS, 3863 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3864 * See the License for the specific language governing permissions and 3865 * limitations under the License. 3866 */ class e1{constructor(e,t){let n=0,r="";eB(e)?(this.data_=e,n=e.size,r=e.type):e instanceof ArrayBuffer?(t?this.data_=new Uint8Array(e):(this.data_=new Uint8Array(e.byteLength),this.data_.set(new Uint8Array(e))),n=this.data_.length):e instanceof Uint8Array&&(t?this.data_=e:(this.data_=new Uint8Array(e.length),this.data_.set(e)),n=e.length),this.size_=n,this.type_=r}size(){return this.size_}type(){return this.type_}slice(e,t){if(eB(this.data_)){var n,r,i;let s=this.data_,o=(n=s,r=e,i=t,n.webkitSlice?n.webkitSlice(r,i):n.mozSlice?n.mozSlice(r,i):n.slice?n.slice(r,i):null);return null===o?null:new e1(o)}{let a=new Uint8Array(this.data_.buffer,e,t-e);return new e1(a,!0)}}static getBlob(...e){if(eZ()){let t=e.map(e=>e instanceof e1?e.data_:e);return new e1(eH.apply(null,t))}{let n=e.map(e=>eU(e)?eQ(eK.RAW,e).data:e.data_),r=0;n.forEach(e=>{r+=e.byteLength});let i=new Uint8Array(r),s=0;return n.forEach(e=>{for(let t=0;t<e.length;t++)i[s++]=e[t]}),new e1(i,!0)}}uploadData(){return this.data_}}/** 3867 * @license 3868 * Copyright 2017 Google LLC 3869 * 3870 * Licensed under the Apache License, Version 2.0 (the "License"); 3871 * you may not use this file except in compliance with the License. 3872 * You may obtain a copy of the License at 3873 * 3874 * http://www.apache.org/licenses/LICENSE-2.0 3875 * 3876 * Unless required by applicable law or agreed to in writing, software 3877 * distributed under the License is distributed on an "AS IS" BASIS, 3878 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3879 * See the License for the specific language governing permissions and 3880 * limitations under the License. 3881 */ function e2(e){var t;let n;try{n=JSON.parse(e)}catch(r){return null}return"object"!=typeof(t=n)||Array.isArray(t)?null:n}function e4(e){let t=e.lastIndexOf("/",e.length-2);return -1===t?e:e.slice(t+1)}/** 3882 * @license 3883 * Copyright 2017 Google LLC 3884 * 3885 * Licensed under the Apache License, Version 2.0 (the "License"); 3886 * you may not use this file except in compliance with the License. 3887 * You may obtain a copy of the License at 3888 * 3889 * http://www.apache.org/licenses/LICENSE-2.0 3890 * 3891 * Unless required by applicable law or agreed to in writing, software 3892 * distributed under the License is distributed on an "AS IS" BASIS, 3893 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3894 * See the License for the specific language governing permissions and 3895 * limitations under the License. 3896 */ function e5(e,t){return t}class e3{constructor(e,t,n,r){this.server=e,this.local=t||e,this.writable=!!n,this.xform=r||e5}}let e6=null;function e8(){if(e6)return e6;let e=[];e.push(new e3("bucket")),e.push(new e3("generation")),e.push(new e3("metageneration")),e.push(new e3("name","fullPath",!0));let t=new e3("name");t.xform=function(e,t){var n;return!eU(t)||t.length<2?t:e4(t)},e.push(t);let n=new e3("size");return n.xform=function(e,t){return void 0!==t?Number(t):t},e.push(n),e.push(new e3("timeCreated")),e.push(new e3("updated")),e.push(new e3("md5Hash",null,!0)),e.push(new e3("cacheControl",null,!0)),e.push(new e3("contentDisposition",null,!0)),e.push(new e3("contentEncoding",null,!0)),e.push(new e3("contentLanguage",null,!0)),e.push(new e3("contentType",null,!0)),e.push(new e3("metadata","customMetadata",!0)),e6=e}function e7(e,t,n){let r=e2(t);return null===r?null:function(e,t,n){var r,i;let s={};s.type="file";let o=n.length;for(let a=0;a<o;a++){let l=n[a];s[l.local]=l.xform(s,t[l.server])}return Object.defineProperty(s,"ref",{get:function(){let t=s.bucket,n=s.fullPath,r=new eL(t,n);return e._makeStorageReference(r)}}),s}(e,r,n)}function e9(e,t){let n={},r=t.length;for(let i=0;i<r;i++){let s=t[i];s.writable&&(n[s.server]=e[s.local])}return JSON.stringify(n)}/** 3897 * @license 3898 * Copyright 2019 Google LLC 3899 * 3900 * Licensed under the Apache License, Version 2.0 (the "License");
3901 * you may not use this file except in compliance with the License. 3902 * You may obtain a copy of the License at 3903 * 3904 * http://www.apache.org/licenses/LICENSE-2.0 3905 * 3906 * Unless required by applicable law or agreed to in writing, software 3907 * distributed under the License is distributed on an "AS IS" BASIS, 3908 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3909 * See the License for the specific language governing permissions and 3910 * limitations under the License. 3911 */ let te="prefixes",tt="items";class tn{constructor(e,t,n,r){this.url=e,this.method=t,this.handler=n,this.timeout=r,this.urlParams={},this.headers={},this.body=null,this.errorHandler=null,this.progressCallback=null,this.successCodes=[200],this.additionalRetryCodes=[]}}/** 3912 * @license 3913 * Copyright 2017 Google LLC 3914 * 3915 * Licensed under the Apache License, Version 2.0 (the "License"); 3916 * you may not use this file except in compliance with the License. 3917 * You may obtain a copy of the License at 3918 * 3919 * http://www.apache.org/licenses/LICENSE-2.0 3920 * 3921 * Unless required by applicable law or agreed to in writing, software 3922 * distributed under the License is distributed on an "AS IS" BASIS, 3923 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3924 * See the License for the specific language governing permissions and 3925 * limitations under the License. 3926 */ function tr(e){if(!e)throw eC()}function ti(e,t){return function(n,r){let i=e7(e,r,t);return tr(null!==i),i}}function ts(e){return function(t,n){var r,i;let s;return 401===t.getStatus()?s=t.getErrorText().includes("Firebase App Check token is invalid")?new eI("unauthorized-app","This app does not have permission to access Firebase Storage on this project."):new eI("unauthenticated","User is not authenticated, please authenticate using Firebase Authentication and try again."):402===t.getStatus()?(r=e.bucket,s=new eI("quota-exceeded","Quota for bucket '"+r+"' exceeded, please view quota on https://firebase.google.com/pricing/.")):403===t.getStatus()?(i=e.path,s=new eI("unauthorized","User does not have permission to access '"+i+"'.")):s=n,s.status=t.getStatus(),s.serverResponse=n.serverResponse,s}}function to(e){let t=ts(e);return function(n,r){let i=t(n,r);if(404===n.getStatus()){var s;s=e.path,i=new eI("object-not-found","Object '"+s+"' does not exist.")}return i.serverResponse=r.serverResponse,i}}function ta(e,t,n){let r=t.fullServerUrl(),i=eV(r,e.host,e._protocol),s=e.maxOperationRetryTime,o=new tn(i,"GET",ti(e,n),s);return o.errorHandler=to(t),o}function tl(e,t,n){let r=Object.assign({},n);if(r.fullPath=e.path,r.size=t.size(),!r.contentType){var i,s;r.contentType=t&&t.type()||"application/octet-stream"}return r}class tu{constructor(e,t,n,r){this.current=e,this.total=t,this.finalized=!!n,this.metadata=r||null}}function tc(e,t){let n=null;try{n=e.getResponseHeader("X-Goog-Upload-Status")}catch(r){tr(!1)}return tr(!!n&&-1!==(t||["active"]).indexOf(n)),n}/** 3927 * @license 3928 * Copyright 2017 Google LLC 3929 * 3930 * Licensed under the Apache License, Version 2.0 (the "License"); 3931 * you may not use this file except in compliance with the License. 3932 * You may obtain a copy of the License at 3933 * 3934 * http://www.apache.org/licenses/LICENSE-2.0 3935 * 3936 * Unless required by applicable law or agreed to in writing, software 3937 * distributed under the License is distributed on an "AS IS" BASIS, 3938 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3939 * See the License for the specific language governing permissions and 3940 * limitations under the License. 3941 */ let th={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"};function td(e){switch(e){case"running":case"pausing":case"canceling":return th.RUNNING;case"paused":return th.PAUSED;case"success":return th.SUCCESS;case"canceled":return th.CANCELED;default:return th.ERROR}}/** 3942 * @license 3943 * Copyright 2017 Google LLC 3944 * 3945 * Licensed under the Apache License, Version 2.0 (the "License"); 3946 * you may not use this file except in compliance with the License. 3947 * You may obtain a copy of the License at 3948 * 3949 * http://www.apache.org/licenses/LICENSE-2.0 3950 * 3951 * Unless required by applicable law or agreed to in writing, softw
3951are 3952 * distributed under the License is distributed on an "AS IS" BASIS, 3953 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3954 * See the License for the specific language governing permissions and 3955 * limitations under the License. 3956 */ class tf{constructor(e,t,n){var r;"function"==typeof e||null!=t||null!=n?(this.next=e,this.error=null!=t?t:void 0,this.complete=null!=n?n:void 0):(this.next=e.next,this.error=e.error,this.complete=e.complete)}}/** 3957 * @license 3958 * Copyright 2017 Google LLC 3959 * 3960 * Licensed under the Apache License, Version 2.0 (the "License"); 3961 * you may not use this file except in compliance with the License. 3962 * You may obtain a copy of the License at 3963 * 3964 * http://www.apache.org/licenses/LICENSE-2.0 3965 * 3966 * Unless required by applicable law or agreed to in writing, software 3967 * distributed under the License is distributed on an "AS IS" BASIS, 3968 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3969 * See the License for the specific language governing permissions and 3970 * limitations under the License. 3971 */ function tp(e){return(...t)=>{Promise.resolve().then(()=>e(...t))}}class tm{constructor(){this.sent_=!1,this.xhr_=new XMLHttpRequest,this.initXhr(),this.errorCode_=r.NO_ERROR,this.sendPromise_=new Promise(e=>{this.xhr_.addEventListener("abort",()=>{this.errorCode_=r.ABORT,e()}),this.xhr_.addEventListener("error",()=>{this.errorCode_=r.NETWORK_ERROR,e()}),this.xhr_.addEventListener("load",()=>{e()})})}send(e,t,n,r){if(this.sent_)throw eM("cannot .send() more than once");if(this.sent_=!0,this.xhr_.open(t,e,!0),void 0!==r)for(let i in r)r.hasOwnProperty(i)&&this.xhr_.setRequestHeader(i,r[i].toString());return void 0!==n?this.xhr_.send(n):this.xhr_.send(),this.sendPromise_}getErrorCode(){if(!this.sent_)throw eM("cannot .getErrorCode() before sending");return this.errorCode_}getStatus(){if(!this.sent_)throw eM("cannot .getStatus() before sending");try{return this.xhr_.status}catch(e){return -1}}getResponse(){if(!this.sent_)throw eM("cannot .getResponse() before sending");return this.xhr_.response}getErrorText(){if(!this.sent_)throw eM("cannot .getErrorText() before sending");return this.xhr_.statusText}abort(){this.xhr_.abort()}getResponseHeader(e){return this.xhr_.getResponseHeader(e)}addUploadProgressListener(e){null!=this.xhr_.upload&&this.xhr_.upload.addEventListener("progress",e)}removeUploadProgressListener(e){null!=this.xhr_.upload&&this.xhr_.upload.removeEventListener("progress",e)}}class tg extends tm{initXhr(){this.xhr_.responseType="text"}}function ty(){return new tg}/** 3972 * @license 3973 * Copyright 2017 Google LLC 3974 * 3975 * Licensed under the Apache License, Version 2.0 (the "License"); 3976 * you may not use this file except in compliance with the License. 3977 * You may obtain a copy of the License at 3978 * 3979 * http://www.apache.org/licenses/LICENSE-2.0 3980 * 3981 * Unless required by applicable law or agreed to in writing, software 3982 * distributed under the License is distributed on an "AS IS" BASIS, 3983 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3984 * See the License for the specific language governing permissions and 3985 * limitations under the License. 3986 */ class tv{constructor(e,t,n=null){this._transferred=0,this._needToFetchStatus=!1,this._needToFetchMetadata=!1,this._observers=[],this._error=void 0,this._uploadUrl=void 0,this._request=void 0,this._chunkMultiplier=1,this._resolve=void 0,this._reject=void 0,this._ref=e,this._blob=t,this._metadata=n,this._mappings=e8(),this._resumable=this._shouldDoResumable(this._blob),this._state="running",this._errorHandler=e=>{if(this._request=void 0,this._chunkMultiplier=1,e._codeEquals("canceled"))this._needToFetchStatus=!0,this.completeTransitions_();else{let t=this.isExponentialBackoffExpired();if(eq(e.status,[])){if(t)e=eR();else{this.sleepTime=Math.max(2*this.sleepTime,1e3),this._needToFetchStatus=!0,this.completeTransitions_();return}}this._error=e,this._transition("error")}},this._metadataErrorHandler=e=>{this._request=void 0,e._codeEquals("canceled")?this.completeTransitions_():(this._error=e,this._transition("error"))},this.sleepTime=0,this.maxSleepTime=this._ref.storage.maxUploadRetryTime,this._promise=new Promise((e,t)=>
3986{this._resolve=e,this._reject=t,this._start()}),this._promise.then(null,()=>{})}isExponentialBackoffExpired(){return this.sleepTime>this.maxSleepTime}_makeProgressCallback(){let e=this._transferred;return t=>this._updateProgress(e+t)}_shouldDoResumable(e){return e.size()>262144}_start(){"running"===this._state&&void 0===this._request&&(this._resumable?void 0===this._uploadUrl?this._createResumable():this._needToFetchStatus?this._fetchStatus():this._needToFetchMetadata?this._fetchMetadata():this.pendingTimeout=setTimeout(()=>{this.pendingTimeout=void 0,this._continueUpload()},this.sleepTime):this._oneShotUpload())}_resolveToken(e){Promise.all([this._ref.storage._getAuthToken(),this._ref.storage._getAppCheckToken()]).then(([t,n])=>{switch(this._state){case"running":e(t,n);break;case"canceling":this._transition("canceled");break;case"pausing":this._transition("paused")}})}_createResumable(){this._resolveToken((e,t)=>{let n=function(e,t,n,r,i){let s=t.bucketOnlyServerUrl(),o=tl(t,r,i),a={name:o.fullPath},l=eV(s,e.host,e._protocol),u={"X-Goog-Upload-Protocol":"resumable","X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":`${r.size()}`,"X-Goog-Upload-Header-Content-Type":o.contentType,"Content-Type":"application/json; charset=utf-8"},c=e9(o,n),h=e.maxUploadRetryTime,d=new tn(l,"POST",function(e){tc(e);let t;try{t=e.getResponseHeader("X-Goog-Upload-URL")}catch(n){tr(!1)}return tr(eU(t)),t},h);return d.urlParams=a,d.headers=u,d.body=c,d.errorHandler=ts(t),d}(this._ref.storage,this._ref._location,this._mappings,this._blob,this._metadata),r=this._ref.storage._makeRequest(n,ty,e,t);this._request=r,r.getPromise().then(e=>{this._request=void 0,this._uploadUrl=e,this._needToFetchStatus=!1,this.completeTransitions_()},this._errorHandler)})}_fetchStatus(){let e=this._uploadUrl;this._resolveToken((t,n)=>{let r=function(e,t,n,r){let i=e.maxUploadRetryTime,s=new tn(n,"POST",function(e){let t=tc(e,["active","final"]),n=null;try{n=e.getResponseHeader("X-Goog-Upload-Size-Received")}catch(i){tr(!1)}n||tr(!1);let s=Number(n);return tr(!isNaN(s)),new tu(s,r.size(),"final"===t)},i);return s.headers={"X-Goog-Upload-Command":"query"},s.errorHandler=ts(t),s}(this._ref.storage,this._ref._location,e,this._blob),i=this._ref.storage._makeRequest(r,ty,t,n);this._request=i,i.getPromise().then(e=>{this._request=void 0,this._updateProgress(e.current),this._needToFetchStatus=!1,e.finalized&&(this._needToFetchMetadata=!0),this.completeTransitions_()},this._errorHandler)})}_continueUpload(){let e=262144*this._chunkMultiplier,t=new tu(this._transferred,this._blob.size()),n=this._uploadUrl;this._resolveToken((r,i)=>{let s;try{s=function(e,t,n,r,i,s,o,a){let l=new tu(0,0);if(o?(l.current=o.current,l.total=o.total):(l.current=0,l.total=r.size()),r.size()!==l.total)throw new eI("server-file-wrong-size","Server recorded incorrect upload file size, please retry the upload.");let u=l.total-l.current,c=u;i>0&&(c=Math.min(c,i));let h=l.current,d=h+c,f="";f=0===c?"finalize":u===c?"upload, finalize":"upload";let p={"X-Goog-Upload-Command":f,"X-Goog-Upload-Offset":`${l.current}`},m=r.slice(h,d);if(null===m)throw eO();let g=t.maxUploadRetryTime,y=new tn(n,"POST",function(e,n){let i=tc(e,["active","final"]),o=l.current+c,a=r.size(),u;return u="final"===i?ti(t,s)(e,n):null,new tu(o,a,"final"===i,u)},g);return y.headers=p,y.body=m.uploadData(),y.progressCallback=a||null,y.errorHandler=ts(e),y}(this._ref._location,this._ref.storage,n,this._blob,e,this._mappings,t,this._makeProgressCallback())}catch(o){this._error=o,this._transition("error");return}let a=this._ref.storage._makeRequest(s,ty,r,i,!1);this._request=a,a.getPromise().then(e=>{this._increaseMultiplier(),this._request=void 0,this._updateProgress(e.current),e.finalized?(this._metadata=e.metadata,this._transition("success")):this.completeTransitions_()},this._errorHandler)})}_increaseMultiplier(){let e=262144*this._chunkMultiplier;2*e<33554432&&(this._chunkMultiplier*=2)}_fetchMetadata(){this._resolveToken((e,t)=>{let n=ta(this._ref.storage,this._ref._location,this._mappings),r=this._ref.storage._makeRequest
3986(n,ty,e,t);this._request=r,r.getPromise().then(e=>{this._request=void 0,this._metadata=e,this._transition("success")},this._metadataErrorHandler)})}_oneShotUpload(){this._resolveToken((e,t)=>{let n=function(e,t,n,r,i){let s=t.bucketOnlyServerUrl(),o={"X-Goog-Upload-Protocol":"multipart"},a=function(){let e="";for(let t=0;t<2;t++)e+=Math.random().toString().slice(2);return e}();o["Content-Type"]="multipart/related; boundary="+a;let l=tl(t,r,i),u=e9(l,n),c="--"+a+"\r\nContent-Type: application/json; charset=utf-8\r\n\r\n"+u+"\r\n--"+a+"\r\nContent-Type: "+l.contentType+"\r\n\r\n",h=e1.getBlob(c,r,"\r\n--"+a+"--");if(null===h)throw eO();let d={name:l.fullPath},f=eV(s,e.host,e._protocol),p=e.maxUploadRetryTime,m=new tn(f,"POST",ti(e,n),p);return m.urlParams=d,m.headers=o,m.body=h.uploadData(),m.errorHandler=ts(t),m}(this._ref.storage,this._ref._location,this._mappings,this._blob,this._metadata),r=this._ref.storage._makeRequest(n,ty,e,t);this._request=r,r.getPromise().then(e=>{this._request=void 0,this._metadata=e,this._updateProgress(this._blob.size()),this._transition("success")},this._errorHandler)})}_updateProgress(e){let t=this._transferred;this._transferred=e,this._transferred!==t&&this._notifyObservers()}_transition(e){if(this._state!==e)switch(e){case"canceling":case"pausing":this._state=e,void 0!==this._request?this._request.cancel():this.pendingTimeout&&(clearTimeout(this.pendingTimeout),this.pendingTimeout=void 0,this.completeTransitions_());break;case"running":let t="paused"===this._state;this._state=e,t&&(this._notifyObservers(),this._start());break;case"paused":case"error":case"success":this._state=e,this._notifyObservers();break;case"canceled":this._error=eA(),this._state=e,this._notifyObservers()}}completeTransitions_(){switch(this._state){case"pausing":this._transition("paused");break;case"canceling":this._transition("canceled");break;case"running":this._start()}}get snapshot(){let e=td(this._state);return{bytesTransferred:this._transferred,totalBytes:this._blob.size(),state:e,metadata:this._metadata,task:this,ref:this._ref}}on(e,t,n,r){let i=new tf(t||void 0,n||void 0,r||void 0);return this._addObserver(i),()=>{this._removeObserver(i)}}then(e,t){return this._promise.then(e,t)}catch(e){return this.then(null,e)}_addObserver(e){this._observers.push(e),this._notifyObserver(e)}_removeObserver(e){let t=this._observers.indexOf(e);-1!==t&&this._observers.splice(t,1)}_notifyObservers(){this._finishPromise();let e=this._observers.slice();e.forEach(e=>{this._notifyObserver(e)})}_finishPromise(){if(void 0!==this._resolve){let e=!0;switch(td(this._state)){case th.SUCCESS:tp(this._resolve.bind(null,this.snapshot))();break;case th.CANCELED:case th.ERROR:let t=this._reject;tp(t.bind(null,this._error))();break;default:e=!1}e&&(this._resolve=void 0,this._reject=void 0)}}_notifyObserver(e){let t=td(this._state);switch(t){case th.RUNNING:case th.PAUSED:e.next&&tp(e.next.bind(e,this.snapshot))();break;case th.SUCCESS:e.complete&&tp(e.complete.bind(e))();break;case th.CANCELED:case th.ERROR:default:e.error&&tp(e.error.bind(e,this._error))()}}resume(){let e="paused"===this._state||"pausing"===this._state;return e&&this._transition("running"),e}pause(){let e="running"===this._state;return e&&this._transition("pausing"),e}cancel(){let e="running"===this._state||"pausing"===this._state;return e&&this._transition("canceling"),e}}/** 3987 * @license 3988 * Copyright 2019 Google LLC 3989 * 3990 * Licensed under the Apache License, Version 2.0 (the "License"); 3991 * you may not use this file except in compliance with the License. 3992 * You may obtain a copy of the License at 3993 * 3994 * http://www.apache.org/licenses/LICENSE-2.0 3995 * 3996 * Unless required by applicable law or agreed to in writing, software 3997 * distributed under the License is distributed on an "AS IS" BASIS, 3998 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3999 * See the License for the specific language governing permissions and 4000 * limitations under the License. 4001 */ class t_{constructor(e,t){this._service=e,t instanceof eL?this._location=t:this._location=eL.makeFromUrl(t,e.host)}toString(){return"gs://"+this._location.bucket+"/"+this._location.path}_newRef(e,t){return new t_(e,t)}get root(){let e=new eL(this._location.bucket,"");return this._newRef(this._service,e)}get bucket(){return this._location.bucket}get fullPath(){return this._location.path}get name(){return e4(this._location.path)}get storage(){return this._service}get parent(){let e=/** 4002 * @license 4003 * Copyright 2017 Google LLC 4004 * 4005 * Licensed under the Apache License, Version 2.0 (the "License");
4006 * you may not use this file except in compliance with the License. 4007 * You may obtain a copy of the License at 4008 * 4009 * http://www.apache.org/licenses/LICENSE-2.0 4010 * 4011 * Unless required by applicable law or agreed to in writing, software 4012 * distributed under the License is distributed on an "AS IS" BASIS, 4013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4014 * See the License for the specific language governing permissions and 4015 * limitations under the License. 4016 */ function(e){if(0===e.length)return null;let t=e.lastIndexOf("/");if(-1===t)return"";let n=e.slice(0,t);return n}(this._location.path);if(null===e)return null;let t=new eL(this._location.bucket,e);return new t_(this._service,t)}_throwIfRoot(e){if(""===this._location.path)throw eP(e)}}async function tb(e,t,n){let r=await tw(e,{pageToken:n});t.prefixes.push(...r.prefixes),t.items.push(...r.items),null!=r.nextPageToken&&await tb(e,t,r.nextPageToken)}function tw(e,t){null!=t&&"number"==typeof t.maxResults&&e$("options.maxResults",1,1e3,t.maxResults);let n=t||{},r=function(e,t,n,r,i){var s,o;let a={};t.isRoot?a.prefix="":a.prefix=t.path+"/",n&&n.length>0&&(a.delimiter=n),r&&(a.pageToken=r),i&&(a.maxResults=i);let l=t.bucketOnlyServerUrl(),u=eV(l,e.host,e._protocol),c=e.maxOperationRetryTime,h=new tn(u,"GET",(o=t.bucket,function(t,n){let r=function(e,t,n){let r=e2(n);return null===r?null:function(e,t,n){let r={prefixes:[],items:[],nextPageToken:n.nextPageToken};if(n[te])for(let i of n[te]){let s=i.replace(/\/$/,""),o=e._makeStorageReference(new eL(t,s));r.prefixes.push(o)}if(n[tt])for(let a of n[tt]){let l=e._makeStorageReference(new eL(t,a.name));r.items.push(l)}return r}(e,t,r)}(e,o,n);return tr(null!==r),r}),c);return h.urlParams=a,h.errorHandler=ts(t),h}(e.storage,e._location,"/",n.pageToken,n.maxResults);return e.storage.makeRequestWithTokens(r,ty)}function tE(e,t){let n=function(e,t){let n=t.split("/").filter(e=>e.length>0).join("/");return 0===e.length?n:e+"/"+n}(e._location.path,t),r=new eL(e._location.bucket,n);return new t_(e.storage,r)}function tx(e,t){let n=null==t?void 0:t[eT];return null==n?null:eL.makeFromBucketSpec(n,e)}class tS{constructor(e,t,n,r,i){this.app=e,this._authProvider=t,this._appCheckProvider=n,this._url=r,this._firebaseVersion=i,this._bucket=null,this._host=eS,this._protocol="https",this._appId=null,this._deleted=!1,this._maxOperationRetryTime=12e4,this._maxUploadRetryTime=6e5,this._requests=new Set,null!=r?this._bucket=eL.makeFromBucketSpec(r,this._host):this._bucket=tx(this._host,this.app.options)}get host(){return this._host}set host(e){this._host=e,null!=this._url?this._bucket=eL.makeFromBucketSpec(this._url,e):this._bucket=tx(e,this.app.options)}get maxUploadRetryTime(){return this._maxUploadRetryTime}set maxUploadRetryTime(e){e$("time",0,Number.POSITIVE_INFINITY,e),this._maxUploadRetryTime=e}get maxOperationRetryTime(){return this._maxOperationRetryTime}set maxOperationRetryTime(e){e$("time",0,Number.POSITIVE_INFINITY,e),this._maxOperationRetryTime=e}async _getAuthToken(){if(this._overrideAuthToken)return this._overrideAuthToken;let e=this._authProvider.getImmediate({optional:!0});if(e){let t=await e.getToken();if(null!==t)return t.accessToken}return null}async _getAppCheckToken(){let e=this._appCheckProvider.getImmediate({optional:!0});if(e){let t=await e.getToken();return t.token}return null}_delete(){return this._deleted||(this._deleted=!0,this._requests.forEach(e=>e.cancel()),this._requests.clear()),Promise.resolve()}_makeStorageReference(e){return new t_(this,e)}_makeRequest(e,t,n,r,i=!0){if(this._deleted)return new ej(eN());{let s=function(e,t,n,r,i,s,o=!0){var a,l,u,c,h,d,f,p;let m=ez(e.urlParams),g=e.url+m,y=Object.assign({},e.headers);return a=y,t&&(a["X-Firebase-GMPID"]=t),u=y,null!==n&&n.length>0&&(u.Authorization="Firebase "+n),(h=y)["X-Firebase-Storage-Version"]="webjs/"+(null!=s?s:"AppManager"),f=y,null!==r&&(f["X-Firebase-AppCheck"]=r),new eG(g,e.method,y,e.body,e.successCodes,e.additionalRetryCodes,e.handler,e.errorHandler,e.timeout,e.progressCallback,i,o)}(e,this._appId,n,r,t,this._firebaseVersion,i);return this._requests.add(s),s.getPromise().then(()=>this._requests.delete(s),()=>this._requests.delete(s)),s}}async makeRequestWithTokens(e,t){let[n,r]=await Promise.all([this._getAuthToken(),this._getAppCheckToken()]);
4016return this._makeRequest(e,t,n,r).getPromise()}}let tT="@firebase/storage",tI="0.9.12";function tk(e,t){return function(e,t){var n,r,i;if(!(t&&/^[A-Za-z]+:\/\//.test(t)))return function e(t,n){if(t instanceof tS){if(null==t._bucket)throw new eI("no-default-bucket","No default bucket found. Did you set the '"+eT+"' property when initializing the app?");let r=new t_(t,t._bucket);return null!=n?e(r,n):r}return void 0!==n?tE(t,n):t}(e,t);if(e instanceof tS)return r=e,i=t,new t_(r,i);throw eD("To use ref(service, url), the first argument must be a Storage instance.")}(e=(0,s.m9)(e),t)}(0,a._registerComponent)(new o.wA("storage",function e(t,{instanceIdentifier:n}){let r=t.getProvider("app").getImmediate(),i=t.getProvider("auth-internal"),s=t.getProvider("app-check-internal");return new tS(r,i,s,n,a.SDK_VERSION)},"PUBLIC").setMultipleInstances(!0)),(0,a.registerVersion)(tT,tI,""),(0,a.registerVersion)(tT,tI,"esm2017");/** 4017 * @license 4018 * Copyright 2020 Google LLC 4019 * 4020 * Licensed under the Apache License, Version 2.0 (the "License"); 4021 * you may not use this file except in compliance with the License. 4022 * You may obtain a copy of the License at 4023 * 4024 * http://www.apache.org/licenses/LICENSE-2.0 4025 * 4026 * Unless required by applicable law or agreed to in writing, software 4027 * distributed under the License is distributed on an "AS IS" BASIS, 4028 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4029 * See the License for the specific language governing permissions and 4030 * limitations under the License. 4031 */ class tC{constructor(e,t,n){this._delegate=e,this.task=t,this.ref=n}get bytesTransferred(){return this._delegate.bytesTransferred}get metadata(){return this._delegate.metadata}get state(){return this._delegate.state}get totalBytes(){return this._delegate.totalBytes}}/** 4032 * @license 4033 * Copyright 2020 Google LLC 4034 * 4035 * Licensed under the Apache License, Version 2.0 (the "License"); 4036 * you may not use this file except in compliance with the License. 4037 * You may obtain a copy of the License at 4038 * 4039 * http://www.apache.org/licenses/LICENSE-2.0 4040 * 4041 * Unless required by applicable law or agreed to in writing, software 4042 * distributed under the License is distributed on an "AS IS" BASIS, 4043 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4044 * See the License for the specific language governing permissions and 4045 * limitations under the License. 4046 */ class tR{constructor(e,t){this._delegate=e,this._ref=t,this.cancel=this._delegate.cancel.bind(this._delegate),this.catch=this._delegate.catch.bind(this._delegate),this.pause=this._delegate.pause.bind(this._delegate),this.resume=this._delegate.resume.bind(this._delegate)}get snapshot(){return new tC(this._delegate.snapshot,this,this._ref)}then(e,t){return this._delegate.then(t=>{if(e)return e(new tC(t,this,this._ref))},t)}on(e,t,n,r){let i;return t&&(i="function"==typeof t?e=>t(new tC(e,this,this._ref)):{next:t.next?e=>t.next(new tC(e,this,this._ref)):void 0,complete:t.complete||void 0,error:t.error||void 0}),this._delegate.on(e,i,n||void 0,r||void 0)}}class tA{constructor(e,t){this._delegate=e,this._service=t}get prefixes(){return this._delegate.prefixes.map(e=>new tO(e,this._service))}get items(){return this._delegate.items.map(e=>new tO(e,this._service))}get nextPageToken(){return this._delegate.nextPageToken||null}}/** 4047 * @license 4048 * Copyright 2020 Google LLC 4049 * 4050 * Licensed under the Apache License, Version 2.0 (the "License"); 4051 * you may not use this file except in compliance with the License. 4052 * You may obtain a copy of the License at 4053 * 4054 * http://www.apache.org/licenses/LICENSE-2.0 4055 * 4056 * Unless required by applicable law or agreed to in writing, software 4057 * distributed under the License is distributed on an "AS IS" BASIS, 4058 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4059 * See the License for the specific language governing permissions and 4060 * limitations under the License. 4061 */ class tO{constructor(e,t){this._delegate=e,this.storage=t}get name(){return this._delegate.name}get bucket(){return this._delegate.bucket}get fullPath(){return this._delegate.fullPath}toString(){return this._delegate.toString()}child(e){var t,n;let r=tE(t=this._delegate,e);return new tO(r,this.storage)}get root(){return new tO(this._delegate.root,this.storage)}get parent(){let e=this._delegate.parent;return null==e?null:new tO(e,this.storage)}put(e,t){var n,r,i,o,a,l;return this._throwIfRoot("put"),new tR((n=this._delegate,(o=n=(0,s.m9)(n))._throwIfRoot("uploadBytesResumable"),new tv(o,new e1(e),t)),this)}putString(e,t=eK.RAW,n){this._throwIfRoot("putString");let r=eQ(t,e),i=Object.assign({},n);return null==i.contentType&&null!=r.contentType&&(i.contentType=r.contentType),new tR(new tv(this._delegate,new e1(r.data,!0),i),this)}listAll(){var e;return(e=this._delegate,function(e){let t={prefixes:[],items:[]};return tb(e,t).then(()=>t)}
4061(e=(0,s.m9)(e))).then(e=>new tA(e,this.storage))}list(e){var t,n;return(t=this._delegate,tw(t=(0,s.m9)(t),e||void 0)).then(e=>new tA(e,this.storage))}getMetadata(){var e;return e=this._delegate,function(e){e._throwIfRoot("getMetadata");let t=ta(e.storage,e._location,e8());return e.storage.makeRequestWithTokens(t,ty)}(e=(0,s.m9)(e))}updateMetadata(e){var t,n;return t=this._delegate,function(e,t){e._throwIfRoot("updateMetadata");let n=function(e,t,n,r){let i=t.fullServerUrl(),s=eV(i,e.host,e._protocol),o=e9(n,r),a=e.maxOperationRetryTime,l=new tn(s,"PATCH",ti(e,r),a);return l.headers={"Content-Type":"application/json; charset=utf-8"},l.body=o,l.errorHandler=to(t),l}(e.storage,e._location,t,e8());return e.storage.makeRequestWithTokens(n,ty)}(t=(0,s.m9)(t),e)}getDownloadURL(){var e;return e=this._delegate,function(e){e._throwIfRoot("getDownloadURL");let t=function(e,t,n){var r,i;let s=t.fullServerUrl(),o=eV(s,e.host,e._protocol),a=e.maxOperationRetryTime,l=new tn(o,"GET",function(t,r){let i=e7(e,r,n);return tr(null!==i),function(e,t,n,r){let i=e2(t);if(null===i||!eU(i.downloadTokens))return null;let s=i.downloadTokens;if(0===s.length)return null;let o=encodeURIComponent,a=s.split(","),l=a.map(t=>{let i=e.bucket,s=e.fullPath,a="/b/"+o(i)+"/o/"+o(s),l=eV(a,n,r),u=ez({alt:"media",token:t});return l+u});return l[0]}(i,r,e.host,e._protocol)},a);return l.errorHandler=to(t),l}(e.storage,e._location,e8());return e.storage.makeRequestWithTokens(t,ty).then(e=>{if(null===e)throw new eI("no-download-url","The given file does not have any download URLs.");return e})}(e=(0,s.m9)(e))}delete(){var e;return this._throwIfRoot("delete"),e=this._delegate,function(e){e._throwIfRoot("deleteObject");let t=function(e,t){let n=t.fullServerUrl(),r=eV(n,e.host,e._protocol),i=e.maxOperationRetryTime,s=new tn(r,"DELETE",function(e,t){},i);return s.successCodes=[200,204],s.errorHandler=to(t),s}(e.storage,e._location);return e.storage.makeRequestWithTokens(t,ty)}(e=(0,s.m9)(e))}_throwIfRoot(e){if(""===this._delegate._location.path)throw eP(e)}}/** 4062 * @license 4063 * Copyright 2020 Google LLC 4064 * 4065 * Licensed under the Apache License, Version 2.0 (the "License"); 4066 * you may not use this file except in compliance with the License. 4067 * You may obtain a copy of the License at 4068 * 4069 * http://www.apache.org/licenses/LICENSE-2.0 4070 * 4071 * Unless required by applicable law or agreed to in writing, software 4072 * distributed under the License is distributed on an "AS IS" BASIS, 4073 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4074 * See the License for the specific language governing permissions and 4075 * limitations under the License. 4076 */ class tD{constructor(e,t){this.app=e,this._delegate=t}get maxOperationRetryTime(){return this._delegate.maxOperationRetryTime}get maxUploadRetryTime(){return this._delegate.maxUploadRetryTime}ref(e){if(tN(e))throw eD("ref() expected a child path but got a URL, use refFromURL instead.");return new tO(tk(this._delegate,e),this)}refFromURL(e){if(!tN(e))throw eD("refFromURL() expected a full URL but got a child path, use ref() instead.");try{eL.makeFromUrl(e,this._delegate.host)}catch(t){throw eD("refFromUrl() expected a valid full URL but got an invalid one.")}return new tO(tk(this._delegate,e),this)}setMaxUploadRetryTime(e){this._delegate.maxUploadRetryTime=e}setMaxOperationRetryTime(e){this._delegate.maxOperationRetryTime=e}useEmulator(e,t,n={}){!function(e,t,n,r={}){!function(e,t,n,r={}){e.host=`${t}:${n}`,e._protocol="http";let{mockUserToken:i}=r;i&&(e._overrideAuthToken="string"==typeof i?i:(0,s.Sg)(i,e.app.options.projectId))}(e,t,n,r)}(this._delegate,e,t,n)}}function tN(e){return/^[A-Za-z]+:\/\//.test(e)}(n0=h).INTERNAL.registerComponent(new o.wA("storage-compat",function e(t,{instanceIdentifier:n}){let r=t.getProvider("app-compat").getImmediate(),i=t.getProvider("storage").getImmediate({identifier:n}),s=new tD(r,i);return s},"PUBLIC").setServiceProps({TaskState:th,TaskEvent:{STATE_CHANGED:"state_changed"},StringFormat:eK,Storage:tD,Reference:tO}).setMultipleInstances(!0)),n0.registerVersion("@firebase/storage-compat","0.1.20");var tP=n(6531);let tF="@firebase/installations",tM="0.5.15",tL=`w:${tM}`,tj="FIS_v2",tU=new s.LL("installations","Installations",{"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"not-registered":"Firebase Installation is not registered.","installation-not-found":"Firebase Installation not found.","request-failed":'{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',"app-offline":"Could not process request. Application offline.","delete-pending-registration":"Can't delete installation while there is a pending registration request."});function tB(e){return e instanceof s.ZR&&e.code.includes("request-failed")}/** 4077 * @license 4078 * Copyright 2019 Google LLC 4079 * 4080 * Licensed under the Apache License, Version 2.0 (the "License");
4081 * you may not use this file except in compliance with the License. 4082 * You may obtain a copy of the License at 4083 * 4084 * http://www.apache.org/licenses/LICENSE-2.0 4085 * 4086 * Unless required by applicable law or agreed to in writing, software 4087 * distributed under the License is distributed on an "AS IS" BASIS, 4088 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4089 * See the License for the specific language governing permissions and 4090 * limitations under the License. 4091 */ function tZ({projectId:e}){return`https://firebaseinstallations.googleapis.com/v1/projects/${e}/installations`}function t$(e){var t;return{token:e.token,requestStatus:2,expiresIn:(t=e.expiresIn,Number(t.replace("s","000"))),creationTime:Date.now()}}async function tV(e,t){let n=await t.json(),r=n.error;return tU.create("request-failed",{requestName:e,serverCode:r.code,serverMessage:r.message,serverStatus:r.status})}function tz({apiKey:e}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e})}async function tq(e){let t=await e();return t.status>=500&&t.status<600?e():t}/** 4092 * @license 4093 * Copyright 2019 Google LLC 4094 * 4095 * Licensed under the Apache License, Version 2.0 (the "License"); 4096 * you may not use this file except in compliance with the License. 4097 * You may obtain a copy of the License at 4098 * 4099 * http://www.apache.org/licenses/LICENSE-2.0 4100 * 4101 * Unless required by applicable law or agreed to in writing, software 4102 * distributed under the License is distributed on an "AS IS" BASIS, 4103 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4104 * See the License for the specific language governing permissions and 4105 * limitations under the License. 4106 */ async function tG({appConfig:e,heartbeatServiceProvider:t},{fid:n}){let r=tZ(e),i=tz(e),s=t.getImmediate({optional:!0});if(s){let o=await s.getHeartbeatsHeader();o&&i.append("x-firebase-client",o)}let a={fid:n,authVersion:tj,appId:e.appId,sdkVersion:tL},l={method:"POST",headers:i,body:JSON.stringify(a)},u=await tq(()=>fetch(r,l));if(u.ok){let c=await u.json(),h={fid:c.fid||n,registrationStatus:2,refreshToken:c.refreshToken,authToken:t$(c.authToken)};return h}throw await tV("Create Installation",u)}/** 4107 * @license 4108 * Copyright 2019 Google LLC 4109 * 4110 * Licensed under the Apache License, Version 2.0 (the "License"); 4111 * you may not use this file except in compliance with the License. 4112 * You may obtain a copy of the License at 4113 * 4114 * http://www.apache.org/licenses/LICENSE-2.0 4115 * 4116 * Unless required by applicable law or agreed to in writing, software 4117 * distributed under the License is distributed on an "AS IS" BASIS, 4118 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4119 * See the License for the specific language governing permissions and 4120 * limitations under the License. 4121 */ function tW(e){return new Promise(t=>{setTimeout(t,e)})}/** 4122 * @license 4123 * Copyright 2019 Google LLC 4124 * 4125 * Licensed under the Apache License, Version 2.0 (the "License"); 4126 * you may not use this file except in compliance with the License. 4127 * You may obtain a copy of the License at 4128 * 4129 * http://www.apache.org/licenses/LICENSE-2.0 4130 * 4131 * Unless required by applicable law or agreed to in writing, software 4132 * distributed under the License is distributed on an "AS IS" BASIS, 4133 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4134 * See the License for the specific language governing permissions and 4135 * limitations under the License. 4136 */ let tH=/^[cdef][\w-]{21}$/;/** 4137 * @license 4138 * Copyright 2019 Google LLC 4139 * 4140 * Licensed under the Apache License, Version 2.0 (the "License"); 4141 * you may not use this file except in compliance with the License. 4142 * You may obtain a copy of the License at 4143 * 4144 * http://www.apache.org/licenses/LICENSE-2.0 4145 * 4146 * Unless required by applicable law or agreed to in writing, software 4147 * distributed under the License is distributed on an "AS IS" BASIS, 4148 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4149 * See the License for the specific language governing permissions and 4150 * limitations under the License. 4151 */ function tK(e){return`${e.appName}!${e.appId}`}/** 4152 * @license 4153 * Copyright 2019 Google LLC 4154 * 4155 * Licensed under the Apache License, Version 2.0 (the "License");
4156 * you may not use this file except in compliance with the License. 4157 * You may obtain a copy of the License at 4158 * 4159 * http://www.apache.org/licenses/LICENSE-2.0 4160 * 4161 * Unless required by applicable law or agreed to in writing, software 4162 * distributed under the License is distributed on an "AS IS" BASIS, 4163 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4164 * See the License for the specific language governing permissions and 4165 * limitations under the License. 4166 */ let tY=new Map;function tQ(e,t){let n=tK(e);tX(n,t),function(e,t){let n=(!tJ&&"BroadcastChannel"in self&&((tJ=new BroadcastChannel("[Firebase] FID Change")).onmessage=e=>{tX(e.data.key,e.data.fid)}),tJ);n&&n.postMessage({key:e,fid:t}),0===tY.size&&tJ&&(tJ.close(),tJ=null)}(n,t)}function tX(e,t){let n=tY.get(e);if(n)for(let r of n)r(t)}let tJ=null,t0="firebase-installations-store",t1=null;function t2(){return t1||(t1=(0,tP.X3)("firebase-installations-database",1,{upgrade(e,t){0===t&&e.createObjectStore(t0)}})),t1}async function t4(e,t){let n=tK(e),r=await t2(),i=r.transaction(t0,"readwrite"),s=i.objectStore(t0),o=await s.get(n);return await s.put(t,n),await i.done,o&&o.fid===t.fid||tQ(e,t.fid),t}async function t5(e){let t=tK(e),n=await t2(),r=n.transaction(t0,"readwrite");await r.objectStore(t0).delete(t),await r.done}async function t3(e,t){let n=tK(e),r=await t2(),i=r.transaction(t0,"readwrite"),s=i.objectStore(t0),o=await s.get(n),a=t(o);return void 0===a?await s.delete(n):await s.put(a,n),await i.done,a&&(!o||o.fid!==a.fid)&&tQ(e,a.fid),a}/** 4167 * @license 4168 * Copyright 2019 Google LLC 4169 * 4170 * Licensed under the Apache License, Version 2.0 (the "License"); 4171 * you may not use this file except in compliance with the License. 4172 * You may obtain a copy of the License at 4173 * 4174 * http://www.apache.org/licenses/LICENSE-2.0 4175 * 4176 * Unless required by applicable law or agreed to in writing, software 4177 * distributed under the License is distributed on an "AS IS" BASIS, 4178 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4179 * See the License for the specific language governing permissions and 4180 * limitations under the License. 4181 */ async function t6(e){let t,n=await t3(e.appConfig,n=>{let r=function(e){let t=e||{fid:function(){try{let e=new Uint8Array(17),t=self.crypto||self.msCrypto;t.getRandomValues(e),e[0]=112+e[0]%16;let n=function(e){let t=/** 4182 * @license 4183 * Copyright 2019 Google LLC 4184 * 4185 * Licensed under the Apache License, Version 2.0 (the "License"); 4186 * you may not use this file except in compliance with the License. 4187 * You may obtain a copy of the License at 4188 * 4189 * http://www.apache.org/licenses/LICENSE-2.0 4190 * 4191 * Unless required by applicable law or agreed to in writing, software 4192 * distributed under the License is distributed on an "AS IS" BASIS, 4193 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4194 * See the License for the specific language governing permissions and 4195 * limitations under the License. 4196 */ function(e){let t=btoa(String.fromCharCode(...e));return t.replace(/\+/g,"-").replace(/\//g,"_")}(e);return t.substr(0,22)}(e);return tH.test(n)?n:""}catch(r){return""}}(),registrationStatus:0};return ne(t)}(n),i=function(e,t){if(0===t.registrationStatus){if(!navigator.onLine){let n=Promise.reject(tU.create("app-offline"));return{installationEntry:t,registrationPromise:n}}let r={fid:t.fid,registrationStatus:1,registrationTime:Date.now()},i=t8(e,r);return{installationEntry:r,registrationPromise:i}}return 1===t.registrationStatus?{installationEntry:t,registrationPromise:t7(e)}:{installationEntry:t}}(e,r);return t=i.registrationPromise,i.installationEntry});return""===n.fid?{installationEntry:await t}:{installationEntry:n,registrationPromise:t}}async function t8(e,t){try{let n=await tG(e,t);return t4(e.appConfig,n)}catch(r){throw tB(r)&&409===r.customData.serverCode?await t5(e.appConfig):await t4(e.appConfig,{fid:t.fid,registrationStatus:0}),r}}async function t7(e){let t=await t9(e.appConfig);for(;1===t.registrationStatus;)await tW(100),t=await t9(e.appConfig);if(0===t.registrationStatus){let{installationEntry:n,registrationPromise:r}=await t6(e);return r||n}return t}function t9(e){return t3(e,e=>{if(!e)throw tU.create("installation-not-found");return ne(e)})}function ne(e){var t;return(t=e,1===t.registrationStatus&&t.registrationTime+1e4<Date.now())?{fid:e.fid,registrationStatus:0}:e}/** 4197 * @license 4198 * Copyright 2019 Google LLC 4199 * 4200 * Licensed under the Apache License, Version 2.0 (the "License");
4201 * you may not use this file except in compliance with the License. 4202 * You may obtain a copy of the License at 4203 * 4204 * http://www.apache.org/licenses/LICENSE-2.0 4205 * 4206 * Unless required by applicable law or agreed to in writing, software 4207 * distributed under the License is distributed on an "AS IS" BASIS, 4208 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4209 * See the License for the specific language governing permissions and 4210 * limitations under the License. 4211 */ async function nt({appConfig:e,heartbeatServiceProvider:t},n){let r=function(e,{fid:t}){return`${tZ(e)}/${t}/authTokens:generate`}(e,n),i=function(e,{refreshToken:t}){var n;let r=tz(e);return r.append("Authorization",(n=t,`${tj} ${n}`)),r}(e,n),s=t.getImmediate({optional:!0});if(s){let o=await s.getHeartbeatsHeader();o&&i.append("x-firebase-client",o)}let a={installation:{sdkVersion:tL,appId:e.appId}},l={method:"POST",headers:i,body:JSON.stringify(a)},u=await tq(()=>fetch(r,l));if(u.ok){let c=await u.json(),h=t$(c);return h}throw await tV("Generate Auth Token",u)}/** 4212 * @license 4213 * Copyright 2019 Google LLC 4214 * 4215 * Licensed under the Apache License, Version 2.0 (the "License"); 4216 * you may not use this file except in compliance with the License. 4217 * You may obtain a copy of the License at 4218 * 4219 * http://www.apache.org/licenses/LICENSE-2.0 4220 * 4221 * Unless required by applicable law or agreed to in writing, software 4222 * distributed under the License is distributed on an "AS IS" BASIS, 4223 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4224 * See the License for the specific language governing permissions and 4225 * limitations under the License. 4226 */ async function nn(e,t=!1){let n,r=await t3(e.appConfig,r=>{var i;if(!no(r))throw tU.create("not-registered");let s=r.authToken;if(!t&&(i=s,2===i.requestStatus&&!function(e){let t=Date.now();return t<e.creationTime||e.creationTime+e.expiresIn<t+36e5}(i)))return r;if(1===s.requestStatus)return n=nr(e,t),r;{if(!navigator.onLine)throw tU.create("app-offline");let o=function(e){let t={requestStatus:1,requestTime:Date.now()};return Object.assign(Object.assign({},e),{authToken:t})}(r);return n=ns(e,o),o}}),i=n?await n:r.authToken;return i}async function nr(e,t){let n=await ni(e.appConfig);for(;1===n.authToken.requestStatus;)await tW(100),n=await ni(e.appConfig);let r=n.authToken;return 0===r.requestStatus?nn(e,t):r}function ni(e){return t3(e,e=>{var t;if(!no(e))throw tU.create("not-registered");let n=e.authToken;return(t=n,1===t.requestStatus&&t.requestTime+1e4<Date.now())?Object.assign(Object.assign({},e),{authToken:{requestStatus:0}}):e})}async function ns(e,t){try{let n=await nt(e,t),r=Object.assign(Object.assign({},t),{authToken:n});return await t4(e.appConfig,r),n}catch(s){if(tB(s)&&(401===s.customData.serverCode||404===s.customData.serverCode))await t5(e.appConfig);else{let i=Object.assign(Object.assign({},t),{authToken:{requestStatus:0}});await t4(e.appConfig,i)}throw s}}function no(e){return void 0!==e&&2===e.registrationStatus}/** 4227 * @license 4228 * Copyright 2019 Google LLC 4229 * 4230 * Licensed under the Apache License, Version 2.0 (the "License"); 4231 * you may not use this file except in compliance with the License. 4232 * You may obtain a copy of the License at 4233 * 4234 * http://www.apache.org/licenses/LICENSE-2.0 4235 * 4236 * Unless required by applicable law or agreed to in writing, software 4237 * distributed under the License is distributed on an "AS IS" BASIS, 4238 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4239 * See the License for the specific language governing permissions and 4240 * limitations under the License. 4241 */ async function na(e){let{installationEntry:t,registrationPromise:n}=await t6(e);return n?n.catch(console.error):nn(e).catch(console.error),t.fid}/** 4242 * @license 4243 * Copyright 2019 Google LLC 4244 * 4245 * Licensed under the Apache License, Version 2.0 (the "License"); 4246 * you may not use this file except in compliance with the License. 4247 * You may obtain a copy of the License at 4248 * 4249 * http://www.apache.org/licenses/LICENSE-2.0 4250 * 4251 * Unless required by applicable law or agreed to in writing, softw
4251are 4252 * distributed under the License is distributed on an "AS IS" BASIS, 4253 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4254 * See the License for the specific language governing permissions and 4255 * limitations under the License. 4256 */ async function nl(e,t=!1){await nu(e);let n=await nn(e,t);return n.token}async function nu(e){let{registrationPromise:t}=await t6(e);t&&await t}function nc(e){return tU.create("missing-app-config-values",{valueName:e})}/** 4257 * @license 4258 * Copyright 2020 Google LLC 4259 * 4260 * Licensed under the Apache License, Version 2.0 (the "License"); 4261 * you may not use this file except in compliance with the License. 4262 * You may obtain a copy of the License at 4263 * 4264 * http://www.apache.org/licenses/LICENSE-2.0 4265 * 4266 * Unless required by applicable law or agreed to in writing, software 4267 * distributed under the License is distributed on an "AS IS" BASIS, 4268 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4269 * See the License for the specific language governing permissions and 4270 * limitations under the License. 4271 */ let nh="installations",nd=e=>{let t=e.getProvider("app").getImmediate(),n=/** 4272 * @license 4273 * Copyright 2019 Google LLC 4274 * 4275 * Licensed under the Apache License, Version 2.0 (the "License"); 4276 * you may not use this file except in compliance with the License. 4277 * You may obtain a copy of the License at 4278 * 4279 * http://www.apache.org/licenses/LICENSE-2.0 4280 * 4281 * Unless required by applicable law or agreed to in writing, software 4282 * distributed under the License is distributed on an "AS IS" BASIS, 4283 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4284 * See the License for the specific language governing permissions and 4285 * limitations under the License. 4286 */ function(e){if(!e||!e.options)throw nc("App Configuration");if(!e.name)throw nc("App Name");for(let t of["projectId","apiKey","appId"])if(!e.options[t])throw nc(t);return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}(t),r=(0,a._getProvider)(t,"heartbeat");return{app:t,appConfig:n,heartbeatServiceProvider:r,_delete:()=>Promise.resolve()}},nf=e=>{let t=e.getProvider("app").getImmediate(),n=(0,a._getProvider)(t,nh).getImmediate();return{getId:()=>na(n),getToken:e=>nl(n,e)}};(0,a._registerComponent)(new o.wA(nh,nd,"PUBLIC")),(0,a._registerComponent)(new o.wA("installations-internal",nf,"PRIVATE")),(0,a.registerVersion)(tF,tM),(0,a.registerVersion)(tF,tM,"esm2017");/** 4287 * @license 4288 * Copyright 2019 Google LLC 4289 * 4290 * Licensed under the Apache License, Version 2.0 (the "License"); 4291 * you may not use this file except in compliance with the License. 4292 * You may obtain a copy of the License at 4293 * 4294 * http://www.apache.org/licenses/LICENSE-2.0 4295 * 4296 * Unless required by applicable law or agreed to in writing, software 4297 * distributed under the License is distributed on an "AS IS" BASIS, 4298 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4299 * See the License for the specific language governing permissions and 4300 * limitations under the License. 4301 */ let np="analytics",nm="https://www.googletagmanager.com/gtag/js",ng=new l.Yd("@firebase/analytics");/** 4302 * @license 4303 * Copyright 2019 Google LLC 4304 * 4305 * Licensed under the Apache License, Version 2.0 (the "License"); 4306 * you may not use this file except in compliance with the License. 4307 * You may obtain a copy of the License at 4308 * 4309 * http://www.apache.org/licenses/LICENSE-2.0 4310 * 4311 * Unless required by applicable law or agreed to in writing, software 4312 * distributed under the License is distributed on an "AS IS" BASIS, 4313 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4314 * See the License for the specific language governing permissions and 4315 * limitations under the License. 4316 */ function ny(e){return Promise.all(e.map(e=>e.catch(e=>e)))}async function nv(e,t,n,r,i,s){let o=r[i];try{if(o)await t[o];else{let a=await ny(n),l=a.find(e=>e.measurementId===i);l&&await t[l.appId]}}catch(u){ng.error(u)}e("config",i,s)}async function n_(e,t,n,r,i){try{let s=[];if(i&&i.send_to){let o=i.send_to;Array.isArray(o)||(o=[o]);let a=await ny(n);for(let l of o){let u=a.find(e=>e.measurementId===l),c=u&&t[u.appId];if(c)s.push(c);else{s=[];break}}}0===s.length&&(s=Object.values(t)),await Promise.all(s),e("event",r,i||{})}catch(h){ng.error(h)}}let nb=new s.LL("analytics","Analytics",{"already-exists":"A Firebase Analytics instance with the appId {$id} already exists. Only one Firebase Analytics instance can be created for each appId.","already-initialized":"initializeAnalytics() cannot be called again with different options than those it was initially called with. It can be called again with the same options to return the existing instance, or getAnalytics() can be used to get a reference to the already-intialized instance.","already-initialized-settings":"Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect.","interop-component-reg-failed":"Firebase Analytics Interop Component failed to instantiate: {$reason}
4316","invalid-analytics-context":"Firebase Analytics is not supported in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","indexeddb-unavailable":"IndexedDB unavailable or restricted in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","fetch-throttle":"The config fetch request timed out while in an exponential backoff state. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.","config-fetch-failed":"Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}","no-api-key":'The "apiKey" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid API key.',"no-app-id":'The "appId" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid app ID.'}),nw=new class{constructor(e={},t=1e3){this.throttleMetadata=e,this.intervalMillis=t}getThrottleMetadata(e){return this.throttleMetadata[e]}setThrottleMetadata(e,t){this.throttleMetadata[e]=t}deleteThrottleMetadata(e){delete this.throttleMetadata[e]}};async function nE(e){var t,n;let{appId:r,apiKey:i}=e,s={method:"GET",headers:new Headers({Accept:"application/json","x-goog-api-key":i})},o="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig".replace("{app-id}",r),a=await fetch(o,s);if(200!==a.status&&304!==a.status){let l="";try{let u=await a.json();(null===(t=u.error)||void 0===t?void 0:t.message)&&(l=u.error.message)}catch(c){}throw nb.create("config-fetch-failed",{httpStatus:a.status,responseMessage:l})}return a.json()}async function nx(e,t=nw,n){let{appId:r,apiKey:i,measurementId:s}=e.options;if(!r)throw nb.create("no-app-id");if(!i){if(s)return{measurementId:s,appId:r};throw nb.create("no-api-key")}let o=t.getThrottleMetadata(r)||{backoffCount:0,throttleEndTimeMillis:Date.now()},a=new nT;return setTimeout(async()=>{a.abort()},void 0!==n?n:6e4),nS({appId:r,apiKey:i,measurementId:s},o,a,t)}async function nS(e,{throttleEndTimeMillis:t,backoffCount:n},r,i=nw){var o,a,l,u;let{appId:c,measurementId:h}=e;try{await (l=r,u=t,new Promise((e,t)=>{let n=Math.max(u-Date.now(),0),r=setTimeout(e,n);l.addEventListener(()=>{clearTimeout(r),t(nb.create("fetch-throttle",{throttleEndTimeMillis:u}))})}))}catch(d){if(h)return ng.warn(`Timed out fetching this Firebase app's measurement ID from the server. Falling back to the measurement ID ${h} provided in the "measurementId" field in the local Firebase config. [${null===(o=d)||void 0===o?void 0:o.message}]`),{appId:c,measurementId:h};throw d}try{let f=await nE(e);return i.deleteThrottleMetadata(c),f}catch(g){if(!function(e){if(!(e instanceof s.ZR)||!e.customData)return!1;let t=Number(e.customData.httpStatus);return 429===t||500===t||503===t||504===t}(g)){if(i.deleteThrottleMetadata(c),h)return ng.warn(`Failed to fetch this Firebase app's measurement ID from the server. Falling back to the measurement ID ${h} provided in the "measurementId" field in the local Firebase config. [${null==g?void 0:g.message}]`),{appId:c,measurementId:h};throw g}let p=503===Number(null===(a=null==g?void 0:g.customData)||void 0===a?void 0:a.httpStatus)?(0,s.$s)(n,i.intervalMillis,30):(0,s.$s)(n,i.intervalMillis),m={throttleEndTimeMillis:Date.now()+p,backoffCount:n+1};return i.setThrottleMetadata(c,m),ng.debug(`Calling attemptFetch again in ${p} millis`),nS(e,m,r,i)}}class nT{constructor(){this.listeners=[]}addEventListener(e){this.listeners.push(e)}abort(){this.listeners.forEach(e=>e())}}/** 4317 * @license 4318 * Copyright 2019 Google LLC 4319 * 4320 * Licensed under the Apache License, Version 2.0 (the "License"); 4321 * you may not use this file except in compliance with the License. 4322 * You may obtain a copy of the License at 4323 * 4324 * http://www.apache.org/licenses/LICENSE-2.0 4325 * 4326 * Unless required by applicable law or agreed to in writing, software 4327 * distributed under the License is distributed on an "AS IS" BASIS, 4328 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4329 * See the License for the specific language governing permissions and 4330 * limitations under the License. 4331 */ let nI;async function nk(e,t,n,r,i){if(i&&i.global){e("event",n,r);return}{let s=await t,o=Object.assign(Object.assign({},r),{send_to:s});e("event",n,o)}}async function nC(e,t,n,r){if(r&&r.global)return e("set",{screen_name:n}),Promise.resolve();{let i=await t;e("config",i,{update:!0,screen_name:n})}}async function nR(e,t,n,r){if(r&&r.global)return e("set",{user_id:n}),Promise.resolve();{let i=await t;e("config",i,{update:!0,user_id:n})}}async function nA(e,t,n,r){if(r&&r.global){let i={};for(let s of Object.keys(n))i[`user_properties.${s}`]=n[s];return e("set",i),Promise.resolve()}{let o=await t;e("config",o,{update:!0,user_properties:n})}}async function nO(e,t){let n=await e;window[`ga-disable-${n}`]=!t}let nD;/** 4332 * @license 4333 * Copyright 2020 Google LLC 4334 * 4335 * Licensed under the Apache License, Version 2.0 (the "License");
4336 * you may not use this file except in compliance with the License. 4337 * You may obtain a copy of the License at 4338 * 4339 * http://www.apache.org/licenses/LICENSE-2.0 4340 * 4341 * Unless required by applicable law or agreed to in writing, software 4342 * distributed under the License is distributed on an "AS IS" BASIS, 4343 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4344 * See the License for the specific language governing permissions and 4345 * limitations under the License. 4346 */ async function nN(){var e;if(!(0,s.hl)())return ng.warn(nb.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),!1;try{await (0,s.eu)()}catch(t){return ng.warn(nb.create("indexeddb-unavailable",{errorInfo:null===(e=t)||void 0===e?void 0:e.toString()}).message),!1}return!0}async function nP(e,t,n,r,i,s,o){var a,l,u;let c=nx(e);c.then(t=>{n[t.measurementId]=t.appId,e.options.measurementId&&t.measurementId!==e.options.measurementId&&ng.warn(`The measurement ID in the local Firebase config (${e.options.measurementId}) does not match the measurement ID fetched from the server (${t.measurementId}). To ensure analytics events are always sent to the correct Analytics property, update the measurement ID field in the local config or remove it from the local config.`)}).catch(e=>ng.error(e)),t.push(c);let h=nN().then(e=>e?r.getId():void 0),[d,f]=await Promise.all([c,h]);!function(e){let t=window.document.getElementsByTagName("script");for(let n of Object.values(t))if(n.src&&n.src.includes(nm)&&n.src.includes(e))return n;return null}(s)&&function(e,t){let n=document.createElement("script");n.src=`${nm}?l=${e}&id=${t}`,n.async=!0,document.head.appendChild(n)}(s,d.measurementId),nD&&(i("consent","default",nD),nD=l=void 0),i("js",new Date);let p=null!==(a=null==o?void 0:o.config)&&void 0!==a?a:{};return p.origin="firebase",p.update=!0,null!=f&&(p.firebase_id=f),i("config",d.measurementId,p),nI&&(i("set",nI),nI=u=void 0),d.measurementId}/** 4347 * @license 4348 * Copyright 2019 Google LLC 4349 * 4350 * Licensed under the Apache License, Version 2.0 (the "License"); 4351 * you may not use this file except in compliance with the License. 4352 * You may obtain a copy of the License at 4353 * 4354 * http://www.apache.org/licenses/LICENSE-2.0 4355 * 4356 * Unless required by applicable law or agreed to in writing, software 4357 * distributed under the License is distributed on an "AS IS" BASIS, 4358 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4359 * See the License for the specific language governing permissions and 4360 * limitations under the License. 4361 */ class nF{constructor(e){this.app=e}_delete(){return delete nM[this.app.options.appId],Promise.resolve()}}let nM={},nL=[],nj={},nU="dataLayer",nB="gtag",nZ,n$,nV=!1;function nz(e){if(nV)throw nb.create("already-initialized");e.dataLayerName&&(nU=e.dataLayerName),e.gtagName&&(nB=e.gtagName)}async function nq(){if((0,s.ru)()||!(0,s.zI)()||!(0,s.hl)())return!1;try{let e=await (0,s.eu)();return e}catch(t){return!1}}function nG(e,t,n,r){nk(n$,nM[(e=(0,s.m9)(e)).app.options.appId],t,n,r).catch(e=>ng.error(e))}let nW="@firebase/analytics",nH="0.8.3";(0,a._registerComponent)(new o.wA(np,(e,{options:t})=>{let n=e.getProvider("app").getImmediate(),r=e.getProvider("installations-internal").getImmediate();return function(e,t,n){!function(){let e=[];
4361if((0,s.ru)()&&e.push("This is a browser extension environment."),(0,s.zI)()||e.push("Cookies are not available."),e.length>0){let t=e.map((e,t)=>`(${t+1}) ${e}`).join(" "),n=nb.create("invalid-analytics-context",{errorInfo:t});ng.warn(n.message)}}();let r=e.options.appId;if(!r)throw nb.create("no-app-id");if(!e.options.apiKey){if(e.options.measurementId)ng.warn(`The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest measurement ID for this Firebase app. Falling back to the measurement ID ${e.options.measurementId} provided in the "measurementId" field in the local Firebase config.`);else throw nb.create("no-api-key")}if(null!=nM[r])throw nb.create("already-exists",{id:r});if(!nV){var i,o,a,l,u,c;let h;i=nU,h=[],Array.isArray(window[i])?h=window[i]:window[i]=h;let d,{wrappedGtag:f,gtagCore:p}=(u=nU,c=nB,d=function(...e){window[u].push(arguments)},window[c]&&"function"==typeof window[c]&&(d=window[c]),window[c]=function(e,t,n,r){async function i(i,s,o){try{"event"===i?await n_(e,t,n,s,o):"config"===i?await nv(e,t,n,r,s,o):"consent"===i?e("consent","update",o):e("set",s)}catch(a){ng.error(a)}}return i}(d,nM,nL,nj),{gtagCore:d,wrappedGtag:window[c]});n$=f,nZ=p,nV=!0}nM[r]=nP(e,nL,nj,t,nZ,nU,n);let m=new nF(e);return m}(n,r,t)},"PUBLIC")),(0,a._registerComponent)(new o.wA("analytics-internal",function(e){try{let t=e.getProvider(np).getImmediate();return{logEvent:(e,n,r)=>nG(t,e,n,r)}}catch(n){throw nb.create("interop-component-reg-failed",{reason:n})}},"PRIVATE")),(0,a.registerVersion)(nW,nH),(0,a.registerVersion)(nW,nH,"esm2017");/** 4362 * @license 4363 * Copyright 2020 Google LLC 4364 * 4365 * Licensed under the Apache License, Version 2.0 (the "License"); 4366 * you may not use this file except in compliance with the License. 4367 * You may obtain a copy of the License at 4368 * 4369 * http://www.apache.org/licenses/LICENSE-2.0 4370 * 4371 * Unless required by applicable law or agreed to in writing, software 4372 * distributed under the License is distributed on an "AS IS" BASIS, 4373 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4374 * See the License for the specific language governing permissions and 4375 * limitations under the License. 4376 */ class nK{constructor(e,t){this.app=e,this._delegate=t}logEvent(e,t,n){nG(this._delegate,e,t,n)}setCurrentScreen(e,t){!function(e,t,n){nC(n$,nM[(e=(0,s.m9)(e)).app.options.appId],t,n).catch(e=>ng.error(e))}(this._delegate,e,t)}setUserId(e,t){!function(e,t,n){nR(n$,nM[(e=(0,s.m9)(e)).app.options.appId],t,n).catch(e=>ng.error(e))}(this._delegate,e,t)}setUserProperties(e,t){!function(e,t,n){nA(n$,nM[(e=(0,s.m9)(e)).app.options.appId],t,n).catch(e=>ng.error(e))}(this._delegate,e,t)}setAnalyticsCollectionEnabled(e){!function(e,t){nO(nM[(e=(0,s.m9)(e)).app.options.appId],t).catch(e=>ng.error(e))}(this._delegate,e)}}(n1=i||(i={})).ADD_SHIPPING_INFO="add_shipping_info",n1.ADD_PAYMENT_INFO="add_payment_info",n1.ADD_TO_CART="add_to_cart",n1.ADD_TO_WISHLIST="add_to_wishlist",n1.BEGIN_CHECKOUT="begin_checkout",n1.CHECKOUT_PROGRESS="checkout_progress",n1.EXCEPTION="exception",n1.GENERATE_LEAD="generate_lead",n1.LOGIN="login",n1.PAGE_VIEW="page_view",n1.PURCHASE="purchase",n1.REFUND="refund",n1.REMOVE_FROM_CART="remove_from_cart",n1.SCREEN_VIEW="screen_view",n1.SEARCH="search",n1.SELECT_CONTENT="select_content",n1.SELECT_ITEM="select_item",n1.SELECT_PROMOTION="select_promotion",n1.SET_CHECKOUT_OPTION="set_checkout_option",n1.SHARE="share",n1.SIGN_UP="sign_up",n1.TIMING_COMPLETE="timing_complete",n1.VIEW_CART="view_cart",n1.VIEW_ITEM="view_item",n1.VIEW_ITEM_LIST="view_item_list",n1.VIEW_PROMOTION="view_promotion",n1.VIEW_SEARCH_RESULTS="view_search_results";/** 4377 * @license 4378 * Copyright 2021 Google LLC 4379 * 4380 * Licensed under the Apache License, Version 2.0 (the "License"); 4381 * you may not use this file except in compliance with the License. 4382 * You may obtain a copy of the License at 4383 * 4384 * http://www.apache.org/licenses/LICENSE-2.0 4385 * 4386 * Unless required by applicable law or agreed to in writing, software 4387 * distributed under the License is distributed on an "AS IS" BASIS, 4388 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4389 * See the License for the specific language governing permissions and 4390 * limitations under the License. 4391 */ let nY=e=>{let t=e.getProvider("app-compat").getImmediate(),n=e.getProvider("analytics").getImmediate();return new nK(t,n)};!function(){let e={Analytics:nK,settings:nz,isSupported:nq,EventName:i};h.INTERNAL.registerComponent(new o.wA("analytics-compat",nY,"PUBLIC").setServiceProps(e).setMultipleInstances(!0))}(),h.registerVersion("@firebase/analytics-compat","0.1.16"),h.apps.length||h.initializeApp({apiKey:"AIzaSyAdQ9l6qucAZ8aE3QVQDnBXJehbc_BYRMI",authDomain:"noman-blog.firebaseapp.com",projectId:"noman-blog",storageBucket:"noman-blog.appspot.com",messagingSenderId:"312512014553",appId:"1:312512014553:web:30b2dc8fdcee6e720b76c8",measurementId:"G-KCYYBHSWEP"});var nQ,nX,nJ,n0,n1,n2=h.auth(),n4=new h.auth.GoogleAuthProvider,n5=h.firestore()},1210:function(e,t){"use strict";function n(e,t,n,r){return!1}
4391Object.defineProperty(t,"__esModule",{value:!0}),t.getDomainLocale=n,("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8418:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4941).Z;n(5753).default,Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(2648).Z,s=n(7273).Z,o=i(n(7294)),a=n(6273),l=n(2725),u=n(3462),c=n(1018),h=n(7190),d=n(1210),f=n(8684),p={};function m(e,t,n,r){if(e&&a.isLocalURL(t)){Promise.resolve(e.prefetch(t,n,r)).catch(function(e){});var i=r&&void 0!==r.locale?r.locale:e&&e.locale;p[t+"%"+n+(i?"%"+i:"")]=!0}}var g=o.default.forwardRef(function(e,t){var n,i,g=e.href,y=e.as,v=e.children,_=e.prefetch,b=e.passHref,w=e.replace,E=e.shallow,x=e.scroll,S=e.locale,T=e.onClick,I=e.onMouseEnter,k=e.onTouchStart,C=e.legacyBehavior,R=void 0===C?!0!==Boolean(!1):C,A=s(e,["href","as","children","prefetch","passHref","replace","shallow","scroll","locale","onClick","onMouseEnter","onTouchStart","legacyBehavior"]);n=v,R&&("string"==typeof n||"number"==typeof n)&&(n=o.default.createElement("a",null,n));var O=!1!==_,D=o.default.useContext(u.RouterContext),N=o.default.useContext(c.AppRouterContext);N&&(D=N);var P=o.default.useMemo(function(){var e=r(a.resolveHref(D,g,!0),2),t=e[0],n=e[1];return{href:t,as:y?a.resolveHref(D,y):n||t}},[D,g,y]),F=P.href,M=P.as,L=o.default.useRef(F),j=o.default.useRef(M);R&&(i=o.default.Children.only(n));var U=R?i&&"object"==typeof i&&i.ref:t,B=r(h.useIntersection({rootMargin:"200px"}),3),Z=B[0],$=B[1],V=B[2],z=o.default.useCallback(function(e){(j.current!==M||L.current!==F)&&(V(),j.current=M,L.current=F),Z(e),U&&("function"==typeof U?U(e):"object"==typeof U&&(U.current=e))},[M,U,F,V,Z]);o.default.useEffect(function(){var e=$&&O&&a.isLocalURL(F),t=void 0!==S?S:D&&D.locale,n=p[F+"%"+M+(t?"%"+t:"")];e&&!n&&m(D,F,M,{locale:t})},[M,F,$,S,O,D]);var q={ref:z,onClick:function(e){R||"function"!=typeof T||T(e),R&&i.props&&"function"==typeof i.props.onClick&&i.props.onClick(e),e.defaultPrevented||function(e,t,n,r,i,s,l,u,c,h){if("A"!==e.currentTarget.nodeName.toUpperCase()||(!(f=(d=e).currentTarget.target)||"_self"===f)&&!d.metaKey&&!d.ctrlKey&&!d.shiftKey&&!d.altKey&&(!d.nativeEvent||2!==d.nativeEvent.which)&&a.isLocalURL(n)){e.preventDefault();var d,f,p=function(){"beforePopState"in t?t[i?"replace":"push"](n,r,{shallow:s,locale:u,scroll:l}):t[i?"replace":"push"](n,{forceOptimisticNavigation:!h})};c?o.default.startTransition(p):p()}}(e,D,F,M,w,E,x,S,Boolean(N),O)},onMouseEnter:function(e){R||"function"!=typeof I||I(e),R&&i.props&&"function"==typeof i.props.onMouseEnter&&i.props.onMouseEnter(e),!(!O&&N)&&a.isLocalURL(F)&&m(D,F,M,{priority:!0})},onTouchStart:function(e){R||"function"!=typeof k||k(e),R&&i.props&&"function"==typeof i.props.onTouchStart&&i.props.onTouchStart(e),!(!O&&N)&&a.isLocalURL(F)&&m(D,F,M,{priority:!0})}};if(!R||b||"a"===i.type&&!("href"in i.props)){var G=void 0!==S?S:D&&D.locale,W=D&&D.isLocaleDomain&&d.getDomainLocale(M,G,D.locales,D.domainLocales);q.href=W||f.addBasePath(l.addLocale(M,G,D&&D.defaultLocale))}return R?o.default.cloneElement(i,q):o.default.createElement("a",Object.assign({},A,q),n)});t.default=g,("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7190:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4941).Z;Object.defineProperty(t,"__esModule",{value:!0}),t.useIntersection=function(e){var t,n=e.rootRef,u=e.rootMargin,c=e.disabled||!o,h=r(i.useState(!1),2),d=h[0],f=h[1],p=r(i.useState(null),2),m=p[0],g=p[1];return i.useEffect(function(){if(o){if(!c&&!d&&m&&m.tagName){var e,t,r,i,h,p,g;return t=function(e){return e&&f(e)},h=(i=function(e){var t,n={root:e.root||null,margin:e.rootMargin||""},r=l.find(function(e){return e.root===n.root&&e.margin===n.margin});if(r&&(t=a.get(r)))return t;var i=new Map;return t={id:n,observer:new IntersectionObserver(function(e){e.forEach(function(e){var t=i.get(e.target),n=e.isIntersecting||e.intersectionRatio>0;t&&n&&t(n)})},e),elements:i},l.push(n),a.set(n,t),t}(r={root:null==n?void 0:n.current,rootMargin:u})).id,p=i.observer,(g=i.elements).set(m,t),p.observe(m),function(){if(g.delete(m),p.unobserve(m),0===g.size){p.disconnect(),a.delete(h);var e=l.findIndex(function(e){return e.root===h.root&&e.margin===h.margin});e>-1&&l.splice(e,1)}}}}else if(!d){var y=s.requestIdleCallback(function(){return f(!0)});return function(){return s.cancelIdleCallback(y)}}},[m,c,u,n,d]),[g,d,i.useCallback(function(){f(!1)},[])]};var i=n(7294),s=n(9311),o="function"==typeof IntersectionObserver,a=new Map,l=[];("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esMo
4391dule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1018:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TemplateContext=t.GlobalLayoutRouterContext=t.LayoutRouterContext=t.AppRouterContext=void 0;var r=(0,n(2648).Z)(n(7294)),i=r.default.createContext(null);t.AppRouterContext=i;var s=r.default.createContext(null);t.LayoutRouterContext=s;var o=r.default.createContext(null);t.GlobalLayoutRouterContext=o;var a=r.default.createContext(null);t.TemplateContext=a},643:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return eo}});var r=n(6042),i=n(5893),s=n(5697),o=n.n(s),a=n(7294),l=n(7462),u=n(8884),c=n(3918);let h=(e,t)=>(0,l.Z)({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&!e.vars&&{colorScheme:e.palette.mode}),d=e=>(0,l.Z)({color:(e.vars||e).palette.text.primary},e.typography.body1,{backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}}),f=(e,t=!1)=>{var n,r;let i={};t&&e.colorSchemes&&Object.entries(e.colorSchemes).forEach(([t,n])=>{var r;i[e.getColorSchemeSelector(t).replace(/\s*&/,"")]={colorScheme:null==(r=n.palette)?void 0:r.mode}});let s=(0,l.Z)({html:h(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:(0,l.Z)({margin:0},d(e),{"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}})},i),o=null==(n=e.components)?void 0:null==(r=n.MuiCssBaseline)?void 0:r.styleOverrides;return o&&(s=[s,o]),s};var p=function(e){let t=(0,u.Z)({props:e,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=t;return(0,i.jsxs)(a.Fragment,{children:[(0,i.jsx)(c.Z,{styles:e=>f(e,r)}),n]})},m=n(9762),g=n(2443),y=n(8357);let v=(0,y.Z)({key:"css",prepend:!0});function _(e){let{injectFirst:t,children:n}=e;return t?(0,i.jsx)(g.C,{value:v,children:n}):n}var b=n(4819),w=n(6760);let E="function"==typeof Symbol&&Symbol.for;var x=E?Symbol.for("mui.nested"):"__THEME_NESTED__",S=function(e){let{children:t,theme:n}=e,r=(0,w.Z)(),s=a.useMemo(()=>{let e=null===r?n:function(e,t){if("function"==typeof t){let n=t(e);return n}return(0,l.Z)({},e,t)}(r,n);return null!=e&&(e[x]=null!==r),e},[n,r]);return(0,i.jsx)(b.Z.Provider,{value:s,children:t})},T=n(9718);function I(e){let t=(0,T.Z)();return(0,i.jsx)(g.T.Provider,{value:"object"==typeof t?t:{},children:e.children})}var k=function(e){let{children:t,theme:n}=e;return(0,i.jsx)(S,{theme:n,children:(0,i.jsx)(I,{children:t})})},C=n(1796);function R(e,t){return"linear-gradient(to bottom, ".concat(e,", ").concat(t,")")}var A={0:"#FFFFFF",100:"#F9FAFB",200:"#F4F6F8",300:"#E9EEF9",400:"#CDD6EA",500:"#92A2C2",600:"#5E7197",700:"#3B4B6B",800:"#2B374F",900:"#142037",5008:(0,C.Fq)("#919EAB",.08),50012:(0,C.Fq)("#919EAB",.12),50016:(0,C.Fq)("#919EAB",.16),50024:(0,C.Fq)("#919EAB",.24),50032:(0,C.Fq)("#919EAB",.32),50048:(0,C.Fq)("#919EAB",.48),50056:(0,C.Fq)("#919EAB",.56),50080:(0,C.Fq)("#919EAB",.8)},O={lighter:"#FFE6DE",light:"#FFBDA8",main:"#FF7F55",dark:"#DF5436",darker:"#A13020",contrastText:"#fff"},D={lighter:"#C9D4E9",light:"#6E7C96",main:"#2B374F",dark:"#1B2447",darker:"#141E42",contrastText:"#fff"},N={lighter:"#BDFFD3",light:"#56EA88",main:"#1BB951",dark:"#008756",darker:"#003E3A",contrastText:A[800]},P={lighter:"#FFFAF3",light:"#FDF3E7",main:"#F4E2CC",dark:"#DFC5A5",darker:"#C17950",contrastText:A[800]},F={lighter:"#FDC6DD",light:"#EB5392",main:"#E9116A",dark:"#CE0F6B",darker:"#820448",contrastText:"#fff"},M={primary:R(O.light,O.main),info:R(D.light,D.main),success:R(N.light,N.main),warning:R(P.light,P.main),error:R(F.light,F.main)},L={common:{black:"#000",white:"#fff"},primary:(0,r.Z)({},O),secondary:(0,r.Z)({},{lighter:"#D4F9EE",light:"#9BD8D4",main:"#008D8C",dark:"#006261",darker:"#003932",contrastText:"#fff"}),info:(0,r.Z)({},D),success:(0,r.Z)({},N),warning:(0,r.Z)({},P),error:(0,r.Z)({},F),grey:A,gradients:M,chart:{violet:["#826AF9","#9E86FF","#D0AEFF","#F7D2FF"],blue:["#2D99FF","#83CFFF","#A5F3FF","#CCFAFF"],green:["#2CD9C5","#60F1C8","#A4F7CC","#C0F2DC"],yellow:["#FFE700","#FFEF5A","#FFF7AE","#F
4391FF3D6"],red:["#FF6C40","#FF8F6D","#FFBD98","#FFF2D4"]},divider:A[50024],text:{primary:A[800],secondary:A[600],disabled:A[500]},background:{paper:"#FFF",default:A[200],neutral:A[200]},action:{active:A[600],hover:A[5008],selected:A[50016],disabled:A[50080],disabledBackground:A[50024],focus:A[50024],hoverOpacity:.08,disabledOpacity:.48}};function j(e){return"".concat(e/16,"rem")}function U(e){var t=e.sm,n=e.md,r=e.lg;return{"@media (min-width:600px)":{fontSize:j(t)},"@media (min-width:900px)":{fontSize:j(n)},"@media (min-width:1200px)":{fontSize:j(r)}}}var B,Z,$,V,z,q,G={fontFamily:'"Poppins", sans-serif',fontWeightRegular:400,fontWeightMedium:600,fontWeightBold:700,h1:(0,r.Z)({fontWeight:700,lineHeight:1.25,fontSize:j(40)},U({sm:52,md:58,lg:64})),h2:(0,r.Z)({fontWeight:600,lineHeight:64/48,fontSize:j(32)},U({sm:40,md:44,lg:48})),h3:(0,r.Z)({fontWeight:500,lineHeight:1.5,fontSize:j(24)},U({sm:26,md:30,lg:32})),h4:(0,r.Z)({fontWeight:400,lineHeight:1.5,fontSize:j(20)},U({sm:20,md:24,lg:24})),h5:(0,r.Z)({fontWeight:300,lineHeight:1.5,fontSize:j(18)},U({sm:19,md:20,lg:20})),h6:(0,r.Z)({fontWeight:200,lineHeight:28/18,fontSize:j(17)},U({sm:18,md:18,lg:18})),subtitle1:{fontWeight:600,lineHeight:1.5,fontSize:j(16)},subtitle2:{fontWeight:600,lineHeight:22/14,fontSize:j(14)},body1:{lineHeight:1.5,fontSize:j(16)},body2:{lineHeight:22/14,fontSize:j(14)},caption:{lineHeight:1.5,fontSize:j(12)},overline:{fontWeight:700,lineHeight:1.5,fontSize:j(12),letterSpacing:1.1},button:{fontWeight:500,lineHeight:24/14,fontSize:j(14),textTransform:"capitalize"}},W=L.grey[500],H=(Z=(0,C.Fq)(W,.24),{z1:"0 1px 2px 0 ".concat(Z),z8:"0 8px 16px 0 ".concat(Z),z12:"0 0 2px 0 ".concat(Z,", 0 12px 24px 0 ").concat(Z),z16:"0 0 2px 0 ".concat(Z,", 0 16px 32px -4px ").concat(Z),z20:"0 0 2px 0 ".concat(Z,", 0 20px 40px -4px ").concat(Z),z24:"0 0 4px 0 ".concat(Z,", 0 24px 48px 0 ").concat(Z),primary:"0 8px 16px 0 ".concat((0,C.Fq)(L.primary.main,.24)),secondary:"0 8px 16px 0 ".concat((0,C.Fq)(L.secondary.main,.24)),info:"0 8px 16px 0 ".concat((0,C.Fq)(L.info.main,.24)),success:"0 8px 16px 0 ".concat((0,C.Fq)(L.success.main,.24)),warning:"0 8px 16px 0 ".concat((0,C.Fq)(L.warning.main,.24)),error:"0 8px 16px 0 ".concat((0,C.Fq)(L.error.main,.24))}),K=(V=(0,C.Fq)(W,.2),z=(0,C.Fq)(W,.14),q=(0,C.Fq)(W,.12),["none","0px 2px 1px -1px ".concat(V,",0px 1px 1px 0px ").concat(z,",0px 1px 3px 0px ").concat(q),"0px 3px 1px -2px ".concat(V,",0px 2px 2px 0px ").concat(z,",0px 1px 5px 0px ").concat(q),"0px 3px 3px -2px ".concat(V,",0px 3px 4px 0px ").concat(z,",0px 1px 8px 0px ").concat(q),"0px 2px 4px -1px ".concat(V,",0px 4px 5px 0px ").concat(z,",0px 1px 10px 0px ").concat(q),"0px 3px 5px -1px ".concat(V,",0px 5px 8px 0px ").concat(z,",0px 1px 14px 0px ").concat(q),"0px 3px 5px -1px ".concat(V,",0px 6px 10px 0px ").concat(z,",0px 1px 18px 0px ").concat(q),"0px 4px 5px -2px ".concat(V,",0px 7px 10px 1px ").concat(z,",0px 2px 16px 1px ").concat(q),"0px 5px 5px -3px ".concat(V,",0px 8px 10px 1px ").concat(z,",0px 3px 14px 2px ").concat(q),"0px 5px 6px -3px ".concat(V,",0px 9px 12px 1px ").concat(z,",0px 3px 16px 2px ").concat(q),"0px 6px 6px -3px ".concat(V,",0px 10px 14px 1px ").concat(z,",0px 4px 18px 3px ").concat(q),"0px 6px 7px -4px ".concat(V,",0px 11px 15px 1px ").concat(z,",0px 4px 20px 3px ").concat(q),"0px 7px 8px -4px ".concat(V,",0px 12px 17px 2px ").concat(z,",0px 5px 22px 4px ").concat(q),"0px 7px 8px -4px ".concat(V,",0px 13px 19px 2px ").concat(z,",0px 5px 24px 4px ").concat(q),"0px 7px 9px -4px ".concat(V,",0px 14px 21px 2px ").concat(z,",0px 5px 26px 4px ").concat(q),"0px 8px 9px -5px ".concat(V,",0px 15px 22px 2px ").concat(z,",0px 6px 28px 5px ").concat(q),"0px 8px 10px -5px ".concat(V,",0px 16px 24px 2px ").concat(z,",0px 6px 30px 5px ").concat(q),"0px 8px 11px -5px ".concat(V,",0px 17px 26px 2px ").concat(z,",0px 6px 32px 5px ").concat(q),"0px 9px 11px -5px ".concat(V,",0px 18px 28px 2px ").concat(z,",0px 7px 34px 6px ").concat(q),"0px 9px 12px -6px ".concat(V,",0px 19px 29px 2px ").concat(z,",0px 7px 36px 6px ").concat(q),"0px 10px 13px -6px ".concat(V,",0px 20px 31px 3px ").concat(z,",0px 8px 38px 7px ").concat(q),"0px 10px 13px -6px ".concat(V,",0px 21px 33px 3px ").concat(z,",0px 8px 40px 7px ").concat(q),"0px 10px 14px -6px ".concat(V,",0px 22px 35px 3px ").concat(z,",0px 8px 42px 7px ").concat(q),"0px 11px 14px -7px ".concat(V,",0px 23px 36px 3px ").concat(z,",0px 9px 44px 8px ").concat(q),"0px 11px 15px -7px ".concat(V,",0px 24px 38px 3px ").concat(z,",0px 9px 46px 8px ").concat(q),]);function Y(e){var t,n,r,s,o,l,u,c,h,d,f=e.children,g=(0,a.useMemo)(function(){return{palette:L,shape:{borderRadius:12},typography:G,shadows:K,customShadows:H}},[]),y=(0,m.Z)(g);return y.components=Object.assign({MuiCard:{styleOverrides:{root:{boxShadow:y.shadows[2],borderRadius:2*Number(y.shape.borderRadius),position:"relative",zIndex:0}}},MuiCardHeader:{defaultProps:{titleTypographyProps:{variant:"h6"},subheaderTypographyProps:{variant:"body2"}},styleOverrides:{root:{padding:y.spacing(3,3,0)}}},MuiCardContent:{styleOverrides:{root:{padding:y.spacing(3)}}}}
4391,{MuiInputBase:{styleOverrides:{root:{"&.Mui-disabled":{"& svg":{color:y.palette.text.disabled}}},input:{"&::placeholder":{opacity:1,color:y.palette.text.disabled}}}},MuiInput:{styleOverrides:{underline:{"&:before":{borderBottomColor:y.palette.grey[50056]}}}},MuiFilledInput:{styleOverrides:{root:{backgroundColor:y.palette.grey[50012],"&:hover":{backgroundColor:y.palette.grey[50016]},"&.Mui-focused":{backgroundColor:y.palette.action.focus},"&.Mui-disabled":{backgroundColor:y.palette.action.disabledBackground}},underline:{"&:before":{borderBottomColor:y.palette.grey[50056]}}}},MuiOutlinedInput:{styleOverrides:{root:{"& .MuiOutlinedInput-notchedOutline":{borderColor:y.palette.grey[50032]},"&.Mui-disabled":{"& .MuiOutlinedInput-notchedOutline":{borderColor:y.palette.action.disabledBackground}}}}}},{MuiPaper:{defaultProps:{elevation:0},styleOverrides:{root:{backgroundImage:"none"}}}},{MuiButton:{styleOverrides:{root:{"&:hover":{boxShadow:"none"}},sizeLarge:{height:48},containedInherit:{color:y.palette.grey[800],boxShadow:y.customShadows.z8,"&:hover":{backgroundColor:y.palette.grey[400]}},containedPrimary:{boxShadow:y.customShadows.primary},containedSecondary:{boxShadow:y.customShadows.secondary},containedInfo:{boxShadow:y.customShadows.info},containedSuccess:{boxShadow:y.customShadows.success},containedWarning:{boxShadow:y.customShadows.warning},containedError:{boxShadow:y.customShadows.error},outlinedInherit:{border:"1px solid ".concat(y.palette.grey[50032]),"&:hover":{backgroundColor:y.palette.action.hover}},textInherit:{"&:hover":{backgroundColor:y.palette.action.hover}}}}},{MuiTooltip:{styleOverrides:{tooltip:{backgroundColor:y.palette.grey[800]},arrow:{color:y.palette.grey[800]}}}},(u=(0,C.Fq)(y.palette.grey[900],.48),c=(0,C.Fq)(y.palette.grey[900],1),{MuiBackdrop:{styleOverrides:{root:{background:["rgb(22,28,36)","-moz-linear-gradient(75deg, ".concat(u," 0%, ").concat(c," 100%)"),"-webkit-linear-gradient(75deg, ".concat(u," 0%, ").concat(c," 100%)"),"linear-gradient(75deg, ".concat(u," 0%, ").concat(c," 100%)"),],"&.MuiBackdrop-invisible":{background:"transparent"}}}}}),{MuiTypography:{styleOverrides:{paragraph:{marginBottom:y.spacing(2)},gutterBottom:{marginBottom:y.spacing(1)}}}},{MuiCssBaseline:{styleOverrides:{"*":{margin:0,padding:0,boxSizing:"border-box","*::-webkit-scrollbar":{width:"0.1em"}},html:{width:"100%",height:"100%",WebkitOverflowScrolling:"touch"},body:{width:"100%",height:"100%"},"#root":{width:"100%",height:"100%"},input:{"&[type=number]":{MozAppearance:"textfield","&::-webkit-outer-spin-button":{margin:0,WebkitAppearance:"none"},"&::-webkit-inner-spin-button":{margin:0,WebkitAppearance:"none"}}},img:{display:"block",maxWidth:"100%"}}}},{MuiAutocomplete:{styleOverrides:{paper:{boxShadow:y.customShadows.z20}}}}),(0,i.jsx)(_,{injectFirst:!0,children:(0,i.jsxs)(k,{theme:y,children:[(0,i.jsx)(p,{}),f]})})}function Q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function X(e,t){return(X=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function J(e){return(J=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Y.propTypes={children:o().node};var ee=n(7970),et=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");if(e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t){var n,r;X(e,t)}}(l,e);var t,n,r,s,o,a=(n=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t,r,i,s,o=J(l);if(n){var a,u=J(this).constructor;s=Reflect.construct(o,arguments,u)}else s=o.apply(this,arguments);return(t=s)&&("object"==(t&&t.constructor===Symbol?"symbol":typeof t)||"function"==typeof t)?t:function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this)});function l(e){var t;return!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,l),(t=a.call(this,e)).state={hasError:!1},t}return s=[{key:"componentDidCatch",value:function(e,t){logErrorToMyService(e,t)}},{key:"render",value:function(){return this.state.hasError?(0,i.jsx)(ee.default,{}):this.props.children}}],o=[{key:"getDerivedStateFromError",value:function(e){return{hasError:!0}}}],s&&Q(l.prototype,s),o&&Q(l,o),l}(a.Component),en=n(494),er=n(1163),ei=n(5177);function es(){var e=(0,er.useRouter)(),t=(0,a.useState)(!1),n=t[0],r=t[1];return(0,a.useEffect)(function(){window.location.replace("https://noman-ai.web.app")},[]),(0,a.useEffect)(function(){var t=function(t){return t!==e.asPath&&r(!0)},n=function(t){return t===e.asPath&&r(!1)};return e.events.on("routeChangeStart",t),e.events.on("routeChangeComplete",n),e.events.on("routeChangeError",n),function(){e.events.off("routeChangeStart",t),e.events.off("routeChangeComplete",n),e.events.off("routeChangeError",n)}}),n&&(0,i.jsx)(ei.Z,{})}var eo=function(e){var t=e.Component,n=e.pageProps;return(0,i.jsx)(et,{children:(0,i.jsx)(Y,{children:(0,i.jsx)(en.Z,{children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(es,{}),(0,i.jsx)(t,(0,r.Z)({},n))]})})})})}},7970:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return A}});var r=n(5893),i=n(120),s=n(9630),o=n(7568),a=n(655),l=n(1664),u=n.n(l),c=n(1163),h=n.n(c),d=n(9243),f=n(2741),p=n(9072),m=n(5084),g=n(7836),y=n(8346),v=n(9535),_=n(494),b=n(7294),w=n(6257),E=n(5103),x=n(2175),S=n(4231),T=n(196),I=function(){var e=(0,_.a)(),t=e.signInWithGoogle,n=e.login,l=(0,b.useState)(!1),c=l[0],I=l[1],k=(0,b.useState)(""),C=(k[0],k[1]),R=(0,b.useState)(!1),A=(R[0],R[1]),O=function(){I(!0)},D=function(e,t){"clickaway"!==t&&I(!1)};function N(){return(N=(0,o.Z)(function(e){var n,r;return(0,a.__generator)(this,function(i){switch(i.label){case 0:e.preventDefault(),i.label=1;case 1:return i.trys.push([1,3,,4]),C(""),A(!0),[4,t()];case 2:return(n=i.sent()).user.displayName.split(" "),(r=E.ZP.collection("users").doc(n.user.uid)).get().then(function(e){e.exists||(T.ZP.post("https://hook.us1.make.com/op5vbserk412ykqn76d9m1to8p1g74ml",{tipo:"newUser",nombre:n.user.displayName,userEmail:n.user.email,userId:n.user.uid,palabras:4e3}).then(function(e){console.log("prompt enviado")}).catch(function(e){console.log(e)}),(0,w.pl)(r,{nombre:n.user.displayName,fotoPerfil:n.user.photoURL,email:n.user.email,palabras:4e3})),h().push("/")}
4391).catch(function(e){console.log(e)}),[3,4];case 3:return i.sent(),C("Oops algo sali\xf3 mal, por favor intentalo m\xe1s tarde"),[3,4];case 4:return[2]}})})).apply(this,arguments)}function P(){return(P=(0,o.Z)(function(e){return(0,a.__generator)(this,function(t){switch(t.label){case 0:e.preventDefault(),t.label=1;case 1:return t.trys.push([1,3,,4]),C(""),A(!0),[4,n(F.values.email,F.values.password)];case 2:return t.sent(),router.push("/"),[3,4];case 3:return t.sent(),O(),[3,4];case 4:return A(!1),[2]}})})).apply(this,arguments)}var F=(0,x.TA)({initialValues:{email:"",password:""},validationSchema:S.Ry({email:S.Z_().email("Por favor agrega un email v\xe1lido").max(255).required("Este campo es obligatorio"),password:S.Z_().max(255).required("Este campo es obligatorio")})});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.Z,{open:c,autoHideDuration:6e3,onClose:D,children:(0,r.jsx)(f.Z,{onClose:D,severity:"error",sx:{width:"100%"},children:"El usuario o contrase\xf1a son incorrectos"})}),(0,r.jsx)(i.Z,{component:"main",sx:{alignItems:"center",display:"flex",flexGrow:1,minHeight:"100%"},children:(0,r.jsxs)("form",{children:[(0,r.jsxs)(i.Z,{sx:{my:3},children:[(0,r.jsx)(s.Z,{color:"textPrimary",variant:"h4",sx:{display:{lg:"none"}},align:"center",children:"\xa1Crea contenido con Inteligencia Artificial!"}),(0,r.jsx)(s.Z,{color:"textPrimary",variant:"body2",sx:{display:{lg:"none"},mb:"2rem"},align:"center",children:"Usa inteligencia artificial para crear art\xedculos (blogs), descripciones de producto, meta t\xedtulos o meta descripciones para SEO y mucho m\xe1s..."}),(0,r.jsx)(s.Z,{color:"textPrimary",variant:"h4",children:"Ingresar"}),(0,r.jsx)(s.Z,{color:"textSecondary",gutterBottom:!0,variant:"body2",children:"Ingresa a la plataforma"})]}),(0,r.jsx)(p.ZP,{container:!0,spacing:3,children:(0,r.jsx)(p.ZP,{item:!0,xs:12,md:12,children:(0,r.jsx)(m.Z,{color:"secondary",fullWidth:!0,size:"large",startIcon:(0,r.jsx)(v.Z,{}),variant:"contained",onClick:function(e){return N.apply(this,arguments)},children:"Ingresa con Google"})})}),(0,r.jsx)(i.Z,{sx:{pb:1,pt:3},children:(0,r.jsx)(s.Z,{align:"center",color:"textSecondary",variant:"body1",children:"o ingresa con tu email"})}),(0,r.jsx)(g.Z,{error:Boolean(F.touched.email&&F.errors.email),fullWidth:!0,helperText:F.touched.email&&F.errors.email,label:"Email",margin:"normal",name:"email",onBlur:F.handleBlur,onChange:F.handleChange,type:"email",value:F.values.email,variant:"outlined"}),(0,r.jsx)(g.Z,{error:Boolean(F.touched.password&&F.errors.password),fullWidth:!0,helperText:F.touched.password&&F.errors.password,label:"Contrase\xf1a",margin:"normal",name:"password",onBlur:F.handleBlur,onChange:F.handleChange,type:"password",value:F.values.password,variant:"outlined"}),(0,r.jsx)(i.Z,{sx:{py:2},children:(0,r.jsx)(m.Z,{color:"primary",disabled:F.isSubmitting,fullWidth:!0,size:"large",variant:"contained",onClick:function(e){return P.apply(this,arguments)},children:"Ingresar ahora"})}),(0,r.jsxs)(s.Z,{color:"textSecondary",variant:"body2",children:["\xbfA\xfan no tienes una cuenta?"," ",(0,r.jsx)(u(),{href:"/registro",children:(0,r.jsx)(y.Z,{variant:"subtitle2",underline:"hover",sx:{cursor:"pointer"},children:"Reg\xedstrate"})})]})]})})]})},k=n(5052),C=n(9008),R=n.n(C),A=(0,k.P)(function(){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(R(),{children:(0,r.jsx)("title",{children:"Ingresar | Noman AI"})}),(0,r.jsxs)(i.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh",width:"100vw"},children:[(0,r.jsxs)(i.Z,{sx:{width:"50%",display:{xs:"none",lg:"flex"},flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[(0,r.jsxs)(i.Z,{sx:{p:"0 7%",mb:"1rem"},children:[(0,r.jsx)(s.Z,{variant:"h3",align:"center",gutterBottom:!0,color:"textPrimary",children:"\xa1Crea contenido con Inteligencia Artificial!"}),(0,r.jsx)(s.Z,{variant:"body1",align:"center",gutterBottom:!0,color:"textPrimary",children:"Usa inteligencia artificial para crear art\xedculos (blogs), descripciones de producto, meta t\xedtulos o meta descripciones para SEO y mucho m\xe1s..."})]}),(0,r.jsx)("img",{src:"https://entey.net/wp-content/uploads/2022/12/60-min-e1670520710119.png"})]}),(0,r.jsx)(i.Z,{sx:{width:"40%",height:"100%",flexGrow:1,display:"flex",justifyContent:"center",alignItems:"center",p:{xs:"2rem"}},children:(0,r.jsx)(I,{})})]})]})})},8814:function(e,t,n){"use strict";let r="7.20.0";var i,s=n(2343),o=n(2844),a=n(7321);let l=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/];class u{static __initStatic(){this.id="InboundFilters"}__init(){this.name=u.id}constructor(e={}){this._options=e,u.prototype.__init.call(this)}setupOnce(e,t){let n=e=>{let n=t();if(n){let r=n.getIntegration(u);if(r){var i,h,d,f;let p=n.getClient(),m=p?p.getOptions():{},g=function(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...l,],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(r._options,m);return(i=e,h=g,h.ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch(t){}return!1}(i)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.warn(`Event dropped due to being internal Sentry Error. 4392Event: ${(0,o.jH)(i)}`),0):(d=i,f=h.ignoreErrors,f&&f.length&&(function(e){if(e.message)return[e.message];if(e.exception)try{let{type:t="",value:n=""}=e.exception.values&&e.exception.values[0]||{};return[`${n}`,`${t}: ${n}`]}catch(r){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.error(`Cannot extract message for event ${(0,o.jH)(e)}`)}return[]})(d).some(e=>(0,a.U0)(e,f)))?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.warn(`Event dropped due to being matched by \`ignoreErrors\` option. 4393Event: ${(0,o.jH)(i)}`),0):!function(e,t){if(!t||!t.length)return!1;let n=c(e);return!!n&&(0,a.U0)(n,t)}(i,h.denyUrls)?function(e,t){if(!t||!t.length)return!0;let n=c(e);return!n||(0,a.U0)(n,t)}(i,h.allowUrls)||(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.warn(`Event dropped due to not being matched by \`allowUrls\` option. 4394Event: ${(0,o.jH)(i)}. 4395Url: ${c(i)}`),0):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.warn(`Event dropped due to being matched by \`denyUrls\` option. 4396Event: ${(0,o.jH)(i)}. 4397Url: ${c(i)}`),0))?e:null}}return e};n.id=this.name,e(n)}}function c(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch(n){}return t?function(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(t):null}catch(r){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.error(`Cannot extract url for event ${(0,o.jH)(e)}`),null}}u.__initStatic();var h=n(535);let d;class f{constructor(){f.prototype.__init.call(this)}static __initStatic(){this.id="FunctionToString"}__init(){this.name=f.id}setupOnce(){d=Function.prototype.toString,Function.prototype.toString=function(...e){let t=(0,h.HK)(this)||this;return d.apply(t,e)}}}f.__initStatic();var p=n(5659),m=n(350);let g=[];var y=n(360),v=n(8823),_=n(9732);
4397class b extends Error{constructor(e,t="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}}let w=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function E(e,t=!1){let{host:n,path:r,pass:i,port:s,projectId:o,protocol:a,publicKey:l}=e;return`${a}://${l}${t&&i?`:${i}`:""}@${n}${s?`:${s}`:""}/${r?`${r}/`:r}${o}`}function x(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}var S=n(7597),T=n(6893);function I(e,t=Infinity,r=Infinity){try{return function e(t,r,i=Infinity,s=Infinity,o=function(){let e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let r=0;r<t.length;r++){let i=t[r];if(i===n)return!0}return t.push(n),!1},function(n){if(e)t.delete(n);else for(let r=0;r<t.length;r++)if(t[r]===n){t.splice(r,1);break}}]}()){let[a,l]=o;if(null===r||["number","boolean","string"].includes(typeof r)&&!(0,S.i2)(r))return r;let u=function(e,t){try{if("domain"===e&&t&&"object"==typeof t&&t._events)return"[Domain]";if("domainEmitter"===e)return"[DomainEmitter]";if(void 0!==n.g&&t===n.g)return"[Global]";if("undefined"!=typeof window&&t===window)return"[Window]";if("undefined"!=typeof document&&t===document)return"[Document]";if((0,S.Cy)(t))return"[SyntheticEvent]";if("number"==typeof t&&t!=t)return"[NaN]";if(void 0===t)return"[undefined]";if("function"==typeof t)return`[Function: ${(0,y.$P)(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;return`[object ${Object.getPrototypeOf(t).constructor.name}]`}catch(r){return`**non-serializable** (${r})`}}(t,r);if(!u.startsWith("[object "))return u;if(r.__sentry_skip_normalization__)return r;if(0===i)return u.replace("object ","");if(a(r))return"[Circular ~]";if(r&&"function"==typeof r.toJSON)try{let c=r.toJSON();return e("",c,i-1,s,o)}catch(d){}let f=Array.isArray(r)?[]:{},p=0,m=(0,h.Sh)(r);for(let g in m){if(!Object.prototype.hasOwnProperty.call(m,g))continue;if(p>=s){f[g]="[MaxProperties ~]";break}let v=m[g];f[g]=e(g,v,i-1,s,o),p+=1}return l(r),f}("",e,t,r)}catch(i){return{ERROR:`**non-serializable** (${i})`}}}function k(e,t=[]){return[e,t]}function C(e,t){let[n,r]=e;return[n,[...r,t]]}function R(e,t){let n=e[1];n.forEach(e=>{let n=e[0].type;t(e,n)})}function A(e,t){let n=t||new TextEncoder;return n.encode(e)}function O(e,t){let[n,r]=e,i=JSON.stringify(n);function s(e){"string"==typeof i?i="string"==typeof e?i+e:[A(i,t),e]:i.push("string"==typeof e?A(e,t):e)}for(let o of r){let[a,l]=o;if(s(` 4398${JSON.stringify(a)} 4399`),"string"==typeof l||l instanceof Uint8Array)s(l);else{let u;try{u=JSON.stringify(l)}catch(c){u=JSON.stringify(I(l))}s(u)}}return"string"==typeof i?i:function(e){let t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t),r=0;for(let i of e)n.set(i,r),r+=i.length;return n}(i)}function D(e,t){let n="string"==typeof e.data?A(e.data,t):e.data;return[(0,h.Jr)({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n,]}let N={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default"};var P=n(1170);function F(e,t={}){var n,r,i;let s="string"==typeof t?t:t.tunnel,o="string"!=typeof t&&t._metadata?t._metadata.sdk:void 0;return s||`${function(e){let t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}(e)}${e.projectId}/envelope/?${(0,h._j)({sentry_key:e.publicKey,sentry_version:"7",...o&&{sentry_client:`${o.name}/${o.version}`}})}`}function M(e){if(!e||!e.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}var L=n(9015);let j="Not capturing exception because it's already been captured.";class U{__init(){this._integrations={}}__init2(){this._integrationsInitialized=!1}__init3(){this._numProcessing=0}__init4(){this._outcomes={}}constructor(e){if(U.prototype.__init.call(this),U.prototype.__init2.call(this),U.prototype.__init3.call(this),U.prototype.__init4.call(this),this._options=e,e.dsn){this._dsn=function(e){let t="string"==typeof e?function(e){let t=w.exec(e);if(!t)throw new b(`Invalid Sentry Dsn: ${e}`);
4399let[n,r,i="",s,o="",a]=t.slice(1),l="",u=a,c=u.split("/");if(c.length>1&&(l=c.slice(0,-1).join("/"),u=c.pop()),u){let h=u.match(/^\d+/);h&&(u=h[0])}return x({host:s,pass:i,path:l,projectId:u,port:o,protocol:n,publicKey:r})}(e):x(e);return!function(e){var t;if(!("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__))return;let{port:n,projectId:r,protocol:i}=e;if(["protocol","publicKey","host","projectId"].forEach(t=>{if(!e[t])throw new b(`Invalid Sentry Dsn: ${t} missing`)}),!r.match(/^\d+$/))throw new b(`Invalid Sentry Dsn: Invalid projectId ${r}`);if("http"!==i&&"https"!==i)throw new b(`Invalid Sentry Dsn: Invalid protocol ${i}`);if(n&&isNaN(parseInt(n,10)))throw new b(`Invalid Sentry Dsn: Invalid port ${n}`);return!0}(t),t}(e.dsn);let t=F(this._dsn,e);this._transport=e.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.warn("No DSN provided, client will not do anything.")}captureException(e,t,n){if((0,o.YO)(e)){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log(j);return}let r=t&&t.event_id;return this._process(this.eventFromException(e,t).then(e=>this._captureEvent(e,t,n)).then(e=>{r=e})),r}captureMessage(e,t,n,r){let i=n&&n.event_id,s=(0,S.pt)(e)?this.eventFromMessage(String(e),t,n):this.eventFromException(e,n);return this._process(s.then(e=>this._captureEvent(e,n,r)).then(e=>{i=e})),i}captureEvent(e,t,n){if(t&&t.originalException&&(0,o.YO)(t.originalException)){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log(j);return}let r=t&&t.event_id;return this._process(this._captureEvent(e,t,n).then(e=>{r=e})),r}captureSession(e){if(!this._isEnabled()){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.warn("SDK not enabled, will not capture session.");return}"string"!=typeof e.release?("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),(0,L.CT)(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getTransport(){return this._transport}flush(e){let t=this._transport;
4399return t?this._isClientDoneProcessing(e).then(n=>t.flush(e).then(e=>n&&e)):(0,T.WD)(!0)}close(e){return this.flush(e).then(e=>(this.getOptions().enabled=!1,e))}setupIntegrations(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=function(e){let t={};return e.forEach(e=>{t[e.name]=e,-1===g.indexOf(e.name)&&(e.setupOnce(m.c,p.Gd),g.push(e.name),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log(`Integration installed: ${e.name}`))}),t}(this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch(t){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}sendEvent(e,t={}){if(this._dsn){let n=function(e,t,n,r){var i,s;let o=M(n),a=e.type||"event";i=e,(s=n&&n.sdk)&&(i.sdk=i.sdk||{},i.sdk.name=i.sdk.name||s.name,i.sdk.version=i.sdk.version||s.version,i.sdk.integrations=[...i.sdk.integrations||[],...s.integrations||[]],i.sdk.packages=[...i.sdk.packages||[],...s.packages||[]]);let l=function(e,t,n,r){let i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&{dsn:E(r)},..."transaction"===e.type&&i&&{trace:(0,h.Jr)({...i})}}}(e,o,r,t);return delete e.sdkProcessingMetadata,k(l,[[{type:a},e]])}(e,this._dsn,this._options._metadata,this._options.tunnel);for(let r of t.attachments||[])n=C(n,D(r,this._options.transportOptions&&this._options.transportOptions.textEncoder));this._sendEnvelope(n)}}sendSession(e){if(this._dsn){let t=function(e,t,n,r){let i=M(n),s={sent_at:new Date().toISOString(),...i&&{sdk:i},...!!r&&{dsn:E(t)}};return k(s,["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}}recordDroppedEvent(e,t){if(this._options.sendClientReports){let n=`${e}:${t}`;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log(`Adding outcome: "${n}"`),this._outcomes[n]=this._outcomes[n]+1||1}}_updateSessionFromEvent(e,t){let n=!1,r=!1,i=t.exception&&t.exception.values;if(i)for(let s of(r=!0,i)){let o=s.mechanism;if(o&&!1===o.handled){n=!0;break}}let a="ok"===e.status,l=a&&0===e.errors||a&&n;l&&((0,L.CT)(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new T.cW(t=>{let n=0,r=setInterval(()=>{0==this._numProcessing?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))},1)})}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._dsn}_prepareEvent(e,t,n){let{normalizeDepth:r=3,normalizeMaxBreadth:i=1e3}=this.getOptions(),s={...e,event_id:e.event_id||t.event_id||(0,o.DM)(),timestamp:e.timestamp||(0,P.yW)()};this._applyClientOptions(s),this._applyIntegrationsMetadata(s);let a=n;t.captureContext&&(a=m.s.clone(a).update(t.captureContext));let l=(0,T.WD)(s);if(a){let u=[...t.attachments||[],...a.getAttachments()];u.length&&(t.attachments=u),l=a.applyToEvent(s,t)}return l.then(e=>"number"==typeof r&&r>0?this._normalizeEvent(e,r,i):e)}_normalizeEvent(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:I(e.data,t,n)}}))},...e.user&&{user:I(e.user,t,n)},...e.contexts&&{contexts:I(e.contexts,t,n)},...e.extra&&{extra:I(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=I(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>(e.data&&(e.data=I(e.data,t,n)),e))),r}_applyClientOptions(e){let t=this.getOptions(),{environment:n,release:r,dist:i,maxValueLength:s=250}=t;"environment"in e||(e.environment="environment"in t?n:"production"),void 0===e.release&&void 0!==r&&(e.release=r),void 0===e.dist&&void 0!==i&&(e.dist=i),e.message&&(e.message=(0,a.$G)(e.message,s));let o=e.exception&&e.exception.values&&e.exception.values[0];o&&o.value&&(o.value=(0,a.$G)(o.value,s));let l=e.request;l&&l.url&&(l.url=(0,a.$G)(l.url,s))}_applyIntegrationsMetadata(e){let t=Object.keys(this._integrations);t.length>0&&(e.sdk=e.sdk||{}
4399,e.sdk.integrations=[...e.sdk.integrations||[],...t])}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then(e=>e.event_id,e=>{("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&("log"===e.logLevel?s.kg.log(e.message):s.kg.warn(e))})}_processEvent(e,t,n){let r=this.getOptions(),{sampleRate:i}=r;if(!this._isEnabled())return(0,T.$2)(new b("SDK not enabled, will not capture event.","log"));let s="transaction"===e.type,o=s?"beforeSendTransaction":"beforeSend",a=r[o];return!s&&"number"==typeof i&&Math.random()>i?(this.recordDroppedEvent("sample_rate","error"),(0,T.$2)(new b(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"))):this._prepareEvent(e,t,n).then(n=>{if(null===n)throw this.recordDroppedEvent("event_processor",e.type||"error"),new b("An event processor returned `null`, will not send event.","log");let r=t.data&&!0===t.data.__sentry__;if(r||!a)return n;let i=a(n,t);return function(e,t){let n=`\`${t}\` must return \`null\` or a valid event.`;if((0,S.J8)(e))return e.then(e=>{if(!(0,S.PO)(e)&&null!==e)throw new b(n);return e},e=>{throw new b(`\`${t}\` rejected with ${e}`)});if(!(0,S.PO)(e)&&null!==e)throw new b(n);return e}(i,o)}).then(r=>{if(null===r)throw this.recordDroppedEvent("before_send",e.type||"error"),new b(`\`${o}\` returned \`null\`, will not send event.`,"log");let i=n&&n.getSession();!s&&i&&this._updateSessionFromEvent(i,r);let a=r.transaction_info;if(s&&a&&r.transaction!==e.transaction){let l="custom";r.transaction_info={...a,source:l,changes:[...a.changes,{source:l,timestamp:r.timestamp,propagations:a.propagations},]}}return this.sendEvent(r,t),r}).then(null,e=>{if(e instanceof b)throw e;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),new b(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. 4400Reason: ${e}`)})}_process(e){this._numProcessing+=1,e.then(e=>(this._numProcessing-=1,e),e=>(this._numProcessing-=1,e))}_sendEnvelope(e){this._transport&&this._dsn?this._transport.send(e).then(null,e=>{("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.error("Error while sending event:",e)}):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.error("Transport disabled")}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.keys(e).map(t=>{let[n,r]=t.split(":");return{reason:n,category:r,quantity:e[t]}})}}function B(e,t){let n=$(e,t),r={type:t&&t.name,value:function(e){let t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:t:"No error message"}(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function Z(e,t){return{exception:{values:[B(e,t)]}}}function $(e,t){let n=t.stacktrace||t.stack||"",r=function(e){if(e){if("number"==typeof e.framesToPop)return e.framesToPop;if(V.test(e.message))return 1}return 0}(t);try{return e(n,r)}catch(i){}return[]}let V=/Minified React error #\d+;/i;function z(e,t,n,r,i){let s;if((0,S.VW)(t)&&t.error)return Z(e,t.error);if((0,S.TX)(t)||(0,S.fm)(t)){if("stack"in t)s=Z(e,t);else{let a=t.name||((0,S.TX)(t)?"DOMError":"DOMException"),l=t.message?`${a}: ${t.message}`:a;s=q(e,l,n,r),(0,o.Db)(s,l)}return"code"in t&&(s.tags={...s.tags,"DOMException.code":`${t.code}`}),s}return(0,S.VZ)(t)?Z(e,t):(0,S.PO)(t)||(0,S.cO)(t)?(s=function(e,t,n,r){let i=(0,p.Gd)(),s=i.getClient(),o=s&&s.getOptions().normalizeDepth,a={exception:{values:[{type:(0,S.cO)(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:`Non-Error ${r?"promise rejection":"exception"} captured with keys: ${(0,h.zf)(t)}`},]},extra:{__serialized__:function e(t,n=3,r=102400){var i,s;let o=I(t,n);return(i=o,~-encodeURI(s=JSON.stringify(i)).split(/%..|./).length>r)?e(t,n-1,r):o}(t,o)}};if(n){let l=$(e,n);l.length&&(a.exception.values[0].stacktrace={frames:l})}return a}(e,t,n,i),(0,o.EG)(s,{synthetic:!0}),s):(s=q(e,t,n,r),(0,o.Db)(s,`${t}`,void 0),(0,o.EG)(s,{synthetic:!0}),s)}function q(e,t,n,r){let i={message:t};if(r&&n){let s=$(e,n);s.length&&(i.exception={values:[{value:t,stacktrace:{frames:s}}]})}return i}var G=n(4487),W=n(1235);let H=W.n2,K=0;function Y(){return K>0}function Q(e,t={}
4400,n){if("function"!=typeof e)return e;try{let r=e.__sentry_wrapped__;if(r)return r;if((0,h.HK)(e))return e}catch(i){return e}let s=function(){let r=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);let i=r.map(e=>Q(e,t));return e.apply(this,i)}catch(s){throw K+=1,setTimeout(()=>{K-=1}),(0,G.$e)(e=>{e.addEventProcessor(e=>(t.mechanism&&((0,o.Db)(e,void 0,void 0),(0,o.EG)(e,t.mechanism)),e.extra={...e.extra,arguments:r},e)),(0,G.Tb)(s)}),s}};try{for(let a in e)Object.prototype.hasOwnProperty.call(e,a)&&(s[a]=e[a])}catch(l){}(0,h.$Q)(s,e),(0,h.xp)(e,"__sentry_wrapped__",s);try{let u=Object.getOwnPropertyDescriptor(s,"name");u.configurable&&Object.defineProperty(s,"name",{get:()=>e.name})}catch(c){}return s}var X=n(8464);let J=["fatal","error","warning","log","info","debug"];function ee(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],relative:t[5]+n+r}}let et="Breadcrumbs";class en{static __initStatic(){this.id=et}__init(){this.name=en.id}constructor(e){en.prototype.__init.call(this),this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e}}setupOnce(){var e;this.options.console&&(0,_.o)("console",er),this.options.dom&&(0,_.o)("dom",(e=this.options.dom,function(t){let n,r="object"==typeof e?e.serializeAttribute:void 0;"string"==typeof r&&(r=[r]);try{n=t.event.target?(0,X.Rt)(t.event.target,r):(0,X.Rt)(t.event,r)}catch(i){n="<unknown>"}0!==n.length&&(0,p.Gd)().addBreadcrumb({category:`ui.${t.name}`,message:n},{event:t.event,name:t.name,global:t.global})})),this.options.xhr&&(0,_.o)("xhr",ei),this.options.fetch&&(0,_.o)("fetch",es),this.options.history&&(0,_.o)("history",eo)}}function er(e){var t;for(let n=0;n<e.args.length;n++)if("ref=Ref<"===e.args[n]){e.args[n+1]="viewRef";break}let r={category:"console",data:{arguments:e.args,logger:"console"},level:"warn"===(t=e.level)?"warning":J.includes(t)?t:"log",message:(0,a.nK)(e.args," ")};if("assert"===e.level){if(!1!==e.args[0])return;r.message=`Assertion failed: ${(0,a.nK)(e.args.slice(1)," ")||"console.assert"}`,r.data.arguments=e.args.slice(1)}(0,p.Gd)().addBreadcrumb(r,{input:e.args,level:e.level})}function ei(e){if(e.endTimestamp){if(e.xhr.__sentry_own_request__)return;let{method:t,url:n,status_code:r,body:i}=e.xhr.__sentry_xhr__||{};(0,p.Gd)().addBreadcrumb({category:"xhr",data:{method:t,url:n,status_code:r},type:"http"},{xhr:e.xhr,input:i});return}}function es(e){!(!e.endTimestamp||e.fetchData.url.match(/sentry_key/)&&"POST"===e.fetchData.method)&&(e.error?(0,p.Gd)().addBreadcrumb({category:"fetch",data:e.fetchData,level:"error",type:"http"},{data:e.error,input:e.args}):(0,p.Gd)().addBreadcrumb({category:"fetch",data:{...e.fetchData,status_code:e.response.status},type:"http"},{input:e.args,response:e.response}))}function eo(e){let t=e.from,n=e.to,r=ee(H.location.href),i=ee(t),s=ee(n);i.path||(i=r),r.protocol===s.protocol&&r.host===s.host&&(n=s.relative),r.protocol===i.protocol&&r.host===i.host&&(t=i.relative),(0,p.Gd)().addBreadcrumb({category:"navigation",data:{from:t,to:n}})}en.__initStatic();class ea extends U{constructor(e){e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:r},],version:r},super(e),e.sendClientReports&&H.document&&H.document.addEventListener("visibilitychange",()=>{"hidden"===H.document.visibilityState&&this._flushOutcomes()})}eventFromException(e,t){return function(e,t,n,r){let i=n&&n.syntheticException||void 0,s=z(e,t,i,r);return(0,o.EG)(s),s.level="error",n&&n.event_id&&(s.event_id=n.event_id),(0,T.WD)(s)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,i){let s=r&&r.syntheticException||void 0,o=q(e,t,s,i);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),(0,T.WD)(o)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}sendEvent(e,t){let n=this.getIntegrationById(et);n&&n.options&&n.options.sentry&&(0,p.Gd)().addBreadcrumb({category:`sentry.${"transaction"===e.type?"transaction":"event"}`,event_id:e.event_id,level:e.level,message:(0,o.jH)(e)},{event:e}),super.sendEvent(e,t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}_flushOutcomes(){let e=this._clearOutcomes();if(0===e.length){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log("No outcomes to send");return}if(!this._dsn){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log("No dsn provided, will not send outcomes");return}("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log("Sending outcomes:",e);let t=F(this._dsn,this._options),n=function(e,t,n){let r=[{type:"client_report"},{timestamp:(0,P.yW)(),discarded_events:e},];return k(t?{dsn:t}:{},[r])}(e,this._options.tunnel&&E(this._dsn));try{let r="[object Navigator]"===Object.prototype.toString.call(H&&H.navigator),i=r&&"function"==typeof H.navigator.sendBeacon;
4400if(i&&!this._options.transportOptions){let o=H.navigator.sendBeacon.bind(H.navigator);o(t,O(n))}else this._sendEnvelope(n)}catch(a){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.error(a)}}}function el(e,t,n,r){let i={filename:e,function:t,in_app:!0};return void 0!==n&&(i.lineno=n),void 0!==r&&(i.colno=r),i}let eu=/^\s*at (?:(.*\).*?|.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ec=/\((\S*)(?::(\d+))(?::(\d+))\)/,eh=e=>{let t=eu.exec(e);if(t){let n=t[2]&&0===t[2].indexOf("eval");if(n){let r=ec.exec(t[2]);r&&(t[2]=r[1],t[3]=r[2],t[4]=r[3])}let[i,s]=ev(t[1]||"?",t[2]);return el(s,i,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}},ed=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|safari-extension|safari-web-extension|capacitor)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ef=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,ep=e=>{let t=ed.exec(e);if(t){let n=t[3]&&t[3].indexOf(" > eval")>-1;if(n){let r=ef.exec(t[3]);r&&(t[1]=t[1]||"eval",t[3]=r[1],t[4]=r[2],t[5]="")}let i=t[3],s=t[1]||"?";return[s,i]=ev(s,i),el(i,s,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},em=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,eg=e=>{let t=em.exec(e);return t?el(t[2],t[1]||"?",+t[3],t[4]?+t[4]:void 0):void 0},ey=(0,y.pE)(...[[30,eh],[50,ep],[40,eg]]),ev=(e,t)=>{let n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:"?",n?`safari-extension:${t}`:`safari-web-extension:${t}`,]:[e,t]},e_=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload",];class eb{static __initStatic(){this.id="TryCatch"}__init(){this.name=eb.id}constructor(e){eb.prototype.__init.call(this),this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e}}setupOnce(){this._options.setTimeout&&(0,h.hl)(H,"setTimeout",ew),this._options.setInterval&&(0,h.hl)(H,"setInterval",ew),this._options.requestAnimationFrame&&(0,h.hl)(H,"requestAnimationFrame",eE),this._options.XMLHttpRequest&&"XMLHttpRequest"in H&&(0,h.hl)(XMLHttpRequest.prototype,"send",ex);let e=this._options.eventTarget;if(e){let t=Array.isArray(e)?e:e_;t.forEach(eS)}}}function ew(e){return function(...t){let n=t[0];return t[0]=Q(n,{mechanism:{data:{function:(0,y.$P)(e)},handled:!0,type:"instrument"}}),e.apply(this,t)}}function eE(e){return function(t){return e.apply(this,[Q(t,{mechanism:{data:{function:"requestAnimationFrame",handler:(0,y.$P)(e)},handled:!0,type:"instrument"}}),])}}function ex(e){return function(...t){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in n&&"function"==typeof n[e]&&(0,h.hl)(n,e,function(t){let n={mechanism:{data:{function:e,handler:(0,y.$P)(t)},handled:!0,type:"instrument"}},r=(0,h.HK)(t);return r&&(n.mechanism.data.handler=(0,y.$P)(r)),Q(t,n)})}),e.apply(this,t)}}function eS(e){let t=H[e]&&H[e].prototype;t&&t.hasOwnProperty&&t.hasOwnProperty("addEventListener")&&((0,h.hl)(t,"addEventListener",function(t){return function(n,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=Q(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:(0,y.$P)(r),target:e},handled:!0,type:"instrument"}}))}catch(s){}return t.apply(this,[n,Q(r,{mechanism:{data:{function:"addEventListener",handler:(0,y.$P)(r),target:e},handled:!0,type:"instrument"}}),i,])}}),(0,h.hl)(t,"removeEventListener",function(e){return function(t,n,r){try{let i=n&&n.__sentry_wrapped__;i&&e.call(this,t,i,r)}catch(s){}return e.call(this,t,n,r)}}))}eb.__initStatic();class eT{static __initStatic(){this.id="GlobalHandlers"}__init(){this.name=eT.id}__init2(){this._installFunc={onerror:eI,onunhandledrejection:ek}}constructor(e){eT.prototype.__init.call(this),eT.prototype.__init2.call(this),this._options={onerror:!0,onunhandledrejection:!0,...e}}setupOnce(){Error.stackTraceLimit=50;let e=this._options;for(let t in e){let n=this._installFunc[t];n&&e[t]&&(eR(t),n(),this._installFunc[t]=void 0)}}}function eI(){(0,_.o)("error",e=>{let[t,n,r]=eO();if(!t.getIntegration(eT))return;let{msg:i,url:s,line:o,column:a,error:l}=e;if(Y()||l&&l.__sentry_own_request__)return;let u=void 0===l&&(0,S.HD)(i)?function(e,t,n,r){let i=(0,S.VW)(e)?e.message:e,s="Error",o=i.match(/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i);o&&(s=o[1],i=o[2]);let a={exception:{values:[{type:s,value:i},]}};return eC(a,t,n,r)}(i,s,o,a):eC(z(n,l||i,void 0,r,!1),s,o,a);u.level="error",eA(t,l,u,"onerror")})}function ek(){(0,_.o)("unhandledrejection",e=>{var t;let[n,r,i]=eO();if(!n.getIntegration(eT))return;let s=e;try{"reason"in e?s=e.reason:"detail"in e&&"reason"in e.detail&&(s=e.detail.reason)}catch(o){}if(Y()||s&&s.__sentry_own_request__)return!0;let a=(0,S.pt)(s)?(t=s,{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`},]}}):z(r,s,void 0,i,!0);a.level="error",eA(n,s,a,"onunhandledrejection")})}function eC(e,t,n,r){let i=e.exception=e.exception||{},s=i.values=i.values||[],o=s[0]=s[0]||{},a=o.stacktrace=o.stacktrace||{},l=a.frames=a.frames||[],u=isNaN(parseInt(r,10))?void 0:r,c=isNaN(parseInt(n,10))?void 0:n,h=(0,S.HD)(t)&&t.length>0?t:(0,X.l4)();return 0===l.length&&l.push({colno:u,filename:h,function:"?",in_app:!0,lineno:c}),e}function eR(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log(`Global Handler attached: ${e}`)}function eA(e,t,n,r){(0,o.EG)(n,{handled:!1,type:r}),e.captureEvent(n,{originalException:t})}function eO(){let e=(0,p.Gd)(),t=e.getClient(),n=t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[e,n.stackParser,n.attachStacktrace]}eT.__initStatic();class eD{static __initStatic(){this.id="LinkedErrors"}__init(){this.name=eD.id}constructor(e={}){eD.prototype.__init.call(this),this._key=e.key||"cause",this._limit=e.limit||5}setupOnce(){let e=(0,p.Gd)().getClient();e&&(0,m.c)((t,n)=>{let r=(0,p.Gd)().getIntegration(eD);return r?function(e,t,n,r,i){if(!r.exception||!r.exception.values||!i||!(0,S.V9)(i.originalException,Error))return r;let s=function e(t,n,r,i,s=[]){if(!(0,S.V9)(r[i],Error)||s.length+1>=n)return s;let o=B(t,r[i]);return e(t,n,r[i],i,[o,...s])}(e,n,i.originalException,t);return r.exception.values=[...s,...r.exception.values],r}(e.getOptions().stackParser,r._key,r._limit,t,n):t})}}eD.__initStatic();class eN{constructor(){eN.prototype.__init.call(this)}static __initStatic(){this.id="Dedupe"}__init(){this.name=eN.id}setupOnce(e,t){let n=e=>{let n=t().getIntegration(eN);if(n){try{var r,i;if(r=e,i=n._previousEvent,i&&(function(e,t){let n=e.message,r=t.message;return!!((n||r)&&(!n||r)&&(n||!r)&&n===r&&eF(e,t)&&eP(e,t))}(r,i)||function(e,t){let n=eM(t),r=eM(e);return!!(n&&r&&n.type===r.type&&n.value===r.value&&eF(e,t)&&eP(e,t))}(r,i)))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(o){}return n._previousEvent=e}return e};n.id=this.name,e(n)}}function eP(e,t){let n=eL(e),r=eL(t);if(!n&&!r)return!0;
4400if(n&&!r||!n&&r||r.length!==n.length)return!1;for(let i=0;i<r.length;i++){let s=r[i],o=n[i];if(s.filename!==o.filename||s.lineno!==o.lineno||s.colno!==o.colno||s.function!==o.function)return!1}return!0}function eF(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch(i){return!1}}function eM(e){return e.exception&&e.exception.values&&e.exception.values[0]}function eL(e){let t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch(n){}}eN.__initStatic();class ej{constructor(){ej.prototype.__init.call(this)}static __initStatic(){this.id="HttpContext"}__init(){this.name=ej.id}setupOnce(){(0,m.c)(e=>{if((0,p.Gd)().getIntegration(ej)){if(!H.navigator&&!H.location&&!H.document)return e;let t=e.request&&e.request.url||H.location&&H.location.href,{referrer:n}=H.document||{},{userAgent:r}=H.navigator||{},i={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},s={...t&&{url:t},headers:i};return{...e,request:s}}return e})}}function eU(e,t,n=function(e){let t=[];function n(e){return t.splice(t.indexOf(e),1)[0]}return{$:t,add:function(r){if(!(void 0===e||t.length<e))return(0,T.$2)(new b("Not adding Promise because buffer limit was reached."));let i=r();return -1===t.indexOf(i)&&t.push(i),i.then(()=>n(i)).then(null,()=>n(i).then(null,()=>{})),i},drain:function(e){return new T.cW((n,r)=>{let i=t.length;if(!i)return n(!0);let s=setTimeout(()=>{e&&e>0&&n(!1)},e);t.forEach(e=>{(0,T.WD)(e).then(()=>{--i||(clearTimeout(s),n(!0))},r)})})}}}(e.bufferSize||30)){let r={},i=e=>n.drain(e);return{send:function(i){let o=[];if(R(i,(t,n)=>{var i;let s=N[n];(function(e,t,n=Date.now()){var r,i;return(e[t]||e.all||0)>n})(r,s)?e.recordDroppedEvent("ratelimit_backoff",s):o.push(t)}),0===o.length)return(0,T.WD)();let a=k(i[0],o),l=t=>{R(a,(n,r)=>{var i;e.recordDroppedEvent(t,N[r])})},u=()=>t({body:O(a,e.textEncoder)}).then(e=>{void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=function(e,{statusCode:t,headers:n},r=Date.now()){let i={...e},s=n&&n["x-sentry-rate-limits"],o=n&&n["retry-after"];if(s)for(let a of s.trim().split(",")){let[l,u]=a.split(":",2),c=parseInt(l,10),h=(isNaN(c)?60:c)*1e3;if(u)for(let d of u.split(";"))i[d]=r+h;else i.all=r+h}else o?i.all=r+function(e,t=Date.now()){let n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;let r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(o,r):429===t&&(i.all=r+6e4);return i}(r,e)},e=>{("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.error("Failed while sending event:",e),l("network_error")});return n.add(u).then(e=>e,e=>{if(e instanceof b)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.error("Skipped sending event because buffer is full."),l("queue_overflow"),(0,T.WD)();throw e})},flush:i}}ej.__initStatic();let eB;function eZ(e,t=function(){if(eB)return eB;if((0,v.Du)(H.fetch))return eB=H.fetch.bind(H);let e=H.document,t=H.fetch;if(e&&"function"==typeof e.createElement)try{let n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);let r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(i){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",i)}return eB=t.bind(H)}()){return eU(e,function(n){let r={body:n.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n.body.length<=65536,...e.fetchOptions};try{return t(e.url,r).then(e=>({statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}}))}catch(i){return eB=void 0,(0,T.$2)(i)}})}function e$(e){return eU(e,function(t){return new T.cW((n,r)=>{let i=new XMLHttpRequest;for(let s in i.onerror=r,i.onreadystatechange=()=>{4===i.readyState&&n({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")}})},i.open("POST",e.url),e.headers)Object.prototype.hasOwnProperty.call(e.headers,s)&&i.setRequestHeader(s,e.headers[s]);i.send(t.body)})})}let eV=[new u,new f,new eb,new en,new eT,new eD,new eN,new ej,];function ez(e){e.startSession({ignoreDuration:!0}),e.captureSession()}var eq=n(2758);let eG=RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function eW(e){let t=e.match(eG);if(!e||!t)return;let n;return"1"===t[3]?n=!0:"0"===t[3]&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}let eH="baggage",eK="sentry-",eY=/^sentry-/;function eQ(e){if(!(0,S.HD)(e)&&!Array.isArray(e))return;let t={};if(Array.isArray(e))t=e.reduce((e,t)=>
4400{let n=eJ(t);return{...e,...n}},{});else{if(!e)return;t=eJ(e)}let n=Object.entries(t).reduce((e,[t,n])=>{if(t.match(eY)){let r=t.slice(eK.length);e[r]=n}return e},{});return Object.keys(n).length>0?n:void 0}function eX(e){let t=Object.entries(e).reduce((e,[t,n])=>(n&&(e[`${eK}${t}`]=n),e),{});return function(e){if(0!==Object.keys(e).length)return Object.entries(e).reduce((e,[t,n],r)=>{let i=`${encodeURIComponent(t)}=${encodeURIComponent(n)}`,o=0===r?i:`${e},${i}`;return o.length>8192?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.warn(`Not adding key: ${t} with val: ${n} to baggage header due to exceeding baggage size limits.`),e):o},"")}(t)}function eJ(e){return e.split(",").map(e=>e.split("=").map(e=>decodeURIComponent(e.trim()))).reduce((e,[t,n])=>(e[t]=n,e),{})}var e0=n(6458),e1=n(3233);let e2=W.n2;var e4=n(5375);let e5=(e,t,n)=>{let r,i;return s=>{t.value>=0&&(s||n)&&((i=t.value-(r||0))||void 0===r)&&(r=t.value,t.delta=i,e(t))}},e3=()=>`v3-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,e6=()=>{let e=e2.performance.timing,t=e2.performance.navigation.type,n={entryType:"navigation",startTime:0,type:2==t?"back_forward":1===t?"reload":"navigate"};for(let r in e)"navigationStart"!==r&&"toJSON"!==r&&(n[r]=Math.max(e[r]-e.navigationStart,0));return n},e8=()=>e2.__WEB_VITALS_POLYFILL__?e2.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||e6()):e2.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],e7=()=>{let e=e8();return e&&e.activationStart||0},e9=(e,t)=>{let n=e8(),r="navigate";return n&&(r=e2.document.prerendering||e7()>0?"prerender":n.type.replace(/_/g,"-")),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:e3(),navigationType:r}},te=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let r=new PerformanceObserver(e=>{t(e.getEntries())});return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(i){}},tt=(e,t)=>{let n=r=>{("pagehide"===r.type||"hidden"===e2.document.visibilityState)&&(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},tn=(e,t={})=>{let n=e9("CLS",0),r,i=0,s=[],o=e=>{e.forEach(e=>{if(!e.hadRecentInput){let t=s[0],o=s[s.length-1];i&&0!==s.length&&e.startTime-o.startTime<1e3&&e.startTime-t.startTime<5e3?(i+=e.value,s.push(e)):(i=e.value,s=[e]),i>n.value&&(n.value=i,n.entries=s,r&&r())}})},a=te("layout-shift",o);a&&(r=e5(e,n,t.reportAllChanges),tt(()=>{o(a.takeRecords()),r(!0)}))},tr=-1,ti=()=>"hidden"!==e2.document.visibilityState||e2.document.prerendering?1/0:0,ts=()=>{tt(({timeStamp:e})=>{tr=e},!0)},to=()=>(tr<0&&(tr=ti(),ts()),{get firstHiddenTime(){return tr}}),ta=(e,t={})=>{let n=to(),r=e9("FID"),i,s=e=>{e.startTime<n.firstHiddenTime&&(r.value=e.processingStart-e.startTime,r.entries.push(e),i(!0))},o=e=>{e.forEach(s)},a=te("first-input",o);i=e5(e,r,t.reportAllChanges),a&&tt(()=>{o(a.takeRecords()),a.disconnect()},!0)},tl={},tu=(e,t={})=>{let n=to(),r=e9("LCP"),i,s=e=>{let t=e[e.length-1];if(t){let s=Math.max(t.startTime-e7(),0);s<n.firstHiddenTime&&(r.value=s,r.entries=[t],i())}},o=te("largest-contentful-paint",s);if(o){i=e5(e,r,t.reportAllChanges);let a=()=>{tl[r.id]||(s(o.takeRecords()),o.disconnect(),tl[r.id]=!0,i(!0))};["keydown","click"].forEach(e=>{addEventListener(e,a,{once:!0,capture:!0})}),tt(a,!0)}};function tc(e){return"number"==typeof e&&isFinite(e)}function th(e,{startTimestamp:t,...n}){return t&&e.startTimestamp>t&&(e.startTimestamp=t),e.startChild({startTimestamp:t,...n})}function td(){return e2&&e2.addEventListener&&e2.performance}let tf=0,tp={},tm,tg;function ty(e,t,n,r,i,s){let o=s?t[s]:t[`${n}End`],a=t[`${n}Start`];a&&o&&th(e,{op:"browser",description:(0,e4.h)(i,()=>n),startTimestamp:r+(0,e1.XL)(a),endTimestamp:r+(0,e1.XL)(o)})}let tv={traceFetch:!0,traceXHR:!0,tracingOrigins:["localhost",/^\//],tracePropagationTargets:["localhost",/^\//]},t_={idleTimeout:e0.nT,finalTimeout:e0.mg,heartbeatInterval:e0.hd,markBackgroun
4400dTransactions:!0,routingInstrumentation:function(e,t=!0,n=!0){if(!e2||!e2.location){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.warn("Could not initialize routing instrumentation due to invalid location");return}let r=e2.location.href,i;t&&(i=e({name:e2.location.pathname,op:"pageload",metadata:{source:"url"}})),n&&(0,_.o)("history",({to:t,from:n})=>{if(void 0===n&&r&&-1!==r.indexOf(t)){r=void 0;return}n!==t&&(r=void 0,i&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log(`[Tracing] Finishing current transaction with op: ${i.op}`),i.finish()),i=e({name:e2.location.pathname,op:"navigation",metadata:{source:"url"}}))})},startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,_experiments:{enableLongTask:!0},...tv};class tb{__init(){this.name="BrowserTracing"}constructor(e){tb.prototype.__init.call(this),this.options={...t_,...e};let{_metricOptions:t}=this.options;!function(e=!1){var t;let n=td();n&&P.Z1&&(n.mark&&e2.performance.mark("sentry-tracing-init"),tn(e=>{let t=e.entries.pop();t&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log("[Measurements] Adding CLS"),tp.cls={value:e.value,unit:""},tg=t)}),t=e,tu(e=>{let t=e.entries.pop();t&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log("[Measurements] Adding LCP"),tp.lcp={value:e.value,unit:"millisecond"},tm=t)},{reportAllChanges:t}),ta(e=>{let t=e.entries.pop();if(!t)return;let n=(0,e1.XL)(P.Z1),r=(0,e1.XL)(t.startTime);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log("[Measurements] Adding FID"),tp.fid={value:e.value,unit:"millisecond"},tp["mark.fid"]={value:n+r,unit:"second"}}))}(t&&t._reportAllChanges),function(e){let t,n=e[0],r=1;for(;r<e.length;){let i=e[r],s=e[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(t=n,n=s(n)):("call"===i||"optionalCall"===i)&&(n=s((...e)=>n.call(t,...e)),t=void 0)}return n}([this,"access",e=>e.options,"access",e=>e._experiments,"optionalAccess",e=>e.enableLongTask])&&function(){let e=e=>{for(let t of e){let n=(0,e1.x1)();if(!n)return;let r=(0,e1.XL)(P.Z1+t.startTime),i=(0,e1.XL)(t.duration);n.startChild({description:"Main UI thread blocked",op:"ui.long-task",startTimestamp:r,endTimestamp:r+i})}};te("longtask",e)}()}setupOnce(e,t){this._getCurrentHub=t;let{routingInstrumentation:n,startTransactionOnLocationChange:r,startTransactionOnPageLoad:i,markBackgroundTransactions:o,traceFetch:l,traceXHR:u,tracingOrigins:c,shouldCreateSpanForRequest:h}=this.options;n(e=>this._createRouteTransaction(e),i,r),o&&(e2&&e2.document?e2.document.addEventListener("visibilitychange",()=>{let e=(0,e1.x1)();if(e2.document.hidden&&e){let t="cancelled";("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log(`[Tracing] Transaction: ${t} -> since tab moved to the background, op: ${e.op}`),e.status||e.setStatus(t),e.setTag("visibilitychange","document.hidden"),e.finish()}}):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.warn("[Tracing] Could not set up background tab detection due to lack of global document")),function(e){let{traceFetch:t,traceXHR:n,tracingOrigins:r,tracePropagationTargets:i,shouldCreateSpanForRequest:s}={...tv,...e},o="function"==typeof s?s:e=>!0,l=e=>(0,a.U0)(e,r)||(0,a.U0)(e,i),u={};t&&(0,_.o)("fetch",e=>{(function(e,t,n,r){if(!(0,e1.zu)()||!(e.fetchData&&t(e.fetchData.url)))return;if(e.endTimestamp){let i=e.fetchData.__span;if(!i)return;let s=r[i];s&&(e.response?s.setHttpStatus(e.response.status):e.error&&s.setStatus("internal_error"),s.finish(),delete r[i]);return}let o=(0,e1.x1)();if(o){let a=o.startChild({data:{...e.fetchData,type:"fetch"},description:`${e.fetchData.method} ${e.fetchData.url}`,op:"http.client"});e.fetchData.__span=a.spanId,r[a.spanId]=a;let l=e.args[0];e.args[1]=e.args[1]||{};let u=e.args[1];n(e.fetchData.url)&&(u.headers=function(e,t,n,r){let i=eX(t),s=n.toTraceparent(),o="undefined"!=typeof Request&&(0,S.V9)(e,Request)?e.headers:r.headers;if(!o)return{"sentry-trace":s,baggage:i};if("undefined"!=typeof Headers&&(0,S.V9)(o,Headers)){let a=new Headers(o);return a.append("sentry-trace",s),i&&a.append(eH,i),a}if(Array.isArray(o)){let l=[...o,["sentry-trace",s]];return i&&l.push([eH,i]),l}{let u="baggage"in o?o.baggage:void 0,c=[];return Array.isArray(u)?c.push(...u):u&&c.push(u),i&&c.push(i),{...o,"sentry-trace":s,baggage:c.length>0?c.join(","):void 0}}}(l,o.getDynamicSamplingContext(),a,u),o.metadata.propagations+=1)}})(e,o,l,u)}),n&&(0,_.o)("xhr",e=>{(function(e,t,n,r){if(!(0,e1.zu)()||e.xhr&&e.xhr.__sentry_own_request__||!(e.xhr&&e.xhr.__sentry_xhr__&&t(e.xhr.__sentry_xhr__.url)))return;let i=e.xhr.__sentry_xhr__;if(e.endTimestamp){let s=e.xhr.__sentry_xhr_span_id__;if(!s)return;let o=r[s];o&&(o.setHttpStatus(i.status_code),o.finish(),delete r[s]);return}let a=(0,e1.x1)();if(a){let l=a.startChild({data:{...i.data,type:"xhr",method:i.method,url:i.url},description:`${i.method} ${i.url}`,op:"http.client"});if(e.xhr.__sentry_xhr_span_id__=l.spanId,r[e.xhr.__sentry_xhr_span_id__]=l,e.xhr.setRequestHeader&&n(e.xhr.__sentry_xhr__.url))try{e.xhr.setRequestHeader("sentry-trace",l.toTraceparent());let u=a.getDynamicSamplingContext(),c=eX(u);c&&e.xhr.setRequestHeader(eH,c),a.metadata.propagations+=1}catch(h){}}})(e,o,l,u)})}({traceFetch:l,traceXHR:u,tracingOrigins:c,shouldCreateSpanForRequest:h})}_createRouteTransaction(e){if(!this._getCurrentHub){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.warn(`[Tracing] Did not create ${e.op}
4400 transaction because _getCurrentHub is invalid.`);return}let{beforeNavigate:t,idleTimeout:n,finalTimeout:r,heartbeatInterval:i}=this.options,o="pageload"===e.op,a=o?tw("sentry-trace"):null,l=o?tw("baggage"):null,u=a?eW(a):void 0,c=l?eQ(l):void 0,h={...e,...u,metadata:{...e.metadata,dynamicSamplingContext:u&&!c?{}:c},trimEnd:!0},d="function"==typeof t?t(h):h,f=void 0===d?{...h,sampled:!1}:d;f.metadata=f.name!==h.name?{...f.metadata,source:"custom"}:f.metadata,!1===f.sampled&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log(`[Tracing] Will not send ${f.op} transaction because of beforeNavigate.`),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log(`[Tracing] Starting ${f.op} transaction on scope`);let p=this._getCurrentHub(),{location:m}=e2,g=(0,eq.lb)(p,f,n,r,!0,{location:m},i);return g.registerBeforeFinishCallback(e=>{(function(e){let t=td();if(!t||!e2.performance.getEntries||!P.Z1)return;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log("[Tracing] Adding & adjusting spans using Performance API");let n=(0,e1.XL)(P.Z1),r=t.getEntries(),i,o;if(r.slice(tf).forEach(t=>{let r=(0,e1.XL)(t.startTime),a=(0,e1.XL)(t.duration);if("navigation"!==e.op||!(n+r<e.startTimestamp))switch(t.entryType){case"navigation":var l,u,c,h,d,f;l=e,u=t,c=n,["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(e=>{ty(l,u,e,c)}),ty(l,u,"secureConnection",c,"TLS/SSL","connectEnd"),ty(l,u,"fetch",c,"cache","domainLookupStart"),ty(l,u,"domainLookup",c,"DNS"),h=l,d=u,th(h,{op:"browser",description:"request",startTimestamp:(f=c)+(0,e1.XL)(d.requestStart),endTimestamp:f+(0,e1.XL)(d.responseEnd)}),th(h,{op:"browser",description:"response",startTimestamp:f+(0,e1.XL)(d.responseStart),endTimestamp:f+(0,e1.XL)(d.responseEnd)}),i=n+(0,e1.XL)(t.responseStart),o=n+(0,e1.XL)(t.requestStart);break;case"mark":case"paint":case"measure":{(function(e,t,n,r,i){let s=i+n;th(e,{description:t.name,endTimestamp:s+r,op:t.entryType,startTimestamp:s})})(e,t,r,a,n);let p=to(),m=t.startTime<p.firstHiddenTime;"first-paint"===t.name&&m&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log("[Measurements] Adding FP"),tp.fp={value:t.startTime,unit:"millisecond"}),"first-contentful-paint"===t.name&&m&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log("[Measurements] Adding FCP"),tp.fcp={value:t.startTime,unit:"millisecond"});break}case"resource":{let g=t.name.replace(e2.location.origin,"");(function(e,t,n,r,i,s){if("xmlhttprequest"===t.initiatorType||"fetch"===t.initiatorType)return;let o={};"transferSize"in t&&(o["Transfer Size"]=t.transferSize),"encodedBodySize"in t&&(o["Encoded Body Size"]=t.encodedBodySize),"decodedBodySize"in t&&(o["Decoded Body Size"]=t.decodedBodySize);let a=s+r;th(e,{description:n,endTimestamp:a+i,op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",startTimestamp:a,data:o})})(e,t,g,r,a,n)}}}),tf=Math.max(r.length-1,0),function(e){let t=e2.navigator;if(!t)return;let n=t.connection;n&&(n.effectiveType&&e.setTag("effectiveConnectionType",n.effectiveType),n.type&&e.setTag("connectionType",n.type),tc(n.rtt)&&(tp["connection.rtt"]={value:n.rtt,unit:"millisecond"})),tc(t.deviceMemory)&&e.setTag("deviceMemory",`${t.deviceMemory} GB`),tc(t.hardwareConcurrency)&&e.setTag("hardwareConcurrency",String(t.hardwareConcurrency))}(e),"pageload"===e.op){var a;"number"==typeof i&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log("[Measurements] Adding TTFB"),tp.ttfb={value:(i-e.startTimestamp)*1e3,unit:"millisecond"},"number"==typeof o&&o<=i&&(tp["ttfb.requestTime"]={value:(i-o)*1e3,unit:"millisecond"})),["fcp","fp","lcp"].forEach(t=>{if(!tp[t]||n>=e.startTimestamp)return;let r=tp[t].value,i=n+(0,e1.XL)(r),o=Math.abs((i-e.startTimestamp)*1e3);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log(`[Measurements] Normalized ${t} from ${r} to ${o} (${o-r})`),tp[t].value=o});let l=tp["mark.fid"];l&&tp.fid&&(th(e,{description:"first input delay",endTimestamp:l.value+(0,e1.XL)(tp.fid.value),op:"ui.action",startTimestamp:l.value}),delete tp["mark.fid"]),"fcp"in tp||delete tp.cls,Object.keys(tp).forEac
4400h(t=>{e.setMeasurement(t,tp[t].value,tp[t].unit)}),a=e,tm&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log("[Measurements] Adding LCP Data"),tm.element&&a.setTag("lcp.element",(0,X.Rt)(tm.element)),tm.id&&a.setTag("lcp.id",tm.id),tm.url&&a.setTag("lcp.url",tm.url.trim().slice(0,200)),a.setTag("lcp.size",tm.size)),tg&&tg.sources&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log("[Measurements] Adding CLS Data"),tg.sources.forEach((e,t)=>a.setTag(`cls.source.${t+1}`,(0,X.Rt)(e.node))))}tm=void 0,tg=void 0,tp={}})(e),e.setTag("sentry_reportAllChanges",Boolean(this.options._metricOptions&&this.options._metricOptions._reportAllChanges))}),g}}function tw(e){let t=(0,X.qT)(`meta[name=${e}]`);return t?t.getAttribute("content"):null}("undefined"==typeof __SENTRY_TRACING__||__SENTRY_TRACING__)&&(0,eq.ro)();var tE=n(1163),tx=n.n(tE);let tS={"routing.instrumentation":"next-router"},tT,tI,tk=(0,p.Gd)().getClient();function tC(e,t=!0,n=!0){let{route:r,traceParentData:i,baggage:o,params:a}=function(){let e,t=H.document.getElementById("__NEXT_DATA__");if(t&&t.innerHTML)try{e=JSON.parse(t.innerHTML)}catch(n){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.warn("Could not extract __NEXT_DATA__")}if(!e)return{};let r={},{page:i,query:o,props:a}=e;return r.route=i,r.params=o,a&&a.pageProps&&(a.pageProps._sentryBaggage&&(r.baggage=a.pageProps._sentryBaggage),a.pageProps._sentryTraceData&&(r.traceParentData=eW(a.pageProps._sentryTraceData))),r}();if(tI=r||H.location.pathname,t){let l=eQ(o);tT=e({name:tI,op:"pageload",tags:tS,...a&&tk&&tk.getOptions().sendDefaultPii&&{data:a},...i,metadata:{source:r?"route":"url",dynamicSamplingContext:i&&!l?{}:l}})}n&&tx().events.on("routeChangeStart",t=>{var n;let r=function(e){let t=(H.__BUILD_MANIFEST||{}).sortedPages;if(t)return t.find(t=>{let n=function(e){let t=e.split("/"),n="";t[t.length-1].match(/^\[\[\.\.\..+\]\]$/)&&(t.pop(),n="(?:/(.+?))?");let r=t.map(e=>e.replace(/^\[\.\.\..+\]$/,"(.+?)").replace(/^\[.*\]$/,"([^/]+?)")).join("/");return RegExp(`^${r}${n}(?:/)?$`)}(t);return e.match(n)})}(t.split(/[\?#]/,1)[0]),i,s;r?(i=r,s="route"):(i=t,s="url");let o={...tS,from:tI};tI=i,tT&&tT.finish();let a=e({name:i,op:"navigation",tags:o,metadata:{source:s}});if(a){let l=a.startChild({op:"ui.nextjs.route-change",description:"Next.js Route Change"}),u=()=>{l.finish(),tx().events.off("routeChangeComplete",u)};tx().events.on("routeChangeComplete",u)}})}function tR(e,t,n){let r=t.match(/([a-z_]+)\.(.*)/i);if(null===r)e[t]=n;else{let i=e[r[1]];tR(i,r[2],n)}}function tA(e,t,n){let r=t.find(t=>t.name===e.name);if(r){for(let[i,s]of Object.entries(n))tR(r,i,s);return t}return[...t,e]}var tO,tD,tN,tP=n(3454);let tF;tD=tO={dsn:tP.env.SENTRY_DSN||tP.env.NEXT_PUBLIC_SENTRY_DSN||"https://2ef240f4d8674f5eae2645f37aac3868@o4504175282225152.ingest.sentry.io/4504176909877248",tracesSampleRate:1,beforeSend:function(e){return"localhost"===window.location.hostname?null:e}},tN=["nextjs","react"],tD._metadata=tD._metadata||{},tD._metadata.sdk=tD._metadata.sdk||{name:"sentry.javascript.nextjs",packages:tN.map(e=>({name:`npm:@sentry/${e}`,version:r})),version:r},tO.environment=tO.environment||"production",tF=tO.integrations,("undefined"==typeof __SENTRY_TRACING__||__SENTRY_TRACING__)&&(void 0!==tO.tracesSampleRate||void 0!==tO.tracesSampler)&&(tF=function(e=[]){let t=new tb({tracingOrigins:[...tv.tracingOrigins,/^(api\/)/],routingInstrumentation:tC});return function(e,t,n={}){return Array.isArray(t)?tA(e,t,n):function(e,t,n){let r=r=>{let i=t(r);if(e.allowExclusionByUser){let s=i.find(t=>t.name===e.name);if(!s)return i}return tA(e,i,n)};return r}(e,t,n)}(t,e,{"options.routingInstrumentation":tC})}(tO.integrations)),(i={...tO,integrations:tF})._metadata=i._metadata||{},i._metadata.sdk=i._metadata.sdk||{name:"sentry.javascript.react",packages:[{name:"npm:@sentry/react",version:r},],version:r},function(e={}){void 0===e.defaultIntegrations&&(e.defaultIntegrations=eV),void 0===e.release&&H.SENTRY_RELEASE&&H.SENTRY_RELEASE.id&&(e.release=H.SENTRY_RELEASE.id),void 0===e.autoSessionTracking&&(e.autoSessionTracking=!0),void 0===e.sendClientReports&&(e.sendClientReports=!0);let t={...e,stackParser:(0,y.Sq)(e.stackParser||ey),integrations:function(e){let t=e.defaultIntegrations||[],n=e.integrations;
4400t.forEach(e=>{e.isDefaultInstance=!0});let r;r=Array.isArray(n)?[...t,...n]:"function"==typeof n?(0,o.lE)(n(t)):t;let i=function(e){let t={};return e.forEach(e=>{let{name:n}=e,r=t[n];(!r||r.isDefaultInstance||!e.isDefaultInstance)&&(t[n]=e)}),Object.values(t)}(r),s=i.findIndex(e=>"Debug"===e.name);if(-1!==s){let[a]=i.splice(s,1);i.push(a)}return i}(e),transport:e.transport||((0,v.Ak)()?eZ:e$)};(function(e,t){!0===t.debug&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?s.kg.enable():console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle."));let n=(0,p.Gd)(),r=n.getScope();r&&r.update(t.initialScope);let i=new e(t);n.bindClient(i)})(ea,t),e.autoSessionTracking&&function(){if(void 0===H.document){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}let e=(0,p.Gd)();e.captureSession&&(ez(e),(0,_.o)("history",({from:e,to:t})=>{void 0===e||e===t||ez((0,p.Gd)())}))}()}(i),(0,G.e)(e=>{e.setTag("runtime","browser");let t=e=>"transaction"===e.type&&"/404"===e.transaction?null:e;t.id="NextClient404Filter",e.addEventProcessor(t)})},5177:function(e,t,n){"use strict";var r=n(5893),i=n(8377),s=n(754);t.Z=function(){return(0,r.jsx)(i.Z,{sx:{width:"100vw",height:"100vh",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1e3},children:(0,r.jsx)(s.Z,{})})}},1876:function(e){!function(){var t={675:function(e,t){"use strict";t.byteLength=function(e){var t=l(e),n=t[0],r=t[1];return(n+r)*3/4-r},t.toByteArray=function(e){var t,n,s,o,a=l(e),u=a[0],c=a[1],h=new i((u+c)*3/4-c),d=0,f=c>0?u-4:u;for(n=0;n<f;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],h[d++]=t>>16&255,h[d++]=t>>8&255,h[d++]=255&t;return 2===c&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,h[d++]=255&t),1===c&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,h[d++]=t>>8&255,h[d++]=255&t),h},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,s=[],o=0,a=r-i;o<a;o+=16383)s.push(c(e,o,o+16383>a?a:o+16383));return 1===i?s.push(n[(t=e[r-1])>>2]+n[t<<4&63]+"=="):2===i&&s.push(n[(t=(e[r-2]<<8)+e[r-1])>>10]+n[t>>4&63]+n[t<<2&63]+"="),s.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,a=s.length;o<a;++o)n[o]=s[o],r[s.charCodeAt(o)]=o;function l(e){var t=e.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");-1===n&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function u(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function c(e,t,n){for(var r,i=[],s=t;s<n;s+=3)i.push(u(r=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2])));return i.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},72:function(e,t,n){"use strict";/*! 4401 * The buffer module from node.js, for the browser. 4402 * 4403 * @author Feross Aboukhadijeh <https://feross.org> 4404 * @license MIT 4405 */ var r=n(675),i=n(783),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function o(e){if(e>2147483647)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,a.prototype),t}function a(e,t,n){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return c(e)}return l(e,t,n)}function l(e,t,n){if("string"==typeof e)return function(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!a.isEncoding(t))throw TypeError("Unknown encoding: "+t);var n=0|f(e,t),r=o(n),i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}(e,t);if(ArrayBuffer.isView(e))return h(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(j(e,ArrayBuffer)||e&&j(e.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(j(e,SharedArrayBuffer)||e&&j(e.buffer,SharedArrayBuffer)))return function e(t,n,r){var i;if(n<0||t.byteLength<n)throw RangeError('"offset" is outside of buffer bounds');if(t.byteLength<n+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(i=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r),a.prototype),i}
4405(e,t,n);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');var r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return a.from(r,t,n);var i=function(e){if(a.isBuffer(e)){var t,n=0|d(e.length),r=o(n);return 0===r.length||e.copy(r,0,0,n),r}if(void 0!==e.length){return"number"!=typeof e.length||(t=e.length,t!=t)?o(0):h(e)}if("Buffer"===e.type&&Array.isArray(e.data))return h(e.data)}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return a.from(e[Symbol.toPrimitive]("string"),t,n);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return u(e),o(e<0?0:0|d(e))}function h(e){for(var t=e.length<0?0:0|d(e.length),n=o(t),r=0;r<t;r+=1)n[r]=255&e[r];return n}t.Buffer=a,t.SlowBuffer=function(e){return+e!=e&&(e=0),a.alloc(+e)},t.INSPECT_MAX_BYTES=50,t.kMaxLength=2147483647,a.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(n){return!1}}(),a.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(e,t,n){return l(e,t,n)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(e,t,n){var r,i,s;return(u(e),e<=0)?o(e):void 0!==t?"string"==typeof n?o(e).fill(t,n):o(e).fill(t):o(e)},a.allocUnsafe=function(e){return c(e)},a.allocUnsafeSlow=function(e){return c(e)};function d(e){if(e>=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647..toString(16)+" bytes");return 0|e}function f(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||j(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return M(e).length;default:if(i)return r?-1:F(e).length;t=(""+t).toLowerCase(),i=!0}}function p(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===n||n>this.length)&&(n=this.length),n<=0||(n>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return k(this,t,n);case"utf8":case"utf-8":return S(this,t,n);case"ascii":return T(this,t,n);case"latin1":case"binary":return I(this,t,n);case"base64":return x(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,n);default:if(r)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function m(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function g(e,t,n,r,i){var s;if(0===e.length)return -1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),s=n=+n,s!=s&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return -1;n=e.length-1}else if(n<0){if(!i)return -1;n=0}if("string"==typeof t&&(t=a.from(t,r)),a.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,i);if("number"==typeof t)return(t&=255,"function"==typeof Uint8Array.prototype.indexOf)?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,i);throw TypeError("val must be string, number or Buffer")}function y(e,t,n,r,i){var s,o=1,a=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return -1;
4405o=2,a/=2,l/=2,n/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var c=-1;for(s=n;s<a;s++)if(u(e,s)===u(t,-1===c?0:s-c)){if(-1===c&&(c=s),s-c+1===l)return c*o}else -1!==c&&(s-=s-c),c=-1}else for(n+l>a&&(n=a-l),s=n;s>=0;s--){for(var h=!0,d=0;d<l;d++)if(u(e,s+d)!==u(t,d)){h=!1;break}if(h)return s}return -1}function v(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var s=t.length;r>s/2&&(r=s/2);for(var o=0;o<r;++o){var a,l=parseInt(t.substr(2*o,2),16);if(a=l,a!=a)break;e[n+o]=l}return o}function _(e,t,n,r){return L(F(t,e.length-n),e,n,r)}function b(e,t,n,r){return L(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function w(e,t,n,r){return L(M(t),e,n,r)}function E(e,t,n,r){return L(function(e,t){for(var n,r,i,s=[],o=0;o<e.length&&!((t-=2)<0);++o)r=(n=e.charCodeAt(o))>>8,i=n%256,s.push(i),s.push(r);return s}(t,e.length-n),e,n,r)}function x(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function S(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var s,o,a,l,u=e[i],c=null,h=u>239?4:u>223?3:u>191?2:1;if(i+h<=n)switch(h){case 1:u<128&&(c=u);break;case 2:(192&(s=e[i+1]))==128&&(l=(31&u)<<6|63&s)>127&&(c=l);break;case 3:s=e[i+1],o=e[i+2],(192&s)==128&&(192&o)==128&&(l=(15&u)<<12|(63&s)<<6|63&o)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:s=e[i+1],o=e[i+2],a=e[i+3],(192&s)==128&&(192&o)==128&&(192&a)==128&&(l=(15&u)<<18|(63&s)<<12|(63&o)<<6|63&a)>65535&&l<1114112&&(c=l)}null===c?(c=65533,h=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=h}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}function T(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function I(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function k(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",s=t;s<n;++s)i+=U[e[s]];return i}function C(e,t,n){for(var r=e.slice(t,n),i="",s=0;s<r.length;s+=2)i+=String.fromCharCode(r[s]+256*r[s+1]);return i}function R(e,t,n){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>n)throw RangeError("Trying to access beyond buffer length")}function A(e,t,n,r,i,s){if(!a.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<s)throw RangeError('"value" argument is out of bounds');if(n+r>e.length)throw RangeError("Index out of range")}function O(e,t,n,r,i,s){if(n+r>e.length||n<0)throw RangeError("Index out of range")}function D(e,t,n,r,s){return t=+t,n>>>=0,s||O(e,t,n,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,n,r,23,4),n+4}function N(e,t,n,r,s){return t=+t,n>>>=0,s||O(e,t,n,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,n,r,52,8),n+8}a.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==a.prototype},a.compare=function(e,t){if(j(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),j(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(e)||!a.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var n=e.length,r=t.length,i=0,s=Math.min(n,r);i<s;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);if(void 0===t)for(n=0,t=0;n<e.length;++n)t+=e[n].length;var n,r=a.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var s=e[n];if(j(s,Uint8Array)&&(s=a.from(s)),!a.isBuffer(s))throw TypeError('"list" argument must be an Array of Buffers');s.copy(r,i),i+=s.length}return r},a.byteLength=f,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)m(this,t,t+1);return this},a.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},a.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},a.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?S(this,0,e):p.apply(this,arguments)}
vendor: 8,463 bytes, line 4405
4405,a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(e){if(!a.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},s&&(a.prototype[s]=a.prototype.inspect),a.prototype.compare=function(e,t,n,r,i){if(j(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return -1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var s=i-r,o=n-t,l=Math.min(s,o),u=this.slice(r,i),c=e.slice(t,n),h=0;h<l;++h)if(u[h]!==c[h]){s=u[h],o=c[h];break}return s<o?-1:o<s?1:0},a.prototype.includes=function(e,t,n){return -1!==this.indexOf(e,t,n)},a.prototype.indexOf=function(e,t,n){return g(this,e,t,n,!0)},a.prototype.lastIndexOf=function(e,t,n){return g(this,e,t,n,!1)},a.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i,s,o,a,l=this.length-t;if((void 0===n||n>l)&&(n=l),e.length>0&&(n<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var u=!1;;)switch(r){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":return b(this,e,t,n);case"latin1":case"binary":return o=t,b(this,e,o,a=n);case"base64":return w(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,n);default:if(u)throw TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),u=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},a.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);var r=this.subarray(e,t);return Object.setPrototypeOf(r,a.prototype),r},a.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||R(e,t,this.length);for(var r=this[e],i=1,s=0;++s<t&&(i*=256);)r+=this[e+s]*i;return r},a.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||R(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},a.prototype.readUInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||R(e,t,this.length);for(var r=this[e],i=1,s=0;++s<t&&(i*=256);)r+=this[e+s]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},a.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||R(e,t,this.length);for(var r=t,i=1,s=this[e+--r];r>0&&(i*=256);)s+=this[e+--r]*i;return s>=(i*=128)&&(s-=Math.pow(2,8*t)),s},a.prototype.readInt8=function(e,t){return(e>>>=0,t||R(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||R(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(e,t){e>>>=0,t||R(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return e>>>=0,t||R(e,4,this.length),i.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||R(e,4,this.length),i.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||R(e,8,this.length),i.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||R(e,8,this.length),i.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,!r&&A(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,s=0;for(this[t]=255&e;++s<n&&(i*=256);)this[t+s]=e/i&255;return t+n},a.prototype.writeUIntBE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,!r&&A(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+n},a.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||A(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||A(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||A(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||A(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},a.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||A(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);A(this,e,t,n,i-1,-i)}var s=0,o=1,a=0;for(this[t]=255&e;++s<n&&(o*=256);)e<0&&0===a&&0!==this[t+s-1]&&(a=1),this[t+s]=(e/o>>0)-a&255;return t+n},a.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);A(this,e,t,n,i-1,-i)}var s=n-1,o=1,a=0;for(this[t+s]=255&e;--s>=0&&(o*=256);)e<0&&0===a&&0!==this[t+s+1]&&(a=1),this[t+s]=(e/o>>0)-a&255;return t+n},a.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||A(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||A(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||A(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||A(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},a.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||A(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeFloatLE=function(e,t,n){return D(this,e,t,!0,n)},a.prototype.writeFloatBE=function(e,t,n){return D(this,e,t,!1,n)},a.prototype.writeDoubleLE=function(e,t,n){return N(this,e,t,!0,n)},a.prototype.writeDoubleBE=function(e,t,n){return N(this,e,t,!1,n)},a.prototype.copy=function(e,t,n,r){if(!a.isBuffer(e))throw TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw RangeError("Index out of range");if(r<0)throw RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i=r-n;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,n,r);else if(this===e&&n<t&&t<r)for(var s=i-1;s>=0;--s)e[s+t]=this[s+n];else Uint8Array.prototype.set.call(e,this.subarray(n,r),t);return i},a.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw TypeError("encoding must be a string");if("string"==typeof r&&!a.isEncoding(r))throw TypeError("Unknown encoding: "+r);if(1===e.length){var i,s=e.charCodeAt(0);("utf8"===r&&s<128||"latin1"===r)&&(e=s)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw RangeError("Out of range index");if(n<=t)return this;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{var o=a.isBuffer(e)?e:a.from(e,r),l=o.length;
4405if(0===l)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<n-t;++i)this[i+t]=o[i%l]}return this};var P=/[^+/0-9A-Za-z-_]/g;function F(e,t){t=t||1/0;for(var n,r=e.length,i=null,s=[],o=0;o<r;++o){if((n=e.charCodeAt(o))>55295&&n<57344){if(!i){if(n>56319||o+1===r){(t-=3)>-1&&s.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&s.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;s.push(n)}else if(n<2048){if((t-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else if(n<1114112){if((t-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}else throw Error("Invalid code point")}return s}function M(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(P,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function L(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length)&&!(i>=e.length);++i)t[i+n]=e[i];return i}function j(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var U=function(){for(var e="0123456789abcdef",t=Array(256),n=0;n<16;++n)for(var r=16*n,i=0;i<16;++i)t[r+i]=e[n]+e[i];return t}()},783:function(e,t){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ t.read=function(e,t,n,r,i){var s,o,a=8*i-r-1,l=(1<<a)-1,u=l>>1,c=-7,h=n?i-1:0,d=n?-1:1,f=e[t+h];for(h+=d,s=f&(1<<-c)-1,f>>=-c,c+=a;c>0;s=256*s+e[t+h],h+=d,c-=8);for(o=s&(1<<-c)-1,s>>=-c,c+=r;c>0;o=256*o+e[t+h],h+=d,c-=8);if(0===s)s=1-u;else{if(s===l)return o?NaN:(f?-1:1)*(1/0);o+=Math.pow(2,r),s-=u}return(f?-1:1)*o*Math.pow(2,s-r)},t.write=function(e,t,n,r,i,s){var o,a,l,u=8*s-i-1,c=(1<<u)-1,h=c>>1,d=23===i?5960464477539062e-23:0,f=r?0:s-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(isNaN(t=Math.abs(t))||t===1/0?(a=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+h>=1?t+=d/l:t+=d*Math.pow(2,1-h),t*l>=2&&(o++,l/=2),o+h>=c?(a=0,o=c):o+h>=1?(a=(t*l-1)*Math.pow(2,i),o+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;e[n+f]=255&a,f+=p,a/=256,i-=8);for(o=o<<i|a,u+=i;u>0;e[n+f]=255&o,f+=p,o/=256,u-=8);e[n+f-p]|=128*m}}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var s=n[e]={exports:{}},o=!0;try{t[e](s,s.exports,r),o=!1}finally{o&&delete n[e]}return s.exports}r.ab="//";var i=r(72);e.exports=i}()},7663:function(e){!function(){var t={229:function(e){var t,n,r,i=e.exports={};function s(){throw Error("setTimeout has not been defined")}function o(){throw Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===s||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:s}catch(e){t=s}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(r){n=o}}();var l=[],u=!1,c=-1;function h(){u&&r&&(u=!1,r.length?l=r.concat(l):c=-1,l.length&&d())}function d(){if(!u){var e=a(h);u=!0;for(var t=l.length;t;){for(r=l,l=[];++c<t;)r&&r[c].run();c=-1,t=l.length}r=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(r){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function p(){}i.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new f(e,t)),1!==l.length||u||a(d)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=p,i.addListener=p,i.once=p,i.off=p,i.removeListener=p,i.removeAllListeners=p,i.emit=p,i.prependListener=p,i.prependOnceListener=p,i.listeners=function(e){return[]},i.binding=function(e){throw Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw Error("process.chdir is not supported")},i.umask=function(){return 0}}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var s=n[e]={exports:{}},o=!0;try{t[e](s,s.exports,r),o=!1}finally{o&&delete n[e]}return s.exports}r.ab="//";var i=r(229);e.exports=i}()},9008:function(e,t,n){e.exports=n(5443)},1664:function(e,t,n){e.exports=n(8418)},1163:function(e,t,n){e.exports=n(387)},2703:function(e,t,n){"use strict";var r=n(414);function i(){}function s(){}s.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,s,o){if(o!==r){var a=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol
4405:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:s,resetWarningCache:i};return n.PropTypes=n,n}},5697:function(e,t,n){e.exports=n(2703)()},414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5760:function(e){"use strict";function t(e){this._maxSize=e,this.clear()}t.prototype.clear=function(){this._size=0,this._values=Object.create(null)},t.prototype.get=function(e){return this._values[e]},t.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),!(e in this._values)&&this._size++,this._values[e]=t};var n=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,i=/^\d/,s=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,o=/^\s*(['"]?)(.*?)(\1)\s*$/,a=new t(512),l=new t(512),u=new t(512);function c(e){return a.get(e)||a.set(e,h(e).map(function(e){return e.replace(o,"$2")}))}function h(e){return e.match(n)||[""]}function d(e){return"string"==typeof e&&e&&-1!==["'",'"'].indexOf(e.charAt(0))}function f(e){var t,n;return!d(e)&&(e.match(i)&&!e.match(r)||s.test(e))}e.exports={Cache:t,split:h,normalizePath:c,setter:function(e){var t=c(e);return l.get(e)||l.set(e,function(e,n){for(var r=0,i=t.length,s=e;r<i-1;){var o=t[r];if("__proto__"===o||"constructor"===o||"prototype"===o)return e;s=s[t[r++]]}s[t[r]]=n})},getter:function(e,t){var n=c(e);return u.get(e)||u.set(e,function(e){for(var r=0,i=n.length;r<i;){if(null==e&&t)return;e=e[n[r++]]}return e})},join:function(e){return e.reduce(function(e,t){return e+(d(t)||r.test(t)?"["+t+"]":(e?".":"")+t)},"")},forEach:function(e,t,n){!function(e,t,n){var r,i,s,o,a=e.length;for(i=0;i<a;i++)(r=e[i])&&(f(r)&&(r='"'+r+'"'),s=!(o=d(r))&&/^\d+$/.test(r),t.call(n,r,o,s,i,e))}(Array.isArray(e)?e:h(e),t,n)}}},9590:function(e){"use strict";var t=Array.isArray,n=Object.keys,r=Object.prototype.hasOwnProperty,i="undefined"!=typeof Element;e.exports=function(e,s){try{return function e(s,o){if(s===o)return!0;if(s&&o&&"object"==typeof s&&"object"==typeof o){var a,l,u,c=t(s),h=t(o);if(c&&h){if((l=s.length)!=o.length)return!1;for(a=l;0!=a--;)if(!e(s[a],o[a]))return!1;return!0}if(c!=h)return!1;var d=s instanceof Date,f=o instanceof Date;if(d!=f)return!1;if(d&&f)return s.getTime()==o.getTime();var p=s instanceof RegExp,m=o instanceof RegExp;if(p!=m)return!1;if(p&&m)return s.toString()==o.toString();var g=n(s);if((l=g.length)!==n(o).length)return!1;for(a=l;0!=a--;)if(!r.call(o,g[a]))return!1;if(i&&s instanceof Element&&o instanceof Element)return s===o;for(a=l;0!=a--;)if(("_owner"!==(u=g[a])||!s.$$typeof)&&!e(s[u],o[u]))return!1;return!0}return s!=s&&o!=o}(e,s)}catch(o){if(o.message&&o.message.match(/stack|recursion/i)||-2146828260===o.number)return console.warn("Warning: react-fast-compare does not handle circular references.",o.name,o.message),!1;throw o}}},9921:function(e,t){"use strict";/** @license React v16.13.1 4406 * react-is.production.min.js 4407 * 4408 * Copyright (c) Facebook, Inc. and its affiliates. 4409 * 4410 * This source code is licensed under the MIT license found in the 4411 * LICENSE file in the root directory of this source tree. 4412 */ var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,s=n?Symbol.for("react.fragment"):60107,o=n?Symbol.for("react.strict_mode"):60108,a=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,h=n?Symbol.for("react.concurrent_mode"):60111,d=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,p=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,v=n?Symbol.for("react.fundamental"):60117,_=n?Symbol.for("react.responder"):60118,b=n?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case h:case s:case a:case o:case f:return e;default:switch(e=e&&e.$$typeof){case u:case d:case g:case m:case l:return e;default:return t}}case i:return t}}}function E(e){return w(e)===h}t.AsyncMode=c,t.ConcurrentMode=h,t.ContextConsumer=u,t.ContextProvider=l,t.Element=r,t.ForwardRef=d,t.Fragment=s,t.Lazy=g,t.Memo=m,t.Portal=i,t.Profiler=a,t.StrictMode=o,t.Suspense=f,t.isAsyncMode=function(e){return E(e)||w(e)===c},t.isConcurrentMode=E,t.isContextConsumer=function(e){return w(e)===u},t.isContextProvider=function(e){return w(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===d},t.isFragment=function(e){return w(e)===s},t.isLazy=function(e){return w(e)===g},t.isMemo=function(e){return w(e)===m},t.isPortal=function(e){return w(e)===i},t.isProfiler=function(e){return w(e)===a},t.isStrictMode=function(e){return w(e)===o},t.isSuspense=function(e){return w(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===s||e===h||e===a||e===o||e===f||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===l||e.$$typeof===u||e.$$typeof===d||e.$$typeof===v||e.$$typeof===_||e.$$typeof===b||e.$$typeof===y)},t.typeOf=w},9864:function(e,t,n){"use strict";e.exports=n(9921)},8662:function(e,t,n){"use strict";n.d(t,{ZP:function(){return g}});var r=n(3366),i=n(5068),s=n(7294),o=n(3935),a={disabled:!1},l=n(220),u="unmounted",c="exited",h="entering",d="entered",f="exiting",p=function(e){function t(t,n){r=e.call(this,t,n)||this;var r,i,s=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?s?(i=c,r.appearStatus=h):i=d:i=t.unmountOnExit||t.mountOnEnter?u:c,r.state={status:i},r.nextCallback=null,r}(0,i.Z)(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===u?{status:c}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==h&&n!==d&&(t=h):(n===h||n===d)&&(t=f)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,a
4412ppear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t){if(this.cancelNextCallback(),t===h){if(this.props.unmountOnExit||this.props.mountOnEnter){var n,r=this.props.nodeRef?this.props.nodeRef.current:o.findDOMNode(this);r&&(n=r).scrollTop}this.performEnter(e)}else this.performExit()}else this.props.unmountOnExit&&this.state.status===c&&this.setState({status:u})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[o.findDOMNode(this),r],s=i[0],l=i[1],u=this.getTimeouts(),c=r?u.appear:u.enter;if(!e&&!n||a.disabled){this.safeSetState({status:d},function(){t.props.onEntered(s)});return}this.props.onEnter(s,l),this.safeSetState({status:h},function(){t.props.onEntering(s,l),t.onTransitionEnd(c,function(){t.safeSetState({status:d},function(){t.props.onEntered(s,l)})})})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:o.findDOMNode(this);if(!t||a.disabled){this.safeSetState({status:c},function(){e.props.onExited(r)});return}this.props.onExit(r),this.safeSetState({status:f},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:c},function(){e.props.onExited(r)})})})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:o.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(!n||r){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],s=i[0],a=i[1];this.props.addEndListener(s,a)}null!=e&&setTimeout(this.nextCallback,e)},n.render=function(){var e=this.state.status;if(e===u)return null;var t=this.props,n=t.children,i=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,(0,r.Z)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return s.createElement(l.Z.Provider,{value:null},"function"==typeof n?n(e,i):s.cloneElement(s.Children.only(n),i))},t}(s.Component);function m(){}p.contextType=l.Z,p.propTypes={},p.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:m,onEntering:m,onEntered:m,onExit:m,onExiting:m,onExited:m},p.UNMOUNTED=u,p.EXITED=c,p.ENTERING=h,p.ENTERED=d,p.EXITING=f;var g=p},220:function(e,t,n){"use strict";var r=n(7294);t.Z=r.createContext(null)},4633:function(e){function t(e,t){var n=e.length,r=Array(n),i={},s=n,o=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var i=e[n];t.has(i[0])||t.set(i[0],new Set),t.has(i[1])||t.set(i[1],new Set),t.get(i[0]).add(i[1])}return t}(t),a=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}(e);for(t.forEach(function(e){if(!a.has(e[0])||!a.has(e[1]))throw Error("Unknown node. There is an unknown node in the supplied edges.")});s--;)i[s]||l(e[s],s,new Set);return r;function l(e,t,s){if(s.has(e)){var u;try{u=", node was:"+JSON.stringify(e)}catch(c){u=""}throw Error("Cyclic dependency"+u)}if(!a.has(e))throw Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(e));if(!i[t]){i[t]=!0;var h=o.get(e)||new Set;if(t=(h=Array.from(h)).length){s.add(e);do{var d=h[--t];l(d,a.get(d),s)}while(t);s.delete(e)}r[--n]=e}}}e.exports=function(e){return t(function(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var i=e[n];t.add(i[0]),t.add(i[1])}return Array.from(t)}(e),e)},e.exports.array=t},4231:function(e,t,n){"use strict";n.d(t,{O7:function(){return H},Ry:function(){return ex},Z_:function(){return et}});try{b=Map}catch(r){}try{w=Set}catch(i){}function s(e){return function e(t,n,r){if(!t||"object"!=typeof t||"function"==typeof t)return t;if(t.nodeType&&"cloneNode"in t)return t.cloneNode(!0);if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp)return RegExp(t);if(Array.isArray(t))return t.map(s);if(b&&t instanceof b)return new Map(Array.from(t.entries()));
4412if(w&&t instanceof w)return new Set(Array.from(t.values()));if(t instanceof Object){n.push(t);var i=Object.create(t);for(var o in r.push(i),t){var a=n.findIndex(function(e){return e===t[o]});i[o]=a>-1?r[a]:e(t[o],n,r)}return i}return t}(e,[],[])}let o=Object.prototype.toString,a=Error.prototype.toString,l=RegExp.prototype.toString,u="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",c=/^Symbol\((.*)\)(.*)$/;function h(e,t=!1){if(null==e||!0===e||!1===e)return""+e;let n=typeof e;if("number"===n){var r;return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}if("string"===n)return t?`"${e}"`:e;if("function"===n)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===n)return u.call(e).replace(c,"Symbol($1)");let i=o.call(e).slice(8,-1);return"Date"===i?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===i||e instanceof Error?"["+a.call(e)+"]":"RegExp"===i?l.call(e):null}function d(e,t){let n=h(e,t);return null!==n?n:JSON.stringify(e,function(e,n){let r=h(this[e],t);return null!==r?r:n},2)}let f={default:"${path} is invalid",required:"${path} is a required field",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType({path:e,type:t,value:n,originalValue:r}){let i=`${e} must be a \`${t}\` type, but the final value was: \`${d(n,!0)}\``+(null!=r&&r!==n?` (cast from the value \`${d(r,!0)}\`).`:".");return null===n&&(i+='\n If "null" is intended as an empty value be sure to mark the schema as `.nullable()`'),i},defined:"${path} must be defined"},p={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},m={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},g={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},y={isValue:"${path} field must be ${value}"},v={noUnknown:"${path} field has unspecified keys: ${unknown}"},_={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"};Object.assign(Object.create(null),{mixed:f,string:p,number:m,date:g,object:v,array:_,boolean:y});var b,w,E=n(8721),x=n.n(E),S=e=>e&&e.__isYupSchema__,T=class{constructor(e,t){if(this.fn=void 0,this.refs=e,this.refs=e,"function"==typeof t){this.fn=t;return}if(!x()(t,"is"))throw TypeError("`is:` is required for `when()` conditions");if(!t.then&&!t.otherwise)throw TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:r,otherwise:i}=t,s="function"==typeof n?n:(...e)=>e.every(e=>e===n);this.fn=function(...e){let t=e.pop(),n=e.pop(),o=s(...e)?r:i;if(o)return"function"==typeof o?o(n):n.concat(o.resolve(t))}}resolve(e,t){let n=this.refs.map(e=>e.getValue(null==t?void 0:t.value,null==t?void 0:t.parent,null==t?void 0:t.context)),r=this.fn.apply(e,n.concat(e,t));if(void 0===r||r===e)return e;if(!S(r))throw TypeError("conditions must return a schema object");return r.resolve(t)}};function I(e){return null==e?[]:[].concat(e)}function k(){return(k=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}let C=/\$\{\s*(\w+)\s*\}/g;class R extends Error{static formatError(e,t){let n=t.label||t.path||"this";return(n!==t.path&&(t=k({},t,{path:n})),"string"==typeof e)?e.replace(C,(e,n)=>d(t[n])):"function"==typeof e?e(t):e}static isError(e){return e&&"ValidationError"===e.name}constructor(e,t,n,r){super(),this.value=void 0,this.path=void 0,this.type=void 0,this.errors=void 0,this.params=void 0,this.inner=void 0,this.name="ValidationError",this.value=t,this.path=n,this.type=r,this.errors=[],this.inner=[],I(e).forEach(e
4412=>{R.isError(e)?(this.errors.push(...e.errors),this.inner=this.inner.concat(e.inner.length?e.inner:e)):this.errors.push(e)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0],Error.captureStackTrace&&Error.captureStackTrace(this,R)}}let A=e=>{let t=!1;return(...n)=>{t||(t=!0,e(...n))}};function O(e,t){let{endEarly:n,tests:r,args:i,value:s,errors:o,sort:a,path:l}=e,u=A(t),c=r.length,h=[];if(o=o||[],!c)return o.length?u(new R(o,s,l)):u(null,s);for(let d=0;d<r.length;d++){let f=r[d];f(i,function(e){if(e){if(!R.isError(e))return u(e,s);if(n)return e.value=s,u(e,s);h.push(e)}if(--c<=0){if(h.length&&(a&&h.sort(a),o.length&&h.push(...o),o=h),o.length){u(new R(o,s,l),s);return}u(null,s)}})}}var D=n(6604),N=n.n(D),P=n(5760);let F={context:"$",value:"."};class M{constructor(e,t={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,"string"!=typeof e)throw TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),""===e)throw TypeError("ref must be a non-empty string");this.isContext=this.key[0]===F.context,this.isValue=this.key[0]===F.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?F.context:this.isValue?F.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&(0,P.getter)(this.path,!0),this.map=t.map}getValue(e,t,n){let r=this.isContext?n:this.isValue?e:t;return this.getter&&(r=this.getter(r||{})),this.map&&(r=this.map(r)),r}cast(e,t){return this.getValue(e,null==t?void 0:t.parent,null==t?void 0:t.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}function L(){return(L=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function j(e){function t(t,n){let{value:r,path:i="",label:s,options:o,originalValue:a,sync:l}=t,u=function(e,t){if(null==e)return{};var n,r,i={},s=Object.keys(e);for(r=0;r<s.length;r++)t.indexOf(n=s[r])>=0||(i[n]=e[n]);return i}(t,["value","path","label","options","originalValue","sync"]),{name:c,test:h,params:d,message:f}=e,{parent:p,context:m}=o;function g(e){return M.isRef(e)?e.getValue(r,p,m):e}function y(e={}){let t=N()(L({value:r,originalValue:a,label:s,path:e.path||i},d,e.params),g),n=new R(R.formatError(e.message||f,t),r,t.path,e.type||c);return n.params=t,n}let v=L({path:i,parent:p,type:c,createError:y,resolve:g,options:o,originalValue:a},u);if(!l){try{Promise.resolve(h.call(v,r,v)).then(e=>{R.isError(e)?n(e):e?n(null,e):n(y())}).catch(n)}catch(_){n(_)}return}let b;try{var w;if(b=h.call(v,r,v),"function"==typeof(null==(w=b)?void 0:w.then))throw Error(`Validation test of type: "${v.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`)}catch(E){n(E);return}R.isError(b)?n(b):b?n(null,b):n(y())}return t.OPTIONS=e,t}M.prototype.__isYupRef=!0;let U=e=>e.substr(0,e.length-1).substr(1);function B(e,t,n,r=n){let i,s,o;return t?((0,P.forEach)(t,(a,l,u)=>{let c=l?U(a):a;if((e=e.resolve({context:r,parent:i,value:n})).innerType){let h=u?parseInt(c,10):0;if(n&&h>=n.length)throw Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${t}. because there is no value at that index. `);i=n,n=n&&n[h],e=e.innerType}if(!u){if(!e.fields||!e.fields[c])throw Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e._type}")`);i=n,n=n&&n[c],e=e.fields[c]}s=c,o=l?"["+a+"]":"."+a}),{schema:e,parent:i,parentPath:s}):{parent:i,parentPath:t,schema:e}}class Z{constructor(){this.list=void 0,this.refs=void 0,this.list=new Set,this.refs=new Map}get size(){return this.list.size+this.refs.size}describe(){let e=[];for(let t of this.list)e.push(t);for(let[,n]of this.refs)e.push(n.describe());return e}toArray(){return Array.from(this.list).concat(Array.from(this.refs.values()))}resolveAll(e){return this.toArray().reduce((t,n)=>t.concat(M.isRef(n)?e(n):n),[])}add(e){M.isRef(e)?this.refs.set(e.key,e):this.list.add(e)}delete(e){M.isRef(e)?this.refs.delete(e.key):this.list.delete(e)}clone(){let e=new Z;return e.list=new Set(this.list),e.refs=new Map(this.refs),e}merge(e,t){let n=this.clone();
4412return e.list.forEach(e=>n.add(e)),e.refs.forEach(e=>n.add(e)),t.list.forEach(e=>n.delete(e)),t.refs.forEach(e=>n.delete(e)),n}}function $(){return($=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}class V{constructor(e){this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this._typeError=void 0,this._whitelist=new Z,this._blacklist=new Z,this.exclusiveTests=Object.create(null),this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(f.notType)}),this.type=(null==e?void 0:e.type)||"mixed",this.spec=$({strip:!1,strict:!1,abortEarly:!0,recursive:!0,nullable:!1,presence:"optional"},null==e?void 0:e.spec)}get _type(){return this.type}_typeCheck(e){return!0}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;let t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeError=this._typeError,t._whitelistError=this._whitelistError,t._blacklistError=this._blacklistError,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.exclusiveTests=$({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=s($({},this.spec,e)),t}label(e){let t=this.clone();return t.spec.label=e,t}meta(...e){if(0===e.length)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}withMutation(e){let t=this._mutate;this._mutate=!0;let n=e(this);return this._mutate=t,n}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&"mixed"!==this.type)throw TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let t=e.clone(),n=$({},this.spec,t.spec);return t.spec=n,t._typeError||(t._typeError=this._typeError),t._whitelistError||(t._whitelistError=this._whitelistError),t._blacklistError||(t._blacklistError=this._blacklistError),t._whitelist=this._whitelist.merge(e._whitelist,e._blacklist),t._blacklist=this._blacklist.merge(e._blacklist,e._whitelist),t.tests=this.tests,t.exclusiveTests=this.exclusiveTests,t.withMutation(t=>{e.tests.forEach(e=>{t.test(e.OPTIONS)})}),t.transforms=[...this.transforms,...t.transforms],t}isType(e){return!!this.spec.nullable&&null===e||this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let n=t.conditions;(t=t.clone()).conditions=[],t=(t=n.reduce((t,n)=>n.resolve(t,e),t)).resolve(e)}return t}cast(e,t={}){let n=this.resolve($({value:e},t)),r=n._cast(e,t);if(void 0!==e&&!1!==t.assert&&!0!==n.isType(r)){let i=d(e),s=d(r);throw TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${n._type}". 4413 4414attempted value: ${i} 4415`+(s!==i?`result of cast: ${s}`:""))}return r}_cast(e,t){let n=void 0===e?e:this.transforms.reduce((t,n)=>n.call(this,t,e,this),e);return void 0===n&&(n=this.getDefault()),n}_validate(e,t={},n){let{sync:r,path:i,from:s=[],originalValue:o=e,strict:a=this.spec.strict,abortEarly:l=this.spec.abortEarly}=t,u=e;a||(u=this._cast(u,$({assert:!1},t)));let c={value:u,path:i,options:t,originalValue:o,schema:this,label:this.spec.label,sync:r,from:s},h=[];this._typeError&&h.push(this._typeError);let d=[];this._whitelistError&&d.push(this._whitelistError),this._blacklistError&&d.push(this._blacklistError),O({args:c,value:u,path:i,sync:r,tests:h,endEarly:l},e=>{if(e)return void n(e,u);O({tests:this.tests.concat(d),args:c,path:i,sync:r,value:u,endEarly:l},n)})}validate(e,t,n){let r=this.resolve($({},t,{value:e}));return"function"==typeof n?r._validate(e,t,n):new Promise((n,i)=>r._validate(e,t,(e,t)=>{e?i(e):n(t)}))}validateSync(e,t){let n;return this.resolve($({},t,{value:e}))._validate(e,$({},t,{sync:!0}),(e,t)=>{if(e)throw e;n=t}),n}isValid(e,t){return this.validate(e,t).then(()=>!0,e=>{if(R.isError(e))return!1;throw e})}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(n){if(R.isError(n))return!1;throw n}}_getDefault(){let e=this.spec.default;return null==e?e:"function"==typeof e?e.call(this):s(e)}getDefault(e){return this.resolve(e||{})._getDefault()}default(e){return 0===arguments.length?this._getDefault():this.clone({default:e})}strict(e=!0){let t=this.clone();return t.spec.strict=e,t}
4415_isPresent(e){return null!=e}defined(e=f.defined){return this.test({message:e,name:"defined",exclusive:!0,test:e=>void 0!==e})}required(e=f.required){return this.clone({presence:"required"}).withMutation(t=>t.test({message:e,name:"required",exclusive:!0,test(e){return this.schema._isPresent(e)}}))}notRequired(){let e=this.clone({presence:"optional"});return e.tests=e.tests.filter(e=>"required"!==e.OPTIONS.name),e}nullable(e=!0){return this.clone({nullable:!1!==e})}transform(e){let t=this.clone();return t.transforms.push(e),t}test(...e){let t;if(void 0===(t=1===e.length?"function"==typeof e[0]?{test:e[0]}:e[0]:2===e.length?{name:e[0],test:e[1]}:{name:e[0],message:e[1],test:e[2]}).message&&(t.message=f.default),"function"!=typeof t.test)throw TypeError("`test` is a required parameters");let n=this.clone(),r=j(t),i=t.exclusive||t.name&&!0===n.exclusiveTests[t.name];if(t.exclusive&&!t.name)throw TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(n.exclusiveTests[t.name]=!!t.exclusive),n.tests=n.tests.filter(e=>e.OPTIONS.name!==t.name||!i&&e.OPTIONS.test!==r.OPTIONS.test),n.tests.push(r),n}when(e,t){Array.isArray(e)||"string"==typeof e||(t=e,e=".");let n=this.clone(),r=I(e).map(e=>new M(e));return r.forEach(e=>{e.isSibling&&n.deps.push(e.key)}),n.conditions.push(new T(r,t)),n}typeError(e){let t=this.clone();return t._typeError=j({message:e,name:"typeError",test(e){return!!(void 0===e||this.schema.isType(e))||this.createError({params:{type:this.schema._type}})}}),t}oneOf(e,t=f.oneOf){let n=this.clone();return e.forEach(e=>{n._whitelist.add(e),n._blacklist.delete(e)}),n._whitelistError=j({message:t,name:"oneOf",test(e){if(void 0===e)return!0;let t=this.schema._whitelist,n=t.resolveAll(this.resolve);return!!n.includes(e)||this.createError({params:{values:t.toArray().join(", "),resolved:n}})}}),n}notOneOf(e,t=f.notOneOf){let n=this.clone();return e.forEach(e=>{n._blacklist.add(e),n._whitelist.delete(e)}),n._blacklistError=j({message:t,name:"notOneOf",test(e){let t=this.schema._blacklist,n=t.resolveAll(this.resolve);return!n.includes(e)||this.createError({params:{values:t.toArray().join(", "),resolved:n}})}}),n}strip(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(){let e=this.clone(),{label:t,meta:n}=e.spec,r={meta:n,label:t,type:e.type,oneOf:e._whitelist.describe(),notOneOf:e._blacklist.describe(),tests:e.tests.map(e=>({name:e.OPTIONS.name,params:e.OPTIONS.params})).filter((e,t,n)=>n.findIndex(t=>t.name===e.name)===t)};return r}}for(let z of(V.prototype.__isYupSchema__=!0,["validate","validateSync"]))V.prototype[`${z}At`]=function(e,t,n={}){let{parent:r,parentPath:i,schema:s}=B(this,e,t,n.context);return s[z](r&&r[i],$({},n,{parent:r,path:e}))};for(let q of["equals","is"])V.prototype[q]=V.prototype.oneOf;for(let G of["not","nope"])V.prototype[G]=V.prototype.notOneOf;V.prototype.optional=V.prototype.notRequired,V.prototype;var W=e=>null==e;function H(){return new K}class K extends V{constructor(){super({type:"boolean"}),this.withMutation(()=>{this.transform(function(e){if(!this.isType(e)){if(/^(true|1)$/i.test(String(e)))return!0;if(/^(false|0)$/i.test(String(e)))return!1}return e})})}_typeCheck(e){return e instanceof Boolean&&(e=e.valueOf()),"boolean"==typeof e}isTrue(e=y.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"true"},test:e=>W(e)||!0===e})}isFalse(e=y.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"false"},test:e=>W(e)||!1===e})}}H.prototype=K.prototype;let Y=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,Q=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,X=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,J=e=>W(e)||e===e.trim(),ee=({}).toString();function et(){return new en}class en extends V{constructor(){super({type:"string"}),this.withMutation(()=>{this.transform(function(e){if(this.isType(e)||Array.isArray(e))return e;let t=null!=e&&e.toString?e.toString():e;return t===ee?e:t})})}_typeCheck(e){return e instanceof String&&(e=e.valueOf()),"string"==typeof e}_isPresent(e){return super._isPresent(e)&&!!e.length}length(e,t=p.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},test(t){return W(t)||t.length===this.resolve(e)}})}min(e,t=p.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(t){return W(t)||t.length>=this.resolve(e)}})}max(e,t=p.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},test(t){return W(t)||t.length<=this.resolve(e)}})}matches(e,t){let n=!1,r,i;return t&&("object"==typeof t?{excludeEmptyString:n=!1,message:r,name:i}=t:r=t),this.test({name:i||"matches",message:r||p.matches,params:{regex:e},test:t=>W(t)||""===t&&n||-1!==t.search(e)})}email(e=p.email){return this.matches(Y,{name:"email",message:e,excludeEmptyString:!0})}url(e=p.url){return this.matches(Q,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=p.uuid){return this.matches(X,{name:"uuid",message:e,excludeEmptyString:!1})}ensure(){return this.default("").transform(e=>null===e?"":e)}trim(e=p.trim){return this.transform(e=>null!=e?e.trim():e).test({message:e,name:"trim",test:J})}lowercase(e=p.lowercase){return this.transform(e=>W(e)?e:e.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,test:e=>W(e)||e===e.toLowerCase()})}uppercase(e=p.uppercase){return this.transform(e=>W(e)?e:e.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,test:e=>W(e)||e===e.toUpperCase()})}}et.prototype=en.prototype;let er=e=>e!=+e;var ei=/^(\d{4}|[+\-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;let es=new Date(""),eo=e=>"[object Date]"===Object.prototype.toString.call(e);function ea(){return new el}class el extends V{constructor(){super({type:"date"}),this.withMutation(()=>{this.transform(function(e){return this.isType(e)?e:(e=function(e){var t,n,r=[1,4,5,6,7,10,11],i=0;if(n=ei.exec(e)){for(var s,o=0;s=r[o];++o)n[s]=+n[s]||0;n[2]=(+n[2]||1)-1,n[3]=+n[3]||1,n[7]=n[7]?String(n[7]).substr(0,3):0,(void 0===n[8]||""===n[8])&&(void 0===n[9]||""===n[9])?t
4415=+new Date(n[1],n[2],n[3],n[4],n[5],n[6],n[7]):("Z"!==n[8]&&void 0!==n[9]&&(i=60*n[10]+n[11],"+"===n[9]&&(i=0-i)),t=Date.UTC(n[1],n[2],n[3],n[4],n[5]+i,n[6],n[7]))}else t=Date.parse?Date.parse(e):NaN;return t}(e),isNaN(e)?es:new Date(e))})})}_typeCheck(e){return eo(e)&&!isNaN(e.getTime())}prepareParam(e,t){let n;if(M.isRef(e))n=e;else{let r=this.cast(e);if(!this._typeCheck(r))throw TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);n=r}return n}min(e,t=g.min){let n=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(e){return W(e)||e>=this.resolve(n)}})}max(e,t=g.max){let n=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(e){return W(e)||e<=this.resolve(n)}})}}el.INVALID_DATE=es,ea.prototype=el.prototype,ea.INVALID_DATE=es;var eu=n(1865),ec=n.n(eu),eh=n(8929),ed=n.n(eh),ef=n(7523),ep=n.n(ef),em=n(4633),eg=n.n(em);function ey(e,t){let n=1/0;return e.some((e,r)=>{var i;if((null==(i=t.path)?void 0:i.indexOf(e))!==-1)return n=r,!0}),n}function ev(e){return(t,n)=>ey(e,t)-ey(e,n)}function e_(){return(e_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}let eb=e=>"[object Object]"===Object.prototype.toString.call(e),ew=ev([]);class eE extends V{constructor(e){super({type:"object"}),this.fields=Object.create(null),this._sortErrors=ew,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{this.transform(function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(t){e=null}return this.isType(e)?e:null}),e&&this.shape(e)})}_typeCheck(e){return eb(e)||"function"==typeof e}_cast(e,t={}){var n;let r=super._cast(e,t);if(void 0===r)return this.getDefault();if(!this._typeCheck(r))return r;let i=this.fields,s=null!=(n=t.stripUnknown)?n:this.spec.noUnknown,o=this._nodes.concat(Object.keys(r).filter(e=>-1===this._nodes.indexOf(e))),a={},l=e_({},t,{parent:a,__validating:t.__validating||!1}),u=!1;for(let c of o){let h=i[c],d=x()(r,c);if(h){let f,p=r[c];l.path=(t.path?`${t.path}.`:"")+c;let m="spec"in(h=h.resolve({value:p,context:t.context,parent:a}))?h.spec:void 0,g=null==m?void 0:m.strict;if(null==m?void 0:m.strip){u=u||c in r;continue}void 0!==(f=t.__validating&&g?r[c]:h.cast(r[c],l))&&(a[c]=f)}else d&&!s&&(a[c]=r[c]);a[c]!==r[c]&&(u=!0)}return u?a:r}_validate(e,t={},n){let r=[],{sync:i,from:s=[],originalValue:o=e,abortEarly:a=this.spec.abortEarly,recursive:l=this.spec.recursive}=t;s=[{schema:this,value:o},...s],t.__validating=!0,t.originalValue=o,t.from=s,super._validate(e,t,(e,u)=>{if(e){if(!R.isError(e)||a)return void n(e,u);r.push(e)}if(!l||!eb(u)){n(r[0]||null,u);return}o=o||u;let c=this._nodes.map(e=>(n,r)=>{let i=-1===e.indexOf(".")?(t.path?`${t.path}.`:"")+e:`${t.path||""}["${e}"]`,a=this.fields[e];if(a&&"validate"in a){a.validate(u[e],e_({},t,{path:i,from:s,strict:!0,parent:u,originalValue:o[e]}),r);return}r(null)});O({sync:i,tests:c,value:u,errors:r,endEarly:a,sort:this._sortErrors,path:t.path},n)})}clone(e){let t=super.clone(e);return t.fields=e_({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),n=t.fields;for(let[r,i]of Object.entries(this.fields)){let s=n[r];void 0===s?n[r]=i:s instanceof V&&i instanceof V&&(n[r]=i.concat(s))}return t.withMutation(()=>t.shape(n,this._excludedEdges))}getDefaultFromShape(){let e={};return this._nodes.forEach(t=>{let n=this.fields[t];e[t]="default"in n?n.getDefault():void 0}),e}_getDefault(){return"default"in this.spec?super._getDefault():this._nodes.length?this.getDefaultFromShape():void 0}shape(e,t=[]){let n=this.clone(),r=Object.assign(n.fields,e);return n.fields=r,n._sortErrors=ev(Object.keys(r)),t.length&&(Array.isArray(t[0])||(t=[t]),n._excludedEdges=[...n._excludedEdges,...t]),n._nodes=function(e,t=[]){let n=[],r=new Set,i=new Set(t.map(([e,t])=>`${e}-${t}`));function s(e,t){let s=(0,P.split)(e)[0];r.add(s),i.has(`${t}-${s}`)||n.push([t,s])}for(let o in e)if(x()(e,o)){let a=e[o];r.add(o),M.isRef(a)&&a.isSibling?s(a.path,o):S(a)&&"deps"in a&&a.deps.forEach(e
4415=>s(e,o))}return eg().array(Array.from(r),n).reverse()}(r,n._excludedEdges),n}pick(e){let t={};for(let n of e)this.fields[n]&&(t[n]=this.fields[n]);return this.clone().withMutation(e=>(e.fields={},e.shape(t)))}omit(e){let t=this.clone(),n=t.fields;for(let r of(t.fields={},e))delete n[r];return t.withMutation(()=>t.shape(n))}from(e,t,n){let r=(0,P.getter)(e,!0);return this.transform(i=>{if(null==i)return i;let s=i;return x()(i,e)&&(s=e_({},i),n||delete s[e],s[t]=r(i)),s})}noUnknown(e=!0,t=v.noUnknown){"string"==typeof e&&(t=e,e=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:t,test(t){var n,r;if(null==t)return!0;let i,s=(i=Object.keys((n=this.schema).fields),Object.keys(t).filter(e=>-1===i.indexOf(e)));return!e||0===s.length||this.createError({params:{unknown:s.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(e=!0,t=v.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform(t=>t&&ep()(t,(t,n)=>e(n)))}camelCase(){return this.transformKeys(ed())}snakeCase(){return this.transformKeys(ec())}constantCase(){return this.transformKeys(e=>ec()(e).toUpperCase())}describe(){let e=super.describe();return e.fields=N()(this.fields,e=>e.describe()),e}}function ex(e){return new eE(e)}function eS(){return(eS=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}ex.prototype=eE.prototype},4836:function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},7462:function(e,t,n){"use strict";function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,{Z:function(){return r}})},5068:function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}n.d(t,{Z:function(){return i}})},3366:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i={},s=Object.keys(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}n.d(t,{Z:function(){return r}})},2238:function(e,t,n){"use strict";n.r(t),n.d(t,{FirebaseError:function(){return s.ZR},SDK_VERSION:function(){return x},_DEFAULT_ENTRY_NAME:function(){return h},_addComponent:function(){return m},_addOrOverwriteComponent:function(){return g},_apps:function(){return f},_clearComponents:function(){return b},_components:function(){return p},_getProvider:function(){return v},_registerComponent:function(){return y},_removeServiceInstance:function(){return _},deleteApp:function(){return k},getApp:function(){return T},getApps:function(){return I},initializeApp:function(){return S},onLog:function(){return R},registerVersion:function(){return C},setLogLevel:function(){return A}});var r=n(8463),i=n(3333),s=n(4444),o=n(6531);/** 4416 * @license 4417 * Copyright 2019 Google LLC 4418 * 4419 * Licensed under the Apache License, Version 2.0 (the "License"); 4420 * you may not use this file except in compliance with the License. 4421 * You may obtain a copy of the License at 4422 * 4423 * http://www.apache.org/licenses/LICENSE-2.0 4424 * 4425 * Unless required by applicable law or agreed to in writing, software 4426 * distributed under the License is distributed on an "AS IS" BASIS, 4427 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4428 * See the License for the specific language governing permissions and 4429 * limitations under the License. 4430 */ class a{constructor(e){this.container=e}getPlatformInfoString(){let e=this.container.getProviders();return e.map(e=>{if(!function(e){let t=e.getComponent();return(null==t?void 0:t.type)==="VERSION"}(e))return null;{let t=e.getImmediate();return`${t.library}/${t.version}`}}).filter(e=>e).join(" ")}}let l="@firebase/app",u="0.8.2",c=new i.Yd("@firebase/app"),h="[DEFAULT]",d={[l]:"fire-core","@firebase/app-compat":"fire-core-compat","@firebase/analytics":"fire-analytics","@firebase/analytics-compat":"fire-analytics-compat","@firebase/app-check":"fire-app-check","@firebase/app-check-compat":"fire-app-check-compat","@firebase/auth":"fire-auth","@firebase/auth-compat":"fire-auth-compat","@firebase/database":"fire-rtdb","@firebase/database-compat":"fire-rtdb-compat","@firebase/functions":"fire-fn","@firebase/functions-compat":"fire-fn-compat","@firebase/installations":"fire-iid","@firebase/installations-compat":"fire-iid-compat","@firebase/messaging":"fire-fcm","@firebase/messaging-compat":"fire-fcm-compat","@firebase/performance":"fire-perf","@firebase/performance-compat":"fire-perf-compat","@firebase/remote-config":"fire-rc","@firebase/remote-config-compat":"fire-rc-compat","@firebase/storage":"fire-gcs","@firebase/storage-compat":"fire-gcs-compat","@firebase/firestore":"fire-fst","@firebase/firestore-compat":"fire-fst-compat","fire-js":"fire-js",firebase:"fire-js-all"},f=new Map,p=new Map;function m(e,t){try{e.container.addComponent(t)}catch(n){c.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,n)}}function g(e,t){e.container.addOrOverwriteComponent(t)}function y(e){let t=e.name;if(p.has(t))return c.debug(`There were multiple attempts to register component ${t}.`),!1;
4430for(let n of(p.set(t,e),f.values()))m(n,e);return!0}function v(e,t){let n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}function _(e,t,n=h){v(e,t).clearInstance(n)}function b(){p.clear()}let w=new s.LL("app","Firebase",{"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","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."});/** 4431 * @license 4432 * Copyright 2019 Google LLC 4433 * 4434 * Licensed under the Apache License, Version 2.0 (the "License"); 4435 * you may not use this file except in compliance with the License. 4436 * You may obtain a copy of the License at 4437 * 4438 * http://www.apache.org/licenses/LICENSE-2.0 4439 * 4440 * Unless required by applicable law or agreed to in writing, software 4441 * distributed under the License is distributed on an "AS IS" BASIS, 4442 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4443 * See the License for the specific language governing permissions and 4444 * limitations under the License. 4445 */ class E{constructor(e,t,n){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},t),this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new r.wA("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 w.create("app-deleted",{appName:this._name})}}/** 4446 * @license 4447 * Copyright 2019 Google LLC 4448 * 4449 * Licensed under the Apache License, Version 2.0 (the "License"); 4450 * you may not use this file except in compliance with the License. 4451 * You may obtain a copy of the License at 4452 * 4453 * http://www.apache.org/licenses/LICENSE-2.0 4454 * 4455 * Unless required by applicable law or agreed to in writing, software 4456 * distributed under the License is distributed on an "AS IS" BASIS, 4457 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4458 * See the License for the specific language governing permissions and 4459 * limitations under the License. 4460 */ let x="9.12.1";function S(e,t={}){let n=e;if("object"!=typeof t){let i=t;t={name:i}}let o=Object.assign({name:h,automaticDataCollectionEnabled:!1},t),a=o.name;if("string"!=typeof a||!a)throw w.create("bad-app-name",{appName:String(a)});if(n||(n=(0,s.aH)()),!n)throw w.create("no-options");let l=f.get(a);if(l){if((0,s.vZ)(n,l.options)&&(0,s.vZ)(o,l.config))return l;throw w.create("duplicate-app",{appName:a})}let u=new r.H0(a);for(let c of p.values())u.addComponent(c);let d=new E(n,o,u);return f.set(a,d),d}function T(e=h){let t=f.get(e);if(!t&&e===h)return S();if(!t)throw w.create("no-app",{appName:e});return t}function I(){return Array.from(f.values())}async function k(e){let t=e.name;f.has(t)&&(f.delete(t),await Promise.all(e.container.getProviders().map(e=>e.delete())),e.isDeleted=!0)}
4460function C(e,t,n){var i;let s=null!==(i=d[e])&&void 0!==i?i:e;n&&(s+=`-${n}`);let o=s.match(/\s|\//),a=t.match(/\s|\//);if(o||a){let l=[`Unable to register library "${s}" with version "${t}":`];o&&l.push(`library name "${s}" contains illegal characters (whitespace or "/")`),o&&a&&l.push("and"),a&&l.push(`version name "${t}" contains illegal characters (whitespace or "/")`),c.warn(l.join(" "));return}y(new r.wA(`${s}-version`,()=>({library:s,version:t}),"VERSION"))}function R(e,t){if(null!==e&&"function"!=typeof e)throw w.create("invalid-log-argument");(0,i.Am)(e,t)}function A(e){(0,i.Ub)(e)}let O="firebase-heartbeat-store",D=null;function N(){return D||(D=(0,o.X3)("firebase-heartbeat-database",1,{upgrade(e,t){0===t&&e.createObjectStore(O)}}).catch(e=>{throw w.create("idb-open",{originalErrorMessage:e.message})})),D}async function P(e){var t;try{let n=await N();return n.transaction(O).objectStore(O).get(M(e))}catch(i){if(i instanceof s.ZR)c.warn(i.message);else{let r=w.create("idb-get",{originalErrorMessage:null===(t=i)||void 0===t?void 0:t.message});c.warn(r.message)}}}async function F(e,t){var n;try{let r=await N(),i=r.transaction(O,"readwrite"),o=i.objectStore(O);return await o.put(t,M(e)),i.done}catch(l){if(l instanceof s.ZR)c.warn(l.message);else{let a=w.create("idb-set",{originalErrorMessage:null===(n=l)||void 0===n?void 0:n.message});c.warn(a.message)}}}function M(e){return`${e.name}!${e.options.appId}`}class L{constructor(e){this.container=e,this._heartbeatsCache=null;let t=this.container.getProvider("app").getImmediate();this._storage=new U(t),this._heartbeatsCachePromise=this._storage.read().then(e=>(this._heartbeatsCache=e,e))}async triggerHeartbeat(){let e=this.container.getProvider("platform-logger").getImmediate(),t=e.getPlatformInfoString(),n=j();return(null===this._heartbeatsCache&&(this._heartbeatsCache=await this._heartbeatsCachePromise),this._heartbeatsCache.lastSentHeartbeatDate===n||this._heartbeatsCache.heartbeats.some(e=>e.date===n))?void 0:(this._heartbeatsCache.heartbeats.push({date:n,agent:t}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(e=>{let t=new Date(e.date).valueOf(),n=Date.now();return n-t<=2592e6}),this._storage.overwrite(this._heartbeatsCache))}async getHeartbeatsHeader(){if(null===this._heartbeatsCache&&await this._heartbeatsCachePromise,null===this._heartbeatsCache||0===this._heartbeatsCache.heartbeats.length)return"";let e=j(),{heartbeatsToSend:t,unsentEntries:n}=function(e,t=1024){let n=[],r=e.slice();for(let i of e){let s=n.find(e=>e.agent===i.agent);if(s){if(s.dates.push(i.date),B(n)>t){s.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),B(n)>t){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}(this._heartbeatsCache.heartbeats),r=(0,s.L)(JSON.stringify({version:2,heartbeats:t}));return this._heartbeatsCache.lastSentHeartbeatDate=e,n.length>0?(this._heartbeatsCache.heartbeats=n,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),r}}function j(){let e=new Date;return e.toISOString().substring(0,10)}class U{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return!!(0,s.hl)()&&(0,s.eu)().then(()=>!0).catch(()=>!1)}async read(){let e=await this._canUseIndexedDBPromise;if(!e)return{heartbeats:[]};{let t=await P(this.app);return t||{heartbeats:[]}}}async overwrite(e){var t;let n=await this._canUseIndexedDBPromise;if(n){let r=await this.read();return F(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:r.lastSentHeartbeatDate,heartbeats:e.heartbeats})}}async add(e){var t;let n=await this._canUseIndexedDBPromise;if(n){let r=await this.read();return F(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:r.lastSentHeartbeatDate,heartbeats:[...r.heartbeats,...e.heartbeats]})}}}function B(e){return(0,s.L)(JSON.stringify({version:2,heartbeats:e})).length}y(new r.wA("platform-logger",e=>new a(e),"PRIVATE")),y(new r.wA("heartbeat",e=>new L(e),"PRIVATE")),C(l,u,""),C(l,u,"esm2017"),C("fire-js","")},8463:function(e,t,n){"use strict";n.d(t,{H0:function(){return a},wA:function(){return i}});var r=n(4444);class i{constructor(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,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}}/** 4461 * @license 4462 * Copyright 2019 Google LLC 4463 * 4464 * Licensed under the Apache License, Version 2.0 (the "License");
4465 * you may not use this file except in compliance with the License. 4466 * You may obtain a copy of the License at 4467 * 4468 * http://www.apache.org/licenses/LICENSE-2.0 4469 * 4470 * Unless required by applicable law or agreed to in writing, software 4471 * distributed under the License is distributed on an "AS IS" BASIS, 4472 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4473 * See the License for the specific language governing permissions and 4474 * limitations under the License. 4475 */ let s="[DEFAULT]";/** 4476 * @license 4477 * Copyright 2019 Google LLC 4478 * 4479 * Licensed under the Apache License, Version 2.0 (the "License"); 4480 * you may not use this file except in compliance with the License. 4481 * You may obtain a copy of the License at 4482 * 4483 * http://www.apache.org/licenses/LICENSE-2.0 4484 * 4485 * Unless required by applicable law or agreed to in writing, software 4486 * distributed under the License is distributed on an "AS IS" BASIS, 4487 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4488 * See the License for the specific language governing permissions and 4489 * limitations under the License. 4490 */ class o{constructor(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){let t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){let n=new r.BH;if(this.instancesDeferred.set(t,n),this.isInitialized(t)||this.shouldAutoInitialize())try{let i=this.getOrInitializeService({instanceIdentifier:t});i&&n.resolve(i)}catch(s){}}return this.instancesDeferred.get(t).promise}getImmediate(e){var t;let n=this.normalizeInstanceIdentifier(null==e?void 0:e.identifier),r=null!==(t=null==e?void 0:e.optional)&&void 0!==t&&t;if(this.isInitialized(n)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:n})}catch(i){if(r)return null;throw i}else{if(r)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,this.shouldAutoInitialize()){var t;if(t=e,"EAGER"===t.instantiationMode)try{this.getOrInitializeService({instanceIdentifier:s})}catch(n){}for(let[r,i]of this.instancesDeferred.entries()){let o=this.normalizeInstanceIdentifier(r);try{let a=this.getOrInitializeService({instanceIdentifier:o});i.resolve(a)}catch(l){}}}}clearInstance(e=s){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){let e=Array.from(this.instances.values());await Promise.all([...e.filter(e=>"INTERNAL"in e).map(e=>e.INTERNAL.delete()),...e.filter(e=>"_delete"in e).map(e=>e._delete())])}isComponentSet(){return null!=this.component}isInitialized(e=s){return this.instances.has(e)}getOptions(e=s){return this.instancesOptions.get(e)||{}}initialize(e={}){let{options:t={}}=e,n=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(n))throw Error(`${this.name}(${n}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);let r=this.getOrInitializeService({instanceIdentifier:n,options:t});for(let[i,s]of this.instancesDeferred.entries()){let o=this.normalizeInstanceIdentifier(i);n===o&&s.resolve(r)}return r}onInit(e,t){var n;let r=this.normalizeInstanceIdentifier(t),i=null!==(n=this.onInitCallbacks.get(r))&&void 0!==n?n:new Set;i.add(e),this.onInitCallbacks.set(r,i);let s=this.instances.get(r);return s&&e(s,r),()=>{i.delete(e)}}invokeOnInitCallbacks(e,t){let n=this.onInitCallbacks.get(t);if(n)for(let r of n)try{r(e,t)}catch(i){}}getOrInitializeService({instanceIdentifier:e,options:t={}}){var n;let r=this.instances.get(e);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:(n=e,n===s?void 0:n),options:t}),this.instances.set(e,r),this.instancesOptions.set(e,t),this.invokeOnInitCallbacks(r,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,r)}catch(i){}return r||null}normalizeInstanceIdentifier(e=s){return this.component?this.component.multipleInstances?e:s:e}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}/** 4491 * @license 4492 * Copyright 2019 Google LLC 4493 * 4494 * Licensed under the Apache License, Version 2.0 (the "License");
4495 * you may not use this file except in compliance with the License. 4496 * You may obtain a copy of the License at 4497 * 4498 * http://www.apache.org/licenses/LICENSE-2.0 4499 * 4500 * Unless required by applicable law or agreed to in writing, software 4501 * distributed under the License is distributed on an "AS IS" BASIS, 4502 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4503 * See the License for the specific language governing permissions and 4504 * limitations under the License. 4505 */ class a{constructor(e){this.name=e,this.providers=new Map}addComponent(e){let t=this.getProvider(e.name);if(t.isComponentSet())throw Error(`Component ${e.name} has already been registered with ${this.name}`);t.setComponent(e)}addOrOverwriteComponent(e){let t=this.getProvider(e.name);t.isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);let t=new o(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}},3333:function(e,t,n){"use strict";var r,i;n.d(t,{Am:function(){return d},Ub:function(){return h},Yd:function(){return c},in:function(){return r}});/** 4506 * @license 4507 * Copyright 2017 Google LLC 4508 * 4509 * Licensed under the Apache License, Version 2.0 (the "License"); 4510 * you may not use this file except in compliance with the License. 4511 * You may obtain a copy of the License at 4512 * 4513 * http://www.apache.org/licenses/LICENSE-2.0 4514 * 4515 * Unless required by applicable law or agreed to in writing, software 4516 * distributed under the License is distributed on an "AS IS" BASIS, 4517 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4518 * See the License for the specific language governing permissions and 4519 * limitations under the License. 4520 */ let s=[];(i=r||(r={}))[i.DEBUG=0]="DEBUG",i[i.VERBOSE=1]="VERBOSE",i[i.INFO=2]="INFO",i[i.WARN=3]="WARN",i[i.ERROR=4]="ERROR",i[i.SILENT=5]="SILENT";let o={debug:r.DEBUG,verbose:r.VERBOSE,info:r.INFO,warn:r.WARN,error:r.ERROR,silent:r.SILENT},a=r.INFO,l={[r.DEBUG]:"log",[r.VERBOSE]:"log",[r.INFO]:"info",[r.WARN]:"warn",[r.ERROR]:"error"},u=(e,t,...n)=>{if(t<e.logLevel)return;let r=new Date().toISOString(),i=l[t];if(i)console[i](`[${r}] ${e.name}:`,...n);else throw Error(`Attempted to log a message with an invalid logType (value: ${t})`)};class c{constructor(e){this.name=e,this._logLevel=a,this._logHandler=u,this._userLogHandler=null,s.push(this)}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in r))throw TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel="string"==typeof e?o[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if("function"!=typeof e)throw 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,r.DEBUG,...e),this._logHandler(this,r.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,r.VERBOSE,...e),this._logHandler(this,r.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,r.INFO,...e),this._logHandler(this,r.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,r.WARN,...e),this._logHandler(this,r.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,r.ERROR,...e),this._logHandler(this,r.ERROR,...e)}}function h(e){s.forEach(t=>{t.setLogLevel(e)})}function d(e,t){for(let n of s){let i=null;t&&t.level&&(i=o[t.level]),null===e?n.userLogHandler=null:n.userLogHandler=(t,n,...s)=>{let o=s.map(e=>{if(null==e)return null;if("string"==typeof e)return e;if("number"==typeof e||"boolean"==typeof e)return e.toString();if(e instanceof Error)return e.message;try{return JSON.stringify(e)}catch(t){return null}}).filter(e=>e).join(" ");n>=(null!=i?i:t.logLevel)&&e({level:r[n].toLowerCase(),message:o,args:s,type:t.name})}}}},7568:function(e,t,n){"use strict";function r(e,t,n,r,i,s,o){try{var a=e[s](o),l=a.value}catch(u){n(u);return}a.done?t(l):Promise.resolve(l).then(r,i)}function i(e){return function(){var t=this,n=arguments;return new Promise(function(i,s){var o=e.apply(t,n);function a(e){r(o,i,s,a,l,"next",e)}function l(e){r(o,i,s,a,l,"throw",e)}a(void 0)})}}n.d(t,{Z:function(){return i}})},4924:function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{Z:function(){return r}})},6042:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(4924);function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}
4520))),i.forEach(function(t){(0,r.Z)(e,t,n[t])})}return e}},196:function(e,t,n){"use strict";function r(e,t){return function(){return e.apply(t,arguments)}}n.d(t,{ZP:function(){return e7}});let{toString:i}=Object.prototype,{getPrototypeOf:s}=Object,o=(z=Object.create(null),e=>{let t=i.call(e);return z[t]||(z[t]=t.slice(8,-1).toLowerCase())}),a=e=>(e=e.toLowerCase(),t=>o(t)===e),l=e=>t=>typeof t===e,{isArray:u}=Array,c=l("undefined"),h=a("ArrayBuffer"),d=l("string"),f=l("function"),p=l("number"),m=e=>null!==e&&"object"==typeof e,g=e=>{if("object"!==o(e))return!1;let t=s(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},y=a("Date"),v=a("File"),_=a("Blob"),b=a("FileList"),w=e=>m(e)&&f(e.pipe),E=e=>{let t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||i.call(e)===t||f(e.toString)&&e.toString()===t)},x=a("URLSearchParams"),S=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function T(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,i;if("object"!=typeof e&&(e=[e]),u(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{let s=n?Object.getOwnPropertyNames(e):Object.keys(e),o=s.length,a;for(r=0;r<o;r++)a=s[r],t.call(null,e[a],a,e)}}let I=(e,t,n,{allOwnKeys:i}={})=>(T(t,(t,i)=>{n&&f(t)?e[i]=r(t,n):e[i]=t},{allOwnKeys:i}),e),k=e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),C=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},R=(e,t,n,r)=>{let i,o,a,l={};if(t=t||{},null==e)return t;do{for(o=(i=Object.getOwnPropertyNames(e)).length;o-- >0;)a=i[o],(!r||r(a,e,t))&&!l[a]&&(t[a]=e[a],l[a]=!0);e=!1!==n&&s(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},A=(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return -1!==r&&r===n},O=e=>{if(!e)return null;if(u(e))return e;let t=e.length;if(!p(t))return null;let n=Array(t);for(;t-- >0;)n[t]=e[t];return n},D=(q="undefined"!=typeof Uint8Array&&s(Uint8Array),e=>q&&e instanceof q),N=(e,t)=>{let n=e&&e[Symbol.iterator],r=n.call(e),i;for(;
4520(i=r.next())&&!i.done;){let s=i.value;t.call(e,s[0],s[1])}},P=(e,t)=>{let n,r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},F=a("HTMLFormElement"),M=e=>e.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),L=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),j=a("RegExp"),U=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};T(n,(n,i)=>{!1!==t(n,i,e)&&(r[i]=n)}),Object.defineProperties(e,r)},B=e=>{U(e,(t,n)=>{let r=e[n];if(f(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not read-only method '"+n+"'")})}})},Z=(e,t)=>{let n={};return(e=>{e.forEach(e=>{n[e]=!0})})(u(e)?e:String(e).split(t)),n},$=()=>{},V=(e,t)=>Number.isFinite(e=+e)?e:t;var z,q,G={isArray:u,isArrayBuffer:h,isBuffer:function(e){return null!==e&&!c(e)&&null!==e.constructor&&!c(e.constructor)&&f(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:E,isArrayBufferView:function(e){let t;return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&h(e.buffer)},isString:d,isNumber:p,isBoolean:e=>!0===e||!1===e,isObject:m,isPlainObject:g,isUndefined:c,isDate:y,isFile:v,isBlob:_,isRegExp:j,isFunction:f,isStream:w,isURLSearchParams:x,isTypedArray:D,isFileList:b,forEach:T,merge:function e(){let t={},n=(n,r)=>{g(t[r])&&g(n)?t[r]=e(t[r],n):g(n)?t[r]=e({},n):u(n)?t[r]=n.slice():t[r]=n};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&T(arguments[r],n);return t},extend:I,trim:S,stripBOM:k,inherits:C,toFlatObject:R,kindOf:o,kindOfTest:a,endsWith:A,toArray:O,forEachEntry:N,matchAll:P,isHTMLForm:F,hasOwnProperty:L,hasOwnProp:L,reduceDescriptors:U,freezeMethods:B,toObjectSet:Z,toCamelCase:M,noop:$,toFiniteNumber:V};function W(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}G.inherits(W,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});let H=W.prototype,K={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{K[e]={value:e}}),Object.defineProperties(W,K),Object.defineProperty(H,"isAxiosError",{value:!0}),W.from=(e,t,n,r,i,s)=>{let o=Object.create(H);return G.toFlatObject(e,o,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e),W.call(o,e.message,t,n,r,i),o.cause=e,o.name=e.name,s&&Object.assign(o,s),o};var Y=n(6230),Q=n(1876).Buffer;function X(e){return G.isPlainObject(e)||G.isArray(e)}function J(e){return G.endsWith(e,"[]")?e.slice(0,-2):e}function ee(e,t,n){return e?e.concat(t).map(function(e,t){return e=J(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}let et=G.toFlatObject(G,{},null,function(e){return/^is[A-Z]/.test(e)});var en=function(e,t,n){var r;if(!G.isObject(e))throw TypeError("target must be an object");t=t||new(Y||FormData),n=G.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!G.isUndefined(t[e])});let i=n.metaTokens,s=n.visitor||h,o=n.dots,a=n.indexes,l=n.Blob||"undefined"!=typeof Blob&&Blob,u=l&&(r=t)&&G.isFunction(r.append)&&"FormData"===r[Symbol.toStringTag]&&r[Symbol.iterator];if(!G.isFunction(s))throw TypeError("visitor must be a function");function c(e){if(null===e)return"";if(G.isDate(e))return e.toISOString();if(!u&&G.isBlob(e))throw new W("Blob is not supported. Use a Buffer instead.");return G.isArrayBuffer(e)||G.isTypedArray(e)?u&&"function"==typeof Blob?new Blob([e]):Q.from(e):e}function h(e,n,r){let s=e;if(e&&!r&&"object"==typeof e){if(G.endsWith(n,"{}"))n=i?n:n.slice(0,-2),e=JSON.stringify(e);else{var l;if(G.isArray(e)&&(l=e,G.isArray(l)&&!l.some(X))||G.isFileList(e)||G.endsWith(n,"[]")&&(s=G.toArray(e)))return n=J(n),s.forEac
4520h(function(e,r){G.isUndefined(e)||null===e||t.append(!0===a?ee([n],r,o):null===a?n:n+"[]",c(e))}),!1}}return!!X(e)||(t.append(ee(r,n,o),c(e)),!1)}let d=[],f=Object.assign(et,{defaultVisitor:h,convertValue:c,isVisitable:X});if(!G.isObject(e))throw TypeError("data must be an object");return!function e(n,r){if(!G.isUndefined(n)){if(-1!==d.indexOf(n))throw Error("Circular reference detected in "+r.join("."));d.push(n),G.forEach(n,function(n,i){let o=!(G.isUndefined(n)||null===n)&&s.call(t,n,G.isString(i)?i.trim():i,r,f);!0===o&&e(n,r?r.concat(i):[i])}),d.pop()}}(e),t};function er(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function ei(e,t){this._pairs=[],e&&en(e,this,t)}let es=ei.prototype;function eo(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ea(e,t,n){if(!t)return e;let r=n&&n.encode||eo,i=n&&n.serialize,s;if(s=i?i(t,n):G.isURLSearchParams(t)?t.toString():new ei(t,n).toString(r)){let o=e.indexOf("#");-1!==o&&(e=e.slice(0,o)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}es.append=function(e,t){this._pairs.push([e,t])},es.toString=function(e){let t=e?function(t){return e.call(this,t,er)}:er;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};var el=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){G.forEach(this.handlers,function(t){null!==t&&e(t)})}},eu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ec="undefined"!=typeof URLSearchParams?URLSearchParams:ei,eh=FormData;let ed,ef=("undefined"==typeof navigator||"ReactNative"!==(ed=navigator.product)&&"NativeScript"!==ed&&"NS"!==ed)&&"undefined"!=typeof window&&"undefined"!=typeof document;var ep={isBrowser:!0,classes:{URLSearchParams:ec,FormData:eh,Blob},isStandardBrowserEnv:ef,protocols:["http","https","file","blob","url","data"]},em=function(e){if(G.isFormData(e)&&G.isFunction(e.entries)){let t={};return G.forEachEntry(e,(e,n)=>{var r;!function e(t,n,r,i){let s=t[i++],o=Number.isFinite(+s),a=i>=t.length;if(s=!s&&G.isArray(r)?r.length:s,a)return G.hasOwnProp(r,s)?r[s]=[r[s],n]:r[s]=n,!o;r[s]&&G.isObject(r[s])||(r[s]=[]);let l=e(t,n,r[s],i);return l&&G.isArray(r[s])&&(r[s]=function(e){let t={},n=Object.keys(e),r,i=n.length,s;for(r=0;r<i;r++)t[s=n[r]]=e[s];return t}(r[s])),!o}(G.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0]),n,t,0)}),t}return null},eg=ep.isStandardBrowserEnv?{write:function(e,t,n,r,i,s){let o=[];o.push(e+"="+encodeURIComponent(t)),G.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),G.isString(r)&&o.push("path="+r),G.isString(i)&&o.push("domain="+i),!0===s&&o.push("secure"),document.cookie=o.join("; ")},read:function(e){let t=document.cookie.match(RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function ey(e,t){var n,r,i;return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?(r=e,(i=t)?r.replace(/\/+$/,"")+"/"+i.replace(/^\/+/,""):r):t}var ev=ep.isStandardBrowserEnv?function(){let e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a"),n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){let t=G.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};function e_(e,t,n){W.call(this,null==e?"canceled":e,W.ERR_CANCELED,t,n),this.name="CanceledError"}
4520G.inherits(e_,W,{__CANCEL__:!0});let eb=G.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var ew=e=>{let t={},n,r,i;return e&&e.split("\n").forEach(function(e){i=e.indexOf(":"),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),n&&(!t[n]||!eb[n])&&("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};let eE=Symbol("internals"),ex=Symbol("defaults");function eS(e){return e&&String(e).trim().toLowerCase()}function eT(e){return!1===e||null==e?e:G.isArray(e)?e.map(eT):String(e)}function eI(e,t,n,r){if(G.isFunction(r))return r.call(this,t,n);if(G.isString(t)){if(G.isString(r))return -1!==t.indexOf(r);if(G.isRegExp(r))return r.test(t)}}function ek(e,t){t=t.toLowerCase();let n=Object.keys(e),r=n.length,i;for(;r-- >0;)if(t===(i=n[r]).toLowerCase())return i;return null}function eC(e,t){e&&this.set(e),this[ex]=t||null}Object.assign(eC.prototype,{set:function(e,t,n){let r=this;function i(e,t,n){let i=eS(t);if(!i)throw Error("header name must be a non-empty string");let s=ek(r,i);(!s||!0===n||!1!==r[s]&&!1!==n)&&(r[s||t]=eT(e))}return G.isPlainObject(e)?G.forEach(e,(e,n)=>{i(e,n,t)}):i(t,e,n),this},get:function(e,t){if(!(e=eS(e)))return;let n=ek(this,e);if(n){let r=this[n];if(!t)return r;if(!0===t)return function(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(r);if(G.isFunction(t))return t.call(this,r,n);if(G.isRegExp(t))return t.exec(r);throw TypeError("parser must be boolean|regexp|function")}},has:function(e,t){if(e=eS(e)){let n=ek(this,e);return!!(n&&(!t||eI(this,this[n],n,t)))}return!1},delete:function(e,t){let n=this,r=!1;function i(e){if(e=eS(e)){let i=ek(n,e);i&&(!t||eI(n,n[i],i,t))&&(delete n[i],r=!0)}}return G.isArray(e)?e.forEach(i):i(e),r},clear:function(){return Object.keys(this).forEach(this.delete.bind(this))},normalize:function(e){let t=this,n={};return G.forEach(this,(r,i)=>{var s;let o=ek(n,i);if(o){t[o]=eT(r),delete t[i];return}let a=e?i.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n):String(i).trim();a!==i&&delete t[i],t[a]=eT(r),n[a]=!0}),this},toJSON:function(e){let t=Object.create(null);return G.forEach(Object.assign({},this[ex]||null,this),(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&G.isArray(n)?n.join(", "):n)}),t}}),Object.assign(eC,{from:function(e){return G.isString(e)?new this(ew(e)):e instanceof this?e:new this(e)},accessor:function(e){let t=this[eE]=this[eE]={accessors:{}},n=t.accessors,r=this.prototype;function i(e){let t=eS(e);n[t]||(function(e,t){let n=G.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}(r,e),n[t]=!0)}return G.isArray(e)?e.forEach(i):i(e),this}}),eC.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent"]),G.freezeMethods(eC.prototype),G.freezeMethods(eC);var eR=function(e,t){e=e||10;let n=Array(e),r=Array(e),i=0,s=0,o;return t=void 0!==t?t:1e3,function(a){let l=Date.now(),u=r[s];o||(o=l),n[i]=a,r[i]=l;let c=s,h=0;for(;c!==i;)h+=n[c++],c%=e;if((i=(i+1)%e)===s&&(s=(s+1)%e),l-o<t)return;let d=u&&l-u;return d?Math.round(1e3*h/d):void 0}};function eA(e,t){let n=0,r=eR(50,250);return i=>{let s=i.loaded,o=i.lengthComputable?i.total:void 0,a=s-n,l=r(a);n=s;let u={loaded:s,total:o,progress:o?s/o:void 0,bytes:a,rate:l||void 0,estimated:l&&o&&s<=o?(o-s)/l:void 0};u[t?"download":"upload"]=!0,e(u)}}function eO(e){return new Promise(function(t,n){let r=e.data,i=eC.from(e.headers).normalize(),s=e.responseType,o;function a(){e.cancelToken&&e.cancelToken.unsubscribe(o),e.signal&&e.signal.removeEventListener("abort",o)}G.isFormData(r)&&ep.isStandardBrowserEnv&&i.setContentType(!1);let l=new XMLHttpRequest;if(e.auth){let u=e.auth.username||"",c=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(u+":"+c))}let h=ey(e.baseURL,e.url);function d(){if(!l)return;let r=eC.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),i=s&&"text"!==s&&"json"!==s?l.response:l.responseText,o={data:i,status:l.status,statusText:l.statusText,headers:r,config:e,request:l};!function(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new W("Request failed with status code "+n.status,[W.ERR_BAD_REQUEST,W.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}(function(e){t(e),a()},function(e){n(e),a()},o),l=null}if(l.open(e.method.toUpperCase(),ea(h,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,"onloadend"in l?l.onloadend=d:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(d)},l.onabort=function(){l&&(n(new W("Request aborted",W.ECONNABORTED,e,l)),l=null)},l.onerror=function(){n(new W("Network Error",W.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||eu;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new W(t,r.clarifyTimeoutError?W.ETIMEDOUT:W.ECONNABORTED,e,l)),l=null},ep.isStandardBrowserEnv){let f=(e.withCredentials||ev(h))&&e.xsrfCookieName&&eg.read(e.xsrfCookieName);f&&i.set(e.xsrfHeaderName,f)}void 0===r&&i.setContentType(null),"setRequestHeader"in l&&G.forEach(i.toJSON(),function(e,t){l.setRequestHeader(t,e)}),G.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),s&&"json"!==s&&(l.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",eA(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",eA(e.onUploadProgress)),(e.cancelToken||e.signal)&&(o=t=>{l&&(n(!t||t.type?new e_(null,e,l):t),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(o),e.signal&&(e.signal.aborted?o():e.signal.addEventListener("abort",o))
4520);let p=function(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(h);if(p&&-1===ep.protocols.indexOf(p)){n(new W("Unsupported protocol "+p+":",W.ERR_BAD_REQUEST,e));return}l.send(r||null)})}let eD={http:eO,xhr:eO};var eN={getAdapter(e){if(G.isString(e)){let t=eD[e];if(!e)throw Error(G.hasOwnProp(e)?`Adapter '${e}' is not available in the build`:`Can not resolve adapter '${e}'`);return t}if(!G.isFunction(e))throw TypeError("adapter is not a function");return e},adapters:eD},eP=n(3454);let eF={"Content-Type":"application/x-www-form-urlencoded"},eM,eL={transitional:eu,adapter:("undefined"!=typeof XMLHttpRequest?eM=eN.getAdapter("xhr"):void 0!==eP&&"process"===G.kindOf(eP)&&(eM=eN.getAdapter("http")),eM),transformRequest:[function(e,t){let n=t.getContentType()||"",r=n.indexOf("application/json")>-1,i=G.isObject(e);i&&G.isHTMLForm(e)&&(e=new FormData(e));let s=G.isFormData(e);if(s)return r&&r?JSON.stringify(em(e)):e;if(G.isArrayBuffer(e)||G.isBuffer(e)||G.isStream(e)||G.isFile(e)||G.isBlob(e))return e;if(G.isArrayBufferView(e))return e.buffer;if(G.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1){var a,l;return(a=e,l=this.formSerializer,en(a,new ep.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return ep.isNode&&G.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},l))).toString()}if((o=G.isFileList(e))||n.indexOf("multipart/form-data")>-1){let u=this.env&&this.env.FormData;return en(o?{"files[]":e}:e,u&&new u,this.formSerializer)}}return i||r?(t.setContentType("application/json",!1),function(e,t,n){if(G.isString(e))try{return(0,JSON.parse)(e),G.trim(e)}catch(r){if("SyntaxError"!==r.name)throw r}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){let t=this.transitional||eL.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&G.isString(e)&&(n&&!this.responseType||r)){let i=t&&t.silentJSONParsing;try{return JSON.parse(e)}catch(s){if(!i&&r){if("SyntaxError"===s.name)throw W.from(s,W.ERR_BAD_RESPONSE,this,null,this.response);throw s}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ep.classes.FormData,Blob:ep.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};function ej(e,t){let n=this||eL,r=t||n,i=eC.from(r.headers),s=r.data;return G.forEach(e,function(e){s=e.call(n,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function eU(e){return!!(e&&e.__CANCEL__)}function eB(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new e_}function eZ(e){eB(e),e.headers=eC.from(e.headers),e.data=ej.call(e,e.transformRequest);let t=e.adapter||eL.adapter;return t(e).then(function(t){return eB(e),t.data=ej.call(e,e.transformResponse,t),t.headers=eC.from(t.headers),t},function(t){return!eU(t)&&(eB(e),t&&t.response&&(t.response.data=ej.call(e,e.transformResponse,t.response),t.response.headers=eC.from(t.response.headers))),Promise.reject(t)})}function e$(e,t){t=t||{};let n={};function r(e,t){return G.isPlainObject(e)&&G.isPlainObject(t)?G.merge(e,t):G.isPlainObject(t)?G.merge({},t):G.isArray(t)?t.slice():t}function i(n){return G.isUndefined(t[n])?G.isUndefined(e[n])?void 0:r(void 0,e[n]):r(e[n],t[n])}function s(e){if(!G.isUndefined(t[e]))return r(void 0,t[e])}function o(n){return G.isUndefined(t[n])?G.isUndefined(e[n])?void 0:r(void 0,e[n]):r(void 0,t[n])}function a(n){return n in t?r(e[n],t[n]):n in e?r(void 0,e[n]):void 0}let l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a};return G.forEach(Object.keys(e).concat(Object.keys(t)),function(e){let t=l[e]||i,r=t(e);G.isUndefined(r)&&t!==a||(n[e]=r)}),n}G.forEach(["delete","get","head"],function(e){eL.headers[e]={}}),G.forEach(["post","put","patch"],function(e){eL.headers[e]=G.merge(eF)});let eV="1.1.3",ez={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ez[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});let eq={};ez.transitional=function(e,t,n){function r(e,t){return"[Axios v"+eV+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,i,s)=>{if(!1===e)throw new W(r(i," has been removed"+(t?" in "+t:"")),W.ERR_DEPRECATED);return t&&!eq[i]&&(eq[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,s)}};var eG={assertOptions:function(e,t,n){if("object"!=typeof e)throw new W("options must be an object",W.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-- >0;){let s=r[i],o=t[s];if(o){let a=e[s],l=void 0===a||o(a,s,e);if(!0!==l)throw new W("option "+s+" must be "+l,W.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new W("Unknown option "+s,W.ERR_BAD_OPTION)}},validators:ez};let eW=eG.validators;class eH{constructor(e){this.defaults=e,this.interceptors={request:new el,response:new el}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=e$(this.defaults,t);let{transitional:n,paramsSerializer:r}=t;void 0!==n&&eG.assertOptions(n,{silentJSONParsing:eW.transitional(eW.boolean),forcedJSONParsing:eW.transitional(eW.boolean),clarifyTimeoutError:eW.transitional(eW.boolean)},!1),void 0!==r&&eG.assertOptions(r,{encode:eW.function,serialize:eW.function},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=t.headers&&G.merge(t.headers.common,t.headers[t.method]);i&&G.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),t.headers=new eC(t.headers,i);let s=[],o=!0;this.interceptors.request.forEach(function(e){("function"!=typeof e.runWhen||!1!==e.runWhen(t))&&(o=o&&e.synchronous,s.unshift(e.fulfilled,e.rejected))});let a=[];this.interceptors.response.forEach(function(e){a.push(e.fulfilled,e.rejected)});let l,u=0,c;if(!o){let h=[eZ.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,a),c=h.length,l=Promise.resolve(t);u<c;)l=l.then(h[u++],h[u++]);return l}c=s.length;let d=t;for(u=0;
4520u<c;){let f=s[u++],p=s[u++];try{d=f(d)}catch(m){p.call(this,m);break}}try{l=eZ.call(this,d)}catch(g){return Promise.reject(g)}for(u=0,c=a.length;u<c;)l=l.then(a[u++],a[u++]);return l}getUri(e){e=e$(this.defaults,e);let t=ey(e.baseURL,e.url);return ea(t,e.params,e.paramsSerializer)}}G.forEach(["delete","get","head","options"],function(e){eH.prototype[e]=function(t,n){return this.request(e$(n||{},{method:e,url:t,data:(n||{}).data}))}}),G.forEach(["post","put","patch"],function(e){function t(t){return function(n,r,i){return this.request(e$(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}eH.prototype[e]=t(),eH.prototype[e+"Form"]=t(!0)});class eK{constructor(e){if("function"!=typeof e)throw TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});let n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){!n.reason&&(n.reason=new e_(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e,t=new eK(function(t){e=t});return{token:t,cancel:e}}}let eY=function e(t){let n=new eH(t),i=r(eH.prototype.request,n);return G.extend(i,eH.prototype,n,{allOwnKeys:!0}),G.extend(i,n,null,{allOwnKeys:!0}),i.create=function(n){return e(e$(t,n))},i}(eL);eY.Axios=eH,eY.CanceledError=e_,eY.CancelToken=eK,eY.isCancel=eU,eY.VERSION=eV,eY.toFormData=en,eY.AxiosError=W,eY.Cancel=eY.CanceledError,eY.all=function(e){return Promise.all(e)},eY.spread=function(e){return function(t){return e.apply(null,t)}},eY.isAxiosError=function(e){return G.isObject(e)&&!0===e.isAxiosError},eY.formToJSON=e=>em(G.isHTMLForm(e)?new FormData(e):e);let{Axios:eQ,AxiosError:eX,CanceledError:eJ,isCancel:e0,CancelToken:e1,VERSION:e2,all:e4,Cancel:e5,isAxiosError:e3,spread:e6,toFormData:e8}=eY;var e7=eY},6531:function(e,t,n){"use strict";var r;n.d(t,{X3:function(){return m}});let i=(e,t)=>t.some(t=>e instanceof t),s,o,a=new WeakMap,l=new WeakMap,u=new WeakMap,c=new WeakMap,h=new WeakMap,d={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return l.get(e);if("objectStoreNames"===t)return e.objectStoreNames||u.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return f(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function f(e){if(e instanceof IDBRequest)return function(e){let t=new Promise((t,n)=>{let r=()=>{e.removeEventListener("success",i),e.removeEventListener("error",s)},i=()=>{t(f(e.result)),r()},s=()=>{n(e.error),r()};e.addEventListener("success",i),e.addEventListener("error",s)});return t.then(t=>{t instanceof IDBCursor&&a.set(t,e)}).catch(()=>{}),h.set(t,e),t}(e);if(c.has(e))return c.get(e);let t=function(e){if("function"==typeof e){var t;return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(o||(o=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey,])).includes(e)?function(...t){return e.apply(p(this),t),f(a.get(this))}:function(...t){return f(e.apply(p(this),t))}:function(t,...n){let r=e.call(p(this),t,...n);return u.set(r,t.sort?t.sort():[t]),f(r)}}return(e instanceof IDBTransaction&&function(e){if(l.has(e))return;let t=new Promise((t,n)=>{let r=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",s),e.removeEventListener("abort",s)},i=()=>{t(),r()},s=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",i),e.addEventListener("error",s),e.addEventListener("abort",s)});l.set(e,t)}(e),i(e,s||(s=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction,])))?new Proxy(e,d):e}(e);return t!==e&&(c.set(e,t),h.set(t,e)),t}let p=e=>h.get(e);function m(e,t,{blocked:n,upgrade:r,blocking:i,terminated:s}={}){let o=indexedDB.open(e,t),a=f(o);return r&&o.addEventListener("upgradeneeded",e=>{r(f(o.result),e.oldVersion,e.newVersion,f(o.transaction))}),n&&o.addEventListener("blocked",()=>n()),a.then(e=>{s&&e.addEventListener("close",()=>s()),i&&e.addEventListener("versionchange",()=>i())}).catch(()=>{}),a}let g=["get","getKey","getAll","getAllKeys","count"],y=["put","add","delete","clear"],v=new Map;function _(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&"string"==typeof t))return;if(v.get(t))return v.get(t);let n=t.replace(/FromIndex$/,""),r=t!==n,i=y.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||g.includes(n)))return;let s=async function(e,...t){let s=this.transaction(e,i?"readwrite":"readonly"),o=s.store;
4520return r&&(o=o.index(t.shift())),(await Promise.all([o[n](...t),i&&s.done,]))[0]};return v.set(t,s),s}d=(r=e=>({...e,get:(t,n,r)=>_(t,n)||e.get(t,n,r),has:(t,n)=>!!_(t,n)||e.has(t,n)}))(d)}},function(e){var t=function(t){return e(e.s=t)};e.O(0,[774,179],function(){return t(9484),t(8814),t(1118),t(387)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.